var Gj=e=>{throw TypeError(e)};var Pv=(e,t,n)=>t.has(e)||Gj("Cannot "+n);var P=(e,t,n)=>(Pv(e,t,"read from private field"),n?n.call(e):t.get(e)),ce=(e,t,n)=>t.has(e)?Gj("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),J=(e,t,n,r)=>(Pv(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Ae=(e,t,n)=>(Pv(e,t,"access private method"),n);var qd=(e,t,n,r)=>({set _(a){J(e,t,a,n)},get _(){return P(e,t,r)}});(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(a){if(a.ep)return;a.ep=!0;const i=n(a);fetch(a.href,i)}})();var Vd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ze(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var UC={exports:{}},ny={};/** * @license React * react-jsx-runtime.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var ZL=Symbol.for("react.transitional.element"),JL=Symbol.for("react.fragment");function qC(e,t,n){var r=null;if(n!==void 0&&(r=""+n),t.key!==void 0&&(r=""+t.key),"key"in t){n={};for(var a in t)a!=="key"&&(n[a]=t[a])}else n=t;return t=n.ref,{$$typeof:ZL,type:e,key:r,ref:t!==void 0?t:null,props:n}}ny.Fragment=JL;ny.jsx=qC;ny.jsxs=qC;UC.exports=ny;var u=UC.exports,VC={exports:{}},ve={};/** * @license React * react.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var _1=Symbol.for("react.transitional.element"),e6=Symbol.for("react.portal"),t6=Symbol.for("react.fragment"),n6=Symbol.for("react.strict_mode"),r6=Symbol.for("react.profiler"),a6=Symbol.for("react.consumer"),i6=Symbol.for("react.context"),s6=Symbol.for("react.forward_ref"),o6=Symbol.for("react.suspense"),l6=Symbol.for("react.memo"),HC=Symbol.for("react.lazy"),c6=Symbol.for("react.activity"),Kj=Symbol.iterator;function u6(e){return e===null||typeof e!="object"?null:(e=Kj&&e[Kj]||e["@@iterator"],typeof e=="function"?e:null)}var FC={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},GC=Object.assign,KC={};function mc(e,t,n){this.props=e,this.context=t,this.refs=KC,this.updater=n||FC}mc.prototype.isReactComponent={};mc.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};mc.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function YC(){}YC.prototype=mc.prototype;function C1(e,t,n){this.props=e,this.context=t,this.refs=KC,this.updater=n||FC}var P1=C1.prototype=new YC;P1.constructor=C1;GC(P1,mc.prototype);P1.isPureReactComponent=!0;var Yj=Array.isArray;function vb(){}var rt={H:null,A:null,T:null,S:null},XC=Object.prototype.hasOwnProperty;function M1(e,t,n){var r=n.ref;return{$$typeof:_1,type:e,key:t,ref:r!==void 0?r:null,props:n}}function f6(e,t){return M1(e.type,t,e.props)}function R1(e){return typeof e=="object"&&e!==null&&e.$$typeof===_1}function d6(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Xj=/\/+/g;function Mv(e,t){return typeof e=="object"&&e!==null&&e.key!=null?d6(""+e.key):t.toString(36)}function h6(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(vb,vb):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Mo(e,t,n,r,a){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(i){case"bigint":case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case _1:case e6:s=!0;break;case HC:return s=e._init,Mo(s(e._payload),t,n,r,a)}}if(s)return a=a(e),s=r===""?"."+Mv(e,0):r,Yj(a)?(n="",s!=null&&(n=s.replace(Xj,"$&/")+"/"),Mo(a,t,n,"",function(c){return c})):a!=null&&(R1(a)&&(a=f6(a,n+(a.key==null||e&&e.key===a.key?"":(""+a.key).replace(Xj,"$&/")+"/")+s)),t.push(a)),1;s=0;var o=r===""?".":r+":";if(Yj(e))for(var l=0;l>>1,H=R[V];if(0>>1;Va(re,B))eea(be,re)?(R[V]=be,R[ee]=B,V=ee):(R[V]=re,R[Y]=B,V=Y);else if(eea(be,B))R[V]=be,R[ee]=B,V=ee;else break e}}return $}function a(R,$){var B=R.sortIndex-$.sortIndex;return B!==0?B:R.id-$.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,o=s.now();e.unstable_now=function(){return s.now()-o}}var l=[],c=[],f=1,d=null,h=3,p=!1,v=!1,y=!1,b=!1,m=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;function w(R){for(var $=n(c);$!==null;){if($.callback===null)r(c);else if($.startTime<=R)r(c),$.sortIndex=$.expirationTime,t(l,$);else break;$=n(c)}}function S(R){if(y=!1,w(R),!v)if(n(l)!==null)v=!0,j||(j=!0,C());else{var $=n(c);$!==null&&k(S,$.startTime-R)}}var j=!1,O=-1,E=5,T=-1;function _(){return b?!0:!(e.unstable_now()-TR&&_());){var V=d.callback;if(typeof V=="function"){d.callback=null,h=d.priorityLevel;var H=V(d.expirationTime<=R);if(R=e.unstable_now(),typeof H=="function"){d.callback=H,w(R),$=!0;break t}d===n(l)&&r(l),w(R)}else r(l);d=n(l)}if(d!==null)$=!0;else{var Q=n(c);Q!==null&&k(S,Q.startTime-R),$=!1}}break e}finally{d=null,h=B,p=!1}$=void 0}}finally{$?C():j=!1}}}var C;if(typeof x=="function")C=function(){x(M)};else if(typeof MessageChannel<"u"){var z=new MessageChannel,L=z.port2;z.port1.onmessage=M,C=function(){L.postMessage(null)}}else C=function(){m(M,0)};function k(R,$){O=m(function(){R(e.unstable_now())},$)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(R){R.callback=null},e.unstable_forceFrameRate=function(R){0>R||125V?(R.sortIndex=B,t(c,R),n(l)===null&&R===n(c)&&(y?(g(O),O=-1):y=!0,k(S,B-V))):(R.sortIndex=H,t(l,R),v||p||(v=!0,j||(j=!0,C()))),R},e.unstable_shouldYield=_,e.unstable_wrapCallback=function(R){var $=h;return function(){var B=h;h=$;try{return R.apply(this,arguments)}finally{h=B}}}})(ZC);QC.exports=ZC;var y6=QC.exports,JC={exports:{}},yn={};/** * @license React * react-dom.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var v6=A;function eP(e){var t="https://react.dev/errors/"+e;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(tP)}catch(e){console.error(e)}}tP(),JC.exports=yn;var x6=JC.exports;/** * @license React * react-dom-client.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var $t=y6,nP=A,S6=x6;function U(e){var t="https://react.dev/errors/"+e;if(1ko||(e.current=jb[ko],jb[ko]=null,ko--)}function Qe(e,t){ko++,jb[ko]=e.current,e.current=t}var Jr=oa(null),Yu=oa(null),Pi=oa(null),op=oa(null);function lp(e,t){switch(Qe(Pi,t),Qe(Yu,e),Qe(Jr,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?aA(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=aA(t),e=NR(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Ht(Jr),Qe(Jr,e)}function Tl(){Ht(Jr),Ht(Yu),Ht(Pi)}function Ab(e){e.memoizedState!==null&&Qe(op,e);var t=Jr.current,n=NR(t,e.type);t!==n&&(Qe(Yu,e),Qe(Jr,n))}function cp(e){Yu.current===e&&(Ht(Jr),Ht(Yu)),op.current===e&&(Ht(op),sf._currentValue=Ls)}var Rv,Jj;function cs(e){if(Rv===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Rv=t&&t[1]||"",Jj=-1)":-1a||l[r]!==c[a]){var f=` `+l[r].replace(" at new "," at ");return e.displayName&&f.includes("")&&(f=f.replace("",e.displayName)),f}while(1<=r&&0<=a);break}}}finally{Dv=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?cs(n):""}function E6(e,t){switch(e.tag){case 26:case 27:case 5:return cs(e.type);case 16:return cs("Lazy");case 13:return e.child!==t&&t!==null?cs("Suspense Fallback"):cs("Suspense");case 19:return cs("SuspenseList");case 0:case 15:return $v(e.type,!1);case 11:return $v(e.type.render,!1);case 1:return $v(e.type,!0);case 31:return cs("Activity");default:return""}}function e2(e){try{var t="",n=null;do t+=E6(e,n),n=e,e=e.return;while(e);return t}catch(r){return` Error generating stack: `+r.message+` `+r.stack}}var Ob=Object.prototype.hasOwnProperty,k1=$t.unstable_scheduleCallback,kv=$t.unstable_cancelCallback,T6=$t.unstable_shouldYield,N6=$t.unstable_requestPaint,Vn=$t.unstable_now,_6=$t.unstable_getCurrentPriorityLevel,cP=$t.unstable_ImmediatePriority,uP=$t.unstable_UserBlockingPriority,up=$t.unstable_NormalPriority,C6=$t.unstable_LowPriority,fP=$t.unstable_IdlePriority,P6=$t.log,M6=$t.unstable_setDisableYieldValue,ld=null,Hn=null;function Ai(e){if(typeof P6=="function"&&M6(e),Hn&&typeof Hn.setStrictMode=="function")try{Hn.setStrictMode(ld,e)}catch{}}var Fn=Math.clz32?Math.clz32:$6,R6=Math.log,D6=Math.LN2;function $6(e){return e>>>=0,e===0?32:31-(R6(e)/D6|0)|0}var Gd=256,Kd=262144,Yd=4194304;function us(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function iy(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var a=0,i=e.suspendedLanes,s=e.pingedLanes;e=e.warmLanes;var o=r&134217727;return o!==0?(r=o&~i,r!==0?a=us(r):(s&=o,s!==0?a=us(s):n||(n=o&~e,n!==0&&(a=us(n))))):(o=r&~i,o!==0?a=us(o):s!==0?a=us(s):n||(n=r&~e,n!==0&&(a=us(n)))),a===0?0:t!==0&&t!==a&&!(t&i)&&(i=a&-a,n=t&-t,i>=n||i===32&&(n&4194048)!==0)?t:a}function cd(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function k6(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function dP(){var e=Yd;return Yd<<=1,!(Yd&62914560)&&(Yd=4194304),e}function Lv(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ud(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function L6(e,t,n,r,a,i){var s=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var o=e.entanglements,l=e.expirationTimes,c=e.hiddenUpdates;for(n=s&~n;0"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var V6=/[\n"\\]/g;function cr(e){return e.replace(V6,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Nb(e,t,n,r,a,i,s,o){e.name="",s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"?e.type=s:e.removeAttribute("type"),t!=null?s==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+sr(t)):e.value!==""+sr(t)&&(e.value=""+sr(t)):s!=="submit"&&s!=="reset"||e.removeAttribute("value"),t!=null?_b(e,s,sr(t)):n!=null?_b(e,s,sr(n)):r!=null&&e.removeAttribute("value"),a==null&&i!=null&&(e.defaultChecked=!!i),a!=null&&(e.checked=a&&typeof a!="function"&&typeof a!="symbol"),o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.name=""+sr(o):e.removeAttribute("name")}function SP(e,t,n,r,a,i,s,o){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||n!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){Tb(e);return}n=n!=null?""+sr(n):"",t=t!=null?""+sr(t):n,o||t===e.value||(e.value=t),e.defaultValue=t}r=r??a,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=o?e.checked:!!r,e.defaultChecked=!!r,s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.name=s),Tb(e)}function _b(e,t,n){t==="number"&&fp(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function al(e,t,n,r){if(e=e.options,t){t={};for(var a=0;a"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Pb=!1;if(Ia)try{var Hc={};Object.defineProperty(Hc,"passive",{get:function(){Pb=!0}}),window.addEventListener("test",Hc,Hc),window.removeEventListener("test",Hc,Hc)}catch{Pb=!1}var Oi=null,q1=null,kh=null;function EP(){if(kh)return kh;var e,t=q1,n=t.length,r,a="value"in Oi?Oi.value:Oi.textContent,i=a.length;for(e=0;e=wu),f2=" ",d2=!1;function NP(e,t){switch(e){case"keyup":return vz.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _P(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Bo=!1;function bz(e,t){switch(e){case"compositionend":return _P(t);case"keypress":return t.which!==32?null:(d2=!0,f2);case"textInput":return e=t.data,e===f2&&d2?null:e;default:return null}}function xz(e,t){if(Bo)return e==="compositionend"||!H1&&NP(e,t)?(e=EP(),kh=q1=Oi=null,Bo=!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)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=v2(n)}}function RP(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?RP(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function DP(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=fp(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=fp(e.document)}return t}function F1(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Nz=Ia&&"documentMode"in document&&11>=document.documentMode,Io=null,Mb=null,Au=null,Rb=!1;function b2(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Rb||Io==null||Io!==fp(r)||(r=Io,"selectionStart"in r&&F1(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Au&&Qu(Au,r)||(Au=r,r=_p(Mb,"onSelect"),0>=s,a-=s,Gr=1<<32-Fn(t)+a|n<E?(T=O,O=null):T=O.sibling;var _=h(m,O,x[E],w);if(_===null){O===null&&(O=T);break}e&&O&&_.alternate===null&&t(m,O),g=i(_,g,E),j===null?S=_:j.sibling=_,j=_,O=T}if(E===x.length)return n(m,O),Ne&&Sa(m,E),S;if(O===null){for(;EE?(T=O,O=null):T=O.sibling;var M=h(m,O,_.value,w);if(M===null){O===null&&(O=T);break}e&&O&&M.alternate===null&&t(m,O),g=i(M,g,E),j===null?S=M:j.sibling=M,j=M,O=T}if(_.done)return n(m,O),Ne&&Sa(m,E),S;if(O===null){for(;!_.done;E++,_=x.next())_=d(m,_.value,w),_!==null&&(g=i(_,g,E),j===null?S=_:j.sibling=_,j=_);return Ne&&Sa(m,E),S}for(O=r(O);!_.done;E++,_=x.next())_=p(O,m,E,_.value,w),_!==null&&(e&&_.alternate!==null&&O.delete(_.key===null?E:_.key),g=i(_,g,E),j===null?S=_:j.sibling=_,j=_);return e&&O.forEach(function(C){return t(m,C)}),Ne&&Sa(m,E),S}function b(m,g,x,w){if(typeof x=="object"&&x!==null&&x.type===$o&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Fd:e:{for(var S=x.key;g!==null;){if(g.key===S){if(S=x.type,S===$o){if(g.tag===7){n(m,g.sibling),w=a(g,x.props.children),w.return=m,m=w;break e}}else if(g.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===li&&fs(S)===g.type){n(m,g.sibling),w=a(g,x.props),Gc(w,x),w.return=m,m=w;break e}n(m,g);break}else t(m,g);g=g.sibling}x.type===$o?(w=zs(x.props.children,m.mode,w,x.key),w.return=m,m=w):(w=zh(x.type,x.key,x.props,null,m.mode,w),Gc(w,x),w.return=m,m=w)}return s(m);case fu:e:{for(S=x.key;g!==null;){if(g.key===S)if(g.tag===4&&g.stateNode.containerInfo===x.containerInfo&&g.stateNode.implementation===x.implementation){n(m,g.sibling),w=a(g,x.children||[]),w.return=m,m=w;break e}else{n(m,g);break}else t(m,g);g=g.sibling}w=Gv(x,m.mode,w),w.return=m,m=w}return s(m);case li:return x=fs(x),b(m,g,x,w)}if(du(x))return v(m,g,x,w);if(Vc(x)){if(S=Vc(x),typeof S!="function")throw Error(U(150));return x=S.call(x),y(m,g,x,w)}if(typeof x.then=="function")return b(m,g,Zd(x),w);if(x.$$typeof===Oa)return b(m,g,Qd(m,x),w);Jd(m,x)}return typeof x=="string"&&x!==""||typeof x=="number"||typeof x=="bigint"?(x=""+x,g!==null&&g.tag===6?(n(m,g.sibling),w=a(g,x),w.return=m,m=w):(n(m,g),w=Fv(x,m.mode,w),w.return=m,m=w),s(m)):n(m,g)}return function(m,g,x,w){try{ef=0;var S=b(m,g,x,w);return ol=null,S}catch(O){if(O===bc||O===fy)throw O;var j=In(29,O,null,m.mode);return j.lanes=w,j.return=m,j}finally{}}}var Xs=XP(!0),WP=XP(!1),ci=!1;function eS(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ib(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 Ri(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Di(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Me&2){var a=r.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),r.pending=t,t=hp(e),UP(e,null,n),t}return uy(e,r,t,n),hp(e)}function Eu(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,pP(e,n)}}function Yv(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var a=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var s={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};i===null?a=i=s:i=i.next=s,n=n.next}while(n!==null);i===null?a=i=t:i=i.next=t}else a=i=t;n={baseState:r.baseState,firstBaseUpdate:a,lastBaseUpdate:i,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ub=!1;function Tu(){if(Ub){var e=sl;if(e!==null)throw e}}function Nu(e,t,n,r){Ub=!1;var a=e.updateQueue;ci=!1;var i=a.firstBaseUpdate,s=a.lastBaseUpdate,o=a.shared.pending;if(o!==null){a.shared.pending=null;var l=o,c=l.next;l.next=null,s===null?i=c:s.next=c,s=l;var f=e.alternate;f!==null&&(f=f.updateQueue,o=f.lastBaseUpdate,o!==s&&(o===null?f.firstBaseUpdate=c:o.next=c,f.lastBaseUpdate=l))}if(i!==null){var d=a.baseState;s=0,f=c=l=null,o=i;do{var h=o.lane&-536870913,p=h!==o.lane;if(p?(Ee&h)===h:(r&h)===h){h!==0&&h===Cl&&(Ub=!0),f!==null&&(f=f.next={lane:0,tag:o.tag,payload:o.payload,callback:null,next:null});e:{var v=e,y=o;h=t;var b=n;switch(y.tag){case 1:if(v=y.payload,typeof v=="function"){d=v.call(b,d,h);break e}d=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=y.payload,h=typeof v=="function"?v.call(b,d,h):v,h==null)break e;d=at({},d,h);break e;case 2:ci=!0}}h=o.callback,h!==null&&(e.flags|=64,p&&(e.flags|=8192),p=a.callbacks,p===null?a.callbacks=[h]:p.push(h))}else p={lane:h,tag:o.tag,payload:o.payload,callback:o.callback,next:null},f===null?(c=f=p,l=d):f=f.next=p,s|=h;if(o=o.next,o===null){if(o=a.shared.pending,o===null)break;p=o,o=p.next,p.next=null,a.lastBaseUpdate=p,a.shared.pending=null}}while(!0);f===null&&(l=d),a.baseState=l,a.firstBaseUpdate=c,a.lastBaseUpdate=f,i===null&&(a.shared.lanes=0),Ki|=s,e.lanes=s,e.memoizedState=d}}function QP(e,t){if(typeof e!="function")throw Error(U(191,e));e.call(t)}function ZP(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ei?i:8;var s=he.T,o={};he.T=o,hS(e,!1,t,n);try{var l=a(),c=he.S;if(c!==null&&c(o,l),l!==null&&typeof l=="object"&&typeof l.then=="function"){var f=Lz(l,r);_u(e,t,f,Gn(e))}else _u(e,t,r,Gn(e))}catch(d){_u(e,t,{then:function(){},status:"rejected",reason:d},Gn())}finally{De.p=i,s!==null&&o.types!==null&&(s.types=o.types),he.T=s}}function Vz(){}function Gb(e,t,n,r){if(e.tag!==5)throw Error(U(476));var a=jM(e).queue;wM(e,a,t,Ls,n===null?Vz:function(){return AM(e),n(r)})}function jM(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Ls,baseState:Ls,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:qa,lastRenderedState:Ls},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:qa,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function AM(e){var t=jM(e);t.next===null&&(t=e.alternate.memoizedState),_u(e,t.next.queue,{},Gn())}function dS(){return Jt(sf)}function OM(){return St().memoizedState}function EM(){return St().memoizedState}function Hz(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Gn();e=Ri(n);var r=Di(t,e,n);r!==null&&(En(r,t,n),Eu(r,t,n)),t={cache:Q1()},e.payload=t;return}t=t.return}}function Fz(e,t,n){var r=Gn();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},my(e)?NM(t,n):(n=K1(e,t,n,r),n!==null&&(En(n,e,r),_M(n,t,r)))}function TM(e,t,n){var r=Gn();_u(e,t,n,r)}function _u(e,t,n,r){var a={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(my(e))NM(t,a);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,o=i(s,n);if(a.hasEagerState=!0,a.eagerState=o,Xn(o,s))return uy(e,t,a,0),Ke===null&&cy(),!1}catch{}finally{}if(n=K1(e,t,a,r),n!==null)return En(n,e,r),_M(n,t,r),!0}return!1}function hS(e,t,n,r){if(r={lane:2,revertLane:wS(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},my(e)){if(t)throw Error(U(479))}else t=K1(e,n,r,2),t!==null&&En(t,e,2)}function my(e){var t=e.alternate;return e===ge||t!==null&&t===ge}function NM(e,t){ll=bp=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function _M(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,pP(e,n)}}var nf={readContext:Jt,use:hy,useCallback:ht,useContext:ht,useEffect:ht,useImperativeHandle:ht,useLayoutEffect:ht,useInsertionEffect:ht,useMemo:ht,useReducer:ht,useRef:ht,useState:ht,useDebugValue:ht,useDeferredValue:ht,useTransition:ht,useSyncExternalStore:ht,useId:ht,useHostTransitionStatus:ht,useFormState:ht,useActionState:ht,useOptimistic:ht,useMemoCache:ht,useCacheRefresh:ht};nf.useEffectEvent=ht;var CM={readContext:Jt,use:hy,useCallback:function(e,t){return cn().memoizedState=[e,t===void 0?null:t],e},useContext:Jt,useEffect:D2,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Uh(4194308,4,vM.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Uh(4194308,4,e,t)},useInsertionEffect:function(e,t){Uh(4,2,e,t)},useMemo:function(e,t){var n=cn();t=t===void 0?null:t;var r=e();if(Ws){Ai(!0);try{e()}finally{Ai(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=cn();if(n!==void 0){var a=n(t);if(Ws){Ai(!0);try{n(t)}finally{Ai(!1)}}}else a=t;return r.memoizedState=r.baseState=a,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},r.queue=e,e=e.dispatch=Fz.bind(null,ge,e),[r.memoizedState,e]},useRef:function(e){var t=cn();return e={current:e},t.memoizedState=e},useState:function(e){e=Hb(e);var t=e.queue,n=TM.bind(null,ge,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:uS,useDeferredValue:function(e,t){var n=cn();return fS(n,e,t)},useTransition:function(){var e=Hb(!1);return e=wM.bind(null,ge,e.queue,!0,!1),cn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=ge,a=cn();if(Ne){if(n===void 0)throw Error(U(407));n=n()}else{if(n=t(),Ke===null)throw Error(U(349));Ee&127||rM(r,t,n)}a.memoizedState=n;var i={value:n,getSnapshot:t};return a.queue=i,D2(iM.bind(null,r,i,e),[e]),r.flags|=2048,Ml(9,{destroy:void 0},aM.bind(null,r,i,n,t),null),n},useId:function(){var e=cn(),t=Ke.identifierPrefix;if(Ne){var n=Kr,r=Gr;n=(r&~(1<<32-Fn(r)-1)).toString(32)+n,t="_"+t+"R_"+n,n=xp++,0<\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof r.is=="string"?s.createElement("select",{is:r.is}):s.createElement("select"),r.multiple?i.multiple=!0:r.size&&(i.size=r.size);break;default:i=typeof r.is=="string"?s.createElement(a,{is:r.is}):s.createElement(a)}}i[Wt]=t,i[Nn]=r;e:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)i.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break e;for(;s.sibling===null;){if(s.return===null||s.return===t)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=i;e:switch(en(i,a,r),a){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&pa(t)}}return Je(t),ng(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&pa(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(U(166));if(e=Pi.current,Ao(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Qt,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[Wt]=t,e=!!(e.nodeValue===n||r!==null&&r.suppressHydrationWarning===!0||TR(e.nodeValue,n)),e||Fi(t,!0)}else e=Cp(e).createTextNode(r),e[Wt]=t,t.stateNode=e}return Je(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ao(t),n!==null){if(e===null){if(!r)throw Error(U(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(U(557));e[Wt]=t}else Ks(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Je(t),e=!1}else n=Kv(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Bn(t),t):(Bn(t),null);if(t.flags&128)throw Error(U(558))}return Je(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ao(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(U(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(U(317));a[Wt]=t}else Ks(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Je(t),a=!1}else a=Kv(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Bn(t),t):(Bn(t),null)}return Bn(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),i=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(i=r.memoizedState.cachePool.pool),i!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),eh(t,t.updateQueue),Je(t),null);case 4:return Tl(),e===null&&jS(t.stateNode.containerInfo),Je(t),null;case 10:return Ra(t.type),Je(t),null;case 19:if(Ht(bt),r=t.memoizedState,r===null)return Je(t),null;if(a=(t.flags&128)!==0,i=r.rendering,i===null)if(a)Kc(r,!1);else{if(vt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=gp(e),i!==null){for(t.flags|=128,Kc(r,!1),e=i.updateQueue,t.updateQueue=e,eh(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)qP(n,e),n=n.sibling;return Qe(bt,bt.current&1|2),Ne&&Sa(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Vn()>Ap&&(t.flags|=128,a=!0,Kc(r,!1),t.lanes=4194304)}else{if(!a)if(e=gp(i),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,eh(t,e),Kc(r,!0),r.tail===null&&r.tailMode==="hidden"&&!i.alternate&&!Ne)return Je(t),null}else 2*Vn()-r.renderingStartTime>Ap&&n!==536870912&&(t.flags|=128,a=!0,Kc(r,!1),t.lanes=4194304);r.isBackwards?(i.sibling=t.child,t.child=i):(e=r.last,e!==null?e.sibling=i:t.child=i,r.last=i)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Vn(),e.sibling=null,n=bt.current,Qe(bt,a?n&1|2:n&1),Ne&&Sa(t,r.treeForkCount),e):(Je(t),null);case 22:case 23:return Bn(t),tS(),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Je(t),t.subtreeFlags&6&&(t.flags|=8192)):Je(t),n=t.updateQueue,n!==null&&eh(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&Ht(Bs),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ra(Et),Je(t),null;case 25:return null;case 30:return null}throw Error(U(156,t.tag))}function Wz(e,t){switch(W1(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ra(Et),Tl(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return cp(t),null;case 31:if(t.memoizedState!==null){if(Bn(t),t.alternate===null)throw Error(U(340));Ks()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Bn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(U(340));Ks()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ht(bt),null;case 4:return Tl(),null;case 10:return Ra(t.type),null;case 22:case 23:return Bn(t),tS(),e!==null&&Ht(Bs),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ra(Et),null;case 25:return null;default:return null}}function qM(e,t){switch(W1(t),t.tag){case 3:Ra(Et),Tl();break;case 26:case 27:case 5:cp(t);break;case 4:Tl();break;case 31:t.memoizedState!==null&&Bn(t);break;case 13:Bn(t);break;case 19:Ht(bt);break;case 10:Ra(t.type);break;case 22:case 23:Bn(t),tS(),e!==null&&Ht(Bs);break;case 24:Ra(Et)}}function md(e,t){try{var n=t.updateQueue,r=n!==null?n.lastEffect:null;if(r!==null){var a=r.next;n=a;do{if((n.tag&e)===e){r=void 0;var i=n.create,s=n.inst;r=i(),s.destroy=r}n=n.next}while(n!==a)}}catch(o){Ie(t,t.return,o)}}function Gi(e,t,n){try{var r=t.updateQueue,a=r!==null?r.lastEffect:null;if(a!==null){var i=a.next;r=i;do{if((r.tag&e)===e){var s=r.inst,o=s.destroy;if(o!==void 0){s.destroy=void 0,a=t;var l=n,c=o;try{c()}catch(f){Ie(a,l,f)}}}r=r.next}while(r!==i)}}catch(f){Ie(t,t.return,f)}}function VM(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{ZP(t,n)}catch(r){Ie(e,e.return,r)}}}function HM(e,t,n){n.props=Qs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(r){Ie(e,t,r)}}function Cu(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n=="function"?e.refCleanup=n(r):n.current=r}}catch(a){Ie(e,t,a)}}function Yr(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r=="function")try{r()}catch(a){Ie(e,t,a)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(a){Ie(e,t,a)}else n.current=null}function FM(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(a){Ie(e,e.return,a)}}function rg(e,t,n){try{var r=e.stateNode;g8(r,e.type,n,t),r[Nn]=t}catch(a){Ie(e,e.return,a)}}function GM(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Wi(e.type)||e.tag===4}function ag(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||GM(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Wi(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Qb(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ea));else if(r!==4&&(r===27&&Wi(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Qb(e,t,n),e=e.sibling;e!==null;)Qb(e,t,n),e=e.sibling}function jp(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Wi(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(jp(e,t,n),e=e.sibling;e!==null;)jp(e,t,n),e=e.sibling}function KM(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);en(t,r,n),t[Wt]=e,t[Nn]=n}catch(i){Ie(e,e.return,i)}}var Aa=!1,Ot=!1,ig=!1,K2=typeof WeakSet=="function"?WeakSet:Set,Ut=null;function Qz(e,t){if(e=e.containerInfo,a0=Dp,e=DP(e),F1(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,o=-1,l=-1,c=0,f=0,d=e,h=null;t:for(;;){for(var p;d!==n||a!==0&&d.nodeType!==3||(o=s+a),d!==i||r!==0&&d.nodeType!==3||(l=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(p=d.firstChild)!==null;)h=d,d=p;for(;;){if(d===e)break t;if(h===n&&++c===a&&(o=s),h===i&&++f===r&&(l=s),(p=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=p}n=o===-1||l===-1?null:{start:o,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(i0={focusedElem:e,selectionRange:n},Dp=!1,Ut=t;Ut!==null;)if(t=Ut,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ut=e;else for(;Ut!==null;){switch(t=Ut,i=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n title"))),en(i,r,n),i[Wt]=e,qt(i),r=i;break e;case"link":var s=hA("link","href",a).get(r+(n.href||""));if(s){for(var o=0;ob&&(s=b,b=y,y=s);var m=g2(o,y),g=g2(o,b);if(m&&g&&(p.rangeCount!==1||p.anchorNode!==m.node||p.anchorOffset!==m.offset||p.focusNode!==g.node||p.focusOffset!==g.offset)){var x=d.createRange();x.setStart(m.node,m.offset),p.removeAllRanges(),y>b?(p.addRange(x),p.extend(g.node,g.offset)):(x.setEnd(g.node,g.offset),p.addRange(x))}}}}for(d=[],p=o;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;on?32:n,he.T=null,n=e0,e0=null;var i=ki,s=Da;if(Mt=0,Dl=ki=null,Da=0,Me&6)throw Error(U(331));var o=Me;if(Me|=4,aR(i.current),tR(i,i.current,s,n),Me=o,yd(0,!1),Hn&&typeof Hn.onPostCommitFiberRoot=="function")try{Hn.onPostCommitFiberRoot(ld,i)}catch{}return!0}finally{De.p=a,he.T=r,bR(e,t)}}function Q2(e,t,n){t=ur(n,t),t=Yb(e.stateNode,t,2),e=Di(e,t,2),e!==null&&(ud(e,2),la(e))}function Ie(e,t,n){if(e.tag===3)Q2(e,e,n);else for(;t!==null;){if(t.tag===3){Q2(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&($i===null||!$i.has(r))){e=ur(n,e),n=$M(2),r=Di(t,n,2),r!==null&&(kM(n,r,t,e),ud(r,2),la(r));break}}t=t.return}}function og(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new e8;var a=new Set;r.set(t,a)}else a=r.get(t),a===void 0&&(a=new Set,r.set(t,a));a.has(n)||(bS=!0,a.add(n),e=i8.bind(null,e,t,n),t.then(e,e))}function i8(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ke===e&&(Ee&n)===n&&(vt===4||vt===3&&(Ee&62914560)===Ee&&300>Vn()-yy?!(Me&2)&&$l(e,0):xS|=n,Rl===Ee&&(Rl=0)),la(e)}function SR(e,t){t===0&&(t=dP()),e=fo(e,t),e!==null&&(ud(e,t),la(e))}function s8(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),SR(e,n)}function o8(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(U(314))}r!==null&&r.delete(t),SR(e,n)}function l8(e,t){return k1(e,t)}var Tp=null,Do=null,n0=!1,Np=!1,lg=!1,Ni=0;function la(e){e!==Do&&e.next===null&&(Do===null?Tp=Do=e:Do=Do.next=e),Np=!0,n0||(n0=!0,u8())}function yd(e,t){if(!lg&&Np){lg=!0;do for(var n=!1,r=Tp;r!==null;){if(e!==0){var a=r.pendingLanes;if(a===0)var i=0;else{var s=r.suspendedLanes,o=r.pingedLanes;i=(1<<31-Fn(42|e)+1)-1,i&=a&~(s&~o),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(n=!0,Z2(r,i))}else i=Ee,i=iy(r,r===Ke?i:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(i&3)||cd(r,i)||(n=!0,Z2(r,i));r=r.next}while(n);lg=!1}}function c8(){wR()}function wR(){Np=n0=!1;var e=0;Ni!==0&&x8()&&(e=Ni);for(var t=Vn(),n=null,r=Tp;r!==null;){var a=r.next,i=jR(r,t);i===0?(r.next=null,n===null?Tp=a:n.next=a,a===null&&(Do=n)):(n=r,(e!==0||i&3)&&(Np=!0)),r=a}Mt!==0&&Mt!==5||yd(e),Ni!==0&&(Ni=0)}function jR(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,a=e.expirationTimes,i=e.pendingLanes&-62914561;0o)break;var f=l.transferSize,d=l.initiatorType;f&&rA(d)&&(l=l.responseEnd,s+=f*(l"u"?null:document;function MR(e,t,n){var r=Sc;if(r&&typeof t=="string"&&t){var a=cr(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof n=="string"&&(a+='[crossorigin="'+n+'"]'),uA.has(a)||(uA.add(a),e={rel:e,crossOrigin:n,href:t},r.querySelector(a)===null&&(t=r.createElement("link"),en(t,"link",e),qt(t),r.head.appendChild(t)))}}function _8(e){Wa.D(e),MR("dns-prefetch",e,null)}function C8(e,t){Wa.C(e,t),MR("preconnect",e,t)}function P8(e,t,n){Wa.L(e,t,n);var r=Sc;if(r&&e&&t){var a='link[rel="preload"][as="'+cr(t)+'"]';t==="image"&&n&&n.imageSrcSet?(a+='[imagesrcset="'+cr(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(a+='[imagesizes="'+cr(n.imageSizes)+'"]')):a+='[href="'+cr(e)+'"]';var i=a;switch(t){case"style":i=kl(e);break;case"script":i=wc(e)}yr.has(i)||(e=at({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),yr.set(i,e),r.querySelector(a)!==null||t==="style"&&r.querySelector(vd(i))||t==="script"&&r.querySelector(gd(i))||(t=r.createElement("link"),en(t,"link",e),qt(t),r.head.appendChild(t)))}}function M8(e,t){Wa.m(e,t);var n=Sc;if(n&&e){var r=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+cr(r)+'"][href="'+cr(e)+'"]',i=a;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=wc(e)}if(!yr.has(i)&&(e=at({rel:"modulepreload",href:e},t),yr.set(i,e),n.querySelector(a)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(gd(i)))return}r=n.createElement("link"),en(r,"link",e),qt(r),n.head.appendChild(r)}}}function R8(e,t,n){Wa.S(e,t,n);var r=Sc;if(r&&e){var a=rl(r).hoistableStyles,i=kl(e);t=t||"default";var s=a.get(i);if(!s){var o={loading:0,preload:null};if(s=r.querySelector(vd(i)))o.loading=5;else{e=at({rel:"stylesheet",href:e,"data-precedence":t},n),(n=yr.get(i))&&AS(e,n);var l=s=r.createElement("link");qt(l),en(l,"link",e),l._p=new Promise(function(c,f){l.onload=c,l.onerror=f}),l.addEventListener("load",function(){o.loading|=1}),l.addEventListener("error",function(){o.loading|=2}),o.loading|=4,Fh(s,t,r)}s={type:"stylesheet",instance:s,count:1,state:o},a.set(i,s)}}}function D8(e,t){Wa.X(e,t);var n=Sc;if(n&&e){var r=rl(n).hoistableScripts,a=wc(e),i=r.get(a);i||(i=n.querySelector(gd(a)),i||(e=at({src:e,async:!0},t),(t=yr.get(a))&&OS(e,t),i=n.createElement("script"),qt(i),en(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(a,i))}}function $8(e,t){Wa.M(e,t);var n=Sc;if(n&&e){var r=rl(n).hoistableScripts,a=wc(e),i=r.get(a);i||(i=n.querySelector(gd(a)),i||(e=at({src:e,async:!0,type:"module"},t),(t=yr.get(a))&&OS(e,t),i=n.createElement("script"),qt(i),en(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(a,i))}}function fA(e,t,n,r){var a=(a=Pi.current)?Pp(a):null;if(!a)throw Error(U(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=kl(n.href),n=rl(a).hoistableStyles,r=n.get(t),r||(r={type:"style",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=kl(n.href);var i=rl(a).hoistableStyles,s=i.get(e);if(s||(a=a.ownerDocument||a,s={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,s),(i=a.querySelector(vd(e)))&&!i._p&&(s.instance=i,s.state.loading=5),yr.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},yr.set(e,n),i||k8(a,e,n,s.state))),t&&r===null)throw Error(U(528,""));return s}if(t&&r!==null)throw Error(U(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=wc(n),n=rl(a).hoistableScripts,r=n.get(t),r||(r={type:"script",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(U(444,e))}}function kl(e){return'href="'+cr(e)+'"'}function vd(e){return'link[rel="stylesheet"]['+e+"]"}function RR(e){return at({},e,{"data-precedence":e.precedence,precedence:null})}function k8(e,t,n,r){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?r.loading=1:(t=e.createElement("link"),r.preload=t,t.addEventListener("load",function(){return r.loading|=1}),t.addEventListener("error",function(){return r.loading|=2}),en(t,"link",n),qt(t),e.head.appendChild(t))}function wc(e){return'[src="'+cr(e)+'"]'}function gd(e){return"script[async]"+e}function dA(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+cr(n.href)+'"]');if(r)return t.instance=r,qt(r),r;var a=at({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),qt(r),en(r,"style",a),Fh(r,n.precedence,e),t.instance=r;case"stylesheet":a=kl(n.href);var i=e.querySelector(vd(a));if(i)return t.state.loading|=4,t.instance=i,qt(i),i;r=RR(n),(a=yr.get(a))&&AS(r,a),i=(e.ownerDocument||e).createElement("link"),qt(i);var s=i;return s._p=new Promise(function(o,l){s.onload=o,s.onerror=l}),en(i,"link",r),t.state.loading|=4,Fh(i,n.precedence,e),t.instance=i;case"script":return i=wc(n.src),(a=e.querySelector(gd(i)))?(t.instance=a,qt(a),a):(r=n,(a=yr.get(i))&&(r=at({},n),OS(r,a)),e=e.ownerDocument||e,a=e.createElement("script"),qt(a),en(a,"link",r),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(U(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Fh(r,n.precedence,e));return t.instance}function Fh(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=r.length?r[r.length-1]:null,i=a,s=0;s title"):null)}function L8(e,t,n){if(n===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 DR(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}function z8(e,t,n,r){if(n.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&!(n.state.loading&4)){if(n.instance===null){var a=kl(r.href),i=t.querySelector(vd(a));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Mp.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=i,qt(i);return}i=t.ownerDocument||t,r=RR(r),(a=yr.get(a))&&AS(r,a),i=i.createElement("link"),qt(i);var s=i;s._p=new Promise(function(o,l){s.onload=o,s.onerror=l}),en(i,"link",r),n.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Mp.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var pg=0;function B8(e,t){return e.stylesheets&&e.count===0&&Kh(e,e.stylesheets),0pg?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(a)}}:null}function Mp(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Kh(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Rp=null;function Kh(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Rp=new Map,t.forEach(I8,e),Rp=null,Mp.call(e))}function I8(e,t){if(!(t.state.loading&4)){var n=Rp.get(e);if(n)var r=n.get(null);else{n=new Map,Rp.set(e,n);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(qR)}catch(e){console.error(e)}}qR(),WC.exports=ry;var Y8=WC.exports;const X8=ze(Y8);var bd=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ns,yi,pl,PC,W8=(PC=class extends bd{constructor(){super();ce(this,Ns);ce(this,yi);ce(this,pl);J(this,pl,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){P(this,yi)||this.setEventListener(P(this,pl))}onUnsubscribe(){var t;this.hasListeners()||((t=P(this,yi))==null||t.call(this),J(this,yi,void 0))}setEventListener(t){var n;J(this,pl,t),(n=P(this,yi))==null||n.call(this),J(this,yi,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){P(this,Ns)!==t&&(J(this,Ns,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof P(this,Ns)=="boolean"?P(this,Ns):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ns=new WeakMap,yi=new WeakMap,pl=new WeakMap,PC),CS=new W8,Q8={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},vi,N1,MC,Z8=(MC=class{constructor(){ce(this,vi,Q8);ce(this,N1,!1)}setTimeoutProvider(e){J(this,vi,e)}setTimeout(e,t){return P(this,vi).setTimeout(e,t)}clearTimeout(e){P(this,vi).clearTimeout(e)}setInterval(e,t){return P(this,vi).setInterval(e,t)}clearInterval(e){P(this,vi).clearInterval(e)}},vi=new WeakMap,N1=new WeakMap,MC),xs=new Z8;function J8(e){setTimeout(e,0)}var eB=typeof window>"u"||"Deno"in globalThis;function An(){}function tB(e,t){return typeof e=="function"?e(t):e}function h0(e){return typeof e=="number"&&e>=0&&e!==1/0}function VR(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ii(e,t){return typeof e=="function"?e(t):e}function Ln(e,t){return typeof e=="function"?e(t):e}function SA(e,t){const{type:n="all",exact:r,fetchStatus:a,predicate:i,queryKey:s,stale:o}=e;if(s){if(r){if(t.queryHash!==PS(s,t.options))return!1}else if(!uf(t.queryKey,s))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||a&&a!==t.state.fetchStatus||i&&!i(t))}function wA(e,t){const{exact:n,status:r,predicate:a,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(cf(t.options.mutationKey)!==cf(i))return!1}else if(!uf(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||a&&!a(t))}function PS(e,t){return((t==null?void 0:t.queryKeyHashFn)||cf)(e)}function cf(e){return JSON.stringify(e,(t,n)=>m0(n)?Object.keys(n).sort().reduce((r,a)=>(r[a]=n[a],r),{}):n)}function uf(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>uf(e[n],t[n])):!1}var nB=Object.prototype.hasOwnProperty;function HR(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=jA(e)&&jA(t);if(!r&&!(m0(e)&&m0(t)))return t;const i=(r?e:Object.keys(e)).length,s=r?t:Object.keys(t),o=s.length,l=r?new Array(o):{};let c=0;for(let f=0;f{xs.setTimeout(t,e)})}function y0(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?HR(e,t):t}function aB(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function iB(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var MS=Symbol();function FR(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===MS?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function GR(e,t){return typeof e=="function"?e(...t):!!e}function sB(e,t,n){let r=!1,a;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(a??(a=t()),r||(r=!0,a.aborted?n():a.addEventListener("abort",n,{once:!0})),a)}),e}var ff=(()=>{let e=()=>eB;return{isServer(){return e()},setIsServer(t){e=t}}})();function v0(){let e,t;const n=new Promise((a,i)=>{e=a,t=i});n.status="pending",n.catch(()=>{});function r(a){Object.assign(n,a),delete n.resolve,delete n.reject}return n.resolve=a=>{r({status:"fulfilled",value:a}),e(a)},n.reject=a=>{r({status:"rejected",reason:a}),t(a)},n}var oB=J8;function lB(){let e=[],t=0,n=o=>{o()},r=o=>{o()},a=oB;const i=o=>{t?e.push(o):a(()=>{n(o)})},s=()=>{const o=e;e=[],o.length&&a(()=>{r(()=>{o.forEach(l=>{n(l)})})})};return{batch:o=>{let l;t++;try{l=o()}finally{t--,t||s()}return l},batchCalls:o=>(...l)=>{i(()=>{o(...l)})},schedule:i,setNotifyFunction:o=>{n=o},setBatchNotifyFunction:o=>{r=o},setScheduler:o=>{a=o}}}var Xt=lB(),ml,gi,yl,RC,cB=(RC=class extends bd{constructor(){super();ce(this,ml,!0);ce(this,gi);ce(this,yl);J(this,yl,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){P(this,gi)||this.setEventListener(P(this,yl))}onUnsubscribe(){var t;this.hasListeners()||((t=P(this,gi))==null||t.call(this),J(this,gi,void 0))}setEventListener(t){var n;J(this,yl,t),(n=P(this,gi))==null||n.call(this),J(this,gi,t(this.setOnline.bind(this)))}setOnline(t){P(this,ml)!==t&&(J(this,ml,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return P(this,ml)}},ml=new WeakMap,gi=new WeakMap,yl=new WeakMap,RC),kp=new cB;function uB(e){return Math.min(1e3*2**e,3e4)}function KR(e){return(e??"online")==="online"?kp.isOnline():!0}var g0=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function YR(e){let t=!1,n=0,r;const a=v0(),i=()=>a.status!=="pending",s=y=>{var b;if(!i()){const m=new g0(y);h(m),(b=e.onCancel)==null||b.call(e,m)}},o=()=>{t=!0},l=()=>{t=!1},c=()=>CS.isFocused()&&(e.networkMode==="always"||kp.isOnline())&&e.canRun(),f=()=>KR(e.networkMode)&&e.canRun(),d=y=>{i()||(r==null||r(),a.resolve(y))},h=y=>{i()||(r==null||r(),a.reject(y))},p=()=>new Promise(y=>{var b;r=m=>{(i()||c())&&y(m)},(b=e.onPause)==null||b.call(e)}).then(()=>{var y;r=void 0,i()||(y=e.onContinue)==null||y.call(e)}),v=()=>{if(i())return;let y;const b=n===0?e.initialPromise:void 0;try{y=b??e.fn()}catch(m){y=Promise.reject(m)}Promise.resolve(y).then(d).catch(m=>{var j;if(i())return;const g=e.retry??(ff.isServer()?0:3),x=e.retryDelay??uB,w=typeof x=="function"?x(n,m):x,S=g===!0||typeof g=="number"&&nc()?void 0:p()).then(()=>{t?h(m):v()})})};return{promise:a,status:()=>a.status,cancel:s,continue:()=>(r==null||r(),a),cancelRetry:o,continueRetry:l,canStart:f,start:()=>(f()?v():p().then(v),a)}}var _s,DC,XR=(DC=class{constructor(){ce(this,_s)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),h0(this.gcTime)&&J(this,_s,xs.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ff.isServer()?1/0:5*60*1e3))}clearGcTimeout(){P(this,_s)!==void 0&&(xs.clearTimeout(P(this,_s)),J(this,_s,void 0))}},_s=new WeakMap,DC);function fB(e){return{onFetch:(t,n)=>{var f,d,h,p,v;const r=t.options,a=(h=(d=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:d.fetchMore)==null?void 0:h.direction,i=((p=t.state.data)==null?void 0:p.pages)||[],s=((v=t.state.data)==null?void 0:v.pageParams)||[];let o={pages:[],pageParams:[]},l=0;const c=async()=>{let y=!1;const b=x=>{sB(x,()=>t.signal,()=>y=!0)},m=FR(t.options,t.fetchOptions),g=async(x,w,S)=>{if(y)return Promise.reject(t.signal.reason);if(w==null&&x.pages.length)return Promise.resolve(x);const O=(()=>{const M={client:t.client,queryKey:t.queryKey,pageParam:w,direction:S?"backward":"forward",meta:t.options.meta};return b(M),M})(),E=await m(O),{maxPages:T}=t.options,_=S?iB:aB;return{pages:_(x.pages,E,T),pageParams:_(x.pageParams,w,T)}};if(a&&i.length){const x=a==="backward",w=x?dB:OA,S={pages:i,pageParams:s},j=w(r,S);o=await g(S,j,x)}else{const x=e??i.length;do{const w=l===0?s[0]??r.initialPageParam:OA(r,o);if(l>0&&w==null)break;o=await g(o,w),l++}while(l{var y,b;return(b=(y=t.options).persister)==null?void 0:b.call(y,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function OA(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function dB(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var vl,Cs,gl,ar,Ps,zt,nd,Ms,kn,WR,ba,$C,hB=($C=class extends XR{constructor(t){super();ce(this,kn);ce(this,vl);ce(this,Cs);ce(this,gl);ce(this,ar);ce(this,Ps);ce(this,zt);ce(this,nd);ce(this,Ms);J(this,Ms,!1),J(this,nd,t.defaultOptions),this.setOptions(t.options),this.observers=[],J(this,Ps,t.client),J(this,ar,P(this,Ps).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,J(this,Cs,TA(this.options)),this.state=t.state??P(this,Cs),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return P(this,vl)}get promise(){var t;return(t=P(this,zt))==null?void 0:t.promise}setOptions(t){if(this.options={...P(this,nd),...t},t!=null&&t._type&&J(this,vl,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=TA(this.options);n.data!==void 0&&(this.setState(EA(n.data,n.dataUpdatedAt)),J(this,Cs,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&P(this,ar).remove(this)}setData(t,n){const r=y0(this.state.data,t,this.options);return Ae(this,kn,ba).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t){Ae(this,kn,ba).call(this,{type:"setState",state:t})}cancel(t){var r,a;const n=(r=P(this,zt))==null?void 0:r.promise;return(a=P(this,zt))==null||a.cancel(t),n?n.then(An).catch(An):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return P(this,Cs)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Ln(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===MS||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Ii(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!VR(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=P(this,zt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=P(this,zt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),P(this,ar).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(P(this,zt)&&(P(this,Ms)||Ae(this,kn,WR).call(this)?P(this,zt).cancel({revert:!0}):P(this,zt).cancelRetry()),this.scheduleGc()),P(this,ar).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ae(this,kn,ba).call(this,{type:"invalidate"})}async fetch(t,n){var c,f,d,h,p,v,y,b,m,g,x;if(this.state.fetchStatus!=="idle"&&((c=P(this,zt))==null?void 0:c.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(P(this,zt))return P(this,zt).continueRetry(),P(this,zt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const w=this.observers.find(S=>S.options.queryFn);w&&this.setOptions(w.options)}const r=new AbortController,a=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(J(this,Ms,!0),r.signal)})},i=()=>{const w=FR(this.options,n),j=(()=>{const O={client:P(this,Ps),queryKey:this.queryKey,meta:this.meta};return a(O),O})();return J(this,Ms,!1),this.options.persister?this.options.persister(w,j,this):w(j)},o=(()=>{const w={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:P(this,Ps),state:this.state,fetchFn:i};return a(w),w})(),l=P(this,vl)==="infinite"?fB(this.options.pages):this.options.behavior;l==null||l.onFetch(o,this),J(this,gl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=o.fetchOptions)==null?void 0:f.meta))&&Ae(this,kn,ba).call(this,{type:"fetch",meta:(d=o.fetchOptions)==null?void 0:d.meta}),J(this,zt,YR({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,onCancel:w=>{w instanceof g0&&w.revert&&this.setState({...P(this,gl),fetchStatus:"idle"}),r.abort()},onFail:(w,S)=>{Ae(this,kn,ba).call(this,{type:"failed",failureCount:w,error:S})},onPause:()=>{Ae(this,kn,ba).call(this,{type:"pause"})},onContinue:()=>{Ae(this,kn,ba).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}));try{const w=await P(this,zt).start();if(w===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(w),(p=(h=P(this,ar).config).onSuccess)==null||p.call(h,w,this),(y=(v=P(this,ar).config).onSettled)==null||y.call(v,w,this.state.error,this),w}catch(w){if(w instanceof g0){if(w.silent)return P(this,zt).promise;if(w.revert){if(this.state.data===void 0)throw w;return this.state.data}}throw Ae(this,kn,ba).call(this,{type:"error",error:w}),(m=(b=P(this,ar).config).onError)==null||m.call(b,w,this),(x=(g=P(this,ar).config).onSettled)==null||x.call(g,this.state.data,w,this),w}finally{this.scheduleGc()}}},vl=new WeakMap,Cs=new WeakMap,gl=new WeakMap,ar=new WeakMap,Ps=new WeakMap,zt=new WeakMap,nd=new WeakMap,Ms=new WeakMap,kn=new WeakSet,WR=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},ba=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...QR(r.data,this.options),fetchMeta:t.meta??null};case"success":const a={...r,...EA(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return J(this,gl,t.manual?a:void 0),a;case"error":const i=t.error;return{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Xt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),P(this,ar).notify({query:this,type:"updated",action:t})})},$C);function QR(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:KR(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function EA(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function TA(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Sn,Te,rd,ln,Rs,bl,wa,bi,ad,xl,Sl,Ds,$s,xi,wl,Le,yu,b0,x0,S0,w0,j0,A0,O0,ZR,kC,pB=(kC=class extends bd{constructor(t,n){super();ce(this,Le);ce(this,Sn);ce(this,Te);ce(this,rd);ce(this,ln);ce(this,Rs);ce(this,bl);ce(this,wa);ce(this,bi);ce(this,ad);ce(this,xl);ce(this,Sl);ce(this,Ds);ce(this,$s);ce(this,xi);ce(this,wl,new Set);this.options=n,J(this,Sn,t),J(this,bi,null),J(this,wa,v0()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(P(this,Te).addObserver(this),NA(P(this,Te),this.options)?Ae(this,Le,yu).call(this):this.updateResult(),Ae(this,Le,w0).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return E0(P(this,Te),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return E0(P(this,Te),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ae(this,Le,j0).call(this),Ae(this,Le,A0).call(this),P(this,Te).removeObserver(this)}setOptions(t){const n=this.options,r=P(this,Te);if(this.options=P(this,Sn).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ln(this.options.enabled,P(this,Te))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ae(this,Le,O0).call(this),P(this,Te).setOptions(this.options),n._defaulted&&!p0(this.options,n)&&P(this,Sn).getQueryCache().notify({type:"observerOptionsUpdated",query:P(this,Te),observer:this});const a=this.hasListeners();a&&_A(P(this,Te),r,this.options,n)&&Ae(this,Le,yu).call(this),this.updateResult(),a&&(P(this,Te)!==r||Ln(this.options.enabled,P(this,Te))!==Ln(n.enabled,P(this,Te))||Ii(this.options.staleTime,P(this,Te))!==Ii(n.staleTime,P(this,Te)))&&Ae(this,Le,b0).call(this);const i=Ae(this,Le,x0).call(this);a&&(P(this,Te)!==r||Ln(this.options.enabled,P(this,Te))!==Ln(n.enabled,P(this,Te))||i!==P(this,xi))&&Ae(this,Le,S0).call(this,i)}getOptimisticResult(t){const n=P(this,Sn).getQueryCache().build(P(this,Sn),t),r=this.createResult(n,t);return yB(this,r)&&(J(this,ln,r),J(this,bl,this.options),J(this,Rs,P(this,Te).state)),r}getCurrentResult(){return P(this,ln)}trackResult(t,n){return new Proxy(t,{get:(r,a)=>(this.trackProp(a),n==null||n(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&P(this,wa).status==="pending"&&P(this,wa).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,a))})}trackProp(t){P(this,wl).add(t)}getCurrentQuery(){return P(this,Te)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=P(this,Sn).defaultQueryOptions(t),r=P(this,Sn).getQueryCache().build(P(this,Sn),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return Ae(this,Le,yu).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),P(this,ln)))}createResult(t,n){var T;const r=P(this,Te),a=this.options,i=P(this,ln),s=P(this,Rs),o=P(this,bl),c=t!==r?t.state:P(this,rd),{state:f}=t;let d={...f},h=!1,p;if(n._optimisticResults){const _=this.hasListeners(),M=!_&&NA(t,n),C=_&&_A(t,r,n,a);(M||C)&&(d={...d,...QR(f.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:v,errorUpdatedAt:y,status:b}=d;p=d.data;let m=!1;if(n.placeholderData!==void 0&&p===void 0&&b==="pending"){let _;i!=null&&i.isPlaceholderData&&n.placeholderData===(o==null?void 0:o.placeholderData)?(_=i.data,m=!0):_=typeof n.placeholderData=="function"?n.placeholderData((T=P(this,Sl))==null?void 0:T.state.data,P(this,Sl)):n.placeholderData,_!==void 0&&(b="success",p=y0(i==null?void 0:i.data,_,n),h=!0)}if(n.select&&p!==void 0&&!m)if(i&&p===(s==null?void 0:s.data)&&n.select===P(this,ad))p=P(this,xl);else try{J(this,ad,n.select),p=n.select(p),p=y0(i==null?void 0:i.data,p,n),J(this,xl,p),J(this,bi,null)}catch(_){J(this,bi,_)}P(this,bi)&&(v=P(this,bi),p=P(this,xl),y=Date.now(),b="error");const g=d.fetchStatus==="fetching",x=b==="pending",w=b==="error",S=x&&g,j=p!==void 0,E={status:b,fetchStatus:d.fetchStatus,isPending:x,isSuccess:b==="success",isError:w,isInitialLoading:S,isLoading:S,data:p,dataUpdatedAt:d.dataUpdatedAt,error:v,errorUpdatedAt:y,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:g,isRefetching:g&&!x,isLoadingError:w&&!j,isPaused:d.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:w&&j,isStale:RS(t,n),refetch:this.refetch,promise:P(this,wa),isEnabled:Ln(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const _=E.data!==void 0,M=E.status==="error"&&!_,C=k=>{M?k.reject(E.error):_&&k.resolve(E.data)},z=()=>{const k=J(this,wa,E.promise=v0());C(k)},L=P(this,wa);switch(L.status){case"pending":t.queryHash===r.queryHash&&C(L);break;case"fulfilled":(M||E.data!==L.value)&&z();break;case"rejected":(!M||E.error!==L.reason)&&z();break}}return E}updateResult(){const t=P(this,ln),n=this.createResult(P(this,Te),this.options);if(J(this,Rs,P(this,Te).state),J(this,bl,this.options),P(this,Rs).data!==void 0&&J(this,Sl,P(this,Te)),p0(n,t))return;J(this,ln,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,i=typeof a=="function"?a():a;if(i==="all"||!i&&!P(this,wl).size)return!0;const s=new Set(i??P(this,wl));return this.options.throwOnError&&s.add("error"),Object.keys(P(this,ln)).some(o=>{const l=o;return P(this,ln)[l]!==t[l]&&s.has(l)})};Ae(this,Le,ZR).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ae(this,Le,w0).call(this)}},Sn=new WeakMap,Te=new WeakMap,rd=new WeakMap,ln=new WeakMap,Rs=new WeakMap,bl=new WeakMap,wa=new WeakMap,bi=new WeakMap,ad=new WeakMap,xl=new WeakMap,Sl=new WeakMap,Ds=new WeakMap,$s=new WeakMap,xi=new WeakMap,wl=new WeakMap,Le=new WeakSet,yu=function(t){Ae(this,Le,O0).call(this);let n=P(this,Te).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(An)),n},b0=function(){Ae(this,Le,j0).call(this);const t=Ii(this.options.staleTime,P(this,Te));if(ff.isServer()||P(this,ln).isStale||!h0(t))return;const r=VR(P(this,ln).dataUpdatedAt,t)+1;J(this,Ds,xs.setTimeout(()=>{P(this,ln).isStale||this.updateResult()},r))},x0=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(P(this,Te)):this.options.refetchInterval)??!1},S0=function(t){Ae(this,Le,A0).call(this),J(this,xi,t),!(ff.isServer()||Ln(this.options.enabled,P(this,Te))===!1||!h0(P(this,xi))||P(this,xi)===0)&&J(this,$s,xs.setInterval(()=>{(this.options.refetchIntervalInBackground||CS.isFocused())&&Ae(this,Le,yu).call(this)},P(this,xi)))},w0=function(){Ae(this,Le,b0).call(this),Ae(this,Le,S0).call(this,Ae(this,Le,x0).call(this))},j0=function(){P(this,Ds)!==void 0&&(xs.clearTimeout(P(this,Ds)),J(this,Ds,void 0))},A0=function(){P(this,$s)!==void 0&&(xs.clearInterval(P(this,$s)),J(this,$s,void 0))},O0=function(){const t=P(this,Sn).getQueryCache().build(P(this,Sn),this.options);if(t===P(this,Te))return;const n=P(this,Te);J(this,Te,t),J(this,rd,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},ZR=function(t){Xt.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(P(this,ln))}),P(this,Sn).getQueryCache().notify({query:P(this,Te),type:"observerResultsUpdated"})})},kC);function mB(e,t){return Ln(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Ln(t.retryOnMount,e)===!1)}function NA(e,t){return mB(e,t)||e.state.data!==void 0&&E0(e,t,t.refetchOnMount)}function E0(e,t,n){if(Ln(t.enabled,e)!==!1&&Ii(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&RS(e,t)}return!1}function _A(e,t,n,r){return(e!==t||Ln(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&RS(e,n)}function RS(e,t){return Ln(t.enabled,e)!==!1&&e.isStaleByTime(Ii(t.staleTime,e))}function yB(e,t){return!p0(e.getCurrentResult(),t)}var id,qr,nn,ks,Vr,ai,LC,vB=(LC=class extends XR{constructor(t){super();ce(this,Vr);ce(this,id);ce(this,qr);ce(this,nn);ce(this,ks);J(this,id,t.client),this.mutationId=t.mutationId,J(this,nn,t.mutationCache),J(this,qr,[]),this.state=t.state||gB(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){P(this,qr).includes(t)||(P(this,qr).push(t),this.clearGcTimeout(),P(this,nn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){J(this,qr,P(this,qr).filter(n=>n!==t)),this.scheduleGc(),P(this,nn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){P(this,qr).length||(this.state.status==="pending"?this.scheduleGc():P(this,nn).remove(this))}continue(){var t;return((t=P(this,ks))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,o,l,c,f,d,h,p,v,y,b,m,g,x,w,S,j,O;const n=()=>{Ae(this,Vr,ai).call(this,{type:"continue"})},r={client:P(this,id),meta:this.options.meta,mutationKey:this.options.mutationKey};J(this,ks,YR({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(E,T)=>{Ae(this,Vr,ai).call(this,{type:"failed",failureCount:E,error:T})},onPause:()=>{Ae(this,Vr,ai).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>P(this,nn).canRun(this)}));const a=this.state.status==="pending",i=!P(this,ks).canStart();try{if(a)n();else{Ae(this,Vr,ai).call(this,{type:"pending",variables:t,isPaused:i}),P(this,nn).config.onMutate&&await P(this,nn).config.onMutate(t,this,r);const T=await((o=(s=this.options).onMutate)==null?void 0:o.call(s,t,r));T!==this.state.context&&Ae(this,Vr,ai).call(this,{type:"pending",context:T,variables:t,isPaused:i})}const E=await P(this,ks).start();return await((c=(l=P(this,nn).config).onSuccess)==null?void 0:c.call(l,E,t,this.state.context,this,r)),await((d=(f=this.options).onSuccess)==null?void 0:d.call(f,E,t,this.state.context,r)),await((p=(h=P(this,nn).config).onSettled)==null?void 0:p.call(h,E,null,this.state.variables,this.state.context,this,r)),await((y=(v=this.options).onSettled)==null?void 0:y.call(v,E,null,t,this.state.context,r)),Ae(this,Vr,ai).call(this,{type:"success",data:E}),E}catch(E){try{await((m=(b=P(this,nn).config).onError)==null?void 0:m.call(b,E,t,this.state.context,this,r))}catch(T){Promise.reject(T)}try{await((x=(g=this.options).onError)==null?void 0:x.call(g,E,t,this.state.context,r))}catch(T){Promise.reject(T)}try{await((S=(w=P(this,nn).config).onSettled)==null?void 0:S.call(w,void 0,E,this.state.variables,this.state.context,this,r))}catch(T){Promise.reject(T)}try{await((O=(j=this.options).onSettled)==null?void 0:O.call(j,void 0,E,t,this.state.context,r))}catch(T){Promise.reject(T)}throw Ae(this,Vr,ai).call(this,{type:"error",error:E}),E}finally{P(this,nn).runNext(this)}}},id=new WeakMap,qr=new WeakMap,nn=new WeakMap,ks=new WeakMap,Vr=new WeakSet,ai=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Xt.batch(()=>{P(this,qr).forEach(r=>{r.onMutationUpdate(t)}),P(this,nn).notify({mutation:this,type:"updated",action:t})})},LC);function gB(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ja,Nr,sd,zC,bB=(zC=class extends bd{constructor(t={}){super();ce(this,ja);ce(this,Nr);ce(this,sd);this.config=t,J(this,ja,new Set),J(this,Nr,new Map),J(this,sd,0)}build(t,n,r){const a=new vB({client:t,mutationCache:this,mutationId:++qd(this,sd)._,options:t.defaultMutationOptions(n),state:r});return this.add(a),a}add(t){P(this,ja).add(t);const n=sh(t);if(typeof n=="string"){const r=P(this,Nr).get(n);r?r.push(t):P(this,Nr).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(P(this,ja).delete(t)){const n=sh(t);if(typeof n=="string"){const r=P(this,Nr).get(n);if(r)if(r.length>1){const a=r.indexOf(t);a!==-1&&r.splice(a,1)}else r[0]===t&&P(this,Nr).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=sh(t);if(typeof n=="string"){const r=P(this,Nr).get(n),a=r==null?void 0:r.find(i=>i.state.status==="pending");return!a||a===t}else return!0}runNext(t){var r;const n=sh(t);if(typeof n=="string"){const a=(r=P(this,Nr).get(n))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Xt.batch(()=>{P(this,ja).forEach(t=>{this.notify({type:"removed",mutation:t})}),P(this,ja).clear(),P(this,Nr).clear()})}getAll(){return Array.from(P(this,ja))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>wA(n,r))}findAll(t={}){return this.getAll().filter(n=>wA(t,n))}notify(t){Xt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Xt.batch(()=>Promise.all(t.map(n=>n.continue().catch(An))))}},ja=new WeakMap,Nr=new WeakMap,sd=new WeakMap,zC);function sh(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Hr,BC,xB=(BC=class extends bd{constructor(t={}){super();ce(this,Hr);this.config=t,J(this,Hr,new Map)}build(t,n,r){const a=n.queryKey,i=n.queryHash??PS(a,n);let s=this.get(i);return s||(s=new hB({client:t,queryKey:a,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(a)}),this.add(s)),s}add(t){P(this,Hr).has(t.queryHash)||(P(this,Hr).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=P(this,Hr).get(t.queryHash);n&&(t.destroy(),n===t&&P(this,Hr).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Xt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return P(this,Hr).get(t)}getAll(){return[...P(this,Hr).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>SA(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>SA(t,r)):n}notify(t){Xt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Xt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Xt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Hr=new WeakMap,BC),pt,Si,wi,jl,Al,ji,Ol,El,IC,SB=(IC=class{constructor(e={}){ce(this,pt);ce(this,Si);ce(this,wi);ce(this,jl);ce(this,Al);ce(this,ji);ce(this,Ol);ce(this,El);J(this,pt,e.queryCache||new xB),J(this,Si,e.mutationCache||new bB),J(this,wi,e.defaultOptions||{}),J(this,jl,new Map),J(this,Al,new Map),J(this,ji,0)}mount(){qd(this,ji)._++,P(this,ji)===1&&(J(this,Ol,CS.subscribe(async e=>{e&&(await this.resumePausedMutations(),P(this,pt).onFocus())})),J(this,El,kp.subscribe(async e=>{e&&(await this.resumePausedMutations(),P(this,pt).onOnline())})))}unmount(){var e,t;qd(this,ji)._--,P(this,ji)===0&&((e=P(this,Ol))==null||e.call(this),J(this,Ol,void 0),(t=P(this,El))==null||t.call(this),J(this,El,void 0))}isFetching(e){return P(this,pt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return P(this,Si).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=P(this,pt).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=P(this,pt).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Ii(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return P(this,pt).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),a=P(this,pt).get(r.queryHash),i=a==null?void 0:a.state.data,s=tB(t,i);if(s!==void 0)return P(this,pt).build(this,r).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return Xt.batch(()=>P(this,pt).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=P(this,pt).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=P(this,pt);Xt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=P(this,pt);return Xt.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Xt.batch(()=>P(this,pt).findAll(e).map(a=>a.cancel(n)));return Promise.all(r).then(An).catch(An)}invalidateQueries(e,t={}){return Xt.batch(()=>(P(this,pt).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Xt.batch(()=>P(this,pt).findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let i=a.fetch(void 0,n);return n.throwOnError||(i=i.catch(An)),a.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(An)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=P(this,pt).build(this,t);return n.isStaleByTime(Ii(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(An).catch(An)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(An).catch(An)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return kp.isOnline()?P(this,Si).resumePausedMutations():Promise.resolve()}getQueryCache(){return P(this,pt)}getMutationCache(){return P(this,Si)}getDefaultOptions(){return P(this,wi)}setDefaultOptions(e){J(this,wi,e)}setQueryDefaults(e,t){P(this,jl).set(cf(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...P(this,jl).values()],n={};return t.forEach(r=>{uf(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){P(this,Al).set(cf(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...P(this,Al).values()],n={};return t.forEach(r=>{uf(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...P(this,wi).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=PS(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===MS&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...P(this,wi).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){P(this,pt).clear(),P(this,Si).clear()}},pt=new WeakMap,Si=new WeakMap,wi=new WeakMap,jl=new WeakMap,Al=new WeakMap,ji=new WeakMap,Ol=new WeakMap,El=new WeakMap,IC),JR=A.createContext(void 0),tn=e=>{const t=A.useContext(JR);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},wB=({client:e,children:t})=>(A.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),u.jsx(JR.Provider,{value:e,children:t})),eD=A.createContext(!1),jB=()=>A.useContext(eD);eD.Provider;function AB(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var OB=A.createContext(AB()),EB=()=>A.useContext(OB),TB=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?GR(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},NB=e=>{A.useEffect(()=>{e.clearReset()},[e])},_B=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(a&&e.data===void 0||GR(n,[e.error,r])),CB=e=>{if(e.suspense){const n=a=>a==="static"?a:Math.max(a??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...a)=>n(r(...a)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},PB=(e,t)=>e.isLoading&&e.isFetching&&!t,MB=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,CA=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function RB(e,t,n){var p,v,y,b;const r=jB(),a=EB(),i=tn(),s=i.defaultQueryOptions(e);(v=(p=i.getDefaultOptions().queries)==null?void 0:p._experimental_beforeQuery)==null||v.call(p,s);const o=i.getQueryCache().get(s.queryHash),l=e.subscribed!==!1;s._optimisticResults=r?"isRestoring":l?"optimistic":void 0,CB(s),TB(s,a,o),NB(a);const c=!i.getQueryCache().get(s.queryHash),[f]=A.useState(()=>new t(i,s)),d=f.getOptimisticResult(s),h=!r&&l;if(A.useSyncExternalStore(A.useCallback(m=>{const g=h?f.subscribe(Xt.batchCalls(m)):An;return f.updateResult(),g},[f,h]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),A.useEffect(()=>{f.setOptions(s)},[s,f]),MB(s,d))throw CA(s,f,a);if(_B({result:d,errorResetBoundary:a,throwOnError:s.throwOnError,query:o,suspense:s.suspense}))throw d.error;if((b=(y=i.getDefaultOptions().queries)==null?void 0:y._experimental_afterQuery)==null||b.call(y,s,d),s.experimental_prefetchInRender&&!ff.isServer()&&PB(d,r)){const m=c?CA(s,f,a):o==null?void 0:o.promise;m==null||m.catch(An).finally(()=>{f.updateResult()})}return s.notifyOnChangeProps?d:f.trackResult(d)}function se(e,t){return RB(e,pB)}/** * react-router v7.17.0 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */var PA="popstate";function MA(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function DB(e={}){function t(r,a){var c;let i=(c=a.state)==null?void 0:c.masked,{pathname:s,search:o,hash:l}=i||r.location;return T0("",{pathname:s,search:o,hash:l},a.state&&a.state.usr||null,a.state&&a.state.key||"default",i?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function n(r,a){return typeof a=="string"?a:df(a)}return kB(t,n,null,e)}function ct(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function vr(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function $B(){return Math.random().toString(36).substring(2,10)}function RA(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function T0(e,t,n=null,r,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?jc(t):t,state:n,key:t&&t.key||r||$B(),mask:a}}function df({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function jc(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function kB(e,t,n,r={}){let{window:a=document.defaultView,v5Compat:i=!1}=r,s=a.history,o="POP",l=null,c=f();c==null&&(c=0,s.replaceState({...s.state,idx:c},""));function f(){return(s.state||{idx:null}).idx}function d(){o="POP";let b=f(),m=b==null?null:b-c;c=b,l&&l({action:o,location:y.location,delta:m})}function h(b,m){o="PUSH";let g=MA(b)?b:T0(y.location,b,m);c=f()+1;let x=RA(g,c),w=y.createHref(g.mask||g);try{s.pushState(x,"",w)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;a.location.assign(w)}i&&l&&l({action:o,location:y.location,delta:1})}function p(b,m){o="REPLACE";let g=MA(b)?b:T0(y.location,b,m);c=f();let x=RA(g,c),w=y.createHref(g.mask||g);s.replaceState(x,"",w),i&&l&&l({action:o,location:y.location,delta:0})}function v(b){return LB(a,b)}let y={get action(){return o},get location(){return e(a,s)},listen(b){if(l)throw new Error("A history only accepts one active listener");return a.addEventListener(PA,d),l=b,()=>{a.removeEventListener(PA,d),l=null}},createHref(b){return t(a,b)},createURL:v,encodeLocation(b){let m=v(b);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:h,replace:p,go(b){return s.go(b)}};return y}function LB(e,t,n=!1){let r="http://localhost";e&&(r=e.location.origin!=="null"?e.location.origin:e.location.href),ct(r,"No window.location.(origin|href) available to create URL");let a=typeof t=="string"?t:df(t);return a=a.replace(/ $/,"%20"),!n&&a.startsWith("//")&&(a=r+a),new URL(a,r)}function tD(e,t,n="/"){return zB(e,t,n,!1)}function zB(e,t,n,r,a){let i=typeof t=="string"?jc(t):t,s=Fa(i.pathname||"/",n);if(s==null)return null;let o=BB(e),l=null,c=QB(s);for(let f=0;l==null&&f{let f={relativePath:c===void 0?s.path||"":c,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};if(f.relativePath.startsWith("/")){if(!f.relativePath.startsWith(r)&&l)return;ct(f.relativePath.startsWith(r),`Absolute route path "${f.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),f.relativePath=f.relativePath.slice(r.length)}let d=Rr([r,f.relativePath]),h=n.concat(f);s.children&&s.children.length>0&&(ct(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${d}".`),nD(s.children,t,h,d,l)),!(s.path==null&&!s.index)&&t.push({path:d,score:KB(d,s.index),routesMeta:h})};return e.forEach((s,o)=>{var l;if(s.path===""||!((l=s.path)!=null&&l.includes("?")))i(s,o);else for(let c of rD(s.path))i(s,o,!0,c)}),t}function rD(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,a=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return a?[i,""]:[i];let s=rD(r.join("/")),o=[];return o.push(...s.map(l=>l===""?i:[i,l].join("/"))),a&&o.push(...s),o.map(l=>e.startsWith("/")&&l===""?"/":l)}function IB(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:YB(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var UB=/^:[\w-]+$/,qB=3,VB=2,HB=1,FB=10,GB=-2,DA=e=>e==="*";function KB(e,t){let n=e.split("/"),r=n.length;return n.some(DA)&&(r+=GB),t&&(r+=VB),n.filter(a=>!DA(a)).reduce((a,i)=>a+(UB.test(i)?qB:i===""?HB:FB),r)}function YB(e,t){return e.length===t.length&&e.slice(0,-1).every((r,a)=>r===t[a])?e[e.length-1]-t[t.length-1]:0}function XB(e,t,n=!1){let{routesMeta:r}=e,a={},i="/",s=[];for(let o=0;o{if(f==="*"){let v=o[h]||"";s=i.slice(0,i.length-v.length).replace(/(.)\/+$/,"$1")}const p=o[h];return d&&!p?c[f]=void 0:c[f]=(p||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:s,pattern:e}}function WB(e,t=!1,n=!0){vr(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,o,l,c,f)=>{if(r.push({paramName:o,isOptional:l!=null}),l){let d=f.charAt(c+s.length);return d&&d!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function QB(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return vr(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Fa(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}var ZB=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function JB(e,t="/"){let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?jc(e):e,i;return n?(n=aD(n),n.startsWith("/")?i=$A(n.substring(1),"/"):i=$A(n,t)):i=t,{pathname:i,search:nI(r),hash:rI(a)}}function $A(e,t){let n=zp(t).split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function mg(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function eI(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function DS(e){let t=eI(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function Sy(e,t,n,r=!1){let a;typeof e=="string"?a=jc(e):(a={...e},ct(!a.pathname||!a.pathname.includes("?"),mg("?","pathname","search",a)),ct(!a.pathname||!a.pathname.includes("#"),mg("#","pathname","hash",a)),ct(!a.search||!a.search.includes("#"),mg("#","search","hash",a)));let i=e===""||a.pathname==="",s=i?"/":a.pathname,o;if(s==null)o=n;else{let d=t.length-1;if(!r&&s.startsWith("..")){let h=s.split("/");for(;h[0]==="..";)h.shift(),d-=1;a.pathname=h.join("/")}o=d>=0?t[d]:"/"}let l=JB(a,o),c=s&&s!=="/"&&s.endsWith("/"),f=(i||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||f)&&(l.pathname+="/"),l}var aD=e=>e.replace(/\/\/+/g,"/"),Rr=e=>aD(e.join("/")),zp=e=>e.replace(/\/+$/,""),tI=e=>zp(e).replace(/^\/*/,"/"),nI=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,rI=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,aI=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function iI(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function sI(e){let t=e.map(n=>n.route.path).filter(Boolean);return Rr(t)||"/"}var iD=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function sD(e,t){let n=e;if(typeof n!="string"||!ZB.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,a=!1;if(iD)try{let i=new URL(window.location.href),s=n.startsWith("//")?new URL(i.protocol+n):new URL(n),o=Fa(s.pathname,t);s.origin===i.origin&&o!=null?n=o+s.search+s.hash:a=!0}catch{vr(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:a,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var oD=["POST","PUT","PATCH","DELETE"];new Set(oD);var oI=["GET",...oD];new Set(oI);var Ac=A.createContext(null);Ac.displayName="DataRouter";var wy=A.createContext(null);wy.displayName="DataRouterState";var lD=A.createContext(!1);function lI(){return A.useContext(lD)}var cD=A.createContext({isTransitioning:!1});cD.displayName="ViewTransition";var cI=A.createContext(new Map);cI.displayName="Fetchers";var uI=A.createContext(null);uI.displayName="Await";var Zn=A.createContext(null);Zn.displayName="Navigation";var xd=A.createContext(null);xd.displayName="Location";var xr=A.createContext({outlet:null,matches:[],isDataRoute:!1});xr.displayName="Route";var $S=A.createContext(null);$S.displayName="RouteError";var uD="REACT_ROUTER_ERROR",fI="REDIRECT",dI="ROUTE_ERROR_RESPONSE";function hI(e){if(e.startsWith(`${uD}:${fI}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function pI(e){if(e.startsWith(`${uD}:${dI}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new aI(t.status,t.statusText,t.data)}catch{}}function mI(e,{relative:t}={}){ct(Oc(),"useHref() may be used only in the context of a component.");let{basename:n,navigator:r}=A.useContext(Zn),{hash:a,pathname:i,search:s}=Sd(e,{relative:t}),o=i;return n!=="/"&&(o=i==="/"?n:Rr([n,i])),r.createHref({pathname:o,search:s,hash:a})}function Oc(){return A.useContext(xd)!=null}function Sr(){return ct(Oc(),"useLocation() may be used only in the context of a component."),A.useContext(xd).location}var fD="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function dD(e){A.useContext(Zn).static||A.useLayoutEffect(e)}function Ft(){let{isDataRoute:e}=A.useContext(xr);return e?CI():yI()}function yI(){ct(Oc(),"useNavigate() may be used only in the context of a component.");let e=A.useContext(Ac),{basename:t,navigator:n}=A.useContext(Zn),{matches:r}=A.useContext(xr),{pathname:a}=Sr(),i=JSON.stringify(DS(r)),s=A.useRef(!1);return dD(()=>{s.current=!0}),A.useCallback((l,c={})=>{if(vr(s.current,fD),!s.current)return;if(typeof l=="number"){n.go(l);return}let f=Sy(l,JSON.parse(i),a,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Rr([t,f.pathname])),(c.replace?n.replace:n.push)(f,c.state,c)},[t,n,i,a,e])}var vI=A.createContext(null);function gI(e){let t=A.useContext(xr).outlet;return A.useMemo(()=>t&&A.createElement(vI.Provider,{value:e},t),[t,e])}function hD(){let{matches:e}=A.useContext(xr),t=e[e.length-1];return(t==null?void 0:t.params)??{}}function Sd(e,{relative:t}={}){let{matches:n}=A.useContext(xr),{pathname:r}=Sr(),a=JSON.stringify(DS(n));return A.useMemo(()=>Sy(e,JSON.parse(a),r,t==="path"),[e,a,r,t])}function bI(e,t){return pD(e,t)}function pD(e,t,n){var b;ct(Oc(),"useRoutes() may be used only in the context of a component.");let{navigator:r}=A.useContext(Zn),{matches:a}=A.useContext(xr),i=a[a.length-1],s=i?i.params:{},o=i?i.pathname:"/",l=i?i.pathnameBase:"/",c=i&&i.route;{let m=c&&c.path||"";yD(o,!c||m.endsWith("*")||m.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${o}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. Please change the parent to .`)}let f=Sr(),d;if(t){let m=typeof t=="string"?jc(t):t;ct(l==="/"||((b=m.pathname)==null?void 0:b.startsWith(l)),`When overriding the location using \`\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${l}" but pathname "${m.pathname}" was given in the \`location\` prop.`),d=m}else d=f;let h=d.pathname||"/",p=h;if(l!=="/"){let m=l.replace(/^\//,"").split("/");p="/"+h.replace(/^\//,"").split("/").slice(m.length).join("/")}let v=n&&n.state.matches.length?n.state.matches.map(m=>Object.assign(m,{route:n.manifest[m.route.id]||m.route})):tD(e,{pathname:p});vr(c||v!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),vr(v==null||v[v.length-1].route.element!==void 0||v[v.length-1].route.Component!==void 0||v[v.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`);let y=AI(v&&v.map(m=>Object.assign({},m,{params:Object.assign({},s,m.params),pathname:Rr([l,r.encodeLocation?r.encodeLocation(m.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:m.pathname]),pathnameBase:m.pathnameBase==="/"?l:Rr([l,r.encodeLocation?r.encodeLocation(m.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:m.pathnameBase])})),a,n);return t&&y?A.createElement(xd.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...d},navigationType:"POP"}},y):y}function xI(){let e=_I(),t=iI(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:r},i={padding:"2px 4px",backgroundColor:r},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=A.createElement(A.Fragment,null,A.createElement("p",null,"💿 Hey developer 👋"),A.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",A.createElement("code",{style:i},"ErrorBoundary")," or"," ",A.createElement("code",{style:i},"errorElement")," prop on your route.")),A.createElement(A.Fragment,null,A.createElement("h2",null,"Unexpected Application Error!"),A.createElement("h3",{style:{fontStyle:"italic"}},t),n?A.createElement("pre",{style:a},n):null,s)}var SI=A.createElement(xI,null),mD=class extends A.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=pI(e.digest);n&&(e=n)}let t=e!==void 0?A.createElement(xr.Provider,{value:this.props.routeContext},A.createElement($S.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?A.createElement(wI,{error:e},t):t}};mD.contextType=lD;var yg=new WeakMap;function wI({children:e,error:t}){let{basename:n}=A.useContext(Zn);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=hI(t.digest);if(r){let a=yg.get(t);if(a)throw a;let i=sD(r.location,n);if(iD&&!yg.get(t))if(i.isExternal||r.reloadDocument)window.location.href=i.absoluteURL||i.to;else{const s=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:r.replace}));throw yg.set(t,s),s}return A.createElement("meta",{httpEquiv:"refresh",content:`0;url=${i.absoluteURL||i.to}`})}}return e}function jI({routeContext:e,match:t,children:n}){let r=A.useContext(Ac);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),A.createElement(xr.Provider,{value:e},n)}function AI(e,t=[],n){let r=n==null?void 0:n.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let a=e,i=r==null?void 0:r.errors;if(i!=null){let f=a.findIndex(d=>d.route.id&&(i==null?void 0:i[d.route.id])!==void 0);ct(f>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),a=a.slice(0,Math.min(a.length,f+1))}let s=!1,o=-1;if(n&&r){s=r.renderFallback;for(let f=0;f=0?a=a.slice(0,o+1):a=[a[0]];break}}}}let l=n==null?void 0:n.onError,c=r&&l?(f,d)=>{var h,p;l(f,{location:r.location,params:((p=(h=r.matches)==null?void 0:h[0])==null?void 0:p.params)??{},pattern:sI(r.matches),errorInfo:d})}:void 0;return a.reduceRight((f,d,h)=>{let p,v=!1,y=null,b=null;r&&(p=i&&d.route.id?i[d.route.id]:void 0,y=d.route.errorElement||SI,s&&(o<0&&h===0?(yD("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),v=!0,b=null):o===h&&(v=!0,b=d.route.hydrateFallbackElement||null)));let m=t.concat(a.slice(0,h+1)),g=()=>{let x;return p?x=y:v?x=b:d.route.Component?x=A.createElement(d.route.Component,null):d.route.element?x=d.route.element:x=f,A.createElement(jI,{match:d,routeContext:{outlet:f,matches:m,isDataRoute:r!=null},children:x})};return r&&(d.route.ErrorBoundary||d.route.errorElement||h===0)?A.createElement(mD,{location:r.location,revalidation:r.revalidation,component:y,error:p,children:g(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:c}):g()},null)}function kS(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function OI(e){let t=A.useContext(Ac);return ct(t,kS(e)),t}function EI(e){let t=A.useContext(wy);return ct(t,kS(e)),t}function TI(e){let t=A.useContext(xr);return ct(t,kS(e)),t}function LS(e){let t=TI(e),n=t.matches[t.matches.length-1];return ct(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function NI(){return LS("useRouteId")}function _I(){var r;let e=A.useContext($S),t=EI("useRouteError"),n=LS("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function CI(){let{router:e}=OI("useNavigate"),t=LS("useNavigate"),n=A.useRef(!1);return dD(()=>{n.current=!0}),A.useCallback(async(a,i={})=>{vr(n.current,fD),n.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...i}))},[e,t])}var kA={};function yD(e,t,n){!t&&!kA[e]&&(kA[e]=!0,vr(!1,n))}A.memo(PI);function PI({routes:e,manifest:t,future:n,state:r,isStatic:a,onError:i}){return pD(e,void 0,{manifest:t,state:r,isStatic:a,onError:i})}function Bp({to:e,replace:t,state:n,relative:r}){ct(Oc()," may be used only in the context of a component.");let{static:a}=A.useContext(Zn);vr(!a," must not be used on the initial render in a . This is a no-op, but you should modify your code so the is only ever rendered in response to some user interaction or state change.");let{matches:i}=A.useContext(xr),{pathname:s}=Sr(),o=Ft(),l=Sy(e,DS(i),s,r==="path"),c=JSON.stringify(l);return A.useEffect(()=>{o(JSON.parse(c),{replace:t,state:n,relative:r})},[o,c,r,t,n]),null}function vD(e){return gI(e.context)}function xe(e){ct(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function MI({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:a,static:i=!1,useTransitions:s}){ct(!Oc(),"You cannot render a inside another . You should never have more than one in your app.");let o=e.replace(/^\/*/,"/"),l=A.useMemo(()=>({basename:o,navigator:a,static:i,useTransitions:s,future:{}}),[o,a,i,s]);typeof n=="string"&&(n=jc(n));let{pathname:c="/",search:f="",hash:d="",state:h=null,key:p="default",mask:v}=n,y=A.useMemo(()=>{let b=Fa(c,o);return b==null?null:{location:{pathname:b,search:f,hash:d,state:h,key:p,mask:v},navigationType:r}},[o,c,f,d,h,p,r,v]);return vr(y!=null,` is not able to match the URL "${c}${f}${d}" because it does not start with the basename, so the won't render anything.`),y==null?null:A.createElement(Zn.Provider,{value:l},A.createElement(xd.Provider,{children:t,value:y}))}function RI({children:e,location:t}){return bI(N0(e),t)}function N0(e,t=[]){let n=[];return A.Children.forEach(e,(r,a)=>{if(!A.isValidElement(r))return;let i=[...t,a];if(r.type===A.Fragment){n.push.apply(n,N0(r.props.children,i));return}ct(r.type===xe,`[${typeof r.type=="string"?r.type:r.type.name}] is not a component. All component children of must be a or `),ct(!r.props.index||!r.props.children,"An index route cannot have child routes.");let s={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=N0(r.props.children,i)),n.push(s)}),n}var Xh="get",Wh="application/x-www-form-urlencoded";function jy(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function DI(e){return jy(e)&&e.tagName.toLowerCase()==="button"}function $I(e){return jy(e)&&e.tagName.toLowerCase()==="form"}function kI(e){return jy(e)&&e.tagName.toLowerCase()==="input"}function LI(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function zI(e,t){return e.button===0&&(!t||t==="_self")&&!LI(e)}function _0(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(a=>[n,a]):[[n,r]])},[]))}function BI(e,t){let n=_0(e);return t&&t.forEach((r,a)=>{n.has(a)||t.getAll(a).forEach(i=>{n.append(a,i)})}),n}var oh=null;function II(){if(oh===null)try{new FormData(document.createElement("form"),0),oh=!1}catch{oh=!0}return oh}var UI=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function vg(e){return e!=null&&!UI.has(e)?(vr(!1,`"${e}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${Wh}"`),null):e}function qI(e,t){let n,r,a,i,s;if($I(e)){let o=e.getAttribute("action");r=o?Fa(o,t):null,n=e.getAttribute("method")||Xh,a=vg(e.getAttribute("enctype"))||Wh,i=new FormData(e)}else if(DI(e)||kI(e)&&(e.type==="submit"||e.type==="image")){let o=e.form;if(o==null)throw new Error('Cannot submit a