tempest.games 0.1.26 → 0.1.27

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.
@@ -0,0 +1,55 @@
1
+ var Kv=Object.defineProperty;var Yv=(l,n,i)=>n in l?Kv(l,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):l[n]=i;var U=(l,n,i)=>Yv(l,typeof n!="symbol"?n+"":n,i);(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))u(c);new MutationObserver(c=>{for(const f of c)if(f.type==="childList")for(const d of f.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&u(d)}).observe(document,{childList:!0,subtree:!0});function i(c){const f={};return c.integrity&&(f.integrity=c.integrity),c.referrerPolicy&&(f.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?f.credentials="include":c.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function u(c){if(c.ep)return;c.ep=!0;const f=i(c);fetch(c.href,f)}})();var co={exports:{}},Xl={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var em;function $v(){if(em)return Xl;em=1;var l=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function i(u,c,f){var d=null;if(f!==void 0&&(d=""+f),c.key!==void 0&&(d=""+c.key),"key"in c){f={};for(var m in c)m!=="key"&&(f[m]=c[m])}else f=c;return c=f.ref,{$$typeof:l,type:u,key:d,ref:c!==void 0?c:null,props:f}}return Xl.Fragment=n,Xl.jsx=i,Xl.jsxs=i,Xl}var tm;function Gv(){return tm||(tm=1,co.exports=$v()),co.exports}var Z=Gv();function Yo(l=Math.random){return l().toString(36).slice(2)}class Eo extends Promise{constructor(i){let u,c;super((f,d)=>{u=f,c=d});U(this,"fate");U(this,"resolve");U(this,"reject");U(this,"done",!1);this.resolve=u,this.reject=c,this.use(i instanceof Promise?i:new Promise(i))}pass(i,u){i===this.fate&&(this.resolve(u),this.done=!0)}fail(i,u){i===this.fate&&(this.reject(u),this.done=!0)}use(i){if(i instanceof Promise){const u=i;this.fate=u,u.then(c=>{this.pass(u,c)},c=>{this.fail(u,c)})}else this.resolve(i),this.fate=void 0}}function Em(l){return Object.entries(l)}const Xv=(l,n,i=st.STORE)=>zm(i,{key:`${l.key}:JSON`,get:({get:u})=>n.toJson(u(l)),set:({set:u},c)=>{u(l,n.fromJson(c))}});function ee(l){for(;l.child!==null;)l=l.child;return l}function Qv(l){for(;l.parent!==null;)l=l.parent;return l}class $e{constructor(){U(this,"Subscriber");U(this,"subscribers",new Map)}subscribe(n,i){return this.subscribers.set(n,i),()=>{this.unsubscribe(n)}}unsubscribe(n){this.subscribers.delete(n)}next(n){const i=this.subscribers.values();for(const u of i)u(n)}}class Jv extends $e{constructor(i){super();U(this,"state");this.state=i}next(i){this.state=i,super.next(i)}}function $o(l,n,i){const u={key:n.key,type:"atom_family"},c=l.families.get(n.key);c&&l.logger.error("❗","atom_family",n.key,`Overwriting an existing ${Vi(c)} "${c.key}" in store "${l.config.name}". You can safely ignore this warning if it is due to hot module replacement.`);const f=new $e,m=Object.assign(p=>{const y=De(p),b={key:n.key,subKey:y},O=`${n.key}(${y})`,k=ee(l),C=n.default,te={key:O,default:C instanceof Function?C(p):C};n.effects&&(te.effects=n.effects(p));const L=Ju(k,te,b);return f.next({type:"state_creation",token:L}),L},u,{subject:f,install:p=>$o(p,n),internalRoles:i});return l.families.set(n.key,m),l.defaults.set(n.key,n.default),u}function Bi(l,n,i){const u={key:n.key,type:"readonly_selector_family"},c=l.families.get(n.key);c&&l.logger.error("❗","readonly_selector_family",n.key,`Overwriting an existing ${Vi(c)} "${c.key}" in store "${l.config.name}". You can safely ignore this warning if it is due to hot module replacement.`);const f=new $e,m=Object.assign(p=>{const y=De(p),b={key:n.key,subKey:y},O=`${n.key}(${y})`,k=ee(l),C=Po(k,{key:O,get:n.get(p)},b);return f.next({type:"state_creation",token:C}),C},u,{internalRoles:i,subject:f,install:p=>Bi(p,n),default:p=>n.get(p)({get:(...b)=>wt(l,...b),find:(b,O)=>At(l,b,O),seek:(b,O)=>Et(l,b,O),json:b=>Sa(l,b)})});return l.families.set(n.key,m),u}function Fv(l,n){return"set"in n?tf(l,n):Bi(l,n)}class Go{constructor(n){U(this,"_buffer");U(this,"_index",0);let i;typeof n=="number"?i=n:i=n.length,this._buffer=Array.from({length:i})}get buffer(){return this._buffer}get index(){return this._index}add(n){this._buffer[this._index]=n,this._index=(this._index+1)%this._buffer.length}copy(){const n=new Go([...this._buffer]);return n._index=this._index,n}}const Wv={atom_family:"atom",mutable_atom_family:"mutable_atom",selector_family:"selector",readonly_selector_family:"readonly_selector",molecule_family:"molecule"};function Xo(l,n){const i=De(n),u=`${l.key}(${i})`,c=Wv[l.type],f={key:u,type:c};return c==="molecule"?Object.assign(f,{key:n,family:l}):Object.assign(f,{family:{key:l.key,subKey:i}}),Object.assign(f,{counterfeit:!0}),f}function Ga(l){const n={key:l.key,type:l.type};return"family"in l&&(n.family=l.family),n}function Am(l,n,i){const u=De(i);try{const c=[];let f;if(n==="root")c.push(l.molecules.get('"root"')),f="all";else if(typeof n=="string"&&n.startsWith(Iv)){f="any";const b=De(n),O=l.molecules.get(b);if(!O)throw new Error(`Molecule ${b} not found in store "${l.config.name}"`);c.push(O)}else if(i.startsWith("T$--")){f="all";for(const O of n){const k=De(O),C=l.molecules.get(k);if(!C)throw new Error(`Molecule ${k} not found in store "${l.config.name}"`);c.push(C)}}else{f="any";const O=De(n),k=l.molecules.get(O);if(!k)throw new Error(`Molecule ${O} not found in store "${l.config.name}"`);c.push(k)}const d=new Oo(c,i);d._dependsOn=f,l.molecules.set(u,d);for(const b of c)b.below.set(d.stringKey,d);const m={type:"molecule_creation",subType:"modern",key:d.key,provenance:n},p=ee(l);ft(p)&&p.transactionMeta.phase==="building"?p.transactionMeta.update.updates.push(m):p.on.moleculeCreationStart.next(m)}catch(c){c instanceof Error&&l.logger.error("❌","molecule",u,"allocation failed:",c.message)}return i}function qu(l,n){const i=De(n),u=l.molecules.get(i);if(!u)throw new Error(`Molecule ${i} not found in store "${l.config.name}"`);for(const y of u.joins.values())y.relations.delete(u.key),y.molecules.delete(u.stringKey);let c;u.above.size===1?c=u.above.values().next().value.key:c=[...u.above.values()].map(({key:y})=>y);const f=[];for(const y of u.tokens.values()){const b=y.family;f.push([b.key,l.valueMap.get(y.key)])}for(const y of u.tokens.values())Yn(l,y);for(const y of u.below.values())y.dependsOn==="all"?qu(l,y.key):(y.above.delete(u.stringKey),y.above.size===0&&qu(l,y.key));u.below.clear();const d={type:"molecule_disposal",subType:"modern",key:u.key,values:f,provenance:c},m=ee(l);ft(m)&&m.transactionMeta.phase==="building"?m.transactionMeta.update.updates.push(d):m.on.moleculeDisposal.next(d),m.molecules.delete(u.stringKey);for(const y of u.above.values())y.below.delete(u.stringKey)}const Iv="T$";function Zt(l){return Gb(st.STORE,l)}function Ao(...l){return l.length===2?wt(st.STORE,...l):wt(st.STORE,...l)}const oo=l=>(n,i,u,c,...f)=>{console[l](`${n} ${i} "${u}" ${c}`,...f)},Pv={error:oo("error"),info:oo("info"),warn:oo("warn")};class eb{constructor(n,i,u=Pv){U(this,"error",(...n)=>{var i;(((i=this.filter)==null?void 0:i.call(this,...n))??!0)&&this.logLevel!==null&&this.logger.error(...n)});U(this,"info",(...n)=>{var i;(((i=this.filter)==null?void 0:i.call(this,...n))??!0)&&this.logLevel==="info"&&this.logger.info(...n)});U(this,"warn",(...n)=>{var i;(((i=this.filter)==null?void 0:i.call(this,...n))??!0)&&this.logLevel!=="error"&&this.logLevel!==null&&this.logger.warn(...n)});this.logLevel=n,this.filter=i,this.logger=u}}function Pa(l){return zm(st.STORE,l)}function tb(l){return Fv(st.STORE,l)}function Qo(...l){l.length===2?We(st.STORE,...l):We(st.STORE,...l)}function nb(l){return Nm(l,st.STORE)}function ab(l,n=Yo()){return Xu(l,n,st.STORE)}class Ln{constructor(n,i){U(this,"a");U(this,"b");U(this,"cardinality");U(this,"relations",new Map);U(this,"contents",new Map);U(this,"isAType");U(this,"isBType");U(this,"isContent");U(this,"makeContentKey",(n,i)=>`${n}:${i}`);U(this,"warn");var u,c;if(this.a=n.between[0],this.b=n.between[1],this.cardinality=n.cardinality,i!=null&&i.externalStore||(this.relations=new Map((u=n.relations)==null?void 0:u.map(([f,d])=>[f,new Set(d)])),this.contents=new Map(n.contents)),this.isAType=(i==null?void 0:i.isAType)??null,this.isBType=(i==null?void 0:i.isBType)??null,this.isContent=(i==null?void 0:i.isContent)??null,i!=null&&i.makeContentKey&&(this.makeContentKey=i.makeContentKey),i!=null&&i.externalStore){const f=i.externalStore;this.has=(d,m)=>f.has(d,m),this.addRelation=(d,m)=>{f.addRelation(d,m)},this.deleteRelation=(d,m)=>{f.deleteRelation(d,m)},this.replaceRelationsSafely=(d,m)=>{f.replaceRelationsSafely(d,m)},this.replaceRelationsUnsafely=(d,m)=>{f.replaceRelationsUnsafely(d,m)},this.getRelatedKeys=d=>f.getRelatedKeys(d),f.getContent&&(this.getContentInternal=d=>f.getContent(d),this.setContent=(d,m)=>{f.setContent(d,m)},this.deleteContent=d=>{f.deleteContent(d)});for(const[d,m]of n.relations??[]){let p=(c=this.isAType)!=null&&c.call(this,d)?d:void 0,y=p===void 0?d:void 0;for(const b of m)p??(p=b),y??(y=b),this.addRelation(p,y)}for(const[d,m]of n.contents??[])this.setContent(d,m)}i!=null&&i.warn&&(this.warn=i.warn)}getRelatedKeys(n){return this.relations.get(n)}addRelation(n,i){let u=this.relations.get(n),c=this.relations.get(i);u?u.add(i):(u=new Set([i]),this.relations.set(n,u)),c?c.add(n):(c=new Set([n]),this.relations.set(i,c))}deleteRelation(n,i){const u=this.relations.get(n);if(u){u.delete(i),u.size===0&&this.relations.delete(n);const c=this.relations.get(i);c&&(c.delete(n),c.size===0&&this.relations.delete(i))}}replaceRelationsUnsafely(n,i){this.relations.set(n,new Set(i));for(const u of i){const c=new Set().add(n);this.relations.set(u,c)}}replaceRelationsSafely(n,i){var d;const u=this.relations.get(n);let c=(d=this.isAType)!=null&&d.call(this,n)?n:void 0,f=c===void 0?n:void 0;if(u)for(const m of u){c??(c=m),f??(f=m);const p=this.relations.get(m);p&&(p.size===1?this.relations.delete(m):p.delete(n),this.contents.delete(this.makeContentKey(c,f)))}this.relations.set(n,new Set(i));for(const m of i){let p=this.relations.get(m);p?p.add(n):(p=new Set().add(n),this.relations.set(m,p))}}getContentInternal(n){return this.contents.get(n)}setContent(n,i){this.contents.set(n,i)}deleteContent(n){this.contents.delete(n)}toJSON(){return{between:[this.a,this.b],cardinality:this.cardinality,relations:[...this.relations.entries()].map(([n,i])=>[n,[...i]]),contents:[...this.contents.entries()]}}set(n,...i){const u=typeof i[0]=="string"?i[0]:n[this.b],c=i[1]??typeof i[0]=="string"?void 0:i[0];switch(n=typeof n=="string"?n:n[this.a],this.cardinality){case"1:1":{const f=this.getRelatedKey(n);f&&f!==u&&this.delete(n,f)}case"1:n":{const f=this.getRelatedKey(u);f&&f!==n&&this.delete(f,u)}}if(c){const f=this.makeContentKey(n,u);this.setContent(f,c)}return this.addRelation(n,u),this}delete(n,i){i=typeof i=="string"?i:n[this.b];const u=typeof n=="string"?n:n[this.a];if(u===void 0&&typeof i=="string"){const c=this.getRelatedKeys(i);if(c)for(const f of c)this.delete(f,i)}if(typeof u=="string"&&i===void 0){const c=this.getRelatedKeys(u);if(c)for(const f of c)this.delete(u,f)}if(typeof u=="string"&&typeof i=="string"){this.deleteRelation(u,i);const c=this.makeContentKey(u,i);this.deleteContent(c)}return this}getRelatedKey(n){var u;const i=this.getRelatedKeys(n);if(i){i.size>1&&((u=this.warn)==null||u.call(this,`${i.size} related keys were found for key "${n}": (${[...i].map(f=>`"${f}"`).join(", ")}). Only one related key was expected.`));let c;for(const f of i){c=f;break}return c}}replaceRelations(n,i,u){const c=!Array.isArray(i),f=c?Object.keys(i):i;if(u!=null&&u.reckless?this.replaceRelationsUnsafely(n,f):this.replaceRelationsSafely(n,f),c)for(const d of f){const m=this.makeContentKey(n,d),p=i[d];this.setContent(m,p)}return this}getContent(n,i){const u=this.makeContentKey(n,i);return this.getContentInternal(u)}getRelationEntries(n){const i=n[this.a],u=n[this.b];if(i!==void 0&&u===void 0){const c=this.getRelatedKeys(i);if(c)return[...c].map(f=>[f,this.getContent(i,f)])}if(i===void 0&&u!==void 0){const c=this.getRelatedKeys(u);if(c)return[...c].map(f=>[f,this.getContent(f,u)])}return[]}has(n,i){if(i){const u=this.getRelatedKeys(n);return(u==null?void 0:u.has(i))??!1}return this.relations.has(n)}}function Pt(l){return"epoch"in l.transactionMeta}function ft(l){return"phase"in l.transactionMeta}const ib=l=>{const n=ee(l);if(!ft(n)){l.logger.warn("🐞","transaction","???","abortTransaction called outside of a transaction. This is probably a bug in AtomIO.");return}l.logger.info("🪂","transaction",n.transactionMeta.update.key,"Aborting transaction"),n.parent.child=null},lb=l=>l[0].toUpperCase()+l.slice(1);function Vi(l){return l.type.split("_").map(lb).join(" ")}class pa extends Error{constructor(...n){const i=n[0],u=n.length===2?n[1]:n[2];if(n.length===2)super(`${Vi(i)} ${De(i.key)} not found in store "${u.config.name}".`);else{const c=n[1];super(`${Vi(i)} "${i.key}" member ${De(c)} not found in store "${u.config.name}".`)}}}function Xu(l,n,i){return(...u)=>{const c=Ce(l,i);if(c)return c.run(u,n);throw new pa(l,i)}}const wm=l=>n=>l instanceof Function?l(n):l,Qu=(l,n)=>{if(n.valueMap.has(l.key))return n.logger.info("📖",l.type,l.key,"reading cached value"),Lb(l,n);if(l.type==="selector"||l.type==="readonly_selector")return n.logger.info("🧮",l.type,l.key,"computing value"),l.get();const i=l.default instanceof Function?l.default():l.default;return n.logger.info("💁","atom",l.key,"could not find cached value; using default",i),l.default instanceof Function?l.default():l.default},sb=(l,n)=>{if(l.operation.open){const i=performance.now();return l.logger.info("❗",n.type,n.key,`deferring setState at T-${i} until setState for "${l.operation.token.key}" is done`),i}l.operation={open:!0,done:new Set,prev:new Map,time:Date.now(),token:n},l.logger.info("⭕",n.type,n.key,`operation start in store "${l.config.name}"${ft(l)?` ${l.transactionMeta.phase} "${l.transactionMeta.update.key}"`:""}`)},ub=l=>{l.operation.open&&l.logger.info("🔴",l.operation.token.type,l.operation.token.key,`operation done in store "${l.config.name}"`),l.operation={open:!1},l.on.operationClose.next(l.operation)},rb=(l,n)=>l.operation.open?l.operation.done.has(n):(l.logger.error("🐞","unknown",n,"isDone called outside of an operation. This is probably a bug in AtomIO."),!0),Jo=(l,n)=>{if(!l.operation.open){l.logger.error("🐞","unknown",n,"markDone called outside of an operation. This is probably a bug in AtomIO.");return}l.operation.done.add(n)},cb=(l,n,i)=>{switch(l.type){case"mutable_atom":i.logger.info("📢",l.type,l.key,"is now (",n.newValue,") subscribers:",l.subject.subscribers);break;default:i.logger.info("📢",l.type,l.key,"went (",n.oldValue,"->",n.newValue,") subscribers:",l.subject.subscribers)}l.subject.next(n)},nm=(l,n)=>{const i=ee(n),u=i.selectorAtoms.getRelatedKeys(l.key);if(i.logger.info("🧹",l.type,l.key,u?`evicting ${u.size} states downstream:`:"no downstream states",u??"to evict"),u){i.operation.open&&i.logger.info("🧹",l.type,l.key,`[ ${[...i.operation.done].join(", ")} ] already done`);for(const c of u)rb(i,c)||(Kb(c,i),Jo(i,c))}};function ob(l,n){return!(Vb(n.newValue)||l.includes("🔍"))}const fb=(l,n,i)=>{const{key:u}=l,c=ee(i);if(!ft(c)||c.transactionMeta.phase!=="building"){i.logger.error("🐞","atom",u,"stowUpdate called outside of a transaction. This is probably a bug.");return}if(!ob(u,n))return;const d={type:"atom_update",key:u,...n};l.family&&(d.family=l.family),c.transactionMeta.update.updates.push(d),i.logger.info("📁","atom",u,"stowed (",n.oldValue,"->",n.newValue,")")},db=(l,n,i)=>{const u=Qu(l,i);let c=u;if(l.type==="mutable_atom"&&ft(i)){const{parent:d}=i;c=Mo(l,d,i)}c=wm(n)(c),i.logger.info("📝","atom",l.key,"set to",c),c=Ja(l.key,c,l.subject,i),Yb(l.key,i)&&$b(l.key,i),Jo(i,l.key),nm(l,i);const f={oldValue:u,newValue:c};if(Pt(i))cb(l,f,i);else if(i.parent){if(i.on.transactionApplying.state===null)fb(l,f,i);else if(l.key.startsWith("*")){const d=l.key.slice(1),m=i.atoms.get(d);let p=i.valueMap.get(d);if(m.type==="mutable_atom"&&ft(i)){const{parent:b}=i;p=Mo(m,b,i)}p.do(f.newValue)===null&&nm(m,i)}}},Om=(l,n,i)=>{switch(l.type){case"atom":case"mutable_atom":db(l,n,i);break;case"selector":l.set(n);break}};function Rm(l,n){if(n.family){const i=l.families.get(n.family.key);if(i)return i}}function We(l,...n){let i,u,c,f;if(n.length===2?(i=n[0],f=n[1],u=Rm(l,i)??null,u&&(c=i.family?Qa(i.family.subKey):null,i=At(l,u,c))):(u=n[0],c=n[1],f=n[2],i=At(l,u,c)),"counterfeit"in i){const p=l.disposalTraces.buffer.find(y=>(y==null?void 0:y.key)===i.key);l.logger.error("❌",i.type,i.key,`could not be set because it was not found in the store "${l.config.name}".`,p?`This state was previously disposed:
10
+ ${p.trace}`:"No previous disposal trace was found.");return}const d=sb(l,i);if(d){const p=l.on.operationClose.subscribe(`waiting to set "${i.key}" at T-${d}`,()=>{p(),l.logger.info("🟢",i.type,i.key,`resuming deferred setState from T-${d}`),We(l,i,f)});return}const m=Ce(i,l);Om(m,f,l),ub(l)}function hb(l,n,i){const{key:u,newValue:c,oldValue:f}=n,d=l==="newValue"?c:f,m={key:u,type:"atom"};n.family&&Object.assign(m,{family:n.family}),We(i,m,d)}function yb(l,n){const i=new $e,u={type:"molecule_family",key:n.key,dependsOn:n.dependsOn??"all"},c={...u,subject:i,new:n.new};return l.moleculeFamilies.set(n.key,c),u}function Xa(l,n,i){const u=Ki(i,n,l.key);l.tokens.set(u.key,u);const c=ft(i)&&i.transactionMeta.phase==="building",f=i.moleculeInProgress===l.key;return!c&&!f&&l.subject.next({type:"state_creation",token:u}),u}class gn extends Set{constructor(i,u=0){super(i);U(this,"mode","record");U(this,"subject",new $e);U(this,"cacheLimit",0);U(this,"cache",[]);U(this,"cacheIdx",-1);U(this,"cacheUpdateNumber",-1);U(this,"parent");U(this,"child",null);U(this,"transactionUpdates",null);i instanceof gn&&(this.parent=i,this.cacheUpdateNumber=i.cacheUpdateNumber),u&&(this.cacheLimit=u,this.cache=new Array(u),this.subscribe("auto cache",c=>{this.cacheIdx++,this.cacheIdx%=this.cacheLimit,this.cache[this.cacheIdx]=c}))}toJSON(){return{members:[...this],cache:this.cache,cacheLimit:this.cacheLimit,cacheIdx:this.cacheIdx,cacheUpdateNumber:this.cacheUpdateNumber}}static fromJSON(i){const u=new gn(i.members,i.cacheLimit);return u.cache=i.cache,u.cacheIdx=i.cacheIdx,u.cacheUpdateNumber=i.cacheUpdateNumber,u}add(i){const u=super.add(i);return this.mode==="record"&&(this.cacheUpdateNumber++,this.emit(`add:${De(i)}`)),u}clear(){const i=this.mode==="record"?[...this]:null;super.clear(),i&&(this.cacheUpdateNumber++,this.emit(`clear:${JSON.stringify(i)}`))}delete(i){const u=super.delete(i);return this.mode==="record"&&(this.cacheUpdateNumber++,this.emit(`del:${De(i)}`)),u}transaction(i){this.mode="transaction",this.transactionUpdates=[],this.child=new gn(this);const u=this.child._subscribe("transaction",c=>{var f;(f=this.transactionUpdates)==null||f.push(c)});try{if(i(this.child)){for(const f of this.transactionUpdates)this.doStep(f);this.cacheUpdateNumber++,this.emit(`tx:${this.transactionUpdates.join(";")}`)}}catch(c){throw console.error("Failed to apply transaction to SetRTX:",c),c}finally{u(),this.child=null,this.transactionUpdates=null,this.mode="record"}}_subscribe(i,u){return this.subject.subscribe(i,u)}subscribe(i,u){return this.subject.subscribe(i,c=>{u(`${this.cacheUpdateNumber}=${c}`)})}emit(i){this.subject.next(i)}doStep(i){const u=i.indexOf(":"),c=i.substring(0,u),f=i.substring(u+1);switch(c){case"add":this.add(JSON.parse(f));break;case"clear":this.clear();break;case"del":this.delete(JSON.parse(f));break;case"tx":for(const d of f.split(";"))this.doStep(d)}}getUpdateNumber(i){const u=i.indexOf("=");return Number(i.substring(0,u))}do(i){const u=i.indexOf("="),c=Number(i.substring(0,u)),f=c-this.cacheUpdateNumber;if(f>0){if(f===1){this.mode="playback";const m=i.substring(u+1);return this.doStep(m),this.mode="record",this.cacheUpdateNumber=c,null}return this.cacheUpdateNumber+1}if(Math.abs(f)<this.cacheLimit){const m=this.cacheIdx+f;if(this.cache[m]===i)return null;this.mode="playback";let y=!1;for(;!y;){this.cacheIdx%=this.cacheLimit;const O=this.cache[this.cacheIdx];if(this.cacheIdx--,!O)return"OUT_OF_RANGE";this.undo(O),y=this.cacheIdx===m-1}const b=i.substring(u+1);return this.doStep(b),this.mode="record",this.cacheUpdateNumber=c,null}return"OUT_OF_RANGE"}undoStep(i){const u=i.indexOf(":"),c=i.substring(0,u),f=i.substring(u+1);switch(c){case"add":this.delete(JSON.parse(f));break;case"del":this.add(JSON.parse(f));break;case"clear":{const d=JSON.parse(f);for(const m of d)this.add(m);break}case"tx":{const d=f.split(";");for(let m=d.length-1;m>=0;m--)this.undoStep(d[m])}}}undo(i){const u=i.indexOf("=");if(Number(i.substring(0,u))===this.cacheUpdateNumber){this.mode="playback";const f=i.substring(u+1);return this.undoStep(f),this.mode="record",this.cacheUpdateNumber--,null}return this.cacheUpdateNumber}}function Ve(l){return l[0].toUpperCase()+l.slice(1)}class Fo{constructor(n,i,u=st.STORE){U(this,"options");U(this,"defaultContent");U(this,"toolkit");U(this,"retrieve");U(this,"molecules",new Map);U(this,"relations");U(this,"states");U(this,"core");U(this,"store");U(this,"alternates");this.store=u,this.options=n,this.defaultContent=i,this.alternates=new Map,this.alternates.set(u.config.name,this),this.store.miscResources.set(`join:${n.key}`,this),this.retrieve=(B,Y)=>{const se=this.toolkit.seek(B,Y);if(se)return se;const j=this.store.molecules.get(De(Y));if(j){const H=Ce(B,u);return Xa(j,H,u)}if(u.config.lifespan==="immortal")throw new pa(B,Y,u);return Ki(u,B,Y)},this.toolkit={get:(...B)=>wt(u,...B),set:(...B)=>{We(u,...B)},find:this.retrieve,seek:(...B)=>Et(u,...B),json:B=>Sa(u,B),dispose:(...B)=>{Yn(u,...B)}};const c=n.between[0],f=n.between[1],d=Um(u,{key:`${n.key}/relatedKeys`,default:()=>new gn,mutable:!0,fromJson:B=>gn.fromJSON(B),toJson:B=>B.toJSON()},["join","relations"]);this.core={findRelatedKeysState:d};const m=({get:B},Y)=>B(this.retrieve(d,Y)),p=(B,Y,se)=>{const{set:j}=B,H=this.retrieve(d,Y),W=this.retrieve(d,se);j(H,ie=>ie.add(se)),j(W,ie=>ie.add(Y))},y=(B,Y,se)=>{const{set:j}=B,H=this.retrieve(d,Y),W=this.retrieve(d,se);j(H,ie=>(ie.delete(se),ie.size,ie)),j(W,ie=>(ie.delete(Y),ie.size,ie))},b=(B,Y,se)=>{const{get:j,set:H}=B,W=this.retrieve(d,Y),ie=j(W);for(const Oe of ie){if(se.includes(Oe))continue;const je=this.retrieve(d,Oe);H(je,q=>(q.delete(Y),q))}H(W,Oe=>(Oe.transaction(Le=>{Le.clear();for(const je of se){const q=m(B,je),ce=q.has(Y);if(this.relations.cardinality==="1:n"){const ne=[];for(const Re of q){if(Re===Y)continue;const _=m(B,Re);_.delete(je),_.size===0&&ne.push(Re)}!ce&&q.size>0&&q.clear();for(const Re of ne){const _=[je,Re].sort(),D=`"${_[0]}:${_[1]}"`;this.molecules.delete(D)}}ce||q.add(Y),Le.add(je)}return!0}),Oe))},O=(B,Y,se)=>{const{set:j}=B,H=this.retrieve(d,Y);j(H,W=>(W.transaction(ie=>{for(const Oe of se)ie.add(Oe);return!0}),W));for(const W of se){const ie=this.retrieve(d,W);j(ie,Oe=>(Oe.add(Y),Oe))}return!0},k=(B,Y,se)=>{const j=m(B,Y);return se?j.has(se):j.size>0},C={getRelatedKeys:B=>m(this.toolkit,B),addRelation:(B,Y)=>{p(this.toolkit,B,Y)},deleteRelation:(B,Y)=>{y(this.toolkit,B,Y)},replaceRelationsSafely:(B,Y)=>{b(this.toolkit,B,Y)},replaceRelationsUnsafely:(B,Y)=>{O(this.toolkit,B,Y)},has:(B,Y)=>k(this.toolkit,B,Y)};let te,L,Q;if(i){L=$o(u,{key:`${n.key}/content`,default:i},["join","content"]),Q=yb(u,{key:`${n.key}/content-molecules`,new:class{constructor(W,ie){this.key=ie}}});const B=({get:H},W)=>H(this.retrieve(L,W)),Y=({set:H},W,ie)=>{H(this.retrieve(L,W),ie)},se=(H,W)=>{const ie=u.molecules.get(`"${W}"`);ie&&(this.toolkit.dispose(ie),this.molecules.delete(`"${W}"`))};te=Object.assign(C,{getContent:H=>B(this.toolkit,H),setContent:(H,W)=>{Y(this.toolkit,H,W)},deleteContent:H=>{se(this.toolkit,H)}})}else te=C;const G=new Ln(n,{externalStore:te,isAType:n.isAType,isBType:n.isBType,makeContentKey:(...B)=>{const Y=B.sort(),se=`${Y[0]}:${Y[1]}`,[j,H]=Y.map(W=>this.molecules.get(De(W)));if(u.config.lifespan==="immortal"&&j&&H){const W=ee(u),ie=Li(W,[j,H],Q,se);this.molecules.set(`"${se}"`,Ce(ie,W))}return se}}),P=()=>Bi(u,{key:`${n.key}/singleRelatedKey`,get:B=>({get:Y})=>{const se=this.retrieve(d,B),j=Y(se);for(const H of j)return H;return null}},["join","keys"]),ye=()=>Bi(u,{key:`${n.key}/multipleRelatedKeys`,get:B=>({get:Y})=>{const se=lm(d,u),j=this.retrieve(se,B);return Y(j).members}},["join","keys"]),Ie=()=>Bi(u,{key:`${n.key}/singleRelatedEntry`,get:B=>({get:Y})=>{var H;const se=this.retrieve(d,B),j=Y(se);for(const W of j){let ie=(H=G.isAType)!=null&&H.call(G,B)?B:void 0,Oe=ie===void 0?B:void 0;ie??(ie=W),Oe??(Oe=W);const Le=G.makeContentKey(ie,Oe),je=this.retrieve(L,Le),q=Y(je);return[W,q]}return null}},["join","entries"]),be=()=>Bi(u,{key:`${n.key}/multipleRelatedEntries`,get:B=>({get:Y})=>{const se=lm(d,u),j=this.retrieve(se,B);return Y(j).members.map(W=>{var ce;let ie=(ce=G.isAType)!=null&&ce.call(G,B)?B:void 0,Oe=ie===void 0?B:void 0;ie??(ie=W),Oe??(Oe=W);const Le=G.makeContentKey(ie,Oe),je=this.retrieve(L,Le),q=Y(je);return[W,q]})}},["join","entries"]);switch(n.cardinality){case"1:1":{const B=P(),Y=`${c}KeyOf${Ve(f)}`,se=`${f}KeyOf${Ve(c)}`,j={[Y]:B,[se]:B};let H;if(i){const W=Ie(),ie=`${c}EntryOf${Ve(f)}`,Oe=`${f}EntryOf${Ve(c)}`,Le={[ie]:W,[Oe]:W};H=Object.assign(j,Le)}else H=j;this.relations=G,this.states=H;break}case"1:n":{const B=P(),Y=ye(),se=`${c}KeyOf${Ve(f)}`,j=`${f}KeysOf${Ve(c)}`,H={[se]:B,[j]:Y};let W;if(i){const ie=Ie(),Oe=be(),Le=`${c}EntryOf${Ve(f)}`,je=`${f}EntriesOf${Ve(c)}`,q={[Le]:ie,[je]:Oe};W=Object.assign(H,q)}else W=H;this.relations=G,this.states=W;break}default:{const B=ye(),Y=`${c}KeysOf${Ve(f)}`,se=`${f}KeysOf${Ve(c)}`,j={[Y]:B,[se]:B};let H;if(i){const W=be(),ie=`${c}EntriesOf${Ve(f)}`,Oe=`${f}EntriesOf${Ve(c)}`,Le={[ie]:W,[Oe]:W};H=Object.assign(j,Le)}else H=j;this.relations=G,this.states=H}}}transact(n,i){const u=this.toolkit;this.toolkit=n,i(this),this.toolkit=u}[Symbol.dispose](){this.alternates.delete(this.store.config.name)}in(n){const i=n.config.name,u=this.alternates.get(i);if(u)return u;const c=new Fo(this.options,this.defaultContent,n);return this.alternates.set(i,c),c.alternates=this.alternates,c}}function mb(l,n,i=st.STORE){return wo(i).set(l.key,new Fo(l,n,i)),{key:l.key,type:"join",a:l.between[0],b:l.between[1],cardinality:l.cardinality}}function wo(l){if("joins"in l&&l.joins instanceof Map)return l.joins;const n=new Map;return l.joins=n,n}function Wo(l,n){var c;const i=wo(n);let u=i.get(l.key);if(u===void 0){if(u=(c=wo(st.STORE).get(l.key))==null?void 0:c.in(n),u===void 0)throw new Error(`Join "${l.key}" not found in store "${n.config.name}"`);i.set(l.key,u)}return u}function pb(l,n,i){const u=Wo(l,i);let c;switch(l.cardinality){case"1:1":{const f=`${l.a}KeyOf${Ve(l.b)}`,d=`${l.b}KeyOf${Ve(l.a)}`;c={get[f](){const p=u.states[f];return u.retrieve(p,n)},get[d](){const p=u.states[d];return u.retrieve(p,n)}};const m=`${l.a}EntryOf${Ve(l.b)}`;if(m in u.states){const p=`${l.b}EntryOf${Ve(l.a)}`;Object.assign(c,{get[m](){const y=u.states[m];return u.retrieve(y,n)},get[p](){const y=u.states[p];return u.retrieve(y,n)}})}break}case"1:n":{const f=`${l.a}KeyOf${Ve(l.b)}`,d=`${l.b}KeysOf${Ve(l.a)}`;c={get[f](){const p=u.states[f];return u.retrieve(p,n)},get[d](){const p=u.states[d];return u.retrieve(p,n)}};const m=`${l.a}EntryOf${Ve(l.b)}`;if(m in u.states){const p=`${l.b}EntriesOf${Ve(l.a)}`;Object.assign(c,{get[m](){const y=u.states[m];return u.retrieve(y,n)},get[p](){const y=u.states[p];return u.retrieve(y,n)}})}break}case"n:n":{const f=`${l.a}KeysOf${Ve(l.b)}`,d=`${l.b}KeysOf${Ve(l.a)}`;c={get[f](){const p=u.states[f];return u.retrieve(p,n)},get[d](){const p=u.states[d];return u.retrieve(p,n)}};const m=`${l.a}EntriesOf${Ve(l.b)}`;if(m in u.states){const p=`${l.b}EntriesOf${Ve(l.a)}`;Object.assign(c,{get[m](){const y=u.states[m];return u.retrieve(y,n)},get[p](){const y=u.states[p];return u.retrieve(y,n)}})}}}return c}function gb(l,n){return pb(l,n,st.STORE)}function vb(l,n){return Wo(l,n).core.findRelatedKeysState}function bb(l){return vb(l,st.STORE)}function xm(l){return{store:l}}function wt(l,...n){let i,u,c;if(n.length===1)i=n[0],i.type!=="molecule"&&(u=Rm(l,i)??null,u&&(c=i.family?Qa(i.family.subKey):null,i=At(l,u,c)));else{u=n[0],c=n[1];let f;u.type==="molecule_family"?f=Et(l,u,c)??Xo(u,c):f=At(l,u,c),i=f}if("counterfeit"in i&&"family"in i){u=i.type==="molecule"?Ce(i.family,l):l.families.get(i.family.key);const f=i.type==="molecule"?i.key:i.family.subKey,d=l.disposalTraces.buffer.find(m=>(m==null?void 0:m.key)===i.key);switch(l.logger.error("❌",i.type,i.key,`could not be retrieved because it was not found in the store "${l.config.name}".`,d?`This state was previously disposed:
11
+ ${d.trace}`:"No previous disposal trace was found."),u.type){case"atom_family":case"mutable_atom_family":return l.defaults.get(u.key);case"selector_family":case"readonly_selector_family":{if(l.defaults.has(u.key))return l.defaults.get(i.family.key);const m=Ce(u,l).default(f);return l.defaults.set(u.key,m),m}case"molecule_family":throw new pa(u,f,l)}}switch(i.type){case"atom":case"mutable_atom":case"selector":case"readonly_selector":return Qu(Ce(i,l),l);case"molecule":return Ce(i,l).instance}}class Oo{constructor(n,i,u){U(this,"type","molecule");U(this,"stringKey");U(this,"family");U(this,"_dependsOn");U(this,"subject",new $e);U(this,"tokens",new Map);U(this,"above",new Map);U(this,"below",new Map);U(this,"joins",new Map);U(this,"instance");if(this.key=i,this.stringKey=De(i),u&&(this.family=u,this._dependsOn=u.dependsOn),n)for(const c of n)this.above.set(c.stringKey,c)}get dependsOn(){return this.family?this.family.dependsOn:this._dependsOn}}function am(l){return l[0].toUpperCase()+l.slice(1)}function Li(l,n,i,u,...c){const f=Qv(l),d=ee(l),m=De(u);d.moleculeInProgress=m;const p=Array.isArray(n)?n:[n],y=p.map(Q=>{if(Q instanceof Oo)return Q;const G=De(Q.key),P=l.molecules.get(G);if(!P)throw new Error(`Molecule ${G} not found in store "${l.config.name}"`);return P}),b=new Oo(y,u,i);d.molecules.set(m,b);for(const Q of y)Q.below.set(b.stringKey,b);const O={get:(...Q)=>wt(ee(f),...Q),set:(...Q)=>{We(ee(f),...Q)},seek:(Q,G)=>Et(ee(f),Q,G),json:Q=>Sa(ee(f),Q),run:(Q,G=Yo())=>Xu(Q,G,ee(l)),make:(Q,G,P,...ye)=>Li(ee(f),Q,G,P,...ye),dispose:Q=>{Yn(ee(f),Q)},env:()=>xm(ee(f)),bond:(Q,G)=>{if(Q.type==="join"){const{as:P}=G,ye=Wo(Q,f);ye.molecules.set(m,b),b.joins.set(Q.key,ye);const Ie=k.subject.subscribe(`join:${Q.key}-${m}`,H=>{H.type==="molecule_disposal"&&De(H.token.key)===m&&(Ie(),ye.molecules.delete(m))});if(P===null)return;const be=Q.a===P?Q.b:Q.a,B=gb(Q,u),Y=B[`${be}KeysOf${am(P)}`],se=B[`${be}EntriesOf${am(P)}`];let j={relatedKeys:Y};return se&&(j=Object.assign(j,{relatedEntries:se})),j}return Xa(b,Ce(Q,f),ee(f))},claim:(Q,G)=>{const{exclusive:P}=G,ye=ee(l).molecules.get(De(Q.key));if(ye)if(P){for(const Ie of ye.above.values())Ie.below.delete(ye.stringKey);ye.above.clear(),ye.above.set(b.stringKey,b),b.below.set(ye.stringKey,ye)}else ye.above.set(b.stringKey,b),b.below.set(ye.stringKey,ye)},spawn:(Q,G,...P)=>Li(ee(l),[b],Ce(Q,l),G,...P)},k=Ce(i,l),C=k.new;b.instance=new C(O,u,...c);const te={type:"molecule",key:u,family:i},L={type:"molecule_creation",subType:"classic",token:te,family:i,context:p,params:c};return Pt(d)?k.subject.next(L):ft(d)&&d.on.transactionApplying.state===null&&d.transactionMeta.update.updates.push(L),d.moleculeInProgress=null,te}function _b(l,n,i){switch(n){case"newValue":{km(l,i);break}case"oldValue":{Yn(i,l.token);break}}}function Sb(l,n,i){switch(n){case"newValue":{Yn(i,l.token);break}case"oldValue":{km(l,i),i.valueMap.set(l.token.key,l.value);break}}}function km(l,n){const{family:i}=l.token;if(i){const u=n.families.get(i.key);u&&At(n,u,Qa(i.subKey))}}function Tb(l,n,i){switch(n){case"newValue":switch(l.subType){case"classic":Li(i,l.context,l.family,l.token.key,...l.params);break;case"modern":Am(i,l.provenance,l.key);break}break;case"oldValue":switch(l.subType){case"classic":Yn(i,l.token);break;case"modern":qu(i,l.key);break}break}}function Eb(l,n,i){switch(n){case"newValue":switch(l.subType){case"classic":Yn(i,l.token);break;case"modern":qu(i,l.key);break}break;case"oldValue":switch(l.subType){case"classic":{const u=Li(i,l.context,l.family,l.token.key);for(const[c,f]of l.values){const d=`${c}(${De(u.key)})`,m=Ce(u,i),p=m.tokens.has(d),y=i.families.get(c);y&&!p&&Xa(m,y,i),i.valueMap.set(d,f)}}break;case"modern":{Am(i,l.provenance,l.key);for(const[u,c]of l.values){const f=i.families.get(u);if(f){At(i,f,l.key);const d=`${u}(${De(l.key)})`;i.valueMap.set(d,c)}}}}break}}function qi(l,n,i){const u=l==="newValue"?n.updates:[...n.updates].reverse();for(const c of u)switch(c.type){case"atom_update":case"selector_update":hb(l,c,i);break;case"state_creation":_b(c,l,i);break;case"state_disposal":Sb(c,l,i);break;case"molecule_creation":Tb(c,l,i);break;case"molecule_disposal":Eb(c,l,i);break;case"transaction_update":qi(l,c,i);break}}function Ro(l,n,i){Pt(i)&&l&&i.transactionMeta.epoch.set(l,n)}function Ab(l,n,i){if(!Pt(i))return;const c=i.transactionMeta.actionContinuities.getRelatedKey(l);c!==void 0&&i.transactionMeta.epoch.set(c,n)}const wb=(l,n)=>{var f;const i=ee(n),{parent:u}=i;if(u===null||!ft(i)||((f=i.transactionMeta)==null?void 0:f.phase)!=="building"){n.logger.warn("🐞","transaction","???","applyTransaction called outside of a transaction. This is probably a bug in AtomIO.");return}i.transactionMeta.phase="applying",i.transactionMeta.update.output=l,u.child=null,u.on.transactionApplying.next(i.transactionMeta);const{updates:c}=i.transactionMeta.update;if(n.logger.info("🛄","transaction",i.transactionMeta.update.key,`Applying transaction with ${c.length} updates:`,c),qi("newValue",i.transactionMeta.update,u),Pt(u)){Ab(i.transactionMeta.update.key,i.transactionMeta.update.epoch,u);const d=Ce({key:i.transactionMeta.update.key,type:"transaction"},n);d==null||d.subject.next(i.transactionMeta.update),n.logger.info("🛬","transaction",i.transactionMeta.update.key,"Finished applying transaction.")}else ft(u)&&u.transactionMeta.update.updates.push(i.transactionMeta.update);u.on.transactionApplying.next(null)};function Mm(l,n,i){if(!Pt(i))return;const{epoch:c,actionContinuities:f}=i.transactionMeta;f.set(l,n),c.has(l)||c.set(l,-1)}class pn extends Map{constructor(i){super();U(this,"deleted",new Set);this.source=i}get(i){if(super.has(i))return super.get(i);if(!this.deleted.has(i)&&this.source.has(i))return this.source.get(i)}set(i,u){return this.deleted.delete(i),super.set(i,u)}hasOwn(i){return super.has(i)}has(i){return!this.deleted.has(i)&&(super.has(i)||this.source.has(i))}delete(i){return this.deleted.add(i),super.delete(i)}}const Ob=(l,n,i,u)=>{const c=ee(i),f={parent:c,child:null,on:c.on,loggers:c.loggers,logger:c.logger,config:c.config,atoms:new pn(c.atoms),atomsThatAreDefault:new Set(c.atomsThatAreDefault),families:new pn(c.families),operation:{open:!1},readonlySelectors:new pn(c.readonlySelectors),timelines:new pn(c.timelines),timelineTopics:new Ln(c.timelineTopics.toJSON()),trackers:new Map,transactions:new pn(c.transactions),selectorAtoms:new Ln(c.selectorAtoms.toJSON()),selectorGraph:new Ln(c.selectorGraph.toJSON(),{makeContentKey:(...y)=>y.sort().join(":")}),selectors:new pn(c.selectors),valueMap:new pn(c.valueMap),defaults:c.defaults,disposalTraces:i.disposalTraces.copy(),molecules:new pn(c.molecules),moleculeFamilies:new pn(c.moleculeFamilies),moleculeInProgress:c.moleculeInProgress,miscResources:new pn(c.miscResources)},d=xb(l,i),m={phase:"building",update:{type:"transaction_update",key:l,id:u,epoch:d===void 0?Number.NaN:d+1,updates:[],params:n,output:void 0},toolkit:{get:(...y)=>wt(p,...y),set:(...y)=>{We(p,...y)},run:(y,b=Yo())=>Xu(y,b,p),find:(y,b)=>At(p,y,b),seek:(y,b)=>Et(p,y,b),json:y=>Sa(p,y),make:(y,b,O,...k)=>Li(p,y,b,O,...k),dispose:(...y)=>{Yn(p,...y)},env:()=>xm(p)}},p=Object.assign(f,{transactionMeta:m});return c.child=p,i.logger.info("🛫","transaction",l,"Building transaction with params:",n),p};function Nm(l,n){const i={key:l.key,type:"transaction",run:(f,d)=>{const m=Ob(l.key,f,n,d);try{const p=ee(n),{toolkit:y}=m.transactionMeta,b=l.do(y,...f);return wb(b,p),b}catch(p){throw ib(u),n.logger.warn("💥","transaction",l.key,"caught:",p),p}},install:f=>Nm(l,f),subject:new $e},u=ee(n);u.transactions.set(i.key,i);const c=Ga(i);return n.on.transactionCreation.next(c),c}function Rb(l,n){return Pt(n)&&l?n.transactionMeta.epoch.get(l):void 0}function xb(l,n){const i=Pt(n),u=i?n.transactionMeta.actionContinuities.getRelatedKey(l):void 0;return i&&u!==void 0?n.transactionMeta.epoch.get(u):void 0}class kb{constructor(n,i=null){U(this,"parent",null);U(this,"child",null);U(this,"valueMap",new Map);U(this,"defaults",new Map);U(this,"atoms",new Map);U(this,"selectors",new Map);U(this,"readonlySelectors",new Map);U(this,"atomsThatAreDefault",new Set);U(this,"selectorAtoms",new Ln({between:["selectorKey","atomKey"],cardinality:"n:n"}));U(this,"selectorGraph",new Ln({between:["upstreamSelectorKey","downstreamSelectorKey"],cardinality:"n:n"},{makeContentKey:(...n)=>n.sort().join(":")}));U(this,"trackers",new Map);U(this,"families",new Map);U(this,"transactions",new Map);U(this,"transactionMeta",{epoch:new Map,actionContinuities:new Ln({between:["continuity","action"],cardinality:"1:n"})});U(this,"timelines",new Map);U(this,"timelineTopics",new Ln({between:["timelineKey","topicKey"],cardinality:"1:n"}));U(this,"disposalTraces",new Go(100));U(this,"molecules",new Map);U(this,"moleculeFamilies",new Map);U(this,"moleculeInProgress",null);U(this,"miscResources",new Map);U(this,"on",{atomCreation:new $e,atomDisposal:new $e,selectorCreation:new $e,selectorDisposal:new $e,timelineCreation:new $e,transactionCreation:new $e,transactionApplying:new Jv(null),operationClose:new $e,moleculeCreationStart:new $e,moleculeCreationDone:new $e,moleculeDisposal:new $e});U(this,"operation",{open:!1});U(this,"config",{name:"IMPLICIT_STORE",lifespan:"ephemeral"});U(this,"loggers",[new eb("warn",(n,i,u)=>!u.includes("🔍"))]);U(this,"logger",{error:(...n)=>{for(const i of this.loggers)i.error(...n)},info:(...n)=>{for(const i of this.loggers)i.info(...n)},warn:(...n)=>{for(const i of this.loggers)i.warn(...n)}});var u,c;if(this.config={...i==null?void 0:i.config,...n},i!==null){this.valueMap=new Map(i==null?void 0:i.valueMap),this.operation={...i==null?void 0:i.operation},Pt(i)&&(this.transactionMeta={epoch:new Map(i==null?void 0:i.transactionMeta.epoch),actionContinuities:new Ln(i==null?void 0:i.transactionMeta.actionContinuities.toJSON())});for(const[,d]of i.families)(u=d.internalRoles)!=null&&u.includes("mutable")||(c=d.internalRoles)!=null&&c.includes("join")||d.install(this);const f=new Set;for(const[,d]of i.atoms)if(!f.has(d.key)&&(d.install(this),d.type==="mutable_atom")){const m=Sa(i,d),p=jm(d);f.add(m.key),f.add(p.key)}for(const[,d]of i.readonlySelectors)d.install(this);for(const[,d]of i.selectors)f.has(d.key)||d.install(this);for(const[,d]of i.transactions)d.install(this);for(const[,d]of i.timelines)d.install(this)}}}const st={get STORE(){return globalThis.ATOM_IO_IMPLICIT_STORE||(globalThis.ATOM_IO_IMPLICIT_STORE=new kb({name:"IMPLICIT_STORE",lifespan:"ephemeral"})),globalThis.ATOM_IO_IMPLICIT_STORE}};function Ce(l,n){let i,u=n;for(;u!==null;){switch(l.type){case"atom":case"mutable_atom":i=u.atoms.get(l.key);break;case"selector":i=u.selectors.get(l.key);break;case"readonly_selector":i=u.readonlySelectors.get(l.key);break;case"atom_family":case"mutable_atom_family":case"selector_family":case"readonly_selector_family":i=u.families.get(l.key);break;case"timeline":i=u.timelines.get(l.key);break;case"transaction":i=u.transactions.get(l.key);break;case"molecule":i=u.molecules.get(De(l.key));break;case"molecule_family":i=u.moleculeFamilies.get(l.key);break}if(i)return i;u=u.child}throw new pa(l,n)}function xo(l,n){let i;i=Ce(l,n);const{family:u}=l;for(const d of i.joins.values())d.relations.delete(i.key),d.molecules.delete(i.stringKey);const c=[];for(const d of i.above.values())c.push(Ga(d));const f=[];for(const d of i.tokens.values()){const m=d.family;f.push([m.key,n.valueMap.get(d.key)])}if(u){const d=Ce(u,n),m={type:"molecule_disposal",subType:"classic",token:l,family:u,context:c,values:f};l.family&&(m.family=l.family);for(const y of i.tokens.values())Yn(n,y);for(const y of i.below.values())y.dependsOn==="all"?xo(y,n):(y.above.delete(i.stringKey),y.above.size===0&&xo(y,n));i.below.clear(),ft(n)&&n.transactionMeta.phase==="building"?n.transactionMeta.update.updates.push(m):d.subject.next(m),n.molecules.delete(i.stringKey)}for(const d of i.above.values())d.below.delete(i.stringKey)}function Ki(l,n,i){const u=l.families.get(n.key);if(u===void 0)throw new pa(n,l);const c=u(i),f=ee(l);if(c.family&&f.moleculeInProgress===null)if(Pt(f))switch(c.type){case"atom":case"mutable_atom":l.on.atomCreation.next(c);break;case"selector":case"readonly_selector":l.on.selectorCreation.next(c);break}else ft(f)&&f.on.transactionApplying.state===null&&f.transactionMeta.update.updates.push({type:"state_creation",token:c});return c}function Et(l,n,i){const u=De(i),c=`${n.key}(${u})`,f=ee(l);let d;switch(n.type){case"atom_family":case"mutable_atom_family":d=f.atoms.get(c);break;case"selector_family":d=f.selectors.get(c);break;case"readonly_selector_family":d=f.readonlySelectors.get(c);break;case"molecule_family":d=f.molecules.get(De(i))}return d&&Ga(d)}function At(l,n,i){let u=Et(l,n,i);if(u)return u;const c=l.molecules.get(De(i));if(c)return Xa(c,n,l);if(l.config.lifespan==="immortal"){const f=Xo(n,i);return l.logger.error("❌",f.type,f.key,`was not found in store "${l.config.name}"; returned a counterfeit token.`),f}return u=Ki(l,n,i),u}function Yn(l,...n){var c,f;let i;if(n.length===1)i=n[0],i.key;else{const d=n[0],m=n[1];i=d.type==="molecule_family"?Et(l,d,m)??Xo(d,m):At(l,d,m)}try{Ce(i,l)}catch{const m=l.disposalTraces.buffer.find(p=>(p==null?void 0:p.key)===i.key);l.logger.error("❌",i.type,i.key,`could not be disposed because it was not found in the store "${l.config.name}".`,m?`
12
+ This state was most recently disposed
13
+ ${m.trace}`:"No previous disposal trace was found.");return}switch(i.type){case"atom":case"mutable_atom":af(i,l);break;case"selector":case"readonly_selector":Ub(i,l);break;case"molecule":xo(i,l);break}const{stack:u}=new Error;if(u){const d=(f=(c=u==null?void 0:u.split(`
14
+ `))==null?void 0:c.slice(3))==null?void 0:f.join(`
15
+ `);l.disposalTraces.add({key:i.key,trace:d})}}const Io=(l,n)=>ee(n).atoms.has(l),Mb=(l,n)=>ee(n).selectors.has(l),Nb=(l,n)=>ee(n).readonlySelectors.has(l),Cb=(l,n)=>Io(l,n)||Mb(l,n)||Nb(l,n),ko=(l,n)=>ee(n).selectorGraph.getRelationEntries({downstreamSelectorKey:l}).filter(([u,{source:c}])=>c!==l).map(([u,{source:c}])=>c).filter(u=>Cb(u,n)),Cm=(l,n,i)=>{const u=[],c=ko(l,i);for(;c.length>0;){const f=c.shift();n.has(f)||(n.add(f),Io(f,i)?u.includes(f)||u.push(f):c.push(...ko(f,i)))}return u},Db=(l,n)=>{const i=l.key,u=ko(i,n),c=new Set;return u.flatMap(f=>Io(f,n)?f:Cm(f,c,n))},zb=(l,n,i,u)=>{const c=ee(u);if(n.type==="atom"||n.type==="mutable_atom")c.selectorAtoms.set({selectorKey:l,atomKey:n.key}),u.logger.info("🔍","selector",l,`discovers root atom "${n.key}"`);else{const f=Cm(n.key,i,u);u.logger.info("🔍","selector",l,`discovers root atoms: [ ${f.map(d=>`"${d}"`).join(", ")} ]`);for(const d of f)c.selectorAtoms=c.selectorAtoms.set({selectorKey:l,atomKey:d})}i.add(n.key)},Dm=(l,n,i)=>({get:(...u)=>{const c=ee(i);let f;if(u.length===2){const[p,y]=u;switch(p.type){case"molecule_family":return wt(i,p,y);default:if(i.config.lifespan==="ephemeral")f=At(i,p,y);else{const b=Et(i,p,y);if(b)f=b;else throw new pa(p,y,i)}}}else[f]=u;if(f.type==="molecule")return wt(i,f);const d=Ce(f,i),m=Qu(d,i);return i.logger.info("🔌","selector",l,`registers dependency ( "${f.key}" =`,m,")"),c.selectorGraph.set({upstreamSelectorKey:f.key,downstreamSelectorKey:l},{source:f.key}),zb(l,f,n,i),m},set:(...u)=>{let c,f;if(u.length===2)c=u[0],f=u[1];else{const p=u[0],y=u[1];f=u[2];const b=i.config.lifespan==="ephemeral"?At(i,p,y):Et(i,p,y);if(!b)throw new pa(p,y,i);c=b}const d=ee(i),m=Ce(c,d);Om(m,f,d)},find:(u,c)=>At(i,u,c),seek:(u,c)=>Et(i,u,c),json:u=>Sa(i,u)}),Po=(l,n,i)=>{const u=ee(l),c=new $e,f=new Set,{get:d,find:m,seek:p,json:y}=Dm(n.key,f,u),b=()=>{const te=n.get({get:d,find:m,seek:p,json:y});return Ja(n.key,te,c,ee(l)),f.clear(),te},O={...n,subject:c,install:te=>Po(te,n,i),get:b,type:"readonly_selector",...i&&{family:i}};u.readonlySelectors.set(n.key,O);const k=b();l.logger.info("✨",O.type,O.key,"=",k);const C={key:n.key,type:"readonly_selector"};return i&&(C.family=i),C},ef=(l,n,i)=>{const u=ee(l),c=new $e,f=new Set,d=Dm(n.key,f,u),{find:m,get:p,seek:y,json:b}=d,O={find:m,get:p,seek:y,json:b},k=(G=n.get,P=ee(l))=>{const ye=G(O);return Ja(n.key,ye,c,P),f.clear(),ye},te={...n,subject:c,install:G=>ef(G,n,i),get:k,set:G=>{const P=ee(l),ye=k(n.get,P),Ie=wm(G)(ye);l.logger.info("📝","selector",n.key,"set (",ye,"->",Ie,")"),Ja(n.key,Ie,c,P),Jo(P,n.key),Pt(P)&&c.next({newValue:Ie,oldValue:ye}),n.set(d,Ie)},type:"selector",...i&&{family:i}};u.selectors.set(n.key,te);const L=k();l.logger.info("✨",te.type,te.key,"=",L);const Q={key:n.key,type:"selector"};return i&&(Q.family=i),Q};function zm(l,n){if("set"in n){const c=ef(l,n,void 0);return l.on.selectorCreation.next(c),c}const u=Po(l,n,void 0);return l.on.selectorCreation.next(u),u}function Ub(l,n){const i=ee(n),{key:u}=l,c=Ce(l,i);if(!c.family)n.logger.error("❌","selector",u,"Standalone selectors cannot be disposed.");else{const f=i.molecules.get(c.family.subKey);switch(f&&f.tokens.delete(u),l.type){case"selector":i.selectors.delete(u),Ce({key:c.family.key,type:"selector_family"},n).subject.next({type:"state_disposal",token:l});break;case"readonly_selector":i.readonlySelectors.delete(u),Ce({key:c.family.key,type:"readonly_selector_family"},n).subject.next({type:"state_disposal",token:l});break}i.valueMap.delete(u),i.selectorAtoms.delete(u),i.selectorGraph.delete(u),n.logger.info("🔥",l.type,u,"deleted"),ft(i)&&i.transactionMeta.phase==="building"?i.transactionMeta.update.updates.push({type:"state_disposal",token:l}):n.on.selectorDisposal.next(l)}}function tf(l,n,i){const u={key:n.key,type:"selector_family"},c=l.families.get(n.key);c&&l.logger.error("❗","selector_family",n.key,`Overwriting an existing ${Vi(c)} "${c.key}" in store "${l.config.name}". You can safely ignore this warning if it is due to hot module replacement.`);const f=new $e,m=Object.assign(p=>{const y=De(p),b={key:n.key,subKey:y},O=`${n.key}(${y})`,k=ee(l),C=ef(k,{key:O,get:n.get(p),set:n.set(p)},b);return f.next({type:"state_creation",token:C}),C},u,{internalRoles:i,subject:f,install:p=>tf(p,n),default:p=>n.get(p)({get:(...b)=>wt(l,...b),find:(b,O)=>At(l,b,O),seek:(b,O)=>Et(l,b,O),json:b=>Sa(l,b)})});return l.families.set(n.key,m),u}function jb(l,n,i=st.STORE){const u=tf(i,{key:`${l.key}:JSON`,get:f=>({seek:d,get:m})=>{const p=d(l,f);if(p)return n.toJson(m(p));const y=De(f),b=i.molecules.get(y);if(b){const k=Xa(b,l,i);return n.toJson(m(k))}if(i.config.lifespan==="immortal")throw new Error(`No molecule found for key "${y}"`);const O=Ki(i,l,f);return n.toJson(m(O))},set:f=>({seek:d,set:m},p)=>{const y=d(l,f);if(y)m(y,n.fromJson(p));else{const b=De(f),O=i.molecules.get(b);if(O){const k=Xa(O,l,i);m(k,n.fromJson(p))}else{if(i.config.lifespan==="immortal")throw new Error(`No molecule found for key "${b}"`);m(Ki(i,l,f),n.fromJson(p))}}}},["mutable","json"]);return Ce(l,i).subject.subscribe(`store=${i.config.name}::json-selector-family`,f=>{f.token.family&&Et(i,u,Qa(f.token.family.subKey))}),u}const Qa=l=>JSON.parse(l),De=l=>JSON.stringify(l),Bb=(l,n)=>{const i=ee(n);return i.operation.open?i.operation.prev.get(l.key):i.valueMap.get(l.key)},im=(l,n)=>{const i=ee(n);return Db(l,n).map(c=>{const f=i.atoms.get(c);if(f===void 0)throw new Error(`Atom "${c}", a dependency of selector "${l.key}", not found in store "${n.config.name}".`);return f.subject.subscribe(`${l.type}:${l.key}`,d=>{n.logger.info("📢",l.type,l.key,"root",c,"went",d.oldValue,"->",d.newValue);const m=Bb(l,i),p=Qu(l,i);n.logger.info("✨",l.type,l.key,"went",m,"->",p),l.subject.next({newValue:p,oldValue:m})})})};function es(l,n,i,u){function c(O){if(u.operation.open){const k=u.on.operationClose.subscribe(`state subscription ${i}`,()=>{k(),n(O)})}else n(O)}const f=Ce(l,u);u.logger.info("👀",f.type,f.key,`Adding subscription "${i}"`);const d=f.type==="selector"||f.type==="readonly_selector";let m=null,p=c;d&&(m=im(f,u),p=O=>{m&&(m.length=0,m.push(...im(f,u))),c(O)});const y=f.subject.subscribe(i,p);return()=>{if(u.logger.info("🙈",f.type,f.key,`Removing subscription "${i}"`),y(),m)for(const O of m)O()}}const qb=(l,n,i,u)=>{const c=Ce(l,u);u.logger.info("👀","timeline",l.key,`Adding subscription "${i}"`);const f=c.subject.subscribe(i,n);return()=>{u.logger.info("🙈","timeline",l.key,`Removing subscription "${i}" from timeline`),f()}},Zb=(l,n,i,u)=>{const c=Ce(l,u);u.logger.info("👀","transaction",l.key,`Adding subscription "${i}"`);const f=c.subject.subscribe(i,n);return()=>{u.logger.info("🙈","transaction",l.key,`Removing subscription "${i}"`),f()}};class Zu{constructor(n,i){U(this,"Update");U(this,"unsubscribeFromInnerValue");U(this,"unsubscribeFromState");U(this,"mutableState");U(this,"latestUpdateState");U(this,"dispose");this.mutableState=n;const u=ee(i);this.latestUpdateState=this.initializeState(n,u),this.observeCore(n,this.latestUpdateState,u),this.updateCore(n,this.latestUpdateState,u),u.trackers.set(n.key,this),this.dispose=()=>{this.unsubscribeFromInnerValue(),this.unsubscribeFromState(),u.trackers.delete(n.key)}}initializeState(n,i){var d;const u=`*${n.key}`;i.atoms.delete(u),i.valueMap.delete(u);const c=n.family?{key:`*${n.family.key}`,subKey:n.family.subKey}:void 0,f=Ju(i,{key:u,default:null},c);if((d=i.parent)!=null&&d.valueMap.has(u)){const m=i.parent.valueMap.get(u);i.valueMap.set(u,m)}return f}observeCore(n,i,u){const c=`tracker:${u.config.name}:${ft(u)?u.transactionMeta.update.key:"main"}:${n.key}`,f=wt(u,n);this.unsubscribeFromInnerValue=f.subscribe(c,d=>{We(u,i,d)}),this.unsubscribeFromState=es(n,d=>{d.newValue!==d.oldValue&&(this.unsubscribeFromInnerValue(),this.unsubscribeFromInnerValue=d.newValue.subscribe(c,m=>{We(u,i,m)}))},c,u)}updateCore(n,i,u){const c=`tracker:${u.config.name}:${ft(u)?u.transactionMeta.update.key:"main"}:${n.key}`;es(i,({newValue:f,oldValue:d})=>{const m=u.timelineTopics.getRelatedKey(i.key);if(m){const y=u.timelines.get(m);if(y!=null&&y.timeTraveling){const b=qb({key:m,type:"timeline"},O=>{b(),We(u,n,k=>(O==="redo"&&f?k.do(f):O==="undo"&&d&&k.undo(d),k))},c,u);return}}const p=u.on.operationClose.subscribe(c,()=>{p();const y=wt(u,n),b=f===null?-1:y.getUpdateNumber(f),O=b-y.cacheUpdateNumber;f&&O===1?We(u,n,k=>(k.do(f),k)):u.logger.info("❌","mutable_atom",n.key,`could not be updated. Expected update number ${y.cacheUpdateNumber+1}, but got ${b}`)})},c,u)}}function nf(l,n,i){l.logger.info("🔨","atom",n.key,`creating in store "${l.config.name}"`);const u=ee(l),c=u.atoms.get(n.key);if(c&&c.type==="mutable_atom")return l.logger.error("❌","atom",n.key,"Tried to create atom, but it already exists in the store."),Ga(c);const f=new $e,d={...n,type:"mutable_atom",install:y=>(y.logger.info("🛠️","atom",n.key,`installing in store "${y.config.name}"`),nf(y,n,i)),subject:f};i&&(d.family=i);const m=n.default();u.atoms.set(d.key,d),Bm(n.key,l),Ja(n.key,m,f,u);const p=Ga(d);if(n.effects){let y=0;const b=[];for(const O of n.effects){const k=O({setSelf:C=>{We(l,p,C)},onSet:C=>es(p,C,`effect[${y}]`,l)});k&&b.push(k),++y}d.cleanup=()=>{for(const O of b)O()}}return new Zu(p,l),i||Xv(p,n,l),p}class Hb{constructor(n,i){U(this,"Update");U(this,"latestUpdateAtoms");U(this,"mutableAtoms");const u=$o(i,{key:`*${n.key}`,default:null},["mutable","updates"]);this.latestUpdateAtoms=Ce(u,i),this.mutableAtoms=n,this.mutableAtoms.subject.subscribe(`store=${i.config.name}::tracker-atom-family`,c=>{if(c.token.family){const f=Qa(c.token.family.subKey);Et(i,this.latestUpdateAtoms,f),new Zu(c.token,i)}}),this.latestUpdateAtoms.subject.subscribe(`store=${i.config.name}::tracker-atom-family`,c=>{if(c.token.family){const f=Qa(c.token.family.subKey),d=Et(i,this.mutableAtoms,f);d&&new Zu(d,i)}})}}function Um(l,n,i){const u={key:n.key,type:"mutable_atom_family"},c=l.families.get(n.key);c&&l.logger.error("❗","mutable_atom_family",n.key,`Overwriting an existing ${Vi(c)} "${c.key}" in store "${l.config.name}". You can safely ignore this warning if it is due to hot module replacement.`);const f=new $e,m=Object.assign(p=>{const y=De(p),b={key:n.key,subKey:y},O=`${n.key}(${y})`,k=ee(l),C={key:O,default:()=>n.default(p),toJson:n.toJson,fromJson:n.fromJson,mutable:!0};n.effects&&(C.effects=n.effects(p));const te=nf(k,C,b);return f.next({type:"state_creation",token:te}),te},u,{subject:f,install:p=>Um(p,n),toJson:n.toJson,fromJson:n.fromJson,internalRoles:i});return l.families.set(n.key,m),jb(m,n,l),new Hb(m,l),u}const lm=(l,n)=>{const i=ee(n),u=`${l.key}:JSON`;return i.families.get(u)},Sa=(l,n)=>{if(n.family){const u=ee(l),f={key:`${n.family.key}:JSON`,type:"selector_family"},d=Ce(f,u),m=JSON.parse(n.family.subKey);return At(l,d,m)}return{type:"selector",key:`${n.key}:JSON`}},jm=l=>{const i={type:"atom",key:`*${l.key}`};return l.family&&(i.family={key:`*${l.family.key}`,subKey:l.family.subKey}),i};function Vb(l){return typeof l=="object"&&l!==null&&"do"in l&&"undo"in l&&"subscribe"in l}function Mo(l,n,i){const u=n.valueMap.get(l.key),c=i.valueMap.get(l.key);if(u===c){if(u===void 0)return typeof l.default=="function"?l.default():l.default;n.logger.info("📃","atom",l.key,"copying");const f=l.toJson(u),d=l.fromJson(f);return i.valueMap.set(l.key,d),new Zu(l,n),d}return c}function Ja(l,n,i,u){const c=u.valueMap.get(l);if(c instanceof Eo&&c.use(n),n instanceof Promise){const f=new Eo(n);return u.valueMap.set(l,f),f.then(d=>{Ja(l,d,i,u),i.next({newValue:d,oldValue:f})}).catch(d=>{u.logger.error("💥","state",l,"rejected:",d)}),f}return u.valueMap.set(l,n),n}const Lb=(l,n)=>{let i=n.valueMap.get(l.key);if(l.type==="mutable_atom"&&ft(n)){const{parent:u}=n;i=Mo(l,u,n)}return i},Kb=(l,n)=>{const i=n.valueMap.get(l);if(i instanceof Eo){const u=i,c=n.selectors.get(l)??n.readonlySelectors.get(l);c&&u.use(c.get());return}n.operation.open&&n.operation.prev.set(l,i),n.valueMap.delete(l),n.logger.info("🗑","state",l,"evicted")},Yb=(l,n)=>ee(n).atomsThatAreDefault.has(l),Bm=(l,n)=>{const i=ee(n);i.atomsThatAreDefault=new Set(i.atomsThatAreDefault).add(l)},$b=(l,n)=>{const i=ee(n);i.atomsThatAreDefault=new Set(ee(n).atomsThatAreDefault),i.atomsThatAreDefault.delete(l)};function Ju(l,n,i){l.logger.info("🔨","atom",n.key,`creating in store "${l.config.name}"`);const u=ee(l),c=u.atoms.get(n.key);if(c&&c.type==="atom")return l.logger.error("❌","atom",n.key,"Tried to create atom, but it already exists in the store."),Ga(c);const f=new $e,d={...n,type:"atom",install:y=>(y.logger.info("🛠️","atom",n.key,`installing in store "${y.config.name}"`),Ju(y,n,i)),subject:f};i&&(d.family=i);let m=n.default;n.default instanceof Function&&(m=n.default()),u.atoms.set(d.key,d),Bm(n.key,l),Ja(n.key,m,f,u);const p=Ga(d);if(n.effects){let y=0;const b=[];for(const O of n.effects){const k=O({setSelf:C=>{We(l,p,C)},onSet:C=>es(p,C,`effect[${y}]`,l)});k&&b.push(k),++y}d.cleanup=()=>{for(const O of b)O()}}return p}function Gb(l,n){if("mutable"in n){const c=nf(l,n,void 0);return l.on.atomCreation.next(c),c}const u=Ju(l,n,void 0);return l.on.atomCreation.next(u),u}function af(l,n){var f;const i=ee(n),{key:u}=l,c=Ce(l,i);if(!c.family)n.logger.error("❌","atom",u,"Standalone atoms cannot be disposed.");else{(f=c.cleanup)==null||f.call(c);const d=n.valueMap.get(c.key);Ce({key:c.family.key,type:"atom_family"},n).subject.next({type:"state_disposal",token:l,value:d});const p=i.molecules.get(c.family.subKey);if(p&&p.tokens.delete(u),i.atoms.delete(u),i.valueMap.delete(u),i.selectorAtoms.delete(u),i.atomsThatAreDefault.delete(u),n.timelineTopics.delete(u),l.type==="mutable_atom"){const y=jm(l);af(y,n),n.trackers.delete(u)}n.logger.info("🔥","atom",u,"deleted"),ft(i)&&i.transactionMeta.phase==="building"?i.transactionMeta.update.updates.push({type:"state_disposal",token:l}):n.on.atomDisposal.next(l)}}var fo={exports:{}},he={};/**
16
+ * @license React
17
+ * react.production.js
18
+ *
19
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
20
+ *
21
+ * This source code is licensed under the MIT license found in the
22
+ * LICENSE file in the root directory of this source tree.
23
+ */var sm;function Xb(){if(sm)return he;sm=1;var l=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),d=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),O=Symbol.iterator;function k(_){return _===null||typeof _!="object"?null:(_=O&&_[O]||_["@@iterator"],typeof _=="function"?_:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},te=Object.assign,L={};function Q(_,D,ue){this.props=_,this.context=D,this.refs=L,this.updater=ue||C}Q.prototype.isReactComponent={},Q.prototype.setState=function(_,D){if(typeof _!="object"&&typeof _!="function"&&_!=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,_,D,"setState")},Q.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};function G(){}G.prototype=Q.prototype;function P(_,D,ue){this.props=_,this.context=D,this.refs=L,this.updater=ue||C}var ye=P.prototype=new G;ye.constructor=P,te(ye,Q.prototype),ye.isPureReactComponent=!0;var Ie=Array.isArray,be={H:null,A:null,T:null,S:null},B=Object.prototype.hasOwnProperty;function Y(_,D,ue,ae,$,Ee){return ue=Ee.ref,{$$typeof:l,type:_,key:D,ref:ue!==void 0?ue:null,props:Ee}}function se(_,D){return Y(_.type,D,void 0,void 0,void 0,_.props)}function j(_){return typeof _=="object"&&_!==null&&_.$$typeof===l}function H(_){var D={"=":"=0",":":"=2"};return"$"+_.replace(/[=:]/g,function(ue){return D[ue]})}var W=/\/+/g;function ie(_,D){return typeof _=="object"&&_!==null&&_.key!=null?H(""+_.key):D.toString(36)}function Oe(){}function Le(_){switch(_.status){case"fulfilled":return _.value;case"rejected":throw _.reason;default:switch(typeof _.status=="string"?_.then(Oe,Oe):(_.status="pending",_.then(function(D){_.status==="pending"&&(_.status="fulfilled",_.value=D)},function(D){_.status==="pending"&&(_.status="rejected",_.reason=D)})),_.status){case"fulfilled":return _.value;case"rejected":throw _.reason}}throw _}function je(_,D,ue,ae,$){var Ee=typeof _;(Ee==="undefined"||Ee==="boolean")&&(_=null);var pe=!1;if(_===null)pe=!0;else switch(Ee){case"bigint":case"string":case"number":pe=!0;break;case"object":switch(_.$$typeof){case l:case n:pe=!0;break;case b:return pe=_._init,je(pe(_._payload),D,ue,ae,$)}}if(pe)return $=$(_),pe=ae===""?"."+ie(_,0):ae,Ie($)?(ue="",pe!=null&&(ue=pe.replace(W,"$&/")+"/"),je($,D,ue,"",function(Pe){return Pe})):$!=null&&(j($)&&($=se($,ue+($.key==null||_&&_.key===$.key?"":(""+$.key).replace(W,"$&/")+"/")+pe)),D.push($)),1;pe=0;var _t=ae===""?".":ae+":";if(Ie(_))for(var Me=0;Me<_.length;Me++)ae=_[Me],Ee=_t+ie(ae,Me),pe+=je(ae,D,ue,Ee,$);else if(Me=k(_),typeof Me=="function")for(_=Me.call(_),Me=0;!(ae=_.next()).done;)ae=ae.value,Ee=_t+ie(ae,Me++),pe+=je(ae,D,ue,Ee,$);else if(Ee==="object"){if(typeof _.then=="function")return je(Le(_),D,ue,ae,$);throw D=String(_),Error("Objects are not valid as a React child (found: "+(D==="[object Object]"?"object with keys {"+Object.keys(_).join(", ")+"}":D)+"). If you meant to render a collection of children, use an array instead.")}return pe}function q(_,D,ue){if(_==null)return _;var ae=[],$=0;return je(_,ae,"","",function(Ee){return D.call(ue,Ee,$++)}),ae}function ce(_){if(_._status===-1){var D=_._result;D=D(),D.then(function(ue){(_._status===0||_._status===-1)&&(_._status=1,_._result=ue)},function(ue){(_._status===0||_._status===-1)&&(_._status=2,_._result=ue)}),_._status===-1&&(_._status=0,_._result=D)}if(_._status===1)return _._result.default;throw _._result}var ne=typeof reportError=="function"?reportError:function(_){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var D=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof _=="object"&&_!==null&&typeof _.message=="string"?String(_.message):String(_),error:_});if(!window.dispatchEvent(D))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",_);return}console.error(_)};function Re(){}return he.Children={map:q,forEach:function(_,D,ue){q(_,function(){D.apply(this,arguments)},ue)},count:function(_){var D=0;return q(_,function(){D++}),D},toArray:function(_){return q(_,function(D){return D})||[]},only:function(_){if(!j(_))throw Error("React.Children.only expected to receive a single React element child.");return _}},he.Component=Q,he.Fragment=i,he.Profiler=c,he.PureComponent=P,he.StrictMode=u,he.Suspense=p,he.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=be,he.act=function(){throw Error("act(...) is not supported in production builds of React.")},he.cache=function(_){return function(){return _.apply(null,arguments)}},he.cloneElement=function(_,D,ue){if(_==null)throw Error("The argument must be a React element, but you passed "+_+".");var ae=te({},_.props),$=_.key,Ee=void 0;if(D!=null)for(pe in D.ref!==void 0&&(Ee=void 0),D.key!==void 0&&($=""+D.key),D)!B.call(D,pe)||pe==="key"||pe==="__self"||pe==="__source"||pe==="ref"&&D.ref===void 0||(ae[pe]=D[pe]);var pe=arguments.length-2;if(pe===1)ae.children=ue;else if(1<pe){for(var _t=Array(pe),Me=0;Me<pe;Me++)_t[Me]=arguments[Me+2];ae.children=_t}return Y(_.type,$,void 0,void 0,Ee,ae)},he.createContext=function(_){return _={$$typeof:d,_currentValue:_,_currentValue2:_,_threadCount:0,Provider:null,Consumer:null},_.Provider=_,_.Consumer={$$typeof:f,_context:_},_},he.createElement=function(_,D,ue){var ae,$={},Ee=null;if(D!=null)for(ae in D.key!==void 0&&(Ee=""+D.key),D)B.call(D,ae)&&ae!=="key"&&ae!=="__self"&&ae!=="__source"&&($[ae]=D[ae]);var pe=arguments.length-2;if(pe===1)$.children=ue;else if(1<pe){for(var _t=Array(pe),Me=0;Me<pe;Me++)_t[Me]=arguments[Me+2];$.children=_t}if(_&&_.defaultProps)for(ae in pe=_.defaultProps,pe)$[ae]===void 0&&($[ae]=pe[ae]);return Y(_,Ee,void 0,void 0,null,$)},he.createRef=function(){return{current:null}},he.forwardRef=function(_){return{$$typeof:m,render:_}},he.isValidElement=j,he.lazy=function(_){return{$$typeof:b,_payload:{_status:-1,_result:_},_init:ce}},he.memo=function(_,D){return{$$typeof:y,type:_,compare:D===void 0?null:D}},he.startTransition=function(_){var D=be.T,ue={};be.T=ue;try{var ae=_(),$=be.S;$!==null&&$(ue,ae),typeof ae=="object"&&ae!==null&&typeof ae.then=="function"&&ae.then(Re,ne)}catch(Ee){ne(Ee)}finally{be.T=D}},he.unstable_useCacheRefresh=function(){return be.H.useCacheRefresh()},he.use=function(_){return be.H.use(_)},he.useActionState=function(_,D,ue){return be.H.useActionState(_,D,ue)},he.useCallback=function(_,D){return be.H.useCallback(_,D)},he.useContext=function(_){return be.H.useContext(_)},he.useDebugValue=function(){},he.useDeferredValue=function(_,D){return be.H.useDeferredValue(_,D)},he.useEffect=function(_,D){return be.H.useEffect(_,D)},he.useId=function(){return be.H.useId()},he.useImperativeHandle=function(_,D,ue){return be.H.useImperativeHandle(_,D,ue)},he.useInsertionEffect=function(_,D){return be.H.useInsertionEffect(_,D)},he.useLayoutEffect=function(_,D){return be.H.useLayoutEffect(_,D)},he.useMemo=function(_,D){return be.H.useMemo(_,D)},he.useOptimistic=function(_,D){return be.H.useOptimistic(_,D)},he.useReducer=function(_,D,ue){return be.H.useReducer(_,D,ue)},he.useRef=function(_){return be.H.useRef(_)},he.useState=function(_){return be.H.useState(_)},he.useSyncExternalStore=function(_,D,ue){return be.H.useSyncExternalStore(_,D,ue)},he.useTransition=function(){return be.H.useTransition()},he.version="19.0.0",he}var um;function lf(){return um||(um=1,fo.exports=Xb()),fo.exports}var mt=lf();const sf=mt.createContext(st.STORE);function qm(l,...n){let i;if(n.length===2){const u=n[0],c=n[1];if(l.config.lifespan==="immortal"){const f=Et(l,u,c);if(!f)throw new pa(u,c,l);i=f}else i=At(l,u,c)}else i=n[0];return i}function Ya(...l){const n=mt.useContext(sf),i=qm(n,...l),u=mt.useRef(null);return u.current===null&&(u.current=c=>{We(n,i,c)}),u.current}function Bt(...l){const n=mt.useContext(sf),i=qm(n,...l),u=mt.useId();return mt.useSyncExternalStore(c=>es(i,c,`use-o:${u}`,n),()=>wt(n,i),()=>wt(n,i))}const Qb=(l,{stringify:n,parse:i},u)=>({setSelf:c,onSet:f})=>{const d=l.getItem(u);d!=null&&c(i(d)),f(({newValue:m})=>{if(m==null){l.removeItem(u);return}l.setItem(u,n(m))})},Zm=Zt({key:"mySocketId__INTERNAL",default:void 0});Pa({key:"mySocketId",get:({get:l})=>l(Zm)});Zt({key:"myName",default:null,effects:typeof window>"u"?[]:[Qb(window.localStorage,JSON,"myUsername")]});const Mu=Zt({key:"updateQueue",default:[]}),ho=Zt({key:"serverConfirmedUpdateQueue",default:[]});function Jb(l,n,i){const u=l.key,c=wt(i,Mu),f=wt(i,ho),d=(y,b)=>{n.off(`continuity-init:${u}`,d);let O=0,k,C;for(const te of b)O%2===0?k=te:(C=te,"type"in k&&k.type==="mutable_atom"&&(k=Sa(i,k)),We(i,k,C)),O++;Ro(u,y,i)};n.off(`continuity-init:${u}`),n.on(`continuity-init:${u}`,d);const m=y=>{function b(k,C){if(i.logger.info("🧑‍⚖️","continuity",u,"reconciling updates"),We(i,Mu,L=>(L.shift(),L)),k.id===C.id){const L=JSON.stringify(k.updates),Q=JSON.stringify(C.updates);if(L===Q){i.logger.info("✅","continuity",u,`results for ${k.id} match between client and server`),n.emit(`ack:${u}`,C.epoch);return}}else i.logger.info("❌","continuity",u,`thought update #${C.epoch} was ${k.key}:${k.id}, but it was actually ${C.key}:${C.id}`);i.logger.info("🧑‍⚖️","continuity",u,"updates do not match",k,C);const te=c.toReversed();for(const L of te)qi("oldValue",L,i);i.logger.info("⏪","continuity",u,"undid optimistic updates:",te),qi("oldValue",k,i),i.logger.info("⏪","continuity",u,"undid zeroth optimistic update",k),qi("newValue",C,i),i.logger.info("⏩","continuity",u,"applied confirmed update",C),n.emit(`ack:${u}`,C.epoch);for(const L of c){const Q={type:"transaction",key:L.key},{id:G,params:P}=L;Xu(Q,G,i)(...P)}i.logger.info("⏩","continuity",u,"reapplied subsequent optimistic updates:",c)}i.logger.info("🧑‍⚖️","continuity",u,"integrating confirmed update",{confirmedUpdate:y,confirmedUpdates:f,optimisticUpdates:c});const O=c[0];if(O)if(i.logger.info("🧑‍⚖️","continuity",u,"has optimistic updates to reconcile"),y.epoch===O.epoch){i.logger.info("🧑‍⚖️","continuity",u,`epoch of confirmed update #${y.epoch} matches zeroth optimistic update`),b(O,y);for(const k of f){const C=c[0];if(k.epoch===(C==null?void 0:C.epoch))b(C,k);else break}}else i.logger.info("🧑‍⚖️","continuity",u,`epoch of confirmed update #${y.epoch} does not match zeroth optimistic update #${O.epoch}`),f.some(C=>C.epoch===y.epoch)||(i.logger.info("👈","continuity",u,"pushing confirmed update to queue",y),We(i,ho,C=>(C.push(y),C.sort((te,L)=>te.epoch-L.epoch),C)));else{i.logger.info("🧑‍⚖️","continuity",u,"has no optimistic updates to deal with");const k=Rb(u,i),C=Pt(i);C&&k===y.epoch-1?(i.logger.info("✅","continuity",u,`integrating update #${y.epoch} (${y.key} ${y.id})`),qi("newValue",y,i),n.emit(`ack:${u}`,y.epoch),Ro(u,y.epoch,i)):C&&k!==void 0&&(i.logger.info("🧑‍⚖️","continuity",u,`received update #${y.epoch} but still waiting for update #${k+1}`,{clientEpoch:k,serverEpoch:y.epoch}),f.some(L=>L.epoch===y.epoch)?i.logger.info("👍","continuity",u,`confirmed update #${y.epoch} is already enqueued`):(i.logger.info("👈","continuity",u,`pushing confirmed update #${y.epoch} to queue`),We(i,ho,L=>(L.push(y),L.sort((Q,G)=>Q.epoch-G.epoch),L))))}};n.off(`tx-new:${u}`),n.on(`tx-new:${u}`,m);const p=l.actions.map(y=>(Mm(u,y.key,i),Zb(y,O=>{i.logger.info("🤞","continuity",u,"enqueuing optimistic update");const k=c.findIndex(C=>C.id===O.id);k===-1?(i.logger.info("🤞","continuity",u,"enqueuing new optimistic update"),We(i,Mu,C=>(C.push(O),C.sort((te,L)=>te.epoch-L.epoch),C))):(i.logger.info("🤞","continuity",u,`replacing existing optimistic update at index ${k}`),We(i,Mu,C=>(C[k]=O,C))),n.emit(`tx-run:${u}`,{id:O.id,key:y.key,params:O.params})},`tx-run:${u}`,i)));return n.on(`reveal:${u}`,y=>{let b=0,O,k;for(const C of y)b%2===0?O=C:(k=C,Fb(O,k,i)),b++}),n.on(`conceal:${u}`,y=>{for(const b of y)af(b,i)}),n.emit(`get:${u}`),()=>{n.off(`continuity-init:${u}`),n.off(`tx-new:${u}`);for(const y of p)y()}}function Fb(l,n,i){if(n.family){const u=l.families.get(n.family.key);if(u){const c=l.molecules.get(n.family.subKey);if(c)Xa(c,u,l);else if(l.config.lifespan==="immortal")throw new Error(`No molecule found for key "${n.family.subKey}"`);Ki(l,u,Qa(n.family.subKey))}}We(l,n,i)}const Hm=mt.createContext({socket:null,services:null}),Wb=({children:l,socket:n})=>{const i=mt.useRef(new Map).current,u=Ya(Zm);return mt.useEffect(()=>{u(n==null?void 0:n.id),n==null||n.on("connect",()=>{u(n.id)}),n==null||n.on("disconnect",()=>{u(void 0)})},[n,u]),Z.jsx(Hm.Provider,{value:{socket:n,services:i},children:l})},{NODE_ENV:Ib}=globalThis.env??{},Pb=Ib==="development";function Nu(){}function e0(l,n){if(Pb){const i=mt.useRef(Nu);mt.useEffect(()=>{let u=i.current;if(u===Nu)u=l()??Nu,i.current=u;else return()=>{u(),i.current=Nu}},n)}else mt.useEffect(l,n)}function t0(l){e0(l,[])}function n0(l,n){const{socket:i,services:u}=mt.useContext(Hm);t0(()=>{let c=u==null?void 0:u.get(l);return c?c[0]++:(c=[1,i?n(i):void 0],u==null||u.set(l,c)),()=>{var f;c&&(c[0]--,c[0]===0&&((f=c[1])==null||f.call(c),u==null||u.delete(l)))}})}function a0(l){const n=mt.useContext(sf);n0(`tx-sync:${l.key}`,i=>Jb(l,i,n))}var yo={exports:{}},Ql={},mo={exports:{}},po={};/**
24
+ * @license React
25
+ * scheduler.production.js
26
+ *
27
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
28
+ *
29
+ * This source code is licensed under the MIT license found in the
30
+ * LICENSE file in the root directory of this source tree.
31
+ */var rm;function i0(){return rm||(rm=1,function(l){function n(q,ce){var ne=q.length;q.push(ce);e:for(;0<ne;){var Re=ne-1>>>1,_=q[Re];if(0<c(_,ce))q[Re]=ce,q[ne]=_,ne=Re;else break e}}function i(q){return q.length===0?null:q[0]}function u(q){if(q.length===0)return null;var ce=q[0],ne=q.pop();if(ne!==ce){q[0]=ne;e:for(var Re=0,_=q.length,D=_>>>1;Re<D;){var ue=2*(Re+1)-1,ae=q[ue],$=ue+1,Ee=q[$];if(0>c(ae,ne))$<_&&0>c(Ee,ae)?(q[Re]=Ee,q[$]=ne,Re=$):(q[Re]=ae,q[ue]=ne,Re=ue);else if($<_&&0>c(Ee,ne))q[Re]=Ee,q[$]=ne,Re=$;else break e}}return ce}function c(q,ce){var ne=q.sortIndex-ce.sortIndex;return ne!==0?ne:q.id-ce.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;l.unstable_now=function(){return f.now()}}else{var d=Date,m=d.now();l.unstable_now=function(){return d.now()-m}}var p=[],y=[],b=1,O=null,k=3,C=!1,te=!1,L=!1,Q=typeof setTimeout=="function"?setTimeout:null,G=typeof clearTimeout=="function"?clearTimeout:null,P=typeof setImmediate<"u"?setImmediate:null;function ye(q){for(var ce=i(y);ce!==null;){if(ce.callback===null)u(y);else if(ce.startTime<=q)u(y),ce.sortIndex=ce.expirationTime,n(p,ce);else break;ce=i(y)}}function Ie(q){if(L=!1,ye(q),!te)if(i(p)!==null)te=!0,Le();else{var ce=i(y);ce!==null&&je(Ie,ce.startTime-q)}}var be=!1,B=-1,Y=5,se=-1;function j(){return!(l.unstable_now()-se<Y)}function H(){if(be){var q=l.unstable_now();se=q;var ce=!0;try{e:{te=!1,L&&(L=!1,G(B),B=-1),C=!0;var ne=k;try{t:{for(ye(q),O=i(p);O!==null&&!(O.expirationTime>q&&j());){var Re=O.callback;if(typeof Re=="function"){O.callback=null,k=O.priorityLevel;var _=Re(O.expirationTime<=q);if(q=l.unstable_now(),typeof _=="function"){O.callback=_,ye(q),ce=!0;break t}O===i(p)&&u(p),ye(q)}else u(p);O=i(p)}if(O!==null)ce=!0;else{var D=i(y);D!==null&&je(Ie,D.startTime-q),ce=!1}}break e}finally{O=null,k=ne,C=!1}ce=void 0}}finally{ce?W():be=!1}}}var W;if(typeof P=="function")W=function(){P(H)};else if(typeof MessageChannel<"u"){var ie=new MessageChannel,Oe=ie.port2;ie.port1.onmessage=H,W=function(){Oe.postMessage(null)}}else W=function(){Q(H,0)};function Le(){be||(be=!0,W())}function je(q,ce){B=Q(function(){q(l.unstable_now())},ce)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function(q){q.callback=null},l.unstable_continueExecution=function(){te||C||(te=!0,Le())},l.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Y=0<q?Math.floor(1e3/q):5},l.unstable_getCurrentPriorityLevel=function(){return k},l.unstable_getFirstCallbackNode=function(){return i(p)},l.unstable_next=function(q){switch(k){case 1:case 2:case 3:var ce=3;break;default:ce=k}var ne=k;k=ce;try{return q()}finally{k=ne}},l.unstable_pauseExecution=function(){},l.unstable_requestPaint=function(){},l.unstable_runWithPriority=function(q,ce){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var ne=k;k=q;try{return ce()}finally{k=ne}},l.unstable_scheduleCallback=function(q,ce,ne){var Re=l.unstable_now();switch(typeof ne=="object"&&ne!==null?(ne=ne.delay,ne=typeof ne=="number"&&0<ne?Re+ne:Re):ne=Re,q){case 1:var _=-1;break;case 2:_=250;break;case 5:_=1073741823;break;case 4:_=1e4;break;default:_=5e3}return _=ne+_,q={id:b++,callback:ce,priorityLevel:q,startTime:ne,expirationTime:_,sortIndex:-1},ne>Re?(q.sortIndex=ne,n(y,q),i(p)===null&&q===i(y)&&(L?(G(B),B=-1):L=!0,je(Ie,ne-Re))):(q.sortIndex=_,n(p,q),te||C||(te=!0,Le())),q},l.unstable_shouldYield=j,l.unstable_wrapCallback=function(q){var ce=k;return function(){var ne=k;k=ce;try{return q.apply(this,arguments)}finally{k=ne}}}}(po)),po}var cm;function l0(){return cm||(cm=1,mo.exports=i0()),mo.exports}var go={exports:{}},vt={};/**
32
+ * @license React
33
+ * react-dom.production.js
34
+ *
35
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
36
+ *
37
+ * This source code is licensed under the MIT license found in the
38
+ * LICENSE file in the root directory of this source tree.
39
+ */var om;function s0(){if(om)return vt;om=1;var l=lf();function n(p){var y="https://react.dev/errors/"+p;if(1<arguments.length){y+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)y+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+p+"; visit "+y+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var u={d:{f:i,r:function(){throw Error(n(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},c=Symbol.for("react.portal");function f(p,y,b){var O=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:O==null?null:""+O,children:p,containerInfo:y,implementation:b}}var d=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(p,y){if(p==="font")return"";if(typeof y=="string")return y==="use-credentials"?y:""}return vt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,vt.createPortal=function(p,y){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!y||y.nodeType!==1&&y.nodeType!==9&&y.nodeType!==11)throw Error(n(299));return f(p,y,null,b)},vt.flushSync=function(p){var y=d.T,b=u.p;try{if(d.T=null,u.p=2,p)return p()}finally{d.T=y,u.p=b,u.d.f()}},vt.preconnect=function(p,y){typeof p=="string"&&(y?(y=y.crossOrigin,y=typeof y=="string"?y==="use-credentials"?y:"":void 0):y=null,u.d.C(p,y))},vt.prefetchDNS=function(p){typeof p=="string"&&u.d.D(p)},vt.preinit=function(p,y){if(typeof p=="string"&&y&&typeof y.as=="string"){var b=y.as,O=m(b,y.crossOrigin),k=typeof y.integrity=="string"?y.integrity:void 0,C=typeof y.fetchPriority=="string"?y.fetchPriority:void 0;b==="style"?u.d.S(p,typeof y.precedence=="string"?y.precedence:void 0,{crossOrigin:O,integrity:k,fetchPriority:C}):b==="script"&&u.d.X(p,{crossOrigin:O,integrity:k,fetchPriority:C,nonce:typeof y.nonce=="string"?y.nonce:void 0})}},vt.preinitModule=function(p,y){if(typeof p=="string")if(typeof y=="object"&&y!==null){if(y.as==null||y.as==="script"){var b=m(y.as,y.crossOrigin);u.d.M(p,{crossOrigin:b,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0})}}else y==null&&u.d.M(p)},vt.preload=function(p,y){if(typeof p=="string"&&typeof y=="object"&&y!==null&&typeof y.as=="string"){var b=y.as,O=m(b,y.crossOrigin);u.d.L(p,b,{crossOrigin:O,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0,type:typeof y.type=="string"?y.type:void 0,fetchPriority:typeof y.fetchPriority=="string"?y.fetchPriority:void 0,referrerPolicy:typeof y.referrerPolicy=="string"?y.referrerPolicy:void 0,imageSrcSet:typeof y.imageSrcSet=="string"?y.imageSrcSet:void 0,imageSizes:typeof y.imageSizes=="string"?y.imageSizes:void 0,media:typeof y.media=="string"?y.media:void 0})}},vt.preloadModule=function(p,y){if(typeof p=="string")if(y){var b=m(y.as,y.crossOrigin);u.d.m(p,{as:typeof y.as=="string"&&y.as!=="script"?y.as:void 0,crossOrigin:b,integrity:typeof y.integrity=="string"?y.integrity:void 0})}else u.d.m(p)},vt.requestFormReset=function(p){u.d.r(p)},vt.unstable_batchedUpdates=function(p,y){return p(y)},vt.useFormState=function(p,y,b){return d.H.useFormState(p,y,b)},vt.useFormStatus=function(){return d.H.useHostTransitionStatus()},vt.version="19.0.0",vt}var fm;function u0(){if(fm)return go.exports;fm=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(n){console.error(n)}}return l(),go.exports=s0(),go.exports}/**
40
+ * @license React
41
+ * react-dom-client.production.js
42
+ *
43
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
44
+ *
45
+ * This source code is licensed under the MIT license found in the
46
+ * LICENSE file in the root directory of this source tree.
47
+ */var dm;function r0(){if(dm)return Ql;dm=1;var l=l0(),n=lf(),i=u0();function u(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}var f=Symbol.for("react.element"),d=Symbol.for("react.transitional.element"),m=Symbol.for("react.portal"),p=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),O=Symbol.for("react.provider"),k=Symbol.for("react.consumer"),C=Symbol.for("react.context"),te=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),Q=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),ye=Symbol.for("react.offscreen"),Ie=Symbol.for("react.memo_cache_sentinel"),be=Symbol.iterator;function B(e){return e===null||typeof e!="object"?null:(e=be&&e[be]||e["@@iterator"],typeof e=="function"?e:null)}var Y=Symbol.for("react.client.reference");function se(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Y?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case p:return"Fragment";case m:return"Portal";case b:return"Profiler";case y:return"StrictMode";case L:return"Suspense";case Q:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case C:return(e.displayName||"Context")+".Provider";case k:return(e._context.displayName||"Context")+".Consumer";case te:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case G:return t=e.displayName||null,t!==null?t:se(e.type)||"Memo";case P:t=e._payload,e=e._init;try{return se(e(t))}catch{}}return null}var j=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H=Object.assign,W,ie;function Oe(e){if(W===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);W=t&&t[1]||"",ie=-1<a.stack.indexOf(`
48
+ at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
49
+ `+W+e+ie}var Le=!1;function je(e,t){if(!e||Le)return"";Le=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var N=function(){throw Error()};if(Object.defineProperty(N.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(N,[])}catch(R){var w=R}Reflect.construct(e,[],N)}else{try{N.call()}catch(R){w=R}e.call(N.prototype)}}else{try{throw Error()}catch(R){w=R}(N=e())&&typeof N.catch=="function"&&N.catch(function(){})}}catch(R){if(R&&w&&typeof R.stack=="string")return[R.stack,w.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var o=s.DetermineComponentFrameRoot(),h=o[0],g=o[1];if(h&&g){var v=h.split(`
50
+ `),T=g.split(`
51
+ `);for(r=s=0;s<v.length&&!v[s].includes("DetermineComponentFrameRoot");)s++;for(;r<T.length&&!T[r].includes("DetermineComponentFrameRoot");)r++;if(s===v.length||r===T.length)for(s=v.length-1,r=T.length-1;1<=s&&0<=r&&v[s]!==T[r];)r--;for(;1<=s&&0<=r;s--,r--)if(v[s]!==T[r]){if(s!==1||r!==1)do if(s--,r--,0>r||v[s]!==T[r]){var x=`
52
+ `+v[s].replace(" at new "," at ");return e.displayName&&x.includes("<anonymous>")&&(x=x.replace("<anonymous>",e.displayName)),x}while(1<=s&&0<=r);break}}}finally{Le=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Oe(a):""}function q(e){switch(e.tag){case 26:case 27:case 5:return Oe(e.type);case 16:return Oe("Lazy");case 13:return Oe("Suspense");case 19:return Oe("SuspenseList");case 0:case 15:return e=je(e.type,!1),e;case 11:return e=je(e.type.render,!1),e;case 1:return e=je(e.type,!0),e;default:return""}}function ce(e){try{var t="";do t+=q(e),e=e.return;while(e);return t}catch(a){return`
53
+ Error generating stack: `+a.message+`
54
+ `+a.stack}}function ne(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function Re(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 _(e){if(ne(e)!==e)throw Error(u(188))}function D(e){var t=e.alternate;if(!t){if(t=ne(e),t===null)throw Error(u(188));return t!==e?null:e}for(var a=e,s=t;;){var r=a.return;if(r===null)break;var o=r.alternate;if(o===null){if(s=r.return,s!==null){a=s;continue}break}if(r.child===o.child){for(o=r.child;o;){if(o===a)return _(r),e;if(o===s)return _(r),t;o=o.sibling}throw Error(u(188))}if(a.return!==s.return)a=r,s=o;else{for(var h=!1,g=r.child;g;){if(g===a){h=!0,a=r,s=o;break}if(g===s){h=!0,s=r,a=o;break}g=g.sibling}if(!h){for(g=o.child;g;){if(g===a){h=!0,a=o,s=r;break}if(g===s){h=!0,s=o,a=r;break}g=g.sibling}if(!h)throw Error(u(189))}}if(a.alternate!==s)throw Error(u(190))}if(a.tag!==3)throw Error(u(188));return a.stateNode.current===a?e:t}function ue(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=ue(e),t!==null)return t;e=e.sibling}return null}var ae=Array.isArray,$=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ee={pending:!1,data:null,method:null,action:null},pe=[],_t=-1;function Me(e){return{current:e}}function Pe(e){0>_t||(e.current=pe[_t],pe[_t]=null,_t--)}function He(e,t){_t++,pe[_t]=e.current,e.current=t}var cn=Me(null),Fi=Me(null),$n=Me(null),ps=Me(null);function gs(e,t){switch(He($n,t),He(Fi,e),He(cn,null),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)&&(t=t.namespaceURI)?ky(t):0;break;default:if(e=e===8?t.parentNode:t,t=e.tagName,e=e.namespaceURI)e=ky(e),t=My(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}Pe(cn),He(cn,t)}function ei(){Pe(cn),Pe(Fi),Pe($n)}function er(e){e.memoizedState!==null&&He(ps,e);var t=cn.current,a=My(t,e.type);t!==a&&(He(Fi,e),He(cn,a))}function vs(e){Fi.current===e&&(Pe(cn),Pe(Fi)),ps.current===e&&(Pe(ps),Ll._currentValue=Ee)}var tr=Object.prototype.hasOwnProperty,nr=l.unstable_scheduleCallback,ar=l.unstable_cancelCallback,Sp=l.unstable_shouldYield,Tp=l.unstable_requestPaint,on=l.unstable_now,Ep=l.unstable_getCurrentPriorityLevel,vf=l.unstable_ImmediatePriority,bf=l.unstable_UserBlockingPriority,bs=l.unstable_NormalPriority,Ap=l.unstable_LowPriority,_f=l.unstable_IdlePriority,wp=l.log,Op=l.unstable_setDisableYieldValue,Wi=null,Mt=null;function Rp(e){if(Mt&&typeof Mt.onCommitFiberRoot=="function")try{Mt.onCommitFiberRoot(Wi,e,void 0,(e.current.flags&128)===128)}catch{}}function Gn(e){if(typeof wp=="function"&&Op(e),Mt&&typeof Mt.setStrictMode=="function")try{Mt.setStrictMode(Wi,e)}catch{}}var Nt=Math.clz32?Math.clz32:Mp,xp=Math.log,kp=Math.LN2;function Mp(e){return e>>>=0,e===0?32:31-(xp(e)/kp|0)|0}var _s=128,Ss=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: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&4194176;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 Ts(e,t){var a=e.pendingLanes;if(a===0)return 0;var s=0,r=e.suspendedLanes,o=e.pingedLanes,h=e.warmLanes;e=e.finishedLanes!==0;var g=a&134217727;return g!==0?(a=g&~r,a!==0?s=Ta(a):(o&=g,o!==0?s=Ta(o):e||(h=g&~h,h!==0&&(s=Ta(h))))):(g=a&~r,g!==0?s=Ta(g):o!==0?s=Ta(o):e||(h=a&~h,h!==0&&(s=Ta(h)))),s===0?0:t!==0&&t!==s&&!(t&r)&&(r=s&-s,h=t&-t,r>=h||r===32&&(h&4194176)!==0)?t:s}function Ii(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Np(e,t){switch(e){case 1:case 2:case 4:case 8:return t+250;case 16:case 32:case 64: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 Sf(){var e=_s;return _s<<=1,!(_s&4194176)&&(_s=128),e}function Tf(){var e=Ss;return Ss<<=1,!(Ss&62914560)&&(Ss=4194304),e}function ir(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Pi(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Cp(e,t,a,s,r,o){var h=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var g=e.entanglements,v=e.expirationTimes,T=e.hiddenUpdates;for(a=h&~a;0<a;){var x=31-Nt(a),N=1<<x;g[x]=0,v[x]=-1;var w=T[x];if(w!==null)for(T[x]=null,x=0;x<w.length;x++){var R=w[x];R!==null&&(R.lane&=-536870913)}a&=~N}s!==0&&Ef(e,s,0),o!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=o&~(h&~t))}function Ef(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-Nt(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|a&4194218}function Af(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var s=31-Nt(a),r=1<<s;r&t|e[s]&t&&(e[s]|=t),a&=~r}}function wf(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function Of(){var e=$.p;return e!==0?e:(e=window.event,e===void 0?32:Qy(e.type))}function Dp(e,t){var a=$.p;try{return $.p=e,t()}finally{$.p=a}}var Xn=Math.random().toString(36).slice(2),pt="__reactFiber$"+Xn,Rt="__reactProps$"+Xn,ti="__reactContainer$"+Xn,lr="__reactEvents$"+Xn,zp="__reactListeners$"+Xn,Up="__reactHandles$"+Xn,Rf="__reactResources$"+Xn,el="__reactMarker$"+Xn;function sr(e){delete e[pt],delete e[Rt],delete e[lr],delete e[zp],delete e[Up]}function Ea(e){var t=e[pt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[ti]||a[pt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=Dy(e);e!==null;){if(a=e[pt])return a;e=Dy(e)}return t}e=a,a=e.parentNode}return null}function ni(e){if(e=e[pt]||e[ti]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function tl(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(u(33))}function ai(e){var t=e[Rf];return t||(t=e[Rf]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ut(e){e[el]=!0}var xf=new Set,kf={};function Aa(e,t){ii(e,t),ii(e+"Capture",t)}function ii(e,t){for(kf[e]=t,e=0;e<t.length;e++)xf.add(t[e])}var En=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),jp=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]*$"),Mf={},Nf={};function Bp(e){return tr.call(Nf,e)?!0:tr.call(Mf,e)?!1:jp.test(e)?Nf[e]=!0:(Mf[e]=!0,!1)}function Es(e,t,a){if(Bp(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var s=t.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function As(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function An(e,t,a,s){if(s===null)e.removeAttribute(a);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+s)}}function Ht(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Cf(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function qp(e){var t=Cf(e)?"checked":"value",a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),s=""+e[t];if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var r=a.get,o=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(h){s=""+h,o.call(this,h)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return s},setValue:function(h){s=""+h},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ws(e){e._valueTracker||(e._valueTracker=qp(e))}function Df(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),s="";return e&&(s=Cf(e)?e.checked?"true":"false":e.value),e=s,e!==a?(t.setValue(e),!0):!1}function Os(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 Zp=/[\n"\\]/g;function Vt(e){return e.replace(Zp,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ur(e,t,a,s,r,o,h,g){e.name="",h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.type=h:e.removeAttribute("type"),t!=null?h==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ht(t)):e.value!==""+Ht(t)&&(e.value=""+Ht(t)):h!=="submit"&&h!=="reset"||e.removeAttribute("value"),t!=null?rr(e,h,Ht(t)):a!=null?rr(e,h,Ht(a)):s!=null&&e.removeAttribute("value"),r==null&&o!=null&&(e.defaultChecked=!!o),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?e.name=""+Ht(g):e.removeAttribute("name")}function zf(e,t,a,s,r,o,h,g){if(o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.type=o),t!=null||a!=null){if(!(o!=="submit"&&o!=="reset"||t!=null))return;a=a!=null?""+Ht(a):"",t=t!=null?""+Ht(t):a,g||t===e.value||(e.value=t),e.defaultValue=t}s=s??r,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=g?e.checked:!!s,e.defaultChecked=!!s,h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.name=h)}function rr(e,t,a){t==="number"&&Os(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function li(e,t,a,s){if(e=e.options,t){t={};for(var r=0;r<a.length;r++)t["$"+a[r]]=!0;for(a=0;a<e.length;a++)r=t.hasOwnProperty("$"+e[a].value),e[a].selected!==r&&(e[a].selected=r),r&&s&&(e[a].defaultSelected=!0)}else{for(a=""+Ht(a),t=null,r=0;r<e.length;r++){if(e[r].value===a){e[r].selected=!0,s&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function Uf(e,t,a){if(t!=null&&(t=""+Ht(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Ht(a):""}function jf(e,t,a,s){if(t==null){if(s!=null){if(a!=null)throw Error(u(92));if(ae(s)){if(1<s.length)throw Error(u(93));s=s[0]}a=s}a==null&&(a=""),t=a}a=Ht(t),e.defaultValue=a,s=e.textContent,s===a&&s!==""&&s!==null&&(e.value=s)}function si(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Hp=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 Bf(e,t,a){var s=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?s?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":s?e.setProperty(t,a):typeof a!="number"||a===0||Hp.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function qf(e,t,a){if(t!=null&&typeof t!="object")throw Error(u(62));if(e=e.style,a!=null){for(var s in a)!a.hasOwnProperty(s)||t!=null&&t.hasOwnProperty(s)||(s.indexOf("--")===0?e.setProperty(s,""):s==="float"?e.cssFloat="":e[s]="");for(var r in t)s=t[r],t.hasOwnProperty(r)&&a[r]!==s&&Bf(e,r,s)}else for(var o in t)t.hasOwnProperty(o)&&Bf(e,o,t[o])}function cr(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 Vp=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"]]),Lp=/^[\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 Rs(e){return Lp.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var or=null;function fr(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ui=null,ri=null;function Zf(e){var t=ni(e);if(t&&(e=t.stateNode)){var a=e[Rt]||null;e:switch(e=t.stateNode,t.type){case"input":if(ur(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Vt(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var s=a[t];if(s!==e&&s.form===e.form){var r=s[Rt]||null;if(!r)throw Error(u(90));ur(s,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<a.length;t++)s=a[t],s.form===e.form&&Df(s)}break e;case"textarea":Uf(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&li(e,!!a.multiple,t,!1)}}}var dr=!1;function Hf(e,t,a){if(dr)return e(t,a);dr=!0;try{var s=e(t);return s}finally{if(dr=!1,(ui!==null||ri!==null)&&(ou(),ui&&(t=ui,e=ri,ri=ui=null,Zf(t),e)))for(t=0;t<e.length;t++)Zf(e[t])}}function nl(e,t){var a=e.stateNode;if(a===null)return null;var s=a[Rt]||null;if(s===null)return null;a=s[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":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(u(231,t,typeof a));return a}var hr=!1;if(En)try{var al={};Object.defineProperty(al,"passive",{get:function(){hr=!0}}),window.addEventListener("test",al,al),window.removeEventListener("test",al,al)}catch{hr=!1}var Qn=null,yr=null,xs=null;function Vf(){if(xs)return xs;var e,t=yr,a=t.length,s,r="value"in Qn?Qn.value:Qn.textContent,o=r.length;for(e=0;e<a&&t[e]===r[e];e++);var h=a-e;for(s=1;s<=h&&t[a-s]===r[o-s];s++);return xs=r.slice(e,1<s?1-s:void 0)}function ks(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 Ms(){return!0}function Lf(){return!1}function xt(e){function t(a,s,r,o,h){this._reactName=a,this._targetInst=r,this.type=s,this.nativeEvent=o,this.target=h,this.currentTarget=null;for(var g in e)e.hasOwnProperty(g)&&(a=e[g],this[g]=a?a(o):o[g]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Ms:Lf,this.isPropagationStopped=Lf,this}return H(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Ms)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Ms)},persist:function(){},isPersistent:Ms}),t}var wa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ns=xt(wa),il=H({},wa,{view:0,detail:0}),Kp=xt(il),mr,pr,ll,Cs=H({},il,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:vr,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!==ll&&(ll&&e.type==="mousemove"?(mr=e.screenX-ll.screenX,pr=e.screenY-ll.screenY):pr=mr=0,ll=e),mr)},movementY:function(e){return"movementY"in e?e.movementY:pr}}),Kf=xt(Cs),Yp=H({},Cs,{dataTransfer:0}),$p=xt(Yp),Gp=H({},il,{relatedTarget:0}),gr=xt(Gp),Xp=H({},wa,{animationName:0,elapsedTime:0,pseudoElement:0}),Qp=xt(Xp),Jp=H({},wa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Fp=xt(Jp),Wp=H({},wa,{data:0}),Yf=xt(Wp),Ip={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Pp={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"},eg={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function tg(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=eg[e])?!!t[e]:!1}function vr(){return tg}var ng=H({},il,{key:function(e){if(e.key){var t=Ip[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ks(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Pp[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:vr,charCode:function(e){return e.type==="keypress"?ks(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ks(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),ag=xt(ng),ig=H({},Cs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),$f=xt(ig),lg=H({},il,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:vr}),sg=xt(lg),ug=H({},wa,{propertyName:0,elapsedTime:0,pseudoElement:0}),rg=xt(ug),cg=H({},Cs,{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}),og=xt(cg),fg=H({},wa,{newState:0,oldState:0}),dg=xt(fg),hg=[9,13,27,32],br=En&&"CompositionEvent"in window,sl=null;En&&"documentMode"in document&&(sl=document.documentMode);var yg=En&&"TextEvent"in window&&!sl,Gf=En&&(!br||sl&&8<sl&&11>=sl),Xf=" ",Qf=!1;function Jf(e,t){switch(e){case"keyup":return hg.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ff(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ci=!1;function mg(e,t){switch(e){case"compositionend":return Ff(t);case"keypress":return t.which!==32?null:(Qf=!0,Xf);case"textInput":return e=t.data,e===Xf&&Qf?null:e;default:return null}}function pg(e,t){if(ci)return e==="compositionend"||!br&&Jf(e,t)?(e=Vf(),xs=yr=Qn=null,ci=!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 Gf&&t.locale!=="ko"?null:t.data;default:return null}}var gg={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 Wf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!gg[e.type]:t==="textarea"}function If(e,t,a,s){ui?ri?ri.push(s):ri=[s]:ui=s,t=mu(t,"onChange"),0<t.length&&(a=new Ns("onChange","change",null,a,s),e.push({event:a,listeners:t}))}var ul=null,rl=null;function vg(e){Ay(e,0)}function Ds(e){var t=tl(e);if(Df(t))return e}function Pf(e,t){if(e==="change")return t}var ed=!1;if(En){var _r;if(En){var Sr="oninput"in document;if(!Sr){var td=document.createElement("div");td.setAttribute("oninput","return;"),Sr=typeof td.oninput=="function"}_r=Sr}else _r=!1;ed=_r&&(!document.documentMode||9<document.documentMode)}function nd(){ul&&(ul.detachEvent("onpropertychange",ad),rl=ul=null)}function ad(e){if(e.propertyName==="value"&&Ds(rl)){var t=[];If(t,rl,e,fr(e)),Hf(vg,t)}}function bg(e,t,a){e==="focusin"?(nd(),ul=t,rl=a,ul.attachEvent("onpropertychange",ad)):e==="focusout"&&nd()}function _g(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ds(rl)}function Sg(e,t){if(e==="click")return Ds(t)}function Tg(e,t){if(e==="input"||e==="change")return Ds(t)}function Eg(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ct=typeof Object.is=="function"?Object.is:Eg;function cl(e,t){if(Ct(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),s=Object.keys(t);if(a.length!==s.length)return!1;for(s=0;s<a.length;s++){var r=a[s];if(!tr.call(t,r)||!Ct(e[r],t[r]))return!1}return!0}function id(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ld(e,t){var a=id(e);e=0;for(var s;a;){if(a.nodeType===3){if(s=e+a.textContent.length,e<=t&&s>=t)return{node:a,offset:t-e};e=s}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=id(a)}}function sd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?sd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ud(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Os(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=Os(e.document)}return t}function Tr(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")}function Ag(e,t){var a=ud(t);t=e.focusedElem;var s=e.selectionRange;if(a!==t&&t&&t.ownerDocument&&sd(t.ownerDocument.documentElement,t)){if(s!==null&&Tr(t)){if(e=s.start,a=s.end,a===void 0&&(a=e),"selectionStart"in t)t.selectionStart=e,t.selectionEnd=Math.min(a,t.value.length);else if(a=(e=t.ownerDocument||document)&&e.defaultView||window,a.getSelection){a=a.getSelection();var r=t.textContent.length,o=Math.min(s.start,r);s=s.end===void 0?o:Math.min(s.end,r),!a.extend&&o>s&&(r=s,s=o,o=r),r=ld(t,o);var h=ld(t,s);r&&h&&(a.rangeCount!==1||a.anchorNode!==r.node||a.anchorOffset!==r.offset||a.focusNode!==h.node||a.focusOffset!==h.offset)&&(e=e.createRange(),e.setStart(r.node,r.offset),a.removeAllRanges(),o>s?(a.addRange(e),a.extend(h.node,h.offset)):(e.setEnd(h.node,h.offset),a.addRange(e)))}}for(e=[],a=t;a=a.parentNode;)a.nodeType===1&&e.push({element:a,left:a.scrollLeft,top:a.scrollTop});for(typeof t.focus=="function"&&t.focus(),t=0;t<e.length;t++)a=e[t],a.element.scrollLeft=a.left,a.element.scrollTop=a.top}}var wg=En&&"documentMode"in document&&11>=document.documentMode,oi=null,Er=null,ol=null,Ar=!1;function rd(e,t,a){var s=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Ar||oi==null||oi!==Os(s)||(s=oi,"selectionStart"in s&&Tr(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),ol&&cl(ol,s)||(ol=s,s=mu(Er,"onSelect"),0<s.length&&(t=new Ns("onSelect","select",null,t,a),e.push({event:t,listeners:s}),t.target=oi)))}function Oa(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var fi={animationend:Oa("Animation","AnimationEnd"),animationiteration:Oa("Animation","AnimationIteration"),animationstart:Oa("Animation","AnimationStart"),transitionrun:Oa("Transition","TransitionRun"),transitionstart:Oa("Transition","TransitionStart"),transitioncancel:Oa("Transition","TransitionCancel"),transitionend:Oa("Transition","TransitionEnd")},wr={},cd={};En&&(cd=document.createElement("div").style,"AnimationEvent"in window||(delete fi.animationend.animation,delete fi.animationiteration.animation,delete fi.animationstart.animation),"TransitionEvent"in window||delete fi.transitionend.transition);function Ra(e){if(wr[e])return wr[e];if(!fi[e])return e;var t=fi[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in cd)return wr[e]=t[a];return e}var od=Ra("animationend"),fd=Ra("animationiteration"),dd=Ra("animationstart"),Og=Ra("transitionrun"),Rg=Ra("transitionstart"),xg=Ra("transitioncancel"),hd=Ra("transitionend"),yd=new Map,md="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 scrollEnd toggle touchMove waiting wheel".split(" ");function en(e,t){yd.set(e,t),Aa(t,[e])}var Lt=[],di=0,Or=0;function zs(){for(var e=di,t=Or=di=0;t<e;){var a=Lt[t];Lt[t++]=null;var s=Lt[t];Lt[t++]=null;var r=Lt[t];Lt[t++]=null;var o=Lt[t];if(Lt[t++]=null,s!==null&&r!==null){var h=s.pending;h===null?r.next=r:(r.next=h.next,h.next=r),s.pending=r}o!==0&&pd(a,r,o)}}function Us(e,t,a,s){Lt[di++]=e,Lt[di++]=t,Lt[di++]=a,Lt[di++]=s,Or|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function Rr(e,t,a,s){return Us(e,t,a,s),js(e)}function Jn(e,t){return Us(e,null,null,t),js(e)}function pd(e,t,a){e.lanes|=a;var s=e.alternate;s!==null&&(s.lanes|=a);for(var r=!1,o=e.return;o!==null;)o.childLanes|=a,s=o.alternate,s!==null&&(s.childLanes|=a),o.tag===22&&(e=o.stateNode,e===null||e._visibility&1||(r=!0)),e=o,o=o.return;r&&t!==null&&e.tag===3&&(o=e.stateNode,r=31-Nt(a),o=o.hiddenUpdates,e=o[r],e===null?o[r]=[t]:e.push(t),t.lane=a|536870912)}function js(e){if(50<Ul)throw Ul=0,Dc=null,Error(u(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var hi={},gd=new WeakMap;function Kt(e,t){if(typeof e=="object"&&e!==null){var a=gd.get(e);return a!==void 0?a:(t={value:e,source:t,stack:ce(t)},gd.set(e,t),t)}return{value:e,source:t,stack:ce(t)}}var yi=[],mi=0,Bs=null,qs=0,Yt=[],$t=0,xa=null,wn=1,On="";function ka(e,t){yi[mi++]=qs,yi[mi++]=Bs,Bs=e,qs=t}function vd(e,t,a){Yt[$t++]=wn,Yt[$t++]=On,Yt[$t++]=xa,xa=e;var s=wn;e=On;var r=32-Nt(s)-1;s&=~(1<<r),a+=1;var o=32-Nt(t)+r;if(30<o){var h=r-r%5;o=(s&(1<<h)-1).toString(32),s>>=h,r-=h,wn=1<<32-Nt(t)+r|a<<r|s,On=o+e}else wn=1<<o|a<<r|s,On=e}function xr(e){e.return!==null&&(ka(e,1),vd(e,1,0))}function kr(e){for(;e===Bs;)Bs=yi[--mi],yi[mi]=null,qs=yi[--mi],yi[mi]=null;for(;e===xa;)xa=Yt[--$t],Yt[$t]=null,On=Yt[--$t],Yt[$t]=null,wn=Yt[--$t],Yt[$t]=null}var St=null,dt=null,xe=!1,tn=null,fn=!1,Mr=Error(u(519));function Ma(e){var t=Error(u(418,""));throw hl(Kt(t,e)),Mr}function bd(e){var t=e.stateNode,a=e.type,s=e.memoizedProps;switch(t[pt]=e,t[Rt]=s,a){case"dialog":Se("cancel",t),Se("close",t);break;case"iframe":case"object":case"embed":Se("load",t);break;case"video":case"audio":for(a=0;a<Bl.length;a++)Se(Bl[a],t);break;case"source":Se("error",t);break;case"img":case"image":case"link":Se("error",t),Se("load",t);break;case"details":Se("toggle",t);break;case"input":Se("invalid",t),zf(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0),ws(t);break;case"select":Se("invalid",t);break;case"textarea":Se("invalid",t),jf(t,s.value,s.defaultValue,s.children),ws(t)}a=s.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||s.suppressHydrationWarning===!0||xy(t.textContent,a)?(s.popover!=null&&(Se("beforetoggle",t),Se("toggle",t)),s.onScroll!=null&&Se("scroll",t),s.onScrollEnd!=null&&Se("scrollend",t),s.onClick!=null&&(t.onclick=pu),t=!0):t=!1,t||Ma(e)}function _d(e){for(St=e.return;St;)switch(St.tag){case 3:case 27:fn=!0;return;case 5:case 13:fn=!1;return;default:St=St.return}}function fl(e){if(e!==St)return!1;if(!xe)return _d(e),xe=!0,!1;var t=!1,a;if((a=e.tag!==3&&e.tag!==27)&&((a=e.tag===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Fc(e.type,e.memoizedProps)),a=!a),a&&(t=!0),t&&dt&&Ma(e),_d(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8)if(a=e.data,a==="/$"){if(t===0){dt=an(e.nextSibling);break e}t--}else a!=="$"&&a!=="$!"&&a!=="$?"||t++;e=e.nextSibling}dt=null}}else dt=St?an(e.stateNode.nextSibling):null;return!0}function dl(){dt=St=null,xe=!1}function hl(e){tn===null?tn=[e]:tn.push(e)}var yl=Error(u(460)),Sd=Error(u(474)),Nr={then:function(){}};function Td(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Zs(){}function Ed(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Zs,Zs),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,e===yl?Error(u(483)):e;default:if(typeof t.status=="string")t.then(Zs,Zs);else{if(e=qe,e!==null&&100<e.shellSuspendCounter)throw Error(u(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var r=t;r.status="fulfilled",r.value=s}},function(s){if(t.status==="pending"){var r=t;r.status="rejected",r.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,e===yl?Error(u(483)):e}throw ml=t,yl}}var ml=null;function Ad(){if(ml===null)throw Error(u(459));var e=ml;return ml=null,e}var pi=null,pl=0;function Hs(e){var t=pl;return pl+=1,pi===null&&(pi=[]),Ed(pi,e,t)}function gl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Vs(e,t){throw t.$$typeof===f?Error(u(525)):(e=Object.prototype.toString.call(t),Error(u(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function wd(e){var t=e._init;return t(e._payload)}function Od(e){function t(E,S){if(e){var A=E.deletions;A===null?(E.deletions=[S],E.flags|=16):A.push(S)}}function a(E,S){if(!e)return null;for(;S!==null;)t(E,S),S=S.sibling;return null}function s(E){for(var S=new Map;E!==null;)E.key!==null?S.set(E.key,E):S.set(E.index,E),E=E.sibling;return S}function r(E,S){return E=ua(E,S),E.index=0,E.sibling=null,E}function o(E,S,A){return E.index=A,e?(A=E.alternate,A!==null?(A=A.index,A<S?(E.flags|=33554434,S):A):(E.flags|=33554434,S)):(E.flags|=1048576,S)}function h(E){return e&&E.alternate===null&&(E.flags|=33554434),E}function g(E,S,A,M){return S===null||S.tag!==6?(S=wc(A,E.mode,M),S.return=E,S):(S=r(S,A),S.return=E,S)}function v(E,S,A,M){var X=A.type;return X===p?x(E,S,A.props.children,M,A.key):S!==null&&(S.elementType===X||typeof X=="object"&&X!==null&&X.$$typeof===P&&wd(X)===S.type)?(S=r(S,A.props),gl(S,A),S.return=E,S):(S=lu(A.type,A.key,A.props,null,E.mode,M),gl(S,A),S.return=E,S)}function T(E,S,A,M){return S===null||S.tag!==4||S.stateNode.containerInfo!==A.containerInfo||S.stateNode.implementation!==A.implementation?(S=Oc(A,E.mode,M),S.return=E,S):(S=r(S,A.children||[]),S.return=E,S)}function x(E,S,A,M,X){return S===null||S.tag!==7?(S=Ha(A,E.mode,M,X),S.return=E,S):(S=r(S,A),S.return=E,S)}function N(E,S,A){if(typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint")return S=wc(""+S,E.mode,A),S.return=E,S;if(typeof S=="object"&&S!==null){switch(S.$$typeof){case d:return A=lu(S.type,S.key,S.props,null,E.mode,A),gl(A,S),A.return=E,A;case m:return S=Oc(S,E.mode,A),S.return=E,S;case P:var M=S._init;return S=M(S._payload),N(E,S,A)}if(ae(S)||B(S))return S=Ha(S,E.mode,A,null),S.return=E,S;if(typeof S.then=="function")return N(E,Hs(S),A);if(S.$$typeof===C)return N(E,nu(E,S),A);Vs(E,S)}return null}function w(E,S,A,M){var X=S!==null?S.key:null;if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return X!==null?null:g(E,S,""+A,M);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case d:return A.key===X?v(E,S,A,M):null;case m:return A.key===X?T(E,S,A,M):null;case P:return X=A._init,A=X(A._payload),w(E,S,A,M)}if(ae(A)||B(A))return X!==null?null:x(E,S,A,M,null);if(typeof A.then=="function")return w(E,S,Hs(A),M);if(A.$$typeof===C)return w(E,S,nu(E,A),M);Vs(E,A)}return null}function R(E,S,A,M,X){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return E=E.get(A)||null,g(S,E,""+M,X);if(typeof M=="object"&&M!==null){switch(M.$$typeof){case d:return E=E.get(M.key===null?A:M.key)||null,v(S,E,M,X);case m:return E=E.get(M.key===null?A:M.key)||null,T(S,E,M,X);case P:var ve=M._init;return M=ve(M._payload),R(E,S,A,M,X)}if(ae(M)||B(M))return E=E.get(A)||null,x(S,E,M,X,null);if(typeof M.then=="function")return R(E,S,A,Hs(M),X);if(M.$$typeof===C)return R(E,S,A,nu(S,M),X);Vs(S,M)}return null}function F(E,S,A,M){for(var X=null,ve=null,I=S,le=S=0,ot=null;I!==null&&le<A.length;le++){I.index>le?(ot=I,I=null):ot=I.sibling;var ke=w(E,I,A[le],M);if(ke===null){I===null&&(I=ot);break}e&&I&&ke.alternate===null&&t(E,I),S=o(ke,S,le),ve===null?X=ke:ve.sibling=ke,ve=ke,I=ot}if(le===A.length)return a(E,I),xe&&ka(E,le),X;if(I===null){for(;le<A.length;le++)I=N(E,A[le],M),I!==null&&(S=o(I,S,le),ve===null?X=I:ve.sibling=I,ve=I);return xe&&ka(E,le),X}for(I=s(I);le<A.length;le++)ot=R(I,E,le,A[le],M),ot!==null&&(e&&ot.alternate!==null&&I.delete(ot.key===null?le:ot.key),S=o(ot,S,le),ve===null?X=ot:ve.sibling=ot,ve=ot);return e&&I.forEach(function(ya){return t(E,ya)}),xe&&ka(E,le),X}function fe(E,S,A,M){if(A==null)throw Error(u(151));for(var X=null,ve=null,I=S,le=S=0,ot=null,ke=A.next();I!==null&&!ke.done;le++,ke=A.next()){I.index>le?(ot=I,I=null):ot=I.sibling;var ya=w(E,I,ke.value,M);if(ya===null){I===null&&(I=ot);break}e&&I&&ya.alternate===null&&t(E,I),S=o(ya,S,le),ve===null?X=ya:ve.sibling=ya,ve=ya,I=ot}if(ke.done)return a(E,I),xe&&ka(E,le),X;if(I===null){for(;!ke.done;le++,ke=A.next())ke=N(E,ke.value,M),ke!==null&&(S=o(ke,S,le),ve===null?X=ke:ve.sibling=ke,ve=ke);return xe&&ka(E,le),X}for(I=s(I);!ke.done;le++,ke=A.next())ke=R(I,E,le,ke.value,M),ke!==null&&(e&&ke.alternate!==null&&I.delete(ke.key===null?le:ke.key),S=o(ke,S,le),ve===null?X=ke:ve.sibling=ke,ve=ke);return e&&I.forEach(function(Lv){return t(E,Lv)}),xe&&ka(E,le),X}function Je(E,S,A,M){if(typeof A=="object"&&A!==null&&A.type===p&&A.key===null&&(A=A.props.children),typeof A=="object"&&A!==null){switch(A.$$typeof){case d:e:{for(var X=A.key;S!==null;){if(S.key===X){if(X=A.type,X===p){if(S.tag===7){a(E,S.sibling),M=r(S,A.props.children),M.return=E,E=M;break e}}else if(S.elementType===X||typeof X=="object"&&X!==null&&X.$$typeof===P&&wd(X)===S.type){a(E,S.sibling),M=r(S,A.props),gl(M,A),M.return=E,E=M;break e}a(E,S);break}else t(E,S);S=S.sibling}A.type===p?(M=Ha(A.props.children,E.mode,M,A.key),M.return=E,E=M):(M=lu(A.type,A.key,A.props,null,E.mode,M),gl(M,A),M.return=E,E=M)}return h(E);case m:e:{for(X=A.key;S!==null;){if(S.key===X)if(S.tag===4&&S.stateNode.containerInfo===A.containerInfo&&S.stateNode.implementation===A.implementation){a(E,S.sibling),M=r(S,A.children||[]),M.return=E,E=M;break e}else{a(E,S);break}else t(E,S);S=S.sibling}M=Oc(A,E.mode,M),M.return=E,E=M}return h(E);case P:return X=A._init,A=X(A._payload),Je(E,S,A,M)}if(ae(A))return F(E,S,A,M);if(B(A)){if(X=B(A),typeof X!="function")throw Error(u(150));return A=X.call(A),fe(E,S,A,M)}if(typeof A.then=="function")return Je(E,S,Hs(A),M);if(A.$$typeof===C)return Je(E,S,nu(E,A),M);Vs(E,A)}return typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint"?(A=""+A,S!==null&&S.tag===6?(a(E,S.sibling),M=r(S,A),M.return=E,E=M):(a(E,S),M=wc(A,E.mode,M),M.return=E,E=M),h(E)):a(E,S)}return function(E,S,A,M){try{pl=0;var X=Je(E,S,A,M);return pi=null,X}catch(I){if(I===yl)throw I;var ve=Jt(29,I,null,E.mode);return ve.lanes=M,ve.return=E,ve}finally{}}}var Na=Od(!0),Rd=Od(!1),gi=Me(null),Ls=Me(0);function xd(e,t){e=Bn,He(Ls,e),He(gi,t),Bn=e|t.baseLanes}function Cr(){He(Ls,Bn),He(gi,gi.current)}function Dr(){Bn=Ls.current,Pe(gi),Pe(Ls)}var Gt=Me(null),dn=null;function Fn(e){var t=e.alternate;He(it,it.current&1),He(Gt,e),dn===null&&(t===null||gi.current!==null||t.memoizedState!==null)&&(dn=e)}function kd(e){if(e.tag===22){if(He(it,it.current),He(Gt,e),dn===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(dn=e)}}else Wn()}function Wn(){He(it,it.current),He(Gt,Gt.current)}function Rn(e){Pe(Gt),dn===e&&(dn=null),Pe(it)}var it=Me(0);function Ks(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||a.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var kg=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,s){e.push(s)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},Mg=l.unstable_scheduleCallback,Ng=l.unstable_NormalPriority,lt={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function zr(){return{controller:new kg,data:new Map,refCount:0}}function vl(e){e.refCount--,e.refCount===0&&Mg(Ng,function(){e.controller.abort()})}var bl=null,Ur=0,vi=0,bi=null;function Cg(e,t){if(bl===null){var a=bl=[];Ur=0,vi=Vc(),bi={status:"pending",value:void 0,then:function(s){a.push(s)}}}return Ur++,t.then(Md,Md),t}function Md(){if(--Ur===0&&bl!==null){bi!==null&&(bi.status="fulfilled");var e=bl;bl=null,vi=0,bi=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Dg(e,t){var a=[],s={status:"pending",value:null,reason:null,then:function(r){a.push(r)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var r=0;r<a.length;r++)(0,a[r])(t)},function(r){for(s.status="rejected",s.reason=r,r=0;r<a.length;r++)(0,a[r])(void 0)}),s}var Nd=j.S;j.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&Cg(e,t),Nd!==null&&Nd(e,t)};var Ca=Me(null);function jr(){var e=Ca.current;return e!==null?e:qe.pooledCache}function Ys(e,t){t===null?He(Ca,Ca.current):He(Ca,t.pool)}function Cd(){var e=jr();return e===null?null:{parent:lt._currentValue,pool:e}}var In=0,ge=null,ze=null,et=null,$s=!1,_i=!1,Da=!1,Gs=0,_l=0,Si=null,zg=0;function Fe(){throw Error(u(321))}function Br(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!Ct(e[a],t[a]))return!1;return!0}function qr(e,t,a,s,r,o){return In=o,ge=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,j.H=e===null||e.memoizedState===null?za:Pn,Da=!1,o=a(s,r),Da=!1,_i&&(o=zd(t,a,s,r)),Dd(e),o}function Dd(e){j.H=hn;var t=ze!==null&&ze.next!==null;if(In=0,et=ze=ge=null,$s=!1,_l=0,Si=null,t)throw Error(u(300));e===null||rt||(e=e.dependencies,e!==null&&tu(e)&&(rt=!0))}function zd(e,t,a,s){ge=e;var r=0;do{if(_i&&(Si=null),_l=0,_i=!1,25<=r)throw Error(u(301));if(r+=1,et=ze=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}j.H=Ua,o=t(a,s)}while(_i);return o}function Ug(){var e=j.H,t=e.useState()[0];return t=typeof t.then=="function"?Sl(t):t,e=e.useState()[0],(ze!==null?ze.memoizedState:null)!==e&&(ge.flags|=1024),t}function Zr(){var e=Gs!==0;return Gs=0,e}function Hr(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Vr(e){if($s){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}$s=!1}In=0,et=ze=ge=null,_i=!1,_l=Gs=0,Si=null}function kt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return et===null?ge.memoizedState=et=e:et=et.next=e,et}function tt(){if(ze===null){var e=ge.alternate;e=e!==null?e.memoizedState:null}else e=ze.next;var t=et===null?ge.memoizedState:et.next;if(t!==null)et=t,ze=e;else{if(e===null)throw ge.alternate===null?Error(u(467)):Error(u(310));ze=e,e={memoizedState:ze.memoizedState,baseState:ze.baseState,baseQueue:ze.baseQueue,queue:ze.queue,next:null},et===null?ge.memoizedState=et=e:et=et.next=e}return et}var Xs;Xs=function(){return{lastEffect:null,events:null,stores:null,memoCache:null}};function Sl(e){var t=_l;return _l+=1,Si===null&&(Si=[]),e=Ed(Si,e,t),t=ge,(et===null?t.memoizedState:et.next)===null&&(t=t.alternate,j.H=t===null||t.memoizedState===null?za:Pn),e}function Qs(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Sl(e);if(e.$$typeof===C)return gt(e)}throw Error(u(438,String(e)))}function Lr(e){var t=null,a=ge.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var s=ge.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Xs(),ge.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),s=0;s<e;s++)a[s]=Ie;return t.index++,a}function xn(e,t){return typeof t=="function"?t(e):t}function Js(e){var t=tt();return Kr(t,ze,e)}function Kr(e,t,a){var s=e.queue;if(s===null)throw Error(u(311));s.lastRenderedReducer=a;var r=e.baseQueue,o=s.pending;if(o!==null){if(r!==null){var h=r.next;r.next=o.next,o.next=h}t.baseQueue=r=o,s.pending=null}if(o=e.baseState,r===null)e.memoizedState=o;else{t=r.next;var g=h=null,v=null,T=t,x=!1;do{var N=T.lane&-536870913;if(N!==T.lane?(Ae&N)===N:(In&N)===N){var w=T.revertLane;if(w===0)v!==null&&(v=v.next={lane:0,revertLane:0,action:T.action,hasEagerState:T.hasEagerState,eagerState:T.eagerState,next:null}),N===vi&&(x=!0);else if((In&w)===w){T=T.next,w===vi&&(x=!0);continue}else N={lane:0,revertLane:T.revertLane,action:T.action,hasEagerState:T.hasEagerState,eagerState:T.eagerState,next:null},v===null?(g=v=N,h=o):v=v.next=N,ge.lanes|=w,ra|=w;N=T.action,Da&&a(o,N),o=T.hasEagerState?T.eagerState:a(o,N)}else w={lane:N,revertLane:T.revertLane,action:T.action,hasEagerState:T.hasEagerState,eagerState:T.eagerState,next:null},v===null?(g=v=w,h=o):v=v.next=w,ge.lanes|=N,ra|=N;T=T.next}while(T!==null&&T!==t);if(v===null?h=o:v.next=g,!Ct(o,e.memoizedState)&&(rt=!0,x&&(a=bi,a!==null)))throw a;e.memoizedState=o,e.baseState=h,e.baseQueue=v,s.lastRenderedState=o}return r===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function Yr(e){var t=tt(),a=t.queue;if(a===null)throw Error(u(311));a.lastRenderedReducer=e;var s=a.dispatch,r=a.pending,o=t.memoizedState;if(r!==null){a.pending=null;var h=r=r.next;do o=e(o,h.action),h=h.next;while(h!==r);Ct(o,t.memoizedState)||(rt=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),a.lastRenderedState=o}return[o,s]}function Ud(e,t,a){var s=ge,r=tt(),o=xe;if(o){if(a===void 0)throw Error(u(407));a=a()}else a=t();var h=!Ct((ze||r).memoizedState,a);if(h&&(r.memoizedState=a,rt=!0),r=r.queue,Xr(qd.bind(null,s,r,e),[e]),r.getSnapshot!==t||h||et!==null&&et.memoizedState.tag&1){if(s.flags|=2048,Ti(9,Bd.bind(null,s,r,a,t),{destroy:void 0},null),qe===null)throw Error(u(349));o||In&60||jd(s,t,a)}return a}function jd(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=ge.updateQueue,t===null?(t=Xs(),ge.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Bd(e,t,a,s){t.value=a,t.getSnapshot=s,Zd(t)&&Hd(e)}function qd(e,t,a){return a(function(){Zd(t)&&Hd(e)})}function Zd(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!Ct(e,a)}catch{return!0}}function Hd(e){var t=Jn(e,2);t!==null&&Tt(t,e,2)}function $r(e){var t=kt();if(typeof e=="function"){var a=e;if(e=a(),Da){Gn(!0);try{a()}finally{Gn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:xn,lastRenderedState:e},t}function Vd(e,t,a,s){return e.baseState=a,Kr(e,ze,typeof s=="function"?s:xn)}function jg(e,t,a,s,r){if(Is(e))throw Error(u(485));if(e=t.action,e!==null){var o={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(h){o.listeners.push(h)}};j.T!==null?a(!0):o.isTransition=!1,s(o),a=t.pending,a===null?(o.next=t.pending=o,Ld(t,o)):(o.next=a.next,t.pending=a.next=o)}}function Ld(e,t){var a=t.action,s=t.payload,r=e.state;if(t.isTransition){var o=j.T,h={};j.T=h;try{var g=a(r,s),v=j.S;v!==null&&v(h,g),Kd(e,t,g)}catch(T){Gr(e,t,T)}finally{j.T=o}}else try{o=a(r,s),Kd(e,t,o)}catch(T){Gr(e,t,T)}}function Kd(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(s){Yd(e,t,s)},function(s){return Gr(e,t,s)}):Yd(e,t,a)}function Yd(e,t,a){t.status="fulfilled",t.value=a,$d(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Ld(e,a)))}function Gr(e,t,a){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=a,$d(t),t=t.next;while(t!==s)}e.action=null}function $d(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Gd(e,t){return t}function Xd(e,t){if(xe){var a=qe.formState;if(a!==null){e:{var s=ge;if(xe){if(dt){t:{for(var r=dt,o=fn;r.nodeType!==8;){if(!o){r=null;break t}if(r=an(r.nextSibling),r===null){r=null;break t}}o=r.data,r=o==="F!"||o==="F"?r:null}if(r){dt=an(r.nextSibling),s=r.data==="F!";break e}}Ma(s)}s=!1}s&&(t=a[0])}}return a=kt(),a.memoizedState=a.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Gd,lastRenderedState:t},a.queue=s,a=fh.bind(null,ge,s),s.dispatch=a,s=$r(!1),o=Ir.bind(null,ge,!1,s.queue),s=kt(),r={state:t,dispatch:null,action:e,pending:null},s.queue=r,a=jg.bind(null,ge,r,o,a),r.dispatch=a,s.memoizedState=e,[t,a,!1]}function Qd(e){var t=tt();return Jd(t,ze,e)}function Jd(e,t,a){t=Kr(e,t,Gd)[0],e=Js(xn)[0],t=typeof t=="object"&&t!==null&&typeof t.then=="function"?Sl(t):t;var s=tt(),r=s.queue,o=r.dispatch;return a!==s.memoizedState&&(ge.flags|=2048,Ti(9,Bg.bind(null,r,a),{destroy:void 0},null)),[t,o,e]}function Bg(e,t){e.action=t}function Fd(e){var t=tt(),a=ze;if(a!==null)return Jd(t,a,e);tt(),t=t.memoizedState,a=tt();var s=a.queue.dispatch;return a.memoizedState=e,[t,s,!1]}function Ti(e,t,a,s){return e={tag:e,create:t,inst:a,deps:s,next:null},t=ge.updateQueue,t===null&&(t=Xs(),ge.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(s=a.next,a.next=e,e.next=s,t.lastEffect=e),e}function Wd(){return tt().memoizedState}function Fs(e,t,a,s){var r=kt();ge.flags|=e,r.memoizedState=Ti(1|t,a,{destroy:void 0},s===void 0?null:s)}function Ws(e,t,a,s){var r=tt();s=s===void 0?null:s;var o=r.memoizedState.inst;ze!==null&&s!==null&&Br(s,ze.memoizedState.deps)?r.memoizedState=Ti(t,a,o,s):(ge.flags|=e,r.memoizedState=Ti(1|t,a,o,s))}function Id(e,t){Fs(8390656,8,e,t)}function Xr(e,t){Ws(2048,8,e,t)}function Pd(e,t){return Ws(4,2,e,t)}function eh(e,t){return Ws(4,4,e,t)}function th(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function nh(e,t,a){a=a!=null?a.concat([e]):null,Ws(4,4,th.bind(null,t,e),a)}function Qr(){}function ah(e,t){var a=tt();t=t===void 0?null:t;var s=a.memoizedState;return t!==null&&Br(t,s[1])?s[0]:(a.memoizedState=[e,t],e)}function ih(e,t){var a=tt();t=t===void 0?null:t;var s=a.memoizedState;if(t!==null&&Br(t,s[1]))return s[0];if(s=e(),Da){Gn(!0);try{e()}finally{Gn(!1)}}return a.memoizedState=[s,t],s}function Jr(e,t,a){return a===void 0||In&1073741824?e.memoizedState=t:(e.memoizedState=a,e=sy(),ge.lanes|=e,ra|=e,a)}function lh(e,t,a,s){return Ct(a,t)?a:gi.current!==null?(e=Jr(e,a,s),Ct(e,t)||(rt=!0),e):In&42?(e=sy(),ge.lanes|=e,ra|=e,t):(rt=!0,e.memoizedState=a)}function sh(e,t,a,s,r){var o=$.p;$.p=o!==0&&8>o?o:8;var h=j.T,g={};j.T=g,Ir(e,!1,t,a);try{var v=r(),T=j.S;if(T!==null&&T(g,v),v!==null&&typeof v=="object"&&typeof v.then=="function"){var x=Dg(v,s);Tl(e,t,x,jt(e))}else Tl(e,t,s,jt(e))}catch(N){Tl(e,t,{then:function(){},status:"rejected",reason:N},jt())}finally{$.p=o,j.T=h}}function qg(){}function Fr(e,t,a,s){if(e.tag!==5)throw Error(u(476));var r=uh(e).queue;sh(e,r,t,Ee,a===null?qg:function(){return rh(e),a(s)})}function uh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Ee,baseState:Ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xn,lastRenderedState:Ee},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xn,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function rh(e){var t=uh(e).next.queue;Tl(e,t,{},jt())}function Wr(){return gt(Ll)}function ch(){return tt().memoizedState}function oh(){return tt().memoizedState}function Zg(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=jt();e=na(a);var s=aa(t,e,a);s!==null&&(Tt(s,t,a),wl(s,t,a)),t={cache:zr()},e.payload=t;return}t=t.return}}function Hg(e,t,a){var s=jt();a={lane:s,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null},Is(e)?dh(t,a):(a=Rr(e,t,a,s),a!==null&&(Tt(a,e,s),hh(a,t,s)))}function fh(e,t,a){var s=jt();Tl(e,t,a,s)}function Tl(e,t,a,s){var r={lane:s,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null};if(Is(e))dh(t,r);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var h=t.lastRenderedState,g=o(h,a);if(r.hasEagerState=!0,r.eagerState=g,Ct(g,h))return Us(e,t,r,0),qe===null&&zs(),!1}catch{}finally{}if(a=Rr(e,t,r,s),a!==null)return Tt(a,e,s),hh(a,t,s),!0}return!1}function Ir(e,t,a,s){if(s={lane:2,revertLane:Vc(),action:s,hasEagerState:!1,eagerState:null,next:null},Is(e)){if(t)throw Error(u(479))}else t=Rr(e,a,s,2),t!==null&&Tt(t,e,2)}function Is(e){var t=e.alternate;return e===ge||t!==null&&t===ge}function dh(e,t){_i=$s=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function hh(e,t,a){if(a&4194176){var s=t.lanes;s&=e.pendingLanes,a|=s,t.lanes=a,Af(e,a)}}var hn={readContext:gt,use:Qs,useCallback:Fe,useContext:Fe,useEffect:Fe,useImperativeHandle:Fe,useLayoutEffect:Fe,useInsertionEffect:Fe,useMemo:Fe,useReducer:Fe,useRef:Fe,useState:Fe,useDebugValue:Fe,useDeferredValue:Fe,useTransition:Fe,useSyncExternalStore:Fe,useId:Fe};hn.useCacheRefresh=Fe,hn.useMemoCache=Fe,hn.useHostTransitionStatus=Fe,hn.useFormState=Fe,hn.useActionState=Fe,hn.useOptimistic=Fe;var za={readContext:gt,use:Qs,useCallback:function(e,t){return kt().memoizedState=[e,t===void 0?null:t],e},useContext:gt,useEffect:Id,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Fs(4194308,4,th.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Fs(4194308,4,e,t)},useInsertionEffect:function(e,t){Fs(4,2,e,t)},useMemo:function(e,t){var a=kt();t=t===void 0?null:t;var s=e();if(Da){Gn(!0);try{e()}finally{Gn(!1)}}return a.memoizedState=[s,t],s},useReducer:function(e,t,a){var s=kt();if(a!==void 0){var r=a(t);if(Da){Gn(!0);try{a(t)}finally{Gn(!1)}}}else r=t;return s.memoizedState=s.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},s.queue=e,e=e.dispatch=Hg.bind(null,ge,e),[s.memoizedState,e]},useRef:function(e){var t=kt();return e={current:e},t.memoizedState=e},useState:function(e){e=$r(e);var t=e.queue,a=fh.bind(null,ge,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Qr,useDeferredValue:function(e,t){var a=kt();return Jr(a,e,t)},useTransition:function(){var e=$r(!1);return e=sh.bind(null,ge,e.queue,!0,!1),kt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var s=ge,r=kt();if(xe){if(a===void 0)throw Error(u(407));a=a()}else{if(a=t(),qe===null)throw Error(u(349));Ae&60||jd(s,t,a)}r.memoizedState=a;var o={value:a,getSnapshot:t};return r.queue=o,Id(qd.bind(null,s,o,e),[e]),s.flags|=2048,Ti(9,Bd.bind(null,s,o,a,t),{destroy:void 0},null),a},useId:function(){var e=kt(),t=qe.identifierPrefix;if(xe){var a=On,s=wn;a=(s&~(1<<32-Nt(s)-1)).toString(32)+a,t=":"+t+"R"+a,a=Gs++,0<a&&(t+="H"+a.toString(32)),t+=":"}else a=zg++,t=":"+t+"r"+a.toString(32)+":";return e.memoizedState=t},useCacheRefresh:function(){return kt().memoizedState=Zg.bind(null,ge)}};za.useMemoCache=Lr,za.useHostTransitionStatus=Wr,za.useFormState=Xd,za.useActionState=Xd,za.useOptimistic=function(e){var t=kt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=Ir.bind(null,ge,!0,a),a.dispatch=t,[e,t]};var Pn={readContext:gt,use:Qs,useCallback:ah,useContext:gt,useEffect:Xr,useImperativeHandle:nh,useInsertionEffect:Pd,useLayoutEffect:eh,useMemo:ih,useReducer:Js,useRef:Wd,useState:function(){return Js(xn)},useDebugValue:Qr,useDeferredValue:function(e,t){var a=tt();return lh(a,ze.memoizedState,e,t)},useTransition:function(){var e=Js(xn)[0],t=tt().memoizedState;return[typeof e=="boolean"?e:Sl(e),t]},useSyncExternalStore:Ud,useId:ch};Pn.useCacheRefresh=oh,Pn.useMemoCache=Lr,Pn.useHostTransitionStatus=Wr,Pn.useFormState=Qd,Pn.useActionState=Qd,Pn.useOptimistic=function(e,t){var a=tt();return Vd(a,ze,e,t)};var Ua={readContext:gt,use:Qs,useCallback:ah,useContext:gt,useEffect:Xr,useImperativeHandle:nh,useInsertionEffect:Pd,useLayoutEffect:eh,useMemo:ih,useReducer:Yr,useRef:Wd,useState:function(){return Yr(xn)},useDebugValue:Qr,useDeferredValue:function(e,t){var a=tt();return ze===null?Jr(a,e,t):lh(a,ze.memoizedState,e,t)},useTransition:function(){var e=Yr(xn)[0],t=tt().memoizedState;return[typeof e=="boolean"?e:Sl(e),t]},useSyncExternalStore:Ud,useId:ch};Ua.useCacheRefresh=oh,Ua.useMemoCache=Lr,Ua.useHostTransitionStatus=Wr,Ua.useFormState=Fd,Ua.useActionState=Fd,Ua.useOptimistic=function(e,t){var a=tt();return ze!==null?Vd(a,ze,e,t):(a.baseState=e,[e,a.queue.dispatch])};function Pr(e,t,a,s){t=e.memoizedState,a=a(s,t),a=a==null?t:H({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var ec={isMounted:function(e){return(e=e._reactInternals)?ne(e)===e:!1},enqueueSetState:function(e,t,a){e=e._reactInternals;var s=jt(),r=na(s);r.payload=t,a!=null&&(r.callback=a),t=aa(e,r,s),t!==null&&(Tt(t,e,s),wl(t,e,s))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var s=jt(),r=na(s);r.tag=1,r.payload=t,a!=null&&(r.callback=a),t=aa(e,r,s),t!==null&&(Tt(t,e,s),wl(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=jt(),s=na(a);s.tag=2,t!=null&&(s.callback=t),t=aa(e,s,a),t!==null&&(Tt(t,e,a),wl(t,e,a))}};function yh(e,t,a,s,r,o,h){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,o,h):t.prototype&&t.prototype.isPureReactComponent?!cl(a,s)||!cl(r,o):!0}function mh(e,t,a,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,s),t.state!==e&&ec.enqueueReplaceState(t,t.state,null)}function ja(e,t){var a=t;if("ref"in t){a={};for(var s in t)s!=="ref"&&(a[s]=t[s])}if(e=e.defaultProps){a===t&&(a=H({},a));for(var r in e)a[r]===void 0&&(a[r]=e[r])}return a}var Ps=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 ph(e){Ps(e)}function gh(e){console.error(e)}function vh(e){Ps(e)}function eu(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function bh(e,t,a){try{var s=e.onCaughtError;s(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function tc(e,t,a){return a=na(a),a.tag=3,a.payload={element:null},a.callback=function(){eu(e,t)},a}function _h(e){return e=na(e),e.tag=3,e}function Sh(e,t,a,s){var r=a.type.getDerivedStateFromError;if(typeof r=="function"){var o=s.value;e.payload=function(){return r(o)},e.callback=function(){bh(t,a,s)}}var h=a.stateNode;h!==null&&typeof h.componentDidCatch=="function"&&(e.callback=function(){bh(t,a,s),typeof r!="function"&&(ca===null?ca=new Set([this]):ca.add(this));var g=s.stack;this.componentDidCatch(s.value,{componentStack:g!==null?g:""})})}function Vg(e,t,a,s,r){if(a.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=a.alternate,t!==null&&Al(t,a,r,!0),a=Gt.current,a!==null){switch(a.tag){case 13:return dn===null?jc():a.alternate===null&&Qe===0&&(Qe=3),a.flags&=-257,a.flags|=65536,a.lanes=r,s===Nr?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([s]):t.add(s),qc(e,s,r)),!1;case 22:return a.flags|=65536,s===Nr?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([s])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([s]):a.add(s)),qc(e,s,r)),!1}throw Error(u(435,a.tag))}return qc(e,s,r),jc(),!1}if(xe)return t=Gt.current,t!==null?(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=r,s!==Mr&&(e=Error(u(422),{cause:s}),hl(Kt(e,a)))):(s!==Mr&&(t=Error(u(423),{cause:s}),hl(Kt(t,a))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,s=Kt(s,a),r=tc(e.stateNode,s,r),pc(e,r),Qe!==4&&(Qe=2)),!1;var o=Error(u(520),{cause:s});if(o=Kt(o,a),Dl===null?Dl=[o]:Dl.push(o),Qe!==4&&(Qe=2),t===null)return!0;s=Kt(s,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=r&-r,a.lanes|=e,e=tc(a.stateNode,s,e),pc(a,e),!1;case 1:if(t=a.type,o=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||o!==null&&typeof o.componentDidCatch=="function"&&(ca===null||!ca.has(o))))return a.flags|=65536,r&=-r,a.lanes|=r,r=_h(r),Sh(r,e,a,s),pc(a,r),!1}a=a.return}while(a!==null);return!1}var Th=Error(u(461)),rt=!1;function ht(e,t,a,s){t.child=e===null?Rd(t,null,a,s):Na(t,e.child,a,s)}function Eh(e,t,a,s,r){a=a.render;var o=t.ref;if("ref"in s){var h={};for(var g in s)g!=="ref"&&(h[g]=s[g])}else h=s;return qa(t),s=qr(e,t,a,h,o,r),g=Zr(),e!==null&&!rt?(Hr(e,t,r),kn(e,t,r)):(xe&&g&&xr(t),t.flags|=1,ht(e,t,s,r),t.child)}function Ah(e,t,a,s,r){if(e===null){var o=a.type;return typeof o=="function"&&!Ac(o)&&o.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=o,wh(e,t,o,s,r)):(e=lu(a.type,null,s,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!oc(e,r)){var h=o.memoizedProps;if(a=a.compare,a=a!==null?a:cl,a(h,s)&&e.ref===t.ref)return kn(e,t,r)}return t.flags|=1,e=ua(o,s),e.ref=t.ref,e.return=t,t.child=e}function wh(e,t,a,s,r){if(e!==null){var o=e.memoizedProps;if(cl(o,s)&&e.ref===t.ref)if(rt=!1,t.pendingProps=s=o,oc(e,r))e.flags&131072&&(rt=!0);else return t.lanes=e.lanes,kn(e,t,r)}return nc(e,t,a,s,r)}function Oh(e,t,a){var s=t.pendingProps,r=s.children,o=(t.stateNode._pendingVisibility&2)!==0,h=e!==null?e.memoizedState:null;if(El(e,t),s.mode==="hidden"||o){if(t.flags&128){if(s=h!==null?h.baseLanes|a:a,e!==null){for(r=t.child=e.child,o=0;r!==null;)o=o|r.lanes|r.childLanes,r=r.sibling;t.childLanes=o&~s}else t.childLanes=0,t.child=null;return Rh(e,t,s,a)}if(a&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ys(t,h!==null?h.cachePool:null),h!==null?xd(t,h):Cr(),kd(t);else return t.lanes=t.childLanes=536870912,Rh(e,t,h!==null?h.baseLanes|a:a,a)}else h!==null?(Ys(t,h.cachePool),xd(t,h),Wn(),t.memoizedState=null):(e!==null&&Ys(t,null),Cr(),Wn());return ht(e,t,r,a),t.child}function Rh(e,t,a,s){var r=jr();return r=r===null?null:{parent:lt._currentValue,pool:r},t.memoizedState={baseLanes:a,cachePool:r},e!==null&&Ys(t,null),Cr(),kd(t),e!==null&&Al(e,t,s,!0),null}function El(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=2097664);else{if(typeof a!="function"&&typeof a!="object")throw Error(u(284));(e===null||e.ref!==a)&&(t.flags|=2097664)}}function nc(e,t,a,s,r){return qa(t),a=qr(e,t,a,s,void 0,r),s=Zr(),e!==null&&!rt?(Hr(e,t,r),kn(e,t,r)):(xe&&s&&xr(t),t.flags|=1,ht(e,t,a,r),t.child)}function xh(e,t,a,s,r,o){return qa(t),t.updateQueue=null,a=zd(t,s,a,r),Dd(e),s=Zr(),e!==null&&!rt?(Hr(e,t,o),kn(e,t,o)):(xe&&s&&xr(t),t.flags|=1,ht(e,t,a,o),t.child)}function kh(e,t,a,s,r){if(qa(t),t.stateNode===null){var o=hi,h=a.contextType;typeof h=="object"&&h!==null&&(o=gt(h)),o=new a(s,o),t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=ec,t.stateNode=o,o._reactInternals=t,o=t.stateNode,o.props=s,o.state=t.memoizedState,o.refs={},yc(t),h=a.contextType,o.context=typeof h=="object"&&h!==null?gt(h):hi,o.state=t.memoizedState,h=a.getDerivedStateFromProps,typeof h=="function"&&(Pr(t,a,h,s),o.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(h=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),h!==o.state&&ec.enqueueReplaceState(o,o.state,null),Rl(t,s,o,r),Ol(),o.state=t.memoizedState),typeof o.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){o=t.stateNode;var g=t.memoizedProps,v=ja(a,g);o.props=v;var T=o.context,x=a.contextType;h=hi,typeof x=="object"&&x!==null&&(h=gt(x));var N=a.getDerivedStateFromProps;x=typeof N=="function"||typeof o.getSnapshotBeforeUpdate=="function",g=t.pendingProps!==g,x||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(g||T!==h)&&mh(t,o,s,h),ta=!1;var w=t.memoizedState;o.state=w,Rl(t,s,o,r),Ol(),T=t.memoizedState,g||w!==T||ta?(typeof N=="function"&&(Pr(t,a,N,s),T=t.memoizedState),(v=ta||yh(t,a,v,s,w,T,h))?(x||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=T),o.props=s,o.state=T,o.context=h,s=v):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{o=t.stateNode,mc(e,t),h=t.memoizedProps,x=ja(a,h),o.props=x,N=t.pendingProps,w=o.context,T=a.contextType,v=hi,typeof T=="object"&&T!==null&&(v=gt(T)),g=a.getDerivedStateFromProps,(T=typeof g=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(h!==N||w!==v)&&mh(t,o,s,v),ta=!1,w=t.memoizedState,o.state=w,Rl(t,s,o,r),Ol();var R=t.memoizedState;h!==N||w!==R||ta||e!==null&&e.dependencies!==null&&tu(e.dependencies)?(typeof g=="function"&&(Pr(t,a,g,s),R=t.memoizedState),(x=ta||yh(t,a,x,s,w,R,v)||e!==null&&e.dependencies!==null&&tu(e.dependencies))?(T||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(s,R,v),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(s,R,v)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||h===e.memoizedProps&&w===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&w===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=R),o.props=s,o.state=R,o.context=v,s=x):(typeof o.componentDidUpdate!="function"||h===e.memoizedProps&&w===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&w===e.memoizedState||(t.flags|=1024),s=!1)}return o=s,El(e,t),s=(t.flags&128)!==0,o||s?(o=t.stateNode,a=s&&typeof a.getDerivedStateFromError!="function"?null:o.render(),t.flags|=1,e!==null&&s?(t.child=Na(t,e.child,null,r),t.child=Na(t,null,a,r)):ht(e,t,a,r),t.memoizedState=o.state,e=t.child):e=kn(e,t,r),e}function Mh(e,t,a,s){return dl(),t.flags|=256,ht(e,t,a,s),t.child}var ac={dehydrated:null,treeContext:null,retryLane:0};function ic(e){return{baseLanes:e,cachePool:Cd()}}function lc(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Ft),e}function Nh(e,t,a){var s=t.pendingProps,r=!1,o=(t.flags&128)!==0,h;if((h=o)||(h=e!==null&&e.memoizedState===null?!1:(it.current&2)!==0),h&&(r=!0,t.flags&=-129),h=(t.flags&32)!==0,t.flags&=-33,e===null){if(xe){if(r?Fn(t):Wn(),xe){var g=dt,v;if(v=g){e:{for(v=g,g=fn;v.nodeType!==8;){if(!g){g=null;break e}if(v=an(v.nextSibling),v===null){g=null;break e}}g=v}g!==null?(t.memoizedState={dehydrated:g,treeContext:xa!==null?{id:wn,overflow:On}:null,retryLane:536870912},v=Jt(18,null,null,0),v.stateNode=g,v.return=t,t.child=v,St=t,dt=null,v=!0):v=!1}v||Ma(t)}if(g=t.memoizedState,g!==null&&(g=g.dehydrated,g!==null))return g.data==="$!"?t.lanes=16:t.lanes=536870912,null;Rn(t)}return g=s.children,s=s.fallback,r?(Wn(),r=t.mode,g=uc({mode:"hidden",children:g},r),s=Ha(s,r,a,null),g.return=t,s.return=t,g.sibling=s,t.child=g,r=t.child,r.memoizedState=ic(a),r.childLanes=lc(e,h,a),t.memoizedState=ac,s):(Fn(t),sc(t,g))}if(v=e.memoizedState,v!==null&&(g=v.dehydrated,g!==null)){if(o)t.flags&256?(Fn(t),t.flags&=-257,t=rc(e,t,a)):t.memoizedState!==null?(Wn(),t.child=e.child,t.flags|=128,t=null):(Wn(),r=s.fallback,g=t.mode,s=uc({mode:"visible",children:s.children},g),r=Ha(r,g,a,null),r.flags|=2,s.return=t,r.return=t,s.sibling=r,t.child=s,Na(t,e.child,null,a),s=t.child,s.memoizedState=ic(a),s.childLanes=lc(e,h,a),t.memoizedState=ac,t=r);else if(Fn(t),g.data==="$!"){if(h=g.nextSibling&&g.nextSibling.dataset,h)var T=h.dgst;h=T,s=Error(u(419)),s.stack="",s.digest=h,hl({value:s,source:null,stack:null}),t=rc(e,t,a)}else if(rt||Al(e,t,a,!1),h=(a&e.childLanes)!==0,rt||h){if(h=qe,h!==null){if(s=a&-a,s&42)s=1;else switch(s){case 2:s=1;break;case 8:s=4;break;case 32:s=16;break;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:case 4194304:case 8388608:case 16777216:case 33554432:s=64;break;case 268435456:s=134217728;break;default:s=0}if(s=s&(h.suspendedLanes|a)?0:s,s!==0&&s!==v.retryLane)throw v.retryLane=s,Jn(e,s),Tt(h,e,s),Th}g.data==="$?"||jc(),t=rc(e,t,a)}else g.data==="$?"?(t.flags|=128,t.child=e.child,t=nv.bind(null,e),g._reactRetry=t,t=null):(e=v.treeContext,dt=an(g.nextSibling),St=t,xe=!0,tn=null,fn=!1,e!==null&&(Yt[$t++]=wn,Yt[$t++]=On,Yt[$t++]=xa,wn=e.id,On=e.overflow,xa=t),t=sc(t,s.children),t.flags|=4096);return t}return r?(Wn(),r=s.fallback,g=t.mode,v=e.child,T=v.sibling,s=ua(v,{mode:"hidden",children:s.children}),s.subtreeFlags=v.subtreeFlags&31457280,T!==null?r=ua(T,r):(r=Ha(r,g,a,null),r.flags|=2),r.return=t,s.return=t,s.sibling=r,t.child=s,s=r,r=t.child,g=e.child.memoizedState,g===null?g=ic(a):(v=g.cachePool,v!==null?(T=lt._currentValue,v=v.parent!==T?{parent:T,pool:T}:v):v=Cd(),g={baseLanes:g.baseLanes|a,cachePool:v}),r.memoizedState=g,r.childLanes=lc(e,h,a),t.memoizedState=ac,s):(Fn(t),a=e.child,e=a.sibling,a=ua(a,{mode:"visible",children:s.children}),a.return=t,a.sibling=null,e!==null&&(h=t.deletions,h===null?(t.deletions=[e],t.flags|=16):h.push(e)),t.child=a,t.memoizedState=null,a)}function sc(e,t){return t=uc({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function uc(e,t){return ay(e,t,0,null)}function rc(e,t,a){return Na(t,e.child,null,a),e=sc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ch(e,t,a){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),dc(e.return,t,a)}function cc(e,t,a,s,r){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:a,tailMode:r}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=s,o.tail=a,o.tailMode=r)}function Dh(e,t,a){var s=t.pendingProps,r=s.revealOrder,o=s.tail;if(ht(e,t,s.children,a),s=it.current,s&2)s=s&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ch(e,a,t);else if(e.tag===19)Ch(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}s&=1}switch(He(it,s),r){case"forwards":for(a=t.child,r=null;a!==null;)e=a.alternate,e!==null&&Ks(e)===null&&(r=a),a=a.sibling;a=r,a===null?(r=t.child,t.child=null):(r=a.sibling,a.sibling=null),cc(t,!1,r,a,o);break;case"backwards":for(a=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&Ks(e)===null){t.child=r;break}e=r.sibling,r.sibling=a,a=r,r=e}cc(t,!0,a,null,o);break;case"together":cc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function kn(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),ra|=t.lanes,!(a&t.childLanes))if(e!==null){if(Al(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(u(153));if(t.child!==null){for(e=t.child,a=ua(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=ua(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function oc(e,t){return e.lanes&t?!0:(e=e.dependencies,!!(e!==null&&tu(e)))}function Lg(e,t,a){switch(t.tag){case 3:gs(t,t.stateNode.containerInfo),ea(t,lt,e.memoizedState.cache),dl();break;case 27:case 5:er(t);break;case 4:gs(t,t.stateNode.containerInfo);break;case 10:ea(t,t.type,t.memoizedProps.value);break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(Fn(t),t.flags|=128,null):a&t.child.childLanes?Nh(e,t,a):(Fn(t),e=kn(e,t,a),e!==null?e.sibling:null);Fn(t);break;case 19:var r=(e.flags&128)!==0;if(s=(a&t.childLanes)!==0,s||(Al(e,t,a,!1),s=(a&t.childLanes)!==0),r){if(s)return Dh(e,t,a);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),He(it,it.current),s)break;return null;case 22:case 23:return t.lanes=0,Oh(e,t,a);case 24:ea(t,lt,e.memoizedState.cache)}return kn(e,t,a)}function zh(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)rt=!0;else{if(!oc(e,a)&&!(t.flags&128))return rt=!1,Lg(e,t,a);rt=!!(e.flags&131072)}else rt=!1,xe&&t.flags&1048576&&vd(t,qs,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var s=t.elementType,r=s._init;if(s=r(s._payload),t.type=s,typeof s=="function")Ac(s)?(e=ja(s,e),t.tag=1,t=kh(null,t,s,e,a)):(t.tag=0,t=nc(null,t,s,e,a));else{if(s!=null){if(r=s.$$typeof,r===te){t.tag=11,t=Eh(null,t,s,e,a);break e}else if(r===G){t.tag=14,t=Ah(null,t,s,e,a);break e}}throw t=se(s)||s,Error(u(306,t,""))}}return t;case 0:return nc(e,t,t.type,t.pendingProps,a);case 1:return s=t.type,r=ja(s,t.pendingProps),kh(e,t,s,r,a);case 3:e:{if(gs(t,t.stateNode.containerInfo),e===null)throw Error(u(387));var o=t.pendingProps;r=t.memoizedState,s=r.element,mc(e,t),Rl(t,o,null,a);var h=t.memoizedState;if(o=h.cache,ea(t,lt,o),o!==r.cache&&hc(t,[lt],a,!0),Ol(),o=h.element,r.isDehydrated)if(r={element:o,isDehydrated:!1,cache:h.cache},t.updateQueue.baseState=r,t.memoizedState=r,t.flags&256){t=Mh(e,t,o,a);break e}else if(o!==s){s=Kt(Error(u(424)),t),hl(s),t=Mh(e,t,o,a);break e}else for(dt=an(t.stateNode.containerInfo.firstChild),St=t,xe=!0,tn=null,fn=!0,a=Rd(t,null,o,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(dl(),o===s){t=kn(e,t,a);break e}ht(e,t,o,a)}t=t.child}return t;case 26:return El(e,t),e===null?(a=By(t.type,null,t.pendingProps,null))?t.memoizedState=a:xe||(a=t.type,e=t.pendingProps,s=gu($n.current).createElement(a),s[pt]=t,s[Rt]=e,yt(s,a,e),ut(s),t.stateNode=s):t.memoizedState=By(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return er(t),e===null&&xe&&(s=t.stateNode=zy(t.type,t.pendingProps,$n.current),St=t,fn=!0,dt=an(s.firstChild)),s=t.pendingProps.children,e!==null||xe?ht(e,t,s,a):t.child=Na(t,null,s,a),El(e,t),t.child;case 5:return e===null&&xe&&((r=s=dt)&&(s=vv(s,t.type,t.pendingProps,fn),s!==null?(t.stateNode=s,St=t,dt=an(s.firstChild),fn=!1,r=!0):r=!1),r||Ma(t)),er(t),r=t.type,o=t.pendingProps,h=e!==null?e.memoizedProps:null,s=o.children,Fc(r,o)?s=null:h!==null&&Fc(r,h)&&(t.flags|=32),t.memoizedState!==null&&(r=qr(e,t,Ug,null,null,a),Ll._currentValue=r),El(e,t),ht(e,t,s,a),t.child;case 6:return e===null&&xe&&((e=a=dt)&&(a=bv(a,t.pendingProps,fn),a!==null?(t.stateNode=a,St=t,dt=null,e=!0):e=!1),e||Ma(t)),null;case 13:return Nh(e,t,a);case 4:return gs(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=Na(t,null,s,a):ht(e,t,s,a),t.child;case 11:return Eh(e,t,t.type,t.pendingProps,a);case 7:return ht(e,t,t.pendingProps,a),t.child;case 8:return ht(e,t,t.pendingProps.children,a),t.child;case 12:return ht(e,t,t.pendingProps.children,a),t.child;case 10:return s=t.pendingProps,ea(t,t.type,s.value),ht(e,t,s.children,a),t.child;case 9:return r=t.type._context,s=t.pendingProps.children,qa(t),r=gt(r),s=s(r),t.flags|=1,ht(e,t,s,a),t.child;case 14:return Ah(e,t,t.type,t.pendingProps,a);case 15:return wh(e,t,t.type,t.pendingProps,a);case 19:return Dh(e,t,a);case 22:return Oh(e,t,a);case 24:return qa(t),s=gt(lt),e===null?(r=jr(),r===null&&(r=qe,o=zr(),r.pooledCache=o,o.refCount++,o!==null&&(r.pooledCacheLanes|=a),r=o),t.memoizedState={parent:s,cache:r},yc(t),ea(t,lt,r)):(e.lanes&a&&(mc(e,t),Rl(t,null,null,a),Ol()),r=e.memoizedState,o=t.memoizedState,r.parent!==s?(r={parent:s,cache:s},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),ea(t,lt,s)):(s=o.cache,ea(t,lt,s),s!==r.cache&&hc(t,[lt],a,!0))),ht(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(u(156,t.tag))}var fc=Me(null),Ba=null,Mn=null;function ea(e,t,a){He(fc,t._currentValue),t._currentValue=a}function Nn(e){e._currentValue=fc.current,Pe(fc)}function dc(e,t,a){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===a)break;e=e.return}}function hc(e,t,a,s){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var o=r.dependencies;if(o!==null){var h=r.child;o=o.firstContext;e:for(;o!==null;){var g=o;o=r;for(var v=0;v<t.length;v++)if(g.context===t[v]){o.lanes|=a,g=o.alternate,g!==null&&(g.lanes|=a),dc(o.return,a,e),s||(h=null);break e}o=g.next}}else if(r.tag===18){if(h=r.return,h===null)throw Error(u(341));h.lanes|=a,o=h.alternate,o!==null&&(o.lanes|=a),dc(h,a,e),h=null}else h=r.child;if(h!==null)h.return=r;else for(h=r;h!==null;){if(h===e){h=null;break}if(r=h.sibling,r!==null){r.return=h.return,h=r;break}h=h.return}r=h}}function Al(e,t,a,s){e=null;for(var r=t,o=!1;r!==null;){if(!o){if(r.flags&524288)o=!0;else if(r.flags&262144)break}if(r.tag===10){var h=r.alternate;if(h===null)throw Error(u(387));if(h=h.memoizedProps,h!==null){var g=r.type;Ct(r.pendingProps.value,h.value)||(e!==null?e.push(g):e=[g])}}else if(r===ps.current){if(h=r.alternate,h===null)throw Error(u(387));h.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(Ll):e=[Ll])}r=r.return}e!==null&&hc(t,e,a,s),t.flags|=262144}function tu(e){for(e=e.firstContext;e!==null;){if(!Ct(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function qa(e){Ba=e,Mn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function gt(e){return Uh(Ba,e)}function nu(e,t){return Ba===null&&qa(e),Uh(e,t)}function Uh(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Mn===null){if(e===null)throw Error(u(308));Mn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Mn=Mn.next=t;return a}var ta=!1;function yc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function mc(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 na(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function aa(e,t,a){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,Ye&2){var r=s.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),s.pending=t,t=js(e),pd(e,null,a),t}return Us(e,s,t,a),js(e)}function wl(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194176)!==0)){var s=t.lanes;s&=e.pendingLanes,a|=s,t.lanes=a,Af(e,a)}}function pc(e,t){var a=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,a===s)){var r=null,o=null;if(a=a.firstBaseUpdate,a!==null){do{var h={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};o===null?r=o=h:o=o.next=h,a=a.next}while(a!==null);o===null?r=o=t:o=o.next=t}else r=o=t;a={baseState:s.baseState,firstBaseUpdate:r,lastBaseUpdate:o,shared:s.shared,callbacks:s.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var gc=!1;function Ol(){if(gc){var e=bi;if(e!==null)throw e}}function Rl(e,t,a,s){gc=!1;var r=e.updateQueue;ta=!1;var o=r.firstBaseUpdate,h=r.lastBaseUpdate,g=r.shared.pending;if(g!==null){r.shared.pending=null;var v=g,T=v.next;v.next=null,h===null?o=T:h.next=T,h=v;var x=e.alternate;x!==null&&(x=x.updateQueue,g=x.lastBaseUpdate,g!==h&&(g===null?x.firstBaseUpdate=T:g.next=T,x.lastBaseUpdate=v))}if(o!==null){var N=r.baseState;h=0,x=T=v=null,g=o;do{var w=g.lane&-536870913,R=w!==g.lane;if(R?(Ae&w)===w:(s&w)===w){w!==0&&w===vi&&(gc=!0),x!==null&&(x=x.next={lane:0,tag:g.tag,payload:g.payload,callback:null,next:null});e:{var F=e,fe=g;w=t;var Je=a;switch(fe.tag){case 1:if(F=fe.payload,typeof F=="function"){N=F.call(Je,N,w);break e}N=F;break e;case 3:F.flags=F.flags&-65537|128;case 0:if(F=fe.payload,w=typeof F=="function"?F.call(Je,N,w):F,w==null)break e;N=H({},N,w);break e;case 2:ta=!0}}w=g.callback,w!==null&&(e.flags|=64,R&&(e.flags|=8192),R=r.callbacks,R===null?r.callbacks=[w]:R.push(w))}else R={lane:w,tag:g.tag,payload:g.payload,callback:g.callback,next:null},x===null?(T=x=R,v=N):x=x.next=R,h|=w;if(g=g.next,g===null){if(g=r.shared.pending,g===null)break;R=g,g=R.next,R.next=null,r.lastBaseUpdate=R,r.shared.pending=null}}while(!0);x===null&&(v=N),r.baseState=v,r.firstBaseUpdate=T,r.lastBaseUpdate=x,o===null&&(r.shared.lanes=0),ra|=h,e.lanes=h,e.memoizedState=N}}function jh(e,t){if(typeof e!="function")throw Error(u(191,e));e.call(t)}function Bh(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)jh(a[e],t)}function xl(e,t){try{var a=t.updateQueue,s=a!==null?a.lastEffect:null;if(s!==null){var r=s.next;a=r;do{if((a.tag&e)===e){s=void 0;var o=a.create,h=a.inst;s=o(),h.destroy=s}a=a.next}while(a!==r)}}catch(g){Be(t,t.return,g)}}function ia(e,t,a){try{var s=t.updateQueue,r=s!==null?s.lastEffect:null;if(r!==null){var o=r.next;s=o;do{if((s.tag&e)===e){var h=s.inst,g=h.destroy;if(g!==void 0){h.destroy=void 0,r=t;var v=a;try{g()}catch(T){Be(r,v,T)}}}s=s.next}while(s!==o)}}catch(T){Be(t,t.return,T)}}function qh(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Bh(t,a)}catch(s){Be(e,e.return,s)}}}function Zh(e,t,a){a.props=ja(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(s){Be(e,t,s)}}function Za(e,t){try{var a=e.ref;if(a!==null){var s=e.stateNode;switch(e.tag){case 26:case 27:case 5:var r=s;break;default:r=s}typeof a=="function"?e.refCleanup=a(r):a.current=r}}catch(o){Be(e,t,o)}}function Dt(e,t){var a=e.ref,s=e.refCleanup;if(a!==null)if(typeof s=="function")try{s()}catch(r){Be(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(r){Be(e,t,r)}else a.current=null}function Hh(e){var t=e.type,a=e.memoizedProps,s=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&s.focus();break e;case"img":a.src?s.src=a.src:a.srcSet&&(s.srcset=a.srcSet)}}catch(r){Be(e,e.return,r)}}function Vh(e,t,a){try{var s=e.stateNode;hv(s,e.type,a,t),s[Rt]=t}catch(r){Be(e,e.return,r)}}function Lh(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27||e.tag===4}function vc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Lh(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==27&&e.tag!==18;){if(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 bc(e,t,a){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?a.nodeType===8?a.parentNode.insertBefore(e,t):a.insertBefore(e,t):(a.nodeType===8?(t=a.parentNode,t.insertBefore(e,a)):(t=a,t.appendChild(e)),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=pu));else if(s!==4&&s!==27&&(e=e.child,e!==null))for(bc(e,t,a),e=e.sibling;e!==null;)bc(e,t,a),e=e.sibling}function au(e,t,a){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(s!==4&&s!==27&&(e=e.child,e!==null))for(au(e,t,a),e=e.sibling;e!==null;)au(e,t,a),e=e.sibling}var Cn=!1,Xe=!1,_c=!1,Kh=typeof WeakSet=="function"?WeakSet:Set,ct=null,Yh=!1;function Kg(e,t){if(e=e.containerInfo,Qc=Eu,e=ud(e),Tr(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var s=a.getSelection&&a.getSelection();if(s&&s.rangeCount!==0){a=s.anchorNode;var r=s.anchorOffset,o=s.focusNode;s=s.focusOffset;try{a.nodeType,o.nodeType}catch{a=null;break e}var h=0,g=-1,v=-1,T=0,x=0,N=e,w=null;t:for(;;){for(var R;N!==a||r!==0&&N.nodeType!==3||(g=h+r),N!==o||s!==0&&N.nodeType!==3||(v=h+s),N.nodeType===3&&(h+=N.nodeValue.length),(R=N.firstChild)!==null;)w=N,N=R;for(;;){if(N===e)break t;if(w===a&&++T===r&&(g=h),w===o&&++x===s&&(v=h),(R=N.nextSibling)!==null)break;N=w,w=N.parentNode}N=R}a=g===-1||v===-1?null:{start:g,end:v}}else a=null}a=a||{start:0,end:0}}else a=null;for(Jc={focusedElem:e,selectionRange:a},Eu=!1,ct=t;ct!==null;)if(t=ct,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ct=e;else for(;ct!==null;){switch(t=ct,o=t.alternate,e=t.flags,t.tag){case 0:break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,a=t,r=o.memoizedProps,o=o.memoizedState,s=a.stateNode;try{var F=ja(a.type,r,a.elementType===a.type);e=s.getSnapshotBeforeUpdate(F,o),s.__reactInternalSnapshotBeforeUpdate=e}catch(fe){Be(a,a.return,fe)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Pc(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Pc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(u(163))}if(e=t.sibling,e!==null){e.return=t.return,ct=e;break}ct=t.return}return F=Yh,Yh=!1,F}function $h(e,t,a){var s=a.flags;switch(a.tag){case 0:case 11:case 15:zn(e,a),s&4&&xl(5,a);break;case 1:if(zn(e,a),s&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(g){Be(a,a.return,g)}else{var r=ja(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(g){Be(a,a.return,g)}}s&64&&qh(a),s&512&&Za(a,a.return);break;case 3:if(zn(e,a),s&64&&(s=a.updateQueue,s!==null)){if(e=null,a.child!==null)switch(a.child.tag){case 27:case 5:e=a.child.stateNode;break;case 1:e=a.child.stateNode}try{Bh(s,e)}catch(g){Be(a,a.return,g)}}break;case 26:zn(e,a),s&512&&Za(a,a.return);break;case 27:case 5:zn(e,a),t===null&&s&4&&Hh(a),s&512&&Za(a,a.return);break;case 12:zn(e,a);break;case 13:zn(e,a),s&4&&Qh(e,a);break;case 22:if(r=a.memoizedState!==null||Cn,!r){t=t!==null&&t.memoizedState!==null||Xe;var o=Cn,h=Xe;Cn=r,(Xe=t)&&!h?la(e,a,(a.subtreeFlags&8772)!==0):zn(e,a),Cn=o,Xe=h}s&512&&(a.memoizedProps.mode==="manual"?Za(a,a.return):Dt(a,a.return));break;default:zn(e,a)}}function Gh(e){var t=e.alternate;t!==null&&(e.alternate=null,Gh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&sr(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 nt=null,zt=!1;function Dn(e,t,a){for(a=a.child;a!==null;)Xh(e,t,a),a=a.sibling}function Xh(e,t,a){if(Mt&&typeof Mt.onCommitFiberUnmount=="function")try{Mt.onCommitFiberUnmount(Wi,a)}catch{}switch(a.tag){case 26:Xe||Dt(a,t),Dn(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Xe||Dt(a,t);var s=nt,r=zt;for(nt=a.stateNode,Dn(e,t,a),a=a.stateNode,t=a.attributes;t.length;)a.removeAttributeNode(t[0]);sr(a),nt=s,zt=r;break;case 5:Xe||Dt(a,t);case 6:r=nt;var o=zt;if(nt=null,Dn(e,t,a),nt=r,zt=o,nt!==null)if(zt)try{e=nt,s=a.stateNode,e.nodeType===8?e.parentNode.removeChild(s):e.removeChild(s)}catch(h){Be(a,t,h)}else try{nt.removeChild(a.stateNode)}catch(h){Be(a,t,h)}break;case 18:nt!==null&&(zt?(t=nt,a=a.stateNode,t.nodeType===8?Ic(t.parentNode,a):t.nodeType===1&&Ic(t,a),Gl(t)):Ic(nt,a.stateNode));break;case 4:s=nt,r=zt,nt=a.stateNode.containerInfo,zt=!0,Dn(e,t,a),nt=s,zt=r;break;case 0:case 11:case 14:case 15:Xe||ia(2,a,t),Xe||ia(4,a,t),Dn(e,t,a);break;case 1:Xe||(Dt(a,t),s=a.stateNode,typeof s.componentWillUnmount=="function"&&Zh(a,t,s)),Dn(e,t,a);break;case 21:Dn(e,t,a);break;case 22:Xe||Dt(a,t),Xe=(s=Xe)||a.memoizedState!==null,Dn(e,t,a),Xe=s;break;default:Dn(e,t,a)}}function Qh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Gl(e)}catch(a){Be(t,t.return,a)}}function Yg(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Kh),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Kh),t;default:throw Error(u(435,e.tag))}}function Sc(e,t){var a=Yg(e);t.forEach(function(s){var r=av.bind(null,e,s);a.has(s)||(a.add(s),s.then(r,r))})}function Xt(e,t){var a=t.deletions;if(a!==null)for(var s=0;s<a.length;s++){var r=a[s],o=e,h=t,g=h;e:for(;g!==null;){switch(g.tag){case 27:case 5:nt=g.stateNode,zt=!1;break e;case 3:nt=g.stateNode.containerInfo,zt=!0;break e;case 4:nt=g.stateNode.containerInfo,zt=!0;break e}g=g.return}if(nt===null)throw Error(u(160));Xh(o,h,r),nt=null,zt=!1,o=r.alternate,o!==null&&(o.return=null),r.return=null}if(t.subtreeFlags&13878)for(t=t.child;t!==null;)Jh(t,e),t=t.sibling}var nn=null;function Jh(e,t){var a=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Xt(t,e),Qt(e),s&4&&(ia(3,e,e.return),xl(3,e),ia(5,e,e.return));break;case 1:Xt(t,e),Qt(e),s&512&&(Xe||a===null||Dt(a,a.return)),s&64&&Cn&&(e=e.updateQueue,e!==null&&(s=e.callbacks,s!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?s:a.concat(s))));break;case 26:var r=nn;if(Xt(t,e),Qt(e),s&512&&(Xe||a===null||Dt(a,a.return)),s&4){var o=a!==null?a.memoizedState:null;if(s=e.memoizedState,a===null)if(s===null)if(e.stateNode===null){e:{s=e.type,a=e.memoizedProps,r=r.ownerDocument||r;t:switch(s){case"title":o=r.getElementsByTagName("title")[0],(!o||o[el]||o[pt]||o.namespaceURI==="http://www.w3.org/2000/svg"||o.hasAttribute("itemprop"))&&(o=r.createElement(s),r.head.insertBefore(o,r.querySelector("head > title"))),yt(o,s,a),o[pt]=e,ut(o),s=o;break e;case"link":var h=Hy("link","href",r).get(s+(a.href||""));if(h){for(var g=0;g<h.length;g++)if(o=h[g],o.getAttribute("href")===(a.href==null?null:a.href)&&o.getAttribute("rel")===(a.rel==null?null:a.rel)&&o.getAttribute("title")===(a.title==null?null:a.title)&&o.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){h.splice(g,1);break t}}o=r.createElement(s),yt(o,s,a),r.head.appendChild(o);break;case"meta":if(h=Hy("meta","content",r).get(s+(a.content||""))){for(g=0;g<h.length;g++)if(o=h[g],o.getAttribute("content")===(a.content==null?null:""+a.content)&&o.getAttribute("name")===(a.name==null?null:a.name)&&o.getAttribute("property")===(a.property==null?null:a.property)&&o.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&o.getAttribute("charset")===(a.charSet==null?null:a.charSet)){h.splice(g,1);break t}}o=r.createElement(s),yt(o,s,a),r.head.appendChild(o);break;default:throw Error(u(468,s))}o[pt]=e,ut(o),s=o}e.stateNode=s}else Vy(r,e.type,e.stateNode);else e.stateNode=Zy(r,s,e.memoizedProps);else o!==s?(o===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):o.count--,s===null?Vy(r,e.type,e.stateNode):Zy(r,s,e.memoizedProps)):s===null&&e.stateNode!==null&&Vh(e,e.memoizedProps,a.memoizedProps)}break;case 27:if(s&4&&e.alternate===null){r=e.stateNode,o=e.memoizedProps;try{for(var v=r.firstChild;v;){var T=v.nextSibling,x=v.nodeName;v[el]||x==="HEAD"||x==="BODY"||x==="SCRIPT"||x==="STYLE"||x==="LINK"&&v.rel.toLowerCase()==="stylesheet"||r.removeChild(v),v=T}for(var N=e.type,w=r.attributes;w.length;)r.removeAttributeNode(w[0]);yt(r,N,o),r[pt]=e,r[Rt]=o}catch(F){Be(e,e.return,F)}}case 5:if(Xt(t,e),Qt(e),s&512&&(Xe||a===null||Dt(a,a.return)),e.flags&32){r=e.stateNode;try{si(r,"")}catch(F){Be(e,e.return,F)}}s&4&&e.stateNode!=null&&(r=e.memoizedProps,Vh(e,r,a!==null?a.memoizedProps:r)),s&1024&&(_c=!0);break;case 6:if(Xt(t,e),Qt(e),s&4){if(e.stateNode===null)throw Error(u(162));s=e.memoizedProps,a=e.stateNode;try{a.nodeValue=s}catch(F){Be(e,e.return,F)}}break;case 3:if(_u=null,r=nn,nn=vu(t.containerInfo),Xt(t,e),nn=r,Qt(e),s&4&&a!==null&&a.memoizedState.isDehydrated)try{Gl(t.containerInfo)}catch(F){Be(e,e.return,F)}_c&&(_c=!1,Fh(e));break;case 4:s=nn,nn=vu(e.stateNode.containerInfo),Xt(t,e),Qt(e),nn=s;break;case 12:Xt(t,e),Qt(e);break;case 13:Xt(t,e),Qt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Mc=on()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Sc(e,s)));break;case 22:if(s&512&&(Xe||a===null||Dt(a,a.return)),v=e.memoizedState!==null,T=a!==null&&a.memoizedState!==null,x=Cn,N=Xe,Cn=x||v,Xe=N||T,Xt(t,e),Xe=N,Cn=x,Qt(e),t=e.stateNode,t._current=e,t._visibility&=-3,t._visibility|=t._pendingVisibility&2,s&8192&&(t._visibility=v?t._visibility&-2:t._visibility|1,v&&(t=Cn||Xe,a===null||T||t||Ei(e)),e.memoizedProps===null||e.memoizedProps.mode!=="manual"))e:for(a=null,t=e;;){if(t.tag===5||t.tag===26||t.tag===27){if(a===null){T=a=t;try{if(r=T.stateNode,v)o=r.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none";else{h=T.stateNode,g=T.memoizedProps.style;var R=g!=null&&g.hasOwnProperty("display")?g.display:null;h.style.display=R==null||typeof R=="boolean"?"":(""+R).trim()}}catch(F){Be(T,T.return,F)}}}else if(t.tag===6){if(a===null){T=t;try{T.stateNode.nodeValue=v?"":T.memoizedProps}catch(F){Be(T,T.return,F)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}s&4&&(s=e.updateQueue,s!==null&&(a=s.retryQueue,a!==null&&(s.retryQueue=null,Sc(e,a))));break;case 19:Xt(t,e),Qt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Sc(e,s)));break;case 21:break;default:Xt(t,e),Qt(e)}}function Qt(e){var t=e.flags;if(t&2){try{if(e.tag!==27){e:{for(var a=e.return;a!==null;){if(Lh(a)){var s=a;break e}a=a.return}throw Error(u(160))}switch(s.tag){case 27:var r=s.stateNode,o=vc(e);au(e,o,r);break;case 5:var h=s.stateNode;s.flags&32&&(si(h,""),s.flags&=-33);var g=vc(e);au(e,g,h);break;case 3:case 4:var v=s.stateNode.containerInfo,T=vc(e);bc(e,T,v);break;default:throw Error(u(161))}}}catch(x){Be(e,e.return,x)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Fh(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Fh(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function zn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)$h(e,t.alternate,t),t=t.sibling}function Ei(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:ia(4,t,t.return),Ei(t);break;case 1:Dt(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Zh(t,t.return,a),Ei(t);break;case 26:case 27:case 5:Dt(t,t.return),Ei(t);break;case 22:Dt(t,t.return),t.memoizedState===null&&Ei(t);break;default:Ei(t)}e=e.sibling}}function la(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var s=t.alternate,r=e,o=t,h=o.flags;switch(o.tag){case 0:case 11:case 15:la(r,o,a),xl(4,o);break;case 1:if(la(r,o,a),s=o,r=s.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(T){Be(s,s.return,T)}if(s=o,r=s.updateQueue,r!==null){var g=s.stateNode;try{var v=r.shared.hiddenCallbacks;if(v!==null)for(r.shared.hiddenCallbacks=null,r=0;r<v.length;r++)jh(v[r],g)}catch(T){Be(s,s.return,T)}}a&&h&64&&qh(o),Za(o,o.return);break;case 26:case 27:case 5:la(r,o,a),a&&s===null&&h&4&&Hh(o),Za(o,o.return);break;case 12:la(r,o,a);break;case 13:la(r,o,a),a&&h&4&&Qh(r,o);break;case 22:o.memoizedState===null&&la(r,o,a),Za(o,o.return);break;default:la(r,o,a)}t=t.sibling}}function Tc(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&vl(a))}function Ec(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&vl(e))}function sa(e,t,a,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Wh(e,t,a,s),t=t.sibling}function Wh(e,t,a,s){var r=t.flags;switch(t.tag){case 0:case 11:case 15:sa(e,t,a,s),r&2048&&xl(9,t);break;case 3:sa(e,t,a,s),r&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&vl(e)));break;case 12:if(r&2048){sa(e,t,a,s),e=t.stateNode;try{var o=t.memoizedProps,h=o.id,g=o.onPostCommit;typeof g=="function"&&g(h,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(v){Be(t,t.return,v)}}else sa(e,t,a,s);break;case 23:break;case 22:o=t.stateNode,t.memoizedState!==null?o._visibility&4?sa(e,t,a,s):kl(e,t):o._visibility&4?sa(e,t,a,s):(o._visibility|=4,Ai(e,t,a,s,(t.subtreeFlags&10256)!==0)),r&2048&&Tc(t.alternate,t);break;case 24:sa(e,t,a,s),r&2048&&Ec(t.alternate,t);break;default:sa(e,t,a,s)}}function Ai(e,t,a,s,r){for(r=r&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;){var o=e,h=t,g=a,v=s,T=h.flags;switch(h.tag){case 0:case 11:case 15:Ai(o,h,g,v,r),xl(8,h);break;case 23:break;case 22:var x=h.stateNode;h.memoizedState!==null?x._visibility&4?Ai(o,h,g,v,r):kl(o,h):(x._visibility|=4,Ai(o,h,g,v,r)),r&&T&2048&&Tc(h.alternate,h);break;case 24:Ai(o,h,g,v,r),r&&T&2048&&Ec(h.alternate,h);break;default:Ai(o,h,g,v,r)}t=t.sibling}}function kl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,s=t,r=s.flags;switch(s.tag){case 22:kl(a,s),r&2048&&Tc(s.alternate,s);break;case 24:kl(a,s),r&2048&&Ec(s.alternate,s);break;default:kl(a,s)}t=t.sibling}}var Ml=8192;function wi(e){if(e.subtreeFlags&Ml)for(e=e.child;e!==null;)Ih(e),e=e.sibling}function Ih(e){switch(e.tag){case 26:wi(e),e.flags&Ml&&e.memoizedState!==null&&Cv(nn,e.memoizedState,e.memoizedProps);break;case 5:wi(e);break;case 3:case 4:var t=nn;nn=vu(e.stateNode.containerInfo),wi(e),nn=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=Ml,Ml=16777216,wi(e),Ml=t):wi(e));break;default:wi(e)}}function Ph(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 Nl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var a=0;a<t.length;a++){var s=t[a];ct=s,ty(s,e)}Ph(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)ey(e),e=e.sibling}function ey(e){switch(e.tag){case 0:case 11:case 15:Nl(e),e.flags&2048&&ia(9,e,e.return);break;case 3:Nl(e);break;case 12:Nl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&4&&(e.return===null||e.return.tag!==13)?(t._visibility&=-5,iu(e)):Nl(e);break;default:Nl(e)}}function iu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var a=0;a<t.length;a++){var s=t[a];ct=s,ty(s,e)}Ph(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:ia(8,t,t.return),iu(t);break;case 22:a=t.stateNode,a._visibility&4&&(a._visibility&=-5,iu(t));break;default:iu(t)}e=e.sibling}}function ty(e,t){for(;ct!==null;){var a=ct;switch(a.tag){case 0:case 11:case 15:ia(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var s=a.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:vl(a.memoizedState.cache)}if(s=a.child,s!==null)s.return=a,ct=s;else e:for(a=e;ct!==null;){s=ct;var r=s.sibling,o=s.return;if(Gh(s),s===a){ct=null;break e}if(r!==null){r.return=o,ct=r;break e}ct=o}}}function $g(e,t,a,s){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Jt(e,t,a,s){return new $g(e,t,a,s)}function Ac(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ua(e,t){var a=e.alternate;return a===null?(a=Jt(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&31457280,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function ny(e,t){e.flags&=31457282;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function lu(e,t,a,s,r,o){var h=0;if(s=e,typeof e=="function")Ac(e)&&(h=1);else if(typeof e=="string")h=Mv(e,a,cn.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case p:return Ha(a.children,r,o,t);case y:h=8,r|=24;break;case b:return e=Jt(12,a,t,r|2),e.elementType=b,e.lanes=o,e;case L:return e=Jt(13,a,t,r),e.elementType=L,e.lanes=o,e;case Q:return e=Jt(19,a,t,r),e.elementType=Q,e.lanes=o,e;case ye:return ay(a,r,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case O:case C:h=10;break e;case k:h=9;break e;case te:h=11;break e;case G:h=14;break e;case P:h=16,s=null;break e}h=29,a=Error(u(130,e===null?"null":typeof e,"")),s=null}return t=Jt(h,a,t,r),t.elementType=e,t.type=s,t.lanes=o,t}function Ha(e,t,a,s){return e=Jt(7,e,s,t),e.lanes=a,e}function ay(e,t,a,s){e=Jt(22,e,s,t),e.elementType=ye,e.lanes=a;var r={_visibility:1,_pendingVisibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null,_current:null,detach:function(){var o=r._current;if(o===null)throw Error(u(456));if(!(r._pendingVisibility&2)){var h=Jn(o,2);h!==null&&(r._pendingVisibility|=2,Tt(h,o,2))}},attach:function(){var o=r._current;if(o===null)throw Error(u(456));if(r._pendingVisibility&2){var h=Jn(o,2);h!==null&&(r._pendingVisibility&=-3,Tt(h,o,2))}}};return e.stateNode=r,e}function wc(e,t,a){return e=Jt(6,e,null,t),e.lanes=a,e}function Oc(e,t,a){return t=Jt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Un(e){e.flags|=4}function iy(e,t){if(t.type!=="stylesheet"||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Ly(t)){if(t=Gt.current,t!==null&&((Ae&4194176)===Ae?dn!==null:(Ae&62914560)!==Ae&&!(Ae&536870912)||t!==dn))throw ml=Nr,Sd;e.flags|=8192}}function su(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Tf():536870912,e.lanes|=t,Ri|=t)}function Cl(e,t){if(!xe)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var s=null;a!==null;)a.alternate!==null&&(s=a),a=a.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function Ke(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,s=0;if(t)for(var r=e.child;r!==null;)a|=r.lanes|r.childLanes,s|=r.subtreeFlags&31457280,s|=r.flags&31457280,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)a|=r.lanes|r.childLanes,s|=r.subtreeFlags,s|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=s,e.childLanes=a,t}function Gg(e,t,a){var s=t.pendingProps;switch(kr(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ke(t),null;case 1:return Ke(t),null;case 3:return a=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),Nn(lt),ei(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(fl(t)?Un(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,tn!==null&&(zc(tn),tn=null))),Ke(t),null;case 26:return a=t.memoizedState,e===null?(Un(t),a!==null?(Ke(t),iy(t,a)):(Ke(t),t.flags&=-16777217)):a?a!==e.memoizedState?(Un(t),Ke(t),iy(t,a)):(Ke(t),t.flags&=-16777217):(e.memoizedProps!==s&&Un(t),Ke(t),t.flags&=-16777217),null;case 27:vs(t),a=$n.current;var r=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Un(t);else{if(!s){if(t.stateNode===null)throw Error(u(166));return Ke(t),null}e=cn.current,fl(t)?bd(t):(e=zy(r,s,a),t.stateNode=e,Un(t))}return Ke(t),null;case 5:if(vs(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Un(t);else{if(!s){if(t.stateNode===null)throw Error(u(166));return Ke(t),null}if(e=cn.current,fl(t))bd(t);else{switch(r=gu($n.current),e){case 1:e=r.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:e=r.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":e=r.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":e=r.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":e=r.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof s.is=="string"?r.createElement("select",{is:s.is}):r.createElement("select"),s.multiple?e.multiple=!0:s.size&&(e.size=s.size);break;default:e=typeof s.is=="string"?r.createElement(a,{is:s.is}):r.createElement(a)}}e[pt]=t,e[Rt]=s;e:for(r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.tag!==27&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break e;for(;r.sibling===null;){if(r.return===null||r.return===t)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}t.stateNode=e;e:switch(yt(e,a,s),a){case"button":case"input":case"select":case"textarea":e=!!s.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&Un(t)}}return Ke(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&Un(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(u(166));if(e=$n.current,fl(t)){if(e=t.stateNode,a=t.memoizedProps,s=null,r=St,r!==null)switch(r.tag){case 27:case 5:s=r.memoizedProps}e[pt]=t,e=!!(e.nodeValue===a||s!==null&&s.suppressHydrationWarning===!0||xy(e.nodeValue,a)),e||Ma(t)}else e=gu(e).createTextNode(s),e[pt]=t,t.stateNode=e}return Ke(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=fl(t),s!==null&&s.dehydrated!==null){if(e===null){if(!r)throw Error(u(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(u(317));r[pt]=t}else dl(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ke(t),r=!1}else tn!==null&&(zc(tn),tn=null),r=!0;if(!r)return t.flags&256?(Rn(t),t):(Rn(t),null)}if(Rn(t),t.flags&128)return t.lanes=a,t;if(a=s!==null,e=e!==null&&e.memoizedState!==null,a){s=t.child,r=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(r=s.alternate.memoizedState.cachePool.pool);var o=null;s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(o=s.memoizedState.cachePool.pool),o!==r&&(s.flags|=2048)}return a!==e&&a&&(t.child.flags|=8192),su(t,t.updateQueue),Ke(t),null;case 4:return ei(),e===null&&$c(t.stateNode.containerInfo),Ke(t),null;case 10:return Nn(t.type),Ke(t),null;case 19:if(Pe(it),r=t.memoizedState,r===null)return Ke(t),null;if(s=(t.flags&128)!==0,o=r.rendering,o===null)if(s)Cl(r,!1);else{if(Qe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Ks(e),o!==null){for(t.flags|=128,Cl(r,!1),e=o.updateQueue,t.updateQueue=e,su(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)ny(a,e),a=a.sibling;return He(it,it.current&1|2),t.child}e=e.sibling}r.tail!==null&&on()>uu&&(t.flags|=128,s=!0,Cl(r,!1),t.lanes=4194304)}else{if(!s)if(e=Ks(o),e!==null){if(t.flags|=128,s=!0,e=e.updateQueue,t.updateQueue=e,su(t,e),Cl(r,!0),r.tail===null&&r.tailMode==="hidden"&&!o.alternate&&!xe)return Ke(t),null}else 2*on()-r.renderingStartTime>uu&&a!==536870912&&(t.flags|=128,s=!0,Cl(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e!==null?e.sibling=o:t.child=o,r.last=o)}return r.tail!==null?(t=r.tail,r.rendering=t,r.tail=t.sibling,r.renderingStartTime=on(),t.sibling=null,e=it.current,He(it,s?e&1|2:e&1),t):(Ke(t),null);case 22:case 23:return Rn(t),Dr(),s=t.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(t.flags|=8192):s&&(t.flags|=8192),s?a&536870912&&!(t.flags&128)&&(Ke(t),t.subtreeFlags&6&&(t.flags|=8192)):Ke(t),a=t.updateQueue,a!==null&&su(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),s=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),s!==a&&(t.flags|=2048),e!==null&&Pe(Ca),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Nn(lt),Ke(t),null;case 25:return null}throw Error(u(156,t.tag))}function Xg(e,t){switch(kr(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Nn(lt),ei(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return vs(t),null;case 13:if(Rn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));dl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Pe(it),null;case 4:return ei(),null;case 10:return Nn(t.type),null;case 22:case 23:return Rn(t),Dr(),e!==null&&Pe(Ca),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Nn(lt),null;case 25:return null;default:return null}}function ly(e,t){switch(kr(t),t.tag){case 3:Nn(lt),ei();break;case 26:case 27:case 5:vs(t);break;case 4:ei();break;case 13:Rn(t);break;case 19:Pe(it);break;case 10:Nn(t.type);break;case 22:case 23:Rn(t),Dr(),e!==null&&Pe(Ca);break;case 24:Nn(lt)}}var Qg={getCacheForType:function(e){var t=gt(lt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a}},Jg=typeof WeakMap=="function"?WeakMap:Map,Ye=0,qe=null,_e=null,Ae=0,Ze=0,Ut=null,jn=!1,Oi=!1,Rc=!1,Bn=0,Qe=0,ra=0,Va=0,xc=0,Ft=0,Ri=0,Dl=null,yn=null,kc=!1,Mc=0,uu=1/0,ru=null,ca=null,cu=!1,La=null,zl=0,Nc=0,Cc=null,Ul=0,Dc=null;function jt(){if(Ye&2&&Ae!==0)return Ae&-Ae;if(j.T!==null){var e=vi;return e!==0?e:Vc()}return Of()}function sy(){Ft===0&&(Ft=!(Ae&536870912)||xe?Sf():536870912);var e=Gt.current;return e!==null&&(e.flags|=32),Ft}function Tt(e,t,a){(e===qe&&Ze===2||e.cancelPendingCommit!==null)&&(xi(e,0),qn(e,Ae,Ft,!1)),Pi(e,a),(!(Ye&2)||e!==qe)&&(e===qe&&(!(Ye&2)&&(Va|=a),Qe===4&&qn(e,Ae,Ft,!1)),mn(e))}function uy(e,t,a){if(Ye&6)throw Error(u(327));var s=!a&&(t&60)===0&&(t&e.expiredLanes)===0||Ii(e,t),r=s?Ig(e,t):Bc(e,t,!0),o=s;do{if(r===0){Oi&&!s&&qn(e,t,0,!1);break}else if(r===6)qn(e,t,0,!jn);else{if(a=e.current.alternate,o&&!Fg(a)){r=Bc(e,t,!1),o=!1;continue}if(r===2){if(o=t,e.errorRecoveryDisabledLanes&o)var h=0;else h=e.pendingLanes&-536870913,h=h!==0?h:h&536870912?536870912:0;if(h!==0){t=h;e:{var g=e;r=Dl;var v=g.current.memoizedState.isDehydrated;if(v&&(xi(g,h).flags|=256),h=Bc(g,h,!1),h!==2){if(Rc&&!v){g.errorRecoveryDisabledLanes|=o,Va|=o,r=4;break e}o=yn,yn=r,o!==null&&zc(o)}r=h}if(o=!1,r!==2)continue}}if(r===1){xi(e,0),qn(e,t,0,!0);break}e:{switch(s=e,r){case 0:case 1:throw Error(u(345));case 4:if((t&4194176)===t){qn(s,t,Ft,!jn);break e}break;case 2:yn=null;break;case 3:case 5:break;default:throw Error(u(329))}if(s.finishedWork=a,s.finishedLanes=t,(t&62914560)===t&&(o=Mc+300-on(),10<o)){if(qn(s,t,Ft,!jn),Ts(s,0)!==0)break e;s.timeoutHandle=Ny(ry.bind(null,s,a,yn,ru,kc,t,Ft,Va,Ri,jn,2,-0,0),o);break e}ry(s,a,yn,ru,kc,t,Ft,Va,Ri,jn,0,-0,0)}}break}while(!0);mn(e)}function zc(e){yn===null?yn=e:yn.push.apply(yn,e)}function ry(e,t,a,s,r,o,h,g,v,T,x,N,w){var R=t.subtreeFlags;if((R&8192||(R&16785408)===16785408)&&(Vl={stylesheets:null,count:0,unsuspend:Nv},Ih(t),t=Dv(),t!==null)){e.cancelPendingCommit=t(my.bind(null,e,a,s,r,h,g,v,1,N,w)),qn(e,o,h,!T);return}my(e,a,s,r,h,g,v,x,N,w)}function Fg(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var s=0;s<a.length;s++){var r=a[s],o=r.getSnapshot;r=r.value;try{if(!Ct(o(),r))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function qn(e,t,a,s){t&=~xc,t&=~Va,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var r=t;0<r;){var o=31-Nt(r),h=1<<o;s[o]=-1,r&=~h}a!==0&&Ef(e,a,t)}function ou(){return Ye&6?!0:(jl(0),!1)}function Uc(){if(_e!==null){if(Ze===0)var e=_e.return;else e=_e,Mn=Ba=null,Vr(e),pi=null,pl=0,e=_e;for(;e!==null;)ly(e.alternate,e),e=e.return;_e=null}}function xi(e,t){e.finishedWork=null,e.finishedLanes=0;var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,mv(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Uc(),qe=e,_e=a=ua(e.current,null),Ae=t,Ze=0,Ut=null,jn=!1,Oi=Ii(e,t),Rc=!1,Ri=Ft=xc=Va=ra=Qe=0,yn=Dl=null,kc=!1,t&8&&(t|=t&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=t;0<s;){var r=31-Nt(s),o=1<<r;t|=e[r],s&=~o}return Bn=t,zs(),a}function cy(e,t){ge=null,j.H=hn,t===yl?(t=Ad(),Ze=3):t===Sd?(t=Ad(),Ze=4):Ze=t===Th?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Ut=t,_e===null&&(Qe=1,eu(e,Kt(t,e.current)))}function oy(){var e=j.H;return j.H=hn,e===null?hn:e}function fy(){var e=j.A;return j.A=Qg,e}function jc(){Qe=4,jn||(Ae&4194176)!==Ae&&Gt.current!==null||(Oi=!0),!(ra&134217727)&&!(Va&134217727)||qe===null||qn(qe,Ae,Ft,!1)}function Bc(e,t,a){var s=Ye;Ye|=2;var r=oy(),o=fy();(qe!==e||Ae!==t)&&(ru=null,xi(e,t)),t=!1;var h=Qe;e:do try{if(Ze!==0&&_e!==null){var g=_e,v=Ut;switch(Ze){case 8:Uc(),h=6;break e;case 3:case 2:case 6:Gt.current===null&&(t=!0);var T=Ze;if(Ze=0,Ut=null,ki(e,g,v,T),a&&Oi){h=0;break e}break;default:T=Ze,Ze=0,Ut=null,ki(e,g,v,T)}}Wg(),h=Qe;break}catch(x){cy(e,x)}while(!0);return t&&e.shellSuspendCounter++,Mn=Ba=null,Ye=s,j.H=r,j.A=o,_e===null&&(qe=null,Ae=0,zs()),h}function Wg(){for(;_e!==null;)dy(_e)}function Ig(e,t){var a=Ye;Ye|=2;var s=oy(),r=fy();qe!==e||Ae!==t?(ru=null,uu=on()+500,xi(e,t)):Oi=Ii(e,t);e:do try{if(Ze!==0&&_e!==null){t=_e;var o=Ut;t:switch(Ze){case 1:Ze=0,Ut=null,ki(e,t,o,1);break;case 2:if(Td(o)){Ze=0,Ut=null,hy(t);break}t=function(){Ze===2&&qe===e&&(Ze=7),mn(e)},o.then(t,t);break e;case 3:Ze=7;break e;case 4:Ze=5;break e;case 7:Td(o)?(Ze=0,Ut=null,hy(t)):(Ze=0,Ut=null,ki(e,t,o,7));break;case 5:var h=null;switch(_e.tag){case 26:h=_e.memoizedState;case 5:case 27:var g=_e;if(!h||Ly(h)){Ze=0,Ut=null;var v=g.sibling;if(v!==null)_e=v;else{var T=g.return;T!==null?(_e=T,fu(T)):_e=null}break t}}Ze=0,Ut=null,ki(e,t,o,5);break;case 6:Ze=0,Ut=null,ki(e,t,o,6);break;case 8:Uc(),Qe=6;break e;default:throw Error(u(462))}}Pg();break}catch(x){cy(e,x)}while(!0);return Mn=Ba=null,j.H=s,j.A=r,Ye=a,_e!==null?0:(qe=null,Ae=0,zs(),Qe)}function Pg(){for(;_e!==null&&!Sp();)dy(_e)}function dy(e){var t=zh(e.alternate,e,Bn);e.memoizedProps=e.pendingProps,t===null?fu(e):_e=t}function hy(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=xh(a,t,t.pendingProps,t.type,void 0,Ae);break;case 11:t=xh(a,t,t.pendingProps,t.type.render,t.ref,Ae);break;case 5:Vr(t);default:ly(a,t),t=_e=ny(t,Bn),t=zh(a,t,Bn)}e.memoizedProps=e.pendingProps,t===null?fu(e):_e=t}function ki(e,t,a,s){Mn=Ba=null,Vr(t),pi=null,pl=0;var r=t.return;try{if(Vg(e,r,t,a,Ae)){Qe=1,eu(e,Kt(a,e.current)),_e=null;return}}catch(o){if(r!==null)throw _e=r,o;Qe=1,eu(e,Kt(a,e.current)),_e=null;return}t.flags&32768?(xe||s===1?e=!0:Oi||Ae&536870912?e=!1:(jn=e=!0,(s===2||s===3||s===6)&&(s=Gt.current,s!==null&&s.tag===13&&(s.flags|=16384))),yy(t,e)):fu(t)}function fu(e){var t=e;do{if(t.flags&32768){yy(t,jn);return}e=t.return;var a=Gg(t.alternate,t,Bn);if(a!==null){_e=a;return}if(t=t.sibling,t!==null){_e=t;return}_e=t=e}while(t!==null);Qe===0&&(Qe=5)}function yy(e,t){do{var a=Xg(e.alternate,e);if(a!==null){a.flags&=32767,_e=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){_e=e;return}_e=e=a}while(e!==null);Qe=6,_e=null}function my(e,t,a,s,r,o,h,g,v,T){var x=j.T,N=$.p;try{$.p=2,j.T=null,ev(e,t,a,s,N,r,o,h,g,v,T)}finally{j.T=x,$.p=N}}function ev(e,t,a,s,r,o,h,g){do Mi();while(La!==null);if(Ye&6)throw Error(u(327));var v=e.finishedWork;if(s=e.finishedLanes,v===null)return null;if(e.finishedWork=null,e.finishedLanes=0,v===e.current)throw Error(u(177));e.callbackNode=null,e.callbackPriority=0,e.cancelPendingCommit=null;var T=v.lanes|v.childLanes;if(T|=Or,Cp(e,s,T,o,h,g),e===qe&&(_e=qe=null,Ae=0),!(v.subtreeFlags&10256)&&!(v.flags&10256)||cu||(cu=!0,Nc=T,Cc=a,iv(bs,function(){return Mi(),null})),a=(v.flags&15990)!==0,v.subtreeFlags&15990||a?(a=j.T,j.T=null,o=$.p,$.p=2,h=Ye,Ye|=4,Kg(e,v),Jh(v,e),Ag(Jc,e.containerInfo),Eu=!!Qc,Jc=Qc=null,e.current=v,$h(e,v.alternate,v),Tp(),Ye=h,$.p=o,j.T=a):e.current=v,cu?(cu=!1,La=e,zl=s):py(e,T),T=e.pendingLanes,T===0&&(ca=null),Rp(v.stateNode),mn(e),t!==null)for(r=e.onRecoverableError,v=0;v<t.length;v++)T=t[v],r(T.value,{componentStack:T.stack});return zl&3&&Mi(),T=e.pendingLanes,s&4194218&&T&42?e===Dc?Ul++:(Ul=0,Dc=e):Ul=0,jl(0),null}function py(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,vl(t)))}function Mi(){if(La!==null){var e=La,t=Nc;Nc=0;var a=wf(zl),s=j.T,r=$.p;try{if($.p=32>a?32:a,j.T=null,La===null)var o=!1;else{a=Cc,Cc=null;var h=La,g=zl;if(La=null,zl=0,Ye&6)throw Error(u(331));var v=Ye;if(Ye|=4,ey(h.current),Wh(h,h.current,g,a),Ye=v,jl(0,!1),Mt&&typeof Mt.onPostCommitFiberRoot=="function")try{Mt.onPostCommitFiberRoot(Wi,h)}catch{}o=!0}return o}finally{$.p=r,j.T=s,py(e,t)}}return!1}function gy(e,t,a){t=Kt(a,t),t=tc(e.stateNode,t,2),e=aa(e,t,2),e!==null&&(Pi(e,2),mn(e))}function Be(e,t,a){if(e.tag===3)gy(e,e,a);else for(;t!==null;){if(t.tag===3){gy(t,e,a);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(ca===null||!ca.has(s))){e=Kt(a,e),a=_h(2),s=aa(t,a,2),s!==null&&(Sh(a,s,t,e),Pi(s,2),mn(s));break}}t=t.return}}function qc(e,t,a){var s=e.pingCache;if(s===null){s=e.pingCache=new Jg;var r=new Set;s.set(t,r)}else r=s.get(t),r===void 0&&(r=new Set,s.set(t,r));r.has(a)||(Rc=!0,r.add(a),e=tv.bind(null,e,t,a),t.then(e,e))}function tv(e,t,a){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,qe===e&&(Ae&a)===a&&(Qe===4||Qe===3&&(Ae&62914560)===Ae&&300>on()-Mc?!(Ye&2)&&xi(e,0):xc|=a,Ri===Ae&&(Ri=0)),mn(e)}function vy(e,t){t===0&&(t=Tf()),e=Jn(e,t),e!==null&&(Pi(e,t),mn(e))}function nv(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),vy(e,a)}function av(e,t){var a=0;switch(e.tag){case 13:var s=e.stateNode,r=e.memoizedState;r!==null&&(a=r.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(u(314))}s!==null&&s.delete(t),vy(e,a)}function iv(e,t){return nr(e,t)}var du=null,Ni=null,Zc=!1,hu=!1,Hc=!1,Ka=0;function mn(e){e!==Ni&&e.next===null&&(Ni===null?du=Ni=e:Ni=Ni.next=e),hu=!0,Zc||(Zc=!0,sv(lv))}function jl(e,t){if(!Hc&&hu){Hc=!0;do for(var a=!1,s=du;s!==null;){if(e!==0){var r=s.pendingLanes;if(r===0)var o=0;else{var h=s.suspendedLanes,g=s.pingedLanes;o=(1<<31-Nt(42|e)+1)-1,o&=r&~(h&~g),o=o&201326677?o&201326677|1:o?o|2:0}o!==0&&(a=!0,Sy(s,o))}else o=Ae,o=Ts(s,s===qe?o:0),!(o&3)||Ii(s,o)||(a=!0,Sy(s,o));s=s.next}while(a);Hc=!1}}function lv(){hu=Zc=!1;var e=0;Ka!==0&&(yv()&&(e=Ka),Ka=0);for(var t=on(),a=null,s=du;s!==null;){var r=s.next,o=by(s,t);o===0?(s.next=null,a===null?du=r:a.next=r,r===null&&(Ni=a)):(a=s,(e!==0||o&3)&&(hu=!0)),s=r}jl(e)}function by(e,t){for(var a=e.suspendedLanes,s=e.pingedLanes,r=e.expirationTimes,o=e.pendingLanes&-62914561;0<o;){var h=31-Nt(o),g=1<<h,v=r[h];v===-1?(!(g&a)||g&s)&&(r[h]=Np(g,t)):v<=t&&(e.expiredLanes|=g),o&=~g}if(t=qe,a=Ae,a=Ts(e,e===t?a:0),s=e.callbackNode,a===0||e===t&&Ze===2||e.cancelPendingCommit!==null)return s!==null&&s!==null&&ar(s),e.callbackNode=null,e.callbackPriority=0;if(!(a&3)||Ii(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(s!==null&&ar(s),wf(a)){case 2:case 8:a=bf;break;case 32:a=bs;break;case 268435456:a=_f;break;default:a=bs}return s=_y.bind(null,e),a=nr(a,s),e.callbackPriority=t,e.callbackNode=a,t}return s!==null&&s!==null&&ar(s),e.callbackPriority=2,e.callbackNode=null,2}function _y(e,t){var a=e.callbackNode;if(Mi()&&e.callbackNode!==a)return null;var s=Ae;return s=Ts(e,e===qe?s:0),s===0?null:(uy(e,s,t),by(e,on()),e.callbackNode!=null&&e.callbackNode===a?_y.bind(null,e):null)}function Sy(e,t){if(Mi())return null;uy(e,t,!0)}function sv(e){pv(function(){Ye&6?nr(vf,e):e()})}function Vc(){return Ka===0&&(Ka=Sf()),Ka}function Ty(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Rs(""+e)}function Ey(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function uv(e,t,a,s,r){if(t==="submit"&&a&&a.stateNode===r){var o=Ty((r[Rt]||null).action),h=s.submitter;h&&(t=(t=h[Rt]||null)?Ty(t.formAction):h.getAttribute("formAction"),t!==null&&(o=t,h=null));var g=new Ns("action","action",null,s,r);e.push({event:g,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Ka!==0){var v=h?Ey(r,h):new FormData(r);Fr(a,{pending:!0,data:v,method:r.method,action:o},null,v)}}else typeof o=="function"&&(g.preventDefault(),v=h?Ey(r,h):new FormData(r),Fr(a,{pending:!0,data:v,method:r.method,action:o},o,v))},currentTarget:r}]})}}for(var Lc=0;Lc<md.length;Lc++){var Kc=md[Lc],rv=Kc.toLowerCase(),cv=Kc[0].toUpperCase()+Kc.slice(1);en(rv,"on"+cv)}en(od,"onAnimationEnd"),en(fd,"onAnimationIteration"),en(dd,"onAnimationStart"),en("dblclick","onDoubleClick"),en("focusin","onFocus"),en("focusout","onBlur"),en(Og,"onTransitionRun"),en(Rg,"onTransitionStart"),en(xg,"onTransitionCancel"),en(hd,"onTransitionEnd"),ii("onMouseEnter",["mouseout","mouseover"]),ii("onMouseLeave",["mouseout","mouseover"]),ii("onPointerEnter",["pointerout","pointerover"]),ii("onPointerLeave",["pointerout","pointerover"]),Aa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Aa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Aa("onBeforeInput",["compositionend","keypress","textInput","paste"]),Aa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Aa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Aa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Bl="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),ov=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Bl));function Ay(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var s=e[a],r=s.event;s=s.listeners;e:{var o=void 0;if(t)for(var h=s.length-1;0<=h;h--){var g=s[h],v=g.instance,T=g.currentTarget;if(g=g.listener,v!==o&&r.isPropagationStopped())break e;o=g,r.currentTarget=T;try{o(r)}catch(x){Ps(x)}r.currentTarget=null,o=v}else for(h=0;h<s.length;h++){if(g=s[h],v=g.instance,T=g.currentTarget,g=g.listener,v!==o&&r.isPropagationStopped())break e;o=g,r.currentTarget=T;try{o(r)}catch(x){Ps(x)}r.currentTarget=null,o=v}}}}function Se(e,t){var a=t[lr];a===void 0&&(a=t[lr]=new Set);var s=e+"__bubble";a.has(s)||(wy(t,e,2,!1),a.add(s))}function Yc(e,t,a){var s=0;t&&(s|=4),wy(a,e,s,t)}var yu="_reactListening"+Math.random().toString(36).slice(2);function $c(e){if(!e[yu]){e[yu]=!0,xf.forEach(function(a){a!=="selectionchange"&&(ov.has(a)||Yc(a,!1,e),Yc(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[yu]||(t[yu]=!0,Yc("selectionchange",!1,t))}}function wy(e,t,a,s){switch(Qy(t)){case 2:var r=jv;break;case 8:r=Bv;break;default:r=io}a=r.bind(null,t,a,e),r=void 0,!hr||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),s?r!==void 0?e.addEventListener(t,a,{capture:!0,passive:r}):e.addEventListener(t,a,!0):r!==void 0?e.addEventListener(t,a,{passive:r}):e.addEventListener(t,a,!1)}function Gc(e,t,a,s,r){var o=s;if(!(t&1)&&!(t&2)&&s!==null)e:for(;;){if(s===null)return;var h=s.tag;if(h===3||h===4){var g=s.stateNode.containerInfo;if(g===r||g.nodeType===8&&g.parentNode===r)break;if(h===4)for(h=s.return;h!==null;){var v=h.tag;if((v===3||v===4)&&(v=h.stateNode.containerInfo,v===r||v.nodeType===8&&v.parentNode===r))return;h=h.return}for(;g!==null;){if(h=Ea(g),h===null)return;if(v=h.tag,v===5||v===6||v===26||v===27){s=o=h;continue e}g=g.parentNode}}s=s.return}Hf(function(){var T=o,x=fr(a),N=[];e:{var w=yd.get(e);if(w!==void 0){var R=Ns,F=e;switch(e){case"keypress":if(ks(a)===0)break e;case"keydown":case"keyup":R=ag;break;case"focusin":F="focus",R=gr;break;case"focusout":F="blur",R=gr;break;case"beforeblur":case"afterblur":R=gr;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":R=Kf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":R=$p;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":R=sg;break;case od:case fd:case dd:R=Qp;break;case hd:R=rg;break;case"scroll":case"scrollend":R=Kp;break;case"wheel":R=og;break;case"copy":case"cut":case"paste":R=Fp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":R=$f;break;case"toggle":case"beforetoggle":R=dg}var fe=(t&4)!==0,Je=!fe&&(e==="scroll"||e==="scrollend"),E=fe?w!==null?w+"Capture":null:w;fe=[];for(var S=T,A;S!==null;){var M=S;if(A=M.stateNode,M=M.tag,M!==5&&M!==26&&M!==27||A===null||E===null||(M=nl(S,E),M!=null&&fe.push(ql(S,M,A))),Je)break;S=S.return}0<fe.length&&(w=new R(w,F,null,a,x),N.push({event:w,listeners:fe}))}}if(!(t&7)){e:{if(w=e==="mouseover"||e==="pointerover",R=e==="mouseout"||e==="pointerout",w&&a!==or&&(F=a.relatedTarget||a.fromElement)&&(Ea(F)||F[ti]))break e;if((R||w)&&(w=x.window===x?x:(w=x.ownerDocument)?w.defaultView||w.parentWindow:window,R?(F=a.relatedTarget||a.toElement,R=T,F=F?Ea(F):null,F!==null&&(Je=ne(F),fe=F.tag,F!==Je||fe!==5&&fe!==27&&fe!==6)&&(F=null)):(R=null,F=T),R!==F)){if(fe=Kf,M="onMouseLeave",E="onMouseEnter",S="mouse",(e==="pointerout"||e==="pointerover")&&(fe=$f,M="onPointerLeave",E="onPointerEnter",S="pointer"),Je=R==null?w:tl(R),A=F==null?w:tl(F),w=new fe(M,S+"leave",R,a,x),w.target=Je,w.relatedTarget=A,M=null,Ea(x)===T&&(fe=new fe(E,S+"enter",F,a,x),fe.target=A,fe.relatedTarget=Je,M=fe),Je=M,R&&F)t:{for(fe=R,E=F,S=0,A=fe;A;A=Ci(A))S++;for(A=0,M=E;M;M=Ci(M))A++;for(;0<S-A;)fe=Ci(fe),S--;for(;0<A-S;)E=Ci(E),A--;for(;S--;){if(fe===E||E!==null&&fe===E.alternate)break t;fe=Ci(fe),E=Ci(E)}fe=null}else fe=null;R!==null&&Oy(N,w,R,fe,!1),F!==null&&Je!==null&&Oy(N,Je,F,fe,!0)}}e:{if(w=T?tl(T):window,R=w.nodeName&&w.nodeName.toLowerCase(),R==="select"||R==="input"&&w.type==="file")var X=Pf;else if(Wf(w))if(ed)X=Tg;else{X=_g;var ve=bg}else R=w.nodeName,!R||R.toLowerCase()!=="input"||w.type!=="checkbox"&&w.type!=="radio"?T&&cr(T.elementType)&&(X=Pf):X=Sg;if(X&&(X=X(e,T))){If(N,X,a,x);break e}ve&&ve(e,w,T),e==="focusout"&&T&&w.type==="number"&&T.memoizedProps.value!=null&&rr(w,"number",w.value)}switch(ve=T?tl(T):window,e){case"focusin":(Wf(ve)||ve.contentEditable==="true")&&(oi=ve,Er=T,ol=null);break;case"focusout":ol=Er=oi=null;break;case"mousedown":Ar=!0;break;case"contextmenu":case"mouseup":case"dragend":Ar=!1,rd(N,a,x);break;case"selectionchange":if(wg)break;case"keydown":case"keyup":rd(N,a,x)}var I;if(br)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 ci?Jf(e,a)&&(le="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(le="onCompositionStart");le&&(Gf&&a.locale!=="ko"&&(ci||le!=="onCompositionStart"?le==="onCompositionEnd"&&ci&&(I=Vf()):(Qn=x,yr="value"in Qn?Qn.value:Qn.textContent,ci=!0)),ve=mu(T,le),0<ve.length&&(le=new Yf(le,e,null,a,x),N.push({event:le,listeners:ve}),I?le.data=I:(I=Ff(a),I!==null&&(le.data=I)))),(I=yg?mg(e,a):pg(e,a))&&(le=mu(T,"onBeforeInput"),0<le.length&&(ve=new Yf("onBeforeInput","beforeinput",null,a,x),N.push({event:ve,listeners:le}),ve.data=I)),uv(N,e,T,a,x)}Ay(N,t)})}function ql(e,t,a){return{instance:e,listener:t,currentTarget:a}}function mu(e,t){for(var a=t+"Capture",s=[];e!==null;){var r=e,o=r.stateNode;r=r.tag,r!==5&&r!==26&&r!==27||o===null||(r=nl(e,a),r!=null&&s.unshift(ql(e,r,o)),r=nl(e,t),r!=null&&s.push(ql(e,r,o))),e=e.return}return s}function Ci(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Oy(e,t,a,s,r){for(var o=t._reactName,h=[];a!==null&&a!==s;){var g=a,v=g.alternate,T=g.stateNode;if(g=g.tag,v!==null&&v===s)break;g!==5&&g!==26&&g!==27||T===null||(v=T,r?(T=nl(a,o),T!=null&&h.unshift(ql(a,T,v))):r||(T=nl(a,o),T!=null&&h.push(ql(a,T,v)))),a=a.return}h.length!==0&&e.push({event:t,listeners:h})}var fv=/\r\n?/g,dv=/\u0000|\uFFFD/g;function Ry(e){return(typeof e=="string"?e:""+e).replace(fv,`
55
+ `).replace(dv,"")}function xy(e,t){return t=Ry(t),Ry(e)===t}function pu(){}function Ue(e,t,a,s,r,o){switch(a){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||si(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&si(e,""+s);break;case"className":As(e,"class",s);break;case"tabIndex":As(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":As(e,a,s);break;case"style":qf(e,s,o);break;case"data":if(t!=="object"){As(e,"data",s);break}case"src":case"href":if(s===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(a);break}s=Rs(""+s),e.setAttribute(a,s);break;case"action":case"formAction":if(typeof s=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof o=="function"&&(a==="formAction"?(t!=="input"&&Ue(e,t,"name",r.name,r,null),Ue(e,t,"formEncType",r.formEncType,r,null),Ue(e,t,"formMethod",r.formMethod,r,null),Ue(e,t,"formTarget",r.formTarget,r,null)):(Ue(e,t,"encType",r.encType,r,null),Ue(e,t,"method",r.method,r,null),Ue(e,t,"target",r.target,r,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(a);break}s=Rs(""+s),e.setAttribute(a,s);break;case"onClick":s!=null&&(e.onclick=pu);break;case"onScroll":s!=null&&Se("scroll",e);break;case"onScrollEnd":s!=null&&Se("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(u(61));if(a=s.__html,a!=null){if(r.children!=null)throw Error(u(60));e.innerHTML=a}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}a=Rs(""+s),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(a,""+s):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":s===!0?e.setAttribute(a,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(a,s):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(a,s):e.removeAttribute(a);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(a):e.setAttribute(a,s);break;case"popover":Se("beforetoggle",e),Se("toggle",e),Es(e,"popover",s);break;case"xlinkActuate":An(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":An(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":An(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":An(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":An(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":An(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":An(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":An(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":An(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Es(e,"is",s);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=Vp.get(a)||a,Es(e,a,s))}}function Xc(e,t,a,s,r,o){switch(a){case"style":qf(e,s,o);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(u(61));if(a=s.__html,a!=null){if(r.children!=null)throw Error(u(60));e.innerHTML=a}}break;case"children":typeof s=="string"?si(e,s):(typeof s=="number"||typeof s=="bigint")&&si(e,""+s);break;case"onScroll":s!=null&&Se("scroll",e);break;case"onScrollEnd":s!=null&&Se("scrollend",e);break;case"onClick":s!=null&&(e.onclick=pu);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!kf.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(r=a.endsWith("Capture"),t=a.slice(2,r?a.length-7:void 0),o=e[Rt]||null,o=o!=null?o[a]:null,typeof o=="function"&&e.removeEventListener(t,o,r),typeof s=="function")){typeof o!="function"&&o!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,s,r);break e}a in e?e[a]=s:s===!0?e.setAttribute(a,""):Es(e,a,s)}}}function yt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Se("error",e),Se("load",e);var s=!1,r=!1,o;for(o in a)if(a.hasOwnProperty(o)){var h=a[o];if(h!=null)switch(o){case"src":s=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:Ue(e,t,o,h,a,null)}}r&&Ue(e,t,"srcSet",a.srcSet,a,null),s&&Ue(e,t,"src",a.src,a,null);return;case"input":Se("invalid",e);var g=o=h=r=null,v=null,T=null;for(s in a)if(a.hasOwnProperty(s)){var x=a[s];if(x!=null)switch(s){case"name":r=x;break;case"type":h=x;break;case"checked":v=x;break;case"defaultChecked":T=x;break;case"value":o=x;break;case"defaultValue":g=x;break;case"children":case"dangerouslySetInnerHTML":if(x!=null)throw Error(u(137,t));break;default:Ue(e,t,s,x,a,null)}}zf(e,o,g,v,T,h,r,!1),ws(e);return;case"select":Se("invalid",e),s=h=o=null;for(r in a)if(a.hasOwnProperty(r)&&(g=a[r],g!=null))switch(r){case"value":o=g;break;case"defaultValue":h=g;break;case"multiple":s=g;default:Ue(e,t,r,g,a,null)}t=o,a=h,e.multiple=!!s,t!=null?li(e,!!s,t,!1):a!=null&&li(e,!!s,a,!0);return;case"textarea":Se("invalid",e),o=r=s=null;for(h in a)if(a.hasOwnProperty(h)&&(g=a[h],g!=null))switch(h){case"value":s=g;break;case"defaultValue":r=g;break;case"children":o=g;break;case"dangerouslySetInnerHTML":if(g!=null)throw Error(u(91));break;default:Ue(e,t,h,g,a,null)}jf(e,s,r,o),ws(e);return;case"option":for(v in a)if(a.hasOwnProperty(v)&&(s=a[v],s!=null))switch(v){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:Ue(e,t,v,s,a,null)}return;case"dialog":Se("cancel",e),Se("close",e);break;case"iframe":case"object":Se("load",e);break;case"video":case"audio":for(s=0;s<Bl.length;s++)Se(Bl[s],e);break;case"image":Se("error",e),Se("load",e);break;case"details":Se("toggle",e);break;case"embed":case"source":case"link":Se("error",e),Se("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(T in a)if(a.hasOwnProperty(T)&&(s=a[T],s!=null))switch(T){case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:Ue(e,t,T,s,a,null)}return;default:if(cr(t)){for(x in a)a.hasOwnProperty(x)&&(s=a[x],s!==void 0&&Xc(e,t,x,s,a,void 0));return}}for(g in a)a.hasOwnProperty(g)&&(s=a[g],s!=null&&Ue(e,t,g,s,a,null))}function hv(e,t,a,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,o=null,h=null,g=null,v=null,T=null,x=null;for(R in a){var N=a[R];if(a.hasOwnProperty(R)&&N!=null)switch(R){case"checked":break;case"value":break;case"defaultValue":v=N;default:s.hasOwnProperty(R)||Ue(e,t,R,null,s,N)}}for(var w in s){var R=s[w];if(N=a[w],s.hasOwnProperty(w)&&(R!=null||N!=null))switch(w){case"type":o=R;break;case"name":r=R;break;case"checked":T=R;break;case"defaultChecked":x=R;break;case"value":h=R;break;case"defaultValue":g=R;break;case"children":case"dangerouslySetInnerHTML":if(R!=null)throw Error(u(137,t));break;default:R!==N&&Ue(e,t,w,R,s,N)}}ur(e,h,g,v,T,x,o,r);return;case"select":R=h=g=w=null;for(o in a)if(v=a[o],a.hasOwnProperty(o)&&v!=null)switch(o){case"value":break;case"multiple":R=v;default:s.hasOwnProperty(o)||Ue(e,t,o,null,s,v)}for(r in s)if(o=s[r],v=a[r],s.hasOwnProperty(r)&&(o!=null||v!=null))switch(r){case"value":w=o;break;case"defaultValue":g=o;break;case"multiple":h=o;default:o!==v&&Ue(e,t,r,o,s,v)}t=g,a=h,s=R,w!=null?li(e,!!a,w,!1):!!s!=!!a&&(t!=null?li(e,!!a,t,!0):li(e,!!a,a?[]:"",!1));return;case"textarea":R=w=null;for(g in a)if(r=a[g],a.hasOwnProperty(g)&&r!=null&&!s.hasOwnProperty(g))switch(g){case"value":break;case"children":break;default:Ue(e,t,g,null,s,r)}for(h in s)if(r=s[h],o=a[h],s.hasOwnProperty(h)&&(r!=null||o!=null))switch(h){case"value":w=r;break;case"defaultValue":R=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(u(91));break;default:r!==o&&Ue(e,t,h,r,s,o)}Uf(e,w,R);return;case"option":for(var F in a)if(w=a[F],a.hasOwnProperty(F)&&w!=null&&!s.hasOwnProperty(F))switch(F){case"selected":e.selected=!1;break;default:Ue(e,t,F,null,s,w)}for(v in s)if(w=s[v],R=a[v],s.hasOwnProperty(v)&&w!==R&&(w!=null||R!=null))switch(v){case"selected":e.selected=w&&typeof w!="function"&&typeof w!="symbol";break;default:Ue(e,t,v,w,s,R)}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 fe in a)w=a[fe],a.hasOwnProperty(fe)&&w!=null&&!s.hasOwnProperty(fe)&&Ue(e,t,fe,null,s,w);for(T in s)if(w=s[T],R=a[T],s.hasOwnProperty(T)&&w!==R&&(w!=null||R!=null))switch(T){case"children":case"dangerouslySetInnerHTML":if(w!=null)throw Error(u(137,t));break;default:Ue(e,t,T,w,s,R)}return;default:if(cr(t)){for(var Je in a)w=a[Je],a.hasOwnProperty(Je)&&w!==void 0&&!s.hasOwnProperty(Je)&&Xc(e,t,Je,void 0,s,w);for(x in s)w=s[x],R=a[x],!s.hasOwnProperty(x)||w===R||w===void 0&&R===void 0||Xc(e,t,x,w,s,R);return}}for(var E in a)w=a[E],a.hasOwnProperty(E)&&w!=null&&!s.hasOwnProperty(E)&&Ue(e,t,E,null,s,w);for(N in s)w=s[N],R=a[N],!s.hasOwnProperty(N)||w===R||w==null&&R==null||Ue(e,t,N,w,s,R)}var Qc=null,Jc=null;function gu(e){return e.nodeType===9?e:e.ownerDocument}function ky(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 My(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 Fc(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 Wc=null;function yv(){var e=window.event;return e&&e.type==="popstate"?e===Wc?!1:(Wc=e,!0):(Wc=null,!1)}var Ny=typeof setTimeout=="function"?setTimeout:void 0,mv=typeof clearTimeout=="function"?clearTimeout:void 0,Cy=typeof Promise=="function"?Promise:void 0,pv=typeof queueMicrotask=="function"?queueMicrotask:typeof Cy<"u"?function(e){return Cy.resolve(null).then(e).catch(gv)}:Ny;function gv(e){setTimeout(function(){throw e})}function Ic(e,t){var a=t,s=0;do{var r=a.nextSibling;if(e.removeChild(a),r&&r.nodeType===8)if(a=r.data,a==="/$"){if(s===0){e.removeChild(r),Gl(t);return}s--}else a!=="$"&&a!=="$?"&&a!=="$!"||s++;a=r}while(a);Gl(t)}function Pc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Pc(a),sr(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function vv(e,t,a,s){for(;e.nodeType===1;){var r=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[el])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(o=e.getAttribute("rel"),o==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(o!==r.rel||e.getAttribute("href")!==(r.href==null?null:r.href)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||e.getAttribute("title")!==(r.title==null?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(o=e.getAttribute("src"),(o!==(r.src==null?null:r.src)||e.getAttribute("type")!==(r.type==null?null:r.type)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&o&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var o=r.name==null?null:""+r.name;if(r.type==="hidden"&&e.getAttribute("name")===o)return e}else return e;if(e=an(e.nextSibling),e===null)break}return null}function bv(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=an(e.nextSibling),e===null))return null;return e}function an(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}function Dy(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"){if(t===0)return e;t--}else a==="/$"&&t++}e=e.previousSibling}return null}function zy(e,t,a){switch(t=gu(a),e){case"html":if(e=t.documentElement,!e)throw Error(u(452));return e;case"head":if(e=t.head,!e)throw Error(u(453));return e;case"body":if(e=t.body,!e)throw Error(u(454));return e;default:throw Error(u(451))}}var Wt=new Map,Uy=new Set;function vu(e){return typeof e.getRootNode=="function"?e.getRootNode():e.ownerDocument}var Zn=$.d;$.d={f:_v,r:Sv,D:Tv,C:Ev,L:Av,m:wv,X:Rv,S:Ov,M:xv};function _v(){var e=Zn.f(),t=ou();return e||t}function Sv(e){var t=ni(e);t!==null&&t.tag===5&&t.type==="form"?rh(t):Zn.r(e)}var Di=typeof document>"u"?null:document;function jy(e,t,a){var s=Di;if(s&&typeof t=="string"&&t){var r=Vt(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof a=="string"&&(r+='[crossorigin="'+a+'"]'),Uy.has(r)||(Uy.add(r),e={rel:e,crossOrigin:a,href:t},s.querySelector(r)===null&&(t=s.createElement("link"),yt(t,"link",e),ut(t),s.head.appendChild(t)))}}function Tv(e){Zn.D(e),jy("dns-prefetch",e,null)}function Ev(e,t){Zn.C(e,t),jy("preconnect",e,t)}function Av(e,t,a){Zn.L(e,t,a);var s=Di;if(s&&e&&t){var r='link[rel="preload"][as="'+Vt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(r+='[imagesrcset="'+Vt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(r+='[imagesizes="'+Vt(a.imageSizes)+'"]')):r+='[href="'+Vt(e)+'"]';var o=r;switch(t){case"style":o=zi(e);break;case"script":o=Ui(e)}Wt.has(o)||(e=H({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Wt.set(o,e),s.querySelector(r)!==null||t==="style"&&s.querySelector(Zl(o))||t==="script"&&s.querySelector(Hl(o))||(t=s.createElement("link"),yt(t,"link",e),ut(t),s.head.appendChild(t)))}}function wv(e,t){Zn.m(e,t);var a=Di;if(a&&e){var s=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+Vt(s)+'"][href="'+Vt(e)+'"]',o=r;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":o=Ui(e)}if(!Wt.has(o)&&(e=H({rel:"modulepreload",href:e},t),Wt.set(o,e),a.querySelector(r)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Hl(o)))return}s=a.createElement("link"),yt(s,"link",e),ut(s),a.head.appendChild(s)}}}function Ov(e,t,a){Zn.S(e,t,a);var s=Di;if(s&&e){var r=ai(s).hoistableStyles,o=zi(e);t=t||"default";var h=r.get(o);if(!h){var g={loading:0,preload:null};if(h=s.querySelector(Zl(o)))g.loading=5;else{e=H({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Wt.get(o))&&eo(e,a);var v=h=s.createElement("link");ut(v),yt(v,"link",e),v._p=new Promise(function(T,x){v.onload=T,v.onerror=x}),v.addEventListener("load",function(){g.loading|=1}),v.addEventListener("error",function(){g.loading|=2}),g.loading|=4,bu(h,t,s)}h={type:"stylesheet",instance:h,count:1,state:g},r.set(o,h)}}}function Rv(e,t){Zn.X(e,t);var a=Di;if(a&&e){var s=ai(a).hoistableScripts,r=Ui(e),o=s.get(r);o||(o=a.querySelector(Hl(r)),o||(e=H({src:e,async:!0},t),(t=Wt.get(r))&&to(e,t),o=a.createElement("script"),ut(o),yt(o,"link",e),a.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},s.set(r,o))}}function xv(e,t){Zn.M(e,t);var a=Di;if(a&&e){var s=ai(a).hoistableScripts,r=Ui(e),o=s.get(r);o||(o=a.querySelector(Hl(r)),o||(e=H({src:e,async:!0,type:"module"},t),(t=Wt.get(r))&&to(e,t),o=a.createElement("script"),ut(o),yt(o,"link",e),a.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},s.set(r,o))}}function By(e,t,a,s){var r=(r=$n.current)?vu(r):null;if(!r)throw Error(u(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=zi(a.href),a=ai(r).hoistableStyles,s=a.get(t),s||(s={type:"style",instance:null,count:0,state:null},a.set(t,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=zi(a.href);var o=ai(r).hoistableStyles,h=o.get(e);if(h||(r=r.ownerDocument||r,h={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},o.set(e,h),(o=r.querySelector(Zl(e)))&&!o._p&&(h.instance=o,h.state.loading=5),Wt.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Wt.set(e,a),o||kv(r,e,a,h.state))),t&&s===null)throw Error(u(528,""));return h}if(t&&s!==null)throw Error(u(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ui(a),a=ai(r).hoistableScripts,s=a.get(t),s||(s={type:"script",instance:null,count:0,state:null},a.set(t,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(u(444,e))}}function zi(e){return'href="'+Vt(e)+'"'}function Zl(e){return'link[rel="stylesheet"]['+e+"]"}function qy(e){return H({},e,{"data-precedence":e.precedence,precedence:null})}function kv(e,t,a,s){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?s.loading=1:(t=e.createElement("link"),s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2}),yt(t,"link",a),ut(t),e.head.appendChild(t))}function Ui(e){return'[src="'+Vt(e)+'"]'}function Hl(e){return"script[async]"+e}function Zy(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+Vt(a.href)+'"]');if(s)return t.instance=s,ut(s),s;var r=H({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),ut(s),yt(s,"style",r),bu(s,a.precedence,e),t.instance=s;case"stylesheet":r=zi(a.href);var o=e.querySelector(Zl(r));if(o)return t.state.loading|=4,t.instance=o,ut(o),o;s=qy(a),(r=Wt.get(r))&&eo(s,r),o=(e.ownerDocument||e).createElement("link"),ut(o);var h=o;return h._p=new Promise(function(g,v){h.onload=g,h.onerror=v}),yt(o,"link",s),t.state.loading|=4,bu(o,a.precedence,e),t.instance=o;case"script":return o=Ui(a.src),(r=e.querySelector(Hl(o)))?(t.instance=r,ut(r),r):(s=a,(r=Wt.get(o))&&(s=H({},a),to(s,r)),e=e.ownerDocument||e,r=e.createElement("script"),ut(r),yt(r,"link",s),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(u(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(s=t.instance,t.state.loading|=4,bu(s,a.precedence,e));return t.instance}function bu(e,t,a){for(var s=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=s.length?s[s.length-1]:null,o=r,h=0;h<s.length;h++){var g=s[h];if(g.dataset.precedence===t)o=g;else if(o!==r)break}o?o.parentNode.insertBefore(e,o.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function eo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function to(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var _u=null;function Hy(e,t,a){if(_u===null){var s=new Map,r=_u=new Map;r.set(a,s)}else r=_u,s=r.get(a),s||(s=new Map,r.set(a,s));if(s.has(e))return s;for(s.set(e,null),a=a.getElementsByTagName(e),r=0;r<a.length;r++){var o=a[r];if(!(o[el]||o[pt]||e==="link"&&o.getAttribute("rel")==="stylesheet")&&o.namespaceURI!=="http://www.w3.org/2000/svg"){var h=o.getAttribute(t)||"";h=e+h;var g=s.get(h);g?g.push(o):s.set(h,[o])}}return s}function Vy(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function Mv(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;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 Ly(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}var Vl=null;function Nv(){}function Cv(e,t,a){if(Vl===null)throw Error(u(475));var s=Vl;if(t.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&!(t.state.loading&4)){if(t.instance===null){var r=zi(a.href),o=e.querySelector(Zl(r));if(o){e=o._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(s.count++,s=Su.bind(s),e.then(s,s)),t.state.loading|=4,t.instance=o,ut(o);return}o=e.ownerDocument||e,a=qy(a),(r=Wt.get(r))&&eo(a,r),o=o.createElement("link"),ut(o);var h=o;h._p=new Promise(function(g,v){h.onload=g,h.onerror=v}),yt(o,"link",a),t.instance=o}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(t,e),(e=t.state.preload)&&!(t.state.loading&3)&&(s.count++,t=Su.bind(s),e.addEventListener("load",t),e.addEventListener("error",t))}}function Dv(){if(Vl===null)throw Error(u(475));var e=Vl;return e.stylesheets&&e.count===0&&no(e,e.stylesheets),0<e.count?function(t){var a=setTimeout(function(){if(e.stylesheets&&no(e,e.stylesheets),e.unsuspend){var s=e.unsuspend;e.unsuspend=null,s()}},6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(a)}}:null}function Su(){if(this.count--,this.count===0){if(this.stylesheets)no(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Tu=null;function no(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Tu=new Map,t.forEach(zv,e),Tu=null,Su.call(e))}function zv(e,t){if(!(t.state.loading&4)){var a=Tu.get(e);if(a)var s=a.get(null);else{a=new Map,Tu.set(e,a);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;o<r.length;o++){var h=r[o];(h.nodeName==="LINK"||h.getAttribute("media")!=="not all")&&(a.set(h.dataset.precedence,h),s=h)}s&&a.set(null,s)}r=t.instance,h=r.getAttribute("data-precedence"),o=a.get(h)||s,o===s&&a.set(null,r),a.set(h,r),this.count++,s=Su.bind(this),r.addEventListener("load",s),r.addEventListener("error",s),o?o.parentNode.insertBefore(r,o.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=4}}var Ll={$$typeof:C,Provider:null,Consumer:null,_currentValue:Ee,_currentValue2:Ee,_threadCount:0};function Uv(e,t,a,s,r,o,h,g){this.tag=1,this.containerInfo=e,this.finishedWork=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=ir(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.finishedLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ir(0),this.hiddenUpdates=ir(null),this.identifierPrefix=s,this.onUncaughtError=r,this.onCaughtError=o,this.onRecoverableError=h,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=g,this.incompleteTransitions=new Map}function Ky(e,t,a,s,r,o,h,g,v,T,x,N){return e=new Uv(e,t,a,h,g,v,T,N),t=1,o===!0&&(t|=24),o=Jt(3,null,null,t),e.current=o,o.stateNode=e,t=zr(),t.refCount++,e.pooledCache=t,t.refCount++,o.memoizedState={element:s,isDehydrated:a,cache:t},yc(o),e}function Yy(e){return e?(e=hi,e):hi}function $y(e,t,a,s,r,o){r=Yy(r),s.context===null?s.context=r:s.pendingContext=r,s=na(t),s.payload={element:a},o=o===void 0?null:o,o!==null&&(s.callback=o),a=aa(e,s,t),a!==null&&(Tt(a,e,t),wl(a,e,t))}function Gy(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function ao(e,t){Gy(e,t),(e=e.alternate)&&Gy(e,t)}function Xy(e){if(e.tag===13){var t=Jn(e,67108864);t!==null&&Tt(t,e,67108864),ao(e,67108864)}}var Eu=!0;function jv(e,t,a,s){var r=j.T;j.T=null;var o=$.p;try{$.p=2,io(e,t,a,s)}finally{$.p=o,j.T=r}}function Bv(e,t,a,s){var r=j.T;j.T=null;var o=$.p;try{$.p=8,io(e,t,a,s)}finally{$.p=o,j.T=r}}function io(e,t,a,s){if(Eu){var r=lo(s);if(r===null)Gc(e,t,s,Au,a),Jy(e,s);else if(Zv(r,e,t,a,s))s.stopPropagation();else if(Jy(e,s),t&4&&-1<qv.indexOf(e)){for(;r!==null;){var o=ni(r);if(o!==null)switch(o.tag){case 3:if(o=o.stateNode,o.current.memoizedState.isDehydrated){var h=Ta(o.pendingLanes);if(h!==0){var g=o;for(g.pendingLanes|=2,g.entangledLanes|=2;h;){var v=1<<31-Nt(h);g.entanglements[1]|=v,h&=~v}mn(o),!(Ye&6)&&(uu=on()+500,jl(0))}}break;case 13:g=Jn(o,2),g!==null&&Tt(g,o,2),ou(),ao(o,2)}if(o=lo(s),o===null&&Gc(e,t,s,Au,a),o===r)break;r=o}r!==null&&s.stopPropagation()}else Gc(e,t,s,null,a)}}function lo(e){return e=fr(e),so(e)}var Au=null;function so(e){if(Au=null,e=Ea(e),e!==null){var t=ne(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=Re(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Au=e,null}function Qy(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(Ep()){case vf:return 2;case bf:return 8;case bs:case Ap:return 32;case _f:return 268435456;default:return 32}default:return 32}}var uo=!1,oa=null,fa=null,da=null,Kl=new Map,Yl=new Map,ha=[],qv="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 Jy(e,t){switch(e){case"focusin":case"focusout":oa=null;break;case"dragenter":case"dragleave":fa=null;break;case"mouseover":case"mouseout":da=null;break;case"pointerover":case"pointerout":Kl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Yl.delete(t.pointerId)}}function $l(e,t,a,s,r,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:a,eventSystemFlags:s,nativeEvent:o,targetContainers:[r]},t!==null&&(t=ni(t),t!==null&&Xy(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function Zv(e,t,a,s,r){switch(t){case"focusin":return oa=$l(oa,e,t,a,s,r),!0;case"dragenter":return fa=$l(fa,e,t,a,s,r),!0;case"mouseover":return da=$l(da,e,t,a,s,r),!0;case"pointerover":var o=r.pointerId;return Kl.set(o,$l(Kl.get(o)||null,e,t,a,s,r)),!0;case"gotpointercapture":return o=r.pointerId,Yl.set(o,$l(Yl.get(o)||null,e,t,a,s,r)),!0}return!1}function Fy(e){var t=Ea(e.target);if(t!==null){var a=ne(t);if(a!==null){if(t=a.tag,t===13){if(t=Re(a),t!==null){e.blockedOn=t,Dp(e.priority,function(){if(a.tag===13){var s=jt(),r=Jn(a,s);r!==null&&Tt(r,a,s),ao(a,s)}});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function wu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=lo(e.nativeEvent);if(a===null){a=e.nativeEvent;var s=new a.constructor(a.type,a);or=s,a.target.dispatchEvent(s),or=null}else return t=ni(a),t!==null&&Xy(t),e.blockedOn=a,!1;t.shift()}return!0}function Wy(e,t,a){wu(e)&&a.delete(t)}function Hv(){uo=!1,oa!==null&&wu(oa)&&(oa=null),fa!==null&&wu(fa)&&(fa=null),da!==null&&wu(da)&&(da=null),Kl.forEach(Wy),Yl.forEach(Wy)}function Ou(e,t){e.blockedOn===t&&(e.blockedOn=null,uo||(uo=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,Hv)))}var Ru=null;function Iy(e){Ru!==e&&(Ru=e,l.unstable_scheduleCallback(l.unstable_NormalPriority,function(){Ru===e&&(Ru=null);for(var t=0;t<e.length;t+=3){var a=e[t],s=e[t+1],r=e[t+2];if(typeof s!="function"){if(so(s||a)===null)continue;break}var o=ni(a);o!==null&&(e.splice(t,3),t-=3,Fr(o,{pending:!0,data:r,method:a.method,action:s},s,r))}}))}function Gl(e){function t(v){return Ou(v,e)}oa!==null&&Ou(oa,e),fa!==null&&Ou(fa,e),da!==null&&Ou(da,e),Kl.forEach(t),Yl.forEach(t);for(var a=0;a<ha.length;a++){var s=ha[a];s.blockedOn===e&&(s.blockedOn=null)}for(;0<ha.length&&(a=ha[0],a.blockedOn===null);)Fy(a),a.blockedOn===null&&ha.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(s=0;s<a.length;s+=3){var r=a[s],o=a[s+1],h=r[Rt]||null;if(typeof o=="function")h||Iy(a);else if(h){var g=null;if(o&&o.hasAttribute("formAction")){if(r=o,h=o[Rt]||null)g=h.formAction;else if(so(r)!==null)continue}else g=h.action;typeof g=="function"?a[s+1]=g:(a.splice(s,3),s-=3),Iy(a)}}}function ro(e){this._internalRoot=e}xu.prototype.render=ro.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(u(409));var a=t.current,s=jt();$y(a,s,e,t,null,null)},xu.prototype.unmount=ro.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;e.tag===0&&Mi(),$y(e.current,2,null,e,null,null),ou(),t[ti]=null}};function xu(e){this._internalRoot=e}xu.prototype.unstable_scheduleHydration=function(e){if(e){var t=Of();e={blockedOn:null,target:e,priority:t};for(var a=0;a<ha.length&&t!==0&&t<ha[a].priority;a++);ha.splice(a,0,e),a===0&&Fy(e)}};var Py=n.version;if(Py!=="19.0.0")throw Error(u(527,Py,"19.0.0"));$.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(u(188)):(e=Object.keys(e).join(","),Error(u(268,e)));return e=D(t),e=e!==null?ue(e):null,e=e===null?null:e.stateNode,e};var Vv={bundleType:0,version:"19.0.0",rendererPackageName:"react-dom",currentDispatcherRef:j,findFiberByHostInstance:Ea,reconcilerVersion:"19.0.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ku=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ku.isDisabled&&ku.supportsFiber)try{Wi=ku.inject(Vv),Mt=ku}catch{}}return Ql.createRoot=function(e,t){if(!c(e))throw Error(u(299));var a=!1,s="",r=ph,o=gh,h=vh,g=null;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(r=t.onUncaughtError),t.onCaughtError!==void 0&&(o=t.onCaughtError),t.onRecoverableError!==void 0&&(h=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(g=t.unstable_transitionCallbacks)),t=Ky(e,1,!1,null,null,a,s,r,o,h,g,null),e[ti]=t.current,$c(e.nodeType===8?e.parentNode:e),new ro(t)},Ql.hydrateRoot=function(e,t,a){if(!c(e))throw Error(u(299));var s=!1,r="",o=ph,h=gh,g=vh,v=null,T=null;return a!=null&&(a.unstable_strictMode===!0&&(s=!0),a.identifierPrefix!==void 0&&(r=a.identifierPrefix),a.onUncaughtError!==void 0&&(o=a.onUncaughtError),a.onCaughtError!==void 0&&(h=a.onCaughtError),a.onRecoverableError!==void 0&&(g=a.onRecoverableError),a.unstable_transitionCallbacks!==void 0&&(v=a.unstable_transitionCallbacks),a.formState!==void 0&&(T=a.formState)),t=Ky(e,1,!0,t,a??null,s,r,o,h,g,v,T),t.context=Yy(null),a=t.current,s=jt(),r=na(s),r.callback=null,aa(a,r,s),t.current.lanes=s,Pi(t,s),mn(t),e[ti]=t.current,$c(e),new xu(t)},Ql.version="19.0.0",Ql}var hm;function c0(){if(hm)return yo.exports;hm=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(n){console.error(n)}}return l(),yo.exports=r0(),yo.exports}var o0=c0(),we;(function(l){l.assertEqual=c=>c;function n(c){}l.assertIs=n;function i(c){throw new Error}l.assertNever=i,l.arrayToEnum=c=>{const f={};for(const d of c)f[d]=d;return f},l.getValidEnumValues=c=>{const f=l.objectKeys(c).filter(m=>typeof c[c[m]]!="number"),d={};for(const m of f)d[m]=c[m];return l.objectValues(d)},l.objectValues=c=>l.objectKeys(c).map(function(f){return c[f]}),l.objectKeys=typeof Object.keys=="function"?c=>Object.keys(c):c=>{const f=[];for(const d in c)Object.prototype.hasOwnProperty.call(c,d)&&f.push(d);return f},l.find=(c,f)=>{for(const d of c)if(f(d))return d},l.isInteger=typeof Number.isInteger=="function"?c=>Number.isInteger(c):c=>typeof c=="number"&&isFinite(c)&&Math.floor(c)===c;function u(c,f=" | "){return c.map(d=>typeof d=="string"?`'${d}'`:d).join(f)}l.joinValues=u,l.jsonStringifyReplacer=(c,f)=>typeof f=="bigint"?f.toString():f})(we||(we={}));var No;(function(l){l.mergeShapes=(n,i)=>({...n,...i})})(No||(No={}));const K=we.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Vn=l=>{switch(typeof l){case"undefined":return K.undefined;case"string":return K.string;case"number":return isNaN(l)?K.nan:K.number;case"boolean":return K.boolean;case"function":return K.function;case"bigint":return K.bigint;case"symbol":return K.symbol;case"object":return Array.isArray(l)?K.array:l===null?K.null:l.then&&typeof l.then=="function"&&l.catch&&typeof l.catch=="function"?K.promise:typeof Map<"u"&&l instanceof Map?K.map:typeof Set<"u"&&l instanceof Set?K.set:typeof Date<"u"&&l instanceof Date?K.date:K.object;default:return K.unknown}},z=we.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),f0=l=>JSON.stringify(l,null,2).replace(/"([^"]+)":/g,"$1:");class qt extends Error{get errors(){return this.issues}constructor(n){super(),this.issues=[],this.addIssue=u=>{this.issues=[...this.issues,u]},this.addIssues=(u=[])=>{this.issues=[...this.issues,...u]};const i=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,i):this.__proto__=i,this.name="ZodError",this.issues=n}format(n){const i=n||function(f){return f.message},u={_errors:[]},c=f=>{for(const d of f.issues)if(d.code==="invalid_union")d.unionErrors.map(c);else if(d.code==="invalid_return_type")c(d.returnTypeError);else if(d.code==="invalid_arguments")c(d.argumentsError);else if(d.path.length===0)u._errors.push(i(d));else{let m=u,p=0;for(;p<d.path.length;){const y=d.path[p];p===d.path.length-1?(m[y]=m[y]||{_errors:[]},m[y]._errors.push(i(d))):m[y]=m[y]||{_errors:[]},m=m[y],p++}}};return c(this),u}static assert(n){if(!(n instanceof qt))throw new Error(`Not a ZodError: ${n}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,we.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(n=i=>i.message){const i={},u=[];for(const c of this.issues)c.path.length>0?(i[c.path[0]]=i[c.path[0]]||[],i[c.path[0]].push(n(c))):u.push(n(c));return{formErrors:u,fieldErrors:i}}get formErrors(){return this.flatten()}}qt.create=l=>new qt(l);const Yi=(l,n)=>{let i;switch(l.code){case z.invalid_type:l.received===K.undefined?i="Required":i=`Expected ${l.expected}, received ${l.received}`;break;case z.invalid_literal:i=`Invalid literal value, expected ${JSON.stringify(l.expected,we.jsonStringifyReplacer)}`;break;case z.unrecognized_keys:i=`Unrecognized key(s) in object: ${we.joinValues(l.keys,", ")}`;break;case z.invalid_union:i="Invalid input";break;case z.invalid_union_discriminator:i=`Invalid discriminator value. Expected ${we.joinValues(l.options)}`;break;case z.invalid_enum_value:i=`Invalid enum value. Expected ${we.joinValues(l.options)}, received '${l.received}'`;break;case z.invalid_arguments:i="Invalid function arguments";break;case z.invalid_return_type:i="Invalid function return type";break;case z.invalid_date:i="Invalid date";break;case z.invalid_string:typeof l.validation=="object"?"includes"in l.validation?(i=`Invalid input: must include "${l.validation.includes}"`,typeof l.validation.position=="number"&&(i=`${i} at one or more positions greater than or equal to ${l.validation.position}`)):"startsWith"in l.validation?i=`Invalid input: must start with "${l.validation.startsWith}"`:"endsWith"in l.validation?i=`Invalid input: must end with "${l.validation.endsWith}"`:we.assertNever(l.validation):l.validation!=="regex"?i=`Invalid ${l.validation}`:i="Invalid";break;case z.too_small:l.type==="array"?i=`Array must contain ${l.exact?"exactly":l.inclusive?"at least":"more than"} ${l.minimum} element(s)`:l.type==="string"?i=`String must contain ${l.exact?"exactly":l.inclusive?"at least":"over"} ${l.minimum} character(s)`:l.type==="number"?i=`Number must be ${l.exact?"exactly equal to ":l.inclusive?"greater than or equal to ":"greater than "}${l.minimum}`:l.type==="date"?i=`Date must be ${l.exact?"exactly equal to ":l.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(l.minimum))}`:i="Invalid input";break;case z.too_big:l.type==="array"?i=`Array must contain ${l.exact?"exactly":l.inclusive?"at most":"less than"} ${l.maximum} element(s)`:l.type==="string"?i=`String must contain ${l.exact?"exactly":l.inclusive?"at most":"under"} ${l.maximum} character(s)`:l.type==="number"?i=`Number must be ${l.exact?"exactly":l.inclusive?"less than or equal to":"less than"} ${l.maximum}`:l.type==="bigint"?i=`BigInt must be ${l.exact?"exactly":l.inclusive?"less than or equal to":"less than"} ${l.maximum}`:l.type==="date"?i=`Date must be ${l.exact?"exactly":l.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(l.maximum))}`:i="Invalid input";break;case z.custom:i="Invalid input";break;case z.invalid_intersection_types:i="Intersection results could not be merged";break;case z.not_multiple_of:i=`Number must be a multiple of ${l.multipleOf}`;break;case z.not_finite:i="Number must be finite";break;default:i=n.defaultError,we.assertNever(l)}return{message:i}};let Vm=Yi;function d0(l){Vm=l}function Hu(){return Vm}const Vu=l=>{const{data:n,path:i,errorMaps:u,issueData:c}=l,f=[...i,...c.path||[]],d={...c,path:f};if(c.message!==void 0)return{...c,path:f,message:c.message};let m="";const p=u.filter(y=>!!y).slice().reverse();for(const y of p)m=y(d,{data:n,defaultError:m}).message;return{...c,path:f,message:m}},h0=[];function V(l,n){const i=Hu(),u=Vu({issueData:n,data:l.data,path:l.path,errorMaps:[l.common.contextualErrorMap,l.schemaErrorMap,i,i===Yi?void 0:Yi].filter(c=>!!c)});l.common.issues.push(u)}class bt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(n,i){const u=[];for(const c of i){if(c.status==="aborted")return oe;c.status==="dirty"&&n.dirty(),u.push(c.value)}return{status:n.value,value:u}}static async mergeObjectAsync(n,i){const u=[];for(const c of i){const f=await c.key,d=await c.value;u.push({key:f,value:d})}return bt.mergeObjectSync(n,u)}static mergeObjectSync(n,i){const u={};for(const c of i){const{key:f,value:d}=c;if(f.status==="aborted"||d.status==="aborted")return oe;f.status==="dirty"&&n.dirty(),d.status==="dirty"&&n.dirty(),f.value!=="__proto__"&&(typeof d.value<"u"||c.alwaysSet)&&(u[f.value]=d.value)}return{status:n.value,value:u}}}const oe=Object.freeze({status:"aborted"}),Zi=l=>({status:"dirty",value:l}),Ot=l=>({status:"valid",value:l}),Co=l=>l.status==="aborted",Do=l=>l.status==="dirty",Fa=l=>l.status==="valid",ts=l=>typeof Promise<"u"&&l instanceof Promise;function Lu(l,n,i,u){if(typeof n=="function"?l!==n||!0:!n.has(l))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n.get(l)}function Lm(l,n,i,u,c){if(typeof n=="function"?l!==n||!0:!n.has(l))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n.set(l,i),i}var J;(function(l){l.errToObj=n=>typeof n=="string"?{message:n}:n||{},l.toString=n=>typeof n=="string"?n:n==null?void 0:n.message})(J||(J={}));var Fl,Wl;class _n{constructor(n,i,u,c){this._cachedPath=[],this.parent=n,this.data=i,this._path=u,this._key=c}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const ym=(l,n)=>{if(Fa(n))return{success:!0,data:n.value};if(!l.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const i=new qt(l.common.issues);return this._error=i,this._error}}};function de(l){if(!l)return{};const{errorMap:n,invalid_type_error:i,required_error:u,description:c}=l;if(n&&(i||u))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return n?{errorMap:n,description:c}:{errorMap:(d,m)=>{var p,y;const{message:b}=l;return d.code==="invalid_enum_value"?{message:b??m.defaultError}:typeof m.data>"u"?{message:(p=b??u)!==null&&p!==void 0?p:m.defaultError}:d.code!=="invalid_type"?{message:m.defaultError}:{message:(y=b??i)!==null&&y!==void 0?y:m.defaultError}},description:c}}class me{get description(){return this._def.description}_getType(n){return Vn(n.data)}_getOrReturnCtx(n,i){return i||{common:n.parent.common,data:n.data,parsedType:Vn(n.data),schemaErrorMap:this._def.errorMap,path:n.path,parent:n.parent}}_processInputParams(n){return{status:new bt,ctx:{common:n.parent.common,data:n.data,parsedType:Vn(n.data),schemaErrorMap:this._def.errorMap,path:n.path,parent:n.parent}}}_parseSync(n){const i=this._parse(n);if(ts(i))throw new Error("Synchronous parse encountered promise.");return i}_parseAsync(n){const i=this._parse(n);return Promise.resolve(i)}parse(n,i){const u=this.safeParse(n,i);if(u.success)return u.data;throw u.error}safeParse(n,i){var u;const c={common:{issues:[],async:(u=i==null?void 0:i.async)!==null&&u!==void 0?u:!1,contextualErrorMap:i==null?void 0:i.errorMap},path:(i==null?void 0:i.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:n,parsedType:Vn(n)},f=this._parseSync({data:n,path:c.path,parent:c});return ym(c,f)}"~validate"(n){var i,u;const c={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:n,parsedType:Vn(n)};if(!this["~standard"].async)try{const f=this._parseSync({data:n,path:[],parent:c});return Fa(f)?{value:f.value}:{issues:c.common.issues}}catch(f){!((u=(i=f==null?void 0:f.message)===null||i===void 0?void 0:i.toLowerCase())===null||u===void 0)&&u.includes("encountered")&&(this["~standard"].async=!0),c.common={issues:[],async:!0}}return this._parseAsync({data:n,path:[],parent:c}).then(f=>Fa(f)?{value:f.value}:{issues:c.common.issues})}async parseAsync(n,i){const u=await this.safeParseAsync(n,i);if(u.success)return u.data;throw u.error}async safeParseAsync(n,i){const u={common:{issues:[],contextualErrorMap:i==null?void 0:i.errorMap,async:!0},path:(i==null?void 0:i.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:n,parsedType:Vn(n)},c=this._parse({data:n,path:u.path,parent:u}),f=await(ts(c)?c:Promise.resolve(c));return ym(u,f)}refine(n,i){const u=c=>typeof i=="string"||typeof i>"u"?{message:i}:typeof i=="function"?i(c):i;return this._refinement((c,f)=>{const d=n(c),m=()=>f.addIssue({code:z.custom,...u(c)});return typeof Promise<"u"&&d instanceof Promise?d.then(p=>p?!0:(m(),!1)):d?!0:(m(),!1)})}refinement(n,i){return this._refinement((u,c)=>n(u)?!0:(c.addIssue(typeof i=="function"?i(u,c):i),!1))}_refinement(n){return new rn({schema:this,typeName:re.ZodEffects,effect:{type:"refinement",refinement:n}})}superRefine(n){return this._refinement(n)}constructor(n){this.spa=this.safeParseAsync,this._def=n,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:i=>this["~validate"](i)}}optional(){return vn.create(this,this._def)}nullable(){return _a.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return un.create(this)}promise(){return Gi.create(this,this._def)}or(n){return ls.create([this,n],this._def)}and(n){return ss.create(this,n,this._def)}transform(n){return new rn({...de(this._def),schema:this,typeName:re.ZodEffects,effect:{type:"transform",transform:n}})}default(n){const i=typeof n=="function"?n:()=>n;return new fs({...de(this._def),innerType:this,defaultValue:i,typeName:re.ZodDefault})}brand(){return new uf({typeName:re.ZodBranded,type:this,...de(this._def)})}catch(n){const i=typeof n=="function"?n:()=>n;return new ds({...de(this._def),innerType:this,catchValue:i,typeName:re.ZodCatch})}describe(n){const i=this.constructor;return new i({...this._def,description:n})}pipe(n){return ms.create(this,n)}readonly(){return hs.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const y0=/^c[^\s-]{8,}$/i,m0=/^[0-9a-z]+$/,p0=/^[0-9A-HJKMNP-TV-Z]{26}$/i,g0=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,v0=/^[a-z0-9_-]{21}$/i,b0=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,_0=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,S0=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,T0="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let vo;const E0=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,A0=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,w0=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,O0=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,R0=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,x0=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Km="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",k0=new RegExp(`^${Km}$`);function Ym(l){let n="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return l.precision?n=`${n}\\.\\d{${l.precision}}`:l.precision==null&&(n=`${n}(\\.\\d+)?`),n}function M0(l){return new RegExp(`^${Ym(l)}$`)}function $m(l){let n=`${Km}T${Ym(l)}`;const i=[];return i.push(l.local?"Z?":"Z"),l.offset&&i.push("([+-]\\d{2}:?\\d{2})"),n=`${n}(${i.join("|")})`,new RegExp(`^${n}$`)}function N0(l,n){return!!((n==="v4"||!n)&&E0.test(l)||(n==="v6"||!n)&&w0.test(l))}function C0(l,n){if(!b0.test(l))return!1;try{const[i]=l.split("."),u=i.replace(/-/g,"+").replace(/_/g,"/").padEnd(i.length+(4-i.length%4)%4,"="),c=JSON.parse(atob(u));return!(typeof c!="object"||c===null||!c.typ||!c.alg||n&&c.alg!==n)}catch{return!1}}function D0(l,n){return!!((n==="v4"||!n)&&A0.test(l)||(n==="v6"||!n)&&O0.test(l))}class sn extends me{_parse(n){if(this._def.coerce&&(n.data=String(n.data)),this._getType(n)!==K.string){const f=this._getOrReturnCtx(n);return V(f,{code:z.invalid_type,expected:K.string,received:f.parsedType}),oe}const u=new bt;let c;for(const f of this._def.checks)if(f.kind==="min")n.data.length<f.value&&(c=this._getOrReturnCtx(n,c),V(c,{code:z.too_small,minimum:f.value,type:"string",inclusive:!0,exact:!1,message:f.message}),u.dirty());else if(f.kind==="max")n.data.length>f.value&&(c=this._getOrReturnCtx(n,c),V(c,{code:z.too_big,maximum:f.value,type:"string",inclusive:!0,exact:!1,message:f.message}),u.dirty());else if(f.kind==="length"){const d=n.data.length>f.value,m=n.data.length<f.value;(d||m)&&(c=this._getOrReturnCtx(n,c),d?V(c,{code:z.too_big,maximum:f.value,type:"string",inclusive:!0,exact:!0,message:f.message}):m&&V(c,{code:z.too_small,minimum:f.value,type:"string",inclusive:!0,exact:!0,message:f.message}),u.dirty())}else if(f.kind==="email")S0.test(n.data)||(c=this._getOrReturnCtx(n,c),V(c,{validation:"email",code:z.invalid_string,message:f.message}),u.dirty());else if(f.kind==="emoji")vo||(vo=new RegExp(T0,"u")),vo.test(n.data)||(c=this._getOrReturnCtx(n,c),V(c,{validation:"emoji",code:z.invalid_string,message:f.message}),u.dirty());else if(f.kind==="uuid")g0.test(n.data)||(c=this._getOrReturnCtx(n,c),V(c,{validation:"uuid",code:z.invalid_string,message:f.message}),u.dirty());else if(f.kind==="nanoid")v0.test(n.data)||(c=this._getOrReturnCtx(n,c),V(c,{validation:"nanoid",code:z.invalid_string,message:f.message}),u.dirty());else if(f.kind==="cuid")y0.test(n.data)||(c=this._getOrReturnCtx(n,c),V(c,{validation:"cuid",code:z.invalid_string,message:f.message}),u.dirty());else if(f.kind==="cuid2")m0.test(n.data)||(c=this._getOrReturnCtx(n,c),V(c,{validation:"cuid2",code:z.invalid_string,message:f.message}),u.dirty());else if(f.kind==="ulid")p0.test(n.data)||(c=this._getOrReturnCtx(n,c),V(c,{validation:"ulid",code:z.invalid_string,message:f.message}),u.dirty());else if(f.kind==="url")try{new URL(n.data)}catch{c=this._getOrReturnCtx(n,c),V(c,{validation:"url",code:z.invalid_string,message:f.message}),u.dirty()}else f.kind==="regex"?(f.regex.lastIndex=0,f.regex.test(n.data)||(c=this._getOrReturnCtx(n,c),V(c,{validation:"regex",code:z.invalid_string,message:f.message}),u.dirty())):f.kind==="trim"?n.data=n.data.trim():f.kind==="includes"?n.data.includes(f.value,f.position)||(c=this._getOrReturnCtx(n,c),V(c,{code:z.invalid_string,validation:{includes:f.value,position:f.position},message:f.message}),u.dirty()):f.kind==="toLowerCase"?n.data=n.data.toLowerCase():f.kind==="toUpperCase"?n.data=n.data.toUpperCase():f.kind==="startsWith"?n.data.startsWith(f.value)||(c=this._getOrReturnCtx(n,c),V(c,{code:z.invalid_string,validation:{startsWith:f.value},message:f.message}),u.dirty()):f.kind==="endsWith"?n.data.endsWith(f.value)||(c=this._getOrReturnCtx(n,c),V(c,{code:z.invalid_string,validation:{endsWith:f.value},message:f.message}),u.dirty()):f.kind==="datetime"?$m(f).test(n.data)||(c=this._getOrReturnCtx(n,c),V(c,{code:z.invalid_string,validation:"datetime",message:f.message}),u.dirty()):f.kind==="date"?k0.test(n.data)||(c=this._getOrReturnCtx(n,c),V(c,{code:z.invalid_string,validation:"date",message:f.message}),u.dirty()):f.kind==="time"?M0(f).test(n.data)||(c=this._getOrReturnCtx(n,c),V(c,{code:z.invalid_string,validation:"time",message:f.message}),u.dirty()):f.kind==="duration"?_0.test(n.data)||(c=this._getOrReturnCtx(n,c),V(c,{validation:"duration",code:z.invalid_string,message:f.message}),u.dirty()):f.kind==="ip"?N0(n.data,f.version)||(c=this._getOrReturnCtx(n,c),V(c,{validation:"ip",code:z.invalid_string,message:f.message}),u.dirty()):f.kind==="jwt"?C0(n.data,f.alg)||(c=this._getOrReturnCtx(n,c),V(c,{validation:"jwt",code:z.invalid_string,message:f.message}),u.dirty()):f.kind==="cidr"?D0(n.data,f.version)||(c=this._getOrReturnCtx(n,c),V(c,{validation:"cidr",code:z.invalid_string,message:f.message}),u.dirty()):f.kind==="base64"?R0.test(n.data)||(c=this._getOrReturnCtx(n,c),V(c,{validation:"base64",code:z.invalid_string,message:f.message}),u.dirty()):f.kind==="base64url"?x0.test(n.data)||(c=this._getOrReturnCtx(n,c),V(c,{validation:"base64url",code:z.invalid_string,message:f.message}),u.dirty()):we.assertNever(f);return{status:u.value,value:n.data}}_regex(n,i,u){return this.refinement(c=>n.test(c),{validation:i,code:z.invalid_string,...J.errToObj(u)})}_addCheck(n){return new sn({...this._def,checks:[...this._def.checks,n]})}email(n){return this._addCheck({kind:"email",...J.errToObj(n)})}url(n){return this._addCheck({kind:"url",...J.errToObj(n)})}emoji(n){return this._addCheck({kind:"emoji",...J.errToObj(n)})}uuid(n){return this._addCheck({kind:"uuid",...J.errToObj(n)})}nanoid(n){return this._addCheck({kind:"nanoid",...J.errToObj(n)})}cuid(n){return this._addCheck({kind:"cuid",...J.errToObj(n)})}cuid2(n){return this._addCheck({kind:"cuid2",...J.errToObj(n)})}ulid(n){return this._addCheck({kind:"ulid",...J.errToObj(n)})}base64(n){return this._addCheck({kind:"base64",...J.errToObj(n)})}base64url(n){return this._addCheck({kind:"base64url",...J.errToObj(n)})}jwt(n){return this._addCheck({kind:"jwt",...J.errToObj(n)})}ip(n){return this._addCheck({kind:"ip",...J.errToObj(n)})}cidr(n){return this._addCheck({kind:"cidr",...J.errToObj(n)})}datetime(n){var i,u;return typeof n=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:n}):this._addCheck({kind:"datetime",precision:typeof(n==null?void 0:n.precision)>"u"?null:n==null?void 0:n.precision,offset:(i=n==null?void 0:n.offset)!==null&&i!==void 0?i:!1,local:(u=n==null?void 0:n.local)!==null&&u!==void 0?u:!1,...J.errToObj(n==null?void 0:n.message)})}date(n){return this._addCheck({kind:"date",message:n})}time(n){return typeof n=="string"?this._addCheck({kind:"time",precision:null,message:n}):this._addCheck({kind:"time",precision:typeof(n==null?void 0:n.precision)>"u"?null:n==null?void 0:n.precision,...J.errToObj(n==null?void 0:n.message)})}duration(n){return this._addCheck({kind:"duration",...J.errToObj(n)})}regex(n,i){return this._addCheck({kind:"regex",regex:n,...J.errToObj(i)})}includes(n,i){return this._addCheck({kind:"includes",value:n,position:i==null?void 0:i.position,...J.errToObj(i==null?void 0:i.message)})}startsWith(n,i){return this._addCheck({kind:"startsWith",value:n,...J.errToObj(i)})}endsWith(n,i){return this._addCheck({kind:"endsWith",value:n,...J.errToObj(i)})}min(n,i){return this._addCheck({kind:"min",value:n,...J.errToObj(i)})}max(n,i){return this._addCheck({kind:"max",value:n,...J.errToObj(i)})}length(n,i){return this._addCheck({kind:"length",value:n,...J.errToObj(i)})}nonempty(n){return this.min(1,J.errToObj(n))}trim(){return new sn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new sn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new sn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(n=>n.kind==="datetime")}get isDate(){return!!this._def.checks.find(n=>n.kind==="date")}get isTime(){return!!this._def.checks.find(n=>n.kind==="time")}get isDuration(){return!!this._def.checks.find(n=>n.kind==="duration")}get isEmail(){return!!this._def.checks.find(n=>n.kind==="email")}get isURL(){return!!this._def.checks.find(n=>n.kind==="url")}get isEmoji(){return!!this._def.checks.find(n=>n.kind==="emoji")}get isUUID(){return!!this._def.checks.find(n=>n.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(n=>n.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(n=>n.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(n=>n.kind==="cuid2")}get isULID(){return!!this._def.checks.find(n=>n.kind==="ulid")}get isIP(){return!!this._def.checks.find(n=>n.kind==="ip")}get isCIDR(){return!!this._def.checks.find(n=>n.kind==="cidr")}get isBase64(){return!!this._def.checks.find(n=>n.kind==="base64")}get isBase64url(){return!!this._def.checks.find(n=>n.kind==="base64url")}get minLength(){let n=null;for(const i of this._def.checks)i.kind==="min"&&(n===null||i.value>n)&&(n=i.value);return n}get maxLength(){let n=null;for(const i of this._def.checks)i.kind==="max"&&(n===null||i.value<n)&&(n=i.value);return n}}sn.create=l=>{var n;return new sn({checks:[],typeName:re.ZodString,coerce:(n=l==null?void 0:l.coerce)!==null&&n!==void 0?n:!1,...de(l)})};function z0(l,n){const i=(l.toString().split(".")[1]||"").length,u=(n.toString().split(".")[1]||"").length,c=i>u?i:u,f=parseInt(l.toFixed(c).replace(".","")),d=parseInt(n.toFixed(c).replace(".",""));return f%d/Math.pow(10,c)}class ga extends me{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(n){if(this._def.coerce&&(n.data=Number(n.data)),this._getType(n)!==K.number){const f=this._getOrReturnCtx(n);return V(f,{code:z.invalid_type,expected:K.number,received:f.parsedType}),oe}let u;const c=new bt;for(const f of this._def.checks)f.kind==="int"?we.isInteger(n.data)||(u=this._getOrReturnCtx(n,u),V(u,{code:z.invalid_type,expected:"integer",received:"float",message:f.message}),c.dirty()):f.kind==="min"?(f.inclusive?n.data<f.value:n.data<=f.value)&&(u=this._getOrReturnCtx(n,u),V(u,{code:z.too_small,minimum:f.value,type:"number",inclusive:f.inclusive,exact:!1,message:f.message}),c.dirty()):f.kind==="max"?(f.inclusive?n.data>f.value:n.data>=f.value)&&(u=this._getOrReturnCtx(n,u),V(u,{code:z.too_big,maximum:f.value,type:"number",inclusive:f.inclusive,exact:!1,message:f.message}),c.dirty()):f.kind==="multipleOf"?z0(n.data,f.value)!==0&&(u=this._getOrReturnCtx(n,u),V(u,{code:z.not_multiple_of,multipleOf:f.value,message:f.message}),c.dirty()):f.kind==="finite"?Number.isFinite(n.data)||(u=this._getOrReturnCtx(n,u),V(u,{code:z.not_finite,message:f.message}),c.dirty()):we.assertNever(f);return{status:c.value,value:n.data}}gte(n,i){return this.setLimit("min",n,!0,J.toString(i))}gt(n,i){return this.setLimit("min",n,!1,J.toString(i))}lte(n,i){return this.setLimit("max",n,!0,J.toString(i))}lt(n,i){return this.setLimit("max",n,!1,J.toString(i))}setLimit(n,i,u,c){return new ga({...this._def,checks:[...this._def.checks,{kind:n,value:i,inclusive:u,message:J.toString(c)}]})}_addCheck(n){return new ga({...this._def,checks:[...this._def.checks,n]})}int(n){return this._addCheck({kind:"int",message:J.toString(n)})}positive(n){return this._addCheck({kind:"min",value:0,inclusive:!1,message:J.toString(n)})}negative(n){return this._addCheck({kind:"max",value:0,inclusive:!1,message:J.toString(n)})}nonpositive(n){return this._addCheck({kind:"max",value:0,inclusive:!0,message:J.toString(n)})}nonnegative(n){return this._addCheck({kind:"min",value:0,inclusive:!0,message:J.toString(n)})}multipleOf(n,i){return this._addCheck({kind:"multipleOf",value:n,message:J.toString(i)})}finite(n){return this._addCheck({kind:"finite",message:J.toString(n)})}safe(n){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:J.toString(n)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:J.toString(n)})}get minValue(){let n=null;for(const i of this._def.checks)i.kind==="min"&&(n===null||i.value>n)&&(n=i.value);return n}get maxValue(){let n=null;for(const i of this._def.checks)i.kind==="max"&&(n===null||i.value<n)&&(n=i.value);return n}get isInt(){return!!this._def.checks.find(n=>n.kind==="int"||n.kind==="multipleOf"&&we.isInteger(n.value))}get isFinite(){let n=null,i=null;for(const u of this._def.checks){if(u.kind==="finite"||u.kind==="int"||u.kind==="multipleOf")return!0;u.kind==="min"?(i===null||u.value>i)&&(i=u.value):u.kind==="max"&&(n===null||u.value<n)&&(n=u.value)}return Number.isFinite(i)&&Number.isFinite(n)}}ga.create=l=>new ga({checks:[],typeName:re.ZodNumber,coerce:(l==null?void 0:l.coerce)||!1,...de(l)});class va extends me{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(n){if(this._def.coerce)try{n.data=BigInt(n.data)}catch{return this._getInvalidInput(n)}if(this._getType(n)!==K.bigint)return this._getInvalidInput(n);let u;const c=new bt;for(const f of this._def.checks)f.kind==="min"?(f.inclusive?n.data<f.value:n.data<=f.value)&&(u=this._getOrReturnCtx(n,u),V(u,{code:z.too_small,type:"bigint",minimum:f.value,inclusive:f.inclusive,message:f.message}),c.dirty()):f.kind==="max"?(f.inclusive?n.data>f.value:n.data>=f.value)&&(u=this._getOrReturnCtx(n,u),V(u,{code:z.too_big,type:"bigint",maximum:f.value,inclusive:f.inclusive,message:f.message}),c.dirty()):f.kind==="multipleOf"?n.data%f.value!==BigInt(0)&&(u=this._getOrReturnCtx(n,u),V(u,{code:z.not_multiple_of,multipleOf:f.value,message:f.message}),c.dirty()):we.assertNever(f);return{status:c.value,value:n.data}}_getInvalidInput(n){const i=this._getOrReturnCtx(n);return V(i,{code:z.invalid_type,expected:K.bigint,received:i.parsedType}),oe}gte(n,i){return this.setLimit("min",n,!0,J.toString(i))}gt(n,i){return this.setLimit("min",n,!1,J.toString(i))}lte(n,i){return this.setLimit("max",n,!0,J.toString(i))}lt(n,i){return this.setLimit("max",n,!1,J.toString(i))}setLimit(n,i,u,c){return new va({...this._def,checks:[...this._def.checks,{kind:n,value:i,inclusive:u,message:J.toString(c)}]})}_addCheck(n){return new va({...this._def,checks:[...this._def.checks,n]})}positive(n){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:J.toString(n)})}negative(n){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:J.toString(n)})}nonpositive(n){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:J.toString(n)})}nonnegative(n){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:J.toString(n)})}multipleOf(n,i){return this._addCheck({kind:"multipleOf",value:n,message:J.toString(i)})}get minValue(){let n=null;for(const i of this._def.checks)i.kind==="min"&&(n===null||i.value>n)&&(n=i.value);return n}get maxValue(){let n=null;for(const i of this._def.checks)i.kind==="max"&&(n===null||i.value<n)&&(n=i.value);return n}}va.create=l=>{var n;return new va({checks:[],typeName:re.ZodBigInt,coerce:(n=l==null?void 0:l.coerce)!==null&&n!==void 0?n:!1,...de(l)})};class ns extends me{_parse(n){if(this._def.coerce&&(n.data=!!n.data),this._getType(n)!==K.boolean){const u=this._getOrReturnCtx(n);return V(u,{code:z.invalid_type,expected:K.boolean,received:u.parsedType}),oe}return Ot(n.data)}}ns.create=l=>new ns({typeName:re.ZodBoolean,coerce:(l==null?void 0:l.coerce)||!1,...de(l)});class Wa extends me{_parse(n){if(this._def.coerce&&(n.data=new Date(n.data)),this._getType(n)!==K.date){const f=this._getOrReturnCtx(n);return V(f,{code:z.invalid_type,expected:K.date,received:f.parsedType}),oe}if(isNaN(n.data.getTime())){const f=this._getOrReturnCtx(n);return V(f,{code:z.invalid_date}),oe}const u=new bt;let c;for(const f of this._def.checks)f.kind==="min"?n.data.getTime()<f.value&&(c=this._getOrReturnCtx(n,c),V(c,{code:z.too_small,message:f.message,inclusive:!0,exact:!1,minimum:f.value,type:"date"}),u.dirty()):f.kind==="max"?n.data.getTime()>f.value&&(c=this._getOrReturnCtx(n,c),V(c,{code:z.too_big,message:f.message,inclusive:!0,exact:!1,maximum:f.value,type:"date"}),u.dirty()):we.assertNever(f);return{status:u.value,value:new Date(n.data.getTime())}}_addCheck(n){return new Wa({...this._def,checks:[...this._def.checks,n]})}min(n,i){return this._addCheck({kind:"min",value:n.getTime(),message:J.toString(i)})}max(n,i){return this._addCheck({kind:"max",value:n.getTime(),message:J.toString(i)})}get minDate(){let n=null;for(const i of this._def.checks)i.kind==="min"&&(n===null||i.value>n)&&(n=i.value);return n!=null?new Date(n):null}get maxDate(){let n=null;for(const i of this._def.checks)i.kind==="max"&&(n===null||i.value<n)&&(n=i.value);return n!=null?new Date(n):null}}Wa.create=l=>new Wa({checks:[],coerce:(l==null?void 0:l.coerce)||!1,typeName:re.ZodDate,...de(l)});class Ku extends me{_parse(n){if(this._getType(n)!==K.symbol){const u=this._getOrReturnCtx(n);return V(u,{code:z.invalid_type,expected:K.symbol,received:u.parsedType}),oe}return Ot(n.data)}}Ku.create=l=>new Ku({typeName:re.ZodSymbol,...de(l)});class as extends me{_parse(n){if(this._getType(n)!==K.undefined){const u=this._getOrReturnCtx(n);return V(u,{code:z.invalid_type,expected:K.undefined,received:u.parsedType}),oe}return Ot(n.data)}}as.create=l=>new as({typeName:re.ZodUndefined,...de(l)});class is extends me{_parse(n){if(this._getType(n)!==K.null){const u=this._getOrReturnCtx(n);return V(u,{code:z.invalid_type,expected:K.null,received:u.parsedType}),oe}return Ot(n.data)}}is.create=l=>new is({typeName:re.ZodNull,...de(l)});class $i extends me{constructor(){super(...arguments),this._any=!0}_parse(n){return Ot(n.data)}}$i.create=l=>new $i({typeName:re.ZodAny,...de(l)});class $a extends me{constructor(){super(...arguments),this._unknown=!0}_parse(n){return Ot(n.data)}}$a.create=l=>new $a({typeName:re.ZodUnknown,...de(l)});class Kn extends me{_parse(n){const i=this._getOrReturnCtx(n);return V(i,{code:z.invalid_type,expected:K.never,received:i.parsedType}),oe}}Kn.create=l=>new Kn({typeName:re.ZodNever,...de(l)});class Yu extends me{_parse(n){if(this._getType(n)!==K.undefined){const u=this._getOrReturnCtx(n);return V(u,{code:z.invalid_type,expected:K.void,received:u.parsedType}),oe}return Ot(n.data)}}Yu.create=l=>new Yu({typeName:re.ZodVoid,...de(l)});class un extends me{_parse(n){const{ctx:i,status:u}=this._processInputParams(n),c=this._def;if(i.parsedType!==K.array)return V(i,{code:z.invalid_type,expected:K.array,received:i.parsedType}),oe;if(c.exactLength!==null){const d=i.data.length>c.exactLength.value,m=i.data.length<c.exactLength.value;(d||m)&&(V(i,{code:d?z.too_big:z.too_small,minimum:m?c.exactLength.value:void 0,maximum:d?c.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:c.exactLength.message}),u.dirty())}if(c.minLength!==null&&i.data.length<c.minLength.value&&(V(i,{code:z.too_small,minimum:c.minLength.value,type:"array",inclusive:!0,exact:!1,message:c.minLength.message}),u.dirty()),c.maxLength!==null&&i.data.length>c.maxLength.value&&(V(i,{code:z.too_big,maximum:c.maxLength.value,type:"array",inclusive:!0,exact:!1,message:c.maxLength.message}),u.dirty()),i.common.async)return Promise.all([...i.data].map((d,m)=>c.type._parseAsync(new _n(i,d,i.path,m)))).then(d=>bt.mergeArray(u,d));const f=[...i.data].map((d,m)=>c.type._parseSync(new _n(i,d,i.path,m)));return bt.mergeArray(u,f)}get element(){return this._def.type}min(n,i){return new un({...this._def,minLength:{value:n,message:J.toString(i)}})}max(n,i){return new un({...this._def,maxLength:{value:n,message:J.toString(i)}})}length(n,i){return new un({...this._def,exactLength:{value:n,message:J.toString(i)}})}nonempty(n){return this.min(1,n)}}un.create=(l,n)=>new un({type:l,minLength:null,maxLength:null,exactLength:null,typeName:re.ZodArray,...de(n)});function ji(l){if(l instanceof Ge){const n={};for(const i in l.shape){const u=l.shape[i];n[i]=vn.create(ji(u))}return new Ge({...l._def,shape:()=>n})}else return l instanceof un?new un({...l._def,type:ji(l.element)}):l instanceof vn?vn.create(ji(l.unwrap())):l instanceof _a?_a.create(ji(l.unwrap())):l instanceof Sn?Sn.create(l.items.map(n=>ji(n))):l}class Ge extends me{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const n=this._def.shape(),i=we.objectKeys(n);return this._cached={shape:n,keys:i}}_parse(n){if(this._getType(n)!==K.object){const y=this._getOrReturnCtx(n);return V(y,{code:z.invalid_type,expected:K.object,received:y.parsedType}),oe}const{status:u,ctx:c}=this._processInputParams(n),{shape:f,keys:d}=this._getCached(),m=[];if(!(this._def.catchall instanceof Kn&&this._def.unknownKeys==="strip"))for(const y in c.data)d.includes(y)||m.push(y);const p=[];for(const y of d){const b=f[y],O=c.data[y];p.push({key:{status:"valid",value:y},value:b._parse(new _n(c,O,c.path,y)),alwaysSet:y in c.data})}if(this._def.catchall instanceof Kn){const y=this._def.unknownKeys;if(y==="passthrough")for(const b of m)p.push({key:{status:"valid",value:b},value:{status:"valid",value:c.data[b]}});else if(y==="strict")m.length>0&&(V(c,{code:z.unrecognized_keys,keys:m}),u.dirty());else if(y!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const y=this._def.catchall;for(const b of m){const O=c.data[b];p.push({key:{status:"valid",value:b},value:y._parse(new _n(c,O,c.path,b)),alwaysSet:b in c.data})}}return c.common.async?Promise.resolve().then(async()=>{const y=[];for(const b of p){const O=await b.key,k=await b.value;y.push({key:O,value:k,alwaysSet:b.alwaysSet})}return y}).then(y=>bt.mergeObjectSync(u,y)):bt.mergeObjectSync(u,p)}get shape(){return this._def.shape()}strict(n){return J.errToObj,new Ge({...this._def,unknownKeys:"strict",...n!==void 0?{errorMap:(i,u)=>{var c,f,d,m;const p=(d=(f=(c=this._def).errorMap)===null||f===void 0?void 0:f.call(c,i,u).message)!==null&&d!==void 0?d:u.defaultError;return i.code==="unrecognized_keys"?{message:(m=J.errToObj(n).message)!==null&&m!==void 0?m:p}:{message:p}}}:{}})}strip(){return new Ge({...this._def,unknownKeys:"strip"})}passthrough(){return new Ge({...this._def,unknownKeys:"passthrough"})}extend(n){return new Ge({...this._def,shape:()=>({...this._def.shape(),...n})})}merge(n){return new Ge({unknownKeys:n._def.unknownKeys,catchall:n._def.catchall,shape:()=>({...this._def.shape(),...n._def.shape()}),typeName:re.ZodObject})}setKey(n,i){return this.augment({[n]:i})}catchall(n){return new Ge({...this._def,catchall:n})}pick(n){const i={};return we.objectKeys(n).forEach(u=>{n[u]&&this.shape[u]&&(i[u]=this.shape[u])}),new Ge({...this._def,shape:()=>i})}omit(n){const i={};return we.objectKeys(this.shape).forEach(u=>{n[u]||(i[u]=this.shape[u])}),new Ge({...this._def,shape:()=>i})}deepPartial(){return ji(this)}partial(n){const i={};return we.objectKeys(this.shape).forEach(u=>{const c=this.shape[u];n&&!n[u]?i[u]=c:i[u]=c.optional()}),new Ge({...this._def,shape:()=>i})}required(n){const i={};return we.objectKeys(this.shape).forEach(u=>{if(n&&!n[u])i[u]=this.shape[u];else{let f=this.shape[u];for(;f instanceof vn;)f=f._def.innerType;i[u]=f}}),new Ge({...this._def,shape:()=>i})}keyof(){return Gm(we.objectKeys(this.shape))}}Ge.create=(l,n)=>new Ge({shape:()=>l,unknownKeys:"strip",catchall:Kn.create(),typeName:re.ZodObject,...de(n)});Ge.strictCreate=(l,n)=>new Ge({shape:()=>l,unknownKeys:"strict",catchall:Kn.create(),typeName:re.ZodObject,...de(n)});Ge.lazycreate=(l,n)=>new Ge({shape:l,unknownKeys:"strip",catchall:Kn.create(),typeName:re.ZodObject,...de(n)});class ls extends me{_parse(n){const{ctx:i}=this._processInputParams(n),u=this._def.options;function c(f){for(const m of f)if(m.result.status==="valid")return m.result;for(const m of f)if(m.result.status==="dirty")return i.common.issues.push(...m.ctx.common.issues),m.result;const d=f.map(m=>new qt(m.ctx.common.issues));return V(i,{code:z.invalid_union,unionErrors:d}),oe}if(i.common.async)return Promise.all(u.map(async f=>{const d={...i,common:{...i.common,issues:[]},parent:null};return{result:await f._parseAsync({data:i.data,path:i.path,parent:d}),ctx:d}})).then(c);{let f;const d=[];for(const p of u){const y={...i,common:{...i.common,issues:[]},parent:null},b=p._parseSync({data:i.data,path:i.path,parent:y});if(b.status==="valid")return b;b.status==="dirty"&&!f&&(f={result:b,ctx:y}),y.common.issues.length&&d.push(y.common.issues)}if(f)return i.common.issues.push(...f.ctx.common.issues),f.result;const m=d.map(p=>new qt(p));return V(i,{code:z.invalid_union,unionErrors:m}),oe}}get options(){return this._def.options}}ls.create=(l,n)=>new ls({options:l,typeName:re.ZodUnion,...de(n)});const Hn=l=>l instanceof rs?Hn(l.schema):l instanceof rn?Hn(l.innerType()):l instanceof cs?[l.value]:l instanceof ba?l.options:l instanceof os?we.objectValues(l.enum):l instanceof fs?Hn(l._def.innerType):l instanceof as?[void 0]:l instanceof is?[null]:l instanceof vn?[void 0,...Hn(l.unwrap())]:l instanceof _a?[null,...Hn(l.unwrap())]:l instanceof uf||l instanceof hs?Hn(l.unwrap()):l instanceof ds?Hn(l._def.innerType):[];class Fu extends me{_parse(n){const{ctx:i}=this._processInputParams(n);if(i.parsedType!==K.object)return V(i,{code:z.invalid_type,expected:K.object,received:i.parsedType}),oe;const u=this.discriminator,c=i.data[u],f=this.optionsMap.get(c);return f?i.common.async?f._parseAsync({data:i.data,path:i.path,parent:i}):f._parseSync({data:i.data,path:i.path,parent:i}):(V(i,{code:z.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[u]}),oe)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(n,i,u){const c=new Map;for(const f of i){const d=Hn(f.shape[n]);if(!d.length)throw new Error(`A discriminator value for key \`${n}\` could not be extracted from all schema options`);for(const m of d){if(c.has(m))throw new Error(`Discriminator property ${String(n)} has duplicate value ${String(m)}`);c.set(m,f)}}return new Fu({typeName:re.ZodDiscriminatedUnion,discriminator:n,options:i,optionsMap:c,...de(u)})}}function zo(l,n){const i=Vn(l),u=Vn(n);if(l===n)return{valid:!0,data:l};if(i===K.object&&u===K.object){const c=we.objectKeys(n),f=we.objectKeys(l).filter(m=>c.indexOf(m)!==-1),d={...l,...n};for(const m of f){const p=zo(l[m],n[m]);if(!p.valid)return{valid:!1};d[m]=p.data}return{valid:!0,data:d}}else if(i===K.array&&u===K.array){if(l.length!==n.length)return{valid:!1};const c=[];for(let f=0;f<l.length;f++){const d=l[f],m=n[f],p=zo(d,m);if(!p.valid)return{valid:!1};c.push(p.data)}return{valid:!0,data:c}}else return i===K.date&&u===K.date&&+l==+n?{valid:!0,data:l}:{valid:!1}}class ss extends me{_parse(n){const{status:i,ctx:u}=this._processInputParams(n),c=(f,d)=>{if(Co(f)||Co(d))return oe;const m=zo(f.value,d.value);return m.valid?((Do(f)||Do(d))&&i.dirty(),{status:i.value,value:m.data}):(V(u,{code:z.invalid_intersection_types}),oe)};return u.common.async?Promise.all([this._def.left._parseAsync({data:u.data,path:u.path,parent:u}),this._def.right._parseAsync({data:u.data,path:u.path,parent:u})]).then(([f,d])=>c(f,d)):c(this._def.left._parseSync({data:u.data,path:u.path,parent:u}),this._def.right._parseSync({data:u.data,path:u.path,parent:u}))}}ss.create=(l,n,i)=>new ss({left:l,right:n,typeName:re.ZodIntersection,...de(i)});class Sn extends me{_parse(n){const{status:i,ctx:u}=this._processInputParams(n);if(u.parsedType!==K.array)return V(u,{code:z.invalid_type,expected:K.array,received:u.parsedType}),oe;if(u.data.length<this._def.items.length)return V(u,{code:z.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),oe;!this._def.rest&&u.data.length>this._def.items.length&&(V(u,{code:z.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),i.dirty());const f=[...u.data].map((d,m)=>{const p=this._def.items[m]||this._def.rest;return p?p._parse(new _n(u,d,u.path,m)):null}).filter(d=>!!d);return u.common.async?Promise.all(f).then(d=>bt.mergeArray(i,d)):bt.mergeArray(i,f)}get items(){return this._def.items}rest(n){return new Sn({...this._def,rest:n})}}Sn.create=(l,n)=>{if(!Array.isArray(l))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Sn({items:l,typeName:re.ZodTuple,rest:null,...de(n)})};class us extends me{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(n){const{status:i,ctx:u}=this._processInputParams(n);if(u.parsedType!==K.object)return V(u,{code:z.invalid_type,expected:K.object,received:u.parsedType}),oe;const c=[],f=this._def.keyType,d=this._def.valueType;for(const m in u.data)c.push({key:f._parse(new _n(u,m,u.path,m)),value:d._parse(new _n(u,u.data[m],u.path,m)),alwaysSet:m in u.data});return u.common.async?bt.mergeObjectAsync(i,c):bt.mergeObjectSync(i,c)}get element(){return this._def.valueType}static create(n,i,u){return i instanceof me?new us({keyType:n,valueType:i,typeName:re.ZodRecord,...de(u)}):new us({keyType:sn.create(),valueType:n,typeName:re.ZodRecord,...de(i)})}}class $u extends me{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(n){const{status:i,ctx:u}=this._processInputParams(n);if(u.parsedType!==K.map)return V(u,{code:z.invalid_type,expected:K.map,received:u.parsedType}),oe;const c=this._def.keyType,f=this._def.valueType,d=[...u.data.entries()].map(([m,p],y)=>({key:c._parse(new _n(u,m,u.path,[y,"key"])),value:f._parse(new _n(u,p,u.path,[y,"value"]))}));if(u.common.async){const m=new Map;return Promise.resolve().then(async()=>{for(const p of d){const y=await p.key,b=await p.value;if(y.status==="aborted"||b.status==="aborted")return oe;(y.status==="dirty"||b.status==="dirty")&&i.dirty(),m.set(y.value,b.value)}return{status:i.value,value:m}})}else{const m=new Map;for(const p of d){const y=p.key,b=p.value;if(y.status==="aborted"||b.status==="aborted")return oe;(y.status==="dirty"||b.status==="dirty")&&i.dirty(),m.set(y.value,b.value)}return{status:i.value,value:m}}}}$u.create=(l,n,i)=>new $u({valueType:n,keyType:l,typeName:re.ZodMap,...de(i)});class Ia extends me{_parse(n){const{status:i,ctx:u}=this._processInputParams(n);if(u.parsedType!==K.set)return V(u,{code:z.invalid_type,expected:K.set,received:u.parsedType}),oe;const c=this._def;c.minSize!==null&&u.data.size<c.minSize.value&&(V(u,{code:z.too_small,minimum:c.minSize.value,type:"set",inclusive:!0,exact:!1,message:c.minSize.message}),i.dirty()),c.maxSize!==null&&u.data.size>c.maxSize.value&&(V(u,{code:z.too_big,maximum:c.maxSize.value,type:"set",inclusive:!0,exact:!1,message:c.maxSize.message}),i.dirty());const f=this._def.valueType;function d(p){const y=new Set;for(const b of p){if(b.status==="aborted")return oe;b.status==="dirty"&&i.dirty(),y.add(b.value)}return{status:i.value,value:y}}const m=[...u.data.values()].map((p,y)=>f._parse(new _n(u,p,u.path,y)));return u.common.async?Promise.all(m).then(p=>d(p)):d(m)}min(n,i){return new Ia({...this._def,minSize:{value:n,message:J.toString(i)}})}max(n,i){return new Ia({...this._def,maxSize:{value:n,message:J.toString(i)}})}size(n,i){return this.min(n,i).max(n,i)}nonempty(n){return this.min(1,n)}}Ia.create=(l,n)=>new Ia({valueType:l,minSize:null,maxSize:null,typeName:re.ZodSet,...de(n)});class Hi extends me{constructor(){super(...arguments),this.validate=this.implement}_parse(n){const{ctx:i}=this._processInputParams(n);if(i.parsedType!==K.function)return V(i,{code:z.invalid_type,expected:K.function,received:i.parsedType}),oe;function u(m,p){return Vu({data:m,path:i.path,errorMaps:[i.common.contextualErrorMap,i.schemaErrorMap,Hu(),Yi].filter(y=>!!y),issueData:{code:z.invalid_arguments,argumentsError:p}})}function c(m,p){return Vu({data:m,path:i.path,errorMaps:[i.common.contextualErrorMap,i.schemaErrorMap,Hu(),Yi].filter(y=>!!y),issueData:{code:z.invalid_return_type,returnTypeError:p}})}const f={errorMap:i.common.contextualErrorMap},d=i.data;if(this._def.returns instanceof Gi){const m=this;return Ot(async function(...p){const y=new qt([]),b=await m._def.args.parseAsync(p,f).catch(C=>{throw y.addIssue(u(p,C)),y}),O=await Reflect.apply(d,this,b);return await m._def.returns._def.type.parseAsync(O,f).catch(C=>{throw y.addIssue(c(O,C)),y})})}else{const m=this;return Ot(function(...p){const y=m._def.args.safeParse(p,f);if(!y.success)throw new qt([u(p,y.error)]);const b=Reflect.apply(d,this,y.data),O=m._def.returns.safeParse(b,f);if(!O.success)throw new qt([c(b,O.error)]);return O.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...n){return new Hi({...this._def,args:Sn.create(n).rest($a.create())})}returns(n){return new Hi({...this._def,returns:n})}implement(n){return this.parse(n)}strictImplement(n){return this.parse(n)}static create(n,i,u){return new Hi({args:n||Sn.create([]).rest($a.create()),returns:i||$a.create(),typeName:re.ZodFunction,...de(u)})}}class rs extends me{get schema(){return this._def.getter()}_parse(n){const{ctx:i}=this._processInputParams(n);return this._def.getter()._parse({data:i.data,path:i.path,parent:i})}}rs.create=(l,n)=>new rs({getter:l,typeName:re.ZodLazy,...de(n)});class cs extends me{_parse(n){if(n.data!==this._def.value){const i=this._getOrReturnCtx(n);return V(i,{received:i.data,code:z.invalid_literal,expected:this._def.value}),oe}return{status:"valid",value:n.data}}get value(){return this._def.value}}cs.create=(l,n)=>new cs({value:l,typeName:re.ZodLiteral,...de(n)});function Gm(l,n){return new ba({values:l,typeName:re.ZodEnum,...de(n)})}class ba extends me{constructor(){super(...arguments),Fl.set(this,void 0)}_parse(n){if(typeof n.data!="string"){const i=this._getOrReturnCtx(n),u=this._def.values;return V(i,{expected:we.joinValues(u),received:i.parsedType,code:z.invalid_type}),oe}if(Lu(this,Fl)||Lm(this,Fl,new Set(this._def.values)),!Lu(this,Fl).has(n.data)){const i=this._getOrReturnCtx(n),u=this._def.values;return V(i,{received:i.data,code:z.invalid_enum_value,options:u}),oe}return Ot(n.data)}get options(){return this._def.values}get enum(){const n={};for(const i of this._def.values)n[i]=i;return n}get Values(){const n={};for(const i of this._def.values)n[i]=i;return n}get Enum(){const n={};for(const i of this._def.values)n[i]=i;return n}extract(n,i=this._def){return ba.create(n,{...this._def,...i})}exclude(n,i=this._def){return ba.create(this.options.filter(u=>!n.includes(u)),{...this._def,...i})}}Fl=new WeakMap;ba.create=Gm;class os extends me{constructor(){super(...arguments),Wl.set(this,void 0)}_parse(n){const i=we.getValidEnumValues(this._def.values),u=this._getOrReturnCtx(n);if(u.parsedType!==K.string&&u.parsedType!==K.number){const c=we.objectValues(i);return V(u,{expected:we.joinValues(c),received:u.parsedType,code:z.invalid_type}),oe}if(Lu(this,Wl)||Lm(this,Wl,new Set(we.getValidEnumValues(this._def.values))),!Lu(this,Wl).has(n.data)){const c=we.objectValues(i);return V(u,{received:u.data,code:z.invalid_enum_value,options:c}),oe}return Ot(n.data)}get enum(){return this._def.values}}Wl=new WeakMap;os.create=(l,n)=>new os({values:l,typeName:re.ZodNativeEnum,...de(n)});class Gi extends me{unwrap(){return this._def.type}_parse(n){const{ctx:i}=this._processInputParams(n);if(i.parsedType!==K.promise&&i.common.async===!1)return V(i,{code:z.invalid_type,expected:K.promise,received:i.parsedType}),oe;const u=i.parsedType===K.promise?i.data:Promise.resolve(i.data);return Ot(u.then(c=>this._def.type.parseAsync(c,{path:i.path,errorMap:i.common.contextualErrorMap})))}}Gi.create=(l,n)=>new Gi({type:l,typeName:re.ZodPromise,...de(n)});class rn extends me{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===re.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(n){const{status:i,ctx:u}=this._processInputParams(n),c=this._def.effect||null,f={addIssue:d=>{V(u,d),d.fatal?i.abort():i.dirty()},get path(){return u.path}};if(f.addIssue=f.addIssue.bind(f),c.type==="preprocess"){const d=c.transform(u.data,f);if(u.common.async)return Promise.resolve(d).then(async m=>{if(i.value==="aborted")return oe;const p=await this._def.schema._parseAsync({data:m,path:u.path,parent:u});return p.status==="aborted"?oe:p.status==="dirty"||i.value==="dirty"?Zi(p.value):p});{if(i.value==="aborted")return oe;const m=this._def.schema._parseSync({data:d,path:u.path,parent:u});return m.status==="aborted"?oe:m.status==="dirty"||i.value==="dirty"?Zi(m.value):m}}if(c.type==="refinement"){const d=m=>{const p=c.refinement(m,f);if(u.common.async)return Promise.resolve(p);if(p instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return m};if(u.common.async===!1){const m=this._def.schema._parseSync({data:u.data,path:u.path,parent:u});return m.status==="aborted"?oe:(m.status==="dirty"&&i.dirty(),d(m.value),{status:i.value,value:m.value})}else return this._def.schema._parseAsync({data:u.data,path:u.path,parent:u}).then(m=>m.status==="aborted"?oe:(m.status==="dirty"&&i.dirty(),d(m.value).then(()=>({status:i.value,value:m.value}))))}if(c.type==="transform")if(u.common.async===!1){const d=this._def.schema._parseSync({data:u.data,path:u.path,parent:u});if(!Fa(d))return d;const m=c.transform(d.value,f);if(m instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:i.value,value:m}}else return this._def.schema._parseAsync({data:u.data,path:u.path,parent:u}).then(d=>Fa(d)?Promise.resolve(c.transform(d.value,f)).then(m=>({status:i.value,value:m})):d);we.assertNever(c)}}rn.create=(l,n,i)=>new rn({schema:l,typeName:re.ZodEffects,effect:n,...de(i)});rn.createWithPreprocess=(l,n,i)=>new rn({schema:n,effect:{type:"preprocess",transform:l},typeName:re.ZodEffects,...de(i)});class vn extends me{_parse(n){return this._getType(n)===K.undefined?Ot(void 0):this._def.innerType._parse(n)}unwrap(){return this._def.innerType}}vn.create=(l,n)=>new vn({innerType:l,typeName:re.ZodOptional,...de(n)});class _a extends me{_parse(n){return this._getType(n)===K.null?Ot(null):this._def.innerType._parse(n)}unwrap(){return this._def.innerType}}_a.create=(l,n)=>new _a({innerType:l,typeName:re.ZodNullable,...de(n)});class fs extends me{_parse(n){const{ctx:i}=this._processInputParams(n);let u=i.data;return i.parsedType===K.undefined&&(u=this._def.defaultValue()),this._def.innerType._parse({data:u,path:i.path,parent:i})}removeDefault(){return this._def.innerType}}fs.create=(l,n)=>new fs({innerType:l,typeName:re.ZodDefault,defaultValue:typeof n.default=="function"?n.default:()=>n.default,...de(n)});class ds extends me{_parse(n){const{ctx:i}=this._processInputParams(n),u={...i,common:{...i.common,issues:[]}},c=this._def.innerType._parse({data:u.data,path:u.path,parent:{...u}});return ts(c)?c.then(f=>({status:"valid",value:f.status==="valid"?f.value:this._def.catchValue({get error(){return new qt(u.common.issues)},input:u.data})})):{status:"valid",value:c.status==="valid"?c.value:this._def.catchValue({get error(){return new qt(u.common.issues)},input:u.data})}}removeCatch(){return this._def.innerType}}ds.create=(l,n)=>new ds({innerType:l,typeName:re.ZodCatch,catchValue:typeof n.catch=="function"?n.catch:()=>n.catch,...de(n)});class Gu extends me{_parse(n){if(this._getType(n)!==K.nan){const u=this._getOrReturnCtx(n);return V(u,{code:z.invalid_type,expected:K.nan,received:u.parsedType}),oe}return{status:"valid",value:n.data}}}Gu.create=l=>new Gu({typeName:re.ZodNaN,...de(l)});const U0=Symbol("zod_brand");class uf extends me{_parse(n){const{ctx:i}=this._processInputParams(n),u=i.data;return this._def.type._parse({data:u,path:i.path,parent:i})}unwrap(){return this._def.type}}class ms extends me{_parse(n){const{status:i,ctx:u}=this._processInputParams(n);if(u.common.async)return(async()=>{const f=await this._def.in._parseAsync({data:u.data,path:u.path,parent:u});return f.status==="aborted"?oe:f.status==="dirty"?(i.dirty(),Zi(f.value)):this._def.out._parseAsync({data:f.value,path:u.path,parent:u})})();{const c=this._def.in._parseSync({data:u.data,path:u.path,parent:u});return c.status==="aborted"?oe:c.status==="dirty"?(i.dirty(),{status:"dirty",value:c.value}):this._def.out._parseSync({data:c.value,path:u.path,parent:u})}}static create(n,i){return new ms({in:n,out:i,typeName:re.ZodPipeline})}}class hs extends me{_parse(n){const i=this._def.innerType._parse(n),u=c=>(Fa(c)&&(c.value=Object.freeze(c.value)),c);return ts(i)?i.then(c=>u(c)):u(i)}unwrap(){return this._def.innerType}}hs.create=(l,n)=>new hs({innerType:l,typeName:re.ZodReadonly,...de(n)});function Xm(l,n={},i){return l?$i.create().superRefine((u,c)=>{var f,d;if(!l(u)){const m=typeof n=="function"?n(u):typeof n=="string"?{message:n}:n,p=(d=(f=m.fatal)!==null&&f!==void 0?f:i)!==null&&d!==void 0?d:!0,y=typeof m=="string"?{message:m}:m;c.addIssue({code:"custom",...y,fatal:p})}}):$i.create()}const j0={object:Ge.lazycreate};var re;(function(l){l.ZodString="ZodString",l.ZodNumber="ZodNumber",l.ZodNaN="ZodNaN",l.ZodBigInt="ZodBigInt",l.ZodBoolean="ZodBoolean",l.ZodDate="ZodDate",l.ZodSymbol="ZodSymbol",l.ZodUndefined="ZodUndefined",l.ZodNull="ZodNull",l.ZodAny="ZodAny",l.ZodUnknown="ZodUnknown",l.ZodNever="ZodNever",l.ZodVoid="ZodVoid",l.ZodArray="ZodArray",l.ZodObject="ZodObject",l.ZodUnion="ZodUnion",l.ZodDiscriminatedUnion="ZodDiscriminatedUnion",l.ZodIntersection="ZodIntersection",l.ZodTuple="ZodTuple",l.ZodRecord="ZodRecord",l.ZodMap="ZodMap",l.ZodSet="ZodSet",l.ZodFunction="ZodFunction",l.ZodLazy="ZodLazy",l.ZodLiteral="ZodLiteral",l.ZodEnum="ZodEnum",l.ZodEffects="ZodEffects",l.ZodNativeEnum="ZodNativeEnum",l.ZodOptional="ZodOptional",l.ZodNullable="ZodNullable",l.ZodDefault="ZodDefault",l.ZodCatch="ZodCatch",l.ZodPromise="ZodPromise",l.ZodBranded="ZodBranded",l.ZodPipeline="ZodPipeline",l.ZodReadonly="ZodReadonly"})(re||(re={}));const B0=(l,n={message:`Input not instance of ${l.name}`})=>Xm(i=>i instanceof l,n),Qm=sn.create,Jm=ga.create,q0=Gu.create,Z0=va.create,Fm=ns.create,H0=Wa.create,V0=Ku.create,L0=as.create,K0=is.create,Y0=$i.create,$0=$a.create,G0=Kn.create,X0=Yu.create,Q0=un.create,J0=Ge.create,F0=Ge.strictCreate,W0=ls.create,I0=Fu.create,P0=ss.create,e_=Sn.create,t_=us.create,n_=$u.create,a_=Ia.create,i_=Hi.create,l_=rs.create,s_=cs.create,u_=ba.create,r_=os.create,c_=Gi.create,mm=rn.create,o_=vn.create,f_=_a.create,d_=rn.createWithPreprocess,h_=ms.create,y_=()=>Qm().optional(),m_=()=>Jm().optional(),p_=()=>Fm().optional(),g_={string:l=>sn.create({...l,coerce:!0}),number:l=>ga.create({...l,coerce:!0}),boolean:l=>ns.create({...l,coerce:!0}),bigint:l=>va.create({...l,coerce:!0}),date:l=>Wa.create({...l,coerce:!0})},v_=oe;var Ne=Object.freeze({__proto__:null,defaultErrorMap:Yi,setErrorMap:d0,getErrorMap:Hu,makeIssue:Vu,EMPTY_PATH:h0,addIssueToContext:V,ParseStatus:bt,INVALID:oe,DIRTY:Zi,OK:Ot,isAborted:Co,isDirty:Do,isValid:Fa,isAsync:ts,get util(){return we},get objectUtil(){return No},ZodParsedType:K,getParsedType:Vn,ZodType:me,datetimeRegex:$m,ZodString:sn,ZodNumber:ga,ZodBigInt:va,ZodBoolean:ns,ZodDate:Wa,ZodSymbol:Ku,ZodUndefined:as,ZodNull:is,ZodAny:$i,ZodUnknown:$a,ZodNever:Kn,ZodVoid:Yu,ZodArray:un,ZodObject:Ge,ZodUnion:ls,ZodDiscriminatedUnion:Fu,ZodIntersection:ss,ZodTuple:Sn,ZodRecord:us,ZodMap:$u,ZodSet:Ia,ZodFunction:Hi,ZodLazy:rs,ZodLiteral:cs,ZodEnum:ba,ZodNativeEnum:os,ZodPromise:Gi,ZodEffects:rn,ZodTransformer:rn,ZodOptional:vn,ZodNullable:_a,ZodDefault:fs,ZodCatch:ds,ZodNaN:Gu,BRAND:U0,ZodBranded:uf,ZodPipeline:ms,ZodReadonly:hs,custom:Xm,Schema:me,ZodSchema:me,late:j0,get ZodFirstPartyTypeKind(){return re},coerce:g_,any:Y0,array:Q0,bigint:Z0,boolean:Fm,date:H0,discriminatedUnion:I0,effect:mm,enum:u_,function:i_,instanceof:B0,intersection:P0,lazy:l_,literal:s_,map:n_,nan:q0,nativeEnum:r_,never:G0,null:K0,nullable:f_,number:Jm,object:J0,oboolean:p_,onumber:m_,optional:o_,ostring:y_,pipeline:h_,preprocess:d_,promise:c_,record:t_,set:a_,strictObject:F0,string:Qm,symbol:V0,transformer:mm,tuple:e_,undefined:L0,union:W0,unknown:$0,void:X0,NEVER:v_,ZodIssueCode:z,quotelessJson:f0,ZodError:qt});const Wm={100:"Continue",101:"Switching Protocols",102:"Processing",103:"Early Hints",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",306:"Switch Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",510:"Not Extended",511:"Network Authentication Required"},bo=Em(Wm).map(([l])=>Ne.literal(Number(l))),b_=Ne.union([bo[0],bo[1],...bo]);Ne.tuple([b_,Ne.string()]);function __(){return Z.jsxs("svg",{id:"uuid-3d2d6be6-f179-42a3-9511-1e9ddeb8575f",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 500 101",children:[Z.jsx("title",{children:"Tempest Games Logo"}),Z.jsx("path",{d:"M155.76.93v59.89h-17.11V7.78h-13.69V.93h30.8Z",style:{fill:"var(--logo-color)",strokeWidth:0}}),Z.jsx("path",{d:"M202.91,7.86h-13.18v17.03h13.18v6.84h-13.18v22.24h13.18v6.84h-30.29V.93h30.29v6.93Z",style:{fill:"var(--logo-color)",strokeWidth:0}}),Z.jsx("path",{d:"M289.49.93v59.89h-17.11V7.78h-.43c-8.21,0-11.21,5.82-11.21,17.03v36.02h-16.25V24.8c0-11.21-2.99-17.03-11.21-17.03h-.43v53.04h-17.11V.93h18.74c9.92,0,15.31,4.96,18.14,11.21,2.82-6.25,8.21-11.21,18.14-11.21h18.73Z",style:{fill:"var(--logo-color)",strokeWidth:0}}),Z.jsx("path",{d:"M352.82,29.68c0,11.72-6.42,19.16-24.55,19.16h-4.53v11.98h-17.11V1.1l46.2-.17v28.75ZM323.73,7.78v34.22h2.48c7.36,0,9.5-4.11,9.5-12.15V7.78h-11.98Z",style:{fill:"var(--logo-color)",strokeWidth:0}}),Z.jsx("path",{d:"M396.8,7.86h-13.17v17.03h13.17v6.84h-13.17v22.24h13.17v6.84h-30.28V.93h30.28v6.93Z",style:{fill:"var(--logo-color)",strokeWidth:0}}),Z.jsx("path",{d:"M425.9,12.57v14.03h27.89v16.94c0,12.75-1.71,18.13-16.43,18.13h-14.54c-9.58,0-14.03-2.74-14.03-11.97v-5.99h15.4v5.13c0,4.53.77,5.99,4.62,5.99h1.71c5.05,0,6.16-1.46,6.16-6.84v-14.54h-27.89v-16.68c0-13.52,3.85-16.68,18.82-16.68h12.83c8.81,0,13.17,1.54,13.17,10.78v7.19h-15.4v-6.5c0-3.42-1.03-4.62-4.45-4.62h-1.45c-4.28,0-6.42,1.46-6.42,5.65Z",style:{fill:"var(--logo-color)",strokeWidth:0}}),Z.jsx("path",{d:"M500,7.78h-13.69v53.04h-17.11V.93h30.8v6.84Z",style:{fill:"var(--logo-color)",strokeWidth:0}}),Z.jsx("path",{d:"M155.96,93.78v-3.57h-5.58v-7.14h13.39v17.85h-24.76v-28.56h24.76v7.14h-16.96v14.28h9.15Z",style:{fill:"var(--logo-color)",strokeWidth:0}}),Z.jsx("path",{d:"M224.26,100.92h-8.25v-10.71h-8.25v3.57h4.68v7.14h-12.94v-17.85h16.51v-3.57h-16.51v-7.14h24.76v28.56Z",style:{fill:"var(--logo-color)",strokeWidth:0}}),Z.jsx("path",{d:"M259.99,72.36h30.57v28.56h-7.81v-21.42h-3.57v21.42h-7.81v-21.42h-3.57v21.42h-7.81v-28.56Z",style:{fill:"var(--logo-color)",strokeWidth:0}}),Z.jsx("path",{d:"M343.24,83.08v-3.57h-9.14v14.28h16.96v7.14h-24.76v-28.56h24.76v17.85h-13.38v-7.14h5.57Z",style:{fill:"var(--logo-color)",strokeWidth:0}}),Z.jsx("path",{d:"M394.59,79.5v3.57h16.96v17.85h-24.76v-7.14h16.96v-3.57h-16.96v-17.85h24.76v7.14h-16.96Z",style:{fill:"var(--logo-color)",strokeWidth:0}}),Z.jsx("path",{d:"M0,63.42v-20.84h20.83L0,63.42ZM100,.92v32.29h-35.42v8.33h-8.33V14.46h-22.92l1.04,7.29h9.38v19.79h-8.33v-8.33H0V.92h100ZM0,100.92v-26.04l6.25-1.04,25-26.04,1.04,1.05-10.42,18.75-4.16,7.29h13.54l3.13-3.12,8.33-22.92h1.04v41.66h3.12l9.38-8.33v-33.33h1.04l8.33,22.92,3.12,3.12h13.54l-4.17-7.29-10.42-19.8,1.04-1.04,25,27.09,6.25,1.04v26.04H0ZM100,42.59v20.84l-20.83-20.84h20.83Z",style:{fill:"var(--logo-color)",strokeWidth:0}})]})}function Wu(l){return Z.jsx("a",{...l})}const S_={class:"_class_wtkls_1"};function T_(l){return["required",l]}function E_(l){return["optional",l]}function A_(l,n){let i=l;for(const u of n){if(i===null||typeof u!="string")return!1;const c=i[1];if(u in c)i=c[u];else{const f=Object.keys(c).find(d=>d.startsWith("$"));if(f){i=c[f];continue}return!1}}if(i===null)return!0;switch(i[0]){case"required":return!1;case"optional":return!0}}const Tn=Object.create(null);Tn.open="0";Tn.close="1";Tn.ping="2";Tn.pong="3";Tn.message="4";Tn.upgrade="5";Tn.noop="6";const zu=Object.create(null);Object.keys(Tn).forEach(l=>{zu[Tn[l]]=l});const Uo={type:"error",data:"parser error"},Im=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Pm=typeof ArrayBuffer=="function",ep=l=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(l):l&&l.buffer instanceof ArrayBuffer,rf=({type:l,data:n},i,u)=>Im&&n instanceof Blob?i?u(n):pm(n,u):Pm&&(n instanceof ArrayBuffer||ep(n))?i?u(n):pm(new Blob([n]),u):u(Tn[l]+(n||"")),pm=(l,n)=>{const i=new FileReader;return i.onload=function(){const u=i.result.split(",")[1];n("b"+(u||""))},i.readAsDataURL(l)};function gm(l){return l instanceof Uint8Array?l:l instanceof ArrayBuffer?new Uint8Array(l):new Uint8Array(l.buffer,l.byteOffset,l.byteLength)}let _o;function w_(l,n){if(Im&&l.data instanceof Blob)return l.data.arrayBuffer().then(gm).then(n);if(Pm&&(l.data instanceof ArrayBuffer||ep(l.data)))return n(gm(l.data));rf(l,!1,i=>{_o||(_o=new TextEncoder),n(_o.encode(i))})}const vm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Il=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let l=0;l<vm.length;l++)Il[vm.charCodeAt(l)]=l;const O_=l=>{let n=l.length*.75,i=l.length,u,c=0,f,d,m,p;l[l.length-1]==="="&&(n--,l[l.length-2]==="="&&n--);const y=new ArrayBuffer(n),b=new Uint8Array(y);for(u=0;u<i;u+=4)f=Il[l.charCodeAt(u)],d=Il[l.charCodeAt(u+1)],m=Il[l.charCodeAt(u+2)],p=Il[l.charCodeAt(u+3)],b[c++]=f<<2|d>>4,b[c++]=(d&15)<<4|m>>2,b[c++]=(m&3)<<6|p&63;return y},R_=typeof ArrayBuffer=="function",cf=(l,n)=>{if(typeof l!="string")return{type:"message",data:tp(l,n)};const i=l.charAt(0);return i==="b"?{type:"message",data:x_(l.substring(1),n)}:zu[i]?l.length>1?{type:zu[i],data:l.substring(1)}:{type:zu[i]}:Uo},x_=(l,n)=>{if(R_){const i=O_(l);return tp(i,n)}else return{base64:!0,data:l}},tp=(l,n)=>{switch(n){case"blob":return l instanceof Blob?l:new Blob([l]);case"arraybuffer":default:return l instanceof ArrayBuffer?l:l.buffer}},np="",k_=(l,n)=>{const i=l.length,u=new Array(i);let c=0;l.forEach((f,d)=>{rf(f,!1,m=>{u[d]=m,++c===i&&n(u.join(np))})})},M_=(l,n)=>{const i=l.split(np),u=[];for(let c=0;c<i.length;c++){const f=cf(i[c],n);if(u.push(f),f.type==="error")break}return u};function N_(){return new TransformStream({transform(l,n){w_(l,i=>{const u=i.length;let c;if(u<126)c=new Uint8Array(1),new DataView(c.buffer).setUint8(0,u);else if(u<65536){c=new Uint8Array(3);const f=new DataView(c.buffer);f.setUint8(0,126),f.setUint16(1,u)}else{c=new Uint8Array(9);const f=new DataView(c.buffer);f.setUint8(0,127),f.setBigUint64(1,BigInt(u))}l.data&&typeof l.data!="string"&&(c[0]|=128),n.enqueue(c),n.enqueue(i)})}})}let So;function Cu(l){return l.reduce((n,i)=>n+i.length,0)}function Du(l,n){if(l[0].length===n)return l.shift();const i=new Uint8Array(n);let u=0;for(let c=0;c<n;c++)i[c]=l[0][u++],u===l[0].length&&(l.shift(),u=0);return l.length&&u<l[0].length&&(l[0]=l[0].slice(u)),i}function C_(l,n){So||(So=new TextDecoder);const i=[];let u=0,c=-1,f=!1;return new TransformStream({transform(d,m){for(i.push(d);;){if(u===0){if(Cu(i)<1)break;const p=Du(i,1);f=(p[0]&128)===128,c=p[0]&127,c<126?u=3:c===126?u=1:u=2}else if(u===1){if(Cu(i)<2)break;const p=Du(i,2);c=new DataView(p.buffer,p.byteOffset,p.length).getUint16(0),u=3}else if(u===2){if(Cu(i)<8)break;const p=Du(i,8),y=new DataView(p.buffer,p.byteOffset,p.length),b=y.getUint32(0);if(b>Math.pow(2,21)-1){m.enqueue(Uo);break}c=b*Math.pow(2,32)+y.getUint32(4),u=3}else{if(Cu(i)<c)break;const p=Du(i,c);m.enqueue(cf(f?p:So.decode(p),n)),u=0}if(c===0||c>l){m.enqueue(Uo);break}}}})}const ap=4;function at(l){if(l)return D_(l)}function D_(l){for(var n in at.prototype)l[n]=at.prototype[n];return l}at.prototype.on=at.prototype.addEventListener=function(l,n){return this._callbacks=this._callbacks||{},(this._callbacks["$"+l]=this._callbacks["$"+l]||[]).push(n),this};at.prototype.once=function(l,n){function i(){this.off(l,i),n.apply(this,arguments)}return i.fn=n,this.on(l,i),this};at.prototype.off=at.prototype.removeListener=at.prototype.removeAllListeners=at.prototype.removeEventListener=function(l,n){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var i=this._callbacks["$"+l];if(!i)return this;if(arguments.length==1)return delete this._callbacks["$"+l],this;for(var u,c=0;c<i.length;c++)if(u=i[c],u===n||u.fn===n){i.splice(c,1);break}return i.length===0&&delete this._callbacks["$"+l],this};at.prototype.emit=function(l){this._callbacks=this._callbacks||{};for(var n=new Array(arguments.length-1),i=this._callbacks["$"+l],u=1;u<arguments.length;u++)n[u-1]=arguments[u];if(i){i=i.slice(0);for(var u=0,c=i.length;u<c;++u)i[u].apply(this,n)}return this};at.prototype.emitReserved=at.prototype.emit;at.prototype.listeners=function(l){return this._callbacks=this._callbacks||{},this._callbacks["$"+l]||[]};at.prototype.hasListeners=function(l){return!!this.listeners(l).length};const Iu=typeof Promise=="function"&&typeof Promise.resolve=="function"?n=>Promise.resolve().then(n):(n,i)=>i(n,0),It=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),z_="arraybuffer";function ip(l,...n){return n.reduce((i,u)=>(l.hasOwnProperty(u)&&(i[u]=l[u]),i),{})}const U_=It.setTimeout,j_=It.clearTimeout;function Pu(l,n){n.useNativeTimers?(l.setTimeoutFn=U_.bind(It),l.clearTimeoutFn=j_.bind(It)):(l.setTimeoutFn=It.setTimeout.bind(It),l.clearTimeoutFn=It.clearTimeout.bind(It))}const B_=1.33;function q_(l){return typeof l=="string"?Z_(l):Math.ceil((l.byteLength||l.size)*B_)}function Z_(l){let n=0,i=0;for(let u=0,c=l.length;u<c;u++)n=l.charCodeAt(u),n<128?i+=1:n<2048?i+=2:n<55296||n>=57344?i+=3:(u++,i+=4);return i}function lp(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function H_(l){let n="";for(let i in l)l.hasOwnProperty(i)&&(n.length&&(n+="&"),n+=encodeURIComponent(i)+"="+encodeURIComponent(l[i]));return n}function V_(l){let n={},i=l.split("&");for(let u=0,c=i.length;u<c;u++){let f=i[u].split("=");n[decodeURIComponent(f[0])]=decodeURIComponent(f[1])}return n}class L_ extends Error{constructor(n,i,u){super(n),this.description=i,this.context=u,this.type="TransportError"}}class of extends at{constructor(n){super(),this.writable=!1,Pu(this,n),this.opts=n,this.query=n.query,this.socket=n.socket,this.supportsBinary=!n.forceBase64}onError(n,i,u){return super.emitReserved("error",new L_(n,i,u)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(n){this.readyState==="open"&&this.write(n)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(n){const i=cf(n,this.socket.binaryType);this.onPacket(i)}onPacket(n){super.emitReserved("packet",n)}onClose(n){this.readyState="closed",super.emitReserved("close",n)}pause(n){}createUri(n,i={}){return n+"://"+this._hostname()+this._port()+this.opts.path+this._query(i)}_hostname(){const n=this.opts.hostname;return n.indexOf(":")===-1?n:"["+n+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(n){const i=H_(n);return i.length?"?"+i:""}}class K_ extends of{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(n){this.readyState="pausing";const i=()=>{this.readyState="paused",n()};if(this._polling||!this.writable){let u=0;this._polling&&(u++,this.once("pollComplete",function(){--u||i()})),this.writable||(u++,this.once("drain",function(){--u||i()}))}else i()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(n){const i=u=>{if(this.readyState==="opening"&&u.type==="open"&&this.onOpen(),u.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(u)};M_(n,this.socket.binaryType).forEach(i),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const n=()=>{this.write([{type:"close"}])};this.readyState==="open"?n():this.once("open",n)}write(n){this.writable=!1,k_(n,i=>{this.doWrite(i,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const n=this.opts.secure?"https":"http",i=this.query||{};return this.opts.timestampRequests!==!1&&(i[this.opts.timestampParam]=lp()),!this.supportsBinary&&!i.sid&&(i.b64=1),this.createUri(n,i)}}let sp=!1;try{sp=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Y_=sp;function $_(){}class G_ extends K_{constructor(n){if(super(n),typeof location<"u"){const i=location.protocol==="https:";let u=location.port;u||(u=i?"443":"80"),this.xd=typeof location<"u"&&n.hostname!==location.hostname||u!==n.port}}doWrite(n,i){const u=this.request({method:"POST",data:n});u.on("success",i),u.on("error",(c,f)=>{this.onError("xhr post error",c,f)})}doPoll(){const n=this.request();n.on("data",this.onData.bind(this)),n.on("error",(i,u)=>{this.onError("xhr poll error",i,u)}),this.pollXhr=n}}class bn extends at{constructor(n,i,u){super(),this.createRequest=n,Pu(this,u),this._opts=u,this._method=u.method||"GET",this._uri=i,this._data=u.data!==void 0?u.data:null,this._create()}_create(){var n;const i=ip(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");i.xdomain=!!this._opts.xd;const u=this._xhr=this.createRequest(i);try{u.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){u.setDisableHeaderCheck&&u.setDisableHeaderCheck(!0);for(let c in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(c)&&u.setRequestHeader(c,this._opts.extraHeaders[c])}}catch{}if(this._method==="POST")try{u.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{u.setRequestHeader("Accept","*/*")}catch{}(n=this._opts.cookieJar)===null||n===void 0||n.addCookies(u),"withCredentials"in u&&(u.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(u.timeout=this._opts.requestTimeout),u.onreadystatechange=()=>{var c;u.readyState===3&&((c=this._opts.cookieJar)===null||c===void 0||c.parseCookies(u.getResponseHeader("set-cookie"))),u.readyState===4&&(u.status===200||u.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof u.status=="number"?u.status:0)},0))},u.send(this._data)}catch(c){this.setTimeoutFn(()=>{this._onError(c)},0);return}typeof document<"u"&&(this._index=bn.requestsCount++,bn.requests[this._index]=this)}_onError(n){this.emitReserved("error",n,this._xhr),this._cleanup(!0)}_cleanup(n){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=$_,n)try{this._xhr.abort()}catch{}typeof document<"u"&&delete bn.requests[this._index],this._xhr=null}}_onLoad(){const n=this._xhr.responseText;n!==null&&(this.emitReserved("data",n),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}bn.requestsCount=0;bn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",bm);else if(typeof addEventListener=="function"){const l="onpagehide"in It?"pagehide":"unload";addEventListener(l,bm,!1)}}function bm(){for(let l in bn.requests)bn.requests.hasOwnProperty(l)&&bn.requests[l].abort()}const X_=function(){const l=up({xdomain:!1});return l&&l.responseType!==null}();class Q_ extends G_{constructor(n){super(n);const i=n&&n.forceBase64;this.supportsBinary=X_&&!i}request(n={}){return Object.assign(n,{xd:this.xd},this.opts),new bn(up,this.uri(),n)}}function up(l){const n=l.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!n||Y_))return new XMLHttpRequest}catch{}if(!n)try{return new It[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const rp=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class J_ extends of{get name(){return"websocket"}doOpen(){const n=this.uri(),i=this.opts.protocols,u=rp?{}:ip(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(u.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(n,i,u)}catch(c){return this.emitReserved("error",c)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=n=>this.onClose({description:"websocket connection closed",context:n}),this.ws.onmessage=n=>this.onData(n.data),this.ws.onerror=n=>this.onError("websocket error",n)}write(n){this.writable=!1;for(let i=0;i<n.length;i++){const u=n[i],c=i===n.length-1;rf(u,this.supportsBinary,f=>{try{this.doWrite(u,f)}catch{}c&&Iu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const n=this.opts.secure?"wss":"ws",i=this.query||{};return this.opts.timestampRequests&&(i[this.opts.timestampParam]=lp()),this.supportsBinary||(i.b64=1),this.createUri(n,i)}}const To=It.WebSocket||It.MozWebSocket;class F_ extends J_{createSocket(n,i,u){return rp?new To(n,i,u):i?new To(n,i):new To(n)}doWrite(n,i){this.ws.send(i)}}class W_ extends of{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(n){return this.emitReserved("error",n)}this._transport.closed.then(()=>{this.onClose()}).catch(n=>{this.onError("webtransport error",n)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(n=>{const i=C_(Number.MAX_SAFE_INTEGER,this.socket.binaryType),u=n.readable.pipeThrough(i).getReader(),c=N_();c.readable.pipeTo(n.writable),this._writer=c.writable.getWriter();const f=()=>{u.read().then(({done:m,value:p})=>{m||(this.onPacket(p),f())}).catch(m=>{})};f();const d={type:"open"};this.query.sid&&(d.data=`{"sid":"${this.query.sid}"}`),this._writer.write(d).then(()=>this.onOpen())})})}write(n){this.writable=!1;for(let i=0;i<n.length;i++){const u=n[i],c=i===n.length-1;this._writer.write(u).then(()=>{c&&Iu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var n;(n=this._transport)===null||n===void 0||n.close()}}const I_={websocket:F_,webtransport:W_,polling:Q_},P_=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,e1=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function jo(l){if(l.length>8e3)throw"URI too long";const n=l,i=l.indexOf("["),u=l.indexOf("]");i!=-1&&u!=-1&&(l=l.substring(0,i)+l.substring(i,u).replace(/:/g,";")+l.substring(u,l.length));let c=P_.exec(l||""),f={},d=14;for(;d--;)f[e1[d]]=c[d]||"";return i!=-1&&u!=-1&&(f.source=n,f.host=f.host.substring(1,f.host.length-1).replace(/;/g,":"),f.authority=f.authority.replace("[","").replace("]","").replace(/;/g,":"),f.ipv6uri=!0),f.pathNames=t1(f,f.path),f.queryKey=n1(f,f.query),f}function t1(l,n){const i=/\/{2,9}/g,u=n.replace(i,"/").split("/");return(n.slice(0,1)=="/"||n.length===0)&&u.splice(0,1),n.slice(-1)=="/"&&u.splice(u.length-1,1),u}function n1(l,n){const i={};return n.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(u,c,f){c&&(i[c]=f)}),i}const Bo=typeof addEventListener=="function"&&typeof removeEventListener=="function",Uu=[];Bo&&addEventListener("offline",()=>{Uu.forEach(l=>l())},!1);class ma extends at{constructor(n,i){if(super(),this.binaryType=z_,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,n&&typeof n=="object"&&(i=n,n=null),n){const u=jo(n);i.hostname=u.host,i.secure=u.protocol==="https"||u.protocol==="wss",i.port=u.port,u.query&&(i.query=u.query)}else i.host&&(i.hostname=jo(i.host).host);Pu(this,i),this.secure=i.secure!=null?i.secure:typeof location<"u"&&location.protocol==="https:",i.hostname&&!i.port&&(i.port=this.secure?"443":"80"),this.hostname=i.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=i.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},i.transports.forEach(u=>{const c=u.prototype.name;this.transports.push(c),this._transportsByName[c]=u}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},i),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=V_(this.opts.query)),Bo&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Uu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(n){const i=Object.assign({},this.opts.query);i.EIO=ap,i.transport=n,this.id&&(i.sid=this.id);const u=Object.assign({},this.opts,{query:i,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[n]);return new this._transportsByName[n](u)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const n=this.opts.rememberUpgrade&&ma.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const i=this.createTransport(n);i.open(),this.setTransport(i)}setTransport(n){this.transport&&this.transport.removeAllListeners(),this.transport=n,n.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",i=>this._onClose("transport close",i))}onOpen(){this.readyState="open",ma.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",n),this.emitReserved("heartbeat"),n.type){case"open":this.onHandshake(JSON.parse(n.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const i=new Error("server error");i.code=n.data,this._onError(i);break;case"message":this.emitReserved("data",n.data),this.emitReserved("message",n.data);break}}onHandshake(n){this.emitReserved("handshake",n),this.id=n.sid,this.transport.query.sid=n.sid,this._pingInterval=n.pingInterval,this._pingTimeout=n.pingTimeout,this._maxPayload=n.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const n=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+n,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},n),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const n=this._getWritablePackets();this.transport.send(n),this._prevBufferLen=n.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let i=1;for(let u=0;u<this.writeBuffer.length;u++){const c=this.writeBuffer[u].data;if(c&&(i+=q_(c)),u>0&&i>this._maxPayload)return this.writeBuffer.slice(0,u);i+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const n=Date.now()>this._pingTimeoutTime;return n&&(this._pingTimeoutTime=0,Iu(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),n}write(n,i,u){return this._sendPacket("message",n,i,u),this}send(n,i,u){return this._sendPacket("message",n,i,u),this}_sendPacket(n,i,u,c){if(typeof i=="function"&&(c=i,i=void 0),typeof u=="function"&&(c=u,u=null),this.readyState==="closing"||this.readyState==="closed")return;u=u||{},u.compress=u.compress!==!1;const f={type:n,data:i,options:u};this.emitReserved("packetCreate",f),this.writeBuffer.push(f),c&&this.once("flush",c),this.flush()}close(){const n=()=>{this._onClose("forced close"),this.transport.close()},i=()=>{this.off("upgrade",i),this.off("upgradeError",i),n()},u=()=>{this.once("upgrade",i),this.once("upgradeError",i)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?u():n()}):this.upgrading?u():n()),this}_onError(n){if(ma.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",n),this._onClose("transport error",n)}_onClose(n,i){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Bo&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const u=Uu.indexOf(this._offlineEventListener);u!==-1&&Uu.splice(u,1)}this.readyState="closed",this.id=null,this.emitReserved("close",n,i),this.writeBuffer=[],this._prevBufferLen=0}}}ma.protocol=ap;class a1 extends ma{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let n=0;n<this._upgrades.length;n++)this._probe(this._upgrades[n])}_probe(n){let i=this.createTransport(n),u=!1;ma.priorWebsocketSuccess=!1;const c=()=>{u||(i.send([{type:"ping",data:"probe"}]),i.once("packet",O=>{if(!u)if(O.type==="pong"&&O.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",i),!i)return;ma.priorWebsocketSuccess=i.name==="websocket",this.transport.pause(()=>{u||this.readyState!=="closed"&&(b(),this.setTransport(i),i.send([{type:"upgrade"}]),this.emitReserved("upgrade",i),i=null,this.upgrading=!1,this.flush())})}else{const k=new Error("probe error");k.transport=i.name,this.emitReserved("upgradeError",k)}}))};function f(){u||(u=!0,b(),i.close(),i=null)}const d=O=>{const k=new Error("probe error: "+O);k.transport=i.name,f(),this.emitReserved("upgradeError",k)};function m(){d("transport closed")}function p(){d("socket closed")}function y(O){i&&O.name!==i.name&&f()}const b=()=>{i.removeListener("open",c),i.removeListener("error",d),i.removeListener("close",m),this.off("close",p),this.off("upgrading",y)};i.once("open",c),i.once("error",d),i.once("close",m),this.once("close",p),this.once("upgrading",y),this._upgrades.indexOf("webtransport")!==-1&&n!=="webtransport"?this.setTimeoutFn(()=>{u||i.open()},200):i.open()}onHandshake(n){this._upgrades=this._filterUpgrades(n.upgrades),super.onHandshake(n)}_filterUpgrades(n){const i=[];for(let u=0;u<n.length;u++)~this.transports.indexOf(n[u])&&i.push(n[u]);return i}}let i1=class extends a1{constructor(n,i={}){const u=typeof n=="object"?n:i;(!u.transports||u.transports&&typeof u.transports[0]=="string")&&(u.transports=(u.transports||["polling","websocket","webtransport"]).map(c=>I_[c]).filter(c=>!!c)),super(n,u)}};function l1(l,n="",i){let u=l;i=i||typeof location<"u"&&location,l==null&&(l=i.protocol+"//"+i.host),typeof l=="string"&&(l.charAt(0)==="/"&&(l.charAt(1)==="/"?l=i.protocol+l:l=i.host+l),/^(https?|wss?):\/\//.test(l)||(typeof i<"u"?l=i.protocol+"//"+l:l="https://"+l),u=jo(l)),u.port||(/^(http|ws)$/.test(u.protocol)?u.port="80":/^(http|ws)s$/.test(u.protocol)&&(u.port="443")),u.path=u.path||"/";const f=u.host.indexOf(":")!==-1?"["+u.host+"]":u.host;return u.id=u.protocol+"://"+f+":"+u.port+n,u.href=u.protocol+"://"+f+(i&&i.port===u.port?"":":"+u.port),u}const s1=typeof ArrayBuffer=="function",u1=l=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(l):l.buffer instanceof ArrayBuffer,cp=Object.prototype.toString,r1=typeof Blob=="function"||typeof Blob<"u"&&cp.call(Blob)==="[object BlobConstructor]",c1=typeof File=="function"||typeof File<"u"&&cp.call(File)==="[object FileConstructor]";function ff(l){return s1&&(l instanceof ArrayBuffer||u1(l))||r1&&l instanceof Blob||c1&&l instanceof File}function ju(l,n){if(!l||typeof l!="object")return!1;if(Array.isArray(l)){for(let i=0,u=l.length;i<u;i++)if(ju(l[i]))return!0;return!1}if(ff(l))return!0;if(l.toJSON&&typeof l.toJSON=="function"&&arguments.length===1)return ju(l.toJSON(),!0);for(const i in l)if(Object.prototype.hasOwnProperty.call(l,i)&&ju(l[i]))return!0;return!1}function o1(l){const n=[],i=l.data,u=l;return u.data=qo(i,n),u.attachments=n.length,{packet:u,buffers:n}}function qo(l,n){if(!l)return l;if(ff(l)){const i={_placeholder:!0,num:n.length};return n.push(l),i}else if(Array.isArray(l)){const i=new Array(l.length);for(let u=0;u<l.length;u++)i[u]=qo(l[u],n);return i}else if(typeof l=="object"&&!(l instanceof Date)){const i={};for(const u in l)Object.prototype.hasOwnProperty.call(l,u)&&(i[u]=qo(l[u],n));return i}return l}function f1(l,n){return l.data=Zo(l.data,n),delete l.attachments,l}function Zo(l,n){if(!l)return l;if(l&&l._placeholder===!0){if(typeof l.num=="number"&&l.num>=0&&l.num<n.length)return n[l.num];throw new Error("illegal attachments")}else if(Array.isArray(l))for(let i=0;i<l.length;i++)l[i]=Zo(l[i],n);else if(typeof l=="object")for(const i in l)Object.prototype.hasOwnProperty.call(l,i)&&(l[i]=Zo(l[i],n));return l}const d1=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],h1=5;var Te;(function(l){l[l.CONNECT=0]="CONNECT",l[l.DISCONNECT=1]="DISCONNECT",l[l.EVENT=2]="EVENT",l[l.ACK=3]="ACK",l[l.CONNECT_ERROR=4]="CONNECT_ERROR",l[l.BINARY_EVENT=5]="BINARY_EVENT",l[l.BINARY_ACK=6]="BINARY_ACK"})(Te||(Te={}));class y1{constructor(n){this.replacer=n}encode(n){return(n.type===Te.EVENT||n.type===Te.ACK)&&ju(n)?this.encodeAsBinary({type:n.type===Te.EVENT?Te.BINARY_EVENT:Te.BINARY_ACK,nsp:n.nsp,data:n.data,id:n.id}):[this.encodeAsString(n)]}encodeAsString(n){let i=""+n.type;return(n.type===Te.BINARY_EVENT||n.type===Te.BINARY_ACK)&&(i+=n.attachments+"-"),n.nsp&&n.nsp!=="/"&&(i+=n.nsp+","),n.id!=null&&(i+=n.id),n.data!=null&&(i+=JSON.stringify(n.data,this.replacer)),i}encodeAsBinary(n){const i=o1(n),u=this.encodeAsString(i.packet),c=i.buffers;return c.unshift(u),c}}function _m(l){return Object.prototype.toString.call(l)==="[object Object]"}class df extends at{constructor(n){super(),this.reviver=n}add(n){let i;if(typeof n=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");i=this.decodeString(n);const u=i.type===Te.BINARY_EVENT;u||i.type===Te.BINARY_ACK?(i.type=u?Te.EVENT:Te.ACK,this.reconstructor=new m1(i),i.attachments===0&&super.emitReserved("decoded",i)):super.emitReserved("decoded",i)}else if(ff(n)||n.base64)if(this.reconstructor)i=this.reconstructor.takeBinaryData(n),i&&(this.reconstructor=null,super.emitReserved("decoded",i));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+n)}decodeString(n){let i=0;const u={type:Number(n.charAt(0))};if(Te[u.type]===void 0)throw new Error("unknown packet type "+u.type);if(u.type===Te.BINARY_EVENT||u.type===Te.BINARY_ACK){const f=i+1;for(;n.charAt(++i)!=="-"&&i!=n.length;);const d=n.substring(f,i);if(d!=Number(d)||n.charAt(i)!=="-")throw new Error("Illegal attachments");u.attachments=Number(d)}if(n.charAt(i+1)==="/"){const f=i+1;for(;++i&&!(n.charAt(i)===","||i===n.length););u.nsp=n.substring(f,i)}else u.nsp="/";const c=n.charAt(i+1);if(c!==""&&Number(c)==c){const f=i+1;for(;++i;){const d=n.charAt(i);if(d==null||Number(d)!=d){--i;break}if(i===n.length)break}u.id=Number(n.substring(f,i+1))}if(n.charAt(++i)){const f=this.tryParse(n.substr(i));if(df.isPayloadValid(u.type,f))u.data=f;else throw new Error("invalid payload")}return u}tryParse(n){try{return JSON.parse(n,this.reviver)}catch{return!1}}static isPayloadValid(n,i){switch(n){case Te.CONNECT:return _m(i);case Te.DISCONNECT:return i===void 0;case Te.CONNECT_ERROR:return typeof i=="string"||_m(i);case Te.EVENT:case Te.BINARY_EVENT:return Array.isArray(i)&&(typeof i[0]=="number"||typeof i[0]=="string"&&d1.indexOf(i[0])===-1);case Te.ACK:case Te.BINARY_ACK:return Array.isArray(i)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class m1{constructor(n){this.packet=n,this.buffers=[],this.reconPack=n}takeBinaryData(n){if(this.buffers.push(n),this.buffers.length===this.reconPack.attachments){const i=f1(this.reconPack,this.buffers);return this.finishedReconstruction(),i}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const p1=Object.freeze(Object.defineProperty({__proto__:null,Decoder:df,Encoder:y1,get PacketType(){return Te},protocol:h1},Symbol.toStringTag,{value:"Module"}));function ln(l,n,i){return l.on(n,i),function(){l.off(n,i)}}const g1=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class op extends at{constructor(n,i,u){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=n,this.nsp=i,u&&u.auth&&(this.auth=u.auth),this._opts=Object.assign({},u),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const n=this.io;this.subs=[ln(n,"open",this.onopen.bind(this)),ln(n,"packet",this.onpacket.bind(this)),ln(n,"error",this.onerror.bind(this)),ln(n,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...n){return n.unshift("message"),this.emit.apply(this,n),this}emit(n,...i){var u,c,f;if(g1.hasOwnProperty(n))throw new Error('"'+n.toString()+'" is a reserved event name');if(i.unshift(n),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(i),this;const d={type:Te.EVENT,data:i};if(d.options={},d.options.compress=this.flags.compress!==!1,typeof i[i.length-1]=="function"){const b=this.ids++,O=i.pop();this._registerAckCallback(b,O),d.id=b}const m=(c=(u=this.io.engine)===null||u===void 0?void 0:u.transport)===null||c===void 0?void 0:c.writable,p=this.connected&&!(!((f=this.io.engine)===null||f===void 0)&&f._hasPingExpired());return this.flags.volatile&&!m||(p?(this.notifyOutgoingListeners(d),this.packet(d)):this.sendBuffer.push(d)),this.flags={},this}_registerAckCallback(n,i){var u;const c=(u=this.flags.timeout)!==null&&u!==void 0?u:this._opts.ackTimeout;if(c===void 0){this.acks[n]=i;return}const f=this.io.setTimeoutFn(()=>{delete this.acks[n];for(let m=0;m<this.sendBuffer.length;m++)this.sendBuffer[m].id===n&&this.sendBuffer.splice(m,1);i.call(this,new Error("operation has timed out"))},c),d=(...m)=>{this.io.clearTimeoutFn(f),i.apply(this,m)};d.withError=!0,this.acks[n]=d}emitWithAck(n,...i){return new Promise((u,c)=>{const f=(d,m)=>d?c(d):u(m);f.withError=!0,i.push(f),this.emit(n,...i)})}_addToQueue(n){let i;typeof n[n.length-1]=="function"&&(i=n.pop());const u={id:this._queueSeq++,tryCount:0,pending:!1,args:n,flags:Object.assign({fromQueue:!0},this.flags)};n.push((c,...f)=>u!==this._queue[0]?void 0:(c!==null?u.tryCount>this._opts.retries&&(this._queue.shift(),i&&i(c)):(this._queue.shift(),i&&i(null,...f)),u.pending=!1,this._drainQueue())),this._queue.push(u),this._drainQueue()}_drainQueue(n=!1){if(!this.connected||this._queue.length===0)return;const i=this._queue[0];i.pending&&!n||(i.pending=!0,i.tryCount++,this.flags=i.flags,this.emit.apply(this,i.args))}packet(n){n.nsp=this.nsp,this.io._packet(n)}onopen(){typeof this.auth=="function"?this.auth(n=>{this._sendConnectPacket(n)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(n){this.packet({type:Te.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},n):n})}onerror(n){this.connected||this.emitReserved("connect_error",n)}onclose(n,i){this.connected=!1,delete this.id,this.emitReserved("disconnect",n,i),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(n=>{if(!this.sendBuffer.some(u=>String(u.id)===n)){const u=this.acks[n];delete this.acks[n],u.withError&&u.call(this,new Error("socket has been disconnected"))}})}onpacket(n){if(n.nsp===this.nsp)switch(n.type){case Te.CONNECT:n.data&&n.data.sid?this.onconnect(n.data.sid,n.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Te.EVENT:case Te.BINARY_EVENT:this.onevent(n);break;case Te.ACK:case Te.BINARY_ACK:this.onack(n);break;case Te.DISCONNECT:this.ondisconnect();break;case Te.CONNECT_ERROR:this.destroy();const u=new Error(n.data.message);u.data=n.data.data,this.emitReserved("connect_error",u);break}}onevent(n){const i=n.data||[];n.id!=null&&i.push(this.ack(n.id)),this.connected?this.emitEvent(i):this.receiveBuffer.push(Object.freeze(i))}emitEvent(n){if(this._anyListeners&&this._anyListeners.length){const i=this._anyListeners.slice();for(const u of i)u.apply(this,n)}super.emit.apply(this,n),this._pid&&n.length&&typeof n[n.length-1]=="string"&&(this._lastOffset=n[n.length-1])}ack(n){const i=this;let u=!1;return function(...c){u||(u=!0,i.packet({type:Te.ACK,id:n,data:c}))}}onack(n){const i=this.acks[n.id];typeof i=="function"&&(delete this.acks[n.id],i.withError&&n.data.unshift(null),i.apply(this,n.data))}onconnect(n,i){this.id=n,this.recovered=i&&this._pid===i,this._pid=i,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(n=>this.emitEvent(n)),this.receiveBuffer=[],this.sendBuffer.forEach(n=>{this.notifyOutgoingListeners(n),this.packet(n)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(n=>n()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Te.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(n){return this.flags.compress=n,this}get volatile(){return this.flags.volatile=!0,this}timeout(n){return this.flags.timeout=n,this}onAny(n){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(n),this}prependAny(n){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(n),this}offAny(n){if(!this._anyListeners)return this;if(n){const i=this._anyListeners;for(let u=0;u<i.length;u++)if(n===i[u])return i.splice(u,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(n){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(n),this}prependAnyOutgoing(n){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(n),this}offAnyOutgoing(n){if(!this._anyOutgoingListeners)return this;if(n){const i=this._anyOutgoingListeners;for(let u=0;u<i.length;u++)if(n===i[u])return i.splice(u,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(n){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const i=this._anyOutgoingListeners.slice();for(const u of i)u.apply(this,n.data)}}}function Ji(l){l=l||{},this.ms=l.min||100,this.max=l.max||1e4,this.factor=l.factor||2,this.jitter=l.jitter>0&&l.jitter<=1?l.jitter:0,this.attempts=0}Ji.prototype.duration=function(){var l=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var n=Math.random(),i=Math.floor(n*this.jitter*l);l=Math.floor(n*10)&1?l+i:l-i}return Math.min(l,this.max)|0};Ji.prototype.reset=function(){this.attempts=0};Ji.prototype.setMin=function(l){this.ms=l};Ji.prototype.setMax=function(l){this.max=l};Ji.prototype.setJitter=function(l){this.jitter=l};class Ho extends at{constructor(n,i){var u;super(),this.nsps={},this.subs=[],n&&typeof n=="object"&&(i=n,n=void 0),i=i||{},i.path=i.path||"/socket.io",this.opts=i,Pu(this,i),this.reconnection(i.reconnection!==!1),this.reconnectionAttempts(i.reconnectionAttempts||1/0),this.reconnectionDelay(i.reconnectionDelay||1e3),this.reconnectionDelayMax(i.reconnectionDelayMax||5e3),this.randomizationFactor((u=i.randomizationFactor)!==null&&u!==void 0?u:.5),this.backoff=new Ji({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(i.timeout==null?2e4:i.timeout),this._readyState="closed",this.uri=n;const c=i.parser||p1;this.encoder=new c.Encoder,this.decoder=new c.Decoder,this._autoConnect=i.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(n){return arguments.length?(this._reconnection=!!n,n||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(n){return n===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=n,this)}reconnectionDelay(n){var i;return n===void 0?this._reconnectionDelay:(this._reconnectionDelay=n,(i=this.backoff)===null||i===void 0||i.setMin(n),this)}randomizationFactor(n){var i;return n===void 0?this._randomizationFactor:(this._randomizationFactor=n,(i=this.backoff)===null||i===void 0||i.setJitter(n),this)}reconnectionDelayMax(n){var i;return n===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=n,(i=this.backoff)===null||i===void 0||i.setMax(n),this)}timeout(n){return arguments.length?(this._timeout=n,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(n){if(~this._readyState.indexOf("open"))return this;this.engine=new i1(this.uri,this.opts);const i=this.engine,u=this;this._readyState="opening",this.skipReconnect=!1;const c=ln(i,"open",function(){u.onopen(),n&&n()}),f=m=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",m),n?n(m):this.maybeReconnectOnOpen()},d=ln(i,"error",f);if(this._timeout!==!1){const m=this._timeout,p=this.setTimeoutFn(()=>{c(),f(new Error("timeout")),i.close()},m);this.opts.autoUnref&&p.unref(),this.subs.push(()=>{this.clearTimeoutFn(p)})}return this.subs.push(c),this.subs.push(d),this}connect(n){return this.open(n)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const n=this.engine;this.subs.push(ln(n,"ping",this.onping.bind(this)),ln(n,"data",this.ondata.bind(this)),ln(n,"error",this.onerror.bind(this)),ln(n,"close",this.onclose.bind(this)),ln(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(n){try{this.decoder.add(n)}catch(i){this.onclose("parse error",i)}}ondecoded(n){Iu(()=>{this.emitReserved("packet",n)},this.setTimeoutFn)}onerror(n){this.emitReserved("error",n)}socket(n,i){let u=this.nsps[n];return u?this._autoConnect&&!u.active&&u.connect():(u=new op(this,n,i),this.nsps[n]=u),u}_destroy(n){const i=Object.keys(this.nsps);for(const u of i)if(this.nsps[u].active)return;this._close()}_packet(n){const i=this.encoder.encode(n);for(let u=0;u<i.length;u++)this.engine.write(i[u],n.options)}cleanup(){this.subs.forEach(n=>n()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(n,i){var u;this.cleanup(),(u=this.engine)===null||u===void 0||u.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",n,i),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const n=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const i=this.backoff.duration();this._reconnecting=!0;const u=this.setTimeoutFn(()=>{n.skipReconnect||(this.emitReserved("reconnect_attempt",n.backoff.attempts),!n.skipReconnect&&n.open(c=>{c?(n._reconnecting=!1,n.reconnect(),this.emitReserved("reconnect_error",c)):n.onreconnect()}))},i);this.opts.autoUnref&&u.unref(),this.subs.push(()=>{this.clearTimeoutFn(u)})}}onreconnect(){const n=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",n)}}const Jl={};function Bu(l,n){typeof l=="object"&&(n=l,l=void 0),n=n||{};const i=l1(l,n.path||"/socket.io"),u=i.source,c=i.id,f=i.path,d=Jl[c]&&f in Jl[c].nsps,m=n.forceNew||n["force new connection"]||n.multiplex===!1||d;let p;return m?p=new Ho(u,n):(Jl[c]||(Jl[c]=new Ho(u,n)),p=Jl[c]),i.query&&!n.query&&(n.query=i.queryKey),p.socket(i.path,n)}Object.assign(Bu,{Manager:Ho,Socket:op,io:Bu,connect:Bu});const v1=["123","321","abc","admin","adobe","alexander","amanda","andrea","andrew","angel","apple","asdf","ashley","baby","banana","baseball","batman","bear","biteme","blazer","blonde","boston","buster","butterfly","cameron","charlie","cheese","chelsea","chicken","chocolate","chris","compaq","computer","cookie","corvette","cowboys","dakota","dallas","daniel","david","diamond","dolphin","donald","dragon","eagle","flower","football","frank","freedom","friend","gateway","george","ginger","god","golf","hannah","hardcore","harley","heather","hello","hottie","hunter","internet","jasmine","jennifer","jessica","jesus","johnny","jordan","joshua","justin","justme","killer","knight","lakers","letmein","liverpool","login","london","love","lucky","mackenzie","maggie","master","matrix","matthew","maverick","melissa","mercedes","michael","michelle","mickey","miller","money","monkey","morgan","mother","muffin","mustang","natasha","nathan","nicole","ninja","orange","pass","password","patrick","peanut","pepper","phoenix","photoshop","pokemon","princess","purple","qazwsx","qwerty","rainbow","ranger","root","samantha","samsung","scooter","secret","shadow","simpson","smile","soccer","sparkle","starwars","summer","sunflower","sunshine","superman","taylor","temp","test","thomas","tigers","tigger","tinkerbell","trust","turtle","victoria","welcome","whatever","william","winter","yellow","zaq12wsx","zxcvbn"],b1=3,_1=15,S1=/^[a-zA-Z0-9_-]+$/,hf=Ne.string().min(b1).max(_1).regex(S1),Sm=20,Tm={0:"o",1:"l",3:"e",4:"a",5:"s",7:"t","@":"a",$:"s","!":"i"};function T1(l){let n="";for(const i of l)i in Tm?n+=Tm[i]:n+=i;return n}function E1(l){const n=l.toLocaleLowerCase(),i=T1(n);for(const u of v1)if(i.includes(u)||n.includes(u))return!0;return!1}function A1(l){const n=new Set(l).size;return l.length*Math.log2(n)}function w1(l){let n=0;return E1(l)&&(n-=100),n+=A1(l)*.5,Math.max(n,0)}const yf=Ne.string().refine(l=>w1(l)>=Sm,{message:`Password does not meet the minimum complexity of ${Sm}.`}).brand("password");Ne.object({username:hf,password:yf}).strict();const fp=Ne.string().email().brand("email");Ne.object({username:hf,password:yf,email:fp}).strict();var O1={};function R1(l,n){const i={},u=[];for(const c in l){const f=l[c],d=n[c],m=f["~standard"].validate(d);if(m instanceof Promise)throw new Error(`Validation must be synchronous, but ${c} returned a Promise.`);if(m.issues){u.push(...m.issues.map(p=>({...p,path:[c,...p.path??[]]})));continue}i[c]=m.value}return u.length?{issues:u}:{value:i}}function x1(l){const n=l.runtimeEnvStrict??l.runtimeEnv??O1;for(const[G,P]of Object.entries(n))P===""&&delete n[G];if(!!l.skipValidation)return n;const u=typeof l.client=="object"?l.client:{},c=typeof l.server=="object"?l.server:{},f=typeof l.shared=="object"?l.shared:{},d=l.isServer??(typeof window>"u"||"Deno"in window),m=d?{...c,...f,...u}:{...u,...f},p=R1(m,n),y=l.onValidationError??(G=>{throw console.error("❌ Invalid environment variables:",G),new Error("Invalid environment variables")}),b=l.onInvalidAccess??(()=>{throw new Error("❌ Attempted to access a server-side environment variable on the client")});if(p.issues)return y(p.issues);const O=G=>l.clientPrefix?!G.startsWith(l.clientPrefix)&&!(G in f):!0,k=G=>d||!O(G),C=G=>G==="__esModule"||G==="$$typeof",te=(l.extends??[]).reduce((G,P)=>Object.assign(G,P),{}),L=Object.assign(p.value,te);return new Proxy(L,{get(G,P){if(typeof P=="string"&&!C(P))return k(P)?Reflect.get(G,P):b(P)}})}const k1={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_BACKEND_ORIGIN:"https://realtime.tempest.games"},M1="__vite_start_time"in globalThis,N1=typeof window<"u",mf=x1({isServer:!M1&&!N1,server:{CI:Ne.string().transform(l=>!0).optional(),POSTGRES_USER:Ne.string(),POSTGRES_PASSWORD:Ne.string(),POSTGRES_DATABASE:Ne.string(),POSTGRES_HOST:Ne.string(),POSTGRES_PORT:Ne.string().transform(l=>Number.parseInt(l,10)),BACKEND_PORT:Ne.string().transform(l=>Number.parseInt(l,10)),RUN_WORKERS_FROM_SOURCE:Ne.union([Ne.literal("true"),Ne.literal("false")]).optional().transform(l=>l==="true"),FRONTEND_PORT:Ne.string().transform(l=>Number.parseInt(l,10)),FRONTEND_ORIGINS:Ne.string().transform(l=>JSON.parse(l)).pipe(Ne.array(Ne.string())),OPENAI_API_KEY:Ne.string().optional()},clientPrefix:"VITE_",client:{VITE_BACKEND_ORIGIN:Ne.string(),VITE_USE_SELF_SIGNED_CERTIFICATE:Ne.union([Ne.literal("true"),Ne.literal("false")]).optional().transform(l=>l==="true")},runtimeEnv:k1,emptyStringAsUndefined:!0}),pf=Bu(mf.VITE_BACKEND_ORIGIN,{auth:l=>{const n=Ao(Xi);n&&l(n)},autoConnect:!1}).on("connect",()=>{console.log("connected")}).on("connect_error",()=>{console.log("connect_error"),Qo(Xi,null)}),Xi=Zt({key:"auth",default:null,effects:[({onSet:l})=>{l(({newValue:n})=>{n?(localStorage.setItem("username",n.username),localStorage.setItem("sessionKey",n.sessionKey),console.log("connecting..."),pf.connect()):(console.log("clearing session..."),localStorage.removeItem("sessionKey"))})},({setSelf:l})=>{const n=localStorage.getItem("username"),i=localStorage.getItem("sessionKey");n&&i&&l({username:n,sessionKey:i})}]}),ys=Zt({key:"username",default:window.localStorage.getItem("username")??""}),dp=Pa({key:"usernameIssues",get:({get:l})=>{const n=l(ys),i=hf.safeParse(n);return i.success?null:i.error.issues}}),Qi=Zt({key:"password0",default:""}),hp=Pa({key:"password0Issues",get:({get:l})=>{const n=l(Qi),i=yf.safeParse(n);return i.success?null:i.error.issues}}),Vo=Zt({key:"password1",default:""}),yp=Pa({key:"password1Issues",get:({get:l})=>{const n=l(Qi),i=l(Vo),u=Ne.string().refine(c=>c===n,{message:"Passwords do not match."}).safeParse(i);return u.success?null:u.error.issues}}),Lo=Zt({key:"email",default:""}),mp=Pa({key:"emailIssues",get:({get:l})=>{const n=l(Lo),i=fp.safeParse(n);return i.success?null:i.error.issues}}),C1=Pa({key:"signupReady",get:({get:l})=>{const n=l(dp),i=l(hp),u=l(yp),c=l(mp);return!(n??i??u??c)}}),pp=T_({login:null,sign_up:null,game:E_({clicker:null}),admin:null});function D1(l){return A_(pp,l)}const z1=[["login"],["sign_up"]];function U1(l){return z1.some(n=>n.join("/")===l.join("/"))}function gp(l){history.pushState(null,"",l),Qo(vp,l)}const vp=Zt({key:"pathName",default:window.location.pathname,effects:[({onSet:l,setSelf:n})=>{const i=c=>{history.replaceState(null,"",c),n(c)},u=c=>{switch(c){case"/":{const f=Ao(Xi);let d="/login";f&&(d="/game"),i(d);break}case"/login":case"/sign_up":Ao(Xi)&&i("/game")}};u(window.location.pathname),l(({newValue:c})=>{u(c)})},({setSelf:l})=>{document.addEventListener("click",n=>{const i=n.target.closest("a");if(i&&i instanceof HTMLAnchorElement){const u=i.getAttribute("href");u!=null&&u.startsWith("/")&&(n.preventDefault(),history.pushState(null,"",u),l(u))}}),window.addEventListener("popstate",()=>{l(window.location.pathname)})}]}),j1=Pa({key:"route",get:({get:l})=>{const i=l(vp).split("/").slice(1);return D1(i)?U1(i)||l(Xi)?i:401:404}});function B1(){return Z.jsx("article",{children:Z.jsx("h1",{children:"admin"})})}class q1 extends Map{set(n,i){return this.has(n)?(console.warn("Tried to set a key that already exists in an InvariantMap",{key:n,value:i}),this):super.set(n,i)}clear(){throw new Error("Cannot clear an InvariantMap")}}const Pl=class Pl{constructor(n){U(this,"type","continuity");U(this,"globals",[]);U(this,"actions",[]);U(this,"perspectives",[]);this.key=n}static create(n,i){const u=new Pl(n),{type:c,globals:f,actions:d,perspectives:m}=i(u),p={type:c,key:n,globals:f,actions:d,perspectives:m};return Pl.existing.set(n,p),p}add(...n){switch(n[0].type){case"atom":case"mutable_atom":this.globals.push(...n);break;case"transaction":this.actions.push(...n);break;case"atom_family":{const[u,c]=n;this.perspectives.push({type:"realtime_perspective",resourceAtoms:u,viewAtoms:c})}break}return this}};U(Pl,"existing",new q1);let Ko=Pl;function Z1(l){const{key:n,config:i}=l,u=Ko.create(n,i),{actions:c}=u;for(const f of c)Mm(n,f.key,st.STORE);return Ro(n,-1,st.STORE),u}Zt({key:"usersInRoomIndex",mutable:!0,default:()=>new gn,toJson:l=>l.toJSON(),fromJson:l=>gn.fromJSON(l)});Zt({key:"roomIndex",default:()=>new gn,mutable:!0,toJson:l=>l.toJSON(),fromJson:l=>gn.fromJSON(l)});const H1={enteredAtEpoch:0},V1=mb({key:"usersInRooms",between:["room","user"],cardinality:"1:n",isAType:l=>typeof l=="string",isBType:l=>typeof l=="string"},H1);tb({key:"usersInMyRoomView",get:l=>({find:n})=>{const i=bb(V1);return[n(i,l)]}});const gf=Zt({key:"count",default:0}),bp=nb({key:"incrementTX",do:({set:l})=>{l(gf,n=>n+1)}}),L1=Z1({key:"countContinuity",config:l=>l.add(gf).add(bp)});function K1({route:[l]}){return Z.jsx("article",{children:l?Z.jsx($1,{gameId:l}):Z.jsx(Y1,{})})}function Y1(){return Z.jsx("nav",{children:Z.jsx(Wu,{href:"/game/clicker",children:"Clicker"})})}Em(pp[1].game[1]);function $1({gameId:l}){console.log(l);const n=Bt(gf),i=ab(bp);return a0(L1),Z.jsxs("article",{children:[Z.jsxs("button",{type:"button",onClick:()=>{i()},children:["count is ",n]}),Z.jsx("p",{children:"Let's see how high we can count!"})]})}async function G1(l,n="SHA-256"){const u=new TextEncoder().encode(l),c=await crypto.subtle.digest(n,u);return Array.from(new Uint8Array(c)).map(d=>d.toString(16).padStart(2,"0")).join("")}async function _p(l){const n=await G1(l);return`${n.substring(0,8)}-${n.substring(8,12)}-${n.substring(12,16)}-${n.substring(16,20)}-${n.substring(20,32)}`}function X1(){const l=Ya(ys),n=Ya(Qi),i=Bt(ys),u=Bt(Qi),[c,f]=mt.useState(null);return Z.jsxs("form",{onSubmit:async d=>{d.preventDefault();const m=await _p("login"),p=await fetch(`${mf.VITE_BACKEND_ORIGIN}/login-${m}`,{method:"POST",body:JSON.stringify({username:i,password:u})});if(console.log(p),p.status===200){l(""),n("");const y=await p.text(),[,b]=y.split(" ");Qo(Xi,{username:i,sessionKey:b}),pf.once("connect",()=>{gp("/game")})}if(p.status>=400){const y=await p.text();f(y)}},children:[Z.jsxs("main",{children:[c?Z.jsx("aside",{children:c}):null,Z.jsxs("label",{htmlFor:"username",children:[Z.jsx("span",{children:"Username"}),Z.jsx("input",{id:"username",type:"text",value:i,onChange:d=>{l(d.target.value)},autoComplete:"username",autoCapitalize:"none"})]}),Z.jsxs("label",{htmlFor:"password",children:[Z.jsx("span",{children:"Password"}),Z.jsx("input",{id:"password",type:"password",value:u,onChange:d=>{n(d.target.value)},autoComplete:"current-password",autoCapitalize:"none"})]}),Z.jsx("button",{type:"submit",disabled:!i||!u,children:"->"})]}),Z.jsx("footer",{children:Z.jsxs(Wu,{href:"/sign_up",children:["New here? ",Z.jsx("u",{children:"Sign up"})," for an account."]})})]})}function Q1(){const l=Ya(ys),n=Ya(Qi),i=Ya(Vo),u=Ya(Lo),c=Bt(ys),f=Bt(Qi),d=Bt(Vo),m=Bt(Lo),p=Bt(dp),y=Bt(hp),b=Bt(yp),O=Bt(mp),k=Bt(C1),[C,te]=mt.useState(null);return Z.jsxs("form",{onSubmit:async L=>{L.preventDefault();const Q=f,G=await _p("sign-up"),P=await fetch(`${mf.VITE_BACKEND_ORIGIN}/sign-up-${G}`,{method:"POST",body:JSON.stringify({username:c,password:Q,email:m})});if(P.status===201&&(i(""),u(""),gp("/login")),P.status>=400){const ye=await P.text();te(ye)}},children:[Z.jsxs("main",{children:[C?Z.jsx("aside",{children:C}):null,Z.jsxs("label",{htmlFor:"username",children:[Z.jsx("span",{children:"Username"}),Z.jsx("input",{id:"username",type:"text",value:c,onChange:L=>{l(L.target.value)},autoComplete:"username",autoCapitalize:"none",style:{"--energy-color":c?p?"red":"green":void 0}}),c&&p?Z.jsx("aside",{children:p.map(L=>Z.jsx("span",{children:L.message},L.path.join(".")))}):null]}),Z.jsxs("label",{htmlFor:"password",children:[Z.jsx("span",{children:"Password"}),Z.jsx("input",{id:"password0",type:"password",value:f,onChange:L=>{n(L.target.value)},autoComplete:"new-password",autoCapitalize:"none",style:{"--energy-color":f?y?"red":"green":void 0}}),f&&y?Z.jsx("aside",{children:y.map(L=>Z.jsx("span",{children:L.message},L.path.join(".")))}):null]}),Z.jsxs("label",{htmlFor:"password",children:[Z.jsx("span",{children:"Confirm Password"}),Z.jsx("input",{id:"password1",type:"password",value:d,onChange:L=>{i(L.target.value)},autoComplete:"new-password",autoCapitalize:"none",style:{"--energy-color":d?b?"red":"green":void 0}}),d&&b?Z.jsx("aside",{children:b.map(L=>Z.jsx("span",{children:L.message},L.path.join(".")))}):null]}),Z.jsxs("label",{htmlFor:"email",children:[Z.jsx("span",{children:"Email"}),Z.jsx("input",{id:"email",type:"email",value:m,onChange:L=>{u(L.target.value)},autoComplete:"email",autoCapitalize:"none",style:{"--energy-color":m?O?"red":"green":void 0}}),m&&O?Z.jsx("aside",{children:O.map(L=>Z.jsx("span",{children:L.message},L.path.join(".")))}):null]}),Z.jsx("button",{type:"submit",disabled:!k,children:"->"})]}),Z.jsx("footer",{children:Z.jsxs(Wu,{href:"/login",children:["Already have an account? ",Z.jsx("u",{children:"Log in"})," instead."]})})]})}function J1(){const l=Bt(j1);return Z.jsxs("main",{className:S_.class,children:[Z.jsx("header",{children:Z.jsx(__,{})}),Z.jsx("main",{children:typeof l=="number"?Z.jsxs("article",{children:[Z.jsx("h1",{children:l}),Z.jsx("h2",{children:Wm[l]}),Z.jsx(Wu,{href:"/login",children:"Return to Home Page"})]}):(()=>{const[n,...i]=l;switch(n){case"admin":return Z.jsx(B1,{});case"login":return Z.jsx(X1,{});case"sign_up":return Z.jsx(Q1,{});case"game":return Z.jsx(K1,{route:i})}})()})]})}o0.createRoot(document.getElementById("root")).render(Z.jsx(mt.StrictMode,{children:Z.jsx(Wb,{socket:pf,children:Z.jsx(J1,{})})}));