diff --git a/assets/index-F2ild_uY.js b/assets/index-F2ild_uY.js new file mode 100644 index 0000000..f95034d --- /dev/null +++ b/assets/index-F2ild_uY.js @@ -0,0 +1,68 @@ +var Ep=Object.defineProperty;var kp=(e,t,n)=>t in e?Ep(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Er=(e,t,n)=>(kp(e,typeof t!="symbol"?t+"":t,n),n);function _c(e,t){for(var n=0;nr[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(l){if(l.ep)return;l.ep=!0;const o=n(l);fetch(l.href,o)}})();function Cc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pc={exports:{}},To={},Rc={exports:{}},Q={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var vl=Symbol.for("react.element"),_p=Symbol.for("react.portal"),Cp=Symbol.for("react.fragment"),Pp=Symbol.for("react.strict_mode"),Rp=Symbol.for("react.profiler"),Np=Symbol.for("react.provider"),Lp=Symbol.for("react.context"),Tp=Symbol.for("react.forward_ref"),jp=Symbol.for("react.suspense"),Dp=Symbol.for("react.memo"),Mp=Symbol.for("react.lazy"),Ku=Symbol.iterator;function zp(e){return e===null||typeof e!="object"?null:(e=Ku&&e[Ku]||e["@@iterator"],typeof e=="function"?e:null)}var Nc={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Lc=Object.assign,Tc={};function mr(e,t,n){this.props=e,this.context=t,this.refs=Tc,this.updater=n||Nc}mr.prototype.isReactComponent={};mr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): 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")};mr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function jc(){}jc.prototype=mr.prototype;function za(e,t,n){this.props=e,this.context=t,this.refs=Tc,this.updater=n||Nc}var Ia=za.prototype=new jc;Ia.constructor=za;Lc(Ia,mr.prototype);Ia.isPureReactComponent=!0;var Yu=Array.isArray,Dc=Object.prototype.hasOwnProperty,Fa={current:null},Mc={key:!0,ref:!0,__self:!0,__source:!0};function zc(e,t,n){var r,l={},o=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)Dc.call(t,r)&&!Mc.hasOwnProperty(r)&&(l[r]=t[r]);var a=arguments.length-2;if(a===1)l.children=n;else if(1>>1,ee=D[G];if(0>>1;Gl(ot,$))Mel(Ot,ot)?(D[G]=Ot,D[Me]=$,G=Me):(D[G]=ot,D[_e]=$,G=_e);else if(Mel(Ot,$))D[G]=Ot,D[Me]=$,G=Me;else break e}}return H}function l(D,H){var $=D.sortIndex-H.sortIndex;return $!==0?$:D.id-H.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,a=i.now();e.unstable_now=function(){return i.now()-a}}var u=[],s=[],c=1,p=null,m=3,S=!1,x=!1,g=!1,P=typeof setTimeout=="function"?setTimeout:null,f=typeof clearTimeout=="function"?clearTimeout:null,d=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function h(D){for(var H=n(s);H!==null;){if(H.callback===null)r(s);else if(H.startTime<=D)r(s),H.sortIndex=H.expirationTime,t(u,H);else break;H=n(s)}}function E(D){if(g=!1,h(D),!x)if(n(u)!==null)x=!0,Ft(L);else{var H=n(s);H!==null&&re(E,H.startTime-D)}}function L(D,H){x=!1,g&&(g=!1,f(T),T=-1),S=!0;var $=m;try{for(h(H),p=n(u);p!==null&&(!(p.expirationTime>H)||D&&!X());){var G=p.callback;if(typeof G=="function"){p.callback=null,m=p.priorityLevel;var ee=G(p.expirationTime<=H);H=e.unstable_now(),typeof ee=="function"?p.callback=ee:p===n(u)&&r(u),h(H)}else r(u);p=n(u)}if(p!==null)var ht=!0;else{var _e=n(s);_e!==null&&re(E,_e.startTime-H),ht=!1}return ht}finally{p=null,m=$,S=!1}}var v=!1,R=null,T=-1,z=5,O=-1;function X(){return!(e.unstable_now()-OD||125G?(D.sortIndex=$,t(s,D),n(u)===null&&D===n(s)&&(g?(f(T),T=-1):g=!0,re(E,$-G))):(D.sortIndex=ee,t(u,D),x||S||(x=!0,Ft(L))),D},e.unstable_shouldYield=X,e.unstable_wrapCallback=function(D){var H=m;return function(){var $=m;m=H;try{return D.apply(this,arguments)}finally{m=$}}}})(Uc);Oc.exports=Uc;var Yp=Oc.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Hc=C,Ye=Yp;function N(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),zi=Object.prototype.hasOwnProperty,Xp=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Gu={},Ju={};function Gp(e){return zi.call(Ju,e)?!0:zi.call(Gu,e)?!1:Xp.test(e)?Ju[e]=!0:(Gu[e]=!0,!1)}function Jp(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Zp(e,t,n,r){if(t===null||typeof t>"u"||Jp(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Oe(e,t,n,r,l,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var Ne={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ne[e]=new Oe(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ne[t]=new Oe(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ne[e]=new Oe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ne[e]=new Oe(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ne[e]=new Oe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ne[e]=new Oe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ne[e]=new Oe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ne[e]=new Oe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ne[e]=new Oe(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ua=/[\-:]([a-z])/g;function Ha(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Ua,Ha);Ne[t]=new Oe(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Ua,Ha);Ne[t]=new Oe(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Ua,Ha);Ne[t]=new Oe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ne[e]=new Oe(e,1,!1,e.toLowerCase(),null,!1,!1)});Ne.xlinkHref=new Oe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ne[e]=new Oe(e,1,!1,e.toLowerCase(),null,!0,!0)});function Aa(e,t,n,r){var l=Ne.hasOwnProperty(t)?Ne[t]:null;(l!==null?l.type!==0:r||!(2a||l[i]!==o[a]){var u=` +`+l[i].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}while(1<=i&&0<=a);break}}}finally{ni=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Fr(e):""}function qp(e){switch(e.tag){case 5:return Fr(e.type);case 16:return Fr("Lazy");case 13:return Fr("Suspense");case 19:return Fr("SuspenseList");case 0:case 2:case 15:return e=ri(e.type,!1),e;case 11:return e=ri(e.type.render,!1),e;case 1:return e=ri(e.type,!0),e;default:return""}}function Ui(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Bn:return"Fragment";case $n:return"Portal";case Ii:return"Profiler";case $a:return"StrictMode";case Fi:return"Suspense";case Oi:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Bc:return(e.displayName||"Context")+".Consumer";case $c:return(e._context.displayName||"Context")+".Provider";case Ba:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Va:return t=e.displayName||null,t!==null?t:Ui(e.type)||"Memo";case Wt:t=e._payload,e=e._init;try{return Ui(e(t))}catch{}}return null}function bp(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ui(t);case 8:return t===$a?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function an(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Wc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function eh(e){var t=Wc(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Tl(e){e._valueTracker||(e._valueTracker=eh(e))}function Qc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Wc(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ro(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Hi(e,t){var n=t.checked;return ue({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function qu(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=an(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Kc(e,t){t=t.checked,t!=null&&Aa(e,"checked",t,!1)}function Ai(e,t){Kc(e,t);var n=an(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?$i(e,t.type,n):t.hasOwnProperty("defaultValue")&&$i(e,t.type,an(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function bu(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function $i(e,t,n){(t!=="number"||ro(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Or=Array.isArray;function tr(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=jl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function qr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var $r={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},th=["Webkit","ms","Moz","O"];Object.keys($r).forEach(function(e){th.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),$r[t]=$r[e]})});function Jc(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||$r.hasOwnProperty(e)&&$r[e]?(""+t).trim():t+"px"}function Zc(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=Jc(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var nh=ue({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Wi(e,t){if(t){if(nh[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(N(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(N(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(N(61))}if(t.style!=null&&typeof t.style!="object")throw Error(N(62))}}function Qi(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ki=null;function Wa(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Yi=null,nr=null,rr=null;function ns(e){if(e=wl(e)){if(typeof Yi!="function")throw Error(N(280));var t=e.stateNode;t&&(t=Io(t),Yi(e.stateNode,e.type,t))}}function qc(e){nr?rr?rr.push(e):rr=[e]:nr=e}function bc(){if(nr){var e=nr,t=rr;if(rr=nr=null,ns(e),t)for(e=0;e>>=0,e===0?32:31-(ph(e)/hh|0)|0}var Dl=64,Ml=4194304;function Ur(e){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:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ao(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,o=e.pingedLanes,i=n&268435455;if(i!==0){var a=i&~l;a!==0?r=Ur(a):(o&=i,o!==0&&(r=Ur(o)))}else i=n&~l,i!==0?r=Ur(i):o!==0&&(r=Ur(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,o=t&-t,l>=o||l===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function yl(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-dt(t),e[t]=n}function gh(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Vr),ds=" ",fs=!1;function wd(e,t){switch(e){case"keyup":return Kh.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function xd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Vn=!1;function Xh(e,t){switch(e){case"compositionend":return xd(t);case"keypress":return t.which!==32?null:(fs=!0,ds);case"textInput":return e=t.data,e===ds&&fs?null:e;default:return null}}function Gh(e,t){if(Vn)return e==="compositionend"||!qa&&wd(e,t)?(e=yd(),Xl=Ga=Xt=null,Vn=!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=vs(n)}}function _d(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?_d(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Cd(){for(var e=window,t=ro();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ro(e.document)}return t}function ba(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function lm(e){var t=Cd(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&_d(n.ownerDocument.documentElement,n)){if(r!==null&&ba(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,o=Math.min(r.start,l);r=r.end===void 0?o:Math.min(r.end,l),!e.extend&&o>r&&(l=r,r=o,o=l),l=ys(n,o);var i=ys(n,r);l&&i&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Wn=null,bi=null,Qr=null,ea=!1;function gs(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ea||Wn==null||Wn!==ro(r)||(r=Wn,"selectionStart"in r&&ba(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}),Qr&&ll(Qr,r)||(Qr=r,r=co(bi,"onSelect"),0Yn||(e.current=ia[Yn],ia[Yn]=null,Yn--)}function b(e,t){Yn++,ia[Yn]=e.current,e.current=t}var un={},De=fn(un),Ae=fn(!1),Rn=un;function ur(e,t){var n=e.type.contextTypes;if(!n)return un;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},o;for(o in n)l[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function $e(e){return e=e.childContextTypes,e!=null}function po(){ne(Ae),ne(De)}function Cs(e,t,n){if(De.current!==un)throw Error(N(168));b(De,t),b(Ae,n)}function zd(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(N(108,bp(e)||"Unknown",l));return ue({},n,r)}function ho(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||un,Rn=De.current,b(De,e),b(Ae,Ae.current),!0}function Ps(e,t,n){var r=e.stateNode;if(!r)throw Error(N(169));n?(e=zd(e,t,Rn),r.__reactInternalMemoizedMergedChildContext=e,ne(Ae),ne(De),b(De,e)):ne(Ae),b(Ae,n)}var _t=null,Fo=!1,yi=!1;function Id(e){_t===null?_t=[e]:_t.push(e)}function vm(e){Fo=!0,Id(e)}function pn(){if(!yi&&_t!==null){yi=!0;var e=0,t=J;try{var n=_t;for(J=1;e>=i,l-=i,Ct=1<<32-dt(t)+l|n<T?(z=R,R=null):z=R.sibling;var O=m(f,R,h[T],E);if(O===null){R===null&&(R=z);break}e&&R&&O.alternate===null&&t(f,R),d=o(O,d,T),v===null?L=O:v.sibling=O,v=O,R=z}if(T===h.length)return n(f,R),oe&&gn(f,T),L;if(R===null){for(;TT?(z=R,R=null):z=R.sibling;var X=m(f,R,O.value,E);if(X===null){R===null&&(R=z);break}e&&R&&X.alternate===null&&t(f,R),d=o(X,d,T),v===null?L=X:v.sibling=X,v=X,R=z}if(O.done)return n(f,R),oe&&gn(f,T),L;if(R===null){for(;!O.done;T++,O=h.next())O=p(f,O.value,E),O!==null&&(d=o(O,d,T),v===null?L=O:v.sibling=O,v=O);return oe&&gn(f,T),L}for(R=r(f,R);!O.done;T++,O=h.next())O=S(R,f,T,O.value,E),O!==null&&(e&&O.alternate!==null&&R.delete(O.key===null?T:O.key),d=o(O,d,T),v===null?L=O:v.sibling=O,v=O);return e&&R.forEach(function(ve){return t(f,ve)}),oe&&gn(f,T),L}function P(f,d,h,E){if(typeof h=="object"&&h!==null&&h.type===Bn&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case Ll:e:{for(var L=h.key,v=d;v!==null;){if(v.key===L){if(L=h.type,L===Bn){if(v.tag===7){n(f,v.sibling),d=l(v,h.props.children),d.return=f,f=d;break e}}else if(v.elementType===L||typeof L=="object"&&L!==null&&L.$$typeof===Wt&&Ms(L)===v.type){n(f,v.sibling),d=l(v,h.props),d.ref=Nr(f,v,h),d.return=f,f=d;break e}n(f,v);break}else t(f,v);v=v.sibling}h.type===Bn?(d=Pn(h.props.children,f.mode,E,h.key),d.return=f,f=d):(E=no(h.type,h.key,h.props,null,f.mode,E),E.ref=Nr(f,d,h),E.return=f,f=E)}return i(f);case $n:e:{for(v=h.key;d!==null;){if(d.key===v)if(d.tag===4&&d.stateNode.containerInfo===h.containerInfo&&d.stateNode.implementation===h.implementation){n(f,d.sibling),d=l(d,h.children||[]),d.return=f,f=d;break e}else{n(f,d);break}else t(f,d);d=d.sibling}d=Ci(h,f.mode,E),d.return=f,f=d}return i(f);case Wt:return v=h._init,P(f,d,v(h._payload),E)}if(Or(h))return x(f,d,h,E);if(kr(h))return g(f,d,h,E);Al(f,h)}return typeof h=="string"&&h!==""||typeof h=="number"?(h=""+h,d!==null&&d.tag===6?(n(f,d.sibling),d=l(d,h),d.return=f,f=d):(n(f,d),d=_i(h,f.mode,E),d.return=f,f=d),i(f)):n(f,d)}return P}var cr=Vd(!0),Wd=Vd(!1),xl={},St=fn(xl),ul=fn(xl),sl=fn(xl);function En(e){if(e===xl)throw Error(N(174));return e}function uu(e,t){switch(b(sl,t),b(ul,e),b(St,xl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Vi(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Vi(t,e)}ne(St),b(St,t)}function dr(){ne(St),ne(ul),ne(sl)}function Qd(e){En(sl.current);var t=En(St.current),n=Vi(t,e.type);t!==n&&(b(ul,e),b(St,n))}function su(e){ul.current===e&&(ne(St),ne(ul))}var ie=fn(0);function xo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var gi=[];function cu(){for(var e=0;en?n:4,e(!0);var r=wi.transition;wi.transition={};try{e(!1),t()}finally{J=n,wi.transition=r}}function uf(){return lt().memoizedState}function xm(e,t,n){var r=nn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},sf(e))cf(t,n);else if(n=Hd(e,t,n,r),n!==null){var l=Ie();ft(n,e,r,l),df(n,t,r)}}function Sm(e,t,n){var r=nn(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(sf(e))cf(t,l);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,a=o(i,n);if(l.hasEagerState=!0,l.eagerState=a,pt(a,i)){var u=t.interleaved;u===null?(l.next=l,iu(t)):(l.next=u.next,u.next=l),t.interleaved=l;return}}catch{}finally{}n=Hd(e,t,l,r),n!==null&&(l=Ie(),ft(n,e,r,l),df(n,t,r))}}function sf(e){var t=e.alternate;return e===ae||t!==null&&t===ae}function cf(e,t){Kr=So=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function df(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ka(e,n)}}var Eo={readContext:rt,useCallback:Le,useContext:Le,useEffect:Le,useImperativeHandle:Le,useInsertionEffect:Le,useLayoutEffect:Le,useMemo:Le,useReducer:Le,useRef:Le,useState:Le,useDebugValue:Le,useDeferredValue:Le,useTransition:Le,useMutableSource:Le,useSyncExternalStore:Le,useId:Le,unstable_isNewReconciler:!1},Em={readContext:rt,useCallback:function(e,t){return gt().memoizedState=[e,t===void 0?null:t],e},useContext:rt,useEffect:Is,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ql(4194308,4,nf.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ql(4194308,4,e,t)},useInsertionEffect:function(e,t){return ql(4,2,e,t)},useMemo:function(e,t){var n=gt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=gt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=xm.bind(null,ae,e),[r.memoizedState,e]},useRef:function(e){var t=gt();return e={current:e},t.memoizedState=e},useState:zs,useDebugValue:mu,useDeferredValue:function(e){return gt().memoizedState=e},useTransition:function(){var e=zs(!1),t=e[0];return e=wm.bind(null,e[1]),gt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ae,l=gt();if(oe){if(n===void 0)throw Error(N(407));n=n()}else{if(n=t(),ke===null)throw Error(N(349));Ln&30||Xd(r,t,n)}l.memoizedState=n;var o={value:n,getSnapshot:t};return l.queue=o,Is(Jd.bind(null,r,o,e),[e]),r.flags|=2048,fl(9,Gd.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=gt(),t=ke.identifierPrefix;if(oe){var n=Pt,r=Ct;n=(r&~(1<<32-dt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=cl++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[wt]=t,e[al]=r,xf(e,t,!1,!1),t.stateNode=e;e:{switch(i=Qi(n,r),n){case"dialog":te("cancel",e),te("close",e),l=r;break;case"iframe":case"object":case"embed":te("load",e),l=r;break;case"video":case"audio":for(l=0;lpr&&(t.flags|=128,r=!0,Lr(o,!1),t.lanes=4194304)}else{if(!r)if(e=xo(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Lr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!oe)return Te(t),null}else 2*pe()-o.renderingStartTime>pr&&n!==1073741824&&(t.flags|=128,r=!0,Lr(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(n=o.last,n!==null?n.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=pe(),t.sibling=null,n=ie.current,b(ie,r?n&1|2:n&1),t):(Te(t),null);case 22:case 23:return Su(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?We&1073741824&&(Te(t),t.subtreeFlags&6&&(t.flags|=8192)):Te(t),null;case 24:return null;case 25:return null}throw Error(N(156,t.tag))}function Tm(e,t){switch(tu(t),t.tag){case 1:return $e(t.type)&&po(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return dr(),ne(Ae),ne(De),cu(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return su(t),null;case 13:if(ne(ie),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(N(340));sr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ne(ie),null;case 4:return dr(),null;case 10:return ou(t.type._context),null;case 22:case 23:return Su(),null;case 24:return null;default:return null}}var Bl=!1,je=!1,jm=typeof WeakSet=="function"?WeakSet:Set,M=null;function Zn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ce(e,t,r)}else n.current=null}function ga(e,t,n){try{n()}catch(r){ce(e,t,r)}}var Ws=!1;function Dm(e,t){if(ta=uo,e=Cd(),ba(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 l=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,a=-1,u=-1,s=0,c=0,p=e,m=null;t:for(;;){for(var S;p!==n||l!==0&&p.nodeType!==3||(a=i+l),p!==o||r!==0&&p.nodeType!==3||(u=i+r),p.nodeType===3&&(i+=p.nodeValue.length),(S=p.firstChild)!==null;)m=p,p=S;for(;;){if(p===e)break t;if(m===n&&++s===l&&(a=i),m===o&&++c===r&&(u=i),(S=p.nextSibling)!==null)break;p=m,m=p.parentNode}p=S}n=a===-1||u===-1?null:{start:a,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(na={focusedElem:e,selectionRange:n},uo=!1,M=t;M!==null;)if(t=M,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,M=e;else for(;M!==null;){t=M;try{var x=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var g=x.memoizedProps,P=x.memoizedState,f=t.stateNode,d=f.getSnapshotBeforeUpdate(t.elementType===t.type?g:at(t.type,g),P);f.__reactInternalSnapshotBeforeUpdate=d}break;case 3:var h=t.stateNode.containerInfo;h.nodeType===1?h.textContent="":h.nodeType===9&&h.documentElement&&h.removeChild(h.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(N(163))}}catch(E){ce(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,M=e;break}M=t.return}return x=Ws,Ws=!1,x}function Yr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var o=l.destroy;l.destroy=void 0,o!==void 0&&ga(t,n,o)}l=l.next}while(l!==r)}}function Ho(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function wa(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function kf(e){var t=e.alternate;t!==null&&(e.alternate=null,kf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[wt],delete t[al],delete t[oa],delete t[hm],delete t[mm])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function _f(e){return e.tag===5||e.tag===3||e.tag===4}function Qs(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||_f(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.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 xa(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=fo));else if(r!==4&&(e=e.child,e!==null))for(xa(e,t,n),e=e.sibling;e!==null;)xa(e,t,n),e=e.sibling}function Sa(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&&(e=e.child,e!==null))for(Sa(e,t,n),e=e.sibling;e!==null;)Sa(e,t,n),e=e.sibling}var Pe=null,ut=!1;function $t(e,t,n){for(n=n.child;n!==null;)Cf(e,t,n),n=n.sibling}function Cf(e,t,n){if(xt&&typeof xt.onCommitFiberUnmount=="function")try{xt.onCommitFiberUnmount(jo,n)}catch{}switch(n.tag){case 5:je||Zn(n,t);case 6:var r=Pe,l=ut;Pe=null,$t(e,t,n),Pe=r,ut=l,Pe!==null&&(ut?(e=Pe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Pe.removeChild(n.stateNode));break;case 18:Pe!==null&&(ut?(e=Pe,n=n.stateNode,e.nodeType===8?vi(e.parentNode,n):e.nodeType===1&&vi(e,n),nl(e)):vi(Pe,n.stateNode));break;case 4:r=Pe,l=ut,Pe=n.stateNode.containerInfo,ut=!0,$t(e,t,n),Pe=r,ut=l;break;case 0:case 11:case 14:case 15:if(!je&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var o=l,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&ga(n,t,i),l=l.next}while(l!==r)}$t(e,t,n);break;case 1:if(!je&&(Zn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){ce(n,t,a)}$t(e,t,n);break;case 21:$t(e,t,n);break;case 22:n.mode&1?(je=(r=je)||n.memoizedState!==null,$t(e,t,n),je=r):$t(e,t,n);break;default:$t(e,t,n)}}function Ks(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new jm),t.forEach(function(r){var l=$m.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function it(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=i),r&=~o}if(r=l,r=pe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*zm(r/1960))-r,10e?16:e,Gt===null)var r=!1;else{if(e=Gt,Gt=null,Co=0,Y&6)throw Error(N(331));var l=Y;for(Y|=4,M=e.current;M!==null;){var o=M,i=o.child;if(M.flags&16){var a=o.deletions;if(a!==null){for(var u=0;upe()-wu?Cn(e,0):gu|=n),Be(e,t)}function Mf(e,t){t===0&&(e.mode&1?(t=Ml,Ml<<=1,!(Ml&130023424)&&(Ml=4194304)):t=1);var n=Ie();e=Dt(e,t),e!==null&&(yl(e,t,n),Be(e,n))}function Am(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Mf(e,n)}function $m(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(N(314))}r!==null&&r.delete(t),Mf(e,n)}var zf;zf=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ae.current)He=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return He=!1,Nm(e,t,n);He=!!(e.flags&131072)}else He=!1,oe&&t.flags&1048576&&Fd(t,vo,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;bl(e,t),e=t.pendingProps;var l=ur(t,De.current);or(t,n),l=fu(null,t,r,e,l,n);var o=pu();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,$e(r)?(o=!0,ho(t)):o=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,au(t),l.updater=Oo,t.stateNode=l,l._reactInternals=t,da(t,r,e,n),t=ha(null,t,r,!0,o,n)):(t.tag=0,oe&&o&&eu(t),ze(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(bl(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=Vm(r),e=at(r,e),l){case 0:t=pa(null,t,r,e,n);break e;case 1:t=$s(null,t,r,e,n);break e;case 11:t=Hs(null,t,r,e,n);break e;case 14:t=As(null,t,r,at(r.type,e),n);break e}throw Error(N(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:at(r,l),pa(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:at(r,l),$s(e,t,r,l,n);case 3:e:{if(yf(t),e===null)throw Error(N(387));r=t.pendingProps,o=t.memoizedState,l=o.element,Ad(e,t),wo(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){l=fr(Error(N(423)),t),t=Bs(e,t,r,n,l);break e}else if(r!==l){l=fr(Error(N(424)),t),t=Bs(e,t,r,n,l);break e}else for(Qe=bt(t.stateNode.containerInfo.firstChild),Ke=t,oe=!0,ct=null,n=Wd(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(sr(),r===l){t=Mt(e,t,n);break e}ze(e,t,r,n)}t=t.child}return t;case 5:return Qd(t),e===null&&ua(t),r=t.type,l=t.pendingProps,o=e!==null?e.memoizedProps:null,i=l.children,ra(r,l)?i=null:o!==null&&ra(r,o)&&(t.flags|=32),vf(e,t),ze(e,t,i,n),t.child;case 6:return e===null&&ua(t),null;case 13:return gf(e,t,n);case 4:return uu(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=cr(t,null,r,n):ze(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:at(r,l),Hs(e,t,r,l,n);case 7:return ze(e,t,t.pendingProps,n),t.child;case 8:return ze(e,t,t.pendingProps.children,n),t.child;case 12:return ze(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,o=t.memoizedProps,i=l.value,b(yo,r._currentValue),r._currentValue=i,o!==null)if(pt(o.value,i)){if(o.children===l.children&&!Ae.current){t=Mt(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){i=o.child;for(var u=a.firstContext;u!==null;){if(u.context===r){if(o.tag===1){u=Nt(-1,n&-n),u.tag=2;var s=o.updateQueue;if(s!==null){s=s.shared;var c=s.pending;c===null?u.next=u:(u.next=c.next,c.next=u),s.pending=u}}o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),sa(o.return,n,t),a.lanes|=n;break}u=u.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(N(341));i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),sa(i,n,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}ze(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,or(t,n),l=rt(l),r=r(l),t.flags|=1,ze(e,t,r,n),t.child;case 14:return r=t.type,l=at(r,t.pendingProps),l=at(r.type,l),As(e,t,r,l,n);case 15:return hf(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:at(r,l),bl(e,t),t.tag=1,$e(r)?(e=!0,ho(t)):e=!1,or(t,n),Bd(t,r,l),da(t,r,l,n),ha(null,t,r,!0,e,n);case 19:return wf(e,t,n);case 22:return mf(e,t,n)}throw Error(N(156,t.tag))};function If(e,t){return id(e,t)}function Bm(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function tt(e,t,n,r){return new Bm(e,t,n,r)}function ku(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Vm(e){if(typeof e=="function")return ku(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ba)return 11;if(e===Va)return 14}return 2}function rn(e,t){var n=e.alternate;return n===null?(n=tt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function no(e,t,n,r,l,o){var i=2;if(r=e,typeof e=="function")ku(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Bn:return Pn(n.children,l,o,t);case $a:i=8,l|=8;break;case Ii:return e=tt(12,n,t,l|2),e.elementType=Ii,e.lanes=o,e;case Fi:return e=tt(13,n,t,l),e.elementType=Fi,e.lanes=o,e;case Oi:return e=tt(19,n,t,l),e.elementType=Oi,e.lanes=o,e;case Vc:return $o(n,l,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case $c:i=10;break e;case Bc:i=9;break e;case Ba:i=11;break e;case Va:i=14;break e;case Wt:i=16,r=null;break e}throw Error(N(130,e==null?e:typeof e,""))}return t=tt(i,n,t,l),t.elementType=e,t.type=r,t.lanes=o,t}function Pn(e,t,n,r){return e=tt(7,e,r,t),e.lanes=n,e}function $o(e,t,n,r){return e=tt(22,e,r,t),e.elementType=Vc,e.lanes=n,e.stateNode={isHidden:!1},e}function _i(e,t,n){return e=tt(6,e,null,t),e.lanes=n,e}function Ci(e,t,n){return t=tt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Wm(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=oi(0),this.expirationTimes=oi(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=oi(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function _u(e,t,n,r,l,o,i,a,u){return e=new Wm(e,t,n,a,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=tt(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},au(o),e}function Qm(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Hf)}catch(e){console.error(e)}}Hf(),Fc.exports=Xe;var Nu=Fc.exports;const Af=Cc(Nu),Jm=_c({__proto__:null,default:Af},[Nu]);var ec=Nu;Mi.createRoot=ec.createRoot,Mi.hydrateRoot=ec.hydrateRoot;const Lu=C.createContext({isActive:!1,displayModal:()=>{},removeModal:()=>{}}),Zm=({children:e})=>{const[t,n]=C.useState(!1),o={isActive:t,displayModal:()=>{n(!0)},removeModal:()=>{n(!1)}};return _.jsx(Lu.Provider,{value:o,children:e})};/** + * @remix-run/router v1.14.1 + * + * 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 + */function de(){return de=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Dn(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function bm(){return Math.random().toString(36).substr(2,8)}function nc(e,t){return{usr:e.state,key:e.key,idx:t}}function hl(e,t,n,r){return n===void 0&&(n=null),de({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?It(t):t,{state:n,key:t&&t.key||r||bm()})}function Mn(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function It(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function ev(e,t,n,r){r===void 0&&(r={});let{window:l=document.defaultView,v5Compat:o=!1}=r,i=l.history,a=fe.Pop,u=null,s=c();s==null&&(s=0,i.replaceState(de({},i.state,{idx:s}),""));function c(){return(i.state||{idx:null}).idx}function p(){a=fe.Pop;let P=c(),f=P==null?null:P-s;s=P,u&&u({action:a,location:g.location,delta:f})}function m(P,f){a=fe.Push;let d=hl(g.location,P,f);n&&n(d,P),s=c()+1;let h=nc(d,s),E=g.createHref(d);try{i.pushState(h,"",E)}catch(L){if(L instanceof DOMException&&L.name==="DataCloneError")throw L;l.location.assign(E)}o&&u&&u({action:a,location:g.location,delta:1})}function S(P,f){a=fe.Replace;let d=hl(g.location,P,f);n&&n(d,P),s=c();let h=nc(d,s),E=g.createHref(d);i.replaceState(h,"",E),o&&u&&u({action:a,location:g.location,delta:0})}function x(P){let f=l.location.origin!=="null"?l.location.origin:l.location.href,d=typeof P=="string"?P:Mn(P);return V(f,"No window.location.(origin|href) available to create URL for href: "+d),new URL(d,f)}let g={get action(){return a},get location(){return e(l,i)},listen(P){if(u)throw new Error("A history only accepts one active listener");return l.addEventListener(tc,p),u=P,()=>{l.removeEventListener(tc,p),u=null}},createHref(P){return t(l,P)},createURL:x,encodeLocation(P){let f=x(P);return{pathname:f.pathname,search:f.search,hash:f.hash}},push:m,replace:S,go(P){return i.go(P)}};return g}var se;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(se||(se={}));const tv=new Set(["lazy","caseSensitive","path","id","index","children"]);function nv(e){return e.index===!0}function Pa(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((l,o)=>{let i=[...n,o],a=typeof l.id=="string"?l.id:i.join("-");if(V(l.index!==!0||!l.children,"Cannot specify children on an index route"),V(!r[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),nv(l)){let u=de({},l,t(l),{id:a});return r[a]=u,u}else{let u=de({},l,t(l),{id:a,children:void 0});return r[a]=u,l.children&&(u.children=Pa(l.children,t,i,r)),u}})}function bn(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?It(t):t,l=sn(r.pathname||"/",n);if(l==null)return null;let o=$f(e);lv(o);let i=null;for(let a=0;i==null&&a{let u={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};u.relativePath.startsWith("/")&&(V(u.relativePath.startsWith(r),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(r.length));let s=Lt([r,u.relativePath]),c=n.concat(u);o.children&&o.children.length>0&&(V(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+s+'".')),$f(o.children,t,c,s)),!(o.path==null&&!o.index)&&t.push({path:s,score:dv(s,o.index),routesMeta:c})};return e.forEach((o,i)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))l(o,i);else for(let u of Bf(o.path))l(o,i,u)}),t}function Bf(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,l=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return l?[o,""]:[o];let i=Bf(r.join("/")),a=[];return a.push(...i.map(u=>u===""?o:[o,u].join("/"))),l&&a.push(...i),a.map(u=>e.startsWith("/")&&u===""?"/":u)}function lv(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:fv(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const ov=/^:\w+$/,iv=3,av=2,uv=1,sv=10,cv=-2,rc=e=>e==="*";function dv(e,t){let n=e.split("/"),r=n.length;return n.some(rc)&&(r+=cv),t&&(r+=av),n.filter(l=>!rc(l)).reduce((l,o)=>l+(ov.test(o)?iv:o===""?uv:sv),r)}function fv(e,t){return e.length===t.length&&e.slice(0,-1).every((r,l)=>r===t[l])?e[e.length-1]-t[t.length-1]:0}function pv(e,t){let{routesMeta:n}=e,r={},l="/",o=[];for(let i=0;i{let{paramName:m,isOptional:S}=c;if(m==="*"){let g=a[p]||"";i=o.slice(0,o.length-g.length).replace(/(.)\/+$/,"$1")}const x=a[p];return S&&!x?s[m]=void 0:s[m]=vv(x||"",m),s},{}),pathname:o,pathnameBase:i,pattern:e}}function hv(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Dn(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=[],l="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:(\w+)(\?)?/g,(i,a,u)=>(r.push({paramName:a,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,t?void 0:"i"),r]}function mv(e){try{return decodeURI(e)}catch(t){return Dn(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function vv(e,t){try{return decodeURIComponent(e)}catch(n){return Dn(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function sn(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)||"/"}function yv(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:l=""}=typeof e=="string"?It(e):e;return{pathname:n?n.startsWith("/")?n:gv(n,t):t,search:xv(r),hash:Sv(l)}}function gv(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(l=>{l===".."?n.length>1&&n.pop():l!=="."&&n.push(l)}),n.length>1?n.join("/"):"/"}function Pi(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 Vf(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Tu(e,t){let n=Vf(e);return t?n.map((r,l)=>l===e.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function ju(e,t,n,r){r===void 0&&(r=!1);let l;typeof e=="string"?l=It(e):(l=de({},e),V(!l.pathname||!l.pathname.includes("?"),Pi("?","pathname","search",l)),V(!l.pathname||!l.pathname.includes("#"),Pi("#","pathname","hash",l)),V(!l.search||!l.search.includes("#"),Pi("#","search","hash",l)));let o=e===""||l.pathname==="",i=o?"/":l.pathname,a;if(i==null)a=n;else{let p=t.length-1;if(!r&&i.startsWith("..")){let m=i.split("/");for(;m[0]==="..";)m.shift(),p-=1;l.pathname=m.join("/")}a=p>=0?t[p]:"/"}let u=yv(l,a),s=i&&i!=="/"&&i.endsWith("/"),c=(o||i===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(s||c)&&(u.pathname+="/"),u}const Lt=e=>e.join("/").replace(/\/\/+/g,"/"),wv=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),xv=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Sv=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Du{constructor(t,n,r,l){l===void 0&&(l=!1),this.status=t,this.statusText=n||"",this.internal=l,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function Wf(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Qf=["post","put","patch","delete"],Ev=new Set(Qf),kv=["get",...Qf],_v=new Set(kv),Cv=new Set([301,302,303,307,308]),Pv=new Set([307,308]),Ri={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Rv={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},jr={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Kf=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Nv=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Yf="remix-router-transitions";function Lv(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;V(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let l;if(e.mapRouteProperties)l=e.mapRouteProperties;else if(e.detectErrorBoundary){let y=e.detectErrorBoundary;l=w=>({hasErrorBoundary:y(w)})}else l=Nv;let o={},i=Pa(e.routes,l,void 0,o),a,u=e.basename||"/",s=de({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1},e.future),c=null,p=new Set,m=null,S=null,x=null,g=e.hydrationData!=null,P=bn(i,e.history.location,u),f=null;if(P==null){let y=qe(404,{pathname:e.history.location.pathname}),{matches:w,route:k}=dc(i);P=w,f={[k.id]:y}}let d,h=P.some(y=>y.route.lazy),E=P.some(y=>y.route.loader);if(h)d=!1;else if(!E)d=!0;else if(s.v7_partialHydration){let y=e.hydrationData?e.hydrationData.loaderData:null,w=e.hydrationData?e.hydrationData.errors:null;d=P.every(k=>k.route.loader&&k.route.loader.hydrate!==!0&&(y&&y[k.route.id]!==void 0||w&&w[k.route.id]!==void 0))}else d=e.hydrationData!=null;let L,v={historyAction:e.history.action,location:e.history.location,matches:P,initialized:d,navigation:Ri,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||f,fetchers:new Map,blockers:new Map},R=fe.Pop,T=!1,z,O=!1,X=new Map,ve=null,he=!1,Je=!1,Fn=[],Ft=[],re=new Map,D=0,H=-1,$=new Map,G=new Set,ee=new Map,ht=new Map,_e=new Set,ot=new Map,Me=new Map,Ot=!1;function ap(){if(c=e.history.listen(y=>{let{action:w,location:k,delta:j}=y;if(Ot){Ot=!1;return}Dn(Me.size===0||j!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let I=Vu({currentLocation:v.location,nextLocation:k,historyAction:w});if(I&&j!=null){Ot=!0,e.history.go(j*-1),Cl(I,{state:"blocked",location:k,proceed(){Cl(I,{state:"proceeding",proceed:void 0,reset:void 0,location:k}),e.history.go(j)},reset(){let W=new Map(v.blockers);W.set(I,jr),Ve({blockers:W})}});return}return vn(w,k)}),n){Av(t,X);let y=()=>$v(t,X);t.addEventListener("pagehide",y),ve=()=>t.removeEventListener("pagehide",y)}return v.initialized||vn(fe.Pop,v.location,{initialHydration:!0}),L}function up(){c&&c(),ve&&ve(),p.clear(),z&&z.abort(),v.fetchers.forEach((y,w)=>_l(w)),v.blockers.forEach((y,w)=>Bu(w))}function sp(y){return p.add(y),()=>p.delete(y)}function Ve(y,w){w===void 0&&(w={}),v=de({},v,y);let k=[],j=[];s.v7_fetcherPersist&&v.fetchers.forEach((I,W)=>{I.state==="idle"&&(_e.has(W)?j.push(W):k.push(W))}),[...p].forEach(I=>I(v,{deletedFetchers:j,unstable_viewTransitionOpts:w.viewTransitionOpts,unstable_flushSync:w.flushSync===!0})),s.v7_fetcherPersist&&(k.forEach(I=>v.fetchers.delete(I)),j.forEach(I=>_l(I)))}function wr(y,w,k){var j,I;let{flushSync:W}=k===void 0?{}:k,A=v.actionData!=null&&v.navigation.formMethod!=null&&st(v.navigation.formMethod)&&v.navigation.state==="loading"&&((j=y.state)==null?void 0:j._isRedirect)!==!0,U;w.actionData?Object.keys(w.actionData).length>0?U=w.actionData:U=null:A?U=v.actionData:U=null;let F=w.loaderData?cc(v.loaderData,w.loaderData,w.matches||[],w.errors):v.loaderData,K=v.blockers;K.size>0&&(K=new Map(K),K.forEach((q,Ce)=>K.set(Ce,jr)));let we=T===!0||v.navigation.formMethod!=null&&st(v.navigation.formMethod)&&((I=y.state)==null?void 0:I._isRedirect)!==!0;a&&(i=a,a=void 0),he||R===fe.Pop||(R===fe.Push?e.history.push(y,y.state):R===fe.Replace&&e.history.replace(y,y.state));let B;if(R===fe.Pop){let q=X.get(v.location.pathname);q&&q.has(y.pathname)?B={currentLocation:v.location,nextLocation:y}:X.has(y.pathname)&&(B={currentLocation:y,nextLocation:v.location})}else if(O){let q=X.get(v.location.pathname);q?q.add(y.pathname):(q=new Set([y.pathname]),X.set(v.location.pathname,q)),B={currentLocation:v.location,nextLocation:y}}Ve(de({},w,{actionData:U,loaderData:F,historyAction:R,location:y,initialized:!0,navigation:Ri,revalidation:"idle",restoreScrollPosition:Qu(y,w.matches||v.matches),preventScrollReset:we,blockers:K}),{viewTransitionOpts:B,flushSync:W===!0}),R=fe.Pop,T=!1,O=!1,he=!1,Je=!1,Fn=[],Ft=[]}async function Fu(y,w){if(typeof y=="number"){e.history.go(y);return}let k=Na(v.location,v.matches,u,s.v7_prependBasename,y,s.v7_relativeSplatPath,w==null?void 0:w.fromRouteId,w==null?void 0:w.relative),{path:j,submission:I,error:W}=lc(s.v7_normalizeFormMethod,!1,k,w),A=v.location,U=hl(v.location,j,w&&w.state);U=de({},U,e.history.encodeLocation(U));let F=w&&w.replace!=null?w.replace:void 0,K=fe.Push;F===!0?K=fe.Replace:F===!1||I!=null&&st(I.formMethod)&&I.formAction===v.location.pathname+v.location.search&&(K=fe.Replace);let we=w&&"preventScrollReset"in w?w.preventScrollReset===!0:void 0,B=(w&&w.unstable_flushSync)===!0,q=Vu({currentLocation:A,nextLocation:U,historyAction:K});if(q){Cl(q,{state:"blocked",location:U,proceed(){Cl(q,{state:"proceeding",proceed:void 0,reset:void 0,location:U}),Fu(y,w)},reset(){let Ce=new Map(v.blockers);Ce.set(q,jr),Ve({blockers:Ce})}});return}return await vn(K,U,{submission:I,pendingError:W,preventScrollReset:we,replace:w&&w.replace,enableViewTransition:w&&w.unstable_viewTransition,flushSync:B})}function cp(){if(Xo(),Ve({revalidation:"loading"}),v.navigation.state!=="submitting"){if(v.navigation.state==="idle"){vn(v.historyAction,v.location,{startUninterruptedRevalidation:!0});return}vn(R||v.historyAction,v.navigation.location,{overrideNavigation:v.navigation})}}async function vn(y,w,k){z&&z.abort(),z=null,R=y,he=(k&&k.startUninterruptedRevalidation)===!0,wp(v.location,v.matches),T=(k&&k.preventScrollReset)===!0,O=(k&&k.enableViewTransition)===!0;let j=a||i,I=k&&k.overrideNavigation,W=bn(j,w,u),A=(k&&k.flushSync)===!0;if(!W){let Ce=qe(404,{pathname:w.pathname}),{matches:Ze,route:xe}=dc(j);Go(),wr(w,{matches:Ze,loaderData:{},errors:{[xe.id]:Ce}},{flushSync:A});return}if(v.initialized&&!Je&&zv(v.location,w)&&!(k&&k.submission&&st(k.submission.formMethod))){wr(w,{matches:W},{flushSync:A});return}z=new AbortController;let U=Mr(e.history,w,z.signal,k&&k.submission),F,K;if(k&&k.pendingError)K={[Jr(W).route.id]:k.pendingError};else if(k&&k.submission&&st(k.submission.formMethod)){let Ce=await dp(U,w,k.submission,W,{replace:k.replace,flushSync:A});if(Ce.shortCircuited)return;F=Ce.pendingActionData,K=Ce.pendingActionError,I=Ni(w,k.submission),A=!1,U=new Request(U.url,{signal:U.signal})}let{shortCircuited:we,loaderData:B,errors:q}=await fp(U,w,W,I,k&&k.submission,k&&k.fetcherSubmission,k&&k.replace,k&&k.initialHydration===!0,A,F,K);we||(z=null,wr(w,de({matches:W},F?{actionData:F}:{},{loaderData:B,errors:q})))}async function dp(y,w,k,j,I){I===void 0&&(I={}),Xo();let W=Uv(w,k);Ve({navigation:W},{flushSync:I.flushSync===!0});let A,U=Ta(j,w);if(!U.route.action&&!U.route.lazy)A={type:se.error,error:qe(405,{method:y.method,pathname:w.pathname,routeId:U.route.id})};else if(A=await Dr("action",y,U,j,o,l,u,s.v7_relativeSplatPath),y.signal.aborted)return{shortCircuited:!0};if(_n(A)){let F;return I&&I.replace!=null?F=I.replace:F=A.location===v.location.pathname+v.location.search,await xr(v,A,{submission:k,replace:F}),{shortCircuited:!0}}if(er(A)){let F=Jr(j,U.route.id);return(I&&I.replace)!==!0&&(R=fe.Push),{pendingActionData:{},pendingActionError:{[F.route.id]:A.error}}}if(kn(A))throw qe(400,{type:"defer-action"});return{pendingActionData:{[U.route.id]:A.data}}}async function fp(y,w,k,j,I,W,A,U,F,K,we){let B=j||Ni(w,I),q=I||W||hc(B),Ce=a||i,[Ze,xe]=oc(e.history,v,k,q,w,s.v7_partialHydration&&U===!0,Je,Fn,Ft,_e,ee,G,Ce,u,K,we);if(Go(Z=>!(k&&k.some(le=>le.route.id===Z))||Ze&&Ze.some(le=>le.route.id===Z)),H=++D,Ze.length===0&&xe.length===0){let Z=Au();return wr(w,de({matches:k,loaderData:{},errors:we||null},K?{actionData:K}:{},Z?{fetchers:new Map(v.fetchers)}:{}),{flushSync:F}),{shortCircuited:!0}}if(!he&&(!s.v7_partialHydration||!U)){xe.forEach(le=>{let mt=v.fetchers.get(le.key),Rl=zr(void 0,mt?mt.data:void 0);v.fetchers.set(le.key,Rl)});let Z=K||v.actionData;Ve(de({navigation:B},Z?Object.keys(Z).length===0?{actionData:null}:{actionData:Z}:{},xe.length>0?{fetchers:new Map(v.fetchers)}:{}),{flushSync:F})}xe.forEach(Z=>{re.has(Z.key)&&Ht(Z.key),Z.controller&&re.set(Z.key,Z.controller)});let On=()=>xe.forEach(Z=>Ht(Z.key));z&&z.signal.addEventListener("abort",On);let{results:Jo,loaderResults:Un,fetcherResults:At}=await Ou(v.matches,k,Ze,xe,y);if(y.signal.aborted)return{shortCircuited:!0};z&&z.signal.removeEventListener("abort",On),xe.forEach(Z=>re.delete(Z.key));let yn=fc(Jo);if(yn){if(yn.idx>=Ze.length){let Z=xe[yn.idx-Ze.length].key;G.add(Z)}return await xr(v,yn.result,{replace:A}),{shortCircuited:!0}}let{loaderData:Zo,errors:qo}=sc(v,k,Ze,Un,we,xe,At,ot);ot.forEach((Z,le)=>{Z.subscribe(mt=>{(mt||Z.done)&&ot.delete(le)})});let bo=Au(),Hn=$u(H),Pl=bo||Hn||xe.length>0;return de({loaderData:Zo,errors:qo},Pl?{fetchers:new Map(v.fetchers)}:{})}function pp(y,w,k,j){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");re.has(y)&&Ht(y);let I=(j&&j.unstable_flushSync)===!0,W=a||i,A=Na(v.location,v.matches,u,s.v7_prependBasename,k,s.v7_relativeSplatPath,w,j==null?void 0:j.relative),U=bn(W,A,u);if(!U){Sr(y,w,qe(404,{pathname:A}),{flushSync:I});return}let{path:F,submission:K,error:we}=lc(s.v7_normalizeFormMethod,!0,A,j);if(we){Sr(y,w,we,{flushSync:I});return}let B=Ta(U,F);if(T=(j&&j.preventScrollReset)===!0,K&&st(K.formMethod)){hp(y,w,F,B,U,I,K);return}ee.set(y,{routeId:w,path:F}),mp(y,w,F,B,U,I,K)}async function hp(y,w,k,j,I,W,A){if(Xo(),ee.delete(y),!j.route.action&&!j.route.lazy){let le=qe(405,{method:A.formMethod,pathname:k,routeId:w});Sr(y,w,le,{flushSync:W});return}let U=v.fetchers.get(y);Ut(y,Hv(A,U),{flushSync:W});let F=new AbortController,K=Mr(e.history,k,F.signal,A);re.set(y,F);let we=D,B=await Dr("action",K,j,I,o,l,u,s.v7_relativeSplatPath);if(K.signal.aborted){re.get(y)===F&&re.delete(y);return}if(s.v7_fetcherPersist&&_e.has(y)){if(_n(B)||er(B)){Ut(y,Vt(void 0));return}}else{if(_n(B))if(re.delete(y),H>we){Ut(y,Vt(void 0));return}else return G.add(y),Ut(y,zr(A)),xr(v,B,{fetcherSubmission:A});if(er(B)){Sr(y,w,B.error);return}}if(kn(B))throw qe(400,{type:"defer-action"});let q=v.navigation.location||v.location,Ce=Mr(e.history,q,F.signal),Ze=a||i,xe=v.navigation.state!=="idle"?bn(Ze,v.navigation.location,u):v.matches;V(xe,"Didn't find any matches after fetcher action");let On=++D;$.set(y,On);let Jo=zr(A,B.data);v.fetchers.set(y,Jo);let[Un,At]=oc(e.history,v,xe,A,q,!1,Je,Fn,Ft,_e,ee,G,Ze,u,{[j.route.id]:B.data},void 0);At.filter(le=>le.key!==y).forEach(le=>{let mt=le.key,Rl=v.fetchers.get(mt),Sp=zr(void 0,Rl?Rl.data:void 0);v.fetchers.set(mt,Sp),re.has(mt)&&Ht(mt),le.controller&&re.set(mt,le.controller)}),Ve({fetchers:new Map(v.fetchers)});let yn=()=>At.forEach(le=>Ht(le.key));F.signal.addEventListener("abort",yn);let{results:Zo,loaderResults:qo,fetcherResults:bo}=await Ou(v.matches,xe,Un,At,Ce);if(F.signal.aborted)return;F.signal.removeEventListener("abort",yn),$.delete(y),re.delete(y),At.forEach(le=>re.delete(le.key));let Hn=fc(Zo);if(Hn){if(Hn.idx>=Un.length){let le=At[Hn.idx-Un.length].key;G.add(le)}return xr(v,Hn.result)}let{loaderData:Pl,errors:Z}=sc(v,v.matches,Un,qo,void 0,At,bo,ot);if(v.fetchers.has(y)){let le=Vt(B.data);v.fetchers.set(y,le)}$u(On),v.navigation.state==="loading"&&On>H?(V(R,"Expected pending action"),z&&z.abort(),wr(v.navigation.location,{matches:xe,loaderData:Pl,errors:Z,fetchers:new Map(v.fetchers)})):(Ve({errors:Z,loaderData:cc(v.loaderData,Pl,xe,Z),fetchers:new Map(v.fetchers)}),Je=!1)}async function mp(y,w,k,j,I,W,A){let U=v.fetchers.get(y);Ut(y,zr(A,U?U.data:void 0),{flushSync:W});let F=new AbortController,K=Mr(e.history,k,F.signal);re.set(y,F);let we=D,B=await Dr("loader",K,j,I,o,l,u,s.v7_relativeSplatPath);if(kn(B)&&(B=await Jf(B,K.signal,!0)||B),re.get(y)===F&&re.delete(y),!K.signal.aborted){if(_e.has(y)){Ut(y,Vt(void 0));return}if(_n(B))if(H>we){Ut(y,Vt(void 0));return}else{G.add(y),await xr(v,B);return}if(er(B)){Sr(y,w,B.error);return}V(!kn(B),"Unhandled fetcher deferred data"),Ut(y,Vt(B.data))}}async function xr(y,w,k){let{submission:j,fetcherSubmission:I,replace:W}=k===void 0?{}:k;w.revalidate&&(Je=!0);let A=hl(y.location,w.location,{_isRedirect:!0});if(V(A,"Expected a location on the redirect navigation"),n){let q=!1;if(w.reloadDocument)q=!0;else if(Kf.test(w.location)){const Ce=e.history.createURL(w.location);q=Ce.origin!==t.location.origin||sn(Ce.pathname,u)==null}if(q){W?t.location.replace(w.location):t.location.assign(w.location);return}}z=null;let U=W===!0?fe.Replace:fe.Push,{formMethod:F,formAction:K,formEncType:we}=y.navigation;!j&&!I&&F&&K&&we&&(j=hc(y.navigation));let B=j||I;if(Pv.has(w.status)&&B&&st(B.formMethod))await vn(U,A,{submission:de({},B,{formAction:w.location}),preventScrollReset:T});else{let q=Ni(A,j);await vn(U,A,{overrideNavigation:q,fetcherSubmission:I,preventScrollReset:T})}}async function Ou(y,w,k,j,I){let W=await Promise.all([...k.map(F=>Dr("loader",I,F,w,o,l,u,s.v7_relativeSplatPath)),...j.map(F=>F.matches&&F.match&&F.controller?Dr("loader",Mr(e.history,F.path,F.controller.signal),F.match,F.matches,o,l,u,s.v7_relativeSplatPath):{type:se.error,error:qe(404,{pathname:F.path})})]),A=W.slice(0,k.length),U=W.slice(k.length);return await Promise.all([pc(y,k,A,A.map(()=>I.signal),!1,v.loaderData),pc(y,j.map(F=>F.match),U,j.map(F=>F.controller?F.controller.signal:null),!0)]),{results:W,loaderResults:A,fetcherResults:U}}function Xo(){Je=!0,Fn.push(...Go()),ee.forEach((y,w)=>{re.has(w)&&(Ft.push(w),Ht(w))})}function Ut(y,w,k){k===void 0&&(k={}),v.fetchers.set(y,w),Ve({fetchers:new Map(v.fetchers)},{flushSync:(k&&k.flushSync)===!0})}function Sr(y,w,k,j){j===void 0&&(j={});let I=Jr(v.matches,w);_l(y),Ve({errors:{[I.route.id]:k},fetchers:new Map(v.fetchers)},{flushSync:(j&&j.flushSync)===!0})}function Uu(y){return s.v7_fetcherPersist&&(ht.set(y,(ht.get(y)||0)+1),_e.has(y)&&_e.delete(y)),v.fetchers.get(y)||Rv}function _l(y){let w=v.fetchers.get(y);re.has(y)&&!(w&&w.state==="loading"&&$.has(y))&&Ht(y),ee.delete(y),$.delete(y),G.delete(y),_e.delete(y),v.fetchers.delete(y)}function vp(y){if(s.v7_fetcherPersist){let w=(ht.get(y)||0)-1;w<=0?(ht.delete(y),_e.add(y)):ht.set(y,w)}else _l(y);Ve({fetchers:new Map(v.fetchers)})}function Ht(y){let w=re.get(y);V(w,"Expected fetch controller: "+y),w.abort(),re.delete(y)}function Hu(y){for(let w of y){let k=Uu(w),j=Vt(k.data);v.fetchers.set(w,j)}}function Au(){let y=[],w=!1;for(let k of G){let j=v.fetchers.get(k);V(j,"Expected fetcher: "+k),j.state==="loading"&&(G.delete(k),y.push(k),w=!0)}return Hu(y),w}function $u(y){let w=[];for(let[k,j]of $)if(j0}function yp(y,w){let k=v.blockers.get(y)||jr;return Me.get(y)!==w&&Me.set(y,w),k}function Bu(y){v.blockers.delete(y),Me.delete(y)}function Cl(y,w){let k=v.blockers.get(y)||jr;V(k.state==="unblocked"&&w.state==="blocked"||k.state==="blocked"&&w.state==="blocked"||k.state==="blocked"&&w.state==="proceeding"||k.state==="blocked"&&w.state==="unblocked"||k.state==="proceeding"&&w.state==="unblocked","Invalid blocker state transition: "+k.state+" -> "+w.state);let j=new Map(v.blockers);j.set(y,w),Ve({blockers:j})}function Vu(y){let{currentLocation:w,nextLocation:k,historyAction:j}=y;if(Me.size===0)return;Me.size>1&&Dn(!1,"A router only supports one blocker at a time");let I=Array.from(Me.entries()),[W,A]=I[I.length-1],U=v.blockers.get(W);if(!(U&&U.state==="proceeding")&&A({currentLocation:w,nextLocation:k,historyAction:j}))return W}function Go(y){let w=[];return ot.forEach((k,j)=>{(!y||y(j))&&(k.cancel(),w.push(j),ot.delete(j))}),w}function gp(y,w,k){if(m=y,x=w,S=k||null,!g&&v.navigation===Ri){g=!0;let j=Qu(v.location,v.matches);j!=null&&Ve({restoreScrollPosition:j})}return()=>{m=null,x=null,S=null}}function Wu(y,w){return S&&S(y,w.map(j=>rv(j,v.loaderData)))||y.key}function wp(y,w){if(m&&x){let k=Wu(y,w);m[k]=x()}}function Qu(y,w){if(m){let k=Wu(y,w),j=m[k];if(typeof j=="number")return j}return null}function xp(y){o={},a=Pa(y,l,void 0,o)}return L={get basename(){return u},get future(){return s},get state(){return v},get routes(){return i},get window(){return t},initialize:ap,subscribe:sp,enableScrollRestoration:gp,navigate:Fu,fetch:pp,revalidate:cp,createHref:y=>e.history.createHref(y),encodeLocation:y=>e.history.encodeLocation(y),getFetcher:Uu,deleteFetcher:vp,dispose:up,getBlocker:yp,deleteBlocker:Bu,_internalFetchControllers:re,_internalActiveDeferreds:ot,_internalSetRoutes:xp},L}function Tv(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Na(e,t,n,r,l,o,i,a){let u,s;if(i){u=[];for(let p of t)if(u.push(p),p.route.id===i){s=p;break}}else u=t,s=t[t.length-1];let c=ju(l||".",Tu(u,o),sn(e.pathname,n)||e.pathname,a==="path");return l==null&&(c.search=e.search,c.hash=e.hash),(l==null||l===""||l===".")&&s&&s.route.index&&!Mu(c.search)&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(c.pathname=c.pathname==="/"?n:Lt([n,c.pathname])),Mn(c)}function lc(e,t,n,r){if(!r||!Tv(r))return{path:n};if(r.formMethod&&!Ov(r.formMethod))return{path:n,error:qe(405,{method:r.formMethod})};let l=()=>({path:n,error:qe(400,{type:"invalid-body"})}),o=r.formMethod||"get",i=e?o.toUpperCase():o.toLowerCase(),a=Gf(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!st(i))return l();let m=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((S,x)=>{let[g,P]=x;return""+S+g+"="+P+` +`},""):String(r.body);return{path:n,submission:{formMethod:i,formAction:a,formEncType:r.formEncType,formData:void 0,json:void 0,text:m}}}else if(r.formEncType==="application/json"){if(!st(i))return l();try{let m=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:i,formAction:a,formEncType:r.formEncType,formData:void 0,json:m,text:void 0}}}catch{return l()}}}V(typeof FormData=="function","FormData is not available in this environment");let u,s;if(r.formData)u=La(r.formData),s=r.formData;else if(r.body instanceof FormData)u=La(r.body),s=r.body;else if(r.body instanceof URLSearchParams)u=r.body,s=uc(u);else if(r.body==null)u=new URLSearchParams,s=new FormData;else try{u=new URLSearchParams(r.body),s=uc(u)}catch{return l()}let c={formMethod:i,formAction:a,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:s,json:void 0,text:void 0};if(st(c.formMethod))return{path:n,submission:c};let p=It(n);return t&&p.search&&Mu(p.search)&&u.append("index",""),p.search="?"+u,{path:Mn(p),submission:c}}function jv(e,t){let n=e;if(t){let r=e.findIndex(l=>l.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function oc(e,t,n,r,l,o,i,a,u,s,c,p,m,S,x,g){let P=g?Object.values(g)[0]:x?Object.values(x)[0]:void 0,f=e.createURL(t.location),d=e.createURL(l),h=g?Object.keys(g)[0]:void 0,L=jv(n,h).filter((R,T)=>{let{route:z}=R;if(z.lazy)return!0;if(z.loader==null)return!1;if(o)return z.loader.hydrate?!0:t.loaderData[z.id]===void 0&&(!t.errors||t.errors[z.id]===void 0);if(Dv(t.loaderData,t.matches[T],R)||a.some(ve=>ve===R.route.id))return!0;let O=t.matches[T],X=R;return ic(R,de({currentUrl:f,currentParams:O.params,nextUrl:d,nextParams:X.params},r,{actionResult:P,defaultShouldRevalidate:i||f.pathname+f.search===d.pathname+d.search||f.search!==d.search||Xf(O,X)}))}),v=[];return c.forEach((R,T)=>{if(o||!n.some(he=>he.route.id===R.routeId)||s.has(T))return;let z=bn(m,R.path,S);if(!z){v.push({key:T,routeId:R.routeId,path:R.path,matches:null,match:null,controller:null});return}let O=t.fetchers.get(T),X=Ta(z,R.path),ve=!1;p.has(T)?ve=!1:u.includes(T)?ve=!0:O&&O.state!=="idle"&&O.data===void 0?ve=i:ve=ic(X,de({currentUrl:f,currentParams:t.matches[t.matches.length-1].params,nextUrl:d,nextParams:n[n.length-1].params},r,{actionResult:P,defaultShouldRevalidate:i})),ve&&v.push({key:T,routeId:R.routeId,path:R.path,matches:z,match:X,controller:new AbortController})}),[L,v]}function Dv(e,t,n){let r=!t||n.route.id!==t.route.id,l=e[n.route.id]===void 0;return r||l}function Xf(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function ic(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function ac(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let l=n[e.id];V(l,"No route found in manifest");let o={};for(let i in r){let u=l[i]!==void 0&&i!=="hasErrorBoundary";Dn(!u,'Route "'+l.id+'" has a static property "'+i+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+i+'" will be ignored.')),!u&&!tv.has(i)&&(o[i]=r[i])}Object.assign(l,o),Object.assign(l,de({},t(l),{lazy:void 0}))}async function Dr(e,t,n,r,l,o,i,a,u){u===void 0&&(u={});let s,c,p,m=g=>{let P,f=new Promise((d,h)=>P=h);return p=()=>P(),t.signal.addEventListener("abort",p),Promise.race([g({request:t,params:n.params,context:u.requestContext}),f])};try{let g=n.route[e];if(n.route.lazy)if(g){let P,f=await Promise.all([m(g).catch(d=>{P=d}),ac(n.route,o,l)]);if(P)throw P;c=f[0]}else if(await ac(n.route,o,l),g=n.route[e],g)c=await m(g);else if(e==="action"){let P=new URL(t.url),f=P.pathname+P.search;throw qe(405,{method:t.method,pathname:f,routeId:n.route.id})}else return{type:se.data,data:void 0};else if(g)c=await m(g);else{let P=new URL(t.url),f=P.pathname+P.search;throw qe(404,{pathname:f})}V(c!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(g){s=se.error,c=g}finally{p&&t.signal.removeEventListener("abort",p)}if(Fv(c)){let g=c.status;if(Cv.has(g)){let f=c.headers.get("Location");if(V(f,"Redirects returned/thrown from loaders/actions must have a Location header"),!Kf.test(f))f=Na(new URL(t.url),r.slice(0,r.indexOf(n)+1),i,!0,f,a);else if(!u.isStaticRequest){let d=new URL(t.url),h=f.startsWith("//")?new URL(d.protocol+f):new URL(f),E=sn(h.pathname,i)!=null;h.origin===d.origin&&E&&(f=h.pathname+h.search+h.hash)}if(u.isStaticRequest)throw c.headers.set("Location",f),c;return{type:se.redirect,status:g,location:f,revalidate:c.headers.get("X-Remix-Revalidate")!==null,reloadDocument:c.headers.get("X-Remix-Reload-Document")!==null}}if(u.isRouteRequest)throw{type:s===se.error?se.error:se.data,response:c};let P;try{let f=c.headers.get("Content-Type");f&&/\bapplication\/json\b/.test(f)?P=await c.json():P=await c.text()}catch(f){return{type:se.error,error:f}}return s===se.error?{type:s,error:new Du(g,c.statusText,P),headers:c.headers}:{type:se.data,data:P,statusCode:c.status,headers:c.headers}}if(s===se.error)return{type:s,error:c};if(Iv(c)){var S,x;return{type:se.deferred,deferredData:c,statusCode:(S=c.init)==null?void 0:S.status,headers:((x=c.init)==null?void 0:x.headers)&&new Headers(c.init.headers)}}return{type:se.data,data:c}}function Mr(e,t,n,r){let l=e.createURL(Gf(t)).toString(),o={signal:n};if(r&&st(r.formMethod)){let{formMethod:i,formEncType:a}=r;o.method=i.toUpperCase(),a==="application/json"?(o.headers=new Headers({"Content-Type":a}),o.body=JSON.stringify(r.json)):a==="text/plain"?o.body=r.text:a==="application/x-www-form-urlencoded"&&r.formData?o.body=La(r.formData):o.body=r.formData}return new Request(l,o)}function La(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function uc(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function Mv(e,t,n,r,l){let o={},i=null,a,u=!1,s={};return n.forEach((c,p)=>{let m=t[p].route.id;if(V(!_n(c),"Cannot handle redirect results in processLoaderData"),er(c)){let S=Jr(e,m),x=c.error;r&&(x=Object.values(r)[0],r=void 0),i=i||{},i[S.route.id]==null&&(i[S.route.id]=x),o[m]=void 0,u||(u=!0,a=Wf(c.error)?c.error.status:500),c.headers&&(s[m]=c.headers)}else kn(c)?(l.set(m,c.deferredData),o[m]=c.deferredData.data):o[m]=c.data,c.statusCode!=null&&c.statusCode!==200&&!u&&(a=c.statusCode),c.headers&&(s[m]=c.headers)}),r&&(i=r,o[Object.keys(r)[0]]=void 0),{loaderData:o,errors:i,statusCode:a||200,loaderHeaders:s}}function sc(e,t,n,r,l,o,i,a){let{loaderData:u,errors:s}=Mv(t,n,r,l,a);for(let c=0;cr.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function dc(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function qe(e,t){let{pathname:n,routeId:r,method:l,type:o}=t===void 0?{}:t,i="Unknown Server Error",a="Unknown @remix-run/router error";return e===400?(i="Bad Request",l&&n&&r?a="You made a "+l+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":o==="defer-action"?a="defer() is not supported in actions":o==="invalid-body"&&(a="Unable to encode submission body")):e===403?(i="Forbidden",a='Route "'+r+'" does not match URL "'+n+'"'):e===404?(i="Not Found",a='No route matches URL "'+n+'"'):e===405&&(i="Method Not Allowed",l&&n&&r?a="You made a "+l.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":l&&(a='Invalid request method "'+l.toUpperCase()+'"')),new Du(e||500,i,new Error(a),!0)}function fc(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(_n(n))return{result:n,idx:t}}}function Gf(e){let t=typeof e=="string"?It(e):e;return Mn(de({},t,{hash:""}))}function zv(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function kn(e){return e.type===se.deferred}function er(e){return e.type===se.error}function _n(e){return(e&&e.type)===se.redirect}function Iv(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function Fv(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Ov(e){return _v.has(e.toLowerCase())}function st(e){return Ev.has(e.toLowerCase())}async function pc(e,t,n,r,l,o){for(let i=0;ip.route.id===u.route.id),c=s!=null&&!Xf(s,u)&&(o&&o[u.route.id])!==void 0;if(kn(a)&&(l||c)){let p=r[i];V(p,"Expected an AbortSignal for revalidating fetcher deferred result"),await Jf(a,p,l).then(m=>{m&&(n[i]=m||n[i])})}}}async function Jf(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:se.data,data:e.deferredData.unwrappedData}}catch(l){return{type:se.error,error:l}}return{type:se.data,data:e.deferredData.data}}}function Mu(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Ta(e,t){let n=typeof t=="string"?It(t).search:t.search;if(e[e.length-1].route.index&&Mu(n||""))return e[e.length-1];let r=Vf(e);return r[r.length-1]}function hc(e){let{formMethod:t,formAction:n,formEncType:r,text:l,formData:o,json:i}=e;if(!(!t||!n||!r)){if(l!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:l};if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:o,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:i,text:void 0}}}function Ni(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Uv(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function zr(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Hv(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Vt(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Av(e,t){try{let n=e.sessionStorage.getItem(Yf);if(n){let r=JSON.parse(n);for(let[l,o]of Object.entries(r||{}))o&&Array.isArray(o)&&t.set(l,new Set(o||[]))}}catch{}}function $v(e,t){if(t.size>0){let n={};for(let[r,l]of t)n[r]=[...l];try{e.sessionStorage.setItem(Yf,JSON.stringify(n))}catch(r){Dn(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/** + * React Router v6.21.1 + * + * 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 + */function ml(){return ml=Object.assign?Object.assign.bind():function(e){for(var t=1;t{a.current=!0}),C.useCallback(function(s,c){if(c===void 0&&(c={}),!a.current)return;if(typeof s=="number"){r.go(s);return}let p=ju(s,JSON.parse(i),o,c.relative==="path");e==null&&t!=="/"&&(p.pathname=p.pathname==="/"?t:Lt([t,p.pathname])),(c.replace?r.replace:r.push)(p,c.state,c)},[t,r,i,o,e])}const Qv=C.createContext(null);function Kv(e){let t=C.useContext(mn).outlet;return t&&C.createElement(Qv.Provider,{value:e},t)}function Yo(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=C.useContext(hn),{matches:l}=C.useContext(mn),{pathname:o}=kl(),i=JSON.stringify(Tu(l,r.v7_relativeSplatPath));return C.useMemo(()=>ju(e,JSON.parse(i),o,n==="path"),[e,i,o,n])}function Yv(e,t,n,r){El()||V(!1);let{navigator:l}=C.useContext(hn),{matches:o}=C.useContext(mn),i=o[o.length-1],a=i?i.params:{};i&&i.pathname;let u=i?i.pathnameBase:"/";i&&i.route;let s=kl(),c;if(t){var p;let P=typeof t=="string"?It(t):t;u==="/"||(p=P.pathname)!=null&&p.startsWith(u)||V(!1),c=P}else c=s;let m=c.pathname||"/",S=u==="/"?m:m.slice(u.length)||"/",x=bn(e,{pathname:S}),g=qv(x&&x.map(P=>Object.assign({},P,{params:Object.assign({},a,P.params),pathname:Lt([u,l.encodeLocation?l.encodeLocation(P.pathname).pathname:P.pathname]),pathnameBase:P.pathnameBase==="/"?u:Lt([u,l.encodeLocation?l.encodeLocation(P.pathnameBase).pathname:P.pathnameBase])})),o,n,r);return t&&g?C.createElement(Ko.Provider,{value:{location:ml({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:fe.Pop}},g):g}function Xv(){let e=n0(),t=Wf(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,l={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},o=null;return C.createElement(C.Fragment,null,C.createElement("h2",null,"Unexpected Application Error!"),C.createElement("h3",{style:{fontStyle:"italic"}},t),n?C.createElement("pre",{style:l},n):null,o)}const Gv=C.createElement(Xv,null);class Jv extends C.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?C.createElement(mn.Provider,{value:this.props.routeContext},C.createElement(Zf.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Zv(e){let{routeContext:t,match:n,children:r}=e,l=C.useContext(Sl);return l&&l.static&&l.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=n.route.id),C.createElement(mn.Provider,{value:t},r)}function qv(e,t,n,r){var l;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if((o=n)!=null&&o.errors)e=n.matches;else return null}let i=e,a=(l=n)==null?void 0:l.errors;if(a!=null){let c=i.findIndex(p=>p.route.id&&(a==null?void 0:a[p.route.id]));c>=0||V(!1),i=i.slice(0,Math.min(i.length,c+1))}let u=!1,s=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c=0?i=i.slice(0,s+1):i=[i[0]];break}}}return i.reduceRight((c,p,m)=>{let S,x=!1,g=null,P=null;n&&(S=a&&p.route.id?a[p.route.id]:void 0,g=p.route.errorElement||Gv,u&&(s<0&&m===0?(l0("route-fallback",!1),x=!0,P=null):s===m&&(x=!0,P=p.route.hydrateFallbackElement||null)));let f=t.concat(i.slice(0,m+1)),d=()=>{let h;return S?h=g:x?h=P:p.route.Component?h=C.createElement(p.route.Component,null):p.route.element?h=p.route.element:h=c,C.createElement(Zv,{match:p,routeContext:{outlet:c,matches:f,isDataRoute:n!=null},children:h})};return n&&(p.route.ErrorBoundary||p.route.errorElement||m===0)?C.createElement(Jv,{location:n.location,revalidation:n.revalidation,component:g,error:S,children:d(),routeContext:{outlet:null,matches:f,isDataRoute:!0}}):d()},null)}var bf=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(bf||{}),No=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(No||{});function bv(e){let t=C.useContext(Sl);return t||V(!1),t}function e0(e){let t=C.useContext(zu);return t||V(!1),t}function t0(e){let t=C.useContext(mn);return t||V(!1),t}function ep(e){let t=t0(),n=t.matches[t.matches.length-1];return n.route.id||V(!1),n.route.id}function n0(){var e;let t=C.useContext(Zf),n=e0(No.UseRouteError),r=ep(No.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function r0(){let{router:e}=bv(bf.UseNavigateStable),t=ep(No.UseNavigateStable),n=C.useRef(!1);return qf(()=>{n.current=!0}),C.useCallback(function(l,o){o===void 0&&(o={}),n.current&&(typeof l=="number"?e.navigate(l):e.navigate(l,ml({fromRouteId:t},o)))},[e,t])}const mc={};function l0(e,t,n){!t&&!mc[e]&&(mc[e]=!0)}function o0(e){return Kv(e.context)}function i0(e){let{basename:t="/",children:n=null,location:r,navigationType:l=fe.Pop,navigator:o,static:i=!1,future:a}=e;El()&&V(!1);let u=t.replace(/^\/*/,"/"),s=C.useMemo(()=>({basename:u,navigator:o,static:i,future:ml({v7_relativeSplatPath:!1},a)}),[u,a,o,i]);typeof r=="string"&&(r=It(r));let{pathname:c="/",search:p="",hash:m="",state:S=null,key:x="default"}=r,g=C.useMemo(()=>{let P=sn(c,u);return P==null?null:{location:{pathname:P,search:p,hash:m,state:S,key:x},navigationType:l}},[u,c,p,m,S,x,l]);return g==null?null:C.createElement(hn.Provider,{value:s},C.createElement(Ko.Provider,{children:n,value:g}))}new Promise(()=>{});function a0(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:C.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:C.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:C.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** + * React Router DOM v6.21.1 + * + * 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 + */function hr(){return hr=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[l]=e[l]);return n}function u0(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function s0(e,t){return e.button===0&&(!t||t==="_self")&&!u0(e)}const c0=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],d0=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"];function f0(e,t){return Lv({basename:t==null?void 0:t.basename,future:hr({},t==null?void 0:t.future,{v7_prependBasename:!0}),history:qm({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||p0(),routes:e,mapRouteProperties:a0,window:t==null?void 0:t.window}).initialize()}function p0(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=hr({},t,{errors:h0(t.errors)})),t}function h0(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,l]of t)if(l&&l.__type==="RouteErrorResponse")n[r]=new Du(l.status,l.statusText,l.data,l.internal===!0);else if(l&&l.__type==="Error"){if(l.__subType){let o=window[l.__subType];if(typeof o=="function")try{let i=new o(l.message);i.stack="",n[r]=i}catch{}}if(n[r]==null){let o=new Error(l.message);o.stack="",n[r]=o}}else n[r]=l;return n}const np=C.createContext({isTransitioning:!1}),m0=C.createContext(new Map),v0="startTransition",vc=Ap[v0],y0="flushSync",yc=Jm[y0];function g0(e){vc?vc(e):e()}function Ir(e){yc?yc(e):e()}class w0{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function x0(e){let{fallbackElement:t,router:n,future:r}=e,[l,o]=C.useState(n.state),[i,a]=C.useState(),[u,s]=C.useState({isTransitioning:!1}),[c,p]=C.useState(),[m,S]=C.useState(),[x,g]=C.useState(),P=C.useRef(new Map),{v7_startTransition:f}=r||{},d=C.useCallback(R=>{f?g0(R):R()},[f]),h=C.useCallback((R,T)=>{let{deletedFetchers:z,unstable_flushSync:O,unstable_viewTransitionOpts:X}=T;z.forEach(he=>P.current.delete(he)),R.fetchers.forEach((he,Je)=>{he.data!==void 0&&P.current.set(Je,he.data)});let ve=n.window==null||typeof n.window.document.startViewTransition!="function";if(!X||ve){O?Ir(()=>o(R)):d(()=>o(R));return}if(O){Ir(()=>{m&&(c&&c.resolve(),m.skipTransition()),s({isTransitioning:!0,flushSync:!0,currentLocation:X.currentLocation,nextLocation:X.nextLocation})});let he=n.window.document.startViewTransition(()=>{Ir(()=>o(R))});he.finished.finally(()=>{Ir(()=>{p(void 0),S(void 0),a(void 0),s({isTransitioning:!1})})}),Ir(()=>S(he));return}m?(c&&c.resolve(),m.skipTransition(),g({state:R,currentLocation:X.currentLocation,nextLocation:X.nextLocation})):(a(R),s({isTransitioning:!0,flushSync:!1,currentLocation:X.currentLocation,nextLocation:X.nextLocation}))},[n.window,m,c,P,d]);C.useLayoutEffect(()=>n.subscribe(h),[n,h]),C.useEffect(()=>{u.isTransitioning&&!u.flushSync&&p(new w0)},[u]),C.useEffect(()=>{if(c&&i&&n.window){let R=i,T=c.promise,z=n.window.document.startViewTransition(async()=>{d(()=>o(R)),await T});z.finished.finally(()=>{p(void 0),S(void 0),a(void 0),s({isTransitioning:!1})}),S(z)}},[d,i,c,n.window]),C.useEffect(()=>{c&&i&&l.location.key===i.location.key&&c.resolve()},[c,m,l.location,i]),C.useEffect(()=>{!u.isTransitioning&&x&&(a(x.state),s({isTransitioning:!0,flushSync:!1,currentLocation:x.currentLocation,nextLocation:x.nextLocation}),g(void 0))},[u.isTransitioning,x]),C.useEffect(()=>{},[]);let E=C.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:R=>n.navigate(R),push:(R,T,z)=>n.navigate(R,{state:T,preventScrollReset:z==null?void 0:z.preventScrollReset}),replace:(R,T,z)=>n.navigate(R,{replace:!0,state:T,preventScrollReset:z==null?void 0:z.preventScrollReset})}),[n]),L=n.basename||"/",v=C.useMemo(()=>({router:n,navigator:E,static:!1,basename:L}),[n,E,L]);return C.createElement(C.Fragment,null,C.createElement(Sl.Provider,{value:v},C.createElement(zu.Provider,{value:l},C.createElement(m0.Provider,{value:P.current},C.createElement(np.Provider,{value:u},C.createElement(i0,{basename:L,location:l.location,navigationType:l.historyAction,navigator:E,future:{v7_relativeSplatPath:n.future.v7_relativeSplatPath}},l.initialized||n.future.v7_partialHydration?C.createElement(S0,{routes:n.routes,future:n.future,state:l}):t))))),null)}function S0(e){let{routes:t,future:n,state:r}=e;return Yv(t,void 0,r,n)}const E0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",k0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ja=C.forwardRef(function(t,n){let{onClick:r,relative:l,reloadDocument:o,replace:i,state:a,target:u,to:s,preventScrollReset:c,unstable_viewTransition:p}=t,m=tp(t,c0),{basename:S}=C.useContext(hn),x,g=!1;if(typeof s=="string"&&k0.test(s)&&(x=s,E0))try{let h=new URL(window.location.href),E=s.startsWith("//")?new URL(h.protocol+s):new URL(s),L=sn(E.pathname,S);E.origin===h.origin&&L!=null?s=L+E.search+E.hash:g=!0}catch{}let P=Bv(s,{relative:l}),f=C0(s,{replace:i,state:a,target:u,preventScrollReset:c,relative:l,unstable_viewTransition:p});function d(h){r&&r(h),h.defaultPrevented||f(h)}return C.createElement("a",hr({},m,{href:x||P,onClick:g||o?r:d,ref:n,target:u}))}),Li=C.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:l=!1,className:o="",end:i=!1,style:a,to:u,unstable_viewTransition:s,children:c}=t,p=tp(t,d0),m=Yo(u,{relative:p.relative}),S=kl(),x=C.useContext(zu),{navigator:g}=C.useContext(hn),P=x!=null&&P0(m)&&s===!0,f=g.encodeLocation?g.encodeLocation(m).pathname:m.pathname,d=S.pathname,h=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;l||(d=d.toLowerCase(),h=h?h.toLowerCase():null,f=f.toLowerCase());const E=f!=="/"&&f.endsWith("/")?f.length-1:f.length;let L=d===f||!i&&d.startsWith(f)&&d.charAt(E)==="/",v=h!=null&&(h===f||!i&&h.startsWith(f)&&h.charAt(f.length)==="/"),R={isActive:L,isPending:v,isTransitioning:P},T=L?r:void 0,z;typeof o=="function"?z=o(R):z=[o,L?"active":null,v?"pending":null,P?"transitioning":null].filter(Boolean).join(" ");let O=typeof a=="function"?a(R):a;return C.createElement(ja,hr({},p,{"aria-current":T,className:z,ref:n,style:O,to:u,unstable_viewTransition:s}),typeof c=="function"?c(R):c)});var Da;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Da||(Da={}));var gc;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(gc||(gc={}));function _0(e){let t=C.useContext(Sl);return t||V(!1),t}function C0(e,t){let{target:n,replace:r,state:l,preventScrollReset:o,relative:i,unstable_viewTransition:a}=t===void 0?{}:t,u=Vv(),s=kl(),c=Yo(e,{relative:i});return C.useCallback(p=>{if(s0(p,n)){p.preventDefault();let m=r!==void 0?r:Mn(s)===Mn(c);u(e,{replace:m,state:l,preventScrollReset:o,relative:i,unstable_viewTransition:a})}},[s,u,c,r,l,n,e,o,i,a])}function P0(e,t){t===void 0&&(t={});let n=C.useContext(np);n==null&&V(!1);let{basename:r}=_0(Da.useViewTransitionState),l=Yo(e,{relative:t.relative});if(!n.isTransitioning)return!1;let o=sn(n.currentLocation.pathname,r)||n.currentLocation.pathname,i=sn(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Ra(l.pathname,i)!=null||Ra(l.pathname,o)!=null}const Rt="/expenses-react-app/",R0="_container_1wy3b_1",N0={container:R0},rp=({children:e})=>_.jsx("div",{className:N0.container,children:e}),L0="_menu_1czut_1",yt={menu:L0,"menu-link":"_menu-link_1czut_6","link-active":"_link-active_1czut_12"},T0=()=>_.jsxs("ul",{className:yt.menu,children:[_.jsx("li",{children:_.jsx(Li,{to:Rt,className:({isActive:e})=>e?`${yt["menu-link"]} ${yt["link-active"]}`:yt["menu-link"],end:!0,children:"Home"})}),_.jsx("li",{children:_.jsx(Li,{to:`${Rt}login`,className:({isActive:e})=>e?`${yt["menu-link"]} ${yt["link-active"]}`:yt["menu-link"],children:"Log In"})}),_.jsx("li",{children:_.jsx(Li,{to:`${Rt}register`,className:({isActive:e})=>e?`${yt["menu-link"]} ${yt["link-active"]}`:yt["menu-link"],children:"Sign Up"})})]}),j0="_header_l212f_1",wc={header:j0,"header-body":"_header-body_l212f_5"},D0="/expenses-react-app/assets/logo-HTwwoxjU.png",M0="_brand_1cqmy_1",Ti={brand:M0,"brand-logo":"_brand-logo_1cqmy_6","brand-name":"_brand-name_1cqmy_10"},z0=()=>_.jsxs("div",{className:Ti.brand,children:[_.jsx("img",{className:Ti["brand-logo"],src:D0,alt:"Expenses React App Logo"}),_.jsx("span",{className:Ti["brand-name"],children:"Expense Tracker"})]}),I0=()=>_.jsx("header",{className:wc.header,children:_.jsx(rp,{children:_.jsxs("div",{className:wc["header-body"],children:[_.jsx(z0,{}),_.jsx("nav",{children:_.jsx(T0,{})})]})})}),F0=()=>_.jsxs(_.Fragment,{children:[_.jsx(I0,{}),_.jsx("main",{style:{padding:"3rem 0"},children:_.jsx(rp,{children:_.jsx(o0,{})})})]}),Iu=()=>{const[e,t]=C.useState(!1),[n,r]=C.useState(null),l=C.useCallback(async(o,i)=>{t(!0),r(null);try{const a=await fetch(o.url,{method:o.method?o.method:"GET",headers:o.headers?o.headers:{},body:o.body?JSON.stringify(o.body):null});if(!a.ok)throw new Error("Request failed!");const u=await a.json();i(u)}catch(a){r(a.message||"Oops... Something went wrong!")}t(!1)},[]);return{isLoading:e,error:n,sendRequest:l}};class lp{constructor(t,n,r,l){Er(this,"id");Er(this,"title");Er(this,"amount");Er(this,"date");this.id=t,this.title=n,this.amount=r,this.date=l}}const O0="_card_14j3b_1",xc={card:O0},gr=({className:e,tagName:t,children:n})=>{const r=t||"div";return _.jsx(r,{className:e?`${xc.card} ${e}`:xc.card,children:n})},U0="_expenses_1q8us_1",Ee={expenses:U0,"expenses-item":"_expenses-item_1q8us_7","expenses-item-date":"_expenses-item-date_1q8us_15","expenses-item-month":"_expenses-item-month_1q8us_27","expenses-item-year":"_expenses-item-year_1q8us_36","expenses-item-day":"_expenses-item-day_1q8us_45","expenses-item-description":"_expenses-item-description_1q8us_53","expenses-item-title":"_expenses-item-title_1q8us_67","expenses-item-price":"_expenses-item-price_1q8us_81","expenses-item-delete-btn":"_expenses-item-delete-btn_1q8us_95","expenses-filter":"_expenses-filter_1q8us_117","expenses-filter-control":"_expenses-filter-control_1q8us_121","expenses-filter-label":"_expenses-filter-label_1q8us_127","expenses-filter-select":"_expenses-filter-select_1q8us_130","expenses-list":"_expenses-list_1q8us_136","expenses-list-fallback":"_expenses-list-fallback_1q8us_139"},H0=({selected:e,onSelectedItem:t})=>{const n=r=>{t(r.target.value)};return _.jsx("div",{className:Ee["expenses-filter"],children:_.jsxs("div",{className:Ee["expenses-filter-control"],children:[_.jsx("label",{className:Ee["expenses-filter-label"],children:"Filter by year"}),_.jsxs("select",{className:Ee["expenses-filter-select"],value:e,onChange:n,children:[_.jsx("option",{value:"none",children:"All"}),_.jsx("option",{value:"2023",children:"2023"}),_.jsx("option",{value:"2022",children:"2022"}),_.jsx("option",{value:"2021",children:"2021"}),_.jsx("option",{value:"2020",children:"2020"}),_.jsx("option",{value:"2019",children:"2019"})]})]})})},A0="_btn_awfba_1",Sc={btn:A0},cn=({id:e,className:t,type:n,disabled:r,onClick:l,children:o})=>_.jsx("button",{id:e,className:t?`${Sc.btn} ${t}`:Sc.btn,type:n||"button",onClick:l,disabled:r,children:o}),$0="_modal_uzx82_1",Et={modal:$0,"modal-active":"_modal-active_uzx82_16","modal-content":"_modal-content_uzx82_21","modal-title":"_modal-title_uzx82_28","modal-text":"_modal-text_uzx82_34","modal-actions":"_modal-actions_uzx82_37","modal-delete-btn":"_modal-delete-btn_uzx82_42"},B0=({title:e,text:t,onConfirm:n})=>{const r=C.useContext(Lu),l=o=>{(o.target.classList.contains(Et.modal)||o.target.id==="cancel-btn")&&r.removeModal()};return _.jsx("div",{className:r.isActive?`${Et.modal} ${Et["modal-active"]}`:Et.modal,onClick:l,children:_.jsxs(gr,{className:Et["modal-content"],children:[_.jsx("h2",{className:Et["modal-title"],children:e}),_.jsx("p",{className:Et["modal-text"],children:t}),_.jsxs("div",{className:Et["modal-actions"],children:[_.jsx(cn,{id:"cancel-btn",type:"button",onClick:l,children:"Close"}),_.jsx(cn,{id:"action-btn",className:Et["modal-delete-btn"],type:"button",onClick:n,children:"Delete"})]})]})})},V0=({date:e})=>{const t=e.toLocaleString("en-US",{month:"long"}),n=e.toLocaleString("en-US",{day:"2-digit"}),r=e.getFullYear();return _.jsxs("div",{className:Ee["expenses-item-date"],children:[_.jsx("span",{className:Ee["expenses-item-month"],children:t}),_.jsx("span",{className:Ee["expenses-item-year"],children:r}),_.jsx("span",{className:Ee["expenses-item-day"],children:n})]})},W0="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20fill='white'%20class='bi%20bi-trash3'%20viewBox='0%200%2016%2016'%3e%3cpath%20d='M6.5%201h3a.5.5%200%200%201%20.5.5v1H6v-1a.5.5%200%200%201%20.5-.5ZM11%202.5v-1A1.5%201.5%200%200%200%209.5%200h-3A1.5%201.5%200%200%200%205%201.5v1H2.506a.58.58%200%200%200-.01%200H1.5a.5.5%200%200%200%200%201h.538l.853%2010.66A2%202%200%200%200%204.885%2016h6.23a2%202%200%200%200%201.994-1.84l.853-10.66h.538a.5.5%200%200%200%200-1h-.995a.59.59%200%200%200-.01%200H11Zm1.958%201-.846%2010.58a1%201%200%200%201-.997.92h-6.23a1%201%200%200%201-.997-.92L3.042%203.5h9.916Zm-7.487%201a.5.5%200%200%201%20.528.47l.5%208.5a.5.5%200%200%201-.998.06L5%205.03a.5.5%200%200%201%20.47-.53Zm5.058%200a.5.5%200%200%201%20.47.53l-.5%208.5a.5.5%200%201%201-.998-.06l.5-8.5a.5.5%200%200%201%20.528-.47ZM8%204.5a.5.5%200%200%201%20.5.5v8.5a.5.5%200%200%201-1%200V5a.5.5%200%200%201%20.5-.5Z'/%3e%3c/svg%3e",Q0=({id:e,title:t,amount:n,date:r,onDelete:l})=>{const o=()=>{e&&l(e,t)};return _.jsxs(gr,{className:Ee["expenses-item"],tagName:"li",children:[_.jsx(V0,{date:r}),_.jsxs("div",{className:Ee["expenses-item-description"],children:[_.jsx("h2",{className:Ee["expenses-item-title"],children:t}),_.jsxs("span",{className:Ee["expenses-item-price"],children:["$",n]})]}),_.jsx(cn,{className:Ee["expenses-item-delete-btn"],type:"button",onClick:o,children:_.jsx("img",{src:W0,alt:"Delete"})})]})},K0=({items:e,onDeleteItem:t,isLoading:n,error:r})=>{const l=C.useContext(Lu),[o,i]=C.useState({expenseId:"",expenseTitle:""}),{sendRequest:a}=Iu(),u=(g,P)=>{l.displayModal(),i({expenseId:g,expenseTitle:P})},s=`Are you sure you want to delete expense "${o.expenseTitle}"?`,c="Delete expense",p=g=>{l.removeModal(),t(g)},m=async()=>{a({url:`https://react-expenses-30273-default-rtdb.europe-west1.firebasedatabase.app/expenses/${o.expenseId}.json`,method:"DELETE",headers:{"Content-Type":"application/json"}},p.bind(null,o.expenseId))};let S=_.jsx("h2",{className:Ee["expenses-list-fallback"],children:"Found no expenses."});e.length>0&&(S=_.jsx("ul",{className:Ee["expenses-list"],children:e.map(g=>_.jsx(Q0,{id:g.id,title:g.title,amount:g.amount,date:g.date,onDelete:u},g.id))}));let x=S;return n&&(x=_.jsx("h2",{className:Ee["expenses-list-fallback"],children:"Loading expenses..."})),r&&(x=_.jsx("h2",{className:Ee["expenses-list-fallback"],children:r})),_.jsxs(_.Fragment,{children:[Af.createPortal(_.jsx(B0,{title:c,text:s,onConfirm:m}),document.getElementById("modal-root")),x]})},Y0="_chart_d7lcp_1",Ar={chart:Y0,"chart-bar":"_chart-bar_d7lcp_22","chart-bar-inner":"_chart-bar-inner_d7lcp_34","chart-bar-fill":"_chart-bar-fill_d7lcp_45","chart-bar-label":"_chart-bar-label_d7lcp_50"},X0=({total:e,value:t,label:n})=>{let r="0%";return e>0&&(r=Math.round(t/e*100)+"%"),_.jsxs("div",{className:Ar["chart-bar"],children:[_.jsx("div",{className:Ar["chart-bar-inner"],children:_.jsx("div",{className:Ar["chart-bar-fill"],style:{height:r}})}),_.jsx("div",{className:Ar["chart-bar-label"],children:n})]})},G0=({dataPoints:e})=>{const n=e.map(r=>r.value).reduce((r,l)=>r+l,0);return _.jsx(gr,{className:Ar.chart,children:e.map(r=>_.jsx(X0,{value:r.value,total:n,label:r.label},r.label))})},Ec=[{label:"Jan",value:0},{label:"Feb",value:0},{label:"Mar",value:0},{label:"Apr",value:0},{label:"May",value:0},{label:"Jun",value:0},{label:"Jul",value:0},{label:"Aug",value:0},{label:"Sep",value:0},{label:"Oct",value:0},{label:"Nov",value:0},{label:"Dec",value:0}],J0=({expenses:e})=>{for(const t of e){const n=t.date.getMonth();Ec[n].value+=t.amount}return _.jsx(G0,{dataPoints:Ec})},Z0=({data:e,onDeleteItem:t,isLoading:n,error:r})=>{const[l,o]=C.useState("none"),i=u=>{o(u)};let a;return l!=="none"?a=e.filter(u=>u.date.getFullYear().toString()===l):a=e,_.jsxs(gr,{className:Ee.expenses,children:[_.jsx(H0,{selected:l,onSelectedItem:i}),_.jsx(J0,{expenses:a}),_.jsx(K0,{isLoading:n,error:r,items:a,onDeleteItem:t})]})},op={value:"",isValid:null},q0=(e,t)=>{switch(t.type){case"USER_INPUT":return{value:t.value,isValid:t.validate(t.value)};case"INPUT_BLUR":return{value:e.value,isValid:t.validate(e.value)};case"CLEAR_INPUT":return op;default:return{value:"",isValid:!1}}},ln=e=>{const[t,n]=C.useReducer(q0,op),r=i=>{n({type:"USER_INPUT",value:i.target.value,validate:e})},l=()=>{n({type:"INPUT_BLUR",validate:e})},o=()=>{n({type:"CLEAR_INPUT"})};return{value:t.value,isValid:t.isValid,inputChangeHandler:r,inputBlurHandler:l,inputClearHandler:o}},Ma={"new-expense":"_new-expense_9ikq6_1","new-expense-controls":"_new-expense-controls_9ikq6_8","new-expense-actions":"_new-expense-actions_9ikq6_41"},Bt={"form-control-label":"_form-control-label_1guvi_1","form-control-input":"_form-control-input_1guvi_13","input-error":"_input-error_1guvi_22"},on=({label:e,id:t,className:n,type:r,min:l,max:o,step:i,value:a,hasError:u,onChange:s,onBlur:c})=>{let p;return u?p=n?`${Bt["form-control-input"]} ${n} ${Bt["input-error"]}`:`${Bt["form-control-input"]} ${Bt["input-error"]}`:p=n?`${Bt["form-control-input"]} ${n}`:Bt["form-control-input"],_.jsxs("div",{className:Bt["form-control"],children:[_.jsx("label",{className:Bt["form-control-label"],htmlFor:t,children:e}),_.jsx("input",{id:t,className:p,type:r,min:l,max:o,step:i,value:a,onChange:s,onBlur:c})]})},ji=e=>e.trim().length!==0,b0=({onSaveExpenseData:e,onCancel:t,loading:n})=>{const{value:r,isValid:l,inputChangeHandler:o,inputBlurHandler:i,inputClearHandler:a}=ln(ji),{value:u,isValid:s,inputChangeHandler:c,inputBlurHandler:p,inputClearHandler:m}=ln(ji),{value:S,isValid:x,inputChangeHandler:g,inputBlurHandler:P,inputClearHandler:f}=ln(ji),[d,h]=C.useState(!1);C.useEffect(()=>{const v=setTimeout(()=>{h(l&&s&&x)},250);return()=>{clearTimeout(v)}},[l,s,x]);const E=()=>{a(),m(),f()},L=v=>{if(v.preventDefault(),d){const R={title:r,amount:+u,date:new Date(S)};e(R),E()}else l?s?P():p():i()};return _.jsxs("form",{onSubmit:L,children:[_.jsxs("div",{className:Ma["new-expense-controls"],children:[_.jsx(on,{label:"Title",id:"title",type:"text",value:r,hasError:l!==null&&!l,onChange:o,onBlur:i}),_.jsx(on,{label:"Amount",id:"amount",type:"number",min:"0.01",step:"0.01",value:u,hasError:s!==null&&!s,onChange:c,onBlur:p}),_.jsx(on,{label:"Date",id:"date",type:"date",min:"2019-01-01",max:"2023-12-31",value:S,hasError:x!==null&&!x,onChange:g,onBlur:P})]}),_.jsxs("div",{className:Ma["new-expense-actions"],children:[_.jsx(cn,{type:"button",onClick:t,children:"Close"}),_.jsx(cn,{type:"submit",children:n?"Sending...":"Add Expense"})]})]})},ey=({onAddExpense:e})=>{const[t,n]=C.useState(!1),{isLoading:r,sendRequest:l}=Iu(),o=(s,c)=>{const p=c.name,m=new lp(p,s.title,s.amount,s.date);e(m),n(!1)},i=async s=>{l({url:"https://react-expenses-30273-default-rtdb.europe-west1.firebasedatabase.app/expenses.json",method:"POST",headers:{"Content-Type":"application/json"},body:{title:s.title,amount:s.amount,date:s.date.toISOString().split("T")[0]}},o.bind(null,s))},a=()=>{n(!0)},u=()=>{n(!1)};return _.jsx(gr,{className:Ma["new-expense"],children:t?_.jsx(b0,{loading:r,onSaveExpenseData:i,onCancel:u}):_.jsx(cn,{type:"button",onClick:a,children:"Add New Expense"})})},ty=()=>{const[e,t]=C.useState([]),{isLoading:n,error:r,sendRequest:l}=Iu();C.useEffect(()=>{l({url:"https://react-expenses-30273-default-rtdb.europe-west1.firebasedatabase.app/expenses.json"},u=>{const s=[];for(const c in u)s.push(new lp(c,u[c].title,u[c].amount,new Date(u[c].date)));t(s)})},[l]);const o=a=>{t(u=>[a,...u])},i=a=>{t(u=>u.filter(s=>s.id!==a))};return _.jsxs(_.Fragment,{children:[_.jsx(ey,{onAddExpense:o}),_.jsx(Z0,{data:e,isLoading:n,error:r,onDeleteItem:i})]})},ny="_auth_1ndzc_1",Lo={auth:ny,"auth-form":"_auth-form_1ndzc_7","auth-form-btn":"_auth-form-btn_1ndzc_12"},ip=({children:e,formType:t,onSubmit:n})=>{let r;return t==="login"?r=_.jsxs("p",{children:["Don't have an account yet?"," ",_.jsx(ja,{to:`${Rt}register`,children:"Sign Up"})]}):r=_.jsxs("p",{children:["Already have an account? ",_.jsx(ja,{to:`${Rt}login`,children:"Sign In"})]}),_.jsxs(gr,{className:Lo.auth,children:[_.jsx("form",{className:Lo["auth-form"],onSubmit:n,children:e}),r]})},Di=e=>e.trim().length!==0,ry=()=>{const{value:e,isValid:t,inputChangeHandler:n,inputBlurHandler:r,inputClearHandler:l}=ln(Di),{value:o,isValid:i,inputChangeHandler:a,inputBlurHandler:u,inputClearHandler:s}=ln(Di),{value:c,isValid:p,inputChangeHandler:m,inputBlurHandler:S,inputClearHandler:x}=ln(Di),[g,P]=C.useState(!1);C.useEffect(()=>{const h=setTimeout(()=>{P(t&&i&&p)},250);return()=>{clearTimeout(h)}},[t,i,p]);const f=()=>{l(),s(),x()},d=h=>{h.preventDefault(),g?(console.log({email:e,username:o,password:c}),f()):t?i?S():u():r()};return _.jsxs(ip,{formType:"register",onSubmit:d,children:[_.jsx(on,{label:"Email",id:"email",type:"email",value:e,hasError:t!==null&&!t,onChange:n,onBlur:r}),_.jsx(on,{label:"Username",id:"username",type:"text",value:o,hasError:i!==null&&!i,onChange:a,onBlur:u}),_.jsx(on,{label:"Password",id:"password",type:"password",value:c,hasError:p!==null&&!p,onChange:m,onBlur:S}),_.jsx(cn,{className:Lo["auth-form-btn"],type:"submit",children:"Sign Up"})]})},ly=()=>_.jsx(ry,{}),kc=e=>e.trim().length!==0,oy=()=>{const{value:e,isValid:t,inputChangeHandler:n,inputBlurHandler:r,inputClearHandler:l}=ln(kc),{value:o,isValid:i,inputChangeHandler:a,inputBlurHandler:u,inputClearHandler:s}=ln(kc),[c,p]=C.useState(!1);C.useEffect(()=>{const x=setTimeout(()=>{p(t&&i)},250);return()=>{clearTimeout(x)}},[t,i]);const m=()=>{l(),s()},S=x=>{x.preventDefault(),c?(console.log({username:e,password:o}),m()):t?u():r()};return _.jsxs(ip,{formType:"login",onSubmit:S,children:[_.jsx(on,{label:"Username",id:"username",type:"text",value:e,hasError:t!==null&&!t,onChange:n,onBlur:r}),_.jsx(on,{label:"Password",id:"password",type:"password",value:o,hasError:i!==null&&!i,onChange:a,onBlur:u}),_.jsx(cn,{className:Lo["auth-form-btn"],type:"submit",children:"Sign In"})]})},iy=()=>_.jsx(oy,{}),ay=f0([{path:Rt,element:_.jsx(F0,{}),children:[{path:Rt,element:_.jsx(ty,{})},{path:`${Rt}register`,element:_.jsx(ly,{})},{path:`${Rt}login`,element:_.jsx(iy,{})}]}]),uy=()=>_.jsx(x0,{router:ay}),sy=Mi.createRoot(document.getElementById("page-root"));sy.render(_.jsx(Zm,{children:_.jsx(uy,{})})); diff --git a/assets/index-FN7xxOep.css b/assets/index-FN7xxOep.css new file mode 100644 index 0000000..ee6a38b --- /dev/null +++ b/assets/index-FN7xxOep.css @@ -0,0 +1 @@ +._container_1wy3b_1{padding-inline:5rem}@media (max-width: 992px){._container_1wy3b_1{padding-inline:3rem}}@media (max-width: 576px){._container_1wy3b_1{padding-inline:1.5rem}}._menu_1czut_1{display:flex;align-items:center;gap:2rem}._menu-link_1czut_6{color:#fff;text-decoration:none;font-size:1rem}._link-active_1czut_12{position:relative}._link-active_1czut_12:after{position:absolute;content:"";bottom:-6px;left:0;right:0;width:100%;height:2px;background-color:#fff}._header_l212f_1{padding:1rem 0;background-color:var(--clr-primary)}._header-body_l212f_5{display:flex;align-items:center;justify-content:space-between}._brand_1cqmy_1{display:flex;align-items:center;gap:.75rem}._brand-logo_1cqmy_6{width:60px;height:60px}._brand-name_1cqmy_10{display:block;font-weight:500;color:var(--clr-text)}._card_14j3b_1{border-radius:12px;box-shadow:0 2px 8px #00000040;overflow:hidden}._expenses_1q8us_1{padding:1.5rem;background-color:var(--clr-primary);margin:2rem auto 0;max-width:50rem}._expenses-item_1q8us_7{display:flex;justify-content:space-between;align-items:center;padding:.8rem;margin:1rem 0;background-color:var(--clr-secondary)}._expenses-item-date_1q8us_15{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;width:5.5rem;height:5.5rem;background-color:var(--clr-primary);color:var(--clr-text);border-radius:12px}._expenses-item-month_1q8us_27{font-size:.9rem;font-weight:600}@media (max-width: 768px){._expenses-item-month_1q8us_27{font-size:.7rem}}._expenses-item-year_1q8us_36{font-size:1.5rem;font-weight:700}@media (max-width: 768px){._expenses-item-year_1q8us_36{font-size:1.2rem}}._expenses-item-day_1q8us_45{font-size:.9rem}@media (max-width: 768px){._expenses-item-day_1q8us_45{font-size:.7rem}}._expenses-item-description_1q8us_53{display:flex;align-items:center;flex-direction:row;justify-content:flex-start;gap:.8rem;flex:1}@media (max-width: 768px){._expenses-item-description_1q8us_53{flex-flow:column-reverse;align-items:flex-end}}._expenses-item-title_1q8us_67{flex:1;margin:0 1rem;font-size:1.25rem;text-align:left;color:var(--clr-text)}@media (max-width: 768px){._expenses-item-title_1q8us_67{font-size:1rem;margin:0;text-align:right}}._expenses-item-price_1q8us_81{padding:.5rem 1.5rem;font-size:1.25rem;font-weight:600;color:var(--clr-text);background-color:#40005d;border-radius:12px}@media (max-width: 768px){._expenses-item-price_1q8us_81{font-size:1rem;padding:.5rem}}._expenses-item_1q8us_7>._expenses-item-delete-btn_1q8us_95{background-color:#1f1f1f;padding:.6rem;margin-left:.8rem;transition:all .3s ease}._expenses-item_1q8us_7>._expenses-item-delete-btn_1q8us_95 img{width:24px;height:24px}@media (max-width: 768px){._expenses-item_1q8us_7>._expenses-item-delete-btn_1q8us_95 img{width:18px;height:18px}}._expenses-item_1q8us_7>._expenses-item-delete-btn_1q8us_95:hover{box-shadow:0 2px 8px #00000040}._expenses-item_1q8us_7>._expenses-item-delete-btn_1q8us_95:focus{transform:scale(.95)}._expenses-filter_1q8us_117{color:var(--clr-text);padding:0 1rem}._expenses-filter-control_1q8us_121{display:flex;align-items:center;justify-content:space-between;margin:1.2rem 0}._expenses-filter-label_1q8us_127{font-weight:700}._expenses-filter-select_1q8us_130{font:inherit;padding:.5rem 1.5rem;font-weight:700;border-radius:6px}._expenses-list_1q8us_136{list-style:none}._expenses-list-fallback_1q8us_139{margin-top:2rem;color:var(--clr-text);font-size:1.2rem;font-weight:700;text-align:center}@media (max-width: 768px){._expenses-list-fallback_1q8us_139{font-size:1rem}}._btn_awfba_1{padding:1rem 2rem;width:fit-content;background-color:var(--clr-accent);color:var(--clr-light);border-radius:12px;transition:all .3s ease}@media (max-width: 768px){._btn_awfba_1{padding:.8rem 1.6rem}}._btn_awfba_1:hover,._btn_awfba_1:active{background-color:#510674}._btn_awfba_1:disabled{background-color:#510674cc}._modal_uzx82_1{opacity:0;visibility:hidden;position:fixed;z-index:-1;left:0;top:0;width:100%;height:100%;background:#0009;display:flex;align-items:center;justify-content:center;transition:all .3s ease}._modal-active_uzx82_16{z-index:5;opacity:1;visibility:visible}._modal-content_uzx82_21{padding:2rem;display:flex;flex-direction:column;background-color:var(--clr-light);color:var(--clr-dark)}._modal-title_uzx82_28{font-size:1.3rem;font-weight:600;text-align:center;margin-bottom:1.25rem}._modal-text_uzx82_34{margin-bottom:2rem}._modal-actions_uzx82_37{display:flex;justify-content:center;gap:1rem}._modal-delete-btn_uzx82_42{background-color:var(--clr-danger)}._modal-delete-btn_uzx82_42:hover{background-color:#ce0000}._chart_d7lcp_1{padding:1.2rem;background-color:#f8dfff;display:flex;flex-wrap:wrap;row-gap:1rem}._chart_d7lcp_1{gap:.3rem}._chart_d7lcp_1>*{flex:0 1 calc(100% / 12 - .3rem / 12 * (12 - 1))}@media (max-width: 640px){._chart_d7lcp_1{gap:.5rem}._chart_d7lcp_1>*{flex:0 1 calc(100% / 6 - .5rem / 6 * (6 - 1))}}._chart-bar_d7lcp_22{height:7.5rem;display:flex;flex-direction:column;align-items:center;gap:.25rem}@media (max-width: 640px){._chart-bar_d7lcp_22{height:6.5rem}}._chart-bar-inner_d7lcp_34{height:100%;width:1.35rem;border:1px solid var(--clr-secondary);border-radius:12px;background-color:#c3b4f3;overflow:hidden;display:flex;flex-direction:column;justify-content:flex-end}._chart-bar-fill_d7lcp_45{background-color:#4826b9;width:100%;transition:all 1s ease-in-out}._chart-bar-label_d7lcp_50{font-weight:600;font-size:.8rem;text-align:center;color:var(--clr-dark)}._new-expense_9ikq6_1{background-color:var(--clr-background);padding:1rem;margin:0 auto;max-width:50rem;text-align:center}._new-expense-controls_9ikq6_8{display:flex;flex-wrap:wrap;justify-content:center;gap:1.5rem;margin-bottom:1.5rem;text-align:left}._new-expense-controls_9ikq6_8{gap:1.5rem}._new-expense-controls_9ikq6_8>*{flex:0 1 calc(100% / 3 - 1.5rem / 3 * (3 - 1))}@media (max-width: 768px){._new-expense-controls_9ikq6_8{justify-content:stretch}._new-expense-controls_9ikq6_8{gap:1rem}._new-expense-controls_9ikq6_8>*{flex:0 1 calc(50% - .5rem)}}@media (max-width: 576px){._new-expense-controls_9ikq6_8{gap:1rem}._new-expense-controls_9ikq6_8>*{flex:0 1 calc(100% + -0rem)}}._new-expense-actions_9ikq6_41{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:1rem}@media (max-width: 768px){._new-expense-actions_9ikq6_41{justify-content:center}}._form-control-label_1guvi_1{font-weight:700;margin-bottom:.5rem;font-size:.9rem;display:block;color:var(--clr-dark)}@media (min-width: 580px){._form-control-label_1guvi_1{font-size:1rem}}._form-control-input_1guvi_13{font:inherit;padding:.5rem;border-radius:6px;border:none;height:2.5rem;width:100%}._input-error_1guvi_22{outline:2px solid var(--clr-danger)}._auth_1ndzc_1{max-width:25rem;margin:0 auto;padding:1.5rem;background-color:var(--clr-background)}._auth-form_1ndzc_7{display:flex;flex-direction:column;gap:1rem}._auth-form-btn_1ndzc_12{margin:.5rem auto 0}._auth_1ndzc_1 p{font-size:1.05rem;text-align:center;margin:1.5rem 0 .5rem;color:var(--clr-primary)}._auth_1ndzc_1 p a{margin-left:.25rem;color:var(--clr-accent)}:root{--clr-light: #fff;--clr-dark: #1f1f1f;--clr-text: #fff;--clr-primary: #1f1f1f;--clr-secondary: #3f3f3f;--clr-background: #a892ee;--clr-accent: #40005d;--clr-danger: #dc0311}*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body{height:100%}body{font-family:Poppins,sans-serif;font-size:16px;line-height:1;font-weight:400;background-color:var(--clr-secondary);color:var(--clr-text)}img{display:block;max-width:100%}ol,ul{list-style:none}button{font:inherit;cursor:pointer;background-color:transparent;outline:none;border:none;color:inherit} diff --git a/assets/index-b19cc074.css b/assets/index-b19cc074.css deleted file mode 100644 index a51f4f9..0000000 --- a/assets/index-b19cc074.css +++ /dev/null @@ -1 +0,0 @@ -:root{--clr-light: #fff;--clr-dark: #1f1f1f;--clr-text: #fff;--clr-primary: #1f1f1f;--clr-secondary: #3f3f3f;--clr-background: #a892ee;--clr-accent: #40005d;--clr-danger: #dc0311}*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body{height:100%}body{font-family:Poppins,sans-serif;font-size:16px;line-height:1;font-weight:400;background-color:var(--clr-secondary);color:var(--clr-text)}img{display:block;max-width:100%}ol,ul{list-style:none}button{font:inherit;cursor:pointer;background-color:transparent;outline:none;border:none;color:inherit}._card_14j3b_1{border-radius:12px;box-shadow:0 2px 8px #00000040;overflow:hidden}._expenses_1q8us_1{padding:1.5rem;background-color:var(--clr-primary);margin:2rem auto 0;max-width:50rem}._expenses-item_1q8us_7{display:flex;justify-content:space-between;align-items:center;padding:.8rem;margin:1rem 0;background-color:var(--clr-secondary)}._expenses-item-date_1q8us_15{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;width:5.5rem;height:5.5rem;background-color:var(--clr-primary);color:var(--clr-text);border-radius:12px}._expenses-item-month_1q8us_27{font-size:.9rem;font-weight:600}@media (max-width: 768px){._expenses-item-month_1q8us_27{font-size:.7rem}}._expenses-item-year_1q8us_36{font-size:1.5rem;font-weight:700}@media (max-width: 768px){._expenses-item-year_1q8us_36{font-size:1.2rem}}._expenses-item-day_1q8us_45{font-size:.9rem}@media (max-width: 768px){._expenses-item-day_1q8us_45{font-size:.7rem}}._expenses-item-description_1q8us_53{display:flex;align-items:center;flex-direction:row;justify-content:flex-start;gap:.8rem;flex:1}@media (max-width: 768px){._expenses-item-description_1q8us_53{flex-flow:column-reverse;align-items:flex-end}}._expenses-item-title_1q8us_67{flex:1;margin:0 1rem;font-size:1.25rem;text-align:left;color:var(--clr-text)}@media (max-width: 768px){._expenses-item-title_1q8us_67{font-size:1rem;margin:0;text-align:right}}._expenses-item-price_1q8us_81{padding:.5rem 1.5rem;font-size:1.25rem;font-weight:600;color:var(--clr-text);background-color:#40005d;border-radius:12px}@media (max-width: 768px){._expenses-item-price_1q8us_81{font-size:1rem;padding:.5rem}}._expenses-item_1q8us_7>._expenses-item-delete-btn_1q8us_95{background-color:#1f1f1f;padding:.6rem;margin-left:.8rem;transition:all .3s ease}._expenses-item_1q8us_7>._expenses-item-delete-btn_1q8us_95 img{width:24px;height:24px}@media (max-width: 768px){._expenses-item_1q8us_7>._expenses-item-delete-btn_1q8us_95 img{width:18px;height:18px}}._expenses-item_1q8us_7>._expenses-item-delete-btn_1q8us_95:hover{box-shadow:0 2px 8px #00000040}._expenses-item_1q8us_7>._expenses-item-delete-btn_1q8us_95:focus{transform:scale(.95)}._expenses-filter_1q8us_117{color:var(--clr-text);padding:0 1rem}._expenses-filter-control_1q8us_121{display:flex;align-items:center;justify-content:space-between;margin:1.2rem 0}._expenses-filter-label_1q8us_127{font-weight:700}._expenses-filter-select_1q8us_130{font:inherit;padding:.5rem 1.5rem;font-weight:700;border-radius:6px}._expenses-list_1q8us_136{list-style:none}._expenses-list-fallback_1q8us_139{margin-top:2rem;color:var(--clr-text);font-size:1.2rem;font-weight:700;text-align:center}@media (max-width: 768px){._expenses-list-fallback_1q8us_139{font-size:1rem}}._btn_awfba_1{padding:1rem 2rem;width:fit-content;background-color:var(--clr-accent);color:var(--clr-light);border-radius:12px;transition:all .3s ease}@media (max-width: 768px){._btn_awfba_1{padding:.8rem 1.6rem}}._btn_awfba_1:hover,._btn_awfba_1:active{background-color:#510674}._btn_awfba_1:disabled{background-color:#510674cc}._modal_uzx82_1{opacity:0;visibility:hidden;position:fixed;z-index:-1;left:0;top:0;width:100%;height:100%;background:rgba(0,0,0,.6);display:flex;align-items:center;justify-content:center;transition:all .3s ease}._modal-active_uzx82_16{z-index:5;opacity:1;visibility:visible}._modal-content_uzx82_21{padding:2rem;display:flex;flex-direction:column;background-color:var(--clr-light);color:var(--clr-dark)}._modal-title_uzx82_28{font-size:1.3rem;font-weight:600;text-align:center;margin-bottom:1.25rem}._modal-text_uzx82_34{margin-bottom:2rem}._modal-actions_uzx82_37{display:flex;justify-content:center;gap:1rem}._modal-delete-btn_uzx82_42{background-color:var(--clr-danger)}._modal-delete-btn_uzx82_42:hover{background-color:#ce0000}._chart_4qv25_1{padding:1.2rem;background-color:#f8dfff;display:flex;flex-wrap:wrap;row-gap:1rem}._chart_4qv25_1{gap:.3rem}._chart_4qv25_1>*{flex:0 1 calc((100% / 12) - (.3rem / 12 * 11))}@media (max-width: 640px){._chart_4qv25_1{gap:.5rem}._chart_4qv25_1>*{flex:0 1 calc((100% / 6) - (.5rem / 6 * 5))}}._chart-bar_4qv25_22{height:7.5rem;display:flex;flex-direction:column;align-items:center;gap:.25rem}@media (max-width: 640px){._chart-bar_4qv25_22{height:6.5rem}}._chart-bar-inner_4qv25_34{height:100%;width:1.35rem;border:1px solid var(--clr-secondary);border-radius:12px;background-color:#c3b4f3;overflow:hidden;display:flex;flex-direction:column;justify-content:flex-end}._chart-bar-fill_4qv25_45{background-color:#4826b9;width:100%;transition:all 1s ease-in-out}._chart-bar-label_4qv25_50{font-weight:600;font-size:.8rem;text-align:center;color:var(--clr-dark)}._new-expense_1orf3_1{background-color:var(--clr-background);padding:1rem;margin:0 auto;max-width:50rem;text-align:center}._new-expense-controls_1orf3_8{display:flex;flex-wrap:wrap;justify-content:center;gap:1.5rem;margin-bottom:1.5rem;text-align:left}._new-expense-controls_1orf3_8{gap:1.5rem}._new-expense-controls_1orf3_8>*{flex:0 1 calc((100% / 3) - (1.5rem / 3 * 2))}@media (max-width: 768px){._new-expense-controls_1orf3_8{justify-content:stretch}._new-expense-controls_1orf3_8{gap:1rem}._new-expense-controls_1orf3_8>*{flex:0 1 calc(50% - .5rem)}}@media (max-width: 576px){._new-expense-controls_1orf3_8{gap:1rem}._new-expense-controls_1orf3_8>*{flex:0 1 calc(100% + -0rem)}}._new-expense-actions_1orf3_41{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:1rem}@media (max-width: 768px){._new-expense-actions_1orf3_41{justify-content:center}}._form-control-label_1guvi_1{font-weight:700;margin-bottom:.5rem;font-size:.9rem;display:block;color:var(--clr-dark)}@media (min-width: 580px){._form-control-label_1guvi_1{font-size:1rem}}._form-control-input_1guvi_13{font:inherit;padding:.5rem;border-radius:6px;border:none;height:2.5rem;width:100%}._input-error_1guvi_22{outline:2px solid var(--clr-danger)}._auth_1ndzc_1{max-width:25rem;margin:0 auto;padding:1.5rem;background-color:var(--clr-background)}._auth-form_1ndzc_7{display:flex;flex-direction:column;gap:1rem}._auth-form-btn_1ndzc_12{margin:.5rem auto 0}._auth_1ndzc_1 p{font-size:1.05rem;text-align:center;margin:1.5rem 0 .5rem;color:var(--clr-primary)}._auth_1ndzc_1 p a{margin-left:.25rem;color:var(--clr-accent)}._container_1wy3b_1{padding-inline:5rem}@media (max-width: 992px){._container_1wy3b_1{padding-inline:3rem}}@media (max-width: 576px){._container_1wy3b_1{padding-inline:1.5rem}}._menu_1czut_1{display:flex;align-items:center;gap:2rem}._menu-link_1czut_6{color:#fff;text-decoration:none;font-size:1rem}._link-active_1czut_12{position:relative}._link-active_1czut_12:after{position:absolute;content:"";bottom:-6px;left:0;right:0;width:100%;height:2px;background-color:#fff}._header_l212f_1{padding:1rem 0;background-color:var(--clr-primary)}._header-body_l212f_5{display:flex;align-items:center;justify-content:space-between}._brand_1cqmy_1{display:flex;align-items:center;gap:.75rem}._brand-logo_1cqmy_6{width:60px;height:60px}._brand-name_1cqmy_10{display:block;font-weight:500;color:var(--clr-text)} diff --git a/assets/index-dd20ddbf.js b/assets/index-dd20ddbf.js deleted file mode 100644 index 45f5a47..0000000 --- a/assets/index-dd20ddbf.js +++ /dev/null @@ -1,68 +0,0 @@ -var ip=Object.defineProperty;var ap=(e,t,n)=>t in e?ip(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var yr=(e,t,n)=>(ap(e,typeof t!="symbol"?t+"":t,n),n);function up(e,t){for(var n=0;nr[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(l){if(l.ep)return;l.ep=!0;const o=n(l);fetch(l.href,o)}})();function yc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var wc={exports:{}},_o={},xc={exports:{}},V={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var dl=Symbol.for("react.element"),sp=Symbol.for("react.portal"),cp=Symbol.for("react.fragment"),dp=Symbol.for("react.strict_mode"),fp=Symbol.for("react.profiler"),pp=Symbol.for("react.provider"),hp=Symbol.for("react.context"),mp=Symbol.for("react.forward_ref"),vp=Symbol.for("react.suspense"),gp=Symbol.for("react.memo"),yp=Symbol.for("react.lazy"),$u=Symbol.iterator;function wp(e){return e===null||typeof e!="object"?null:(e=$u&&e[$u]||e["@@iterator"],typeof e=="function"?e:null)}var Sc={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ec=Object.assign,kc={};function cr(e,t,n){this.props=e,this.context=t,this.refs=kc,this.updater=n||Sc}cr.prototype.isReactComponent={};cr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): 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")};cr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function _c(){}_c.prototype=cr.prototype;function La(e,t,n){this.props=e,this.context=t,this.refs=kc,this.updater=n||Sc}var ja=La.prototype=new _c;ja.constructor=La;Ec(ja,cr.prototype);ja.isPureReactComponent=!0;var Bu=Array.isArray,Cc=Object.prototype.hasOwnProperty,Da={current:null},Pc={key:!0,ref:!0,__self:!0,__source:!0};function Rc(e,t,n){var r,l={},o=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)Cc.call(t,r)&&!Pc.hasOwnProperty(r)&&(l[r]=t[r]);var a=arguments.length-2;if(a===1)l.children=n;else if(1>>1,ce=j[re];if(0>>1;rel(gt,B))ctl(Dn,gt)?(j[re]=Dn,j[ct]=B,re=ct):(j[re]=gt,j[J]=B,re=J);else if(ctl(Dn,B))j[re]=Dn,j[ct]=B,re=ct;else break e}}return F}function l(j,F){var B=j.sortIndex-F.sortIndex;return B!==0?B:j.id-F.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,a=i.now();e.unstable_now=function(){return i.now()-a}}var u=[],s=[],f=1,m=null,v=3,x=!1,y=!1,g=!1,R=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,c=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function h(j){for(var F=n(s);F!==null;){if(F.callback===null)r(s);else if(F.startTime<=j)r(s),F.sortIndex=F.expirationTime,t(u,F);else break;F=n(s)}}function d(j){if(g=!1,h(j),!y)if(n(u)!==null)y=!0,Ae(k);else{var F=n(s);F!==null&&st(d,F.startTime-j)}}function k(j,F){y=!1,g&&(g=!1,p(T),T=-1),x=!0;var B=v;try{for(h(F),m=n(u);m!==null&&(!(m.expirationTime>F)||j&&!ge());){var re=m.callback;if(typeof re=="function"){m.callback=null,v=m.priorityLevel;var ce=re(m.expirationTime<=F);F=e.unstable_now(),typeof ce=="function"?m.callback=ce:m===n(u)&&r(u),h(F)}else r(u);m=n(u)}if(m!==null)var jn=!0;else{var J=n(s);J!==null&&st(d,J.startTime-F),jn=!1}return jn}finally{m=null,v=B,x=!1}}var L=!1,N=null,T=-1,W=5,O=-1;function ge(){return!(e.unstable_now()-Oj||125re?(j.sortIndex=B,t(s,j),n(u)===null&&j===n(s)&&(g?(p(T),T=-1):g=!0,st(d,B-re))):(j.sortIndex=ce,t(u,j),y||x||(y=!0,Ae(k))),j},e.unstable_shouldYield=ge,e.unstable_wrapCallback=function(j){var F=v;return function(){var B=v;v=F;try{return j.apply(this,arguments)}finally{v=B}}}})(Dc);jc.exports=Dc;var Tp=jc.exports;/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Tc=C,Ve=Tp;function P(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ji=Object.prototype.hasOwnProperty,Mp=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Vu={},Wu={};function zp(e){return ji.call(Wu,e)?!0:ji.call(Vu,e)?!1:Mp.test(e)?Wu[e]=!0:(Vu[e]=!0,!1)}function Ip(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Fp(e,t,n,r){if(t===null||typeof t>"u"||Ip(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Me(e,t,n,r,l,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var _e={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){_e[e]=new Me(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];_e[t]=new Me(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){_e[e]=new Me(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){_e[e]=new Me(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){_e[e]=new Me(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){_e[e]=new Me(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){_e[e]=new Me(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){_e[e]=new Me(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){_e[e]=new Me(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ma=/[\-:]([a-z])/g;function za(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Ma,za);_e[t]=new Me(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Ma,za);_e[t]=new Me(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Ma,za);_e[t]=new Me(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){_e[e]=new Me(e,1,!1,e.toLowerCase(),null,!1,!1)});_e.xlinkHref=new Me("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){_e[e]=new Me(e,1,!1,e.toLowerCase(),null,!0,!0)});function Ia(e,t,n,r){var l=_e.hasOwnProperty(t)?_e[t]:null;(l!==null?l.type!==0:r||!(2a||l[i]!==o[a]){var u=` -`+l[i].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}while(1<=i&&0<=a);break}}}finally{bo=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Dr(e):""}function Op(e){switch(e.tag){case 5:return Dr(e.type);case 16:return Dr("Lazy");case 13:return Dr("Suspense");case 19:return Dr("SuspenseList");case 0:case 2:case 15:return e=ei(e.type,!1),e;case 11:return e=ei(e.type.render,!1),e;case 1:return e=ei(e.type,!0),e;default:return""}}function zi(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case In:return"Fragment";case zn:return"Portal";case Di:return"Profiler";case Fa:return"StrictMode";case Ti:return"Suspense";case Mi:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Ic:return(e.displayName||"Context")+".Consumer";case zc:return(e._context.displayName||"Context")+".Provider";case Oa:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ua:return t=e.displayName||null,t!==null?t:zi(e.type)||"Memo";case Bt:t=e._payload,e=e._init;try{return zi(e(t))}catch{}}return null}function Up(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return zi(t);case 8:return t===Fa?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function rn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Oc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ap(e){var t=Oc(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function kl(e){e._valueTracker||(e._valueTracker=Ap(e))}function Uc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Oc(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Zl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ii(e,t){var n=t.checked;return ie({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ku(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=rn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Ac(e,t){t=t.checked,t!=null&&Ia(e,"checked",t,!1)}function Fi(e,t){Ac(e,t);var n=rn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Oi(e,t.type,n):t.hasOwnProperty("defaultValue")&&Oi(e,t.type,rn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Yu(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Oi(e,t,n){(t!=="number"||Zl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Tr=Array.isArray;function Xn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=_l.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Yr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Fr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},$p=["Webkit","ms","Moz","O"];Object.keys(Fr).forEach(function(e){$p.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Fr[t]=Fr[e]})});function Vc(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Fr.hasOwnProperty(e)&&Fr[e]?(""+t).trim():t+"px"}function Wc(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=Vc(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var Bp=ie({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function $i(e,t){if(t){if(Bp[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(P(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(P(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(P(61))}if(t.style!=null&&typeof t.style!="object")throw Error(P(62))}}function Bi(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Hi=null;function Aa(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Vi=null,Gn=null,Jn=null;function Ju(e){if(e=hl(e)){if(typeof Vi!="function")throw Error(P(280));var t=e.stateNode;t&&(t=Lo(t),Vi(e.stateNode,e.type,t))}}function Qc(e){Gn?Jn?Jn.push(e):Jn=[e]:Gn=e}function Kc(){if(Gn){var e=Gn,t=Jn;if(Jn=Gn=null,Ju(e),t)for(e=0;e>>=0,e===0?32:31-(qp(e)/bp|0)|0}var Cl=64,Pl=4194304;function Mr(e){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:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function to(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,o=e.pingedLanes,i=n&268435455;if(i!==0){var a=i&~l;a!==0?r=Mr(a):(o&=i,o!==0&&(r=Mr(o)))}else i=n&~l,i!==0?r=Mr(i):o!==0&&(r=Mr(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,o=t&-t,l>=o||l===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function fl(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ot(t),e[t]=n}function rh(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Ur),os=String.fromCharCode(32),is=!1;function fd(e,t){switch(e){case"keyup":return Dh.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function pd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Fn=!1;function Mh(e,t){switch(e){case"compositionend":return pd(t);case"keypress":return t.which!==32?null:(is=!0,os);case"textInput":return e=t.data,e===os&&is?null:e;default:return null}}function zh(e,t){if(Fn)return e==="compositionend"||!Ya&&fd(e,t)?(e=cd(),Hl=Wa=Qt=null,Fn=!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=cs(n)}}function gd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?gd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function yd(){for(var e=window,t=Zl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Zl(e.document)}return t}function Xa(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Vh(e){var t=yd(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&gd(n.ownerDocument.documentElement,n)){if(r!==null&&Xa(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,o=Math.min(r.start,l);r=r.end===void 0?o:Math.min(r.end,l),!e.extend&&o>r&&(l=r,r=o,o=l),l=ds(n,o);var i=ds(n,r);l&&i&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,On=null,Gi=null,$r=null,Ji=!1;function fs(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ji||On==null||On!==Zl(r)||(r=On,"selectionStart"in r&&Xa(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}),$r&&br($r,r)||($r=r,r=lo(Gi,"onSelect"),0$n||(e.current=na[$n],na[$n]=null,$n--)}function q(e,t){$n++,na[$n]=e.current,e.current=t}var ln={},Le=un(ln),Fe=un(!1),Sn=ln;function nr(e,t){var n=e.type.contextTypes;if(!n)return ln;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},o;for(o in n)l[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function Oe(e){return e=e.childContextTypes,e!=null}function io(){ee(Fe),ee(Le)}function ws(e,t,n){if(Le.current!==ln)throw Error(P(168));q(Le,t),q(Fe,n)}function Rd(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(P(108,Up(e)||"Unknown",l));return ie({},n,r)}function ao(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ln,Sn=Le.current,q(Le,e),q(Fe,Fe.current),!0}function xs(e,t,n){var r=e.stateNode;if(!r)throw Error(P(169));n?(e=Rd(e,t,Sn),r.__reactInternalMemoizedMergedChildContext=e,ee(Fe),ee(Le),q(Le,e)):ee(Fe),q(Fe,n)}var Et=null,jo=!1,hi=!1;function Nd(e){Et===null?Et=[e]:Et.push(e)}function tm(e){jo=!0,Nd(e)}function sn(){if(!hi&&Et!==null){hi=!0;var e=0,t=K;try{var n=Et;for(K=1;e>=i,l-=i,kt=1<<32-ot(t)+l|n<T?(W=N,N=null):W=N.sibling;var O=v(p,N,h[T],d);if(O===null){N===null&&(N=W);break}e&&N&&O.alternate===null&&t(p,N),c=o(O,c,T),L===null?k=O:L.sibling=O,L=O,N=W}if(T===h.length)return n(p,N),ne&&pn(p,T),k;if(N===null){for(;TT?(W=N,N=null):W=N.sibling;var ge=v(p,N,O.value,d);if(ge===null){N===null&&(N=W);break}e&&N&&ge.alternate===null&&t(p,N),c=o(ge,c,T),L===null?k=ge:L.sibling=ge,L=ge,N=W}if(O.done)return n(p,N),ne&&pn(p,T),k;if(N===null){for(;!O.done;T++,O=h.next())O=m(p,O.value,d),O!==null&&(c=o(O,c,T),L===null?k=O:L.sibling=O,L=O);return ne&&pn(p,T),k}for(N=r(p,N);!O.done;T++,O=h.next())O=x(N,p,T,O.value,d),O!==null&&(e&&O.alternate!==null&&N.delete(O.key===null?T:O.key),c=o(O,c,T),L===null?k=O:L.sibling=O,L=O);return e&&N.forEach(function(G){return t(p,G)}),ne&&pn(p,T),k}function R(p,c,h,d){if(typeof h=="object"&&h!==null&&h.type===In&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case El:e:{for(var k=h.key,L=c;L!==null;){if(L.key===k){if(k=h.type,k===In){if(L.tag===7){n(p,L.sibling),c=l(L,h.props.children),c.return=p,p=c;break e}}else if(L.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Bt&&Rs(k)===L.type){n(p,L.sibling),c=l(L,h.props),c.ref=_r(p,L,h),c.return=p,p=c;break e}n(p,L);break}else t(p,L);L=L.sibling}h.type===In?(c=xn(h.props.children,p.mode,d,h.key),c.return=p,p=c):(d=Jl(h.type,h.key,h.props,null,p.mode,d),d.ref=_r(p,c,h),d.return=p,p=d)}return i(p);case zn:e:{for(L=h.key;c!==null;){if(c.key===L)if(c.tag===4&&c.stateNode.containerInfo===h.containerInfo&&c.stateNode.implementation===h.implementation){n(p,c.sibling),c=l(c,h.children||[]),c.return=p,p=c;break e}else{n(p,c);break}else t(p,c);c=c.sibling}c=Ei(h,p.mode,d),c.return=p,p=c}return i(p);case Bt:return L=h._init,R(p,c,L(h._payload),d)}if(Tr(h))return y(p,c,h,d);if(wr(h))return g(p,c,h,d);Ml(p,h)}return typeof h=="string"&&h!==""||typeof h=="number"?(h=""+h,c!==null&&c.tag===6?(n(p,c.sibling),c=l(c,h),c.return=p,p=c):(n(p,c),c=Si(h,p.mode,d),c.return=p,p=c),i(p)):n(p,c)}return R}var lr=Fd(!0),Od=Fd(!1),ml={},vt=un(ml),rl=un(ml),ll=un(ml);function gn(e){if(e===ml)throw Error(P(174));return e}function ru(e,t){switch(q(ll,t),q(rl,e),q(vt,ml),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ai(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ai(t,e)}ee(vt),q(vt,t)}function or(){ee(vt),ee(rl),ee(ll)}function Ud(e){gn(ll.current);var t=gn(vt.current),n=Ai(t,e.type);t!==n&&(q(rl,e),q(vt,n))}function lu(e){rl.current===e&&(ee(vt),ee(rl))}var le=un(0);function ho(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var mi=[];function ou(){for(var e=0;en?n:4,e(!0);var r=vi.transition;vi.transition={};try{e(!1),t()}finally{K=n,vi.transition=r}}function ef(){return qe().memoizedState}function om(e,t,n){var r=bt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},tf(e))nf(t,n);else if(n=Td(e,t,n,r),n!==null){var l=De();it(n,e,r,l),rf(n,t,r)}}function im(e,t,n){var r=bt(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(tf(e))nf(t,l);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,a=o(i,n);if(l.hasEagerState=!0,l.eagerState=a,at(a,i)){var u=t.interleaved;u===null?(l.next=l,tu(t)):(l.next=u.next,u.next=l),t.interleaved=l;return}}catch{}finally{}n=Td(e,t,l,r),n!==null&&(l=De(),it(n,e,r,l),rf(n,t,r))}}function tf(e){var t=e.alternate;return e===oe||t!==null&&t===oe}function nf(e,t){Br=mo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function rf(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ba(e,n)}}var vo={readContext:Ze,useCallback:Pe,useContext:Pe,useEffect:Pe,useImperativeHandle:Pe,useInsertionEffect:Pe,useLayoutEffect:Pe,useMemo:Pe,useReducer:Pe,useRef:Pe,useState:Pe,useDebugValue:Pe,useDeferredValue:Pe,useTransition:Pe,useMutableSource:Pe,useSyncExternalStore:Pe,useId:Pe,unstable_isNewReconciler:!1},am={readContext:Ze,useCallback:function(e,t){return pt().memoizedState=[e,t===void 0?null:t],e},useContext:Ze,useEffect:Ls,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Kl(4194308,4,Gd.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Kl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Kl(4,2,e,t)},useMemo:function(e,t){var n=pt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=pt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=om.bind(null,oe,e),[r.memoizedState,e]},useRef:function(e){var t=pt();return e={current:e},t.memoizedState=e},useState:Ns,useDebugValue:cu,useDeferredValue:function(e){return pt().memoizedState=e},useTransition:function(){var e=Ns(!1),t=e[0];return e=lm.bind(null,e[1]),pt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=oe,l=pt();if(ne){if(n===void 0)throw Error(P(407));n=n()}else{if(n=t(),Se===null)throw Error(P(349));kn&30||Bd(r,t,n)}l.memoizedState=n;var o={value:n,getSnapshot:t};return l.queue=o,Ls(Vd.bind(null,r,o,e),[e]),r.flags|=2048,al(9,Hd.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=pt(),t=Se.identifierPrefix;if(ne){var n=_t,r=kt;n=(r&~(1<<32-ot(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ol++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[ht]=t,e[nl]=r,pf(e,t,!1,!1),t.stateNode=e;e:{switch(i=Bi(n,r),n){case"dialog":b("cancel",e),b("close",e),l=r;break;case"iframe":case"object":case"embed":b("load",e),l=r;break;case"video":case"audio":for(l=0;lar&&(t.flags|=128,r=!0,Cr(o,!1),t.lanes=4194304)}else{if(!r)if(e=ho(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Cr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!ne)return Re(t),null}else 2*se()-o.renderingStartTime>ar&&n!==1073741824&&(t.flags|=128,r=!0,Cr(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(n=o.last,n!==null?n.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=se(),t.sibling=null,n=le.current,q(le,r?n&1|2:n&1),t):(Re(t),null);case 22:case 23:return vu(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?$e&1073741824&&(Re(t),t.subtreeFlags&6&&(t.flags|=8192)):Re(t),null;case 24:return null;case 25:return null}throw Error(P(156,t.tag))}function mm(e,t){switch(Ja(t),t.tag){case 1:return Oe(t.type)&&io(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return or(),ee(Fe),ee(Le),ou(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return lu(t),null;case 13:if(ee(le),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(P(340));rr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ee(le),null;case 4:return or(),null;case 10:return eu(t.type._context),null;case 22:case 23:return vu(),null;case 24:return null;default:return null}}var Il=!1,Ne=!1,vm=typeof WeakSet=="function"?WeakSet:Set,D=null;function Wn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ae(e,t,r)}else n.current=null}function ha(e,t,n){try{n()}catch(r){ae(e,t,r)}}var Us=!1;function gm(e,t){if(Zi=no,e=yd(),Xa(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 l=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,a=-1,u=-1,s=0,f=0,m=e,v=null;t:for(;;){for(var x;m!==n||l!==0&&m.nodeType!==3||(a=i+l),m!==o||r!==0&&m.nodeType!==3||(u=i+r),m.nodeType===3&&(i+=m.nodeValue.length),(x=m.firstChild)!==null;)v=m,m=x;for(;;){if(m===e)break t;if(v===n&&++s===l&&(a=i),v===o&&++f===r&&(u=i),(x=m.nextSibling)!==null)break;m=v,v=m.parentNode}m=x}n=a===-1||u===-1?null:{start:a,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(qi={focusedElem:e,selectionRange:n},no=!1,D=t;D!==null;)if(t=D,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,D=e;else for(;D!==null;){t=D;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var g=y.memoizedProps,R=y.memoizedState,p=t.stateNode,c=p.getSnapshotBeforeUpdate(t.elementType===t.type?g:tt(t.type,g),R);p.__reactInternalSnapshotBeforeUpdate=c}break;case 3:var h=t.stateNode.containerInfo;h.nodeType===1?h.textContent="":h.nodeType===9&&h.documentElement&&h.removeChild(h.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(P(163))}}catch(d){ae(t,t.return,d)}if(e=t.sibling,e!==null){e.return=t.return,D=e;break}D=t.return}return y=Us,Us=!1,y}function Hr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var o=l.destroy;l.destroy=void 0,o!==void 0&&ha(t,n,o)}l=l.next}while(l!==r)}}function Mo(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ma(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function vf(e){var t=e.alternate;t!==null&&(e.alternate=null,vf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ht],delete t[nl],delete t[ta],delete t[bh],delete t[em])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function gf(e){return e.tag===5||e.tag===3||e.tag===4}function As(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||gf(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.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 va(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=oo));else if(r!==4&&(e=e.child,e!==null))for(va(e,t,n),e=e.sibling;e!==null;)va(e,t,n),e=e.sibling}function ga(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&&(e=e.child,e!==null))for(ga(e,t,n),e=e.sibling;e!==null;)ga(e,t,n),e=e.sibling}var Ee=null,nt=!1;function At(e,t,n){for(n=n.child;n!==null;)yf(e,t,n),n=n.sibling}function yf(e,t,n){if(mt&&typeof mt.onCommitFiberUnmount=="function")try{mt.onCommitFiberUnmount(Co,n)}catch{}switch(n.tag){case 5:Ne||Wn(n,t);case 6:var r=Ee,l=nt;Ee=null,At(e,t,n),Ee=r,nt=l,Ee!==null&&(nt?(e=Ee,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ee.removeChild(n.stateNode));break;case 18:Ee!==null&&(nt?(e=Ee,n=n.stateNode,e.nodeType===8?pi(e.parentNode,n):e.nodeType===1&&pi(e,n),Zr(e)):pi(Ee,n.stateNode));break;case 4:r=Ee,l=nt,Ee=n.stateNode.containerInfo,nt=!0,At(e,t,n),Ee=r,nt=l;break;case 0:case 11:case 14:case 15:if(!Ne&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var o=l,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&ha(n,t,i),l=l.next}while(l!==r)}At(e,t,n);break;case 1:if(!Ne&&(Wn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){ae(n,t,a)}At(e,t,n);break;case 21:At(e,t,n);break;case 22:n.mode&1?(Ne=(r=Ne)||n.memoizedState!==null,At(e,t,n),Ne=r):At(e,t,n);break;default:At(e,t,n)}}function $s(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new vm),t.forEach(function(r){var l=Pm.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function et(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=i),r&=~o}if(r=l,r=se()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*wm(r/1960))-r,10e?16:e,Kt===null)var r=!1;else{if(e=Kt,Kt=null,wo=0,Q&6)throw Error(P(331));var l=Q;for(Q|=4,D=e.current;D!==null;){var o=D,i=o.child;if(D.flags&16){var a=o.deletions;if(a!==null){for(var u=0;use()-hu?wn(e,0):pu|=n),Ue(e,t)}function Pf(e,t){t===0&&(e.mode&1?(t=Pl,Pl<<=1,!(Pl&130023424)&&(Pl=4194304)):t=1);var n=De();e=jt(e,t),e!==null&&(fl(e,t,n),Ue(e,n))}function Cm(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Pf(e,n)}function Pm(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(P(314))}r!==null&&r.delete(t),Pf(e,n)}var Rf;Rf=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Fe.current)Ie=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ie=!1,pm(e,t,n);Ie=!!(e.flags&131072)}else Ie=!1,ne&&t.flags&1048576&&Ld(t,so,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Yl(e,t),e=t.pendingProps;var l=nr(t,Le.current);qn(t,n),l=au(null,t,r,e,l,n);var o=uu();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Oe(r)?(o=!0,ao(t)):o=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,nu(t),l.updater=Do,t.stateNode=l,l._reactInternals=t,aa(t,r,e,n),t=ca(null,t,r,!0,o,n)):(t.tag=0,ne&&o&&Ga(t),je(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Yl(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=Nm(r),e=tt(r,e),l){case 0:t=sa(null,t,r,e,n);break e;case 1:t=Is(null,t,r,e,n);break e;case 11:t=Ms(null,t,r,e,n);break e;case 14:t=zs(null,t,r,tt(r.type,e),n);break e}throw Error(P(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:tt(r,l),sa(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:tt(r,l),Is(e,t,r,l,n);case 3:e:{if(cf(t),e===null)throw Error(P(387));r=t.pendingProps,o=t.memoizedState,l=o.element,Md(e,t),po(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){l=ir(Error(P(423)),t),t=Fs(e,t,r,n,l);break e}else if(r!==l){l=ir(Error(P(424)),t),t=Fs(e,t,r,n,l);break e}else for(Be=Jt(t.stateNode.containerInfo.firstChild),He=t,ne=!0,lt=null,n=Od(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(rr(),r===l){t=Dt(e,t,n);break e}je(e,t,r,n)}t=t.child}return t;case 5:return Ud(t),e===null&&la(t),r=t.type,l=t.pendingProps,o=e!==null?e.memoizedProps:null,i=l.children,bi(r,l)?i=null:o!==null&&bi(r,o)&&(t.flags|=32),sf(e,t),je(e,t,i,n),t.child;case 6:return e===null&&la(t),null;case 13:return df(e,t,n);case 4:return ru(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=lr(t,null,r,n):je(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:tt(r,l),Ms(e,t,r,l,n);case 7:return je(e,t,t.pendingProps,n),t.child;case 8:return je(e,t,t.pendingProps.children,n),t.child;case 12:return je(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,o=t.memoizedProps,i=l.value,q(co,r._currentValue),r._currentValue=i,o!==null)if(at(o.value,i)){if(o.children===l.children&&!Fe.current){t=Dt(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){i=o.child;for(var u=a.firstContext;u!==null;){if(u.context===r){if(o.tag===1){u=Pt(-1,n&-n),u.tag=2;var s=o.updateQueue;if(s!==null){s=s.shared;var f=s.pending;f===null?u.next=u:(u.next=f.next,f.next=u),s.pending=u}}o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),oa(o.return,n,t),a.lanes|=n;break}u=u.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(P(341));i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),oa(i,n,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}je(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,qn(t,n),l=Ze(l),r=r(l),t.flags|=1,je(e,t,r,n),t.child;case 14:return r=t.type,l=tt(r,t.pendingProps),l=tt(r.type,l),zs(e,t,r,l,n);case 15:return af(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:tt(r,l),Yl(e,t),t.tag=1,Oe(r)?(e=!0,ao(t)):e=!1,qn(t,n),Id(t,r,l),aa(t,r,l,n),ca(null,t,r,!0,e,n);case 19:return ff(e,t,n);case 22:return uf(e,t,n)}throw Error(P(156,t.tag))};function Nf(e,t){return bc(e,t)}function Rm(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ge(e,t,n,r){return new Rm(e,t,n,r)}function yu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Nm(e){if(typeof e=="function")return yu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Oa)return 11;if(e===Ua)return 14}return 2}function en(e,t){var n=e.alternate;return n===null?(n=Ge(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Jl(e,t,n,r,l,o){var i=2;if(r=e,typeof e=="function")yu(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case In:return xn(n.children,l,o,t);case Fa:i=8,l|=8;break;case Di:return e=Ge(12,n,t,l|2),e.elementType=Di,e.lanes=o,e;case Ti:return e=Ge(13,n,t,l),e.elementType=Ti,e.lanes=o,e;case Mi:return e=Ge(19,n,t,l),e.elementType=Mi,e.lanes=o,e;case Fc:return Io(n,l,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case zc:i=10;break e;case Ic:i=9;break e;case Oa:i=11;break e;case Ua:i=14;break e;case Bt:i=16,r=null;break e}throw Error(P(130,e==null?e:typeof e,""))}return t=Ge(i,n,t,l),t.elementType=e,t.type=r,t.lanes=o,t}function xn(e,t,n,r){return e=Ge(7,e,r,t),e.lanes=n,e}function Io(e,t,n,r){return e=Ge(22,e,r,t),e.elementType=Fc,e.lanes=n,e.stateNode={isHidden:!1},e}function Si(e,t,n){return e=Ge(6,e,null,t),e.lanes=n,e}function Ei(e,t,n){return t=Ge(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Lm(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ni(0),this.expirationTimes=ni(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ni(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function wu(e,t,n,r,l,o,i,a,u){return e=new Lm(e,t,n,a,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Ge(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},nu(o),e}function jm(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Tf)}catch(e){console.error(e)}}Tf(),Lc.exports=We;var Mf=Lc.exports;const Im=yc(Mf);var Xs=Mf;Li.createRoot=Xs.createRoot,Li.hydrateRoot=Xs.hydrateRoot;/** - * @remix-run/router v1.7.2 - * - * 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 - */function te(){return te=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function ur(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Om(){return Math.random().toString(36).substr(2,8)}function Js(e,t){return{usr:e.state,key:e.key,idx:t}}function sl(e,t,n,r){return n===void 0&&(n=null),te({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Mt(t):t,{state:n,key:t&&t.key||r||Om()})}function Pn(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Mt(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Um(e,t,n,r){r===void 0&&(r={});let{window:l=document.defaultView,v5Compat:o=!1}=r,i=l.history,a=de.Pop,u=null,s=f();s==null&&(s=0,i.replaceState(te({},i.state,{idx:s}),""));function f(){return(i.state||{idx:null}).idx}function m(){a=de.Pop;let R=f(),p=R==null?null:R-s;s=R,u&&u({action:a,location:g.location,delta:p})}function v(R,p){a=de.Push;let c=sl(g.location,R,p);n&&n(c,R),s=f()+1;let h=Js(c,s),d=g.createHref(c);try{i.pushState(h,"",d)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;l.location.assign(d)}o&&u&&u({action:a,location:g.location,delta:1})}function x(R,p){a=de.Replace;let c=sl(g.location,R,p);n&&n(c,R),s=f();let h=Js(c,s),d=g.createHref(c);i.replaceState(h,"",d),o&&u&&u({action:a,location:g.location,delta:0})}function y(R){let p=l.location.origin!=="null"?l.location.origin:l.location.href,c=typeof R=="string"?R:Pn(R);return H(p,"No window.location.(origin|href) available to create URL for href: "+c),new URL(c,p)}let g={get action(){return a},get location(){return e(l,i)},listen(R){if(u)throw new Error("A history only accepts one active listener");return l.addEventListener(Gs,m),u=R,()=>{l.removeEventListener(Gs,m),u=null}},createHref(R){return t(l,R)},createURL:y,encodeLocation(R){let p=y(R);return{pathname:p.pathname,search:p.search,hash:p.hash}},push:v,replace:x,go(R){return i.go(R)}};return g}var he;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(he||(he={}));const Am=new Set(["lazy","caseSensitive","path","id","index","children"]);function $m(e){return e.index===!0}function Ea(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((l,o)=>{let i=[...n,o],a=typeof l.id=="string"?l.id:i.join("-");if(H(l.index!==!0||!l.children,"Cannot specify children on an index route"),H(!r[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),$m(l)){let u=te({},l,t(l),{id:a});return r[a]=u,u}else{let u=te({},l,t(l),{id:a,children:void 0});return r[a]=u,l.children&&(u.children=Ea(l.children,t,i,r)),u}})}function Kn(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?Mt(t):t,l=pr(r.pathname||"/",n);if(l==null)return null;let o=zf(e);Bm(o);let i=null;for(let a=0;i==null&&a{let u={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};u.relativePath.startsWith("/")&&(H(u.relativePath.startsWith(r),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(r.length));let s=Rt([r,u.relativePath]),f=n.concat(u);o.children&&o.children.length>0&&(H(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+s+'".')),zf(o.children,t,f,s)),!(o.path==null&&!o.index)&&t.push({path:s,score:Xm(s,o.index),routesMeta:f})};return e.forEach((o,i)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))l(o,i);else for(let u of If(o.path))l(o,i,u)}),t}function If(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,l=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return l?[o,""]:[o];let i=If(r.join("/")),a=[];return a.push(...i.map(u=>u===""?o:[o,u].join("/"))),l&&a.push(...i),a.map(u=>e.startsWith("/")&&u===""?"/":u)}function Bm(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Gm(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Hm=/^:\w+$/,Vm=3,Wm=2,Qm=1,Km=10,Ym=-2,Zs=e=>e==="*";function Xm(e,t){let n=e.split("/"),r=n.length;return n.some(Zs)&&(r+=Ym),t&&(r+=Wm),n.filter(l=>!Zs(l)).reduce((l,o)=>l+(Hm.test(o)?Vm:o===""?Qm:Km),r)}function Gm(e,t){return e.length===t.length&&e.slice(0,-1).every((r,l)=>r===t[l])?e[e.length-1]-t[t.length-1]:0}function Jm(e,t){let{routesMeta:n}=e,r={},l="/",o=[];for(let i=0;i{if(f==="*"){let v=a[m]||"";i=o.slice(0,o.length-v.length).replace(/(.)\/+$/,"$1")}return s[f]=ev(a[m]||"",f),s},{}),pathname:o,pathnameBase:i,pattern:e}}function qm(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),ur(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=[],l="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(i,a)=>(r.push(a),"/([^\\/]+)"));return e.endsWith("*")?(r.push("*"),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,t?void 0:"i"),r]}function bm(e){try{return decodeURI(e)}catch(t){return ur(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function ev(e,t){try{return decodeURIComponent(e)}catch(n){return ur(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function pr(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)||"/"}function tv(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:l=""}=typeof e=="string"?Mt(e):e;return{pathname:n?n.startsWith("/")?n:nv(n,t):t,search:lv(r),hash:ov(l)}}function nv(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(l=>{l===".."?n.length>1&&n.pop():l!=="."&&n.push(l)}),n.length>1?n.join("/"):"/"}function ki(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 $o(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function ku(e,t,n,r){r===void 0&&(r=!1);let l;typeof e=="string"?l=Mt(e):(l=te({},e),H(!l.pathname||!l.pathname.includes("?"),ki("?","pathname","search",l)),H(!l.pathname||!l.pathname.includes("#"),ki("#","pathname","hash",l)),H(!l.search||!l.search.includes("#"),ki("#","search","hash",l)));let o=e===""||l.pathname==="",i=o?"/":l.pathname,a;if(r||i==null)a=n;else{let m=t.length-1;if(i.startsWith("..")){let v=i.split("/");for(;v[0]==="..";)v.shift(),m-=1;l.pathname=v.join("/")}a=m>=0?t[m]:"/"}let u=tv(l,a),s=i&&i!=="/"&&i.endsWith("/"),f=(o||i===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(s||f)&&(u.pathname+="/"),u}const Rt=e=>e.join("/").replace(/\/\/+/g,"/"),rv=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),lv=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,ov=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class _u{constructor(t,n,r,l){l===void 0&&(l=!1),this.status=t,this.statusText=n||"",this.internal=l,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function Ff(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Of=["post","put","patch","delete"],iv=new Set(Of),av=["get",...Of],uv=new Set(av),sv=new Set([301,302,303,307,308]),cv=new Set([307,308]),_i={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},dv={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Rr={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Uf=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,fv=e=>({hasErrorBoundary:!!e.hasErrorBoundary});function pv(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;H(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let l;if(e.mapRouteProperties)l=e.mapRouteProperties;else if(e.detectErrorBoundary){let w=e.detectErrorBoundary;l=S=>({hasErrorBoundary:w(S)})}else l=fv;let o={},i=Ea(e.routes,l,void 0,o),a,u=e.basename||"/",s=te({v7_normalizeFormMethod:!1,v7_prependBasename:!1},e.future),f=null,m=new Set,v=null,x=null,y=null,g=e.hydrationData!=null,R=Kn(i,e.history.location,u),p=null;if(R==null){let w=Ke(404,{pathname:e.history.location.pathname}),{matches:S,route:_}=oc(i);R=S,p={[_.id]:w}}let c=!R.some(w=>w.route.lazy)&&(!R.some(w=>w.route.loader)||e.hydrationData!=null),h,d={historyAction:e.history.action,location:e.history.location,matches:R,initialized:c,navigation:_i,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||p,fetchers:new Map,blockers:new Map},k=de.Pop,L=!1,N,T=!1,W=!1,O=[],ge=[],G=new Map,ut=0,zt=-1,It=new Map,Ae=new Set,st=new Map,j=new Map,F=new Map,B=!1;function re(){return f=e.history.listen(w=>{let{action:S,location:_,delta:M}=w;if(B){B=!1;return}ur(F.size===0||M!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let $=Fu({currentLocation:d.location,nextLocation:_,historyAction:S});if($&&M!=null){B=!0,e.history.go(M*-1),wl($,{state:"blocked",location:_,proceed(){wl($,{state:"proceeding",proceed:void 0,reset:void 0,location:_}),e.history.go(M)},reset(){let U=new Map(d.blockers);U.set($,Rr),J({blockers:U})}});return}return Ft(S,_)}),d.initialized||Ft(de.Pop,d.location),h}function ce(){f&&f(),m.clear(),N&&N.abort(),d.fetchers.forEach((w,S)=>Wo(S)),d.blockers.forEach((w,S)=>Iu(S))}function jn(w){return m.add(w),()=>m.delete(w)}function J(w){d=te({},d,w),m.forEach(S=>S(d))}function gt(w,S){var _,M;let $=d.actionData!=null&&d.navigation.formMethod!=null&&rt(d.navigation.formMethod)&&d.navigation.state==="loading"&&((_=w.state)==null?void 0:_._isRedirect)!==!0,U;S.actionData?Object.keys(S.actionData).length>0?U=S.actionData:U=null:$?U=d.actionData:U=null;let A=S.loaderData?lc(d.loaderData,S.loaderData,S.matches||[],S.errors):d.loaderData,I=d.blockers;I.size>0&&(I=new Map(I),I.forEach((Z,Ce)=>I.set(Ce,Rr)));let z=L===!0||d.navigation.formMethod!=null&&rt(d.navigation.formMethod)&&((M=w.state)==null?void 0:M._isRedirect)!==!0;a&&(i=a,a=void 0),T||k===de.Pop||(k===de.Push?e.history.push(w,w.state):k===de.Replace&&e.history.replace(w,w.state)),J(te({},S,{actionData:U,loaderData:A,historyAction:k,location:w,initialized:!0,navigation:_i,revalidation:"idle",restoreScrollPosition:Uu(w,S.matches||d.matches),preventScrollReset:z,blockers:I})),k=de.Pop,L=!1,T=!1,W=!1,O=[],ge=[]}async function ct(w,S){if(typeof w=="number"){e.history.go(w);return}let _=ka(d.location,d.matches,u,s.v7_prependBasename,w,S==null?void 0:S.fromRouteId,S==null?void 0:S.relative),{path:M,submission:$,error:U}=qs(s.v7_normalizeFormMethod,!1,_,S),A=d.location,I=sl(d.location,M,S&&S.state);I=te({},I,e.history.encodeLocation(I));let z=S&&S.replace!=null?S.replace:void 0,Z=de.Push;z===!0?Z=de.Replace:z===!1||$!=null&&rt($.formMethod)&&$.formAction===d.location.pathname+d.location.search&&(Z=de.Replace);let Ce=S&&"preventScrollReset"in S?S.preventScrollReset===!0:void 0,Y=Fu({currentLocation:A,nextLocation:I,historyAction:Z});if(Y){wl(Y,{state:"blocked",location:I,proceed(){wl(Y,{state:"proceeding",proceed:void 0,reset:void 0,location:I}),ct(w,S)},reset(){let ue=new Map(d.blockers);ue.set(Y,Rr),J({blockers:ue})}});return}return await Ft(Z,I,{submission:$,pendingError:U,preventScrollReset:Ce,replace:S&&S.replace})}function Dn(){if(Vo(),J({revalidation:"loading"}),d.navigation.state!=="submitting"){if(d.navigation.state==="idle"){Ft(d.historyAction,d.location,{startUninterruptedRevalidation:!0});return}Ft(k||d.historyAction,d.navigation.location,{overrideNavigation:d.navigation})}}async function Ft(w,S,_){N&&N.abort(),N=null,k=w,T=(_&&_.startUninterruptedRevalidation)===!0,rp(d.location,d.matches),L=(_&&_.preventScrollReset)===!0;let M=a||i,$=_&&_.overrideNavigation,U=Kn(M,S,u);if(!U){let ue=Ke(404,{pathname:S.pathname}),{matches:ye,route:dn}=oc(M);Qo(),gt(S,{matches:ye,loaderData:{},errors:{[dn.id]:ue}});return}if(d.initialized&&!W&&yv(d.location,S)&&!(_&&_.submission&&rt(_.submission.formMethod))){gt(S,{matches:U});return}N=new AbortController;let A=Lr(e.history,S,N.signal,_&&_.submission),I,z;if(_&&_.pendingError)z={[Yn(U).route.id]:_.pendingError};else if(_&&_.submission&&rt(_.submission.formMethod)){let ue=await Jf(A,S,_.submission,U,{replace:_.replace});if(ue.shortCircuited)return;I=ue.pendingActionData,z=ue.pendingActionError,$=Ul(S,_.submission),A=new Request(A.url,{signal:A.signal})}let{shortCircuited:Z,loaderData:Ce,errors:Y}=await Zf(A,S,U,$,_&&_.submission,_&&_.fetcherSubmission,_&&_.replace,I,z);Z||(N=null,gt(S,te({matches:U},I?{actionData:I}:{},{loaderData:Ce,errors:Y})))}async function Jf(w,S,_,M,$){$===void 0&&($={}),Vo();let U=kv(S,_);J({navigation:U});let A,I=Ca(M,S);if(!I.route.action&&!I.route.lazy)A={type:he.error,error:Ke(405,{method:w.method,pathname:S.pathname,routeId:I.route.id})};else if(A=await Nr("action",w,I,M,o,l,u),w.signal.aborted)return{shortCircuited:!0};if(er(A)){let z;return $&&$.replace!=null?z=$.replace:z=A.location===d.location.pathname+d.location.search,await mr(d,A,{submission:_,replace:z}),{shortCircuited:!0}}if(Qr(A)){let z=Yn(M,I.route.id);return($&&$.replace)!==!0&&(k=de.Push),{pendingActionData:{},pendingActionError:{[z.route.id]:A.error}}}if(yn(A))throw Ke(400,{type:"defer-action"});return{pendingActionData:{[I.route.id]:A.data}}}async function Zf(w,S,_,M,$,U,A,I,z){let Z=M||Ul(S,$),Ce=$||U||uc(Z),Y=a||i,[ue,ye]=bs(e.history,d,_,Ce,S,W,O,ge,st,Ae,Y,u,I,z);if(Qo(X=>!(_&&_.some(be=>be.route.id===X))||ue&&ue.some(be=>be.route.id===X)),zt=++ut,ue.length===0&&ye.length===0){let X=Mu();return gt(S,te({matches:_,loaderData:{},errors:z||null},I?{actionData:I}:{},X?{fetchers:new Map(d.fetchers)}:{})),{shortCircuited:!0}}if(!T){ye.forEach(be=>{let Ut=d.fetchers.get(be.key),Jo=jr(void 0,Ut?Ut.data:void 0);d.fetchers.set(be.key,Jo)});let X=I||d.actionData;J(te({navigation:Z},X?Object.keys(X).length===0?{actionData:null}:{actionData:X}:{},ye.length>0?{fetchers:new Map(d.fetchers)}:{}))}ye.forEach(X=>{G.has(X.key)&&Ot(X.key),X.controller&&G.set(X.key,X.controller)});let dn=()=>ye.forEach(X=>Ot(X.key));N&&N.signal.addEventListener("abort",dn);let{results:fn,loaderResults:vr,fetcherResults:Ko}=await Du(d.matches,_,ue,ye,w);if(w.signal.aborted)return{shortCircuited:!0};N&&N.signal.removeEventListener("abort",dn),ye.forEach(X=>G.delete(X.key));let yt=ic(fn);if(yt){if(yt.idx>=ue.length){let X=ye[yt.idx-ue.length].key;Ae.add(X)}return await mr(d,yt.result,{replace:A}),{shortCircuited:!0}}let{loaderData:wt,errors:xl}=rc(d,_,ue,vr,z,ye,Ko,j);j.forEach((X,be)=>{X.subscribe(Ut=>{(Ut||X.done)&&j.delete(be)})});let Yo=Mu(),Xo=zu(zt),Go=Yo||Xo||ye.length>0;return te({loaderData:wt,errors:xl},Go?{fetchers:new Map(d.fetchers)}:{})}function ju(w){return d.fetchers.get(w)||dv}function qf(w,S,_,M){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");G.has(w)&&Ot(w);let $=a||i,U=ka(d.location,d.matches,u,s.v7_prependBasename,_,S,M==null?void 0:M.relative),A=Kn($,U,u);if(!A){yl(w,S,Ke(404,{pathname:U}));return}let{path:I,submission:z,error:Z}=qs(s.v7_normalizeFormMethod,!0,U,M);if(Z){yl(w,S,Z);return}let Ce=Ca(A,I);if(L=(M&&M.preventScrollReset)===!0,z&&rt(z.formMethod)){bf(w,S,I,Ce,A,z);return}st.set(w,{routeId:S,path:I}),ep(w,S,I,Ce,A,z)}async function bf(w,S,_,M,$,U){if(Vo(),st.delete(w),!M.route.action&&!M.route.lazy){let pe=Ke(405,{method:U.formMethod,pathname:_,routeId:S});yl(w,S,pe);return}let A=d.fetchers.get(w),I=_v(U,A);d.fetchers.set(w,I),J({fetchers:new Map(d.fetchers)});let z=new AbortController,Z=Lr(e.history,_,z.signal,U);G.set(w,z);let Ce=ut,Y=await Nr("action",Z,M,$,o,l,u);if(Z.signal.aborted){G.get(w)===z&&G.delete(w);return}if(er(Y))if(G.delete(w),zt>Ce){let pe=Mn(void 0);d.fetchers.set(w,pe),J({fetchers:new Map(d.fetchers)});return}else{Ae.add(w);let pe=jr(U);return d.fetchers.set(w,pe),J({fetchers:new Map(d.fetchers)}),mr(d,Y,{submission:U,isFetchActionRedirect:!0})}if(Qr(Y)){yl(w,S,Y.error);return}if(yn(Y))throw Ke(400,{type:"defer-action"});let ue=d.navigation.location||d.location,ye=Lr(e.history,ue,z.signal),dn=a||i,fn=d.navigation.state!=="idle"?Kn(dn,d.navigation.location,u):d.matches;H(fn,"Didn't find any matches after fetcher action");let vr=++ut;It.set(w,vr);let Ko=jr(U,Y.data);d.fetchers.set(w,Ko);let[yt,wt]=bs(e.history,d,fn,U,ue,W,O,ge,st,Ae,dn,u,{[M.route.id]:Y.data},void 0);wt.filter(pe=>pe.key!==w).forEach(pe=>{let gr=pe.key,Au=d.fetchers.get(gr),op=jr(void 0,Au?Au.data:void 0);d.fetchers.set(gr,op),G.has(gr)&&Ot(gr),pe.controller&&G.set(gr,pe.controller)}),J({fetchers:new Map(d.fetchers)});let xl=()=>wt.forEach(pe=>Ot(pe.key));z.signal.addEventListener("abort",xl);let{results:Yo,loaderResults:Xo,fetcherResults:Go}=await Du(d.matches,fn,yt,wt,ye);if(z.signal.aborted)return;z.signal.removeEventListener("abort",xl),It.delete(w),G.delete(w),wt.forEach(pe=>G.delete(pe.key));let X=ic(Yo);if(X){if(X.idx>=yt.length){let pe=wt[X.idx-yt.length].key;Ae.add(pe)}return mr(d,X.result)}let{loaderData:be,errors:Ut}=rc(d,d.matches,yt,Xo,void 0,wt,Go,j);if(d.fetchers.has(w)){let pe=Mn(Y.data);d.fetchers.set(w,pe)}let Jo=zu(vr);d.navigation.state==="loading"&&vr>zt?(H(k,"Expected pending action"),N&&N.abort(),gt(d.navigation.location,{matches:fn,loaderData:be,errors:Ut,fetchers:new Map(d.fetchers)})):(J(te({errors:Ut,loaderData:lc(d.loaderData,be,fn,Ut)},Jo||wt.length>0?{fetchers:new Map(d.fetchers)}:{})),W=!1)}async function ep(w,S,_,M,$,U){let A=d.fetchers.get(w),I=jr(U,A?A.data:void 0);d.fetchers.set(w,I),J({fetchers:new Map(d.fetchers)});let z=new AbortController,Z=Lr(e.history,_,z.signal);G.set(w,z);let Ce=ut,Y=await Nr("loader",Z,M,$,o,l,u);if(yn(Y)&&(Y=await Bf(Y,Z.signal,!0)||Y),G.get(w)===z&&G.delete(w),Z.signal.aborted)return;if(er(Y))if(zt>Ce){let ye=Mn(void 0);d.fetchers.set(w,ye),J({fetchers:new Map(d.fetchers)});return}else{Ae.add(w),await mr(d,Y);return}if(Qr(Y)){let ye=Yn(d.matches,S);d.fetchers.delete(w),J({fetchers:new Map(d.fetchers),errors:{[ye.route.id]:Y.error}});return}H(!yn(Y),"Unhandled fetcher deferred data");let ue=Mn(Y.data);d.fetchers.set(w,ue),J({fetchers:new Map(d.fetchers)})}async function mr(w,S,_){let{submission:M,replace:$,isFetchActionRedirect:U}=_===void 0?{}:_;S.revalidate&&(W=!0);let A=sl(w.location,S.location,te({_isRedirect:!0},U?{_isFetchActionRedirect:!0}:{}));if(H(A,"Expected a location on the redirect navigation"),Uf.test(S.location)&&n){let Z=e.history.createURL(S.location),Ce=pr(Z.pathname,u)==null;if(t.location.origin!==Z.origin||Ce){$?t.location.replace(S.location):t.location.assign(S.location);return}}N=null;let I=$===!0?de.Replace:de.Push,z=M||uc(w.navigation);if(cv.has(S.status)&&z&&rt(z.formMethod))await Ft(I,A,{submission:te({},z,{formAction:S.location}),preventScrollReset:L});else if(U)await Ft(I,A,{overrideNavigation:Ul(A),fetcherSubmission:z,preventScrollReset:L});else{let Z=Ul(A,z);await Ft(I,A,{overrideNavigation:Z,preventScrollReset:L})}}async function Du(w,S,_,M,$){let U=await Promise.all([..._.map(z=>Nr("loader",$,z,S,o,l,u)),...M.map(z=>z.matches&&z.match&&z.controller?Nr("loader",Lr(e.history,z.path,z.controller.signal),z.match,z.matches,o,l,u):{type:he.error,error:Ke(404,{pathname:z.path})})]),A=U.slice(0,_.length),I=U.slice(_.length);return await Promise.all([ac(w,_,A,A.map(()=>$.signal),!1,d.loaderData),ac(w,M.map(z=>z.match),I,M.map(z=>z.controller?z.controller.signal:null),!0)]),{results:U,loaderResults:A,fetcherResults:I}}function Vo(){W=!0,O.push(...Qo()),st.forEach((w,S)=>{G.has(S)&&(ge.push(S),Ot(S))})}function yl(w,S,_){let M=Yn(d.matches,S);Wo(w),J({errors:{[M.route.id]:_},fetchers:new Map(d.fetchers)})}function Wo(w){let S=d.fetchers.get(w);G.has(w)&&!(S&&S.state==="loading"&&It.has(w))&&Ot(w),st.delete(w),It.delete(w),Ae.delete(w),d.fetchers.delete(w)}function Ot(w){let S=G.get(w);H(S,"Expected fetch controller: "+w),S.abort(),G.delete(w)}function Tu(w){for(let S of w){let _=ju(S),M=Mn(_.data);d.fetchers.set(S,M)}}function Mu(){let w=[],S=!1;for(let _ of Ae){let M=d.fetchers.get(_);H(M,"Expected fetcher: "+_),M.state==="loading"&&(Ae.delete(_),w.push(_),S=!0)}return Tu(w),S}function zu(w){let S=[];for(let[_,M]of It)if(M0}function tp(w,S){let _=d.blockers.get(w)||Rr;return F.get(w)!==S&&F.set(w,S),_}function Iu(w){d.blockers.delete(w),F.delete(w)}function wl(w,S){let _=d.blockers.get(w)||Rr;H(_.state==="unblocked"&&S.state==="blocked"||_.state==="blocked"&&S.state==="blocked"||_.state==="blocked"&&S.state==="proceeding"||_.state==="blocked"&&S.state==="unblocked"||_.state==="proceeding"&&S.state==="unblocked","Invalid blocker state transition: "+_.state+" -> "+S.state);let M=new Map(d.blockers);M.set(w,S),J({blockers:M})}function Fu(w){let{currentLocation:S,nextLocation:_,historyAction:M}=w;if(F.size===0)return;F.size>1&&ur(!1,"A router only supports one blocker at a time");let $=Array.from(F.entries()),[U,A]=$[$.length-1],I=d.blockers.get(U);if(!(I&&I.state==="proceeding")&&A({currentLocation:S,nextLocation:_,historyAction:M}))return U}function Qo(w){let S=[];return j.forEach((_,M)=>{(!w||w(M))&&(_.cancel(),S.push(M),j.delete(M))}),S}function np(w,S,_){if(v=w,y=S,x=_||null,!g&&d.navigation===_i){g=!0;let M=Uu(d.location,d.matches);M!=null&&J({restoreScrollPosition:M})}return()=>{v=null,y=null,x=null}}function Ou(w,S){return x&&x(w,S.map(M=>Ev(M,d.loaderData)))||w.key}function rp(w,S){if(v&&y){let _=Ou(w,S);v[_]=y()}}function Uu(w,S){if(v){let _=Ou(w,S),M=v[_];if(typeof M=="number")return M}return null}function lp(w){o={},a=Ea(w,l,void 0,o)}return h={get basename(){return u},get state(){return d},get routes(){return i},initialize:re,subscribe:jn,enableScrollRestoration:np,navigate:ct,fetch:qf,revalidate:Dn,createHref:w=>e.history.createHref(w),encodeLocation:w=>e.history.encodeLocation(w),getFetcher:ju,deleteFetcher:Wo,dispose:ce,getBlocker:tp,deleteBlocker:Iu,_internalFetchControllers:G,_internalActiveDeferreds:j,_internalSetRoutes:lp},h}function hv(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function ka(e,t,n,r,l,o,i){let a,u;if(o!=null&&i!=="path"){a=[];for(let f of t)if(a.push(f),f.route.id===o){u=f;break}}else a=t,u=t[t.length-1];let s=ku(l||".",$o(a).map(f=>f.pathnameBase),pr(e.pathname,n)||e.pathname,i==="path");return l==null&&(s.search=e.search,s.hash=e.hash),(l==null||l===""||l===".")&&u&&u.route.index&&!Cu(s.search)&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(s.pathname=s.pathname==="/"?n:Rt([n,s.pathname])),Pn(s)}function qs(e,t,n,r){if(!r||!hv(r))return{path:n};if(r.formMethod&&!Sv(r.formMethod))return{path:n,error:Ke(405,{method:r.formMethod})};let l=()=>({path:n,error:Ke(400,{type:"invalid-body"})}),o=r.formMethod||"get",i=e?o.toUpperCase():o.toLowerCase(),a=$f(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!rt(i))return l();let v=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((x,y)=>{let[g,R]=y;return""+x+g+"="+R+` -`},""):String(r.body);return{path:n,submission:{formMethod:i,formAction:a,formEncType:r.formEncType,formData:void 0,json:void 0,text:v}}}else if(r.formEncType==="application/json"){if(!rt(i))return l();try{let v=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:i,formAction:a,formEncType:r.formEncType,formData:void 0,json:v,text:void 0}}}catch{return l()}}}H(typeof FormData=="function","FormData is not available in this environment");let u,s;if(r.formData)u=_a(r.formData),s=r.formData;else if(r.body instanceof FormData)u=_a(r.body),s=r.body;else if(r.body instanceof URLSearchParams)u=r.body,s=nc(u);else if(r.body==null)u=new URLSearchParams,s=new FormData;else try{u=new URLSearchParams(r.body),s=nc(u)}catch{return l()}let f={formMethod:i,formAction:a,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:s,json:void 0,text:void 0};if(rt(f.formMethod))return{path:n,submission:f};let m=Mt(n);return t&&m.search&&Cu(m.search)&&u.append("index",""),m.search="?"+u,{path:Pn(m),submission:f}}function mv(e,t){let n=e;if(t){let r=e.findIndex(l=>l.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function bs(e,t,n,r,l,o,i,a,u,s,f,m,v,x){let y=x?Object.values(x)[0]:v?Object.values(v)[0]:void 0,g=e.createURL(t.location),R=e.createURL(l),p=x?Object.keys(x)[0]:void 0,h=mv(n,p).filter((k,L)=>{if(k.route.lazy)return!0;if(k.route.loader==null)return!1;if(vv(t.loaderData,t.matches[L],k)||i.some(W=>W===k.route.id))return!0;let N=t.matches[L],T=k;return ec(k,te({currentUrl:g,currentParams:N.params,nextUrl:R,nextParams:T.params},r,{actionResult:y,defaultShouldRevalidate:o||g.pathname+g.search===R.pathname+R.search||g.search!==R.search||Af(N,T)}))}),d=[];return u.forEach((k,L)=>{if(!n.some(ge=>ge.route.id===k.routeId))return;let N=Kn(f,k.path,m);if(!N){d.push({key:L,routeId:k.routeId,path:k.path,matches:null,match:null,controller:null});return}let T=t.fetchers.get(L),W=Ca(N,k.path),O=!1;s.has(L)?O=!1:a.includes(L)?O=!0:T&&T.state!=="idle"&&T.data===void 0?O=o:O=ec(W,te({currentUrl:g,currentParams:t.matches[t.matches.length-1].params,nextUrl:R,nextParams:n[n.length-1].params},r,{actionResult:y,defaultShouldRevalidate:o})),O&&d.push({key:L,routeId:k.routeId,path:k.path,matches:N,match:W,controller:new AbortController})}),[h,d]}function vv(e,t,n){let r=!t||n.route.id!==t.route.id,l=e[n.route.id]===void 0;return r||l}function Af(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function ec(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function tc(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let l=n[e.id];H(l,"No route found in manifest");let o={};for(let i in r){let u=l[i]!==void 0&&i!=="hasErrorBoundary";ur(!u,'Route "'+l.id+'" has a static property "'+i+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+i+'" will be ignored.')),!u&&!Am.has(i)&&(o[i]=r[i])}Object.assign(l,o),Object.assign(l,te({},t(l),{lazy:void 0}))}async function Nr(e,t,n,r,l,o,i,a){a===void 0&&(a={});let u,s,f,m=y=>{let g,R=new Promise((p,c)=>g=c);return f=()=>g(),t.signal.addEventListener("abort",f),Promise.race([y({request:t,params:n.params,context:a.requestContext}),R])};try{let y=n.route[e];if(n.route.lazy)if(y)s=(await Promise.all([m(y),tc(n.route,o,l)]))[0];else if(await tc(n.route,o,l),y=n.route[e],y)s=await m(y);else if(e==="action"){let g=new URL(t.url),R=g.pathname+g.search;throw Ke(405,{method:t.method,pathname:R,routeId:n.route.id})}else return{type:he.data,data:void 0};else if(y)s=await m(y);else{let g=new URL(t.url),R=g.pathname+g.search;throw Ke(404,{pathname:R})}H(s!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(y){u=he.error,s=y}finally{f&&t.signal.removeEventListener("abort",f)}if(xv(s)){let y=s.status;if(sv.has(y)){let p=s.headers.get("Location");if(H(p,"Redirects returned/thrown from loaders/actions must have a Location header"),!Uf.test(p))p=ka(new URL(t.url),r.slice(0,r.indexOf(n)+1),i,!0,p);else if(!a.isStaticRequest){let c=new URL(t.url),h=p.startsWith("//")?new URL(c.protocol+p):new URL(p),d=pr(h.pathname,i)!=null;h.origin===c.origin&&d&&(p=h.pathname+h.search+h.hash)}if(a.isStaticRequest)throw s.headers.set("Location",p),s;return{type:he.redirect,status:y,location:p,revalidate:s.headers.get("X-Remix-Revalidate")!==null}}if(a.isRouteRequest)throw{type:u||he.data,response:s};let g,R=s.headers.get("Content-Type");return R&&/\bapplication\/json\b/.test(R)?g=await s.json():g=await s.text(),u===he.error?{type:u,error:new _u(y,s.statusText,g),headers:s.headers}:{type:he.data,data:g,statusCode:s.status,headers:s.headers}}if(u===he.error)return{type:u,error:s};if(wv(s)){var v,x;return{type:he.deferred,deferredData:s,statusCode:(v=s.init)==null?void 0:v.status,headers:((x=s.init)==null?void 0:x.headers)&&new Headers(s.init.headers)}}return{type:he.data,data:s}}function Lr(e,t,n,r){let l=e.createURL($f(t)).toString(),o={signal:n};if(r&&rt(r.formMethod)){let{formMethod:i,formEncType:a}=r;o.method=i.toUpperCase(),a==="application/json"?(o.headers=new Headers({"Content-Type":a}),o.body=JSON.stringify(r.json)):a==="text/plain"?o.body=r.text:a==="application/x-www-form-urlencoded"&&r.formData?o.body=_a(r.formData):o.body=r.formData}return new Request(l,o)}function _a(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function nc(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function gv(e,t,n,r,l){let o={},i=null,a,u=!1,s={};return n.forEach((f,m)=>{let v=t[m].route.id;if(H(!er(f),"Cannot handle redirect results in processLoaderData"),Qr(f)){let x=Yn(e,v),y=f.error;r&&(y=Object.values(r)[0],r=void 0),i=i||{},i[x.route.id]==null&&(i[x.route.id]=y),o[v]=void 0,u||(u=!0,a=Ff(f.error)?f.error.status:500),f.headers&&(s[v]=f.headers)}else yn(f)?(l.set(v,f.deferredData),o[v]=f.deferredData.data):o[v]=f.data,f.statusCode!=null&&f.statusCode!==200&&!u&&(a=f.statusCode),f.headers&&(s[v]=f.headers)}),r&&(i=r,o[Object.keys(r)[0]]=void 0),{loaderData:o,errors:i,statusCode:a||200,loaderHeaders:s}}function rc(e,t,n,r,l,o,i,a){let{loaderData:u,errors:s}=gv(t,n,r,l,a);for(let f=0;fr.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function oc(e){let t=e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Ke(e,t){let{pathname:n,routeId:r,method:l,type:o}=t===void 0?{}:t,i="Unknown Server Error",a="Unknown @remix-run/router error";return e===400?(i="Bad Request",l&&n&&r?a="You made a "+l+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":o==="defer-action"?a="defer() is not supported in actions":o==="invalid-body"&&(a="Unable to encode submission body")):e===403?(i="Forbidden",a='Route "'+r+'" does not match URL "'+n+'"'):e===404?(i="Not Found",a='No route matches URL "'+n+'"'):e===405&&(i="Method Not Allowed",l&&n&&r?a="You made a "+l.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":l&&(a='Invalid request method "'+l.toUpperCase()+'"')),new _u(e||500,i,new Error(a),!0)}function ic(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(er(n))return{result:n,idx:t}}}function $f(e){let t=typeof e=="string"?Mt(e):e;return Pn(te({},t,{hash:""}))}function yv(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function yn(e){return e.type===he.deferred}function Qr(e){return e.type===he.error}function er(e){return(e&&e.type)===he.redirect}function wv(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function xv(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Sv(e){return uv.has(e.toLowerCase())}function rt(e){return iv.has(e.toLowerCase())}async function ac(e,t,n,r,l,o){for(let i=0;im.route.id===u.route.id),f=s!=null&&!Af(s,u)&&(o&&o[u.route.id])!==void 0;if(yn(a)&&(l||f)){let m=r[i];H(m,"Expected an AbortSignal for revalidating fetcher deferred result"),await Bf(a,m,l).then(v=>{v&&(n[i]=v||n[i])})}}}async function Bf(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:he.data,data:e.deferredData.unwrappedData}}catch(l){return{type:he.error,error:l}}return{type:he.data,data:e.deferredData.data}}}function Cu(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Ev(e,t){let{route:n,pathname:r,params:l}=e;return{id:n.id,pathname:r,params:l,data:t[n.id],handle:n.handle}}function Ca(e,t){let n=typeof t=="string"?Mt(t).search:t.search;if(e[e.length-1].route.index&&Cu(n||""))return e[e.length-1];let r=$o(e);return r[r.length-1]}function uc(e){let{formMethod:t,formAction:n,formEncType:r,text:l,formData:o,json:i}=e;if(!(!t||!n||!r)){if(l!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:l};if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:o,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:i,text:void 0}}}function Ul(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function kv(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function jr(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t," _hasFetcherDoneAnything ":!0}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t," _hasFetcherDoneAnything ":!0}}function _v(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0," _hasFetcherDoneAnything ":!0}}function Mn(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e," _hasFetcherDoneAnything ":!0}}/** - * React Router v6.14.2 - * - * 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 - */function Eo(){return Eo=Object.assign?Object.assign.bind():function(e){for(var t=1;tu.pathnameBase)),i=C.useRef(!1);return Vf(()=>{i.current=!0}),C.useCallback(function(u,s){if(s===void 0&&(s={}),!i.current)return;if(typeof u=="number"){n.go(u);return}let f=ku(u,JSON.parse(o),l,s.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Rt([t,f.pathname])),(s.replace?n.replace:n.push)(f,s.state,s)},[t,n,o,l,e])}const Nv=C.createContext(null);function Lv(e){let t=C.useContext(cn).outlet;return t&&C.createElement(Nv.Provider,{value:e},t)}function Ru(e,t){let{relative:n}=t===void 0?{}:t,{matches:r}=C.useContext(cn),{pathname:l}=gl(),o=JSON.stringify($o(r).map(i=>i.pathnameBase));return C.useMemo(()=>ku(e,JSON.parse(o),l,n==="path"),[e,o,l,n])}function jv(e,t,n){vl()||H(!1);let{navigator:r}=C.useContext(Ln),{matches:l}=C.useContext(cn),o=l[l.length-1],i=o?o.params:{};o&&o.pathname;let a=o?o.pathnameBase:"/";o&&o.route;let u=gl(),s;if(t){var f;let g=typeof t=="string"?Mt(t):t;a==="/"||(f=g.pathname)!=null&&f.startsWith(a)||H(!1),s=g}else s=u;let m=s.pathname||"/",v=a==="/"?m:m.slice(a.length)||"/",x=Kn(e,{pathname:v}),y=Iv(x&&x.map(g=>Object.assign({},g,{params:Object.assign({},i,g.params),pathname:Rt([a,r.encodeLocation?r.encodeLocation(g.pathname).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?a:Rt([a,r.encodeLocation?r.encodeLocation(g.pathnameBase).pathname:g.pathnameBase])})),l,n);return t&&y?C.createElement(Ho.Provider,{value:{location:Eo({pathname:"/",search:"",hash:"",state:null,key:"default"},s),navigationType:de.Pop}},y):y}function Dv(){let e=Av(),t=Ff(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,l={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},o=null;return C.createElement(C.Fragment,null,C.createElement("h2",null,"Unexpected Application Error!"),C.createElement("h3",{style:{fontStyle:"italic"}},t),n?C.createElement("pre",{style:l},n):null,o)}const Tv=C.createElement(Dv,null);class Mv extends C.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error?C.createElement(cn.Provider,{value:this.props.routeContext},C.createElement(Hf.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function zv(e){let{routeContext:t,match:n,children:r}=e,l=C.useContext(Bo);return l&&l.static&&l.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=n.route.id),C.createElement(cn.Provider,{value:t},r)}function Iv(e,t,n){var r;if(t===void 0&&(t=[]),n===void 0&&(n=null),e==null){var l;if((l=n)!=null&&l.errors)e=n.matches;else return null}let o=e,i=(r=n)==null?void 0:r.errors;if(i!=null){let a=o.findIndex(u=>u.route.id&&(i==null?void 0:i[u.route.id]));a>=0||H(!1),o=o.slice(0,Math.min(o.length,a+1))}return o.reduceRight((a,u,s)=>{let f=u.route.id?i==null?void 0:i[u.route.id]:null,m=null;n&&(m=u.route.errorElement||Tv);let v=t.concat(o.slice(0,s+1)),x=()=>{let y;return f?y=m:u.route.Component?y=C.createElement(u.route.Component,null):u.route.element?y=u.route.element:y=a,C.createElement(zv,{match:u,routeContext:{outlet:a,matches:v,isDataRoute:n!=null},children:y})};return n&&(u.route.ErrorBoundary||u.route.errorElement||s===0)?C.createElement(Mv,{location:n.location,revalidation:n.revalidation,component:m,error:f,children:x(),routeContext:{outlet:null,matches:v,isDataRoute:!0}}):x()},null)}var Pa;(function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate"})(Pa||(Pa={}));var cl;(function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId"})(cl||(cl={}));function Fv(e){let t=C.useContext(Bo);return t||H(!1),t}function Ov(e){let t=C.useContext(Pu);return t||H(!1),t}function Uv(e){let t=C.useContext(cn);return t||H(!1),t}function Wf(e){let t=Uv(),n=t.matches[t.matches.length-1];return n.route.id||H(!1),n.route.id}function Av(){var e;let t=C.useContext(Hf),n=Ov(cl.UseRouteError),r=Wf(cl.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function $v(){let{router:e}=Fv(Pa.UseNavigateStable),t=Wf(cl.UseNavigateStable),n=C.useRef(!1);return Vf(()=>{n.current=!0}),C.useCallback(function(l,o){o===void 0&&(o={}),n.current&&(typeof l=="number"?e.navigate(l):e.navigate(l,Eo({fromRouteId:t},o)))},[e,t])}const Bv="startTransition",sc=Cp[Bv];function Hv(e){let{fallbackElement:t,router:n,future:r}=e,[l,o]=C.useState(n.state),{v7_startTransition:i}=r||{},a=C.useCallback(m=>{i&&sc?sc(()=>o(m)):o(m)},[o,i]);C.useLayoutEffect(()=>n.subscribe(a),[n,a]);let u=C.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:m=>n.navigate(m),push:(m,v,x)=>n.navigate(m,{state:v,preventScrollReset:x==null?void 0:x.preventScrollReset}),replace:(m,v,x)=>n.navigate(m,{replace:!0,state:v,preventScrollReset:x==null?void 0:x.preventScrollReset})}),[n]),s=n.basename||"/",f=C.useMemo(()=>({router:n,navigator:u,static:!1,basename:s}),[n,u,s]);return C.createElement(C.Fragment,null,C.createElement(Bo.Provider,{value:f},C.createElement(Pu.Provider,{value:l},C.createElement(Qv,{basename:s,location:l.location,navigationType:l.historyAction,navigator:u},l.initialized?C.createElement(Vv,{routes:n.routes,state:l}):t))),null)}function Vv(e){let{routes:t,state:n}=e;return jv(t,void 0,n)}function Wv(e){return Lv(e.context)}function Qv(e){let{basename:t="/",children:n=null,location:r,navigationType:l=de.Pop,navigator:o,static:i=!1}=e;vl()&&H(!1);let a=t.replace(/^\/*/,"/"),u=C.useMemo(()=>({basename:a,navigator:o,static:i}),[a,o,i]);typeof r=="string"&&(r=Mt(r));let{pathname:s="/",search:f="",hash:m="",state:v=null,key:x="default"}=r,y=C.useMemo(()=>{let g=pr(s,a);return g==null?null:{location:{pathname:g,search:f,hash:m,state:v,key:x},navigationType:l}},[a,s,f,m,v,x,l]);return y==null?null:C.createElement(Ln.Provider,{value:u},C.createElement(Ho.Provider,{children:n,value:y}))}var cc;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(cc||(cc={}));new Promise(()=>{});function Kv(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:C.createElement(e.Component),Component:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:C.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** - * React Router DOM v6.14.2 - * - * 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 - */function sr(){return sr=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[l]=e[l]);return n}function Yv(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Xv(e,t){return e.button===0&&(!t||t==="_self")&&!Yv(e)}const Gv=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],Jv=["aria-current","caseSensitive","className","end","style","to","children"];function Zv(e,t){return pv({basename:t==null?void 0:t.basename,future:sr({},t==null?void 0:t.future,{v7_prependBasename:!0}),history:Fm({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||qv(),routes:e,mapRouteProperties:Kv}).initialize()}function qv(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=sr({},t,{errors:bv(t.errors)})),t}function bv(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,l]of t)if(l&&l.__type==="RouteErrorResponse")n[r]=new _u(l.status,l.statusText,l.data,l.internal===!0);else if(l&&l.__type==="Error"){if(l.__subType){let o=window[l.__subType];if(typeof o=="function")try{let i=new o(l.message);i.stack="",n[r]=i}catch{}}if(n[r]==null){let o=new Error(l.message);o.stack="",n[r]=o}}else n[r]=l;return n}const eg=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",tg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ra=C.forwardRef(function(t,n){let{onClick:r,relative:l,reloadDocument:o,replace:i,state:a,target:u,to:s,preventScrollReset:f}=t,m=Qf(t,Gv),{basename:v}=C.useContext(Ln),x,y=!1;if(typeof s=="string"&&tg.test(s)&&(x=s,eg))try{let c=new URL(window.location.href),h=s.startsWith("//")?new URL(c.protocol+s):new URL(s),d=pr(h.pathname,v);h.origin===c.origin&&d!=null?s=d+h.search+h.hash:y=!0}catch{}let g=Cv(s,{relative:l}),R=ng(s,{replace:i,state:a,target:u,preventScrollReset:f,relative:l});function p(c){r&&r(c),c.defaultPrevented||R(c)}return C.createElement("a",sr({},m,{href:x||g,onClick:y||o?r:p,ref:n,target:u}))}),Ci=C.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:l=!1,className:o="",end:i=!1,style:a,to:u,children:s}=t,f=Qf(t,Jv),m=Ru(u,{relative:f.relative}),v=gl(),x=C.useContext(Pu),{navigator:y}=C.useContext(Ln),g=y.encodeLocation?y.encodeLocation(m).pathname:m.pathname,R=v.pathname,p=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;l||(R=R.toLowerCase(),p=p?p.toLowerCase():null,g=g.toLowerCase());let c=R===g||!i&&R.startsWith(g)&&R.charAt(g.length)==="/",h=p!=null&&(p===g||!i&&p.startsWith(g)&&p.charAt(g.length)==="/"),d=c?r:void 0,k;typeof o=="function"?k=o({isActive:c,isPending:h}):k=[o,c?"active":null,h?"pending":null].filter(Boolean).join(" ");let L=typeof a=="function"?a({isActive:c,isPending:h}):a;return C.createElement(Ra,sr({},f,{"aria-current":d,className:k,ref:n,style:L,to:u}),typeof s=="function"?s({isActive:c,isPending:h}):s)});var dc;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(dc||(dc={}));var fc;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(fc||(fc={}));function ng(e,t){let{target:n,replace:r,state:l,preventScrollReset:o,relative:i}=t===void 0?{}:t,a=Pv(),u=gl(),s=Ru(e,{relative:i});return C.useCallback(f=>{if(Xv(f,n)){f.preventDefault();let m=r!==void 0?r:Pn(u)===Pn(s);a(e,{replace:m,state:l,preventScrollReset:o,relative:i})}},[u,a,s,r,l,n,e,o,i])}const Ct="/expenses-react-app/",rg="_card_14j3b_1",pc={card:rg},hr=({className:e,tagName:t,children:n})=>{const r=t||"div";return E.jsx(r,{className:e?`${pc.card} ${e}`:pc.card,children:n})},lg="_expenses_1q8us_1",xe={expenses:lg,"expenses-item":"_expenses-item_1q8us_7","expenses-item-date":"_expenses-item-date_1q8us_15","expenses-item-month":"_expenses-item-month_1q8us_27","expenses-item-year":"_expenses-item-year_1q8us_36","expenses-item-day":"_expenses-item-day_1q8us_45","expenses-item-description":"_expenses-item-description_1q8us_53","expenses-item-title":"_expenses-item-title_1q8us_67","expenses-item-price":"_expenses-item-price_1q8us_81","expenses-item-delete-btn":"_expenses-item-delete-btn_1q8us_95","expenses-filter":"_expenses-filter_1q8us_117","expenses-filter-control":"_expenses-filter-control_1q8us_121","expenses-filter-label":"_expenses-filter-label_1q8us_127","expenses-filter-select":"_expenses-filter-select_1q8us_130","expenses-list":"_expenses-list_1q8us_136","expenses-list-fallback":"_expenses-list-fallback_1q8us_139"},og=({selected:e,onSelectedItem:t})=>{const n=r=>{t(r.target.value)};return E.jsx("div",{className:xe["expenses-filter"],children:E.jsxs("div",{className:xe["expenses-filter-control"],children:[E.jsx("label",{className:xe["expenses-filter-label"],children:"Filter by year"}),E.jsxs("select",{className:xe["expenses-filter-select"],value:e,onChange:n,children:[E.jsx("option",{value:"none",children:"All"}),E.jsx("option",{value:"2023",children:"2023"}),E.jsx("option",{value:"2022",children:"2022"}),E.jsx("option",{value:"2021",children:"2021"}),E.jsx("option",{value:"2020",children:"2020"}),E.jsx("option",{value:"2019",children:"2019"})]})]})})},Nu=()=>{const[e,t]=C.useState(!1),[n,r]=C.useState(null),l=C.useCallback(async(o,i)=>{t(!0),r(null);try{const a=await fetch(o.url,{method:o.method?o.method:"GET",headers:o.headers?o.headers:{},body:o.body?JSON.stringify(o.body):null});if(!a.ok)throw new Error("Request failed!");const u=await a.json();i(u)}catch(a){r(a.message||"Oops... Something went wrong!")}t(!1)},[]);return{isLoading:e,error:n,sendRequest:l}},ig="_btn_awfba_1",hc={btn:ig},on=({id:e,className:t,type:n,disabled:r,onClick:l,children:o})=>E.jsx("button",{id:e,className:t?`${hc.btn} ${t}`:hc.btn,type:n||"button",onClick:l,disabled:r,children:o}),Lu=C.createContext({isActive:!1,displayModal:()=>{},removeModal:()=>{}}),ag=({children:e})=>{const[t,n]=C.useState(!1),o={isActive:t,displayModal:()=>{n(!0)},removeModal:()=>{n(!1)}};return E.jsx(Lu.Provider,{value:o,children:e})},ug="_modal_uzx82_1",xt={modal:ug,"modal-active":"_modal-active_uzx82_16","modal-content":"_modal-content_uzx82_21","modal-title":"_modal-title_uzx82_28","modal-text":"_modal-text_uzx82_34","modal-actions":"_modal-actions_uzx82_37","modal-delete-btn":"_modal-delete-btn_uzx82_42"},sg=({title:e,text:t,onConfirm:n})=>{const r=C.useContext(Lu),l=o=>{(o.target.classList.contains(xt.modal)||o.target.id==="cancel-btn")&&r.removeModal()};return E.jsx("div",{className:r.isActive?`${xt.modal} ${xt["modal-active"]}`:xt.modal,onClick:l,children:E.jsxs(hr,{className:xt["modal-content"],children:[E.jsx("h2",{className:xt["modal-title"],children:e}),E.jsx("p",{className:xt["modal-text"],children:t}),E.jsxs("div",{className:xt["modal-actions"],children:[E.jsx(on,{id:"cancel-btn",type:"button",onClick:l,children:"Close"}),E.jsx(on,{id:"action-btn",className:xt["modal-delete-btn"],type:"button",onClick:n,children:"Delete"})]})]})})},cg=({date:e})=>{const t=e.toLocaleString("en-US",{month:"long"}),n=e.toLocaleString("en-US",{day:"2-digit"}),r=e.getFullYear();return E.jsxs("div",{className:xe["expenses-item-date"],children:[E.jsx("span",{className:xe["expenses-item-month"],children:t}),E.jsx("span",{className:xe["expenses-item-year"],children:r}),E.jsx("span",{className:xe["expenses-item-day"],children:n})]})},dg="/expenses-react-app/assets/trash-dde98241.svg",fg=({id:e,title:t,amount:n,date:r,onDelete:l})=>{const o=()=>{e&&l(e,t)};return E.jsxs(hr,{className:xe["expenses-item"],tagName:"li",children:[E.jsx(cg,{date:r}),E.jsxs("div",{className:xe["expenses-item-description"],children:[E.jsx("h2",{className:xe["expenses-item-title"],children:t}),E.jsxs("span",{className:xe["expenses-item-price"],children:["$",n]})]}),E.jsx(on,{className:xe["expenses-item-delete-btn"],type:"button",onClick:o,children:E.jsx("img",{src:dg,alt:"Delete"})})]})},pg=({items:e,onDeleteItem:t,isLoading:n,error:r})=>{const l=C.useContext(Lu),[o,i]=C.useState({expenseId:"",expenseTitle:""}),{sendRequest:a}=Nu(),u=(g,R)=>{l.displayModal(),i({expenseId:g,expenseTitle:R})},s=`Are you sure you want to delete expense "${o.expenseTitle}"?`,f="Delete expense",m=g=>{l.removeModal(),t(g)},v=async()=>{a({url:`https://react-expenses-30273-default-rtdb.europe-west1.firebasedatabase.app/expenses/${o.expenseId}.json`,method:"DELETE",headers:{"Content-Type":"application/json"}},m.bind(null,o.expenseId))};let x=E.jsx("h2",{className:xe["expenses-list-fallback"],children:"Found no expenses."});e.length>0&&(x=E.jsx("ul",{className:xe["expenses-list"],children:e.map(g=>E.jsx(fg,{id:g.id,title:g.title,amount:g.amount,date:g.date,onDelete:u},g.id))}));let y=x;return n&&(y=E.jsx("h2",{className:xe["expenses-list-fallback"],children:"Loading expenses..."})),r&&(y=E.jsx("h2",{className:xe["expenses-list-fallback"],children:r})),E.jsxs(E.Fragment,{children:[Im.createPortal(E.jsx(sg,{title:f,text:s,onConfirm:v}),document.getElementById("modal-root")),y]})},hg="_chart_4qv25_1",Ir={chart:hg,"chart-bar":"_chart-bar_4qv25_22","chart-bar-inner":"_chart-bar-inner_4qv25_34","chart-bar-fill":"_chart-bar-fill_4qv25_45","chart-bar-label":"_chart-bar-label_4qv25_50"},mg=({total:e,value:t,label:n})=>{let r="0%";return e>0&&(r=Math.round(t/e*100)+"%"),E.jsxs("div",{className:Ir["chart-bar"],children:[E.jsx("div",{className:Ir["chart-bar-inner"],children:E.jsx("div",{className:Ir["chart-bar-fill"],style:{height:r}})}),E.jsx("div",{className:Ir["chart-bar-label"],children:n})]})},vg=({dataPoints:e})=>{const n=e.map(r=>r.value).reduce((r,l)=>r+l,0);return E.jsx(hr,{className:Ir.chart,children:e.map(r=>E.jsx(mg,{value:r.value,total:n,label:r.label},r.label))})},mc=[{label:"Jan",value:0},{label:"Feb",value:0},{label:"Mar",value:0},{label:"Apr",value:0},{label:"May",value:0},{label:"Jun",value:0},{label:"Jul",value:0},{label:"Aug",value:0},{label:"Sep",value:0},{label:"Oct",value:0},{label:"Nov",value:0},{label:"Dec",value:0}],gg=({expenses:e})=>{for(const t of e){const n=t.date.getMonth();mc[n].value+=t.amount}return E.jsx(vg,{dataPoints:mc})},yg=({data:e,onDeleteItem:t,isLoading:n,error:r})=>{const[l,o]=C.useState("none"),i=u=>{o(u)};let a;return l!=="none"?a=e.filter(u=>u.date.getFullYear().toString()===l):a=e,E.jsxs(hr,{className:xe.expenses,children:[E.jsx(og,{selected:l,onSelectedItem:i}),E.jsx(gg,{expenses:a}),E.jsx(pg,{isLoading:n,error:r,items:a,onDeleteItem:t})]})},Na={"new-expense":"_new-expense_1orf3_1","new-expense-controls":"_new-expense-controls_1orf3_8","new-expense-actions":"_new-expense-actions_1orf3_41"},$t={"form-control-label":"_form-control-label_1guvi_1","form-control-input":"_form-control-input_1guvi_13","input-error":"_input-error_1guvi_22"},tn=({label:e,id:t,className:n,type:r,min:l,max:o,step:i,value:a,hasError:u,onChange:s,onBlur:f})=>{let m;return u?m=n?`${$t["form-control-input"]} ${n} ${$t["input-error"]}`:`${$t["form-control-input"]} ${$t["input-error"]}`:m=n?`${$t["form-control-input"]} ${n}`:$t["form-control-input"],E.jsxs("div",{className:$t["form-control"],children:[E.jsx("label",{className:$t["form-control-label"],htmlFor:t,children:e}),E.jsx("input",{id:t,className:m,type:r,min:l,max:o,step:i,value:a,onChange:s,onBlur:f})]})},Kf={value:"",isValid:null},wg=(e,t)=>{switch(t.type){case"USER_INPUT":return{value:t.value,isValid:t.validate(t.value)};case"INPUT_BLUR":return{value:e.value,isValid:t.validate(e.value)};case"CLEAR_INPUT":return Kf;default:return{value:"",isValid:!1}}},nn=e=>{const[t,n]=C.useReducer(wg,Kf),r=i=>{n({type:"USER_INPUT",value:i.target.value,validate:e})},l=()=>{n({type:"INPUT_BLUR",validate:e})},o=()=>{n({type:"CLEAR_INPUT"})};return{value:t.value,isValid:t.isValid,inputChangeHandler:r,inputBlurHandler:l,inputClearHandler:o}},Pi=e=>e.trim().length!==0,xg=({onSaveExpenseData:e,onCancel:t,loading:n})=>{const{value:r,isValid:l,inputChangeHandler:o,inputBlurHandler:i,inputClearHandler:a}=nn(Pi),{value:u,isValid:s,inputChangeHandler:f,inputBlurHandler:m,inputClearHandler:v}=nn(Pi),{value:x,isValid:y,inputChangeHandler:g,inputBlurHandler:R,inputClearHandler:p}=nn(Pi),[c,h]=C.useState(!1);C.useEffect(()=>{const L=setTimeout(()=>{h(l&&s&&y)},250);return()=>{clearTimeout(L)}},[l,s,y]);const d=()=>{a(),v(),p()},k=L=>{if(L.preventDefault(),c){const N={title:r,amount:+u,date:new Date(x)};e(N),d()}else l?s?R():m():i()};return E.jsxs("form",{onSubmit:k,children:[E.jsxs("div",{className:Na["new-expense-controls"],children:[E.jsx(tn,{label:"Title",id:"title",type:"text",value:r,hasError:l!==null&&!l,onChange:o,onBlur:i}),E.jsx(tn,{label:"Amount",id:"amount",type:"number",min:"0.01",step:"0.01",value:u,hasError:s!==null&&!s,onChange:f,onBlur:m}),E.jsx(tn,{label:"Date",id:"date",type:"date",min:"2019-01-01",max:"2023-12-31",value:x,hasError:y!==null&&!y,onChange:g,onBlur:R})]}),E.jsxs("div",{className:Na["new-expense-actions"],children:[E.jsx(on,{type:"button",onClick:t,children:"Close"}),E.jsx(on,{type:"submit",children:n?"Sending...":"Add Expense"})]})]})};class Yf{constructor(t,n,r,l){yr(this,"id");yr(this,"title");yr(this,"amount");yr(this,"date");this.id=t,this.title=n,this.amount=r,this.date=l}}const Sg=({onAddExpense:e})=>{const[t,n]=C.useState(!1),{isLoading:r,sendRequest:l}=Nu(),o=(s,f)=>{const m=f.name,v=new Yf(m,s.title,s.amount,s.date);e(v),n(!1)},i=async s=>{l({url:"https://react-expenses-30273-default-rtdb.europe-west1.firebasedatabase.app/expenses.json",method:"POST",headers:{"Content-Type":"application/json"},body:{title:s.title,amount:s.amount,date:s.date.toISOString().split("T")[0]}},o.bind(null,s))},a=()=>{n(!0)},u=()=>{n(!1)};return E.jsx(hr,{className:Na["new-expense"],children:t?E.jsx(xg,{loading:r,onSaveExpenseData:i,onCancel:u}):E.jsx(on,{type:"button",onClick:a,children:"Add New Expense"})})},Eg=()=>{const[e,t]=C.useState([]),{isLoading:n,error:r,sendRequest:l}=Nu();C.useEffect(()=>{l({url:"https://react-expenses-30273-default-rtdb.europe-west1.firebasedatabase.app/expenses.json"},u=>{const s=[];for(const f in u)s.push(new Yf(f,u[f].title,u[f].amount,new Date(u[f].date)));t(s)})},[l]);const o=a=>{t(u=>[a,...u])},i=a=>{t(u=>u.filter(s=>s.id!==a))};return E.jsxs(E.Fragment,{children:[E.jsx(Sg,{onAddExpense:o}),E.jsx(yg,{isLoading:n,error:r,data:e,onDeleteItem:i})]})},kg="_auth_1ndzc_1",ko={auth:kg,"auth-form":"_auth-form_1ndzc_7","auth-form-btn":"_auth-form-btn_1ndzc_12"},Xf=({children:e,formType:t,onSubmit:n})=>{let r;return t==="login"?r=E.jsxs("p",{children:["Don't have an account yet?"," ",E.jsx(Ra,{to:`${Ct}register`,children:"Sign Up"})]}):r=E.jsxs("p",{children:["Already have an account? ",E.jsx(Ra,{to:`${Ct}login`,children:"Sign In"})]}),E.jsxs(hr,{className:ko.auth,children:[E.jsx("form",{className:ko["auth-form"],onSubmit:n,children:e}),r]})},Ri=e=>e.trim().length!==0,_g=()=>{const{value:e,isValid:t,inputChangeHandler:n,inputBlurHandler:r,inputClearHandler:l}=nn(Ri),{value:o,isValid:i,inputChangeHandler:a,inputBlurHandler:u,inputClearHandler:s}=nn(Ri),{value:f,isValid:m,inputChangeHandler:v,inputBlurHandler:x,inputClearHandler:y}=nn(Ri),[g,R]=C.useState(!1);C.useEffect(()=>{const h=setTimeout(()=>{R(t&&i&&m)},250);return()=>{clearTimeout(h)}},[t,i,m]);const p=()=>{l(),s(),y()},c=h=>{h.preventDefault(),g?(console.log({email:e,username:o,password:f}),p()):t?i?x():u():r()};return E.jsxs(Xf,{formType:"register",onSubmit:c,children:[E.jsx(tn,{label:"Email",id:"email",type:"email",value:e,hasError:t!==null&&!t,onChange:n,onBlur:r}),E.jsx(tn,{label:"Username",id:"username",type:"text",value:o,hasError:i!==null&&!i,onChange:a,onBlur:u}),E.jsx(tn,{label:"Password",id:"password",type:"password",value:f,hasError:m!==null&&!m,onChange:v,onBlur:x}),E.jsx(on,{className:ko["auth-form-btn"],type:"submit",children:"Sign Up"})]})},Cg=()=>E.jsx(_g,{}),vc=e=>e.trim().length!==0,Pg=()=>{const{value:e,isValid:t,inputChangeHandler:n,inputBlurHandler:r,inputClearHandler:l}=nn(vc),{value:o,isValid:i,inputChangeHandler:a,inputBlurHandler:u,inputClearHandler:s}=nn(vc),[f,m]=C.useState(!1);C.useEffect(()=>{const y=setTimeout(()=>{m(t&&i)},250);return()=>{clearTimeout(y)}},[t,i]);const v=()=>{l(),s()},x=y=>{y.preventDefault(),f?(console.log({username:e,password:o}),v()):t?u():r()};return E.jsxs(Xf,{formType:"login",onSubmit:x,children:[E.jsx(tn,{label:"Username",id:"username",type:"text",value:e,hasError:t!==null&&!t,onChange:n,onBlur:r}),E.jsx(tn,{label:"Password",id:"password",type:"password",value:o,hasError:i!==null&&!i,onChange:a,onBlur:u}),E.jsx(on,{className:ko["auth-form-btn"],type:"submit",children:"Sign In"})]})},Rg=()=>E.jsx(Pg,{}),Ng="_container_1wy3b_1",Lg={container:Ng},Gf=({children:e})=>E.jsx("div",{className:Lg.container,children:e}),jg="_menu_1czut_1",ft={menu:jg,"menu-link":"_menu-link_1czut_6","link-active":"_link-active_1czut_12"},Dg=()=>E.jsxs("ul",{className:ft.menu,children:[E.jsx("li",{children:E.jsx(Ci,{to:Ct,className:({isActive:e})=>e?`${ft["menu-link"]} ${ft["link-active"]}`:ft["menu-link"],end:!0,children:"Home"})}),E.jsx("li",{children:E.jsx(Ci,{to:`${Ct}login`,className:({isActive:e})=>e?`${ft["menu-link"]} ${ft["link-active"]}`:ft["menu-link"],children:"Log In"})}),E.jsx("li",{children:E.jsx(Ci,{to:`${Ct}register`,className:({isActive:e})=>e?`${ft["menu-link"]} ${ft["link-active"]}`:ft["menu-link"],children:"Sign Up"})})]}),Tg="_header_l212f_1",gc={header:Tg,"header-body":"_header-body_l212f_5"},Mg="/expenses-react-app/assets/logo-77c4e67e.png",zg="_brand_1cqmy_1",Ni={brand:zg,"brand-logo":"_brand-logo_1cqmy_6","brand-name":"_brand-name_1cqmy_10"},Ig=()=>E.jsxs("div",{className:Ni.brand,children:[E.jsx("img",{className:Ni["brand-logo"],src:Mg,alt:"Expenses React App Logo"}),E.jsx("span",{className:Ni["brand-name"],children:"Expense Tracker"})]}),Fg=()=>E.jsx("header",{className:gc.header,children:E.jsx(Gf,{children:E.jsxs("div",{className:gc["header-body"],children:[E.jsx(Ig,{}),E.jsx("nav",{children:E.jsx(Dg,{})})]})})}),Og=()=>E.jsxs(E.Fragment,{children:[E.jsx(Fg,{}),E.jsx("main",{style:{padding:"3rem 0"},children:E.jsx(Gf,{children:E.jsx(Wv,{})})})]}),Ug=Zv([{path:Ct,element:E.jsx(Og,{}),children:[{path:Ct,element:E.jsx(Eg,{})},{path:`${Ct}register`,element:E.jsx(Cg,{})},{path:`${Ct}login`,element:E.jsx(Rg,{})}]}]),Ag=()=>E.jsx(Hv,{router:Ug}),$g=Li.createRoot(document.getElementById("page-root"));$g.render(E.jsx(ag,{children:E.jsx(Ag,{})})); diff --git a/assets/logo-77c4e67e.png b/assets/logo-HTwwoxjU.png similarity index 100% rename from assets/logo-77c4e67e.png rename to assets/logo-HTwwoxjU.png diff --git a/assets/trash-dde98241.svg b/assets/trash-dde98241.svg deleted file mode 100644 index ba134e5..0000000 --- a/assets/trash-dde98241.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/index.html b/index.html index 725c30e..3489908 100644 --- a/index.html +++ b/index.html @@ -12,12 +12,11 @@ rel="stylesheet" /> Expenses React App - - + +
-