@musistudio/claude-code-router 1.0.38 → 1.0.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/README_zh.md +1 -1
- package/dist/cli.js +4874 -3797
- package/dist/index.html +49 -48
- package/dist/tiktoken_bg.wasm +0 -0
- package/package.json +2 -2
package/dist/index.html
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>CCR UI</title>
|
|
7
|
-
<script type="module" crossorigin>function
|
|
7
|
+
<script type="module" crossorigin>function Qw(n,a){for(var l=0;l<a.length;l++){const i=a[l];if(typeof i!="string"&&!Array.isArray(i)){for(const s in i)if(s!=="default"&&!(s in n)){const u=Object.getOwnPropertyDescriptor(i,s);u&&Object.defineProperty(n,s,u.get?u:{enumerable:!0,get:()=>i[s]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const u of s)if(u.type==="childList")for(const f of u.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&i(f)}).observe(document,{childList:!0,subtree:!0});function l(s){const u={};return s.integrity&&(u.integrity=s.integrity),s.referrerPolicy&&(u.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?u.credentials="include":s.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function i(s){if(s.ep)return;s.ep=!0;const u=l(s);fetch(s.href,u)}})();function Xy(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var If={exports:{}},to={};/**
|
|
8
8
|
* @license React
|
|
9
9
|
* react-jsx-runtime.production.js
|
|
10
10
|
*
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
*
|
|
13
13
|
* This source code is licensed under the MIT license found in the
|
|
14
14
|
* LICENSE file in the root directory of this source tree.
|
|
15
|
-
*/var cv;function Iw(){if(cv)return to;cv=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function l(i,s,u){var f=null;if(u!==void 0&&(f=""+u),s.key!==void 0&&(f=""+s.key),"key"in s){u={};for(var d in s)d!=="key"&&(u[d]=s[d])}else u=s;return s=u.ref,{$$typeof:n,type:i,key:f,ref:s!==void 0?s:null,props:u}}return to.Fragment=a,to.jsx=l,to.jsxs=l,to}var fv;function Jw(){return fv||(fv=1,Wf.exports=Iw()),Wf.exports}var g=Jw();const He=n=>typeof n=="string",no=()=>{let n,a;const l=new Promise((i,s)=>{n=i,a=s});return l.resolve=n,l.reject=a,l},dv=n=>n==null?"":""+n,Ww=(n,a,l)=>{n.forEach(i=>{a[i]&&(l[i]=a[i])})},eS=/###/g,hv=n=>n&&n.indexOf("###")>-1?n.replace(eS,"."):n,mv=n=>!n||He(n),fo=(n,a,l)=>{const i=He(a)?a.split("."):a;let s=0;for(;s<i.length-1;){if(mv(n))return{};const u=hv(i[s]);!n[u]&&l&&(n[u]=new l),Object.prototype.hasOwnProperty.call(n,u)?n=n[u]:n={},++s}return mv(n)?{}:{obj:n,k:hv(i[s])}},pv=(n,a,l)=>{const{obj:i,k:s}=fo(n,a,Object);if(i!==void 0||a.length===1){i[s]=l;return}let u=a[a.length-1],f=a.slice(0,a.length-1),d=fo(n,f,Object);for(;d.obj===void 0&&f.length;)u=`${f[f.length-1]}.${u}`,f=f.slice(0,f.length-1),d=fo(n,f,Object),d?.obj&&typeof d.obj[`${d.k}.${u}`]<"u"&&(d.obj=void 0);d.obj[`${d.k}.${u}`]=l},tS=(n,a,l,i)=>{const{obj:s,k:u}=fo(n,a,Object);s[u]=s[u]||[],s[u].push(l)},fu=(n,a)=>{const{obj:l,k:i}=fo(n,a);if(l&&Object.prototype.hasOwnProperty.call(l,i))return l[i]},nS=(n,a,l)=>{const i=fu(n,l);return i!==void 0?i:fu(a,l)},Iy=(n,a,l)=>{for(const i in a)i!=="__proto__"&&i!=="constructor"&&(i in n?He(n[i])||n[i]instanceof String||He(a[i])||a[i]instanceof String?l&&(n[i]=a[i]):Iy(n[i],a[i],l):n[i]=a[i]);return n},kl=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var aS={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const rS=n=>He(n)?n.replace(/[&<>"'\/]/g,a=>aS[a]):n;class lS{constructor(a){this.capacity=a,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(a){const l=this.regExpMap.get(a);if(l!==void 0)return l;const i=new RegExp(a);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(a,i),this.regExpQueue.push(a),i}}const iS=[" ",",","?","!",";"],oS=new lS(20),sS=(n,a,l)=>{a=a||"",l=l||"";const i=iS.filter(f=>a.indexOf(f)<0&&l.indexOf(f)<0);if(i.length===0)return!0;const s=oS.getRegExp(`(${i.map(f=>f==="?"?"\\?":f).join("|")})`);let u=!s.test(n);if(!u){const f=n.indexOf(l);f>0&&!s.test(n.substring(0,f))&&(u=!0)}return u},jd=(n,a,l=".")=>{if(!n)return;if(n[a])return Object.prototype.hasOwnProperty.call(n,a)?n[a]:void 0;const i=a.split(l);let s=n;for(let u=0;u<i.length;){if(!s||typeof s!="object")return;let f,d="";for(let p=u;p<i.length;++p)if(p!==u&&(d+=l),d+=i[p],f=s[d],f!==void 0){if(["string","number","boolean"].indexOf(typeof f)>-1&&p<i.length-1)continue;u+=p-u+1;break}s=f}return s},po=n=>n?.replace("_","-"),uS={type:"logger",log(n){this.output("log",n)},warn(n){this.output("warn",n)},error(n){this.output("error",n)},output(n,a){console?.[n]?.apply?.(console,a)}};class du{constructor(a,l={}){this.init(a,l)}init(a,l={}){this.prefix=l.prefix||"i18next:",this.logger=a||uS,this.options=l,this.debug=l.debug}log(...a){return this.forward(a,"log","",!0)}warn(...a){return this.forward(a,"warn","",!0)}error(...a){return this.forward(a,"error","")}deprecate(...a){return this.forward(a,"warn","WARNING DEPRECATED: ",!0)}forward(a,l,i,s){return s&&!this.debug?null:(He(a[0])&&(a[0]=`${i}${this.prefix} ${a[0]}`),this.logger[l](a))}create(a){return new du(this.logger,{prefix:`${this.prefix}:${a}:`,...this.options})}clone(a){return a=a||this.options,a.prefix=a.prefix||this.prefix,new du(this.logger,a)}}var Gn=new du;class _u{constructor(){this.observers={}}on(a,l){return a.split(" ").forEach(i=>{this.observers[i]||(this.observers[i]=new Map);const s=this.observers[i].get(l)||0;this.observers[i].set(l,s+1)}),this}off(a,l){if(this.observers[a]){if(!l){delete this.observers[a];return}this.observers[a].delete(l)}}emit(a,...l){this.observers[a]&&Array.from(this.observers[a].entries()).forEach(([s,u])=>{for(let f=0;f<u;f++)s(...l)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,u])=>{for(let f=0;f<u;f++)s.apply(s,[a,...l])})}}class gv extends _u{constructor(a,l={ns:["translation"],defaultNS:"translation"}){super(),this.data=a||{},this.options=l,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(a){this.options.ns.indexOf(a)<0&&this.options.ns.push(a)}removeNamespaces(a){const l=this.options.ns.indexOf(a);l>-1&&this.options.ns.splice(l,1)}getResource(a,l,i,s={}){const u=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,f=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let d;a.indexOf(".")>-1?d=a.split("."):(d=[a,l],i&&(Array.isArray(i)?d.push(...i):He(i)&&u?d.push(...i.split(u)):d.push(i)));const p=fu(this.data,d);return!p&&!l&&!i&&a.indexOf(".")>-1&&(a=d[0],l=d[1],i=d.slice(2).join(".")),p||!f||!He(i)?p:jd(this.data?.[a]?.[l],i,u)}addResource(a,l,i,s,u={silent:!1}){const f=u.keySeparator!==void 0?u.keySeparator:this.options.keySeparator;let d=[a,l];i&&(d=d.concat(f?i.split(f):i)),a.indexOf(".")>-1&&(d=a.split("."),s=l,l=d[1]),this.addNamespaces(l),pv(this.data,d,s),u.silent||this.emit("added",a,l,i,s)}addResources(a,l,i,s={silent:!1}){for(const u in i)(He(i[u])||Array.isArray(i[u]))&&this.addResource(a,l,u,i[u],{silent:!0});s.silent||this.emit("added",a,l,i)}addResourceBundle(a,l,i,s,u,f={silent:!1,skipCopy:!1}){let d=[a,l];a.indexOf(".")>-1&&(d=a.split("."),s=i,i=l,l=d[1]),this.addNamespaces(l);let p=fu(this.data,d)||{};f.skipCopy||(i=JSON.parse(JSON.stringify(i))),s?Iy(p,i,u):p={...p,...i},pv(this.data,d,p),f.silent||this.emit("added",a,l,i)}removeResourceBundle(a,l){this.hasResourceBundle(a,l)&&delete this.data[a][l],this.removeNamespaces(l),this.emit("removed",a,l)}hasResourceBundle(a,l){return this.getResource(a,l)!==void 0}getResourceBundle(a,l){return l||(l=this.options.defaultNS),this.getResource(a,l)}getDataByLanguage(a){return this.data[a]}hasLanguageSomeTranslations(a){const l=this.getDataByLanguage(a);return!!(l&&Object.keys(l)||[]).find(s=>l[s]&&Object.keys(l[s]).length>0)}toJSON(){return this.data}}var Jy={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,a,l,i,s){return n.forEach(u=>{a=this.processors[u]?.process(a,l,i,s)??a}),a}};const vv={},yv=n=>!He(n)&&typeof n!="boolean"&&typeof n!="number";class hu extends _u{constructor(a,l={}){super(),Ww(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],a,this),this.options=l,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Gn.create("translator")}changeLanguage(a){a&&(this.language=a)}exists(a,l={interpolation:{}}){const i={...l};return a==null?!1:this.resolve(a,i)?.res!==void 0}extractFromKey(a,l){let i=l.nsSeparator!==void 0?l.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");const s=l.keySeparator!==void 0?l.keySeparator:this.options.keySeparator;let u=l.ns||this.options.defaultNS||[];const f=i&&a.indexOf(i)>-1,d=!this.options.userDefinedKeySeparator&&!l.keySeparator&&!this.options.userDefinedNsSeparator&&!l.nsSeparator&&!sS(a,i,s);if(f&&!d){const p=a.match(this.interpolator.nestingRegexp);if(p&&p.length>0)return{key:a,namespaces:He(u)?[u]:u};const m=a.split(i);(i!==s||i===s&&this.options.ns.indexOf(m[0])>-1)&&(u=m.shift()),a=m.join(s)}return{key:a,namespaces:He(u)?[u]:u}}translate(a,l,i){let s=typeof l=="object"?{...l}:l;if(typeof s!="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),typeof options=="object"&&(s={...s}),s||(s={}),a==null)return"";Array.isArray(a)||(a=[String(a)]);const u=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,f=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:d,namespaces:p}=this.extractFromKey(a[a.length-1],s),m=p[p.length-1];let v=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;v===void 0&&(v=":");const b=s.lng||this.language,S=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(b?.toLowerCase()==="cimode")return S?u?{res:`${m}${v}${d}`,usedKey:d,exactUsedKey:d,usedLng:b,usedNS:m,usedParams:this.getUsedParamsDetails(s)}:`${m}${v}${d}`:u?{res:d,usedKey:d,exactUsedKey:d,usedLng:b,usedNS:m,usedParams:this.getUsedParamsDetails(s)}:d;const w=this.resolve(a,s);let _=w?.res;const C=w?.usedKey||d,j=w?.exactUsedKey||d,N=["[object Number]","[object Function]","[object RegExp]"],U=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,z=!this.i18nFormat||this.i18nFormat.handleAsObject,D=s.count!==void 0&&!He(s.count),T=hu.hasDefaultValue(s),R=D?this.pluralResolver.getSuffix(b,s.count,s):"",H=s.ordinal&&D?this.pluralResolver.getSuffix(b,s.count,{ordinal:!1}):"",Z=D&&!s.ordinal&&s.count===0,J=Z&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${R}`]||s[`defaultValue${H}`]||s.defaultValue;let ne=_;z&&!_&&T&&(ne=J);const Se=yv(ne),de=Object.prototype.toString.apply(ne);if(z&&ne&&Se&&N.indexOf(de)<0&&!(He(U)&&Array.isArray(ne))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const oe=this.options.returnedObjectHandler?this.options.returnedObjectHandler(C,ne,{...s,ns:p}):`key '${d} (${this.language})' returned an object instead of string.`;return u?(w.res=oe,w.usedParams=this.getUsedParamsDetails(s),w):oe}if(f){const oe=Array.isArray(ne),fe=oe?[]:{},he=oe?j:C;for(const L in ne)if(Object.prototype.hasOwnProperty.call(ne,L)){const I=`${he}${f}${L}`;T&&!_?fe[L]=this.translate(I,{...s,defaultValue:yv(J)?J[L]:void 0,joinArrays:!1,ns:p}):fe[L]=this.translate(I,{...s,joinArrays:!1,ns:p}),fe[L]===I&&(fe[L]=ne[L])}_=fe}}else if(z&&He(U)&&Array.isArray(_))_=_.join(U),_&&(_=this.extendTranslation(_,a,s,i));else{let oe=!1,fe=!1;!this.isValidLookup(_)&&T&&(oe=!0,_=J),this.isValidLookup(_)||(fe=!0,_=d);const L=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&fe?void 0:_,I=T&&J!==_&&this.options.updateMissing;if(fe||oe||I){if(this.logger.log(I?"updateKey":"missingKey",b,m,d,I?J:_),f){const K=this.resolve(d,{...s,keySeparator:!1});K&&K.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 V=[];const ge=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ge&&ge[0])for(let K=0;K<ge.length;K++)V.push(ge[K]);else this.options.saveMissingTo==="all"?V=this.languageUtils.toResolveHierarchy(s.lng||this.language):V.push(s.lng||this.language);const O=(K,P,G)=>{const ee=T&&G!==_?G:L;this.options.missingKeyHandler?this.options.missingKeyHandler(K,m,P,ee,I,s):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(K,m,P,ee,I,s),this.emit("missingKey",K,m,P,_)};this.options.saveMissing&&(this.options.saveMissingPlurals&&D?V.forEach(K=>{const P=this.pluralResolver.getSuffixes(K,s);Z&&s[`defaultValue${this.options.pluralSeparator}zero`]&&P.indexOf(`${this.options.pluralSeparator}zero`)<0&&P.push(`${this.options.pluralSeparator}zero`),P.forEach(G=>{O([K],d+G,s[`defaultValue${G}`]||J)})}):O(V,d,J))}_=this.extendTranslation(_,a,s,w,i),fe&&_===d&&this.options.appendNamespaceToMissingKey&&(_=`${m}${v}${d}`),(fe||oe)&&this.options.parseMissingKeyHandler&&(_=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${m}${v}${d}`:d,oe?_:void 0,s))}return u?(w.res=_,w.usedParams=this.getUsedParamsDetails(s),w):_}extendTranslation(a,l,i,s,u){if(this.i18nFormat?.parse)a=this.i18nFormat.parse(a,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const p=He(a)&&(i?.interpolation?.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let m;if(p){const b=a.match(this.interpolator.nestingRegexp);m=b&&b.length}let v=i.replace&&!He(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables&&(v={...this.options.interpolation.defaultVariables,...v}),a=this.interpolator.interpolate(a,v,i.lng||this.language||s.usedLng,i),p){const b=a.match(this.interpolator.nestingRegexp),S=b&&b.length;m<S&&(i.nest=!1)}!i.lng&&s&&s.res&&(i.lng=this.language||s.usedLng),i.nest!==!1&&(a=this.interpolator.nest(a,(...b)=>u?.[0]===b[0]&&!i.context?(this.logger.warn(`It seems you are nesting recursively key: ${b[0]} in key: ${l[0]}`),null):this.translate(...b,l),i)),i.interpolation&&this.interpolator.reset()}const f=i.postProcess||this.options.postProcess,d=He(f)?[f]:f;return a!=null&&d?.length&&i.applyPostProcessor!==!1&&(a=Jy.handle(d,a,l,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),a}resolve(a,l={}){let i,s,u,f,d;return He(a)&&(a=[a]),a.forEach(p=>{if(this.isValidLookup(i))return;const m=this.extractFromKey(p,l),v=m.key;s=v;let b=m.namespaces;this.options.fallbackNS&&(b=b.concat(this.options.fallbackNS));const S=l.count!==void 0&&!He(l.count),w=S&&!l.ordinal&&l.count===0,_=l.context!==void 0&&(He(l.context)||typeof l.context=="number")&&l.context!=="",C=l.lngs?l.lngs:this.languageUtils.toResolveHierarchy(l.lng||this.language,l.fallbackLng);b.forEach(j=>{this.isValidLookup(i)||(d=j,!vv[`${C[0]}-${j}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(d)&&(vv[`${C[0]}-${j}`]=!0,this.logger.warn(`key "${s}" for languages "${C.join(", ")}" won't get resolved as namespace "${d}" 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!!!")),C.forEach(N=>{if(this.isValidLookup(i))return;f=N;const U=[v];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(U,v,N,j,l);else{let D;S&&(D=this.pluralResolver.getSuffix(N,l.count,l));const T=`${this.options.pluralSeparator}zero`,R=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(S&&(U.push(v+D),l.ordinal&&D.indexOf(R)===0&&U.push(v+D.replace(R,this.options.pluralSeparator)),w&&U.push(v+T)),_){const H=`${v}${this.options.contextSeparator}${l.context}`;U.push(H),S&&(U.push(H+D),l.ordinal&&D.indexOf(R)===0&&U.push(H+D.replace(R,this.options.pluralSeparator)),w&&U.push(H+T))}}let z;for(;z=U.pop();)this.isValidLookup(i)||(u=z,i=this.getResource(N,j,z,l))}))})}),{res:i,usedKey:s,exactUsedKey:u,usedLng:f,usedNS:d}}isValidLookup(a){return a!==void 0&&!(!this.options.returnNull&&a===null)&&!(!this.options.returnEmptyString&&a==="")}getResource(a,l,i,s={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(a,l,i,s):this.resourceStore.getResource(a,l,i,s)}getUsedParamsDetails(a={}){const l=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=a.replace&&!He(a.replace);let s=i?a.replace:a;if(i&&typeof a.count<"u"&&(s.count=a.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!i){s={...s};for(const u of l)delete s[u]}return s}static hasDefaultValue(a){const l="defaultValue";for(const i in a)if(Object.prototype.hasOwnProperty.call(a,i)&&l===i.substring(0,l.length)&&a[i]!==void 0)return!0;return!1}}class bv{constructor(a){this.options=a,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Gn.create("languageUtils")}getScriptPartFromCode(a){if(a=po(a),!a||a.indexOf("-")<0)return null;const l=a.split("-");return l.length===2||(l.pop(),l[l.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(l.join("-"))}getLanguagePartFromCode(a){if(a=po(a),!a||a.indexOf("-")<0)return a;const l=a.split("-");return this.formatLanguageCode(l[0])}formatLanguageCode(a){if(He(a)&&a.indexOf("-")>-1){let l;try{l=Intl.getCanonicalLocales(a)[0]}catch{}return l&&this.options.lowerCaseLng&&(l=l.toLowerCase()),l||(this.options.lowerCaseLng?a.toLowerCase():a)}return this.options.cleanCode||this.options.lowerCaseLng?a.toLowerCase():a}isSupportedCode(a){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(a=this.getLanguagePartFromCode(a)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(a)>-1}getBestMatchFromCodes(a){if(!a)return null;let l;return a.forEach(i=>{if(l)return;const s=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(s))&&(l=s)}),!l&&this.options.supportedLngs&&a.forEach(i=>{if(l)return;const s=this.getScriptPartFromCode(i);if(this.isSupportedCode(s))return l=s;const u=this.getLanguagePartFromCode(i);if(this.isSupportedCode(u))return l=u;l=this.options.supportedLngs.find(f=>{if(f===u)return f;if(!(f.indexOf("-")<0&&u.indexOf("-")<0)&&(f.indexOf("-")>0&&u.indexOf("-")<0&&f.substring(0,f.indexOf("-"))===u||f.indexOf(u)===0&&u.length>1))return f})}),l||(l=this.getFallbackCodes(this.options.fallbackLng)[0]),l}getFallbackCodes(a,l){if(!a)return[];if(typeof a=="function"&&(a=a(l)),He(a)&&(a=[a]),Array.isArray(a))return a;if(!l)return a.default||[];let i=a[l];return i||(i=a[this.getScriptPartFromCode(l)]),i||(i=a[this.formatLanguageCode(l)]),i||(i=a[this.getLanguagePartFromCode(l)]),i||(i=a.default),i||[]}toResolveHierarchy(a,l){const i=this.getFallbackCodes((l===!1?[]:l)||this.options.fallbackLng||[],a),s=[],u=f=>{f&&(this.isSupportedCode(f)?s.push(f):this.logger.warn(`rejecting language code not found in supportedLngs: ${f}`))};return He(a)&&(a.indexOf("-")>-1||a.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&u(this.formatLanguageCode(a)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&u(this.getScriptPartFromCode(a)),this.options.load!=="currentOnly"&&u(this.getLanguagePartFromCode(a))):He(a)&&u(this.formatLanguageCode(a)),i.forEach(f=>{s.indexOf(f)<0&&u(this.formatLanguageCode(f))}),s}}const xv={zero:0,one:1,two:2,few:3,many:4,other:5},wv={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class cS{constructor(a,l={}){this.languageUtils=a,this.options=l,this.logger=Gn.create("pluralResolver"),this.pluralRulesCache={}}addRule(a,l){this.rules[a]=l}clearCache(){this.pluralRulesCache={}}getRule(a,l={}){const i=po(a==="dev"?"en":a),s=l.ordinal?"ordinal":"cardinal",u=JSON.stringify({cleanedCode:i,type:s});if(u in this.pluralRulesCache)return this.pluralRulesCache[u];let f;try{f=new Intl.PluralRules(i,{type:s})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),wv;if(!a.match(/-|_/))return wv;const p=this.languageUtils.getLanguagePartFromCode(a);f=this.getRule(p,l)}return this.pluralRulesCache[u]=f,f}needsPlural(a,l={}){let i=this.getRule(a,l);return i||(i=this.getRule("dev",l)),i?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(a,l,i={}){return this.getSuffixes(a,i).map(s=>`${l}${s}`)}getSuffixes(a,l={}){let i=this.getRule(a,l);return i||(i=this.getRule("dev",l)),i?i.resolvedOptions().pluralCategories.sort((s,u)=>xv[s]-xv[u]).map(s=>`${this.options.prepend}${l.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(a,l,i={}){const s=this.getRule(a,i);return s?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${s.select(l)}`:(this.logger.warn(`no plural rule found for: ${a}`),this.getSuffix("dev",l,i))}}const Sv=(n,a,l,i=".",s=!0)=>{let u=nS(n,a,l);return!u&&s&&He(l)&&(u=jd(n,l,i),u===void 0&&(u=jd(a,l,i))),u},ed=n=>n.replace(/\$/g,"$$$$");class fS{constructor(a={}){this.logger=Gn.create("interpolator"),this.options=a,this.format=a?.interpolation?.format||(l=>l),this.init(a)}init(a={}){a.interpolation||(a.interpolation={escapeValue:!0});const{escape:l,escapeValue:i,useRawValueToEscape:s,prefix:u,prefixEscaped:f,suffix:d,suffixEscaped:p,formatSeparator:m,unescapeSuffix:v,unescapePrefix:b,nestingPrefix:S,nestingPrefixEscaped:w,nestingSuffix:_,nestingSuffixEscaped:C,nestingOptionsSeparator:j,maxReplaces:N,alwaysFormat:U}=a.interpolation;this.escape=l!==void 0?l:rS,this.escapeValue=i!==void 0?i:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=u?kl(u):f||"{{",this.suffix=d?kl(d):p||"}}",this.formatSeparator=m||",",this.unescapePrefix=v?"":b||"-",this.unescapeSuffix=this.unescapePrefix?"":v||"",this.nestingPrefix=S?kl(S):w||kl("$t("),this.nestingSuffix=_?kl(_):C||kl(")"),this.nestingOptionsSeparator=j||",",this.maxReplaces=N||1e3,this.alwaysFormat=U!==void 0?U:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const a=(l,i)=>l?.source===i?(l.lastIndex=0,l):new RegExp(i,"g");this.regexp=a(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=a(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=a(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(a,l,i,s){let u,f,d;const p=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},m=w=>{if(w.indexOf(this.formatSeparator)<0){const N=Sv(l,p,w,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(N,void 0,i,{...s,...l,interpolationkey:w}):N}const _=w.split(this.formatSeparator),C=_.shift().trim(),j=_.join(this.formatSeparator).trim();return this.format(Sv(l,p,C,this.options.keySeparator,this.options.ignoreJSONStructure),j,i,{...s,...l,interpolationkey:C})};this.resetRegExp();const v=s?.missingInterpolationHandler||this.options.missingInterpolationHandler,b=s?.interpolation?.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:w=>ed(w)},{regex:this.regexp,safeValue:w=>this.escapeValue?ed(this.escape(w)):ed(w)}].forEach(w=>{for(d=0;u=w.regex.exec(a);){const _=u[1].trim();if(f=m(_),f===void 0)if(typeof v=="function"){const j=v(a,u,s);f=He(j)?j:""}else if(s&&Object.prototype.hasOwnProperty.call(s,_))f="";else if(b){f=u[0];continue}else this.logger.warn(`missed to pass in variable ${_} for interpolating ${a}`),f="";else!He(f)&&!this.useRawValueToEscape&&(f=dv(f));const C=w.safeValue(f);if(a=a.replace(u[0],C),b?(w.regex.lastIndex+=f.length,w.regex.lastIndex-=u[0].length):w.regex.lastIndex=0,d++,d>=this.maxReplaces)break}}),a}nest(a,l,i={}){let s,u,f;const d=(p,m)=>{const v=this.nestingOptionsSeparator;if(p.indexOf(v)<0)return p;const b=p.split(new RegExp(`${v}[ ]*{`));let S=`{${b[1]}`;p=b[0],S=this.interpolate(S,f);const w=S.match(/'/g),_=S.match(/"/g);((w?.length??0)%2===0&&!_||_.length%2!==0)&&(S=S.replace(/'/g,'"'));try{f=JSON.parse(S),m&&(f={...m,...f})}catch(C){return this.logger.warn(`failed parsing options string in nesting for key ${p}`,C),`${p}${v}${S}`}return f.defaultValue&&f.defaultValue.indexOf(this.prefix)>-1&&delete f.defaultValue,p};for(;s=this.nestingRegexp.exec(a);){let p=[];f={...i},f=f.replace&&!He(f.replace)?f.replace:f,f.applyPostProcessor=!1,delete f.defaultValue;const m=/{.*}/.test(s[1])?s[1].lastIndexOf("}")+1:s[1].indexOf(this.formatSeparator);if(m!==-1&&(p=s[1].slice(m).split(this.formatSeparator).map(v=>v.trim()).filter(Boolean),s[1]=s[1].slice(0,m)),u=l(d.call(this,s[1].trim(),f),f),u&&s[0]===a&&!He(u))return u;He(u)||(u=dv(u)),u||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${a}`),u=""),p.length&&(u=p.reduce((v,b)=>this.format(v,b,i.lng,{...i,interpolationkey:s[1].trim()}),u.trim())),a=a.replace(s[0],u),this.regexp.lastIndex=0}return a}}const dS=n=>{let a=n.toLowerCase().trim();const l={};if(n.indexOf("(")>-1){const i=n.split("(");a=i[0].toLowerCase().trim();const s=i[1].substring(0,i[1].length-1);a==="currency"&&s.indexOf(":")<0?l.currency||(l.currency=s.trim()):a==="relativetime"&&s.indexOf(":")<0?l.range||(l.range=s.trim()):s.split(";").forEach(f=>{if(f){const[d,...p]=f.split(":"),m=p.join(":").trim().replace(/^'+|'+$/g,""),v=d.trim();l[v]||(l[v]=m),m==="false"&&(l[v]=!1),m==="true"&&(l[v]=!0),isNaN(m)||(l[v]=parseInt(m,10))}})}return{formatName:a,formatOptions:l}},Ev=n=>{const a={};return(l,i,s)=>{let u=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(u={...u,[s.interpolationkey]:void 0});const f=i+JSON.stringify(u);let d=a[f];return d||(d=n(po(i),s),a[f]=d),d(l)}},hS=n=>(a,l,i)=>n(po(l),i)(a);class mS{constructor(a={}){this.logger=Gn.create("formatter"),this.options=a,this.init(a)}init(a,l={interpolation:{}}){this.formatSeparator=l.interpolation.formatSeparator||",";const i=l.cacheInBuiltFormats?Ev:hS;this.formats={number:i((s,u)=>{const f=new Intl.NumberFormat(s,{...u});return d=>f.format(d)}),currency:i((s,u)=>{const f=new Intl.NumberFormat(s,{...u,style:"currency"});return d=>f.format(d)}),datetime:i((s,u)=>{const f=new Intl.DateTimeFormat(s,{...u});return d=>f.format(d)}),relativetime:i((s,u)=>{const f=new Intl.RelativeTimeFormat(s,{...u});return d=>f.format(d,u.range||"day")}),list:i((s,u)=>{const f=new Intl.ListFormat(s,{...u});return d=>f.format(d)})}}add(a,l){this.formats[a.toLowerCase().trim()]=l}addCached(a,l){this.formats[a.toLowerCase().trim()]=Ev(l)}format(a,l,i,s={}){const u=l.split(this.formatSeparator);if(u.length>1&&u[0].indexOf("(")>1&&u[0].indexOf(")")<0&&u.find(d=>d.indexOf(")")>-1)){const d=u.findIndex(p=>p.indexOf(")")>-1);u[0]=[u[0],...u.splice(1,d)].join(this.formatSeparator)}return u.reduce((d,p)=>{const{formatName:m,formatOptions:v}=dS(p);if(this.formats[m]){let b=d;try{const S=s?.formatParams?.[s.interpolationkey]||{},w=S.locale||S.lng||s.locale||s.lng||i;b=this.formats[m](d,w,{...v,...s,...S})}catch(S){this.logger.warn(S)}return b}else this.logger.warn(`there was no format function for ${m}`);return d},a)}}const pS=(n,a)=>{n.pending[a]!==void 0&&(delete n.pending[a],n.pendingCount--)};class gS extends _u{constructor(a,l,i,s={}){super(),this.backend=a,this.store=l,this.services=i,this.languageUtils=i.languageUtils,this.options=s,this.logger=Gn.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(i,s.backend,s)}queueLoad(a,l,i,s){const u={},f={},d={},p={};return a.forEach(m=>{let v=!0;l.forEach(b=>{const S=`${m}|${b}`;!i.reload&&this.store.hasResourceBundle(m,b)?this.state[S]=2:this.state[S]<0||(this.state[S]===1?f[S]===void 0&&(f[S]=!0):(this.state[S]=1,v=!1,f[S]===void 0&&(f[S]=!0),u[S]===void 0&&(u[S]=!0),p[b]===void 0&&(p[b]=!0)))}),v||(d[m]=!0)}),(Object.keys(u).length||Object.keys(f).length)&&this.queue.push({pending:f,pendingCount:Object.keys(f).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(u),pending:Object.keys(f),toLoadLanguages:Object.keys(d),toLoadNamespaces:Object.keys(p)}}loaded(a,l,i){const s=a.split("|"),u=s[0],f=s[1];l&&this.emit("failedLoading",u,f,l),!l&&i&&this.store.addResourceBundle(u,f,i,void 0,void 0,{skipCopy:!0}),this.state[a]=l?-1:2,l&&i&&(this.state[a]=0);const d={};this.queue.forEach(p=>{tS(p.loaded,[u],f),pS(p,a),l&&p.errors.push(l),p.pendingCount===0&&!p.done&&(Object.keys(p.loaded).forEach(m=>{d[m]||(d[m]={});const v=p.loaded[m];v.length&&v.forEach(b=>{d[m][b]===void 0&&(d[m][b]=!0)})}),p.done=!0,p.errors.length?p.callback(p.errors):p.callback())}),this.emit("loaded",d),this.queue=this.queue.filter(p=>!p.done)}read(a,l,i,s=0,u=this.retryTimeout,f){if(!a.length)return f(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:a,ns:l,fcName:i,tried:s,wait:u,callback:f});return}this.readingCalls++;const d=(m,v)=>{if(this.readingCalls--,this.waitingReads.length>0){const b=this.waitingReads.shift();this.read(b.lng,b.ns,b.fcName,b.tried,b.wait,b.callback)}if(m&&v&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,a,l,i,s+1,u*2,f)},u);return}f(m,v)},p=this.backend[i].bind(this.backend);if(p.length===2){try{const m=p(a,l);m&&typeof m.then=="function"?m.then(v=>d(null,v)).catch(d):d(null,m)}catch(m){d(m)}return}return p(a,l,d)}prepareLoading(a,l,i={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();He(a)&&(a=this.languageUtils.toResolveHierarchy(a)),He(l)&&(l=[l]);const u=this.queueLoad(a,l,i,s);if(!u.toLoad.length)return u.pending.length||s(),null;u.toLoad.forEach(f=>{this.loadOne(f)})}load(a,l,i){this.prepareLoading(a,l,{},i)}reload(a,l,i){this.prepareLoading(a,l,{reload:!0},i)}loadOne(a,l=""){const i=a.split("|"),s=i[0],u=i[1];this.read(s,u,"read",void 0,void 0,(f,d)=>{f&&this.logger.warn(`${l}loading namespace ${u} for language ${s} failed`,f),!f&&d&&this.logger.log(`${l}loaded namespace ${u} for language ${s}`,d),this.loaded(a,f,d)})}saveMissing(a,l,i,s,u,f={},d=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(l)){this.logger.warn(`did not save key "${i}" as the namespace "${l}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(i==null||i==="")){if(this.backend?.create){const p={...f,isUpdate:u},m=this.backend.create.bind(this.backend);if(m.length<6)try{let v;m.length===5?v=m(a,l,i,s,p):v=m(a,l,i,s),v&&typeof v.then=="function"?v.then(b=>d(null,b)).catch(d):d(null,v)}catch(v){d(v)}else m(a,l,i,s,d,p)}!a||!a[0]||this.store.addResource(a[0],l,i,s)}}}const Cv=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:n=>{let a={};if(typeof n[1]=="object"&&(a=n[1]),He(n[1])&&(a.defaultValue=n[1]),He(n[2])&&(a.tDescription=n[2]),typeof n[2]=="object"||typeof n[3]=="object"){const l=n[3]||n[2];Object.keys(l).forEach(i=>{a[i]=l[i]})}return a},interpolation:{escapeValue:!0,format:n=>n,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),_v=n=>(He(n.ns)&&(n.ns=[n.ns]),He(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),He(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),qs=()=>{},vS=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(l=>{typeof n[l]=="function"&&(n[l]=n[l].bind(n))})};class go extends _u{constructor(a={},l){if(super(),this.options=_v(a),this.services={},this.logger=Gn,this.modules={external:[]},vS(this),l&&!this.isInitialized&&!a.isClone){if(!this.options.initAsync)return this.init(a,l),this;setTimeout(()=>{this.init(a,l)},0)}}init(a={},l){this.isInitializing=!0,typeof a=="function"&&(l=a,a={}),a.defaultNS==null&&a.ns&&(He(a.ns)?a.defaultNS=a.ns:a.ns.indexOf("translation")<0&&(a.defaultNS=a.ns[0]));const i=Cv();this.options={...i,...this.options,..._v(a)},this.options.interpolation={...i.interpolation,...this.options.interpolation},a.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=a.keySeparator),a.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=a.nsSeparator);const s=m=>m?typeof m=="function"?new m:m:null;if(!this.options.isClone){this.modules.logger?Gn.init(s(this.modules.logger),this.options):Gn.init(null,this.options);let m;this.modules.formatter?m=this.modules.formatter:m=mS;const v=new bv(this.options);this.store=new gv(this.options.resources,this.options);const b=this.services;b.logger=Gn,b.resourceStore=this.store,b.languageUtils=v,b.pluralResolver=new cS(v,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==i.interpolation.format&&this.logger.warn("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===i.interpolation.format)&&(b.formatter=s(m),b.formatter.init&&b.formatter.init(b,this.options),this.options.interpolation.format=b.formatter.format.bind(b.formatter)),b.interpolator=new fS(this.options),b.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},b.backendConnector=new gS(s(this.modules.backend),b.resourceStore,b,this.options),b.backendConnector.on("*",(w,..._)=>{this.emit(w,..._)}),this.modules.languageDetector&&(b.languageDetector=s(this.modules.languageDetector),b.languageDetector.init&&b.languageDetector.init(b,this.options.detection,this.options)),this.modules.i18nFormat&&(b.i18nFormat=s(this.modules.i18nFormat),b.i18nFormat.init&&b.i18nFormat.init(this)),this.translator=new hu(this.services,this.options),this.translator.on("*",(w,..._)=>{this.emit(w,..._)}),this.modules.external.forEach(w=>{w.init&&w.init(this)})}if(this.format=this.options.interpolation.format,l||(l=qs),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]=(...v)=>this.store[m](...v)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(m=>{this[m]=(...v)=>(this.store[m](...v),this)});const d=no(),p=()=>{const m=(v,b)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),d.resolve(b),l(v,b)};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?p():setTimeout(p,0),d}loadResources(a,l=qs){let i=l;const s=He(a)?a:this.language;if(typeof a=="function"&&(i=a),!this.options.resources||this.options.partialBundledLanguages){if(s?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return i();const u=[],f=d=>{if(!d||d==="cimode")return;this.services.languageUtils.toResolveHierarchy(d).forEach(m=>{m!=="cimode"&&u.indexOf(m)<0&&u.push(m)})};s?f(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(p=>f(p)),this.options.preload?.forEach?.(d=>f(d)),this.services.backendConnector.load(u,this.options.ns,d=>{!d&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(d)})}else i(null)}reloadResources(a,l,i){const s=no();return typeof a=="function"&&(i=a,a=void 0),typeof l=="function"&&(i=l,l=void 0),a||(a=this.languages),l||(l=this.options.ns),i||(i=qs),this.services.backendConnector.reload(a,l,u=>{s.resolve(),i(u)}),s}use(a){if(!a)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!a.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return a.type==="backend"&&(this.modules.backend=a),(a.type==="logger"||a.log&&a.warn&&a.error)&&(this.modules.logger=a),a.type==="languageDetector"&&(this.modules.languageDetector=a),a.type==="i18nFormat"&&(this.modules.i18nFormat=a),a.type==="postProcessor"&&Jy.addPostProcessor(a),a.type==="formatter"&&(this.modules.formatter=a),a.type==="3rdParty"&&this.modules.external.push(a),this}setResolvedLanguage(a){if(!(!a||!this.languages)&&!(["cimode","dev"].indexOf(a)>-1)){for(let l=0;l<this.languages.length;l++){const i=this.languages[l];if(!(["cimode","dev"].indexOf(i)>-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}!this.resolvedLanguage&&this.languages.indexOf(a)<0&&this.store.hasLanguageSomeTranslations(a)&&(this.resolvedLanguage=a,this.languages.unshift(a))}}changeLanguage(a,l){this.isLanguageChangingTo=a;const i=no();this.emit("languageChanging",a);const s=d=>{this.language=d,this.languages=this.services.languageUtils.toResolveHierarchy(d),this.resolvedLanguage=void 0,this.setResolvedLanguage(d)},u=(d,p)=>{p?this.isLanguageChangingTo===a&&(s(p),this.translator.changeLanguage(p),this.isLanguageChangingTo=void 0,this.emit("languageChanged",p),this.logger.log("languageChanged",p)):this.isLanguageChangingTo=void 0,i.resolve((...m)=>this.t(...m)),l&&l(d,(...m)=>this.t(...m))},f=d=>{!a&&!d&&this.services.languageDetector&&(d=[]);const p=He(d)?d:d&&d[0],m=this.store.hasLanguageSomeTranslations(p)?p:this.services.languageUtils.getBestMatchFromCodes(He(d)?[d]:d);m&&(this.language||s(m),this.translator.language||this.translator.changeLanguage(m),this.services.languageDetector?.cacheUserLanguage?.(m)),this.loadResources(m,v=>{u(v,m)})};return!a&&this.services.languageDetector&&!this.services.languageDetector.async?f(this.services.languageDetector.detect()):!a&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(f):this.services.languageDetector.detect(f):f(a),i}getFixedT(a,l,i){const s=(u,f,...d)=>{let p;typeof f!="object"?p=this.options.overloadTranslationOptionHandler([u,f].concat(d)):p={...f},p.lng=p.lng||s.lng,p.lngs=p.lngs||s.lngs,p.ns=p.ns||s.ns,p.keyPrefix!==""&&(p.keyPrefix=p.keyPrefix||i||s.keyPrefix);const m=this.options.keySeparator||".";let v;return p.keyPrefix&&Array.isArray(u)?v=u.map(b=>`${p.keyPrefix}${m}${b}`):v=p.keyPrefix?`${p.keyPrefix}${m}${u}`:u,this.t(v,p)};return He(a)?s.lng=a:s.lngs=a,s.ns=l,s.keyPrefix=i,s}t(...a){return this.translator?.translate(...a)}exists(...a){return this.translator?.exists(...a)}setDefaultNamespace(a){this.options.defaultNS=a}hasLoadedNamespace(a,l={}){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 i=l.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,u=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const f=(d,p)=>{const m=this.services.backendConnector.state[`${d}|${p}`];return m===-1||m===0||m===2};if(l.precheck){const d=l.precheck(this,f);if(d!==void 0)return d}return!!(this.hasResourceBundle(i,a)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||f(i,a)&&(!s||f(u,a)))}loadNamespaces(a,l){const i=no();return this.options.ns?(He(a)&&(a=[a]),a.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{i.resolve(),l&&l(s)}),i):(l&&l(),Promise.resolve())}loadLanguages(a,l){const i=no();He(a)&&(a=[a]);const s=this.options.preload||[],u=a.filter(f=>s.indexOf(f)<0&&this.services.languageUtils.isSupportedCode(f));return u.length?(this.options.preload=s.concat(u),this.loadResources(f=>{i.resolve(),l&&l(f)}),i):(l&&l(),Promise.resolve())}dir(a){if(a||(a=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!a)return"rtl";try{const s=new Intl.Locale(a);if(s&&s.getTextInfo){const u=s.getTextInfo();if(u&&u.direction)return u.direction}}catch{}const l=["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"],i=this.services?.languageUtils||new bv(Cv());return a.toLowerCase().indexOf("-latn")>1?"ltr":l.indexOf(i.getLanguagePartFromCode(a))>-1||a.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(a={},l){return new go(a,l)}cloneInstance(a={},l=qs){const i=a.forkResourceStore;i&&delete a.forkResourceStore;const s={...this.options,...a,isClone:!0},u=new go(s);if((a.debug!==void 0||a.prefix!==void 0)&&(u.logger=u.logger.clone(a)),["store","services","language"].forEach(d=>{u[d]=this[d]}),u.services={...this.services},u.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},i){const d=Object.keys(this.store.data).reduce((p,m)=>(p[m]={...this.store.data[m]},p[m]=Object.keys(p[m]).reduce((v,b)=>(v[b]={...p[m][b]},v),p[m]),p),{});u.store=new gv(d,s),u.services.resourceStore=u.store}return u.translator=new hu(u.services,s),u.translator.on("*",(d,...p)=>{u.emit(d,...p)}),u.init(s,l),u.translator.options=s,u.translator.backendConnector.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},u}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Yt=go.createInstance();Yt.createInstance=go.createInstance;Yt.createInstance;Yt.dir;Yt.init;Yt.loadResources;Yt.reloadResources;Yt.use;Yt.changeLanguage;Yt.getFixedT;Yt.t;Yt.exists;Yt.setDefaultNamespace;Yt.hasLoadedNamespace;Yt.loadNamespaces;Yt.loadLanguages;var td={exports:{}},$e={};/**
|
|
15
|
+
*/var uv;function Zw(){if(uv)return to;uv=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function l(i,s,u){var f=null;if(u!==void 0&&(f=""+u),s.key!==void 0&&(f=""+s.key),"key"in s){u={};for(var d in s)d!=="key"&&(u[d]=s[d])}else u=s;return s=u.ref,{$$typeof:n,type:i,key:f,ref:s!==void 0?s:null,props:u}}return to.Fragment=a,to.jsx=l,to.jsxs=l,to}var cv;function Iw(){return cv||(cv=1,If.exports=Zw()),If.exports}var g=Iw();const Ue=n=>typeof n=="string",no=()=>{let n,a;const l=new Promise((i,s)=>{n=i,a=s});return l.resolve=n,l.reject=a,l},fv=n=>n==null?"":""+n,Jw=(n,a,l)=>{n.forEach(i=>{a[i]&&(l[i]=a[i])})},Ww=/###/g,dv=n=>n&&n.indexOf("###")>-1?n.replace(Ww,"."):n,hv=n=>!n||Ue(n),fo=(n,a,l)=>{const i=Ue(a)?a.split("."):a;let s=0;for(;s<i.length-1;){if(hv(n))return{};const u=dv(i[s]);!n[u]&&l&&(n[u]=new l),Object.prototype.hasOwnProperty.call(n,u)?n=n[u]:n={},++s}return hv(n)?{}:{obj:n,k:dv(i[s])}},mv=(n,a,l)=>{const{obj:i,k:s}=fo(n,a,Object);if(i!==void 0||a.length===1){i[s]=l;return}let u=a[a.length-1],f=a.slice(0,a.length-1),d=fo(n,f,Object);for(;d.obj===void 0&&f.length;)u=`${f[f.length-1]}.${u}`,f=f.slice(0,f.length-1),d=fo(n,f,Object),d?.obj&&typeof d.obj[`${d.k}.${u}`]<"u"&&(d.obj=void 0);d.obj[`${d.k}.${u}`]=l},eS=(n,a,l,i)=>{const{obj:s,k:u}=fo(n,a,Object);s[u]=s[u]||[],s[u].push(l)},fu=(n,a)=>{const{obj:l,k:i}=fo(n,a);if(l&&Object.prototype.hasOwnProperty.call(l,i))return l[i]},tS=(n,a,l)=>{const i=fu(n,l);return i!==void 0?i:fu(a,l)},Qy=(n,a,l)=>{for(const i in a)i!=="__proto__"&&i!=="constructor"&&(i in n?Ue(n[i])||n[i]instanceof String||Ue(a[i])||a[i]instanceof String?l&&(n[i]=a[i]):Qy(n[i],a[i],l):n[i]=a[i]);return n},kl=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var nS={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const aS=n=>Ue(n)?n.replace(/[&<>"'\/]/g,a=>nS[a]):n;class rS{constructor(a){this.capacity=a,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(a){const l=this.regExpMap.get(a);if(l!==void 0)return l;const i=new RegExp(a);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(a,i),this.regExpQueue.push(a),i}}const lS=[" ",",","?","!",";"],iS=new rS(20),oS=(n,a,l)=>{a=a||"",l=l||"";const i=lS.filter(f=>a.indexOf(f)<0&&l.indexOf(f)<0);if(i.length===0)return!0;const s=iS.getRegExp(`(${i.map(f=>f==="?"?"\\?":f).join("|")})`);let u=!s.test(n);if(!u){const f=n.indexOf(l);f>0&&!s.test(n.substring(0,f))&&(u=!0)}return u},Rd=(n,a,l=".")=>{if(!n)return;if(n[a])return Object.prototype.hasOwnProperty.call(n,a)?n[a]:void 0;const i=a.split(l);let s=n;for(let u=0;u<i.length;){if(!s||typeof s!="object")return;let f,d="";for(let p=u;p<i.length;++p)if(p!==u&&(d+=l),d+=i[p],f=s[d],f!==void 0){if(["string","number","boolean"].indexOf(typeof f)>-1&&p<i.length-1)continue;u+=p-u+1;break}s=f}return s},po=n=>n?.replace("_","-"),sS={type:"logger",log(n){this.output("log",n)},warn(n){this.output("warn",n)},error(n){this.output("error",n)},output(n,a){console?.[n]?.apply?.(console,a)}};class du{constructor(a,l={}){this.init(a,l)}init(a,l={}){this.prefix=l.prefix||"i18next:",this.logger=a||sS,this.options=l,this.debug=l.debug}log(...a){return this.forward(a,"log","",!0)}warn(...a){return this.forward(a,"warn","",!0)}error(...a){return this.forward(a,"error","")}deprecate(...a){return this.forward(a,"warn","WARNING DEPRECATED: ",!0)}forward(a,l,i,s){return s&&!this.debug?null:(Ue(a[0])&&(a[0]=`${i}${this.prefix} ${a[0]}`),this.logger[l](a))}create(a){return new du(this.logger,{prefix:`${this.prefix}:${a}:`,...this.options})}clone(a){return a=a||this.options,a.prefix=a.prefix||this.prefix,new du(this.logger,a)}}var Zn=new du;class Eu{constructor(){this.observers={}}on(a,l){return a.split(" ").forEach(i=>{this.observers[i]||(this.observers[i]=new Map);const s=this.observers[i].get(l)||0;this.observers[i].set(l,s+1)}),this}off(a,l){if(this.observers[a]){if(!l){delete this.observers[a];return}this.observers[a].delete(l)}}emit(a,...l){this.observers[a]&&Array.from(this.observers[a].entries()).forEach(([s,u])=>{for(let f=0;f<u;f++)s(...l)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,u])=>{for(let f=0;f<u;f++)s.apply(s,[a,...l])})}}class pv extends Eu{constructor(a,l={ns:["translation"],defaultNS:"translation"}){super(),this.data=a||{},this.options=l,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(a){this.options.ns.indexOf(a)<0&&this.options.ns.push(a)}removeNamespaces(a){const l=this.options.ns.indexOf(a);l>-1&&this.options.ns.splice(l,1)}getResource(a,l,i,s={}){const u=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,f=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let d;a.indexOf(".")>-1?d=a.split("."):(d=[a,l],i&&(Array.isArray(i)?d.push(...i):Ue(i)&&u?d.push(...i.split(u)):d.push(i)));const p=fu(this.data,d);return!p&&!l&&!i&&a.indexOf(".")>-1&&(a=d[0],l=d[1],i=d.slice(2).join(".")),p||!f||!Ue(i)?p:Rd(this.data?.[a]?.[l],i,u)}addResource(a,l,i,s,u={silent:!1}){const f=u.keySeparator!==void 0?u.keySeparator:this.options.keySeparator;let d=[a,l];i&&(d=d.concat(f?i.split(f):i)),a.indexOf(".")>-1&&(d=a.split("."),s=l,l=d[1]),this.addNamespaces(l),mv(this.data,d,s),u.silent||this.emit("added",a,l,i,s)}addResources(a,l,i,s={silent:!1}){for(const u in i)(Ue(i[u])||Array.isArray(i[u]))&&this.addResource(a,l,u,i[u],{silent:!0});s.silent||this.emit("added",a,l,i)}addResourceBundle(a,l,i,s,u,f={silent:!1,skipCopy:!1}){let d=[a,l];a.indexOf(".")>-1&&(d=a.split("."),s=i,i=l,l=d[1]),this.addNamespaces(l);let p=fu(this.data,d)||{};f.skipCopy||(i=JSON.parse(JSON.stringify(i))),s?Qy(p,i,u):p={...p,...i},mv(this.data,d,p),f.silent||this.emit("added",a,l,i)}removeResourceBundle(a,l){this.hasResourceBundle(a,l)&&delete this.data[a][l],this.removeNamespaces(l),this.emit("removed",a,l)}hasResourceBundle(a,l){return this.getResource(a,l)!==void 0}getResourceBundle(a,l){return l||(l=this.options.defaultNS),this.getResource(a,l)}getDataByLanguage(a){return this.data[a]}hasLanguageSomeTranslations(a){const l=this.getDataByLanguage(a);return!!(l&&Object.keys(l)||[]).find(s=>l[s]&&Object.keys(l[s]).length>0)}toJSON(){return this.data}}var Zy={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,a,l,i,s){return n.forEach(u=>{a=this.processors[u]?.process(a,l,i,s)??a}),a}};const gv={},vv=n=>!Ue(n)&&typeof n!="boolean"&&typeof n!="number";class hu extends Eu{constructor(a,l={}){super(),Jw(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],a,this),this.options=l,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Zn.create("translator")}changeLanguage(a){a&&(this.language=a)}exists(a,l={interpolation:{}}){const i={...l};return a==null?!1:this.resolve(a,i)?.res!==void 0}extractFromKey(a,l){let i=l.nsSeparator!==void 0?l.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");const s=l.keySeparator!==void 0?l.keySeparator:this.options.keySeparator;let u=l.ns||this.options.defaultNS||[];const f=i&&a.indexOf(i)>-1,d=!this.options.userDefinedKeySeparator&&!l.keySeparator&&!this.options.userDefinedNsSeparator&&!l.nsSeparator&&!oS(a,i,s);if(f&&!d){const p=a.match(this.interpolator.nestingRegexp);if(p&&p.length>0)return{key:a,namespaces:Ue(u)?[u]:u};const m=a.split(i);(i!==s||i===s&&this.options.ns.indexOf(m[0])>-1)&&(u=m.shift()),a=m.join(s)}return{key:a,namespaces:Ue(u)?[u]:u}}translate(a,l,i){let s=typeof l=="object"?{...l}:l;if(typeof s!="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),typeof options=="object"&&(s={...s}),s||(s={}),a==null)return"";Array.isArray(a)||(a=[String(a)]);const u=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,f=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:d,namespaces:p}=this.extractFromKey(a[a.length-1],s),m=p[p.length-1];let v=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;v===void 0&&(v=":");const b=s.lng||this.language,w=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(b?.toLowerCase()==="cimode")return w?u?{res:`${m}${v}${d}`,usedKey:d,exactUsedKey:d,usedLng:b,usedNS:m,usedParams:this.getUsedParamsDetails(s)}:`${m}${v}${d}`:u?{res:d,usedKey:d,exactUsedKey:d,usedLng:b,usedNS:m,usedParams:this.getUsedParamsDetails(s)}:d;const S=this.resolve(a,s);let C=S?.res;const _=S?.usedKey||d,j=S?.exactUsedKey||d,N=["[object Number]","[object Function]","[object RegExp]"],z=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,k=!this.i18nFormat||this.i18nFormat.handleAsObject,H=s.count!==void 0&&!Ue(s.count),D=hu.hasDefaultValue(s),R=H?this.pluralResolver.getSuffix(b,s.count,s):"",B=s.ordinal&&H?this.pluralResolver.getSuffix(b,s.count,{ordinal:!1}):"",Z=H&&!s.ordinal&&s.count===0,ne=Z&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${R}`]||s[`defaultValue${B}`]||s.defaultValue;let oe=C;k&&!C&&D&&(oe=ne);const le=vv(oe),J=Object.prototype.toString.apply(oe);if(k&&oe&&le&&N.indexOf(J)<0&&!(Ue(z)&&Array.isArray(oe))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const te=this.options.returnedObjectHandler?this.options.returnedObjectHandler(_,oe,{...s,ns:p}):`key '${d} (${this.language})' returned an object instead of string.`;return u?(S.res=te,S.usedParams=this.getUsedParamsDetails(s),S):te}if(f){const te=Array.isArray(oe),W=te?[]:{},ue=te?j:_;for(const A in oe)if(Object.prototype.hasOwnProperty.call(oe,A)){const Q=`${ue}${f}${A}`;D&&!C?W[A]=this.translate(Q,{...s,defaultValue:vv(ne)?ne[A]:void 0,joinArrays:!1,ns:p}):W[A]=this.translate(Q,{...s,joinArrays:!1,ns:p}),W[A]===Q&&(W[A]=oe[A])}C=W}}else if(k&&Ue(z)&&Array.isArray(C))C=C.join(z),C&&(C=this.extendTranslation(C,a,s,i));else{let te=!1,W=!1;!this.isValidLookup(C)&&D&&(te=!0,C=ne),this.isValidLookup(C)||(W=!0,C=d);const A=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&W?void 0:C,Q=D&&ne!==C&&this.options.updateMissing;if(W||te||Q){if(this.logger.log(Q?"updateKey":"missingKey",b,m,d,Q?ne:C),f){const F=this.resolve(d,{...s,keySeparator:!1});F&&F.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 V=[];const ve=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ve&&ve[0])for(let F=0;F<ve.length;F++)V.push(ve[F]);else this.options.saveMissingTo==="all"?V=this.languageUtils.toResolveHierarchy(s.lng||this.language):V.push(s.lng||this.language);const O=(F,U,K)=>{const ae=D&&K!==C?K:A;this.options.missingKeyHandler?this.options.missingKeyHandler(F,m,U,ae,Q,s):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(F,m,U,ae,Q,s),this.emit("missingKey",F,m,U,C)};this.options.saveMissing&&(this.options.saveMissingPlurals&&H?V.forEach(F=>{const U=this.pluralResolver.getSuffixes(F,s);Z&&s[`defaultValue${this.options.pluralSeparator}zero`]&&U.indexOf(`${this.options.pluralSeparator}zero`)<0&&U.push(`${this.options.pluralSeparator}zero`),U.forEach(K=>{O([F],d+K,s[`defaultValue${K}`]||ne)})}):O(V,d,ne))}C=this.extendTranslation(C,a,s,S,i),W&&C===d&&this.options.appendNamespaceToMissingKey&&(C=`${m}${v}${d}`),(W||te)&&this.options.parseMissingKeyHandler&&(C=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${m}${v}${d}`:d,te?C:void 0,s))}return u?(S.res=C,S.usedParams=this.getUsedParamsDetails(s),S):C}extendTranslation(a,l,i,s,u){if(this.i18nFormat?.parse)a=this.i18nFormat.parse(a,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const p=Ue(a)&&(i?.interpolation?.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let m;if(p){const b=a.match(this.interpolator.nestingRegexp);m=b&&b.length}let v=i.replace&&!Ue(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables&&(v={...this.options.interpolation.defaultVariables,...v}),a=this.interpolator.interpolate(a,v,i.lng||this.language||s.usedLng,i),p){const b=a.match(this.interpolator.nestingRegexp),w=b&&b.length;m<w&&(i.nest=!1)}!i.lng&&s&&s.res&&(i.lng=this.language||s.usedLng),i.nest!==!1&&(a=this.interpolator.nest(a,(...b)=>u?.[0]===b[0]&&!i.context?(this.logger.warn(`It seems you are nesting recursively key: ${b[0]} in key: ${l[0]}`),null):this.translate(...b,l),i)),i.interpolation&&this.interpolator.reset()}const f=i.postProcess||this.options.postProcess,d=Ue(f)?[f]:f;return a!=null&&d?.length&&i.applyPostProcessor!==!1&&(a=Zy.handle(d,a,l,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),a}resolve(a,l={}){let i,s,u,f,d;return Ue(a)&&(a=[a]),a.forEach(p=>{if(this.isValidLookup(i))return;const m=this.extractFromKey(p,l),v=m.key;s=v;let b=m.namespaces;this.options.fallbackNS&&(b=b.concat(this.options.fallbackNS));const w=l.count!==void 0&&!Ue(l.count),S=w&&!l.ordinal&&l.count===0,C=l.context!==void 0&&(Ue(l.context)||typeof l.context=="number")&&l.context!=="",_=l.lngs?l.lngs:this.languageUtils.toResolveHierarchy(l.lng||this.language,l.fallbackLng);b.forEach(j=>{this.isValidLookup(i)||(d=j,!gv[`${_[0]}-${j}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(d)&&(gv[`${_[0]}-${j}`]=!0,this.logger.warn(`key "${s}" for languages "${_.join(", ")}" won't get resolved as namespace "${d}" 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!!!")),_.forEach(N=>{if(this.isValidLookup(i))return;f=N;const z=[v];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(z,v,N,j,l);else{let H;w&&(H=this.pluralResolver.getSuffix(N,l.count,l));const D=`${this.options.pluralSeparator}zero`,R=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(w&&(z.push(v+H),l.ordinal&&H.indexOf(R)===0&&z.push(v+H.replace(R,this.options.pluralSeparator)),S&&z.push(v+D)),C){const B=`${v}${this.options.contextSeparator}${l.context}`;z.push(B),w&&(z.push(B+H),l.ordinal&&H.indexOf(R)===0&&z.push(B+H.replace(R,this.options.pluralSeparator)),S&&z.push(B+D))}}let k;for(;k=z.pop();)this.isValidLookup(i)||(u=k,i=this.getResource(N,j,k,l))}))})}),{res:i,usedKey:s,exactUsedKey:u,usedLng:f,usedNS:d}}isValidLookup(a){return a!==void 0&&!(!this.options.returnNull&&a===null)&&!(!this.options.returnEmptyString&&a==="")}getResource(a,l,i,s={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(a,l,i,s):this.resourceStore.getResource(a,l,i,s)}getUsedParamsDetails(a={}){const l=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=a.replace&&!Ue(a.replace);let s=i?a.replace:a;if(i&&typeof a.count<"u"&&(s.count=a.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!i){s={...s};for(const u of l)delete s[u]}return s}static hasDefaultValue(a){const l="defaultValue";for(const i in a)if(Object.prototype.hasOwnProperty.call(a,i)&&l===i.substring(0,l.length)&&a[i]!==void 0)return!0;return!1}}class yv{constructor(a){this.options=a,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Zn.create("languageUtils")}getScriptPartFromCode(a){if(a=po(a),!a||a.indexOf("-")<0)return null;const l=a.split("-");return l.length===2||(l.pop(),l[l.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(l.join("-"))}getLanguagePartFromCode(a){if(a=po(a),!a||a.indexOf("-")<0)return a;const l=a.split("-");return this.formatLanguageCode(l[0])}formatLanguageCode(a){if(Ue(a)&&a.indexOf("-")>-1){let l;try{l=Intl.getCanonicalLocales(a)[0]}catch{}return l&&this.options.lowerCaseLng&&(l=l.toLowerCase()),l||(this.options.lowerCaseLng?a.toLowerCase():a)}return this.options.cleanCode||this.options.lowerCaseLng?a.toLowerCase():a}isSupportedCode(a){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(a=this.getLanguagePartFromCode(a)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(a)>-1}getBestMatchFromCodes(a){if(!a)return null;let l;return a.forEach(i=>{if(l)return;const s=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(s))&&(l=s)}),!l&&this.options.supportedLngs&&a.forEach(i=>{if(l)return;const s=this.getScriptPartFromCode(i);if(this.isSupportedCode(s))return l=s;const u=this.getLanguagePartFromCode(i);if(this.isSupportedCode(u))return l=u;l=this.options.supportedLngs.find(f=>{if(f===u)return f;if(!(f.indexOf("-")<0&&u.indexOf("-")<0)&&(f.indexOf("-")>0&&u.indexOf("-")<0&&f.substring(0,f.indexOf("-"))===u||f.indexOf(u)===0&&u.length>1))return f})}),l||(l=this.getFallbackCodes(this.options.fallbackLng)[0]),l}getFallbackCodes(a,l){if(!a)return[];if(typeof a=="function"&&(a=a(l)),Ue(a)&&(a=[a]),Array.isArray(a))return a;if(!l)return a.default||[];let i=a[l];return i||(i=a[this.getScriptPartFromCode(l)]),i||(i=a[this.formatLanguageCode(l)]),i||(i=a[this.getLanguagePartFromCode(l)]),i||(i=a.default),i||[]}toResolveHierarchy(a,l){const i=this.getFallbackCodes((l===!1?[]:l)||this.options.fallbackLng||[],a),s=[],u=f=>{f&&(this.isSupportedCode(f)?s.push(f):this.logger.warn(`rejecting language code not found in supportedLngs: ${f}`))};return Ue(a)&&(a.indexOf("-")>-1||a.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&u(this.formatLanguageCode(a)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&u(this.getScriptPartFromCode(a)),this.options.load!=="currentOnly"&&u(this.getLanguagePartFromCode(a))):Ue(a)&&u(this.formatLanguageCode(a)),i.forEach(f=>{s.indexOf(f)<0&&u(this.formatLanguageCode(f))}),s}}const bv={zero:0,one:1,two:2,few:3,many:4,other:5},xv={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class uS{constructor(a,l={}){this.languageUtils=a,this.options=l,this.logger=Zn.create("pluralResolver"),this.pluralRulesCache={}}addRule(a,l){this.rules[a]=l}clearCache(){this.pluralRulesCache={}}getRule(a,l={}){const i=po(a==="dev"?"en":a),s=l.ordinal?"ordinal":"cardinal",u=JSON.stringify({cleanedCode:i,type:s});if(u in this.pluralRulesCache)return this.pluralRulesCache[u];let f;try{f=new Intl.PluralRules(i,{type:s})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),xv;if(!a.match(/-|_/))return xv;const p=this.languageUtils.getLanguagePartFromCode(a);f=this.getRule(p,l)}return this.pluralRulesCache[u]=f,f}needsPlural(a,l={}){let i=this.getRule(a,l);return i||(i=this.getRule("dev",l)),i?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(a,l,i={}){return this.getSuffixes(a,i).map(s=>`${l}${s}`)}getSuffixes(a,l={}){let i=this.getRule(a,l);return i||(i=this.getRule("dev",l)),i?i.resolvedOptions().pluralCategories.sort((s,u)=>bv[s]-bv[u]).map(s=>`${this.options.prepend}${l.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(a,l,i={}){const s=this.getRule(a,i);return s?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${s.select(l)}`:(this.logger.warn(`no plural rule found for: ${a}`),this.getSuffix("dev",l,i))}}const wv=(n,a,l,i=".",s=!0)=>{let u=tS(n,a,l);return!u&&s&&Ue(l)&&(u=Rd(n,l,i),u===void 0&&(u=Rd(a,l,i))),u},Jf=n=>n.replace(/\$/g,"$$$$");class cS{constructor(a={}){this.logger=Zn.create("interpolator"),this.options=a,this.format=a?.interpolation?.format||(l=>l),this.init(a)}init(a={}){a.interpolation||(a.interpolation={escapeValue:!0});const{escape:l,escapeValue:i,useRawValueToEscape:s,prefix:u,prefixEscaped:f,suffix:d,suffixEscaped:p,formatSeparator:m,unescapeSuffix:v,unescapePrefix:b,nestingPrefix:w,nestingPrefixEscaped:S,nestingSuffix:C,nestingSuffixEscaped:_,nestingOptionsSeparator:j,maxReplaces:N,alwaysFormat:z}=a.interpolation;this.escape=l!==void 0?l:aS,this.escapeValue=i!==void 0?i:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=u?kl(u):f||"{{",this.suffix=d?kl(d):p||"}}",this.formatSeparator=m||",",this.unescapePrefix=v?"":b||"-",this.unescapeSuffix=this.unescapePrefix?"":v||"",this.nestingPrefix=w?kl(w):S||kl("$t("),this.nestingSuffix=C?kl(C):_||kl(")"),this.nestingOptionsSeparator=j||",",this.maxReplaces=N||1e3,this.alwaysFormat=z!==void 0?z:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const a=(l,i)=>l?.source===i?(l.lastIndex=0,l):new RegExp(i,"g");this.regexp=a(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=a(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=a(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(a,l,i,s){let u,f,d;const p=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},m=S=>{if(S.indexOf(this.formatSeparator)<0){const N=wv(l,p,S,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(N,void 0,i,{...s,...l,interpolationkey:S}):N}const C=S.split(this.formatSeparator),_=C.shift().trim(),j=C.join(this.formatSeparator).trim();return this.format(wv(l,p,_,this.options.keySeparator,this.options.ignoreJSONStructure),j,i,{...s,...l,interpolationkey:_})};this.resetRegExp();const v=s?.missingInterpolationHandler||this.options.missingInterpolationHandler,b=s?.interpolation?.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:S=>Jf(S)},{regex:this.regexp,safeValue:S=>this.escapeValue?Jf(this.escape(S)):Jf(S)}].forEach(S=>{for(d=0;u=S.regex.exec(a);){const C=u[1].trim();if(f=m(C),f===void 0)if(typeof v=="function"){const j=v(a,u,s);f=Ue(j)?j:""}else if(s&&Object.prototype.hasOwnProperty.call(s,C))f="";else if(b){f=u[0];continue}else this.logger.warn(`missed to pass in variable ${C} for interpolating ${a}`),f="";else!Ue(f)&&!this.useRawValueToEscape&&(f=fv(f));const _=S.safeValue(f);if(a=a.replace(u[0],_),b?(S.regex.lastIndex+=f.length,S.regex.lastIndex-=u[0].length):S.regex.lastIndex=0,d++,d>=this.maxReplaces)break}}),a}nest(a,l,i={}){let s,u,f;const d=(p,m)=>{const v=this.nestingOptionsSeparator;if(p.indexOf(v)<0)return p;const b=p.split(new RegExp(`${v}[ ]*{`));let w=`{${b[1]}`;p=b[0],w=this.interpolate(w,f);const S=w.match(/'/g),C=w.match(/"/g);((S?.length??0)%2===0&&!C||C.length%2!==0)&&(w=w.replace(/'/g,'"'));try{f=JSON.parse(w),m&&(f={...m,...f})}catch(_){return this.logger.warn(`failed parsing options string in nesting for key ${p}`,_),`${p}${v}${w}`}return f.defaultValue&&f.defaultValue.indexOf(this.prefix)>-1&&delete f.defaultValue,p};for(;s=this.nestingRegexp.exec(a);){let p=[];f={...i},f=f.replace&&!Ue(f.replace)?f.replace:f,f.applyPostProcessor=!1,delete f.defaultValue;const m=/{.*}/.test(s[1])?s[1].lastIndexOf("}")+1:s[1].indexOf(this.formatSeparator);if(m!==-1&&(p=s[1].slice(m).split(this.formatSeparator).map(v=>v.trim()).filter(Boolean),s[1]=s[1].slice(0,m)),u=l(d.call(this,s[1].trim(),f),f),u&&s[0]===a&&!Ue(u))return u;Ue(u)||(u=fv(u)),u||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${a}`),u=""),p.length&&(u=p.reduce((v,b)=>this.format(v,b,i.lng,{...i,interpolationkey:s[1].trim()}),u.trim())),a=a.replace(s[0],u),this.regexp.lastIndex=0}return a}}const fS=n=>{let a=n.toLowerCase().trim();const l={};if(n.indexOf("(")>-1){const i=n.split("(");a=i[0].toLowerCase().trim();const s=i[1].substring(0,i[1].length-1);a==="currency"&&s.indexOf(":")<0?l.currency||(l.currency=s.trim()):a==="relativetime"&&s.indexOf(":")<0?l.range||(l.range=s.trim()):s.split(";").forEach(f=>{if(f){const[d,...p]=f.split(":"),m=p.join(":").trim().replace(/^'+|'+$/g,""),v=d.trim();l[v]||(l[v]=m),m==="false"&&(l[v]=!1),m==="true"&&(l[v]=!0),isNaN(m)||(l[v]=parseInt(m,10))}})}return{formatName:a,formatOptions:l}},Sv=n=>{const a={};return(l,i,s)=>{let u=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(u={...u,[s.interpolationkey]:void 0});const f=i+JSON.stringify(u);let d=a[f];return d||(d=n(po(i),s),a[f]=d),d(l)}},dS=n=>(a,l,i)=>n(po(l),i)(a);class hS{constructor(a={}){this.logger=Zn.create("formatter"),this.options=a,this.init(a)}init(a,l={interpolation:{}}){this.formatSeparator=l.interpolation.formatSeparator||",";const i=l.cacheInBuiltFormats?Sv:dS;this.formats={number:i((s,u)=>{const f=new Intl.NumberFormat(s,{...u});return d=>f.format(d)}),currency:i((s,u)=>{const f=new Intl.NumberFormat(s,{...u,style:"currency"});return d=>f.format(d)}),datetime:i((s,u)=>{const f=new Intl.DateTimeFormat(s,{...u});return d=>f.format(d)}),relativetime:i((s,u)=>{const f=new Intl.RelativeTimeFormat(s,{...u});return d=>f.format(d,u.range||"day")}),list:i((s,u)=>{const f=new Intl.ListFormat(s,{...u});return d=>f.format(d)})}}add(a,l){this.formats[a.toLowerCase().trim()]=l}addCached(a,l){this.formats[a.toLowerCase().trim()]=Sv(l)}format(a,l,i,s={}){const u=l.split(this.formatSeparator);if(u.length>1&&u[0].indexOf("(")>1&&u[0].indexOf(")")<0&&u.find(d=>d.indexOf(")")>-1)){const d=u.findIndex(p=>p.indexOf(")")>-1);u[0]=[u[0],...u.splice(1,d)].join(this.formatSeparator)}return u.reduce((d,p)=>{const{formatName:m,formatOptions:v}=fS(p);if(this.formats[m]){let b=d;try{const w=s?.formatParams?.[s.interpolationkey]||{},S=w.locale||w.lng||s.locale||s.lng||i;b=this.formats[m](d,S,{...v,...s,...w})}catch(w){this.logger.warn(w)}return b}else this.logger.warn(`there was no format function for ${m}`);return d},a)}}const mS=(n,a)=>{n.pending[a]!==void 0&&(delete n.pending[a],n.pendingCount--)};class pS extends Eu{constructor(a,l,i,s={}){super(),this.backend=a,this.store=l,this.services=i,this.languageUtils=i.languageUtils,this.options=s,this.logger=Zn.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(i,s.backend,s)}queueLoad(a,l,i,s){const u={},f={},d={},p={};return a.forEach(m=>{let v=!0;l.forEach(b=>{const w=`${m}|${b}`;!i.reload&&this.store.hasResourceBundle(m,b)?this.state[w]=2:this.state[w]<0||(this.state[w]===1?f[w]===void 0&&(f[w]=!0):(this.state[w]=1,v=!1,f[w]===void 0&&(f[w]=!0),u[w]===void 0&&(u[w]=!0),p[b]===void 0&&(p[b]=!0)))}),v||(d[m]=!0)}),(Object.keys(u).length||Object.keys(f).length)&&this.queue.push({pending:f,pendingCount:Object.keys(f).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(u),pending:Object.keys(f),toLoadLanguages:Object.keys(d),toLoadNamespaces:Object.keys(p)}}loaded(a,l,i){const s=a.split("|"),u=s[0],f=s[1];l&&this.emit("failedLoading",u,f,l),!l&&i&&this.store.addResourceBundle(u,f,i,void 0,void 0,{skipCopy:!0}),this.state[a]=l?-1:2,l&&i&&(this.state[a]=0);const d={};this.queue.forEach(p=>{eS(p.loaded,[u],f),mS(p,a),l&&p.errors.push(l),p.pendingCount===0&&!p.done&&(Object.keys(p.loaded).forEach(m=>{d[m]||(d[m]={});const v=p.loaded[m];v.length&&v.forEach(b=>{d[m][b]===void 0&&(d[m][b]=!0)})}),p.done=!0,p.errors.length?p.callback(p.errors):p.callback())}),this.emit("loaded",d),this.queue=this.queue.filter(p=>!p.done)}read(a,l,i,s=0,u=this.retryTimeout,f){if(!a.length)return f(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:a,ns:l,fcName:i,tried:s,wait:u,callback:f});return}this.readingCalls++;const d=(m,v)=>{if(this.readingCalls--,this.waitingReads.length>0){const b=this.waitingReads.shift();this.read(b.lng,b.ns,b.fcName,b.tried,b.wait,b.callback)}if(m&&v&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,a,l,i,s+1,u*2,f)},u);return}f(m,v)},p=this.backend[i].bind(this.backend);if(p.length===2){try{const m=p(a,l);m&&typeof m.then=="function"?m.then(v=>d(null,v)).catch(d):d(null,m)}catch(m){d(m)}return}return p(a,l,d)}prepareLoading(a,l,i={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();Ue(a)&&(a=this.languageUtils.toResolveHierarchy(a)),Ue(l)&&(l=[l]);const u=this.queueLoad(a,l,i,s);if(!u.toLoad.length)return u.pending.length||s(),null;u.toLoad.forEach(f=>{this.loadOne(f)})}load(a,l,i){this.prepareLoading(a,l,{},i)}reload(a,l,i){this.prepareLoading(a,l,{reload:!0},i)}loadOne(a,l=""){const i=a.split("|"),s=i[0],u=i[1];this.read(s,u,"read",void 0,void 0,(f,d)=>{f&&this.logger.warn(`${l}loading namespace ${u} for language ${s} failed`,f),!f&&d&&this.logger.log(`${l}loaded namespace ${u} for language ${s}`,d),this.loaded(a,f,d)})}saveMissing(a,l,i,s,u,f={},d=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(l)){this.logger.warn(`did not save key "${i}" as the namespace "${l}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(i==null||i==="")){if(this.backend?.create){const p={...f,isUpdate:u},m=this.backend.create.bind(this.backend);if(m.length<6)try{let v;m.length===5?v=m(a,l,i,s,p):v=m(a,l,i,s),v&&typeof v.then=="function"?v.then(b=>d(null,b)).catch(d):d(null,v)}catch(v){d(v)}else m(a,l,i,s,d,p)}!a||!a[0]||this.store.addResource(a[0],l,i,s)}}}const Ev=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:n=>{let a={};if(typeof n[1]=="object"&&(a=n[1]),Ue(n[1])&&(a.defaultValue=n[1]),Ue(n[2])&&(a.tDescription=n[2]),typeof n[2]=="object"||typeof n[3]=="object"){const l=n[3]||n[2];Object.keys(l).forEach(i=>{a[i]=l[i]})}return a},interpolation:{escapeValue:!0,format:n=>n,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),_v=n=>(Ue(n.ns)&&(n.ns=[n.ns]),Ue(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),Ue(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),qs=()=>{},gS=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(l=>{typeof n[l]=="function"&&(n[l]=n[l].bind(n))})};class go extends Eu{constructor(a={},l){if(super(),this.options=_v(a),this.services={},this.logger=Zn,this.modules={external:[]},gS(this),l&&!this.isInitialized&&!a.isClone){if(!this.options.initAsync)return this.init(a,l),this;setTimeout(()=>{this.init(a,l)},0)}}init(a={},l){this.isInitializing=!0,typeof a=="function"&&(l=a,a={}),a.defaultNS==null&&a.ns&&(Ue(a.ns)?a.defaultNS=a.ns:a.ns.indexOf("translation")<0&&(a.defaultNS=a.ns[0]));const i=Ev();this.options={...i,...this.options,..._v(a)},this.options.interpolation={...i.interpolation,...this.options.interpolation},a.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=a.keySeparator),a.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=a.nsSeparator);const s=m=>m?typeof m=="function"?new m:m:null;if(!this.options.isClone){this.modules.logger?Zn.init(s(this.modules.logger),this.options):Zn.init(null,this.options);let m;this.modules.formatter?m=this.modules.formatter:m=hS;const v=new yv(this.options);this.store=new pv(this.options.resources,this.options);const b=this.services;b.logger=Zn,b.resourceStore=this.store,b.languageUtils=v,b.pluralResolver=new uS(v,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==i.interpolation.format&&this.logger.warn("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===i.interpolation.format)&&(b.formatter=s(m),b.formatter.init&&b.formatter.init(b,this.options),this.options.interpolation.format=b.formatter.format.bind(b.formatter)),b.interpolator=new cS(this.options),b.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},b.backendConnector=new pS(s(this.modules.backend),b.resourceStore,b,this.options),b.backendConnector.on("*",(S,...C)=>{this.emit(S,...C)}),this.modules.languageDetector&&(b.languageDetector=s(this.modules.languageDetector),b.languageDetector.init&&b.languageDetector.init(b,this.options.detection,this.options)),this.modules.i18nFormat&&(b.i18nFormat=s(this.modules.i18nFormat),b.i18nFormat.init&&b.i18nFormat.init(this)),this.translator=new hu(this.services,this.options),this.translator.on("*",(S,...C)=>{this.emit(S,...C)}),this.modules.external.forEach(S=>{S.init&&S.init(this)})}if(this.format=this.options.interpolation.format,l||(l=qs),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]=(...v)=>this.store[m](...v)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(m=>{this[m]=(...v)=>(this.store[m](...v),this)});const d=no(),p=()=>{const m=(v,b)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),d.resolve(b),l(v,b)};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?p():setTimeout(p,0),d}loadResources(a,l=qs){let i=l;const s=Ue(a)?a:this.language;if(typeof a=="function"&&(i=a),!this.options.resources||this.options.partialBundledLanguages){if(s?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return i();const u=[],f=d=>{if(!d||d==="cimode")return;this.services.languageUtils.toResolveHierarchy(d).forEach(m=>{m!=="cimode"&&u.indexOf(m)<0&&u.push(m)})};s?f(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(p=>f(p)),this.options.preload?.forEach?.(d=>f(d)),this.services.backendConnector.load(u,this.options.ns,d=>{!d&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(d)})}else i(null)}reloadResources(a,l,i){const s=no();return typeof a=="function"&&(i=a,a=void 0),typeof l=="function"&&(i=l,l=void 0),a||(a=this.languages),l||(l=this.options.ns),i||(i=qs),this.services.backendConnector.reload(a,l,u=>{s.resolve(),i(u)}),s}use(a){if(!a)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!a.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return a.type==="backend"&&(this.modules.backend=a),(a.type==="logger"||a.log&&a.warn&&a.error)&&(this.modules.logger=a),a.type==="languageDetector"&&(this.modules.languageDetector=a),a.type==="i18nFormat"&&(this.modules.i18nFormat=a),a.type==="postProcessor"&&Zy.addPostProcessor(a),a.type==="formatter"&&(this.modules.formatter=a),a.type==="3rdParty"&&this.modules.external.push(a),this}setResolvedLanguage(a){if(!(!a||!this.languages)&&!(["cimode","dev"].indexOf(a)>-1)){for(let l=0;l<this.languages.length;l++){const i=this.languages[l];if(!(["cimode","dev"].indexOf(i)>-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}!this.resolvedLanguage&&this.languages.indexOf(a)<0&&this.store.hasLanguageSomeTranslations(a)&&(this.resolvedLanguage=a,this.languages.unshift(a))}}changeLanguage(a,l){this.isLanguageChangingTo=a;const i=no();this.emit("languageChanging",a);const s=d=>{this.language=d,this.languages=this.services.languageUtils.toResolveHierarchy(d),this.resolvedLanguage=void 0,this.setResolvedLanguage(d)},u=(d,p)=>{p?this.isLanguageChangingTo===a&&(s(p),this.translator.changeLanguage(p),this.isLanguageChangingTo=void 0,this.emit("languageChanged",p),this.logger.log("languageChanged",p)):this.isLanguageChangingTo=void 0,i.resolve((...m)=>this.t(...m)),l&&l(d,(...m)=>this.t(...m))},f=d=>{!a&&!d&&this.services.languageDetector&&(d=[]);const p=Ue(d)?d:d&&d[0],m=this.store.hasLanguageSomeTranslations(p)?p:this.services.languageUtils.getBestMatchFromCodes(Ue(d)?[d]:d);m&&(this.language||s(m),this.translator.language||this.translator.changeLanguage(m),this.services.languageDetector?.cacheUserLanguage?.(m)),this.loadResources(m,v=>{u(v,m)})};return!a&&this.services.languageDetector&&!this.services.languageDetector.async?f(this.services.languageDetector.detect()):!a&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(f):this.services.languageDetector.detect(f):f(a),i}getFixedT(a,l,i){const s=(u,f,...d)=>{let p;typeof f!="object"?p=this.options.overloadTranslationOptionHandler([u,f].concat(d)):p={...f},p.lng=p.lng||s.lng,p.lngs=p.lngs||s.lngs,p.ns=p.ns||s.ns,p.keyPrefix!==""&&(p.keyPrefix=p.keyPrefix||i||s.keyPrefix);const m=this.options.keySeparator||".";let v;return p.keyPrefix&&Array.isArray(u)?v=u.map(b=>`${p.keyPrefix}${m}${b}`):v=p.keyPrefix?`${p.keyPrefix}${m}${u}`:u,this.t(v,p)};return Ue(a)?s.lng=a:s.lngs=a,s.ns=l,s.keyPrefix=i,s}t(...a){return this.translator?.translate(...a)}exists(...a){return this.translator?.exists(...a)}setDefaultNamespace(a){this.options.defaultNS=a}hasLoadedNamespace(a,l={}){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 i=l.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,u=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const f=(d,p)=>{const m=this.services.backendConnector.state[`${d}|${p}`];return m===-1||m===0||m===2};if(l.precheck){const d=l.precheck(this,f);if(d!==void 0)return d}return!!(this.hasResourceBundle(i,a)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||f(i,a)&&(!s||f(u,a)))}loadNamespaces(a,l){const i=no();return this.options.ns?(Ue(a)&&(a=[a]),a.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{i.resolve(),l&&l(s)}),i):(l&&l(),Promise.resolve())}loadLanguages(a,l){const i=no();Ue(a)&&(a=[a]);const s=this.options.preload||[],u=a.filter(f=>s.indexOf(f)<0&&this.services.languageUtils.isSupportedCode(f));return u.length?(this.options.preload=s.concat(u),this.loadResources(f=>{i.resolve(),l&&l(f)}),i):(l&&l(),Promise.resolve())}dir(a){if(a||(a=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!a)return"rtl";try{const s=new Intl.Locale(a);if(s&&s.getTextInfo){const u=s.getTextInfo();if(u&&u.direction)return u.direction}}catch{}const l=["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"],i=this.services?.languageUtils||new yv(Ev());return a.toLowerCase().indexOf("-latn")>1?"ltr":l.indexOf(i.getLanguagePartFromCode(a))>-1||a.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(a={},l){return new go(a,l)}cloneInstance(a={},l=qs){const i=a.forkResourceStore;i&&delete a.forkResourceStore;const s={...this.options,...a,isClone:!0},u=new go(s);if((a.debug!==void 0||a.prefix!==void 0)&&(u.logger=u.logger.clone(a)),["store","services","language"].forEach(d=>{u[d]=this[d]}),u.services={...this.services},u.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},i){const d=Object.keys(this.store.data).reduce((p,m)=>(p[m]={...this.store.data[m]},p[m]=Object.keys(p[m]).reduce((v,b)=>(v[b]={...p[m][b]},v),p[m]),p),{});u.store=new pv(d,s),u.services.resourceStore=u.store}return u.translator=new hu(u.services,s),u.translator.on("*",(d,...p)=>{u.emit(d,...p)}),u.init(s,l),u.translator.options=s,u.translator.backendConnector.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},u}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Kt=go.createInstance();Kt.createInstance=go.createInstance;Kt.createInstance;Kt.dir;Kt.init;Kt.loadResources;Kt.reloadResources;Kt.use;Kt.changeLanguage;Kt.getFixedT;Kt.t;Kt.exists;Kt.setDefaultNamespace;Kt.hasLoadedNamespace;Kt.loadNamespaces;Kt.loadLanguages;var Wf={exports:{}},Be={};/**
|
|
16
16
|
* @license React
|
|
17
17
|
* react.production.js
|
|
18
18
|
*
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
*
|
|
21
21
|
* This source code is licensed under the MIT license found in the
|
|
22
22
|
* LICENSE file in the root directory of this source tree.
|
|
23
|
-
*/var Nv;function yS(){if(Nv)return $e;Nv=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),f=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),b=Symbol.iterator;function S(O){return O===null||typeof O!="object"?null:(O=b&&O[b]||O["@@iterator"],typeof O=="function"?O:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,C={};function j(O,K,P){this.props=O,this.context=K,this.refs=C,this.updater=P||w}j.prototype.isReactComponent={},j.prototype.setState=function(O,K){if(typeof O!="object"&&typeof O!="function"&&O!=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,O,K,"setState")},j.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function N(){}N.prototype=j.prototype;function U(O,K,P){this.props=O,this.context=K,this.refs=C,this.updater=P||w}var z=U.prototype=new N;z.constructor=U,_(z,j.prototype),z.isPureReactComponent=!0;var D=Array.isArray,T={H:null,A:null,T:null,S:null,V:null},R=Object.prototype.hasOwnProperty;function H(O,K,P,G,ee,se){return P=se.ref,{$$typeof:n,type:O,key:K,ref:P!==void 0?P:null,props:se}}function Z(O,K){return H(O.type,K,void 0,void 0,void 0,O.props)}function J(O){return typeof O=="object"&&O!==null&&O.$$typeof===n}function ne(O){var K={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(P){return K[P]})}var Se=/\/+/g;function de(O,K){return typeof O=="object"&&O!==null&&O.key!=null?ne(""+O.key):K.toString(36)}function oe(){}function fe(O){switch(O.status){case"fulfilled":return O.value;case"rejected":throw O.reason;default:switch(typeof O.status=="string"?O.then(oe,oe):(O.status="pending",O.then(function(K){O.status==="pending"&&(O.status="fulfilled",O.value=K)},function(K){O.status==="pending"&&(O.status="rejected",O.reason=K)})),O.status){case"fulfilled":return O.value;case"rejected":throw O.reason}}throw O}function he(O,K,P,G,ee){var se=typeof O;(se==="undefined"||se==="boolean")&&(O=null);var pe=!1;if(O===null)pe=!0;else switch(se){case"bigint":case"string":case"number":pe=!0;break;case"object":switch(O.$$typeof){case n:case a:pe=!0;break;case v:return pe=O._init,he(pe(O._payload),K,P,G,ee)}}if(pe)return ee=ee(O),pe=G===""?"."+de(O,0):G,D(ee)?(P="",pe!=null&&(P=pe.replace(Se,"$&/")+"/"),he(ee,K,P,"",function(Ze){return Ze})):ee!=null&&(J(ee)&&(ee=Z(ee,P+(ee.key==null||O&&O.key===ee.key?"":(""+ee.key).replace(Se,"$&/")+"/")+pe)),K.push(ee)),1;pe=0;var ve=G===""?".":G+":";if(D(O))for(var ze=0;ze<O.length;ze++)G=O[ze],se=ve+de(G,ze),pe+=he(G,K,P,se,ee);else if(ze=S(O),typeof ze=="function")for(O=ze.call(O),ze=0;!(G=O.next()).done;)G=G.value,se=ve+de(G,ze++),pe+=he(G,K,P,se,ee);else if(se==="object"){if(typeof O.then=="function")return he(fe(O),K,P,G,ee);throw K=String(O),Error("Objects are not valid as a React child (found: "+(K==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":K)+"). If you meant to render a collection of children, use an array instead.")}return pe}function L(O,K,P){if(O==null)return O;var G=[],ee=0;return he(O,G,"","",function(se){return K.call(P,se,ee++)}),G}function I(O){if(O._status===-1){var K=O._result;K=K(),K.then(function(P){(O._status===0||O._status===-1)&&(O._status=1,O._result=P)},function(P){(O._status===0||O._status===-1)&&(O._status=2,O._result=P)}),O._status===-1&&(O._status=0,O._result=K)}if(O._status===1)return O._result.default;throw O._result}var V=typeof reportError=="function"?reportError:function(O){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var K=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof O=="object"&&O!==null&&typeof O.message=="string"?String(O.message):String(O),error:O});if(!window.dispatchEvent(K))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",O);return}console.error(O)};function ge(){}return $e.Children={map:L,forEach:function(O,K,P){L(O,function(){K.apply(this,arguments)},P)},count:function(O){var K=0;return L(O,function(){K++}),K},toArray:function(O){return L(O,function(K){return K})||[]},only:function(O){if(!J(O))throw Error("React.Children.only expected to receive a single React element child.");return O}},$e.Component=j,$e.Fragment=l,$e.Profiler=s,$e.PureComponent=U,$e.StrictMode=i,$e.Suspense=p,$e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,$e.__COMPILER_RUNTIME={__proto__:null,c:function(O){return T.H.useMemoCache(O)}},$e.cache=function(O){return function(){return O.apply(null,arguments)}},$e.cloneElement=function(O,K,P){if(O==null)throw Error("The argument must be a React element, but you passed "+O+".");var G=_({},O.props),ee=O.key,se=void 0;if(K!=null)for(pe in K.ref!==void 0&&(se=void 0),K.key!==void 0&&(ee=""+K.key),K)!R.call(K,pe)||pe==="key"||pe==="__self"||pe==="__source"||pe==="ref"&&K.ref===void 0||(G[pe]=K[pe]);var pe=arguments.length-2;if(pe===1)G.children=P;else if(1<pe){for(var ve=Array(pe),ze=0;ze<pe;ze++)ve[ze]=arguments[ze+2];G.children=ve}return H(O.type,ee,void 0,void 0,se,G)},$e.createContext=function(O){return O={$$typeof:f,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null},O.Provider=O,O.Consumer={$$typeof:u,_context:O},O},$e.createElement=function(O,K,P){var G,ee={},se=null;if(K!=null)for(G in K.key!==void 0&&(se=""+K.key),K)R.call(K,G)&&G!=="key"&&G!=="__self"&&G!=="__source"&&(ee[G]=K[G]);var pe=arguments.length-2;if(pe===1)ee.children=P;else if(1<pe){for(var ve=Array(pe),ze=0;ze<pe;ze++)ve[ze]=arguments[ze+2];ee.children=ve}if(O&&O.defaultProps)for(G in pe=O.defaultProps,pe)ee[G]===void 0&&(ee[G]=pe[G]);return H(O,se,void 0,void 0,null,ee)},$e.createRef=function(){return{current:null}},$e.forwardRef=function(O){return{$$typeof:d,render:O}},$e.isValidElement=J,$e.lazy=function(O){return{$$typeof:v,_payload:{_status:-1,_result:O},_init:I}},$e.memo=function(O,K){return{$$typeof:m,type:O,compare:K===void 0?null:K}},$e.startTransition=function(O){var K=T.T,P={};T.T=P;try{var G=O(),ee=T.S;ee!==null&&ee(P,G),typeof G=="object"&&G!==null&&typeof G.then=="function"&&G.then(ge,V)}catch(se){V(se)}finally{T.T=K}},$e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},$e.use=function(O){return T.H.use(O)},$e.useActionState=function(O,K,P){return T.H.useActionState(O,K,P)},$e.useCallback=function(O,K){return T.H.useCallback(O,K)},$e.useContext=function(O){return T.H.useContext(O)},$e.useDebugValue=function(){},$e.useDeferredValue=function(O,K){return T.H.useDeferredValue(O,K)},$e.useEffect=function(O,K,P){var G=T.H;if(typeof P=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return G.useEffect(O,K)},$e.useId=function(){return T.H.useId()},$e.useImperativeHandle=function(O,K,P){return T.H.useImperativeHandle(O,K,P)},$e.useInsertionEffect=function(O,K){return T.H.useInsertionEffect(O,K)},$e.useLayoutEffect=function(O,K){return T.H.useLayoutEffect(O,K)},$e.useMemo=function(O,K){return T.H.useMemo(O,K)},$e.useOptimistic=function(O,K){return T.H.useOptimistic(O,K)},$e.useReducer=function(O,K,P){return T.H.useReducer(O,K,P)},$e.useRef=function(O){return T.H.useRef(O)},$e.useState=function(O){return T.H.useState(O)},$e.useSyncExternalStore=function(O,K,P){return T.H.useSyncExternalStore(O,K,P)},$e.useTransition=function(){return T.H.useTransition()},$e.version="19.1.0",$e}var Rv;function eh(){return Rv||(Rv=1,td.exports=yS()),td.exports}var y=eh();const yt=Zy(y),Wy=Zw({__proto__:null,default:yt},[y]),bS=(n,a,l,i)=>{const s=[l,{code:a,...i||{}}];if(n?.services?.logger?.forward)return n.services.logger.forward(s,"warn","react-i18next::",!0);$r(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),n?.services?.logger?.warn?n.services.logger.warn(...s):console?.warn&&console.warn(...s)},jv={},Od=(n,a,l,i)=>{$r(l)&&jv[l]||($r(l)&&(jv[l]=new Date),bS(n,a,l,i))},e0=(n,a)=>()=>{if(n.isInitialized)a();else{const l=()=>{setTimeout(()=>{n.off("initialized",l)},0),a()};n.on("initialized",l)}},Ad=(n,a,l)=>{n.loadNamespaces(a,e0(n,l))},Ov=(n,a,l,i)=>{if($r(l)&&(l=[l]),n.options.preload&&n.options.preload.indexOf(a)>-1)return Ad(n,l,i);l.forEach(s=>{n.options.ns.indexOf(s)<0&&n.options.ns.push(s)}),n.loadLanguages(a,e0(n,i))},xS=(n,a,l={})=>!a.languages||!a.languages.length?(Od(a,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:a.languages}),!0):a.hasLoadedNamespace(n,{lng:l.lng,precheck:(i,s)=>{if(l.bindI18n&&l.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!s(i.isLanguageChangingTo,n))return!1}}),$r=n=>typeof n=="string",wS=n=>typeof n=="object"&&n!==null,SS=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,ES={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},CS=n=>ES[n],_S=n=>n.replace(SS,CS);let Td={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:_S};const NS=(n={})=>{Td={...Td,...n}},RS=()=>Td;let t0;const jS=n=>{t0=n},OS=()=>t0,AS={type:"3rdParty",init(n){NS(n.options.react),jS(n)}},TS=y.createContext();class MS{constructor(){this.usedNamespaces={}}addUsedNamespaces(a){a.forEach(l=>{this.usedNamespaces[l]||(this.usedNamespaces[l]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const DS=(n,a)=>{const l=y.useRef();return y.useEffect(()=>{l.current=n},[n,a]),l.current},n0=(n,a,l,i)=>n.getFixedT(a,l,i),LS=(n,a,l,i)=>y.useCallback(n0(n,a,l,i),[n,a,l,i]),fr=(n,a={})=>{const{i18n:l}=a,{i18n:i,defaultNS:s}=y.useContext(TS)||{},u=l||i||OS();if(u&&!u.reportNamespaces&&(u.reportNamespaces=new MS),!u){Od(u,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const D=(R,H)=>$r(H)?H:wS(H)&&$r(H.defaultValue)?H.defaultValue:Array.isArray(R)?R[R.length-1]:R,T=[D,{},!1];return T.t=D,T.i18n={},T.ready=!1,T}u.options.react?.wait&&Od(u,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const f={...RS(),...u.options.react,...a},{useSuspense:d,keyPrefix:p}=f;let m=s||u.options?.defaultNS;m=$r(m)?[m]:m||["translation"],u.reportNamespaces.addUsedNamespaces?.(m);const v=(u.isInitialized||u.initializedStoreOnce)&&m.every(D=>xS(D,u,f)),b=LS(u,a.lng||null,f.nsMode==="fallback"?m:m[0],p),S=()=>b,w=()=>n0(u,a.lng||null,f.nsMode==="fallback"?m:m[0],p),[_,C]=y.useState(S);let j=m.join();a.lng&&(j=`${a.lng}${j}`);const N=DS(j),U=y.useRef(!0);y.useEffect(()=>{const{bindI18n:D,bindI18nStore:T}=f;U.current=!0,!v&&!d&&(a.lng?Ov(u,a.lng,m,()=>{U.current&&C(w)}):Ad(u,m,()=>{U.current&&C(w)})),v&&N&&N!==j&&U.current&&C(w);const R=()=>{U.current&&C(w)};return D&&u?.on(D,R),T&&u?.store.on(T,R),()=>{U.current=!1,u&&D&&D?.split(" ").forEach(H=>u.off(H,R)),T&&u&&T.split(" ").forEach(H=>u.store.off(H,R))}},[u,j]),y.useEffect(()=>{U.current&&v&&C(S)},[u,p,v]);const z=[_,u,v];if(z.t=_,z.i18n=u,z.ready=v,v||!v&&!d)return z;throw new Promise(D=>{a.lng?Ov(u,a.lng,m,()=>D()):Ad(u,m,()=>D())})},{slice:kS,forEach:zS}=[];function US(n){return zS.call(kS.call(arguments,1),a=>{if(a)for(const l in a)n[l]===void 0&&(n[l]=a[l])}),n}function PS(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(l=>l.test(n))}const Av=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,HS=function(n,a){const i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},s=encodeURIComponent(a);let u=`${n}=${s}`;if(i.maxAge>0){const f=i.maxAge-0;if(Number.isNaN(f))throw new Error("maxAge should be a Number");u+=`; Max-Age=${Math.floor(f)}`}if(i.domain){if(!Av.test(i.domain))throw new TypeError("option domain is invalid");u+=`; Domain=${i.domain}`}if(i.path){if(!Av.test(i.path))throw new TypeError("option path is invalid");u+=`; Path=${i.path}`}if(i.expires){if(typeof i.expires.toUTCString!="function")throw new TypeError("option expires is invalid");u+=`; Expires=${i.expires.toUTCString()}`}if(i.httpOnly&&(u+="; HttpOnly"),i.secure&&(u+="; Secure"),i.sameSite)switch(typeof i.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite){case!0:u+="; SameSite=Strict";break;case"lax":u+="; SameSite=Lax";break;case"strict":u+="; SameSite=Strict";break;case"none":u+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return i.partitioned&&(u+="; Partitioned"),u},Tv={create(n,a,l,i){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};l&&(s.expires=new Date,s.expires.setTime(s.expires.getTime()+l*60*1e3)),i&&(s.domain=i),document.cookie=HS(n,a,s)},read(n){const a=`${n}=`,l=document.cookie.split(";");for(let i=0;i<l.length;i++){let s=l[i];for(;s.charAt(0)===" ";)s=s.substring(1,s.length);if(s.indexOf(a)===0)return s.substring(a.length,s.length)}return null},remove(n,a){this.create(n,"",-1,a)}};var BS={name:"cookie",lookup(n){let{lookupCookie:a}=n;if(a&&typeof document<"u")return Tv.read(a)||void 0},cacheUserLanguage(n,a){let{lookupCookie:l,cookieMinutes:i,cookieDomain:s,cookieOptions:u}=a;l&&typeof document<"u"&&Tv.create(l,n,i,s,u)}},$S={name:"querystring",lookup(n){let{lookupQuerystring:a}=n,l;if(typeof window<"u"){let{search:i}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const u=i.substring(1).split("&");for(let f=0;f<u.length;f++){const d=u[f].indexOf("=");d>0&&u[f].substring(0,d)===a&&(l=u[f].substring(d+1))}}return l}},VS={name:"hash",lookup(n){let{lookupHash:a,lookupFromHashIndex:l}=n,i;if(typeof window<"u"){const{hash:s}=window.location;if(s&&s.length>2){const u=s.substring(1);if(a){const f=u.split("&");for(let d=0;d<f.length;d++){const p=f[d].indexOf("=");p>0&&f[d].substring(0,p)===a&&(i=f[d].substring(p+1))}}if(i)return i;if(!i&&l>-1){const f=s.match(/\/([a-zA-Z-]*)/g);return Array.isArray(f)?f[typeof l=="number"?l:0]?.replace("/",""):void 0}}}return i}};let zl=null;const Mv=()=>{if(zl!==null)return zl;try{if(zl=typeof window<"u"&&window.localStorage!==null,!zl)return!1;const n="i18next.translate.boo";window.localStorage.setItem(n,"foo"),window.localStorage.removeItem(n)}catch{zl=!1}return zl};var YS={name:"localStorage",lookup(n){let{lookupLocalStorage:a}=n;if(a&&Mv())return window.localStorage.getItem(a)||void 0},cacheUserLanguage(n,a){let{lookupLocalStorage:l}=a;l&&Mv()&&window.localStorage.setItem(l,n)}};let Ul=null;const Dv=()=>{if(Ul!==null)return Ul;try{if(Ul=typeof window<"u"&&window.sessionStorage!==null,!Ul)return!1;const n="i18next.translate.boo";window.sessionStorage.setItem(n,"foo"),window.sessionStorage.removeItem(n)}catch{Ul=!1}return Ul};var qS={name:"sessionStorage",lookup(n){let{lookupSessionStorage:a}=n;if(a&&Dv())return window.sessionStorage.getItem(a)||void 0},cacheUserLanguage(n,a){let{lookupSessionStorage:l}=a;l&&Dv()&&window.sessionStorage.setItem(l,n)}},KS={name:"navigator",lookup(n){const a=[];if(typeof navigator<"u"){const{languages:l,userLanguage:i,language:s}=navigator;if(l)for(let u=0;u<l.length;u++)a.push(l[u]);i&&a.push(i),s&&a.push(s)}return a.length>0?a:void 0}},GS={name:"htmlTag",lookup(n){let{htmlTag:a}=n,l;const i=a||(typeof document<"u"?document.documentElement:null);return i&&typeof i.getAttribute=="function"&&(l=i.getAttribute("lang")),l}},FS={name:"path",lookup(n){let{lookupFromPathIndex:a}=n;if(typeof window>"u")return;const l=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(l)?l[typeof a=="number"?a:0]?.replace("/",""):void 0}},XS={name:"subdomain",lookup(n){let{lookupFromSubdomainIndex:a}=n;const l=typeof a=="number"?a+1:1,i=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(i)return i[l]}};let a0=!1;try{document.cookie,a0=!0}catch{}const r0=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];a0||r0.splice(1,1);const QS=()=>({order:r0,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:n=>n});class l0{constructor(a){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(a,l)}init(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=a,this.options=US(l,this.options||{},QS()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=s=>s.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(BS),this.addDetector($S),this.addDetector(YS),this.addDetector(qS),this.addDetector(KS),this.addDetector(GS),this.addDetector(FS),this.addDetector(XS),this.addDetector(VS)}addDetector(a){return this.detectors[a.name]=a,this}detect(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,l=[];return a.forEach(i=>{if(this.detectors[i]){let s=this.detectors[i].lookup(this.options);s&&typeof s=="string"&&(s=[s]),s&&(l=l.concat(s))}}),l=l.filter(i=>i!=null&&!PS(i)).map(i=>this.options.convertDetectedLanguage(i)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?l:l.length>0?l[0]:null}cacheUserLanguage(a){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;l&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(a)>-1||l.forEach(i=>{this.detectors[i]&&this.detectors[i].cacheUserLanguage(a,this.options)}))}}l0.type="languageDetector";const ZS={title:"Claude Code Router",save:"Save",save_and_restart:"Save and Restart",cancel:"Cancel",edit:"Edit",remove:"Remove",delete:"Delete",settings:"Settings",selectFile:"Select File",config_saved_success:"Config saved successfully",config_saved_failed:"Failed to save config",config_saved_restart_success:"Config saved and service restarted successfully",config_saved_restart_failed:"Failed to save config and restart service",new_version_available:"New Version Available",update_description:"A new version is available. Please review the changelog and update to get the latest features and improvements.",no_changelog_available:"No changelog available",later:"Later",update_now:"Update Now",no_updates_available:"No updates available",update_check_failed:"Failed to check for updates",update_successful:"Update successful",update_failed:"Update failed"},IS={title:"Sign in to your account",description:"Enter your API key to access the configuration panel",apiKey:"API Key",apiKeyPlaceholder:"Enter your API key",signIn:"Sign In",invalidApiKey:"Invalid API key",configError:"Configuration not loaded",validating:"Validating API key..."},JS={title:"General Settings",log:"Enable Logging",log_level:"Log Level",claude_path:"Claude Path",host:"Host",port:"Port",apikey:"API Key",timeout:"API Timeout (ms)",proxy_url:"Proxy URL"},WS={title:"Custom Transformers",path:"Path",project:"Project",remove:"Remove",add:"Add Custom Transformer",edit:"Edit Custom Transformer",delete:"Delete Custom Transformer",delete_transformer_confirm:"Are you sure you want to delete this custom transformer?",parameters:"Parameters"},eE={title:"Providers",name:"Name",api_base_url:"API Full URL",api_key:"API Key",models:"Models",models_placeholder:"Enter model name and press Enter to add",add_model:"Add Model",select_models:"Select Models",remove:"Remove",add:"Add Provider",edit:"Edit Provider",delete:"Delete",cancel:"Cancel",delete_provider_confirm:"Are you sure you want to delete this provider?",test_connectivity:"Test Connectivity",testing:"Testing...",connection_successful:"Connection successful!",connection_failed:"Connection failed!",missing_credentials:"Missing API base URL or API key",fetch_available_models:"Fetch available models",fetching_models:"Fetching models...",fetch_models_failed:"Failed to fetch models",transformers:"Transformers",select_transformer:"Select Transformer",no_transformers:"No transformers available",provider_transformer:"Provider Transformer",model_transformers:"Model Transformers",transformer_parameters:"Transformer Parameters",add_parameter:"Add Parameter",parameter_name:"Parameter Name",parameter_value:"Parameter Value",selected_transformers:"Selected Transformers",import_from_template:"Import from template",no_templates_found:"No templates found",select_template:"Select a template...",api_key_required:"API Key is required",name_required:"Name is required",name_duplicate:"A provider with this name already exists"},tE={title:"Router",default:"Default",background:"Background",think:"Think",longContext:"Long Context",longContextThreshold:"Context Threshold",webSearch:"Web Search",selectModel:"Select a model...",searchModel:"Search model...",noModelFound:"No model found."},nE={title:"JSON Editor",save:"Save",saving:"Saving...",cancel:"Cancel",save_failed:"Failed to save config",save_and_restart:"Save & Restart"},aE={title:"Status Line Configuration",enable:"Enable Status Line",theme:"Theme Style",theme_default:"Default",theme_powerline:"Powerline",modules:"Modules",module_type:"Type",module_icon:"Icon",module_text:"Text",module_color:"Color",module_background:"Background",add_module:"Add Module",remove_module:"Remove Module",preview:"Preview",workDir:"Working Directory",gitBranch:"Git Branch",model:"Model",usage:"Usage",background_none:"None",color_black:"Black",color_red:"Red",color_green:"Green",color_yellow:"Yellow",color_blue:"Blue",color_magenta:"Magenta",color_cyan:"Cyan",color_white:"White",color_bright_black:"Bright Black",color_bright_red:"Bright Red",color_bright_green:"Bright Green",color_bright_yellow:"Bright Yellow",color_bright_blue:"Bright Blue",color_bright_magenta:"Bright Magenta",color_bright_cyan:"Bright Cyan",color_bright_white:"Bright White",import_export:"Import/Export",import:"Import Config",export:"Export Config",download_template:"Download Template",import_export_help:"Export current configuration as a JSON file, or import configuration from a JSON file. You can also download a configuration template for reference.",export_success:"Configuration exported successfully",export_failed:"Failed to export configuration",import_success:"Configuration imported successfully",import_failed:"Failed to import configuration",invalid_config:"Invalid configuration file",template_download_success:"Template downloaded successfully",template_download_success_desc:"Configuration template has been downloaded to your device",template_download_failed:"Failed to download template"},rE={app:ZS,login:IS,toplevel:JS,transformers:WS,providers:eE,router:tE,json_editor:nE,statusline:aE},lE={title:"Claude Code Router",save:"保存",save_and_restart:"保存并重启",cancel:"取消",edit:"编辑",remove:"移除",delete:"删除",settings:"设置",selectFile:"选择文件",config_saved_success:"配置保存成功",config_saved_failed:"配置保存失败",config_saved_restart_success:"配置保存并服务重启成功",config_saved_restart_failed:"配置保存并服务重启失败",new_version_available:"有新版本可用",update_description:"发现新版本。请查看更新日志并更新以获取最新功能和改进。",no_changelog_available:"暂无更新日志",later:"稍后再说",update_now:"立即更新",no_updates_available:"当前已是最新版本",update_check_failed:"检查更新失败",update_successful:"更新成功",update_failed:"更新失败"},iE={title:"登录到您的账户",description:"请输入您的API密钥以访问配置面板",apiKey:"API密钥",apiKeyPlaceholder:"请输入您的API密钥",signIn:"登录",invalidApiKey:"API密钥无效",configError:"配置未加载",validating:"正在验证API密钥..."},oE={title:"通用设置",log:"启用日志",log_level:"日志级别",claude_path:"Claude 路径",host:"主机",port:"端口",apikey:"API 密钥",timeout:"API 超时时间 (毫秒)",proxy_url:"代理地址"},sE={title:"自定义转换器",path:"路径",project:"项目",remove:"移除",add:"添加自定义转换器",edit:"编辑自定义转换器",delete:"删除自定义转换器",delete_transformer_confirm:"您确定要删除此自定义转换器吗?",parameters:"参数"},uE={title:"供应商",name:"名称",api_base_url:"API 完整地址",api_key:"API 密钥",models:"模型",models_placeholder:"输入模型名称并按回车键添加",add_model:"添加模型",select_models:"选择模型",remove:"移除",add:"添加供应商",edit:"编辑供应商",delete:"删除",cancel:"取消",delete_provider_confirm:"您确定要删除此供应商吗?",test_connectivity:"测试连通性",testing:"测试中...",connection_successful:"连接成功!",connection_failed:"连接失败!",missing_credentials:"缺少 API 基础地址或 API 密钥",fetch_available_models:"获取可用模型",fetching_models:"获取模型中...",fetch_models_failed:"获取模型失败",transformers:"转换器",select_transformer:"选择转换器",no_transformers:"无可用转换器",provider_transformer:"供应商转换器",model_transformers:"模型转换器",transformer_parameters:"转换器参数",add_parameter:"添加参数",parameter_name:"参数名称",parameter_value:"参数值",selected_transformers:"已选转换器",import_from_template:"从模板导入",no_templates_found:"未找到模板",select_template:"选择一个模板...",api_key_required:"API 密钥为必填项",name_required:"名称为必填项",name_duplicate:"已存在同名供应商"},cE={title:"路由",default:"默认",background:"后台",think:"思考",longContext:"长上下文",longContextThreshold:"上下文阈值",webSearch:"网络搜索",selectModel:"选择一个模型...",searchModel:"搜索模型...",noModelFound:"未找到模型."},fE={title:"JSON 编辑器",save:"保存",saving:"保存中...",cancel:"取消",save_failed:"配置保存失败",save_and_restart:"保存并重启"},dE={title:"状态栏配置",enable:"启用状态栏",theme:"主题样式",theme_default:"默认",theme_powerline:"Powerline",modules:"模块",module_type:"类型",module_icon:"图标",module_text:"文本",module_color:"颜色",module_background:"背景",add_module:"添加模块",remove_module:"移除模块",preview:"预览",workDir:"工作目录",gitBranch:"Git分支",model:"模型",usage:"使用情况",background_none:"无",color_black:"黑色",color_red:"红色",color_green:"绿色",color_yellow:"黄色",color_blue:"蓝色",color_magenta:"品红",color_cyan:"青色",color_white:"白色",color_bright_black:"亮黑色",color_bright_red:"亮红色",color_bright_green:"亮绿色",color_bright_yellow:"亮黄色",color_bright_blue:"亮蓝色",color_bright_magenta:"亮品红",color_bright_cyan:"亮青色",color_bright_white:"亮白色",import_export:"导入/导出",import:"导入配置",export:"导出配置",download_template:"下载模板",import_export_help:"导出当前配置为JSON文件,或从JSON文件导入配置。您也可以下载配置模板作为参考。",export_success:"配置导出成功",export_failed:"配置导出失败",import_success:"配置导入成功",import_failed:"配置导入失败",invalid_config:"无效的配置文件",template_download_success:"模板下载成功",template_download_success_desc:"配置模板已下载到您的设备",template_download_failed:"模板下载失败"},hE={app:lE,login:iE,toplevel:oE,transformers:sE,providers:uE,router:cE,json_editor:fE,statusline:dE},mE={en:{translation:rE},zh:{translation:hE}};Yt.use(l0).use(AS).init({resources:mE,fallbackLng:"en",interpolation:{escapeValue:!1}});var nd={exports:{}},ao={},ad={exports:{}},rd={};/**
|
|
23
|
+
*/var Cv;function vS(){if(Cv)return Be;Cv=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),f=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),b=Symbol.iterator;function w(O){return O===null||typeof O!="object"?null:(O=b&&O[b]||O["@@iterator"],typeof O=="function"?O:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,_={};function j(O,F,U){this.props=O,this.context=F,this.refs=_,this.updater=U||S}j.prototype.isReactComponent={},j.prototype.setState=function(O,F){if(typeof O!="object"&&typeof O!="function"&&O!=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,O,F,"setState")},j.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function N(){}N.prototype=j.prototype;function z(O,F,U){this.props=O,this.context=F,this.refs=_,this.updater=U||S}var k=z.prototype=new N;k.constructor=z,C(k,j.prototype),k.isPureReactComponent=!0;var H=Array.isArray,D={H:null,A:null,T:null,S:null,V:null},R=Object.prototype.hasOwnProperty;function B(O,F,U,K,ae,de){return U=de.ref,{$$typeof:n,type:O,key:F,ref:U!==void 0?U:null,props:de}}function Z(O,F){return B(O.type,F,void 0,void 0,void 0,O.props)}function ne(O){return typeof O=="object"&&O!==null&&O.$$typeof===n}function oe(O){var F={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(U){return F[U]})}var le=/\/+/g;function J(O,F){return typeof O=="object"&&O!==null&&O.key!=null?oe(""+O.key):F.toString(36)}function te(){}function W(O){switch(O.status){case"fulfilled":return O.value;case"rejected":throw O.reason;default:switch(typeof O.status=="string"?O.then(te,te):(O.status="pending",O.then(function(F){O.status==="pending"&&(O.status="fulfilled",O.value=F)},function(F){O.status==="pending"&&(O.status="rejected",O.reason=F)})),O.status){case"fulfilled":return O.value;case"rejected":throw O.reason}}throw O}function ue(O,F,U,K,ae){var de=typeof O;(de==="undefined"||de==="boolean")&&(O=null);var ge=!1;if(O===null)ge=!0;else switch(de){case"bigint":case"string":case"number":ge=!0;break;case"object":switch(O.$$typeof){case n:case a:ge=!0;break;case v:return ge=O._init,ue(ge(O._payload),F,U,K,ae)}}if(ge)return ae=ae(O),ge=K===""?"."+J(O,0):K,H(ae)?(U="",ge!=null&&(U=ge.replace(le,"$&/")+"/"),ue(ae,F,U,"",function(qe){return qe})):ae!=null&&(ne(ae)&&(ae=Z(ae,U+(ae.key==null||O&&O.key===ae.key?"":(""+ae.key).replace(le,"$&/")+"/")+ge)),F.push(ae)),1;ge=0;var ye=K===""?".":K+":";if(H(O))for(var Le=0;Le<O.length;Le++)K=O[Le],de=ye+J(K,Le),ge+=ue(K,F,U,de,ae);else if(Le=w(O),typeof Le=="function")for(O=Le.call(O),Le=0;!(K=O.next()).done;)K=K.value,de=ye+J(K,Le++),ge+=ue(K,F,U,de,ae);else if(de==="object"){if(typeof O.then=="function")return ue(W(O),F,U,K,ae);throw F=String(O),Error("Objects are not valid as a React child (found: "+(F==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":F)+"). If you meant to render a collection of children, use an array instead.")}return ge}function A(O,F,U){if(O==null)return O;var K=[],ae=0;return ue(O,K,"","",function(de){return F.call(U,de,ae++)}),K}function Q(O){if(O._status===-1){var F=O._result;F=F(),F.then(function(U){(O._status===0||O._status===-1)&&(O._status=1,O._result=U)},function(U){(O._status===0||O._status===-1)&&(O._status=2,O._result=U)}),O._status===-1&&(O._status=0,O._result=F)}if(O._status===1)return O._result.default;throw O._result}var V=typeof reportError=="function"?reportError:function(O){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var F=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof O=="object"&&O!==null&&typeof O.message=="string"?String(O.message):String(O),error:O});if(!window.dispatchEvent(F))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",O);return}console.error(O)};function ve(){}return Be.Children={map:A,forEach:function(O,F,U){A(O,function(){F.apply(this,arguments)},U)},count:function(O){var F=0;return A(O,function(){F++}),F},toArray:function(O){return A(O,function(F){return F})||[]},only:function(O){if(!ne(O))throw Error("React.Children.only expected to receive a single React element child.");return O}},Be.Component=j,Be.Fragment=l,Be.Profiler=s,Be.PureComponent=z,Be.StrictMode=i,Be.Suspense=p,Be.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,Be.__COMPILER_RUNTIME={__proto__:null,c:function(O){return D.H.useMemoCache(O)}},Be.cache=function(O){return function(){return O.apply(null,arguments)}},Be.cloneElement=function(O,F,U){if(O==null)throw Error("The argument must be a React element, but you passed "+O+".");var K=C({},O.props),ae=O.key,de=void 0;if(F!=null)for(ge in F.ref!==void 0&&(de=void 0),F.key!==void 0&&(ae=""+F.key),F)!R.call(F,ge)||ge==="key"||ge==="__self"||ge==="__source"||ge==="ref"&&F.ref===void 0||(K[ge]=F[ge]);var ge=arguments.length-2;if(ge===1)K.children=U;else if(1<ge){for(var ye=Array(ge),Le=0;Le<ge;Le++)ye[Le]=arguments[Le+2];K.children=ye}return B(O.type,ae,void 0,void 0,de,K)},Be.createContext=function(O){return O={$$typeof:f,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null},O.Provider=O,O.Consumer={$$typeof:u,_context:O},O},Be.createElement=function(O,F,U){var K,ae={},de=null;if(F!=null)for(K in F.key!==void 0&&(de=""+F.key),F)R.call(F,K)&&K!=="key"&&K!=="__self"&&K!=="__source"&&(ae[K]=F[K]);var ge=arguments.length-2;if(ge===1)ae.children=U;else if(1<ge){for(var ye=Array(ge),Le=0;Le<ge;Le++)ye[Le]=arguments[Le+2];ae.children=ye}if(O&&O.defaultProps)for(K in ge=O.defaultProps,ge)ae[K]===void 0&&(ae[K]=ge[K]);return B(O,de,void 0,void 0,null,ae)},Be.createRef=function(){return{current:null}},Be.forwardRef=function(O){return{$$typeof:d,render:O}},Be.isValidElement=ne,Be.lazy=function(O){return{$$typeof:v,_payload:{_status:-1,_result:O},_init:Q}},Be.memo=function(O,F){return{$$typeof:m,type:O,compare:F===void 0?null:F}},Be.startTransition=function(O){var F=D.T,U={};D.T=U;try{var K=O(),ae=D.S;ae!==null&&ae(U,K),typeof K=="object"&&K!==null&&typeof K.then=="function"&&K.then(ve,V)}catch(de){V(de)}finally{D.T=F}},Be.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},Be.use=function(O){return D.H.use(O)},Be.useActionState=function(O,F,U){return D.H.useActionState(O,F,U)},Be.useCallback=function(O,F){return D.H.useCallback(O,F)},Be.useContext=function(O){return D.H.useContext(O)},Be.useDebugValue=function(){},Be.useDeferredValue=function(O,F){return D.H.useDeferredValue(O,F)},Be.useEffect=function(O,F,U){var K=D.H;if(typeof U=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return K.useEffect(O,F)},Be.useId=function(){return D.H.useId()},Be.useImperativeHandle=function(O,F,U){return D.H.useImperativeHandle(O,F,U)},Be.useInsertionEffect=function(O,F){return D.H.useInsertionEffect(O,F)},Be.useLayoutEffect=function(O,F){return D.H.useLayoutEffect(O,F)},Be.useMemo=function(O,F){return D.H.useMemo(O,F)},Be.useOptimistic=function(O,F){return D.H.useOptimistic(O,F)},Be.useReducer=function(O,F,U){return D.H.useReducer(O,F,U)},Be.useRef=function(O){return D.H.useRef(O)},Be.useState=function(O){return D.H.useState(O)},Be.useSyncExternalStore=function(O,F,U){return D.H.useSyncExternalStore(O,F,U)},Be.useTransition=function(){return D.H.useTransition()},Be.version="19.1.1",Be}var Nv;function Wd(){return Nv||(Nv=1,Wf.exports=vS()),Wf.exports}var y=Wd();const mt=Xy(y),Iy=Qw({__proto__:null,default:mt},[y]),yS=(n,a,l,i)=>{const s=[l,{code:a,...i||{}}];if(n?.services?.logger?.forward)return n.services.logger.forward(s,"warn","react-i18next::",!0);Yr(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),n?.services?.logger?.warn?n.services.logger.warn(...s):console?.warn&&console.warn(...s)},Rv={},jd=(n,a,l,i)=>{Yr(l)&&Rv[l]||(Yr(l)&&(Rv[l]=new Date),yS(n,a,l,i))},Jy=(n,a)=>()=>{if(n.isInitialized)a();else{const l=()=>{setTimeout(()=>{n.off("initialized",l)},0),a()};n.on("initialized",l)}},Od=(n,a,l)=>{n.loadNamespaces(a,Jy(n,l))},jv=(n,a,l,i)=>{if(Yr(l)&&(l=[l]),n.options.preload&&n.options.preload.indexOf(a)>-1)return Od(n,l,i);l.forEach(s=>{n.options.ns.indexOf(s)<0&&n.options.ns.push(s)}),n.loadLanguages(a,Jy(n,i))},bS=(n,a,l={})=>!a.languages||!a.languages.length?(jd(a,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:a.languages}),!0):a.hasLoadedNamespace(n,{lng:l.lng,precheck:(i,s)=>{if(l.bindI18n&&l.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!s(i.isLanguageChangingTo,n))return!1}}),Yr=n=>typeof n=="string",xS=n=>typeof n=="object"&&n!==null,wS=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,SS={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},ES=n=>SS[n],_S=n=>n.replace(wS,ES);let Ad={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:_S};const CS=(n={})=>{Ad={...Ad,...n}},NS=()=>Ad;let Wy;const RS=n=>{Wy=n},jS=()=>Wy,OS={type:"3rdParty",init(n){CS(n.options.react),RS(n)}},AS=y.createContext();class TS{constructor(){this.usedNamespaces={}}addUsedNamespaces(a){a.forEach(l=>{this.usedNamespaces[l]||(this.usedNamespaces[l]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const MS=(n,a)=>{const l=y.useRef();return y.useEffect(()=>{l.current=n},[n,a]),l.current},e0=(n,a,l,i)=>n.getFixedT(a,l,i),DS=(n,a,l,i)=>y.useCallback(e0(n,a,l,i),[n,a,l,i]),hr=(n,a={})=>{const{i18n:l}=a,{i18n:i,defaultNS:s}=y.useContext(AS)||{},u=l||i||jS();if(u&&!u.reportNamespaces&&(u.reportNamespaces=new TS),!u){jd(u,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const H=(R,B)=>Yr(B)?B:xS(B)&&Yr(B.defaultValue)?B.defaultValue:Array.isArray(R)?R[R.length-1]:R,D=[H,{},!1];return D.t=H,D.i18n={},D.ready=!1,D}u.options.react?.wait&&jd(u,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const f={...NS(),...u.options.react,...a},{useSuspense:d,keyPrefix:p}=f;let m=s||u.options?.defaultNS;m=Yr(m)?[m]:m||["translation"],u.reportNamespaces.addUsedNamespaces?.(m);const v=(u.isInitialized||u.initializedStoreOnce)&&m.every(H=>bS(H,u,f)),b=DS(u,a.lng||null,f.nsMode==="fallback"?m:m[0],p),w=()=>b,S=()=>e0(u,a.lng||null,f.nsMode==="fallback"?m:m[0],p),[C,_]=y.useState(w);let j=m.join();a.lng&&(j=`${a.lng}${j}`);const N=MS(j),z=y.useRef(!0);y.useEffect(()=>{const{bindI18n:H,bindI18nStore:D}=f;z.current=!0,!v&&!d&&(a.lng?jv(u,a.lng,m,()=>{z.current&&_(S)}):Od(u,m,()=>{z.current&&_(S)})),v&&N&&N!==j&&z.current&&_(S);const R=()=>{z.current&&_(S)};return H&&u?.on(H,R),D&&u?.store.on(D,R),()=>{z.current=!1,u&&H&&H?.split(" ").forEach(B=>u.off(B,R)),D&&u&&D.split(" ").forEach(B=>u.store.off(B,R))}},[u,j]),y.useEffect(()=>{z.current&&v&&_(w)},[u,p,v]);const k=[C,u,v];if(k.t=C,k.i18n=u,k.ready=v,v||!v&&!d)return k;throw new Promise(H=>{a.lng?jv(u,a.lng,m,()=>H()):Od(u,m,()=>H())})},{slice:LS,forEach:kS}=[];function zS(n){return kS.call(LS.call(arguments,1),a=>{if(a)for(const l in a)n[l]===void 0&&(n[l]=a[l])}),n}function US(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(l=>l.test(n))}const Ov=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,PS=function(n,a){const i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},s=encodeURIComponent(a);let u=`${n}=${s}`;if(i.maxAge>0){const f=i.maxAge-0;if(Number.isNaN(f))throw new Error("maxAge should be a Number");u+=`; Max-Age=${Math.floor(f)}`}if(i.domain){if(!Ov.test(i.domain))throw new TypeError("option domain is invalid");u+=`; Domain=${i.domain}`}if(i.path){if(!Ov.test(i.path))throw new TypeError("option path is invalid");u+=`; Path=${i.path}`}if(i.expires){if(typeof i.expires.toUTCString!="function")throw new TypeError("option expires is invalid");u+=`; Expires=${i.expires.toUTCString()}`}if(i.httpOnly&&(u+="; HttpOnly"),i.secure&&(u+="; Secure"),i.sameSite)switch(typeof i.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite){case!0:u+="; SameSite=Strict";break;case"lax":u+="; SameSite=Lax";break;case"strict":u+="; SameSite=Strict";break;case"none":u+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return i.partitioned&&(u+="; Partitioned"),u},Av={create(n,a,l,i){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};l&&(s.expires=new Date,s.expires.setTime(s.expires.getTime()+l*60*1e3)),i&&(s.domain=i),document.cookie=PS(n,a,s)},read(n){const a=`${n}=`,l=document.cookie.split(";");for(let i=0;i<l.length;i++){let s=l[i];for(;s.charAt(0)===" ";)s=s.substring(1,s.length);if(s.indexOf(a)===0)return s.substring(a.length,s.length)}return null},remove(n,a){this.create(n,"",-1,a)}};var HS={name:"cookie",lookup(n){let{lookupCookie:a}=n;if(a&&typeof document<"u")return Av.read(a)||void 0},cacheUserLanguage(n,a){let{lookupCookie:l,cookieMinutes:i,cookieDomain:s,cookieOptions:u}=a;l&&typeof document<"u"&&Av.create(l,n,i,s,u)}},BS={name:"querystring",lookup(n){let{lookupQuerystring:a}=n,l;if(typeof window<"u"){let{search:i}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const u=i.substring(1).split("&");for(let f=0;f<u.length;f++){const d=u[f].indexOf("=");d>0&&u[f].substring(0,d)===a&&(l=u[f].substring(d+1))}}return l}},$S={name:"hash",lookup(n){let{lookupHash:a,lookupFromHashIndex:l}=n,i;if(typeof window<"u"){const{hash:s}=window.location;if(s&&s.length>2){const u=s.substring(1);if(a){const f=u.split("&");for(let d=0;d<f.length;d++){const p=f[d].indexOf("=");p>0&&f[d].substring(0,p)===a&&(i=f[d].substring(p+1))}}if(i)return i;if(!i&&l>-1){const f=s.match(/\/([a-zA-Z-]*)/g);return Array.isArray(f)?f[typeof l=="number"?l:0]?.replace("/",""):void 0}}}return i}};let zl=null;const Tv=()=>{if(zl!==null)return zl;try{if(zl=typeof window<"u"&&window.localStorage!==null,!zl)return!1;const n="i18next.translate.boo";window.localStorage.setItem(n,"foo"),window.localStorage.removeItem(n)}catch{zl=!1}return zl};var VS={name:"localStorage",lookup(n){let{lookupLocalStorage:a}=n;if(a&&Tv())return window.localStorage.getItem(a)||void 0},cacheUserLanguage(n,a){let{lookupLocalStorage:l}=a;l&&Tv()&&window.localStorage.setItem(l,n)}};let Ul=null;const Mv=()=>{if(Ul!==null)return Ul;try{if(Ul=typeof window<"u"&&window.sessionStorage!==null,!Ul)return!1;const n="i18next.translate.boo";window.sessionStorage.setItem(n,"foo"),window.sessionStorage.removeItem(n)}catch{Ul=!1}return Ul};var YS={name:"sessionStorage",lookup(n){let{lookupSessionStorage:a}=n;if(a&&Mv())return window.sessionStorage.getItem(a)||void 0},cacheUserLanguage(n,a){let{lookupSessionStorage:l}=a;l&&Mv()&&window.sessionStorage.setItem(l,n)}},qS={name:"navigator",lookup(n){const a=[];if(typeof navigator<"u"){const{languages:l,userLanguage:i,language:s}=navigator;if(l)for(let u=0;u<l.length;u++)a.push(l[u]);i&&a.push(i),s&&a.push(s)}return a.length>0?a:void 0}},FS={name:"htmlTag",lookup(n){let{htmlTag:a}=n,l;const i=a||(typeof document<"u"?document.documentElement:null);return i&&typeof i.getAttribute=="function"&&(l=i.getAttribute("lang")),l}},KS={name:"path",lookup(n){let{lookupFromPathIndex:a}=n;if(typeof window>"u")return;const l=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(l)?l[typeof a=="number"?a:0]?.replace("/",""):void 0}},GS={name:"subdomain",lookup(n){let{lookupFromSubdomainIndex:a}=n;const l=typeof a=="number"?a+1:1,i=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(i)return i[l]}};let t0=!1;try{document.cookie,t0=!0}catch{}const n0=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];t0||n0.splice(1,1);const XS=()=>({order:n0,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:n=>n});class a0{constructor(a){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(a,l)}init(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=a,this.options=zS(l,this.options||{},XS()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=s=>s.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(HS),this.addDetector(BS),this.addDetector(VS),this.addDetector(YS),this.addDetector(qS),this.addDetector(FS),this.addDetector(KS),this.addDetector(GS),this.addDetector($S)}addDetector(a){return this.detectors[a.name]=a,this}detect(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,l=[];return a.forEach(i=>{if(this.detectors[i]){let s=this.detectors[i].lookup(this.options);s&&typeof s=="string"&&(s=[s]),s&&(l=l.concat(s))}}),l=l.filter(i=>i!=null&&!US(i)).map(i=>this.options.convertDetectedLanguage(i)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?l:l.length>0?l[0]:null}cacheUserLanguage(a){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;l&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(a)>-1||l.forEach(i=>{this.detectors[i]&&this.detectors[i].cacheUserLanguage(a,this.options)}))}}a0.type="languageDetector";const QS={title:"Claude Code Router",save:"Save",save_and_restart:"Save and Restart",cancel:"Cancel",edit:"Edit",remove:"Remove",delete:"Delete",settings:"Settings",selectFile:"Select File",config_saved_success:"Config saved successfully",config_saved_failed:"Failed to save config",config_saved_restart_success:"Config saved and service restarted successfully",config_saved_restart_failed:"Failed to save config and restart service",new_version_available:"New Version Available",update_description:"A new version is available. Please review the changelog and update to get the latest features and improvements.",no_changelog_available:"No changelog available",later:"Later",update_now:"Update Now",no_updates_available:"No updates available",update_check_failed:"Failed to check for updates",update_successful:"Update successful",update_failed:"Update failed"},ZS={title:"Sign in to your account",description:"Enter your API key to access the configuration panel",apiKey:"API Key",apiKeyPlaceholder:"Enter your API key",signIn:"Sign In",invalidApiKey:"Invalid API key",configError:"Configuration not loaded",validating:"Validating API key..."},IS={title:"General Settings",log:"Enable Logging",log_level:"Log Level",claude_path:"Claude Path",host:"Host",port:"Port",apikey:"API Key",timeout:"API Timeout (ms)",proxy_url:"Proxy URL"},JS={title:"Custom Transformers",path:"Path",project:"Project",remove:"Remove",add:"Add Custom Transformer",edit:"Edit Custom Transformer",delete:"Delete Custom Transformer",delete_transformer_confirm:"Are you sure you want to delete this custom transformer?",parameters:"Parameters"},WS={title:"Providers",name:"Name",api_base_url:"API Full URL",api_key:"API Key",models:"Models",models_placeholder:"Enter model name and press Enter to add",add_model:"Add Model",select_models:"Select Models",remove:"Remove",add:"Add Provider",edit:"Edit Provider",delete:"Delete",cancel:"Cancel",delete_provider_confirm:"Are you sure you want to delete this provider?",test_connectivity:"Test Connectivity",testing:"Testing...",connection_successful:"Connection successful!",connection_failed:"Connection failed!",missing_credentials:"Missing API base URL or API key",fetch_available_models:"Fetch available models",fetching_models:"Fetching models...",fetch_models_failed:"Failed to fetch models",transformers:"Transformers",select_transformer:"Select Transformer",no_transformers:"No transformers available",provider_transformer:"Provider Transformer",model_transformers:"Model Transformers",transformer_parameters:"Transformer Parameters",add_parameter:"Add Parameter",parameter_name:"Parameter Name",parameter_value:"Parameter Value",selected_transformers:"Selected Transformers",import_from_template:"Import from template",no_templates_found:"No templates found",select_template:"Select a template...",api_key_required:"API Key is required",name_required:"Name is required",name_duplicate:"A provider with this name already exists",search:"Search providers..."},eE={title:"Router",default:"Default",background:"Background",think:"Think",longContext:"Long Context",longContextThreshold:"Context Threshold",webSearch:"Web Search",selectModel:"Select a model...",searchModel:"Search model...",noModelFound:"No model found."},tE={title:"JSON Editor",save:"Save",saving:"Saving...",cancel:"Cancel",save_failed:"Failed to save config",save_and_restart:"Save & Restart"},nE={title:"Status Line Configuration",enable:"Enable Status Line",theme:"Theme Style",theme_default:"Default",theme_powerline:"Powerline",modules:"Modules",module_type:"Type",module_icon:"Icon",module_text:"Text",module_color:"Color",module_background:"Background",module_text_description:"Enter display text, variables can be used:",module_color_description:"Select text color",module_background_description:"Select background color (optional)",module_script_path:"Script Path",module_script_path_description:"Enter the absolute path of the Node.js script file",add_module:"Add Module",remove_module:"Remove Module",delete_module:"Delete Module",preview:"Preview",components:"Components",properties:"Properties",workDir:"Working Directory",gitBranch:"Git Branch",model:"Model",usage:"Usage",script:"Script",background_none:"None",color_black:"Black",color_red:"Red",color_green:"Green",color_yellow:"Yellow",color_blue:"Blue",color_magenta:"Magenta",color_cyan:"Cyan",color_white:"White",color_bright_black:"Bright Black",color_bright_red:"Bright Red",color_bright_green:"Bright Green",color_bright_yellow:"Bright Yellow",color_bright_blue:"Bright Blue",color_bright_magenta:"Bright Magenta",color_bright_cyan:"Bright Cyan",color_bright_white:"Bright White",font_placeholder:"Select Font",theme_placeholder:"Select Theme Style",icon_placeholder:"Paste icon or search by name...",icon_description:"Enter icon character, paste icon, or search icons (optional)",text_placeholder:"e.g.: {{workDirName}}",script_placeholder:"e.g.: /path/to/your/script.js",drag_hint:"Drag components here to configure",select_hint:"Select a component to configure",no_icons_found:"No icons found",no_icons_available:"No icons available",import_export:"Import/Export",import:"Import Config",export:"Export Config",download_template:"Download Template",import_export_help:"Export current configuration as a JSON file, or import configuration from a JSON file. You can also download a configuration template for reference.",export_success:"Configuration exported successfully",export_failed:"Failed to export configuration",import_success:"Configuration imported successfully",import_failed:"Failed to import configuration",invalid_config:"Invalid configuration file",template_download_success:"Template downloaded successfully",template_download_success_desc:"Configuration template has been downloaded to your device",template_download_failed:"Failed to download template"},aE={app:QS,login:ZS,toplevel:IS,transformers:JS,providers:WS,router:eE,json_editor:tE,statusline:nE},rE={title:"Claude Code Router",save:"保存",save_and_restart:"保存并重启",cancel:"取消",edit:"编辑",remove:"移除",delete:"删除",settings:"设置",selectFile:"选择文件",config_saved_success:"配置保存成功",config_saved_failed:"配置保存失败",config_saved_restart_success:"配置保存并服务重启成功",config_saved_restart_failed:"配置保存并服务重启失败",new_version_available:"有新版本可用",update_description:"发现新版本。请查看更新日志并更新以获取最新功能和改进。",no_changelog_available:"暂无更新日志",later:"稍后再说",update_now:"立即更新",no_updates_available:"当前已是最新版本",update_check_failed:"检查更新失败",update_successful:"更新成功",update_failed:"更新失败"},lE={title:"登录到您的账户",description:"请输入您的API密钥以访问配置面板",apiKey:"API密钥",apiKeyPlaceholder:"请输入您的API密钥",signIn:"登录",invalidApiKey:"API密钥无效",configError:"配置未加载",validating:"正在验证API密钥..."},iE={title:"通用设置",log:"启用日志",log_level:"日志级别",claude_path:"Claude 路径",host:"主机",port:"端口",apikey:"API 密钥",timeout:"API 超时时间 (毫秒)",proxy_url:"代理地址"},oE={title:"自定义转换器",path:"路径",project:"项目",remove:"移除",add:"添加自定义转换器",edit:"编辑自定义转换器",delete:"删除自定义转换器",delete_transformer_confirm:"您确定要删除此自定义转换器吗?",parameters:"参数"},sE={title:"供应商",name:"名称",api_base_url:"API 完整地址",api_key:"API 密钥",models:"模型",models_placeholder:"输入模型名称并按回车键添加",add_model:"添加模型",select_models:"选择模型",remove:"移除",add:"添加供应商",edit:"编辑供应商",delete:"删除",cancel:"取消",delete_provider_confirm:"您确定要删除此供应商吗?",test_connectivity:"测试连通性",testing:"测试中...",connection_successful:"连接成功!",connection_failed:"连接失败!",missing_credentials:"缺少 API 基础地址或 API 密钥",fetch_available_models:"获取可用模型",fetching_models:"获取模型中...",fetch_models_failed:"获取模型失败",transformers:"转换器",select_transformer:"选择转换器",no_transformers:"无可用转换器",provider_transformer:"供应商转换器",model_transformers:"模型转换器",transformer_parameters:"转换器参数",add_parameter:"添加参数",parameter_name:"参数名称",parameter_value:"参数值",selected_transformers:"已选转换器",import_from_template:"从模板导入",no_templates_found:"未找到模板",select_template:"选择一个模板...",api_key_required:"API 密钥为必填项",name_required:"名称为必填项",name_duplicate:"已存在同名供应商",search:"搜索供应商..."},uE={title:"路由",default:"默认",background:"后台",think:"思考",longContext:"长上下文",longContextThreshold:"上下文阈值",webSearch:"网络搜索",selectModel:"选择一个模型...",searchModel:"搜索模型...",noModelFound:"未找到模型."},cE={title:"JSON 编辑器",save:"保存",saving:"保存中...",cancel:"取消",save_failed:"配置保存失败",save_and_restart:"保存并重启"},fE={title:"状态栏配置",enable:"启用状态栏",theme:"主题样式",theme_default:"默认",theme_powerline:"Powerline",modules:"模块",module_type:"类型",module_icon:"图标",module_text:"文本",module_color:"颜色",module_background:"背景",module_text_description:"输入显示文本,可使用变量:",module_color_description:"选择文字颜色",module_background_description:"选择背景颜色(可选)",module_script_path:"脚本路径",module_script_path_description:"输入Node.js脚本文件的绝对路径",add_module:"添加模块",remove_module:"移除模块",delete_module:"删除组件",preview:"预览",components:"组件",properties:"属性",workDir:"工作目录",gitBranch:"Git分支",model:"模型",usage:"使用情况",script:"脚本",background_none:"无",color_black:"黑色",color_red:"红色",color_green:"绿色",color_yellow:"黄色",color_blue:"蓝色",color_magenta:"品红",color_cyan:"青色",color_white:"白色",color_bright_black:"亮黑色",color_bright_red:"亮红色",color_bright_green:"亮绿色",color_bright_yellow:"亮黄色",color_bright_blue:"亮蓝色",color_bright_magenta:"亮品红",color_bright_cyan:"亮青色",color_bright_white:"亮白色",font_placeholder:"选择字体",theme_placeholder:"选择主题样式",icon_placeholder:"粘贴图标或输入名称搜索...",icon_description:"输入图标字符、粘贴图标或搜索图标(可选)",text_placeholder:"例如: {{workDirName}}",script_placeholder:"例如: /path/to/your/script.js",drag_hint:"拖拽组件到此处进行配置",select_hint:"选择一个组件进行配置",no_icons_found:"未找到图标",no_icons_available:"暂无可用图标",import_export:"导入/导出",import:"导入配置",export:"导出配置",download_template:"下载模板",import_export_help:"导出当前配置为JSON文件,或从JSON文件导入配置。您也可以下载配置模板作为参考。",export_success:"配置导出成功",export_failed:"配置导出失败",import_success:"配置导入成功",import_failed:"配置导入失败",invalid_config:"无效的配置文件",template_download_success:"模板下载成功",template_download_success_desc:"配置模板已下载到您的设备",template_download_failed:"模板下载失败"},dE={app:rE,login:lE,toplevel:iE,transformers:oE,providers:sE,router:uE,json_editor:cE,statusline:fE},hE={en:{translation:aE},zh:{translation:dE}};Kt.use(a0).use(OS).init({resources:hE,fallbackLng:"en",interpolation:{escapeValue:!1}});var ed={exports:{}},ao={},td={exports:{}},nd={};/**
|
|
24
24
|
* @license React
|
|
25
25
|
* scheduler.production.js
|
|
26
26
|
*
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
*
|
|
29
29
|
* This source code is licensed under the MIT license found in the
|
|
30
30
|
* LICENSE file in the root directory of this source tree.
|
|
31
|
-
*/var
|
|
31
|
+
*/var Dv;function mE(){return Dv||(Dv=1,function(n){function a(A,Q){var V=A.length;A.push(Q);e:for(;0<V;){var ve=V-1>>>1,O=A[ve];if(0<s(O,Q))A[ve]=Q,A[V]=O,V=ve;else break e}}function l(A){return A.length===0?null:A[0]}function i(A){if(A.length===0)return null;var Q=A[0],V=A.pop();if(V!==Q){A[0]=V;e:for(var ve=0,O=A.length,F=O>>>1;ve<F;){var U=2*(ve+1)-1,K=A[U],ae=U+1,de=A[ae];if(0>s(K,V))ae<O&&0>s(de,K)?(A[ve]=de,A[ae]=V,ve=ae):(A[ve]=K,A[U]=V,ve=U);else if(ae<O&&0>s(de,V))A[ve]=de,A[ae]=V,ve=ae;else break e}}return Q}function s(A,Q){var V=A.sortIndex-Q.sortIndex;return V!==0?V:A.id-Q.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;n.unstable_now=function(){return u.now()}}else{var f=Date,d=f.now();n.unstable_now=function(){return f.now()-d}}var p=[],m=[],v=1,b=null,w=3,S=!1,C=!1,_=!1,j=!1,N=typeof setTimeout=="function"?setTimeout:null,z=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function H(A){for(var Q=l(m);Q!==null;){if(Q.callback===null)i(m);else if(Q.startTime<=A)i(m),Q.sortIndex=Q.expirationTime,a(p,Q);else break;Q=l(m)}}function D(A){if(_=!1,H(A),!C)if(l(p)!==null)C=!0,R||(R=!0,J());else{var Q=l(m);Q!==null&&ue(D,Q.startTime-A)}}var R=!1,B=-1,Z=5,ne=-1;function oe(){return j?!0:!(n.unstable_now()-ne<Z)}function le(){if(j=!1,R){var A=n.unstable_now();ne=A;var Q=!0;try{e:{C=!1,_&&(_=!1,z(B),B=-1),S=!0;var V=w;try{t:{for(H(A),b=l(p);b!==null&&!(b.expirationTime>A&&oe());){var ve=b.callback;if(typeof ve=="function"){b.callback=null,w=b.priorityLevel;var O=ve(b.expirationTime<=A);if(A=n.unstable_now(),typeof O=="function"){b.callback=O,H(A),Q=!0;break t}b===l(p)&&i(p),H(A)}else i(p);b=l(p)}if(b!==null)Q=!0;else{var F=l(m);F!==null&&ue(D,F.startTime-A),Q=!1}}break e}finally{b=null,w=V,S=!1}Q=void 0}}finally{Q?J():R=!1}}}var J;if(typeof k=="function")J=function(){k(le)};else if(typeof MessageChannel<"u"){var te=new MessageChannel,W=te.port2;te.port1.onmessage=le,J=function(){W.postMessage(null)}}else J=function(){N(le,0)};function ue(A,Q){B=N(function(){A(n.unstable_now())},Q)}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(A){A.callback=null},n.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Z=0<A?Math.floor(1e3/A):5},n.unstable_getCurrentPriorityLevel=function(){return w},n.unstable_next=function(A){switch(w){case 1:case 2:case 3:var Q=3;break;default:Q=w}var V=w;w=Q;try{return A()}finally{w=V}},n.unstable_requestPaint=function(){j=!0},n.unstable_runWithPriority=function(A,Q){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var V=w;w=A;try{return Q()}finally{w=V}},n.unstable_scheduleCallback=function(A,Q,V){var ve=n.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?ve+V:ve):V=ve,A){case 1:var O=-1;break;case 2:O=250;break;case 5:O=1073741823;break;case 4:O=1e4;break;default:O=5e3}return O=V+O,A={id:v++,callback:Q,priorityLevel:A,startTime:V,expirationTime:O,sortIndex:-1},V>ve?(A.sortIndex=V,a(m,A),l(p)===null&&A===l(m)&&(_?(z(B),B=-1):_=!0,ue(D,V-ve))):(A.sortIndex=O,a(p,A),C||S||(C=!0,R||(R=!0,J()))),A},n.unstable_shouldYield=oe,n.unstable_wrapCallback=function(A){var Q=w;return function(){var V=w;w=Q;try{return A.apply(this,arguments)}finally{w=V}}}}(nd)),nd}var Lv;function pE(){return Lv||(Lv=1,td.exports=mE()),td.exports}var ad={exports:{}},Ft={};/**
|
|
32
32
|
* @license React
|
|
33
33
|
* react-dom.production.js
|
|
34
34
|
*
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
*
|
|
37
37
|
* This source code is licensed under the MIT license found in the
|
|
38
38
|
* LICENSE file in the root directory of this source tree.
|
|
39
|
-
*/var
|
|
39
|
+
*/var kv;function gE(){if(kv)return Ft;kv=1;var n=Wd();function a(p){var m="https://react.dev/errors/"+p;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)m+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+p+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(){}var i={d:{f:l,r:function(){throw Error(a(522))},D:l,C:l,L:l,m:l,X:l,S:l,M:l},p:0,findDOMNode:null},s=Symbol.for("react.portal");function u(p,m,v){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:b==null?null:""+b,children:p,containerInfo:m,implementation:v}}var f=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(p,m){if(p==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return Ft.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,Ft.createPortal=function(p,m){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(a(299));return u(p,m,null,v)},Ft.flushSync=function(p){var m=f.T,v=i.p;try{if(f.T=null,i.p=2,p)return p()}finally{f.T=m,i.p=v,i.d.f()}},Ft.preconnect=function(p,m){typeof p=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,i.d.C(p,m))},Ft.prefetchDNS=function(p){typeof p=="string"&&i.d.D(p)},Ft.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var v=m.as,b=d(v,m.crossOrigin),w=typeof m.integrity=="string"?m.integrity:void 0,S=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;v==="style"?i.d.S(p,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:b,integrity:w,fetchPriority:S}):v==="script"&&i.d.X(p,{crossOrigin:b,integrity:w,fetchPriority:S,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Ft.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var v=d(m.as,m.crossOrigin);i.d.M(p,{crossOrigin:v,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&i.d.M(p)},Ft.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var v=m.as,b=d(v,m.crossOrigin);i.d.L(p,v,{crossOrigin:b,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})}},Ft.preloadModule=function(p,m){if(typeof p=="string")if(m){var v=d(m.as,m.crossOrigin);i.d.m(p,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:v,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else i.d.m(p)},Ft.requestFormReset=function(p){i.d.r(p)},Ft.unstable_batchedUpdates=function(p,m){return p(m)},Ft.useFormState=function(p,m,v){return f.H.useFormState(p,m,v)},Ft.useFormStatus=function(){return f.H.useHostTransitionStatus()},Ft.version="19.1.1",Ft}var zv;function r0(){if(zv)return ad.exports;zv=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),ad.exports=gE(),ad.exports}/**
|
|
40
40
|
* @license React
|
|
41
41
|
* react-dom-client.production.js
|
|
42
42
|
*
|
|
@@ -44,16 +44,16 @@
|
|
|
44
44
|
*
|
|
45
45
|
* This source code is licensed under the MIT license found in the
|
|
46
46
|
* LICENSE file in the root directory of this source tree.
|
|
47
|
-
*/var Pv;function yE(){if(Pv)return ao;Pv=1;var n=gE(),a=eh(),l=i0();function i(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r])}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 s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function u(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function f(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function d(e){if(u(e)!==e)throw Error(i(188))}function p(e){var t=e.alternate;if(!t){if(t=u(e),t===null)throw Error(i(188));return t!==e?null:e}for(var r=e,o=t;;){var c=r.return;if(c===null)break;var h=c.alternate;if(h===null){if(o=c.return,o!==null){r=o;continue}break}if(c.child===h.child){for(h=c.child;h;){if(h===r)return d(c),e;if(h===o)return d(c),t;h=h.sibling}throw Error(i(188))}if(r.return!==o.return)r=c,o=h;else{for(var x=!1,E=c.child;E;){if(E===r){x=!0,r=c,o=h;break}if(E===o){x=!0,o=c,r=h;break}E=E.sibling}if(!x){for(E=h.child;E;){if(E===r){x=!0,r=h,o=c;break}if(E===o){x=!0,o=h,r=c;break}E=E.sibling}if(!x)throw Error(i(189))}}if(r.alternate!==o)throw Error(i(190))}if(r.tag!==3)throw Error(i(188));return r.stateNode.current===r?e:t}function m(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=m(e),t!==null)return t;e=e.sibling}return null}var v=Object.assign,b=Symbol.for("react.element"),S=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),N=Symbol.for("react.provider"),U=Symbol.for("react.consumer"),z=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),Z=Symbol.for("react.lazy"),J=Symbol.for("react.activity"),ne=Symbol.for("react.memo_cache_sentinel"),Se=Symbol.iterator;function de(e){return e===null||typeof e!="object"?null:(e=Se&&e[Se]||e["@@iterator"],typeof e=="function"?e:null)}var oe=Symbol.for("react.client.reference");function fe(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===oe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case _:return"Fragment";case j:return"Profiler";case C:return"StrictMode";case T:return"Suspense";case R:return"SuspenseList";case J:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case w:return"Portal";case z:return(e.displayName||"Context")+".Provider";case U:return(e._context.displayName||"Context")+".Consumer";case D:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case H:return t=e.displayName||null,t!==null?t:fe(e.type)||"Memo";case Z:t=e._payload,e=e._init;try{return fe(e(t))}catch{}}return null}var he=Array.isArray,L=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V={pending:!1,data:null,method:null,action:null},ge=[],O=-1;function K(e){return{current:e}}function P(e){0>O||(e.current=ge[O],ge[O]=null,O--)}function G(e,t){O++,ge[O]=e.current,e.current=t}var ee=K(null),se=K(null),pe=K(null),ve=K(null);function ze(e,t){switch(G(pe,t),G(se,e),G(ee,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Pg(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Pg(t),e=Hg(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}P(ee),G(ee,e)}function Ze(){P(ee),P(se),P(pe)}function Ae(e){e.memoizedState!==null&&G(ve,e);var t=ee.current,r=Hg(t,e.type);t!==r&&(G(se,e),G(ee,r))}function le(e){se.current===e&&(P(ee),P(se)),ve.current===e&&(P(ve),Zi._currentValue=V)}var ae=Object.prototype.hasOwnProperty,ue=n.unstable_scheduleCallback,ce=n.unstable_cancelCallback,je=n.unstable_shouldYield,Pe=n.unstable_requestPaint,Me=n.unstable_now,ut=n.unstable_getCurrentPriorityLevel,Rn=n.unstable_ImmediatePriority,Ir=n.unstable_UserBlockingPriority,Jr=n.unstable_NormalPriority,ea=n.unstable_LowPriority,Ra=n.unstable_IdlePriority,Oo=n.log,ii=n.unstable_setDisableYieldValue,Ft=null,pt=null;function jn(e){if(typeof Oo=="function"&&ii(e),pt&&typeof pt.setStrictMode=="function")try{pt.setStrictMode(Ft,e)}catch{}}var zt=Math.clz32?Math.clz32:Ao,Xu=Math.log,Un=Math.LN2;function Ao(e){return e>>>=0,e===0?32:31-(Xu(e)/Un|0)|0}var mr=256,pr=4194304;function ta(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:case 262144:case 524288:case 1048576:case 2097152:return e&4194048;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 gr(e,t,r){var o=e.pendingLanes;if(o===0)return 0;var c=0,h=e.suspendedLanes,x=e.pingedLanes;e=e.warmLanes;var E=o&134217727;return E!==0?(o=E&~h,o!==0?c=ta(o):(x&=E,x!==0?c=ta(x):r||(r=E&~e,r!==0&&(c=ta(r))))):(E=o&~h,E!==0?c=ta(E):x!==0?c=ta(x):r||(r=o&~e,r!==0&&(c=ta(r)))),c===0?0:t!==0&&t!==c&&(t&h)===0&&(h=c&-c,r=t&-t,h>=r||h===32&&(r&4194048)!==0)?t:c}function Pn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function To(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 Wr(){var e=mr;return mr<<=1,(mr&4194048)===0&&(mr=256),e}function Mo(){var e=pr;return pr<<=1,(pr&62914560)===0&&(pr=4194304),e}function el(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function vr(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Do(e,t,r,o,c,h){var x=e.pendingLanes;e.pendingLanes=r,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=r,e.entangledLanes&=r,e.errorRecoveryDisabledLanes&=r,e.shellSuspendCounter=0;var E=e.entanglements,A=e.expirationTimes,q=e.hiddenUpdates;for(r=x&~r;0<r;){var W=31-zt(r),re=1<<W;E[W]=0,A[W]=-1;var F=q[W];if(F!==null)for(q[W]=null,W=0;W<F.length;W++){var X=F[W];X!==null&&(X.lane&=-536870913)}r&=~re}o!==0&&yr(e,o,0),h!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=h&~(x&~t))}function yr(e,t,r){e.pendingLanes|=t,e.suspendedLanes&=~t;var o=31-zt(t);e.entangledLanes|=t,e.entanglements[o]=e.entanglements[o]|1073741824|r&4194090}function br(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var o=31-zt(r),c=1<<o;c&t|e[o]&t&&(e[o]|=t),r&=~c}}function oi(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 si(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function M(){var e=I.p;return e!==0?e:(e=window.event,e===void 0?32:rv(e.type))}function $(e,t){var r=I.p;try{return I.p=e,t()}finally{I.p=r}}var Q=Math.random().toString(36).slice(2),ie="__reactFiber$"+Q,me="__reactProps$"+Q,we="__reactContainer$"+Q,_e="__reactEvents$"+Q,Ee="__reactListeners$"+Q,Oe="__reactHandles$"+Q,De="__reactResources$"+Q,Ce="__reactMarker$"+Q;function Ne(e){delete e[ie],delete e[me],delete e[_e],delete e[Ee],delete e[Oe]}function Ve(e){var t=e[ie];if(t)return t;for(var r=e.parentNode;r;){if(t=r[we]||r[ie]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Yg(e);e!==null;){if(r=e[ie])return r;e=Yg(e)}return t}e=r,r=e.parentNode}return null}function tt(e){if(e=e[ie]||e[we]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function bt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function xt(e){var t=e[De];return t||(t=e[De]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Be(e){e[Ce]=!0}var lt=new Set,Hn={};function en(e,t){qt(e,t),qt(e+"Capture",t)}function qt(e,t){for(Hn[e]=t,e=0;e<t.length;e++)lt.add(t[e])}var mn=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]*$"),tl={},ja={};function na(e){return ae.call(ja,e)?!0:ae.call(tl,e)?!1:mn.test(e)?ja[e]=!0:(tl[e]=!0,!1)}function aa(e,t,r){if(na(t))if(r===null)e.removeAttribute(t);else{switch(typeof r){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var o=t.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+r)}}function ra(e,t,r){if(r===null)e.removeAttribute(t);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+r)}}function Ke(e,t,r,o){if(o===null)e.removeAttribute(r);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(r);return}e.setAttributeNS(t,r,""+o)}}var Nt,xr;function pn(e){if(Nt===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);Nt=t&&t[1]||"",xr=-1<r.stack.indexOf(`
|
|
47
|
+
*/var Uv;function vE(){if(Uv)return ao;Uv=1;var n=pE(),a=Wd(),l=r0();function i(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r])}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 s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function u(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function f(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function d(e){if(u(e)!==e)throw Error(i(188))}function p(e){var t=e.alternate;if(!t){if(t=u(e),t===null)throw Error(i(188));return t!==e?null:e}for(var r=e,o=t;;){var c=r.return;if(c===null)break;var h=c.alternate;if(h===null){if(o=c.return,o!==null){r=o;continue}break}if(c.child===h.child){for(h=c.child;h;){if(h===r)return d(c),e;if(h===o)return d(c),t;h=h.sibling}throw Error(i(188))}if(r.return!==o.return)r=c,o=h;else{for(var x=!1,E=c.child;E;){if(E===r){x=!0,r=c,o=h;break}if(E===o){x=!0,o=c,r=h;break}E=E.sibling}if(!x){for(E=h.child;E;){if(E===r){x=!0,r=h,o=c;break}if(E===o){x=!0,o=h,r=c;break}E=E.sibling}if(!x)throw Error(i(189))}}if(r.alternate!==o)throw Error(i(190))}if(r.tag!==3)throw Error(i(188));return r.stateNode.current===r?e:t}function m(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=m(e),t!==null)return t;e=e.sibling}return null}var v=Object.assign,b=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),N=Symbol.for("react.provider"),z=Symbol.for("react.consumer"),k=Symbol.for("react.context"),H=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),B=Symbol.for("react.memo"),Z=Symbol.for("react.lazy"),ne=Symbol.for("react.activity"),oe=Symbol.for("react.memo_cache_sentinel"),le=Symbol.iterator;function J(e){return e===null||typeof e!="object"?null:(e=le&&e[le]||e["@@iterator"],typeof e=="function"?e:null)}var te=Symbol.for("react.client.reference");function W(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===te?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case C:return"Fragment";case j:return"Profiler";case _:return"StrictMode";case D:return"Suspense";case R:return"SuspenseList";case ne:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case S:return"Portal";case k:return(e.displayName||"Context")+".Provider";case z:return(e._context.displayName||"Context")+".Consumer";case H:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case B:return t=e.displayName||null,t!==null?t:W(e.type)||"Memo";case Z:t=e._payload,e=e._init;try{return W(e(t))}catch{}}return null}var ue=Array.isArray,A=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V={pending:!1,data:null,method:null,action:null},ve=[],O=-1;function F(e){return{current:e}}function U(e){0>O||(e.current=ve[O],ve[O]=null,O--)}function K(e,t){O++,ve[O]=e.current,e.current=t}var ae=F(null),de=F(null),ge=F(null),ye=F(null);function Le(e,t){switch(K(ge,t),K(de,e),K(ae,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Ug(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Ug(t),e=Pg(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}U(ae),K(ae,e)}function qe(){U(ae),U(de),U(ge)}function Je(e){e.memoizedState!==null&&K(ye,e);var t=ae.current,r=Pg(t,e.type);t!==r&&(K(de,e),K(ae,r))}function At(e){de.current===e&&(U(ae),U(de)),ye.current===e&&(U(ye),Zi._currentValue=V)}var Ze=Object.prototype.hasOwnProperty,an=n.unstable_scheduleCallback,ie=n.unstable_cancelCallback,fe=n.unstable_shouldYield,pe=n.unstable_requestPaint,he=n.unstable_now,je=n.unstable_getCurrentPriorityLevel,ke=n.unstable_ImmediatePriority,Pe=n.unstable_UserBlockingPriority,nt=n.unstable_NormalPriority,Yt=n.unstable_LowPriority,Bn=n.unstable_IdlePriority,Oo=n.log,ii=n.unstable_setDisableYieldValue,Zt=null,vt=null;function Tn(e){if(typeof Oo=="function"&&ii(e),vt&&typeof vt.setStrictMode=="function")try{vt.setStrictMode(Zt,e)}catch{}}var Pt=Math.clz32?Math.clz32:Ao,Ku=Math.log,$n=Math.LN2;function Ao(e){return e>>>=0,e===0?32:31-(Ku(e)/$n|0)|0}var gr=256,vr=4194304;function ra(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:case 262144:case 524288:case 1048576:case 2097152:return e&4194048;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 yr(e,t,r){var o=e.pendingLanes;if(o===0)return 0;var c=0,h=e.suspendedLanes,x=e.pingedLanes;e=e.warmLanes;var E=o&134217727;return E!==0?(o=E&~h,o!==0?c=ra(o):(x&=E,x!==0?c=ra(x):r||(r=E&~e,r!==0&&(c=ra(r))))):(E=o&~h,E!==0?c=ra(E):x!==0?c=ra(x):r||(r=o&~e,r!==0&&(c=ra(r)))),c===0?0:t!==0&&t!==c&&(t&h)===0&&(h=c&-c,r=t&-t,h>=r||h===32&&(r&4194048)!==0)?t:c}function Vn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function To(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 Wr(){var e=gr;return gr<<=1,(gr&4194048)===0&&(gr=256),e}function Mo(){var e=vr;return vr<<=1,(vr&62914560)===0&&(vr=4194304),e}function el(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function br(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Do(e,t,r,o,c,h){var x=e.pendingLanes;e.pendingLanes=r,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=r,e.entangledLanes&=r,e.errorRecoveryDisabledLanes&=r,e.shellSuspendCounter=0;var E=e.entanglements,T=e.expirationTimes,q=e.hiddenUpdates;for(r=x&~r;0<r;){var ee=31-Pt(r),se=1<<ee;E[ee]=0,T[ee]=-1;var G=q[ee];if(G!==null)for(q[ee]=null,ee=0;ee<G.length;ee++){var X=G[ee];X!==null&&(X.lane&=-536870913)}r&=~se}o!==0&&xr(e,o,0),h!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=h&~(x&~t))}function xr(e,t,r){e.pendingLanes|=t,e.suspendedLanes&=~t;var o=31-Pt(t);e.entangledLanes|=t,e.entanglements[o]=e.entanglements[o]|1073741824|r&4194090}function wr(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var o=31-Pt(r),c=1<<o;c&t|e[o]&t&&(e[o]|=t),r&=~c}}function oi(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 si(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function M(){var e=Q.p;return e!==0?e:(e=window.event,e===void 0?32:av(e.type))}function $(e,t){var r=Q.p;try{return Q.p=e,t()}finally{Q.p=r}}var I=Math.random().toString(36).slice(2),ce="__reactFiber$"+I,me="__reactProps$"+I,Se="__reactContainer$"+I,Ce="__reactEvents$"+I,Ee="__reactListeners$"+I,Oe="__reactHandles$"+I,Te="__reactResources$"+I,_e="__reactMarker$"+I;function Ne(e){delete e[ce],delete e[me],delete e[Ce],delete e[Ee],delete e[Oe]}function $e(e){var t=e[ce];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Se]||r[ce]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Vg(e);e!==null;){if(r=e[ce])return r;e=Vg(e)}return t}e=r,r=e.parentNode}return null}function at(e){if(e=e[ce]||e[Se]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function xt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function wt(e){var t=e[Te];return t||(t=e[Te]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function He(e){e[_e]=!0}var it=new Set,Yn={};function rn(e,t){Gt(e,t),Gt(e+"Capture",t)}function Gt(e,t){for(Yn[e]=t,e=0;e<t.length;e++)it.add(t[e])}var yn=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]*$"),tl={},Aa={};function la(e){return Ze.call(Aa,e)?!0:Ze.call(tl,e)?!1:yn.test(e)?Aa[e]=!0:(tl[e]=!0,!1)}function ia(e,t,r){if(la(t))if(r===null)e.removeAttribute(t);else{switch(typeof r){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var o=t.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+r)}}function oa(e,t,r){if(r===null)e.removeAttribute(t);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+r)}}function Fe(e,t,r,o){if(o===null)e.removeAttribute(r);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(r);return}e.setAttributeNS(t,r,""+o)}}var Rt,Sr;function bn(e){if(Rt===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);Rt=t&&t[1]||"",Sr=-1<r.stack.indexOf(`
|
|
48
48
|
at`)?" (<anonymous>)":-1<r.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
49
|
-
`+
|
|
49
|
+
`+Rt+e+Sr}var yt=!1;function Ta(e,t){if(!e||yt)return"";yt=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(t){var se=function(){throw Error()};if(Object.defineProperty(se.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(se,[])}catch(X){var G=X}Reflect.construct(e,[],se)}else{try{se.call()}catch(X){G=X}e.call(se.prototype)}}else{try{throw Error()}catch(X){G=X}(se=e())&&typeof se.catch=="function"&&se.catch(function(){})}}catch(X){if(X&&G&&typeof X.stack=="string")return[X.stack,G.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var h=o.DetermineComponentFrameRoot(),x=h[0],E=h[1];if(x&&E){var T=x.split(`
|
|
50
50
|
`),q=E.split(`
|
|
51
|
-
`);for(c=o=0;o<
|
|
52
|
-
`+
|
|
51
|
+
`);for(c=o=0;o<T.length&&!T[o].includes("DetermineComponentFrameRoot");)o++;for(;c<q.length&&!q[c].includes("DetermineComponentFrameRoot");)c++;if(o===T.length||c===q.length)for(o=T.length-1,c=q.length-1;1<=o&&0<=c&&T[o]!==q[c];)c--;for(;1<=o&&0<=c;o--,c--)if(T[o]!==q[c]){if(o!==1||c!==1)do if(o--,c--,0>c||T[o]!==q[c]){var ee=`
|
|
52
|
+
`+T[o].replace(" at new "," at ");return e.displayName&&ee.includes("<anonymous>")&&(ee=ee.replace("<anonymous>",e.displayName)),ee}while(1<=o&&0<=c);break}}}finally{yt=!1,Error.prepareStackTrace=r}return(r=e?e.displayName||e.name:"")?bn(r):""}function Lo(e){switch(e.tag){case 26:case 27:case 5:return bn(e.type);case 16:return bn("Lazy");case 13:return bn("Suspense");case 19:return bn("SuspenseList");case 0:case 15:return Ta(e.type,!1);case 11:return Ta(e.type.render,!1);case 1:return Ta(e.type,!0);case 31:return bn("Activity");default:return""}}function ko(e){try{var t="";do t+=Lo(e),e=e.return;while(e);return t}catch(r){return`
|
|
53
53
|
Error generating stack: `+r.message+`
|
|
54
|
-
`+r.stack}}function gn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Dh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Kx(e){var t=Dh(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),o=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var c=r.get,h=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(x){o=""+x,h.call(this,x)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return o},setValue:function(x){o=""+x},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function zo(e){e._valueTracker||(e._valueTracker=Kx(e))}function Lh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),o="";return e&&(o=Dh(e)?e.checked?"true":"false":e.value),e=o,e!==r?(t.setValue(e),!0):!1}function Uo(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 Gx=/[\n"\\]/g;function vn(e){return e.replace(Gx,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Qu(e,t,r,o,c,h,x,E){e.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.type=x:e.removeAttribute("type"),t!=null?x==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+gn(t)):e.value!==""+gn(t)&&(e.value=""+gn(t)):x!=="submit"&&x!=="reset"||e.removeAttribute("value"),t!=null?Zu(e,x,gn(t)):r!=null?Zu(e,x,gn(r)):o!=null&&e.removeAttribute("value"),c==null&&h!=null&&(e.defaultChecked=!!h),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?e.name=""+gn(E):e.removeAttribute("name")}function kh(e,t,r,o,c,h,x,E){if(h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.type=h),t!=null||r!=null){if(!(h!=="submit"&&h!=="reset"||t!=null))return;r=r!=null?""+gn(r):"",t=t!=null?""+gn(t):r,E||t===e.value||(e.value=t),e.defaultValue=t}o=o??c,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=E?e.checked:!!o,e.defaultChecked=!!o,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(e.name=x)}function Zu(e,t,r){t==="number"&&Uo(e.ownerDocument)===e||e.defaultValue===""+r||(e.defaultValue=""+r)}function nl(e,t,r,o){if(e=e.options,t){t={};for(var c=0;c<r.length;c++)t["$"+r[c]]=!0;for(r=0;r<e.length;r++)c=t.hasOwnProperty("$"+e[r].value),e[r].selected!==c&&(e[r].selected=c),c&&o&&(e[r].defaultSelected=!0)}else{for(r=""+gn(r),t=null,c=0;c<e.length;c++){if(e[c].value===r){e[c].selected=!0,o&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function zh(e,t,r){if(t!=null&&(t=""+gn(t),t!==e.value&&(e.value=t),r==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=r!=null?""+gn(r):""}function Uh(e,t,r,o){if(t==null){if(o!=null){if(r!=null)throw Error(i(92));if(he(o)){if(1<o.length)throw Error(i(93));o=o[0]}r=o}r==null&&(r=""),t=r}r=gn(t),e.defaultValue=r,o=e.textContent,o===r&&o!==""&&o!==null&&(e.value=o)}function al(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Fx=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 Ph(e,t,r){var o=t.indexOf("--")===0;r==null||typeof r=="boolean"||r===""?o?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":o?e.setProperty(t,r):typeof r!="number"||r===0||Fx.has(t)?t==="float"?e.cssFloat=r:e[t]=(""+r).trim():e[t]=r+"px"}function Hh(e,t,r){if(t!=null&&typeof t!="object")throw Error(i(62));if(e=e.style,r!=null){for(var o in r)!r.hasOwnProperty(o)||t!=null&&t.hasOwnProperty(o)||(o.indexOf("--")===0?e.setProperty(o,""):o==="float"?e.cssFloat="":e[o]="");for(var c in t)o=t[c],t.hasOwnProperty(c)&&r[c]!==o&&Ph(e,c,o)}else for(var h in t)t.hasOwnProperty(h)&&Ph(e,h,t[h])}function Iu(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 Xx=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"]]),Qx=/^[\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 Po(e){return Qx.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var Ju=null;function Wu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var rl=null,ll=null;function Bh(e){var t=tt(e);if(t&&(e=t.stateNode)){var r=e[me]||null;e:switch(e=t.stateNode,t.type){case"input":if(Qu(e,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll('input[name="'+vn(""+t)+'"][type="radio"]'),t=0;t<r.length;t++){var o=r[t];if(o!==e&&o.form===e.form){var c=o[me]||null;if(!c)throw Error(i(90));Qu(o,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(t=0;t<r.length;t++)o=r[t],o.form===e.form&&Lh(o)}break e;case"textarea":zh(e,r.value,r.defaultValue);break e;case"select":t=r.value,t!=null&&nl(e,!!r.multiple,t,!1)}}}var ec=!1;function $h(e,t,r){if(ec)return e(t,r);ec=!0;try{var o=e(t);return o}finally{if(ec=!1,(rl!==null||ll!==null)&&(Es(),rl&&(t=rl,e=ll,ll=rl=null,Bh(t),e)))for(t=0;t<e.length;t++)Bh(e[t])}}function ui(e,t){var r=e.stateNode;if(r===null)return null;var o=r[me]||null;if(o===null)return null;r=o[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":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(i(231,t,typeof r));return r}var la=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),tc=!1;if(la)try{var ci={};Object.defineProperty(ci,"passive",{get:function(){tc=!0}}),window.addEventListener("test",ci,ci),window.removeEventListener("test",ci,ci)}catch{tc=!1}var Aa=null,nc=null,Ho=null;function Vh(){if(Ho)return Ho;var e,t=nc,r=t.length,o,c="value"in Aa?Aa.value:Aa.textContent,h=c.length;for(e=0;e<r&&t[e]===c[e];e++);var x=r-e;for(o=1;o<=x&&t[r-o]===c[h-o];o++);return Ho=c.slice(e,1<o?1-o:void 0)}function Bo(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 $o(){return!0}function Yh(){return!1}function Xt(e){function t(r,o,c,h,x){this._reactName=r,this._targetInst=c,this.type=o,this.nativeEvent=h,this.target=x,this.currentTarget=null;for(var E in e)e.hasOwnProperty(E)&&(r=e[E],this[E]=r?r(h):h[E]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?$o:Yh,this.isPropagationStopped=Yh,this}return v(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=$o)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=$o)},persist:function(){},isPersistent:$o}),t}var wr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Vo=Xt(wr),fi=v({},wr,{view:0,detail:0}),Zx=Xt(fi),ac,rc,di,Yo=v({},fi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ic,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!==di&&(di&&e.type==="mousemove"?(ac=e.screenX-di.screenX,rc=e.screenY-di.screenY):rc=ac=0,di=e),ac)},movementY:function(e){return"movementY"in e?e.movementY:rc}}),qh=Xt(Yo),Ix=v({},Yo,{dataTransfer:0}),Jx=Xt(Ix),Wx=v({},fi,{relatedTarget:0}),lc=Xt(Wx),e1=v({},wr,{animationName:0,elapsedTime:0,pseudoElement:0}),t1=Xt(e1),n1=v({},wr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),a1=Xt(n1),r1=v({},wr,{data:0}),Kh=Xt(r1),l1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},i1={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"},o1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function s1(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=o1[e])?!!t[e]:!1}function ic(){return s1}var u1=v({},fi,{key:function(e){if(e.key){var t=l1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Bo(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?i1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ic,charCode:function(e){return e.type==="keypress"?Bo(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Bo(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),c1=Xt(u1),f1=v({},Yo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Gh=Xt(f1),d1=v({},fi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ic}),h1=Xt(d1),m1=v({},wr,{propertyName:0,elapsedTime:0,pseudoElement:0}),p1=Xt(m1),g1=v({},Yo,{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}),v1=Xt(g1),y1=v({},wr,{newState:0,oldState:0}),b1=Xt(y1),x1=[9,13,27,32],oc=la&&"CompositionEvent"in window,hi=null;la&&"documentMode"in document&&(hi=document.documentMode);var w1=la&&"TextEvent"in window&&!hi,Fh=la&&(!oc||hi&&8<hi&&11>=hi),Xh=" ",Qh=!1;function Zh(e,t){switch(e){case"keyup":return x1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ih(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var il=!1;function S1(e,t){switch(e){case"compositionend":return Ih(t);case"keypress":return t.which!==32?null:(Qh=!0,Xh);case"textInput":return e=t.data,e===Xh&&Qh?null:e;default:return null}}function E1(e,t){if(il)return e==="compositionend"||!oc&&Zh(e,t)?(e=Vh(),Ho=nc=Aa=null,il=!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 Fh&&t.locale!=="ko"?null:t.data;default:return null}}var C1={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 Jh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!C1[e.type]:t==="textarea"}function Wh(e,t,r,o){rl?ll?ll.push(o):ll=[o]:rl=o,t=Os(t,"onChange"),0<t.length&&(r=new Vo("onChange","change",null,r,o),e.push({event:r,listeners:t}))}var mi=null,pi=null;function _1(e){Dg(e,0)}function qo(e){var t=bt(e);if(Lh(t))return e}function em(e,t){if(e==="change")return t}var tm=!1;if(la){var sc;if(la){var uc="oninput"in document;if(!uc){var nm=document.createElement("div");nm.setAttribute("oninput","return;"),uc=typeof nm.oninput=="function"}sc=uc}else sc=!1;tm=sc&&(!document.documentMode||9<document.documentMode)}function am(){mi&&(mi.detachEvent("onpropertychange",rm),pi=mi=null)}function rm(e){if(e.propertyName==="value"&&qo(pi)){var t=[];Wh(t,pi,e,Wu(e)),$h(_1,t)}}function N1(e,t,r){e==="focusin"?(am(),mi=t,pi=r,mi.attachEvent("onpropertychange",rm)):e==="focusout"&&am()}function R1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return qo(pi)}function j1(e,t){if(e==="click")return qo(t)}function O1(e,t){if(e==="input"||e==="change")return qo(t)}function A1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var tn=typeof Object.is=="function"?Object.is:A1;function gi(e,t){if(tn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;for(o=0;o<r.length;o++){var c=r[o];if(!ae.call(t,c)||!tn(e[c],t[c]))return!1}return!0}function lm(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function im(e,t){var r=lm(e);e=0;for(var o;r;){if(r.nodeType===3){if(o=e+r.textContent.length,e<=t&&o>=t)return{node:r,offset:t-e};e=o}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=lm(r)}}function om(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?om(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function sm(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Uo(e.document);t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Uo(e.document)}return t}function cc(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 T1=la&&"documentMode"in document&&11>=document.documentMode,ol=null,fc=null,vi=null,dc=!1;function um(e,t,r){var o=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;dc||ol==null||ol!==Uo(o)||(o=ol,"selectionStart"in o&&cc(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),vi&&gi(vi,o)||(vi=o,o=Os(fc,"onSelect"),0<o.length&&(t=new Vo("onSelect","select",null,t,r),e.push({event:t,listeners:o}),t.target=ol)))}function Sr(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var sl={animationend:Sr("Animation","AnimationEnd"),animationiteration:Sr("Animation","AnimationIteration"),animationstart:Sr("Animation","AnimationStart"),transitionrun:Sr("Transition","TransitionRun"),transitionstart:Sr("Transition","TransitionStart"),transitioncancel:Sr("Transition","TransitionCancel"),transitionend:Sr("Transition","TransitionEnd")},hc={},cm={};la&&(cm=document.createElement("div").style,"AnimationEvent"in window||(delete sl.animationend.animation,delete sl.animationiteration.animation,delete sl.animationstart.animation),"TransitionEvent"in window||delete sl.transitionend.transition);function Er(e){if(hc[e])return hc[e];if(!sl[e])return e;var t=sl[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in cm)return hc[e]=t[r];return e}var fm=Er("animationend"),dm=Er("animationiteration"),hm=Er("animationstart"),M1=Er("transitionrun"),D1=Er("transitionstart"),L1=Er("transitioncancel"),mm=Er("transitionend"),pm=new Map,mc="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(" ");mc.push("scrollEnd");function On(e,t){pm.set(e,t),en(t,[e])}var gm=new WeakMap;function yn(e,t){if(typeof e=="object"&&e!==null){var r=gm.get(e);return r!==void 0?r:(t={value:e,source:t,stack:ko(t)},gm.set(e,t),t)}return{value:e,source:t,stack:ko(t)}}var bn=[],ul=0,pc=0;function Ko(){for(var e=ul,t=pc=ul=0;t<e;){var r=bn[t];bn[t++]=null;var o=bn[t];bn[t++]=null;var c=bn[t];bn[t++]=null;var h=bn[t];if(bn[t++]=null,o!==null&&c!==null){var x=o.pending;x===null?c.next=c:(c.next=x.next,x.next=c),o.pending=c}h!==0&&vm(r,c,h)}}function Go(e,t,r,o){bn[ul++]=e,bn[ul++]=t,bn[ul++]=r,bn[ul++]=o,pc|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function gc(e,t,r,o){return Go(e,t,r,o),Fo(e)}function cl(e,t){return Go(e,null,null,t),Fo(e)}function vm(e,t,r){e.lanes|=r;var o=e.alternate;o!==null&&(o.lanes|=r);for(var c=!1,h=e.return;h!==null;)h.childLanes|=r,o=h.alternate,o!==null&&(o.childLanes|=r),h.tag===22&&(e=h.stateNode,e===null||e._visibility&1||(c=!0)),e=h,h=h.return;return e.tag===3?(h=e.stateNode,c&&t!==null&&(c=31-zt(r),e=h.hiddenUpdates,o=e[c],o===null?e[c]=[t]:o.push(t),t.lane=r|536870912),h):null}function Fo(e){if(50<Vi)throw Vi=0,Ef=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var fl={};function k1(e,t,r,o){this.tag=e,this.key=r,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=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function nn(e,t,r,o){return new k1(e,t,r,o)}function vc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ia(e,t){var r=e.alternate;return r===null?(r=nn(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&65011712,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r.refCleanup=e.refCleanup,r}function ym(e,t){e.flags&=65011714;var r=e.alternate;return r===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=r.childLanes,e.lanes=r.lanes,e.child=r.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=r.memoizedProps,e.memoizedState=r.memoizedState,e.updateQueue=r.updateQueue,e.type=r.type,t=r.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Xo(e,t,r,o,c,h){var x=0;if(o=e,typeof e=="function")vc(e)&&(x=1);else if(typeof e=="string")x=Uw(e,r,ee.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case J:return e=nn(31,r,t,c),e.elementType=J,e.lanes=h,e;case _:return Cr(r.children,c,h,t);case C:x=8,c|=24;break;case j:return e=nn(12,r,t,c|2),e.elementType=j,e.lanes=h,e;case T:return e=nn(13,r,t,c),e.elementType=T,e.lanes=h,e;case R:return e=nn(19,r,t,c),e.elementType=R,e.lanes=h,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case N:case z:x=10;break e;case U:x=9;break e;case D:x=11;break e;case H:x=14;break e;case Z:x=16,o=null;break e}x=29,r=Error(i(130,e===null?"null":typeof e,"")),o=null}return t=nn(x,r,t,c),t.elementType=e,t.type=o,t.lanes=h,t}function Cr(e,t,r,o){return e=nn(7,e,o,t),e.lanes=r,e}function yc(e,t,r){return e=nn(6,e,null,t),e.lanes=r,e}function bc(e,t,r){return t=nn(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var dl=[],hl=0,Qo=null,Zo=0,xn=[],wn=0,_r=null,oa=1,sa="";function Nr(e,t){dl[hl++]=Zo,dl[hl++]=Qo,Qo=e,Zo=t}function bm(e,t,r){xn[wn++]=oa,xn[wn++]=sa,xn[wn++]=_r,_r=e;var o=oa;e=sa;var c=32-zt(o)-1;o&=~(1<<c),r+=1;var h=32-zt(t)+c;if(30<h){var x=c-c%5;h=(o&(1<<x)-1).toString(32),o>>=x,c-=x,oa=1<<32-zt(t)+c|r<<c|o,sa=h+e}else oa=1<<h|r<<c|o,sa=e}function xc(e){e.return!==null&&(Nr(e,1),bm(e,1,0))}function wc(e){for(;e===Qo;)Qo=dl[--hl],dl[hl]=null,Zo=dl[--hl],dl[hl]=null;for(;e===_r;)_r=xn[--wn],xn[wn]=null,sa=xn[--wn],xn[wn]=null,oa=xn[--wn],xn[wn]=null}var Kt=null,wt=null,et=!1,Rr=null,Bn=!1,Sc=Error(i(519));function jr(e){var t=Error(i(418,""));throw xi(yn(t,e)),Sc}function xm(e){var t=e.stateNode,r=e.type,o=e.memoizedProps;switch(t[ie]=e,t[me]=o,r){case"dialog":Qe("cancel",t),Qe("close",t);break;case"iframe":case"object":case"embed":Qe("load",t);break;case"video":case"audio":for(r=0;r<qi.length;r++)Qe(qi[r],t);break;case"source":Qe("error",t);break;case"img":case"image":case"link":Qe("error",t),Qe("load",t);break;case"details":Qe("toggle",t);break;case"input":Qe("invalid",t),kh(t,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0),zo(t);break;case"select":Qe("invalid",t);break;case"textarea":Qe("invalid",t),Uh(t,o.value,o.defaultValue,o.children),zo(t)}r=o.children,typeof r!="string"&&typeof r!="number"&&typeof r!="bigint"||t.textContent===""+r||o.suppressHydrationWarning===!0||Ug(t.textContent,r)?(o.popover!=null&&(Qe("beforetoggle",t),Qe("toggle",t)),o.onScroll!=null&&Qe("scroll",t),o.onScrollEnd!=null&&Qe("scrollend",t),o.onClick!=null&&(t.onclick=As),t=!0):t=!1,t||jr(e)}function wm(e){for(Kt=e.return;Kt;)switch(Kt.tag){case 5:case 13:Bn=!1;return;case 27:case 3:Bn=!0;return;default:Kt=Kt.return}}function yi(e){if(e!==Kt)return!1;if(!et)return wm(e),et=!0,!1;var t=e.tag,r;if((r=t!==3&&t!==27)&&((r=t===5)&&(r=e.type,r=!(r!=="form"&&r!=="button")||Hf(e.type,e.memoizedProps)),r=!r),r&&wt&&jr(e),wm(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8)if(r=e.data,r==="/$"){if(t===0){wt=Tn(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++;e=e.nextSibling}wt=null}}else t===27?(t=wt,Ga(e.type)?(e=Yf,Yf=null,wt=e):wt=t):wt=Kt?Tn(e.stateNode.nextSibling):null;return!0}function bi(){wt=Kt=null,et=!1}function Sm(){var e=Rr;return e!==null&&(It===null?It=e:It.push.apply(It,e),Rr=null),e}function xi(e){Rr===null?Rr=[e]:Rr.push(e)}var Ec=K(null),Or=null,ua=null;function Ta(e,t,r){G(Ec,t._currentValue),t._currentValue=r}function ca(e){e._currentValue=Ec.current,P(Ec)}function Cc(e,t,r){for(;e!==null;){var o=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,o!==null&&(o.childLanes|=t)):o!==null&&(o.childLanes&t)!==t&&(o.childLanes|=t),e===r)break;e=e.return}}function _c(e,t,r,o){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var h=c.dependencies;if(h!==null){var x=c.child;h=h.firstContext;e:for(;h!==null;){var E=h;h=c;for(var A=0;A<t.length;A++)if(E.context===t[A]){h.lanes|=r,E=h.alternate,E!==null&&(E.lanes|=r),Cc(h.return,r,e),o||(x=null);break e}h=E.next}}else if(c.tag===18){if(x=c.return,x===null)throw Error(i(341));x.lanes|=r,h=x.alternate,h!==null&&(h.lanes|=r),Cc(x,r,e),x=null}else x=c.child;if(x!==null)x.return=c;else for(x=c;x!==null;){if(x===e){x=null;break}if(c=x.sibling,c!==null){c.return=x.return,x=c;break}x=x.return}c=x}}function wi(e,t,r,o){e=null;for(var c=t,h=!1;c!==null;){if(!h){if((c.flags&524288)!==0)h=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var x=c.alternate;if(x===null)throw Error(i(387));if(x=x.memoizedProps,x!==null){var E=c.type;tn(c.pendingProps.value,x.value)||(e!==null?e.push(E):e=[E])}}else if(c===ve.current){if(x=c.alternate,x===null)throw Error(i(387));x.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(Zi):e=[Zi])}c=c.return}e!==null&&_c(t,e,r,o),t.flags|=262144}function Io(e){for(e=e.firstContext;e!==null;){if(!tn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ar(e){Or=e,ua=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function $t(e){return Em(Or,e)}function Jo(e,t){return Or===null&&Ar(e),Em(e,t)}function Em(e,t){var r=t._currentValue;if(t={context:t,memoizedValue:r,next:null},ua===null){if(e===null)throw Error(i(308));ua=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ua=ua.next=t;return r}var z1=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(r,o){e.push(o)}};this.abort=function(){t.aborted=!0,e.forEach(function(r){return r()})}},U1=n.unstable_scheduleCallback,P1=n.unstable_NormalPriority,Ot={$$typeof:z,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Nc(){return{controller:new z1,data:new Map,refCount:0}}function Si(e){e.refCount--,e.refCount===0&&U1(P1,function(){e.controller.abort()})}var Ei=null,Rc=0,ml=0,pl=null;function H1(e,t){if(Ei===null){var r=Ei=[];Rc=0,ml=Af(),pl={status:"pending",value:void 0,then:function(o){r.push(o)}}}return Rc++,t.then(Cm,Cm),t}function Cm(){if(--Rc===0&&Ei!==null){pl!==null&&(pl.status="fulfilled");var e=Ei;Ei=null,ml=0,pl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function B1(e,t){var r=[],o={status:"pending",value:null,reason:null,then:function(c){r.push(c)}};return e.then(function(){o.status="fulfilled",o.value=t;for(var c=0;c<r.length;c++)(0,r[c])(t)},function(c){for(o.status="rejected",o.reason=c,c=0;c<r.length;c++)(0,r[c])(void 0)}),o}var _m=L.S;L.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&H1(e,t),_m!==null&&_m(e,t)};var Tr=K(null);function jc(){var e=Tr.current;return e!==null?e:ft.pooledCache}function Wo(e,t){t===null?G(Tr,Tr.current):G(Tr,t.pool)}function Nm(){var e=jc();return e===null?null:{parent:Ot._currentValue,pool:e}}var Ci=Error(i(460)),Rm=Error(i(474)),es=Error(i(542)),Oc={then:function(){}};function jm(e){return e=e.status,e==="fulfilled"||e==="rejected"}function ts(){}function Om(e,t,r){switch(r=e[r],r===void 0?e.push(t):r!==t&&(t.then(ts,ts),t=r),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Tm(e),e;default:if(typeof t.status=="string")t.then(ts,ts);else{if(e=ft,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status="pending",e.then(function(o){if(t.status==="pending"){var c=t;c.status="fulfilled",c.value=o}},function(o){if(t.status==="pending"){var c=t;c.status="rejected",c.reason=o}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Tm(e),e}throw _i=t,Ci}}var _i=null;function Am(){if(_i===null)throw Error(i(459));var e=_i;return _i=null,e}function Tm(e){if(e===Ci||e===es)throw Error(i(483))}var Ma=!1;function Ac(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Tc(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 Da(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function La(e,t,r){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(nt&2)!==0){var c=o.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),o.pending=t,t=Fo(e),vm(e,null,r),t}return Go(e,o,t,r),Fo(e)}function Ni(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194048)!==0)){var o=t.lanes;o&=e.pendingLanes,r|=o,t.lanes=r,br(e,r)}}function Mc(e,t){var r=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,r===o)){var c=null,h=null;if(r=r.firstBaseUpdate,r!==null){do{var x={lane:r.lane,tag:r.tag,payload:r.payload,callback:null,next:null};h===null?c=h=x:h=h.next=x,r=r.next}while(r!==null);h===null?c=h=t:h=h.next=t}else c=h=t;r={baseState:o.baseState,firstBaseUpdate:c,lastBaseUpdate:h,shared:o.shared,callbacks:o.callbacks},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}var Dc=!1;function Ri(){if(Dc){var e=pl;if(e!==null)throw e}}function ji(e,t,r,o){Dc=!1;var c=e.updateQueue;Ma=!1;var h=c.firstBaseUpdate,x=c.lastBaseUpdate,E=c.shared.pending;if(E!==null){c.shared.pending=null;var A=E,q=A.next;A.next=null,x===null?h=q:x.next=q,x=A;var W=e.alternate;W!==null&&(W=W.updateQueue,E=W.lastBaseUpdate,E!==x&&(E===null?W.firstBaseUpdate=q:E.next=q,W.lastBaseUpdate=A))}if(h!==null){var re=c.baseState;x=0,W=q=A=null,E=h;do{var F=E.lane&-536870913,X=F!==E.lane;if(X?(Ie&F)===F:(o&F)===F){F!==0&&F===ml&&(Dc=!0),W!==null&&(W=W.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var Ue=e,Le=E;F=t;var st=r;switch(Le.tag){case 1:if(Ue=Le.payload,typeof Ue=="function"){re=Ue.call(st,re,F);break e}re=Ue;break e;case 3:Ue.flags=Ue.flags&-65537|128;case 0:if(Ue=Le.payload,F=typeof Ue=="function"?Ue.call(st,re,F):Ue,F==null)break e;re=v({},re,F);break e;case 2:Ma=!0}}F=E.callback,F!==null&&(e.flags|=64,X&&(e.flags|=8192),X=c.callbacks,X===null?c.callbacks=[F]:X.push(F))}else X={lane:F,tag:E.tag,payload:E.payload,callback:E.callback,next:null},W===null?(q=W=X,A=re):W=W.next=X,x|=F;if(E=E.next,E===null){if(E=c.shared.pending,E===null)break;X=E,E=X.next,X.next=null,c.lastBaseUpdate=X,c.shared.pending=null}}while(!0);W===null&&(A=re),c.baseState=A,c.firstBaseUpdate=q,c.lastBaseUpdate=W,h===null&&(c.shared.lanes=0),Va|=x,e.lanes=x,e.memoizedState=re}}function Mm(e,t){if(typeof e!="function")throw Error(i(191,e));e.call(t)}function Dm(e,t){var r=e.callbacks;if(r!==null)for(e.callbacks=null,e=0;e<r.length;e++)Mm(r[e],t)}var gl=K(null),ns=K(0);function Lm(e,t){e=va,G(ns,e),G(gl,t),va=e|t.baseLanes}function Lc(){G(ns,va),G(gl,gl.current)}function kc(){va=ns.current,P(gl),P(ns)}var ka=0,Ye=null,it=null,Rt=null,as=!1,vl=!1,Mr=!1,rs=0,Oi=0,yl=null,$1=0;function Ct(){throw Error(i(321))}function zc(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!tn(e[r],t[r]))return!1;return!0}function Uc(e,t,r,o,c,h){return ka=h,Ye=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,L.H=e===null||e.memoizedState===null?vp:yp,Mr=!1,h=r(o,c),Mr=!1,vl&&(h=zm(t,r,o,c)),km(e),h}function km(e){L.H=cs;var t=it!==null&&it.next!==null;if(ka=0,Rt=it=Ye=null,as=!1,Oi=0,yl=null,t)throw Error(i(300));e===null||Mt||(e=e.dependencies,e!==null&&Io(e)&&(Mt=!0))}function zm(e,t,r,o){Ye=e;var c=0;do{if(vl&&(yl=null),Oi=0,vl=!1,25<=c)throw Error(i(301));if(c+=1,Rt=it=null,e.updateQueue!=null){var h=e.updateQueue;h.lastEffect=null,h.events=null,h.stores=null,h.memoCache!=null&&(h.memoCache.index=0)}L.H=X1,h=t(r,o)}while(vl);return h}function V1(){var e=L.H,t=e.useState()[0];return t=typeof t.then=="function"?Ai(t):t,e=e.useState()[0],(it!==null?it.memoizedState:null)!==e&&(Ye.flags|=1024),t}function Pc(){var e=rs!==0;return rs=0,e}function Hc(e,t,r){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r}function Bc(e){if(as){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}as=!1}ka=0,Rt=it=Ye=null,vl=!1,Oi=rs=0,yl=null}function Qt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Rt===null?Ye.memoizedState=Rt=e:Rt=Rt.next=e,Rt}function jt(){if(it===null){var e=Ye.alternate;e=e!==null?e.memoizedState:null}else e=it.next;var t=Rt===null?Ye.memoizedState:Rt.next;if(t!==null)Rt=t,it=e;else{if(e===null)throw Ye.alternate===null?Error(i(467)):Error(i(310));it=e,e={memoizedState:it.memoizedState,baseState:it.baseState,baseQueue:it.baseQueue,queue:it.queue,next:null},Rt===null?Ye.memoizedState=Rt=e:Rt=Rt.next=e}return Rt}function $c(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ai(e){var t=Oi;return Oi+=1,yl===null&&(yl=[]),e=Om(yl,e,t),t=Ye,(Rt===null?t.memoizedState:Rt.next)===null&&(t=t.alternate,L.H=t===null||t.memoizedState===null?vp:yp),e}function ls(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ai(e);if(e.$$typeof===z)return $t(e)}throw Error(i(438,String(e)))}function Vc(e){var t=null,r=Ye.updateQueue;if(r!==null&&(t=r.memoCache),t==null){var o=Ye.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(t={data:o.data.map(function(c){return c.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),r===null&&(r=$c(),Ye.updateQueue=r),r.memoCache=t,r=t.data[t.index],r===void 0)for(r=t.data[t.index]=Array(e),o=0;o<e;o++)r[o]=ne;return t.index++,r}function fa(e,t){return typeof t=="function"?t(e):t}function is(e){var t=jt();return Yc(t,it,e)}function Yc(e,t,r){var o=e.queue;if(o===null)throw Error(i(311));o.lastRenderedReducer=r;var c=e.baseQueue,h=o.pending;if(h!==null){if(c!==null){var x=c.next;c.next=h.next,h.next=x}t.baseQueue=c=h,o.pending=null}if(h=e.baseState,c===null)e.memoizedState=h;else{t=c.next;var E=x=null,A=null,q=t,W=!1;do{var re=q.lane&-536870913;if(re!==q.lane?(Ie&re)===re:(ka&re)===re){var F=q.revertLane;if(F===0)A!==null&&(A=A.next={lane:0,revertLane:0,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null}),re===ml&&(W=!0);else if((ka&F)===F){q=q.next,F===ml&&(W=!0);continue}else re={lane:0,revertLane:q.revertLane,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null},A===null?(E=A=re,x=h):A=A.next=re,Ye.lanes|=F,Va|=F;re=q.action,Mr&&r(h,re),h=q.hasEagerState?q.eagerState:r(h,re)}else F={lane:re,revertLane:q.revertLane,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null},A===null?(E=A=F,x=h):A=A.next=F,Ye.lanes|=re,Va|=re;q=q.next}while(q!==null&&q!==t);if(A===null?x=h:A.next=E,!tn(h,e.memoizedState)&&(Mt=!0,W&&(r=pl,r!==null)))throw r;e.memoizedState=h,e.baseState=x,e.baseQueue=A,o.lastRenderedState=h}return c===null&&(o.lanes=0),[e.memoizedState,o.dispatch]}function qc(e){var t=jt(),r=t.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=e;var o=r.dispatch,c=r.pending,h=t.memoizedState;if(c!==null){r.pending=null;var x=c=c.next;do h=e(h,x.action),x=x.next;while(x!==c);tn(h,t.memoizedState)||(Mt=!0),t.memoizedState=h,t.baseQueue===null&&(t.baseState=h),r.lastRenderedState=h}return[h,o]}function Um(e,t,r){var o=Ye,c=jt(),h=et;if(h){if(r===void 0)throw Error(i(407));r=r()}else r=t();var x=!tn((it||c).memoizedState,r);x&&(c.memoizedState=r,Mt=!0),c=c.queue;var E=Bm.bind(null,o,c,e);if(Ti(2048,8,E,[e]),c.getSnapshot!==t||x||Rt!==null&&Rt.memoizedState.tag&1){if(o.flags|=2048,bl(9,os(),Hm.bind(null,o,c,r,t),null),ft===null)throw Error(i(349));h||(ka&124)!==0||Pm(o,t,r)}return r}function Pm(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=Ye.updateQueue,t===null?(t=$c(),Ye.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function Hm(e,t,r,o){t.value=r,t.getSnapshot=o,$m(t)&&Vm(e)}function Bm(e,t,r){return r(function(){$m(t)&&Vm(e)})}function $m(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!tn(e,r)}catch{return!0}}function Vm(e){var t=cl(e,2);t!==null&&sn(t,e,2)}function Kc(e){var t=Qt();if(typeof e=="function"){var r=e;if(e=r(),Mr){jn(!0);try{r()}finally{jn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:fa,lastRenderedState:e},t}function Ym(e,t,r,o){return e.baseState=r,Yc(e,it,typeof o=="function"?o:fa)}function Y1(e,t,r,o,c){if(us(e))throw Error(i(485));if(e=t.action,e!==null){var h={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){h.listeners.push(x)}};L.T!==null?r(!0):h.isTransition=!1,o(h),r=t.pending,r===null?(h.next=t.pending=h,qm(t,h)):(h.next=r.next,t.pending=r.next=h)}}function qm(e,t){var r=t.action,o=t.payload,c=e.state;if(t.isTransition){var h=L.T,x={};L.T=x;try{var E=r(c,o),A=L.S;A!==null&&A(x,E),Km(e,t,E)}catch(q){Gc(e,t,q)}finally{L.T=h}}else try{h=r(c,o),Km(e,t,h)}catch(q){Gc(e,t,q)}}function Km(e,t,r){r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(function(o){Gm(e,t,o)},function(o){return Gc(e,t,o)}):Gm(e,t,r)}function Gm(e,t,r){t.status="fulfilled",t.value=r,Fm(t),e.state=r,t=e.pending,t!==null&&(r=t.next,r===t?e.pending=null:(r=r.next,t.next=r,qm(e,r)))}function Gc(e,t,r){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do t.status="rejected",t.reason=r,Fm(t),t=t.next;while(t!==o)}e.action=null}function Fm(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Xm(e,t){return t}function Qm(e,t){if(et){var r=ft.formState;if(r!==null){e:{var o=Ye;if(et){if(wt){t:{for(var c=wt,h=Bn;c.nodeType!==8;){if(!h){c=null;break t}if(c=Tn(c.nextSibling),c===null){c=null;break t}}h=c.data,c=h==="F!"||h==="F"?c:null}if(c){wt=Tn(c.nextSibling),o=c.data==="F!";break e}}jr(o)}o=!1}o&&(t=r[0])}}return r=Qt(),r.memoizedState=r.baseState=t,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xm,lastRenderedState:t},r.queue=o,r=mp.bind(null,Ye,o),o.dispatch=r,o=Kc(!1),h=Ic.bind(null,Ye,!1,o.queue),o=Qt(),c={state:t,dispatch:null,action:e,pending:null},o.queue=c,r=Y1.bind(null,Ye,c,h,r),c.dispatch=r,o.memoizedState=e,[t,r,!1]}function Zm(e){var t=jt();return Im(t,it,e)}function Im(e,t,r){if(t=Yc(e,t,Xm)[0],e=is(fa)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var o=Ai(t)}catch(x){throw x===Ci?es:x}else o=t;t=jt();var c=t.queue,h=c.dispatch;return r!==t.memoizedState&&(Ye.flags|=2048,bl(9,os(),q1.bind(null,c,r),null)),[o,h,e]}function q1(e,t){e.action=t}function Jm(e){var t=jt(),r=it;if(r!==null)return Im(t,r,e);jt(),t=t.memoizedState,r=jt();var o=r.queue.dispatch;return r.memoizedState=e,[t,o,!1]}function bl(e,t,r,o){return e={tag:e,create:r,deps:o,inst:t,next:null},t=Ye.updateQueue,t===null&&(t=$c(),Ye.updateQueue=t),r=t.lastEffect,r===null?t.lastEffect=e.next=e:(o=r.next,r.next=e,e.next=o,t.lastEffect=e),e}function os(){return{destroy:void 0,resource:void 0}}function Wm(){return jt().memoizedState}function ss(e,t,r,o){var c=Qt();o=o===void 0?null:o,Ye.flags|=e,c.memoizedState=bl(1|t,os(),r,o)}function Ti(e,t,r,o){var c=jt();o=o===void 0?null:o;var h=c.memoizedState.inst;it!==null&&o!==null&&zc(o,it.memoizedState.deps)?c.memoizedState=bl(t,h,r,o):(Ye.flags|=e,c.memoizedState=bl(1|t,h,r,o))}function ep(e,t){ss(8390656,8,e,t)}function tp(e,t){Ti(2048,8,e,t)}function np(e,t){return Ti(4,2,e,t)}function ap(e,t){return Ti(4,4,e,t)}function rp(e,t){if(typeof t=="function"){e=e();var r=t(e);return function(){typeof r=="function"?r():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function lp(e,t,r){r=r!=null?r.concat([e]):null,Ti(4,4,rp.bind(null,t,e),r)}function Fc(){}function ip(e,t){var r=jt();t=t===void 0?null:t;var o=r.memoizedState;return t!==null&&zc(t,o[1])?o[0]:(r.memoizedState=[e,t],e)}function op(e,t){var r=jt();t=t===void 0?null:t;var o=r.memoizedState;if(t!==null&&zc(t,o[1]))return o[0];if(o=e(),Mr){jn(!0);try{e()}finally{jn(!1)}}return r.memoizedState=[o,t],o}function Xc(e,t,r){return r===void 0||(ka&1073741824)!==0?e.memoizedState=t:(e.memoizedState=r,e=cg(),Ye.lanes|=e,Va|=e,r)}function sp(e,t,r,o){return tn(r,t)?r:gl.current!==null?(e=Xc(e,r,o),tn(e,t)||(Mt=!0),e):(ka&42)===0?(Mt=!0,e.memoizedState=r):(e=cg(),Ye.lanes|=e,Va|=e,t)}function up(e,t,r,o,c){var h=I.p;I.p=h!==0&&8>h?h:8;var x=L.T,E={};L.T=E,Ic(e,!1,t,r);try{var A=c(),q=L.S;if(q!==null&&q(E,A),A!==null&&typeof A=="object"&&typeof A.then=="function"){var W=B1(A,o);Mi(e,t,W,on(e))}else Mi(e,t,o,on(e))}catch(re){Mi(e,t,{then:function(){},status:"rejected",reason:re},on())}finally{I.p=h,L.T=x}}function K1(){}function Qc(e,t,r,o){if(e.tag!==5)throw Error(i(476));var c=cp(e).queue;up(e,c,t,V,r===null?K1:function(){return fp(e),r(o)})}function cp(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:V,baseState:V,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fa,lastRenderedState:V},next:null};var r={};return t.next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fa,lastRenderedState:r},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function fp(e){var t=cp(e).next.queue;Mi(e,t,{},on())}function Zc(){return $t(Zi)}function dp(){return jt().memoizedState}function hp(){return jt().memoizedState}function G1(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var r=on();e=Da(r);var o=La(t,e,r);o!==null&&(sn(o,t,r),Ni(o,t,r)),t={cache:Nc()},e.payload=t;return}t=t.return}}function F1(e,t,r){var o=on();r={lane:o,revertLane:0,action:r,hasEagerState:!1,eagerState:null,next:null},us(e)?pp(t,r):(r=gc(e,t,r,o),r!==null&&(sn(r,e,o),gp(r,t,o)))}function mp(e,t,r){var o=on();Mi(e,t,r,o)}function Mi(e,t,r,o){var c={lane:o,revertLane:0,action:r,hasEagerState:!1,eagerState:null,next:null};if(us(e))pp(t,c);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=t.lastRenderedReducer,h!==null))try{var x=t.lastRenderedState,E=h(x,r);if(c.hasEagerState=!0,c.eagerState=E,tn(E,x))return Go(e,t,c,0),ft===null&&Ko(),!1}catch{}finally{}if(r=gc(e,t,c,o),r!==null)return sn(r,e,o),gp(r,t,o),!0}return!1}function Ic(e,t,r,o){if(o={lane:2,revertLane:Af(),action:o,hasEagerState:!1,eagerState:null,next:null},us(e)){if(t)throw Error(i(479))}else t=gc(e,r,o,2),t!==null&&sn(t,e,2)}function us(e){var t=e.alternate;return e===Ye||t!==null&&t===Ye}function pp(e,t){vl=as=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function gp(e,t,r){if((r&4194048)!==0){var o=t.lanes;o&=e.pendingLanes,r|=o,t.lanes=r,br(e,r)}}var cs={readContext:$t,use:ls,useCallback:Ct,useContext:Ct,useEffect:Ct,useImperativeHandle:Ct,useLayoutEffect:Ct,useInsertionEffect:Ct,useMemo:Ct,useReducer:Ct,useRef:Ct,useState:Ct,useDebugValue:Ct,useDeferredValue:Ct,useTransition:Ct,useSyncExternalStore:Ct,useId:Ct,useHostTransitionStatus:Ct,useFormState:Ct,useActionState:Ct,useOptimistic:Ct,useMemoCache:Ct,useCacheRefresh:Ct},vp={readContext:$t,use:ls,useCallback:function(e,t){return Qt().memoizedState=[e,t===void 0?null:t],e},useContext:$t,useEffect:ep,useImperativeHandle:function(e,t,r){r=r!=null?r.concat([e]):null,ss(4194308,4,rp.bind(null,t,e),r)},useLayoutEffect:function(e,t){return ss(4194308,4,e,t)},useInsertionEffect:function(e,t){ss(4,2,e,t)},useMemo:function(e,t){var r=Qt();t=t===void 0?null:t;var o=e();if(Mr){jn(!0);try{e()}finally{jn(!1)}}return r.memoizedState=[o,t],o},useReducer:function(e,t,r){var o=Qt();if(r!==void 0){var c=r(t);if(Mr){jn(!0);try{r(t)}finally{jn(!1)}}}else c=t;return o.memoizedState=o.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},o.queue=e,e=e.dispatch=F1.bind(null,Ye,e),[o.memoizedState,e]},useRef:function(e){var t=Qt();return e={current:e},t.memoizedState=e},useState:function(e){e=Kc(e);var t=e.queue,r=mp.bind(null,Ye,t);return t.dispatch=r,[e.memoizedState,r]},useDebugValue:Fc,useDeferredValue:function(e,t){var r=Qt();return Xc(r,e,t)},useTransition:function(){var e=Kc(!1);return e=up.bind(null,Ye,e.queue,!0,!1),Qt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,r){var o=Ye,c=Qt();if(et){if(r===void 0)throw Error(i(407));r=r()}else{if(r=t(),ft===null)throw Error(i(349));(Ie&124)!==0||Pm(o,t,r)}c.memoizedState=r;var h={value:r,getSnapshot:t};return c.queue=h,ep(Bm.bind(null,o,h,e),[e]),o.flags|=2048,bl(9,os(),Hm.bind(null,o,h,r,t),null),r},useId:function(){var e=Qt(),t=ft.identifierPrefix;if(et){var r=sa,o=oa;r=(o&~(1<<32-zt(o)-1)).toString(32)+r,t="«"+t+"R"+r,r=rs++,0<r&&(t+="H"+r.toString(32)),t+="»"}else r=$1++,t="«"+t+"r"+r.toString(32)+"»";return e.memoizedState=t},useHostTransitionStatus:Zc,useFormState:Qm,useActionState:Qm,useOptimistic:function(e){var t=Qt();t.memoizedState=t.baseState=e;var r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=r,t=Ic.bind(null,Ye,!0,r),r.dispatch=t,[e,t]},useMemoCache:Vc,useCacheRefresh:function(){return Qt().memoizedState=G1.bind(null,Ye)}},yp={readContext:$t,use:ls,useCallback:ip,useContext:$t,useEffect:tp,useImperativeHandle:lp,useInsertionEffect:np,useLayoutEffect:ap,useMemo:op,useReducer:is,useRef:Wm,useState:function(){return is(fa)},useDebugValue:Fc,useDeferredValue:function(e,t){var r=jt();return sp(r,it.memoizedState,e,t)},useTransition:function(){var e=is(fa)[0],t=jt().memoizedState;return[typeof e=="boolean"?e:Ai(e),t]},useSyncExternalStore:Um,useId:dp,useHostTransitionStatus:Zc,useFormState:Zm,useActionState:Zm,useOptimistic:function(e,t){var r=jt();return Ym(r,it,e,t)},useMemoCache:Vc,useCacheRefresh:hp},X1={readContext:$t,use:ls,useCallback:ip,useContext:$t,useEffect:tp,useImperativeHandle:lp,useInsertionEffect:np,useLayoutEffect:ap,useMemo:op,useReducer:qc,useRef:Wm,useState:function(){return qc(fa)},useDebugValue:Fc,useDeferredValue:function(e,t){var r=jt();return it===null?Xc(r,e,t):sp(r,it.memoizedState,e,t)},useTransition:function(){var e=qc(fa)[0],t=jt().memoizedState;return[typeof e=="boolean"?e:Ai(e),t]},useSyncExternalStore:Um,useId:dp,useHostTransitionStatus:Zc,useFormState:Jm,useActionState:Jm,useOptimistic:function(e,t){var r=jt();return it!==null?Ym(r,it,e,t):(r.baseState=e,[e,r.queue.dispatch])},useMemoCache:Vc,useCacheRefresh:hp},xl=null,Di=0;function fs(e){var t=Di;return Di+=1,xl===null&&(xl=[]),Om(xl,e,t)}function Li(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ds(e,t){throw t.$$typeof===b?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function bp(e){var t=e._init;return t(e._payload)}function xp(e){function t(B,k){if(e){var Y=B.deletions;Y===null?(B.deletions=[k],B.flags|=16):Y.push(k)}}function r(B,k){if(!e)return null;for(;k!==null;)t(B,k),k=k.sibling;return null}function o(B){for(var k=new Map;B!==null;)B.key!==null?k.set(B.key,B):k.set(B.index,B),B=B.sibling;return k}function c(B,k){return B=ia(B,k),B.index=0,B.sibling=null,B}function h(B,k,Y){return B.index=Y,e?(Y=B.alternate,Y!==null?(Y=Y.index,Y<k?(B.flags|=67108866,k):Y):(B.flags|=67108866,k)):(B.flags|=1048576,k)}function x(B){return e&&B.alternate===null&&(B.flags|=67108866),B}function E(B,k,Y,te){return k===null||k.tag!==6?(k=yc(Y,B.mode,te),k.return=B,k):(k=c(k,Y),k.return=B,k)}function A(B,k,Y,te){var ye=Y.type;return ye===_?W(B,k,Y.props.children,te,Y.key):k!==null&&(k.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===Z&&bp(ye)===k.type)?(k=c(k,Y.props),Li(k,Y),k.return=B,k):(k=Xo(Y.type,Y.key,Y.props,null,B.mode,te),Li(k,Y),k.return=B,k)}function q(B,k,Y,te){return k===null||k.tag!==4||k.stateNode.containerInfo!==Y.containerInfo||k.stateNode.implementation!==Y.implementation?(k=bc(Y,B.mode,te),k.return=B,k):(k=c(k,Y.children||[]),k.return=B,k)}function W(B,k,Y,te,ye){return k===null||k.tag!==7?(k=Cr(Y,B.mode,te,ye),k.return=B,k):(k=c(k,Y),k.return=B,k)}function re(B,k,Y){if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return k=yc(""+k,B.mode,Y),k.return=B,k;if(typeof k=="object"&&k!==null){switch(k.$$typeof){case S:return Y=Xo(k.type,k.key,k.props,null,B.mode,Y),Li(Y,k),Y.return=B,Y;case w:return k=bc(k,B.mode,Y),k.return=B,k;case Z:var te=k._init;return k=te(k._payload),re(B,k,Y)}if(he(k)||de(k))return k=Cr(k,B.mode,Y,null),k.return=B,k;if(typeof k.then=="function")return re(B,fs(k),Y);if(k.$$typeof===z)return re(B,Jo(B,k),Y);ds(B,k)}return null}function F(B,k,Y,te){var ye=k!==null?k.key:null;if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return ye!==null?null:E(B,k,""+Y,te);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case S:return Y.key===ye?A(B,k,Y,te):null;case w:return Y.key===ye?q(B,k,Y,te):null;case Z:return ye=Y._init,Y=ye(Y._payload),F(B,k,Y,te)}if(he(Y)||de(Y))return ye!==null?null:W(B,k,Y,te,null);if(typeof Y.then=="function")return F(B,k,fs(Y),te);if(Y.$$typeof===z)return F(B,k,Jo(B,Y),te);ds(B,Y)}return null}function X(B,k,Y,te,ye){if(typeof te=="string"&&te!==""||typeof te=="number"||typeof te=="bigint")return B=B.get(Y)||null,E(k,B,""+te,ye);if(typeof te=="object"&&te!==null){switch(te.$$typeof){case S:return B=B.get(te.key===null?Y:te.key)||null,A(k,B,te,ye);case w:return B=B.get(te.key===null?Y:te.key)||null,q(k,B,te,ye);case Z:var Ge=te._init;return te=Ge(te._payload),X(B,k,Y,te,ye)}if(he(te)||de(te))return B=B.get(Y)||null,W(k,B,te,ye,null);if(typeof te.then=="function")return X(B,k,Y,fs(te),ye);if(te.$$typeof===z)return X(B,k,Y,Jo(k,te),ye);ds(k,te)}return null}function Ue(B,k,Y,te){for(var ye=null,Ge=null,Re=k,ke=k=0,Lt=null;Re!==null&&ke<Y.length;ke++){Re.index>ke?(Lt=Re,Re=null):Lt=Re.sibling;var We=F(B,Re,Y[ke],te);if(We===null){Re===null&&(Re=Lt);break}e&&Re&&We.alternate===null&&t(B,Re),k=h(We,k,ke),Ge===null?ye=We:Ge.sibling=We,Ge=We,Re=Lt}if(ke===Y.length)return r(B,Re),et&&Nr(B,ke),ye;if(Re===null){for(;ke<Y.length;ke++)Re=re(B,Y[ke],te),Re!==null&&(k=h(Re,k,ke),Ge===null?ye=Re:Ge.sibling=Re,Ge=Re);return et&&Nr(B,ke),ye}for(Re=o(Re);ke<Y.length;ke++)Lt=X(Re,B,ke,Y[ke],te),Lt!==null&&(e&&Lt.alternate!==null&&Re.delete(Lt.key===null?ke:Lt.key),k=h(Lt,k,ke),Ge===null?ye=Lt:Ge.sibling=Lt,Ge=Lt);return e&&Re.forEach(function(Ia){return t(B,Ia)}),et&&Nr(B,ke),ye}function Le(B,k,Y,te){if(Y==null)throw Error(i(151));for(var ye=null,Ge=null,Re=k,ke=k=0,Lt=null,We=Y.next();Re!==null&&!We.done;ke++,We=Y.next()){Re.index>ke?(Lt=Re,Re=null):Lt=Re.sibling;var Ia=F(B,Re,We.value,te);if(Ia===null){Re===null&&(Re=Lt);break}e&&Re&&Ia.alternate===null&&t(B,Re),k=h(Ia,k,ke),Ge===null?ye=Ia:Ge.sibling=Ia,Ge=Ia,Re=Lt}if(We.done)return r(B,Re),et&&Nr(B,ke),ye;if(Re===null){for(;!We.done;ke++,We=Y.next())We=re(B,We.value,te),We!==null&&(k=h(We,k,ke),Ge===null?ye=We:Ge.sibling=We,Ge=We);return et&&Nr(B,ke),ye}for(Re=o(Re);!We.done;ke++,We=Y.next())We=X(Re,B,ke,We.value,te),We!==null&&(e&&We.alternate!==null&&Re.delete(We.key===null?ke:We.key),k=h(We,k,ke),Ge===null?ye=We:Ge.sibling=We,Ge=We);return e&&Re.forEach(function(Qw){return t(B,Qw)}),et&&Nr(B,ke),ye}function st(B,k,Y,te){if(typeof Y=="object"&&Y!==null&&Y.type===_&&Y.key===null&&(Y=Y.props.children),typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case S:e:{for(var ye=Y.key;k!==null;){if(k.key===ye){if(ye=Y.type,ye===_){if(k.tag===7){r(B,k.sibling),te=c(k,Y.props.children),te.return=B,B=te;break e}}else if(k.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===Z&&bp(ye)===k.type){r(B,k.sibling),te=c(k,Y.props),Li(te,Y),te.return=B,B=te;break e}r(B,k);break}else t(B,k);k=k.sibling}Y.type===_?(te=Cr(Y.props.children,B.mode,te,Y.key),te.return=B,B=te):(te=Xo(Y.type,Y.key,Y.props,null,B.mode,te),Li(te,Y),te.return=B,B=te)}return x(B);case w:e:{for(ye=Y.key;k!==null;){if(k.key===ye)if(k.tag===4&&k.stateNode.containerInfo===Y.containerInfo&&k.stateNode.implementation===Y.implementation){r(B,k.sibling),te=c(k,Y.children||[]),te.return=B,B=te;break e}else{r(B,k);break}else t(B,k);k=k.sibling}te=bc(Y,B.mode,te),te.return=B,B=te}return x(B);case Z:return ye=Y._init,Y=ye(Y._payload),st(B,k,Y,te)}if(he(Y))return Ue(B,k,Y,te);if(de(Y)){if(ye=de(Y),typeof ye!="function")throw Error(i(150));return Y=ye.call(Y),Le(B,k,Y,te)}if(typeof Y.then=="function")return st(B,k,fs(Y),te);if(Y.$$typeof===z)return st(B,k,Jo(B,Y),te);ds(B,Y)}return typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint"?(Y=""+Y,k!==null&&k.tag===6?(r(B,k.sibling),te=c(k,Y),te.return=B,B=te):(r(B,k),te=yc(Y,B.mode,te),te.return=B,B=te),x(B)):r(B,k)}return function(B,k,Y,te){try{Di=0;var ye=st(B,k,Y,te);return xl=null,ye}catch(Re){if(Re===Ci||Re===es)throw Re;var Ge=nn(29,Re,null,B.mode);return Ge.lanes=te,Ge.return=B,Ge}finally{}}}var wl=xp(!0),wp=xp(!1),Sn=K(null),$n=null;function za(e){var t=e.alternate;G(At,At.current&1),G(Sn,e),$n===null&&(t===null||gl.current!==null||t.memoizedState!==null)&&($n=e)}function Sp(e){if(e.tag===22){if(G(At,At.current),G(Sn,e),$n===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&($n=e)}}else Ua()}function Ua(){G(At,At.current),G(Sn,Sn.current)}function da(e){P(Sn),$n===e&&($n=null),P(At)}var At=K(0);function hs(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||Vf(r)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){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}function Jc(e,t,r,o){t=e.memoizedState,r=r(o,t),r=r==null?t:v({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Wc={enqueueSetState:function(e,t,r){e=e._reactInternals;var o=on(),c=Da(o);c.payload=t,r!=null&&(c.callback=r),t=La(e,c,o),t!==null&&(sn(t,e,o),Ni(t,e,o))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var o=on(),c=Da(o);c.tag=1,c.payload=t,r!=null&&(c.callback=r),t=La(e,c,o),t!==null&&(sn(t,e,o),Ni(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=on(),o=Da(r);o.tag=2,t!=null&&(o.callback=t),t=La(e,o,r),t!==null&&(sn(t,e,r),Ni(t,e,r))}};function Ep(e,t,r,o,c,h,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,h,x):t.prototype&&t.prototype.isPureReactComponent?!gi(r,o)||!gi(c,h):!0}function Cp(e,t,r,o){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,o),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,o),t.state!==e&&Wc.enqueueReplaceState(t,t.state,null)}function Dr(e,t){var r=t;if("ref"in t){r={};for(var o in t)o!=="ref"&&(r[o]=t[o])}if(e=e.defaultProps){r===t&&(r=v({},r));for(var c in e)r[c]===void 0&&(r[c]=e[c])}return r}var ms=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)};function _p(e){ms(e)}function Np(e){console.error(e)}function Rp(e){ms(e)}function ps(e,t){try{var r=e.onUncaughtError;r(t.value,{componentStack:t.stack})}catch(o){setTimeout(function(){throw o})}}function jp(e,t,r){try{var o=e.onCaughtError;o(r.value,{componentStack:r.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function ef(e,t,r){return r=Da(r),r.tag=3,r.payload={element:null},r.callback=function(){ps(e,t)},r}function Op(e){return e=Da(e),e.tag=3,e}function Ap(e,t,r,o){var c=r.type.getDerivedStateFromError;if(typeof c=="function"){var h=o.value;e.payload=function(){return c(h)},e.callback=function(){jp(t,r,o)}}var x=r.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(e.callback=function(){jp(t,r,o),typeof c!="function"&&(Ya===null?Ya=new Set([this]):Ya.add(this));var E=o.stack;this.componentDidCatch(o.value,{componentStack:E!==null?E:""})})}function Q1(e,t,r,o,c){if(r.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(t=r.alternate,t!==null&&wi(t,r,c,!0),r=Sn.current,r!==null){switch(r.tag){case 13:return $n===null?_f():r.alternate===null&&St===0&&(St=3),r.flags&=-257,r.flags|=65536,r.lanes=c,o===Oc?r.flags|=16384:(t=r.updateQueue,t===null?r.updateQueue=new Set([o]):t.add(o),Rf(e,o,c)),!1;case 22:return r.flags|=65536,o===Oc?r.flags|=16384:(t=r.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([o])},r.updateQueue=t):(r=t.retryQueue,r===null?t.retryQueue=new Set([o]):r.add(o)),Rf(e,o,c)),!1}throw Error(i(435,r.tag))}return Rf(e,o,c),_f(),!1}if(et)return t=Sn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,o!==Sc&&(e=Error(i(422),{cause:o}),xi(yn(e,r)))):(o!==Sc&&(t=Error(i(423),{cause:o}),xi(yn(t,r))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,o=yn(o,r),c=ef(e.stateNode,o,c),Mc(e,c),St!==4&&(St=2)),!1;var h=Error(i(520),{cause:o});if(h=yn(h,r),$i===null?$i=[h]:$i.push(h),St!==4&&(St=2),t===null)return!0;o=yn(o,r),r=t;do{switch(r.tag){case 3:return r.flags|=65536,e=c&-c,r.lanes|=e,e=ef(r.stateNode,o,e),Mc(r,e),!1;case 1:if(t=r.type,h=r.stateNode,(r.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(Ya===null||!Ya.has(h))))return r.flags|=65536,c&=-c,r.lanes|=c,c=Op(c),Ap(c,e,r,o),Mc(r,c),!1}r=r.return}while(r!==null);return!1}var Tp=Error(i(461)),Mt=!1;function Ut(e,t,r,o){t.child=e===null?wp(t,null,r,o):wl(t,e.child,r,o)}function Mp(e,t,r,o,c){r=r.render;var h=t.ref;if("ref"in o){var x={};for(var E in o)E!=="ref"&&(x[E]=o[E])}else x=o;return Ar(t),o=Uc(e,t,r,x,h,c),E=Pc(),e!==null&&!Mt?(Hc(e,t,c),ha(e,t,c)):(et&&E&&xc(t),t.flags|=1,Ut(e,t,o,c),t.child)}function Dp(e,t,r,o,c){if(e===null){var h=r.type;return typeof h=="function"&&!vc(h)&&h.defaultProps===void 0&&r.compare===null?(t.tag=15,t.type=h,Lp(e,t,h,o,c)):(e=Xo(r.type,null,o,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(h=e.child,!uf(e,c)){var x=h.memoizedProps;if(r=r.compare,r=r!==null?r:gi,r(x,o)&&e.ref===t.ref)return ha(e,t,c)}return t.flags|=1,e=ia(h,o),e.ref=t.ref,e.return=t,t.child=e}function Lp(e,t,r,o,c){if(e!==null){var h=e.memoizedProps;if(gi(h,o)&&e.ref===t.ref)if(Mt=!1,t.pendingProps=o=h,uf(e,c))(e.flags&131072)!==0&&(Mt=!0);else return t.lanes=e.lanes,ha(e,t,c)}return tf(e,t,r,o,c)}function kp(e,t,r){var o=t.pendingProps,c=o.children,h=e!==null?e.memoizedState:null;if(o.mode==="hidden"){if((t.flags&128)!==0){if(o=h!==null?h.baseLanes|r:r,e!==null){for(c=t.child=e.child,h=0;c!==null;)h=h|c.lanes|c.childLanes,c=c.sibling;t.childLanes=h&~o}else t.childLanes=0,t.child=null;return zp(e,t,o,r)}if((r&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Wo(t,h!==null?h.cachePool:null),h!==null?Lm(t,h):Lc(),Sp(t);else return t.lanes=t.childLanes=536870912,zp(e,t,h!==null?h.baseLanes|r:r,r)}else h!==null?(Wo(t,h.cachePool),Lm(t,h),Ua(),t.memoizedState=null):(e!==null&&Wo(t,null),Lc(),Ua());return Ut(e,t,c,r),t.child}function zp(e,t,r,o){var c=jc();return c=c===null?null:{parent:Ot._currentValue,pool:c},t.memoizedState={baseLanes:r,cachePool:c},e!==null&&Wo(t,null),Lc(),Sp(t),e!==null&&wi(e,t,o,!0),null}function gs(e,t){var r=t.ref;if(r===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof r!="function"&&typeof r!="object")throw Error(i(284));(e===null||e.ref!==r)&&(t.flags|=4194816)}}function tf(e,t,r,o,c){return Ar(t),r=Uc(e,t,r,o,void 0,c),o=Pc(),e!==null&&!Mt?(Hc(e,t,c),ha(e,t,c)):(et&&o&&xc(t),t.flags|=1,Ut(e,t,r,c),t.child)}function Up(e,t,r,o,c,h){return Ar(t),t.updateQueue=null,r=zm(t,o,r,c),km(e),o=Pc(),e!==null&&!Mt?(Hc(e,t,h),ha(e,t,h)):(et&&o&&xc(t),t.flags|=1,Ut(e,t,r,h),t.child)}function Pp(e,t,r,o,c){if(Ar(t),t.stateNode===null){var h=fl,x=r.contextType;typeof x=="object"&&x!==null&&(h=$t(x)),h=new r(o,h),t.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=Wc,t.stateNode=h,h._reactInternals=t,h=t.stateNode,h.props=o,h.state=t.memoizedState,h.refs={},Ac(t),x=r.contextType,h.context=typeof x=="object"&&x!==null?$t(x):fl,h.state=t.memoizedState,x=r.getDerivedStateFromProps,typeof x=="function"&&(Jc(t,r,x,o),h.state=t.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(x=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),x!==h.state&&Wc.enqueueReplaceState(h,h.state,null),ji(t,o,h,c),Ri(),h.state=t.memoizedState),typeof h.componentDidMount=="function"&&(t.flags|=4194308),o=!0}else if(e===null){h=t.stateNode;var E=t.memoizedProps,A=Dr(r,E);h.props=A;var q=h.context,W=r.contextType;x=fl,typeof W=="object"&&W!==null&&(x=$t(W));var re=r.getDerivedStateFromProps;W=typeof re=="function"||typeof h.getSnapshotBeforeUpdate=="function",E=t.pendingProps!==E,W||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(E||q!==x)&&Cp(t,h,o,x),Ma=!1;var F=t.memoizedState;h.state=F,ji(t,o,h,c),Ri(),q=t.memoizedState,E||F!==q||Ma?(typeof re=="function"&&(Jc(t,r,re,o),q=t.memoizedState),(A=Ma||Ep(t,r,A,o,F,q,x))?(W||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount()),typeof h.componentDidMount=="function"&&(t.flags|=4194308)):(typeof h.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=o,t.memoizedState=q),h.props=o,h.state=q,h.context=x,o=A):(typeof h.componentDidMount=="function"&&(t.flags|=4194308),o=!1)}else{h=t.stateNode,Tc(e,t),x=t.memoizedProps,W=Dr(r,x),h.props=W,re=t.pendingProps,F=h.context,q=r.contextType,A=fl,typeof q=="object"&&q!==null&&(A=$t(q)),E=r.getDerivedStateFromProps,(q=typeof E=="function"||typeof h.getSnapshotBeforeUpdate=="function")||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(x!==re||F!==A)&&Cp(t,h,o,A),Ma=!1,F=t.memoizedState,h.state=F,ji(t,o,h,c),Ri();var X=t.memoizedState;x!==re||F!==X||Ma||e!==null&&e.dependencies!==null&&Io(e.dependencies)?(typeof E=="function"&&(Jc(t,r,E,o),X=t.memoizedState),(W=Ma||Ep(t,r,W,o,F,X,A)||e!==null&&e.dependencies!==null&&Io(e.dependencies))?(q||typeof h.UNSAFE_componentWillUpdate!="function"&&typeof h.componentWillUpdate!="function"||(typeof h.componentWillUpdate=="function"&&h.componentWillUpdate(o,X,A),typeof h.UNSAFE_componentWillUpdate=="function"&&h.UNSAFE_componentWillUpdate(o,X,A)),typeof h.componentDidUpdate=="function"&&(t.flags|=4),typeof h.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof h.componentDidUpdate!="function"||x===e.memoizedProps&&F===e.memoizedState||(t.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&F===e.memoizedState||(t.flags|=1024),t.memoizedProps=o,t.memoizedState=X),h.props=o,h.state=X,h.context=A,o=W):(typeof h.componentDidUpdate!="function"||x===e.memoizedProps&&F===e.memoizedState||(t.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&F===e.memoizedState||(t.flags|=1024),o=!1)}return h=o,gs(e,t),o=(t.flags&128)!==0,h||o?(h=t.stateNode,r=o&&typeof r.getDerivedStateFromError!="function"?null:h.render(),t.flags|=1,e!==null&&o?(t.child=wl(t,e.child,null,c),t.child=wl(t,null,r,c)):Ut(e,t,r,c),t.memoizedState=h.state,e=t.child):e=ha(e,t,c),e}function Hp(e,t,r,o){return bi(),t.flags|=256,Ut(e,t,r,o),t.child}var nf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function af(e){return{baseLanes:e,cachePool:Nm()}}function rf(e,t,r){return e=e!==null?e.childLanes&~r:0,t&&(e|=En),e}function Bp(e,t,r){var o=t.pendingProps,c=!1,h=(t.flags&128)!==0,x;if((x=h)||(x=e!==null&&e.memoizedState===null?!1:(At.current&2)!==0),x&&(c=!0,t.flags&=-129),x=(t.flags&32)!==0,t.flags&=-33,e===null){if(et){if(c?za(t):Ua(),et){var E=wt,A;if(A=E){e:{for(A=E,E=Bn;A.nodeType!==8;){if(!E){E=null;break e}if(A=Tn(A.nextSibling),A===null){E=null;break e}}E=A}E!==null?(t.memoizedState={dehydrated:E,treeContext:_r!==null?{id:oa,overflow:sa}:null,retryLane:536870912,hydrationErrors:null},A=nn(18,null,null,0),A.stateNode=E,A.return=t,t.child=A,Kt=t,wt=null,A=!0):A=!1}A||jr(t)}if(E=t.memoizedState,E!==null&&(E=E.dehydrated,E!==null))return Vf(E)?t.lanes=32:t.lanes=536870912,null;da(t)}return E=o.children,o=o.fallback,c?(Ua(),c=t.mode,E=vs({mode:"hidden",children:E},c),o=Cr(o,c,r,null),E.return=t,o.return=t,E.sibling=o,t.child=E,c=t.child,c.memoizedState=af(r),c.childLanes=rf(e,x,r),t.memoizedState=nf,o):(za(t),lf(t,E))}if(A=e.memoizedState,A!==null&&(E=A.dehydrated,E!==null)){if(h)t.flags&256?(za(t),t.flags&=-257,t=of(e,t,r)):t.memoizedState!==null?(Ua(),t.child=e.child,t.flags|=128,t=null):(Ua(),c=o.fallback,E=t.mode,o=vs({mode:"visible",children:o.children},E),c=Cr(c,E,r,null),c.flags|=2,o.return=t,c.return=t,o.sibling=c,t.child=o,wl(t,e.child,null,r),o=t.child,o.memoizedState=af(r),o.childLanes=rf(e,x,r),t.memoizedState=nf,t=c);else if(za(t),Vf(E)){if(x=E.nextSibling&&E.nextSibling.dataset,x)var q=x.dgst;x=q,o=Error(i(419)),o.stack="",o.digest=x,xi({value:o,source:null,stack:null}),t=of(e,t,r)}else if(Mt||wi(e,t,r,!1),x=(r&e.childLanes)!==0,Mt||x){if(x=ft,x!==null&&(o=r&-r,o=(o&42)!==0?1:oi(o),o=(o&(x.suspendedLanes|r))!==0?0:o,o!==0&&o!==A.retryLane))throw A.retryLane=o,cl(e,o),sn(x,e,o),Tp;E.data==="$?"||_f(),t=of(e,t,r)}else E.data==="$?"?(t.flags|=192,t.child=e.child,t=null):(e=A.treeContext,wt=Tn(E.nextSibling),Kt=t,et=!0,Rr=null,Bn=!1,e!==null&&(xn[wn++]=oa,xn[wn++]=sa,xn[wn++]=_r,oa=e.id,sa=e.overflow,_r=t),t=lf(t,o.children),t.flags|=4096);return t}return c?(Ua(),c=o.fallback,E=t.mode,A=e.child,q=A.sibling,o=ia(A,{mode:"hidden",children:o.children}),o.subtreeFlags=A.subtreeFlags&65011712,q!==null?c=ia(q,c):(c=Cr(c,E,r,null),c.flags|=2),c.return=t,o.return=t,o.sibling=c,t.child=o,o=c,c=t.child,E=e.child.memoizedState,E===null?E=af(r):(A=E.cachePool,A!==null?(q=Ot._currentValue,A=A.parent!==q?{parent:q,pool:q}:A):A=Nm(),E={baseLanes:E.baseLanes|r,cachePool:A}),c.memoizedState=E,c.childLanes=rf(e,x,r),t.memoizedState=nf,o):(za(t),r=e.child,e=r.sibling,r=ia(r,{mode:"visible",children:o.children}),r.return=t,r.sibling=null,e!==null&&(x=t.deletions,x===null?(t.deletions=[e],t.flags|=16):x.push(e)),t.child=r,t.memoizedState=null,r)}function lf(e,t){return t=vs({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function vs(e,t){return e=nn(22,e,null,t),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function of(e,t,r){return wl(t,e.child,null,r),e=lf(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function $p(e,t,r){e.lanes|=t;var o=e.alternate;o!==null&&(o.lanes|=t),Cc(e.return,t,r)}function sf(e,t,r,o,c){var h=e.memoizedState;h===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:o,tail:r,tailMode:c}:(h.isBackwards=t,h.rendering=null,h.renderingStartTime=0,h.last=o,h.tail=r,h.tailMode=c)}function Vp(e,t,r){var o=t.pendingProps,c=o.revealOrder,h=o.tail;if(Ut(e,t,o.children,r),o=At.current,(o&2)!==0)o=o&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&$p(e,r,t);else if(e.tag===19)$p(e,r,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}o&=1}switch(G(At,o),c){case"forwards":for(r=t.child,c=null;r!==null;)e=r.alternate,e!==null&&hs(e)===null&&(c=r),r=r.sibling;r=c,r===null?(c=t.child,t.child=null):(c=r.sibling,r.sibling=null),sf(t,!1,c,r,h);break;case"backwards":for(r=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&hs(e)===null){t.child=c;break}e=c.sibling,c.sibling=r,r=c,c=e}sf(t,!0,r,null,h);break;case"together":sf(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ha(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Va|=t.lanes,(r&t.childLanes)===0)if(e!==null){if(wi(e,t,r,!1),(r&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,r=ia(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=ia(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function uf(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Io(e)))}function Z1(e,t,r){switch(t.tag){case 3:ze(t,t.stateNode.containerInfo),Ta(t,Ot,e.memoizedState.cache),bi();break;case 27:case 5:Ae(t);break;case 4:ze(t,t.stateNode.containerInfo);break;case 10:Ta(t,t.type,t.memoizedProps.value);break;case 13:var o=t.memoizedState;if(o!==null)return o.dehydrated!==null?(za(t),t.flags|=128,null):(r&t.child.childLanes)!==0?Bp(e,t,r):(za(t),e=ha(e,t,r),e!==null?e.sibling:null);za(t);break;case 19:var c=(e.flags&128)!==0;if(o=(r&t.childLanes)!==0,o||(wi(e,t,r,!1),o=(r&t.childLanes)!==0),c){if(o)return Vp(e,t,r);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),G(At,At.current),o)break;return null;case 22:case 23:return t.lanes=0,kp(e,t,r);case 24:Ta(t,Ot,e.memoizedState.cache)}return ha(e,t,r)}function Yp(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps)Mt=!0;else{if(!uf(e,r)&&(t.flags&128)===0)return Mt=!1,Z1(e,t,r);Mt=(e.flags&131072)!==0}else Mt=!1,et&&(t.flags&1048576)!==0&&bm(t,Zo,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var o=t.elementType,c=o._init;if(o=c(o._payload),t.type=o,typeof o=="function")vc(o)?(e=Dr(o,e),t.tag=1,t=Pp(null,t,o,e,r)):(t.tag=0,t=tf(null,t,o,e,r));else{if(o!=null){if(c=o.$$typeof,c===D){t.tag=11,t=Mp(null,t,o,e,r);break e}else if(c===H){t.tag=14,t=Dp(null,t,o,e,r);break e}}throw t=fe(o)||o,Error(i(306,t,""))}}return t;case 0:return tf(e,t,t.type,t.pendingProps,r);case 1:return o=t.type,c=Dr(o,t.pendingProps),Pp(e,t,o,c,r);case 3:e:{if(ze(t,t.stateNode.containerInfo),e===null)throw Error(i(387));o=t.pendingProps;var h=t.memoizedState;c=h.element,Tc(e,t),ji(t,o,null,r);var x=t.memoizedState;if(o=x.cache,Ta(t,Ot,o),o!==h.cache&&_c(t,[Ot],r,!0),Ri(),o=x.element,h.isDehydrated)if(h={element:o,isDehydrated:!1,cache:x.cache},t.updateQueue.baseState=h,t.memoizedState=h,t.flags&256){t=Hp(e,t,o,r);break e}else if(o!==c){c=yn(Error(i(424)),t),xi(c),t=Hp(e,t,o,r);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(wt=Tn(e.firstChild),Kt=t,et=!0,Rr=null,Bn=!0,r=wp(t,null,o,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling}else{if(bi(),o===c){t=ha(e,t,r);break e}Ut(e,t,o,r)}t=t.child}return t;case 26:return gs(e,t),e===null?(r=Fg(t.type,null,t.pendingProps,null))?t.memoizedState=r:et||(r=t.type,e=t.pendingProps,o=Ts(pe.current).createElement(r),o[ie]=t,o[me]=e,Ht(o,r,e),Be(o),t.stateNode=o):t.memoizedState=Fg(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ae(t),e===null&&et&&(o=t.stateNode=qg(t.type,t.pendingProps,pe.current),Kt=t,Bn=!0,c=wt,Ga(t.type)?(Yf=c,wt=Tn(o.firstChild)):wt=c),Ut(e,t,t.pendingProps.children,r),gs(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&et&&((c=o=wt)&&(o=Cw(o,t.type,t.pendingProps,Bn),o!==null?(t.stateNode=o,Kt=t,wt=Tn(o.firstChild),Bn=!1,c=!0):c=!1),c||jr(t)),Ae(t),c=t.type,h=t.pendingProps,x=e!==null?e.memoizedProps:null,o=h.children,Hf(c,h)?o=null:x!==null&&Hf(c,x)&&(t.flags|=32),t.memoizedState!==null&&(c=Uc(e,t,V1,null,null,r),Zi._currentValue=c),gs(e,t),Ut(e,t,o,r),t.child;case 6:return e===null&&et&&((e=r=wt)&&(r=_w(r,t.pendingProps,Bn),r!==null?(t.stateNode=r,Kt=t,wt=null,e=!0):e=!1),e||jr(t)),null;case 13:return Bp(e,t,r);case 4:return ze(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=wl(t,null,o,r):Ut(e,t,o,r),t.child;case 11:return Mp(e,t,t.type,t.pendingProps,r);case 7:return Ut(e,t,t.pendingProps,r),t.child;case 8:return Ut(e,t,t.pendingProps.children,r),t.child;case 12:return Ut(e,t,t.pendingProps.children,r),t.child;case 10:return o=t.pendingProps,Ta(t,t.type,o.value),Ut(e,t,o.children,r),t.child;case 9:return c=t.type._context,o=t.pendingProps.children,Ar(t),c=$t(c),o=o(c),t.flags|=1,Ut(e,t,o,r),t.child;case 14:return Dp(e,t,t.type,t.pendingProps,r);case 15:return Lp(e,t,t.type,t.pendingProps,r);case 19:return Vp(e,t,r);case 31:return o=t.pendingProps,r=t.mode,o={mode:o.mode,children:o.children},e===null?(r=vs(o,r),r.ref=t.ref,t.child=r,r.return=t,t=r):(r=ia(e.child,o),r.ref=t.ref,t.child=r,r.return=t,t=r),t;case 22:return kp(e,t,r);case 24:return Ar(t),o=$t(Ot),e===null?(c=jc(),c===null&&(c=ft,h=Nc(),c.pooledCache=h,h.refCount++,h!==null&&(c.pooledCacheLanes|=r),c=h),t.memoizedState={parent:o,cache:c},Ac(t),Ta(t,Ot,c)):((e.lanes&r)!==0&&(Tc(e,t),ji(t,null,null,r),Ri()),c=e.memoizedState,h=t.memoizedState,c.parent!==o?(c={parent:o,cache:o},t.memoizedState=c,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=c),Ta(t,Ot,o)):(o=h.cache,Ta(t,Ot,o),o!==c.cache&&_c(t,[Ot],r,!0))),Ut(e,t,t.pendingProps.children,r),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function ma(e){e.flags|=4}function qp(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Jg(t)){if(t=Sn.current,t!==null&&((Ie&4194048)===Ie?$n!==null:(Ie&62914560)!==Ie&&(Ie&536870912)===0||t!==$n))throw _i=Oc,Rm;e.flags|=8192}}function ys(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Mo():536870912,e.lanes|=t,_l|=t)}function ki(e,t){if(!et)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var o=null;r!==null;)r.alternate!==null&&(o=r),r=r.sibling;o===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function vt(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,o=0;if(t)for(var c=e.child;c!==null;)r|=c.lanes|c.childLanes,o|=c.subtreeFlags&65011712,o|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)r|=c.lanes|c.childLanes,o|=c.subtreeFlags,o|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=o,e.childLanes=r,t}function I1(e,t,r){var o=t.pendingProps;switch(wc(t),t.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return vt(t),null;case 1:return vt(t),null;case 3:return r=t.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),t.memoizedState.cache!==o&&(t.flags|=2048),ca(Ot),Ze(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(yi(t)?ma(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Sm())),vt(t),null;case 26:return r=t.memoizedState,e===null?(ma(t),r!==null?(vt(t),qp(t,r)):(vt(t),t.flags&=-16777217)):r?r!==e.memoizedState?(ma(t),vt(t),qp(t,r)):(vt(t),t.flags&=-16777217):(e.memoizedProps!==o&&ma(t),vt(t),t.flags&=-16777217),null;case 27:le(t),r=pe.current;var c=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==o&&ma(t);else{if(!o){if(t.stateNode===null)throw Error(i(166));return vt(t),null}e=ee.current,yi(t)?xm(t):(e=qg(c,o,r),t.stateNode=e,ma(t))}return vt(t),null;case 5:if(le(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==o&&ma(t);else{if(!o){if(t.stateNode===null)throw Error(i(166));return vt(t),null}if(e=ee.current,yi(t))xm(t);else{switch(c=Ts(pe.current),e){case 1:e=c.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:e=c.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":e=c.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":e=c.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":e=c.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof o.is=="string"?c.createElement("select",{is:o.is}):c.createElement("select"),o.multiple?e.multiple=!0:o.size&&(e.size=o.size);break;default:e=typeof o.is=="string"?c.createElement(r,{is:o.is}):c.createElement(r)}}e[ie]=t,e[me]=o;e:for(c=t.child;c!==null;){if(c.tag===5||c.tag===6)e.appendChild(c.stateNode);else if(c.tag!==4&&c.tag!==27&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===t)break e;for(;c.sibling===null;){if(c.return===null||c.return===t)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}t.stateNode=e;e:switch(Ht(e,r,o),r){case"button":case"input":case"select":case"textarea":e=!!o.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&ma(t)}}return vt(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==o&&ma(t);else{if(typeof o!="string"&&t.stateNode===null)throw Error(i(166));if(e=pe.current,yi(t)){if(e=t.stateNode,r=t.memoizedProps,o=null,c=Kt,c!==null)switch(c.tag){case 27:case 5:o=c.memoizedProps}e[ie]=t,e=!!(e.nodeValue===r||o!==null&&o.suppressHydrationWarning===!0||Ug(e.nodeValue,r)),e||jr(t)}else e=Ts(e).createTextNode(o),e[ie]=t,t.stateNode=e}return vt(t),null;case 13:if(o=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=yi(t),o!==null&&o.dehydrated!==null){if(e===null){if(!c)throw Error(i(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(i(317));c[ie]=t}else bi(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;vt(t),c=!1}else c=Sm(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(da(t),t):(da(t),null)}if(da(t),(t.flags&128)!==0)return t.lanes=r,t;if(r=o!==null,e=e!==null&&e.memoizedState!==null,r){o=t.child,c=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(c=o.alternate.memoizedState.cachePool.pool);var h=null;o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(h=o.memoizedState.cachePool.pool),h!==c&&(o.flags|=2048)}return r!==e&&r&&(t.child.flags|=8192),ys(t,t.updateQueue),vt(t),null;case 4:return Ze(),e===null&&Lf(t.stateNode.containerInfo),vt(t),null;case 10:return ca(t.type),vt(t),null;case 19:if(P(At),c=t.memoizedState,c===null)return vt(t),null;if(o=(t.flags&128)!==0,h=c.rendering,h===null)if(o)ki(c,!1);else{if(St!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(h=hs(e),h!==null){for(t.flags|=128,ki(c,!1),e=h.updateQueue,t.updateQueue=e,ys(t,e),t.subtreeFlags=0,e=r,r=t.child;r!==null;)ym(r,e),r=r.sibling;return G(At,At.current&1|2),t.child}e=e.sibling}c.tail!==null&&Me()>ws&&(t.flags|=128,o=!0,ki(c,!1),t.lanes=4194304)}else{if(!o)if(e=hs(h),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,ys(t,e),ki(c,!0),c.tail===null&&c.tailMode==="hidden"&&!h.alternate&&!et)return vt(t),null}else 2*Me()-c.renderingStartTime>ws&&r!==536870912&&(t.flags|=128,o=!0,ki(c,!1),t.lanes=4194304);c.isBackwards?(h.sibling=t.child,t.child=h):(e=c.last,e!==null?e.sibling=h:t.child=h,c.last=h)}return c.tail!==null?(t=c.tail,c.rendering=t,c.tail=t.sibling,c.renderingStartTime=Me(),t.sibling=null,e=At.current,G(At,o?e&1|2:e&1),t):(vt(t),null);case 22:case 23:return da(t),kc(),o=t.memoizedState!==null,e!==null?e.memoizedState!==null!==o&&(t.flags|=8192):o&&(t.flags|=8192),o?(r&536870912)!==0&&(t.flags&128)===0&&(vt(t),t.subtreeFlags&6&&(t.flags|=8192)):vt(t),r=t.updateQueue,r!==null&&ys(t,r.retryQueue),r=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),o=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(o=t.memoizedState.cachePool.pool),o!==r&&(t.flags|=2048),e!==null&&P(Tr),null;case 24:return r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ca(Ot),vt(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function J1(e,t){switch(wc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ca(Ot),Ze(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return le(t),null;case 13:if(da(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));bi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return P(At),null;case 4:return Ze(),null;case 10:return ca(t.type),null;case 22:case 23:return da(t),kc(),e!==null&&P(Tr),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ca(Ot),null;case 25:return null;default:return null}}function Kp(e,t){switch(wc(t),t.tag){case 3:ca(Ot),Ze();break;case 26:case 27:case 5:le(t);break;case 4:Ze();break;case 13:da(t);break;case 19:P(At);break;case 10:ca(t.type);break;case 22:case 23:da(t),kc(),e!==null&&P(Tr);break;case 24:ca(Ot)}}function zi(e,t){try{var r=t.updateQueue,o=r!==null?r.lastEffect:null;if(o!==null){var c=o.next;r=c;do{if((r.tag&e)===e){o=void 0;var h=r.create,x=r.inst;o=h(),x.destroy=o}r=r.next}while(r!==c)}}catch(E){ct(t,t.return,E)}}function Pa(e,t,r){try{var o=t.updateQueue,c=o!==null?o.lastEffect:null;if(c!==null){var h=c.next;o=h;do{if((o.tag&e)===e){var x=o.inst,E=x.destroy;if(E!==void 0){x.destroy=void 0,c=t;var A=r,q=E;try{q()}catch(W){ct(c,A,W)}}}o=o.next}while(o!==h)}}catch(W){ct(t,t.return,W)}}function Gp(e){var t=e.updateQueue;if(t!==null){var r=e.stateNode;try{Dm(t,r)}catch(o){ct(e,e.return,o)}}}function Fp(e,t,r){r.props=Dr(e.type,e.memoizedProps),r.state=e.memoizedState;try{r.componentWillUnmount()}catch(o){ct(e,t,o)}}function Ui(e,t){try{var r=e.ref;if(r!==null){switch(e.tag){case 26:case 27:case 5:var o=e.stateNode;break;case 30:o=e.stateNode;break;default:o=e.stateNode}typeof r=="function"?e.refCleanup=r(o):r.current=o}}catch(c){ct(e,t,c)}}function Vn(e,t){var r=e.ref,o=e.refCleanup;if(r!==null)if(typeof o=="function")try{o()}catch(c){ct(e,t,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof r=="function")try{r(null)}catch(c){ct(e,t,c)}else r.current=null}function Xp(e){var t=e.type,r=e.memoizedProps,o=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":r.autoFocus&&o.focus();break e;case"img":r.src?o.src=r.src:r.srcSet&&(o.srcset=r.srcSet)}}catch(c){ct(e,e.return,c)}}function cf(e,t,r){try{var o=e.stateNode;bw(o,e.type,r,t),o[me]=t}catch(c){ct(e,e.return,c)}}function Qp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ga(e.type)||e.tag===4}function ff(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Qp(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&&Ga(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 df(e,t,r){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r).insertBefore(e,t):(t=r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,t.appendChild(e),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=As));else if(o!==4&&(o===27&&Ga(e.type)&&(r=e.stateNode,t=null),e=e.child,e!==null))for(df(e,t,r),e=e.sibling;e!==null;)df(e,t,r),e=e.sibling}function bs(e,t,r){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(o!==4&&(o===27&&Ga(e.type)&&(r=e.stateNode),e=e.child,e!==null))for(bs(e,t,r),e=e.sibling;e!==null;)bs(e,t,r),e=e.sibling}function Zp(e){var t=e.stateNode,r=e.memoizedProps;try{for(var o=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);Ht(t,o,r),t[ie]=e,t[me]=r}catch(h){ct(e,e.return,h)}}var pa=!1,_t=!1,hf=!1,Ip=typeof WeakSet=="function"?WeakSet:Set,Dt=null;function W1(e,t){if(e=e.containerInfo,Uf=Us,e=sm(e),cc(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var o=r.getSelection&&r.getSelection();if(o&&o.rangeCount!==0){r=o.anchorNode;var c=o.anchorOffset,h=o.focusNode;o=o.focusOffset;try{r.nodeType,h.nodeType}catch{r=null;break e}var x=0,E=-1,A=-1,q=0,W=0,re=e,F=null;t:for(;;){for(var X;re!==r||c!==0&&re.nodeType!==3||(E=x+c),re!==h||o!==0&&re.nodeType!==3||(A=x+o),re.nodeType===3&&(x+=re.nodeValue.length),(X=re.firstChild)!==null;)F=re,re=X;for(;;){if(re===e)break t;if(F===r&&++q===c&&(E=x),F===h&&++W===o&&(A=x),(X=re.nextSibling)!==null)break;re=F,F=re.parentNode}re=X}r=E===-1||A===-1?null:{start:E,end:A}}else r=null}r=r||{start:0,end:0}}else r=null;for(Pf={focusedElem:e,selectionRange:r},Us=!1,Dt=t;Dt!==null;)if(t=Dt,e=t.child,(t.subtreeFlags&1024)!==0&&e!==null)e.return=t,Dt=e;else for(;Dt!==null;){switch(t=Dt,h=t.alternate,e=t.flags,t.tag){case 0:break;case 11:case 15:break;case 1:if((e&1024)!==0&&h!==null){e=void 0,r=t,c=h.memoizedProps,h=h.memoizedState,o=r.stateNode;try{var Ue=Dr(r.type,c,r.elementType===r.type);e=o.getSnapshotBeforeUpdate(Ue,h),o.__reactInternalSnapshotBeforeUpdate=e}catch(Le){ct(r,r.return,Le)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,r=e.nodeType,r===9)$f(e);else if(r===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":$f(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(i(163))}if(e=t.sibling,e!==null){e.return=t.return,Dt=e;break}Dt=t.return}}function Jp(e,t,r){var o=r.flags;switch(r.tag){case 0:case 11:case 15:Ha(e,r),o&4&&zi(5,r);break;case 1:if(Ha(e,r),o&4)if(e=r.stateNode,t===null)try{e.componentDidMount()}catch(x){ct(r,r.return,x)}else{var c=Dr(r.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(x){ct(r,r.return,x)}}o&64&&Gp(r),o&512&&Ui(r,r.return);break;case 3:if(Ha(e,r),o&64&&(e=r.updateQueue,e!==null)){if(t=null,r.child!==null)switch(r.child.tag){case 27:case 5:t=r.child.stateNode;break;case 1:t=r.child.stateNode}try{Dm(e,t)}catch(x){ct(r,r.return,x)}}break;case 27:t===null&&o&4&&Zp(r);case 26:case 5:Ha(e,r),t===null&&o&4&&Xp(r),o&512&&Ui(r,r.return);break;case 12:Ha(e,r);break;case 13:Ha(e,r),o&4&&tg(e,r),o&64&&(e=r.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(r=sw.bind(null,r),Nw(e,r))));break;case 22:if(o=r.memoizedState!==null||pa,!o){t=t!==null&&t.memoizedState!==null||_t,c=pa;var h=_t;pa=o,(_t=t)&&!h?Ba(e,r,(r.subtreeFlags&8772)!==0):Ha(e,r),pa=c,_t=h}break;case 30:break;default:Ha(e,r)}}function Wp(e){var t=e.alternate;t!==null&&(e.alternate=null,Wp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ne(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 ht=null,Zt=!1;function ga(e,t,r){for(r=r.child;r!==null;)eg(e,t,r),r=r.sibling}function eg(e,t,r){if(pt&&typeof pt.onCommitFiberUnmount=="function")try{pt.onCommitFiberUnmount(Ft,r)}catch{}switch(r.tag){case 26:_t||Vn(r,t),ga(e,t,r),r.memoizedState?r.memoizedState.count--:r.stateNode&&(r=r.stateNode,r.parentNode.removeChild(r));break;case 27:_t||Vn(r,t);var o=ht,c=Zt;Ga(r.type)&&(ht=r.stateNode,Zt=!1),ga(e,t,r),Gi(r.stateNode),ht=o,Zt=c;break;case 5:_t||Vn(r,t);case 6:if(o=ht,c=Zt,ht=null,ga(e,t,r),ht=o,Zt=c,ht!==null)if(Zt)try{(ht.nodeType===9?ht.body:ht.nodeName==="HTML"?ht.ownerDocument.body:ht).removeChild(r.stateNode)}catch(h){ct(r,t,h)}else try{ht.removeChild(r.stateNode)}catch(h){ct(r,t,h)}break;case 18:ht!==null&&(Zt?(e=ht,Vg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,r.stateNode),eo(e)):Vg(ht,r.stateNode));break;case 4:o=ht,c=Zt,ht=r.stateNode.containerInfo,Zt=!0,ga(e,t,r),ht=o,Zt=c;break;case 0:case 11:case 14:case 15:_t||Pa(2,r,t),_t||Pa(4,r,t),ga(e,t,r);break;case 1:_t||(Vn(r,t),o=r.stateNode,typeof o.componentWillUnmount=="function"&&Fp(r,t,o)),ga(e,t,r);break;case 21:ga(e,t,r);break;case 22:_t=(o=_t)||r.memoizedState!==null,ga(e,t,r),_t=o;break;default:ga(e,t,r)}}function tg(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{eo(e)}catch(r){ct(t,t.return,r)}}function ew(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Ip),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Ip),t;default:throw Error(i(435,e.tag))}}function mf(e,t){var r=ew(e);t.forEach(function(o){var c=uw.bind(null,e,o);r.has(o)||(r.add(o),o.then(c,c))})}function an(e,t){var r=t.deletions;if(r!==null)for(var o=0;o<r.length;o++){var c=r[o],h=e,x=t,E=x;e:for(;E!==null;){switch(E.tag){case 27:if(Ga(E.type)){ht=E.stateNode,Zt=!1;break e}break;case 5:ht=E.stateNode,Zt=!1;break e;case 3:case 4:ht=E.stateNode.containerInfo,Zt=!0;break e}E=E.return}if(ht===null)throw Error(i(160));eg(h,x,c),ht=null,Zt=!1,h=c.alternate,h!==null&&(h.return=null),c.return=null}if(t.subtreeFlags&13878)for(t=t.child;t!==null;)ng(t,e),t=t.sibling}var An=null;function ng(e,t){var r=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:an(t,e),rn(e),o&4&&(Pa(3,e,e.return),zi(3,e),Pa(5,e,e.return));break;case 1:an(t,e),rn(e),o&512&&(_t||r===null||Vn(r,r.return)),o&64&&pa&&(e=e.updateQueue,e!==null&&(o=e.callbacks,o!==null&&(r=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=r===null?o:r.concat(o))));break;case 26:var c=An;if(an(t,e),rn(e),o&512&&(_t||r===null||Vn(r,r.return)),o&4){var h=r!==null?r.memoizedState:null;if(o=e.memoizedState,r===null)if(o===null)if(e.stateNode===null){e:{o=e.type,r=e.memoizedProps,c=c.ownerDocument||c;t:switch(o){case"title":h=c.getElementsByTagName("title")[0],(!h||h[Ce]||h[ie]||h.namespaceURI==="http://www.w3.org/2000/svg"||h.hasAttribute("itemprop"))&&(h=c.createElement(o),c.head.insertBefore(h,c.querySelector("head > title"))),Ht(h,o,r),h[ie]=e,Be(h),o=h;break e;case"link":var x=Zg("link","href",c).get(o+(r.href||""));if(x){for(var E=0;E<x.length;E++)if(h=x[E],h.getAttribute("href")===(r.href==null||r.href===""?null:r.href)&&h.getAttribute("rel")===(r.rel==null?null:r.rel)&&h.getAttribute("title")===(r.title==null?null:r.title)&&h.getAttribute("crossorigin")===(r.crossOrigin==null?null:r.crossOrigin)){x.splice(E,1);break t}}h=c.createElement(o),Ht(h,o,r),c.head.appendChild(h);break;case"meta":if(x=Zg("meta","content",c).get(o+(r.content||""))){for(E=0;E<x.length;E++)if(h=x[E],h.getAttribute("content")===(r.content==null?null:""+r.content)&&h.getAttribute("name")===(r.name==null?null:r.name)&&h.getAttribute("property")===(r.property==null?null:r.property)&&h.getAttribute("http-equiv")===(r.httpEquiv==null?null:r.httpEquiv)&&h.getAttribute("charset")===(r.charSet==null?null:r.charSet)){x.splice(E,1);break t}}h=c.createElement(o),Ht(h,o,r),c.head.appendChild(h);break;default:throw Error(i(468,o))}h[ie]=e,Be(h),o=h}e.stateNode=o}else Ig(c,e.type,e.stateNode);else e.stateNode=Qg(c,o,e.memoizedProps);else h!==o?(h===null?r.stateNode!==null&&(r=r.stateNode,r.parentNode.removeChild(r)):h.count--,o===null?Ig(c,e.type,e.stateNode):Qg(c,o,e.memoizedProps)):o===null&&e.stateNode!==null&&cf(e,e.memoizedProps,r.memoizedProps)}break;case 27:an(t,e),rn(e),o&512&&(_t||r===null||Vn(r,r.return)),r!==null&&o&4&&cf(e,e.memoizedProps,r.memoizedProps);break;case 5:if(an(t,e),rn(e),o&512&&(_t||r===null||Vn(r,r.return)),e.flags&32){c=e.stateNode;try{al(c,"")}catch(X){ct(e,e.return,X)}}o&4&&e.stateNode!=null&&(c=e.memoizedProps,cf(e,c,r!==null?r.memoizedProps:c)),o&1024&&(hf=!0);break;case 6:if(an(t,e),rn(e),o&4){if(e.stateNode===null)throw Error(i(162));o=e.memoizedProps,r=e.stateNode;try{r.nodeValue=o}catch(X){ct(e,e.return,X)}}break;case 3:if(Ls=null,c=An,An=Ms(t.containerInfo),an(t,e),An=c,rn(e),o&4&&r!==null&&r.memoizedState.isDehydrated)try{eo(t.containerInfo)}catch(X){ct(e,e.return,X)}hf&&(hf=!1,ag(e));break;case 4:o=An,An=Ms(e.stateNode.containerInfo),an(t,e),rn(e),An=o;break;case 12:an(t,e),rn(e);break;case 13:an(t,e),rn(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(xf=Me()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,mf(e,o)));break;case 22:c=e.memoizedState!==null;var A=r!==null&&r.memoizedState!==null,q=pa,W=_t;if(pa=q||c,_t=W||A,an(t,e),_t=W,pa=q,rn(e),o&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(r===null||A||pa||_t||Lr(e)),r=null,t=e;;){if(t.tag===5||t.tag===26){if(r===null){A=r=t;try{if(h=A.stateNode,c)x=h.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{E=A.stateNode;var re=A.memoizedProps.style,F=re!=null&&re.hasOwnProperty("display")?re.display:null;E.style.display=F==null||typeof F=="boolean"?"":(""+F).trim()}}catch(X){ct(A,A.return,X)}}}else if(t.tag===6){if(r===null){A=t;try{A.stateNode.nodeValue=c?"":A.memoizedProps}catch(X){ct(A,A.return,X)}}}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;r===t&&(r=null),t=t.return}r===t&&(r=null),t.sibling.return=t.return,t=t.sibling}o&4&&(o=e.updateQueue,o!==null&&(r=o.retryQueue,r!==null&&(o.retryQueue=null,mf(e,r))));break;case 19:an(t,e),rn(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,mf(e,o)));break;case 30:break;case 21:break;default:an(t,e),rn(e)}}function rn(e){var t=e.flags;if(t&2){try{for(var r,o=e.return;o!==null;){if(Qp(o)){r=o;break}o=o.return}if(r==null)throw Error(i(160));switch(r.tag){case 27:var c=r.stateNode,h=ff(e);bs(e,h,c);break;case 5:var x=r.stateNode;r.flags&32&&(al(x,""),r.flags&=-33);var E=ff(e);bs(e,E,x);break;case 3:case 4:var A=r.stateNode.containerInfo,q=ff(e);df(e,q,A);break;default:throw Error(i(161))}}catch(W){ct(e,e.return,W)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ag(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;ag(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ha(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Jp(e,t.alternate,t),t=t.sibling}function Lr(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Pa(4,t,t.return),Lr(t);break;case 1:Vn(t,t.return);var r=t.stateNode;typeof r.componentWillUnmount=="function"&&Fp(t,t.return,r),Lr(t);break;case 27:Gi(t.stateNode);case 26:case 5:Vn(t,t.return),Lr(t);break;case 22:t.memoizedState===null&&Lr(t);break;case 30:Lr(t);break;default:Lr(t)}e=e.sibling}}function Ba(e,t,r){for(r=r&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var o=t.alternate,c=e,h=t,x=h.flags;switch(h.tag){case 0:case 11:case 15:Ba(c,h,r),zi(4,h);break;case 1:if(Ba(c,h,r),o=h,c=o.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(q){ct(o,o.return,q)}if(o=h,c=o.updateQueue,c!==null){var E=o.stateNode;try{var A=c.shared.hiddenCallbacks;if(A!==null)for(c.shared.hiddenCallbacks=null,c=0;c<A.length;c++)Mm(A[c],E)}catch(q){ct(o,o.return,q)}}r&&x&64&&Gp(h),Ui(h,h.return);break;case 27:Zp(h);case 26:case 5:Ba(c,h,r),r&&o===null&&x&4&&Xp(h),Ui(h,h.return);break;case 12:Ba(c,h,r);break;case 13:Ba(c,h,r),r&&x&4&&tg(c,h);break;case 22:h.memoizedState===null&&Ba(c,h,r),Ui(h,h.return);break;case 30:break;default:Ba(c,h,r)}t=t.sibling}}function pf(e,t){var r=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==r&&(e!=null&&e.refCount++,r!=null&&Si(r))}function gf(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Si(e))}function Yn(e,t,r,o){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)rg(e,t,r,o),t=t.sibling}function rg(e,t,r,o){var c=t.flags;switch(t.tag){case 0:case 11:case 15:Yn(e,t,r,o),c&2048&&zi(9,t);break;case 1:Yn(e,t,r,o);break;case 3:Yn(e,t,r,o),c&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Si(e)));break;case 12:if(c&2048){Yn(e,t,r,o),e=t.stateNode;try{var h=t.memoizedProps,x=h.id,E=h.onPostCommit;typeof E=="function"&&E(x,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(A){ct(t,t.return,A)}}else Yn(e,t,r,o);break;case 13:Yn(e,t,r,o);break;case 23:break;case 22:h=t.stateNode,x=t.alternate,t.memoizedState!==null?h._visibility&2?Yn(e,t,r,o):Pi(e,t):h._visibility&2?Yn(e,t,r,o):(h._visibility|=2,Sl(e,t,r,o,(t.subtreeFlags&10256)!==0)),c&2048&&pf(x,t);break;case 24:Yn(e,t,r,o),c&2048&&gf(t.alternate,t);break;default:Yn(e,t,r,o)}}function Sl(e,t,r,o,c){for(c=c&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;){var h=e,x=t,E=r,A=o,q=x.flags;switch(x.tag){case 0:case 11:case 15:Sl(h,x,E,A,c),zi(8,x);break;case 23:break;case 22:var W=x.stateNode;x.memoizedState!==null?W._visibility&2?Sl(h,x,E,A,c):Pi(h,x):(W._visibility|=2,Sl(h,x,E,A,c)),c&&q&2048&&pf(x.alternate,x);break;case 24:Sl(h,x,E,A,c),c&&q&2048&&gf(x.alternate,x);break;default:Sl(h,x,E,A,c)}t=t.sibling}}function Pi(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var r=e,o=t,c=o.flags;switch(o.tag){case 22:Pi(r,o),c&2048&&pf(o.alternate,o);break;case 24:Pi(r,o),c&2048&&gf(o.alternate,o);break;default:Pi(r,o)}t=t.sibling}}var Hi=8192;function El(e){if(e.subtreeFlags&Hi)for(e=e.child;e!==null;)lg(e),e=e.sibling}function lg(e){switch(e.tag){case 26:El(e),e.flags&Hi&&e.memoizedState!==null&&Hw(An,e.memoizedState,e.memoizedProps);break;case 5:El(e);break;case 3:case 4:var t=An;An=Ms(e.stateNode.containerInfo),El(e),An=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=Hi,Hi=16777216,El(e),Hi=t):El(e));break;default:El(e)}}function ig(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 Bi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var r=0;r<t.length;r++){var o=t[r];Dt=o,sg(o,e)}ig(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)og(e),e=e.sibling}function og(e){switch(e.tag){case 0:case 11:case 15:Bi(e),e.flags&2048&&Pa(9,e,e.return);break;case 3:Bi(e);break;case 12:Bi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,xs(e)):Bi(e);break;default:Bi(e)}}function xs(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var r=0;r<t.length;r++){var o=t[r];Dt=o,sg(o,e)}ig(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Pa(8,t,t.return),xs(t);break;case 22:r=t.stateNode,r._visibility&2&&(r._visibility&=-3,xs(t));break;default:xs(t)}e=e.sibling}}function sg(e,t){for(;Dt!==null;){var r=Dt;switch(r.tag){case 0:case 11:case 15:Pa(8,r,t);break;case 23:case 22:if(r.memoizedState!==null&&r.memoizedState.cachePool!==null){var o=r.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:Si(r.memoizedState.cache)}if(o=r.child,o!==null)o.return=r,Dt=o;else e:for(r=e;Dt!==null;){o=Dt;var c=o.sibling,h=o.return;if(Wp(o),o===r){Dt=null;break e}if(c!==null){c.return=h,Dt=c;break e}Dt=h}}}var tw={getCacheForType:function(e){var t=$t(Ot),r=t.data.get(e);return r===void 0&&(r=e(),t.data.set(e,r)),r}},nw=typeof WeakMap=="function"?WeakMap:Map,nt=0,ft=null,Xe=null,Ie=0,at=0,ln=null,$a=!1,Cl=!1,vf=!1,va=0,St=0,Va=0,kr=0,yf=0,En=0,_l=0,$i=null,It=null,bf=!1,xf=0,ws=1/0,Ss=null,Ya=null,Pt=0,qa=null,Nl=null,Rl=0,wf=0,Sf=null,ug=null,Vi=0,Ef=null;function on(){if((nt&2)!==0&&Ie!==0)return Ie&-Ie;if(L.T!==null){var e=ml;return e!==0?e:Af()}return M()}function cg(){En===0&&(En=(Ie&536870912)===0||et?Wr():536870912);var e=Sn.current;return e!==null&&(e.flags|=32),En}function sn(e,t,r){(e===ft&&(at===2||at===9)||e.cancelPendingCommit!==null)&&(jl(e,0),Ka(e,Ie,En,!1)),vr(e,r),((nt&2)===0||e!==ft)&&(e===ft&&((nt&2)===0&&(kr|=r),St===4&&Ka(e,Ie,En,!1)),qn(e))}function fg(e,t,r){if((nt&6)!==0)throw Error(i(327));var o=!r&&(t&124)===0&&(t&e.expiredLanes)===0||Pn(e,t),c=o?lw(e,t):Nf(e,t,!0),h=o;do{if(c===0){Cl&&!o&&Ka(e,t,0,!1);break}else{if(r=e.current.alternate,h&&!aw(r)){c=Nf(e,t,!1),h=!1;continue}if(c===2){if(h=t,e.errorRecoveryDisabledLanes&h)var x=0;else x=e.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){t=x;e:{var E=e;c=$i;var A=E.current.memoizedState.isDehydrated;if(A&&(jl(E,x).flags|=256),x=Nf(E,x,!1),x!==2){if(vf&&!A){E.errorRecoveryDisabledLanes|=h,kr|=h,c=4;break e}h=It,It=c,h!==null&&(It===null?It=h:It.push.apply(It,h))}c=x}if(h=!1,c!==2)continue}}if(c===1){jl(e,0),Ka(e,t,0,!0);break}e:{switch(o=e,h=c,h){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:Ka(o,t,En,!$a);break e;case 2:It=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(c=xf+300-Me(),10<c)){if(Ka(o,t,En,!$a),gr(o,0,!0)!==0)break e;o.timeoutHandle=Bg(dg.bind(null,o,r,It,Ss,bf,t,En,kr,_l,$a,h,2,-0,0),c);break e}dg(o,r,It,Ss,bf,t,En,kr,_l,$a,h,0,-0,0)}}break}while(!0);qn(e)}function dg(e,t,r,o,c,h,x,E,A,q,W,re,F,X){if(e.timeoutHandle=-1,re=t.subtreeFlags,(re&8192||(re&16785408)===16785408)&&(Qi={stylesheets:null,count:0,unsuspend:Pw},lg(t),re=Bw(),re!==null)){e.cancelPendingCommit=re(bg.bind(null,e,t,h,r,o,c,x,E,A,W,1,F,X)),Ka(e,h,x,!q);return}bg(e,t,h,r,o,c,x,E,A)}function aw(e){for(var t=e;;){var r=t.tag;if((r===0||r===11||r===15)&&t.flags&16384&&(r=t.updateQueue,r!==null&&(r=r.stores,r!==null)))for(var o=0;o<r.length;o++){var c=r[o],h=c.getSnapshot;c=c.value;try{if(!tn(h(),c))return!1}catch{return!1}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ka(e,t,r,o){t&=~yf,t&=~kr,e.suspendedLanes|=t,e.pingedLanes&=~t,o&&(e.warmLanes|=t),o=e.expirationTimes;for(var c=t;0<c;){var h=31-zt(c),x=1<<h;o[h]=-1,c&=~x}r!==0&&yr(e,r,t)}function Es(){return(nt&6)===0?(Yi(0),!1):!0}function Cf(){if(Xe!==null){if(at===0)var e=Xe.return;else e=Xe,ua=Or=null,Bc(e),xl=null,Di=0,e=Xe;for(;e!==null;)Kp(e.alternate,e),e=e.return;Xe=null}}function jl(e,t){var r=e.timeoutHandle;r!==-1&&(e.timeoutHandle=-1,ww(r)),r=e.cancelPendingCommit,r!==null&&(e.cancelPendingCommit=null,r()),Cf(),ft=e,Xe=r=ia(e.current,null),Ie=t,at=0,ln=null,$a=!1,Cl=Pn(e,t),vf=!1,_l=En=yf=kr=Va=St=0,It=$i=null,bf=!1,(t&8)!==0&&(t|=t&32);var o=e.entangledLanes;if(o!==0)for(e=e.entanglements,o&=t;0<o;){var c=31-zt(o),h=1<<c;t|=e[c],o&=~h}return va=t,Ko(),r}function hg(e,t){Ye=null,L.H=cs,t===Ci||t===es?(t=Am(),at=3):t===Rm?(t=Am(),at=4):at=t===Tp?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,ln=t,Xe===null&&(St=1,ps(e,yn(t,e.current)))}function mg(){var e=L.H;return L.H=cs,e===null?cs:e}function pg(){var e=L.A;return L.A=tw,e}function _f(){St=4,$a||(Ie&4194048)!==Ie&&Sn.current!==null||(Cl=!0),(Va&134217727)===0&&(kr&134217727)===0||ft===null||Ka(ft,Ie,En,!1)}function Nf(e,t,r){var o=nt;nt|=2;var c=mg(),h=pg();(ft!==e||Ie!==t)&&(Ss=null,jl(e,t)),t=!1;var x=St;e:do try{if(at!==0&&Xe!==null){var E=Xe,A=ln;switch(at){case 8:Cf(),x=6;break e;case 3:case 2:case 9:case 6:Sn.current===null&&(t=!0);var q=at;if(at=0,ln=null,Ol(e,E,A,q),r&&Cl){x=0;break e}break;default:q=at,at=0,ln=null,Ol(e,E,A,q)}}rw(),x=St;break}catch(W){hg(e,W)}while(!0);return t&&e.shellSuspendCounter++,ua=Or=null,nt=o,L.H=c,L.A=h,Xe===null&&(ft=null,Ie=0,Ko()),x}function rw(){for(;Xe!==null;)gg(Xe)}function lw(e,t){var r=nt;nt|=2;var o=mg(),c=pg();ft!==e||Ie!==t?(Ss=null,ws=Me()+500,jl(e,t)):Cl=Pn(e,t);e:do try{if(at!==0&&Xe!==null){t=Xe;var h=ln;t:switch(at){case 1:at=0,ln=null,Ol(e,t,h,1);break;case 2:case 9:if(jm(h)){at=0,ln=null,vg(t);break}t=function(){at!==2&&at!==9||ft!==e||(at=7),qn(e)},h.then(t,t);break e;case 3:at=7;break e;case 4:at=5;break e;case 7:jm(h)?(at=0,ln=null,vg(t)):(at=0,ln=null,Ol(e,t,h,7));break;case 5:var x=null;switch(Xe.tag){case 26:x=Xe.memoizedState;case 5:case 27:var E=Xe;if(!x||Jg(x)){at=0,ln=null;var A=E.sibling;if(A!==null)Xe=A;else{var q=E.return;q!==null?(Xe=q,Cs(q)):Xe=null}break t}}at=0,ln=null,Ol(e,t,h,5);break;case 6:at=0,ln=null,Ol(e,t,h,6);break;case 8:Cf(),St=6;break e;default:throw Error(i(462))}}iw();break}catch(W){hg(e,W)}while(!0);return ua=Or=null,L.H=o,L.A=c,nt=r,Xe!==null?0:(ft=null,Ie=0,Ko(),St)}function iw(){for(;Xe!==null&&!je();)gg(Xe)}function gg(e){var t=Yp(e.alternate,e,va);e.memoizedProps=e.pendingProps,t===null?Cs(e):Xe=t}function vg(e){var t=e,r=t.alternate;switch(t.tag){case 15:case 0:t=Up(r,t,t.pendingProps,t.type,void 0,Ie);break;case 11:t=Up(r,t,t.pendingProps,t.type.render,t.ref,Ie);break;case 5:Bc(t);default:Kp(r,t),t=Xe=ym(t,va),t=Yp(r,t,va)}e.memoizedProps=e.pendingProps,t===null?Cs(e):Xe=t}function Ol(e,t,r,o){ua=Or=null,Bc(t),xl=null,Di=0;var c=t.return;try{if(Q1(e,c,t,r,Ie)){St=1,ps(e,yn(r,e.current)),Xe=null;return}}catch(h){if(c!==null)throw Xe=c,h;St=1,ps(e,yn(r,e.current)),Xe=null;return}t.flags&32768?(et||o===1?e=!0:Cl||(Ie&536870912)!==0?e=!1:($a=e=!0,(o===2||o===9||o===3||o===6)&&(o=Sn.current,o!==null&&o.tag===13&&(o.flags|=16384))),yg(t,e)):Cs(t)}function Cs(e){var t=e;do{if((t.flags&32768)!==0){yg(t,$a);return}e=t.return;var r=I1(t.alternate,t,va);if(r!==null){Xe=r;return}if(t=t.sibling,t!==null){Xe=t;return}Xe=t=e}while(t!==null);St===0&&(St=5)}function yg(e,t){do{var r=J1(e.alternate,e);if(r!==null){r.flags&=32767,Xe=r;return}if(r=e.return,r!==null&&(r.flags|=32768,r.subtreeFlags=0,r.deletions=null),!t&&(e=e.sibling,e!==null)){Xe=e;return}Xe=e=r}while(e!==null);St=6,Xe=null}function bg(e,t,r,o,c,h,x,E,A){e.cancelPendingCommit=null;do _s();while(Pt!==0);if((nt&6)!==0)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(h=t.lanes|t.childLanes,h|=pc,Do(e,r,h,x,E,A),e===ft&&(Xe=ft=null,Ie=0),Nl=t,qa=e,Rl=r,wf=h,Sf=c,ug=o,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,cw(Jr,function(){return Cg(),null})):(e.callbackNode=null,e.callbackPriority=0),o=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||o){o=L.T,L.T=null,c=I.p,I.p=2,x=nt,nt|=4;try{W1(e,t,r)}finally{nt=x,I.p=c,L.T=o}}Pt=1,xg(),wg(),Sg()}}function xg(){if(Pt===1){Pt=0;var e=qa,t=Nl,r=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||r){r=L.T,L.T=null;var o=I.p;I.p=2;var c=nt;nt|=4;try{ng(t,e);var h=Pf,x=sm(e.containerInfo),E=h.focusedElem,A=h.selectionRange;if(x!==E&&E&&E.ownerDocument&&om(E.ownerDocument.documentElement,E)){if(A!==null&&cc(E)){var q=A.start,W=A.end;if(W===void 0&&(W=q),"selectionStart"in E)E.selectionStart=q,E.selectionEnd=Math.min(W,E.value.length);else{var re=E.ownerDocument||document,F=re&&re.defaultView||window;if(F.getSelection){var X=F.getSelection(),Ue=E.textContent.length,Le=Math.min(A.start,Ue),st=A.end===void 0?Le:Math.min(A.end,Ue);!X.extend&&Le>st&&(x=st,st=Le,Le=x);var B=im(E,Le),k=im(E,st);if(B&&k&&(X.rangeCount!==1||X.anchorNode!==B.node||X.anchorOffset!==B.offset||X.focusNode!==k.node||X.focusOffset!==k.offset)){var Y=re.createRange();Y.setStart(B.node,B.offset),X.removeAllRanges(),Le>st?(X.addRange(Y),X.extend(k.node,k.offset)):(Y.setEnd(k.node,k.offset),X.addRange(Y))}}}}for(re=[],X=E;X=X.parentNode;)X.nodeType===1&&re.push({element:X,left:X.scrollLeft,top:X.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<re.length;E++){var te=re[E];te.element.scrollLeft=te.left,te.element.scrollTop=te.top}}Us=!!Uf,Pf=Uf=null}finally{nt=c,I.p=o,L.T=r}}e.current=t,Pt=2}}function wg(){if(Pt===2){Pt=0;var e=qa,t=Nl,r=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||r){r=L.T,L.T=null;var o=I.p;I.p=2;var c=nt;nt|=4;try{Jp(e,t.alternate,t)}finally{nt=c,I.p=o,L.T=r}}Pt=3}}function Sg(){if(Pt===4||Pt===3){Pt=0,Pe();var e=qa,t=Nl,r=Rl,o=ug;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Pt=5:(Pt=0,Nl=qa=null,Eg(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(Ya=null),si(r),t=t.stateNode,pt&&typeof pt.onCommitFiberRoot=="function")try{pt.onCommitFiberRoot(Ft,t,void 0,(t.current.flags&128)===128)}catch{}if(o!==null){t=L.T,c=I.p,I.p=2,L.T=null;try{for(var h=e.onRecoverableError,x=0;x<o.length;x++){var E=o[x];h(E.value,{componentStack:E.stack})}}finally{L.T=t,I.p=c}}(Rl&3)!==0&&_s(),qn(e),c=e.pendingLanes,(r&4194090)!==0&&(c&42)!==0?e===Ef?Vi++:(Vi=0,Ef=e):Vi=0,Yi(0)}}function Eg(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Si(t)))}function _s(e){return xg(),wg(),Sg(),Cg()}function Cg(){if(Pt!==5)return!1;var e=qa,t=wf;wf=0;var r=si(Rl),o=L.T,c=I.p;try{I.p=32>r?32:r,L.T=null,r=Sf,Sf=null;var h=qa,x=Rl;if(Pt=0,Nl=qa=null,Rl=0,(nt&6)!==0)throw Error(i(331));var E=nt;if(nt|=4,og(h.current),rg(h,h.current,x,r),nt=E,Yi(0,!1),pt&&typeof pt.onPostCommitFiberRoot=="function")try{pt.onPostCommitFiberRoot(Ft,h)}catch{}return!0}finally{I.p=c,L.T=o,Eg(e,t)}}function _g(e,t,r){t=yn(r,t),t=ef(e.stateNode,t,2),e=La(e,t,2),e!==null&&(vr(e,2),qn(e))}function ct(e,t,r){if(e.tag===3)_g(e,e,r);else for(;t!==null;){if(t.tag===3){_g(t,e,r);break}else if(t.tag===1){var o=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Ya===null||!Ya.has(o))){e=yn(r,e),r=Op(2),o=La(t,r,2),o!==null&&(Ap(r,o,t,e),vr(o,2),qn(o));break}}t=t.return}}function Rf(e,t,r){var o=e.pingCache;if(o===null){o=e.pingCache=new nw;var c=new Set;o.set(t,c)}else c=o.get(t),c===void 0&&(c=new Set,o.set(t,c));c.has(r)||(vf=!0,c.add(r),e=ow.bind(null,e,t,r),t.then(e,e))}function ow(e,t,r){var o=e.pingCache;o!==null&&o.delete(t),e.pingedLanes|=e.suspendedLanes&r,e.warmLanes&=~r,ft===e&&(Ie&r)===r&&(St===4||St===3&&(Ie&62914560)===Ie&&300>Me()-xf?(nt&2)===0&&jl(e,0):yf|=r,_l===Ie&&(_l=0)),qn(e)}function Ng(e,t){t===0&&(t=Mo()),e=cl(e,t),e!==null&&(vr(e,t),qn(e))}function sw(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Ng(e,r)}function uw(e,t){var r=0;switch(e.tag){case 13:var o=e.stateNode,c=e.memoizedState;c!==null&&(r=c.retryLane);break;case 19:o=e.stateNode;break;case 22:o=e.stateNode._retryCache;break;default:throw Error(i(314))}o!==null&&o.delete(t),Ng(e,r)}function cw(e,t){return ue(e,t)}var Ns=null,Al=null,jf=!1,Rs=!1,Of=!1,zr=0;function qn(e){e!==Al&&e.next===null&&(Al===null?Ns=Al=e:Al=Al.next=e),Rs=!0,jf||(jf=!0,dw())}function Yi(e,t){if(!Of&&Rs){Of=!0;do for(var r=!1,o=Ns;o!==null;){if(e!==0){var c=o.pendingLanes;if(c===0)var h=0;else{var x=o.suspendedLanes,E=o.pingedLanes;h=(1<<31-zt(42|e)+1)-1,h&=c&~(x&~E),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(r=!0,Ag(o,h))}else h=Ie,h=gr(o,o===ft?h:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(h&3)===0||Pn(o,h)||(r=!0,Ag(o,h));o=o.next}while(r);Of=!1}}function fw(){Rg()}function Rg(){Rs=jf=!1;var e=0;zr!==0&&(xw()&&(e=zr),zr=0);for(var t=Me(),r=null,o=Ns;o!==null;){var c=o.next,h=jg(o,t);h===0?(o.next=null,r===null?Ns=c:r.next=c,c===null&&(Al=r)):(r=o,(e!==0||(h&3)!==0)&&(Rs=!0)),o=c}Yi(e)}function jg(e,t){for(var r=e.suspendedLanes,o=e.pingedLanes,c=e.expirationTimes,h=e.pendingLanes&-62914561;0<h;){var x=31-zt(h),E=1<<x,A=c[x];A===-1?((E&r)===0||(E&o)!==0)&&(c[x]=To(E,t)):A<=t&&(e.expiredLanes|=E),h&=~E}if(t=ft,r=Ie,r=gr(e,e===t?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,r===0||e===t&&(at===2||at===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&ce(o),e.callbackNode=null,e.callbackPriority=0;if((r&3)===0||Pn(e,r)){if(t=r&-r,t===e.callbackPriority)return t;switch(o!==null&&ce(o),si(r)){case 2:case 8:r=Ir;break;case 32:r=Jr;break;case 268435456:r=Ra;break;default:r=Jr}return o=Og.bind(null,e),r=ue(r,o),e.callbackPriority=t,e.callbackNode=r,t}return o!==null&&o!==null&&ce(o),e.callbackPriority=2,e.callbackNode=null,2}function Og(e,t){if(Pt!==0&&Pt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var r=e.callbackNode;if(_s()&&e.callbackNode!==r)return null;var o=Ie;return o=gr(e,e===ft?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(fg(e,o,t),jg(e,Me()),e.callbackNode!=null&&e.callbackNode===r?Og.bind(null,e):null)}function Ag(e,t){if(_s())return null;fg(e,t,!0)}function dw(){Sw(function(){(nt&6)!==0?ue(Rn,fw):Rg()})}function Af(){return zr===0&&(zr=Wr()),zr}function Tg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Po(""+e)}function Mg(e,t){var r=t.ownerDocument.createElement("input");return r.name=t.name,r.value=t.value,e.id&&r.setAttribute("form",e.id),t.parentNode.insertBefore(r,t),e=new FormData(e),r.parentNode.removeChild(r),e}function hw(e,t,r,o,c){if(t==="submit"&&r&&r.stateNode===c){var h=Tg((c[me]||null).action),x=o.submitter;x&&(t=(t=x[me]||null)?Tg(t.formAction):x.getAttribute("formAction"),t!==null&&(h=t,x=null));var E=new Vo("action","action",null,o,c);e.push({event:E,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(zr!==0){var A=x?Mg(c,x):new FormData(c);Qc(r,{pending:!0,data:A,method:c.method,action:h},null,A)}}else typeof h=="function"&&(E.preventDefault(),A=x?Mg(c,x):new FormData(c),Qc(r,{pending:!0,data:A,method:c.method,action:h},h,A))},currentTarget:c}]})}}for(var Tf=0;Tf<mc.length;Tf++){var Mf=mc[Tf],mw=Mf.toLowerCase(),pw=Mf[0].toUpperCase()+Mf.slice(1);On(mw,"on"+pw)}On(fm,"onAnimationEnd"),On(dm,"onAnimationIteration"),On(hm,"onAnimationStart"),On("dblclick","onDoubleClick"),On("focusin","onFocus"),On("focusout","onBlur"),On(M1,"onTransitionRun"),On(D1,"onTransitionStart"),On(L1,"onTransitionCancel"),On(mm,"onTransitionEnd"),qt("onMouseEnter",["mouseout","mouseover"]),qt("onMouseLeave",["mouseout","mouseover"]),qt("onPointerEnter",["pointerout","pointerover"]),qt("onPointerLeave",["pointerout","pointerover"]),en("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),en("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),en("onBeforeInput",["compositionend","keypress","textInput","paste"]),en("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),en("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),en("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var qi="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(" "),gw=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(qi));function Dg(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var o=e[r],c=o.event;o=o.listeners;e:{var h=void 0;if(t)for(var x=o.length-1;0<=x;x--){var E=o[x],A=E.instance,q=E.currentTarget;if(E=E.listener,A!==h&&c.isPropagationStopped())break e;h=E,c.currentTarget=q;try{h(c)}catch(W){ms(W)}c.currentTarget=null,h=A}else for(x=0;x<o.length;x++){if(E=o[x],A=E.instance,q=E.currentTarget,E=E.listener,A!==h&&c.isPropagationStopped())break e;h=E,c.currentTarget=q;try{h(c)}catch(W){ms(W)}c.currentTarget=null,h=A}}}}function Qe(e,t){var r=t[_e];r===void 0&&(r=t[_e]=new Set);var o=e+"__bubble";r.has(o)||(Lg(t,e,2,!1),r.add(o))}function Df(e,t,r){var o=0;t&&(o|=4),Lg(r,e,o,t)}var js="_reactListening"+Math.random().toString(36).slice(2);function Lf(e){if(!e[js]){e[js]=!0,lt.forEach(function(r){r!=="selectionchange"&&(gw.has(r)||Df(r,!1,e),Df(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[js]||(t[js]=!0,Df("selectionchange",!1,t))}}function Lg(e,t,r,o){switch(rv(t)){case 2:var c=Yw;break;case 8:c=qw;break;default:c=Xf}r=c.bind(null,t,r,e),c=void 0,!tc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),o?c!==void 0?e.addEventListener(t,r,{capture:!0,passive:c}):e.addEventListener(t,r,!0):c!==void 0?e.addEventListener(t,r,{passive:c}):e.addEventListener(t,r,!1)}function kf(e,t,r,o,c){var h=o;if((t&1)===0&&(t&2)===0&&o!==null)e:for(;;){if(o===null)return;var x=o.tag;if(x===3||x===4){var E=o.stateNode.containerInfo;if(E===c)break;if(x===4)for(x=o.return;x!==null;){var A=x.tag;if((A===3||A===4)&&x.stateNode.containerInfo===c)return;x=x.return}for(;E!==null;){if(x=Ve(E),x===null)return;if(A=x.tag,A===5||A===6||A===26||A===27){o=h=x;continue e}E=E.parentNode}}o=o.return}$h(function(){var q=h,W=Wu(r),re=[];e:{var F=pm.get(e);if(F!==void 0){var X=Vo,Ue=e;switch(e){case"keypress":if(Bo(r)===0)break e;case"keydown":case"keyup":X=c1;break;case"focusin":Ue="focus",X=lc;break;case"focusout":Ue="blur",X=lc;break;case"beforeblur":case"afterblur":X=lc;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":X=qh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":X=Jx;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":X=h1;break;case fm:case dm:case hm:X=t1;break;case mm:X=p1;break;case"scroll":case"scrollend":X=Zx;break;case"wheel":X=v1;break;case"copy":case"cut":case"paste":X=a1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":X=Gh;break;case"toggle":case"beforetoggle":X=b1}var Le=(t&4)!==0,st=!Le&&(e==="scroll"||e==="scrollend"),B=Le?F!==null?F+"Capture":null:F;Le=[];for(var k=q,Y;k!==null;){var te=k;if(Y=te.stateNode,te=te.tag,te!==5&&te!==26&&te!==27||Y===null||B===null||(te=ui(k,B),te!=null&&Le.push(Ki(k,te,Y))),st)break;k=k.return}0<Le.length&&(F=new X(F,Ue,null,r,W),re.push({event:F,listeners:Le}))}}if((t&7)===0){e:{if(F=e==="mouseover"||e==="pointerover",X=e==="mouseout"||e==="pointerout",F&&r!==Ju&&(Ue=r.relatedTarget||r.fromElement)&&(Ve(Ue)||Ue[we]))break e;if((X||F)&&(F=W.window===W?W:(F=W.ownerDocument)?F.defaultView||F.parentWindow:window,X?(Ue=r.relatedTarget||r.toElement,X=q,Ue=Ue?Ve(Ue):null,Ue!==null&&(st=u(Ue),Le=Ue.tag,Ue!==st||Le!==5&&Le!==27&&Le!==6)&&(Ue=null)):(X=null,Ue=q),X!==Ue)){if(Le=qh,te="onMouseLeave",B="onMouseEnter",k="mouse",(e==="pointerout"||e==="pointerover")&&(Le=Gh,te="onPointerLeave",B="onPointerEnter",k="pointer"),st=X==null?F:bt(X),Y=Ue==null?F:bt(Ue),F=new Le(te,k+"leave",X,r,W),F.target=st,F.relatedTarget=Y,te=null,Ve(W)===q&&(Le=new Le(B,k+"enter",Ue,r,W),Le.target=Y,Le.relatedTarget=st,te=Le),st=te,X&&Ue)t:{for(Le=X,B=Ue,k=0,Y=Le;Y;Y=Tl(Y))k++;for(Y=0,te=B;te;te=Tl(te))Y++;for(;0<k-Y;)Le=Tl(Le),k--;for(;0<Y-k;)B=Tl(B),Y--;for(;k--;){if(Le===B||B!==null&&Le===B.alternate)break t;Le=Tl(Le),B=Tl(B)}Le=null}else Le=null;X!==null&&kg(re,F,X,Le,!1),Ue!==null&&st!==null&&kg(re,st,Ue,Le,!0)}}e:{if(F=q?bt(q):window,X=F.nodeName&&F.nodeName.toLowerCase(),X==="select"||X==="input"&&F.type==="file")var ye=em;else if(Jh(F))if(tm)ye=O1;else{ye=R1;var Ge=N1}else X=F.nodeName,!X||X.toLowerCase()!=="input"||F.type!=="checkbox"&&F.type!=="radio"?q&&Iu(q.elementType)&&(ye=em):ye=j1;if(ye&&(ye=ye(e,q))){Wh(re,ye,r,W);break e}Ge&&Ge(e,F,q),e==="focusout"&&q&&F.type==="number"&&q.memoizedProps.value!=null&&Zu(F,"number",F.value)}switch(Ge=q?bt(q):window,e){case"focusin":(Jh(Ge)||Ge.contentEditable==="true")&&(ol=Ge,fc=q,vi=null);break;case"focusout":vi=fc=ol=null;break;case"mousedown":dc=!0;break;case"contextmenu":case"mouseup":case"dragend":dc=!1,um(re,r,W);break;case"selectionchange":if(T1)break;case"keydown":case"keyup":um(re,r,W)}var Re;if(oc)e:{switch(e){case"compositionstart":var ke="onCompositionStart";break e;case"compositionend":ke="onCompositionEnd";break e;case"compositionupdate":ke="onCompositionUpdate";break e}ke=void 0}else il?Zh(e,r)&&(ke="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(ke="onCompositionStart");ke&&(Fh&&r.locale!=="ko"&&(il||ke!=="onCompositionStart"?ke==="onCompositionEnd"&&il&&(Re=Vh()):(Aa=W,nc="value"in Aa?Aa.value:Aa.textContent,il=!0)),Ge=Os(q,ke),0<Ge.length&&(ke=new Kh(ke,e,null,r,W),re.push({event:ke,listeners:Ge}),Re?ke.data=Re:(Re=Ih(r),Re!==null&&(ke.data=Re)))),(Re=w1?S1(e,r):E1(e,r))&&(ke=Os(q,"onBeforeInput"),0<ke.length&&(Ge=new Kh("onBeforeInput","beforeinput",null,r,W),re.push({event:Ge,listeners:ke}),Ge.data=Re)),hw(re,e,q,r,W)}Dg(re,t)})}function Ki(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Os(e,t){for(var r=t+"Capture",o=[];e!==null;){var c=e,h=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||h===null||(c=ui(e,r),c!=null&&o.unshift(Ki(e,c,h)),c=ui(e,t),c!=null&&o.push(Ki(e,c,h))),e.tag===3)return o;e=e.return}return[]}function Tl(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function kg(e,t,r,o,c){for(var h=t._reactName,x=[];r!==null&&r!==o;){var E=r,A=E.alternate,q=E.stateNode;if(E=E.tag,A!==null&&A===o)break;E!==5&&E!==26&&E!==27||q===null||(A=q,c?(q=ui(r,h),q!=null&&x.unshift(Ki(r,q,A))):c||(q=ui(r,h),q!=null&&x.push(Ki(r,q,A)))),r=r.return}x.length!==0&&e.push({event:t,listeners:x})}var vw=/\r\n?/g,yw=/\u0000|\uFFFD/g;function zg(e){return(typeof e=="string"?e:""+e).replace(vw,`
|
|
55
|
-
`).replace(yw,"")}function Ug(e,t){return t=zg(t),zg(e)===t}function As(){}function ot(e,t,r,o,c,h){switch(r){case"children":typeof o=="string"?t==="body"||t==="textarea"&&o===""||al(e,o):(typeof o=="number"||typeof o=="bigint")&&t!=="body"&&al(e,""+o);break;case"className":ra(e,"class",o);break;case"tabIndex":ra(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":ra(e,r,o);break;case"style":Hh(e,o,h);break;case"data":if(t!=="object"){ra(e,"data",o);break}case"src":case"href":if(o===""&&(t!=="a"||r!=="href")){e.removeAttribute(r);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(r);break}o=Po(""+o),e.setAttribute(r,o);break;case"action":case"formAction":if(typeof o=="function"){e.setAttribute(r,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof h=="function"&&(r==="formAction"?(t!=="input"&&ot(e,t,"name",c.name,c,null),ot(e,t,"formEncType",c.formEncType,c,null),ot(e,t,"formMethod",c.formMethod,c,null),ot(e,t,"formTarget",c.formTarget,c,null)):(ot(e,t,"encType",c.encType,c,null),ot(e,t,"method",c.method,c,null),ot(e,t,"target",c.target,c,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(r);break}o=Po(""+o),e.setAttribute(r,o);break;case"onClick":o!=null&&(e.onclick=As);break;case"onScroll":o!=null&&Qe("scroll",e);break;case"onScrollEnd":o!=null&&Qe("scrollend",e);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(i(61));if(r=o.__html,r!=null){if(c.children!=null)throw Error(i(60));e.innerHTML=r}}break;case"multiple":e.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":e.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){e.removeAttribute("xlink:href");break}r=Po(""+o),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(r,""+o):e.removeAttribute(r);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":o&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(r,""):e.removeAttribute(r);break;case"capture":case"download":o===!0?e.setAttribute(r,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(r,o):e.removeAttribute(r);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?e.setAttribute(r,o):e.removeAttribute(r);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?e.removeAttribute(r):e.setAttribute(r,o);break;case"popover":Qe("beforetoggle",e),Qe("toggle",e),aa(e,"popover",o);break;case"xlinkActuate":Ke(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":Ke(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":Ke(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":Ke(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":Ke(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":Ke(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":Ke(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":Ke(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":Ke(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":aa(e,"is",o);break;case"innerText":case"textContent":break;default:(!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(r=Xx.get(r)||r,aa(e,r,o))}}function zf(e,t,r,o,c,h){switch(r){case"style":Hh(e,o,h);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(i(61));if(r=o.__html,r!=null){if(c.children!=null)throw Error(i(60));e.innerHTML=r}}break;case"children":typeof o=="string"?al(e,o):(typeof o=="number"||typeof o=="bigint")&&al(e,""+o);break;case"onScroll":o!=null&&Qe("scroll",e);break;case"onScrollEnd":o!=null&&Qe("scrollend",e);break;case"onClick":o!=null&&(e.onclick=As);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Hn.hasOwnProperty(r))e:{if(r[0]==="o"&&r[1]==="n"&&(c=r.endsWith("Capture"),t=r.slice(2,c?r.length-7:void 0),h=e[me]||null,h=h!=null?h[r]:null,typeof h=="function"&&e.removeEventListener(t,h,c),typeof o=="function")){typeof h!="function"&&h!==null&&(r in e?e[r]=null:e.hasAttribute(r)&&e.removeAttribute(r)),e.addEventListener(t,o,c);break e}r in e?e[r]=o:o===!0?e.setAttribute(r,""):aa(e,r,o)}}}function Ht(e,t,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Qe("error",e),Qe("load",e);var o=!1,c=!1,h;for(h in r)if(r.hasOwnProperty(h)){var x=r[h];if(x!=null)switch(h){case"src":o=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:ot(e,t,h,x,r,null)}}c&&ot(e,t,"srcSet",r.srcSet,r,null),o&&ot(e,t,"src",r.src,r,null);return;case"input":Qe("invalid",e);var E=h=x=c=null,A=null,q=null;for(o in r)if(r.hasOwnProperty(o)){var W=r[o];if(W!=null)switch(o){case"name":c=W;break;case"type":x=W;break;case"checked":A=W;break;case"defaultChecked":q=W;break;case"value":h=W;break;case"defaultValue":E=W;break;case"children":case"dangerouslySetInnerHTML":if(W!=null)throw Error(i(137,t));break;default:ot(e,t,o,W,r,null)}}kh(e,h,E,A,q,x,c,!1),zo(e);return;case"select":Qe("invalid",e),o=x=h=null;for(c in r)if(r.hasOwnProperty(c)&&(E=r[c],E!=null))switch(c){case"value":h=E;break;case"defaultValue":x=E;break;case"multiple":o=E;default:ot(e,t,c,E,r,null)}t=h,r=x,e.multiple=!!o,t!=null?nl(e,!!o,t,!1):r!=null&&nl(e,!!o,r,!0);return;case"textarea":Qe("invalid",e),h=c=o=null;for(x in r)if(r.hasOwnProperty(x)&&(E=r[x],E!=null))switch(x){case"value":o=E;break;case"defaultValue":c=E;break;case"children":h=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(i(91));break;default:ot(e,t,x,E,r,null)}Uh(e,o,c,h),zo(e);return;case"option":for(A in r)if(r.hasOwnProperty(A)&&(o=r[A],o!=null))switch(A){case"selected":e.selected=o&&typeof o!="function"&&typeof o!="symbol";break;default:ot(e,t,A,o,r,null)}return;case"dialog":Qe("beforetoggle",e),Qe("toggle",e),Qe("cancel",e),Qe("close",e);break;case"iframe":case"object":Qe("load",e);break;case"video":case"audio":for(o=0;o<qi.length;o++)Qe(qi[o],e);break;case"image":Qe("error",e),Qe("load",e);break;case"details":Qe("toggle",e);break;case"embed":case"source":case"link":Qe("error",e),Qe("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(q in r)if(r.hasOwnProperty(q)&&(o=r[q],o!=null))switch(q){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:ot(e,t,q,o,r,null)}return;default:if(Iu(t)){for(W in r)r.hasOwnProperty(W)&&(o=r[W],o!==void 0&&zf(e,t,W,o,r,void 0));return}}for(E in r)r.hasOwnProperty(E)&&(o=r[E],o!=null&&ot(e,t,E,o,r,null))}function bw(e,t,r,o){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,h=null,x=null,E=null,A=null,q=null,W=null;for(X in r){var re=r[X];if(r.hasOwnProperty(X)&&re!=null)switch(X){case"checked":break;case"value":break;case"defaultValue":A=re;default:o.hasOwnProperty(X)||ot(e,t,X,null,o,re)}}for(var F in o){var X=o[F];if(re=r[F],o.hasOwnProperty(F)&&(X!=null||re!=null))switch(F){case"type":h=X;break;case"name":c=X;break;case"checked":q=X;break;case"defaultChecked":W=X;break;case"value":x=X;break;case"defaultValue":E=X;break;case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(i(137,t));break;default:X!==re&&ot(e,t,F,X,o,re)}}Qu(e,x,E,A,q,W,h,c);return;case"select":X=x=E=F=null;for(h in r)if(A=r[h],r.hasOwnProperty(h)&&A!=null)switch(h){case"value":break;case"multiple":X=A;default:o.hasOwnProperty(h)||ot(e,t,h,null,o,A)}for(c in o)if(h=o[c],A=r[c],o.hasOwnProperty(c)&&(h!=null||A!=null))switch(c){case"value":F=h;break;case"defaultValue":E=h;break;case"multiple":x=h;default:h!==A&&ot(e,t,c,h,o,A)}t=E,r=x,o=X,F!=null?nl(e,!!r,F,!1):!!o!=!!r&&(t!=null?nl(e,!!r,t,!0):nl(e,!!r,r?[]:"",!1));return;case"textarea":X=F=null;for(E in r)if(c=r[E],r.hasOwnProperty(E)&&c!=null&&!o.hasOwnProperty(E))switch(E){case"value":break;case"children":break;default:ot(e,t,E,null,o,c)}for(x in o)if(c=o[x],h=r[x],o.hasOwnProperty(x)&&(c!=null||h!=null))switch(x){case"value":F=c;break;case"defaultValue":X=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(i(91));break;default:c!==h&&ot(e,t,x,c,o,h)}zh(e,F,X);return;case"option":for(var Ue in r)if(F=r[Ue],r.hasOwnProperty(Ue)&&F!=null&&!o.hasOwnProperty(Ue))switch(Ue){case"selected":e.selected=!1;break;default:ot(e,t,Ue,null,o,F)}for(A in o)if(F=o[A],X=r[A],o.hasOwnProperty(A)&&F!==X&&(F!=null||X!=null))switch(A){case"selected":e.selected=F&&typeof F!="function"&&typeof F!="symbol";break;default:ot(e,t,A,F,o,X)}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 Le in r)F=r[Le],r.hasOwnProperty(Le)&&F!=null&&!o.hasOwnProperty(Le)&&ot(e,t,Le,null,o,F);for(q in o)if(F=o[q],X=r[q],o.hasOwnProperty(q)&&F!==X&&(F!=null||X!=null))switch(q){case"children":case"dangerouslySetInnerHTML":if(F!=null)throw Error(i(137,t));break;default:ot(e,t,q,F,o,X)}return;default:if(Iu(t)){for(var st in r)F=r[st],r.hasOwnProperty(st)&&F!==void 0&&!o.hasOwnProperty(st)&&zf(e,t,st,void 0,o,F);for(W in o)F=o[W],X=r[W],!o.hasOwnProperty(W)||F===X||F===void 0&&X===void 0||zf(e,t,W,F,o,X);return}}for(var B in r)F=r[B],r.hasOwnProperty(B)&&F!=null&&!o.hasOwnProperty(B)&&ot(e,t,B,null,o,F);for(re in o)F=o[re],X=r[re],!o.hasOwnProperty(re)||F===X||F==null&&X==null||ot(e,t,re,F,o,X)}var Uf=null,Pf=null;function Ts(e){return e.nodeType===9?e:e.ownerDocument}function Pg(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 Hg(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 Hf(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 Bf=null;function xw(){var e=window.event;return e&&e.type==="popstate"?e===Bf?!1:(Bf=e,!0):(Bf=null,!1)}var Bg=typeof setTimeout=="function"?setTimeout:void 0,ww=typeof clearTimeout=="function"?clearTimeout:void 0,$g=typeof Promise=="function"?Promise:void 0,Sw=typeof queueMicrotask=="function"?queueMicrotask:typeof $g<"u"?function(e){return $g.resolve(null).then(e).catch(Ew)}:Bg;function Ew(e){setTimeout(function(){throw e})}function Ga(e){return e==="head"}function Vg(e,t){var r=t,o=0,c=0;do{var h=r.nextSibling;if(e.removeChild(r),h&&h.nodeType===8)if(r=h.data,r==="/$"){if(0<o&&8>o){r=o;var x=e.ownerDocument;if(r&1&&Gi(x.documentElement),r&2&&Gi(x.body),r&4)for(r=x.head,Gi(r),x=r.firstChild;x;){var E=x.nextSibling,A=x.nodeName;x[Ce]||A==="SCRIPT"||A==="STYLE"||A==="LINK"&&x.rel.toLowerCase()==="stylesheet"||r.removeChild(x),x=E}}if(c===0){e.removeChild(h),eo(t);return}c--}else r==="$"||r==="$?"||r==="$!"?c++:o=r.charCodeAt(0)-48;else o=0;r=h}while(r);eo(t)}function $f(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var r=t;switch(t=t.nextSibling,r.nodeName){case"HTML":case"HEAD":case"BODY":$f(r),Ne(r);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(r.rel.toLowerCase()==="stylesheet")continue}e.removeChild(r)}}function Cw(e,t,r,o){for(;e.nodeType===1;){var c=r;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!o&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(o){if(!e[Ce])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(h=e.getAttribute("rel"),h==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(h!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(h=e.getAttribute("src"),(h!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&h&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var h=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===h)return e}else return e;if(e=Tn(e.nextSibling),e===null)break}return null}function _w(e,t,r){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!r||(e=Tn(e.nextSibling),e===null))return null;return e}function Vf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function Nw(e,t){var r=e.ownerDocument;if(e.data!=="$?"||r.readyState==="complete")t();else{var o=function(){t(),r.removeEventListener("DOMContentLoaded",o)};r.addEventListener("DOMContentLoaded",o),e._reactRetry=o}}function Tn(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==="F!"||t==="F")break;if(t==="/$")return null}}return e}var Yf=null;function Yg(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}function qg(e,t,r){switch(t=Ts(r),e){case"html":if(e=t.documentElement,!e)throw Error(i(452));return e;case"head":if(e=t.head,!e)throw Error(i(453));return e;case"body":if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function Gi(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ne(e)}var Cn=new Map,Kg=new Set;function Ms(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ya=I.d;I.d={f:Rw,r:jw,D:Ow,C:Aw,L:Tw,m:Mw,X:Lw,S:Dw,M:kw};function Rw(){var e=ya.f(),t=Es();return e||t}function jw(e){var t=tt(e);t!==null&&t.tag===5&&t.type==="form"?fp(t):ya.r(e)}var Ml=typeof document>"u"?null:document;function Gg(e,t,r){var o=Ml;if(o&&typeof t=="string"&&t){var c=vn(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof r=="string"&&(c+='[crossorigin="'+r+'"]'),Kg.has(c)||(Kg.add(c),e={rel:e,crossOrigin:r,href:t},o.querySelector(c)===null&&(t=o.createElement("link"),Ht(t,"link",e),Be(t),o.head.appendChild(t)))}}function Ow(e){ya.D(e),Gg("dns-prefetch",e,null)}function Aw(e,t){ya.C(e,t),Gg("preconnect",e,t)}function Tw(e,t,r){ya.L(e,t,r);var o=Ml;if(o&&e&&t){var c='link[rel="preload"][as="'+vn(t)+'"]';t==="image"&&r&&r.imageSrcSet?(c+='[imagesrcset="'+vn(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(c+='[imagesizes="'+vn(r.imageSizes)+'"]')):c+='[href="'+vn(e)+'"]';var h=c;switch(t){case"style":h=Dl(e);break;case"script":h=Ll(e)}Cn.has(h)||(e=v({rel:"preload",href:t==="image"&&r&&r.imageSrcSet?void 0:e,as:t},r),Cn.set(h,e),o.querySelector(c)!==null||t==="style"&&o.querySelector(Fi(h))||t==="script"&&o.querySelector(Xi(h))||(t=o.createElement("link"),Ht(t,"link",e),Be(t),o.head.appendChild(t)))}}function Mw(e,t){ya.m(e,t);var r=Ml;if(r&&e){var o=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+vn(o)+'"][href="'+vn(e)+'"]',h=c;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=Ll(e)}if(!Cn.has(h)&&(e=v({rel:"modulepreload",href:e},t),Cn.set(h,e),r.querySelector(c)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(Xi(h)))return}o=r.createElement("link"),Ht(o,"link",e),Be(o),r.head.appendChild(o)}}}function Dw(e,t,r){ya.S(e,t,r);var o=Ml;if(o&&e){var c=xt(o).hoistableStyles,h=Dl(e);t=t||"default";var x=c.get(h);if(!x){var E={loading:0,preload:null};if(x=o.querySelector(Fi(h)))E.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":t},r),(r=Cn.get(h))&&qf(e,r);var A=x=o.createElement("link");Be(A),Ht(A,"link",e),A._p=new Promise(function(q,W){A.onload=q,A.onerror=W}),A.addEventListener("load",function(){E.loading|=1}),A.addEventListener("error",function(){E.loading|=2}),E.loading|=4,Ds(x,t,o)}x={type:"stylesheet",instance:x,count:1,state:E},c.set(h,x)}}}function Lw(e,t){ya.X(e,t);var r=Ml;if(r&&e){var o=xt(r).hoistableScripts,c=Ll(e),h=o.get(c);h||(h=r.querySelector(Xi(c)),h||(e=v({src:e,async:!0},t),(t=Cn.get(c))&&Kf(e,t),h=r.createElement("script"),Be(h),Ht(h,"link",e),r.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},o.set(c,h))}}function kw(e,t){ya.M(e,t);var r=Ml;if(r&&e){var o=xt(r).hoistableScripts,c=Ll(e),h=o.get(c);h||(h=r.querySelector(Xi(c)),h||(e=v({src:e,async:!0,type:"module"},t),(t=Cn.get(c))&&Kf(e,t),h=r.createElement("script"),Be(h),Ht(h,"link",e),r.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},o.set(c,h))}}function Fg(e,t,r,o){var c=(c=pe.current)?Ms(c):null;if(!c)throw Error(i(446));switch(e){case"meta":case"title":return null;case"style":return typeof r.precedence=="string"&&typeof r.href=="string"?(t=Dl(r.href),r=xt(c).hoistableStyles,o=r.get(t),o||(o={type:"style",instance:null,count:0,state:null},r.set(t,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(r.rel==="stylesheet"&&typeof r.href=="string"&&typeof r.precedence=="string"){e=Dl(r.href);var h=xt(c).hoistableStyles,x=h.get(e);if(x||(c=c.ownerDocument||c,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(e,x),(h=c.querySelector(Fi(e)))&&!h._p&&(x.instance=h,x.state.loading=5),Cn.has(e)||(r={rel:"preload",as:"style",href:r.href,crossOrigin:r.crossOrigin,integrity:r.integrity,media:r.media,hrefLang:r.hrefLang,referrerPolicy:r.referrerPolicy},Cn.set(e,r),h||zw(c,e,r,x.state))),t&&o===null)throw Error(i(528,""));return x}if(t&&o!==null)throw Error(i(529,""));return null;case"script":return t=r.async,r=r.src,typeof r=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ll(r),r=xt(c).hoistableScripts,o=r.get(t),o||(o={type:"script",instance:null,count:0,state:null},r.set(t,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Dl(e){return'href="'+vn(e)+'"'}function Fi(e){return'link[rel="stylesheet"]['+e+"]"}function Xg(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function zw(e,t,r,o){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?o.loading=1:(t=e.createElement("link"),o.preload=t,t.addEventListener("load",function(){return o.loading|=1}),t.addEventListener("error",function(){return o.loading|=2}),Ht(t,"link",r),Be(t),e.head.appendChild(t))}function Ll(e){return'[src="'+vn(e)+'"]'}function Xi(e){return"script[async]"+e}function Qg(e,t,r){if(t.count++,t.instance===null)switch(t.type){case"style":var o=e.querySelector('style[data-href~="'+vn(r.href)+'"]');if(o)return t.instance=o,Be(o),o;var c=v({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),Be(o),Ht(o,"style",c),Ds(o,r.precedence,e),t.instance=o;case"stylesheet":c=Dl(r.href);var h=e.querySelector(Fi(c));if(h)return t.state.loading|=4,t.instance=h,Be(h),h;o=Xg(r),(c=Cn.get(c))&&qf(o,c),h=(e.ownerDocument||e).createElement("link"),Be(h);var x=h;return x._p=new Promise(function(E,A){x.onload=E,x.onerror=A}),Ht(h,"link",o),t.state.loading|=4,Ds(h,r.precedence,e),t.instance=h;case"script":return h=Ll(r.src),(c=e.querySelector(Xi(h)))?(t.instance=c,Be(c),c):(o=r,(c=Cn.get(h))&&(o=v({},r),Kf(o,c)),e=e.ownerDocument||e,c=e.createElement("script"),Be(c),Ht(c,"link",o),e.head.appendChild(c),t.instance=c);case"void":return null;default:throw Error(i(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(o=t.instance,t.state.loading|=4,Ds(o,r.precedence,e));return t.instance}function Ds(e,t,r){for(var o=r.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=o.length?o[o.length-1]:null,h=c,x=0;x<o.length;x++){var E=o[x];if(E.dataset.precedence===t)h=E;else if(h!==c)break}h?h.parentNode.insertBefore(e,h.nextSibling):(t=r.nodeType===9?r.head:r,t.insertBefore(e,t.firstChild))}function qf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Kf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Ls=null;function Zg(e,t,r){if(Ls===null){var o=new Map,c=Ls=new Map;c.set(r,o)}else c=Ls,o=c.get(r),o||(o=new Map,c.set(r,o));if(o.has(e))return o;for(o.set(e,null),r=r.getElementsByTagName(e),c=0;c<r.length;c++){var h=r[c];if(!(h[Ce]||h[ie]||e==="link"&&h.getAttribute("rel")==="stylesheet")&&h.namespaceURI!=="http://www.w3.org/2000/svg"){var x=h.getAttribute(t)||"";x=e+x;var E=o.get(x);E?E.push(h):o.set(x,[h])}}return o}function Ig(e,t,r){e=e.ownerDocument||e,e.head.insertBefore(r,t==="title"?e.querySelector("head > title"):null)}function Uw(e,t,r){if(r===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Jg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var Qi=null;function Pw(){}function Hw(e,t,r){if(Qi===null)throw Error(i(475));var o=Qi;if(t.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(t.state.loading&4)===0){if(t.instance===null){var c=Dl(r.href),h=e.querySelector(Fi(c));if(h){e=h._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(o.count++,o=ks.bind(o),e.then(o,o)),t.state.loading|=4,t.instance=h,Be(h);return}h=e.ownerDocument||e,r=Xg(r),(c=Cn.get(c))&&qf(r,c),h=h.createElement("link"),Be(h);var x=h;x._p=new Promise(function(E,A){x.onload=E,x.onerror=A}),Ht(h,"link",r),t.instance=h}o.stylesheets===null&&(o.stylesheets=new Map),o.stylesheets.set(t,e),(e=t.state.preload)&&(t.state.loading&3)===0&&(o.count++,t=ks.bind(o),e.addEventListener("load",t),e.addEventListener("error",t))}}function Bw(){if(Qi===null)throw Error(i(475));var e=Qi;return e.stylesheets&&e.count===0&&Gf(e,e.stylesheets),0<e.count?function(t){var r=setTimeout(function(){if(e.stylesheets&&Gf(e,e.stylesheets),e.unsuspend){var o=e.unsuspend;e.unsuspend=null,o()}},6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(r)}}:null}function ks(){if(this.count--,this.count===0){if(this.stylesheets)Gf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var zs=null;function Gf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,zs=new Map,t.forEach($w,e),zs=null,ks.call(e))}function $w(e,t){if(!(t.state.loading&4)){var r=zs.get(e);if(r)var o=r.get(null);else{r=new Map,zs.set(e,r);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),h=0;h<c.length;h++){var x=c[h];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(r.set(x.dataset.precedence,x),o=x)}o&&r.set(null,o)}c=t.instance,x=c.getAttribute("data-precedence"),h=r.get(x)||o,h===o&&r.set(null,c),r.set(x,c),this.count++,o=ks.bind(this),c.addEventListener("load",o),c.addEventListener("error",o),h?h.parentNode.insertBefore(c,h.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),t.state.loading|=4}}var Zi={$$typeof:z,Provider:null,Consumer:null,_currentValue:V,_currentValue2:V,_threadCount:0};function Vw(e,t,r,o,c,h,x,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=el(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=el(0),this.hiddenUpdates=el(null),this.identifierPrefix=o,this.onUncaughtError=c,this.onCaughtError=h,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=E,this.incompleteTransitions=new Map}function Wg(e,t,r,o,c,h,x,E,A,q,W,re){return e=new Vw(e,t,r,x,E,A,q,re),t=1,h===!0&&(t|=24),h=nn(3,null,null,t),e.current=h,h.stateNode=e,t=Nc(),t.refCount++,e.pooledCache=t,t.refCount++,h.memoizedState={element:o,isDehydrated:r,cache:t},Ac(h),e}function ev(e){return e?(e=fl,e):fl}function tv(e,t,r,o,c,h){c=ev(c),o.context===null?o.context=c:o.pendingContext=c,o=Da(t),o.payload={element:r},h=h===void 0?null:h,h!==null&&(o.callback=h),r=La(e,o,t),r!==null&&(sn(r,e,t),Ni(r,e,t))}function nv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function Ff(e,t){nv(e,t),(e=e.alternate)&&nv(e,t)}function av(e){if(e.tag===13){var t=cl(e,67108864);t!==null&&sn(t,e,67108864),Ff(e,67108864)}}var Us=!0;function Yw(e,t,r,o){var c=L.T;L.T=null;var h=I.p;try{I.p=2,Xf(e,t,r,o)}finally{I.p=h,L.T=c}}function qw(e,t,r,o){var c=L.T;L.T=null;var h=I.p;try{I.p=8,Xf(e,t,r,o)}finally{I.p=h,L.T=c}}function Xf(e,t,r,o){if(Us){var c=Qf(o);if(c===null)kf(e,t,o,Ps,r),lv(e,o);else if(Gw(c,e,t,r,o))o.stopPropagation();else if(lv(e,o),t&4&&-1<Kw.indexOf(e)){for(;c!==null;){var h=tt(c);if(h!==null)switch(h.tag){case 3:if(h=h.stateNode,h.current.memoizedState.isDehydrated){var x=ta(h.pendingLanes);if(x!==0){var E=h;for(E.pendingLanes|=2,E.entangledLanes|=2;x;){var A=1<<31-zt(x);E.entanglements[1]|=A,x&=~A}qn(h),(nt&6)===0&&(ws=Me()+500,Yi(0))}}break;case 13:E=cl(h,2),E!==null&&sn(E,h,2),Es(),Ff(h,2)}if(h=Qf(o),h===null&&kf(e,t,o,Ps,r),h===c)break;c=h}c!==null&&o.stopPropagation()}else kf(e,t,o,null,r)}}function Qf(e){return e=Wu(e),Zf(e)}var Ps=null;function Zf(e){if(Ps=null,e=Ve(e),e!==null){var t=u(e);if(t===null)e=null;else{var r=t.tag;if(r===13){if(e=f(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Ps=e,null}function rv(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(ut()){case Rn:return 2;case Ir:return 8;case Jr:case ea:return 32;case Ra:return 268435456;default:return 32}default:return 32}}var If=!1,Fa=null,Xa=null,Qa=null,Ii=new Map,Ji=new Map,Za=[],Kw="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 lv(e,t){switch(e){case"focusin":case"focusout":Fa=null;break;case"dragenter":case"dragleave":Xa=null;break;case"mouseover":case"mouseout":Qa=null;break;case"pointerover":case"pointerout":Ii.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ji.delete(t.pointerId)}}function Wi(e,t,r,o,c,h){return e===null||e.nativeEvent!==h?(e={blockedOn:t,domEventName:r,eventSystemFlags:o,nativeEvent:h,targetContainers:[c]},t!==null&&(t=tt(t),t!==null&&av(t)),e):(e.eventSystemFlags|=o,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function Gw(e,t,r,o,c){switch(t){case"focusin":return Fa=Wi(Fa,e,t,r,o,c),!0;case"dragenter":return Xa=Wi(Xa,e,t,r,o,c),!0;case"mouseover":return Qa=Wi(Qa,e,t,r,o,c),!0;case"pointerover":var h=c.pointerId;return Ii.set(h,Wi(Ii.get(h)||null,e,t,r,o,c)),!0;case"gotpointercapture":return h=c.pointerId,Ji.set(h,Wi(Ji.get(h)||null,e,t,r,o,c)),!0}return!1}function iv(e){var t=Ve(e.target);if(t!==null){var r=u(t);if(r!==null){if(t=r.tag,t===13){if(t=f(r),t!==null){e.blockedOn=t,$(e.priority,function(){if(r.tag===13){var o=on();o=oi(o);var c=cl(r,o);c!==null&&sn(c,r,o),Ff(r,o)}});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Hs(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Qf(e.nativeEvent);if(r===null){r=e.nativeEvent;var o=new r.constructor(r.type,r);Ju=o,r.target.dispatchEvent(o),Ju=null}else return t=tt(r),t!==null&&av(t),e.blockedOn=r,!1;t.shift()}return!0}function ov(e,t,r){Hs(e)&&r.delete(t)}function Fw(){If=!1,Fa!==null&&Hs(Fa)&&(Fa=null),Xa!==null&&Hs(Xa)&&(Xa=null),Qa!==null&&Hs(Qa)&&(Qa=null),Ii.forEach(ov),Ji.forEach(ov)}function Bs(e,t){e.blockedOn===t&&(e.blockedOn=null,If||(If=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Fw)))}var $s=null;function sv(e){$s!==e&&($s=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){$s===e&&($s=null);for(var t=0;t<e.length;t+=3){var r=e[t],o=e[t+1],c=e[t+2];if(typeof o!="function"){if(Zf(o||r)===null)continue;break}var h=tt(r);h!==null&&(e.splice(t,3),t-=3,Qc(h,{pending:!0,data:c,method:r.method,action:o},o,c))}}))}function eo(e){function t(A){return Bs(A,e)}Fa!==null&&Bs(Fa,e),Xa!==null&&Bs(Xa,e),Qa!==null&&Bs(Qa,e),Ii.forEach(t),Ji.forEach(t);for(var r=0;r<Za.length;r++){var o=Za[r];o.blockedOn===e&&(o.blockedOn=null)}for(;0<Za.length&&(r=Za[0],r.blockedOn===null);)iv(r),r.blockedOn===null&&Za.shift();if(r=(e.ownerDocument||e).$$reactFormReplay,r!=null)for(o=0;o<r.length;o+=3){var c=r[o],h=r[o+1],x=c[me]||null;if(typeof h=="function")x||sv(r);else if(x){var E=null;if(h&&h.hasAttribute("formAction")){if(c=h,x=h[me]||null)E=x.formAction;else if(Zf(c)!==null)continue}else E=x.action;typeof E=="function"?r[o+1]=E:(r.splice(o,3),o-=3),sv(r)}}}function Jf(e){this._internalRoot=e}Vs.prototype.render=Jf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var r=t.current,o=on();tv(r,o,e,t,null,null)},Vs.prototype.unmount=Jf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;tv(e.current,2,null,e,null,null),Es(),t[we]=null}};function Vs(e){this._internalRoot=e}Vs.prototype.unstable_scheduleHydration=function(e){if(e){var t=M();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Za.length&&t!==0&&t<Za[r].priority;r++);Za.splice(r,0,e),r===0&&iv(e)}};var uv=a.version;if(uv!=="19.1.0")throw Error(i(527,uv,"19.1.0"));I.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(i(188)):(e=Object.keys(e).join(","),Error(i(268,e)));return e=p(t),e=e!==null?m(e):null,e=e===null?null:e.stateNode,e};var Xw={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ys=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ys.isDisabled&&Ys.supportsFiber)try{Ft=Ys.inject(Xw),pt=Ys}catch{}}return ao.createRoot=function(e,t){if(!s(e))throw Error(i(299));var r=!1,o="",c=_p,h=Np,x=Rp,E=null;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(o=t.identifierPrefix),t.onUncaughtError!==void 0&&(c=t.onUncaughtError),t.onCaughtError!==void 0&&(h=t.onCaughtError),t.onRecoverableError!==void 0&&(x=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(E=t.unstable_transitionCallbacks)),t=Wg(e,1,!1,null,null,r,o,c,h,x,E,null),e[we]=t.current,Lf(e),new Jf(t)},ao.hydrateRoot=function(e,t,r){if(!s(e))throw Error(i(299));var o=!1,c="",h=_p,x=Np,E=Rp,A=null,q=null;return r!=null&&(r.unstable_strictMode===!0&&(o=!0),r.identifierPrefix!==void 0&&(c=r.identifierPrefix),r.onUncaughtError!==void 0&&(h=r.onUncaughtError),r.onCaughtError!==void 0&&(x=r.onCaughtError),r.onRecoverableError!==void 0&&(E=r.onRecoverableError),r.unstable_transitionCallbacks!==void 0&&(A=r.unstable_transitionCallbacks),r.formState!==void 0&&(q=r.formState)),t=Wg(e,1,!0,t,r??null,o,c,h,x,E,A,q),t.context=ev(null),r=t.current,o=on(),o=oi(o),c=Da(o),c.callback=null,La(r,c,o),r=o,t.current.lanes=r,vr(t,r),qn(t),e[we]=t.current,Lf(e),new Vs(t)},ao.version="19.1.0",ao}var Hv;function bE(){if(Hv)return nd.exports;Hv=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),nd.exports=yE(),nd.exports}var xE=bE();/**
|
|
56
|
-
* react-router v7.7.
|
|
54
|
+
`+r.stack}}function xn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Mh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function qx(e){var t=Mh(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),o=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var c=r.get,h=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(x){o=""+x,h.call(this,x)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return o},setValue:function(x){o=""+x},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function zo(e){e._valueTracker||(e._valueTracker=qx(e))}function Dh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),o="";return e&&(o=Mh(e)?e.checked?"true":"false":e.value),e=o,e!==r?(t.setValue(e),!0):!1}function Uo(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 Fx=/[\n"\\]/g;function wn(e){return e.replace(Fx,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Gu(e,t,r,o,c,h,x,E){e.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.type=x:e.removeAttribute("type"),t!=null?x==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+xn(t)):e.value!==""+xn(t)&&(e.value=""+xn(t)):x!=="submit"&&x!=="reset"||e.removeAttribute("value"),t!=null?Xu(e,x,xn(t)):r!=null?Xu(e,x,xn(r)):o!=null&&e.removeAttribute("value"),c==null&&h!=null&&(e.defaultChecked=!!h),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?e.name=""+xn(E):e.removeAttribute("name")}function Lh(e,t,r,o,c,h,x,E){if(h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.type=h),t!=null||r!=null){if(!(h!=="submit"&&h!=="reset"||t!=null))return;r=r!=null?""+xn(r):"",t=t!=null?""+xn(t):r,E||t===e.value||(e.value=t),e.defaultValue=t}o=o??c,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=E?e.checked:!!o,e.defaultChecked=!!o,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(e.name=x)}function Xu(e,t,r){t==="number"&&Uo(e.ownerDocument)===e||e.defaultValue===""+r||(e.defaultValue=""+r)}function nl(e,t,r,o){if(e=e.options,t){t={};for(var c=0;c<r.length;c++)t["$"+r[c]]=!0;for(r=0;r<e.length;r++)c=t.hasOwnProperty("$"+e[r].value),e[r].selected!==c&&(e[r].selected=c),c&&o&&(e[r].defaultSelected=!0)}else{for(r=""+xn(r),t=null,c=0;c<e.length;c++){if(e[c].value===r){e[c].selected=!0,o&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function kh(e,t,r){if(t!=null&&(t=""+xn(t),t!==e.value&&(e.value=t),r==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=r!=null?""+xn(r):""}function zh(e,t,r,o){if(t==null){if(o!=null){if(r!=null)throw Error(i(92));if(ue(o)){if(1<o.length)throw Error(i(93));o=o[0]}r=o}r==null&&(r=""),t=r}r=xn(t),e.defaultValue=r,o=e.textContent,o===r&&o!==""&&o!==null&&(e.value=o)}function al(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Kx=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 Uh(e,t,r){var o=t.indexOf("--")===0;r==null||typeof r=="boolean"||r===""?o?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":o?e.setProperty(t,r):typeof r!="number"||r===0||Kx.has(t)?t==="float"?e.cssFloat=r:e[t]=(""+r).trim():e[t]=r+"px"}function Ph(e,t,r){if(t!=null&&typeof t!="object")throw Error(i(62));if(e=e.style,r!=null){for(var o in r)!r.hasOwnProperty(o)||t!=null&&t.hasOwnProperty(o)||(o.indexOf("--")===0?e.setProperty(o,""):o==="float"?e.cssFloat="":e[o]="");for(var c in t)o=t[c],t.hasOwnProperty(c)&&r[c]!==o&&Uh(e,c,o)}else for(var h in t)t.hasOwnProperty(h)&&Uh(e,h,t[h])}function Qu(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 Gx=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"]]),Xx=/^[\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 Po(e){return Xx.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var Zu=null;function Iu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var rl=null,ll=null;function Hh(e){var t=at(e);if(t&&(e=t.stateNode)){var r=e[me]||null;e:switch(e=t.stateNode,t.type){case"input":if(Gu(e,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll('input[name="'+wn(""+t)+'"][type="radio"]'),t=0;t<r.length;t++){var o=r[t];if(o!==e&&o.form===e.form){var c=o[me]||null;if(!c)throw Error(i(90));Gu(o,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(t=0;t<r.length;t++)o=r[t],o.form===e.form&&Dh(o)}break e;case"textarea":kh(e,r.value,r.defaultValue);break e;case"select":t=r.value,t!=null&&nl(e,!!r.multiple,t,!1)}}}var Ju=!1;function Bh(e,t,r){if(Ju)return e(t,r);Ju=!0;try{var o=e(t);return o}finally{if(Ju=!1,(rl!==null||ll!==null)&&(Es(),rl&&(t=rl,e=ll,ll=rl=null,Hh(t),e)))for(t=0;t<e.length;t++)Hh(e[t])}}function ui(e,t){var r=e.stateNode;if(r===null)return null;var o=r[me]||null;if(o===null)return null;r=o[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":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(i(231,t,typeof r));return r}var sa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Wu=!1;if(sa)try{var ci={};Object.defineProperty(ci,"passive",{get:function(){Wu=!0}}),window.addEventListener("test",ci,ci),window.removeEventListener("test",ci,ci)}catch{Wu=!1}var Ma=null,ec=null,Ho=null;function $h(){if(Ho)return Ho;var e,t=ec,r=t.length,o,c="value"in Ma?Ma.value:Ma.textContent,h=c.length;for(e=0;e<r&&t[e]===c[e];e++);var x=r-e;for(o=1;o<=x&&t[r-o]===c[h-o];o++);return Ho=c.slice(e,1<o?1-o:void 0)}function Bo(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 $o(){return!0}function Vh(){return!1}function It(e){function t(r,o,c,h,x){this._reactName=r,this._targetInst=c,this.type=o,this.nativeEvent=h,this.target=x,this.currentTarget=null;for(var E in e)e.hasOwnProperty(E)&&(r=e[E],this[E]=r?r(h):h[E]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?$o:Vh,this.isPropagationStopped=Vh,this}return v(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=$o)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=$o)},persist:function(){},isPersistent:$o}),t}var Er={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Vo=It(Er),fi=v({},Er,{view:0,detail:0}),Qx=It(fi),tc,nc,di,Yo=v({},fi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:rc,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!==di&&(di&&e.type==="mousemove"?(tc=e.screenX-di.screenX,nc=e.screenY-di.screenY):nc=tc=0,di=e),tc)},movementY:function(e){return"movementY"in e?e.movementY:nc}}),Yh=It(Yo),Zx=v({},Yo,{dataTransfer:0}),Ix=It(Zx),Jx=v({},fi,{relatedTarget:0}),ac=It(Jx),Wx=v({},Er,{animationName:0,elapsedTime:0,pseudoElement:0}),e1=It(Wx),t1=v({},Er,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),n1=It(t1),a1=v({},Er,{data:0}),qh=It(a1),r1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},l1={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"},i1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function o1(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=i1[e])?!!t[e]:!1}function rc(){return o1}var s1=v({},fi,{key:function(e){if(e.key){var t=r1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Bo(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?l1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:rc,charCode:function(e){return e.type==="keypress"?Bo(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Bo(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),u1=It(s1),c1=v({},Yo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Fh=It(c1),f1=v({},fi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:rc}),d1=It(f1),h1=v({},Er,{propertyName:0,elapsedTime:0,pseudoElement:0}),m1=It(h1),p1=v({},Yo,{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}),g1=It(p1),v1=v({},Er,{newState:0,oldState:0}),y1=It(v1),b1=[9,13,27,32],lc=sa&&"CompositionEvent"in window,hi=null;sa&&"documentMode"in document&&(hi=document.documentMode);var x1=sa&&"TextEvent"in window&&!hi,Kh=sa&&(!lc||hi&&8<hi&&11>=hi),Gh=" ",Xh=!1;function Qh(e,t){switch(e){case"keyup":return b1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Zh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var il=!1;function w1(e,t){switch(e){case"compositionend":return Zh(t);case"keypress":return t.which!==32?null:(Xh=!0,Gh);case"textInput":return e=t.data,e===Gh&&Xh?null:e;default:return null}}function S1(e,t){if(il)return e==="compositionend"||!lc&&Qh(e,t)?(e=$h(),Ho=ec=Ma=null,il=!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 Kh&&t.locale!=="ko"?null:t.data;default:return null}}var E1={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 Ih(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!E1[e.type]:t==="textarea"}function Jh(e,t,r,o){rl?ll?ll.push(o):ll=[o]:rl=o,t=Os(t,"onChange"),0<t.length&&(r=new Vo("onChange","change",null,r,o),e.push({event:r,listeners:t}))}var mi=null,pi=null;function _1(e){Mg(e,0)}function qo(e){var t=xt(e);if(Dh(t))return e}function Wh(e,t){if(e==="change")return t}var em=!1;if(sa){var ic;if(sa){var oc="oninput"in document;if(!oc){var tm=document.createElement("div");tm.setAttribute("oninput","return;"),oc=typeof tm.oninput=="function"}ic=oc}else ic=!1;em=ic&&(!document.documentMode||9<document.documentMode)}function nm(){mi&&(mi.detachEvent("onpropertychange",am),pi=mi=null)}function am(e){if(e.propertyName==="value"&&qo(pi)){var t=[];Jh(t,pi,e,Iu(e)),Bh(_1,t)}}function C1(e,t,r){e==="focusin"?(nm(),mi=t,pi=r,mi.attachEvent("onpropertychange",am)):e==="focusout"&&nm()}function N1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return qo(pi)}function R1(e,t){if(e==="click")return qo(t)}function j1(e,t){if(e==="input"||e==="change")return qo(t)}function O1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ln=typeof Object.is=="function"?Object.is:O1;function gi(e,t){if(ln(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;for(o=0;o<r.length;o++){var c=r[o];if(!Ze.call(t,c)||!ln(e[c],t[c]))return!1}return!0}function rm(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function lm(e,t){var r=rm(e);e=0;for(var o;r;){if(r.nodeType===3){if(o=e+r.textContent.length,e<=t&&o>=t)return{node:r,offset:t-e};e=o}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=rm(r)}}function im(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?im(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function om(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Uo(e.document);t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Uo(e.document)}return t}function sc(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 A1=sa&&"documentMode"in document&&11>=document.documentMode,ol=null,uc=null,vi=null,cc=!1;function sm(e,t,r){var o=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;cc||ol==null||ol!==Uo(o)||(o=ol,"selectionStart"in o&&sc(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),vi&&gi(vi,o)||(vi=o,o=Os(uc,"onSelect"),0<o.length&&(t=new Vo("onSelect","select",null,t,r),e.push({event:t,listeners:o}),t.target=ol)))}function _r(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var sl={animationend:_r("Animation","AnimationEnd"),animationiteration:_r("Animation","AnimationIteration"),animationstart:_r("Animation","AnimationStart"),transitionrun:_r("Transition","TransitionRun"),transitionstart:_r("Transition","TransitionStart"),transitioncancel:_r("Transition","TransitionCancel"),transitionend:_r("Transition","TransitionEnd")},fc={},um={};sa&&(um=document.createElement("div").style,"AnimationEvent"in window||(delete sl.animationend.animation,delete sl.animationiteration.animation,delete sl.animationstart.animation),"TransitionEvent"in window||delete sl.transitionend.transition);function Cr(e){if(fc[e])return fc[e];if(!sl[e])return e;var t=sl[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in um)return fc[e]=t[r];return e}var cm=Cr("animationend"),fm=Cr("animationiteration"),dm=Cr("animationstart"),T1=Cr("transitionrun"),M1=Cr("transitionstart"),D1=Cr("transitioncancel"),hm=Cr("transitionend"),mm=new Map,dc="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(" ");dc.push("scrollEnd");function Mn(e,t){mm.set(e,t),rn(t,[e])}var pm=new WeakMap;function Sn(e,t){if(typeof e=="object"&&e!==null){var r=pm.get(e);return r!==void 0?r:(t={value:e,source:t,stack:ko(t)},pm.set(e,t),t)}return{value:e,source:t,stack:ko(t)}}var En=[],ul=0,hc=0;function Fo(){for(var e=ul,t=hc=ul=0;t<e;){var r=En[t];En[t++]=null;var o=En[t];En[t++]=null;var c=En[t];En[t++]=null;var h=En[t];if(En[t++]=null,o!==null&&c!==null){var x=o.pending;x===null?c.next=c:(c.next=x.next,x.next=c),o.pending=c}h!==0&&gm(r,c,h)}}function Ko(e,t,r,o){En[ul++]=e,En[ul++]=t,En[ul++]=r,En[ul++]=o,hc|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function mc(e,t,r,o){return Ko(e,t,r,o),Go(e)}function cl(e,t){return Ko(e,null,null,t),Go(e)}function gm(e,t,r){e.lanes|=r;var o=e.alternate;o!==null&&(o.lanes|=r);for(var c=!1,h=e.return;h!==null;)h.childLanes|=r,o=h.alternate,o!==null&&(o.childLanes|=r),h.tag===22&&(e=h.stateNode,e===null||e._visibility&1||(c=!0)),e=h,h=h.return;return e.tag===3?(h=e.stateNode,c&&t!==null&&(c=31-Pt(r),e=h.hiddenUpdates,o=e[c],o===null?e[c]=[t]:o.push(t),t.lane=r|536870912),h):null}function Go(e){if(50<Vi)throw Vi=0,wf=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var fl={};function L1(e,t,r,o){this.tag=e,this.key=r,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=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function on(e,t,r,o){return new L1(e,t,r,o)}function pc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ua(e,t){var r=e.alternate;return r===null?(r=on(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&65011712,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r.refCleanup=e.refCleanup,r}function vm(e,t){e.flags&=65011714;var r=e.alternate;return r===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=r.childLanes,e.lanes=r.lanes,e.child=r.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=r.memoizedProps,e.memoizedState=r.memoizedState,e.updateQueue=r.updateQueue,e.type=r.type,t=r.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Xo(e,t,r,o,c,h){var x=0;if(o=e,typeof e=="function")pc(e)&&(x=1);else if(typeof e=="string")x=zw(e,r,ae.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ne:return e=on(31,r,t,c),e.elementType=ne,e.lanes=h,e;case C:return Nr(r.children,c,h,t);case _:x=8,c|=24;break;case j:return e=on(12,r,t,c|2),e.elementType=j,e.lanes=h,e;case D:return e=on(13,r,t,c),e.elementType=D,e.lanes=h,e;case R:return e=on(19,r,t,c),e.elementType=R,e.lanes=h,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case N:case k:x=10;break e;case z:x=9;break e;case H:x=11;break e;case B:x=14;break e;case Z:x=16,o=null;break e}x=29,r=Error(i(130,e===null?"null":typeof e,"")),o=null}return t=on(x,r,t,c),t.elementType=e,t.type=o,t.lanes=h,t}function Nr(e,t,r,o){return e=on(7,e,o,t),e.lanes=r,e}function gc(e,t,r){return e=on(6,e,null,t),e.lanes=r,e}function vc(e,t,r){return t=on(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var dl=[],hl=0,Qo=null,Zo=0,_n=[],Cn=0,Rr=null,ca=1,fa="";function jr(e,t){dl[hl++]=Zo,dl[hl++]=Qo,Qo=e,Zo=t}function ym(e,t,r){_n[Cn++]=ca,_n[Cn++]=fa,_n[Cn++]=Rr,Rr=e;var o=ca;e=fa;var c=32-Pt(o)-1;o&=~(1<<c),r+=1;var h=32-Pt(t)+c;if(30<h){var x=c-c%5;h=(o&(1<<x)-1).toString(32),o>>=x,c-=x,ca=1<<32-Pt(t)+c|r<<c|o,fa=h+e}else ca=1<<h|r<<c|o,fa=e}function yc(e){e.return!==null&&(jr(e,1),ym(e,1,0))}function bc(e){for(;e===Qo;)Qo=dl[--hl],dl[hl]=null,Zo=dl[--hl],dl[hl]=null;for(;e===Rr;)Rr=_n[--Cn],_n[Cn]=null,fa=_n[--Cn],_n[Cn]=null,ca=_n[--Cn],_n[Cn]=null}var Xt=null,St=null,tt=!1,Or=null,qn=!1,xc=Error(i(519));function Ar(e){var t=Error(i(418,""));throw xi(Sn(t,e)),xc}function bm(e){var t=e.stateNode,r=e.type,o=e.memoizedProps;switch(t[ce]=e,t[me]=o,r){case"dialog":Qe("cancel",t),Qe("close",t);break;case"iframe":case"object":case"embed":Qe("load",t);break;case"video":case"audio":for(r=0;r<qi.length;r++)Qe(qi[r],t);break;case"source":Qe("error",t);break;case"img":case"image":case"link":Qe("error",t),Qe("load",t);break;case"details":Qe("toggle",t);break;case"input":Qe("invalid",t),Lh(t,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0),zo(t);break;case"select":Qe("invalid",t);break;case"textarea":Qe("invalid",t),zh(t,o.value,o.defaultValue,o.children),zo(t)}r=o.children,typeof r!="string"&&typeof r!="number"&&typeof r!="bigint"||t.textContent===""+r||o.suppressHydrationWarning===!0||zg(t.textContent,r)?(o.popover!=null&&(Qe("beforetoggle",t),Qe("toggle",t)),o.onScroll!=null&&Qe("scroll",t),o.onScrollEnd!=null&&Qe("scrollend",t),o.onClick!=null&&(t.onclick=As),t=!0):t=!1,t||Ar(e)}function xm(e){for(Xt=e.return;Xt;)switch(Xt.tag){case 5:case 13:qn=!1;return;case 27:case 3:qn=!0;return;default:Xt=Xt.return}}function yi(e){if(e!==Xt)return!1;if(!tt)return xm(e),tt=!0,!1;var t=e.tag,r;if((r=t!==3&&t!==27)&&((r=t===5)&&(r=e.type,r=!(r!=="form"&&r!=="button")||Uf(e.type,e.memoizedProps)),r=!r),r&&St&&Ar(e),xm(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8)if(r=e.data,r==="/$"){if(t===0){St=Ln(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++;e=e.nextSibling}St=null}}else t===27?(t=St,Xa(e.type)?(e=$f,$f=null,St=e):St=t):St=Xt?Ln(e.stateNode.nextSibling):null;return!0}function bi(){St=Xt=null,tt=!1}function wm(){var e=Or;return e!==null&&(en===null?en=e:en.push.apply(en,e),Or=null),e}function xi(e){Or===null?Or=[e]:Or.push(e)}var wc=F(null),Tr=null,da=null;function Da(e,t,r){K(wc,t._currentValue),t._currentValue=r}function ha(e){e._currentValue=wc.current,U(wc)}function Sc(e,t,r){for(;e!==null;){var o=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,o!==null&&(o.childLanes|=t)):o!==null&&(o.childLanes&t)!==t&&(o.childLanes|=t),e===r)break;e=e.return}}function Ec(e,t,r,o){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var h=c.dependencies;if(h!==null){var x=c.child;h=h.firstContext;e:for(;h!==null;){var E=h;h=c;for(var T=0;T<t.length;T++)if(E.context===t[T]){h.lanes|=r,E=h.alternate,E!==null&&(E.lanes|=r),Sc(h.return,r,e),o||(x=null);break e}h=E.next}}else if(c.tag===18){if(x=c.return,x===null)throw Error(i(341));x.lanes|=r,h=x.alternate,h!==null&&(h.lanes|=r),Sc(x,r,e),x=null}else x=c.child;if(x!==null)x.return=c;else for(x=c;x!==null;){if(x===e){x=null;break}if(c=x.sibling,c!==null){c.return=x.return,x=c;break}x=x.return}c=x}}function wi(e,t,r,o){e=null;for(var c=t,h=!1;c!==null;){if(!h){if((c.flags&524288)!==0)h=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var x=c.alternate;if(x===null)throw Error(i(387));if(x=x.memoizedProps,x!==null){var E=c.type;ln(c.pendingProps.value,x.value)||(e!==null?e.push(E):e=[E])}}else if(c===ye.current){if(x=c.alternate,x===null)throw Error(i(387));x.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(Zi):e=[Zi])}c=c.return}e!==null&&Ec(t,e,r,o),t.flags|=262144}function Io(e){for(e=e.firstContext;e!==null;){if(!ln(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Mr(e){Tr=e,da=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function qt(e){return Sm(Tr,e)}function Jo(e,t){return Tr===null&&Mr(e),Sm(e,t)}function Sm(e,t){var r=t._currentValue;if(t={context:t,memoizedValue:r,next:null},da===null){if(e===null)throw Error(i(308));da=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else da=da.next=t;return r}var k1=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(r,o){e.push(o)}};this.abort=function(){t.aborted=!0,e.forEach(function(r){return r()})}},z1=n.unstable_scheduleCallback,U1=n.unstable_NormalPriority,Tt={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function _c(){return{controller:new k1,data:new Map,refCount:0}}function Si(e){e.refCount--,e.refCount===0&&z1(U1,function(){e.controller.abort()})}var Ei=null,Cc=0,ml=0,pl=null;function P1(e,t){if(Ei===null){var r=Ei=[];Cc=0,ml=jf(),pl={status:"pending",value:void 0,then:function(o){r.push(o)}}}return Cc++,t.then(Em,Em),t}function Em(){if(--Cc===0&&Ei!==null){pl!==null&&(pl.status="fulfilled");var e=Ei;Ei=null,ml=0,pl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function H1(e,t){var r=[],o={status:"pending",value:null,reason:null,then:function(c){r.push(c)}};return e.then(function(){o.status="fulfilled",o.value=t;for(var c=0;c<r.length;c++)(0,r[c])(t)},function(c){for(o.status="rejected",o.reason=c,c=0;c<r.length;c++)(0,r[c])(void 0)}),o}var _m=A.S;A.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&P1(e,t),_m!==null&&_m(e,t)};var Dr=F(null);function Nc(){var e=Dr.current;return e!==null?e:dt.pooledCache}function Wo(e,t){t===null?K(Dr,Dr.current):K(Dr,t.pool)}function Cm(){var e=Nc();return e===null?null:{parent:Tt._currentValue,pool:e}}var _i=Error(i(460)),Nm=Error(i(474)),es=Error(i(542)),Rc={then:function(){}};function Rm(e){return e=e.status,e==="fulfilled"||e==="rejected"}function ts(){}function jm(e,t,r){switch(r=e[r],r===void 0?e.push(t):r!==t&&(t.then(ts,ts),t=r),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Am(e),e;default:if(typeof t.status=="string")t.then(ts,ts);else{if(e=dt,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status="pending",e.then(function(o){if(t.status==="pending"){var c=t;c.status="fulfilled",c.value=o}},function(o){if(t.status==="pending"){var c=t;c.status="rejected",c.reason=o}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Am(e),e}throw Ci=t,_i}}var Ci=null;function Om(){if(Ci===null)throw Error(i(459));var e=Ci;return Ci=null,e}function Am(e){if(e===_i||e===es)throw Error(i(483))}var La=!1;function jc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Oc(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 ka(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function za(e,t,r){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(rt&2)!==0){var c=o.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),o.pending=t,t=Go(e),gm(e,null,r),t}return Ko(e,o,t,r),Go(e)}function Ni(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194048)!==0)){var o=t.lanes;o&=e.pendingLanes,r|=o,t.lanes=r,wr(e,r)}}function Ac(e,t){var r=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,r===o)){var c=null,h=null;if(r=r.firstBaseUpdate,r!==null){do{var x={lane:r.lane,tag:r.tag,payload:r.payload,callback:null,next:null};h===null?c=h=x:h=h.next=x,r=r.next}while(r!==null);h===null?c=h=t:h=h.next=t}else c=h=t;r={baseState:o.baseState,firstBaseUpdate:c,lastBaseUpdate:h,shared:o.shared,callbacks:o.callbacks},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}var Tc=!1;function Ri(){if(Tc){var e=pl;if(e!==null)throw e}}function ji(e,t,r,o){Tc=!1;var c=e.updateQueue;La=!1;var h=c.firstBaseUpdate,x=c.lastBaseUpdate,E=c.shared.pending;if(E!==null){c.shared.pending=null;var T=E,q=T.next;T.next=null,x===null?h=q:x.next=q,x=T;var ee=e.alternate;ee!==null&&(ee=ee.updateQueue,E=ee.lastBaseUpdate,E!==x&&(E===null?ee.firstBaseUpdate=q:E.next=q,ee.lastBaseUpdate=T))}if(h!==null){var se=c.baseState;x=0,ee=q=T=null,E=h;do{var G=E.lane&-536870913,X=G!==E.lane;if(X?(We&G)===G:(o&G)===G){G!==0&&G===ml&&(Tc=!0),ee!==null&&(ee=ee.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var ze=e,Me=E;G=t;var ut=r;switch(Me.tag){case 1:if(ze=Me.payload,typeof ze=="function"){se=ze.call(ut,se,G);break e}se=ze;break e;case 3:ze.flags=ze.flags&-65537|128;case 0:if(ze=Me.payload,G=typeof ze=="function"?ze.call(ut,se,G):ze,G==null)break e;se=v({},se,G);break e;case 2:La=!0}}G=E.callback,G!==null&&(e.flags|=64,X&&(e.flags|=8192),X=c.callbacks,X===null?c.callbacks=[G]:X.push(G))}else X={lane:G,tag:E.tag,payload:E.payload,callback:E.callback,next:null},ee===null?(q=ee=X,T=se):ee=ee.next=X,x|=G;if(E=E.next,E===null){if(E=c.shared.pending,E===null)break;X=E,E=X.next,X.next=null,c.lastBaseUpdate=X,c.shared.pending=null}}while(!0);ee===null&&(T=se),c.baseState=T,c.firstBaseUpdate=q,c.lastBaseUpdate=ee,h===null&&(c.shared.lanes=0),qa|=x,e.lanes=x,e.memoizedState=se}}function Tm(e,t){if(typeof e!="function")throw Error(i(191,e));e.call(t)}function Mm(e,t){var r=e.callbacks;if(r!==null)for(e.callbacks=null,e=0;e<r.length;e++)Tm(r[e],t)}var gl=F(null),ns=F(0);function Dm(e,t){e=xa,K(ns,e),K(gl,t),xa=e|t.baseLanes}function Mc(){K(ns,xa),K(gl,gl.current)}function Dc(){xa=ns.current,U(gl),U(ns)}var Ua=0,Ve=null,ot=null,jt=null,as=!1,vl=!1,Lr=!1,rs=0,Oi=0,yl=null,B1=0;function Ct(){throw Error(i(321))}function Lc(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!ln(e[r],t[r]))return!1;return!0}function kc(e,t,r,o,c,h){return Ua=h,Ve=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,A.H=e===null||e.memoizedState===null?gp:vp,Lr=!1,h=r(o,c),Lr=!1,vl&&(h=km(t,r,o,c)),Lm(e),h}function Lm(e){A.H=cs;var t=ot!==null&&ot.next!==null;if(Ua=0,jt=ot=Ve=null,as=!1,Oi=0,yl=null,t)throw Error(i(300));e===null||Lt||(e=e.dependencies,e!==null&&Io(e)&&(Lt=!0))}function km(e,t,r,o){Ve=e;var c=0;do{if(vl&&(yl=null),Oi=0,vl=!1,25<=c)throw Error(i(301));if(c+=1,jt=ot=null,e.updateQueue!=null){var h=e.updateQueue;h.lastEffect=null,h.events=null,h.stores=null,h.memoCache!=null&&(h.memoCache.index=0)}A.H=G1,h=t(r,o)}while(vl);return h}function $1(){var e=A.H,t=e.useState()[0];return t=typeof t.then=="function"?Ai(t):t,e=e.useState()[0],(ot!==null?ot.memoizedState:null)!==e&&(Ve.flags|=1024),t}function zc(){var e=rs!==0;return rs=0,e}function Uc(e,t,r){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r}function Pc(e){if(as){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}as=!1}Ua=0,jt=ot=Ve=null,vl=!1,Oi=rs=0,yl=null}function Jt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return jt===null?Ve.memoizedState=jt=e:jt=jt.next=e,jt}function Ot(){if(ot===null){var e=Ve.alternate;e=e!==null?e.memoizedState:null}else e=ot.next;var t=jt===null?Ve.memoizedState:jt.next;if(t!==null)jt=t,ot=e;else{if(e===null)throw Ve.alternate===null?Error(i(467)):Error(i(310));ot=e,e={memoizedState:ot.memoizedState,baseState:ot.baseState,baseQueue:ot.baseQueue,queue:ot.queue,next:null},jt===null?Ve.memoizedState=jt=e:jt=jt.next=e}return jt}function Hc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ai(e){var t=Oi;return Oi+=1,yl===null&&(yl=[]),e=jm(yl,e,t),t=Ve,(jt===null?t.memoizedState:jt.next)===null&&(t=t.alternate,A.H=t===null||t.memoizedState===null?gp:vp),e}function ls(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ai(e);if(e.$$typeof===k)return qt(e)}throw Error(i(438,String(e)))}function Bc(e){var t=null,r=Ve.updateQueue;if(r!==null&&(t=r.memoCache),t==null){var o=Ve.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(t={data:o.data.map(function(c){return c.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),r===null&&(r=Hc(),Ve.updateQueue=r),r.memoCache=t,r=t.data[t.index],r===void 0)for(r=t.data[t.index]=Array(e),o=0;o<e;o++)r[o]=oe;return t.index++,r}function ma(e,t){return typeof t=="function"?t(e):t}function is(e){var t=Ot();return $c(t,ot,e)}function $c(e,t,r){var o=e.queue;if(o===null)throw Error(i(311));o.lastRenderedReducer=r;var c=e.baseQueue,h=o.pending;if(h!==null){if(c!==null){var x=c.next;c.next=h.next,h.next=x}t.baseQueue=c=h,o.pending=null}if(h=e.baseState,c===null)e.memoizedState=h;else{t=c.next;var E=x=null,T=null,q=t,ee=!1;do{var se=q.lane&-536870913;if(se!==q.lane?(We&se)===se:(Ua&se)===se){var G=q.revertLane;if(G===0)T!==null&&(T=T.next={lane:0,revertLane:0,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null}),se===ml&&(ee=!0);else if((Ua&G)===G){q=q.next,G===ml&&(ee=!0);continue}else se={lane:0,revertLane:q.revertLane,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null},T===null?(E=T=se,x=h):T=T.next=se,Ve.lanes|=G,qa|=G;se=q.action,Lr&&r(h,se),h=q.hasEagerState?q.eagerState:r(h,se)}else G={lane:se,revertLane:q.revertLane,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null},T===null?(E=T=G,x=h):T=T.next=G,Ve.lanes|=se,qa|=se;q=q.next}while(q!==null&&q!==t);if(T===null?x=h:T.next=E,!ln(h,e.memoizedState)&&(Lt=!0,ee&&(r=pl,r!==null)))throw r;e.memoizedState=h,e.baseState=x,e.baseQueue=T,o.lastRenderedState=h}return c===null&&(o.lanes=0),[e.memoizedState,o.dispatch]}function Vc(e){var t=Ot(),r=t.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=e;var o=r.dispatch,c=r.pending,h=t.memoizedState;if(c!==null){r.pending=null;var x=c=c.next;do h=e(h,x.action),x=x.next;while(x!==c);ln(h,t.memoizedState)||(Lt=!0),t.memoizedState=h,t.baseQueue===null&&(t.baseState=h),r.lastRenderedState=h}return[h,o]}function zm(e,t,r){var o=Ve,c=Ot(),h=tt;if(h){if(r===void 0)throw Error(i(407));r=r()}else r=t();var x=!ln((ot||c).memoizedState,r);x&&(c.memoizedState=r,Lt=!0),c=c.queue;var E=Hm.bind(null,o,c,e);if(Ti(2048,8,E,[e]),c.getSnapshot!==t||x||jt!==null&&jt.memoizedState.tag&1){if(o.flags|=2048,bl(9,os(),Pm.bind(null,o,c,r,t),null),dt===null)throw Error(i(349));h||(Ua&124)!==0||Um(o,t,r)}return r}function Um(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=Ve.updateQueue,t===null?(t=Hc(),Ve.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function Pm(e,t,r,o){t.value=r,t.getSnapshot=o,Bm(t)&&$m(e)}function Hm(e,t,r){return r(function(){Bm(t)&&$m(e)})}function Bm(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!ln(e,r)}catch{return!0}}function $m(e){var t=cl(e,2);t!==null&&dn(t,e,2)}function Yc(e){var t=Jt();if(typeof e=="function"){var r=e;if(e=r(),Lr){Tn(!0);try{r()}finally{Tn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ma,lastRenderedState:e},t}function Vm(e,t,r,o){return e.baseState=r,$c(e,ot,typeof o=="function"?o:ma)}function V1(e,t,r,o,c){if(us(e))throw Error(i(485));if(e=t.action,e!==null){var h={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){h.listeners.push(x)}};A.T!==null?r(!0):h.isTransition=!1,o(h),r=t.pending,r===null?(h.next=t.pending=h,Ym(t,h)):(h.next=r.next,t.pending=r.next=h)}}function Ym(e,t){var r=t.action,o=t.payload,c=e.state;if(t.isTransition){var h=A.T,x={};A.T=x;try{var E=r(c,o),T=A.S;T!==null&&T(x,E),qm(e,t,E)}catch(q){qc(e,t,q)}finally{A.T=h}}else try{h=r(c,o),qm(e,t,h)}catch(q){qc(e,t,q)}}function qm(e,t,r){r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(function(o){Fm(e,t,o)},function(o){return qc(e,t,o)}):Fm(e,t,r)}function Fm(e,t,r){t.status="fulfilled",t.value=r,Km(t),e.state=r,t=e.pending,t!==null&&(r=t.next,r===t?e.pending=null:(r=r.next,t.next=r,Ym(e,r)))}function qc(e,t,r){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do t.status="rejected",t.reason=r,Km(t),t=t.next;while(t!==o)}e.action=null}function Km(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Gm(e,t){return t}function Xm(e,t){if(tt){var r=dt.formState;if(r!==null){e:{var o=Ve;if(tt){if(St){t:{for(var c=St,h=qn;c.nodeType!==8;){if(!h){c=null;break t}if(c=Ln(c.nextSibling),c===null){c=null;break t}}h=c.data,c=h==="F!"||h==="F"?c:null}if(c){St=Ln(c.nextSibling),o=c.data==="F!";break e}}Ar(o)}o=!1}o&&(t=r[0])}}return r=Jt(),r.memoizedState=r.baseState=t,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Gm,lastRenderedState:t},r.queue=o,r=hp.bind(null,Ve,o),o.dispatch=r,o=Yc(!1),h=Qc.bind(null,Ve,!1,o.queue),o=Jt(),c={state:t,dispatch:null,action:e,pending:null},o.queue=c,r=V1.bind(null,Ve,c,h,r),c.dispatch=r,o.memoizedState=e,[t,r,!1]}function Qm(e){var t=Ot();return Zm(t,ot,e)}function Zm(e,t,r){if(t=$c(e,t,Gm)[0],e=is(ma)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var o=Ai(t)}catch(x){throw x===_i?es:x}else o=t;t=Ot();var c=t.queue,h=c.dispatch;return r!==t.memoizedState&&(Ve.flags|=2048,bl(9,os(),Y1.bind(null,c,r),null)),[o,h,e]}function Y1(e,t){e.action=t}function Im(e){var t=Ot(),r=ot;if(r!==null)return Zm(t,r,e);Ot(),t=t.memoizedState,r=Ot();var o=r.queue.dispatch;return r.memoizedState=e,[t,o,!1]}function bl(e,t,r,o){return e={tag:e,create:r,deps:o,inst:t,next:null},t=Ve.updateQueue,t===null&&(t=Hc(),Ve.updateQueue=t),r=t.lastEffect,r===null?t.lastEffect=e.next=e:(o=r.next,r.next=e,e.next=o,t.lastEffect=e),e}function os(){return{destroy:void 0,resource:void 0}}function Jm(){return Ot().memoizedState}function ss(e,t,r,o){var c=Jt();o=o===void 0?null:o,Ve.flags|=e,c.memoizedState=bl(1|t,os(),r,o)}function Ti(e,t,r,o){var c=Ot();o=o===void 0?null:o;var h=c.memoizedState.inst;ot!==null&&o!==null&&Lc(o,ot.memoizedState.deps)?c.memoizedState=bl(t,h,r,o):(Ve.flags|=e,c.memoizedState=bl(1|t,h,r,o))}function Wm(e,t){ss(8390656,8,e,t)}function ep(e,t){Ti(2048,8,e,t)}function tp(e,t){return Ti(4,2,e,t)}function np(e,t){return Ti(4,4,e,t)}function ap(e,t){if(typeof t=="function"){e=e();var r=t(e);return function(){typeof r=="function"?r():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function rp(e,t,r){r=r!=null?r.concat([e]):null,Ti(4,4,ap.bind(null,t,e),r)}function Fc(){}function lp(e,t){var r=Ot();t=t===void 0?null:t;var o=r.memoizedState;return t!==null&&Lc(t,o[1])?o[0]:(r.memoizedState=[e,t],e)}function ip(e,t){var r=Ot();t=t===void 0?null:t;var o=r.memoizedState;if(t!==null&&Lc(t,o[1]))return o[0];if(o=e(),Lr){Tn(!0);try{e()}finally{Tn(!1)}}return r.memoizedState=[o,t],o}function Kc(e,t,r){return r===void 0||(Ua&1073741824)!==0?e.memoizedState=t:(e.memoizedState=r,e=ug(),Ve.lanes|=e,qa|=e,r)}function op(e,t,r,o){return ln(r,t)?r:gl.current!==null?(e=Kc(e,r,o),ln(e,t)||(Lt=!0),e):(Ua&42)===0?(Lt=!0,e.memoizedState=r):(e=ug(),Ve.lanes|=e,qa|=e,t)}function sp(e,t,r,o,c){var h=Q.p;Q.p=h!==0&&8>h?h:8;var x=A.T,E={};A.T=E,Qc(e,!1,t,r);try{var T=c(),q=A.S;if(q!==null&&q(E,T),T!==null&&typeof T=="object"&&typeof T.then=="function"){var ee=H1(T,o);Mi(e,t,ee,fn(e))}else Mi(e,t,o,fn(e))}catch(se){Mi(e,t,{then:function(){},status:"rejected",reason:se},fn())}finally{Q.p=h,A.T=x}}function q1(){}function Gc(e,t,r,o){if(e.tag!==5)throw Error(i(476));var c=up(e).queue;sp(e,c,t,V,r===null?q1:function(){return cp(e),r(o)})}function up(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:V,baseState:V,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ma,lastRenderedState:V},next:null};var r={};return t.next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ma,lastRenderedState:r},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function cp(e){var t=up(e).next.queue;Mi(e,t,{},fn())}function Xc(){return qt(Zi)}function fp(){return Ot().memoizedState}function dp(){return Ot().memoizedState}function F1(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var r=fn();e=ka(r);var o=za(t,e,r);o!==null&&(dn(o,t,r),Ni(o,t,r)),t={cache:_c()},e.payload=t;return}t=t.return}}function K1(e,t,r){var o=fn();r={lane:o,revertLane:0,action:r,hasEagerState:!1,eagerState:null,next:null},us(e)?mp(t,r):(r=mc(e,t,r,o),r!==null&&(dn(r,e,o),pp(r,t,o)))}function hp(e,t,r){var o=fn();Mi(e,t,r,o)}function Mi(e,t,r,o){var c={lane:o,revertLane:0,action:r,hasEagerState:!1,eagerState:null,next:null};if(us(e))mp(t,c);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=t.lastRenderedReducer,h!==null))try{var x=t.lastRenderedState,E=h(x,r);if(c.hasEagerState=!0,c.eagerState=E,ln(E,x))return Ko(e,t,c,0),dt===null&&Fo(),!1}catch{}finally{}if(r=mc(e,t,c,o),r!==null)return dn(r,e,o),pp(r,t,o),!0}return!1}function Qc(e,t,r,o){if(o={lane:2,revertLane:jf(),action:o,hasEagerState:!1,eagerState:null,next:null},us(e)){if(t)throw Error(i(479))}else t=mc(e,r,o,2),t!==null&&dn(t,e,2)}function us(e){var t=e.alternate;return e===Ve||t!==null&&t===Ve}function mp(e,t){vl=as=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function pp(e,t,r){if((r&4194048)!==0){var o=t.lanes;o&=e.pendingLanes,r|=o,t.lanes=r,wr(e,r)}}var cs={readContext:qt,use:ls,useCallback:Ct,useContext:Ct,useEffect:Ct,useImperativeHandle:Ct,useLayoutEffect:Ct,useInsertionEffect:Ct,useMemo:Ct,useReducer:Ct,useRef:Ct,useState:Ct,useDebugValue:Ct,useDeferredValue:Ct,useTransition:Ct,useSyncExternalStore:Ct,useId:Ct,useHostTransitionStatus:Ct,useFormState:Ct,useActionState:Ct,useOptimistic:Ct,useMemoCache:Ct,useCacheRefresh:Ct},gp={readContext:qt,use:ls,useCallback:function(e,t){return Jt().memoizedState=[e,t===void 0?null:t],e},useContext:qt,useEffect:Wm,useImperativeHandle:function(e,t,r){r=r!=null?r.concat([e]):null,ss(4194308,4,ap.bind(null,t,e),r)},useLayoutEffect:function(e,t){return ss(4194308,4,e,t)},useInsertionEffect:function(e,t){ss(4,2,e,t)},useMemo:function(e,t){var r=Jt();t=t===void 0?null:t;var o=e();if(Lr){Tn(!0);try{e()}finally{Tn(!1)}}return r.memoizedState=[o,t],o},useReducer:function(e,t,r){var o=Jt();if(r!==void 0){var c=r(t);if(Lr){Tn(!0);try{r(t)}finally{Tn(!1)}}}else c=t;return o.memoizedState=o.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},o.queue=e,e=e.dispatch=K1.bind(null,Ve,e),[o.memoizedState,e]},useRef:function(e){var t=Jt();return e={current:e},t.memoizedState=e},useState:function(e){e=Yc(e);var t=e.queue,r=hp.bind(null,Ve,t);return t.dispatch=r,[e.memoizedState,r]},useDebugValue:Fc,useDeferredValue:function(e,t){var r=Jt();return Kc(r,e,t)},useTransition:function(){var e=Yc(!1);return e=sp.bind(null,Ve,e.queue,!0,!1),Jt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,r){var o=Ve,c=Jt();if(tt){if(r===void 0)throw Error(i(407));r=r()}else{if(r=t(),dt===null)throw Error(i(349));(We&124)!==0||Um(o,t,r)}c.memoizedState=r;var h={value:r,getSnapshot:t};return c.queue=h,Wm(Hm.bind(null,o,h,e),[e]),o.flags|=2048,bl(9,os(),Pm.bind(null,o,h,r,t),null),r},useId:function(){var e=Jt(),t=dt.identifierPrefix;if(tt){var r=fa,o=ca;r=(o&~(1<<32-Pt(o)-1)).toString(32)+r,t="«"+t+"R"+r,r=rs++,0<r&&(t+="H"+r.toString(32)),t+="»"}else r=B1++,t="«"+t+"r"+r.toString(32)+"»";return e.memoizedState=t},useHostTransitionStatus:Xc,useFormState:Xm,useActionState:Xm,useOptimistic:function(e){var t=Jt();t.memoizedState=t.baseState=e;var r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=r,t=Qc.bind(null,Ve,!0,r),r.dispatch=t,[e,t]},useMemoCache:Bc,useCacheRefresh:function(){return Jt().memoizedState=F1.bind(null,Ve)}},vp={readContext:qt,use:ls,useCallback:lp,useContext:qt,useEffect:ep,useImperativeHandle:rp,useInsertionEffect:tp,useLayoutEffect:np,useMemo:ip,useReducer:is,useRef:Jm,useState:function(){return is(ma)},useDebugValue:Fc,useDeferredValue:function(e,t){var r=Ot();return op(r,ot.memoizedState,e,t)},useTransition:function(){var e=is(ma)[0],t=Ot().memoizedState;return[typeof e=="boolean"?e:Ai(e),t]},useSyncExternalStore:zm,useId:fp,useHostTransitionStatus:Xc,useFormState:Qm,useActionState:Qm,useOptimistic:function(e,t){var r=Ot();return Vm(r,ot,e,t)},useMemoCache:Bc,useCacheRefresh:dp},G1={readContext:qt,use:ls,useCallback:lp,useContext:qt,useEffect:ep,useImperativeHandle:rp,useInsertionEffect:tp,useLayoutEffect:np,useMemo:ip,useReducer:Vc,useRef:Jm,useState:function(){return Vc(ma)},useDebugValue:Fc,useDeferredValue:function(e,t){var r=Ot();return ot===null?Kc(r,e,t):op(r,ot.memoizedState,e,t)},useTransition:function(){var e=Vc(ma)[0],t=Ot().memoizedState;return[typeof e=="boolean"?e:Ai(e),t]},useSyncExternalStore:zm,useId:fp,useHostTransitionStatus:Xc,useFormState:Im,useActionState:Im,useOptimistic:function(e,t){var r=Ot();return ot!==null?Vm(r,ot,e,t):(r.baseState=e,[e,r.queue.dispatch])},useMemoCache:Bc,useCacheRefresh:dp},xl=null,Di=0;function fs(e){var t=Di;return Di+=1,xl===null&&(xl=[]),jm(xl,e,t)}function Li(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ds(e,t){throw t.$$typeof===b?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function yp(e){var t=e._init;return t(e._payload)}function bp(e){function t(P,L){if(e){var Y=P.deletions;Y===null?(P.deletions=[L],P.flags|=16):Y.push(L)}}function r(P,L){if(!e)return null;for(;L!==null;)t(P,L),L=L.sibling;return null}function o(P){for(var L=new Map;P!==null;)P.key!==null?L.set(P.key,P):L.set(P.index,P),P=P.sibling;return L}function c(P,L){return P=ua(P,L),P.index=0,P.sibling=null,P}function h(P,L,Y){return P.index=Y,e?(Y=P.alternate,Y!==null?(Y=Y.index,Y<L?(P.flags|=67108866,L):Y):(P.flags|=67108866,L)):(P.flags|=1048576,L)}function x(P){return e&&P.alternate===null&&(P.flags|=67108866),P}function E(P,L,Y,re){return L===null||L.tag!==6?(L=gc(Y,P.mode,re),L.return=P,L):(L=c(L,Y),L.return=P,L)}function T(P,L,Y,re){var be=Y.type;return be===C?ee(P,L,Y.props.children,re,Y.key):L!==null&&(L.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===Z&&yp(be)===L.type)?(L=c(L,Y.props),Li(L,Y),L.return=P,L):(L=Xo(Y.type,Y.key,Y.props,null,P.mode,re),Li(L,Y),L.return=P,L)}function q(P,L,Y,re){return L===null||L.tag!==4||L.stateNode.containerInfo!==Y.containerInfo||L.stateNode.implementation!==Y.implementation?(L=vc(Y,P.mode,re),L.return=P,L):(L=c(L,Y.children||[]),L.return=P,L)}function ee(P,L,Y,re,be){return L===null||L.tag!==7?(L=Nr(Y,P.mode,re,be),L.return=P,L):(L=c(L,Y),L.return=P,L)}function se(P,L,Y){if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return L=gc(""+L,P.mode,Y),L.return=P,L;if(typeof L=="object"&&L!==null){switch(L.$$typeof){case w:return Y=Xo(L.type,L.key,L.props,null,P.mode,Y),Li(Y,L),Y.return=P,Y;case S:return L=vc(L,P.mode,Y),L.return=P,L;case Z:var re=L._init;return L=re(L._payload),se(P,L,Y)}if(ue(L)||J(L))return L=Nr(L,P.mode,Y,null),L.return=P,L;if(typeof L.then=="function")return se(P,fs(L),Y);if(L.$$typeof===k)return se(P,Jo(P,L),Y);ds(P,L)}return null}function G(P,L,Y,re){var be=L!==null?L.key:null;if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return be!==null?null:E(P,L,""+Y,re);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case w:return Y.key===be?T(P,L,Y,re):null;case S:return Y.key===be?q(P,L,Y,re):null;case Z:return be=Y._init,Y=be(Y._payload),G(P,L,Y,re)}if(ue(Y)||J(Y))return be!==null?null:ee(P,L,Y,re,null);if(typeof Y.then=="function")return G(P,L,fs(Y),re);if(Y.$$typeof===k)return G(P,L,Jo(P,Y),re);ds(P,Y)}return null}function X(P,L,Y,re,be){if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return P=P.get(Y)||null,E(L,P,""+re,be);if(typeof re=="object"&&re!==null){switch(re.$$typeof){case w:return P=P.get(re.key===null?Y:re.key)||null,T(L,P,re,be);case S:return P=P.get(re.key===null?Y:re.key)||null,q(L,P,re,be);case Z:var Ke=re._init;return re=Ke(re._payload),X(P,L,Y,re,be)}if(ue(re)||J(re))return P=P.get(Y)||null,ee(L,P,re,be,null);if(typeof re.then=="function")return X(P,L,Y,fs(re),be);if(re.$$typeof===k)return X(P,L,Y,Jo(L,re),be);ds(L,re)}return null}function ze(P,L,Y,re){for(var be=null,Ke=null,Re=L,De=L=0,zt=null;Re!==null&&De<Y.length;De++){Re.index>De?(zt=Re,Re=null):zt=Re.sibling;var et=G(P,Re,Y[De],re);if(et===null){Re===null&&(Re=zt);break}e&&Re&&et.alternate===null&&t(P,Re),L=h(et,L,De),Ke===null?be=et:Ke.sibling=et,Ke=et,Re=zt}if(De===Y.length)return r(P,Re),tt&&jr(P,De),be;if(Re===null){for(;De<Y.length;De++)Re=se(P,Y[De],re),Re!==null&&(L=h(Re,L,De),Ke===null?be=Re:Ke.sibling=Re,Ke=Re);return tt&&jr(P,De),be}for(Re=o(Re);De<Y.length;De++)zt=X(Re,P,De,Y[De],re),zt!==null&&(e&&zt.alternate!==null&&Re.delete(zt.key===null?De:zt.key),L=h(zt,L,De),Ke===null?be=zt:Ke.sibling=zt,Ke=zt);return e&&Re.forEach(function(Wa){return t(P,Wa)}),tt&&jr(P,De),be}function Me(P,L,Y,re){if(Y==null)throw Error(i(151));for(var be=null,Ke=null,Re=L,De=L=0,zt=null,et=Y.next();Re!==null&&!et.done;De++,et=Y.next()){Re.index>De?(zt=Re,Re=null):zt=Re.sibling;var Wa=G(P,Re,et.value,re);if(Wa===null){Re===null&&(Re=zt);break}e&&Re&&Wa.alternate===null&&t(P,Re),L=h(Wa,L,De),Ke===null?be=Wa:Ke.sibling=Wa,Ke=Wa,Re=zt}if(et.done)return r(P,Re),tt&&jr(P,De),be;if(Re===null){for(;!et.done;De++,et=Y.next())et=se(P,et.value,re),et!==null&&(L=h(et,L,De),Ke===null?be=et:Ke.sibling=et,Ke=et);return tt&&jr(P,De),be}for(Re=o(Re);!et.done;De++,et=Y.next())et=X(Re,P,De,et.value,re),et!==null&&(e&&et.alternate!==null&&Re.delete(et.key===null?De:et.key),L=h(et,L,De),Ke===null?be=et:Ke.sibling=et,Ke=et);return e&&Re.forEach(function(Xw){return t(P,Xw)}),tt&&jr(P,De),be}function ut(P,L,Y,re){if(typeof Y=="object"&&Y!==null&&Y.type===C&&Y.key===null&&(Y=Y.props.children),typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case w:e:{for(var be=Y.key;L!==null;){if(L.key===be){if(be=Y.type,be===C){if(L.tag===7){r(P,L.sibling),re=c(L,Y.props.children),re.return=P,P=re;break e}}else if(L.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===Z&&yp(be)===L.type){r(P,L.sibling),re=c(L,Y.props),Li(re,Y),re.return=P,P=re;break e}r(P,L);break}else t(P,L);L=L.sibling}Y.type===C?(re=Nr(Y.props.children,P.mode,re,Y.key),re.return=P,P=re):(re=Xo(Y.type,Y.key,Y.props,null,P.mode,re),Li(re,Y),re.return=P,P=re)}return x(P);case S:e:{for(be=Y.key;L!==null;){if(L.key===be)if(L.tag===4&&L.stateNode.containerInfo===Y.containerInfo&&L.stateNode.implementation===Y.implementation){r(P,L.sibling),re=c(L,Y.children||[]),re.return=P,P=re;break e}else{r(P,L);break}else t(P,L);L=L.sibling}re=vc(Y,P.mode,re),re.return=P,P=re}return x(P);case Z:return be=Y._init,Y=be(Y._payload),ut(P,L,Y,re)}if(ue(Y))return ze(P,L,Y,re);if(J(Y)){if(be=J(Y),typeof be!="function")throw Error(i(150));return Y=be.call(Y),Me(P,L,Y,re)}if(typeof Y.then=="function")return ut(P,L,fs(Y),re);if(Y.$$typeof===k)return ut(P,L,Jo(P,Y),re);ds(P,Y)}return typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint"?(Y=""+Y,L!==null&&L.tag===6?(r(P,L.sibling),re=c(L,Y),re.return=P,P=re):(r(P,L),re=gc(Y,P.mode,re),re.return=P,P=re),x(P)):r(P,L)}return function(P,L,Y,re){try{Di=0;var be=ut(P,L,Y,re);return xl=null,be}catch(Re){if(Re===_i||Re===es)throw Re;var Ke=on(29,Re,null,P.mode);return Ke.lanes=re,Ke.return=P,Ke}finally{}}}var wl=bp(!0),xp=bp(!1),Nn=F(null),Fn=null;function Pa(e){var t=e.alternate;K(Mt,Mt.current&1),K(Nn,e),Fn===null&&(t===null||gl.current!==null||t.memoizedState!==null)&&(Fn=e)}function wp(e){if(e.tag===22){if(K(Mt,Mt.current),K(Nn,e),Fn===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(Fn=e)}}else Ha()}function Ha(){K(Mt,Mt.current),K(Nn,Nn.current)}function pa(e){U(Nn),Fn===e&&(Fn=null),U(Mt)}var Mt=F(0);function hs(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||Bf(r)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){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}function Zc(e,t,r,o){t=e.memoizedState,r=r(o,t),r=r==null?t:v({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Ic={enqueueSetState:function(e,t,r){e=e._reactInternals;var o=fn(),c=ka(o);c.payload=t,r!=null&&(c.callback=r),t=za(e,c,o),t!==null&&(dn(t,e,o),Ni(t,e,o))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var o=fn(),c=ka(o);c.tag=1,c.payload=t,r!=null&&(c.callback=r),t=za(e,c,o),t!==null&&(dn(t,e,o),Ni(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=fn(),o=ka(r);o.tag=2,t!=null&&(o.callback=t),t=za(e,o,r),t!==null&&(dn(t,e,r),Ni(t,e,r))}};function Sp(e,t,r,o,c,h,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,h,x):t.prototype&&t.prototype.isPureReactComponent?!gi(r,o)||!gi(c,h):!0}function Ep(e,t,r,o){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,o),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,o),t.state!==e&&Ic.enqueueReplaceState(t,t.state,null)}function kr(e,t){var r=t;if("ref"in t){r={};for(var o in t)o!=="ref"&&(r[o]=t[o])}if(e=e.defaultProps){r===t&&(r=v({},r));for(var c in e)r[c]===void 0&&(r[c]=e[c])}return r}var ms=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)};function _p(e){ms(e)}function Cp(e){console.error(e)}function Np(e){ms(e)}function ps(e,t){try{var r=e.onUncaughtError;r(t.value,{componentStack:t.stack})}catch(o){setTimeout(function(){throw o})}}function Rp(e,t,r){try{var o=e.onCaughtError;o(r.value,{componentStack:r.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function Jc(e,t,r){return r=ka(r),r.tag=3,r.payload={element:null},r.callback=function(){ps(e,t)},r}function jp(e){return e=ka(e),e.tag=3,e}function Op(e,t,r,o){var c=r.type.getDerivedStateFromError;if(typeof c=="function"){var h=o.value;e.payload=function(){return c(h)},e.callback=function(){Rp(t,r,o)}}var x=r.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(e.callback=function(){Rp(t,r,o),typeof c!="function"&&(Fa===null?Fa=new Set([this]):Fa.add(this));var E=o.stack;this.componentDidCatch(o.value,{componentStack:E!==null?E:""})})}function X1(e,t,r,o,c){if(r.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(t=r.alternate,t!==null&&wi(t,r,c,!0),r=Nn.current,r!==null){switch(r.tag){case 13:return Fn===null?Ef():r.alternate===null&&Et===0&&(Et=3),r.flags&=-257,r.flags|=65536,r.lanes=c,o===Rc?r.flags|=16384:(t=r.updateQueue,t===null?r.updateQueue=new Set([o]):t.add(o),Cf(e,o,c)),!1;case 22:return r.flags|=65536,o===Rc?r.flags|=16384:(t=r.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([o])},r.updateQueue=t):(r=t.retryQueue,r===null?t.retryQueue=new Set([o]):r.add(o)),Cf(e,o,c)),!1}throw Error(i(435,r.tag))}return Cf(e,o,c),Ef(),!1}if(tt)return t=Nn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,o!==xc&&(e=Error(i(422),{cause:o}),xi(Sn(e,r)))):(o!==xc&&(t=Error(i(423),{cause:o}),xi(Sn(t,r))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,o=Sn(o,r),c=Jc(e.stateNode,o,c),Ac(e,c),Et!==4&&(Et=2)),!1;var h=Error(i(520),{cause:o});if(h=Sn(h,r),$i===null?$i=[h]:$i.push(h),Et!==4&&(Et=2),t===null)return!0;o=Sn(o,r),r=t;do{switch(r.tag){case 3:return r.flags|=65536,e=c&-c,r.lanes|=e,e=Jc(r.stateNode,o,e),Ac(r,e),!1;case 1:if(t=r.type,h=r.stateNode,(r.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(Fa===null||!Fa.has(h))))return r.flags|=65536,c&=-c,r.lanes|=c,c=jp(c),Op(c,e,r,o),Ac(r,c),!1}r=r.return}while(r!==null);return!1}var Ap=Error(i(461)),Lt=!1;function Ht(e,t,r,o){t.child=e===null?xp(t,null,r,o):wl(t,e.child,r,o)}function Tp(e,t,r,o,c){r=r.render;var h=t.ref;if("ref"in o){var x={};for(var E in o)E!=="ref"&&(x[E]=o[E])}else x=o;return Mr(t),o=kc(e,t,r,x,h,c),E=zc(),e!==null&&!Lt?(Uc(e,t,c),ga(e,t,c)):(tt&&E&&yc(t),t.flags|=1,Ht(e,t,o,c),t.child)}function Mp(e,t,r,o,c){if(e===null){var h=r.type;return typeof h=="function"&&!pc(h)&&h.defaultProps===void 0&&r.compare===null?(t.tag=15,t.type=h,Dp(e,t,h,o,c)):(e=Xo(r.type,null,o,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(h=e.child,!of(e,c)){var x=h.memoizedProps;if(r=r.compare,r=r!==null?r:gi,r(x,o)&&e.ref===t.ref)return ga(e,t,c)}return t.flags|=1,e=ua(h,o),e.ref=t.ref,e.return=t,t.child=e}function Dp(e,t,r,o,c){if(e!==null){var h=e.memoizedProps;if(gi(h,o)&&e.ref===t.ref)if(Lt=!1,t.pendingProps=o=h,of(e,c))(e.flags&131072)!==0&&(Lt=!0);else return t.lanes=e.lanes,ga(e,t,c)}return Wc(e,t,r,o,c)}function Lp(e,t,r){var o=t.pendingProps,c=o.children,h=e!==null?e.memoizedState:null;if(o.mode==="hidden"){if((t.flags&128)!==0){if(o=h!==null?h.baseLanes|r:r,e!==null){for(c=t.child=e.child,h=0;c!==null;)h=h|c.lanes|c.childLanes,c=c.sibling;t.childLanes=h&~o}else t.childLanes=0,t.child=null;return kp(e,t,o,r)}if((r&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Wo(t,h!==null?h.cachePool:null),h!==null?Dm(t,h):Mc(),wp(t);else return t.lanes=t.childLanes=536870912,kp(e,t,h!==null?h.baseLanes|r:r,r)}else h!==null?(Wo(t,h.cachePool),Dm(t,h),Ha(),t.memoizedState=null):(e!==null&&Wo(t,null),Mc(),Ha());return Ht(e,t,c,r),t.child}function kp(e,t,r,o){var c=Nc();return c=c===null?null:{parent:Tt._currentValue,pool:c},t.memoizedState={baseLanes:r,cachePool:c},e!==null&&Wo(t,null),Mc(),wp(t),e!==null&&wi(e,t,o,!0),null}function gs(e,t){var r=t.ref;if(r===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof r!="function"&&typeof r!="object")throw Error(i(284));(e===null||e.ref!==r)&&(t.flags|=4194816)}}function Wc(e,t,r,o,c){return Mr(t),r=kc(e,t,r,o,void 0,c),o=zc(),e!==null&&!Lt?(Uc(e,t,c),ga(e,t,c)):(tt&&o&&yc(t),t.flags|=1,Ht(e,t,r,c),t.child)}function zp(e,t,r,o,c,h){return Mr(t),t.updateQueue=null,r=km(t,o,r,c),Lm(e),o=zc(),e!==null&&!Lt?(Uc(e,t,h),ga(e,t,h)):(tt&&o&&yc(t),t.flags|=1,Ht(e,t,r,h),t.child)}function Up(e,t,r,o,c){if(Mr(t),t.stateNode===null){var h=fl,x=r.contextType;typeof x=="object"&&x!==null&&(h=qt(x)),h=new r(o,h),t.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=Ic,t.stateNode=h,h._reactInternals=t,h=t.stateNode,h.props=o,h.state=t.memoizedState,h.refs={},jc(t),x=r.contextType,h.context=typeof x=="object"&&x!==null?qt(x):fl,h.state=t.memoizedState,x=r.getDerivedStateFromProps,typeof x=="function"&&(Zc(t,r,x,o),h.state=t.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(x=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),x!==h.state&&Ic.enqueueReplaceState(h,h.state,null),ji(t,o,h,c),Ri(),h.state=t.memoizedState),typeof h.componentDidMount=="function"&&(t.flags|=4194308),o=!0}else if(e===null){h=t.stateNode;var E=t.memoizedProps,T=kr(r,E);h.props=T;var q=h.context,ee=r.contextType;x=fl,typeof ee=="object"&&ee!==null&&(x=qt(ee));var se=r.getDerivedStateFromProps;ee=typeof se=="function"||typeof h.getSnapshotBeforeUpdate=="function",E=t.pendingProps!==E,ee||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(E||q!==x)&&Ep(t,h,o,x),La=!1;var G=t.memoizedState;h.state=G,ji(t,o,h,c),Ri(),q=t.memoizedState,E||G!==q||La?(typeof se=="function"&&(Zc(t,r,se,o),q=t.memoizedState),(T=La||Sp(t,r,T,o,G,q,x))?(ee||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount()),typeof h.componentDidMount=="function"&&(t.flags|=4194308)):(typeof h.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=o,t.memoizedState=q),h.props=o,h.state=q,h.context=x,o=T):(typeof h.componentDidMount=="function"&&(t.flags|=4194308),o=!1)}else{h=t.stateNode,Oc(e,t),x=t.memoizedProps,ee=kr(r,x),h.props=ee,se=t.pendingProps,G=h.context,q=r.contextType,T=fl,typeof q=="object"&&q!==null&&(T=qt(q)),E=r.getDerivedStateFromProps,(q=typeof E=="function"||typeof h.getSnapshotBeforeUpdate=="function")||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(x!==se||G!==T)&&Ep(t,h,o,T),La=!1,G=t.memoizedState,h.state=G,ji(t,o,h,c),Ri();var X=t.memoizedState;x!==se||G!==X||La||e!==null&&e.dependencies!==null&&Io(e.dependencies)?(typeof E=="function"&&(Zc(t,r,E,o),X=t.memoizedState),(ee=La||Sp(t,r,ee,o,G,X,T)||e!==null&&e.dependencies!==null&&Io(e.dependencies))?(q||typeof h.UNSAFE_componentWillUpdate!="function"&&typeof h.componentWillUpdate!="function"||(typeof h.componentWillUpdate=="function"&&h.componentWillUpdate(o,X,T),typeof h.UNSAFE_componentWillUpdate=="function"&&h.UNSAFE_componentWillUpdate(o,X,T)),typeof h.componentDidUpdate=="function"&&(t.flags|=4),typeof h.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof h.componentDidUpdate!="function"||x===e.memoizedProps&&G===e.memoizedState||(t.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&G===e.memoizedState||(t.flags|=1024),t.memoizedProps=o,t.memoizedState=X),h.props=o,h.state=X,h.context=T,o=ee):(typeof h.componentDidUpdate!="function"||x===e.memoizedProps&&G===e.memoizedState||(t.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&G===e.memoizedState||(t.flags|=1024),o=!1)}return h=o,gs(e,t),o=(t.flags&128)!==0,h||o?(h=t.stateNode,r=o&&typeof r.getDerivedStateFromError!="function"?null:h.render(),t.flags|=1,e!==null&&o?(t.child=wl(t,e.child,null,c),t.child=wl(t,null,r,c)):Ht(e,t,r,c),t.memoizedState=h.state,e=t.child):e=ga(e,t,c),e}function Pp(e,t,r,o){return bi(),t.flags|=256,Ht(e,t,r,o),t.child}var ef={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function tf(e){return{baseLanes:e,cachePool:Cm()}}function nf(e,t,r){return e=e!==null?e.childLanes&~r:0,t&&(e|=Rn),e}function Hp(e,t,r){var o=t.pendingProps,c=!1,h=(t.flags&128)!==0,x;if((x=h)||(x=e!==null&&e.memoizedState===null?!1:(Mt.current&2)!==0),x&&(c=!0,t.flags&=-129),x=(t.flags&32)!==0,t.flags&=-33,e===null){if(tt){if(c?Pa(t):Ha(),tt){var E=St,T;if(T=E){e:{for(T=E,E=qn;T.nodeType!==8;){if(!E){E=null;break e}if(T=Ln(T.nextSibling),T===null){E=null;break e}}E=T}E!==null?(t.memoizedState={dehydrated:E,treeContext:Rr!==null?{id:ca,overflow:fa}:null,retryLane:536870912,hydrationErrors:null},T=on(18,null,null,0),T.stateNode=E,T.return=t,t.child=T,Xt=t,St=null,T=!0):T=!1}T||Ar(t)}if(E=t.memoizedState,E!==null&&(E=E.dehydrated,E!==null))return Bf(E)?t.lanes=32:t.lanes=536870912,null;pa(t)}return E=o.children,o=o.fallback,c?(Ha(),c=t.mode,E=vs({mode:"hidden",children:E},c),o=Nr(o,c,r,null),E.return=t,o.return=t,E.sibling=o,t.child=E,c=t.child,c.memoizedState=tf(r),c.childLanes=nf(e,x,r),t.memoizedState=ef,o):(Pa(t),af(t,E))}if(T=e.memoizedState,T!==null&&(E=T.dehydrated,E!==null)){if(h)t.flags&256?(Pa(t),t.flags&=-257,t=rf(e,t,r)):t.memoizedState!==null?(Ha(),t.child=e.child,t.flags|=128,t=null):(Ha(),c=o.fallback,E=t.mode,o=vs({mode:"visible",children:o.children},E),c=Nr(c,E,r,null),c.flags|=2,o.return=t,c.return=t,o.sibling=c,t.child=o,wl(t,e.child,null,r),o=t.child,o.memoizedState=tf(r),o.childLanes=nf(e,x,r),t.memoizedState=ef,t=c);else if(Pa(t),Bf(E)){if(x=E.nextSibling&&E.nextSibling.dataset,x)var q=x.dgst;x=q,o=Error(i(419)),o.stack="",o.digest=x,xi({value:o,source:null,stack:null}),t=rf(e,t,r)}else if(Lt||wi(e,t,r,!1),x=(r&e.childLanes)!==0,Lt||x){if(x=dt,x!==null&&(o=r&-r,o=(o&42)!==0?1:oi(o),o=(o&(x.suspendedLanes|r))!==0?0:o,o!==0&&o!==T.retryLane))throw T.retryLane=o,cl(e,o),dn(x,e,o),Ap;E.data==="$?"||Ef(),t=rf(e,t,r)}else E.data==="$?"?(t.flags|=192,t.child=e.child,t=null):(e=T.treeContext,St=Ln(E.nextSibling),Xt=t,tt=!0,Or=null,qn=!1,e!==null&&(_n[Cn++]=ca,_n[Cn++]=fa,_n[Cn++]=Rr,ca=e.id,fa=e.overflow,Rr=t),t=af(t,o.children),t.flags|=4096);return t}return c?(Ha(),c=o.fallback,E=t.mode,T=e.child,q=T.sibling,o=ua(T,{mode:"hidden",children:o.children}),o.subtreeFlags=T.subtreeFlags&65011712,q!==null?c=ua(q,c):(c=Nr(c,E,r,null),c.flags|=2),c.return=t,o.return=t,o.sibling=c,t.child=o,o=c,c=t.child,E=e.child.memoizedState,E===null?E=tf(r):(T=E.cachePool,T!==null?(q=Tt._currentValue,T=T.parent!==q?{parent:q,pool:q}:T):T=Cm(),E={baseLanes:E.baseLanes|r,cachePool:T}),c.memoizedState=E,c.childLanes=nf(e,x,r),t.memoizedState=ef,o):(Pa(t),r=e.child,e=r.sibling,r=ua(r,{mode:"visible",children:o.children}),r.return=t,r.sibling=null,e!==null&&(x=t.deletions,x===null?(t.deletions=[e],t.flags|=16):x.push(e)),t.child=r,t.memoizedState=null,r)}function af(e,t){return t=vs({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function vs(e,t){return e=on(22,e,null,t),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function rf(e,t,r){return wl(t,e.child,null,r),e=af(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Bp(e,t,r){e.lanes|=t;var o=e.alternate;o!==null&&(o.lanes|=t),Sc(e.return,t,r)}function lf(e,t,r,o,c){var h=e.memoizedState;h===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:o,tail:r,tailMode:c}:(h.isBackwards=t,h.rendering=null,h.renderingStartTime=0,h.last=o,h.tail=r,h.tailMode=c)}function $p(e,t,r){var o=t.pendingProps,c=o.revealOrder,h=o.tail;if(Ht(e,t,o.children,r),o=Mt.current,(o&2)!==0)o=o&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Bp(e,r,t);else if(e.tag===19)Bp(e,r,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}o&=1}switch(K(Mt,o),c){case"forwards":for(r=t.child,c=null;r!==null;)e=r.alternate,e!==null&&hs(e)===null&&(c=r),r=r.sibling;r=c,r===null?(c=t.child,t.child=null):(c=r.sibling,r.sibling=null),lf(t,!1,c,r,h);break;case"backwards":for(r=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&hs(e)===null){t.child=c;break}e=c.sibling,c.sibling=r,r=c,c=e}lf(t,!0,r,null,h);break;case"together":lf(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ga(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),qa|=t.lanes,(r&t.childLanes)===0)if(e!==null){if(wi(e,t,r,!1),(r&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,r=ua(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=ua(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function of(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Io(e)))}function Q1(e,t,r){switch(t.tag){case 3:Le(t,t.stateNode.containerInfo),Da(t,Tt,e.memoizedState.cache),bi();break;case 27:case 5:Je(t);break;case 4:Le(t,t.stateNode.containerInfo);break;case 10:Da(t,t.type,t.memoizedProps.value);break;case 13:var o=t.memoizedState;if(o!==null)return o.dehydrated!==null?(Pa(t),t.flags|=128,null):(r&t.child.childLanes)!==0?Hp(e,t,r):(Pa(t),e=ga(e,t,r),e!==null?e.sibling:null);Pa(t);break;case 19:var c=(e.flags&128)!==0;if(o=(r&t.childLanes)!==0,o||(wi(e,t,r,!1),o=(r&t.childLanes)!==0),c){if(o)return $p(e,t,r);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),K(Mt,Mt.current),o)break;return null;case 22:case 23:return t.lanes=0,Lp(e,t,r);case 24:Da(t,Tt,e.memoizedState.cache)}return ga(e,t,r)}function Vp(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps)Lt=!0;else{if(!of(e,r)&&(t.flags&128)===0)return Lt=!1,Q1(e,t,r);Lt=(e.flags&131072)!==0}else Lt=!1,tt&&(t.flags&1048576)!==0&&ym(t,Zo,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var o=t.elementType,c=o._init;if(o=c(o._payload),t.type=o,typeof o=="function")pc(o)?(e=kr(o,e),t.tag=1,t=Up(null,t,o,e,r)):(t.tag=0,t=Wc(null,t,o,e,r));else{if(o!=null){if(c=o.$$typeof,c===H){t.tag=11,t=Tp(null,t,o,e,r);break e}else if(c===B){t.tag=14,t=Mp(null,t,o,e,r);break e}}throw t=W(o)||o,Error(i(306,t,""))}}return t;case 0:return Wc(e,t,t.type,t.pendingProps,r);case 1:return o=t.type,c=kr(o,t.pendingProps),Up(e,t,o,c,r);case 3:e:{if(Le(t,t.stateNode.containerInfo),e===null)throw Error(i(387));o=t.pendingProps;var h=t.memoizedState;c=h.element,Oc(e,t),ji(t,o,null,r);var x=t.memoizedState;if(o=x.cache,Da(t,Tt,o),o!==h.cache&&Ec(t,[Tt],r,!0),Ri(),o=x.element,h.isDehydrated)if(h={element:o,isDehydrated:!1,cache:x.cache},t.updateQueue.baseState=h,t.memoizedState=h,t.flags&256){t=Pp(e,t,o,r);break e}else if(o!==c){c=Sn(Error(i(424)),t),xi(c),t=Pp(e,t,o,r);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(St=Ln(e.firstChild),Xt=t,tt=!0,Or=null,qn=!0,r=xp(t,null,o,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling}else{if(bi(),o===c){t=ga(e,t,r);break e}Ht(e,t,o,r)}t=t.child}return t;case 26:return gs(e,t),e===null?(r=Kg(t.type,null,t.pendingProps,null))?t.memoizedState=r:tt||(r=t.type,e=t.pendingProps,o=Ts(ge.current).createElement(r),o[ce]=t,o[me]=e,$t(o,r,e),He(o),t.stateNode=o):t.memoizedState=Kg(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Je(t),e===null&&tt&&(o=t.stateNode=Yg(t.type,t.pendingProps,ge.current),Xt=t,qn=!0,c=St,Xa(t.type)?($f=c,St=Ln(o.firstChild)):St=c),Ht(e,t,t.pendingProps.children,r),gs(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&tt&&((c=o=St)&&(o=Ew(o,t.type,t.pendingProps,qn),o!==null?(t.stateNode=o,Xt=t,St=Ln(o.firstChild),qn=!1,c=!0):c=!1),c||Ar(t)),Je(t),c=t.type,h=t.pendingProps,x=e!==null?e.memoizedProps:null,o=h.children,Uf(c,h)?o=null:x!==null&&Uf(c,x)&&(t.flags|=32),t.memoizedState!==null&&(c=kc(e,t,$1,null,null,r),Zi._currentValue=c),gs(e,t),Ht(e,t,o,r),t.child;case 6:return e===null&&tt&&((e=r=St)&&(r=_w(r,t.pendingProps,qn),r!==null?(t.stateNode=r,Xt=t,St=null,e=!0):e=!1),e||Ar(t)),null;case 13:return Hp(e,t,r);case 4:return Le(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=wl(t,null,o,r):Ht(e,t,o,r),t.child;case 11:return Tp(e,t,t.type,t.pendingProps,r);case 7:return Ht(e,t,t.pendingProps,r),t.child;case 8:return Ht(e,t,t.pendingProps.children,r),t.child;case 12:return Ht(e,t,t.pendingProps.children,r),t.child;case 10:return o=t.pendingProps,Da(t,t.type,o.value),Ht(e,t,o.children,r),t.child;case 9:return c=t.type._context,o=t.pendingProps.children,Mr(t),c=qt(c),o=o(c),t.flags|=1,Ht(e,t,o,r),t.child;case 14:return Mp(e,t,t.type,t.pendingProps,r);case 15:return Dp(e,t,t.type,t.pendingProps,r);case 19:return $p(e,t,r);case 31:return o=t.pendingProps,r=t.mode,o={mode:o.mode,children:o.children},e===null?(r=vs(o,r),r.ref=t.ref,t.child=r,r.return=t,t=r):(r=ua(e.child,o),r.ref=t.ref,t.child=r,r.return=t,t=r),t;case 22:return Lp(e,t,r);case 24:return Mr(t),o=qt(Tt),e===null?(c=Nc(),c===null&&(c=dt,h=_c(),c.pooledCache=h,h.refCount++,h!==null&&(c.pooledCacheLanes|=r),c=h),t.memoizedState={parent:o,cache:c},jc(t),Da(t,Tt,c)):((e.lanes&r)!==0&&(Oc(e,t),ji(t,null,null,r),Ri()),c=e.memoizedState,h=t.memoizedState,c.parent!==o?(c={parent:o,cache:o},t.memoizedState=c,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=c),Da(t,Tt,o)):(o=h.cache,Da(t,Tt,o),o!==c.cache&&Ec(t,[Tt],r,!0))),Ht(e,t,t.pendingProps.children,r),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function va(e){e.flags|=4}function Yp(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Ig(t)){if(t=Nn.current,t!==null&&((We&4194048)===We?Fn!==null:(We&62914560)!==We&&(We&536870912)===0||t!==Fn))throw Ci=Rc,Nm;e.flags|=8192}}function ys(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Mo():536870912,e.lanes|=t,Cl|=t)}function ki(e,t){if(!tt)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var o=null;r!==null;)r.alternate!==null&&(o=r),r=r.sibling;o===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function bt(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,o=0;if(t)for(var c=e.child;c!==null;)r|=c.lanes|c.childLanes,o|=c.subtreeFlags&65011712,o|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)r|=c.lanes|c.childLanes,o|=c.subtreeFlags,o|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=o,e.childLanes=r,t}function Z1(e,t,r){var o=t.pendingProps;switch(bc(t),t.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return bt(t),null;case 1:return bt(t),null;case 3:return r=t.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),t.memoizedState.cache!==o&&(t.flags|=2048),ha(Tt),qe(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(yi(t)?va(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,wm())),bt(t),null;case 26:return r=t.memoizedState,e===null?(va(t),r!==null?(bt(t),Yp(t,r)):(bt(t),t.flags&=-16777217)):r?r!==e.memoizedState?(va(t),bt(t),Yp(t,r)):(bt(t),t.flags&=-16777217):(e.memoizedProps!==o&&va(t),bt(t),t.flags&=-16777217),null;case 27:At(t),r=ge.current;var c=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==o&&va(t);else{if(!o){if(t.stateNode===null)throw Error(i(166));return bt(t),null}e=ae.current,yi(t)?bm(t):(e=Yg(c,o,r),t.stateNode=e,va(t))}return bt(t),null;case 5:if(At(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==o&&va(t);else{if(!o){if(t.stateNode===null)throw Error(i(166));return bt(t),null}if(e=ae.current,yi(t))bm(t);else{switch(c=Ts(ge.current),e){case 1:e=c.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:e=c.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":e=c.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":e=c.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":e=c.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof o.is=="string"?c.createElement("select",{is:o.is}):c.createElement("select"),o.multiple?e.multiple=!0:o.size&&(e.size=o.size);break;default:e=typeof o.is=="string"?c.createElement(r,{is:o.is}):c.createElement(r)}}e[ce]=t,e[me]=o;e:for(c=t.child;c!==null;){if(c.tag===5||c.tag===6)e.appendChild(c.stateNode);else if(c.tag!==4&&c.tag!==27&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===t)break e;for(;c.sibling===null;){if(c.return===null||c.return===t)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}t.stateNode=e;e:switch($t(e,r,o),r){case"button":case"input":case"select":case"textarea":e=!!o.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&va(t)}}return bt(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==o&&va(t);else{if(typeof o!="string"&&t.stateNode===null)throw Error(i(166));if(e=ge.current,yi(t)){if(e=t.stateNode,r=t.memoizedProps,o=null,c=Xt,c!==null)switch(c.tag){case 27:case 5:o=c.memoizedProps}e[ce]=t,e=!!(e.nodeValue===r||o!==null&&o.suppressHydrationWarning===!0||zg(e.nodeValue,r)),e||Ar(t)}else e=Ts(e).createTextNode(o),e[ce]=t,t.stateNode=e}return bt(t),null;case 13:if(o=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=yi(t),o!==null&&o.dehydrated!==null){if(e===null){if(!c)throw Error(i(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(i(317));c[ce]=t}else bi(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;bt(t),c=!1}else c=wm(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(pa(t),t):(pa(t),null)}if(pa(t),(t.flags&128)!==0)return t.lanes=r,t;if(r=o!==null,e=e!==null&&e.memoizedState!==null,r){o=t.child,c=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(c=o.alternate.memoizedState.cachePool.pool);var h=null;o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(h=o.memoizedState.cachePool.pool),h!==c&&(o.flags|=2048)}return r!==e&&r&&(t.child.flags|=8192),ys(t,t.updateQueue),bt(t),null;case 4:return qe(),e===null&&Mf(t.stateNode.containerInfo),bt(t),null;case 10:return ha(t.type),bt(t),null;case 19:if(U(Mt),c=t.memoizedState,c===null)return bt(t),null;if(o=(t.flags&128)!==0,h=c.rendering,h===null)if(o)ki(c,!1);else{if(Et!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(h=hs(e),h!==null){for(t.flags|=128,ki(c,!1),e=h.updateQueue,t.updateQueue=e,ys(t,e),t.subtreeFlags=0,e=r,r=t.child;r!==null;)vm(r,e),r=r.sibling;return K(Mt,Mt.current&1|2),t.child}e=e.sibling}c.tail!==null&&he()>ws&&(t.flags|=128,o=!0,ki(c,!1),t.lanes=4194304)}else{if(!o)if(e=hs(h),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,ys(t,e),ki(c,!0),c.tail===null&&c.tailMode==="hidden"&&!h.alternate&&!tt)return bt(t),null}else 2*he()-c.renderingStartTime>ws&&r!==536870912&&(t.flags|=128,o=!0,ki(c,!1),t.lanes=4194304);c.isBackwards?(h.sibling=t.child,t.child=h):(e=c.last,e!==null?e.sibling=h:t.child=h,c.last=h)}return c.tail!==null?(t=c.tail,c.rendering=t,c.tail=t.sibling,c.renderingStartTime=he(),t.sibling=null,e=Mt.current,K(Mt,o?e&1|2:e&1),t):(bt(t),null);case 22:case 23:return pa(t),Dc(),o=t.memoizedState!==null,e!==null?e.memoizedState!==null!==o&&(t.flags|=8192):o&&(t.flags|=8192),o?(r&536870912)!==0&&(t.flags&128)===0&&(bt(t),t.subtreeFlags&6&&(t.flags|=8192)):bt(t),r=t.updateQueue,r!==null&&ys(t,r.retryQueue),r=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),o=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(o=t.memoizedState.cachePool.pool),o!==r&&(t.flags|=2048),e!==null&&U(Dr),null;case 24:return r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ha(Tt),bt(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function I1(e,t){switch(bc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ha(Tt),qe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return At(t),null;case 13:if(pa(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));bi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return U(Mt),null;case 4:return qe(),null;case 10:return ha(t.type),null;case 22:case 23:return pa(t),Dc(),e!==null&&U(Dr),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ha(Tt),null;case 25:return null;default:return null}}function qp(e,t){switch(bc(t),t.tag){case 3:ha(Tt),qe();break;case 26:case 27:case 5:At(t);break;case 4:qe();break;case 13:pa(t);break;case 19:U(Mt);break;case 10:ha(t.type);break;case 22:case 23:pa(t),Dc(),e!==null&&U(Dr);break;case 24:ha(Tt)}}function zi(e,t){try{var r=t.updateQueue,o=r!==null?r.lastEffect:null;if(o!==null){var c=o.next;r=c;do{if((r.tag&e)===e){o=void 0;var h=r.create,x=r.inst;o=h(),x.destroy=o}r=r.next}while(r!==c)}}catch(E){ct(t,t.return,E)}}function Ba(e,t,r){try{var o=t.updateQueue,c=o!==null?o.lastEffect:null;if(c!==null){var h=c.next;o=h;do{if((o.tag&e)===e){var x=o.inst,E=x.destroy;if(E!==void 0){x.destroy=void 0,c=t;var T=r,q=E;try{q()}catch(ee){ct(c,T,ee)}}}o=o.next}while(o!==h)}}catch(ee){ct(t,t.return,ee)}}function Fp(e){var t=e.updateQueue;if(t!==null){var r=e.stateNode;try{Mm(t,r)}catch(o){ct(e,e.return,o)}}}function Kp(e,t,r){r.props=kr(e.type,e.memoizedProps),r.state=e.memoizedState;try{r.componentWillUnmount()}catch(o){ct(e,t,o)}}function Ui(e,t){try{var r=e.ref;if(r!==null){switch(e.tag){case 26:case 27:case 5:var o=e.stateNode;break;case 30:o=e.stateNode;break;default:o=e.stateNode}typeof r=="function"?e.refCleanup=r(o):r.current=o}}catch(c){ct(e,t,c)}}function Kn(e,t){var r=e.ref,o=e.refCleanup;if(r!==null)if(typeof o=="function")try{o()}catch(c){ct(e,t,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof r=="function")try{r(null)}catch(c){ct(e,t,c)}else r.current=null}function Gp(e){var t=e.type,r=e.memoizedProps,o=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":r.autoFocus&&o.focus();break e;case"img":r.src?o.src=r.src:r.srcSet&&(o.srcset=r.srcSet)}}catch(c){ct(e,e.return,c)}}function sf(e,t,r){try{var o=e.stateNode;yw(o,e.type,r,t),o[me]=t}catch(c){ct(e,e.return,c)}}function Xp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Xa(e.type)||e.tag===4}function uf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Xp(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&&Xa(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 cf(e,t,r){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r).insertBefore(e,t):(t=r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,t.appendChild(e),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=As));else if(o!==4&&(o===27&&Xa(e.type)&&(r=e.stateNode,t=null),e=e.child,e!==null))for(cf(e,t,r),e=e.sibling;e!==null;)cf(e,t,r),e=e.sibling}function bs(e,t,r){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(o!==4&&(o===27&&Xa(e.type)&&(r=e.stateNode),e=e.child,e!==null))for(bs(e,t,r),e=e.sibling;e!==null;)bs(e,t,r),e=e.sibling}function Qp(e){var t=e.stateNode,r=e.memoizedProps;try{for(var o=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);$t(t,o,r),t[ce]=e,t[me]=r}catch(h){ct(e,e.return,h)}}var ya=!1,Nt=!1,ff=!1,Zp=typeof WeakSet=="function"?WeakSet:Set,kt=null;function J1(e,t){if(e=e.containerInfo,kf=Us,e=om(e),sc(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var o=r.getSelection&&r.getSelection();if(o&&o.rangeCount!==0){r=o.anchorNode;var c=o.anchorOffset,h=o.focusNode;o=o.focusOffset;try{r.nodeType,h.nodeType}catch{r=null;break e}var x=0,E=-1,T=-1,q=0,ee=0,se=e,G=null;t:for(;;){for(var X;se!==r||c!==0&&se.nodeType!==3||(E=x+c),se!==h||o!==0&&se.nodeType!==3||(T=x+o),se.nodeType===3&&(x+=se.nodeValue.length),(X=se.firstChild)!==null;)G=se,se=X;for(;;){if(se===e)break t;if(G===r&&++q===c&&(E=x),G===h&&++ee===o&&(T=x),(X=se.nextSibling)!==null)break;se=G,G=se.parentNode}se=X}r=E===-1||T===-1?null:{start:E,end:T}}else r=null}r=r||{start:0,end:0}}else r=null;for(zf={focusedElem:e,selectionRange:r},Us=!1,kt=t;kt!==null;)if(t=kt,e=t.child,(t.subtreeFlags&1024)!==0&&e!==null)e.return=t,kt=e;else for(;kt!==null;){switch(t=kt,h=t.alternate,e=t.flags,t.tag){case 0:break;case 11:case 15:break;case 1:if((e&1024)!==0&&h!==null){e=void 0,r=t,c=h.memoizedProps,h=h.memoizedState,o=r.stateNode;try{var ze=kr(r.type,c,r.elementType===r.type);e=o.getSnapshotBeforeUpdate(ze,h),o.__reactInternalSnapshotBeforeUpdate=e}catch(Me){ct(r,r.return,Me)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,r=e.nodeType,r===9)Hf(e);else if(r===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Hf(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(i(163))}if(e=t.sibling,e!==null){e.return=t.return,kt=e;break}kt=t.return}}function Ip(e,t,r){var o=r.flags;switch(r.tag){case 0:case 11:case 15:$a(e,r),o&4&&zi(5,r);break;case 1:if($a(e,r),o&4)if(e=r.stateNode,t===null)try{e.componentDidMount()}catch(x){ct(r,r.return,x)}else{var c=kr(r.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(x){ct(r,r.return,x)}}o&64&&Fp(r),o&512&&Ui(r,r.return);break;case 3:if($a(e,r),o&64&&(e=r.updateQueue,e!==null)){if(t=null,r.child!==null)switch(r.child.tag){case 27:case 5:t=r.child.stateNode;break;case 1:t=r.child.stateNode}try{Mm(e,t)}catch(x){ct(r,r.return,x)}}break;case 27:t===null&&o&4&&Qp(r);case 26:case 5:$a(e,r),t===null&&o&4&&Gp(r),o&512&&Ui(r,r.return);break;case 12:$a(e,r);break;case 13:$a(e,r),o&4&&eg(e,r),o&64&&(e=r.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(r=ow.bind(null,r),Cw(e,r))));break;case 22:if(o=r.memoizedState!==null||ya,!o){t=t!==null&&t.memoizedState!==null||Nt,c=ya;var h=Nt;ya=o,(Nt=t)&&!h?Va(e,r,(r.subtreeFlags&8772)!==0):$a(e,r),ya=c,Nt=h}break;case 30:break;default:$a(e,r)}}function Jp(e){var t=e.alternate;t!==null&&(e.alternate=null,Jp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ne(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 gt=null,Wt=!1;function ba(e,t,r){for(r=r.child;r!==null;)Wp(e,t,r),r=r.sibling}function Wp(e,t,r){if(vt&&typeof vt.onCommitFiberUnmount=="function")try{vt.onCommitFiberUnmount(Zt,r)}catch{}switch(r.tag){case 26:Nt||Kn(r,t),ba(e,t,r),r.memoizedState?r.memoizedState.count--:r.stateNode&&(r=r.stateNode,r.parentNode.removeChild(r));break;case 27:Nt||Kn(r,t);var o=gt,c=Wt;Xa(r.type)&&(gt=r.stateNode,Wt=!1),ba(e,t,r),Ki(r.stateNode),gt=o,Wt=c;break;case 5:Nt||Kn(r,t);case 6:if(o=gt,c=Wt,gt=null,ba(e,t,r),gt=o,Wt=c,gt!==null)if(Wt)try{(gt.nodeType===9?gt.body:gt.nodeName==="HTML"?gt.ownerDocument.body:gt).removeChild(r.stateNode)}catch(h){ct(r,t,h)}else try{gt.removeChild(r.stateNode)}catch(h){ct(r,t,h)}break;case 18:gt!==null&&(Wt?(e=gt,$g(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,r.stateNode),eo(e)):$g(gt,r.stateNode));break;case 4:o=gt,c=Wt,gt=r.stateNode.containerInfo,Wt=!0,ba(e,t,r),gt=o,Wt=c;break;case 0:case 11:case 14:case 15:Nt||Ba(2,r,t),Nt||Ba(4,r,t),ba(e,t,r);break;case 1:Nt||(Kn(r,t),o=r.stateNode,typeof o.componentWillUnmount=="function"&&Kp(r,t,o)),ba(e,t,r);break;case 21:ba(e,t,r);break;case 22:Nt=(o=Nt)||r.memoizedState!==null,ba(e,t,r),Nt=o;break;default:ba(e,t,r)}}function eg(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{eo(e)}catch(r){ct(t,t.return,r)}}function W1(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Zp),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Zp),t;default:throw Error(i(435,e.tag))}}function df(e,t){var r=W1(e);t.forEach(function(o){var c=sw.bind(null,e,o);r.has(o)||(r.add(o),o.then(c,c))})}function sn(e,t){var r=t.deletions;if(r!==null)for(var o=0;o<r.length;o++){var c=r[o],h=e,x=t,E=x;e:for(;E!==null;){switch(E.tag){case 27:if(Xa(E.type)){gt=E.stateNode,Wt=!1;break e}break;case 5:gt=E.stateNode,Wt=!1;break e;case 3:case 4:gt=E.stateNode.containerInfo,Wt=!0;break e}E=E.return}if(gt===null)throw Error(i(160));Wp(h,x,c),gt=null,Wt=!1,h=c.alternate,h!==null&&(h.return=null),c.return=null}if(t.subtreeFlags&13878)for(t=t.child;t!==null;)tg(t,e),t=t.sibling}var Dn=null;function tg(e,t){var r=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:sn(t,e),un(e),o&4&&(Ba(3,e,e.return),zi(3,e),Ba(5,e,e.return));break;case 1:sn(t,e),un(e),o&512&&(Nt||r===null||Kn(r,r.return)),o&64&&ya&&(e=e.updateQueue,e!==null&&(o=e.callbacks,o!==null&&(r=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=r===null?o:r.concat(o))));break;case 26:var c=Dn;if(sn(t,e),un(e),o&512&&(Nt||r===null||Kn(r,r.return)),o&4){var h=r!==null?r.memoizedState:null;if(o=e.memoizedState,r===null)if(o===null)if(e.stateNode===null){e:{o=e.type,r=e.memoizedProps,c=c.ownerDocument||c;t:switch(o){case"title":h=c.getElementsByTagName("title")[0],(!h||h[_e]||h[ce]||h.namespaceURI==="http://www.w3.org/2000/svg"||h.hasAttribute("itemprop"))&&(h=c.createElement(o),c.head.insertBefore(h,c.querySelector("head > title"))),$t(h,o,r),h[ce]=e,He(h),o=h;break e;case"link":var x=Qg("link","href",c).get(o+(r.href||""));if(x){for(var E=0;E<x.length;E++)if(h=x[E],h.getAttribute("href")===(r.href==null||r.href===""?null:r.href)&&h.getAttribute("rel")===(r.rel==null?null:r.rel)&&h.getAttribute("title")===(r.title==null?null:r.title)&&h.getAttribute("crossorigin")===(r.crossOrigin==null?null:r.crossOrigin)){x.splice(E,1);break t}}h=c.createElement(o),$t(h,o,r),c.head.appendChild(h);break;case"meta":if(x=Qg("meta","content",c).get(o+(r.content||""))){for(E=0;E<x.length;E++)if(h=x[E],h.getAttribute("content")===(r.content==null?null:""+r.content)&&h.getAttribute("name")===(r.name==null?null:r.name)&&h.getAttribute("property")===(r.property==null?null:r.property)&&h.getAttribute("http-equiv")===(r.httpEquiv==null?null:r.httpEquiv)&&h.getAttribute("charset")===(r.charSet==null?null:r.charSet)){x.splice(E,1);break t}}h=c.createElement(o),$t(h,o,r),c.head.appendChild(h);break;default:throw Error(i(468,o))}h[ce]=e,He(h),o=h}e.stateNode=o}else Zg(c,e.type,e.stateNode);else e.stateNode=Xg(c,o,e.memoizedProps);else h!==o?(h===null?r.stateNode!==null&&(r=r.stateNode,r.parentNode.removeChild(r)):h.count--,o===null?Zg(c,e.type,e.stateNode):Xg(c,o,e.memoizedProps)):o===null&&e.stateNode!==null&&sf(e,e.memoizedProps,r.memoizedProps)}break;case 27:sn(t,e),un(e),o&512&&(Nt||r===null||Kn(r,r.return)),r!==null&&o&4&&sf(e,e.memoizedProps,r.memoizedProps);break;case 5:if(sn(t,e),un(e),o&512&&(Nt||r===null||Kn(r,r.return)),e.flags&32){c=e.stateNode;try{al(c,"")}catch(X){ct(e,e.return,X)}}o&4&&e.stateNode!=null&&(c=e.memoizedProps,sf(e,c,r!==null?r.memoizedProps:c)),o&1024&&(ff=!0);break;case 6:if(sn(t,e),un(e),o&4){if(e.stateNode===null)throw Error(i(162));o=e.memoizedProps,r=e.stateNode;try{r.nodeValue=o}catch(X){ct(e,e.return,X)}}break;case 3:if(Ls=null,c=Dn,Dn=Ms(t.containerInfo),sn(t,e),Dn=c,un(e),o&4&&r!==null&&r.memoizedState.isDehydrated)try{eo(t.containerInfo)}catch(X){ct(e,e.return,X)}ff&&(ff=!1,ng(e));break;case 4:o=Dn,Dn=Ms(e.stateNode.containerInfo),sn(t,e),un(e),Dn=o;break;case 12:sn(t,e),un(e);break;case 13:sn(t,e),un(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(yf=he()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,df(e,o)));break;case 22:c=e.memoizedState!==null;var T=r!==null&&r.memoizedState!==null,q=ya,ee=Nt;if(ya=q||c,Nt=ee||T,sn(t,e),Nt=ee,ya=q,un(e),o&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(r===null||T||ya||Nt||zr(e)),r=null,t=e;;){if(t.tag===5||t.tag===26){if(r===null){T=r=t;try{if(h=T.stateNode,c)x=h.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{E=T.stateNode;var se=T.memoizedProps.style,G=se!=null&&se.hasOwnProperty("display")?se.display:null;E.style.display=G==null||typeof G=="boolean"?"":(""+G).trim()}}catch(X){ct(T,T.return,X)}}}else if(t.tag===6){if(r===null){T=t;try{T.stateNode.nodeValue=c?"":T.memoizedProps}catch(X){ct(T,T.return,X)}}}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;r===t&&(r=null),t=t.return}r===t&&(r=null),t.sibling.return=t.return,t=t.sibling}o&4&&(o=e.updateQueue,o!==null&&(r=o.retryQueue,r!==null&&(o.retryQueue=null,df(e,r))));break;case 19:sn(t,e),un(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,df(e,o)));break;case 30:break;case 21:break;default:sn(t,e),un(e)}}function un(e){var t=e.flags;if(t&2){try{for(var r,o=e.return;o!==null;){if(Xp(o)){r=o;break}o=o.return}if(r==null)throw Error(i(160));switch(r.tag){case 27:var c=r.stateNode,h=uf(e);bs(e,h,c);break;case 5:var x=r.stateNode;r.flags&32&&(al(x,""),r.flags&=-33);var E=uf(e);bs(e,E,x);break;case 3:case 4:var T=r.stateNode.containerInfo,q=uf(e);cf(e,q,T);break;default:throw Error(i(161))}}catch(ee){ct(e,e.return,ee)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ng(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;ng(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function $a(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Ip(e,t.alternate,t),t=t.sibling}function zr(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ba(4,t,t.return),zr(t);break;case 1:Kn(t,t.return);var r=t.stateNode;typeof r.componentWillUnmount=="function"&&Kp(t,t.return,r),zr(t);break;case 27:Ki(t.stateNode);case 26:case 5:Kn(t,t.return),zr(t);break;case 22:t.memoizedState===null&&zr(t);break;case 30:zr(t);break;default:zr(t)}e=e.sibling}}function Va(e,t,r){for(r=r&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var o=t.alternate,c=e,h=t,x=h.flags;switch(h.tag){case 0:case 11:case 15:Va(c,h,r),zi(4,h);break;case 1:if(Va(c,h,r),o=h,c=o.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(q){ct(o,o.return,q)}if(o=h,c=o.updateQueue,c!==null){var E=o.stateNode;try{var T=c.shared.hiddenCallbacks;if(T!==null)for(c.shared.hiddenCallbacks=null,c=0;c<T.length;c++)Tm(T[c],E)}catch(q){ct(o,o.return,q)}}r&&x&64&&Fp(h),Ui(h,h.return);break;case 27:Qp(h);case 26:case 5:Va(c,h,r),r&&o===null&&x&4&&Gp(h),Ui(h,h.return);break;case 12:Va(c,h,r);break;case 13:Va(c,h,r),r&&x&4&&eg(c,h);break;case 22:h.memoizedState===null&&Va(c,h,r),Ui(h,h.return);break;case 30:break;default:Va(c,h,r)}t=t.sibling}}function hf(e,t){var r=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==r&&(e!=null&&e.refCount++,r!=null&&Si(r))}function mf(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Si(e))}function Gn(e,t,r,o){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)ag(e,t,r,o),t=t.sibling}function ag(e,t,r,o){var c=t.flags;switch(t.tag){case 0:case 11:case 15:Gn(e,t,r,o),c&2048&&zi(9,t);break;case 1:Gn(e,t,r,o);break;case 3:Gn(e,t,r,o),c&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Si(e)));break;case 12:if(c&2048){Gn(e,t,r,o),e=t.stateNode;try{var h=t.memoizedProps,x=h.id,E=h.onPostCommit;typeof E=="function"&&E(x,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(T){ct(t,t.return,T)}}else Gn(e,t,r,o);break;case 13:Gn(e,t,r,o);break;case 23:break;case 22:h=t.stateNode,x=t.alternate,t.memoizedState!==null?h._visibility&2?Gn(e,t,r,o):Pi(e,t):h._visibility&2?Gn(e,t,r,o):(h._visibility|=2,Sl(e,t,r,o,(t.subtreeFlags&10256)!==0)),c&2048&&hf(x,t);break;case 24:Gn(e,t,r,o),c&2048&&mf(t.alternate,t);break;default:Gn(e,t,r,o)}}function Sl(e,t,r,o,c){for(c=c&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;){var h=e,x=t,E=r,T=o,q=x.flags;switch(x.tag){case 0:case 11:case 15:Sl(h,x,E,T,c),zi(8,x);break;case 23:break;case 22:var ee=x.stateNode;x.memoizedState!==null?ee._visibility&2?Sl(h,x,E,T,c):Pi(h,x):(ee._visibility|=2,Sl(h,x,E,T,c)),c&&q&2048&&hf(x.alternate,x);break;case 24:Sl(h,x,E,T,c),c&&q&2048&&mf(x.alternate,x);break;default:Sl(h,x,E,T,c)}t=t.sibling}}function Pi(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var r=e,o=t,c=o.flags;switch(o.tag){case 22:Pi(r,o),c&2048&&hf(o.alternate,o);break;case 24:Pi(r,o),c&2048&&mf(o.alternate,o);break;default:Pi(r,o)}t=t.sibling}}var Hi=8192;function El(e){if(e.subtreeFlags&Hi)for(e=e.child;e!==null;)rg(e),e=e.sibling}function rg(e){switch(e.tag){case 26:El(e),e.flags&Hi&&e.memoizedState!==null&&Pw(Dn,e.memoizedState,e.memoizedProps);break;case 5:El(e);break;case 3:case 4:var t=Dn;Dn=Ms(e.stateNode.containerInfo),El(e),Dn=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=Hi,Hi=16777216,El(e),Hi=t):El(e));break;default:El(e)}}function lg(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 Bi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var r=0;r<t.length;r++){var o=t[r];kt=o,og(o,e)}lg(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)ig(e),e=e.sibling}function ig(e){switch(e.tag){case 0:case 11:case 15:Bi(e),e.flags&2048&&Ba(9,e,e.return);break;case 3:Bi(e);break;case 12:Bi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,xs(e)):Bi(e);break;default:Bi(e)}}function xs(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var r=0;r<t.length;r++){var o=t[r];kt=o,og(o,e)}lg(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ba(8,t,t.return),xs(t);break;case 22:r=t.stateNode,r._visibility&2&&(r._visibility&=-3,xs(t));break;default:xs(t)}e=e.sibling}}function og(e,t){for(;kt!==null;){var r=kt;switch(r.tag){case 0:case 11:case 15:Ba(8,r,t);break;case 23:case 22:if(r.memoizedState!==null&&r.memoizedState.cachePool!==null){var o=r.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:Si(r.memoizedState.cache)}if(o=r.child,o!==null)o.return=r,kt=o;else e:for(r=e;kt!==null;){o=kt;var c=o.sibling,h=o.return;if(Jp(o),o===r){kt=null;break e}if(c!==null){c.return=h,kt=c;break e}kt=h}}}var ew={getCacheForType:function(e){var t=qt(Tt),r=t.data.get(e);return r===void 0&&(r=e(),t.data.set(e,r)),r}},tw=typeof WeakMap=="function"?WeakMap:Map,rt=0,dt=null,Xe=null,We=0,lt=0,cn=null,Ya=!1,_l=!1,pf=!1,xa=0,Et=0,qa=0,Ur=0,gf=0,Rn=0,Cl=0,$i=null,en=null,vf=!1,yf=0,ws=1/0,Ss=null,Fa=null,Bt=0,Ka=null,Nl=null,Rl=0,bf=0,xf=null,sg=null,Vi=0,wf=null;function fn(){if((rt&2)!==0&&We!==0)return We&-We;if(A.T!==null){var e=ml;return e!==0?e:jf()}return M()}function ug(){Rn===0&&(Rn=(We&536870912)===0||tt?Wr():536870912);var e=Nn.current;return e!==null&&(e.flags|=32),Rn}function dn(e,t,r){(e===dt&&(lt===2||lt===9)||e.cancelPendingCommit!==null)&&(jl(e,0),Ga(e,We,Rn,!1)),br(e,r),((rt&2)===0||e!==dt)&&(e===dt&&((rt&2)===0&&(Ur|=r),Et===4&&Ga(e,We,Rn,!1)),Xn(e))}function cg(e,t,r){if((rt&6)!==0)throw Error(i(327));var o=!r&&(t&124)===0&&(t&e.expiredLanes)===0||Vn(e,t),c=o?rw(e,t):_f(e,t,!0),h=o;do{if(c===0){_l&&!o&&Ga(e,t,0,!1);break}else{if(r=e.current.alternate,h&&!nw(r)){c=_f(e,t,!1),h=!1;continue}if(c===2){if(h=t,e.errorRecoveryDisabledLanes&h)var x=0;else x=e.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){t=x;e:{var E=e;c=$i;var T=E.current.memoizedState.isDehydrated;if(T&&(jl(E,x).flags|=256),x=_f(E,x,!1),x!==2){if(pf&&!T){E.errorRecoveryDisabledLanes|=h,Ur|=h,c=4;break e}h=en,en=c,h!==null&&(en===null?en=h:en.push.apply(en,h))}c=x}if(h=!1,c!==2)continue}}if(c===1){jl(e,0),Ga(e,t,0,!0);break}e:{switch(o=e,h=c,h){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:Ga(o,t,Rn,!Ya);break e;case 2:en=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(c=yf+300-he(),10<c)){if(Ga(o,t,Rn,!Ya),yr(o,0,!0)!==0)break e;o.timeoutHandle=Hg(fg.bind(null,o,r,en,Ss,vf,t,Rn,Ur,Cl,Ya,h,2,-0,0),c);break e}fg(o,r,en,Ss,vf,t,Rn,Ur,Cl,Ya,h,0,-0,0)}}break}while(!0);Xn(e)}function fg(e,t,r,o,c,h,x,E,T,q,ee,se,G,X){if(e.timeoutHandle=-1,se=t.subtreeFlags,(se&8192||(se&16785408)===16785408)&&(Qi={stylesheets:null,count:0,unsuspend:Uw},rg(t),se=Hw(),se!==null)){e.cancelPendingCommit=se(yg.bind(null,e,t,h,r,o,c,x,E,T,ee,1,G,X)),Ga(e,h,x,!q);return}yg(e,t,h,r,o,c,x,E,T)}function nw(e){for(var t=e;;){var r=t.tag;if((r===0||r===11||r===15)&&t.flags&16384&&(r=t.updateQueue,r!==null&&(r=r.stores,r!==null)))for(var o=0;o<r.length;o++){var c=r[o],h=c.getSnapshot;c=c.value;try{if(!ln(h(),c))return!1}catch{return!1}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;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 Ga(e,t,r,o){t&=~gf,t&=~Ur,e.suspendedLanes|=t,e.pingedLanes&=~t,o&&(e.warmLanes|=t),o=e.expirationTimes;for(var c=t;0<c;){var h=31-Pt(c),x=1<<h;o[h]=-1,c&=~x}r!==0&&xr(e,r,t)}function Es(){return(rt&6)===0?(Yi(0),!1):!0}function Sf(){if(Xe!==null){if(lt===0)var e=Xe.return;else e=Xe,da=Tr=null,Pc(e),xl=null,Di=0,e=Xe;for(;e!==null;)qp(e.alternate,e),e=e.return;Xe=null}}function jl(e,t){var r=e.timeoutHandle;r!==-1&&(e.timeoutHandle=-1,xw(r)),r=e.cancelPendingCommit,r!==null&&(e.cancelPendingCommit=null,r()),Sf(),dt=e,Xe=r=ua(e.current,null),We=t,lt=0,cn=null,Ya=!1,_l=Vn(e,t),pf=!1,Cl=Rn=gf=Ur=qa=Et=0,en=$i=null,vf=!1,(t&8)!==0&&(t|=t&32);var o=e.entangledLanes;if(o!==0)for(e=e.entanglements,o&=t;0<o;){var c=31-Pt(o),h=1<<c;t|=e[c],o&=~h}return xa=t,Fo(),r}function dg(e,t){Ve=null,A.H=cs,t===_i||t===es?(t=Om(),lt=3):t===Nm?(t=Om(),lt=4):lt=t===Ap?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,cn=t,Xe===null&&(Et=1,ps(e,Sn(t,e.current)))}function hg(){var e=A.H;return A.H=cs,e===null?cs:e}function mg(){var e=A.A;return A.A=ew,e}function Ef(){Et=4,Ya||(We&4194048)!==We&&Nn.current!==null||(_l=!0),(qa&134217727)===0&&(Ur&134217727)===0||dt===null||Ga(dt,We,Rn,!1)}function _f(e,t,r){var o=rt;rt|=2;var c=hg(),h=mg();(dt!==e||We!==t)&&(Ss=null,jl(e,t)),t=!1;var x=Et;e:do try{if(lt!==0&&Xe!==null){var E=Xe,T=cn;switch(lt){case 8:Sf(),x=6;break e;case 3:case 2:case 9:case 6:Nn.current===null&&(t=!0);var q=lt;if(lt=0,cn=null,Ol(e,E,T,q),r&&_l){x=0;break e}break;default:q=lt,lt=0,cn=null,Ol(e,E,T,q)}}aw(),x=Et;break}catch(ee){dg(e,ee)}while(!0);return t&&e.shellSuspendCounter++,da=Tr=null,rt=o,A.H=c,A.A=h,Xe===null&&(dt=null,We=0,Fo()),x}function aw(){for(;Xe!==null;)pg(Xe)}function rw(e,t){var r=rt;rt|=2;var o=hg(),c=mg();dt!==e||We!==t?(Ss=null,ws=he()+500,jl(e,t)):_l=Vn(e,t);e:do try{if(lt!==0&&Xe!==null){t=Xe;var h=cn;t:switch(lt){case 1:lt=0,cn=null,Ol(e,t,h,1);break;case 2:case 9:if(Rm(h)){lt=0,cn=null,gg(t);break}t=function(){lt!==2&<!==9||dt!==e||(lt=7),Xn(e)},h.then(t,t);break e;case 3:lt=7;break e;case 4:lt=5;break e;case 7:Rm(h)?(lt=0,cn=null,gg(t)):(lt=0,cn=null,Ol(e,t,h,7));break;case 5:var x=null;switch(Xe.tag){case 26:x=Xe.memoizedState;case 5:case 27:var E=Xe;if(!x||Ig(x)){lt=0,cn=null;var T=E.sibling;if(T!==null)Xe=T;else{var q=E.return;q!==null?(Xe=q,_s(q)):Xe=null}break t}}lt=0,cn=null,Ol(e,t,h,5);break;case 6:lt=0,cn=null,Ol(e,t,h,6);break;case 8:Sf(),Et=6;break e;default:throw Error(i(462))}}lw();break}catch(ee){dg(e,ee)}while(!0);return da=Tr=null,A.H=o,A.A=c,rt=r,Xe!==null?0:(dt=null,We=0,Fo(),Et)}function lw(){for(;Xe!==null&&!fe();)pg(Xe)}function pg(e){var t=Vp(e.alternate,e,xa);e.memoizedProps=e.pendingProps,t===null?_s(e):Xe=t}function gg(e){var t=e,r=t.alternate;switch(t.tag){case 15:case 0:t=zp(r,t,t.pendingProps,t.type,void 0,We);break;case 11:t=zp(r,t,t.pendingProps,t.type.render,t.ref,We);break;case 5:Pc(t);default:qp(r,t),t=Xe=vm(t,xa),t=Vp(r,t,xa)}e.memoizedProps=e.pendingProps,t===null?_s(e):Xe=t}function Ol(e,t,r,o){da=Tr=null,Pc(t),xl=null,Di=0;var c=t.return;try{if(X1(e,c,t,r,We)){Et=1,ps(e,Sn(r,e.current)),Xe=null;return}}catch(h){if(c!==null)throw Xe=c,h;Et=1,ps(e,Sn(r,e.current)),Xe=null;return}t.flags&32768?(tt||o===1?e=!0:_l||(We&536870912)!==0?e=!1:(Ya=e=!0,(o===2||o===9||o===3||o===6)&&(o=Nn.current,o!==null&&o.tag===13&&(o.flags|=16384))),vg(t,e)):_s(t)}function _s(e){var t=e;do{if((t.flags&32768)!==0){vg(t,Ya);return}e=t.return;var r=Z1(t.alternate,t,xa);if(r!==null){Xe=r;return}if(t=t.sibling,t!==null){Xe=t;return}Xe=t=e}while(t!==null);Et===0&&(Et=5)}function vg(e,t){do{var r=I1(e.alternate,e);if(r!==null){r.flags&=32767,Xe=r;return}if(r=e.return,r!==null&&(r.flags|=32768,r.subtreeFlags=0,r.deletions=null),!t&&(e=e.sibling,e!==null)){Xe=e;return}Xe=e=r}while(e!==null);Et=6,Xe=null}function yg(e,t,r,o,c,h,x,E,T){e.cancelPendingCommit=null;do Cs();while(Bt!==0);if((rt&6)!==0)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(h=t.lanes|t.childLanes,h|=hc,Do(e,r,h,x,E,T),e===dt&&(Xe=dt=null,We=0),Nl=t,Ka=e,Rl=r,bf=h,xf=c,sg=o,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,uw(nt,function(){return Eg(),null})):(e.callbackNode=null,e.callbackPriority=0),o=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||o){o=A.T,A.T=null,c=Q.p,Q.p=2,x=rt,rt|=4;try{J1(e,t,r)}finally{rt=x,Q.p=c,A.T=o}}Bt=1,bg(),xg(),wg()}}function bg(){if(Bt===1){Bt=0;var e=Ka,t=Nl,r=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||r){r=A.T,A.T=null;var o=Q.p;Q.p=2;var c=rt;rt|=4;try{tg(t,e);var h=zf,x=om(e.containerInfo),E=h.focusedElem,T=h.selectionRange;if(x!==E&&E&&E.ownerDocument&&im(E.ownerDocument.documentElement,E)){if(T!==null&&sc(E)){var q=T.start,ee=T.end;if(ee===void 0&&(ee=q),"selectionStart"in E)E.selectionStart=q,E.selectionEnd=Math.min(ee,E.value.length);else{var se=E.ownerDocument||document,G=se&&se.defaultView||window;if(G.getSelection){var X=G.getSelection(),ze=E.textContent.length,Me=Math.min(T.start,ze),ut=T.end===void 0?Me:Math.min(T.end,ze);!X.extend&&Me>ut&&(x=ut,ut=Me,Me=x);var P=lm(E,Me),L=lm(E,ut);if(P&&L&&(X.rangeCount!==1||X.anchorNode!==P.node||X.anchorOffset!==P.offset||X.focusNode!==L.node||X.focusOffset!==L.offset)){var Y=se.createRange();Y.setStart(P.node,P.offset),X.removeAllRanges(),Me>ut?(X.addRange(Y),X.extend(L.node,L.offset)):(Y.setEnd(L.node,L.offset),X.addRange(Y))}}}}for(se=[],X=E;X=X.parentNode;)X.nodeType===1&&se.push({element:X,left:X.scrollLeft,top:X.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<se.length;E++){var re=se[E];re.element.scrollLeft=re.left,re.element.scrollTop=re.top}}Us=!!kf,zf=kf=null}finally{rt=c,Q.p=o,A.T=r}}e.current=t,Bt=2}}function xg(){if(Bt===2){Bt=0;var e=Ka,t=Nl,r=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||r){r=A.T,A.T=null;var o=Q.p;Q.p=2;var c=rt;rt|=4;try{Ip(e,t.alternate,t)}finally{rt=c,Q.p=o,A.T=r}}Bt=3}}function wg(){if(Bt===4||Bt===3){Bt=0,pe();var e=Ka,t=Nl,r=Rl,o=sg;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Bt=5:(Bt=0,Nl=Ka=null,Sg(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(Fa=null),si(r),t=t.stateNode,vt&&typeof vt.onCommitFiberRoot=="function")try{vt.onCommitFiberRoot(Zt,t,void 0,(t.current.flags&128)===128)}catch{}if(o!==null){t=A.T,c=Q.p,Q.p=2,A.T=null;try{for(var h=e.onRecoverableError,x=0;x<o.length;x++){var E=o[x];h(E.value,{componentStack:E.stack})}}finally{A.T=t,Q.p=c}}(Rl&3)!==0&&Cs(),Xn(e),c=e.pendingLanes,(r&4194090)!==0&&(c&42)!==0?e===wf?Vi++:(Vi=0,wf=e):Vi=0,Yi(0)}}function Sg(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Si(t)))}function Cs(e){return bg(),xg(),wg(),Eg()}function Eg(){if(Bt!==5)return!1;var e=Ka,t=bf;bf=0;var r=si(Rl),o=A.T,c=Q.p;try{Q.p=32>r?32:r,A.T=null,r=xf,xf=null;var h=Ka,x=Rl;if(Bt=0,Nl=Ka=null,Rl=0,(rt&6)!==0)throw Error(i(331));var E=rt;if(rt|=4,ig(h.current),ag(h,h.current,x,r),rt=E,Yi(0,!1),vt&&typeof vt.onPostCommitFiberRoot=="function")try{vt.onPostCommitFiberRoot(Zt,h)}catch{}return!0}finally{Q.p=c,A.T=o,Sg(e,t)}}function _g(e,t,r){t=Sn(r,t),t=Jc(e.stateNode,t,2),e=za(e,t,2),e!==null&&(br(e,2),Xn(e))}function ct(e,t,r){if(e.tag===3)_g(e,e,r);else for(;t!==null;){if(t.tag===3){_g(t,e,r);break}else if(t.tag===1){var o=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Fa===null||!Fa.has(o))){e=Sn(r,e),r=jp(2),o=za(t,r,2),o!==null&&(Op(r,o,t,e),br(o,2),Xn(o));break}}t=t.return}}function Cf(e,t,r){var o=e.pingCache;if(o===null){o=e.pingCache=new tw;var c=new Set;o.set(t,c)}else c=o.get(t),c===void 0&&(c=new Set,o.set(t,c));c.has(r)||(pf=!0,c.add(r),e=iw.bind(null,e,t,r),t.then(e,e))}function iw(e,t,r){var o=e.pingCache;o!==null&&o.delete(t),e.pingedLanes|=e.suspendedLanes&r,e.warmLanes&=~r,dt===e&&(We&r)===r&&(Et===4||Et===3&&(We&62914560)===We&&300>he()-yf?(rt&2)===0&&jl(e,0):gf|=r,Cl===We&&(Cl=0)),Xn(e)}function Cg(e,t){t===0&&(t=Mo()),e=cl(e,t),e!==null&&(br(e,t),Xn(e))}function ow(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Cg(e,r)}function sw(e,t){var r=0;switch(e.tag){case 13:var o=e.stateNode,c=e.memoizedState;c!==null&&(r=c.retryLane);break;case 19:o=e.stateNode;break;case 22:o=e.stateNode._retryCache;break;default:throw Error(i(314))}o!==null&&o.delete(t),Cg(e,r)}function uw(e,t){return an(e,t)}var Ns=null,Al=null,Nf=!1,Rs=!1,Rf=!1,Pr=0;function Xn(e){e!==Al&&e.next===null&&(Al===null?Ns=Al=e:Al=Al.next=e),Rs=!0,Nf||(Nf=!0,fw())}function Yi(e,t){if(!Rf&&Rs){Rf=!0;do for(var r=!1,o=Ns;o!==null;){if(e!==0){var c=o.pendingLanes;if(c===0)var h=0;else{var x=o.suspendedLanes,E=o.pingedLanes;h=(1<<31-Pt(42|e)+1)-1,h&=c&~(x&~E),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(r=!0,Og(o,h))}else h=We,h=yr(o,o===dt?h:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(h&3)===0||Vn(o,h)||(r=!0,Og(o,h));o=o.next}while(r);Rf=!1}}function cw(){Ng()}function Ng(){Rs=Nf=!1;var e=0;Pr!==0&&(bw()&&(e=Pr),Pr=0);for(var t=he(),r=null,o=Ns;o!==null;){var c=o.next,h=Rg(o,t);h===0?(o.next=null,r===null?Ns=c:r.next=c,c===null&&(Al=r)):(r=o,(e!==0||(h&3)!==0)&&(Rs=!0)),o=c}Yi(e)}function Rg(e,t){for(var r=e.suspendedLanes,o=e.pingedLanes,c=e.expirationTimes,h=e.pendingLanes&-62914561;0<h;){var x=31-Pt(h),E=1<<x,T=c[x];T===-1?((E&r)===0||(E&o)!==0)&&(c[x]=To(E,t)):T<=t&&(e.expiredLanes|=E),h&=~E}if(t=dt,r=We,r=yr(e,e===t?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,r===0||e===t&&(lt===2||lt===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&ie(o),e.callbackNode=null,e.callbackPriority=0;if((r&3)===0||Vn(e,r)){if(t=r&-r,t===e.callbackPriority)return t;switch(o!==null&&ie(o),si(r)){case 2:case 8:r=Pe;break;case 32:r=nt;break;case 268435456:r=Bn;break;default:r=nt}return o=jg.bind(null,e),r=an(r,o),e.callbackPriority=t,e.callbackNode=r,t}return o!==null&&o!==null&&ie(o),e.callbackPriority=2,e.callbackNode=null,2}function jg(e,t){if(Bt!==0&&Bt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var r=e.callbackNode;if(Cs()&&e.callbackNode!==r)return null;var o=We;return o=yr(e,e===dt?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(cg(e,o,t),Rg(e,he()),e.callbackNode!=null&&e.callbackNode===r?jg.bind(null,e):null)}function Og(e,t){if(Cs())return null;cg(e,t,!0)}function fw(){ww(function(){(rt&6)!==0?an(ke,cw):Ng()})}function jf(){return Pr===0&&(Pr=Wr()),Pr}function Ag(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Po(""+e)}function Tg(e,t){var r=t.ownerDocument.createElement("input");return r.name=t.name,r.value=t.value,e.id&&r.setAttribute("form",e.id),t.parentNode.insertBefore(r,t),e=new FormData(e),r.parentNode.removeChild(r),e}function dw(e,t,r,o,c){if(t==="submit"&&r&&r.stateNode===c){var h=Ag((c[me]||null).action),x=o.submitter;x&&(t=(t=x[me]||null)?Ag(t.formAction):x.getAttribute("formAction"),t!==null&&(h=t,x=null));var E=new Vo("action","action",null,o,c);e.push({event:E,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(Pr!==0){var T=x?Tg(c,x):new FormData(c);Gc(r,{pending:!0,data:T,method:c.method,action:h},null,T)}}else typeof h=="function"&&(E.preventDefault(),T=x?Tg(c,x):new FormData(c),Gc(r,{pending:!0,data:T,method:c.method,action:h},h,T))},currentTarget:c}]})}}for(var Of=0;Of<dc.length;Of++){var Af=dc[Of],hw=Af.toLowerCase(),mw=Af[0].toUpperCase()+Af.slice(1);Mn(hw,"on"+mw)}Mn(cm,"onAnimationEnd"),Mn(fm,"onAnimationIteration"),Mn(dm,"onAnimationStart"),Mn("dblclick","onDoubleClick"),Mn("focusin","onFocus"),Mn("focusout","onBlur"),Mn(T1,"onTransitionRun"),Mn(M1,"onTransitionStart"),Mn(D1,"onTransitionCancel"),Mn(hm,"onTransitionEnd"),Gt("onMouseEnter",["mouseout","mouseover"]),Gt("onMouseLeave",["mouseout","mouseover"]),Gt("onPointerEnter",["pointerout","pointerover"]),Gt("onPointerLeave",["pointerout","pointerover"]),rn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),rn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),rn("onBeforeInput",["compositionend","keypress","textInput","paste"]),rn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),rn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),rn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var qi="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(" "),pw=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(qi));function Mg(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var o=e[r],c=o.event;o=o.listeners;e:{var h=void 0;if(t)for(var x=o.length-1;0<=x;x--){var E=o[x],T=E.instance,q=E.currentTarget;if(E=E.listener,T!==h&&c.isPropagationStopped())break e;h=E,c.currentTarget=q;try{h(c)}catch(ee){ms(ee)}c.currentTarget=null,h=T}else for(x=0;x<o.length;x++){if(E=o[x],T=E.instance,q=E.currentTarget,E=E.listener,T!==h&&c.isPropagationStopped())break e;h=E,c.currentTarget=q;try{h(c)}catch(ee){ms(ee)}c.currentTarget=null,h=T}}}}function Qe(e,t){var r=t[Ce];r===void 0&&(r=t[Ce]=new Set);var o=e+"__bubble";r.has(o)||(Dg(t,e,2,!1),r.add(o))}function Tf(e,t,r){var o=0;t&&(o|=4),Dg(r,e,o,t)}var js="_reactListening"+Math.random().toString(36).slice(2);function Mf(e){if(!e[js]){e[js]=!0,it.forEach(function(r){r!=="selectionchange"&&(pw.has(r)||Tf(r,!1,e),Tf(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[js]||(t[js]=!0,Tf("selectionchange",!1,t))}}function Dg(e,t,r,o){switch(av(t)){case 2:var c=Vw;break;case 8:c=Yw;break;default:c=Kf}r=c.bind(null,t,r,e),c=void 0,!Wu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),o?c!==void 0?e.addEventListener(t,r,{capture:!0,passive:c}):e.addEventListener(t,r,!0):c!==void 0?e.addEventListener(t,r,{passive:c}):e.addEventListener(t,r,!1)}function Df(e,t,r,o,c){var h=o;if((t&1)===0&&(t&2)===0&&o!==null)e:for(;;){if(o===null)return;var x=o.tag;if(x===3||x===4){var E=o.stateNode.containerInfo;if(E===c)break;if(x===4)for(x=o.return;x!==null;){var T=x.tag;if((T===3||T===4)&&x.stateNode.containerInfo===c)return;x=x.return}for(;E!==null;){if(x=$e(E),x===null)return;if(T=x.tag,T===5||T===6||T===26||T===27){o=h=x;continue e}E=E.parentNode}}o=o.return}Bh(function(){var q=h,ee=Iu(r),se=[];e:{var G=mm.get(e);if(G!==void 0){var X=Vo,ze=e;switch(e){case"keypress":if(Bo(r)===0)break e;case"keydown":case"keyup":X=u1;break;case"focusin":ze="focus",X=ac;break;case"focusout":ze="blur",X=ac;break;case"beforeblur":case"afterblur":X=ac;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":X=Yh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":X=Ix;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":X=d1;break;case cm:case fm:case dm:X=e1;break;case hm:X=m1;break;case"scroll":case"scrollend":X=Qx;break;case"wheel":X=g1;break;case"copy":case"cut":case"paste":X=n1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":X=Fh;break;case"toggle":case"beforetoggle":X=y1}var Me=(t&4)!==0,ut=!Me&&(e==="scroll"||e==="scrollend"),P=Me?G!==null?G+"Capture":null:G;Me=[];for(var L=q,Y;L!==null;){var re=L;if(Y=re.stateNode,re=re.tag,re!==5&&re!==26&&re!==27||Y===null||P===null||(re=ui(L,P),re!=null&&Me.push(Fi(L,re,Y))),ut)break;L=L.return}0<Me.length&&(G=new X(G,ze,null,r,ee),se.push({event:G,listeners:Me}))}}if((t&7)===0){e:{if(G=e==="mouseover"||e==="pointerover",X=e==="mouseout"||e==="pointerout",G&&r!==Zu&&(ze=r.relatedTarget||r.fromElement)&&($e(ze)||ze[Se]))break e;if((X||G)&&(G=ee.window===ee?ee:(G=ee.ownerDocument)?G.defaultView||G.parentWindow:window,X?(ze=r.relatedTarget||r.toElement,X=q,ze=ze?$e(ze):null,ze!==null&&(ut=u(ze),Me=ze.tag,ze!==ut||Me!==5&&Me!==27&&Me!==6)&&(ze=null)):(X=null,ze=q),X!==ze)){if(Me=Yh,re="onMouseLeave",P="onMouseEnter",L="mouse",(e==="pointerout"||e==="pointerover")&&(Me=Fh,re="onPointerLeave",P="onPointerEnter",L="pointer"),ut=X==null?G:xt(X),Y=ze==null?G:xt(ze),G=new Me(re,L+"leave",X,r,ee),G.target=ut,G.relatedTarget=Y,re=null,$e(ee)===q&&(Me=new Me(P,L+"enter",ze,r,ee),Me.target=Y,Me.relatedTarget=ut,re=Me),ut=re,X&&ze)t:{for(Me=X,P=ze,L=0,Y=Me;Y;Y=Tl(Y))L++;for(Y=0,re=P;re;re=Tl(re))Y++;for(;0<L-Y;)Me=Tl(Me),L--;for(;0<Y-L;)P=Tl(P),Y--;for(;L--;){if(Me===P||P!==null&&Me===P.alternate)break t;Me=Tl(Me),P=Tl(P)}Me=null}else Me=null;X!==null&&Lg(se,G,X,Me,!1),ze!==null&&ut!==null&&Lg(se,ut,ze,Me,!0)}}e:{if(G=q?xt(q):window,X=G.nodeName&&G.nodeName.toLowerCase(),X==="select"||X==="input"&&G.type==="file")var be=Wh;else if(Ih(G))if(em)be=j1;else{be=N1;var Ke=C1}else X=G.nodeName,!X||X.toLowerCase()!=="input"||G.type!=="checkbox"&&G.type!=="radio"?q&&Qu(q.elementType)&&(be=Wh):be=R1;if(be&&(be=be(e,q))){Jh(se,be,r,ee);break e}Ke&&Ke(e,G,q),e==="focusout"&&q&&G.type==="number"&&q.memoizedProps.value!=null&&Xu(G,"number",G.value)}switch(Ke=q?xt(q):window,e){case"focusin":(Ih(Ke)||Ke.contentEditable==="true")&&(ol=Ke,uc=q,vi=null);break;case"focusout":vi=uc=ol=null;break;case"mousedown":cc=!0;break;case"contextmenu":case"mouseup":case"dragend":cc=!1,sm(se,r,ee);break;case"selectionchange":if(A1)break;case"keydown":case"keyup":sm(se,r,ee)}var Re;if(lc)e:{switch(e){case"compositionstart":var De="onCompositionStart";break e;case"compositionend":De="onCompositionEnd";break e;case"compositionupdate":De="onCompositionUpdate";break e}De=void 0}else il?Qh(e,r)&&(De="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(De="onCompositionStart");De&&(Kh&&r.locale!=="ko"&&(il||De!=="onCompositionStart"?De==="onCompositionEnd"&&il&&(Re=$h()):(Ma=ee,ec="value"in Ma?Ma.value:Ma.textContent,il=!0)),Ke=Os(q,De),0<Ke.length&&(De=new qh(De,e,null,r,ee),se.push({event:De,listeners:Ke}),Re?De.data=Re:(Re=Zh(r),Re!==null&&(De.data=Re)))),(Re=x1?w1(e,r):S1(e,r))&&(De=Os(q,"onBeforeInput"),0<De.length&&(Ke=new qh("onBeforeInput","beforeinput",null,r,ee),se.push({event:Ke,listeners:De}),Ke.data=Re)),dw(se,e,q,r,ee)}Mg(se,t)})}function Fi(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Os(e,t){for(var r=t+"Capture",o=[];e!==null;){var c=e,h=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||h===null||(c=ui(e,r),c!=null&&o.unshift(Fi(e,c,h)),c=ui(e,t),c!=null&&o.push(Fi(e,c,h))),e.tag===3)return o;e=e.return}return[]}function Tl(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Lg(e,t,r,o,c){for(var h=t._reactName,x=[];r!==null&&r!==o;){var E=r,T=E.alternate,q=E.stateNode;if(E=E.tag,T!==null&&T===o)break;E!==5&&E!==26&&E!==27||q===null||(T=q,c?(q=ui(r,h),q!=null&&x.unshift(Fi(r,q,T))):c||(q=ui(r,h),q!=null&&x.push(Fi(r,q,T)))),r=r.return}x.length!==0&&e.push({event:t,listeners:x})}var gw=/\r\n?/g,vw=/\u0000|\uFFFD/g;function kg(e){return(typeof e=="string"?e:""+e).replace(gw,`
|
|
55
|
+
`).replace(vw,"")}function zg(e,t){return t=kg(t),kg(e)===t}function As(){}function st(e,t,r,o,c,h){switch(r){case"children":typeof o=="string"?t==="body"||t==="textarea"&&o===""||al(e,o):(typeof o=="number"||typeof o=="bigint")&&t!=="body"&&al(e,""+o);break;case"className":oa(e,"class",o);break;case"tabIndex":oa(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":oa(e,r,o);break;case"style":Ph(e,o,h);break;case"data":if(t!=="object"){oa(e,"data",o);break}case"src":case"href":if(o===""&&(t!=="a"||r!=="href")){e.removeAttribute(r);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(r);break}o=Po(""+o),e.setAttribute(r,o);break;case"action":case"formAction":if(typeof o=="function"){e.setAttribute(r,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof h=="function"&&(r==="formAction"?(t!=="input"&&st(e,t,"name",c.name,c,null),st(e,t,"formEncType",c.formEncType,c,null),st(e,t,"formMethod",c.formMethod,c,null),st(e,t,"formTarget",c.formTarget,c,null)):(st(e,t,"encType",c.encType,c,null),st(e,t,"method",c.method,c,null),st(e,t,"target",c.target,c,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(r);break}o=Po(""+o),e.setAttribute(r,o);break;case"onClick":o!=null&&(e.onclick=As);break;case"onScroll":o!=null&&Qe("scroll",e);break;case"onScrollEnd":o!=null&&Qe("scrollend",e);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(i(61));if(r=o.__html,r!=null){if(c.children!=null)throw Error(i(60));e.innerHTML=r}}break;case"multiple":e.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":e.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){e.removeAttribute("xlink:href");break}r=Po(""+o),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(r,""+o):e.removeAttribute(r);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":o&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(r,""):e.removeAttribute(r);break;case"capture":case"download":o===!0?e.setAttribute(r,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(r,o):e.removeAttribute(r);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?e.setAttribute(r,o):e.removeAttribute(r);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?e.removeAttribute(r):e.setAttribute(r,o);break;case"popover":Qe("beforetoggle",e),Qe("toggle",e),ia(e,"popover",o);break;case"xlinkActuate":Fe(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":Fe(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":Fe(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":Fe(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":Fe(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":Fe(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":Fe(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":Fe(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":Fe(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":ia(e,"is",o);break;case"innerText":case"textContent":break;default:(!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(r=Gx.get(r)||r,ia(e,r,o))}}function Lf(e,t,r,o,c,h){switch(r){case"style":Ph(e,o,h);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(i(61));if(r=o.__html,r!=null){if(c.children!=null)throw Error(i(60));e.innerHTML=r}}break;case"children":typeof o=="string"?al(e,o):(typeof o=="number"||typeof o=="bigint")&&al(e,""+o);break;case"onScroll":o!=null&&Qe("scroll",e);break;case"onScrollEnd":o!=null&&Qe("scrollend",e);break;case"onClick":o!=null&&(e.onclick=As);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Yn.hasOwnProperty(r))e:{if(r[0]==="o"&&r[1]==="n"&&(c=r.endsWith("Capture"),t=r.slice(2,c?r.length-7:void 0),h=e[me]||null,h=h!=null?h[r]:null,typeof h=="function"&&e.removeEventListener(t,h,c),typeof o=="function")){typeof h!="function"&&h!==null&&(r in e?e[r]=null:e.hasAttribute(r)&&e.removeAttribute(r)),e.addEventListener(t,o,c);break e}r in e?e[r]=o:o===!0?e.setAttribute(r,""):ia(e,r,o)}}}function $t(e,t,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Qe("error",e),Qe("load",e);var o=!1,c=!1,h;for(h in r)if(r.hasOwnProperty(h)){var x=r[h];if(x!=null)switch(h){case"src":o=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:st(e,t,h,x,r,null)}}c&&st(e,t,"srcSet",r.srcSet,r,null),o&&st(e,t,"src",r.src,r,null);return;case"input":Qe("invalid",e);var E=h=x=c=null,T=null,q=null;for(o in r)if(r.hasOwnProperty(o)){var ee=r[o];if(ee!=null)switch(o){case"name":c=ee;break;case"type":x=ee;break;case"checked":T=ee;break;case"defaultChecked":q=ee;break;case"value":h=ee;break;case"defaultValue":E=ee;break;case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(i(137,t));break;default:st(e,t,o,ee,r,null)}}Lh(e,h,E,T,q,x,c,!1),zo(e);return;case"select":Qe("invalid",e),o=x=h=null;for(c in r)if(r.hasOwnProperty(c)&&(E=r[c],E!=null))switch(c){case"value":h=E;break;case"defaultValue":x=E;break;case"multiple":o=E;default:st(e,t,c,E,r,null)}t=h,r=x,e.multiple=!!o,t!=null?nl(e,!!o,t,!1):r!=null&&nl(e,!!o,r,!0);return;case"textarea":Qe("invalid",e),h=c=o=null;for(x in r)if(r.hasOwnProperty(x)&&(E=r[x],E!=null))switch(x){case"value":o=E;break;case"defaultValue":c=E;break;case"children":h=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(i(91));break;default:st(e,t,x,E,r,null)}zh(e,o,c,h),zo(e);return;case"option":for(T in r)if(r.hasOwnProperty(T)&&(o=r[T],o!=null))switch(T){case"selected":e.selected=o&&typeof o!="function"&&typeof o!="symbol";break;default:st(e,t,T,o,r,null)}return;case"dialog":Qe("beforetoggle",e),Qe("toggle",e),Qe("cancel",e),Qe("close",e);break;case"iframe":case"object":Qe("load",e);break;case"video":case"audio":for(o=0;o<qi.length;o++)Qe(qi[o],e);break;case"image":Qe("error",e),Qe("load",e);break;case"details":Qe("toggle",e);break;case"embed":case"source":case"link":Qe("error",e),Qe("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(q in r)if(r.hasOwnProperty(q)&&(o=r[q],o!=null))switch(q){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:st(e,t,q,o,r,null)}return;default:if(Qu(t)){for(ee in r)r.hasOwnProperty(ee)&&(o=r[ee],o!==void 0&&Lf(e,t,ee,o,r,void 0));return}}for(E in r)r.hasOwnProperty(E)&&(o=r[E],o!=null&&st(e,t,E,o,r,null))}function yw(e,t,r,o){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,h=null,x=null,E=null,T=null,q=null,ee=null;for(X in r){var se=r[X];if(r.hasOwnProperty(X)&&se!=null)switch(X){case"checked":break;case"value":break;case"defaultValue":T=se;default:o.hasOwnProperty(X)||st(e,t,X,null,o,se)}}for(var G in o){var X=o[G];if(se=r[G],o.hasOwnProperty(G)&&(X!=null||se!=null))switch(G){case"type":h=X;break;case"name":c=X;break;case"checked":q=X;break;case"defaultChecked":ee=X;break;case"value":x=X;break;case"defaultValue":E=X;break;case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(i(137,t));break;default:X!==se&&st(e,t,G,X,o,se)}}Gu(e,x,E,T,q,ee,h,c);return;case"select":X=x=E=G=null;for(h in r)if(T=r[h],r.hasOwnProperty(h)&&T!=null)switch(h){case"value":break;case"multiple":X=T;default:o.hasOwnProperty(h)||st(e,t,h,null,o,T)}for(c in o)if(h=o[c],T=r[c],o.hasOwnProperty(c)&&(h!=null||T!=null))switch(c){case"value":G=h;break;case"defaultValue":E=h;break;case"multiple":x=h;default:h!==T&&st(e,t,c,h,o,T)}t=E,r=x,o=X,G!=null?nl(e,!!r,G,!1):!!o!=!!r&&(t!=null?nl(e,!!r,t,!0):nl(e,!!r,r?[]:"",!1));return;case"textarea":X=G=null;for(E in r)if(c=r[E],r.hasOwnProperty(E)&&c!=null&&!o.hasOwnProperty(E))switch(E){case"value":break;case"children":break;default:st(e,t,E,null,o,c)}for(x in o)if(c=o[x],h=r[x],o.hasOwnProperty(x)&&(c!=null||h!=null))switch(x){case"value":G=c;break;case"defaultValue":X=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(i(91));break;default:c!==h&&st(e,t,x,c,o,h)}kh(e,G,X);return;case"option":for(var ze in r)if(G=r[ze],r.hasOwnProperty(ze)&&G!=null&&!o.hasOwnProperty(ze))switch(ze){case"selected":e.selected=!1;break;default:st(e,t,ze,null,o,G)}for(T in o)if(G=o[T],X=r[T],o.hasOwnProperty(T)&&G!==X&&(G!=null||X!=null))switch(T){case"selected":e.selected=G&&typeof G!="function"&&typeof G!="symbol";break;default:st(e,t,T,G,o,X)}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 Me in r)G=r[Me],r.hasOwnProperty(Me)&&G!=null&&!o.hasOwnProperty(Me)&&st(e,t,Me,null,o,G);for(q in o)if(G=o[q],X=r[q],o.hasOwnProperty(q)&&G!==X&&(G!=null||X!=null))switch(q){case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(i(137,t));break;default:st(e,t,q,G,o,X)}return;default:if(Qu(t)){for(var ut in r)G=r[ut],r.hasOwnProperty(ut)&&G!==void 0&&!o.hasOwnProperty(ut)&&Lf(e,t,ut,void 0,o,G);for(ee in o)G=o[ee],X=r[ee],!o.hasOwnProperty(ee)||G===X||G===void 0&&X===void 0||Lf(e,t,ee,G,o,X);return}}for(var P in r)G=r[P],r.hasOwnProperty(P)&&G!=null&&!o.hasOwnProperty(P)&&st(e,t,P,null,o,G);for(se in o)G=o[se],X=r[se],!o.hasOwnProperty(se)||G===X||G==null&&X==null||st(e,t,se,G,o,X)}var kf=null,zf=null;function Ts(e){return e.nodeType===9?e:e.ownerDocument}function Ug(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 Pg(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 Uf(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 Pf=null;function bw(){var e=window.event;return e&&e.type==="popstate"?e===Pf?!1:(Pf=e,!0):(Pf=null,!1)}var Hg=typeof setTimeout=="function"?setTimeout:void 0,xw=typeof clearTimeout=="function"?clearTimeout:void 0,Bg=typeof Promise=="function"?Promise:void 0,ww=typeof queueMicrotask=="function"?queueMicrotask:typeof Bg<"u"?function(e){return Bg.resolve(null).then(e).catch(Sw)}:Hg;function Sw(e){setTimeout(function(){throw e})}function Xa(e){return e==="head"}function $g(e,t){var r=t,o=0,c=0;do{var h=r.nextSibling;if(e.removeChild(r),h&&h.nodeType===8)if(r=h.data,r==="/$"){if(0<o&&8>o){r=o;var x=e.ownerDocument;if(r&1&&Ki(x.documentElement),r&2&&Ki(x.body),r&4)for(r=x.head,Ki(r),x=r.firstChild;x;){var E=x.nextSibling,T=x.nodeName;x[_e]||T==="SCRIPT"||T==="STYLE"||T==="LINK"&&x.rel.toLowerCase()==="stylesheet"||r.removeChild(x),x=E}}if(c===0){e.removeChild(h),eo(t);return}c--}else r==="$"||r==="$?"||r==="$!"?c++:o=r.charCodeAt(0)-48;else o=0;r=h}while(r);eo(t)}function Hf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var r=t;switch(t=t.nextSibling,r.nodeName){case"HTML":case"HEAD":case"BODY":Hf(r),Ne(r);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(r.rel.toLowerCase()==="stylesheet")continue}e.removeChild(r)}}function Ew(e,t,r,o){for(;e.nodeType===1;){var c=r;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!o&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(o){if(!e[_e])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(h=e.getAttribute("rel"),h==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(h!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(h=e.getAttribute("src"),(h!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&h&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var h=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===h)return e}else return e;if(e=Ln(e.nextSibling),e===null)break}return null}function _w(e,t,r){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!r||(e=Ln(e.nextSibling),e===null))return null;return e}function Bf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function Cw(e,t){var r=e.ownerDocument;if(e.data!=="$?"||r.readyState==="complete")t();else{var o=function(){t(),r.removeEventListener("DOMContentLoaded",o)};r.addEventListener("DOMContentLoaded",o),e._reactRetry=o}}function Ln(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==="F!"||t==="F")break;if(t==="/$")return null}}return e}var $f=null;function Vg(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}function Yg(e,t,r){switch(t=Ts(r),e){case"html":if(e=t.documentElement,!e)throw Error(i(452));return e;case"head":if(e=t.head,!e)throw Error(i(453));return e;case"body":if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function Ki(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ne(e)}var jn=new Map,qg=new Set;function Ms(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var wa=Q.d;Q.d={f:Nw,r:Rw,D:jw,C:Ow,L:Aw,m:Tw,X:Dw,S:Mw,M:Lw};function Nw(){var e=wa.f(),t=Es();return e||t}function Rw(e){var t=at(e);t!==null&&t.tag===5&&t.type==="form"?cp(t):wa.r(e)}var Ml=typeof document>"u"?null:document;function Fg(e,t,r){var o=Ml;if(o&&typeof t=="string"&&t){var c=wn(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof r=="string"&&(c+='[crossorigin="'+r+'"]'),qg.has(c)||(qg.add(c),e={rel:e,crossOrigin:r,href:t},o.querySelector(c)===null&&(t=o.createElement("link"),$t(t,"link",e),He(t),o.head.appendChild(t)))}}function jw(e){wa.D(e),Fg("dns-prefetch",e,null)}function Ow(e,t){wa.C(e,t),Fg("preconnect",e,t)}function Aw(e,t,r){wa.L(e,t,r);var o=Ml;if(o&&e&&t){var c='link[rel="preload"][as="'+wn(t)+'"]';t==="image"&&r&&r.imageSrcSet?(c+='[imagesrcset="'+wn(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(c+='[imagesizes="'+wn(r.imageSizes)+'"]')):c+='[href="'+wn(e)+'"]';var h=c;switch(t){case"style":h=Dl(e);break;case"script":h=Ll(e)}jn.has(h)||(e=v({rel:"preload",href:t==="image"&&r&&r.imageSrcSet?void 0:e,as:t},r),jn.set(h,e),o.querySelector(c)!==null||t==="style"&&o.querySelector(Gi(h))||t==="script"&&o.querySelector(Xi(h))||(t=o.createElement("link"),$t(t,"link",e),He(t),o.head.appendChild(t)))}}function Tw(e,t){wa.m(e,t);var r=Ml;if(r&&e){var o=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+wn(o)+'"][href="'+wn(e)+'"]',h=c;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=Ll(e)}if(!jn.has(h)&&(e=v({rel:"modulepreload",href:e},t),jn.set(h,e),r.querySelector(c)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(Xi(h)))return}o=r.createElement("link"),$t(o,"link",e),He(o),r.head.appendChild(o)}}}function Mw(e,t,r){wa.S(e,t,r);var o=Ml;if(o&&e){var c=wt(o).hoistableStyles,h=Dl(e);t=t||"default";var x=c.get(h);if(!x){var E={loading:0,preload:null};if(x=o.querySelector(Gi(h)))E.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":t},r),(r=jn.get(h))&&Vf(e,r);var T=x=o.createElement("link");He(T),$t(T,"link",e),T._p=new Promise(function(q,ee){T.onload=q,T.onerror=ee}),T.addEventListener("load",function(){E.loading|=1}),T.addEventListener("error",function(){E.loading|=2}),E.loading|=4,Ds(x,t,o)}x={type:"stylesheet",instance:x,count:1,state:E},c.set(h,x)}}}function Dw(e,t){wa.X(e,t);var r=Ml;if(r&&e){var o=wt(r).hoistableScripts,c=Ll(e),h=o.get(c);h||(h=r.querySelector(Xi(c)),h||(e=v({src:e,async:!0},t),(t=jn.get(c))&&Yf(e,t),h=r.createElement("script"),He(h),$t(h,"link",e),r.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},o.set(c,h))}}function Lw(e,t){wa.M(e,t);var r=Ml;if(r&&e){var o=wt(r).hoistableScripts,c=Ll(e),h=o.get(c);h||(h=r.querySelector(Xi(c)),h||(e=v({src:e,async:!0,type:"module"},t),(t=jn.get(c))&&Yf(e,t),h=r.createElement("script"),He(h),$t(h,"link",e),r.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},o.set(c,h))}}function Kg(e,t,r,o){var c=(c=ge.current)?Ms(c):null;if(!c)throw Error(i(446));switch(e){case"meta":case"title":return null;case"style":return typeof r.precedence=="string"&&typeof r.href=="string"?(t=Dl(r.href),r=wt(c).hoistableStyles,o=r.get(t),o||(o={type:"style",instance:null,count:0,state:null},r.set(t,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(r.rel==="stylesheet"&&typeof r.href=="string"&&typeof r.precedence=="string"){e=Dl(r.href);var h=wt(c).hoistableStyles,x=h.get(e);if(x||(c=c.ownerDocument||c,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(e,x),(h=c.querySelector(Gi(e)))&&!h._p&&(x.instance=h,x.state.loading=5),jn.has(e)||(r={rel:"preload",as:"style",href:r.href,crossOrigin:r.crossOrigin,integrity:r.integrity,media:r.media,hrefLang:r.hrefLang,referrerPolicy:r.referrerPolicy},jn.set(e,r),h||kw(c,e,r,x.state))),t&&o===null)throw Error(i(528,""));return x}if(t&&o!==null)throw Error(i(529,""));return null;case"script":return t=r.async,r=r.src,typeof r=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ll(r),r=wt(c).hoistableScripts,o=r.get(t),o||(o={type:"script",instance:null,count:0,state:null},r.set(t,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Dl(e){return'href="'+wn(e)+'"'}function Gi(e){return'link[rel="stylesheet"]['+e+"]"}function Gg(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function kw(e,t,r,o){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?o.loading=1:(t=e.createElement("link"),o.preload=t,t.addEventListener("load",function(){return o.loading|=1}),t.addEventListener("error",function(){return o.loading|=2}),$t(t,"link",r),He(t),e.head.appendChild(t))}function Ll(e){return'[src="'+wn(e)+'"]'}function Xi(e){return"script[async]"+e}function Xg(e,t,r){if(t.count++,t.instance===null)switch(t.type){case"style":var o=e.querySelector('style[data-href~="'+wn(r.href)+'"]');if(o)return t.instance=o,He(o),o;var c=v({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),He(o),$t(o,"style",c),Ds(o,r.precedence,e),t.instance=o;case"stylesheet":c=Dl(r.href);var h=e.querySelector(Gi(c));if(h)return t.state.loading|=4,t.instance=h,He(h),h;o=Gg(r),(c=jn.get(c))&&Vf(o,c),h=(e.ownerDocument||e).createElement("link"),He(h);var x=h;return x._p=new Promise(function(E,T){x.onload=E,x.onerror=T}),$t(h,"link",o),t.state.loading|=4,Ds(h,r.precedence,e),t.instance=h;case"script":return h=Ll(r.src),(c=e.querySelector(Xi(h)))?(t.instance=c,He(c),c):(o=r,(c=jn.get(h))&&(o=v({},r),Yf(o,c)),e=e.ownerDocument||e,c=e.createElement("script"),He(c),$t(c,"link",o),e.head.appendChild(c),t.instance=c);case"void":return null;default:throw Error(i(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(o=t.instance,t.state.loading|=4,Ds(o,r.precedence,e));return t.instance}function Ds(e,t,r){for(var o=r.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=o.length?o[o.length-1]:null,h=c,x=0;x<o.length;x++){var E=o[x];if(E.dataset.precedence===t)h=E;else if(h!==c)break}h?h.parentNode.insertBefore(e,h.nextSibling):(t=r.nodeType===9?r.head:r,t.insertBefore(e,t.firstChild))}function Vf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Yf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Ls=null;function Qg(e,t,r){if(Ls===null){var o=new Map,c=Ls=new Map;c.set(r,o)}else c=Ls,o=c.get(r),o||(o=new Map,c.set(r,o));if(o.has(e))return o;for(o.set(e,null),r=r.getElementsByTagName(e),c=0;c<r.length;c++){var h=r[c];if(!(h[_e]||h[ce]||e==="link"&&h.getAttribute("rel")==="stylesheet")&&h.namespaceURI!=="http://www.w3.org/2000/svg"){var x=h.getAttribute(t)||"";x=e+x;var E=o.get(x);E?E.push(h):o.set(x,[h])}}return o}function Zg(e,t,r){e=e.ownerDocument||e,e.head.insertBefore(r,t==="title"?e.querySelector("head > title"):null)}function zw(e,t,r){if(r===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Ig(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var Qi=null;function Uw(){}function Pw(e,t,r){if(Qi===null)throw Error(i(475));var o=Qi;if(t.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(t.state.loading&4)===0){if(t.instance===null){var c=Dl(r.href),h=e.querySelector(Gi(c));if(h){e=h._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(o.count++,o=ks.bind(o),e.then(o,o)),t.state.loading|=4,t.instance=h,He(h);return}h=e.ownerDocument||e,r=Gg(r),(c=jn.get(c))&&Vf(r,c),h=h.createElement("link"),He(h);var x=h;x._p=new Promise(function(E,T){x.onload=E,x.onerror=T}),$t(h,"link",r),t.instance=h}o.stylesheets===null&&(o.stylesheets=new Map),o.stylesheets.set(t,e),(e=t.state.preload)&&(t.state.loading&3)===0&&(o.count++,t=ks.bind(o),e.addEventListener("load",t),e.addEventListener("error",t))}}function Hw(){if(Qi===null)throw Error(i(475));var e=Qi;return e.stylesheets&&e.count===0&&qf(e,e.stylesheets),0<e.count?function(t){var r=setTimeout(function(){if(e.stylesheets&&qf(e,e.stylesheets),e.unsuspend){var o=e.unsuspend;e.unsuspend=null,o()}},6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(r)}}:null}function ks(){if(this.count--,this.count===0){if(this.stylesheets)qf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var zs=null;function qf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,zs=new Map,t.forEach(Bw,e),zs=null,ks.call(e))}function Bw(e,t){if(!(t.state.loading&4)){var r=zs.get(e);if(r)var o=r.get(null);else{r=new Map,zs.set(e,r);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),h=0;h<c.length;h++){var x=c[h];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(r.set(x.dataset.precedence,x),o=x)}o&&r.set(null,o)}c=t.instance,x=c.getAttribute("data-precedence"),h=r.get(x)||o,h===o&&r.set(null,c),r.set(x,c),this.count++,o=ks.bind(this),c.addEventListener("load",o),c.addEventListener("error",o),h?h.parentNode.insertBefore(c,h.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),t.state.loading|=4}}var Zi={$$typeof:k,Provider:null,Consumer:null,_currentValue:V,_currentValue2:V,_threadCount:0};function $w(e,t,r,o,c,h,x,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=el(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=el(0),this.hiddenUpdates=el(null),this.identifierPrefix=o,this.onUncaughtError=c,this.onCaughtError=h,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=E,this.incompleteTransitions=new Map}function Jg(e,t,r,o,c,h,x,E,T,q,ee,se){return e=new $w(e,t,r,x,E,T,q,se),t=1,h===!0&&(t|=24),h=on(3,null,null,t),e.current=h,h.stateNode=e,t=_c(),t.refCount++,e.pooledCache=t,t.refCount++,h.memoizedState={element:o,isDehydrated:r,cache:t},jc(h),e}function Wg(e){return e?(e=fl,e):fl}function ev(e,t,r,o,c,h){c=Wg(c),o.context===null?o.context=c:o.pendingContext=c,o=ka(t),o.payload={element:r},h=h===void 0?null:h,h!==null&&(o.callback=h),r=za(e,o,t),r!==null&&(dn(r,e,t),Ni(r,e,t))}function tv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function Ff(e,t){tv(e,t),(e=e.alternate)&&tv(e,t)}function nv(e){if(e.tag===13){var t=cl(e,67108864);t!==null&&dn(t,e,67108864),Ff(e,67108864)}}var Us=!0;function Vw(e,t,r,o){var c=A.T;A.T=null;var h=Q.p;try{Q.p=2,Kf(e,t,r,o)}finally{Q.p=h,A.T=c}}function Yw(e,t,r,o){var c=A.T;A.T=null;var h=Q.p;try{Q.p=8,Kf(e,t,r,o)}finally{Q.p=h,A.T=c}}function Kf(e,t,r,o){if(Us){var c=Gf(o);if(c===null)Df(e,t,o,Ps,r),rv(e,o);else if(Fw(c,e,t,r,o))o.stopPropagation();else if(rv(e,o),t&4&&-1<qw.indexOf(e)){for(;c!==null;){var h=at(c);if(h!==null)switch(h.tag){case 3:if(h=h.stateNode,h.current.memoizedState.isDehydrated){var x=ra(h.pendingLanes);if(x!==0){var E=h;for(E.pendingLanes|=2,E.entangledLanes|=2;x;){var T=1<<31-Pt(x);E.entanglements[1]|=T,x&=~T}Xn(h),(rt&6)===0&&(ws=he()+500,Yi(0))}}break;case 13:E=cl(h,2),E!==null&&dn(E,h,2),Es(),Ff(h,2)}if(h=Gf(o),h===null&&Df(e,t,o,Ps,r),h===c)break;c=h}c!==null&&o.stopPropagation()}else Df(e,t,o,null,r)}}function Gf(e){return e=Iu(e),Xf(e)}var Ps=null;function Xf(e){if(Ps=null,e=$e(e),e!==null){var t=u(e);if(t===null)e=null;else{var r=t.tag;if(r===13){if(e=f(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Ps=e,null}function av(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(je()){case ke:return 2;case Pe:return 8;case nt:case Yt:return 32;case Bn:return 268435456;default:return 32}default:return 32}}var Qf=!1,Qa=null,Za=null,Ia=null,Ii=new Map,Ji=new Map,Ja=[],qw="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 rv(e,t){switch(e){case"focusin":case"focusout":Qa=null;break;case"dragenter":case"dragleave":Za=null;break;case"mouseover":case"mouseout":Ia=null;break;case"pointerover":case"pointerout":Ii.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ji.delete(t.pointerId)}}function Wi(e,t,r,o,c,h){return e===null||e.nativeEvent!==h?(e={blockedOn:t,domEventName:r,eventSystemFlags:o,nativeEvent:h,targetContainers:[c]},t!==null&&(t=at(t),t!==null&&nv(t)),e):(e.eventSystemFlags|=o,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function Fw(e,t,r,o,c){switch(t){case"focusin":return Qa=Wi(Qa,e,t,r,o,c),!0;case"dragenter":return Za=Wi(Za,e,t,r,o,c),!0;case"mouseover":return Ia=Wi(Ia,e,t,r,o,c),!0;case"pointerover":var h=c.pointerId;return Ii.set(h,Wi(Ii.get(h)||null,e,t,r,o,c)),!0;case"gotpointercapture":return h=c.pointerId,Ji.set(h,Wi(Ji.get(h)||null,e,t,r,o,c)),!0}return!1}function lv(e){var t=$e(e.target);if(t!==null){var r=u(t);if(r!==null){if(t=r.tag,t===13){if(t=f(r),t!==null){e.blockedOn=t,$(e.priority,function(){if(r.tag===13){var o=fn();o=oi(o);var c=cl(r,o);c!==null&&dn(c,r,o),Ff(r,o)}});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Hs(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Gf(e.nativeEvent);if(r===null){r=e.nativeEvent;var o=new r.constructor(r.type,r);Zu=o,r.target.dispatchEvent(o),Zu=null}else return t=at(r),t!==null&&nv(t),e.blockedOn=r,!1;t.shift()}return!0}function iv(e,t,r){Hs(e)&&r.delete(t)}function Kw(){Qf=!1,Qa!==null&&Hs(Qa)&&(Qa=null),Za!==null&&Hs(Za)&&(Za=null),Ia!==null&&Hs(Ia)&&(Ia=null),Ii.forEach(iv),Ji.forEach(iv)}function Bs(e,t){e.blockedOn===t&&(e.blockedOn=null,Qf||(Qf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Kw)))}var $s=null;function ov(e){$s!==e&&($s=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){$s===e&&($s=null);for(var t=0;t<e.length;t+=3){var r=e[t],o=e[t+1],c=e[t+2];if(typeof o!="function"){if(Xf(o||r)===null)continue;break}var h=at(r);h!==null&&(e.splice(t,3),t-=3,Gc(h,{pending:!0,data:c,method:r.method,action:o},o,c))}}))}function eo(e){function t(T){return Bs(T,e)}Qa!==null&&Bs(Qa,e),Za!==null&&Bs(Za,e),Ia!==null&&Bs(Ia,e),Ii.forEach(t),Ji.forEach(t);for(var r=0;r<Ja.length;r++){var o=Ja[r];o.blockedOn===e&&(o.blockedOn=null)}for(;0<Ja.length&&(r=Ja[0],r.blockedOn===null);)lv(r),r.blockedOn===null&&Ja.shift();if(r=(e.ownerDocument||e).$$reactFormReplay,r!=null)for(o=0;o<r.length;o+=3){var c=r[o],h=r[o+1],x=c[me]||null;if(typeof h=="function")x||ov(r);else if(x){var E=null;if(h&&h.hasAttribute("formAction")){if(c=h,x=h[me]||null)E=x.formAction;else if(Xf(c)!==null)continue}else E=x.action;typeof E=="function"?r[o+1]=E:(r.splice(o,3),o-=3),ov(r)}}}function Zf(e){this._internalRoot=e}Vs.prototype.render=Zf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var r=t.current,o=fn();ev(r,o,e,t,null,null)},Vs.prototype.unmount=Zf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ev(e.current,2,null,e,null,null),Es(),t[Se]=null}};function Vs(e){this._internalRoot=e}Vs.prototype.unstable_scheduleHydration=function(e){if(e){var t=M();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Ja.length&&t!==0&&t<Ja[r].priority;r++);Ja.splice(r,0,e),r===0&&lv(e)}};var sv=a.version;if(sv!=="19.1.1")throw Error(i(527,sv,"19.1.1"));Q.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(i(188)):(e=Object.keys(e).join(","),Error(i(268,e)));return e=p(t),e=e!==null?m(e):null,e=e===null?null:e.stateNode,e};var Gw={bundleType:0,version:"19.1.1",rendererPackageName:"react-dom",currentDispatcherRef:A,reconcilerVersion:"19.1.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ys=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ys.isDisabled&&Ys.supportsFiber)try{Zt=Ys.inject(Gw),vt=Ys}catch{}}return ao.createRoot=function(e,t){if(!s(e))throw Error(i(299));var r=!1,o="",c=_p,h=Cp,x=Np,E=null;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(o=t.identifierPrefix),t.onUncaughtError!==void 0&&(c=t.onUncaughtError),t.onCaughtError!==void 0&&(h=t.onCaughtError),t.onRecoverableError!==void 0&&(x=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(E=t.unstable_transitionCallbacks)),t=Jg(e,1,!1,null,null,r,o,c,h,x,E,null),e[Se]=t.current,Mf(e),new Zf(t)},ao.hydrateRoot=function(e,t,r){if(!s(e))throw Error(i(299));var o=!1,c="",h=_p,x=Cp,E=Np,T=null,q=null;return r!=null&&(r.unstable_strictMode===!0&&(o=!0),r.identifierPrefix!==void 0&&(c=r.identifierPrefix),r.onUncaughtError!==void 0&&(h=r.onUncaughtError),r.onCaughtError!==void 0&&(x=r.onCaughtError),r.onRecoverableError!==void 0&&(E=r.onRecoverableError),r.unstable_transitionCallbacks!==void 0&&(T=r.unstable_transitionCallbacks),r.formState!==void 0&&(q=r.formState)),t=Jg(e,1,!0,t,r??null,o,c,h,x,E,T,q),t.context=Wg(null),r=t.current,o=fn(),o=oi(o),c=ka(o),c.callback=null,za(r,c,o),r=o,t.current.lanes=r,br(t,r),Xn(t),e[Se]=t.current,Mf(e),new Vs(t)},ao.version="19.1.1",ao}var Pv;function yE(){if(Pv)return ed.exports;Pv=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),ed.exports=vE(),ed.exports}var bE=yE();/**
|
|
56
|
+
* react-router v7.7.1
|
|
57
57
|
*
|
|
58
58
|
* Copyright (c) Remix Software Inc.
|
|
59
59
|
*
|
|
@@ -61,15 +61,15 @@ Error generating stack: `+r.message+`
|
|
|
61
61
|
* LICENSE.md file in the root directory of this source tree.
|
|
62
62
|
*
|
|
63
63
|
* @license MIT
|
|
64
|
-
*/var o0=n=>{throw TypeError(n)},wE=(n,a,l)=>a.has(n)||o0("Cannot "+l),id=(n,a,l)=>(wE(n,a,"read from private field"),l?l.call(n):a.get(n)),SE=(n,a,l)=>a.has(n)?o0("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(n):a.set(n,l);function EE(n={}){let{initialEntries:a=["/"],initialIndex:l,v5Compat:i=!1}=n,s;s=a.map((w,_)=>v(w,typeof w=="string"?null:w.state,_===0?"default":void 0));let u=p(l??s.length-1),f="POP",d=null;function p(w){return Math.min(Math.max(w,0),s.length-1)}function m(){return s[u]}function v(w,_=null,C){let j=Md(s?m().pathname:"/",w,_,C);return Et(j.pathname.charAt(0)==="/",`relative pathnames are not supported in memory history: ${JSON.stringify(w)}`),j}function b(w){return typeof w=="string"?w:ar(w)}return{get index(){return u},get action(){return f},get location(){return m()},createHref:b,createURL(w){return new URL(b(w),"http://localhost")},encodeLocation(w){let _=typeof w=="string"?Na(w):w;return{pathname:_.pathname||"",search:_.search||"",hash:_.hash||""}},push(w,_){f="PUSH";let C=v(w,_);u+=1,s.splice(u,s.length,C),i&&d&&d({action:f,location:C,delta:1})},replace(w,_){f="REPLACE";let C=v(w,_);s[u]=C,i&&d&&d({action:f,location:C,delta:0})},go(w){f="POP";let _=p(u+w),C=s[_];u=_,d&&d({action:f,location:C,delta:w})},listen(w){return d=w,()=>{d=null}}}}function Fe(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}function Et(n,a){if(!n){typeof console<"u"&&console.warn(a);try{throw new Error(a)}catch{}}}function CE(){return Math.random().toString(36).substring(2,10)}function Md(n,a,l=null,i){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof a=="string"?Na(a):a,state:l,key:a&&a.key||i||CE()}}function ar({pathname:n="/",search:a="",hash:l=""}){return a&&a!=="?"&&(n+=a.charAt(0)==="?"?a:"?"+a),l&&l!=="#"&&(n+=l.charAt(0)==="#"?l:"#"+l),n}function Na(n){let a={};if(n){let l=n.indexOf("#");l>=0&&(a.hash=n.substring(l),n=n.substring(0,l));let i=n.indexOf("?");i>=0&&(a.search=n.substring(i),n=n.substring(0,i)),n&&(a.pathname=n)}return a}function _E(n,a=!1){let l="http://localhost";typeof window<"u"&&(l=window.location.origin!=="null"?window.location.origin:window.location.href),Fe(l,"No window.location.(origin|href) available to create URL");let i=typeof n=="string"?n:ar(n);return i=i.replace(/ $/,"%20"),!a&&i.startsWith("//")&&(i=l+i),new URL(i,l)}var uo,Bv=class{constructor(n){if(SE(this,uo,new Map),n)for(let[a,l]of n)this.set(a,l)}get(n){if(id(this,uo).has(n))return id(this,uo).get(n);if(n.defaultValue!==void 0)return n.defaultValue;throw new Error("No value found for context")}set(n,a){id(this,uo).set(n,a)}};uo=new WeakMap;var NE=new Set(["lazy","caseSensitive","path","id","index","children"]);function RE(n){return NE.has(n)}var jE=new Set(["lazy","caseSensitive","path","id","index","unstable_middleware","children"]);function OE(n){return jE.has(n)}function AE(n){return n.index===!0}function vo(n,a,l=[],i={},s=!1){return n.map((u,f)=>{let d=[...l,String(f)],p=typeof u.id=="string"?u.id:d.join("-");if(Fe(u.index!==!0||!u.children,"Cannot specify children on an index route"),Fe(s||!i[p],`Found a route id collision on id "${p}". Route id's must be globally unique within Data Router usages`),AE(u)){let m={...u,...a(u),id:p};return i[p]=m,m}else{let m={...u,...a(u),id:p,children:void 0};return i[p]=m,u.children&&(m.children=vo(u.children,a,d,i,s)),m}})}function tr(n,a,l="/"){return ru(n,a,l,!1)}function ru(n,a,l,i){let s=typeof a=="string"?Na(a):a,u=Nn(s.pathname||"/",l);if(u==null)return null;let f=s0(n);ME(f);let d=null;for(let p=0;d==null&&p<f.length;++p){let m=YE(u);d=$E(f[p],m,i)}return d}function TE(n,a){let{route:l,pathname:i,params:s}=n;return{id:l.id,pathname:i,params:s,data:a[l.id],handle:l.handle}}function s0(n,a=[],l=[],i=""){let s=(u,f,d)=>{let p={relativePath:d===void 0?u.path||"":d,caseSensitive:u.caseSensitive===!0,childrenIndex:f,route:u};p.relativePath.startsWith("/")&&(Fe(p.relativePath.startsWith(i),`Absolute route path "${p.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),p.relativePath=p.relativePath.slice(i.length));let m=Xn([i,p.relativePath]),v=l.concat(p);u.children&&u.children.length>0&&(Fe(u.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${m}".`),s0(u.children,a,v,m)),!(u.path==null&&!u.index)&&a.push({path:m,score:HE(m,u.index),routesMeta:v})};return n.forEach((u,f)=>{if(u.path===""||!u.path?.includes("?"))s(u,f);else for(let d of u0(u.path))s(u,f,d)}),a}function u0(n){let a=n.split("/");if(a.length===0)return[];let[l,...i]=a,s=l.endsWith("?"),u=l.replace(/\?$/,"");if(i.length===0)return s?[u,""]:[u];let f=u0(i.join("/")),d=[];return d.push(...f.map(p=>p===""?u:[u,p].join("/"))),s&&d.push(...f),d.map(p=>n.startsWith("/")&&p===""?"/":p)}function ME(n){n.sort((a,l)=>a.score!==l.score?l.score-a.score:BE(a.routesMeta.map(i=>i.childrenIndex),l.routesMeta.map(i=>i.childrenIndex)))}var DE=/^:[\w-]+$/,LE=3,kE=2,zE=1,UE=10,PE=-2,$v=n=>n==="*";function HE(n,a){let l=n.split("/"),i=l.length;return l.some($v)&&(i+=PE),a&&(i+=kE),l.filter(s=>!$v(s)).reduce((s,u)=>s+(DE.test(u)?LE:u===""?zE:UE),i)}function BE(n,a){return n.length===a.length&&n.slice(0,-1).every((i,s)=>i===a[s])?n[n.length-1]-a[a.length-1]:0}function $E(n,a,l=!1){let{routesMeta:i}=n,s={},u="/",f=[];for(let d=0;d<i.length;++d){let p=i[d],m=d===i.length-1,v=u==="/"?a:a.slice(u.length)||"/",b=mu({path:p.relativePath,caseSensitive:p.caseSensitive,end:m},v),S=p.route;if(!b&&m&&l&&!i[i.length-1].route.index&&(b=mu({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},v)),!b)return null;Object.assign(s,b.params),f.push({params:s,pathname:Xn([u,b.pathname]),pathnameBase:FE(Xn([u,b.pathnameBase])),route:S}),b.pathnameBase!=="/"&&(u=Xn([u,b.pathnameBase]))}return f}function mu(n,a){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[l,i]=VE(n.path,n.caseSensitive,n.end),s=a.match(l);if(!s)return null;let u=s[0],f=u.replace(/(.)\/+$/,"$1"),d=s.slice(1);return{params:i.reduce((m,{paramName:v,isOptional:b},S)=>{if(v==="*"){let _=d[S]||"";f=u.slice(0,u.length-_.length).replace(/(.)\/+$/,"$1")}const w=d[S];return b&&!w?m[v]=void 0:m[v]=(w||"").replace(/%2F/g,"/"),m},{}),pathname:u,pathnameBase:f,pattern:n}}function VE(n,a=!1,l=!0){Et(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 i=[],s="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(f,d,p)=>(i.push({paramName:d,isOptional:p!=null}),p?"/?([^\\/]+)?":"/([^\\/]+)"));return n.endsWith("*")?(i.push({paramName:"*"}),s+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):l?s+="\\/*$":n!==""&&n!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,a?void 0:"i"),i]}function YE(n){try{return n.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return Et(!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 (${a}).`),n}}function Nn(n,a){if(a==="/")return n;if(!n.toLowerCase().startsWith(a.toLowerCase()))return null;let l=a.endsWith("/")?a.length-1:a.length,i=n.charAt(l);return i&&i!=="/"?null:n.slice(l)||"/"}function qE({basename:n,pathname:a}){return a==="/"?n:Xn([n,a])}function KE(n,a="/"){let{pathname:l,search:i="",hash:s=""}=typeof n=="string"?Na(n):n;return{pathname:l?l.startsWith("/")?l:GE(l,a):a,search:XE(i),hash:QE(s)}}function GE(n,a){let l=a.replace(/\/+$/,"").split("/");return n.split("/").forEach(s=>{s===".."?l.length>1&&l.pop():s!=="."&&l.push(s)}),l.length>1?l.join("/"):"/"}function od(n,a,l,i){return`Cannot include a '${n}' character in a manually specified \`to.${a}\` field [${JSON.stringify(i)}]. Please separate it out to the \`to.${l}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function c0(n){return n.filter((a,l)=>l===0||a.route.path&&a.route.path.length>0)}function Nu(n){let a=c0(n);return a.map((l,i)=>i===a.length-1?l.pathname:l.pathnameBase)}function Ru(n,a,l,i=!1){let s;typeof n=="string"?s=Na(n):(s={...n},Fe(!s.pathname||!s.pathname.includes("?"),od("?","pathname","search",s)),Fe(!s.pathname||!s.pathname.includes("#"),od("#","pathname","hash",s)),Fe(!s.search||!s.search.includes("#"),od("#","search","hash",s)));let u=n===""||s.pathname==="",f=u?"/":s.pathname,d;if(f==null)d=l;else{let b=a.length-1;if(!i&&f.startsWith("..")){let S=f.split("/");for(;S[0]==="..";)S.shift(),b-=1;s.pathname=S.join("/")}d=b>=0?a[b]:"/"}let p=KE(s,d),m=f&&f!=="/"&&f.endsWith("/"),v=(u||f===".")&&l.endsWith("/");return!p.pathname.endsWith("/")&&(m||v)&&(p.pathname+="/"),p}var Xn=n=>n.join("/").replace(/\/\/+/g,"/"),FE=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),XE=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,QE=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,Dd=class{constructor(n,a,l,i=!1){this.status=n,this.statusText=a||"",this.internal=i,l instanceof Error?(this.data=l.toString(),this.error=l):this.data=l}};function yo(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}var f0=["POST","PUT","PATCH","DELETE"],ZE=new Set(f0),IE=["GET",...f0],JE=new Set(IE),WE=new Set([301,302,303,307,308]),e2=new Set([307,308]),sd={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},t2={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ro={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},n2=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,th=n=>n2.test(n),a2=n=>({hasErrorBoundary:!!n.hasErrorBoundary}),d0="remix-router-transitions",h0=Symbol("ResetLoaderData");function r2(n){const a=n.window?n.window:typeof window<"u"?window:void 0,l=typeof a<"u"&&typeof a.document<"u"&&typeof a.document.createElement<"u";Fe(n.routes.length>0,"You must provide a non-empty routes array to createRouter");let i=n.hydrationRouteProperties||[],s=n.mapRouteProperties||a2,u={},f=vo(n.routes,s,void 0,u),d,p=n.basename||"/",m=n.dataStrategy||u2,v={unstable_middleware:!1,...n.future},b=null,S=new Set,w=null,_=null,C=null,j=n.hydrationData!=null,N=tr(f,n.history.location,p),U=!1,z=null,D;if(N==null&&!n.patchRoutesOnNavigation){let M=_n(404,{pathname:n.history.location.pathname}),{matches:$,route:Q}=Wv(f);D=!0,N=$,z={[Q.id]:M}}else if(N&&!n.hydrationData&&yr(N,f,n.history.location.pathname).active&&(N=null),N)if(N.some(M=>M.route.lazy))D=!1;else if(!N.some(M=>M.route.loader))D=!0;else{let M=n.hydrationData?n.hydrationData.loaderData:null,$=n.hydrationData?n.hydrationData.errors:null;if($){let Q=N.findIndex(ie=>$[ie.route.id]!==void 0);D=N.slice(0,Q+1).every(ie=>!kd(ie.route,M,$))}else D=N.every(Q=>!kd(Q.route,M,$))}else{D=!1,N=[];let M=yr(null,f,n.history.location.pathname);M.active&&M.matches&&(U=!0,N=M.matches)}let T,R={historyAction:n.history.action,location:n.history.location,matches:N,initialized:D,navigation:sd,restoreScrollPosition:n.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:n.hydrationData&&n.hydrationData.loaderData||{},actionData:n.hydrationData&&n.hydrationData.actionData||null,errors:n.hydrationData&&n.hydrationData.errors||z,fetchers:new Map,blockers:new Map},H="POP",Z=!1,J,ne=!1,Se=new Map,de=null,oe=!1,fe=!1,he=new Set,L=new Map,I=0,V=-1,ge=new Map,O=new Set,K=new Map,P=new Map,G=new Set,ee=new Map,se,pe=null;function ve(){if(b=n.history.listen(({action:M,location:$,delta:Q})=>{if(se){se(),se=void 0;return}Et(ee.size===0||Q!=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 ie=To({currentLocation:R.location,nextLocation:$,historyAction:M});if(ie&&Q!=null){let me=new Promise(we=>{se=we});n.history.go(Q*-1),Pn(ie,{state:"blocked",location:$,proceed(){Pn(ie,{state:"proceeding",proceed:void 0,reset:void 0,location:$}),me.then(()=>n.history.go(Q))},reset(){let we=new Map(R.blockers);we.set(ie,ro),Ae({blockers:we})}});return}return ce(M,$)}),l){x2(a,Se);let M=()=>w2(a,Se);a.addEventListener("pagehide",M),de=()=>a.removeEventListener("pagehide",M)}return R.initialized||ce("POP",R.location,{initialHydration:!0}),T}function ze(){b&&b(),de&&de(),S.clear(),J&&J.abort(),R.fetchers.forEach((M,$)=>zt($)),R.blockers.forEach((M,$)=>gr($))}function Ze(M){return S.add(M),()=>S.delete(M)}function Ae(M,$={}){M.matches&&(M.matches=M.matches.map(me=>{let we=u[me.route.id],_e=me.route;return _e.element!==we.element||_e.errorElement!==we.errorElement||_e.hydrateFallbackElement!==we.hydrateFallbackElement?{...me,route:we}:me})),R={...R,...M};let Q=[],ie=[];R.fetchers.forEach((me,we)=>{me.state==="idle"&&(G.has(we)?Q.push(we):ie.push(we))}),G.forEach(me=>{!R.fetchers.has(me)&&!L.has(me)&&Q.push(me)}),[...S].forEach(me=>me(R,{deletedFetchers:Q,viewTransitionOpts:$.viewTransitionOpts,flushSync:$.flushSync===!0})),Q.forEach(me=>zt(me)),ie.forEach(me=>R.fetchers.delete(me))}function le(M,$,{flushSync:Q}={}){let ie=R.actionData!=null&&R.navigation.formMethod!=null&&Jt(R.navigation.formMethod)&&R.navigation.state==="loading"&&M.state?._isRedirect!==!0,me;$.actionData?Object.keys($.actionData).length>0?me=$.actionData:me=null:ie?me=R.actionData:me=null;let we=$.loaderData?Iv(R.loaderData,$.loaderData,$.matches||[],$.errors):R.loaderData,_e=R.blockers;_e.size>0&&(_e=new Map(_e),_e.forEach((Ce,Ne)=>_e.set(Ne,ro)));let Ee=oe?!1:Do(M,$.matches||R.matches),Oe=Z===!0||R.navigation.formMethod!=null&&Jt(R.navigation.formMethod)&&M.state?._isRedirect!==!0;d&&(f=d,d=void 0),oe||H==="POP"||(H==="PUSH"?n.history.push(M,M.state):H==="REPLACE"&&n.history.replace(M,M.state));let De;if(H==="POP"){let Ce=Se.get(R.location.pathname);Ce&&Ce.has(M.pathname)?De={currentLocation:R.location,nextLocation:M}:Se.has(M.pathname)&&(De={currentLocation:M,nextLocation:R.location})}else if(ne){let Ce=Se.get(R.location.pathname);Ce?Ce.add(M.pathname):(Ce=new Set([M.pathname]),Se.set(R.location.pathname,Ce)),De={currentLocation:R.location,nextLocation:M}}Ae({...$,actionData:me,loaderData:we,historyAction:H,location:M,initialized:!0,navigation:sd,revalidation:"idle",restoreScrollPosition:Ee,preventScrollReset:Oe,blockers:_e},{viewTransitionOpts:De,flushSync:Q===!0}),H="POP",Z=!1,ne=!1,oe=!1,fe=!1,pe?.resolve(),pe=null}async function ae(M,$){if(typeof M=="number"){n.history.go(M);return}let Q=Ld(R.location,R.matches,p,M,$?.fromRouteId,$?.relative),{path:ie,submission:me,error:we}=Vv(!1,Q,$),_e=R.location,Ee=Md(R.location,ie,$&&$.state);Ee={...Ee,...n.history.encodeLocation(Ee)};let Oe=$&&$.replace!=null?$.replace:void 0,De="PUSH";Oe===!0?De="REPLACE":Oe===!1||me!=null&&Jt(me.formMethod)&&me.formAction===R.location.pathname+R.location.search&&(De="REPLACE");let Ce=$&&"preventScrollReset"in $?$.preventScrollReset===!0:void 0,Ne=($&&$.flushSync)===!0,Ve=To({currentLocation:_e,nextLocation:Ee,historyAction:De});if(Ve){Pn(Ve,{state:"blocked",location:Ee,proceed(){Pn(Ve,{state:"proceeding",proceed:void 0,reset:void 0,location:Ee}),ae(M,$)},reset(){let tt=new Map(R.blockers);tt.set(Ve,ro),Ae({blockers:tt})}});return}await ce(De,Ee,{submission:me,pendingError:we,preventScrollReset:Ce,replace:$&&$.replace,enableViewTransition:$&&$.viewTransition,flushSync:Ne})}function ue(){pe||(pe=S2()),ii(),Ae({revalidation:"loading"});let M=pe.promise;return R.navigation.state==="submitting"?M:R.navigation.state==="idle"?(ce(R.historyAction,R.location,{startUninterruptedRevalidation:!0}),M):(ce(H||R.historyAction,R.navigation.location,{overrideNavigation:R.navigation,enableViewTransition:ne===!0}),M)}async function ce(M,$,Q){J&&J.abort(),J=null,H=M,oe=(Q&&Q.startUninterruptedRevalidation)===!0,vr(R.location,R.matches),Z=(Q&&Q.preventScrollReset)===!0,ne=(Q&&Q.enableViewTransition)===!0;let ie=d||f,me=Q&&Q.overrideNavigation,we=Q?.initialHydration&&R.matches&&R.matches.length>0&&!U?R.matches:tr(ie,$,p),_e=(Q&&Q.flushSync)===!0;if(we&&R.initialized&&!fe&&p2(R.location,$)&&!(Q&&Q.submission&&Jt(Q.submission.formMethod))){le($,{matches:we},{flushSync:_e});return}let Ee=yr(we,ie,$.pathname);if(Ee.active&&Ee.matches&&(we=Ee.matches),!we){let{error:xt,notFoundMatches:Be,route:lt}=Wr($.pathname);le($,{matches:Be,loaderData:{},errors:{[lt.id]:xt}},{flushSync:_e});return}J=new AbortController;let Oe=Vl(n.history,$,J.signal,Q&&Q.submission),De=new Bv(n.unstable_getContext?await n.unstable_getContext():void 0),Ce;if(Q&&Q.pendingError)Ce=[Pr(we).route.id,{type:"error",error:Q.pendingError}];else if(Q&&Q.submission&&Jt(Q.submission.formMethod)){let xt=await je(Oe,$,Q.submission,we,De,Ee.active,Q&&Q.initialHydration===!0,{replace:Q.replace,flushSync:_e});if(xt.shortCircuited)return;if(xt.pendingActionResult){let[Be,lt]=xt.pendingActionResult;if(un(lt)&&yo(lt.error)&<.error.status===404){J=null,le($,{matches:xt.matches,loaderData:{},errors:{[Be]:lt.error}});return}}we=xt.matches||we,Ce=xt.pendingActionResult,me=ud($,Q.submission),_e=!1,Ee.active=!1,Oe=Vl(n.history,Oe.url,Oe.signal)}let{shortCircuited:Ne,matches:Ve,loaderData:tt,errors:bt}=await Pe(Oe,$,we,De,Ee.active,me,Q&&Q.submission,Q&&Q.fetcherSubmission,Q&&Q.replace,Q&&Q.initialHydration===!0,_e,Ce);Ne||(J=null,le($,{matches:Ve||we,...Jv(Ce),loaderData:tt,errors:bt}))}async function je(M,$,Q,ie,me,we,_e,Ee={}){ii();let Oe=y2($,Q);if(Ae({navigation:Oe},{flushSync:Ee.flushSync===!0}),we){let Ne=await br(ie,$.pathname,M.signal);if(Ne.type==="aborted")return{shortCircuited:!0};if(Ne.type==="error"){let Ve=Pr(Ne.partialMatches).route.id;return{matches:Ne.partialMatches,pendingActionResult:[Ve,{type:"error",error:Ne.error}]}}else if(Ne.matches)ie=Ne.matches;else{let{notFoundMatches:Ve,error:tt,route:bt}=Wr($.pathname);return{matches:Ve,pendingActionResult:[bt.id,{type:"error",error:tt}]}}}let De,Ce=lu(ie,$);if(!Ce.route.action&&!Ce.route.lazy)De={type:"error",error:_n(405,{method:M.method,pathname:$.pathname,routeId:Ce.route.id})};else{let Ne=Gl(s,u,M,ie,Ce,_e?[]:i,me),Ve=await Ra(M,Ne,me,null);if(De=Ve[Ce.route.id],!De){for(let tt of ie)if(Ve[tt.route.id]){De=Ve[tt.route.id];break}}if(M.signal.aborted)return{shortCircuited:!0}}if(Br(De)){let Ne;return Ee&&Ee.replace!=null?Ne=Ee.replace:Ne=Xv(De.response.headers.get("Location"),new URL(M.url),p)===R.location.pathname+R.location.search,await ea(M,De,!0,{submission:Q,replace:Ne}),{shortCircuited:!0}}if(un(De)){let Ne=Pr(ie,Ce.route.id);return(Ee&&Ee.replace)!==!0&&(H="PUSH"),{matches:ie,pendingActionResult:[Ne.route.id,De,Ce.route.id]}}return{matches:ie,pendingActionResult:[Ce.route.id,De]}}async function Pe(M,$,Q,ie,me,we,_e,Ee,Oe,De,Ce,Ne){let Ve=we||ud($,_e),tt=_e||Ee||ty(Ve),bt=!oe&&!De;if(me){if(bt){let Nt=Me(Ne);Ae({navigation:Ve,...Nt!==void 0?{actionData:Nt}:{}},{flushSync:Ce})}let Ke=await br(Q,$.pathname,M.signal);if(Ke.type==="aborted")return{shortCircuited:!0};if(Ke.type==="error"){let Nt=Pr(Ke.partialMatches).route.id;return{matches:Ke.partialMatches,loaderData:{},errors:{[Nt]:Ke.error}}}else if(Ke.matches)Q=Ke.matches;else{let{error:Nt,notFoundMatches:xr,route:pn}=Wr($.pathname);return{matches:xr,loaderData:{},errors:{[pn.id]:Nt}}}}let xt=d||f,{dsMatches:Be,revalidatingFetchers:lt}=Yv(M,ie,s,u,n.history,R,Q,tt,$,De?[]:i,De===!0,fe,he,G,K,O,xt,p,n.patchRoutesOnNavigation!=null,Ne);if(V=++I,!n.dataStrategy&&!Be.some(Ke=>Ke.shouldLoad)&<.length===0){let Ke=mr();return le($,{matches:Q,loaderData:{},errors:Ne&&un(Ne[1])?{[Ne[0]]:Ne[1].error}:null,...Jv(Ne),...Ke?{fetchers:new Map(R.fetchers)}:{}},{flushSync:Ce}),{shortCircuited:!0}}if(bt){let Ke={};if(!me){Ke.navigation=Ve;let Nt=Me(Ne);Nt!==void 0&&(Ke.actionData=Nt)}lt.length>0&&(Ke.fetchers=ut(lt)),Ae(Ke,{flushSync:Ce})}lt.forEach(Ke=>{Un(Ke.key),Ke.controller&&L.set(Ke.key,Ke.controller)});let Hn=()=>lt.forEach(Ke=>Un(Ke.key));J&&J.signal.addEventListener("abort",Hn);let{loaderResults:en,fetcherResults:qt}=await Oo(Be,lt,M,ie);if(M.signal.aborted)return{shortCircuited:!0};J&&J.signal.removeEventListener("abort",Hn),lt.forEach(Ke=>L.delete(Ke.key));let mn=Ks(en);if(mn)return await ea(M,mn.result,!0,{replace:Oe}),{shortCircuited:!0};if(mn=Ks(qt),mn)return O.add(mn.key),await ea(M,mn.result,!0,{replace:Oe}),{shortCircuited:!0};let{loaderData:tl,errors:ja}=Zv(R,Q,en,Ne,lt,qt);De&&R.errors&&(ja={...R.errors,...ja});let na=mr(),aa=pr(V),ra=na||aa||lt.length>0;return{matches:Q,loaderData:tl,errors:ja,...ra?{fetchers:new Map(R.fetchers)}:{}}}function Me(M){if(M&&!un(M[1]))return{[M[0]]:M[1].data};if(R.actionData)return Object.keys(R.actionData).length===0?null:R.actionData}function ut(M){return M.forEach($=>{let Q=R.fetchers.get($.key),ie=lo(void 0,Q?Q.data:void 0);R.fetchers.set($.key,ie)}),new Map(R.fetchers)}async function Rn(M,$,Q,ie){Un(M);let me=(ie&&ie.flushSync)===!0,we=d||f,_e=Ld(R.location,R.matches,p,Q,$,ie?.relative),Ee=tr(we,_e,p),Oe=yr(Ee,we,_e);if(Oe.active&&Oe.matches&&(Ee=Oe.matches),!Ee){pt(M,$,_n(404,{pathname:_e}),{flushSync:me});return}let{path:De,submission:Ce,error:Ne}=Vv(!0,_e,ie);if(Ne){pt(M,$,Ne,{flushSync:me});return}let Ve=new Bv(n.unstable_getContext?await n.unstable_getContext():void 0),tt=(ie&&ie.preventScrollReset)===!0;if(Ce&&Jt(Ce.formMethod)){await Ir(M,$,De,Ee,Ve,Oe.active,me,tt,Ce);return}K.set(M,{routeId:$,path:De}),await Jr(M,$,De,Ee,Ve,Oe.active,me,tt,Ce)}async function Ir(M,$,Q,ie,me,we,_e,Ee,Oe){ii(),K.delete(M);let De=R.fetchers.get(M);Ft(M,b2(Oe,De),{flushSync:_e});let Ce=new AbortController,Ne=Vl(n.history,Q,Ce.signal,Oe);if(we){let gt=await br(ie,new URL(Ne.url).pathname,Ne.signal,M);if(gt.type==="aborted")return;if(gt.type==="error"){pt(M,$,gt.error,{flushSync:_e});return}else if(gt.matches)ie=gt.matches;else{pt(M,$,_n(404,{pathname:Q}),{flushSync:_e});return}}let Ve=lu(ie,Q);if(!Ve.route.action&&!Ve.route.lazy){let gt=_n(405,{method:Oe.formMethod,pathname:Q,routeId:$});pt(M,$,gt,{flushSync:_e});return}L.set(M,Ce);let tt=I,bt=Gl(s,u,Ne,ie,Ve,i,me),Be=(await Ra(Ne,bt,me,M))[Ve.route.id];if(Ne.signal.aborted){L.get(M)===Ce&&L.delete(M);return}if(G.has(M)){if(Br(Be)||un(Be)){Ft(M,Wa(void 0));return}}else{if(Br(Be))if(L.delete(M),V>tt){Ft(M,Wa(void 0));return}else return O.add(M),Ft(M,lo(Oe)),ea(Ne,Be,!1,{fetcherSubmission:Oe,preventScrollReset:Ee});if(un(Be)){pt(M,$,Be.error);return}}let lt=R.navigation.location||R.location,Hn=Vl(n.history,lt,Ce.signal),en=d||f,qt=R.navigation.state!=="idle"?tr(en,R.navigation.location,p):R.matches;Fe(qt,"Didn't find any matches after fetcher action");let mn=++I;ge.set(M,mn);let tl=lo(Oe,Be.data);R.fetchers.set(M,tl);let{dsMatches:ja,revalidatingFetchers:na}=Yv(Hn,me,s,u,n.history,R,qt,Oe,lt,i,!1,fe,he,G,K,O,en,p,n.patchRoutesOnNavigation!=null,[Ve.route.id,Be]);na.filter(gt=>gt.key!==M).forEach(gt=>{let Oa=gt.key,Lo=R.fetchers.get(Oa),ko=lo(void 0,Lo?Lo.data:void 0);R.fetchers.set(Oa,ko),Un(Oa),gt.controller&&L.set(Oa,gt.controller)}),Ae({fetchers:new Map(R.fetchers)});let aa=()=>na.forEach(gt=>Un(gt.key));Ce.signal.addEventListener("abort",aa);let{loaderResults:ra,fetcherResults:Ke}=await Oo(ja,na,Hn,me);if(Ce.signal.aborted)return;if(Ce.signal.removeEventListener("abort",aa),ge.delete(M),L.delete(M),na.forEach(gt=>L.delete(gt.key)),R.fetchers.has(M)){let gt=Wa(Be.data);R.fetchers.set(M,gt)}let Nt=Ks(ra);if(Nt)return ea(Hn,Nt.result,!1,{preventScrollReset:Ee});if(Nt=Ks(Ke),Nt)return O.add(Nt.key),ea(Hn,Nt.result,!1,{preventScrollReset:Ee});let{loaderData:xr,errors:pn}=Zv(R,qt,ra,void 0,na,Ke);pr(mn),R.navigation.state==="loading"&&mn>V?(Fe(H,"Expected pending action"),J&&J.abort(),le(R.navigation.location,{matches:qt,loaderData:xr,errors:pn,fetchers:new Map(R.fetchers)})):(Ae({errors:pn,loaderData:Iv(R.loaderData,xr,qt,pn),fetchers:new Map(R.fetchers)}),fe=!1)}async function Jr(M,$,Q,ie,me,we,_e,Ee,Oe){let De=R.fetchers.get(M);Ft(M,lo(Oe,De?De.data:void 0),{flushSync:_e});let Ce=new AbortController,Ne=Vl(n.history,Q,Ce.signal);if(we){let lt=await br(ie,new URL(Ne.url).pathname,Ne.signal,M);if(lt.type==="aborted")return;if(lt.type==="error"){pt(M,$,lt.error,{flushSync:_e});return}else if(lt.matches)ie=lt.matches;else{pt(M,$,_n(404,{pathname:Q}),{flushSync:_e});return}}let Ve=lu(ie,Q);L.set(M,Ce);let tt=I,bt=Gl(s,u,Ne,ie,Ve,i,me),Be=(await Ra(Ne,bt,me,M))[Ve.route.id];if(L.get(M)===Ce&&L.delete(M),!Ne.signal.aborted){if(G.has(M)){Ft(M,Wa(void 0));return}if(Br(Be))if(V>tt){Ft(M,Wa(void 0));return}else{O.add(M),await ea(Ne,Be,!1,{preventScrollReset:Ee});return}if(un(Be)){pt(M,$,Be.error);return}Ft(M,Wa(Be.data))}}async function ea(M,$,Q,{submission:ie,fetcherSubmission:me,preventScrollReset:we,replace:_e}={}){$.response.headers.has("X-Remix-Revalidate")&&(fe=!0);let Ee=$.response.headers.get("Location");Fe(Ee,"Expected a Location header on the redirect Response"),Ee=Xv(Ee,new URL(M.url),p);let Oe=Md(R.location,Ee,{_isRedirect:!0});if(l){let bt=!1;if($.response.headers.has("X-Remix-Reload-Document"))bt=!0;else if(th(Ee)){const xt=_E(Ee,!0);bt=xt.origin!==a.location.origin||Nn(xt.pathname,p)==null}if(bt){_e?a.location.replace(Ee):a.location.assign(Ee);return}}J=null;let De=_e===!0||$.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Ce,formAction:Ne,formEncType:Ve}=R.navigation;!ie&&!me&&Ce&&Ne&&Ve&&(ie=ty(R.navigation));let tt=ie||me;if(e2.has($.response.status)&&tt&&Jt(tt.formMethod))await ce(De,Oe,{submission:{...tt,formAction:Ee},preventScrollReset:we||Z,enableViewTransition:Q?ne:void 0});else{let bt=ud(Oe,ie);await ce(De,Oe,{overrideNavigation:bt,fetcherSubmission:me,preventScrollReset:we||Z,enableViewTransition:Q?ne:void 0})}}async function Ra(M,$,Q,ie){let me,we={};try{me=await c2(m,M,$,ie,Q,!1)}catch(_e){return $.filter(Ee=>Ee.shouldLoad).forEach(Ee=>{we[Ee.route.id]={type:"error",error:_e}}),we}if(M.signal.aborted)return we;for(let[_e,Ee]of Object.entries(me))if(g2(Ee)){let Oe=Ee.result;we[_e]={type:"redirect",response:h2(Oe,M,_e,$,p)}}else we[_e]=await d2(Ee);return we}async function Oo(M,$,Q,ie){let me=Ra(Q,M,ie,null),we=Promise.all($.map(async Oe=>{if(Oe.matches&&Oe.match&&Oe.request&&Oe.controller){let Ce=(await Ra(Oe.request,Oe.matches,ie,Oe.key))[Oe.match.route.id];return{[Oe.key]:Ce}}else return Promise.resolve({[Oe.key]:{type:"error",error:_n(404,{pathname:Oe.path})}})})),_e=await me,Ee=(await we).reduce((Oe,De)=>Object.assign(Oe,De),{});return{loaderResults:_e,fetcherResults:Ee}}function ii(){fe=!0,K.forEach((M,$)=>{L.has($)&&he.add($),Un($)})}function Ft(M,$,Q={}){R.fetchers.set(M,$),Ae({fetchers:new Map(R.fetchers)},{flushSync:(Q&&Q.flushSync)===!0})}function pt(M,$,Q,ie={}){let me=Pr(R.matches,$);zt(M),Ae({errors:{[me.route.id]:Q},fetchers:new Map(R.fetchers)},{flushSync:(ie&&ie.flushSync)===!0})}function jn(M){return P.set(M,(P.get(M)||0)+1),G.has(M)&&G.delete(M),R.fetchers.get(M)||t2}function zt(M){let $=R.fetchers.get(M);L.has(M)&&!($&&$.state==="loading"&&ge.has(M))&&Un(M),K.delete(M),ge.delete(M),O.delete(M),G.delete(M),he.delete(M),R.fetchers.delete(M)}function Xu(M){let $=(P.get(M)||0)-1;$<=0?(P.delete(M),G.add(M)):P.set(M,$),Ae({fetchers:new Map(R.fetchers)})}function Un(M){let $=L.get(M);$&&($.abort(),L.delete(M))}function Ao(M){for(let $ of M){let Q=jn($),ie=Wa(Q.data);R.fetchers.set($,ie)}}function mr(){let M=[],$=!1;for(let Q of O){let ie=R.fetchers.get(Q);Fe(ie,`Expected fetcher: ${Q}`),ie.state==="loading"&&(O.delete(Q),M.push(Q),$=!0)}return Ao(M),$}function pr(M){let $=[];for(let[Q,ie]of ge)if(ie<M){let me=R.fetchers.get(Q);Fe(me,`Expected fetcher: ${Q}`),me.state==="loading"&&(Un(Q),ge.delete(Q),$.push(Q))}return Ao($),$.length>0}function ta(M,$){let Q=R.blockers.get(M)||ro;return ee.get(M)!==$&&ee.set(M,$),Q}function gr(M){R.blockers.delete(M),ee.delete(M)}function Pn(M,$){let Q=R.blockers.get(M)||ro;Fe(Q.state==="unblocked"&&$.state==="blocked"||Q.state==="blocked"&&$.state==="blocked"||Q.state==="blocked"&&$.state==="proceeding"||Q.state==="blocked"&&$.state==="unblocked"||Q.state==="proceeding"&&$.state==="unblocked",`Invalid blocker state transition: ${Q.state} -> ${$.state}`);let ie=new Map(R.blockers);ie.set(M,$),Ae({blockers:ie})}function To({currentLocation:M,nextLocation:$,historyAction:Q}){if(ee.size===0)return;ee.size>1&&Et(!1,"A router only supports one blocker at a time");let ie=Array.from(ee.entries()),[me,we]=ie[ie.length-1],_e=R.blockers.get(me);if(!(_e&&_e.state==="proceeding")&&we({currentLocation:M,nextLocation:$,historyAction:Q}))return me}function Wr(M){let $=_n(404,{pathname:M}),Q=d||f,{matches:ie,route:me}=Wv(Q);return{notFoundMatches:ie,route:me,error:$}}function Mo(M,$,Q){if(w=M,C=$,_=Q||null,!j&&R.navigation===sd){j=!0;let ie=Do(R.location,R.matches);ie!=null&&Ae({restoreScrollPosition:ie})}return()=>{w=null,C=null,_=null}}function el(M,$){return _&&_(M,$.map(ie=>TE(ie,R.loaderData)))||M.key}function vr(M,$){if(w&&C){let Q=el(M,$);w[Q]=C()}}function Do(M,$){if(w){let Q=el(M,$),ie=w[Q];if(typeof ie=="number")return ie}return null}function yr(M,$,Q){if(n.patchRoutesOnNavigation)if(M){if(Object.keys(M[0].params).length>0)return{active:!0,matches:ru($,Q,p,!0)}}else return{active:!0,matches:ru($,Q,p,!0)||[]};return{active:!1,matches:null}}async function br(M,$,Q,ie){if(!n.patchRoutesOnNavigation)return{type:"success",matches:M};let me=M;for(;;){let we=d==null,_e=d||f,Ee=u;try{await n.patchRoutesOnNavigation({signal:Q,path:$,matches:me,fetcherKey:ie,patch:(Ce,Ne)=>{Q.aborted||qv(Ce,Ne,_e,Ee,s,!1)}})}catch(Ce){return{type:"error",error:Ce,partialMatches:me}}finally{we&&!Q.aborted&&(f=[...f])}if(Q.aborted)return{type:"aborted"};let Oe=tr(_e,$,p);if(Oe)return{type:"success",matches:Oe};let De=ru(_e,$,p,!0);if(!De||me.length===De.length&&me.every((Ce,Ne)=>Ce.route.id===De[Ne].route.id))return{type:"success",matches:null};me=De}}function oi(M){u={},d=vo(M,s,void 0,u)}function si(M,$,Q=!1){let ie=d==null;qv(M,$,d||f,u,s,Q),ie&&(f=[...f],Ae({}))}return T={get basename(){return p},get future(){return v},get state(){return R},get routes(){return f},get window(){return a},initialize:ve,subscribe:Ze,enableScrollRestoration:Mo,navigate:ae,fetch:Rn,revalidate:ue,createHref:M=>n.history.createHref(M),encodeLocation:M=>n.history.encodeLocation(M),getFetcher:jn,deleteFetcher:Xu,dispose:ze,getBlocker:ta,deleteBlocker:gr,patchRoutes:si,_internalFetchControllers:L,_internalSetRoutes:oi,_internalSetStateDoNotUseOrYouWillBreakYourApp(M){Ae(M)}},T}function l2(n){return n!=null&&("formData"in n&&n.formData!=null||"body"in n&&n.body!==void 0)}function Ld(n,a,l,i,s,u){let f,d;if(s){f=[];for(let m of a)if(f.push(m),m.route.id===s){d=m;break}}else f=a,d=a[a.length-1];let p=Ru(i||".",Nu(f),Nn(n.pathname,l)||n.pathname,u==="path");if(i==null&&(p.search=n.search,p.hash=n.hash),(i==null||i===""||i===".")&&d){let m=nh(p.search);if(d.route.index&&!m)p.search=p.search?p.search.replace(/^\?/,"?index&"):"?index";else if(!d.route.index&&m){let v=new URLSearchParams(p.search),b=v.getAll("index");v.delete("index"),b.filter(w=>w).forEach(w=>v.append("index",w));let S=v.toString();p.search=S?`?${S}`:""}}return l!=="/"&&(p.pathname=qE({basename:l,pathname:p.pathname})),ar(p)}function Vv(n,a,l){if(!l||!l2(l))return{path:a};if(l.formMethod&&!v2(l.formMethod))return{path:a,error:_n(405,{method:l.formMethod})};let i=()=>({path:a,error:_n(400,{type:"invalid-body"})}),u=(l.formMethod||"get").toUpperCase(),f=b0(a);if(l.body!==void 0){if(l.formEncType==="text/plain"){if(!Jt(u))return i();let b=typeof l.body=="string"?l.body:l.body instanceof FormData||l.body instanceof URLSearchParams?Array.from(l.body.entries()).reduce((S,[w,_])=>`${S}${w}=${_}
|
|
65
|
-
`,""):String(l.body);return{path:a,submission:{formMethod:u,formAction:f,formEncType:l.formEncType,formData:void 0,json:void 0,text:b}}}else if(l.formEncType==="application/json"){if(!Jt(u))return i();try{let b=typeof l.body=="string"?JSON.parse(l.body):l.body;return{path:a,submission:{formMethod:u,formAction:f,formEncType:l.formEncType,formData:void 0,json:b,text:void 0}}}catch{return i()}}}Fe(typeof FormData=="function","FormData is not available in this environment");let d,p;if(l.formData)d=Ud(l.formData),p=l.formData;else if(l.body instanceof FormData)d=Ud(l.body),p=l.body;else if(l.body instanceof URLSearchParams)d=l.body,p=Qv(d);else if(l.body==null)d=new URLSearchParams,p=new FormData;else try{d=new URLSearchParams(l.body),p=Qv(d)}catch{return i()}let m={formMethod:u,formAction:f,formEncType:l&&l.formEncType||"application/x-www-form-urlencoded",formData:p,json:void 0,text:void 0};if(Jt(m.formMethod))return{path:a,submission:m};let v=Na(a);return n&&v.search&&nh(v.search)&&d.append("index",""),v.search=`?${d}`,{path:ar(v),submission:m}}function Yv(n,a,l,i,s,u,f,d,p,m,v,b,S,w,_,C,j,N,U,z){let D=z?un(z[1])?z[1].error:z[1].data:void 0,T=s.createURL(u.location),R=s.createURL(p),H;if(v&&u.errors){let oe=Object.keys(u.errors)[0];H=f.findIndex(fe=>fe.route.id===oe)}else if(z&&un(z[1])){let oe=z[0];H=f.findIndex(fe=>fe.route.id===oe)-1}let Z=z?z[1].statusCode:void 0,J=Z&&Z>=400,ne={currentUrl:T,currentParams:u.matches[0]?.params||{},nextUrl:R,nextParams:f[0].params,...d,actionResult:D,actionStatus:Z},Se=f.map((oe,fe)=>{let{route:he}=oe,L=null;if(H!=null&&fe>H?L=!1:he.lazy?L=!0:he.loader==null?L=!1:v?L=kd(he,u.loaderData,u.errors):i2(u.loaderData,u.matches[fe],oe)&&(L=!0),L!==null)return zd(l,i,n,oe,m,a,L);let I=J?!1:b||T.pathname+T.search===R.pathname+R.search||T.search!==R.search||o2(u.matches[fe],oe),V={...ne,defaultShouldRevalidate:I},ge=pu(oe,V);return zd(l,i,n,oe,m,a,ge,V)}),de=[];return _.forEach((oe,fe)=>{if(v||!f.some(P=>P.route.id===oe.routeId)||w.has(fe))return;let he=u.fetchers.get(fe),L=he&&he.state!=="idle"&&he.data===void 0,I=tr(j,oe.path,N);if(!I){if(U&&L)return;de.push({key:fe,routeId:oe.routeId,path:oe.path,matches:null,match:null,request:null,controller:null});return}if(C.has(fe))return;let V=lu(I,oe.path),ge=new AbortController,O=Vl(s,oe.path,ge.signal),K=null;if(S.has(fe))S.delete(fe),K=Gl(l,i,O,I,V,m,a);else if(L)b&&(K=Gl(l,i,O,I,V,m,a));else{let P={...ne,defaultShouldRevalidate:J?!1:b};pu(V,P)&&(K=Gl(l,i,O,I,V,m,a,P))}K&&de.push({key:fe,routeId:oe.routeId,path:oe.path,matches:K,match:V,request:O,controller:ge})}),{dsMatches:Se,revalidatingFetchers:de}}function kd(n,a,l){if(n.lazy)return!0;if(!n.loader)return!1;let i=a!=null&&n.id in a,s=l!=null&&l[n.id]!==void 0;return!i&&s?!1:typeof n.loader=="function"&&n.loader.hydrate===!0?!0:!i&&!s}function i2(n,a,l){let i=!a||l.route.id!==a.route.id,s=!n.hasOwnProperty(l.route.id);return i||s}function o2(n,a){let l=n.route.path;return n.pathname!==a.pathname||l!=null&&l.endsWith("*")&&n.params["*"]!==a.params["*"]}function pu(n,a){if(n.route.shouldRevalidate){let l=n.route.shouldRevalidate(a);if(typeof l=="boolean")return l}return a.defaultShouldRevalidate}function qv(n,a,l,i,s,u){let f;if(n){let m=i[n];Fe(m,`No route found to patch children into: routeId = ${n}`),m.children||(m.children=[]),f=m.children}else f=l;let d=[],p=[];if(a.forEach(m=>{let v=f.find(b=>m0(m,b));v?p.push({existingRoute:v,newRoute:m}):d.push(m)}),d.length>0){let m=vo(d,s,[n||"_","patch",String(f?.length||"0")],i);f.push(...m)}if(u&&p.length>0)for(let m=0;m<p.length;m++){let{existingRoute:v,newRoute:b}=p[m],S=v,[w]=vo([b],s,[],{},!0);Object.assign(S,{element:w.element?w.element:S.element,errorElement:w.errorElement?w.errorElement:S.errorElement,hydrateFallbackElement:w.hydrateFallbackElement?w.hydrateFallbackElement:S.hydrateFallbackElement})}}function m0(n,a){return"id"in n&&"id"in a&&n.id===a.id?!0:n.index===a.index&&n.path===a.path&&n.caseSensitive===a.caseSensitive?(!n.children||n.children.length===0)&&(!a.children||a.children.length===0)?!0:n.children.every((l,i)=>a.children?.some(s=>m0(l,s))):!1}var Kv=new WeakMap,p0=({key:n,route:a,manifest:l,mapRouteProperties:i})=>{let s=l[a.id];if(Fe(s,"No route found in manifest"),!s.lazy||typeof s.lazy!="object")return;let u=s.lazy[n];if(!u)return;let f=Kv.get(s);f||(f={},Kv.set(s,f));let d=f[n];if(d)return d;let p=(async()=>{let m=RE(n),b=s[n]!==void 0&&n!=="hasErrorBoundary";if(m)Et(!m,"Route property "+n+" is not a supported lazy route property. This property will be ignored."),f[n]=Promise.resolve();else if(b)Et(!1,`Route "${s.id}" has a static property "${n}" defined. The lazy property will be ignored.`);else{let S=await u();S!=null&&(Object.assign(s,{[n]:S}),Object.assign(s,i(s)))}typeof s.lazy=="object"&&(s.lazy[n]=void 0,Object.values(s.lazy).every(S=>S===void 0)&&(s.lazy=void 0))})();return f[n]=p,p},Gv=new WeakMap;function s2(n,a,l,i,s){let u=l[n.id];if(Fe(u,"No route found in manifest"),!n.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof n.lazy=="function"){let v=Gv.get(u);if(v)return{lazyRoutePromise:v,lazyHandlerPromise:v};let b=(async()=>{Fe(typeof n.lazy=="function","No lazy route function found");let S=await n.lazy(),w={};for(let _ in S){let C=S[_];if(C===void 0)continue;let j=OE(_),U=u[_]!==void 0&&_!=="hasErrorBoundary";j?Et(!j,"Route property "+_+" is not a supported property to be returned from a lazy route function. This property will be ignored."):U?Et(!U,`Route "${u.id}" has a static property "${_}" defined but its lazy function is also returning a value for this property. The lazy route property "${_}" will be ignored.`):w[_]=C}Object.assign(u,w),Object.assign(u,{...i(u),lazy:void 0})})();return Gv.set(u,b),b.catch(()=>{}),{lazyRoutePromise:b,lazyHandlerPromise:b}}let f=Object.keys(n.lazy),d=[],p;for(let v of f){if(s&&s.includes(v))continue;let b=p0({key:v,route:n,manifest:l,mapRouteProperties:i});b&&(d.push(b),v===a&&(p=b))}let m=d.length>0?Promise.all(d).then(()=>{}):void 0;return m?.catch(()=>{}),p?.catch(()=>{}),{lazyRoutePromise:m,lazyHandlerPromise:p}}async function Fv(n){let a=n.matches.filter(s=>s.shouldLoad),l={};return(await Promise.all(a.map(s=>s.resolve()))).forEach((s,u)=>{l[a[u].route.id]=s}),l}async function u2(n){return n.matches.some(a=>a.route.unstable_middleware)?g0(n,!1,()=>Fv(n),(a,l)=>({[l]:{type:"error",result:a}})):Fv(n)}async function g0(n,a,l,i){let{matches:s,request:u,params:f,context:d}=n,p={handlerResult:void 0};try{let m=s.flatMap(b=>b.route.unstable_middleware?b.route.unstable_middleware.map(S=>[b.route.id,S]):[]),v=await v0({request:u,params:f,context:d},m,a,p,l);return a?v:p.handlerResult}catch(m){if(!p.middlewareError)throw m;let v=await i(p.middlewareError.error,p.middlewareError.routeId);return p.handlerResult?Object.assign(p.handlerResult,v):v}}async function v0(n,a,l,i,s,u=0){let{request:f}=n;if(f.signal.aborted)throw f.signal.reason?f.signal.reason:new Error(`Request aborted without an \`AbortSignal.reason\`: ${f.method} ${f.url}`);let d=a[u];if(!d)return i.handlerResult=await s(),i.handlerResult;let[p,m]=d,v=!1,b,S=async()=>{if(v)throw new Error("You may only call `next()` once per middleware");v=!0,await v0(n,a,l,i,s,u+1)};try{let w=await m({request:n.request,params:n.params,context:n.context},S);return v?w===void 0?b:w:S()}catch(w){throw i.middlewareError?i.middlewareError.error!==w&&(i.middlewareError={routeId:p,error:w}):i.middlewareError={routeId:p,error:w},w}}function y0(n,a,l,i,s){let u=p0({key:"unstable_middleware",route:i.route,manifest:a,mapRouteProperties:n}),f=s2(i.route,Jt(l.method)?"action":"loader",a,n,s);return{middleware:u,route:f.lazyRoutePromise,handler:f.lazyHandlerPromise}}function zd(n,a,l,i,s,u,f,d=null){let p=!1,m=y0(n,a,l,i,s);return{...i,_lazyPromises:m,shouldLoad:f,unstable_shouldRevalidateArgs:d,unstable_shouldCallHandler(v){return p=!0,d?typeof v=="boolean"?pu(i,{...d,defaultShouldRevalidate:v}):pu(i,d):f},resolve(v){return p||f||v&&!Jt(l.method)&&(i.route.lazy||i.route.loader)?f2({request:l,match:i,lazyHandlerPromise:m?.handler,lazyRoutePromise:m?.route,handlerOverride:v,scopedContext:u}):Promise.resolve({type:"data",result:void 0})}}}function Gl(n,a,l,i,s,u,f,d=null){return i.map(p=>p.route.id!==s.route.id?{...p,shouldLoad:!1,unstable_shouldRevalidateArgs:d,unstable_shouldCallHandler:()=>!1,_lazyPromises:y0(n,a,l,p,u),resolve:()=>Promise.resolve({type:"data",result:void 0})}:zd(n,a,l,p,u,f,!0,d))}async function c2(n,a,l,i,s,u){l.some(m=>m._lazyPromises?.middleware)&&await Promise.all(l.map(m=>m._lazyPromises?.middleware));let f={request:a,params:l[0].params,context:s,matches:l},p=await n({...f,fetcherKey:i,unstable_runClientMiddleware:m=>{let v=f;return g0(v,!1,()=>m({...v,fetcherKey:i,unstable_runClientMiddleware:()=>{throw new Error("Cannot call `unstable_runClientMiddleware()` from within an `unstable_runClientMiddleware` handler")}}),(b,S)=>({[S]:{type:"error",result:b}}))}});try{await Promise.all(l.flatMap(m=>[m._lazyPromises?.handler,m._lazyPromises?.route]))}catch{}return p}async function f2({request:n,match:a,lazyHandlerPromise:l,lazyRoutePromise:i,handlerOverride:s,scopedContext:u}){let f,d,p=Jt(n.method),m=p?"action":"loader",v=b=>{let S,w=new Promise((j,N)=>S=N);d=()=>S(),n.signal.addEventListener("abort",d);let _=j=>typeof b!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${m}" [routeId: ${a.route.id}]`)):b({request:n,params:a.params,context:u},...j!==void 0?[j]:[]),C=(async()=>{try{return{type:"data",result:await(s?s(N=>_(N)):_())}}catch(j){return{type:"error",result:j}}})();return Promise.race([C,w])};try{let b=p?a.route.action:a.route.loader;if(l||i)if(b){let S,[w]=await Promise.all([v(b).catch(_=>{S=_}),l,i]);if(S!==void 0)throw S;f=w}else{await l;let S=p?a.route.action:a.route.loader;if(S)[f]=await Promise.all([v(S),i]);else if(m==="action"){let w=new URL(n.url),_=w.pathname+w.search;throw _n(405,{method:n.method,pathname:_,routeId:a.route.id})}else return{type:"data",result:void 0}}else if(b)f=await v(b);else{let S=new URL(n.url),w=S.pathname+S.search;throw _n(404,{pathname:w})}}catch(b){return{type:"error",result:b}}finally{d&&n.signal.removeEventListener("abort",d)}return f}async function d2(n){let{result:a,type:l}=n;if(x0(a)){let i;try{let s=a.headers.get("Content-Type");s&&/\bapplication\/json\b/.test(s)?a.body==null?i=null:i=await a.json():i=await a.text()}catch(s){return{type:"error",error:s}}return l==="error"?{type:"error",error:new Dd(a.status,a.statusText,i),statusCode:a.status,headers:a.headers}:{type:"data",data:i,statusCode:a.status,headers:a.headers}}return l==="error"?ey(a)?a.data instanceof Error?{type:"error",error:a.data,statusCode:a.init?.status,headers:a.init?.headers?new Headers(a.init.headers):void 0}:{type:"error",error:new Dd(a.init?.status||500,void 0,a.data),statusCode:yo(a)?a.status:void 0,headers:a.init?.headers?new Headers(a.init.headers):void 0}:{type:"error",error:a,statusCode:yo(a)?a.status:void 0}:ey(a)?{type:"data",data:a.data,statusCode:a.init?.status,headers:a.init?.headers?new Headers(a.init.headers):void 0}:{type:"data",data:a}}function h2(n,a,l,i,s){let u=n.headers.get("Location");if(Fe(u,"Redirects returned/thrown from loaders/actions must have a Location header"),!th(u)){let f=i.slice(0,i.findIndex(d=>d.route.id===l)+1);u=Ld(new URL(a.url),f,s,u),n.headers.set("Location",u)}return n}function Xv(n,a,l){if(th(n)){let i=n,s=i.startsWith("//")?new URL(a.protocol+i):new URL(i),u=Nn(s.pathname,l)!=null;if(s.origin===a.origin&&u)return s.pathname+s.search+s.hash}return n}function Vl(n,a,l,i){let s=n.createURL(b0(a)).toString(),u={signal:l};if(i&&Jt(i.formMethod)){let{formMethod:f,formEncType:d}=i;u.method=f.toUpperCase(),d==="application/json"?(u.headers=new Headers({"Content-Type":d}),u.body=JSON.stringify(i.json)):d==="text/plain"?u.body=i.text:d==="application/x-www-form-urlencoded"&&i.formData?u.body=Ud(i.formData):u.body=i.formData}return new Request(s,u)}function Ud(n){let a=new URLSearchParams;for(let[l,i]of n.entries())a.append(l,typeof i=="string"?i:i.name);return a}function Qv(n){let a=new FormData;for(let[l,i]of n.entries())a.append(l,i);return a}function m2(n,a,l,i=!1,s=!1){let u={},f=null,d,p=!1,m={},v=l&&un(l[1])?l[1].error:void 0;return n.forEach(b=>{if(!(b.route.id in a))return;let S=b.route.id,w=a[S];if(Fe(!Br(w),"Cannot handle redirect results in processLoaderData"),un(w)){let _=w.error;if(v!==void 0&&(_=v,v=void 0),f=f||{},s)f[S]=_;else{let C=Pr(n,S);f[C.route.id]==null&&(f[C.route.id]=_)}i||(u[S]=h0),p||(p=!0,d=yo(w.error)?w.error.status:500),w.headers&&(m[S]=w.headers)}else u[S]=w.data,w.statusCode&&w.statusCode!==200&&!p&&(d=w.statusCode),w.headers&&(m[S]=w.headers)}),v!==void 0&&l&&(f={[l[0]]:v},l[2]&&(u[l[2]]=void 0)),{loaderData:u,errors:f,statusCode:d||200,loaderHeaders:m}}function Zv(n,a,l,i,s,u){let{loaderData:f,errors:d}=m2(a,l,i);return s.filter(p=>!p.matches||p.matches.some(m=>m.shouldLoad)).forEach(p=>{let{key:m,match:v,controller:b}=p,S=u[m];if(Fe(S,"Did not find corresponding fetcher result"),!(b&&b.signal.aborted))if(un(S)){let w=Pr(n.matches,v?.route.id);d&&d[w.route.id]||(d={...d,[w.route.id]:S.error}),n.fetchers.delete(m)}else if(Br(S))Fe(!1,"Unhandled fetcher revalidation redirect");else{let w=Wa(S.data);n.fetchers.set(m,w)}}),{loaderData:f,errors:d}}function Iv(n,a,l,i){let s=Object.entries(a).filter(([,u])=>u!==h0).reduce((u,[f,d])=>(u[f]=d,u),{});for(let u of l){let f=u.route.id;if(!a.hasOwnProperty(f)&&n.hasOwnProperty(f)&&u.route.loader&&(s[f]=n[f]),i&&i.hasOwnProperty(f))break}return s}function Jv(n){return n?un(n[1])?{actionData:{}}:{actionData:{[n[0]]:n[1].data}}:{}}function Pr(n,a){return(a?n.slice(0,n.findIndex(i=>i.route.id===a)+1):[...n]).reverse().find(i=>i.route.hasErrorBoundary===!0)||n[0]}function Wv(n){let a=n.length===1?n[0]:n.find(l=>l.index||!l.path||l.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:a}],route:a}}function _n(n,{pathname:a,routeId:l,method:i,type:s,message:u}={}){let f="Unknown Server Error",d="Unknown @remix-run/router error";return n===400?(f="Bad Request",i&&a&&l?d=`You made a ${i} request to "${a}" but did not provide a \`loader\` for route "${l}", so there is no way to handle the request.`:s==="invalid-body"&&(d="Unable to encode submission body")):n===403?(f="Forbidden",d=`Route "${l}" does not match URL "${a}"`):n===404?(f="Not Found",d=`No route matches URL "${a}"`):n===405&&(f="Method Not Allowed",i&&a&&l?d=`You made a ${i.toUpperCase()} request to "${a}" but did not provide an \`action\` for route "${l}", so there is no way to handle the request.`:i&&(d=`Invalid request method "${i.toUpperCase()}"`)),new Dd(n||500,f,new Error(d),!0)}function Ks(n){let a=Object.entries(n);for(let l=a.length-1;l>=0;l--){let[i,s]=a[l];if(Br(s))return{key:i,result:s}}}function b0(n){let a=typeof n=="string"?Na(n):n;return ar({...a,hash:""})}function p2(n,a){return n.pathname!==a.pathname||n.search!==a.search?!1:n.hash===""?a.hash!=="":n.hash===a.hash?!0:a.hash!==""}function g2(n){return x0(n.result)&&WE.has(n.result.status)}function un(n){return n.type==="error"}function Br(n){return(n&&n.type)==="redirect"}function ey(n){return typeof n=="object"&&n!=null&&"type"in n&&"data"in n&&"init"in n&&n.type==="DataWithResponseInit"}function x0(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.headers=="object"&&typeof n.body<"u"}function v2(n){return JE.has(n.toUpperCase())}function Jt(n){return ZE.has(n.toUpperCase())}function nh(n){return new URLSearchParams(n).getAll("index").some(a=>a==="")}function lu(n,a){let l=typeof a=="string"?Na(a).search:a.search;if(n[n.length-1].route.index&&nh(l||""))return n[n.length-1];let i=c0(n);return i[i.length-1]}function ty(n){let{formMethod:a,formAction:l,formEncType:i,text:s,formData:u,json:f}=n;if(!(!a||!l||!i)){if(s!=null)return{formMethod:a,formAction:l,formEncType:i,formData:void 0,json:void 0,text:s};if(u!=null)return{formMethod:a,formAction:l,formEncType:i,formData:u,json:void 0,text:void 0};if(f!==void 0)return{formMethod:a,formAction:l,formEncType:i,formData:void 0,json:f,text:void 0}}}function ud(n,a){return a?{state:"loading",location:n,formMethod:a.formMethod,formAction:a.formAction,formEncType:a.formEncType,formData:a.formData,json:a.json,text:a.text}:{state:"loading",location:n,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function y2(n,a){return{state:"submitting",location:n,formMethod:a.formMethod,formAction:a.formAction,formEncType:a.formEncType,formData:a.formData,json:a.json,text:a.text}}function lo(n,a){return n?{state:"loading",formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text,data:a}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:a}}function b2(n,a){return{state:"submitting",formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text,data:a?a.data:void 0}}function Wa(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 x2(n,a){try{let l=n.sessionStorage.getItem(d0);if(l){let i=JSON.parse(l);for(let[s,u]of Object.entries(i||{}))u&&Array.isArray(u)&&a.set(s,new Set(u||[]))}}catch{}}function w2(n,a){if(a.size>0){let l={};for(let[i,s]of a)l[i]=[...s];try{n.sessionStorage.setItem(d0,JSON.stringify(l))}catch(i){Et(!1,`Failed to save applied view transitions in sessionStorage (${i}).`)}}}function S2(){let n,a,l=new Promise((i,s)=>{n=async u=>{i(u);try{await l}catch{}},a=async u=>{s(u);try{await l}catch{}}});return{promise:l,resolve:n,reject:a}}var Qr=y.createContext(null);Qr.displayName="DataRouter";var Eo=y.createContext(null);Eo.displayName="DataRouterState";y.createContext(!1);var ah=y.createContext({isTransitioning:!1});ah.displayName="ViewTransition";var w0=y.createContext(new Map);w0.displayName="Fetchers";var E2=y.createContext(null);E2.displayName="Await";var kn=y.createContext(null);kn.displayName="Navigation";var ju=y.createContext(null);ju.displayName="Location";var Jn=y.createContext({outlet:null,matches:[],isDataRoute:!1});Jn.displayName="Route";var rh=y.createContext(null);rh.displayName="RouteError";function C2(n,{relative:a}={}){Fe(Wl(),"useHref() may be used only in the context of a <Router> component.");let{basename:l,navigator:i}=y.useContext(kn),{hash:s,pathname:u,search:f}=Co(n,{relative:a}),d=u;return l!=="/"&&(d=u==="/"?l:Xn([l,u])),i.createHref({pathname:d,search:f,hash:s})}function Wl(){return y.useContext(ju)!=null}function dr(){return Fe(Wl(),"useLocation() may be used only in the context of a <Router> component."),y.useContext(ju).location}var S0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function E0(n){y.useContext(kn).static||y.useLayoutEffect(n)}function Ou(){let{isDataRoute:n}=y.useContext(Jn);return n?U2():_2()}function _2(){Fe(Wl(),"useNavigate() may be used only in the context of a <Router> component.");let n=y.useContext(Qr),{basename:a,navigator:l}=y.useContext(kn),{matches:i}=y.useContext(Jn),{pathname:s}=dr(),u=JSON.stringify(Nu(i)),f=y.useRef(!1);return E0(()=>{f.current=!0}),y.useCallback((p,m={})=>{if(Et(f.current,S0),!f.current)return;if(typeof p=="number"){l.go(p);return}let v=Ru(p,JSON.parse(u),s,m.relative==="path");n==null&&a!=="/"&&(v.pathname=v.pathname==="/"?a:Xn([a,v.pathname])),(m.replace?l.replace:l.push)(v,m.state,m)},[a,l,u,s,n])}y.createContext(null);function Co(n,{relative:a}={}){let{matches:l}=y.useContext(Jn),{pathname:i}=dr(),s=JSON.stringify(Nu(l));return y.useMemo(()=>Ru(n,JSON.parse(s),i,a==="path"),[n,s,i,a])}function N2(n,a,l,i){Fe(Wl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=y.useContext(kn),{matches:u}=y.useContext(Jn),f=u[u.length-1],d=f?f.params:{},p=f?f.pathname:"/",m=f?f.pathnameBase:"/",v=f&&f.route;{let N=v&&v.path||"";C0(p,!v||N.endsWith("*")||N.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${N}">) 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.
|
|
64
|
+
*/var l0=n=>{throw TypeError(n)},xE=(n,a,l)=>a.has(n)||l0("Cannot "+l),rd=(n,a,l)=>(xE(n,a,"read from private field"),l?l.call(n):a.get(n)),wE=(n,a,l)=>a.has(n)?l0("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(n):a.set(n,l);function SE(n={}){let{initialEntries:a=["/"],initialIndex:l,v5Compat:i=!1}=n,s;s=a.map((S,C)=>v(S,typeof S=="string"?null:S.state,C===0?"default":void 0));let u=p(l??s.length-1),f="POP",d=null;function p(S){return Math.min(Math.max(S,0),s.length-1)}function m(){return s[u]}function v(S,C=null,_){let j=Td(s?m().pathname:"/",S,C,_);return _t(j.pathname.charAt(0)==="/",`relative pathnames are not supported in memory history: ${JSON.stringify(S)}`),j}function b(S){return typeof S=="string"?S:lr(S)}return{get index(){return u},get action(){return f},get location(){return m()},createHref:b,createURL(S){return new URL(b(S),"http://localhost")},encodeLocation(S){let C=typeof S=="string"?Oa(S):S;return{pathname:C.pathname||"",search:C.search||"",hash:C.hash||""}},push(S,C){f="PUSH";let _=v(S,C);u+=1,s.splice(u,s.length,_),i&&d&&d({action:f,location:_,delta:1})},replace(S,C){f="REPLACE";let _=v(S,C);s[u]=_,i&&d&&d({action:f,location:_,delta:0})},go(S){f="POP";let C=p(u+S),_=s[C];u=C,d&&d({action:f,location:_,delta:S})},listen(S){return d=S,()=>{d=null}}}}function Ge(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}function _t(n,a){if(!n){typeof console<"u"&&console.warn(a);try{throw new Error(a)}catch{}}}function EE(){return Math.random().toString(36).substring(2,10)}function Td(n,a,l=null,i){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof a=="string"?Oa(a):a,state:l,key:a&&a.key||i||EE()}}function lr({pathname:n="/",search:a="",hash:l=""}){return a&&a!=="?"&&(n+=a.charAt(0)==="?"?a:"?"+a),l&&l!=="#"&&(n+=l.charAt(0)==="#"?l:"#"+l),n}function Oa(n){let a={};if(n){let l=n.indexOf("#");l>=0&&(a.hash=n.substring(l),n=n.substring(0,l));let i=n.indexOf("?");i>=0&&(a.search=n.substring(i),n=n.substring(0,i)),n&&(a.pathname=n)}return a}function _E(n,a=!1){let l="http://localhost";typeof window<"u"&&(l=window.location.origin!=="null"?window.location.origin:window.location.href),Ge(l,"No window.location.(origin|href) available to create URL");let i=typeof n=="string"?n:lr(n);return i=i.replace(/ $/,"%20"),!a&&i.startsWith("//")&&(i=l+i),new URL(i,l)}var uo,Hv=class{constructor(n){if(wE(this,uo,new Map),n)for(let[a,l]of n)this.set(a,l)}get(n){if(rd(this,uo).has(n))return rd(this,uo).get(n);if(n.defaultValue!==void 0)return n.defaultValue;throw new Error("No value found for context")}set(n,a){rd(this,uo).set(n,a)}};uo=new WeakMap;var CE=new Set(["lazy","caseSensitive","path","id","index","children"]);function NE(n){return CE.has(n)}var RE=new Set(["lazy","caseSensitive","path","id","index","unstable_middleware","children"]);function jE(n){return RE.has(n)}function OE(n){return n.index===!0}function vo(n,a,l=[],i={},s=!1){return n.map((u,f)=>{let d=[...l,String(f)],p=typeof u.id=="string"?u.id:d.join("-");if(Ge(u.index!==!0||!u.children,"Cannot specify children on an index route"),Ge(s||!i[p],`Found a route id collision on id "${p}". Route id's must be globally unique within Data Router usages`),OE(u)){let m={...u,...a(u),id:p};return i[p]=m,m}else{let m={...u,...a(u),id:p,children:void 0};return i[p]=m,u.children&&(m.children=vo(u.children,a,d,i,s)),m}})}function ar(n,a,l="/"){return ru(n,a,l,!1)}function ru(n,a,l,i){let s=typeof a=="string"?Oa(a):a,u=An(s.pathname||"/",l);if(u==null)return null;let f=i0(n);TE(f);let d=null;for(let p=0;d==null&&p<f.length;++p){let m=VE(u);d=BE(f[p],m,i)}return d}function AE(n,a){let{route:l,pathname:i,params:s}=n;return{id:l.id,pathname:i,params:s,data:a[l.id],handle:l.handle}}function i0(n,a=[],l=[],i=""){let s=(u,f,d)=>{let p={relativePath:d===void 0?u.path||"":d,caseSensitive:u.caseSensitive===!0,childrenIndex:f,route:u};p.relativePath.startsWith("/")&&(Ge(p.relativePath.startsWith(i),`Absolute route path "${p.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),p.relativePath=p.relativePath.slice(i.length));let m=Jn([i,p.relativePath]),v=l.concat(p);u.children&&u.children.length>0&&(Ge(u.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${m}".`),i0(u.children,a,v,m)),!(u.path==null&&!u.index)&&a.push({path:m,score:PE(m,u.index),routesMeta:v})};return n.forEach((u,f)=>{if(u.path===""||!u.path?.includes("?"))s(u,f);else for(let d of o0(u.path))s(u,f,d)}),a}function o0(n){let a=n.split("/");if(a.length===0)return[];let[l,...i]=a,s=l.endsWith("?"),u=l.replace(/\?$/,"");if(i.length===0)return s?[u,""]:[u];let f=o0(i.join("/")),d=[];return d.push(...f.map(p=>p===""?u:[u,p].join("/"))),s&&d.push(...f),d.map(p=>n.startsWith("/")&&p===""?"/":p)}function TE(n){n.sort((a,l)=>a.score!==l.score?l.score-a.score:HE(a.routesMeta.map(i=>i.childrenIndex),l.routesMeta.map(i=>i.childrenIndex)))}var ME=/^:[\w-]+$/,DE=3,LE=2,kE=1,zE=10,UE=-2,Bv=n=>n==="*";function PE(n,a){let l=n.split("/"),i=l.length;return l.some(Bv)&&(i+=UE),a&&(i+=LE),l.filter(s=>!Bv(s)).reduce((s,u)=>s+(ME.test(u)?DE:u===""?kE:zE),i)}function HE(n,a){return n.length===a.length&&n.slice(0,-1).every((i,s)=>i===a[s])?n[n.length-1]-a[a.length-1]:0}function BE(n,a,l=!1){let{routesMeta:i}=n,s={},u="/",f=[];for(let d=0;d<i.length;++d){let p=i[d],m=d===i.length-1,v=u==="/"?a:a.slice(u.length)||"/",b=mu({path:p.relativePath,caseSensitive:p.caseSensitive,end:m},v),w=p.route;if(!b&&m&&l&&!i[i.length-1].route.index&&(b=mu({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},v)),!b)return null;Object.assign(s,b.params),f.push({params:s,pathname:Jn([u,b.pathname]),pathnameBase:KE(Jn([u,b.pathnameBase])),route:w}),b.pathnameBase!=="/"&&(u=Jn([u,b.pathnameBase]))}return f}function mu(n,a){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[l,i]=$E(n.path,n.caseSensitive,n.end),s=a.match(l);if(!s)return null;let u=s[0],f=u.replace(/(.)\/+$/,"$1"),d=s.slice(1);return{params:i.reduce((m,{paramName:v,isOptional:b},w)=>{if(v==="*"){let C=d[w]||"";f=u.slice(0,u.length-C.length).replace(/(.)\/+$/,"$1")}const S=d[w];return b&&!S?m[v]=void 0:m[v]=(S||"").replace(/%2F/g,"/"),m},{}),pathname:u,pathnameBase:f,pattern:n}}function $E(n,a=!1,l=!0){_t(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 i=[],s="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(f,d,p)=>(i.push({paramName:d,isOptional:p!=null}),p?"/?([^\\/]+)?":"/([^\\/]+)"));return n.endsWith("*")?(i.push({paramName:"*"}),s+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):l?s+="\\/*$":n!==""&&n!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,a?void 0:"i"),i]}function VE(n){try{return n.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return _t(!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 (${a}).`),n}}function An(n,a){if(a==="/")return n;if(!n.toLowerCase().startsWith(a.toLowerCase()))return null;let l=a.endsWith("/")?a.length-1:a.length,i=n.charAt(l);return i&&i!=="/"?null:n.slice(l)||"/"}function YE({basename:n,pathname:a}){return a==="/"?n:Jn([n,a])}function qE(n,a="/"){let{pathname:l,search:i="",hash:s=""}=typeof n=="string"?Oa(n):n;return{pathname:l?l.startsWith("/")?l:FE(l,a):a,search:GE(i),hash:XE(s)}}function FE(n,a){let l=a.replace(/\/+$/,"").split("/");return n.split("/").forEach(s=>{s===".."?l.length>1&&l.pop():s!=="."&&l.push(s)}),l.length>1?l.join("/"):"/"}function ld(n,a,l,i){return`Cannot include a '${n}' character in a manually specified \`to.${a}\` field [${JSON.stringify(i)}]. Please separate it out to the \`to.${l}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function s0(n){return n.filter((a,l)=>l===0||a.route.path&&a.route.path.length>0)}function _u(n){let a=s0(n);return a.map((l,i)=>i===a.length-1?l.pathname:l.pathnameBase)}function Cu(n,a,l,i=!1){let s;typeof n=="string"?s=Oa(n):(s={...n},Ge(!s.pathname||!s.pathname.includes("?"),ld("?","pathname","search",s)),Ge(!s.pathname||!s.pathname.includes("#"),ld("#","pathname","hash",s)),Ge(!s.search||!s.search.includes("#"),ld("#","search","hash",s)));let u=n===""||s.pathname==="",f=u?"/":s.pathname,d;if(f==null)d=l;else{let b=a.length-1;if(!i&&f.startsWith("..")){let w=f.split("/");for(;w[0]==="..";)w.shift(),b-=1;s.pathname=w.join("/")}d=b>=0?a[b]:"/"}let p=qE(s,d),m=f&&f!=="/"&&f.endsWith("/"),v=(u||f===".")&&l.endsWith("/");return!p.pathname.endsWith("/")&&(m||v)&&(p.pathname+="/"),p}var Jn=n=>n.join("/").replace(/\/\/+/g,"/"),KE=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),GE=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,XE=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,Md=class{constructor(n,a,l,i=!1){this.status=n,this.statusText=a||"",this.internal=i,l instanceof Error?(this.data=l.toString(),this.error=l):this.data=l}};function yo(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}var u0=["POST","PUT","PATCH","DELETE"],QE=new Set(u0),ZE=["GET",...u0],IE=new Set(ZE),JE=new Set([301,302,303,307,308]),WE=new Set([307,308]),id={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},e2={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ro={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},t2=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,eh=n=>t2.test(n),n2=n=>({hasErrorBoundary:!!n.hasErrorBoundary}),c0="remix-router-transitions",f0=Symbol("ResetLoaderData");function a2(n){const a=n.window?n.window:typeof window<"u"?window:void 0,l=typeof a<"u"&&typeof a.document<"u"&&typeof a.document.createElement<"u";Ge(n.routes.length>0,"You must provide a non-empty routes array to createRouter");let i=n.hydrationRouteProperties||[],s=n.mapRouteProperties||n2,u={},f=vo(n.routes,s,void 0,u),d,p=n.basename||"/",m=n.dataStrategy||s2,v={unstable_middleware:!1,...n.future},b=null,w=new Set,S=null,C=null,_=null,j=n.hydrationData!=null,N=ar(f,n.history.location,p),z=!1,k=null,H;if(N==null&&!n.patchRoutesOnNavigation){let M=On(404,{pathname:n.history.location.pathname}),{matches:$,route:I}=Jv(f);H=!0,N=$,k={[I.id]:M}}else if(N&&!n.hydrationData&&xr(N,f,n.history.location.pathname).active&&(N=null),N)if(N.some(M=>M.route.lazy))H=!1;else if(!N.some(M=>M.route.loader))H=!0;else{let M=n.hydrationData?n.hydrationData.loaderData:null,$=n.hydrationData?n.hydrationData.errors:null;if($){let I=N.findIndex(ce=>$[ce.route.id]!==void 0);H=N.slice(0,I+1).every(ce=>!Ld(ce.route,M,$))}else H=N.every(I=>!Ld(I.route,M,$))}else{H=!1,N=[];let M=xr(null,f,n.history.location.pathname);M.active&&M.matches&&(z=!0,N=M.matches)}let D,R={historyAction:n.history.action,location:n.history.location,matches:N,initialized:H,navigation:id,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||k,fetchers:new Map,blockers:new Map},B="POP",Z=!1,ne,oe=!1,le=new Map,J=null,te=!1,W=!1,ue=new Set,A=new Map,Q=0,V=-1,ve=new Map,O=new Set,F=new Map,U=new Map,K=new Set,ae=new Map,de,ge=null;function ye(){if(b=n.history.listen(({action:M,location:$,delta:I})=>{if(de){de(),de=void 0;return}_t(ae.size===0||I!=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 ce=To({currentLocation:R.location,nextLocation:$,historyAction:M});if(ce&&I!=null){let me=new Promise(Se=>{de=Se});n.history.go(I*-1),Vn(ce,{state:"blocked",location:$,proceed(){Vn(ce,{state:"proceeding",proceed:void 0,reset:void 0,location:$}),me.then(()=>n.history.go(I))},reset(){let Se=new Map(R.blockers);Se.set(ce,ro),Je({blockers:Se})}});return}return ie(M,$)}),l){b2(a,le);let M=()=>x2(a,le);a.addEventListener("pagehide",M),J=()=>a.removeEventListener("pagehide",M)}return R.initialized||ie("POP",R.location,{initialHydration:!0}),D}function Le(){b&&b(),J&&J(),w.clear(),ne&&ne.abort(),R.fetchers.forEach((M,$)=>Pt($)),R.blockers.forEach((M,$)=>yr($))}function qe(M){return w.add(M),()=>w.delete(M)}function Je(M,$={}){M.matches&&(M.matches=M.matches.map(me=>{let Se=u[me.route.id],Ce=me.route;return Ce.element!==Se.element||Ce.errorElement!==Se.errorElement||Ce.hydrateFallbackElement!==Se.hydrateFallbackElement?{...me,route:Se}:me})),R={...R,...M};let I=[],ce=[];R.fetchers.forEach((me,Se)=>{me.state==="idle"&&(K.has(Se)?I.push(Se):ce.push(Se))}),K.forEach(me=>{!R.fetchers.has(me)&&!A.has(me)&&I.push(me)}),[...w].forEach(me=>me(R,{deletedFetchers:I,viewTransitionOpts:$.viewTransitionOpts,flushSync:$.flushSync===!0})),I.forEach(me=>Pt(me)),ce.forEach(me=>R.fetchers.delete(me))}function At(M,$,{flushSync:I}={}){let ce=R.actionData!=null&&R.navigation.formMethod!=null&&tn(R.navigation.formMethod)&&R.navigation.state==="loading"&&M.state?._isRedirect!==!0,me;$.actionData?Object.keys($.actionData).length>0?me=$.actionData:me=null:ce?me=R.actionData:me=null;let Se=$.loaderData?Zv(R.loaderData,$.loaderData,$.matches||[],$.errors):R.loaderData,Ce=R.blockers;Ce.size>0&&(Ce=new Map(Ce),Ce.forEach((_e,Ne)=>Ce.set(Ne,ro)));let Ee=te?!1:Do(M,$.matches||R.matches),Oe=Z===!0||R.navigation.formMethod!=null&&tn(R.navigation.formMethod)&&M.state?._isRedirect!==!0;d&&(f=d,d=void 0),te||B==="POP"||(B==="PUSH"?n.history.push(M,M.state):B==="REPLACE"&&n.history.replace(M,M.state));let Te;if(B==="POP"){let _e=le.get(R.location.pathname);_e&&_e.has(M.pathname)?Te={currentLocation:R.location,nextLocation:M}:le.has(M.pathname)&&(Te={currentLocation:M,nextLocation:R.location})}else if(oe){let _e=le.get(R.location.pathname);_e?_e.add(M.pathname):(_e=new Set([M.pathname]),le.set(R.location.pathname,_e)),Te={currentLocation:R.location,nextLocation:M}}Je({...$,actionData:me,loaderData:Se,historyAction:B,location:M,initialized:!0,navigation:id,revalidation:"idle",restoreScrollPosition:Ee,preventScrollReset:Oe,blockers:Ce},{viewTransitionOpts:Te,flushSync:I===!0}),B="POP",Z=!1,oe=!1,te=!1,W=!1,ge?.resolve(),ge=null}async function Ze(M,$){if(typeof M=="number"){n.history.go(M);return}let I=Dd(R.location,R.matches,p,M,$?.fromRouteId,$?.relative),{path:ce,submission:me,error:Se}=$v(!1,I,$),Ce=R.location,Ee=Td(R.location,ce,$&&$.state);Ee={...Ee,...n.history.encodeLocation(Ee)};let Oe=$&&$.replace!=null?$.replace:void 0,Te="PUSH";Oe===!0?Te="REPLACE":Oe===!1||me!=null&&tn(me.formMethod)&&me.formAction===R.location.pathname+R.location.search&&(Te="REPLACE");let _e=$&&"preventScrollReset"in $?$.preventScrollReset===!0:void 0,Ne=($&&$.flushSync)===!0,$e=To({currentLocation:Ce,nextLocation:Ee,historyAction:Te});if($e){Vn($e,{state:"blocked",location:Ee,proceed(){Vn($e,{state:"proceeding",proceed:void 0,reset:void 0,location:Ee}),Ze(M,$)},reset(){let at=new Map(R.blockers);at.set($e,ro),Je({blockers:at})}});return}await ie(Te,Ee,{submission:me,pendingError:Se,preventScrollReset:_e,replace:$&&$.replace,enableViewTransition:$&&$.viewTransition,flushSync:Ne})}function an(){ge||(ge=w2()),ii(),Je({revalidation:"loading"});let M=ge.promise;return R.navigation.state==="submitting"?M:R.navigation.state==="idle"?(ie(R.historyAction,R.location,{startUninterruptedRevalidation:!0}),M):(ie(B||R.historyAction,R.navigation.location,{overrideNavigation:R.navigation,enableViewTransition:oe===!0}),M)}async function ie(M,$,I){ne&&ne.abort(),ne=null,B=M,te=(I&&I.startUninterruptedRevalidation)===!0,br(R.location,R.matches),Z=(I&&I.preventScrollReset)===!0,oe=(I&&I.enableViewTransition)===!0;let ce=d||f,me=I&&I.overrideNavigation,Se=I?.initialHydration&&R.matches&&R.matches.length>0&&!z?R.matches:ar(ce,$,p),Ce=(I&&I.flushSync)===!0;if(Se&&R.initialized&&!W&&m2(R.location,$)&&!(I&&I.submission&&tn(I.submission.formMethod))){At($,{matches:Se},{flushSync:Ce});return}let Ee=xr(Se,ce,$.pathname);if(Ee.active&&Ee.matches&&(Se=Ee.matches),!Se){let{error:wt,notFoundMatches:He,route:it}=Wr($.pathname);At($,{matches:He,loaderData:{},errors:{[it.id]:wt}},{flushSync:Ce});return}ne=new AbortController;let Oe=Vl(n.history,$,ne.signal,I&&I.submission),Te=new Hv(n.unstable_getContext?await n.unstable_getContext():void 0),_e;if(I&&I.pendingError)_e=[Br(Se).route.id,{type:"error",error:I.pendingError}];else if(I&&I.submission&&tn(I.submission.formMethod)){let wt=await fe(Oe,$,I.submission,Se,Te,Ee.active,I&&I.initialHydration===!0,{replace:I.replace,flushSync:Ce});if(wt.shortCircuited)return;if(wt.pendingActionResult){let[He,it]=wt.pendingActionResult;if(hn(it)&&yo(it.error)&&it.error.status===404){ne=null,At($,{matches:wt.matches,loaderData:{},errors:{[He]:it.error}});return}}Se=wt.matches||Se,_e=wt.pendingActionResult,me=od($,I.submission),Ce=!1,Ee.active=!1,Oe=Vl(n.history,Oe.url,Oe.signal)}let{shortCircuited:Ne,matches:$e,loaderData:at,errors:xt}=await pe(Oe,$,Se,Te,Ee.active,me,I&&I.submission,I&&I.fetcherSubmission,I&&I.replace,I&&I.initialHydration===!0,Ce,_e);Ne||(ne=null,At($,{matches:$e||Se,...Iv(_e),loaderData:at,errors:xt}))}async function fe(M,$,I,ce,me,Se,Ce,Ee={}){ii();let Oe=v2($,I);if(Je({navigation:Oe},{flushSync:Ee.flushSync===!0}),Se){let Ne=await wr(ce,$.pathname,M.signal);if(Ne.type==="aborted")return{shortCircuited:!0};if(Ne.type==="error"){let $e=Br(Ne.partialMatches).route.id;return{matches:Ne.partialMatches,pendingActionResult:[$e,{type:"error",error:Ne.error}]}}else if(Ne.matches)ce=Ne.matches;else{let{notFoundMatches:$e,error:at,route:xt}=Wr($.pathname);return{matches:$e,pendingActionResult:[xt.id,{type:"error",error:at}]}}}let Te,_e=lu(ce,$);if(!_e.route.action&&!_e.route.lazy)Te={type:"error",error:On(405,{method:M.method,pathname:$.pathname,routeId:_e.route.id})};else{let Ne=Kl(s,u,M,ce,_e,Ce?[]:i,me),$e=await Bn(M,Ne,me,null);if(Te=$e[_e.route.id],!Te){for(let at of ce)if($e[at.route.id]){Te=$e[at.route.id];break}}if(M.signal.aborted)return{shortCircuited:!0}}if(Vr(Te)){let Ne;return Ee&&Ee.replace!=null?Ne=Ee.replace:Ne=Gv(Te.response.headers.get("Location"),new URL(M.url),p)===R.location.pathname+R.location.search,await Yt(M,Te,!0,{submission:I,replace:Ne}),{shortCircuited:!0}}if(hn(Te)){let Ne=Br(ce,_e.route.id);return(Ee&&Ee.replace)!==!0&&(B="PUSH"),{matches:ce,pendingActionResult:[Ne.route.id,Te,_e.route.id]}}return{matches:ce,pendingActionResult:[_e.route.id,Te]}}async function pe(M,$,I,ce,me,Se,Ce,Ee,Oe,Te,_e,Ne){let $e=Se||od($,Ce),at=Ce||Ee||ey($e),xt=!te&&!Te;if(me){if(xt){let Rt=he(Ne);Je({navigation:$e,...Rt!==void 0?{actionData:Rt}:{}},{flushSync:_e})}let Fe=await wr(I,$.pathname,M.signal);if(Fe.type==="aborted")return{shortCircuited:!0};if(Fe.type==="error"){let Rt=Br(Fe.partialMatches).route.id;return{matches:Fe.partialMatches,loaderData:{},errors:{[Rt]:Fe.error}}}else if(Fe.matches)I=Fe.matches;else{let{error:Rt,notFoundMatches:Sr,route:bn}=Wr($.pathname);return{matches:Sr,loaderData:{},errors:{[bn.id]:Rt}}}}let wt=d||f,{dsMatches:He,revalidatingFetchers:it}=Vv(M,ce,s,u,n.history,R,I,at,$,Te?[]:i,Te===!0,W,ue,K,F,O,wt,p,n.patchRoutesOnNavigation!=null,Ne);if(V=++Q,!n.dataStrategy&&!He.some(Fe=>Fe.shouldLoad)&&it.length===0){let Fe=gr();return At($,{matches:I,loaderData:{},errors:Ne&&hn(Ne[1])?{[Ne[0]]:Ne[1].error}:null,...Iv(Ne),...Fe?{fetchers:new Map(R.fetchers)}:{}},{flushSync:_e}),{shortCircuited:!0}}if(xt){let Fe={};if(!me){Fe.navigation=$e;let Rt=he(Ne);Rt!==void 0&&(Fe.actionData=Rt)}it.length>0&&(Fe.fetchers=je(it)),Je(Fe,{flushSync:_e})}it.forEach(Fe=>{$n(Fe.key),Fe.controller&&A.set(Fe.key,Fe.controller)});let Yn=()=>it.forEach(Fe=>$n(Fe.key));ne&&ne.signal.addEventListener("abort",Yn);let{loaderResults:rn,fetcherResults:Gt}=await Oo(He,it,M,ce);if(M.signal.aborted)return{shortCircuited:!0};ne&&ne.signal.removeEventListener("abort",Yn),it.forEach(Fe=>A.delete(Fe.key));let yn=Fs(rn);if(yn)return await Yt(M,yn.result,!0,{replace:Oe}),{shortCircuited:!0};if(yn=Fs(Gt),yn)return O.add(yn.key),await Yt(M,yn.result,!0,{replace:Oe}),{shortCircuited:!0};let{loaderData:tl,errors:Aa}=Qv(R,I,rn,Ne,it,Gt);Te&&R.errors&&(Aa={...R.errors,...Aa});let la=gr(),ia=vr(V),oa=la||ia||it.length>0;return{matches:I,loaderData:tl,errors:Aa,...oa?{fetchers:new Map(R.fetchers)}:{}}}function he(M){if(M&&!hn(M[1]))return{[M[0]]:M[1].data};if(R.actionData)return Object.keys(R.actionData).length===0?null:R.actionData}function je(M){return M.forEach($=>{let I=R.fetchers.get($.key),ce=lo(void 0,I?I.data:void 0);R.fetchers.set($.key,ce)}),new Map(R.fetchers)}async function ke(M,$,I,ce){$n(M);let me=(ce&&ce.flushSync)===!0,Se=d||f,Ce=Dd(R.location,R.matches,p,I,$,ce?.relative),Ee=ar(Se,Ce,p),Oe=xr(Ee,Se,Ce);if(Oe.active&&Oe.matches&&(Ee=Oe.matches),!Ee){vt(M,$,On(404,{pathname:Ce}),{flushSync:me});return}let{path:Te,submission:_e,error:Ne}=$v(!0,Ce,ce);if(Ne){vt(M,$,Ne,{flushSync:me});return}let $e=new Hv(n.unstable_getContext?await n.unstable_getContext():void 0),at=(ce&&ce.preventScrollReset)===!0;if(_e&&tn(_e.formMethod)){await Pe(M,$,Te,Ee,$e,Oe.active,me,at,_e);return}F.set(M,{routeId:$,path:Te}),await nt(M,$,Te,Ee,$e,Oe.active,me,at,_e)}async function Pe(M,$,I,ce,me,Se,Ce,Ee,Oe){ii(),F.delete(M);let Te=R.fetchers.get(M);Zt(M,y2(Oe,Te),{flushSync:Ce});let _e=new AbortController,Ne=Vl(n.history,I,_e.signal,Oe);if(Se){let yt=await wr(ce,new URL(Ne.url).pathname,Ne.signal,M);if(yt.type==="aborted")return;if(yt.type==="error"){vt(M,$,yt.error,{flushSync:Ce});return}else if(yt.matches)ce=yt.matches;else{vt(M,$,On(404,{pathname:I}),{flushSync:Ce});return}}let $e=lu(ce,I);if(!$e.route.action&&!$e.route.lazy){let yt=On(405,{method:Oe.formMethod,pathname:I,routeId:$});vt(M,$,yt,{flushSync:Ce});return}A.set(M,_e);let at=Q,xt=Kl(s,u,Ne,ce,$e,i,me),He=(await Bn(Ne,xt,me,M))[$e.route.id];if(Ne.signal.aborted){A.get(M)===_e&&A.delete(M);return}if(K.has(M)){if(Vr(He)||hn(He)){Zt(M,tr(void 0));return}}else{if(Vr(He))if(A.delete(M),V>at){Zt(M,tr(void 0));return}else return O.add(M),Zt(M,lo(Oe)),Yt(Ne,He,!1,{fetcherSubmission:Oe,preventScrollReset:Ee});if(hn(He)){vt(M,$,He.error);return}}let it=R.navigation.location||R.location,Yn=Vl(n.history,it,_e.signal),rn=d||f,Gt=R.navigation.state!=="idle"?ar(rn,R.navigation.location,p):R.matches;Ge(Gt,"Didn't find any matches after fetcher action");let yn=++Q;ve.set(M,yn);let tl=lo(Oe,He.data);R.fetchers.set(M,tl);let{dsMatches:Aa,revalidatingFetchers:la}=Vv(Yn,me,s,u,n.history,R,Gt,Oe,it,i,!1,W,ue,K,F,O,rn,p,n.patchRoutesOnNavigation!=null,[$e.route.id,He]);la.filter(yt=>yt.key!==M).forEach(yt=>{let Ta=yt.key,Lo=R.fetchers.get(Ta),ko=lo(void 0,Lo?Lo.data:void 0);R.fetchers.set(Ta,ko),$n(Ta),yt.controller&&A.set(Ta,yt.controller)}),Je({fetchers:new Map(R.fetchers)});let ia=()=>la.forEach(yt=>$n(yt.key));_e.signal.addEventListener("abort",ia);let{loaderResults:oa,fetcherResults:Fe}=await Oo(Aa,la,Yn,me);if(_e.signal.aborted)return;if(_e.signal.removeEventListener("abort",ia),ve.delete(M),A.delete(M),la.forEach(yt=>A.delete(yt.key)),R.fetchers.has(M)){let yt=tr(He.data);R.fetchers.set(M,yt)}let Rt=Fs(oa);if(Rt)return Yt(Yn,Rt.result,!1,{preventScrollReset:Ee});if(Rt=Fs(Fe),Rt)return O.add(Rt.key),Yt(Yn,Rt.result,!1,{preventScrollReset:Ee});let{loaderData:Sr,errors:bn}=Qv(R,Gt,oa,void 0,la,Fe);vr(yn),R.navigation.state==="loading"&&yn>V?(Ge(B,"Expected pending action"),ne&&ne.abort(),At(R.navigation.location,{matches:Gt,loaderData:Sr,errors:bn,fetchers:new Map(R.fetchers)})):(Je({errors:bn,loaderData:Zv(R.loaderData,Sr,Gt,bn),fetchers:new Map(R.fetchers)}),W=!1)}async function nt(M,$,I,ce,me,Se,Ce,Ee,Oe){let Te=R.fetchers.get(M);Zt(M,lo(Oe,Te?Te.data:void 0),{flushSync:Ce});let _e=new AbortController,Ne=Vl(n.history,I,_e.signal);if(Se){let it=await wr(ce,new URL(Ne.url).pathname,Ne.signal,M);if(it.type==="aborted")return;if(it.type==="error"){vt(M,$,it.error,{flushSync:Ce});return}else if(it.matches)ce=it.matches;else{vt(M,$,On(404,{pathname:I}),{flushSync:Ce});return}}let $e=lu(ce,I);A.set(M,_e);let at=Q,xt=Kl(s,u,Ne,ce,$e,i,me),He=(await Bn(Ne,xt,me,M))[$e.route.id];if(A.get(M)===_e&&A.delete(M),!Ne.signal.aborted){if(K.has(M)){Zt(M,tr(void 0));return}if(Vr(He))if(V>at){Zt(M,tr(void 0));return}else{O.add(M),await Yt(Ne,He,!1,{preventScrollReset:Ee});return}if(hn(He)){vt(M,$,He.error);return}Zt(M,tr(He.data))}}async function Yt(M,$,I,{submission:ce,fetcherSubmission:me,preventScrollReset:Se,replace:Ce}={}){$.response.headers.has("X-Remix-Revalidate")&&(W=!0);let Ee=$.response.headers.get("Location");Ge(Ee,"Expected a Location header on the redirect Response"),Ee=Gv(Ee,new URL(M.url),p);let Oe=Td(R.location,Ee,{_isRedirect:!0});if(l){let xt=!1;if($.response.headers.has("X-Remix-Reload-Document"))xt=!0;else if(eh(Ee)){const wt=_E(Ee,!0);xt=wt.origin!==a.location.origin||An(wt.pathname,p)==null}if(xt){Ce?a.location.replace(Ee):a.location.assign(Ee);return}}ne=null;let Te=Ce===!0||$.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:_e,formAction:Ne,formEncType:$e}=R.navigation;!ce&&!me&&_e&&Ne&&$e&&(ce=ey(R.navigation));let at=ce||me;if(WE.has($.response.status)&&at&&tn(at.formMethod))await ie(Te,Oe,{submission:{...at,formAction:Ee},preventScrollReset:Se||Z,enableViewTransition:I?oe:void 0});else{let xt=od(Oe,ce);await ie(Te,Oe,{overrideNavigation:xt,fetcherSubmission:me,preventScrollReset:Se||Z,enableViewTransition:I?oe:void 0})}}async function Bn(M,$,I,ce){let me,Se={};try{me=await u2(m,M,$,ce,I,!1)}catch(Ce){return $.filter(Ee=>Ee.shouldLoad).forEach(Ee=>{Se[Ee.route.id]={type:"error",error:Ce}}),Se}if(M.signal.aborted)return Se;for(let[Ce,Ee]of Object.entries(me))if(p2(Ee)){let Oe=Ee.result;Se[Ce]={type:"redirect",response:d2(Oe,M,Ce,$,p)}}else Se[Ce]=await f2(Ee);return Se}async function Oo(M,$,I,ce){let me=Bn(I,M,ce,null),Se=Promise.all($.map(async Oe=>{if(Oe.matches&&Oe.match&&Oe.request&&Oe.controller){let _e=(await Bn(Oe.request,Oe.matches,ce,Oe.key))[Oe.match.route.id];return{[Oe.key]:_e}}else return Promise.resolve({[Oe.key]:{type:"error",error:On(404,{pathname:Oe.path})}})})),Ce=await me,Ee=(await Se).reduce((Oe,Te)=>Object.assign(Oe,Te),{});return{loaderResults:Ce,fetcherResults:Ee}}function ii(){W=!0,F.forEach((M,$)=>{A.has($)&&ue.add($),$n($)})}function Zt(M,$,I={}){R.fetchers.set(M,$),Je({fetchers:new Map(R.fetchers)},{flushSync:(I&&I.flushSync)===!0})}function vt(M,$,I,ce={}){let me=Br(R.matches,$);Pt(M),Je({errors:{[me.route.id]:I},fetchers:new Map(R.fetchers)},{flushSync:(ce&&ce.flushSync)===!0})}function Tn(M){return U.set(M,(U.get(M)||0)+1),K.has(M)&&K.delete(M),R.fetchers.get(M)||e2}function Pt(M){let $=R.fetchers.get(M);A.has(M)&&!($&&$.state==="loading"&&ve.has(M))&&$n(M),F.delete(M),ve.delete(M),O.delete(M),K.delete(M),ue.delete(M),R.fetchers.delete(M)}function Ku(M){let $=(U.get(M)||0)-1;$<=0?(U.delete(M),K.add(M)):U.set(M,$),Je({fetchers:new Map(R.fetchers)})}function $n(M){let $=A.get(M);$&&($.abort(),A.delete(M))}function Ao(M){for(let $ of M){let I=Tn($),ce=tr(I.data);R.fetchers.set($,ce)}}function gr(){let M=[],$=!1;for(let I of O){let ce=R.fetchers.get(I);Ge(ce,`Expected fetcher: ${I}`),ce.state==="loading"&&(O.delete(I),M.push(I),$=!0)}return Ao(M),$}function vr(M){let $=[];for(let[I,ce]of ve)if(ce<M){let me=R.fetchers.get(I);Ge(me,`Expected fetcher: ${I}`),me.state==="loading"&&($n(I),ve.delete(I),$.push(I))}return Ao($),$.length>0}function ra(M,$){let I=R.blockers.get(M)||ro;return ae.get(M)!==$&&ae.set(M,$),I}function yr(M){R.blockers.delete(M),ae.delete(M)}function Vn(M,$){let I=R.blockers.get(M)||ro;Ge(I.state==="unblocked"&&$.state==="blocked"||I.state==="blocked"&&$.state==="blocked"||I.state==="blocked"&&$.state==="proceeding"||I.state==="blocked"&&$.state==="unblocked"||I.state==="proceeding"&&$.state==="unblocked",`Invalid blocker state transition: ${I.state} -> ${$.state}`);let ce=new Map(R.blockers);ce.set(M,$),Je({blockers:ce})}function To({currentLocation:M,nextLocation:$,historyAction:I}){if(ae.size===0)return;ae.size>1&&_t(!1,"A router only supports one blocker at a time");let ce=Array.from(ae.entries()),[me,Se]=ce[ce.length-1],Ce=R.blockers.get(me);if(!(Ce&&Ce.state==="proceeding")&&Se({currentLocation:M,nextLocation:$,historyAction:I}))return me}function Wr(M){let $=On(404,{pathname:M}),I=d||f,{matches:ce,route:me}=Jv(I);return{notFoundMatches:ce,route:me,error:$}}function Mo(M,$,I){if(S=M,_=$,C=I||null,!j&&R.navigation===id){j=!0;let ce=Do(R.location,R.matches);ce!=null&&Je({restoreScrollPosition:ce})}return()=>{S=null,_=null,C=null}}function el(M,$){return C&&C(M,$.map(ce=>AE(ce,R.loaderData)))||M.key}function br(M,$){if(S&&_){let I=el(M,$);S[I]=_()}}function Do(M,$){if(S){let I=el(M,$),ce=S[I];if(typeof ce=="number")return ce}return null}function xr(M,$,I){if(n.patchRoutesOnNavigation)if(M){if(Object.keys(M[0].params).length>0)return{active:!0,matches:ru($,I,p,!0)}}else return{active:!0,matches:ru($,I,p,!0)||[]};return{active:!1,matches:null}}async function wr(M,$,I,ce){if(!n.patchRoutesOnNavigation)return{type:"success",matches:M};let me=M;for(;;){let Se=d==null,Ce=d||f,Ee=u;try{await n.patchRoutesOnNavigation({signal:I,path:$,matches:me,fetcherKey:ce,patch:(_e,Ne)=>{I.aborted||Yv(_e,Ne,Ce,Ee,s,!1)}})}catch(_e){return{type:"error",error:_e,partialMatches:me}}finally{Se&&!I.aborted&&(f=[...f])}if(I.aborted)return{type:"aborted"};let Oe=ar(Ce,$,p);if(Oe)return{type:"success",matches:Oe};let Te=ru(Ce,$,p,!0);if(!Te||me.length===Te.length&&me.every((_e,Ne)=>_e.route.id===Te[Ne].route.id))return{type:"success",matches:null};me=Te}}function oi(M){u={},d=vo(M,s,void 0,u)}function si(M,$,I=!1){let ce=d==null;Yv(M,$,d||f,u,s,I),ce&&(f=[...f],Je({}))}return D={get basename(){return p},get future(){return v},get state(){return R},get routes(){return f},get window(){return a},initialize:ye,subscribe:qe,enableScrollRestoration:Mo,navigate:Ze,fetch:ke,revalidate:an,createHref:M=>n.history.createHref(M),encodeLocation:M=>n.history.encodeLocation(M),getFetcher:Tn,deleteFetcher:Ku,dispose:Le,getBlocker:ra,deleteBlocker:yr,patchRoutes:si,_internalFetchControllers:A,_internalSetRoutes:oi,_internalSetStateDoNotUseOrYouWillBreakYourApp(M){Je(M)}},D}function r2(n){return n!=null&&("formData"in n&&n.formData!=null||"body"in n&&n.body!==void 0)}function Dd(n,a,l,i,s,u){let f,d;if(s){f=[];for(let m of a)if(f.push(m),m.route.id===s){d=m;break}}else f=a,d=a[a.length-1];let p=Cu(i||".",_u(f),An(n.pathname,l)||n.pathname,u==="path");if(i==null&&(p.search=n.search,p.hash=n.hash),(i==null||i===""||i===".")&&d){let m=th(p.search);if(d.route.index&&!m)p.search=p.search?p.search.replace(/^\?/,"?index&"):"?index";else if(!d.route.index&&m){let v=new URLSearchParams(p.search),b=v.getAll("index");v.delete("index"),b.filter(S=>S).forEach(S=>v.append("index",S));let w=v.toString();p.search=w?`?${w}`:""}}return l!=="/"&&(p.pathname=YE({basename:l,pathname:p.pathname})),lr(p)}function $v(n,a,l){if(!l||!r2(l))return{path:a};if(l.formMethod&&!g2(l.formMethod))return{path:a,error:On(405,{method:l.formMethod})};let i=()=>({path:a,error:On(400,{type:"invalid-body"})}),u=(l.formMethod||"get").toUpperCase(),f=v0(a);if(l.body!==void 0){if(l.formEncType==="text/plain"){if(!tn(u))return i();let b=typeof l.body=="string"?l.body:l.body instanceof FormData||l.body instanceof URLSearchParams?Array.from(l.body.entries()).reduce((w,[S,C])=>`${w}${S}=${C}
|
|
65
|
+
`,""):String(l.body);return{path:a,submission:{formMethod:u,formAction:f,formEncType:l.formEncType,formData:void 0,json:void 0,text:b}}}else if(l.formEncType==="application/json"){if(!tn(u))return i();try{let b=typeof l.body=="string"?JSON.parse(l.body):l.body;return{path:a,submission:{formMethod:u,formAction:f,formEncType:l.formEncType,formData:void 0,json:b,text:void 0}}}catch{return i()}}}Ge(typeof FormData=="function","FormData is not available in this environment");let d,p;if(l.formData)d=zd(l.formData),p=l.formData;else if(l.body instanceof FormData)d=zd(l.body),p=l.body;else if(l.body instanceof URLSearchParams)d=l.body,p=Xv(d);else if(l.body==null)d=new URLSearchParams,p=new FormData;else try{d=new URLSearchParams(l.body),p=Xv(d)}catch{return i()}let m={formMethod:u,formAction:f,formEncType:l&&l.formEncType||"application/x-www-form-urlencoded",formData:p,json:void 0,text:void 0};if(tn(m.formMethod))return{path:a,submission:m};let v=Oa(a);return n&&v.search&&th(v.search)&&d.append("index",""),v.search=`?${d}`,{path:lr(v),submission:m}}function Vv(n,a,l,i,s,u,f,d,p,m,v,b,w,S,C,_,j,N,z,k){let H=k?hn(k[1])?k[1].error:k[1].data:void 0,D=s.createURL(u.location),R=s.createURL(p),B;if(v&&u.errors){let te=Object.keys(u.errors)[0];B=f.findIndex(W=>W.route.id===te)}else if(k&&hn(k[1])){let te=k[0];B=f.findIndex(W=>W.route.id===te)-1}let Z=k?k[1].statusCode:void 0,ne=Z&&Z>=400,oe={currentUrl:D,currentParams:u.matches[0]?.params||{},nextUrl:R,nextParams:f[0].params,...d,actionResult:H,actionStatus:Z},le=f.map((te,W)=>{let{route:ue}=te,A=null;if(B!=null&&W>B?A=!1:ue.lazy?A=!0:ue.loader==null?A=!1:v?A=Ld(ue,u.loaderData,u.errors):l2(u.loaderData,u.matches[W],te)&&(A=!0),A!==null)return kd(l,i,n,te,m,a,A);let Q=ne?!1:b||D.pathname+D.search===R.pathname+R.search||D.search!==R.search||i2(u.matches[W],te),V={...oe,defaultShouldRevalidate:Q},ve=pu(te,V);return kd(l,i,n,te,m,a,ve,V)}),J=[];return C.forEach((te,W)=>{if(v||!f.some(U=>U.route.id===te.routeId)||S.has(W))return;let ue=u.fetchers.get(W),A=ue&&ue.state!=="idle"&&ue.data===void 0,Q=ar(j,te.path,N);if(!Q){if(z&&A)return;J.push({key:W,routeId:te.routeId,path:te.path,matches:null,match:null,request:null,controller:null});return}if(_.has(W))return;let V=lu(Q,te.path),ve=new AbortController,O=Vl(s,te.path,ve.signal),F=null;if(w.has(W))w.delete(W),F=Kl(l,i,O,Q,V,m,a);else if(A)b&&(F=Kl(l,i,O,Q,V,m,a));else{let U={...oe,defaultShouldRevalidate:ne?!1:b};pu(V,U)&&(F=Kl(l,i,O,Q,V,m,a,U))}F&&J.push({key:W,routeId:te.routeId,path:te.path,matches:F,match:V,request:O,controller:ve})}),{dsMatches:le,revalidatingFetchers:J}}function Ld(n,a,l){if(n.lazy)return!0;if(!n.loader)return!1;let i=a!=null&&n.id in a,s=l!=null&&l[n.id]!==void 0;return!i&&s?!1:typeof n.loader=="function"&&n.loader.hydrate===!0?!0:!i&&!s}function l2(n,a,l){let i=!a||l.route.id!==a.route.id,s=!n.hasOwnProperty(l.route.id);return i||s}function i2(n,a){let l=n.route.path;return n.pathname!==a.pathname||l!=null&&l.endsWith("*")&&n.params["*"]!==a.params["*"]}function pu(n,a){if(n.route.shouldRevalidate){let l=n.route.shouldRevalidate(a);if(typeof l=="boolean")return l}return a.defaultShouldRevalidate}function Yv(n,a,l,i,s,u){let f;if(n){let m=i[n];Ge(m,`No route found to patch children into: routeId = ${n}`),m.children||(m.children=[]),f=m.children}else f=l;let d=[],p=[];if(a.forEach(m=>{let v=f.find(b=>d0(m,b));v?p.push({existingRoute:v,newRoute:m}):d.push(m)}),d.length>0){let m=vo(d,s,[n||"_","patch",String(f?.length||"0")],i);f.push(...m)}if(u&&p.length>0)for(let m=0;m<p.length;m++){let{existingRoute:v,newRoute:b}=p[m],w=v,[S]=vo([b],s,[],{},!0);Object.assign(w,{element:S.element?S.element:w.element,errorElement:S.errorElement?S.errorElement:w.errorElement,hydrateFallbackElement:S.hydrateFallbackElement?S.hydrateFallbackElement:w.hydrateFallbackElement})}}function d0(n,a){return"id"in n&&"id"in a&&n.id===a.id?!0:n.index===a.index&&n.path===a.path&&n.caseSensitive===a.caseSensitive?(!n.children||n.children.length===0)&&(!a.children||a.children.length===0)?!0:n.children.every((l,i)=>a.children?.some(s=>d0(l,s))):!1}var qv=new WeakMap,h0=({key:n,route:a,manifest:l,mapRouteProperties:i})=>{let s=l[a.id];if(Ge(s,"No route found in manifest"),!s.lazy||typeof s.lazy!="object")return;let u=s.lazy[n];if(!u)return;let f=qv.get(s);f||(f={},qv.set(s,f));let d=f[n];if(d)return d;let p=(async()=>{let m=NE(n),b=s[n]!==void 0&&n!=="hasErrorBoundary";if(m)_t(!m,"Route property "+n+" is not a supported lazy route property. This property will be ignored."),f[n]=Promise.resolve();else if(b)_t(!1,`Route "${s.id}" has a static property "${n}" defined. The lazy property will be ignored.`);else{let w=await u();w!=null&&(Object.assign(s,{[n]:w}),Object.assign(s,i(s)))}typeof s.lazy=="object"&&(s.lazy[n]=void 0,Object.values(s.lazy).every(w=>w===void 0)&&(s.lazy=void 0))})();return f[n]=p,p},Fv=new WeakMap;function o2(n,a,l,i,s){let u=l[n.id];if(Ge(u,"No route found in manifest"),!n.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof n.lazy=="function"){let v=Fv.get(u);if(v)return{lazyRoutePromise:v,lazyHandlerPromise:v};let b=(async()=>{Ge(typeof n.lazy=="function","No lazy route function found");let w=await n.lazy(),S={};for(let C in w){let _=w[C];if(_===void 0)continue;let j=jE(C),z=u[C]!==void 0&&C!=="hasErrorBoundary";j?_t(!j,"Route property "+C+" is not a supported property to be returned from a lazy route function. This property will be ignored."):z?_t(!z,`Route "${u.id}" has a static property "${C}" defined but its lazy function is also returning a value for this property. The lazy route property "${C}" will be ignored.`):S[C]=_}Object.assign(u,S),Object.assign(u,{...i(u),lazy:void 0})})();return Fv.set(u,b),b.catch(()=>{}),{lazyRoutePromise:b,lazyHandlerPromise:b}}let f=Object.keys(n.lazy),d=[],p;for(let v of f){if(s&&s.includes(v))continue;let b=h0({key:v,route:n,manifest:l,mapRouteProperties:i});b&&(d.push(b),v===a&&(p=b))}let m=d.length>0?Promise.all(d).then(()=>{}):void 0;return m?.catch(()=>{}),p?.catch(()=>{}),{lazyRoutePromise:m,lazyHandlerPromise:p}}async function Kv(n){let a=n.matches.filter(s=>s.shouldLoad),l={};return(await Promise.all(a.map(s=>s.resolve()))).forEach((s,u)=>{l[a[u].route.id]=s}),l}async function s2(n){return n.matches.some(a=>a.route.unstable_middleware)?m0(n,!1,()=>Kv(n),(a,l)=>({[l]:{type:"error",result:a}})):Kv(n)}async function m0(n,a,l,i){let{matches:s,request:u,params:f,context:d}=n,p={handlerResult:void 0};try{let m=s.flatMap(b=>b.route.unstable_middleware?b.route.unstable_middleware.map(w=>[b.route.id,w]):[]),v=await p0({request:u,params:f,context:d},m,a,p,l);return a?v:p.handlerResult}catch(m){if(!p.middlewareError)throw m;let v=await i(p.middlewareError.error,p.middlewareError.routeId);return p.handlerResult?Object.assign(p.handlerResult,v):v}}async function p0(n,a,l,i,s,u=0){let{request:f}=n;if(f.signal.aborted)throw f.signal.reason?f.signal.reason:new Error(`Request aborted without an \`AbortSignal.reason\`: ${f.method} ${f.url}`);let d=a[u];if(!d)return i.handlerResult=await s(),i.handlerResult;let[p,m]=d,v=!1,b,w=async()=>{if(v)throw new Error("You may only call `next()` once per middleware");v=!0,await p0(n,a,l,i,s,u+1)};try{let S=await m({request:n.request,params:n.params,context:n.context},w);return v?S===void 0?b:S:w()}catch(S){throw i.middlewareError?i.middlewareError.error!==S&&(i.middlewareError={routeId:p,error:S}):i.middlewareError={routeId:p,error:S},S}}function g0(n,a,l,i,s){let u=h0({key:"unstable_middleware",route:i.route,manifest:a,mapRouteProperties:n}),f=o2(i.route,tn(l.method)?"action":"loader",a,n,s);return{middleware:u,route:f.lazyRoutePromise,handler:f.lazyHandlerPromise}}function kd(n,a,l,i,s,u,f,d=null){let p=!1,m=g0(n,a,l,i,s);return{...i,_lazyPromises:m,shouldLoad:f,unstable_shouldRevalidateArgs:d,unstable_shouldCallHandler(v){return p=!0,d?typeof v=="boolean"?pu(i,{...d,defaultShouldRevalidate:v}):pu(i,d):f},resolve(v){return p||f||v&&!tn(l.method)&&(i.route.lazy||i.route.loader)?c2({request:l,match:i,lazyHandlerPromise:m?.handler,lazyRoutePromise:m?.route,handlerOverride:v,scopedContext:u}):Promise.resolve({type:"data",result:void 0})}}}function Kl(n,a,l,i,s,u,f,d=null){return i.map(p=>p.route.id!==s.route.id?{...p,shouldLoad:!1,unstable_shouldRevalidateArgs:d,unstable_shouldCallHandler:()=>!1,_lazyPromises:g0(n,a,l,p,u),resolve:()=>Promise.resolve({type:"data",result:void 0})}:kd(n,a,l,p,u,f,!0,d))}async function u2(n,a,l,i,s,u){l.some(m=>m._lazyPromises?.middleware)&&await Promise.all(l.map(m=>m._lazyPromises?.middleware));let f={request:a,params:l[0].params,context:s,matches:l},p=await n({...f,fetcherKey:i,unstable_runClientMiddleware:m=>{let v=f;return m0(v,!1,()=>m({...v,fetcherKey:i,unstable_runClientMiddleware:()=>{throw new Error("Cannot call `unstable_runClientMiddleware()` from within an `unstable_runClientMiddleware` handler")}}),(b,w)=>({[w]:{type:"error",result:b}}))}});try{await Promise.all(l.flatMap(m=>[m._lazyPromises?.handler,m._lazyPromises?.route]))}catch{}return p}async function c2({request:n,match:a,lazyHandlerPromise:l,lazyRoutePromise:i,handlerOverride:s,scopedContext:u}){let f,d,p=tn(n.method),m=p?"action":"loader",v=b=>{let w,S=new Promise((j,N)=>w=N);d=()=>w(),n.signal.addEventListener("abort",d);let C=j=>typeof b!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${m}" [routeId: ${a.route.id}]`)):b({request:n,params:a.params,context:u},...j!==void 0?[j]:[]),_=(async()=>{try{return{type:"data",result:await(s?s(N=>C(N)):C())}}catch(j){return{type:"error",result:j}}})();return Promise.race([_,S])};try{let b=p?a.route.action:a.route.loader;if(l||i)if(b){let w,[S]=await Promise.all([v(b).catch(C=>{w=C}),l,i]);if(w!==void 0)throw w;f=S}else{await l;let w=p?a.route.action:a.route.loader;if(w)[f]=await Promise.all([v(w),i]);else if(m==="action"){let S=new URL(n.url),C=S.pathname+S.search;throw On(405,{method:n.method,pathname:C,routeId:a.route.id})}else return{type:"data",result:void 0}}else if(b)f=await v(b);else{let w=new URL(n.url),S=w.pathname+w.search;throw On(404,{pathname:S})}}catch(b){return{type:"error",result:b}}finally{d&&n.signal.removeEventListener("abort",d)}return f}async function f2(n){let{result:a,type:l}=n;if(y0(a)){let i;try{let s=a.headers.get("Content-Type");s&&/\bapplication\/json\b/.test(s)?a.body==null?i=null:i=await a.json():i=await a.text()}catch(s){return{type:"error",error:s}}return l==="error"?{type:"error",error:new Md(a.status,a.statusText,i),statusCode:a.status,headers:a.headers}:{type:"data",data:i,statusCode:a.status,headers:a.headers}}return l==="error"?Wv(a)?a.data instanceof Error?{type:"error",error:a.data,statusCode:a.init?.status,headers:a.init?.headers?new Headers(a.init.headers):void 0}:{type:"error",error:new Md(a.init?.status||500,void 0,a.data),statusCode:yo(a)?a.status:void 0,headers:a.init?.headers?new Headers(a.init.headers):void 0}:{type:"error",error:a,statusCode:yo(a)?a.status:void 0}:Wv(a)?{type:"data",data:a.data,statusCode:a.init?.status,headers:a.init?.headers?new Headers(a.init.headers):void 0}:{type:"data",data:a}}function d2(n,a,l,i,s){let u=n.headers.get("Location");if(Ge(u,"Redirects returned/thrown from loaders/actions must have a Location header"),!eh(u)){let f=i.slice(0,i.findIndex(d=>d.route.id===l)+1);u=Dd(new URL(a.url),f,s,u),n.headers.set("Location",u)}return n}function Gv(n,a,l){if(eh(n)){let i=n,s=i.startsWith("//")?new URL(a.protocol+i):new URL(i),u=An(s.pathname,l)!=null;if(s.origin===a.origin&&u)return s.pathname+s.search+s.hash}return n}function Vl(n,a,l,i){let s=n.createURL(v0(a)).toString(),u={signal:l};if(i&&tn(i.formMethod)){let{formMethod:f,formEncType:d}=i;u.method=f.toUpperCase(),d==="application/json"?(u.headers=new Headers({"Content-Type":d}),u.body=JSON.stringify(i.json)):d==="text/plain"?u.body=i.text:d==="application/x-www-form-urlencoded"&&i.formData?u.body=zd(i.formData):u.body=i.formData}return new Request(s,u)}function zd(n){let a=new URLSearchParams;for(let[l,i]of n.entries())a.append(l,typeof i=="string"?i:i.name);return a}function Xv(n){let a=new FormData;for(let[l,i]of n.entries())a.append(l,i);return a}function h2(n,a,l,i=!1,s=!1){let u={},f=null,d,p=!1,m={},v=l&&hn(l[1])?l[1].error:void 0;return n.forEach(b=>{if(!(b.route.id in a))return;let w=b.route.id,S=a[w];if(Ge(!Vr(S),"Cannot handle redirect results in processLoaderData"),hn(S)){let C=S.error;if(v!==void 0&&(C=v,v=void 0),f=f||{},s)f[w]=C;else{let _=Br(n,w);f[_.route.id]==null&&(f[_.route.id]=C)}i||(u[w]=f0),p||(p=!0,d=yo(S.error)?S.error.status:500),S.headers&&(m[w]=S.headers)}else u[w]=S.data,S.statusCode&&S.statusCode!==200&&!p&&(d=S.statusCode),S.headers&&(m[w]=S.headers)}),v!==void 0&&l&&(f={[l[0]]:v},l[2]&&(u[l[2]]=void 0)),{loaderData:u,errors:f,statusCode:d||200,loaderHeaders:m}}function Qv(n,a,l,i,s,u){let{loaderData:f,errors:d}=h2(a,l,i);return s.filter(p=>!p.matches||p.matches.some(m=>m.shouldLoad)).forEach(p=>{let{key:m,match:v,controller:b}=p,w=u[m];if(Ge(w,"Did not find corresponding fetcher result"),!(b&&b.signal.aborted))if(hn(w)){let S=Br(n.matches,v?.route.id);d&&d[S.route.id]||(d={...d,[S.route.id]:w.error}),n.fetchers.delete(m)}else if(Vr(w))Ge(!1,"Unhandled fetcher revalidation redirect");else{let S=tr(w.data);n.fetchers.set(m,S)}}),{loaderData:f,errors:d}}function Zv(n,a,l,i){let s=Object.entries(a).filter(([,u])=>u!==f0).reduce((u,[f,d])=>(u[f]=d,u),{});for(let u of l){let f=u.route.id;if(!a.hasOwnProperty(f)&&n.hasOwnProperty(f)&&u.route.loader&&(s[f]=n[f]),i&&i.hasOwnProperty(f))break}return s}function Iv(n){return n?hn(n[1])?{actionData:{}}:{actionData:{[n[0]]:n[1].data}}:{}}function Br(n,a){return(a?n.slice(0,n.findIndex(i=>i.route.id===a)+1):[...n]).reverse().find(i=>i.route.hasErrorBoundary===!0)||n[0]}function Jv(n){let a=n.length===1?n[0]:n.find(l=>l.index||!l.path||l.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:a}],route:a}}function On(n,{pathname:a,routeId:l,method:i,type:s,message:u}={}){let f="Unknown Server Error",d="Unknown @remix-run/router error";return n===400?(f="Bad Request",i&&a&&l?d=`You made a ${i} request to "${a}" but did not provide a \`loader\` for route "${l}", so there is no way to handle the request.`:s==="invalid-body"&&(d="Unable to encode submission body")):n===403?(f="Forbidden",d=`Route "${l}" does not match URL "${a}"`):n===404?(f="Not Found",d=`No route matches URL "${a}"`):n===405&&(f="Method Not Allowed",i&&a&&l?d=`You made a ${i.toUpperCase()} request to "${a}" but did not provide an \`action\` for route "${l}", so there is no way to handle the request.`:i&&(d=`Invalid request method "${i.toUpperCase()}"`)),new Md(n||500,f,new Error(d),!0)}function Fs(n){let a=Object.entries(n);for(let l=a.length-1;l>=0;l--){let[i,s]=a[l];if(Vr(s))return{key:i,result:s}}}function v0(n){let a=typeof n=="string"?Oa(n):n;return lr({...a,hash:""})}function m2(n,a){return n.pathname!==a.pathname||n.search!==a.search?!1:n.hash===""?a.hash!=="":n.hash===a.hash?!0:a.hash!==""}function p2(n){return y0(n.result)&&JE.has(n.result.status)}function hn(n){return n.type==="error"}function Vr(n){return(n&&n.type)==="redirect"}function Wv(n){return typeof n=="object"&&n!=null&&"type"in n&&"data"in n&&"init"in n&&n.type==="DataWithResponseInit"}function y0(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.headers=="object"&&typeof n.body<"u"}function g2(n){return IE.has(n.toUpperCase())}function tn(n){return QE.has(n.toUpperCase())}function th(n){return new URLSearchParams(n).getAll("index").some(a=>a==="")}function lu(n,a){let l=typeof a=="string"?Oa(a).search:a.search;if(n[n.length-1].route.index&&th(l||""))return n[n.length-1];let i=s0(n);return i[i.length-1]}function ey(n){let{formMethod:a,formAction:l,formEncType:i,text:s,formData:u,json:f}=n;if(!(!a||!l||!i)){if(s!=null)return{formMethod:a,formAction:l,formEncType:i,formData:void 0,json:void 0,text:s};if(u!=null)return{formMethod:a,formAction:l,formEncType:i,formData:u,json:void 0,text:void 0};if(f!==void 0)return{formMethod:a,formAction:l,formEncType:i,formData:void 0,json:f,text:void 0}}}function od(n,a){return a?{state:"loading",location:n,formMethod:a.formMethod,formAction:a.formAction,formEncType:a.formEncType,formData:a.formData,json:a.json,text:a.text}:{state:"loading",location:n,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function v2(n,a){return{state:"submitting",location:n,formMethod:a.formMethod,formAction:a.formAction,formEncType:a.formEncType,formData:a.formData,json:a.json,text:a.text}}function lo(n,a){return n?{state:"loading",formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text,data:a}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:a}}function y2(n,a){return{state:"submitting",formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text,data:a?a.data:void 0}}function tr(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 b2(n,a){try{let l=n.sessionStorage.getItem(c0);if(l){let i=JSON.parse(l);for(let[s,u]of Object.entries(i||{}))u&&Array.isArray(u)&&a.set(s,new Set(u||[]))}}catch{}}function x2(n,a){if(a.size>0){let l={};for(let[i,s]of a)l[i]=[...s];try{n.sessionStorage.setItem(c0,JSON.stringify(l))}catch(i){_t(!1,`Failed to save applied view transitions in sessionStorage (${i}).`)}}}function w2(){let n,a,l=new Promise((i,s)=>{n=async u=>{i(u);try{await l}catch{}},a=async u=>{s(u);try{await l}catch{}}});return{promise:l,resolve:n,reject:a}}var Ir=y.createContext(null);Ir.displayName="DataRouter";var Eo=y.createContext(null);Eo.displayName="DataRouterState";y.createContext(!1);var nh=y.createContext({isTransitioning:!1});nh.displayName="ViewTransition";var b0=y.createContext(new Map);b0.displayName="Fetchers";var S2=y.createContext(null);S2.displayName="Await";var Pn=y.createContext(null);Pn.displayName="Navigation";var Nu=y.createContext(null);Nu.displayName="Location";var na=y.createContext({outlet:null,matches:[],isDataRoute:!1});na.displayName="Route";var ah=y.createContext(null);ah.displayName="RouteError";function E2(n,{relative:a}={}){Ge(Wl(),"useHref() may be used only in the context of a <Router> component.");let{basename:l,navigator:i}=y.useContext(Pn),{hash:s,pathname:u,search:f}=_o(n,{relative:a}),d=u;return l!=="/"&&(d=u==="/"?l:Jn([l,u])),i.createHref({pathname:d,search:f,hash:s})}function Wl(){return y.useContext(Nu)!=null}function mr(){return Ge(Wl(),"useLocation() may be used only in the context of a <Router> component."),y.useContext(Nu).location}var x0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function w0(n){y.useContext(Pn).static||y.useLayoutEffect(n)}function Ru(){let{isDataRoute:n}=y.useContext(na);return n?z2():_2()}function _2(){Ge(Wl(),"useNavigate() may be used only in the context of a <Router> component.");let n=y.useContext(Ir),{basename:a,navigator:l}=y.useContext(Pn),{matches:i}=y.useContext(na),{pathname:s}=mr(),u=JSON.stringify(_u(i)),f=y.useRef(!1);return w0(()=>{f.current=!0}),y.useCallback((p,m={})=>{if(_t(f.current,x0),!f.current)return;if(typeof p=="number"){l.go(p);return}let v=Cu(p,JSON.parse(u),s,m.relative==="path");n==null&&a!=="/"&&(v.pathname=v.pathname==="/"?a:Jn([a,v.pathname])),(m.replace?l.replace:l.push)(v,m.state,m)},[a,l,u,s,n])}y.createContext(null);function _o(n,{relative:a}={}){let{matches:l}=y.useContext(na),{pathname:i}=mr(),s=JSON.stringify(_u(l));return y.useMemo(()=>Cu(n,JSON.parse(s),i,a==="path"),[n,s,i,a])}function C2(n,a,l,i){Ge(Wl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=y.useContext(Pn),{matches:u}=y.useContext(na),f=u[u.length-1],d=f?f.params:{},p=f?f.pathname:"/",m=f?f.pathnameBase:"/",v=f&&f.route;{let N=v&&v.path||"";S0(p,!v||N.endsWith("*")||N.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${N}">) 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.
|
|
66
66
|
|
|
67
|
-
Please change the parent <Route path="${N}"> to <Route path="${N==="/"?"*":`${N}/*`}">.`)}let b=dr(),S;S=b;let w=S.pathname||"/",_=w;if(m!=="/"){let N=m.replace(/^\//,"").split("/");_="/"+w.replace(/^\//,"").split("/").slice(N.length).join("/")}let C=tr(n,{pathname:_});return Et(v||C!=null,`No routes matched location "${S.pathname}${S.search}${S.hash}" `),Et(C==null||C[C.length-1].route.element!==void 0||C[C.length-1].route.Component!==void 0||C[C.length-1].route.lazy!==void 0,`Matched leaf route at location "${S.pathname}${S.search}${S.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.`),T2(C&&C.map(N=>Object.assign({},N,{params:Object.assign({},d,N.params),pathname:Xn([m,s.encodeLocation?s.encodeLocation(N.pathname).pathname:N.pathname]),pathnameBase:N.pathnameBase==="/"?m:Xn([m,s.encodeLocation?s.encodeLocation(N.pathnameBase).pathname:N.pathnameBase])})),u,l,i)}function R2(){let n=z2(),a=yo(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),l=n instanceof Error?n.stack:null,i="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:i},u={padding:"2px 4px",backgroundColor:i},f=null;return console.error("Error handled by React Router default ErrorBoundary:",n),f=y.createElement(y.Fragment,null,y.createElement("p",null,"💿 Hey developer 👋"),y.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",y.createElement("code",{style:u},"ErrorBoundary")," or"," ",y.createElement("code",{style:u},"errorElement")," prop on your route.")),y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},a),l?y.createElement("pre",{style:s},l):null,f)}var j2=y.createElement(R2,null),O2=class extends y.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,a){return a.location!==n.location||a.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:a.error,location:a.location,revalidation:n.revalidation||a.revalidation}}componentDidCatch(n,a){console.error("React Router caught the following error during render",n,a)}render(){return this.state.error!==void 0?y.createElement(Jn.Provider,{value:this.props.routeContext},y.createElement(rh.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function A2({routeContext:n,match:a,children:l}){let i=y.useContext(Qr);return i&&i.static&&i.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=a.route.id),y.createElement(Jn.Provider,{value:n},l)}function T2(n,a=[],l=null,i=null){if(n==null){if(!l)return null;if(l.errors)n=l.matches;else if(a.length===0&&!l.initialized&&l.matches.length>0)n=l.matches;else return null}let s=n,u=l?.errors;if(u!=null){let p=s.findIndex(m=>m.route.id&&u?.[m.route.id]!==void 0);Fe(p>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(u).join(",")}`),s=s.slice(0,Math.min(s.length,p+1))}let f=!1,d=-1;if(l)for(let p=0;p<s.length;p++){let m=s[p];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(d=p),m.route.id){let{loaderData:v,errors:b}=l,S=m.route.loader&&!v.hasOwnProperty(m.route.id)&&(!b||b[m.route.id]===void 0);if(m.route.lazy||S){f=!0,d>=0?s=s.slice(0,d+1):s=[s[0]];break}}}return s.reduceRight((p,m,v)=>{let b,S=!1,w=null,_=null;l&&(b=u&&m.route.id?u[m.route.id]:void 0,w=m.route.errorElement||j2,f&&(d<0&&v===0?(C0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),S=!0,_=null):d===v&&(S=!0,_=m.route.hydrateFallbackElement||null)));let C=a.concat(s.slice(0,v+1)),j=()=>{let N;return b?N=w:S?N=_:m.route.Component?N=y.createElement(m.route.Component,null):m.route.element?N=m.route.element:N=p,y.createElement(A2,{match:m,routeContext:{outlet:p,matches:C,isDataRoute:l!=null},children:N})};return l&&(m.route.ErrorBoundary||m.route.errorElement||v===0)?y.createElement(O2,{location:l.location,revalidation:l.revalidation,component:w,error:b,children:j(),routeContext:{outlet:null,matches:C,isDataRoute:!0}}):j()},null)}function lh(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function M2(n){let a=y.useContext(Qr);return Fe(a,lh(n)),a}function D2(n){let a=y.useContext(Eo);return Fe(a,lh(n)),a}function L2(n){let a=y.useContext(Jn);return Fe(a,lh(n)),a}function ih(n){let a=L2(n),l=a.matches[a.matches.length-1];return Fe(l.route.id,`${n} can only be used on routes that contain a unique "id"`),l.route.id}function k2(){return ih("useRouteId")}function z2(){let n=y.useContext(rh),a=D2("useRouteError"),l=ih("useRouteError");return n!==void 0?n:a.errors?.[l]}function U2(){let{router:n}=M2("useNavigate"),a=ih("useNavigate"),l=y.useRef(!1);return E0(()=>{l.current=!0}),y.useCallback(async(s,u={})=>{Et(l.current,S0),l.current&&(typeof s=="number"?n.navigate(s):await n.navigate(s,{fromRouteId:a,...u}))},[n,a])}var ny={};function C0(n,a,l){!a&&!ny[n]&&(ny[n]=!0,Et(!1,l))}var ay={};function ry(n,a){!n&&!ay[a]&&(ay[a]=!0,console.warn(a))}function P2(n){let a={hasErrorBoundary:n.hasErrorBoundary||n.ErrorBoundary!=null||n.errorElement!=null};return n.Component&&(n.element&&Et(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(a,{element:y.createElement(n.Component),Component:void 0})),n.HydrateFallback&&(n.hydrateFallbackElement&&Et(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(a,{hydrateFallbackElement:y.createElement(n.HydrateFallback),HydrateFallback:void 0})),n.ErrorBoundary&&(n.errorElement&&Et(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(a,{errorElement:y.createElement(n.ErrorBoundary),ErrorBoundary:void 0})),a}var H2=["HydrateFallback","hydrateFallbackElement"];function B2(n,a){return r2({basename:a?.basename,unstable_getContext:a?.unstable_getContext,future:a?.future,history:EE({initialEntries:a?.initialEntries,initialIndex:a?.initialIndex}),hydrationData:a?.hydrationData,routes:n,hydrationRouteProperties:H2,mapRouteProperties:P2,dataStrategy:a?.dataStrategy,patchRoutesOnNavigation:a?.patchRoutesOnNavigation}).initialize()}var $2=class{constructor(){this.status="pending",this.promise=new Promise((n,a)=>{this.resolve=l=>{this.status==="pending"&&(this.status="resolved",n(l))},this.reject=l=>{this.status==="pending"&&(this.status="rejected",a(l))}})}};function V2({router:n,flushSync:a}){let[l,i]=y.useState(n.state),[s,u]=y.useState(),[f,d]=y.useState({isTransitioning:!1}),[p,m]=y.useState(),[v,b]=y.useState(),[S,w]=y.useState(),_=y.useRef(new Map),C=y.useCallback((z,{deletedFetchers:D,flushSync:T,viewTransitionOpts:R})=>{z.fetchers.forEach((Z,J)=>{Z.data!==void 0&&_.current.set(J,Z.data)}),D.forEach(Z=>_.current.delete(Z)),ry(T===!1||a!=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 H=n.window!=null&&n.window.document!=null&&typeof n.window.document.startViewTransition=="function";if(ry(R==null||H,"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."),!R||!H){a&&T?a(()=>i(z)):y.startTransition(()=>i(z));return}if(a&&T){a(()=>{v&&(p&&p.resolve(),v.skipTransition()),d({isTransitioning:!0,flushSync:!0,currentLocation:R.currentLocation,nextLocation:R.nextLocation})});let Z=n.window.document.startViewTransition(()=>{a(()=>i(z))});Z.finished.finally(()=>{a(()=>{m(void 0),b(void 0),u(void 0),d({isTransitioning:!1})})}),a(()=>b(Z));return}v?(p&&p.resolve(),v.skipTransition(),w({state:z,currentLocation:R.currentLocation,nextLocation:R.nextLocation})):(u(z),d({isTransitioning:!0,flushSync:!1,currentLocation:R.currentLocation,nextLocation:R.nextLocation}))},[n.window,a,v,p]);y.useLayoutEffect(()=>n.subscribe(C),[n,C]),y.useEffect(()=>{f.isTransitioning&&!f.flushSync&&m(new $2)},[f]),y.useEffect(()=>{if(p&&s&&n.window){let z=s,D=p.promise,T=n.window.document.startViewTransition(async()=>{y.startTransition(()=>i(z)),await D});T.finished.finally(()=>{m(void 0),b(void 0),u(void 0),d({isTransitioning:!1})}),b(T)}},[s,p,n.window]),y.useEffect(()=>{p&&s&&l.location.key===s.location.key&&p.resolve()},[p,v,l.location,s]),y.useEffect(()=>{!f.isTransitioning&&S&&(u(S.state),d({isTransitioning:!0,flushSync:!1,currentLocation:S.currentLocation,nextLocation:S.nextLocation}),w(void 0))},[f.isTransitioning,S]);let j=y.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:z=>n.navigate(z),push:(z,D,T)=>n.navigate(z,{state:D,preventScrollReset:T?.preventScrollReset}),replace:(z,D,T)=>n.navigate(z,{replace:!0,state:D,preventScrollReset:T?.preventScrollReset})}),[n]),N=n.basename||"/",U=y.useMemo(()=>({router:n,navigator:j,static:!1,basename:N}),[n,j,N]);return y.createElement(y.Fragment,null,y.createElement(Qr.Provider,{value:U},y.createElement(Eo.Provider,{value:l},y.createElement(w0.Provider,{value:_.current},y.createElement(ah.Provider,{value:f},y.createElement(G2,{basename:N,location:l.location,navigationType:l.historyAction,navigator:j},y.createElement(Y2,{routes:n.routes,future:n.future,state:l})))))),null)}var Y2=y.memo(q2);function q2({routes:n,future:a,state:l}){return N2(n,void 0,l,a)}function K2({to:n,replace:a,state:l,relative:i}){Fe(Wl(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s}=y.useContext(kn);Et(!s,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:u}=y.useContext(Jn),{pathname:f}=dr(),d=Ou(),p=Ru(n,Nu(u),f,i==="path"),m=JSON.stringify(p);return y.useEffect(()=>{d(JSON.parse(m),{replace:a,state:l,relative:i})},[d,m,i,a,l]),null}function G2({basename:n="/",children:a=null,location:l,navigationType:i="POP",navigator:s,static:u=!1}){Fe(!Wl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=n.replace(/^\/*/,"/"),d=y.useMemo(()=>({basename:f,navigator:s,static:u,future:{}}),[f,s,u]);typeof l=="string"&&(l=Na(l));let{pathname:p="/",search:m="",hash:v="",state:b=null,key:S="default"}=l,w=y.useMemo(()=>{let _=Nn(p,f);return _==null?null:{location:{pathname:_,search:m,hash:v,state:b,key:S},navigationType:i}},[f,p,m,v,b,S,i]);return Et(w!=null,`<Router basename="${f}"> is not able to match the URL "${p}${m}${v}" because it does not start with the basename, so the <Router> won't render anything.`),w==null?null:y.createElement(kn.Provider,{value:d},y.createElement(ju.Provider,{children:a,value:w}))}var iu="get",ou="application/x-www-form-urlencoded";function Au(n){return n!=null&&typeof n.tagName=="string"}function F2(n){return Au(n)&&n.tagName.toLowerCase()==="button"}function X2(n){return Au(n)&&n.tagName.toLowerCase()==="form"}function Q2(n){return Au(n)&&n.tagName.toLowerCase()==="input"}function Z2(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function I2(n,a){return n.button===0&&(!a||a==="_self")&&!Z2(n)}var Gs=null;function J2(){if(Gs===null)try{new FormData(document.createElement("form"),0),Gs=!1}catch{Gs=!0}return Gs}var W2=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function cd(n){return n!=null&&!W2.has(n)?(Et(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ou}"`),null):n}function eC(n,a){let l,i,s,u,f;if(X2(n)){let d=n.getAttribute("action");i=d?Nn(d,a):null,l=n.getAttribute("method")||iu,s=cd(n.getAttribute("enctype"))||ou,u=new FormData(n)}else if(F2(n)||Q2(n)&&(n.type==="submit"||n.type==="image")){let d=n.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=n.getAttribute("formaction")||d.getAttribute("action");if(i=p?Nn(p,a):null,l=n.getAttribute("formmethod")||d.getAttribute("method")||iu,s=cd(n.getAttribute("formenctype"))||cd(d.getAttribute("enctype"))||ou,u=new FormData(d,n),!J2()){let{name:m,type:v,value:b}=n;if(v==="image"){let S=m?`${m}.`:"";u.append(`${S}x`,"0"),u.append(`${S}y`,"0")}else m&&u.append(m,b)}}else{if(Au(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');l=iu,i=null,s=ou,f=n}return u&&s==="text/plain"&&(f=u,u=void 0),{action:i,method:l.toLowerCase(),encType:s,formData:u,body:f}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function oh(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}function tC(n,a,l){let i=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return i.pathname==="/"?i.pathname=`_root.${l}`:a&&Nn(i.pathname,a)==="/"?i.pathname=`${a.replace(/\/$/,"")}/_root.${l}`:i.pathname=`${i.pathname.replace(/\/$/,"")}.${l}`,i}async function nC(n,a){if(n.id in a)return a[n.id];try{let l=await import(n.module);return a[n.id]=l,l}catch(l){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(l),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function aC(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 rC(n,a,l){let i=await Promise.all(n.map(async s=>{let u=a.routes[s.route.id];if(u){let f=await nC(u,l);return f.links?f.links():[]}return[]}));return sC(i.flat(1).filter(aC).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function ly(n,a,l,i,s,u){let f=(p,m)=>l[m]?p.route.id!==l[m].route.id:!0,d=(p,m)=>l[m].pathname!==p.pathname||l[m].route.path?.endsWith("*")&&l[m].params["*"]!==p.params["*"];return u==="assets"?a.filter((p,m)=>f(p,m)||d(p,m)):u==="data"?a.filter((p,m)=>{let v=i.routes[p.route.id];if(!v||!v.hasLoader)return!1;if(f(p,m)||d(p,m))return!0;if(p.route.shouldRevalidate){let b=p.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:l[0]?.params||{},nextUrl:new URL(n,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof b=="boolean")return b}return!0}):[]}function lC(n,a,{includeHydrateFallback:l}={}){return iC(n.map(i=>{let s=a.routes[i.route.id];if(!s)return[];let u=[s.module];return s.clientActionModule&&(u=u.concat(s.clientActionModule)),s.clientLoaderModule&&(u=u.concat(s.clientLoaderModule)),l&&s.hydrateFallbackModule&&(u=u.concat(s.hydrateFallbackModule)),s.imports&&(u=u.concat(s.imports)),u}).flat(1))}function iC(n){return[...new Set(n)]}function oC(n){let a={},l=Object.keys(n).sort();for(let i of l)a[i]=n[i];return a}function sC(n,a){let l=new Set;return new Set(a),n.reduce((i,s)=>{let u=JSON.stringify(oC(s));return l.has(u)||(l.add(u),i.push({key:u,link:s})),i},[])}function _0(){let n=y.useContext(Qr);return oh(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function uC(){let n=y.useContext(Eo);return oh(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var sh=y.createContext(void 0);sh.displayName="FrameworkContext";function N0(){let n=y.useContext(sh);return oh(n,"You must render this element inside a <HydratedRouter> element"),n}function cC(n,a){let l=y.useContext(sh),[i,s]=y.useState(!1),[u,f]=y.useState(!1),{onFocus:d,onBlur:p,onMouseEnter:m,onMouseLeave:v,onTouchStart:b}=a,S=y.useRef(null);y.useEffect(()=>{if(n==="render"&&f(!0),n==="viewport"){let C=N=>{N.forEach(U=>{f(U.isIntersecting)})},j=new IntersectionObserver(C,{threshold:.5});return S.current&&j.observe(S.current),()=>{j.disconnect()}}},[n]),y.useEffect(()=>{if(i){let C=setTimeout(()=>{f(!0)},100);return()=>{clearTimeout(C)}}},[i]);let w=()=>{s(!0)},_=()=>{s(!1),f(!1)};return l?n!=="intent"?[u,S,{}]:[u,S,{onFocus:io(d,w),onBlur:io(p,_),onMouseEnter:io(m,w),onMouseLeave:io(v,_),onTouchStart:io(b,w)}]:[!1,S,{}]}function io(n,a){return l=>{n&&n(l),l.defaultPrevented||a(l)}}function fC({page:n,...a}){let{router:l}=_0(),i=y.useMemo(()=>tr(l.routes,n,l.basename),[l.routes,n,l.basename]);return i?y.createElement(hC,{page:n,matches:i,...a}):null}function dC(n){let{manifest:a,routeModules:l}=N0(),[i,s]=y.useState([]);return y.useEffect(()=>{let u=!1;return rC(n,a,l).then(f=>{u||s(f)}),()=>{u=!0}},[n,a,l]),i}function hC({page:n,matches:a,...l}){let i=dr(),{manifest:s,routeModules:u}=N0(),{basename:f}=_0(),{loaderData:d,matches:p}=uC(),m=y.useMemo(()=>ly(n,a,p,s,i,"data"),[n,a,p,s,i]),v=y.useMemo(()=>ly(n,a,p,s,i,"assets"),[n,a,p,s,i]),b=y.useMemo(()=>{if(n===i.pathname+i.search+i.hash)return[];let _=new Set,C=!1;if(a.forEach(N=>{let U=s.routes[N.route.id];!U||!U.hasLoader||(!m.some(z=>z.route.id===N.route.id)&&N.route.id in d&&u[N.route.id]?.shouldRevalidate||U.hasClientLoader?C=!0:_.add(N.route.id))}),_.size===0)return[];let j=tC(n,f,"data");return C&&_.size>0&&j.searchParams.set("_routes",a.filter(N=>_.has(N.route.id)).map(N=>N.route.id).join(",")),[j.pathname+j.search]},[f,d,i,s,m,a,n,u]),S=y.useMemo(()=>lC(v,s),[v,s]),w=dC(v);return y.createElement(y.Fragment,null,b.map(_=>y.createElement("link",{key:_,rel:"prefetch",as:"fetch",href:_,...l})),S.map(_=>y.createElement("link",{key:_,rel:"modulepreload",href:_,...l})),w.map(({key:_,link:C})=>y.createElement("link",{key:_,...C})))}function mC(...n){return a=>{n.forEach(l=>{typeof l=="function"?l(a):l!=null&&(l.current=a)})}}var R0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{R0&&(window.__reactRouterVersion="7.7.0")}catch{}var j0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,O0=y.forwardRef(function({onClick:a,discover:l="render",prefetch:i="none",relative:s,reloadDocument:u,replace:f,state:d,target:p,to:m,preventScrollReset:v,viewTransition:b,...S},w){let{basename:_}=y.useContext(kn),C=typeof m=="string"&&j0.test(m),j,N=!1;if(typeof m=="string"&&C&&(j=m,R0))try{let J=new URL(window.location.href),ne=m.startsWith("//")?new URL(J.protocol+m):new URL(m),Se=Nn(ne.pathname,_);ne.origin===J.origin&&Se!=null?m=Se+ne.search+ne.hash:N=!0}catch{Et(!1,`<Link to="${m}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let U=C2(m,{relative:s}),[z,D,T]=cC(i,S),R=yC(m,{replace:f,state:d,target:p,preventScrollReset:v,relative:s,viewTransition:b});function H(J){a&&a(J),J.defaultPrevented||R(J)}let Z=y.createElement("a",{...S,...T,href:j||U,onClick:N||u?a:H,ref:mC(w,D),target:p,"data-discover":!C&&l==="render"?"true":void 0});return z&&!C?y.createElement(y.Fragment,null,Z,y.createElement(fC,{page:U})):Z});O0.displayName="Link";var pC=y.forwardRef(function({"aria-current":a="page",caseSensitive:l=!1,className:i="",end:s=!1,style:u,to:f,viewTransition:d,children:p,...m},v){let b=Co(f,{relative:m.relative}),S=dr(),w=y.useContext(Eo),{navigator:_,basename:C}=y.useContext(kn),j=w!=null&&EC(b)&&d===!0,N=_.encodeLocation?_.encodeLocation(b).pathname:b.pathname,U=S.pathname,z=w&&w.navigation&&w.navigation.location?w.navigation.location.pathname:null;l||(U=U.toLowerCase(),z=z?z.toLowerCase():null,N=N.toLowerCase()),z&&C&&(z=Nn(z,C)||z);const D=N!=="/"&&N.endsWith("/")?N.length-1:N.length;let T=U===N||!s&&U.startsWith(N)&&U.charAt(D)==="/",R=z!=null&&(z===N||!s&&z.startsWith(N)&&z.charAt(N.length)==="/"),H={isActive:T,isPending:R,isTransitioning:j},Z=T?a:void 0,J;typeof i=="function"?J=i(H):J=[i,T?"active":null,R?"pending":null,j?"transitioning":null].filter(Boolean).join(" ");let ne=typeof u=="function"?u(H):u;return y.createElement(O0,{...m,"aria-current":Z,className:J,ref:v,style:ne,to:f,viewTransition:d},typeof p=="function"?p(H):p)});pC.displayName="NavLink";var gC=y.forwardRef(({discover:n="render",fetcherKey:a,navigate:l,reloadDocument:i,replace:s,state:u,method:f=iu,action:d,onSubmit:p,relative:m,preventScrollReset:v,viewTransition:b,...S},w)=>{let _=wC(),C=SC(d,{relative:m}),j=f.toLowerCase()==="get"?"get":"post",N=typeof d=="string"&&j0.test(d),U=z=>{if(p&&p(z),z.defaultPrevented)return;z.preventDefault();let D=z.nativeEvent.submitter,T=D?.getAttribute("formmethod")||f;_(D||z.currentTarget,{fetcherKey:a,method:T,navigate:l,replace:s,state:u,relative:m,preventScrollReset:v,viewTransition:b})};return y.createElement("form",{ref:w,method:j,action:C,onSubmit:i?p:U,...S,"data-discover":!N&&n==="render"?"true":void 0})});gC.displayName="Form";function vC(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function A0(n){let a=y.useContext(Qr);return Fe(a,vC(n)),a}function yC(n,{target:a,replace:l,state:i,preventScrollReset:s,relative:u,viewTransition:f}={}){let d=Ou(),p=dr(),m=Co(n,{relative:u});return y.useCallback(v=>{if(I2(v,a)){v.preventDefault();let b=l!==void 0?l:ar(p)===ar(m);d(n,{replace:b,state:i,preventScrollReset:s,relative:u,viewTransition:f})}},[p,d,m,l,i,a,n,s,u,f])}var bC=0,xC=()=>`__${String(++bC)}__`;function wC(){let{router:n}=A0("useSubmit"),{basename:a}=y.useContext(kn),l=k2();return y.useCallback(async(i,s={})=>{let{action:u,method:f,encType:d,formData:p,body:m}=eC(i,a);if(s.navigate===!1){let v=s.fetcherKey||xC();await n.fetch(v,l,s.action||u,{preventScrollReset:s.preventScrollReset,formData:p,body:m,formMethod:s.method||f,formEncType:s.encType||d,flushSync:s.flushSync})}else await n.navigate(s.action||u,{preventScrollReset:s.preventScrollReset,formData:p,body:m,formMethod:s.method||f,formEncType:s.encType||d,replace:s.replace,state:s.state,fromRouteId:l,flushSync:s.flushSync,viewTransition:s.viewTransition})},[n,a,l])}function SC(n,{relative:a}={}){let{basename:l}=y.useContext(kn),i=y.useContext(Jn);Fe(i,"useFormAction must be used inside a RouteContext");let[s]=i.matches.slice(-1),u={...Co(n||".",{relative:a})},f=dr();if(n==null){u.search=f.search;let d=new URLSearchParams(u.search),p=d.getAll("index");if(p.some(v=>v==="")){d.delete("index"),p.filter(b=>b).forEach(b=>d.append("index",b));let v=d.toString();u.search=v?`?${v}`:""}}return(!n||n===".")&&s.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),l!=="/"&&(u.pathname=u.pathname==="/"?l:Xn([l,u.pathname])),ar(u)}function EC(n,a={}){let l=y.useContext(ah);Fe(l!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=A0("useViewTransitionState"),s=Co(n,{relative:a.relative});if(!l.isTransitioning)return!1;let u=Nn(l.currentLocation.pathname,i)||l.currentLocation.pathname,f=Nn(l.nextLocation.pathname,i)||l.nextLocation.pathname;return mu(s.pathname,f)!=null||mu(s.pathname,u)!=null}var Tu=i0();const CC=Zy(Tu);function _C(n){return y.createElement(V2,{flushSync:Tu.flushSync,...n})}function Wt(n,a,{checkForDefaultPrevented:l=!0}={}){return function(s){if(n?.(s),l===!1||!s.defaultPrevented)return a?.(s)}}function iy(n,a){if(typeof n=="function")return n(a);n!=null&&(n.current=a)}function Vr(...n){return a=>{let l=!1;const i=n.map(s=>{const u=iy(s,a);return!l&&typeof u=="function"&&(l=!0),u});if(l)return()=>{for(let s=0;s<i.length;s++){const u=i[s];typeof u=="function"?u():iy(n[s],null)}}}}function hn(...n){return y.useCallback(Vr(...n),n)}function NC(n,a){const l=y.createContext(a),i=u=>{const{children:f,...d}=u,p=y.useMemo(()=>d,Object.values(d));return g.jsx(l.Provider,{value:p,children:f})};i.displayName=n+"Provider";function s(u){const f=y.useContext(l);if(f)return f;if(a!==void 0)return a;throw new Error(`\`${u}\` must be used within \`${n}\``)}return[i,s]}function Mu(n,a=[]){let l=[];function i(u,f){const d=y.createContext(f),p=l.length;l=[...l,f];const m=b=>{const{scope:S,children:w,..._}=b,C=S?.[n]?.[p]||d,j=y.useMemo(()=>_,Object.values(_));return g.jsx(C.Provider,{value:j,children:w})};m.displayName=u+"Provider";function v(b,S){const w=S?.[n]?.[p]||d,_=y.useContext(w);if(_)return _;if(f!==void 0)return f;throw new Error(`\`${b}\` must be used within \`${u}\``)}return[m,v]}const s=()=>{const u=l.map(f=>y.createContext(f));return function(d){const p=d?.[n]||u;return y.useMemo(()=>({[`__scope${n}`]:{...d,[n]:p}}),[d,p])}};return s.scopeName=n,[i,RC(s,...a)]}function RC(...n){const a=n[0];if(n.length===1)return a;const l=()=>{const i=n.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(u){const f=i.reduce((d,{useScope:p,scopeName:m})=>{const b=p(u)[`__scope${m}`];return{...d,...b}},{});return y.useMemo(()=>({[`__scope${a.scopeName}`]:f}),[f])}};return l.scopeName=a.scopeName,l}var rr=globalThis?.document?y.useLayoutEffect:()=>{},jC=Wy[" useId ".trim().toString()]||(()=>{}),OC=0;function Qn(n){const[a,l]=y.useState(jC());return rr(()=>{l(i=>i??String(OC++))},[n]),n||(a?`radix-${a}`:"")}var AC=Wy[" useInsertionEffect ".trim().toString()]||rr;function uh({prop:n,defaultProp:a,onChange:l=()=>{},caller:i}){const[s,u,f]=TC({defaultProp:a,onChange:l}),d=n!==void 0,p=d?n:s;{const v=y.useRef(n!==void 0);y.useEffect(()=>{const b=v.current;b!==d&&console.warn(`${i} is changing from ${b?"controlled":"uncontrolled"} to ${d?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),v.current=d},[d,i])}const m=y.useCallback(v=>{if(d){const b=MC(v)?v(n):v;b!==n&&f.current?.(b)}else u(v)},[d,n,u,f]);return[p,m]}function TC({defaultProp:n,onChange:a}){const[l,i]=y.useState(n),s=y.useRef(l),u=y.useRef(a);return AC(()=>{u.current=a},[a]),y.useEffect(()=>{s.current!==l&&(u.current?.(l),s.current=l)},[l,s]),[l,i,u]}function MC(n){return typeof n=="function"}function Du(n){const a=LC(n),l=y.forwardRef((i,s)=>{const{children:u,...f}=i,d=y.Children.toArray(u),p=d.find(zC);if(p){const m=p.props.children,v=d.map(b=>b===p?y.Children.count(m)>1?y.Children.only(null):y.isValidElement(m)?m.props.children:null:b);return g.jsx(a,{...f,ref:s,children:y.isValidElement(m)?y.cloneElement(m,void 0,v):null})}return g.jsx(a,{...f,ref:s,children:u})});return l.displayName=`${n}.Slot`,l}var DC=Du("Slot");function LC(n){const a=y.forwardRef((l,i)=>{const{children:s,...u}=l;if(y.isValidElement(s)){const f=PC(s),d=UC(u,s.props);return s.type!==y.Fragment&&(d.ref=i?Vr(i,f):f),y.cloneElement(s,d)}return y.Children.count(s)>1?y.Children.only(null):null});return a.displayName=`${n}.SlotClone`,a}var kC=Symbol("radix.slottable");function zC(n){return y.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===kC}function UC(n,a){const l={...a};for(const i in a){const s=n[i],u=a[i];/^on[A-Z]/.test(i)?s&&u?l[i]=(...d)=>{const p=u(...d);return s(...d),p}:s&&(l[i]=s):i==="style"?l[i]={...s,...u}:i==="className"&&(l[i]=[s,u].filter(Boolean).join(" "))}return{...n,...l}}function PC(n){let a=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,l=a&&"isReactWarning"in a&&a.isReactWarning;return l?n.ref:(a=Object.getOwnPropertyDescriptor(n,"ref")?.get,l=a&&"isReactWarning"in a&&a.isReactWarning,l?n.props.ref:n.props.ref||n.ref)}var HC=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],dt=HC.reduce((n,a)=>{const l=Du(`Primitive.${a}`),i=y.forwardRef((s,u)=>{const{asChild:f,...d}=s,p=f?l:a;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(p,{...d,ref:u})});return i.displayName=`Primitive.${a}`,{...n,[a]:i}},{});function BC(n,a){n&&Tu.flushSync(()=>n.dispatchEvent(a))}function Zl(n){const a=y.useRef(n);return y.useEffect(()=>{a.current=n}),y.useMemo(()=>(...l)=>a.current?.(...l),[])}function $C(n,a=globalThis?.document){const l=Zl(n);y.useEffect(()=>{const i=s=>{s.key==="Escape"&&l(s)};return a.addEventListener("keydown",i,{capture:!0}),()=>a.removeEventListener("keydown",i,{capture:!0})},[l,a])}var VC="DismissableLayer",Pd="dismissableLayer.update",YC="dismissableLayer.pointerDownOutside",qC="dismissableLayer.focusOutside",oy,T0=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ch=y.forwardRef((n,a)=>{const{disableOutsidePointerEvents:l=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:u,onInteractOutside:f,onDismiss:d,...p}=n,m=y.useContext(T0),[v,b]=y.useState(null),S=v?.ownerDocument??globalThis?.document,[,w]=y.useState({}),_=hn(a,H=>b(H)),C=Array.from(m.layers),[j]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),N=C.indexOf(j),U=v?C.indexOf(v):-1,z=m.layersWithOutsidePointerEventsDisabled.size>0,D=U>=N,T=FC(H=>{const Z=H.target,J=[...m.branches].some(ne=>ne.contains(Z));!D||J||(s?.(H),f?.(H),H.defaultPrevented||d?.())},S),R=XC(H=>{const Z=H.target;[...m.branches].some(ne=>ne.contains(Z))||(u?.(H),f?.(H),H.defaultPrevented||d?.())},S);return $C(H=>{U===m.layers.size-1&&(i?.(H),!H.defaultPrevented&&d&&(H.preventDefault(),d()))},S),y.useEffect(()=>{if(v)return l&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(oy=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(v)),m.layers.add(v),sy(),()=>{l&&m.layersWithOutsidePointerEventsDisabled.size===1&&(S.body.style.pointerEvents=oy)}},[v,S,l,m]),y.useEffect(()=>()=>{v&&(m.layers.delete(v),m.layersWithOutsidePointerEventsDisabled.delete(v),sy())},[v,m]),y.useEffect(()=>{const H=()=>w({});return document.addEventListener(Pd,H),()=>document.removeEventListener(Pd,H)},[]),g.jsx(dt.div,{...p,ref:_,style:{pointerEvents:z?D?"auto":"none":void 0,...n.style},onFocusCapture:Wt(n.onFocusCapture,R.onFocusCapture),onBlurCapture:Wt(n.onBlurCapture,R.onBlurCapture),onPointerDownCapture:Wt(n.onPointerDownCapture,T.onPointerDownCapture)})});ch.displayName=VC;var KC="DismissableLayerBranch",GC=y.forwardRef((n,a)=>{const l=y.useContext(T0),i=y.useRef(null),s=hn(a,i);return y.useEffect(()=>{const u=i.current;if(u)return l.branches.add(u),()=>{l.branches.delete(u)}},[l.branches]),g.jsx(dt.div,{...n,ref:s})});GC.displayName=KC;function FC(n,a=globalThis?.document){const l=Zl(n),i=y.useRef(!1),s=y.useRef(()=>{});return y.useEffect(()=>{const u=d=>{if(d.target&&!i.current){let p=function(){M0(YC,l,m,{discrete:!0})};const m={originalEvent:d};d.pointerType==="touch"?(a.removeEventListener("click",s.current),s.current=p,a.addEventListener("click",s.current,{once:!0})):p()}else a.removeEventListener("click",s.current);i.current=!1},f=window.setTimeout(()=>{a.addEventListener("pointerdown",u)},0);return()=>{window.clearTimeout(f),a.removeEventListener("pointerdown",u),a.removeEventListener("click",s.current)}},[a,l]),{onPointerDownCapture:()=>i.current=!0}}function XC(n,a=globalThis?.document){const l=Zl(n),i=y.useRef(!1);return y.useEffect(()=>{const s=u=>{u.target&&!i.current&&M0(qC,l,{originalEvent:u},{discrete:!1})};return a.addEventListener("focusin",s),()=>a.removeEventListener("focusin",s)},[a,l]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function sy(){const n=new CustomEvent(Pd);document.dispatchEvent(n)}function M0(n,a,l,{discrete:i}){const s=l.originalEvent.target,u=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:l});a&&s.addEventListener(n,a,{once:!0}),i?BC(s,u):s.dispatchEvent(u)}var fd="focusScope.autoFocusOnMount",dd="focusScope.autoFocusOnUnmount",uy={bubbles:!1,cancelable:!0},QC="FocusScope",fh=y.forwardRef((n,a)=>{const{loop:l=!1,trapped:i=!1,onMountAutoFocus:s,onUnmountAutoFocus:u,...f}=n,[d,p]=y.useState(null),m=Zl(s),v=Zl(u),b=y.useRef(null),S=hn(a,C=>p(C)),w=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(i){let C=function(z){if(w.paused||!d)return;const D=z.target;d.contains(D)?b.current=D:er(b.current,{select:!0})},j=function(z){if(w.paused||!d)return;const D=z.relatedTarget;D!==null&&(d.contains(D)||er(b.current,{select:!0}))},N=function(z){if(document.activeElement===document.body)for(const T of z)T.removedNodes.length>0&&er(d)};document.addEventListener("focusin",C),document.addEventListener("focusout",j);const U=new MutationObserver(N);return d&&U.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",C),document.removeEventListener("focusout",j),U.disconnect()}}},[i,d,w.paused]),y.useEffect(()=>{if(d){fy.add(w);const C=document.activeElement;if(!d.contains(C)){const N=new CustomEvent(fd,uy);d.addEventListener(fd,m),d.dispatchEvent(N),N.defaultPrevented||(ZC(t_(D0(d)),{select:!0}),document.activeElement===C&&er(d))}return()=>{d.removeEventListener(fd,m),setTimeout(()=>{const N=new CustomEvent(dd,uy);d.addEventListener(dd,v),d.dispatchEvent(N),N.defaultPrevented||er(C??document.body,{select:!0}),d.removeEventListener(dd,v),fy.remove(w)},0)}}},[d,m,v,w]);const _=y.useCallback(C=>{if(!l&&!i||w.paused)return;const j=C.key==="Tab"&&!C.altKey&&!C.ctrlKey&&!C.metaKey,N=document.activeElement;if(j&&N){const U=C.currentTarget,[z,D]=IC(U);z&&D?!C.shiftKey&&N===D?(C.preventDefault(),l&&er(z,{select:!0})):C.shiftKey&&N===z&&(C.preventDefault(),l&&er(D,{select:!0})):N===U&&C.preventDefault()}},[l,i,w.paused]);return g.jsx(dt.div,{tabIndex:-1,...f,ref:S,onKeyDown:_})});fh.displayName=QC;function ZC(n,{select:a=!1}={}){const l=document.activeElement;for(const i of n)if(er(i,{select:a}),document.activeElement!==l)return}function IC(n){const a=D0(n),l=cy(a,n),i=cy(a.reverse(),n);return[l,i]}function D0(n){const a=[],l=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const s=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||s?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;l.nextNode();)a.push(l.currentNode);return a}function cy(n,a){for(const l of n)if(!JC(l,{upTo:a}))return l}function JC(n,{upTo:a}){if(getComputedStyle(n).visibility==="hidden")return!0;for(;n;){if(a!==void 0&&n===a)return!1;if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}function WC(n){return n instanceof HTMLInputElement&&"select"in n}function er(n,{select:a=!1}={}){if(n&&n.focus){const l=document.activeElement;n.focus({preventScroll:!0}),n!==l&&WC(n)&&a&&n.select()}}var fy=e_();function e_(){let n=[];return{add(a){const l=n[0];a!==l&&l?.pause(),n=dy(n,a),n.unshift(a)},remove(a){n=dy(n,a),n[0]?.resume()}}}function dy(n,a){const l=[...n],i=l.indexOf(a);return i!==-1&&l.splice(i,1),l}function t_(n){return n.filter(a=>a.tagName!=="A")}var n_="Portal",dh=y.forwardRef((n,a)=>{const{container:l,...i}=n,[s,u]=y.useState(!1);rr(()=>u(!0),[]);const f=l||s&&globalThis?.document?.body;return f?CC.createPortal(g.jsx(dt.div,{...i,ref:a}),f):null});dh.displayName=n_;function a_(n,a){return y.useReducer((l,i)=>a[l][i]??l,n)}var ei=n=>{const{present:a,children:l}=n,i=r_(a),s=typeof l=="function"?l({present:i.isPresent}):y.Children.only(l),u=hn(i.ref,l_(s));return typeof l=="function"||i.isPresent?y.cloneElement(s,{ref:u}):null};ei.displayName="Presence";function r_(n){const[a,l]=y.useState(),i=y.useRef(null),s=y.useRef(n),u=y.useRef("none"),f=n?"mounted":"unmounted",[d,p]=a_(f,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const m=Fs(i.current);u.current=d==="mounted"?m:"none"},[d]),rr(()=>{const m=i.current,v=s.current;if(v!==n){const S=u.current,w=Fs(m);n?p("MOUNT"):w==="none"||m?.display==="none"?p("UNMOUNT"):p(v&&S!==w?"ANIMATION_OUT":"UNMOUNT"),s.current=n}},[n,p]),rr(()=>{if(a){let m;const v=a.ownerDocument.defaultView??window,b=w=>{const C=Fs(i.current).includes(w.animationName);if(w.target===a&&C&&(p("ANIMATION_END"),!s.current)){const j=a.style.animationFillMode;a.style.animationFillMode="forwards",m=v.setTimeout(()=>{a.style.animationFillMode==="forwards"&&(a.style.animationFillMode=j)})}},S=w=>{w.target===a&&(u.current=Fs(i.current))};return a.addEventListener("animationstart",S),a.addEventListener("animationcancel",b),a.addEventListener("animationend",b),()=>{v.clearTimeout(m),a.removeEventListener("animationstart",S),a.removeEventListener("animationcancel",b),a.removeEventListener("animationend",b)}}else p("ANIMATION_END")},[a,p]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:y.useCallback(m=>{i.current=m?getComputedStyle(m):null,l(m)},[])}}function Fs(n){return n?.animationName||"none"}function l_(n){let a=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,l=a&&"isReactWarning"in a&&a.isReactWarning;return l?n.ref:(a=Object.getOwnPropertyDescriptor(n,"ref")?.get,l=a&&"isReactWarning"in a&&a.isReactWarning,l?n.props.ref:n.props.ref||n.ref)}var hd=0;function L0(){y.useEffect(()=>{const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",n[0]??hy()),document.body.insertAdjacentElement("beforeend",n[1]??hy()),hd++,()=>{hd===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(a=>a.remove()),hd--}},[])}function hy(){const n=document.createElement("span");return n.setAttribute("data-radix-focus-guard",""),n.tabIndex=0,n.style.outline="none",n.style.opacity="0",n.style.position="fixed",n.style.pointerEvents="none",n}var Kn=function(){return Kn=Object.assign||function(a){for(var l,i=1,s=arguments.length;i<s;i++){l=arguments[i];for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(a[u]=l[u])}return a},Kn.apply(this,arguments)};function k0(n,a){var l={};for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&a.indexOf(i)<0&&(l[i]=n[i]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,i=Object.getOwnPropertySymbols(n);s<i.length;s++)a.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(n,i[s])&&(l[i[s]]=n[i[s]]);return l}function i_(n,a,l){if(l||arguments.length===2)for(var i=0,s=a.length,u;i<s;i++)(u||!(i in a))&&(u||(u=Array.prototype.slice.call(a,0,i)),u[i]=a[i]);return n.concat(u||Array.prototype.slice.call(a))}var su="right-scroll-bar-position",uu="width-before-scroll-bar",o_="with-scroll-bars-hidden",s_="--removed-body-scroll-bar-size";function md(n,a){return typeof n=="function"?n(a):n&&(n.current=a),n}function u_(n,a){var l=y.useState(function(){return{value:n,callback:a,facade:{get current(){return l.value},set current(i){var s=l.value;s!==i&&(l.value=i,l.callback(i,s))}}}})[0];return l.callback=a,l.facade}var c_=typeof window<"u"?y.useLayoutEffect:y.useEffect,my=new WeakMap;function f_(n,a){var l=u_(null,function(i){return n.forEach(function(s){return md(s,i)})});return c_(function(){var i=my.get(l);if(i){var s=new Set(i),u=new Set(n),f=l.current;s.forEach(function(d){u.has(d)||md(d,null)}),u.forEach(function(d){s.has(d)||md(d,f)})}my.set(l,n)},[n]),l}function d_(n){return n}function h_(n,a){a===void 0&&(a=d_);var l=[],i=!1,s={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return l.length?l[l.length-1]:n},useMedium:function(u){var f=a(u,i);return l.push(f),function(){l=l.filter(function(d){return d!==f})}},assignSyncMedium:function(u){for(i=!0;l.length;){var f=l;l=[],f.forEach(u)}l={push:function(d){return u(d)},filter:function(){return l}}},assignMedium:function(u){i=!0;var f=[];if(l.length){var d=l;l=[],d.forEach(u),f=l}var p=function(){var v=f;f=[],v.forEach(u)},m=function(){return Promise.resolve().then(p)};m(),l={push:function(v){f.push(v),m()},filter:function(v){return f=f.filter(v),l}}}};return s}function m_(n){n===void 0&&(n={});var a=h_(null);return a.options=Kn({async:!0,ssr:!1},n),a}var z0=function(n){var a=n.sideCar,l=k0(n,["sideCar"]);if(!a)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=a.read();if(!i)throw new Error("Sidecar medium not found");return y.createElement(i,Kn({},l))};z0.isSideCarExport=!0;function p_(n,a){return n.useMedium(a),z0}var U0=m_(),pd=function(){},Lu=y.forwardRef(function(n,a){var l=y.useRef(null),i=y.useState({onScrollCapture:pd,onWheelCapture:pd,onTouchMoveCapture:pd}),s=i[0],u=i[1],f=n.forwardProps,d=n.children,p=n.className,m=n.removeScrollBar,v=n.enabled,b=n.shards,S=n.sideCar,w=n.noRelative,_=n.noIsolation,C=n.inert,j=n.allowPinchZoom,N=n.as,U=N===void 0?"div":N,z=n.gapMode,D=k0(n,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),T=S,R=f_([l,a]),H=Kn(Kn({},D),s);return y.createElement(y.Fragment,null,v&&y.createElement(T,{sideCar:U0,removeScrollBar:m,shards:b,noRelative:w,noIsolation:_,inert:C,setCallbacks:u,allowPinchZoom:!!j,lockRef:l,gapMode:z}),f?y.cloneElement(y.Children.only(d),Kn(Kn({},H),{ref:R})):y.createElement(U,Kn({},H,{className:p,ref:R}),d))});Lu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Lu.classNames={fullWidth:uu,zeroRight:su};var g_=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function v_(){if(!document)return null;var n=document.createElement("style");n.type="text/css";var a=g_();return a&&n.setAttribute("nonce",a),n}function y_(n,a){n.styleSheet?n.styleSheet.cssText=a:n.appendChild(document.createTextNode(a))}function b_(n){var a=document.head||document.getElementsByTagName("head")[0];a.appendChild(n)}var x_=function(){var n=0,a=null;return{add:function(l){n==0&&(a=v_())&&(y_(a,l),b_(a)),n++},remove:function(){n--,!n&&a&&(a.parentNode&&a.parentNode.removeChild(a),a=null)}}},w_=function(){var n=x_();return function(a,l){y.useEffect(function(){return n.add(a),function(){n.remove()}},[a&&l])}},P0=function(){var n=w_(),a=function(l){var i=l.styles,s=l.dynamic;return n(i,s),null};return a},S_={left:0,top:0,right:0,gap:0},gd=function(n){return parseInt(n||"",10)||0},E_=function(n){var a=window.getComputedStyle(document.body),l=a[n==="padding"?"paddingLeft":"marginLeft"],i=a[n==="padding"?"paddingTop":"marginTop"],s=a[n==="padding"?"paddingRight":"marginRight"];return[gd(l),gd(i),gd(s)]},C_=function(n){if(n===void 0&&(n="margin"),typeof window>"u")return S_;var a=E_(n),l=document.documentElement.clientWidth,i=window.innerWidth;return{left:a[0],top:a[1],right:a[2],gap:Math.max(0,i-l+a[2]-a[0])}},__=P0(),Fl="data-scroll-locked",N_=function(n,a,l,i){var s=n.left,u=n.top,f=n.right,d=n.gap;return l===void 0&&(l="margin"),`
|
|
68
|
-
.`.concat(
|
|
67
|
+
Please change the parent <Route path="${N}"> to <Route path="${N==="/"?"*":`${N}/*`}">.`)}let b=mr(),w;w=b;let S=w.pathname||"/",C=S;if(m!=="/"){let N=m.replace(/^\//,"").split("/");C="/"+S.replace(/^\//,"").split("/").slice(N.length).join("/")}let _=ar(n,{pathname:C});return _t(v||_!=null,`No routes matched location "${w.pathname}${w.search}${w.hash}" `),_t(_==null||_[_.length-1].route.element!==void 0||_[_.length-1].route.Component!==void 0||_[_.length-1].route.lazy!==void 0,`Matched leaf route at location "${w.pathname}${w.search}${w.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.`),A2(_&&_.map(N=>Object.assign({},N,{params:Object.assign({},d,N.params),pathname:Jn([m,s.encodeLocation?s.encodeLocation(N.pathname).pathname:N.pathname]),pathnameBase:N.pathnameBase==="/"?m:Jn([m,s.encodeLocation?s.encodeLocation(N.pathnameBase).pathname:N.pathnameBase])})),u,l,i)}function N2(){let n=k2(),a=yo(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),l=n instanceof Error?n.stack:null,i="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:i},u={padding:"2px 4px",backgroundColor:i},f=null;return console.error("Error handled by React Router default ErrorBoundary:",n),f=y.createElement(y.Fragment,null,y.createElement("p",null,"💿 Hey developer 👋"),y.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",y.createElement("code",{style:u},"ErrorBoundary")," or"," ",y.createElement("code",{style:u},"errorElement")," prop on your route.")),y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},a),l?y.createElement("pre",{style:s},l):null,f)}var R2=y.createElement(N2,null),j2=class extends y.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,a){return a.location!==n.location||a.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:a.error,location:a.location,revalidation:n.revalidation||a.revalidation}}componentDidCatch(n,a){console.error("React Router caught the following error during render",n,a)}render(){return this.state.error!==void 0?y.createElement(na.Provider,{value:this.props.routeContext},y.createElement(ah.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function O2({routeContext:n,match:a,children:l}){let i=y.useContext(Ir);return i&&i.static&&i.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=a.route.id),y.createElement(na.Provider,{value:n},l)}function A2(n,a=[],l=null,i=null){if(n==null){if(!l)return null;if(l.errors)n=l.matches;else if(a.length===0&&!l.initialized&&l.matches.length>0)n=l.matches;else return null}let s=n,u=l?.errors;if(u!=null){let p=s.findIndex(m=>m.route.id&&u?.[m.route.id]!==void 0);Ge(p>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(u).join(",")}`),s=s.slice(0,Math.min(s.length,p+1))}let f=!1,d=-1;if(l)for(let p=0;p<s.length;p++){let m=s[p];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(d=p),m.route.id){let{loaderData:v,errors:b}=l,w=m.route.loader&&!v.hasOwnProperty(m.route.id)&&(!b||b[m.route.id]===void 0);if(m.route.lazy||w){f=!0,d>=0?s=s.slice(0,d+1):s=[s[0]];break}}}return s.reduceRight((p,m,v)=>{let b,w=!1,S=null,C=null;l&&(b=u&&m.route.id?u[m.route.id]:void 0,S=m.route.errorElement||R2,f&&(d<0&&v===0?(S0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,C=null):d===v&&(w=!0,C=m.route.hydrateFallbackElement||null)));let _=a.concat(s.slice(0,v+1)),j=()=>{let N;return b?N=S:w?N=C:m.route.Component?N=y.createElement(m.route.Component,null):m.route.element?N=m.route.element:N=p,y.createElement(O2,{match:m,routeContext:{outlet:p,matches:_,isDataRoute:l!=null},children:N})};return l&&(m.route.ErrorBoundary||m.route.errorElement||v===0)?y.createElement(j2,{location:l.location,revalidation:l.revalidation,component:S,error:b,children:j(),routeContext:{outlet:null,matches:_,isDataRoute:!0}}):j()},null)}function rh(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function T2(n){let a=y.useContext(Ir);return Ge(a,rh(n)),a}function M2(n){let a=y.useContext(Eo);return Ge(a,rh(n)),a}function D2(n){let a=y.useContext(na);return Ge(a,rh(n)),a}function lh(n){let a=D2(n),l=a.matches[a.matches.length-1];return Ge(l.route.id,`${n} can only be used on routes that contain a unique "id"`),l.route.id}function L2(){return lh("useRouteId")}function k2(){let n=y.useContext(ah),a=M2("useRouteError"),l=lh("useRouteError");return n!==void 0?n:a.errors?.[l]}function z2(){let{router:n}=T2("useNavigate"),a=lh("useNavigate"),l=y.useRef(!1);return w0(()=>{l.current=!0}),y.useCallback(async(s,u={})=>{_t(l.current,x0),l.current&&(typeof s=="number"?n.navigate(s):await n.navigate(s,{fromRouteId:a,...u}))},[n,a])}var ty={};function S0(n,a,l){!a&&!ty[n]&&(ty[n]=!0,_t(!1,l))}var ny={};function ay(n,a){!n&&!ny[a]&&(ny[a]=!0,console.warn(a))}function U2(n){let a={hasErrorBoundary:n.hasErrorBoundary||n.ErrorBoundary!=null||n.errorElement!=null};return n.Component&&(n.element&&_t(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(a,{element:y.createElement(n.Component),Component:void 0})),n.HydrateFallback&&(n.hydrateFallbackElement&&_t(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(a,{hydrateFallbackElement:y.createElement(n.HydrateFallback),HydrateFallback:void 0})),n.ErrorBoundary&&(n.errorElement&&_t(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(a,{errorElement:y.createElement(n.ErrorBoundary),ErrorBoundary:void 0})),a}var P2=["HydrateFallback","hydrateFallbackElement"];function H2(n,a){return a2({basename:a?.basename,unstable_getContext:a?.unstable_getContext,future:a?.future,history:SE({initialEntries:a?.initialEntries,initialIndex:a?.initialIndex}),hydrationData:a?.hydrationData,routes:n,hydrationRouteProperties:P2,mapRouteProperties:U2,dataStrategy:a?.dataStrategy,patchRoutesOnNavigation:a?.patchRoutesOnNavigation}).initialize()}var B2=class{constructor(){this.status="pending",this.promise=new Promise((n,a)=>{this.resolve=l=>{this.status==="pending"&&(this.status="resolved",n(l))},this.reject=l=>{this.status==="pending"&&(this.status="rejected",a(l))}})}};function $2({router:n,flushSync:a}){let[l,i]=y.useState(n.state),[s,u]=y.useState(),[f,d]=y.useState({isTransitioning:!1}),[p,m]=y.useState(),[v,b]=y.useState(),[w,S]=y.useState(),C=y.useRef(new Map),_=y.useCallback((k,{deletedFetchers:H,flushSync:D,viewTransitionOpts:R})=>{k.fetchers.forEach((Z,ne)=>{Z.data!==void 0&&C.current.set(ne,Z.data)}),H.forEach(Z=>C.current.delete(Z)),ay(D===!1||a!=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 B=n.window!=null&&n.window.document!=null&&typeof n.window.document.startViewTransition=="function";if(ay(R==null||B,"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."),!R||!B){a&&D?a(()=>i(k)):y.startTransition(()=>i(k));return}if(a&&D){a(()=>{v&&(p&&p.resolve(),v.skipTransition()),d({isTransitioning:!0,flushSync:!0,currentLocation:R.currentLocation,nextLocation:R.nextLocation})});let Z=n.window.document.startViewTransition(()=>{a(()=>i(k))});Z.finished.finally(()=>{a(()=>{m(void 0),b(void 0),u(void 0),d({isTransitioning:!1})})}),a(()=>b(Z));return}v?(p&&p.resolve(),v.skipTransition(),S({state:k,currentLocation:R.currentLocation,nextLocation:R.nextLocation})):(u(k),d({isTransitioning:!0,flushSync:!1,currentLocation:R.currentLocation,nextLocation:R.nextLocation}))},[n.window,a,v,p]);y.useLayoutEffect(()=>n.subscribe(_),[n,_]),y.useEffect(()=>{f.isTransitioning&&!f.flushSync&&m(new B2)},[f]),y.useEffect(()=>{if(p&&s&&n.window){let k=s,H=p.promise,D=n.window.document.startViewTransition(async()=>{y.startTransition(()=>i(k)),await H});D.finished.finally(()=>{m(void 0),b(void 0),u(void 0),d({isTransitioning:!1})}),b(D)}},[s,p,n.window]),y.useEffect(()=>{p&&s&&l.location.key===s.location.key&&p.resolve()},[p,v,l.location,s]),y.useEffect(()=>{!f.isTransitioning&&w&&(u(w.state),d({isTransitioning:!0,flushSync:!1,currentLocation:w.currentLocation,nextLocation:w.nextLocation}),S(void 0))},[f.isTransitioning,w]);let j=y.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:k=>n.navigate(k),push:(k,H,D)=>n.navigate(k,{state:H,preventScrollReset:D?.preventScrollReset}),replace:(k,H,D)=>n.navigate(k,{replace:!0,state:H,preventScrollReset:D?.preventScrollReset})}),[n]),N=n.basename||"/",z=y.useMemo(()=>({router:n,navigator:j,static:!1,basename:N}),[n,j,N]);return y.createElement(y.Fragment,null,y.createElement(Ir.Provider,{value:z},y.createElement(Eo.Provider,{value:l},y.createElement(b0.Provider,{value:C.current},y.createElement(nh.Provider,{value:f},y.createElement(F2,{basename:N,location:l.location,navigationType:l.historyAction,navigator:j},y.createElement(V2,{routes:n.routes,future:n.future,state:l})))))),null)}var V2=y.memo(Y2);function Y2({routes:n,future:a,state:l}){return C2(n,void 0,l,a)}function q2({to:n,replace:a,state:l,relative:i}){Ge(Wl(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s}=y.useContext(Pn);_t(!s,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:u}=y.useContext(na),{pathname:f}=mr(),d=Ru(),p=Cu(n,_u(u),f,i==="path"),m=JSON.stringify(p);return y.useEffect(()=>{d(JSON.parse(m),{replace:a,state:l,relative:i})},[d,m,i,a,l]),null}function F2({basename:n="/",children:a=null,location:l,navigationType:i="POP",navigator:s,static:u=!1}){Ge(!Wl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=n.replace(/^\/*/,"/"),d=y.useMemo(()=>({basename:f,navigator:s,static:u,future:{}}),[f,s,u]);typeof l=="string"&&(l=Oa(l));let{pathname:p="/",search:m="",hash:v="",state:b=null,key:w="default"}=l,S=y.useMemo(()=>{let C=An(p,f);return C==null?null:{location:{pathname:C,search:m,hash:v,state:b,key:w},navigationType:i}},[f,p,m,v,b,w,i]);return _t(S!=null,`<Router basename="${f}"> is not able to match the URL "${p}${m}${v}" because it does not start with the basename, so the <Router> won't render anything.`),S==null?null:y.createElement(Pn.Provider,{value:d},y.createElement(Nu.Provider,{children:a,value:S}))}var iu="get",ou="application/x-www-form-urlencoded";function ju(n){return n!=null&&typeof n.tagName=="string"}function K2(n){return ju(n)&&n.tagName.toLowerCase()==="button"}function G2(n){return ju(n)&&n.tagName.toLowerCase()==="form"}function X2(n){return ju(n)&&n.tagName.toLowerCase()==="input"}function Q2(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function Z2(n,a){return n.button===0&&(!a||a==="_self")&&!Q2(n)}var Ks=null;function I2(){if(Ks===null)try{new FormData(document.createElement("form"),0),Ks=!1}catch{Ks=!0}return Ks}var J2=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function sd(n){return n!=null&&!J2.has(n)?(_t(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ou}"`),null):n}function W2(n,a){let l,i,s,u,f;if(G2(n)){let d=n.getAttribute("action");i=d?An(d,a):null,l=n.getAttribute("method")||iu,s=sd(n.getAttribute("enctype"))||ou,u=new FormData(n)}else if(K2(n)||X2(n)&&(n.type==="submit"||n.type==="image")){let d=n.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=n.getAttribute("formaction")||d.getAttribute("action");if(i=p?An(p,a):null,l=n.getAttribute("formmethod")||d.getAttribute("method")||iu,s=sd(n.getAttribute("formenctype"))||sd(d.getAttribute("enctype"))||ou,u=new FormData(d,n),!I2()){let{name:m,type:v,value:b}=n;if(v==="image"){let w=m?`${m}.`:"";u.append(`${w}x`,"0"),u.append(`${w}y`,"0")}else m&&u.append(m,b)}}else{if(ju(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');l=iu,i=null,s=ou,f=n}return u&&s==="text/plain"&&(f=u,u=void 0),{action:i,method:l.toLowerCase(),encType:s,formData:u,body:f}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function ih(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}function e_(n,a,l){let i=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return i.pathname==="/"?i.pathname=`_root.${l}`:a&&An(i.pathname,a)==="/"?i.pathname=`${a.replace(/\/$/,"")}/_root.${l}`:i.pathname=`${i.pathname.replace(/\/$/,"")}.${l}`,i}async function t_(n,a){if(n.id in a)return a[n.id];try{let l=await import(n.module);return a[n.id]=l,l}catch(l){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(l),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function n_(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 a_(n,a,l){let i=await Promise.all(n.map(async s=>{let u=a.routes[s.route.id];if(u){let f=await t_(u,l);return f.links?f.links():[]}return[]}));return o_(i.flat(1).filter(n_).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function ry(n,a,l,i,s,u){let f=(p,m)=>l[m]?p.route.id!==l[m].route.id:!0,d=(p,m)=>l[m].pathname!==p.pathname||l[m].route.path?.endsWith("*")&&l[m].params["*"]!==p.params["*"];return u==="assets"?a.filter((p,m)=>f(p,m)||d(p,m)):u==="data"?a.filter((p,m)=>{let v=i.routes[p.route.id];if(!v||!v.hasLoader)return!1;if(f(p,m)||d(p,m))return!0;if(p.route.shouldRevalidate){let b=p.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:l[0]?.params||{},nextUrl:new URL(n,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof b=="boolean")return b}return!0}):[]}function r_(n,a,{includeHydrateFallback:l}={}){return l_(n.map(i=>{let s=a.routes[i.route.id];if(!s)return[];let u=[s.module];return s.clientActionModule&&(u=u.concat(s.clientActionModule)),s.clientLoaderModule&&(u=u.concat(s.clientLoaderModule)),l&&s.hydrateFallbackModule&&(u=u.concat(s.hydrateFallbackModule)),s.imports&&(u=u.concat(s.imports)),u}).flat(1))}function l_(n){return[...new Set(n)]}function i_(n){let a={},l=Object.keys(n).sort();for(let i of l)a[i]=n[i];return a}function o_(n,a){let l=new Set;return new Set(a),n.reduce((i,s)=>{let u=JSON.stringify(i_(s));return l.has(u)||(l.add(u),i.push({key:u,link:s})),i},[])}function E0(){let n=y.useContext(Ir);return ih(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function s_(){let n=y.useContext(Eo);return ih(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var oh=y.createContext(void 0);oh.displayName="FrameworkContext";function _0(){let n=y.useContext(oh);return ih(n,"You must render this element inside a <HydratedRouter> element"),n}function u_(n,a){let l=y.useContext(oh),[i,s]=y.useState(!1),[u,f]=y.useState(!1),{onFocus:d,onBlur:p,onMouseEnter:m,onMouseLeave:v,onTouchStart:b}=a,w=y.useRef(null);y.useEffect(()=>{if(n==="render"&&f(!0),n==="viewport"){let _=N=>{N.forEach(z=>{f(z.isIntersecting)})},j=new IntersectionObserver(_,{threshold:.5});return w.current&&j.observe(w.current),()=>{j.disconnect()}}},[n]),y.useEffect(()=>{if(i){let _=setTimeout(()=>{f(!0)},100);return()=>{clearTimeout(_)}}},[i]);let S=()=>{s(!0)},C=()=>{s(!1),f(!1)};return l?n!=="intent"?[u,w,{}]:[u,w,{onFocus:io(d,S),onBlur:io(p,C),onMouseEnter:io(m,S),onMouseLeave:io(v,C),onTouchStart:io(b,S)}]:[!1,w,{}]}function io(n,a){return l=>{n&&n(l),l.defaultPrevented||a(l)}}function c_({page:n,...a}){let{router:l}=E0(),i=y.useMemo(()=>ar(l.routes,n,l.basename),[l.routes,n,l.basename]);return i?y.createElement(d_,{page:n,matches:i,...a}):null}function f_(n){let{manifest:a,routeModules:l}=_0(),[i,s]=y.useState([]);return y.useEffect(()=>{let u=!1;return a_(n,a,l).then(f=>{u||s(f)}),()=>{u=!0}},[n,a,l]),i}function d_({page:n,matches:a,...l}){let i=mr(),{manifest:s,routeModules:u}=_0(),{basename:f}=E0(),{loaderData:d,matches:p}=s_(),m=y.useMemo(()=>ry(n,a,p,s,i,"data"),[n,a,p,s,i]),v=y.useMemo(()=>ry(n,a,p,s,i,"assets"),[n,a,p,s,i]),b=y.useMemo(()=>{if(n===i.pathname+i.search+i.hash)return[];let C=new Set,_=!1;if(a.forEach(N=>{let z=s.routes[N.route.id];!z||!z.hasLoader||(!m.some(k=>k.route.id===N.route.id)&&N.route.id in d&&u[N.route.id]?.shouldRevalidate||z.hasClientLoader?_=!0:C.add(N.route.id))}),C.size===0)return[];let j=e_(n,f,"data");return _&&C.size>0&&j.searchParams.set("_routes",a.filter(N=>C.has(N.route.id)).map(N=>N.route.id).join(",")),[j.pathname+j.search]},[f,d,i,s,m,a,n,u]),w=y.useMemo(()=>r_(v,s),[v,s]),S=f_(v);return y.createElement(y.Fragment,null,b.map(C=>y.createElement("link",{key:C,rel:"prefetch",as:"fetch",href:C,...l})),w.map(C=>y.createElement("link",{key:C,rel:"modulepreload",href:C,...l})),S.map(({key:C,link:_})=>y.createElement("link",{key:C,..._})))}function h_(...n){return a=>{n.forEach(l=>{typeof l=="function"?l(a):l!=null&&(l.current=a)})}}var C0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{C0&&(window.__reactRouterVersion="7.7.1")}catch{}var N0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,R0=y.forwardRef(function({onClick:a,discover:l="render",prefetch:i="none",relative:s,reloadDocument:u,replace:f,state:d,target:p,to:m,preventScrollReset:v,viewTransition:b,...w},S){let{basename:C}=y.useContext(Pn),_=typeof m=="string"&&N0.test(m),j,N=!1;if(typeof m=="string"&&_&&(j=m,C0))try{let ne=new URL(window.location.href),oe=m.startsWith("//")?new URL(ne.protocol+m):new URL(m),le=An(oe.pathname,C);oe.origin===ne.origin&&le!=null?m=le+oe.search+oe.hash:N=!0}catch{_t(!1,`<Link to="${m}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let z=E2(m,{relative:s}),[k,H,D]=u_(i,w),R=v_(m,{replace:f,state:d,target:p,preventScrollReset:v,relative:s,viewTransition:b});function B(ne){a&&a(ne),ne.defaultPrevented||R(ne)}let Z=y.createElement("a",{...w,...D,href:j||z,onClick:N||u?a:B,ref:h_(S,H),target:p,"data-discover":!_&&l==="render"?"true":void 0});return k&&!_?y.createElement(y.Fragment,null,Z,y.createElement(c_,{page:z})):Z});R0.displayName="Link";var m_=y.forwardRef(function({"aria-current":a="page",caseSensitive:l=!1,className:i="",end:s=!1,style:u,to:f,viewTransition:d,children:p,...m},v){let b=_o(f,{relative:m.relative}),w=mr(),S=y.useContext(Eo),{navigator:C,basename:_}=y.useContext(Pn),j=S!=null&&S_(b)&&d===!0,N=C.encodeLocation?C.encodeLocation(b).pathname:b.pathname,z=w.pathname,k=S&&S.navigation&&S.navigation.location?S.navigation.location.pathname:null;l||(z=z.toLowerCase(),k=k?k.toLowerCase():null,N=N.toLowerCase()),k&&_&&(k=An(k,_)||k);const H=N!=="/"&&N.endsWith("/")?N.length-1:N.length;let D=z===N||!s&&z.startsWith(N)&&z.charAt(H)==="/",R=k!=null&&(k===N||!s&&k.startsWith(N)&&k.charAt(N.length)==="/"),B={isActive:D,isPending:R,isTransitioning:j},Z=D?a:void 0,ne;typeof i=="function"?ne=i(B):ne=[i,D?"active":null,R?"pending":null,j?"transitioning":null].filter(Boolean).join(" ");let oe=typeof u=="function"?u(B):u;return y.createElement(R0,{...m,"aria-current":Z,className:ne,ref:v,style:oe,to:f,viewTransition:d},typeof p=="function"?p(B):p)});m_.displayName="NavLink";var p_=y.forwardRef(({discover:n="render",fetcherKey:a,navigate:l,reloadDocument:i,replace:s,state:u,method:f=iu,action:d,onSubmit:p,relative:m,preventScrollReset:v,viewTransition:b,...w},S)=>{let C=x_(),_=w_(d,{relative:m}),j=f.toLowerCase()==="get"?"get":"post",N=typeof d=="string"&&N0.test(d),z=k=>{if(p&&p(k),k.defaultPrevented)return;k.preventDefault();let H=k.nativeEvent.submitter,D=H?.getAttribute("formmethod")||f;C(H||k.currentTarget,{fetcherKey:a,method:D,navigate:l,replace:s,state:u,relative:m,preventScrollReset:v,viewTransition:b})};return y.createElement("form",{ref:S,method:j,action:_,onSubmit:i?p:z,...w,"data-discover":!N&&n==="render"?"true":void 0})});p_.displayName="Form";function g_(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function j0(n){let a=y.useContext(Ir);return Ge(a,g_(n)),a}function v_(n,{target:a,replace:l,state:i,preventScrollReset:s,relative:u,viewTransition:f}={}){let d=Ru(),p=mr(),m=_o(n,{relative:u});return y.useCallback(v=>{if(Z2(v,a)){v.preventDefault();let b=l!==void 0?l:lr(p)===lr(m);d(n,{replace:b,state:i,preventScrollReset:s,relative:u,viewTransition:f})}},[p,d,m,l,i,a,n,s,u,f])}var y_=0,b_=()=>`__${String(++y_)}__`;function x_(){let{router:n}=j0("useSubmit"),{basename:a}=y.useContext(Pn),l=L2();return y.useCallback(async(i,s={})=>{let{action:u,method:f,encType:d,formData:p,body:m}=W2(i,a);if(s.navigate===!1){let v=s.fetcherKey||b_();await n.fetch(v,l,s.action||u,{preventScrollReset:s.preventScrollReset,formData:p,body:m,formMethod:s.method||f,formEncType:s.encType||d,flushSync:s.flushSync})}else await n.navigate(s.action||u,{preventScrollReset:s.preventScrollReset,formData:p,body:m,formMethod:s.method||f,formEncType:s.encType||d,replace:s.replace,state:s.state,fromRouteId:l,flushSync:s.flushSync,viewTransition:s.viewTransition})},[n,a,l])}function w_(n,{relative:a}={}){let{basename:l}=y.useContext(Pn),i=y.useContext(na);Ge(i,"useFormAction must be used inside a RouteContext");let[s]=i.matches.slice(-1),u={..._o(n||".",{relative:a})},f=mr();if(n==null){u.search=f.search;let d=new URLSearchParams(u.search),p=d.getAll("index");if(p.some(v=>v==="")){d.delete("index"),p.filter(b=>b).forEach(b=>d.append("index",b));let v=d.toString();u.search=v?`?${v}`:""}}return(!n||n===".")&&s.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),l!=="/"&&(u.pathname=u.pathname==="/"?l:Jn([l,u.pathname])),lr(u)}function S_(n,{relative:a}={}){let l=y.useContext(nh);Ge(l!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=j0("useViewTransitionState"),s=_o(n,{relative:a});if(!l.isTransitioning)return!1;let u=An(l.currentLocation.pathname,i)||l.currentLocation.pathname,f=An(l.nextLocation.pathname,i)||l.nextLocation.pathname;return mu(s.pathname,f)!=null||mu(s.pathname,u)!=null}var Ou=r0();const E_=Xy(Ou);function __(n){return y.createElement($2,{flushSync:Ou.flushSync,...n})}function nn(n,a,{checkForDefaultPrevented:l=!0}={}){return function(s){if(n?.(s),l===!1||!s.defaultPrevented)return a?.(s)}}function ly(n,a){if(typeof n=="function")return n(a);n!=null&&(n.current=a)}function qr(...n){return a=>{let l=!1;const i=n.map(s=>{const u=ly(s,a);return!l&&typeof u=="function"&&(l=!0),u});if(l)return()=>{for(let s=0;s<i.length;s++){const u=i[s];typeof u=="function"?u():ly(n[s],null)}}}}function vn(...n){return y.useCallback(qr(...n),n)}function C_(n,a){const l=y.createContext(a),i=u=>{const{children:f,...d}=u,p=y.useMemo(()=>d,Object.values(d));return g.jsx(l.Provider,{value:p,children:f})};i.displayName=n+"Provider";function s(u){const f=y.useContext(l);if(f)return f;if(a!==void 0)return a;throw new Error(`\`${u}\` must be used within \`${n}\``)}return[i,s]}function Au(n,a=[]){let l=[];function i(u,f){const d=y.createContext(f),p=l.length;l=[...l,f];const m=b=>{const{scope:w,children:S,...C}=b,_=w?.[n]?.[p]||d,j=y.useMemo(()=>C,Object.values(C));return g.jsx(_.Provider,{value:j,children:S})};m.displayName=u+"Provider";function v(b,w){const S=w?.[n]?.[p]||d,C=y.useContext(S);if(C)return C;if(f!==void 0)return f;throw new Error(`\`${b}\` must be used within \`${u}\``)}return[m,v]}const s=()=>{const u=l.map(f=>y.createContext(f));return function(d){const p=d?.[n]||u;return y.useMemo(()=>({[`__scope${n}`]:{...d,[n]:p}}),[d,p])}};return s.scopeName=n,[i,N_(s,...a)]}function N_(...n){const a=n[0];if(n.length===1)return a;const l=()=>{const i=n.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(u){const f=i.reduce((d,{useScope:p,scopeName:m})=>{const b=p(u)[`__scope${m}`];return{...d,...b}},{});return y.useMemo(()=>({[`__scope${a.scopeName}`]:f}),[f])}};return l.scopeName=a.scopeName,l}var ir=globalThis?.document?y.useLayoutEffect:()=>{},R_=Iy[" useId ".trim().toString()]||(()=>{}),j_=0;function Wn(n){const[a,l]=y.useState(R_());return ir(()=>{l(i=>i??String(j_++))},[n]),n||(a?`radix-${a}`:"")}var O_=Iy[" useInsertionEffect ".trim().toString()]||ir;function sh({prop:n,defaultProp:a,onChange:l=()=>{},caller:i}){const[s,u,f]=A_({defaultProp:a,onChange:l}),d=n!==void 0,p=d?n:s;{const v=y.useRef(n!==void 0);y.useEffect(()=>{const b=v.current;b!==d&&console.warn(`${i} is changing from ${b?"controlled":"uncontrolled"} to ${d?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),v.current=d},[d,i])}const m=y.useCallback(v=>{if(d){const b=T_(v)?v(n):v;b!==n&&f.current?.(b)}else u(v)},[d,n,u,f]);return[p,m]}function A_({defaultProp:n,onChange:a}){const[l,i]=y.useState(n),s=y.useRef(l),u=y.useRef(a);return O_(()=>{u.current=a},[a]),y.useEffect(()=>{s.current!==l&&(u.current?.(l),s.current=l)},[l,s]),[l,i,u]}function T_(n){return typeof n=="function"}function Tu(n){const a=D_(n),l=y.forwardRef((i,s)=>{const{children:u,...f}=i,d=y.Children.toArray(u),p=d.find(k_);if(p){const m=p.props.children,v=d.map(b=>b===p?y.Children.count(m)>1?y.Children.only(null):y.isValidElement(m)?m.props.children:null:b);return g.jsx(a,{...f,ref:s,children:y.isValidElement(m)?y.cloneElement(m,void 0,v):null})}return g.jsx(a,{...f,ref:s,children:u})});return l.displayName=`${n}.Slot`,l}var M_=Tu("Slot");function D_(n){const a=y.forwardRef((l,i)=>{const{children:s,...u}=l;if(y.isValidElement(s)){const f=U_(s),d=z_(u,s.props);return s.type!==y.Fragment&&(d.ref=i?qr(i,f):f),y.cloneElement(s,d)}return y.Children.count(s)>1?y.Children.only(null):null});return a.displayName=`${n}.SlotClone`,a}var L_=Symbol("radix.slottable");function k_(n){return y.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===L_}function z_(n,a){const l={...a};for(const i in a){const s=n[i],u=a[i];/^on[A-Z]/.test(i)?s&&u?l[i]=(...d)=>{const p=u(...d);return s(...d),p}:s&&(l[i]=s):i==="style"?l[i]={...s,...u}:i==="className"&&(l[i]=[s,u].filter(Boolean).join(" "))}return{...n,...l}}function U_(n){let a=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,l=a&&"isReactWarning"in a&&a.isReactWarning;return l?n.ref:(a=Object.getOwnPropertyDescriptor(n,"ref")?.get,l=a&&"isReactWarning"in a&&a.isReactWarning,l?n.props.ref:n.props.ref||n.ref)}var P_=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],pt=P_.reduce((n,a)=>{const l=Tu(`Primitive.${a}`),i=y.forwardRef((s,u)=>{const{asChild:f,...d}=s,p=f?l:a;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(p,{...d,ref:u})});return i.displayName=`Primitive.${a}`,{...n,[a]:i}},{});function H_(n,a){n&&Ou.flushSync(()=>n.dispatchEvent(a))}function Zl(n){const a=y.useRef(n);return y.useEffect(()=>{a.current=n}),y.useMemo(()=>(...l)=>a.current?.(...l),[])}function B_(n,a=globalThis?.document){const l=Zl(n);y.useEffect(()=>{const i=s=>{s.key==="Escape"&&l(s)};return a.addEventListener("keydown",i,{capture:!0}),()=>a.removeEventListener("keydown",i,{capture:!0})},[l,a])}var $_="DismissableLayer",Ud="dismissableLayer.update",V_="dismissableLayer.pointerDownOutside",Y_="dismissableLayer.focusOutside",iy,O0=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),uh=y.forwardRef((n,a)=>{const{disableOutsidePointerEvents:l=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:u,onInteractOutside:f,onDismiss:d,...p}=n,m=y.useContext(O0),[v,b]=y.useState(null),w=v?.ownerDocument??globalThis?.document,[,S]=y.useState({}),C=vn(a,B=>b(B)),_=Array.from(m.layers),[j]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),N=_.indexOf(j),z=v?_.indexOf(v):-1,k=m.layersWithOutsidePointerEventsDisabled.size>0,H=z>=N,D=K_(B=>{const Z=B.target,ne=[...m.branches].some(oe=>oe.contains(Z));!H||ne||(s?.(B),f?.(B),B.defaultPrevented||d?.())},w),R=G_(B=>{const Z=B.target;[...m.branches].some(oe=>oe.contains(Z))||(u?.(B),f?.(B),B.defaultPrevented||d?.())},w);return B_(B=>{z===m.layers.size-1&&(i?.(B),!B.defaultPrevented&&d&&(B.preventDefault(),d()))},w),y.useEffect(()=>{if(v)return l&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(iy=w.body.style.pointerEvents,w.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(v)),m.layers.add(v),oy(),()=>{l&&m.layersWithOutsidePointerEventsDisabled.size===1&&(w.body.style.pointerEvents=iy)}},[v,w,l,m]),y.useEffect(()=>()=>{v&&(m.layers.delete(v),m.layersWithOutsidePointerEventsDisabled.delete(v),oy())},[v,m]),y.useEffect(()=>{const B=()=>S({});return document.addEventListener(Ud,B),()=>document.removeEventListener(Ud,B)},[]),g.jsx(pt.div,{...p,ref:C,style:{pointerEvents:k?H?"auto":"none":void 0,...n.style},onFocusCapture:nn(n.onFocusCapture,R.onFocusCapture),onBlurCapture:nn(n.onBlurCapture,R.onBlurCapture),onPointerDownCapture:nn(n.onPointerDownCapture,D.onPointerDownCapture)})});uh.displayName=$_;var q_="DismissableLayerBranch",F_=y.forwardRef((n,a)=>{const l=y.useContext(O0),i=y.useRef(null),s=vn(a,i);return y.useEffect(()=>{const u=i.current;if(u)return l.branches.add(u),()=>{l.branches.delete(u)}},[l.branches]),g.jsx(pt.div,{...n,ref:s})});F_.displayName=q_;function K_(n,a=globalThis?.document){const l=Zl(n),i=y.useRef(!1),s=y.useRef(()=>{});return y.useEffect(()=>{const u=d=>{if(d.target&&!i.current){let p=function(){A0(V_,l,m,{discrete:!0})};const m={originalEvent:d};d.pointerType==="touch"?(a.removeEventListener("click",s.current),s.current=p,a.addEventListener("click",s.current,{once:!0})):p()}else a.removeEventListener("click",s.current);i.current=!1},f=window.setTimeout(()=>{a.addEventListener("pointerdown",u)},0);return()=>{window.clearTimeout(f),a.removeEventListener("pointerdown",u),a.removeEventListener("click",s.current)}},[a,l]),{onPointerDownCapture:()=>i.current=!0}}function G_(n,a=globalThis?.document){const l=Zl(n),i=y.useRef(!1);return y.useEffect(()=>{const s=u=>{u.target&&!i.current&&A0(Y_,l,{originalEvent:u},{discrete:!1})};return a.addEventListener("focusin",s),()=>a.removeEventListener("focusin",s)},[a,l]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function oy(){const n=new CustomEvent(Ud);document.dispatchEvent(n)}function A0(n,a,l,{discrete:i}){const s=l.originalEvent.target,u=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:l});a&&s.addEventListener(n,a,{once:!0}),i?H_(s,u):s.dispatchEvent(u)}var ud="focusScope.autoFocusOnMount",cd="focusScope.autoFocusOnUnmount",sy={bubbles:!1,cancelable:!0},X_="FocusScope",ch=y.forwardRef((n,a)=>{const{loop:l=!1,trapped:i=!1,onMountAutoFocus:s,onUnmountAutoFocus:u,...f}=n,[d,p]=y.useState(null),m=Zl(s),v=Zl(u),b=y.useRef(null),w=vn(a,_=>p(_)),S=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(i){let _=function(k){if(S.paused||!d)return;const H=k.target;d.contains(H)?b.current=H:nr(b.current,{select:!0})},j=function(k){if(S.paused||!d)return;const H=k.relatedTarget;H!==null&&(d.contains(H)||nr(b.current,{select:!0}))},N=function(k){if(document.activeElement===document.body)for(const D of k)D.removedNodes.length>0&&nr(d)};document.addEventListener("focusin",_),document.addEventListener("focusout",j);const z=new MutationObserver(N);return d&&z.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",_),document.removeEventListener("focusout",j),z.disconnect()}}},[i,d,S.paused]),y.useEffect(()=>{if(d){cy.add(S);const _=document.activeElement;if(!d.contains(_)){const N=new CustomEvent(ud,sy);d.addEventListener(ud,m),d.dispatchEvent(N),N.defaultPrevented||(Q_(eC(T0(d)),{select:!0}),document.activeElement===_&&nr(d))}return()=>{d.removeEventListener(ud,m),setTimeout(()=>{const N=new CustomEvent(cd,sy);d.addEventListener(cd,v),d.dispatchEvent(N),N.defaultPrevented||nr(_??document.body,{select:!0}),d.removeEventListener(cd,v),cy.remove(S)},0)}}},[d,m,v,S]);const C=y.useCallback(_=>{if(!l&&!i||S.paused)return;const j=_.key==="Tab"&&!_.altKey&&!_.ctrlKey&&!_.metaKey,N=document.activeElement;if(j&&N){const z=_.currentTarget,[k,H]=Z_(z);k&&H?!_.shiftKey&&N===H?(_.preventDefault(),l&&nr(k,{select:!0})):_.shiftKey&&N===k&&(_.preventDefault(),l&&nr(H,{select:!0})):N===z&&_.preventDefault()}},[l,i,S.paused]);return g.jsx(pt.div,{tabIndex:-1,...f,ref:w,onKeyDown:C})});ch.displayName=X_;function Q_(n,{select:a=!1}={}){const l=document.activeElement;for(const i of n)if(nr(i,{select:a}),document.activeElement!==l)return}function Z_(n){const a=T0(n),l=uy(a,n),i=uy(a.reverse(),n);return[l,i]}function T0(n){const a=[],l=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const s=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||s?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;l.nextNode();)a.push(l.currentNode);return a}function uy(n,a){for(const l of n)if(!I_(l,{upTo:a}))return l}function I_(n,{upTo:a}){if(getComputedStyle(n).visibility==="hidden")return!0;for(;n;){if(a!==void 0&&n===a)return!1;if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}function J_(n){return n instanceof HTMLInputElement&&"select"in n}function nr(n,{select:a=!1}={}){if(n&&n.focus){const l=document.activeElement;n.focus({preventScroll:!0}),n!==l&&J_(n)&&a&&n.select()}}var cy=W_();function W_(){let n=[];return{add(a){const l=n[0];a!==l&&l?.pause(),n=fy(n,a),n.unshift(a)},remove(a){n=fy(n,a),n[0]?.resume()}}}function fy(n,a){const l=[...n],i=l.indexOf(a);return i!==-1&&l.splice(i,1),l}function eC(n){return n.filter(a=>a.tagName!=="A")}var tC="Portal",fh=y.forwardRef((n,a)=>{const{container:l,...i}=n,[s,u]=y.useState(!1);ir(()=>u(!0),[]);const f=l||s&&globalThis?.document?.body;return f?E_.createPortal(g.jsx(pt.div,{...i,ref:a}),f):null});fh.displayName=tC;function nC(n,a){return y.useReducer((l,i)=>a[l][i]??l,n)}var ei=n=>{const{present:a,children:l}=n,i=aC(a),s=typeof l=="function"?l({present:i.isPresent}):y.Children.only(l),u=vn(i.ref,rC(s));return typeof l=="function"||i.isPresent?y.cloneElement(s,{ref:u}):null};ei.displayName="Presence";function aC(n){const[a,l]=y.useState(),i=y.useRef(null),s=y.useRef(n),u=y.useRef("none"),f=n?"mounted":"unmounted",[d,p]=nC(f,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const m=Gs(i.current);u.current=d==="mounted"?m:"none"},[d]),ir(()=>{const m=i.current,v=s.current;if(v!==n){const w=u.current,S=Gs(m);n?p("MOUNT"):S==="none"||m?.display==="none"?p("UNMOUNT"):p(v&&w!==S?"ANIMATION_OUT":"UNMOUNT"),s.current=n}},[n,p]),ir(()=>{if(a){let m;const v=a.ownerDocument.defaultView??window,b=S=>{const _=Gs(i.current).includes(S.animationName);if(S.target===a&&_&&(p("ANIMATION_END"),!s.current)){const j=a.style.animationFillMode;a.style.animationFillMode="forwards",m=v.setTimeout(()=>{a.style.animationFillMode==="forwards"&&(a.style.animationFillMode=j)})}},w=S=>{S.target===a&&(u.current=Gs(i.current))};return a.addEventListener("animationstart",w),a.addEventListener("animationcancel",b),a.addEventListener("animationend",b),()=>{v.clearTimeout(m),a.removeEventListener("animationstart",w),a.removeEventListener("animationcancel",b),a.removeEventListener("animationend",b)}}else p("ANIMATION_END")},[a,p]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:y.useCallback(m=>{i.current=m?getComputedStyle(m):null,l(m)},[])}}function Gs(n){return n?.animationName||"none"}function rC(n){let a=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,l=a&&"isReactWarning"in a&&a.isReactWarning;return l?n.ref:(a=Object.getOwnPropertyDescriptor(n,"ref")?.get,l=a&&"isReactWarning"in a&&a.isReactWarning,l?n.props.ref:n.props.ref||n.ref)}var fd=0;function M0(){y.useEffect(()=>{const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",n[0]??dy()),document.body.insertAdjacentElement("beforeend",n[1]??dy()),fd++,()=>{fd===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(a=>a.remove()),fd--}},[])}function dy(){const n=document.createElement("span");return n.setAttribute("data-radix-focus-guard",""),n.tabIndex=0,n.style.outline="none",n.style.opacity="0",n.style.position="fixed",n.style.pointerEvents="none",n}var Qn=function(){return Qn=Object.assign||function(a){for(var l,i=1,s=arguments.length;i<s;i++){l=arguments[i];for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(a[u]=l[u])}return a},Qn.apply(this,arguments)};function D0(n,a){var l={};for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&a.indexOf(i)<0&&(l[i]=n[i]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,i=Object.getOwnPropertySymbols(n);s<i.length;s++)a.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(n,i[s])&&(l[i[s]]=n[i[s]]);return l}function lC(n,a,l){if(l||arguments.length===2)for(var i=0,s=a.length,u;i<s;i++)(u||!(i in a))&&(u||(u=Array.prototype.slice.call(a,0,i)),u[i]=a[i]);return n.concat(u||Array.prototype.slice.call(a))}var su="right-scroll-bar-position",uu="width-before-scroll-bar",iC="with-scroll-bars-hidden",oC="--removed-body-scroll-bar-size";function dd(n,a){return typeof n=="function"?n(a):n&&(n.current=a),n}function sC(n,a){var l=y.useState(function(){return{value:n,callback:a,facade:{get current(){return l.value},set current(i){var s=l.value;s!==i&&(l.value=i,l.callback(i,s))}}}})[0];return l.callback=a,l.facade}var uC=typeof window<"u"?y.useLayoutEffect:y.useEffect,hy=new WeakMap;function cC(n,a){var l=sC(null,function(i){return n.forEach(function(s){return dd(s,i)})});return uC(function(){var i=hy.get(l);if(i){var s=new Set(i),u=new Set(n),f=l.current;s.forEach(function(d){u.has(d)||dd(d,null)}),u.forEach(function(d){s.has(d)||dd(d,f)})}hy.set(l,n)},[n]),l}function fC(n){return n}function dC(n,a){a===void 0&&(a=fC);var l=[],i=!1,s={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return l.length?l[l.length-1]:n},useMedium:function(u){var f=a(u,i);return l.push(f),function(){l=l.filter(function(d){return d!==f})}},assignSyncMedium:function(u){for(i=!0;l.length;){var f=l;l=[],f.forEach(u)}l={push:function(d){return u(d)},filter:function(){return l}}},assignMedium:function(u){i=!0;var f=[];if(l.length){var d=l;l=[],d.forEach(u),f=l}var p=function(){var v=f;f=[],v.forEach(u)},m=function(){return Promise.resolve().then(p)};m(),l={push:function(v){f.push(v),m()},filter:function(v){return f=f.filter(v),l}}}};return s}function hC(n){n===void 0&&(n={});var a=dC(null);return a.options=Qn({async:!0,ssr:!1},n),a}var L0=function(n){var a=n.sideCar,l=D0(n,["sideCar"]);if(!a)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=a.read();if(!i)throw new Error("Sidecar medium not found");return y.createElement(i,Qn({},l))};L0.isSideCarExport=!0;function mC(n,a){return n.useMedium(a),L0}var k0=hC(),hd=function(){},Mu=y.forwardRef(function(n,a){var l=y.useRef(null),i=y.useState({onScrollCapture:hd,onWheelCapture:hd,onTouchMoveCapture:hd}),s=i[0],u=i[1],f=n.forwardProps,d=n.children,p=n.className,m=n.removeScrollBar,v=n.enabled,b=n.shards,w=n.sideCar,S=n.noRelative,C=n.noIsolation,_=n.inert,j=n.allowPinchZoom,N=n.as,z=N===void 0?"div":N,k=n.gapMode,H=D0(n,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),D=w,R=cC([l,a]),B=Qn(Qn({},H),s);return y.createElement(y.Fragment,null,v&&y.createElement(D,{sideCar:k0,removeScrollBar:m,shards:b,noRelative:S,noIsolation:C,inert:_,setCallbacks:u,allowPinchZoom:!!j,lockRef:l,gapMode:k}),f?y.cloneElement(y.Children.only(d),Qn(Qn({},B),{ref:R})):y.createElement(z,Qn({},B,{className:p,ref:R}),d))});Mu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Mu.classNames={fullWidth:uu,zeroRight:su};var pC=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function gC(){if(!document)return null;var n=document.createElement("style");n.type="text/css";var a=pC();return a&&n.setAttribute("nonce",a),n}function vC(n,a){n.styleSheet?n.styleSheet.cssText=a:n.appendChild(document.createTextNode(a))}function yC(n){var a=document.head||document.getElementsByTagName("head")[0];a.appendChild(n)}var bC=function(){var n=0,a=null;return{add:function(l){n==0&&(a=gC())&&(vC(a,l),yC(a)),n++},remove:function(){n--,!n&&a&&(a.parentNode&&a.parentNode.removeChild(a),a=null)}}},xC=function(){var n=bC();return function(a,l){y.useEffect(function(){return n.add(a),function(){n.remove()}},[a&&l])}},z0=function(){var n=xC(),a=function(l){var i=l.styles,s=l.dynamic;return n(i,s),null};return a},wC={left:0,top:0,right:0,gap:0},md=function(n){return parseInt(n||"",10)||0},SC=function(n){var a=window.getComputedStyle(document.body),l=a[n==="padding"?"paddingLeft":"marginLeft"],i=a[n==="padding"?"paddingTop":"marginTop"],s=a[n==="padding"?"paddingRight":"marginRight"];return[md(l),md(i),md(s)]},EC=function(n){if(n===void 0&&(n="margin"),typeof window>"u")return wC;var a=SC(n),l=document.documentElement.clientWidth,i=window.innerWidth;return{left:a[0],top:a[1],right:a[2],gap:Math.max(0,i-l+a[2]-a[0])}},_C=z0(),Gl="data-scroll-locked",CC=function(n,a,l,i){var s=n.left,u=n.top,f=n.right,d=n.gap;return l===void 0&&(l="margin"),`
|
|
68
|
+
.`.concat(iC,` {
|
|
69
69
|
overflow: hidden `).concat(i,`;
|
|
70
70
|
padding-right: `).concat(d,"px ").concat(i,`;
|
|
71
71
|
}
|
|
72
|
-
body[`).concat(
|
|
72
|
+
body[`).concat(Gl,`] {
|
|
73
73
|
overflow: hidden `).concat(i,`;
|
|
74
74
|
overscroll-behavior: contain;
|
|
75
75
|
`).concat([a&&"position: relative ".concat(i,";"),l==="margin"&&`
|
|
@@ -98,127 +98,127 @@ Please change the parent <Route path="${N}"> to <Route path="${N==="/"?"*":`${N}
|
|
|
98
98
|
margin-right: 0 `).concat(i,`;
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
body[`).concat(
|
|
102
|
-
`).concat(
|
|
101
|
+
body[`).concat(Gl,`] {
|
|
102
|
+
`).concat(oC,": ").concat(d,`px;
|
|
103
103
|
}
|
|
104
|
-
`)},
|
|
104
|
+
`)},my=function(){var n=parseInt(document.body.getAttribute(Gl)||"0",10);return isFinite(n)?n:0},NC=function(){y.useEffect(function(){return document.body.setAttribute(Gl,(my()+1).toString()),function(){var n=my()-1;n<=0?document.body.removeAttribute(Gl):document.body.setAttribute(Gl,n.toString())}},[])},RC=function(n){var a=n.noRelative,l=n.noImportant,i=n.gapMode,s=i===void 0?"margin":i;NC();var u=y.useMemo(function(){return EC(s)},[s]);return y.createElement(_C,{styles:CC(u,!a,s,l?"":"!important")})},Pd=!1;if(typeof window<"u")try{var Xs=Object.defineProperty({},"passive",{get:function(){return Pd=!0,!0}});window.addEventListener("test",Xs,Xs),window.removeEventListener("test",Xs,Xs)}catch{Pd=!1}var Pl=Pd?{passive:!1}:!1,jC=function(n){return n.tagName==="TEXTAREA"},U0=function(n,a){if(!(n instanceof Element))return!1;var l=window.getComputedStyle(n);return l[a]!=="hidden"&&!(l.overflowY===l.overflowX&&!jC(n)&&l[a]==="visible")},OC=function(n){return U0(n,"overflowY")},AC=function(n){return U0(n,"overflowX")},py=function(n,a){var l=a.ownerDocument,i=a;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var s=P0(n,i);if(s){var u=H0(n,i),f=u[1],d=u[2];if(f>d)return!0}i=i.parentNode}while(i&&i!==l.body);return!1},TC=function(n){var a=n.scrollTop,l=n.scrollHeight,i=n.clientHeight;return[a,l,i]},MC=function(n){var a=n.scrollLeft,l=n.scrollWidth,i=n.clientWidth;return[a,l,i]},P0=function(n,a){return n==="v"?OC(a):AC(a)},H0=function(n,a){return n==="v"?TC(a):MC(a)},DC=function(n,a){return n==="h"&&a==="rtl"?-1:1},LC=function(n,a,l,i,s){var u=DC(n,window.getComputedStyle(a).direction),f=u*i,d=l.target,p=a.contains(d),m=!1,v=f>0,b=0,w=0;do{if(!d)break;var S=H0(n,d),C=S[0],_=S[1],j=S[2],N=_-j-u*C;(C||N)&&P0(n,d)&&(b+=N,w+=C);var z=d.parentNode;d=z&&z.nodeType===Node.DOCUMENT_FRAGMENT_NODE?z.host:z}while(!p&&d!==document.body||p&&(a.contains(d)||a===d));return(v&&Math.abs(b)<1||!v&&Math.abs(w)<1)&&(m=!0),m},Qs=function(n){return"changedTouches"in n?[n.changedTouches[0].clientX,n.changedTouches[0].clientY]:[0,0]},gy=function(n){return[n.deltaX,n.deltaY]},vy=function(n){return n&&"current"in n?n.current:n},kC=function(n,a){return n[0]===a[0]&&n[1]===a[1]},zC=function(n){return`
|
|
105
105
|
.block-interactivity-`.concat(n,` {pointer-events: none;}
|
|
106
106
|
.allow-interactivity-`).concat(n,` {pointer-events: all;}
|
|
107
|
-
`)},
|
|
107
|
+
`)},UC=0,Hl=[];function PC(n){var a=y.useRef([]),l=y.useRef([0,0]),i=y.useRef(),s=y.useState(UC++)[0],u=y.useState(z0)[0],f=y.useRef(n);y.useEffect(function(){f.current=n},[n]),y.useEffect(function(){if(n.inert){document.body.classList.add("block-interactivity-".concat(s));var _=lC([n.lockRef.current],(n.shards||[]).map(vy),!0).filter(Boolean);return _.forEach(function(j){return j.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),_.forEach(function(j){return j.classList.remove("allow-interactivity-".concat(s))})}}},[n.inert,n.lockRef.current,n.shards]);var d=y.useCallback(function(_,j){if("touches"in _&&_.touches.length===2||_.type==="wheel"&&_.ctrlKey)return!f.current.allowPinchZoom;var N=Qs(_),z=l.current,k="deltaX"in _?_.deltaX:z[0]-N[0],H="deltaY"in _?_.deltaY:z[1]-N[1],D,R=_.target,B=Math.abs(k)>Math.abs(H)?"h":"v";if("touches"in _&&B==="h"&&R.type==="range")return!1;var Z=py(B,R);if(!Z)return!0;if(Z?D=B:(D=B==="v"?"h":"v",Z=py(B,R)),!Z)return!1;if(!i.current&&"changedTouches"in _&&(k||H)&&(i.current=D),!D)return!0;var ne=i.current||D;return LC(ne,j,_,ne==="h"?k:H)},[]),p=y.useCallback(function(_){var j=_;if(!(!Hl.length||Hl[Hl.length-1]!==u)){var N="deltaY"in j?gy(j):Qs(j),z=a.current.filter(function(D){return D.name===j.type&&(D.target===j.target||j.target===D.shadowParent)&&kC(D.delta,N)})[0];if(z&&z.should){j.cancelable&&j.preventDefault();return}if(!z){var k=(f.current.shards||[]).map(vy).filter(Boolean).filter(function(D){return D.contains(j.target)}),H=k.length>0?d(j,k[0]):!f.current.noIsolation;H&&j.cancelable&&j.preventDefault()}}},[]),m=y.useCallback(function(_,j,N,z){var k={name:_,delta:j,target:N,should:z,shadowParent:HC(N)};a.current.push(k),setTimeout(function(){a.current=a.current.filter(function(H){return H!==k})},1)},[]),v=y.useCallback(function(_){l.current=Qs(_),i.current=void 0},[]),b=y.useCallback(function(_){m(_.type,gy(_),_.target,d(_,n.lockRef.current))},[]),w=y.useCallback(function(_){m(_.type,Qs(_),_.target,d(_,n.lockRef.current))},[]);y.useEffect(function(){return Hl.push(u),n.setCallbacks({onScrollCapture:b,onWheelCapture:b,onTouchMoveCapture:w}),document.addEventListener("wheel",p,Pl),document.addEventListener("touchmove",p,Pl),document.addEventListener("touchstart",v,Pl),function(){Hl=Hl.filter(function(_){return _!==u}),document.removeEventListener("wheel",p,Pl),document.removeEventListener("touchmove",p,Pl),document.removeEventListener("touchstart",v,Pl)}},[]);var S=n.removeScrollBar,C=n.inert;return y.createElement(y.Fragment,null,C?y.createElement(u,{styles:zC(s)}):null,S?y.createElement(RC,{noRelative:n.noRelative,gapMode:n.gapMode}):null)}function HC(n){for(var a=null;n!==null;)n instanceof ShadowRoot&&(a=n.host,n=n.host),n=n.parentNode;return a}const BC=mC(k0,PC);var dh=y.forwardRef(function(n,a){return y.createElement(Mu,Qn({},n,{ref:a,sideCar:BC}))});dh.classNames=Mu.classNames;var $C=function(n){if(typeof document>"u")return null;var a=Array.isArray(n)?n[0]:n;return a.ownerDocument.body},Bl=new WeakMap,Zs=new WeakMap,Is={},pd=0,B0=function(n){return n&&(n.host||B0(n.parentNode))},VC=function(n,a){return a.map(function(l){if(n.contains(l))return l;var i=B0(l);return i&&n.contains(i)?i:(console.error("aria-hidden",l,"in not contained inside",n,". Doing nothing"),null)}).filter(function(l){return!!l})},YC=function(n,a,l,i){var s=VC(a,Array.isArray(n)?n:[n]);Is[l]||(Is[l]=new WeakMap);var u=Is[l],f=[],d=new Set,p=new Set(s),m=function(b){!b||d.has(b)||(d.add(b),m(b.parentNode))};s.forEach(m);var v=function(b){!b||p.has(b)||Array.prototype.forEach.call(b.children,function(w){if(d.has(w))v(w);else try{var S=w.getAttribute(i),C=S!==null&&S!=="false",_=(Bl.get(w)||0)+1,j=(u.get(w)||0)+1;Bl.set(w,_),u.set(w,j),f.push(w),_===1&&C&&Zs.set(w,!0),j===1&&w.setAttribute(l,"true"),C||w.setAttribute(i,"true")}catch(N){console.error("aria-hidden: cannot operate on ",w,N)}})};return v(a),d.clear(),pd++,function(){f.forEach(function(b){var w=Bl.get(b)-1,S=u.get(b)-1;Bl.set(b,w),u.set(b,S),w||(Zs.has(b)||b.removeAttribute(i),Zs.delete(b)),S||b.removeAttribute(l)}),pd--,pd||(Bl=new WeakMap,Bl=new WeakMap,Zs=new WeakMap,Is={})}},$0=function(n,a,l){l===void 0&&(l="data-aria-hidden");var i=Array.from(Array.isArray(n)?n:[n]),s=$C(n);return s?(i.push.apply(i,Array.from(s.querySelectorAll("[aria-live], script"))),YC(i,s,l,"aria-hidden")):function(){return null}},Du="Dialog",[V0,wT]=Au(Du),[qC,Hn]=V0(Du),Y0=n=>{const{__scopeDialog:a,children:l,open:i,defaultOpen:s,onOpenChange:u,modal:f=!0}=n,d=y.useRef(null),p=y.useRef(null),[m,v]=sh({prop:i,defaultProp:s??!1,onChange:u,caller:Du});return g.jsx(qC,{scope:a,triggerRef:d,contentRef:p,contentId:Wn(),titleId:Wn(),descriptionId:Wn(),open:m,onOpenChange:v,onOpenToggle:y.useCallback(()=>v(b=>!b),[v]),modal:f,children:l})};Y0.displayName=Du;var q0="DialogTrigger",FC=y.forwardRef((n,a)=>{const{__scopeDialog:l,...i}=n,s=Hn(q0,l),u=vn(a,s.triggerRef);return g.jsx(pt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":ph(s.open),...i,ref:u,onClick:nn(n.onClick,s.onOpenToggle)})});FC.displayName=q0;var hh="DialogPortal",[KC,F0]=V0(hh,{forceMount:void 0}),K0=n=>{const{__scopeDialog:a,forceMount:l,children:i,container:s}=n,u=Hn(hh,a);return g.jsx(KC,{scope:a,forceMount:l,children:y.Children.map(i,f=>g.jsx(ei,{present:l||u.open,children:g.jsx(fh,{asChild:!0,container:s,children:f})}))})};K0.displayName=hh;var gu="DialogOverlay",G0=y.forwardRef((n,a)=>{const l=F0(gu,n.__scopeDialog),{forceMount:i=l.forceMount,...s}=n,u=Hn(gu,n.__scopeDialog);return u.modal?g.jsx(ei,{present:i||u.open,children:g.jsx(XC,{...s,ref:a})}):null});G0.displayName=gu;var GC=Tu("DialogOverlay.RemoveScroll"),XC=y.forwardRef((n,a)=>{const{__scopeDialog:l,...i}=n,s=Hn(gu,l);return g.jsx(dh,{as:GC,allowPinchZoom:!0,shards:[s.contentRef],children:g.jsx(pt.div,{"data-state":ph(s.open),...i,ref:a,style:{pointerEvents:"auto",...i.style}})})}),Fr="DialogContent",X0=y.forwardRef((n,a)=>{const l=F0(Fr,n.__scopeDialog),{forceMount:i=l.forceMount,...s}=n,u=Hn(Fr,n.__scopeDialog);return g.jsx(ei,{present:i||u.open,children:u.modal?g.jsx(QC,{...s,ref:a}):g.jsx(ZC,{...s,ref:a})})});X0.displayName=Fr;var QC=y.forwardRef((n,a)=>{const l=Hn(Fr,n.__scopeDialog),i=y.useRef(null),s=vn(a,l.contentRef,i);return y.useEffect(()=>{const u=i.current;if(u)return $0(u)},[]),g.jsx(Q0,{...n,ref:s,trapFocus:l.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:nn(n.onCloseAutoFocus,u=>{u.preventDefault(),l.triggerRef.current?.focus()}),onPointerDownOutside:nn(n.onPointerDownOutside,u=>{const f=u.detail.originalEvent,d=f.button===0&&f.ctrlKey===!0;(f.button===2||d)&&u.preventDefault()}),onFocusOutside:nn(n.onFocusOutside,u=>u.preventDefault())})}),ZC=y.forwardRef((n,a)=>{const l=Hn(Fr,n.__scopeDialog),i=y.useRef(!1),s=y.useRef(!1);return g.jsx(Q0,{...n,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:u=>{n.onCloseAutoFocus?.(u),u.defaultPrevented||(i.current||l.triggerRef.current?.focus(),u.preventDefault()),i.current=!1,s.current=!1},onInteractOutside:u=>{n.onInteractOutside?.(u),u.defaultPrevented||(i.current=!0,u.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const f=u.target;l.triggerRef.current?.contains(f)&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&s.current&&u.preventDefault()}})}),Q0=y.forwardRef((n,a)=>{const{__scopeDialog:l,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:u,...f}=n,d=Hn(Fr,l),p=y.useRef(null),m=vn(a,p);return M0(),g.jsxs(g.Fragment,{children:[g.jsx(ch,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:s,onUnmountAutoFocus:u,children:g.jsx(uh,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":ph(d.open),...f,ref:m,onDismiss:()=>d.onOpenChange(!1)})}),g.jsxs(g.Fragment,{children:[g.jsx(IC,{titleId:d.titleId}),g.jsx(WC,{contentRef:p,descriptionId:d.descriptionId})]})]})}),mh="DialogTitle",Z0=y.forwardRef((n,a)=>{const{__scopeDialog:l,...i}=n,s=Hn(mh,l);return g.jsx(pt.h2,{id:s.titleId,...i,ref:a})});Z0.displayName=mh;var I0="DialogDescription",J0=y.forwardRef((n,a)=>{const{__scopeDialog:l,...i}=n,s=Hn(I0,l);return g.jsx(pt.p,{id:s.descriptionId,...i,ref:a})});J0.displayName=I0;var W0="DialogClose",eb=y.forwardRef((n,a)=>{const{__scopeDialog:l,...i}=n,s=Hn(W0,l);return g.jsx(pt.button,{type:"button",...i,ref:a,onClick:nn(n.onClick,()=>s.onOpenChange(!1))})});eb.displayName=W0;function ph(n){return n?"open":"closed"}var tb="DialogTitleWarning",[ST,nb]=C_(tb,{contentName:Fr,titleName:mh,docsSlug:"dialog"}),IC=({titleId:n})=>{const a=nb(tb),l=`\`${a.contentName}\` requires a \`${a.titleName}\` for the component to be accessible for screen reader users.
|
|
108
108
|
|
|
109
109
|
If you want to hide the \`${a.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
110
110
|
|
|
111
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${a.docsSlug}`;return y.useEffect(()=>{n&&(document.getElementById(n)||console.error(l))},[l,n]),null},
|
|
111
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${a.docsSlug}`;return y.useEffect(()=>{n&&(document.getElementById(n)||console.error(l))},[l,n]),null},JC="DialogDescriptionWarning",WC=({contentRef:n,descriptionId:a})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${nb(JC).contentName}}.`;return y.useEffect(()=>{const s=n.current?.getAttribute("aria-describedby");a&&s&&(document.getElementById(a)||console.warn(i))},[i,n,a]),null},ab=Y0,rb=K0,gh=G0,vh=X0,lb=Z0,ib=J0,eN=eb;/**
|
|
112
112
|
* @license lucide-react v0.525.0 - ISC
|
|
113
113
|
*
|
|
114
114
|
* This source code is licensed under the ISC license.
|
|
115
115
|
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
-
*/const
|
|
116
|
+
*/const tN=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),nN=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,l,i)=>i?i.toUpperCase():l.toLowerCase()),yy=n=>{const a=nN(n);return a.charAt(0).toUpperCase()+a.slice(1)},ob=(...n)=>n.filter((a,l,i)=>!!a&&a.trim()!==""&&i.indexOf(a)===l).join(" ").trim(),aN=n=>{for(const a in n)if(a.startsWith("aria-")||a==="role"||a==="title")return!0};/**
|
|
117
117
|
* @license lucide-react v0.525.0 - ISC
|
|
118
118
|
*
|
|
119
119
|
* This source code is licensed under the ISC license.
|
|
120
120
|
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
-
*/var
|
|
121
|
+
*/var rN={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"};/**
|
|
122
122
|
* @license lucide-react v0.525.0 - ISC
|
|
123
123
|
*
|
|
124
124
|
* This source code is licensed under the ISC license.
|
|
125
125
|
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
-
*/const
|
|
126
|
+
*/const lN=y.forwardRef(({color:n="currentColor",size:a=24,strokeWidth:l=2,absoluteStrokeWidth:i,className:s="",children:u,iconNode:f,...d},p)=>y.createElement("svg",{ref:p,...rN,width:a,height:a,stroke:n,strokeWidth:i?Number(l)*24/Number(a):l,className:ob("lucide",s),...!u&&!aN(d)&&{"aria-hidden":"true"},...d},[...f.map(([m,v])=>y.createElement(m,v)),...Array.isArray(u)?u:[u]]));/**
|
|
127
127
|
* @license lucide-react v0.525.0 - ISC
|
|
128
128
|
*
|
|
129
129
|
* This source code is licensed under the ISC license.
|
|
130
130
|
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
-
*/const
|
|
131
|
+
*/const Ut=(n,a)=>{const l=y.forwardRef(({className:i,...s},u)=>y.createElement(lN,{ref:u,iconNode:a,className:ob(`lucide-${tN(yy(n))}`,`lucide-${n}`,i),...s}));return l.displayName=yy(n),l};/**
|
|
132
132
|
* @license lucide-react v0.525.0 - ISC
|
|
133
133
|
*
|
|
134
134
|
* This source code is licensed under the ISC license.
|
|
135
135
|
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
-
*/const
|
|
136
|
+
*/const iN=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],sb=Ut("check",iN);/**
|
|
137
137
|
* @license lucide-react v0.525.0 - ISC
|
|
138
138
|
*
|
|
139
139
|
* This source code is licensed under the ISC license.
|
|
140
140
|
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
-
*/const
|
|
141
|
+
*/const oN=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],ub=Ut("chevrons-up-down",oN);/**
|
|
142
142
|
* @license lucide-react v0.525.0 - ISC
|
|
143
143
|
*
|
|
144
144
|
* This source code is licensed under the ISC license.
|
|
145
145
|
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
-
*/const
|
|
146
|
+
*/const sN=[["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"}]],uN=Ut("circle-alert",sN);/**
|
|
147
147
|
* @license lucide-react v0.525.0 - ISC
|
|
148
148
|
*
|
|
149
149
|
* This source code is licensed under the ISC license.
|
|
150
150
|
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
-
*/const
|
|
151
|
+
*/const cN=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}]],fN=Ut("circle-arrow-up",cN);/**
|
|
152
152
|
* @license lucide-react v0.525.0 - ISC
|
|
153
153
|
*
|
|
154
154
|
* This source code is licensed under the ISC license.
|
|
155
155
|
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
-
*/const
|
|
156
|
+
*/const dN=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],hN=Ut("circle-check-big",dN);/**
|
|
157
157
|
* @license lucide-react v0.525.0 - ISC
|
|
158
158
|
*
|
|
159
159
|
* This source code is licensed under the ISC license.
|
|
160
160
|
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
-
*/const
|
|
161
|
+
*/const mN=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],cb=Ut("circle-x",mN);/**
|
|
162
162
|
* @license lucide-react v0.525.0 - ISC
|
|
163
163
|
*
|
|
164
164
|
* This source code is licensed under the ISC license.
|
|
165
165
|
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
-
*/const
|
|
166
|
+
*/const pN=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],gN=Ut("eye-off",pN);/**
|
|
167
167
|
* @license lucide-react v0.525.0 - ISC
|
|
168
168
|
*
|
|
169
169
|
* This source code is licensed under the ISC license.
|
|
170
170
|
* See the LICENSE file in the root directory of this source tree.
|
|
171
|
-
*/const
|
|
171
|
+
*/const vN=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],yN=Ut("eye",vN);/**
|
|
172
172
|
* @license lucide-react v0.525.0 - ISC
|
|
173
173
|
*
|
|
174
174
|
* This source code is licensed under the ISC license.
|
|
175
175
|
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
-
*/const
|
|
176
|
+
*/const bN=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]],xN=Ut("file-json",bN);/**
|
|
177
177
|
* @license lucide-react v0.525.0 - ISC
|
|
178
178
|
*
|
|
179
179
|
* This source code is licensed under the ISC license.
|
|
180
180
|
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
-
*/const
|
|
181
|
+
*/const wN=[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]],SN=Ut("languages",wN);/**
|
|
182
182
|
* @license lucide-react v0.525.0 - ISC
|
|
183
183
|
*
|
|
184
184
|
* This source code is licensed under the ISC license.
|
|
185
185
|
* See the LICENSE file in the root directory of this source tree.
|
|
186
|
-
*/const
|
|
186
|
+
*/const EN=[["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"}]],vu=Ut("pencil",EN);/**
|
|
187
187
|
* @license lucide-react v0.525.0 - ISC
|
|
188
188
|
*
|
|
189
189
|
* This source code is licensed under the ISC license.
|
|
190
190
|
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
-
*/const
|
|
191
|
+
*/const _N=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Hd=Ut("plus",_N);/**
|
|
192
192
|
* @license lucide-react v0.525.0 - ISC
|
|
193
193
|
*
|
|
194
194
|
* This source code is licensed under the ISC license.
|
|
195
195
|
* See the LICENSE file in the root directory of this source tree.
|
|
196
|
-
*/const
|
|
196
|
+
*/const CN=[["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"}]],fb=Ut("refresh-cw",CN);/**
|
|
197
197
|
* @license lucide-react v0.525.0 - ISC
|
|
198
198
|
*
|
|
199
199
|
* This source code is licensed under the ISC license.
|
|
200
200
|
* See the LICENSE file in the root directory of this source tree.
|
|
201
|
-
*/const
|
|
201
|
+
*/const NN=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],db=Ut("save",NN);/**
|
|
202
202
|
* @license lucide-react v0.525.0 - ISC
|
|
203
203
|
*
|
|
204
204
|
* This source code is licensed under the ISC license.
|
|
205
205
|
* See the LICENSE file in the root directory of this source tree.
|
|
206
|
-
*/const
|
|
206
|
+
*/const RN=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],hb=Ut("search",RN);/**
|
|
207
207
|
* @license lucide-react v0.525.0 - ISC
|
|
208
208
|
*
|
|
209
209
|
* This source code is licensed under the ISC license.
|
|
210
210
|
* See the LICENSE file in the root directory of this source tree.
|
|
211
|
-
*/const
|
|
211
|
+
*/const jN=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],ON=Ut("settings",jN);/**
|
|
212
212
|
* @license lucide-react v0.525.0 - ISC
|
|
213
213
|
*
|
|
214
214
|
* This source code is licensed under the ISC license.
|
|
215
215
|
* See the LICENSE file in the root directory of this source tree.
|
|
216
|
-
*/const
|
|
216
|
+
*/const AN=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],Kr=Ut("trash-2",AN);/**
|
|
217
217
|
* @license lucide-react v0.525.0 - ISC
|
|
218
218
|
*
|
|
219
219
|
* This source code is licensed under the ISC license.
|
|
220
220
|
* See the LICENSE file in the root directory of this source tree.
|
|
221
|
-
*/const LN=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Xl=kt("x",LN);function mb(n){var a,l,i="";if(typeof n=="string"||typeof n=="number")i+=n;else if(typeof n=="object")if(Array.isArray(n)){var s=n.length;for(a=0;a<s;a++)n[a]&&(l=mb(n[a]))&&(i&&(i+=" "),i+=l)}else for(l in n)n[l]&&(i&&(i+=" "),i+=l);return i}function pb(){for(var n,a,l=0,i="",s=arguments.length;l<s;l++)(n=arguments[l])&&(a=mb(n))&&(i&&(i+=" "),i+=a);return i}const bh="-",kN=n=>{const a=UN(n),{conflictingClassGroups:l,conflictingClassGroupModifiers:i}=n;return{getClassGroupId:f=>{const d=f.split(bh);return d[0]===""&&d.length!==1&&d.shift(),gb(d,a)||zN(f)},getConflictingClassGroupIds:(f,d)=>{const p=l[f]||[];return d&&i[f]?[...p,...i[f]]:p}}},gb=(n,a)=>{if(n.length===0)return a.classGroupId;const l=n[0],i=a.nextPart.get(l),s=i?gb(n.slice(1),i):void 0;if(s)return s;if(a.validators.length===0)return;const u=n.join(bh);return a.validators.find(({validator:f})=>f(u))?.classGroupId},xy=/^\[(.+)\]$/,zN=n=>{if(xy.test(n)){const a=xy.exec(n)[1],l=a?.substring(0,a.indexOf(":"));if(l)return"arbitrary.."+l}},UN=n=>{const{theme:a,classGroups:l}=n,i={nextPart:new Map,validators:[]};for(const s in l)$d(l[s],i,s,a);return i},$d=(n,a,l,i)=>{n.forEach(s=>{if(typeof s=="string"){const u=s===""?a:wy(a,s);u.classGroupId=l;return}if(typeof s=="function"){if(PN(s)){$d(s(i),a,l,i);return}a.validators.push({validator:s,classGroupId:l});return}Object.entries(s).forEach(([u,f])=>{$d(f,wy(a,u),l,i)})})},wy=(n,a)=>{let l=n;return a.split(bh).forEach(i=>{l.nextPart.has(i)||l.nextPart.set(i,{nextPart:new Map,validators:[]}),l=l.nextPart.get(i)}),l},PN=n=>n.isThemeGetter,HN=n=>{if(n<1)return{get:()=>{},set:()=>{}};let a=0,l=new Map,i=new Map;const s=(u,f)=>{l.set(u,f),a++,a>n&&(a=0,i=l,l=new Map)};return{get(u){let f=l.get(u);if(f!==void 0)return f;if((f=i.get(u))!==void 0)return s(u,f),f},set(u,f){l.has(u)?l.set(u,f):s(u,f)}}},Vd="!",Yd=":",BN=Yd.length,$N=n=>{const{prefix:a,experimentalParseClassName:l}=n;let i=s=>{const u=[];let f=0,d=0,p=0,m;for(let _=0;_<s.length;_++){let C=s[_];if(f===0&&d===0){if(C===Yd){u.push(s.slice(p,_)),p=_+BN;continue}if(C==="/"){m=_;continue}}C==="["?f++:C==="]"?f--:C==="("?d++:C===")"&&d--}const v=u.length===0?s:s.substring(p),b=VN(v),S=b!==v,w=m&&m>p?m-p:void 0;return{modifiers:u,hasImportantModifier:S,baseClassName:b,maybePostfixModifierPosition:w}};if(a){const s=a+Yd,u=i;i=f=>f.startsWith(s)?u(f.substring(s.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:f,maybePostfixModifierPosition:void 0}}if(l){const s=i;i=u=>l({className:u,parseClassName:s})}return i},VN=n=>n.endsWith(Vd)?n.substring(0,n.length-1):n.startsWith(Vd)?n.substring(1):n,YN=n=>{const a=Object.fromEntries(n.orderSensitiveModifiers.map(i=>[i,!0]));return i=>{if(i.length<=1)return i;const s=[];let u=[];return i.forEach(f=>{f[0]==="["||a[f]?(s.push(...u.sort(),f),u=[]):u.push(f)}),s.push(...u.sort()),s}},qN=n=>({cache:HN(n.cacheSize),parseClassName:$N(n),sortModifiers:YN(n),...kN(n)}),KN=/\s+/,GN=(n,a)=>{const{parseClassName:l,getClassGroupId:i,getConflictingClassGroupIds:s,sortModifiers:u}=a,f=[],d=n.trim().split(KN);let p="";for(let m=d.length-1;m>=0;m-=1){const v=d[m],{isExternal:b,modifiers:S,hasImportantModifier:w,baseClassName:_,maybePostfixModifierPosition:C}=l(v);if(b){p=v+(p.length>0?" "+p:p);continue}let j=!!C,N=i(j?_.substring(0,C):_);if(!N){if(!j){p=v+(p.length>0?" "+p:p);continue}if(N=i(_),!N){p=v+(p.length>0?" "+p:p);continue}j=!1}const U=u(S).join(":"),z=w?U+Vd:U,D=z+N;if(f.includes(D))continue;f.push(D);const T=s(N,j);for(let R=0;R<T.length;++R){const H=T[R];f.push(z+H)}p=v+(p.length>0?" "+p:p)}return p};function FN(){let n=0,a,l,i="";for(;n<arguments.length;)(a=arguments[n++])&&(l=vb(a))&&(i&&(i+=" "),i+=l);return i}const vb=n=>{if(typeof n=="string")return n;let a,l="";for(let i=0;i<n.length;i++)n[i]&&(a=vb(n[i]))&&(l&&(l+=" "),l+=a);return l};function XN(n,...a){let l,i,s,u=f;function f(p){const m=a.reduce((v,b)=>b(v),n());return l=qN(m),i=l.cache.get,s=l.cache.set,u=d,d(p)}function d(p){const m=i(p);if(m)return m;const v=GN(p,l);return s(p,v),v}return function(){return u(FN.apply(null,arguments))}}const Tt=n=>{const a=l=>l[n]||[];return a.isThemeGetter=!0,a},yb=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,bb=/^\((?:(\w[\w-]*):)?(.+)\)$/i,QN=/^\d+\/\d+$/,ZN=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,IN=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,JN=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,WN=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,eR=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,$l=n=>QN.test(n),qe=n=>!!n&&!Number.isNaN(Number(n)),Ja=n=>!!n&&Number.isInteger(Number(n)),yd=n=>n.endsWith("%")&&qe(n.slice(0,-1)),ba=n=>ZN.test(n),tR=()=>!0,nR=n=>IN.test(n)&&!JN.test(n),xb=()=>!1,aR=n=>WN.test(n),rR=n=>eR.test(n),lR=n=>!be(n)&&!xe(n),iR=n=>ti(n,Eb,xb),be=n=>yb.test(n),Ur=n=>ti(n,Cb,nR),bd=n=>ti(n,fR,qe),Sy=n=>ti(n,wb,xb),oR=n=>ti(n,Sb,rR),Js=n=>ti(n,_b,aR),xe=n=>bb.test(n),oo=n=>ni(n,Cb),sR=n=>ni(n,dR),Ey=n=>ni(n,wb),uR=n=>ni(n,Eb),cR=n=>ni(n,Sb),Ws=n=>ni(n,_b,!0),ti=(n,a,l)=>{const i=yb.exec(n);return i?i[1]?a(i[1]):l(i[2]):!1},ni=(n,a,l=!1)=>{const i=bb.exec(n);return i?i[1]?a(i[1]):l:!1},wb=n=>n==="position"||n==="percentage",Sb=n=>n==="image"||n==="url",Eb=n=>n==="length"||n==="size"||n==="bg-size",Cb=n=>n==="length",fR=n=>n==="number",dR=n=>n==="family-name",_b=n=>n==="shadow",hR=()=>{const n=Tt("color"),a=Tt("font"),l=Tt("text"),i=Tt("font-weight"),s=Tt("tracking"),u=Tt("leading"),f=Tt("breakpoint"),d=Tt("container"),p=Tt("spacing"),m=Tt("radius"),v=Tt("shadow"),b=Tt("inset-shadow"),S=Tt("text-shadow"),w=Tt("drop-shadow"),_=Tt("blur"),C=Tt("perspective"),j=Tt("aspect"),N=Tt("ease"),U=Tt("animate"),z=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],T=()=>[...D(),xe,be],R=()=>["auto","hidden","clip","visible","scroll"],H=()=>["auto","contain","none"],Z=()=>[xe,be,p],J=()=>[$l,"full","auto",...Z()],ne=()=>[Ja,"none","subgrid",xe,be],Se=()=>["auto",{span:["full",Ja,xe,be]},Ja,xe,be],de=()=>[Ja,"auto",xe,be],oe=()=>["auto","min","max","fr",xe,be],fe=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],he=()=>["start","end","center","stretch","center-safe","end-safe"],L=()=>["auto",...Z()],I=()=>[$l,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...Z()],V=()=>[n,xe,be],ge=()=>[...D(),Ey,Sy,{position:[xe,be]}],O=()=>["no-repeat",{repeat:["","x","y","space","round"]}],K=()=>["auto","cover","contain",uR,iR,{size:[xe,be]}],P=()=>[yd,oo,Ur],G=()=>["","none","full",m,xe,be],ee=()=>["",qe,oo,Ur],se=()=>["solid","dashed","dotted","double"],pe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ve=()=>[qe,yd,Ey,Sy],ze=()=>["","none",_,xe,be],Ze=()=>["none",qe,xe,be],Ae=()=>["none",qe,xe,be],le=()=>[qe,xe,be],ae=()=>[$l,"full",...Z()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ba],breakpoint:[ba],color:[tR],container:[ba],"drop-shadow":[ba],ease:["in","out","in-out"],font:[lR],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ba],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ba],shadow:[ba],spacing:["px",qe],text:[ba],"text-shadow":[ba],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",$l,be,xe,j]}],container:["container"],columns:[{columns:[qe,be,xe,d]}],"break-after":[{"break-after":z()}],"break-before":[{"break-before":z()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:T()}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:H()}],"overscroll-x":[{"overscroll-x":H()}],"overscroll-y":[{"overscroll-y":H()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:J()}],"inset-x":[{"inset-x":J()}],"inset-y":[{"inset-y":J()}],start:[{start:J()}],end:[{end:J()}],top:[{top:J()}],right:[{right:J()}],bottom:[{bottom:J()}],left:[{left:J()}],visibility:["visible","invisible","collapse"],z:[{z:[Ja,"auto",xe,be]}],basis:[{basis:[$l,"full","auto",d,...Z()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[qe,$l,"auto","initial","none",be]}],grow:[{grow:["",qe,xe,be]}],shrink:[{shrink:["",qe,xe,be]}],order:[{order:[Ja,"first","last","none",xe,be]}],"grid-cols":[{"grid-cols":ne()}],"col-start-end":[{col:Se()}],"col-start":[{"col-start":de()}],"col-end":[{"col-end":de()}],"grid-rows":[{"grid-rows":ne()}],"row-start-end":[{row:Se()}],"row-start":[{"row-start":de()}],"row-end":[{"row-end":de()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":oe()}],"auto-rows":[{"auto-rows":oe()}],gap:[{gap:Z()}],"gap-x":[{"gap-x":Z()}],"gap-y":[{"gap-y":Z()}],"justify-content":[{justify:[...fe(),"normal"]}],"justify-items":[{"justify-items":[...he(),"normal"]}],"justify-self":[{"justify-self":["auto",...he()]}],"align-content":[{content:["normal",...fe()]}],"align-items":[{items:[...he(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...he(),{baseline:["","last"]}]}],"place-content":[{"place-content":fe()}],"place-items":[{"place-items":[...he(),"baseline"]}],"place-self":[{"place-self":["auto",...he()]}],p:[{p:Z()}],px:[{px:Z()}],py:[{py:Z()}],ps:[{ps:Z()}],pe:[{pe:Z()}],pt:[{pt:Z()}],pr:[{pr:Z()}],pb:[{pb:Z()}],pl:[{pl:Z()}],m:[{m:L()}],mx:[{mx:L()}],my:[{my:L()}],ms:[{ms:L()}],me:[{me:L()}],mt:[{mt:L()}],mr:[{mr:L()}],mb:[{mb:L()}],ml:[{ml:L()}],"space-x":[{"space-x":Z()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":Z()}],"space-y-reverse":["space-y-reverse"],size:[{size:I()}],w:[{w:[d,"screen",...I()]}],"min-w":[{"min-w":[d,"screen","none",...I()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[f]},...I()]}],h:[{h:["screen","lh",...I()]}],"min-h":[{"min-h":["screen","lh","none",...I()]}],"max-h":[{"max-h":["screen","lh",...I()]}],"font-size":[{text:["base",l,oo,Ur]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,xe,bd]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",yd,be]}],"font-family":[{font:[sR,be,a]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,xe,be]}],"line-clamp":[{"line-clamp":[qe,"none",xe,bd]}],leading:[{leading:[u,...Z()]}],"list-image":[{"list-image":["none",xe,be]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",xe,be]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:V()}],"text-color":[{text:V()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...se(),"wavy"]}],"text-decoration-thickness":[{decoration:[qe,"from-font","auto",xe,Ur]}],"text-decoration-color":[{decoration:V()}],"underline-offset":[{"underline-offset":[qe,"auto",xe,be]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:Z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",xe,be]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",xe,be]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ge()}],"bg-repeat":[{bg:O()}],"bg-size":[{bg:K()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ja,xe,be],radial:["",xe,be],conic:[Ja,xe,be]},cR,oR]}],"bg-color":[{bg:V()}],"gradient-from-pos":[{from:P()}],"gradient-via-pos":[{via:P()}],"gradient-to-pos":[{to:P()}],"gradient-from":[{from:V()}],"gradient-via":[{via:V()}],"gradient-to":[{to:V()}],rounded:[{rounded:G()}],"rounded-s":[{"rounded-s":G()}],"rounded-e":[{"rounded-e":G()}],"rounded-t":[{"rounded-t":G()}],"rounded-r":[{"rounded-r":G()}],"rounded-b":[{"rounded-b":G()}],"rounded-l":[{"rounded-l":G()}],"rounded-ss":[{"rounded-ss":G()}],"rounded-se":[{"rounded-se":G()}],"rounded-ee":[{"rounded-ee":G()}],"rounded-es":[{"rounded-es":G()}],"rounded-tl":[{"rounded-tl":G()}],"rounded-tr":[{"rounded-tr":G()}],"rounded-br":[{"rounded-br":G()}],"rounded-bl":[{"rounded-bl":G()}],"border-w":[{border:ee()}],"border-w-x":[{"border-x":ee()}],"border-w-y":[{"border-y":ee()}],"border-w-s":[{"border-s":ee()}],"border-w-e":[{"border-e":ee()}],"border-w-t":[{"border-t":ee()}],"border-w-r":[{"border-r":ee()}],"border-w-b":[{"border-b":ee()}],"border-w-l":[{"border-l":ee()}],"divide-x":[{"divide-x":ee()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ee()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...se(),"hidden","none"]}],"divide-style":[{divide:[...se(),"hidden","none"]}],"border-color":[{border:V()}],"border-color-x":[{"border-x":V()}],"border-color-y":[{"border-y":V()}],"border-color-s":[{"border-s":V()}],"border-color-e":[{"border-e":V()}],"border-color-t":[{"border-t":V()}],"border-color-r":[{"border-r":V()}],"border-color-b":[{"border-b":V()}],"border-color-l":[{"border-l":V()}],"divide-color":[{divide:V()}],"outline-style":[{outline:[...se(),"none","hidden"]}],"outline-offset":[{"outline-offset":[qe,xe,be]}],"outline-w":[{outline:["",qe,oo,Ur]}],"outline-color":[{outline:V()}],shadow:[{shadow:["","none",v,Ws,Js]}],"shadow-color":[{shadow:V()}],"inset-shadow":[{"inset-shadow":["none",b,Ws,Js]}],"inset-shadow-color":[{"inset-shadow":V()}],"ring-w":[{ring:ee()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:V()}],"ring-offset-w":[{"ring-offset":[qe,Ur]}],"ring-offset-color":[{"ring-offset":V()}],"inset-ring-w":[{"inset-ring":ee()}],"inset-ring-color":[{"inset-ring":V()}],"text-shadow":[{"text-shadow":["none",S,Ws,Js]}],"text-shadow-color":[{"text-shadow":V()}],opacity:[{opacity:[qe,xe,be]}],"mix-blend":[{"mix-blend":[...pe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":pe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[qe]}],"mask-image-linear-from-pos":[{"mask-linear-from":ve()}],"mask-image-linear-to-pos":[{"mask-linear-to":ve()}],"mask-image-linear-from-color":[{"mask-linear-from":V()}],"mask-image-linear-to-color":[{"mask-linear-to":V()}],"mask-image-t-from-pos":[{"mask-t-from":ve()}],"mask-image-t-to-pos":[{"mask-t-to":ve()}],"mask-image-t-from-color":[{"mask-t-from":V()}],"mask-image-t-to-color":[{"mask-t-to":V()}],"mask-image-r-from-pos":[{"mask-r-from":ve()}],"mask-image-r-to-pos":[{"mask-r-to":ve()}],"mask-image-r-from-color":[{"mask-r-from":V()}],"mask-image-r-to-color":[{"mask-r-to":V()}],"mask-image-b-from-pos":[{"mask-b-from":ve()}],"mask-image-b-to-pos":[{"mask-b-to":ve()}],"mask-image-b-from-color":[{"mask-b-from":V()}],"mask-image-b-to-color":[{"mask-b-to":V()}],"mask-image-l-from-pos":[{"mask-l-from":ve()}],"mask-image-l-to-pos":[{"mask-l-to":ve()}],"mask-image-l-from-color":[{"mask-l-from":V()}],"mask-image-l-to-color":[{"mask-l-to":V()}],"mask-image-x-from-pos":[{"mask-x-from":ve()}],"mask-image-x-to-pos":[{"mask-x-to":ve()}],"mask-image-x-from-color":[{"mask-x-from":V()}],"mask-image-x-to-color":[{"mask-x-to":V()}],"mask-image-y-from-pos":[{"mask-y-from":ve()}],"mask-image-y-to-pos":[{"mask-y-to":ve()}],"mask-image-y-from-color":[{"mask-y-from":V()}],"mask-image-y-to-color":[{"mask-y-to":V()}],"mask-image-radial":[{"mask-radial":[xe,be]}],"mask-image-radial-from-pos":[{"mask-radial-from":ve()}],"mask-image-radial-to-pos":[{"mask-radial-to":ve()}],"mask-image-radial-from-color":[{"mask-radial-from":V()}],"mask-image-radial-to-color":[{"mask-radial-to":V()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":D()}],"mask-image-conic-pos":[{"mask-conic":[qe]}],"mask-image-conic-from-pos":[{"mask-conic-from":ve()}],"mask-image-conic-to-pos":[{"mask-conic-to":ve()}],"mask-image-conic-from-color":[{"mask-conic-from":V()}],"mask-image-conic-to-color":[{"mask-conic-to":V()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ge()}],"mask-repeat":[{mask:O()}],"mask-size":[{mask:K()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",xe,be]}],filter:[{filter:["","none",xe,be]}],blur:[{blur:ze()}],brightness:[{brightness:[qe,xe,be]}],contrast:[{contrast:[qe,xe,be]}],"drop-shadow":[{"drop-shadow":["","none",w,Ws,Js]}],"drop-shadow-color":[{"drop-shadow":V()}],grayscale:[{grayscale:["",qe,xe,be]}],"hue-rotate":[{"hue-rotate":[qe,xe,be]}],invert:[{invert:["",qe,xe,be]}],saturate:[{saturate:[qe,xe,be]}],sepia:[{sepia:["",qe,xe,be]}],"backdrop-filter":[{"backdrop-filter":["","none",xe,be]}],"backdrop-blur":[{"backdrop-blur":ze()}],"backdrop-brightness":[{"backdrop-brightness":[qe,xe,be]}],"backdrop-contrast":[{"backdrop-contrast":[qe,xe,be]}],"backdrop-grayscale":[{"backdrop-grayscale":["",qe,xe,be]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[qe,xe,be]}],"backdrop-invert":[{"backdrop-invert":["",qe,xe,be]}],"backdrop-opacity":[{"backdrop-opacity":[qe,xe,be]}],"backdrop-saturate":[{"backdrop-saturate":[qe,xe,be]}],"backdrop-sepia":[{"backdrop-sepia":["",qe,xe,be]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":Z()}],"border-spacing-x":[{"border-spacing-x":Z()}],"border-spacing-y":[{"border-spacing-y":Z()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",xe,be]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[qe,"initial",xe,be]}],ease:[{ease:["linear","initial",N,xe,be]}],delay:[{delay:[qe,xe,be]}],animate:[{animate:["none",U,xe,be]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[C,xe,be]}],"perspective-origin":[{"perspective-origin":T()}],rotate:[{rotate:Ze()}],"rotate-x":[{"rotate-x":Ze()}],"rotate-y":[{"rotate-y":Ze()}],"rotate-z":[{"rotate-z":Ze()}],scale:[{scale:Ae()}],"scale-x":[{"scale-x":Ae()}],"scale-y":[{"scale-y":Ae()}],"scale-z":[{"scale-z":Ae()}],"scale-3d":["scale-3d"],skew:[{skew:le()}],"skew-x":[{"skew-x":le()}],"skew-y":[{"skew-y":le()}],transform:[{transform:[xe,be,"","none","gpu","cpu"]}],"transform-origin":[{origin:T()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ae()}],"translate-x":[{"translate-x":ae()}],"translate-y":[{"translate-y":ae()}],"translate-z":[{"translate-z":ae()}],"translate-none":["translate-none"],accent:[{accent:V()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:V()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",xe,be]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":Z()}],"scroll-mx":[{"scroll-mx":Z()}],"scroll-my":[{"scroll-my":Z()}],"scroll-ms":[{"scroll-ms":Z()}],"scroll-me":[{"scroll-me":Z()}],"scroll-mt":[{"scroll-mt":Z()}],"scroll-mr":[{"scroll-mr":Z()}],"scroll-mb":[{"scroll-mb":Z()}],"scroll-ml":[{"scroll-ml":Z()}],"scroll-p":[{"scroll-p":Z()}],"scroll-px":[{"scroll-px":Z()}],"scroll-py":[{"scroll-py":Z()}],"scroll-ps":[{"scroll-ps":Z()}],"scroll-pe":[{"scroll-pe":Z()}],"scroll-pt":[{"scroll-pt":Z()}],"scroll-pr":[{"scroll-pr":Z()}],"scroll-pb":[{"scroll-pb":Z()}],"scroll-pl":[{"scroll-pl":Z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",xe,be]}],fill:[{fill:["none",...V()]}],"stroke-w":[{stroke:[qe,oo,Ur,bd]}],stroke:[{stroke:["none",...V()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},mR=XN(hR);function rt(...n){return mR(pb(n))}const Kr=lb,pR=ib,Nb=y.forwardRef(({className:n,...a},l)=>g.jsx(vh,{ref:l,className:rt("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",n),...a}));Nb.displayName=vh.displayName;const lr=y.forwardRef(({className:n,children:a,...l},i)=>g.jsxs(pR,{children:[g.jsx(Nb,{}),g.jsxs(yh,{ref:i,className:rt("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-300 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg animate-scale-in",n),...l,children:[a,g.jsxs(tN,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground transition-all-ease hover:scale-110",children:[g.jsx(Xl,{className:"h-4 w-4"}),g.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));lr.displayName=yh.displayName;const ir=({className:n,...a})=>g.jsx("div",{className:rt("flex flex-col space-y-1.5 text-center sm:text-left",n),...a});ir.displayName="DialogHeader";const Gr=({className:n,...a})=>g.jsx("div",{className:rt("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",n),...a});Gr.displayName="DialogFooter";const or=y.forwardRef(({className:n,...a},l)=>g.jsx(ob,{ref:l,className:rt("text-lg font-semibold leading-none tracking-tight",n),...a}));or.displayName=ob.displayName;const zu=y.forwardRef(({className:n,...a},l)=>g.jsx(sb,{ref:l,className:rt("text-sm text-muted-foreground",n),...a}));zu.displayName=sb.displayName;const Cy=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,_y=pb,xh=(n,a)=>l=>{var i;if(a?.variants==null)return _y(n,l?.class,l?.className);const{variants:s,defaultVariants:u}=a,f=Object.keys(s).map(m=>{const v=l?.[m],b=u?.[m];if(v===null)return null;const S=Cy(v)||Cy(b);return s[m][S]}),d=l&&Object.entries(l).reduce((m,v)=>{let[b,S]=v;return S===void 0||(m[b]=S),m},{}),p=a==null||(i=a.compoundVariants)===null||i===void 0?void 0:i.reduce((m,v)=>{let{class:b,className:S,...w}=v;return Object.entries(w).every(_=>{let[C,j]=_;return Array.isArray(j)?j.includes({...u,...d}[C]):{...u,...d}[C]===j})?[...m,b,S]:m},[]);return _y(n,f,p,l?.class,l?.className)},gR=xh("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"border border-destructive/50 text-destructive hover:bg-destructive hover:text-destructive-foreground",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Te=y.forwardRef(({className:n,variant:a,size:l,asChild:i=!1,...s},u)=>{const f=i?DC:"button";return g.jsx(f,{className:rt(gR({variant:a,size:l,className:n})),ref:u,...s})});Te.displayName="Button";const mt=y.forwardRef(({className:n,type:a,...l},i)=>g.jsx("input",{type:a,className:rt("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",n),ref:i,...l}));mt.displayName="Input";var vR="Label",Rb=y.forwardRef((n,a)=>g.jsx(dt.label,{...n,ref:a,onMouseDown:l=>{l.target.closest("button, input, select, textarea")||(n.onMouseDown?.(l),!l.defaultPrevented&&l.detail>1&&l.preventDefault())}}));Rb.displayName=vR;var jb=Rb;const yR=xh("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Je=y.forwardRef(({className:n,...a},l)=>g.jsx(jb,{ref:l,className:rt(yR(),n),...a}));Je.displayName=jb.displayName;function bR(n){const a=y.useRef({value:n,previous:n});return y.useMemo(()=>(a.current.value!==n&&(a.current.previous=a.current.value,a.current.value=n),a.current.previous),[n])}function Ob(n){const[a,l]=y.useState(void 0);return rr(()=>{if(n){l({width:n.offsetWidth,height:n.offsetHeight});const i=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const u=s[0];let f,d;if("borderBoxSize"in u){const p=u.borderBoxSize,m=Array.isArray(p)?p[0]:p;f=m.inlineSize,d=m.blockSize}else f=n.offsetWidth,d=n.offsetHeight;l({width:f,height:d})});return i.observe(n,{box:"border-box"}),()=>i.unobserve(n)}else l(void 0)},[n]),a}var Uu="Switch",[xR,CT]=Mu(Uu),[wR,SR]=xR(Uu),Ab=y.forwardRef((n,a)=>{const{__scopeSwitch:l,name:i,checked:s,defaultChecked:u,required:f,disabled:d,value:p="on",onCheckedChange:m,form:v,...b}=n,[S,w]=y.useState(null),_=hn(a,z=>w(z)),C=y.useRef(!1),j=S?v||!!S.closest("form"):!0,[N,U]=uh({prop:s,defaultProp:u??!1,onChange:m,caller:Uu});return g.jsxs(wR,{scope:l,checked:N,disabled:d,children:[g.jsx(dt.button,{type:"button",role:"switch","aria-checked":N,"aria-required":f,"data-state":Lb(N),"data-disabled":d?"":void 0,disabled:d,value:p,...b,ref:_,onClick:Wt(n.onClick,z=>{U(D=>!D),j&&(C.current=z.isPropagationStopped(),C.current||z.stopPropagation())})}),j&&g.jsx(Db,{control:S,bubbles:!C.current,name:i,value:p,checked:N,required:f,disabled:d,form:v,style:{transform:"translateX(-100%)"}})]})});Ab.displayName=Uu;var Tb="SwitchThumb",Mb=y.forwardRef((n,a)=>{const{__scopeSwitch:l,...i}=n,s=SR(Tb,l);return g.jsx(dt.span,{"data-state":Lb(s.checked),"data-disabled":s.disabled?"":void 0,...i,ref:a})});Mb.displayName=Tb;var ER="SwitchBubbleInput",Db=y.forwardRef(({__scopeSwitch:n,control:a,checked:l,bubbles:i=!0,...s},u)=>{const f=y.useRef(null),d=hn(f,u),p=bR(l),m=Ob(a);return y.useEffect(()=>{const v=f.current;if(!v)return;const b=window.HTMLInputElement.prototype,w=Object.getOwnPropertyDescriptor(b,"checked").set;if(p!==l&&w){const _=new Event("click",{bubbles:i});w.call(v,l),v.dispatchEvent(_)}},[p,l,i]),g.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:l,...s,tabIndex:-1,ref:d,style:{...s.style,...m,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Db.displayName=ER;function Lb(n){return n?"checked":"unchecked"}var kb=Ab,CR=Mb;const qd=y.forwardRef(({className:n,...a},l)=>g.jsx(kb,{className:rt("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-all-ease focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",n),...a,ref:l,children:g.jsx(CR,{className:rt("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0 transition-all-ease")})}));qd.displayName=kb.displayName;var Ny=1,_R=.9,NR=.8,RR=.17,xd=.1,wd=.999,jR=.9999,OR=.99,AR=/[\\\/_+.#"@\[\(\{&]/,TR=/[\\\/_+.#"@\[\(\{&]/g,MR=/[\s-]/,zb=/[\s-]/g;function Kd(n,a,l,i,s,u,f){if(u===a.length)return s===n.length?Ny:OR;var d=`${s},${u}`;if(f[d]!==void 0)return f[d];for(var p=i.charAt(u),m=l.indexOf(p,s),v=0,b,S,w,_;m>=0;)b=Kd(n,a,l,i,m+1,u+1,f),b>v&&(m===s?b*=Ny:AR.test(n.charAt(m-1))?(b*=NR,w=n.slice(s,m-1).match(TR),w&&s>0&&(b*=Math.pow(wd,w.length))):MR.test(n.charAt(m-1))?(b*=_R,_=n.slice(s,m-1).match(zb),_&&s>0&&(b*=Math.pow(wd,_.length))):(b*=RR,s>0&&(b*=Math.pow(wd,m-s))),n.charAt(m)!==a.charAt(u)&&(b*=jR)),(b<xd&&l.charAt(m-1)===i.charAt(u+1)||i.charAt(u+1)===i.charAt(u)&&l.charAt(m-1)!==i.charAt(u))&&(S=Kd(n,a,l,i,m+1,u+2,f),S*xd>b&&(b=S*xd)),b>v&&(v=b),m=l.indexOf(p,m+1);return f[d]=v,v}function Ry(n){return n.toLowerCase().replace(zb," ")}function DR(n,a,l){return n=l&&l.length>0?`${n+" "+l.join(" ")}`:n,Kd(n,a,Ry(n),Ry(a),0,0,{})}var so='[cmdk-group=""]',Sd='[cmdk-group-items=""]',LR='[cmdk-group-heading=""]',Ub='[cmdk-item=""]',jy=`${Ub}:not([aria-disabled="true"])`,Gd="cmdk-item-select",Yl="data-value",kR=(n,a,l)=>DR(n,a,l),Pb=y.createContext(void 0),_o=()=>y.useContext(Pb),Hb=y.createContext(void 0),wh=()=>y.useContext(Hb),Bb=y.createContext(void 0),$b=y.forwardRef((n,a)=>{let l=ql(()=>{var P,G;return{search:"",value:(G=(P=n.value)!=null?P:n.defaultValue)!=null?G:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),i=ql(()=>new Set),s=ql(()=>new Map),u=ql(()=>new Map),f=ql(()=>new Set),d=Vb(n),{label:p,children:m,value:v,onValueChange:b,filter:S,shouldFilter:w,loop:_,disablePointerSelection:C=!1,vimBindings:j=!0,...N}=n,U=Qn(),z=Qn(),D=Qn(),T=y.useRef(null),R=GR();Fr(()=>{if(v!==void 0){let P=v.trim();l.current.value=P,H.emit()}},[v]),Fr(()=>{R(6,oe)},[]);let H=y.useMemo(()=>({subscribe:P=>(f.current.add(P),()=>f.current.delete(P)),snapshot:()=>l.current,setState:(P,G,ee)=>{var se,pe,ve,ze;if(!Object.is(l.current[P],G)){if(l.current[P]=G,P==="search")de(),ne(),R(1,Se);else if(P==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let Ze=document.getElementById(D);Ze?Ze.focus():(se=document.getElementById(U))==null||se.focus()}if(R(7,()=>{var Ze;l.current.selectedItemId=(Ze=fe())==null?void 0:Ze.id,H.emit()}),ee||R(5,oe),((pe=d.current)==null?void 0:pe.value)!==void 0){let Ze=G??"";(ze=(ve=d.current).onValueChange)==null||ze.call(ve,Ze);return}}H.emit()}},emit:()=>{f.current.forEach(P=>P())}}),[]),Z=y.useMemo(()=>({value:(P,G,ee)=>{var se;G!==((se=u.current.get(P))==null?void 0:se.value)&&(u.current.set(P,{value:G,keywords:ee}),l.current.filtered.items.set(P,J(G,ee)),R(2,()=>{ne(),H.emit()}))},item:(P,G)=>(i.current.add(P),G&&(s.current.has(G)?s.current.get(G).add(P):s.current.set(G,new Set([P]))),R(3,()=>{de(),ne(),l.current.value||Se(),H.emit()}),()=>{u.current.delete(P),i.current.delete(P),l.current.filtered.items.delete(P);let ee=fe();R(4,()=>{de(),ee?.getAttribute("id")===P&&Se(),H.emit()})}),group:P=>(s.current.has(P)||s.current.set(P,new Set),()=>{u.current.delete(P),s.current.delete(P)}),filter:()=>d.current.shouldFilter,label:p||n["aria-label"],getDisablePointerSelection:()=>d.current.disablePointerSelection,listId:U,inputId:D,labelId:z,listInnerRef:T}),[]);function J(P,G){var ee,se;let pe=(se=(ee=d.current)==null?void 0:ee.filter)!=null?se:kR;return P?pe(P,l.current.search,G):0}function ne(){if(!l.current.search||d.current.shouldFilter===!1)return;let P=l.current.filtered.items,G=[];l.current.filtered.groups.forEach(se=>{let pe=s.current.get(se),ve=0;pe.forEach(ze=>{let Ze=P.get(ze);ve=Math.max(Ze,ve)}),G.push([se,ve])});let ee=T.current;he().sort((se,pe)=>{var ve,ze;let Ze=se.getAttribute("id"),Ae=pe.getAttribute("id");return((ve=P.get(Ae))!=null?ve:0)-((ze=P.get(Ze))!=null?ze:0)}).forEach(se=>{let pe=se.closest(Sd);pe?pe.appendChild(se.parentElement===pe?se:se.closest(`${Sd} > *`)):ee.appendChild(se.parentElement===ee?se:se.closest(`${Sd} > *`))}),G.sort((se,pe)=>pe[1]-se[1]).forEach(se=>{var pe;let ve=(pe=T.current)==null?void 0:pe.querySelector(`${so}[${Yl}="${encodeURIComponent(se[0])}"]`);ve?.parentElement.appendChild(ve)})}function Se(){let P=he().find(ee=>ee.getAttribute("aria-disabled")!=="true"),G=P?.getAttribute(Yl);H.setState("value",G||void 0)}function de(){var P,G,ee,se;if(!l.current.search||d.current.shouldFilter===!1){l.current.filtered.count=i.current.size;return}l.current.filtered.groups=new Set;let pe=0;for(let ve of i.current){let ze=(G=(P=u.current.get(ve))==null?void 0:P.value)!=null?G:"",Ze=(se=(ee=u.current.get(ve))==null?void 0:ee.keywords)!=null?se:[],Ae=J(ze,Ze);l.current.filtered.items.set(ve,Ae),Ae>0&&pe++}for(let[ve,ze]of s.current)for(let Ze of ze)if(l.current.filtered.items.get(Ze)>0){l.current.filtered.groups.add(ve);break}l.current.filtered.count=pe}function oe(){var P,G,ee;let se=fe();se&&(((P=se.parentElement)==null?void 0:P.firstChild)===se&&((ee=(G=se.closest(so))==null?void 0:G.querySelector(LR))==null||ee.scrollIntoView({block:"nearest"})),se.scrollIntoView({block:"nearest"}))}function fe(){var P;return(P=T.current)==null?void 0:P.querySelector(`${Ub}[aria-selected="true"]`)}function he(){var P;return Array.from(((P=T.current)==null?void 0:P.querySelectorAll(jy))||[])}function L(P){let G=he()[P];G&&H.setState("value",G.getAttribute(Yl))}function I(P){var G;let ee=fe(),se=he(),pe=se.findIndex(ze=>ze===ee),ve=se[pe+P];(G=d.current)!=null&&G.loop&&(ve=pe+P<0?se[se.length-1]:pe+P===se.length?se[0]:se[pe+P]),ve&&H.setState("value",ve.getAttribute(Yl))}function V(P){let G=fe(),ee=G?.closest(so),se;for(;ee&&!se;)ee=P>0?qR(ee,so):KR(ee,so),se=ee?.querySelector(jy);se?H.setState("value",se.getAttribute(Yl)):I(P)}let ge=()=>L(he().length-1),O=P=>{P.preventDefault(),P.metaKey?ge():P.altKey?V(1):I(1)},K=P=>{P.preventDefault(),P.metaKey?L(0):P.altKey?V(-1):I(-1)};return y.createElement(dt.div,{ref:a,tabIndex:-1,...N,"cmdk-root":"",onKeyDown:P=>{var G;(G=N.onKeyDown)==null||G.call(N,P);let ee=P.nativeEvent.isComposing||P.keyCode===229;if(!(P.defaultPrevented||ee))switch(P.key){case"n":case"j":{j&&P.ctrlKey&&O(P);break}case"ArrowDown":{O(P);break}case"p":case"k":{j&&P.ctrlKey&&K(P);break}case"ArrowUp":{K(P);break}case"Home":{P.preventDefault(),L(0);break}case"End":{P.preventDefault(),ge();break}case"Enter":{P.preventDefault();let se=fe();if(se){let pe=new Event(Gd);se.dispatchEvent(pe)}}}}},y.createElement("label",{"cmdk-label":"",htmlFor:Z.inputId,id:Z.labelId,style:XR},p),Pu(n,P=>y.createElement(Hb.Provider,{value:H},y.createElement(Pb.Provider,{value:Z},P))))}),zR=y.forwardRef((n,a)=>{var l,i;let s=Qn(),u=y.useRef(null),f=y.useContext(Bb),d=_o(),p=Vb(n),m=(i=(l=p.current)==null?void 0:l.forceMount)!=null?i:f?.forceMount;Fr(()=>{if(!m)return d.item(s,f?.id)},[m]);let v=Yb(s,u,[n.value,n.children,u],n.keywords),b=wh(),S=sr(R=>R.value&&R.value===v.current),w=sr(R=>m||d.filter()===!1?!0:R.search?R.filtered.items.get(s)>0:!0);y.useEffect(()=>{let R=u.current;if(!(!R||n.disabled))return R.addEventListener(Gd,_),()=>R.removeEventListener(Gd,_)},[w,n.onSelect,n.disabled]);function _(){var R,H;C(),(H=(R=p.current).onSelect)==null||H.call(R,v.current)}function C(){b.setState("value",v.current,!0)}if(!w)return null;let{disabled:j,value:N,onSelect:U,forceMount:z,keywords:D,...T}=n;return y.createElement(dt.div,{ref:Vr(u,a),...T,id:s,"cmdk-item":"",role:"option","aria-disabled":!!j,"aria-selected":!!S,"data-disabled":!!j,"data-selected":!!S,onPointerMove:j||d.getDisablePointerSelection()?void 0:C,onClick:j?void 0:_},n.children)}),UR=y.forwardRef((n,a)=>{let{heading:l,children:i,forceMount:s,...u}=n,f=Qn(),d=y.useRef(null),p=y.useRef(null),m=Qn(),v=_o(),b=sr(w=>s||v.filter()===!1?!0:w.search?w.filtered.groups.has(f):!0);Fr(()=>v.group(f),[]),Yb(f,d,[n.value,n.heading,p]);let S=y.useMemo(()=>({id:f,forceMount:s}),[s]);return y.createElement(dt.div,{ref:Vr(d,a),...u,"cmdk-group":"",role:"presentation",hidden:b?void 0:!0},l&&y.createElement("div",{ref:p,"cmdk-group-heading":"","aria-hidden":!0,id:m},l),Pu(n,w=>y.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":l?m:void 0},y.createElement(Bb.Provider,{value:S},w))))}),PR=y.forwardRef((n,a)=>{let{alwaysRender:l,...i}=n,s=y.useRef(null),u=sr(f=>!f.search);return!l&&!u?null:y.createElement(dt.div,{ref:Vr(s,a),...i,"cmdk-separator":"",role:"separator"})}),HR=y.forwardRef((n,a)=>{let{onValueChange:l,...i}=n,s=n.value!=null,u=wh(),f=sr(m=>m.search),d=sr(m=>m.selectedItemId),p=_o();return y.useEffect(()=>{n.value!=null&&u.setState("search",n.value)},[n.value]),y.createElement(dt.input,{ref:a,...i,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":p.listId,"aria-labelledby":p.labelId,"aria-activedescendant":d,id:p.inputId,type:"text",value:s?n.value:f,onChange:m=>{s||u.setState("search",m.target.value),l?.(m.target.value)}})}),BR=y.forwardRef((n,a)=>{let{children:l,label:i="Suggestions",...s}=n,u=y.useRef(null),f=y.useRef(null),d=sr(m=>m.selectedItemId),p=_o();return y.useEffect(()=>{if(f.current&&u.current){let m=f.current,v=u.current,b,S=new ResizeObserver(()=>{b=requestAnimationFrame(()=>{let w=m.offsetHeight;v.style.setProperty("--cmdk-list-height",w.toFixed(1)+"px")})});return S.observe(m),()=>{cancelAnimationFrame(b),S.unobserve(m)}}},[]),y.createElement(dt.div,{ref:Vr(u,a),...s,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":d,"aria-label":i,id:p.listId},Pu(n,m=>y.createElement("div",{ref:Vr(f,p.listInnerRef),"cmdk-list-sizer":""},m)))}),$R=y.forwardRef((n,a)=>{let{open:l,onOpenChange:i,overlayClassName:s,contentClassName:u,container:f,...d}=n;return y.createElement(lb,{open:l,onOpenChange:i},y.createElement(ib,{container:f},y.createElement(vh,{"cmdk-overlay":"",className:s}),y.createElement(yh,{"aria-label":n.label,"cmdk-dialog":"",className:u},y.createElement($b,{ref:a,...d}))))}),VR=y.forwardRef((n,a)=>sr(l=>l.filtered.count===0)?y.createElement(dt.div,{ref:a,...n,"cmdk-empty":"",role:"presentation"}):null),YR=y.forwardRef((n,a)=>{let{progress:l,children:i,label:s="Loading...",...u}=n;return y.createElement(dt.div,{ref:a,...u,"cmdk-loading":"",role:"progressbar","aria-valuenow":l,"aria-valuemin":0,"aria-valuemax":100,"aria-label":s},Pu(n,f=>y.createElement("div",{"aria-hidden":!0},f)))}),ai=Object.assign($b,{List:BR,Item:zR,Input:HR,Group:UR,Separator:PR,Dialog:$R,Empty:VR,Loading:YR});function qR(n,a){let l=n.nextElementSibling;for(;l;){if(l.matches(a))return l;l=l.nextElementSibling}}function KR(n,a){let l=n.previousElementSibling;for(;l;){if(l.matches(a))return l;l=l.previousElementSibling}}function Vb(n){let a=y.useRef(n);return Fr(()=>{a.current=n}),a}var Fr=typeof window>"u"?y.useEffect:y.useLayoutEffect;function ql(n){let a=y.useRef();return a.current===void 0&&(a.current=n()),a}function sr(n){let a=wh(),l=()=>n(a.snapshot());return y.useSyncExternalStore(a.subscribe,l,l)}function Yb(n,a,l,i=[]){let s=y.useRef(),u=_o();return Fr(()=>{var f;let d=(()=>{var m;for(let v of l){if(typeof v=="string")return v.trim();if(typeof v=="object"&&"current"in v)return v.current?(m=v.current.textContent)==null?void 0:m.trim():s.current}})(),p=i.map(m=>m.trim());u.value(n,d,p),(f=a.current)==null||f.setAttribute(Yl,d),s.current=d}),s}var GR=()=>{let[n,a]=y.useState(),l=ql(()=>new Map);return Fr(()=>{l.current.forEach(i=>i()),l.current=new Map},[n]),(i,s)=>{l.current.set(i,s),a({})}};function FR(n){let a=n.type;return typeof a=="function"?a(n.props):"render"in a?a.render(n.props):n}function Pu({asChild:n,children:a},l){return n&&y.isValidElement(a)?y.cloneElement(FR(a),{ref:a.ref},l(a.props.children)):l(a)}var XR={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function qb({className:n,...a}){return g.jsx(ai,{"data-slot":"command",className:rt("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",n),...a})}function Kb({className:n,...a}){return g.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[g.jsx(AN,{className:"size-4 shrink-0 opacity-50"}),g.jsx(ai.Input,{"data-slot":"command-input",className:rt("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",n),...a})]})}function Gb({className:n,...a}){return g.jsx(ai.List,{"data-slot":"command-list",className:rt("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",n),...a})}function Fb({...n}){return g.jsx(ai.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...n})}function Xb({className:n,...a}){return g.jsx(ai.Group,{"data-slot":"command-group",className:rt("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",n),...a})}function Qb({className:n,...a}){return g.jsx(ai.Item,{"data-slot":"command-item",className:rt("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n),...a})}const QR=["top","right","bottom","left"],ur=Math.min,fn=Math.max,yu=Math.round,eu=Math.floor,Zn=n=>({x:n,y:n}),ZR={left:"right",right:"left",bottom:"top",top:"bottom"},IR={start:"end",end:"start"};function Fd(n,a,l){return fn(n,ur(a,l))}function xa(n,a){return typeof n=="function"?n(a):n}function wa(n){return n.split("-")[0]}function ri(n){return n.split("-")[1]}function Sh(n){return n==="x"?"y":"x"}function Eh(n){return n==="y"?"height":"width"}const JR=new Set(["top","bottom"]);function Fn(n){return JR.has(wa(n))?"y":"x"}function Ch(n){return Sh(Fn(n))}function WR(n,a,l){l===void 0&&(l=!1);const i=ri(n),s=Ch(n),u=Eh(s);let f=s==="x"?i===(l?"end":"start")?"right":"left":i==="start"?"bottom":"top";return a.reference[u]>a.floating[u]&&(f=bu(f)),[f,bu(f)]}function ej(n){const a=bu(n);return[Xd(n),a,Xd(a)]}function Xd(n){return n.replace(/start|end/g,a=>IR[a])}const Oy=["left","right"],Ay=["right","left"],tj=["top","bottom"],nj=["bottom","top"];function aj(n,a,l){switch(n){case"top":case"bottom":return l?a?Ay:Oy:a?Oy:Ay;case"left":case"right":return a?tj:nj;default:return[]}}function rj(n,a,l,i){const s=ri(n);let u=aj(wa(n),l==="start",i);return s&&(u=u.map(f=>f+"-"+s),a&&(u=u.concat(u.map(Xd)))),u}function bu(n){return n.replace(/left|right|bottom|top/g,a=>ZR[a])}function lj(n){return{top:0,right:0,bottom:0,left:0,...n}}function Zb(n){return typeof n!="number"?lj(n):{top:n,right:n,bottom:n,left:n}}function xu(n){const{x:a,y:l,width:i,height:s}=n;return{width:i,height:s,top:l,left:a,right:a+i,bottom:l+s,x:a,y:l}}function Ty(n,a,l){let{reference:i,floating:s}=n;const u=Fn(a),f=Ch(a),d=Eh(f),p=wa(a),m=u==="y",v=i.x+i.width/2-s.width/2,b=i.y+i.height/2-s.height/2,S=i[d]/2-s[d]/2;let w;switch(p){case"top":w={x:v,y:i.y-s.height};break;case"bottom":w={x:v,y:i.y+i.height};break;case"right":w={x:i.x+i.width,y:b};break;case"left":w={x:i.x-s.width,y:b};break;default:w={x:i.x,y:i.y}}switch(ri(a)){case"start":w[f]-=S*(l&&m?-1:1);break;case"end":w[f]+=S*(l&&m?-1:1);break}return w}const ij=async(n,a,l)=>{const{placement:i="bottom",strategy:s="absolute",middleware:u=[],platform:f}=l,d=u.filter(Boolean),p=await(f.isRTL==null?void 0:f.isRTL(a));let m=await f.getElementRects({reference:n,floating:a,strategy:s}),{x:v,y:b}=Ty(m,i,p),S=i,w={},_=0;for(let C=0;C<d.length;C++){const{name:j,fn:N}=d[C],{x:U,y:z,data:D,reset:T}=await N({x:v,y:b,initialPlacement:i,placement:S,strategy:s,middlewareData:w,rects:m,platform:f,elements:{reference:n,floating:a}});v=U??v,b=z??b,w={...w,[j]:{...w[j],...D}},T&&_<=50&&(_++,typeof T=="object"&&(T.placement&&(S=T.placement),T.rects&&(m=T.rects===!0?await f.getElementRects({reference:n,floating:a,strategy:s}):T.rects),{x:v,y:b}=Ty(m,S,p)),C=-1)}return{x:v,y:b,placement:S,strategy:s,middlewareData:w}};async function bo(n,a){var l;a===void 0&&(a={});const{x:i,y:s,platform:u,rects:f,elements:d,strategy:p}=n,{boundary:m="clippingAncestors",rootBoundary:v="viewport",elementContext:b="floating",altBoundary:S=!1,padding:w=0}=xa(a,n),_=Zb(w),j=d[S?b==="floating"?"reference":"floating":b],N=xu(await u.getClippingRect({element:(l=await(u.isElement==null?void 0:u.isElement(j)))==null||l?j:j.contextElement||await(u.getDocumentElement==null?void 0:u.getDocumentElement(d.floating)),boundary:m,rootBoundary:v,strategy:p})),U=b==="floating"?{x:i,y:s,width:f.floating.width,height:f.floating.height}:f.reference,z=await(u.getOffsetParent==null?void 0:u.getOffsetParent(d.floating)),D=await(u.isElement==null?void 0:u.isElement(z))?await(u.getScale==null?void 0:u.getScale(z))||{x:1,y:1}:{x:1,y:1},T=xu(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:U,offsetParent:z,strategy:p}):U);return{top:(N.top-T.top+_.top)/D.y,bottom:(T.bottom-N.bottom+_.bottom)/D.y,left:(N.left-T.left+_.left)/D.x,right:(T.right-N.right+_.right)/D.x}}const oj=n=>({name:"arrow",options:n,async fn(a){const{x:l,y:i,placement:s,rects:u,platform:f,elements:d,middlewareData:p}=a,{element:m,padding:v=0}=xa(n,a)||{};if(m==null)return{};const b=Zb(v),S={x:l,y:i},w=Ch(s),_=Eh(w),C=await f.getDimensions(m),j=w==="y",N=j?"top":"left",U=j?"bottom":"right",z=j?"clientHeight":"clientWidth",D=u.reference[_]+u.reference[w]-S[w]-u.floating[_],T=S[w]-u.reference[w],R=await(f.getOffsetParent==null?void 0:f.getOffsetParent(m));let H=R?R[z]:0;(!H||!await(f.isElement==null?void 0:f.isElement(R)))&&(H=d.floating[z]||u.floating[_]);const Z=D/2-T/2,J=H/2-C[_]/2-1,ne=ur(b[N],J),Se=ur(b[U],J),de=ne,oe=H-C[_]-Se,fe=H/2-C[_]/2+Z,he=Fd(de,fe,oe),L=!p.arrow&&ri(s)!=null&&fe!==he&&u.reference[_]/2-(fe<de?ne:Se)-C[_]/2<0,I=L?fe<de?fe-de:fe-oe:0;return{[w]:S[w]+I,data:{[w]:he,centerOffset:fe-he-I,...L&&{alignmentOffset:I}},reset:L}}}),sj=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(a){var l,i;const{placement:s,middlewareData:u,rects:f,initialPlacement:d,platform:p,elements:m}=a,{mainAxis:v=!0,crossAxis:b=!0,fallbackPlacements:S,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:_="none",flipAlignment:C=!0,...j}=xa(n,a);if((l=u.arrow)!=null&&l.alignmentOffset)return{};const N=wa(s),U=Fn(d),z=wa(d)===d,D=await(p.isRTL==null?void 0:p.isRTL(m.floating)),T=S||(z||!C?[bu(d)]:ej(d)),R=_!=="none";!S&&R&&T.push(...rj(d,C,_,D));const H=[d,...T],Z=await bo(a,j),J=[];let ne=((i=u.flip)==null?void 0:i.overflows)||[];if(v&&J.push(Z[N]),b){const fe=WR(s,f,D);J.push(Z[fe[0]],Z[fe[1]])}if(ne=[...ne,{placement:s,overflows:J}],!J.every(fe=>fe<=0)){var Se,de;const fe=(((Se=u.flip)==null?void 0:Se.index)||0)+1,he=H[fe];if(he&&(!(b==="alignment"?U!==Fn(he):!1)||ne.every(V=>V.overflows[0]>0&&Fn(V.placement)===U)))return{data:{index:fe,overflows:ne},reset:{placement:he}};let L=(de=ne.filter(I=>I.overflows[0]<=0).sort((I,V)=>I.overflows[1]-V.overflows[1])[0])==null?void 0:de.placement;if(!L)switch(w){case"bestFit":{var oe;const I=(oe=ne.filter(V=>{if(R){const ge=Fn(V.placement);return ge===U||ge==="y"}return!0}).map(V=>[V.placement,V.overflows.filter(ge=>ge>0).reduce((ge,O)=>ge+O,0)]).sort((V,ge)=>V[1]-ge[1])[0])==null?void 0:oe[0];I&&(L=I);break}case"initialPlacement":L=d;break}if(s!==L)return{reset:{placement:L}}}return{}}}};function My(n,a){return{top:n.top-a.height,right:n.right-a.width,bottom:n.bottom-a.height,left:n.left-a.width}}function Dy(n){return QR.some(a=>n[a]>=0)}const uj=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(a){const{rects:l}=a,{strategy:i="referenceHidden",...s}=xa(n,a);switch(i){case"referenceHidden":{const u=await bo(a,{...s,elementContext:"reference"}),f=My(u,l.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:Dy(f)}}}case"escaped":{const u=await bo(a,{...s,altBoundary:!0}),f=My(u,l.floating);return{data:{escapedOffsets:f,escaped:Dy(f)}}}default:return{}}}}},Ib=new Set(["left","top"]);async function cj(n,a){const{placement:l,platform:i,elements:s}=n,u=await(i.isRTL==null?void 0:i.isRTL(s.floating)),f=wa(l),d=ri(l),p=Fn(l)==="y",m=Ib.has(f)?-1:1,v=u&&p?-1:1,b=xa(a,n);let{mainAxis:S,crossAxis:w,alignmentAxis:_}=typeof b=="number"?{mainAxis:b,crossAxis:0,alignmentAxis:null}:{mainAxis:b.mainAxis||0,crossAxis:b.crossAxis||0,alignmentAxis:b.alignmentAxis};return d&&typeof _=="number"&&(w=d==="end"?_*-1:_),p?{x:w*v,y:S*m}:{x:S*m,y:w*v}}const fj=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(a){var l,i;const{x:s,y:u,placement:f,middlewareData:d}=a,p=await cj(a,n);return f===((l=d.offset)==null?void 0:l.placement)&&(i=d.arrow)!=null&&i.alignmentOffset?{}:{x:s+p.x,y:u+p.y,data:{...p,placement:f}}}}},dj=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(a){const{x:l,y:i,placement:s}=a,{mainAxis:u=!0,crossAxis:f=!1,limiter:d={fn:j=>{let{x:N,y:U}=j;return{x:N,y:U}}},...p}=xa(n,a),m={x:l,y:i},v=await bo(a,p),b=Fn(wa(s)),S=Sh(b);let w=m[S],_=m[b];if(u){const j=S==="y"?"top":"left",N=S==="y"?"bottom":"right",U=w+v[j],z=w-v[N];w=Fd(U,w,z)}if(f){const j=b==="y"?"top":"left",N=b==="y"?"bottom":"right",U=_+v[j],z=_-v[N];_=Fd(U,_,z)}const C=d.fn({...a,[S]:w,[b]:_});return{...C,data:{x:C.x-l,y:C.y-i,enabled:{[S]:u,[b]:f}}}}}},hj=function(n){return n===void 0&&(n={}),{options:n,fn(a){const{x:l,y:i,placement:s,rects:u,middlewareData:f}=a,{offset:d=0,mainAxis:p=!0,crossAxis:m=!0}=xa(n,a),v={x:l,y:i},b=Fn(s),S=Sh(b);let w=v[S],_=v[b];const C=xa(d,a),j=typeof C=="number"?{mainAxis:C,crossAxis:0}:{mainAxis:0,crossAxis:0,...C};if(p){const z=S==="y"?"height":"width",D=u.reference[S]-u.floating[z]+j.mainAxis,T=u.reference[S]+u.reference[z]-j.mainAxis;w<D?w=D:w>T&&(w=T)}if(m){var N,U;const z=S==="y"?"width":"height",D=Ib.has(wa(s)),T=u.reference[b]-u.floating[z]+(D&&((N=f.offset)==null?void 0:N[b])||0)+(D?0:j.crossAxis),R=u.reference[b]+u.reference[z]+(D?0:((U=f.offset)==null?void 0:U[b])||0)-(D?j.crossAxis:0);_<T?_=T:_>R&&(_=R)}return{[S]:w,[b]:_}}}},mj=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(a){var l,i;const{placement:s,rects:u,platform:f,elements:d}=a,{apply:p=()=>{},...m}=xa(n,a),v=await bo(a,m),b=wa(s),S=ri(s),w=Fn(s)==="y",{width:_,height:C}=u.floating;let j,N;b==="top"||b==="bottom"?(j=b,N=S===(await(f.isRTL==null?void 0:f.isRTL(d.floating))?"start":"end")?"left":"right"):(N=b,j=S==="end"?"top":"bottom");const U=C-v.top-v.bottom,z=_-v.left-v.right,D=ur(C-v[j],U),T=ur(_-v[N],z),R=!a.middlewareData.shift;let H=D,Z=T;if((l=a.middlewareData.shift)!=null&&l.enabled.x&&(Z=z),(i=a.middlewareData.shift)!=null&&i.enabled.y&&(H=U),R&&!S){const ne=fn(v.left,0),Se=fn(v.right,0),de=fn(v.top,0),oe=fn(v.bottom,0);w?Z=_-2*(ne!==0||Se!==0?ne+Se:fn(v.left,v.right)):H=C-2*(de!==0||oe!==0?de+oe:fn(v.top,v.bottom))}await p({...a,availableWidth:Z,availableHeight:H});const J=await f.getDimensions(d.floating);return _!==J.width||C!==J.height?{reset:{rects:!0}}:{}}}};function Hu(){return typeof window<"u"}function li(n){return Jb(n)?(n.nodeName||"").toLowerCase():"#document"}function dn(n){var a;return(n==null||(a=n.ownerDocument)==null?void 0:a.defaultView)||window}function Wn(n){var a;return(a=(Jb(n)?n.ownerDocument:n.document)||window.document)==null?void 0:a.documentElement}function Jb(n){return Hu()?n instanceof Node||n instanceof dn(n).Node:!1}function Dn(n){return Hu()?n instanceof Element||n instanceof dn(n).Element:!1}function In(n){return Hu()?n instanceof HTMLElement||n instanceof dn(n).HTMLElement:!1}function Ly(n){return!Hu()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof dn(n).ShadowRoot}const pj=new Set(["inline","contents"]);function No(n){const{overflow:a,overflowX:l,overflowY:i,display:s}=Ln(n);return/auto|scroll|overlay|hidden|clip/.test(a+i+l)&&!pj.has(s)}const gj=new Set(["table","td","th"]);function vj(n){return gj.has(li(n))}const yj=[":popover-open",":modal"];function Bu(n){return yj.some(a=>{try{return n.matches(a)}catch{return!1}})}const bj=["transform","translate","scale","rotate","perspective"],xj=["transform","translate","scale","rotate","perspective","filter"],wj=["paint","layout","strict","content"];function _h(n){const a=Nh(),l=Dn(n)?Ln(n):n;return bj.some(i=>l[i]?l[i]!=="none":!1)||(l.containerType?l.containerType!=="normal":!1)||!a&&(l.backdropFilter?l.backdropFilter!=="none":!1)||!a&&(l.filter?l.filter!=="none":!1)||xj.some(i=>(l.willChange||"").includes(i))||wj.some(i=>(l.contain||"").includes(i))}function Sj(n){let a=cr(n);for(;In(a)&&!Il(a);){if(_h(a))return a;if(Bu(a))return null;a=cr(a)}return null}function Nh(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Ej=new Set(["html","body","#document"]);function Il(n){return Ej.has(li(n))}function Ln(n){return dn(n).getComputedStyle(n)}function $u(n){return Dn(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function cr(n){if(li(n)==="html")return n;const a=n.assignedSlot||n.parentNode||Ly(n)&&n.host||Wn(n);return Ly(a)?a.host:a}function Wb(n){const a=cr(n);return Il(a)?n.ownerDocument?n.ownerDocument.body:n.body:In(a)&&No(a)?a:Wb(a)}function xo(n,a,l){var i;a===void 0&&(a=[]),l===void 0&&(l=!0);const s=Wb(n),u=s===((i=n.ownerDocument)==null?void 0:i.body),f=dn(s);if(u){const d=Qd(f);return a.concat(f,f.visualViewport||[],No(s)?s:[],d&&l?xo(d):[])}return a.concat(s,xo(s,[],l))}function Qd(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function ex(n){const a=Ln(n);let l=parseFloat(a.width)||0,i=parseFloat(a.height)||0;const s=In(n),u=s?n.offsetWidth:l,f=s?n.offsetHeight:i,d=yu(l)!==u||yu(i)!==f;return d&&(l=u,i=f),{width:l,height:i,$:d}}function Rh(n){return Dn(n)?n:n.contextElement}function Ql(n){const a=Rh(n);if(!In(a))return Zn(1);const l=a.getBoundingClientRect(),{width:i,height:s,$:u}=ex(a);let f=(u?yu(l.width):l.width)/i,d=(u?yu(l.height):l.height)/s;return(!f||!Number.isFinite(f))&&(f=1),(!d||!Number.isFinite(d))&&(d=1),{x:f,y:d}}const Cj=Zn(0);function tx(n){const a=dn(n);return!Nh()||!a.visualViewport?Cj:{x:a.visualViewport.offsetLeft,y:a.visualViewport.offsetTop}}function _j(n,a,l){return a===void 0&&(a=!1),!l||a&&l!==dn(n)?!1:a}function Xr(n,a,l,i){a===void 0&&(a=!1),l===void 0&&(l=!1);const s=n.getBoundingClientRect(),u=Rh(n);let f=Zn(1);a&&(i?Dn(i)&&(f=Ql(i)):f=Ql(n));const d=_j(u,l,i)?tx(u):Zn(0);let p=(s.left+d.x)/f.x,m=(s.top+d.y)/f.y,v=s.width/f.x,b=s.height/f.y;if(u){const S=dn(u),w=i&&Dn(i)?dn(i):i;let _=S,C=Qd(_);for(;C&&i&&w!==_;){const j=Ql(C),N=C.getBoundingClientRect(),U=Ln(C),z=N.left+(C.clientLeft+parseFloat(U.paddingLeft))*j.x,D=N.top+(C.clientTop+parseFloat(U.paddingTop))*j.y;p*=j.x,m*=j.y,v*=j.x,b*=j.y,p+=z,m+=D,_=dn(C),C=Qd(_)}}return xu({width:v,height:b,x:p,y:m})}function jh(n,a){const l=$u(n).scrollLeft;return a?a.left+l:Xr(Wn(n)).left+l}function nx(n,a,l){l===void 0&&(l=!1);const i=n.getBoundingClientRect(),s=i.left+a.scrollLeft-(l?0:jh(n,i)),u=i.top+a.scrollTop;return{x:s,y:u}}function Nj(n){let{elements:a,rect:l,offsetParent:i,strategy:s}=n;const u=s==="fixed",f=Wn(i),d=a?Bu(a.floating):!1;if(i===f||d&&u)return l;let p={scrollLeft:0,scrollTop:0},m=Zn(1);const v=Zn(0),b=In(i);if((b||!b&&!u)&&((li(i)!=="body"||No(f))&&(p=$u(i)),In(i))){const w=Xr(i);m=Ql(i),v.x=w.x+i.clientLeft,v.y=w.y+i.clientTop}const S=f&&!b&&!u?nx(f,p,!0):Zn(0);return{width:l.width*m.x,height:l.height*m.y,x:l.x*m.x-p.scrollLeft*m.x+v.x+S.x,y:l.y*m.y-p.scrollTop*m.y+v.y+S.y}}function Rj(n){return Array.from(n.getClientRects())}function jj(n){const a=Wn(n),l=$u(n),i=n.ownerDocument.body,s=fn(a.scrollWidth,a.clientWidth,i.scrollWidth,i.clientWidth),u=fn(a.scrollHeight,a.clientHeight,i.scrollHeight,i.clientHeight);let f=-l.scrollLeft+jh(n);const d=-l.scrollTop;return Ln(i).direction==="rtl"&&(f+=fn(a.clientWidth,i.clientWidth)-s),{width:s,height:u,x:f,y:d}}function Oj(n,a){const l=dn(n),i=Wn(n),s=l.visualViewport;let u=i.clientWidth,f=i.clientHeight,d=0,p=0;if(s){u=s.width,f=s.height;const m=Nh();(!m||m&&a==="fixed")&&(d=s.offsetLeft,p=s.offsetTop)}return{width:u,height:f,x:d,y:p}}const Aj=new Set(["absolute","fixed"]);function Tj(n,a){const l=Xr(n,!0,a==="fixed"),i=l.top+n.clientTop,s=l.left+n.clientLeft,u=In(n)?Ql(n):Zn(1),f=n.clientWidth*u.x,d=n.clientHeight*u.y,p=s*u.x,m=i*u.y;return{width:f,height:d,x:p,y:m}}function ky(n,a,l){let i;if(a==="viewport")i=Oj(n,l);else if(a==="document")i=jj(Wn(n));else if(Dn(a))i=Tj(a,l);else{const s=tx(n);i={x:a.x-s.x,y:a.y-s.y,width:a.width,height:a.height}}return xu(i)}function ax(n,a){const l=cr(n);return l===a||!Dn(l)||Il(l)?!1:Ln(l).position==="fixed"||ax(l,a)}function Mj(n,a){const l=a.get(n);if(l)return l;let i=xo(n,[],!1).filter(d=>Dn(d)&&li(d)!=="body"),s=null;const u=Ln(n).position==="fixed";let f=u?cr(n):n;for(;Dn(f)&&!Il(f);){const d=Ln(f),p=_h(f);!p&&d.position==="fixed"&&(s=null),(u?!p&&!s:!p&&d.position==="static"&&!!s&&Aj.has(s.position)||No(f)&&!p&&ax(n,f))?i=i.filter(v=>v!==f):s=d,f=cr(f)}return a.set(n,i),i}function Dj(n){let{element:a,boundary:l,rootBoundary:i,strategy:s}=n;const f=[...l==="clippingAncestors"?Bu(a)?[]:Mj(a,this._c):[].concat(l),i],d=f[0],p=f.reduce((m,v)=>{const b=ky(a,v,s);return m.top=fn(b.top,m.top),m.right=ur(b.right,m.right),m.bottom=ur(b.bottom,m.bottom),m.left=fn(b.left,m.left),m},ky(a,d,s));return{width:p.right-p.left,height:p.bottom-p.top,x:p.left,y:p.top}}function Lj(n){const{width:a,height:l}=ex(n);return{width:a,height:l}}function kj(n,a,l){const i=In(a),s=Wn(a),u=l==="fixed",f=Xr(n,!0,u,a);let d={scrollLeft:0,scrollTop:0};const p=Zn(0);function m(){p.x=jh(s)}if(i||!i&&!u)if((li(a)!=="body"||No(s))&&(d=$u(a)),i){const w=Xr(a,!0,u,a);p.x=w.x+a.clientLeft,p.y=w.y+a.clientTop}else s&&m();u&&!i&&s&&m();const v=s&&!i&&!u?nx(s,d):Zn(0),b=f.left+d.scrollLeft-p.x-v.x,S=f.top+d.scrollTop-p.y-v.y;return{x:b,y:S,width:f.width,height:f.height}}function Ed(n){return Ln(n).position==="static"}function zy(n,a){if(!In(n)||Ln(n).position==="fixed")return null;if(a)return a(n);let l=n.offsetParent;return Wn(n)===l&&(l=l.ownerDocument.body),l}function rx(n,a){const l=dn(n);if(Bu(n))return l;if(!In(n)){let s=cr(n);for(;s&&!Il(s);){if(Dn(s)&&!Ed(s))return s;s=cr(s)}return l}let i=zy(n,a);for(;i&&vj(i)&&Ed(i);)i=zy(i,a);return i&&Il(i)&&Ed(i)&&!_h(i)?l:i||Sj(n)||l}const zj=async function(n){const a=this.getOffsetParent||rx,l=this.getDimensions,i=await l(n.floating);return{reference:kj(n.reference,await a(n.floating),n.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Uj(n){return Ln(n).direction==="rtl"}const Pj={convertOffsetParentRelativeRectToViewportRelativeRect:Nj,getDocumentElement:Wn,getClippingRect:Dj,getOffsetParent:rx,getElementRects:zj,getClientRects:Rj,getDimensions:Lj,getScale:Ql,isElement:Dn,isRTL:Uj};function lx(n,a){return n.x===a.x&&n.y===a.y&&n.width===a.width&&n.height===a.height}function Hj(n,a){let l=null,i;const s=Wn(n);function u(){var d;clearTimeout(i),(d=l)==null||d.disconnect(),l=null}function f(d,p){d===void 0&&(d=!1),p===void 0&&(p=1),u();const m=n.getBoundingClientRect(),{left:v,top:b,width:S,height:w}=m;if(d||a(),!S||!w)return;const _=eu(b),C=eu(s.clientWidth-(v+S)),j=eu(s.clientHeight-(b+w)),N=eu(v),z={rootMargin:-_+"px "+-C+"px "+-j+"px "+-N+"px",threshold:fn(0,ur(1,p))||1};let D=!0;function T(R){const H=R[0].intersectionRatio;if(H!==p){if(!D)return f();H?f(!1,H):i=setTimeout(()=>{f(!1,1e-7)},1e3)}H===1&&!lx(m,n.getBoundingClientRect())&&f(),D=!1}try{l=new IntersectionObserver(T,{...z,root:s.ownerDocument})}catch{l=new IntersectionObserver(T,z)}l.observe(n)}return f(!0),u}function Bj(n,a,l,i){i===void 0&&(i={});const{ancestorScroll:s=!0,ancestorResize:u=!0,elementResize:f=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:p=!1}=i,m=Rh(n),v=s||u?[...m?xo(m):[],...xo(a)]:[];v.forEach(N=>{s&&N.addEventListener("scroll",l,{passive:!0}),u&&N.addEventListener("resize",l)});const b=m&&d?Hj(m,l):null;let S=-1,w=null;f&&(w=new ResizeObserver(N=>{let[U]=N;U&&U.target===m&&w&&(w.unobserve(a),cancelAnimationFrame(S),S=requestAnimationFrame(()=>{var z;(z=w)==null||z.observe(a)})),l()}),m&&!p&&w.observe(m),w.observe(a));let _,C=p?Xr(n):null;p&&j();function j(){const N=Xr(n);C&&!lx(C,N)&&l(),C=N,_=requestAnimationFrame(j)}return l(),()=>{var N;v.forEach(U=>{s&&U.removeEventListener("scroll",l),u&&U.removeEventListener("resize",l)}),b?.(),(N=w)==null||N.disconnect(),w=null,p&&cancelAnimationFrame(_)}}const $j=fj,Vj=dj,Yj=sj,qj=mj,Kj=uj,Uy=oj,Gj=hj,Fj=(n,a,l)=>{const i=new Map,s={platform:Pj,...l},u={...s.platform,_c:i};return ij(n,a,{...s,platform:u})};var Xj=typeof document<"u",Qj=function(){},cu=Xj?y.useLayoutEffect:Qj;function wu(n,a){if(n===a)return!0;if(typeof n!=typeof a)return!1;if(typeof n=="function"&&n.toString()===a.toString())return!0;let l,i,s;if(n&&a&&typeof n=="object"){if(Array.isArray(n)){if(l=n.length,l!==a.length)return!1;for(i=l;i--!==0;)if(!wu(n[i],a[i]))return!1;return!0}if(s=Object.keys(n),l=s.length,l!==Object.keys(a).length)return!1;for(i=l;i--!==0;)if(!{}.hasOwnProperty.call(a,s[i]))return!1;for(i=l;i--!==0;){const u=s[i];if(!(u==="_owner"&&n.$$typeof)&&!wu(n[u],a[u]))return!1}return!0}return n!==n&&a!==a}function ix(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function Py(n,a){const l=ix(n);return Math.round(a*l)/l}function Cd(n){const a=y.useRef(n);return cu(()=>{a.current=n}),a}function Zj(n){n===void 0&&(n={});const{placement:a="bottom",strategy:l="absolute",middleware:i=[],platform:s,elements:{reference:u,floating:f}={},transform:d=!0,whileElementsMounted:p,open:m}=n,[v,b]=y.useState({x:0,y:0,strategy:l,placement:a,middlewareData:{},isPositioned:!1}),[S,w]=y.useState(i);wu(S,i)||w(i);const[_,C]=y.useState(null),[j,N]=y.useState(null),U=y.useCallback(V=>{V!==R.current&&(R.current=V,C(V))},[]),z=y.useCallback(V=>{V!==H.current&&(H.current=V,N(V))},[]),D=u||_,T=f||j,R=y.useRef(null),H=y.useRef(null),Z=y.useRef(v),J=p!=null,ne=Cd(p),Se=Cd(s),de=Cd(m),oe=y.useCallback(()=>{if(!R.current||!H.current)return;const V={placement:a,strategy:l,middleware:S};Se.current&&(V.platform=Se.current),Fj(R.current,H.current,V).then(ge=>{const O={...ge,isPositioned:de.current!==!1};fe.current&&!wu(Z.current,O)&&(Z.current=O,Tu.flushSync(()=>{b(O)}))})},[S,a,l,Se,de]);cu(()=>{m===!1&&Z.current.isPositioned&&(Z.current.isPositioned=!1,b(V=>({...V,isPositioned:!1})))},[m]);const fe=y.useRef(!1);cu(()=>(fe.current=!0,()=>{fe.current=!1}),[]),cu(()=>{if(D&&(R.current=D),T&&(H.current=T),D&&T){if(ne.current)return ne.current(D,T,oe);oe()}},[D,T,oe,ne,J]);const he=y.useMemo(()=>({reference:R,floating:H,setReference:U,setFloating:z}),[U,z]),L=y.useMemo(()=>({reference:D,floating:T}),[D,T]),I=y.useMemo(()=>{const V={position:l,left:0,top:0};if(!L.floating)return V;const ge=Py(L.floating,v.x),O=Py(L.floating,v.y);return d?{...V,transform:"translate("+ge+"px, "+O+"px)",...ix(L.floating)>=1.5&&{willChange:"transform"}}:{position:l,left:ge,top:O}},[l,d,L.floating,v.x,v.y]);return y.useMemo(()=>({...v,update:oe,refs:he,elements:L,floatingStyles:I}),[v,oe,he,L,I])}const Ij=n=>{function a(l){return{}.hasOwnProperty.call(l,"current")}return{name:"arrow",options:n,fn(l){const{element:i,padding:s}=typeof n=="function"?n(l):n;return i&&a(i)?i.current!=null?Uy({element:i.current,padding:s}).fn(l):{}:i?Uy({element:i,padding:s}).fn(l):{}}}},Jj=(n,a)=>({...$j(n),options:[n,a]}),Wj=(n,a)=>({...Vj(n),options:[n,a]}),eO=(n,a)=>({...Gj(n),options:[n,a]}),tO=(n,a)=>({...Yj(n),options:[n,a]}),nO=(n,a)=>({...qj(n),options:[n,a]}),aO=(n,a)=>({...Kj(n),options:[n,a]}),rO=(n,a)=>({...Ij(n),options:[n,a]});var lO="Arrow",ox=y.forwardRef((n,a)=>{const{children:l,width:i=10,height:s=5,...u}=n;return g.jsx(dt.svg,{...u,ref:a,width:i,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:n.asChild?l:g.jsx("polygon",{points:"0,0 30,0 15,10"})})});ox.displayName=lO;var iO=ox,Oh="Popper",[sx,ux]=Mu(Oh),[oO,cx]=sx(Oh),fx=n=>{const{__scopePopper:a,children:l}=n,[i,s]=y.useState(null);return g.jsx(oO,{scope:a,anchor:i,onAnchorChange:s,children:l})};fx.displayName=Oh;var dx="PopperAnchor",hx=y.forwardRef((n,a)=>{const{__scopePopper:l,virtualRef:i,...s}=n,u=cx(dx,l),f=y.useRef(null),d=hn(a,f);return y.useEffect(()=>{u.onAnchorChange(i?.current||f.current)}),i?null:g.jsx(dt.div,{...s,ref:d})});hx.displayName=dx;var Ah="PopperContent",[sO,uO]=sx(Ah),mx=y.forwardRef((n,a)=>{const{__scopePopper:l,side:i="bottom",sideOffset:s=0,align:u="center",alignOffset:f=0,arrowPadding:d=0,avoidCollisions:p=!0,collisionBoundary:m=[],collisionPadding:v=0,sticky:b="partial",hideWhenDetached:S=!1,updatePositionStrategy:w="optimized",onPlaced:_,...C}=n,j=cx(Ah,l),[N,U]=y.useState(null),z=hn(a,ve=>U(ve)),[D,T]=y.useState(null),R=Ob(D),H=R?.width??0,Z=R?.height??0,J=i+(u!=="center"?"-"+u:""),ne=typeof v=="number"?v:{top:0,right:0,bottom:0,left:0,...v},Se=Array.isArray(m)?m:[m],de=Se.length>0,oe={padding:ne,boundary:Se.filter(fO),altBoundary:de},{refs:fe,floatingStyles:he,placement:L,isPositioned:I,middlewareData:V}=Zj({strategy:"fixed",placement:J,whileElementsMounted:(...ve)=>Bj(...ve,{animationFrame:w==="always"}),elements:{reference:j.anchor},middleware:[Jj({mainAxis:s+Z,alignmentAxis:f}),p&&Wj({mainAxis:!0,crossAxis:!1,limiter:b==="partial"?eO():void 0,...oe}),p&&tO({...oe}),nO({...oe,apply:({elements:ve,rects:ze,availableWidth:Ze,availableHeight:Ae})=>{const{width:le,height:ae}=ze.reference,ue=ve.floating.style;ue.setProperty("--radix-popper-available-width",`${Ze}px`),ue.setProperty("--radix-popper-available-height",`${Ae}px`),ue.setProperty("--radix-popper-anchor-width",`${le}px`),ue.setProperty("--radix-popper-anchor-height",`${ae}px`)}}),D&&rO({element:D,padding:d}),dO({arrowWidth:H,arrowHeight:Z}),S&&aO({strategy:"referenceHidden",...oe})]}),[ge,O]=vx(L),K=Zl(_);rr(()=>{I&&K?.()},[I,K]);const P=V.arrow?.x,G=V.arrow?.y,ee=V.arrow?.centerOffset!==0,[se,pe]=y.useState();return rr(()=>{N&&pe(window.getComputedStyle(N).zIndex)},[N]),g.jsx("div",{ref:fe.setFloating,"data-radix-popper-content-wrapper":"",style:{...he,transform:I?he.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:se,"--radix-popper-transform-origin":[V.transformOrigin?.x,V.transformOrigin?.y].join(" "),...V.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:n.dir,children:g.jsx(sO,{scope:l,placedSide:ge,onArrowChange:T,arrowX:P,arrowY:G,shouldHideArrow:ee,children:g.jsx(dt.div,{"data-side":ge,"data-align":O,...C,ref:z,style:{...C.style,animation:I?void 0:"none"}})})})});mx.displayName=Ah;var px="PopperArrow",cO={top:"bottom",right:"left",bottom:"top",left:"right"},gx=y.forwardRef(function(a,l){const{__scopePopper:i,...s}=a,u=uO(px,i),f=cO[u.placedSide];return g.jsx("span",{ref:u.onArrowChange,style:{position:"absolute",left:u.arrowX,top:u.arrowY,[f]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[u.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[u.placedSide],visibility:u.shouldHideArrow?"hidden":void 0},children:g.jsx(iO,{...s,ref:l,style:{...s.style,display:"block"}})})});gx.displayName=px;function fO(n){return n!==null}var dO=n=>({name:"transformOrigin",options:n,fn(a){const{placement:l,rects:i,middlewareData:s}=a,f=s.arrow?.centerOffset!==0,d=f?0:n.arrowWidth,p=f?0:n.arrowHeight,[m,v]=vx(l),b={start:"0%",center:"50%",end:"100%"}[v],S=(s.arrow?.x??0)+d/2,w=(s.arrow?.y??0)+p/2;let _="",C="";return m==="bottom"?(_=f?b:`${S}px`,C=`${-p}px`):m==="top"?(_=f?b:`${S}px`,C=`${i.floating.height+p}px`):m==="right"?(_=`${-p}px`,C=f?b:`${w}px`):m==="left"&&(_=`${i.floating.width+p}px`,C=f?b:`${w}px`),{data:{x:_,y:C}}}});function vx(n){const[a,l="center"]=n.split("-");return[a,l]}var hO=fx,yx=hx,mO=mx,pO=gx,Vu="Popover",[bx,_T]=Mu(Vu,[ux]),Ro=ux(),[gO,hr]=bx(Vu),xx=n=>{const{__scopePopover:a,children:l,open:i,defaultOpen:s,onOpenChange:u,modal:f=!1}=n,d=Ro(a),p=y.useRef(null),[m,v]=y.useState(!1),[b,S]=uh({prop:i,defaultProp:s??!1,onChange:u,caller:Vu});return g.jsx(hO,{...d,children:g.jsx(gO,{scope:a,contentId:Qn(),triggerRef:p,open:b,onOpenChange:S,onOpenToggle:y.useCallback(()=>S(w=>!w),[S]),hasCustomAnchor:m,onCustomAnchorAdd:y.useCallback(()=>v(!0),[]),onCustomAnchorRemove:y.useCallback(()=>v(!1),[]),modal:f,children:l})})};xx.displayName=Vu;var wx="PopoverAnchor",vO=y.forwardRef((n,a)=>{const{__scopePopover:l,...i}=n,s=hr(wx,l),u=Ro(l),{onCustomAnchorAdd:f,onCustomAnchorRemove:d}=s;return y.useEffect(()=>(f(),()=>d()),[f,d]),g.jsx(yx,{...u,...i,ref:a})});vO.displayName=wx;var Sx="PopoverTrigger",Ex=y.forwardRef((n,a)=>{const{__scopePopover:l,...i}=n,s=hr(Sx,l),u=Ro(l),f=hn(a,s.triggerRef),d=g.jsx(dt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":jx(s.open),...i,ref:f,onClick:Wt(n.onClick,s.onOpenToggle)});return s.hasCustomAnchor?d:g.jsx(yx,{asChild:!0,...u,children:d})});Ex.displayName=Sx;var Th="PopoverPortal",[yO,bO]=bx(Th,{forceMount:void 0}),Cx=n=>{const{__scopePopover:a,forceMount:l,children:i,container:s}=n,u=hr(Th,a);return g.jsx(yO,{scope:a,forceMount:l,children:g.jsx(ei,{present:l||u.open,children:g.jsx(dh,{asChild:!0,container:s,children:i})})})};Cx.displayName=Th;var Jl="PopoverContent",_x=y.forwardRef((n,a)=>{const l=bO(Jl,n.__scopePopover),{forceMount:i=l.forceMount,...s}=n,u=hr(Jl,n.__scopePopover);return g.jsx(ei,{present:i||u.open,children:u.modal?g.jsx(wO,{...s,ref:a}):g.jsx(SO,{...s,ref:a})})});_x.displayName=Jl;var xO=Du("PopoverContent.RemoveScroll"),wO=y.forwardRef((n,a)=>{const l=hr(Jl,n.__scopePopover),i=y.useRef(null),s=hn(a,i),u=y.useRef(!1);return y.useEffect(()=>{const f=i.current;if(f)return Y0(f)},[]),g.jsx(hh,{as:xO,allowPinchZoom:!0,children:g.jsx(Nx,{...n,ref:s,trapFocus:l.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Wt(n.onCloseAutoFocus,f=>{f.preventDefault(),u.current||l.triggerRef.current?.focus()}),onPointerDownOutside:Wt(n.onPointerDownOutside,f=>{const d=f.detail.originalEvent,p=d.button===0&&d.ctrlKey===!0,m=d.button===2||p;u.current=m},{checkForDefaultPrevented:!1}),onFocusOutside:Wt(n.onFocusOutside,f=>f.preventDefault(),{checkForDefaultPrevented:!1})})})}),SO=y.forwardRef((n,a)=>{const l=hr(Jl,n.__scopePopover),i=y.useRef(!1),s=y.useRef(!1);return g.jsx(Nx,{...n,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:u=>{n.onCloseAutoFocus?.(u),u.defaultPrevented||(i.current||l.triggerRef.current?.focus(),u.preventDefault()),i.current=!1,s.current=!1},onInteractOutside:u=>{n.onInteractOutside?.(u),u.defaultPrevented||(i.current=!0,u.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const f=u.target;l.triggerRef.current?.contains(f)&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&s.current&&u.preventDefault()}})}),Nx=y.forwardRef((n,a)=>{const{__scopePopover:l,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:u,disableOutsidePointerEvents:f,onEscapeKeyDown:d,onPointerDownOutside:p,onFocusOutside:m,onInteractOutside:v,...b}=n,S=hr(Jl,l),w=Ro(l);return L0(),g.jsx(fh,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:s,onUnmountAutoFocus:u,children:g.jsx(ch,{asChild:!0,disableOutsidePointerEvents:f,onInteractOutside:v,onEscapeKeyDown:d,onPointerDownOutside:p,onFocusOutside:m,onDismiss:()=>S.onOpenChange(!1),children:g.jsx(mO,{"data-state":jx(S.open),role:"dialog",id:S.contentId,...w,...b,ref:a,style:{...b.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Rx="PopoverClose",EO=y.forwardRef((n,a)=>{const{__scopePopover:l,...i}=n,s=hr(Rx,l);return g.jsx(dt.button,{type:"button",...i,ref:a,onClick:Wt(n.onClick,()=>s.onOpenChange(!1))})});EO.displayName=Rx;var CO="PopoverArrow",_O=y.forwardRef((n,a)=>{const{__scopePopover:l,...i}=n,s=Ro(l);return g.jsx(pO,{...s,...i,ref:a})});_O.displayName=CO;function jx(n){return n?"open":"closed"}var NO=xx,RO=Ex,jO=Cx,OO=_x;function Yu({...n}){return g.jsx(NO,{"data-slot":"popover",...n})}function qu({...n}){return g.jsx(RO,{"data-slot":"popover-trigger",...n})}function Ku({className:n,align:a="center",sideOffset:l=4,...i}){return g.jsx(jO,{children:g.jsx(OO,{"data-slot":"popover-content",align:a,sideOffset:l,className:rt("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden animate-fade-in",n),...i})})}function Mn({options:n,value:a,onChange:l,placeholder:i="Select an option...",searchPlaceholder:s="Search...",emptyPlaceholder:u="No options found."}){const[f,d]=y.useState(!1),p=n.find(m=>m.value===a);return g.jsxs(Yu,{open:f,onOpenChange:d,children:[g.jsx(qu,{asChild:!0,children:g.jsxs(Te,{variant:"outline",role:"combobox","aria-expanded":f,className:"w-full justify-between transition-all-ease hover:scale-[1.02] active:scale-[0.98]",children:[p?p.label:i,g.jsx(fb,{className:"ml-2 h-4 w-4 shrink-0 opacity-50 transition-transform duration-200 group-data-[state=open]:rotate-180"})]})}),g.jsx(Ku,{className:"w-[--radix-popover-trigger-width] p-0 animate-fade-in",children:g.jsxs(qb,{children:[g.jsx(Kb,{placeholder:s}),g.jsxs(Gb,{children:[g.jsx(Fb,{children:u}),g.jsx(Xb,{children:n.map(m=>g.jsxs(Qb,{value:m.value,onSelect:v=>{l(v===a?"":v),d(!1)},className:"transition-all-ease hover:bg-accent hover:text-accent-foreground",children:[g.jsx(cb,{className:rt("mr-2 h-4 w-4 transition-opacity",a===m.value?"opacity-100":"opacity-0")}),m.label]},m.value))})]})]})})]})}class AO{baseUrl;apiKey;tempApiKey;constructor(a="/api",l=""){this.baseUrl=a,this.apiKey=l||localStorage.getItem("apiKey")||"",this.tempApiKey=new URLSearchParams(window.location.search).get("tempApiKey")}setBaseUrl(a){this.baseUrl=a}setApiKey(a){this.apiKey=a,a?localStorage.setItem("apiKey",a):localStorage.removeItem("apiKey")}setTempApiKey(a){this.tempApiKey=a}createHeaders(a="application/json"){const l={Accept:"application/json"};return this.tempApiKey?l["X-Temp-API-Key"]=this.tempApiKey:this.apiKey&&(l["X-API-Key"]=this.apiKey),a&&(l["Content-Type"]=a),l}async apiFetch(a,l={}){const i=`${this.baseUrl}${a}`,s={...l,headers:{...this.createHeaders(),...l.headers}};try{const u=await fetch(i,s);if(u.status===401)return localStorage.removeItem("apiKey"),window.dispatchEvent(new CustomEvent("unauthorized")),new Promise(()=>{});if(!u.ok)throw new Error(`API request failed: ${u.status} ${u.statusText}`);if(u.status===204)return{};const f=await u.text();return f?JSON.parse(f):{}}catch(u){throw console.error("API request error:",u),u}}async get(a){return this.apiFetch(a,{method:"GET"})}async post(a,l){return this.apiFetch(a,{method:"POST",body:JSON.stringify(l)})}async put(a,l){return this.apiFetch(a,{method:"PUT",body:JSON.stringify(l)})}async delete(a){return this.apiFetch(a,{method:"DELETE"})}async getConfig(){return this.get("/config")}async updateConfig(a){return this.post("/config",a)}async getProviders(){return this.get("/api/providers")}async addProvider(a){return this.post("/api/providers",a)}async updateProvider(a,l){return this.post(`/api/providers/${a}`,l)}async deleteProvider(a){return this.delete(`/api/providers/${a}`)}async getTransformers(){return this.get("/api/transformers")}async addTransformer(a){return this.post("/api/transformers",a)}async updateTransformer(a,l){return this.post(`/api/transformers/${a}`,l)}async deleteTransformer(a){return this.delete(`/api/transformers/${a}`)}async getConfigNew(){return this.get("/config")}async saveConfig(a){return this.post("/config",a)}async restartService(){return this.post("/restart",{})}async checkForUpdates(){return this.get("/update/check")}async performUpdate(){return this.post("/api/update/perform",{})}}const Gt=new AO,Ox=y.createContext(void 0);function Zr(){const n=y.useContext(Ox);if(n===void 0)throw new Error("useConfig must be used within a ConfigProvider");return n}function TO({children:n}){const[a,l]=y.useState(null),[i,s]=y.useState(null),[u,f]=y.useState(!1),[d,p]=y.useState(localStorage.getItem("apiKey"));return y.useEffect(()=>{const m=()=>{p(localStorage.getItem("apiKey"))};return window.addEventListener("storage",m),()=>{window.removeEventListener("storage",m)}},[]),y.useEffect(()=>{(async()=>{f(!1),l(null),s(null)})()},[d]),y.useEffect(()=>{(async()=>{if(!u){f(!0);try{const v=await Gt.getConfig(),b={LOG:typeof v.LOG=="boolean"?v.LOG:!1,LOG_LEVEL:typeof v.LOG_LEVEL=="string"?v.LOG_LEVEL:"info",CLAUDE_PATH:typeof v.CLAUDE_PATH=="string"?v.CLAUDE_PATH:"",HOST:typeof v.HOST=="string"?v.HOST:"127.0.0.1",PORT:typeof v.PORT=="number"?v.PORT:3456,APIKEY:typeof v.APIKEY=="string"?v.APIKEY:"",API_TIMEOUT_MS:typeof v.API_TIMEOUT_MS=="string"?v.API_TIMEOUT_MS:"600000",PROXY_URL:typeof v.PROXY_URL=="string"?v.PROXY_URL:"",transformers:Array.isArray(v.transformers)?v.transformers:[],Providers:Array.isArray(v.Providers)?v.Providers:[],StatusLine:v.StatusLine&&typeof v.StatusLine=="object"?{enabled:typeof v.StatusLine.enabled=="boolean"?v.StatusLine.enabled:!1,currentStyle:typeof v.StatusLine.currentStyle=="string"?v.StatusLine.currentStyle:"default",default:v.StatusLine.default&&typeof v.StatusLine.default=="object"&&Array.isArray(v.StatusLine.default.modules)?v.StatusLine.default:{modules:[]},powerline:v.StatusLine.powerline&&typeof v.StatusLine.powerline=="object"&&Array.isArray(v.StatusLine.powerline.modules)?v.StatusLine.powerline:{modules:[]}}:{enabled:!1,currentStyle:"default",default:{modules:[]},powerline:{modules:[]}},Router:v.Router&&typeof v.Router=="object"?{default:typeof v.Router.default=="string"?v.Router.default:"",background:typeof v.Router.background=="string"?v.Router.background:"",think:typeof v.Router.think=="string"?v.Router.think:"",longContext:typeof v.Router.longContext=="string"?v.Router.longContext:"",longContextThreshold:typeof v.Router.longContextThreshold=="number"?v.Router.longContextThreshold:6e4,webSearch:typeof v.Router.webSearch=="string"?v.Router.webSearch:""}:{default:"",background:"",think:"",longContext:"",longContextThreshold:6e4,webSearch:""}};l(b)}catch(v){console.error("Failed to fetch config:",v),v.message!=="Unauthorized"&&(l({LOG:!1,LOG_LEVEL:"info",CLAUDE_PATH:"",HOST:"127.0.0.1",PORT:3456,APIKEY:"",API_TIMEOUT_MS:"600000",PROXY_URL:"",transformers:[],Providers:[],StatusLine:void 0,Router:{default:"",background:"",think:"",longContext:"",longContextThreshold:6e4,webSearch:""}}),s(v))}}})()},[u,d]),g.jsx(Ox.Provider,{value:{config:a,setConfig:l,error:i},children:n})}function Gu(){return(Gu=Object.assign||function(n){for(var a=1;a<arguments.length;a++){var l=arguments[a];for(var i in l)Object.prototype.hasOwnProperty.call(l,i)&&(n[i]=l[i])}return n}).apply(this,arguments)}function Ax(n,a){if(n==null)return{};var l,i,s={},u=Object.keys(n);for(i=0;i<u.length;i++)a.indexOf(l=u[i])>=0||(s[l]=n[l]);return s}function Zd(n){var a=y.useRef(n),l=y.useRef(function(i){a.current&&a.current(i)});return a.current=n,l.current}var wo=function(n,a,l){return a===void 0&&(a=0),l===void 0&&(l=1),n>l?l:n<a?a:n},ho=function(n){return"touches"in n},Id=function(n){return n&&n.ownerDocument.defaultView||self},Hy=function(n,a,l){var i=n.getBoundingClientRect(),s=ho(a)?function(u,f){for(var d=0;d<u.length;d++)if(u[d].identifier===f)return u[d];return u[0]}(a.touches,l):a;return{left:wo((s.pageX-(i.left+Id(n).pageXOffset))/i.width),top:wo((s.pageY-(i.top+Id(n).pageYOffset))/i.height)}},By=function(n){!ho(n)&&n.preventDefault()},Tx=yt.memo(function(n){var a=n.onMove,l=n.onKey,i=Ax(n,["onMove","onKey"]),s=y.useRef(null),u=Zd(a),f=Zd(l),d=y.useRef(null),p=y.useRef(!1),m=y.useMemo(function(){var w=function(j){By(j),(ho(j)?j.touches.length>0:j.buttons>0)&&s.current?u(Hy(s.current,j,d.current)):C(!1)},_=function(){return C(!1)};function C(j){var N=p.current,U=Id(s.current),z=j?U.addEventListener:U.removeEventListener;z(N?"touchmove":"mousemove",w),z(N?"touchend":"mouseup",_)}return[function(j){var N=j.nativeEvent,U=s.current;if(U&&(By(N),!function(D,T){return T&&!ho(D)}(N,p.current)&&U)){if(ho(N)){p.current=!0;var z=N.changedTouches||[];z.length&&(d.current=z[0].identifier)}U.focus(),u(Hy(U,N,d.current)),C(!0)}},function(j){var N=j.which||j.keyCode;N<37||N>40||(j.preventDefault(),f({left:N===39?.05:N===37?-.05:0,top:N===40?.05:N===38?-.05:0}))},C]},[f,u]),v=m[0],b=m[1],S=m[2];return y.useEffect(function(){return S},[S]),yt.createElement("div",Gu({},i,{onTouchStart:v,onMouseDown:v,className:"react-colorful__interactive",ref:s,onKeyDown:b,tabIndex:0,role:"slider"}))}),Mh=function(n){return n.filter(Boolean).join(" ")},Mx=function(n){var a=n.color,l=n.left,i=n.top,s=i===void 0?.5:i,u=Mh(["react-colorful__pointer",n.className]);return yt.createElement("div",{className:u,style:{top:100*s+"%",left:100*l+"%"}},yt.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:a}}))},Bt=function(n,a,l){return a===void 0&&(a=0),l===void 0&&(l=Math.pow(10,a)),Math.round(l*n)/l},MO=function(n){return UO(Jd(n))},Jd=function(n){return n[0]==="#"&&(n=n.substring(1)),n.length<6?{r:parseInt(n[0]+n[0],16),g:parseInt(n[1]+n[1],16),b:parseInt(n[2]+n[2],16),a:n.length===4?Bt(parseInt(n[3]+n[3],16)/255,2):1}:{r:parseInt(n.substring(0,2),16),g:parseInt(n.substring(2,4),16),b:parseInt(n.substring(4,6),16),a:n.length===8?Bt(parseInt(n.substring(6,8),16)/255,2):1}},DO=function(n){return zO(kO(n))},LO=function(n){var a=n.s,l=n.v,i=n.a,s=(200-a)*l/100;return{h:Bt(n.h),s:Bt(s>0&&s<200?a*l/100/(s<=100?s:200-s)*100:0),l:Bt(s/2),a:Bt(i,2)}},Wd=function(n){var a=LO(n);return"hsl("+a.h+", "+a.s+"%, "+a.l+"%)"},kO=function(n){var a=n.h,l=n.s,i=n.v,s=n.a;a=a/360*6,l/=100,i/=100;var u=Math.floor(a),f=i*(1-l),d=i*(1-(a-u)*l),p=i*(1-(1-a+u)*l),m=u%6;return{r:Bt(255*[i,d,f,f,p,i][m]),g:Bt(255*[p,i,i,d,f,f][m]),b:Bt(255*[f,f,p,i,i,d][m]),a:Bt(s,2)}},tu=function(n){var a=n.toString(16);return a.length<2?"0"+a:a},zO=function(n){var a=n.r,l=n.g,i=n.b,s=n.a,u=s<1?tu(Bt(255*s)):"";return"#"+tu(a)+tu(l)+tu(i)+u},UO=function(n){var a=n.r,l=n.g,i=n.b,s=n.a,u=Math.max(a,l,i),f=u-Math.min(a,l,i),d=f?u===a?(l-i)/f:u===l?2+(i-a)/f:4+(a-l)/f:0;return{h:Bt(60*(d<0?d+6:d)),s:Bt(u?f/u*100:0),v:Bt(u/255*100),a:s}},PO=yt.memo(function(n){var a=n.hue,l=n.onChange,i=Mh(["react-colorful__hue",n.className]);return yt.createElement("div",{className:i},yt.createElement(Tx,{onMove:function(s){l({h:360*s.left})},onKey:function(s){l({h:wo(a+360*s.left,0,360)})},"aria-label":"Hue","aria-valuenow":Bt(a),"aria-valuemax":"360","aria-valuemin":"0"},yt.createElement(Mx,{className:"react-colorful__hue-pointer",left:a/360,color:Wd({h:a,s:100,v:100,a:1})})))}),HO=yt.memo(function(n){var a=n.hsva,l=n.onChange,i={backgroundColor:Wd({h:a.h,s:100,v:100,a:1})};return yt.createElement("div",{className:"react-colorful__saturation",style:i},yt.createElement(Tx,{onMove:function(s){l({s:100*s.left,v:100-100*s.top})},onKey:function(s){l({s:wo(a.s+100*s.left,0,100),v:wo(a.v-100*s.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+Bt(a.s)+"%, Brightness "+Bt(a.v)+"%"},yt.createElement(Mx,{className:"react-colorful__saturation-pointer",top:1-a.v/100,left:a.s/100,color:Wd(a)})))}),Dx=function(n,a){if(n===a)return!0;for(var l in n)if(n[l]!==a[l])return!1;return!0},BO=function(n,a){return n.toLowerCase()===a.toLowerCase()||Dx(Jd(n),Jd(a))};function $O(n,a,l){var i=Zd(l),s=y.useState(function(){return n.toHsva(a)}),u=s[0],f=s[1],d=y.useRef({color:a,hsva:u});y.useEffect(function(){if(!n.equal(a,d.current.color)){var m=n.toHsva(a);d.current={hsva:m,color:a},f(m)}},[a,n]),y.useEffect(function(){var m;Dx(u,d.current.hsva)||n.equal(m=n.fromHsva(u),d.current.color)||(d.current={hsva:u,color:m},i(m))},[u,n,i]);var p=y.useCallback(function(m){f(function(v){return Object.assign({},v,m)})},[]);return[u,p]}var VO=typeof window<"u"?y.useLayoutEffect:y.useEffect,YO=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},$y=new Map,qO=function(n){VO(function(){var a=n.current?n.current.ownerDocument:document;if(a!==void 0&&!$y.has(a)){var l=a.createElement("style");l.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,$y.set(a,l);var i=YO();i&&l.setAttribute("nonce",i),a.head.appendChild(l)}},[])},KO=function(n){var a=n.className,l=n.colorModel,i=n.color,s=i===void 0?l.defaultColor:i,u=n.onChange,f=Ax(n,["className","colorModel","color","onChange"]),d=y.useRef(null);qO(d);var p=$O(l,s,u),m=p[0],v=p[1],b=Mh(["react-colorful",a]);return yt.createElement("div",Gu({},f,{ref:d,className:b}),yt.createElement(HO,{hsva:m,onChange:v}),yt.createElement(PO,{hue:m.h,onChange:v,className:"react-colorful__last-control"}))},GO={defaultColor:"000",toHsva:MO,fromHsva:function(n){return DO({h:n.h,s:n.s,v:n.v,a:1})},equal:BO},FO=function(n){return yt.createElement(KO,Gu({},n,{colorModel:GO}))};const XO=xh("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Hr({className:n,variant:a,...l}){return g.jsx("div",{className:rt(XO({variant:a}),n),...l})}const Su={black:"#000000",red:"#ff0000",green:"#00ff00",yellow:"#ffff00",blue:"#0000ff",magenta:"#ff00ff",cyan:"#00ffff",white:"#ffffff",bright_black:"#808080",bright_red:"#ff8080",bright_green:"#80ff80",bright_yellow:"#ffff80",bright_blue:"#8080ff",bright_magenta:"#ff80ff",bright_cyan:"#80ffff",bright_white:"#ffffff"},Lx=Object.keys(Su).reduce((n,a)=>(n[`bg_${a}`]=Su[a],n),{}),Eu={...Su,...Lx},QO=n=>Eu[n]?Eu[n]:n.startsWith("#")?n:"#000000";function Vy({value:n="",onChange:a,placeholder:l="选择颜色...",showPreview:i=!0}){const[s,u]=y.useState(!1),[f,d]=y.useState("");y.useEffect(()=>{n.startsWith("#")?d(n):d("")},[n]);const p=w=>{a(w)},m=w=>{const _=w.target.value;d(_),/^#[0-9A-F]{6}$/i.test(_)&&p(_)},v=w=>{p(w),u(!1)},b=QO(n),S=Object.keys(Eu).find(w=>Eu[w]===b)||n;return g.jsx("div",{className:"space-y-2",children:g.jsxs(Yu,{open:s,onOpenChange:u,children:[g.jsx(qu,{asChild:!0,children:g.jsx(Te,{variant:"outline",className:rt("w-full justify-start text-left font-normal h-10 transition-all hover:scale-[1.02] active:scale-[0.98]",!n&&"text-muted-foreground"),children:g.jsxs("div",{className:"flex items-center gap-2 w-full",children:[i&&g.jsx("div",{className:"h-5 w-5 rounded border shadow-sm",style:{backgroundColor:b}}),g.jsx("span",{className:"truncate flex-1",children:n?S:l}),g.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[g.jsx("path",{d:"m7 15 5 5 5-5"}),g.jsx("path",{d:"m7 9 5-5 5 5"})]})]})})}),g.jsx(Ku,{className:"w-72 p-3",align:"start",children:g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("h4",{className:"text-sm font-semibold",children:"颜色选择器"}),g.jsx(Te,{variant:"ghost",size:"sm",className:"h-6 px-2 text-xs",onClick:()=>p(""),children:"清除"})]}),g.jsxs("div",{className:"flex items-center gap-2 p-2 rounded-md bg-secondary",children:[g.jsx("div",{className:"h-8 w-8 rounded border shadow-sm",style:{backgroundColor:b}}),g.jsxs("div",{className:"flex-1 min-w-0",children:[g.jsx("div",{className:"text-sm font-medium truncate",children:n?S:"未选择颜色"}),n&&n.startsWith("#")&&g.jsx("div",{className:"text-xs text-muted-foreground font-mono",children:n.toUpperCase()})]})]}),g.jsx("div",{className:"rounded-md overflow-hidden border",children:g.jsx(FO,{color:b,onChange:p,className:"w-full"})}),g.jsxs("div",{className:"space-y-2",children:[g.jsx("label",{className:"text-sm font-medium",children:"自定义颜色"}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx(mt,{type:"text",value:f,onChange:m,placeholder:"#RRGGBB",className:"font-mono flex-1"}),g.jsx(Te,{size:"sm",onClick:()=>f&&p(f),disabled:!f||!/^#[0-9A-F]{6}$/i.test(f),children:"应用"})]}),g.jsx("p",{className:"text-xs text-muted-foreground",children:"输入十六进制颜色值 (例如: #FF0000)"})]}),g.jsxs("div",{className:"space-y-3",children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("label",{className:"text-sm font-medium",children:"ANSI 颜色"}),g.jsx("span",{className:"text-xs text-muted-foreground",children:"文字颜色"})]}),g.jsx("div",{className:"grid grid-cols-8 gap-1",children:Object.entries(Su).map(([w,_])=>g.jsx(Te,{variant:n===w?"default":"outline",size:"sm",className:rt("h-8 w-8 p-0 rounded-full transition-all hover:scale-110",n===w&&"ring-2 ring-offset-2 ring-ring ring-offset-background"),style:{backgroundColor:n===w?_:void 0},onClick:()=>v(w),title:w,children:n===w&&g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:g.jsx("polyline",{points:"20 6 9 17 4 12"})})},w))})]}),g.jsxs("div",{className:"space-y-3",children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("label",{className:"text-sm font-medium",children:"背景颜色"}),g.jsx("span",{className:"text-xs text-muted-foreground",children:"背景色"})]}),g.jsx("div",{className:"grid grid-cols-8 gap-1",children:Object.entries(Lx).map(([w,_])=>g.jsx(Te,{variant:n===w?"default":"outline",size:"sm",className:rt("h-8 w-8 p-0 rounded-full transition-all hover:scale-110",n===w&&"ring-2 ring-offset-2 ring-ring ring-offset-background"),style:{backgroundColor:n===w?_:void 0},onClick:()=>v(w),title:w,children:n===w&&g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:g.jsx("polyline",{points:"20 6 9 17 4 12"})})},w))})]})]})})]})})}function ZO(){return{enabled:!1,currentStyle:"default",default:{modules:[{type:"workDir",icon:"",text:"{{workDirName}}",color:"bright_blue"},{type:"gitBranch",icon:"",text:"{{gitBranch}}",color:"bright_magenta"},{type:"model",icon:"",text:"{{model}}",color:"bright_cyan"},{type:"usage",icon:"↑",text:"{{inputTokens}}",color:"bright_green"},{type:"usage",icon:"↓",text:"{{outputTokens}}",color:"bright_yellow"}]},powerline:{modules:[{type:"workDir",icon:"",text:"{{workDirName}}",color:"white",background:"bg_bright_blue"},{type:"gitBranch",icon:"",text:"{{gitBranch}}",color:"white",background:"bg_bright_magenta"},{type:"model",icon:"",text:"{{model}}",color:"white",background:"bg_bright_cyan"},{type:"usage",icon:"↑",text:"{{inputTokens}}",color:"white",background:"bg_bright_green"},{type:"usage",icon:"↓",text:"{{outputTokens}}",color:"white",background:"bg_bright_yellow"}]}}}const IO={type:"workDir",icon:"",text:"{{workDirName}}",color:"bright_blue"},JO=[{label:"workDir",value:"workDir"},{label:"gitBranch",value:"gitBranch"},{label:"model",value:"model"},{label:"usage",value:"usage"}],Yy={black:"text-black",red:"text-red-600",green:"text-green-600",yellow:"text-yellow-500",blue:"text-blue-500",magenta:"text-purple-500",cyan:"text-cyan-500",white:"text-white",bright_black:"text-gray-500",bright_red:"text-red-400",bright_green:"text-green-400",bright_yellow:"text-yellow-300",bright_blue:"text-blue-300",bright_magenta:"text-purple-300",bright_cyan:"text-cyan-300",bright_white:"text-white",bg_black:"bg-black",bg_red:"bg-red-600",bg_green:"bg-green-600",bg_yellow:"bg-yellow-500",bg_blue:"bg-blue-500",bg_magenta:"bg-purple-500",bg_cyan:"bg-cyan-500",bg_white:"bg-white",bg_bright_black:"bg-gray-800",bg_bright_red:"bg-red-400",bg_bright_green:"bg-green-400",bg_bright_yellow:"bg-yellow-300",bg_bright_blue:"bg-blue-300",bg_bright_magenta:"bg-purple-300",bg_bright_cyan:"bg-cyan-300",bg_bright_white:"bg-gray-100",bg_bright_orange:"bg-orange-400",bg_bright_purple:"bg-purple-400"};function WO(n,a){return n.replace(/\{\{(\w+)\}\}/g,(l,i)=>a[i]||l)}function eA(n,a=!1){const l={workDirName:"project",gitBranch:"main",model:"Claude Sonnet 4",inputTokens:"1.2k",outputTokens:"2.5k"},i=WO(n.text,l),s=n.icon||"";if(!i&&n.type!=="usage")return null;if(a){const u=n.background&&Yy[n.background]||"",f=n.color&&Yy[n.color]||"text-white";return g.jsxs("div",{className:`powerline-module ${u} ${f}`,children:[g.jsxs("div",{className:"powerline-module-content",children:[s&&g.jsx("span",{children:s}),g.jsx("span",{children:i})]}),g.jsx("div",{className:"powerline-separator","data-current-bg":n.background||""})]})}return g.jsxs(g.Fragment,{children:[s&&g.jsx("span",{children:s}),g.jsx("span",{children:i})]})}function tA({isOpen:n,onOpenChange:a}){const{t:l}=fr(),{config:i,setConfig:s}=Zr();y.useEffect(()=>{const D=document.createElement("style");return D.innerHTML=`
|
|
221
|
+
*/const TN=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Xl=Ut("x",TN);function mb(n){var a,l,i="";if(typeof n=="string"||typeof n=="number")i+=n;else if(typeof n=="object")if(Array.isArray(n)){var s=n.length;for(a=0;a<s;a++)n[a]&&(l=mb(n[a]))&&(i&&(i+=" "),i+=l)}else for(l in n)n[l]&&(i&&(i+=" "),i+=l);return i}function pb(){for(var n,a,l=0,i="",s=arguments.length;l<s;l++)(n=arguments[l])&&(a=mb(n))&&(i&&(i+=" "),i+=a);return i}const yh="-",MN=n=>{const a=LN(n),{conflictingClassGroups:l,conflictingClassGroupModifiers:i}=n;return{getClassGroupId:f=>{const d=f.split(yh);return d[0]===""&&d.length!==1&&d.shift(),gb(d,a)||DN(f)},getConflictingClassGroupIds:(f,d)=>{const p=l[f]||[];return d&&i[f]?[...p,...i[f]]:p}}},gb=(n,a)=>{if(n.length===0)return a.classGroupId;const l=n[0],i=a.nextPart.get(l),s=i?gb(n.slice(1),i):void 0;if(s)return s;if(a.validators.length===0)return;const u=n.join(yh);return a.validators.find(({validator:f})=>f(u))?.classGroupId},by=/^\[(.+)\]$/,DN=n=>{if(by.test(n)){const a=by.exec(n)[1],l=a?.substring(0,a.indexOf(":"));if(l)return"arbitrary.."+l}},LN=n=>{const{theme:a,classGroups:l}=n,i={nextPart:new Map,validators:[]};for(const s in l)Bd(l[s],i,s,a);return i},Bd=(n,a,l,i)=>{n.forEach(s=>{if(typeof s=="string"){const u=s===""?a:xy(a,s);u.classGroupId=l;return}if(typeof s=="function"){if(kN(s)){Bd(s(i),a,l,i);return}a.validators.push({validator:s,classGroupId:l});return}Object.entries(s).forEach(([u,f])=>{Bd(f,xy(a,u),l,i)})})},xy=(n,a)=>{let l=n;return a.split(yh).forEach(i=>{l.nextPart.has(i)||l.nextPart.set(i,{nextPart:new Map,validators:[]}),l=l.nextPart.get(i)}),l},kN=n=>n.isThemeGetter,zN=n=>{if(n<1)return{get:()=>{},set:()=>{}};let a=0,l=new Map,i=new Map;const s=(u,f)=>{l.set(u,f),a++,a>n&&(a=0,i=l,l=new Map)};return{get(u){let f=l.get(u);if(f!==void 0)return f;if((f=i.get(u))!==void 0)return s(u,f),f},set(u,f){l.has(u)?l.set(u,f):s(u,f)}}},$d="!",Vd=":",UN=Vd.length,PN=n=>{const{prefix:a,experimentalParseClassName:l}=n;let i=s=>{const u=[];let f=0,d=0,p=0,m;for(let C=0;C<s.length;C++){let _=s[C];if(f===0&&d===0){if(_===Vd){u.push(s.slice(p,C)),p=C+UN;continue}if(_==="/"){m=C;continue}}_==="["?f++:_==="]"?f--:_==="("?d++:_===")"&&d--}const v=u.length===0?s:s.substring(p),b=HN(v),w=b!==v,S=m&&m>p?m-p:void 0;return{modifiers:u,hasImportantModifier:w,baseClassName:b,maybePostfixModifierPosition:S}};if(a){const s=a+Vd,u=i;i=f=>f.startsWith(s)?u(f.substring(s.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:f,maybePostfixModifierPosition:void 0}}if(l){const s=i;i=u=>l({className:u,parseClassName:s})}return i},HN=n=>n.endsWith($d)?n.substring(0,n.length-1):n.startsWith($d)?n.substring(1):n,BN=n=>{const a=Object.fromEntries(n.orderSensitiveModifiers.map(i=>[i,!0]));return i=>{if(i.length<=1)return i;const s=[];let u=[];return i.forEach(f=>{f[0]==="["||a[f]?(s.push(...u.sort(),f),u=[]):u.push(f)}),s.push(...u.sort()),s}},$N=n=>({cache:zN(n.cacheSize),parseClassName:PN(n),sortModifiers:BN(n),...MN(n)}),VN=/\s+/,YN=(n,a)=>{const{parseClassName:l,getClassGroupId:i,getConflictingClassGroupIds:s,sortModifiers:u}=a,f=[],d=n.trim().split(VN);let p="";for(let m=d.length-1;m>=0;m-=1){const v=d[m],{isExternal:b,modifiers:w,hasImportantModifier:S,baseClassName:C,maybePostfixModifierPosition:_}=l(v);if(b){p=v+(p.length>0?" "+p:p);continue}let j=!!_,N=i(j?C.substring(0,_):C);if(!N){if(!j){p=v+(p.length>0?" "+p:p);continue}if(N=i(C),!N){p=v+(p.length>0?" "+p:p);continue}j=!1}const z=u(w).join(":"),k=S?z+$d:z,H=k+N;if(f.includes(H))continue;f.push(H);const D=s(N,j);for(let R=0;R<D.length;++R){const B=D[R];f.push(k+B)}p=v+(p.length>0?" "+p:p)}return p};function qN(){let n=0,a,l,i="";for(;n<arguments.length;)(a=arguments[n++])&&(l=vb(a))&&(i&&(i+=" "),i+=l);return i}const vb=n=>{if(typeof n=="string")return n;let a,l="";for(let i=0;i<n.length;i++)n[i]&&(a=vb(n[i]))&&(l&&(l+=" "),l+=a);return l};function FN(n,...a){let l,i,s,u=f;function f(p){const m=a.reduce((v,b)=>b(v),n());return l=$N(m),i=l.cache.get,s=l.cache.set,u=d,d(p)}function d(p){const m=i(p);if(m)return m;const v=YN(p,l);return s(p,v),v}return function(){return u(qN.apply(null,arguments))}}const Dt=n=>{const a=l=>l[n]||[];return a.isThemeGetter=!0,a},yb=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,bb=/^\((?:(\w[\w-]*):)?(.+)\)$/i,KN=/^\d+\/\d+$/,GN=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,XN=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,QN=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ZN=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,IN=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,$l=n=>KN.test(n),Ye=n=>!!n&&!Number.isNaN(Number(n)),er=n=>!!n&&Number.isInteger(Number(n)),gd=n=>n.endsWith("%")&&Ye(n.slice(0,-1)),Sa=n=>GN.test(n),JN=()=>!0,WN=n=>XN.test(n)&&!QN.test(n),xb=()=>!1,eR=n=>ZN.test(n),tR=n=>IN.test(n),nR=n=>!xe(n)&&!we(n),aR=n=>ti(n,Eb,xb),xe=n=>yb.test(n),Hr=n=>ti(n,_b,WN),vd=n=>ti(n,sR,Ye),wy=n=>ti(n,wb,xb),rR=n=>ti(n,Sb,tR),Js=n=>ti(n,Cb,eR),we=n=>bb.test(n),oo=n=>ni(n,_b),lR=n=>ni(n,uR),Sy=n=>ni(n,wb),iR=n=>ni(n,Eb),oR=n=>ni(n,Sb),Ws=n=>ni(n,Cb,!0),ti=(n,a,l)=>{const i=yb.exec(n);return i?i[1]?a(i[1]):l(i[2]):!1},ni=(n,a,l=!1)=>{const i=bb.exec(n);return i?i[1]?a(i[1]):l:!1},wb=n=>n==="position"||n==="percentage",Sb=n=>n==="image"||n==="url",Eb=n=>n==="length"||n==="size"||n==="bg-size",_b=n=>n==="length",sR=n=>n==="number",uR=n=>n==="family-name",Cb=n=>n==="shadow",cR=()=>{const n=Dt("color"),a=Dt("font"),l=Dt("text"),i=Dt("font-weight"),s=Dt("tracking"),u=Dt("leading"),f=Dt("breakpoint"),d=Dt("container"),p=Dt("spacing"),m=Dt("radius"),v=Dt("shadow"),b=Dt("inset-shadow"),w=Dt("text-shadow"),S=Dt("drop-shadow"),C=Dt("blur"),_=Dt("perspective"),j=Dt("aspect"),N=Dt("ease"),z=Dt("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],H=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],D=()=>[...H(),we,xe],R=()=>["auto","hidden","clip","visible","scroll"],B=()=>["auto","contain","none"],Z=()=>[we,xe,p],ne=()=>[$l,"full","auto",...Z()],oe=()=>[er,"none","subgrid",we,xe],le=()=>["auto",{span:["full",er,we,xe]},er,we,xe],J=()=>[er,"auto",we,xe],te=()=>["auto","min","max","fr",we,xe],W=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ue=()=>["start","end","center","stretch","center-safe","end-safe"],A=()=>["auto",...Z()],Q=()=>[$l,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...Z()],V=()=>[n,we,xe],ve=()=>[...H(),Sy,wy,{position:[we,xe]}],O=()=>["no-repeat",{repeat:["","x","y","space","round"]}],F=()=>["auto","cover","contain",iR,aR,{size:[we,xe]}],U=()=>[gd,oo,Hr],K=()=>["","none","full",m,we,xe],ae=()=>["",Ye,oo,Hr],de=()=>["solid","dashed","dotted","double"],ge=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ye=()=>[Ye,gd,Sy,wy],Le=()=>["","none",C,we,xe],qe=()=>["none",Ye,we,xe],Je=()=>["none",Ye,we,xe],At=()=>[Ye,we,xe],Ze=()=>[$l,"full",...Z()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Sa],breakpoint:[Sa],color:[JN],container:[Sa],"drop-shadow":[Sa],ease:["in","out","in-out"],font:[nR],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Sa],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Sa],shadow:[Sa],spacing:["px",Ye],text:[Sa],"text-shadow":[Sa],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",$l,xe,we,j]}],container:["container"],columns:[{columns:[Ye,xe,we,d]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:D()}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:B()}],"overscroll-x":[{"overscroll-x":B()}],"overscroll-y":[{"overscroll-y":B()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ne()}],"inset-x":[{"inset-x":ne()}],"inset-y":[{"inset-y":ne()}],start:[{start:ne()}],end:[{end:ne()}],top:[{top:ne()}],right:[{right:ne()}],bottom:[{bottom:ne()}],left:[{left:ne()}],visibility:["visible","invisible","collapse"],z:[{z:[er,"auto",we,xe]}],basis:[{basis:[$l,"full","auto",d,...Z()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ye,$l,"auto","initial","none",xe]}],grow:[{grow:["",Ye,we,xe]}],shrink:[{shrink:["",Ye,we,xe]}],order:[{order:[er,"first","last","none",we,xe]}],"grid-cols":[{"grid-cols":oe()}],"col-start-end":[{col:le()}],"col-start":[{"col-start":J()}],"col-end":[{"col-end":J()}],"grid-rows":[{"grid-rows":oe()}],"row-start-end":[{row:le()}],"row-start":[{"row-start":J()}],"row-end":[{"row-end":J()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":te()}],"auto-rows":[{"auto-rows":te()}],gap:[{gap:Z()}],"gap-x":[{"gap-x":Z()}],"gap-y":[{"gap-y":Z()}],"justify-content":[{justify:[...W(),"normal"]}],"justify-items":[{"justify-items":[...ue(),"normal"]}],"justify-self":[{"justify-self":["auto",...ue()]}],"align-content":[{content:["normal",...W()]}],"align-items":[{items:[...ue(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ue(),{baseline:["","last"]}]}],"place-content":[{"place-content":W()}],"place-items":[{"place-items":[...ue(),"baseline"]}],"place-self":[{"place-self":["auto",...ue()]}],p:[{p:Z()}],px:[{px:Z()}],py:[{py:Z()}],ps:[{ps:Z()}],pe:[{pe:Z()}],pt:[{pt:Z()}],pr:[{pr:Z()}],pb:[{pb:Z()}],pl:[{pl:Z()}],m:[{m:A()}],mx:[{mx:A()}],my:[{my:A()}],ms:[{ms:A()}],me:[{me:A()}],mt:[{mt:A()}],mr:[{mr:A()}],mb:[{mb:A()}],ml:[{ml:A()}],"space-x":[{"space-x":Z()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":Z()}],"space-y-reverse":["space-y-reverse"],size:[{size:Q()}],w:[{w:[d,"screen",...Q()]}],"min-w":[{"min-w":[d,"screen","none",...Q()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[f]},...Q()]}],h:[{h:["screen","lh",...Q()]}],"min-h":[{"min-h":["screen","lh","none",...Q()]}],"max-h":[{"max-h":["screen","lh",...Q()]}],"font-size":[{text:["base",l,oo,Hr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,we,vd]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",gd,xe]}],"font-family":[{font:[lR,xe,a]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,we,xe]}],"line-clamp":[{"line-clamp":[Ye,"none",we,vd]}],leading:[{leading:[u,...Z()]}],"list-image":[{"list-image":["none",we,xe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",we,xe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:V()}],"text-color":[{text:V()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...de(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ye,"from-font","auto",we,Hr]}],"text-decoration-color":[{decoration:V()}],"underline-offset":[{"underline-offset":[Ye,"auto",we,xe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:Z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",we,xe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",we,xe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ve()}],"bg-repeat":[{bg:O()}],"bg-size":[{bg:F()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},er,we,xe],radial:["",we,xe],conic:[er,we,xe]},oR,rR]}],"bg-color":[{bg:V()}],"gradient-from-pos":[{from:U()}],"gradient-via-pos":[{via:U()}],"gradient-to-pos":[{to:U()}],"gradient-from":[{from:V()}],"gradient-via":[{via:V()}],"gradient-to":[{to:V()}],rounded:[{rounded:K()}],"rounded-s":[{"rounded-s":K()}],"rounded-e":[{"rounded-e":K()}],"rounded-t":[{"rounded-t":K()}],"rounded-r":[{"rounded-r":K()}],"rounded-b":[{"rounded-b":K()}],"rounded-l":[{"rounded-l":K()}],"rounded-ss":[{"rounded-ss":K()}],"rounded-se":[{"rounded-se":K()}],"rounded-ee":[{"rounded-ee":K()}],"rounded-es":[{"rounded-es":K()}],"rounded-tl":[{"rounded-tl":K()}],"rounded-tr":[{"rounded-tr":K()}],"rounded-br":[{"rounded-br":K()}],"rounded-bl":[{"rounded-bl":K()}],"border-w":[{border:ae()}],"border-w-x":[{"border-x":ae()}],"border-w-y":[{"border-y":ae()}],"border-w-s":[{"border-s":ae()}],"border-w-e":[{"border-e":ae()}],"border-w-t":[{"border-t":ae()}],"border-w-r":[{"border-r":ae()}],"border-w-b":[{"border-b":ae()}],"border-w-l":[{"border-l":ae()}],"divide-x":[{"divide-x":ae()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ae()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...de(),"hidden","none"]}],"divide-style":[{divide:[...de(),"hidden","none"]}],"border-color":[{border:V()}],"border-color-x":[{"border-x":V()}],"border-color-y":[{"border-y":V()}],"border-color-s":[{"border-s":V()}],"border-color-e":[{"border-e":V()}],"border-color-t":[{"border-t":V()}],"border-color-r":[{"border-r":V()}],"border-color-b":[{"border-b":V()}],"border-color-l":[{"border-l":V()}],"divide-color":[{divide:V()}],"outline-style":[{outline:[...de(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ye,we,xe]}],"outline-w":[{outline:["",Ye,oo,Hr]}],"outline-color":[{outline:V()}],shadow:[{shadow:["","none",v,Ws,Js]}],"shadow-color":[{shadow:V()}],"inset-shadow":[{"inset-shadow":["none",b,Ws,Js]}],"inset-shadow-color":[{"inset-shadow":V()}],"ring-w":[{ring:ae()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:V()}],"ring-offset-w":[{"ring-offset":[Ye,Hr]}],"ring-offset-color":[{"ring-offset":V()}],"inset-ring-w":[{"inset-ring":ae()}],"inset-ring-color":[{"inset-ring":V()}],"text-shadow":[{"text-shadow":["none",w,Ws,Js]}],"text-shadow-color":[{"text-shadow":V()}],opacity:[{opacity:[Ye,we,xe]}],"mix-blend":[{"mix-blend":[...ge(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ge()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ye]}],"mask-image-linear-from-pos":[{"mask-linear-from":ye()}],"mask-image-linear-to-pos":[{"mask-linear-to":ye()}],"mask-image-linear-from-color":[{"mask-linear-from":V()}],"mask-image-linear-to-color":[{"mask-linear-to":V()}],"mask-image-t-from-pos":[{"mask-t-from":ye()}],"mask-image-t-to-pos":[{"mask-t-to":ye()}],"mask-image-t-from-color":[{"mask-t-from":V()}],"mask-image-t-to-color":[{"mask-t-to":V()}],"mask-image-r-from-pos":[{"mask-r-from":ye()}],"mask-image-r-to-pos":[{"mask-r-to":ye()}],"mask-image-r-from-color":[{"mask-r-from":V()}],"mask-image-r-to-color":[{"mask-r-to":V()}],"mask-image-b-from-pos":[{"mask-b-from":ye()}],"mask-image-b-to-pos":[{"mask-b-to":ye()}],"mask-image-b-from-color":[{"mask-b-from":V()}],"mask-image-b-to-color":[{"mask-b-to":V()}],"mask-image-l-from-pos":[{"mask-l-from":ye()}],"mask-image-l-to-pos":[{"mask-l-to":ye()}],"mask-image-l-from-color":[{"mask-l-from":V()}],"mask-image-l-to-color":[{"mask-l-to":V()}],"mask-image-x-from-pos":[{"mask-x-from":ye()}],"mask-image-x-to-pos":[{"mask-x-to":ye()}],"mask-image-x-from-color":[{"mask-x-from":V()}],"mask-image-x-to-color":[{"mask-x-to":V()}],"mask-image-y-from-pos":[{"mask-y-from":ye()}],"mask-image-y-to-pos":[{"mask-y-to":ye()}],"mask-image-y-from-color":[{"mask-y-from":V()}],"mask-image-y-to-color":[{"mask-y-to":V()}],"mask-image-radial":[{"mask-radial":[we,xe]}],"mask-image-radial-from-pos":[{"mask-radial-from":ye()}],"mask-image-radial-to-pos":[{"mask-radial-to":ye()}],"mask-image-radial-from-color":[{"mask-radial-from":V()}],"mask-image-radial-to-color":[{"mask-radial-to":V()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":H()}],"mask-image-conic-pos":[{"mask-conic":[Ye]}],"mask-image-conic-from-pos":[{"mask-conic-from":ye()}],"mask-image-conic-to-pos":[{"mask-conic-to":ye()}],"mask-image-conic-from-color":[{"mask-conic-from":V()}],"mask-image-conic-to-color":[{"mask-conic-to":V()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ve()}],"mask-repeat":[{mask:O()}],"mask-size":[{mask:F()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",we,xe]}],filter:[{filter:["","none",we,xe]}],blur:[{blur:Le()}],brightness:[{brightness:[Ye,we,xe]}],contrast:[{contrast:[Ye,we,xe]}],"drop-shadow":[{"drop-shadow":["","none",S,Ws,Js]}],"drop-shadow-color":[{"drop-shadow":V()}],grayscale:[{grayscale:["",Ye,we,xe]}],"hue-rotate":[{"hue-rotate":[Ye,we,xe]}],invert:[{invert:["",Ye,we,xe]}],saturate:[{saturate:[Ye,we,xe]}],sepia:[{sepia:["",Ye,we,xe]}],"backdrop-filter":[{"backdrop-filter":["","none",we,xe]}],"backdrop-blur":[{"backdrop-blur":Le()}],"backdrop-brightness":[{"backdrop-brightness":[Ye,we,xe]}],"backdrop-contrast":[{"backdrop-contrast":[Ye,we,xe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ye,we,xe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ye,we,xe]}],"backdrop-invert":[{"backdrop-invert":["",Ye,we,xe]}],"backdrop-opacity":[{"backdrop-opacity":[Ye,we,xe]}],"backdrop-saturate":[{"backdrop-saturate":[Ye,we,xe]}],"backdrop-sepia":[{"backdrop-sepia":["",Ye,we,xe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":Z()}],"border-spacing-x":[{"border-spacing-x":Z()}],"border-spacing-y":[{"border-spacing-y":Z()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",we,xe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ye,"initial",we,xe]}],ease:[{ease:["linear","initial",N,we,xe]}],delay:[{delay:[Ye,we,xe]}],animate:[{animate:["none",z,we,xe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[_,we,xe]}],"perspective-origin":[{"perspective-origin":D()}],rotate:[{rotate:qe()}],"rotate-x":[{"rotate-x":qe()}],"rotate-y":[{"rotate-y":qe()}],"rotate-z":[{"rotate-z":qe()}],scale:[{scale:Je()}],"scale-x":[{"scale-x":Je()}],"scale-y":[{"scale-y":Je()}],"scale-z":[{"scale-z":Je()}],"scale-3d":["scale-3d"],skew:[{skew:At()}],"skew-x":[{"skew-x":At()}],"skew-y":[{"skew-y":At()}],transform:[{transform:[we,xe,"","none","gpu","cpu"]}],"transform-origin":[{origin:D()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ze()}],"translate-x":[{"translate-x":Ze()}],"translate-y":[{"translate-y":Ze()}],"translate-z":[{"translate-z":Ze()}],"translate-none":["translate-none"],accent:[{accent:V()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:V()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",we,xe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":Z()}],"scroll-mx":[{"scroll-mx":Z()}],"scroll-my":[{"scroll-my":Z()}],"scroll-ms":[{"scroll-ms":Z()}],"scroll-me":[{"scroll-me":Z()}],"scroll-mt":[{"scroll-mt":Z()}],"scroll-mr":[{"scroll-mr":Z()}],"scroll-mb":[{"scroll-mb":Z()}],"scroll-ml":[{"scroll-ml":Z()}],"scroll-p":[{"scroll-p":Z()}],"scroll-px":[{"scroll-px":Z()}],"scroll-py":[{"scroll-py":Z()}],"scroll-ps":[{"scroll-ps":Z()}],"scroll-pe":[{"scroll-pe":Z()}],"scroll-pt":[{"scroll-pt":Z()}],"scroll-pr":[{"scroll-pr":Z()}],"scroll-pb":[{"scroll-pb":Z()}],"scroll-pl":[{"scroll-pl":Z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",we,xe]}],fill:[{fill:["none",...V()]}],"stroke-w":[{stroke:[Ye,oo,Hr,vd]}],stroke:[{stroke:["none",...V()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},fR=FN(cR);function ft(...n){return fR(pb(n))}const Gr=ab,dR=rb,Nb=y.forwardRef(({className:n,...a},l)=>g.jsx(gh,{ref:l,className:ft("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",n),...a}));Nb.displayName=gh.displayName;const or=y.forwardRef(({className:n,children:a,...l},i)=>g.jsxs(dR,{children:[g.jsx(Nb,{}),g.jsxs(vh,{ref:i,className:ft("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-300 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg animate-scale-in",n),...l,children:[a,g.jsxs(eN,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground transition-all-ease hover:scale-110",children:[g.jsx(Xl,{className:"h-4 w-4"}),g.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));or.displayName=vh.displayName;const sr=({className:n,...a})=>g.jsx("div",{className:ft("flex flex-col space-y-1.5 text-center sm:text-left",n),...a});sr.displayName="DialogHeader";const Xr=({className:n,...a})=>g.jsx("div",{className:ft("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",n),...a});Xr.displayName="DialogFooter";const ur=y.forwardRef(({className:n,...a},l)=>g.jsx(lb,{ref:l,className:ft("text-lg font-semibold leading-none tracking-tight",n),...a}));ur.displayName=lb.displayName;const Lu=y.forwardRef(({className:n,...a},l)=>g.jsx(ib,{ref:l,className:ft("text-sm text-muted-foreground",n),...a}));Lu.displayName=ib.displayName;const Ey=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,_y=pb,bh=(n,a)=>l=>{var i;if(a?.variants==null)return _y(n,l?.class,l?.className);const{variants:s,defaultVariants:u}=a,f=Object.keys(s).map(m=>{const v=l?.[m],b=u?.[m];if(v===null)return null;const w=Ey(v)||Ey(b);return s[m][w]}),d=l&&Object.entries(l).reduce((m,v)=>{let[b,w]=v;return w===void 0||(m[b]=w),m},{}),p=a==null||(i=a.compoundVariants)===null||i===void 0?void 0:i.reduce((m,v)=>{let{class:b,className:w,...S}=v;return Object.entries(S).every(C=>{let[_,j]=C;return Array.isArray(j)?j.includes({...u,...d}[_]):{...u,...d}[_]===j})?[...m,b,w]:m},[]);return _y(n,f,p,l?.class,l?.className)},hR=bh("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"border border-destructive/50 text-destructive hover:bg-destructive hover:text-destructive-foreground",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Ae=y.forwardRef(({className:n,variant:a,size:l,asChild:i=!1,...s},u)=>{const f=i?M_:"button";return g.jsx(f,{className:ft(hR({variant:a,size:l,className:n})),ref:u,...s})});Ae.displayName="Button";const ht=y.forwardRef(({className:n,type:a,...l},i)=>g.jsx("input",{type:a,className:ft("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",n),ref:i,...l}));ht.displayName="Input";var mR="Label",Rb=y.forwardRef((n,a)=>g.jsx(pt.label,{...n,ref:a,onMouseDown:l=>{l.target.closest("button, input, select, textarea")||(n.onMouseDown?.(l),!l.defaultPrevented&&l.detail>1&&l.preventDefault())}}));Rb.displayName=mR;var jb=Rb;const pR=bh("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ie=y.forwardRef(({className:n,...a},l)=>g.jsx(jb,{ref:l,className:ft(pR(),n),...a}));Ie.displayName=jb.displayName;function gR(n){const a=y.useRef({value:n,previous:n});return y.useMemo(()=>(a.current.value!==n&&(a.current.previous=a.current.value,a.current.value=n),a.current.previous),[n])}function Ob(n){const[a,l]=y.useState(void 0);return ir(()=>{if(n){l({width:n.offsetWidth,height:n.offsetHeight});const i=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const u=s[0];let f,d;if("borderBoxSize"in u){const p=u.borderBoxSize,m=Array.isArray(p)?p[0]:p;f=m.inlineSize,d=m.blockSize}else f=n.offsetWidth,d=n.offsetHeight;l({width:f,height:d})});return i.observe(n,{box:"border-box"}),()=>i.unobserve(n)}else l(void 0)},[n]),a}var ku="Switch",[vR,ET]=Au(ku),[yR,bR]=vR(ku),Ab=y.forwardRef((n,a)=>{const{__scopeSwitch:l,name:i,checked:s,defaultChecked:u,required:f,disabled:d,value:p="on",onCheckedChange:m,form:v,...b}=n,[w,S]=y.useState(null),C=vn(a,k=>S(k)),_=y.useRef(!1),j=w?v||!!w.closest("form"):!0,[N,z]=sh({prop:s,defaultProp:u??!1,onChange:m,caller:ku});return g.jsxs(yR,{scope:l,checked:N,disabled:d,children:[g.jsx(pt.button,{type:"button",role:"switch","aria-checked":N,"aria-required":f,"data-state":Lb(N),"data-disabled":d?"":void 0,disabled:d,value:p,...b,ref:C,onClick:nn(n.onClick,k=>{z(H=>!H),j&&(_.current=k.isPropagationStopped(),_.current||k.stopPropagation())})}),j&&g.jsx(Db,{control:w,bubbles:!_.current,name:i,value:p,checked:N,required:f,disabled:d,form:v,style:{transform:"translateX(-100%)"}})]})});Ab.displayName=ku;var Tb="SwitchThumb",Mb=y.forwardRef((n,a)=>{const{__scopeSwitch:l,...i}=n,s=bR(Tb,l);return g.jsx(pt.span,{"data-state":Lb(s.checked),"data-disabled":s.disabled?"":void 0,...i,ref:a})});Mb.displayName=Tb;var xR="SwitchBubbleInput",Db=y.forwardRef(({__scopeSwitch:n,control:a,checked:l,bubbles:i=!0,...s},u)=>{const f=y.useRef(null),d=vn(f,u),p=gR(l),m=Ob(a);return y.useEffect(()=>{const v=f.current;if(!v)return;const b=window.HTMLInputElement.prototype,S=Object.getOwnPropertyDescriptor(b,"checked").set;if(p!==l&&S){const C=new Event("click",{bubbles:i});S.call(v,l),v.dispatchEvent(C)}},[p,l,i]),g.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:l,...s,tabIndex:-1,ref:d,style:{...s.style,...m,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Db.displayName=xR;function Lb(n){return n?"checked":"unchecked"}var kb=Ab,wR=Mb;const Yd=y.forwardRef(({className:n,...a},l)=>g.jsx(kb,{className:ft("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-all-ease focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",n),...a,ref:l,children:g.jsx(wR,{className:ft("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0 transition-all-ease")})}));Yd.displayName=kb.displayName;var Cy=1,SR=.9,ER=.8,_R=.17,yd=.1,bd=.999,CR=.9999,NR=.99,RR=/[\\\/_+.#"@\[\(\{&]/,jR=/[\\\/_+.#"@\[\(\{&]/g,OR=/[\s-]/,zb=/[\s-]/g;function qd(n,a,l,i,s,u,f){if(u===a.length)return s===n.length?Cy:NR;var d=`${s},${u}`;if(f[d]!==void 0)return f[d];for(var p=i.charAt(u),m=l.indexOf(p,s),v=0,b,w,S,C;m>=0;)b=qd(n,a,l,i,m+1,u+1,f),b>v&&(m===s?b*=Cy:RR.test(n.charAt(m-1))?(b*=ER,S=n.slice(s,m-1).match(jR),S&&s>0&&(b*=Math.pow(bd,S.length))):OR.test(n.charAt(m-1))?(b*=SR,C=n.slice(s,m-1).match(zb),C&&s>0&&(b*=Math.pow(bd,C.length))):(b*=_R,s>0&&(b*=Math.pow(bd,m-s))),n.charAt(m)!==a.charAt(u)&&(b*=CR)),(b<yd&&l.charAt(m-1)===i.charAt(u+1)||i.charAt(u+1)===i.charAt(u)&&l.charAt(m-1)!==i.charAt(u))&&(w=qd(n,a,l,i,m+1,u+2,f),w*yd>b&&(b=w*yd)),b>v&&(v=b),m=l.indexOf(p,m+1);return f[d]=v,v}function Ny(n){return n.toLowerCase().replace(zb," ")}function AR(n,a,l){return n=l&&l.length>0?`${n+" "+l.join(" ")}`:n,qd(n,a,Ny(n),Ny(a),0,0,{})}var so='[cmdk-group=""]',xd='[cmdk-group-items=""]',TR='[cmdk-group-heading=""]',Ub='[cmdk-item=""]',Ry=`${Ub}:not([aria-disabled="true"])`,Fd="cmdk-item-select",Yl="data-value",MR=(n,a,l)=>AR(n,a,l),Pb=y.createContext(void 0),Co=()=>y.useContext(Pb),Hb=y.createContext(void 0),xh=()=>y.useContext(Hb),Bb=y.createContext(void 0),$b=y.forwardRef((n,a)=>{let l=ql(()=>{var U,K;return{search:"",value:(K=(U=n.value)!=null?U:n.defaultValue)!=null?K:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),i=ql(()=>new Set),s=ql(()=>new Map),u=ql(()=>new Map),f=ql(()=>new Set),d=Vb(n),{label:p,children:m,value:v,onValueChange:b,filter:w,shouldFilter:S,loop:C,disablePointerSelection:_=!1,vimBindings:j=!0,...N}=n,z=Wn(),k=Wn(),H=Wn(),D=y.useRef(null),R=YR();Qr(()=>{if(v!==void 0){let U=v.trim();l.current.value=U,B.emit()}},[v]),Qr(()=>{R(6,te)},[]);let B=y.useMemo(()=>({subscribe:U=>(f.current.add(U),()=>f.current.delete(U)),snapshot:()=>l.current,setState:(U,K,ae)=>{var de,ge,ye,Le;if(!Object.is(l.current[U],K)){if(l.current[U]=K,U==="search")J(),oe(),R(1,le);else if(U==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let qe=document.getElementById(H);qe?qe.focus():(de=document.getElementById(z))==null||de.focus()}if(R(7,()=>{var qe;l.current.selectedItemId=(qe=W())==null?void 0:qe.id,B.emit()}),ae||R(5,te),((ge=d.current)==null?void 0:ge.value)!==void 0){let qe=K??"";(Le=(ye=d.current).onValueChange)==null||Le.call(ye,qe);return}}B.emit()}},emit:()=>{f.current.forEach(U=>U())}}),[]),Z=y.useMemo(()=>({value:(U,K,ae)=>{var de;K!==((de=u.current.get(U))==null?void 0:de.value)&&(u.current.set(U,{value:K,keywords:ae}),l.current.filtered.items.set(U,ne(K,ae)),R(2,()=>{oe(),B.emit()}))},item:(U,K)=>(i.current.add(U),K&&(s.current.has(K)?s.current.get(K).add(U):s.current.set(K,new Set([U]))),R(3,()=>{J(),oe(),l.current.value||le(),B.emit()}),()=>{u.current.delete(U),i.current.delete(U),l.current.filtered.items.delete(U);let ae=W();R(4,()=>{J(),ae?.getAttribute("id")===U&&le(),B.emit()})}),group:U=>(s.current.has(U)||s.current.set(U,new Set),()=>{u.current.delete(U),s.current.delete(U)}),filter:()=>d.current.shouldFilter,label:p||n["aria-label"],getDisablePointerSelection:()=>d.current.disablePointerSelection,listId:z,inputId:H,labelId:k,listInnerRef:D}),[]);function ne(U,K){var ae,de;let ge=(de=(ae=d.current)==null?void 0:ae.filter)!=null?de:MR;return U?ge(U,l.current.search,K):0}function oe(){if(!l.current.search||d.current.shouldFilter===!1)return;let U=l.current.filtered.items,K=[];l.current.filtered.groups.forEach(de=>{let ge=s.current.get(de),ye=0;ge.forEach(Le=>{let qe=U.get(Le);ye=Math.max(qe,ye)}),K.push([de,ye])});let ae=D.current;ue().sort((de,ge)=>{var ye,Le;let qe=de.getAttribute("id"),Je=ge.getAttribute("id");return((ye=U.get(Je))!=null?ye:0)-((Le=U.get(qe))!=null?Le:0)}).forEach(de=>{let ge=de.closest(xd);ge?ge.appendChild(de.parentElement===ge?de:de.closest(`${xd} > *`)):ae.appendChild(de.parentElement===ae?de:de.closest(`${xd} > *`))}),K.sort((de,ge)=>ge[1]-de[1]).forEach(de=>{var ge;let ye=(ge=D.current)==null?void 0:ge.querySelector(`${so}[${Yl}="${encodeURIComponent(de[0])}"]`);ye?.parentElement.appendChild(ye)})}function le(){let U=ue().find(ae=>ae.getAttribute("aria-disabled")!=="true"),K=U?.getAttribute(Yl);B.setState("value",K||void 0)}function J(){var U,K,ae,de;if(!l.current.search||d.current.shouldFilter===!1){l.current.filtered.count=i.current.size;return}l.current.filtered.groups=new Set;let ge=0;for(let ye of i.current){let Le=(K=(U=u.current.get(ye))==null?void 0:U.value)!=null?K:"",qe=(de=(ae=u.current.get(ye))==null?void 0:ae.keywords)!=null?de:[],Je=ne(Le,qe);l.current.filtered.items.set(ye,Je),Je>0&&ge++}for(let[ye,Le]of s.current)for(let qe of Le)if(l.current.filtered.items.get(qe)>0){l.current.filtered.groups.add(ye);break}l.current.filtered.count=ge}function te(){var U,K,ae;let de=W();de&&(((U=de.parentElement)==null?void 0:U.firstChild)===de&&((ae=(K=de.closest(so))==null?void 0:K.querySelector(TR))==null||ae.scrollIntoView({block:"nearest"})),de.scrollIntoView({block:"nearest"}))}function W(){var U;return(U=D.current)==null?void 0:U.querySelector(`${Ub}[aria-selected="true"]`)}function ue(){var U;return Array.from(((U=D.current)==null?void 0:U.querySelectorAll(Ry))||[])}function A(U){let K=ue()[U];K&&B.setState("value",K.getAttribute(Yl))}function Q(U){var K;let ae=W(),de=ue(),ge=de.findIndex(Le=>Le===ae),ye=de[ge+U];(K=d.current)!=null&&K.loop&&(ye=ge+U<0?de[de.length-1]:ge+U===de.length?de[0]:de[ge+U]),ye&&B.setState("value",ye.getAttribute(Yl))}function V(U){let K=W(),ae=K?.closest(so),de;for(;ae&&!de;)ae=U>0?$R(ae,so):VR(ae,so),de=ae?.querySelector(Ry);de?B.setState("value",de.getAttribute(Yl)):Q(U)}let ve=()=>A(ue().length-1),O=U=>{U.preventDefault(),U.metaKey?ve():U.altKey?V(1):Q(1)},F=U=>{U.preventDefault(),U.metaKey?A(0):U.altKey?V(-1):Q(-1)};return y.createElement(pt.div,{ref:a,tabIndex:-1,...N,"cmdk-root":"",onKeyDown:U=>{var K;(K=N.onKeyDown)==null||K.call(N,U);let ae=U.nativeEvent.isComposing||U.keyCode===229;if(!(U.defaultPrevented||ae))switch(U.key){case"n":case"j":{j&&U.ctrlKey&&O(U);break}case"ArrowDown":{O(U);break}case"p":case"k":{j&&U.ctrlKey&&F(U);break}case"ArrowUp":{F(U);break}case"Home":{U.preventDefault(),A(0);break}case"End":{U.preventDefault(),ve();break}case"Enter":{U.preventDefault();let de=W();if(de){let ge=new Event(Fd);de.dispatchEvent(ge)}}}}},y.createElement("label",{"cmdk-label":"",htmlFor:Z.inputId,id:Z.labelId,style:FR},p),zu(n,U=>y.createElement(Hb.Provider,{value:B},y.createElement(Pb.Provider,{value:Z},U))))}),DR=y.forwardRef((n,a)=>{var l,i;let s=Wn(),u=y.useRef(null),f=y.useContext(Bb),d=Co(),p=Vb(n),m=(i=(l=p.current)==null?void 0:l.forceMount)!=null?i:f?.forceMount;Qr(()=>{if(!m)return d.item(s,f?.id)},[m]);let v=Yb(s,u,[n.value,n.children,u],n.keywords),b=xh(),w=cr(R=>R.value&&R.value===v.current),S=cr(R=>m||d.filter()===!1?!0:R.search?R.filtered.items.get(s)>0:!0);y.useEffect(()=>{let R=u.current;if(!(!R||n.disabled))return R.addEventListener(Fd,C),()=>R.removeEventListener(Fd,C)},[S,n.onSelect,n.disabled]);function C(){var R,B;_(),(B=(R=p.current).onSelect)==null||B.call(R,v.current)}function _(){b.setState("value",v.current,!0)}if(!S)return null;let{disabled:j,value:N,onSelect:z,forceMount:k,keywords:H,...D}=n;return y.createElement(pt.div,{ref:qr(u,a),...D,id:s,"cmdk-item":"",role:"option","aria-disabled":!!j,"aria-selected":!!w,"data-disabled":!!j,"data-selected":!!w,onPointerMove:j||d.getDisablePointerSelection()?void 0:_,onClick:j?void 0:C},n.children)}),LR=y.forwardRef((n,a)=>{let{heading:l,children:i,forceMount:s,...u}=n,f=Wn(),d=y.useRef(null),p=y.useRef(null),m=Wn(),v=Co(),b=cr(S=>s||v.filter()===!1?!0:S.search?S.filtered.groups.has(f):!0);Qr(()=>v.group(f),[]),Yb(f,d,[n.value,n.heading,p]);let w=y.useMemo(()=>({id:f,forceMount:s}),[s]);return y.createElement(pt.div,{ref:qr(d,a),...u,"cmdk-group":"",role:"presentation",hidden:b?void 0:!0},l&&y.createElement("div",{ref:p,"cmdk-group-heading":"","aria-hidden":!0,id:m},l),zu(n,S=>y.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":l?m:void 0},y.createElement(Bb.Provider,{value:w},S))))}),kR=y.forwardRef((n,a)=>{let{alwaysRender:l,...i}=n,s=y.useRef(null),u=cr(f=>!f.search);return!l&&!u?null:y.createElement(pt.div,{ref:qr(s,a),...i,"cmdk-separator":"",role:"separator"})}),zR=y.forwardRef((n,a)=>{let{onValueChange:l,...i}=n,s=n.value!=null,u=xh(),f=cr(m=>m.search),d=cr(m=>m.selectedItemId),p=Co();return y.useEffect(()=>{n.value!=null&&u.setState("search",n.value)},[n.value]),y.createElement(pt.input,{ref:a,...i,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":p.listId,"aria-labelledby":p.labelId,"aria-activedescendant":d,id:p.inputId,type:"text",value:s?n.value:f,onChange:m=>{s||u.setState("search",m.target.value),l?.(m.target.value)}})}),UR=y.forwardRef((n,a)=>{let{children:l,label:i="Suggestions",...s}=n,u=y.useRef(null),f=y.useRef(null),d=cr(m=>m.selectedItemId),p=Co();return y.useEffect(()=>{if(f.current&&u.current){let m=f.current,v=u.current,b,w=new ResizeObserver(()=>{b=requestAnimationFrame(()=>{let S=m.offsetHeight;v.style.setProperty("--cmdk-list-height",S.toFixed(1)+"px")})});return w.observe(m),()=>{cancelAnimationFrame(b),w.unobserve(m)}}},[]),y.createElement(pt.div,{ref:qr(u,a),...s,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":d,"aria-label":i,id:p.listId},zu(n,m=>y.createElement("div",{ref:qr(f,p.listInnerRef),"cmdk-list-sizer":""},m)))}),PR=y.forwardRef((n,a)=>{let{open:l,onOpenChange:i,overlayClassName:s,contentClassName:u,container:f,...d}=n;return y.createElement(ab,{open:l,onOpenChange:i},y.createElement(rb,{container:f},y.createElement(gh,{"cmdk-overlay":"",className:s}),y.createElement(vh,{"aria-label":n.label,"cmdk-dialog":"",className:u},y.createElement($b,{ref:a,...d}))))}),HR=y.forwardRef((n,a)=>cr(l=>l.filtered.count===0)?y.createElement(pt.div,{ref:a,...n,"cmdk-empty":"",role:"presentation"}):null),BR=y.forwardRef((n,a)=>{let{progress:l,children:i,label:s="Loading...",...u}=n;return y.createElement(pt.div,{ref:a,...u,"cmdk-loading":"",role:"progressbar","aria-valuenow":l,"aria-valuemin":0,"aria-valuemax":100,"aria-label":s},zu(n,f=>y.createElement("div",{"aria-hidden":!0},f)))}),ai=Object.assign($b,{List:UR,Item:DR,Input:zR,Group:LR,Separator:kR,Dialog:PR,Empty:HR,Loading:BR});function $R(n,a){let l=n.nextElementSibling;for(;l;){if(l.matches(a))return l;l=l.nextElementSibling}}function VR(n,a){let l=n.previousElementSibling;for(;l;){if(l.matches(a))return l;l=l.previousElementSibling}}function Vb(n){let a=y.useRef(n);return Qr(()=>{a.current=n}),a}var Qr=typeof window>"u"?y.useEffect:y.useLayoutEffect;function ql(n){let a=y.useRef();return a.current===void 0&&(a.current=n()),a}function cr(n){let a=xh(),l=()=>n(a.snapshot());return y.useSyncExternalStore(a.subscribe,l,l)}function Yb(n,a,l,i=[]){let s=y.useRef(),u=Co();return Qr(()=>{var f;let d=(()=>{var m;for(let v of l){if(typeof v=="string")return v.trim();if(typeof v=="object"&&"current"in v)return v.current?(m=v.current.textContent)==null?void 0:m.trim():s.current}})(),p=i.map(m=>m.trim());u.value(n,d,p),(f=a.current)==null||f.setAttribute(Yl,d),s.current=d}),s}var YR=()=>{let[n,a]=y.useState(),l=ql(()=>new Map);return Qr(()=>{l.current.forEach(i=>i()),l.current=new Map},[n]),(i,s)=>{l.current.set(i,s),a({})}};function qR(n){let a=n.type;return typeof a=="function"?a(n.props):"render"in a?a.render(n.props):n}function zu({asChild:n,children:a},l){return n&&y.isValidElement(a)?y.cloneElement(qR(a),{ref:a.ref},l(a.props.children)):l(a)}var FR={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function qb({className:n,...a}){return g.jsx(ai,{"data-slot":"command",className:ft("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",n),...a})}function Fb({className:n,...a}){return g.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[g.jsx(hb,{className:"size-4 shrink-0 opacity-50"}),g.jsx(ai.Input,{"data-slot":"command-input",className:ft("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",n),...a})]})}function Kb({className:n,...a}){return g.jsx(ai.List,{"data-slot":"command-list",className:ft("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",n),...a})}function Gb({...n}){return g.jsx(ai.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...n})}function Xb({className:n,...a}){return g.jsx(ai.Group,{"data-slot":"command-group",className:ft("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",n),...a})}function Qb({className:n,...a}){return g.jsx(ai.Item,{"data-slot":"command-item",className:ft("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n),...a})}const KR=["top","right","bottom","left"],fr=Math.min,pn=Math.max,yu=Math.round,eu=Math.floor,ea=n=>({x:n,y:n}),GR={left:"right",right:"left",bottom:"top",top:"bottom"},XR={start:"end",end:"start"};function Kd(n,a,l){return pn(n,fr(a,l))}function Ea(n,a){return typeof n=="function"?n(a):n}function _a(n){return n.split("-")[0]}function ri(n){return n.split("-")[1]}function wh(n){return n==="x"?"y":"x"}function Sh(n){return n==="y"?"height":"width"}const QR=new Set(["top","bottom"]);function In(n){return QR.has(_a(n))?"y":"x"}function Eh(n){return wh(In(n))}function ZR(n,a,l){l===void 0&&(l=!1);const i=ri(n),s=Eh(n),u=Sh(s);let f=s==="x"?i===(l?"end":"start")?"right":"left":i==="start"?"bottom":"top";return a.reference[u]>a.floating[u]&&(f=bu(f)),[f,bu(f)]}function IR(n){const a=bu(n);return[Gd(n),a,Gd(a)]}function Gd(n){return n.replace(/start|end/g,a=>XR[a])}const jy=["left","right"],Oy=["right","left"],JR=["top","bottom"],WR=["bottom","top"];function ej(n,a,l){switch(n){case"top":case"bottom":return l?a?Oy:jy:a?jy:Oy;case"left":case"right":return a?JR:WR;default:return[]}}function tj(n,a,l,i){const s=ri(n);let u=ej(_a(n),l==="start",i);return s&&(u=u.map(f=>f+"-"+s),a&&(u=u.concat(u.map(Gd)))),u}function bu(n){return n.replace(/left|right|bottom|top/g,a=>GR[a])}function nj(n){return{top:0,right:0,bottom:0,left:0,...n}}function Zb(n){return typeof n!="number"?nj(n):{top:n,right:n,bottom:n,left:n}}function xu(n){const{x:a,y:l,width:i,height:s}=n;return{width:i,height:s,top:l,left:a,right:a+i,bottom:l+s,x:a,y:l}}function Ay(n,a,l){let{reference:i,floating:s}=n;const u=In(a),f=Eh(a),d=Sh(f),p=_a(a),m=u==="y",v=i.x+i.width/2-s.width/2,b=i.y+i.height/2-s.height/2,w=i[d]/2-s[d]/2;let S;switch(p){case"top":S={x:v,y:i.y-s.height};break;case"bottom":S={x:v,y:i.y+i.height};break;case"right":S={x:i.x+i.width,y:b};break;case"left":S={x:i.x-s.width,y:b};break;default:S={x:i.x,y:i.y}}switch(ri(a)){case"start":S[f]-=w*(l&&m?-1:1);break;case"end":S[f]+=w*(l&&m?-1:1);break}return S}const aj=async(n,a,l)=>{const{placement:i="bottom",strategy:s="absolute",middleware:u=[],platform:f}=l,d=u.filter(Boolean),p=await(f.isRTL==null?void 0:f.isRTL(a));let m=await f.getElementRects({reference:n,floating:a,strategy:s}),{x:v,y:b}=Ay(m,i,p),w=i,S={},C=0;for(let _=0;_<d.length;_++){const{name:j,fn:N}=d[_],{x:z,y:k,data:H,reset:D}=await N({x:v,y:b,initialPlacement:i,placement:w,strategy:s,middlewareData:S,rects:m,platform:f,elements:{reference:n,floating:a}});v=z??v,b=k??b,S={...S,[j]:{...S[j],...H}},D&&C<=50&&(C++,typeof D=="object"&&(D.placement&&(w=D.placement),D.rects&&(m=D.rects===!0?await f.getElementRects({reference:n,floating:a,strategy:s}):D.rects),{x:v,y:b}=Ay(m,w,p)),_=-1)}return{x:v,y:b,placement:w,strategy:s,middlewareData:S}};async function bo(n,a){var l;a===void 0&&(a={});const{x:i,y:s,platform:u,rects:f,elements:d,strategy:p}=n,{boundary:m="clippingAncestors",rootBoundary:v="viewport",elementContext:b="floating",altBoundary:w=!1,padding:S=0}=Ea(a,n),C=Zb(S),j=d[w?b==="floating"?"reference":"floating":b],N=xu(await u.getClippingRect({element:(l=await(u.isElement==null?void 0:u.isElement(j)))==null||l?j:j.contextElement||await(u.getDocumentElement==null?void 0:u.getDocumentElement(d.floating)),boundary:m,rootBoundary:v,strategy:p})),z=b==="floating"?{x:i,y:s,width:f.floating.width,height:f.floating.height}:f.reference,k=await(u.getOffsetParent==null?void 0:u.getOffsetParent(d.floating)),H=await(u.isElement==null?void 0:u.isElement(k))?await(u.getScale==null?void 0:u.getScale(k))||{x:1,y:1}:{x:1,y:1},D=xu(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:z,offsetParent:k,strategy:p}):z);return{top:(N.top-D.top+C.top)/H.y,bottom:(D.bottom-N.bottom+C.bottom)/H.y,left:(N.left-D.left+C.left)/H.x,right:(D.right-N.right+C.right)/H.x}}const rj=n=>({name:"arrow",options:n,async fn(a){const{x:l,y:i,placement:s,rects:u,platform:f,elements:d,middlewareData:p}=a,{element:m,padding:v=0}=Ea(n,a)||{};if(m==null)return{};const b=Zb(v),w={x:l,y:i},S=Eh(s),C=Sh(S),_=await f.getDimensions(m),j=S==="y",N=j?"top":"left",z=j?"bottom":"right",k=j?"clientHeight":"clientWidth",H=u.reference[C]+u.reference[S]-w[S]-u.floating[C],D=w[S]-u.reference[S],R=await(f.getOffsetParent==null?void 0:f.getOffsetParent(m));let B=R?R[k]:0;(!B||!await(f.isElement==null?void 0:f.isElement(R)))&&(B=d.floating[k]||u.floating[C]);const Z=H/2-D/2,ne=B/2-_[C]/2-1,oe=fr(b[N],ne),le=fr(b[z],ne),J=oe,te=B-_[C]-le,W=B/2-_[C]/2+Z,ue=Kd(J,W,te),A=!p.arrow&&ri(s)!=null&&W!==ue&&u.reference[C]/2-(W<J?oe:le)-_[C]/2<0,Q=A?W<J?W-J:W-te:0;return{[S]:w[S]+Q,data:{[S]:ue,centerOffset:W-ue-Q,...A&&{alignmentOffset:Q}},reset:A}}}),lj=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(a){var l,i;const{placement:s,middlewareData:u,rects:f,initialPlacement:d,platform:p,elements:m}=a,{mainAxis:v=!0,crossAxis:b=!0,fallbackPlacements:w,fallbackStrategy:S="bestFit",fallbackAxisSideDirection:C="none",flipAlignment:_=!0,...j}=Ea(n,a);if((l=u.arrow)!=null&&l.alignmentOffset)return{};const N=_a(s),z=In(d),k=_a(d)===d,H=await(p.isRTL==null?void 0:p.isRTL(m.floating)),D=w||(k||!_?[bu(d)]:IR(d)),R=C!=="none";!w&&R&&D.push(...tj(d,_,C,H));const B=[d,...D],Z=await bo(a,j),ne=[];let oe=((i=u.flip)==null?void 0:i.overflows)||[];if(v&&ne.push(Z[N]),b){const W=ZR(s,f,H);ne.push(Z[W[0]],Z[W[1]])}if(oe=[...oe,{placement:s,overflows:ne}],!ne.every(W=>W<=0)){var le,J;const W=(((le=u.flip)==null?void 0:le.index)||0)+1,ue=B[W];if(ue&&(!(b==="alignment"?z!==In(ue):!1)||oe.every(V=>V.overflows[0]>0&&In(V.placement)===z)))return{data:{index:W,overflows:oe},reset:{placement:ue}};let A=(J=oe.filter(Q=>Q.overflows[0]<=0).sort((Q,V)=>Q.overflows[1]-V.overflows[1])[0])==null?void 0:J.placement;if(!A)switch(S){case"bestFit":{var te;const Q=(te=oe.filter(V=>{if(R){const ve=In(V.placement);return ve===z||ve==="y"}return!0}).map(V=>[V.placement,V.overflows.filter(ve=>ve>0).reduce((ve,O)=>ve+O,0)]).sort((V,ve)=>V[1]-ve[1])[0])==null?void 0:te[0];Q&&(A=Q);break}case"initialPlacement":A=d;break}if(s!==A)return{reset:{placement:A}}}return{}}}};function Ty(n,a){return{top:n.top-a.height,right:n.right-a.width,bottom:n.bottom-a.height,left:n.left-a.width}}function My(n){return KR.some(a=>n[a]>=0)}const ij=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(a){const{rects:l}=a,{strategy:i="referenceHidden",...s}=Ea(n,a);switch(i){case"referenceHidden":{const u=await bo(a,{...s,elementContext:"reference"}),f=Ty(u,l.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:My(f)}}}case"escaped":{const u=await bo(a,{...s,altBoundary:!0}),f=Ty(u,l.floating);return{data:{escapedOffsets:f,escaped:My(f)}}}default:return{}}}}},Ib=new Set(["left","top"]);async function oj(n,a){const{placement:l,platform:i,elements:s}=n,u=await(i.isRTL==null?void 0:i.isRTL(s.floating)),f=_a(l),d=ri(l),p=In(l)==="y",m=Ib.has(f)?-1:1,v=u&&p?-1:1,b=Ea(a,n);let{mainAxis:w,crossAxis:S,alignmentAxis:C}=typeof b=="number"?{mainAxis:b,crossAxis:0,alignmentAxis:null}:{mainAxis:b.mainAxis||0,crossAxis:b.crossAxis||0,alignmentAxis:b.alignmentAxis};return d&&typeof C=="number"&&(S=d==="end"?C*-1:C),p?{x:S*v,y:w*m}:{x:w*m,y:S*v}}const sj=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(a){var l,i;const{x:s,y:u,placement:f,middlewareData:d}=a,p=await oj(a,n);return f===((l=d.offset)==null?void 0:l.placement)&&(i=d.arrow)!=null&&i.alignmentOffset?{}:{x:s+p.x,y:u+p.y,data:{...p,placement:f}}}}},uj=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(a){const{x:l,y:i,placement:s}=a,{mainAxis:u=!0,crossAxis:f=!1,limiter:d={fn:j=>{let{x:N,y:z}=j;return{x:N,y:z}}},...p}=Ea(n,a),m={x:l,y:i},v=await bo(a,p),b=In(_a(s)),w=wh(b);let S=m[w],C=m[b];if(u){const j=w==="y"?"top":"left",N=w==="y"?"bottom":"right",z=S+v[j],k=S-v[N];S=Kd(z,S,k)}if(f){const j=b==="y"?"top":"left",N=b==="y"?"bottom":"right",z=C+v[j],k=C-v[N];C=Kd(z,C,k)}const _=d.fn({...a,[w]:S,[b]:C});return{..._,data:{x:_.x-l,y:_.y-i,enabled:{[w]:u,[b]:f}}}}}},cj=function(n){return n===void 0&&(n={}),{options:n,fn(a){const{x:l,y:i,placement:s,rects:u,middlewareData:f}=a,{offset:d=0,mainAxis:p=!0,crossAxis:m=!0}=Ea(n,a),v={x:l,y:i},b=In(s),w=wh(b);let S=v[w],C=v[b];const _=Ea(d,a),j=typeof _=="number"?{mainAxis:_,crossAxis:0}:{mainAxis:0,crossAxis:0,..._};if(p){const k=w==="y"?"height":"width",H=u.reference[w]-u.floating[k]+j.mainAxis,D=u.reference[w]+u.reference[k]-j.mainAxis;S<H?S=H:S>D&&(S=D)}if(m){var N,z;const k=w==="y"?"width":"height",H=Ib.has(_a(s)),D=u.reference[b]-u.floating[k]+(H&&((N=f.offset)==null?void 0:N[b])||0)+(H?0:j.crossAxis),R=u.reference[b]+u.reference[k]+(H?0:((z=f.offset)==null?void 0:z[b])||0)-(H?j.crossAxis:0);C<D?C=D:C>R&&(C=R)}return{[w]:S,[b]:C}}}},fj=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(a){var l,i;const{placement:s,rects:u,platform:f,elements:d}=a,{apply:p=()=>{},...m}=Ea(n,a),v=await bo(a,m),b=_a(s),w=ri(s),S=In(s)==="y",{width:C,height:_}=u.floating;let j,N;b==="top"||b==="bottom"?(j=b,N=w===(await(f.isRTL==null?void 0:f.isRTL(d.floating))?"start":"end")?"left":"right"):(N=b,j=w==="end"?"top":"bottom");const z=_-v.top-v.bottom,k=C-v.left-v.right,H=fr(_-v[j],z),D=fr(C-v[N],k),R=!a.middlewareData.shift;let B=H,Z=D;if((l=a.middlewareData.shift)!=null&&l.enabled.x&&(Z=k),(i=a.middlewareData.shift)!=null&&i.enabled.y&&(B=z),R&&!w){const oe=pn(v.left,0),le=pn(v.right,0),J=pn(v.top,0),te=pn(v.bottom,0);S?Z=C-2*(oe!==0||le!==0?oe+le:pn(v.left,v.right)):B=_-2*(J!==0||te!==0?J+te:pn(v.top,v.bottom))}await p({...a,availableWidth:Z,availableHeight:B});const ne=await f.getDimensions(d.floating);return C!==ne.width||_!==ne.height?{reset:{rects:!0}}:{}}}};function Uu(){return typeof window<"u"}function li(n){return Jb(n)?(n.nodeName||"").toLowerCase():"#document"}function gn(n){var a;return(n==null||(a=n.ownerDocument)==null?void 0:a.defaultView)||window}function aa(n){var a;return(a=(Jb(n)?n.ownerDocument:n.document)||window.document)==null?void 0:a.documentElement}function Jb(n){return Uu()?n instanceof Node||n instanceof gn(n).Node:!1}function zn(n){return Uu()?n instanceof Element||n instanceof gn(n).Element:!1}function ta(n){return Uu()?n instanceof HTMLElement||n instanceof gn(n).HTMLElement:!1}function Dy(n){return!Uu()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof gn(n).ShadowRoot}const dj=new Set(["inline","contents"]);function No(n){const{overflow:a,overflowX:l,overflowY:i,display:s}=Un(n);return/auto|scroll|overlay|hidden|clip/.test(a+i+l)&&!dj.has(s)}const hj=new Set(["table","td","th"]);function mj(n){return hj.has(li(n))}const pj=[":popover-open",":modal"];function Pu(n){return pj.some(a=>{try{return n.matches(a)}catch{return!1}})}const gj=["transform","translate","scale","rotate","perspective"],vj=["transform","translate","scale","rotate","perspective","filter"],yj=["paint","layout","strict","content"];function _h(n){const a=Ch(),l=zn(n)?Un(n):n;return gj.some(i=>l[i]?l[i]!=="none":!1)||(l.containerType?l.containerType!=="normal":!1)||!a&&(l.backdropFilter?l.backdropFilter!=="none":!1)||!a&&(l.filter?l.filter!=="none":!1)||vj.some(i=>(l.willChange||"").includes(i))||yj.some(i=>(l.contain||"").includes(i))}function bj(n){let a=dr(n);for(;ta(a)&&!Il(a);){if(_h(a))return a;if(Pu(a))return null;a=dr(a)}return null}function Ch(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const xj=new Set(["html","body","#document"]);function Il(n){return xj.has(li(n))}function Un(n){return gn(n).getComputedStyle(n)}function Hu(n){return zn(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function dr(n){if(li(n)==="html")return n;const a=n.assignedSlot||n.parentNode||Dy(n)&&n.host||aa(n);return Dy(a)?a.host:a}function Wb(n){const a=dr(n);return Il(a)?n.ownerDocument?n.ownerDocument.body:n.body:ta(a)&&No(a)?a:Wb(a)}function xo(n,a,l){var i;a===void 0&&(a=[]),l===void 0&&(l=!0);const s=Wb(n),u=s===((i=n.ownerDocument)==null?void 0:i.body),f=gn(s);if(u){const d=Xd(f);return a.concat(f,f.visualViewport||[],No(s)?s:[],d&&l?xo(d):[])}return a.concat(s,xo(s,[],l))}function Xd(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function ex(n){const a=Un(n);let l=parseFloat(a.width)||0,i=parseFloat(a.height)||0;const s=ta(n),u=s?n.offsetWidth:l,f=s?n.offsetHeight:i,d=yu(l)!==u||yu(i)!==f;return d&&(l=u,i=f),{width:l,height:i,$:d}}function Nh(n){return zn(n)?n:n.contextElement}function Ql(n){const a=Nh(n);if(!ta(a))return ea(1);const l=a.getBoundingClientRect(),{width:i,height:s,$:u}=ex(a);let f=(u?yu(l.width):l.width)/i,d=(u?yu(l.height):l.height)/s;return(!f||!Number.isFinite(f))&&(f=1),(!d||!Number.isFinite(d))&&(d=1),{x:f,y:d}}const wj=ea(0);function tx(n){const a=gn(n);return!Ch()||!a.visualViewport?wj:{x:a.visualViewport.offsetLeft,y:a.visualViewport.offsetTop}}function Sj(n,a,l){return a===void 0&&(a=!1),!l||a&&l!==gn(n)?!1:a}function Zr(n,a,l,i){a===void 0&&(a=!1),l===void 0&&(l=!1);const s=n.getBoundingClientRect(),u=Nh(n);let f=ea(1);a&&(i?zn(i)&&(f=Ql(i)):f=Ql(n));const d=Sj(u,l,i)?tx(u):ea(0);let p=(s.left+d.x)/f.x,m=(s.top+d.y)/f.y,v=s.width/f.x,b=s.height/f.y;if(u){const w=gn(u),S=i&&zn(i)?gn(i):i;let C=w,_=Xd(C);for(;_&&i&&S!==C;){const j=Ql(_),N=_.getBoundingClientRect(),z=Un(_),k=N.left+(_.clientLeft+parseFloat(z.paddingLeft))*j.x,H=N.top+(_.clientTop+parseFloat(z.paddingTop))*j.y;p*=j.x,m*=j.y,v*=j.x,b*=j.y,p+=k,m+=H,C=gn(_),_=Xd(C)}}return xu({width:v,height:b,x:p,y:m})}function Rh(n,a){const l=Hu(n).scrollLeft;return a?a.left+l:Zr(aa(n)).left+l}function nx(n,a,l){l===void 0&&(l=!1);const i=n.getBoundingClientRect(),s=i.left+a.scrollLeft-(l?0:Rh(n,i)),u=i.top+a.scrollTop;return{x:s,y:u}}function Ej(n){let{elements:a,rect:l,offsetParent:i,strategy:s}=n;const u=s==="fixed",f=aa(i),d=a?Pu(a.floating):!1;if(i===f||d&&u)return l;let p={scrollLeft:0,scrollTop:0},m=ea(1);const v=ea(0),b=ta(i);if((b||!b&&!u)&&((li(i)!=="body"||No(f))&&(p=Hu(i)),ta(i))){const S=Zr(i);m=Ql(i),v.x=S.x+i.clientLeft,v.y=S.y+i.clientTop}const w=f&&!b&&!u?nx(f,p,!0):ea(0);return{width:l.width*m.x,height:l.height*m.y,x:l.x*m.x-p.scrollLeft*m.x+v.x+w.x,y:l.y*m.y-p.scrollTop*m.y+v.y+w.y}}function _j(n){return Array.from(n.getClientRects())}function Cj(n){const a=aa(n),l=Hu(n),i=n.ownerDocument.body,s=pn(a.scrollWidth,a.clientWidth,i.scrollWidth,i.clientWidth),u=pn(a.scrollHeight,a.clientHeight,i.scrollHeight,i.clientHeight);let f=-l.scrollLeft+Rh(n);const d=-l.scrollTop;return Un(i).direction==="rtl"&&(f+=pn(a.clientWidth,i.clientWidth)-s),{width:s,height:u,x:f,y:d}}function Nj(n,a){const l=gn(n),i=aa(n),s=l.visualViewport;let u=i.clientWidth,f=i.clientHeight,d=0,p=0;if(s){u=s.width,f=s.height;const m=Ch();(!m||m&&a==="fixed")&&(d=s.offsetLeft,p=s.offsetTop)}return{width:u,height:f,x:d,y:p}}const Rj=new Set(["absolute","fixed"]);function jj(n,a){const l=Zr(n,!0,a==="fixed"),i=l.top+n.clientTop,s=l.left+n.clientLeft,u=ta(n)?Ql(n):ea(1),f=n.clientWidth*u.x,d=n.clientHeight*u.y,p=s*u.x,m=i*u.y;return{width:f,height:d,x:p,y:m}}function Ly(n,a,l){let i;if(a==="viewport")i=Nj(n,l);else if(a==="document")i=Cj(aa(n));else if(zn(a))i=jj(a,l);else{const s=tx(n);i={x:a.x-s.x,y:a.y-s.y,width:a.width,height:a.height}}return xu(i)}function ax(n,a){const l=dr(n);return l===a||!zn(l)||Il(l)?!1:Un(l).position==="fixed"||ax(l,a)}function Oj(n,a){const l=a.get(n);if(l)return l;let i=xo(n,[],!1).filter(d=>zn(d)&&li(d)!=="body"),s=null;const u=Un(n).position==="fixed";let f=u?dr(n):n;for(;zn(f)&&!Il(f);){const d=Un(f),p=_h(f);!p&&d.position==="fixed"&&(s=null),(u?!p&&!s:!p&&d.position==="static"&&!!s&&Rj.has(s.position)||No(f)&&!p&&ax(n,f))?i=i.filter(v=>v!==f):s=d,f=dr(f)}return a.set(n,i),i}function Aj(n){let{element:a,boundary:l,rootBoundary:i,strategy:s}=n;const f=[...l==="clippingAncestors"?Pu(a)?[]:Oj(a,this._c):[].concat(l),i],d=f[0],p=f.reduce((m,v)=>{const b=Ly(a,v,s);return m.top=pn(b.top,m.top),m.right=fr(b.right,m.right),m.bottom=fr(b.bottom,m.bottom),m.left=pn(b.left,m.left),m},Ly(a,d,s));return{width:p.right-p.left,height:p.bottom-p.top,x:p.left,y:p.top}}function Tj(n){const{width:a,height:l}=ex(n);return{width:a,height:l}}function Mj(n,a,l){const i=ta(a),s=aa(a),u=l==="fixed",f=Zr(n,!0,u,a);let d={scrollLeft:0,scrollTop:0};const p=ea(0);function m(){p.x=Rh(s)}if(i||!i&&!u)if((li(a)!=="body"||No(s))&&(d=Hu(a)),i){const S=Zr(a,!0,u,a);p.x=S.x+a.clientLeft,p.y=S.y+a.clientTop}else s&&m();u&&!i&&s&&m();const v=s&&!i&&!u?nx(s,d):ea(0),b=f.left+d.scrollLeft-p.x-v.x,w=f.top+d.scrollTop-p.y-v.y;return{x:b,y:w,width:f.width,height:f.height}}function wd(n){return Un(n).position==="static"}function ky(n,a){if(!ta(n)||Un(n).position==="fixed")return null;if(a)return a(n);let l=n.offsetParent;return aa(n)===l&&(l=l.ownerDocument.body),l}function rx(n,a){const l=gn(n);if(Pu(n))return l;if(!ta(n)){let s=dr(n);for(;s&&!Il(s);){if(zn(s)&&!wd(s))return s;s=dr(s)}return l}let i=ky(n,a);for(;i&&mj(i)&&wd(i);)i=ky(i,a);return i&&Il(i)&&wd(i)&&!_h(i)?l:i||bj(n)||l}const Dj=async function(n){const a=this.getOffsetParent||rx,l=this.getDimensions,i=await l(n.floating);return{reference:Mj(n.reference,await a(n.floating),n.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Lj(n){return Un(n).direction==="rtl"}const kj={convertOffsetParentRelativeRectToViewportRelativeRect:Ej,getDocumentElement:aa,getClippingRect:Aj,getOffsetParent:rx,getElementRects:Dj,getClientRects:_j,getDimensions:Tj,getScale:Ql,isElement:zn,isRTL:Lj};function lx(n,a){return n.x===a.x&&n.y===a.y&&n.width===a.width&&n.height===a.height}function zj(n,a){let l=null,i;const s=aa(n);function u(){var d;clearTimeout(i),(d=l)==null||d.disconnect(),l=null}function f(d,p){d===void 0&&(d=!1),p===void 0&&(p=1),u();const m=n.getBoundingClientRect(),{left:v,top:b,width:w,height:S}=m;if(d||a(),!w||!S)return;const C=eu(b),_=eu(s.clientWidth-(v+w)),j=eu(s.clientHeight-(b+S)),N=eu(v),k={rootMargin:-C+"px "+-_+"px "+-j+"px "+-N+"px",threshold:pn(0,fr(1,p))||1};let H=!0;function D(R){const B=R[0].intersectionRatio;if(B!==p){if(!H)return f();B?f(!1,B):i=setTimeout(()=>{f(!1,1e-7)},1e3)}B===1&&!lx(m,n.getBoundingClientRect())&&f(),H=!1}try{l=new IntersectionObserver(D,{...k,root:s.ownerDocument})}catch{l=new IntersectionObserver(D,k)}l.observe(n)}return f(!0),u}function Uj(n,a,l,i){i===void 0&&(i={});const{ancestorScroll:s=!0,ancestorResize:u=!0,elementResize:f=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:p=!1}=i,m=Nh(n),v=s||u?[...m?xo(m):[],...xo(a)]:[];v.forEach(N=>{s&&N.addEventListener("scroll",l,{passive:!0}),u&&N.addEventListener("resize",l)});const b=m&&d?zj(m,l):null;let w=-1,S=null;f&&(S=new ResizeObserver(N=>{let[z]=N;z&&z.target===m&&S&&(S.unobserve(a),cancelAnimationFrame(w),w=requestAnimationFrame(()=>{var k;(k=S)==null||k.observe(a)})),l()}),m&&!p&&S.observe(m),S.observe(a));let C,_=p?Zr(n):null;p&&j();function j(){const N=Zr(n);_&&!lx(_,N)&&l(),_=N,C=requestAnimationFrame(j)}return l(),()=>{var N;v.forEach(z=>{s&&z.removeEventListener("scroll",l),u&&z.removeEventListener("resize",l)}),b?.(),(N=S)==null||N.disconnect(),S=null,p&&cancelAnimationFrame(C)}}const Pj=sj,Hj=uj,Bj=lj,$j=fj,Vj=ij,zy=rj,Yj=cj,qj=(n,a,l)=>{const i=new Map,s={platform:kj,...l},u={...s.platform,_c:i};return aj(n,a,{...s,platform:u})};var Fj=typeof document<"u",Kj=function(){},cu=Fj?y.useLayoutEffect:Kj;function wu(n,a){if(n===a)return!0;if(typeof n!=typeof a)return!1;if(typeof n=="function"&&n.toString()===a.toString())return!0;let l,i,s;if(n&&a&&typeof n=="object"){if(Array.isArray(n)){if(l=n.length,l!==a.length)return!1;for(i=l;i--!==0;)if(!wu(n[i],a[i]))return!1;return!0}if(s=Object.keys(n),l=s.length,l!==Object.keys(a).length)return!1;for(i=l;i--!==0;)if(!{}.hasOwnProperty.call(a,s[i]))return!1;for(i=l;i--!==0;){const u=s[i];if(!(u==="_owner"&&n.$$typeof)&&!wu(n[u],a[u]))return!1}return!0}return n!==n&&a!==a}function ix(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function Uy(n,a){const l=ix(n);return Math.round(a*l)/l}function Sd(n){const a=y.useRef(n);return cu(()=>{a.current=n}),a}function Gj(n){n===void 0&&(n={});const{placement:a="bottom",strategy:l="absolute",middleware:i=[],platform:s,elements:{reference:u,floating:f}={},transform:d=!0,whileElementsMounted:p,open:m}=n,[v,b]=y.useState({x:0,y:0,strategy:l,placement:a,middlewareData:{},isPositioned:!1}),[w,S]=y.useState(i);wu(w,i)||S(i);const[C,_]=y.useState(null),[j,N]=y.useState(null),z=y.useCallback(V=>{V!==R.current&&(R.current=V,_(V))},[]),k=y.useCallback(V=>{V!==B.current&&(B.current=V,N(V))},[]),H=u||C,D=f||j,R=y.useRef(null),B=y.useRef(null),Z=y.useRef(v),ne=p!=null,oe=Sd(p),le=Sd(s),J=Sd(m),te=y.useCallback(()=>{if(!R.current||!B.current)return;const V={placement:a,strategy:l,middleware:w};le.current&&(V.platform=le.current),qj(R.current,B.current,V).then(ve=>{const O={...ve,isPositioned:J.current!==!1};W.current&&!wu(Z.current,O)&&(Z.current=O,Ou.flushSync(()=>{b(O)}))})},[w,a,l,le,J]);cu(()=>{m===!1&&Z.current.isPositioned&&(Z.current.isPositioned=!1,b(V=>({...V,isPositioned:!1})))},[m]);const W=y.useRef(!1);cu(()=>(W.current=!0,()=>{W.current=!1}),[]),cu(()=>{if(H&&(R.current=H),D&&(B.current=D),H&&D){if(oe.current)return oe.current(H,D,te);te()}},[H,D,te,oe,ne]);const ue=y.useMemo(()=>({reference:R,floating:B,setReference:z,setFloating:k}),[z,k]),A=y.useMemo(()=>({reference:H,floating:D}),[H,D]),Q=y.useMemo(()=>{const V={position:l,left:0,top:0};if(!A.floating)return V;const ve=Uy(A.floating,v.x),O=Uy(A.floating,v.y);return d?{...V,transform:"translate("+ve+"px, "+O+"px)",...ix(A.floating)>=1.5&&{willChange:"transform"}}:{position:l,left:ve,top:O}},[l,d,A.floating,v.x,v.y]);return y.useMemo(()=>({...v,update:te,refs:ue,elements:A,floatingStyles:Q}),[v,te,ue,A,Q])}const Xj=n=>{function a(l){return{}.hasOwnProperty.call(l,"current")}return{name:"arrow",options:n,fn(l){const{element:i,padding:s}=typeof n=="function"?n(l):n;return i&&a(i)?i.current!=null?zy({element:i.current,padding:s}).fn(l):{}:i?zy({element:i,padding:s}).fn(l):{}}}},Qj=(n,a)=>({...Pj(n),options:[n,a]}),Zj=(n,a)=>({...Hj(n),options:[n,a]}),Ij=(n,a)=>({...Yj(n),options:[n,a]}),Jj=(n,a)=>({...Bj(n),options:[n,a]}),Wj=(n,a)=>({...$j(n),options:[n,a]}),eO=(n,a)=>({...Vj(n),options:[n,a]}),tO=(n,a)=>({...Xj(n),options:[n,a]});var nO="Arrow",ox=y.forwardRef((n,a)=>{const{children:l,width:i=10,height:s=5,...u}=n;return g.jsx(pt.svg,{...u,ref:a,width:i,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:n.asChild?l:g.jsx("polygon",{points:"0,0 30,0 15,10"})})});ox.displayName=nO;var aO=ox,jh="Popper",[sx,ux]=Au(jh),[rO,cx]=sx(jh),fx=n=>{const{__scopePopper:a,children:l}=n,[i,s]=y.useState(null);return g.jsx(rO,{scope:a,anchor:i,onAnchorChange:s,children:l})};fx.displayName=jh;var dx="PopperAnchor",hx=y.forwardRef((n,a)=>{const{__scopePopper:l,virtualRef:i,...s}=n,u=cx(dx,l),f=y.useRef(null),d=vn(a,f);return y.useEffect(()=>{u.onAnchorChange(i?.current||f.current)}),i?null:g.jsx(pt.div,{...s,ref:d})});hx.displayName=dx;var Oh="PopperContent",[lO,iO]=sx(Oh),mx=y.forwardRef((n,a)=>{const{__scopePopper:l,side:i="bottom",sideOffset:s=0,align:u="center",alignOffset:f=0,arrowPadding:d=0,avoidCollisions:p=!0,collisionBoundary:m=[],collisionPadding:v=0,sticky:b="partial",hideWhenDetached:w=!1,updatePositionStrategy:S="optimized",onPlaced:C,..._}=n,j=cx(Oh,l),[N,z]=y.useState(null),k=vn(a,ye=>z(ye)),[H,D]=y.useState(null),R=Ob(H),B=R?.width??0,Z=R?.height??0,ne=i+(u!=="center"?"-"+u:""),oe=typeof v=="number"?v:{top:0,right:0,bottom:0,left:0,...v},le=Array.isArray(m)?m:[m],J=le.length>0,te={padding:oe,boundary:le.filter(sO),altBoundary:J},{refs:W,floatingStyles:ue,placement:A,isPositioned:Q,middlewareData:V}=Gj({strategy:"fixed",placement:ne,whileElementsMounted:(...ye)=>Uj(...ye,{animationFrame:S==="always"}),elements:{reference:j.anchor},middleware:[Qj({mainAxis:s+Z,alignmentAxis:f}),p&&Zj({mainAxis:!0,crossAxis:!1,limiter:b==="partial"?Ij():void 0,...te}),p&&Jj({...te}),Wj({...te,apply:({elements:ye,rects:Le,availableWidth:qe,availableHeight:Je})=>{const{width:At,height:Ze}=Le.reference,an=ye.floating.style;an.setProperty("--radix-popper-available-width",`${qe}px`),an.setProperty("--radix-popper-available-height",`${Je}px`),an.setProperty("--radix-popper-anchor-width",`${At}px`),an.setProperty("--radix-popper-anchor-height",`${Ze}px`)}}),H&&tO({element:H,padding:d}),uO({arrowWidth:B,arrowHeight:Z}),w&&eO({strategy:"referenceHidden",...te})]}),[ve,O]=vx(A),F=Zl(C);ir(()=>{Q&&F?.()},[Q,F]);const U=V.arrow?.x,K=V.arrow?.y,ae=V.arrow?.centerOffset!==0,[de,ge]=y.useState();return ir(()=>{N&&ge(window.getComputedStyle(N).zIndex)},[N]),g.jsx("div",{ref:W.setFloating,"data-radix-popper-content-wrapper":"",style:{...ue,transform:Q?ue.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:de,"--radix-popper-transform-origin":[V.transformOrigin?.x,V.transformOrigin?.y].join(" "),...V.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:n.dir,children:g.jsx(lO,{scope:l,placedSide:ve,onArrowChange:D,arrowX:U,arrowY:K,shouldHideArrow:ae,children:g.jsx(pt.div,{"data-side":ve,"data-align":O,..._,ref:k,style:{..._.style,animation:Q?void 0:"none"}})})})});mx.displayName=Oh;var px="PopperArrow",oO={top:"bottom",right:"left",bottom:"top",left:"right"},gx=y.forwardRef(function(a,l){const{__scopePopper:i,...s}=a,u=iO(px,i),f=oO[u.placedSide];return g.jsx("span",{ref:u.onArrowChange,style:{position:"absolute",left:u.arrowX,top:u.arrowY,[f]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[u.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[u.placedSide],visibility:u.shouldHideArrow?"hidden":void 0},children:g.jsx(aO,{...s,ref:l,style:{...s.style,display:"block"}})})});gx.displayName=px;function sO(n){return n!==null}var uO=n=>({name:"transformOrigin",options:n,fn(a){const{placement:l,rects:i,middlewareData:s}=a,f=s.arrow?.centerOffset!==0,d=f?0:n.arrowWidth,p=f?0:n.arrowHeight,[m,v]=vx(l),b={start:"0%",center:"50%",end:"100%"}[v],w=(s.arrow?.x??0)+d/2,S=(s.arrow?.y??0)+p/2;let C="",_="";return m==="bottom"?(C=f?b:`${w}px`,_=`${-p}px`):m==="top"?(C=f?b:`${w}px`,_=`${i.floating.height+p}px`):m==="right"?(C=`${-p}px`,_=f?b:`${S}px`):m==="left"&&(C=`${i.floating.width+p}px`,_=f?b:`${S}px`),{data:{x:C,y:_}}}});function vx(n){const[a,l="center"]=n.split("-");return[a,l]}var cO=fx,yx=hx,fO=mx,dO=gx,Bu="Popover",[bx,_T]=Au(Bu,[ux]),Ro=ux(),[hO,pr]=bx(Bu),xx=n=>{const{__scopePopover:a,children:l,open:i,defaultOpen:s,onOpenChange:u,modal:f=!1}=n,d=Ro(a),p=y.useRef(null),[m,v]=y.useState(!1),[b,w]=sh({prop:i,defaultProp:s??!1,onChange:u,caller:Bu});return g.jsx(cO,{...d,children:g.jsx(hO,{scope:a,contentId:Wn(),triggerRef:p,open:b,onOpenChange:w,onOpenToggle:y.useCallback(()=>w(S=>!S),[w]),hasCustomAnchor:m,onCustomAnchorAdd:y.useCallback(()=>v(!0),[]),onCustomAnchorRemove:y.useCallback(()=>v(!1),[]),modal:f,children:l})})};xx.displayName=Bu;var wx="PopoverAnchor",mO=y.forwardRef((n,a)=>{const{__scopePopover:l,...i}=n,s=pr(wx,l),u=Ro(l),{onCustomAnchorAdd:f,onCustomAnchorRemove:d}=s;return y.useEffect(()=>(f(),()=>d()),[f,d]),g.jsx(yx,{...u,...i,ref:a})});mO.displayName=wx;var Sx="PopoverTrigger",Ex=y.forwardRef((n,a)=>{const{__scopePopover:l,...i}=n,s=pr(Sx,l),u=Ro(l),f=vn(a,s.triggerRef),d=g.jsx(pt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":jx(s.open),...i,ref:f,onClick:nn(n.onClick,s.onOpenToggle)});return s.hasCustomAnchor?d:g.jsx(yx,{asChild:!0,...u,children:d})});Ex.displayName=Sx;var Ah="PopoverPortal",[pO,gO]=bx(Ah,{forceMount:void 0}),_x=n=>{const{__scopePopover:a,forceMount:l,children:i,container:s}=n,u=pr(Ah,a);return g.jsx(pO,{scope:a,forceMount:l,children:g.jsx(ei,{present:l||u.open,children:g.jsx(fh,{asChild:!0,container:s,children:i})})})};_x.displayName=Ah;var Jl="PopoverContent",Cx=y.forwardRef((n,a)=>{const l=gO(Jl,n.__scopePopover),{forceMount:i=l.forceMount,...s}=n,u=pr(Jl,n.__scopePopover);return g.jsx(ei,{present:i||u.open,children:u.modal?g.jsx(yO,{...s,ref:a}):g.jsx(bO,{...s,ref:a})})});Cx.displayName=Jl;var vO=Tu("PopoverContent.RemoveScroll"),yO=y.forwardRef((n,a)=>{const l=pr(Jl,n.__scopePopover),i=y.useRef(null),s=vn(a,i),u=y.useRef(!1);return y.useEffect(()=>{const f=i.current;if(f)return $0(f)},[]),g.jsx(dh,{as:vO,allowPinchZoom:!0,children:g.jsx(Nx,{...n,ref:s,trapFocus:l.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:nn(n.onCloseAutoFocus,f=>{f.preventDefault(),u.current||l.triggerRef.current?.focus()}),onPointerDownOutside:nn(n.onPointerDownOutside,f=>{const d=f.detail.originalEvent,p=d.button===0&&d.ctrlKey===!0,m=d.button===2||p;u.current=m},{checkForDefaultPrevented:!1}),onFocusOutside:nn(n.onFocusOutside,f=>f.preventDefault(),{checkForDefaultPrevented:!1})})})}),bO=y.forwardRef((n,a)=>{const l=pr(Jl,n.__scopePopover),i=y.useRef(!1),s=y.useRef(!1);return g.jsx(Nx,{...n,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:u=>{n.onCloseAutoFocus?.(u),u.defaultPrevented||(i.current||l.triggerRef.current?.focus(),u.preventDefault()),i.current=!1,s.current=!1},onInteractOutside:u=>{n.onInteractOutside?.(u),u.defaultPrevented||(i.current=!0,u.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const f=u.target;l.triggerRef.current?.contains(f)&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&s.current&&u.preventDefault()}})}),Nx=y.forwardRef((n,a)=>{const{__scopePopover:l,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:u,disableOutsidePointerEvents:f,onEscapeKeyDown:d,onPointerDownOutside:p,onFocusOutside:m,onInteractOutside:v,...b}=n,w=pr(Jl,l),S=Ro(l);return M0(),g.jsx(ch,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:s,onUnmountAutoFocus:u,children:g.jsx(uh,{asChild:!0,disableOutsidePointerEvents:f,onInteractOutside:v,onEscapeKeyDown:d,onPointerDownOutside:p,onFocusOutside:m,onDismiss:()=>w.onOpenChange(!1),children:g.jsx(fO,{"data-state":jx(w.open),role:"dialog",id:w.contentId,...S,...b,ref:a,style:{...b.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Rx="PopoverClose",xO=y.forwardRef((n,a)=>{const{__scopePopover:l,...i}=n,s=pr(Rx,l);return g.jsx(pt.button,{type:"button",...i,ref:a,onClick:nn(n.onClick,()=>s.onOpenChange(!1))})});xO.displayName=Rx;var wO="PopoverArrow",SO=y.forwardRef((n,a)=>{const{__scopePopover:l,...i}=n,s=Ro(l);return g.jsx(dO,{...s,...i,ref:a})});SO.displayName=wO;function jx(n){return n?"open":"closed"}var EO=xx,_O=Ex,CO=_x,NO=Cx;function $u({...n}){return g.jsx(EO,{"data-slot":"popover",...n})}function Vu({...n}){return g.jsx(_O,{"data-slot":"popover-trigger",...n})}function Yu({className:n,align:a="center",sideOffset:l=4,...i}){return g.jsx(CO,{children:g.jsx(NO,{"data-slot":"popover-content",align:a,sideOffset:l,className:ft("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden animate-fade-in",n),...i})})}function kn({options:n,value:a,onChange:l,placeholder:i="Select an option...",searchPlaceholder:s="Search...",emptyPlaceholder:u="No options found."}){const[f,d]=y.useState(!1),p=n.find(m=>m.value===a);return g.jsxs($u,{open:f,onOpenChange:d,children:[g.jsx(Vu,{asChild:!0,children:g.jsxs(Ae,{variant:"outline",role:"combobox","aria-expanded":f,className:"w-full justify-between transition-all-ease hover:scale-[1.02] active:scale-[0.98]",children:[p?p.label:i,g.jsx(ub,{className:"ml-2 h-4 w-4 shrink-0 opacity-50 transition-transform duration-200 group-data-[state=open]:rotate-180"})]})}),g.jsx(Yu,{className:"w-[--radix-popover-trigger-width] p-0 animate-fade-in",children:g.jsxs(qb,{children:[g.jsx(Fb,{placeholder:s}),g.jsxs(Kb,{children:[g.jsx(Gb,{children:u}),g.jsx(Xb,{children:n.map(m=>g.jsxs(Qb,{value:m.value,onSelect:v=>{l(v===a?"":v),d(!1)},className:"transition-all-ease hover:bg-accent hover:text-accent-foreground",children:[g.jsx(sb,{className:ft("mr-2 h-4 w-4 transition-opacity",a===m.value?"opacity-100":"opacity-0")}),m.label]},m.value))})]})]})})]})}class RO{baseUrl;apiKey;tempApiKey;constructor(a="/api",l=""){this.baseUrl=a,this.apiKey=l||localStorage.getItem("apiKey")||"",this.tempApiKey=new URLSearchParams(window.location.search).get("tempApiKey")}setBaseUrl(a){this.baseUrl=a}setApiKey(a){this.apiKey=a,a?localStorage.setItem("apiKey",a):localStorage.removeItem("apiKey")}setTempApiKey(a){this.tempApiKey=a}createHeaders(a="application/json"){const l={Accept:"application/json"};return this.tempApiKey?l["X-Temp-API-Key"]=this.tempApiKey:this.apiKey&&(l["X-API-Key"]=this.apiKey),a&&(l["Content-Type"]=a),l}async apiFetch(a,l={}){const i=`${this.baseUrl}${a}`,s={...l,headers:{...this.createHeaders(),...l.headers}};try{const u=await fetch(i,s);if(u.status===401)return localStorage.removeItem("apiKey"),window.dispatchEvent(new CustomEvent("unauthorized")),new Promise(()=>{});if(!u.ok)throw new Error(`API request failed: ${u.status} ${u.statusText}`);if(u.status===204)return{};const f=await u.text();return f?JSON.parse(f):{}}catch(u){throw console.error("API request error:",u),u}}async get(a){return this.apiFetch(a,{method:"GET"})}async post(a,l){return this.apiFetch(a,{method:"POST",body:JSON.stringify(l)})}async put(a,l){return this.apiFetch(a,{method:"PUT",body:JSON.stringify(l)})}async delete(a){return this.apiFetch(a,{method:"DELETE"})}async getConfig(){return this.get("/config")}async updateConfig(a){return this.post("/config",a)}async getProviders(){return this.get("/api/providers")}async addProvider(a){return this.post("/api/providers",a)}async updateProvider(a,l){return this.post(`/api/providers/${a}`,l)}async deleteProvider(a){return this.delete(`/api/providers/${a}`)}async getTransformers(){return this.get("/api/transformers")}async addTransformer(a){return this.post("/api/transformers",a)}async updateTransformer(a,l){return this.post(`/api/transformers/${a}`,l)}async deleteTransformer(a){return this.delete(`/api/transformers/${a}`)}async getConfigNew(){return this.get("/config")}async saveConfig(a){return this.post("/config",a)}async restartService(){return this.post("/restart",{})}async checkForUpdates(){return this.get("/update/check")}async performUpdate(){return this.post("/api/update/perform",{})}}const Qt=new RO,Ox=y.createContext(void 0);function Jr(){const n=y.useContext(Ox);if(n===void 0)throw new Error("useConfig must be used within a ConfigProvider");return n}function jO({children:n}){const[a,l]=y.useState(null),[i,s]=y.useState(null),[u,f]=y.useState(!1),[d,p]=y.useState(localStorage.getItem("apiKey"));return y.useEffect(()=>{const m=()=>{p(localStorage.getItem("apiKey"))};return window.addEventListener("storage",m),()=>{window.removeEventListener("storage",m)}},[]),y.useEffect(()=>{(async()=>{f(!1),l(null),s(null)})()},[d]),y.useEffect(()=>{(async()=>{if(!u){f(!0);try{const v=await Qt.getConfig(),b={LOG:typeof v.LOG=="boolean"?v.LOG:!1,LOG_LEVEL:typeof v.LOG_LEVEL=="string"?v.LOG_LEVEL:"debug",CLAUDE_PATH:typeof v.CLAUDE_PATH=="string"?v.CLAUDE_PATH:"",HOST:typeof v.HOST=="string"?v.HOST:"127.0.0.1",PORT:typeof v.PORT=="number"?v.PORT:3456,APIKEY:typeof v.APIKEY=="string"?v.APIKEY:"",API_TIMEOUT_MS:typeof v.API_TIMEOUT_MS=="string"?v.API_TIMEOUT_MS:"600000",PROXY_URL:typeof v.PROXY_URL=="string"?v.PROXY_URL:"",transformers:Array.isArray(v.transformers)?v.transformers:[],Providers:Array.isArray(v.Providers)?v.Providers:[],StatusLine:v.StatusLine&&typeof v.StatusLine=="object"?{enabled:typeof v.StatusLine.enabled=="boolean"?v.StatusLine.enabled:!1,currentStyle:typeof v.StatusLine.currentStyle=="string"?v.StatusLine.currentStyle:"default",default:v.StatusLine.default&&typeof v.StatusLine.default=="object"&&Array.isArray(v.StatusLine.default.modules)?v.StatusLine.default:{modules:[]},powerline:v.StatusLine.powerline&&typeof v.StatusLine.powerline=="object"&&Array.isArray(v.StatusLine.powerline.modules)?v.StatusLine.powerline:{modules:[]}}:{enabled:!1,currentStyle:"default",default:{modules:[]},powerline:{modules:[]}},Router:v.Router&&typeof v.Router=="object"?{default:typeof v.Router.default=="string"?v.Router.default:"",background:typeof v.Router.background=="string"?v.Router.background:"",think:typeof v.Router.think=="string"?v.Router.think:"",longContext:typeof v.Router.longContext=="string"?v.Router.longContext:"",longContextThreshold:typeof v.Router.longContextThreshold=="number"?v.Router.longContextThreshold:6e4,webSearch:typeof v.Router.webSearch=="string"?v.Router.webSearch:""}:{default:"",background:"",think:"",longContext:"",longContextThreshold:6e4,webSearch:""}};l(b)}catch(v){console.error("Failed to fetch config:",v),v.message!=="Unauthorized"&&(l({LOG:!1,LOG_LEVEL:"debug",CLAUDE_PATH:"",HOST:"127.0.0.1",PORT:3456,APIKEY:"",API_TIMEOUT_MS:"600000",PROXY_URL:"",transformers:[],Providers:[],StatusLine:void 0,Router:{default:"",background:"",think:"",longContext:"",longContextThreshold:6e4,webSearch:""}}),s(v))}}})()},[u,d]),g.jsx(Ox.Provider,{value:{config:a,setConfig:l,error:i},children:n})}function qu(){return(qu=Object.assign||function(n){for(var a=1;a<arguments.length;a++){var l=arguments[a];for(var i in l)Object.prototype.hasOwnProperty.call(l,i)&&(n[i]=l[i])}return n}).apply(this,arguments)}function Ax(n,a){if(n==null)return{};var l,i,s={},u=Object.keys(n);for(i=0;i<u.length;i++)a.indexOf(l=u[i])>=0||(s[l]=n[l]);return s}function Qd(n){var a=y.useRef(n),l=y.useRef(function(i){a.current&&a.current(i)});return a.current=n,l.current}var wo=function(n,a,l){return a===void 0&&(a=0),l===void 0&&(l=1),n>l?l:n<a?a:n},ho=function(n){return"touches"in n},Zd=function(n){return n&&n.ownerDocument.defaultView||self},Py=function(n,a,l){var i=n.getBoundingClientRect(),s=ho(a)?function(u,f){for(var d=0;d<u.length;d++)if(u[d].identifier===f)return u[d];return u[0]}(a.touches,l):a;return{left:wo((s.pageX-(i.left+Zd(n).pageXOffset))/i.width),top:wo((s.pageY-(i.top+Zd(n).pageYOffset))/i.height)}},Hy=function(n){!ho(n)&&n.preventDefault()},Tx=mt.memo(function(n){var a=n.onMove,l=n.onKey,i=Ax(n,["onMove","onKey"]),s=y.useRef(null),u=Qd(a),f=Qd(l),d=y.useRef(null),p=y.useRef(!1),m=y.useMemo(function(){var S=function(j){Hy(j),(ho(j)?j.touches.length>0:j.buttons>0)&&s.current?u(Py(s.current,j,d.current)):_(!1)},C=function(){return _(!1)};function _(j){var N=p.current,z=Zd(s.current),k=j?z.addEventListener:z.removeEventListener;k(N?"touchmove":"mousemove",S),k(N?"touchend":"mouseup",C)}return[function(j){var N=j.nativeEvent,z=s.current;if(z&&(Hy(N),!function(H,D){return D&&!ho(H)}(N,p.current)&&z)){if(ho(N)){p.current=!0;var k=N.changedTouches||[];k.length&&(d.current=k[0].identifier)}z.focus(),u(Py(z,N,d.current)),_(!0)}},function(j){var N=j.which||j.keyCode;N<37||N>40||(j.preventDefault(),f({left:N===39?.05:N===37?-.05:0,top:N===40?.05:N===38?-.05:0}))},_]},[f,u]),v=m[0],b=m[1],w=m[2];return y.useEffect(function(){return w},[w]),mt.createElement("div",qu({},i,{onTouchStart:v,onMouseDown:v,className:"react-colorful__interactive",ref:s,onKeyDown:b,tabIndex:0,role:"slider"}))}),Th=function(n){return n.filter(Boolean).join(" ")},Mx=function(n){var a=n.color,l=n.left,i=n.top,s=i===void 0?.5:i,u=Th(["react-colorful__pointer",n.className]);return mt.createElement("div",{className:u,style:{top:100*s+"%",left:100*l+"%"}},mt.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:a}}))},Vt=function(n,a,l){return a===void 0&&(a=0),l===void 0&&(l=Math.pow(10,a)),Math.round(l*n)/l},OO=function(n){return LO(Id(n))},Id=function(n){return n[0]==="#"&&(n=n.substring(1)),n.length<6?{r:parseInt(n[0]+n[0],16),g:parseInt(n[1]+n[1],16),b:parseInt(n[2]+n[2],16),a:n.length===4?Vt(parseInt(n[3]+n[3],16)/255,2):1}:{r:parseInt(n.substring(0,2),16),g:parseInt(n.substring(2,4),16),b:parseInt(n.substring(4,6),16),a:n.length===8?Vt(parseInt(n.substring(6,8),16)/255,2):1}},AO=function(n){return DO(MO(n))},TO=function(n){var a=n.s,l=n.v,i=n.a,s=(200-a)*l/100;return{h:Vt(n.h),s:Vt(s>0&&s<200?a*l/100/(s<=100?s:200-s)*100:0),l:Vt(s/2),a:Vt(i,2)}},Jd=function(n){var a=TO(n);return"hsl("+a.h+", "+a.s+"%, "+a.l+"%)"},MO=function(n){var a=n.h,l=n.s,i=n.v,s=n.a;a=a/360*6,l/=100,i/=100;var u=Math.floor(a),f=i*(1-l),d=i*(1-(a-u)*l),p=i*(1-(1-a+u)*l),m=u%6;return{r:Vt(255*[i,d,f,f,p,i][m]),g:Vt(255*[p,i,i,d,f,f][m]),b:Vt(255*[f,f,p,i,i,d][m]),a:Vt(s,2)}},tu=function(n){var a=n.toString(16);return a.length<2?"0"+a:a},DO=function(n){var a=n.r,l=n.g,i=n.b,s=n.a,u=s<1?tu(Vt(255*s)):"";return"#"+tu(a)+tu(l)+tu(i)+u},LO=function(n){var a=n.r,l=n.g,i=n.b,s=n.a,u=Math.max(a,l,i),f=u-Math.min(a,l,i),d=f?u===a?(l-i)/f:u===l?2+(i-a)/f:4+(a-l)/f:0;return{h:Vt(60*(d<0?d+6:d)),s:Vt(u?f/u*100:0),v:Vt(u/255*100),a:s}},kO=mt.memo(function(n){var a=n.hue,l=n.onChange,i=Th(["react-colorful__hue",n.className]);return mt.createElement("div",{className:i},mt.createElement(Tx,{onMove:function(s){l({h:360*s.left})},onKey:function(s){l({h:wo(a+360*s.left,0,360)})},"aria-label":"Hue","aria-valuenow":Vt(a),"aria-valuemax":"360","aria-valuemin":"0"},mt.createElement(Mx,{className:"react-colorful__hue-pointer",left:a/360,color:Jd({h:a,s:100,v:100,a:1})})))}),zO=mt.memo(function(n){var a=n.hsva,l=n.onChange,i={backgroundColor:Jd({h:a.h,s:100,v:100,a:1})};return mt.createElement("div",{className:"react-colorful__saturation",style:i},mt.createElement(Tx,{onMove:function(s){l({s:100*s.left,v:100-100*s.top})},onKey:function(s){l({s:wo(a.s+100*s.left,0,100),v:wo(a.v-100*s.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+Vt(a.s)+"%, Brightness "+Vt(a.v)+"%"},mt.createElement(Mx,{className:"react-colorful__saturation-pointer",top:1-a.v/100,left:a.s/100,color:Jd(a)})))}),Dx=function(n,a){if(n===a)return!0;for(var l in n)if(n[l]!==a[l])return!1;return!0},UO=function(n,a){return n.toLowerCase()===a.toLowerCase()||Dx(Id(n),Id(a))};function PO(n,a,l){var i=Qd(l),s=y.useState(function(){return n.toHsva(a)}),u=s[0],f=s[1],d=y.useRef({color:a,hsva:u});y.useEffect(function(){if(!n.equal(a,d.current.color)){var m=n.toHsva(a);d.current={hsva:m,color:a},f(m)}},[a,n]),y.useEffect(function(){var m;Dx(u,d.current.hsva)||n.equal(m=n.fromHsva(u),d.current.color)||(d.current={hsva:u,color:m},i(m))},[u,n,i]);var p=y.useCallback(function(m){f(function(v){return Object.assign({},v,m)})},[]);return[u,p]}var HO=typeof window<"u"?y.useLayoutEffect:y.useEffect,BO=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},By=new Map,$O=function(n){HO(function(){var a=n.current?n.current.ownerDocument:document;if(a!==void 0&&!By.has(a)){var l=a.createElement("style");l.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,By.set(a,l);var i=BO();i&&l.setAttribute("nonce",i),a.head.appendChild(l)}},[])},VO=function(n){var a=n.className,l=n.colorModel,i=n.color,s=i===void 0?l.defaultColor:i,u=n.onChange,f=Ax(n,["className","colorModel","color","onChange"]),d=y.useRef(null);$O(d);var p=PO(l,s,u),m=p[0],v=p[1],b=Th(["react-colorful",a]);return mt.createElement("div",qu({},f,{ref:d,className:b}),mt.createElement(zO,{hsva:m,onChange:v}),mt.createElement(kO,{hue:m.h,onChange:v,className:"react-colorful__last-control"}))},YO={defaultColor:"000",toHsva:OO,fromHsva:function(n){return AO({h:n.h,s:n.s,v:n.v,a:1})},equal:UO},qO=function(n){return mt.createElement(VO,qu({},n,{colorModel:YO}))};const FO=n=>n.startsWith("#")?n:"#000000";function $y({value:n="",onChange:a,placeholder:l="选择颜色...",showPreview:i=!0}){const[s,u]=y.useState(!1),[f,d]=y.useState("");y.useEffect(()=>{n.startsWith("#")?d(n):d("")},[n]);const p=b=>{a(b)},m=b=>{const w=b.target.value;d(w),/^#[0-9A-F]{6}$/i.test(w)&&p(w)},v=FO(n);return g.jsx("div",{className:"space-y-2",children:g.jsxs($u,{open:s,onOpenChange:u,children:[g.jsx(Vu,{asChild:!0,children:g.jsx(Ae,{variant:"outline",className:ft("w-full justify-start text-left font-normal h-10 transition-all hover:scale-[1.02] active:scale-[0.98]",!n&&"text-muted-foreground"),children:g.jsxs("div",{className:"flex items-center gap-2 w-full",children:[i&&g.jsx("div",{className:"h-5 w-5 rounded border shadow-sm",style:{backgroundColor:v}}),g.jsx("span",{className:"truncate flex-1",children:n||l}),g.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[g.jsx("path",{d:"m7 15 5 5 5-5"}),g.jsx("path",{d:"m7 9 5-5 5 5"})]})]})})}),g.jsx(Yu,{className:"w-72 p-3",align:"start",children:g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("h4",{className:"text-sm font-semibold",children:"颜色选择器"}),g.jsx(Ae,{variant:"ghost",size:"sm",className:"h-6 px-2 text-xs",onClick:()=>p(""),children:"清除"})]}),g.jsxs("div",{className:"flex items-center gap-2 p-2 rounded-md bg-secondary",children:[g.jsx("div",{className:"h-8 w-8 rounded border shadow-sm",style:{backgroundColor:v}}),g.jsxs("div",{className:"flex-1 min-w-0",children:[g.jsx("div",{className:"text-sm font-medium truncate",children:n||"未选择颜色"}),n&&n.startsWith("#")&&g.jsx("div",{className:"text-xs text-muted-foreground font-mono",children:n.toUpperCase()})]})]}),g.jsx("div",{className:"rounded-md overflow-hidden border",children:g.jsx(qO,{color:v,onChange:p,className:"w-full"})}),g.jsxs("div",{className:"space-y-2",children:[g.jsx("label",{className:"text-sm font-medium",children:"自定义颜色"}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx(ht,{type:"text",value:f,onChange:m,placeholder:"#RRGGBB",className:"font-mono flex-1"}),g.jsx(Ae,{size:"sm",onClick:()=>{f&&/^#[0-9A-F]{6}$/i.test(f)&&(p(f),u(!1))},disabled:!f||!/^#[0-9A-F]{6}$/i.test(f),children:"应用"})]}),g.jsx("p",{className:"text-xs text-muted-foreground",children:"输入十六进制颜色值 (例如: #FF0000)"})]})]})})]})})}const KO=bh("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function $r({className:n,variant:a,...l}){return g.jsx("div",{className:ft(KO({variant:a}),n),...l})}function GO(){return{enabled:!1,currentStyle:"default",default:{modules:[{type:"workDir",icon:"",text:"{{workDirName}}",color:"bright_blue"},{type:"gitBranch",icon:"",text:"{{gitBranch}}",color:"bright_magenta"},{type:"model",icon:"",text:"{{model}}",color:"bright_cyan"},{type:"usage",icon:"↑",text:"{{inputTokens}}",color:"bright_green"},{type:"usage",icon:"↓",text:"{{outputTokens}}",color:"bright_yellow"}]},powerline:{modules:[{type:"workDir",icon:"",text:"{{workDirName}}",color:"white",background:"bg_bright_blue"},{type:"gitBranch",icon:"",text:"{{gitBranch}}",color:"white",background:"bg_bright_magenta"},{type:"model",icon:"",text:"{{model}}",color:"white",background:"bg_bright_cyan"},{type:"usage",icon:"↑",text:"{{inputTokens}}",color:"white",background:"bg_bright_green"},{type:"usage",icon:"↓",text:"{{outputTokens}}",color:"white",background:"bg_bright_yellow"}]}}}const XO={type:"workDir",icon:"",text:"{{workDirName}}",color:"bright_blue"},QO=[{label:"Hack Nerd Font Mono",value:"Hack Nerd Font Mono"},{label:"FiraCode Nerd Font Mono",value:"FiraCode Nerd Font Mono"},{label:"JetBrainsMono Nerd Font Mono",value:"JetBrainsMono Nerd Font Mono"},{label:"Monaspace Nerd Font Mono",value:"Monaspace Nerd Font Mono"},{label:"UbuntuMono Nerd Font",value:"UbuntuMono Nerd Font"}],ZO=[{label:"workDir",value:"workDir"},{label:"gitBranch",value:"gitBranch"},{label:"model",value:"model"},{label:"usage",value:"usage"},{label:"script",value:"script"}],Ed={black:"text-black",red:"text-red-600",green:"text-green-600",yellow:"text-yellow-500",blue:"text-blue-500",magenta:"text-purple-500",cyan:"text-cyan-500",white:"text-white",bright_black:"text-gray-500",bright_red:"text-red-400",bright_green:"text-green-400",bright_yellow:"text-yellow-300",bright_blue:"text-blue-300",bright_magenta:"text-purple-300",bright_cyan:"text-cyan-300",bright_white:"text-white",bg_black:"bg-black",bg_red:"bg-red-600",bg_green:"bg-green-600",bg_yellow:"bg-yellow-500",bg_blue:"bg-blue-500",bg_magenta:"bg-purple-500",bg_cyan:"bg-cyan-500",bg_white:"bg-white",bg_bright_black:"bg-gray-800",bg_bright_red:"bg-red-400",bg_bright_green:"bg-green-400",bg_bright_yellow:"bg-yellow-300",bg_bright_blue:"bg-blue-300",bg_bright_magenta:"bg-purple-300",bg_bright_cyan:"bg-cyan-300",bg_bright_white:"bg-gray-100",bg_bright_orange:"bg-orange-400",bg_bright_purple:"bg-purple-400"},IO=mt.memo(({value:n,onChange:a,fontFamily:l,t:i})=>{const[s,u]=y.useState(!1),[f,d]=y.useState(n),[p,m]=y.useState([]),[v,b]=y.useState([]),[w,S]=y.useState(!1),C=mt.useRef(null),_=y.useCallback(async()=>{if(!(p.length>0)){S(!0);try{const R=await(await fetch("https://www.nerdfonts.com/assets/css/combo.css")).text(),B=/\.nf-([a-zA-Z0-9_-]+):before\s*\{\s*content:\s*"\\([0-9a-fA-F]+)";?\s*\}/g,Z=[];let ne;for(;(ne=B.exec(R))!==null;){const oe=`nf-${ne[1]}`,le=ne[2],J=String.fromCharCode(parseInt(le,16));Z.push({className:oe,unicode:le,char:J})}m(Z),b(Z.slice(0,200))}catch(D){console.error("Failed to load icons:",D),m([]),b([])}finally{S(!1)}}},[p.length]);y.useEffect(()=>{if(f.trim()===""){b(p.slice(0,100));return}const D=f.toLowerCase();let R=p;if(D.length===1||/[\u{2000}-\u{2FFFF}]/u.test(f)){const B=p.find(Z=>Z.char===f);B?R=[B]:R=p.filter(Z=>Z.char===f)}else R=p.filter(B=>{const Z=B.className.toLowerCase(),ne=Z.replace(/[_-]/g,""),oe=D.replace(/[_-]/g,"");return Z.includes(D)||ne.includes(oe)||D.split(" ").every(le=>Z.includes(le)||ne.includes(le))});b(R.slice(0,120))},[f,p]);const j=D=>{const R=D.target.value;d(R),a(R),u(!0),p.length===0&&_()},N=D=>{const R=D.clipboardData.getData("text");R&&R.length===1&&setTimeout(()=>{u(!0)},10)},z=D=>{d(D),a(D),u(!1),C.current?.focus()},k=()=>{u(!0),p.length===0&&_()},H=()=>{setTimeout(()=>u(!1),200)};return g.jsxs("div",{className:"relative",children:[g.jsx("div",{className:"relative",children:g.jsx(ht,{ref:C,value:f,onChange:j,onFocus:k,onBlur:H,onPaste:N,placeholder:i("statusline.icon_placeholder"),style:{fontFamily:l+", monospace"},className:"text-lg pr-2"})}),s&&g.jsx("div",{className:"absolute z-50 mt-1 w-full max-h-72 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg",children:w?g.jsx("div",{className:"flex items-center justify-center p-8",children:g.jsxs("svg",{className:"animate-spin h-6 w-6 text-primary",viewBox:"0 0 24 24",children:[g.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none",opacity:"0.1"}),g.jsx("path",{fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}):g.jsx(g.Fragment,{children:g.jsxs("div",{className:"grid grid-cols-5 gap-2 p-2 max-h-72 overflow-y-auto",children:[v.map(D=>g.jsx("div",{className:"flex items-center justify-center p-3 text-2xl cursor-pointer hover:bg-secondary rounded transition-colors",onClick:()=>z(D.char),onMouseDown:R=>R.preventDefault(),title:`${D.char} - ${D.className}`,style:{fontFamily:l+", monospace"},children:D.char},D.className)),v.length===0&&g.jsxs("div",{className:"col-span-5 flex flex-col items-center justify-center p-8 text-muted-foreground",children:[g.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"mb-2",children:[g.jsx("circle",{cx:"11",cy:"11",r:"8"}),g.jsx("path",{d:"m21 21-4.35-4.35"})]}),g.jsx("div",{className:"text-sm",children:f?`${i("statusline.no_icons_found")} "${f}"`:i("statusline.no_icons_available")})]})]})})})]})});function JO(n,a){return n.replace(/\{\{(\w+)\}\}/g,(l,i)=>a[i]||l)}function WO(n,a=!1){const l={workDirName:"project",gitBranch:"main",model:"Claude Sonnet 4",inputTokens:"1.2k",outputTokens:"2.5k"},i=JO(n.text,l),s=n.icon||"";if(!i&&n.type!=="usage")return null;const u=p=>/^#[0-9A-F]{6}$/i.test(p);if(a){let p={},m="",v="";n.background&&(u(n.background)?(p={backgroundColor:n.background},v=n.background):(m=Ed[n.background]||"",v=n.background));let b={},w="";return n.color?u(n.color)?b={color:n.color}:w=Ed[n.color]||"text-white":w="text-white",g.jsxs("div",{className:`powerline-module px-4 ${m} ${w}`,style:{...p,...b},children:[g.jsxs("div",{className:"powerline-module-content",children:[s&&g.jsx("span",{children:s}),g.jsx("span",{children:i})]}),g.jsx("div",{className:"powerline-separator","data-current-bg":v})]})}let f={},d="";return n.color&&(u(n.color)?f={color:n.color}:d=Ed[n.color]||""),g.jsxs(g.Fragment,{children:[s&&g.jsx("span",{style:f,className:d,children:s}),g.jsx("span",{style:f,className:d,children:i})]})}function eA({isOpen:n,onOpenChange:a}){const{t:l}=hr(),{config:i,setConfig:s}=Jr(),[u,f]=y.useState(i?.StatusLine||GO()),[d,p]=y.useState(i?.StatusLine?.fontFamily||"Hack Nerd Font Mono"),[m,v]=y.useState(null),[b,w]=y.useState(new Set);y.useEffect(()=>{const le=document.createElement("style");return le.innerHTML=`
|
|
222
222
|
.powerline-module {
|
|
223
223
|
display: inline-flex;
|
|
224
224
|
align-items: center;
|
|
@@ -282,8 +282,9 @@ For more information, see https://radix-ui.com/primitives/docs/components/${a.do
|
|
|
282
282
|
.powerline-separator[data-current-bg="bg_bright_white"] { border-left-color: #f3f4f6; }
|
|
283
283
|
.powerline-separator[data-current-bg="bg_bright_orange"] { border-left-color: #fb923c; }
|
|
284
284
|
.powerline-separator[data-current-bg="bg_bright_purple"] { border-left-color: #c084fc; }
|
|
285
|
-
`,document.head.appendChild(D),()=>{document.head.removeChild(D)}},[]);const[u,f]=y.useState(i?.StatusLine||ZO()),[d,p]=y.useState(null),m=JO.map(D=>({...D,label:l(`statusline.${D.label}`)})),v=D=>{f(T=>({...T,currentStyle:D}))},b=(D,T,R)=>{const H=u.currentStyle,Z=u[H],J=Z&&typeof Z=="object"&&"modules"in Z?[...Z.modules||[]]:[];J[D]&&(J[D]={...J[D],[T]:R}),f(ne=>({...ne,[H]:{modules:J}}))},[S,w]=y.useState([]),_=()=>{w([]),i&&(s({...i,StatusLine:u}),a(!1))},C=({title:D,description:T,variant:R="default"})=>{const H=R==="destructive";return g.jsx("div",{className:`rounded-lg border p-4 ${H?"bg-red-50 border-red-200 text-red-800":"bg-blue-50 border-blue-200 text-blue-800"}`,children:g.jsxs("div",{className:"flex",children:[g.jsx("div",{className:"flex-shrink-0",children:H?g.jsx("svg",{className:"h-5 w-5 text-red-400",viewBox:"0 0 20 20",fill:"currentColor",children:g.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})}):g.jsx("svg",{className:"h-5 w-5 text-blue-400",viewBox:"0 0 20 20",fill:"currentColor",children:g.jsx("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"})})}),g.jsxs("div",{className:"ml-3",children:[g.jsx("h3",{className:`text-sm font-medium ${H?"text-red-800":"text-blue-800"}`,children:D}),g.jsx("div",{className:`mt-2 text-sm ${H?"text-red-700":"text-blue-700"}`,children:T})]})]})})},j=u.currentStyle,N=u[j],U=N&&typeof N=="object"&&"modules"in N?N.modules||[]:[],z=d!==null&&U.length>d?U[d]:null;return g.jsx(Kr,{open:n,onOpenChange:a,children:g.jsxs(lr,{className:"max-w-4xl h-[90vh] overflow-hidden sm:max-w-5xl md:max-w-6xl lg:max-w-7xl animate-in fade-in-90 slide-in-from-bottom-10 duration-300 flex flex-col",children:[g.jsx(ir,{"data-testid":"statusline-config-dialog-header",className:"border-b pb-4",children:g.jsxs(or,{className:"flex items-center",children:[g.jsxs("svg",{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",className:"mr-2",children:[g.jsx("path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),g.jsx("path",{d:"M14 3v4a2 2 0 0 0 2 2h4"}),g.jsx("path",{d:"M3 12h18"})]}),l("statusline.title")]})}),S.length>0&&g.jsx("div",{className:"px-6",children:g.jsx(C,{variant:"destructive",title:"配置验证失败",description:g.jsx("ul",{className:"list-disc pl-5 space-y-1",children:S.map((D,T)=>g.jsx("li",{children:D},T))})})}),g.jsxs("div",{className:"flex flex-col gap-6 flex-1 overflow-hidden",children:[g.jsx("div",{className:"space-y-6",children:g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx(Je,{htmlFor:"theme-style",className:"text-sm font-medium",children:"主题样式"}),g.jsx("div",{className:"w-1/2",children:g.jsx(Mn,{options:[{label:"默认",value:"default"},{label:"Powerline",value:"powerline"}],value:u.currentStyle,onChange:v,"data-testid":"theme-selector",placeholder:"选择主题样式"})})]})}),g.jsxs("div",{className:"grid grid-cols-5 gap-6 overflow-hidden flex-1",children:[g.jsxs("div",{className:"border rounded-lg p-4 flex flex-col overflow-hidden col-span-1",children:[g.jsx("h3",{className:"text-sm font-medium mb-3",children:"组件"}),g.jsx("div",{className:"space-y-2 overflow-y-auto flex-1",children:m.map(D=>g.jsx("div",{className:"flex items-center gap-2 p-2 border rounded cursor-move hover:bg-secondary",draggable:!0,onDragStart:T=>{T.dataTransfer.setData("moduleType",D.value)},children:g.jsx("span",{className:"text-sm",children:D.label})},D.value))})]}),g.jsxs("div",{className:"border rounded-lg p-4 flex flex-col col-span-3",children:[g.jsx("h3",{className:"text-sm font-medium mb-3",children:"预览"}),g.jsx("div",{className:`rounded bg-black/90 text-white font-mono text-sm overflow-x-auto flex items-center border border-border p-3 py-5 shadow-inner ${u.currentStyle==="powerline"?"gap-0 h-8 p-0 items-center overflow-visible relative":"h-5 overflow-hidden"}`,"data-testid":"statusline-preview",onDragOver:D=>{D.preventDefault()},onDrop:D=>{D.preventDefault();const T=D.dataTransfer.getData("moduleType");if(T){const R=u.currentStyle,H=u[R],Z=H&&typeof H=="object"&&"modules"in H?[...H.modules||[]]:[];let J;switch(T){case"workDir":J={type:"workDir",icon:"",text:"{{workDirName}}",color:"bright_blue"};break;case"gitBranch":J={type:"gitBranch",icon:"🌿",text:"{{gitBranch}}",color:"bright_green"};break;case"model":J={type:"model",icon:"🤖",text:"{{model}}",color:"bright_yellow"};break;case"usage":J={type:"usage",icon:"📊",text:"{{inputTokens}} → {{outputTokens}}",color:"bright_magenta"};break;default:J={...IO,type:T}}Z.push(J),f(ne=>({...ne,[R]:{modules:Z}}))}},children:U.length>0?g.jsx("div",{className:"flex items-center flex-wrap gap-0",children:U.map((D,T)=>g.jsx("div",{className:`cursor-pointer ${d===T?"bg-white/20":"hover:bg-white/10"} ${u.currentStyle==="powerline"?"p-0 rounded-none inline-flex overflow-visible relative":"flex items-center gap-1 px-2 py-1 rounded"}`,onClick:()=>p(T),draggable:!0,onDragStart:R=>{R.dataTransfer.setData("dragIndex",T.toString())},onDragOver:R=>{R.preventDefault()},onDrop:R=>{R.preventDefault();const H=parseInt(R.dataTransfer.getData("dragIndex"));if(!isNaN(H)&&H!==T){const Z=u.currentStyle,J=u[Z],ne=J&&typeof J=="object"&&"modules"in J?[...J.modules||[]]:[];if(H>=0&&H<ne.length&&T>=0&&T<=ne.length){const[Se]=ne.splice(H,1);ne.splice(T,0,Se),f(de=>({...de,[Z]:{modules:ne}})),d===H?p(T):d===T&&p(H)}}},children:eA(D,u.currentStyle==="powerline")},T))}):g.jsxs("div",{className:"flex flex-col items-center justify-center w-full py-4 text-center",children:[g.jsxs("svg",{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",className:"text-gray-500 mb-2",children:[g.jsx("path",{d:"M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18z"}),g.jsx("path",{d:"M12 8v8"}),g.jsx("path",{d:"M8 12h8"})]}),g.jsx("span",{className:"text-gray-500 text-sm",children:"拖拽组件到此处进行配置"})]})})]}),g.jsxs("div",{className:"border rounded-lg p-4 flex flex-col overflow-hidden col-span-1",children:[g.jsx("h3",{className:"text-sm font-medium mb-3",children:"属性"}),g.jsx("div",{className:"overflow-y-auto flex-1",children:z&&d!==null?g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{className:"space-y-2",children:[g.jsx(Je,{children:l("statusline.module_type")}),g.jsx(Mn,{options:m,value:z.type,onChange:D=>b(d,"type",D)}),g.jsx("p",{className:"text-xs text-muted-foreground",children:"选择模块类型以确定显示的信息"})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Je,{htmlFor:"module-icon",children:l("statusline.module_icon")}),g.jsx(mt,{id:"module-icon",value:z.icon||"",onChange:D=>b(d,"icon",D.target.value),placeholder:"例如: "}),g.jsx("p",{className:"text-xs text-muted-foreground",children:"输入图标字符或表情符号(可选)"})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Je,{htmlFor:"module-text",children:l("statusline.module_text")}),g.jsx(mt,{id:"module-text",value:z.text,onChange:D=>b(d,"text",D.target.value),placeholder:"例如: {{workDirName}}"}),g.jsxs("div",{className:"text-xs text-muted-foreground",children:[g.jsx("p",{children:"输入显示文本,可使用变量:"}),g.jsxs("div",{className:"flex flex-wrap gap-1 mt-1",children:[g.jsx(Hr,{variant:"secondary",className:"text-xs py-0.5 px-1.5",children:"{{workDirName}}"}),g.jsx(Hr,{variant:"secondary",className:"text-xs py-0.5 px-1.5",children:"{{gitBranch}}"}),g.jsx(Hr,{variant:"secondary",className:"text-xs py-0.5 px-1.5",children:"{{model}}"}),g.jsx(Hr,{variant:"secondary",className:"text-xs py-0.5 px-1.5",children:"{{inputTokens}}"}),g.jsx(Hr,{variant:"secondary",className:"text-xs py-0.5 px-1.5",children:"{{outputTokens}}"})]})]})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Je,{children:l("statusline.module_color")}),g.jsx(Vy,{value:z.color||"",onChange:D=>b(d,"color",D)}),g.jsx("p",{className:"text-xs text-muted-foreground",children:"选择文字颜色"})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Je,{children:l("statusline.module_background")}),g.jsx(Vy,{value:z.background||"",onChange:D=>b(d,"background",D)}),g.jsx("p",{className:"text-xs text-muted-foreground",children:"选择背景颜色(可选)"})]}),g.jsx(Te,{variant:"destructive",size:"sm",onClick:()=>{const D=u.currentStyle,T=u[D],R=T&&typeof T=="object"&&"modules"in T?[...T.modules||[]]:[];R.splice(d,1),f(H=>({...H,[D]:{modules:R}})),p(null)},children:"删除组件"})]}):g.jsx("div",{className:"flex items-center justify-center h-full min-h-[200px]",children:g.jsx("p",{className:"text-muted-foreground text-sm",children:"选择一个组件进行配置"})})})]})]})]}),g.jsxs(Gr,{className:"border-t pt-4 mt-4",children:[g.jsx(Te,{variant:"outline",onClick:()=>a(!1),className:"transition-all hover:scale-105",children:l("app.cancel")}),g.jsx(Te,{onClick:_,"data-testid":"save-statusline-config",className:"transition-all hover:scale-105",children:l("app.save")})]})]})})}function nA({isOpen:n,onOpenChange:a}){const{t:l}=fr(),{config:i,setConfig:s}=Zr(),[u,f]=y.useState(!1);if(!i)return null;const d=b=>{s({...i,LOG:b})},p=b=>{s({...i,CLAUDE_PATH:b.target.value})},m=b=>{const S={enabled:b,currentStyle:i.StatusLine?.currentStyle||"default",default:i.StatusLine?.default||{modules:[]},powerline:i.StatusLine?.powerline||{modules:[]}};s({...i,StatusLine:S})},v=()=>{f(!0)};return g.jsxs(Kr,{open:n,onOpenChange:a,children:[g.jsxs(lr,{"data-testid":"settings-dialog",children:[g.jsx(ir,{children:g.jsx(or,{children:l("toplevel.title")})}),g.jsxs("div",{className:"space-y-4 py-4",children:[g.jsxs("div",{className:"flex items-center space-x-2",children:[g.jsx(qd,{id:"log",checked:i.LOG,onCheckedChange:d}),g.jsx(Je,{htmlFor:"log",className:"transition-all-ease hover:scale-[1.02] cursor-pointer",children:l("toplevel.log")})]}),g.jsx("div",{className:"space-y-2 border-t pt-4",children:g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsxs("div",{className:"flex items-center space-x-2",children:[g.jsx(qd,{id:"statusline",checked:i.StatusLine?.enabled||!1,onCheckedChange:m}),g.jsx(Je,{htmlFor:"statusline",className:"transition-all-ease hover:scale-[1.02] cursor-pointer",children:l("statusline.title")})]}),g.jsx(Te,{variant:"outline",size:"sm",onClick:v,className:"transition-all-ease hover:scale-[1.02] active:scale-[0.98]","data-testid":"statusline-config-button",children:l("app.settings")})]})}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Je,{htmlFor:"log-level",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.log_level")}),g.jsx(Mn,{options:[{label:"fatal",value:"fatal"},{label:"error",value:"error"},{label:"warn",value:"warn"},{label:"info",value:"info"},{label:"debug",value:"debug"},{label:"trace",value:"trace"}],value:i.LOG_LEVEL,onChange:b=>s({...i,LOG_LEVEL:b})})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Je,{htmlFor:"claude-path",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.claude_path")}),g.jsx(mt,{id:"claude-path",value:i.CLAUDE_PATH,onChange:p,className:"transition-all-ease focus:scale-[1.01]"})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Je,{htmlFor:"host",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.host")}),g.jsx(mt,{id:"host",value:i.HOST,onChange:b=>s({...i,HOST:b.target.value}),className:"transition-all-ease focus:scale-[1.01]"})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Je,{htmlFor:"port",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.port")}),g.jsx(mt,{id:"port",type:"number",value:i.PORT,onChange:b=>s({...i,PORT:parseInt(b.target.value,10)}),className:"transition-all-ease focus:scale-[1.01]"})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Je,{htmlFor:"timeout",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.timeout")}),g.jsx(mt,{id:"timeout",value:i.API_TIMEOUT_MS,onChange:b=>s({...i,API_TIMEOUT_MS:b.target.value}),className:"transition-all-ease focus:scale-[1.01]"})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Je,{htmlFor:"proxy-url",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.proxy_url")}),g.jsx(mt,{id:"proxy-url",value:i.PROXY_URL,onChange:b=>s({...i,PROXY_URL:b.target.value}),placeholder:"http://127.0.0.1:7890",className:"transition-all-ease focus:scale-[1.01]"})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Je,{htmlFor:"apikey",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.apikey")}),g.jsx(mt,{id:"apikey",type:"password",value:i.APIKEY,onChange:b=>s({...i,APIKEY:b.target.value}),className:"transition-all-ease focus:scale-[1.01]"})]})]}),g.jsx(Gr,{children:g.jsx(Te,{onClick:()=>a(!1),className:"transition-all-ease hover:scale-[1.02] active:scale-[0.98]",children:l("app.save")})})]}),g.jsx(tA,{isOpen:u,onOpenChange:f,"data-testid":"statusline-config-dialog"})]})}const Sa=y.forwardRef(({className:n,...a},l)=>g.jsx("div",{ref:l,className:rt("rounded-lg border bg-card text-card-foreground shadow-sm",n),...a}));Sa.displayName="Card";const Ea=y.forwardRef(({className:n,...a},l)=>g.jsx("div",{ref:l,className:rt("flex flex-col space-y-1.5 p-6",n),...a}));Ea.displayName="CardHeader";const Ca=y.forwardRef(({className:n,...a},l)=>g.jsx("div",{ref:l,className:rt("text-2xl font-semibold leading-none tracking-tight",n),...a}));Ca.displayName="CardTitle";const kx=y.forwardRef(({className:n,...a},l)=>g.jsx("div",{ref:l,className:rt("text-sm text-muted-foreground",n),...a}));kx.displayName="CardDescription";const _a=y.forwardRef(({className:n,...a},l)=>g.jsx("div",{ref:l,className:rt("p-6 pt-0",n),...a}));_a.displayName="CardContent";const zx=y.forwardRef(({className:n,...a},l)=>g.jsx("div",{ref:l,className:rt("flex items-center p-6 pt-0",n),...a}));zx.displayName="CardFooter";function aA({transformers:n,onEdit:a,onRemove:l}){return!n||!Array.isArray(n)?g.jsx("div",{className:"space-y-3",children:g.jsx("div",{className:"flex items-center justify-center rounded-md border bg-white p-8 text-gray-500",children:"No transformers configured"})}):g.jsx("div",{className:"space-y-3",children:n.map((i,s)=>{if(!i)return g.jsxs("div",{className:"flex items-start justify-between rounded-md border bg-white p-4 transition-all hover:shadow-md animate-slide-in hover:scale-[1.01]",children:[g.jsxs("div",{className:"flex-1 space-y-1.5",children:[g.jsx("p",{className:"text-md font-semibold text-gray-800",children:"Invalid Transformer"}),g.jsx("p",{className:"text-sm text-gray-500",children:"Transformer data is missing"})]}),g.jsxs("div",{className:"ml-4 flex flex-shrink-0 items-center gap-2",children:[g.jsx(Te,{variant:"ghost",size:"icon",onClick:()=>a(s),className:"transition-all-ease hover:scale-110",disabled:!0,children:g.jsx(vu,{className:"h-4 w-4"})}),g.jsx(Te,{variant:"destructive",size:"icon",onClick:()=>l(s),className:"transition-all duration-200 hover:scale-110",children:g.jsx(qr,{className:"h-4 w-4 text-current transition-colors duration-200"})})]})]},s);const u=i.path||"Unnamed Transformer",f=i.options||{},d=()=>!f||Object.keys(f).length===0?g.jsx("p",{className:"text-sm text-gray-500",children:"No parameters configured"}):g.jsx("div",{className:"flex flex-wrap gap-2 max-h-8 overflow-hidden",children:Object.entries(f).map(([p,m])=>g.jsxs("span",{className:"inline-flex items-center px-2 py-1 rounded-md bg-gray-100 text-xs font-medium text-gray-700 border",children:[g.jsxs("span",{className:"text-gray-600",children:[p,":"]}),g.jsx("span",{className:"ml-1 text-gray-800",children:String(m)})]},p))});return g.jsxs("div",{className:"flex items-start justify-between rounded-md border bg-white p-4 transition-all hover:shadow-md animate-slide-in hover:scale-[1.01]",children:[g.jsxs("div",{className:"flex-1 space-y-1.5",children:[g.jsx("p",{className:"text-md font-semibold text-gray-800",children:u}),d()]}),g.jsxs("div",{className:"ml-4 flex flex-shrink-0 items-center gap-2",children:[g.jsx(Te,{variant:"ghost",size:"icon",onClick:()=>a(s),className:"transition-all-ease hover:scale-110",children:g.jsx(vu,{className:"h-4 w-4"})}),g.jsx(Te,{variant:"destructive",size:"icon",onClick:()=>l(s),className:"transition-all duration-200 hover:scale-110",children:g.jsx(qr,{className:"h-4 w-4 text-current transition-colors duration-200"})})]})]},s)})})}function rA(){const{t:n}=fr(),{config:a,setConfig:l}=Zr(),[i,s]=y.useState(null),[u,f]=y.useState(null),[d,p]=y.useState(null);if(!a)return g.jsxs(Sa,{className:"flex h-full flex-col rounded-lg border shadow-sm",children:[g.jsx(Ea,{className:"flex flex-row items-center justify-between border-b p-4",children:g.jsx(Ca,{className:"text-lg",children:n("transformers.title")})}),g.jsx(_a,{className:"flex-grow flex items-center justify-center p-4",children:g.jsx("div",{className:"text-gray-500",children:"Loading transformers configuration..."})})]});const m=Array.isArray(a.transformers)?a.transformers:[],v=()=>{p({name:"",path:"",options:{}}),s(m.length)},b=j=>{const N=[...m];N.splice(j,1),l({...a,transformers:N}),f(null)},S=(j,N,U,z)=>{if(j<m.length){const D=[...m];z!==void 0?D[j].options[z]=U:D[j][N]=U,l({...a,transformers:D})}else if(d){const D={...d};z!==void 0?D.options[z]=U:D[N]=U,p(D)}},w=i!==null?i<m.length?m[i]:d:null,_=()=>{if(d&&i===m.length){const j=[...m,d];l({...a,transformers:j})}s(null),p(null)},C=()=>{s(null),p(null)};return g.jsxs(Sa,{className:"flex h-full flex-col rounded-lg border shadow-sm",children:[g.jsxs(Ea,{className:"flex flex-row items-center justify-between border-b p-4",children:[g.jsxs(Ca,{className:"text-lg",children:[n("transformers.title")," ",g.jsxs("span",{className:"text-sm font-normal text-gray-500",children:["(",m.length,")"]})]}),g.jsx(Te,{onClick:v,children:n("transformers.add")})]}),g.jsx(_a,{className:"flex-grow overflow-y-auto p-4",children:g.jsx(aA,{transformers:m,onEdit:s,onRemove:f})}),g.jsx(Kr,{open:i!==null,onOpenChange:C,children:g.jsxs(lr,{children:[g.jsx(ir,{children:g.jsx(or,{children:n("transformers.edit")})}),w&&i!==null&&g.jsxs("div",{className:"space-y-4 py-4 px-6 max-h-96 overflow-y-auto",children:[g.jsxs("div",{className:"space-y-2",children:[g.jsx(Je,{htmlFor:"transformer-path",children:n("transformers.path")}),g.jsx(mt,{id:"transformer-path",value:w.path||"",onChange:j=>S(i,"path",j.target.value)})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx(Je,{children:n("transformers.parameters")}),g.jsx(Te,{variant:"outline",size:"sm",onClick:()=>{const j=w.options||{},N=`param${Object.keys(j).length+1}`;if(i!==null){const U={...j,[N]:""};if(i<m.length){const z=[...m];z[i].options=U,l({...a,transformers:z})}else d&&p({...d,options:U})}},children:g.jsx(Bd,{className:"h-4 w-4"})})]}),Object.entries(w.options||{}).map(([j,N])=>g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(mt,{value:j,onChange:U=>{const D={...w.options||{}};if(delete D[j],D[U.target.value]=N,i!==null)if(i<m.length){const T=[...m];T[i].options=D,l({...a,transformers:T})}else d&&p({...d,options:D})},className:"flex-1"}),g.jsx(mt,{value:N,onChange:U=>{i!==null&&S(i,"parameters",U.target.value,j)},className:"flex-1"}),g.jsx(Te,{variant:"outline",size:"icon",onClick:()=>{if(i!==null){const z={...w.options||{}};if(delete z[j],i<m.length){const D=[...m];D[i].options=z,l({...a,transformers:D})}else d&&p({...d,options:z})}},children:g.jsx(qr,{className:"h-4 w-4"})})]},j))]})]}),g.jsxs(Gr,{children:[g.jsx(Te,{variant:"outline",onClick:C,children:n("app.cancel")}),g.jsx(Te,{onClick:_,children:n("app.save")})]})]})}),g.jsx(Kr,{open:u!==null,onOpenChange:()=>f(null),children:g.jsxs(lr,{children:[g.jsxs(ir,{children:[g.jsx(or,{children:n("transformers.delete")}),g.jsx(zu,{children:n("transformers.delete_transformer_confirm")})]}),g.jsxs(Gr,{children:[g.jsx(Te,{variant:"outline",onClick:()=>f(null),children:n("app.cancel")}),g.jsx(Te,{variant:"destructive",onClick:()=>u!==null&&b(u),children:n("app.delete")})]})]})})]})}function lA({providers:n,onEdit:a,onRemove:l}){return!n||!Array.isArray(n)?g.jsx("div",{className:"space-y-3",children:g.jsx("div",{className:"flex items-center justify-center rounded-md border bg-white p-8 text-gray-500",children:"No providers configured"})}):g.jsx("div",{className:"space-y-3",children:n.map((i,s)=>{if(!i)return g.jsxs("div",{className:"flex items-start justify-between rounded-md border bg-white p-4 transition-all hover:shadow-md animate-slide-in hover:scale-[1.01]",children:[g.jsxs("div",{className:"flex-1 space-y-1.5",children:[g.jsx("p",{className:"text-md font-semibold text-gray-800",children:"Invalid Provider"}),g.jsx("p",{className:"text-sm text-gray-500",children:"Provider data is missing"})]}),g.jsxs("div",{className:"ml-4 flex flex-shrink-0 items-center gap-2",children:[g.jsx(Te,{variant:"ghost",size:"icon",onClick:()=>a(s),className:"transition-all-ease hover:scale-110",disabled:!0,children:g.jsx(vu,{className:"h-4 w-4"})}),g.jsx(Te,{variant:"destructive",size:"icon",onClick:()=>l(s),className:"transition-all duration-200 hover:scale-110",children:g.jsx(qr,{className:"h-4 w-4 text-current transition-colors duration-200"})})]})]},s);const u=i.name||"Unnamed Provider",f=i.api_base_url||"No API URL",d=Array.isArray(i.models)?i.models:[];return g.jsxs("div",{className:"flex items-start justify-between rounded-md border bg-white p-4 transition-all hover:shadow-md animate-slide-in hover:scale-[1.01]",children:[g.jsxs("div",{className:"flex-1 space-y-1.5",children:[g.jsx("p",{className:"text-md font-semibold text-gray-800",children:u}),g.jsx("p",{className:"text-sm text-gray-500",children:f}),g.jsx("div",{className:"flex flex-wrap gap-2 pt-2",children:d.map((p,m)=>g.jsx(Hr,{variant:"outline",className:"font-normal transition-all-ease hover:scale-105",children:p||"Unnamed Model"},m))})]}),g.jsxs("div",{className:"ml-4 flex flex-shrink-0 items-center gap-2",children:[g.jsx(Te,{variant:"ghost",size:"icon",onClick:()=>a(s),className:"transition-all-ease hover:scale-110",children:g.jsx(vu,{className:"h-4 w-4"})}),g.jsx(Te,{variant:"destructive",size:"icon",onClick:()=>l(s),className:"transition-all duration-200 hover:scale-110",children:g.jsx(qr,{className:"h-4 w-4 text-current transition-colors duration-200"})})]})]},s)})})}const iA=y.forwardRef(({options:n,value:a,onChange:l,onEnter:i,searchPlaceholder:s="Search...",emptyPlaceholder:u="No options found.",inputPlaceholder:f="Type or select..."},d)=>{const[p,m]=y.useState(!1),[v,b]=y.useState(a||""),S=y.useRef(null);y.useImperativeHandle(d,()=>S.current),y.useEffect(()=>{b(a||"")},[a]);const w=N=>{const U=N.target.value;b(U),l(U)},_=N=>{N.key==="Enter"&&v.trim()&&i&&(i(v.trim()),b(""))},C=N=>{b(N),l(N),i&&(i(N),b("")),m(!1)},j=()=>v;return y.useImperativeHandle(d,()=>({...S.current,value:v,getCurrentValue:j,clearInput:()=>{b(""),l("")}})),g.jsxs("div",{className:"relative",children:[g.jsx(mt,{ref:S,value:v,onChange:w,onKeyDown:_,placeholder:f,className:"pr-10"}),g.jsxs(Yu,{open:p,onOpenChange:m,children:[g.jsx(qu,{asChild:!0,children:g.jsx(Te,{variant:"ghost",size:"sm",className:"absolute right-0 top-0 h-full px-3 py-2 hover:bg-transparent",children:g.jsx(fb,{className:"h-4 w-4 opacity-50"})})}),g.jsx(Ku,{className:"w-[--radix-popover-trigger-width] p-0 animate-fade-in",children:g.jsxs(qb,{children:[g.jsx(Kb,{placeholder:s}),g.jsxs(Gb,{children:[g.jsx(Fb,{children:u}),g.jsx(Xb,{children:n.map(N=>g.jsxs(Qb,{value:N.value,onSelect:()=>C(N.value),className:"transition-all-ease hover:bg-accent hover:text-accent-foreground",children:[g.jsx(cb,{className:rt("mr-2 h-4 w-4 transition-opacity",a===N.value?"opacity-100":"opacity-0")}),N.label]},N.value))})]})]})})]})]})});function oA(){const{t:n}=fr(),{config:a,setConfig:l}=Zr(),[i,s]=y.useState(null),[u,f]=y.useState(null),[d,p]=y.useState({}),[m,v]=y.useState({}),[b,S]=y.useState({}),[w,_]=y.useState([]),[C,j]=y.useState(null),[N,U]=y.useState(!1),[z,D]=y.useState([]),[T,R]=y.useState({}),[H,Z]=y.useState(null),[J,ne]=y.useState(null),Se=y.useRef(null);if(y.useEffect(()=>{(async()=>{try{const ae=await fetch("https://pub-0dc3e1677e894f07bbea11b17a29e032.r2.dev/providers.json");if(ae.ok){const ue=await ae.json();D(ue||[])}else console.error("Failed to fetch provider templates")}catch(ae){console.error("Failed to fetch provider templates:",ae)}})()},[]),y.useEffect(()=>{(async()=>{try{const ae=await Gt.get("/transformers");_(ae.transformers)}catch(ae){console.error("Failed to fetch transformers:",ae)}})()},[]),!a)return g.jsxs(Sa,{className:"flex h-full flex-col rounded-lg border shadow-sm",children:[g.jsx(Ea,{className:"flex flex-row items-center justify-between border-b p-4",children:g.jsx(Ca,{className:"text-lg",children:n("providers.title")})}),g.jsx(_a,{className:"flex-grow flex items-center justify-center p-4",children:g.jsx("div",{className:"text-gray-500",children:"Loading providers configuration..."})})]});const de=Array.isArray(a.Providers)?a.Providers:[],oe=()=>{const le={name:"",api_base_url:"",api_key:"",models:[]};s(a.Providers.length),j(le),U(!0),R(ae=>({...ae,[a.Providers.length]:!1})),Z(null),ne(null)},fe=le=>{const ae=a.Providers[le];s(le),j(JSON.parse(JSON.stringify(ae))),U(!1),R(ue=>({...ue,[le]:!1})),Z(null),ne(null)},he=()=>{if(!C)return;if(!C.name||C.name.trim()===""){ne(n("providers.name_required"));return}const le=C.name.trim();if(a.Providers.some((ue,ce)=>!N&&ce===i?!1:ue.name.toLowerCase()===le.toLowerCase())){ne(n("providers.name_duplicate"));return}if(!C.api_key||C.api_key.trim()===""){Z(n("providers.api_key_required"));return}if(Z(null),ne(null),i!==null&&C){const ue=[...a.Providers];N?ue.push(C):ue[i]=C,l({...a,Providers:ue})}i!==null&&R(ue=>{const ce={...ue};return delete ce[i],ce}),s(null),j(null),U(!1)},L=()=>{i!==null&&(p(le=>{const ae={...le};return delete ae[i],ae}),R(le=>{const ae={...le};return delete ae[i],ae})),s(null),j(null),U(!1),Z(null),ne(null)},I=le=>{const ae=[...a.Providers];ae.splice(le,1),l({...a,Providers:ae}),f(null)},V=(le,ae,ue)=>{if(C){const ce={...C,[ae]:ue};j(ce)}},ge=(le,ae)=>{if(!ae||!C)return;const ue={...C};ue.transformer||(ue.transformer={use:[]}),ue.transformer.use=[...ue.transformer.use,ae],j(ue)},O=(le,ae)=>{if(!C)return;const ue={...C};if(ue.transformer){const ce=[...ue.transformer.use];ce.splice(ae,1),ue.transformer.use=ce,ce.length===0&&Object.keys(ue.transformer).length===1&&delete ue.transformer}j(ue)},K=(le,ae,ue)=>{if(!ue||!C)return;const ce={...C};ce.transformer||(ce.transformer={use:[]}),ce.transformer[ae]||(ce.transformer[ae]={use:[]}),ce.transformer[ae].use=[...ce.transformer[ae].use,ue],j(ce)},P=(le,ae,ue)=>{if(!C)return;const ce={...C};if(ce.transformer&&ce.transformer[ae]){const je=[...ce.transformer[ae].use];je.splice(ue,1),ce.transformer[ae].use=je,je.length===0&&Object.keys(ce.transformer[ae]).length===1&&delete ce.transformer[ae]}j(ce)},G=(le,ae,ue,ce)=>{if(!C)return;const je={...C};if(je.transformer||(je.transformer={use:[]}),je.transformer.use&&je.transformer.use.length>ae){const Pe=je.transformer.use[ae];if(Array.isArray(Pe)){const Me=[...Pe];if(Me.length>1&&typeof Me[1]=="object"&&Me[1]!==null){const Rn={...Me[1],[ue]:ce};Me[1]=Rn}else if(Me.length>1){const ut={[ue]:ce};Me.splice(1,Me.length-1,ut)}else{const ut={[ue]:ce};Me.push(ut)}je.transformer.use[ae]=Me}else{const Me={[ue]:ce};je.transformer.use[ae]=[Pe,Me]}}j(je)},ee=(le,ae,ue)=>{if(!C)return;const ce={...C};if(!ce.transformer?.use||ce.transformer.use.length<=ae)return;const je=ce.transformer.use[ae];if(Array.isArray(je)&&je.length>1){const Pe=[...je];if(typeof Pe[1]=="object"&&Pe[1]!==null){const Me={...Pe[1]};delete Me[ue],Object.keys(Me).length===0?Pe.splice(1,1):Pe[1]=Me,ce.transformer.use[ae]=Pe,j(ce)}}},se=(le,ae,ue,ce,je)=>{if(!C)return;const Pe={...C};if(Pe.transformer||(Pe.transformer={use:[]}),Pe.transformer[ae]||(Pe.transformer[ae]={use:[]}),Pe.transformer[ae].use&&Pe.transformer[ae].use.length>ue){const Me=Pe.transformer[ae].use[ue];if(Array.isArray(Me)){const ut=[...Me];if(ut.length>1&&typeof ut[1]=="object"&&ut[1]!==null){const Ir={...ut[1],[ce]:je};ut[1]=Ir}else if(ut.length>1){const Rn={[ce]:je};ut.splice(1,ut.length-1,Rn)}else{const Rn={[ce]:je};ut.push(Rn)}Pe.transformer[ae].use[ue]=ut}else{const ut={[ce]:je};Pe.transformer[ae].use[ue]=[Me,ut]}}j(Pe)},pe=(le,ae,ue,ce)=>{if(!C)return;const je={...C};if(!je.transformer?.[ae]?.use||je.transformer[ae].use.length<=ue)return;const Pe=je.transformer[ae].use[ue];if(Array.isArray(Pe)&&Pe.length>1){const Me=[...Pe];if(typeof Me[1]=="object"&&Me[1]!==null){const ut={...Me[1]};delete ut[ce],Object.keys(ut).length===0?Me.splice(1,1):Me[1]=ut,je.transformer[ae].use[ue]=Me,j(je)}}},ve=(le,ae)=>{if(!ae.trim()||!C)return;const ue={...C},ce=Array.isArray(ue.models)?[...ue.models]:[];ce.includes(ae.trim())||(ce.push(ae.trim()),ue.models=ce,j(ue))},ze=le=>{if(le)try{const ae=JSON.parse(le);if(ae){const ue=C?.name,ce=JSON.parse(JSON.stringify(ae));!N&&ue&&(ce.name=ue),j(ce)}}catch(ae){console.error("Failed to parse template",ae)}},Ze=(le,ae)=>{if(!C)return;const ue={...C},ce=Array.isArray(ue.models)?[...ue.models]:[];ae>=0&&ae<ce.length&&(ce.splice(ae,1),ue.models=ce,j(ue))},Ae=C||(i!==null?de[i]:null);return g.jsxs(Sa,{className:"flex h-full flex-col rounded-lg border shadow-sm",children:[g.jsxs(Ea,{className:"flex flex-row items-center justify-between border-b p-4",children:[g.jsxs(Ca,{className:"text-lg",children:[n("providers.title")," ",g.jsxs("span",{className:"text-sm font-normal text-gray-500",children:["(",de.length,")"]})]}),g.jsx(Te,{onClick:oe,children:n("providers.add")})]}),g.jsx(_a,{className:"flex-grow overflow-y-auto p-4",children:g.jsx(lA,{providers:de,onEdit:fe,onRemove:f})}),g.jsx(Kr,{open:i!==null,onOpenChange:le=>{le||L()},children:g.jsxs(lr,{className:"max-h-[80vh] flex flex-col sm:max-w-2xl",children:[g.jsx(ir,{children:g.jsx(or,{children:n("providers.edit")})}),Ae&&i!==null&&g.jsxs("div",{className:"space-y-4 p-4 overflow-y-auto flex-grow",children:[z.length>0&&g.jsxs("div",{className:"space-y-2",children:[g.jsx(Je,{children:n("providers.import_from_template")}),g.jsx(Mn,{options:z.map(le=>({label:le.name,value:JSON.stringify(le)})),value:"",onChange:ze,placeholder:n("providers.select_template"),emptyPlaceholder:n("providers.no_templates_found")})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Je,{htmlFor:"name",children:n("providers.name")}),g.jsx(mt,{id:"name",value:Ae.name||"",onChange:le=>{V(i,"name",le.target.value),J&&ne(null)},className:J?"border-red-500":""}),J&&g.jsx("p",{className:"text-sm text-red-500",children:J})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Je,{htmlFor:"api_base_url",children:n("providers.api_base_url")}),g.jsx(mt,{id:"api_base_url",value:Ae.api_base_url||"",onChange:le=>V(i,"api_base_url",le.target.value)})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Je,{htmlFor:"api_key",children:n("providers.api_key")}),g.jsxs("div",{className:"relative",children:[g.jsx(mt,{id:"api_key",type:T[i||0]?"text":"password",value:Ae.api_key||"",onChange:le=>V(i,"api_key",le.target.value),className:H?"border-red-500":""}),g.jsx(Te,{type:"button",variant:"ghost",size:"icon",className:"absolute right-2 top-1/2 transform -translate-y-1/2 h-8 w-8",onClick:()=>{const le=i||0;R(ae=>({...ae,[le]:!ae[le]}))},children:T[i||0]?g.jsx(yN,{className:"h-4 w-4"}):g.jsx(xN,{className:"h-4 w-4"})})]}),H&&g.jsx("p",{className:"text-sm text-red-500",children:H})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Je,{htmlFor:"models",children:n("providers.models")}),g.jsxs("div",{className:"space-y-2",children:[g.jsxs("div",{className:"flex gap-2",children:[g.jsx("div",{className:"flex-1",children:d[i]?g.jsx(iA,{ref:Se,options:(Ae.models||[]).map(le=>({label:le,value:le})),value:"",onChange:()=>{},onEnter:le=>{i!==null&&ve(i,le)},inputPlaceholder:n("providers.models_placeholder")}):g.jsx(mt,{id:"models",placeholder:n("providers.models_placeholder"),onKeyDown:le=>{le.key==="Enter"&&le.currentTarget.value.trim()&&i!==null&&(ve(i,le.currentTarget.value),le.currentTarget.value="")}})}),g.jsx(Te,{onClick:()=>{if(d[i]&&Se.current){const le=Se.current,ae=le.getCurrentValue();ae&&ae.trim()&&i!==null&&(ve(i,ae.trim()),le.clearInput())}else{const le=document.getElementById("models");le&&le.value.trim()&&i!==null&&(ve(i,le.value),le.value="")}},children:n("providers.add_model")})]}),g.jsx("div",{className:"flex flex-wrap gap-2 pt-2",children:(Ae.models||[]).map((le,ae)=>g.jsxs(Hr,{variant:"outline",className:"font-normal flex items-center gap-1",children:[le,g.jsx("button",{type:"button",className:"ml-1 rounded-full hover:bg-gray-200",onClick:()=>i!==null&&Ze(i,ae),children:g.jsx(Xl,{className:"h-3 w-3"})})]},ae))})]})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Je,{children:n("providers.provider_transformer")}),g.jsx("div",{className:"flex gap-2",children:g.jsx(Mn,{options:w.map(le=>({label:le.name,value:le.name})),value:"",onChange:le=>{i!==null&&ge(i,le)},placeholder:n("providers.select_transformer"),emptyPlaceholder:n("providers.no_transformers")})}),Ae.transformer?.use&&Ae.transformer.use.length>0&&g.jsxs("div",{className:"space-y-2 mt-2",children:[g.jsx("div",{className:"text-sm font-medium text-gray-700",children:n("providers.selected_transformers")}),Ae.transformer.use.map((le,ae)=>g.jsxs("div",{className:"border rounded-md p-3",children:[g.jsxs("div",{className:"flex gap-2 items-center mb-2",children:[g.jsx("div",{className:"flex-1 bg-gray-50 rounded p-2 text-sm",children:typeof le=="string"?le:Array.isArray(le)?String(le[0]):String(le)}),g.jsx(Te,{variant:"outline",size:"icon",onClick:()=>{i!==null&&O(i,ae)},children:g.jsx(qr,{className:"h-4 w-4"})})]}),g.jsxs("div",{className:"mt-2 pl-4 border-l-2 border-gray-200",children:[g.jsx(Je,{className:"text-sm",children:n("providers.transformer_parameters")}),g.jsxs("div",{className:"space-y-2 mt-1",children:[g.jsxs("div",{className:"flex gap-2",children:[g.jsx(mt,{placeholder:n("providers.parameter_name"),value:m[`provider-${i}-transformer-${ae}`]?.name||"",onChange:ue=>{const ce=`provider-${i}-transformer-${ae}`;v(je=>({...je,[ce]:{...je[ce]||{name:"",value:""},name:ue.target.value}}))}}),g.jsx(mt,{placeholder:n("providers.parameter_value"),value:m[`provider-${i}-transformer-${ae}`]?.value||"",onChange:ue=>{const ce=`provider-${i}-transformer-${ae}`;v(je=>({...je,[ce]:{...je[ce]||{name:"",value:""},value:ue.target.value}}))}}),g.jsx(Te,{size:"sm",onClick:()=>{if(i!==null){const ue=`provider-${i}-transformer-${ae}`,ce=m[ue];ce&&ce.name&&ce.value&&(G(i,ae,ce.name,ce.value),v(je=>({...je,[ue]:{name:"",value:""}})))}},children:g.jsx(Bd,{className:"h-4 w-4"})})]}),(()=>{if(!Ae.transformer?.use||Ae.transformer.use.length<=ae)return null;const ue=Ae.transformer.use[ae];let ce={};return Array.isArray(ue)&&ue.length>1&&typeof ue[1]=="object"&&ue[1]!==null&&(ce=ue[1]),Object.keys(ce).length>0?g.jsx("div",{className:"space-y-1",children:Object.entries(ce).map(([je,Pe])=>g.jsxs("div",{className:"flex items-center justify-between bg-gray-50 rounded p-2",children:[g.jsxs("div",{className:"text-sm",children:[g.jsxs("span",{className:"font-medium",children:[je,":"]})," ",String(Pe)]}),g.jsx(Te,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>{i!==null&&ee(i,ae,je)},children:g.jsx(Xl,{className:"h-3 w-3"})})]},je))}):null})()]})]})]},ae))]})]}),Ae.models&&Ae.models.length>0&&g.jsxs("div",{className:"space-y-2",children:[g.jsx(Je,{children:n("providers.model_transformers")}),g.jsx("div",{className:"space-y-3",children:(Ae.models||[]).map((le,ae)=>g.jsxs("div",{className:"border rounded-md p-3",children:[g.jsx("div",{className:"font-medium text-sm mb-2",children:le}),g.jsx("div",{className:"flex gap-2",children:g.jsx("div",{className:"flex-1 flex gap-2",children:g.jsx(Mn,{options:w.map(ue=>({label:ue.name,value:ue.name})),value:"",onChange:ue=>{i!==null&&K(i,le,ue)},placeholder:n("providers.select_transformer"),emptyPlaceholder:n("providers.no_transformers")})})}),Ae.transformer?.[le]?.use&&Ae.transformer[le].use.length>0&&g.jsxs("div",{className:"space-y-2 mt-2",children:[g.jsx("div",{className:"text-sm font-medium text-gray-700",children:n("providers.selected_transformers")}),Ae.transformer[le].use.map((ue,ce)=>g.jsxs("div",{className:"border rounded-md p-3",children:[g.jsxs("div",{className:"flex gap-2 items-center mb-2",children:[g.jsx("div",{className:"flex-1 bg-gray-50 rounded p-2 text-sm",children:typeof ue=="string"?ue:Array.isArray(ue)?String(ue[0]):String(ue)}),g.jsx(Te,{variant:"outline",size:"icon",onClick:()=>{i!==null&&P(i,le,ce)},children:g.jsx(qr,{className:"h-4 w-4"})})]}),g.jsxs("div",{className:"mt-2 pl-4 border-l-2 border-gray-200",children:[g.jsx(Je,{className:"text-sm",children:n("providers.transformer_parameters")}),g.jsxs("div",{className:"space-y-2 mt-1",children:[g.jsxs("div",{className:"flex gap-2",children:[g.jsx(mt,{placeholder:n("providers.parameter_name"),value:b[`model-${i}-${le}-transformer-${ce}`]?.name||"",onChange:je=>{const Pe=`model-${i}-${le}-transformer-${ce}`;S(Me=>({...Me,[Pe]:{...Me[Pe]||{name:"",value:""},name:je.target.value}}))}}),g.jsx(mt,{placeholder:n("providers.parameter_value"),value:b[`model-${i}-${le}-transformer-${ce}`]?.value||"",onChange:je=>{const Pe=`model-${i}-${le}-transformer-${ce}`;S(Me=>({...Me,[Pe]:{...Me[Pe]||{name:"",value:""},value:je.target.value}}))}}),g.jsx(Te,{size:"sm",onClick:()=>{if(i!==null){const je=`model-${i}-${le}-transformer-${ce}`,Pe=b[je];Pe&&Pe.name&&Pe.value&&(se(i,le,ce,Pe.name,Pe.value),S(Me=>({...Me,[je]:{name:"",value:""}})))}},children:g.jsx(Bd,{className:"h-4 w-4"})})]}),(()=>{if(!Ae.transformer?.[le]?.use||Ae.transformer[le].use.length<=ce)return null;const je=Ae.transformer[le].use[ce];let Pe={};return Array.isArray(je)&&je.length>1&&typeof je[1]=="object"&&je[1]!==null&&(Pe=je[1]),Object.keys(Pe).length>0?g.jsx("div",{className:"space-y-1",children:Object.entries(Pe).map(([Me,ut])=>g.jsxs("div",{className:"flex items-center justify-between bg-gray-50 rounded p-2",children:[g.jsxs("div",{className:"text-sm",children:[g.jsxs("span",{className:"font-medium",children:[Me,":"]})," ",String(ut)]}),g.jsx(Te,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>{i!==null&&pe(i,le,ce,Me)},children:g.jsx(Xl,{className:"h-3 w-3"})})]},Me))}):null})()]})]})]},ce))]})]},ae))})]})]}),g.jsx("div",{className:"space-y-3 mt-auto",children:g.jsx("div",{className:"flex justify-end gap-2",children:g.jsx(Te,{onClick:he,children:n("app.save")})})})]})}),g.jsx(Kr,{open:u!==null,onOpenChange:()=>f(null),children:g.jsxs(lr,{children:[g.jsxs(ir,{children:[g.jsx(or,{children:n("providers.delete")}),g.jsx(zu,{children:n("providers.delete_provider_confirm")})]}),g.jsxs(Gr,{children:[g.jsx(Te,{variant:"outline",onClick:()=>f(null),children:n("providers.cancel")}),g.jsx(Te,{variant:"destructive",onClick:()=>u!==null&&I(u),children:n("providers.delete")})]})]})})]})}function sA(){const{t:n}=fr(),{config:a,setConfig:l}=Zr();if(!a)return g.jsxs(Sa,{className:"flex h-full flex-col rounded-lg border shadow-sm",children:[g.jsx(Ea,{className:"border-b p-4",children:g.jsx(Ca,{className:"text-lg",children:n("router.title")})}),g.jsx(_a,{className:"flex-grow flex items-center justify-center p-4",children:g.jsx("div",{className:"text-gray-500",children:"Loading router configuration..."})})]});const i=a.Router||{default:"",background:"",think:"",longContext:"",longContextThreshold:6e4,webSearch:""},s=(d,p)=>{const v={...a.Router||{},[d]:p};l({...a,Router:v})},f=(Array.isArray(a.Providers)?a.Providers:[]).flatMap(d=>{if(!d)return[];const p=Array.isArray(d.models)?d.models:[],m=d.name||"Unknown Provider";return p.map(v=>({value:`${m},${v||"Unknown Model"}`,label:`${m}, ${v||"Unknown Model"}`}))});return g.jsxs(Sa,{className:"flex h-full flex-col rounded-lg border shadow-sm",children:[g.jsx(Ea,{className:"border-b p-4",children:g.jsx(Ca,{className:"text-lg",children:n("router.title")})}),g.jsxs(_a,{className:"flex-grow space-y-5 overflow-y-auto p-4",children:[g.jsxs("div",{className:"space-y-2",children:[g.jsx(Je,{children:n("router.default")}),g.jsx(Mn,{options:f,value:i.default||"",onChange:d=>s("default",d),placeholder:n("router.selectModel"),searchPlaceholder:n("router.searchModel"),emptyPlaceholder:n("router.noModelFound")})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Je,{children:n("router.background")}),g.jsx(Mn,{options:f,value:i.background||"",onChange:d=>s("background",d),placeholder:n("router.selectModel"),searchPlaceholder:n("router.searchModel"),emptyPlaceholder:n("router.noModelFound")})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Je,{children:n("router.think")}),g.jsx(Mn,{options:f,value:i.think||"",onChange:d=>s("think",d),placeholder:n("router.selectModel"),searchPlaceholder:n("router.searchModel"),emptyPlaceholder:n("router.noModelFound")})]}),g.jsx("div",{className:"space-y-2",children:g.jsxs("div",{className:"flex items-center gap-4",children:[g.jsxs("div",{className:"flex-1",children:[g.jsx(Je,{children:n("router.longContext")}),g.jsx(Mn,{options:f,value:i.longContext||"",onChange:d=>s("longContext",d),placeholder:n("router.selectModel"),searchPlaceholder:n("router.searchModel"),emptyPlaceholder:n("router.noModelFound")})]}),g.jsxs("div",{className:"w-48",children:[g.jsx(Je,{children:n("router.longContextThreshold")}),g.jsx(mt,{type:"number",value:i.longContextThreshold||6e4,onChange:d=>s("longContextThreshold",parseInt(d.target.value)||6e4),placeholder:"60000"})]})]})}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Je,{children:n("router.webSearch")}),g.jsx(Mn,{options:f,value:i.webSearch||"",onChange:d=>s("webSearch",d),placeholder:n("router.selectModel"),searchPlaceholder:n("router.searchModel"),emptyPlaceholder:n("router.noModelFound")})]})]})]})}function uA(n,a,l){return a in n?Object.defineProperty(n,a,{value:l,enumerable:!0,configurable:!0,writable:!0}):n[a]=l,n}function qy(n,a){var l=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);a&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable})),l.push.apply(l,i)}return l}function Ky(n){for(var a=1;a<arguments.length;a++){var l=arguments[a]!=null?arguments[a]:{};a%2?qy(Object(l),!0).forEach(function(i){uA(n,i,l[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(l)):qy(Object(l)).forEach(function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(l,i))})}return n}function cA(n,a){if(n==null)return{};var l={},i=Object.keys(n),s,u;for(u=0;u<i.length;u++)s=i[u],!(a.indexOf(s)>=0)&&(l[s]=n[s]);return l}function fA(n,a){if(n==null)return{};var l=cA(n,a),i,s;if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(n);for(s=0;s<u.length;s++)i=u[s],!(a.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(n,i)&&(l[i]=n[i])}return l}function dA(n,a){return hA(n)||mA(n,a)||pA(n,a)||gA()}function hA(n){if(Array.isArray(n))return n}function mA(n,a){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(n)))){var l=[],i=!0,s=!1,u=void 0;try{for(var f=n[Symbol.iterator](),d;!(i=(d=f.next()).done)&&(l.push(d.value),!(a&&l.length===a));i=!0);}catch(p){s=!0,u=p}finally{try{!i&&f.return!=null&&f.return()}finally{if(s)throw u}}return l}}function pA(n,a){if(n){if(typeof n=="string")return Gy(n,a);var l=Object.prototype.toString.call(n).slice(8,-1);if(l==="Object"&&n.constructor&&(l=n.constructor.name),l==="Map"||l==="Set")return Array.from(n);if(l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l))return Gy(n,a)}}function Gy(n,a){(a==null||a>n.length)&&(a=n.length);for(var l=0,i=new Array(a);l<a;l++)i[l]=n[l];return i}function gA(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
286
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vA(n,a,l){return a in n?Object.defineProperty(n,a,{value:l,enumerable:!0,configurable:!0,writable:!0}):n[a]=l,n}function Fy(n,a){var l=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);a&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable})),l.push.apply(l,i)}return l}function Xy(n){for(var a=1;a<arguments.length;a++){var l=arguments[a]!=null?arguments[a]:{};a%2?Fy(Object(l),!0).forEach(function(i){vA(n,i,l[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(l)):Fy(Object(l)).forEach(function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(l,i))})}return n}function yA(){for(var n=arguments.length,a=new Array(n),l=0;l<n;l++)a[l]=arguments[l];return function(i){return a.reduceRight(function(s,u){return u(s)},i)}}function co(n){return function a(){for(var l=this,i=arguments.length,s=new Array(i),u=0;u<i;u++)s[u]=arguments[u];return s.length>=n.length?n.apply(this,s):function(){for(var f=arguments.length,d=new Array(f),p=0;p<f;p++)d[p]=arguments[p];return a.apply(l,[].concat(s,d))}}}function Cu(n){return{}.toString.call(n).includes("Object")}function bA(n){return!Object.keys(n).length}function So(n){return typeof n=="function"}function xA(n,a){return Object.prototype.hasOwnProperty.call(n,a)}function wA(n,a){return Cu(a)||nr("changeType"),Object.keys(a).some(function(l){return!xA(n,l)})&&nr("changeField"),a}function SA(n){So(n)||nr("selectorType")}function EA(n){So(n)||Cu(n)||nr("handlerType"),Cu(n)&&Object.values(n).some(function(a){return!So(a)})&&nr("handlersType")}function CA(n){n||nr("initialIsRequired"),Cu(n)||nr("initialType"),bA(n)&&nr("initialContent")}function _A(n,a){throw new Error(n[a]||n.default)}var NA={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},nr=co(_A)(NA),nu={changes:wA,selector:SA,handler:EA,initial:CA};function RA(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};nu.initial(n),nu.handler(a);var l={current:n},i=co(AA)(l,a),s=co(OA)(l),u=co(nu.changes)(n),f=co(jA)(l);function d(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(v){return v};return nu.selector(m),m(l.current)}function p(m){yA(i,s,u,f)(m)}return[d,p]}function jA(n,a){return So(a)?a(n.current):a}function OA(n,a){return n.current=Xy(Xy({},n.current),a),a}function AA(n,a,l){return So(a)?a(n.current):Object.keys(l).forEach(function(i){var s;return(s=a[i])===null||s===void 0?void 0:s.call(a,n.current[i])}),l}var TA={create:RA},MA={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/vs"}};function DA(n){return function a(){for(var l=this,i=arguments.length,s=new Array(i),u=0;u<i;u++)s[u]=arguments[u];return s.length>=n.length?n.apply(this,s):function(){for(var f=arguments.length,d=new Array(f),p=0;p<f;p++)d[p]=arguments[p];return a.apply(l,[].concat(s,d))}}}function LA(n){return{}.toString.call(n).includes("Object")}function kA(n){return n||Qy("configIsRequired"),LA(n)||Qy("configType"),n.urls?(zA(),{paths:{vs:n.urls.monacoBase}}):n}function zA(){console.warn(Ux.deprecation)}function UA(n,a){throw new Error(n[a]||n.default)}var Ux={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
|
|
285
|
+
`,document.head.appendChild(le),()=>{document.head.removeChild(le)}},[]),y.useEffect(()=>{const le=new Set;Object.keys(u).forEach(W=>{const ue=u[W];ue&&typeof ue=="object"&&"modules"in ue&&(ue.modules||[]).forEach(Q=>{Q.background&&/^#[0-9A-F]{6}$/i.test(Q.background)&&le.add(Q.background)})}),w(le);const J=document.createElement("style");J.id="hex-powerline-styles";let te="";return le.forEach(W=>{const ue=parseInt(W.slice(1,3),16),A=parseInt(W.slice(3,5),16),Q=parseInt(W.slice(5,7),16);te+=`.powerline-separator[data-current-bg="${W}"] { border-left-color: rgb(${ue}, ${A}, ${Q}); }
|
|
286
|
+
`}),J.innerHTML=te,document.head.appendChild(J),()=>{const W=document.getElementById("hex-powerline-styles");W&&document.head.removeChild(W)}},[u]);const S=ZO.map(le=>({...le,label:l(`statusline.${le.label}`)})),C=le=>{f(J=>({...J,currentStyle:le}))},_=(le,J,te)=>{const W=u.currentStyle,ue=u[W],A=ue&&typeof ue=="object"&&"modules"in ue?[...ue.modules||[]]:[];A[le]&&(A[le]={...A[le],[J]:te}),f(Q=>({...Q,[W]:{modules:A}}))},[j,N]=y.useState([]),z=()=>{N([]),i&&(s({...i,StatusLine:{...u,fontFamily:d}}),a(!1))},k=({title:le,description:J,variant:te="default"})=>{const W=te==="destructive";return g.jsx("div",{className:`rounded-lg border p-4 ${W?"bg-red-50 border-red-200 text-red-800":"bg-blue-50 border-blue-200 text-blue-800"}`,children:g.jsxs("div",{className:"flex",children:[g.jsx("div",{className:"flex-shrink-0",children:W?g.jsx("svg",{className:"h-5 w-5 text-red-400",viewBox:"0 0 20 20",fill:"currentColor",children:g.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})}):g.jsx("svg",{className:"h-5 w-5 text-blue-400",viewBox:"0 0 20 20",fill:"currentColor",children:g.jsx("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"})})}),g.jsxs("div",{className:"ml-3",children:[g.jsx("h3",{className:`text-sm font-medium ${W?"text-red-800":"text-blue-800"}`,children:le}),g.jsx("div",{className:`mt-2 text-sm ${W?"text-red-700":"text-blue-700"}`,children:J})]})]})})},H=u.currentStyle,D=u[H],R=D&&typeof D=="object"&&"modules"in D?D.modules||[]:[],B=m!==null&&R.length>m?R[m]:null,Z=y.useCallback(()=>{if(m===null)return;const le=u.currentStyle,J=u[le],te=J&&typeof J=="object"&&"modules"in J?[...J.modules||[]]:[];m>=0&&m<te.length&&(te.splice(m,1),f(W=>({...W,[le]:{modules:te}})),v(null))},[m,u]),ne=d?{fontFamily:d}:{};y.useEffect(()=>{const le=J=>{m!==null&&(J.key==="Delete"||J.key==="Backspace")&&(J.preventDefault(),Z())};return document.addEventListener("keydown",le),()=>{document.removeEventListener("keydown",le)}},[m,Z]);const oe=`${d}-${u.currentStyle}`;return g.jsx(Gr,{open:n,onOpenChange:a,children:g.jsxs(or,{className:"max-w-4xl h-[90vh] overflow-hidden sm:max-w-5xl md:max-w-6xl lg:max-w-7xl animate-in fade-in-90 slide-in-from-bottom-10 duration-300 flex flex-col",children:[g.jsx(sr,{"data-testid":"statusline-config-dialog-header",className:"border-b pb-4",children:g.jsxs(ur,{className:"flex items-center",children:[g.jsxs("svg",{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",className:"mr-2",children:[g.jsx("path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),g.jsx("path",{d:"M14 3v4a2 2 0 0 0 2 2h4"}),g.jsx("path",{d:"M3 12h18"})]}),l("statusline.title")]})}),j.length>0&&g.jsx("div",{className:"px-6",children:g.jsx(k,{variant:"destructive",title:"配置验证失败",description:g.jsx("ul",{className:"list-disc pl-5 space-y-1",children:j.map((le,J)=>g.jsx("li",{children:le},J))})})}),g.jsxs("div",{className:"flex flex-col gap-6 flex-1 overflow-hidden",children:[g.jsx("div",{className:"space-y-6",children:g.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ie,{htmlFor:"theme-style",className:"text-sm font-medium",children:l("statusline.theme")}),g.jsx(kn,{options:[{label:l("statusline.theme_default"),value:"default"},{label:l("statusline.theme_powerline"),value:"powerline"}],value:u.currentStyle,onChange:C,"data-testid":"theme-selector",placeholder:l("statusline.theme_placeholder")})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ie,{htmlFor:"font-family",className:"text-sm font-medium",children:l("statusline.module_icon")}),g.jsx(kn,{options:QO,value:d,onChange:le=>p(le),"data-testid":"font-family-selector",placeholder:l("statusline.font_placeholder")})]})]})}),g.jsxs("div",{className:"grid grid-cols-5 gap-6 overflow-hidden flex-1",children:[g.jsxs("div",{className:"border rounded-lg flex flex-col overflow-hidden col-span-1",children:[g.jsx("h3",{className:"text-sm font-medium p-4 pb-0 mb-3",children:l("statusline.components")}),g.jsx("div",{className:"space-y-2 overflow-y-auto px-4 pb-4 flex-1",children:S.map(le=>g.jsx("div",{className:"flex items-center gap-2 p-2 border rounded cursor-move hover:bg-secondary",draggable:!0,onDragStart:J=>{J.dataTransfer.setData("moduleType",le.value)},children:g.jsx("span",{className:"text-sm",children:le.label})},le.value))})]}),g.jsxs("div",{className:"border rounded-lg p-4 flex flex-col col-span-3",children:[g.jsx("h3",{className:"text-sm font-medium mb-3",children:l("statusline.preview")}),g.jsx("div",{className:`rounded bg-black/90 text-white font-mono text-sm overflow-x-auto flex items-center border border-border p-3 py-5 shadow-inner overflow-hidden ${u.currentStyle==="powerline"?"gap-0 h-8 p-0 items-center relative":"h-5"}`,"data-testid":"statusline-preview",style:ne,onDragOver:le=>{le.preventDefault()},onDrop:le=>{le.preventDefault();const J=le.dataTransfer.getData("moduleType");if(J){const te=u.currentStyle,W=u[te],ue=W&&typeof W=="object"&&"modules"in W?[...W.modules||[]]:[];let A;switch(J){case"workDir":A={type:"workDir",icon:"",text:"{{workDirName}}",color:"bright_blue"};break;case"gitBranch":A={type:"gitBranch",icon:"🌿",text:"{{gitBranch}}",color:"bright_green"};break;case"model":A={type:"model",icon:"🤖",text:"{{model}}",color:"bright_yellow"};break;case"usage":A={type:"usage",icon:"📊",text:"{{inputTokens}} → {{outputTokens}}",color:"bright_magenta"};break;case"script":A={type:"script",icon:"📜",text:"Script Module",color:"bright_cyan",scriptPath:""};break;default:A={...XO,type:J}}ue.push(A),f(Q=>({...Q,[te]:{modules:ue}}))}},children:R.length>0?g.jsx("div",{className:"flex items-center flex-wrap gap-0",children:R.map((le,J)=>g.jsx("div",{className:`cursor-pointer ${m===J?"bg-white/20":"hover:bg-white/10"} ${u.currentStyle==="powerline"?"p-0 rounded-none inline-flex overflow-visible relative":"flex items-center gap-1 px-2 py-1 rounded"}`,onClick:()=>v(J),draggable:!0,onDragStart:te=>{te.dataTransfer.setData("dragIndex",J.toString())},onDragOver:te=>{te.preventDefault()},onDrop:te=>{te.preventDefault();const W=parseInt(te.dataTransfer.getData("dragIndex"));if(!isNaN(W)&&W!==J){const ue=u.currentStyle,A=u[ue],Q=A&&typeof A=="object"&&"modules"in A?[...A.modules||[]]:[];if(W>=0&&W<Q.length&&J>=0&&J<=Q.length){const[V]=Q.splice(W,1);Q.splice(J,0,V),f(ve=>({...ve,[ue]:{modules:Q}})),m===W?v(J):m===J&&v(W)}}},children:WO(le,u.currentStyle==="powerline")},J))}):g.jsxs("div",{className:"flex flex-col items-center justify-center w-full py-4 text-center",children:[g.jsxs("svg",{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",className:"text-gray-500 mb-2",children:[g.jsx("path",{d:"M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18z"}),g.jsx("path",{d:"M12 8v8"}),g.jsx("path",{d:"M8 12h8"})]}),g.jsx("span",{className:"text-gray-500 text-sm",children:l("statusline.drag_hint")})]})},oe)]}),g.jsxs("div",{className:"border rounded-lg flex flex-col overflow-hidden col-span-1",children:[g.jsx("h3",{className:"text-sm font-medium p-4 pb-0 mb-3",children:l("statusline.properties")}),g.jsx("div",{className:"overflow-y-auto px-4 pb-4 flex-1",children:B&&m!==null?g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ie,{htmlFor:"module-icon",children:l("statusline.module_icon")}),g.jsx(IO,{value:B.icon||"",onChange:le=>_(m,"icon",le),fontFamily:d,t:l},oe),g.jsx("p",{className:"text-xs text-muted-foreground",children:l("statusline.icon_description")})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ie,{htmlFor:"module-text",children:l("statusline.module_text")}),g.jsx(ht,{id:"module-text",value:B.text,onChange:le=>_(m,"text",le.target.value),placeholder:l("statusline.text_placeholder")}),g.jsxs("div",{className:"text-xs text-muted-foreground",children:[g.jsx("p",{children:l("statusline.module_text_description")}),g.jsxs("div",{className:"flex flex-wrap gap-1 mt-1",children:[g.jsx($r,{variant:"secondary",className:"text-xs py-0.5 px-1.5",children:"{{workDirName}}"}),g.jsx($r,{variant:"secondary",className:"text-xs py-0.5 px-1.5",children:"{{gitBranch}}"}),g.jsx($r,{variant:"secondary",className:"text-xs py-0.5 px-1.5",children:"{{model}}"}),g.jsx($r,{variant:"secondary",className:"text-xs py-0.5 px-1.5",children:"{{inputTokens}}"}),g.jsx($r,{variant:"secondary",className:"text-xs py-0.5 px-1.5",children:"{{outputTokens}}"})]})]})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ie,{children:l("statusline.module_color")}),g.jsx($y,{value:B.color||"",onChange:le=>_(m,"color",le)}),g.jsx("p",{className:"text-xs text-muted-foreground",children:l("statusline.module_color_description")})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ie,{children:l("statusline.module_background")}),g.jsx($y,{value:B.background||"",onChange:le=>_(m,"background",le)}),g.jsx("p",{className:"text-xs text-muted-foreground",children:l("statusline.module_background_description")})]}),B.type==="script"&&g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ie,{htmlFor:"module-script-path",children:l("statusline.module_script_path")}),g.jsx(ht,{id:"module-script-path",value:B.scriptPath||"",onChange:le=>_(m,"scriptPath",le.target.value),placeholder:l("statusline.script_placeholder")}),g.jsx("p",{className:"text-xs text-muted-foreground",children:l("statusline.module_script_path_description")})]}),g.jsx(Ae,{variant:"destructive",size:"sm",onClick:Z,children:l("statusline.delete_module")})]}):g.jsx("div",{className:"flex items-center justify-center h-full min-h-[200px]",children:g.jsx("p",{className:"text-muted-foreground text-sm",children:l("statusline.select_hint")})})})]})]})]}),g.jsxs(Xr,{className:"border-t pt-4 mt-4",children:[g.jsx(Ae,{variant:"outline",onClick:()=>a(!1),className:"transition-all hover:scale-105",children:l("app.cancel")}),g.jsx(Ae,{onClick:z,"data-testid":"save-statusline-config",className:"transition-all hover:scale-105",children:l("app.save")})]})]})})}function tA({isOpen:n,onOpenChange:a}){const{t:l}=hr(),{config:i,setConfig:s}=Jr(),[u,f]=y.useState(!1);if(!i)return null;const d=b=>{s({...i,LOG:b})},p=b=>{s({...i,CLAUDE_PATH:b.target.value})},m=b=>{const w={enabled:b,currentStyle:i.StatusLine?.currentStyle||"default",default:i.StatusLine?.default||{modules:[]},powerline:i.StatusLine?.powerline||{modules:[]}};s({...i,StatusLine:w})},v=()=>{f(!0)};return g.jsxs(Gr,{open:n,onOpenChange:a,children:[g.jsxs(or,{"data-testid":"settings-dialog",className:"max-h-[80vh] flex flex-col p-0",children:[g.jsx(sr,{className:"p-4 pb-0",children:g.jsx(ur,{children:l("toplevel.title")})}),g.jsxs("div",{className:"space-y-4 p-4 px-8 overflow-y-auto flex-1",children:[g.jsxs("div",{className:"flex items-center space-x-2",children:[g.jsx(Yd,{id:"log",checked:i.LOG,onCheckedChange:d}),g.jsx(Ie,{htmlFor:"log",className:"transition-all-ease hover:scale-[1.02] cursor-pointer",children:l("toplevel.log")})]}),g.jsx("div",{className:"space-y-2 border-t pt-4",children:g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsxs("div",{className:"flex items-center space-x-2",children:[g.jsx(Yd,{id:"statusline",checked:i.StatusLine?.enabled||!1,onCheckedChange:m}),g.jsx(Ie,{htmlFor:"statusline",className:"transition-all-ease hover:scale-[1.02] cursor-pointer",children:l("statusline.title")})]}),g.jsx(Ae,{variant:"outline",size:"sm",onClick:v,className:"transition-all-ease hover:scale-[1.02] active:scale-[0.98]","data-testid":"statusline-config-button",children:l("app.settings")})]})}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ie,{htmlFor:"log-level",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.log_level")}),g.jsx(kn,{options:[{label:"fatal",value:"fatal"},{label:"error",value:"error"},{label:"warn",value:"warn"},{label:"info",value:"info"},{label:"debug",value:"debug"},{label:"trace",value:"trace"}],value:i.LOG_LEVEL,onChange:b=>s({...i,LOG_LEVEL:b})})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ie,{htmlFor:"claude-path",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.claude_path")}),g.jsx(ht,{id:"claude-path",value:i.CLAUDE_PATH,onChange:p,className:"transition-all-ease focus:scale-[1.01]"})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ie,{htmlFor:"host",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.host")}),g.jsx(ht,{id:"host",value:i.HOST,onChange:b=>s({...i,HOST:b.target.value}),className:"transition-all-ease focus:scale-[1.01]"})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ie,{htmlFor:"port",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.port")}),g.jsx(ht,{id:"port",type:"number",value:i.PORT,onChange:b=>s({...i,PORT:parseInt(b.target.value,10)}),className:"transition-all-ease focus:scale-[1.01]"})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ie,{htmlFor:"timeout",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.timeout")}),g.jsx(ht,{id:"timeout",value:i.API_TIMEOUT_MS,onChange:b=>s({...i,API_TIMEOUT_MS:b.target.value}),className:"transition-all-ease focus:scale-[1.01]"})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ie,{htmlFor:"proxy-url",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.proxy_url")}),g.jsx(ht,{id:"proxy-url",value:i.PROXY_URL,onChange:b=>s({...i,PROXY_URL:b.target.value}),placeholder:"http://127.0.0.1:7890",className:"transition-all-ease focus:scale-[1.01]"})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ie,{htmlFor:"apikey",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.apikey")}),g.jsx(ht,{id:"apikey",type:"password",value:i.APIKEY,onChange:b=>s({...i,APIKEY:b.target.value}),className:"transition-all-ease focus:scale-[1.01]"})]})]}),g.jsx(Xr,{className:"p-4 pt-0",children:g.jsx(Ae,{onClick:()=>a(!1),className:"transition-all-ease hover:scale-[1.02] active:scale-[0.98]",children:l("app.save")})})]}),g.jsx(eA,{isOpen:u,onOpenChange:f,"data-testid":"statusline-config-dialog"})]})}const Ca=y.forwardRef(({className:n,...a},l)=>g.jsx("div",{ref:l,className:ft("rounded-lg border bg-card text-card-foreground shadow-sm",n),...a}));Ca.displayName="Card";const Na=y.forwardRef(({className:n,...a},l)=>g.jsx("div",{ref:l,className:ft("flex flex-col space-y-1.5 p-6",n),...a}));Na.displayName="CardHeader";const Ra=y.forwardRef(({className:n,...a},l)=>g.jsx("div",{ref:l,className:ft("text-2xl font-semibold leading-none tracking-tight",n),...a}));Ra.displayName="CardTitle";const Lx=y.forwardRef(({className:n,...a},l)=>g.jsx("div",{ref:l,className:ft("text-sm text-muted-foreground",n),...a}));Lx.displayName="CardDescription";const ja=y.forwardRef(({className:n,...a},l)=>g.jsx("div",{ref:l,className:ft("p-6 pt-0",n),...a}));ja.displayName="CardContent";const kx=y.forwardRef(({className:n,...a},l)=>g.jsx("div",{ref:l,className:ft("flex items-center p-6 pt-0",n),...a}));kx.displayName="CardFooter";function nA({transformers:n,onEdit:a,onRemove:l}){return!n||!Array.isArray(n)?g.jsx("div",{className:"space-y-3",children:g.jsx("div",{className:"flex items-center justify-center rounded-md border bg-white p-8 text-gray-500",children:"No transformers configured"})}):g.jsx("div",{className:"space-y-3",children:n.map((i,s)=>{if(!i)return g.jsxs("div",{className:"flex items-start justify-between rounded-md border bg-white p-4 transition-all hover:shadow-md animate-slide-in hover:scale-[1.01]",children:[g.jsxs("div",{className:"flex-1 space-y-1.5",children:[g.jsx("p",{className:"text-md font-semibold text-gray-800",children:"Invalid Transformer"}),g.jsx("p",{className:"text-sm text-gray-500",children:"Transformer data is missing"})]}),g.jsxs("div",{className:"ml-4 flex flex-shrink-0 items-center gap-2",children:[g.jsx(Ae,{variant:"ghost",size:"icon",onClick:()=>a(s),className:"transition-all-ease hover:scale-110",disabled:!0,children:g.jsx(vu,{className:"h-4 w-4"})}),g.jsx(Ae,{variant:"destructive",size:"icon",onClick:()=>l(s),className:"transition-all duration-200 hover:scale-110",children:g.jsx(Kr,{className:"h-4 w-4 text-current transition-colors duration-200"})})]})]},s);const u=i.path||"Unnamed Transformer",f=i.options||{},d=()=>!f||Object.keys(f).length===0?g.jsx("p",{className:"text-sm text-gray-500",children:"No parameters configured"}):g.jsx("div",{className:"flex flex-wrap gap-2 max-h-8 overflow-hidden",children:Object.entries(f).map(([p,m])=>g.jsxs("span",{className:"inline-flex items-center px-2 py-1 rounded-md bg-gray-100 text-xs font-medium text-gray-700 border",children:[g.jsxs("span",{className:"text-gray-600",children:[p,":"]}),g.jsx("span",{className:"ml-1 text-gray-800",children:String(m)})]},p))});return g.jsxs("div",{className:"flex items-start justify-between rounded-md border bg-white p-4 transition-all hover:shadow-md animate-slide-in hover:scale-[1.01]",children:[g.jsxs("div",{className:"flex-1 space-y-1.5",children:[g.jsx("p",{className:"text-md font-semibold text-gray-800",children:u}),d()]}),g.jsxs("div",{className:"ml-4 flex flex-shrink-0 items-center gap-2",children:[g.jsx(Ae,{variant:"ghost",size:"icon",onClick:()=>a(s),className:"transition-all-ease hover:scale-110",children:g.jsx(vu,{className:"h-4 w-4"})}),g.jsx(Ae,{variant:"destructive",size:"icon",onClick:()=>l(s),className:"transition-all duration-200 hover:scale-110",children:g.jsx(Kr,{className:"h-4 w-4 text-current transition-colors duration-200"})})]})]},s)})})}function aA(){const{t:n}=hr(),{config:a,setConfig:l}=Jr(),[i,s]=y.useState(null),[u,f]=y.useState(null),[d,p]=y.useState(null);if(!a)return g.jsxs(Ca,{className:"flex h-full flex-col rounded-lg border shadow-sm",children:[g.jsx(Na,{className:"flex flex-row items-center justify-between border-b p-4",children:g.jsx(Ra,{className:"text-lg",children:n("transformers.title")})}),g.jsx(ja,{className:"flex-grow flex items-center justify-center p-4",children:g.jsx("div",{className:"text-gray-500",children:"Loading transformers configuration..."})})]});const m=Array.isArray(a.transformers)?a.transformers:[],v=()=>{p({name:"",path:"",options:{}}),s(m.length)},b=j=>{const N=[...m];N.splice(j,1),l({...a,transformers:N}),f(null)},w=(j,N,z,k)=>{if(j<m.length){const H=[...m];k!==void 0?H[j].options[k]=z:H[j][N]=z,l({...a,transformers:H})}else if(d){const H={...d};k!==void 0?H.options[k]=z:H[N]=z,p(H)}},S=i!==null?i<m.length?m[i]:d:null,C=()=>{if(d&&i===m.length){const j=[...m,d];l({...a,transformers:j})}s(null),p(null)},_=()=>{s(null),p(null)};return g.jsxs(Ca,{className:"flex h-full flex-col rounded-lg border shadow-sm",children:[g.jsxs(Na,{className:"flex flex-row items-center justify-between border-b p-4",children:[g.jsxs(Ra,{className:"text-lg",children:[n("transformers.title")," ",g.jsxs("span",{className:"text-sm font-normal text-gray-500",children:["(",m.length,")"]})]}),g.jsx(Ae,{onClick:v,children:n("transformers.add")})]}),g.jsx(ja,{className:"flex-grow overflow-y-auto p-4",children:g.jsx(nA,{transformers:m,onEdit:s,onRemove:f})}),g.jsx(Gr,{open:i!==null,onOpenChange:_,children:g.jsxs(or,{children:[g.jsx(sr,{children:g.jsx(ur,{children:n("transformers.edit")})}),S&&i!==null&&g.jsxs("div",{className:"space-y-4 py-4 px-6 max-h-96 overflow-y-auto",children:[g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ie,{htmlFor:"transformer-path",children:n("transformers.path")}),g.jsx(ht,{id:"transformer-path",value:S.path||"",onChange:j=>w(i,"path",j.target.value)})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx(Ie,{children:n("transformers.parameters")}),g.jsx(Ae,{variant:"outline",size:"sm",onClick:()=>{const j=S.options||{},N=`param${Object.keys(j).length+1}`;if(i!==null){const z={...j,[N]:""};if(i<m.length){const k=[...m];k[i].options=z,l({...a,transformers:k})}else d&&p({...d,options:z})}},children:g.jsx(Hd,{className:"h-4 w-4"})})]}),Object.entries(S.options||{}).map(([j,N])=>g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(ht,{value:j,onChange:z=>{const H={...S.options||{}};if(delete H[j],H[z.target.value]=N,i!==null)if(i<m.length){const D=[...m];D[i].options=H,l({...a,transformers:D})}else d&&p({...d,options:H})},className:"flex-1"}),g.jsx(ht,{value:N,onChange:z=>{i!==null&&w(i,"parameters",z.target.value,j)},className:"flex-1"}),g.jsx(Ae,{variant:"outline",size:"icon",onClick:()=>{if(i!==null){const k={...S.options||{}};if(delete k[j],i<m.length){const H=[...m];H[i].options=k,l({...a,transformers:H})}else d&&p({...d,options:k})}},children:g.jsx(Kr,{className:"h-4 w-4"})})]},j))]})]}),g.jsxs(Xr,{children:[g.jsx(Ae,{variant:"outline",onClick:_,children:n("app.cancel")}),g.jsx(Ae,{onClick:C,children:n("app.save")})]})]})}),g.jsx(Gr,{open:u!==null,onOpenChange:()=>f(null),children:g.jsxs(or,{children:[g.jsxs(sr,{children:[g.jsx(ur,{children:n("transformers.delete")}),g.jsx(Lu,{children:n("transformers.delete_transformer_confirm")})]}),g.jsxs(Xr,{children:[g.jsx(Ae,{variant:"outline",onClick:()=>f(null),children:n("app.cancel")}),g.jsx(Ae,{variant:"destructive",onClick:()=>u!==null&&b(u),children:n("app.delete")})]})]})})]})}function rA({providers:n,onEdit:a,onRemove:l}){return!n||!Array.isArray(n)?g.jsx("div",{className:"space-y-3",children:g.jsx("div",{className:"flex items-center justify-center rounded-md border bg-white p-8 text-gray-500",children:"No providers configured"})}):g.jsx("div",{className:"space-y-3",children:n.map((i,s)=>{if(!i)return g.jsxs("div",{className:"flex items-start justify-between rounded-md border bg-white p-4 transition-all hover:shadow-md animate-slide-in hover:scale-[1.01]",children:[g.jsxs("div",{className:"flex-1 space-y-1.5",children:[g.jsx("p",{className:"text-md font-semibold text-gray-800",children:"Invalid Provider"}),g.jsx("p",{className:"text-sm text-gray-500",children:"Provider data is missing"})]}),g.jsxs("div",{className:"ml-4 flex flex-shrink-0 items-center gap-2",children:[g.jsx(Ae,{variant:"ghost",size:"icon",onClick:()=>a(s),className:"transition-all-ease hover:scale-110",disabled:!0,children:g.jsx(vu,{className:"h-4 w-4"})}),g.jsx(Ae,{variant:"destructive",size:"icon",onClick:()=>l(s),className:"transition-all duration-200 hover:scale-110",children:g.jsx(Kr,{className:"h-4 w-4 text-current transition-colors duration-200"})})]})]},s);const u=i.name||"Unnamed Provider",f=i.api_base_url||"No API URL",d=Array.isArray(i.models)?i.models:[];return g.jsxs("div",{className:"flex items-start justify-between rounded-md border bg-white p-4 transition-all hover:shadow-md animate-slide-in hover:scale-[1.01]",children:[g.jsxs("div",{className:"flex-1 space-y-1.5",children:[g.jsx("p",{className:"text-md font-semibold text-gray-800",children:u}),g.jsx("p",{className:"text-sm text-gray-500",children:f}),g.jsx("div",{className:"flex flex-wrap gap-2 pt-2",children:d.map((p,m)=>g.jsx($r,{variant:"outline",className:"font-normal transition-all-ease hover:scale-105",children:p||"Unnamed Model"},m))})]}),g.jsxs("div",{className:"ml-4 flex flex-shrink-0 items-center gap-2",children:[g.jsx(Ae,{variant:"ghost",size:"icon",onClick:()=>a(s),className:"transition-all-ease hover:scale-110",children:g.jsx(vu,{className:"h-4 w-4"})}),g.jsx(Ae,{variant:"destructive",size:"icon",onClick:()=>l(s),className:"transition-all duration-200 hover:scale-110",children:g.jsx(Kr,{className:"h-4 w-4 text-current transition-colors duration-200"})})]})]},s)})})}const lA=y.forwardRef(({options:n,value:a,onChange:l,onEnter:i,searchPlaceholder:s="Search...",emptyPlaceholder:u="No options found.",inputPlaceholder:f="Type or select..."},d)=>{const[p,m]=y.useState(!1),[v,b]=y.useState(a||""),w=y.useRef(null);y.useImperativeHandle(d,()=>w.current),y.useEffect(()=>{b(a||"")},[a]);const S=N=>{const z=N.target.value;b(z),l(z)},C=N=>{N.key==="Enter"&&v.trim()&&i&&(i(v.trim()),b(""))},_=N=>{b(N),l(N),i&&(i(N),b("")),m(!1)},j=()=>v;return y.useImperativeHandle(d,()=>({...w.current,value:v,getCurrentValue:j,clearInput:()=>{b(""),l("")}})),g.jsxs("div",{className:"relative",children:[g.jsx(ht,{ref:w,value:v,onChange:S,onKeyDown:C,placeholder:f,className:"pr-10"}),g.jsxs($u,{open:p,onOpenChange:m,children:[g.jsx(Vu,{asChild:!0,children:g.jsx(Ae,{variant:"ghost",size:"sm",className:"absolute right-0 top-0 h-full px-3 py-2 hover:bg-transparent",children:g.jsx(ub,{className:"h-4 w-4 opacity-50"})})}),g.jsx(Yu,{className:"w-[--radix-popover-trigger-width] p-0 animate-fade-in",children:g.jsxs(qb,{children:[g.jsx(Fb,{placeholder:s}),g.jsxs(Kb,{children:[g.jsx(Gb,{children:u}),g.jsx(Xb,{children:n.map(N=>g.jsxs(Qb,{value:N.value,onSelect:()=>_(N.value),className:"transition-all-ease hover:bg-accent hover:text-accent-foreground",children:[g.jsx(sb,{className:ft("mr-2 h-4 w-4 transition-opacity",a===N.value?"opacity-100":"opacity-0")}),N.label]},N.value))})]})]})})]})]})});function iA(){const{t:n}=hr(),{config:a,setConfig:l}=Jr(),[i,s]=y.useState(null),[u,f]=y.useState(null),[d,p]=y.useState({}),[m,v]=y.useState({}),[b,w]=y.useState({}),[S,C]=y.useState([]),[_,j]=y.useState(null),[N,z]=y.useState(!1),[k,H]=y.useState([]),[D,R]=y.useState({}),[B,Z]=y.useState(null),[ne,oe]=y.useState(null),[le,J]=y.useState(""),te=y.useRef(null);if(y.useEffect(()=>{(async()=>{try{const fe=await fetch("https://pub-0dc3e1677e894f07bbea11b17a29e032.r2.dev/providers.json");if(fe.ok){const pe=await fe.json();H(pe||[])}else console.error("Failed to fetch provider templates")}catch(fe){console.error("Failed to fetch provider templates:",fe)}})()},[]),y.useEffect(()=>{(async()=>{try{const fe=await Qt.get("/transformers");C(fe.transformers)}catch(fe){console.error("Failed to fetch transformers:",fe)}})()},[]),!a)return g.jsxs(Ca,{className:"flex h-full flex-col rounded-lg border shadow-sm",children:[g.jsx(Na,{className:"flex flex-row items-center justify-between border-b p-4",children:g.jsx(Ra,{className:"text-lg",children:n("providers.title")})}),g.jsx(ja,{className:"flex-grow flex items-center justify-center p-4",children:g.jsx("div",{className:"text-gray-500",children:"Loading providers configuration..."})})]});const W=Array.isArray(a.Providers)?a.Providers:[],ue=()=>{const ie={name:"",api_base_url:"",api_key:"",models:[]};s(a.Providers.length),j(ie),z(!0),R(fe=>({...fe,[a.Providers.length]:!1})),Z(null),oe(null)},A=ie=>{const fe=a.Providers[ie];s(ie),j(JSON.parse(JSON.stringify(fe))),z(!1),R(pe=>({...pe,[ie]:!1})),Z(null),oe(null)},Q=()=>{if(!_)return;if(!_.name||_.name.trim()===""){oe(n("providers.name_required"));return}const ie=_.name.trim();if(a.Providers.some((pe,he)=>!N&&he===i?!1:pe.name.toLowerCase()===ie.toLowerCase())){oe(n("providers.name_duplicate"));return}if(!_.api_key||_.api_key.trim()===""){Z(n("providers.api_key_required"));return}if(Z(null),oe(null),i!==null&&_){const pe=[...a.Providers];N?pe.push(_):pe[i]=_,l({...a,Providers:pe})}i!==null&&R(pe=>{const he={...pe};return delete he[i],he}),s(null),j(null),z(!1)},V=()=>{i!==null&&(p(ie=>{const fe={...ie};return delete fe[i],fe}),R(ie=>{const fe={...ie};return delete fe[i],fe})),s(null),j(null),z(!1),Z(null),oe(null)},ve=ie=>{const fe=[...a.Providers];fe.splice(ie,1),l({...a,Providers:fe}),f(null)},O=(ie,fe,pe)=>{if(_){const he={..._,[fe]:pe};j(he)}},F=(ie,fe)=>{if(!fe||!_)return;const pe={..._};pe.transformer||(pe.transformer={use:[]}),pe.transformer.use=[...pe.transformer.use,fe],j(pe)},U=(ie,fe)=>{if(!_)return;const pe={..._};if(pe.transformer){const he=[...pe.transformer.use];he.splice(fe,1),pe.transformer.use=he,he.length===0&&Object.keys(pe.transformer).length===1&&delete pe.transformer}j(pe)},K=(ie,fe,pe)=>{if(!pe||!_)return;const he={..._};he.transformer||(he.transformer={use:[]}),he.transformer[fe]||(he.transformer[fe]={use:[]}),he.transformer[fe].use=[...he.transformer[fe].use,pe],j(he)},ae=(ie,fe,pe)=>{if(!_)return;const he={..._};if(he.transformer&&he.transformer[fe]){const je=[...he.transformer[fe].use];je.splice(pe,1),he.transformer[fe].use=je,je.length===0&&Object.keys(he.transformer[fe]).length===1&&delete he.transformer[fe]}j(he)},de=(ie,fe,pe,he)=>{if(!_)return;const je={..._};if(je.transformer||(je.transformer={use:[]}),je.transformer.use&&je.transformer.use.length>fe){const ke=je.transformer.use[fe];if(Array.isArray(ke)){const Pe=[...ke];if(Pe.length>1&&typeof Pe[1]=="object"&&Pe[1]!==null){const Yt={...Pe[1],[pe]:he};Pe[1]=Yt}else if(Pe.length>1){const nt={[pe]:he};Pe.splice(1,Pe.length-1,nt)}else{const nt={[pe]:he};Pe.push(nt)}je.transformer.use[fe]=Pe}else{const Pe={[pe]:he};je.transformer.use[fe]=[ke,Pe]}}j(je)},ge=(ie,fe,pe)=>{if(!_)return;const he={..._};if(!he.transformer?.use||he.transformer.use.length<=fe)return;const je=he.transformer.use[fe];if(Array.isArray(je)&&je.length>1){const ke=[...je];if(typeof ke[1]=="object"&&ke[1]!==null){const Pe={...ke[1]};delete Pe[pe],Object.keys(Pe).length===0?ke.splice(1,1):ke[1]=Pe,he.transformer.use[fe]=ke,j(he)}}},ye=(ie,fe,pe,he,je)=>{if(!_)return;const ke={..._};if(ke.transformer||(ke.transformer={use:[]}),ke.transformer[fe]||(ke.transformer[fe]={use:[]}),ke.transformer[fe].use&&ke.transformer[fe].use.length>pe){const Pe=ke.transformer[fe].use[pe];if(Array.isArray(Pe)){const nt=[...Pe];if(nt.length>1&&typeof nt[1]=="object"&&nt[1]!==null){const Bn={...nt[1],[he]:je};nt[1]=Bn}else if(nt.length>1){const Yt={[he]:je};nt.splice(1,nt.length-1,Yt)}else{const Yt={[he]:je};nt.push(Yt)}ke.transformer[fe].use[pe]=nt}else{const nt={[he]:je};ke.transformer[fe].use[pe]=[Pe,nt]}}j(ke)},Le=(ie,fe,pe,he)=>{if(!_)return;const je={..._};if(!je.transformer?.[fe]?.use||je.transformer[fe].use.length<=pe)return;const ke=je.transformer[fe].use[pe];if(Array.isArray(ke)&&ke.length>1){const Pe=[...ke];if(typeof Pe[1]=="object"&&Pe[1]!==null){const nt={...Pe[1]};delete nt[he],Object.keys(nt).length===0?Pe.splice(1,1):Pe[1]=nt,je.transformer[fe].use[pe]=Pe,j(je)}}},qe=(ie,fe)=>{if(!fe.trim()||!_)return;const pe={..._},he=Array.isArray(pe.models)?[...pe.models]:[];he.includes(fe.trim())||(he.push(fe.trim()),pe.models=he,j(pe))},Je=ie=>{if(ie)try{const fe=JSON.parse(ie);if(fe){const pe=_?.name,he=JSON.parse(JSON.stringify(fe));!N&&pe&&(he.name=pe),j(he)}}catch(fe){console.error("Failed to parse template",fe)}},At=(ie,fe)=>{if(!_)return;const pe={..._},he=Array.isArray(pe.models)?[...pe.models]:[];fe>=0&&fe<he.length&&(he.splice(fe,1),pe.models=he,j(pe))},Ze=_||(i!==null?W[i]:null),an=W.filter(ie=>{if(!le)return!0;const fe=le.toLowerCase();return ie.name&&ie.name.toLowerCase().includes(fe)||ie.api_base_url&&ie.api_base_url.toLowerCase().includes(fe)?!0:ie.models&&Array.isArray(ie.models)?ie.models.some(pe=>pe&&pe.toLowerCase().includes(fe)):!1});return g.jsxs(Ca,{className:"flex h-full flex-col rounded-lg border shadow-sm",children:[g.jsxs(Na,{className:"flex flex-col border-b p-4 gap-3",children:[g.jsxs("div",{className:"flex flex-row items-center justify-between",children:[g.jsxs(Ra,{className:"text-lg",children:[n("providers.title")," ",g.jsxs("span",{className:"text-sm font-normal text-gray-500",children:["(",an.length,"/",W.length,")"]})]}),g.jsx(Ae,{onClick:ue,children:n("providers.add")})]}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsxs("div",{className:"relative flex-1",children:[g.jsx(hb,{className:"absolute left-2.5 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-500"}),g.jsx(ht,{placeholder:n("providers.search"),value:le,onChange:ie=>J(ie.target.value),className:"pl-8"})]}),le&&g.jsx(Ae,{variant:"ghost",size:"icon",onClick:()=>J(""),children:g.jsx(cb,{className:"h-4 w-4"})})]})]}),g.jsx(ja,{className:"flex-grow overflow-y-auto p-4",children:g.jsx(rA,{providers:an,onEdit:A,onRemove:f})}),g.jsx(Gr,{open:i!==null,onOpenChange:ie=>{ie||V()},children:g.jsxs(or,{className:"max-h-[80vh] flex flex-col sm:max-w-2xl",children:[g.jsx(sr,{children:g.jsx(ur,{children:n("providers.edit")})}),Ze&&i!==null&&g.jsxs("div",{className:"space-y-4 p-4 overflow-y-auto flex-grow",children:[k.length>0&&g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ie,{children:n("providers.import_from_template")}),g.jsx(kn,{options:k.map(ie=>({label:ie.name,value:JSON.stringify(ie)})),value:"",onChange:Je,placeholder:n("providers.select_template"),emptyPlaceholder:n("providers.no_templates_found")})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ie,{htmlFor:"name",children:n("providers.name")}),g.jsx(ht,{id:"name",value:Ze.name||"",onChange:ie=>{O(i,"name",ie.target.value),ne&&oe(null)},className:ne?"border-red-500":""}),ne&&g.jsx("p",{className:"text-sm text-red-500",children:ne})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ie,{htmlFor:"api_base_url",children:n("providers.api_base_url")}),g.jsx(ht,{id:"api_base_url",value:Ze.api_base_url||"",onChange:ie=>O(i,"api_base_url",ie.target.value)})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ie,{htmlFor:"api_key",children:n("providers.api_key")}),g.jsxs("div",{className:"relative",children:[g.jsx(ht,{id:"api_key",type:D[i||0]?"text":"password",value:Ze.api_key||"",onChange:ie=>O(i,"api_key",ie.target.value),className:B?"border-red-500":""}),g.jsx(Ae,{type:"button",variant:"ghost",size:"icon",className:"absolute right-2 top-1/2 transform -translate-y-1/2 h-8 w-8",onClick:()=>{const ie=i||0;R(fe=>({...fe,[ie]:!fe[ie]}))},children:D[i||0]?g.jsx(gN,{className:"h-4 w-4"}):g.jsx(yN,{className:"h-4 w-4"})})]}),B&&g.jsx("p",{className:"text-sm text-red-500",children:B})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ie,{htmlFor:"models",children:n("providers.models")}),g.jsxs("div",{className:"space-y-2",children:[g.jsxs("div",{className:"flex gap-2",children:[g.jsx("div",{className:"flex-1",children:d[i]?g.jsx(lA,{ref:te,options:(Ze.models||[]).map(ie=>({label:ie,value:ie})),value:"",onChange:()=>{},onEnter:ie=>{i!==null&&qe(i,ie)},inputPlaceholder:n("providers.models_placeholder")}):g.jsx(ht,{id:"models",placeholder:n("providers.models_placeholder"),onKeyDown:ie=>{ie.key==="Enter"&&ie.currentTarget.value.trim()&&i!==null&&(qe(i,ie.currentTarget.value),ie.currentTarget.value="")}})}),g.jsx(Ae,{onClick:()=>{if(d[i]&&te.current){const ie=te.current,fe=ie.getCurrentValue();fe&&fe.trim()&&i!==null&&(qe(i,fe.trim()),ie.clearInput())}else{const ie=document.getElementById("models");ie&&ie.value.trim()&&i!==null&&(qe(i,ie.value),ie.value="")}},children:n("providers.add_model")})]}),g.jsx("div",{className:"flex flex-wrap gap-2 pt-2",children:(Ze.models||[]).map((ie,fe)=>g.jsxs($r,{variant:"outline",className:"font-normal flex items-center gap-1",children:[ie,g.jsx("button",{type:"button",className:"ml-1 rounded-full hover:bg-gray-200",onClick:()=>i!==null&&At(i,fe),children:g.jsx(Xl,{className:"h-3 w-3"})})]},fe))})]})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ie,{children:n("providers.provider_transformer")}),g.jsx("div",{className:"flex gap-2",children:g.jsx(kn,{options:S.map(ie=>({label:ie.name,value:ie.name})),value:"",onChange:ie=>{i!==null&&F(i,ie)},placeholder:n("providers.select_transformer"),emptyPlaceholder:n("providers.no_transformers")})}),Ze.transformer?.use&&Ze.transformer.use.length>0&&g.jsxs("div",{className:"space-y-2 mt-2",children:[g.jsx("div",{className:"text-sm font-medium text-gray-700",children:n("providers.selected_transformers")}),Ze.transformer.use.map((ie,fe)=>g.jsxs("div",{className:"border rounded-md p-3",children:[g.jsxs("div",{className:"flex gap-2 items-center mb-2",children:[g.jsx("div",{className:"flex-1 bg-gray-50 rounded p-2 text-sm",children:typeof ie=="string"?ie:Array.isArray(ie)?String(ie[0]):String(ie)}),g.jsx(Ae,{variant:"outline",size:"icon",onClick:()=>{i!==null&&U(i,fe)},children:g.jsx(Kr,{className:"h-4 w-4"})})]}),g.jsxs("div",{className:"mt-2 pl-4 border-l-2 border-gray-200",children:[g.jsx(Ie,{className:"text-sm",children:n("providers.transformer_parameters")}),g.jsxs("div",{className:"space-y-2 mt-1",children:[g.jsxs("div",{className:"flex gap-2",children:[g.jsx(ht,{placeholder:n("providers.parameter_name"),value:m[`provider-${i}-transformer-${fe}`]?.name||"",onChange:pe=>{const he=`provider-${i}-transformer-${fe}`;v(je=>({...je,[he]:{...je[he]||{name:"",value:""},name:pe.target.value}}))}}),g.jsx(ht,{placeholder:n("providers.parameter_value"),value:m[`provider-${i}-transformer-${fe}`]?.value||"",onChange:pe=>{const he=`provider-${i}-transformer-${fe}`;v(je=>({...je,[he]:{...je[he]||{name:"",value:""},value:pe.target.value}}))}}),g.jsx(Ae,{size:"sm",onClick:()=>{if(i!==null){const pe=`provider-${i}-transformer-${fe}`,he=m[pe];he&&he.name&&he.value&&(de(i,fe,he.name,he.value),v(je=>({...je,[pe]:{name:"",value:""}})))}},children:g.jsx(Hd,{className:"h-4 w-4"})})]}),(()=>{if(!Ze.transformer?.use||Ze.transformer.use.length<=fe)return null;const pe=Ze.transformer.use[fe];let he={};return Array.isArray(pe)&&pe.length>1&&typeof pe[1]=="object"&&pe[1]!==null&&(he=pe[1]),Object.keys(he).length>0?g.jsx("div",{className:"space-y-1",children:Object.entries(he).map(([je,ke])=>g.jsxs("div",{className:"flex items-center justify-between bg-gray-50 rounded p-2",children:[g.jsxs("div",{className:"text-sm",children:[g.jsxs("span",{className:"font-medium",children:[je,":"]})," ",String(ke)]}),g.jsx(Ae,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>{i!==null&&ge(i,fe,je)},children:g.jsx(Xl,{className:"h-3 w-3"})})]},je))}):null})()]})]})]},fe))]})]}),Ze.models&&Ze.models.length>0&&g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ie,{children:n("providers.model_transformers")}),g.jsx("div",{className:"space-y-3",children:(Ze.models||[]).map((ie,fe)=>g.jsxs("div",{className:"border rounded-md p-3",children:[g.jsx("div",{className:"font-medium text-sm mb-2",children:ie}),g.jsx("div",{className:"flex gap-2",children:g.jsx("div",{className:"flex-1 flex gap-2",children:g.jsx(kn,{options:S.map(pe=>({label:pe.name,value:pe.name})),value:"",onChange:pe=>{i!==null&&K(i,ie,pe)},placeholder:n("providers.select_transformer"),emptyPlaceholder:n("providers.no_transformers")})})}),Ze.transformer?.[ie]?.use&&Ze.transformer[ie].use.length>0&&g.jsxs("div",{className:"space-y-2 mt-2",children:[g.jsx("div",{className:"text-sm font-medium text-gray-700",children:n("providers.selected_transformers")}),Ze.transformer[ie].use.map((pe,he)=>g.jsxs("div",{className:"border rounded-md p-3",children:[g.jsxs("div",{className:"flex gap-2 items-center mb-2",children:[g.jsx("div",{className:"flex-1 bg-gray-50 rounded p-2 text-sm",children:typeof pe=="string"?pe:Array.isArray(pe)?String(pe[0]):String(pe)}),g.jsx(Ae,{variant:"outline",size:"icon",onClick:()=>{i!==null&&ae(i,ie,he)},children:g.jsx(Kr,{className:"h-4 w-4"})})]}),g.jsxs("div",{className:"mt-2 pl-4 border-l-2 border-gray-200",children:[g.jsx(Ie,{className:"text-sm",children:n("providers.transformer_parameters")}),g.jsxs("div",{className:"space-y-2 mt-1",children:[g.jsxs("div",{className:"flex gap-2",children:[g.jsx(ht,{placeholder:n("providers.parameter_name"),value:b[`model-${i}-${ie}-transformer-${he}`]?.name||"",onChange:je=>{const ke=`model-${i}-${ie}-transformer-${he}`;w(Pe=>({...Pe,[ke]:{...Pe[ke]||{name:"",value:""},name:je.target.value}}))}}),g.jsx(ht,{placeholder:n("providers.parameter_value"),value:b[`model-${i}-${ie}-transformer-${he}`]?.value||"",onChange:je=>{const ke=`model-${i}-${ie}-transformer-${he}`;w(Pe=>({...Pe,[ke]:{...Pe[ke]||{name:"",value:""},value:je.target.value}}))}}),g.jsx(Ae,{size:"sm",onClick:()=>{if(i!==null){const je=`model-${i}-${ie}-transformer-${he}`,ke=b[je];ke&&ke.name&&ke.value&&(ye(i,ie,he,ke.name,ke.value),w(Pe=>({...Pe,[je]:{name:"",value:""}})))}},children:g.jsx(Hd,{className:"h-4 w-4"})})]}),(()=>{if(!Ze.transformer?.[ie]?.use||Ze.transformer[ie].use.length<=he)return null;const je=Ze.transformer[ie].use[he];let ke={};return Array.isArray(je)&&je.length>1&&typeof je[1]=="object"&&je[1]!==null&&(ke=je[1]),Object.keys(ke).length>0?g.jsx("div",{className:"space-y-1",children:Object.entries(ke).map(([Pe,nt])=>g.jsxs("div",{className:"flex items-center justify-between bg-gray-50 rounded p-2",children:[g.jsxs("div",{className:"text-sm",children:[g.jsxs("span",{className:"font-medium",children:[Pe,":"]})," ",String(nt)]}),g.jsx(Ae,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>{i!==null&&Le(i,ie,he,Pe)},children:g.jsx(Xl,{className:"h-3 w-3"})})]},Pe))}):null})()]})]})]},he))]})]},fe))})]})]}),g.jsx("div",{className:"space-y-3 mt-auto",children:g.jsx("div",{className:"flex justify-end gap-2",children:g.jsx(Ae,{onClick:Q,children:n("app.save")})})})]})}),g.jsx(Gr,{open:u!==null,onOpenChange:()=>f(null),children:g.jsxs(or,{children:[g.jsxs(sr,{children:[g.jsx(ur,{children:n("providers.delete")}),g.jsx(Lu,{children:n("providers.delete_provider_confirm")})]}),g.jsxs(Xr,{children:[g.jsx(Ae,{variant:"outline",onClick:()=>f(null),children:n("providers.cancel")}),g.jsx(Ae,{variant:"destructive",onClick:()=>u!==null&&ve(u),children:n("providers.delete")})]})]})})]})}function oA(){const{t:n}=hr(),{config:a,setConfig:l}=Jr();if(!a)return g.jsxs(Ca,{className:"flex h-full flex-col rounded-lg border shadow-sm",children:[g.jsx(Na,{className:"border-b p-4",children:g.jsx(Ra,{className:"text-lg",children:n("router.title")})}),g.jsx(ja,{className:"flex-grow flex items-center justify-center p-4",children:g.jsx("div",{className:"text-gray-500",children:"Loading router configuration..."})})]});const i=a.Router||{default:"",background:"",think:"",longContext:"",longContextThreshold:6e4,webSearch:""},s=(d,p)=>{const v={...a.Router||{},[d]:p};l({...a,Router:v})},f=(Array.isArray(a.Providers)?a.Providers:[]).flatMap(d=>{if(!d)return[];const p=Array.isArray(d.models)?d.models:[],m=d.name||"Unknown Provider";return p.map(v=>({value:`${m},${v||"Unknown Model"}`,label:`${m}, ${v||"Unknown Model"}`}))});return g.jsxs(Ca,{className:"flex h-full flex-col rounded-lg border shadow-sm",children:[g.jsx(Na,{className:"border-b p-4",children:g.jsx(Ra,{className:"text-lg",children:n("router.title")})}),g.jsxs(ja,{className:"flex-grow space-y-5 overflow-y-auto p-4",children:[g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ie,{children:n("router.default")}),g.jsx(kn,{options:f,value:i.default||"",onChange:d=>s("default",d),placeholder:n("router.selectModel"),searchPlaceholder:n("router.searchModel"),emptyPlaceholder:n("router.noModelFound")})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ie,{children:n("router.background")}),g.jsx(kn,{options:f,value:i.background||"",onChange:d=>s("background",d),placeholder:n("router.selectModel"),searchPlaceholder:n("router.searchModel"),emptyPlaceholder:n("router.noModelFound")})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ie,{children:n("router.think")}),g.jsx(kn,{options:f,value:i.think||"",onChange:d=>s("think",d),placeholder:n("router.selectModel"),searchPlaceholder:n("router.searchModel"),emptyPlaceholder:n("router.noModelFound")})]}),g.jsx("div",{className:"space-y-2",children:g.jsxs("div",{className:"flex items-center gap-4",children:[g.jsxs("div",{className:"flex-1",children:[g.jsx(Ie,{children:n("router.longContext")}),g.jsx(kn,{options:f,value:i.longContext||"",onChange:d=>s("longContext",d),placeholder:n("router.selectModel"),searchPlaceholder:n("router.searchModel"),emptyPlaceholder:n("router.noModelFound")})]}),g.jsxs("div",{className:"w-48",children:[g.jsx(Ie,{children:n("router.longContextThreshold")}),g.jsx(ht,{type:"number",value:i.longContextThreshold||6e4,onChange:d=>s("longContextThreshold",parseInt(d.target.value)||6e4),placeholder:"60000"})]})]})}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ie,{children:n("router.webSearch")}),g.jsx(kn,{options:f,value:i.webSearch||"",onChange:d=>s("webSearch",d),placeholder:n("router.selectModel"),searchPlaceholder:n("router.searchModel"),emptyPlaceholder:n("router.noModelFound")})]})]})]})}function sA(n,a,l){return a in n?Object.defineProperty(n,a,{value:l,enumerable:!0,configurable:!0,writable:!0}):n[a]=l,n}function Vy(n,a){var l=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);a&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable})),l.push.apply(l,i)}return l}function Yy(n){for(var a=1;a<arguments.length;a++){var l=arguments[a]!=null?arguments[a]:{};a%2?Vy(Object(l),!0).forEach(function(i){sA(n,i,l[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(l)):Vy(Object(l)).forEach(function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(l,i))})}return n}function uA(n,a){if(n==null)return{};var l={},i=Object.keys(n),s,u;for(u=0;u<i.length;u++)s=i[u],!(a.indexOf(s)>=0)&&(l[s]=n[s]);return l}function cA(n,a){if(n==null)return{};var l=uA(n,a),i,s;if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(n);for(s=0;s<u.length;s++)i=u[s],!(a.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(n,i)&&(l[i]=n[i])}return l}function fA(n,a){return dA(n)||hA(n,a)||mA(n,a)||pA()}function dA(n){if(Array.isArray(n))return n}function hA(n,a){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(n)))){var l=[],i=!0,s=!1,u=void 0;try{for(var f=n[Symbol.iterator](),d;!(i=(d=f.next()).done)&&(l.push(d.value),!(a&&l.length===a));i=!0);}catch(p){s=!0,u=p}finally{try{!i&&f.return!=null&&f.return()}finally{if(s)throw u}}return l}}function mA(n,a){if(n){if(typeof n=="string")return qy(n,a);var l=Object.prototype.toString.call(n).slice(8,-1);if(l==="Object"&&n.constructor&&(l=n.constructor.name),l==="Map"||l==="Set")return Array.from(n);if(l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l))return qy(n,a)}}function qy(n,a){(a==null||a>n.length)&&(a=n.length);for(var l=0,i=new Array(a);l<a;l++)i[l]=n[l];return i}function pA(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
287
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gA(n,a,l){return a in n?Object.defineProperty(n,a,{value:l,enumerable:!0,configurable:!0,writable:!0}):n[a]=l,n}function Fy(n,a){var l=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);a&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable})),l.push.apply(l,i)}return l}function Ky(n){for(var a=1;a<arguments.length;a++){var l=arguments[a]!=null?arguments[a]:{};a%2?Fy(Object(l),!0).forEach(function(i){gA(n,i,l[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(l)):Fy(Object(l)).forEach(function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(l,i))})}return n}function vA(){for(var n=arguments.length,a=new Array(n),l=0;l<n;l++)a[l]=arguments[l];return function(i){return a.reduceRight(function(s,u){return u(s)},i)}}function co(n){return function a(){for(var l=this,i=arguments.length,s=new Array(i),u=0;u<i;u++)s[u]=arguments[u];return s.length>=n.length?n.apply(this,s):function(){for(var f=arguments.length,d=new Array(f),p=0;p<f;p++)d[p]=arguments[p];return a.apply(l,[].concat(s,d))}}}function Su(n){return{}.toString.call(n).includes("Object")}function yA(n){return!Object.keys(n).length}function So(n){return typeof n=="function"}function bA(n,a){return Object.prototype.hasOwnProperty.call(n,a)}function xA(n,a){return Su(a)||rr("changeType"),Object.keys(a).some(function(l){return!bA(n,l)})&&rr("changeField"),a}function wA(n){So(n)||rr("selectorType")}function SA(n){So(n)||Su(n)||rr("handlerType"),Su(n)&&Object.values(n).some(function(a){return!So(a)})&&rr("handlersType")}function EA(n){n||rr("initialIsRequired"),Su(n)||rr("initialType"),yA(n)&&rr("initialContent")}function _A(n,a){throw new Error(n[a]||n.default)}var CA={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},rr=co(_A)(CA),nu={changes:xA,selector:wA,handler:SA,initial:EA};function NA(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};nu.initial(n),nu.handler(a);var l={current:n},i=co(OA)(l,a),s=co(jA)(l),u=co(nu.changes)(n),f=co(RA)(l);function d(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(v){return v};return nu.selector(m),m(l.current)}function p(m){vA(i,s,u,f)(m)}return[d,p]}function RA(n,a){return So(a)?a(n.current):a}function jA(n,a){return n.current=Ky(Ky({},n.current),a),a}function OA(n,a,l){return So(a)?a(n.current):Object.keys(l).forEach(function(i){var s;return(s=a[i])===null||s===void 0?void 0:s.call(a,n.current[i])}),l}var AA={create:NA},TA={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/vs"}};function MA(n){return function a(){for(var l=this,i=arguments.length,s=new Array(i),u=0;u<i;u++)s[u]=arguments[u];return s.length>=n.length?n.apply(this,s):function(){for(var f=arguments.length,d=new Array(f),p=0;p<f;p++)d[p]=arguments[p];return a.apply(l,[].concat(s,d))}}}function DA(n){return{}.toString.call(n).includes("Object")}function LA(n){return n||Gy("configIsRequired"),DA(n)||Gy("configType"),n.urls?(kA(),{paths:{vs:n.urls.monacoBase}}):n}function kA(){console.warn(zx.deprecation)}function zA(n,a){throw new Error(n[a]||n.default)}var zx={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
|
|
287
288
|
You are using deprecated way of configuration.
|
|
288
289
|
|
|
289
290
|
Instead of using
|
|
@@ -292,8 +293,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
292
293
|
monaco.config({ paths: { vs: '...' } })
|
|
293
294
|
|
|
294
295
|
For more please check the link https://github.com/suren-atoyan/monaco-loader#config
|
|
295
|
-
`},Qy=DA(UA)(Ux),PA={config:kA},HA=function(){for(var a=arguments.length,l=new Array(a),i=0;i<a;i++)l[i]=arguments[i];return function(s){return l.reduceRight(function(u,f){return f(u)},s)}};function Px(n,a){return Object.keys(a).forEach(function(l){a[l]instanceof Object&&n[l]&&Object.assign(a[l],Px(n[l],a[l]))}),Ky(Ky({},n),a)}var BA={type:"cancelation",msg:"operation is manually canceled"};function _d(n){var a=!1,l=new Promise(function(i,s){n.then(function(u){return a?s(BA):i(u)}),n.catch(s)});return l.cancel=function(){return a=!0},l}var $A=TA.create({config:MA,isInitialized:!1,resolve:null,reject:null,monaco:null}),Hx=dA($A,2),jo=Hx[0],Fu=Hx[1];function VA(n){var a=PA.config(n),l=a.monaco,i=fA(a,["monaco"]);Fu(function(s){return{config:Px(s.config,i),monaco:l}})}function YA(){var n=jo(function(a){var l=a.monaco,i=a.isInitialized,s=a.resolve;return{monaco:l,isInitialized:i,resolve:s}});if(!n.isInitialized){if(Fu({isInitialized:!0}),n.monaco)return n.resolve(n.monaco),_d(Nd);if(window.monaco&&window.monaco.editor)return Bx(window.monaco),n.resolve(window.monaco),_d(Nd);HA(qA,GA)(FA)}return _d(Nd)}function qA(n){return document.body.appendChild(n)}function KA(n){var a=document.createElement("script");return n&&(a.src=n),a}function GA(n){var a=jo(function(i){var s=i.config,u=i.reject;return{config:s,reject:u}}),l=KA("".concat(a.config.paths.vs,"/loader.js"));return l.onload=function(){return n()},l.onerror=a.reject,l}function FA(){var n=jo(function(l){var i=l.config,s=l.resolve,u=l.reject;return{config:i,resolve:s,reject:u}}),a=window.require;a.config(n.config),a(["vs/editor/editor.main"],function(l){Bx(l),n.resolve(l)},function(l){n.reject(l)})}function Bx(n){jo().monaco||Fu({monaco:n})}function XA(){return jo(function(n){var a=n.monaco;return a})}var Nd=new Promise(function(n,a){return Fu({resolve:n,reject:a})}),$x={config:VA,init:YA,__getMonacoInstance:XA},QA={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},Rd=QA,ZA={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},IA=ZA;function JA({children:n}){return yt.createElement("div",{style:IA.container},n)}var WA=JA,eT=WA;function tT({width:n,height:a,isEditorReady:l,loading:i,_ref:s,className:u,wrapperProps:f}){return yt.createElement("section",{style:{...Rd.wrapper,width:n,height:a},...f},!l&&yt.createElement(eT,null,i),yt.createElement("div",{ref:s,style:{...Rd.fullWidth,...!l&&Rd.hide},className:u}))}var nT=tT,Vx=y.memo(nT);function aT(n){y.useEffect(n,[])}var Yx=aT;function rT(n,a,l=!0){let i=y.useRef(!0);y.useEffect(i.current||!l?()=>{i.current=!1}:n,a)}var cn=rT;function mo(){}function Kl(n,a,l,i){return lT(n,i)||iT(n,a,l,i)}function lT(n,a){return n.editor.getModel(qx(n,a))}function iT(n,a,l,i){return n.editor.createModel(a,l,i?qx(n,i):void 0)}function qx(n,a){return n.Uri.parse(a)}function oT({original:n,modified:a,language:l,originalLanguage:i,modifiedLanguage:s,originalModelPath:u,modifiedModelPath:f,keepCurrentOriginalModel:d=!1,keepCurrentModifiedModel:p=!1,theme:m="light",loading:v="Loading...",options:b={},height:S="100%",width:w="100%",className:_,wrapperProps:C={},beforeMount:j=mo,onMount:N=mo}){let[U,z]=y.useState(!1),[D,T]=y.useState(!0),R=y.useRef(null),H=y.useRef(null),Z=y.useRef(null),J=y.useRef(N),ne=y.useRef(j),Se=y.useRef(!1);Yx(()=>{let he=$x.init();return he.then(L=>(H.current=L)&&T(!1)).catch(L=>L?.type!=="cancelation"&&console.error("Monaco initialization: error:",L)),()=>R.current?fe():he.cancel()}),cn(()=>{if(R.current&&H.current){let he=R.current.getOriginalEditor(),L=Kl(H.current,n||"",i||l||"text",u||"");L!==he.getModel()&&he.setModel(L)}},[u],U),cn(()=>{if(R.current&&H.current){let he=R.current.getModifiedEditor(),L=Kl(H.current,a||"",s||l||"text",f||"");L!==he.getModel()&&he.setModel(L)}},[f],U),cn(()=>{let he=R.current.getModifiedEditor();he.getOption(H.current.editor.EditorOption.readOnly)?he.setValue(a||""):a!==he.getValue()&&(he.executeEdits("",[{range:he.getModel().getFullModelRange(),text:a||"",forceMoveMarkers:!0}]),he.pushUndoStop())},[a],U),cn(()=>{R.current?.getModel()?.original.setValue(n||"")},[n],U),cn(()=>{let{original:he,modified:L}=R.current.getModel();H.current.editor.setModelLanguage(he,i||l||"text"),H.current.editor.setModelLanguage(L,s||l||"text")},[l,i,s],U),cn(()=>{H.current?.editor.setTheme(m)},[m],U),cn(()=>{R.current?.updateOptions(b)},[b],U);let de=y.useCallback(()=>{if(!H.current)return;ne.current(H.current);let he=Kl(H.current,n||"",i||l||"text",u||""),L=Kl(H.current,a||"",s||l||"text",f||"");R.current?.setModel({original:he,modified:L})},[l,a,s,n,i,u,f]),oe=y.useCallback(()=>{!Se.current&&Z.current&&(R.current=H.current.editor.createDiffEditor(Z.current,{automaticLayout:!0,...b}),de(),H.current?.editor.setTheme(m),z(!0),Se.current=!0)},[b,m,de]);y.useEffect(()=>{U&&J.current(R.current,H.current)},[U]),y.useEffect(()=>{!D&&!U&&oe()},[D,U,oe]);function fe(){let he=R.current?.getModel();d||he?.original?.dispose(),p||he?.modified?.dispose(),R.current?.dispose()}return yt.createElement(Vx,{width:w,height:S,isEditorReady:U,loading:v,_ref:Z,className:_,wrapperProps:C})}var sT=oT;y.memo(sT);function uT(n){let a=y.useRef();return y.useEffect(()=>{a.current=n},[n]),a.current}var cT=uT,au=new Map;function fT({defaultValue:n,defaultLanguage:a,defaultPath:l,value:i,language:s,path:u,theme:f="light",line:d,loading:p="Loading...",options:m={},overrideServices:v={},saveViewState:b=!0,keepCurrentModel:S=!1,width:w="100%",height:_="100%",className:C,wrapperProps:j={},beforeMount:N=mo,onMount:U=mo,onChange:z,onValidate:D=mo}){let[T,R]=y.useState(!1),[H,Z]=y.useState(!0),J=y.useRef(null),ne=y.useRef(null),Se=y.useRef(null),de=y.useRef(U),oe=y.useRef(N),fe=y.useRef(),he=y.useRef(i),L=cT(u),I=y.useRef(!1),V=y.useRef(!1);Yx(()=>{let K=$x.init();return K.then(P=>(J.current=P)&&Z(!1)).catch(P=>P?.type!=="cancelation"&&console.error("Monaco initialization: error:",P)),()=>ne.current?O():K.cancel()}),cn(()=>{let K=Kl(J.current,n||i||"",a||s||"",u||l||"");K!==ne.current?.getModel()&&(b&&au.set(L,ne.current?.saveViewState()),ne.current?.setModel(K),b&&ne.current?.restoreViewState(au.get(u)))},[u],T),cn(()=>{ne.current?.updateOptions(m)},[m],T),cn(()=>{!ne.current||i===void 0||(ne.current.getOption(J.current.editor.EditorOption.readOnly)?ne.current.setValue(i):i!==ne.current.getValue()&&(V.current=!0,ne.current.executeEdits("",[{range:ne.current.getModel().getFullModelRange(),text:i,forceMoveMarkers:!0}]),ne.current.pushUndoStop(),V.current=!1))},[i],T),cn(()=>{let K=ne.current?.getModel();K&&s&&J.current?.editor.setModelLanguage(K,s)},[s],T),cn(()=>{d!==void 0&&ne.current?.revealLine(d)},[d],T),cn(()=>{J.current?.editor.setTheme(f)},[f],T);let ge=y.useCallback(()=>{if(!(!Se.current||!J.current)&&!I.current){oe.current(J.current);let K=u||l,P=Kl(J.current,i||n||"",a||s||"",K||"");ne.current=J.current?.editor.create(Se.current,{model:P,automaticLayout:!0,...m},v),b&&ne.current.restoreViewState(au.get(K)),J.current.editor.setTheme(f),d!==void 0&&ne.current.revealLine(d),R(!0),I.current=!0}},[n,a,l,i,s,u,m,v,b,f,d]);y.useEffect(()=>{T&&de.current(ne.current,J.current)},[T]),y.useEffect(()=>{!H&&!T&&ge()},[H,T,ge]),he.current=i,y.useEffect(()=>{T&&z&&(fe.current?.dispose(),fe.current=ne.current?.onDidChangeModelContent(K=>{V.current||z(ne.current.getValue(),K)}))},[T,z]),y.useEffect(()=>{if(T){let K=J.current.editor.onDidChangeMarkers(P=>{let G=ne.current.getModel()?.uri;if(G&&P.find(ee=>ee.path===G.path)){let ee=J.current.editor.getModelMarkers({resource:G});D?.(ee)}});return()=>{K?.dispose()}}return()=>{}},[T,D]);function O(){fe.current?.dispose(),S?b&&au.set(u,ne.current.saveViewState()):ne.current.getModel()?.dispose(),ne.current.dispose()}return yt.createElement(Vx,{width:w,height:_,isEditorReady:T,loading:p,_ref:Se,className:C,wrapperProps:j})}var dT=fT,hT=y.memo(dT),mT=hT;function pT({open:n,onOpenChange:a,showToast:l}){const{t:i}=fr(),{config:s}=Zr(),[u,f]=y.useState(""),[d,p]=y.useState(!1),[m,v]=y.useState(!1),[b,S]=y.useState(!1),w=y.useRef(null);y.useEffect(()=>{s&&n&&f(JSON.stringify(s,null,2))},[s,n]),y.useEffect(()=>{if(n)v(!0),requestAnimationFrame(()=>{S(!0)});else{S(!1);const N=setTimeout(()=>{v(!1)},300);return()=>clearTimeout(N)}},[n]);const _=(N,U,z)=>{if(N&&typeof N=="object"&&"success"in N){const D=N;return D.success?(l&&l(D.message||U,"success"),!0):(l&&l(D.message||z,"error"),!1)}else return l&&l(U,"success"),!0},C=async()=>{if(u)try{p(!0);const N=JSON.parse(u),U=await Gt.updateConfig(N);_(U,i("app.config_saved_success"),i("app.config_saved_failed"))&&a(!1)}catch(N){console.error("Failed to save config:",N),l&&l(i("app.config_saved_failed")+": "+N.message,"error")}finally{p(!1)}},j=async()=>{if(u)try{p(!0);const N=JSON.parse(u),U=await Gt.updateConfig(N);if(_(U,i("app.config_saved_success"),i("app.config_saved_failed"))){const D=await Gt.restartService();_(D,i("app.config_saved_restart_success"),i("app.config_saved_restart_failed")),a(!1)}}catch(N){console.error("Failed to save config and restart:",N),l&&l(i("app.config_saved_restart_failed")+": "+N.message,"error")}finally{p(!1)}};return!m&&!n?null:g.jsxs(g.Fragment,{children:[(m||n)&&g.jsx("div",{className:`fixed inset-0 z-50 transition-all duration-300 ease-out ${b&&n?"bg-black/50 opacity-100":"bg-black/0 opacity-0 pointer-events-none"}`,onClick:()=>a(!1)}),g.jsxs("div",{ref:w,className:`fixed bottom-0 left-0 right-0 z-50 flex flex-col bg-white shadow-2xl transition-all duration-300 ease-out transform ${b&&n?"translate-y-0":"translate-y-full"}`,style:{height:"100vh",maxHeight:"100vh"},children:[g.jsxs("div",{className:"flex items-center justify-between border-b p-4",children:[g.jsx("h2",{className:"text-lg font-semibold",children:i("json_editor.title")}),g.jsxs("div",{className:"flex gap-2",children:[g.jsxs(Te,{variant:"outline",size:"sm",onClick:()=>a(!1),disabled:d,children:[g.jsx(Xl,{className:"h-4 w-4 mr-2"}),i("json_editor.cancel")]}),g.jsxs(Te,{variant:"outline",size:"sm",onClick:C,disabled:d,children:[g.jsx(hb,{className:"h-4 w-4 mr-2"}),i(d?"json_editor.saving":"json_editor.save")]}),g.jsxs(Te,{variant:"default",size:"sm",onClick:j,disabled:d,children:[g.jsx(db,{className:"h-4 w-4 mr-2"}),i(d?"json_editor.saving":"json_editor.save_and_restart")]})]})]}),g.jsx("div",{className:"flex-1 min-h-0 bg-gray-50",children:g.jsx(mT,{height:"100%",defaultLanguage:"json",value:u,onChange:N=>f(N||""),theme:"vs",options:{minimap:{enabled:!0},fontSize:14,scrollBeyondLastLine:!1,automaticLayout:!0,wordWrap:"on",formatOnPaste:!0,formatOnType:!0,suggest:{showKeywords:!0,showSnippets:!0}}})})]})]})}function gT({message:n,type:a,onClose:l}){y.useEffect(()=>{const u=setTimeout(()=>{l()},3e3);return()=>clearTimeout(u)},[l]);const i=()=>{switch(a){case"success":return g.jsx(mN,{className:"h-5 w-5 text-green-500"});case"error":return g.jsx(gN,{className:"h-5 w-5 text-red-500"});case"warning":return g.jsx(cN,{className:"h-5 w-5 text-yellow-500"});default:return null}},s=()=>{switch(a){case"success":return"bg-green-100 border-green-200";case"error":return"bg-red-100 border-red-200";case"warning":return"bg-yellow-100 border-yellow-200";default:return"bg-gray-100 border-gray-200"}};return g.jsxs("div",{className:`fixed top-4 right-4 z-50 flex items-center justify-between p-4 rounded-lg border shadow-lg ${s()} transition-all duration-300 ease-in-out`,children:[g.jsxs("div",{className:"flex items-center space-x-2",children:[i(),g.jsx("span",{className:"text-sm font-medium",children:n})]}),g.jsx("button",{onClick:l,className:"ml-4 text-gray-500 hover:text-gray-700 focus:outline-none",children:g.jsx(Xl,{className:"h-4 w-4"})})]})}function vT(){const{t:n,i18n:a}=fr(),l=Ou(),{config:i,error:s}=Zr(),[u,f]=y.useState(!1),[d,p]=y.useState(!1),[m,v]=y.useState(!0),[b,S]=y.useState(null),[w,_]=y.useState(!1),[C,j]=y.useState(!1),[N,U]=y.useState(null),[z,D]=y.useState(!1),[T,R]=y.useState(!1),H=y.useRef(!1),Z=async()=>{if(!i){S({message:n("app.config_missing"),type:"error"});return}try{const de=await Gt.updateConfig(i);if(console.log("Config saved successfully"),de&&typeof de=="object"&&"success"in de){const oe=de;oe.success?S({message:oe.message||n("app.config_saved_success"),type:"success"}):S({message:oe.message||n("app.config_saved_failed"),type:"error"})}else S({message:n("app.config_saved_success"),type:"success"})}catch(de){console.error("Failed to save config:",de),S({message:n("app.config_saved_failed")+": "+de.message,type:"error"})}},J=async()=>{if(!i){S({message:n("app.config_missing"),type:"error"});return}try{const de=await Gt.updateConfig(i);let oe=!0;if(de&&typeof de=="object"&&"success"in de){const fe=de;fe.success||(oe=!1,S({message:fe.message||n("app.config_saved_failed"),type:"error"}))}if(oe){const fe=await Gt.restartService();if(console.log("Config saved and service restarted successfully"),fe&&typeof fe=="object"&&"success"in fe){const he=fe;he.success&&S({message:he.message||n("app.config_saved_restart_success"),type:"success"})}else S({message:n("app.config_saved_restart_success"),type:"success"})}}catch(de){console.error("Failed to save config and restart:",de),S({message:n("app.config_saved_restart_failed")+": "+de.message,type:"error"})}},ne=y.useCallback(async(de=!0)=>{if(T&&w){de&&j(!0);return}D(!0);try{const oe=await Gt.checkForUpdates();oe.hasUpdate&&oe.latestVersion&&oe.changelog?(_(!0),U({version:oe.latestVersion,changelog:oe.changelog}),de&&j(!0)):de&&S({message:n("app.no_updates_available"),type:"success"}),R(!0)}catch(oe){console.error("Failed to check for updates:",oe),de&&S({message:n("app.update_check_failed")+": "+oe.message,type:"error"})}finally{D(!1)}},[T,w,n]);y.useEffect(()=>{(async()=>{if(i){v(!1),!T&&!H.current&&(H.current=!0,ne(!1));return}if(!localStorage.getItem("apiKey")){v(!1);return}try{await Gt.getConfig()}catch(he){console.error("Error checking auth:",he),he.message==="Unauthorized"&&l("/login")}finally{v(!1),!T&&!H.current&&(H.current=!0,ne(!1))}})();const oe=()=>{l("/login")};return window.addEventListener("unauthorized",oe),()=>{window.removeEventListener("unauthorized",oe)}},[i,l,T,ne]);const Se=async()=>{if(N)try{const de=await Gt.performUpdate();de.success?(S({message:n("app.update_successful"),type:"success"}),_(!1),j(!1),R(!1)):S({message:n("app.update_failed")+": "+de.message,type:"error"})}catch(de){console.error("Failed to perform update:",de),S({message:n("app.update_failed")+": "+de.message,type:"error"})}};return m?g.jsx("div",{className:"h-screen bg-gray-50 font-sans flex items-center justify-center",children:g.jsx("div",{className:"text-gray-500",children:"Loading application..."})}):s?g.jsx("div",{className:"h-screen bg-gray-50 font-sans flex items-center justify-center",children:g.jsxs("div",{className:"text-red-500",children:["Error: ",s.message]})}):i?g.jsxs("div",{className:"h-screen bg-gray-50 font-sans",children:[g.jsxs("header",{className:"flex h-16 items-center justify-between border-b bg-white px-6",children:[g.jsx("h1",{className:"text-xl font-semibold text-gray-800",children:n("app.title")}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Te,{variant:"ghost",size:"icon",onClick:()=>f(!0),className:"transition-all-ease hover:scale-110",children:g.jsx(MN,{className:"h-5 w-5"})}),g.jsx(Te,{variant:"ghost",size:"icon",onClick:()=>p(!0),className:"transition-all-ease hover:scale-110",children:g.jsx(SN,{className:"h-5 w-5"})}),g.jsxs(Yu,{children:[g.jsx(qu,{asChild:!0,children:g.jsx(Te,{variant:"ghost",size:"icon",className:"transition-all-ease hover:scale-110",children:g.jsx(CN,{className:"h-5 w-5"})})}),g.jsx(Ku,{className:"w-32 p-2",children:g.jsxs("div",{className:"space-y-1",children:[g.jsx(Te,{variant:a.language.startsWith("en")?"default":"ghost",className:"w-full justify-start transition-all-ease hover:scale-[1.02]",onClick:()=>a.changeLanguage("en"),children:"English"}),g.jsx(Te,{variant:a.language.startsWith("zh")?"default":"ghost",className:"w-full justify-start transition-all-ease hover:scale-[1.02]",onClick:()=>a.changeLanguage("zh"),children:"中文"})]})})]}),g.jsxs(Te,{variant:"ghost",size:"icon",onClick:()=>ne(!0),disabled:z,className:"transition-all-ease hover:scale-110 relative",children:[g.jsxs("div",{className:"relative",children:[g.jsx(dN,{className:"h-5 w-5"}),w&&!z&&g.jsx("div",{className:"absolute -top-1 -right-1 w-3 h-3 bg-red-500 rounded-full border-2 border-white"})]}),z&&g.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:g.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent"})})]}),g.jsxs(Te,{onClick:Z,variant:"outline",className:"transition-all-ease hover:scale-[1.02] active:scale-[0.98]",children:[g.jsx(hb,{className:"mr-2 h-4 w-4"}),n("app.save")]}),g.jsxs(Te,{onClick:J,className:"transition-all-ease hover:scale-[1.02] active:scale-[0.98]",children:[g.jsx(db,{className:"mr-2 h-4 w-4"}),n("app.save_and_restart")]})]})]}),g.jsxs("main",{className:"flex h-[calc(100vh-4rem)] gap-4 p-4",children:[g.jsx("div",{className:"w-3/5",children:g.jsx(oA,{})}),g.jsxs("div",{className:"flex w-2/5 flex-col gap-4",children:[g.jsx("div",{className:"h-3/5",children:g.jsx(sA,{})}),g.jsx("div",{className:"flex-1",children:g.jsx(rA,{})})]})]}),g.jsx(nA,{isOpen:u,onOpenChange:f}),g.jsx(pT,{open:d,onOpenChange:p,showToast:(de,oe)=>S({message:de,type:oe})}),g.jsx(Kr,{open:C,onOpenChange:j,children:g.jsxs(lr,{className:"max-w-2xl",children:[g.jsxs(ir,{children:[g.jsxs(or,{children:[n("app.new_version_available"),N&&g.jsxs("span",{className:"ml-2 text-sm font-normal text-muted-foreground",children:["v",N.version]})]}),g.jsx(zu,{children:n("app.update_description")})]}),g.jsx("div",{className:"max-h-96 overflow-y-auto py-4",children:N?.changelog?g.jsx("div",{className:"whitespace-pre-wrap text-sm",children:N.changelog}):g.jsx("div",{className:"text-muted-foreground",children:n("app.no_changelog_available")})}),g.jsxs(Gr,{children:[g.jsx(Te,{variant:"outline",onClick:()=>j(!1),children:n("app.later")}),g.jsx(Te,{onClick:Se,children:n("app.update_now")})]})]})}),b&&g.jsx(gT,{message:b.message,type:b.type,onClose:()=>S(null)})]}):g.jsx("div",{className:"h-screen bg-gray-50 font-sans flex items-center justify-center",children:g.jsx("div",{className:"text-gray-500",children:"Loading configuration..."})})}function yT(){const{t:n}=fr(),a=Ou(),[l,i]=y.useState(""),[s,u]=y.useState(""),[f,d]=y.useState(!1);y.useEffect(()=>{(async()=>{if(localStorage.getItem("apiKey")){d(!0);try{await Gt.getConfig(),a("/dashboard")}catch{localStorage.removeItem("apiKey")}finally{d(!1)}}})();const v=()=>{a("/login")};return window.addEventListener("unauthorized",v),()=>{window.removeEventListener("unauthorized",v)}},[a]);const p=async m=>{m.preventDefault();try{Gt.setApiKey(l),window.dispatchEvent(new StorageEvent("storage",{key:"apiKey",newValue:l,url:window.location.href})),await Gt.getConfig(),a("/dashboard")}catch(v){Gt.setApiKey(""),v.message&&v.message.includes("401")?u(n("login.invalidApiKey")):a("/dashboard")}};return f?g.jsx("div",{className:"flex min-h-screen items-center justify-center bg-gray-50",children:g.jsxs(Sa,{className:"w-full max-w-md",children:[g.jsx(Ea,{className:"space-y-1",children:g.jsx(Ca,{className:"text-2xl",children:n("login.title")})}),g.jsxs(_a,{children:[g.jsx("div",{className:"flex justify-center py-8",children:g.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent"})}),g.jsx("p",{className:"text-center text-sm text-gray-500",children:n("login.validating")})]})]})}):g.jsx("div",{className:"flex min-h-screen items-center justify-center bg-gray-50",children:g.jsxs(Sa,{className:"w-full max-w-md",children:[g.jsxs(Ea,{className:"space-y-1",children:[g.jsx(Ca,{className:"text-2xl",children:n("login.title")}),g.jsx(kx,{children:n("login.description")})]}),g.jsxs("form",{onSubmit:p,children:[g.jsxs(_a,{className:"space-y-4",children:[g.jsxs("div",{className:"space-y-2",children:[g.jsx(Je,{htmlFor:"apiKey",children:n("login.apiKey")}),g.jsx(mt,{id:"apiKey",type:"password",value:l,onChange:m=>i(m.target.value),placeholder:n("login.apiKeyPlaceholder")})]}),s&&g.jsx("div",{className:"text-sm text-red-500",children:s})]}),g.jsx(zx,{children:g.jsx(Te,{className:"w-full",type:"submit",children:n("login.signIn")})})]})]})})}const bT=({children:n})=>n,xT=({children:n})=>n,wT=B2([{path:"/",element:g.jsx(K2,{to:"/dashboard",replace:!0})},{path:"/login",element:g.jsx(xT,{children:g.jsx(yT,{})})},{path:"/dashboard",element:g.jsx(bT,{children:g.jsx(vT,{})})}],{initialEntries:["/dashboard"]});xE.createRoot(document.getElementById("root")).render(g.jsx(y.StrictMode,{children:g.jsx(TO,{children:g.jsx(_C,{router:wT})})}));</script>
|
|
296
|
-
<style rel="stylesheet" crossorigin>/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-duration:initial;--tw-ease:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-orange-400:oklch(75% .183 55.934);--color-yellow-100:oklch(97.3% .071 103.193);--color-yellow-200:oklch(94.5% .129 101.54);--color-yellow-300:oklch(90.5% .182 98.111);--color-yellow-500:oklch(79.5% .184 86.047);--color-green-100:oklch(96.2% .044 156.743);--color-green-200:oklch(92.5% .084 155.995);--color-green-400:oklch(79.2% .209 151.711);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-cyan-300:oklch(86.5% .127 207.078);--color-cyan-500:oklch(71.5% .143 215.221);--color-blue-50:oklch(97% .014 254.604);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-800:oklch(42.4% .199 265.638);--color-purple-300:oklch(82.7% .119 306.383);--color-purple-400:oklch(71.4% .203 305.504);--color-purple-500:oklch(62.7% .265 303.9);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-md:28rem;--container-lg:32rem;--container-2xl:42rem;--container-4xl:56rem;--container-5xl:64rem;--container-6xl:72rem;--container-7xl:80rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--tracking-tight:-.025em;--tracking-widest:.1em;--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border);outline-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){*{outline-color:color-mix(in oklab,var(--ring)50%,transparent)}}body{background-color:var(--background);color:var(--foreground)}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:calc(var(--spacing)*0)}.-top-1{top:calc(var(--spacing)*-1)}.top-0{top:calc(var(--spacing)*0)}.top-1\/2{top:50%}.top-4{top:calc(var(--spacing)*4)}.top-\[50\%\]{top:50%}.-right-1{right:calc(var(--spacing)*-1)}.right-0{right:calc(var(--spacing)*0)}.right-2{right:calc(var(--spacing)*2)}.right-4{right:calc(var(--spacing)*4)}.bottom-0{bottom:calc(var(--spacing)*0)}.left-0{left:calc(var(--spacing)*0)}.left-\[50\%\]{left:50%}.z-50{z-index:50}.col-span-1{grid-column:span 1/span 1}.col-span-3{grid-column:span 3/span 3}.-mx-1{margin-inline:calc(var(--spacing)*-1)}.mt-0\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-auto{margin-top:auto}.mr-2{margin-right:calc(var(--spacing)*2)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-2{margin-left:calc(var(--spacing)*2)}.ml-3{margin-left:calc(var(--spacing)*3)}.ml-4{margin-left:calc(var(--spacing)*4)}.ml-auto{margin-left:auto}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-flex{display:inline-flex}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.h-3{height:calc(var(--spacing)*3)}.h-3\/5{height:60%}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-11{height:calc(var(--spacing)*11)}.h-16{height:calc(var(--spacing)*16)}.h-\[90vh\]{height:90vh}.h-\[calc\(100vh-4rem\)\]{height:calc(100vh - 4rem)}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-8{max-height:calc(var(--spacing)*8)}.max-h-96{max-height:calc(var(--spacing)*96)}.max-h-\[80vh\]{max-height:80vh}.max-h-\[300px\]{max-height:300px}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-\[200px\]{min-height:200px}.min-h-screen{min-height:100vh}.w-1\/2{width:50%}.w-2\/5{width:40%}.w-3{width:calc(var(--spacing)*3)}.w-3\/5{width:60%}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-8{width:calc(var(--spacing)*8)}.w-10{width:calc(var(--spacing)*10)}.w-11{width:calc(var(--spacing)*11)}.w-32{width:calc(var(--spacing)*32)}.w-48{width:calc(var(--spacing)*48)}.w-72{width:calc(var(--spacing)*72)}.w-\[--radix-popover-trigger-width\]{width:--radix-popover-trigger-width}.w-full{width:100%}.max-w-2xl{max-width:var(--container-2xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.min-w-0{min-width:calc(var(--spacing)*0)}.flex-1{flex:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.origin-\(--radix-popover-content-transform-origin\){transform-origin:var(--radix-popover-content-transform-origin)}.translate-x-\[-50\%\]{--tw-translate-x:-50%;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-0{--tw-translate-y:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-\[-50\%\]{--tw-translate-y:-50%;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-full{--tw-translate-y:100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-move{cursor:move}.cursor-pointer{cursor:pointer}.scroll-py-1{scroll-padding-block:calc(var(--spacing)*1)}.list-disc{list-style-type:disc}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-0{gap:calc(var(--spacing)*0)}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-6{gap:calc(var(--spacing)*6)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-none{border-radius:0}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-4{border-style:var(--tw-border-style);border-width:4px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-blue-200{border-color:var(--color-blue-200)}.border-border{border-color:var(--border)}.border-current{border-color:currentColor}.border-destructive\/50{border-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.border-destructive\/50{border-color:color-mix(in oklab,var(--destructive)50%,transparent)}}.border-gray-200{border-color:var(--color-gray-200)}.border-green-200{border-color:var(--color-green-200)}.border-input{border-color:var(--input)}.border-primary{border-color:var(--primary)}.border-red-200{border-color:var(--color-red-200)}.border-red-500{border-color:var(--color-red-500)}.border-transparent{border-color:#0000}.border-white{border-color:var(--color-white)}.border-yellow-200{border-color:var(--color-yellow-200)}.border-t-transparent{border-top-color:#0000}.bg-background{background-color:var(--background)}.bg-black{background-color:var(--color-black)}.bg-black\/0{background-color:#0000}@supports (color:color-mix(in lab,red,red)){.bg-black\/0{background-color:color-mix(in oklab,var(--color-black)0%,transparent)}}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\/50{background-color:color-mix(in oklab,var(--color-black)50%,transparent)}}.bg-black\/80{background-color:#000c}@supports (color:color-mix(in lab,red,red)){.bg-black\/80{background-color:color-mix(in oklab,var(--color-black)80%,transparent)}}.bg-black\/90{background-color:#000000e6}@supports (color:color-mix(in lab,red,red)){.bg-black\/90{background-color:color-mix(in oklab,var(--color-black)90%,transparent)}}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-300{background-color:var(--color-blue-300)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-border{background-color:var(--border)}.bg-card{background-color:var(--card)}.bg-cyan-300{background-color:var(--color-cyan-300)}.bg-cyan-500{background-color:var(--color-cyan-500)}.bg-destructive{background-color:var(--destructive)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-800{background-color:var(--color-gray-800)}.bg-green-100{background-color:var(--color-green-100)}.bg-green-400{background-color:var(--color-green-400)}.bg-green-600{background-color:var(--color-green-600)}.bg-orange-400{background-color:var(--color-orange-400)}.bg-popover{background-color:var(--popover)}.bg-primary{background-color:var(--primary)}.bg-purple-300{background-color:var(--color-purple-300)}.bg-purple-400{background-color:var(--color-purple-400)}.bg-purple-500{background-color:var(--color-purple-500)}.bg-red-50{background-color:var(--color-red-50)}.bg-red-100{background-color:var(--color-red-100)}.bg-red-400{background-color:var(--color-red-400)}.bg-red-500{background-color:var(--color-red-500)}.bg-red-600{background-color:var(--color-red-600)}.bg-secondary,.bg-secondary\/50{background-color:var(--secondary)}@supports (color:color-mix(in lab,red,red)){.bg-secondary\/50{background-color:color-mix(in oklab,var(--secondary)50%,transparent)}}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\/20{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.bg-white\/20{background-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.bg-yellow-100{background-color:var(--color-yellow-100)}.bg-yellow-300{background-color:var(--color-yellow-300)}.bg-yellow-500{background-color:var(--color-yellow-500)}.p-0{padding:calc(var(--spacing)*0)}.p-1{padding:calc(var(--spacing)*1)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-6{padding:calc(var(--spacing)*6)}.p-8{padding:calc(var(--spacing)*8)}.px-1\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.px-8{padding-inline:calc(var(--spacing)*8)}.py-0\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.py-5{padding-block:calc(var(--spacing)*5)}.py-6{padding-block:calc(var(--spacing)*6)}.py-8{padding-block:calc(var(--spacing)*8)}.pt-0{padding-top:calc(var(--spacing)*0)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-4{padding-top:calc(var(--spacing)*4)}.pr-10{padding-right:calc(var(--spacing)*10)}.pb-4{padding-bottom:calc(var(--spacing)*4)}.pl-4{padding-left:calc(var(--spacing)*4)}.pl-5{padding-left:calc(var(--spacing)*5)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-none{--tw-leading:1;line-height:1}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-black{color:var(--color-black)}.text-blue-300{color:var(--color-blue-300)}.text-blue-400{color:var(--color-blue-400)}.text-blue-500{color:var(--color-blue-500)}.text-blue-700{color:var(--color-blue-700)}.text-blue-800{color:var(--color-blue-800)}.text-card-foreground{color:var(--card-foreground)}.text-current{color:currentColor}.text-cyan-300{color:var(--color-cyan-300)}.text-cyan-500{color:var(--color-cyan-500)}.text-destructive{color:var(--destructive)}.text-destructive-foreground{color:var(--destructive-foreground)}.text-foreground{color:var(--foreground)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-green-400{color:var(--color-green-400)}.text-green-500{color:var(--color-green-500)}.text-green-600{color:var(--color-green-600)}.text-muted-foreground{color:var(--muted-foreground)}.text-popover-foreground{color:var(--popover-foreground)}.text-primary{color:var(--primary)}.text-primary-foreground{color:var(--primary-foreground)}.text-purple-300{color:var(--color-purple-300)}.text-purple-500{color:var(--color-purple-500)}.text-red-400{color:var(--color-red-400)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-red-800{color:var(--color-red-800)}.text-secondary-foreground{color:var(--secondary-foreground)}.text-white{color:var(--color-white)}.text-yellow-300{color:var(--color-yellow-300)}.text-yellow-500{color:var(--color-yellow-500)}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.opacity-100{opacity:1}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-0{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-ring{--tw-ring-color:var(--ring)}.ring-offset-2{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.ring-offset-background{--tw-ring-offset-color:var(--background)}.outline-hidden{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.outline-hidden{outline-offset:2px;outline:2px solid #0000}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.select-none{-webkit-user-select:none;user-select:none}.group-data-\[state\=open\]\:rotate-180:is(:where(.group)[data-state=open] *){rotate:180deg}.peer-disabled\:cursor-not-allowed:is(:where(.peer):disabled~*){cursor:not-allowed}.peer-disabled\:opacity-70:is(:where(.peer):disabled~*){opacity:.7}.file\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\:bg-transparent::file-selector-button{background-color:#0000}.file\:text-sm::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.file\:text-foreground::file-selector-button{color:var(--foreground)}.placeholder\:text-muted-foreground::placeholder{color:var(--muted-foreground)}@media (hover:hover){.hover\:scale-105:hover{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x)var(--tw-scale-y)}.hover\:scale-110:hover{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x)var(--tw-scale-y)}.hover\:scale-\[1\.01\]:hover{scale:1.01}.hover\:scale-\[1\.02\]:hover{scale:1.02}.hover\:bg-accent:hover{background-color:var(--accent)}.hover\:bg-destructive:hover,.hover\:bg-destructive\/80:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-destructive\/80:hover{background-color:color-mix(in oklab,var(--destructive)80%,transparent)}}.hover\:bg-gray-200:hover{background-color:var(--color-gray-200)}.hover\:bg-primary\/80:hover{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/80:hover{background-color:color-mix(in oklab,var(--primary)80%,transparent)}}.hover\:bg-primary\/90:hover{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab,var(--primary)90%,transparent)}}.hover\:bg-secondary:hover,.hover\:bg-secondary\/80:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-secondary\/80:hover{background-color:color-mix(in oklab,var(--secondary)80%,transparent)}}.hover\:bg-transparent:hover{background-color:#0000}.hover\:bg-white\/10:hover{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/10:hover{background-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.hover\:text-accent-foreground:hover{color:var(--accent-foreground)}.hover\:text-destructive-foreground:hover{color:var(--destructive-foreground)}.hover\:text-gray-700:hover{color:var(--color-gray-700)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\:scale-\[1\.01\]:focus{scale:1.01}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-ring:focus{--tw-ring-color:var(--ring)}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color:var(--ring)}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus-visible\:ring-offset-background:focus-visible{--tw-ring-offset-color:var(--background)}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.active\:scale-\[0\.98\]:active{scale:.98}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.data-\[disabled\=true\]\:pointer-events-none[data-disabled=true]{pointer-events:none}.data-\[disabled\=true\]\:opacity-50[data-disabled=true]{opacity:.5}.data-\[selected\=true\]\:bg-accent[data-selected=true]{background-color:var(--accent)}.data-\[selected\=true\]\:text-accent-foreground[data-selected=true]{color:var(--accent-foreground)}:is(.\*\*\:data-\[slot\=command-input-wrapper\]\:h-12 *)[data-slot=command-input-wrapper]{height:calc(var(--spacing)*12)}.data-\[state\=checked\]\:translate-x-5[data-state=checked]{--tw-translate-x:calc(var(--spacing)*5);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:var(--primary)}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:var(--accent)}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:var(--muted-foreground)}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked]{--tw-translate-x:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:var(--input)}@media (min-width:40rem){.sm\:col-span-2{grid-column:span 2/span 2}.sm\:max-w-2xl{max-width:var(--container-2xl)}.sm\:max-w-5xl{max-width:var(--container-5xl)}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}:where(.sm\:space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:text-left{text-align:left}}@media (min-width:48rem){.md\:max-w-6xl{max-width:var(--container-6xl)}.md\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}@media (min-width:64rem){.lg\:max-w-7xl{max-width:var(--container-7xl)}}.\[\&_\[cmdk-group-heading\]\]\:px-2 [cmdk-group-heading]{padding-inline:calc(var(--spacing)*2)}.\[\&_\[cmdk-group-heading\]\]\:py-1\.5 [cmdk-group-heading]{padding-block:calc(var(--spacing)*1.5)}.\[\&_\[cmdk-group-heading\]\]\:text-xs [cmdk-group-heading]{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\[cmdk-group-heading\]\]\:font-medium [cmdk-group-heading]{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\[cmdk-group-heading\]\]\:text-muted-foreground [cmdk-group-heading]{color:var(--muted-foreground)}.\[\&_\[cmdk-group\]\]\:px-2 [cmdk-group]{padding-inline:calc(var(--spacing)*2)}.\[\&_\[cmdk-group\]\:not\(\[hidden\]\)_\~\[cmdk-group\]\]\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:calc(var(--spacing)*0)}.\[\&_\[cmdk-input-wrapper\]_svg\]\:h-5 [cmdk-input-wrapper] svg{height:calc(var(--spacing)*5)}.\[\&_\[cmdk-input-wrapper\]_svg\]\:w-5 [cmdk-input-wrapper] svg{width:calc(var(--spacing)*5)}.\[\&_\[cmdk-input\]\]\:h-12 [cmdk-input]{height:calc(var(--spacing)*12)}.\[\&_\[cmdk-item\]\]\:px-2 [cmdk-item]{padding-inline:calc(var(--spacing)*2)}.\[\&_\[cmdk-item\]\]\:py-3 [cmdk-item]{padding-block:calc(var(--spacing)*3)}.\[\&_\[cmdk-item\]_svg\]\:h-5 [cmdk-item] svg{height:calc(var(--spacing)*5)}.\[\&_\[cmdk-item\]_svg\]\:w-5 [cmdk-item] svg{width:calc(var(--spacing)*5)}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-4 svg{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-4 svg:not([class*=size-]){width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.\[\&_svg\:not\(\[class\*\=\'text-\'\]\)\]\:text-muted-foreground svg:not([class*=text-]){color:var(--muted-foreground)}}:root{--radius:.625rem;--background:oklch(100% 0 0);--foreground:oklch(14.5% 0 0);--card:oklch(100% 0 0);--card-foreground:oklch(14.5% 0 0);--popover:oklch(100% 0 0);--popover-foreground:oklch(14.5% 0 0);--primary:oklch(20.5% 0 0);--primary-foreground:oklch(98.5% 0 0);--secondary:oklch(97% 0 0);--secondary-foreground:oklch(20.5% 0 0);--muted:oklch(97% 0 0);--muted-foreground:oklch(55.6% 0 0);--accent:oklch(97% 0 0);--accent-foreground:oklch(20.5% 0 0);--destructive:oklch(57.7% .245 27.325);--destructive-foreground:oklch(98.5% 0 0);--border:oklch(92.2% 0 0);--input:oklch(92.2% 0 0);--ring:oklch(70.8% 0 0);--chart-1:oklch(64.6% .222 41.116);--chart-2:oklch(60% .118 184.704);--chart-3:oklch(39.8% .07 227.392);--chart-4:oklch(82.8% .189 84.429);--chart-5:oklch(76.9% .188 70.08);--sidebar:oklch(98.5% 0 0);--sidebar-foreground:oklch(14.5% 0 0);--sidebar-primary:oklch(20.5% 0 0);--sidebar-primary-foreground:oklch(98.5% 0 0);--sidebar-accent:oklch(97% 0 0);--sidebar-accent-foreground:oklch(20.5% 0 0);--sidebar-border:oklch(92.2% 0 0);--sidebar-ring:oklch(70.8% 0 0)}.dark{--background:oklch(14.5% 0 0);--foreground:oklch(98.5% 0 0);--card:oklch(20.5% 0 0);--card-foreground:oklch(98.5% 0 0);--popover:oklch(20.5% 0 0);--popover-foreground:oklch(98.5% 0 0);--primary:oklch(92.2% 0 0);--primary-foreground:oklch(20.5% 0 0);--secondary:oklch(26.9% 0 0);--secondary-foreground:oklch(98.5% 0 0);--muted:oklch(26.9% 0 0);--muted-foreground:oklch(70.8% 0 0);--accent:oklch(26.9% 0 0);--accent-foreground:oklch(98.5% 0 0);--destructive:oklch(70.4% .191 22.216);--destructive-foreground:oklch(98.5% 0 0);--border:oklch(100% 0 0/.1);--input:oklch(100% 0 0/.15);--ring:oklch(55.6% 0 0);--chart-1:oklch(48.8% .243 264.376);--chart-2:oklch(69.6% .17 162.48);--chart-3:oklch(76.9% .188 70.08);--chart-4:oklch(62.7% .265 303.9);--chart-5:oklch(64.5% .246 16.439);--sidebar:oklch(20.5% 0 0);--sidebar-foreground:oklch(98.5% 0 0);--sidebar-primary:oklch(48.8% .243 264.376);--sidebar-primary-foreground:oklch(98.5% 0 0);--sidebar-accent:oklch(26.9% 0 0);--sidebar-accent-foreground:oklch(98.5% 0 0);--sidebar-border:oklch(100% 0 0/.1);--sidebar-ring:oklch(55.6% 0 0)}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@keyframes spin{to{transform:rotate(360deg)}}@keyframes fadeIn{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes scaleIn{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes slideIn{0%{opacity:0;transform:translate(20px)}to{opacity:1;transform:translate(0)}}.animate-fade-in{animation:fadeIn .2s ease-out forwards}.animate-scale-in{animation:scaleIn .2s cubic-bezier(.34,1.56,.64,1) forwards}.animate-slide-in{animation:slideIn .3s cubic-bezier(.34,1.56,.64,1) forwards}.transition-all-ease{transition:all .2s cubic-bezier(.34,1.56,.64,1)}</style>
|
|
296
|
+
`},Gy=MA(zA)(zx),UA={config:LA},PA=function(){for(var a=arguments.length,l=new Array(a),i=0;i<a;i++)l[i]=arguments[i];return function(s){return l.reduceRight(function(u,f){return f(u)},s)}};function Ux(n,a){return Object.keys(a).forEach(function(l){a[l]instanceof Object&&n[l]&&Object.assign(a[l],Ux(n[l],a[l]))}),Yy(Yy({},n),a)}var HA={type:"cancelation",msg:"operation is manually canceled"};function _d(n){var a=!1,l=new Promise(function(i,s){n.then(function(u){return a?s(HA):i(u)}),n.catch(s)});return l.cancel=function(){return a=!0},l}var BA=AA.create({config:TA,isInitialized:!1,resolve:null,reject:null,monaco:null}),Px=fA(BA,2),jo=Px[0],Fu=Px[1];function $A(n){var a=UA.config(n),l=a.monaco,i=cA(a,["monaco"]);Fu(function(s){return{config:Ux(s.config,i),monaco:l}})}function VA(){var n=jo(function(a){var l=a.monaco,i=a.isInitialized,s=a.resolve;return{monaco:l,isInitialized:i,resolve:s}});if(!n.isInitialized){if(Fu({isInitialized:!0}),n.monaco)return n.resolve(n.monaco),_d(Cd);if(window.monaco&&window.monaco.editor)return Hx(window.monaco),n.resolve(window.monaco),_d(Cd);PA(YA,FA)(KA)}return _d(Cd)}function YA(n){return document.body.appendChild(n)}function qA(n){var a=document.createElement("script");return n&&(a.src=n),a}function FA(n){var a=jo(function(i){var s=i.config,u=i.reject;return{config:s,reject:u}}),l=qA("".concat(a.config.paths.vs,"/loader.js"));return l.onload=function(){return n()},l.onerror=a.reject,l}function KA(){var n=jo(function(l){var i=l.config,s=l.resolve,u=l.reject;return{config:i,resolve:s,reject:u}}),a=window.require;a.config(n.config),a(["vs/editor/editor.main"],function(l){Hx(l),n.resolve(l)},function(l){n.reject(l)})}function Hx(n){jo().monaco||Fu({monaco:n})}function GA(){return jo(function(n){var a=n.monaco;return a})}var Cd=new Promise(function(n,a){return Fu({resolve:n,reject:a})}),Bx={config:$A,init:VA,__getMonacoInstance:GA},XA={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},Nd=XA,QA={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},ZA=QA;function IA({children:n}){return mt.createElement("div",{style:ZA.container},n)}var JA=IA,WA=JA;function eT({width:n,height:a,isEditorReady:l,loading:i,_ref:s,className:u,wrapperProps:f}){return mt.createElement("section",{style:{...Nd.wrapper,width:n,height:a},...f},!l&&mt.createElement(WA,null,i),mt.createElement("div",{ref:s,style:{...Nd.fullWidth,...!l&&Nd.hide},className:u}))}var tT=eT,$x=y.memo(tT);function nT(n){y.useEffect(n,[])}var Vx=nT;function aT(n,a,l=!0){let i=y.useRef(!0);y.useEffect(i.current||!l?()=>{i.current=!1}:n,a)}var mn=aT;function mo(){}function Fl(n,a,l,i){return rT(n,i)||lT(n,a,l,i)}function rT(n,a){return n.editor.getModel(Yx(n,a))}function lT(n,a,l,i){return n.editor.createModel(a,l,i?Yx(n,i):void 0)}function Yx(n,a){return n.Uri.parse(a)}function iT({original:n,modified:a,language:l,originalLanguage:i,modifiedLanguage:s,originalModelPath:u,modifiedModelPath:f,keepCurrentOriginalModel:d=!1,keepCurrentModifiedModel:p=!1,theme:m="light",loading:v="Loading...",options:b={},height:w="100%",width:S="100%",className:C,wrapperProps:_={},beforeMount:j=mo,onMount:N=mo}){let[z,k]=y.useState(!1),[H,D]=y.useState(!0),R=y.useRef(null),B=y.useRef(null),Z=y.useRef(null),ne=y.useRef(N),oe=y.useRef(j),le=y.useRef(!1);Vx(()=>{let ue=Bx.init();return ue.then(A=>(B.current=A)&&D(!1)).catch(A=>A?.type!=="cancelation"&&console.error("Monaco initialization: error:",A)),()=>R.current?W():ue.cancel()}),mn(()=>{if(R.current&&B.current){let ue=R.current.getOriginalEditor(),A=Fl(B.current,n||"",i||l||"text",u||"");A!==ue.getModel()&&ue.setModel(A)}},[u],z),mn(()=>{if(R.current&&B.current){let ue=R.current.getModifiedEditor(),A=Fl(B.current,a||"",s||l||"text",f||"");A!==ue.getModel()&&ue.setModel(A)}},[f],z),mn(()=>{let ue=R.current.getModifiedEditor();ue.getOption(B.current.editor.EditorOption.readOnly)?ue.setValue(a||""):a!==ue.getValue()&&(ue.executeEdits("",[{range:ue.getModel().getFullModelRange(),text:a||"",forceMoveMarkers:!0}]),ue.pushUndoStop())},[a],z),mn(()=>{R.current?.getModel()?.original.setValue(n||"")},[n],z),mn(()=>{let{original:ue,modified:A}=R.current.getModel();B.current.editor.setModelLanguage(ue,i||l||"text"),B.current.editor.setModelLanguage(A,s||l||"text")},[l,i,s],z),mn(()=>{B.current?.editor.setTheme(m)},[m],z),mn(()=>{R.current?.updateOptions(b)},[b],z);let J=y.useCallback(()=>{if(!B.current)return;oe.current(B.current);let ue=Fl(B.current,n||"",i||l||"text",u||""),A=Fl(B.current,a||"",s||l||"text",f||"");R.current?.setModel({original:ue,modified:A})},[l,a,s,n,i,u,f]),te=y.useCallback(()=>{!le.current&&Z.current&&(R.current=B.current.editor.createDiffEditor(Z.current,{automaticLayout:!0,...b}),J(),B.current?.editor.setTheme(m),k(!0),le.current=!0)},[b,m,J]);y.useEffect(()=>{z&&ne.current(R.current,B.current)},[z]),y.useEffect(()=>{!H&&!z&&te()},[H,z,te]);function W(){let ue=R.current?.getModel();d||ue?.original?.dispose(),p||ue?.modified?.dispose(),R.current?.dispose()}return mt.createElement($x,{width:S,height:w,isEditorReady:z,loading:v,_ref:Z,className:C,wrapperProps:_})}var oT=iT;y.memo(oT);function sT(n){let a=y.useRef();return y.useEffect(()=>{a.current=n},[n]),a.current}var uT=sT,au=new Map;function cT({defaultValue:n,defaultLanguage:a,defaultPath:l,value:i,language:s,path:u,theme:f="light",line:d,loading:p="Loading...",options:m={},overrideServices:v={},saveViewState:b=!0,keepCurrentModel:w=!1,width:S="100%",height:C="100%",className:_,wrapperProps:j={},beforeMount:N=mo,onMount:z=mo,onChange:k,onValidate:H=mo}){let[D,R]=y.useState(!1),[B,Z]=y.useState(!0),ne=y.useRef(null),oe=y.useRef(null),le=y.useRef(null),J=y.useRef(z),te=y.useRef(N),W=y.useRef(),ue=y.useRef(i),A=uT(u),Q=y.useRef(!1),V=y.useRef(!1);Vx(()=>{let F=Bx.init();return F.then(U=>(ne.current=U)&&Z(!1)).catch(U=>U?.type!=="cancelation"&&console.error("Monaco initialization: error:",U)),()=>oe.current?O():F.cancel()}),mn(()=>{let F=Fl(ne.current,n||i||"",a||s||"",u||l||"");F!==oe.current?.getModel()&&(b&&au.set(A,oe.current?.saveViewState()),oe.current?.setModel(F),b&&oe.current?.restoreViewState(au.get(u)))},[u],D),mn(()=>{oe.current?.updateOptions(m)},[m],D),mn(()=>{!oe.current||i===void 0||(oe.current.getOption(ne.current.editor.EditorOption.readOnly)?oe.current.setValue(i):i!==oe.current.getValue()&&(V.current=!0,oe.current.executeEdits("",[{range:oe.current.getModel().getFullModelRange(),text:i,forceMoveMarkers:!0}]),oe.current.pushUndoStop(),V.current=!1))},[i],D),mn(()=>{let F=oe.current?.getModel();F&&s&&ne.current?.editor.setModelLanguage(F,s)},[s],D),mn(()=>{d!==void 0&&oe.current?.revealLine(d)},[d],D),mn(()=>{ne.current?.editor.setTheme(f)},[f],D);let ve=y.useCallback(()=>{if(!(!le.current||!ne.current)&&!Q.current){te.current(ne.current);let F=u||l,U=Fl(ne.current,i||n||"",a||s||"",F||"");oe.current=ne.current?.editor.create(le.current,{model:U,automaticLayout:!0,...m},v),b&&oe.current.restoreViewState(au.get(F)),ne.current.editor.setTheme(f),d!==void 0&&oe.current.revealLine(d),R(!0),Q.current=!0}},[n,a,l,i,s,u,m,v,b,f,d]);y.useEffect(()=>{D&&J.current(oe.current,ne.current)},[D]),y.useEffect(()=>{!B&&!D&&ve()},[B,D,ve]),ue.current=i,y.useEffect(()=>{D&&k&&(W.current?.dispose(),W.current=oe.current?.onDidChangeModelContent(F=>{V.current||k(oe.current.getValue(),F)}))},[D,k]),y.useEffect(()=>{if(D){let F=ne.current.editor.onDidChangeMarkers(U=>{let K=oe.current.getModel()?.uri;if(K&&U.find(ae=>ae.path===K.path)){let ae=ne.current.editor.getModelMarkers({resource:K});H?.(ae)}});return()=>{F?.dispose()}}return()=>{}},[D,H]);function O(){W.current?.dispose(),w?b&&au.set(u,oe.current.saveViewState()):oe.current.getModel()?.dispose(),oe.current.dispose()}return mt.createElement($x,{width:S,height:C,isEditorReady:D,loading:p,_ref:le,className:_,wrapperProps:j})}var fT=cT,dT=y.memo(fT),hT=dT;function mT({open:n,onOpenChange:a,showToast:l}){const{t:i}=hr(),{config:s}=Jr(),[u,f]=y.useState(""),[d,p]=y.useState(!1),[m,v]=y.useState(!1),[b,w]=y.useState(!1),S=y.useRef(null);y.useEffect(()=>{s&&n&&f(JSON.stringify(s,null,2))},[s,n]),y.useEffect(()=>{if(n)v(!0),requestAnimationFrame(()=>{w(!0)});else{w(!1);const N=setTimeout(()=>{v(!1)},300);return()=>clearTimeout(N)}},[n]);const C=(N,z,k)=>{if(N&&typeof N=="object"&&"success"in N){const H=N;return H.success?(l&&l(H.message||z,"success"),!0):(l&&l(H.message||k,"error"),!1)}else return l&&l(z,"success"),!0},_=async()=>{if(u)try{p(!0);const N=JSON.parse(u),z=await Qt.updateConfig(N);C(z,i("app.config_saved_success"),i("app.config_saved_failed"))&&a(!1)}catch(N){console.error("Failed to save config:",N),l&&l(i("app.config_saved_failed")+": "+N.message,"error")}finally{p(!1)}},j=async()=>{if(u)try{p(!0);const N=JSON.parse(u),z=await Qt.updateConfig(N);if(C(z,i("app.config_saved_success"),i("app.config_saved_failed"))){const H=await Qt.restartService();C(H,i("app.config_saved_restart_success"),i("app.config_saved_restart_failed")),a(!1)}}catch(N){console.error("Failed to save config and restart:",N),l&&l(i("app.config_saved_restart_failed")+": "+N.message,"error")}finally{p(!1)}};return!m&&!n?null:g.jsxs(g.Fragment,{children:[(m||n)&&g.jsx("div",{className:`fixed inset-0 z-50 transition-all duration-300 ease-out ${b&&n?"bg-black/50 opacity-100":"bg-black/0 opacity-0 pointer-events-none"}`,onClick:()=>a(!1)}),g.jsxs("div",{ref:S,className:`fixed bottom-0 left-0 right-0 z-50 flex flex-col bg-white shadow-2xl transition-all duration-300 ease-out transform ${b&&n?"translate-y-0":"translate-y-full"}`,style:{height:"100vh",maxHeight:"100vh"},children:[g.jsxs("div",{className:"flex items-center justify-between border-b p-4",children:[g.jsx("h2",{className:"text-lg font-semibold",children:i("json_editor.title")}),g.jsxs("div",{className:"flex gap-2",children:[g.jsxs(Ae,{variant:"outline",size:"sm",onClick:()=>a(!1),disabled:d,children:[g.jsx(Xl,{className:"h-4 w-4 mr-2"}),i("json_editor.cancel")]}),g.jsxs(Ae,{variant:"outline",size:"sm",onClick:_,disabled:d,children:[g.jsx(db,{className:"h-4 w-4 mr-2"}),i(d?"json_editor.saving":"json_editor.save")]}),g.jsxs(Ae,{variant:"default",size:"sm",onClick:j,disabled:d,children:[g.jsx(fb,{className:"h-4 w-4 mr-2"}),i(d?"json_editor.saving":"json_editor.save_and_restart")]})]})]}),g.jsx("div",{className:"flex-1 min-h-0 bg-gray-50",children:g.jsx(hT,{height:"100%",defaultLanguage:"json",value:u,onChange:N=>f(N||""),theme:"vs",options:{minimap:{enabled:!0},fontSize:14,scrollBeyondLastLine:!1,automaticLayout:!0,wordWrap:"on",formatOnPaste:!0,formatOnType:!0,suggest:{showKeywords:!0,showSnippets:!0}}})})]})]})}function pT({message:n,type:a,onClose:l}){y.useEffect(()=>{const u=setTimeout(()=>{l()},3e3);return()=>clearTimeout(u)},[l]);const i=()=>{switch(a){case"success":return g.jsx(hN,{className:"h-5 w-5 text-green-500"});case"error":return g.jsx(cb,{className:"h-5 w-5 text-red-500"});case"warning":return g.jsx(uN,{className:"h-5 w-5 text-yellow-500"});default:return null}},s=()=>{switch(a){case"success":return"bg-green-100 border-green-200";case"error":return"bg-red-100 border-red-200";case"warning":return"bg-yellow-100 border-yellow-200";default:return"bg-gray-100 border-gray-200"}};return g.jsxs("div",{className:`fixed top-4 right-4 z-50 flex items-center justify-between p-4 rounded-lg border shadow-lg ${s()} transition-all duration-300 ease-in-out`,children:[g.jsxs("div",{className:"flex items-center space-x-2",children:[i(),g.jsx("span",{className:"text-sm font-medium",children:n})]}),g.jsx("button",{onClick:l,className:"ml-4 text-gray-500 hover:text-gray-700 focus:outline-none",children:g.jsx(Xl,{className:"h-4 w-4"})})]})}function gT(){const{t:n,i18n:a}=hr(),l=Ru(),{config:i,error:s}=Jr(),[u,f]=y.useState(!1),[d,p]=y.useState(!1),[m,v]=y.useState(!0),[b,w]=y.useState(null),[S,C]=y.useState(!1),[_,j]=y.useState(!1),[N,z]=y.useState(null),[k,H]=y.useState(!1),[D,R]=y.useState(!1),B=y.useRef(!1),Z=async()=>{if(!i){w({message:n("app.config_missing"),type:"error"});return}try{const J=await Qt.updateConfig(i);if(console.log("Config saved successfully"),J&&typeof J=="object"&&"success"in J){const te=J;te.success?w({message:te.message||n("app.config_saved_success"),type:"success"}):w({message:te.message||n("app.config_saved_failed"),type:"error"})}else w({message:n("app.config_saved_success"),type:"success"})}catch(J){console.error("Failed to save config:",J),w({message:n("app.config_saved_failed")+": "+J.message,type:"error"})}},ne=async()=>{if(!i){w({message:n("app.config_missing"),type:"error"});return}try{const J=await Qt.updateConfig(i);let te=!0;if(J&&typeof J=="object"&&"success"in J){const W=J;W.success||(te=!1,w({message:W.message||n("app.config_saved_failed"),type:"error"}))}if(te){const W=await Qt.restartService();if(console.log("Config saved and service restarted successfully"),W&&typeof W=="object"&&"success"in W){const ue=W;ue.success&&w({message:ue.message||n("app.config_saved_restart_success"),type:"success"})}else w({message:n("app.config_saved_restart_success"),type:"success"})}}catch(J){console.error("Failed to save config and restart:",J),w({message:n("app.config_saved_restart_failed")+": "+J.message,type:"error"})}},oe=y.useCallback(async(J=!0)=>{if(D&&S){J&&j(!0);return}H(!0);try{const te=await Qt.checkForUpdates();te.hasUpdate&&te.latestVersion&&te.changelog?(C(!0),z({version:te.latestVersion,changelog:te.changelog}),J&&j(!0)):J&&w({message:n("app.no_updates_available"),type:"success"}),R(!0)}catch(te){console.error("Failed to check for updates:",te),J&&w({message:n("app.update_check_failed")+": "+te.message,type:"error"})}finally{H(!1)}},[D,S,n]);y.useEffect(()=>{(async()=>{if(i){v(!1),!D&&!B.current&&(B.current=!0,oe(!1));return}if(!localStorage.getItem("apiKey")){v(!1);return}try{await Qt.getConfig()}catch(ue){console.error("Error checking auth:",ue),ue.message==="Unauthorized"&&l("/login")}finally{v(!1),!D&&!B.current&&(B.current=!0,oe(!1))}})();const te=()=>{l("/login")};return window.addEventListener("unauthorized",te),()=>{window.removeEventListener("unauthorized",te)}},[i,l,D,oe]);const le=async()=>{if(N)try{const J=await Qt.performUpdate();J.success?(w({message:n("app.update_successful"),type:"success"}),C(!1),j(!1),R(!1)):w({message:n("app.update_failed")+": "+J.message,type:"error"})}catch(J){console.error("Failed to perform update:",J),w({message:n("app.update_failed")+": "+J.message,type:"error"})}};return m?g.jsx("div",{className:"h-screen bg-gray-50 font-sans flex items-center justify-center",children:g.jsx("div",{className:"text-gray-500",children:"Loading application..."})}):s?g.jsx("div",{className:"h-screen bg-gray-50 font-sans flex items-center justify-center",children:g.jsxs("div",{className:"text-red-500",children:["Error: ",s.message]})}):i?g.jsxs("div",{className:"h-screen bg-gray-50 font-sans",children:[g.jsxs("header",{className:"flex h-16 items-center justify-between border-b bg-white px-6",children:[g.jsx("h1",{className:"text-xl font-semibold text-gray-800",children:n("app.title")}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Ae,{variant:"ghost",size:"icon",onClick:()=>f(!0),className:"transition-all-ease hover:scale-110",children:g.jsx(ON,{className:"h-5 w-5"})}),g.jsx(Ae,{variant:"ghost",size:"icon",onClick:()=>p(!0),className:"transition-all-ease hover:scale-110",children:g.jsx(xN,{className:"h-5 w-5"})}),g.jsxs($u,{children:[g.jsx(Vu,{asChild:!0,children:g.jsx(Ae,{variant:"ghost",size:"icon",className:"transition-all-ease hover:scale-110",children:g.jsx(SN,{className:"h-5 w-5"})})}),g.jsx(Yu,{className:"w-32 p-2",children:g.jsxs("div",{className:"space-y-1",children:[g.jsx(Ae,{variant:a.language.startsWith("en")?"default":"ghost",className:"w-full justify-start transition-all-ease hover:scale-[1.02]",onClick:()=>a.changeLanguage("en"),children:"English"}),g.jsx(Ae,{variant:a.language.startsWith("zh")?"default":"ghost",className:"w-full justify-start transition-all-ease hover:scale-[1.02]",onClick:()=>a.changeLanguage("zh"),children:"中文"})]})})]}),g.jsxs(Ae,{variant:"ghost",size:"icon",onClick:()=>oe(!0),disabled:k,className:"transition-all-ease hover:scale-110 relative",children:[g.jsxs("div",{className:"relative",children:[g.jsx(fN,{className:"h-5 w-5"}),S&&!k&&g.jsx("div",{className:"absolute -top-1 -right-1 w-3 h-3 bg-red-500 rounded-full border-2 border-white"})]}),k&&g.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:g.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent"})})]}),g.jsxs(Ae,{onClick:Z,variant:"outline",className:"transition-all-ease hover:scale-[1.02] active:scale-[0.98]",children:[g.jsx(db,{className:"mr-2 h-4 w-4"}),n("app.save")]}),g.jsxs(Ae,{onClick:ne,className:"transition-all-ease hover:scale-[1.02] active:scale-[0.98]",children:[g.jsx(fb,{className:"mr-2 h-4 w-4"}),n("app.save_and_restart")]})]})]}),g.jsxs("main",{className:"flex h-[calc(100vh-4rem)] gap-4 p-4 overflow-hidden",children:[g.jsx("div",{className:"w-3/5",children:g.jsx(iA,{})}),g.jsxs("div",{className:"flex w-2/5 flex-col gap-4",children:[g.jsx("div",{className:"h-3/5",children:g.jsx(oA,{})}),g.jsx("div",{className:"flex-1 overflow-hidden",children:g.jsx(aA,{})})]})]}),g.jsx(tA,{isOpen:u,onOpenChange:f}),g.jsx(mT,{open:d,onOpenChange:p,showToast:(J,te)=>w({message:J,type:te})}),g.jsx(Gr,{open:_,onOpenChange:j,children:g.jsxs(or,{className:"max-w-2xl",children:[g.jsxs(sr,{children:[g.jsxs(ur,{children:[n("app.new_version_available"),N&&g.jsxs("span",{className:"ml-2 text-sm font-normal text-muted-foreground",children:["v",N.version]})]}),g.jsx(Lu,{children:n("app.update_description")})]}),g.jsx("div",{className:"max-h-96 overflow-y-auto py-4",children:N?.changelog?g.jsx("div",{className:"whitespace-pre-wrap text-sm",children:N.changelog}):g.jsx("div",{className:"text-muted-foreground",children:n("app.no_changelog_available")})}),g.jsxs(Xr,{children:[g.jsx(Ae,{variant:"outline",onClick:()=>j(!1),children:n("app.later")}),g.jsx(Ae,{onClick:le,children:n("app.update_now")})]})]})}),b&&g.jsx(pT,{message:b.message,type:b.type,onClose:()=>w(null)})]}):g.jsx("div",{className:"h-screen bg-gray-50 font-sans flex items-center justify-center",children:g.jsx("div",{className:"text-gray-500",children:"Loading configuration..."})})}function vT(){const{t:n}=hr(),a=Ru(),[l,i]=y.useState(""),[s,u]=y.useState(""),[f,d]=y.useState(!1);y.useEffect(()=>{(async()=>{if(localStorage.getItem("apiKey")){d(!0);try{await Qt.getConfig(),a("/dashboard")}catch{localStorage.removeItem("apiKey")}finally{d(!1)}}})();const v=()=>{a("/login")};return window.addEventListener("unauthorized",v),()=>{window.removeEventListener("unauthorized",v)}},[a]);const p=async m=>{m.preventDefault();try{Qt.setApiKey(l),window.dispatchEvent(new StorageEvent("storage",{key:"apiKey",newValue:l,url:window.location.href})),await Qt.getConfig(),a("/dashboard")}catch(v){Qt.setApiKey(""),v.message&&v.message.includes("401")?u(n("login.invalidApiKey")):a("/dashboard")}};return f?g.jsx("div",{className:"flex min-h-screen items-center justify-center bg-gray-50",children:g.jsxs(Ca,{className:"w-full max-w-md",children:[g.jsx(Na,{className:"space-y-1",children:g.jsx(Ra,{className:"text-2xl",children:n("login.title")})}),g.jsxs(ja,{children:[g.jsx("div",{className:"flex justify-center py-8",children:g.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent"})}),g.jsx("p",{className:"text-center text-sm text-gray-500",children:n("login.validating")})]})]})}):g.jsx("div",{className:"flex min-h-screen items-center justify-center bg-gray-50",children:g.jsxs(Ca,{className:"w-full max-w-md",children:[g.jsxs(Na,{className:"space-y-1",children:[g.jsx(Ra,{className:"text-2xl",children:n("login.title")}),g.jsx(Lx,{children:n("login.description")})]}),g.jsxs("form",{onSubmit:p,children:[g.jsxs(ja,{className:"space-y-4",children:[g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ie,{htmlFor:"apiKey",children:n("login.apiKey")}),g.jsx(ht,{id:"apiKey",type:"password",value:l,onChange:m=>i(m.target.value),placeholder:n("login.apiKeyPlaceholder")})]}),s&&g.jsx("div",{className:"text-sm text-red-500",children:s})]}),g.jsx(kx,{children:g.jsx(Ae,{className:"w-full",type:"submit",children:n("login.signIn")})})]})]})})}const yT=({children:n})=>n,bT=({children:n})=>n,xT=H2([{path:"/",element:g.jsx(q2,{to:"/dashboard",replace:!0})},{path:"/login",element:g.jsx(bT,{children:g.jsx(vT,{})})},{path:"/dashboard",element:g.jsx(yT,{children:g.jsx(gT,{})})}],{initialEntries:["/dashboard"]});bE.createRoot(document.getElementById("root")).render(g.jsx(y.StrictMode,{children:g.jsx(jO,{children:g.jsx(__,{router:xT})})}));</script>
|
|
297
|
+
<style rel="stylesheet" crossorigin>/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-duration:initial;--tw-ease:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-orange-400:oklch(75% .183 55.934);--color-yellow-100:oklch(97.3% .071 103.193);--color-yellow-200:oklch(94.5% .129 101.54);--color-yellow-300:oklch(90.5% .182 98.111);--color-yellow-500:oklch(79.5% .184 86.047);--color-green-100:oklch(96.2% .044 156.743);--color-green-200:oklch(92.5% .084 155.995);--color-green-400:oklch(79.2% .209 151.711);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-cyan-300:oklch(86.5% .127 207.078);--color-cyan-500:oklch(71.5% .143 215.221);--color-blue-50:oklch(97% .014 254.604);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-800:oklch(42.4% .199 265.638);--color-purple-300:oklch(82.7% .119 306.383);--color-purple-400:oklch(71.4% .203 305.504);--color-purple-500:oklch(62.7% .265 303.9);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-md:28rem;--container-lg:32rem;--container-2xl:42rem;--container-4xl:56rem;--container-5xl:64rem;--container-6xl:72rem;--container-7xl:80rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--tracking-tight:-.025em;--tracking-widest:.1em;--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border);outline-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){*{outline-color:color-mix(in oklab,var(--ring)50%,transparent)}}body{background-color:var(--background);color:var(--foreground)}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background-color:#0000;border-radius:4px}::-webkit-scrollbar-thumb{background-color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){::-webkit-scrollbar-thumb{background-color:color-mix(in oklab,var(--muted-foreground)30%,transparent)}}::-webkit-scrollbar-thumb{border-radius:4px;transition:background-color .2s}::-webkit-scrollbar-thumb:hover{background-color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){::-webkit-scrollbar-thumb:hover{background-color:color-mix(in oklab,var(--muted-foreground)50%,transparent)}}::-webkit-scrollbar-corner{background-color:#0000}*{scrollbar-width:thin;scrollbar-color:oklch(55.6% 0 0) oklch(97% 0 0)}.dark *{scrollbar-color:oklch(70.8% 0 0) oklch(26.9% 0 0)}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:calc(var(--spacing)*0)}.-top-1{top:calc(var(--spacing)*-1)}.top-0{top:calc(var(--spacing)*0)}.top-1\/2{top:50%}.top-4{top:calc(var(--spacing)*4)}.top-\[50\%\]{top:50%}.-right-1{right:calc(var(--spacing)*-1)}.right-0{right:calc(var(--spacing)*0)}.right-2{right:calc(var(--spacing)*2)}.right-4{right:calc(var(--spacing)*4)}.bottom-0{bottom:calc(var(--spacing)*0)}.left-0{left:calc(var(--spacing)*0)}.left-2\.5{left:calc(var(--spacing)*2.5)}.left-\[50\%\]{left:50%}.z-50{z-index:50}.col-span-1{grid-column:span 1/span 1}.col-span-3{grid-column:span 3/span 3}.col-span-5{grid-column:span 5/span 5}.-mx-1{margin-inline:calc(var(--spacing)*-1)}.mt-0\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-auto{margin-top:auto}.mr-2{margin-right:calc(var(--spacing)*2)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-2{margin-left:calc(var(--spacing)*2)}.ml-3{margin-left:calc(var(--spacing)*3)}.ml-4{margin-left:calc(var(--spacing)*4)}.ml-auto{margin-left:auto}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-flex{display:inline-flex}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.h-3{height:calc(var(--spacing)*3)}.h-3\/5{height:60%}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-11{height:calc(var(--spacing)*11)}.h-16{height:calc(var(--spacing)*16)}.h-\[90vh\]{height:90vh}.h-\[calc\(100vh-4rem\)\]{height:calc(100vh - 4rem)}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-8{max-height:calc(var(--spacing)*8)}.max-h-72{max-height:calc(var(--spacing)*72)}.max-h-96{max-height:calc(var(--spacing)*96)}.max-h-\[80vh\]{max-height:80vh}.max-h-\[300px\]{max-height:300px}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-\[200px\]{min-height:200px}.min-h-screen{min-height:100vh}.w-2\/5{width:40%}.w-3{width:calc(var(--spacing)*3)}.w-3\/5{width:60%}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-8{width:calc(var(--spacing)*8)}.w-10{width:calc(var(--spacing)*10)}.w-11{width:calc(var(--spacing)*11)}.w-32{width:calc(var(--spacing)*32)}.w-48{width:calc(var(--spacing)*48)}.w-72{width:calc(var(--spacing)*72)}.w-\[--radix-popover-trigger-width\]{width:--radix-popover-trigger-width}.w-full{width:100%}.max-w-2xl{max-width:var(--container-2xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.min-w-0{min-width:calc(var(--spacing)*0)}.flex-1{flex:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.origin-\(--radix-popover-content-transform-origin\){transform-origin:var(--radix-popover-content-transform-origin)}.translate-x-\[-50\%\]{--tw-translate-x:-50%;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-0{--tw-translate-y:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-\[-50\%\]{--tw-translate-y:-50%;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-full{--tw-translate-y:100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-move{cursor:move}.cursor-pointer{cursor:pointer}.scroll-py-1{scroll-padding-block:calc(var(--spacing)*1)}.list-disc{list-style-type:disc}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-0{gap:calc(var(--spacing)*0)}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-6{gap:calc(var(--spacing)*6)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-none{border-radius:0}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-4{border-style:var(--tw-border-style);border-width:4px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-blue-200{border-color:var(--color-blue-200)}.border-border{border-color:var(--border)}.border-current{border-color:currentColor}.border-destructive\/50{border-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.border-destructive\/50{border-color:color-mix(in oklab,var(--destructive)50%,transparent)}}.border-gray-200{border-color:var(--color-gray-200)}.border-green-200{border-color:var(--color-green-200)}.border-input{border-color:var(--input)}.border-primary{border-color:var(--primary)}.border-red-200{border-color:var(--color-red-200)}.border-red-500{border-color:var(--color-red-500)}.border-transparent{border-color:#0000}.border-white{border-color:var(--color-white)}.border-yellow-200{border-color:var(--color-yellow-200)}.border-t-transparent{border-top-color:#0000}.bg-background{background-color:var(--background)}.bg-black{background-color:var(--color-black)}.bg-black\/0{background-color:#0000}@supports (color:color-mix(in lab,red,red)){.bg-black\/0{background-color:color-mix(in oklab,var(--color-black)0%,transparent)}}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\/50{background-color:color-mix(in oklab,var(--color-black)50%,transparent)}}.bg-black\/80{background-color:#000c}@supports (color:color-mix(in lab,red,red)){.bg-black\/80{background-color:color-mix(in oklab,var(--color-black)80%,transparent)}}.bg-black\/90{background-color:#000000e6}@supports (color:color-mix(in lab,red,red)){.bg-black\/90{background-color:color-mix(in oklab,var(--color-black)90%,transparent)}}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-300{background-color:var(--color-blue-300)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-border{background-color:var(--border)}.bg-card{background-color:var(--card)}.bg-cyan-300{background-color:var(--color-cyan-300)}.bg-cyan-500{background-color:var(--color-cyan-500)}.bg-destructive{background-color:var(--destructive)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-800{background-color:var(--color-gray-800)}.bg-green-100{background-color:var(--color-green-100)}.bg-green-400{background-color:var(--color-green-400)}.bg-green-600{background-color:var(--color-green-600)}.bg-orange-400{background-color:var(--color-orange-400)}.bg-popover{background-color:var(--popover)}.bg-primary{background-color:var(--primary)}.bg-purple-300{background-color:var(--color-purple-300)}.bg-purple-400{background-color:var(--color-purple-400)}.bg-purple-500{background-color:var(--color-purple-500)}.bg-red-50{background-color:var(--color-red-50)}.bg-red-100{background-color:var(--color-red-100)}.bg-red-400{background-color:var(--color-red-400)}.bg-red-500{background-color:var(--color-red-500)}.bg-red-600{background-color:var(--color-red-600)}.bg-secondary,.bg-secondary\/50{background-color:var(--secondary)}@supports (color:color-mix(in lab,red,red)){.bg-secondary\/50{background-color:color-mix(in oklab,var(--secondary)50%,transparent)}}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\/20{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.bg-white\/20{background-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.bg-yellow-100{background-color:var(--color-yellow-100)}.bg-yellow-300{background-color:var(--color-yellow-300)}.bg-yellow-500{background-color:var(--color-yellow-500)}.p-0{padding:calc(var(--spacing)*0)}.p-1{padding:calc(var(--spacing)*1)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-6{padding:calc(var(--spacing)*6)}.p-8{padding:calc(var(--spacing)*8)}.px-1\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.px-8{padding-inline:calc(var(--spacing)*8)}.py-0\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.py-5{padding-block:calc(var(--spacing)*5)}.py-6{padding-block:calc(var(--spacing)*6)}.py-8{padding-block:calc(var(--spacing)*8)}.pt-0{padding-top:calc(var(--spacing)*0)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-4{padding-top:calc(var(--spacing)*4)}.pr-2{padding-right:calc(var(--spacing)*2)}.pr-10{padding-right:calc(var(--spacing)*10)}.pb-0{padding-bottom:calc(var(--spacing)*0)}.pb-4{padding-bottom:calc(var(--spacing)*4)}.pl-4{padding-left:calc(var(--spacing)*4)}.pl-5{padding-left:calc(var(--spacing)*5)}.pl-8{padding-left:calc(var(--spacing)*8)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-none{--tw-leading:1;line-height:1}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-black{color:var(--color-black)}.text-blue-300{color:var(--color-blue-300)}.text-blue-400{color:var(--color-blue-400)}.text-blue-500{color:var(--color-blue-500)}.text-blue-700{color:var(--color-blue-700)}.text-blue-800{color:var(--color-blue-800)}.text-card-foreground{color:var(--card-foreground)}.text-current{color:currentColor}.text-cyan-300{color:var(--color-cyan-300)}.text-cyan-500{color:var(--color-cyan-500)}.text-destructive{color:var(--destructive)}.text-destructive-foreground{color:var(--destructive-foreground)}.text-foreground{color:var(--foreground)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-green-400{color:var(--color-green-400)}.text-green-500{color:var(--color-green-500)}.text-green-600{color:var(--color-green-600)}.text-muted-foreground{color:var(--muted-foreground)}.text-popover-foreground{color:var(--popover-foreground)}.text-primary{color:var(--primary)}.text-primary-foreground{color:var(--primary-foreground)}.text-purple-300{color:var(--color-purple-300)}.text-purple-500{color:var(--color-purple-500)}.text-red-400{color:var(--color-red-400)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-red-800{color:var(--color-red-800)}.text-secondary-foreground{color:var(--secondary-foreground)}.text-white{color:var(--color-white)}.text-yellow-300{color:var(--color-yellow-300)}.text-yellow-500{color:var(--color-yellow-500)}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.opacity-100{opacity:1}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-0{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-offset-background{--tw-ring-offset-color:var(--background)}.outline-hidden{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.outline-hidden{outline-offset:2px;outline:2px solid #0000}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.select-none{-webkit-user-select:none;user-select:none}.group-data-\[state\=open\]\:rotate-180:is(:where(.group)[data-state=open] *){rotate:180deg}.peer-disabled\:cursor-not-allowed:is(:where(.peer):disabled~*){cursor:not-allowed}.peer-disabled\:opacity-70:is(:where(.peer):disabled~*){opacity:.7}.file\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\:bg-transparent::file-selector-button{background-color:#0000}.file\:text-sm::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.file\:text-foreground::file-selector-button{color:var(--foreground)}.placeholder\:text-muted-foreground::placeholder{color:var(--muted-foreground)}@media (hover:hover){.hover\:scale-105:hover{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x)var(--tw-scale-y)}.hover\:scale-110:hover{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x)var(--tw-scale-y)}.hover\:scale-\[1\.01\]:hover{scale:1.01}.hover\:scale-\[1\.02\]:hover{scale:1.02}.hover\:bg-accent:hover{background-color:var(--accent)}.hover\:bg-destructive:hover,.hover\:bg-destructive\/80:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-destructive\/80:hover{background-color:color-mix(in oklab,var(--destructive)80%,transparent)}}.hover\:bg-gray-200:hover{background-color:var(--color-gray-200)}.hover\:bg-primary\/80:hover{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/80:hover{background-color:color-mix(in oklab,var(--primary)80%,transparent)}}.hover\:bg-primary\/90:hover{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab,var(--primary)90%,transparent)}}.hover\:bg-secondary:hover,.hover\:bg-secondary\/80:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-secondary\/80:hover{background-color:color-mix(in oklab,var(--secondary)80%,transparent)}}.hover\:bg-transparent:hover{background-color:#0000}.hover\:bg-white\/10:hover{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/10:hover{background-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.hover\:text-accent-foreground:hover{color:var(--accent-foreground)}.hover\:text-destructive-foreground:hover{color:var(--destructive-foreground)}.hover\:text-gray-700:hover{color:var(--color-gray-700)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\:scale-\[1\.01\]:focus{scale:1.01}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-ring:focus{--tw-ring-color:var(--ring)}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color:var(--ring)}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus-visible\:ring-offset-background:focus-visible{--tw-ring-offset-color:var(--background)}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.active\:scale-\[0\.98\]:active{scale:.98}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.data-\[disabled\=true\]\:pointer-events-none[data-disabled=true]{pointer-events:none}.data-\[disabled\=true\]\:opacity-50[data-disabled=true]{opacity:.5}.data-\[selected\=true\]\:bg-accent[data-selected=true]{background-color:var(--accent)}.data-\[selected\=true\]\:text-accent-foreground[data-selected=true]{color:var(--accent-foreground)}:is(.\*\*\:data-\[slot\=command-input-wrapper\]\:h-12 *)[data-slot=command-input-wrapper]{height:calc(var(--spacing)*12)}.data-\[state\=checked\]\:translate-x-5[data-state=checked]{--tw-translate-x:calc(var(--spacing)*5);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:var(--primary)}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:var(--accent)}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:var(--muted-foreground)}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked]{--tw-translate-x:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:var(--input)}@media (min-width:40rem){.sm\:col-span-2{grid-column:span 2/span 2}.sm\:max-w-2xl{max-width:var(--container-2xl)}.sm\:max-w-5xl{max-width:var(--container-5xl)}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}:where(.sm\:space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:text-left{text-align:left}}@media (min-width:48rem){.md\:max-w-6xl{max-width:var(--container-6xl)}.md\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}@media (min-width:64rem){.lg\:max-w-7xl{max-width:var(--container-7xl)}}.\[\&_\[cmdk-group-heading\]\]\:px-2 [cmdk-group-heading]{padding-inline:calc(var(--spacing)*2)}.\[\&_\[cmdk-group-heading\]\]\:py-1\.5 [cmdk-group-heading]{padding-block:calc(var(--spacing)*1.5)}.\[\&_\[cmdk-group-heading\]\]\:text-xs [cmdk-group-heading]{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\[cmdk-group-heading\]\]\:font-medium [cmdk-group-heading]{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\[cmdk-group-heading\]\]\:text-muted-foreground [cmdk-group-heading]{color:var(--muted-foreground)}.\[\&_\[cmdk-group\]\]\:px-2 [cmdk-group]{padding-inline:calc(var(--spacing)*2)}.\[\&_\[cmdk-group\]\:not\(\[hidden\]\)_\~\[cmdk-group\]\]\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:calc(var(--spacing)*0)}.\[\&_\[cmdk-input-wrapper\]_svg\]\:h-5 [cmdk-input-wrapper] svg{height:calc(var(--spacing)*5)}.\[\&_\[cmdk-input-wrapper\]_svg\]\:w-5 [cmdk-input-wrapper] svg{width:calc(var(--spacing)*5)}.\[\&_\[cmdk-input\]\]\:h-12 [cmdk-input]{height:calc(var(--spacing)*12)}.\[\&_\[cmdk-item\]\]\:px-2 [cmdk-item]{padding-inline:calc(var(--spacing)*2)}.\[\&_\[cmdk-item\]\]\:py-3 [cmdk-item]{padding-block:calc(var(--spacing)*3)}.\[\&_\[cmdk-item\]_svg\]\:h-5 [cmdk-item] svg{height:calc(var(--spacing)*5)}.\[\&_\[cmdk-item\]_svg\]\:w-5 [cmdk-item] svg{width:calc(var(--spacing)*5)}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-4 svg{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-4 svg:not([class*=size-]){width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.\[\&_svg\:not\(\[class\*\=\'text-\'\]\)\]\:text-muted-foreground svg:not([class*=text-]){color:var(--muted-foreground)}}:root{--radius:.625rem;--background:oklch(100% 0 0);--foreground:oklch(14.5% 0 0);--card:oklch(100% 0 0);--card-foreground:oklch(14.5% 0 0);--popover:oklch(100% 0 0);--popover-foreground:oklch(14.5% 0 0);--primary:oklch(20.5% 0 0);--primary-foreground:oklch(98.5% 0 0);--secondary:oklch(97% 0 0);--secondary-foreground:oklch(20.5% 0 0);--muted:oklch(97% 0 0);--muted-foreground:oklch(55.6% 0 0);--accent:oklch(97% 0 0);--accent-foreground:oklch(20.5% 0 0);--destructive:oklch(57.7% .245 27.325);--destructive-foreground:oklch(98.5% 0 0);--border:oklch(92.2% 0 0);--input:oklch(92.2% 0 0);--ring:oklch(70.8% 0 0);--chart-1:oklch(64.6% .222 41.116);--chart-2:oklch(60% .118 184.704);--chart-3:oklch(39.8% .07 227.392);--chart-4:oklch(82.8% .189 84.429);--chart-5:oklch(76.9% .188 70.08);--sidebar:oklch(98.5% 0 0);--sidebar-foreground:oklch(14.5% 0 0);--sidebar-primary:oklch(20.5% 0 0);--sidebar-primary-foreground:oklch(98.5% 0 0);--sidebar-accent:oklch(97% 0 0);--sidebar-accent-foreground:oklch(20.5% 0 0);--sidebar-border:oklch(92.2% 0 0);--sidebar-ring:oklch(70.8% 0 0)}.dark{--background:oklch(14.5% 0 0);--foreground:oklch(98.5% 0 0);--card:oklch(20.5% 0 0);--card-foreground:oklch(98.5% 0 0);--popover:oklch(20.5% 0 0);--popover-foreground:oklch(98.5% 0 0);--primary:oklch(92.2% 0 0);--primary-foreground:oklch(20.5% 0 0);--secondary:oklch(26.9% 0 0);--secondary-foreground:oklch(98.5% 0 0);--muted:oklch(26.9% 0 0);--muted-foreground:oklch(70.8% 0 0);--accent:oklch(26.9% 0 0);--accent-foreground:oklch(98.5% 0 0);--destructive:oklch(70.4% .191 22.216);--destructive-foreground:oklch(98.5% 0 0);--border:oklch(100% 0 0/.1);--input:oklch(100% 0 0/.15);--ring:oklch(55.6% 0 0);--chart-1:oklch(48.8% .243 264.376);--chart-2:oklch(69.6% .17 162.48);--chart-3:oklch(76.9% .188 70.08);--chart-4:oklch(62.7% .265 303.9);--chart-5:oklch(64.5% .246 16.439);--sidebar:oklch(20.5% 0 0);--sidebar-foreground:oklch(98.5% 0 0);--sidebar-primary:oklch(48.8% .243 264.376);--sidebar-primary-foreground:oklch(98.5% 0 0);--sidebar-accent:oklch(26.9% 0 0);--sidebar-accent-foreground:oklch(98.5% 0 0);--sidebar-border:oklch(100% 0 0/.1);--sidebar-ring:oklch(55.6% 0 0)}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@keyframes spin{to{transform:rotate(360deg)}}@keyframes fadeIn{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes scaleIn{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes slideIn{0%{opacity:0;transform:translate(20px)}to{opacity:1;transform:translate(0)}}.animate-fade-in{animation:fadeIn .2s ease-out forwards}.animate-scale-in{animation:scaleIn .2s cubic-bezier(.34,1.56,.64,1) forwards}.animate-slide-in{animation:slideIn .3s cubic-bezier(.34,1.56,.64,1) forwards}.transition-all-ease{transition:all .2s cubic-bezier(.34,1.56,.64,1)}</style>
|
|
297
298
|
</head>
|
|
298
299
|
<body>
|
|
299
300
|
<div id="root"></div>
|