var gp=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var T=(e,t,n)=>(gp(e,t,"read from private field"),n?n.call(e):t.get(e)),me=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},ne=(e,t,n,r)=>(gp(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var Ds=(e,t,n,r)=>({set _(a){ne(e,t,a,n)},get _(){return T(e,t,r)}}),We=(e,t,n)=>(gp(e,t,"access private method"),n);function ij(e,t){for(var n=0;nr[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(a){if(a.ep)return;a.ep=!0;const i=n(a);fetch(a.href,i)}})();var $n=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Rf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Fw(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,a.get?a:{enumerable:!0,get:function(){return e[r]}})}),n}var Bw={exports:{}},Nf={},Ww={exports:{}},Ve={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var is=Symbol.for("react.element"),oj=Symbol.for("react.portal"),lj=Symbol.for("react.fragment"),uj=Symbol.for("react.strict_mode"),sj=Symbol.for("react.profiler"),cj=Symbol.for("react.provider"),fj=Symbol.for("react.context"),dj=Symbol.for("react.forward_ref"),pj=Symbol.for("react.suspense"),hj=Symbol.for("react.memo"),mj=Symbol.for("react.lazy"),Hy=Symbol.iterator;function vj(e){return e===null||typeof e!="object"?null:(e=Hy&&e[Hy]||e["@@iterator"],typeof e=="function"?e:null)}var zw={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Uw=Object.assign,qw={};function pl(e,t,n){this.props=e,this.context=t,this.refs=qw,this.updater=n||zw}pl.prototype.isReactComponent={};pl.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};pl.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Hw(){}Hw.prototype=pl.prototype;function Uv(e,t,n){this.props=e,this.context=t,this.refs=qw,this.updater=n||zw}var qv=Uv.prototype=new Hw;qv.constructor=Uv;Uw(qv,pl.prototype);qv.isPureReactComponent=!0;var Vy=Array.isArray,Vw=Object.prototype.hasOwnProperty,Hv={current:null},Gw={key:!0,ref:!0,__self:!0,__source:!0};function Kw(e,t,n){var r,a={},i=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)Vw.call(t,r)&&!Gw.hasOwnProperty(r)&&(a[r]=t[r]);var l=arguments.length-2;if(l===1)a.children=n;else if(1>>1,Me=H[we];if(0>>1;wea(be,ae))Rea(Te,be)?(H[we]=Te,H[Re]=ae,we=Re):(H[we]=be,H[ft]=ae,we=ft);else if(Rea(Te,ae))H[we]=Te,H[Re]=ae,we=Re;else break e}}return X}function a(H,X){var ae=H.sortIndex-X.sortIndex;return ae!==0?ae:H.id-X.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var u=[],s=[],d=1,p=null,h=3,_=!1,g=!1,O=!1,E=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(H){for(var X=n(s);X!==null;){if(X.callback===null)r(s);else if(X.startTime<=H)r(s),X.sortIndex=X.expirationTime,t(u,X);else break;X=n(s)}}function w(H){if(O=!1,S(H),!g)if(n(u)!==null)g=!0,tt($);else{var X=n(s);X!==null&&Xe(w,X.startTime-H)}}function $(H,X){g=!1,O&&(O=!1,v(I),I=-1),_=!0;var ae=h;try{for(S(X),p=n(u);p!==null&&(!(p.expirationTime>X)||H&&!te());){var we=p.callback;if(typeof we=="function"){p.callback=null,h=p.priorityLevel;var Me=we(p.expirationTime<=X);X=e.unstable_now(),typeof Me=="function"?p.callback=Me:p===n(u)&&r(u),S(X)}else r(u);p=n(u)}if(p!==null)var ct=!0;else{var ft=n(s);ft!==null&&Xe(w,ft.startTime-X),ct=!1}return ct}finally{p=null,h=ae,_=!1}}var N=!1,k=null,I=-1,z=5,L=-1;function te(){return!(e.unstable_now()-LH||125we?(H.sortIndex=ae,t(s,H),n(u)===null&&H===n(s)&&(O?(v(I),I=-1):O=!0,Xe(w,ae-we))):(H.sortIndex=Me,t(u,H),g||_||(g=!0,tt($))),H},e.unstable_shouldYield=te,e.unstable_wrapCallback=function(H){var X=h;return function(){var ae=h;h=X;try{return H.apply(this,arguments)}finally{h=ae}}}})(eS);Zw.exports=eS;var Ej=Zw.exports;/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var tS=C,kn=Ej;function G(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),gh=Object.prototype.hasOwnProperty,jj=/^[: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]*$/,Ky={},Qy={};function $j(e){return gh.call(Qy,e)?!0:gh.call(Ky,e)?!1:jj.test(e)?Qy[e]=!0:(Ky[e]=!0,!1)}function Rj(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 Nj(e,t,n,r){if(t===null||typeof t>"u"||Rj(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 dn(e,t,n,r,a,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=a,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var Xt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Xt[e]=new dn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Xt[t]=new dn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Xt[e]=new dn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Xt[e]=new dn(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){Xt[e]=new dn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Xt[e]=new dn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Xt[e]=new dn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Xt[e]=new dn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Xt[e]=new dn(e,5,!1,e.toLowerCase(),null,!1,!1)});var Gv=/[\-:]([a-z])/g;function Kv(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(Gv,Kv);Xt[t]=new dn(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(Gv,Kv);Xt[t]=new dn(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(Gv,Kv);Xt[t]=new dn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Xt[e]=new dn(e,1,!1,e.toLowerCase(),null,!1,!1)});Xt.xlinkHref=new dn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Xt[e]=new dn(e,1,!1,e.toLowerCase(),null,!0,!0)});function Qv(e,t,n,r){var a=Xt.hasOwnProperty(t)?Xt[t]:null;(a!==null?a.type!==0:r||!(2l||a[o]!==i[l]){var u=` `+a[o].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}while(1<=o&&0<=l);break}}}finally{_p=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?nu(e):""}function kj(e){switch(e.tag){case 5:return nu(e.type);case 16:return nu("Lazy");case 13:return nu("Suspense");case 19:return nu("SuspenseList");case 0:case 2:case 15:return e=wp(e.type,!1),e;case 11:return e=wp(e.type.render,!1),e;case 1:return e=wp(e.type,!0),e;default:return""}}function wh(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 Xi:return"Fragment";case Ji:return"Portal";case yh:return"Profiler";case Yv:return"StrictMode";case bh:return"Suspense";case _h:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case aS:return(e.displayName||"Context")+".Consumer";case rS:return(e._context.displayName||"Context")+".Provider";case Jv:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Xv:return t=e.displayName||null,t!==null?t:wh(e.type)||"Memo";case ma:t=e._payload,e=e._init;try{return wh(e(t))}catch{}}return null}function Tj(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 wh(t);case 8:return t===Yv?"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 Wa(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function oS(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ij(e){var t=oS(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 a=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Bs(e){e._valueTracker||(e._valueTracker=Ij(e))}function lS(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=oS(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Lc(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 Sh(e,t){var n=t.checked;return xt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Jy(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Wa(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 uS(e,t){t=t.checked,t!=null&&Qv(e,"checked",t,!1)}function Ph(e,t){uS(e,t);var n=Wa(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")?Oh(e,t.type,n):t.hasOwnProperty("defaultValue")&&Oh(e,t.type,Wa(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Xy(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 Oh(e,t,n){(t!=="number"||Lc(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ru=Array.isArray;function fo(e,t,n,r){if(e=e.options,t){t={};for(var a=0;a"+t.valueOf().toString()+"",t=Ws.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Su(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var uu={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},Mj=["Webkit","ms","Moz","O"];Object.keys(uu).forEach(function(e){Mj.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),uu[t]=uu[e]})});function dS(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||uu.hasOwnProperty(e)&&uu[e]?(""+t).trim():t+"px"}function pS(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,a=dS(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,a):e[n]=a}}var Lj=xt({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 Eh(e,t){if(t){if(Lj[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(G(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(G(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(G(61))}if(t.style!=null&&typeof t.style!="object")throw Error(G(62))}}function jh(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 $h=null;function Zv(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Rh=null,po=null,ho=null;function t0(e){if(e=us(e)){if(typeof Rh!="function")throw Error(G(280));var t=e.stateNode;t&&(t=Lf(t),Rh(e.stateNode,e.type,t))}}function hS(e){po?ho?ho.push(e):ho=[e]:po=e}function mS(){if(po){var e=po,t=ho;if(ho=po=null,t0(e),t)for(e=0;e>>=0,e===0?32:31-(Gj(e)/Kj|0)|0}var zs=64,Us=4194304;function au(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 Bc(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,a=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var l=o&~a;l!==0?r=au(l):(i&=o,i!==0&&(r=au(i)))}else o=n&~a,o!==0?r=au(o):i!==0&&(r=au(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&a)&&(a=r&-r,i=t&-t,a>=i||a===16&&(i&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 os(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Sr(t),e[t]=n}function Xj(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=cu),c0=String.fromCharCode(32),f0=!1;function MS(e,t){switch(e){case"keyup":return x$.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function LS(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Zi=!1;function j$(e,t){switch(e){case"compositionend":return LS(t);case"keypress":return t.which!==32?null:(f0=!0,c0);case"textInput":return e=t.data,e===c0&&f0?null:e;default:return null}}function $$(e,t){if(Zi)return e==="compositionend"||!lg&&MS(e,t)?(e=TS(),Sc=ag=xa=null,Zi=!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=m0(n)}}function BS(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?BS(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function WS(){for(var e=window,t=Lc();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Lc(e.document)}return t}function ug(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 A$(e){var t=WS(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&BS(n.ownerDocument.documentElement,n)){if(r!==null&&ug(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 a=n.textContent.length,i=Math.min(r.start,a);r=r.end===void 0?i:Math.min(r.end,a),!e.extend&&i>r&&(a=r,r=i,i=a),a=v0(n,i);var o=v0(n,r);a&&o&&(e.rangeCount!==1||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(a.node,a.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.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,eo=null,Lh=null,du=null,Dh=!1;function g0(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Dh||eo==null||eo!==Lc(r)||(r=eo,"selectionStart"in r&&ug(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}),du&&ju(du,r)||(du=r,r=Uc(Lh,"onSelect"),0ro||(e.current=Uh[ro],Uh[ro]=null,ro--)}function st(e,t){ro++,Uh[ro]=e.current,e.current=t}var za={},on=Ha(za),bn=Ha(!1),xi=za;function Mo(e,t){var n=e.type.contextTypes;if(!n)return za;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var a={},i;for(i in n)a[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function _n(e){return e=e.childContextTypes,e!=null}function Hc(){yt(bn),yt(on)}function O0(e,t,n){if(on.current!==za)throw Error(G(168));st(on,t),st(bn,n)}function YS(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var a in r)if(!(a in t))throw Error(G(108,Tj(e)||"Unknown",a));return xt({},n,r)}function Vc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||za,xi=on.current,st(on,e),st(bn,bn.current),!0}function C0(e,t,n){var r=e.stateNode;if(!r)throw Error(G(169));n?(e=YS(e,t,xi),r.__reactInternalMemoizedMergedChildContext=e,yt(bn),yt(on),st(on,e)):yt(bn),st(bn,n)}var Jr=null,Df=!1,Mp=!1;function JS(e){Jr===null?Jr=[e]:Jr.push(e)}function Y$(e){Df=!0,JS(e)}function Va(){if(!Mp&&Jr!==null){Mp=!0;var e=0,t=at;try{var n=Jr;for(at=1;e>=o,a-=o,Xr=1<<32-Sr(t)+a|n<I?(z=k,k=null):z=k.sibling;var L=h(v,k,S[I],w);if(L===null){k===null&&(k=z);break}e&&k&&L.alternate===null&&t(v,k),b=i(L,b,I),N===null?$=L:N.sibling=L,N=L,k=z}if(I===S.length)return n(v,k),wt&&ii(v,I),$;if(k===null){for(;II?(z=k,k=null):z=k.sibling;var te=h(v,k,L.value,w);if(te===null){k===null&&(k=z);break}e&&k&&te.alternate===null&&t(v,k),b=i(te,b,I),N===null?$=te:N.sibling=te,N=te,k=z}if(L.done)return n(v,k),wt&&ii(v,I),$;if(k===null){for(;!L.done;I++,L=S.next())L=p(v,L.value,w),L!==null&&(b=i(L,b,I),N===null?$=L:N.sibling=L,N=L);return wt&&ii(v,I),$}for(k=r(v,k);!L.done;I++,L=S.next())L=_(k,v,I,L.value,w),L!==null&&(e&&L.alternate!==null&&k.delete(L.key===null?I:L.key),b=i(L,b,I),N===null?$=L:N.sibling=L,N=L);return e&&k.forEach(function(ce){return t(v,ce)}),wt&&ii(v,I),$}function E(v,b,S,w){if(typeof S=="object"&&S!==null&&S.type===Xi&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case Fs:e:{for(var $=S.key,N=b;N!==null;){if(N.key===$){if($=S.type,$===Xi){if(N.tag===7){n(v,N.sibling),b=a(N,S.props.children),b.return=v,v=b;break e}}else if(N.elementType===$||typeof $=="object"&&$!==null&&$.$$typeof===ma&&k0($)===N.type){n(v,N.sibling),b=a(N,S.props),b.ref=zl(v,N,S),b.return=v,v=b;break e}n(v,N);break}else t(v,N);N=N.sibling}S.type===Xi?(b=Ci(S.props.children,v.mode,w,S.key),b.return=v,v=b):(w=Rc(S.type,S.key,S.props,null,v.mode,w),w.ref=zl(v,b,S),w.return=v,v=w)}return o(v);case Ji:e:{for(N=S.key;b!==null;){if(b.key===N)if(b.tag===4&&b.stateNode.containerInfo===S.containerInfo&&b.stateNode.implementation===S.implementation){n(v,b.sibling),b=a(b,S.children||[]),b.return=v,v=b;break e}else{n(v,b);break}else t(v,b);b=b.sibling}b=Up(S,v.mode,w),b.return=v,v=b}return o(v);case ma:return N=S._init,E(v,b,N(S._payload),w)}if(ru(S))return g(v,b,S,w);if(Dl(S))return O(v,b,S,w);Ys(v,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,b!==null&&b.tag===6?(n(v,b.sibling),b=a(b,S),b.return=v,v=b):(n(v,b),b=zp(S,v.mode,w),b.return=v,v=b),o(v)):n(v,b)}return E}var Do=iP(!0),oP=iP(!1),ss={},Wr=Ha(ss),ku=Ha(ss),Tu=Ha(ss);function di(e){if(e===ss)throw Error(G(174));return e}function gg(e,t){switch(st(Tu,t),st(ku,e),st(Wr,ss),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:xh(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=xh(t,e)}yt(Wr),st(Wr,t)}function Ao(){yt(Wr),yt(ku),yt(Tu)}function lP(e){di(Tu.current);var t=di(Wr.current),n=xh(t,e.type);t!==n&&(st(ku,e),st(Wr,n))}function yg(e){ku.current===e&&(yt(Wr),yt(ku))}var Ot=Ha(0);function Xc(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Lp=[];function bg(){for(var e=0;en?n:4,e(!0);var r=Dp.transition;Dp.transition={};try{e(!1),t()}finally{at=n,Dp.transition=r}}function PP(){return tr().memoizedState}function eR(e,t,n){var r=La(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},OP(e))CP(t,n);else if(n=tP(e,t,n,r),n!==null){var a=cn();Pr(n,e,r,a),xP(n,t,r)}}function tR(e,t,n){var r=La(e),a={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(OP(e))CP(t,a);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,l=i(o,n);if(a.hasEagerState=!0,a.eagerState=l,Or(l,o)){var u=t.interleaved;u===null?(a.next=a,mg(t)):(a.next=u.next,u.next=a),t.interleaved=a;return}}catch{}finally{}n=tP(e,t,a,r),n!==null&&(a=cn(),Pr(n,e,r,a),xP(n,t,r))}}function OP(e){var t=e.alternate;return e===Ct||t!==null&&t===Ct}function CP(e,t){pu=Zc=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function xP(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,tg(e,n)}}var ef={readContext:er,useCallback:Zt,useContext:Zt,useEffect:Zt,useImperativeHandle:Zt,useInsertionEffect:Zt,useLayoutEffect:Zt,useMemo:Zt,useReducer:Zt,useRef:Zt,useState:Zt,useDebugValue:Zt,useDeferredValue:Zt,useTransition:Zt,useMutableSource:Zt,useSyncExternalStore:Zt,useId:Zt,unstable_isNewReconciler:!1},nR={readContext:er,useCallback:function(e,t){return Nr().memoizedState=[e,t===void 0?null:t],e},useContext:er,useEffect:I0,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,xc(4194308,4,yP.bind(null,t,e),n)},useLayoutEffect:function(e,t){return xc(4194308,4,e,t)},useInsertionEffect:function(e,t){return xc(4,2,e,t)},useMemo:function(e,t){var n=Nr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Nr();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=eR.bind(null,Ct,e),[r.memoizedState,e]},useRef:function(e){var t=Nr();return e={current:e},t.memoizedState=e},useState:T0,useDebugValue:Og,useDeferredValue:function(e){return Nr().memoizedState=e},useTransition:function(){var e=T0(!1),t=e[0];return e=Z$.bind(null,e[1]),Nr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ct,a=Nr();if(wt){if(n===void 0)throw Error(G(407));n=n()}else{if(n=t(),Ht===null)throw Error(G(349));ji&30||cP(r,t,n)}a.memoizedState=n;var i={value:n,getSnapshot:t};return a.queue=i,I0(dP.bind(null,r,i,e),[e]),r.flags|=2048,Lu(9,fP.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Nr(),t=Ht.identifierPrefix;if(wt){var n=Zr,r=Xr;n=(r&~(1<<32-Sr(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Iu++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[Lr]=t,e[Nu]=r,MP(e,t,!1,!1),t.stateNode=e;e:{switch(o=jh(n,r),n){case"dialog":mt("cancel",e),mt("close",e),a=r;break;case"iframe":case"object":case"embed":mt("load",e),a=r;break;case"video":case"audio":for(a=0;aBo&&(t.flags|=128,r=!0,Ul(i,!1),t.lanes=4194304)}else{if(!r)if(e=Xc(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Ul(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!wt)return en(t),null}else 2*Nt()-i.renderingStartTime>Bo&&n!==1073741824&&(t.flags|=128,r=!0,Ul(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Nt(),t.sibling=null,n=Ot.current,st(Ot,r?n&1|2:n&1),t):(en(t),null);case 22:case 23:return Rg(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?jn&1073741824&&(en(t),t.subtreeFlags&6&&(t.flags|=8192)):en(t),null;case 24:return null;case 25:return null}throw Error(G(156,t.tag))}function cR(e,t){switch(cg(t),t.tag){case 1:return _n(t.type)&&Hc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ao(),yt(bn),yt(on),bg(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return yg(t),null;case 13:if(yt(Ot),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(G(340));Lo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return yt(Ot),null;case 4:return Ao(),null;case 10:return hg(t.type._context),null;case 22:case 23:return Rg(),null;case 24:return null;default:return null}}var Xs=!1,rn=!1,fR=typeof WeakSet=="function"?WeakSet:Set,se=null;function lo(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){jt(e,t,r)}else n.current=null}function tm(e,t,n){try{n()}catch(r){jt(e,t,r)}}var U0=!1;function dR(e,t){if(Ah=Wc,e=WS(),ug(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,l=-1,u=-1,s=0,d=0,p=e,h=null;t:for(;;){for(var _;p!==n||a!==0&&p.nodeType!==3||(l=o+a),p!==i||r!==0&&p.nodeType!==3||(u=o+r),p.nodeType===3&&(o+=p.nodeValue.length),(_=p.firstChild)!==null;)h=p,p=_;for(;;){if(p===e)break t;if(h===n&&++s===a&&(l=o),h===i&&++d===r&&(u=o),(_=p.nextSibling)!==null)break;p=h,h=p.parentNode}p=_}n=l===-1||u===-1?null:{start:l,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Fh={focusedElem:e,selectionRange:n},Wc=!1,se=t;se!==null;)if(t=se,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,se=e;else for(;se!==null;){t=se;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var O=g.memoizedProps,E=g.memoizedState,v=t.stateNode,b=v.getSnapshotBeforeUpdate(t.elementType===t.type?O:mr(t.type,O),E);v.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var S=t.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(G(163))}}catch(w){jt(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,se=e;break}se=t.return}return g=U0,U0=!1,g}function hu(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var a=r=r.next;do{if((a.tag&e)===e){var i=a.destroy;a.destroy=void 0,i!==void 0&&tm(t,n,i)}a=a.next}while(a!==r)}}function Bf(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 nm(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 AP(e){var t=e.alternate;t!==null&&(e.alternate=null,AP(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Lr],delete t[Nu],delete t[zh],delete t[K$],delete t[Q$])),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 FP(e){return e.tag===5||e.tag===3||e.tag===4}function q0(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||FP(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 rm(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=qc));else if(r!==4&&(e=e.child,e!==null))for(rm(e,t,n),e=e.sibling;e!==null;)rm(e,t,n),e=e.sibling}function am(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(am(e,t,n),e=e.sibling;e!==null;)am(e,t,n),e=e.sibling}var Qt=null,gr=!1;function da(e,t,n){for(n=n.child;n!==null;)BP(e,t,n),n=n.sibling}function BP(e,t,n){if(Br&&typeof Br.onCommitFiberUnmount=="function")try{Br.onCommitFiberUnmount(kf,n)}catch{}switch(n.tag){case 5:rn||lo(n,t);case 6:var r=Qt,a=gr;Qt=null,da(e,t,n),Qt=r,gr=a,Qt!==null&&(gr?(e=Qt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Qt.removeChild(n.stateNode));break;case 18:Qt!==null&&(gr?(e=Qt,n=n.stateNode,e.nodeType===8?Ip(e.parentNode,n):e.nodeType===1&&Ip(e,n),xu(e)):Ip(Qt,n.stateNode));break;case 4:r=Qt,a=gr,Qt=n.stateNode.containerInfo,gr=!0,da(e,t,n),Qt=r,gr=a;break;case 0:case 11:case 14:case 15:if(!rn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){a=r=r.next;do{var i=a,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&tm(n,t,o),a=a.next}while(a!==r)}da(e,t,n);break;case 1:if(!rn&&(lo(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){jt(n,t,l)}da(e,t,n);break;case 21:da(e,t,n);break;case 22:n.mode&1?(rn=(r=rn)||n.memoizedState!==null,da(e,t,n),rn=r):da(e,t,n);break;default:da(e,t,n)}}function H0(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new fR),t.forEach(function(r){var a=wR.bind(null,e,r);n.has(r)||(n.add(r),r.then(a,a))})}}function fr(e,t){var n=t.deletions;if(n!==null)for(var r=0;ra&&(a=o),r&=~i}if(r=a,r=Nt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*hR(r/1960))-r,10e?16:e,Ea===null)var r=!1;else{if(e=Ea,Ea=null,rf=0,Je&6)throw Error(G(331));var a=Je;for(Je|=4,se=e.current;se!==null;){var i=se,o=i.child;if(se.flags&16){var l=i.deletions;if(l!==null){for(var u=0;uNt()-jg?Oi(e,0):Eg|=n),wn(e,t)}function KP(e,t){t===0&&(e.mode&1?(t=Us,Us<<=1,!(Us&130023424)&&(Us=4194304)):t=1);var n=cn();e=aa(e,t),e!==null&&(os(e,t,n),wn(e,n))}function _R(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),KP(e,n)}function wR(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(G(314))}r!==null&&r.delete(t),KP(e,n)}var QP;QP=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||bn.current)yn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return yn=!1,uR(e,t,n);yn=!!(e.flags&131072)}else yn=!1,wt&&t.flags&1048576&&XS(t,Kc,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ec(e,t),e=t.pendingProps;var a=Mo(t,on.current);vo(t,n),a=wg(null,t,r,e,a,n);var i=Sg();return t.flags|=1,typeof a=="object"&&a!==null&&typeof a.render=="function"&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,_n(r)?(i=!0,Vc(t)):i=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,vg(t),a.updater=Af,t.stateNode=a,a._reactInternals=t,Kh(t,r,e,n),t=Jh(null,t,r,!0,i,n)):(t.tag=0,wt&&i&&sg(t),sn(null,t,a,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ec(e,t),e=t.pendingProps,a=r._init,r=a(r._payload),t.type=r,a=t.tag=PR(r),e=mr(r,e),a){case 0:t=Yh(null,t,r,e,n);break e;case 1:t=B0(null,t,r,e,n);break e;case 11:t=A0(null,t,r,e,n);break e;case 14:t=F0(null,t,r,mr(r.type,e),n);break e}throw Error(G(306,r,""))}return t;case 0:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:mr(r,a),Yh(e,t,r,a,n);case 1:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:mr(r,a),B0(e,t,r,a,n);case 3:e:{if(kP(t),e===null)throw Error(G(387));r=t.pendingProps,i=t.memoizedState,a=i.element,nP(e,t),Jc(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){a=Fo(Error(G(423)),t),t=W0(e,t,r,n,a);break e}else if(r!==a){a=Fo(Error(G(424)),t),t=W0(e,t,r,n,a);break e}else for(Rn=Ta(t.stateNode.containerInfo.firstChild),Nn=t,wt=!0,br=null,n=oP(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Lo(),r===a){t=ia(e,t,n);break e}sn(e,t,r,n)}t=t.child}return t;case 5:return lP(t),e===null&&Hh(t),r=t.type,a=t.pendingProps,i=e!==null?e.memoizedProps:null,o=a.children,Bh(r,a)?o=null:i!==null&&Bh(r,i)&&(t.flags|=32),NP(e,t),sn(e,t,o,n),t.child;case 6:return e===null&&Hh(t),null;case 13:return TP(e,t,n);case 4:return gg(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Do(t,null,r,n):sn(e,t,r,n),t.child;case 11:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:mr(r,a),A0(e,t,r,a,n);case 7:return sn(e,t,t.pendingProps,n),t.child;case 8:return sn(e,t,t.pendingProps.children,n),t.child;case 12:return sn(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,a=t.pendingProps,i=t.memoizedProps,o=a.value,st(Qc,r._currentValue),r._currentValue=o,i!==null)if(Or(i.value,o)){if(i.children===a.children&&!bn.current){t=ia(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var l=i.dependencies;if(l!==null){o=i.child;for(var u=l.firstContext;u!==null;){if(u.context===r){if(i.tag===1){u=ta(-1,n&-n),u.tag=2;var s=i.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}}i.lanes|=n,u=i.alternate,u!==null&&(u.lanes|=n),Vh(i.return,n,t),l.lanes|=n;break}u=u.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(G(341));o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),Vh(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}sn(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,r=t.pendingProps.children,vo(t,n),a=er(a),r=r(a),t.flags|=1,sn(e,t,r,n),t.child;case 14:return r=t.type,a=mr(r,t.pendingProps),a=mr(r.type,a),F0(e,t,r,a,n);case 15:return $P(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:mr(r,a),Ec(e,t),t.tag=1,_n(r)?(e=!0,Vc(t)):e=!1,vo(t,n),aP(t,r,a),Kh(t,r,a,n),Jh(null,t,r,!0,e,n);case 19:return IP(e,t,n);case 22:return RP(e,t,n)}throw Error(G(156,t.tag))};function YP(e,t){return SS(e,t)}function SR(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 Xn(e,t,n,r){return new SR(e,t,n,r)}function kg(e){return e=e.prototype,!(!e||!e.isReactComponent)}function PR(e){if(typeof e=="function")return kg(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Jv)return 11;if(e===Xv)return 14}return 2}function Da(e,t){var n=e.alternate;return n===null?(n=Xn(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 Rc(e,t,n,r,a,i){var o=2;if(r=e,typeof e=="function")kg(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Xi:return Ci(n.children,a,i,t);case Yv:o=8,a|=8;break;case yh:return e=Xn(12,n,t,a|2),e.elementType=yh,e.lanes=i,e;case bh:return e=Xn(13,n,t,a),e.elementType=bh,e.lanes=i,e;case _h:return e=Xn(19,n,t,a),e.elementType=_h,e.lanes=i,e;case iS:return zf(n,a,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case rS:o=10;break e;case aS:o=9;break e;case Jv:o=11;break e;case Xv:o=14;break e;case ma:o=16,r=null;break e}throw Error(G(130,e==null?e:typeof e,""))}return t=Xn(o,n,t,a),t.elementType=e,t.type=r,t.lanes=i,t}function Ci(e,t,n,r){return e=Xn(7,e,r,t),e.lanes=n,e}function zf(e,t,n,r){return e=Xn(22,e,r,t),e.elementType=iS,e.lanes=n,e.stateNode={isHidden:!1},e}function zp(e,t,n){return e=Xn(6,e,null,t),e.lanes=n,e}function Up(e,t,n){return t=Xn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function OR(e,t,n,r,a){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=Pp(0),this.expirationTimes=Pp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Pp(0),this.identifierPrefix=r,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function Tg(e,t,n,r,a,i,o,l,u){return e=new OR(e,t,n,l,u),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Xn(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},vg(i),e}function CR(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(eO)}catch(e){console.error(e)}}eO(),Xw.exports=Dn;var tO=Xw.exports,nO,Z0=tO;nO=Z0.createRoot,Z0.hydrateRoot;/** * @remix-run/router v1.10.0 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function gt(){return gt=Object.assign?Object.assign.bind():function(e){for(var t=1;td(_,typeof _=="string"?null:_.state,g===0?"default":void 0));let i=u(n??a.length-1),o=ut.Pop,l=null;function u(_){return Math.min(Math.max(_,0),a.length-1)}function s(){return a[i]}function d(_,g,O){g===void 0&&(g=null);let E=Ni(a?s().pathname:"/",_,g,O);return Ur(E.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(_)),E}function p(_){return typeof _=="string"?_:Cr(_)}return{get index(){return i},get action(){return o},get location(){return s()},createHref:p,createURL(_){return new URL(p(_),"http://localhost")},encodeLocation(_){let g=typeof _=="string"?nr(_):_;return{pathname:g.pathname||"",search:g.search||"",hash:g.hash||""}},push(_,g){o=ut.Push;let O=d(_,g);i+=1,a.splice(i,a.length,O),r&&l&&l({action:o,location:O,delta:1})},replace(_,g){o=ut.Replace;let O=d(_,g);a[i]=O,r&&l&&l({action:o,location:O,delta:0})},go(_){o=ut.Pop;let g=u(i+_),O=a[g];i=g,l&&l({action:o,location:O,delta:_})},listen(_){return l=_,()=>{l=null}}}}function aO(e){e===void 0&&(e={});function t(r,a){let{pathname:i,search:o,hash:l}=r.location;return Ni("",{pathname:i,search:o,hash:l},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function n(r,a){return typeof a=="string"?a:Cr(a)}return oO(t,n,null,e)}function iO(e){e===void 0&&(e={});function t(a,i){let{pathname:o="/",search:l="",hash:u=""}=nr(a.location.hash.substr(1));return!o.startsWith("/")&&!o.startsWith(".")&&(o="/"+o),Ni("",{pathname:o,search:l,hash:u},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(a,i){let o=a.document.querySelector("base"),l="";if(o&&o.getAttribute("href")){let u=a.location.href,s=u.indexOf("#");l=s===-1?u:u.slice(0,s)}return l+"#"+(typeof i=="string"?i:Cr(i))}function r(a,i){Ur(a.pathname.charAt(0)==="/","relative pathnames are not supported in hash history.push("+JSON.stringify(i)+")")}return oO(t,n,r,e)}function ge(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ur(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function RR(){return Math.random().toString(36).substr(2,8)}function tb(e,t){return{usr:e.state,key:e.key,idx:t}}function Ni(e,t,n,r){return n===void 0&&(n=null),gt({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?nr(t):t,{state:n,key:t&&t.key||r||RR()})}function Cr(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 nr(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 oO(e,t,n,r){r===void 0&&(r={});let{window:a=document.defaultView,v5Compat:i=!1}=r,o=a.history,l=ut.Pop,u=null,s=d();s==null&&(s=0,o.replaceState(gt({},o.state,{idx:s}),""));function d(){return(o.state||{idx:null}).idx}function p(){l=ut.Pop;let E=d(),v=E==null?null:E-s;s=E,u&&u({action:l,location:O.location,delta:v})}function h(E,v){l=ut.Push;let b=Ni(O.location,E,v);n&&n(b,E),s=d()+1;let S=tb(b,s),w=O.createHref(b);try{o.pushState(S,"",w)}catch($){if($ instanceof DOMException&&$.name==="DataCloneError")throw $;a.location.assign(w)}i&&u&&u({action:l,location:O.location,delta:1})}function _(E,v){l=ut.Replace;let b=Ni(O.location,E,v);n&&n(b,E),s=d();let S=tb(b,s),w=O.createHref(b);o.replaceState(S,"",w),i&&u&&u({action:l,location:O.location,delta:0})}function g(E){let v=a.location.origin!=="null"?a.location.origin:a.location.href,b=typeof E=="string"?E:Cr(E);return ge(v,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,v)}let O={get action(){return l},get location(){return e(a,o)},listen(E){if(u)throw new Error("A history only accepts one active listener");return a.addEventListener(eb,p),u=E,()=>{a.removeEventListener(eb,p),u=null}},createHref(E){return t(a,E)},createURL:g,encodeLocation(E){let v=g(E);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:h,replace:_,go(E){return o.go(E)}};return O}var Rt;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Rt||(Rt={}));const NR=new Set(["lazy","caseSensitive","path","id","index","children"]);function kR(e){return e.index===!0}function sm(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((a,i)=>{let o=[...n,i],l=typeof a.id=="string"?a.id:o.join("-");if(ge(a.index!==!0||!a.children,"Cannot specify children on an index route"),ge(!r[l],'Found a route id collision on id "'+l+`". Route id's must be globally unique within Data Router usages`),kR(a)){let u=gt({},a,t(a),{id:l});return r[l]=u,u}else{let u=gt({},a,t(a),{id:l,children:void 0});return r[l]=u,a.children&&(u.children=sm(a.children,t,o,r)),u}})}function pi(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?nr(t):t,a=Tn(r.pathname||"/",n);if(a==null)return null;let i=uO(e);TR(i);let o=null;for(let l=0;o==null&&l{let u={relativePath:l===void 0?i.path||"":l,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};u.relativePath.startsWith("/")&&(ge(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=zr([r,u.relativePath]),d=n.concat(u);i.children&&i.children.length>0&&(ge(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+s+'".')),uO(i.children,t,d,s)),!(i.path==null&&!i.index)&&t.push({path:s,score:BR(s,i.index),routesMeta:d})};return e.forEach((i,o)=>{var l;if(i.path===""||!((l=i.path)!=null&&l.includes("?")))a(i,o);else for(let u of sO(i.path))a(i,o,u)}),t}function sO(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,a=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return a?[i,""]:[i];let o=sO(r.join("/")),l=[];return l.push(...o.map(u=>u===""?i:[i,u].join("/"))),a&&l.push(...o),l.map(u=>e.startsWith("/")&&u===""?"/":u)}function TR(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:WR(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const IR=/^:\w+$/,MR=3,LR=2,DR=1,AR=10,FR=-2,nb=e=>e==="*";function BR(e,t){let n=e.split("/"),r=n.length;return n.some(nb)&&(r+=FR),t&&(r+=LR),n.filter(a=>!nb(a)).reduce((a,i)=>a+(IR.test(i)?MR:i===""?DR:AR),r)}function WR(e,t){return e.length===t.length&&e.slice(0,-1).every((r,a)=>r===t[a])?e[e.length-1]-t[t.length-1]:0}function zR(e,t){let{routesMeta:n}=e,r={},a="/",i=[];for(let o=0;oo==null?"":typeof o=="string"?o:String(o),i=n.split(/\/+/).map((o,l,u)=>{if(l===u.length-1&&o==="*")return a(t["*"]);const d=o.match(/^:(\w+)(\??)$/);if(d){const[,p,h]=d;let _=t[p];return ge(h==="?"||_!=null,'Missing ":'+p+'" param'),a(_)}return o.replace(/\?$/g,"")}).filter(o=>!!o);return r+i.join("/")}function Au(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=qR(e.path,e.caseSensitive,e.end),a=t.match(n);if(!a)return null;let i=a[0],o=i.replace(/(.)\/+$/,"$1"),l=a.slice(1);return{params:r.reduce((s,d,p)=>{if(d==="*"){let h=l[p]||"";o=i.slice(0,i.length-h.length).replace(/(.)\/+$/,"$1")}return s[d]=VR(l[p]||"",d),s},{}),pathname:i,pathnameBase:o,pattern:e}}function qR(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Ur(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(o,l)=>(r.push(l),"/([^\\/]+)"));return e.endsWith("*")?(r.push("*"),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function HR(e){try{return decodeURI(e)}catch(t){return Ur(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function VR(e,t){try{return decodeURIComponent(e)}catch(n){return Ur(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function Tn(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 cO(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?nr(e):e;return{pathname:n?n.startsWith("/")?n:GR(n,t):t,search:QR(r),hash:YR(a)}}function GR(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function qp(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 cs(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Gf(e,t,n,r){r===void 0&&(r=!1);let a;typeof e=="string"?a=nr(e):(a=gt({},e),ge(!a.pathname||!a.pathname.includes("?"),qp("?","pathname","search",a)),ge(!a.pathname||!a.pathname.includes("#"),qp("#","pathname","hash",a)),ge(!a.search||!a.search.includes("#"),qp("#","search","hash",a)));let i=e===""||a.pathname==="",o=i?"/":a.pathname,l;if(r||o==null)l=n;else{let p=t.length-1;if(o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),p-=1;a.pathname=h.join("/")}l=p>=0?t[p]:"/"}let u=cO(a,l),s=o&&o!=="/"&&o.endsWith("/"),d=(i||o===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(s||d)&&(u.pathname+="/"),u}const zr=e=>e.join("/").replace(/\/\/+/g,"/"),KR=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),QR=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,YR=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,JR=function(t,n){n===void 0&&(n={});let r=typeof n=="number"?{status:n}:n,a=new Headers(r.headers);return a.has("Content-Type")||a.set("Content-Type","application/json; charset=utf-8"),new Response(JSON.stringify(t),gt({},r,{headers:a}))};class lf extends Error{}class XR{constructor(t,n){this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],ge(t&&typeof t=="object"&&!Array.isArray(t),"defer() only accepts plain objects");let r;this.abortPromise=new Promise((i,o)=>r=o),this.controller=new AbortController;let a=()=>r(new lf("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",a),this.controller.signal.addEventListener("abort",a),this.data=Object.entries(t).reduce((i,o)=>{let[l,u]=o;return Object.assign(i,{[l]:this.trackPromise(l,u)})},{}),this.done&&this.unlistenAbortSignal(),this.init=n}trackPromise(t,n){if(!(n instanceof Promise))return n;this.deferredKeys.push(t),this.pendingKeysSet.add(t);let r=Promise.race([n,this.abortPromise]).then(a=>this.onSettle(r,t,void 0,a),a=>this.onSettle(r,t,a));return r.catch(()=>{}),Object.defineProperty(r,"_tracked",{get:()=>!0}),r}onSettle(t,n,r,a){if(this.controller.signal.aborted&&r instanceof lf)return this.unlistenAbortSignal(),Object.defineProperty(t,"_error",{get:()=>r}),Promise.reject(r);if(this.pendingKeysSet.delete(n),this.done&&this.unlistenAbortSignal(),r===void 0&&a===void 0){let i=new Error('Deferred data for key "'+n+'" resolved/rejected with `undefined`, you must resolve/reject with a value or `null`.');return Object.defineProperty(t,"_error",{get:()=>i}),this.emit(!1,n),Promise.reject(i)}return a===void 0?(Object.defineProperty(t,"_error",{get:()=>r}),this.emit(!1,n),Promise.reject(r)):(Object.defineProperty(t,"_data",{get:()=>a}),this.emit(!1,n),a)}emit(t,n){this.subscribers.forEach(r=>r(t,n))}subscribe(t){return this.subscribers.add(t),()=>this.subscribers.delete(t)}cancel(){this.controller.abort(),this.pendingKeysSet.forEach((t,n)=>this.pendingKeysSet.delete(n)),this.emit(!0)}async resolveData(t){let n=!1;if(!this.done){let r=()=>this.cancel();t.addEventListener("abort",r),n=await new Promise(a=>{this.subscribe(i=>{t.removeEventListener("abort",r),(i||this.done)&&a(i)})})}return n}get done(){return this.pendingKeysSet.size===0}get unwrappedData(){return ge(this.data!==null&&this.done,"Can only unwrap data on initialized and settled deferreds"),Object.entries(this.data).reduce((t,n)=>{let[r,a]=n;return Object.assign(t,{[r]:eN(a)})},{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}}function ZR(e){return e instanceof Promise&&e._tracked===!0}function eN(e){if(!ZR(e))return e;if(e._error)throw e._error;return e._data}const tN=function(t,n){n===void 0&&(n={});let r=typeof n=="number"?{status:n}:n;return new XR(t,r)},fO=function(t,n){n===void 0&&(n=302);let r=n;typeof r=="number"?r={status:r}:typeof r.status>"u"&&(r.status=302);let a=new Headers(r.headers);return a.set("Location",t),new Response(null,gt({},r,{headers:a}))},nN=(e,t)=>{let n=fO(e,t);return n.headers.set("X-Remix-Reload-Document","true"),n};class Dg{constructor(t,n,r,a){a===void 0&&(a=!1),this.status=t,this.statusText=n||"",this.internal=a,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function Ag(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const dO=["post","put","patch","delete"],rN=new Set(dO),aN=["get",...dO],iN=new Set(aN),oN=new Set([301,302,303,307,308]),lN=new Set([307,308]),Hp={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},uN={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ki={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},pO=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,sN=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),hO="remix-router-transitions";function Fg(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;ge(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a;if(e.mapRouteProperties)a=e.mapRouteProperties;else if(e.detectErrorBoundary){let M=e.detectErrorBoundary;a=D=>({hasErrorBoundary:M(D)})}else a=sN;let i={},o=sm(e.routes,a,void 0,i),l,u=e.basename||"/",s=gt({v7_normalizeFormMethod:!1,v7_prependBasename:!1},e.future),d=null,p=new Set,h=null,_=null,g=null,O=e.hydrationData!=null,E=pi(o,e.history.location,u),v=null;if(E==null){let M=Kn(404,{pathname:e.history.location.pathname}),{matches:D,route:q}=cb(o);E=D,v={[q.id]:M}}let b=!E.some(M=>M.route.lazy)&&(!E.some(M=>M.route.loader)||e.hydrationData!=null),S,w={historyAction:e.history.action,location:e.history.location,matches:E,initialized:b,navigation:Hp,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||v,fetchers:new Map,blockers:new Map},$=ut.Pop,N=!1,k,I=!1,z=new Map,L=null,te=!1,ce=!1,ie=[],_e=[],Oe=new Map,tt=0,Xe=-1,H=new Map,X=new Set,ae=new Map,we=new Map,Me=new Map,ct=!1;function ft(){if(d=e.history.listen(M=>{let{action:D,location:q,delta:le}=M;if(ct){ct=!1;return}Ur(Me.size===0||le!=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 Ne=Cs({currentLocation:w.location,nextLocation:q,historyAction:D});if(Ne&&le!=null){ct=!0,e.history.go(le*-1),zi(Ne,{state:"blocked",location:q,proceed(){zi(Ne,{state:"proceeding",proceed:void 0,reset:void 0,location:q}),e.history.go(le)},reset(){let je=new Map(w.blockers);je.set(Ne,Ki),Te({blockers:je})}});return}return Vt(D,q)}),n){_N(t,z);let M=()=>wN(t,z);t.addEventListener("pagehide",M),L=()=>t.removeEventListener("pagehide",M)}return w.initialized||Vt(ut.Pop,w.location),S}function be(){d&&d(),L&&L(),p.clear(),k&&k.abort(),w.fetchers.forEach((M,D)=>$t(D)),w.blockers.forEach((M,D)=>Rl(D))}function Re(M){return p.add(M),()=>p.delete(M)}function Te(M,D){w=gt({},w,M),p.forEach(q=>q(w,{unstable_viewTransitionOpts:D}))}function Ze(M,D){var q,le;let Ne=w.actionData!=null&&w.navigation.formMethod!=null&&yr(w.navigation.formMethod)&&w.navigation.state==="loading"&&((q=M.state)==null?void 0:q._isRedirect)!==!0,je;D.actionData?Object.keys(D.actionData).length>0?je=D.actionData:je=null:Ne?je=w.actionData:je=null;let Ie=D.loaderData?sb(w.loaderData,D.loaderData,D.matches||[],D.errors):w.loaderData,ye=w.blockers;ye.size>0&&(ye=new Map(ye),ye.forEach((pt,ze)=>ye.set(ze,Ki)));let ve=N===!0||w.navigation.formMethod!=null&&yr(w.navigation.formMethod)&&((le=M.state)==null?void 0:le._isRedirect)!==!0;l&&(o=l,l=void 0),te||$===ut.Pop||($===ut.Push?e.history.push(M,M.state):$===ut.Replace&&e.history.replace(M,M.state));let nt;if($===ut.Pop){let pt=z.get(w.location.pathname);pt&&pt.has(M.pathname)?nt={currentLocation:w.location,nextLocation:M}:z.has(M.pathname)&&(nt={currentLocation:M,nextLocation:w.location})}else if(I){let pt=z.get(w.location.pathname);pt?pt.add(M.pathname):(pt=new Set([M.pathname]),z.set(w.location.pathname,pt)),nt={currentLocation:w.location,nextLocation:M}}Te(gt({},D,{actionData:je,loaderData:Ie,historyAction:$,location:M,initialized:!0,navigation:Hp,revalidation:"idle",restoreScrollPosition:kl(M,D.matches||w.matches),preventScrollReset:ve,blockers:ye}),nt),$=ut.Pop,N=!1,I=!1,te=!1,ce=!1,ie=[],_e=[]}async function dt(M,D){if(typeof M=="number"){e.history.go(M);return}let q=cm(w.location,w.matches,u,s.v7_prependBasename,M,D==null?void 0:D.fromRouteId,D==null?void 0:D.relative),{path:le,submission:Ne,error:je}=rb(s.v7_normalizeFormMethod,!1,q,D),Ie=w.location,ye=Ni(w.location,le,D&&D.state);ye=gt({},ye,e.history.encodeLocation(ye));let ve=D&&D.replace!=null?D.replace:void 0,nt=ut.Push;ve===!0?nt=ut.Replace:ve===!1||Ne!=null&&yr(Ne.formMethod)&&Ne.formAction===w.location.pathname+w.location.search&&(nt=ut.Replace);let pt=D&&"preventScrollReset"in D?D.preventScrollReset===!0:void 0,ze=Cs({currentLocation:Ie,nextLocation:ye,historyAction:nt});if(ze){zi(ze,{state:"blocked",location:ye,proceed(){zi(ze,{state:"proceeding",proceed:void 0,reset:void 0,location:ye}),dt(M,D)},reset(){let rt=new Map(w.blockers);rt.set(ze,Ki),Te({blockers:rt})}});return}return await Vt(nt,ye,{submission:Ne,pendingError:je,preventScrollReset:pt,replace:D&&D.replace,enableViewTransition:D&&D.unstable_viewTransition})}function ir(){if(oe(),Te({revalidation:"loading"}),w.navigation.state!=="submitting"){if(w.navigation.state==="idle"){Vt(w.historyAction,w.location,{startUninterruptedRevalidation:!0});return}Vt($||w.historyAction,w.navigation.location,{overrideNavigation:w.navigation})}}async function Vt(M,D,q){k&&k.abort(),k=null,$=M,te=(q&&q.startUninterruptedRevalidation)===!0,Es(w.location,w.matches),N=(q&&q.preventScrollReset)===!0,I=(q&&q.enableViewTransition)===!0;let le=l||o,Ne=q&&q.overrideNavigation,je=pi(le,D,u);if(!je){let rt=Kn(404,{pathname:D.pathname}),{matches:St,route:jr}=cb(le);Nl(),Ze(D,{matches:St,loaderData:{},errors:{[jr.id]:rt}});return}if(w.initialized&&!ce&&hN(w.location,D)&&!(q&&q.submission&&yr(q.submission.formMethod))){Ze(D,{matches:je});return}k=new AbortController;let Ie=Vl(e.history,D,k.signal,q&&q.submission),ye,ve;if(q&&q.pendingError)ve={[so(je).route.id]:q.pendingError};else if(q&&q.submission&&yr(q.submission.formMethod)){let rt=await or(Ie,D,q.submission,je,{replace:q.replace});if(rt.shortCircuited)return;ye=rt.pendingActionData,ve=rt.pendingActionError,Ne=Vp(D,q.submission),Ie=new Request(Ie.url,{signal:Ie.signal})}let{shortCircuited:nt,loaderData:pt,errors:ze}=await lr(Ie,D,je,Ne,q&&q.submission,q&&q.fetcherSubmission,q&&q.replace,ye,ve);nt||(k=null,Ze(D,gt({matches:je},ye?{actionData:ye}:{},{loaderData:pt,errors:ze})))}async function or(M,D,q,le,Ne){Ne===void 0&&(Ne={}),oe();let je=yN(D,q);Te({navigation:je});let Ie,ye=dm(le,D);if(!ye.route.action&&!ye.route.lazy)Ie={type:Rt.error,error:Kn(405,{method:M.method,pathname:D.pathname,routeId:ye.route.id})};else if(Ie=await Hl("action",M,ye,le,i,a,u),M.signal.aborted)return{shortCircuited:!0};if(yo(Ie)){let ve;return Ne&&Ne.replace!=null?ve=Ne.replace:ve=Ie.location===w.location.pathname+w.location.search,await de(w,Ie,{submission:q,replace:ve}),{shortCircuited:!0}}if(gu(Ie)){let ve=so(le,ye.route.id);return(Ne&&Ne.replace)!==!0&&($=ut.Push),{pendingActionData:{},pendingActionError:{[ve.route.id]:Ie.error}}}if(hi(Ie))throw Kn(400,{type:"defer-action"});return{pendingActionData:{[ye.route.id]:Ie.data}}}async function lr(M,D,q,le,Ne,je,Ie,ye,ve){let nt=le||Vp(D,Ne),pt=Ne||je||pb(nt),ze=l||o,[rt,St]=ab(e.history,w,q,pt,D,ce,ie,_e,ae,X,ze,u,ye,ve);if(Nl(et=>!(q&&q.some(hn=>hn.route.id===et))||rt&&rt.some(hn=>hn.route.id===et)),Xe=++tt,rt.length===0&&St.length===0){let et=qr();return Ze(D,gt({matches:q,loaderData:{},errors:ve||null},ye?{actionData:ye}:{},et?{fetchers:new Map(w.fetchers)}:{})),{shortCircuited:!0}}if(!te){St.forEach(hn=>{let cr=w.fetchers.get(hn.key),Xa=Gl(void 0,cr?cr.data:void 0);w.fetchers.set(hn.key,Xa)});let et=ye||w.actionData;Te(gt({navigation:nt},et?Object.keys(et).length===0?{actionData:null}:{actionData:et}:{},St.length>0?{fetchers:new Map(w.fetchers)}:{}))}St.forEach(et=>{Oe.has(et.key)&&Wt(et.key),et.controller&&Oe.set(et.key,et.controller)});let jr=()=>St.forEach(et=>Wt(et.key));k&&k.signal.addEventListener("abort",jr);let{results:$r,loaderResults:Ja,fetcherResults:Tl}=await Ae(w.matches,q,rt,St,M);if(M.signal.aborted)return{shortCircuited:!0};k&&k.signal.removeEventListener("abort",jr),St.forEach(et=>Oe.delete(et.key));let zn=fb($r);if(zn){if(zn.idx>=rt.length){let et=St[zn.idx-rt.length].key;X.add(et)}return await de(w,zn.result,{replace:Ie}),{shortCircuited:!0}}let{loaderData:sr,errors:Ui}=ub(w,q,rt,Ja,ve,St,Tl,we);we.forEach((et,hn)=>{et.subscribe(cr=>{(cr||et.done)&&we.delete(hn)})});let Il=qr(),Ml=Wn(Xe),Ll=Il||Ml||St.length>0;return gt({loaderData:sr,errors:Ui},Ll?{fetchers:new Map(w.fetchers)}:{})}function Bn(M){return w.fetchers.get(M)||uN}function Gt(M,D,q,le){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.");Oe.has(M)&&Wt(M);let Ne=l||o,je=cm(w.location,w.matches,u,s.v7_prependBasename,q,D,le==null?void 0:le.relative),Ie=pi(Ne,je,u);if(!Ie){B(M,D,Kn(404,{pathname:je}));return}let{path:ye,submission:ve,error:nt}=rb(s.v7_normalizeFormMethod,!0,je,le);if(nt){B(M,D,nt);return}let pt=dm(Ie,ye);if(N=(le&&le.preventScrollReset)===!0,ve&&yr(ve.formMethod)){Er(M,D,ye,pt,Ie,ve);return}ae.set(M,{routeId:D,path:ye}),Bt(M,D,ye,pt,Ie,ve)}async function Er(M,D,q,le,Ne,je){if(oe(),ae.delete(M),!le.route.action&&!le.route.lazy){let ht=Kn(405,{method:je.formMethod,pathname:q,routeId:D});B(M,D,ht);return}let Ie=w.fetchers.get(M),ye=bN(je,Ie);w.fetchers.set(M,ye),Te({fetchers:new Map(w.fetchers)});let ve=new AbortController,nt=Vl(e.history,q,ve.signal,je);Oe.set(M,ve);let pt=tt,ze=await Hl("action",nt,le,Ne,i,a,u);if(nt.signal.aborted){Oe.get(M)===ve&&Oe.delete(M);return}if(yo(ze))if(Oe.delete(M),Xe>pt){let ht=Qi(void 0);w.fetchers.set(M,ht),Te({fetchers:new Map(w.fetchers)});return}else{X.add(M);let ht=Gl(je);return w.fetchers.set(M,ht),Te({fetchers:new Map(w.fetchers)}),de(w,ze,{fetcherSubmission:je})}if(gu(ze)){B(M,D,ze.error);return}if(hi(ze))throw Kn(400,{type:"defer-action"});let rt=w.navigation.location||w.location,St=Vl(e.history,rt,ve.signal),jr=l||o,$r=w.navigation.state!=="idle"?pi(jr,w.navigation.location,u):w.matches;ge($r,"Didn't find any matches after fetcher action");let Ja=++tt;H.set(M,Ja);let Tl=Gl(je,ze.data);w.fetchers.set(M,Tl);let[zn,sr]=ab(e.history,w,$r,je,rt,ce,ie,_e,ae,X,jr,u,{[le.route.id]:ze.data},void 0);sr.filter(ht=>ht.key!==M).forEach(ht=>{let ca=ht.key,$s=w.fetchers.get(ca),Rs=Gl(void 0,$s?$s.data:void 0);w.fetchers.set(ca,Rs),Oe.has(ca)&&Wt(ca),ht.controller&&Oe.set(ca,ht.controller)}),Te({fetchers:new Map(w.fetchers)});let Ui=()=>sr.forEach(ht=>Wt(ht.key));ve.signal.addEventListener("abort",Ui);let{results:Il,loaderResults:Ml,fetcherResults:Ll}=await Ae(w.matches,$r,zn,sr,St);if(ve.signal.aborted)return;ve.signal.removeEventListener("abort",Ui),H.delete(M),Oe.delete(M),sr.forEach(ht=>Oe.delete(ht.key));let et=fb(Il);if(et){if(et.idx>=zn.length){let ht=sr[et.idx-zn.length].key;X.add(ht)}return de(w,et.result)}let{loaderData:hn,errors:cr}=ub(w,w.matches,zn,Ml,void 0,sr,Ll,we);if(w.fetchers.has(M)){let ht=Qi(ze.data);w.fetchers.set(M,ht)}let Xa=Wn(Ja);w.navigation.state==="loading"&&Ja>Xe?(ge($,"Expected pending action"),k&&k.abort(),Ze(w.navigation.location,{matches:$r,loaderData:hn,errors:cr,fetchers:new Map(w.fetchers)})):(Te(gt({errors:cr,loaderData:sb(w.loaderData,hn,$r,cr)},Xa||sr.length>0?{fetchers:new Map(w.fetchers)}:{})),ce=!1)}async function Bt(M,D,q,le,Ne,je){let Ie=w.fetchers.get(M),ye=Gl(je,Ie?Ie.data:void 0);w.fetchers.set(M,ye),Te({fetchers:new Map(w.fetchers)});let ve=new AbortController,nt=Vl(e.history,q,ve.signal);Oe.set(M,ve);let pt=tt,ze=await Hl("loader",nt,le,Ne,i,a,u);if(hi(ze)&&(ze=await gO(ze,nt.signal,!0)||ze),Oe.get(M)===ve&&Oe.delete(M),nt.signal.aborted)return;if(yo(ze))if(Xe>pt){let St=Qi(void 0);w.fetchers.set(M,St),Te({fetchers:new Map(w.fetchers)});return}else{X.add(M),await de(w,ze);return}if(gu(ze)){let St=so(w.matches,D);w.fetchers.delete(M),Te({fetchers:new Map(w.fetchers),errors:{[St.route.id]:ze.error}});return}ge(!hi(ze),"Unhandled fetcher deferred data");let rt=Qi(ze.data);w.fetchers.set(M,rt),Te({fetchers:new Map(w.fetchers)})}async function de(M,D,q){let{submission:le,fetcherSubmission:Ne,replace:je}=q===void 0?{}:q;D.revalidate&&(ce=!0);let Ie=Ni(M.location,D.location,{_isRedirect:!0});if(ge(Ie,"Expected a location on the redirect navigation"),n){let rt=!1;if(D.reloadDocument)rt=!0;else if(pO.test(D.location)){const St=e.history.createURL(D.location);rt=St.origin!==t.location.origin||Tn(St.pathname,u)==null}if(rt){je?t.location.replace(D.location):t.location.assign(D.location);return}}k=null;let ye=je===!0?ut.Replace:ut.Push,{formMethod:ve,formAction:nt,formEncType:pt}=M.navigation;!le&&!Ne&&ve&&nt&&pt&&(le=pb(M.navigation));let ze=le||Ne;if(lN.has(D.status)&&ze&&yr(ze.formMethod))await Vt(ye,Ie,{submission:gt({},ze,{formAction:D.location}),preventScrollReset:N});else{let rt=Vp(Ie,le);await Vt(ye,Ie,{overrideNavigation:rt,fetcherSubmission:Ne,preventScrollReset:N})}}async function Ae(M,D,q,le,Ne){let je=await Promise.all([...q.map(ve=>Hl("loader",Ne,ve,D,i,a,u)),...le.map(ve=>ve.matches&&ve.match&&ve.controller?Hl("loader",Vl(e.history,ve.path,ve.controller.signal),ve.match,ve.matches,i,a,u):{type:Rt.error,error:Kn(404,{pathname:ve.path})})]),Ie=je.slice(0,q.length),ye=je.slice(q.length);return await Promise.all([db(M,q,Ie,Ie.map(()=>Ne.signal),!1,w.loaderData),db(M,le.map(ve=>ve.match),ye,le.map(ve=>ve.controller?ve.controller.signal:null),!0)]),{results:je,loaderResults:Ie,fetcherResults:ye}}function oe(){ce=!0,ie.push(...Nl()),ae.forEach((M,D)=>{Oe.has(D)&&(_e.push(D),Wt(D))})}function B(M,D,q){let le=so(w.matches,D);$t(M),Te({errors:{[le.route.id]:q},fetchers:new Map(w.fetchers)})}function $t(M){let D=w.fetchers.get(M);Oe.has(M)&&!(D&&D.state==="loading"&&H.has(M))&&Wt(M),ae.delete(M),H.delete(M),X.delete(M),w.fetchers.delete(M)}function Wt(M){let D=Oe.get(M);ge(D,"Expected fetch controller: "+M),D.abort(),Oe.delete(M)}function ur(M){for(let D of M){let q=Bn(D),le=Qi(q.data);w.fetchers.set(D,le)}}function qr(){let M=[],D=!1;for(let q of X){let le=w.fetchers.get(q);ge(le,"Expected fetcher: "+q),le.state==="loading"&&(X.delete(q),M.push(q),D=!0)}return ur(M),D}function Wn(M){let D=[];for(let[q,le]of H)if(le0}function sa(M,D){let q=w.blockers.get(M)||Ki;return Me.get(M)!==D&&Me.set(M,D),q}function Rl(M){w.blockers.delete(M),Me.delete(M)}function zi(M,D){let q=w.blockers.get(M)||Ki;ge(q.state==="unblocked"&&D.state==="blocked"||q.state==="blocked"&&D.state==="blocked"||q.state==="blocked"&&D.state==="proceeding"||q.state==="blocked"&&D.state==="unblocked"||q.state==="proceeding"&&D.state==="unblocked","Invalid blocker state transition: "+q.state+" -> "+D.state);let le=new Map(w.blockers);le.set(M,D),Te({blockers:le})}function Cs(M){let{currentLocation:D,nextLocation:q,historyAction:le}=M;if(Me.size===0)return;Me.size>1&&Ur(!1,"A router only supports one blocker at a time");let Ne=Array.from(Me.entries()),[je,Ie]=Ne[Ne.length-1],ye=w.blockers.get(je);if(!(ye&&ye.state==="proceeding")&&Ie({currentLocation:D,nextLocation:q,historyAction:le}))return je}function Nl(M){let D=[];return we.forEach((q,le)=>{(!M||M(le))&&(q.cancel(),D.push(le),we.delete(le))}),D}function up(M,D,q){if(h=M,g=D,_=q||null,!O&&w.navigation===Hp){O=!0;let le=kl(w.location,w.matches);le!=null&&Te({restoreScrollPosition:le})}return()=>{h=null,g=null,_=null}}function xs(M,D){return _&&_(M,D.map(le=>lO(le,w.loaderData)))||M.key}function Es(M,D){if(h&&g){let q=xs(M,D);h[q]=g()}}function kl(M,D){if(h){let q=xs(M,D),le=h[q];if(typeof le=="number")return le}return null}function js(M){i={},l=sm(M,a,void 0,i)}return S={get basename(){return u},get state(){return w},get routes(){return o},get window(){return t},initialize:ft,subscribe:Re,enableScrollRestoration:up,navigate:dt,fetch:Gt,revalidate:ir,createHref:M=>e.history.createHref(M),encodeLocation:M=>e.history.encodeLocation(M),getFetcher:Bn,deleteFetcher:$t,dispose:be,getBlocker:sa,deleteBlocker:Rl,_internalFetchControllers:Oe,_internalActiveDeferreds:we,_internalSetRoutes:js},S}function cN(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function cm(e,t,n,r,a,i,o){let l,u;if(i!=null&&o!=="path"){l=[];for(let d of t)if(l.push(d),d.route.id===i){u=d;break}}else l=t,u=t[t.length-1];let s=Gf(a||".",cs(l).map(d=>d.pathnameBase),Tn(e.pathname,n)||e.pathname,o==="path");return a==null&&(s.search=e.search,s.hash=e.hash),(a==null||a===""||a===".")&&u&&u.route.index&&!Bg(s.search)&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(s.pathname=s.pathname==="/"?n:zr([n,s.pathname])),Cr(s)}function rb(e,t,n,r){if(!r||!cN(r))return{path:n};if(r.formMethod&&!gN(r.formMethod))return{path:n,error:Kn(405,{method:r.formMethod})};let a=()=>({path:n,error:Kn(400,{type:"invalid-body"})}),i=r.formMethod||"get",o=e?i.toUpperCase():i.toLowerCase(),l=vO(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!yr(o))return a();let h=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((_,g)=>{let[O,E]=g;return""+_+O+"="+E+` `},""):String(r.body);return{path:n,submission:{formMethod:o,formAction:l,formEncType:r.formEncType,formData:void 0,json:void 0,text:h}}}else if(r.formEncType==="application/json"){if(!yr(o))return a();try{let h=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:o,formAction:l,formEncType:r.formEncType,formData:void 0,json:h,text:void 0}}}catch{return a()}}}ge(typeof FormData=="function","FormData is not available in this environment");let u,s;if(r.formData)u=fm(r.formData),s=r.formData;else if(r.body instanceof FormData)u=fm(r.body),s=r.body;else if(r.body instanceof URLSearchParams)u=r.body,s=lb(u);else if(r.body==null)u=new URLSearchParams,s=new FormData;else try{u=new URLSearchParams(r.body),s=lb(u)}catch{return a()}let d={formMethod:o,formAction:l,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:s,json:void 0,text:void 0};if(yr(d.formMethod))return{path:n,submission:d};let p=nr(n);return t&&p.search&&Bg(p.search)&&u.append("index",""),p.search="?"+u,{path:Cr(p),submission:d}}function fN(e,t){let n=e;if(t){let r=e.findIndex(a=>a.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function ab(e,t,n,r,a,i,o,l,u,s,d,p,h,_){let g=_?Object.values(_)[0]:h?Object.values(h)[0]:void 0,O=e.createURL(t.location),E=e.createURL(a),v=_?Object.keys(_)[0]:void 0,S=fN(n,v).filter(($,N)=>{if($.route.lazy)return!0;if($.route.loader==null)return!1;if(dN(t.loaderData,t.matches[N],$)||o.some(z=>z===$.route.id))return!0;let k=t.matches[N],I=$;return ib($,gt({currentUrl:O,currentParams:k.params,nextUrl:E,nextParams:I.params},r,{actionResult:g,defaultShouldRevalidate:i||O.pathname+O.search===E.pathname+E.search||O.search!==E.search||mO(k,I)}))}),w=[];return u.forEach(($,N)=>{if(!n.some(te=>te.route.id===$.routeId))return;let k=pi(d,$.path,p);if(!k){w.push({key:N,routeId:$.routeId,path:$.path,matches:null,match:null,controller:null});return}let I=t.fetchers.get(N),z=dm(k,$.path),L=!1;s.has(N)?L=!1:l.includes(N)?L=!0:I&&I.state!=="idle"&&I.data===void 0?L=i:L=ib(z,gt({currentUrl:O,currentParams:t.matches[t.matches.length-1].params,nextUrl:E,nextParams:n[n.length-1].params},r,{actionResult:g,defaultShouldRevalidate:i})),L&&w.push({key:N,routeId:$.routeId,path:$.path,matches:k,match:z,controller:new AbortController})}),[S,w]}function dN(e,t,n){let r=!t||n.route.id!==t.route.id,a=e[n.route.id]===void 0;return r||a}function mO(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function ib(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function ob(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let a=n[e.id];ge(a,"No route found in manifest");let i={};for(let o in r){let u=a[o]!==void 0&&o!=="hasErrorBoundary";Ur(!u,'Route "'+a.id+'" has a static property "'+o+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+o+'" will be ignored.')),!u&&!NR.has(o)&&(i[o]=r[o])}Object.assign(a,i),Object.assign(a,gt({},t(a),{lazy:void 0}))}async function Hl(e,t,n,r,a,i,o,l){l===void 0&&(l={});let u,s,d,p=g=>{let O,E=new Promise((v,b)=>O=b);return d=()=>O(),t.signal.addEventListener("abort",d),Promise.race([g({request:t,params:n.params,context:l.requestContext}),E])};try{let g=n.route[e];if(n.route.lazy)if(g){let O,E=await Promise.all([p(g).catch(v=>{O=v}),ob(n.route,i,a)]);if(O)throw O;s=E[0]}else if(await ob(n.route,i,a),g=n.route[e],g)s=await p(g);else if(e==="action"){let O=new URL(t.url),E=O.pathname+O.search;throw Kn(405,{method:t.method,pathname:E,routeId:n.route.id})}else return{type:Rt.data,data:void 0};else if(g)s=await p(g);else{let O=new URL(t.url),E=O.pathname+O.search;throw Kn(404,{pathname:E})}ge(s!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(g){u=Rt.error,s=g}finally{d&&t.signal.removeEventListener("abort",d)}if(vN(s)){let g=s.status;if(oN.has(g)){let v=s.headers.get("Location");if(ge(v,"Redirects returned/thrown from loaders/actions must have a Location header"),!pO.test(v))v=cm(new URL(t.url),r.slice(0,r.indexOf(n)+1),o,!0,v);else if(!l.isStaticRequest){let b=new URL(t.url),S=v.startsWith("//")?new URL(b.protocol+v):new URL(v),w=Tn(S.pathname,o)!=null;S.origin===b.origin&&w&&(v=S.pathname+S.search+S.hash)}if(l.isStaticRequest)throw s.headers.set("Location",v),s;return{type:Rt.redirect,status:g,location:v,revalidate:s.headers.get("X-Remix-Revalidate")!==null,reloadDocument:s.headers.get("X-Remix-Reload-Document")!==null}}if(l.isRouteRequest)throw{type:u===Rt.error?Rt.error:Rt.data,response:s};let O,E=s.headers.get("Content-Type");return E&&/\bapplication\/json\b/.test(E)?O=await s.json():O=await s.text(),u===Rt.error?{type:u,error:new Dg(g,s.statusText,O),headers:s.headers}:{type:Rt.data,data:O,statusCode:s.status,headers:s.headers}}if(u===Rt.error)return{type:u,error:s};if(mN(s)){var h,_;return{type:Rt.deferred,deferredData:s,statusCode:(h=s.init)==null?void 0:h.status,headers:((_=s.init)==null?void 0:_.headers)&&new Headers(s.init.headers)}}return{type:Rt.data,data:s}}function Vl(e,t,n,r){let a=e.createURL(vO(t)).toString(),i={signal:n};if(r&&yr(r.formMethod)){let{formMethod:o,formEncType:l}=r;i.method=o.toUpperCase(),l==="application/json"?(i.headers=new Headers({"Content-Type":l}),i.body=JSON.stringify(r.json)):l==="text/plain"?i.body=r.text:l==="application/x-www-form-urlencoded"&&r.formData?i.body=fm(r.formData):i.body=r.formData}return new Request(a,i)}function fm(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function lb(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function pN(e,t,n,r,a){let i={},o=null,l,u=!1,s={};return n.forEach((d,p)=>{let h=t[p].route.id;if(ge(!yo(d),"Cannot handle redirect results in processLoaderData"),gu(d)){let _=so(e,h),g=d.error;r&&(g=Object.values(r)[0],r=void 0),o=o||{},o[_.route.id]==null&&(o[_.route.id]=g),i[h]=void 0,u||(u=!0,l=Ag(d.error)?d.error.status:500),d.headers&&(s[h]=d.headers)}else hi(d)?(a.set(h,d.deferredData),i[h]=d.deferredData.data):i[h]=d.data,d.statusCode!=null&&d.statusCode!==200&&!u&&(l=d.statusCode),d.headers&&(s[h]=d.headers)}),r&&(o=r,i[Object.keys(r)[0]]=void 0),{loaderData:i,errors:o,statusCode:l||200,loaderHeaders:s}}function ub(e,t,n,r,a,i,o,l){let{loaderData:u,errors:s}=pN(t,n,r,a,l);for(let d=0;dr.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function cb(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 Kn(e,t){let{pathname:n,routeId:r,method:a,type:i}=t===void 0?{}:t,o="Unknown Server Error",l="Unknown @remix-run/router error";return e===400?(o="Bad Request",a&&n&&r?l="You made a "+a+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":i==="defer-action"?l="defer() is not supported in actions":i==="invalid-body"&&(l="Unable to encode submission body")):e===403?(o="Forbidden",l='Route "'+r+'" does not match URL "'+n+'"'):e===404?(o="Not Found",l='No route matches URL "'+n+'"'):e===405&&(o="Method Not Allowed",a&&n&&r?l="You made a "+a.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":a&&(l='Invalid request method "'+a.toUpperCase()+'"')),new Dg(e||500,o,new Error(l),!0)}function fb(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(yo(n))return{result:n,idx:t}}}function vO(e){let t=typeof e=="string"?nr(e):e;return Cr(gt({},t,{hash:""}))}function hN(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function hi(e){return e.type===Rt.deferred}function gu(e){return e.type===Rt.error}function yo(e){return(e&&e.type)===Rt.redirect}function mN(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 vN(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function gN(e){return iN.has(e.toLowerCase())}function yr(e){return rN.has(e.toLowerCase())}async function db(e,t,n,r,a,i){for(let o=0;op.route.id===u.route.id),d=s!=null&&!mO(s,u)&&(i&&i[u.route.id])!==void 0;if(hi(l)&&(a||d)){let p=r[o];ge(p,"Expected an AbortSignal for revalidating fetcher deferred result"),await gO(l,p,a).then(h=>{h&&(n[o]=h||n[o])})}}}async function gO(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:Rt.data,data:e.deferredData.unwrappedData}}catch(a){return{type:Rt.error,error:a}}return{type:Rt.data,data:e.deferredData.data}}}function Bg(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function dm(e,t){let n=typeof t=="string"?nr(t).search:t.search;if(e[e.length-1].route.index&&Bg(n||""))return e[e.length-1];let r=cs(e);return r[r.length-1]}function pb(e){let{formMethod:t,formAction:n,formEncType:r,text:a,formData:i,json:o}=e;if(!(!t||!n||!r)){if(a!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:a};if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:i,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:o,text:void 0}}}function Vp(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 yN(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 Gl(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 bN(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 Qi(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 _N(e,t){try{let n=e.sessionStorage.getItem(hO);if(n){let r=JSON.parse(n);for(let[a,i]of Object.entries(r||{}))i&&Array.isArray(i)&&t.set(a,new Set(i||[]))}}catch{}}function wN(e,t){if(t.size>0){let n={};for(let[r,a]of t)n[r]=[...a];try{e.sessionStorage.setItem(hO,JSON.stringify(n))}catch(r){Ur(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/** * React Router v6.17.0 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function ki(){return ki=Object.assign?Object.assign.bind():function(e){for(var t=1;tAu(e,t),[t,e])}function _O(e){C.useContext(rr).static||C.useLayoutEffect(e)}function ar(){let{isDataRoute:e}=C.useContext(Pn);return e?DN():ON()}function ON(){Ga()||ge(!1);let e=C.useContext(vl),{basename:t,navigator:n}=C.useContext(rr),{matches:r}=C.useContext(Pn),{pathname:a}=Fn(),i=JSON.stringify(cs(r).map(u=>u.pathnameBase)),o=C.useRef(!1);return _O(()=>{o.current=!0}),C.useCallback(function(u,s){if(s===void 0&&(s={}),!o.current)return;if(typeof u=="number"){n.go(u);return}let d=Gf(u,JSON.parse(i),a,s.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:zr([t,d.pathname])),(s.replace?n.replace:n.push)(d,s.state,s)},[t,n,i,a,e])}const wO=C.createContext(null);function CN(){return C.useContext(wO)}function SO(e){let t=C.useContext(Pn).outlet;return t&&C.createElement(wO.Provider,{value:e},t)}function yl(){let{matches:e}=C.useContext(Pn),t=e[e.length-1];return t?t.params:{}}function bl(e,t){let{relative:n}=t===void 0?{}:t,{matches:r}=C.useContext(Pn),{pathname:a}=Fn(),i=JSON.stringify(cs(r).map(o=>o.pathnameBase));return C.useMemo(()=>Gf(e,JSON.parse(i),a,n==="path"),[e,i,a,n])}function PO(e,t){return OO(e,t)}function OO(e,t,n){Ga()||ge(!1);let{navigator:r}=C.useContext(rr),{matches:a}=C.useContext(Pn),i=a[a.length-1],o=i?i.params:{};i&&i.pathname;let l=i?i.pathnameBase:"/";i&&i.route;let u=Fn(),s;if(t){var d;let O=typeof t=="string"?nr(t):t;l==="/"||(d=O.pathname)!=null&&d.startsWith(l)||ge(!1),s=O}else s=u;let p=s.pathname||"/",h=l==="/"?p:p.slice(l.length)||"/",_=pi(e,{pathname:h}),g=CO(_&&_.map(O=>Object.assign({},O,{params:Object.assign({},o,O.params),pathname:zr([l,r.encodeLocation?r.encodeLocation(O.pathname).pathname:O.pathname]),pathnameBase:O.pathnameBase==="/"?l:zr([l,r.encodeLocation?r.encodeLocation(O.pathnameBase).pathname:O.pathnameBase])})),a,n);return t&&g?C.createElement(gl.Provider,{value:{location:ki({pathname:"/",search:"",hash:"",state:null,key:"default"},s),navigationType:ut.Pop}},g):g}function xN(){let e=$O(),t=Ag(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},i=null;return C.createElement(C.Fragment,null,C.createElement("h2",null,"Unexpected Application Error!"),C.createElement("h3",{style:{fontStyle:"italic"}},t),n?C.createElement("pre",{style:a},n):null,i)}const EN=C.createElement(xN,null);class jN extends C.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error?C.createElement(Pn.Provider,{value:this.props.routeContext},C.createElement(yO.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function $N(e){let{routeContext:t,match:n,children:r}=e,a=C.useContext(vl);return a&&a.static&&a.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=n.route.id),C.createElement(Pn.Provider,{value:t},r)}function CO(e,t,n){var r;if(t===void 0&&(t=[]),n===void 0&&(n=null),e==null){var a;if((a=n)!=null&&a.errors)e=n.matches;else return null}let i=e,o=(r=n)==null?void 0:r.errors;if(o!=null){let l=i.findIndex(u=>u.route.id&&(o==null?void 0:o[u.route.id]));l>=0||ge(!1),i=i.slice(0,Math.min(i.length,l+1))}return i.reduceRight((l,u,s)=>{let d=u.route.id?o==null?void 0:o[u.route.id]:null,p=null;n&&(p=u.route.errorElement||EN);let h=t.concat(i.slice(0,s+1)),_=()=>{let g;return d?g=p:u.route.Component?g=C.createElement(u.route.Component,null):u.route.element?g=u.route.element:g=l,C.createElement($N,{match:u,routeContext:{outlet:l,matches:h,isDataRoute:n!=null},children:g})};return n&&(u.route.ErrorBoundary||u.route.errorElement||s===0)?C.createElement(jN,{location:n.location,revalidation:n.revalidation,component:p,error:d,children:_(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):_()},null)}var Kf=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Kf||{}),In=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}(In||{});function Wg(e){let t=C.useContext(vl);return t||ge(!1),t}function Ka(e){let t=C.useContext(fs);return t||ge(!1),t}function RN(e){let t=C.useContext(Pn);return t||ge(!1),t}function Qf(e){let t=RN(),n=t.matches[t.matches.length-1];return n.route.id||ge(!1),n.route.id}function xO(){return Qf(In.UseRouteId)}function EO(){return Ka(In.UseNavigation).navigation}function NN(){let e=Wg(Kf.UseRevalidator),t=Ka(In.UseRevalidator);return C.useMemo(()=>({revalidate:e.router.revalidate,state:t.revalidation}),[e.router.revalidate,t.revalidation])}function jO(){let{matches:e,loaderData:t}=Ka(In.UseMatches);return C.useMemo(()=>e.map(n=>lO(n,t)),[e,t])}function kN(){let e=Ka(In.UseLoaderData),t=Qf(In.UseLoaderData);if(e.errors&&e.errors[t]!=null){console.error("You cannot `useLoaderData` in an errorElement (routeId: "+t+")");return}return e.loaderData[t]}function TN(e){return Ka(In.UseRouteLoaderData).loaderData[e]}function IN(){let e=Ka(In.UseActionData);return C.useContext(Pn)||ge(!1),Object.values((e==null?void 0:e.actionData)||{})[0]}function $O(){var e;let t=C.useContext(yO),n=Ka(In.UseRouteError),r=Qf(In.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function RO(){let e=C.useContext(uf);return e==null?void 0:e._data}function MN(){let e=C.useContext(uf);return e==null?void 0:e._error}let LN=0;function NO(e){let{router:t,basename:n}=Wg(Kf.UseBlocker),r=Ka(In.UseBlocker),[a,i]=C.useState(""),o=C.useCallback(l=>{if(typeof e!="function")return!!e;if(n==="/")return e(l);let{currentLocation:u,nextLocation:s,historyAction:d}=l;return e({currentLocation:ki({},u,{pathname:Tn(u.pathname,n)||u.pathname}),nextLocation:ki({},s,{pathname:Tn(s.pathname,n)||s.pathname}),historyAction:d})},[n,e]);return C.useEffect(()=>{let l=String(++LN);return i(l),()=>t.deleteBlocker(l)},[t]),C.useEffect(()=>{a!==""&&t.getBlocker(a,o)},[t,a,o]),a&&r.blockers.has(a)?r.blockers.get(a):Ki}function DN(){let{router:e}=Wg(Kf.UseNavigateStable),t=Qf(In.UseNavigateStable),n=C.useRef(!1);return _O(()=>{n.current=!0}),C.useCallback(function(a,i){i===void 0&&(i={}),n.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,ki({fromRouteId:t},i)))},[e,t])}const AN="startTransition",hb=Yw[AN];function FN(e){let{basename:t,children:n,initialEntries:r,initialIndex:a,future:i}=e,o=C.useRef();o.current==null&&(o.current=rO({initialEntries:r,initialIndex:a,v5Compat:!0}));let l=o.current,[u,s]=C.useState({action:l.action,location:l.location}),{v7_startTransition:d}=i||{},p=C.useCallback(h=>{d&&hb?hb(()=>s(h)):s(h)},[s,d]);return C.useLayoutEffect(()=>l.listen(p),[l,p]),C.createElement(_l,{basename:t,children:n,location:u.location,navigationType:u.action,navigator:l})}function zg(e){let{to:t,replace:n,state:r,relative:a}=e;Ga()||ge(!1);let{matches:i}=C.useContext(Pn),{pathname:o}=Fn(),l=ar(),u=Gf(t,cs(i).map(d=>d.pathnameBase),o,a==="path"),s=JSON.stringify(u);return C.useEffect(()=>l(JSON.parse(s),{replace:n,state:r,relative:a}),[l,s,a,n,r]),null}function BN(e){return SO(e.context)}function De(e){ge(!1)}function _l(e){let{basename:t="/",children:n=null,location:r,navigationType:a=ut.Pop,navigator:i,static:o=!1}=e;Ga()&&ge(!1);let l=t.replace(/^\/*/,"/"),u=C.useMemo(()=>({basename:l,navigator:i,static:o}),[l,i,o]);typeof r=="string"&&(r=nr(r));let{pathname:s="/",search:d="",hash:p="",state:h=null,key:_="default"}=r,g=C.useMemo(()=>{let O=Tn(s,l);return O==null?null:{location:{pathname:O,search:d,hash:p,state:h,key:_},navigationType:a}},[l,s,d,p,h,_,a]);return g==null?null:C.createElement(rr.Provider,{value:u},C.createElement(gl.Provider,{children:n,value:g}))}function kO(e){let{children:t,location:n}=e;return PO(Fu(t),n)}function WN(e){let{children:t,errorElement:n,resolve:r}=e;return C.createElement(UN,{resolve:r,errorElement:n},C.createElement(qN,null,t))}var qn=function(e){return e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error",e}(qn||{});const zN=new Promise(()=>{});class UN extends C.Component{constructor(t){super(t),this.state={error:null}}static getDerivedStateFromError(t){return{error:t}}componentDidCatch(t,n){console.error(" caught the following error during render",t,n)}render(){let{children:t,errorElement:n,resolve:r}=this.props,a=null,i=qn.pending;if(!(r instanceof Promise))i=qn.success,a=Promise.resolve(),Object.defineProperty(a,"_tracked",{get:()=>!0}),Object.defineProperty(a,"_data",{get:()=>r});else if(this.state.error){i=qn.error;let o=this.state.error;a=Promise.reject().catch(()=>{}),Object.defineProperty(a,"_tracked",{get:()=>!0}),Object.defineProperty(a,"_error",{get:()=>o})}else r._tracked?(a=r,i=a._error!==void 0?qn.error:a._data!==void 0?qn.success:qn.pending):(i=qn.pending,Object.defineProperty(r,"_tracked",{get:()=>!0}),a=r.then(o=>Object.defineProperty(r,"_data",{get:()=>o}),o=>Object.defineProperty(r,"_error",{get:()=>o})));if(i===qn.error&&a._error instanceof lf)throw zN;if(i===qn.error&&!n)throw a._error;if(i===qn.error)return C.createElement(uf.Provider,{value:a,children:n});if(i===qn.success)return C.createElement(uf.Provider,{value:a,children:t});throw a}}function qN(e){let{children:t}=e,n=RO(),r=typeof t=="function"?t(n):t;return C.createElement(C.Fragment,null,r)}function Fu(e,t){t===void 0&&(t=[]);let n=[];return C.Children.forEach(e,(r,a)=>{if(!C.isValidElement(r))return;let i=[...t,a];if(r.type===C.Fragment){n.push.apply(n,Fu(r.props.children,i));return}r.type!==De&&ge(!1),!r.props.index||!r.props.children||ge(!1);let o={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Fu(r.props.children,i)),n.push(o)}),n}function HN(e){return CO(e)}function Ug(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:C.createElement(e.Component),Component:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:C.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}function VN(e,t){return Fg({basename:t==null?void 0:t.basename,future:ki({},t==null?void 0:t.future,{v7_prependBasename:!0}),history:rO({initialEntries:t==null?void 0:t.initialEntries,initialIndex:t==null?void 0:t.initialIndex}),hydrationData:t==null?void 0:t.hydrationData,routes:e,mapRouteProperties:Ug}).initialize()}/** * React Router DOM v6.17.0 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Mn(){return Mn=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[a]=e[a]);return n}const Nc="get",Gp="application/x-www-form-urlencoded";function Yf(e){return e!=null&&typeof e.tagName=="string"}function GN(e){return Yf(e)&&e.tagName.toLowerCase()==="button"}function KN(e){return Yf(e)&&e.tagName.toLowerCase()==="form"}function QN(e){return Yf(e)&&e.tagName.toLowerCase()==="input"}function YN(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function JN(e,t){return e.button===0&&(!t||t==="_self")&&!YN(e)}function sf(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(a=>[n,a]):[[n,r]])},[]))}function XN(e,t){let n=sf(e);return t&&t.forEach((r,a)=>{n.has(a)||t.getAll(a).forEach(i=>{n.append(a,i)})}),n}let tc=null;function ZN(){if(tc===null)try{new FormData(document.createElement("form"),0),tc=!1}catch{tc=!0}return tc}const ek=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Kp(e){return e!=null&&!ek.has(e)?null:e}function TO(e,t){let n,r,a,i,o;if(KN(e)){let l=e.getAttribute("action");r=l?Tn(l,t):null,n=e.getAttribute("method")||Nc,a=Kp(e.getAttribute("enctype"))||Gp,i=new FormData(e)}else if(GN(e)||QN(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a