@musistudio/claude-code-router 1.0.37 → 1.0.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/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 NS(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 _y(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Vf={exports:{}},Wi={};/**
7
+ <script type="module" crossorigin>function Zw(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 Zy(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Wf={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 Zg;function TS(){if(Zg)return Wi;Zg=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 h in s)h!=="key"&&(u[h]=s[h])}else u=s;return s=u.ref,{$$typeof:n,type:i,key:f,ref:s!==void 0?s:null,props:u}}return Wi.Fragment=a,Wi.jsx=l,Wi.jsxs=l,Wi}var Jg;function jS(){return Jg||(Jg=1,Vf.exports=TS()),Vf.exports}var y=jS();const Pe=n=>typeof n=="string",eo=()=>{let n,a;const l=new Promise((i,s)=>{n=i,a=s});return l.resolve=n,l.reject=a,l},Ig=n=>n==null?"":""+n,_S=(n,a,l)=>{n.forEach(i=>{a[i]&&(l[i]=a[i])})},MS=/###/g,Wg=n=>n&&n.indexOf("###")>-1?n.replace(MS,"."):n,ev=n=>!n||Pe(n),uo=(n,a,l)=>{const i=Pe(a)?a.split("."):a;let s=0;for(;s<i.length-1;){if(ev(n))return{};const u=Wg(i[s]);!n[u]&&l&&(n[u]=new l),Object.prototype.hasOwnProperty.call(n,u)?n=n[u]:n={},++s}return ev(n)?{}:{obj:n,k:Wg(i[s])}},tv=(n,a,l)=>{const{obj:i,k:s}=uo(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),h=uo(n,f,Object);for(;h.obj===void 0&&f.length;)u=`${f[f.length-1]}.${u}`,f=f.slice(0,f.length-1),h=uo(n,f,Object),h?.obj&&typeof h.obj[`${h.k}.${u}`]<"u"&&(h.obj=void 0);h.obj[`${h.k}.${u}`]=l},DS=(n,a,l,i)=>{const{obj:s,k:u}=uo(n,a,Object);s[u]=s[u]||[],s[u].push(l)},iu=(n,a)=>{const{obj:l,k:i}=uo(n,a);if(l&&Object.prototype.hasOwnProperty.call(l,i))return l[i]},LS=(n,a,l)=>{const i=iu(n,l);return i!==void 0?i:iu(a,l)},My=(n,a,l)=>{for(const i in a)i!=="__proto__"&&i!=="constructor"&&(i in n?Pe(n[i])||n[i]instanceof String||Pe(a[i])||a[i]instanceof String?l&&(n[i]=a[i]):My(n[i],a[i],l):n[i]=a[i]);return n},jl=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var zS={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const kS=n=>Pe(n)?n.replace(/[&<>"'\/]/g,a=>zS[a]):n;class US{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 PS=[" ",",","?","!",";"],HS=new US(20),BS=(n,a,l)=>{a=a||"",l=l||"";const i=PS.filter(f=>a.indexOf(f)<0&&l.indexOf(f)<0);if(i.length===0)return!0;const s=HS.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},vd=(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,h="";for(let p=u;p<i.length;++p)if(p!==u&&(h+=l),h+=i[p],f=s[h],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},fo=n=>n?.replace("_","-"),$S={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 ou{constructor(a,l={}){this.init(a,l)}init(a,l={}){this.prefix=l.prefix||"i18next:",this.logger=a||$S,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:(Pe(a[0])&&(a[0]=`${i}${this.prefix} ${a[0]}`),this.logger[l](a))}create(a){return new ou(this.logger,{prefix:`${this.prefix}:${a}:`,...this.options})}clone(a){return a=a||this.options,a.prefix=a.prefix||this.prefix,new ou(this.logger,a)}}var qn=new ou;class yu{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 nv extends yu{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 h;a.indexOf(".")>-1?h=a.split("."):(h=[a,l],i&&(Array.isArray(i)?h.push(...i):Pe(i)&&u?h.push(...i.split(u)):h.push(i)));const p=iu(this.data,h);return!p&&!l&&!i&&a.indexOf(".")>-1&&(a=h[0],l=h[1],i=h.slice(2).join(".")),p||!f||!Pe(i)?p:vd(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 h=[a,l];i&&(h=h.concat(f?i.split(f):i)),a.indexOf(".")>-1&&(h=a.split("."),s=l,l=h[1]),this.addNamespaces(l),tv(this.data,h,s),u.silent||this.emit("added",a,l,i,s)}addResources(a,l,i,s={silent:!1}){for(const u in i)(Pe(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 h=[a,l];a.indexOf(".")>-1&&(h=a.split("."),s=i,i=l,l=h[1]),this.addNamespaces(l);let p=iu(this.data,h)||{};f.skipCopy||(i=JSON.parse(JSON.stringify(i))),s?My(p,i,u):p={...p,...i},tv(this.data,h,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 Dy={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 av={},rv=n=>!Pe(n)&&typeof n!="boolean"&&typeof n!="number";class su extends yu{constructor(a,l={}){super(),_S(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],a,this),this.options=l,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=qn.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,h=!this.options.userDefinedKeySeparator&&!l.keySeparator&&!this.options.userDefinedNsSeparator&&!l.nsSeparator&&!BS(a,i,s);if(f&&!h){const p=a.match(this.interpolator.nestingRegexp);if(p&&p.length>0)return{key:a,namespaces:Pe(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:Pe(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:h,namespaces:p}=this.extractFromKey(a[a.length-1],s),m=p[p.length-1];let g=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;g===void 0&&(g=":");const x=s.lng||this.language,S=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(x?.toLowerCase()==="cimode")return S?u?{res:`${m}${g}${h}`,usedKey:h,exactUsedKey:h,usedLng:x,usedNS:m,usedParams:this.getUsedParamsDetails(s)}:`${m}${g}${h}`:u?{res:h,usedKey:h,exactUsedKey:h,usedLng:x,usedNS:m,usedParams:this.getUsedParamsDetails(s)}:h;const w=this.resolve(a,s);let C=w?.res;const R=w?.usedKey||h,j=w?.exactUsedKey||h,O=["[object Number]","[object Function]","[object RegExp]"],U=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,z=!this.i18nFormat||this.i18nFormat.handleAsObject,H=s.count!==void 0&&!Pe(s.count),k=su.hasDefaultValue(s),A=H?this.pluralResolver.getSuffix(x,s.count,s):"",Y=s.ordinal&&H?this.pluralResolver.getSuffix(x,s.count,{ordinal:!1}):"",J=H&&!s.ordinal&&s.count===0,ae=J&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${A}`]||s[`defaultValue${Y}`]||s.defaultValue;let ie=C;z&&!C&&k&&(ie=ae);const Re=rv(ie),me=Object.prototype.toString.apply(ie);if(z&&ie&&Re&&O.indexOf(me)<0&&!(Pe(U)&&Array.isArray(ie))){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(R,ie,{...s,ns:p}):`key '${h} (${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(ie),fe=oe?[]:{},de=oe?j:R;for(const M in ie)if(Object.prototype.hasOwnProperty.call(ie,M)){const Z=`${de}${f}${M}`;k&&!C?fe[M]=this.translate(Z,{...s,defaultValue:rv(ae)?ae[M]:void 0,joinArrays:!1,ns:p}):fe[M]=this.translate(Z,{...s,joinArrays:!1,ns:p}),fe[M]===Z&&(fe[M]=ie[M])}C=fe}}else if(z&&Pe(U)&&Array.isArray(C))C=C.join(U),C&&(C=this.extendTranslation(C,a,s,i));else{let oe=!1,fe=!1;!this.isValidLookup(C)&&k&&(oe=!0,C=ae),this.isValidLookup(C)||(fe=!0,C=h);const M=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&fe?void 0:C,Z=k&&ae!==C&&this.options.updateMissing;if(fe||oe||Z){if(this.logger.log(Z?"updateKey":"missingKey",x,m,h,Z?ae:C),f){const K=this.resolve(h,{...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 $=[];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++)$.push(ge[K]);else this.options.saveMissingTo==="all"?$=this.languageUtils.toResolveHierarchy(s.lng||this.language):$.push(s.lng||this.language);const N=(K,L,G)=>{const W=k&&G!==C?G:M;this.options.missingKeyHandler?this.options.missingKeyHandler(K,m,L,W,Z,s):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(K,m,L,W,Z,s),this.emit("missingKey",K,m,L,C)};this.options.saveMissing&&(this.options.saveMissingPlurals&&H?$.forEach(K=>{const L=this.pluralResolver.getSuffixes(K,s);J&&s[`defaultValue${this.options.pluralSeparator}zero`]&&L.indexOf(`${this.options.pluralSeparator}zero`)<0&&L.push(`${this.options.pluralSeparator}zero`),L.forEach(G=>{N([K],h+G,s[`defaultValue${G}`]||ae)})}):N($,h,ae))}C=this.extendTranslation(C,a,s,w,i),fe&&C===h&&this.options.appendNamespaceToMissingKey&&(C=`${m}${g}${h}`),(fe||oe)&&this.options.parseMissingKeyHandler&&(C=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${m}${g}${h}`:h,oe?C:void 0,s))}return u?(w.res=C,w.usedParams=this.getUsedParamsDetails(s),w):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=Pe(a)&&(i?.interpolation?.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let m;if(p){const x=a.match(this.interpolator.nestingRegexp);m=x&&x.length}let g=i.replace&&!Pe(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables&&(g={...this.options.interpolation.defaultVariables,...g}),a=this.interpolator.interpolate(a,g,i.lng||this.language||s.usedLng,i),p){const x=a.match(this.interpolator.nestingRegexp),S=x&&x.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,(...x)=>u?.[0]===x[0]&&!i.context?(this.logger.warn(`It seems you are nesting recursively key: ${x[0]} in key: ${l[0]}`),null):this.translate(...x,l),i)),i.interpolation&&this.interpolator.reset()}const f=i.postProcess||this.options.postProcess,h=Pe(f)?[f]:f;return a!=null&&h?.length&&i.applyPostProcessor!==!1&&(a=Dy.handle(h,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,h;return Pe(a)&&(a=[a]),a.forEach(p=>{if(this.isValidLookup(i))return;const m=this.extractFromKey(p,l),g=m.key;s=g;let x=m.namespaces;this.options.fallbackNS&&(x=x.concat(this.options.fallbackNS));const S=l.count!==void 0&&!Pe(l.count),w=S&&!l.ordinal&&l.count===0,C=l.context!==void 0&&(Pe(l.context)||typeof l.context=="number")&&l.context!=="",R=l.lngs?l.lngs:this.languageUtils.toResolveHierarchy(l.lng||this.language,l.fallbackLng);x.forEach(j=>{this.isValidLookup(i)||(h=j,!av[`${R[0]}-${j}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(h)&&(av[`${R[0]}-${j}`]=!0,this.logger.warn(`key "${s}" for languages "${R.join(", ")}" won't get resolved as namespace "${h}" 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!!!")),R.forEach(O=>{if(this.isValidLookup(i))return;f=O;const U=[g];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(U,g,O,j,l);else{let H;S&&(H=this.pluralResolver.getSuffix(O,l.count,l));const k=`${this.options.pluralSeparator}zero`,A=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(S&&(U.push(g+H),l.ordinal&&H.indexOf(A)===0&&U.push(g+H.replace(A,this.options.pluralSeparator)),w&&U.push(g+k)),C){const Y=`${g}${this.options.contextSeparator}${l.context}`;U.push(Y),S&&(U.push(Y+H),l.ordinal&&H.indexOf(A)===0&&U.push(Y+H.replace(A,this.options.pluralSeparator)),w&&U.push(Y+k))}}let z;for(;z=U.pop();)this.isValidLookup(i)||(u=z,i=this.getResource(O,j,z,l))}))})}),{res:i,usedKey:s,exactUsedKey:u,usedLng:f,usedNS:h}}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&&!Pe(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 lv{constructor(a){this.options=a,this.supportedLngs=this.options.supportedLngs||!1,this.logger=qn.create("languageUtils")}getScriptPartFromCode(a){if(a=fo(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=fo(a),!a||a.indexOf("-")<0)return a;const l=a.split("-");return this.formatLanguageCode(l[0])}formatLanguageCode(a){if(Pe(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)),Pe(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 Pe(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))):Pe(a)&&u(this.formatLanguageCode(a)),i.forEach(f=>{s.indexOf(f)<0&&u(this.formatLanguageCode(f))}),s}}const iv={zero:0,one:1,two:2,few:3,many:4,other:5},ov={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class VS{constructor(a,l={}){this.languageUtils=a,this.options=l,this.logger=qn.create("pluralResolver"),this.pluralRulesCache={}}addRule(a,l){this.rules[a]=l}clearCache(){this.pluralRulesCache={}}getRule(a,l={}){const i=fo(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!"),ov;if(!a.match(/-|_/))return ov;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)=>iv[s]-iv[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=LS(n,a,l);return!u&&s&&Pe(l)&&(u=vd(n,l,i),u===void 0&&(u=vd(a,l,i))),u},qf=n=>n.replace(/\$/g,"$$$$");class qS{constructor(a={}){this.logger=qn.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:h,suffixEscaped:p,formatSeparator:m,unescapeSuffix:g,unescapePrefix:x,nestingPrefix:S,nestingPrefixEscaped:w,nestingSuffix:C,nestingSuffixEscaped:R,nestingOptionsSeparator:j,maxReplaces:O,alwaysFormat:U}=a.interpolation;this.escape=l!==void 0?l:kS,this.escapeValue=i!==void 0?i:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=u?jl(u):f||"{{",this.suffix=h?jl(h):p||"}}",this.formatSeparator=m||",",this.unescapePrefix=g?"":x||"-",this.unescapeSuffix=this.unescapePrefix?"":g||"",this.nestingPrefix=S?jl(S):w||jl("$t("),this.nestingSuffix=C?jl(C):R||jl(")"),this.nestingOptionsSeparator=j||",",this.maxReplaces=O||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,h;const p=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},m=w=>{if(w.indexOf(this.formatSeparator)<0){const O=sv(l,p,w,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(O,void 0,i,{...s,...l,interpolationkey:w}):O}const C=w.split(this.formatSeparator),R=C.shift().trim(),j=C.join(this.formatSeparator).trim();return this.format(sv(l,p,R,this.options.keySeparator,this.options.ignoreJSONStructure),j,i,{...s,...l,interpolationkey:R})};this.resetRegExp();const g=s?.missingInterpolationHandler||this.options.missingInterpolationHandler,x=s?.interpolation?.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:w=>qf(w)},{regex:this.regexp,safeValue:w=>this.escapeValue?qf(this.escape(w)):qf(w)}].forEach(w=>{for(h=0;u=w.regex.exec(a);){const C=u[1].trim();if(f=m(C),f===void 0)if(typeof g=="function"){const j=g(a,u,s);f=Pe(j)?j:""}else if(s&&Object.prototype.hasOwnProperty.call(s,C))f="";else if(x){f=u[0];continue}else this.logger.warn(`missed to pass in variable ${C} for interpolating ${a}`),f="";else!Pe(f)&&!this.useRawValueToEscape&&(f=Ig(f));const R=w.safeValue(f);if(a=a.replace(u[0],R),x?(w.regex.lastIndex+=f.length,w.regex.lastIndex-=u[0].length):w.regex.lastIndex=0,h++,h>=this.maxReplaces)break}}),a}nest(a,l,i={}){let s,u,f;const h=(p,m)=>{const g=this.nestingOptionsSeparator;if(p.indexOf(g)<0)return p;const x=p.split(new RegExp(`${g}[ ]*{`));let S=`{${x[1]}`;p=x[0],S=this.interpolate(S,f);const w=S.match(/'/g),C=S.match(/"/g);((w?.length??0)%2===0&&!C||C.length%2!==0)&&(S=S.replace(/'/g,'"'));try{f=JSON.parse(S),m&&(f={...m,...f})}catch(R){return this.logger.warn(`failed parsing options string in nesting for key ${p}`,R),`${p}${g}${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&&!Pe(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(g=>g.trim()).filter(Boolean),s[1]=s[1].slice(0,m)),u=l(h.call(this,s[1].trim(),f),f),u&&s[0]===a&&!Pe(u))return u;Pe(u)||(u=Ig(u)),u||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${a}`),u=""),p.length&&(u=p.reduce((g,x)=>this.format(g,x,i.lng,{...i,interpolationkey:s[1].trim()}),u.trim())),a=a.replace(s[0],u),this.regexp.lastIndex=0}return a}}const YS=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[h,...p]=f.split(":"),m=p.join(":").trim().replace(/^'+|'+$/g,""),g=h.trim();l[g]||(l[g]=m),m==="false"&&(l[g]=!1),m==="true"&&(l[g]=!0),isNaN(m)||(l[g]=parseInt(m,10))}})}return{formatName:a,formatOptions:l}},uv=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 h=a[f];return h||(h=n(fo(i),s),a[f]=h),h(l)}},KS=n=>(a,l,i)=>n(fo(l),i)(a);class GS{constructor(a={}){this.logger=qn.create("formatter"),this.options=a,this.init(a)}init(a,l={interpolation:{}}){this.formatSeparator=l.interpolation.formatSeparator||",";const i=l.cacheInBuiltFormats?uv:KS;this.formats={number:i((s,u)=>{const f=new Intl.NumberFormat(s,{...u});return h=>f.format(h)}),currency:i((s,u)=>{const f=new Intl.NumberFormat(s,{...u,style:"currency"});return h=>f.format(h)}),datetime:i((s,u)=>{const f=new Intl.DateTimeFormat(s,{...u});return h=>f.format(h)}),relativetime:i((s,u)=>{const f=new Intl.RelativeTimeFormat(s,{...u});return h=>f.format(h,u.range||"day")}),list:i((s,u)=>{const f=new Intl.ListFormat(s,{...u});return h=>f.format(h)})}}add(a,l){this.formats[a.toLowerCase().trim()]=l}addCached(a,l){this.formats[a.toLowerCase().trim()]=uv(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(h=>h.indexOf(")")>-1)){const h=u.findIndex(p=>p.indexOf(")")>-1);u[0]=[u[0],...u.splice(1,h)].join(this.formatSeparator)}return u.reduce((h,p)=>{const{formatName:m,formatOptions:g}=YS(p);if(this.formats[m]){let x=h;try{const S=s?.formatParams?.[s.interpolationkey]||{},w=S.locale||S.lng||s.locale||s.lng||i;x=this.formats[m](h,w,{...g,...s,...S})}catch(S){this.logger.warn(S)}return x}else this.logger.warn(`there was no format function for ${m}`);return h},a)}}const FS=(n,a)=>{n.pending[a]!==void 0&&(delete n.pending[a],n.pendingCount--)};class XS extends yu{constructor(a,l,i,s={}){super(),this.backend=a,this.store=l,this.services=i,this.languageUtils=i.languageUtils,this.options=s,this.logger=qn.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={},h={},p={};return a.forEach(m=>{let g=!0;l.forEach(x=>{const S=`${m}|${x}`;!i.reload&&this.store.hasResourceBundle(m,x)?this.state[S]=2:this.state[S]<0||(this.state[S]===1?f[S]===void 0&&(f[S]=!0):(this.state[S]=1,g=!1,f[S]===void 0&&(f[S]=!0),u[S]===void 0&&(u[S]=!0),p[x]===void 0&&(p[x]=!0)))}),g||(h[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(h),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 h={};this.queue.forEach(p=>{DS(p.loaded,[u],f),FS(p,a),l&&p.errors.push(l),p.pendingCount===0&&!p.done&&(Object.keys(p.loaded).forEach(m=>{h[m]||(h[m]={});const g=p.loaded[m];g.length&&g.forEach(x=>{h[m][x]===void 0&&(h[m][x]=!0)})}),p.done=!0,p.errors.length?p.callback(p.errors):p.callback())}),this.emit("loaded",h),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 h=(m,g)=>{if(this.readingCalls--,this.waitingReads.length>0){const x=this.waitingReads.shift();this.read(x.lng,x.ns,x.fcName,x.tried,x.wait,x.callback)}if(m&&g&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,a,l,i,s+1,u*2,f)},u);return}f(m,g)},p=this.backend[i].bind(this.backend);if(p.length===2){try{const m=p(a,l);m&&typeof m.then=="function"?m.then(g=>h(null,g)).catch(h):h(null,m)}catch(m){h(m)}return}return p(a,l,h)}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();Pe(a)&&(a=this.languageUtils.toResolveHierarchy(a)),Pe(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,h)=>{f&&this.logger.warn(`${l}loading namespace ${u} for language ${s} failed`,f),!f&&h&&this.logger.log(`${l}loaded namespace ${u} for language ${s}`,h),this.loaded(a,f,h)})}saveMissing(a,l,i,s,u,f={},h=()=>{}){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 g;m.length===5?g=m(a,l,i,s,p):g=m(a,l,i,s),g&&typeof g.then=="function"?g.then(x=>h(null,x)).catch(h):h(null,g)}catch(g){h(g)}else m(a,l,i,s,h,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]),Pe(n[1])&&(a.defaultValue=n[1]),Pe(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}),fv=n=>(Pe(n.ns)&&(n.ns=[n.ns]),Pe(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),Pe(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),Bs=()=>{},QS=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(l=>{typeof n[l]=="function"&&(n[l]=n[l].bind(n))})};class ho extends yu{constructor(a={},l){if(super(),this.options=fv(a),this.services={},this.logger=qn,this.modules={external:[]},QS(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&&(Pe(a.ns)?a.defaultNS=a.ns:a.ns.indexOf("translation")<0&&(a.defaultNS=a.ns[0]));const i=cv();this.options={...i,...this.options,...fv(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?qn.init(s(this.modules.logger),this.options):qn.init(null,this.options);let m;this.modules.formatter?m=this.modules.formatter:m=GS;const g=new lv(this.options);this.store=new nv(this.options.resources,this.options);const x=this.services;x.logger=qn,x.resourceStore=this.store,x.languageUtils=g,x.pluralResolver=new VS(g,{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)&&(x.formatter=s(m),x.formatter.init&&x.formatter.init(x,this.options),this.options.interpolation.format=x.formatter.format.bind(x.formatter)),x.interpolator=new qS(this.options),x.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},x.backendConnector=new XS(s(this.modules.backend),x.resourceStore,x,this.options),x.backendConnector.on("*",(w,...C)=>{this.emit(w,...C)}),this.modules.languageDetector&&(x.languageDetector=s(this.modules.languageDetector),x.languageDetector.init&&x.languageDetector.init(x,this.options.detection,this.options)),this.modules.i18nFormat&&(x.i18nFormat=s(this.modules.i18nFormat),x.i18nFormat.init&&x.i18nFormat.init(this)),this.translator=new su(this.services,this.options),this.translator.on("*",(w,...C)=>{this.emit(w,...C)}),this.modules.external.forEach(w=>{w.init&&w.init(this)})}if(this.format=this.options.interpolation.format,l||(l=Bs),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]=(...g)=>this.store[m](...g)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(m=>{this[m]=(...g)=>(this.store[m](...g),this)});const h=eo(),p=()=>{const m=(g,x)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),h.resolve(x),l(g,x)};if(this.languages&&!this.isInitialized)return m(null,this.t.bind(this));this.changeLanguage(this.options.lng,m)};return this.options.resources||!this.options.initAsync?p():setTimeout(p,0),h}loadResources(a,l=Bs){let i=l;const s=Pe(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=h=>{if(!h||h==="cimode")return;this.services.languageUtils.toResolveHierarchy(h).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?.(h=>f(h)),this.services.backendConnector.load(u,this.options.ns,h=>{!h&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(h)})}else i(null)}reloadResources(a,l,i){const s=eo();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=Bs),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"&&Dy.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=eo();this.emit("languageChanging",a);const s=h=>{this.language=h,this.languages=this.services.languageUtils.toResolveHierarchy(h),this.resolvedLanguage=void 0,this.setResolvedLanguage(h)},u=(h,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(h,(...m)=>this.t(...m))},f=h=>{!a&&!h&&this.services.languageDetector&&(h=[]);const p=Pe(h)?h:h&&h[0],m=this.store.hasLanguageSomeTranslations(p)?p:this.services.languageUtils.getBestMatchFromCodes(Pe(h)?[h]:h);m&&(this.language||s(m),this.translator.language||this.translator.changeLanguage(m),this.services.languageDetector?.cacheUserLanguage?.(m)),this.loadResources(m,g=>{u(g,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,...h)=>{let p;typeof f!="object"?p=this.options.overloadTranslationOptionHandler([u,f].concat(h)):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 g;return p.keyPrefix&&Array.isArray(u)?g=u.map(x=>`${p.keyPrefix}${m}${x}`):g=p.keyPrefix?`${p.keyPrefix}${m}${u}`:u,this.t(g,p)};return Pe(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=(h,p)=>{const m=this.services.backendConnector.state[`${h}|${p}`];return m===-1||m===0||m===2};if(l.precheck){const h=l.precheck(this,f);if(h!==void 0)return h}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=eo();return this.options.ns?(Pe(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=eo();Pe(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 lv(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 ho(a,l)}cloneInstance(a={},l=Bs){const i=a.forkResourceStore;i&&delete a.forkResourceStore;const s={...this.options,...a,isClone:!0},u=new ho(s);if((a.debug!==void 0||a.prefix!==void 0)&&(u.logger=u.logger.clone(a)),["store","services","language"].forEach(h=>{u[h]=this[h]}),u.services={...this.services},u.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},i){const h=Object.keys(this.store.data).reduce((p,m)=>(p[m]={...this.store.data[m]},p[m]=Object.keys(p[m]).reduce((g,x)=>(g[x]={...p[m][x]},g),p[m]),p),{});u.store=new nv(h,s),u.services.resourceStore=u.store}return u.translator=new su(u.services,s),u.translator.on("*",(h,...p)=>{u.emit(h,...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 $t=ho.createInstance();$t.createInstance=ho.createInstance;$t.createInstance;$t.dir;$t.init;$t.loadResources;$t.reloadResources;$t.use;$t.changeLanguage;$t.getFixedT;$t.t;$t.exists;$t.setDefaultNamespace;$t.hasLoadedNamespace;$t.loadNamespaces;$t.loadLanguages;var Yf={exports:{}},$e={};/**
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={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};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={};/**
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 dv;function ZS(){if(dv)return $e;dv=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"),h=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),x=Symbol.iterator;function S(N){return N===null||typeof N!="object"?null:(N=x&&N[x]||N["@@iterator"],typeof N=="function"?N:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,R={};function j(N,K,L){this.props=N,this.context=K,this.refs=R,this.updater=L||w}j.prototype.isReactComponent={},j.prototype.setState=function(N,K){if(typeof N!="object"&&typeof N!="function"&&N!=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,N,K,"setState")},j.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function O(){}O.prototype=j.prototype;function U(N,K,L){this.props=N,this.context=K,this.refs=R,this.updater=L||w}var z=U.prototype=new O;z.constructor=U,C(z,j.prototype),z.isPureReactComponent=!0;var H=Array.isArray,k={H:null,A:null,T:null,S:null,V:null},A=Object.prototype.hasOwnProperty;function Y(N,K,L,G,W,se){return L=se.ref,{$$typeof:n,type:N,key:K,ref:L!==void 0?L:null,props:se}}function J(N,K){return Y(N.type,K,void 0,void 0,void 0,N.props)}function ae(N){return typeof N=="object"&&N!==null&&N.$$typeof===n}function ie(N){var K={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(L){return K[L]})}var Re=/\/+/g;function me(N,K){return typeof N=="object"&&N!==null&&N.key!=null?ie(""+N.key):K.toString(36)}function oe(){}function fe(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(oe,oe):(N.status="pending",N.then(function(K){N.status==="pending"&&(N.status="fulfilled",N.value=K)},function(K){N.status==="pending"&&(N.status="rejected",N.reason=K)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function de(N,K,L,G,W){var se=typeof N;(se==="undefined"||se==="boolean")&&(N=null);var pe=!1;if(N===null)pe=!0;else switch(se){case"bigint":case"string":case"number":pe=!0;break;case"object":switch(N.$$typeof){case n:case a:pe=!0;break;case g:return pe=N._init,de(pe(N._payload),K,L,G,W)}}if(pe)return W=W(N),pe=G===""?"."+me(N,0):G,H(W)?(L="",pe!=null&&(L=pe.replace(Re,"$&/")+"/"),de(W,K,L,"",function(Ze){return Ze})):W!=null&&(ae(W)&&(W=J(W,L+(W.key==null||N&&N.key===W.key?"":(""+W.key).replace(Re,"$&/")+"/")+pe)),K.push(W)),1;pe=0;var ve=G===""?".":G+":";if(H(N))for(var ze=0;ze<N.length;ze++)G=N[ze],se=ve+me(G,ze),pe+=de(G,K,L,se,W);else if(ze=S(N),typeof ze=="function")for(N=ze.call(N),ze=0;!(G=N.next()).done;)G=G.value,se=ve+me(G,ze++),pe+=de(G,K,L,se,W);else if(se==="object"){if(typeof N.then=="function")return de(fe(N),K,L,G,W);throw K=String(N),Error("Objects are not valid as a React child (found: "+(K==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":K)+"). If you meant to render a collection of children, use an array instead.")}return pe}function M(N,K,L){if(N==null)return N;var G=[],W=0;return de(N,G,"","",function(se){return K.call(L,se,W++)}),G}function Z(N){if(N._status===-1){var K=N._result;K=K(),K.then(function(L){(N._status===0||N._status===-1)&&(N._status=1,N._result=L)},function(L){(N._status===0||N._status===-1)&&(N._status=2,N._result=L)}),N._status===-1&&(N._status=0,N._result=K)}if(N._status===1)return N._result.default;throw N._result}var $=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var K=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(K))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)};function ge(){}return $e.Children={map:M,forEach:function(N,K,L){M(N,function(){K.apply(this,arguments)},L)},count:function(N){var K=0;return M(N,function(){K++}),K},toArray:function(N){return M(N,function(K){return K})||[]},only:function(N){if(!ae(N))throw Error("React.Children.only expected to receive a single React element child.");return N}},$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=k,$e.__COMPILER_RUNTIME={__proto__:null,c:function(N){return k.H.useMemoCache(N)}},$e.cache=function(N){return function(){return N.apply(null,arguments)}},$e.cloneElement=function(N,K,L){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var G=C({},N.props),W=N.key,se=void 0;if(K!=null)for(pe in K.ref!==void 0&&(se=void 0),K.key!==void 0&&(W=""+K.key),K)!A.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=L;else if(1<pe){for(var ve=Array(pe),ze=0;ze<pe;ze++)ve[ze]=arguments[ze+2];G.children=ve}return Y(N.type,W,void 0,void 0,se,G)},$e.createContext=function(N){return N={$$typeof:f,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:u,_context:N},N},$e.createElement=function(N,K,L){var G,W={},se=null;if(K!=null)for(G in K.key!==void 0&&(se=""+K.key),K)A.call(K,G)&&G!=="key"&&G!=="__self"&&G!=="__source"&&(W[G]=K[G]);var pe=arguments.length-2;if(pe===1)W.children=L;else if(1<pe){for(var ve=Array(pe),ze=0;ze<pe;ze++)ve[ze]=arguments[ze+2];W.children=ve}if(N&&N.defaultProps)for(G in pe=N.defaultProps,pe)W[G]===void 0&&(W[G]=pe[G]);return Y(N,se,void 0,void 0,null,W)},$e.createRef=function(){return{current:null}},$e.forwardRef=function(N){return{$$typeof:h,render:N}},$e.isValidElement=ae,$e.lazy=function(N){return{$$typeof:g,_payload:{_status:-1,_result:N},_init:Z}},$e.memo=function(N,K){return{$$typeof:m,type:N,compare:K===void 0?null:K}},$e.startTransition=function(N){var K=k.T,L={};k.T=L;try{var G=N(),W=k.S;W!==null&&W(L,G),typeof G=="object"&&G!==null&&typeof G.then=="function"&&G.then(ge,$)}catch(se){$(se)}finally{k.T=K}},$e.unstable_useCacheRefresh=function(){return k.H.useCacheRefresh()},$e.use=function(N){return k.H.use(N)},$e.useActionState=function(N,K,L){return k.H.useActionState(N,K,L)},$e.useCallback=function(N,K){return k.H.useCallback(N,K)},$e.useContext=function(N){return k.H.useContext(N)},$e.useDebugValue=function(){},$e.useDeferredValue=function(N,K){return k.H.useDeferredValue(N,K)},$e.useEffect=function(N,K,L){var G=k.H;if(typeof L=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return G.useEffect(N,K)},$e.useId=function(){return k.H.useId()},$e.useImperativeHandle=function(N,K,L){return k.H.useImperativeHandle(N,K,L)},$e.useInsertionEffect=function(N,K){return k.H.useInsertionEffect(N,K)},$e.useLayoutEffect=function(N,K){return k.H.useLayoutEffect(N,K)},$e.useMemo=function(N,K){return k.H.useMemo(N,K)},$e.useOptimistic=function(N,K){return k.H.useOptimistic(N,K)},$e.useReducer=function(N,K,L){return k.H.useReducer(N,K,L)},$e.useRef=function(N){return k.H.useRef(N)},$e.useState=function(N){return k.H.useState(N)},$e.useSyncExternalStore=function(N,K,L){return k.H.useSyncExternalStore(N,K,L)},$e.useTransition=function(){return k.H.useTransition()},$e.version="19.1.0",$e}var hv;function Pd(){return hv||(hv=1,Yf.exports=ZS()),Yf.exports}var v=Pd();const Lr=_y(v),Ly=NS({__proto__:null,default:Lr},[v]),JS=(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);zr(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),n?.services?.logger?.warn?n.services.logger.warn(...s):console?.warn&&console.warn(...s)},mv={},yd=(n,a,l,i)=>{zr(l)&&mv[l]||(zr(l)&&(mv[l]=new Date),JS(n,a,l,i))},zy=(n,a)=>()=>{if(n.isInitialized)a();else{const l=()=>{setTimeout(()=>{n.off("initialized",l)},0),a()};n.on("initialized",l)}},bd=(n,a,l)=>{n.loadNamespaces(a,zy(n,l))},pv=(n,a,l,i)=>{if(zr(l)&&(l=[l]),n.options.preload&&n.options.preload.indexOf(a)>-1)return bd(n,l,i);l.forEach(s=>{n.options.ns.indexOf(s)<0&&n.options.ns.push(s)}),n.loadLanguages(a,zy(n,i))},IS=(n,a,l={})=>!a.languages||!a.languages.length?(yd(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}}),zr=n=>typeof n=="string",WS=n=>typeof n=="object"&&n!==null,ew=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,tw={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},nw=n=>tw[n],aw=n=>n.replace(ew,nw);let xd={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:aw};const rw=(n={})=>{xd={...xd,...n}},lw=()=>xd;let ky;const iw=n=>{ky=n},ow=()=>ky,sw={type:"3rdParty",init(n){rw(n.options.react),iw(n)}},uw=v.createContext();class cw{constructor(){this.usedNamespaces={}}addUsedNamespaces(a){a.forEach(l=>{this.usedNamespaces[l]||(this.usedNamespaces[l]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const fw=(n,a)=>{const l=v.useRef();return v.useEffect(()=>{l.current=n},[n,a]),l.current},Uy=(n,a,l,i)=>n.getFixedT(a,l,i),dw=(n,a,l,i)=>v.useCallback(Uy(n,a,l,i),[n,a,l,i]),Yr=(n,a={})=>{const{i18n:l}=a,{i18n:i,defaultNS:s}=v.useContext(uw)||{},u=l||i||ow();if(u&&!u.reportNamespaces&&(u.reportNamespaces=new cw),!u){yd(u,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const H=(A,Y)=>zr(Y)?Y:WS(Y)&&zr(Y.defaultValue)?Y.defaultValue:Array.isArray(A)?A[A.length-1]:A,k=[H,{},!1];return k.t=H,k.i18n={},k.ready=!1,k}u.options.react?.wait&&yd(u,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const f={...lw(),...u.options.react,...a},{useSuspense:h,keyPrefix:p}=f;let m=s||u.options?.defaultNS;m=zr(m)?[m]:m||["translation"],u.reportNamespaces.addUsedNamespaces?.(m);const g=(u.isInitialized||u.initializedStoreOnce)&&m.every(H=>IS(H,u,f)),x=dw(u,a.lng||null,f.nsMode==="fallback"?m:m[0],p),S=()=>x,w=()=>Uy(u,a.lng||null,f.nsMode==="fallback"?m:m[0],p),[C,R]=v.useState(S);let j=m.join();a.lng&&(j=`${a.lng}${j}`);const O=fw(j),U=v.useRef(!0);v.useEffect(()=>{const{bindI18n:H,bindI18nStore:k}=f;U.current=!0,!g&&!h&&(a.lng?pv(u,a.lng,m,()=>{U.current&&R(w)}):bd(u,m,()=>{U.current&&R(w)})),g&&O&&O!==j&&U.current&&R(w);const A=()=>{U.current&&R(w)};return H&&u?.on(H,A),k&&u?.store.on(k,A),()=>{U.current=!1,u&&H&&H?.split(" ").forEach(Y=>u.off(Y,A)),k&&u&&k.split(" ").forEach(Y=>u.store.off(Y,A))}},[u,j]),v.useEffect(()=>{U.current&&g&&R(S)},[u,p,g]);const z=[C,u,g];if(z.t=C,z.i18n=u,z.ready=g,g||!g&&!h)return z;throw new Promise(H=>{a.lng?pv(u,a.lng,m,()=>H()):bd(u,m,()=>H())})},{slice:hw,forEach:mw}=[];function pw(n){return mw.call(hw.call(arguments,1),a=>{if(a)for(const l in a)n[l]===void 0&&(n[l]=a[l])}),n}function gw(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 gv=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,vw=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(!gv.test(i.domain))throw new TypeError("option domain is invalid");u+=`; Domain=${i.domain}`}if(i.path){if(!gv.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},vv={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=vw(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 yw={name:"cookie",lookup(n){let{lookupCookie:a}=n;if(a&&typeof document<"u")return vv.read(a)||void 0},cacheUserLanguage(n,a){let{lookupCookie:l,cookieMinutes:i,cookieDomain:s,cookieOptions:u}=a;l&&typeof document<"u"&&vv.create(l,n,i,s,u)}},bw={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 h=u[f].indexOf("=");h>0&&u[f].substring(0,h)===a&&(l=u[f].substring(h+1))}}return l}},xw={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 h=0;h<f.length;h++){const p=f[h].indexOf("=");p>0&&f[h].substring(0,p)===a&&(i=f[h].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 _l=null;const yv=()=>{if(_l!==null)return _l;try{if(_l=typeof window<"u"&&window.localStorage!==null,!_l)return!1;const n="i18next.translate.boo";window.localStorage.setItem(n,"foo"),window.localStorage.removeItem(n)}catch{_l=!1}return _l};var Sw={name:"localStorage",lookup(n){let{lookupLocalStorage:a}=n;if(a&&yv())return window.localStorage.getItem(a)||void 0},cacheUserLanguage(n,a){let{lookupLocalStorage:l}=a;l&&yv()&&window.localStorage.setItem(l,n)}};let Ml=null;const bv=()=>{if(Ml!==null)return Ml;try{if(Ml=typeof window<"u"&&window.sessionStorage!==null,!Ml)return!1;const n="i18next.translate.boo";window.sessionStorage.setItem(n,"foo"),window.sessionStorage.removeItem(n)}catch{Ml=!1}return Ml};var ww={name:"sessionStorage",lookup(n){let{lookupSessionStorage:a}=n;if(a&&bv())return window.sessionStorage.getItem(a)||void 0},cacheUserLanguage(n,a){let{lookupSessionStorage:l}=a;l&&bv()&&window.sessionStorage.setItem(l,n)}},Ew={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}},Rw={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}},Cw={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}},Ow={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 Py=!1;try{document.cookie,Py=!0}catch{}const Hy=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];Py||Hy.splice(1,1);const Aw=()=>({order:Hy,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:n=>n});class By{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=pw(l,this.options||{},Aw()),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(yw),this.addDetector(bw),this.addDetector(Sw),this.addDetector(ww),this.addDetector(Ew),this.addDetector(Rw),this.addDetector(Cw),this.addDetector(Ow),this.addDetector(xw)}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&&!gw(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)}))}}By.type="languageDetector";const Nw={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"},Tw={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..."},jw={title:"General Settings",log:"Enable Logging",claude_path:"Claude Path",host:"Host",port:"Port",apikey:"API Key",timeout:"API Timeout (ms)",proxy_url:"Proxy URL"},_w={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"},Mw={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"},Dw={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."},Lw={title:"JSON Editor",save:"Save",saving:"Saving...",cancel:"Cancel",save_failed:"Failed to save config",save_and_restart:"Save & Restart"},zw={app:Nw,login:Tw,toplevel:jw,transformers:_w,providers:Mw,router:Dw,json_editor:Lw},kw={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:"更新失败"},Uw={title:"登录到您的账户",description:"请输入您的API密钥以访问配置面板",apiKey:"API密钥",apiKeyPlaceholder:"请输入您的API密钥",signIn:"登录",invalidApiKey:"API密钥无效",configError:"配置未加载",validating:"正在验证API密钥..."},Pw={title:"通用设置",log:"启用日志",claude_path:"Claude 路径",host:"主机",port:"端口",apikey:"API 密钥",timeout:"API 超时时间 (毫秒)",proxy_url:"代理地址"},Hw={title:"自定义转换器",path:"路径",project:"项目",remove:"移除",add:"添加自定义转换器",edit:"编辑自定义转换器",delete:"删除自定义转换器",delete_transformer_confirm:"您确定要删除此自定义转换器吗?",parameters:"参数"},Bw={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:"已存在同名供应商"},$w={title:"路由",default:"默认",background:"后台",think:"思考",longContext:"长上下文",longContextThreshold:"上下文阈值",webSearch:"网络搜索",selectModel:"选择一个模型...",searchModel:"搜索模型...",noModelFound:"未找到模型."},Vw={title:"JSON 编辑器",save:"保存",saving:"保存中...",cancel:"取消",save_failed:"配置保存失败",save_and_restart:"保存并重启"},qw={app:kw,login:Uw,toplevel:Pw,transformers:Hw,providers:Bw,router:$w,json_editor:Vw},Yw={en:{translation:zw},zh:{translation:qw}};$t.use(By).use(sw).init({resources:Yw,fallbackLng:"en",interpolation:{escapeValue:!1}});var Kf={exports:{}},to={},Gf={exports:{}},Ff={};/**
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={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},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={};/**
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 xv;function Kw(){return xv||(xv=1,function(n){function a(M,Z){var $=M.length;M.push(Z);e:for(;0<$;){var ge=$-1>>>1,N=M[ge];if(0<s(N,Z))M[ge]=Z,M[$]=N,$=ge;else break e}}function l(M){return M.length===0?null:M[0]}function i(M){if(M.length===0)return null;var Z=M[0],$=M.pop();if($!==Z){M[0]=$;e:for(var ge=0,N=M.length,K=N>>>1;ge<K;){var L=2*(ge+1)-1,G=M[L],W=L+1,se=M[W];if(0>s(G,$))W<N&&0>s(se,G)?(M[ge]=se,M[W]=$,ge=W):(M[ge]=G,M[L]=$,ge=L);else if(W<N&&0>s(se,$))M[ge]=se,M[W]=$,ge=W;else break e}}return Z}function s(M,Z){var $=M.sortIndex-Z.sortIndex;return $!==0?$:M.id-Z.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,h=f.now();n.unstable_now=function(){return f.now()-h}}var p=[],m=[],g=1,x=null,S=3,w=!1,C=!1,R=!1,j=!1,O=typeof setTimeout=="function"?setTimeout:null,U=typeof clearTimeout=="function"?clearTimeout:null,z=typeof setImmediate<"u"?setImmediate:null;function H(M){for(var Z=l(m);Z!==null;){if(Z.callback===null)i(m);else if(Z.startTime<=M)i(m),Z.sortIndex=Z.expirationTime,a(p,Z);else break;Z=l(m)}}function k(M){if(R=!1,H(M),!C)if(l(p)!==null)C=!0,A||(A=!0,me());else{var Z=l(m);Z!==null&&de(k,Z.startTime-M)}}var A=!1,Y=-1,J=5,ae=-1;function ie(){return j?!0:!(n.unstable_now()-ae<J)}function Re(){if(j=!1,A){var M=n.unstable_now();ae=M;var Z=!0;try{e:{C=!1,R&&(R=!1,U(Y),Y=-1),w=!0;var $=S;try{t:{for(H(M),x=l(p);x!==null&&!(x.expirationTime>M&&ie());){var ge=x.callback;if(typeof ge=="function"){x.callback=null,S=x.priorityLevel;var N=ge(x.expirationTime<=M);if(M=n.unstable_now(),typeof N=="function"){x.callback=N,H(M),Z=!0;break t}x===l(p)&&i(p),H(M)}else i(p);x=l(p)}if(x!==null)Z=!0;else{var K=l(m);K!==null&&de(k,K.startTime-M),Z=!1}}break e}finally{x=null,S=$,w=!1}Z=void 0}}finally{Z?me():A=!1}}}var me;if(typeof z=="function")me=function(){z(Re)};else if(typeof MessageChannel<"u"){var oe=new MessageChannel,fe=oe.port2;oe.port1.onmessage=Re,me=function(){fe.postMessage(null)}}else me=function(){O(Re,0)};function de(M,Z){Y=O(function(){M(n.unstable_now())},Z)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(M){M.callback=null},n.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):J=0<M?Math.floor(1e3/M):5},n.unstable_getCurrentPriorityLevel=function(){return S},n.unstable_next=function(M){switch(S){case 1:case 2:case 3:var Z=3;break;default:Z=S}var $=S;S=Z;try{return M()}finally{S=$}},n.unstable_requestPaint=function(){j=!0},n.unstable_runWithPriority=function(M,Z){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var $=S;S=M;try{return Z()}finally{S=$}},n.unstable_scheduleCallback=function(M,Z,$){var ge=n.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?ge+$:ge):$=ge,M){case 1:var N=-1;break;case 2:N=250;break;case 5:N=1073741823;break;case 4:N=1e4;break;default:N=5e3}return N=$+N,M={id:g++,callback:Z,priorityLevel:M,startTime:$,expirationTime:N,sortIndex:-1},$>ge?(M.sortIndex=$,a(m,M),l(p)===null&&M===l(m)&&(R?(U(Y),Y=-1):R=!0,de(k,$-ge))):(M.sortIndex=N,a(p,M),C||w||(C=!0,A||(A=!0,me()))),M},n.unstable_shouldYield=ie,n.unstable_wrapCallback=function(M){var Z=S;return function(){var $=S;S=Z;try{return M.apply(this,arguments)}finally{S=$}}}}(Ff)),Ff}var Sv;function Gw(){return Sv||(Sv=1,Gf.exports=Kw()),Gf.exports}var Xf={exports:{}},Bt={};/**
31
+ */var Lv;function pE(){return Lv||(Lv=1,function(n){function a(L,I){var V=L.length;L.push(I);e:for(;0<V;){var ge=V-1>>>1,O=L[ge];if(0<s(O,I))L[ge]=I,L[V]=O,V=ge;else break e}}function l(L){return L.length===0?null:L[0]}function i(L){if(L.length===0)return null;var I=L[0],V=L.pop();if(V!==I){L[0]=V;e:for(var ge=0,O=L.length,K=O>>>1;ge<K;){var P=2*(ge+1)-1,G=L[P],ee=P+1,se=L[ee];if(0>s(G,V))ee<O&&0>s(se,G)?(L[ge]=se,L[ee]=V,ge=ee):(L[ge]=G,L[P]=V,ge=P);else if(ee<O&&0>s(se,V))L[ge]=se,L[ee]=V,ge=ee;else break e}}return I}function s(L,I){var V=L.sortIndex-I.sortIndex;return V!==0?V:L.id-I.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,S=3,w=!1,_=!1,C=!1,j=!1,N=typeof setTimeout=="function"?setTimeout:null,U=typeof clearTimeout=="function"?clearTimeout:null,z=typeof setImmediate<"u"?setImmediate:null;function D(L){for(var I=l(m);I!==null;){if(I.callback===null)i(m);else if(I.startTime<=L)i(m),I.sortIndex=I.expirationTime,a(p,I);else break;I=l(m)}}function T(L){if(C=!1,D(L),!_)if(l(p)!==null)_=!0,R||(R=!0,de());else{var I=l(m);I!==null&&he(T,I.startTime-L)}}var R=!1,H=-1,Z=5,J=-1;function ne(){return j?!0:!(n.unstable_now()-J<Z)}function Se(){if(j=!1,R){var L=n.unstable_now();J=L;var I=!0;try{e:{_=!1,C&&(C=!1,U(H),H=-1),w=!0;var V=S;try{t:{for(D(L),b=l(p);b!==null&&!(b.expirationTime>L&&ne());){var ge=b.callback;if(typeof ge=="function"){b.callback=null,S=b.priorityLevel;var O=ge(b.expirationTime<=L);if(L=n.unstable_now(),typeof O=="function"){b.callback=O,D(L),I=!0;break t}b===l(p)&&i(p),D(L)}else i(p);b=l(p)}if(b!==null)I=!0;else{var K=l(m);K!==null&&he(T,K.startTime-L),I=!1}}break e}finally{b=null,S=V,w=!1}I=void 0}}finally{I?de():R=!1}}}var de;if(typeof z=="function")de=function(){z(Se)};else if(typeof MessageChannel<"u"){var oe=new MessageChannel,fe=oe.port2;oe.port1.onmessage=Se,de=function(){fe.postMessage(null)}}else de=function(){N(Se,0)};function he(L,I){H=N(function(){L(n.unstable_now())},I)}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(L){L.callback=null},n.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Z=0<L?Math.floor(1e3/L):5},n.unstable_getCurrentPriorityLevel=function(){return S},n.unstable_next=function(L){switch(S){case 1:case 2:case 3:var I=3;break;default:I=S}var V=S;S=I;try{return L()}finally{S=V}},n.unstable_requestPaint=function(){j=!0},n.unstable_runWithPriority=function(L,I){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var V=S;S=L;try{return I()}finally{S=V}},n.unstable_scheduleCallback=function(L,I,V){var ge=n.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?ge+V:ge):V=ge,L){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,L={id:v++,callback:I,priorityLevel:L,startTime:V,expirationTime:O,sortIndex:-1},V>ge?(L.sortIndex=V,a(m,L),l(p)===null&&L===l(m)&&(C?(U(H),H=-1):C=!0,he(T,V-ge))):(L.sortIndex=O,a(p,L),_||w||(_=!0,R||(R=!0,de()))),L},n.unstable_shouldYield=ne,n.unstable_wrapCallback=function(L){var I=S;return function(){var V=S;S=I;try{return L.apply(this,arguments)}finally{S=V}}}}(rd)),rd}var kv;function gE(){return kv||(kv=1,ad.exports=pE()),ad.exports}var ld={exports:{}},Vt={};/**
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 wv;function Fw(){if(wv)return Bt;wv=1;var n=Pd();function a(p){var m="https://react.dev/errors/"+p;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)m+="&args[]="+encodeURIComponent(arguments[g])}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,g){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:x==null?null:""+x,children:p,containerInfo:m,implementation:g}}var f=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(p,m){if(p==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return Bt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,Bt.createPortal=function(p,m){var g=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,g)},Bt.flushSync=function(p){var m=f.T,g=i.p;try{if(f.T=null,i.p=2,p)return p()}finally{f.T=m,i.p=g,i.d.f()}},Bt.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))},Bt.prefetchDNS=function(p){typeof p=="string"&&i.d.D(p)},Bt.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var g=m.as,x=h(g,m.crossOrigin),S=typeof m.integrity=="string"?m.integrity:void 0,w=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;g==="style"?i.d.S(p,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:x,integrity:S,fetchPriority:w}):g==="script"&&i.d.X(p,{crossOrigin:x,integrity:S,fetchPriority:w,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Bt.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var g=h(m.as,m.crossOrigin);i.d.M(p,{crossOrigin:g,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)},Bt.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var g=m.as,x=h(g,m.crossOrigin);i.d.L(p,g,{crossOrigin:x,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},Bt.preloadModule=function(p,m){if(typeof p=="string")if(m){var g=h(m.as,m.crossOrigin);i.d.m(p,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else i.d.m(p)},Bt.requestFormReset=function(p){i.d.r(p)},Bt.unstable_batchedUpdates=function(p,m){return p(m)},Bt.useFormState=function(p,m,g){return f.H.useFormState(p,m,g)},Bt.useFormStatus=function(){return f.H.useHostTransitionStatus()},Bt.version="19.1.0",Bt}var Ev;function $y(){if(Ev)return Xf.exports;Ev=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(),Xf.exports=Fw(),Xf.exports}/**
39
+ */var zv;function vE(){if(zv)return Vt;zv=1;var n=eh();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 Vt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,Vt.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)},Vt.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()}},Vt.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))},Vt.prefetchDNS=function(p){typeof p=="string"&&i.d.D(p)},Vt.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var v=m.as,b=d(v,m.crossOrigin),S=typeof m.integrity=="string"?m.integrity:void 0,w=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:S,fetchPriority:w}):v==="script"&&i.d.X(p,{crossOrigin:b,integrity:S,fetchPriority:w,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Vt.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)},Vt.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})}},Vt.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)},Vt.requestFormReset=function(p){i.d.r(p)},Vt.unstable_batchedUpdates=function(p,m){return p(m)},Vt.useFormState=function(p,m,v){return f.H.useFormState(p,m,v)},Vt.useFormStatus=function(){return f.H.useHostTransitionStatus()},Vt.version="19.1.0",Vt}var Uv;function i0(){if(Uv)return ld.exports;Uv=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(),ld.exports=vE(),ld.exports}/**
40
40
  * @license React
41
41
  * react-dom-client.production.js
42
42
  *
@@ -44,15 +44,15 @@
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 Rv;function Xw(){if(Rv)return to;Rv=1;var n=Gw(),a=Pd(),l=$y();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 h(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 d=c.alternate;if(d===null){if(o=c.return,o!==null){r=o;continue}break}if(c.child===d.child){for(d=c.child;d;){if(d===r)return h(c),e;if(d===o)return h(c),t;d=d.sibling}throw Error(i(188))}if(r.return!==o.return)r=c,o=d;else{for(var b=!1,E=c.child;E;){if(E===r){b=!0,r=c,o=d;break}if(E===o){b=!0,o=c,r=d;break}E=E.sibling}if(!b){for(E=d.child;E;){if(E===r){b=!0,r=d,o=c;break}if(E===o){b=!0,o=d,r=c;break}E=E.sibling}if(!b)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 g=Object.assign,x=Symbol.for("react.element"),S=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),O=Symbol.for("react.provider"),U=Symbol.for("react.consumer"),z=Symbol.for("react.context"),H=Symbol.for("react.forward_ref"),k=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),Y=Symbol.for("react.memo"),J=Symbol.for("react.lazy"),ae=Symbol.for("react.activity"),ie=Symbol.for("react.memo_cache_sentinel"),Re=Symbol.iterator;function me(e){return e===null||typeof e!="object"?null:(e=Re&&e[Re]||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 C:return"Fragment";case j:return"Profiler";case R:return"StrictMode";case k:return"Suspense";case A:return"SuspenseList";case ae: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 H:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Y:return t=e.displayName||null,t!==null?t:fe(e.type)||"Memo";case J:t=e._payload,e=e._init;try{return fe(e(t))}catch{}}return null}var de=Array.isArray,M=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$={pending:!1,data:null,method:null,action:null},ge=[],N=-1;function K(e){return{current:e}}function L(e){0>N||(e.current=ge[N],ge[N]=null,N--)}function G(e,t){N++,ge[N]=e.current,e.current=t}var W=K(null),se=K(null),pe=K(null),ve=K(null);function ze(e,t){switch(G(pe,t),G(se,e),G(W,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Rg(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Rg(t),e=Cg(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}L(W),G(W,e)}function Ze(){L(W),L(se),L(pe)}function je(e){e.memoizedState!==null&&G(ve,e);var t=W.current,r=Cg(t,e.type);t!==r&&(G(se,e),G(W,r))}function re(e){se.current===e&&(L(W),L(se)),ve.current===e&&(L(ve),Xi._currentValue=$)}var te=Object.prototype.hasOwnProperty,ue=n.unstable_scheduleCallback,ce=n.unstable_cancelCallback,Ne=n.unstable_shouldYield,Ue=n.unstable_requestPaint,_e=n.unstable_now,ot=n.unstable_getCurrentPriorityLevel,Cn=n.unstable_ImmediatePriority,Gr=n.unstable_UserBlockingPriority,Fr=n.unstable_NormalPriority,Jn=n.unstable_LowPriority,Ra=n.unstable_IdlePriority,Co=n.log,ri=n.unstable_setDisableYieldValue,Kt=null,mt=null;function On(e){if(typeof Co=="function"&&ri(e),mt&&typeof mt.setStrictMode=="function")try{mt.setStrictMode(Kt,e)}catch{}}var zt=Math.clz32?Math.clz32:Oo,Uu=Math.log,Ln=Math.LN2;function Oo(e){return e>>>=0,e===0?32:31-(Uu(e)/Ln|0)|0}var sr=256,ur=4194304;function In(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 cr(e,t,r){var o=e.pendingLanes;if(o===0)return 0;var c=0,d=e.suspendedLanes,b=e.pingedLanes;e=e.warmLanes;var E=o&134217727;return E!==0?(o=E&~d,o!==0?c=In(o):(b&=E,b!==0?c=In(b):r||(r=E&~e,r!==0&&(c=In(r))))):(E=o&~d,E!==0?c=In(E):b!==0?c=In(b):r||(r=o&~e,r!==0&&(c=In(r)))),c===0?0:t!==0&&t!==c&&(t&d)===0&&(d=c&-c,r=t&-t,d>=r||d===32&&(r&4194048)!==0)?t:c}function zn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ao(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 Xr(){var e=sr;return sr<<=1,(sr&4194048)===0&&(sr=256),e}function No(){var e=ur;return ur<<=1,(ur&62914560)===0&&(ur=4194304),e}function Qr(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function fr(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function To(e,t,r,o,c,d){var b=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=b&~r;0<r;){var I=31-zt(r),ne=1<<I;E[I]=0,T[I]=-1;var F=q[I];if(F!==null)for(q[I]=null,I=0;I<F.length;I++){var X=F[I];X!==null&&(X.lane&=-536870913)}r&=~ne}o!==0&&dr(e,o,0),d!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=d&~(b&~t))}function dr(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 hr(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 li(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 ii(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function _(){var e=Z.p;return e!==0?e:(e=window.event,e===void 0?32:Yg(e.type))}function B(e,t){var r=Z.p;try{return Z.p=e,t()}finally{Z.p=r}}var Q=Math.random().toString(36).slice(2),le="__reactFiber$"+Q,he="__reactProps$"+Q,Se="__reactContainer$"+Q,Ce="__reactEvents$"+Q,we="__reactListeners$"+Q,Te="__reactHandles$"+Q,Me="__reactResources$"+Q,Ee="__reactMarker$"+Q;function Oe(e){delete e[le],delete e[he],delete e[Ce],delete e[we],delete e[Te]}function Ve(e){var t=e[le];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Se]||r[le]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Tg(e);e!==null;){if(r=e[le])return r;e=Tg(e)}return t}e=r,r=e.parentNode}return null}function et(e){if(e=e[le]||e[Se]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function vt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function yt(e){var t=e[Me];return t||(t=e[Me]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Be(e){e[Ee]=!0}var at=new Set,kn={};function It(e,t){Vt(e,t),Vt(e+"Capture",t)}function Vt(e,t){for(kn[e]=t,e=0;e<t.length;e++)at.add(t[e])}var dn=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]*$"),Zr={},Ca={};function Wn(e){return te.call(Ca,e)?!0:te.call(Zr,e)?!1:dn.test(e)?Ca[e]=!0:(Zr[e]=!0,!1)}function ea(e,t,r){if(Wn(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 ta(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 Ct,mr;function hn(e){if(Ct===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);Ct=t&&t[1]||"",mr=-1<r.stack.indexOf(`
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(`
48
48
  at`)?" (<anonymous>)":-1<r.stack.indexOf("@")?"@unknown:0:0":""}return`
49
- `+Ct+e+mr}var pt=!1;function Oa(e,t){if(!e||pt)return"";pt=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(t){var ne=function(){throw Error()};if(Object.defineProperty(ne.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ne,[])}catch(X){var F=X}Reflect.construct(e,[],ne)}else{try{ne.call()}catch(X){F=X}e.call(ne.prototype)}}else{try{throw Error()}catch(X){F=X}(ne=e())&&typeof ne.catch=="function"&&ne.catch(function(){})}}catch(X){if(X&&F&&typeof X.stack=="string")return[X.stack,F.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 d=o.DetermineComponentFrameRoot(),b=d[0],E=d[1];if(b&&E){var T=b.split(`
49
+ `+Nt+e+xr}var gt=!1;function Oa(e,t){if(!e||gt)return"";gt=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(t){var re=function(){throw Error()};if(Object.defineProperty(re.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(re,[])}catch(X){var F=X}Reflect.construct(e,[],re)}else{try{re.call()}catch(X){F=X}e.call(re.prototype)}}else{try{throw Error()}catch(X){F=X}(re=e())&&typeof re.catch=="function"&&re.catch(function(){})}}catch(X){if(X&&F&&typeof X.stack=="string")return[X.stack,F.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 A=x.split(`
50
50
  `),q=E.split(`
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 I=`
52
- `+T[o].replace(" at new "," at ");return e.displayName&&I.includes("<anonymous>")&&(I=I.replace("<anonymous>",e.displayName)),I}while(1<=o&&0<=c);break}}}finally{pt=!1,Error.prepareStackTrace=r}return(r=e?e.displayName||e.name:"")?hn(r):""}function jo(e){switch(e.tag){case 26:case 27:case 5:return hn(e.type);case 16:return hn("Lazy");case 13:return hn("Suspense");case 19:return hn("SuspenseList");case 0:case 15:return Oa(e.type,!1);case 11:return Oa(e.type.render,!1);case 1:return Oa(e.type,!0);case 31:return hn("Activity");default:return""}}function _o(e){try{var t="";do t+=jo(e),e=e.return;while(e);return t}catch(r){return`
51
+ `);for(c=o=0;o<A.length&&!A[o].includes("DetermineComponentFrameRoot");)o++;for(;c<q.length&&!q[c].includes("DetermineComponentFrameRoot");)c++;if(o===A.length||c===q.length)for(o=A.length-1,c=q.length-1;1<=o&&0<=c&&A[o]!==q[c];)c--;for(;1<=o&&0<=c;o--,c--)if(A[o]!==q[c]){if(o!==1||c!==1)do if(o--,c--,0>c||A[o]!==q[c]){var W=`
52
+ `+A[o].replace(" at new "," at ");return e.displayName&&W.includes("<anonymous>")&&(W=W.replace("<anonymous>",e.displayName)),W}while(1<=o&&0<=c);break}}}finally{gt=!1,Error.prepareStackTrace=r}return(r=e?e.displayName||e.name:"")?pn(r):""}function Lo(e){switch(e.tag){case 26:case 27:case 5:return pn(e.type);case 16:return pn("Lazy");case 13:return pn("Suspense");case 19:return pn("SuspenseList");case 0:case 15:return Oa(e.type,!1);case 11:return Oa(e.type.render,!1);case 1:return Oa(e.type,!0);case 31:return pn("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 mn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function bh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ex(e){var t=bh(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,d=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(b){o=""+b,d.call(this,b)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return o},setValue:function(b){o=""+b},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Mo(e){e._valueTracker||(e._valueTracker=Ex(e))}function xh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),o="";return e&&(o=bh(e)?e.checked?"true":"false":e.value),e=o,e!==r?(t.setValue(e),!0):!1}function Do(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 Rx=/[\n"\\]/g;function pn(e){return e.replace(Rx,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Pu(e,t,r,o,c,d,b,E){e.name="",b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.type=b:e.removeAttribute("type"),t!=null?b==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+mn(t)):e.value!==""+mn(t)&&(e.value=""+mn(t)):b!=="submit"&&b!=="reset"||e.removeAttribute("value"),t!=null?Hu(e,b,mn(t)):r!=null?Hu(e,b,mn(r)):o!=null&&e.removeAttribute("value"),c==null&&d!=null&&(e.defaultChecked=!!d),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?e.name=""+mn(E):e.removeAttribute("name")}function Sh(e,t,r,o,c,d,b,E){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),t!=null||r!=null){if(!(d!=="submit"&&d!=="reset"||t!=null))return;r=r!=null?""+mn(r):"",t=t!=null?""+mn(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,b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(e.name=b)}function Hu(e,t,r){t==="number"&&Do(e.ownerDocument)===e||e.defaultValue===""+r||(e.defaultValue=""+r)}function Jr(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=""+mn(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 wh(e,t,r){if(t!=null&&(t=""+mn(t),t!==e.value&&(e.value=t),r==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=r!=null?""+mn(r):""}function Eh(e,t,r,o){if(t==null){if(o!=null){if(r!=null)throw Error(i(92));if(de(o)){if(1<o.length)throw Error(i(93));o=o[0]}r=o}r==null&&(r=""),t=r}r=mn(t),e.defaultValue=r,o=e.textContent,o===r&&o!==""&&o!==null&&(e.value=o)}function Ir(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Cx=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 Rh(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||Cx.has(t)?t==="float"?e.cssFloat=r:e[t]=(""+r).trim():e[t]=r+"px"}function Ch(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&&Rh(e,c,o)}else for(var d in t)t.hasOwnProperty(d)&&Rh(e,d,t[d])}function Bu(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 Ox=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"]]),Ax=/^[\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 Lo(e){return Ax.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var $u=null;function Vu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Wr=null,el=null;function Oh(e){var t=et(e);if(t&&(e=t.stateNode)){var r=e[he]||null;e:switch(e=t.stateNode,t.type){case"input":if(Pu(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="'+pn(""+t)+'"][type="radio"]'),t=0;t<r.length;t++){var o=r[t];if(o!==e&&o.form===e.form){var c=o[he]||null;if(!c)throw Error(i(90));Pu(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&&xh(o)}break e;case"textarea":wh(e,r.value,r.defaultValue);break e;case"select":t=r.value,t!=null&&Jr(e,!!r.multiple,t,!1)}}}var qu=!1;function Ah(e,t,r){if(qu)return e(t,r);qu=!0;try{var o=e(t);return o}finally{if(qu=!1,(Wr!==null||el!==null)&&(bs(),Wr&&(t=Wr,e=el,el=Wr=null,Oh(t),e)))for(t=0;t<e.length;t++)Oh(e[t])}}function oi(e,t){var r=e.stateNode;if(r===null)return null;var o=r[he]||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 na=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Yu=!1;if(na)try{var si={};Object.defineProperty(si,"passive",{get:function(){Yu=!0}}),window.addEventListener("test",si,si),window.removeEventListener("test",si,si)}catch{Yu=!1}var Aa=null,Ku=null,zo=null;function Nh(){if(zo)return zo;var e,t=Ku,r=t.length,o,c="value"in Aa?Aa.value:Aa.textContent,d=c.length;for(e=0;e<r&&t[e]===c[e];e++);var b=r-e;for(o=1;o<=b&&t[r-o]===c[d-o];o++);return zo=c.slice(e,1<o?1-o:void 0)}function ko(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 Uo(){return!0}function Th(){return!1}function Gt(e){function t(r,o,c,d,b){this._reactName=r,this._targetInst=c,this.type=o,this.nativeEvent=d,this.target=b,this.currentTarget=null;for(var E in e)e.hasOwnProperty(E)&&(r=e[E],this[E]=r?r(d):d[E]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?Uo:Th,this.isPropagationStopped=Th,this}return g(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=Uo)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Uo)},persist:function(){},isPersistent:Uo}),t}var pr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Po=Gt(pr),ui=g({},pr,{view:0,detail:0}),Nx=Gt(ui),Gu,Fu,ci,Ho=g({},ui,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Qu,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!==ci&&(ci&&e.type==="mousemove"?(Gu=e.screenX-ci.screenX,Fu=e.screenY-ci.screenY):Fu=Gu=0,ci=e),Gu)},movementY:function(e){return"movementY"in e?e.movementY:Fu}}),jh=Gt(Ho),Tx=g({},Ho,{dataTransfer:0}),jx=Gt(Tx),_x=g({},ui,{relatedTarget:0}),Xu=Gt(_x),Mx=g({},pr,{animationName:0,elapsedTime:0,pseudoElement:0}),Dx=Gt(Mx),Lx=g({},pr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),zx=Gt(Lx),kx=g({},pr,{data:0}),_h=Gt(kx),Ux={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Px={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"},Hx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Bx(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Hx[e])?!!t[e]:!1}function Qu(){return Bx}var $x=g({},ui,{key:function(e){if(e.key){var t=Ux[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ko(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Px[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Qu,charCode:function(e){return e.type==="keypress"?ko(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ko(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Vx=Gt($x),qx=g({},Ho,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Mh=Gt(qx),Yx=g({},ui,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Qu}),Kx=Gt(Yx),Gx=g({},pr,{propertyName:0,elapsedTime:0,pseudoElement:0}),Fx=Gt(Gx),Xx=g({},Ho,{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}),Qx=Gt(Xx),Zx=g({},pr,{newState:0,oldState:0}),Jx=Gt(Zx),Ix=[9,13,27,32],Zu=na&&"CompositionEvent"in window,fi=null;na&&"documentMode"in document&&(fi=document.documentMode);var Wx=na&&"TextEvent"in window&&!fi,Dh=na&&(!Zu||fi&&8<fi&&11>=fi),Lh=" ",zh=!1;function kh(e,t){switch(e){case"keyup":return Ix.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Uh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var tl=!1;function e1(e,t){switch(e){case"compositionend":return Uh(t);case"keypress":return t.which!==32?null:(zh=!0,Lh);case"textInput":return e=t.data,e===Lh&&zh?null:e;default:return null}}function t1(e,t){if(tl)return e==="compositionend"||!Zu&&kh(e,t)?(e=Nh(),zo=Ku=Aa=null,tl=!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 Dh&&t.locale!=="ko"?null:t.data;default:return null}}var n1={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 Ph(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!n1[e.type]:t==="textarea"}function Hh(e,t,r,o){Wr?el?el.push(o):el=[o]:Wr=o,t=Cs(t,"onChange"),0<t.length&&(r=new Po("onChange","change",null,r,o),e.push({event:r,listeners:t}))}var di=null,hi=null;function a1(e){bg(e,0)}function Bo(e){var t=vt(e);if(xh(t))return e}function Bh(e,t){if(e==="change")return t}var $h=!1;if(na){var Ju;if(na){var Iu="oninput"in document;if(!Iu){var Vh=document.createElement("div");Vh.setAttribute("oninput","return;"),Iu=typeof Vh.oninput=="function"}Ju=Iu}else Ju=!1;$h=Ju&&(!document.documentMode||9<document.documentMode)}function qh(){di&&(di.detachEvent("onpropertychange",Yh),hi=di=null)}function Yh(e){if(e.propertyName==="value"&&Bo(hi)){var t=[];Hh(t,hi,e,Vu(e)),Ah(a1,t)}}function r1(e,t,r){e==="focusin"?(qh(),di=t,hi=r,di.attachEvent("onpropertychange",Yh)):e==="focusout"&&qh()}function l1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Bo(hi)}function i1(e,t){if(e==="click")return Bo(t)}function o1(e,t){if(e==="input"||e==="change")return Bo(t)}function s1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Wt=typeof Object.is=="function"?Object.is:s1;function mi(e,t){if(Wt(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(!te.call(t,c)||!Wt(e[c],t[c]))return!1}return!0}function Kh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Gh(e,t){var r=Kh(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=Kh(r)}}function Fh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Fh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Xh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Do(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=Do(e.document)}return t}function Wu(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 u1=na&&"documentMode"in document&&11>=document.documentMode,nl=null,ec=null,pi=null,tc=!1;function Qh(e,t,r){var o=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;tc||nl==null||nl!==Do(o)||(o=nl,"selectionStart"in o&&Wu(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}),pi&&mi(pi,o)||(pi=o,o=Cs(ec,"onSelect"),0<o.length&&(t=new Po("onSelect","select",null,t,r),e.push({event:t,listeners:o}),t.target=nl)))}function gr(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var al={animationend:gr("Animation","AnimationEnd"),animationiteration:gr("Animation","AnimationIteration"),animationstart:gr("Animation","AnimationStart"),transitionrun:gr("Transition","TransitionRun"),transitionstart:gr("Transition","TransitionStart"),transitioncancel:gr("Transition","TransitionCancel"),transitionend:gr("Transition","TransitionEnd")},nc={},Zh={};na&&(Zh=document.createElement("div").style,"AnimationEvent"in window||(delete al.animationend.animation,delete al.animationiteration.animation,delete al.animationstart.animation),"TransitionEvent"in window||delete al.transitionend.transition);function vr(e){if(nc[e])return nc[e];if(!al[e])return e;var t=al[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in Zh)return nc[e]=t[r];return e}var Jh=vr("animationend"),Ih=vr("animationiteration"),Wh=vr("animationstart"),c1=vr("transitionrun"),f1=vr("transitionstart"),d1=vr("transitioncancel"),em=vr("transitionend"),tm=new Map,ac="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(" ");ac.push("scrollEnd");function An(e,t){tm.set(e,t),It(t,[e])}var nm=new WeakMap;function gn(e,t){if(typeof e=="object"&&e!==null){var r=nm.get(e);return r!==void 0?r:(t={value:e,source:t,stack:_o(t)},nm.set(e,t),t)}return{value:e,source:t,stack:_o(t)}}var vn=[],rl=0,rc=0;function $o(){for(var e=rl,t=rc=rl=0;t<e;){var r=vn[t];vn[t++]=null;var o=vn[t];vn[t++]=null;var c=vn[t];vn[t++]=null;var d=vn[t];if(vn[t++]=null,o!==null&&c!==null){var b=o.pending;b===null?c.next=c:(c.next=b.next,b.next=c),o.pending=c}d!==0&&am(r,c,d)}}function Vo(e,t,r,o){vn[rl++]=e,vn[rl++]=t,vn[rl++]=r,vn[rl++]=o,rc|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function lc(e,t,r,o){return Vo(e,t,r,o),qo(e)}function ll(e,t){return Vo(e,null,null,t),qo(e)}function am(e,t,r){e.lanes|=r;var o=e.alternate;o!==null&&(o.lanes|=r);for(var c=!1,d=e.return;d!==null;)d.childLanes|=r,o=d.alternate,o!==null&&(o.childLanes|=r),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(c=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,c&&t!==null&&(c=31-zt(r),e=d.hiddenUpdates,o=e[c],o===null?e[c]=[t]:o.push(t),t.lane=r|536870912),d):null}function qo(e){if(50<Bi)throw Bi=0,df=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var il={};function h1(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 en(e,t,r,o){return new h1(e,t,r,o)}function ic(e){return e=e.prototype,!(!e||!e.isReactComponent)}function aa(e,t){var r=e.alternate;return r===null?(r=en(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 rm(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 Yo(e,t,r,o,c,d){var b=0;if(o=e,typeof e=="function")ic(e)&&(b=1);else if(typeof e=="string")b=pS(e,r,W.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ae:return e=en(31,r,t,c),e.elementType=ae,e.lanes=d,e;case C:return yr(r.children,c,d,t);case R:b=8,c|=24;break;case j:return e=en(12,r,t,c|2),e.elementType=j,e.lanes=d,e;case k:return e=en(13,r,t,c),e.elementType=k,e.lanes=d,e;case A:return e=en(19,r,t,c),e.elementType=A,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case O:case z:b=10;break e;case U:b=9;break e;case H:b=11;break e;case Y:b=14;break e;case J:b=16,o=null;break e}b=29,r=Error(i(130,e===null?"null":typeof e,"")),o=null}return t=en(b,r,t,c),t.elementType=e,t.type=o,t.lanes=d,t}function yr(e,t,r,o){return e=en(7,e,o,t),e.lanes=r,e}function oc(e,t,r){return e=en(6,e,null,t),e.lanes=r,e}function sc(e,t,r){return t=en(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var ol=[],sl=0,Ko=null,Go=0,yn=[],bn=0,br=null,ra=1,la="";function xr(e,t){ol[sl++]=Go,ol[sl++]=Ko,Ko=e,Go=t}function lm(e,t,r){yn[bn++]=ra,yn[bn++]=la,yn[bn++]=br,br=e;var o=ra;e=la;var c=32-zt(o)-1;o&=~(1<<c),r+=1;var d=32-zt(t)+c;if(30<d){var b=c-c%5;d=(o&(1<<b)-1).toString(32),o>>=b,c-=b,ra=1<<32-zt(t)+c|r<<c|o,la=d+e}else ra=1<<d|r<<c|o,la=e}function uc(e){e.return!==null&&(xr(e,1),lm(e,1,0))}function cc(e){for(;e===Ko;)Ko=ol[--sl],ol[sl]=null,Go=ol[--sl],ol[sl]=null;for(;e===br;)br=yn[--bn],yn[bn]=null,la=yn[--bn],yn[bn]=null,ra=yn[--bn],yn[bn]=null}var qt=null,bt=null,We=!1,Sr=null,Un=!1,fc=Error(i(519));function wr(e){var t=Error(i(418,""));throw yi(gn(t,e)),fc}function im(e){var t=e.stateNode,r=e.type,o=e.memoizedProps;switch(t[le]=e,t[he]=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<Vi.length;r++)Qe(Vi[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),Sh(t,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0),Mo(t);break;case"select":Qe("invalid",t);break;case"textarea":Qe("invalid",t),Eh(t,o.value,o.defaultValue,o.children),Mo(t)}r=o.children,typeof r!="string"&&typeof r!="number"&&typeof r!="bigint"||t.textContent===""+r||o.suppressHydrationWarning===!0||Eg(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=Os),t=!0):t=!1,t||wr(e)}function om(e){for(qt=e.return;qt;)switch(qt.tag){case 5:case 13:Un=!1;return;case 27:case 3:Un=!0;return;default:qt=qt.return}}function gi(e){if(e!==qt)return!1;if(!We)return om(e),We=!0,!1;var t=e.tag,r;if((r=t!==3&&t!==27)&&((r=t===5)&&(r=e.type,r=!(r!=="form"&&r!=="button")||Nf(e.type,e.memoizedProps)),r=!r),r&&bt&&wr(e),om(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){bt=Tn(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++;e=e.nextSibling}bt=null}}else t===27?(t=bt,qa(e.type)?(e=Mf,Mf=null,bt=e):bt=t):bt=qt?Tn(e.stateNode.nextSibling):null;return!0}function vi(){bt=qt=null,We=!1}function sm(){var e=Sr;return e!==null&&(Qt===null?Qt=e:Qt.push.apply(Qt,e),Sr=null),e}function yi(e){Sr===null?Sr=[e]:Sr.push(e)}var dc=K(null),Er=null,ia=null;function Na(e,t,r){G(dc,t._currentValue),t._currentValue=r}function oa(e){e._currentValue=dc.current,L(dc)}function hc(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 mc(e,t,r,o){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var d=c.dependencies;if(d!==null){var b=c.child;d=d.firstContext;e:for(;d!==null;){var E=d;d=c;for(var T=0;T<t.length;T++)if(E.context===t[T]){d.lanes|=r,E=d.alternate,E!==null&&(E.lanes|=r),hc(d.return,r,e),o||(b=null);break e}d=E.next}}else if(c.tag===18){if(b=c.return,b===null)throw Error(i(341));b.lanes|=r,d=b.alternate,d!==null&&(d.lanes|=r),hc(b,r,e),b=null}else b=c.child;if(b!==null)b.return=c;else for(b=c;b!==null;){if(b===e){b=null;break}if(c=b.sibling,c!==null){c.return=b.return,b=c;break}b=b.return}c=b}}function bi(e,t,r,o){e=null;for(var c=t,d=!1;c!==null;){if(!d){if((c.flags&524288)!==0)d=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var b=c.alternate;if(b===null)throw Error(i(387));if(b=b.memoizedProps,b!==null){var E=c.type;Wt(c.pendingProps.value,b.value)||(e!==null?e.push(E):e=[E])}}else if(c===ve.current){if(b=c.alternate,b===null)throw Error(i(387));b.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(Xi):e=[Xi])}c=c.return}e!==null&&mc(t,e,r,o),t.flags|=262144}function Fo(e){for(e=e.firstContext;e!==null;){if(!Wt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Rr(e){Er=e,ia=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ht(e){return um(Er,e)}function Xo(e,t){return Er===null&&Rr(e),um(e,t)}function um(e,t){var r=t._currentValue;if(t={context:t,memoizedValue:r,next:null},ia===null){if(e===null)throw Error(i(308));ia=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ia=ia.next=t;return r}var m1=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()})}},p1=n.unstable_scheduleCallback,g1=n.unstable_NormalPriority,Nt={$$typeof:z,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function pc(){return{controller:new m1,data:new Map,refCount:0}}function xi(e){e.refCount--,e.refCount===0&&p1(g1,function(){e.controller.abort()})}var Si=null,gc=0,ul=0,cl=null;function v1(e,t){if(Si===null){var r=Si=[];gc=0,ul=bf(),cl={status:"pending",value:void 0,then:function(o){r.push(o)}}}return gc++,t.then(cm,cm),t}function cm(){if(--gc===0&&Si!==null){cl!==null&&(cl.status="fulfilled");var e=Si;Si=null,ul=0,cl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function y1(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 fm=M.S;M.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&v1(e,t),fm!==null&&fm(e,t)};var Cr=K(null);function vc(){var e=Cr.current;return e!==null?e:ut.pooledCache}function Qo(e,t){t===null?G(Cr,Cr.current):G(Cr,t.pool)}function dm(){var e=vc();return e===null?null:{parent:Nt._currentValue,pool:e}}var wi=Error(i(460)),hm=Error(i(474)),Zo=Error(i(542)),yc={then:function(){}};function mm(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Jo(){}function pm(e,t,r){switch(r=e[r],r===void 0?e.push(t):r!==t&&(t.then(Jo,Jo),t=r),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,vm(e),e;default:if(typeof t.status=="string")t.then(Jo,Jo);else{if(e=ut,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,vm(e),e}throw Ei=t,wi}}var Ei=null;function gm(){if(Ei===null)throw Error(i(459));var e=Ei;return Ei=null,e}function vm(e){if(e===wi||e===Zo)throw Error(i(483))}var Ta=!1;function bc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function xc(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 ja(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function _a(e,t,r){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(tt&2)!==0){var c=o.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),o.pending=t,t=qo(e),am(e,null,r),t}return Vo(e,o,t,r),qo(e)}function Ri(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,hr(e,r)}}function Sc(e,t){var r=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,r===o)){var c=null,d=null;if(r=r.firstBaseUpdate,r!==null){do{var b={lane:r.lane,tag:r.tag,payload:r.payload,callback:null,next:null};d===null?c=d=b:d=d.next=b,r=r.next}while(r!==null);d===null?c=d=t:d=d.next=t}else c=d=t;r={baseState:o.baseState,firstBaseUpdate:c,lastBaseUpdate:d,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 wc=!1;function Ci(){if(wc){var e=cl;if(e!==null)throw e}}function Oi(e,t,r,o){wc=!1;var c=e.updateQueue;Ta=!1;var d=c.firstBaseUpdate,b=c.lastBaseUpdate,E=c.shared.pending;if(E!==null){c.shared.pending=null;var T=E,q=T.next;T.next=null,b===null?d=q:b.next=q,b=T;var I=e.alternate;I!==null&&(I=I.updateQueue,E=I.lastBaseUpdate,E!==b&&(E===null?I.firstBaseUpdate=q:E.next=q,I.lastBaseUpdate=T))}if(d!==null){var ne=c.baseState;b=0,I=q=T=null,E=d;do{var F=E.lane&-536870913,X=F!==E.lane;if(X?(Je&F)===F:(o&F)===F){F!==0&&F===ul&&(wc=!0),I!==null&&(I=I.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var ke=e,De=E;F=t;var it=r;switch(De.tag){case 1:if(ke=De.payload,typeof ke=="function"){ne=ke.call(it,ne,F);break e}ne=ke;break e;case 3:ke.flags=ke.flags&-65537|128;case 0:if(ke=De.payload,F=typeof ke=="function"?ke.call(it,ne,F):ke,F==null)break e;ne=g({},ne,F);break e;case 2:Ta=!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},I===null?(q=I=X,T=ne):I=I.next=X,b|=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);I===null&&(T=ne),c.baseState=T,c.firstBaseUpdate=q,c.lastBaseUpdate=I,d===null&&(c.shared.lanes=0),Ha|=b,e.lanes=b,e.memoizedState=ne}}function ym(e,t){if(typeof e!="function")throw Error(i(191,e));e.call(t)}function bm(e,t){var r=e.callbacks;if(r!==null)for(e.callbacks=null,e=0;e<r.length;e++)ym(r[e],t)}var fl=K(null),Io=K(0);function xm(e,t){e=ma,G(Io,e),G(fl,t),ma=e|t.baseLanes}function Ec(){G(Io,ma),G(fl,fl.current)}function Rc(){ma=Io.current,L(fl),L(Io)}var Ma=0,qe=null,rt=null,Ot=null,Wo=!1,dl=!1,Or=!1,es=0,Ai=0,hl=null,b1=0;function wt(){throw Error(i(321))}function Cc(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Wt(e[r],t[r]))return!1;return!0}function Oc(e,t,r,o,c,d){return Ma=d,qe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,M.H=e===null||e.memoizedState===null?ap:rp,Or=!1,d=r(o,c),Or=!1,dl&&(d=wm(t,r,o,c)),Sm(e),d}function Sm(e){M.H=is;var t=rt!==null&&rt.next!==null;if(Ma=0,Ot=rt=qe=null,Wo=!1,Ai=0,hl=null,t)throw Error(i(300));e===null||_t||(e=e.dependencies,e!==null&&Fo(e)&&(_t=!0))}function wm(e,t,r,o){qe=e;var c=0;do{if(dl&&(hl=null),Ai=0,dl=!1,25<=c)throw Error(i(301));if(c+=1,Ot=rt=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}M.H=O1,d=t(r,o)}while(dl);return d}function x1(){var e=M.H,t=e.useState()[0];return t=typeof t.then=="function"?Ni(t):t,e=e.useState()[0],(rt!==null?rt.memoizedState:null)!==e&&(qe.flags|=1024),t}function Ac(){var e=es!==0;return es=0,e}function Nc(e,t,r){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r}function Tc(e){if(Wo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Wo=!1}Ma=0,Ot=rt=qe=null,dl=!1,Ai=es=0,hl=null}function Ft(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ot===null?qe.memoizedState=Ot=e:Ot=Ot.next=e,Ot}function At(){if(rt===null){var e=qe.alternate;e=e!==null?e.memoizedState:null}else e=rt.next;var t=Ot===null?qe.memoizedState:Ot.next;if(t!==null)Ot=t,rt=e;else{if(e===null)throw qe.alternate===null?Error(i(467)):Error(i(310));rt=e,e={memoizedState:rt.memoizedState,baseState:rt.baseState,baseQueue:rt.baseQueue,queue:rt.queue,next:null},Ot===null?qe.memoizedState=Ot=e:Ot=Ot.next=e}return Ot}function jc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ni(e){var t=Ai;return Ai+=1,hl===null&&(hl=[]),e=pm(hl,e,t),t=qe,(Ot===null?t.memoizedState:Ot.next)===null&&(t=t.alternate,M.H=t===null||t.memoizedState===null?ap:rp),e}function ts(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ni(e);if(e.$$typeof===z)return Ht(e)}throw Error(i(438,String(e)))}function _c(e){var t=null,r=qe.updateQueue;if(r!==null&&(t=r.memoCache),t==null){var o=qe.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=jc(),qe.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]=ie;return t.index++,r}function sa(e,t){return typeof t=="function"?t(e):t}function ns(e){var t=At();return Mc(t,rt,e)}function Mc(e,t,r){var o=e.queue;if(o===null)throw Error(i(311));o.lastRenderedReducer=r;var c=e.baseQueue,d=o.pending;if(d!==null){if(c!==null){var b=c.next;c.next=d.next,d.next=b}t.baseQueue=c=d,o.pending=null}if(d=e.baseState,c===null)e.memoizedState=d;else{t=c.next;var E=b=null,T=null,q=t,I=!1;do{var ne=q.lane&-536870913;if(ne!==q.lane?(Je&ne)===ne:(Ma&ne)===ne){var F=q.revertLane;if(F===0)T!==null&&(T=T.next={lane:0,revertLane:0,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null}),ne===ul&&(I=!0);else if((Ma&F)===F){q=q.next,F===ul&&(I=!0);continue}else ne={lane:0,revertLane:q.revertLane,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null},T===null?(E=T=ne,b=d):T=T.next=ne,qe.lanes|=F,Ha|=F;ne=q.action,Or&&r(d,ne),d=q.hasEagerState?q.eagerState:r(d,ne)}else F={lane:ne,revertLane:q.revertLane,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null},T===null?(E=T=F,b=d):T=T.next=F,qe.lanes|=ne,Ha|=ne;q=q.next}while(q!==null&&q!==t);if(T===null?b=d:T.next=E,!Wt(d,e.memoizedState)&&(_t=!0,I&&(r=cl,r!==null)))throw r;e.memoizedState=d,e.baseState=b,e.baseQueue=T,o.lastRenderedState=d}return c===null&&(o.lanes=0),[e.memoizedState,o.dispatch]}function Dc(e){var t=At(),r=t.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=e;var o=r.dispatch,c=r.pending,d=t.memoizedState;if(c!==null){r.pending=null;var b=c=c.next;do d=e(d,b.action),b=b.next;while(b!==c);Wt(d,t.memoizedState)||(_t=!0),t.memoizedState=d,t.baseQueue===null&&(t.baseState=d),r.lastRenderedState=d}return[d,o]}function Em(e,t,r){var o=qe,c=At(),d=We;if(d){if(r===void 0)throw Error(i(407));r=r()}else r=t();var b=!Wt((rt||c).memoizedState,r);b&&(c.memoizedState=r,_t=!0),c=c.queue;var E=Om.bind(null,o,c,e);if(Ti(2048,8,E,[e]),c.getSnapshot!==t||b||Ot!==null&&Ot.memoizedState.tag&1){if(o.flags|=2048,ml(9,as(),Cm.bind(null,o,c,r,t),null),ut===null)throw Error(i(349));d||(Ma&124)!==0||Rm(o,t,r)}return r}function Rm(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=qe.updateQueue,t===null?(t=jc(),qe.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function Cm(e,t,r,o){t.value=r,t.getSnapshot=o,Am(t)&&Nm(e)}function Om(e,t,r){return r(function(){Am(t)&&Nm(e)})}function Am(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Wt(e,r)}catch{return!0}}function Nm(e){var t=ll(e,2);t!==null&&ln(t,e,2)}function Lc(e){var t=Ft();if(typeof e=="function"){var r=e;if(e=r(),Or){On(!0);try{r()}finally{On(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:sa,lastRenderedState:e},t}function Tm(e,t,r,o){return e.baseState=r,Mc(e,rt,typeof o=="function"?o:sa)}function S1(e,t,r,o,c){if(ls(e))throw Error(i(485));if(e=t.action,e!==null){var d={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(b){d.listeners.push(b)}};M.T!==null?r(!0):d.isTransition=!1,o(d),r=t.pending,r===null?(d.next=t.pending=d,jm(t,d)):(d.next=r.next,t.pending=r.next=d)}}function jm(e,t){var r=t.action,o=t.payload,c=e.state;if(t.isTransition){var d=M.T,b={};M.T=b;try{var E=r(c,o),T=M.S;T!==null&&T(b,E),_m(e,t,E)}catch(q){zc(e,t,q)}finally{M.T=d}}else try{d=r(c,o),_m(e,t,d)}catch(q){zc(e,t,q)}}function _m(e,t,r){r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(function(o){Mm(e,t,o)},function(o){return zc(e,t,o)}):Mm(e,t,r)}function Mm(e,t,r){t.status="fulfilled",t.value=r,Dm(t),e.state=r,t=e.pending,t!==null&&(r=t.next,r===t?e.pending=null:(r=r.next,t.next=r,jm(e,r)))}function zc(e,t,r){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do t.status="rejected",t.reason=r,Dm(t),t=t.next;while(t!==o)}e.action=null}function Dm(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Lm(e,t){return t}function zm(e,t){if(We){var r=ut.formState;if(r!==null){e:{var o=qe;if(We){if(bt){t:{for(var c=bt,d=Un;c.nodeType!==8;){if(!d){c=null;break t}if(c=Tn(c.nextSibling),c===null){c=null;break t}}d=c.data,c=d==="F!"||d==="F"?c:null}if(c){bt=Tn(c.nextSibling),o=c.data==="F!";break e}}wr(o)}o=!1}o&&(t=r[0])}}return r=Ft(),r.memoizedState=r.baseState=t,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lm,lastRenderedState:t},r.queue=o,r=ep.bind(null,qe,o),o.dispatch=r,o=Lc(!1),d=Bc.bind(null,qe,!1,o.queue),o=Ft(),c={state:t,dispatch:null,action:e,pending:null},o.queue=c,r=S1.bind(null,qe,c,d,r),c.dispatch=r,o.memoizedState=e,[t,r,!1]}function km(e){var t=At();return Um(t,rt,e)}function Um(e,t,r){if(t=Mc(e,t,Lm)[0],e=ns(sa)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var o=Ni(t)}catch(b){throw b===wi?Zo:b}else o=t;t=At();var c=t.queue,d=c.dispatch;return r!==t.memoizedState&&(qe.flags|=2048,ml(9,as(),w1.bind(null,c,r),null)),[o,d,e]}function w1(e,t){e.action=t}function Pm(e){var t=At(),r=rt;if(r!==null)return Um(t,r,e);At(),t=t.memoizedState,r=At();var o=r.queue.dispatch;return r.memoizedState=e,[t,o,!1]}function ml(e,t,r,o){return e={tag:e,create:r,deps:o,inst:t,next:null},t=qe.updateQueue,t===null&&(t=jc(),qe.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 as(){return{destroy:void 0,resource:void 0}}function Hm(){return At().memoizedState}function rs(e,t,r,o){var c=Ft();o=o===void 0?null:o,qe.flags|=e,c.memoizedState=ml(1|t,as(),r,o)}function Ti(e,t,r,o){var c=At();o=o===void 0?null:o;var d=c.memoizedState.inst;rt!==null&&o!==null&&Cc(o,rt.memoizedState.deps)?c.memoizedState=ml(t,d,r,o):(qe.flags|=e,c.memoizedState=ml(1|t,d,r,o))}function Bm(e,t){rs(8390656,8,e,t)}function $m(e,t){Ti(2048,8,e,t)}function Vm(e,t){return Ti(4,2,e,t)}function qm(e,t){return Ti(4,4,e,t)}function Ym(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 Km(e,t,r){r=r!=null?r.concat([e]):null,Ti(4,4,Ym.bind(null,t,e),r)}function kc(){}function Gm(e,t){var r=At();t=t===void 0?null:t;var o=r.memoizedState;return t!==null&&Cc(t,o[1])?o[0]:(r.memoizedState=[e,t],e)}function Fm(e,t){var r=At();t=t===void 0?null:t;var o=r.memoizedState;if(t!==null&&Cc(t,o[1]))return o[0];if(o=e(),Or){On(!0);try{e()}finally{On(!1)}}return r.memoizedState=[o,t],o}function Uc(e,t,r){return r===void 0||(Ma&1073741824)!==0?e.memoizedState=t:(e.memoizedState=r,e=Zp(),qe.lanes|=e,Ha|=e,r)}function Xm(e,t,r,o){return Wt(r,t)?r:fl.current!==null?(e=Uc(e,r,o),Wt(e,t)||(_t=!0),e):(Ma&42)===0?(_t=!0,e.memoizedState=r):(e=Zp(),qe.lanes|=e,Ha|=e,t)}function Qm(e,t,r,o,c){var d=Z.p;Z.p=d!==0&&8>d?d:8;var b=M.T,E={};M.T=E,Bc(e,!1,t,r);try{var T=c(),q=M.S;if(q!==null&&q(E,T),T!==null&&typeof T=="object"&&typeof T.then=="function"){var I=y1(T,o);ji(e,t,I,rn(e))}else ji(e,t,o,rn(e))}catch(ne){ji(e,t,{then:function(){},status:"rejected",reason:ne},rn())}finally{Z.p=d,M.T=b}}function E1(){}function Pc(e,t,r,o){if(e.tag!==5)throw Error(i(476));var c=Zm(e).queue;Qm(e,c,t,$,r===null?E1:function(){return Jm(e),r(o)})}function Zm(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:$,baseState:$,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:sa,lastRenderedState:$},next:null};var r={};return t.next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:sa,lastRenderedState:r},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Jm(e){var t=Zm(e).next.queue;ji(e,t,{},rn())}function Hc(){return Ht(Xi)}function Im(){return At().memoizedState}function Wm(){return At().memoizedState}function R1(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var r=rn();e=ja(r);var o=_a(t,e,r);o!==null&&(ln(o,t,r),Ri(o,t,r)),t={cache:pc()},e.payload=t;return}t=t.return}}function C1(e,t,r){var o=rn();r={lane:o,revertLane:0,action:r,hasEagerState:!1,eagerState:null,next:null},ls(e)?tp(t,r):(r=lc(e,t,r,o),r!==null&&(ln(r,e,o),np(r,t,o)))}function ep(e,t,r){var o=rn();ji(e,t,r,o)}function ji(e,t,r,o){var c={lane:o,revertLane:0,action:r,hasEagerState:!1,eagerState:null,next:null};if(ls(e))tp(t,c);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var b=t.lastRenderedState,E=d(b,r);if(c.hasEagerState=!0,c.eagerState=E,Wt(E,b))return Vo(e,t,c,0),ut===null&&$o(),!1}catch{}finally{}if(r=lc(e,t,c,o),r!==null)return ln(r,e,o),np(r,t,o),!0}return!1}function Bc(e,t,r,o){if(o={lane:2,revertLane:bf(),action:o,hasEagerState:!1,eagerState:null,next:null},ls(e)){if(t)throw Error(i(479))}else t=lc(e,r,o,2),t!==null&&ln(t,e,2)}function ls(e){var t=e.alternate;return e===qe||t!==null&&t===qe}function tp(e,t){dl=Wo=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function np(e,t,r){if((r&4194048)!==0){var o=t.lanes;o&=e.pendingLanes,r|=o,t.lanes=r,hr(e,r)}}var is={readContext:Ht,use:ts,useCallback:wt,useContext:wt,useEffect:wt,useImperativeHandle:wt,useLayoutEffect:wt,useInsertionEffect:wt,useMemo:wt,useReducer:wt,useRef:wt,useState:wt,useDebugValue:wt,useDeferredValue:wt,useTransition:wt,useSyncExternalStore:wt,useId:wt,useHostTransitionStatus:wt,useFormState:wt,useActionState:wt,useOptimistic:wt,useMemoCache:wt,useCacheRefresh:wt},ap={readContext:Ht,use:ts,useCallback:function(e,t){return Ft().memoizedState=[e,t===void 0?null:t],e},useContext:Ht,useEffect:Bm,useImperativeHandle:function(e,t,r){r=r!=null?r.concat([e]):null,rs(4194308,4,Ym.bind(null,t,e),r)},useLayoutEffect:function(e,t){return rs(4194308,4,e,t)},useInsertionEffect:function(e,t){rs(4,2,e,t)},useMemo:function(e,t){var r=Ft();t=t===void 0?null:t;var o=e();if(Or){On(!0);try{e()}finally{On(!1)}}return r.memoizedState=[o,t],o},useReducer:function(e,t,r){var o=Ft();if(r!==void 0){var c=r(t);if(Or){On(!0);try{r(t)}finally{On(!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=C1.bind(null,qe,e),[o.memoizedState,e]},useRef:function(e){var t=Ft();return e={current:e},t.memoizedState=e},useState:function(e){e=Lc(e);var t=e.queue,r=ep.bind(null,qe,t);return t.dispatch=r,[e.memoizedState,r]},useDebugValue:kc,useDeferredValue:function(e,t){var r=Ft();return Uc(r,e,t)},useTransition:function(){var e=Lc(!1);return e=Qm.bind(null,qe,e.queue,!0,!1),Ft().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,r){var o=qe,c=Ft();if(We){if(r===void 0)throw Error(i(407));r=r()}else{if(r=t(),ut===null)throw Error(i(349));(Je&124)!==0||Rm(o,t,r)}c.memoizedState=r;var d={value:r,getSnapshot:t};return c.queue=d,Bm(Om.bind(null,o,d,e),[e]),o.flags|=2048,ml(9,as(),Cm.bind(null,o,d,r,t),null),r},useId:function(){var e=Ft(),t=ut.identifierPrefix;if(We){var r=la,o=ra;r=(o&~(1<<32-zt(o)-1)).toString(32)+r,t="«"+t+"R"+r,r=es++,0<r&&(t+="H"+r.toString(32)),t+="»"}else r=b1++,t="«"+t+"r"+r.toString(32)+"»";return e.memoizedState=t},useHostTransitionStatus:Hc,useFormState:zm,useActionState:zm,useOptimistic:function(e){var t=Ft();t.memoizedState=t.baseState=e;var r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=r,t=Bc.bind(null,qe,!0,r),r.dispatch=t,[e,t]},useMemoCache:_c,useCacheRefresh:function(){return Ft().memoizedState=R1.bind(null,qe)}},rp={readContext:Ht,use:ts,useCallback:Gm,useContext:Ht,useEffect:$m,useImperativeHandle:Km,useInsertionEffect:Vm,useLayoutEffect:qm,useMemo:Fm,useReducer:ns,useRef:Hm,useState:function(){return ns(sa)},useDebugValue:kc,useDeferredValue:function(e,t){var r=At();return Xm(r,rt.memoizedState,e,t)},useTransition:function(){var e=ns(sa)[0],t=At().memoizedState;return[typeof e=="boolean"?e:Ni(e),t]},useSyncExternalStore:Em,useId:Im,useHostTransitionStatus:Hc,useFormState:km,useActionState:km,useOptimistic:function(e,t){var r=At();return Tm(r,rt,e,t)},useMemoCache:_c,useCacheRefresh:Wm},O1={readContext:Ht,use:ts,useCallback:Gm,useContext:Ht,useEffect:$m,useImperativeHandle:Km,useInsertionEffect:Vm,useLayoutEffect:qm,useMemo:Fm,useReducer:Dc,useRef:Hm,useState:function(){return Dc(sa)},useDebugValue:kc,useDeferredValue:function(e,t){var r=At();return rt===null?Uc(r,e,t):Xm(r,rt.memoizedState,e,t)},useTransition:function(){var e=Dc(sa)[0],t=At().memoizedState;return[typeof e=="boolean"?e:Ni(e),t]},useSyncExternalStore:Em,useId:Im,useHostTransitionStatus:Hc,useFormState:Pm,useActionState:Pm,useOptimistic:function(e,t){var r=At();return rt!==null?Tm(r,rt,e,t):(r.baseState=e,[e,r.queue.dispatch])},useMemoCache:_c,useCacheRefresh:Wm},pl=null,_i=0;function os(e){var t=_i;return _i+=1,pl===null&&(pl=[]),pm(pl,e,t)}function Mi(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ss(e,t){throw t.$$typeof===x?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function lp(e){var t=e._init;return t(e._payload)}function ip(e){function t(P,D){if(e){var V=P.deletions;V===null?(P.deletions=[D],P.flags|=16):V.push(D)}}function r(P,D){if(!e)return null;for(;D!==null;)t(P,D),D=D.sibling;return null}function o(P){for(var D=new Map;P!==null;)P.key!==null?D.set(P.key,P):D.set(P.index,P),P=P.sibling;return D}function c(P,D){return P=aa(P,D),P.index=0,P.sibling=null,P}function d(P,D,V){return P.index=V,e?(V=P.alternate,V!==null?(V=V.index,V<D?(P.flags|=67108866,D):V):(P.flags|=67108866,D)):(P.flags|=1048576,D)}function b(P){return e&&P.alternate===null&&(P.flags|=67108866),P}function E(P,D,V,ee){return D===null||D.tag!==6?(D=oc(V,P.mode,ee),D.return=P,D):(D=c(D,V),D.return=P,D)}function T(P,D,V,ee){var ye=V.type;return ye===C?I(P,D,V.props.children,ee,V.key):D!==null&&(D.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===J&&lp(ye)===D.type)?(D=c(D,V.props),Mi(D,V),D.return=P,D):(D=Yo(V.type,V.key,V.props,null,P.mode,ee),Mi(D,V),D.return=P,D)}function q(P,D,V,ee){return D===null||D.tag!==4||D.stateNode.containerInfo!==V.containerInfo||D.stateNode.implementation!==V.implementation?(D=sc(V,P.mode,ee),D.return=P,D):(D=c(D,V.children||[]),D.return=P,D)}function I(P,D,V,ee,ye){return D===null||D.tag!==7?(D=yr(V,P.mode,ee,ye),D.return=P,D):(D=c(D,V),D.return=P,D)}function ne(P,D,V){if(typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint")return D=oc(""+D,P.mode,V),D.return=P,D;if(typeof D=="object"&&D!==null){switch(D.$$typeof){case S:return V=Yo(D.type,D.key,D.props,null,P.mode,V),Mi(V,D),V.return=P,V;case w:return D=sc(D,P.mode,V),D.return=P,D;case J:var ee=D._init;return D=ee(D._payload),ne(P,D,V)}if(de(D)||me(D))return D=yr(D,P.mode,V,null),D.return=P,D;if(typeof D.then=="function")return ne(P,os(D),V);if(D.$$typeof===z)return ne(P,Xo(P,D),V);ss(P,D)}return null}function F(P,D,V,ee){var ye=D!==null?D.key:null;if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return ye!==null?null:E(P,D,""+V,ee);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case S:return V.key===ye?T(P,D,V,ee):null;case w:return V.key===ye?q(P,D,V,ee):null;case J:return ye=V._init,V=ye(V._payload),F(P,D,V,ee)}if(de(V)||me(V))return ye!==null?null:I(P,D,V,ee,null);if(typeof V.then=="function")return F(P,D,os(V),ee);if(V.$$typeof===z)return F(P,D,Xo(P,V),ee);ss(P,V)}return null}function X(P,D,V,ee,ye){if(typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint")return P=P.get(V)||null,E(D,P,""+ee,ye);if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case S:return P=P.get(ee.key===null?V:ee.key)||null,T(D,P,ee,ye);case w:return P=P.get(ee.key===null?V:ee.key)||null,q(D,P,ee,ye);case J:var Ge=ee._init;return ee=Ge(ee._payload),X(P,D,V,ee,ye)}if(de(ee)||me(ee))return P=P.get(V)||null,I(D,P,ee,ye,null);if(typeof ee.then=="function")return X(P,D,V,os(ee),ye);if(ee.$$typeof===z)return X(P,D,V,Xo(D,ee),ye);ss(D,ee)}return null}function ke(P,D,V,ee){for(var ye=null,Ge=null,Ae=D,Le=D=0,Dt=null;Ae!==null&&Le<V.length;Le++){Ae.index>Le?(Dt=Ae,Ae=null):Dt=Ae.sibling;var Ie=F(P,Ae,V[Le],ee);if(Ie===null){Ae===null&&(Ae=Dt);break}e&&Ae&&Ie.alternate===null&&t(P,Ae),D=d(Ie,D,Le),Ge===null?ye=Ie:Ge.sibling=Ie,Ge=Ie,Ae=Dt}if(Le===V.length)return r(P,Ae),We&&xr(P,Le),ye;if(Ae===null){for(;Le<V.length;Le++)Ae=ne(P,V[Le],ee),Ae!==null&&(D=d(Ae,D,Le),Ge===null?ye=Ae:Ge.sibling=Ae,Ge=Ae);return We&&xr(P,Le),ye}for(Ae=o(Ae);Le<V.length;Le++)Dt=X(Ae,P,Le,V[Le],ee),Dt!==null&&(e&&Dt.alternate!==null&&Ae.delete(Dt.key===null?Le:Dt.key),D=d(Dt,D,Le),Ge===null?ye=Dt:Ge.sibling=Dt,Ge=Dt);return e&&Ae.forEach(function(Xa){return t(P,Xa)}),We&&xr(P,Le),ye}function De(P,D,V,ee){if(V==null)throw Error(i(151));for(var ye=null,Ge=null,Ae=D,Le=D=0,Dt=null,Ie=V.next();Ae!==null&&!Ie.done;Le++,Ie=V.next()){Ae.index>Le?(Dt=Ae,Ae=null):Dt=Ae.sibling;var Xa=F(P,Ae,Ie.value,ee);if(Xa===null){Ae===null&&(Ae=Dt);break}e&&Ae&&Xa.alternate===null&&t(P,Ae),D=d(Xa,D,Le),Ge===null?ye=Xa:Ge.sibling=Xa,Ge=Xa,Ae=Dt}if(Ie.done)return r(P,Ae),We&&xr(P,Le),ye;if(Ae===null){for(;!Ie.done;Le++,Ie=V.next())Ie=ne(P,Ie.value,ee),Ie!==null&&(D=d(Ie,D,Le),Ge===null?ye=Ie:Ge.sibling=Ie,Ge=Ie);return We&&xr(P,Le),ye}for(Ae=o(Ae);!Ie.done;Le++,Ie=V.next())Ie=X(Ae,P,Le,Ie.value,ee),Ie!==null&&(e&&Ie.alternate!==null&&Ae.delete(Ie.key===null?Le:Ie.key),D=d(Ie,D,Le),Ge===null?ye=Ie:Ge.sibling=Ie,Ge=Ie);return e&&Ae.forEach(function(AS){return t(P,AS)}),We&&xr(P,Le),ye}function it(P,D,V,ee){if(typeof V=="object"&&V!==null&&V.type===C&&V.key===null&&(V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case S:e:{for(var ye=V.key;D!==null;){if(D.key===ye){if(ye=V.type,ye===C){if(D.tag===7){r(P,D.sibling),ee=c(D,V.props.children),ee.return=P,P=ee;break e}}else if(D.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===J&&lp(ye)===D.type){r(P,D.sibling),ee=c(D,V.props),Mi(ee,V),ee.return=P,P=ee;break e}r(P,D);break}else t(P,D);D=D.sibling}V.type===C?(ee=yr(V.props.children,P.mode,ee,V.key),ee.return=P,P=ee):(ee=Yo(V.type,V.key,V.props,null,P.mode,ee),Mi(ee,V),ee.return=P,P=ee)}return b(P);case w:e:{for(ye=V.key;D!==null;){if(D.key===ye)if(D.tag===4&&D.stateNode.containerInfo===V.containerInfo&&D.stateNode.implementation===V.implementation){r(P,D.sibling),ee=c(D,V.children||[]),ee.return=P,P=ee;break e}else{r(P,D);break}else t(P,D);D=D.sibling}ee=sc(V,P.mode,ee),ee.return=P,P=ee}return b(P);case J:return ye=V._init,V=ye(V._payload),it(P,D,V,ee)}if(de(V))return ke(P,D,V,ee);if(me(V)){if(ye=me(V),typeof ye!="function")throw Error(i(150));return V=ye.call(V),De(P,D,V,ee)}if(typeof V.then=="function")return it(P,D,os(V),ee);if(V.$$typeof===z)return it(P,D,Xo(P,V),ee);ss(P,V)}return typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint"?(V=""+V,D!==null&&D.tag===6?(r(P,D.sibling),ee=c(D,V),ee.return=P,P=ee):(r(P,D),ee=oc(V,P.mode,ee),ee.return=P,P=ee),b(P)):r(P,D)}return function(P,D,V,ee){try{_i=0;var ye=it(P,D,V,ee);return pl=null,ye}catch(Ae){if(Ae===wi||Ae===Zo)throw Ae;var Ge=en(29,Ae,null,P.mode);return Ge.lanes=ee,Ge.return=P,Ge}finally{}}}var gl=ip(!0),op=ip(!1),xn=K(null),Pn=null;function Da(e){var t=e.alternate;G(Tt,Tt.current&1),G(xn,e),Pn===null&&(t===null||fl.current!==null||t.memoizedState!==null)&&(Pn=e)}function sp(e){if(e.tag===22){if(G(Tt,Tt.current),G(xn,e),Pn===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(Pn=e)}}else La()}function La(){G(Tt,Tt.current),G(xn,xn.current)}function ua(e){L(xn),Pn===e&&(Pn=null),L(Tt)}var Tt=K(0);function us(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==="$?"||_f(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 $c(e,t,r,o){t=e.memoizedState,r=r(o,t),r=r==null?t:g({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Vc={enqueueSetState:function(e,t,r){e=e._reactInternals;var o=rn(),c=ja(o);c.payload=t,r!=null&&(c.callback=r),t=_a(e,c,o),t!==null&&(ln(t,e,o),Ri(t,e,o))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var o=rn(),c=ja(o);c.tag=1,c.payload=t,r!=null&&(c.callback=r),t=_a(e,c,o),t!==null&&(ln(t,e,o),Ri(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=rn(),o=ja(r);o.tag=2,t!=null&&(o.callback=t),t=_a(e,o,r),t!==null&&(ln(t,e,r),Ri(t,e,r))}};function up(e,t,r,o,c,d,b){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,d,b):t.prototype&&t.prototype.isPureReactComponent?!mi(r,o)||!mi(c,d):!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&&Vc.enqueueReplaceState(t,t.state,null)}function Ar(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=g({},r));for(var c in e)r[c]===void 0&&(r[c]=e[c])}return r}var cs=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 fp(e){cs(e)}function dp(e){console.error(e)}function hp(e){cs(e)}function fs(e,t){try{var r=e.onUncaughtError;r(t.value,{componentStack:t.stack})}catch(o){setTimeout(function(){throw o})}}function mp(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 qc(e,t,r){return r=ja(r),r.tag=3,r.payload={element:null},r.callback=function(){fs(e,t)},r}function pp(e){return e=ja(e),e.tag=3,e}function gp(e,t,r,o){var c=r.type.getDerivedStateFromError;if(typeof c=="function"){var d=o.value;e.payload=function(){return c(d)},e.callback=function(){mp(t,r,o)}}var b=r.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(e.callback=function(){mp(t,r,o),typeof c!="function"&&(Ba===null?Ba=new Set([this]):Ba.add(this));var E=o.stack;this.componentDidCatch(o.value,{componentStack:E!==null?E:""})})}function A1(e,t,r,o,c){if(r.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(t=r.alternate,t!==null&&bi(t,r,c,!0),r=xn.current,r!==null){switch(r.tag){case 13:return Pn===null?mf():r.alternate===null&&xt===0&&(xt=3),r.flags&=-257,r.flags|=65536,r.lanes=c,o===yc?r.flags|=16384:(t=r.updateQueue,t===null?r.updateQueue=new Set([o]):t.add(o),gf(e,o,c)),!1;case 22:return r.flags|=65536,o===yc?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)),gf(e,o,c)),!1}throw Error(i(435,r.tag))}return gf(e,o,c),mf(),!1}if(We)return t=xn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,o!==fc&&(e=Error(i(422),{cause:o}),yi(gn(e,r)))):(o!==fc&&(t=Error(i(423),{cause:o}),yi(gn(t,r))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,o=gn(o,r),c=qc(e.stateNode,o,c),Sc(e,c),xt!==4&&(xt=2)),!1;var d=Error(i(520),{cause:o});if(d=gn(d,r),Hi===null?Hi=[d]:Hi.push(d),xt!==4&&(xt=2),t===null)return!0;o=gn(o,r),r=t;do{switch(r.tag){case 3:return r.flags|=65536,e=c&-c,r.lanes|=e,e=qc(r.stateNode,o,e),Sc(r,e),!1;case 1:if(t=r.type,d=r.stateNode,(r.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(Ba===null||!Ba.has(d))))return r.flags|=65536,c&=-c,r.lanes|=c,c=pp(c),gp(c,e,r,o),Sc(r,c),!1}r=r.return}while(r!==null);return!1}var vp=Error(i(461)),_t=!1;function kt(e,t,r,o){t.child=e===null?op(t,null,r,o):gl(t,e.child,r,o)}function yp(e,t,r,o,c){r=r.render;var d=t.ref;if("ref"in o){var b={};for(var E in o)E!=="ref"&&(b[E]=o[E])}else b=o;return Rr(t),o=Oc(e,t,r,b,d,c),E=Ac(),e!==null&&!_t?(Nc(e,t,c),ca(e,t,c)):(We&&E&&uc(t),t.flags|=1,kt(e,t,o,c),t.child)}function bp(e,t,r,o,c){if(e===null){var d=r.type;return typeof d=="function"&&!ic(d)&&d.defaultProps===void 0&&r.compare===null?(t.tag=15,t.type=d,xp(e,t,d,o,c)):(e=Yo(r.type,null,o,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(d=e.child,!Jc(e,c)){var b=d.memoizedProps;if(r=r.compare,r=r!==null?r:mi,r(b,o)&&e.ref===t.ref)return ca(e,t,c)}return t.flags|=1,e=aa(d,o),e.ref=t.ref,e.return=t,t.child=e}function xp(e,t,r,o,c){if(e!==null){var d=e.memoizedProps;if(mi(d,o)&&e.ref===t.ref)if(_t=!1,t.pendingProps=o=d,Jc(e,c))(e.flags&131072)!==0&&(_t=!0);else return t.lanes=e.lanes,ca(e,t,c)}return Yc(e,t,r,o,c)}function Sp(e,t,r){var o=t.pendingProps,c=o.children,d=e!==null?e.memoizedState:null;if(o.mode==="hidden"){if((t.flags&128)!==0){if(o=d!==null?d.baseLanes|r:r,e!==null){for(c=t.child=e.child,d=0;c!==null;)d=d|c.lanes|c.childLanes,c=c.sibling;t.childLanes=d&~o}else t.childLanes=0,t.child=null;return wp(e,t,o,r)}if((r&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Qo(t,d!==null?d.cachePool:null),d!==null?xm(t,d):Ec(),sp(t);else return t.lanes=t.childLanes=536870912,wp(e,t,d!==null?d.baseLanes|r:r,r)}else d!==null?(Qo(t,d.cachePool),xm(t,d),La(),t.memoizedState=null):(e!==null&&Qo(t,null),Ec(),La());return kt(e,t,c,r),t.child}function wp(e,t,r,o){var c=vc();return c=c===null?null:{parent:Nt._currentValue,pool:c},t.memoizedState={baseLanes:r,cachePool:c},e!==null&&Qo(t,null),Ec(),sp(t),e!==null&&bi(e,t,o,!0),null}function ds(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 Yc(e,t,r,o,c){return Rr(t),r=Oc(e,t,r,o,void 0,c),o=Ac(),e!==null&&!_t?(Nc(e,t,c),ca(e,t,c)):(We&&o&&uc(t),t.flags|=1,kt(e,t,r,c),t.child)}function Ep(e,t,r,o,c,d){return Rr(t),t.updateQueue=null,r=wm(t,o,r,c),Sm(e),o=Ac(),e!==null&&!_t?(Nc(e,t,d),ca(e,t,d)):(We&&o&&uc(t),t.flags|=1,kt(e,t,r,d),t.child)}function Rp(e,t,r,o,c){if(Rr(t),t.stateNode===null){var d=il,b=r.contextType;typeof b=="object"&&b!==null&&(d=Ht(b)),d=new r(o,d),t.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=Vc,t.stateNode=d,d._reactInternals=t,d=t.stateNode,d.props=o,d.state=t.memoizedState,d.refs={},bc(t),b=r.contextType,d.context=typeof b=="object"&&b!==null?Ht(b):il,d.state=t.memoizedState,b=r.getDerivedStateFromProps,typeof b=="function"&&($c(t,r,b,o),d.state=t.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(b=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),b!==d.state&&Vc.enqueueReplaceState(d,d.state,null),Oi(t,o,d,c),Ci(),d.state=t.memoizedState),typeof d.componentDidMount=="function"&&(t.flags|=4194308),o=!0}else if(e===null){d=t.stateNode;var E=t.memoizedProps,T=Ar(r,E);d.props=T;var q=d.context,I=r.contextType;b=il,typeof I=="object"&&I!==null&&(b=Ht(I));var ne=r.getDerivedStateFromProps;I=typeof ne=="function"||typeof d.getSnapshotBeforeUpdate=="function",E=t.pendingProps!==E,I||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(E||q!==b)&&cp(t,d,o,b),Ta=!1;var F=t.memoizedState;d.state=F,Oi(t,o,d,c),Ci(),q=t.memoizedState,E||F!==q||Ta?(typeof ne=="function"&&($c(t,r,ne,o),q=t.memoizedState),(T=Ta||up(t,r,T,o,F,q,b))?(I||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(t.flags|=4194308)):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=o,t.memoizedState=q),d.props=o,d.state=q,d.context=b,o=T):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),o=!1)}else{d=t.stateNode,xc(e,t),b=t.memoizedProps,I=Ar(r,b),d.props=I,ne=t.pendingProps,F=d.context,q=r.contextType,T=il,typeof q=="object"&&q!==null&&(T=Ht(q)),E=r.getDerivedStateFromProps,(q=typeof E=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(b!==ne||F!==T)&&cp(t,d,o,T),Ta=!1,F=t.memoizedState,d.state=F,Oi(t,o,d,c),Ci();var X=t.memoizedState;b!==ne||F!==X||Ta||e!==null&&e.dependencies!==null&&Fo(e.dependencies)?(typeof E=="function"&&($c(t,r,E,o),X=t.memoizedState),(I=Ta||up(t,r,I,o,F,X,T)||e!==null&&e.dependencies!==null&&Fo(e.dependencies))?(q||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(o,X,T),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(o,X,T)),typeof d.componentDidUpdate=="function"&&(t.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof d.componentDidUpdate!="function"||b===e.memoizedProps&&F===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&F===e.memoizedState||(t.flags|=1024),t.memoizedProps=o,t.memoizedState=X),d.props=o,d.state=X,d.context=T,o=I):(typeof d.componentDidUpdate!="function"||b===e.memoizedProps&&F===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&F===e.memoizedState||(t.flags|=1024),o=!1)}return d=o,ds(e,t),o=(t.flags&128)!==0,d||o?(d=t.stateNode,r=o&&typeof r.getDerivedStateFromError!="function"?null:d.render(),t.flags|=1,e!==null&&o?(t.child=gl(t,e.child,null,c),t.child=gl(t,null,r,c)):kt(e,t,r,c),t.memoizedState=d.state,e=t.child):e=ca(e,t,c),e}function Cp(e,t,r,o){return vi(),t.flags|=256,kt(e,t,r,o),t.child}var Kc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Gc(e){return{baseLanes:e,cachePool:dm()}}function Fc(e,t,r){return e=e!==null?e.childLanes&~r:0,t&&(e|=Sn),e}function Op(e,t,r){var o=t.pendingProps,c=!1,d=(t.flags&128)!==0,b;if((b=d)||(b=e!==null&&e.memoizedState===null?!1:(Tt.current&2)!==0),b&&(c=!0,t.flags&=-129),b=(t.flags&32)!==0,t.flags&=-33,e===null){if(We){if(c?Da(t):La(),We){var E=bt,T;if(T=E){e:{for(T=E,E=Un;T.nodeType!==8;){if(!E){E=null;break e}if(T=Tn(T.nextSibling),T===null){E=null;break e}}E=T}E!==null?(t.memoizedState={dehydrated:E,treeContext:br!==null?{id:ra,overflow:la}:null,retryLane:536870912,hydrationErrors:null},T=en(18,null,null,0),T.stateNode=E,T.return=t,t.child=T,qt=t,bt=null,T=!0):T=!1}T||wr(t)}if(E=t.memoizedState,E!==null&&(E=E.dehydrated,E!==null))return _f(E)?t.lanes=32:t.lanes=536870912,null;ua(t)}return E=o.children,o=o.fallback,c?(La(),c=t.mode,E=hs({mode:"hidden",children:E},c),o=yr(o,c,r,null),E.return=t,o.return=t,E.sibling=o,t.child=E,c=t.child,c.memoizedState=Gc(r),c.childLanes=Fc(e,b,r),t.memoizedState=Kc,o):(Da(t),Xc(t,E))}if(T=e.memoizedState,T!==null&&(E=T.dehydrated,E!==null)){if(d)t.flags&256?(Da(t),t.flags&=-257,t=Qc(e,t,r)):t.memoizedState!==null?(La(),t.child=e.child,t.flags|=128,t=null):(La(),c=o.fallback,E=t.mode,o=hs({mode:"visible",children:o.children},E),c=yr(c,E,r,null),c.flags|=2,o.return=t,c.return=t,o.sibling=c,t.child=o,gl(t,e.child,null,r),o=t.child,o.memoizedState=Gc(r),o.childLanes=Fc(e,b,r),t.memoizedState=Kc,t=c);else if(Da(t),_f(E)){if(b=E.nextSibling&&E.nextSibling.dataset,b)var q=b.dgst;b=q,o=Error(i(419)),o.stack="",o.digest=b,yi({value:o,source:null,stack:null}),t=Qc(e,t,r)}else if(_t||bi(e,t,r,!1),b=(r&e.childLanes)!==0,_t||b){if(b=ut,b!==null&&(o=r&-r,o=(o&42)!==0?1:li(o),o=(o&(b.suspendedLanes|r))!==0?0:o,o!==0&&o!==T.retryLane))throw T.retryLane=o,ll(e,o),ln(b,e,o),vp;E.data==="$?"||mf(),t=Qc(e,t,r)}else E.data==="$?"?(t.flags|=192,t.child=e.child,t=null):(e=T.treeContext,bt=Tn(E.nextSibling),qt=t,We=!0,Sr=null,Un=!1,e!==null&&(yn[bn++]=ra,yn[bn++]=la,yn[bn++]=br,ra=e.id,la=e.overflow,br=t),t=Xc(t,o.children),t.flags|=4096);return t}return c?(La(),c=o.fallback,E=t.mode,T=e.child,q=T.sibling,o=aa(T,{mode:"hidden",children:o.children}),o.subtreeFlags=T.subtreeFlags&65011712,q!==null?c=aa(q,c):(c=yr(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=Gc(r):(T=E.cachePool,T!==null?(q=Nt._currentValue,T=T.parent!==q?{parent:q,pool:q}:T):T=dm(),E={baseLanes:E.baseLanes|r,cachePool:T}),c.memoizedState=E,c.childLanes=Fc(e,b,r),t.memoizedState=Kc,o):(Da(t),r=e.child,e=r.sibling,r=aa(r,{mode:"visible",children:o.children}),r.return=t,r.sibling=null,e!==null&&(b=t.deletions,b===null?(t.deletions=[e],t.flags|=16):b.push(e)),t.child=r,t.memoizedState=null,r)}function Xc(e,t){return t=hs({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function hs(e,t){return e=en(22,e,null,t),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function Qc(e,t,r){return gl(t,e.child,null,r),e=Xc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ap(e,t,r){e.lanes|=t;var o=e.alternate;o!==null&&(o.lanes|=t),hc(e.return,t,r)}function Zc(e,t,r,o,c){var d=e.memoizedState;d===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:o,tail:r,tailMode:c}:(d.isBackwards=t,d.rendering=null,d.renderingStartTime=0,d.last=o,d.tail=r,d.tailMode=c)}function Np(e,t,r){var o=t.pendingProps,c=o.revealOrder,d=o.tail;if(kt(e,t,o.children,r),o=Tt.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&&Ap(e,r,t);else if(e.tag===19)Ap(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(Tt,o),c){case"forwards":for(r=t.child,c=null;r!==null;)e=r.alternate,e!==null&&us(e)===null&&(c=r),r=r.sibling;r=c,r===null?(c=t.child,t.child=null):(c=r.sibling,r.sibling=null),Zc(t,!1,c,r,d);break;case"backwards":for(r=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&us(e)===null){t.child=c;break}e=c.sibling,c.sibling=r,r=c,c=e}Zc(t,!0,r,null,d);break;case"together":Zc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ca(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Ha|=t.lanes,(r&t.childLanes)===0)if(e!==null){if(bi(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=aa(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=aa(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function Jc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Fo(e)))}function N1(e,t,r){switch(t.tag){case 3:ze(t,t.stateNode.containerInfo),Na(t,Nt,e.memoizedState.cache),vi();break;case 27:case 5:je(t);break;case 4:ze(t,t.stateNode.containerInfo);break;case 10:Na(t,t.type,t.memoizedProps.value);break;case 13:var o=t.memoizedState;if(o!==null)return o.dehydrated!==null?(Da(t),t.flags|=128,null):(r&t.child.childLanes)!==0?Op(e,t,r):(Da(t),e=ca(e,t,r),e!==null?e.sibling:null);Da(t);break;case 19:var c=(e.flags&128)!==0;if(o=(r&t.childLanes)!==0,o||(bi(e,t,r,!1),o=(r&t.childLanes)!==0),c){if(o)return Np(e,t,r);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),G(Tt,Tt.current),o)break;return null;case 22:case 23:return t.lanes=0,Sp(e,t,r);case 24:Na(t,Nt,e.memoizedState.cache)}return ca(e,t,r)}function Tp(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps)_t=!0;else{if(!Jc(e,r)&&(t.flags&128)===0)return _t=!1,N1(e,t,r);_t=(e.flags&131072)!==0}else _t=!1,We&&(t.flags&1048576)!==0&&lm(t,Go,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")ic(o)?(e=Ar(o,e),t.tag=1,t=Rp(null,t,o,e,r)):(t.tag=0,t=Yc(null,t,o,e,r));else{if(o!=null){if(c=o.$$typeof,c===H){t.tag=11,t=yp(null,t,o,e,r);break e}else if(c===Y){t.tag=14,t=bp(null,t,o,e,r);break e}}throw t=fe(o)||o,Error(i(306,t,""))}}return t;case 0:return Yc(e,t,t.type,t.pendingProps,r);case 1:return o=t.type,c=Ar(o,t.pendingProps),Rp(e,t,o,c,r);case 3:e:{if(ze(t,t.stateNode.containerInfo),e===null)throw Error(i(387));o=t.pendingProps;var d=t.memoizedState;c=d.element,xc(e,t),Oi(t,o,null,r);var b=t.memoizedState;if(o=b.cache,Na(t,Nt,o),o!==d.cache&&mc(t,[Nt],r,!0),Ci(),o=b.element,d.isDehydrated)if(d={element:o,isDehydrated:!1,cache:b.cache},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){t=Cp(e,t,o,r);break e}else if(o!==c){c=gn(Error(i(424)),t),yi(c),t=Cp(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(bt=Tn(e.firstChild),qt=t,We=!0,Sr=null,Un=!0,r=op(t,null,o,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling}else{if(vi(),o===c){t=ca(e,t,r);break e}kt(e,t,o,r)}t=t.child}return t;case 26:return ds(e,t),e===null?(r=Dg(t.type,null,t.pendingProps,null))?t.memoizedState=r:We||(r=t.type,e=t.pendingProps,o=As(pe.current).createElement(r),o[le]=t,o[he]=e,Pt(o,r,e),Be(o),t.stateNode=o):t.memoizedState=Dg(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return je(t),e===null&&We&&(o=t.stateNode=jg(t.type,t.pendingProps,pe.current),qt=t,Un=!0,c=bt,qa(t.type)?(Mf=c,bt=Tn(o.firstChild)):bt=c),kt(e,t,t.pendingProps.children,r),ds(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&We&&((c=o=bt)&&(o=nS(o,t.type,t.pendingProps,Un),o!==null?(t.stateNode=o,qt=t,bt=Tn(o.firstChild),Un=!1,c=!0):c=!1),c||wr(t)),je(t),c=t.type,d=t.pendingProps,b=e!==null?e.memoizedProps:null,o=d.children,Nf(c,d)?o=null:b!==null&&Nf(c,b)&&(t.flags|=32),t.memoizedState!==null&&(c=Oc(e,t,x1,null,null,r),Xi._currentValue=c),ds(e,t),kt(e,t,o,r),t.child;case 6:return e===null&&We&&((e=r=bt)&&(r=aS(r,t.pendingProps,Un),r!==null?(t.stateNode=r,qt=t,bt=null,e=!0):e=!1),e||wr(t)),null;case 13:return Op(e,t,r);case 4:return ze(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=gl(t,null,o,r):kt(e,t,o,r),t.child;case 11:return yp(e,t,t.type,t.pendingProps,r);case 7:return kt(e,t,t.pendingProps,r),t.child;case 8:return kt(e,t,t.pendingProps.children,r),t.child;case 12:return kt(e,t,t.pendingProps.children,r),t.child;case 10:return o=t.pendingProps,Na(t,t.type,o.value),kt(e,t,o.children,r),t.child;case 9:return c=t.type._context,o=t.pendingProps.children,Rr(t),c=Ht(c),o=o(c),t.flags|=1,kt(e,t,o,r),t.child;case 14:return bp(e,t,t.type,t.pendingProps,r);case 15:return xp(e,t,t.type,t.pendingProps,r);case 19:return Np(e,t,r);case 31:return o=t.pendingProps,r=t.mode,o={mode:o.mode,children:o.children},e===null?(r=hs(o,r),r.ref=t.ref,t.child=r,r.return=t,t=r):(r=aa(e.child,o),r.ref=t.ref,t.child=r,r.return=t,t=r),t;case 22:return Sp(e,t,r);case 24:return Rr(t),o=Ht(Nt),e===null?(c=vc(),c===null&&(c=ut,d=pc(),c.pooledCache=d,d.refCount++,d!==null&&(c.pooledCacheLanes|=r),c=d),t.memoizedState={parent:o,cache:c},bc(t),Na(t,Nt,c)):((e.lanes&r)!==0&&(xc(e,t),Oi(t,null,null,r),Ci()),c=e.memoizedState,d=t.memoizedState,c.parent!==o?(c={parent:o,cache:o},t.memoizedState=c,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=c),Na(t,Nt,o)):(o=d.cache,Na(t,Nt,o),o!==c.cache&&mc(t,[Nt],r,!0))),kt(e,t,t.pendingProps.children,r),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function fa(e){e.flags|=4}function jp(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Pg(t)){if(t=xn.current,t!==null&&((Je&4194048)===Je?Pn!==null:(Je&62914560)!==Je&&(Je&536870912)===0||t!==Pn))throw Ei=yc,hm;e.flags|=8192}}function ms(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?No():536870912,e.lanes|=t,xl|=t)}function Di(e,t){if(!We)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 gt(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 T1(e,t,r){var o=t.pendingProps;switch(cc(t),t.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return gt(t),null;case 1:return gt(t),null;case 3:return r=t.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),t.memoizedState.cache!==o&&(t.flags|=2048),oa(Nt),Ze(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(gi(t)?fa(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,sm())),gt(t),null;case 26:return r=t.memoizedState,e===null?(fa(t),r!==null?(gt(t),jp(t,r)):(gt(t),t.flags&=-16777217)):r?r!==e.memoizedState?(fa(t),gt(t),jp(t,r)):(gt(t),t.flags&=-16777217):(e.memoizedProps!==o&&fa(t),gt(t),t.flags&=-16777217),null;case 27:re(t),r=pe.current;var c=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==o&&fa(t);else{if(!o){if(t.stateNode===null)throw Error(i(166));return gt(t),null}e=W.current,gi(t)?im(t):(e=jg(c,o,r),t.stateNode=e,fa(t))}return gt(t),null;case 5:if(re(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==o&&fa(t);else{if(!o){if(t.stateNode===null)throw Error(i(166));return gt(t),null}if(e=W.current,gi(t))im(t);else{switch(c=As(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[le]=t,e[he]=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(Pt(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&&fa(t)}}return gt(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==o&&fa(t);else{if(typeof o!="string"&&t.stateNode===null)throw Error(i(166));if(e=pe.current,gi(t)){if(e=t.stateNode,r=t.memoizedProps,o=null,c=qt,c!==null)switch(c.tag){case 27:case 5:o=c.memoizedProps}e[le]=t,e=!!(e.nodeValue===r||o!==null&&o.suppressHydrationWarning===!0||Eg(e.nodeValue,r)),e||wr(t)}else e=As(e).createTextNode(o),e[le]=t,t.stateNode=e}return gt(t),null;case 13:if(o=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=gi(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[le]=t}else vi(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;gt(t),c=!1}else c=sm(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(ua(t),t):(ua(t),null)}if(ua(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 d=null;o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(d=o.memoizedState.cachePool.pool),d!==c&&(o.flags|=2048)}return r!==e&&r&&(t.child.flags|=8192),ms(t,t.updateQueue),gt(t),null;case 4:return Ze(),e===null&&Ef(t.stateNode.containerInfo),gt(t),null;case 10:return oa(t.type),gt(t),null;case 19:if(L(Tt),c=t.memoizedState,c===null)return gt(t),null;if(o=(t.flags&128)!==0,d=c.rendering,d===null)if(o)Di(c,!1);else{if(xt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(d=us(e),d!==null){for(t.flags|=128,Di(c,!1),e=d.updateQueue,t.updateQueue=e,ms(t,e),t.subtreeFlags=0,e=r,r=t.child;r!==null;)rm(r,e),r=r.sibling;return G(Tt,Tt.current&1|2),t.child}e=e.sibling}c.tail!==null&&_e()>vs&&(t.flags|=128,o=!0,Di(c,!1),t.lanes=4194304)}else{if(!o)if(e=us(d),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,ms(t,e),Di(c,!0),c.tail===null&&c.tailMode==="hidden"&&!d.alternate&&!We)return gt(t),null}else 2*_e()-c.renderingStartTime>vs&&r!==536870912&&(t.flags|=128,o=!0,Di(c,!1),t.lanes=4194304);c.isBackwards?(d.sibling=t.child,t.child=d):(e=c.last,e!==null?e.sibling=d:t.child=d,c.last=d)}return c.tail!==null?(t=c.tail,c.rendering=t,c.tail=t.sibling,c.renderingStartTime=_e(),t.sibling=null,e=Tt.current,G(Tt,o?e&1|2:e&1),t):(gt(t),null);case 22:case 23:return ua(t),Rc(),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&&(gt(t),t.subtreeFlags&6&&(t.flags|=8192)):gt(t),r=t.updateQueue,r!==null&&ms(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&&L(Cr),null;case 24:return r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),oa(Nt),gt(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function j1(e,t){switch(cc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return oa(Nt),Ze(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return re(t),null;case 13:if(ua(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));vi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return L(Tt),null;case 4:return Ze(),null;case 10:return oa(t.type),null;case 22:case 23:return ua(t),Rc(),e!==null&&L(Cr),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return oa(Nt),null;case 25:return null;default:return null}}function _p(e,t){switch(cc(t),t.tag){case 3:oa(Nt),Ze();break;case 26:case 27:case 5:re(t);break;case 4:Ze();break;case 13:ua(t);break;case 19:L(Tt);break;case 10:oa(t.type);break;case 22:case 23:ua(t),Rc(),e!==null&&L(Cr);break;case 24:oa(Nt)}}function Li(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 d=r.create,b=r.inst;o=d(),b.destroy=o}r=r.next}while(r!==c)}}catch(E){st(t,t.return,E)}}function za(e,t,r){try{var o=t.updateQueue,c=o!==null?o.lastEffect:null;if(c!==null){var d=c.next;o=d;do{if((o.tag&e)===e){var b=o.inst,E=b.destroy;if(E!==void 0){b.destroy=void 0,c=t;var T=r,q=E;try{q()}catch(I){st(c,T,I)}}}o=o.next}while(o!==d)}}catch(I){st(t,t.return,I)}}function Mp(e){var t=e.updateQueue;if(t!==null){var r=e.stateNode;try{bm(t,r)}catch(o){st(e,e.return,o)}}}function Dp(e,t,r){r.props=Ar(e.type,e.memoizedProps),r.state=e.memoizedState;try{r.componentWillUnmount()}catch(o){st(e,t,o)}}function zi(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){st(e,t,c)}}function Hn(e,t){var r=e.ref,o=e.refCleanup;if(r!==null)if(typeof o=="function")try{o()}catch(c){st(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){st(e,t,c)}else r.current=null}function Lp(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){st(e,e.return,c)}}function Ic(e,t,r){try{var o=e.stateNode;J1(o,e.type,r,t),o[he]=t}catch(c){st(e,e.return,c)}}function zp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&qa(e.type)||e.tag===4}function Wc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||zp(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&&qa(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 ef(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=Os));else if(o!==4&&(o===27&&qa(e.type)&&(r=e.stateNode,t=null),e=e.child,e!==null))for(ef(e,t,r),e=e.sibling;e!==null;)ef(e,t,r),e=e.sibling}function ps(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&&qa(e.type)&&(r=e.stateNode),e=e.child,e!==null))for(ps(e,t,r),e=e.sibling;e!==null;)ps(e,t,r),e=e.sibling}function kp(e){var t=e.stateNode,r=e.memoizedProps;try{for(var o=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);Pt(t,o,r),t[le]=e,t[he]=r}catch(d){st(e,e.return,d)}}var da=!1,Et=!1,tf=!1,Up=typeof WeakSet=="function"?WeakSet:Set,Mt=null;function _1(e,t){if(e=e.containerInfo,Of=Ds,e=Xh(e),Wu(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,d=o.focusNode;o=o.focusOffset;try{r.nodeType,d.nodeType}catch{r=null;break e}var b=0,E=-1,T=-1,q=0,I=0,ne=e,F=null;t:for(;;){for(var X;ne!==r||c!==0&&ne.nodeType!==3||(E=b+c),ne!==d||o!==0&&ne.nodeType!==3||(T=b+o),ne.nodeType===3&&(b+=ne.nodeValue.length),(X=ne.firstChild)!==null;)F=ne,ne=X;for(;;){if(ne===e)break t;if(F===r&&++q===c&&(E=b),F===d&&++I===o&&(T=b),(X=ne.nextSibling)!==null)break;ne=F,F=ne.parentNode}ne=X}r=E===-1||T===-1?null:{start:E,end:T}}else r=null}r=r||{start:0,end:0}}else r=null;for(Af={focusedElem:e,selectionRange:r},Ds=!1,Mt=t;Mt!==null;)if(t=Mt,e=t.child,(t.subtreeFlags&1024)!==0&&e!==null)e.return=t,Mt=e;else for(;Mt!==null;){switch(t=Mt,d=t.alternate,e=t.flags,t.tag){case 0:break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,r=t,c=d.memoizedProps,d=d.memoizedState,o=r.stateNode;try{var ke=Ar(r.type,c,r.elementType===r.type);e=o.getSnapshotBeforeUpdate(ke,d),o.__reactInternalSnapshotBeforeUpdate=e}catch(De){st(r,r.return,De)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,r=e.nodeType,r===9)jf(e);else if(r===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":jf(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,Mt=e;break}Mt=t.return}}function Pp(e,t,r){var o=r.flags;switch(r.tag){case 0:case 11:case 15:ka(e,r),o&4&&Li(5,r);break;case 1:if(ka(e,r),o&4)if(e=r.stateNode,t===null)try{e.componentDidMount()}catch(b){st(r,r.return,b)}else{var c=Ar(r.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(b){st(r,r.return,b)}}o&64&&Mp(r),o&512&&zi(r,r.return);break;case 3:if(ka(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{bm(e,t)}catch(b){st(r,r.return,b)}}break;case 27:t===null&&o&4&&kp(r);case 26:case 5:ka(e,r),t===null&&o&4&&Lp(r),o&512&&zi(r,r.return);break;case 12:ka(e,r);break;case 13:ka(e,r),o&4&&$p(e,r),o&64&&(e=r.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(r=B1.bind(null,r),rS(e,r))));break;case 22:if(o=r.memoizedState!==null||da,!o){t=t!==null&&t.memoizedState!==null||Et,c=da;var d=Et;da=o,(Et=t)&&!d?Ua(e,r,(r.subtreeFlags&8772)!==0):ka(e,r),da=c,Et=d}break;case 30:break;default:ka(e,r)}}function Hp(e){var t=e.alternate;t!==null&&(e.alternate=null,Hp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Oe(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,Xt=!1;function ha(e,t,r){for(r=r.child;r!==null;)Bp(e,t,r),r=r.sibling}function Bp(e,t,r){if(mt&&typeof mt.onCommitFiberUnmount=="function")try{mt.onCommitFiberUnmount(Kt,r)}catch{}switch(r.tag){case 26:Et||Hn(r,t),ha(e,t,r),r.memoizedState?r.memoizedState.count--:r.stateNode&&(r=r.stateNode,r.parentNode.removeChild(r));break;case 27:Et||Hn(r,t);var o=ht,c=Xt;qa(r.type)&&(ht=r.stateNode,Xt=!1),ha(e,t,r),Yi(r.stateNode),ht=o,Xt=c;break;case 5:Et||Hn(r,t);case 6:if(o=ht,c=Xt,ht=null,ha(e,t,r),ht=o,Xt=c,ht!==null)if(Xt)try{(ht.nodeType===9?ht.body:ht.nodeName==="HTML"?ht.ownerDocument.body:ht).removeChild(r.stateNode)}catch(d){st(r,t,d)}else try{ht.removeChild(r.stateNode)}catch(d){st(r,t,d)}break;case 18:ht!==null&&(Xt?(e=ht,Ng(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,r.stateNode),Ii(e)):Ng(ht,r.stateNode));break;case 4:o=ht,c=Xt,ht=r.stateNode.containerInfo,Xt=!0,ha(e,t,r),ht=o,Xt=c;break;case 0:case 11:case 14:case 15:Et||za(2,r,t),Et||za(4,r,t),ha(e,t,r);break;case 1:Et||(Hn(r,t),o=r.stateNode,typeof o.componentWillUnmount=="function"&&Dp(r,t,o)),ha(e,t,r);break;case 21:ha(e,t,r);break;case 22:Et=(o=Et)||r.memoizedState!==null,ha(e,t,r),Et=o;break;default:ha(e,t,r)}}function $p(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ii(e)}catch(r){st(t,t.return,r)}}function M1(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Up),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Up),t;default:throw Error(i(435,e.tag))}}function nf(e,t){var r=M1(e);t.forEach(function(o){var c=$1.bind(null,e,o);r.has(o)||(r.add(o),o.then(c,c))})}function tn(e,t){var r=t.deletions;if(r!==null)for(var o=0;o<r.length;o++){var c=r[o],d=e,b=t,E=b;e:for(;E!==null;){switch(E.tag){case 27:if(qa(E.type)){ht=E.stateNode,Xt=!1;break e}break;case 5:ht=E.stateNode,Xt=!1;break e;case 3:case 4:ht=E.stateNode.containerInfo,Xt=!0;break e}E=E.return}if(ht===null)throw Error(i(160));Bp(d,b,c),ht=null,Xt=!1,d=c.alternate,d!==null&&(d.return=null),c.return=null}if(t.subtreeFlags&13878)for(t=t.child;t!==null;)Vp(t,e),t=t.sibling}var Nn=null;function Vp(e,t){var r=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:tn(t,e),nn(e),o&4&&(za(3,e,e.return),Li(3,e),za(5,e,e.return));break;case 1:tn(t,e),nn(e),o&512&&(Et||r===null||Hn(r,r.return)),o&64&&da&&(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=Nn;if(tn(t,e),nn(e),o&512&&(Et||r===null||Hn(r,r.return)),o&4){var d=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":d=c.getElementsByTagName("title")[0],(!d||d[Ee]||d[le]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=c.createElement(o),c.head.insertBefore(d,c.querySelector("head > title"))),Pt(d,o,r),d[le]=e,Be(d),o=d;break e;case"link":var b=kg("link","href",c).get(o+(r.href||""));if(b){for(var E=0;E<b.length;E++)if(d=b[E],d.getAttribute("href")===(r.href==null||r.href===""?null:r.href)&&d.getAttribute("rel")===(r.rel==null?null:r.rel)&&d.getAttribute("title")===(r.title==null?null:r.title)&&d.getAttribute("crossorigin")===(r.crossOrigin==null?null:r.crossOrigin)){b.splice(E,1);break t}}d=c.createElement(o),Pt(d,o,r),c.head.appendChild(d);break;case"meta":if(b=kg("meta","content",c).get(o+(r.content||""))){for(E=0;E<b.length;E++)if(d=b[E],d.getAttribute("content")===(r.content==null?null:""+r.content)&&d.getAttribute("name")===(r.name==null?null:r.name)&&d.getAttribute("property")===(r.property==null?null:r.property)&&d.getAttribute("http-equiv")===(r.httpEquiv==null?null:r.httpEquiv)&&d.getAttribute("charset")===(r.charSet==null?null:r.charSet)){b.splice(E,1);break t}}d=c.createElement(o),Pt(d,o,r),c.head.appendChild(d);break;default:throw Error(i(468,o))}d[le]=e,Be(d),o=d}e.stateNode=o}else Ug(c,e.type,e.stateNode);else e.stateNode=zg(c,o,e.memoizedProps);else d!==o?(d===null?r.stateNode!==null&&(r=r.stateNode,r.parentNode.removeChild(r)):d.count--,o===null?Ug(c,e.type,e.stateNode):zg(c,o,e.memoizedProps)):o===null&&e.stateNode!==null&&Ic(e,e.memoizedProps,r.memoizedProps)}break;case 27:tn(t,e),nn(e),o&512&&(Et||r===null||Hn(r,r.return)),r!==null&&o&4&&Ic(e,e.memoizedProps,r.memoizedProps);break;case 5:if(tn(t,e),nn(e),o&512&&(Et||r===null||Hn(r,r.return)),e.flags&32){c=e.stateNode;try{Ir(c,"")}catch(X){st(e,e.return,X)}}o&4&&e.stateNode!=null&&(c=e.memoizedProps,Ic(e,c,r!==null?r.memoizedProps:c)),o&1024&&(tf=!0);break;case 6:if(tn(t,e),nn(e),o&4){if(e.stateNode===null)throw Error(i(162));o=e.memoizedProps,r=e.stateNode;try{r.nodeValue=o}catch(X){st(e,e.return,X)}}break;case 3:if(js=null,c=Nn,Nn=Ns(t.containerInfo),tn(t,e),Nn=c,nn(e),o&4&&r!==null&&r.memoizedState.isDehydrated)try{Ii(t.containerInfo)}catch(X){st(e,e.return,X)}tf&&(tf=!1,qp(e));break;case 4:o=Nn,Nn=Ns(e.stateNode.containerInfo),tn(t,e),nn(e),Nn=o;break;case 12:tn(t,e),nn(e);break;case 13:tn(t,e),nn(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(uf=_e()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,nf(e,o)));break;case 22:c=e.memoizedState!==null;var T=r!==null&&r.memoizedState!==null,q=da,I=Et;if(da=q||c,Et=I||T,tn(t,e),Et=I,da=q,nn(e),o&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(r===null||T||da||Et||Nr(e)),r=null,t=e;;){if(t.tag===5||t.tag===26){if(r===null){T=r=t;try{if(d=T.stateNode,c)b=d.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none";else{E=T.stateNode;var ne=T.memoizedProps.style,F=ne!=null&&ne.hasOwnProperty("display")?ne.display:null;E.style.display=F==null||typeof F=="boolean"?"":(""+F).trim()}}catch(X){st(T,T.return,X)}}}else if(t.tag===6){if(r===null){T=t;try{T.stateNode.nodeValue=c?"":T.memoizedProps}catch(X){st(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,nf(e,r))));break;case 19:tn(t,e),nn(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,nf(e,o)));break;case 30:break;case 21:break;default:tn(t,e),nn(e)}}function nn(e){var t=e.flags;if(t&2){try{for(var r,o=e.return;o!==null;){if(zp(o)){r=o;break}o=o.return}if(r==null)throw Error(i(160));switch(r.tag){case 27:var c=r.stateNode,d=Wc(e);ps(e,d,c);break;case 5:var b=r.stateNode;r.flags&32&&(Ir(b,""),r.flags&=-33);var E=Wc(e);ps(e,E,b);break;case 3:case 4:var T=r.stateNode.containerInfo,q=Wc(e);ef(e,q,T);break;default:throw Error(i(161))}}catch(I){st(e,e.return,I)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function qp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;qp(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ka(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Pp(e,t.alternate,t),t=t.sibling}function Nr(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:za(4,t,t.return),Nr(t);break;case 1:Hn(t,t.return);var r=t.stateNode;typeof r.componentWillUnmount=="function"&&Dp(t,t.return,r),Nr(t);break;case 27:Yi(t.stateNode);case 26:case 5:Hn(t,t.return),Nr(t);break;case 22:t.memoizedState===null&&Nr(t);break;case 30:Nr(t);break;default:Nr(t)}e=e.sibling}}function Ua(e,t,r){for(r=r&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var o=t.alternate,c=e,d=t,b=d.flags;switch(d.tag){case 0:case 11:case 15:Ua(c,d,r),Li(4,d);break;case 1:if(Ua(c,d,r),o=d,c=o.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(q){st(o,o.return,q)}if(o=d,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++)ym(T[c],E)}catch(q){st(o,o.return,q)}}r&&b&64&&Mp(d),zi(d,d.return);break;case 27:kp(d);case 26:case 5:Ua(c,d,r),r&&o===null&&b&4&&Lp(d),zi(d,d.return);break;case 12:Ua(c,d,r);break;case 13:Ua(c,d,r),r&&b&4&&$p(c,d);break;case 22:d.memoizedState===null&&Ua(c,d,r),zi(d,d.return);break;case 30:break;default:Ua(c,d,r)}t=t.sibling}}function af(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&&xi(r))}function rf(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&xi(e))}function Bn(e,t,r,o){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Yp(e,t,r,o),t=t.sibling}function Yp(e,t,r,o){var c=t.flags;switch(t.tag){case 0:case 11:case 15:Bn(e,t,r,o),c&2048&&Li(9,t);break;case 1:Bn(e,t,r,o);break;case 3:Bn(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&&xi(e)));break;case 12:if(c&2048){Bn(e,t,r,o),e=t.stateNode;try{var d=t.memoizedProps,b=d.id,E=d.onPostCommit;typeof E=="function"&&E(b,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(T){st(t,t.return,T)}}else Bn(e,t,r,o);break;case 13:Bn(e,t,r,o);break;case 23:break;case 22:d=t.stateNode,b=t.alternate,t.memoizedState!==null?d._visibility&2?Bn(e,t,r,o):ki(e,t):d._visibility&2?Bn(e,t,r,o):(d._visibility|=2,vl(e,t,r,o,(t.subtreeFlags&10256)!==0)),c&2048&&af(b,t);break;case 24:Bn(e,t,r,o),c&2048&&rf(t.alternate,t);break;default:Bn(e,t,r,o)}}function vl(e,t,r,o,c){for(c=c&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;){var d=e,b=t,E=r,T=o,q=b.flags;switch(b.tag){case 0:case 11:case 15:vl(d,b,E,T,c),Li(8,b);break;case 23:break;case 22:var I=b.stateNode;b.memoizedState!==null?I._visibility&2?vl(d,b,E,T,c):ki(d,b):(I._visibility|=2,vl(d,b,E,T,c)),c&&q&2048&&af(b.alternate,b);break;case 24:vl(d,b,E,T,c),c&&q&2048&&rf(b.alternate,b);break;default:vl(d,b,E,T,c)}t=t.sibling}}function ki(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:ki(r,o),c&2048&&af(o.alternate,o);break;case 24:ki(r,o),c&2048&&rf(o.alternate,o);break;default:ki(r,o)}t=t.sibling}}var Ui=8192;function yl(e){if(e.subtreeFlags&Ui)for(e=e.child;e!==null;)Kp(e),e=e.sibling}function Kp(e){switch(e.tag){case 26:yl(e),e.flags&Ui&&e.memoizedState!==null&&vS(Nn,e.memoizedState,e.memoizedProps);break;case 5:yl(e);break;case 3:case 4:var t=Nn;Nn=Ns(e.stateNode.containerInfo),yl(e),Nn=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=Ui,Ui=16777216,yl(e),Ui=t):yl(e));break;default:yl(e)}}function Gp(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 Pi(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];Mt=o,Xp(o,e)}Gp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Fp(e),e=e.sibling}function Fp(e){switch(e.tag){case 0:case 11:case 15:Pi(e),e.flags&2048&&za(9,e,e.return);break;case 3:Pi(e);break;case 12:Pi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,gs(e)):Pi(e);break;default:Pi(e)}}function gs(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];Mt=o,Xp(o,e)}Gp(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:za(8,t,t.return),gs(t);break;case 22:r=t.stateNode,r._visibility&2&&(r._visibility&=-3,gs(t));break;default:gs(t)}e=e.sibling}}function Xp(e,t){for(;Mt!==null;){var r=Mt;switch(r.tag){case 0:case 11:case 15:za(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:xi(r.memoizedState.cache)}if(o=r.child,o!==null)o.return=r,Mt=o;else e:for(r=e;Mt!==null;){o=Mt;var c=o.sibling,d=o.return;if(Hp(o),o===r){Mt=null;break e}if(c!==null){c.return=d,Mt=c;break e}Mt=d}}}var D1={getCacheForType:function(e){var t=Ht(Nt),r=t.data.get(e);return r===void 0&&(r=e(),t.data.set(e,r)),r}},L1=typeof WeakMap=="function"?WeakMap:Map,tt=0,ut=null,Xe=null,Je=0,nt=0,an=null,Pa=!1,bl=!1,lf=!1,ma=0,xt=0,Ha=0,Tr=0,of=0,Sn=0,xl=0,Hi=null,Qt=null,sf=!1,uf=0,vs=1/0,ys=null,Ba=null,Ut=0,$a=null,Sl=null,wl=0,cf=0,ff=null,Qp=null,Bi=0,df=null;function rn(){if((tt&2)!==0&&Je!==0)return Je&-Je;if(M.T!==null){var e=ul;return e!==0?e:bf()}return _()}function Zp(){Sn===0&&(Sn=(Je&536870912)===0||We?Xr():536870912);var e=xn.current;return e!==null&&(e.flags|=32),Sn}function ln(e,t,r){(e===ut&&(nt===2||nt===9)||e.cancelPendingCommit!==null)&&(El(e,0),Va(e,Je,Sn,!1)),fr(e,r),((tt&2)===0||e!==ut)&&(e===ut&&((tt&2)===0&&(Tr|=r),xt===4&&Va(e,Je,Sn,!1)),$n(e))}function Jp(e,t,r){if((tt&6)!==0)throw Error(i(327));var o=!r&&(t&124)===0&&(t&e.expiredLanes)===0||zn(e,t),c=o?U1(e,t):pf(e,t,!0),d=o;do{if(c===0){bl&&!o&&Va(e,t,0,!1);break}else{if(r=e.current.alternate,d&&!z1(r)){c=pf(e,t,!1),d=!1;continue}if(c===2){if(d=t,e.errorRecoveryDisabledLanes&d)var b=0;else b=e.pendingLanes&-536870913,b=b!==0?b:b&536870912?536870912:0;if(b!==0){t=b;e:{var E=e;c=Hi;var T=E.current.memoizedState.isDehydrated;if(T&&(El(E,b).flags|=256),b=pf(E,b,!1),b!==2){if(lf&&!T){E.errorRecoveryDisabledLanes|=d,Tr|=d,c=4;break e}d=Qt,Qt=c,d!==null&&(Qt===null?Qt=d:Qt.push.apply(Qt,d))}c=b}if(d=!1,c!==2)continue}}if(c===1){El(e,0),Va(e,t,0,!0);break}e:{switch(o=e,d=c,d){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:Va(o,t,Sn,!Pa);break e;case 2:Qt=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(c=uf+300-_e(),10<c)){if(Va(o,t,Sn,!Pa),cr(o,0,!0)!==0)break e;o.timeoutHandle=Og(Ip.bind(null,o,r,Qt,ys,sf,t,Sn,Tr,xl,Pa,d,2,-0,0),c);break e}Ip(o,r,Qt,ys,sf,t,Sn,Tr,xl,Pa,d,0,-0,0)}}break}while(!0);$n(e)}function Ip(e,t,r,o,c,d,b,E,T,q,I,ne,F,X){if(e.timeoutHandle=-1,ne=t.subtreeFlags,(ne&8192||(ne&16785408)===16785408)&&(Fi={stylesheets:null,count:0,unsuspend:gS},Kp(t),ne=yS(),ne!==null)){e.cancelPendingCommit=ne(lg.bind(null,e,t,d,r,o,c,b,E,T,I,1,F,X)),Va(e,d,b,!q);return}lg(e,t,d,r,o,c,b,E,T)}function z1(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],d=c.getSnapshot;c=c.value;try{if(!Wt(d(),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 Va(e,t,r,o){t&=~of,t&=~Tr,e.suspendedLanes|=t,e.pingedLanes&=~t,o&&(e.warmLanes|=t),o=e.expirationTimes;for(var c=t;0<c;){var d=31-zt(c),b=1<<d;o[d]=-1,c&=~b}r!==0&&dr(e,r,t)}function bs(){return(tt&6)===0?($i(0),!1):!0}function hf(){if(Xe!==null){if(nt===0)var e=Xe.return;else e=Xe,ia=Er=null,Tc(e),pl=null,_i=0,e=Xe;for(;e!==null;)_p(e.alternate,e),e=e.return;Xe=null}}function El(e,t){var r=e.timeoutHandle;r!==-1&&(e.timeoutHandle=-1,W1(r)),r=e.cancelPendingCommit,r!==null&&(e.cancelPendingCommit=null,r()),hf(),ut=e,Xe=r=aa(e.current,null),Je=t,nt=0,an=null,Pa=!1,bl=zn(e,t),lf=!1,xl=Sn=of=Tr=Ha=xt=0,Qt=Hi=null,sf=!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),d=1<<c;t|=e[c],o&=~d}return ma=t,$o(),r}function Wp(e,t){qe=null,M.H=is,t===wi||t===Zo?(t=gm(),nt=3):t===hm?(t=gm(),nt=4):nt=t===vp?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,an=t,Xe===null&&(xt=1,fs(e,gn(t,e.current)))}function eg(){var e=M.H;return M.H=is,e===null?is:e}function tg(){var e=M.A;return M.A=D1,e}function mf(){xt=4,Pa||(Je&4194048)!==Je&&xn.current!==null||(bl=!0),(Ha&134217727)===0&&(Tr&134217727)===0||ut===null||Va(ut,Je,Sn,!1)}function pf(e,t,r){var o=tt;tt|=2;var c=eg(),d=tg();(ut!==e||Je!==t)&&(ys=null,El(e,t)),t=!1;var b=xt;e:do try{if(nt!==0&&Xe!==null){var E=Xe,T=an;switch(nt){case 8:hf(),b=6;break e;case 3:case 2:case 9:case 6:xn.current===null&&(t=!0);var q=nt;if(nt=0,an=null,Rl(e,E,T,q),r&&bl){b=0;break e}break;default:q=nt,nt=0,an=null,Rl(e,E,T,q)}}k1(),b=xt;break}catch(I){Wp(e,I)}while(!0);return t&&e.shellSuspendCounter++,ia=Er=null,tt=o,M.H=c,M.A=d,Xe===null&&(ut=null,Je=0,$o()),b}function k1(){for(;Xe!==null;)ng(Xe)}function U1(e,t){var r=tt;tt|=2;var o=eg(),c=tg();ut!==e||Je!==t?(ys=null,vs=_e()+500,El(e,t)):bl=zn(e,t);e:do try{if(nt!==0&&Xe!==null){t=Xe;var d=an;t:switch(nt){case 1:nt=0,an=null,Rl(e,t,d,1);break;case 2:case 9:if(mm(d)){nt=0,an=null,ag(t);break}t=function(){nt!==2&&nt!==9||ut!==e||(nt=7),$n(e)},d.then(t,t);break e;case 3:nt=7;break e;case 4:nt=5;break e;case 7:mm(d)?(nt=0,an=null,ag(t)):(nt=0,an=null,Rl(e,t,d,7));break;case 5:var b=null;switch(Xe.tag){case 26:b=Xe.memoizedState;case 5:case 27:var E=Xe;if(!b||Pg(b)){nt=0,an=null;var T=E.sibling;if(T!==null)Xe=T;else{var q=E.return;q!==null?(Xe=q,xs(q)):Xe=null}break t}}nt=0,an=null,Rl(e,t,d,5);break;case 6:nt=0,an=null,Rl(e,t,d,6);break;case 8:hf(),xt=6;break e;default:throw Error(i(462))}}P1();break}catch(I){Wp(e,I)}while(!0);return ia=Er=null,M.H=o,M.A=c,tt=r,Xe!==null?0:(ut=null,Je=0,$o(),xt)}function P1(){for(;Xe!==null&&!Ne();)ng(Xe)}function ng(e){var t=Tp(e.alternate,e,ma);e.memoizedProps=e.pendingProps,t===null?xs(e):Xe=t}function ag(e){var t=e,r=t.alternate;switch(t.tag){case 15:case 0:t=Ep(r,t,t.pendingProps,t.type,void 0,Je);break;case 11:t=Ep(r,t,t.pendingProps,t.type.render,t.ref,Je);break;case 5:Tc(t);default:_p(r,t),t=Xe=rm(t,ma),t=Tp(r,t,ma)}e.memoizedProps=e.pendingProps,t===null?xs(e):Xe=t}function Rl(e,t,r,o){ia=Er=null,Tc(t),pl=null,_i=0;var c=t.return;try{if(A1(e,c,t,r,Je)){xt=1,fs(e,gn(r,e.current)),Xe=null;return}}catch(d){if(c!==null)throw Xe=c,d;xt=1,fs(e,gn(r,e.current)),Xe=null;return}t.flags&32768?(We||o===1?e=!0:bl||(Je&536870912)!==0?e=!1:(Pa=e=!0,(o===2||o===9||o===3||o===6)&&(o=xn.current,o!==null&&o.tag===13&&(o.flags|=16384))),rg(t,e)):xs(t)}function xs(e){var t=e;do{if((t.flags&32768)!==0){rg(t,Pa);return}e=t.return;var r=T1(t.alternate,t,ma);if(r!==null){Xe=r;return}if(t=t.sibling,t!==null){Xe=t;return}Xe=t=e}while(t!==null);xt===0&&(xt=5)}function rg(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);xt=6,Xe=null}function lg(e,t,r,o,c,d,b,E,T){e.cancelPendingCommit=null;do Ss();while(Ut!==0);if((tt&6)!==0)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(d=t.lanes|t.childLanes,d|=rc,To(e,r,d,b,E,T),e===ut&&(Xe=ut=null,Je=0),Sl=t,$a=e,wl=r,cf=d,ff=c,Qp=o,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,V1(Fr,function(){return cg(),null})):(e.callbackNode=null,e.callbackPriority=0),o=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||o){o=M.T,M.T=null,c=Z.p,Z.p=2,b=tt,tt|=4;try{_1(e,t,r)}finally{tt=b,Z.p=c,M.T=o}}Ut=1,ig(),og(),sg()}}function ig(){if(Ut===1){Ut=0;var e=$a,t=Sl,r=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||r){r=M.T,M.T=null;var o=Z.p;Z.p=2;var c=tt;tt|=4;try{Vp(t,e);var d=Af,b=Xh(e.containerInfo),E=d.focusedElem,T=d.selectionRange;if(b!==E&&E&&E.ownerDocument&&Fh(E.ownerDocument.documentElement,E)){if(T!==null&&Wu(E)){var q=T.start,I=T.end;if(I===void 0&&(I=q),"selectionStart"in E)E.selectionStart=q,E.selectionEnd=Math.min(I,E.value.length);else{var ne=E.ownerDocument||document,F=ne&&ne.defaultView||window;if(F.getSelection){var X=F.getSelection(),ke=E.textContent.length,De=Math.min(T.start,ke),it=T.end===void 0?De:Math.min(T.end,ke);!X.extend&&De>it&&(b=it,it=De,De=b);var P=Gh(E,De),D=Gh(E,it);if(P&&D&&(X.rangeCount!==1||X.anchorNode!==P.node||X.anchorOffset!==P.offset||X.focusNode!==D.node||X.focusOffset!==D.offset)){var V=ne.createRange();V.setStart(P.node,P.offset),X.removeAllRanges(),De>it?(X.addRange(V),X.extend(D.node,D.offset)):(V.setEnd(D.node,D.offset),X.addRange(V))}}}}for(ne=[],X=E;X=X.parentNode;)X.nodeType===1&&ne.push({element:X,left:X.scrollLeft,top:X.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<ne.length;E++){var ee=ne[E];ee.element.scrollLeft=ee.left,ee.element.scrollTop=ee.top}}Ds=!!Of,Af=Of=null}finally{tt=c,Z.p=o,M.T=r}}e.current=t,Ut=2}}function og(){if(Ut===2){Ut=0;var e=$a,t=Sl,r=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||r){r=M.T,M.T=null;var o=Z.p;Z.p=2;var c=tt;tt|=4;try{Pp(e,t.alternate,t)}finally{tt=c,Z.p=o,M.T=r}}Ut=3}}function sg(){if(Ut===4||Ut===3){Ut=0,Ue();var e=$a,t=Sl,r=wl,o=Qp;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ut=5:(Ut=0,Sl=$a=null,ug(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(Ba=null),ii(r),t=t.stateNode,mt&&typeof mt.onCommitFiberRoot=="function")try{mt.onCommitFiberRoot(Kt,t,void 0,(t.current.flags&128)===128)}catch{}if(o!==null){t=M.T,c=Z.p,Z.p=2,M.T=null;try{for(var d=e.onRecoverableError,b=0;b<o.length;b++){var E=o[b];d(E.value,{componentStack:E.stack})}}finally{M.T=t,Z.p=c}}(wl&3)!==0&&Ss(),$n(e),c=e.pendingLanes,(r&4194090)!==0&&(c&42)!==0?e===df?Bi++:(Bi=0,df=e):Bi=0,$i(0)}}function ug(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,xi(t)))}function Ss(e){return ig(),og(),sg(),cg()}function cg(){if(Ut!==5)return!1;var e=$a,t=cf;cf=0;var r=ii(wl),o=M.T,c=Z.p;try{Z.p=32>r?32:r,M.T=null,r=ff,ff=null;var d=$a,b=wl;if(Ut=0,Sl=$a=null,wl=0,(tt&6)!==0)throw Error(i(331));var E=tt;if(tt|=4,Fp(d.current),Yp(d,d.current,b,r),tt=E,$i(0,!1),mt&&typeof mt.onPostCommitFiberRoot=="function")try{mt.onPostCommitFiberRoot(Kt,d)}catch{}return!0}finally{Z.p=c,M.T=o,ug(e,t)}}function fg(e,t,r){t=gn(r,t),t=qc(e.stateNode,t,2),e=_a(e,t,2),e!==null&&(fr(e,2),$n(e))}function st(e,t,r){if(e.tag===3)fg(e,e,r);else for(;t!==null;){if(t.tag===3){fg(t,e,r);break}else if(t.tag===1){var o=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Ba===null||!Ba.has(o))){e=gn(r,e),r=pp(2),o=_a(t,r,2),o!==null&&(gp(r,o,t,e),fr(o,2),$n(o));break}}t=t.return}}function gf(e,t,r){var o=e.pingCache;if(o===null){o=e.pingCache=new L1;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)||(lf=!0,c.add(r),e=H1.bind(null,e,t,r),t.then(e,e))}function H1(e,t,r){var o=e.pingCache;o!==null&&o.delete(t),e.pingedLanes|=e.suspendedLanes&r,e.warmLanes&=~r,ut===e&&(Je&r)===r&&(xt===4||xt===3&&(Je&62914560)===Je&&300>_e()-uf?(tt&2)===0&&El(e,0):of|=r,xl===Je&&(xl=0)),$n(e)}function dg(e,t){t===0&&(t=No()),e=ll(e,t),e!==null&&(fr(e,t),$n(e))}function B1(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),dg(e,r)}function $1(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),dg(e,r)}function V1(e,t){return ue(e,t)}var ws=null,Cl=null,vf=!1,Es=!1,yf=!1,jr=0;function $n(e){e!==Cl&&e.next===null&&(Cl===null?ws=Cl=e:Cl=Cl.next=e),Es=!0,vf||(vf=!0,Y1())}function $i(e,t){if(!yf&&Es){yf=!0;do for(var r=!1,o=ws;o!==null;){if(e!==0){var c=o.pendingLanes;if(c===0)var d=0;else{var b=o.suspendedLanes,E=o.pingedLanes;d=(1<<31-zt(42|e)+1)-1,d&=c&~(b&~E),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(r=!0,gg(o,d))}else d=Je,d=cr(o,o===ut?d:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(d&3)===0||zn(o,d)||(r=!0,gg(o,d));o=o.next}while(r);yf=!1}}function q1(){hg()}function hg(){Es=vf=!1;var e=0;jr!==0&&(I1()&&(e=jr),jr=0);for(var t=_e(),r=null,o=ws;o!==null;){var c=o.next,d=mg(o,t);d===0?(o.next=null,r===null?ws=c:r.next=c,c===null&&(Cl=r)):(r=o,(e!==0||(d&3)!==0)&&(Es=!0)),o=c}$i(e)}function mg(e,t){for(var r=e.suspendedLanes,o=e.pingedLanes,c=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var b=31-zt(d),E=1<<b,T=c[b];T===-1?((E&r)===0||(E&o)!==0)&&(c[b]=Ao(E,t)):T<=t&&(e.expiredLanes|=E),d&=~E}if(t=ut,r=Je,r=cr(e,e===t?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,r===0||e===t&&(nt===2||nt===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&ce(o),e.callbackNode=null,e.callbackPriority=0;if((r&3)===0||zn(e,r)){if(t=r&-r,t===e.callbackPriority)return t;switch(o!==null&&ce(o),ii(r)){case 2:case 8:r=Gr;break;case 32:r=Fr;break;case 268435456:r=Ra;break;default:r=Fr}return o=pg.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 pg(e,t){if(Ut!==0&&Ut!==5)return e.callbackNode=null,e.callbackPriority=0,null;var r=e.callbackNode;if(Ss()&&e.callbackNode!==r)return null;var o=Je;return o=cr(e,e===ut?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(Jp(e,o,t),mg(e,_e()),e.callbackNode!=null&&e.callbackNode===r?pg.bind(null,e):null)}function gg(e,t){if(Ss())return null;Jp(e,t,!0)}function Y1(){eS(function(){(tt&6)!==0?ue(Cn,q1):hg()})}function bf(){return jr===0&&(jr=Xr()),jr}function vg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Lo(""+e)}function yg(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 K1(e,t,r,o,c){if(t==="submit"&&r&&r.stateNode===c){var d=vg((c[he]||null).action),b=o.submitter;b&&(t=(t=b[he]||null)?vg(t.formAction):b.getAttribute("formAction"),t!==null&&(d=t,b=null));var E=new Po("action","action",null,o,c);e.push({event:E,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(jr!==0){var T=b?yg(c,b):new FormData(c);Pc(r,{pending:!0,data:T,method:c.method,action:d},null,T)}}else typeof d=="function"&&(E.preventDefault(),T=b?yg(c,b):new FormData(c),Pc(r,{pending:!0,data:T,method:c.method,action:d},d,T))},currentTarget:c}]})}}for(var xf=0;xf<ac.length;xf++){var Sf=ac[xf],G1=Sf.toLowerCase(),F1=Sf[0].toUpperCase()+Sf.slice(1);An(G1,"on"+F1)}An(Jh,"onAnimationEnd"),An(Ih,"onAnimationIteration"),An(Wh,"onAnimationStart"),An("dblclick","onDoubleClick"),An("focusin","onFocus"),An("focusout","onBlur"),An(c1,"onTransitionRun"),An(f1,"onTransitionStart"),An(d1,"onTransitionCancel"),An(em,"onTransitionEnd"),Vt("onMouseEnter",["mouseout","mouseover"]),Vt("onMouseLeave",["mouseout","mouseover"]),Vt("onPointerEnter",["pointerout","pointerover"]),Vt("onPointerLeave",["pointerout","pointerover"]),It("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),It("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),It("onBeforeInput",["compositionend","keypress","textInput","paste"]),It("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),It("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),It("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Vi="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(" "),X1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Vi));function bg(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 d=void 0;if(t)for(var b=o.length-1;0<=b;b--){var E=o[b],T=E.instance,q=E.currentTarget;if(E=E.listener,T!==d&&c.isPropagationStopped())break e;d=E,c.currentTarget=q;try{d(c)}catch(I){cs(I)}c.currentTarget=null,d=T}else for(b=0;b<o.length;b++){if(E=o[b],T=E.instance,q=E.currentTarget,E=E.listener,T!==d&&c.isPropagationStopped())break e;d=E,c.currentTarget=q;try{d(c)}catch(I){cs(I)}c.currentTarget=null,d=T}}}}function Qe(e,t){var r=t[Ce];r===void 0&&(r=t[Ce]=new Set);var o=e+"__bubble";r.has(o)||(xg(t,e,2,!1),r.add(o))}function wf(e,t,r){var o=0;t&&(o|=4),xg(r,e,o,t)}var Rs="_reactListening"+Math.random().toString(36).slice(2);function Ef(e){if(!e[Rs]){e[Rs]=!0,at.forEach(function(r){r!=="selectionchange"&&(X1.has(r)||wf(r,!1,e),wf(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Rs]||(t[Rs]=!0,wf("selectionchange",!1,t))}}function xg(e,t,r,o){switch(Yg(t)){case 2:var c=SS;break;case 8:c=wS;break;default:c=Uf}r=c.bind(null,t,r,e),c=void 0,!Yu||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 Rf(e,t,r,o,c){var d=o;if((t&1)===0&&(t&2)===0&&o!==null)e:for(;;){if(o===null)return;var b=o.tag;if(b===3||b===4){var E=o.stateNode.containerInfo;if(E===c)break;if(b===4)for(b=o.return;b!==null;){var T=b.tag;if((T===3||T===4)&&b.stateNode.containerInfo===c)return;b=b.return}for(;E!==null;){if(b=Ve(E),b===null)return;if(T=b.tag,T===5||T===6||T===26||T===27){o=d=b;continue e}E=E.parentNode}}o=o.return}Ah(function(){var q=d,I=Vu(r),ne=[];e:{var F=tm.get(e);if(F!==void 0){var X=Po,ke=e;switch(e){case"keypress":if(ko(r)===0)break e;case"keydown":case"keyup":X=Vx;break;case"focusin":ke="focus",X=Xu;break;case"focusout":ke="blur",X=Xu;break;case"beforeblur":case"afterblur":X=Xu;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=jh;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=Kx;break;case Jh:case Ih:case Wh:X=Dx;break;case em:X=Fx;break;case"scroll":case"scrollend":X=Nx;break;case"wheel":X=Qx;break;case"copy":case"cut":case"paste":X=zx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":X=Mh;break;case"toggle":case"beforetoggle":X=Jx}var De=(t&4)!==0,it=!De&&(e==="scroll"||e==="scrollend"),P=De?F!==null?F+"Capture":null:F;De=[];for(var D=q,V;D!==null;){var ee=D;if(V=ee.stateNode,ee=ee.tag,ee!==5&&ee!==26&&ee!==27||V===null||P===null||(ee=oi(D,P),ee!=null&&De.push(qi(D,ee,V))),it)break;D=D.return}0<De.length&&(F=new X(F,ke,null,r,I),ne.push({event:F,listeners:De}))}}if((t&7)===0){e:{if(F=e==="mouseover"||e==="pointerover",X=e==="mouseout"||e==="pointerout",F&&r!==$u&&(ke=r.relatedTarget||r.fromElement)&&(Ve(ke)||ke[Se]))break e;if((X||F)&&(F=I.window===I?I:(F=I.ownerDocument)?F.defaultView||F.parentWindow:window,X?(ke=r.relatedTarget||r.toElement,X=q,ke=ke?Ve(ke):null,ke!==null&&(it=u(ke),De=ke.tag,ke!==it||De!==5&&De!==27&&De!==6)&&(ke=null)):(X=null,ke=q),X!==ke)){if(De=jh,ee="onMouseLeave",P="onMouseEnter",D="mouse",(e==="pointerout"||e==="pointerover")&&(De=Mh,ee="onPointerLeave",P="onPointerEnter",D="pointer"),it=X==null?F:vt(X),V=ke==null?F:vt(ke),F=new De(ee,D+"leave",X,r,I),F.target=it,F.relatedTarget=V,ee=null,Ve(I)===q&&(De=new De(P,D+"enter",ke,r,I),De.target=V,De.relatedTarget=it,ee=De),it=ee,X&&ke)t:{for(De=X,P=ke,D=0,V=De;V;V=Ol(V))D++;for(V=0,ee=P;ee;ee=Ol(ee))V++;for(;0<D-V;)De=Ol(De),D--;for(;0<V-D;)P=Ol(P),V--;for(;D--;){if(De===P||P!==null&&De===P.alternate)break t;De=Ol(De),P=Ol(P)}De=null}else De=null;X!==null&&Sg(ne,F,X,De,!1),ke!==null&&it!==null&&Sg(ne,it,ke,De,!0)}}e:{if(F=q?vt(q):window,X=F.nodeName&&F.nodeName.toLowerCase(),X==="select"||X==="input"&&F.type==="file")var ye=Bh;else if(Ph(F))if($h)ye=o1;else{ye=l1;var Ge=r1}else X=F.nodeName,!X||X.toLowerCase()!=="input"||F.type!=="checkbox"&&F.type!=="radio"?q&&Bu(q.elementType)&&(ye=Bh):ye=i1;if(ye&&(ye=ye(e,q))){Hh(ne,ye,r,I);break e}Ge&&Ge(e,F,q),e==="focusout"&&q&&F.type==="number"&&q.memoizedProps.value!=null&&Hu(F,"number",F.value)}switch(Ge=q?vt(q):window,e){case"focusin":(Ph(Ge)||Ge.contentEditable==="true")&&(nl=Ge,ec=q,pi=null);break;case"focusout":pi=ec=nl=null;break;case"mousedown":tc=!0;break;case"contextmenu":case"mouseup":case"dragend":tc=!1,Qh(ne,r,I);break;case"selectionchange":if(u1)break;case"keydown":case"keyup":Qh(ne,r,I)}var Ae;if(Zu)e:{switch(e){case"compositionstart":var Le="onCompositionStart";break e;case"compositionend":Le="onCompositionEnd";break e;case"compositionupdate":Le="onCompositionUpdate";break e}Le=void 0}else tl?kh(e,r)&&(Le="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(Le="onCompositionStart");Le&&(Dh&&r.locale!=="ko"&&(tl||Le!=="onCompositionStart"?Le==="onCompositionEnd"&&tl&&(Ae=Nh()):(Aa=I,Ku="value"in Aa?Aa.value:Aa.textContent,tl=!0)),Ge=Cs(q,Le),0<Ge.length&&(Le=new _h(Le,e,null,r,I),ne.push({event:Le,listeners:Ge}),Ae?Le.data=Ae:(Ae=Uh(r),Ae!==null&&(Le.data=Ae)))),(Ae=Wx?e1(e,r):t1(e,r))&&(Le=Cs(q,"onBeforeInput"),0<Le.length&&(Ge=new _h("onBeforeInput","beforeinput",null,r,I),ne.push({event:Ge,listeners:Le}),Ge.data=Ae)),K1(ne,e,q,r,I)}bg(ne,t)})}function qi(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Cs(e,t){for(var r=t+"Capture",o=[];e!==null;){var c=e,d=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||d===null||(c=oi(e,r),c!=null&&o.unshift(qi(e,c,d)),c=oi(e,t),c!=null&&o.push(qi(e,c,d))),e.tag===3)return o;e=e.return}return[]}function Ol(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Sg(e,t,r,o,c){for(var d=t._reactName,b=[];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=oi(r,d),q!=null&&b.unshift(qi(r,q,T))):c||(q=oi(r,d),q!=null&&b.push(qi(r,q,T)))),r=r.return}b.length!==0&&e.push({event:t,listeners:b})}var Q1=/\r\n?/g,Z1=/\u0000|\uFFFD/g;function wg(e){return(typeof e=="string"?e:""+e).replace(Q1,`
55
- `).replace(Z1,"")}function Eg(e,t){return t=wg(t),wg(e)===t}function Os(){}function lt(e,t,r,o,c,d){switch(r){case"children":typeof o=="string"?t==="body"||t==="textarea"&&o===""||Ir(e,o):(typeof o=="number"||typeof o=="bigint")&&t!=="body"&&Ir(e,""+o);break;case"className":ta(e,"class",o);break;case"tabIndex":ta(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":ta(e,r,o);break;case"style":Ch(e,o,d);break;case"data":if(t!=="object"){ta(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=Lo(""+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 d=="function"&&(r==="formAction"?(t!=="input"&&lt(e,t,"name",c.name,c,null),lt(e,t,"formEncType",c.formEncType,c,null),lt(e,t,"formMethod",c.formMethod,c,null),lt(e,t,"formTarget",c.formTarget,c,null)):(lt(e,t,"encType",c.encType,c,null),lt(e,t,"method",c.method,c,null),lt(e,t,"target",c.target,c,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(r);break}o=Lo(""+o),e.setAttribute(r,o);break;case"onClick":o!=null&&(e.onclick=Os);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=Lo(""+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),ea(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":ea(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=Ox.get(r)||r,ea(e,r,o))}}function Cf(e,t,r,o,c,d){switch(r){case"style":Ch(e,o,d);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"?Ir(e,o):(typeof o=="number"||typeof o=="bigint")&&Ir(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=Os);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!kn.hasOwnProperty(r))e:{if(r[0]==="o"&&r[1]==="n"&&(c=r.endsWith("Capture"),t=r.slice(2,c?r.length-7:void 0),d=e[he]||null,d=d!=null?d[r]:null,typeof d=="function"&&e.removeEventListener(t,d,c),typeof o=="function")){typeof d!="function"&&d!==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,""):ea(e,r,o)}}}function Pt(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,d;for(d in r)if(r.hasOwnProperty(d)){var b=r[d];if(b!=null)switch(d){case"src":o=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:lt(e,t,d,b,r,null)}}c&&lt(e,t,"srcSet",r.srcSet,r,null),o&&lt(e,t,"src",r.src,r,null);return;case"input":Qe("invalid",e);var E=d=b=c=null,T=null,q=null;for(o in r)if(r.hasOwnProperty(o)){var I=r[o];if(I!=null)switch(o){case"name":c=I;break;case"type":b=I;break;case"checked":T=I;break;case"defaultChecked":q=I;break;case"value":d=I;break;case"defaultValue":E=I;break;case"children":case"dangerouslySetInnerHTML":if(I!=null)throw Error(i(137,t));break;default:lt(e,t,o,I,r,null)}}Sh(e,d,E,T,q,b,c,!1),Mo(e);return;case"select":Qe("invalid",e),o=b=d=null;for(c in r)if(r.hasOwnProperty(c)&&(E=r[c],E!=null))switch(c){case"value":d=E;break;case"defaultValue":b=E;break;case"multiple":o=E;default:lt(e,t,c,E,r,null)}t=d,r=b,e.multiple=!!o,t!=null?Jr(e,!!o,t,!1):r!=null&&Jr(e,!!o,r,!0);return;case"textarea":Qe("invalid",e),d=c=o=null;for(b in r)if(r.hasOwnProperty(b)&&(E=r[b],E!=null))switch(b){case"value":o=E;break;case"defaultValue":c=E;break;case"children":d=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(i(91));break;default:lt(e,t,b,E,r,null)}Eh(e,o,c,d),Mo(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:lt(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<Vi.length;o++)Qe(Vi[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:lt(e,t,q,o,r,null)}return;default:if(Bu(t)){for(I in r)r.hasOwnProperty(I)&&(o=r[I],o!==void 0&&Cf(e,t,I,o,r,void 0));return}}for(E in r)r.hasOwnProperty(E)&&(o=r[E],o!=null&&lt(e,t,E,o,r,null))}function J1(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,d=null,b=null,E=null,T=null,q=null,I=null;for(X in r){var ne=r[X];if(r.hasOwnProperty(X)&&ne!=null)switch(X){case"checked":break;case"value":break;case"defaultValue":T=ne;default:o.hasOwnProperty(X)||lt(e,t,X,null,o,ne)}}for(var F in o){var X=o[F];if(ne=r[F],o.hasOwnProperty(F)&&(X!=null||ne!=null))switch(F){case"type":d=X;break;case"name":c=X;break;case"checked":q=X;break;case"defaultChecked":I=X;break;case"value":b=X;break;case"defaultValue":E=X;break;case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(i(137,t));break;default:X!==ne&&lt(e,t,F,X,o,ne)}}Pu(e,b,E,T,q,I,d,c);return;case"select":X=b=E=F=null;for(d in r)if(T=r[d],r.hasOwnProperty(d)&&T!=null)switch(d){case"value":break;case"multiple":X=T;default:o.hasOwnProperty(d)||lt(e,t,d,null,o,T)}for(c in o)if(d=o[c],T=r[c],o.hasOwnProperty(c)&&(d!=null||T!=null))switch(c){case"value":F=d;break;case"defaultValue":E=d;break;case"multiple":b=d;default:d!==T&&lt(e,t,c,d,o,T)}t=E,r=b,o=X,F!=null?Jr(e,!!r,F,!1):!!o!=!!r&&(t!=null?Jr(e,!!r,t,!0):Jr(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:lt(e,t,E,null,o,c)}for(b in o)if(c=o[b],d=r[b],o.hasOwnProperty(b)&&(c!=null||d!=null))switch(b){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!==d&&lt(e,t,b,c,o,d)}wh(e,F,X);return;case"option":for(var ke in r)if(F=r[ke],r.hasOwnProperty(ke)&&F!=null&&!o.hasOwnProperty(ke))switch(ke){case"selected":e.selected=!1;break;default:lt(e,t,ke,null,o,F)}for(T in o)if(F=o[T],X=r[T],o.hasOwnProperty(T)&&F!==X&&(F!=null||X!=null))switch(T){case"selected":e.selected=F&&typeof F!="function"&&typeof F!="symbol";break;default:lt(e,t,T,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 De in r)F=r[De],r.hasOwnProperty(De)&&F!=null&&!o.hasOwnProperty(De)&&lt(e,t,De,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:lt(e,t,q,F,o,X)}return;default:if(Bu(t)){for(var it in r)F=r[it],r.hasOwnProperty(it)&&F!==void 0&&!o.hasOwnProperty(it)&&Cf(e,t,it,void 0,o,F);for(I in o)F=o[I],X=r[I],!o.hasOwnProperty(I)||F===X||F===void 0&&X===void 0||Cf(e,t,I,F,o,X);return}}for(var P in r)F=r[P],r.hasOwnProperty(P)&&F!=null&&!o.hasOwnProperty(P)&&lt(e,t,P,null,o,F);for(ne in o)F=o[ne],X=r[ne],!o.hasOwnProperty(ne)||F===X||F==null&&X==null||lt(e,t,ne,F,o,X)}var Of=null,Af=null;function As(e){return e.nodeType===9?e:e.ownerDocument}function Rg(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 Cg(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 Nf(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 Tf=null;function I1(){var e=window.event;return e&&e.type==="popstate"?e===Tf?!1:(Tf=e,!0):(Tf=null,!1)}var Og=typeof setTimeout=="function"?setTimeout:void 0,W1=typeof clearTimeout=="function"?clearTimeout:void 0,Ag=typeof Promise=="function"?Promise:void 0,eS=typeof queueMicrotask=="function"?queueMicrotask:typeof Ag<"u"?function(e){return Ag.resolve(null).then(e).catch(tS)}:Og;function tS(e){setTimeout(function(){throw e})}function qa(e){return e==="head"}function Ng(e,t){var r=t,o=0,c=0;do{var d=r.nextSibling;if(e.removeChild(r),d&&d.nodeType===8)if(r=d.data,r==="/$"){if(0<o&&8>o){r=o;var b=e.ownerDocument;if(r&1&&Yi(b.documentElement),r&2&&Yi(b.body),r&4)for(r=b.head,Yi(r),b=r.firstChild;b;){var E=b.nextSibling,T=b.nodeName;b[Ee]||T==="SCRIPT"||T==="STYLE"||T==="LINK"&&b.rel.toLowerCase()==="stylesheet"||r.removeChild(b),b=E}}if(c===0){e.removeChild(d),Ii(t);return}c--}else r==="$"||r==="$?"||r==="$!"?c++:o=r.charCodeAt(0)-48;else o=0;r=d}while(r);Ii(t)}function jf(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":jf(r),Oe(r);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(r.rel.toLowerCase()==="stylesheet")continue}e.removeChild(r)}}function nS(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[Ee])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==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(d=e.getAttribute("src"),(d!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var d=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=Tn(e.nextSibling),e===null)break}return null}function aS(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 _f(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function rS(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 Mf=null;function Tg(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 jg(e,t,r){switch(t=As(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 Yi(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Oe(e)}var wn=new Map,_g=new Set;function Ns(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var pa=Z.d;Z.d={f:lS,r:iS,D:oS,C:sS,L:uS,m:cS,X:dS,S:fS,M:hS};function lS(){var e=pa.f(),t=bs();return e||t}function iS(e){var t=et(e);t!==null&&t.tag===5&&t.type==="form"?Jm(t):pa.r(e)}var Al=typeof document>"u"?null:document;function Mg(e,t,r){var o=Al;if(o&&typeof t=="string"&&t){var c=pn(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof r=="string"&&(c+='[crossorigin="'+r+'"]'),_g.has(c)||(_g.add(c),e={rel:e,crossOrigin:r,href:t},o.querySelector(c)===null&&(t=o.createElement("link"),Pt(t,"link",e),Be(t),o.head.appendChild(t)))}}function oS(e){pa.D(e),Mg("dns-prefetch",e,null)}function sS(e,t){pa.C(e,t),Mg("preconnect",e,t)}function uS(e,t,r){pa.L(e,t,r);var o=Al;if(o&&e&&t){var c='link[rel="preload"][as="'+pn(t)+'"]';t==="image"&&r&&r.imageSrcSet?(c+='[imagesrcset="'+pn(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(c+='[imagesizes="'+pn(r.imageSizes)+'"]')):c+='[href="'+pn(e)+'"]';var d=c;switch(t){case"style":d=Nl(e);break;case"script":d=Tl(e)}wn.has(d)||(e=g({rel:"preload",href:t==="image"&&r&&r.imageSrcSet?void 0:e,as:t},r),wn.set(d,e),o.querySelector(c)!==null||t==="style"&&o.querySelector(Ki(d))||t==="script"&&o.querySelector(Gi(d))||(t=o.createElement("link"),Pt(t,"link",e),Be(t),o.head.appendChild(t)))}}function cS(e,t){pa.m(e,t);var r=Al;if(r&&e){var o=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+pn(o)+'"][href="'+pn(e)+'"]',d=c;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=Tl(e)}if(!wn.has(d)&&(e=g({rel:"modulepreload",href:e},t),wn.set(d,e),r.querySelector(c)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(Gi(d)))return}o=r.createElement("link"),Pt(o,"link",e),Be(o),r.head.appendChild(o)}}}function fS(e,t,r){pa.S(e,t,r);var o=Al;if(o&&e){var c=yt(o).hoistableStyles,d=Nl(e);t=t||"default";var b=c.get(d);if(!b){var E={loading:0,preload:null};if(b=o.querySelector(Ki(d)))E.loading=5;else{e=g({rel:"stylesheet",href:e,"data-precedence":t},r),(r=wn.get(d))&&Df(e,r);var T=b=o.createElement("link");Be(T),Pt(T,"link",e),T._p=new Promise(function(q,I){T.onload=q,T.onerror=I}),T.addEventListener("load",function(){E.loading|=1}),T.addEventListener("error",function(){E.loading|=2}),E.loading|=4,Ts(b,t,o)}b={type:"stylesheet",instance:b,count:1,state:E},c.set(d,b)}}}function dS(e,t){pa.X(e,t);var r=Al;if(r&&e){var o=yt(r).hoistableScripts,c=Tl(e),d=o.get(c);d||(d=r.querySelector(Gi(c)),d||(e=g({src:e,async:!0},t),(t=wn.get(c))&&Lf(e,t),d=r.createElement("script"),Be(d),Pt(d,"link",e),r.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},o.set(c,d))}}function hS(e,t){pa.M(e,t);var r=Al;if(r&&e){var o=yt(r).hoistableScripts,c=Tl(e),d=o.get(c);d||(d=r.querySelector(Gi(c)),d||(e=g({src:e,async:!0,type:"module"},t),(t=wn.get(c))&&Lf(e,t),d=r.createElement("script"),Be(d),Pt(d,"link",e),r.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},o.set(c,d))}}function Dg(e,t,r,o){var c=(c=pe.current)?Ns(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=Nl(r.href),r=yt(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=Nl(r.href);var d=yt(c).hoistableStyles,b=d.get(e);if(b||(c=c.ownerDocument||c,b={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,b),(d=c.querySelector(Ki(e)))&&!d._p&&(b.instance=d,b.state.loading=5),wn.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},wn.set(e,r),d||mS(c,e,r,b.state))),t&&o===null)throw Error(i(528,""));return b}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=Tl(r),r=yt(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 Nl(e){return'href="'+pn(e)+'"'}function Ki(e){return'link[rel="stylesheet"]['+e+"]"}function Lg(e){return g({},e,{"data-precedence":e.precedence,precedence:null})}function mS(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}),Pt(t,"link",r),Be(t),e.head.appendChild(t))}function Tl(e){return'[src="'+pn(e)+'"]'}function Gi(e){return"script[async]"+e}function zg(e,t,r){if(t.count++,t.instance===null)switch(t.type){case"style":var o=e.querySelector('style[data-href~="'+pn(r.href)+'"]');if(o)return t.instance=o,Be(o),o;var c=g({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),Be(o),Pt(o,"style",c),Ts(o,r.precedence,e),t.instance=o;case"stylesheet":c=Nl(r.href);var d=e.querySelector(Ki(c));if(d)return t.state.loading|=4,t.instance=d,Be(d),d;o=Lg(r),(c=wn.get(c))&&Df(o,c),d=(e.ownerDocument||e).createElement("link"),Be(d);var b=d;return b._p=new Promise(function(E,T){b.onload=E,b.onerror=T}),Pt(d,"link",o),t.state.loading|=4,Ts(d,r.precedence,e),t.instance=d;case"script":return d=Tl(r.src),(c=e.querySelector(Gi(d)))?(t.instance=c,Be(c),c):(o=r,(c=wn.get(d))&&(o=g({},r),Lf(o,c)),e=e.ownerDocument||e,c=e.createElement("script"),Be(c),Pt(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,Ts(o,r.precedence,e));return t.instance}function Ts(e,t,r){for(var o=r.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=o.length?o[o.length-1]:null,d=c,b=0;b<o.length;b++){var E=o[b];if(E.dataset.precedence===t)d=E;else if(d!==c)break}d?d.parentNode.insertBefore(e,d.nextSibling):(t=r.nodeType===9?r.head:r,t.insertBefore(e,t.firstChild))}function Df(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Lf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var js=null;function kg(e,t,r){if(js===null){var o=new Map,c=js=new Map;c.set(r,o)}else c=js,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 d=r[c];if(!(d[Ee]||d[le]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var b=d.getAttribute(t)||"";b=e+b;var E=o.get(b);E?E.push(d):o.set(b,[d])}}return o}function Ug(e,t,r){e=e.ownerDocument||e,e.head.insertBefore(r,t==="title"?e.querySelector("head > title"):null)}function pS(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 Pg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var Fi=null;function gS(){}function vS(e,t,r){if(Fi===null)throw Error(i(475));var o=Fi;if(t.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(t.state.loading&4)===0){if(t.instance===null){var c=Nl(r.href),d=e.querySelector(Ki(c));if(d){e=d._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(o.count++,o=_s.bind(o),e.then(o,o)),t.state.loading|=4,t.instance=d,Be(d);return}d=e.ownerDocument||e,r=Lg(r),(c=wn.get(c))&&Df(r,c),d=d.createElement("link"),Be(d);var b=d;b._p=new Promise(function(E,T){b.onload=E,b.onerror=T}),Pt(d,"link",r),t.instance=d}o.stylesheets===null&&(o.stylesheets=new Map),o.stylesheets.set(t,e),(e=t.state.preload)&&(t.state.loading&3)===0&&(o.count++,t=_s.bind(o),e.addEventListener("load",t),e.addEventListener("error",t))}}function yS(){if(Fi===null)throw Error(i(475));var e=Fi;return e.stylesheets&&e.count===0&&zf(e,e.stylesheets),0<e.count?function(t){var r=setTimeout(function(){if(e.stylesheets&&zf(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 _s(){if(this.count--,this.count===0){if(this.stylesheets)zf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Ms=null;function zf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Ms=new Map,t.forEach(bS,e),Ms=null,_s.call(e))}function bS(e,t){if(!(t.state.loading&4)){var r=Ms.get(e);if(r)var o=r.get(null);else{r=new Map,Ms.set(e,r);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<c.length;d++){var b=c[d];(b.nodeName==="LINK"||b.getAttribute("media")!=="not all")&&(r.set(b.dataset.precedence,b),o=b)}o&&r.set(null,o)}c=t.instance,b=c.getAttribute("data-precedence"),d=r.get(b)||o,d===o&&r.set(null,c),r.set(b,c),this.count++,o=_s.bind(this),c.addEventListener("load",o),c.addEventListener("error",o),d?d.parentNode.insertBefore(c,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),t.state.loading|=4}}var Xi={$$typeof:z,Provider:null,Consumer:null,_currentValue:$,_currentValue2:$,_threadCount:0};function xS(e,t,r,o,c,d,b,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=Qr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Qr(0),this.hiddenUpdates=Qr(null),this.identifierPrefix=o,this.onUncaughtError=c,this.onCaughtError=d,this.onRecoverableError=b,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=E,this.incompleteTransitions=new Map}function Hg(e,t,r,o,c,d,b,E,T,q,I,ne){return e=new xS(e,t,r,b,E,T,q,ne),t=1,d===!0&&(t|=24),d=en(3,null,null,t),e.current=d,d.stateNode=e,t=pc(),t.refCount++,e.pooledCache=t,t.refCount++,d.memoizedState={element:o,isDehydrated:r,cache:t},bc(d),e}function Bg(e){return e?(e=il,e):il}function $g(e,t,r,o,c,d){c=Bg(c),o.context===null?o.context=c:o.pendingContext=c,o=ja(t),o.payload={element:r},d=d===void 0?null:d,d!==null&&(o.callback=d),r=_a(e,o,t),r!==null&&(ln(r,e,t),Ri(r,e,t))}function Vg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function kf(e,t){Vg(e,t),(e=e.alternate)&&Vg(e,t)}function qg(e){if(e.tag===13){var t=ll(e,67108864);t!==null&&ln(t,e,67108864),kf(e,67108864)}}var Ds=!0;function SS(e,t,r,o){var c=M.T;M.T=null;var d=Z.p;try{Z.p=2,Uf(e,t,r,o)}finally{Z.p=d,M.T=c}}function wS(e,t,r,o){var c=M.T;M.T=null;var d=Z.p;try{Z.p=8,Uf(e,t,r,o)}finally{Z.p=d,M.T=c}}function Uf(e,t,r,o){if(Ds){var c=Pf(o);if(c===null)Rf(e,t,o,Ls,r),Kg(e,o);else if(RS(c,e,t,r,o))o.stopPropagation();else if(Kg(e,o),t&4&&-1<ES.indexOf(e)){for(;c!==null;){var d=et(c);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var b=In(d.pendingLanes);if(b!==0){var E=d;for(E.pendingLanes|=2,E.entangledLanes|=2;b;){var T=1<<31-zt(b);E.entanglements[1]|=T,b&=~T}$n(d),(tt&6)===0&&(vs=_e()+500,$i(0))}}break;case 13:E=ll(d,2),E!==null&&ln(E,d,2),bs(),kf(d,2)}if(d=Pf(o),d===null&&Rf(e,t,o,Ls,r),d===c)break;c=d}c!==null&&o.stopPropagation()}else Rf(e,t,o,null,r)}}function Pf(e){return e=Vu(e),Hf(e)}var Ls=null;function Hf(e){if(Ls=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 Ls=e,null}function Yg(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(ot()){case Cn:return 2;case Gr:return 8;case Fr:case Jn:return 32;case Ra:return 268435456;default:return 32}default:return 32}}var Bf=!1,Ya=null,Ka=null,Ga=null,Qi=new Map,Zi=new Map,Fa=[],ES="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 Kg(e,t){switch(e){case"focusin":case"focusout":Ya=null;break;case"dragenter":case"dragleave":Ka=null;break;case"mouseover":case"mouseout":Ga=null;break;case"pointerover":case"pointerout":Qi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Zi.delete(t.pointerId)}}function Ji(e,t,r,o,c,d){return e===null||e.nativeEvent!==d?(e={blockedOn:t,domEventName:r,eventSystemFlags:o,nativeEvent:d,targetContainers:[c]},t!==null&&(t=et(t),t!==null&&qg(t)),e):(e.eventSystemFlags|=o,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function RS(e,t,r,o,c){switch(t){case"focusin":return Ya=Ji(Ya,e,t,r,o,c),!0;case"dragenter":return Ka=Ji(Ka,e,t,r,o,c),!0;case"mouseover":return Ga=Ji(Ga,e,t,r,o,c),!0;case"pointerover":var d=c.pointerId;return Qi.set(d,Ji(Qi.get(d)||null,e,t,r,o,c)),!0;case"gotpointercapture":return d=c.pointerId,Zi.set(d,Ji(Zi.get(d)||null,e,t,r,o,c)),!0}return!1}function Gg(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,B(e.priority,function(){if(r.tag===13){var o=rn();o=li(o);var c=ll(r,o);c!==null&&ln(c,r,o),kf(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 zs(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Pf(e.nativeEvent);if(r===null){r=e.nativeEvent;var o=new r.constructor(r.type,r);$u=o,r.target.dispatchEvent(o),$u=null}else return t=et(r),t!==null&&qg(t),e.blockedOn=r,!1;t.shift()}return!0}function Fg(e,t,r){zs(e)&&r.delete(t)}function CS(){Bf=!1,Ya!==null&&zs(Ya)&&(Ya=null),Ka!==null&&zs(Ka)&&(Ka=null),Ga!==null&&zs(Ga)&&(Ga=null),Qi.forEach(Fg),Zi.forEach(Fg)}function ks(e,t){e.blockedOn===t&&(e.blockedOn=null,Bf||(Bf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,CS)))}var Us=null;function Xg(e){Us!==e&&(Us=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Us===e&&(Us=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(Hf(o||r)===null)continue;break}var d=et(r);d!==null&&(e.splice(t,3),t-=3,Pc(d,{pending:!0,data:c,method:r.method,action:o},o,c))}}))}function Ii(e){function t(T){return ks(T,e)}Ya!==null&&ks(Ya,e),Ka!==null&&ks(Ka,e),Ga!==null&&ks(Ga,e),Qi.forEach(t),Zi.forEach(t);for(var r=0;r<Fa.length;r++){var o=Fa[r];o.blockedOn===e&&(o.blockedOn=null)}for(;0<Fa.length&&(r=Fa[0],r.blockedOn===null);)Gg(r),r.blockedOn===null&&Fa.shift();if(r=(e.ownerDocument||e).$$reactFormReplay,r!=null)for(o=0;o<r.length;o+=3){var c=r[o],d=r[o+1],b=c[he]||null;if(typeof d=="function")b||Xg(r);else if(b){var E=null;if(d&&d.hasAttribute("formAction")){if(c=d,b=d[he]||null)E=b.formAction;else if(Hf(c)!==null)continue}else E=b.action;typeof E=="function"?r[o+1]=E:(r.splice(o,3),o-=3),Xg(r)}}}function $f(e){this._internalRoot=e}Ps.prototype.render=$f.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var r=t.current,o=rn();$g(r,o,e,t,null,null)},Ps.prototype.unmount=$f.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;$g(e.current,2,null,e,null,null),bs(),t[Se]=null}};function Ps(e){this._internalRoot=e}Ps.prototype.unstable_scheduleHydration=function(e){if(e){var t=_();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Fa.length&&t!==0&&t<Fa[r].priority;r++);Fa.splice(r,0,e),r===0&&Gg(e)}};var Qg=a.version;if(Qg!=="19.1.0")throw Error(i(527,Qg,"19.1.0"));Z.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 OS={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:M,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Hs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hs.isDisabled&&Hs.supportsFiber)try{Kt=Hs.inject(OS),mt=Hs}catch{}}return to.createRoot=function(e,t){if(!s(e))throw Error(i(299));var r=!1,o="",c=fp,d=dp,b=hp,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&&(d=t.onCaughtError),t.onRecoverableError!==void 0&&(b=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(E=t.unstable_transitionCallbacks)),t=Hg(e,1,!1,null,null,r,o,c,d,b,E,null),e[Se]=t.current,Ef(e),new $f(t)},to.hydrateRoot=function(e,t,r){if(!s(e))throw Error(i(299));var o=!1,c="",d=fp,b=dp,E=hp,T=null,q=null;return r!=null&&(r.unstable_strictMode===!0&&(o=!0),r.identifierPrefix!==void 0&&(c=r.identifierPrefix),r.onUncaughtError!==void 0&&(d=r.onUncaughtError),r.onCaughtError!==void 0&&(b=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=Hg(e,1,!0,t,r??null,o,c,d,b,E,T,q),t.context=Bg(null),r=t.current,o=rn(),o=li(o),c=ja(o),c.callback=null,_a(r,c,o),r=o,t.current.lanes=r,fr(t,r),$n(t),e[Se]=t.current,Ef(e),new Ps(t)},to.version="19.1.0",to}var Cv;function Qw(){if(Cv)return Kf.exports;Cv=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(),Kf.exports=Xw(),Kf.exports}var Zw=Qw();/**
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
56
  * react-router v7.7.0
57
57
  *
58
58
  * Copyright (c) Remix Software Inc.
@@ -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 Vy=n=>{throw TypeError(n)},Jw=(n,a,l)=>a.has(n)||Vy("Cannot "+l),Qf=(n,a,l)=>(Jw(n,a,"read from private field"),l?l.call(n):a.get(n)),Iw=(n,a,l)=>a.has(n)?Vy("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(n):a.set(n,l);function Ww(n={}){let{initialEntries:a=["/"],initialIndex:l,v5Compat:i=!1}=n,s;s=a.map((w,C)=>g(w,typeof w=="string"?null:w.state,C===0?"default":void 0));let u=p(l??s.length-1),f="POP",h=null;function p(w){return Math.min(Math.max(w,0),s.length-1)}function m(){return s[u]}function g(w,C=null,R){let j=Sd(s?m().pathname:"/",w,C,R);return St(j.pathname.charAt(0)==="/",`relative pathnames are not supported in memory history: ${JSON.stringify(w)}`),j}function x(w){return typeof w=="string"?w:tr(w)}return{get index(){return u},get action(){return f},get location(){return m()},createHref:x,createURL(w){return new URL(x(w),"http://localhost")},encodeLocation(w){let C=typeof w=="string"?Ea(w):w;return{pathname:C.pathname||"",search:C.search||"",hash:C.hash||""}},push(w,C){f="PUSH";let R=g(w,C);u+=1,s.splice(u,s.length,R),i&&h&&h({action:f,location:R,delta:1})},replace(w,C){f="REPLACE";let R=g(w,C);s[u]=R,i&&h&&h({action:f,location:R,delta:0})},go(w){f="POP";let C=p(u+w),R=s[C];u=C,h&&h({action:f,location:R,delta:w})},listen(w){return h=w,()=>{h=null}}}}function Fe(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}function St(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 Sd(n,a,l=null,i){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof a=="string"?Ea(a):a,state:l,key:a&&a.key||i||eE()}}function tr({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 Ea(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 tE(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:tr(n);return i=i.replace(/ $/,"%20"),!a&&i.startsWith("//")&&(i=l+i),new URL(i,l)}var oo,Ov=class{constructor(n){if(Iw(this,oo,new Map),n)for(let[a,l]of n)this.set(a,l)}get(n){if(Qf(this,oo).has(n))return Qf(this,oo).get(n);if(n.defaultValue!==void 0)return n.defaultValue;throw new Error("No value found for context")}set(n,a){Qf(this,oo).set(n,a)}};oo=new WeakMap;var nE=new Set(["lazy","caseSensitive","path","id","index","children"]);function aE(n){return nE.has(n)}var rE=new Set(["lazy","caseSensitive","path","id","index","unstable_middleware","children"]);function lE(n){return rE.has(n)}function iE(n){return n.index===!0}function mo(n,a,l=[],i={},s=!1){return n.map((u,f)=>{let h=[...l,String(f)],p=typeof u.id=="string"?u.id:h.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`),iE(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=mo(u.children,a,h,i,s)),m}})}function Ia(n,a,l="/"){return Ws(n,a,l,!1)}function Ws(n,a,l,i){let s=typeof a=="string"?Ea(a):a,u=Rn(s.pathname||"/",l);if(u==null)return null;let f=qy(n);sE(f);let h=null;for(let p=0;h==null&&p<f.length;++p){let m=bE(u);h=vE(f[p],m,i)}return h}function oE(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 qy(n,a=[],l=[],i=""){let s=(u,f,h)=>{let p={relativePath:h===void 0?u.path||"":h,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=Kn([i,p.relativePath]),g=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}".`),qy(u.children,a,g,m)),!(u.path==null&&!u.index)&&a.push({path:m,score:pE(m,u.index),routesMeta:g})};return n.forEach((u,f)=>{if(u.path===""||!u.path?.includes("?"))s(u,f);else for(let h of Yy(u.path))s(u,f,h)}),a}function Yy(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=Yy(i.join("/")),h=[];return h.push(...f.map(p=>p===""?u:[u,p].join("/"))),s&&h.push(...f),h.map(p=>n.startsWith("/")&&p===""?"/":p)}function sE(n){n.sort((a,l)=>a.score!==l.score?l.score-a.score:gE(a.routesMeta.map(i=>i.childrenIndex),l.routesMeta.map(i=>i.childrenIndex)))}var uE=/^:[\w-]+$/,cE=3,fE=2,dE=1,hE=10,mE=-2,Av=n=>n==="*";function pE(n,a){let l=n.split("/"),i=l.length;return l.some(Av)&&(i+=mE),a&&(i+=fE),l.filter(s=>!Av(s)).reduce((s,u)=>s+(uE.test(u)?cE:u===""?dE:hE),i)}function gE(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 vE(n,a,l=!1){let{routesMeta:i}=n,s={},u="/",f=[];for(let h=0;h<i.length;++h){let p=i[h],m=h===i.length-1,g=u==="/"?a:a.slice(u.length)||"/",x=uu({path:p.relativePath,caseSensitive:p.caseSensitive,end:m},g),S=p.route;if(!x&&m&&l&&!i[i.length-1].route.index&&(x=uu({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},g)),!x)return null;Object.assign(s,x.params),f.push({params:s,pathname:Kn([u,x.pathname]),pathnameBase:EE(Kn([u,x.pathnameBase])),route:S}),x.pathnameBase!=="/"&&(u=Kn([u,x.pathnameBase]))}return f}function uu(n,a){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[l,i]=yE(n.path,n.caseSensitive,n.end),s=a.match(l);if(!s)return null;let u=s[0],f=u.replace(/(.)\/+$/,"$1"),h=s.slice(1);return{params:i.reduce((m,{paramName:g,isOptional:x},S)=>{if(g==="*"){let C=h[S]||"";f=u.slice(0,u.length-C.length).replace(/(.)\/+$/,"$1")}const w=h[S];return x&&!w?m[g]=void 0:m[g]=(w||"").replace(/%2F/g,"/"),m},{}),pathname:u,pathnameBase:f,pattern:n}}function yE(n,a=!1,l=!0){St(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,h,p)=>(i.push({paramName:h,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 bE(n){try{return n.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return St(!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 Rn(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 xE({basename:n,pathname:a}){return a==="/"?n:Kn([n,a])}function SE(n,a="/"){let{pathname:l,search:i="",hash:s=""}=typeof n=="string"?Ea(n):n;return{pathname:l?l.startsWith("/")?l:wE(l,a):a,search:RE(i),hash:CE(s)}}function wE(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 Zf(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 Ky(n){return n.filter((a,l)=>l===0||a.route.path&&a.route.path.length>0)}function bu(n){let a=Ky(n);return a.map((l,i)=>i===a.length-1?l.pathname:l.pathnameBase)}function xu(n,a,l,i=!1){let s;typeof n=="string"?s=Ea(n):(s={...n},Fe(!s.pathname||!s.pathname.includes("?"),Zf("?","pathname","search",s)),Fe(!s.pathname||!s.pathname.includes("#"),Zf("#","pathname","hash",s)),Fe(!s.search||!s.search.includes("#"),Zf("#","search","hash",s)));let u=n===""||s.pathname==="",f=u?"/":s.pathname,h;if(f==null)h=l;else{let x=a.length-1;if(!i&&f.startsWith("..")){let S=f.split("/");for(;S[0]==="..";)S.shift(),x-=1;s.pathname=S.join("/")}h=x>=0?a[x]:"/"}let p=SE(s,h),m=f&&f!=="/"&&f.endsWith("/"),g=(u||f===".")&&l.endsWith("/");return!p.pathname.endsWith("/")&&(m||g)&&(p.pathname+="/"),p}var Kn=n=>n.join("/").replace(/\/\/+/g,"/"),EE=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),RE=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,CE=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,wd=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 po(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}var Gy=["POST","PUT","PATCH","DELETE"],OE=new Set(Gy),AE=["GET",...Gy],NE=new Set(AE),TE=new Set([301,302,303,307,308]),jE=new Set([307,308]),Jf={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},_E={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},no={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},ME=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Hd=n=>ME.test(n),DE=n=>({hasErrorBoundary:!!n.hasErrorBoundary}),Fy="remix-router-transitions",Xy=Symbol("ResetLoaderData");function LE(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||DE,u={},f=mo(n.routes,s,void 0,u),h,p=n.basename||"/",m=n.dataStrategy||HE,g={unstable_middleware:!1,...n.future},x=null,S=new Set,w=null,C=null,R=null,j=n.hydrationData!=null,O=Ia(f,n.history.location,p),U=!1,z=null,H;if(O==null&&!n.patchRoutesOnNavigation){let _=En(404,{pathname:n.history.location.pathname}),{matches:B,route:Q}=Hv(f);H=!0,O=B,z={[Q.id]:_}}else if(O&&!n.hydrationData&&dr(O,f,n.history.location.pathname).active&&(O=null),O)if(O.some(_=>_.route.lazy))H=!1;else if(!O.some(_=>_.route.loader))H=!0;else{let _=n.hydrationData?n.hydrationData.loaderData:null,B=n.hydrationData?n.hydrationData.errors:null;if(B){let Q=O.findIndex(le=>B[le.route.id]!==void 0);H=O.slice(0,Q+1).every(le=>!Rd(le.route,_,B))}else H=O.every(Q=>!Rd(Q.route,_,B))}else{H=!1,O=[];let _=dr(null,f,n.history.location.pathname);_.active&&_.matches&&(U=!0,O=_.matches)}let k,A={historyAction:n.history.action,location:n.history.location,matches:O,initialized:H,navigation:Jf,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},Y="POP",J=!1,ae,ie=!1,Re=new Map,me=null,oe=!1,fe=!1,de=new Set,M=new Map,Z=0,$=-1,ge=new Map,N=new Set,K=new Map,L=new Map,G=new Set,W=new Map,se,pe=null;function ve(){if(x=n.history.listen(({action:_,location:B,delta:Q})=>{if(se){se(),se=void 0;return}St(W.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 le=Ao({currentLocation:A.location,nextLocation:B,historyAction:_});if(le&&Q!=null){let he=new Promise(Se=>{se=Se});n.history.go(Q*-1),zn(le,{state:"blocked",location:B,proceed(){zn(le,{state:"proceeding",proceed:void 0,reset:void 0,location:B}),he.then(()=>n.history.go(Q))},reset(){let Se=new Map(A.blockers);Se.set(le,no),je({blockers:Se})}});return}return ce(_,B)}),l){ZE(a,Re);let _=()=>JE(a,Re);a.addEventListener("pagehide",_),me=()=>a.removeEventListener("pagehide",_)}return A.initialized||ce("POP",A.location,{initialHydration:!0}),k}function ze(){x&&x(),me&&me(),S.clear(),ae&&ae.abort(),A.fetchers.forEach((_,B)=>zt(B)),A.blockers.forEach((_,B)=>cr(B))}function Ze(_){return S.add(_),()=>S.delete(_)}function je(_,B={}){_.matches&&(_.matches=_.matches.map(he=>{let Se=u[he.route.id],Ce=he.route;return Ce.element!==Se.element||Ce.errorElement!==Se.errorElement||Ce.hydrateFallbackElement!==Se.hydrateFallbackElement?{...he,route:Se}:he})),A={...A,..._};let Q=[],le=[];A.fetchers.forEach((he,Se)=>{he.state==="idle"&&(G.has(Se)?Q.push(Se):le.push(Se))}),G.forEach(he=>{!A.fetchers.has(he)&&!M.has(he)&&Q.push(he)}),[...S].forEach(he=>he(A,{deletedFetchers:Q,viewTransitionOpts:B.viewTransitionOpts,flushSync:B.flushSync===!0})),Q.forEach(he=>zt(he)),le.forEach(he=>A.fetchers.delete(he))}function re(_,B,{flushSync:Q}={}){let le=A.actionData!=null&&A.navigation.formMethod!=null&&Zt(A.navigation.formMethod)&&A.navigation.state==="loading"&&_.state?._isRedirect!==!0,he;B.actionData?Object.keys(B.actionData).length>0?he=B.actionData:he=null:le?he=A.actionData:he=null;let Se=B.loaderData?Uv(A.loaderData,B.loaderData,B.matches||[],B.errors):A.loaderData,Ce=A.blockers;Ce.size>0&&(Ce=new Map(Ce),Ce.forEach((Ee,Oe)=>Ce.set(Oe,no)));let we=oe?!1:To(_,B.matches||A.matches),Te=J===!0||A.navigation.formMethod!=null&&Zt(A.navigation.formMethod)&&_.state?._isRedirect!==!0;h&&(f=h,h=void 0),oe||Y==="POP"||(Y==="PUSH"?n.history.push(_,_.state):Y==="REPLACE"&&n.history.replace(_,_.state));let Me;if(Y==="POP"){let Ee=Re.get(A.location.pathname);Ee&&Ee.has(_.pathname)?Me={currentLocation:A.location,nextLocation:_}:Re.has(_.pathname)&&(Me={currentLocation:_,nextLocation:A.location})}else if(ie){let Ee=Re.get(A.location.pathname);Ee?Ee.add(_.pathname):(Ee=new Set([_.pathname]),Re.set(A.location.pathname,Ee)),Me={currentLocation:A.location,nextLocation:_}}je({...B,actionData:he,loaderData:Se,historyAction:Y,location:_,initialized:!0,navigation:Jf,revalidation:"idle",restoreScrollPosition:we,preventScrollReset:Te,blockers:Ce},{viewTransitionOpts:Me,flushSync:Q===!0}),Y="POP",J=!1,ie=!1,oe=!1,fe=!1,pe?.resolve(),pe=null}async function te(_,B){if(typeof _=="number"){n.history.go(_);return}let Q=Ed(A.location,A.matches,p,_,B?.fromRouteId,B?.relative),{path:le,submission:he,error:Se}=Nv(!1,Q,B),Ce=A.location,we=Sd(A.location,le,B&&B.state);we={...we,...n.history.encodeLocation(we)};let Te=B&&B.replace!=null?B.replace:void 0,Me="PUSH";Te===!0?Me="REPLACE":Te===!1||he!=null&&Zt(he.formMethod)&&he.formAction===A.location.pathname+A.location.search&&(Me="REPLACE");let Ee=B&&"preventScrollReset"in B?B.preventScrollReset===!0:void 0,Oe=(B&&B.flushSync)===!0,Ve=Ao({currentLocation:Ce,nextLocation:we,historyAction:Me});if(Ve){zn(Ve,{state:"blocked",location:we,proceed(){zn(Ve,{state:"proceeding",proceed:void 0,reset:void 0,location:we}),te(_,B)},reset(){let et=new Map(A.blockers);et.set(Ve,no),je({blockers:et})}});return}await ce(Me,we,{submission:he,pendingError:Se,preventScrollReset:Ee,replace:B&&B.replace,enableViewTransition:B&&B.viewTransition,flushSync:Oe})}function ue(){pe||(pe=IE()),ri(),je({revalidation:"loading"});let _=pe.promise;return A.navigation.state==="submitting"?_:A.navigation.state==="idle"?(ce(A.historyAction,A.location,{startUninterruptedRevalidation:!0}),_):(ce(Y||A.historyAction,A.navigation.location,{overrideNavigation:A.navigation,enableViewTransition:ie===!0}),_)}async function ce(_,B,Q){ae&&ae.abort(),ae=null,Y=_,oe=(Q&&Q.startUninterruptedRevalidation)===!0,fr(A.location,A.matches),J=(Q&&Q.preventScrollReset)===!0,ie=(Q&&Q.enableViewTransition)===!0;let le=h||f,he=Q&&Q.overrideNavigation,Se=Q?.initialHydration&&A.matches&&A.matches.length>0&&!U?A.matches:Ia(le,B,p),Ce=(Q&&Q.flushSync)===!0;if(Se&&A.initialized&&!fe&&KE(A.location,B)&&!(Q&&Q.submission&&Zt(Q.submission.formMethod))){re(B,{matches:Se},{flushSync:Ce});return}let we=dr(Se,le,B.pathname);if(we.active&&we.matches&&(Se=we.matches),!Se){let{error:yt,notFoundMatches:Be,route:at}=Xr(B.pathname);re(B,{matches:Be,loaderData:{},errors:{[at.id]:yt}},{flushSync:Ce});return}ae=new AbortController;let Te=Ul(n.history,B,ae.signal,Q&&Q.submission),Me=new Ov(n.unstable_getContext?await n.unstable_getContext():void 0),Ee;if(Q&&Q.pendingError)Ee=[Mr(Se).route.id,{type:"error",error:Q.pendingError}];else if(Q&&Q.submission&&Zt(Q.submission.formMethod)){let yt=await Ne(Te,B,Q.submission,Se,Me,we.active,Q&&Q.initialHydration===!0,{replace:Q.replace,flushSync:Ce});if(yt.shortCircuited)return;if(yt.pendingActionResult){let[Be,at]=yt.pendingActionResult;if(on(at)&&po(at.error)&&at.error.status===404){ae=null,re(B,{matches:yt.matches,loaderData:{},errors:{[Be]:at.error}});return}}Se=yt.matches||Se,Ee=yt.pendingActionResult,he=If(B,Q.submission),Ce=!1,we.active=!1,Te=Ul(n.history,Te.url,Te.signal)}let{shortCircuited:Oe,matches:Ve,loaderData:et,errors:vt}=await Ue(Te,B,Se,Me,we.active,he,Q&&Q.submission,Q&&Q.fetcherSubmission,Q&&Q.replace,Q&&Q.initialHydration===!0,Ce,Ee);Oe||(ae=null,re(B,{matches:Ve||Se,...Pv(Ee),loaderData:et,errors:vt}))}async function Ne(_,B,Q,le,he,Se,Ce,we={}){ri();let Te=XE(B,Q);if(je({navigation:Te},{flushSync:we.flushSync===!0}),Se){let Oe=await hr(le,B.pathname,_.signal);if(Oe.type==="aborted")return{shortCircuited:!0};if(Oe.type==="error"){let Ve=Mr(Oe.partialMatches).route.id;return{matches:Oe.partialMatches,pendingActionResult:[Ve,{type:"error",error:Oe.error}]}}else if(Oe.matches)le=Oe.matches;else{let{notFoundMatches:Ve,error:et,route:vt}=Xr(B.pathname);return{matches:Ve,pendingActionResult:[vt.id,{type:"error",error:et}]}}}let Me,Ee=eu(le,B);if(!Ee.route.action&&!Ee.route.lazy)Me={type:"error",error:En(405,{method:_.method,pathname:B.pathname,routeId:Ee.route.id})};else{let Oe=$l(s,u,_,le,Ee,Ce?[]:i,he),Ve=await Ra(_,Oe,he,null);if(Me=Ve[Ee.route.id],!Me){for(let et of le)if(Ve[et.route.id]){Me=Ve[et.route.id];break}}if(_.signal.aborted)return{shortCircuited:!0}}if(Dr(Me)){let Oe;return we&&we.replace!=null?Oe=we.replace:Oe=Lv(Me.response.headers.get("Location"),new URL(_.url),p)===A.location.pathname+A.location.search,await Jn(_,Me,!0,{submission:Q,replace:Oe}),{shortCircuited:!0}}if(on(Me)){let Oe=Mr(le,Ee.route.id);return(we&&we.replace)!==!0&&(Y="PUSH"),{matches:le,pendingActionResult:[Oe.route.id,Me,Ee.route.id]}}return{matches:le,pendingActionResult:[Ee.route.id,Me]}}async function Ue(_,B,Q,le,he,Se,Ce,we,Te,Me,Ee,Oe){let Ve=Se||If(B,Ce),et=Ce||we||$v(Ve),vt=!oe&&!Me;if(he){if(vt){let Ct=_e(Oe);je({navigation:Ve,...Ct!==void 0?{actionData:Ct}:{}},{flushSync:Ee})}let Ke=await hr(Q,B.pathname,_.signal);if(Ke.type==="aborted")return{shortCircuited:!0};if(Ke.type==="error"){let Ct=Mr(Ke.partialMatches).route.id;return{matches:Ke.partialMatches,loaderData:{},errors:{[Ct]:Ke.error}}}else if(Ke.matches)Q=Ke.matches;else{let{error:Ct,notFoundMatches:mr,route:hn}=Xr(B.pathname);return{matches:mr,loaderData:{},errors:{[hn.id]:Ct}}}}let yt=h||f,{dsMatches:Be,revalidatingFetchers:at}=Tv(_,le,s,u,n.history,A,Q,et,B,Me?[]:i,Me===!0,fe,de,G,K,N,yt,p,n.patchRoutesOnNavigation!=null,Oe);if($=++Z,!n.dataStrategy&&!Be.some(Ke=>Ke.shouldLoad)&&at.length===0){let Ke=sr();return re(B,{matches:Q,loaderData:{},errors:Oe&&on(Oe[1])?{[Oe[0]]:Oe[1].error}:null,...Pv(Oe),...Ke?{fetchers:new Map(A.fetchers)}:{}},{flushSync:Ee}),{shortCircuited:!0}}if(vt){let Ke={};if(!he){Ke.navigation=Ve;let Ct=_e(Oe);Ct!==void 0&&(Ke.actionData=Ct)}at.length>0&&(Ke.fetchers=ot(at)),je(Ke,{flushSync:Ee})}at.forEach(Ke=>{Ln(Ke.key),Ke.controller&&M.set(Ke.key,Ke.controller)});let kn=()=>at.forEach(Ke=>Ln(Ke.key));ae&&ae.signal.addEventListener("abort",kn);let{loaderResults:It,fetcherResults:Vt}=await Co(Be,at,_,le);if(_.signal.aborted)return{shortCircuited:!0};ae&&ae.signal.removeEventListener("abort",kn),at.forEach(Ke=>M.delete(Ke.key));let dn=$s(It);if(dn)return await Jn(_,dn.result,!0,{replace:Te}),{shortCircuited:!0};if(dn=$s(Vt),dn)return N.add(dn.key),await Jn(_,dn.result,!0,{replace:Te}),{shortCircuited:!0};let{loaderData:Zr,errors:Ca}=kv(A,Q,It,Oe,at,Vt);Me&&A.errors&&(Ca={...A.errors,...Ca});let Wn=sr(),ea=ur($),ta=Wn||ea||at.length>0;return{matches:Q,loaderData:Zr,errors:Ca,...ta?{fetchers:new Map(A.fetchers)}:{}}}function _e(_){if(_&&!on(_[1]))return{[_[0]]:_[1].data};if(A.actionData)return Object.keys(A.actionData).length===0?null:A.actionData}function ot(_){return _.forEach(B=>{let Q=A.fetchers.get(B.key),le=ao(void 0,Q?Q.data:void 0);A.fetchers.set(B.key,le)}),new Map(A.fetchers)}async function Cn(_,B,Q,le){Ln(_);let he=(le&&le.flushSync)===!0,Se=h||f,Ce=Ed(A.location,A.matches,p,Q,B,le?.relative),we=Ia(Se,Ce,p),Te=dr(we,Se,Ce);if(Te.active&&Te.matches&&(we=Te.matches),!we){mt(_,B,En(404,{pathname:Ce}),{flushSync:he});return}let{path:Me,submission:Ee,error:Oe}=Nv(!0,Ce,le);if(Oe){mt(_,B,Oe,{flushSync:he});return}let Ve=new Ov(n.unstable_getContext?await n.unstable_getContext():void 0),et=(le&&le.preventScrollReset)===!0;if(Ee&&Zt(Ee.formMethod)){await Gr(_,B,Me,we,Ve,Te.active,he,et,Ee);return}K.set(_,{routeId:B,path:Me}),await Fr(_,B,Me,we,Ve,Te.active,he,et,Ee)}async function Gr(_,B,Q,le,he,Se,Ce,we,Te){ri(),K.delete(_);let Me=A.fetchers.get(_);Kt(_,QE(Te,Me),{flushSync:Ce});let Ee=new AbortController,Oe=Ul(n.history,Q,Ee.signal,Te);if(Se){let pt=await hr(le,new URL(Oe.url).pathname,Oe.signal,_);if(pt.type==="aborted")return;if(pt.type==="error"){mt(_,B,pt.error,{flushSync:Ce});return}else if(pt.matches)le=pt.matches;else{mt(_,B,En(404,{pathname:Q}),{flushSync:Ce});return}}let Ve=eu(le,Q);if(!Ve.route.action&&!Ve.route.lazy){let pt=En(405,{method:Te.formMethod,pathname:Q,routeId:B});mt(_,B,pt,{flushSync:Ce});return}M.set(_,Ee);let et=Z,vt=$l(s,u,Oe,le,Ve,i,he),Be=(await Ra(Oe,vt,he,_))[Ve.route.id];if(Oe.signal.aborted){M.get(_)===Ee&&M.delete(_);return}if(G.has(_)){if(Dr(Be)||on(Be)){Kt(_,Za(void 0));return}}else{if(Dr(Be))if(M.delete(_),$>et){Kt(_,Za(void 0));return}else return N.add(_),Kt(_,ao(Te)),Jn(Oe,Be,!1,{fetcherSubmission:Te,preventScrollReset:we});if(on(Be)){mt(_,B,Be.error);return}}let at=A.navigation.location||A.location,kn=Ul(n.history,at,Ee.signal),It=h||f,Vt=A.navigation.state!=="idle"?Ia(It,A.navigation.location,p):A.matches;Fe(Vt,"Didn't find any matches after fetcher action");let dn=++Z;ge.set(_,dn);let Zr=ao(Te,Be.data);A.fetchers.set(_,Zr);let{dsMatches:Ca,revalidatingFetchers:Wn}=Tv(kn,he,s,u,n.history,A,Vt,Te,at,i,!1,fe,de,G,K,N,It,p,n.patchRoutesOnNavigation!=null,[Ve.route.id,Be]);Wn.filter(pt=>pt.key!==_).forEach(pt=>{let Oa=pt.key,jo=A.fetchers.get(Oa),_o=ao(void 0,jo?jo.data:void 0);A.fetchers.set(Oa,_o),Ln(Oa),pt.controller&&M.set(Oa,pt.controller)}),je({fetchers:new Map(A.fetchers)});let ea=()=>Wn.forEach(pt=>Ln(pt.key));Ee.signal.addEventListener("abort",ea);let{loaderResults:ta,fetcherResults:Ke}=await Co(Ca,Wn,kn,he);if(Ee.signal.aborted)return;if(Ee.signal.removeEventListener("abort",ea),ge.delete(_),M.delete(_),Wn.forEach(pt=>M.delete(pt.key)),A.fetchers.has(_)){let pt=Za(Be.data);A.fetchers.set(_,pt)}let Ct=$s(ta);if(Ct)return Jn(kn,Ct.result,!1,{preventScrollReset:we});if(Ct=$s(Ke),Ct)return N.add(Ct.key),Jn(kn,Ct.result,!1,{preventScrollReset:we});let{loaderData:mr,errors:hn}=kv(A,Vt,ta,void 0,Wn,Ke);ur(dn),A.navigation.state==="loading"&&dn>$?(Fe(Y,"Expected pending action"),ae&&ae.abort(),re(A.navigation.location,{matches:Vt,loaderData:mr,errors:hn,fetchers:new Map(A.fetchers)})):(je({errors:hn,loaderData:Uv(A.loaderData,mr,Vt,hn),fetchers:new Map(A.fetchers)}),fe=!1)}async function Fr(_,B,Q,le,he,Se,Ce,we,Te){let Me=A.fetchers.get(_);Kt(_,ao(Te,Me?Me.data:void 0),{flushSync:Ce});let Ee=new AbortController,Oe=Ul(n.history,Q,Ee.signal);if(Se){let at=await hr(le,new URL(Oe.url).pathname,Oe.signal,_);if(at.type==="aborted")return;if(at.type==="error"){mt(_,B,at.error,{flushSync:Ce});return}else if(at.matches)le=at.matches;else{mt(_,B,En(404,{pathname:Q}),{flushSync:Ce});return}}let Ve=eu(le,Q);M.set(_,Ee);let et=Z,vt=$l(s,u,Oe,le,Ve,i,he),Be=(await Ra(Oe,vt,he,_))[Ve.route.id];if(M.get(_)===Ee&&M.delete(_),!Oe.signal.aborted){if(G.has(_)){Kt(_,Za(void 0));return}if(Dr(Be))if($>et){Kt(_,Za(void 0));return}else{N.add(_),await Jn(Oe,Be,!1,{preventScrollReset:we});return}if(on(Be)){mt(_,B,Be.error);return}Kt(_,Za(Be.data))}}async function Jn(_,B,Q,{submission:le,fetcherSubmission:he,preventScrollReset:Se,replace:Ce}={}){B.response.headers.has("X-Remix-Revalidate")&&(fe=!0);let we=B.response.headers.get("Location");Fe(we,"Expected a Location header on the redirect Response"),we=Lv(we,new URL(_.url),p);let Te=Sd(A.location,we,{_isRedirect:!0});if(l){let vt=!1;if(B.response.headers.has("X-Remix-Reload-Document"))vt=!0;else if(Hd(we)){const yt=tE(we,!0);vt=yt.origin!==a.location.origin||Rn(yt.pathname,p)==null}if(vt){Ce?a.location.replace(we):a.location.assign(we);return}}ae=null;let Me=Ce===!0||B.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Ee,formAction:Oe,formEncType:Ve}=A.navigation;!le&&!he&&Ee&&Oe&&Ve&&(le=$v(A.navigation));let et=le||he;if(jE.has(B.response.status)&&et&&Zt(et.formMethod))await ce(Me,Te,{submission:{...et,formAction:we},preventScrollReset:Se||J,enableViewTransition:Q?ie:void 0});else{let vt=If(Te,le);await ce(Me,Te,{overrideNavigation:vt,fetcherSubmission:he,preventScrollReset:Se||J,enableViewTransition:Q?ie:void 0})}}async function Ra(_,B,Q,le){let he,Se={};try{he=await BE(m,_,B,le,Q,!1)}catch(Ce){return B.filter(we=>we.shouldLoad).forEach(we=>{Se[we.route.id]={type:"error",error:Ce}}),Se}if(_.signal.aborted)return Se;for(let[Ce,we]of Object.entries(he))if(GE(we)){let Te=we.result;Se[Ce]={type:"redirect",response:qE(Te,_,Ce,B,p)}}else Se[Ce]=await VE(we);return Se}async function Co(_,B,Q,le){let he=Ra(Q,_,le,null),Se=Promise.all(B.map(async Te=>{if(Te.matches&&Te.match&&Te.request&&Te.controller){let Ee=(await Ra(Te.request,Te.matches,le,Te.key))[Te.match.route.id];return{[Te.key]:Ee}}else return Promise.resolve({[Te.key]:{type:"error",error:En(404,{pathname:Te.path})}})})),Ce=await he,we=(await Se).reduce((Te,Me)=>Object.assign(Te,Me),{});return{loaderResults:Ce,fetcherResults:we}}function ri(){fe=!0,K.forEach((_,B)=>{M.has(B)&&de.add(B),Ln(B)})}function Kt(_,B,Q={}){A.fetchers.set(_,B),je({fetchers:new Map(A.fetchers)},{flushSync:(Q&&Q.flushSync)===!0})}function mt(_,B,Q,le={}){let he=Mr(A.matches,B);zt(_),je({errors:{[he.route.id]:Q},fetchers:new Map(A.fetchers)},{flushSync:(le&&le.flushSync)===!0})}function On(_){return L.set(_,(L.get(_)||0)+1),G.has(_)&&G.delete(_),A.fetchers.get(_)||_E}function zt(_){let B=A.fetchers.get(_);M.has(_)&&!(B&&B.state==="loading"&&ge.has(_))&&Ln(_),K.delete(_),ge.delete(_),N.delete(_),G.delete(_),de.delete(_),A.fetchers.delete(_)}function Uu(_){let B=(L.get(_)||0)-1;B<=0?(L.delete(_),G.add(_)):L.set(_,B),je({fetchers:new Map(A.fetchers)})}function Ln(_){let B=M.get(_);B&&(B.abort(),M.delete(_))}function Oo(_){for(let B of _){let Q=On(B),le=Za(Q.data);A.fetchers.set(B,le)}}function sr(){let _=[],B=!1;for(let Q of N){let le=A.fetchers.get(Q);Fe(le,`Expected fetcher: ${Q}`),le.state==="loading"&&(N.delete(Q),_.push(Q),B=!0)}return Oo(_),B}function ur(_){let B=[];for(let[Q,le]of ge)if(le<_){let he=A.fetchers.get(Q);Fe(he,`Expected fetcher: ${Q}`),he.state==="loading"&&(Ln(Q),ge.delete(Q),B.push(Q))}return Oo(B),B.length>0}function In(_,B){let Q=A.blockers.get(_)||no;return W.get(_)!==B&&W.set(_,B),Q}function cr(_){A.blockers.delete(_),W.delete(_)}function zn(_,B){let Q=A.blockers.get(_)||no;Fe(Q.state==="unblocked"&&B.state==="blocked"||Q.state==="blocked"&&B.state==="blocked"||Q.state==="blocked"&&B.state==="proceeding"||Q.state==="blocked"&&B.state==="unblocked"||Q.state==="proceeding"&&B.state==="unblocked",`Invalid blocker state transition: ${Q.state} -> ${B.state}`);let le=new Map(A.blockers);le.set(_,B),je({blockers:le})}function Ao({currentLocation:_,nextLocation:B,historyAction:Q}){if(W.size===0)return;W.size>1&&St(!1,"A router only supports one blocker at a time");let le=Array.from(W.entries()),[he,Se]=le[le.length-1],Ce=A.blockers.get(he);if(!(Ce&&Ce.state==="proceeding")&&Se({currentLocation:_,nextLocation:B,historyAction:Q}))return he}function Xr(_){let B=En(404,{pathname:_}),Q=h||f,{matches:le,route:he}=Hv(Q);return{notFoundMatches:le,route:he,error:B}}function No(_,B,Q){if(w=_,R=B,C=Q||null,!j&&A.navigation===Jf){j=!0;let le=To(A.location,A.matches);le!=null&&je({restoreScrollPosition:le})}return()=>{w=null,R=null,C=null}}function Qr(_,B){return C&&C(_,B.map(le=>oE(le,A.loaderData)))||_.key}function fr(_,B){if(w&&R){let Q=Qr(_,B);w[Q]=R()}}function To(_,B){if(w){let Q=Qr(_,B),le=w[Q];if(typeof le=="number")return le}return null}function dr(_,B,Q){if(n.patchRoutesOnNavigation)if(_){if(Object.keys(_[0].params).length>0)return{active:!0,matches:Ws(B,Q,p,!0)}}else return{active:!0,matches:Ws(B,Q,p,!0)||[]};return{active:!1,matches:null}}async function hr(_,B,Q,le){if(!n.patchRoutesOnNavigation)return{type:"success",matches:_};let he=_;for(;;){let Se=h==null,Ce=h||f,we=u;try{await n.patchRoutesOnNavigation({signal:Q,path:B,matches:he,fetcherKey:le,patch:(Ee,Oe)=>{Q.aborted||jv(Ee,Oe,Ce,we,s,!1)}})}catch(Ee){return{type:"error",error:Ee,partialMatches:he}}finally{Se&&!Q.aborted&&(f=[...f])}if(Q.aborted)return{type:"aborted"};let Te=Ia(Ce,B,p);if(Te)return{type:"success",matches:Te};let Me=Ws(Ce,B,p,!0);if(!Me||he.length===Me.length&&he.every((Ee,Oe)=>Ee.route.id===Me[Oe].route.id))return{type:"success",matches:null};he=Me}}function li(_){u={},h=mo(_,s,void 0,u)}function ii(_,B,Q=!1){let le=h==null;jv(_,B,h||f,u,s,Q),le&&(f=[...f],je({}))}return k={get basename(){return p},get future(){return g},get state(){return A},get routes(){return f},get window(){return a},initialize:ve,subscribe:Ze,enableScrollRestoration:No,navigate:te,fetch:Cn,revalidate:ue,createHref:_=>n.history.createHref(_),encodeLocation:_=>n.history.encodeLocation(_),getFetcher:On,deleteFetcher:Uu,dispose:ze,getBlocker:In,deleteBlocker:cr,patchRoutes:ii,_internalFetchControllers:M,_internalSetRoutes:li,_internalSetStateDoNotUseOrYouWillBreakYourApp(_){je(_)}},k}function zE(n){return n!=null&&("formData"in n&&n.formData!=null||"body"in n&&n.body!==void 0)}function Ed(n,a,l,i,s,u){let f,h;if(s){f=[];for(let m of a)if(f.push(m),m.route.id===s){h=m;break}}else f=a,h=a[a.length-1];let p=xu(i||".",bu(f),Rn(n.pathname,l)||n.pathname,u==="path");if(i==null&&(p.search=n.search,p.hash=n.hash),(i==null||i===""||i===".")&&h){let m=Bd(p.search);if(h.route.index&&!m)p.search=p.search?p.search.replace(/^\?/,"?index&"):"?index";else if(!h.route.index&&m){let g=new URLSearchParams(p.search),x=g.getAll("index");g.delete("index"),x.filter(w=>w).forEach(w=>g.append("index",w));let S=g.toString();p.search=S?`?${S}`:""}}return l!=="/"&&(p.pathname=xE({basename:l,pathname:p.pathname})),tr(p)}function Nv(n,a,l){if(!l||!zE(l))return{path:a};if(l.formMethod&&!FE(l.formMethod))return{path:a,error:En(405,{method:l.formMethod})};let i=()=>({path:a,error:En(400,{type:"invalid-body"})}),u=(l.formMethod||"get").toUpperCase(),f=e0(a);if(l.body!==void 0){if(l.formEncType==="text/plain"){if(!Zt(u))return i();let x=typeof l.body=="string"?l.body:l.body instanceof FormData||l.body instanceof URLSearchParams?Array.from(l.body.entries()).reduce((S,[w,C])=>`${S}${w}=${C}
65
- `,""):String(l.body);return{path:a,submission:{formMethod:u,formAction:f,formEncType:l.formEncType,formData:void 0,json:void 0,text:x}}}else if(l.formEncType==="application/json"){if(!Zt(u))return i();try{let x=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:x,text:void 0}}}catch{return i()}}}Fe(typeof FormData=="function","FormData is not available in this environment");let h,p;if(l.formData)h=Od(l.formData),p=l.formData;else if(l.body instanceof FormData)h=Od(l.body),p=l.body;else if(l.body instanceof URLSearchParams)h=l.body,p=zv(h);else if(l.body==null)h=new URLSearchParams,p=new FormData;else try{h=new URLSearchParams(l.body),p=zv(h)}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(Zt(m.formMethod))return{path:a,submission:m};let g=Ea(a);return n&&g.search&&Bd(g.search)&&h.append("index",""),g.search=`?${h}`,{path:tr(g),submission:m}}function Tv(n,a,l,i,s,u,f,h,p,m,g,x,S,w,C,R,j,O,U,z){let H=z?on(z[1])?z[1].error:z[1].data:void 0,k=s.createURL(u.location),A=s.createURL(p),Y;if(g&&u.errors){let oe=Object.keys(u.errors)[0];Y=f.findIndex(fe=>fe.route.id===oe)}else if(z&&on(z[1])){let oe=z[0];Y=f.findIndex(fe=>fe.route.id===oe)-1}let J=z?z[1].statusCode:void 0,ae=J&&J>=400,ie={currentUrl:k,currentParams:u.matches[0]?.params||{},nextUrl:A,nextParams:f[0].params,...h,actionResult:H,actionStatus:J},Re=f.map((oe,fe)=>{let{route:de}=oe,M=null;if(Y!=null&&fe>Y?M=!1:de.lazy?M=!0:de.loader==null?M=!1:g?M=Rd(de,u.loaderData,u.errors):kE(u.loaderData,u.matches[fe],oe)&&(M=!0),M!==null)return Cd(l,i,n,oe,m,a,M);let Z=ae?!1:x||k.pathname+k.search===A.pathname+A.search||k.search!==A.search||UE(u.matches[fe],oe),$={...ie,defaultShouldRevalidate:Z},ge=cu(oe,$);return Cd(l,i,n,oe,m,a,ge,$)}),me=[];return C.forEach((oe,fe)=>{if(g||!f.some(L=>L.route.id===oe.routeId)||w.has(fe))return;let de=u.fetchers.get(fe),M=de&&de.state!=="idle"&&de.data===void 0,Z=Ia(j,oe.path,O);if(!Z){if(U&&M)return;me.push({key:fe,routeId:oe.routeId,path:oe.path,matches:null,match:null,request:null,controller:null});return}if(R.has(fe))return;let $=eu(Z,oe.path),ge=new AbortController,N=Ul(s,oe.path,ge.signal),K=null;if(S.has(fe))S.delete(fe),K=$l(l,i,N,Z,$,m,a);else if(M)x&&(K=$l(l,i,N,Z,$,m,a));else{let L={...ie,defaultShouldRevalidate:ae?!1:x};cu($,L)&&(K=$l(l,i,N,Z,$,m,a,L))}K&&me.push({key:fe,routeId:oe.routeId,path:oe.path,matches:K,match:$,request:N,controller:ge})}),{dsMatches:Re,revalidatingFetchers:me}}function Rd(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 kE(n,a,l){let i=!a||l.route.id!==a.route.id,s=!n.hasOwnProperty(l.route.id);return i||s}function UE(n,a){let l=n.route.path;return n.pathname!==a.pathname||l!=null&&l.endsWith("*")&&n.params["*"]!==a.params["*"]}function cu(n,a){if(n.route.shouldRevalidate){let l=n.route.shouldRevalidate(a);if(typeof l=="boolean")return l}return a.defaultShouldRevalidate}function jv(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 h=[],p=[];if(a.forEach(m=>{let g=f.find(x=>Qy(m,x));g?p.push({existingRoute:g,newRoute:m}):h.push(m)}),h.length>0){let m=mo(h,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:g,newRoute:x}=p[m],S=g,[w]=mo([x],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 Qy(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=>Qy(l,s))):!1}var _v=new WeakMap,Zy=({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=_v.get(s);f||(f={},_v.set(s,f));let h=f[n];if(h)return h;let p=(async()=>{let m=aE(n),x=s[n]!==void 0&&n!=="hasErrorBoundary";if(m)St(!m,"Route property "+n+" is not a supported lazy route property. This property will be ignored."),f[n]=Promise.resolve();else if(x)St(!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},Mv=new WeakMap;function PE(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 g=Mv.get(u);if(g)return{lazyRoutePromise:g,lazyHandlerPromise:g};let x=(async()=>{Fe(typeof n.lazy=="function","No lazy route function found");let S=await n.lazy(),w={};for(let C in S){let R=S[C];if(R===void 0)continue;let j=lE(C),U=u[C]!==void 0&&C!=="hasErrorBoundary";j?St(!j,"Route property "+C+" is not a supported property to be returned from a lazy route function. This property will be ignored."):U?St(!U,`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.`):w[C]=R}Object.assign(u,w),Object.assign(u,{...i(u),lazy:void 0})})();return Mv.set(u,x),x.catch(()=>{}),{lazyRoutePromise:x,lazyHandlerPromise:x}}let f=Object.keys(n.lazy),h=[],p;for(let g of f){if(s&&s.includes(g))continue;let x=Zy({key:g,route:n,manifest:l,mapRouteProperties:i});x&&(h.push(x),g===a&&(p=x))}let m=h.length>0?Promise.all(h).then(()=>{}):void 0;return m?.catch(()=>{}),p?.catch(()=>{}),{lazyRoutePromise:m,lazyHandlerPromise:p}}async function Dv(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 HE(n){return n.matches.some(a=>a.route.unstable_middleware)?Jy(n,!1,()=>Dv(n),(a,l)=>({[l]:{type:"error",result:a}})):Dv(n)}async function Jy(n,a,l,i){let{matches:s,request:u,params:f,context:h}=n,p={handlerResult:void 0};try{let m=s.flatMap(x=>x.route.unstable_middleware?x.route.unstable_middleware.map(S=>[x.route.id,S]):[]),g=await Iy({request:u,params:f,context:h},m,a,p,l);return a?g:p.handlerResult}catch(m){if(!p.middlewareError)throw m;let g=await i(p.middlewareError.error,p.middlewareError.routeId);return p.handlerResult?Object.assign(p.handlerResult,g):g}}async function Iy(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 h=a[u];if(!h)return i.handlerResult=await s(),i.handlerResult;let[p,m]=h,g=!1,x,S=async()=>{if(g)throw new Error("You may only call `next()` once per middleware");g=!0,await Iy(n,a,l,i,s,u+1)};try{let w=await m({request:n.request,params:n.params,context:n.context},S);return g?w===void 0?x: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 Wy(n,a,l,i,s){let u=Zy({key:"unstable_middleware",route:i.route,manifest:a,mapRouteProperties:n}),f=PE(i.route,Zt(l.method)?"action":"loader",a,n,s);return{middleware:u,route:f.lazyRoutePromise,handler:f.lazyHandlerPromise}}function Cd(n,a,l,i,s,u,f,h=null){let p=!1,m=Wy(n,a,l,i,s);return{...i,_lazyPromises:m,shouldLoad:f,unstable_shouldRevalidateArgs:h,unstable_shouldCallHandler(g){return p=!0,h?typeof g=="boolean"?cu(i,{...h,defaultShouldRevalidate:g}):cu(i,h):f},resolve(g){return p||f||g&&!Zt(l.method)&&(i.route.lazy||i.route.loader)?$E({request:l,match:i,lazyHandlerPromise:m?.handler,lazyRoutePromise:m?.route,handlerOverride:g,scopedContext:u}):Promise.resolve({type:"data",result:void 0})}}}function $l(n,a,l,i,s,u,f,h=null){return i.map(p=>p.route.id!==s.route.id?{...p,shouldLoad:!1,unstable_shouldRevalidateArgs:h,unstable_shouldCallHandler:()=>!1,_lazyPromises:Wy(n,a,l,p,u),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Cd(n,a,l,p,u,f,!0,h))}async function BE(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 g=f;return Jy(g,!1,()=>m({...g,fetcherKey:i,unstable_runClientMiddleware:()=>{throw new Error("Cannot call `unstable_runClientMiddleware()` from within an `unstable_runClientMiddleware` handler")}}),(x,S)=>({[S]:{type:"error",result:x}}))}});try{await Promise.all(l.flatMap(m=>[m._lazyPromises?.handler,m._lazyPromises?.route]))}catch{}return p}async function $E({request:n,match:a,lazyHandlerPromise:l,lazyRoutePromise:i,handlerOverride:s,scopedContext:u}){let f,h,p=Zt(n.method),m=p?"action":"loader",g=x=>{let S,w=new Promise((j,O)=>S=O);h=()=>S(),n.signal.addEventListener("abort",h);let C=j=>typeof x!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${m}" [routeId: ${a.route.id}]`)):x({request:n,params:a.params,context:u},...j!==void 0?[j]:[]),R=(async()=>{try{return{type:"data",result:await(s?s(O=>C(O)):C())}}catch(j){return{type:"error",result:j}}})();return Promise.race([R,w])};try{let x=p?a.route.action:a.route.loader;if(l||i)if(x){let S,[w]=await Promise.all([g(x).catch(C=>{S=C}),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([g(S),i]);else if(m==="action"){let w=new URL(n.url),C=w.pathname+w.search;throw En(405,{method:n.method,pathname:C,routeId:a.route.id})}else return{type:"data",result:void 0}}else if(x)f=await g(x);else{let S=new URL(n.url),w=S.pathname+S.search;throw En(404,{pathname:w})}}catch(x){return{type:"error",result:x}}finally{h&&n.signal.removeEventListener("abort",h)}return f}async function VE(n){let{result:a,type:l}=n;if(t0(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 wd(a.status,a.statusText,i),statusCode:a.status,headers:a.headers}:{type:"data",data:i,statusCode:a.status,headers:a.headers}}return l==="error"?Bv(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 wd(a.init?.status||500,void 0,a.data),statusCode:po(a)?a.status:void 0,headers:a.init?.headers?new Headers(a.init.headers):void 0}:{type:"error",error:a,statusCode:po(a)?a.status:void 0}:Bv(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 qE(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"),!Hd(u)){let f=i.slice(0,i.findIndex(h=>h.route.id===l)+1);u=Ed(new URL(a.url),f,s,u),n.headers.set("Location",u)}return n}function Lv(n,a,l){if(Hd(n)){let i=n,s=i.startsWith("//")?new URL(a.protocol+i):new URL(i),u=Rn(s.pathname,l)!=null;if(s.origin===a.origin&&u)return s.pathname+s.search+s.hash}return n}function Ul(n,a,l,i){let s=n.createURL(e0(a)).toString(),u={signal:l};if(i&&Zt(i.formMethod)){let{formMethod:f,formEncType:h}=i;u.method=f.toUpperCase(),h==="application/json"?(u.headers=new Headers({"Content-Type":h}),u.body=JSON.stringify(i.json)):h==="text/plain"?u.body=i.text:h==="application/x-www-form-urlencoded"&&i.formData?u.body=Od(i.formData):u.body=i.formData}return new Request(s,u)}function Od(n){let a=new URLSearchParams;for(let[l,i]of n.entries())a.append(l,typeof i=="string"?i:i.name);return a}function zv(n){let a=new FormData;for(let[l,i]of n.entries())a.append(l,i);return a}function YE(n,a,l,i=!1,s=!1){let u={},f=null,h,p=!1,m={},g=l&&on(l[1])?l[1].error:void 0;return n.forEach(x=>{if(!(x.route.id in a))return;let S=x.route.id,w=a[S];if(Fe(!Dr(w),"Cannot handle redirect results in processLoaderData"),on(w)){let C=w.error;if(g!==void 0&&(C=g,g=void 0),f=f||{},s)f[S]=C;else{let R=Mr(n,S);f[R.route.id]==null&&(f[R.route.id]=C)}i||(u[S]=Xy),p||(p=!0,h=po(w.error)?w.error.status:500),w.headers&&(m[S]=w.headers)}else u[S]=w.data,w.statusCode&&w.statusCode!==200&&!p&&(h=w.statusCode),w.headers&&(m[S]=w.headers)}),g!==void 0&&l&&(f={[l[0]]:g},l[2]&&(u[l[2]]=void 0)),{loaderData:u,errors:f,statusCode:h||200,loaderHeaders:m}}function kv(n,a,l,i,s,u){let{loaderData:f,errors:h}=YE(a,l,i);return s.filter(p=>!p.matches||p.matches.some(m=>m.shouldLoad)).forEach(p=>{let{key:m,match:g,controller:x}=p,S=u[m];if(Fe(S,"Did not find corresponding fetcher result"),!(x&&x.signal.aborted))if(on(S)){let w=Mr(n.matches,g?.route.id);h&&h[w.route.id]||(h={...h,[w.route.id]:S.error}),n.fetchers.delete(m)}else if(Dr(S))Fe(!1,"Unhandled fetcher revalidation redirect");else{let w=Za(S.data);n.fetchers.set(m,w)}}),{loaderData:f,errors:h}}function Uv(n,a,l,i){let s=Object.entries(a).filter(([,u])=>u!==Xy).reduce((u,[f,h])=>(u[f]=h,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 Pv(n){return n?on(n[1])?{actionData:{}}:{actionData:{[n[0]]:n[1].data}}:{}}function Mr(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 Hv(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 En(n,{pathname:a,routeId:l,method:i,type:s,message:u}={}){let f="Unknown Server Error",h="Unknown @remix-run/router error";return n===400?(f="Bad Request",i&&a&&l?h=`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"&&(h="Unable to encode submission body")):n===403?(f="Forbidden",h=`Route "${l}" does not match URL "${a}"`):n===404?(f="Not Found",h=`No route matches URL "${a}"`):n===405&&(f="Method Not Allowed",i&&a&&l?h=`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&&(h=`Invalid request method "${i.toUpperCase()}"`)),new wd(n||500,f,new Error(h),!0)}function $s(n){let a=Object.entries(n);for(let l=a.length-1;l>=0;l--){let[i,s]=a[l];if(Dr(s))return{key:i,result:s}}}function e0(n){let a=typeof n=="string"?Ea(n):n;return tr({...a,hash:""})}function KE(n,a){return n.pathname!==a.pathname||n.search!==a.search?!1:n.hash===""?a.hash!=="":n.hash===a.hash?!0:a.hash!==""}function GE(n){return t0(n.result)&&TE.has(n.result.status)}function on(n){return n.type==="error"}function Dr(n){return(n&&n.type)==="redirect"}function Bv(n){return typeof n=="object"&&n!=null&&"type"in n&&"data"in n&&"init"in n&&n.type==="DataWithResponseInit"}function t0(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.headers=="object"&&typeof n.body<"u"}function FE(n){return NE.has(n.toUpperCase())}function Zt(n){return OE.has(n.toUpperCase())}function Bd(n){return new URLSearchParams(n).getAll("index").some(a=>a==="")}function eu(n,a){let l=typeof a=="string"?Ea(a).search:a.search;if(n[n.length-1].route.index&&Bd(l||""))return n[n.length-1];let i=Ky(n);return i[i.length-1]}function $v(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 If(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 XE(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 ao(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 QE(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 Za(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 ZE(n,a){try{let l=n.sessionStorage.getItem(Fy);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 JE(n,a){if(a.size>0){let l={};for(let[i,s]of a)l[i]=[...s];try{n.sessionStorage.setItem(Fy,JSON.stringify(l))}catch(i){St(!1,`Failed to save applied view transitions in sessionStorage (${i}).`)}}}function IE(){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 Kr=v.createContext(null);Kr.displayName="DataRouter";var bo=v.createContext(null);bo.displayName="DataRouterState";v.createContext(!1);var $d=v.createContext({isTransitioning:!1});$d.displayName="ViewTransition";var n0=v.createContext(new Map);n0.displayName="Fetchers";var WE=v.createContext(null);WE.displayName="Await";var Mn=v.createContext(null);Mn.displayName="Navigation";var Su=v.createContext(null);Su.displayName="Location";var Qn=v.createContext({outlet:null,matches:[],isDataRoute:!1});Qn.displayName="Route";var Vd=v.createContext(null);Vd.displayName="RouteError";function eR(n,{relative:a}={}){Fe(Zl(),"useHref() may be used only in the context of a <Router> component.");let{basename:l,navigator:i}=v.useContext(Mn),{hash:s,pathname:u,search:f}=xo(n,{relative:a}),h=u;return l!=="/"&&(h=u==="/"?l:Kn([l,u])),i.createHref({pathname:h,search:f,hash:s})}function Zl(){return v.useContext(Su)!=null}function ir(){return Fe(Zl(),"useLocation() may be used only in the context of a <Router> component."),v.useContext(Su).location}var a0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function r0(n){v.useContext(Mn).static||v.useLayoutEffect(n)}function wu(){let{isDataRoute:n}=v.useContext(Qn);return n?hR():tR()}function tR(){Fe(Zl(),"useNavigate() may be used only in the context of a <Router> component.");let n=v.useContext(Kr),{basename:a,navigator:l}=v.useContext(Mn),{matches:i}=v.useContext(Qn),{pathname:s}=ir(),u=JSON.stringify(bu(i)),f=v.useRef(!1);return r0(()=>{f.current=!0}),v.useCallback((p,m={})=>{if(St(f.current,a0),!f.current)return;if(typeof p=="number"){l.go(p);return}let g=xu(p,JSON.parse(u),s,m.relative==="path");n==null&&a!=="/"&&(g.pathname=g.pathname==="/"?a:Kn([a,g.pathname])),(m.replace?l.replace:l.push)(g,m.state,m)},[a,l,u,s,n])}v.createContext(null);function xo(n,{relative:a}={}){let{matches:l}=v.useContext(Qn),{pathname:i}=ir(),s=JSON.stringify(bu(l));return v.useMemo(()=>xu(n,JSON.parse(s),i,a==="path"),[n,s,i,a])}function nR(n,a,l,i){Fe(Zl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=v.useContext(Mn),{matches:u}=v.useContext(Qn),f=u[u.length-1],h=f?f.params:{},p=f?f.pathname:"/",m=f?f.pathnameBase:"/",g=f&&f.route;{let O=g&&g.path||"";l0(p,!g||O.endsWith("*")||O.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${O}">) 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 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)&&lt.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)&&lt.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.
66
66
 
67
- Please change the parent <Route path="${O}"> to <Route path="${O==="/"?"*":`${O}/*`}">.`)}let x=ir(),S;S=x;let w=S.pathname||"/",C=w;if(m!=="/"){let O=m.replace(/^\//,"").split("/");C="/"+w.replace(/^\//,"").split("/").slice(O.length).join("/")}let R=Ia(n,{pathname:C});return St(g||R!=null,`No routes matched location "${S.pathname}${S.search}${S.hash}" `),St(R==null||R[R.length-1].route.element!==void 0||R[R.length-1].route.Component!==void 0||R[R.length-1].route.lazy!==void 0,`Matched leaf route at location "${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.`),oR(R&&R.map(O=>Object.assign({},O,{params:Object.assign({},h,O.params),pathname:Kn([m,s.encodeLocation?s.encodeLocation(O.pathname).pathname:O.pathname]),pathnameBase:O.pathnameBase==="/"?m:Kn([m,s.encodeLocation?s.encodeLocation(O.pathnameBase).pathname:O.pathnameBase])})),u,l,i)}function aR(){let n=dR(),a=po(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=v.createElement(v.Fragment,null,v.createElement("p",null,"💿 Hey developer 👋"),v.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",v.createElement("code",{style:u},"ErrorBoundary")," or"," ",v.createElement("code",{style:u},"errorElement")," prop on your route.")),v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},a),l?v.createElement("pre",{style:s},l):null,f)}var rR=v.createElement(aR,null),lR=class extends v.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,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?v.createElement(Qn.Provider,{value:this.props.routeContext},v.createElement(Vd.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function iR({routeContext:n,match:a,children:l}){let i=v.useContext(Kr);return i&&i.static&&i.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=a.route.id),v.createElement(Qn.Provider,{value:n},l)}function oR(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,h=-1;if(l)for(let p=0;p<s.length;p++){let m=s[p];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(h=p),m.route.id){let{loaderData:g,errors:x}=l,S=m.route.loader&&!g.hasOwnProperty(m.route.id)&&(!x||x[m.route.id]===void 0);if(m.route.lazy||S){f=!0,h>=0?s=s.slice(0,h+1):s=[s[0]];break}}}return s.reduceRight((p,m,g)=>{let x,S=!1,w=null,C=null;l&&(x=u&&m.route.id?u[m.route.id]:void 0,w=m.route.errorElement||rR,f&&(h<0&&g===0?(l0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),S=!0,C=null):h===g&&(S=!0,C=m.route.hydrateFallbackElement||null)));let R=a.concat(s.slice(0,g+1)),j=()=>{let O;return x?O=w:S?O=C:m.route.Component?O=v.createElement(m.route.Component,null):m.route.element?O=m.route.element:O=p,v.createElement(iR,{match:m,routeContext:{outlet:p,matches:R,isDataRoute:l!=null},children:O})};return l&&(m.route.ErrorBoundary||m.route.errorElement||g===0)?v.createElement(lR,{location:l.location,revalidation:l.revalidation,component:w,error:x,children:j(),routeContext:{outlet:null,matches:R,isDataRoute:!0}}):j()},null)}function qd(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function sR(n){let a=v.useContext(Kr);return Fe(a,qd(n)),a}function uR(n){let a=v.useContext(bo);return Fe(a,qd(n)),a}function cR(n){let a=v.useContext(Qn);return Fe(a,qd(n)),a}function Yd(n){let a=cR(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 fR(){return Yd("useRouteId")}function dR(){let n=v.useContext(Vd),a=uR("useRouteError"),l=Yd("useRouteError");return n!==void 0?n:a.errors?.[l]}function hR(){let{router:n}=sR("useNavigate"),a=Yd("useNavigate"),l=v.useRef(!1);return r0(()=>{l.current=!0}),v.useCallback(async(s,u={})=>{St(l.current,a0),l.current&&(typeof s=="number"?n.navigate(s):await n.navigate(s,{fromRouteId:a,...u}))},[n,a])}var Vv={};function l0(n,a,l){!a&&!Vv[n]&&(Vv[n]=!0,St(!1,l))}var qv={};function Yv(n,a){!n&&!qv[a]&&(qv[a]=!0,console.warn(a))}function mR(n){let a={hasErrorBoundary:n.hasErrorBoundary||n.ErrorBoundary!=null||n.errorElement!=null};return n.Component&&(n.element&&St(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(a,{element:v.createElement(n.Component),Component:void 0})),n.HydrateFallback&&(n.hydrateFallbackElement&&St(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(a,{hydrateFallbackElement:v.createElement(n.HydrateFallback),HydrateFallback:void 0})),n.ErrorBoundary&&(n.errorElement&&St(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(a,{errorElement:v.createElement(n.ErrorBoundary),ErrorBoundary:void 0})),a}var pR=["HydrateFallback","hydrateFallbackElement"];function gR(n,a){return LE({basename:a?.basename,unstable_getContext:a?.unstable_getContext,future:a?.future,history:Ww({initialEntries:a?.initialEntries,initialIndex:a?.initialIndex}),hydrationData:a?.hydrationData,routes:n,hydrationRouteProperties:pR,mapRouteProperties:mR,dataStrategy:a?.dataStrategy,patchRoutesOnNavigation:a?.patchRoutesOnNavigation}).initialize()}var vR=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 yR({router:n,flushSync:a}){let[l,i]=v.useState(n.state),[s,u]=v.useState(),[f,h]=v.useState({isTransitioning:!1}),[p,m]=v.useState(),[g,x]=v.useState(),[S,w]=v.useState(),C=v.useRef(new Map),R=v.useCallback((z,{deletedFetchers:H,flushSync:k,viewTransitionOpts:A})=>{z.fetchers.forEach((J,ae)=>{J.data!==void 0&&C.current.set(ae,J.data)}),H.forEach(J=>C.current.delete(J)),Yv(k===!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 Y=n.window!=null&&n.window.document!=null&&typeof n.window.document.startViewTransition=="function";if(Yv(A==null||Y,"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."),!A||!Y){a&&k?a(()=>i(z)):v.startTransition(()=>i(z));return}if(a&&k){a(()=>{g&&(p&&p.resolve(),g.skipTransition()),h({isTransitioning:!0,flushSync:!0,currentLocation:A.currentLocation,nextLocation:A.nextLocation})});let J=n.window.document.startViewTransition(()=>{a(()=>i(z))});J.finished.finally(()=>{a(()=>{m(void 0),x(void 0),u(void 0),h({isTransitioning:!1})})}),a(()=>x(J));return}g?(p&&p.resolve(),g.skipTransition(),w({state:z,currentLocation:A.currentLocation,nextLocation:A.nextLocation})):(u(z),h({isTransitioning:!0,flushSync:!1,currentLocation:A.currentLocation,nextLocation:A.nextLocation}))},[n.window,a,g,p]);v.useLayoutEffect(()=>n.subscribe(R),[n,R]),v.useEffect(()=>{f.isTransitioning&&!f.flushSync&&m(new vR)},[f]),v.useEffect(()=>{if(p&&s&&n.window){let z=s,H=p.promise,k=n.window.document.startViewTransition(async()=>{v.startTransition(()=>i(z)),await H});k.finished.finally(()=>{m(void 0),x(void 0),u(void 0),h({isTransitioning:!1})}),x(k)}},[s,p,n.window]),v.useEffect(()=>{p&&s&&l.location.key===s.location.key&&p.resolve()},[p,g,l.location,s]),v.useEffect(()=>{!f.isTransitioning&&S&&(u(S.state),h({isTransitioning:!0,flushSync:!1,currentLocation:S.currentLocation,nextLocation:S.nextLocation}),w(void 0))},[f.isTransitioning,S]);let j=v.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:z=>n.navigate(z),push:(z,H,k)=>n.navigate(z,{state:H,preventScrollReset:k?.preventScrollReset}),replace:(z,H,k)=>n.navigate(z,{replace:!0,state:H,preventScrollReset:k?.preventScrollReset})}),[n]),O=n.basename||"/",U=v.useMemo(()=>({router:n,navigator:j,static:!1,basename:O}),[n,j,O]);return v.createElement(v.Fragment,null,v.createElement(Kr.Provider,{value:U},v.createElement(bo.Provider,{value:l},v.createElement(n0.Provider,{value:C.current},v.createElement($d.Provider,{value:f},v.createElement(wR,{basename:O,location:l.location,navigationType:l.historyAction,navigator:j},v.createElement(bR,{routes:n.routes,future:n.future,state:l})))))),null)}var bR=v.memo(xR);function xR({routes:n,future:a,state:l}){return nR(n,void 0,l,a)}function SR({to:n,replace:a,state:l,relative:i}){Fe(Zl(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s}=v.useContext(Mn);St(!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}=v.useContext(Qn),{pathname:f}=ir(),h=wu(),p=xu(n,bu(u),f,i==="path"),m=JSON.stringify(p);return v.useEffect(()=>{h(JSON.parse(m),{replace:a,state:l,relative:i})},[h,m,i,a,l]),null}function wR({basename:n="/",children:a=null,location:l,navigationType:i="POP",navigator:s,static:u=!1}){Fe(!Zl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=n.replace(/^\/*/,"/"),h=v.useMemo(()=>({basename:f,navigator:s,static:u,future:{}}),[f,s,u]);typeof l=="string"&&(l=Ea(l));let{pathname:p="/",search:m="",hash:g="",state:x=null,key:S="default"}=l,w=v.useMemo(()=>{let C=Rn(p,f);return C==null?null:{location:{pathname:C,search:m,hash:g,state:x,key:S},navigationType:i}},[f,p,m,g,x,S,i]);return St(w!=null,`<Router basename="${f}"> is not able to match the URL "${p}${m}${g}" because it does not start with the basename, so the <Router> won't render anything.`),w==null?null:v.createElement(Mn.Provider,{value:h},v.createElement(Su.Provider,{children:a,value:w}))}var tu="get",nu="application/x-www-form-urlencoded";function Eu(n){return n!=null&&typeof n.tagName=="string"}function ER(n){return Eu(n)&&n.tagName.toLowerCase()==="button"}function RR(n){return Eu(n)&&n.tagName.toLowerCase()==="form"}function CR(n){return Eu(n)&&n.tagName.toLowerCase()==="input"}function OR(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function AR(n,a){return n.button===0&&(!a||a==="_self")&&!OR(n)}var Vs=null;function NR(){if(Vs===null)try{new FormData(document.createElement("form"),0),Vs=!1}catch{Vs=!0}return Vs}var TR=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Wf(n){return n!=null&&!TR.has(n)?(St(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${nu}"`),null):n}function jR(n,a){let l,i,s,u,f;if(RR(n)){let h=n.getAttribute("action");i=h?Rn(h,a):null,l=n.getAttribute("method")||tu,s=Wf(n.getAttribute("enctype"))||nu,u=new FormData(n)}else if(ER(n)||CR(n)&&(n.type==="submit"||n.type==="image")){let h=n.form;if(h==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=n.getAttribute("formaction")||h.getAttribute("action");if(i=p?Rn(p,a):null,l=n.getAttribute("formmethod")||h.getAttribute("method")||tu,s=Wf(n.getAttribute("formenctype"))||Wf(h.getAttribute("enctype"))||nu,u=new FormData(h,n),!NR()){let{name:m,type:g,value:x}=n;if(g==="image"){let S=m?`${m}.`:"";u.append(`${S}x`,"0"),u.append(`${S}y`,"0")}else m&&u.append(m,x)}}else{if(Eu(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');l=tu,i=null,s=nu,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 Kd(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}function _R(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&&Rn(i.pathname,a)==="/"?i.pathname=`${a.replace(/\/$/,"")}/_root.${l}`:i.pathname=`${i.pathname.replace(/\/$/,"")}.${l}`,i}async function MR(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 DR(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 LR(n,a,l){let i=await Promise.all(n.map(async s=>{let u=a.routes[s.route.id];if(u){let f=await MR(u,l);return f.links?f.links():[]}return[]}));return PR(i.flat(1).filter(DR).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function Kv(n,a,l,i,s,u){let f=(p,m)=>l[m]?p.route.id!==l[m].route.id:!0,h=(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)||h(p,m)):u==="data"?a.filter((p,m)=>{let g=i.routes[p.route.id];if(!g||!g.hasLoader)return!1;if(f(p,m)||h(p,m))return!0;if(p.route.shouldRevalidate){let x=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 x=="boolean")return x}return!0}):[]}function zR(n,a,{includeHydrateFallback:l}={}){return kR(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 kR(n){return[...new Set(n)]}function UR(n){let a={},l=Object.keys(n).sort();for(let i of l)a[i]=n[i];return a}function PR(n,a){let l=new Set;return new Set(a),n.reduce((i,s)=>{let u=JSON.stringify(UR(s));return l.has(u)||(l.add(u),i.push({key:u,link:s})),i},[])}function i0(){let n=v.useContext(Kr);return Kd(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function HR(){let n=v.useContext(bo);return Kd(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var Gd=v.createContext(void 0);Gd.displayName="FrameworkContext";function o0(){let n=v.useContext(Gd);return Kd(n,"You must render this element inside a <HydratedRouter> element"),n}function BR(n,a){let l=v.useContext(Gd),[i,s]=v.useState(!1),[u,f]=v.useState(!1),{onFocus:h,onBlur:p,onMouseEnter:m,onMouseLeave:g,onTouchStart:x}=a,S=v.useRef(null);v.useEffect(()=>{if(n==="render"&&f(!0),n==="viewport"){let R=O=>{O.forEach(U=>{f(U.isIntersecting)})},j=new IntersectionObserver(R,{threshold:.5});return S.current&&j.observe(S.current),()=>{j.disconnect()}}},[n]),v.useEffect(()=>{if(i){let R=setTimeout(()=>{f(!0)},100);return()=>{clearTimeout(R)}}},[i]);let w=()=>{s(!0)},C=()=>{s(!1),f(!1)};return l?n!=="intent"?[u,S,{}]:[u,S,{onFocus:ro(h,w),onBlur:ro(p,C),onMouseEnter:ro(m,w),onMouseLeave:ro(g,C),onTouchStart:ro(x,w)}]:[!1,S,{}]}function ro(n,a){return l=>{n&&n(l),l.defaultPrevented||a(l)}}function $R({page:n,...a}){let{router:l}=i0(),i=v.useMemo(()=>Ia(l.routes,n,l.basename),[l.routes,n,l.basename]);return i?v.createElement(qR,{page:n,matches:i,...a}):null}function VR(n){let{manifest:a,routeModules:l}=o0(),[i,s]=v.useState([]);return v.useEffect(()=>{let u=!1;return LR(n,a,l).then(f=>{u||s(f)}),()=>{u=!0}},[n,a,l]),i}function qR({page:n,matches:a,...l}){let i=ir(),{manifest:s,routeModules:u}=o0(),{basename:f}=i0(),{loaderData:h,matches:p}=HR(),m=v.useMemo(()=>Kv(n,a,p,s,i,"data"),[n,a,p,s,i]),g=v.useMemo(()=>Kv(n,a,p,s,i,"assets"),[n,a,p,s,i]),x=v.useMemo(()=>{if(n===i.pathname+i.search+i.hash)return[];let C=new Set,R=!1;if(a.forEach(O=>{let U=s.routes[O.route.id];!U||!U.hasLoader||(!m.some(z=>z.route.id===O.route.id)&&O.route.id in h&&u[O.route.id]?.shouldRevalidate||U.hasClientLoader?R=!0:C.add(O.route.id))}),C.size===0)return[];let j=_R(n,f,"data");return R&&C.size>0&&j.searchParams.set("_routes",a.filter(O=>C.has(O.route.id)).map(O=>O.route.id).join(",")),[j.pathname+j.search]},[f,h,i,s,m,a,n,u]),S=v.useMemo(()=>zR(g,s),[g,s]),w=VR(g);return v.createElement(v.Fragment,null,x.map(C=>v.createElement("link",{key:C,rel:"prefetch",as:"fetch",href:C,...l})),S.map(C=>v.createElement("link",{key:C,rel:"modulepreload",href:C,...l})),w.map(({key:C,link:R})=>v.createElement("link",{key:C,...R})))}function YR(...n){return a=>{n.forEach(l=>{typeof l=="function"?l(a):l!=null&&(l.current=a)})}}var s0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{s0&&(window.__reactRouterVersion="7.7.0")}catch{}var u0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,c0=v.forwardRef(function({onClick:a,discover:l="render",prefetch:i="none",relative:s,reloadDocument:u,replace:f,state:h,target:p,to:m,preventScrollReset:g,viewTransition:x,...S},w){let{basename:C}=v.useContext(Mn),R=typeof m=="string"&&u0.test(m),j,O=!1;if(typeof m=="string"&&R&&(j=m,s0))try{let ae=new URL(window.location.href),ie=m.startsWith("//")?new URL(ae.protocol+m):new URL(m),Re=Rn(ie.pathname,C);ie.origin===ae.origin&&Re!=null?m=Re+ie.search+ie.hash:O=!0}catch{St(!1,`<Link to="${m}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let U=eR(m,{relative:s}),[z,H,k]=BR(i,S),A=XR(m,{replace:f,state:h,target:p,preventScrollReset:g,relative:s,viewTransition:x});function Y(ae){a&&a(ae),ae.defaultPrevented||A(ae)}let J=v.createElement("a",{...S,...k,href:j||U,onClick:O||u?a:Y,ref:YR(w,H),target:p,"data-discover":!R&&l==="render"?"true":void 0});return z&&!R?v.createElement(v.Fragment,null,J,v.createElement($R,{page:U})):J});c0.displayName="Link";var KR=v.forwardRef(function({"aria-current":a="page",caseSensitive:l=!1,className:i="",end:s=!1,style:u,to:f,viewTransition:h,children:p,...m},g){let x=xo(f,{relative:m.relative}),S=ir(),w=v.useContext(bo),{navigator:C,basename:R}=v.useContext(Mn),j=w!=null&&WR(x)&&h===!0,O=C.encodeLocation?C.encodeLocation(x).pathname:x.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,O=O.toLowerCase()),z&&R&&(z=Rn(z,R)||z);const H=O!=="/"&&O.endsWith("/")?O.length-1:O.length;let k=U===O||!s&&U.startsWith(O)&&U.charAt(H)==="/",A=z!=null&&(z===O||!s&&z.startsWith(O)&&z.charAt(O.length)==="/"),Y={isActive:k,isPending:A,isTransitioning:j},J=k?a:void 0,ae;typeof i=="function"?ae=i(Y):ae=[i,k?"active":null,A?"pending":null,j?"transitioning":null].filter(Boolean).join(" ");let ie=typeof u=="function"?u(Y):u;return v.createElement(c0,{...m,"aria-current":J,className:ae,ref:g,style:ie,to:f,viewTransition:h},typeof p=="function"?p(Y):p)});KR.displayName="NavLink";var GR=v.forwardRef(({discover:n="render",fetcherKey:a,navigate:l,reloadDocument:i,replace:s,state:u,method:f=tu,action:h,onSubmit:p,relative:m,preventScrollReset:g,viewTransition:x,...S},w)=>{let C=JR(),R=IR(h,{relative:m}),j=f.toLowerCase()==="get"?"get":"post",O=typeof h=="string"&&u0.test(h),U=z=>{if(p&&p(z),z.defaultPrevented)return;z.preventDefault();let H=z.nativeEvent.submitter,k=H?.getAttribute("formmethod")||f;C(H||z.currentTarget,{fetcherKey:a,method:k,navigate:l,replace:s,state:u,relative:m,preventScrollReset:g,viewTransition:x})};return v.createElement("form",{ref:w,method:j,action:R,onSubmit:i?p:U,...S,"data-discover":!O&&n==="render"?"true":void 0})});GR.displayName="Form";function FR(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function f0(n){let a=v.useContext(Kr);return Fe(a,FR(n)),a}function XR(n,{target:a,replace:l,state:i,preventScrollReset:s,relative:u,viewTransition:f}={}){let h=wu(),p=ir(),m=xo(n,{relative:u});return v.useCallback(g=>{if(AR(g,a)){g.preventDefault();let x=l!==void 0?l:tr(p)===tr(m);h(n,{replace:x,state:i,preventScrollReset:s,relative:u,viewTransition:f})}},[p,h,m,l,i,a,n,s,u,f])}var QR=0,ZR=()=>`__${String(++QR)}__`;function JR(){let{router:n}=f0("useSubmit"),{basename:a}=v.useContext(Mn),l=fR();return v.useCallback(async(i,s={})=>{let{action:u,method:f,encType:h,formData:p,body:m}=jR(i,a);if(s.navigate===!1){let g=s.fetcherKey||ZR();await n.fetch(g,l,s.action||u,{preventScrollReset:s.preventScrollReset,formData:p,body:m,formMethod:s.method||f,formEncType:s.encType||h,flushSync:s.flushSync})}else await n.navigate(s.action||u,{preventScrollReset:s.preventScrollReset,formData:p,body:m,formMethod:s.method||f,formEncType:s.encType||h,replace:s.replace,state:s.state,fromRouteId:l,flushSync:s.flushSync,viewTransition:s.viewTransition})},[n,a,l])}function IR(n,{relative:a}={}){let{basename:l}=v.useContext(Mn),i=v.useContext(Qn);Fe(i,"useFormAction must be used inside a RouteContext");let[s]=i.matches.slice(-1),u={...xo(n||".",{relative:a})},f=ir();if(n==null){u.search=f.search;let h=new URLSearchParams(u.search),p=h.getAll("index");if(p.some(g=>g==="")){h.delete("index"),p.filter(x=>x).forEach(x=>h.append("index",x));let g=h.toString();u.search=g?`?${g}`:""}}return(!n||n===".")&&s.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),l!=="/"&&(u.pathname=u.pathname==="/"?l:Kn([l,u.pathname])),tr(u)}function WR(n,a={}){let l=v.useContext($d);Fe(l!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=f0("useViewTransitionState"),s=xo(n,{relative:a.relative});if(!l.isTransitioning)return!1;let u=Rn(l.currentLocation.pathname,i)||l.currentLocation.pathname,f=Rn(l.nextLocation.pathname,i)||l.nextLocation.pathname;return uu(s.pathname,f)!=null||uu(s.pathname,u)!=null}var Ru=$y();const eC=_y(Ru);function tC(n){return v.createElement(yR,{flushSync:Ru.flushSync,...n})}function Jt(n,a,{checkForDefaultPrevented:l=!0}={}){return function(s){if(n?.(s),l===!1||!s.defaultPrevented)return a?.(s)}}function Gv(n,a){if(typeof n=="function")return n(a);n!=null&&(n.current=a)}function kr(...n){return a=>{let l=!1;const i=n.map(s=>{const u=Gv(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():Gv(n[s],null)}}}}function fn(...n){return v.useCallback(kr(...n),n)}function nC(n,a){const l=v.createContext(a),i=u=>{const{children:f,...h}=u,p=v.useMemo(()=>h,Object.values(h));return y.jsx(l.Provider,{value:p,children:f})};i.displayName=n+"Provider";function s(u){const f=v.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 Cu(n,a=[]){let l=[];function i(u,f){const h=v.createContext(f),p=l.length;l=[...l,f];const m=x=>{const{scope:S,children:w,...C}=x,R=S?.[n]?.[p]||h,j=v.useMemo(()=>C,Object.values(C));return y.jsx(R.Provider,{value:j,children:w})};m.displayName=u+"Provider";function g(x,S){const w=S?.[n]?.[p]||h,C=v.useContext(w);if(C)return C;if(f!==void 0)return f;throw new Error(`\`${x}\` must be used within \`${u}\``)}return[m,g]}const s=()=>{const u=l.map(f=>v.createContext(f));return function(h){const p=h?.[n]||u;return v.useMemo(()=>({[`__scope${n}`]:{...h,[n]:p}}),[h,p])}};return s.scopeName=n,[i,aC(s,...a)]}function aC(...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((h,{useScope:p,scopeName:m})=>{const x=p(u)[`__scope${m}`];return{...h,...x}},{});return v.useMemo(()=>({[`__scope${a.scopeName}`]:f}),[f])}};return l.scopeName=a.scopeName,l}var nr=globalThis?.document?v.useLayoutEffect:()=>{},rC=Ly[" useId ".trim().toString()]||(()=>{}),lC=0;function Gn(n){const[a,l]=v.useState(rC());return nr(()=>{l(i=>i??String(lC++))},[n]),n||(a?`radix-${a}`:"")}var iC=Ly[" useInsertionEffect ".trim().toString()]||nr;function Fd({prop:n,defaultProp:a,onChange:l=()=>{},caller:i}){const[s,u,f]=oC({defaultProp:a,onChange:l}),h=n!==void 0,p=h?n:s;{const g=v.useRef(n!==void 0);v.useEffect(()=>{const x=g.current;x!==h&&console.warn(`${i} is changing from ${x?"controlled":"uncontrolled"} to ${h?"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.`),g.current=h},[h,i])}const m=v.useCallback(g=>{if(h){const x=sC(g)?g(n):g;x!==n&&f.current?.(x)}else u(g)},[h,n,u,f]);return[p,m]}function oC({defaultProp:n,onChange:a}){const[l,i]=v.useState(n),s=v.useRef(l),u=v.useRef(a);return iC(()=>{u.current=a},[a]),v.useEffect(()=>{s.current!==l&&(u.current?.(l),s.current=l)},[l,s]),[l,i,u]}function sC(n){return typeof n=="function"}function Ou(n){const a=cC(n),l=v.forwardRef((i,s)=>{const{children:u,...f}=i,h=v.Children.toArray(u),p=h.find(dC);if(p){const m=p.props.children,g=h.map(x=>x===p?v.Children.count(m)>1?v.Children.only(null):v.isValidElement(m)?m.props.children:null:x);return y.jsx(a,{...f,ref:s,children:v.isValidElement(m)?v.cloneElement(m,void 0,g):null})}return y.jsx(a,{...f,ref:s,children:u})});return l.displayName=`${n}.Slot`,l}var uC=Ou("Slot");function cC(n){const a=v.forwardRef((l,i)=>{const{children:s,...u}=l;if(v.isValidElement(s)){const f=mC(s),h=hC(u,s.props);return s.type!==v.Fragment&&(h.ref=i?kr(i,f):f),v.cloneElement(s,h)}return v.Children.count(s)>1?v.Children.only(null):null});return a.displayName=`${n}.SlotClone`,a}var fC=Symbol("radix.slottable");function dC(n){return v.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===fC}function hC(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]=(...h)=>{const p=u(...h);return s(...h),p}:s&&(l[i]=s):i==="style"?l[i]={...s,...u}:i==="className"&&(l[i]=[s,u].filter(Boolean).join(" "))}return{...n,...l}}function mC(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 pC=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],dt=pC.reduce((n,a)=>{const l=Ou(`Primitive.${a}`),i=v.forwardRef((s,u)=>{const{asChild:f,...h}=s,p=f?l:a;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(p,{...h,ref:u})});return i.displayName=`Primitive.${a}`,{...n,[a]:i}},{});function gC(n,a){n&&Ru.flushSync(()=>n.dispatchEvent(a))}function Kl(n){const a=v.useRef(n);return v.useEffect(()=>{a.current=n}),v.useMemo(()=>(...l)=>a.current?.(...l),[])}function vC(n,a=globalThis?.document){const l=Kl(n);v.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 yC="DismissableLayer",Ad="dismissableLayer.update",bC="dismissableLayer.pointerDownOutside",xC="dismissableLayer.focusOutside",Fv,d0=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Xd=v.forwardRef((n,a)=>{const{disableOutsidePointerEvents:l=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:u,onInteractOutside:f,onDismiss:h,...p}=n,m=v.useContext(d0),[g,x]=v.useState(null),S=g?.ownerDocument??globalThis?.document,[,w]=v.useState({}),C=fn(a,Y=>x(Y)),R=Array.from(m.layers),[j]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),O=R.indexOf(j),U=g?R.indexOf(g):-1,z=m.layersWithOutsidePointerEventsDisabled.size>0,H=U>=O,k=EC(Y=>{const J=Y.target,ae=[...m.branches].some(ie=>ie.contains(J));!H||ae||(s?.(Y),f?.(Y),Y.defaultPrevented||h?.())},S),A=RC(Y=>{const J=Y.target;[...m.branches].some(ie=>ie.contains(J))||(u?.(Y),f?.(Y),Y.defaultPrevented||h?.())},S);return vC(Y=>{U===m.layers.size-1&&(i?.(Y),!Y.defaultPrevented&&h&&(Y.preventDefault(),h()))},S),v.useEffect(()=>{if(g)return l&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(Fv=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(g)),m.layers.add(g),Xv(),()=>{l&&m.layersWithOutsidePointerEventsDisabled.size===1&&(S.body.style.pointerEvents=Fv)}},[g,S,l,m]),v.useEffect(()=>()=>{g&&(m.layers.delete(g),m.layersWithOutsidePointerEventsDisabled.delete(g),Xv())},[g,m]),v.useEffect(()=>{const Y=()=>w({});return document.addEventListener(Ad,Y),()=>document.removeEventListener(Ad,Y)},[]),y.jsx(dt.div,{...p,ref:C,style:{pointerEvents:z?H?"auto":"none":void 0,...n.style},onFocusCapture:Jt(n.onFocusCapture,A.onFocusCapture),onBlurCapture:Jt(n.onBlurCapture,A.onBlurCapture),onPointerDownCapture:Jt(n.onPointerDownCapture,k.onPointerDownCapture)})});Xd.displayName=yC;var SC="DismissableLayerBranch",wC=v.forwardRef((n,a)=>{const l=v.useContext(d0),i=v.useRef(null),s=fn(a,i);return v.useEffect(()=>{const u=i.current;if(u)return l.branches.add(u),()=>{l.branches.delete(u)}},[l.branches]),y.jsx(dt.div,{...n,ref:s})});wC.displayName=SC;function EC(n,a=globalThis?.document){const l=Kl(n),i=v.useRef(!1),s=v.useRef(()=>{});return v.useEffect(()=>{const u=h=>{if(h.target&&!i.current){let p=function(){h0(bC,l,m,{discrete:!0})};const m={originalEvent:h};h.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 RC(n,a=globalThis?.document){const l=Kl(n),i=v.useRef(!1);return v.useEffect(()=>{const s=u=>{u.target&&!i.current&&h0(xC,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 Xv(){const n=new CustomEvent(Ad);document.dispatchEvent(n)}function h0(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?gC(s,u):s.dispatchEvent(u)}var ed="focusScope.autoFocusOnMount",td="focusScope.autoFocusOnUnmount",Qv={bubbles:!1,cancelable:!0},CC="FocusScope",Qd=v.forwardRef((n,a)=>{const{loop:l=!1,trapped:i=!1,onMountAutoFocus:s,onUnmountAutoFocus:u,...f}=n,[h,p]=v.useState(null),m=Kl(s),g=Kl(u),x=v.useRef(null),S=fn(a,R=>p(R)),w=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(i){let R=function(z){if(w.paused||!h)return;const H=z.target;h.contains(H)?x.current=H:Ja(x.current,{select:!0})},j=function(z){if(w.paused||!h)return;const H=z.relatedTarget;H!==null&&(h.contains(H)||Ja(x.current,{select:!0}))},O=function(z){if(document.activeElement===document.body)for(const k of z)k.removedNodes.length>0&&Ja(h)};document.addEventListener("focusin",R),document.addEventListener("focusout",j);const U=new MutationObserver(O);return h&&U.observe(h,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",R),document.removeEventListener("focusout",j),U.disconnect()}}},[i,h,w.paused]),v.useEffect(()=>{if(h){Jv.add(w);const R=document.activeElement;if(!h.contains(R)){const O=new CustomEvent(ed,Qv);h.addEventListener(ed,m),h.dispatchEvent(O),O.defaultPrevented||(OC(_C(m0(h)),{select:!0}),document.activeElement===R&&Ja(h))}return()=>{h.removeEventListener(ed,m),setTimeout(()=>{const O=new CustomEvent(td,Qv);h.addEventListener(td,g),h.dispatchEvent(O),O.defaultPrevented||Ja(R??document.body,{select:!0}),h.removeEventListener(td,g),Jv.remove(w)},0)}}},[h,m,g,w]);const C=v.useCallback(R=>{if(!l&&!i||w.paused)return;const j=R.key==="Tab"&&!R.altKey&&!R.ctrlKey&&!R.metaKey,O=document.activeElement;if(j&&O){const U=R.currentTarget,[z,H]=AC(U);z&&H?!R.shiftKey&&O===H?(R.preventDefault(),l&&Ja(z,{select:!0})):R.shiftKey&&O===z&&(R.preventDefault(),l&&Ja(H,{select:!0})):O===U&&R.preventDefault()}},[l,i,w.paused]);return y.jsx(dt.div,{tabIndex:-1,...f,ref:S,onKeyDown:C})});Qd.displayName=CC;function OC(n,{select:a=!1}={}){const l=document.activeElement;for(const i of n)if(Ja(i,{select:a}),document.activeElement!==l)return}function AC(n){const a=m0(n),l=Zv(a,n),i=Zv(a.reverse(),n);return[l,i]}function m0(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 Zv(n,a){for(const l of n)if(!NC(l,{upTo:a}))return l}function NC(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 TC(n){return n instanceof HTMLInputElement&&"select"in n}function Ja(n,{select:a=!1}={}){if(n&&n.focus){const l=document.activeElement;n.focus({preventScroll:!0}),n!==l&&TC(n)&&a&&n.select()}}var Jv=jC();function jC(){let n=[];return{add(a){const l=n[0];a!==l&&l?.pause(),n=Iv(n,a),n.unshift(a)},remove(a){n=Iv(n,a),n[0]?.resume()}}}function Iv(n,a){const l=[...n],i=l.indexOf(a);return i!==-1&&l.splice(i,1),l}function _C(n){return n.filter(a=>a.tagName!=="A")}var MC="Portal",Zd=v.forwardRef((n,a)=>{const{container:l,...i}=n,[s,u]=v.useState(!1);nr(()=>u(!0),[]);const f=l||s&&globalThis?.document?.body;return f?eC.createPortal(y.jsx(dt.div,{...i,ref:a}),f):null});Zd.displayName=MC;function DC(n,a){return v.useReducer((l,i)=>a[l][i]??l,n)}var Jl=n=>{const{present:a,children:l}=n,i=LC(a),s=typeof l=="function"?l({present:i.isPresent}):v.Children.only(l),u=fn(i.ref,zC(s));return typeof l=="function"||i.isPresent?v.cloneElement(s,{ref:u}):null};Jl.displayName="Presence";function LC(n){const[a,l]=v.useState(),i=v.useRef(null),s=v.useRef(n),u=v.useRef("none"),f=n?"mounted":"unmounted",[h,p]=DC(f,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const m=qs(i.current);u.current=h==="mounted"?m:"none"},[h]),nr(()=>{const m=i.current,g=s.current;if(g!==n){const S=u.current,w=qs(m);n?p("MOUNT"):w==="none"||m?.display==="none"?p("UNMOUNT"):p(g&&S!==w?"ANIMATION_OUT":"UNMOUNT"),s.current=n}},[n,p]),nr(()=>{if(a){let m;const g=a.ownerDocument.defaultView??window,x=w=>{const R=qs(i.current).includes(w.animationName);if(w.target===a&&R&&(p("ANIMATION_END"),!s.current)){const j=a.style.animationFillMode;a.style.animationFillMode="forwards",m=g.setTimeout(()=>{a.style.animationFillMode==="forwards"&&(a.style.animationFillMode=j)})}},S=w=>{w.target===a&&(u.current=qs(i.current))};return a.addEventListener("animationstart",S),a.addEventListener("animationcancel",x),a.addEventListener("animationend",x),()=>{g.clearTimeout(m),a.removeEventListener("animationstart",S),a.removeEventListener("animationcancel",x),a.removeEventListener("animationend",x)}}else p("ANIMATION_END")},[a,p]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:v.useCallback(m=>{i.current=m?getComputedStyle(m):null,l(m)},[])}}function qs(n){return n?.animationName||"none"}function zC(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 nd=0;function p0(){v.useEffect(()=>{const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",n[0]??Wv()),document.body.insertAdjacentElement("beforeend",n[1]??Wv()),nd++,()=>{nd===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(a=>a.remove()),nd--}},[])}function Wv(){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 Vn=function(){return Vn=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},Vn.apply(this,arguments)};function g0(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 kC(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 au="right-scroll-bar-position",ru="width-before-scroll-bar",UC="with-scroll-bars-hidden",PC="--removed-body-scroll-bar-size";function ad(n,a){return typeof n=="function"?n(a):n&&(n.current=a),n}function HC(n,a){var l=v.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 BC=typeof window<"u"?v.useLayoutEffect:v.useEffect,ey=new WeakMap;function $C(n,a){var l=HC(null,function(i){return n.forEach(function(s){return ad(s,i)})});return BC(function(){var i=ey.get(l);if(i){var s=new Set(i),u=new Set(n),f=l.current;s.forEach(function(h){u.has(h)||ad(h,null)}),u.forEach(function(h){s.has(h)||ad(h,f)})}ey.set(l,n)},[n]),l}function VC(n){return n}function qC(n,a){a===void 0&&(a=VC);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(h){return h!==f})}},assignSyncMedium:function(u){for(i=!0;l.length;){var f=l;l=[],f.forEach(u)}l={push:function(h){return u(h)},filter:function(){return l}}},assignMedium:function(u){i=!0;var f=[];if(l.length){var h=l;l=[],h.forEach(u),f=l}var p=function(){var g=f;f=[],g.forEach(u)},m=function(){return Promise.resolve().then(p)};m(),l={push:function(g){f.push(g),m()},filter:function(g){return f=f.filter(g),l}}}};return s}function YC(n){n===void 0&&(n={});var a=qC(null);return a.options=Vn({async:!0,ssr:!1},n),a}var v0=function(n){var a=n.sideCar,l=g0(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 v.createElement(i,Vn({},l))};v0.isSideCarExport=!0;function KC(n,a){return n.useMedium(a),v0}var y0=YC(),rd=function(){},Au=v.forwardRef(function(n,a){var l=v.useRef(null),i=v.useState({onScrollCapture:rd,onWheelCapture:rd,onTouchMoveCapture:rd}),s=i[0],u=i[1],f=n.forwardProps,h=n.children,p=n.className,m=n.removeScrollBar,g=n.enabled,x=n.shards,S=n.sideCar,w=n.noRelative,C=n.noIsolation,R=n.inert,j=n.allowPinchZoom,O=n.as,U=O===void 0?"div":O,z=n.gapMode,H=g0(n,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=S,A=$C([l,a]),Y=Vn(Vn({},H),s);return v.createElement(v.Fragment,null,g&&v.createElement(k,{sideCar:y0,removeScrollBar:m,shards:x,noRelative:w,noIsolation:C,inert:R,setCallbacks:u,allowPinchZoom:!!j,lockRef:l,gapMode:z}),f?v.cloneElement(v.Children.only(h),Vn(Vn({},Y),{ref:A})):v.createElement(U,Vn({},Y,{className:p,ref:A}),h))});Au.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Au.classNames={fullWidth:ru,zeroRight:au};var GC=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function FC(){if(!document)return null;var n=document.createElement("style");n.type="text/css";var a=GC();return a&&n.setAttribute("nonce",a),n}function XC(n,a){n.styleSheet?n.styleSheet.cssText=a:n.appendChild(document.createTextNode(a))}function QC(n){var a=document.head||document.getElementsByTagName("head")[0];a.appendChild(n)}var ZC=function(){var n=0,a=null;return{add:function(l){n==0&&(a=FC())&&(XC(a,l),QC(a)),n++},remove:function(){n--,!n&&a&&(a.parentNode&&a.parentNode.removeChild(a),a=null)}}},JC=function(){var n=ZC();return function(a,l){v.useEffect(function(){return n.add(a),function(){n.remove()}},[a&&l])}},b0=function(){var n=JC(),a=function(l){var i=l.styles,s=l.dynamic;return n(i,s),null};return a},IC={left:0,top:0,right:0,gap:0},ld=function(n){return parseInt(n||"",10)||0},WC=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[ld(l),ld(i),ld(s)]},e2=function(n){if(n===void 0&&(n="margin"),typeof window>"u")return IC;var a=WC(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])}},t2=b0(),Vl="data-scroll-locked",n2=function(n,a,l,i){var s=n.left,u=n.top,f=n.right,h=n.gap;return l===void 0&&(l="margin"),`
68
- .`.concat(UC,` {
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(o_,` {
69
69
  overflow: hidden `).concat(i,`;
70
- padding-right: `).concat(h,"px ").concat(i,`;
70
+ padding-right: `).concat(d,"px ").concat(i,`;
71
71
  }
72
- body[`).concat(Vl,`] {
72
+ body[`).concat(Fl,`] {
73
73
  overflow: hidden `).concat(i,`;
74
74
  overscroll-behavior: contain;
75
75
  `).concat([a&&"position: relative ".concat(i,";"),l==="margin"&&`
@@ -78,148 +78,212 @@ Please change the parent <Route path="${O}"> to <Route path="${O==="/"?"*":`${O}
78
78
  padding-right: `).concat(f,`px;
79
79
  margin-left:0;
80
80
  margin-top:0;
81
- margin-right: `).concat(h,"px ").concat(i,`;
82
- `),l==="padding"&&"padding-right: ".concat(h,"px ").concat(i,";")].filter(Boolean).join(""),`
81
+ margin-right: `).concat(d,"px ").concat(i,`;
82
+ `),l==="padding"&&"padding-right: ".concat(d,"px ").concat(i,";")].filter(Boolean).join(""),`
83
83
  }
84
84
 
85
- .`).concat(au,` {
86
- right: `).concat(h,"px ").concat(i,`;
85
+ .`).concat(su,` {
86
+ right: `).concat(d,"px ").concat(i,`;
87
87
  }
88
88
 
89
- .`).concat(ru,` {
90
- margin-right: `).concat(h,"px ").concat(i,`;
89
+ .`).concat(uu,` {
90
+ margin-right: `).concat(d,"px ").concat(i,`;
91
91
  }
92
92
 
93
- .`).concat(au," .").concat(au,` {
93
+ .`).concat(su," .").concat(su,` {
94
94
  right: 0 `).concat(i,`;
95
95
  }
96
96
 
97
- .`).concat(ru," .").concat(ru,` {
97
+ .`).concat(uu," .").concat(uu,` {
98
98
  margin-right: 0 `).concat(i,`;
99
99
  }
100
100
 
101
- body[`).concat(Vl,`] {
102
- `).concat(PC,": ").concat(h,`px;
101
+ body[`).concat(Fl,`] {
102
+ `).concat(s_,": ").concat(d,`px;
103
103
  }
104
- `)},ty=function(){var n=parseInt(document.body.getAttribute(Vl)||"0",10);return isFinite(n)?n:0},a2=function(){v.useEffect(function(){return document.body.setAttribute(Vl,(ty()+1).toString()),function(){var n=ty()-1;n<=0?document.body.removeAttribute(Vl):document.body.setAttribute(Vl,n.toString())}},[])},r2=function(n){var a=n.noRelative,l=n.noImportant,i=n.gapMode,s=i===void 0?"margin":i;a2();var u=v.useMemo(function(){return e2(s)},[s]);return v.createElement(t2,{styles:n2(u,!a,s,l?"":"!important")})},Nd=!1;if(typeof window<"u")try{var Ys=Object.defineProperty({},"passive",{get:function(){return Nd=!0,!0}});window.addEventListener("test",Ys,Ys),window.removeEventListener("test",Ys,Ys)}catch{Nd=!1}var Dl=Nd?{passive:!1}:!1,l2=function(n){return n.tagName==="TEXTAREA"},x0=function(n,a){if(!(n instanceof Element))return!1;var l=window.getComputedStyle(n);return l[a]!=="hidden"&&!(l.overflowY===l.overflowX&&!l2(n)&&l[a]==="visible")},i2=function(n){return x0(n,"overflowY")},o2=function(n){return x0(n,"overflowX")},ny=function(n,a){var l=a.ownerDocument,i=a;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var s=S0(n,i);if(s){var u=w0(n,i),f=u[1],h=u[2];if(f>h)return!0}i=i.parentNode}while(i&&i!==l.body);return!1},s2=function(n){var a=n.scrollTop,l=n.scrollHeight,i=n.clientHeight;return[a,l,i]},u2=function(n){var a=n.scrollLeft,l=n.scrollWidth,i=n.clientWidth;return[a,l,i]},S0=function(n,a){return n==="v"?i2(a):o2(a)},w0=function(n,a){return n==="v"?s2(a):u2(a)},c2=function(n,a){return n==="h"&&a==="rtl"?-1:1},f2=function(n,a,l,i,s){var u=c2(n,window.getComputedStyle(a).direction),f=u*i,h=l.target,p=a.contains(h),m=!1,g=f>0,x=0,S=0;do{if(!h)break;var w=w0(n,h),C=w[0],R=w[1],j=w[2],O=R-j-u*C;(C||O)&&S0(n,h)&&(x+=O,S+=C);var U=h.parentNode;h=U&&U.nodeType===Node.DOCUMENT_FRAGMENT_NODE?U.host:U}while(!p&&h!==document.body||p&&(a.contains(h)||a===h));return(g&&Math.abs(x)<1||!g&&Math.abs(S)<1)&&(m=!0),m},Ks=function(n){return"changedTouches"in n?[n.changedTouches[0].clientX,n.changedTouches[0].clientY]:[0,0]},ay=function(n){return[n.deltaX,n.deltaY]},ry=function(n){return n&&"current"in n?n.current:n},d2=function(n,a){return n[0]===a[0]&&n[1]===a[1]},h2=function(n){return`
104
+ `)},py=function(){var n=parseInt(document.body.getAttribute(Fl)||"0",10);return isFinite(n)?n:0},R_=function(){y.useEffect(function(){return document.body.setAttribute(Fl,(py()+1).toString()),function(){var n=py()-1;n<=0?document.body.removeAttribute(Fl):document.body.setAttribute(Fl,n.toString())}},[])},j_=function(n){var a=n.noRelative,l=n.noImportant,i=n.gapMode,s=i===void 0?"margin":i;R_();var u=y.useMemo(function(){return C_(s)},[s]);return y.createElement(__,{styles:N_(u,!a,s,l?"":"!important")})},Hd=!1;if(typeof window<"u")try{var Xs=Object.defineProperty({},"passive",{get:function(){return Hd=!0,!0}});window.addEventListener("test",Xs,Xs),window.removeEventListener("test",Xs,Xs)}catch{Hd=!1}var Pl=Hd?{passive:!1}:!1,O_=function(n){return n.tagName==="TEXTAREA"},H0=function(n,a){if(!(n instanceof Element))return!1;var l=window.getComputedStyle(n);return l[a]!=="hidden"&&!(l.overflowY===l.overflowX&&!O_(n)&&l[a]==="visible")},A_=function(n){return H0(n,"overflowY")},T_=function(n){return H0(n,"overflowX")},gy=function(n,a){var l=a.ownerDocument,i=a;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var s=B0(n,i);if(s){var u=$0(n,i),f=u[1],d=u[2];if(f>d)return!0}i=i.parentNode}while(i&&i!==l.body);return!1},M_=function(n){var a=n.scrollTop,l=n.scrollHeight,i=n.clientHeight;return[a,l,i]},D_=function(n){var a=n.scrollLeft,l=n.scrollWidth,i=n.clientWidth;return[a,l,i]},B0=function(n,a){return n==="v"?A_(a):T_(a)},$0=function(n,a){return n==="v"?M_(a):D_(a)},L_=function(n,a){return n==="h"&&a==="rtl"?-1:1},k_=function(n,a,l,i,s){var u=L_(n,window.getComputedStyle(a).direction),f=u*i,d=l.target,p=a.contains(d),m=!1,v=f>0,b=0,S=0;do{if(!d)break;var w=$0(n,d),_=w[0],C=w[1],j=w[2],N=C-j-u*_;(_||N)&&B0(n,d)&&(b+=N,S+=_);var U=d.parentNode;d=U&&U.nodeType===Node.DOCUMENT_FRAGMENT_NODE?U.host:U}while(!p&&d!==document.body||p&&(a.contains(d)||a===d));return(v&&Math.abs(b)<1||!v&&Math.abs(S)<1)&&(m=!0),m},Qs=function(n){return"changedTouches"in n?[n.changedTouches[0].clientX,n.changedTouches[0].clientY]:[0,0]},vy=function(n){return[n.deltaX,n.deltaY]},yy=function(n){return n&&"current"in n?n.current:n},z_=function(n,a){return n[0]===a[0]&&n[1]===a[1]},U_=function(n){return`
105
105
  .block-interactivity-`.concat(n,` {pointer-events: none;}
106
106
  .allow-interactivity-`).concat(n,` {pointer-events: all;}
107
- `)},m2=0,Ll=[];function p2(n){var a=v.useRef([]),l=v.useRef([0,0]),i=v.useRef(),s=v.useState(m2++)[0],u=v.useState(b0)[0],f=v.useRef(n);v.useEffect(function(){f.current=n},[n]),v.useEffect(function(){if(n.inert){document.body.classList.add("block-interactivity-".concat(s));var R=kC([n.lockRef.current],(n.shards||[]).map(ry),!0).filter(Boolean);return R.forEach(function(j){return j.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),R.forEach(function(j){return j.classList.remove("allow-interactivity-".concat(s))})}}},[n.inert,n.lockRef.current,n.shards]);var h=v.useCallback(function(R,j){if("touches"in R&&R.touches.length===2||R.type==="wheel"&&R.ctrlKey)return!f.current.allowPinchZoom;var O=Ks(R),U=l.current,z="deltaX"in R?R.deltaX:U[0]-O[0],H="deltaY"in R?R.deltaY:U[1]-O[1],k,A=R.target,Y=Math.abs(z)>Math.abs(H)?"h":"v";if("touches"in R&&Y==="h"&&A.type==="range")return!1;var J=ny(Y,A);if(!J)return!0;if(J?k=Y:(k=Y==="v"?"h":"v",J=ny(Y,A)),!J)return!1;if(!i.current&&"changedTouches"in R&&(z||H)&&(i.current=k),!k)return!0;var ae=i.current||k;return f2(ae,j,R,ae==="h"?z:H)},[]),p=v.useCallback(function(R){var j=R;if(!(!Ll.length||Ll[Ll.length-1]!==u)){var O="deltaY"in j?ay(j):Ks(j),U=a.current.filter(function(k){return k.name===j.type&&(k.target===j.target||j.target===k.shadowParent)&&d2(k.delta,O)})[0];if(U&&U.should){j.cancelable&&j.preventDefault();return}if(!U){var z=(f.current.shards||[]).map(ry).filter(Boolean).filter(function(k){return k.contains(j.target)}),H=z.length>0?h(j,z[0]):!f.current.noIsolation;H&&j.cancelable&&j.preventDefault()}}},[]),m=v.useCallback(function(R,j,O,U){var z={name:R,delta:j,target:O,should:U,shadowParent:g2(O)};a.current.push(z),setTimeout(function(){a.current=a.current.filter(function(H){return H!==z})},1)},[]),g=v.useCallback(function(R){l.current=Ks(R),i.current=void 0},[]),x=v.useCallback(function(R){m(R.type,ay(R),R.target,h(R,n.lockRef.current))},[]),S=v.useCallback(function(R){m(R.type,Ks(R),R.target,h(R,n.lockRef.current))},[]);v.useEffect(function(){return Ll.push(u),n.setCallbacks({onScrollCapture:x,onWheelCapture:x,onTouchMoveCapture:S}),document.addEventListener("wheel",p,Dl),document.addEventListener("touchmove",p,Dl),document.addEventListener("touchstart",g,Dl),function(){Ll=Ll.filter(function(R){return R!==u}),document.removeEventListener("wheel",p,Dl),document.removeEventListener("touchmove",p,Dl),document.removeEventListener("touchstart",g,Dl)}},[]);var w=n.removeScrollBar,C=n.inert;return v.createElement(v.Fragment,null,C?v.createElement(u,{styles:h2(s)}):null,w?v.createElement(r2,{noRelative:n.noRelative,gapMode:n.gapMode}):null)}function g2(n){for(var a=null;n!==null;)n instanceof ShadowRoot&&(a=n.host,n=n.host),n=n.parentNode;return a}const v2=KC(y0,p2);var Jd=v.forwardRef(function(n,a){return v.createElement(Au,Vn({},n,{ref:a,sideCar:v2}))});Jd.classNames=Au.classNames;var y2=function(n){if(typeof document>"u")return null;var a=Array.isArray(n)?n[0]:n;return a.ownerDocument.body},zl=new WeakMap,Gs=new WeakMap,Fs={},id=0,E0=function(n){return n&&(n.host||E0(n.parentNode))},b2=function(n,a){return a.map(function(l){if(n.contains(l))return l;var i=E0(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})},x2=function(n,a,l,i){var s=b2(a,Array.isArray(n)?n:[n]);Fs[l]||(Fs[l]=new WeakMap);var u=Fs[l],f=[],h=new Set,p=new Set(s),m=function(x){!x||h.has(x)||(h.add(x),m(x.parentNode))};s.forEach(m);var g=function(x){!x||p.has(x)||Array.prototype.forEach.call(x.children,function(S){if(h.has(S))g(S);else try{var w=S.getAttribute(i),C=w!==null&&w!=="false",R=(zl.get(S)||0)+1,j=(u.get(S)||0)+1;zl.set(S,R),u.set(S,j),f.push(S),R===1&&C&&Gs.set(S,!0),j===1&&S.setAttribute(l,"true"),C||S.setAttribute(i,"true")}catch(O){console.error("aria-hidden: cannot operate on ",S,O)}})};return g(a),h.clear(),id++,function(){f.forEach(function(x){var S=zl.get(x)-1,w=u.get(x)-1;zl.set(x,S),u.set(x,w),S||(Gs.has(x)||x.removeAttribute(i),Gs.delete(x)),w||x.removeAttribute(l)}),id--,id||(zl=new WeakMap,zl=new WeakMap,Gs=new WeakMap,Fs={})}},R0=function(n,a,l){l===void 0&&(l="data-aria-hidden");var i=Array.from(Array.isArray(n)?n:[n]),s=y2(n);return s?(i.push.apply(i,Array.from(s.querySelectorAll("[aria-live], script"))),x2(i,s,l,"aria-hidden")):function(){return null}},Nu="Dialog",[C0,Tj]=Cu(Nu),[S2,Dn]=C0(Nu),O0=n=>{const{__scopeDialog:a,children:l,open:i,defaultOpen:s,onOpenChange:u,modal:f=!0}=n,h=v.useRef(null),p=v.useRef(null),[m,g]=Fd({prop:i,defaultProp:s??!1,onChange:u,caller:Nu});return y.jsx(S2,{scope:a,triggerRef:h,contentRef:p,contentId:Gn(),titleId:Gn(),descriptionId:Gn(),open:m,onOpenChange:g,onOpenToggle:v.useCallback(()=>g(x=>!x),[g]),modal:f,children:l})};O0.displayName=Nu;var A0="DialogTrigger",w2=v.forwardRef((n,a)=>{const{__scopeDialog:l,...i}=n,s=Dn(A0,l),u=fn(a,s.triggerRef);return y.jsx(dt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":eh(s.open),...i,ref:u,onClick:Jt(n.onClick,s.onOpenToggle)})});w2.displayName=A0;var Id="DialogPortal",[E2,N0]=C0(Id,{forceMount:void 0}),T0=n=>{const{__scopeDialog:a,forceMount:l,children:i,container:s}=n,u=Dn(Id,a);return y.jsx(E2,{scope:a,forceMount:l,children:v.Children.map(i,f=>y.jsx(Jl,{present:l||u.open,children:y.jsx(Zd,{asChild:!0,container:s,children:f})}))})};T0.displayName=Id;var fu="DialogOverlay",j0=v.forwardRef((n,a)=>{const l=N0(fu,n.__scopeDialog),{forceMount:i=l.forceMount,...s}=n,u=Dn(fu,n.__scopeDialog);return u.modal?y.jsx(Jl,{present:i||u.open,children:y.jsx(C2,{...s,ref:a})}):null});j0.displayName=fu;var R2=Ou("DialogOverlay.RemoveScroll"),C2=v.forwardRef((n,a)=>{const{__scopeDialog:l,...i}=n,s=Dn(fu,l);return y.jsx(Jd,{as:R2,allowPinchZoom:!0,shards:[s.contentRef],children:y.jsx(dt.div,{"data-state":eh(s.open),...i,ref:a,style:{pointerEvents:"auto",...i.style}})})}),Ur="DialogContent",_0=v.forwardRef((n,a)=>{const l=N0(Ur,n.__scopeDialog),{forceMount:i=l.forceMount,...s}=n,u=Dn(Ur,n.__scopeDialog);return y.jsx(Jl,{present:i||u.open,children:u.modal?y.jsx(O2,{...s,ref:a}):y.jsx(A2,{...s,ref:a})})});_0.displayName=Ur;var O2=v.forwardRef((n,a)=>{const l=Dn(Ur,n.__scopeDialog),i=v.useRef(null),s=fn(a,l.contentRef,i);return v.useEffect(()=>{const u=i.current;if(u)return R0(u)},[]),y.jsx(M0,{...n,ref:s,trapFocus:l.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Jt(n.onCloseAutoFocus,u=>{u.preventDefault(),l.triggerRef.current?.focus()}),onPointerDownOutside:Jt(n.onPointerDownOutside,u=>{const f=u.detail.originalEvent,h=f.button===0&&f.ctrlKey===!0;(f.button===2||h)&&u.preventDefault()}),onFocusOutside:Jt(n.onFocusOutside,u=>u.preventDefault())})}),A2=v.forwardRef((n,a)=>{const l=Dn(Ur,n.__scopeDialog),i=v.useRef(!1),s=v.useRef(!1);return y.jsx(M0,{...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()}})}),M0=v.forwardRef((n,a)=>{const{__scopeDialog:l,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:u,...f}=n,h=Dn(Ur,l),p=v.useRef(null),m=fn(a,p);return p0(),y.jsxs(y.Fragment,{children:[y.jsx(Qd,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:s,onUnmountAutoFocus:u,children:y.jsx(Xd,{role:"dialog",id:h.contentId,"aria-describedby":h.descriptionId,"aria-labelledby":h.titleId,"data-state":eh(h.open),...f,ref:m,onDismiss:()=>h.onOpenChange(!1)})}),y.jsxs(y.Fragment,{children:[y.jsx(N2,{titleId:h.titleId}),y.jsx(j2,{contentRef:p,descriptionId:h.descriptionId})]})]})}),Wd="DialogTitle",D0=v.forwardRef((n,a)=>{const{__scopeDialog:l,...i}=n,s=Dn(Wd,l);return y.jsx(dt.h2,{id:s.titleId,...i,ref:a})});D0.displayName=Wd;var L0="DialogDescription",z0=v.forwardRef((n,a)=>{const{__scopeDialog:l,...i}=n,s=Dn(L0,l);return y.jsx(dt.p,{id:s.descriptionId,...i,ref:a})});z0.displayName=L0;var k0="DialogClose",U0=v.forwardRef((n,a)=>{const{__scopeDialog:l,...i}=n,s=Dn(k0,l);return y.jsx(dt.button,{type:"button",...i,ref:a,onClick:Jt(n.onClick,()=>s.onOpenChange(!1))})});U0.displayName=k0;function eh(n){return n?"open":"closed"}var P0="DialogTitleWarning",[jj,H0]=nC(P0,{contentName:Ur,titleName:Wd,docsSlug:"dialog"}),N2=({titleId:n})=>{const a=H0(P0),l=`\`${a.contentName}\` requires a \`${a.titleName}\` for the component to be accessible for screen reader users.
107
+ `)},P_=0,Hl=[];function H_(n){var a=y.useRef([]),l=y.useRef([0,0]),i=y.useRef(),s=y.useState(P_++)[0],u=y.useState(P0)[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 C=i_([n.lockRef.current],(n.shards||[]).map(yy),!0).filter(Boolean);return C.forEach(function(j){return j.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),C.forEach(function(j){return j.classList.remove("allow-interactivity-".concat(s))})}}},[n.inert,n.lockRef.current,n.shards]);var d=y.useCallback(function(C,j){if("touches"in C&&C.touches.length===2||C.type==="wheel"&&C.ctrlKey)return!f.current.allowPinchZoom;var N=Qs(C),U=l.current,z="deltaX"in C?C.deltaX:U[0]-N[0],D="deltaY"in C?C.deltaY:U[1]-N[1],T,R=C.target,H=Math.abs(z)>Math.abs(D)?"h":"v";if("touches"in C&&H==="h"&&R.type==="range")return!1;var Z=gy(H,R);if(!Z)return!0;if(Z?T=H:(T=H==="v"?"h":"v",Z=gy(H,R)),!Z)return!1;if(!i.current&&"changedTouches"in C&&(z||D)&&(i.current=T),!T)return!0;var J=i.current||T;return k_(J,j,C,J==="h"?z:D)},[]),p=y.useCallback(function(C){var j=C;if(!(!Hl.length||Hl[Hl.length-1]!==u)){var N="deltaY"in j?vy(j):Qs(j),U=a.current.filter(function(T){return T.name===j.type&&(T.target===j.target||j.target===T.shadowParent)&&z_(T.delta,N)})[0];if(U&&U.should){j.cancelable&&j.preventDefault();return}if(!U){var z=(f.current.shards||[]).map(yy).filter(Boolean).filter(function(T){return T.contains(j.target)}),D=z.length>0?d(j,z[0]):!f.current.noIsolation;D&&j.cancelable&&j.preventDefault()}}},[]),m=y.useCallback(function(C,j,N,U){var z={name:C,delta:j,target:N,should:U,shadowParent:B_(N)};a.current.push(z),setTimeout(function(){a.current=a.current.filter(function(D){return D!==z})},1)},[]),v=y.useCallback(function(C){l.current=Qs(C),i.current=void 0},[]),b=y.useCallback(function(C){m(C.type,vy(C),C.target,d(C,n.lockRef.current))},[]),S=y.useCallback(function(C){m(C.type,Qs(C),C.target,d(C,n.lockRef.current))},[]);y.useEffect(function(){return Hl.push(u),n.setCallbacks({onScrollCapture:b,onWheelCapture:b,onTouchMoveCapture:S}),document.addEventListener("wheel",p,Pl),document.addEventListener("touchmove",p,Pl),document.addEventListener("touchstart",v,Pl),function(){Hl=Hl.filter(function(C){return C!==u}),document.removeEventListener("wheel",p,Pl),document.removeEventListener("touchmove",p,Pl),document.removeEventListener("touchstart",v,Pl)}},[]);var w=n.removeScrollBar,_=n.inert;return y.createElement(y.Fragment,null,_?y.createElement(u,{styles:U_(s)}):null,w?y.createElement(j_,{noRelative:n.noRelative,gapMode:n.gapMode}):null)}function B_(n){for(var a=null;n!==null;)n instanceof ShadowRoot&&(a=n.host,n=n.host),n=n.parentNode;return a}const $_=p_(U0,H_);var hh=y.forwardRef(function(n,a){return y.createElement(Lu,Kn({},n,{ref:a,sideCar:$_}))});hh.classNames=Lu.classNames;var V_=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={},vd=0,V0=function(n){return n&&(n.host||V0(n.parentNode))},Y_=function(n,a){return a.map(function(l){if(n.contains(l))return l;var i=V0(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})},q_=function(n,a,l,i){var s=Y_(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(S){if(d.has(S))v(S);else try{var w=S.getAttribute(i),_=w!==null&&w!=="false",C=(Bl.get(S)||0)+1,j=(u.get(S)||0)+1;Bl.set(S,C),u.set(S,j),f.push(S),C===1&&_&&Zs.set(S,!0),j===1&&S.setAttribute(l,"true"),_||S.setAttribute(i,"true")}catch(N){console.error("aria-hidden: cannot operate on ",S,N)}})};return v(a),d.clear(),vd++,function(){f.forEach(function(b){var S=Bl.get(b)-1,w=u.get(b)-1;Bl.set(b,S),u.set(b,w),S||(Zs.has(b)||b.removeAttribute(i),Zs.delete(b)),w||b.removeAttribute(l)}),vd--,vd||(Bl=new WeakMap,Bl=new WeakMap,Zs=new WeakMap,Is={})}},Y0=function(n,a,l){l===void 0&&(l="data-aria-hidden");var i=Array.from(Array.isArray(n)?n:[n]),s=V_(n);return s?(i.push.apply(i,Array.from(s.querySelectorAll("[aria-live], script"))),q_(i,s,l,"aria-hidden")):function(){return null}},ku="Dialog",[q0,ST]=Mu(ku),[K_,zn]=q0(ku),K0=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]=uh({prop:i,defaultProp:s??!1,onChange:u,caller:ku});return g.jsx(K_,{scope:a,triggerRef:d,contentRef:p,contentId:Qn(),titleId:Qn(),descriptionId:Qn(),open:m,onOpenChange:v,onOpenToggle:y.useCallback(()=>v(b=>!b),[v]),modal:f,children:l})};K0.displayName=ku;var G0="DialogTrigger",G_=y.forwardRef((n,a)=>{const{__scopeDialog:l,...i}=n,s=zn(G0,l),u=hn(a,s.triggerRef);return g.jsx(dt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":gh(s.open),...i,ref:u,onClick:Wt(n.onClick,s.onOpenToggle)})});G_.displayName=G0;var mh="DialogPortal",[F_,F0]=q0(mh,{forceMount:void 0}),X0=n=>{const{__scopeDialog:a,forceMount:l,children:i,container:s}=n,u=zn(mh,a);return g.jsx(F_,{scope:a,forceMount:l,children:y.Children.map(i,f=>g.jsx(ei,{present:l||u.open,children:g.jsx(dh,{asChild:!0,container:s,children:f})}))})};X0.displayName=mh;var gu="DialogOverlay",Q0=y.forwardRef((n,a)=>{const l=F0(gu,n.__scopeDialog),{forceMount:i=l.forceMount,...s}=n,u=zn(gu,n.__scopeDialog);return u.modal?g.jsx(ei,{present:i||u.open,children:g.jsx(Q_,{...s,ref:a})}):null});Q0.displayName=gu;var X_=Du("DialogOverlay.RemoveScroll"),Q_=y.forwardRef((n,a)=>{const{__scopeDialog:l,...i}=n,s=zn(gu,l);return g.jsx(hh,{as:X_,allowPinchZoom:!0,shards:[s.contentRef],children:g.jsx(dt.div,{"data-state":gh(s.open),...i,ref:a,style:{pointerEvents:"auto",...i.style}})})}),Yr="DialogContent",Z0=y.forwardRef((n,a)=>{const l=F0(Yr,n.__scopeDialog),{forceMount:i=l.forceMount,...s}=n,u=zn(Yr,n.__scopeDialog);return g.jsx(ei,{present:i||u.open,children:u.modal?g.jsx(Z_,{...s,ref:a}):g.jsx(I_,{...s,ref:a})})});Z0.displayName=Yr;var Z_=y.forwardRef((n,a)=>{const l=zn(Yr,n.__scopeDialog),i=y.useRef(null),s=hn(a,l.contentRef,i);return y.useEffect(()=>{const u=i.current;if(u)return Y0(u)},[]),g.jsx(I0,{...n,ref:s,trapFocus:l.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Wt(n.onCloseAutoFocus,u=>{u.preventDefault(),l.triggerRef.current?.focus()}),onPointerDownOutside:Wt(n.onPointerDownOutside,u=>{const f=u.detail.originalEvent,d=f.button===0&&f.ctrlKey===!0;(f.button===2||d)&&u.preventDefault()}),onFocusOutside:Wt(n.onFocusOutside,u=>u.preventDefault())})}),I_=y.forwardRef((n,a)=>{const l=zn(Yr,n.__scopeDialog),i=y.useRef(!1),s=y.useRef(!1);return g.jsx(I0,{...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()}})}),I0=y.forwardRef((n,a)=>{const{__scopeDialog:l,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:u,...f}=n,d=zn(Yr,l),p=y.useRef(null),m=hn(a,p);return L0(),g.jsxs(g.Fragment,{children:[g.jsx(fh,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:s,onUnmountAutoFocus:u,children:g.jsx(ch,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":gh(d.open),...f,ref:m,onDismiss:()=>d.onOpenChange(!1)})}),g.jsxs(g.Fragment,{children:[g.jsx(J_,{titleId:d.titleId}),g.jsx(eN,{contentRef:p,descriptionId:d.descriptionId})]})]})}),ph="DialogTitle",J0=y.forwardRef((n,a)=>{const{__scopeDialog:l,...i}=n,s=zn(ph,l);return g.jsx(dt.h2,{id:s.titleId,...i,ref:a})});J0.displayName=ph;var W0="DialogDescription",eb=y.forwardRef((n,a)=>{const{__scopeDialog:l,...i}=n,s=zn(W0,l);return g.jsx(dt.p,{id:s.descriptionId,...i,ref:a})});eb.displayName=W0;var tb="DialogClose",nb=y.forwardRef((n,a)=>{const{__scopeDialog:l,...i}=n,s=zn(tb,l);return g.jsx(dt.button,{type:"button",...i,ref:a,onClick:Wt(n.onClick,()=>s.onOpenChange(!1))})});nb.displayName=tb;function gh(n){return n?"open":"closed"}var ab="DialogTitleWarning",[ET,rb]=NC(ab,{contentName:Yr,titleName:ph,docsSlug:"dialog"}),J_=({titleId:n})=>{const a=rb(ab),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 v.useEffect(()=>{n&&(document.getElementById(n)||console.error(l))},[l,n]),null},T2="DialogDescriptionWarning",j2=({contentRef:n,descriptionId:a})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${H0(T2).contentName}}.`;return v.useEffect(()=>{const s=n.current?.getAttribute("aria-describedby");a&&s&&(document.getElementById(a)||console.warn(i))},[i,n,a]),null},B0=O0,$0=T0,th=j0,nh=_0,V0=D0,q0=z0,_2=U0;/**
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},W_="DialogDescriptionWarning",eN=({contentRef:n,descriptionId:a})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${rb(W_).contentName}}.`;return y.useEffect(()=>{const s=n.current?.getAttribute("aria-describedby");a&&s&&(document.getElementById(a)||console.warn(i))},[i,n,a]),null},lb=K0,ib=X0,vh=Q0,yh=Z0,ob=J0,sb=eb,tN=nb;/**
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 M2=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),D2=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,l,i)=>i?i.toUpperCase():l.toLowerCase()),ly=n=>{const a=D2(n);return a.charAt(0).toUpperCase()+a.slice(1)},Y0=(...n)=>n.filter((a,l,i)=>!!a&&a.trim()!==""&&i.indexOf(a)===l).join(" ").trim(),L2=n=>{for(const a in n)if(a.startsWith("aria-")||a==="role"||a==="title")return!0};/**
116
+ */const nN=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),aN=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,l,i)=>i?i.toUpperCase():l.toLowerCase()),by=n=>{const a=aN(n);return a.charAt(0).toUpperCase()+a.slice(1)},ub=(...n)=>n.filter((a,l,i)=>!!a&&a.trim()!==""&&i.indexOf(a)===l).join(" ").trim(),rN=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 z2={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"};/**
121
+ */var lN={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 k2=v.forwardRef(({color:n="currentColor",size:a=24,strokeWidth:l=2,absoluteStrokeWidth:i,className:s="",children:u,iconNode:f,...h},p)=>v.createElement("svg",{ref:p,...z2,width:a,height:a,stroke:n,strokeWidth:i?Number(l)*24/Number(a):l,className:Y0("lucide",s),...!u&&!L2(h)&&{"aria-hidden":"true"},...h},[...f.map(([m,g])=>v.createElement(m,g)),...Array.isArray(u)?u:[u]]));/**
126
+ */const iN=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,...lN,width:a,height:a,stroke:n,strokeWidth:i?Number(l)*24/Number(a):l,className:ub("lucide",s),...!u&&!rN(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 Lt=(n,a)=>{const l=v.forwardRef(({className:i,...s},u)=>v.createElement(k2,{ref:u,iconNode:a,className:Y0(`lucide-${M2(ly(n))}`,`lucide-${n}`,i),...s}));return l.displayName=ly(n),l};/**
131
+ */const kt=(n,a)=>{const l=y.forwardRef(({className:i,...s},u)=>y.createElement(iN,{ref:u,iconNode:a,className:ub(`lucide-${nN(by(n))}`,`lucide-${n}`,i),...s}));return l.displayName=by(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 U2=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],K0=Lt("check",U2);/**
136
+ */const oN=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],cb=kt("check",oN);/**
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 P2=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],G0=Lt("chevrons-up-down",P2);/**
141
+ */const sN=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],fb=kt("chevrons-up-down",sN);/**
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 H2=[["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"}]],B2=Lt("circle-alert",H2);/**
146
+ */const uN=[["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"}]],cN=kt("circle-alert",uN);/**
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 $2=[["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"}]],V2=Lt("circle-arrow-up",$2);/**
151
+ */const fN=[["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"}]],dN=kt("circle-arrow-up",fN);/**
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 q2=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Y2=Lt("circle-check-big",q2);/**
156
+ */const hN=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],mN=kt("circle-check-big",hN);/**
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 K2=[["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"}]],G2=Lt("circle-x",K2);/**
161
+ */const pN=[["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"}]],gN=kt("circle-x",pN);/**
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 F2=[["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"}]],X2=Lt("eye-off",F2);/**
166
+ */const vN=[["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"}]],yN=kt("eye-off",vN);/**
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 Q2=[["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"}]],Z2=Lt("eye",Q2);/**
171
+ */const bN=[["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"}]],xN=kt("eye",bN);/**
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 J2=[["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"}]],I2=Lt("file-json",J2);/**
176
+ */const wN=[["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"}]],SN=kt("file-json",wN);/**
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 W2=[["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"}]],eO=Lt("languages",W2);/**
181
+ */const EN=[["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"}]],CN=kt("languages",EN);/**
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 tO=[["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"}]],du=Lt("pencil",tO);/**
186
+ */const _N=[["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=kt("pencil",_N);/**
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 nO=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Td=Lt("plus",nO);/**
191
+ */const NN=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Bd=kt("plus",NN);/**
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 aO=[["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"}]],F0=Lt("refresh-cw",aO);/**
196
+ */const RN=[["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"}]],db=kt("refresh-cw",RN);/**
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 rO=[["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"}]],X0=Lt("save",rO);/**
201
+ */const jN=[["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"}]],hb=kt("save",jN);/**
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 lO=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],iO=Lt("search",lO);/**
206
+ */const ON=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],AN=kt("search",ON);/**
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 oO=[["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"}]],sO=Lt("settings",oO);/**
211
+ */const TN=[["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"}]],MN=kt("settings",TN);/**
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 uO=[["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"}]],Pr=Lt("trash-2",uO);/**
216
+ */const DN=[["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"}]],qr=kt("trash-2",DN);/**
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 cO=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ql=Lt("x",cO);function Q0(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=Q0(n[a]))&&(i&&(i+=" "),i+=l)}else for(l in n)n[l]&&(i&&(i+=" "),i+=l);return i}function Z0(){for(var n,a,l=0,i="",s=arguments.length;l<s;l++)(n=arguments[l])&&(a=Q0(n))&&(i&&(i+=" "),i+=a);return i}const ah="-",fO=n=>{const a=hO(n),{conflictingClassGroups:l,conflictingClassGroupModifiers:i}=n;return{getClassGroupId:f=>{const h=f.split(ah);return h[0]===""&&h.length!==1&&h.shift(),J0(h,a)||dO(f)},getConflictingClassGroupIds:(f,h)=>{const p=l[f]||[];return h&&i[f]?[...p,...i[f]]:p}}},J0=(n,a)=>{if(n.length===0)return a.classGroupId;const l=n[0],i=a.nextPart.get(l),s=i?J0(n.slice(1),i):void 0;if(s)return s;if(a.validators.length===0)return;const u=n.join(ah);return a.validators.find(({validator:f})=>f(u))?.classGroupId},iy=/^\[(.+)\]$/,dO=n=>{if(iy.test(n)){const a=iy.exec(n)[1],l=a?.substring(0,a.indexOf(":"));if(l)return"arbitrary.."+l}},hO=n=>{const{theme:a,classGroups:l}=n,i={nextPart:new Map,validators:[]};for(const s in l)jd(l[s],i,s,a);return i},jd=(n,a,l,i)=>{n.forEach(s=>{if(typeof s=="string"){const u=s===""?a:oy(a,s);u.classGroupId=l;return}if(typeof s=="function"){if(mO(s)){jd(s(i),a,l,i);return}a.validators.push({validator:s,classGroupId:l});return}Object.entries(s).forEach(([u,f])=>{jd(f,oy(a,u),l,i)})})},oy=(n,a)=>{let l=n;return a.split(ah).forEach(i=>{l.nextPart.has(i)||l.nextPart.set(i,{nextPart:new Map,validators:[]}),l=l.nextPart.get(i)}),l},mO=n=>n.isThemeGetter,pO=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="!",Md=":",gO=Md.length,vO=n=>{const{prefix:a,experimentalParseClassName:l}=n;let i=s=>{const u=[];let f=0,h=0,p=0,m;for(let C=0;C<s.length;C++){let R=s[C];if(f===0&&h===0){if(R===Md){u.push(s.slice(p,C)),p=C+gO;continue}if(R==="/"){m=C;continue}}R==="["?f++:R==="]"?f--:R==="("?h++:R===")"&&h--}const g=u.length===0?s:s.substring(p),x=yO(g),S=x!==g,w=m&&m>p?m-p:void 0;return{modifiers:u,hasImportantModifier:S,baseClassName:x,maybePostfixModifierPosition:w}};if(a){const s=a+Md,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},yO=n=>n.endsWith(_d)?n.substring(0,n.length-1):n.startsWith(_d)?n.substring(1):n,bO=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}},xO=n=>({cache:pO(n.cacheSize),parseClassName:vO(n),sortModifiers:bO(n),...fO(n)}),SO=/\s+/,wO=(n,a)=>{const{parseClassName:l,getClassGroupId:i,getConflictingClassGroupIds:s,sortModifiers:u}=a,f=[],h=n.trim().split(SO);let p="";for(let m=h.length-1;m>=0;m-=1){const g=h[m],{isExternal:x,modifiers:S,hasImportantModifier:w,baseClassName:C,maybePostfixModifierPosition:R}=l(g);if(x){p=g+(p.length>0?" "+p:p);continue}let j=!!R,O=i(j?C.substring(0,R):C);if(!O){if(!j){p=g+(p.length>0?" "+p:p);continue}if(O=i(C),!O){p=g+(p.length>0?" "+p:p);continue}j=!1}const U=u(S).join(":"),z=w?U+_d:U,H=z+O;if(f.includes(H))continue;f.push(H);const k=s(O,j);for(let A=0;A<k.length;++A){const Y=k[A];f.push(z+Y)}p=g+(p.length>0?" "+p:p)}return p};function EO(){let n=0,a,l,i="";for(;n<arguments.length;)(a=arguments[n++])&&(l=I0(a))&&(i&&(i+=" "),i+=l);return i}const I0=n=>{if(typeof n=="string")return n;let a,l="";for(let i=0;i<n.length;i++)n[i]&&(a=I0(n[i]))&&(l&&(l+=" "),l+=a);return l};function RO(n,...a){let l,i,s,u=f;function f(p){const m=a.reduce((g,x)=>x(g),n());return l=xO(m),i=l.cache.get,s=l.cache.set,u=h,h(p)}function h(p){const m=i(p);if(m)return m;const g=wO(p,l);return s(p,g),g}return function(){return u(EO.apply(null,arguments))}}const jt=n=>{const a=l=>l[n]||[];return a.isThemeGetter=!0,a},W0=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,eb=/^\((?:(\w[\w-]*):)?(.+)\)$/i,CO=/^\d+\/\d+$/,OO=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,AO=/\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$/,NO=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,TO=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,jO=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,kl=n=>CO.test(n),Ye=n=>!!n&&!Number.isNaN(Number(n)),Qa=n=>!!n&&Number.isInteger(Number(n)),od=n=>n.endsWith("%")&&Ye(n.slice(0,-1)),ga=n=>OO.test(n),_O=()=>!0,MO=n=>AO.test(n)&&!NO.test(n),tb=()=>!1,DO=n=>TO.test(n),LO=n=>jO.test(n),zO=n=>!be(n)&&!xe(n),kO=n=>Il(n,rb,tb),be=n=>W0.test(n),_r=n=>Il(n,lb,MO),sd=n=>Il(n,$O,Ye),sy=n=>Il(n,nb,tb),UO=n=>Il(n,ab,LO),Xs=n=>Il(n,ib,DO),xe=n=>eb.test(n),lo=n=>Wl(n,lb),PO=n=>Wl(n,VO),uy=n=>Wl(n,nb),HO=n=>Wl(n,rb),BO=n=>Wl(n,ab),Qs=n=>Wl(n,ib,!0),Il=(n,a,l)=>{const i=W0.exec(n);return i?i[1]?a(i[1]):l(i[2]):!1},Wl=(n,a,l=!1)=>{const i=eb.exec(n);return i?i[1]?a(i[1]):l:!1},nb=n=>n==="position"||n==="percentage",ab=n=>n==="image"||n==="url",rb=n=>n==="length"||n==="size"||n==="bg-size",lb=n=>n==="length",$O=n=>n==="number",VO=n=>n==="family-name",ib=n=>n==="shadow",qO=()=>{const n=jt("color"),a=jt("font"),l=jt("text"),i=jt("font-weight"),s=jt("tracking"),u=jt("leading"),f=jt("breakpoint"),h=jt("container"),p=jt("spacing"),m=jt("radius"),g=jt("shadow"),x=jt("inset-shadow"),S=jt("text-shadow"),w=jt("drop-shadow"),C=jt("blur"),R=jt("perspective"),j=jt("aspect"),O=jt("ease"),U=jt("animate"),z=()=>["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"],k=()=>[...H(),xe,be],A=()=>["auto","hidden","clip","visible","scroll"],Y=()=>["auto","contain","none"],J=()=>[xe,be,p],ae=()=>[kl,"full","auto",...J()],ie=()=>[Qa,"none","subgrid",xe,be],Re=()=>["auto",{span:["full",Qa,xe,be]},Qa,xe,be],me=()=>[Qa,"auto",xe,be],oe=()=>["auto","min","max","fr",xe,be],fe=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],de=()=>["start","end","center","stretch","center-safe","end-safe"],M=()=>["auto",...J()],Z=()=>[kl,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...J()],$=()=>[n,xe,be],ge=()=>[...H(),uy,sy,{position:[xe,be]}],N=()=>["no-repeat",{repeat:["","x","y","space","round"]}],K=()=>["auto","cover","contain",HO,kO,{size:[xe,be]}],L=()=>[od,lo,_r],G=()=>["","none","full",m,xe,be],W=()=>["",Ye,lo,_r],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=()=>[Ye,od,uy,sy],ze=()=>["","none",C,xe,be],Ze=()=>["none",Ye,xe,be],je=()=>["none",Ye,xe,be],re=()=>[Ye,xe,be],te=()=>[kl,"full",...J()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ga],breakpoint:[ga],color:[_O],container:[ga],"drop-shadow":[ga],ease:["in","out","in-out"],font:[zO],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ga],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ga],shadow:[ga],spacing:["px",Ye],text:[ga],"text-shadow":[ga],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",kl,be,xe,j]}],container:["container"],columns:[{columns:[Ye,be,xe,h]}],"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:k()}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:Y()}],"overscroll-x":[{"overscroll-x":Y()}],"overscroll-y":[{"overscroll-y":Y()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ae()}],"inset-x":[{"inset-x":ae()}],"inset-y":[{"inset-y":ae()}],start:[{start:ae()}],end:[{end:ae()}],top:[{top:ae()}],right:[{right:ae()}],bottom:[{bottom:ae()}],left:[{left:ae()}],visibility:["visible","invisible","collapse"],z:[{z:[Qa,"auto",xe,be]}],basis:[{basis:[kl,"full","auto",h,...J()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ye,kl,"auto","initial","none",be]}],grow:[{grow:["",Ye,xe,be]}],shrink:[{shrink:["",Ye,xe,be]}],order:[{order:[Qa,"first","last","none",xe,be]}],"grid-cols":[{"grid-cols":ie()}],"col-start-end":[{col:Re()}],"col-start":[{"col-start":me()}],"col-end":[{"col-end":me()}],"grid-rows":[{"grid-rows":ie()}],"row-start-end":[{row:Re()}],"row-start":[{"row-start":me()}],"row-end":[{"row-end":me()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":oe()}],"auto-rows":[{"auto-rows":oe()}],gap:[{gap:J()}],"gap-x":[{"gap-x":J()}],"gap-y":[{"gap-y":J()}],"justify-content":[{justify:[...fe(),"normal"]}],"justify-items":[{"justify-items":[...de(),"normal"]}],"justify-self":[{"justify-self":["auto",...de()]}],"align-content":[{content:["normal",...fe()]}],"align-items":[{items:[...de(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...de(),{baseline:["","last"]}]}],"place-content":[{"place-content":fe()}],"place-items":[{"place-items":[...de(),"baseline"]}],"place-self":[{"place-self":["auto",...de()]}],p:[{p:J()}],px:[{px:J()}],py:[{py:J()}],ps:[{ps:J()}],pe:[{pe:J()}],pt:[{pt:J()}],pr:[{pr:J()}],pb:[{pb:J()}],pl:[{pl:J()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":J()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":J()}],"space-y-reverse":["space-y-reverse"],size:[{size:Z()}],w:[{w:[h,"screen",...Z()]}],"min-w":[{"min-w":[h,"screen","none",...Z()]}],"max-w":[{"max-w":[h,"screen","none","prose",{screen:[f]},...Z()]}],h:[{h:["screen","lh",...Z()]}],"min-h":[{"min-h":["screen","lh","none",...Z()]}],"max-h":[{"max-h":["screen","lh",...Z()]}],"font-size":[{text:["base",l,lo,_r]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,xe,sd]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",od,be]}],"font-family":[{font:[PO,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":[Ye,"none",xe,sd]}],leading:[{leading:[u,...J()]}],"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:$()}],"text-color":[{text:$()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...se(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ye,"from-font","auto",xe,_r]}],"text-decoration-color":[{decoration:$()}],"underline-offset":[{"underline-offset":[Ye,"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:J()}],"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:N()}],"bg-size":[{bg:K()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Qa,xe,be],radial:["",xe,be],conic:[Qa,xe,be]},BO,UO]}],"bg-color":[{bg:$()}],"gradient-from-pos":[{from:L()}],"gradient-via-pos":[{via:L()}],"gradient-to-pos":[{to:L()}],"gradient-from":[{from:$()}],"gradient-via":[{via:$()}],"gradient-to":[{to:$()}],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:W()}],"border-w-x":[{"border-x":W()}],"border-w-y":[{"border-y":W()}],"border-w-s":[{"border-s":W()}],"border-w-e":[{"border-e":W()}],"border-w-t":[{"border-t":W()}],"border-w-r":[{"border-r":W()}],"border-w-b":[{"border-b":W()}],"border-w-l":[{"border-l":W()}],"divide-x":[{"divide-x":W()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":W()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...se(),"hidden","none"]}],"divide-style":[{divide:[...se(),"hidden","none"]}],"border-color":[{border:$()}],"border-color-x":[{"border-x":$()}],"border-color-y":[{"border-y":$()}],"border-color-s":[{"border-s":$()}],"border-color-e":[{"border-e":$()}],"border-color-t":[{"border-t":$()}],"border-color-r":[{"border-r":$()}],"border-color-b":[{"border-b":$()}],"border-color-l":[{"border-l":$()}],"divide-color":[{divide:$()}],"outline-style":[{outline:[...se(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ye,xe,be]}],"outline-w":[{outline:["",Ye,lo,_r]}],"outline-color":[{outline:$()}],shadow:[{shadow:["","none",g,Qs,Xs]}],"shadow-color":[{shadow:$()}],"inset-shadow":[{"inset-shadow":["none",x,Qs,Xs]}],"inset-shadow-color":[{"inset-shadow":$()}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:$()}],"ring-offset-w":[{"ring-offset":[Ye,_r]}],"ring-offset-color":[{"ring-offset":$()}],"inset-ring-w":[{"inset-ring":W()}],"inset-ring-color":[{"inset-ring":$()}],"text-shadow":[{"text-shadow":["none",S,Qs,Xs]}],"text-shadow-color":[{"text-shadow":$()}],opacity:[{opacity:[Ye,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":[Ye]}],"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":$()}],"mask-image-linear-to-color":[{"mask-linear-to":$()}],"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":$()}],"mask-image-t-to-color":[{"mask-t-to":$()}],"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":$()}],"mask-image-r-to-color":[{"mask-r-to":$()}],"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":$()}],"mask-image-b-to-color":[{"mask-b-to":$()}],"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":$()}],"mask-image-l-to-color":[{"mask-l-to":$()}],"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":$()}],"mask-image-x-to-color":[{"mask-x-to":$()}],"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":$()}],"mask-image-y-to-color":[{"mask-y-to":$()}],"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":$()}],"mask-image-radial-to-color":[{"mask-radial-to":$()}],"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":ve()}],"mask-image-conic-to-pos":[{"mask-conic-to":ve()}],"mask-image-conic-from-color":[{"mask-conic-from":$()}],"mask-image-conic-to-color":[{"mask-conic-to":$()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ge()}],"mask-repeat":[{mask:N()}],"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:[Ye,xe,be]}],contrast:[{contrast:[Ye,xe,be]}],"drop-shadow":[{"drop-shadow":["","none",w,Qs,Xs]}],"drop-shadow-color":[{"drop-shadow":$()}],grayscale:[{grayscale:["",Ye,xe,be]}],"hue-rotate":[{"hue-rotate":[Ye,xe,be]}],invert:[{invert:["",Ye,xe,be]}],saturate:[{saturate:[Ye,xe,be]}],sepia:[{sepia:["",Ye,xe,be]}],"backdrop-filter":[{"backdrop-filter":["","none",xe,be]}],"backdrop-blur":[{"backdrop-blur":ze()}],"backdrop-brightness":[{"backdrop-brightness":[Ye,xe,be]}],"backdrop-contrast":[{"backdrop-contrast":[Ye,xe,be]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ye,xe,be]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ye,xe,be]}],"backdrop-invert":[{"backdrop-invert":["",Ye,xe,be]}],"backdrop-opacity":[{"backdrop-opacity":[Ye,xe,be]}],"backdrop-saturate":[{"backdrop-saturate":[Ye,xe,be]}],"backdrop-sepia":[{"backdrop-sepia":["",Ye,xe,be]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":J()}],"border-spacing-x":[{"border-spacing-x":J()}],"border-spacing-y":[{"border-spacing-y":J()}],"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:[Ye,"initial",xe,be]}],ease:[{ease:["linear","initial",O,xe,be]}],delay:[{delay:[Ye,xe,be]}],animate:[{animate:["none",U,xe,be]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[R,xe,be]}],"perspective-origin":[{"perspective-origin":k()}],rotate:[{rotate:Ze()}],"rotate-x":[{"rotate-x":Ze()}],"rotate-y":[{"rotate-y":Ze()}],"rotate-z":[{"rotate-z":Ze()}],scale:[{scale:je()}],"scale-x":[{"scale-x":je()}],"scale-y":[{"scale-y":je()}],"scale-z":[{"scale-z":je()}],"scale-3d":["scale-3d"],skew:[{skew:re()}],"skew-x":[{"skew-x":re()}],"skew-y":[{"skew-y":re()}],transform:[{transform:[xe,be,"","none","gpu","cpu"]}],"transform-origin":[{origin:k()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:te()}],"translate-x":[{"translate-x":te()}],"translate-y":[{"translate-y":te()}],"translate-z":[{"translate-z":te()}],"translate-none":["translate-none"],accent:[{accent:$()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:$()}],"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":J()}],"scroll-mx":[{"scroll-mx":J()}],"scroll-my":[{"scroll-my":J()}],"scroll-ms":[{"scroll-ms":J()}],"scroll-me":[{"scroll-me":J()}],"scroll-mt":[{"scroll-mt":J()}],"scroll-mr":[{"scroll-mr":J()}],"scroll-mb":[{"scroll-mb":J()}],"scroll-ml":[{"scroll-ml":J()}],"scroll-p":[{"scroll-p":J()}],"scroll-px":[{"scroll-px":J()}],"scroll-py":[{"scroll-py":J()}],"scroll-ps":[{"scroll-ps":J()}],"scroll-pe":[{"scroll-pe":J()}],"scroll-pt":[{"scroll-pt":J()}],"scroll-pr":[{"scroll-pr":J()}],"scroll-pb":[{"scroll-pb":J()}],"scroll-pl":[{"scroll-pl":J()}],"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",...$()]}],"stroke-w":[{stroke:[Ye,lo,_r,sd]}],stroke:[{stroke:["none",...$()]}],"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"]}},YO=RO(qO);function ft(...n){return YO(Z0(n))}const Gl=B0,KO=$0,ob=v.forwardRef(({className:n,...a},l)=>y.jsx(th,{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}));ob.displayName=th.displayName;const Hr=v.forwardRef(({className:n,children:a,...l},i)=>y.jsxs(KO,{children:[y.jsx(ob,{}),y.jsxs(nh,{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,y.jsxs(_2,{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:[y.jsx(ql,{className:"h-4 w-4"}),y.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Hr.displayName=nh.displayName;const Br=({className:n,...a})=>y.jsx("div",{className:ft("flex flex-col space-y-1.5 text-center sm:text-left",n),...a});Br.displayName="DialogHeader";const Fl=({className:n,...a})=>y.jsx("div",{className:ft("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",n),...a});Fl.displayName="DialogFooter";const $r=v.forwardRef(({className:n,...a},l)=>y.jsx(V0,{ref:l,className:ft("text-lg font-semibold leading-none tracking-tight",n),...a}));$r.displayName=V0.displayName;const Tu=v.forwardRef(({className:n,...a},l)=>y.jsx(q0,{ref:l,className:ft("text-sm text-muted-foreground",n),...a}));Tu.displayName=q0.displayName;const cy=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,fy=Z0,rh=(n,a)=>l=>{var i;if(a?.variants==null)return fy(n,l?.class,l?.className);const{variants:s,defaultVariants:u}=a,f=Object.keys(s).map(m=>{const g=l?.[m],x=u?.[m];if(g===null)return null;const S=cy(g)||cy(x);return s[m][S]}),h=l&&Object.entries(l).reduce((m,g)=>{let[x,S]=g;return S===void 0||(m[x]=S),m},{}),p=a==null||(i=a.compoundVariants)===null||i===void 0?void 0:i.reduce((m,g)=>{let{class:x,className:S,...w}=g;return Object.entries(w).every(C=>{let[R,j]=C;return Array.isArray(j)?j.includes({...u,...h}[R]):{...u,...h}[R]===j})?[...m,x,S]:m},[]);return fy(n,f,p,l?.class,l?.className)},GO=rh("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"}}),He=v.forwardRef(({className:n,variant:a,size:l,asChild:i=!1,...s},u)=>{const f=i?uC:"button";return y.jsx(f,{className:ft(GO({variant:a,size:l,className:n})),ref:u,...s})});He.displayName="Button";const Rt=v.forwardRef(({className:n,type:a,...l},i)=>y.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}));Rt.displayName="Input";var FO="Label",sb=v.forwardRef((n,a)=>y.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())}}));sb.displayName=FO;var ub=sb;const XO=rh("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),ct=v.forwardRef(({className:n,...a},l)=>y.jsx(ub,{ref:l,className:ft(XO(),n),...a}));ct.displayName=ub.displayName;function QO(n){const a=v.useRef({value:n,previous:n});return v.useMemo(()=>(a.current.value!==n&&(a.current.previous=a.current.value,a.current.value=n),a.current.previous),[n])}function cb(n){const[a,l]=v.useState(void 0);return nr(()=>{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,h;if("borderBoxSize"in u){const p=u.borderBoxSize,m=Array.isArray(p)?p[0]:p;f=m.inlineSize,h=m.blockSize}else f=n.offsetWidth,h=n.offsetHeight;l({width:f,height:h})});return i.observe(n,{box:"border-box"}),()=>i.unobserve(n)}else l(void 0)},[n]),a}var ju="Switch",[ZO,_j]=Cu(ju),[JO,IO]=ZO(ju),fb=v.forwardRef((n,a)=>{const{__scopeSwitch:l,name:i,checked:s,defaultChecked:u,required:f,disabled:h,value:p="on",onCheckedChange:m,form:g,...x}=n,[S,w]=v.useState(null),C=fn(a,z=>w(z)),R=v.useRef(!1),j=S?g||!!S.closest("form"):!0,[O,U]=Fd({prop:s,defaultProp:u??!1,onChange:m,caller:ju});return y.jsxs(JO,{scope:l,checked:O,disabled:h,children:[y.jsx(dt.button,{type:"button",role:"switch","aria-checked":O,"aria-required":f,"data-state":pb(O),"data-disabled":h?"":void 0,disabled:h,value:p,...x,ref:C,onClick:Jt(n.onClick,z=>{U(H=>!H),j&&(R.current=z.isPropagationStopped(),R.current||z.stopPropagation())})}),j&&y.jsx(mb,{control:S,bubbles:!R.current,name:i,value:p,checked:O,required:f,disabled:h,form:g,style:{transform:"translateX(-100%)"}})]})});fb.displayName=ju;var db="SwitchThumb",hb=v.forwardRef((n,a)=>{const{__scopeSwitch:l,...i}=n,s=IO(db,l);return y.jsx(dt.span,{"data-state":pb(s.checked),"data-disabled":s.disabled?"":void 0,...i,ref:a})});hb.displayName=db;var WO="SwitchBubbleInput",mb=v.forwardRef(({__scopeSwitch:n,control:a,checked:l,bubbles:i=!0,...s},u)=>{const f=v.useRef(null),h=fn(f,u),p=QO(l),m=cb(a);return v.useEffect(()=>{const g=f.current;if(!g)return;const x=window.HTMLInputElement.prototype,w=Object.getOwnPropertyDescriptor(x,"checked").set;if(p!==l&&w){const C=new Event("click",{bubbles:i});w.call(g,l),g.dispatchEvent(C)}},[p,l,i]),y.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:l,...s,tabIndex:-1,ref:h,style:{...s.style,...m,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});mb.displayName=WO;function pb(n){return n?"checked":"unchecked"}var gb=fb,eA=hb;const vb=v.forwardRef(({className:n,...a},l)=>y.jsx(gb,{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:y.jsx(eA,{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")})}));vb.displayName=gb.displayName;class tA{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 Yt=new tA,yb=v.createContext(void 0);function ei(){const n=v.useContext(yb);if(n===void 0)throw new Error("useConfig must be used within a ConfigProvider");return n}function nA({children:n}){const[a,l]=v.useState(null),[i,s]=v.useState(null),[u,f]=v.useState(!1),[h,p]=v.useState(localStorage.getItem("apiKey"));return v.useEffect(()=>{const m=()=>{p(localStorage.getItem("apiKey"))};return window.addEventListener("storage",m),()=>{window.removeEventListener("storage",m)}},[]),v.useEffect(()=>{(async()=>{f(!1),l(null),s(null)})()},[h]),v.useEffect(()=>{(async()=>{if(!u){f(!0);try{const g=await Yt.getConfig(),x={LOG:typeof g.LOG=="boolean"?g.LOG:!1,CLAUDE_PATH:typeof g.CLAUDE_PATH=="string"?g.CLAUDE_PATH:"",HOST:typeof g.HOST=="string"?g.HOST:"127.0.0.1",PORT:typeof g.PORT=="number"?g.PORT:3456,APIKEY:typeof g.APIKEY=="string"?g.APIKEY:"",API_TIMEOUT_MS:typeof g.API_TIMEOUT_MS=="string"?g.API_TIMEOUT_MS:"600000",PROXY_URL:typeof g.PROXY_URL=="string"?g.PROXY_URL:"",transformers:Array.isArray(g.transformers)?g.transformers:[],Providers:Array.isArray(g.Providers)?g.Providers:[],Router:g.Router&&typeof g.Router=="object"?{default:typeof g.Router.default=="string"?g.Router.default:"",background:typeof g.Router.background=="string"?g.Router.background:"",think:typeof g.Router.think=="string"?g.Router.think:"",longContext:typeof g.Router.longContext=="string"?g.Router.longContext:"",longContextThreshold:typeof g.Router.longContextThreshold=="number"?g.Router.longContextThreshold:6e4,webSearch:typeof g.Router.webSearch=="string"?g.Router.webSearch:""}:{default:"",background:"",think:"",longContext:"",longContextThreshold:6e4,webSearch:""}};l(x)}catch(g){console.error("Failed to fetch config:",g),g.message!=="Unauthorized"&&(l({LOG:!1,CLAUDE_PATH:"",HOST:"127.0.0.1",PORT:3456,APIKEY:"",API_TIMEOUT_MS:"600000",PROXY_URL:"",transformers:[],Providers:[],Router:{default:"",background:"",think:"",longContext:"",longContextThreshold:6e4,webSearch:""}}),s(g))}}})()},[u,h]),y.jsx(yb.Provider,{value:{config:a,setConfig:l,error:i},children:n})}function aA({isOpen:n,onOpenChange:a}){const{t:l}=Yr(),{config:i,setConfig:s}=ei();if(!i)return null;const u=h=>{s({...i,LOG:h})},f=h=>{s({...i,CLAUDE_PATH:h.target.value})};return y.jsx(Gl,{open:n,onOpenChange:a,children:y.jsxs(Hr,{children:[y.jsx(Br,{children:y.jsx($r,{children:l("toplevel.title")})}),y.jsxs("div",{className:"space-y-4 py-4",children:[y.jsxs("div",{className:"flex items-center space-x-2",children:[y.jsx(vb,{id:"log",checked:i.LOG,onCheckedChange:u}),y.jsx(ct,{htmlFor:"log",className:"transition-all-ease hover:scale-[1.02] cursor-pointer",children:l("toplevel.log")})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(ct,{htmlFor:"claude-path",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.claude_path")}),y.jsx(Rt,{id:"claude-path",value:i.CLAUDE_PATH,onChange:f,className:"transition-all-ease focus:scale-[1.01]"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(ct,{htmlFor:"host",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.host")}),y.jsx(Rt,{id:"host",value:i.HOST,onChange:h=>s({...i,HOST:h.target.value}),className:"transition-all-ease focus:scale-[1.01]"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(ct,{htmlFor:"port",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.port")}),y.jsx(Rt,{id:"port",type:"number",value:i.PORT,onChange:h=>s({...i,PORT:parseInt(h.target.value,10)}),className:"transition-all-ease focus:scale-[1.01]"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(ct,{htmlFor:"timeout",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.timeout")}),y.jsx(Rt,{id:"timeout",value:i.API_TIMEOUT_MS,onChange:h=>s({...i,API_TIMEOUT_MS:h.target.value}),className:"transition-all-ease focus:scale-[1.01]"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(ct,{htmlFor:"proxy-url",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.proxy_url")}),y.jsx(Rt,{id:"proxy-url",value:i.PROXY_URL,onChange:h=>s({...i,PROXY_URL:h.target.value}),placeholder:"http://127.0.0.1:7890",className:"transition-all-ease focus:scale-[1.01]"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(ct,{htmlFor:"apikey",className:"transition-all-ease hover:scale-[1.01] cursor-pointer",children:l("toplevel.apikey")}),y.jsx(Rt,{id:"apikey",type:"password",value:i.APIKEY,onChange:h=>s({...i,APIKEY:h.target.value}),className:"transition-all-ease focus:scale-[1.01]"})]})]}),y.jsx(Fl,{children:y.jsx(He,{onClick:()=>a(!1),className:"transition-all-ease hover:scale-[1.02] active:scale-[0.98]",children:l("app.save")})})]})})}const va=v.forwardRef(({className:n,...a},l)=>y.jsx("div",{ref:l,className:ft("rounded-lg border bg-card text-card-foreground shadow-sm",n),...a}));va.displayName="Card";const ya=v.forwardRef(({className:n,...a},l)=>y.jsx("div",{ref:l,className:ft("flex flex-col space-y-1.5 p-6",n),...a}));ya.displayName="CardHeader";const ba=v.forwardRef(({className:n,...a},l)=>y.jsx("div",{ref:l,className:ft("text-2xl font-semibold leading-none tracking-tight",n),...a}));ba.displayName="CardTitle";const bb=v.forwardRef(({className:n,...a},l)=>y.jsx("div",{ref:l,className:ft("text-sm text-muted-foreground",n),...a}));bb.displayName="CardDescription";const xa=v.forwardRef(({className:n,...a},l)=>y.jsx("div",{ref:l,className:ft("p-6 pt-0",n),...a}));xa.displayName="CardContent";const xb=v.forwardRef(({className:n,...a},l)=>y.jsx("div",{ref:l,className:ft("flex items-center p-6 pt-0",n),...a}));xb.displayName="CardFooter";function rA({transformers:n,onEdit:a,onRemove:l}){return!n||!Array.isArray(n)?y.jsx("div",{className:"space-y-3",children:y.jsx("div",{className:"flex items-center justify-center rounded-md border bg-white p-8 text-gray-500",children:"No transformers configured"})}):y.jsx("div",{className:"space-y-3",children:n.map((i,s)=>{if(!i)return y.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:[y.jsxs("div",{className:"flex-1 space-y-1.5",children:[y.jsx("p",{className:"text-md font-semibold text-gray-800",children:"Invalid Transformer"}),y.jsx("p",{className:"text-sm text-gray-500",children:"Transformer data is missing"})]}),y.jsxs("div",{className:"ml-4 flex flex-shrink-0 items-center gap-2",children:[y.jsx(He,{variant:"ghost",size:"icon",onClick:()=>a(s),className:"transition-all-ease hover:scale-110",disabled:!0,children:y.jsx(du,{className:"h-4 w-4"})}),y.jsx(He,{variant:"destructive",size:"icon",onClick:()=>l(s),className:"transition-all duration-200 hover:scale-110",children:y.jsx(Pr,{className:"h-4 w-4 text-current transition-colors duration-200"})})]})]},s);const u=i.path||"Unnamed Transformer",f=i.options||{},h=()=>!f||Object.keys(f).length===0?y.jsx("p",{className:"text-sm text-gray-500",children:"No parameters configured"}):y.jsx("div",{className:"flex flex-wrap gap-2 max-h-8 overflow-hidden",children:Object.entries(f).map(([p,m])=>y.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:[y.jsxs("span",{className:"text-gray-600",children:[p,":"]}),y.jsx("span",{className:"ml-1 text-gray-800",children:String(m)})]},p))});return y.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:[y.jsxs("div",{className:"flex-1 space-y-1.5",children:[y.jsx("p",{className:"text-md font-semibold text-gray-800",children:u}),h()]}),y.jsxs("div",{className:"ml-4 flex flex-shrink-0 items-center gap-2",children:[y.jsx(He,{variant:"ghost",size:"icon",onClick:()=>a(s),className:"transition-all-ease hover:scale-110",children:y.jsx(du,{className:"h-4 w-4"})}),y.jsx(He,{variant:"destructive",size:"icon",onClick:()=>l(s),className:"transition-all duration-200 hover:scale-110",children:y.jsx(Pr,{className:"h-4 w-4 text-current transition-colors duration-200"})})]})]},s)})})}function lA(){const{t:n}=Yr(),{config:a,setConfig:l}=ei(),[i,s]=v.useState(null),[u,f]=v.useState(null),[h,p]=v.useState(null);if(!a)return y.jsxs(va,{className:"flex h-full flex-col rounded-lg border shadow-sm",children:[y.jsx(ya,{className:"flex flex-row items-center justify-between border-b p-4",children:y.jsx(ba,{className:"text-lg",children:n("transformers.title")})}),y.jsx(xa,{className:"flex-grow flex items-center justify-center p-4",children:y.jsx("div",{className:"text-gray-500",children:"Loading transformers configuration..."})})]});const m=Array.isArray(a.transformers)?a.transformers:[],g=()=>{p({name:"",path:"",options:{}}),s(m.length)},x=j=>{const O=[...m];O.splice(j,1),l({...a,transformers:O}),f(null)},S=(j,O,U,z)=>{if(j<m.length){const H=[...m];z!==void 0?H[j].options[z]=U:H[j][O]=U,l({...a,transformers:H})}else if(h){const H={...h};z!==void 0?H.options[z]=U:H[O]=U,p(H)}},w=i!==null?i<m.length?m[i]:h:null,C=()=>{if(h&&i===m.length){const j=[...m,h];l({...a,transformers:j})}s(null),p(null)},R=()=>{s(null),p(null)};return y.jsxs(va,{className:"flex h-full flex-col rounded-lg border shadow-sm",children:[y.jsxs(ya,{className:"flex flex-row items-center justify-between border-b p-4",children:[y.jsxs(ba,{className:"text-lg",children:[n("transformers.title")," ",y.jsxs("span",{className:"text-sm font-normal text-gray-500",children:["(",m.length,")"]})]}),y.jsx(He,{onClick:g,children:n("transformers.add")})]}),y.jsx(xa,{className:"flex-grow overflow-y-auto p-4",children:y.jsx(rA,{transformers:m,onEdit:s,onRemove:f})}),y.jsx(Gl,{open:i!==null,onOpenChange:R,children:y.jsxs(Hr,{children:[y.jsx(Br,{children:y.jsx($r,{children:n("transformers.edit")})}),w&&i!==null&&y.jsxs("div",{className:"space-y-4 py-4 px-6 max-h-96 overflow-y-auto",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(ct,{htmlFor:"transformer-path",children:n("transformers.path")}),y.jsx(Rt,{id:"transformer-path",value:w.path||"",onChange:j=>S(i,"path",j.target.value)})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsx(ct,{children:n("transformers.parameters")}),y.jsx(He,{variant:"outline",size:"sm",onClick:()=>{const j=w.options||{},O=`param${Object.keys(j).length+1}`;if(i!==null){const U={...j,[O]:""};if(i<m.length){const z=[...m];z[i].options=U,l({...a,transformers:z})}else h&&p({...h,options:U})}},children:y.jsx(Td,{className:"h-4 w-4"})})]}),Object.entries(w.options||{}).map(([j,O])=>y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(Rt,{value:j,onChange:U=>{const H={...w.options||{}};if(delete H[j],H[U.target.value]=O,i!==null)if(i<m.length){const k=[...m];k[i].options=H,l({...a,transformers:k})}else h&&p({...h,options:H})},className:"flex-1"}),y.jsx(Rt,{value:O,onChange:U=>{i!==null&&S(i,"parameters",U.target.value,j)},className:"flex-1"}),y.jsx(He,{variant:"outline",size:"icon",onClick:()=>{if(i!==null){const z={...w.options||{}};if(delete z[j],i<m.length){const H=[...m];H[i].options=z,l({...a,transformers:H})}else h&&p({...h,options:z})}},children:y.jsx(Pr,{className:"h-4 w-4"})})]},j))]})]}),y.jsxs(Fl,{children:[y.jsx(He,{variant:"outline",onClick:R,children:n("app.cancel")}),y.jsx(He,{onClick:C,children:n("app.save")})]})]})}),y.jsx(Gl,{open:u!==null,onOpenChange:()=>f(null),children:y.jsxs(Hr,{children:[y.jsxs(Br,{children:[y.jsx($r,{children:n("transformers.delete")}),y.jsx(Tu,{children:n("transformers.delete_transformer_confirm")})]}),y.jsxs(Fl,{children:[y.jsx(He,{variant:"outline",onClick:()=>f(null),children:n("app.cancel")}),y.jsx(He,{variant:"destructive",onClick:()=>u!==null&&x(u),children:n("app.delete")})]})]})})]})}const iA=rh("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 Sb({className:n,variant:a,...l}){return y.jsx("div",{className:ft(iA({variant:a}),n),...l})}function oA({providers:n,onEdit:a,onRemove:l}){return!n||!Array.isArray(n)?y.jsx("div",{className:"space-y-3",children:y.jsx("div",{className:"flex items-center justify-center rounded-md border bg-white p-8 text-gray-500",children:"No providers configured"})}):y.jsx("div",{className:"space-y-3",children:n.map((i,s)=>{if(!i)return y.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:[y.jsxs("div",{className:"flex-1 space-y-1.5",children:[y.jsx("p",{className:"text-md font-semibold text-gray-800",children:"Invalid Provider"}),y.jsx("p",{className:"text-sm text-gray-500",children:"Provider data is missing"})]}),y.jsxs("div",{className:"ml-4 flex flex-shrink-0 items-center gap-2",children:[y.jsx(He,{variant:"ghost",size:"icon",onClick:()=>a(s),className:"transition-all-ease hover:scale-110",disabled:!0,children:y.jsx(du,{className:"h-4 w-4"})}),y.jsx(He,{variant:"destructive",size:"icon",onClick:()=>l(s),className:"transition-all duration-200 hover:scale-110",children:y.jsx(Pr,{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",h=Array.isArray(i.models)?i.models:[];return y.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:[y.jsxs("div",{className:"flex-1 space-y-1.5",children:[y.jsx("p",{className:"text-md font-semibold text-gray-800",children:u}),y.jsx("p",{className:"text-sm text-gray-500",children:f}),y.jsx("div",{className:"flex flex-wrap gap-2 pt-2",children:h.map((p,m)=>y.jsx(Sb,{variant:"outline",className:"font-normal transition-all-ease hover:scale-105",children:p||"Unnamed Model"},m))})]}),y.jsxs("div",{className:"ml-4 flex flex-shrink-0 items-center gap-2",children:[y.jsx(He,{variant:"ghost",size:"icon",onClick:()=>a(s),className:"transition-all-ease hover:scale-110",children:y.jsx(du,{className:"h-4 w-4"})}),y.jsx(He,{variant:"destructive",size:"icon",onClick:()=>l(s),className:"transition-all duration-200 hover:scale-110",children:y.jsx(Pr,{className:"h-4 w-4 text-current transition-colors duration-200"})})]})]},s)})})}var dy=1,sA=.9,uA=.8,cA=.17,ud=.1,cd=.999,fA=.9999,dA=.99,hA=/[\\\/_+.#"@\[\(\{&]/,mA=/[\\\/_+.#"@\[\(\{&]/g,pA=/[\s-]/,wb=/[\s-]/g;function Dd(n,a,l,i,s,u,f){if(u===a.length)return s===n.length?dy:dA;var h=`${s},${u}`;if(f[h]!==void 0)return f[h];for(var p=i.charAt(u),m=l.indexOf(p,s),g=0,x,S,w,C;m>=0;)x=Dd(n,a,l,i,m+1,u+1,f),x>g&&(m===s?x*=dy:hA.test(n.charAt(m-1))?(x*=uA,w=n.slice(s,m-1).match(mA),w&&s>0&&(x*=Math.pow(cd,w.length))):pA.test(n.charAt(m-1))?(x*=sA,C=n.slice(s,m-1).match(wb),C&&s>0&&(x*=Math.pow(cd,C.length))):(x*=cA,s>0&&(x*=Math.pow(cd,m-s))),n.charAt(m)!==a.charAt(u)&&(x*=fA)),(x<ud&&l.charAt(m-1)===i.charAt(u+1)||i.charAt(u+1)===i.charAt(u)&&l.charAt(m-1)!==i.charAt(u))&&(S=Dd(n,a,l,i,m+1,u+2,f),S*ud>x&&(x=S*ud)),x>g&&(g=x),m=l.indexOf(p,m+1);return f[h]=g,g}function hy(n){return n.toLowerCase().replace(wb," ")}function gA(n,a,l){return n=l&&l.length>0?`${n+" "+l.join(" ")}`:n,Dd(n,a,hy(n),hy(a),0,0,{})}var io='[cmdk-group=""]',fd='[cmdk-group-items=""]',vA='[cmdk-group-heading=""]',Eb='[cmdk-item=""]',my=`${Eb}:not([aria-disabled="true"])`,Ld="cmdk-item-select",Pl="data-value",yA=(n,a,l)=>gA(n,a,l),Rb=v.createContext(void 0),So=()=>v.useContext(Rb),Cb=v.createContext(void 0),lh=()=>v.useContext(Cb),Ob=v.createContext(void 0),Ab=v.forwardRef((n,a)=>{let l=Hl(()=>{var L,G;return{search:"",value:(G=(L=n.value)!=null?L:n.defaultValue)!=null?G:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),i=Hl(()=>new Set),s=Hl(()=>new Map),u=Hl(()=>new Map),f=Hl(()=>new Set),h=Nb(n),{label:p,children:m,value:g,onValueChange:x,filter:S,shouldFilter:w,loop:C,disablePointerSelection:R=!1,vimBindings:j=!0,...O}=n,U=Gn(),z=Gn(),H=Gn(),k=v.useRef(null),A=TA();Vr(()=>{if(g!==void 0){let L=g.trim();l.current.value=L,Y.emit()}},[g]),Vr(()=>{A(6,oe)},[]);let Y=v.useMemo(()=>({subscribe:L=>(f.current.add(L),()=>f.current.delete(L)),snapshot:()=>l.current,setState:(L,G,W)=>{var se,pe,ve,ze;if(!Object.is(l.current[L],G)){if(l.current[L]=G,L==="search")me(),ie(),A(1,Re);else if(L==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let Ze=document.getElementById(H);Ze?Ze.focus():(se=document.getElementById(U))==null||se.focus()}if(A(7,()=>{var Ze;l.current.selectedItemId=(Ze=fe())==null?void 0:Ze.id,Y.emit()}),W||A(5,oe),((pe=h.current)==null?void 0:pe.value)!==void 0){let Ze=G??"";(ze=(ve=h.current).onValueChange)==null||ze.call(ve,Ze);return}}Y.emit()}},emit:()=>{f.current.forEach(L=>L())}}),[]),J=v.useMemo(()=>({value:(L,G,W)=>{var se;G!==((se=u.current.get(L))==null?void 0:se.value)&&(u.current.set(L,{value:G,keywords:W}),l.current.filtered.items.set(L,ae(G,W)),A(2,()=>{ie(),Y.emit()}))},item:(L,G)=>(i.current.add(L),G&&(s.current.has(G)?s.current.get(G).add(L):s.current.set(G,new Set([L]))),A(3,()=>{me(),ie(),l.current.value||Re(),Y.emit()}),()=>{u.current.delete(L),i.current.delete(L),l.current.filtered.items.delete(L);let W=fe();A(4,()=>{me(),W?.getAttribute("id")===L&&Re(),Y.emit()})}),group:L=>(s.current.has(L)||s.current.set(L,new Set),()=>{u.current.delete(L),s.current.delete(L)}),filter:()=>h.current.shouldFilter,label:p||n["aria-label"],getDisablePointerSelection:()=>h.current.disablePointerSelection,listId:U,inputId:H,labelId:z,listInnerRef:k}),[]);function ae(L,G){var W,se;let pe=(se=(W=h.current)==null?void 0:W.filter)!=null?se:yA;return L?pe(L,l.current.search,G):0}function ie(){if(!l.current.search||h.current.shouldFilter===!1)return;let L=l.current.filtered.items,G=[];l.current.filtered.groups.forEach(se=>{let pe=s.current.get(se),ve=0;pe.forEach(ze=>{let Ze=L.get(ze);ve=Math.max(Ze,ve)}),G.push([se,ve])});let W=k.current;de().sort((se,pe)=>{var ve,ze;let Ze=se.getAttribute("id"),je=pe.getAttribute("id");return((ve=L.get(je))!=null?ve:0)-((ze=L.get(Ze))!=null?ze:0)}).forEach(se=>{let pe=se.closest(fd);pe?pe.appendChild(se.parentElement===pe?se:se.closest(`${fd} > *`)):W.appendChild(se.parentElement===W?se:se.closest(`${fd} > *`))}),G.sort((se,pe)=>pe[1]-se[1]).forEach(se=>{var pe;let ve=(pe=k.current)==null?void 0:pe.querySelector(`${io}[${Pl}="${encodeURIComponent(se[0])}"]`);ve?.parentElement.appendChild(ve)})}function Re(){let L=de().find(W=>W.getAttribute("aria-disabled")!=="true"),G=L?.getAttribute(Pl);Y.setState("value",G||void 0)}function me(){var L,G,W,se;if(!l.current.search||h.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=(L=u.current.get(ve))==null?void 0:L.value)!=null?G:"",Ze=(se=(W=u.current.get(ve))==null?void 0:W.keywords)!=null?se:[],je=ae(ze,Ze);l.current.filtered.items.set(ve,je),je>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 L,G,W;let se=fe();se&&(((L=se.parentElement)==null?void 0:L.firstChild)===se&&((W=(G=se.closest(io))==null?void 0:G.querySelector(vA))==null||W.scrollIntoView({block:"nearest"})),se.scrollIntoView({block:"nearest"}))}function fe(){var L;return(L=k.current)==null?void 0:L.querySelector(`${Eb}[aria-selected="true"]`)}function de(){var L;return Array.from(((L=k.current)==null?void 0:L.querySelectorAll(my))||[])}function M(L){let G=de()[L];G&&Y.setState("value",G.getAttribute(Pl))}function Z(L){var G;let W=fe(),se=de(),pe=se.findIndex(ze=>ze===W),ve=se[pe+L];(G=h.current)!=null&&G.loop&&(ve=pe+L<0?se[se.length-1]:pe+L===se.length?se[0]:se[pe+L]),ve&&Y.setState("value",ve.getAttribute(Pl))}function $(L){let G=fe(),W=G?.closest(io),se;for(;W&&!se;)W=L>0?AA(W,io):NA(W,io),se=W?.querySelector(my);se?Y.setState("value",se.getAttribute(Pl)):Z(L)}let ge=()=>M(de().length-1),N=L=>{L.preventDefault(),L.metaKey?ge():L.altKey?$(1):Z(1)},K=L=>{L.preventDefault(),L.metaKey?M(0):L.altKey?$(-1):Z(-1)};return v.createElement(dt.div,{ref:a,tabIndex:-1,...O,"cmdk-root":"",onKeyDown:L=>{var G;(G=O.onKeyDown)==null||G.call(O,L);let W=L.nativeEvent.isComposing||L.keyCode===229;if(!(L.defaultPrevented||W))switch(L.key){case"n":case"j":{j&&L.ctrlKey&&N(L);break}case"ArrowDown":{N(L);break}case"p":case"k":{j&&L.ctrlKey&&K(L);break}case"ArrowUp":{K(L);break}case"Home":{L.preventDefault(),M(0);break}case"End":{L.preventDefault(),ge();break}case"Enter":{L.preventDefault();let se=fe();if(se){let pe=new Event(Ld);se.dispatchEvent(pe)}}}}},v.createElement("label",{"cmdk-label":"",htmlFor:J.inputId,id:J.labelId,style:_A},p),_u(n,L=>v.createElement(Cb.Provider,{value:Y},v.createElement(Rb.Provider,{value:J},L))))}),bA=v.forwardRef((n,a)=>{var l,i;let s=Gn(),u=v.useRef(null),f=v.useContext(Ob),h=So(),p=Nb(n),m=(i=(l=p.current)==null?void 0:l.forceMount)!=null?i:f?.forceMount;Vr(()=>{if(!m)return h.item(s,f?.id)},[m]);let g=Tb(s,u,[n.value,n.children,u],n.keywords),x=lh(),S=ar(A=>A.value&&A.value===g.current),w=ar(A=>m||h.filter()===!1?!0:A.search?A.filtered.items.get(s)>0:!0);v.useEffect(()=>{let A=u.current;if(!(!A||n.disabled))return A.addEventListener(Ld,C),()=>A.removeEventListener(Ld,C)},[w,n.onSelect,n.disabled]);function C(){var A,Y;R(),(Y=(A=p.current).onSelect)==null||Y.call(A,g.current)}function R(){x.setState("value",g.current,!0)}if(!w)return null;let{disabled:j,value:O,onSelect:U,forceMount:z,keywords:H,...k}=n;return v.createElement(dt.div,{ref:kr(u,a),...k,id:s,"cmdk-item":"",role:"option","aria-disabled":!!j,"aria-selected":!!S,"data-disabled":!!j,"data-selected":!!S,onPointerMove:j||h.getDisablePointerSelection()?void 0:R,onClick:j?void 0:C},n.children)}),xA=v.forwardRef((n,a)=>{let{heading:l,children:i,forceMount:s,...u}=n,f=Gn(),h=v.useRef(null),p=v.useRef(null),m=Gn(),g=So(),x=ar(w=>s||g.filter()===!1?!0:w.search?w.filtered.groups.has(f):!0);Vr(()=>g.group(f),[]),Tb(f,h,[n.value,n.heading,p]);let S=v.useMemo(()=>({id:f,forceMount:s}),[s]);return v.createElement(dt.div,{ref:kr(h,a),...u,"cmdk-group":"",role:"presentation",hidden:x?void 0:!0},l&&v.createElement("div",{ref:p,"cmdk-group-heading":"","aria-hidden":!0,id:m},l),_u(n,w=>v.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":l?m:void 0},v.createElement(Ob.Provider,{value:S},w))))}),SA=v.forwardRef((n,a)=>{let{alwaysRender:l,...i}=n,s=v.useRef(null),u=ar(f=>!f.search);return!l&&!u?null:v.createElement(dt.div,{ref:kr(s,a),...i,"cmdk-separator":"",role:"separator"})}),wA=v.forwardRef((n,a)=>{let{onValueChange:l,...i}=n,s=n.value!=null,u=lh(),f=ar(m=>m.search),h=ar(m=>m.selectedItemId),p=So();return v.useEffect(()=>{n.value!=null&&u.setState("search",n.value)},[n.value]),v.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":h,id:p.inputId,type:"text",value:s?n.value:f,onChange:m=>{s||u.setState("search",m.target.value),l?.(m.target.value)}})}),EA=v.forwardRef((n,a)=>{let{children:l,label:i="Suggestions",...s}=n,u=v.useRef(null),f=v.useRef(null),h=ar(m=>m.selectedItemId),p=So();return v.useEffect(()=>{if(f.current&&u.current){let m=f.current,g=u.current,x,S=new ResizeObserver(()=>{x=requestAnimationFrame(()=>{let w=m.offsetHeight;g.style.setProperty("--cmdk-list-height",w.toFixed(1)+"px")})});return S.observe(m),()=>{cancelAnimationFrame(x),S.unobserve(m)}}},[]),v.createElement(dt.div,{ref:kr(u,a),...s,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":h,"aria-label":i,id:p.listId},_u(n,m=>v.createElement("div",{ref:kr(f,p.listInnerRef),"cmdk-list-sizer":""},m)))}),RA=v.forwardRef((n,a)=>{let{open:l,onOpenChange:i,overlayClassName:s,contentClassName:u,container:f,...h}=n;return v.createElement(B0,{open:l,onOpenChange:i},v.createElement($0,{container:f},v.createElement(th,{"cmdk-overlay":"",className:s}),v.createElement(nh,{"aria-label":n.label,"cmdk-dialog":"",className:u},v.createElement(Ab,{ref:a,...h}))))}),CA=v.forwardRef((n,a)=>ar(l=>l.filtered.count===0)?v.createElement(dt.div,{ref:a,...n,"cmdk-empty":"",role:"presentation"}):null),OA=v.forwardRef((n,a)=>{let{progress:l,children:i,label:s="Loading...",...u}=n;return v.createElement(dt.div,{ref:a,...u,"cmdk-loading":"",role:"progressbar","aria-valuenow":l,"aria-valuemin":0,"aria-valuemax":100,"aria-label":s},_u(n,f=>v.createElement("div",{"aria-hidden":!0},f)))}),ti=Object.assign(Ab,{List:EA,Item:bA,Input:wA,Group:xA,Separator:SA,Dialog:RA,Empty:CA,Loading:OA});function AA(n,a){let l=n.nextElementSibling;for(;l;){if(l.matches(a))return l;l=l.nextElementSibling}}function NA(n,a){let l=n.previousElementSibling;for(;l;){if(l.matches(a))return l;l=l.previousElementSibling}}function Nb(n){let a=v.useRef(n);return Vr(()=>{a.current=n}),a}var Vr=typeof window>"u"?v.useEffect:v.useLayoutEffect;function Hl(n){let a=v.useRef();return a.current===void 0&&(a.current=n()),a}function ar(n){let a=lh(),l=()=>n(a.snapshot());return v.useSyncExternalStore(a.subscribe,l,l)}function Tb(n,a,l,i=[]){let s=v.useRef(),u=So();return Vr(()=>{var f;let h=(()=>{var m;for(let g of l){if(typeof g=="string")return g.trim();if(typeof g=="object"&&"current"in g)return g.current?(m=g.current.textContent)==null?void 0:m.trim():s.current}})(),p=i.map(m=>m.trim());u.value(n,h,p),(f=a.current)==null||f.setAttribute(Pl,h),s.current=h}),s}var TA=()=>{let[n,a]=v.useState(),l=Hl(()=>new Map);return Vr(()=>{l.current.forEach(i=>i()),l.current=new Map},[n]),(i,s)=>{l.current.set(i,s),a({})}};function jA(n){let a=n.type;return typeof a=="function"?a(n.props):"render"in a?a.render(n.props):n}function _u({asChild:n,children:a},l){return n&&v.isValidElement(a)?v.cloneElement(jA(a),{ref:a.ref},l(a.props.children)):l(a)}var _A={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function jb({className:n,...a}){return y.jsx(ti,{"data-slot":"command",className:ft("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",n),...a})}function _b({className:n,...a}){return y.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[y.jsx(iO,{className:"size-4 shrink-0 opacity-50"}),y.jsx(ti.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 Mb({className:n,...a}){return y.jsx(ti.List,{"data-slot":"command-list",className:ft("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",n),...a})}function Db({...n}){return y.jsx(ti.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...n})}function Lb({className:n,...a}){return y.jsx(ti.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 zb({className:n,...a}){return y.jsx(ti.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 MA=["top","right","bottom","left"],rr=Math.min,un=Math.max,hu=Math.round,Zs=Math.floor,Fn=n=>({x:n,y:n}),DA={left:"right",right:"left",bottom:"top",top:"bottom"},LA={start:"end",end:"start"};function zd(n,a,l){return un(n,rr(a,l))}function Sa(n,a){return typeof n=="function"?n(a):n}function wa(n){return n.split("-")[0]}function ni(n){return n.split("-")[1]}function ih(n){return n==="x"?"y":"x"}function oh(n){return n==="y"?"height":"width"}const zA=new Set(["top","bottom"]);function Yn(n){return zA.has(wa(n))?"y":"x"}function sh(n){return ih(Yn(n))}function kA(n,a,l){l===void 0&&(l=!1);const i=ni(n),s=sh(n),u=oh(s);let f=s==="x"?i===(l?"end":"start")?"right":"left":i==="start"?"bottom":"top";return a.reference[u]>a.floating[u]&&(f=mu(f)),[f,mu(f)]}function UA(n){const a=mu(n);return[kd(n),a,kd(a)]}function kd(n){return n.replace(/start|end/g,a=>LA[a])}const py=["left","right"],gy=["right","left"],PA=["top","bottom"],HA=["bottom","top"];function BA(n,a,l){switch(n){case"top":case"bottom":return l?a?gy:py:a?py:gy;case"left":case"right":return a?PA:HA;default:return[]}}function $A(n,a,l,i){const s=ni(n);let u=BA(wa(n),l==="start",i);return s&&(u=u.map(f=>f+"-"+s),a&&(u=u.concat(u.map(kd)))),u}function mu(n){return n.replace(/left|right|bottom|top/g,a=>DA[a])}function VA(n){return{top:0,right:0,bottom:0,left:0,...n}}function kb(n){return typeof n!="number"?VA(n):{top:n,right:n,bottom:n,left:n}}function pu(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 vy(n,a,l){let{reference:i,floating:s}=n;const u=Yn(a),f=sh(a),h=oh(f),p=wa(a),m=u==="y",g=i.x+i.width/2-s.width/2,x=i.y+i.height/2-s.height/2,S=i[h]/2-s[h]/2;let w;switch(p){case"top":w={x:g,y:i.y-s.height};break;case"bottom":w={x:g,y:i.y+i.height};break;case"right":w={x:i.x+i.width,y:x};break;case"left":w={x:i.x-s.width,y:x};break;default:w={x:i.x,y:i.y}}switch(ni(a)){case"start":w[f]-=S*(l&&m?-1:1);break;case"end":w[f]+=S*(l&&m?-1:1);break}return w}const qA=async(n,a,l)=>{const{placement:i="bottom",strategy:s="absolute",middleware:u=[],platform:f}=l,h=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:g,y:x}=vy(m,i,p),S=i,w={},C=0;for(let R=0;R<h.length;R++){const{name:j,fn:O}=h[R],{x:U,y:z,data:H,reset:k}=await O({x:g,y:x,initialPlacement:i,placement:S,strategy:s,middlewareData:w,rects:m,platform:f,elements:{reference:n,floating:a}});g=U??g,x=z??x,w={...w,[j]:{...w[j],...H}},k&&C<=50&&(C++,typeof k=="object"&&(k.placement&&(S=k.placement),k.rects&&(m=k.rects===!0?await f.getElementRects({reference:n,floating:a,strategy:s}):k.rects),{x:g,y:x}=vy(m,S,p)),R=-1)}return{x:g,y:x,placement:S,strategy:s,middlewareData:w}};async function go(n,a){var l;a===void 0&&(a={});const{x:i,y:s,platform:u,rects:f,elements:h,strategy:p}=n,{boundary:m="clippingAncestors",rootBoundary:g="viewport",elementContext:x="floating",altBoundary:S=!1,padding:w=0}=Sa(a,n),C=kb(w),j=h[S?x==="floating"?"reference":"floating":x],O=pu(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(h.floating)),boundary:m,rootBoundary:g,strategy:p})),U=x==="floating"?{x:i,y:s,width:f.floating.width,height:f.floating.height}:f.reference,z=await(u.getOffsetParent==null?void 0:u.getOffsetParent(h.floating)),H=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},k=pu(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:h,rect:U,offsetParent:z,strategy:p}):U);return{top:(O.top-k.top+C.top)/H.y,bottom:(k.bottom-O.bottom+C.bottom)/H.y,left:(O.left-k.left+C.left)/H.x,right:(k.right-O.right+C.right)/H.x}}const YA=n=>({name:"arrow",options:n,async fn(a){const{x:l,y:i,placement:s,rects:u,platform:f,elements:h,middlewareData:p}=a,{element:m,padding:g=0}=Sa(n,a)||{};if(m==null)return{};const x=kb(g),S={x:l,y:i},w=sh(s),C=oh(w),R=await f.getDimensions(m),j=w==="y",O=j?"top":"left",U=j?"bottom":"right",z=j?"clientHeight":"clientWidth",H=u.reference[C]+u.reference[w]-S[w]-u.floating[C],k=S[w]-u.reference[w],A=await(f.getOffsetParent==null?void 0:f.getOffsetParent(m));let Y=A?A[z]:0;(!Y||!await(f.isElement==null?void 0:f.isElement(A)))&&(Y=h.floating[z]||u.floating[C]);const J=H/2-k/2,ae=Y/2-R[C]/2-1,ie=rr(x[O],ae),Re=rr(x[U],ae),me=ie,oe=Y-R[C]-Re,fe=Y/2-R[C]/2+J,de=zd(me,fe,oe),M=!p.arrow&&ni(s)!=null&&fe!==de&&u.reference[C]/2-(fe<me?ie:Re)-R[C]/2<0,Z=M?fe<me?fe-me:fe-oe:0;return{[w]:S[w]+Z,data:{[w]:de,centerOffset:fe-de-Z,...M&&{alignmentOffset:Z}},reset:M}}}),KA=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:h,platform:p,elements:m}=a,{mainAxis:g=!0,crossAxis:x=!0,fallbackPlacements:S,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:C="none",flipAlignment:R=!0,...j}=Sa(n,a);if((l=u.arrow)!=null&&l.alignmentOffset)return{};const O=wa(s),U=Yn(h),z=wa(h)===h,H=await(p.isRTL==null?void 0:p.isRTL(m.floating)),k=S||(z||!R?[mu(h)]:UA(h)),A=C!=="none";!S&&A&&k.push(...$A(h,R,C,H));const Y=[h,...k],J=await go(a,j),ae=[];let ie=((i=u.flip)==null?void 0:i.overflows)||[];if(g&&ae.push(J[O]),x){const fe=kA(s,f,H);ae.push(J[fe[0]],J[fe[1]])}if(ie=[...ie,{placement:s,overflows:ae}],!ae.every(fe=>fe<=0)){var Re,me;const fe=(((Re=u.flip)==null?void 0:Re.index)||0)+1,de=Y[fe];if(de&&(!(x==="alignment"?U!==Yn(de):!1)||ie.every($=>$.overflows[0]>0&&Yn($.placement)===U)))return{data:{index:fe,overflows:ie},reset:{placement:de}};let M=(me=ie.filter(Z=>Z.overflows[0]<=0).sort((Z,$)=>Z.overflows[1]-$.overflows[1])[0])==null?void 0:me.placement;if(!M)switch(w){case"bestFit":{var oe;const Z=(oe=ie.filter($=>{if(A){const ge=Yn($.placement);return ge===U||ge==="y"}return!0}).map($=>[$.placement,$.overflows.filter(ge=>ge>0).reduce((ge,N)=>ge+N,0)]).sort(($,ge)=>$[1]-ge[1])[0])==null?void 0:oe[0];Z&&(M=Z);break}case"initialPlacement":M=h;break}if(s!==M)return{reset:{placement:M}}}return{}}}};function yy(n,a){return{top:n.top-a.height,right:n.right-a.width,bottom:n.bottom-a.height,left:n.left-a.width}}function by(n){return MA.some(a=>n[a]>=0)}const GA=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(a){const{rects:l}=a,{strategy:i="referenceHidden",...s}=Sa(n,a);switch(i){case"referenceHidden":{const u=await go(a,{...s,elementContext:"reference"}),f=yy(u,l.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:by(f)}}}case"escaped":{const u=await go(a,{...s,altBoundary:!0}),f=yy(u,l.floating);return{data:{escapedOffsets:f,escaped:by(f)}}}default:return{}}}}},Ub=new Set(["left","top"]);async function FA(n,a){const{placement:l,platform:i,elements:s}=n,u=await(i.isRTL==null?void 0:i.isRTL(s.floating)),f=wa(l),h=ni(l),p=Yn(l)==="y",m=Ub.has(f)?-1:1,g=u&&p?-1:1,x=Sa(a,n);let{mainAxis:S,crossAxis:w,alignmentAxis:C}=typeof x=="number"?{mainAxis:x,crossAxis:0,alignmentAxis:null}:{mainAxis:x.mainAxis||0,crossAxis:x.crossAxis||0,alignmentAxis:x.alignmentAxis};return h&&typeof C=="number"&&(w=h==="end"?C*-1:C),p?{x:w*g,y:S*m}:{x:S*m,y:w*g}}const XA=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:h}=a,p=await FA(a,n);return f===((l=h.offset)==null?void 0:l.placement)&&(i=h.arrow)!=null&&i.alignmentOffset?{}:{x:s+p.x,y:u+p.y,data:{...p,placement:f}}}}},QA=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:h={fn:j=>{let{x:O,y:U}=j;return{x:O,y:U}}},...p}=Sa(n,a),m={x:l,y:i},g=await go(a,p),x=Yn(wa(s)),S=ih(x);let w=m[S],C=m[x];if(u){const j=S==="y"?"top":"left",O=S==="y"?"bottom":"right",U=w+g[j],z=w-g[O];w=zd(U,w,z)}if(f){const j=x==="y"?"top":"left",O=x==="y"?"bottom":"right",U=C+g[j],z=C-g[O];C=zd(U,C,z)}const R=h.fn({...a,[S]:w,[x]:C});return{...R,data:{x:R.x-l,y:R.y-i,enabled:{[S]:u,[x]:f}}}}}},ZA=function(n){return n===void 0&&(n={}),{options:n,fn(a){const{x:l,y:i,placement:s,rects:u,middlewareData:f}=a,{offset:h=0,mainAxis:p=!0,crossAxis:m=!0}=Sa(n,a),g={x:l,y:i},x=Yn(s),S=ih(x);let w=g[S],C=g[x];const R=Sa(h,a),j=typeof R=="number"?{mainAxis:R,crossAxis:0}:{mainAxis:0,crossAxis:0,...R};if(p){const z=S==="y"?"height":"width",H=u.reference[S]-u.floating[z]+j.mainAxis,k=u.reference[S]+u.reference[z]-j.mainAxis;w<H?w=H:w>k&&(w=k)}if(m){var O,U;const z=S==="y"?"width":"height",H=Ub.has(wa(s)),k=u.reference[x]-u.floating[z]+(H&&((O=f.offset)==null?void 0:O[x])||0)+(H?0:j.crossAxis),A=u.reference[x]+u.reference[z]+(H?0:((U=f.offset)==null?void 0:U[x])||0)-(H?j.crossAxis:0);C<k?C=k:C>A&&(C=A)}return{[S]:w,[x]:C}}}},JA=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:h}=a,{apply:p=()=>{},...m}=Sa(n,a),g=await go(a,m),x=wa(s),S=ni(s),w=Yn(s)==="y",{width:C,height:R}=u.floating;let j,O;x==="top"||x==="bottom"?(j=x,O=S===(await(f.isRTL==null?void 0:f.isRTL(h.floating))?"start":"end")?"left":"right"):(O=x,j=S==="end"?"top":"bottom");const U=R-g.top-g.bottom,z=C-g.left-g.right,H=rr(R-g[j],U),k=rr(C-g[O],z),A=!a.middlewareData.shift;let Y=H,J=k;if((l=a.middlewareData.shift)!=null&&l.enabled.x&&(J=z),(i=a.middlewareData.shift)!=null&&i.enabled.y&&(Y=U),A&&!S){const ie=un(g.left,0),Re=un(g.right,0),me=un(g.top,0),oe=un(g.bottom,0);w?J=C-2*(ie!==0||Re!==0?ie+Re:un(g.left,g.right)):Y=R-2*(me!==0||oe!==0?me+oe:un(g.top,g.bottom))}await p({...a,availableWidth:J,availableHeight:Y});const ae=await f.getDimensions(h.floating);return C!==ae.width||R!==ae.height?{reset:{rects:!0}}:{}}}};function Mu(){return typeof window<"u"}function ai(n){return Pb(n)?(n.nodeName||"").toLowerCase():"#document"}function cn(n){var a;return(n==null||(a=n.ownerDocument)==null?void 0:a.defaultView)||window}function Zn(n){var a;return(a=(Pb(n)?n.ownerDocument:n.document)||window.document)==null?void 0:a.documentElement}function Pb(n){return Mu()?n instanceof Node||n instanceof cn(n).Node:!1}function jn(n){return Mu()?n instanceof Element||n instanceof cn(n).Element:!1}function Xn(n){return Mu()?n instanceof HTMLElement||n instanceof cn(n).HTMLElement:!1}function xy(n){return!Mu()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof cn(n).ShadowRoot}const IA=new Set(["inline","contents"]);function wo(n){const{overflow:a,overflowX:l,overflowY:i,display:s}=_n(n);return/auto|scroll|overlay|hidden|clip/.test(a+i+l)&&!IA.has(s)}const WA=new Set(["table","td","th"]);function eN(n){return WA.has(ai(n))}const tN=[":popover-open",":modal"];function Du(n){return tN.some(a=>{try{return n.matches(a)}catch{return!1}})}const nN=["transform","translate","scale","rotate","perspective"],aN=["transform","translate","scale","rotate","perspective","filter"],rN=["paint","layout","strict","content"];function uh(n){const a=ch(),l=jn(n)?_n(n):n;return nN.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)||aN.some(i=>(l.willChange||"").includes(i))||rN.some(i=>(l.contain||"").includes(i))}function lN(n){let a=lr(n);for(;Xn(a)&&!Xl(a);){if(uh(a))return a;if(Du(a))return null;a=lr(a)}return null}function ch(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const iN=new Set(["html","body","#document"]);function Xl(n){return iN.has(ai(n))}function _n(n){return cn(n).getComputedStyle(n)}function Lu(n){return jn(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function lr(n){if(ai(n)==="html")return n;const a=n.assignedSlot||n.parentNode||xy(n)&&n.host||Zn(n);return xy(a)?a.host:a}function Hb(n){const a=lr(n);return Xl(a)?n.ownerDocument?n.ownerDocument.body:n.body:Xn(a)&&wo(a)?a:Hb(a)}function vo(n,a,l){var i;a===void 0&&(a=[]),l===void 0&&(l=!0);const s=Hb(n),u=s===((i=n.ownerDocument)==null?void 0:i.body),f=cn(s);if(u){const h=Ud(f);return a.concat(f,f.visualViewport||[],wo(s)?s:[],h&&l?vo(h):[])}return a.concat(s,vo(s,[],l))}function Ud(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function Bb(n){const a=_n(n);let l=parseFloat(a.width)||0,i=parseFloat(a.height)||0;const s=Xn(n),u=s?n.offsetWidth:l,f=s?n.offsetHeight:i,h=hu(l)!==u||hu(i)!==f;return h&&(l=u,i=f),{width:l,height:i,$:h}}function fh(n){return jn(n)?n:n.contextElement}function Yl(n){const a=fh(n);if(!Xn(a))return Fn(1);const l=a.getBoundingClientRect(),{width:i,height:s,$:u}=Bb(a);let f=(u?hu(l.width):l.width)/i,h=(u?hu(l.height):l.height)/s;return(!f||!Number.isFinite(f))&&(f=1),(!h||!Number.isFinite(h))&&(h=1),{x:f,y:h}}const oN=Fn(0);function $b(n){const a=cn(n);return!ch()||!a.visualViewport?oN:{x:a.visualViewport.offsetLeft,y:a.visualViewport.offsetTop}}function sN(n,a,l){return a===void 0&&(a=!1),!l||a&&l!==cn(n)?!1:a}function qr(n,a,l,i){a===void 0&&(a=!1),l===void 0&&(l=!1);const s=n.getBoundingClientRect(),u=fh(n);let f=Fn(1);a&&(i?jn(i)&&(f=Yl(i)):f=Yl(n));const h=sN(u,l,i)?$b(u):Fn(0);let p=(s.left+h.x)/f.x,m=(s.top+h.y)/f.y,g=s.width/f.x,x=s.height/f.y;if(u){const S=cn(u),w=i&&jn(i)?cn(i):i;let C=S,R=Ud(C);for(;R&&i&&w!==C;){const j=Yl(R),O=R.getBoundingClientRect(),U=_n(R),z=O.left+(R.clientLeft+parseFloat(U.paddingLeft))*j.x,H=O.top+(R.clientTop+parseFloat(U.paddingTop))*j.y;p*=j.x,m*=j.y,g*=j.x,x*=j.y,p+=z,m+=H,C=cn(R),R=Ud(C)}}return pu({width:g,height:x,x:p,y:m})}function dh(n,a){const l=Lu(n).scrollLeft;return a?a.left+l:qr(Zn(n)).left+l}function Vb(n,a,l){l===void 0&&(l=!1);const i=n.getBoundingClientRect(),s=i.left+a.scrollLeft-(l?0:dh(n,i)),u=i.top+a.scrollTop;return{x:s,y:u}}function uN(n){let{elements:a,rect:l,offsetParent:i,strategy:s}=n;const u=s==="fixed",f=Zn(i),h=a?Du(a.floating):!1;if(i===f||h&&u)return l;let p={scrollLeft:0,scrollTop:0},m=Fn(1);const g=Fn(0),x=Xn(i);if((x||!x&&!u)&&((ai(i)!=="body"||wo(f))&&(p=Lu(i)),Xn(i))){const w=qr(i);m=Yl(i),g.x=w.x+i.clientLeft,g.y=w.y+i.clientTop}const S=f&&!x&&!u?Vb(f,p,!0):Fn(0);return{width:l.width*m.x,height:l.height*m.y,x:l.x*m.x-p.scrollLeft*m.x+g.x+S.x,y:l.y*m.y-p.scrollTop*m.y+g.y+S.y}}function cN(n){return Array.from(n.getClientRects())}function fN(n){const a=Zn(n),l=Lu(n),i=n.ownerDocument.body,s=un(a.scrollWidth,a.clientWidth,i.scrollWidth,i.clientWidth),u=un(a.scrollHeight,a.clientHeight,i.scrollHeight,i.clientHeight);let f=-l.scrollLeft+dh(n);const h=-l.scrollTop;return _n(i).direction==="rtl"&&(f+=un(a.clientWidth,i.clientWidth)-s),{width:s,height:u,x:f,y:h}}function dN(n,a){const l=cn(n),i=Zn(n),s=l.visualViewport;let u=i.clientWidth,f=i.clientHeight,h=0,p=0;if(s){u=s.width,f=s.height;const m=ch();(!m||m&&a==="fixed")&&(h=s.offsetLeft,p=s.offsetTop)}return{width:u,height:f,x:h,y:p}}const hN=new Set(["absolute","fixed"]);function mN(n,a){const l=qr(n,!0,a==="fixed"),i=l.top+n.clientTop,s=l.left+n.clientLeft,u=Xn(n)?Yl(n):Fn(1),f=n.clientWidth*u.x,h=n.clientHeight*u.y,p=s*u.x,m=i*u.y;return{width:f,height:h,x:p,y:m}}function Sy(n,a,l){let i;if(a==="viewport")i=dN(n,l);else if(a==="document")i=fN(Zn(n));else if(jn(a))i=mN(a,l);else{const s=$b(n);i={x:a.x-s.x,y:a.y-s.y,width:a.width,height:a.height}}return pu(i)}function qb(n,a){const l=lr(n);return l===a||!jn(l)||Xl(l)?!1:_n(l).position==="fixed"||qb(l,a)}function pN(n,a){const l=a.get(n);if(l)return l;let i=vo(n,[],!1).filter(h=>jn(h)&&ai(h)!=="body"),s=null;const u=_n(n).position==="fixed";let f=u?lr(n):n;for(;jn(f)&&!Xl(f);){const h=_n(f),p=uh(f);!p&&h.position==="fixed"&&(s=null),(u?!p&&!s:!p&&h.position==="static"&&!!s&&hN.has(s.position)||wo(f)&&!p&&qb(n,f))?i=i.filter(g=>g!==f):s=h,f=lr(f)}return a.set(n,i),i}function gN(n){let{element:a,boundary:l,rootBoundary:i,strategy:s}=n;const f=[...l==="clippingAncestors"?Du(a)?[]:pN(a,this._c):[].concat(l),i],h=f[0],p=f.reduce((m,g)=>{const x=Sy(a,g,s);return m.top=un(x.top,m.top),m.right=rr(x.right,m.right),m.bottom=rr(x.bottom,m.bottom),m.left=un(x.left,m.left),m},Sy(a,h,s));return{width:p.right-p.left,height:p.bottom-p.top,x:p.left,y:p.top}}function vN(n){const{width:a,height:l}=Bb(n);return{width:a,height:l}}function yN(n,a,l){const i=Xn(a),s=Zn(a),u=l==="fixed",f=qr(n,!0,u,a);let h={scrollLeft:0,scrollTop:0};const p=Fn(0);function m(){p.x=dh(s)}if(i||!i&&!u)if((ai(a)!=="body"||wo(s))&&(h=Lu(a)),i){const w=qr(a,!0,u,a);p.x=w.x+a.clientLeft,p.y=w.y+a.clientTop}else s&&m();u&&!i&&s&&m();const g=s&&!i&&!u?Vb(s,h):Fn(0),x=f.left+h.scrollLeft-p.x-g.x,S=f.top+h.scrollTop-p.y-g.y;return{x,y:S,width:f.width,height:f.height}}function dd(n){return _n(n).position==="static"}function wy(n,a){if(!Xn(n)||_n(n).position==="fixed")return null;if(a)return a(n);let l=n.offsetParent;return Zn(n)===l&&(l=l.ownerDocument.body),l}function Yb(n,a){const l=cn(n);if(Du(n))return l;if(!Xn(n)){let s=lr(n);for(;s&&!Xl(s);){if(jn(s)&&!dd(s))return s;s=lr(s)}return l}let i=wy(n,a);for(;i&&eN(i)&&dd(i);)i=wy(i,a);return i&&Xl(i)&&dd(i)&&!uh(i)?l:i||lN(n)||l}const bN=async function(n){const a=this.getOffsetParent||Yb,l=this.getDimensions,i=await l(n.floating);return{reference:yN(n.reference,await a(n.floating),n.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function xN(n){return _n(n).direction==="rtl"}const SN={convertOffsetParentRelativeRectToViewportRelativeRect:uN,getDocumentElement:Zn,getClippingRect:gN,getOffsetParent:Yb,getElementRects:bN,getClientRects:cN,getDimensions:vN,getScale:Yl,isElement:jn,isRTL:xN};function Kb(n,a){return n.x===a.x&&n.y===a.y&&n.width===a.width&&n.height===a.height}function wN(n,a){let l=null,i;const s=Zn(n);function u(){var h;clearTimeout(i),(h=l)==null||h.disconnect(),l=null}function f(h,p){h===void 0&&(h=!1),p===void 0&&(p=1),u();const m=n.getBoundingClientRect(),{left:g,top:x,width:S,height:w}=m;if(h||a(),!S||!w)return;const C=Zs(x),R=Zs(s.clientWidth-(g+S)),j=Zs(s.clientHeight-(x+w)),O=Zs(g),z={rootMargin:-C+"px "+-R+"px "+-j+"px "+-O+"px",threshold:un(0,rr(1,p))||1};let H=!0;function k(A){const Y=A[0].intersectionRatio;if(Y!==p){if(!H)return f();Y?f(!1,Y):i=setTimeout(()=>{f(!1,1e-7)},1e3)}Y===1&&!Kb(m,n.getBoundingClientRect())&&f(),H=!1}try{l=new IntersectionObserver(k,{...z,root:s.ownerDocument})}catch{l=new IntersectionObserver(k,z)}l.observe(n)}return f(!0),u}function EN(n,a,l,i){i===void 0&&(i={});const{ancestorScroll:s=!0,ancestorResize:u=!0,elementResize:f=typeof ResizeObserver=="function",layoutShift:h=typeof IntersectionObserver=="function",animationFrame:p=!1}=i,m=fh(n),g=s||u?[...m?vo(m):[],...vo(a)]:[];g.forEach(O=>{s&&O.addEventListener("scroll",l,{passive:!0}),u&&O.addEventListener("resize",l)});const x=m&&h?wN(m,l):null;let S=-1,w=null;f&&(w=new ResizeObserver(O=>{let[U]=O;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,R=p?qr(n):null;p&&j();function j(){const O=qr(n);R&&!Kb(R,O)&&l(),R=O,C=requestAnimationFrame(j)}return l(),()=>{var O;g.forEach(U=>{s&&U.removeEventListener("scroll",l),u&&U.removeEventListener("resize",l)}),x?.(),(O=w)==null||O.disconnect(),w=null,p&&cancelAnimationFrame(C)}}const RN=XA,CN=QA,ON=KA,AN=JA,NN=GA,Ey=YA,TN=ZA,jN=(n,a,l)=>{const i=new Map,s={platform:SN,...l},u={...s.platform,_c:i};return qA(n,a,{...s,platform:u})};var _N=typeof document<"u",MN=function(){},lu=_N?v.useLayoutEffect:MN;function gu(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(!gu(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)&&!gu(n[u],a[u]))return!1}return!0}return n!==n&&a!==a}function Gb(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function Ry(n,a){const l=Gb(n);return Math.round(a*l)/l}function hd(n){const a=v.useRef(n);return lu(()=>{a.current=n}),a}function DN(n){n===void 0&&(n={});const{placement:a="bottom",strategy:l="absolute",middleware:i=[],platform:s,elements:{reference:u,floating:f}={},transform:h=!0,whileElementsMounted:p,open:m}=n,[g,x]=v.useState({x:0,y:0,strategy:l,placement:a,middlewareData:{},isPositioned:!1}),[S,w]=v.useState(i);gu(S,i)||w(i);const[C,R]=v.useState(null),[j,O]=v.useState(null),U=v.useCallback($=>{$!==A.current&&(A.current=$,R($))},[]),z=v.useCallback($=>{$!==Y.current&&(Y.current=$,O($))},[]),H=u||C,k=f||j,A=v.useRef(null),Y=v.useRef(null),J=v.useRef(g),ae=p!=null,ie=hd(p),Re=hd(s),me=hd(m),oe=v.useCallback(()=>{if(!A.current||!Y.current)return;const $={placement:a,strategy:l,middleware:S};Re.current&&($.platform=Re.current),jN(A.current,Y.current,$).then(ge=>{const N={...ge,isPositioned:me.current!==!1};fe.current&&!gu(J.current,N)&&(J.current=N,Ru.flushSync(()=>{x(N)}))})},[S,a,l,Re,me]);lu(()=>{m===!1&&J.current.isPositioned&&(J.current.isPositioned=!1,x($=>({...$,isPositioned:!1})))},[m]);const fe=v.useRef(!1);lu(()=>(fe.current=!0,()=>{fe.current=!1}),[]),lu(()=>{if(H&&(A.current=H),k&&(Y.current=k),H&&k){if(ie.current)return ie.current(H,k,oe);oe()}},[H,k,oe,ie,ae]);const de=v.useMemo(()=>({reference:A,floating:Y,setReference:U,setFloating:z}),[U,z]),M=v.useMemo(()=>({reference:H,floating:k}),[H,k]),Z=v.useMemo(()=>{const $={position:l,left:0,top:0};if(!M.floating)return $;const ge=Ry(M.floating,g.x),N=Ry(M.floating,g.y);return h?{...$,transform:"translate("+ge+"px, "+N+"px)",...Gb(M.floating)>=1.5&&{willChange:"transform"}}:{position:l,left:ge,top:N}},[l,h,M.floating,g.x,g.y]);return v.useMemo(()=>({...g,update:oe,refs:de,elements:M,floatingStyles:Z}),[g,oe,de,M,Z])}const LN=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?Ey({element:i.current,padding:s}).fn(l):{}:i?Ey({element:i,padding:s}).fn(l):{}}}},zN=(n,a)=>({...RN(n),options:[n,a]}),kN=(n,a)=>({...CN(n),options:[n,a]}),UN=(n,a)=>({...TN(n),options:[n,a]}),PN=(n,a)=>({...ON(n),options:[n,a]}),HN=(n,a)=>({...AN(n),options:[n,a]}),BN=(n,a)=>({...NN(n),options:[n,a]}),$N=(n,a)=>({...LN(n),options:[n,a]});var VN="Arrow",Fb=v.forwardRef((n,a)=>{const{children:l,width:i=10,height:s=5,...u}=n;return y.jsx(dt.svg,{...u,ref:a,width:i,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:n.asChild?l:y.jsx("polygon",{points:"0,0 30,0 15,10"})})});Fb.displayName=VN;var qN=Fb,hh="Popper",[Xb,Qb]=Cu(hh),[YN,Zb]=Xb(hh),Jb=n=>{const{__scopePopper:a,children:l}=n,[i,s]=v.useState(null);return y.jsx(YN,{scope:a,anchor:i,onAnchorChange:s,children:l})};Jb.displayName=hh;var Ib="PopperAnchor",Wb=v.forwardRef((n,a)=>{const{__scopePopper:l,virtualRef:i,...s}=n,u=Zb(Ib,l),f=v.useRef(null),h=fn(a,f);return v.useEffect(()=>{u.onAnchorChange(i?.current||f.current)}),i?null:y.jsx(dt.div,{...s,ref:h})});Wb.displayName=Ib;var mh="PopperContent",[KN,GN]=Xb(mh),ex=v.forwardRef((n,a)=>{const{__scopePopper:l,side:i="bottom",sideOffset:s=0,align:u="center",alignOffset:f=0,arrowPadding:h=0,avoidCollisions:p=!0,collisionBoundary:m=[],collisionPadding:g=0,sticky:x="partial",hideWhenDetached:S=!1,updatePositionStrategy:w="optimized",onPlaced:C,...R}=n,j=Zb(mh,l),[O,U]=v.useState(null),z=fn(a,ve=>U(ve)),[H,k]=v.useState(null),A=cb(H),Y=A?.width??0,J=A?.height??0,ae=i+(u!=="center"?"-"+u:""),ie=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},Re=Array.isArray(m)?m:[m],me=Re.length>0,oe={padding:ie,boundary:Re.filter(XN),altBoundary:me},{refs:fe,floatingStyles:de,placement:M,isPositioned:Z,middlewareData:$}=DN({strategy:"fixed",placement:ae,whileElementsMounted:(...ve)=>EN(...ve,{animationFrame:w==="always"}),elements:{reference:j.anchor},middleware:[zN({mainAxis:s+J,alignmentAxis:f}),p&&kN({mainAxis:!0,crossAxis:!1,limiter:x==="partial"?UN():void 0,...oe}),p&&PN({...oe}),HN({...oe,apply:({elements:ve,rects:ze,availableWidth:Ze,availableHeight:je})=>{const{width:re,height:te}=ze.reference,ue=ve.floating.style;ue.setProperty("--radix-popper-available-width",`${Ze}px`),ue.setProperty("--radix-popper-available-height",`${je}px`),ue.setProperty("--radix-popper-anchor-width",`${re}px`),ue.setProperty("--radix-popper-anchor-height",`${te}px`)}}),H&&$N({element:H,padding:h}),QN({arrowWidth:Y,arrowHeight:J}),S&&BN({strategy:"referenceHidden",...oe})]}),[ge,N]=ax(M),K=Kl(C);nr(()=>{Z&&K?.()},[Z,K]);const L=$.arrow?.x,G=$.arrow?.y,W=$.arrow?.centerOffset!==0,[se,pe]=v.useState();return nr(()=>{O&&pe(window.getComputedStyle(O).zIndex)},[O]),y.jsx("div",{ref:fe.setFloating,"data-radix-popper-content-wrapper":"",style:{...de,transform:Z?de.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:se,"--radix-popper-transform-origin":[$.transformOrigin?.x,$.transformOrigin?.y].join(" "),...$.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:n.dir,children:y.jsx(KN,{scope:l,placedSide:ge,onArrowChange:k,arrowX:L,arrowY:G,shouldHideArrow:W,children:y.jsx(dt.div,{"data-side":ge,"data-align":N,...R,ref:z,style:{...R.style,animation:Z?void 0:"none"}})})})});ex.displayName=mh;var tx="PopperArrow",FN={top:"bottom",right:"left",bottom:"top",left:"right"},nx=v.forwardRef(function(a,l){const{__scopePopper:i,...s}=a,u=GN(tx,i),f=FN[u.placedSide];return y.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:y.jsx(qN,{...s,ref:l,style:{...s.style,display:"block"}})})});nx.displayName=tx;function XN(n){return n!==null}var QN=n=>({name:"transformOrigin",options:n,fn(a){const{placement:l,rects:i,middlewareData:s}=a,f=s.arrow?.centerOffset!==0,h=f?0:n.arrowWidth,p=f?0:n.arrowHeight,[m,g]=ax(l),x={start:"0%",center:"50%",end:"100%"}[g],S=(s.arrow?.x??0)+h/2,w=(s.arrow?.y??0)+p/2;let C="",R="";return m==="bottom"?(C=f?x:`${S}px`,R=`${-p}px`):m==="top"?(C=f?x:`${S}px`,R=`${i.floating.height+p}px`):m==="right"?(C=`${-p}px`,R=f?x:`${w}px`):m==="left"&&(C=`${i.floating.width+p}px`,R=f?x:`${w}px`),{data:{x:C,y:R}}}});function ax(n){const[a,l="center"]=n.split("-");return[a,l]}var ZN=Jb,rx=Wb,JN=ex,IN=nx,zu="Popover",[lx,Mj]=Cu(zu,[Qb]),Eo=Qb(),[WN,or]=lx(zu),ix=n=>{const{__scopePopover:a,children:l,open:i,defaultOpen:s,onOpenChange:u,modal:f=!1}=n,h=Eo(a),p=v.useRef(null),[m,g]=v.useState(!1),[x,S]=Fd({prop:i,defaultProp:s??!1,onChange:u,caller:zu});return y.jsx(ZN,{...h,children:y.jsx(WN,{scope:a,contentId:Gn(),triggerRef:p,open:x,onOpenChange:S,onOpenToggle:v.useCallback(()=>S(w=>!w),[S]),hasCustomAnchor:m,onCustomAnchorAdd:v.useCallback(()=>g(!0),[]),onCustomAnchorRemove:v.useCallback(()=>g(!1),[]),modal:f,children:l})})};ix.displayName=zu;var ox="PopoverAnchor",eT=v.forwardRef((n,a)=>{const{__scopePopover:l,...i}=n,s=or(ox,l),u=Eo(l),{onCustomAnchorAdd:f,onCustomAnchorRemove:h}=s;return v.useEffect(()=>(f(),()=>h()),[f,h]),y.jsx(rx,{...u,...i,ref:a})});eT.displayName=ox;var sx="PopoverTrigger",ux=v.forwardRef((n,a)=>{const{__scopePopover:l,...i}=n,s=or(sx,l),u=Eo(l),f=fn(a,s.triggerRef),h=y.jsx(dt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":mx(s.open),...i,ref:f,onClick:Jt(n.onClick,s.onOpenToggle)});return s.hasCustomAnchor?h:y.jsx(rx,{asChild:!0,...u,children:h})});ux.displayName=sx;var ph="PopoverPortal",[tT,nT]=lx(ph,{forceMount:void 0}),cx=n=>{const{__scopePopover:a,forceMount:l,children:i,container:s}=n,u=or(ph,a);return y.jsx(tT,{scope:a,forceMount:l,children:y.jsx(Jl,{present:l||u.open,children:y.jsx(Zd,{asChild:!0,container:s,children:i})})})};cx.displayName=ph;var Ql="PopoverContent",fx=v.forwardRef((n,a)=>{const l=nT(Ql,n.__scopePopover),{forceMount:i=l.forceMount,...s}=n,u=or(Ql,n.__scopePopover);return y.jsx(Jl,{present:i||u.open,children:u.modal?y.jsx(rT,{...s,ref:a}):y.jsx(lT,{...s,ref:a})})});fx.displayName=Ql;var aT=Ou("PopoverContent.RemoveScroll"),rT=v.forwardRef((n,a)=>{const l=or(Ql,n.__scopePopover),i=v.useRef(null),s=fn(a,i),u=v.useRef(!1);return v.useEffect(()=>{const f=i.current;if(f)return R0(f)},[]),y.jsx(Jd,{as:aT,allowPinchZoom:!0,children:y.jsx(dx,{...n,ref:s,trapFocus:l.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Jt(n.onCloseAutoFocus,f=>{f.preventDefault(),u.current||l.triggerRef.current?.focus()}),onPointerDownOutside:Jt(n.onPointerDownOutside,f=>{const h=f.detail.originalEvent,p=h.button===0&&h.ctrlKey===!0,m=h.button===2||p;u.current=m},{checkForDefaultPrevented:!1}),onFocusOutside:Jt(n.onFocusOutside,f=>f.preventDefault(),{checkForDefaultPrevented:!1})})})}),lT=v.forwardRef((n,a)=>{const l=or(Ql,n.__scopePopover),i=v.useRef(!1),s=v.useRef(!1);return y.jsx(dx,{...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()}})}),dx=v.forwardRef((n,a)=>{const{__scopePopover:l,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:u,disableOutsidePointerEvents:f,onEscapeKeyDown:h,onPointerDownOutside:p,onFocusOutside:m,onInteractOutside:g,...x}=n,S=or(Ql,l),w=Eo(l);return p0(),y.jsx(Qd,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:s,onUnmountAutoFocus:u,children:y.jsx(Xd,{asChild:!0,disableOutsidePointerEvents:f,onInteractOutside:g,onEscapeKeyDown:h,onPointerDownOutside:p,onFocusOutside:m,onDismiss:()=>S.onOpenChange(!1),children:y.jsx(JN,{"data-state":mx(S.open),role:"dialog",id:S.contentId,...w,...x,ref:a,style:{...x.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)"}})})})}),hx="PopoverClose",iT=v.forwardRef((n,a)=>{const{__scopePopover:l,...i}=n,s=or(hx,l);return y.jsx(dt.button,{type:"button",...i,ref:a,onClick:Jt(n.onClick,()=>s.onOpenChange(!1))})});iT.displayName=hx;var oT="PopoverArrow",sT=v.forwardRef((n,a)=>{const{__scopePopover:l,...i}=n,s=Eo(l);return y.jsx(IN,{...s,...i,ref:a})});sT.displayName=oT;function mx(n){return n?"open":"closed"}var uT=ix,cT=ux,fT=cx,dT=fx;function gh({...n}){return y.jsx(uT,{"data-slot":"popover",...n})}function vh({...n}){return y.jsx(cT,{"data-slot":"popover-trigger",...n})}function yh({className:n,align:a="center",sideOffset:l=4,...i}){return y.jsx(fT,{children:y.jsx(dT,{"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 Wa({options:n,value:a,onChange:l,placeholder:i="Select an option...",searchPlaceholder:s="Search...",emptyPlaceholder:u="No options found."}){const[f,h]=v.useState(!1),p=n.find(m=>m.value===a);return y.jsxs(gh,{open:f,onOpenChange:h,children:[y.jsx(vh,{asChild:!0,children:y.jsxs(He,{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,y.jsx(G0,{className:"ml-2 h-4 w-4 shrink-0 opacity-50 transition-transform duration-200 group-data-[state=open]:rotate-180"})]})}),y.jsx(yh,{className:"w-[--radix-popover-trigger-width] p-0 animate-fade-in",children:y.jsxs(jb,{children:[y.jsx(_b,{placeholder:s}),y.jsxs(Mb,{children:[y.jsx(Db,{children:u}),y.jsx(Lb,{children:n.map(m=>y.jsxs(zb,{value:m.value,onSelect:g=>{l(g===a?"":g),h(!1)},className:"transition-all-ease hover:bg-accent hover:text-accent-foreground",children:[y.jsx(K0,{className:ft("mr-2 h-4 w-4 transition-opacity",a===m.value?"opacity-100":"opacity-0")}),m.label]},m.value))})]})]})})]})}const hT=v.forwardRef(({options:n,value:a,onChange:l,onEnter:i,searchPlaceholder:s="Search...",emptyPlaceholder:u="No options found.",inputPlaceholder:f="Type or select..."},h)=>{const[p,m]=v.useState(!1),[g,x]=v.useState(a||""),S=v.useRef(null);v.useImperativeHandle(h,()=>S.current),v.useEffect(()=>{x(a||"")},[a]);const w=O=>{const U=O.target.value;x(U),l(U)},C=O=>{O.key==="Enter"&&g.trim()&&i&&(i(g.trim()),x(""))},R=O=>{x(O),l(O),i&&(i(O),x("")),m(!1)},j=()=>g;return v.useImperativeHandle(h,()=>({...S.current,value:g,getCurrentValue:j,clearInput:()=>{x(""),l("")}})),y.jsxs("div",{className:"relative",children:[y.jsx(Rt,{ref:S,value:g,onChange:w,onKeyDown:C,placeholder:f,className:"pr-10"}),y.jsxs(gh,{open:p,onOpenChange:m,children:[y.jsx(vh,{asChild:!0,children:y.jsx(He,{variant:"ghost",size:"sm",className:"absolute right-0 top-0 h-full px-3 py-2 hover:bg-transparent",children:y.jsx(G0,{className:"h-4 w-4 opacity-50"})})}),y.jsx(yh,{className:"w-[--radix-popover-trigger-width] p-0 animate-fade-in",children:y.jsxs(jb,{children:[y.jsx(_b,{placeholder:s}),y.jsxs(Mb,{children:[y.jsx(Db,{children:u}),y.jsx(Lb,{children:n.map(O=>y.jsxs(zb,{value:O.value,onSelect:()=>R(O.value),className:"transition-all-ease hover:bg-accent hover:text-accent-foreground",children:[y.jsx(K0,{className:ft("mr-2 h-4 w-4 transition-opacity",a===O.value?"opacity-100":"opacity-0")}),O.label]},O.value))})]})]})})]})]})});function mT(){const{t:n}=Yr(),{config:a,setConfig:l}=ei(),[i,s]=v.useState(null),[u,f]=v.useState(null),[h,p]=v.useState({}),[m,g]=v.useState({}),[x,S]=v.useState({}),[w,C]=v.useState([]),[R,j]=v.useState(null),[O,U]=v.useState(!1),[z,H]=v.useState([]),[k,A]=v.useState({}),[Y,J]=v.useState(null),[ae,ie]=v.useState(null),Re=v.useRef(null);if(v.useEffect(()=>{(async()=>{try{const te=await fetch("https://pub-0dc3e1677e894f07bbea11b17a29e032.r2.dev/providers.json");if(te.ok){const ue=await te.json();H(ue||[])}else console.error("Failed to fetch provider templates")}catch(te){console.error("Failed to fetch provider templates:",te)}})()},[]),v.useEffect(()=>{(async()=>{try{const te=await Yt.get("/transformers");C(te.transformers)}catch(te){console.error("Failed to fetch transformers:",te)}})()},[]),!a)return y.jsxs(va,{className:"flex h-full flex-col rounded-lg border shadow-sm",children:[y.jsx(ya,{className:"flex flex-row items-center justify-between border-b p-4",children:y.jsx(ba,{className:"text-lg",children:n("providers.title")})}),y.jsx(xa,{className:"flex-grow flex items-center justify-center p-4",children:y.jsx("div",{className:"text-gray-500",children:"Loading providers configuration..."})})]});const me=Array.isArray(a.Providers)?a.Providers:[],oe=()=>{const re={name:"",api_base_url:"",api_key:"",models:[]};s(a.Providers.length),j(re),U(!0),A(te=>({...te,[a.Providers.length]:!1})),J(null),ie(null)},fe=re=>{const te=a.Providers[re];s(re),j(JSON.parse(JSON.stringify(te))),U(!1),A(ue=>({...ue,[re]:!1})),J(null),ie(null)},de=()=>{if(!R)return;if(!R.name||R.name.trim()===""){ie(n("providers.name_required"));return}const re=R.name.trim();if(a.Providers.some((ue,ce)=>!O&&ce===i?!1:ue.name.toLowerCase()===re.toLowerCase())){ie(n("providers.name_duplicate"));return}if(!R.api_key||R.api_key.trim()===""){J(n("providers.api_key_required"));return}if(J(null),ie(null),i!==null&&R){const ue=[...a.Providers];O?ue.push(R):ue[i]=R,l({...a,Providers:ue})}i!==null&&A(ue=>{const ce={...ue};return delete ce[i],ce}),s(null),j(null),U(!1)},M=()=>{i!==null&&(p(re=>{const te={...re};return delete te[i],te}),A(re=>{const te={...re};return delete te[i],te})),s(null),j(null),U(!1),J(null),ie(null)},Z=re=>{const te=[...a.Providers];te.splice(re,1),l({...a,Providers:te}),f(null)},$=(re,te,ue)=>{if(R){const ce={...R,[te]:ue};j(ce)}},ge=(re,te)=>{if(!te||!R)return;const ue={...R};ue.transformer||(ue.transformer={use:[]}),ue.transformer.use=[...ue.transformer.use,te],j(ue)},N=(re,te)=>{if(!R)return;const ue={...R};if(ue.transformer){const ce=[...ue.transformer.use];ce.splice(te,1),ue.transformer.use=ce,ce.length===0&&Object.keys(ue.transformer).length===1&&delete ue.transformer}j(ue)},K=(re,te,ue)=>{if(!ue||!R)return;const ce={...R};ce.transformer||(ce.transformer={use:[]}),ce.transformer[te]||(ce.transformer[te]={use:[]}),ce.transformer[te].use=[...ce.transformer[te].use,ue],j(ce)},L=(re,te,ue)=>{if(!R)return;const ce={...R};if(ce.transformer&&ce.transformer[te]){const Ne=[...ce.transformer[te].use];Ne.splice(ue,1),ce.transformer[te].use=Ne,Ne.length===0&&Object.keys(ce.transformer[te]).length===1&&delete ce.transformer[te]}j(ce)},G=(re,te,ue,ce)=>{if(!R)return;const Ne={...R};if(Ne.transformer||(Ne.transformer={use:[]}),Ne.transformer.use&&Ne.transformer.use.length>te){const Ue=Ne.transformer.use[te];if(Array.isArray(Ue)){const _e=[...Ue];if(_e.length>1&&typeof _e[1]=="object"&&_e[1]!==null){const Cn={..._e[1],[ue]:ce};_e[1]=Cn}else if(_e.length>1){const ot={[ue]:ce};_e.splice(1,_e.length-1,ot)}else{const ot={[ue]:ce};_e.push(ot)}Ne.transformer.use[te]=_e}else{const _e={[ue]:ce};Ne.transformer.use[te]=[Ue,_e]}}j(Ne)},W=(re,te,ue)=>{if(!R)return;const ce={...R};if(!ce.transformer?.use||ce.transformer.use.length<=te)return;const Ne=ce.transformer.use[te];if(Array.isArray(Ne)&&Ne.length>1){const Ue=[...Ne];if(typeof Ue[1]=="object"&&Ue[1]!==null){const _e={...Ue[1]};delete _e[ue],Object.keys(_e).length===0?Ue.splice(1,1):Ue[1]=_e,ce.transformer.use[te]=Ue,j(ce)}}},se=(re,te,ue,ce,Ne)=>{if(!R)return;const Ue={...R};if(Ue.transformer||(Ue.transformer={use:[]}),Ue.transformer[te]||(Ue.transformer[te]={use:[]}),Ue.transformer[te].use&&Ue.transformer[te].use.length>ue){const _e=Ue.transformer[te].use[ue];if(Array.isArray(_e)){const ot=[..._e];if(ot.length>1&&typeof ot[1]=="object"&&ot[1]!==null){const Gr={...ot[1],[ce]:Ne};ot[1]=Gr}else if(ot.length>1){const Cn={[ce]:Ne};ot.splice(1,ot.length-1,Cn)}else{const Cn={[ce]:Ne};ot.push(Cn)}Ue.transformer[te].use[ue]=ot}else{const ot={[ce]:Ne};Ue.transformer[te].use[ue]=[_e,ot]}}j(Ue)},pe=(re,te,ue,ce)=>{if(!R)return;const Ne={...R};if(!Ne.transformer?.[te]?.use||Ne.transformer[te].use.length<=ue)return;const Ue=Ne.transformer[te].use[ue];if(Array.isArray(Ue)&&Ue.length>1){const _e=[...Ue];if(typeof _e[1]=="object"&&_e[1]!==null){const ot={..._e[1]};delete ot[ce],Object.keys(ot).length===0?_e.splice(1,1):_e[1]=ot,Ne.transformer[te].use[ue]=_e,j(Ne)}}},ve=(re,te)=>{if(!te.trim()||!R)return;const ue={...R},ce=Array.isArray(ue.models)?[...ue.models]:[];ce.includes(te.trim())||(ce.push(te.trim()),ue.models=ce,j(ue))},ze=re=>{if(re)try{const te=JSON.parse(re);if(te){const ue=R?.name,ce=JSON.parse(JSON.stringify(te));!O&&ue&&(ce.name=ue),j(ce)}}catch(te){console.error("Failed to parse template",te)}},Ze=(re,te)=>{if(!R)return;const ue={...R},ce=Array.isArray(ue.models)?[...ue.models]:[];te>=0&&te<ce.length&&(ce.splice(te,1),ue.models=ce,j(ue))},je=R||(i!==null?me[i]:null);return y.jsxs(va,{className:"flex h-full flex-col rounded-lg border shadow-sm",children:[y.jsxs(ya,{className:"flex flex-row items-center justify-between border-b p-4",children:[y.jsxs(ba,{className:"text-lg",children:[n("providers.title")," ",y.jsxs("span",{className:"text-sm font-normal text-gray-500",children:["(",me.length,")"]})]}),y.jsx(He,{onClick:oe,children:n("providers.add")})]}),y.jsx(xa,{className:"flex-grow overflow-y-auto p-4",children:y.jsx(oA,{providers:me,onEdit:fe,onRemove:f})}),y.jsx(Gl,{open:i!==null,onOpenChange:re=>{re||M()},children:y.jsxs(Hr,{className:"max-h-[80vh] flex flex-col sm:max-w-2xl",children:[y.jsx(Br,{children:y.jsx($r,{children:n("providers.edit")})}),je&&i!==null&&y.jsxs("div",{className:"space-y-4 p-4 overflow-y-auto flex-grow",children:[z.length>0&&y.jsxs("div",{className:"space-y-2",children:[y.jsx(ct,{children:n("providers.import_from_template")}),y.jsx(Wa,{options:z.map(re=>({label:re.name,value:JSON.stringify(re)})),value:"",onChange:ze,placeholder:n("providers.select_template"),emptyPlaceholder:n("providers.no_templates_found")})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(ct,{htmlFor:"name",children:n("providers.name")}),y.jsx(Rt,{id:"name",value:je.name||"",onChange:re=>{$(i,"name",re.target.value),ae&&ie(null)},className:ae?"border-red-500":""}),ae&&y.jsx("p",{className:"text-sm text-red-500",children:ae})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(ct,{htmlFor:"api_base_url",children:n("providers.api_base_url")}),y.jsx(Rt,{id:"api_base_url",value:je.api_base_url||"",onChange:re=>$(i,"api_base_url",re.target.value)})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(ct,{htmlFor:"api_key",children:n("providers.api_key")}),y.jsxs("div",{className:"relative",children:[y.jsx(Rt,{id:"api_key",type:k[i||0]?"text":"password",value:je.api_key||"",onChange:re=>$(i,"api_key",re.target.value),className:Y?"border-red-500":""}),y.jsx(He,{type:"button",variant:"ghost",size:"icon",className:"absolute right-2 top-1/2 transform -translate-y-1/2 h-8 w-8",onClick:()=>{const re=i||0;A(te=>({...te,[re]:!te[re]}))},children:k[i||0]?y.jsx(X2,{className:"h-4 w-4"}):y.jsx(Z2,{className:"h-4 w-4"})})]}),Y&&y.jsx("p",{className:"text-sm text-red-500",children:Y})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(ct,{htmlFor:"models",children:n("providers.models")}),y.jsxs("div",{className:"space-y-2",children:[y.jsxs("div",{className:"flex gap-2",children:[y.jsx("div",{className:"flex-1",children:h[i]?y.jsx(hT,{ref:Re,options:(je.models||[]).map(re=>({label:re,value:re})),value:"",onChange:()=>{},onEnter:re=>{i!==null&&ve(i,re)},inputPlaceholder:n("providers.models_placeholder")}):y.jsx(Rt,{id:"models",placeholder:n("providers.models_placeholder"),onKeyDown:re=>{re.key==="Enter"&&re.currentTarget.value.trim()&&i!==null&&(ve(i,re.currentTarget.value),re.currentTarget.value="")}})}),y.jsx(He,{onClick:()=>{if(h[i]&&Re.current){const re=Re.current,te=re.getCurrentValue();te&&te.trim()&&i!==null&&(ve(i,te.trim()),re.clearInput())}else{const re=document.getElementById("models");re&&re.value.trim()&&i!==null&&(ve(i,re.value),re.value="")}},children:n("providers.add_model")})]}),y.jsx("div",{className:"flex flex-wrap gap-2 pt-2",children:(je.models||[]).map((re,te)=>y.jsxs(Sb,{variant:"outline",className:"font-normal flex items-center gap-1",children:[re,y.jsx("button",{type:"button",className:"ml-1 rounded-full hover:bg-gray-200",onClick:()=>i!==null&&Ze(i,te),children:y.jsx(ql,{className:"h-3 w-3"})})]},te))})]})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(ct,{children:n("providers.provider_transformer")}),y.jsx("div",{className:"flex gap-2",children:y.jsx(Wa,{options:w.map(re=>({label:re.name,value:re.name})),value:"",onChange:re=>{i!==null&&ge(i,re)},placeholder:n("providers.select_transformer"),emptyPlaceholder:n("providers.no_transformers")})}),je.transformer?.use&&je.transformer.use.length>0&&y.jsxs("div",{className:"space-y-2 mt-2",children:[y.jsx("div",{className:"text-sm font-medium text-gray-700",children:n("providers.selected_transformers")}),je.transformer.use.map((re,te)=>y.jsxs("div",{className:"border rounded-md p-3",children:[y.jsxs("div",{className:"flex gap-2 items-center mb-2",children:[y.jsx("div",{className:"flex-1 bg-gray-50 rounded p-2 text-sm",children:typeof re=="string"?re:Array.isArray(re)?String(re[0]):String(re)}),y.jsx(He,{variant:"outline",size:"icon",onClick:()=>{i!==null&&N(i,te)},children:y.jsx(Pr,{className:"h-4 w-4"})})]}),y.jsxs("div",{className:"mt-2 pl-4 border-l-2 border-gray-200",children:[y.jsx(ct,{className:"text-sm",children:n("providers.transformer_parameters")}),y.jsxs("div",{className:"space-y-2 mt-1",children:[y.jsxs("div",{className:"flex gap-2",children:[y.jsx(Rt,{placeholder:n("providers.parameter_name"),value:m[`provider-${i}-transformer-${te}`]?.name||"",onChange:ue=>{const ce=`provider-${i}-transformer-${te}`;g(Ne=>({...Ne,[ce]:{...Ne[ce]||{name:"",value:""},name:ue.target.value}}))}}),y.jsx(Rt,{placeholder:n("providers.parameter_value"),value:m[`provider-${i}-transformer-${te}`]?.value||"",onChange:ue=>{const ce=`provider-${i}-transformer-${te}`;g(Ne=>({...Ne,[ce]:{...Ne[ce]||{name:"",value:""},value:ue.target.value}}))}}),y.jsx(He,{size:"sm",onClick:()=>{if(i!==null){const ue=`provider-${i}-transformer-${te}`,ce=m[ue];ce&&ce.name&&ce.value&&(G(i,te,ce.name,ce.value),g(Ne=>({...Ne,[ue]:{name:"",value:""}})))}},children:y.jsx(Td,{className:"h-4 w-4"})})]}),(()=>{if(!je.transformer?.use||je.transformer.use.length<=te)return null;const ue=je.transformer.use[te];let ce={};return Array.isArray(ue)&&ue.length>1&&typeof ue[1]=="object"&&ue[1]!==null&&(ce=ue[1]),Object.keys(ce).length>0?y.jsx("div",{className:"space-y-1",children:Object.entries(ce).map(([Ne,Ue])=>y.jsxs("div",{className:"flex items-center justify-between bg-gray-50 rounded p-2",children:[y.jsxs("div",{className:"text-sm",children:[y.jsxs("span",{className:"font-medium",children:[Ne,":"]})," ",String(Ue)]}),y.jsx(He,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>{i!==null&&W(i,te,Ne)},children:y.jsx(ql,{className:"h-3 w-3"})})]},Ne))}):null})()]})]})]},te))]})]}),je.models&&je.models.length>0&&y.jsxs("div",{className:"space-y-2",children:[y.jsx(ct,{children:n("providers.model_transformers")}),y.jsx("div",{className:"space-y-3",children:(je.models||[]).map((re,te)=>y.jsxs("div",{className:"border rounded-md p-3",children:[y.jsx("div",{className:"font-medium text-sm mb-2",children:re}),y.jsx("div",{className:"flex gap-2",children:y.jsx("div",{className:"flex-1 flex gap-2",children:y.jsx(Wa,{options:w.map(ue=>({label:ue.name,value:ue.name})),value:"",onChange:ue=>{i!==null&&K(i,re,ue)},placeholder:n("providers.select_transformer"),emptyPlaceholder:n("providers.no_transformers")})})}),je.transformer?.[re]?.use&&je.transformer[re].use.length>0&&y.jsxs("div",{className:"space-y-2 mt-2",children:[y.jsx("div",{className:"text-sm font-medium text-gray-700",children:n("providers.selected_transformers")}),je.transformer[re].use.map((ue,ce)=>y.jsxs("div",{className:"border rounded-md p-3",children:[y.jsxs("div",{className:"flex gap-2 items-center mb-2",children:[y.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)}),y.jsx(He,{variant:"outline",size:"icon",onClick:()=>{i!==null&&L(i,re,ce)},children:y.jsx(Pr,{className:"h-4 w-4"})})]}),y.jsxs("div",{className:"mt-2 pl-4 border-l-2 border-gray-200",children:[y.jsx(ct,{className:"text-sm",children:n("providers.transformer_parameters")}),y.jsxs("div",{className:"space-y-2 mt-1",children:[y.jsxs("div",{className:"flex gap-2",children:[y.jsx(Rt,{placeholder:n("providers.parameter_name"),value:x[`model-${i}-${re}-transformer-${ce}`]?.name||"",onChange:Ne=>{const Ue=`model-${i}-${re}-transformer-${ce}`;S(_e=>({..._e,[Ue]:{..._e[Ue]||{name:"",value:""},name:Ne.target.value}}))}}),y.jsx(Rt,{placeholder:n("providers.parameter_value"),value:x[`model-${i}-${re}-transformer-${ce}`]?.value||"",onChange:Ne=>{const Ue=`model-${i}-${re}-transformer-${ce}`;S(_e=>({..._e,[Ue]:{..._e[Ue]||{name:"",value:""},value:Ne.target.value}}))}}),y.jsx(He,{size:"sm",onClick:()=>{if(i!==null){const Ne=`model-${i}-${re}-transformer-${ce}`,Ue=x[Ne];Ue&&Ue.name&&Ue.value&&(se(i,re,ce,Ue.name,Ue.value),S(_e=>({..._e,[Ne]:{name:"",value:""}})))}},children:y.jsx(Td,{className:"h-4 w-4"})})]}),(()=>{if(!je.transformer?.[re]?.use||je.transformer[re].use.length<=ce)return null;const Ne=je.transformer[re].use[ce];let Ue={};return Array.isArray(Ne)&&Ne.length>1&&typeof Ne[1]=="object"&&Ne[1]!==null&&(Ue=Ne[1]),Object.keys(Ue).length>0?y.jsx("div",{className:"space-y-1",children:Object.entries(Ue).map(([_e,ot])=>y.jsxs("div",{className:"flex items-center justify-between bg-gray-50 rounded p-2",children:[y.jsxs("div",{className:"text-sm",children:[y.jsxs("span",{className:"font-medium",children:[_e,":"]})," ",String(ot)]}),y.jsx(He,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>{i!==null&&pe(i,re,ce,_e)},children:y.jsx(ql,{className:"h-3 w-3"})})]},_e))}):null})()]})]})]},ce))]})]},te))})]})]}),y.jsx("div",{className:"space-y-3 mt-auto",children:y.jsx("div",{className:"flex justify-end gap-2",children:y.jsx(He,{onClick:de,children:n("app.save")})})})]})}),y.jsx(Gl,{open:u!==null,onOpenChange:()=>f(null),children:y.jsxs(Hr,{children:[y.jsxs(Br,{children:[y.jsx($r,{children:n("providers.delete")}),y.jsx(Tu,{children:n("providers.delete_provider_confirm")})]}),y.jsxs(Fl,{children:[y.jsx(He,{variant:"outline",onClick:()=>f(null),children:n("providers.cancel")}),y.jsx(He,{variant:"destructive",onClick:()=>u!==null&&Z(u),children:n("providers.delete")})]})]})})]})}function pT(){const{t:n}=Yr(),{config:a,setConfig:l}=ei();if(!a)return y.jsxs(va,{className:"flex h-full flex-col rounded-lg border shadow-sm",children:[y.jsx(ya,{className:"border-b p-4",children:y.jsx(ba,{className:"text-lg",children:n("router.title")})}),y.jsx(xa,{className:"flex-grow flex items-center justify-center p-4",children:y.jsx("div",{className:"text-gray-500",children:"Loading router configuration..."})})]});const i=a.Router||{default:"",background:"",think:"",longContext:"",longContextThreshold:6e4,webSearch:""},s=(h,p)=>{const g={...a.Router||{},[h]:p};l({...a,Router:g})},f=(Array.isArray(a.Providers)?a.Providers:[]).flatMap(h=>{if(!h)return[];const p=Array.isArray(h.models)?h.models:[],m=h.name||"Unknown Provider";return p.map(g=>({value:`${m},${g||"Unknown Model"}`,label:`${m}, ${g||"Unknown Model"}`}))});return y.jsxs(va,{className:"flex h-full flex-col rounded-lg border shadow-sm",children:[y.jsx(ya,{className:"border-b p-4",children:y.jsx(ba,{className:"text-lg",children:n("router.title")})}),y.jsxs(xa,{className:"flex-grow space-y-5 overflow-y-auto p-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(ct,{children:n("router.default")}),y.jsx(Wa,{options:f,value:i.default||"",onChange:h=>s("default",h),placeholder:n("router.selectModel"),searchPlaceholder:n("router.searchModel"),emptyPlaceholder:n("router.noModelFound")})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(ct,{children:n("router.background")}),y.jsx(Wa,{options:f,value:i.background||"",onChange:h=>s("background",h),placeholder:n("router.selectModel"),searchPlaceholder:n("router.searchModel"),emptyPlaceholder:n("router.noModelFound")})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(ct,{children:n("router.think")}),y.jsx(Wa,{options:f,value:i.think||"",onChange:h=>s("think",h),placeholder:n("router.selectModel"),searchPlaceholder:n("router.searchModel"),emptyPlaceholder:n("router.noModelFound")})]}),y.jsx("div",{className:"space-y-2",children:y.jsxs("div",{className:"flex items-center gap-4",children:[y.jsxs("div",{className:"flex-1",children:[y.jsx(ct,{children:n("router.longContext")}),y.jsx(Wa,{options:f,value:i.longContext||"",onChange:h=>s("longContext",h),placeholder:n("router.selectModel"),searchPlaceholder:n("router.searchModel"),emptyPlaceholder:n("router.noModelFound")})]}),y.jsxs("div",{className:"w-48",children:[y.jsx(ct,{children:n("router.longContextThreshold")}),y.jsx(Rt,{type:"number",value:i.longContextThreshold||6e4,onChange:h=>s("longContextThreshold",parseInt(h.target.value)||6e4),placeholder:"60000"})]})]})}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(ct,{children:n("router.webSearch")}),y.jsx(Wa,{options:f,value:i.webSearch||"",onChange:h=>s("webSearch",h),placeholder:n("router.selectModel"),searchPlaceholder:n("router.searchModel"),emptyPlaceholder:n("router.noModelFound")})]})]})]})}function gT(n,a,l){return a in n?Object.defineProperty(n,a,{value:l,enumerable:!0,configurable:!0,writable:!0}):n[a]=l,n}function Cy(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 Oy(n){for(var a=1;a<arguments.length;a++){var l=arguments[a]!=null?arguments[a]:{};a%2?Cy(Object(l),!0).forEach(function(i){gT(n,i,l[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(l)):Cy(Object(l)).forEach(function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(l,i))})}return n}function vT(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 yT(n,a){if(n==null)return{};var l=vT(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 bT(n,a){return xT(n)||ST(n,a)||wT(n,a)||ET()}function xT(n){if(Array.isArray(n))return n}function ST(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](),h;!(i=(h=f.next()).done)&&(l.push(h.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 wT(n,a){if(n){if(typeof n=="string")return Ay(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 Ay(n,a)}}function Ay(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 ET(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
222
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function RT(n,a,l){return a in n?Object.defineProperty(n,a,{value:l,enumerable:!0,configurable:!0,writable:!0}):n[a]=l,n}function Ny(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 Ty(n){for(var a=1;a<arguments.length;a++){var l=arguments[a]!=null?arguments[a]:{};a%2?Ny(Object(l),!0).forEach(function(i){RT(n,i,l[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(l)):Ny(Object(l)).forEach(function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(l,i))})}return n}function CT(){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 so(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,h=new Array(f),p=0;p<f;p++)h[p]=arguments[p];return a.apply(l,[].concat(s,h))}}}function vu(n){return{}.toString.call(n).includes("Object")}function OT(n){return!Object.keys(n).length}function yo(n){return typeof n=="function"}function AT(n,a){return Object.prototype.hasOwnProperty.call(n,a)}function NT(n,a){return vu(a)||er("changeType"),Object.keys(a).some(function(l){return!AT(n,l)})&&er("changeField"),a}function TT(n){yo(n)||er("selectorType")}function jT(n){yo(n)||vu(n)||er("handlerType"),vu(n)&&Object.values(n).some(function(a){return!yo(a)})&&er("handlersType")}function _T(n){n||er("initialIsRequired"),vu(n)||er("initialType"),OT(n)&&er("initialContent")}function MT(n,a){throw new Error(n[a]||n.default)}var DT={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"},er=so(MT)(DT),Js={changes:NT,selector:TT,handler:jT,initial:_T};function LT(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Js.initial(n),Js.handler(a);var l={current:n},i=so(UT)(l,a),s=so(kT)(l),u=so(Js.changes)(n),f=so(zT)(l);function h(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(g){return g};return Js.selector(m),m(l.current)}function p(m){CT(i,s,u,f)(m)}return[h,p]}function zT(n,a){return yo(a)?a(n.current):a}function kT(n,a){return n.current=Ty(Ty({},n.current),a),a}function UT(n,a,l){return yo(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 PT={create:LT},HT={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/vs"}};function BT(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,h=new Array(f),p=0;p<f;p++)h[p]=arguments[p];return a.apply(l,[].concat(s,h))}}}function $T(n){return{}.toString.call(n).includes("Object")}function VT(n){return n||jy("configIsRequired"),$T(n)||jy("configType"),n.urls?(qT(),{paths:{vs:n.urls.monacoBase}}):n}function qT(){console.warn(px.deprecation)}function YT(n,a){throw new Error(n[a]||n.default)}var px={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!
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=`
222
+ .powerline-module {
223
+ display: inline-flex;
224
+ align-items: center;
225
+ height: 28px;
226
+ position: relative;
227
+ padding: 0 8px;
228
+ overflow: visible;
229
+ }
230
+
231
+ .powerline-module-content {
232
+ display: flex;
233
+ align-items: center;
234
+ gap: 4px;
235
+ position: relative;
236
+ }
237
+
238
+ .powerline-separator {
239
+ width: 0;
240
+ height: 0;
241
+ border-top: 14px solid transparent;
242
+ border-bottom: 14px solid transparent;
243
+ border-left: 8px solid;
244
+ position: absolute;
245
+ right: -8px;
246
+ top: 0;
247
+ display: block;
248
+ }
249
+
250
+ /* 使用层级确保每个模块的三角形覆盖在下一个模块上方 */
251
+ .cursor-pointer:nth-child(1) .powerline-separator { z-index: 10; }
252
+ .cursor-pointer:nth-child(2) .powerline-separator { z-index: 9; }
253
+ .cursor-pointer:nth-child(3) .powerline-separator { z-index: 8; }
254
+ .cursor-pointer:nth-child(4) .powerline-separator { z-index: 7; }
255
+ .cursor-pointer:nth-child(5) .powerline-separator { z-index: 6; }
256
+ .cursor-pointer:nth-child(6) .powerline-separator { z-index: 5; }
257
+ .cursor-pointer:nth-child(7) .powerline-separator { z-index: 4; }
258
+ .cursor-pointer:nth-child(8) .powerline-separator { z-index: 3; }
259
+ .cursor-pointer:nth-child(9) .powerline-separator { z-index: 2; }
260
+ .cursor-pointer:nth-child(10) .powerline-separator { z-index: 1; }
261
+
262
+ .cursor-pointer:last-child .powerline-separator {
263
+ display: none;
264
+ }
265
+
266
+ /* 根据data属性动态设置颜色,确保与模块背景色一致 */
267
+ .powerline-separator[data-current-bg="bg_black"] { border-left-color: #000000; }
268
+ .powerline-separator[data-current-bg="bg_red"] { border-left-color: #dc2626; }
269
+ .powerline-separator[data-current-bg="bg_green"] { border-left-color: #16a34a; }
270
+ .powerline-separator[data-current-bg="bg_yellow"] { border-left-color: #eab308; }
271
+ .powerline-separator[data-current-bg="bg_blue"] { border-left-color: #3b82f6; }
272
+ .powerline-separator[data-current-bg="bg_magenta"] { border-left-color: #a855f7; }
273
+ .powerline-separator[data-current-bg="bg_cyan"] { border-left-color: #06b6d4; }
274
+ .powerline-separator[data-current-bg="bg_white"] { border-left-color: #ffffff; }
275
+ .powerline-separator[data-current-bg="bg_bright_black"] { border-left-color: #1f2937; }
276
+ .powerline-separator[data-current-bg="bg_bright_red"] { border-left-color: #f87171; }
277
+ .powerline-separator[data-current-bg="bg_bright_green"] { border-left-color: #4ade80; }
278
+ .powerline-separator[data-current-bg="bg_bright_yellow"] { border-left-color: #fde047; }
279
+ .powerline-separator[data-current-bg="bg_bright_blue"] { border-left-color: #93c5fd; }
280
+ .powerline-separator[data-current-bg="bg_bright_magenta"] { border-left-color: #c084fc; }
281
+ .powerline-separator[data-current-bg="bg_bright_cyan"] { border-left-color: #22d3ee; }
282
+ .powerline-separator[data-current-bg="bg_bright_white"] { border-left-color: #f3f4f6; }
283
+ .powerline-separator[data-current-bg="bg_bright_orange"] { border-left-color: #fb923c; }
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!
223
287
  You are using deprecated way of configuration.
224
288
 
225
289
  Instead of using
@@ -228,8 +292,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
228
292
  monaco.config({ paths: { vs: '...' } })
229
293
 
230
294
  For more please check the link https://github.com/suren-atoyan/monaco-loader#config
231
- `},jy=BT(YT)(px),KT={config:VT},GT=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 gx(n,a){return Object.keys(a).forEach(function(l){a[l]instanceof Object&&n[l]&&Object.assign(a[l],gx(n[l],a[l]))}),Oy(Oy({},n),a)}var FT={type:"cancelation",msg:"operation is manually canceled"};function md(n){var a=!1,l=new Promise(function(i,s){n.then(function(u){return a?s(FT):i(u)}),n.catch(s)});return l.cancel=function(){return a=!0},l}var XT=PT.create({config:HT,isInitialized:!1,resolve:null,reject:null,monaco:null}),vx=bT(XT,2),Ro=vx[0],ku=vx[1];function QT(n){var a=KT.config(n),l=a.monaco,i=yT(a,["monaco"]);ku(function(s){return{config:gx(s.config,i),monaco:l}})}function ZT(){var n=Ro(function(a){var l=a.monaco,i=a.isInitialized,s=a.resolve;return{monaco:l,isInitialized:i,resolve:s}});if(!n.isInitialized){if(ku({isInitialized:!0}),n.monaco)return n.resolve(n.monaco),md(pd);if(window.monaco&&window.monaco.editor)return yx(window.monaco),n.resolve(window.monaco),md(pd);GT(JT,WT)(ej)}return md(pd)}function JT(n){return document.body.appendChild(n)}function IT(n){var a=document.createElement("script");return n&&(a.src=n),a}function WT(n){var a=Ro(function(i){var s=i.config,u=i.reject;return{config:s,reject:u}}),l=IT("".concat(a.config.paths.vs,"/loader.js"));return l.onload=function(){return n()},l.onerror=a.reject,l}function ej(){var n=Ro(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){yx(l),n.resolve(l)},function(l){n.reject(l)})}function yx(n){Ro().monaco||ku({monaco:n})}function tj(){return Ro(function(n){var a=n.monaco;return a})}var pd=new Promise(function(n,a){return ku({resolve:n,reject:a})}),bx={config:QT,init:ZT,__getMonacoInstance:tj},nj={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},gd=nj,aj={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},rj=aj;function lj({children:n}){return Lr.createElement("div",{style:rj.container},n)}var ij=lj,oj=ij;function sj({width:n,height:a,isEditorReady:l,loading:i,_ref:s,className:u,wrapperProps:f}){return Lr.createElement("section",{style:{...gd.wrapper,width:n,height:a},...f},!l&&Lr.createElement(oj,null,i),Lr.createElement("div",{ref:s,style:{...gd.fullWidth,...!l&&gd.hide},className:u}))}var uj=sj,xx=v.memo(uj);function cj(n){v.useEffect(n,[])}var Sx=cj;function fj(n,a,l=!0){let i=v.useRef(!0);v.useEffect(i.current||!l?()=>{i.current=!1}:n,a)}var sn=fj;function co(){}function Bl(n,a,l,i){return dj(n,i)||hj(n,a,l,i)}function dj(n,a){return n.editor.getModel(wx(n,a))}function hj(n,a,l,i){return n.editor.createModel(a,l,i?wx(n,i):void 0)}function wx(n,a){return n.Uri.parse(a)}function mj({original:n,modified:a,language:l,originalLanguage:i,modifiedLanguage:s,originalModelPath:u,modifiedModelPath:f,keepCurrentOriginalModel:h=!1,keepCurrentModifiedModel:p=!1,theme:m="light",loading:g="Loading...",options:x={},height:S="100%",width:w="100%",className:C,wrapperProps:R={},beforeMount:j=co,onMount:O=co}){let[U,z]=v.useState(!1),[H,k]=v.useState(!0),A=v.useRef(null),Y=v.useRef(null),J=v.useRef(null),ae=v.useRef(O),ie=v.useRef(j),Re=v.useRef(!1);Sx(()=>{let de=bx.init();return de.then(M=>(Y.current=M)&&k(!1)).catch(M=>M?.type!=="cancelation"&&console.error("Monaco initialization: error:",M)),()=>A.current?fe():de.cancel()}),sn(()=>{if(A.current&&Y.current){let de=A.current.getOriginalEditor(),M=Bl(Y.current,n||"",i||l||"text",u||"");M!==de.getModel()&&de.setModel(M)}},[u],U),sn(()=>{if(A.current&&Y.current){let de=A.current.getModifiedEditor(),M=Bl(Y.current,a||"",s||l||"text",f||"");M!==de.getModel()&&de.setModel(M)}},[f],U),sn(()=>{let de=A.current.getModifiedEditor();de.getOption(Y.current.editor.EditorOption.readOnly)?de.setValue(a||""):a!==de.getValue()&&(de.executeEdits("",[{range:de.getModel().getFullModelRange(),text:a||"",forceMoveMarkers:!0}]),de.pushUndoStop())},[a],U),sn(()=>{A.current?.getModel()?.original.setValue(n||"")},[n],U),sn(()=>{let{original:de,modified:M}=A.current.getModel();Y.current.editor.setModelLanguage(de,i||l||"text"),Y.current.editor.setModelLanguage(M,s||l||"text")},[l,i,s],U),sn(()=>{Y.current?.editor.setTheme(m)},[m],U),sn(()=>{A.current?.updateOptions(x)},[x],U);let me=v.useCallback(()=>{if(!Y.current)return;ie.current(Y.current);let de=Bl(Y.current,n||"",i||l||"text",u||""),M=Bl(Y.current,a||"",s||l||"text",f||"");A.current?.setModel({original:de,modified:M})},[l,a,s,n,i,u,f]),oe=v.useCallback(()=>{!Re.current&&J.current&&(A.current=Y.current.editor.createDiffEditor(J.current,{automaticLayout:!0,...x}),me(),Y.current?.editor.setTheme(m),z(!0),Re.current=!0)},[x,m,me]);v.useEffect(()=>{U&&ae.current(A.current,Y.current)},[U]),v.useEffect(()=>{!H&&!U&&oe()},[H,U,oe]);function fe(){let de=A.current?.getModel();h||de?.original?.dispose(),p||de?.modified?.dispose(),A.current?.dispose()}return Lr.createElement(xx,{width:w,height:S,isEditorReady:U,loading:g,_ref:J,className:C,wrapperProps:R})}var pj=mj;v.memo(pj);function gj(n){let a=v.useRef();return v.useEffect(()=>{a.current=n},[n]),a.current}var vj=gj,Is=new Map;function yj({defaultValue:n,defaultLanguage:a,defaultPath:l,value:i,language:s,path:u,theme:f="light",line:h,loading:p="Loading...",options:m={},overrideServices:g={},saveViewState:x=!0,keepCurrentModel:S=!1,width:w="100%",height:C="100%",className:R,wrapperProps:j={},beforeMount:O=co,onMount:U=co,onChange:z,onValidate:H=co}){let[k,A]=v.useState(!1),[Y,J]=v.useState(!0),ae=v.useRef(null),ie=v.useRef(null),Re=v.useRef(null),me=v.useRef(U),oe=v.useRef(O),fe=v.useRef(),de=v.useRef(i),M=vj(u),Z=v.useRef(!1),$=v.useRef(!1);Sx(()=>{let K=bx.init();return K.then(L=>(ae.current=L)&&J(!1)).catch(L=>L?.type!=="cancelation"&&console.error("Monaco initialization: error:",L)),()=>ie.current?N():K.cancel()}),sn(()=>{let K=Bl(ae.current,n||i||"",a||s||"",u||l||"");K!==ie.current?.getModel()&&(x&&Is.set(M,ie.current?.saveViewState()),ie.current?.setModel(K),x&&ie.current?.restoreViewState(Is.get(u)))},[u],k),sn(()=>{ie.current?.updateOptions(m)},[m],k),sn(()=>{!ie.current||i===void 0||(ie.current.getOption(ae.current.editor.EditorOption.readOnly)?ie.current.setValue(i):i!==ie.current.getValue()&&($.current=!0,ie.current.executeEdits("",[{range:ie.current.getModel().getFullModelRange(),text:i,forceMoveMarkers:!0}]),ie.current.pushUndoStop(),$.current=!1))},[i],k),sn(()=>{let K=ie.current?.getModel();K&&s&&ae.current?.editor.setModelLanguage(K,s)},[s],k),sn(()=>{h!==void 0&&ie.current?.revealLine(h)},[h],k),sn(()=>{ae.current?.editor.setTheme(f)},[f],k);let ge=v.useCallback(()=>{if(!(!Re.current||!ae.current)&&!Z.current){oe.current(ae.current);let K=u||l,L=Bl(ae.current,i||n||"",a||s||"",K||"");ie.current=ae.current?.editor.create(Re.current,{model:L,automaticLayout:!0,...m},g),x&&ie.current.restoreViewState(Is.get(K)),ae.current.editor.setTheme(f),h!==void 0&&ie.current.revealLine(h),A(!0),Z.current=!0}},[n,a,l,i,s,u,m,g,x,f,h]);v.useEffect(()=>{k&&me.current(ie.current,ae.current)},[k]),v.useEffect(()=>{!Y&&!k&&ge()},[Y,k,ge]),de.current=i,v.useEffect(()=>{k&&z&&(fe.current?.dispose(),fe.current=ie.current?.onDidChangeModelContent(K=>{$.current||z(ie.current.getValue(),K)}))},[k,z]),v.useEffect(()=>{if(k){let K=ae.current.editor.onDidChangeMarkers(L=>{let G=ie.current.getModel()?.uri;if(G&&L.find(W=>W.path===G.path)){let W=ae.current.editor.getModelMarkers({resource:G});H?.(W)}});return()=>{K?.dispose()}}return()=>{}},[k,H]);function N(){fe.current?.dispose(),S?x&&Is.set(u,ie.current.saveViewState()):ie.current.getModel()?.dispose(),ie.current.dispose()}return Lr.createElement(xx,{width:w,height:C,isEditorReady:k,loading:p,_ref:Re,className:R,wrapperProps:j})}var bj=yj,xj=v.memo(bj),Sj=xj;function wj({open:n,onOpenChange:a,showToast:l}){const{t:i}=Yr(),{config:s}=ei(),[u,f]=v.useState(""),[h,p]=v.useState(!1),[m,g]=v.useState(!1),[x,S]=v.useState(!1),w=v.useRef(null);v.useEffect(()=>{s&&n&&f(JSON.stringify(s,null,2))},[s,n]),v.useEffect(()=>{if(n)g(!0),requestAnimationFrame(()=>{S(!0)});else{S(!1);const O=setTimeout(()=>{g(!1)},300);return()=>clearTimeout(O)}},[n]);const C=(O,U,z)=>{if(O&&typeof O=="object"&&"success"in O){const H=O;return H.success?(l&&l(H.message||U,"success"),!0):(l&&l(H.message||z,"error"),!1)}else return l&&l(U,"success"),!0},R=async()=>{if(u)try{p(!0);const O=JSON.parse(u),U=await Yt.updateConfig(O);C(U,i("app.config_saved_success"),i("app.config_saved_failed"))&&a(!1)}catch(O){console.error("Failed to save config:",O),l&&l(i("app.config_saved_failed")+": "+O.message,"error")}finally{p(!1)}},j=async()=>{if(u)try{p(!0);const O=JSON.parse(u),U=await Yt.updateConfig(O);if(C(U,i("app.config_saved_success"),i("app.config_saved_failed"))){const H=await Yt.restartService();C(H,i("app.config_saved_restart_success"),i("app.config_saved_restart_failed")),a(!1)}}catch(O){console.error("Failed to save config and restart:",O),l&&l(i("app.config_saved_restart_failed")+": "+O.message,"error")}finally{p(!1)}};return!m&&!n?null:y.jsxs(y.Fragment,{children:[(m||n)&&y.jsx("div",{className:`fixed inset-0 z-50 transition-all duration-300 ease-out ${x&&n?"bg-black/50 opacity-100":"bg-black/0 opacity-0 pointer-events-none"}`,onClick:()=>a(!1)}),y.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 ${x&&n?"translate-y-0":"translate-y-full"}`,style:{height:"100vh",maxHeight:"100vh"},children:[y.jsxs("div",{className:"flex items-center justify-between border-b p-4",children:[y.jsx("h2",{className:"text-lg font-semibold",children:i("json_editor.title")}),y.jsxs("div",{className:"flex gap-2",children:[y.jsxs(He,{variant:"outline",size:"sm",onClick:()=>a(!1),disabled:h,children:[y.jsx(ql,{className:"h-4 w-4 mr-2"}),i("json_editor.cancel")]}),y.jsxs(He,{variant:"outline",size:"sm",onClick:R,disabled:h,children:[y.jsx(X0,{className:"h-4 w-4 mr-2"}),i(h?"json_editor.saving":"json_editor.save")]}),y.jsxs(He,{variant:"default",size:"sm",onClick:j,disabled:h,children:[y.jsx(F0,{className:"h-4 w-4 mr-2"}),i(h?"json_editor.saving":"json_editor.save_and_restart")]})]})]}),y.jsx("div",{className:"flex-1 min-h-0 bg-gray-50",children:y.jsx(Sj,{height:"100%",defaultLanguage:"json",value:u,onChange:O=>f(O||""),theme:"vs",options:{minimap:{enabled:!0},fontSize:14,scrollBeyondLastLine:!1,automaticLayout:!0,wordWrap:"on",formatOnPaste:!0,formatOnType:!0,suggest:{showKeywords:!0,showSnippets:!0}}})})]})]})}function Ej({message:n,type:a,onClose:l}){v.useEffect(()=>{const u=setTimeout(()=>{l()},3e3);return()=>clearTimeout(u)},[l]);const i=()=>{switch(a){case"success":return y.jsx(Y2,{className:"h-5 w-5 text-green-500"});case"error":return y.jsx(G2,{className:"h-5 w-5 text-red-500"});case"warning":return y.jsx(B2,{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 y.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:[y.jsxs("div",{className:"flex items-center space-x-2",children:[i(),y.jsx("span",{className:"text-sm font-medium",children:n})]}),y.jsx("button",{onClick:l,className:"ml-4 text-gray-500 hover:text-gray-700 focus:outline-none",children:y.jsx(ql,{className:"h-4 w-4"})})]})}function Rj(){const{t:n,i18n:a}=Yr(),l=wu(),{config:i,error:s}=ei(),[u,f]=v.useState(!1),[h,p]=v.useState(!1),[m,g]=v.useState(!0),[x,S]=v.useState(null),[w,C]=v.useState(!1),[R,j]=v.useState(!1),[O,U]=v.useState(null),[z,H]=v.useState(!1),[k,A]=v.useState(!1),Y=v.useRef(!1),J=async()=>{if(!i){S({message:n("app.config_missing"),type:"error"});return}try{const me=await Yt.updateConfig(i);if(console.log("Config saved successfully"),me&&typeof me=="object"&&"success"in me){const oe=me;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(me){console.error("Failed to save config:",me),S({message:n("app.config_saved_failed")+": "+me.message,type:"error"})}},ae=async()=>{if(!i){S({message:n("app.config_missing"),type:"error"});return}try{const me=await Yt.updateConfig(i);let oe=!0;if(me&&typeof me=="object"&&"success"in me){const fe=me;fe.success||(oe=!1,S({message:fe.message||n("app.config_saved_failed"),type:"error"}))}if(oe){const fe=await Yt.restartService();if(console.log("Config saved and service restarted successfully"),fe&&typeof fe=="object"&&"success"in fe){const de=fe;de.success&&S({message:de.message||n("app.config_saved_restart_success"),type:"success"})}else S({message:n("app.config_saved_restart_success"),type:"success"})}}catch(me){console.error("Failed to save config and restart:",me),S({message:n("app.config_saved_restart_failed")+": "+me.message,type:"error"})}},ie=v.useCallback(async(me=!0)=>{if(k&&w){me&&j(!0);return}H(!0);try{const oe=await Yt.checkForUpdates();oe.hasUpdate&&oe.latestVersion&&oe.changelog?(C(!0),U({version:oe.latestVersion,changelog:oe.changelog}),me&&j(!0)):me&&S({message:n("app.no_updates_available"),type:"success"}),A(!0)}catch(oe){console.error("Failed to check for updates:",oe),me&&S({message:n("app.update_check_failed")+": "+oe.message,type:"error"})}finally{H(!1)}},[k,w,n]);v.useEffect(()=>{(async()=>{if(i){g(!1),!k&&!Y.current&&(Y.current=!0,ie(!1));return}if(!localStorage.getItem("apiKey")){g(!1);return}try{await Yt.getConfig()}catch(de){console.error("Error checking auth:",de),de.message==="Unauthorized"&&l("/login")}finally{g(!1),!k&&!Y.current&&(Y.current=!0,ie(!1))}})();const oe=()=>{l("/login")};return window.addEventListener("unauthorized",oe),()=>{window.removeEventListener("unauthorized",oe)}},[i,l,k,ie]);const Re=async()=>{if(O)try{const me=await Yt.performUpdate();me.success?(S({message:n("app.update_successful"),type:"success"}),C(!1),j(!1),A(!1)):S({message:n("app.update_failed")+": "+me.message,type:"error"})}catch(me){console.error("Failed to perform update:",me),S({message:n("app.update_failed")+": "+me.message,type:"error"})}};return m?y.jsx("div",{className:"h-screen bg-gray-50 font-sans flex items-center justify-center",children:y.jsx("div",{className:"text-gray-500",children:"Loading application..."})}):s?y.jsx("div",{className:"h-screen bg-gray-50 font-sans flex items-center justify-center",children:y.jsxs("div",{className:"text-red-500",children:["Error: ",s.message]})}):i?y.jsxs("div",{className:"h-screen bg-gray-50 font-sans",children:[y.jsxs("header",{className:"flex h-16 items-center justify-between border-b bg-white px-6",children:[y.jsx("h1",{className:"text-xl font-semibold text-gray-800",children:n("app.title")}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(He,{variant:"ghost",size:"icon",onClick:()=>f(!0),className:"transition-all-ease hover:scale-110",children:y.jsx(sO,{className:"h-5 w-5"})}),y.jsx(He,{variant:"ghost",size:"icon",onClick:()=>p(!0),className:"transition-all-ease hover:scale-110",children:y.jsx(I2,{className:"h-5 w-5"})}),y.jsxs(gh,{children:[y.jsx(vh,{asChild:!0,children:y.jsx(He,{variant:"ghost",size:"icon",className:"transition-all-ease hover:scale-110",children:y.jsx(eO,{className:"h-5 w-5"})})}),y.jsx(yh,{className:"w-32 p-2",children:y.jsxs("div",{className:"space-y-1",children:[y.jsx(He,{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"}),y.jsx(He,{variant:a.language.startsWith("zh")?"default":"ghost",className:"w-full justify-start transition-all-ease hover:scale-[1.02]",onClick:()=>a.changeLanguage("zh"),children:"中文"})]})})]}),y.jsxs(He,{variant:"ghost",size:"icon",onClick:()=>ie(!0),disabled:z,className:"transition-all-ease hover:scale-110 relative",children:[y.jsxs("div",{className:"relative",children:[y.jsx(V2,{className:"h-5 w-5"}),w&&!z&&y.jsx("div",{className:"absolute -top-1 -right-1 w-3 h-3 bg-red-500 rounded-full border-2 border-white"})]}),z&&y.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:y.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent"})})]}),y.jsxs(He,{onClick:J,variant:"outline",className:"transition-all-ease hover:scale-[1.02] active:scale-[0.98]",children:[y.jsx(X0,{className:"mr-2 h-4 w-4"}),n("app.save")]}),y.jsxs(He,{onClick:ae,className:"transition-all-ease hover:scale-[1.02] active:scale-[0.98]",children:[y.jsx(F0,{className:"mr-2 h-4 w-4"}),n("app.save_and_restart")]})]})]}),y.jsxs("main",{className:"flex h-[calc(100vh-4rem)] gap-4 p-4",children:[y.jsx("div",{className:"w-3/5",children:y.jsx(mT,{})}),y.jsxs("div",{className:"flex w-2/5 flex-col gap-4",children:[y.jsx("div",{className:"h-3/5",children:y.jsx(pT,{})}),y.jsx("div",{className:"flex-1",children:y.jsx(lA,{})})]})]}),y.jsx(aA,{isOpen:u,onOpenChange:f}),y.jsx(wj,{open:h,onOpenChange:p,showToast:(me,oe)=>S({message:me,type:oe})}),y.jsx(Gl,{open:R,onOpenChange:j,children:y.jsxs(Hr,{className:"max-w-2xl",children:[y.jsxs(Br,{children:[y.jsxs($r,{children:[n("app.new_version_available"),O&&y.jsxs("span",{className:"ml-2 text-sm font-normal text-muted-foreground",children:["v",O.version]})]}),y.jsx(Tu,{children:n("app.update_description")})]}),y.jsx("div",{className:"max-h-96 overflow-y-auto py-4",children:O?.changelog?y.jsx("div",{className:"whitespace-pre-wrap text-sm",children:O.changelog}):y.jsx("div",{className:"text-muted-foreground",children:n("app.no_changelog_available")})}),y.jsxs(Fl,{children:[y.jsx(He,{variant:"outline",onClick:()=>j(!1),children:n("app.later")}),y.jsx(He,{onClick:Re,children:n("app.update_now")})]})]})}),x&&y.jsx(Ej,{message:x.message,type:x.type,onClose:()=>S(null)})]}):y.jsx("div",{className:"h-screen bg-gray-50 font-sans flex items-center justify-center",children:y.jsx("div",{className:"text-gray-500",children:"Loading configuration..."})})}function Cj(){const{t:n}=Yr(),a=wu(),[l,i]=v.useState(""),[s,u]=v.useState(""),[f,h]=v.useState(!1);v.useEffect(()=>{(async()=>{if(localStorage.getItem("apiKey")){h(!0);try{await Yt.getConfig(),a("/dashboard")}catch{localStorage.removeItem("apiKey")}finally{h(!1)}}})();const g=()=>{a("/login")};return window.addEventListener("unauthorized",g),()=>{window.removeEventListener("unauthorized",g)}},[a]);const p=async m=>{m.preventDefault();try{Yt.setApiKey(l),window.dispatchEvent(new StorageEvent("storage",{key:"apiKey",newValue:l,url:window.location.href})),await Yt.getConfig(),a("/dashboard")}catch(g){Yt.setApiKey(""),g.message&&g.message.includes("401")?u(n("login.invalidApiKey")):a("/dashboard")}};return f?y.jsx("div",{className:"flex min-h-screen items-center justify-center bg-gray-50",children:y.jsxs(va,{className:"w-full max-w-md",children:[y.jsx(ya,{className:"space-y-1",children:y.jsx(ba,{className:"text-2xl",children:n("login.title")})}),y.jsxs(xa,{children:[y.jsx("div",{className:"flex justify-center py-8",children:y.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent"})}),y.jsx("p",{className:"text-center text-sm text-gray-500",children:n("login.validating")})]})]})}):y.jsx("div",{className:"flex min-h-screen items-center justify-center bg-gray-50",children:y.jsxs(va,{className:"w-full max-w-md",children:[y.jsxs(ya,{className:"space-y-1",children:[y.jsx(ba,{className:"text-2xl",children:n("login.title")}),y.jsx(bb,{children:n("login.description")})]}),y.jsxs("form",{onSubmit:p,children:[y.jsxs(xa,{className:"space-y-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(ct,{htmlFor:"apiKey",children:n("login.apiKey")}),y.jsx(Rt,{id:"apiKey",type:"password",value:l,onChange:m=>i(m.target.value),placeholder:n("login.apiKeyPlaceholder")})]}),s&&y.jsx("div",{className:"text-sm text-red-500",children:s})]}),y.jsx(xb,{children:y.jsx(He,{className:"w-full",type:"submit",children:n("login.signIn")})})]})]})})}const Oj=({children:n})=>n,Aj=({children:n})=>n,Nj=gR([{path:"/",element:y.jsx(SR,{to:"/dashboard",replace:!0})},{path:"/login",element:y.jsx(Aj,{children:y.jsx(Cj,{})})},{path:"/dashboard",element:y.jsx(Oj,{children:y.jsx(Rj,{})})}],{initialEntries:["/dashboard"]});Zw.createRoot(document.getElementById("root")).render(y.jsx(v.StrictMode,{children:y.jsx(nA,{children:y.jsx(tC,{router:Nj})})}));</script>
232
- <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-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-500:oklch(63.7% .237 25.331);--color-yellow-100:oklch(97.3% .071 103.193);--color-yellow-200:oklch(94.5% .129 101.54);--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-500:oklch(72.3% .219 149.579);--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;--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}.-mx-1{margin-inline:calc(var(--spacing)*-1)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-auto{margin-top:auto}.mr-2{margin-right:calc(var(--spacing)*2)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-2{margin-left:calc(var(--spacing)*2)}.ml-4{margin-left:calc(var(--spacing)*4)}.ml-auto{margin-left:auto}.block{display:block}.flex{display:flex}.grid{display:grid}.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-\[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-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-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.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-pointer{cursor:pointer}.scroll-py-1{scroll-padding-block:calc(var(--spacing)*1)}.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-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-4{gap:calc(var(--spacing)*4)}: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-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)))}.overflow-hidden{overflow:hidden}.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-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-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-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\/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-border{background-color:var(--border)}.bg-card{background-color:var(--card)}.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-green-100{background-color:var(--color-green-100)}.bg-popover{background-color:var(--popover)}.bg-primary{background-color:var(--primary)}.bg-red-100{background-color:var(--color-red-100)}.bg-red-500{background-color:var(--color-red-500)}.bg-secondary{background-color:var(--secondary)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-yellow-100{background-color:var(--color-yellow-100)}.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-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-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)}.pr-10{padding-right:calc(var(--spacing)*10)}.pl-4{padding-left:calc(var(--spacing)*4)}.text-center{text-align:center}.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-card-foreground{color:var(--card-foreground)}.text-current{color:currentColor}.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-500{color:var(--color-green-500)}.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-red-500{color:var(--color-red-500)}.text-secondary-foreground{color:var(--secondary-foreground)}.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-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\/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\: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\:max-w-2xl{max-width:var(--container-2xl)}.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\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}.\[\&_\[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>
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>
233
297
  </head>
234
298
  <body>
235
299
  <div id="root"></div>