From 9dbfde4e749a34d2740c3442f4074b7d488fab45 Mon Sep 17 00:00:00 2001 From: lyudmil-mitev Date: Tue, 8 Oct 2024 14:52:40 +0000 Subject: [PATCH] deploy: df1a4cc690c6d94891275abf6026ae396d1c6a7a --- .../{index-6Qti-Pxj.js => index-omDW7rGW.js} | 20 +++++++++---------- index.html | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) rename assets/{index-6Qti-Pxj.js => index-omDW7rGW.js} (91%) diff --git a/assets/index-6Qti-Pxj.js b/assets/index-omDW7rGW.js similarity index 91% rename from assets/index-6Qti-Pxj.js rename to assets/index-omDW7rGW.js index 1273770..2210ce8 100644 --- a/assets/index-6Qti-Pxj.js +++ b/assets/index-omDW7rGW.js @@ -6,7 +6,7 @@ function kc(e,t){for(var n=0;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Di=Object.prototype.hasOwnProperty,Zp=/^[: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 qp(e){return Di.call(Ju,e)?!0:Di.call(Gu,e)?!1:Zp.test(e)?Ju[e]=!0:(Gu[e]=!0,!1)}function bp(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 eh(e,t,n,r){if(t===null||typeof t>"u"||bp(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 Ae(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 Te={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Te[e]=new Ae(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Te[t]=new Ae(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Te[e]=new Ae(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Te[e]=new Ae(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){Te[e]=new Ae(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Te[e]=new Ae(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Te[e]=new Ae(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Te[e]=new Ae(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Te[e]=new Ae(e,5,!1,e.toLowerCase(),null,!1,!1)});var Da=/[\-:]([a-z])/g;function Ma(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(Da,Ma);Te[t]=new Ae(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(Da,Ma);Te[t]=new Ae(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(Da,Ma);Te[t]=new Ae(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Te[e]=new Ae(e,1,!1,e.toLowerCase(),null,!1,!1)});Te.xlinkHref=new Ae("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Te[e]=new Ae(e,1,!1,e.toLowerCase(),null,!0,!0)});function za(e,t,n,r){var l=Te.hasOwnProperty(t)?Te[t]:null;(l!==null?l.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Di=Object.prototype.hasOwnProperty,Zp=/^[: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 qp(e){return Di.call(Ju,e)?!0:Di.call(Gu,e)?!1:Zp.test(e)?Ju[e]=!0:(Gu[e]=!0,!1)}function bp(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 eh(e,t,n,r){if(t===null||typeof t>"u"||bp(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 Ae(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 Te={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Te[e]=new Ae(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Te[t]=new Ae(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Te[e]=new Ae(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Te[e]=new Ae(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){Te[e]=new Ae(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Te[e]=new Ae(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Te[e]=new Ae(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Te[e]=new Ae(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Te[e]=new Ae(e,5,!1,e.toLowerCase(),null,!1,!1)});var Da=/[\-:]([a-z])/g;function Ma(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(Da,Ma);Te[t]=new Ae(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(Da,Ma);Te[t]=new Ae(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(Da,Ma);Te[t]=new Ae(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Te[e]=new Ae(e,1,!1,e.toLowerCase(),null,!1,!1)});Te.xlinkHref=new Ae("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Te[e]=new Ae(e,1,!1,e.toLowerCase(),null,!0,!0)});function za(e,t,n,r){var l=Te.hasOwnProperty(t)?Te[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{li=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Or(e):""}function th(e){switch(e.tag){case 5:return Or(e.type);case 16:return Or("Lazy");case 13:return Or("Suspense");case 19:return Or("SuspenseList");case 0:case 2:case 15:return e=oi(e.type,!1),e;case 11:return e=oi(e.type.render,!1),e;case 1:return e=oi(e.type,!0),e;default:return""}}function Oi(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 Vn:return"Fragment";case Bn:return"Portal";case Mi:return"Profiler";case ja:return"StrictMode";case zi:return"Suspense";case ji:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Bc:return(e.displayName||"Context")+".Consumer";case Ac: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 Fa:return t=e.displayName||null,t!==null?t:Oi(e.type)||"Memo";case Kt:t=e._payload,e=e._init;try{return Oi(e(t))}catch{}}return null}function nh(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 Oi(t);case 8:return t===ja?"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 un(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Hc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function rh(e){var t=Hc(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 zl(e){e._valueTracker||(e._valueTracker=rh(e))}function Wc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Hc(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function uo(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Fi(e,t){var n=t.checked;return de({},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=un(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 Qc(e,t){t=t.checked,t!=null&&za(e,"checked",t,!1)}function Ii(e,t){Qc(e,t);var n=un(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")?Ui(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ui(e,t.type,un(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 Ui(e,t,n){(t!=="number"||uo(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Fr=Array.isArray;function er(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 Jr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ar={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},lh=["Webkit","ms","Moz","O"];Object.keys(Ar).forEach(function(e){lh.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ar[t]=Ar[e]})});function Gc(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ar.hasOwnProperty(e)&&Ar[e]?(""+t).trim():t+"px"}function Jc(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=Gc(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var oh=de({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 Bi(e,t){if(t){if(oh[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(_(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(_(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(_(61))}if(t.style!=null&&typeof t.style!="object")throw Error(_(62))}}function Vi(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 Ia(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Wi=null,tr=null,nr=null;function ns(e){if(e=gl(e)){if(typeof Wi!="function")throw Error(_(280));var t=e.stateNode;t&&(t=Ao(t),Wi(e.stateNode,e.type,t))}}function Zc(e){tr?nr?nr.push(e):nr=[e]:tr=e}function qc(){if(tr){var e=tr,t=nr;if(nr=tr=null,ns(e),t)for(e=0;e>>=0,e===0?32:31-(vh(e)/yh|0)|0}var Ol=64,Fl=4194304;function Ir(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 po(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=Ir(a):(o&=i,o!==0&&(r=Ir(o)))}else i=n&~l,i!==0?r=Ir(i):o!==0&&(r=Ir(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 vl(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-mt(t),e[t]=n}function xh(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),fs=" ",ds=!1;function wf(e,t){switch(e){case"keyup":return Gh.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Sf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Hn=!1;function Zh(e,t){switch(e){case"compositionend":return Sf(t);case"keypress":return t.which!==32?null:(ds=!0,fs);case"textInput":return e=t.data,e===fs&&ds?null:e;default:return null}}function qh(e,t){if(Hn)return e==="compositionend"||!Qa&&wf(e,t)?(e=yf(),ql=Va=Jt=null,Hn=!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 Cf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Cf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Pf(){for(var e=window,t=uo();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=uo(e.document)}return t}function Ka(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 am(e){var t=Pf(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Cf(n.ownerDocument.documentElement,n)){if(r!==null&&Ka(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,Ji=null,Wr=null,Zi=!1;function gs(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Zi||Wn==null||Wn!==uo(r)||(r=Wn,"selectionStart"in r&&Ka(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}),Wr&&nl(Wr,r)||(Wr=r,r=vo(Ji,"onSelect"),0Yn||(e.current=ra[Yn],ra[Yn]=null,Yn--)}function re(e,t){Yn++,ra[Yn]=e.current,e.current=t}var sn={},je=fn(sn),Qe=fn(!1),Rn=sn;function ar(e,t){var n=e.type.contextTypes;if(!n)return sn;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 Ke(e){return e=e.childContextTypes,e!=null}function go(){ae(Qe),ae(je)}function Ps(e,t,n){if(je.current!==sn)throw Error(_(168));re(je,t),re(Qe,n)}function jf(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(_(108,nh(e)||"Unknown",l));return de({},n,r)}function wo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||sn,Rn=je.current,re(je,e),re(Qe,Qe.current),!0}function _s(e,t,n){var r=e.stateNode;if(!r)throw Error(_(169));n?(e=jf(e,t,Rn),r.__reactInternalMemoizedMergedChildContext=e,ae(Qe),ae(je),re(je,e)):ae(Qe),re(Qe,n)}var Tt=null,Bo=!1,wi=!1;function Of(e){Tt===null?Tt=[e]:Tt.push(e)}function wm(e){Bo=!0,Of(e)}function dn(){if(!wi&&Tt!==null){wi=!0;var e=0,t=b;try{var n=Tt;for(b=1;e>=i,l-=i,Dt=1<<32-mt(t)+l|n<y?(B=j,j=null):B=j.sibling;var O=m(h,j,v[y],E);if(O===null){j===null&&(j=B);break}e&&j&&O.alternate===null&&t(h,j),c=o(O,c,y),T===null?R=O:T.sibling=O,T=O,j=B}if(y===v.length)return n(h,j),ue&&gn(h,y),R;if(j===null){for(;yy?(B=j,j=null):B=j.sibling;var Q=m(h,j,O.value,E);if(Q===null){j===null&&(j=B);break}e&&j&&Q.alternate===null&&t(h,j),c=o(Q,c,y),T===null?R=Q:T.sibling=Q,T=Q,j=B}if(O.done)return n(h,j),ue&&gn(h,y),R;if(j===null){for(;!O.done;y++,O=v.next())O=f(h,O.value,E),O!==null&&(c=o(O,c,y),T===null?R=O:T.sibling=O,T=O);return ue&&gn(h,y),R}for(j=r(h,j);!O.done;y++,O=v.next())O=w(j,h,y,O.value,E),O!==null&&(e&&O.alternate!==null&&j.delete(O.key===null?y:O.key),c=o(O,c,y),T===null?R=O:T.sibling=O,T=O);return e&&j.forEach(function(te){return t(h,te)}),ue&&gn(h,y),R}function L(h,c,v,E){if(typeof v=="object"&&v!==null&&v.type===Vn&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Ml:e:{for(var R=v.key,T=c;T!==null;){if(T.key===R){if(R=v.type,R===Vn){if(T.tag===7){n(h,T.sibling),c=l(T,v.props.children),c.return=h,h=c;break e}}else if(T.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===Kt&&Ns(R)===T.type){n(h,T.sibling),c=l(T,v.props),c.ref=Nr(h,T,v),c.return=h,h=c;break e}n(h,T);break}else t(h,T);T=T.sibling}v.type===Vn?(c=_n(v.props.children,h.mode,E,v.key),c.return=h,h=c):(E=io(v.type,v.key,v.props,null,h.mode,E),E.ref=Nr(h,c,v),E.return=h,h=E)}return i(h);case Bn:e:{for(T=v.key;c!==null;){if(c.key===T)if(c.tag===4&&c.stateNode.containerInfo===v.containerInfo&&c.stateNode.implementation===v.implementation){n(h,c.sibling),c=l(c,v.children||[]),c.return=h,h=c;break e}else{n(h,c);break}else t(h,c);c=c.sibling}c=Ri(v,h.mode,E),c.return=h,h=c}return i(h);case Kt:return T=v._init,L(h,c,T(v._payload),E)}if(Fr(v))return k(h,c,v,E);if(Cr(v))return x(h,c,v,E);Hl(h,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,c!==null&&c.tag===6?(n(h,c.sibling),c=l(c,v),c.return=h,h=c):(n(h,c),c=_i(v,h.mode,E),c.return=h,h=c),i(h)):n(h,c)}return L}var sr=$f(!0),Af=$f(!1),Eo=fn(null),ko=null,Jn=null,Ja=null;function Za(){Ja=Jn=ko=null}function qa(e){var t=Eo.current;ae(Eo),e._currentValue=t}function ia(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function lr(e,t){ko=e,Ja=Jn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(We=!0),e.firstContext=null)}function at(e){var t=e._currentValue;if(Ja!==e)if(e={context:e,memoizedValue:t,next:null},Jn===null){if(ko===null)throw Error(_(308));Jn=e,ko.dependencies={lanes:0,firstContext:e}}else Jn=Jn.next=e;return t}var En=null;function ba(e){En===null?En=[e]:En.push(e)}function Bf(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,ba(t)):(n.next=l.next,l.next=n),t.interleaved=n,It(e,r)}function It(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Yt=!1;function eu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Vf(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function zt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function rn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,J&2){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,It(e,n)}return l=r.interleaved,l===null?(t.next=t,ba(r)):(t.next=l.next,l.next=t),r.interleaved=t,It(e,n)}function eo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,$a(e,n)}}function Ts(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?l=o=i:o=o.next=i,n=n.next}while(n!==null);o===null?l=o=t:o=o.next=t}else l=o=t;n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Co(e,t,n,r){var l=e.updateQueue;Yt=!1;var o=l.firstBaseUpdate,i=l.lastBaseUpdate,a=l.shared.pending;if(a!==null){l.shared.pending=null;var u=a,s=u.next;u.next=null,i===null?o=s:i.next=s,i=u;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==i&&(a===null?d.firstBaseUpdate=s:a.next=s,d.lastBaseUpdate=u))}if(o!==null){var f=l.baseState;i=0,d=s=u=null,a=o;do{var m=a.lane,w=a.eventTime;if((r&m)===m){d!==null&&(d=d.next={eventTime:w,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var k=e,x=a;switch(m=t,w=n,x.tag){case 1:if(k=x.payload,typeof k=="function"){f=k.call(w,f,m);break e}f=k;break e;case 3:k.flags=k.flags&-65537|128;case 0:if(k=x.payload,m=typeof k=="function"?k.call(w,f,m):k,m==null)break e;f=de({},f,m);break e;case 2:Yt=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,m=l.effects,m===null?l.effects=[a]:m.push(a))}else w={eventTime:w,lane:m,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(s=d=w,u=f):d=d.next=w,i|=m;if(a=a.next,a===null){if(a=l.shared.pending,a===null)break;m=a,a=m.next,m.next=null,l.lastBaseUpdate=m,l.shared.pending=null}}while(!0);if(d===null&&(u=f),l.baseState=u,l.firstBaseUpdate=s,l.lastBaseUpdate=d,t=l.shared.interleaved,t!==null){l=t;do i|=l.lane,l=l.next;while(l!==t)}else o===null&&(l.shared.lanes=0);Tn|=i,e.lanes=i,e.memoizedState=f}}function Ds(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=xi.transition;xi.transition={};try{e(!1),t()}finally{b=n,xi.transition=r}}function od(){return ut().memoizedState}function km(e,t,n){var r=on(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},id(e))ad(t,n);else if(n=Bf(e,t,n,r),n!==null){var l=Ue();vt(n,e,r,l),ud(n,t,r)}}function Cm(e,t,n){var r=on(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(id(e))ad(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,yt(a,i)){var u=t.interleaved;u===null?(l.next=l,ba(t)):(l.next=u.next,u.next=l),t.interleaved=l;return}}catch{}finally{}n=Bf(e,t,l,r),n!==null&&(l=Ue(),vt(n,e,r,l),ud(n,t,r))}}function id(e){var t=e.alternate;return e===fe||t!==null&&t===fe}function ad(e,t){Qr=_o=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ud(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,$a(e,n)}}var Ro={readContext:at,useCallback:De,useContext:De,useEffect:De,useImperativeHandle:De,useInsertionEffect:De,useLayoutEffect:De,useMemo:De,useReducer:De,useRef:De,useState:De,useDebugValue:De,useDeferredValue:De,useTransition:De,useMutableSource:De,useSyncExternalStore:De,useId:De,unstable_isNewReconciler:!1},Pm={readContext:at,useCallback:function(e,t){return St().memoizedState=[e,t===void 0?null:t],e},useContext:at,useEffect:zs,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,no(4194308,4,ed.bind(null,t,e),n)},useLayoutEffect:function(e,t){return no(4194308,4,e,t)},useInsertionEffect:function(e,t){return no(4,2,e,t)},useMemo:function(e,t){var n=St();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=St();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=km.bind(null,fe,e),[r.memoizedState,e]},useRef:function(e){var t=St();return e={current:e},t.memoizedState=e},useState:Ms,useDebugValue:uu,useDeferredValue:function(e){return St().memoizedState=e},useTransition:function(){var e=Ms(!1),t=e[0];return e=Em.bind(null,e[1]),St().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=fe,l=St();if(ue){if(n===void 0)throw Error(_(407));n=n()}else{if(n=t(),_e===null)throw Error(_(349));Nn&30||Kf(r,t,n)}l.memoizedState=n;var o={value:n,getSnapshot:t};return l.queue=o,zs(Xf.bind(null,r,o,e),[e]),r.flags|=2048,cl(9,Yf.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=St(),t=_e.identifierPrefix;if(ue){var n=Mt,r=Dt;n=(r&~(1<<32-mt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ul++,0")&&(u=u.replace("",e.displayName)),u}while(1<=i&&0<=a);break}}}finally{li=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Or(e):""}function th(e){switch(e.tag){case 5:return Or(e.type);case 16:return Or("Lazy");case 13:return Or("Suspense");case 19:return Or("SuspenseList");case 0:case 2:case 15:return e=oi(e.type,!1),e;case 11:return e=oi(e.type.render,!1),e;case 1:return e=oi(e.type,!0),e;default:return""}}function Oi(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 Hn:return"Fragment";case Vn:return"Portal";case Mi:return"Profiler";case ja:return"StrictMode";case zi:return"Suspense";case ji:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Bc:return(e.displayName||"Context")+".Consumer";case Ac: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 Fa:return t=e.displayName||null,t!==null?t:Oi(e.type)||"Memo";case Kt:t=e._payload,e=e._init;try{return Oi(e(t))}catch{}}return null}function nh(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 Oi(t);case 8:return t===ja?"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 un(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Hc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function rh(e){var t=Hc(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 zl(e){e._valueTracker||(e._valueTracker=rh(e))}function Wc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Hc(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function uo(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Fi(e,t){var n=t.checked;return de({},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=un(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 Qc(e,t){t=t.checked,t!=null&&za(e,"checked",t,!1)}function Ii(e,t){Qc(e,t);var n=un(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")?Ui(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ui(e,t.type,un(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 Ui(e,t,n){(t!=="number"||uo(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Fr=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 Jr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ar={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},lh=["Webkit","ms","Moz","O"];Object.keys(Ar).forEach(function(e){lh.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ar[t]=Ar[e]})});function Gc(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ar.hasOwnProperty(e)&&Ar[e]?(""+t).trim():t+"px"}function Jc(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=Gc(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var oh=de({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 Bi(e,t){if(t){if(oh[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(_(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(_(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(_(61))}if(t.style!=null&&typeof t.style!="object")throw Error(_(62))}}function Vi(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 Ia(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Wi=null,nr=null,rr=null;function ns(e){if(e=gl(e)){if(typeof Wi!="function")throw Error(_(280));var t=e.stateNode;t&&(t=Ao(t),Wi(e.stateNode,e.type,t))}}function Zc(e){nr?rr?rr.push(e):rr=[e]:nr=e}function qc(){if(nr){var e=nr,t=rr;if(rr=nr=null,ns(e),t)for(e=0;e>>=0,e===0?32:31-(vh(e)/yh|0)|0}var Ol=64,Fl=4194304;function Ir(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 po(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=Ir(a):(o&=i,o!==0&&(r=Ir(o)))}else i=n&~l,i!==0?r=Ir(i):o!==0&&(r=Ir(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 vl(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-mt(t),e[t]=n}function xh(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),fs=" ",ds=!1;function wf(e,t){switch(e){case"keyup":return Gh.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Sf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Wn=!1;function Zh(e,t){switch(e){case"compositionend":return Sf(t);case"keypress":return t.which!==32?null:(ds=!0,fs);case"textInput":return e=t.data,e===fs&&ds?null:e;default:return null}}function qh(e,t){if(Wn)return e==="compositionend"||!Qa&&wf(e,t)?(e=yf(),ql=Va=Jt=null,Wn=!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 Cf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Cf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Pf(){for(var e=window,t=uo();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=uo(e.document)}return t}function Ka(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 am(e){var t=Pf(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Cf(n.ownerDocument.documentElement,n)){if(r!==null&&Ka(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,Qn=null,Ji=null,Wr=null,Zi=!1;function gs(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Zi||Qn==null||Qn!==uo(r)||(r=Qn,"selectionStart"in r&&Ka(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}),Wr&&nl(Wr,r)||(Wr=r,r=vo(Ji,"onSelect"),0Xn||(e.current=ra[Xn],ra[Xn]=null,Xn--)}function re(e,t){Xn++,ra[Xn]=e.current,e.current=t}var sn={},je=fn(sn),Qe=fn(!1),Rn=sn;function ur(e,t){var n=e.type.contextTypes;if(!n)return sn;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 Ke(e){return e=e.childContextTypes,e!=null}function go(){ae(Qe),ae(je)}function Ps(e,t,n){if(je.current!==sn)throw Error(_(168));re(je,t),re(Qe,n)}function jf(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(_(108,nh(e)||"Unknown",l));return de({},n,r)}function wo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||sn,Rn=je.current,re(je,e),re(Qe,Qe.current),!0}function _s(e,t,n){var r=e.stateNode;if(!r)throw Error(_(169));n?(e=jf(e,t,Rn),r.__reactInternalMemoizedMergedChildContext=e,ae(Qe),ae(je),re(je,e)):ae(Qe),re(Qe,n)}var Tt=null,Bo=!1,wi=!1;function Of(e){Tt===null?Tt=[e]:Tt.push(e)}function wm(e){Bo=!0,Of(e)}function dn(){if(!wi&&Tt!==null){wi=!0;var e=0,t=b;try{var n=Tt;for(b=1;e>=i,l-=i,Dt=1<<32-mt(t)+l|n<y?(B=j,j=null):B=j.sibling;var O=m(h,j,v[y],E);if(O===null){j===null&&(j=B);break}e&&j&&O.alternate===null&&t(h,j),c=o(O,c,y),T===null?R=O:T.sibling=O,T=O,j=B}if(y===v.length)return n(h,j),ue&&gn(h,y),R;if(j===null){for(;yy?(B=j,j=null):B=j.sibling;var Q=m(h,j,O.value,E);if(Q===null){j===null&&(j=B);break}e&&j&&Q.alternate===null&&t(h,j),c=o(Q,c,y),T===null?R=Q:T.sibling=Q,T=Q,j=B}if(O.done)return n(h,j),ue&&gn(h,y),R;if(j===null){for(;!O.done;y++,O=v.next())O=f(h,O.value,E),O!==null&&(c=o(O,c,y),T===null?R=O:T.sibling=O,T=O);return ue&&gn(h,y),R}for(j=r(h,j);!O.done;y++,O=v.next())O=w(j,h,y,O.value,E),O!==null&&(e&&O.alternate!==null&&j.delete(O.key===null?y:O.key),c=o(O,c,y),T===null?R=O:T.sibling=O,T=O);return e&&j.forEach(function(te){return t(h,te)}),ue&&gn(h,y),R}function L(h,c,v,E){if(typeof v=="object"&&v!==null&&v.type===Hn&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Ml:e:{for(var R=v.key,T=c;T!==null;){if(T.key===R){if(R=v.type,R===Hn){if(T.tag===7){n(h,T.sibling),c=l(T,v.props.children),c.return=h,h=c;break e}}else if(T.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===Kt&&Ns(R)===T.type){n(h,T.sibling),c=l(T,v.props),c.ref=Nr(h,T,v),c.return=h,h=c;break e}n(h,T);break}else t(h,T);T=T.sibling}v.type===Hn?(c=_n(v.props.children,h.mode,E,v.key),c.return=h,h=c):(E=io(v.type,v.key,v.props,null,h.mode,E),E.ref=Nr(h,c,v),E.return=h,h=E)}return i(h);case Vn:e:{for(T=v.key;c!==null;){if(c.key===T)if(c.tag===4&&c.stateNode.containerInfo===v.containerInfo&&c.stateNode.implementation===v.implementation){n(h,c.sibling),c=l(c,v.children||[]),c.return=h,h=c;break e}else{n(h,c);break}else t(h,c);c=c.sibling}c=Ri(v,h.mode,E),c.return=h,h=c}return i(h);case Kt:return T=v._init,L(h,c,T(v._payload),E)}if(Fr(v))return k(h,c,v,E);if(Cr(v))return x(h,c,v,E);Hl(h,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,c!==null&&c.tag===6?(n(h,c.sibling),c=l(c,v),c.return=h,h=c):(n(h,c),c=_i(v,h.mode,E),c.return=h,h=c),i(h)):n(h,c)}return L}var cr=$f(!0),Af=$f(!1),Eo=fn(null),ko=null,Zn=null,Ja=null;function Za(){Ja=Zn=ko=null}function qa(e){var t=Eo.current;ae(Eo),e._currentValue=t}function ia(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function or(e,t){ko=e,Ja=Zn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(We=!0),e.firstContext=null)}function at(e){var t=e._currentValue;if(Ja!==e)if(e={context:e,memoizedValue:t,next:null},Zn===null){if(ko===null)throw Error(_(308));Zn=e,ko.dependencies={lanes:0,firstContext:e}}else Zn=Zn.next=e;return t}var En=null;function ba(e){En===null?En=[e]:En.push(e)}function Bf(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,ba(t)):(n.next=l.next,l.next=n),t.interleaved=n,It(e,r)}function It(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Yt=!1;function eu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Vf(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function zt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function rn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,J&2){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,It(e,n)}return l=r.interleaved,l===null?(t.next=t,ba(r)):(t.next=l.next,l.next=t),r.interleaved=t,It(e,n)}function eo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,$a(e,n)}}function Ts(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?l=o=i:o=o.next=i,n=n.next}while(n!==null);o===null?l=o=t:o=o.next=t}else l=o=t;n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Co(e,t,n,r){var l=e.updateQueue;Yt=!1;var o=l.firstBaseUpdate,i=l.lastBaseUpdate,a=l.shared.pending;if(a!==null){l.shared.pending=null;var u=a,s=u.next;u.next=null,i===null?o=s:i.next=s,i=u;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==i&&(a===null?d.firstBaseUpdate=s:a.next=s,d.lastBaseUpdate=u))}if(o!==null){var f=l.baseState;i=0,d=s=u=null,a=o;do{var m=a.lane,w=a.eventTime;if((r&m)===m){d!==null&&(d=d.next={eventTime:w,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var k=e,x=a;switch(m=t,w=n,x.tag){case 1:if(k=x.payload,typeof k=="function"){f=k.call(w,f,m);break e}f=k;break e;case 3:k.flags=k.flags&-65537|128;case 0:if(k=x.payload,m=typeof k=="function"?k.call(w,f,m):k,m==null)break e;f=de({},f,m);break e;case 2:Yt=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,m=l.effects,m===null?l.effects=[a]:m.push(a))}else w={eventTime:w,lane:m,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(s=d=w,u=f):d=d.next=w,i|=m;if(a=a.next,a===null){if(a=l.shared.pending,a===null)break;m=a,a=m.next,m.next=null,l.lastBaseUpdate=m,l.shared.pending=null}}while(!0);if(d===null&&(u=f),l.baseState=u,l.firstBaseUpdate=s,l.lastBaseUpdate=d,t=l.shared.interleaved,t!==null){l=t;do i|=l.lane,l=l.next;while(l!==t)}else o===null&&(l.shared.lanes=0);Tn|=i,e.lanes=i,e.memoizedState=f}}function Ds(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=xi.transition;xi.transition={};try{e(!1),t()}finally{b=n,xi.transition=r}}function od(){return ut().memoizedState}function km(e,t,n){var r=on(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},id(e))ad(t,n);else if(n=Bf(e,t,n,r),n!==null){var l=Ue();vt(n,e,r,l),ud(n,t,r)}}function Cm(e,t,n){var r=on(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(id(e))ad(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,yt(a,i)){var u=t.interleaved;u===null?(l.next=l,ba(t)):(l.next=u.next,u.next=l),t.interleaved=l;return}}catch{}finally{}n=Bf(e,t,l,r),n!==null&&(l=Ue(),vt(n,e,r,l),ud(n,t,r))}}function id(e){var t=e.alternate;return e===fe||t!==null&&t===fe}function ad(e,t){Qr=_o=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ud(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,$a(e,n)}}var Ro={readContext:at,useCallback:De,useContext:De,useEffect:De,useImperativeHandle:De,useInsertionEffect:De,useLayoutEffect:De,useMemo:De,useReducer:De,useRef:De,useState:De,useDebugValue:De,useDeferredValue:De,useTransition:De,useMutableSource:De,useSyncExternalStore:De,useId:De,unstable_isNewReconciler:!1},Pm={readContext:at,useCallback:function(e,t){return St().memoizedState=[e,t===void 0?null:t],e},useContext:at,useEffect:zs,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,no(4194308,4,ed.bind(null,t,e),n)},useLayoutEffect:function(e,t){return no(4194308,4,e,t)},useInsertionEffect:function(e,t){return no(4,2,e,t)},useMemo:function(e,t){var n=St();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=St();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=km.bind(null,fe,e),[r.memoizedState,e]},useRef:function(e){var t=St();return e={current:e},t.memoizedState=e},useState:Ms,useDebugValue:uu,useDeferredValue:function(e){return St().memoizedState=e},useTransition:function(){var e=Ms(!1),t=e[0];return e=Em.bind(null,e[1]),St().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=fe,l=St();if(ue){if(n===void 0)throw Error(_(407));n=n()}else{if(n=t(),_e===null)throw Error(_(349));Nn&30||Kf(r,t,n)}l.memoizedState=n;var o={value:n,getSnapshot:t};return l.queue=o,zs(Xf.bind(null,r,o,e),[e]),r.flags|=2048,cl(9,Yf.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=St(),t=_e.identifierPrefix;if(ue){var n=Mt,r=Dt;n=(r&~(1<<32-mt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ul++,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[xt]=t,e[ol]=r,gd(e,t,!1,!1),t.stateNode=e;e:{switch(i=Vi(n,r),n){case"dialog":ie("cancel",e),ie("close",e),l=r;break;case"iframe":case"object":case"embed":ie("load",e),l=r;break;case"video":case"audio":for(l=0;ldr&&(t.flags|=128,r=!0,Tr(o,!1),t.lanes=4194304)}else{if(!r)if(e=Po(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Tr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!ue)return Me(t),null}else 2*ye()-o.renderingStartTime>dr&&n!==1073741824&&(t.flags|=128,r=!0,Tr(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=ye(),t.sibling=null,n=ce.current,re(ce,r?n&1|2:n&1),t):(Me(t),null);case 22:case 23:return hu(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ge&1073741824&&(Me(t),t.subtreeFlags&6&&(t.flags|=8192)):Me(t),null;case 24:return null;case 25:return null}throw Error(_(156,t.tag))}function zm(e,t){switch(Xa(t),t.tag){case 1:return Ke(t.type)&&go(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return cr(),ae(Qe),ae(je),ru(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return nu(t),null;case 13:if(ae(ce),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(_(340));ur()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ae(ce),null;case 4:return cr(),null;case 10:return qa(t.type._context),null;case 22:case 23:return hu(),null;case 24:return null;default:return null}}var Ql=!1,ze=!1,jm=typeof WeakSet=="function"?WeakSet:Set,z=null;function Zn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ve(e,t,r)}else n.current=null}function ma(e,t,n){try{n()}catch(r){ve(e,t,r)}}var Ws=!1;function Om(e,t){if(qi=ho,e=Pf(),Ka(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,d=0,f=e,m=null;t:for(;;){for(var w;f!==n||l!==0&&f.nodeType!==3||(a=i+l),f!==o||r!==0&&f.nodeType!==3||(u=i+r),f.nodeType===3&&(i+=f.nodeValue.length),(w=f.firstChild)!==null;)m=f,f=w;for(;;){if(f===e)break t;if(m===n&&++s===l&&(a=i),m===o&&++d===r&&(u=i),(w=f.nextSibling)!==null)break;f=m,m=f.parentNode}f=w}n=a===-1||u===-1?null:{start:a,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(bi={focusedElem:e,selectionRange:n},ho=!1,z=t;z!==null;)if(t=z,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,z=e;else for(;z!==null;){t=z;try{var k=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(k!==null){var x=k.memoizedProps,L=k.memoizedState,h=t.stateNode,c=h.getSnapshotBeforeUpdate(t.elementType===t.type?x:ft(t.type,x),L);h.__reactInternalSnapshotBeforeUpdate=c}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(_(163))}}catch(E){ve(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,z=e;break}z=t.return}return k=Ws,Ws=!1,k}function Kr(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&&ma(t,n,o)}l=l.next}while(l!==r)}}function Wo(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 va(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 xd(e){var t=e.alternate;t!==null&&(e.alternate=null,xd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[xt],delete t[ol],delete t[na],delete t[ym],delete t[gm])),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 Ed(e){return e.tag===5||e.tag===3||e.tag===4}function Qs(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ed(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 ya(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=yo));else if(r!==4&&(e=e.child,e!==null))for(ya(e,t,n),e=e.sibling;e!==null;)ya(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 Le=null,dt=!1;function Wt(e,t,n){for(n=n.child;n!==null;)kd(e,t,n),n=n.sibling}function kd(e,t,n){if(Et&&typeof Et.onCommitFiberUnmount=="function")try{Et.onCommitFiberUnmount(Fo,n)}catch{}switch(n.tag){case 5:ze||Zn(n,t);case 6:var r=Le,l=dt;Le=null,Wt(e,t,n),Le=r,dt=l,Le!==null&&(dt?(e=Le,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Le.removeChild(n.stateNode));break;case 18:Le!==null&&(dt?(e=Le,n=n.stateNode,e.nodeType===8?gi(e.parentNode,n):e.nodeType===1&&gi(e,n),el(e)):gi(Le,n.stateNode));break;case 4:r=Le,l=dt,Le=n.stateNode.containerInfo,dt=!0,Wt(e,t,n),Le=r,dt=l;break;case 0:case 11:case 14:case 15:if(!ze&&(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)&&ma(n,t,i),l=l.next}while(l!==r)}Wt(e,t,n);break;case 1:if(!ze&&(Zn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){ve(n,t,a)}Wt(e,t,n);break;case 21:Wt(e,t,n);break;case 22:n.mode&1?(ze=(r=ze)||n.memoizedState!==null,Wt(e,t,n),ze=r):Wt(e,t,n);break;default:Wt(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=Wm.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function ct(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=i),r&=~o}if(r=l,r=ye()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Im(r/1960))-r,10e?16:e,Zt===null)var r=!1;else{if(e=Zt,Zt=null,To=0,J&6)throw Error(_(331));var l=J;for(J|=4,z=e.current;z!==null;){var o=z,i=o.child;if(z.flags&16){var a=o.deletions;if(a!==null){for(var u=0;uye()-du?Pn(e,0):fu|=n),Ye(e,t)}function Dd(e,t){t===0&&(e.mode&1?(t=Fl,Fl<<=1,!(Fl&130023424)&&(Fl=4194304)):t=1);var n=Ue();e=It(e,t),e!==null&&(vl(e,t,n),Ye(e,n))}function Hm(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Dd(e,n)}function Wm(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(_(314))}r!==null&&r.delete(t),Dd(e,n)}var Md;Md=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Qe.current)We=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return We=!1,Dm(e,t,n);We=!!(e.flags&131072)}else We=!1,ue&&t.flags&1048576&&Ff(t,xo,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ro(e,t),e=t.pendingProps;var l=ar(t,je.current);lr(t,n),l=ou(null,t,r,e,l,n);var o=iu();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,Ke(r)?(o=!0,wo(t)):o=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,eu(t),l.updater=Ho,t.stateNode=l,l._reactInternals=t,ua(t,r,e,n),t=fa(null,t,r,!0,o,n)):(t.tag=0,ue&&o&&Ya(t),Ie(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ro(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=Km(r),e=ft(r,e),l){case 0:t=ca(null,t,r,e,n);break e;case 1:t=Bs(null,t,r,e,n);break e;case 11:t=$s(null,t,r,e,n);break e;case 14:t=As(null,t,r,ft(r.type,e),n);break e}throw Error(_(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ft(r,l),ca(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ft(r,l),Bs(e,t,r,l,n);case 3:e:{if(md(t),e===null)throw Error(_(387));r=t.pendingProps,o=t.memoizedState,l=o.element,Vf(e,t),Co(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(_(423)),t),t=Vs(e,t,r,n,l);break e}else if(r!==l){l=fr(Error(_(424)),t),t=Vs(e,t,r,n,l);break e}else for(Ze=nn(t.stateNode.containerInfo.firstChild),qe=t,ue=!0,ht=null,n=Af(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ur(),r===l){t=Ut(e,t,n);break e}Ie(e,t,r,n)}t=t.child}return t;case 5:return Hf(t),e===null&&oa(t),r=t.type,l=t.pendingProps,o=e!==null?e.memoizedProps:null,i=l.children,ea(r,l)?i=null:o!==null&&ea(r,o)&&(t.flags|=32),hd(e,t),Ie(e,t,i,n),t.child;case 6:return e===null&&oa(t),null;case 13:return vd(e,t,n);case 4:return tu(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=sr(t,null,r,n):Ie(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ft(r,l),$s(e,t,r,l,n);case 7:return Ie(e,t,t.pendingProps,n),t.child;case 8:return Ie(e,t,t.pendingProps.children,n),t.child;case 12:return Ie(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,re(Eo,r._currentValue),r._currentValue=i,o!==null)if(yt(o.value,i)){if(o.children===l.children&&!Qe.current){t=Ut(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=zt(-1,n&-n),u.tag=2;var s=o.updateQueue;if(s!==null){s=s.shared;var d=s.pending;d===null?u.next=u:(u.next=d.next,d.next=u),s.pending=u}}o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),ia(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(_(341));i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),ia(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}Ie(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,lr(t,n),l=at(l),r=r(l),t.flags|=1,Ie(e,t,r,n),t.child;case 14:return r=t.type,l=ft(r,t.pendingProps),l=ft(r.type,l),As(e,t,r,l,n);case 15:return dd(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ft(r,l),ro(e,t),t.tag=1,Ke(r)?(e=!0,wo(t)):e=!1,lr(t,n),sd(t,r,l),ua(t,r,l,n),fa(null,t,r,!0,e,n);case 19:return yd(e,t,n);case 22:return pd(e,t,n)}throw Error(_(156,t.tag))};function zd(e,t){return of(e,t)}function Qm(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 ot(e,t,n,r){return new Qm(e,t,n,r)}function vu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Km(e){if(typeof e=="function")return vu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Oa)return 11;if(e===Fa)return 14}return 2}function an(e,t){var n=e.alternate;return n===null?(n=ot(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 io(e,t,n,r,l,o){var i=2;if(r=e,typeof e=="function")vu(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Vn:return _n(n.children,l,o,t);case ja:i=8,l|=8;break;case Mi:return e=ot(12,n,t,l|2),e.elementType=Mi,e.lanes=o,e;case zi:return e=ot(13,n,t,l),e.elementType=zi,e.lanes=o,e;case ji:return e=ot(19,n,t,l),e.elementType=ji,e.lanes=o,e;case Vc:return Ko(n,l,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ac:i=10;break e;case Bc:i=9;break e;case Oa:i=11;break e;case Fa:i=14;break e;case Kt:i=16,r=null;break e}throw Error(_(130,e==null?e:typeof e,""))}return t=ot(i,n,t,l),t.elementType=e,t.type=r,t.lanes=o,t}function _n(e,t,n,r){return e=ot(7,e,r,t),e.lanes=n,e}function Ko(e,t,n,r){return e=ot(22,e,r,t),e.elementType=Vc,e.lanes=n,e.stateNode={isHidden:!1},e}function _i(e,t,n){return e=ot(6,e,null,t),e.lanes=n,e}function Ri(e,t,n){return t=ot(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Ym(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=ai(0),this.expirationTimes=ai(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ai(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function yu(e,t,n,r,l,o,i,a,u){return e=new Ym(e,t,n,a,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=ot(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},eu(o),e}function Xm(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Id)}catch(e){console.error(e)}}Id(),Fc.exports=et;var xu=Fc.exports;const bm=Cc(xu),ev=kc({__proto__:null,default:bm},[xu]);var Ud,ec=xu;Ud=ec.createRoot,ec.hydrateRoot;/** +`+o.stack}return{value:e,source:t,stack:l,digest:null}}function Ci(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function sa(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Lm=typeof WeakMap=="function"?WeakMap:Map;function cd(e,t,n){n=zt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){No||(No=!0,wa=r),sa(e,t)},n}function fd(e,t,n){n=zt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var l=t.value;n.payload=function(){return r(l)},n.callback=function(){sa(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){sa(e,t),typeof r!="function"&&(ln===null?ln=new Set([this]):ln.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function Fs(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Lm;var l=new Set;r.set(t,l)}else l=r.get(t),l===void 0&&(l=new Set,r.set(t,l));l.has(n)||(l.add(n),e=Vm.bind(null,e,t,n),t.then(e,e))}function Is(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Us(e,t,n,r,l){return e.mode&1?(e.flags|=65536,e.lanes=l,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=zt(-1,1),t.tag=2,rn(n,t,1))),n.lanes|=1),e)}var Nm=$t.ReactCurrentOwner,We=!1;function Ie(e,t,n,r){t.child=e===null?Af(t,null,n,r):cr(t,e.child,n,r)}function $s(e,t,n,r,l){n=n.render;var o=t.ref;return or(t,l),r=ou(e,t,n,r,o,l),n=iu(),e!==null&&!We?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Ut(e,t,l)):(ue&&n&&Ya(t),t.flags|=1,Ie(e,t,r,l),t.child)}function As(e,t,n,r,l){if(e===null){var o=n.type;return typeof o=="function"&&!vu(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,dd(e,t,o,r,l)):(e=io(n.type,null,r,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&l)){var i=o.memoizedProps;if(n=n.compare,n=n!==null?n:nl,n(i,r)&&e.ref===t.ref)return Ut(e,t,l)}return t.flags|=1,e=an(o,r),e.ref=t.ref,e.return=t,t.child=e}function dd(e,t,n,r,l){if(e!==null){var o=e.memoizedProps;if(nl(o,r)&&e.ref===t.ref)if(We=!1,t.pendingProps=r=o,(e.lanes&l)!==0)e.flags&131072&&(We=!0);else return t.lanes=e.lanes,Ut(e,t,l)}return ca(e,t,n,r,l)}function pd(e,t,n){var r=t.pendingProps,l=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},re(bn,Ge),Ge|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,re(bn,Ge),Ge|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,re(bn,Ge),Ge|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,re(bn,Ge),Ge|=r;return Ie(e,t,l,n),t.child}function hd(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function ca(e,t,n,r,l){var o=Ke(n)?Rn:je.current;return o=ur(t,o),or(t,l),n=ou(e,t,n,r,o,l),r=iu(),e!==null&&!We?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Ut(e,t,l)):(ue&&r&&Ya(t),t.flags|=1,Ie(e,t,n,l),t.child)}function Bs(e,t,n,r,l){if(Ke(n)){var o=!0;wo(t)}else o=!1;if(or(t,l),t.stateNode===null)ro(e,t),sd(t,n,r),ua(t,n,r,l),r=!0;else if(e===null){var i=t.stateNode,a=t.memoizedProps;i.props=a;var u=i.context,s=n.contextType;typeof s=="object"&&s!==null?s=at(s):(s=Ke(n)?Rn:je.current,s=ur(t,s));var d=n.getDerivedStateFromProps,f=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function";f||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==r||u!==s)&&Os(t,i,r,s),Yt=!1;var m=t.memoizedState;i.state=m,Co(t,r,i,l),u=t.memoizedState,a!==r||m!==u||Qe.current||Yt?(typeof d=="function"&&(aa(t,n,d,r),u=t.memoizedState),(a=Yt||js(t,n,a,r,m,u,s))?(f||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),i.props=r,i.state=u,i.context=s,r=a):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,Vf(e,t),a=t.memoizedProps,s=t.type===t.elementType?a:ft(t.type,a),i.props=s,f=t.pendingProps,m=i.context,u=n.contextType,typeof u=="object"&&u!==null?u=at(u):(u=Ke(n)?Rn:je.current,u=ur(t,u));var w=n.getDerivedStateFromProps;(d=typeof w=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==f||m!==u)&&Os(t,i,r,u),Yt=!1,m=t.memoizedState,i.state=m,Co(t,r,i,l);var k=t.memoizedState;a!==f||m!==k||Qe.current||Yt?(typeof w=="function"&&(aa(t,n,w,r),k=t.memoizedState),(s=Yt||js(t,n,s,r,m,k,u)||!1)?(d||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,k,u),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,k,u)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=k),i.props=r,i.state=k,i.context=u,r=s):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),r=!1)}return fa(e,t,n,r,o,l)}function fa(e,t,n,r,l,o){hd(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return l&&_s(t,n,!1),Ut(e,t,o);r=t.stateNode,Nm.current=t;var a=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=cr(t,e.child,null,o),t.child=cr(t,null,a,o)):Ie(e,t,a,o),t.memoizedState=r.state,l&&_s(t,n,!0),t.child}function md(e){var t=e.stateNode;t.pendingContext?Ps(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Ps(e,t.context,!1),tu(e,t.containerInfo)}function Vs(e,t,n,r,l){return sr(),Ga(l),t.flags|=256,Ie(e,t,n,r),t.child}var da={dehydrated:null,treeContext:null,retryLane:0};function pa(e){return{baseLanes:e,cachePool:null,transitions:null}}function vd(e,t,n){var r=t.pendingProps,l=ce.current,o=!1,i=(t.flags&128)!==0,a;if((a=i)||(a=e!==null&&e.memoizedState===null?!1:(l&2)!==0),a?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(l|=1),re(ce,l&1),e===null)return oa(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=r.children,e=r.fallback,o?(r=t.mode,o=t.child,i={mode:"hidden",children:i},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=i):o=Ko(i,r,0,null),e=_n(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=pa(n),t.memoizedState=da,e):su(t,i));if(l=e.memoizedState,l!==null&&(a=l.dehydrated,a!==null))return Tm(e,t,i,r,a,l,n);if(o){o=r.fallback,i=t.mode,l=e.child,a=l.sibling;var u={mode:"hidden",children:r.children};return!(i&1)&&t.child!==l?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=an(l,u),r.subtreeFlags=l.subtreeFlags&14680064),a!==null?o=an(a,o):(o=_n(o,i,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,i=e.child.memoizedState,i=i===null?pa(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},o.memoizedState=i,o.childLanes=e.childLanes&~n,t.memoizedState=da,r}return o=e.child,e=o.sibling,r=an(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function su(e,t){return t=Ko({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Wl(e,t,n,r){return r!==null&&Ga(r),cr(t,e.child,null,n),e=su(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Tm(e,t,n,r,l,o,i){if(n)return t.flags&256?(t.flags&=-257,r=Ci(Error(_(422))),Wl(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,l=t.mode,r=Ko({mode:"visible",children:r.children},l,0,null),o=_n(o,l,i,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&cr(t,e.child,null,i),t.child.memoizedState=pa(i),t.memoizedState=da,o);if(!(t.mode&1))return Wl(e,t,i,null);if(l.data==="$!"){if(r=l.nextSibling&&l.nextSibling.dataset,r)var a=r.dgst;return r=a,o=Error(_(419)),r=Ci(o,r,void 0),Wl(e,t,i,r)}if(a=(i&e.childLanes)!==0,We||a){if(r=_e,r!==null){switch(i&-i){case 4:l=2;break;case 16:l=8;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:l=32;break;case 536870912:l=268435456;break;default:l=0}l=l&(r.suspendedLanes|i)?0:l,l!==0&&l!==o.retryLane&&(o.retryLane=l,It(e,l),vt(r,e,l,-1))}return mu(),r=Ci(Error(_(421))),Wl(e,t,i,r)}return l.data==="$?"?(t.flags|=128,t.child=e.child,t=Hm.bind(null,e),l._reactRetry=t,null):(e=o.treeContext,Ze=nn(l.nextSibling),qe=t,ue=!0,ht=null,e!==null&&(rt[lt++]=Dt,rt[lt++]=Mt,rt[lt++]=Ln,Dt=e.id,Mt=e.overflow,Ln=t),t=su(t,r.children),t.flags|=4096,t)}function Hs(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ia(e.return,t,n)}function Pi(e,t,n,r,l){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:l}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=l)}function yd(e,t,n){var r=t.pendingProps,l=r.revealOrder,o=r.tail;if(Ie(e,t,r.children,n),r=ce.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Hs(e,n,t);else if(e.tag===19)Hs(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(re(ce,r),!(t.mode&1))t.memoizedState=null;else switch(l){case"forwards":for(n=t.child,l=null;n!==null;)e=n.alternate,e!==null&&Po(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),Pi(t,!1,l,n,o);break;case"backwards":for(n=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&Po(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}Pi(t,!0,n,null,o);break;case"together":Pi(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ro(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ut(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Tn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(_(153));if(t.child!==null){for(e=t.child,n=an(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=an(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Dm(e,t,n){switch(t.tag){case 3:md(t),sr();break;case 5:Hf(t);break;case 1:Ke(t.type)&&wo(t);break;case 4:tu(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,l=t.memoizedProps.value;re(Eo,r._currentValue),r._currentValue=l;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(re(ce,ce.current&1),t.flags|=128,null):n&t.child.childLanes?vd(e,t,n):(re(ce,ce.current&1),e=Ut(e,t,n),e!==null?e.sibling:null);re(ce,ce.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return yd(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),re(ce,ce.current),r)break;return null;case 22:case 23:return t.lanes=0,pd(e,t,n)}return Ut(e,t,n)}var gd,ha,wd,Sd;gd=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};ha=function(){};wd=function(e,t,n,r){var l=e.memoizedProps;if(l!==r){e=t.stateNode,kn(kt.current);var o=null;switch(n){case"input":l=Fi(e,l),r=Fi(e,r),o=[];break;case"select":l=de({},l,{value:void 0}),r=de({},r,{value:void 0}),o=[];break;case"textarea":l=$i(e,l),r=$i(e,r),o=[];break;default:typeof l.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=yo)}Bi(n,r);var i;n=null;for(s in l)if(!r.hasOwnProperty(s)&&l.hasOwnProperty(s)&&l[s]!=null)if(s==="style"){var a=l[s];for(i in a)a.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else s!=="dangerouslySetInnerHTML"&&s!=="children"&&s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Gr.hasOwnProperty(s)?o||(o=[]):(o=o||[]).push(s,null));for(s in r){var u=r[s];if(a=l!=null?l[s]:void 0,r.hasOwnProperty(s)&&u!==a&&(u!=null||a!=null))if(s==="style")if(a){for(i in a)!a.hasOwnProperty(i)||u&&u.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in u)u.hasOwnProperty(i)&&a[i]!==u[i]&&(n||(n={}),n[i]=u[i])}else n||(o||(o=[]),o.push(s,n)),n=u;else s==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,a=a?a.__html:void 0,u!=null&&a!==u&&(o=o||[]).push(s,u)):s==="children"?typeof u!="string"&&typeof u!="number"||(o=o||[]).push(s,""+u):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&(Gr.hasOwnProperty(s)?(u!=null&&s==="onScroll"&&ie("scroll",e),o||a===u||(o=[])):(o=o||[]).push(s,u))}n&&(o=o||[]).push("style",n);var s=o;(t.updateQueue=s)&&(t.flags|=4)}};Sd=function(e,t,n,r){n!==r&&(t.flags|=4)};function Tr(e,t){if(!ue)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Me(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags&14680064,r|=l.flags&14680064,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags,r|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Mm(e,t,n){var r=t.pendingProps;switch(Xa(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Me(t),null;case 1:return Ke(t.type)&&go(),Me(t),null;case 3:return r=t.stateNode,fr(),ae(Qe),ae(je),ru(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Vl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ht!==null&&(Ea(ht),ht=null))),ha(e,t),Me(t),null;case 5:nu(t);var l=kn(al.current);if(n=t.type,e!==null&&t.stateNode!=null)wd(e,t,n,r,l),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(_(166));return Me(t),null}if(e=kn(kt.current),Vl(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[xt]=t,r[ol]=o,e=(t.mode&1)!==0,n){case"dialog":ie("cancel",r),ie("close",r);break;case"iframe":case"object":case"embed":ie("load",r);break;case"video":case"audio":for(l=0;l<\/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[xt]=t,e[ol]=r,gd(e,t,!1,!1),t.stateNode=e;e:{switch(i=Vi(n,r),n){case"dialog":ie("cancel",e),ie("close",e),l=r;break;case"iframe":case"object":case"embed":ie("load",e),l=r;break;case"video":case"audio":for(l=0;lpr&&(t.flags|=128,r=!0,Tr(o,!1),t.lanes=4194304)}else{if(!r)if(e=Po(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Tr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!ue)return Me(t),null}else 2*ye()-o.renderingStartTime>pr&&n!==1073741824&&(t.flags|=128,r=!0,Tr(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=ye(),t.sibling=null,n=ce.current,re(ce,r?n&1|2:n&1),t):(Me(t),null);case 22:case 23:return hu(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ge&1073741824&&(Me(t),t.subtreeFlags&6&&(t.flags|=8192)):Me(t),null;case 24:return null;case 25:return null}throw Error(_(156,t.tag))}function zm(e,t){switch(Xa(t),t.tag){case 1:return Ke(t.type)&&go(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return fr(),ae(Qe),ae(je),ru(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return nu(t),null;case 13:if(ae(ce),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(_(340));sr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ae(ce),null;case 4:return fr(),null;case 10:return qa(t.type._context),null;case 22:case 23:return hu(),null;case 24:return null;default:return null}}var Ql=!1,ze=!1,jm=typeof WeakSet=="function"?WeakSet:Set,z=null;function qn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ve(e,t,r)}else n.current=null}function ma(e,t,n){try{n()}catch(r){ve(e,t,r)}}var Ws=!1;function Om(e,t){if(qi=ho,e=Pf(),Ka(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,d=0,f=e,m=null;t:for(;;){for(var w;f!==n||l!==0&&f.nodeType!==3||(a=i+l),f!==o||r!==0&&f.nodeType!==3||(u=i+r),f.nodeType===3&&(i+=f.nodeValue.length),(w=f.firstChild)!==null;)m=f,f=w;for(;;){if(f===e)break t;if(m===n&&++s===l&&(a=i),m===o&&++d===r&&(u=i),(w=f.nextSibling)!==null)break;f=m,m=f.parentNode}f=w}n=a===-1||u===-1?null:{start:a,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(bi={focusedElem:e,selectionRange:n},ho=!1,z=t;z!==null;)if(t=z,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,z=e;else for(;z!==null;){t=z;try{var k=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(k!==null){var x=k.memoizedProps,L=k.memoizedState,h=t.stateNode,c=h.getSnapshotBeforeUpdate(t.elementType===t.type?x:ft(t.type,x),L);h.__reactInternalSnapshotBeforeUpdate=c}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(_(163))}}catch(E){ve(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,z=e;break}z=t.return}return k=Ws,Ws=!1,k}function Kr(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&&ma(t,n,o)}l=l.next}while(l!==r)}}function Wo(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 va(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 xd(e){var t=e.alternate;t!==null&&(e.alternate=null,xd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[xt],delete t[ol],delete t[na],delete t[ym],delete t[gm])),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 Ed(e){return e.tag===5||e.tag===3||e.tag===4}function Qs(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ed(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 ya(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=yo));else if(r!==4&&(e=e.child,e!==null))for(ya(e,t,n),e=e.sibling;e!==null;)ya(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 Le=null,dt=!1;function Wt(e,t,n){for(n=n.child;n!==null;)kd(e,t,n),n=n.sibling}function kd(e,t,n){if(Et&&typeof Et.onCommitFiberUnmount=="function")try{Et.onCommitFiberUnmount(Fo,n)}catch{}switch(n.tag){case 5:ze||qn(n,t);case 6:var r=Le,l=dt;Le=null,Wt(e,t,n),Le=r,dt=l,Le!==null&&(dt?(e=Le,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Le.removeChild(n.stateNode));break;case 18:Le!==null&&(dt?(e=Le,n=n.stateNode,e.nodeType===8?gi(e.parentNode,n):e.nodeType===1&&gi(e,n),el(e)):gi(Le,n.stateNode));break;case 4:r=Le,l=dt,Le=n.stateNode.containerInfo,dt=!0,Wt(e,t,n),Le=r,dt=l;break;case 0:case 11:case 14:case 15:if(!ze&&(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)&&ma(n,t,i),l=l.next}while(l!==r)}Wt(e,t,n);break;case 1:if(!ze&&(qn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){ve(n,t,a)}Wt(e,t,n);break;case 21:Wt(e,t,n);break;case 22:n.mode&1?(ze=(r=ze)||n.memoizedState!==null,Wt(e,t,n),ze=r):Wt(e,t,n);break;default:Wt(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=Wm.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function ct(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=i),r&=~o}if(r=l,r=ye()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Im(r/1960))-r,10e?16:e,Zt===null)var r=!1;else{if(e=Zt,Zt=null,To=0,J&6)throw Error(_(331));var l=J;for(J|=4,z=e.current;z!==null;){var o=z,i=o.child;if(z.flags&16){var a=o.deletions;if(a!==null){for(var u=0;uye()-du?Pn(e,0):fu|=n),Ye(e,t)}function Dd(e,t){t===0&&(e.mode&1?(t=Fl,Fl<<=1,!(Fl&130023424)&&(Fl=4194304)):t=1);var n=Ue();e=It(e,t),e!==null&&(vl(e,t,n),Ye(e,n))}function Hm(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Dd(e,n)}function Wm(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(_(314))}r!==null&&r.delete(t),Dd(e,n)}var Md;Md=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Qe.current)We=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return We=!1,Dm(e,t,n);We=!!(e.flags&131072)}else We=!1,ue&&t.flags&1048576&&Ff(t,xo,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ro(e,t),e=t.pendingProps;var l=ur(t,je.current);or(t,n),l=ou(null,t,r,e,l,n);var o=iu();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,Ke(r)?(o=!0,wo(t)):o=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,eu(t),l.updater=Ho,t.stateNode=l,l._reactInternals=t,ua(t,r,e,n),t=fa(null,t,r,!0,o,n)):(t.tag=0,ue&&o&&Ya(t),Ie(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ro(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=Km(r),e=ft(r,e),l){case 0:t=ca(null,t,r,e,n);break e;case 1:t=Bs(null,t,r,e,n);break e;case 11:t=$s(null,t,r,e,n);break e;case 14:t=As(null,t,r,ft(r.type,e),n);break e}throw Error(_(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ft(r,l),ca(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ft(r,l),Bs(e,t,r,l,n);case 3:e:{if(md(t),e===null)throw Error(_(387));r=t.pendingProps,o=t.memoizedState,l=o.element,Vf(e,t),Co(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=dr(Error(_(423)),t),t=Vs(e,t,r,n,l);break e}else if(r!==l){l=dr(Error(_(424)),t),t=Vs(e,t,r,n,l);break e}else for(Ze=nn(t.stateNode.containerInfo.firstChild),qe=t,ue=!0,ht=null,n=Af(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(sr(),r===l){t=Ut(e,t,n);break e}Ie(e,t,r,n)}t=t.child}return t;case 5:return Hf(t),e===null&&oa(t),r=t.type,l=t.pendingProps,o=e!==null?e.memoizedProps:null,i=l.children,ea(r,l)?i=null:o!==null&&ea(r,o)&&(t.flags|=32),hd(e,t),Ie(e,t,i,n),t.child;case 6:return e===null&&oa(t),null;case 13:return vd(e,t,n);case 4:return tu(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=cr(t,null,r,n):Ie(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ft(r,l),$s(e,t,r,l,n);case 7:return Ie(e,t,t.pendingProps,n),t.child;case 8:return Ie(e,t,t.pendingProps.children,n),t.child;case 12:return Ie(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,re(Eo,r._currentValue),r._currentValue=i,o!==null)if(yt(o.value,i)){if(o.children===l.children&&!Qe.current){t=Ut(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=zt(-1,n&-n),u.tag=2;var s=o.updateQueue;if(s!==null){s=s.shared;var d=s.pending;d===null?u.next=u:(u.next=d.next,d.next=u),s.pending=u}}o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),ia(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(_(341));i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),ia(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}Ie(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,or(t,n),l=at(l),r=r(l),t.flags|=1,Ie(e,t,r,n),t.child;case 14:return r=t.type,l=ft(r,t.pendingProps),l=ft(r.type,l),As(e,t,r,l,n);case 15:return dd(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ft(r,l),ro(e,t),t.tag=1,Ke(r)?(e=!0,wo(t)):e=!1,or(t,n),sd(t,r,l),ua(t,r,l,n),fa(null,t,r,!0,e,n);case 19:return yd(e,t,n);case 22:return pd(e,t,n)}throw Error(_(156,t.tag))};function zd(e,t){return of(e,t)}function Qm(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 ot(e,t,n,r){return new Qm(e,t,n,r)}function vu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Km(e){if(typeof e=="function")return vu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Oa)return 11;if(e===Fa)return 14}return 2}function an(e,t){var n=e.alternate;return n===null?(n=ot(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 io(e,t,n,r,l,o){var i=2;if(r=e,typeof e=="function")vu(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Hn:return _n(n.children,l,o,t);case ja:i=8,l|=8;break;case Mi:return e=ot(12,n,t,l|2),e.elementType=Mi,e.lanes=o,e;case zi:return e=ot(13,n,t,l),e.elementType=zi,e.lanes=o,e;case ji:return e=ot(19,n,t,l),e.elementType=ji,e.lanes=o,e;case Vc:return Ko(n,l,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ac:i=10;break e;case Bc:i=9;break e;case Oa:i=11;break e;case Fa:i=14;break e;case Kt:i=16,r=null;break e}throw Error(_(130,e==null?e:typeof e,""))}return t=ot(i,n,t,l),t.elementType=e,t.type=r,t.lanes=o,t}function _n(e,t,n,r){return e=ot(7,e,r,t),e.lanes=n,e}function Ko(e,t,n,r){return e=ot(22,e,r,t),e.elementType=Vc,e.lanes=n,e.stateNode={isHidden:!1},e}function _i(e,t,n){return e=ot(6,e,null,t),e.lanes=n,e}function Ri(e,t,n){return t=ot(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Ym(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=ai(0),this.expirationTimes=ai(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ai(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function yu(e,t,n,r,l,o,i,a,u){return e=new Ym(e,t,n,a,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=ot(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},eu(o),e}function Xm(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Id)}catch(e){console.error(e)}}Id(),Fc.exports=et;var xu=Fc.exports;const bm=Cc(xu),ev=kc({__proto__:null,default:bm},[xu]);var Ud,ec=xu;Ud=ec.createRoot,ec.hydrateRoot;/** * @remix-run/router v1.19.2 * * Copyright (c) Remix Software Inc. @@ -46,9 +46,9 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function se(){return se=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function pr(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function nv(){return Math.random().toString(36).substr(2,8)}function nc(e,t){return{usr:e.state,key:e.key,idx:t}}function dl(e,t,n,r){return n===void 0&&(n=null),se({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?pn(t):t,{state:n,key:t&&t.key||r||nv()})}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 pn(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 rv(e,t,n,r){r===void 0&&(r={});let{window:l=document.defaultView,v5Compat:o=!1}=r,i=l.history,a=Se.Pop,u=null,s=d();s==null&&(s=0,i.replaceState(se({},i.state,{idx:s}),""));function d(){return(i.state||{idx:null}).idx}function f(){a=Se.Pop;let L=d(),h=L==null?null:L-s;s=L,u&&u({action:a,location:x.location,delta:h})}function m(L,h){a=Se.Push;let c=dl(x.location,L,h);s=d()+1;let v=nc(c,s),E=x.createHref(c);try{i.pushState(v,"",E)}catch(R){if(R instanceof DOMException&&R.name==="DataCloneError")throw R;l.location.assign(E)}o&&u&&u({action:a,location:x.location,delta:1})}function w(L,h){a=Se.Replace;let c=dl(x.location,L,h);s=d();let v=nc(c,s),E=x.createHref(c);i.replaceState(v,"",E),o&&u&&u({action:a,location:x.location,delta:0})}function k(L){let h=l.location.origin!=="null"?l.location.origin:l.location.href,c=typeof L=="string"?L:Mn(L);return c=c.replace(/ $/,"%20"),Y(h,"No window.location.(origin|href) available to create URL for href: "+c),new URL(c,h)}let x={get action(){return a},get location(){return e(l,i)},listen(L){if(u)throw new Error("A history only accepts one active listener");return l.addEventListener(tc,f),u=L,()=>{l.removeEventListener(tc,f),u=null}},createHref(L){return t(l,L)},createURL:k,encodeLocation(L){let h=k(L);return{pathname:h.pathname,search:h.search,hash:h.hash}},push:m,replace:w,go(L){return i.go(L)}};return x}var ee;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(ee||(ee={}));const lv=new Set(["lazy","caseSensitive","path","id","index","children"]);function ov(e){return e.index===!0}function pl(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((l,o)=>{let i=[...n,String(o)],a=typeof l.id=="string"?l.id:i.join("-");if(Y(l.index!==!0||!l.children,"Cannot specify children on an index route"),Y(!r[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),ov(l)){let u=se({},l,t(l),{id:a});return r[a]=u,u}else{let u=se({},l,t(l),{id:a,children:void 0});return r[a]=u,l.children&&(u.children=pl(l.children,t,i,r)),u}})}function Sn(e,t,n){return n===void 0&&(n="/"),ao(e,t,n,!1)}function ao(e,t,n,r){let l=typeof t=="string"?pn(t):t,o=gr(l.pathname||"/",n);if(o==null)return null;let i=$d(e);av(i);let a=null;for(let u=0;a==null&&u{let u={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};u.relativePath.startsWith("/")&&(Y(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=jt([r,u.relativePath]),d=n.concat(u);o.children&&o.children.length>0&&(Y(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+s+'".')),$d(o.children,t,d,s)),!(o.path==null&&!o.index)&&t.push({path:s,score:hv(s,o.index),routesMeta:d})};return e.forEach((o,i)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))l(o,i);else for(let u of Ad(o.path))l(o,i,u)}),t}function Ad(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=Ad(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 av(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:mv(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const uv=/^:[\w-]+$/,sv=3,cv=2,fv=1,dv=10,pv=-2,rc=e=>e==="*";function hv(e,t){let n=e.split("/"),r=n.length;return n.some(rc)&&(r+=pv),t&&(r+=cv),n.filter(l=>!rc(l)).reduce((l,o)=>l+(uv.test(o)?sv:o===""?fv:dv),r)}function mv(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 vv(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,l={},o="/",i=[];for(let a=0;a{let{paramName:m,isOptional:w}=d;if(m==="*"){let x=a[f]||"";i=o.slice(0,o.length-x.length).replace(/(.)\/+$/,"$1")}const k=a[f];return w&&!k?s[m]=void 0:s[m]=(k||"").replace(/%2F/g,"/"),s},{}),pathname:o,pathnameBase:i,pattern:e}}function yv(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),pr(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 gv(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return pr(!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 gr(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 wv(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:l=""}=typeof e=="string"?pn(e):e;return{pathname:n?n.startsWith("/")?n:Sv(n,t):t,search:Ev(r),hash:kv(l)}}function Sv(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 Li(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 Bd(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Eu(e,t){let n=Bd(e);return t?n.map((r,l)=>l===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function ku(e,t,n,r){r===void 0&&(r=!1);let l;typeof e=="string"?l=pn(e):(l=se({},e),Y(!l.pathname||!l.pathname.includes("?"),Li("?","pathname","search",l)),Y(!l.pathname||!l.pathname.includes("#"),Li("#","pathname","hash",l)),Y(!l.search||!l.search.includes("#"),Li("#","search","hash",l)));let o=e===""||l.pathname==="",i=o?"/":l.pathname,a;if(i==null)a=n;else{let f=t.length-1;if(!r&&i.startsWith("..")){let m=i.split("/");for(;m[0]==="..";)m.shift(),f-=1;l.pathname=m.join("/")}a=f>=0?t[f]:"/"}let u=wv(l,a),s=i&&i!=="/"&&i.endsWith("/"),d=(o||i===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(s||d)&&(u.pathname+="/"),u}const jt=e=>e.join("/").replace(/\/\/+/g,"/"),xv=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Ev=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,kv=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class zo{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 Zo(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Vd=["post","put","patch","delete"],Cv=new Set(Vd),Pv=["get",...Vd],_v=new Set(Pv),Rv=new Set([301,302,303,307,308]),Lv=new Set([307,308]),Ni={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Nv={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Mr={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Cu=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Tv=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Hd="remix-router-transitions";function Dv(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;Y(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 p=e.detectErrorBoundary;l=g=>({hasErrorBoundary:p(g)})}else l=Tv;let o={},i=pl(e.routes,l,void 0,o),a,u=e.basename||"/",s=e.unstable_dataStrategy||Iv,d=e.unstable_patchRoutesOnNavigation,f=se({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),m=null,w=new Set,k=1e3,x=new Set,L=null,h=null,c=null,v=e.hydrationData!=null,E=Sn(i,e.history.location,u),R=null;if(E==null&&!d){let p=Fe(404,{pathname:e.history.location.pathname}),{matches:g,route:S}=pc(i);E=g,R={[S.id]:p}}E&&!e.hydrationData&&Pl(E,i,e.history.location.pathname).active&&(E=null);let T;if(E)if(E.some(p=>p.route.lazy))T=!1;else if(!E.some(p=>p.route.loader))T=!0;else if(f.v7_partialHydration){let p=e.hydrationData?e.hydrationData.loaderData:null,g=e.hydrationData?e.hydrationData.errors:null,S=C=>C.route.loader?typeof C.route.loader=="function"&&C.route.loader.hydrate===!0?!1:p&&p[C.route.id]!==void 0||g&&g[C.route.id]!==void 0:!0;if(g){let C=E.findIndex(M=>g[M.route.id]!==void 0);T=E.slice(0,C+1).every(S)}else T=E.every(S)}else T=e.hydrationData!=null;else if(T=!1,E=[],f.v7_partialHydration){let p=Pl(null,i,e.history.location.pathname);p.active&&p.matches&&(E=p.matches)}let j,y={historyAction:e.history.action,location:e.history.location,matches:E,initialized:T,navigation:Ni,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||R,fetchers:new Map,blockers:new Map},B=Se.Pop,O=!1,Q,te=!1,ge=new Map,pe=null,gt=!1,st=!1,At=[],D=new Set,I=new Map,W=0,ne=-1,le=new Map,Be=new Set,Ve=new Map,Ct=new Map,Re=new Set,nt=new Map,mn=new Map,up=new Map,xl;function sp(){if(m=e.history.listen(p=>{let{action:g,location:S,delta:C}=p;if(xl){xl(),xl=void 0;return}pr(mn.size===0||C!=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 M=Bu({currentLocation:y.location,nextLocation:S,historyAction:g});if(M&&C!=null){let A=new Promise(H=>{xl=H});e.history.go(C*-1),kl(M,{state:"blocked",location:S,proceed(){kl(M,{state:"proceeding",proceed:void 0,reset:void 0,location:S}),A.then(()=>e.history.go(C))},reset(){let H=new Map(y.blockers);H.set(M,Mr),Oe({blockers:H})}});return}return vn(g,S)}),n){qv(t,ge);let p=()=>bv(t,ge);t.addEventListener("pagehide",p),pe=()=>t.removeEventListener("pagehide",p)}return y.initialized||vn(Se.Pop,y.location,{initialHydration:!0}),j}function cp(){m&&m(),pe&&pe(),w.clear(),Q&&Q.abort(),y.fetchers.forEach((p,g)=>El(g)),y.blockers.forEach((p,g)=>Au(g))}function fp(p){return w.add(p),()=>w.delete(p)}function Oe(p,g){g===void 0&&(g={}),y=se({},y,p);let S=[],C=[];f.v7_fetcherPersist&&y.fetchers.forEach((M,A)=>{M.state==="idle"&&(Re.has(A)?C.push(A):S.push(A))}),[...w].forEach(M=>M(y,{deletedFetchers:C,unstable_viewTransitionOpts:g.viewTransitionOpts,unstable_flushSync:g.flushSync===!0})),f.v7_fetcherPersist&&(S.forEach(M=>y.fetchers.delete(M)),C.forEach(M=>El(M)))}function In(p,g,S){var C,M;let{flushSync:A}=S===void 0?{}:S,H=y.actionData!=null&&y.navigation.formMethod!=null&&pt(y.navigation.formMethod)&&y.navigation.state==="loading"&&((C=p.state)==null?void 0:C._isRedirect)!==!0,N;g.actionData?Object.keys(g.actionData).length>0?N=g.actionData:N=null:H?N=y.actionData:N=null;let V=g.loaderData?fc(y.loaderData,g.loaderData,g.matches||[],g.errors):y.loaderData,U=y.blockers;U.size>0&&(U=new Map(U),U.forEach((q,oe)=>U.set(oe,Mr)));let $=O===!0||y.navigation.formMethod!=null&&pt(y.navigation.formMethod)&&((M=p.state)==null?void 0:M._isRedirect)!==!0;a&&(i=a,a=void 0),gt||B===Se.Pop||(B===Se.Push?e.history.push(p,p.state):B===Se.Replace&&e.history.replace(p,p.state));let Z;if(B===Se.Pop){let q=ge.get(y.location.pathname);q&&q.has(p.pathname)?Z={currentLocation:y.location,nextLocation:p}:ge.has(p.pathname)&&(Z={currentLocation:p,nextLocation:y.location})}else if(te){let q=ge.get(y.location.pathname);q?q.add(p.pathname):(q=new Set([p.pathname]),ge.set(y.location.pathname,q)),Z={currentLocation:y.location,nextLocation:p}}Oe(se({},g,{actionData:N,loaderData:V,historyAction:B,location:p,initialized:!0,navigation:Ni,revalidation:"idle",restoreScrollPosition:Hu(p,g.matches||y.matches),preventScrollReset:$,blockers:U}),{viewTransitionOpts:Z,flushSync:A===!0}),B=Se.Pop,O=!1,te=!1,gt=!1,st=!1,At=[]}async function zu(p,g){if(typeof p=="number"){e.history.go(p);return}let S=ka(y.location,y.matches,u,f.v7_prependBasename,p,f.v7_relativeSplatPath,g==null?void 0:g.fromRouteId,g==null?void 0:g.relative),{path:C,submission:M,error:A}=oc(f.v7_normalizeFormMethod,!1,S,g),H=y.location,N=dl(y.location,C,g&&g.state);N=se({},N,e.history.encodeLocation(N));let V=g&&g.replace!=null?g.replace:void 0,U=Se.Push;V===!0?U=Se.Replace:V===!1||M!=null&&pt(M.formMethod)&&M.formAction===y.location.pathname+y.location.search&&(U=Se.Replace);let $=g&&"preventScrollReset"in g?g.preventScrollReset===!0:void 0,Z=(g&&g.unstable_flushSync)===!0,q=Bu({currentLocation:H,nextLocation:N,historyAction:U});if(q){kl(q,{state:"blocked",location:N,proceed(){kl(q,{state:"proceeding",proceed:void 0,reset:void 0,location:N}),zu(p,g)},reset(){let oe=new Map(y.blockers);oe.set(q,Mr),Oe({blockers:oe})}});return}return await vn(U,N,{submission:M,pendingError:A,preventScrollReset:$,replace:g&&g.replace,enableViewTransition:g&&g.unstable_viewTransition,flushSync:Z})}function dp(){if(bo(),Oe({revalidation:"loading"}),y.navigation.state!=="submitting"){if(y.navigation.state==="idle"){vn(y.historyAction,y.location,{startUninterruptedRevalidation:!0});return}vn(B||y.historyAction,y.navigation.location,{overrideNavigation:y.navigation,enableViewTransition:te===!0})}}async function vn(p,g,S){Q&&Q.abort(),Q=null,B=p,gt=(S&&S.startUninterruptedRevalidation)===!0,Ep(y.location,y.matches),O=(S&&S.preventScrollReset)===!0,te=(S&&S.enableViewTransition)===!0;let C=a||i,M=S&&S.overrideNavigation,A=Sn(C,g,u),H=(S&&S.flushSync)===!0,N=Pl(A,C,g.pathname);if(N.active&&N.matches&&(A=N.matches),!A){let{error:G,notFoundMatches:Ce,route:we}=ei(g.pathname);In(g,{matches:Ce,loaderData:{},errors:{[we.id]:G}},{flushSync:H});return}if(y.initialized&&!st&&Hv(y.location,g)&&!(S&&S.submission&&pt(S.submission.formMethod))){In(g,{matches:A},{flushSync:H});return}Q=new AbortController;let V=An(e.history,g,Q.signal,S&&S.submission),U;if(S&&S.pendingError)U=[bn(A).route.id,{type:ee.error,error:S.pendingError}];else if(S&&S.submission&&pt(S.submission.formMethod)){let G=await pp(V,g,S.submission,A,N.active,{replace:S.replace,flushSync:H});if(G.shortCircuited)return;if(G.pendingActionResult){let[Ce,we]=G.pendingActionResult;if(Je(we)&&Zo(we.error)&&we.error.status===404){Q=null,In(g,{matches:G.matches,loaderData:{},errors:{[Ce]:we.error}});return}}A=G.matches||A,U=G.pendingActionResult,M=Ti(g,S.submission),H=!1,N.active=!1,V=An(e.history,V.url,V.signal)}let{shortCircuited:$,matches:Z,loaderData:q,errors:oe}=await hp(V,g,A,N.active,M,S&&S.submission,S&&S.fetcherSubmission,S&&S.replace,S&&S.initialHydration===!0,H,U);$||(Q=null,In(g,se({matches:Z||A},dc(U),{loaderData:q,errors:oe})))}async function pp(p,g,S,C,M,A){A===void 0&&(A={}),bo();let H=Jv(g,S);if(Oe({navigation:H},{flushSync:A.flushSync===!0}),M){let U=await _l(C,g.pathname,p.signal);if(U.type==="aborted")return{shortCircuited:!0};if(U.type==="error"){let{boundaryId:$,error:Z}=Cl(g.pathname,U);return{matches:U.partialMatches,pendingActionResult:[$,{type:ee.error,error:Z}]}}else if(U.matches)C=U.matches;else{let{notFoundMatches:$,error:Z,route:q}=ei(g.pathname);return{matches:$,pendingActionResult:[q.id,{type:ee.error,error:Z}]}}}let N,V=$r(C,g);if(!V.route.action&&!V.route.lazy)N={type:ee.error,error:Fe(405,{method:p.method,pathname:g.pathname,routeId:V.route.id})};else if(N=(await Er("action",y,p,[V],C,null))[V.route.id],p.signal.aborted)return{shortCircuited:!0};if(Cn(N)){let U;return A&&A.replace!=null?U=A.replace:U=uc(N.response.headers.get("Location"),new URL(p.url),u)===y.location.pathname+y.location.search,await yn(p,N,!0,{submission:S,replace:U}),{shortCircuited:!0}}if(qt(N))throw Fe(400,{type:"defer-action"});if(Je(N)){let U=bn(C,V.route.id);return(A&&A.replace)!==!0&&(B=Se.Push),{matches:C,pendingActionResult:[U.route.id,N]}}return{matches:C,pendingActionResult:[V.route.id,N]}}async function hp(p,g,S,C,M,A,H,N,V,U,$){let Z=M||Ti(g,A),q=A||H||mc(Z),oe=!gt&&(!f.v7_partialHydration||!V);if(C){if(oe){let he=ju($);Oe(se({navigation:Z},he!==void 0?{actionData:he}:{}),{flushSync:U})}let K=await _l(S,g.pathname,p.signal);if(K.type==="aborted")return{shortCircuited:!0};if(K.type==="error"){let{boundaryId:he,error:Xe}=Cl(g.pathname,K);return{matches:K.partialMatches,loaderData:{},errors:{[he]:Xe}}}else if(K.matches)S=K.matches;else{let{error:he,notFoundMatches:Xe,route:me}=ei(g.pathname);return{matches:Xe,loaderData:{},errors:{[me.id]:he}}}}let G=a||i,[Ce,we]=ic(e.history,y,S,q,g,f.v7_partialHydration&&V===!0,f.v7_skipActionErrorRevalidation,st,At,D,Re,Ve,Be,G,u,$);if(ti(K=>!(S&&S.some(he=>he.route.id===K))||Ce&&Ce.some(he=>he.route.id===K)),ne=++W,Ce.length===0&&we.length===0){let K=Uu();return In(g,se({matches:S,loaderData:{},errors:$&&Je($[1])?{[$[0]]:$[1].error}:null},dc($),K?{fetchers:new Map(y.fetchers)}:{}),{flushSync:U}),{shortCircuited:!0}}if(oe){let K={};if(!C){K.navigation=Z;let he=ju($);he!==void 0&&(K.actionData=he)}we.length>0&&(K.fetchers=mp(we)),Oe(K,{flushSync:U})}we.forEach(K=>{I.has(K.key)&&Vt(K.key),K.controller&&I.set(K.key,K.controller)});let kr=()=>we.forEach(K=>Vt(K.key));Q&&Q.signal.addEventListener("abort",kr);let{loaderResults:_t,fetcherResults:Un}=await Ou(y,S,Ce,we,p);if(p.signal.aborted)return{shortCircuited:!0};Q&&Q.signal.removeEventListener("abort",kr),we.forEach(K=>I.delete(K.key));let Ht=Xl(_t);if(Ht)return await yn(p,Ht.result,!0,{replace:N}),{shortCircuited:!0};if(Ht=Xl(Un),Ht)return Be.add(Ht.key),await yn(p,Ht.result,!0,{replace:N}),{shortCircuited:!0};let{loaderData:Rl,errors:Rt}=cc(y,S,Ce,_t,$,we,Un,nt);nt.forEach((K,he)=>{K.subscribe(Xe=>{(Xe||K.done)&&nt.delete(he)})}),f.v7_partialHydration&&V&&y.errors&&Object.entries(y.errors).filter(K=>{let[he]=K;return!Ce.some(Xe=>Xe.route.id===he)}).forEach(K=>{let[he,Xe]=K;Rt=Object.assign(Rt||{},{[he]:Xe})});let Ll=Uu(),Nl=$u(ne),Tl=Ll||Nl||we.length>0;return se({matches:S,loaderData:Rl,errors:Rt},Tl?{fetchers:new Map(y.fetchers)}:{})}function ju(p){if(p&&!Je(p[1]))return{[p[0]]:p[1].data};if(y.actionData)return Object.keys(y.actionData).length===0?null:y.actionData}function mp(p){return p.forEach(g=>{let S=y.fetchers.get(g.key),C=zr(void 0,S?S.data:void 0);y.fetchers.set(g.key,C)}),new Map(y.fetchers)}function vp(p,g,S,C){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.");I.has(p)&&Vt(p);let M=(C&&C.unstable_flushSync)===!0,A=a||i,H=ka(y.location,y.matches,u,f.v7_prependBasename,S,f.v7_relativeSplatPath,g,C==null?void 0:C.relative),N=Sn(A,H,u),V=Pl(N,A,H);if(V.active&&V.matches&&(N=V.matches),!N){Pt(p,g,Fe(404,{pathname:H}),{flushSync:M});return}let{path:U,submission:$,error:Z}=oc(f.v7_normalizeFormMethod,!0,H,C);if(Z){Pt(p,g,Z,{flushSync:M});return}let q=$r(N,U);if(O=(C&&C.preventScrollReset)===!0,$&&pt($.formMethod)){yp(p,g,U,q,N,V.active,M,$);return}Ve.set(p,{routeId:g,path:U}),gp(p,g,U,q,N,V.active,M,$)}async function yp(p,g,S,C,M,A,H,N){bo(),Ve.delete(p);function V(me){if(!me.route.action&&!me.route.lazy){let Lt=Fe(405,{method:N.formMethod,pathname:S,routeId:g});return Pt(p,g,Lt,{flushSync:H}),!0}return!1}if(!A&&V(C))return;let U=y.fetchers.get(p);Bt(p,Zv(N,U),{flushSync:H});let $=new AbortController,Z=An(e.history,S,$.signal,N);if(A){let me=await _l(M,S,Z.signal);if(me.type==="aborted")return;if(me.type==="error"){let{error:Lt}=Cl(S,me);Pt(p,g,Lt,{flushSync:H});return}else if(me.matches){if(M=me.matches,C=$r(M,S),V(C))return}else{Pt(p,g,Fe(404,{pathname:S}),{flushSync:H});return}}I.set(p,$);let q=W,G=(await Er("action",y,Z,[C],M,p))[C.route.id];if(Z.signal.aborted){I.get(p)===$&&I.delete(p);return}if(f.v7_fetcherPersist&&Re.has(p)){if(Cn(G)||Je(G)){Bt(p,Qt(void 0));return}}else{if(Cn(G))if(I.delete(p),ne>q){Bt(p,Qt(void 0));return}else return Be.add(p),Bt(p,zr(N)),yn(Z,G,!1,{fetcherSubmission:N});if(Je(G)){Pt(p,g,G.error);return}}if(qt(G))throw Fe(400,{type:"defer-action"});let Ce=y.navigation.location||y.location,we=An(e.history,Ce,$.signal),kr=a||i,_t=y.navigation.state!=="idle"?Sn(kr,y.navigation.location,u):y.matches;Y(_t,"Didn't find any matches after fetcher action");let Un=++W;le.set(p,Un);let Ht=zr(N,G.data);y.fetchers.set(p,Ht);let[Rl,Rt]=ic(e.history,y,_t,N,Ce,!1,f.v7_skipActionErrorRevalidation,st,At,D,Re,Ve,Be,kr,u,[C.route.id,G]);Rt.filter(me=>me.key!==p).forEach(me=>{let Lt=me.key,Qu=y.fetchers.get(Lt),Pp=zr(void 0,Qu?Qu.data:void 0);y.fetchers.set(Lt,Pp),I.has(Lt)&&Vt(Lt),me.controller&&I.set(Lt,me.controller)}),Oe({fetchers:new Map(y.fetchers)});let Ll=()=>Rt.forEach(me=>Vt(me.key));$.signal.addEventListener("abort",Ll);let{loaderResults:Nl,fetcherResults:Tl}=await Ou(y,_t,Rl,Rt,we);if($.signal.aborted)return;$.signal.removeEventListener("abort",Ll),le.delete(p),I.delete(p),Rt.forEach(me=>I.delete(me.key));let K=Xl(Nl);if(K)return yn(we,K.result,!1);if(K=Xl(Tl),K)return Be.add(K.key),yn(we,K.result,!1);let{loaderData:he,errors:Xe}=cc(y,_t,Rl,Nl,void 0,Rt,Tl,nt);if(y.fetchers.has(p)){let me=Qt(G.data);y.fetchers.set(p,me)}$u(Un),y.navigation.state==="loading"&&Un>ne?(Y(B,"Expected pending action"),Q&&Q.abort(),In(y.navigation.location,{matches:_t,loaderData:he,errors:Xe,fetchers:new Map(y.fetchers)})):(Oe({errors:Xe,loaderData:fc(y.loaderData,he,_t,Xe),fetchers:new Map(y.fetchers)}),st=!1)}async function gp(p,g,S,C,M,A,H,N){let V=y.fetchers.get(p);Bt(p,zr(N,V?V.data:void 0),{flushSync:H});let U=new AbortController,$=An(e.history,S,U.signal);if(A){let G=await _l(M,S,$.signal);if(G.type==="aborted")return;if(G.type==="error"){let{error:Ce}=Cl(S,G);Pt(p,g,Ce,{flushSync:H});return}else if(G.matches)M=G.matches,C=$r(M,S);else{Pt(p,g,Fe(404,{pathname:S}),{flushSync:H});return}}I.set(p,U);let Z=W,oe=(await Er("loader",y,$,[C],M,p))[C.route.id];if(qt(oe)&&(oe=await Pu(oe,$.signal,!0)||oe),I.get(p)===U&&I.delete(p),!$.signal.aborted){if(Re.has(p)){Bt(p,Qt(void 0));return}if(Cn(oe))if(ne>Z){Bt(p,Qt(void 0));return}else{Be.add(p),await yn($,oe,!1);return}if(Je(oe)){Pt(p,g,oe.error);return}Y(!qt(oe),"Unhandled fetcher deferred data"),Bt(p,Qt(oe.data))}}async function yn(p,g,S,C){let{submission:M,fetcherSubmission:A,replace:H}=C===void 0?{}:C;g.response.headers.has("X-Remix-Revalidate")&&(st=!0);let N=g.response.headers.get("Location");Y(N,"Expected a Location header on the redirect Response"),N=uc(N,new URL(p.url),u);let V=dl(y.location,N,{_isRedirect:!0});if(n){let G=!1;if(g.response.headers.has("X-Remix-Reload-Document"))G=!0;else if(Cu.test(N)){const Ce=e.history.createURL(N);G=Ce.origin!==t.location.origin||gr(Ce.pathname,u)==null}if(G){H?t.location.replace(N):t.location.assign(N);return}}Q=null;let U=H===!0||g.response.headers.has("X-Remix-Replace")?Se.Replace:Se.Push,{formMethod:$,formAction:Z,formEncType:q}=y.navigation;!M&&!A&&$&&Z&&q&&(M=mc(y.navigation));let oe=M||A;if(Lv.has(g.response.status)&&oe&&pt(oe.formMethod))await vn(U,V,{submission:se({},oe,{formAction:N}),preventScrollReset:O,enableViewTransition:S?te:void 0});else{let G=Ti(V,M);await vn(U,V,{overrideNavigation:G,fetcherSubmission:A,preventScrollReset:O,enableViewTransition:S?te:void 0})}}async function Er(p,g,S,C,M,A){let H,N={};try{H=await Uv(s,p,g,S,C,M,A,o,l)}catch(V){return C.forEach(U=>{N[U.route.id]={type:ee.error,error:V}}),N}for(let[V,U]of Object.entries(H))if(Qv(U)){let $=U.result;N[V]={type:ee.redirect,response:Bv($,S,V,M,u,f.v7_relativeSplatPath)}}else N[V]=await Av(U);return N}async function Ou(p,g,S,C,M){let A=p.matches,H=Er("loader",p,M,S,g,null),N=Promise.all(C.map(async $=>{if($.matches&&$.match&&$.controller){let q=(await Er("loader",p,An(e.history,$.path,$.controller.signal),[$.match],$.matches,$.key))[$.match.route.id];return{[$.key]:q}}else return Promise.resolve({[$.key]:{type:ee.error,error:Fe(404,{pathname:$.path})}})})),V=await H,U=(await N).reduce(($,Z)=>Object.assign($,Z),{});return await Promise.all([Xv(g,V,M.signal,A,p.loaderData),Gv(g,U,C)]),{loaderResults:V,fetcherResults:U}}function bo(){st=!0,At.push(...ti()),Ve.forEach((p,g)=>{I.has(g)&&(D.add(g),Vt(g))})}function Bt(p,g,S){S===void 0&&(S={}),y.fetchers.set(p,g),Oe({fetchers:new Map(y.fetchers)},{flushSync:(S&&S.flushSync)===!0})}function Pt(p,g,S,C){C===void 0&&(C={});let M=bn(y.matches,g);El(p),Oe({errors:{[M.route.id]:S},fetchers:new Map(y.fetchers)},{flushSync:(C&&C.flushSync)===!0})}function Fu(p){return f.v7_fetcherPersist&&(Ct.set(p,(Ct.get(p)||0)+1),Re.has(p)&&Re.delete(p)),y.fetchers.get(p)||Nv}function El(p){let g=y.fetchers.get(p);I.has(p)&&!(g&&g.state==="loading"&&le.has(p))&&Vt(p),Ve.delete(p),le.delete(p),Be.delete(p),Re.delete(p),D.delete(p),y.fetchers.delete(p)}function wp(p){if(f.v7_fetcherPersist){let g=(Ct.get(p)||0)-1;g<=0?(Ct.delete(p),Re.add(p)):Ct.set(p,g)}else El(p);Oe({fetchers:new Map(y.fetchers)})}function Vt(p){let g=I.get(p);Y(g,"Expected fetch controller: "+p),g.abort(),I.delete(p)}function Iu(p){for(let g of p){let S=Fu(g),C=Qt(S.data);y.fetchers.set(g,C)}}function Uu(){let p=[],g=!1;for(let S of Be){let C=y.fetchers.get(S);Y(C,"Expected fetcher: "+S),C.state==="loading"&&(Be.delete(S),p.push(S),g=!0)}return Iu(p),g}function $u(p){let g=[];for(let[S,C]of le)if(C0}function Sp(p,g){let S=y.blockers.get(p)||Mr;return mn.get(p)!==g&&mn.set(p,g),S}function Au(p){y.blockers.delete(p),mn.delete(p)}function kl(p,g){let S=y.blockers.get(p)||Mr;Y(S.state==="unblocked"&&g.state==="blocked"||S.state==="blocked"&&g.state==="blocked"||S.state==="blocked"&&g.state==="proceeding"||S.state==="blocked"&&g.state==="unblocked"||S.state==="proceeding"&&g.state==="unblocked","Invalid blocker state transition: "+S.state+" -> "+g.state);let C=new Map(y.blockers);C.set(p,g),Oe({blockers:C})}function Bu(p){let{currentLocation:g,nextLocation:S,historyAction:C}=p;if(mn.size===0)return;mn.size>1&&pr(!1,"A router only supports one blocker at a time");let M=Array.from(mn.entries()),[A,H]=M[M.length-1],N=y.blockers.get(A);if(!(N&&N.state==="proceeding")&&H({currentLocation:g,nextLocation:S,historyAction:C}))return A}function ei(p){let g=Fe(404,{pathname:p}),S=a||i,{matches:C,route:M}=pc(S);return ti(),{notFoundMatches:C,route:M,error:g}}function Cl(p,g){return{boundaryId:bn(g.partialMatches).route.id,error:Fe(400,{type:"route-discovery",pathname:p,message:g.error!=null&&"message"in g.error?g.error:String(g.error)})}}function ti(p){let g=[];return nt.forEach((S,C)=>{(!p||p(C))&&(S.cancel(),g.push(C),nt.delete(C))}),g}function xp(p,g,S){if(L=p,c=g,h=S||null,!v&&y.navigation===Ni){v=!0;let C=Hu(y.location,y.matches);C!=null&&Oe({restoreScrollPosition:C})}return()=>{L=null,c=null,h=null}}function Vu(p,g){return h&&h(p,g.map(C=>iv(C,y.loaderData)))||p.key}function Ep(p,g){if(L&&c){let S=Vu(p,g);L[S]=c()}}function Hu(p,g){if(L){let S=Vu(p,g),C=L[S];if(typeof C=="number")return C}return null}function Pl(p,g,S){if(d){if(x.has(S))return{active:!1,matches:p};if(p){if(Object.keys(p[0].params).length>0)return{active:!0,matches:ao(g,S,u,!0)}}else return{active:!0,matches:ao(g,S,u,!0)||[]}}return{active:!1,matches:null}}async function _l(p,g,S){let C=p;for(;;){let M=a==null,A=a||i;try{await Ov(d,g,C,A,o,l,up,S)}catch(V){return{type:"error",error:V,partialMatches:C}}finally{M&&(i=[...i])}if(S.aborted)return{type:"aborted"};let H=Sn(A,g,u);if(H)return Wu(g,x),{type:"success",matches:H};let N=ao(A,g,u,!0);if(!N||C.length===N.length&&C.every((V,U)=>V.route.id===N[U].route.id))return Wu(g,x),{type:"success",matches:null};C=N}}function Wu(p,g){if(g.size>=k){let S=g.values().next().value;g.delete(S)}g.add(p)}function kp(p){o={},a=pl(p,l,void 0,o)}function Cp(p,g){let S=a==null;Qd(p,g,a||i,o,l),S&&(i=[...i],Oe({}))}return j={get basename(){return u},get future(){return f},get state(){return y},get routes(){return i},get window(){return t},initialize:sp,subscribe:fp,enableScrollRestoration:xp,navigate:zu,fetch:vp,revalidate:dp,createHref:p=>e.history.createHref(p),encodeLocation:p=>e.history.encodeLocation(p),getFetcher:Fu,deleteFetcher:wp,dispose:cp,getBlocker:Sp,deleteBlocker:Au,patchRoutes:Cp,_internalFetchControllers:I,_internalActiveDeferreds:nt,_internalSetRoutes:kp},j}function Mv(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,a){let u,s;if(i){u=[];for(let f of t)if(u.push(f),f.route.id===i){s=f;break}}else u=t,s=t[t.length-1];let d=ku(l||".",Eu(u,o),gr(e.pathname,n)||e.pathname,a==="path");return l==null&&(d.search=e.search,d.hash=e.hash),(l==null||l===""||l===".")&&s&&s.route.index&&!_u(d.search)&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(d.pathname=d.pathname==="/"?n:jt([n,d.pathname])),Mn(d)}function oc(e,t,n,r){if(!r||!Mv(r))return{path:n};if(r.formMethod&&!Yv(r.formMethod))return{path:n,error:Fe(405,{method:r.formMethod})};let l=()=>({path:n,error:Fe(400,{type:"invalid-body"})}),o=r.formMethod||"get",i=e?o.toUpperCase():o.toLowerCase(),a=Kd(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!pt(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((w,k)=>{let[x,L]=k;return""+w+x+"="+L+` -`},""):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(!pt(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()}}}Y(typeof FormData=="function","FormData is not available in this environment");let u,s;if(r.formData)u=Ca(r.formData),s=r.formData;else if(r.body instanceof FormData)u=Ca(r.body),s=r.body;else if(r.body instanceof URLSearchParams)u=r.body,s=sc(u);else if(r.body==null)u=new URLSearchParams,s=new FormData;else try{u=new URLSearchParams(r.body),s=sc(u)}catch{return l()}let d={formMethod:i,formAction:a,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:s,json:void 0,text:void 0};if(pt(d.formMethod))return{path:n,submission:d};let f=pn(n);return t&&f.search&&_u(f.search)&&u.append("index",""),f.search="?"+u,{path:Mn(f),submission:d}}function zv(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 ic(e,t,n,r,l,o,i,a,u,s,d,f,m,w,k,x){let L=x?Je(x[1])?x[1].error:x[1].data:void 0,h=e.createURL(t.location),c=e.createURL(l),v=x&&Je(x[1])?x[0]:void 0,E=v?zv(n,v):n,R=x?x[1].statusCode:void 0,T=i&&R&&R>=400,j=E.filter((B,O)=>{let{route:Q}=B;if(Q.lazy)return!0;if(Q.loader==null)return!1;if(o)return typeof Q.loader!="function"||Q.loader.hydrate?!0:t.loaderData[Q.id]===void 0&&(!t.errors||t.errors[Q.id]===void 0);if(jv(t.loaderData,t.matches[O],B)||u.some(pe=>pe===B.route.id))return!0;let te=t.matches[O],ge=B;return ac(B,se({currentUrl:h,currentParams:te.params,nextUrl:c,nextParams:ge.params},r,{actionResult:L,actionStatus:R,defaultShouldRevalidate:T?!1:a||h.pathname+h.search===c.pathname+c.search||h.search!==c.search||Wd(te,ge)}))}),y=[];return f.forEach((B,O)=>{if(o||!n.some(gt=>gt.route.id===B.routeId)||d.has(O))return;let Q=Sn(w,B.path,k);if(!Q){y.push({key:O,routeId:B.routeId,path:B.path,matches:null,match:null,controller:null});return}let te=t.fetchers.get(O),ge=$r(Q,B.path),pe=!1;m.has(O)?pe=!1:s.has(O)?(s.delete(O),pe=!0):te&&te.state!=="idle"&&te.data===void 0?pe=a:pe=ac(ge,se({currentUrl:h,currentParams:t.matches[t.matches.length-1].params,nextUrl:c,nextParams:n[n.length-1].params},r,{actionResult:L,actionStatus:R,defaultShouldRevalidate:T?!1:a})),pe&&y.push({key:O,routeId:B.routeId,path:B.path,matches:Q,match:ge,controller:new AbortController})}),[j,y]}function jv(e,t,n){let r=!t||n.route.id!==t.route.id,l=e[n.route.id]===void 0;return r||l}function Wd(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function ac(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function Ov(e,t,n,r,l,o,i,a){let u=[t,...n.map(s=>s.route.id)].join("-");try{let s=i.get(u);s||(s=e({path:t,matches:n,patch:(d,f)=>{a.aborted||Qd(d,f,r,l,o)}}),i.set(u,s)),s&&Wv(s)&&await s}finally{i.delete(u)}}function Qd(e,t,n,r,l){if(e){var o;let i=r[e];Y(i,"No route found to patch children into: routeId = "+e);let a=pl(t,l,[e,"patch",String(((o=i.children)==null?void 0:o.length)||"0")],r);i.children?i.children.push(...a):i.children=a}else{let i=pl(t,l,["patch",String(n.length||"0")],r);n.push(...i)}}async function Fv(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let l=n[e.id];Y(l,"No route found in manifest");let o={};for(let i in r){let u=l[i]!==void 0&&i!=="hasErrorBoundary";pr(!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&&!lv.has(i)&&(o[i]=r[i])}Object.assign(l,o),Object.assign(l,se({},t(l),{lazy:void 0}))}async function Iv(e){let{matches:t}=e,n=t.filter(l=>l.shouldLoad);return(await Promise.all(n.map(l=>l.resolve()))).reduce((l,o,i)=>Object.assign(l,{[n[i].route.id]:o}),{})}async function Uv(e,t,n,r,l,o,i,a,u,s){let d=o.map(w=>w.route.lazy?Fv(w.route,u,a):void 0),f=o.map((w,k)=>{let x=d[k],L=l.some(c=>c.route.id===w.route.id);return se({},w,{shouldLoad:L,resolve:async c=>(c&&r.method==="GET"&&(w.route.lazy||w.route.loader)&&(L=!0),L?$v(t,r,w,x,c,s):Promise.resolve({type:ee.data,result:void 0}))})}),m=await e({matches:f,request:r,params:o[0].params,fetcherKey:i,context:s});try{await Promise.all(d)}catch{}return m}async function $v(e,t,n,r,l,o){let i,a,u=s=>{let d,f=new Promise((k,x)=>d=x);a=()=>d(),t.signal.addEventListener("abort",a);let m=k=>typeof s!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):s({request:t,params:n.params,context:o},...k!==void 0?[k]:[]),w=(async()=>{try{return{type:"data",result:await(l?l(x=>m(x)):m())}}catch(k){return{type:"error",result:k}}})();return Promise.race([w,f])};try{let s=n.route[e];if(r)if(s){let d,[f]=await Promise.all([u(s).catch(m=>{d=m}),r]);if(d!==void 0)throw d;i=f}else if(await r,s=n.route[e],s)i=await u(s);else if(e==="action"){let d=new URL(t.url),f=d.pathname+d.search;throw Fe(405,{method:t.method,pathname:f,routeId:n.route.id})}else return{type:ee.data,result:void 0};else if(s)i=await u(s);else{let d=new URL(t.url),f=d.pathname+d.search;throw Fe(404,{pathname:f})}Y(i.result!==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(s){return{type:ee.error,result:s}}finally{a&&t.signal.removeEventListener("abort",a)}return i}async function Av(e){let{result:t,type:n}=e;if(Yd(t)){let s;try{let d=t.headers.get("Content-Type");d&&/\bapplication\/json\b/.test(d)?t.body==null?s=null:s=await t.json():s=await t.text()}catch(d){return{type:ee.error,error:d}}return n===ee.error?{type:ee.error,error:new zo(t.status,t.statusText,s),statusCode:t.status,headers:t.headers}:{type:ee.data,data:s,statusCode:t.status,headers:t.headers}}if(n===ee.error){if(hc(t)){var r;if(t.data instanceof Error){var l;return{type:ee.error,error:t.data,statusCode:(l=t.init)==null?void 0:l.status}}t=new zo(((r=t.init)==null?void 0:r.status)||500,void 0,t.data)}return{type:ee.error,error:t,statusCode:Zo(t)?t.status:void 0}}if(Kv(t)){var o,i;return{type:ee.deferred,deferredData:t,statusCode:(o=t.init)==null?void 0:o.status,headers:((i=t.init)==null?void 0:i.headers)&&new Headers(t.init.headers)}}if(hc(t)){var a,u;return{type:ee.data,data:t.data,statusCode:(a=t.init)==null?void 0:a.status,headers:(u=t.init)!=null&&u.headers?new Headers(t.init.headers):void 0}}return{type:ee.data,data:t}}function Bv(e,t,n,r,l,o){let i=e.headers.get("Location");if(Y(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!Cu.test(i)){let a=r.slice(0,r.findIndex(u=>u.route.id===n)+1);i=ka(new URL(t.url),a,l,!0,i,o),e.headers.set("Location",i)}return e}function uc(e,t,n){if(Cu.test(e)){let r=e,l=r.startsWith("//")?new URL(t.protocol+r):new URL(r),o=gr(l.pathname,n)!=null;if(l.origin===t.origin&&o)return l.pathname+l.search+l.hash}return e}function An(e,t,n,r){let l=e.createURL(Kd(t)).toString(),o={signal:n};if(r&&pt(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=Ca(r.formData):o.body=r.formData}return new Request(l,o)}function Ca(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function sc(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function Vv(e,t,n,r,l){let o={},i=null,a,u=!1,s={},d=n&&Je(n[1])?n[1].error:void 0;return e.forEach(f=>{if(!(f.route.id in t))return;let m=f.route.id,w=t[m];if(Y(!Cn(w),"Cannot handle redirect results in processLoaderData"),Je(w)){let k=w.error;d!==void 0&&(k=d,d=void 0),i=i||{};{let x=bn(e,m);i[x.route.id]==null&&(i[x.route.id]=k)}o[m]=void 0,u||(u=!0,a=Zo(w.error)?w.error.status:500),w.headers&&(s[m]=w.headers)}else qt(w)?(r.set(m,w.deferredData),o[m]=w.deferredData.data,w.statusCode!=null&&w.statusCode!==200&&!u&&(a=w.statusCode),w.headers&&(s[m]=w.headers)):(o[m]=w.data,w.statusCode&&w.statusCode!==200&&!u&&(a=w.statusCode),w.headers&&(s[m]=w.headers))}),d!==void 0&&n&&(i={[n[0]]:d},o[n[0]]=void 0),{loaderData:o,errors:i,statusCode:a||200,loaderHeaders:s}}function cc(e,t,n,r,l,o,i,a){let{loaderData:u,errors:s}=Vv(t,r,l,a);return o.forEach(d=>{let{key:f,match:m,controller:w}=d,k=i[f];if(Y(k,"Did not find corresponding fetcher result"),!(w&&w.signal.aborted))if(Je(k)){let x=bn(e.matches,m==null?void 0:m.route.id);s&&s[x.route.id]||(s=se({},s,{[x.route.id]:k.error})),e.fetchers.delete(f)}else if(Cn(k))Y(!1,"Unhandled fetcher revalidation redirect");else if(qt(k))Y(!1,"Unhandled fetcher deferred data");else{let x=Qt(k.data);e.fetchers.set(f,x)}}),{loaderData:u,errors:s}}function fc(e,t,n,r){let l=se({},t);for(let o of n){let i=o.route.id;if(t.hasOwnProperty(i)?t[i]!==void 0&&(l[i]=t[i]):e[i]!==void 0&&o.route.loader&&(l[i]=e[i]),r&&r.hasOwnProperty(i))break}return l}function dc(e){return e?Je(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function bn(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function pc(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 Fe(e,t){let{pathname:n,routeId:r,method:l,type:o,message:i}=t===void 0?{}:t,a="Unknown Server Error",u="Unknown @remix-run/router error";return e===400?(a="Bad Request",o==="route-discovery"?u='Unable to match URL "'+n+'" - the `unstable_patchRoutesOnNavigation()` '+(`function threw the following error: -`+i):l&&n&&r?u="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"?u="defer() is not supported in actions":o==="invalid-body"&&(u="Unable to encode submission body")):e===403?(a="Forbidden",u='Route "'+r+'" does not match URL "'+n+'"'):e===404?(a="Not Found",u='No route matches URL "'+n+'"'):e===405&&(a="Method Not Allowed",l&&n&&r?u="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&&(u='Invalid request method "'+l.toUpperCase()+'"')),new zo(e||500,a,new Error(u),!0)}function Xl(e){let t=Object.entries(e);for(let n=t.length-1;n>=0;n--){let[r,l]=t[n];if(Cn(l))return{key:r,result:l}}}function Kd(e){let t=typeof e=="string"?pn(e):e;return Mn(se({},t,{hash:""}))}function Hv(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Wv(e){return typeof e=="object"&&e!=null&&"then"in e}function Qv(e){return Yd(e.result)&&Rv.has(e.result.status)}function qt(e){return e.type===ee.deferred}function Je(e){return e.type===ee.error}function Cn(e){return(e&&e.type)===ee.redirect}function hc(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Kv(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 Yd(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Yv(e){return _v.has(e.toLowerCase())}function pt(e){return Cv.has(e.toLowerCase())}async function Xv(e,t,n,r,l){let o=Object.entries(t);for(let i=0;i(m==null?void 0:m.route.id)===a);if(!s)continue;let d=r.find(m=>m.route.id===s.route.id),f=d!=null&&!Wd(d,s)&&(l&&l[s.route.id])!==void 0;qt(u)&&f&&await Pu(u,n,!1).then(m=>{m&&(t[a]=m)})}}async function Gv(e,t,n){for(let r=0;r(s==null?void 0:s.route.id)===o)&&qt(a)&&(Y(i,"Expected an AbortController for revalidating fetcher deferred result"),await Pu(a,i.signal,!0).then(s=>{s&&(t[l]=s)}))}}async function Pu(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:ee.data,data:e.deferredData.unwrappedData}}catch(l){return{type:ee.error,error:l}}return{type:ee.data,data:e.deferredData.data}}}function _u(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function $r(e,t){let n=typeof t=="string"?pn(t).search:t.search;if(e[e.length-1].route.index&&_u(n||""))return e[e.length-1];let r=Bd(e);return r[r.length-1]}function mc(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 Ti(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 Jv(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 Zv(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 Qt(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 qv(e,t){try{let n=e.sessionStorage.getItem(Hd);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 bv(e,t){if(t.size>0){let n={};for(let[r,l]of t)n[r]=[...l];try{e.sessionStorage.setItem(Hd,JSON.stringify(n))}catch(r){pr(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/** + */function se(){return se=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function hr(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function nv(){return Math.random().toString(36).substr(2,8)}function nc(e,t){return{usr:e.state,key:e.key,idx:t}}function dl(e,t,n,r){return n===void 0&&(n=null),se({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?pn(t):t,{state:n,key:t&&t.key||r||nv()})}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 pn(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 rv(e,t,n,r){r===void 0&&(r={});let{window:l=document.defaultView,v5Compat:o=!1}=r,i=l.history,a=Se.Pop,u=null,s=d();s==null&&(s=0,i.replaceState(se({},i.state,{idx:s}),""));function d(){return(i.state||{idx:null}).idx}function f(){a=Se.Pop;let L=d(),h=L==null?null:L-s;s=L,u&&u({action:a,location:x.location,delta:h})}function m(L,h){a=Se.Push;let c=dl(x.location,L,h);s=d()+1;let v=nc(c,s),E=x.createHref(c);try{i.pushState(v,"",E)}catch(R){if(R instanceof DOMException&&R.name==="DataCloneError")throw R;l.location.assign(E)}o&&u&&u({action:a,location:x.location,delta:1})}function w(L,h){a=Se.Replace;let c=dl(x.location,L,h);s=d();let v=nc(c,s),E=x.createHref(c);i.replaceState(v,"",E),o&&u&&u({action:a,location:x.location,delta:0})}function k(L){let h=l.location.origin!=="null"?l.location.origin:l.location.href,c=typeof L=="string"?L:Mn(L);return c=c.replace(/ $/,"%20"),Y(h,"No window.location.(origin|href) available to create URL for href: "+c),new URL(c,h)}let x={get action(){return a},get location(){return e(l,i)},listen(L){if(u)throw new Error("A history only accepts one active listener");return l.addEventListener(tc,f),u=L,()=>{l.removeEventListener(tc,f),u=null}},createHref(L){return t(l,L)},createURL:k,encodeLocation(L){let h=k(L);return{pathname:h.pathname,search:h.search,hash:h.hash}},push:m,replace:w,go(L){return i.go(L)}};return x}var ee;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(ee||(ee={}));const lv=new Set(["lazy","caseSensitive","path","id","index","children"]);function ov(e){return e.index===!0}function pl(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((l,o)=>{let i=[...n,String(o)],a=typeof l.id=="string"?l.id:i.join("-");if(Y(l.index!==!0||!l.children,"Cannot specify children on an index route"),Y(!r[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),ov(l)){let u=se({},l,t(l),{id:a});return r[a]=u,u}else{let u=se({},l,t(l),{id:a,children:void 0});return r[a]=u,l.children&&(u.children=pl(l.children,t,i,r)),u}})}function Sn(e,t,n){return n===void 0&&(n="/"),ao(e,t,n,!1)}function ao(e,t,n,r){let l=typeof t=="string"?pn(t):t,o=wr(l.pathname||"/",n);if(o==null)return null;let i=$d(e);av(i);let a=null;for(let u=0;a==null&&u{let u={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};u.relativePath.startsWith("/")&&(Y(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=jt([r,u.relativePath]),d=n.concat(u);o.children&&o.children.length>0&&(Y(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+s+'".')),$d(o.children,t,d,s)),!(o.path==null&&!o.index)&&t.push({path:s,score:hv(s,o.index),routesMeta:d})};return e.forEach((o,i)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))l(o,i);else for(let u of Ad(o.path))l(o,i,u)}),t}function Ad(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=Ad(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 av(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:mv(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const uv=/^:[\w-]+$/,sv=3,cv=2,fv=1,dv=10,pv=-2,rc=e=>e==="*";function hv(e,t){let n=e.split("/"),r=n.length;return n.some(rc)&&(r+=pv),t&&(r+=cv),n.filter(l=>!rc(l)).reduce((l,o)=>l+(uv.test(o)?sv:o===""?fv:dv),r)}function mv(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 vv(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,l={},o="/",i=[];for(let a=0;a{let{paramName:m,isOptional:w}=d;if(m==="*"){let x=a[f]||"";i=o.slice(0,o.length-x.length).replace(/(.)\/+$/,"$1")}const k=a[f];return w&&!k?s[m]=void 0:s[m]=(k||"").replace(/%2F/g,"/"),s},{}),pathname:o,pathnameBase:i,pattern:e}}function yv(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),hr(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 gv(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return hr(!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 wr(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 wv(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:l=""}=typeof e=="string"?pn(e):e;return{pathname:n?n.startsWith("/")?n:Sv(n,t):t,search:Ev(r),hash:kv(l)}}function Sv(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 Li(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 Bd(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Eu(e,t){let n=Bd(e);return t?n.map((r,l)=>l===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function ku(e,t,n,r){r===void 0&&(r=!1);let l;typeof e=="string"?l=pn(e):(l=se({},e),Y(!l.pathname||!l.pathname.includes("?"),Li("?","pathname","search",l)),Y(!l.pathname||!l.pathname.includes("#"),Li("#","pathname","hash",l)),Y(!l.search||!l.search.includes("#"),Li("#","search","hash",l)));let o=e===""||l.pathname==="",i=o?"/":l.pathname,a;if(i==null)a=n;else{let f=t.length-1;if(!r&&i.startsWith("..")){let m=i.split("/");for(;m[0]==="..";)m.shift(),f-=1;l.pathname=m.join("/")}a=f>=0?t[f]:"/"}let u=wv(l,a),s=i&&i!=="/"&&i.endsWith("/"),d=(o||i===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(s||d)&&(u.pathname+="/"),u}const jt=e=>e.join("/").replace(/\/\/+/g,"/"),xv=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Ev=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,kv=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class zo{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 Zo(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Vd=["post","put","patch","delete"],Cv=new Set(Vd),Pv=["get",...Vd],_v=new Set(Pv),Rv=new Set([301,302,303,307,308]),Lv=new Set([307,308]),Ni={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Nv={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Mr={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Cu=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Tv=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Hd="remix-router-transitions";function Dv(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;Y(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 p=e.detectErrorBoundary;l=g=>({hasErrorBoundary:p(g)})}else l=Tv;let o={},i=pl(e.routes,l,void 0,o),a,u=e.basename||"/",s=e.unstable_dataStrategy||Iv,d=e.unstable_patchRoutesOnNavigation,f=se({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),m=null,w=new Set,k=1e3,x=new Set,L=null,h=null,c=null,v=e.hydrationData!=null,E=Sn(i,e.history.location,u),R=null;if(E==null&&!d){let p=Fe(404,{pathname:e.history.location.pathname}),{matches:g,route:S}=pc(i);E=g,R={[S.id]:p}}E&&!e.hydrationData&&Pl(E,i,e.history.location.pathname).active&&(E=null);let T;if(E)if(E.some(p=>p.route.lazy))T=!1;else if(!E.some(p=>p.route.loader))T=!0;else if(f.v7_partialHydration){let p=e.hydrationData?e.hydrationData.loaderData:null,g=e.hydrationData?e.hydrationData.errors:null,S=C=>C.route.loader?typeof C.route.loader=="function"&&C.route.loader.hydrate===!0?!1:p&&p[C.route.id]!==void 0||g&&g[C.route.id]!==void 0:!0;if(g){let C=E.findIndex(M=>g[M.route.id]!==void 0);T=E.slice(0,C+1).every(S)}else T=E.every(S)}else T=e.hydrationData!=null;else if(T=!1,E=[],f.v7_partialHydration){let p=Pl(null,i,e.history.location.pathname);p.active&&p.matches&&(E=p.matches)}let j,y={historyAction:e.history.action,location:e.history.location,matches:E,initialized:T,navigation:Ni,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||R,fetchers:new Map,blockers:new Map},B=Se.Pop,O=!1,Q,te=!1,ge=new Map,pe=null,gt=!1,st=!1,At=[],D=new Set,I=new Map,W=0,ne=-1,le=new Map,Be=new Set,Ve=new Map,Ct=new Map,Re=new Set,nt=new Map,mn=new Map,up=new Map,xl;function sp(){if(m=e.history.listen(p=>{let{action:g,location:S,delta:C}=p;if(xl){xl(),xl=void 0;return}hr(mn.size===0||C!=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 M=Bu({currentLocation:y.location,nextLocation:S,historyAction:g});if(M&&C!=null){let A=new Promise(H=>{xl=H});e.history.go(C*-1),kl(M,{state:"blocked",location:S,proceed(){kl(M,{state:"proceeding",proceed:void 0,reset:void 0,location:S}),A.then(()=>e.history.go(C))},reset(){let H=new Map(y.blockers);H.set(M,Mr),Oe({blockers:H})}});return}return vn(g,S)}),n){qv(t,ge);let p=()=>bv(t,ge);t.addEventListener("pagehide",p),pe=()=>t.removeEventListener("pagehide",p)}return y.initialized||vn(Se.Pop,y.location,{initialHydration:!0}),j}function cp(){m&&m(),pe&&pe(),w.clear(),Q&&Q.abort(),y.fetchers.forEach((p,g)=>El(g)),y.blockers.forEach((p,g)=>Au(g))}function fp(p){return w.add(p),()=>w.delete(p)}function Oe(p,g){g===void 0&&(g={}),y=se({},y,p);let S=[],C=[];f.v7_fetcherPersist&&y.fetchers.forEach((M,A)=>{M.state==="idle"&&(Re.has(A)?C.push(A):S.push(A))}),[...w].forEach(M=>M(y,{deletedFetchers:C,unstable_viewTransitionOpts:g.viewTransitionOpts,unstable_flushSync:g.flushSync===!0})),f.v7_fetcherPersist&&(S.forEach(M=>y.fetchers.delete(M)),C.forEach(M=>El(M)))}function Un(p,g,S){var C,M;let{flushSync:A}=S===void 0?{}:S,H=y.actionData!=null&&y.navigation.formMethod!=null&&pt(y.navigation.formMethod)&&y.navigation.state==="loading"&&((C=p.state)==null?void 0:C._isRedirect)!==!0,N;g.actionData?Object.keys(g.actionData).length>0?N=g.actionData:N=null:H?N=y.actionData:N=null;let V=g.loaderData?fc(y.loaderData,g.loaderData,g.matches||[],g.errors):y.loaderData,U=y.blockers;U.size>0&&(U=new Map(U),U.forEach((q,oe)=>U.set(oe,Mr)));let $=O===!0||y.navigation.formMethod!=null&&pt(y.navigation.formMethod)&&((M=p.state)==null?void 0:M._isRedirect)!==!0;a&&(i=a,a=void 0),gt||B===Se.Pop||(B===Se.Push?e.history.push(p,p.state):B===Se.Replace&&e.history.replace(p,p.state));let Z;if(B===Se.Pop){let q=ge.get(y.location.pathname);q&&q.has(p.pathname)?Z={currentLocation:y.location,nextLocation:p}:ge.has(p.pathname)&&(Z={currentLocation:p,nextLocation:y.location})}else if(te){let q=ge.get(y.location.pathname);q?q.add(p.pathname):(q=new Set([p.pathname]),ge.set(y.location.pathname,q)),Z={currentLocation:y.location,nextLocation:p}}Oe(se({},g,{actionData:N,loaderData:V,historyAction:B,location:p,initialized:!0,navigation:Ni,revalidation:"idle",restoreScrollPosition:Hu(p,g.matches||y.matches),preventScrollReset:$,blockers:U}),{viewTransitionOpts:Z,flushSync:A===!0}),B=Se.Pop,O=!1,te=!1,gt=!1,st=!1,At=[]}async function zu(p,g){if(typeof p=="number"){e.history.go(p);return}let S=ka(y.location,y.matches,u,f.v7_prependBasename,p,f.v7_relativeSplatPath,g==null?void 0:g.fromRouteId,g==null?void 0:g.relative),{path:C,submission:M,error:A}=oc(f.v7_normalizeFormMethod,!1,S,g),H=y.location,N=dl(y.location,C,g&&g.state);N=se({},N,e.history.encodeLocation(N));let V=g&&g.replace!=null?g.replace:void 0,U=Se.Push;V===!0?U=Se.Replace:V===!1||M!=null&&pt(M.formMethod)&&M.formAction===y.location.pathname+y.location.search&&(U=Se.Replace);let $=g&&"preventScrollReset"in g?g.preventScrollReset===!0:void 0,Z=(g&&g.unstable_flushSync)===!0,q=Bu({currentLocation:H,nextLocation:N,historyAction:U});if(q){kl(q,{state:"blocked",location:N,proceed(){kl(q,{state:"proceeding",proceed:void 0,reset:void 0,location:N}),zu(p,g)},reset(){let oe=new Map(y.blockers);oe.set(q,Mr),Oe({blockers:oe})}});return}return await vn(U,N,{submission:M,pendingError:A,preventScrollReset:$,replace:g&&g.replace,enableViewTransition:g&&g.unstable_viewTransition,flushSync:Z})}function dp(){if(bo(),Oe({revalidation:"loading"}),y.navigation.state!=="submitting"){if(y.navigation.state==="idle"){vn(y.historyAction,y.location,{startUninterruptedRevalidation:!0});return}vn(B||y.historyAction,y.navigation.location,{overrideNavigation:y.navigation,enableViewTransition:te===!0})}}async function vn(p,g,S){Q&&Q.abort(),Q=null,B=p,gt=(S&&S.startUninterruptedRevalidation)===!0,Ep(y.location,y.matches),O=(S&&S.preventScrollReset)===!0,te=(S&&S.enableViewTransition)===!0;let C=a||i,M=S&&S.overrideNavigation,A=Sn(C,g,u),H=(S&&S.flushSync)===!0,N=Pl(A,C,g.pathname);if(N.active&&N.matches&&(A=N.matches),!A){let{error:G,notFoundMatches:Ce,route:we}=ei(g.pathname);Un(g,{matches:Ce,loaderData:{},errors:{[we.id]:G}},{flushSync:H});return}if(y.initialized&&!st&&Hv(y.location,g)&&!(S&&S.submission&&pt(S.submission.formMethod))){Un(g,{matches:A},{flushSync:H});return}Q=new AbortController;let V=Bn(e.history,g,Q.signal,S&&S.submission),U;if(S&&S.pendingError)U=[er(A).route.id,{type:ee.error,error:S.pendingError}];else if(S&&S.submission&&pt(S.submission.formMethod)){let G=await pp(V,g,S.submission,A,N.active,{replace:S.replace,flushSync:H});if(G.shortCircuited)return;if(G.pendingActionResult){let[Ce,we]=G.pendingActionResult;if(Je(we)&&Zo(we.error)&&we.error.status===404){Q=null,Un(g,{matches:G.matches,loaderData:{},errors:{[Ce]:we.error}});return}}A=G.matches||A,U=G.pendingActionResult,M=Ti(g,S.submission),H=!1,N.active=!1,V=Bn(e.history,V.url,V.signal)}let{shortCircuited:$,matches:Z,loaderData:q,errors:oe}=await hp(V,g,A,N.active,M,S&&S.submission,S&&S.fetcherSubmission,S&&S.replace,S&&S.initialHydration===!0,H,U);$||(Q=null,Un(g,se({matches:Z||A},dc(U),{loaderData:q,errors:oe})))}async function pp(p,g,S,C,M,A){A===void 0&&(A={}),bo();let H=Jv(g,S);if(Oe({navigation:H},{flushSync:A.flushSync===!0}),M){let U=await _l(C,g.pathname,p.signal);if(U.type==="aborted")return{shortCircuited:!0};if(U.type==="error"){let{boundaryId:$,error:Z}=Cl(g.pathname,U);return{matches:U.partialMatches,pendingActionResult:[$,{type:ee.error,error:Z}]}}else if(U.matches)C=U.matches;else{let{notFoundMatches:$,error:Z,route:q}=ei(g.pathname);return{matches:$,pendingActionResult:[q.id,{type:ee.error,error:Z}]}}}let N,V=$r(C,g);if(!V.route.action&&!V.route.lazy)N={type:ee.error,error:Fe(405,{method:p.method,pathname:g.pathname,routeId:V.route.id})};else if(N=(await Er("action",y,p,[V],C,null))[V.route.id],p.signal.aborted)return{shortCircuited:!0};if(Cn(N)){let U;return A&&A.replace!=null?U=A.replace:U=uc(N.response.headers.get("Location"),new URL(p.url),u)===y.location.pathname+y.location.search,await yn(p,N,!0,{submission:S,replace:U}),{shortCircuited:!0}}if(qt(N))throw Fe(400,{type:"defer-action"});if(Je(N)){let U=er(C,V.route.id);return(A&&A.replace)!==!0&&(B=Se.Push),{matches:C,pendingActionResult:[U.route.id,N]}}return{matches:C,pendingActionResult:[V.route.id,N]}}async function hp(p,g,S,C,M,A,H,N,V,U,$){let Z=M||Ti(g,A),q=A||H||mc(Z),oe=!gt&&(!f.v7_partialHydration||!V);if(C){if(oe){let he=ju($);Oe(se({navigation:Z},he!==void 0?{actionData:he}:{}),{flushSync:U})}let K=await _l(S,g.pathname,p.signal);if(K.type==="aborted")return{shortCircuited:!0};if(K.type==="error"){let{boundaryId:he,error:Xe}=Cl(g.pathname,K);return{matches:K.partialMatches,loaderData:{},errors:{[he]:Xe}}}else if(K.matches)S=K.matches;else{let{error:he,notFoundMatches:Xe,route:me}=ei(g.pathname);return{matches:Xe,loaderData:{},errors:{[me.id]:he}}}}let G=a||i,[Ce,we]=ic(e.history,y,S,q,g,f.v7_partialHydration&&V===!0,f.v7_skipActionErrorRevalidation,st,At,D,Re,Ve,Be,G,u,$);if(ti(K=>!(S&&S.some(he=>he.route.id===K))||Ce&&Ce.some(he=>he.route.id===K)),ne=++W,Ce.length===0&&we.length===0){let K=Uu();return Un(g,se({matches:S,loaderData:{},errors:$&&Je($[1])?{[$[0]]:$[1].error}:null},dc($),K?{fetchers:new Map(y.fetchers)}:{}),{flushSync:U}),{shortCircuited:!0}}if(oe){let K={};if(!C){K.navigation=Z;let he=ju($);he!==void 0&&(K.actionData=he)}we.length>0&&(K.fetchers=mp(we)),Oe(K,{flushSync:U})}we.forEach(K=>{I.has(K.key)&&Vt(K.key),K.controller&&I.set(K.key,K.controller)});let kr=()=>we.forEach(K=>Vt(K.key));Q&&Q.signal.addEventListener("abort",kr);let{loaderResults:_t,fetcherResults:$n}=await Ou(y,S,Ce,we,p);if(p.signal.aborted)return{shortCircuited:!0};Q&&Q.signal.removeEventListener("abort",kr),we.forEach(K=>I.delete(K.key));let Ht=Xl(_t);if(Ht)return await yn(p,Ht.result,!0,{replace:N}),{shortCircuited:!0};if(Ht=Xl($n),Ht)return Be.add(Ht.key),await yn(p,Ht.result,!0,{replace:N}),{shortCircuited:!0};let{loaderData:Rl,errors:Rt}=cc(y,S,Ce,_t,$,we,$n,nt);nt.forEach((K,he)=>{K.subscribe(Xe=>{(Xe||K.done)&&nt.delete(he)})}),f.v7_partialHydration&&V&&y.errors&&Object.entries(y.errors).filter(K=>{let[he]=K;return!Ce.some(Xe=>Xe.route.id===he)}).forEach(K=>{let[he,Xe]=K;Rt=Object.assign(Rt||{},{[he]:Xe})});let Ll=Uu(),Nl=$u(ne),Tl=Ll||Nl||we.length>0;return se({matches:S,loaderData:Rl,errors:Rt},Tl?{fetchers:new Map(y.fetchers)}:{})}function ju(p){if(p&&!Je(p[1]))return{[p[0]]:p[1].data};if(y.actionData)return Object.keys(y.actionData).length===0?null:y.actionData}function mp(p){return p.forEach(g=>{let S=y.fetchers.get(g.key),C=zr(void 0,S?S.data:void 0);y.fetchers.set(g.key,C)}),new Map(y.fetchers)}function vp(p,g,S,C){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.");I.has(p)&&Vt(p);let M=(C&&C.unstable_flushSync)===!0,A=a||i,H=ka(y.location,y.matches,u,f.v7_prependBasename,S,f.v7_relativeSplatPath,g,C==null?void 0:C.relative),N=Sn(A,H,u),V=Pl(N,A,H);if(V.active&&V.matches&&(N=V.matches),!N){Pt(p,g,Fe(404,{pathname:H}),{flushSync:M});return}let{path:U,submission:$,error:Z}=oc(f.v7_normalizeFormMethod,!0,H,C);if(Z){Pt(p,g,Z,{flushSync:M});return}let q=$r(N,U);if(O=(C&&C.preventScrollReset)===!0,$&&pt($.formMethod)){yp(p,g,U,q,N,V.active,M,$);return}Ve.set(p,{routeId:g,path:U}),gp(p,g,U,q,N,V.active,M,$)}async function yp(p,g,S,C,M,A,H,N){bo(),Ve.delete(p);function V(me){if(!me.route.action&&!me.route.lazy){let Lt=Fe(405,{method:N.formMethod,pathname:S,routeId:g});return Pt(p,g,Lt,{flushSync:H}),!0}return!1}if(!A&&V(C))return;let U=y.fetchers.get(p);Bt(p,Zv(N,U),{flushSync:H});let $=new AbortController,Z=Bn(e.history,S,$.signal,N);if(A){let me=await _l(M,S,Z.signal);if(me.type==="aborted")return;if(me.type==="error"){let{error:Lt}=Cl(S,me);Pt(p,g,Lt,{flushSync:H});return}else if(me.matches){if(M=me.matches,C=$r(M,S),V(C))return}else{Pt(p,g,Fe(404,{pathname:S}),{flushSync:H});return}}I.set(p,$);let q=W,G=(await Er("action",y,Z,[C],M,p))[C.route.id];if(Z.signal.aborted){I.get(p)===$&&I.delete(p);return}if(f.v7_fetcherPersist&&Re.has(p)){if(Cn(G)||Je(G)){Bt(p,Qt(void 0));return}}else{if(Cn(G))if(I.delete(p),ne>q){Bt(p,Qt(void 0));return}else return Be.add(p),Bt(p,zr(N)),yn(Z,G,!1,{fetcherSubmission:N});if(Je(G)){Pt(p,g,G.error);return}}if(qt(G))throw Fe(400,{type:"defer-action"});let Ce=y.navigation.location||y.location,we=Bn(e.history,Ce,$.signal),kr=a||i,_t=y.navigation.state!=="idle"?Sn(kr,y.navigation.location,u):y.matches;Y(_t,"Didn't find any matches after fetcher action");let $n=++W;le.set(p,$n);let Ht=zr(N,G.data);y.fetchers.set(p,Ht);let[Rl,Rt]=ic(e.history,y,_t,N,Ce,!1,f.v7_skipActionErrorRevalidation,st,At,D,Re,Ve,Be,kr,u,[C.route.id,G]);Rt.filter(me=>me.key!==p).forEach(me=>{let Lt=me.key,Qu=y.fetchers.get(Lt),Pp=zr(void 0,Qu?Qu.data:void 0);y.fetchers.set(Lt,Pp),I.has(Lt)&&Vt(Lt),me.controller&&I.set(Lt,me.controller)}),Oe({fetchers:new Map(y.fetchers)});let Ll=()=>Rt.forEach(me=>Vt(me.key));$.signal.addEventListener("abort",Ll);let{loaderResults:Nl,fetcherResults:Tl}=await Ou(y,_t,Rl,Rt,we);if($.signal.aborted)return;$.signal.removeEventListener("abort",Ll),le.delete(p),I.delete(p),Rt.forEach(me=>I.delete(me.key));let K=Xl(Nl);if(K)return yn(we,K.result,!1);if(K=Xl(Tl),K)return Be.add(K.key),yn(we,K.result,!1);let{loaderData:he,errors:Xe}=cc(y,_t,Rl,Nl,void 0,Rt,Tl,nt);if(y.fetchers.has(p)){let me=Qt(G.data);y.fetchers.set(p,me)}$u($n),y.navigation.state==="loading"&&$n>ne?(Y(B,"Expected pending action"),Q&&Q.abort(),Un(y.navigation.location,{matches:_t,loaderData:he,errors:Xe,fetchers:new Map(y.fetchers)})):(Oe({errors:Xe,loaderData:fc(y.loaderData,he,_t,Xe),fetchers:new Map(y.fetchers)}),st=!1)}async function gp(p,g,S,C,M,A,H,N){let V=y.fetchers.get(p);Bt(p,zr(N,V?V.data:void 0),{flushSync:H});let U=new AbortController,$=Bn(e.history,S,U.signal);if(A){let G=await _l(M,S,$.signal);if(G.type==="aborted")return;if(G.type==="error"){let{error:Ce}=Cl(S,G);Pt(p,g,Ce,{flushSync:H});return}else if(G.matches)M=G.matches,C=$r(M,S);else{Pt(p,g,Fe(404,{pathname:S}),{flushSync:H});return}}I.set(p,U);let Z=W,oe=(await Er("loader",y,$,[C],M,p))[C.route.id];if(qt(oe)&&(oe=await Pu(oe,$.signal,!0)||oe),I.get(p)===U&&I.delete(p),!$.signal.aborted){if(Re.has(p)){Bt(p,Qt(void 0));return}if(Cn(oe))if(ne>Z){Bt(p,Qt(void 0));return}else{Be.add(p),await yn($,oe,!1);return}if(Je(oe)){Pt(p,g,oe.error);return}Y(!qt(oe),"Unhandled fetcher deferred data"),Bt(p,Qt(oe.data))}}async function yn(p,g,S,C){let{submission:M,fetcherSubmission:A,replace:H}=C===void 0?{}:C;g.response.headers.has("X-Remix-Revalidate")&&(st=!0);let N=g.response.headers.get("Location");Y(N,"Expected a Location header on the redirect Response"),N=uc(N,new URL(p.url),u);let V=dl(y.location,N,{_isRedirect:!0});if(n){let G=!1;if(g.response.headers.has("X-Remix-Reload-Document"))G=!0;else if(Cu.test(N)){const Ce=e.history.createURL(N);G=Ce.origin!==t.location.origin||wr(Ce.pathname,u)==null}if(G){H?t.location.replace(N):t.location.assign(N);return}}Q=null;let U=H===!0||g.response.headers.has("X-Remix-Replace")?Se.Replace:Se.Push,{formMethod:$,formAction:Z,formEncType:q}=y.navigation;!M&&!A&&$&&Z&&q&&(M=mc(y.navigation));let oe=M||A;if(Lv.has(g.response.status)&&oe&&pt(oe.formMethod))await vn(U,V,{submission:se({},oe,{formAction:N}),preventScrollReset:O,enableViewTransition:S?te:void 0});else{let G=Ti(V,M);await vn(U,V,{overrideNavigation:G,fetcherSubmission:A,preventScrollReset:O,enableViewTransition:S?te:void 0})}}async function Er(p,g,S,C,M,A){let H,N={};try{H=await Uv(s,p,g,S,C,M,A,o,l)}catch(V){return C.forEach(U=>{N[U.route.id]={type:ee.error,error:V}}),N}for(let[V,U]of Object.entries(H))if(Qv(U)){let $=U.result;N[V]={type:ee.redirect,response:Bv($,S,V,M,u,f.v7_relativeSplatPath)}}else N[V]=await Av(U);return N}async function Ou(p,g,S,C,M){let A=p.matches,H=Er("loader",p,M,S,g,null),N=Promise.all(C.map(async $=>{if($.matches&&$.match&&$.controller){let q=(await Er("loader",p,Bn(e.history,$.path,$.controller.signal),[$.match],$.matches,$.key))[$.match.route.id];return{[$.key]:q}}else return Promise.resolve({[$.key]:{type:ee.error,error:Fe(404,{pathname:$.path})}})})),V=await H,U=(await N).reduce(($,Z)=>Object.assign($,Z),{});return await Promise.all([Xv(g,V,M.signal,A,p.loaderData),Gv(g,U,C)]),{loaderResults:V,fetcherResults:U}}function bo(){st=!0,At.push(...ti()),Ve.forEach((p,g)=>{I.has(g)&&(D.add(g),Vt(g))})}function Bt(p,g,S){S===void 0&&(S={}),y.fetchers.set(p,g),Oe({fetchers:new Map(y.fetchers)},{flushSync:(S&&S.flushSync)===!0})}function Pt(p,g,S,C){C===void 0&&(C={});let M=er(y.matches,g);El(p),Oe({errors:{[M.route.id]:S},fetchers:new Map(y.fetchers)},{flushSync:(C&&C.flushSync)===!0})}function Fu(p){return f.v7_fetcherPersist&&(Ct.set(p,(Ct.get(p)||0)+1),Re.has(p)&&Re.delete(p)),y.fetchers.get(p)||Nv}function El(p){let g=y.fetchers.get(p);I.has(p)&&!(g&&g.state==="loading"&&le.has(p))&&Vt(p),Ve.delete(p),le.delete(p),Be.delete(p),Re.delete(p),D.delete(p),y.fetchers.delete(p)}function wp(p){if(f.v7_fetcherPersist){let g=(Ct.get(p)||0)-1;g<=0?(Ct.delete(p),Re.add(p)):Ct.set(p,g)}else El(p);Oe({fetchers:new Map(y.fetchers)})}function Vt(p){let g=I.get(p);Y(g,"Expected fetch controller: "+p),g.abort(),I.delete(p)}function Iu(p){for(let g of p){let S=Fu(g),C=Qt(S.data);y.fetchers.set(g,C)}}function Uu(){let p=[],g=!1;for(let S of Be){let C=y.fetchers.get(S);Y(C,"Expected fetcher: "+S),C.state==="loading"&&(Be.delete(S),p.push(S),g=!0)}return Iu(p),g}function $u(p){let g=[];for(let[S,C]of le)if(C0}function Sp(p,g){let S=y.blockers.get(p)||Mr;return mn.get(p)!==g&&mn.set(p,g),S}function Au(p){y.blockers.delete(p),mn.delete(p)}function kl(p,g){let S=y.blockers.get(p)||Mr;Y(S.state==="unblocked"&&g.state==="blocked"||S.state==="blocked"&&g.state==="blocked"||S.state==="blocked"&&g.state==="proceeding"||S.state==="blocked"&&g.state==="unblocked"||S.state==="proceeding"&&g.state==="unblocked","Invalid blocker state transition: "+S.state+" -> "+g.state);let C=new Map(y.blockers);C.set(p,g),Oe({blockers:C})}function Bu(p){let{currentLocation:g,nextLocation:S,historyAction:C}=p;if(mn.size===0)return;mn.size>1&&hr(!1,"A router only supports one blocker at a time");let M=Array.from(mn.entries()),[A,H]=M[M.length-1],N=y.blockers.get(A);if(!(N&&N.state==="proceeding")&&H({currentLocation:g,nextLocation:S,historyAction:C}))return A}function ei(p){let g=Fe(404,{pathname:p}),S=a||i,{matches:C,route:M}=pc(S);return ti(),{notFoundMatches:C,route:M,error:g}}function Cl(p,g){return{boundaryId:er(g.partialMatches).route.id,error:Fe(400,{type:"route-discovery",pathname:p,message:g.error!=null&&"message"in g.error?g.error:String(g.error)})}}function ti(p){let g=[];return nt.forEach((S,C)=>{(!p||p(C))&&(S.cancel(),g.push(C),nt.delete(C))}),g}function xp(p,g,S){if(L=p,c=g,h=S||null,!v&&y.navigation===Ni){v=!0;let C=Hu(y.location,y.matches);C!=null&&Oe({restoreScrollPosition:C})}return()=>{L=null,c=null,h=null}}function Vu(p,g){return h&&h(p,g.map(C=>iv(C,y.loaderData)))||p.key}function Ep(p,g){if(L&&c){let S=Vu(p,g);L[S]=c()}}function Hu(p,g){if(L){let S=Vu(p,g),C=L[S];if(typeof C=="number")return C}return null}function Pl(p,g,S){if(d){if(x.has(S))return{active:!1,matches:p};if(p){if(Object.keys(p[0].params).length>0)return{active:!0,matches:ao(g,S,u,!0)}}else return{active:!0,matches:ao(g,S,u,!0)||[]}}return{active:!1,matches:null}}async function _l(p,g,S){let C=p;for(;;){let M=a==null,A=a||i;try{await Ov(d,g,C,A,o,l,up,S)}catch(V){return{type:"error",error:V,partialMatches:C}}finally{M&&(i=[...i])}if(S.aborted)return{type:"aborted"};let H=Sn(A,g,u);if(H)return Wu(g,x),{type:"success",matches:H};let N=ao(A,g,u,!0);if(!N||C.length===N.length&&C.every((V,U)=>V.route.id===N[U].route.id))return Wu(g,x),{type:"success",matches:null};C=N}}function Wu(p,g){if(g.size>=k){let S=g.values().next().value;g.delete(S)}g.add(p)}function kp(p){o={},a=pl(p,l,void 0,o)}function Cp(p,g){let S=a==null;Qd(p,g,a||i,o,l),S&&(i=[...i],Oe({}))}return j={get basename(){return u},get future(){return f},get state(){return y},get routes(){return i},get window(){return t},initialize:sp,subscribe:fp,enableScrollRestoration:xp,navigate:zu,fetch:vp,revalidate:dp,createHref:p=>e.history.createHref(p),encodeLocation:p=>e.history.encodeLocation(p),getFetcher:Fu,deleteFetcher:wp,dispose:cp,getBlocker:Sp,deleteBlocker:Au,patchRoutes:Cp,_internalFetchControllers:I,_internalActiveDeferreds:nt,_internalSetRoutes:kp},j}function Mv(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,a){let u,s;if(i){u=[];for(let f of t)if(u.push(f),f.route.id===i){s=f;break}}else u=t,s=t[t.length-1];let d=ku(l||".",Eu(u,o),wr(e.pathname,n)||e.pathname,a==="path");return l==null&&(d.search=e.search,d.hash=e.hash),(l==null||l===""||l===".")&&s&&s.route.index&&!_u(d.search)&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(d.pathname=d.pathname==="/"?n:jt([n,d.pathname])),Mn(d)}function oc(e,t,n,r){if(!r||!Mv(r))return{path:n};if(r.formMethod&&!Yv(r.formMethod))return{path:n,error:Fe(405,{method:r.formMethod})};let l=()=>({path:n,error:Fe(400,{type:"invalid-body"})}),o=r.formMethod||"get",i=e?o.toUpperCase():o.toLowerCase(),a=Kd(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!pt(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((w,k)=>{let[x,L]=k;return""+w+x+"="+L+` +`},""):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(!pt(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()}}}Y(typeof FormData=="function","FormData is not available in this environment");let u,s;if(r.formData)u=Ca(r.formData),s=r.formData;else if(r.body instanceof FormData)u=Ca(r.body),s=r.body;else if(r.body instanceof URLSearchParams)u=r.body,s=sc(u);else if(r.body==null)u=new URLSearchParams,s=new FormData;else try{u=new URLSearchParams(r.body),s=sc(u)}catch{return l()}let d={formMethod:i,formAction:a,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:s,json:void 0,text:void 0};if(pt(d.formMethod))return{path:n,submission:d};let f=pn(n);return t&&f.search&&_u(f.search)&&u.append("index",""),f.search="?"+u,{path:Mn(f),submission:d}}function zv(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 ic(e,t,n,r,l,o,i,a,u,s,d,f,m,w,k,x){let L=x?Je(x[1])?x[1].error:x[1].data:void 0,h=e.createURL(t.location),c=e.createURL(l),v=x&&Je(x[1])?x[0]:void 0,E=v?zv(n,v):n,R=x?x[1].statusCode:void 0,T=i&&R&&R>=400,j=E.filter((B,O)=>{let{route:Q}=B;if(Q.lazy)return!0;if(Q.loader==null)return!1;if(o)return typeof Q.loader!="function"||Q.loader.hydrate?!0:t.loaderData[Q.id]===void 0&&(!t.errors||t.errors[Q.id]===void 0);if(jv(t.loaderData,t.matches[O],B)||u.some(pe=>pe===B.route.id))return!0;let te=t.matches[O],ge=B;return ac(B,se({currentUrl:h,currentParams:te.params,nextUrl:c,nextParams:ge.params},r,{actionResult:L,actionStatus:R,defaultShouldRevalidate:T?!1:a||h.pathname+h.search===c.pathname+c.search||h.search!==c.search||Wd(te,ge)}))}),y=[];return f.forEach((B,O)=>{if(o||!n.some(gt=>gt.route.id===B.routeId)||d.has(O))return;let Q=Sn(w,B.path,k);if(!Q){y.push({key:O,routeId:B.routeId,path:B.path,matches:null,match:null,controller:null});return}let te=t.fetchers.get(O),ge=$r(Q,B.path),pe=!1;m.has(O)?pe=!1:s.has(O)?(s.delete(O),pe=!0):te&&te.state!=="idle"&&te.data===void 0?pe=a:pe=ac(ge,se({currentUrl:h,currentParams:t.matches[t.matches.length-1].params,nextUrl:c,nextParams:n[n.length-1].params},r,{actionResult:L,actionStatus:R,defaultShouldRevalidate:T?!1:a})),pe&&y.push({key:O,routeId:B.routeId,path:B.path,matches:Q,match:ge,controller:new AbortController})}),[j,y]}function jv(e,t,n){let r=!t||n.route.id!==t.route.id,l=e[n.route.id]===void 0;return r||l}function Wd(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function ac(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function Ov(e,t,n,r,l,o,i,a){let u=[t,...n.map(s=>s.route.id)].join("-");try{let s=i.get(u);s||(s=e({path:t,matches:n,patch:(d,f)=>{a.aborted||Qd(d,f,r,l,o)}}),i.set(u,s)),s&&Wv(s)&&await s}finally{i.delete(u)}}function Qd(e,t,n,r,l){if(e){var o;let i=r[e];Y(i,"No route found to patch children into: routeId = "+e);let a=pl(t,l,[e,"patch",String(((o=i.children)==null?void 0:o.length)||"0")],r);i.children?i.children.push(...a):i.children=a}else{let i=pl(t,l,["patch",String(n.length||"0")],r);n.push(...i)}}async function Fv(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let l=n[e.id];Y(l,"No route found in manifest");let o={};for(let i in r){let u=l[i]!==void 0&&i!=="hasErrorBoundary";hr(!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&&!lv.has(i)&&(o[i]=r[i])}Object.assign(l,o),Object.assign(l,se({},t(l),{lazy:void 0}))}async function Iv(e){let{matches:t}=e,n=t.filter(l=>l.shouldLoad);return(await Promise.all(n.map(l=>l.resolve()))).reduce((l,o,i)=>Object.assign(l,{[n[i].route.id]:o}),{})}async function Uv(e,t,n,r,l,o,i,a,u,s){let d=o.map(w=>w.route.lazy?Fv(w.route,u,a):void 0),f=o.map((w,k)=>{let x=d[k],L=l.some(c=>c.route.id===w.route.id);return se({},w,{shouldLoad:L,resolve:async c=>(c&&r.method==="GET"&&(w.route.lazy||w.route.loader)&&(L=!0),L?$v(t,r,w,x,c,s):Promise.resolve({type:ee.data,result:void 0}))})}),m=await e({matches:f,request:r,params:o[0].params,fetcherKey:i,context:s});try{await Promise.all(d)}catch{}return m}async function $v(e,t,n,r,l,o){let i,a,u=s=>{let d,f=new Promise((k,x)=>d=x);a=()=>d(),t.signal.addEventListener("abort",a);let m=k=>typeof s!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):s({request:t,params:n.params,context:o},...k!==void 0?[k]:[]),w=(async()=>{try{return{type:"data",result:await(l?l(x=>m(x)):m())}}catch(k){return{type:"error",result:k}}})();return Promise.race([w,f])};try{let s=n.route[e];if(r)if(s){let d,[f]=await Promise.all([u(s).catch(m=>{d=m}),r]);if(d!==void 0)throw d;i=f}else if(await r,s=n.route[e],s)i=await u(s);else if(e==="action"){let d=new URL(t.url),f=d.pathname+d.search;throw Fe(405,{method:t.method,pathname:f,routeId:n.route.id})}else return{type:ee.data,result:void 0};else if(s)i=await u(s);else{let d=new URL(t.url),f=d.pathname+d.search;throw Fe(404,{pathname:f})}Y(i.result!==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(s){return{type:ee.error,result:s}}finally{a&&t.signal.removeEventListener("abort",a)}return i}async function Av(e){let{result:t,type:n}=e;if(Yd(t)){let s;try{let d=t.headers.get("Content-Type");d&&/\bapplication\/json\b/.test(d)?t.body==null?s=null:s=await t.json():s=await t.text()}catch(d){return{type:ee.error,error:d}}return n===ee.error?{type:ee.error,error:new zo(t.status,t.statusText,s),statusCode:t.status,headers:t.headers}:{type:ee.data,data:s,statusCode:t.status,headers:t.headers}}if(n===ee.error){if(hc(t)){var r;if(t.data instanceof Error){var l;return{type:ee.error,error:t.data,statusCode:(l=t.init)==null?void 0:l.status}}t=new zo(((r=t.init)==null?void 0:r.status)||500,void 0,t.data)}return{type:ee.error,error:t,statusCode:Zo(t)?t.status:void 0}}if(Kv(t)){var o,i;return{type:ee.deferred,deferredData:t,statusCode:(o=t.init)==null?void 0:o.status,headers:((i=t.init)==null?void 0:i.headers)&&new Headers(t.init.headers)}}if(hc(t)){var a,u;return{type:ee.data,data:t.data,statusCode:(a=t.init)==null?void 0:a.status,headers:(u=t.init)!=null&&u.headers?new Headers(t.init.headers):void 0}}return{type:ee.data,data:t}}function Bv(e,t,n,r,l,o){let i=e.headers.get("Location");if(Y(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!Cu.test(i)){let a=r.slice(0,r.findIndex(u=>u.route.id===n)+1);i=ka(new URL(t.url),a,l,!0,i,o),e.headers.set("Location",i)}return e}function uc(e,t,n){if(Cu.test(e)){let r=e,l=r.startsWith("//")?new URL(t.protocol+r):new URL(r),o=wr(l.pathname,n)!=null;if(l.origin===t.origin&&o)return l.pathname+l.search+l.hash}return e}function Bn(e,t,n,r){let l=e.createURL(Kd(t)).toString(),o={signal:n};if(r&&pt(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=Ca(r.formData):o.body=r.formData}return new Request(l,o)}function Ca(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function sc(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function Vv(e,t,n,r,l){let o={},i=null,a,u=!1,s={},d=n&&Je(n[1])?n[1].error:void 0;return e.forEach(f=>{if(!(f.route.id in t))return;let m=f.route.id,w=t[m];if(Y(!Cn(w),"Cannot handle redirect results in processLoaderData"),Je(w)){let k=w.error;d!==void 0&&(k=d,d=void 0),i=i||{};{let x=er(e,m);i[x.route.id]==null&&(i[x.route.id]=k)}o[m]=void 0,u||(u=!0,a=Zo(w.error)?w.error.status:500),w.headers&&(s[m]=w.headers)}else qt(w)?(r.set(m,w.deferredData),o[m]=w.deferredData.data,w.statusCode!=null&&w.statusCode!==200&&!u&&(a=w.statusCode),w.headers&&(s[m]=w.headers)):(o[m]=w.data,w.statusCode&&w.statusCode!==200&&!u&&(a=w.statusCode),w.headers&&(s[m]=w.headers))}),d!==void 0&&n&&(i={[n[0]]:d},o[n[0]]=void 0),{loaderData:o,errors:i,statusCode:a||200,loaderHeaders:s}}function cc(e,t,n,r,l,o,i,a){let{loaderData:u,errors:s}=Vv(t,r,l,a);return o.forEach(d=>{let{key:f,match:m,controller:w}=d,k=i[f];if(Y(k,"Did not find corresponding fetcher result"),!(w&&w.signal.aborted))if(Je(k)){let x=er(e.matches,m==null?void 0:m.route.id);s&&s[x.route.id]||(s=se({},s,{[x.route.id]:k.error})),e.fetchers.delete(f)}else if(Cn(k))Y(!1,"Unhandled fetcher revalidation redirect");else if(qt(k))Y(!1,"Unhandled fetcher deferred data");else{let x=Qt(k.data);e.fetchers.set(f,x)}}),{loaderData:u,errors:s}}function fc(e,t,n,r){let l=se({},t);for(let o of n){let i=o.route.id;if(t.hasOwnProperty(i)?t[i]!==void 0&&(l[i]=t[i]):e[i]!==void 0&&o.route.loader&&(l[i]=e[i]),r&&r.hasOwnProperty(i))break}return l}function dc(e){return e?Je(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function er(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function pc(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 Fe(e,t){let{pathname:n,routeId:r,method:l,type:o,message:i}=t===void 0?{}:t,a="Unknown Server Error",u="Unknown @remix-run/router error";return e===400?(a="Bad Request",o==="route-discovery"?u='Unable to match URL "'+n+'" - the `unstable_patchRoutesOnNavigation()` '+(`function threw the following error: +`+i):l&&n&&r?u="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"?u="defer() is not supported in actions":o==="invalid-body"&&(u="Unable to encode submission body")):e===403?(a="Forbidden",u='Route "'+r+'" does not match URL "'+n+'"'):e===404?(a="Not Found",u='No route matches URL "'+n+'"'):e===405&&(a="Method Not Allowed",l&&n&&r?u="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&&(u='Invalid request method "'+l.toUpperCase()+'"')),new zo(e||500,a,new Error(u),!0)}function Xl(e){let t=Object.entries(e);for(let n=t.length-1;n>=0;n--){let[r,l]=t[n];if(Cn(l))return{key:r,result:l}}}function Kd(e){let t=typeof e=="string"?pn(e):e;return Mn(se({},t,{hash:""}))}function Hv(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Wv(e){return typeof e=="object"&&e!=null&&"then"in e}function Qv(e){return Yd(e.result)&&Rv.has(e.result.status)}function qt(e){return e.type===ee.deferred}function Je(e){return e.type===ee.error}function Cn(e){return(e&&e.type)===ee.redirect}function hc(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Kv(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 Yd(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Yv(e){return _v.has(e.toLowerCase())}function pt(e){return Cv.has(e.toLowerCase())}async function Xv(e,t,n,r,l){let o=Object.entries(t);for(let i=0;i(m==null?void 0:m.route.id)===a);if(!s)continue;let d=r.find(m=>m.route.id===s.route.id),f=d!=null&&!Wd(d,s)&&(l&&l[s.route.id])!==void 0;qt(u)&&f&&await Pu(u,n,!1).then(m=>{m&&(t[a]=m)})}}async function Gv(e,t,n){for(let r=0;r(s==null?void 0:s.route.id)===o)&&qt(a)&&(Y(i,"Expected an AbortController for revalidating fetcher deferred result"),await Pu(a,i.signal,!0).then(s=>{s&&(t[l]=s)}))}}async function Pu(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:ee.data,data:e.deferredData.unwrappedData}}catch(l){return{type:ee.error,error:l}}return{type:ee.data,data:e.deferredData.data}}}function _u(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function $r(e,t){let n=typeof t=="string"?pn(t).search:t.search;if(e[e.length-1].route.index&&_u(n||""))return e[e.length-1];let r=Bd(e);return r[r.length-1]}function mc(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 Ti(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 Jv(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 Zv(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 Qt(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 qv(e,t){try{let n=e.sessionStorage.getItem(Hd);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 bv(e,t){if(t.size>0){let n={};for(let[r,l]of t)n[r]=[...l];try{e.sessionStorage.setItem(Hd,JSON.stringify(n))}catch(r){hr(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/** * React Router v6.26.2 * * Copyright (c) Remix Software Inc. @@ -57,7 +57,7 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function jo(){return jo=Object.assign?Object.assign.bind():function(e){for(var t=1;t{a.current=!0}),P.useCallback(function(s,d){if(d===void 0&&(d={}),!a.current)return;if(typeof s=="number"){r.go(s);return}let f=ku(s,JSON.parse(i),o,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:jt([t,f.pathname])),(d.replace?r.replace:r.push)(f,d.state,d)},[t,r,i,o,e])}const ny=P.createContext(null);function ry(e){let t=P.useContext(hn).outlet;return t&&P.createElement(ny.Provider,{value:e},t)}function Zd(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=P.useContext(On),{matches:l}=P.useContext(hn),{pathname:o}=wr(),i=JSON.stringify(Eu(l,r.v7_relativeSplatPath));return P.useMemo(()=>ku(e,JSON.parse(i),o,n==="path"),[e,i,o,n])}function ly(e,t,n,r){Sl()||Y(!1);let{navigator:l}=P.useContext(On),{matches:o}=P.useContext(hn),i=o[o.length-1],a=i?i.params:{};i&&i.pathname;let u=i?i.pathnameBase:"/";i&&i.route;let s=wr(),d;d=s;let f=d.pathname||"/",m=f;if(u!=="/"){let x=u.replace(/^\//,"").split("/");m="/"+f.replace(/^\//,"").split("/").slice(x.length).join("/")}let w=Sn(e,{pathname:m});return sy(w&&w.map(x=>Object.assign({},x,{params:Object.assign({},a,x.params),pathname:jt([u,l.encodeLocation?l.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?u:jt([u,l.encodeLocation?l.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),o,n,r)}function oy(){let e=dy(),t=Zo(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)"};return P.createElement(P.Fragment,null,P.createElement("h2",null,"Unexpected Application Error!"),P.createElement("h3",{style:{fontStyle:"italic"}},t),n?P.createElement("pre",{style:l},n):null,null)}const iy=P.createElement(oy,null);class ay extends P.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?P.createElement(hn.Provider,{value:this.props.routeContext},P.createElement(Gd.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function uy(e){let{routeContext:t,match:n,children:r}=e,l=P.useContext(qo);return l&&l.static&&l.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=n.route.id),P.createElement(hn.Provider,{value:t},r)}function sy(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(!n)return null;if(n.errors)e=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let i=e,a=(l=n)==null?void 0:l.errors;if(a!=null){let d=i.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);d>=0||Y(!1),i=i.slice(0,Math.min(i.length,d+1))}let u=!1,s=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d=0?i=i.slice(0,s+1):i=[i[0]];break}}}return i.reduceRight((d,f,m)=>{let w,k=!1,x=null,L=null;n&&(w=a&&f.route.id?a[f.route.id]:void 0,x=f.route.errorElement||iy,u&&(s<0&&m===0?(hy("route-fallback"),k=!0,L=null):s===m&&(k=!0,L=f.route.hydrateFallbackElement||null)));let h=t.concat(i.slice(0,m+1)),c=()=>{let v;return w?v=x:k?v=L:f.route.Component?v=P.createElement(f.route.Component,null):f.route.element?v=f.route.element:v=d,P.createElement(uy,{match:f,routeContext:{outlet:d,matches:h,isDataRoute:n!=null},children:v})};return n&&(f.route.ErrorBoundary||f.route.errorElement||m===0)?P.createElement(ay,{location:n.location,revalidation:n.revalidation,component:x,error:w,children:c(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):c()},null)}var qd=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(qd||{}),hr=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}(hr||{});function cy(e){let t=P.useContext(qo);return t||Y(!1),t}function bd(e){let t=P.useContext(Xd);return t||Y(!1),t}function fy(e){let t=P.useContext(hn);return t||Y(!1),t}function Nu(e){let t=fy(),n=t.matches[t.matches.length-1];return n.route.id||Y(!1),n.route.id}function Sr(){let e=bd(hr.UseLoaderData),t=Nu(hr.UseLoaderData);if(e.errors&&e.errors[t]!=null){console.error("You cannot `useLoaderData` in an errorElement (routeId: "+t+")");return}return e.loaderData[t]}function dy(){var e;let t=P.useContext(Gd),n=bd(hr.UseRouteError),r=Nu(hr.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function py(){let{router:e}=cy(qd.UseNavigateStable),t=Nu(hr.UseNavigateStable),n=P.useRef(!1);return Jd(()=>{n.current=!0}),P.useCallback(function(l,o){o===void 0&&(o={}),n.current&&(typeof l=="number"?e.navigate(l):e.navigate(l,jo({fromRouteId:t},o)))},[e,t])}const vc={};function hy(e,t,n){vc[e]||(vc[e]=!0)}function my(e){return ry(e.context)}function vy(e){let{basename:t="/",children:n=null,location:r,navigationType:l=Se.Pop,navigator:o,static:i=!1,future:a}=e;Sl()&&Y(!1);let u=t.replace(/^\/*/,"/"),s=P.useMemo(()=>({basename:u,navigator:o,static:i,future:jo({v7_relativeSplatPath:!1},a)}),[u,a,o,i]);typeof r=="string"&&(r=pn(r));let{pathname:d="/",search:f="",hash:m="",state:w=null,key:k="default"}=r,x=P.useMemo(()=>{let L=gr(d,u);return L==null?null:{location:{pathname:L,search:f,hash:m,state:w,key:k},navigationType:l}},[u,d,f,m,w,k,l]);return x==null?null:P.createElement(On.Provider,{value:s},P.createElement(Ru.Provider,{children:n,value:x}))}new Promise(()=>{});function yy(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:P.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:P.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:P.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** + */function jo(){return jo=Object.assign?Object.assign.bind():function(e){for(var t=1;t{a.current=!0}),P.useCallback(function(s,d){if(d===void 0&&(d={}),!a.current)return;if(typeof s=="number"){r.go(s);return}let f=ku(s,JSON.parse(i),o,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:jt([t,f.pathname])),(d.replace?r.replace:r.push)(f,d.state,d)},[t,r,i,o,e])}const ny=P.createContext(null);function ry(e){let t=P.useContext(hn).outlet;return t&&P.createElement(ny.Provider,{value:e},t)}function Zd(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=P.useContext(On),{matches:l}=P.useContext(hn),{pathname:o}=Fn(),i=JSON.stringify(Eu(l,r.v7_relativeSplatPath));return P.useMemo(()=>ku(e,JSON.parse(i),o,n==="path"),[e,i,o,n])}function ly(e,t,n,r){Sl()||Y(!1);let{navigator:l}=P.useContext(On),{matches:o}=P.useContext(hn),i=o[o.length-1],a=i?i.params:{};i&&i.pathname;let u=i?i.pathnameBase:"/";i&&i.route;let s=Fn(),d;d=s;let f=d.pathname||"/",m=f;if(u!=="/"){let x=u.replace(/^\//,"").split("/");m="/"+f.replace(/^\//,"").split("/").slice(x.length).join("/")}let w=Sn(e,{pathname:m});return sy(w&&w.map(x=>Object.assign({},x,{params:Object.assign({},a,x.params),pathname:jt([u,l.encodeLocation?l.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?u:jt([u,l.encodeLocation?l.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),o,n,r)}function oy(){let e=dy(),t=Zo(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)"};return P.createElement(P.Fragment,null,P.createElement("h2",null,"Unexpected Application Error!"),P.createElement("h3",{style:{fontStyle:"italic"}},t),n?P.createElement("pre",{style:l},n):null,null)}const iy=P.createElement(oy,null);class ay extends P.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?P.createElement(hn.Provider,{value:this.props.routeContext},P.createElement(Gd.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function uy(e){let{routeContext:t,match:n,children:r}=e,l=P.useContext(qo);return l&&l.static&&l.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=n.route.id),P.createElement(hn.Provider,{value:t},r)}function sy(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(!n)return null;if(n.errors)e=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let i=e,a=(l=n)==null?void 0:l.errors;if(a!=null){let d=i.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);d>=0||Y(!1),i=i.slice(0,Math.min(i.length,d+1))}let u=!1,s=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d=0?i=i.slice(0,s+1):i=[i[0]];break}}}return i.reduceRight((d,f,m)=>{let w,k=!1,x=null,L=null;n&&(w=a&&f.route.id?a[f.route.id]:void 0,x=f.route.errorElement||iy,u&&(s<0&&m===0?(hy("route-fallback"),k=!0,L=null):s===m&&(k=!0,L=f.route.hydrateFallbackElement||null)));let h=t.concat(i.slice(0,m+1)),c=()=>{let v;return w?v=x:k?v=L:f.route.Component?v=P.createElement(f.route.Component,null):f.route.element?v=f.route.element:v=d,P.createElement(uy,{match:f,routeContext:{outlet:d,matches:h,isDataRoute:n!=null},children:v})};return n&&(f.route.ErrorBoundary||f.route.errorElement||m===0)?P.createElement(ay,{location:n.location,revalidation:n.revalidation,component:x,error:w,children:c(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):c()},null)}var qd=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(qd||{}),mr=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}(mr||{});function cy(e){let t=P.useContext(qo);return t||Y(!1),t}function bd(e){let t=P.useContext(Xd);return t||Y(!1),t}function fy(e){let t=P.useContext(hn);return t||Y(!1),t}function Nu(e){let t=fy(),n=t.matches[t.matches.length-1];return n.route.id||Y(!1),n.route.id}function Sr(){let e=bd(mr.UseLoaderData),t=Nu(mr.UseLoaderData);if(e.errors&&e.errors[t]!=null){console.error("You cannot `useLoaderData` in an errorElement (routeId: "+t+")");return}return e.loaderData[t]}function dy(){var e;let t=P.useContext(Gd),n=bd(mr.UseRouteError),r=Nu(mr.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function py(){let{router:e}=cy(qd.UseNavigateStable),t=Nu(mr.UseNavigateStable),n=P.useRef(!1);return Jd(()=>{n.current=!0}),P.useCallback(function(l,o){o===void 0&&(o={}),n.current&&(typeof l=="number"?e.navigate(l):e.navigate(l,jo({fromRouteId:t},o)))},[e,t])}const vc={};function hy(e,t,n){vc[e]||(vc[e]=!0)}function my(e){return ry(e.context)}function vy(e){let{basename:t="/",children:n=null,location:r,navigationType:l=Se.Pop,navigator:o,static:i=!1,future:a}=e;Sl()&&Y(!1);let u=t.replace(/^\/*/,"/"),s=P.useMemo(()=>({basename:u,navigator:o,static:i,future:jo({v7_relativeSplatPath:!1},a)}),[u,a,o,i]);typeof r=="string"&&(r=pn(r));let{pathname:d="/",search:f="",hash:m="",state:w=null,key:k="default"}=r,x=P.useMemo(()=>{let L=wr(d,u);return L==null?null:{location:{pathname:L,search:f,hash:m,state:w,key:k},navigationType:l}},[u,d,f,m,w,k,l]);return x==null?null:P.createElement(On.Provider,{value:s},P.createElement(Ru.Provider,{children:n,value:x}))}new Promise(()=>{});function yy(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:P.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:P.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:P.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** * React Router DOM v6.26.2 * * Copyright (c) Remix Software Inc. @@ -66,4 +66,4 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function hl(){return hl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[l]=e[l]);return n}function wy(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Sy(e,t){return e.button===0&&(!t||t==="_self")&&!wy(e)}function Pa(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(l=>[n,l]):[[n,r]])},[]))}function xy(e,t){let n=Pa(e);return t&&t.forEach((r,l)=>{n.has(l)||t.getAll(l).forEach(o=>{n.append(l,o)})}),n}const Ey=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],ky="6";try{window.__reactRouterVersion=ky}catch{}function Cy(e,t){return Dv({basename:t==null?void 0:t.basename,future:hl({},t==null?void 0:t.future,{v7_prependBasename:!0}),history:tv({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||Py(),routes:e,mapRouteProperties:yy,unstable_dataStrategy:t==null?void 0:t.unstable_dataStrategy,unstable_patchRoutesOnNavigation:t==null?void 0:t.unstable_patchRoutesOnNavigation,window:t==null?void 0:t.window}).initialize()}function Py(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=hl({},t,{errors:_y(t.errors)})),t}function _y(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 zo(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 Ry=P.createContext({isTransitioning:!1}),Ly=P.createContext(new Map),Ny="startTransition",yc=Vp[Ny],Ty="flushSync",gc=ev[Ty];function Dy(e){yc?yc(e):e()}function jr(e){gc?gc(e):e()}class My{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 zy(e){let{fallbackElement:t,router:n,future:r}=e,[l,o]=P.useState(n.state),[i,a]=P.useState(),[u,s]=P.useState({isTransitioning:!1}),[d,f]=P.useState(),[m,w]=P.useState(),[k,x]=P.useState(),L=P.useRef(new Map),{v7_startTransition:h}=r||{},c=P.useCallback(y=>{h?Dy(y):y()},[h]),v=P.useCallback((y,B)=>{let{deletedFetchers:O,unstable_flushSync:Q,unstable_viewTransitionOpts:te}=B;O.forEach(pe=>L.current.delete(pe)),y.fetchers.forEach((pe,gt)=>{pe.data!==void 0&&L.current.set(gt,pe.data)});let ge=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!te||ge){Q?jr(()=>o(y)):c(()=>o(y));return}if(Q){jr(()=>{m&&(d&&d.resolve(),m.skipTransition()),s({isTransitioning:!0,flushSync:!0,currentLocation:te.currentLocation,nextLocation:te.nextLocation})});let pe=n.window.document.startViewTransition(()=>{jr(()=>o(y))});pe.finished.finally(()=>{jr(()=>{f(void 0),w(void 0),a(void 0),s({isTransitioning:!1})})}),jr(()=>w(pe));return}m?(d&&d.resolve(),m.skipTransition(),x({state:y,currentLocation:te.currentLocation,nextLocation:te.nextLocation})):(a(y),s({isTransitioning:!0,flushSync:!1,currentLocation:te.currentLocation,nextLocation:te.nextLocation}))},[n.window,m,d,L,c]);P.useLayoutEffect(()=>n.subscribe(v),[n,v]),P.useEffect(()=>{u.isTransitioning&&!u.flushSync&&f(new My)},[u]),P.useEffect(()=>{if(d&&i&&n.window){let y=i,B=d.promise,O=n.window.document.startViewTransition(async()=>{c(()=>o(y)),await B});O.finished.finally(()=>{f(void 0),w(void 0),a(void 0),s({isTransitioning:!1})}),w(O)}},[c,i,d,n.window]),P.useEffect(()=>{d&&i&&l.location.key===i.location.key&&d.resolve()},[d,m,l.location,i]),P.useEffect(()=>{!u.isTransitioning&&k&&(a(k.state),s({isTransitioning:!0,flushSync:!1,currentLocation:k.currentLocation,nextLocation:k.nextLocation}),x(void 0))},[u.isTransitioning,k]),P.useEffect(()=>{},[]);let E=P.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:y=>n.navigate(y),push:(y,B,O)=>n.navigate(y,{state:B,preventScrollReset:O==null?void 0:O.preventScrollReset}),replace:(y,B,O)=>n.navigate(y,{replace:!0,state:B,preventScrollReset:O==null?void 0:O.preventScrollReset})}),[n]),R=n.basename||"/",T=P.useMemo(()=>({router:n,navigator:E,static:!1,basename:R}),[n,E,R]),j=P.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return P.createElement(P.Fragment,null,P.createElement(qo.Provider,{value:T},P.createElement(Xd.Provider,{value:l},P.createElement(Ly.Provider,{value:L.current},P.createElement(Ry.Provider,{value:u},P.createElement(vy,{basename:R,location:l.location,navigationType:l.historyAction,navigator:E,future:j},l.initialized||n.future.v7_partialHydration?P.createElement(jy,{routes:n.routes,future:n.future,state:l}):t))))),null)}const jy=P.memo(Oy);function Oy(e){let{routes:t,future:n,state:r}=e;return ly(t,void 0,r,n)}const Fy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Iy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,_a=P.forwardRef(function(t,n){let{onClick:r,relative:l,reloadDocument:o,replace:i,state:a,target:u,to:s,preventScrollReset:d,unstable_viewTransition:f}=t,m=gy(t,Ey),{basename:w}=P.useContext(On),k,x=!1;if(typeof s=="string"&&Iy.test(s)&&(k=s,Fy))try{let v=new URL(window.location.href),E=s.startsWith("//")?new URL(v.protocol+s):new URL(s),R=gr(E.pathname,w);E.origin===v.origin&&R!=null?s=R+E.search+E.hash:x=!0}catch{}let L=ey(s,{relative:l}),h=Uy(s,{replace:i,state:a,target:u,preventScrollReset:d,relative:l,unstable_viewTransition:f});function c(v){r&&r(v),v.defaultPrevented||h(v)}return P.createElement("a",hl({},m,{href:k||L,onClick:x||o?r:c,ref:n,target:u}))});var wc;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(wc||(wc={}));var Sc;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Sc||(Sc={}));function Uy(e,t){let{target:n,replace:r,state:l,preventScrollReset:o,relative:i,unstable_viewTransition:a}=t===void 0?{}:t,u=Lu(),s=wr(),d=Zd(e,{relative:i});return P.useCallback(f=>{if(Sy(f,n)){f.preventDefault();let m=r!==void 0?r:Mn(s)===Mn(d);u(e,{replace:m,state:l,preventScrollReset:o,relative:i,unstable_viewTransition:a})}},[s,u,d,r,l,n,e,o,i,a])}function Tu(e){let t=P.useRef(Pa(e)),n=P.useRef(!1),r=wr(),l=P.useMemo(()=>xy(r.search,n.current?null:t.current),[r.search]),o=Lu(),i=P.useCallback((a,u)=>{const s=Pa(typeof a=="function"?a(l):a);n.current=!0,o("?"+s,u)},[o,l]);return[l,i]}var Du=Object.defineProperty,$y=Object.getOwnPropertyDescriptor,Ay=Object.getOwnPropertyNames,By=Object.prototype.hasOwnProperty,Vy=(e,t)=>{for(var n in t)Du(e,n,{get:t[n],enumerable:!0})},Hy=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of Ay(t))!By.call(e,l)&&l!==n&&Du(e,l,{get:()=>t[l],enumerable:!(r=$y(t,l))||r.enumerable});return e},Wy=e=>Hy(Du({},"__esModule",{value:!0}),e),ep={};Vy(ep,{getCharacter:()=>by,getCharacters:()=>qy,getEndpoints:()=>lg,getEpisode:()=>rg,getEpisodes:()=>ng,getLocation:()=>tg,getLocations:()=>eg});var xr=Wy(ep),Qy={required:"You are using an invalid argument. As an argument use an integer (Id) or an array of integers (Ids).",optional:"You are using an invalid argument. As an argument use a filter object or leave it blank."},tp=e=>typeof e=="number"&&Number.isInteger(e),Ky=e=>Array.isArray(e)&&e.every(tp),Yy=(e,t)=>{if(t&&tp(e))return`/${e}`;if(t&&Ky(e)){let n=e;return`/${n.length?n:"[0]"}`}if(!t&&typeof e=="object"&&!Array.isArray(e))return`/?${new URLSearchParams(e).toString()}`;throw new Error(Qy[t?"required":"optional"])},Xy=Yy,Gy=async e=>{let t=await fetch(`https://rickandmortyapi.com/api/${e}`);return t.ok?{data:await t.json(),status:t.status,statusMessage:t.statusText}:{data:{},status:t.status,statusMessage:t.statusText}},Jy=Gy,Zy=async({endpoint:e,options:t,isIdRequired:n=!1})=>{let r=Xy(t,n);return Jy(`${e}/${r}`)},Fn=Zy,np="character",qy=e=>Fn({endpoint:np,options:e??{}}),by=e=>Fn({endpoint:np,options:e,isIdRequired:!0}),rp="location",eg=e=>Fn({endpoint:rp,options:e??{}}),tg=e=>Fn({endpoint:rp,options:e,isIdRequired:!0}),lp="episode",ng=e=>Fn({endpoint:lp,options:e??{}}),rg=e=>Fn({endpoint:lp,options:e,isIdRequired:!0}),lg=()=>Fn({endpoint:"",options:{}});async function xc({request:e}){const t=parseInt(new URL(e.url).searchParams.get("page")??"",10)??1,n=await xr.getCharacters({page:t});if(typeof n.data>"u"||typeof n.data.info>"u")throw new Error("Failed to load characters");return{pages:n.data.info.pages,characters:n.data.results}}async function og({params:e}){return(await xr.getCharacter(parseInt(e.characterId??"",10))).data}async function ig({request:e}){const t=parseInt(new URL(e.url).searchParams.get("page")??"",10)??1,n=await xr.getLocations({page:t});if(typeof n.data>"u"||typeof n.data.info>"u")throw new Error("Failed to load locations");return{pages:n.data.info.pages,locations:n.data.results}}async function ag({params:e}){return(await xr.getLocation(parseInt(e.locationId??"",10))).data}async function ug({request:e}){const t=parseInt(new URL(e.url).searchParams.get("page")??"",10)??1,n=await xr.getEpisodes({page:t});if(typeof n.data>"u"||typeof n.data.info>"u")throw new Error("Failed to load episodes");return{pages:n.data.info.pages,episodes:n.data.results}}async function sg({params:e}){return(await xr.getEpisode(parseInt(e.episodeId??"",10))).data}const cg=({tabs:e,selectedTab:t,onSelectTab:n})=>F.jsxs("div",{className:"-mt-11",children:[F.jsxs("div",{className:"sm:hidden",children:[F.jsx("label",{htmlFor:"Tab",className:"sr-only",children:"Tab"}),F.jsx("select",{id:"Tab",className:"w-full rounded-md border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100",value:t,onChange:r=>n(r.target.value),children:e.map(r=>F.jsx("option",{value:r,children:r},r))})]}),F.jsx("div",{className:"hidden sm:block",children:F.jsx("div",{className:"border-b border-gray-300 dark:border-gray-600",children:F.jsx("nav",{className:"-mb-px flex gap-6",children:e.map(r=>F.jsx(_a,{to:`/${r.toLowerCase()}`,className:`shrink-0 border border-transparent p-3 text-sm font-medium ${r===t?"rounded-t-lg border-gray-500 border-b-white text-sky-600 dark:border-gray-400 dark:border-b-gray-800 bg-gray-200 dark:bg-gray-700":"text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"}`,children:r},r))})})})]}),fg="/rick-and-morty-explorer/android-chrome-512x512.png",dg="/rick-and-morty-explorer/StarrySpace.svg",pg=()=>F.jsxs("section",{className:"flex justify-center items-center bg-cover bg-center py-20",style:{backgroundImage:`url(${dg})`},children:[F.jsx("a",{href:"https://rickandmortyapi.com/",target:"_blank",children:F.jsx("img",{src:fg,className:"logo",alt:"Morty Logo"})}),F.jsx("h1",{className:"text-3xl font-extrabold text-white sm:text-5xl",children:"Rick and Morty Explorer"})]});function hg(e){return`${e[0].toUpperCase()}${e.slice(1)}`}function mg(e){const t=e.split("/").pop();return typeof t>"u"||t.length<2?"Characters":hg(t)}function vg(){const e=Lu(),t=wr();function n(r){e(`${r.toLowerCase()}/`)}return F.jsxs(F.Fragment,{children:[F.jsx(pg,{}),F.jsx(cg,{tabs:["Characters","Locations","Episodes"],selectedTab:mg(t.pathname),onSelectTab:n}),F.jsx("main",{children:F.jsx(my,{})}),F.jsx("footer",{children:"2024 - Implemented with Rick and Morty API"})]})}function op({character:e}){const t=e||Sr();return F.jsx("section",{className:"p-4 text-left",children:F.jsxs("div",{className:"flex gap-4 p-4 border-b border-gray-200 dark:border-gray-700",children:[F.jsx("img",{src:t.image,alt:t.name,className:"w-24 h-24 rounded-full"}),F.jsxs("div",{children:[F.jsx("h2",{className:"text-xl font-bold text-gray-800 dark:text-gray-200",children:t.name}),F.jsxs("p",{className:"text-gray-600 dark:text-gray-400",children:[t.species," from ",t.origin.name]}),F.jsxs("p",{className:"text-gray-600 dark:text-gray-400",children:["Status: ",t.status]})]})]})})}function Mu({page:e,totalPages:t}){return F.jsxs("nav",{className:"flex justify-center gap-4 p-4",children:[F.jsxs(_a,{to:`?page=${e-1}`,className:`p-2 rounded-lg ${e===1?"invisible":"bg-gray-100 dark:bg-gray-800"}`,children:["<",F.jsx("span",{className:"sr-only",children:"Previous"})]}),F.jsxs("span",{className:"flex items-center gap-2 text-gray-600 dark:text-gray-400",children:["Page ",e," of ",t]}),F.jsxs(_a,{to:`?page=${e+1}`,className:`p-2 rounded-lg ${e===t?"invisible":"bg-gray-100 dark:bg-gray-800"}`,children:[F.jsx("span",{className:"sr-only",children:"Next"}),">"]})]})}function Ec(){const[e]=Tu(),t=parseInt(e.get("page")||"1"),{characters:n,pages:r}=Sr();return F.jsxs("section",{className:"p-4 text-left",children:[F.jsx(Mu,{page:t,totalPages:r}),n.map(l=>F.jsx(op,{character:l},l.id))]})}function ip({episode:e}){const t=e||Sr();return F.jsx("section",{className:"p-4 text-left",children:F.jsx("div",{className:"flex gap-4 p-4 border-b border-gray-200 dark:border-gray-700",children:F.jsxs("div",{children:[F.jsxs("h2",{className:"text-xl font-bold text-gray-800 dark:text-gray-200",children:[t.episode,": ",t.name]}),F.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:t.air_date}),t.characters.length," characters"]})})})}function yg(){const[e]=Tu(),t=parseInt(e.get("page")||"1"),{episodes:n,pages:r}=Sr();return F.jsxs("section",{className:"p-4 text-left",children:[F.jsx(Mu,{page:t,totalPages:r}),n.map(l=>F.jsx(ip,{episode:l},l.id))]})}function ap({location:e}){const t=e||Sr();return F.jsx("section",{className:"p-4 text-left",children:F.jsx("div",{className:"flex gap-4 p-4 border-b border-gray-200 dark:border-gray-700",children:F.jsxs("div",{children:[F.jsx("h2",{className:"text-xl font-bold text-gray-800 dark:text-gray-200",children:t.name}),F.jsxs("p",{className:"text-gray-600 dark:text-gray-400",children:[t.type," - ",t.dimension]}),F.jsxs("p",{className:"text-gray-600 dark:text-gray-400",children:[t.residents.length," residents"]})]})})})}function gg(){const[e]=Tu(),t=parseInt(e.get("page")||"1"),{locations:n,pages:r}=Sr();return F.jsxs("section",{className:"p-4 text-left",children:[F.jsx(Mu,{page:t,totalPages:r}),n.map(l=>F.jsx(ap,{location:l},l.id))]})}const wg=Cy([{path:"/",element:F.jsx(vg,{}),children:[{index:!0,element:F.jsx(Ec,{}),loader:xc},{path:"/characters",element:F.jsx(Ec,{}),loader:xc},{path:"/character/:characterId",element:F.jsx(op,{}),loader:og},{path:"/locations",element:F.jsx(gg,{}),loader:ig},{path:"/location/:locationId",element:F.jsx(ap,{}),loader:ag},{path:"/episodes",element:F.jsx(yg,{}),loader:ug},{path:"/episodes/:episodeId",element:F.jsx(ip,{}),loader:sg}]}],{basename:"/rick-and-morty-explorer"});Ud(document.getElementById("root")).render(F.jsx(P.StrictMode,{children:F.jsx(zy,{router:wg})})); + */function hl(){return hl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[l]=e[l]);return n}function wy(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Sy(e,t){return e.button===0&&(!t||t==="_self")&&!wy(e)}function Pa(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(l=>[n,l]):[[n,r]])},[]))}function xy(e,t){let n=Pa(e);return t&&t.forEach((r,l)=>{n.has(l)||t.getAll(l).forEach(o=>{n.append(l,o)})}),n}const Ey=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],ky="6";try{window.__reactRouterVersion=ky}catch{}function Cy(e,t){return Dv({basename:t==null?void 0:t.basename,future:hl({},t==null?void 0:t.future,{v7_prependBasename:!0}),history:tv({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||Py(),routes:e,mapRouteProperties:yy,unstable_dataStrategy:t==null?void 0:t.unstable_dataStrategy,unstable_patchRoutesOnNavigation:t==null?void 0:t.unstable_patchRoutesOnNavigation,window:t==null?void 0:t.window}).initialize()}function Py(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=hl({},t,{errors:_y(t.errors)})),t}function _y(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 zo(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 Ry=P.createContext({isTransitioning:!1}),Ly=P.createContext(new Map),Ny="startTransition",yc=Vp[Ny],Ty="flushSync",gc=ev[Ty];function Dy(e){yc?yc(e):e()}function jr(e){gc?gc(e):e()}class My{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 zy(e){let{fallbackElement:t,router:n,future:r}=e,[l,o]=P.useState(n.state),[i,a]=P.useState(),[u,s]=P.useState({isTransitioning:!1}),[d,f]=P.useState(),[m,w]=P.useState(),[k,x]=P.useState(),L=P.useRef(new Map),{v7_startTransition:h}=r||{},c=P.useCallback(y=>{h?Dy(y):y()},[h]),v=P.useCallback((y,B)=>{let{deletedFetchers:O,unstable_flushSync:Q,unstable_viewTransitionOpts:te}=B;O.forEach(pe=>L.current.delete(pe)),y.fetchers.forEach((pe,gt)=>{pe.data!==void 0&&L.current.set(gt,pe.data)});let ge=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!te||ge){Q?jr(()=>o(y)):c(()=>o(y));return}if(Q){jr(()=>{m&&(d&&d.resolve(),m.skipTransition()),s({isTransitioning:!0,flushSync:!0,currentLocation:te.currentLocation,nextLocation:te.nextLocation})});let pe=n.window.document.startViewTransition(()=>{jr(()=>o(y))});pe.finished.finally(()=>{jr(()=>{f(void 0),w(void 0),a(void 0),s({isTransitioning:!1})})}),jr(()=>w(pe));return}m?(d&&d.resolve(),m.skipTransition(),x({state:y,currentLocation:te.currentLocation,nextLocation:te.nextLocation})):(a(y),s({isTransitioning:!0,flushSync:!1,currentLocation:te.currentLocation,nextLocation:te.nextLocation}))},[n.window,m,d,L,c]);P.useLayoutEffect(()=>n.subscribe(v),[n,v]),P.useEffect(()=>{u.isTransitioning&&!u.flushSync&&f(new My)},[u]),P.useEffect(()=>{if(d&&i&&n.window){let y=i,B=d.promise,O=n.window.document.startViewTransition(async()=>{c(()=>o(y)),await B});O.finished.finally(()=>{f(void 0),w(void 0),a(void 0),s({isTransitioning:!1})}),w(O)}},[c,i,d,n.window]),P.useEffect(()=>{d&&i&&l.location.key===i.location.key&&d.resolve()},[d,m,l.location,i]),P.useEffect(()=>{!u.isTransitioning&&k&&(a(k.state),s({isTransitioning:!0,flushSync:!1,currentLocation:k.currentLocation,nextLocation:k.nextLocation}),x(void 0))},[u.isTransitioning,k]),P.useEffect(()=>{},[]);let E=P.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:y=>n.navigate(y),push:(y,B,O)=>n.navigate(y,{state:B,preventScrollReset:O==null?void 0:O.preventScrollReset}),replace:(y,B,O)=>n.navigate(y,{replace:!0,state:B,preventScrollReset:O==null?void 0:O.preventScrollReset})}),[n]),R=n.basename||"/",T=P.useMemo(()=>({router:n,navigator:E,static:!1,basename:R}),[n,E,R]),j=P.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return P.createElement(P.Fragment,null,P.createElement(qo.Provider,{value:T},P.createElement(Xd.Provider,{value:l},P.createElement(Ly.Provider,{value:L.current},P.createElement(Ry.Provider,{value:u},P.createElement(vy,{basename:R,location:l.location,navigationType:l.historyAction,navigator:E,future:j},l.initialized||n.future.v7_partialHydration?P.createElement(jy,{routes:n.routes,future:n.future,state:l}):t))))),null)}const jy=P.memo(Oy);function Oy(e){let{routes:t,future:n,state:r}=e;return ly(t,void 0,r,n)}const Fy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Iy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,_a=P.forwardRef(function(t,n){let{onClick:r,relative:l,reloadDocument:o,replace:i,state:a,target:u,to:s,preventScrollReset:d,unstable_viewTransition:f}=t,m=gy(t,Ey),{basename:w}=P.useContext(On),k,x=!1;if(typeof s=="string"&&Iy.test(s)&&(k=s,Fy))try{let v=new URL(window.location.href),E=s.startsWith("//")?new URL(v.protocol+s):new URL(s),R=wr(E.pathname,w);E.origin===v.origin&&R!=null?s=R+E.search+E.hash:x=!0}catch{}let L=ey(s,{relative:l}),h=Uy(s,{replace:i,state:a,target:u,preventScrollReset:d,relative:l,unstable_viewTransition:f});function c(v){r&&r(v),v.defaultPrevented||h(v)}return P.createElement("a",hl({},m,{href:k||L,onClick:x||o?r:c,ref:n,target:u}))});var wc;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(wc||(wc={}));var Sc;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Sc||(Sc={}));function Uy(e,t){let{target:n,replace:r,state:l,preventScrollReset:o,relative:i,unstable_viewTransition:a}=t===void 0?{}:t,u=Lu(),s=Fn(),d=Zd(e,{relative:i});return P.useCallback(f=>{if(Sy(f,n)){f.preventDefault();let m=r!==void 0?r:Mn(s)===Mn(d);u(e,{replace:m,state:l,preventScrollReset:o,relative:i,unstable_viewTransition:a})}},[s,u,d,r,l,n,e,o,i,a])}function Tu(e){let t=P.useRef(Pa(e)),n=P.useRef(!1),r=Fn(),l=P.useMemo(()=>xy(r.search,n.current?null:t.current),[r.search]),o=Lu(),i=P.useCallback((a,u)=>{const s=Pa(typeof a=="function"?a(l):a);n.current=!0,o("?"+s,u)},[o,l]);return[l,i]}var Du=Object.defineProperty,$y=Object.getOwnPropertyDescriptor,Ay=Object.getOwnPropertyNames,By=Object.prototype.hasOwnProperty,Vy=(e,t)=>{for(var n in t)Du(e,n,{get:t[n],enumerable:!0})},Hy=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of Ay(t))!By.call(e,l)&&l!==n&&Du(e,l,{get:()=>t[l],enumerable:!(r=$y(t,l))||r.enumerable});return e},Wy=e=>Hy(Du({},"__esModule",{value:!0}),e),ep={};Vy(ep,{getCharacter:()=>by,getCharacters:()=>qy,getEndpoints:()=>lg,getEpisode:()=>rg,getEpisodes:()=>ng,getLocation:()=>tg,getLocations:()=>eg});var xr=Wy(ep),Qy={required:"You are using an invalid argument. As an argument use an integer (Id) or an array of integers (Ids).",optional:"You are using an invalid argument. As an argument use a filter object or leave it blank."},tp=e=>typeof e=="number"&&Number.isInteger(e),Ky=e=>Array.isArray(e)&&e.every(tp),Yy=(e,t)=>{if(t&&tp(e))return`/${e}`;if(t&&Ky(e)){let n=e;return`/${n.length?n:"[0]"}`}if(!t&&typeof e=="object"&&!Array.isArray(e))return`/?${new URLSearchParams(e).toString()}`;throw new Error(Qy[t?"required":"optional"])},Xy=Yy,Gy=async e=>{let t=await fetch(`https://rickandmortyapi.com/api/${e}`);return t.ok?{data:await t.json(),status:t.status,statusMessage:t.statusText}:{data:{},status:t.status,statusMessage:t.statusText}},Jy=Gy,Zy=async({endpoint:e,options:t,isIdRequired:n=!1})=>{let r=Xy(t,n);return Jy(`${e}/${r}`)},In=Zy,np="character",qy=e=>In({endpoint:np,options:e??{}}),by=e=>In({endpoint:np,options:e,isIdRequired:!0}),rp="location",eg=e=>In({endpoint:rp,options:e??{}}),tg=e=>In({endpoint:rp,options:e,isIdRequired:!0}),lp="episode",ng=e=>In({endpoint:lp,options:e??{}}),rg=e=>In({endpoint:lp,options:e,isIdRequired:!0}),lg=()=>In({endpoint:"",options:{}});async function xc({request:e}){const t=parseInt(new URL(e.url).searchParams.get("page")??"",10)??1,n=await xr.getCharacters({page:t});if(typeof n.data>"u"||typeof n.data.info>"u")throw new Error("Failed to load characters");return{pages:n.data.info.pages,characters:n.data.results}}async function og({params:e}){return(await xr.getCharacter(parseInt(e.characterId??"",10))).data}async function ig({request:e}){const t=parseInt(new URL(e.url).searchParams.get("page")??"",10)??1,n=await xr.getLocations({page:t});if(typeof n.data>"u"||typeof n.data.info>"u")throw new Error("Failed to load locations");return{pages:n.data.info.pages,locations:n.data.results}}async function ag({params:e}){return(await xr.getLocation(parseInt(e.locationId??"",10))).data}async function ug({request:e}){const t=parseInt(new URL(e.url).searchParams.get("page")??"",10)??1,n=await xr.getEpisodes({page:t});if(typeof n.data>"u"||typeof n.data.info>"u")throw new Error("Failed to load episodes");return{pages:n.data.info.pages,episodes:n.data.results}}async function sg({params:e}){return(await xr.getEpisode(parseInt(e.episodeId??"",10))).data}const cg=({tabs:e,selectedTab:t,onSelectTab:n})=>{const[r,l]=P.useState(t),o=Fn();return P.useEffect(()=>{const i=o.pathname.split("/")[1],a=i.charAt(0).toUpperCase()+i.slice(1);l(a)},[o]),F.jsxs("div",{className:"-mt-11",children:[F.jsxs("div",{className:"sm:hidden",children:[F.jsx("label",{htmlFor:"Tab",className:"sr-only",children:"Tab"}),F.jsx("select",{id:"Tab",className:"w-full rounded-md border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100",value:r,onChange:i=>n(i.target.value),children:e.map(i=>F.jsx("option",{value:i,children:i},i))})]}),F.jsx("div",{className:"hidden sm:block",children:F.jsx("div",{className:"border-b border-gray-300 dark:border-gray-600",children:F.jsx("nav",{className:"-mb-px flex gap-6",children:e.map(i=>F.jsx(_a,{to:`/${i.toLowerCase()}`,className:`shrink-0 border border-transparent p-3 text-sm font-medium ${i===t?"rounded-t-lg border-gray-500 border-b-white text-sky-600 dark:border-gray-400 dark:border-b-gray-800 bg-gray-200 dark:bg-gray-700":"text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"}`,children:i},i))})})})]})},fg="/rick-and-morty-explorer/android-chrome-512x512.png",dg="/rick-and-morty-explorer/StarrySpace.svg",pg=()=>F.jsxs("section",{className:"flex justify-center items-center bg-cover bg-center py-20",style:{backgroundImage:`url(${dg})`},children:[F.jsx("a",{href:"https://rickandmortyapi.com/",target:"_blank",children:F.jsx("img",{src:fg,className:"logo",alt:"Morty Logo"})}),F.jsx("h1",{className:"text-3xl font-extrabold text-white sm:text-5xl",children:"Rick and Morty Explorer"})]});function hg(e){return`${e[0].toUpperCase()}${e.slice(1)}`}function mg(e){const t=e.split("/").pop();return typeof t>"u"||t.length<2?"Characters":hg(t)}function vg(){const e=Lu(),t=Fn();function n(r){e(`${r.toLowerCase()}/`)}return F.jsxs(F.Fragment,{children:[F.jsx(pg,{}),F.jsx(cg,{tabs:["Characters","Locations","Episodes"],selectedTab:mg(t.pathname),onSelectTab:n}),F.jsx("main",{children:F.jsx(my,{})}),F.jsx("footer",{children:"2024 - Implemented with Rick and Morty API"})]})}function op({character:e}){const t=e||Sr();return F.jsx("section",{className:"p-4 text-left",children:F.jsxs("div",{className:"flex gap-4 p-4 border-b border-gray-200 dark:border-gray-700",children:[F.jsx("img",{src:t.image,alt:t.name,className:"w-24 h-24 rounded-full"}),F.jsxs("div",{children:[F.jsx("h2",{className:"text-xl font-bold text-gray-800 dark:text-gray-200",children:t.name}),F.jsxs("p",{className:"text-gray-600 dark:text-gray-400",children:[t.species," from ",t.origin.name]}),F.jsxs("p",{className:"text-gray-600 dark:text-gray-400",children:["Status: ",t.status]})]})]})})}function Mu({page:e,totalPages:t}){return F.jsxs("nav",{className:"flex justify-center gap-4 p-4",children:[F.jsxs(_a,{to:`?page=${e-1}`,className:`p-2 rounded-lg ${e===1?"invisible":"bg-gray-100 dark:bg-gray-800"}`,children:["<",F.jsx("span",{className:"sr-only",children:"Previous"})]}),F.jsxs("span",{className:"flex items-center gap-2 text-gray-600 dark:text-gray-400",children:["Page ",e," of ",t]}),F.jsxs(_a,{to:`?page=${e+1}`,className:`p-2 rounded-lg ${e===t?"invisible":"bg-gray-100 dark:bg-gray-800"}`,children:[F.jsx("span",{className:"sr-only",children:"Next"}),">"]})]})}function Ec(){const[e]=Tu(),t=parseInt(e.get("page")||"1"),{characters:n,pages:r}=Sr();return F.jsxs("section",{className:"p-4 text-left",children:[F.jsx(Mu,{page:t,totalPages:r}),n.map(l=>F.jsx(op,{character:l},l.id))]})}function ip({episode:e}){const t=e||Sr();return F.jsx("section",{className:"p-4 text-left",children:F.jsx("div",{className:"flex gap-4 p-4 border-b border-gray-200 dark:border-gray-700",children:F.jsxs("div",{children:[F.jsxs("h2",{className:"text-xl font-bold text-gray-800 dark:text-gray-200",children:[t.episode,": ",t.name]}),F.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:t.air_date}),t.characters.length," characters"]})})})}function yg(){const[e]=Tu(),t=parseInt(e.get("page")||"1"),{episodes:n,pages:r}=Sr();return F.jsxs("section",{className:"p-4 text-left",children:[F.jsx(Mu,{page:t,totalPages:r}),n.map(l=>F.jsx(ip,{episode:l},l.id))]})}function ap({location:e}){const t=e||Sr();return F.jsx("section",{className:"p-4 text-left",children:F.jsx("div",{className:"flex gap-4 p-4 border-b border-gray-200 dark:border-gray-700",children:F.jsxs("div",{children:[F.jsx("h2",{className:"text-xl font-bold text-gray-800 dark:text-gray-200",children:t.name}),F.jsxs("p",{className:"text-gray-600 dark:text-gray-400",children:[t.type," - ",t.dimension]}),F.jsxs("p",{className:"text-gray-600 dark:text-gray-400",children:[t.residents.length," residents"]})]})})})}function gg(){const[e]=Tu(),t=parseInt(e.get("page")||"1"),{locations:n,pages:r}=Sr();return F.jsxs("section",{className:"p-4 text-left",children:[F.jsx(Mu,{page:t,totalPages:r}),n.map(l=>F.jsx(ap,{location:l},l.id))]})}const wg=Cy([{path:"/",element:F.jsx(vg,{}),children:[{index:!0,element:F.jsx(Ec,{}),loader:xc},{path:"/characters",element:F.jsx(Ec,{}),loader:xc},{path:"/character/:characterId",element:F.jsx(op,{}),loader:og},{path:"/locations",element:F.jsx(gg,{}),loader:ig},{path:"/location/:locationId",element:F.jsx(ap,{}),loader:ag},{path:"/episodes",element:F.jsx(yg,{}),loader:ug},{path:"/episodes/:episodeId",element:F.jsx(ip,{}),loader:sg}]}],{basename:"/rick-and-morty-explorer"});Ud(document.getElementById("root")).render(F.jsx(P.StrictMode,{children:F.jsx(zy,{router:wg})})); diff --git a/index.html b/index.html index 529857a..940ac9e 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@ Rick and Morty Explorer - +