PageSourceSearch

https://app.vibenetwork.ai/assets/vendor-De2NIrSl.js

js vibenetwork.ai collected 2026-10-05 14:00:27 UTC 150,351 bytes, 37 lines download raw bytes

vendor: 5,007 bytes, lines 1-17
1var Ma=e=>{throw TypeError(e)};var wn=(e,t,r)=>t.has(e)||Ma("Cannot "+r);var d=(e,t,r)=>(wn(e,t,"read from private field"),r?r.call(e):t.get(e)),$=(e,t,r)=>t.has(e)?Ma("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),L=(e,t,r,n)=>(wn(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),V=(e,t,r)=>(wn(e,t,"access private method"),r);var Gr=(e,t,r,n)=>({set _(a){L(e,t,a,r)},get _(){return d(e,t,n)}});function Ks(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const a in n)if(a!=="default"&&!(a in e)){const i=Object.getOwnPropertyDescriptor(n,a);i&&Object.defineProperty(e,a,i.get?i:{enumerable:!0,get:()=>n[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var fc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ys(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var bn={exports:{}},Sr={};/**
2 * @license React
3 * react-jsx-runtime.production.js
4 *
5 * Copyright (c) Meta Platforms, Inc. and affiliates.
6 *
7 * This source code is licensed under the MIT license found in the
8 * LICENSE file in the root directory of this source tree.
9 */var La;function Vs(){if(La)return Sr;La=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,a,i){var s=null;if(i!==void 0&&(s=""+i),a.key!==void 0&&(s=""+a.key),"key"in a){i={};for(var o in a)o!=="key"&&(i[o]=a[o])}else i=a;return a=i.ref,{$$typeof:e,type:n,key:s,ref:a!==void 0?a:null,props:i}}return Sr.Fragment=t,Sr.jsx=r,Sr.jsxs=r,Sr}var _a;function Gs(){return _a||(_a=1,bn.exports=Vs()),bn.exports}var Js=Gs(),En={exports:{}},W={};/**
10 * @license React
11 * react.production.js
12 *
13 * Copyright (c) Meta Platforms, Inc. and affiliates.
14 *
15 * This source code is licensed under the MIT license found in the
16 * LICENSE file in the root directory of this source tree.
17 */var Da;function Xs(){if(Da)return W;Da=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),s=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),c=Symbol.for("react.lazy"),u=Symbol.for("react.activity"),p=Symbol.for("react.view_transition"),R=Symbol.iterator;function b(y){return y===null||typeof y!="object"?null:(y=R&&y[R]||y["@@iterator"],typeof y=="function"?y:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,_={};function O(y,C,D){this.props=y,this.context=C,this.refs=_,this.updater=D||S}O.prototype.isReactComponent={},O.prototype.setState=function(y,C){if(typeof y!="object"&&typeof y!="function"&&y!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,y,C,"setState")},O.prototype.forceUpdate=function(y){this.updater.enqueueForceUpdate(this,y,"forceUpdate")};function M(){}M.prototype=O.prototype;function A(y,C,D){this.props=y,this.context=C,this.refs=_,this.updater=D||S}var T=A.prototype=new M;T.constructor=A,E(T,O.prototype),T.isPureReactComponent=!0;var K=Array.isArray;function q(){}var v={H:null,A:null,T:null,S:null},N=Object.prototype.hasOwnProperty;function k(y,C,D){var I=D.ref;return{$$typeof:e,type:y,key:C,ref:I!==void 0?I:null,props:D}}function ge(y,C){return k(y.type,C,y.props)}function te(y){return typeof y=="object"&&y!==null&&y.$$typeof===e}function Ce(y){var C={"=":"=0",":":"=2"};return"$"+y.replace(/[=:]/g,function(D){return C[D]})}var ce=/\/+/g;function fe(y,C){return typeof y=="object"&&y!==null&&y.key!=null?Ce(""+y.key):C.toString(36)}function Ye(y){switch(y.status){case"fulfilled":return y.value;case"rejected":throw y.reason;default:switch(typeof y.status=="string"?y.then(q,q):(y.status="pending",y.then(function(C){y.status==="pending"&&(y.status="fulfilled",y.value=C)},function(C){y.status==="pending"&&(y.status="rejected",y.reason=C)})),y.status){case"fulfilled":return y.value;case"rejected":throw y.reason}}throw y}function J(y,C,D,I,X){var Z=typeof y;(Z==="undefined"||Z==="boolean")&&(y=null);var le=!1;if(y===null)le=!0;else switch(Z){case"bigint":case"string":case"number":le=!0;break;case"object":switch(y.$$typeof){case e:case t:le=!0;break;case c:return le=y._init,J(le(y._payload),C,D,I,X)}}if(le)return X=X(y),le=I===""?"."+fe(y,0):I,K(X)?(D="",le!=null&&(D=le.replace(ce,"$&/")+"/"),J(X,C,D,"",function(Pe){return Pe})):X!=null&&(te(X)&&(X=ge(X,D+(X.key==null||y&&y.key===X.key?"":(""+X.key).replace(ce,"$&/")+"/")+le)),C.push(X)),1;le=0;var ze=I===""?".":I+":";if(K(y))for(var Te=0;Te<y.length;Te++)I=y[Te],Z=ze+fe(I,Te),le+=J(I,C,D,Z,X);else if(Te=b(y),typeof Te=="function")for(y=Te.call(y),Te=0;!(I=y.next()).done;
vendor: 2,598 bytes, line 17
17)I=I.value,Z=ze+fe(I,Te++),le+=J(I,C,D,Z,X);else if(Z==="object"){if(typeof y.then=="function")return J(Ye(y),C,D,I,X);throw C=String(y),Error("Objects are not valid as a React child (found: "+(C==="[object Object]"?"object with keys {"+Object.keys(y).join(", ")+"}":C)+"). If you meant to render a collection of children, use an array instead.")}return le}function he(y,C,D){if(y==null)return y;var I=[],X=0;return J(y,I,"","",function(Z){return C.call(D,Z,X++)}),I}function oe(y){if(y._status===-1){var C=y._result,D=C();D.then(function(I){(y._status===0||y._status===-1)&&(y._status=1,y._result=I,D.status===void 0&&(D.status="fulfilled",D.value=I))},function(I){(y._status===0||y._status===-1)&&(y._status=2,y._result=I,D.status===void 0&&(D.status="rejected",D.reason=I))}),y._status===-1&&(y._status=0,y._result=D)}if(y._status===1)return y._result.default;throw y._result}var Ee=typeof reportError=="function"?reportError:function(y){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var C=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof y=="object"&&y!==null&&typeof y.message=="string"?String(y.message):String(y),error:y});if(!window.dispatchEvent(C))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",y);return}console.error(y)};function pe(y){var C=v.T,D={};D.types=C!==null?C.types:null,v.T=D;try{var I=y(),X=v.S;X!==null&&X(D,I),typeof I=="object"&&I!==null&&typeof I.then=="function"&&I.then(q,Ee)}catch(Z){Ee(Z)}finally{C!==null&&D.types!==null&&(C.types=D.types),v.T=C}}function Se(y){var C=v.T;if(C!==null){var D=C.types;D===null?C.types=[y]:D.indexOf(y)===-1&&D.push(y)}else pe(Se.bind(null,y))}var Oe={map:he,forEach:function(y,C,D){he(y,function(){C.apply(this,arguments)},D)},count:function(y){var C=0;return he(y,function(){C++}),C},toArray:function(y){return he(y,function(C){return C})||[]},only:function(y){if(!te(y))throw Error("React.Children.only expected to receive a single React element child.");return y}};return W.Activity=u,W.Children=Oe,W.Component=O,W.Fragment=r,W.Profiler=a,W.PureComponent=A,W.StrictMode=n,W.Suspense=l,W.ViewTransition=p,W.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=v,W.__COMPILER_RUNTIME={__proto__:null,c:function(y){return v.H.useMemoCache(y)}},W.addTransitionType=Se,W.cache=function(y){return function(){return y.apply(null,arguments)}},W.cacheSignal=function(){return null},W.cloneElement=function(y,C,D){if(y==null)throw Error("The argument must be a React element, but you passed "+y+".");var I=E({},y.props),X=y.key;
vendor: 8,520 bytes, lines 17-25
17if(C!=null)for(Z in C.key!==void 0&&(X=""+C.key),C)!N.call(C,Z)||Z==="key"||Z==="__self"||Z==="__source"||Z==="ref"&&C.ref===void 0||(I[Z]=C[Z]);var Z=arguments.length-2;if(Z===1)I.children=D;else if(1<Z){for(var le=Array(Z),ze=0;ze<Z;ze++)le[ze]=arguments[ze+2];I.children=le}return k(y.type,X,I)},W.createContext=function(y){return y={$$typeof:s,_currentValue:y,_currentValue2:y,_threadCount:0,Provider:null,Consumer:null},y.Provider=y,y.Consumer={$$typeof:i,_context:y},y},W.createElement=function(y,C,D){var I,X={},Z=null;if(C!=null)for(I in C.key!==void 0&&(Z=""+C.key),C)N.call(C,I)&&I!=="key"&&I!=="__self"&&I!=="__source"&&(X[I]=C[I]);var le=arguments.length-2;if(le===1)X.children=D;else if(1<le){for(var ze=Array(le),Te=0;Te<le;Te++)ze[Te]=arguments[Te+2];X.children=ze}if(y&&y.defaultProps)for(I in le=y.defaultProps,le)X[I]===void 0&&(X[I]=le[I]);return k(y,Z,X)},W.createRef=function(){return{current:null}},W.forwardRef=function(y){return{$$typeof:o,render:y}},W.isValidElement=te,W.lazy=function(y){return{$$typeof:c,_payload:{_status:-1,_result:y},_init:oe}},W.memo=function(y,C){return{$$typeof:f,type:y,compare:C===void 0?null:C}},W.startTransition=pe,W.unstable_useCacheRefresh=function(){return v.H.useCacheRefresh()},W.use=function(y){return v.H.use(y)},W.useActionState=function(y,C,D){return v.H.useActionState(y,C,D)},W.useCallback=function(y,C){return v.H.useCallback(y,C)},W.useContext=function(y){return v.H.useContext(y)},W.useDebugValue=function(){},W.useDeferredValue=function(y,C){return v.H.useDeferredValue(y,C)},W.useEffect=function(y,C){return v.H.useEffect(y,C)},W.useEffectEvent=function(y){return v.H.useEffectEvent(y)},W.useId=function(){return v.H.useId()},W.useImperativeHandle=function(y,C,D){return v.H.useImperativeHandle(y,C,D)},W.useInsertionEffect=function(y,C){return v.H.useInsertionEffect(y,C)},W.useLayoutEffect=function(y,C){return v.H.useLayoutEffect(y,C)},W.useMemo=function(y,C){return v.H.useMemo(y,C)},W.useOptimistic=function(y,C){return v.H.useOptimistic(y,C)},W.useReducer=function(y,C,D){return v.H.useReducer(y,C,D)},W.useRef=function(y){return v.H.useRef(y)},W.useState=function(y){return v.H.useState(y)},W.useSyncExternalStore=function(y,C,D){return v.H.useSyncExternalStore(y,C,D)},W.useTransition=function(){return v.H.useTransition()},W.version="19.3.0",W}var Fa;function _i(){return Fa||(Fa=1,En.exports=Xs()),En.exports}var g=_i();const Zs=Ys(g),eo=Ks({__proto__:null,default:Zs},[g]);var Sn={exports:{}},xe={};/**
18 * @license React
19 * react-dom.production.js
20 *
21 * Copyright (c) Meta Platforms, Inc. and affiliates.
22 *
23 * This source code is licensed under the MIT license found in the
24 * LICENSE file in the root directory of this source tree.
25 */var Aa;function to(){if(Aa)return xe;Aa=1;var e=_i();function t(c){var u="https://react.dev/errors/"+c;if(1<arguments.length){u+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)u+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+c+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var n={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for("react.portal"),i=Symbol.for("react.recoverable"),s=Symbol.for("react.optimistic_key");function o(c,u,p){var R=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:R==null?null:R===s?s:""+R,children:c,containerInfo:u,implementation:p}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(c,u){if(c==="font")return"";if(typeof u=="string")return u==="use-credentials"?u:""}return xe.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,xe.browser=function(c){return{$$typeof:i,_reason:c}},xe.createPortal=function(c,u){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!u||u.nodeType!==1&&u.nodeType!==9&&u.nodeType!==11)throw Error(t(299));return o(c,u,null,p)},xe.flushSync=function(c){var u=l.T,p=n.p;try{if(l.T=null,n.p=2,c)return c()}finally{l.T=u,n.p=p,n.d.f()}},xe.preconnect=function(c,u){typeof c=="string"&&(u?(u=u.crossOrigin,u=typeof u=="string"?u==="use-credentials"?u:"":void 0):u=null,n.d.C(c,u))},xe.prefetchDNS=function(c){typeof c=="string"&&n.d.D(c)},xe.preinit=function(c,u){if(typeof c=="string"&&u&&typeof u.as=="string"){var p=u.as,R=f(p,u.crossOrigin),b=typeof u.integrity=="string"?u.integrity:void 0,S=typeof u.fetchPriority=="string"?u.fetchPriority:void 0;p==="style"?n.d.S(c,typeof u.precedence=="string"?u.precedence:void 0,{crossOrigin:R,integrity:b,fetchPriority:S}):p==="script"&&n.d.X(c,{crossOrigin:R,integrity:b,fetchPriority:S,nonce:typeof u.nonce=="string"?u.nonce:void 0})}},xe.preinitModule=function(c,u){if(typeof c=="string")if(typeof u=="object"&&u!==null){if(u.as==null||u.as==="script"){var p=f(u.as,u.crossOrigin);n.d.M(c,{crossOrigin:p,integrity:typeof u.integrity=="string"?u.integrity:void 0,nonce:typeof u.nonce=="string"?u.nonce:void 0,fetchPriority:typeof u.fetchPriority=="string"?u.fetchPriority:void 0})}}else u==null&&n.d.M(c)},xe.preload=function(c,u){if(typeof c=="string"&&typeof u=="object"&&u!==null&&typeof u.as=="string"){var p=u.as,R=f(p,u.crossOrigin);n.d.L(c,p,{crossOrigin:R,integrity:typeof u.integrity=="string"?u.integrity:void 0,nonce:typeof u.nonce=="string"?u.nonce:void 0,type:typeof u.type=="string"?u.type:void 0,fetchPriority:typeof u.fetchPriority=="string"?u.fetchPriority:void 0,referrerPolicy:typeof u.referrerPolicy=="string"?u.referrerPolicy:void 0,imageSrcSet:typeof u.imageSrcSet=="string"?u.imageSrcSet:void 0,imageSizes:typeof u.imageSizes=="string"?u.imageSizes:void 0,media:typeof u.media=="string"?u.media:void 0})}},xe.preloadModule=function(c,u){if(typeof c=="string")if(u){var p=f(u.as,u.crossOrigin);n.d.m(c,{as:typeof u.as=="string"&&u.as!=="script"?u.as:void 0,crossOrigin:p,integrity:typeof u.integrity=="string"?u.integrity:void 0,nonce:typeof u.nonce=="string"?u.nonce:void 0,fetchPriority:typeof u.fetchPriority=="string"?u.fetchPriority:void 0})}else n.d.m(c)},xe.requestFormReset=function(c){n.d.r(c)},xe.unstable_batchedUpdates=function(c,u){return c(u)},xe.useFormState=function(c,u,p){return l.H.useFormState(c,u,p)},xe.useFormStatus=function(){return l.H.useHostTransitionStatus()},xe.version="19.3.0",xe}var Ua;function ro(){if(Ua)return Sn.exports;Ua=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Sn.exports=to(),Sn.exports}const Di=g.createContext(void 0),Fi=e=>{const t=g.useContext(Di);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},hc=({client:e,children:t})=>(g.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),Js.jsx(Di.Provider,{value:e,children:t})),no={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)};var St,Vn,wi,ao=(wi=class{constructor(){$(this,St,no);$(this,Vn,!1)}setTimeoutProvider(e){L(this,St,e)}setTimeout(e,t){return d(this,St).setTimeout(e,t)}clearTimeout(e){d(this,St).clearTimeout(e)}setInterval(e,t){return d(this,St).setInterval(e,t)}clearInterval(e){d(this,St).clearInterval(e)}},St=new WeakMap,Vn=new WeakMap,wi);const kt=new ao;function io(e){setTimeout(e,0)}const so=typeof window>"u"||"Deno"in globalThis;function Ae(){}function oo(e,t){return typeof e=="function"?e(t):e}function Ai(e){return typeof e=="number"&&e>=0&&e!==1/0}function Ui(e,t){return Math.max(e+(t||0)-Date.now(),0)}function me(e,t){return typeof e=="function"?e(t):e}function ka(e,t){const{type:r="all",exact:n,fetchStatus:a,predicate:i,queryKey:s,stale:o}=e;if(s){if(n){if(t.queryHash!==Gn(s,t.options))return!1}else if(!vr(t.queryKey,s))return!1}if(r!=="all"){const l=t.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||a&&a!==t.state.fetchStatus||i&&!i(t))}function Ia(e,t){const{exact:r,status:n,predicate:a,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(r){if(Kt(t.options.mutationKey)!==Kt(i))return!1}else if(!vr(t.options.mutationKey,i))return!1}return!(n&&t.state.status!==n||a&&!a(t))}function Gn(e,t){return((t==null?void 0:t.queryKeyHashFn)||Kt)(e)}function Kt(e){return JSON.stringify(e,(t,r)=>Ln(r)?Object.keys(r).sort().reduce((n,a)=>(n[a]=r[a],n),{}):r)}function vr(e,t){if(e===t)return!0;
25if(typeof e!=typeof t)return!1;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(Array.isArray(e)&&Array.isArray(t)){if(t.length>e.length)return!1;for(let n=0;n<t.length;n++)if(!vr(e[n],t[n]))return!1;return!0}const r=Object.keys(t);for(const n of r)if(!vr(e[n],t[n]))return!1;return!0}return!1}const lo=Object.prototype.hasOwnProperty;function ki(e,t,r=0){if(e===t)return e;if(r>500)return t;const n=ja(e)&&ja(t);if(!n&&!(Ln(e)&&Ln(t)))return t;const a=(n?e:Object.keys(e)).length,i=n?t:Object.keys(t),s=i.length,o=n?new Array(s):{};let l=0;for(let f=0;f<s;f++){const c=n?f:i[f],u=e[c],p=t[c];if(u===p){o[c]=u,(n?f<a:lo.call(e,c))&&l++;continue}if(u===null||p===null||typeof u!="object"||typeof p!="object"){o[c]=p;continue}const R=ki(u,p,r+1);o[c]=R,R===u&&l++}return a===s&&l===a?e:o}function tn(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function ja(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ln(e){if(!Na(e))return!1;const t=Object.getPrototypeOf(e),r=t==null?void 0:t.constructor;if(r===void 0)return!0;if(typeof r!="function")return!1;const n=r.prototype;return!(!Na(n)||!n.hasOwnProperty("isPrototypeOf")||t!==Object.prototype)}function Na(e){return Object.prototype.toString.call(e)==="[object Object]"}function uo(e){return new Promise(t=>{kt.setTimeout(t,e)})}function _n(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?ki(e,t):t}function dc(e){return e}function co(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function fo(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}const Jn=Symbol();function Ii(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Jn?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Xn(e,t){return typeof e=="function"?e(...t):!!e}function ho(e,t,r){let n=!1,a;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(a??(a=t()),n||(n=!0,a.aborted?r():a.addEventListener("abort",r,{once:!0})),a)}),e}let mo=()=>so;const Zn=()=>mo();var Rr=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},jt,Pt,ar,bi,yo=(bi=class extends Rr{constructor(){super();$(this,jt);$(this,Pt);$(this,ar);L(this,ar,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){d(this,Pt)||this.setEventListener(d(this,ar))}onUnsubscribe(){var t;this.hasListeners()||((t=d(this,Pt))==null||t.call(this),L(this,Pt,void 0))}setEventListener(t){var r;L(this,ar,t),(r=d(this,Pt))==null||r.call(this),L(this,Pt,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){d(this,jt)!==t&&(L(this,jt,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof d(this,jt)=="boolean"?d(this,jt):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},jt=new WeakMap,Pt=new WeakMap,ar=new WeakMap,bi);const ea=new yo,po=io;function vo(){let e=[],t=0,r=o=>{o()},n=o=>{o()},a=po;const i=o=>{t?e.push(o):a(()=>{r(o)})},s=()=>{const o=e;e=[],o.length&&a(()=>{n(()=>{o.forEach(l=>{r(l)})})})};return{batch:o=>{let l;t++;try{l=o()}finally{t--,t||s()}return l},batchCalls:o=>(...l)=>{i(()=>{o(...l)})},schedule:i,setNotifyFunction:o=>{r=o},setBatchNotifyFunction:o=>{n=o},setScheduler:o=>{a=o}}}const be=vo();var ir,Ct,sr,Ei,go=(Ei=class extends Rr{constructor(){super();$(this,ir,!0);$(this,Ct);$(this,sr);L(this,sr,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){d(this,Ct)||this.setEventListener(d(this,sr))}onUnsubscribe(){var t;this.hasListeners()||((t=d(this,Ct))==null||t.call(this),L(this,Ct,void 0))}setEventListener(t){var r;L(this,sr,t),(r=d(this,Ct))==null||r.call(this),L(this,Ct,t(this.setOnline.bind(this)))}setOnline(t){d(this,ir)!==t&&(L(this,ir,t),this.listeners.forEac
25h(r=>{r(t)}))}isOnline(){return d(this,ir)}},ir=new WeakMap,Ct=new WeakMap,sr=new WeakMap,Ei);const on=new go;function Ro(e){return Math.min(1e3*2**e,3e4)}function ji(e){return(e??"online")==="online"?on.isOnline():!0}var Dn=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Ni(e){let t=!1,r=0,n,a="pending",i,s;const o=new Promise((O,M)=>{i=O,s=M});o.catch(Ae);const l=()=>a!=="pending",f=O=>{var M;if(!l()){const A=new Dn(O);S(A),(M=e.onCancel)==null||M.call(e,A)}},c=()=>{t=!0},u=()=>{t=!1},p=()=>ea.isFocused()&&(e.networkMode==="always"||on.isOnline())&&e.canRun(),R=()=>ji(e.networkMode)&&e.canRun(),b=O=>{l()||(n==null||n(),a="resolved",i(O))},S=O=>{l()||(n==null||n(),a="rejected",s(O))},E=()=>new Promise(O=>{var M;n=A=>{(l()||p())&&O(A)},(M=e.onPause)==null||M.call(e)}).then(()=>{var O;n=void 0,l()||(O=e.onContinue)==null||O.call(e)}),_=()=>{if(l())return;let O;const M=r===0?e.initialPromise:void 0;try{O=M??e.fn()}catch(A){O=Promise.reject(A)}Promise.resolve(O).then(b).catch(A=>{var N;if(l())return;const T=e.retry??(Zn()?0:3),K=e.retryDelay??Ro,q=typeof K=="function"?K(r,A):K,v=T===!0||typeof T=="number"&&r<T||typeof T=="function"&&T(r,A);if(t||!v){S(A);return}r++,(N=e.onFail)==null||N.call(e,r,A),uo(q).then(()=>p()?void 0:E()).then(()=>{t?S(A):_()})})};return{promise:o,status:()=>a,cancel:f,continue:()=>(n==null||n(),o),cancelRetry:c,continueRetry:u,canStart:R,start:()=>(R()?_():E().then(_),o)}}var Nt,Si,$i=(Si=class{constructor(){$(this,Nt)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ai(this.gcTime)&&L(this,Nt,kt.
25setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Zn()?1/0:3e5))}clearGcTimeout(){d(this,Nt)!==void 0&&(kt.clearTimeout(d(this,Nt)),L(this,Nt,void 0))}},Nt=new WeakMap,Si);function wo(e){return{onFetch:(t,r)=>{var c,u,p,R,b;const n=t.options,a=(p=(u=(c=t.fetchOptions)==null?void 0:c.meta)==null?void 0:u.fetchMore)==null?void 0:p.direction,i=((R=t.state.data)==null?void 0:R.pages)||[],s=((b=t.state.data)==null?void 0:b.pageParams)||[];let o={pages:[],pageParams:[]},l=0;const f=async()=>{let S=!1;const E=M=>{ho(M,()=>t.signal,()=>S=!0)},_=Ii(t.options,t.fetchOptions),O=async(M,A,T)=>{if(S)return Promise.reject(t.signal.reason);if(A==null&&M.pages.length)return Promise.resolve(M);const q=(()=>{const ge={client:t.client,queryKey:t.queryKey,pageParam:A,direction:T?"backward":"forward",meta:t.options.meta};return E(ge),ge})(),v=await _(q),{maxPages:N}=t.options,k=T?fo:co;return{pages:k(M.pages,v,N),pageParams:k(M.pageParams,A,N)}};if(a&&i.length){const M=a==="backward",A=M?Hi:Fn,T={pages:i,pageParams:s};o=await O(T,A(n,T),M)}else{const M=e??i.length;do{const A=l===0?s[0]??n.initialPageParam:Fn(n,o);if(l>0&&A==null)break;o=await O(o,A),l++}while(l<M)}return o};t.options.persister?t.fetchFn=()=>{var S,E;return(E=(S=t.options).persister)==null?void 0:E.call(S,f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=f}}}function Fn(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function Hi(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}function bo(e,t){return t?Fn(e,t)!=null:!1}function Eo(e,t){return!t||!e.getPreviousPageParam?!1:Hi(e,t)!=null}var or,$t,lr,Qe,Ht,we,Ar,zt,Ge,ht,Pi,So=(Pi=class extends $i{constructor(t){super();$(this,Ge);$(this,or);$(this,$t);$(this,lr);$(this,Qe);$(this,Ht);$(this,we);$(this,Ar);$(this,zt);L(this,zt,!1),L(this,Ar,t.defaultOptions),this.setOptions(t.options),this.observers=[],L(this,Ht,t.client),L(this,Qe,d(this,Ht).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,L(this,$t,Ha(this.options)),this.state=t.state??d(this,$t),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return d(this,or)}get promise(){var t;return(t=d(this,we))==null?void 0:t.promise}setOptions(t){if(this.options={...d(this,Ar),...t},t!=null&&t._type&&L(this,or,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=Ha(this.options);r.data!==void 0&&(this.setState($a(r.data,r.dataUpdatedAt)),L(this,$t,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&d(this,Qe).remove(this)}setData(t,r){const n=_n(this.state.data,t,this.options);return V(this,Ge,ht).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t){V(this,Ge,ht).call(this,{type:"setState",state:t})}cancel(t){var n,a;const r=(n=d(this,we))==null?void 0:n.promise;return(a=d(this,we))==null||a.cancel(t),r?r.then(Ae).catch(Ae):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return d(this,$t)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>me(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Jn||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>me(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Ui(this.state.dataUpdatedAt,t)}onFocus(){var t,r;(t=this.observers.find(n=>n.shouldFetchOnWindowFocus()))==null||t.refetch({cancelRefetch:!1}),(r=d(this,we))==null||r.continue()}onOnline(){var t,r;(t=this.observers.find(n=>n.shouldFetchOnReconnect()))==null||t.refetch({cancelRefetch:!1}),(r=d(this,we))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),d(this,Qe).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){const r=this.observers.indexOf(t);r!==-1&&(this.observers.splice(r,1),this.observers.length||(d(this,we)&&(d(this,zt)||this.state.fetchStatus==="paused"&&this.state.status==="pending"?d(this,we).
vendor: 4,254 bytes, line 25
25cancel({revert:!0}):d(this,we).cancelRetry()),this.scheduleGc()),d(this,Qe).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||V(this,Ge,ht).call(this,{type:"invalidate"})}async fetch(t,r){var f,c,u,p,R,b,S,E,_,O,M,A;if(this.state.fetchStatus!=="idle"&&((f=d(this,we))==null?void 0:f.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(d(this,we))return d(this,we).continueRetry(),d(this,we).promise}if(t&&this.setOptions(t),!this.options.queryFn){const T=this.observers.find(K=>K.options.queryFn);T&&this.setOptions(T.options)}const n=new AbortController,a=T=>{Object.defineProperty(T,"signal",{enumerable:!0,get:()=>(L(this,zt,!0),n.signal)})},i=()=>{const T=Ii(this.options,r),q=(()=>{const v={client:d(this,Ht),queryKey:this.queryKey,meta:this.meta};return a(v),v})();return L(this,zt,!1),this.options.persister?this.options.persister(T,q,this):T(q)},o=(()=>{const T={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:d(this,Ht),state:this.state,fetchFn:i};return a(T),T})();(c=d(this,or)==="infinite"?wo(this.options.pages):this.options.behavior)==null||c.onFetch(o,this),L(this,lr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=o.fetchOptions)==null?void 0:u.meta))&&V(this,Ge,ht).call(this,{type:"fetch",meta:(p=o.fetchOptions)==null?void 0:p.meta});const l=L(this,we,Ni({initialPromise:r==null?void 0:r.initialPromise,fn:o.fetchFn,onCancel:T=>{T instanceof Dn&&T.revert&&this.setState({...d(this,lr),fetchStatus:"idle"}),n.abort()},onFail:(T,K)=>{V(this,Ge,ht).call(this,{type:"failed",failureCount:T,error:K})},onPause:()=>{V(this,Ge,ht).call(this,{type:"pause"})},onContinue:()=>{V(this,Ge,ht).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}));try{const T=await l.start();if(T===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(T),(b=(R=d(this,Qe).config).onSuccess)==null||b.call(R,T,this),(E=(S=d(this,Qe).config).onSettled)==null||E.call(S,T,this.state.error,this),T}catch(T){if(T instanceof Dn){if(T.silent)return d(this,we).promise;if(T.revert){if(this.state.data===void 0)throw T;return this.state.data}}throw V(this,Ge,ht).call(this,{type:"error",error:T}),(O=(_=d(this,Qe).config).onError)==null||O.call(_,T,this),(A=(M=d(this,Qe).config).onSettled)==null||A.call(M,this.state.data,T,this),T}finally{d(this,we)===l&&L(this,we,void 0),this.scheduleGc()}}},or=new WeakMap,$t=new WeakMap,lr=new WeakMap,Qe=new WeakMap,Ht=new WeakMap,we=new WeakMap,Ar=new WeakMap,zt=new WeakMap,Ge=new WeakSet,ht=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...zi(n.data,this.options),fetchMeta:t.meta??null};case"success":const a={...n,...$a(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return L(this,lr,t.manual?a:void 0),a;case"error":const i=t.error;return{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),be.batch(()=>{this.observers.slice().forEach(n=>{n.onQueryUpdate()}),d(this,Qe).notify({query:this,type:"updated",action:t})})},Pi);function zi(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ji(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function $a(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Ha(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdate
vendor: 4,131 bytes, line 25
25Count:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var De,ee,Ur,Fe,Bt,ur,dt,kr,cr,fr,Qt,Wt,xt,hr,ae,xr,An,Un,kn,In,jn,Nn,$n,Hn,Ci,Bi=(Ci=class extends Rr{constructor(t,r){super();$(this,ae);$(this,De);$(this,ee);$(this,Ur);$(this,Fe);$(this,Bt);$(this,ur);$(this,dt);$(this,kr);$(this,cr);$(this,fr);$(this,Qt);$(this,Wt);$(this,xt);$(this,hr,new Set);this.options=r,L(this,De,t),L(this,dt,null),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(d(this,ee).addObserver(this),za(d(this,ee),this.options)?V(this,ae,xr).call(this):this.updateResult(),V(this,ae,jn).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return zn(d(this,ee),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return zn(d(this,ee),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,V(this,ae,Nn).call(this),V(this,ae,$n).call(this),d(this,ee).removeObserver(this)}setOptions(t){const r=this.options,n=d(this,ee);if(this.options=d(this,De).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof me(this.options.enabled,d(this,ee))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");V(this,ae,Hn).call(this),d(this,ee).setOptions(this.options),r._defaulted&&!tn(this.options,r)&&d(this,De).getQueryCache().notify({type:"observerOptionsUpdated",query:d(this,ee),observer:this});const a=this.hasListeners();a&&Ba(d(this,ee),n,this.options,r)&&V(this,ae,xr).call(this),this.updateResult(),a&&(d(this,ee)!==n||me(this.options.enabled,d(this,ee))!==me(r.enabled,d(this,ee))||me(this.options.staleTime,d(this,ee))!==me(r.staleTime,d(this,ee)))&&V(this,ae,Un).call(this);const i=V(this,ae,kn).call(this);a&&(d(this,ee)!==n||me(this.options.enabled,d(this,ee))!==me(r.enabled,d(this,ee))||i!==d(this,xt))&&V(this,ae,In).call(this,i)}getOptimisticResult(t){const r=d(this,De).getQueryCache().build(d(this,De),t),n=this.createResult(r,t);return tn(this.getCurrentResult(),n)||(L(this,Fe,n),L(this,ur,this.options),L(this,Bt,d(this,ee).state)),n}getCurrentResult(){return d(this,Fe)}trackResult(t,r){return new Proxy(t,{get:(n,a)=>(this.trackProp(a),r==null||r(a),Reflect.get(n,a))})}trackProp(t){d(this,hr).add(t)}getCurrentQuery(){return d(this,ee)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=d(this,De).defaultQueryOptions(t),n=d(this,De).getQueryCache().build(d(this,De),r);let a=()=>{},i;const s=new Promise(o=>{i=o,a=d(this,De).getQueryCache().subscribe(l=>{l.type==="updated"&&l.query.queryHash===n.queryHash&&n.state.data!==void 0&&(a(),o(this.createResult(n,r)))})});return Promise.race([n.fetch().then(()=>{const o=this.createResult(n,r);return i==null||i(o),o}).finally(()=>{a()}),s])}fetch(t){return V(this,ae,xr).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),d(this,Fe)))}createResult(t,r){var K;const n=d(this,ee),a=this.options,i=d(this,Fe),s=d(this,Bt),o=d(this,ur),l=t!==n?t.state:d(this,Ur),{state:f}=t;let c={...f},u=!1,p;if(r._optimisticResults){const q=this.hasListeners(),v=!q&&za(t,r),N=q&&Ba(t,n,r,a);(v||N)&&(c={...c,...zi(f.data,t.options)}),r._optimisticResults==="isRestoring"&&(c.fetchStatus="idle")}let{error:R,errorUpdatedAt:b,status:S}=c;p=c.data;let E=!1;if(r.placeholderData!==void 0&&p===void 0&&S==="pending"){let q;i!=null&&i.isPlaceholderData&&r.placeholderData===(o==null?void 0:o.placeholderData)?(q=i.data,E=!0):q=typeof r.placeholderData=="function"?r.placeholderData((K=d(this,fr))==null?void 0:K.state.data,d(this,fr)):r.placeholderData,q!==void 0&&(S="success",p=_n(i==null?void 0:i.data,q,r),u=!0)}if(r.select&&p!==void 0&&!E)if(i&&p===(s==null?void 0:s.data)&&r.select===d(this,kr))p=d(this,cr);else try{L(this,kr,r.select),p=r.select(p),p=_n(i==null?void 0:i.data,p,r),L(this,cr,p),L(this,dt,null)}catch(q){L(this,dt,q)}else p===void 0&&L(this,dt,null);
25d(this,dt)&&(R=d(this,dt),p=d(this,cr),b=Date.now(),S="error",u=!1);const _=c.fetchStatus==="fetching",O=S==="pending",M=S==="error",A=O&&_,T=p!==void 0;return{status:S,fetchStatus:c.fetchStatus,isPending:O,isSuccess:S==="success",isError:M,isInitialLoading:A,isLoading:A,data:p,dataUpdatedAt:c.dataUpdatedAt,error:R,errorUpdatedAt:b,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:c.dataUpdateCount>l.dataUpdateCount||c.errorUpdateCount>l.errorUpdateCount,isFetching:_,isRefetching:_&&!O,isLoadingError:M&&!T,isPaused:c.fetchStatus==="paused",isPlaceholderData:u,isRefetchError:M&&T,isStale:ta(t,r),refetch:this.refetch,isEnabled:me(r.enabled,t)!==!1}}updateResult(){const t=d(this,Fe),r=this.createResult(d(this,ee),this.options);if(L(this,Bt,d(this,ee).state),L(this,ur,this.options),d(this,Bt).data!==void 0&&L(this,fr,d(this,ee)),tn(r,t))return;L(this,Fe,r);const a=(()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,s=typeof i=="function"?i():i;if(s==="all"||!s&&!d(this,hr).size)return!0;const o=new Set(s??d(this,hr));return this.options.throwOnError&&o.add("error"),Object.keys(d(this,Fe)).some(l=>{const f=l;return d(this,Fe)[f]!==t[f]&&o.has(f)})})();be.batch(()=>{a&&this.listeners.forEach(i=>{i(d(this,Fe))}),d(this,De).getQueryCache().notify({query:d(this,ee),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&V(this,ae,jn).call(this)}},De=new WeakMap,ee=new WeakMap,Ur=new WeakMap,Fe=new WeakMap,Bt=new WeakMap,ur=new WeakMap,dt=new WeakMap,kr=new WeakMap,cr=new WeakMap,fr=new WeakMap,Qt=new WeakMap,Wt=new WeakMap,xt=new WeakMap,hr=new WeakMap,ae=new WeakSet,xr=function(t){V(this,ae,Hn).call(this);let r=d(this,ee).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Ae)),r},An=function(t){return!Zn()&&me(this.options.enabled,d(this,ee))!==!1&&Ai(t)},Un=function(){V(this,ae,Nn).call(this);const t=me(this.options.staleTime,d(this,ee));if(d(this,Fe).isStale||!V(this,ae,An).call(this,t))return;const r=Ui(d(this,Fe).dataUpdatedAt,t)+1;L(this,Qt,kt.setTimeout(()=>{d(this,Fe).isStale||this.updateResult()},r))},kn=function(){return me(this.options.refetchInterval,d(this,ee))??!1},In=function(t){V(this,ae,$n).call(this),L(this,xt,t),!(d(this,xt)===0||!V(this,ae,An).call(this,d(this,xt)))&&L(this,Wt,kt.setInterval(()=>{(this.options.refetchIntervalInBackground||ea.isFocused())&&V(this,ae,xr).call(this)},d(this,xt)))},jn=function(){V(this,ae,Un).call(this),V(this,ae,In).call(this,V(this,ae,kn).call(this))},Nn=function(){d(this,Qt)!==void 0&&(kt.clearTimeout(d(this,Qt)),L(this,Qt,void 0))},$n=function(){d(this,Wt)!==void 0&&(kt.clearInterval(d(this,Wt)),L(this,Wt,void 0))},Hn=function(){const t=d(this,De).getQueryCache().build(d(this,De),this.options);if(t===d(this,ee))return;const r=d(this,ee);L(this,ee,t),L(this,Ur,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},Ci);function Po(e,t){return me(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&me(t.retryOnMount,e)===!1)}function za(e,t){return Po(e,t)||e.state.data!==void 0&&zn(e,t,t.refetchOnMount)}function zn(e,t,r){if(me(t.enabled,e)!==!1&&me(t.staleTime,e)!=="static"){const n=me(r,e);return n==="always"||n!==!1&&ta(e,t)}return!1}function Ba(e,t,r,n){return(e!==t||me(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&ta(e,r)}function ta(e,t){return me(t.enabled,e)!==!1&&e.isStaleByTime(me(t.staleTime,e))}var Co=class extends Bi{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var R,b;const{state:r}=e,n=super.createResult(e,t),{isFetching:a,isRefetching:i,isError:s,isRefetchError:o}=n,l=(b=(R=r.fetchMeta)==null?void 0:R.fetchMore)==null?void 0:b.direction,f=s&&l==="forward",c=a&&l==="forward",u=s&&l==="backward",p=a&&l==="backward";return{...n,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:bo(t,r.data),hasPreviousPage:Eo(t,r.data),isFetchNextPageError:f,isFetchingNextPage:c,isFetchPreviousPageError:u,isFetchingPreviousPage:p,isRefetchError:o&&!f&&!u,isRefetching:i&&!c&&!p}}},Ir,nt,Me,qt,at,wt,xi,xo=(xi=class extends $i{constructor(t){super();$(this,at);$(this,Ir);$(this,nt);$(this,Me);$(this,qt);L(this,Ir,t.client),this.mutationId=t.mutationId,L(this,Me,t.mutationCache),L(this,nt,[]),this.state=t.state||Qi(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){d(this,nt).includes(t)||(d(this,nt).push(t),this.clearGcTimeout(),d(this,Me).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){L(this,nt,d(this,nt).filter(r=>r!==t)),this.scheduleGc(),d(this,Me).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){d(this,nt).length||(this.state.status==="pending"?this.scheduleGc():d(this,Me).remove(this))}continue(){var t;return((t=d(this,qt))==null?void 0:t.continue())??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(t){var o,l,f,c,u,p,R,b,S,E,_,O,M,A,T,K,q,v;const r=()=>{V(this,at,wt).call(this,{type:"continue"})},n={client:d(this,Ir),meta:this.options.meta,mutationKey:this.options.mutationKey},a=L(this,qt,Ni({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(N,k)=>{V(this,at,wt).call(this,{type:"failed",failureCount:N,error:k})},onPause:()=>{V(this,at,wt).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>d(this,Me).canRun(this)})),i=this.state.status==="pending",s=!a.canStart();try{if(i)r();else{V(this,at,wt).call(this,{type:"pending",variables:t,isPaused:s}),d(this,Me).config.onMutate&&await d(this,Me).config.onMutate(t,this,n);
vendor: 3,784 bytes, line 25
25const k=await((l=(o=this.options).onMutate)==null?void 0:l.call(o,t,n));k!==this.state.context&&V(this,at,wt).call(this,{type:"pending",context:k,variables:t,isPaused:s})}const N=await a.start();return await((c=(f=d(this,Me).config).onSuccess)==null?void 0:c.call(f,N,t,this.state.context,this,n)),await((p=(u=this.options).onSuccess)==null?void 0:p.call(u,N,t,this.state.context,n)),await((b=(R=d(this,Me).config).onSettled)==null?void 0:b.call(R,N,null,this.state.variables,this.state.context,this,n)),await((E=(S=this.options).onSettled)==null?void 0:E.call(S,N,null,t,this.state.context,n)),V(this,at,wt).call(this,{type:"success",data:N}),N}catch(N){try{await((O=(_=d(this,Me).config).onError)==null?void 0:O.call(_,N,t,this.state.context,this,n))}catch(k){Promise.reject(k)}try{await((A=(M=this.options).onError)==null?void 0:A.call(M,N,t,this.state.context,n))}catch(k){Promise.reject(k)}try{await((K=(T=d(this,Me).config).onSettled)==null?void 0:K.call(T,void 0,N,this.state.variables,this.state.context,this,n))}catch(k){Promise.reject(k)}try{await((v=(q=this.options).onSettled)==null?void 0:v.call(q,void 0,N,t,this.state.context,n))}catch(k){Promise.reject(k)}throw V(this,at,wt).call(this,{type:"error",error:N}),N}finally{d(this,qt)===a&&L(this,qt,void 0),d(this,Me).runNext(this)}}},Ir=new WeakMap,nt=new WeakMap,Me=new WeakMap,qt=new WeakMap,at=new WeakSet,wt=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),be.batch(()=>{d(this,nt).forEach(n=>{n.onMutationUpdate(t)}),d(this,Me).notify({mutation:this,type:"updated",action:t})})},xi);function Qi(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var mt,Je,jr,Oi,Oo=(Oi=class extends Rr{constructor(t={}){super();$(this,mt);$(this,Je);$(this,jr);this.config=t,L(this,mt,new Set),L(this,Je,new Map),L(this,jr,0)}build(t,r,n){const a=new xo({client:t,mutationCache:this,mutationId:++Gr(this,jr)._,options:t.defaultMutationOptions(r),state:n});return this.add(a),a}add(t){d(this,mt).add(t);const r=Jr(t);if(typeof r=="string"){const n=d(this,Je).get(r);n?n.push(t):d(this,Je).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(d(this,mt).delete(t)){const r=Jr(t);if(typeof r=="string"){const n=d(this,Je).get(r);if(n)if(n.length>1){const a=n.indexOf(t);a!==-1&&n.splice(a,1)}else n[0]===t&&d(this,Je).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){var n;const r=Jr(t);if(typeof r=="string"){const a=(n=d(this,Je).get(r))==null?void 0:n.find(i=>i.state.status==="pending");return!a||a===t}else return!0}runNext(t){var n,a;const r=Jr(t);return typeof r=="string"?((a=(n=d(this,Je).get(r))==null?void 0:n.find(i=>i!==t&&i.state.isPaused))==null?void 0:a.continue())??Promise.resolve():Promise.resolve()}clear(){be.batch(()=>{d(this,mt).forEach(t=>{this.notify({type:"removed",mutation:t})}),d(this,mt).clear(),d(this,Je).clear()})}getAll(){return Array.from(d(this,mt))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Ia(r,n))}findAll(t={}){return this.getAll().filter(r=>Ia(t,r))}notify(t){be.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>
vendor: 5,182 bytes, line 25
25r.state.isPaused);return be.batch(()=>Promise.all(t.map(r=>r.continue().catch(Ae))))}},mt=new WeakMap,Je=new WeakMap,jr=new WeakMap,Oi);function Jr(e){var t;return(t=e.options.scope)==null?void 0:t.id}var yt,Ot,Le,pt,st,Or,Bn,Ti,To=(Ti=class extends Rr{constructor(r,n){super();$(this,st);$(this,yt);$(this,Ot);$(this,Le);$(this,pt);L(this,yt,r),this.setOptions(n),this.bindMethods(),V(this,st,Or).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(r){var a;const n=this.options;this.options=d(this,yt).defaultMutationOptions(r),tn(this.options,n)||d(this,yt).getMutationCache().notify({type:"observerOptionsUpdated",mutation:d(this,Le),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Kt(n.mutationKey)!==Kt(this.options.mutationKey)?this.reset():((a=d(this,Le))==null?void 0:a.state.status)==="pending"&&d(this,Le).setOptions(this.options)}onSubscribe(){this.listeners.size===1&&d(this,Le)&&(d(this,Le).addObserver(this),V(this,st,Or).call(this))}onUnsubscribe(){var r;this.hasListeners()||(r=d(this,Le))==null||r.removeObserver(this)}onMutationUpdate(r){V(this,st,Or).call(this),V(this,st,Bn).call(this,r)}getCurrentResult(){return d(this,Ot)}reset(){var r;(r=d(this,Le))==null||r.removeObserver(this),L(this,Le,void 0),V(this,st,Or).call(this),V(this,st,Bn).call(this)}mutate(r,n){var a;return L(this,pt,n),(a=d(this,Le))==null||a.removeObserver(this),L(this,Le,d(this,yt).getMutationCache().build(d(this,yt),this.options)),d(this,Le).addObserver(this),d(this,Le).execute(r)}},yt=new WeakMap,Ot=new WeakMap,Le=new WeakMap,pt=new WeakMap,st=new WeakSet,Or=function(){var n;const r=((n=d(this,Le))==null?void 0:n.state)??Qi();L(this,Ot,{...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset})},Bn=function(r){be.batch(()=>{var n,a,i,s,o,l,f,c;if(d(this,pt)&&this.hasListeners()){const u=d(this,Ot).variables,p=d(this,Ot).context,R={client:d(this,yt),meta:this.options.meta,mutationKey:this.options.mutationKey};if((r==null?void 0:r.type)==="success"){try{(a=(n=d(this,pt)).onSuccess)==null||a.call(n,r.data,u,p,R)}catch(b){Promise.reject(b)}try{(s=(i=d(this,pt)).onSettled)==null||s.call(i,r.data,null,u,p,R)}catch(b){Promise.reject(b)}}else if((r==null?void 0:r.type)==="error"){try{(l=(o=d(this,pt)).onError)==null||l.call(o,r.error,u,p,R)}catch(b){Promise.reject(b)}try{(c=(f=d(this,pt)).onSettled)==null||c.call(f,void 0,r.error,u,p,R)}catch(b){Promise.reject(b)}}}this.listeners.forEach(u=>{u(d(this,Ot))})})},Ti),it,Mi,Mo=(Mi=class extends Rr{constructor(t={}){super();$(this,it);this.config=t,L(this,it,new Map)}build(t,r,n){const a=r.queryKey,i=r.queryHash??Gn(a,r);let s=this.get(i);return s||(s=new So({client:t,queryKey:a,queryHash:i,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(a)}),this.add(s)),s}add(t){d(this,it).has(t.queryHash)||(d(this,it).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=d(this,it).get(t.queryHash);r&&(t.destroy(),r===t&&d(this,it).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){be.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return d(this,it).get(t)}getAll(){return[...d(this,it).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>ka(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>ka(t,n)):r}notify(t){be.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){be.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){be.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},it=new WeakMap,Mi),ye,Tt,Mt,dr,mr,Lt,yr,pr,Li,yc=(Li=class{constructor(e={}){$(this,ye);$(this,Tt);$(this,Mt);$(this,dr);$(this,mr);$(this,Lt);$(this,yr);$(this,pr);L(this,ye,e.queryCache||new Mo),L(this,Tt,e.mutationCache||new Oo),L(this,Mt,e.defaultOptions||{}),L(this,dr,new Map),L(this,mr,new Map),L(this,Lt,0)}mount(){Gr(this,Lt)._++,d(this,Lt)===1&&(L(this,yr,ea.subscribe(async e=>{e&&(await this.resumePausedMutations(),d(this,ye).onFocus())})),L(this,pr,on.subscribe(async e=>{e&&(await this.resumePausedMutations(),d(this,ye).onOnline())})))}unmount(){var e,t;Gr(this,Lt)._--,d(this,Lt)===0&&((e=d(this,yr))==null||e.call(this),L(this,yr,void 0),(t=d(this,pr))==null||t.call(this),L(this,pr,void 0))}isFetching(e){return d(this,ye).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return d(this,Tt).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=d(this,ye).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=d(this,ye).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(me(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return d(this,ye).findAll(e).map(({queryKey:t,state:r})=>[t,r.data])}setQueryData(e,t,r){var s;const n=this.defaultQueryOptions({queryKey:e}),a=(s=d(this,ye).get(n.queryHash))==null?void 0:s.state.data,i=oo(t,a);if(i!==void 0)return d(this,ye).build(this,n).setData(i,{...r,manual:!0})}
25setQueriesData(e,t,r){return be.batch(()=>d(this,ye).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=d(this,ye).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=d(this,ye);be.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=d(this,ye);return be.batch(()=>{const n=r.findAll(e),a=new Set(n);return n.forEach(i=>{i.reset()}),this.refetchQueries({type:"active",predicate:i=>a.has(i)},t)})}cancelQueries(e,t={}){const r={revert:!0,...t},n=be.batch(()=>d(this,ye).findAll(e).map(a=>a.cancel(r)));return Promise.all(n).then(Ae).catch(Ae)}invalidateQueries(e,t={}){return be.batch(()=>(d(this,ye).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=be.batch(()=>d(this,ye).findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let i=a.fetch(void 0,r);return r.throwOnError||(i=i.catch(Ae)),a.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(n).then(Ae)}async query(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=d(this,ye).build(this,t),n=r.isStaleByTime(me(t.staleTime,r))?await r.fetch(t):r.state.data,a=t.select;return a?a(n):n}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=d(this,ye).build(this,t);return r.isStaleByTime(me(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ae).catch(Ae)}infiniteQuery(e){return e._type="infinite",this.query(e)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ae).catch(Ae)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return on.isOnline()?d(this,Tt).resumePausedMutations():Promise.resolve()}getQueryCache(){return d(this,ye)}getMutationCache(){return d(this,Tt)}getDefaultOptions(){return d(this,Mt)}setDefaultOptions(e){L(this,Mt,e)}setQueryDefaults(e,t){d(this,dr).set(Kt(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...d(this,dr).values()],r={};return t.forEach(n=>{vr(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){d(this,mr).set(Kt(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...d(this,mr).values()],r={};return t.forEach(n=>{vr(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...d(this,Mt).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Gn(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Jn&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...d(this,Mt).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){d(this,ye).clear(),d(this,Tt).clear()}},ye=new WeakMap,Tt=new WeakMap,Mt=new WeakMap,dr=new WeakMap,mr=new WeakMap,Lt=new WeakMap,yr=new WeakMap,pr=new WeakMap,Li);const Wi=g.createContext(!1),Lo=()=>g.useContext(Wi);Wi.Provider;function _o(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const Do=g.createContext(_o()),Fo=()=>g.useContext(Do),Ao=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?Xn(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||n)&&(t.isReset()||(e.retryOnMount=!1))},Uo=e=>{g.useEffect(()=>{e.clearReset()},[e])},ko=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(a&&e.data===void 0||Xn(r,[e.error,n])),Io=e=>{if(e.suspense){const r=a=>a==="static"?a:Math.max(a??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...a)=>r(n(...a)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},jo=(e,t)=>
25(e==null?void 0:e.suspense)&&t.isPending,No=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function qi(e,t,r){const n=Lo(),a=Fo(),i=Fi(),s=i.defaultQueryOptions(e),o=i.getQueryCache().get(s.queryHash),l=e.subscribed!==!1;s._optimisticResults=n?"isRestoring":l?"optimistic":void 0,Io(s),Ao(s,a,o),Uo(a);const[f]=g.useState(()=>new t(i,s)),c=f.getOptimisticResult(s),u=!n&&l;if(g.useSyncExternalStore(g.useCallback(p=>{const R=u?f.subscribe(be.batchCalls(p)):Ae;return f.updateResult(),R},[f,u]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),g.useEffect(()=>{f.setOptions(s)},[s,f]),jo(s,c))throw No(s,f,a);if(ko({result:c,errorResetBoundary:a,throwOnError:s.throwOnError,query:o,suspense:s.suspense}))throw c.error;return s.notifyOnChangeProps?c:f.trackResult(c)}function pc(e,t){return qi(e,Bi)}function vc(e,t){const r=Fi(),[n]=g.useState(()=>new To(r,e));g.useEffect(()=>{n.setOptions(e)},[n,e]);const a=g.useSyncExternalStore(g.useCallback(s=>n.subscribe(be.batchCalls(s)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),i=g.useCallback((...s)=>{n.mutate(s[0],s[1]).catch(Ae)},[n]);if(a.error&&Xn(n.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:i,mutateAsync:a.mutate}}function gc(e,t){return qi(e,Co)}/**
26 * react-router v7.18.4
27 *
28 * Copyright (c) Remix Software Inc.
29 *
30 * This source code is licensed under the MIT license found in the
31 * LICENSE.md file in the root directory of this source tree.
32 *
33 * @license MIT
34 */var Ki=e=>{throw TypeError(e)},Yi=(e,t,r)=>t.has(e)||Ki("Cannot "+r),Be=(e,t,r)=>(Yi(e,t,"read from private field"),r?r.call(e):t.get(e)),Tr=(e,t,r)=>t.has(e)?Ki("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),tt=(e,t,r,n)=>(Yi(e,t,"write to private field"),t.set(e,r),r),un=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,cn=/^[\\/]{2}/;function Vi(e,t){return t+e.replace(/\\/g,"/")}var Qa="popstate";function Wa(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function $o(e={}){function t(n,a){var f;let i=(f=a.state)==null?void 0:f.masked,{pathname:s,search:o,hash:l}=i||n.location;return _r("",{pathname:s,search:o,hash:l},a.state&&a.state.usr||null,a.state&&a.state.key||"default",i?{pathname:n.location.pathname,search:n.location.search,hash:n.location.hash}:void 0)}function r(n,a){return typeof a=="string"?a:Ue(a)}return zo(t,r,null,e)}function G(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ve(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Ho(){return Math.random().toString(36).substring(2,10)}function qa(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function _r(e,t,r=null,n,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?ot(t):t,state:r,key:t&&t.key||n||Ho(),mask:a}}function Ue({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function ot(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function zo(e,t,r,n={}){let{window:a=document.defaultView,v5Compat:i=!1}=n,s=a.history,o="POP",l=null,f=c();f==null&&(f=0,s.replaceState({...s.state,idx:f},""));function c(){return(s.state||{idx:null}).idx}function u(){o="POP";let E=c(),_=E==null?null:E-f;f=E,l&&l({action:o,location:S.location,delta:_})}function p(E,_){o="PUSH";let O=Wa(E)?E:_r(S.location,E,_);f=c()+1;let M=qa(O,f),A=S.createHref(O.mask||O);try{s.pushState(M,"",A)}catch(T){if(T instanceof DOMException&&T.name==="DataCloneError")throw T;a.location.assign(A)}i&&l&&l({action:o,location:S.location,delta:1})}function R(E,_){o="REPLACE";let O=Wa(E)?E:_r(S.location,E,_);f=c();let M=qa(O,f),A=S.createHref(O.mask||O);s.replaceState(M,"",A),i&&l&&l({action:o,location:S.location,delta:0})}function b(E){return Gi(a,E)}let S={get action(){return o},get location(){return e(a,s)},listen(E){if(l)throw new Error("A history only accepts one active listener");return a.addEventListener(Qa,u),l=E,()=>{a.removeEventListener(Qa,u),l=null}},createHref(E){return t(a,E)},createURL:b,encodeLocation(E){let _=b(E);return{pathname:_.pathname,search:_.search,hash:_.hash}},push:p,replace:R,go(E){return s.go(E)}};return S}function Gi(e,t,r=!1){let n="http://localhost";e&&(n=e.location.origin!=="null"?e.location.origin:e.location.href),G(n,"No window.location.(origin|href) available to create URL");let a=typeof t=="string"?t:Ue(t);return a=a.replace(/ $/,"%20"),!r&&cn.test(a)&&(a=n+a),new URL(a,n)}var Mr,Ka=class{constructor(e){if(Tr(this,Mr,new Map),e)for(let[t,r]of e)this.set(t,r)}get(e){if(Be(this,Mr).has(e))return Be(this,Mr).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){Be(this,Mr).set(e,t)}};
34Mr=new WeakMap;var Bo=new Set(["lazy","caseSensitive","path","id","index","children"]);function Qo(e){return Bo.has(e)}var Wo=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function qo(e){return Wo.has(e)}function Ko(e){return e.index===!0}function Dr(e,t,r=[],n={},a=!1){return e.map((i,s)=>{let o=[...r,String(s)],l=typeof i.id=="string"?i.id:o.join("-");if(G(i.index!==!0||!i.children,"Cannot specify children on an index route"),G(a||!n[l],`Found a route id collision on id "${l}".  Route id's must be globally unique within Data Router usages`),Ko(i)){let f={...i,id:l};return n[l]=Ya(f,t(f)),f}else{let f={...i,id:l,children:void 0};return n[l]=Ya(f,t(f)),i.children&&(f.children=Dr(i.children,t,o,n,a)),f}})}function Ya(e,t){return Object.assign(e,{...t,...typeof t.lazy=="object"&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function Ji(e,t,r="/"){return Ve(e,t,r,!1)}function Ve(e,t,r,n,a){let i=typeof t=="string"?ot(t):t,s=Ne(i.pathname||"/",r);if(s==null)return null;let o=a??rn(e),l=null,f=il(s);for(let c=0;l==null&&c<o.length;++c)l=al(o[c],f,n);return l}function Yo(e,t){let{route:r,pathname:n,params:a}=e;return{id:r.id,pathname:n,params:a,data:t[r.id],loaderData:t[r.id],handle:r.handle}}function rn(e){let t=Xi(e);return Vo(t),t}function Xi(e,t=[],r=[],n="",a=!1){let i=(s,o,l=a,f)=>{let c={relativePath:f===void 0?s.path||"":f,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};if(c.relativePath.startsWith("/")){if(!c.relativePath.startsWith(n)&&l)return;G(c.relativePath.startsWith(n),`Absolute route path "${c.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(n.length)}let u=qe([n,c.relativePath]),p=r.concat(c);s.children&&s.children.length>0&&(G(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),Xi(s.children,t,p,u,l)),!(s.path==null&&!s.index)&&t.push({path:u,score:rl(u,s.index),routesMeta:p.map((R,b)=>{let[S,E]=ts(R.relativePath,R.caseSensitive,b===p.length-1);return{...R,matcher:S,compiledParams:E}})})};return e.forEach((s,o)=>{var l;if(s.path===""||!((l=s.path)!=null&&l.includes("?")))i(s,o);else for(let f of Zi(s.path))i(s,o,!0,f)}),t}function Zi(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return a?[i,""]:[i];let s=Zi(n.join("/")),o=[];return o.push(...s.map(l=>l===""?i:[i,l].join("/"))),a&&o.push(...s),o.map(l=>e.startsWith("/")&&l===""?"/":l)}function Vo(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:nl(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var Go=/^:[\w-]+$/,Jo=3,Xo=2,Zo=1,el=10,tl=-2,Va=e=>e==="*";function rl(e,t){let r=e.split("/"),n=r.length;return r.some(Va)&&(n+=tl),t&&(n+=Xo),r.filter(a=>!Va(a)).reduce((a,i)=>a+(Go.test(i)?Jo:i===""?Zo:el),n)}function nl(e,t){return e.length===t.length&&e.slice(0,-1).every((n,a)=>n===t[a])?e[e.length-1]-t[t.length-1]:0}function al(e,t,r=!1){let{routesMeta:n}=e,a={},i="/",s=[];for(let o=0;o<n.length;++o){let l=n[o],f=o===n.length-1,c=i==="/"?t:t.slice(i.length)||"/",u={path:l.relativePath,caseSensitive:l.caseSensitive,end:f},p=l.matcher&&l.compiledParams?es(u,c,l.matcher,l.compiledParams):ln(u,c),R=l.route;if(!p&&f&&r&&!n[n.length-1].route.index&&(p=ln({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},c)),!p)return null;
34Object.assign(a,p.params),s.push({params:a,pathname:qe([i,p.pathname]),pathnameBase:ll(qe([i,p.pathnameBase])),route:R}),p.pathnameBase!=="/"&&(i=qe([i,p.pathnameBase]))}return s}function ln(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=ts(e.path,e.caseSensitive,e.end);return es(e,t,r,n)}function es(e,t,r,n){let a=t.match(r);if(!a)return null;let i=a[0],s=gr(i,1),o=a.slice(1);return{params:n.reduce((f,{paramName:c,isOptional:u},p)=>{if(c==="*"){let b=o[p]||"";s=gr(i.slice(0,i.length-b.length),1)}const R=o[p];return u&&!R?f[c]=void 0:f[c]=(R||"").replace(/%2F/g,"/"),f},{}),pathname:i,pathnameBase:s,pattern:e}}function ts(e,t=!1,r=!0){ve(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 n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,o,l,f,c)=>{if(n.push({paramName:o,isOptional:l!=null}),l){let u=c.charAt(f+s.length);return u&&u!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function il(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ve(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Ne(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function sl({basename:e,pathname:t}){return t==="/"?e:qe([e,t])}var ra=e=>un.test(e);function ol(e,t="/"){let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?ot(e):e,i;return r?(r=na(r),r.startsWith("/")||r.startsWith("\\")?i=Ga(r.substring(1),"/"):i=Ga(r,t)):i=t,{pathname:i,search:ul(n),hash:cl(a)}}function Ga(e,t){let r=gr(t).split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function Pn(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}].  Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function rs(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function fn(e){let t=rs(e);return t.map((r,n)=>n===t.length-1?r.pathname:r.pathnameBase)}function Nr(e,t,r,n=!1){let a;typeof e=="string"?a=ot(e):(a={...e},G(!a.pathname||!a.pathname.includes("?"),Pn("?","pathname","search",a)),G(!a.pathname||!a.pathname.includes("#"),Pn("#","pathname","hash",a)),G(!a.search||!a.search.includes("#"),Pn("#","search","hash",a)));let i=e===""||a.pathname==="",s=i?"/":a.pathname,o;if(s==null)o=r;else{let u=t.length-1;if(!n&&s.startsWith("..")){let p=s.split("/");for(;p[0]==="..";)p.shift(),u-=1;a.pathname=p.join("/")}o=u>=0?t[u]:"/"}let l=ol(a,o),f=s&&s!=="/"&&s.endsWith("/"),c=(i||s===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(f||c)&&(l.pathname+="/"),l}var na=e=>e.replace(/[\\/]{2,}/g,"/"),qe=e=>na(e.join("/"));function gr(e,t=0){let r=e.length;for(;r>t&&e.charCodeAt(r-1)===47;)r--;return r===e.length?e:e.slice(0,r)}var ll=e=>gr(e).replace(/^\/*/,"/"),ul=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,cl=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,fl=["EvalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],$r=class{constructor(e,t,r,n=!1){this.status=e,this.statusText=t||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function Fr(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function Hr(e){let t=e.map(r=>
34r.route.path).filter(Boolean);return qe(t)||"/"}var ns=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function as(e,t){let r=e;if(typeof r!="string"||!un.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let n=r,a=!1;if(ns)try{let i=new URL(window.location.href),s=cn.test(r)?new URL(Vi(r,i.protocol)):new URL(r),o=Ne(s.pathname,t);s.origin===i.origin&&o!=null?r=o+s.search+s.hash:a=!0}catch{ve(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:n,isExternal:a,to:r}}var _t=Symbol("Uninstrumented");function hl(e,t){let r={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(a=>a({id:t.id,index:t.index,path:t.path,instrument(i){let s=Object.keys(r);for(let o of s)i[o]&&r[o].push(i[o])}}));let n={};if(typeof t.lazy=="function"&&r.lazy.length>0){let a=tr(r.lazy,t.lazy,()=>{});a&&(n.lazy=a)}if(typeof t.lazy=="object"){let a=t.lazy;["middleware","loader","action"].forEach(i=>{let s=a[i],o=r[`lazy.${i}`];if(typeof s=="function"&&o.length>0){let l=tr(o,s,()=>{});l&&(n.lazy=Object.assign(n.lazy||{},{[i]:l}))}})}return["loader","action"].forEach(a=>{let i=t[a];if(typeof i=="function"&&r[a].length>0){let s=i[_t]??i,o=tr(r[a],s,(...l)=>Ja(l[0]));o&&(a==="loader"&&s.hydrate===!0&&(o.hydrate=!0),o[_t]=s,n[a]=o)}}),t.middleware&&t.middleware.length>0&&r.middleware.length>0&&(n.middleware=t.middleware.map(a=>{let i=a[_t]??a,s=tr(r.middleware,i,(...o)=>Ja(o[0]));return s?(s[_t]=i,s):a})),n}function dl(e,t){let r={navigate:[],fetch:[]};if(t.forEach(n=>n({instrument(a){let i=Object.keys(a);for(let s of i)a[s]&&r[s].push(a[s])}})),r.navigate.length>0){let n=e.navigate[_t]??e.navigate,a=tr(r.navigate,n,(...i)=>{let[s,o]=i;return{to:typeof s=="number"||typeof s=="string"?s:s?Ue(s):".",...Xa(e,o??{})}});a&&(a[_t]=n,e.navigate=a)}if(r.fetch.length>0){let n=e.fetch[_t]??e.fetch,a=tr(r.fetch,n,(...i)=>{let[s,,o,l]=i;return{href:o??".",fetcherKey:s,...Xa(e,l??{})}});a&&(a[_t]=n,e.fetch=a)}return e}function tr(e,t,r){return e.length===0?null:async(...n)=>{let a=await is(e,r(...n),()=>t(...n),e.length-1);if(a.type==="error")throw a.value;return a.value}}async function is(e,t,r,n){let a=e[n],i;if(a){let s,o=async()=>(s?console.error("You cannot call instrumented handlers more than once"):s=is(e,t,r,n-1),i=await s,G(i,"Expected a result"),i.type==="error"&&i.value instanceof Error?{status:"error",error:i.value}:{status:"success",error:void 0});try{await a(o,t)}catch(l){console.error("An instrumentation function threw an error:",l)}s||await o(),await s}else try{i={type:"success",value:await r()}}catch(s){i={type:"error",value:s}}return i||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function Ja(e){let{request:t,context:r,params:n,pattern:a}=e;return{request:ml(t),params:{...n},pattern:a,context:yl(r)}}function Xa(e,t){return{currentUrl:Ue(e.state.location),..."formMethod"in t?{formMethod:t.formMethod}:{},..."formEncType"in t?{formEncType:t.formEncType}:{},..."formData"in t?{formData:t.formData}:{},..."body"in t?{body:t.body}:{}}}function ml(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function yl(e){if(vl(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var pl=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function vl(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===pl}var Za=new URL("http://localhost");function aa(e){if(e.createURL)return e.createURL("/");try{return new URL(e.createHref("/"),Za)}catch{return Za}}function Cn(e,t){return e.origin===t.origin&&(e.origin!=="null"||e.protocol===t.protocol&&e.host===t.host)}function gl(e,t){if(e.startsWith("//"))return!0;let r=t.protocol.toLowerCase();return e.toLowerCase().startsWith(r)?t.host===""||e.slice(r.length).startsWith("//"):!1}function rr(e,t,r,n){let a=null;try{a=e==null?null:new URL(e,r)}catch{}let i=new URL(t,r),s=a!=null&&!Cn(a,r),o=!Cn(i,r);if(n==="reject"){if(s||o)throw new Error("External navigation is not allowed")}
34else if(o&&(a==null||!gl(e,a)||!Cn(a,i)))throw new Error("External navigation is not allowed")}var ss=["POST","PUT","PATCH","DELETE"],Rl=new Set(ss),wl=["GET",...ss],bl=new Set(wl),os=new Set([301,302,303,307,308]),El=new Set([307,308]),xn={state:"idle",location:void 0,matches:void 0,historyAction:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Sl={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Jt={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Pl=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),ls="remix-router-transitions",us=Symbol("ResetLoaderData"),Ut,Xt,bt,Zt,Cl=class{constructor(e){Tr(this,Ut),Tr(this,Xt),Tr(this,bt),Tr(this,Zt),tt(this,Ut,e),tt(this,Xt,rn(e))}get stableRoutes(){return Be(this,Ut)}get activeRoutes(){return Be(this,bt)??Be(this,Ut)}get branches(){return Be(this,Zt)??Be(this,Xt)}get hasHMRRoutes(){return Be(this,bt)!=null}setRoutes(e){tt(this,Ut,e),tt(this,Xt,rn(e))}setHmrRoutes(e){tt(this,bt,e),tt(this,Zt,rn(e))}commitHmrRoutes(){Be(this,bt)&&(tt(this,Ut,Be(this,bt)),tt(this,Xt,Be(this,Zt)),tt(this,bt,void 0),tt(this,Zt,void 0))}};Ut=new WeakMap;Xt=new WeakMap;bt=new WeakMap;Zt=new WeakMap;function xl(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u";G(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let n=e.hydrationRouteProperties||[],a=e.mapRouteProperties||Pl,i=a;if(e.instrumentations){let h=e.instrumentations;i=m=>({...a(m),...hl(h.map(w=>w.route).filter(Boolean),m)})}let s={},o=new Cl(Dr(e.routes,i,void 0,s)),l=e.basename||"/";l.startsWith("/")||(l=`/${l}`);let f=e.dataStrategy||_l,c={...e.future},u=null,p=new Set,R=null,b=null,S=null,E=null,_=e.hydrationData!=null,O=Ve(o.activeRoutes,e.history.location,l,!1,o.branches),M=!1,A=null,T,K;if(O==null&&!e.patchRoutesOnNavigation){let h=We(404,{pathname:e.history.location.pathname}),{matches:m,route:w}=Xr(o.activeRoutes);T=!0,K=!T,O=m,A={[w.id]:h}}else if(O&&!e.hydrationData&&Wr(O,o.activeRoutes,e.history.location.pathname).active&&(O=null),O)if(O.some(h=>h.route.lazy))T=!1,K=!T;else if(!O.some(h=>ia(h.route)))T=!0,K=!T;else{let h=e.hydrationData?e.hydrationData.loaderData:null,m=e.hydrationData?e.hydrationData.errors:null,w=O;if(m){let P=O.findIndex(x=>m[x.route.id]!==void 0);w=w.slice(0,P+1)}K=!1,T=!0,w.forEach(P=>{let x=cs(P.route,h,m);K=K||x.renderFallback,T=T&&!x.shouldLoad})}else{T=!1,K=!T,O=[];let h=Wr(null,o.activeRoutes,e.history.location.pathname);h.active&&h.matches&&(M=!0,O=h.matches)}let q,v={historyAction:e.history.action,location:e.history.location,matches:O,initialized:T,renderFallback:K,navigation:xn,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||A,fetchers:new Map,blockers:new Map},N="POP",k=null,ge=!1,te,Ce=!1,ce=new Map,fe=null,Ye=!1,J=!1,he=new Set,oe=new Map,Ee=0,pe=-1,Se=new Map,Oe=new Set,y=new Map,C=new Map,D=new Set,I=new Map,X,Z=null;function le(){if(u=e.history.listen(({action:h,location:m,delta:w})=>{if(X){X(),X=void 0;return}ve(I.size===0||w!=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 P=Sa({currentLocation:v.location,nextLocation:m,historyAction:h});if(P&&w!=null){let x=new Promise(j=>{X=j});e.history.go(w*-1),Qr(P,{state:"blocked",location:m,proceed(){Qr(P,{state:"proceeding",proceed:void 0,reset:void 0,location:m}),x.then(()=>e.history.go(w))},reset(){let j=new Map(v.blockers);j.set(P,Jt),Pe({blockers:j})}}),k==null||k.resolve(),k=null;return}return Dt(h,m)}),r){Gl(t,ce);let h=()=>Jl(t,ce);t.addEventListener("pagehide",h),fe=()=>t.removeEventListener("pagehide",h)}return v.initialized||Dt("POP",v.location,{initialHydration:!0}),q}function ze(){u&&u(),fe&&fe(),p.clear(),te&&te.abort(),v.fetchers.forEac
34h((h,m)=>pn(v.fetchers,m)),v.blockers.forEach((h,m)=>Ea(m))}function Te(h){if(p.add(h),R){let{newErrors:m}=R;R=null,h(v,{deletedFetchers:[],newErrors:m,viewTransitionOpts:void 0,flushSync:!1})}return()=>p.delete(h)}function Pe(h,m={}){h.matches&&(h.matches=h.matches.map(x=>{let j=s[x.route.id],U=x.route;return U.element!==j.element||U.errorElement!==j.errorElement||U.hydrateFallbackElement!==j.hydrateFallbackElement?{...x,route:j}:x})),v={...v,...h};let w=[],P=[];v.fetchers.forEach((x,j)=>{x.state==="idle"&&(D.has(j)?w.push(j):P.push(j))}),D.forEach(x=>{!v.fetchers.has(x)&&!oe.has(x)&&w.push(x)}),p.size===0&&(R={newErrors:h.errors??null}),[...p].forEach(x=>x(v,{deletedFetchers:w,newErrors:h.errors??null,viewTransitionOpts:m.viewTransitionOpts,flushSync:m.flushSync===!0})),w.forEach(x=>pn(v.fetchers,x)),P.forEach(x=>v.fetchers.delete(x))}function Vt(h,m,{flushSync:w}={}){var B,Y;let P=v.actionData!=null&&v.navigation.formMethod!=null&&_e(v.navigation.formMethod)&&v.navigation.state==="loading"&&((B=h.state)==null?void 0:B._isRedirect)!==!0,x;m.actionData?Object.keys(m.actionData).length>0?x=m.actionData:x=null:P?x=v.actionData:x=null;let j=m.loaderData?ui(v.loaderData,m.loaderData,m.matches||[],m.errors):v.loaderData,U=v.blockers;U.size>0&&(U=new Map(U),U.forEach((z,ne)=>U.set(ne,Jt)));let Q=Ye?!1:Ca(h,m.matches||v.matches),F=ge===!0||v.navigation.formMethod!=null&&_e(v.navigation.formMethod)&&((Y=h.state)==null?void 0:Y._isRedirect)!==!0;o.commitHmrRoutes(),Ye||N==="POP"||(N==="PUSH"?e.history.push(h,h.state):N==="REPLACE"&&e.history.replace(h,h.state));let H;if(N==="POP"&&!Ye&&h!==v.location){let z=ce.get(v.location.pathname);z&&z.has(h.pathname)?H={currentLocation:v.location,nextLocation:h}:ce.has(h.pathname)&&(H={currentLocation:h,nextLocation:v.location})}else if(Ce){let z=ce.get(v.location.pathname);z?z.add(h.pathname):(z=new Set([h.pathname]),ce.set(v.location.pathname,z)),H={currentLocation:v.location,nextLocation:h}}Pe({...m,actionData:x,loaderData:j,historyAction:N,location:h,initialized:!0,renderFallback:!1,navigation:xn,revalidation:"idle",restoreScrollPosition:Q,preventScrollReset:F,blockers:U},{viewTransitionOpts:H,flushSync:w===!0}),N="POP",ge=!1,Ce=!1,Ye=!1,J=!1,k==null||k.resolve(),k=null,Z==null||Z.resolve(),Z=null}async function pa(h,m){if(k==null||k.resolve(),k=null,typeof h=="number"){k||(k=di());let ue=k.promise;return e.history.go(h),ue}let w=Qn(v.location,v.matches,l,h,m==null?void 0:m.fromRouteId,m==null?void 0:m.relative),{path:P,submission:x,error:j}=ei(!1,w,m),U;if(m!=null&&m.mask){let ue=typeof m.mask=="string"?ot(m.mask):{...v.location.mask,...m.mask};if(U={pathname:ue.pathname??"",search:ue.search??"",hash:ue.hash??""},cn.test(U.pathname))throw new Error("External navigation is not allowed");U.pathname.startsWith("\\")&&(U.pathname=U.pathname.replace(/^\\+/,"/")),rr(typeof m.mask=="string"?m.mask:Ue(m.mask),Ue(U),e.history.createURL("/"),"reject")}let Q=v.location,F=_r(Q,P,m&&m.state,void 0,U);F={...F,...e.history.encodeLocation(F)},rr(h==null?e.history.createHref(v.location):typeof h=="string"?h:Ue(h),e.history.createHref(F.mask||F),e.history.createURL("/"),"reject");let H=m&&m.replace!=null?m.replace:void 0,B="PUSH";H===!0?B="REPLACE":H===!1||x!=null&&_e(x.formMethod)&&x.formAction===v.location.pathname+v.location.search&&(B="REPLACE");let Y=m&&"preventScrollReset"in m?m.preventScrollReset===!0:void 0,z=(m&&m.flushSync)===!0,ne=Sa({currentLocation:Q,nextLocation:F,historyAction:B});if(ne){Qr(ne,{state:"blocked",location:F,proceed(){Qr(ne,{state:"proceeding",proceed:void 0,reset:void 0,location:F}),pa(h,m)},reset(){let ue=new Map(v.blockers);ue.set(ne,Jt),Pe({blockers:ue})}});return}await Dt(B,F,{submission:x,pendingError:j,preventScrollReset:Y,replace:m&&m.replace,enableViewTransition:m&&m.viewTransition,flushSync:z,callSiteDefaultShouldRevalidate:m&&m.defaultShouldRevalidate})}function _s(){Z||(Z=di()),yn(),Pe({revalidation:"loading"});let h=Z.promise;return v.navigation.state==="submitting"?h:v.navigation.state==="idle"?(Dt(v.historyAction,v.location,{startUninterruptedRevalidation:!0}),h):(Dt(N||v.historyAction,v.navigation.location,{overrideNavigation:v.navigation,enableViewTransition:Ce===!0}),h)}async function Dt(h,m,w){te&&te.abort(),te=null,N=h,Ye=(w&&w.startUninterruptedRevalidation)===!0,Bs(v.location,v.matches),ge=(w&&w.preventScrollReset)===!0,Ce=(w&&w.enableViewTransition)===!0;let P=o.activeRoutes,x=w!=null&&w.initialHydration&&v.matches&&v.matches.length>0&&!M?v.matches:Ve(P,m,l,!1,o.branches),j=(w&&w.flushSync)===!0;if(x&&v.initialized&&!J&&$l(v.location,m)&&!(w&&w.submission&&_e(w.submission.formMethod))){Vt(m,{matches:x},{flushSync:j});return}let U=Wr(x,P,m.pathname);if(U.active&&U.matches&&(x=U.matches),!x){let{error:se,notFoundMatches:ie,route:ke}=vn(m.pathname);Vt(m,{matches:ie,loaderData:{},errors:{[ke.id]:se}},{flushSync:j});return}let Q=w&&w.overrideNavigation?{...w.overrideNavigation,matches:x,historyAction:h}:void 0;te=new AbortController;let F=er(e.history,m,te.signal,w&&w.submission),H=e.getContext?await e.getContext():new Ka,B;if(w&&w.pendingError)B=[Et(x).route.id,{type:"error",error:w.pendingError}];else if(w&&w.submission&&_e(w.submission.formMethod)){let se=await Ds(F,m,w.submission,x,h,H,U.active,w&&w.initialHydration===!0,{replace:w.replace,flushSync:j});if(se.shortCircuited)return;if(se.pendingActionResult){let[ie,ke]=se.pendingActionResult;if($e(ke)&&Fr(ke.error)&&ke.error.status===404){te=null,Vt(m,{matches:se.matches,loaderData:{},errors:{[ie]:ke.error}});return}}x=se.matches||x,B=se.pendingActionResult,Q=On(m,x,h,w.submission),j=!1,U.active=!1,F=er(e.history,F.url,F.signal)}let{shortCircuited:Y,matches:z,loaderData:ne,errors:ue,workingFetchers:Re}=await Fs(F,m,x,h,H,U.active,Q,w&&w.submission,w&&w.fetcherSubmission,w&&w.replace,w&&w.initialHydration===!0,j,B,w&&w.callSiteDefaultShouldRevalidate);Y||(te=null,Vt(m,{matches:z||x,...ci(B),loaderData:ne,errors:ue,...Re?{fetchers:Re}:{}}))}async function Ds(h,m,w,P,x,j,U,Q,F={}){yn();let H=Yl(m,P,x,w);if(Pe({navigation:H},{flushSync:F.flushSync===!0}),U){let z=await qr(P,m.pathname,h.signal);if(z.type==="aborted")return{shortCircuited:!0};if(z.type==="error"){if(z.partialMatches.length===0){let{matches:ue,route:Re}=Xr(o.activeRoutes);return{matches:ue,pendingActionResult:[Re.id,{type:"error",error:z.error}]}}let ne=Et(z.partialMatches).route.id;return{matches:z.partialMatches,pendingActionResult:[ne,{type:"error",error:z.error}]}}else if(z.matches)P=z.matches;else{let{notFoundMatches:ne,error:ue,route:Re}=vn(m.pathname);return{matches:ne,pendingActionResult:[Re.id,{type:"error",error:ue}]}}}let B,Y=nn(P,m);if(!Y.route.action&&!Y.route.lazy)B={type:"error",error:We(405,{method:h.method,pathname:m.pathname,routeId:Y.route.id})};else{let z=nr(i,s,h,m,P,Y,Q?[]:n,j),ne=await br(h,m,z,j,null);if(B=ne[Y.route.id],!B){for(let ue of P)if(ne[ue.route.id]){B=ne[ue.route.id];break}}if(h.signal.aborted)return{shortCircuited:!0}}if(It(B)){let z;return F&&F.replace!=null?z=F.replace:z=si(B.response.headers.get("Location"),new URL(h.url),l,e.history)===v.location.pathname+v.location.search,await Ft(h,B,!0,{submission:w,replace:z}),{shortCircuited:!0}}if($e(B)){let z=Et(P,Y.route.id);return(F&&F.replace)!==!0&&(N="PUSH"),{matches:P,pendingActionResult:[z.route.id,B,Y.route.id]}}return{matches:P,pendingActionResult:[Y.route.id,B]}}async function Fs(h,m,w,P,x,j,U,Q,F,H,B,Y,z,ne){let ue=U||On(m,w,P,Q),Re=Q||F||hi(ue),se=!Ye&&!B;if(j){if(se){let je=va(z);Pe({navigation:ue,...je!==void 0?{actionData:je}:{}},{flushSync:Y})}let re=await qr(w,m.pathname,h.signal);if(re.type==="aborted")return{shortCircuited:!0};if(re.type==="error"){if(re.partialMatches.length===0){let{matches:et,route:ft}=Xr(o.activeRoutes);return{matches:et,loaderData:{},errors:{[ft.id]:re.error}}}let je=Et(re.partialMatches).route.id;return{matches:re.partialMatches,loaderData:{},errors:{[je]:re.error}}}else if(re.matches)w=re.matches;else{let{error:je,notFoundMatches:et,route:ft}=vn(m.pathname);return{matches:et,loaderData:{},errors:{[ft.id]:je}}}}let ie=o.activeRoutes,{dsMatches:ke,revalidatingFetchers:Ie}=ti(h,x,i,s,e.history,v,w,Re,m,B?[]:n,B===!0,J,he,D,y,Oe,ie,l,e.patchRoutesOnNavigation!=null,o.branches,z,ne);if(pe=++Ee,!e.dataStrategy&&!ke.some(re=>re.shouldLoad)&&!ke.some(re=>re.route.middleware&&re.route.middleware.length>0)&&Ie.length===0){let re=new Map(v.fetchers),je=wa(re);return Vt(m,{matches:w,loaderData:{},errors:z&&$e(z[1])?{[z[0]]:z[1].error}:null,...ci(z),...je?{fetchers:re}:{}},{flushSync:Y}),{shortCircuited:!0}}if(se){let re={};if(!j){re.navigation=ue;let je=va(z);je!==void 0&&(re.actionData=je)}Ie.length>0&&(re.fetchers=As(Ie)),Pe(re,{flushSync:Y})}Ie.forEach(re=>{ct(re.key),re.controller&&oe.set(re.key,re.controller)});let Er=()=>Ie.forEach(re=>ct(re.key));te&&te.signal.addEventListener("abort",Er);let{loaderResults:vt,fetcherResults:Gt}=await ga(ke,Ie,h,m,x);if(h.signal.aborted)return{shortCircuited:!0};te&&te.signal.removeEventListener("abort",Er),Ie.forEach(re=>oe.delete(re.key));let gt=Zr(vt);if(gt)return await Ft(h,gt.result,!0,{replace:H}),{shortCircuited:!0};if(gt=Zr(Gt),gt)return Oe.add(gt.key),await Ft(h,gt.result,!0,{replace:H}),{shortCircuited:!0};let Ze=new Map(v.fetchers),{loaderData:gn,errors:Rt}=li(v,w,vt,z,Ie,Gt,Ze);B&&v.errors&&(Rt={...v.errors,...Rt});let Kr=wa(Ze),Yr=ba(pe,Ze),Vr=Kr||Yr||Ie.length>0;return{matches:w,loaderData:gn,errors:Rt,...Vr?{workingFetchers:Ze}:{}}}function va(h){if(h&&!$e(h[1]))return{[h[0]]:h[1].data};if(v.actionData)return Object.keys(v.actionData).length===0?null:v.actionData}function As(h){let m=new Map(v.fetchers);return h.forEach(w=>{let P=m.get(w.key),x=Pr(void 0,P?P.data:void 0);m.set(w.key,x)}),m}async function Us(h,m,w,P){ct(h);let x=(P&&P.flushSync)===!0,j=o.activeRoutes,U=Qn(v.location,v.matches,l,w,m,P==null?void 0:P.relative),Q=Ve(j,U,l,!1,o.branches),F=Wr(Q,j,U);if(F.active&&F.matches&&(Q=F.matches),!Q){ut(h,m,We(404,{pathname:U}),{flushSync:x});return}let{path:H,submission:B,error:Y}=ei(!0,U,P);if(Y){ut(h,m,Y,{flushSync:x});return}let z=e.getContext?await e.getContext():new Ka,ne=(P&&P.preventScrollReset)===!0;if(B&&_e(B.formMethod)){await ks(h,m,H,Q,z,F.active,x,ne,B,P&&P.defaultShouldRevalidate);return}y.set(h,{routeId:m,path:H}),await Is(h,m,H,Q,z,F.active,x,ne,B)}async function ks(h,m,w,P,x,j,U,Q,F,H){yn(),y.delete(h);let B=v.fetchers.get(h);lt(h,Vl(F,B),{flushSync:U});let Y=new AbortController,z=er(e.history,w,Y.signal,F);if(j){let de=await qr(P,new URL(z.url).pathname,z.signal,h);if(de.type==="aborted")return;if(de.type==="error"){ut(h,m,de.error,{flushSync:U});return}else if(de.matches)P=de.matches;else{ut(h,m,We(404,{pathname:w}),{flushSync:U});return}}let ne=nn(P,w);if(!ne.route.action&&!ne.route.lazy){let de=We(405,{method:F.formMethod,pathname:w,routeId:m});ut(h,m,de,{flushSync:U});return}oe.set(h,Y);let ue=Ee,Re=nr(i,s,z,w,P,ne,n,x),se=await br(z,w,Re,x,h),ie=se[ne.route.id];if(!ie){for(let de of Re)if(se[de.route.id]){ie=se[de.route.id];break}}
34if(z.signal.aborted){oe.get(h)===Y&&oe.delete(h);return}if(D.has(h)){if(It(ie)||$e(ie)){lt(h,rt(void 0));return}}else{if(It(ie))if(oe.delete(h),pe>ue){lt(h,rt(void 0));return}else return Oe.add(h),lt(h,Pr(F)),Ft(z,ie,!1,{fetcherSubmission:F,preventScrollReset:Q});if($e(ie)){ut(h,m,ie.error);return}}let ke=v.navigation.location||v.location,Ie=er(e.history,ke,Y.signal),Er=o.activeRoutes,vt=v.navigation.state!=="idle"?Ve(Er,v.navigation.location,l,!1,o.branches):v.matches;G(vt,"Didn't find any matches after fetcher action");let Gt=++Ee;Se.set(h,Gt);let{dsMatches:gt,revalidatingFetchers:Ze}=ti(Ie,x,i,s,e.history,v,vt,F,ke,n,!1,J,he,D,y,Oe,Er,l,e.patchRoutesOnNavigation!=null,o.branches,[ne.route.id,ie],H),gn=Pr(F,ie.data),Rt=new Map(v.fetchers);Rt.set(h,gn),Ze.filter(de=>de.key!==h).forEach(de=>{let At=de.key,Ta=Rt.get(At),qs=Pr(void 0,Ta?Ta.data:void 0);Rt.set(At,qs),ct(At),de.controller&&oe.set(At,de.controller)}),Pe({fetchers:Rt});let Kr=()=>Ze.forEach(de=>ct(de.key));Y.signal.addEventListener("abort",Kr);let{loaderResults:Yr,fetcherResults:Vr}=await ga(gt,Ze,Ie,ke,x);if(Y.signal.aborted)return;Y.signal.removeEventListener("abort",Kr),Se.delete(h),oe.delete(h),Ze.forEach(de=>oe.delete(de.key));let re=v.fetchers.has(h),je=de=>{if(!re)return de;let At=new Map(de.fetchers);return At.set(h,rt(ie.data)),{...de,fetchers:At}},et=Zr(Yr);if(et)return v=je(v),Ft(Ie,et.result,!1,{preventScrollReset:Q});if(et=Zr(Vr),et)return Oe.add(et.key),v=je(v),Ft(Ie,et.result,!1,{preventScrollReset:Q});let ft=new Map(v.fetchers);re&&ft.set(h,rt(ie.data));let{loaderData:Oa,errors:Rn}=li(v,vt,Yr,void 0,Ze,Vr,ft);ba(Gt,ft),v.navigation.state==="loading"&&Gt>pe?(G(N,"Expected pending action"),te&&te.abort(),Vt(v.navigation.location,{matches:vt,loaderData:Oa,errors:Rn,fetchers:ft})):(Pe({errors:Rn,loaderData:ui(v.loaderData,Oa,vt,Rn),fetchers:ft}),J=!1)}async function Is(h,m,w,P,x,j,U,Q,F){let H=v.fetchers.get(h);lt(h,Pr(F,H?H.data:void 0),{flushSync:U});let B=new AbortController,Y=er(e.history,w,B.signal);if(j){let ie=await qr(P,new URL(Y.url).pathname,Y.signal,h);if(ie.type==="aborted")return;if(ie.type==="error"){ut(h,m,ie.error,{flushSync:U});return}else if(ie.matches)P=ie.matches;else{ut(h,m,We(404,{pathname:w}),{flushSync:U});return}}let z=nn(P,w);oe.set(h,B);let ne=Ee,ue=nr(i,s,Y,w,P,z,n,x),Re=await br(Y,w,ue,x,h),se=Re[z.route.id];if(!se){for(let ie of P)if(Re[ie.route.id]){se=Re[ie.route.id];break}}if(oe.get(h)===B&&oe.delete(h),!Y.signal.aborted){if(D.has(h)){lt(h,rt(void 0));return}if(It(se))if(pe>ne){lt(h,rt(void 0));return}else{Oe.add(h),await Ft(Y,se,!1,{preventScrollReset:Q});return}if($e(se)){ut(h,m,se.error);return}lt(h,rt(se.data))}}async function Ft(h,m,w,{submission:P,fetcherSubmission:x,preventScrollReset:j,replace:U}={}){w||(k==null||k.resolve(),k=null),m.response.headers.has("X-Remix-Revalidate")&&(J=!0);let Q=m.response.headers.get("Location");G(Q,"Expected a Location header on the redirect Response");let F=Q,H=new URL(h.url);Q=si(Q,H,l,e.history),rr(F,Q,H,"allow-explicit");let B=_r(v.location,Q,{_isRedirect:!0});if(r){let se=!1;if(m.response.headers.has("X-Remix-Reload-Document"))se=!0;else if(ra(Q)){const ie=Gi(t,Q,!0);se=ie.origin!==t.location.origin||Ne(ie.pathname,l)==null}if(se){U?t.location.replace(Q):t.location.assign(Q);return}}te=null;let Y=U===!0||m.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:z,formAction:ne,formEncType:ue}=v.navigation;!P&&!x&&z&&ne&&ue&&(P=hi(v.navigation));let Re=P||x;if(El.has(m.response.status)&&Re&&_e(Re.formMethod))await Dt(Y,B,{submission:{...Re,formAction:Q},preventScrollReset:j||ge,enableViewTransition:w?Ce:void 0});else{let se=On(B,[],Y,P);await Dt(Y,B,{overrideNavigation:se,fetcherSubmission:x,preventScrollReset:j||ge,enableViewTransition:w?Ce:void 0})}}async function br(h,m,w,P,x){var Q;let j,U={};try{j=await Fl(f,h,m,w,x,P,!1)}catch(F){return w.filter(H=>H.shouldLoad).forEach(H=>{U[H.route.id]={type:"error",error:F}}),U}if(h.signal.aborted)return U;if(!_e(h.method))for(let F of w){if(((Q=j[F.route.id])==null?void 0:Q.type)==="error")break;!j.hasOwnProperty(F.route.id)&&!v.loaderData.hasOwnProperty(F.route.id)&&
34(!v.errors||!v.errors.hasOwnProperty(F.route.id))&&F.shouldCallHandler()&&(j[F.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${F.route.id}`)})}for(let[F,H]of Object.entries(j))if(Ql(H)){let B=H.result;U[F]={type:"redirect",response:Il(B,h,F,w,l)}}else U[F]=await kl(H);return U}async function ga(h,m,w,P,x){let j=br(w,P,h,x,null),U=Promise.all(m.map(async H=>{if(H.matches&&H.match&&H.request&&H.controller){let Y=(await br(H.request,H.path,H.matches,x,H.key))[H.match.route.id];return{[H.key]:Y}}else return Promise.resolve({[H.key]:{type:"error",error:We(404,{pathname:H.path})}})})),Q=await j,F=(await U).reduce((H,B)=>Object.assign(H,B),{});return{loaderResults:Q,fetcherResults:F}}function yn(){J=!0,y.forEach((h,m)=>{oe.has(m)&&he.add(m),ct(m)})}function lt(h,m,w={}){let P=new Map(v.fetchers);P.set(h,m),Pe({fetchers:P},{flushSync:(w&&w.flushSync)===!0})}function ut(h,m,w,P={}){let x=Et(v.matches,m),j=new Map(v.fetchers);pn(j,h),Pe({errors:{[x.route.id]:w},fetchers:j},{flushSync:(P&&P.flushSync)===!0})}function js(h){return C.set(h,(C.get(h)||0)+1),D.has(h)&&D.delete(h),v.fetchers.get(h)||Sl}function Ns(h,m){ct(h,m==null?void 0:m.reason),lt(h,rt(null))}function pn(h,m){let w=v.fetchers.get(m);oe.has(m)&&!(w&&w.state==="loading"&&Se.has(m))&&ct(m),y.delete(m),Se.delete(m),Oe.delete(m),D.delete(m),he.delete(m),h.delete(m)}function $s(h){let m=(C.get(h)||0)-1;m<=0?(C.delete(h),D.add(h)):C.set(h,m),Pe({fetchers:new Map(v.fetchers)})}function ct(h,m){let w=oe.get(h);w&&(w.abort(m),oe.delete(h))}function Ra(h,m){for(let w of h){let P=m.get(w);G(P,`Expected fetcher: ${w}`);let x=rt(P.data);m.set(w,x)}}function wa(h){let m=[],w=!1;for(let P of Oe){let x=h.get(P);G(x,`Expected fetcher: ${P}`),x.state==="loading"&&(Oe.delete(P),m.push(P),w=!0)}return Ra(m,h),w}function ba(h,m){let w=[];for(let[P,x]of Se)if(x<h){let j=m.get(P);G(j,`Expected fetcher: ${P}`),j.state==="loading"&&(ct(P),Se.delete(P),w.push(P))}return Ra(w,m),w.length>0}function Hs(h,m){let w=v.blockers.get(h)||Jt;return I.get(h)!==m&&I.set(h,m),w}function Ea(h){v.blockers.delete(h),I.delete(h)}function Qr(h,m){let w=v.blockers.get(h)||Jt;G(w.state==="unblocked"&&m.state==="blocked"||w.state==="blocked"&&m.state==="blocked"||w.state==="blocked"&&m.state==="proceeding"||w.state==="blocked"&&m.state==="unblocked"||w.state==="proceeding"&&m.state==="unblocked",`Invalid blocker state transition: ${w.state} -> ${m.state}`);let P=new Map(v.blockers);P.set(h,m),Pe({blockers:P})}function Sa({currentLocation:h,nextLocation:m,historyAction:w}){if(I.size===0)return;I.size>1&&ve(!1,"A router only supports one blocker at a time");let P=Array.from(I.entries()),[x,j]=P[P.length-1],U=v.blockers.get(x);if(!(U&&U.state==="proceeding")&&j({currentLocation:h,nextLocation:m,historyAction:w}))return x}function vn(h){let m=We(404,{pathname:h}),w=o.activeRoutes,{matches:P,route:x}=Xr(w);return{notFoundMatches:P,route:x,error:m}}function zs(h,m,w){if(b=h,E=m,S=w||null,!_&&v.navigation===xn){_=!0;let P=Ca(v.location,v.matches);P!=null&&Pe({restoreScrollPosition:P})}return()=>{b=null,E=null,S=null}}function Pa(h,m){return S&&S(h,m.map(P=>Yo(P,v.loaderData)))||h.key}function Bs(h,m){if(b&&E){let w=Pa(h,m);b[w]=E()}}function Ca(h,m){if(b){let w=Pa(h,m),P=b[w];if(typeof P=="number")return P}return null}function Wr(h,m,w){if(e.patchRoutesOnNavigation){let P=o.branches;if(h){if(Object.keys(h[0].params).length>0)return{active:!0,matches:Ve(m,w,l,!0,P)}}else return{active:!0,matches:Ve(m,w,l,!0,P)||[]}}return{active:!1,matches:null}}async function qr(h,m,w,P){if(!e.patchRoutesOnNavigation)return{type:"success",matches:h};let x=h;for(;;){let j=s;try{await e.patchRoutesOnNavigation({signal:w,path:m,matches:x,fetcherKey:P,patch:(H,B)=>{w.aborted||ri(H,B,o,j,i,!1)}})}catch(H){return{type:"error",error:H,partialMatches:x}}if(w.aborted)return{type:"aborted"};let U=o.branches,Q=Ve(o.activeRoutes,m,l,!1,U),F=null;if(Q){if(Object.keys(Q[0].params).length===0)return{type:"success",matches:Q};if(F=Ve(o.activeRoutes,m,l,!0,U),!(F&&x.length<F.length&&xa(x,F.slice(0,x.length))))return{type:"success",matches:Q}}if(F||(F=Ve(o.activeRoutes,m,l,!0,U)),!F||xa(x,F))return{type:"success",matches:null};x=F}}function xa(h,m){return h.length===m.length&&h.every((w,P)=>w.route.id===m[P].route.id)}function Qs(h){s={},o.setHmrRoutes(Dr(h,i,void 0,s))}function Ws(h,m,w=!1){ri(h,m,o,s,i,w),o.hasHMRRoutes||Pe({})}return q={get basename(){return l},get future(){return c},get state(){return v},get routes(){return o.stableRoutes},get branches(){return o.branches},get manifest(){return s},get window(){return t},initialize:le,subscribe:Te,enableScrollRestoration:zs,navigate:pa,fetch:Us,revalidate:_s,createHref:h=>e.history.createHref(h),createURL:h=>e.history.createURL(h),encodeLocation:h=>e.history.encodeLocation(h),getFetcher:js,resetFetcher:Ns,deleteFetcher:$s,dispose:ze,getBlocker:Hs,deleteBlocker:Ea,patchRoutes:Ws,_internalFetchControllers:oe,_internalSetRoutes:Qs,_internalSetStateDoNotUseOrYouWillBreakYourApp(h){Pe(h)}},e.instrumentations&&(q=dl(q,e.instrumentations.map(h=>
34h.router).filter(Boolean))),q}function Ol(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Qn(e,t,r,n,a,i){let s,o;if(a){s=[];for(let f of t)if(s.push(f),f.route.id===a){o=f;break}}else s=t,o=t[t.length-1];let l=Nr(n||".",fn(s),Ne(e.pathname,r)||e.pathname,i==="path");if(n==null&&(l.search=e.search,l.hash=e.hash),(n==null||n===""||n===".")&&o){let f=oa(l.search);if(o.route.index&&!f)l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index";else if(!o.route.index&&f){let c=new URLSearchParams(l.search),u=c.getAll("index");c.delete("index"),u.filter(R=>R).forEach(R=>c.append("index",R));let p=c.toString();l.search=p?`?${p}`:""}}return r!=="/"&&(l.pathname=sl({basename:r,pathname:l.pathname})),Ue(l)}function ei(e,t,r){if(!r||!Ol(r))return{path:t};if(r.formMethod&&!Kl(r.formMethod))return{path:t,error:We(405,{method:r.formMethod})};let n=()=>({path:t,error:We(400,{type:"invalid-body"})}),i=(r.formMethod||"get").toUpperCase(),s=vs(t);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!_e(i))return n();let u=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((p,[R,b])=>`${p}${R}=${b}
35`,""):String(r.body);return{path:t,submission:{formMethod:i,formAction:s,formEncType:r.formEncType,formData:void 0,json:void 0,text:u}}}else if(r.formEncType==="application/json"){if(!_e(i))return n();try{let u=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:t,submission:{formMethod:i,formAction:s,formEncType:r.formEncType,formData:void 0,json:u,text:void 0}}}catch{return n()}}}G(typeof FormData=="function","FormData is not available in this environment");let o,l;if(r.formData)o=Kn(r.formData),l=r.formData;else if(r.body instanceof FormData)o=Kn(r.body),l=r.body;else if(r.body instanceof URLSearchParams)o=r.body,l=oi(o);else if(r.body==null)o=new URLSearchParams,l=new FormData;else try{o=new URLSearchParams(r.body),l=oi(o)}catch{return n()}let f={formMethod:i,formAction:s,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:l,json:void 0,text:void 0};if(_e(f.formMethod))return{path:t,submission:f};let c=ot(t);return e&&c.search&&oa(c.search)&&o.append("index",""),c.search=`?${o}`,{path:Ue(c),submission:f}}function ti(e,t,r,n,a,i,s,o,l,f,c,u,p,R,b,S,E,_,O,M,A,T){var Ye;let K=A?$e(A[1])?A[1].error:A[1].data:void 0,q=a.createURL(i.location),v=a.createURL(l),N;if(c&&i.errors){let J=Object.keys(i.errors)[0];N=s.findIndex(he=>he.route.id===J)}else if(A&&$e(A[1])){let J=A[0];N=s.findIndex(he=>he.route.id===J)-1}let k=A?A[1].statusCode:void 0,ge=k&&k>=400,te={currentUrl:q,currentParams:((Ye=i.matches[0])==null?void 0:Ye.params)||{},nextUrl:v,nextParams:s[0].params,...o,actionResult:K,actionStatus:k},Ce=Hr(s),ce=s.map((J,he)=>{let{route:oe}=J,Ee=null;if(N!=null&&he>N)Ee=!1;else if(oe.lazy)Ee=!0;else if(!ia(oe))Ee=!1;else if(c){let{shouldLoad:y}=cs(oe,i.loaderData,i.errors);Ee=y}else Tl(i.loaderData,i.matches[he],J)&&(Ee=!0);if(Ee!==null)return Wn(r,n,e,l,Ce,J,f,t,Ee);let pe=!1;typeof T=="boolean"?pe=T:ge?pe=!1:(u||q.pathname+q.search===v.pathname+v.search||q.search!==v.search||Ml(i.matches[he],J))&&(pe=!0);let Se={...te,defaultShouldRevalidate:pe},Oe=Lr(J,Se);return Wn(r,n,e,l,Ce,J,f,t,Oe,Se,T)}),fe=[];return b.forEach((J,he)=>{if(c||!s.some(D=>D.route.id===J.routeId)||R.has(he))return;let oe=i.fetchers.get(he),Ee=oe&&oe.state!=="idle"&&oe.data===void 0,pe=Ve(E,J.path,_??"/",!1,M);if(!pe){if(O&&Ee)return;fe.push({key:he,routeId:J.routeId,path:J.path,matches:null,match:null,request:null,controller:null});return}if(S.has(he))return;let Se=nn(pe,J.path),Oe=new AbortController,y=er(a,J.path,Oe.signal),C=null;if(p.has(he))p.delete(he),C=nr(r,n,y,J.path,pe,Se,f,t);else if(Ee)u&&(C=nr(r,n,y,J.path,pe,Se,f,t));else{let D;typeof T=="boolean"?D=T:ge?D=!1:D=u;let I={...te,defaultShouldRevalidate:D};Lr(Se,I)&&(C=nr(r,n,y,J.path,pe,Se,f,t,I))}C&&fe.push({key:he,routeId:J.routeId,path:J.path,matches:C,match:Se,request:y,controller:Oe})}),{dsMatches:ce,revalidatingFetchers:fe}}function ia(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function cs(e,t,r){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!ia(e))return{shouldLoad:!1,renderFallback:!1};let n=t!=null&&e.id in t,a=r!=null&&r[e.id]!==void 0;if(!n&&a)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader=="function"&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!n};let i=!n&&!a;return{shouldLoad:i,renderFallback:i}}function Tl(e,t,r){let n=!t||r.route.id!==t.route.id,a=!e.hasOwnProperty(r.route.id);return n||a}function Ml(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function Lr(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}function ri(e,t,r,n,a,i){let s;if(e){let f=n[e];G(f,`No route found to patch children into: routeId = ${e}`),f.children||(f.children=[]),s=f.children}else s=r.activeRoutes;let o=[],l=[];
35if(t.forEach(f=>{let c=s.find(u=>fs(f,u));c?l.push({existingRoute:c,newRoute:f}):o.push(f)}),o.length>0){let f=Dr(o,a,[e||"_","patch",String((s==null?void 0:s.length)||"0")],n);s.push(...f)}if(i&&l.length>0)for(let f=0;f<l.length;f++){let{existingRoute:c,newRoute:u}=l[f],p=c,[R]=Dr([u],a,[],{},!0);Object.assign(p,{element:R.element?R.element:p.element,errorElement:R.errorElement?R.errorElement:p.errorElement,hydrateFallbackElement:R.hydrateFallbackElement?R.hydrateFallbackElement:p.hydrateFallbackElement})}r.hasHMRRoutes||r.setRoutes([...r.activeRoutes])}function fs(e,t){var r;return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:((r=e.children)==null?void 0:r.every((n,a)=>{var i;return(i=t.children)==null?void 0:i.some(s=>fs(n,s))}))??!1:!1}var ni=new WeakMap,hs=({key:e,route:t,manifest:r,mapRouteProperties:n})=>{let a=r[t.id];if(G(a,"No route found in manifest"),!a.lazy||typeof a.lazy!="object")return;let i=a.lazy[e];if(!i)return;let s=ni.get(a);s||(s={},ni.set(a,s));let o=s[e];if(o)return o;let l=(async()=>{let f=Qo(e),u=a[e]!==void 0&&e!=="hasErrorBoundary";if(f)ve(!f,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),s[e]=Promise.resolve();else if(u)ve(!1,`Route "${a.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let p=await i();p!=null&&(Object.assign(a,{[e]:p}),Object.assign(a,n(a)))}typeof a.lazy=="object"&&(a.lazy[e]=void 0,Object.values(a.lazy).every(p=>p===void 0)&&(a.lazy=void 0))})();return s[e]=l,l},ai=new WeakMap;function Ll(e,t,r,n,a){let i=r[e.id];if(G(i,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let c=ai.get(i);if(c)return{lazyRoutePromise:c,lazyHandlerPromise:c};let u=(async()=>{G(typeof e.lazy=="function","No lazy route function found");let p=await e.lazy(),R={};for(let b in p){let S=p[b];if(S===void 0)continue;let E=qo(b),O=i[b]!==void 0&&b!=="hasErrorBoundary";E?ve(!E,"Route property "+b+" is not a supported property to be returned from a lazy route function. This property will be ignored."):O?ve(!O,`Route "${i.id}" has a static property "${b}" defined but its lazy function is also returning a value for this property. The lazy route property "${b}" will be ignored.`):R[b]=S}Object.assign(i,R),Object.assign(i,{...n(i),lazy:void 0})})();return ai.set(i,u),u.catch(()=>{}),{lazyRoutePromise:u,lazyHandlerPromise:u}}let s=Object.keys(e.lazy),o=[],l;for(let c of s){if(a&&a.includes(c))continue;let u=hs({key:c,route:e,manifest:r,mapRouteProperties:n});u&&(o.push(u),c===t&&(l=u))}let f=o.length>0?Promise.all(o).then(()=>{}):void 0;return f==null||f.catch(()=>{}),l==null||l.catch(()=>{}),{lazyRoutePromise:f,lazyHandlerPromise:l}}async function ii(e){let t=e.matches.filter(a=>a.shouldLoad),r={};return(await Promise.all(t.map(a=>a.resolve()))).forEach((a,i)=>{r[t[i].route.id]=a}),r}async function _l(e){return e.matches.some(t=>t.route.middleware)?ds(e,()=>ii(e)):ii(e)}function ds(e,t){return Dl(e,t,n=>{if(ql(n))throw n;return n},zl,r);function r(n,a,i){if(i)return Promise.resolve(Object.assign(i.value,{[a]:{type:"error",result:n}}));{let{matches:s}=e,o=Math.min(Math.max(s.findIndex(f=>f.route.id===a),0),Math.max(s.findIndex(f=>f.shouldCallHandler()),0)),l=Et(s,s[o].route.id).route.id;return Promise.resolve({[l]:{type:"error",result:n}})}}}async function Dl(e,t,r,n,a){let{matches:i,...s}=e,o=i.flatMap(f=>f.route.middleware?f.route.middleware.map(c=>[f.route.id,c]):[]);return await ms(s,o,t,r,n,a)}async function ms(e,t,r,n,a,i,s=0){let{request:o}=e;if(o.signal.aborted)throw o.signal.reason??new Error(`Request aborted: ${o.method} ${o.url}`);let l=t[s];if(!l)return await r();let[f,c]=l,u,p=async()=>{if(u)throw new Error("You may only call `next()` once per middleware");try{return u={value:await ms(e,t,r,n,a,i,s+1)},u.value}catch(R){return u={value:await i(R,f,u)},u.value}};try{let R=await c(e,p),b=R!=null?n(R):void 0;return a(b)?b:u?b??u.value:(u={value:await p()},u.value)}catch(R){return await i(R,f,u)}}function ys(e,t,r,n,a){let i=hs({key:"middleware",route:n.route,manifest:t,mapRouteProperties:e}),s=Ll(n.route,_e(r.method)?"action":"loader",t,e,a);return{middleware:i,route:s.lazyRoutePromise,handler:s.lazyHandlerPromise}}function Wn(e,t,r,n,a,i,s,o,l,f=null,c){let u=!1,p=ys(e,t,r,i,s);return{...i,_lazyPromises:p,shouldLoad:l,shouldRevalidateArgs:f,shouldCallHandler(R){return u=!0,f?typeof c=="boolean"?Lr(i,{...f,defaultShouldRevalidate:c}):typeof R=="boolean"?Lr(i,{...f,defaultShouldRevalidate:R}):Lr(i,f):l},resolve(R){let{lazy:b,loader:S,middleware:E}=i.route,_=u||l||R&&!_e(r.method)&&(b||S),O=E&&E.length>0&&!S&&!b;return _&&(_e(r.method)||!O)?Al({request:r,path:n,pattern:a,match:i,lazyHandlerPromise:p==null?void 0:p.handler,lazyRoutePromise:p==null?void 0:p.route,handlerOverride:R,scopedContext:o}):Promise.resolve({type:"data",result:void 0})}}}function nr(e,t,r,n,a,i,s,o,l=null){return a.map(f=>f.route.id!==i.route.id?{...f,shouldLoad:!1,shouldRevalidateArgs:l,shouldCallHandler:()=>!1,_lazyPromises:ys(e,t,r,f,s),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Wn(e,t,r,n,Hr(a),f,s,o,!0,l))}async function Fl(e,t,r,n,a,i,s){n.some(c=>{var u;return(u=c._lazyPromises)==null?void 0:u.middleware})&&await Promise.all(n.map(c=>{var u;return(u=c._lazyPromises)==null?void 0:u.middleware}));let o={request:t,url:ps(t,r),pattern:Hr(n),params:n[0].params,context:i,matches:n},f=await e({...o,fetcherKey:a,runClientMiddleware:c=>{let u=o;return ds(u,()=>c({...u,fetcherKey:a,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(n.flatMap(c=>{var u,p;return[(u=c._lazyPromises)==null?void 0:u.handler,(p=c._lazyPromises)==null?void 0:p.route]}))}catch{}return f}async function Al({request:e,path:t,pattern:r,match:n,lazyHandlerPromise:a,lazyRoutePromise:i,handlerOverride:s,scopedContext:o}){let l,f,c=_e(e.method),u=c?"action":"loader",p=R=>
35{let b,S=new Promise((O,M)=>b=M);f=()=>b(),e.signal.addEventListener("abort",f);let E=O=>typeof R!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${u}" [routeId: ${n.route.id}]`)):R({request:e,url:ps(e,t),pattern:r,params:n.params,context:o},...O!==void 0?[O]:[]),_=(async()=>{try{return{type:"data",result:await(s?s(M=>E(M)):E())}}catch(O){return{type:"error",result:O}}})();return Promise.race([_,S])};try{let R=c?n.route.action:n.route.loader;if(a||i)if(R){let b,[S]=await Promise.all([p(R).catch(E=>{b=E}),a,i]);if(b!==void 0)throw b;l=S}else{await a;let b=c?n.route.action:n.route.loader;if(b)[l]=await Promise.all([p(b),i]);else if(u==="action"){let S=new URL(e.url),E=S.pathname+S.search;throw We(405,{method:e.method,pathname:E,routeId:n.route.id})}else return{type:"data",result:void 0}}else if(R)l=await p(R);else{let b=new URL(e.url),S=b.pathname+b.search;throw We(404,{pathname:S})}}catch(R){return{type:"error",result:R}}finally{f&&e.signal.removeEventListener("abort",f)}return l}async function Ul(e){let t=e.headers.get("Content-Type");return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function kl(e){var n,a,i,s,o;let{result:t,type:r}=e;if(sa(t)){let l;try{l=await Ul(t)}catch(f){return{type:"error",error:f}}return r==="error"?{type:"error",error:new $r(t.status,t.statusText,l),statusCode:t.status,headers:t.headers}:{type:"data",data:l,statusCode:t.status,headers:t.headers}}return r==="error"?fi(t)?t.data instanceof Error?{type:"error",error:t.data,statusCode:(n=t.init)==null?void 0:n.status,headers:(a=t.init)!=null&&a.headers?new Headers(t.init.headers):void 0}:{type:"error",error:Hl(t),statusCode:Fr(t)?t.status:void 0,headers:(i=t.init)!=null&&i.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:Fr(t)?t.status:void 0}:fi(t)?{type:"data",data:t.data,statusCode:(s=t.init)==null?void 0:s.status,headers:(o=t.init)!=null&&o.headers?new Headers(t.init.headers):void 0}:{type:"data",data:t}}function Il(e,t,r,n,a){let i=e.headers.get("Location");if(G(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!ra(i)){let s=n.slice(0,n.findIndex(o=>o.route.id===r)+1);i=Qn(new URL(t.url),s,a,i),e.headers.set("Location",i)}return e}var jl=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function qn(e){try{return jl.includes(new URL(e).protocol)}catch{return!1}}function si(e,t,r,n){if(ra(e)){let a=e,i=cn.test(a)?new URL(Vi(a,t.protocol)):new URL(a);if(qn(i.toString()))throw new Error("Invalid redirect location");let s=Ne(i.pathname,r)!=null;if(i.origin===t.origin&&s)return na(i.pathname)+i.search+i.hash}try{let a=n.createURL(e);if(qn(a.toString()))throw new Error("Invalid redirect location")}catch{}return e}function er(e,t,r,n){let a=e.createURL(vs(t)).toString(),i={signal:r};if(n&&_e(n.formMethod)){let{formMethod:s,formEncType:o}=n;i.method=s.toUpperCase(),o==="application/json"?(i.headers=new Headers({"Content-Type":o}),i.body=JSON.stringify(n.json)):o==="text/plain"?i.body=n.text:o==="application/x-www-form-urlencoded"&&n.formData?i.body=Kn(n.formData):i.body=n.formData}return new Request(a,i)}function ps(e,t){let r=new URL(e.url),n=typeof t=="string"?ot(t):t;if(r.pathname=n.pathname||"/",n.search){let a=new URLSearchParams(n.search),i=a.getAll("index");a.delete("index");for(let s of i.filter(Boolean))a.append("index",s);r.search=a.size?`?${a.toString()}`:""}else r.search="";return r.hash=n.hash||"",r}function Kn(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function oi(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function Nl(e,t,r,n=!1,a=!1){let i={},s=null,o,l=!1,f={},c=r&&$e(r[1])?r[1].error:void 0;return e.forEach(u=>{if(!(u.route.id in t))return;let p=u.route.id,R=t[p];if(G(!It(R),"Cannot handle redirect results in processLoaderData"),$e(R)){let b=R.error;if(c!==void 0&&(b=c,c=void 0),s=s||{},a)s[p]=b;else{let S=Et(e,p);s[S.route.id]==null&&(s[S.route.id]=b)}n||(i[p]=us),l||(l=!0,o=Fr(R.error)?R.error.status:500),R.headers&&(f[p]=R.headers)}else i[p]=R.data,R.statusCode&&R.statusCode!==200&&!l&&(o=R.statusCode),R.headers&&(f[p]=R.headers)}),c!==void 0&&r&&(s={[r[0]]:c},r[2]&&(i[r[2]]=void 0)),{loaderData:i,errors:s,statusCode:o||200,loaderHeaders:f}}function li(e,t,r,n,a,i,s){let{loaderData:o,errors:l}=Nl(t,r,n);return a.filter(f=>!f.matches||f.matches.some(c=>
35c.shouldLoad)).forEach(f=>{let{key:c,match:u,controller:p}=f;if(p&&p.signal.aborted)return;let R=i[c];if(G(R,"Did not find corresponding fetcher result"),$e(R)){let b=Et(e.matches,u==null?void 0:u.route.id);l&&l[b.route.id]||(l={...l,[b.route.id]:R.error}),s.delete(c)}else if(It(R))G(!1,"Unhandled fetcher revalidation redirect");else{let b=rt(R.data);s.set(c,b)}}),{loaderData:o,errors:l}}function ui(e,t,r,n){let a=Object.entries(t).filter(([,i])=>i!==us).reduce((i,[s,o])=>(i[s]=o,i),{});for(let i of r){let s=i.route.id;if(!t.hasOwnProperty(s)&&e.hasOwnProperty(s)&&i.route.loader&&(a[s]=e[s]),n&&n.hasOwnProperty(s))break}return a}function ci(e){return e?$e(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Et(e,t){return(t?e.slice(0,e.findIndex(n=>n.route.id===t)+1):[...e]).reverse().find(n=>n.route.hasErrorBoundary===!0)||e[0]}function Xr(e){let t=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function We(e,{pathname:t,routeId:r,method:n,type:a,message:i}={}){let s="Unknown Server Error",o="Unknown @remix-run/router error";return e===400?(s="Bad Request",n&&t&&r?o=`You made a ${n} request to "${t}" but did not provide a \`loader\` for route "${r}", so there is no way to handle the request.`:a==="invalid-body"&&(o="Unable to encode submission body")):e===403?(s="Forbidden",o=`Route "${r}" does not match URL "${t}"`):e===404?(s="Not Found",o=`No route matches URL "${t}"`):e===405&&(s="Method Not Allowed",n&&t&&r?o=`You made a ${n.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${r}", so there is no way to handle the request.`:n&&(o=`Invalid request method "${n.toUpperCase()}"`)),new $r(e||500,s,new Error(o),!0)}function Zr(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[n,a]=t[r];if(It(a))return{key:n,result:a}}}function vs(e){let t=typeof e=="string"?ot(e):e;return Ue({...t,hash:""})}function $l(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Hl(e){var t,r;return new $r(((t=e.init)==null?void 0:t.status)??500,((r=e.init)==null?void 0:r.statusText)??"Internal Server Error",e.data)}function zl(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([t,r])=>typeof t=="string"&&Bl(r))}function Bl(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function Ql(e){return sa(e.result)&&os.has(e.result.status)}function $e(e){return e.type==="error"}function It(e){return(e&&e.type)==="redirect"}function fi(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function sa(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Wl(e){return os.has(e)}function ql(e){return sa(e)&&Wl(e.status)&&e.headers.has("Location")}function Kl(e){return bl.has(e.toUpperCase())}function _e(e){return Rl.has(e.toUpperCase())}function oa(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function nn(e,t){let r=typeof t=="string"?ot(t).search:t.search;if(e[e.length-1].route.index&&oa(r||""))return e[e.length-1];let n=rs(e);return n[n.length-1]}function hi(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:i,json:s}=e;if(!(!t||!r||!n)){if(a!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a};if(i!=null)return{formMethod:t,formAction:r,formEncType:n,formData:i,json:void 0,text:void 0};if(s!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:s,text:void 0}}}function On(e,t,r,n){return n?{state:"loading",location:e,matches:t,historyAction:r,formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text}:{state:"loading",location:e,matches:t,historyAction:r,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Yl(e,t,r,n){return{state:"submitting",location:e,matches:t,historyAction:r,formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text}}function Pr(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 Vl(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 rt(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}
35function Gl(e,t){try{let r=e.sessionStorage.getItem(ls);if(r){let n=JSON.parse(r);for(let[a,i]of Object.entries(n||{}))i&&Array.isArray(i)&&t.set(a,new Set(i||[]))}}catch{}}function Jl(e,t){if(t.size>0){let r={};for(let[n,a]of t)r[n]=[...a];try{e.sessionStorage.setItem(ls,JSON.stringify(r))}catch(n){ve(!1,`Failed to save applied view transitions in sessionStorage (${n}).`)}}}function di(){let e,t,r=new Promise((n,a)=>{e=async i=>{n(i);try{await r}catch{}},t=async i=>{a(i);try{await r}catch{}}});return{promise:r,resolve:e,reject:t}}var Yt=g.createContext(null);Yt.displayName="DataRouter";var zr=g.createContext(null);zr.displayName="DataRouterState";var gs=g.createContext(!1);function Rs(){return g.useContext(gs)}var la=g.createContext({isTransitioning:!1});la.displayName="ViewTransition";var ws=g.createContext(new Map);ws.displayName="Fetchers";var Xl=g.createContext(null);Xl.displayName="Await";var He=g.createContext(null);He.displayName="Navigation";var hn=g.createContext(null);hn.displayName="Location";var Ke=g.createContext({outlet:null,matches:[],isDataRoute:!1});Ke.displayName="Route";var ua=g.createContext(null);ua.displayName="RouteError";var bs="REACT_ROUTER_ERROR",Zl="REDIRECT",eu="ROUTE_ERROR_RESPONSE";function tu(e){if(e.startsWith(`${bs}:${Zl}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function ru(e){if(e.startsWith(`${bs}:${eu}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new $r(t.status,t.statusText,t.data)}catch{}}function nu(e,{relative:t}={}){G(wr(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=g.useContext(He),{hash:a,pathname:i,search:s}=Br(e,{relative:t}),o=i;return r!=="/"&&(o=i==="/"?r:qe([r,i])),n.createHref({pathname:o,search:s,hash:a})}function wr(){return g.useContext(hn)!=null}function Xe(){return G(wr(),"useLocation() may be used only in the context of a <Router> component."),g.useContext(hn).location}var Es="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Ss(e){g.useContext(He).static||g.useLayoutEffect(e)}function ca(){let{isDataRoute:e}=g.useContext(Ke);return e?vu():au()}function au(){G(wr(),"useNavigate() may be used only in the context of a <Router> component.");let e=g.useContext(Yt),{basename:t,navigator:r}=g.useContext(He),{matches:n}=g.useContext(Ke),{pathname:a}=Xe(),i=JSON.stringify(fn(n)),s=g.useRef(!1);return Ss(()=>{s.current=!0}),g.useCallback((l,f={})=>{if(ve(s.current,Es),!s.current)return;if(typeof l=="number"){r.go(l);return}let c=Nr(l,JSON.parse(i),a,f.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:qe([t,c.pathname])),rr(typeof l=="string"?l:Ue(l),r.createHref(c),aa(r),"reject"),(f.replace?r.replace:r.push)(c,f.state,f)},[t,r,i,a,e])}var iu=g.createContext(null);function su(e){let t=g.useContext(Ke).outlet;return g.useMemo(()=>t&&g.createElement(iu.Provider,{value:e},t),[t,e])}function Rc(){let{matches:e}=g.useContext(Ke),t=e[e.length-1];return(t==null?void 0:t.params)??{}}function Br(e,{relative:t}={}){let{matches:r}=g.useContext(Ke),{pathname:n}=Xe(),a=JSON.stringify(fn(r));return g.useMemo(()=>Nr(e,JSON.parse(a),n,t==="path"),[e,a,n,t])}function ou(e,t,r){G(wr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:n}=g.useContext(He),{matches:a}=g.useContext(Ke),i=a[a.length-1],s=i?i.params:{},o=i?i.pathname:"/",l=i?i.pathnameBase:"/",f=i&&i.route;{let E=f&&f.path||"";Os(o,!f||E.endsWith("*")||E.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${o}" (under <Route path="${E}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
36
37Please change the parent <Route path="${E}"> to <Route path="${E==="/"?"*":`${E}/*`}">.`)}let c=Xe(),u;u=c;let p=u.pathname||"/",R=p;if(l!=="/"){let E=l.replace(/^\//,"").split("/");R="/"+p.replace(/^\//,"").split("/").slice(E.length).join("/")}let b=r&&r.state.matches.length?r.state.matches.map(E=>Object.assign(E,{route:r.manifest[E.route.id]||E.route})):Ji(e,{pathname:R});return ve(f||b!=null,`No routes matched location "${u.pathname}${u.search}${u.hash}" `),ve(b==null||b[b.length-1].route.element!==void 0||b[b.length-1].route.Component!==void 0||b[b.length-1].route.lazy!==void 0,`Matched leaf route at location "${u.pathname}${u.search}${u.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),hu(b&&b.map(E=>
37Object.assign({},E,{params:Object.assign({},s,E.params),pathname:qe([l,n.encodeLocation?n.encodeLocation(E.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?l:qe([l,n.encodeLocation?n.encodeLocation(E.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathnameBase])})),a,r)}function lu(){let e=yu(),t=Fr(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:n},i={padding:"2px 4px",backgroundColor:n},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=g.createElement(g.Fragment,null,g.createElement("p",null,"💿 Hey developer 👋"),g.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",g.createElement("code",{style:i},"ErrorBoundary")," or"," ",g.createElement("code",{style:i},"errorElement")," prop on your route.")),g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},t),r?g.createElement("pre",{style:a},r):null,s)}var uu=g.createElement(lu,null),Ps=class extends g.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const r=ru(e.digest);r&&(e=r)}let t=e!==void 0?g.createElement(Ke.Provider,{value:this.props.routeContext},g.createElement(ua.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?g.createElement(cu,{error:e},t):t}};Ps.contextType=gs;var Tn=new WeakMap;function cu({children:e,error:t}){let{basename:r,navigator:n}=g.useContext(He);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let a=tu(t.digest);if(a){let i=Tn.get(t);if(i)throw i;let s=as(a.location,r),o=s.absoluteURL||s.to;if(rr(a.location,o,aa(n),"allow-explicit"),qn(o))throw new Error("Invalid redirect location");if(ns&&!Tn.get(t))if(s.isExternal||a.reloadDocument)window.location.href=o;else{const l=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(s.to,{replace:a.replace}));throw Tn.set(t,l),l}return g.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o}`})}}return e}function fu({routeContext:e,match:t,children:r}){let n=g.useContext(Yt);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),g.createElement(Ke.Provider,{value:e},r)}function hu(e,t=[],r){let n=r==null?void 0:r.state;if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,i=n==null?void 0:n.errors;if(i!=null){let c=a.findIndex(u=>u.route.id&&(i==null?void 0:i[u.route.id])!==void 0);G(c>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),a=a.slice(0,Math.min(a.length,c+1))}let s=!1,o=-1;if(r&&n){s=n.renderFallback;for(let c=0;c<a.length;c++){let u=a[c];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(o=c),u.route.id){let{loaderData:p,errors:R}=n,b=u.route.loader&&!p.hasOwnProperty(u.route.id)&&(!R||R[u.route.id]===void 0);if(u.route.lazy||b){r.isStatic&&(s=!0),o>=0?a=a.slice(0,o+1):a=[a[0]];break}}}}let l=r==null?void 0:r.onError,f=n&&l?(c,u)=>{var p,R;l(c,{location:n.location,params:((R=(p=n.matches)==null?void 0:p[0])==null?void 0:R.params)??{},pattern:Hr(n.matches),errorInfo:u})}:void 0;return a.reduceRight((c,u,p)=>{let R,b=!1,S=null,E=null;n&&(R=i&&u.route.id?i[u.route.id]:void 0,S=u.route.errorElement||uu,s&&(o<0&&p===0?(Os("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),b=!0,E=null):o===p&&(b=!0,E=u.route.hydrateFallbackElement||null)));let _=t.concat(a.slice(0,p+1)),O=()=>{let M;return R?M=S:b?M=E:u.route.Component?M=g.createElement(u.route.Component,null):u.route.element?M=u.route.element:M=c,g.createElement(fu,{match:u,routeContext:{outlet:c,matches:_,isDataRoute:n!=null},children:M})};return n&&(u.route.ErrorBoundary||u.route.errorElement||p===0)?g.createElement(Ps,{location:n.location,revalidation:n.revalidation,component:S,error:R,children:O(),routeC
37ontext:{outlet:null,matches:_,isDataRoute:!0},onError:f}):O()},null)}function fa(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function Cs(e){let t=g.useContext(Yt);return G(t,fa(e)),t}function xs(e){let t=g.useContext(zr);return G(t,fa(e)),t}function du(e){let t=g.useContext(Ke);return G(t,fa(e)),t}function ha(e){let t=du(e),r=t.matches[t.matches.length-1];return G(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function mu(){return ha("useRouteId")}function yu(){var n;let e=g.useContext(ua),t=xs("useRouteError"),r=ha("useRouteError");return e!==void 0?e:(n=t.errors)==null?void 0:n[r]}var pu=0;function wc(e){let{router:t,basename:r}=Cs("useBlocker"),n=xs("useBlocker"),[a,i]=g.useState(""),s=g.useCallback(o=>{if(typeof e!="function")return!!e;if(r==="/")return e(o);let{currentLocation:l,nextLocation:f,historyAction:c}=o;return e({currentLocation:{...l,pathname:Ne(l.pathname,r)||l.pathname},nextLocation:{...f,pathname:Ne(f.pathname,r)||f.pathname},historyAction:c})},[r,e]);return g.useEffect(()=>{let o=String(++pu);return i(o),()=>t.deleteBlocker(o)},[t]),g.useEffect(()=>{a!==""&&t.getBlocker(a,s)},[t,a,s]),a&&n.blockers.has(a)?n.blockers.get(a):Jt}function vu(){let{router:e}=Cs("useNavigate"),t=ha("useNavigate"),r=g.useRef(!1);return Ss(()=>{r.current=!0}),g.useCallback(async(a,i={})=>{ve(r.current,Es),r.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...i}))},[e,t])}var mi={};function Os(e,t,r){!t&&!mi[e]&&(mi[e]=!0,ve(!1,r))}var yi={};function pi(e,t){!e&&!yi[t]&&(yi[t]=!0,console.warn(t))}var gu="useOptimistic",vi=eo[gu],Ru=()=>{};function wu(e){return vi?vi(e):[e,Ru]}function bu(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&ve(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:g.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&ve(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:g.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&ve(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:g.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var Eu=["HydrateFallback","hydrateFallbackElement"],Su=class{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",e(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",t(r))}})}};function Pu({router:e,flushSync:t,onError:r,useTransitions:n}){n=Rs()||n;let[i,s]=g.useState(e.state),[o,l]=wu(i),[f,c]=g.useState(),[u,p]=g.useState({isTransitioning:!1}),[R,b]=g.useState(),[S,E]=g.useState(),[_,O]=g.useState(),M=g.useRef(new Map),A=g.useCallback((v,{deletedFetchers:N,newErrors:k,flushSync:ge,viewTransitionOpts:te})=>{k&&r&&Object.values(k).forEach(ce=>{var fe;return r(ce,{location:v.location,params:((fe=v.matches[0])==null?void 0:fe.params)??{},pattern:Hr(v.matches)})}),v.fetchers.forEach((ce,fe)=>{ce.data!==void 0&&M.current.set(fe,ce.data)}),N.forEach(ce=>M.current.delete(ce)),pi(ge===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable.  Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let Ce=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(pi(te==null||Ce,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!te||!Ce){t&&ge?t(()=>s(v)):n===!1?s(v):g.startTransition(()=>
37{n===!0&&l(ce=>gi(ce,v)),s(v)});return}if(t&&ge){t(()=>{S&&(R==null||R.resolve(),S.skipTransition()),p({isTransitioning:!0,flushSync:!0,currentLocation:te.currentLocation,nextLocation:te.nextLocation})});let ce=e.window.document.startViewTransition(()=>{t(()=>s(v))});ce.finished.finally(()=>{t(()=>{b(void 0),E(void 0),c(void 0),p({isTransitioning:!1})})}),t(()=>E(ce));return}S?(R==null||R.resolve(),S.skipTransition(),O({state:v,currentLocation:te.currentLocation,nextLocation:te.nextLocation})):(c(v),p({isTransitioning:!0,flushSync:!1,currentLocation:te.currentLocation,nextLocation:te.nextLocation}))},[e.window,t,S,R,n,l,r]);g.useLayoutEffect(()=>e.subscribe(A),[e,A]),g.useEffect(()=>{u.isTransitioning&&!u.flushSync&&b(new Su)},[u]),g.useEffect(()=>{if(R&&f&&e.window){let v=f,N=R.promise,k=e.window.document.startViewTransition(async()=>{n===!1?s(v):g.startTransition(()=>{n===!0&&l(ge=>gi(ge,v)),s(v)}),await N});k.finished.finally(()=>{b(void 0),E(void 0),c(void 0),p({isTransitioning:!1})}),E(k)}},[f,R,e.window,n,l]),g.useEffect(()=>{R&&f&&o.location.key===f.location.key&&R.resolve()},[R,S,o.location,f]),g.useEffect(()=>{!u.isTransitioning&&_&&(c(_.state),p({isTransitioning:!0,flushSync:!1,currentLocation:_.currentLocation,nextLocation:_.nextLocation}),O(void 0))},[u.isTransitioning,_]);let T=g.useMemo(()=>({createHref:e.createHref,createURL:e.createURL,encodeLocation:e.encodeLocation,go:v=>e.navigate(v),push:(v,N,k)=>e.navigate(v,{state:N,preventScrollReset:k==null?void 0:k.preventScrollReset}),replace:(v,N,k)=>e.navigate(v,{replace:!0,state:N,preventScrollReset:k==null?void 0:k.preventScrollReset})}),[e]),K=e.basename||"/",q=g.useMemo(()=>({router:e,navigator:T,static:!1,basename:K,onError:r}),[e,T,K,r]);return g.createElement(g.Fragment,null,g.createElement(Yt.Provider,{value:q},g.createElement(zr.Provider,{value:o},g.createElement(ws.Provider,{value:M.current},g.createElement(la.Provider,{value:u},g.createElement(Ou,{basename:K,location:o.location,navigationType:o.historyAction,navigator:T,useTransitions:n},g.createElement(Cu,{routes:e.routes,manifest:e.manifest,future:e.future,state:o,isStatic:!1,onError:r})))))),null)}function gi(e,t){return{...e,navigation:t.navigation.state!=="idle"?t.navigation:e.navigation,revalidation:t.revalidation!=="idle"?t.revalidation:e.revalidation,actionData:t.navigation.state!=="submitting"?t.actionData:e.actionData,fetchers:t.fetchers}}var Cu=g.memo(xu);function xu({routes:e,manifest:t,future:r,state:n,isStatic:a,onError:i}){return ou(e,void 0,{manifest:t,state:n,isStatic:a,onError:i})}function bc({to:e,replace:t,state:r,relative:n}){G(wr(),"<Navigate> may be used only in the context of a <Router> component.");let{static:a,navigator:i}=g.useContext(He);ve(!a,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:s}=g.useContext(Ke),{pathname:o}=Xe(),l=ca(),f=Nr(e,fn(s),o,n==="path");rr(typeof e=="string"?e:Ue(e),i.createHref(f),aa(i),"reject");let c=JSON.stringify(f);return g.useEffect(()=>{l(JSON.parse(c),{replace:t,state:r,relative:n})},[l,c,n,t,r]),null}function Ec(e){return su(e.context)}function Ou({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:a,static:i=!1,useTransitions:s}){G(!wr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let o=e.replace(/^\/*/,"/"),l=g.useMemo(()=>({basename:o,navigator:a,static:i,useTransitions:s,future:{}}),[o,a,i,s]);typeof r=="string"&&(r=ot(r));let{pathname:f="/",search:c="",hash:u="",state:p=null,key:R="default",mask:b}=r,S=g.useMemo(()=>{let E=Ne(f,o);return E==null?null:{location:{pathname:E,search:c,hash:u,state:p,key:R,mask:b},navigationType:n}},[o,f,c,u,p,R,n,b]);
37return ve(S!=null,`<Router basename="${o}"> is not able to match the URL "${f}${c}${u}" because it does not start with the basename, so the <Router> won't render anything.`),S==null?null:g.createElement(He.Provider,{value:l},g.createElement(hn.Provider,{children:t,value:S}))}var an="get",sn="application/x-www-form-urlencoded";function dn(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function Tu(e){return dn(e)&&e.tagName.toLowerCase()==="button"}function Mu(e){return dn(e)&&e.tagName.toLowerCase()==="form"}function Lu(e){return dn(e)&&e.tagName.toLowerCase()==="input"}function _u(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Du(e,t){return e.button===0&&(!t||t==="_self")&&!_u(e)}function Yn(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(a=>[r,a]):[[r,n]])},[]))}function Fu(e,t){let r=Yn(e);return t&&t.forEach((n,a)=>{r.has(a)||t.getAll(a).forEach(i=>{r.append(a,i)})}),r}var en=null;function Au(){if(en===null)try{new FormData(document.createElement("form"),0),en=!1}catch{en=!0}return en}var Uu=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Mn(e){return e!=null&&!Uu.has(e)?(ve(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${sn}"`),null):e}function ku(e,t){let r,n,a,i,s;if(Mu(e)){let o=e.getAttribute("action");n=o?Ne(o,t):null,r=e.getAttribute("method")||an,a=Mn(e.getAttribute("enctype"))||sn,i=new FormData(e)}else if(Tu(e)||Lu(e)&&(e.type==="submit"||e.type==="image")){let o=e.form;if(o==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||o.getAttribute("action");if(n=l?Ne(l,t):null,r=e.getAttribute("formmethod")||o.getAttribute("method")||an,a=Mn(e.getAttribute("formenctype"))||Mn(o.getAttribute("enctype"))||sn,i=new FormData(o,e),!Au()){let{name:f,type:c,value:u}=e;if(c==="image"){let p=f?`${f}.`:"";i.append(`${p}x`,"0"),i.append(`${p}y`,"0")}else f&&i.append(f,u)}}else{if(dn(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=an,n=null,a=sn,s=e}return i&&a==="text/plain"&&(s=i,i=void 0),{action:n,method:r.toLowerCase(),encType:a,formData:i,body:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function da(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ts(e,t,r,n){let a=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${n}`:a.pathname=`${a.pathname}.${n}`:a.pathname==="/"?a.pathname=`_root.${n}`:t&&Ne(a.pathname,t)==="/"?a.pathname=`${gr(t)}/_root.${n}`:a.pathname=`${gr(a.pathname)}.${n}`,a}async function Iu(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function ju(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function Nu(e,t,r){let n=await Promise.all(e.map(async a=>{let i=t.routes[a.route.id];if(i){let s=await Iu(i,r);return s.links?s.links():[]}return[]}));return Bu(n.flat(1).filter(ju).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function Ri(e,t,r,n,a,i){let s=(l,f)=>r[f]?l.route.id!==r[f].route.id:!0,o=(l,f)=>{var c;return r[f].pathname!==l.pathname||((c=r[f].route.path)==null?void 0:c.endsWith("*"))&&r[f].params["*"]!==l.params["*"]};return i==="assets"?t.filter((l,f)=>s(l,f)||o(l,f)):i==="data"?t.filter((l,f)=>{var u;let c=n.routes[l.route.id];if(!c||!c.hasLoader)return!1;if(s(l,f)||o(l,f))return!0;if(l.route.shouldRevalidate){let p=l.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParam
37s:((u=r[0])==null?void 0:u.params)||{},nextUrl:new URL(e,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof p=="boolean")return p}return!0}):[]}function $u(e,t,{includeHydrateFallback:r}={}){return Hu(e.map(n=>{let a=t.routes[n.route.id];if(!a)return[];let i=[a.module];return a.clientActionModule&&(i=i.concat(a.clientActionModule)),a.clientLoaderModule&&(i=i.concat(a.clientLoaderModule)),r&&a.hydrateFallbackModule&&(i=i.concat(a.hydrateFallbackModule)),a.imports&&(i=i.concat(a.imports)),i}).flat(1))}function Hu(e){return[...new Set(e)]}function zu(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}function Bu(e,t){let r=new Set;return new Set(t),e.reduce((n,a)=>{let i=JSON.stringify(zu(a));return r.has(i)||(r.add(i),n.push({key:i,link:a})),n},[])}function ma(){let e=g.useContext(Yt);return da(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Qu(){let e=g.useContext(zr);return da(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var ya=g.createContext(void 0);ya.displayName="FrameworkContext";function mn(){let e=g.useContext(ya);return da(e,"You must render this element inside a <HydratedRouter> element"),e}function Wu(e,t){let r=g.useContext(ya),[n,a]=g.useState(!1),[i,s]=g.useState(!1),{onFocus:o,onBlur:l,onMouseEnter:f,onMouseLeave:c,onTouchStart:u}=t,p=g.useRef(null);g.useEffect(()=>{if(e==="render"&&s(!0),e==="viewport"){let S=_=>{_.forEach(O=>{s(O.isIntersecting)})},E=new IntersectionObserver(S,{threshold:.5});return p.current&&E.observe(p.current),()=>{E.disconnect()}}},[e]),g.useEffect(()=>{if(n){let S=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(S)}}},[n]);let R=()=>{a(!0)},b=()=>{a(!1),s(!1)};return r?e!=="intent"?[i,p,{}]:[i,p,{onFocus:Cr(o,R),onBlur:Cr(l,b),onMouseEnter:Cr(f,R),onMouseLeave:Cr(c,b),onTouchStart:Cr(u,R)}]:[!1,p,{}]}function Cr(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function qu({page:e,...t}){let r=Rs(),{nonce:n}=mn(),{router:a}=ma(),i=g.useMemo(()=>Ji(a.routes,e,a.basename),[a.routes,e,a.basename]);return i?(t.nonce==null&&n&&(t={...t,nonce:n}),r?g.createElement(Yu,{page:e,matches:i,...t}):g.createElement(Vu,{page:e,matches:i,...t})):null}function Ku(e){let{manifest:t,routeModules:r}=mn(),[n,a]=g.useState([]);return g.useEffect(()=>{let i=!1;return Nu(e,t,r).then(s=>{i||a(s)}),()=>{i=!0}},[e,t,r]),n}function Yu({page:e,matches:t,...r}){let n=Xe(),{future:a}=mn(),{basename:i}=ma(),s=g.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let o=Ts(e,i,a.v8_trailingSlashAwareDataRequests,"rsc"),l=!1,f=[];for(let c of t)typeof c.route.shouldRevalidate=="function"?l=!0:f.push(c.route.id);return l&&f.length>0&&o.searchParams.set("_routes",f.join(",")),[o.pathname+o.search]},[i,a.v8_trailingSlashAwareDataRequests,e,n,t]);return g.createElement(g.Fragment,null,s.map(o=>g.createElement("link",{key:o,rel:"prefetch",as:"fetch",href:o,...r})))}function Vu({page:e,matches:t,...r}){let n=Xe(),{future:a,manifest:i,routeModules:s}=mn(),{basename:o}=ma(),{loaderData:l,matches:f}=Qu(),c=g.useMemo(()=>Ri(e,t,f,i,n,"data"),[e,t,f,i,n]),u=g.useMemo(()=>Ri(e,t,f,i,n,"assets"),[e,t,f,i,n]),p=g.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let S=new Set,E=!1;if(t.forEach(O=>{var A;let M=i.routes[O.route.id];!M||!M.hasLoader||(!c.some(T=>T.route.id===O.route.id)&&O.route.id in l&&((A=s[O.route.id])!=null&&A.shouldRevalidate)||M.hasClientLoader?E=!0:S.add(O.route.id))}),S.size===0)return[];let _=Ts(e,o,a.v8_trailingSlashAwareDataRequests,"data");return E&&S.size>0&&_.searchParams.set("_routes",t.filter(O=>S.has(O.route.id)).map(O=>O.route.id).join(",")),[_.pathname+_.search]},[o,a.v8_trailingSlashAwareDataRequests,l,n,i,c,t,e,s]),R=g.useMemo(()=>$u(u,i),[u,i]),b=Ku(u);return g.createElement(g.Fragment,null,p.map(S=>g.createElement("link",{key:S,rel:"prefetch",as:"fetch",href:S,...r})),R.map(S=>g.createElement("link",{key:S,rel:"modulepreload",href:S,...r})),b.map(({key:S,link:E})=>g.createElement("link",{key:S,nonce:r.nonce,...E,crossOrigin:E.crossOrigin??r.crossOrigin})))}function Gu(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var Ju=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Ju&&(window.__reactRouterVersion="7.18.4")}catch{}function Sc(e,t){return xl({basename:t==null?void 0:t.basename,getContext:t==null?void 0:t.getContext,future:t==null?void 0:t.future,history:$o({window:t==null?void 0:t.window}),hydrationData:Xu(),routes:e,mapRouteProperties:bu,hydrationRouteProperties:Eu,dataStrategy:t==null?void 0:t.dataStrategy,patchRoutesOnNavigation:t==null?void 0:t.patchRoutesOnNavigation,window:t==null?void 0:t.window,instrumentations:t==null?void 0:t.instrumentations}).initialize()}function Xu(){let e=window==null?void 0:window.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:Zu(e.errors)}),e}function Zu(e){if(!e)return null;let t=Object.entries(e),r={};for(let[n,a]of t)if(a&&a.__type==="RouteErrorResponse")r[n]=new $r(a.status,a.statusText,a.data,a.internal===!0);else if(a&&a.__type==="Error"){if(typeof a.__subType=="string"&&fl.includes(a.__subType)){let i=window[a.__subType];if(typeof i=="function")try{let s=new i(a.message);s.stack="",r[n]=s}catch{}}if(r[n]==null){let i=new Error(a.message);i.stack="",r[n]=i}}else r[n]=a;return r}var Ms=g.forwardRef(function({onClick:t,discover:r="render",prefetch:n="none",relative:a,reloadDocument:i,replace:s,mask:o,state:l,target:f,to:c,preventScrollReset:u,viewTransition:p,defaultShouldRevalidate:R,...b},S){let{basename:E,navigator:_,useTransitions:O}=g.useContext(He),M=typeof c=="string"&&un.test(c),A=as(c,E);c=A.to;let T=nu(c,{relative:a}),K=Xe(),q=null;if(o){let fe=Nr(o,[],K.mask?K.mask.pathname:"/",!0);E!=="/"&&(fe.pathname=fe.pathname==="/"?E:qe([E,fe.pathname])),q=_.createHref(fe)}let[v,N,k]=Wu(n,b),ge=nc(c,{replace:s,mask:o,state:l,target:f,preventScrollReset:u,relative:a,viewTransition:p,defaultShouldRevalidate:R,useTransitions:O});function te(fe){t&&t(fe),fe.defaultPrevented||ge(fe)}let Ce=!(A.isExternal||i),ce=g.createElement("a",{...b,...k,href:(Ce?q:void 0)||A.absoluteURL||T,onClick:Ce?te:t,ref:Gu(S,N),target:f,"data-discover":!M&&r==="render"?"true":void 0});return v&&!M?g.createElement(g.Fragment,null,ce,g.createElement(qu,{page:T})):ce});Ms.displayName="Link";var ec=g.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,
37className:n="",end:a=!1,style:i,to:s,viewTransition:o,children:l,...f},c){let u=Br(s,{relative:f.relative}),p=Xe(),R=g.useContext(zr),{navigator:b,basename:S}=g.useContext(He),E=R!=null&&lc(u)&&o===!0,_=b.encodeLocation?b.encodeLocation(u).pathname:u.pathname,O=p.pathname,M=R&&R.navigation&&R.navigation.location?R.navigation.location.pathname:null;r||(O=O.toLowerCase(),M=M?M.toLowerCase():null,_=_.toLowerCase()),M&&S&&(M=Ne(M,S)||M);const A=_!=="/"&&_.endsWith("/")?_.length-1:_.length;let T=O===_||!a&&O.startsWith(_)&&O.charAt(A)==="/",K=M!=null&&(M===_||!a&&M.startsWith(_)&&M.charAt(_.length)==="/"),q={isActive:T,isPending:K,isTransitioning:E},v=T?t:void 0,N;typeof n=="function"?N=n(q):N=[n,T?"active":null,K?"pending":null,E?"transitioning":null].filter(Boolean).join(" ");let k=typeof i=="function"?i(q):i;return g.createElement(Ms,{...f,"aria-current":v,className:N,ref:c,style:k,to:s,viewTransition:o},typeof l=="function"?l(q):l)});ec.displayName="NavLink";var tc=g.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:a,state:i,method:s=an,action:o,onSubmit:l,relative:f,preventScrollReset:c,viewTransition:u,defaultShouldRevalidate:p,...R},b)=>{let{useTransitions:S}=g.useContext(He),E=sc(),_=oc(o,{relative:f}),O=s.toLowerCase()==="get"?"get":"post",M=typeof o=="string"&&un.test(o),A=T=>{if(l&&l(T),T.defaultPrevented)return;T.preventDefault();let K=T.nativeEvent.submitter,q=(K==null?void 0:K.getAttribute("formmethod"))||s,v=()=>E(K||T.currentTarget,{fetcherKey:t,method:q,navigate:r,replace:a,state:i,relative:f,preventScrollReset:c,viewTransition:u,defaultShouldRevalidate:p});S&&r!==!1?g.startTransition(()=>v()):v()};return g.createElement("form",{ref:b,method:O,action:_,onSubmit:n?l:A,...R,"data-discover":!M&&e==="render"?"true":void 0})});tc.displayName="Form";function rc(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ls(e){let t=g.useContext(Yt);return G(t,rc(e)),t}function nc(e,{target:t,replace:r,mask:n,state:a,preventScrollReset:i,relative:s,viewTransition:o,defaultShouldRevalidate:l,useTransitions:f}={}){let c=ca(),u=Xe(),p=Br(e,{relative:s});return g.useCallback(R=>{if(Du(R,t)){R.preventDefault();let b=r!==void 0?r:Ue(u)===Ue(p),S=()=>c(e,{replace:b,mask:n,state:a,preventScrollReset:i,relative:s,viewTransition:o,defaultShouldRevalidate:l});f?g.startTransition(()=>S()):S()}},[u,c,p,r,n,a,t,e,i,s,o,l,f])}function Pc(e){ve(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=g.useRef(Yn(e)),r=g.useRef(!1),n=Xe(),a=g.useMemo(()=>Fu(n.search,r.current?null:t.current),[n.search]),i=ca(),s=g.useCallback((o,l)=>{const f=Yn(typeof o=="function"?o(new URLSearchParams(a)):o);r.current=!0,i("?"+f,l)},[i,a]);return[a,s]}var ac=0,ic=()=>`__${String(++ac)}__`;function sc(){let{router:e}=Ls("useSubmit"),{basename:t}=g.useContext(He),r=mu(),n=e.fetch,a=e.navigate;return g.useCallback(async(i,s={})=>{let{action:o,method:l,encType:f,formData:c,body:u}=ku(i,t);if(s.navigate===!1){let p=s.fetcherKey||ic();await n(p,r,s.action||o,{defaultShouldRevalidate:s.defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:c,body:u,formMethod:s.method||l,formEncType:s.encType||f,flushSync:s.flushSync})}else await a(s.action||o,{defaultShouldRevalidate:s.defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:c,body:u,formMethod:s.method||l,formEncType:s.encType||f,replace:s.replace,state:s.state,fromRouteId:r,flushSync:s.flushSync,viewTransition:s.viewTransition})},[n,a,t,r])}function oc(e,{relative:t}={}){let{basename:r}=g.useContext(He),n=g.useContext(Ke);G(n,"useFormAction must be used inside a RouteContext");let[a]=n.matches.slice(-1),i={...Br(e||".",{relative:t})},s=Xe();if(e==null){i.search=s.search;let o=new URLSearchParams(i.search),l=o.getAll("index");if(l.some(c=>c==="")){o.delete("index"),l.filter(u=>u).forEach(u=>o.append("index",u));let c=o.toString();i.search=c?`?${c}`:""}}return(!e||e===".")&&a.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(i.pathname=i.pathname==="/"?r:qe([r,i.pathname])),Ue(i)}function lc(e,{relative:t}={}){let r=g.useContext(la);G(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=Ls("useViewTransitionState"),a=Br(e,{relative:t});if(!r.isTransitioning)return!1;let i=Ne(r.currentLocation.pathname,n)||r.currentLocation.pathname,s=Ne(r.nextLocation.pathname,n)||r.nextLocation.pathname;return ln(a.pathname,s)!=null||ln(a.pathname,i)!=null}var uc=ro();function Cc(e){return g.createElement(Pu,{flushSync:uc.flushSync,...e})}export{Ms as L,ec as N,Ec as O,yc as Q,eo as R,ro as a,g as b,pc as c,vc as d,gc as e,ca as f,Xe as g,yu as h,bc as i,Js as j,dc as k,Sc as l,hc as m,Cc as n,Pc as o,fc as p,Ys as q,_i as r,Zs as s,Rc as t,Fi as u,wc as v};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.