function Ug(l,i){for(var s=0;sc[o]})}}}return Object.freeze(Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}))}(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))c(o);new MutationObserver(o=>{for(const d of o)if(d.type==="childList")for(const h of d.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&c(h)}).observe(document,{childList:!0,subtree:!0});function s(o){const d={};return o.integrity&&(d.integrity=o.integrity),o.referrerPolicy&&(d.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?d.credentials="include":o.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function c(o){if(o.ep)return;o.ep=!0;const d=s(o);fetch(o.href,d)}})();function wg(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var to={exports:{}},Xi={};var Um;function Ng(){if(Um)return Xi;Um=1;var l=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function s(c,o,d){var h=null;if(d!==void 0&&(h=""+d),o.key!==void 0&&(h=""+o.key),"key"in o){d={};for(var y in o)y!=="key"&&(d[y]=o[y])}else d=o;return o=d.ref,{$$typeof:l,type:c,key:h,ref:o!==void 0?o:null,props:d}}return Xi.Fragment=i,Xi.jsx=s,Xi.jsxs=s,Xi}var wm;function Lg(){return wm||(wm=1,to.exports=Ng()),to.exports}var O=Lg(),Fn=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(l){return this.listeners.add(l),this.onSubscribe(),()=>{this.listeners.delete(l),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Hg=class extends Fn{#e;#t;#a;constructor(){super(),this.#a=l=>{if(typeof window<"u"&&window.addEventListener){const i=()=>l();return window.addEventListener("visibilitychange",i,!1),()=>{window.removeEventListener("visibilitychange",i)}}}}onSubscribe(){this.#t||this.setEventListener(this.#a)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(l){this.#a=l,this.#t?.(),this.#t=l(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()})}setFocused(l){this.#e!==l&&(this.#e=l,this.onFocus())}onFocus(){const l=this.isFocused();this.listeners.forEach(i=>{i(l)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},Ao=new Hg,Bg={setTimeout:(l,i)=>setTimeout(l,i),clearTimeout:l=>clearTimeout(l),setInterval:(l,i)=>setInterval(l,i),clearInterval:l=>clearInterval(l)},qg=class{#e=Bg;#t=!1;setTimeoutProvider(l){this.#e=l}setTimeout(l,i){return this.#e.setTimeout(l,i)}clearTimeout(l){this.#e.clearTimeout(l)}setInterval(l,i){return this.#e.setInterval(l,i)}clearInterval(l){this.#e.clearInterval(l)}},Wl=new qg;function Qg(l){setTimeout(l,0)}var Yg=typeof window>"u"||"Deno"in globalThis;function Ut(){}function Gg(l,i){return typeof l=="function"?l(i):l}function mo(l){return typeof l=="number"&&l>=0&&l!==1/0}function Ny(l,i){return Math.max(l+(i||0)-Date.now(),0)}function Cl(l,i){return typeof l=="function"?l(i):l}function sa(l,i){return typeof l=="function"?l(i):l}function Nm(l,i){const{type:s="all",exact:c,fetchStatus:o,predicate:d,queryKey:h,stale:y}=l;if(h){if(c){if(i.queryHash!==Co(h,i.options))return!1}else if(!Pi(i.queryKey,h))return!1}if(s!=="all"){const p=i.isActive();if(s==="active"&&!p||s==="inactive"&&p)return!1}return!(typeof y=="boolean"&&i.isStale()!==y||o&&o!==i.state.fetchStatus||d&&!d(i))}function Lm(l,i){const{exact:s,status:c,predicate:o,mutationKey:d}=l;if(d){if(!i.options.mutationKey)return!1;if(s){if(tn(i.options.mutationKey)!==tn(d))return!1}else if(!Pi(i.options.mutationKey,d))return!1}return!(c&&i.state.status!==c||o&&!o(i))}function Co(l,i){return(i?.queryKeyHashFn||tn)(l)}function tn(l){return JSON.stringify(l,(i,s)=>yo(s)?Object.keys(s).sort().reduce((c,o)=>(c[o]=s[o],c),{}):s)}function Pi(l,i){return l===i?!0:typeof l!=typeof i?!1:l&&i&&typeof l=="object"&&typeof i=="object"?Object.keys(i).every(s=>Pi(l[s],i[s])):!1}var Xg=Object.prototype.hasOwnProperty;function Ly(l,i,s=0){if(l===i)return l;if(s>500)return i;const c=Hm(l)&&Hm(i);if(!c&&!(yo(l)&&yo(i)))return i;const d=(c?l:Object.keys(l)).length,h=c?i:Object.keys(i),y=h.length,p=c?new Array(y):{};let m=0;for(let g=0;g{Wl.setTimeout(i,l)})}function vo(l,i,s){return typeof s.structuralSharing=="function"?s.structuralSharing(l,i):s.structuralSharing!==!1?Ly(l,i):i}function Vg(l,i,s=0){const c=[...l,i];return s&&c.length>s?c.slice(1):c}function Zg(l,i,s=0){const c=[i,...l];return s&&c.length>s?c.slice(0,-1):c}var zo=Symbol();function Hy(l,i){return!l.queryFn&&i?.initialPromise?()=>i.initialPromise:!l.queryFn||l.queryFn===zo?()=>Promise.reject(new Error(`Missing queryFn: '${l.queryHash}'`)):l.queryFn}function _o(l,i){return typeof l=="function"?l(...i):!!l}function Jg(l,i,s){let c=!1,o;return Object.defineProperty(l,"signal",{enumerable:!0,get:()=>(o??=i(),c||(c=!0,o.aborted?s():o.addEventListener("abort",s,{once:!0})),o)}),l}var Ii=(()=>{let l=()=>Yg;return{isServer(){return l()},setIsServer(i){l=i}}})();function po(){let l,i;const s=new Promise((o,d)=>{l=o,i=d});s.status="pending",s.catch(()=>{});function c(o){Object.assign(s,o),delete s.resolve,delete s.reject}return s.resolve=o=>{c({status:"fulfilled",value:o}),l(o)},s.reject=o=>{c({status:"rejected",reason:o}),i(o)},s}var Fg=Qg;function kg(){let l=[],i=0,s=y=>{y()},c=y=>{y()},o=Fg;const d=y=>{i?l.push(y):o(()=>{s(y)})},h=()=>{const y=l;l=[],y.length&&o(()=>{c(()=>{y.forEach(p=>{s(p)})})})};return{batch:y=>{let p;i++;try{p=y()}finally{i--,i||h()}return p},batchCalls:y=>(...p)=>{d(()=>{y(...p)})},schedule:d,setNotifyFunction:y=>{s=y},setBatchNotifyFunction:y=>{c=y},setScheduler:y=>{o=y}}}var gt=kg(),$g=class extends Fn{#e=!0;#t;#a;constructor(){super(),this.#a=l=>{if(typeof window<"u"&&window.addEventListener){const i=()=>l(!0),s=()=>l(!1);return window.addEventListener("online",i,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",i),window.removeEventListener("offline",s)}}}}onSubscribe(){this.#t||this.setEventListener(this.#a)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(l){this.#a=l,this.#t?.(),this.#t=l(this.setOnline.bind(this))}setOnline(l){this.#e!==l&&(this.#e=l,this.listeners.forEach(s=>{s(l)}))}isOnline(){return this.#e}},Hr=new $g;function Wg(l){return Math.min(1e3*2**l,3e4)}function By(l){return(l??"online")==="online"?Hr.isOnline():!0}var go=class extends Error{constructor(l){super("CancelledError"),this.revert=l?.revert,this.silent=l?.silent}};function qy(l){let i=!1,s=0,c;const o=po(),d=()=>o.status!=="pending",h=q=>{if(!d()){const Y=new go(q);z(Y),l.onCancel?.(Y)}},y=()=>{i=!0},p=()=>{i=!1},m=()=>Ao.isFocused()&&(l.networkMode==="always"||Hr.isOnline())&&l.canRun(),g=()=>By(l.networkMode)&&l.canRun(),b=q=>{d()||(c?.(),o.resolve(q))},z=q=>{d()||(c?.(),o.reject(q))},A=()=>new Promise(q=>{c=Y=>{(d()||m())&&q(Y)},l.onPause?.()}).then(()=>{c=void 0,d()||l.onContinue?.()}),H=()=>{if(d())return;let q;const Y=s===0?l.initialPromise:void 0;try{q=Y??l.fn()}catch(W){q=Promise.reject(W)}Promise.resolve(q).then(b).catch(W=>{if(d())return;const k=l.retry??(Ii.isServer()?0:3),F=l.retryDelay??Wg,ye=typeof F=="function"?F(s,W):F,ce=k===!0||typeof k=="number"&&sm()?void 0:A()).then(()=>{i?z(W):H()})})};return{promise:o,status:()=>o.status,cancel:h,continue:()=>(c?.(),o),cancelRetry:y,continueRetry:p,canStart:g,start:()=>(g()?H():A().then(H),o)}}var Qy=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),mo(this.gcTime)&&(this.#e=Wl.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(l){this.gcTime=Math.max(this.gcTime||0,l??(Ii.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(Wl.clearTimeout(this.#e),this.#e=void 0)}},Pg=class extends Qy{#e;#t;#a;#n;#l;#i;#u;constructor(l){super(),this.#u=!1,this.#i=l.defaultOptions,this.setOptions(l.options),this.observers=[],this.#n=l.client,this.#a=this.#n.getQueryCache(),this.queryKey=l.queryKey,this.queryHash=l.queryHash,this.#e=Qm(this.options),this.state=l.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#l?.promise}setOptions(l){if(this.options={...this.#i,...l},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const i=Qm(this.options);i.data!==void 0&&(this.setState(qm(i.data,i.dataUpdatedAt)),this.#e=i)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#a.remove(this)}setData(l,i){const s=vo(this.state.data,l,this.options);return this.#s({data:s,type:"success",dataUpdatedAt:i?.updatedAt,manual:i?.manual}),s}setState(l,i){this.#s({type:"setState",state:l,setStateOptions:i})}cancel(l){const i=this.#l?.promise;return this.#l?.cancel(l),i?i.then(Ut).catch(Ut):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#e}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(l=>sa(l.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===zo||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(l=>Cl(l.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(l=>l.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(l=0){return this.state.data===void 0?!0:l==="static"?!1:this.state.isInvalidated?!0:!Ny(this.state.dataUpdatedAt,l)}onFocus(){this.observers.find(i=>i.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#l?.continue()}onOnline(){this.observers.find(i=>i.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#l?.continue()}addObserver(l){this.observers.includes(l)||(this.observers.push(l),this.clearGcTimeout(),this.#a.notify({type:"observerAdded",query:this,observer:l}))}removeObserver(l){this.observers.includes(l)&&(this.observers=this.observers.filter(i=>i!==l),this.observers.length||(this.#l&&(this.#u||this.#r()?this.#l.cancel({revert:!0}):this.#l.cancelRetry()),this.scheduleGc()),this.#a.notify({type:"observerRemoved",query:this,observer:l}))}getObserversCount(){return this.observers.length}#r(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#s({type:"invalidate"})}async fetch(l,i){if(this.state.fetchStatus!=="idle"&&this.#l?.status()!=="rejected"){if(this.state.data!==void 0&&i?.cancelRefetch)this.cancel({silent:!0});else if(this.#l)return this.#l.continueRetry(),this.#l.promise}if(l&&this.setOptions(l),!this.options.queryFn){const y=this.observers.find(p=>p.options.queryFn);y&&this.setOptions(y.options)}const s=new AbortController,c=y=>{Object.defineProperty(y,"signal",{enumerable:!0,get:()=>(this.#u=!0,s.signal)})},o=()=>{const y=Hy(this.options,i),m=(()=>{const g={client:this.#n,queryKey:this.queryKey,meta:this.meta};return c(g),g})();return this.#u=!1,this.options.persister?this.options.persister(y,m,this):y(m)},h=(()=>{const y={fetchOptions:i,options:this.options,queryKey:this.queryKey,client:this.#n,state:this.state,fetchFn:o};return c(y),y})();this.options.behavior?.onFetch(h,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==h.fetchOptions?.meta)&&this.#s({type:"fetch",meta:h.fetchOptions?.meta}),this.#l=qy({initialPromise:i?.initialPromise,fn:h.fetchFn,onCancel:y=>{y instanceof go&&y.revert&&this.setState({...this.#t,fetchStatus:"idle"}),s.abort()},onFail:(y,p)=>{this.#s({type:"failed",failureCount:y,error:p})},onPause:()=>{this.#s({type:"pause"})},onContinue:()=>{this.#s({type:"continue"})},retry:h.options.retry,retryDelay:h.options.retryDelay,networkMode:h.options.networkMode,canRun:()=>!0});try{const y=await this.#l.start();if(y===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(y),this.#a.config.onSuccess?.(y,this),this.#a.config.onSettled?.(y,this.state.error,this),y}catch(y){if(y instanceof go){if(y.silent)return this.#l.promise;if(y.revert){if(this.state.data===void 0)throw y;return this.state.data}}throw this.#s({type:"error",error:y}),this.#a.config.onError?.(y,this),this.#a.config.onSettled?.(this.state.data,y,this),y}finally{this.scheduleGc()}}#s(l){const i=s=>{switch(l.type){case"failed":return{...s,fetchFailureCount:l.failureCount,fetchFailureReason:l.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...Yy(s.data,this.options),fetchMeta:l.meta??null};case"success":const c={...s,...qm(l.data,l.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!l.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=l.manual?c:void 0,c;case"error":const o=l.error;return{...s,error:o,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...l.state}}};this.state=i(this.state),gt.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),this.#a.notify({query:this,type:"updated",action:l})})}};function Yy(l,i){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:By(i.networkMode)?"fetching":"paused",...l===void 0&&{error:null,status:"pending"}}}function qm(l,i){return{data:l,dataUpdatedAt:i??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Qm(l){const i=typeof l.initialData=="function"?l.initialData():l.initialData,s=i!==void 0,c=s?typeof l.initialDataUpdatedAt=="function"?l.initialDataUpdatedAt():l.initialDataUpdatedAt:0;return{data:i,dataUpdateCount:0,dataUpdatedAt:s?c??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var Ig=class extends Fn{constructor(l,i){super(),this.options=i,this.#e=l,this.#r=null,this.#u=po(),this.bindMethods(),this.setOptions(i)}#e;#t=void 0;#a=void 0;#n=void 0;#l;#i;#u;#r;#s;#h;#m;#o;#f;#c;#y=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Ym(this.#t,this.options)?this.#d():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return bo(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return bo(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#S(),this.#E(),this.#t.removeObserver(this)}setOptions(l){const i=this.options,s=this.#t;if(this.options=this.#e.defaultQueryOptions(l),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof sa(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#R(),this.#t.setOptions(this.options),i._defaulted&&!Lr(this.options,i)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const c=this.hasListeners();c&&Gm(this.#t,s,this.options,i)&&this.#d(),this.updateResult(),c&&(this.#t!==s||sa(this.options.enabled,this.#t)!==sa(i.enabled,this.#t)||Cl(this.options.staleTime,this.#t)!==Cl(i.staleTime,this.#t))&&this.#v();const o=this.#p();c&&(this.#t!==s||sa(this.options.enabled,this.#t)!==sa(i.enabled,this.#t)||o!==this.#c)&&this.#g(o)}getOptimisticResult(l){const i=this.#e.getQueryCache().build(this.#e,l),s=this.createResult(i,l);return t0(this,s)&&(this.#n=s,this.#i=this.options,this.#l=this.#t.state),s}getCurrentResult(){return this.#n}trackResult(l,i){return new Proxy(l,{get:(s,c)=>(this.trackProp(c),i?.(c),c==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#u.status==="pending"&&this.#u.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(s,c))})}trackProp(l){this.#y.add(l)}getCurrentQuery(){return this.#t}refetch({...l}={}){return this.fetch({...l})}fetchOptimistic(l){const i=this.#e.defaultQueryOptions(l),s=this.#e.getQueryCache().build(this.#e,i);return s.fetch().then(()=>this.createResult(s,i))}fetch(l){return this.#d({...l,cancelRefetch:l.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#n))}#d(l){this.#R();let i=this.#t.fetch(this.options,l);return l?.throwOnError||(i=i.catch(Ut)),i}#v(){this.#S();const l=Cl(this.options.staleTime,this.#t);if(Ii.isServer()||this.#n.isStale||!mo(l))return;const s=Ny(this.#n.dataUpdatedAt,l)+1;this.#o=Wl.setTimeout(()=>{this.#n.isStale||this.updateResult()},s)}#p(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#g(l){this.#E(),this.#c=l,!(Ii.isServer()||sa(this.options.enabled,this.#t)===!1||!mo(this.#c)||this.#c===0)&&(this.#f=Wl.setInterval(()=>{(this.options.refetchIntervalInBackground||Ao.isFocused())&&this.#d()},this.#c))}#b(){this.#v(),this.#g(this.#p())}#S(){this.#o!==void 0&&(Wl.clearTimeout(this.#o),this.#o=void 0)}#E(){this.#f!==void 0&&(Wl.clearInterval(this.#f),this.#f=void 0)}createResult(l,i){const s=this.#t,c=this.options,o=this.#n,d=this.#l,h=this.#i,p=l!==s?l.state:this.#a,{state:m}=l;let g={...m},b=!1,z;if(i._optimisticResults){const x=this.hasListeners(),ve=!x&&Ym(l,i),Oe=x&&Gm(l,s,i,c);(ve||Oe)&&(g={...g,...Yy(m.data,l.options)}),i._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:A,errorUpdatedAt:H,status:q}=g;z=g.data;let Y=!1;if(i.placeholderData!==void 0&&z===void 0&&q==="pending"){let x;o?.isPlaceholderData&&i.placeholderData===h?.placeholderData?(x=o.data,Y=!0):x=typeof i.placeholderData=="function"?i.placeholderData(this.#m?.state.data,this.#m):i.placeholderData,x!==void 0&&(q="success",z=vo(o?.data,x,i),b=!0)}if(i.select&&z!==void 0&&!Y)if(o&&z===d?.data&&i.select===this.#s)z=this.#h;else try{this.#s=i.select,z=i.select(z),z=vo(o?.data,z,i),this.#h=z,this.#r=null}catch(x){this.#r=x}this.#r&&(A=this.#r,z=this.#h,H=Date.now(),q="error");const W=g.fetchStatus==="fetching",k=q==="pending",F=q==="error",ye=k&&W,ce=z!==void 0,K={status:q,fetchStatus:g.fetchStatus,isPending:k,isSuccess:q==="success",isError:F,isInitialLoading:ye,isLoading:ye,data:z,dataUpdatedAt:g.dataUpdatedAt,error:A,errorUpdatedAt:H,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:l.isFetched(),isFetchedAfterMount:g.dataUpdateCount>p.dataUpdateCount||g.errorUpdateCount>p.errorUpdateCount,isFetching:W,isRefetching:W&&!k,isLoadingError:F&&!ce,isPaused:g.fetchStatus==="paused",isPlaceholderData:b,isRefetchError:F&&ce,isStale:jo(l,i),refetch:this.refetch,promise:this.#u,isEnabled:sa(i.enabled,l)!==!1};if(this.options.experimental_prefetchInRender){const x=K.data!==void 0,ve=K.status==="error"&&!x,Oe=Ze=>{ve?Ze.reject(K.error):x&&Ze.resolve(K.data)},Qe=()=>{const Ze=this.#u=K.promise=po();Oe(Ze)},me=this.#u;switch(me.status){case"pending":l.queryHash===s.queryHash&&Oe(me);break;case"fulfilled":(ve||K.data!==me.value)&&Qe();break;case"rejected":(!ve||K.error!==me.reason)&&Qe();break}}return K}updateResult(){const l=this.#n,i=this.createResult(this.#t,this.options);if(this.#l=this.#t.state,this.#i=this.options,this.#l.data!==void 0&&(this.#m=this.#t),Lr(i,l))return;this.#n=i;const s=()=>{if(!l)return!0;const{notifyOnChangeProps:c}=this.options,o=typeof c=="function"?c():c;if(o==="all"||!o&&!this.#y.size)return!0;const d=new Set(o??this.#y);return this.options.throwOnError&&d.add("error"),Object.keys(this.#n).some(h=>{const y=h;return this.#n[y]!==l[y]&&d.has(y)})};this.#T({listeners:s()})}#R(){const l=this.#e.getQueryCache().build(this.#e,this.options);if(l===this.#t)return;const i=this.#t;this.#t=l,this.#a=l.state,this.hasListeners()&&(i?.removeObserver(this),l.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#T(l){gt.batch(()=>{l.listeners&&this.listeners.forEach(i=>{i(this.#n)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function e0(l,i){return sa(i.enabled,l)!==!1&&l.state.data===void 0&&!(l.state.status==="error"&&i.retryOnMount===!1)}function Ym(l,i){return e0(l,i)||l.state.data!==void 0&&bo(l,i,i.refetchOnMount)}function bo(l,i,s){if(sa(i.enabled,l)!==!1&&Cl(i.staleTime,l)!=="static"){const c=typeof s=="function"?s(l):s;return c==="always"||c!==!1&&jo(l,i)}return!1}function Gm(l,i,s,c){return(l!==i||sa(c.enabled,l)===!1)&&(!s.suspense||l.state.status!=="error")&&jo(l,s)}function jo(l,i){return sa(i.enabled,l)!==!1&&l.isStaleByTime(Cl(i.staleTime,l))}function t0(l,i){return!Lr(l.getCurrentResult(),i)}function Xm(l){return{onFetch:(i,s)=>{const c=i.options,o=i.fetchOptions?.meta?.fetchMore?.direction,d=i.state.data?.pages||[],h=i.state.data?.pageParams||[];let y={pages:[],pageParams:[]},p=0;const m=async()=>{let g=!1;const b=H=>{Jg(H,()=>i.signal,()=>g=!0)},z=Hy(i.options,i.fetchOptions),A=async(H,q,Y)=>{if(g)return Promise.reject();if(q==null&&H.pages.length)return Promise.resolve(H);const k=(()=>{const be={client:i.client,queryKey:i.queryKey,pageParam:q,direction:Y?"backward":"forward",meta:i.options.meta};return b(be),be})(),F=await z(k),{maxPages:ye}=i.options,ce=Y?Zg:Vg;return{pages:ce(H.pages,F,ye),pageParams:ce(H.pageParams,q,ye)}};if(o&&d.length){const H=o==="backward",q=H?a0:Km,Y={pages:d,pageParams:h},W=q(c,Y);y=await A(Y,W,H)}else{const H=l??d.length;do{const q=p===0?h[0]??c.initialPageParam:Km(c,y);if(p>0&&q==null)break;y=await A(y,q),p++}while(pi.options.persister?.(m,{client:i.client,queryKey:i.queryKey,meta:i.options.meta,signal:i.signal},s):i.fetchFn=m}}}function Km(l,{pages:i,pageParams:s}){const c=i.length-1;return i.length>0?l.getNextPageParam(i[c],i,s[c],s):void 0}function a0(l,{pages:i,pageParams:s}){return i.length>0?l.getPreviousPageParam?.(i[0],i,s[0],s):void 0}var l0=class extends Qy{#e;#t;#a;#n;constructor(l){super(),this.#e=l.client,this.mutationId=l.mutationId,this.#a=l.mutationCache,this.#t=[],this.state=l.state||Gy(),this.setOptions(l.options),this.scheduleGc()}setOptions(l){this.options=l,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(l){this.#t.includes(l)||(this.#t.push(l),this.clearGcTimeout(),this.#a.notify({type:"observerAdded",mutation:this,observer:l}))}removeObserver(l){this.#t=this.#t.filter(i=>i!==l),this.scheduleGc(),this.#a.notify({type:"observerRemoved",mutation:this,observer:l})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#a.remove(this))}continue(){return this.#n?.continue()??this.execute(this.state.variables)}async execute(l){const i=()=>{this.#l({type:"continue"})},s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#n=qy({fn:()=>this.options.mutationFn?this.options.mutationFn(l,s):Promise.reject(new Error("No mutationFn found")),onFail:(d,h)=>{this.#l({type:"failed",failureCount:d,error:h})},onPause:()=>{this.#l({type:"pause"})},onContinue:i,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#a.canRun(this)});const c=this.state.status==="pending",o=!this.#n.canStart();try{if(c)i();else{this.#l({type:"pending",variables:l,isPaused:o}),this.#a.config.onMutate&&await this.#a.config.onMutate(l,this,s);const h=await this.options.onMutate?.(l,s);h!==this.state.context&&this.#l({type:"pending",context:h,variables:l,isPaused:o})}const d=await this.#n.start();return await this.#a.config.onSuccess?.(d,l,this.state.context,this,s),await this.options.onSuccess?.(d,l,this.state.context,s),await this.#a.config.onSettled?.(d,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(d,null,l,this.state.context,s),this.#l({type:"success",data:d}),d}catch(d){try{await this.#a.config.onError?.(d,l,this.state.context,this,s)}catch(h){Promise.reject(h)}try{await this.options.onError?.(d,l,this.state.context,s)}catch(h){Promise.reject(h)}try{await this.#a.config.onSettled?.(void 0,d,this.state.variables,this.state.context,this,s)}catch(h){Promise.reject(h)}try{await this.options.onSettled?.(void 0,d,l,this.state.context,s)}catch(h){Promise.reject(h)}throw this.#l({type:"error",error:d}),d}finally{this.#a.runNext(this)}}#l(l){const i=s=>{switch(l.type){case"failed":return{...s,failureCount:l.failureCount,failureReason:l.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:l.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:l.isPaused,status:"pending",variables:l.variables,submittedAt:Date.now()};case"success":return{...s,data:l.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:l.error,failureCount:s.failureCount+1,failureReason:l.error,isPaused:!1,status:"error"}}};this.state=i(this.state),gt.batch(()=>{this.#t.forEach(s=>{s.onMutationUpdate(l)}),this.#a.notify({mutation:this,type:"updated",action:l})})}};function Gy(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var n0=class extends Fn{constructor(l={}){super(),this.config=l,this.#e=new Set,this.#t=new Map,this.#a=0}#e;#t;#a;build(l,i,s){const c=new l0({client:l,mutationCache:this,mutationId:++this.#a,options:l.defaultMutationOptions(i),state:s});return this.add(c),c}add(l){this.#e.add(l);const i=Ar(l);if(typeof i=="string"){const s=this.#t.get(i);s?s.push(l):this.#t.set(i,[l])}this.notify({type:"added",mutation:l})}remove(l){if(this.#e.delete(l)){const i=Ar(l);if(typeof i=="string"){const s=this.#t.get(i);if(s)if(s.length>1){const c=s.indexOf(l);c!==-1&&s.splice(c,1)}else s[0]===l&&this.#t.delete(i)}}this.notify({type:"removed",mutation:l})}canRun(l){const i=Ar(l);if(typeof i=="string"){const c=this.#t.get(i)?.find(o=>o.state.status==="pending");return!c||c===l}else return!0}runNext(l){const i=Ar(l);return typeof i=="string"?this.#t.get(i)?.find(c=>c!==l&&c.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){gt.batch(()=>{this.#e.forEach(l=>{this.notify({type:"removed",mutation:l})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(l){const i={exact:!0,...l};return this.getAll().find(s=>Lm(i,s))}findAll(l={}){return this.getAll().filter(i=>Lm(l,i))}notify(l){gt.batch(()=>{this.listeners.forEach(i=>{i(l)})})}resumePausedMutations(){const l=this.getAll().filter(i=>i.state.isPaused);return gt.batch(()=>Promise.all(l.map(i=>i.continue().catch(Ut))))}};function Ar(l){return l.options.scope?.id}var i0=class extends Fn{#e;#t=void 0;#a;#n;constructor(i,s){super(),this.#e=i,this.setOptions(s),this.bindMethods(),this.#l()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(i){const s=this.options;this.options=this.#e.defaultMutationOptions(i),Lr(this.options,s)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#a,observer:this}),s?.mutationKey&&this.options.mutationKey&&tn(s.mutationKey)!==tn(this.options.mutationKey)?this.reset():this.#a?.state.status==="pending"&&this.#a.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#a?.removeObserver(this)}onMutationUpdate(i){this.#l(),this.#i(i)}getCurrentResult(){return this.#t}reset(){this.#a?.removeObserver(this),this.#a=void 0,this.#l(),this.#i()}mutate(i,s){return this.#n=s,this.#a?.removeObserver(this),this.#a=this.#e.getMutationCache().build(this.#e,this.options),this.#a.addObserver(this),this.#a.execute(i)}#l(){const i=this.#a?.state??Gy();this.#t={...i,isPending:i.status==="pending",isSuccess:i.status==="success",isError:i.status==="error",isIdle:i.status==="idle",mutate:this.mutate,reset:this.reset}}#i(i){gt.batch(()=>{if(this.#n&&this.hasListeners()){const s=this.#t.variables,c=this.#t.context,o={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(i?.type==="success"){try{this.#n.onSuccess?.(i.data,s,c,o)}catch(d){Promise.reject(d)}try{this.#n.onSettled?.(i.data,null,s,c,o)}catch(d){Promise.reject(d)}}else if(i?.type==="error"){try{this.#n.onError?.(i.error,s,c,o)}catch(d){Promise.reject(d)}try{this.#n.onSettled?.(void 0,i.error,s,c,o)}catch(d){Promise.reject(d)}}}this.listeners.forEach(s=>{s(this.#t)})})}},u0=class extends Fn{constructor(l={}){super(),this.config=l,this.#e=new Map}#e;build(l,i,s){const c=i.queryKey,o=i.queryHash??Co(c,i);let d=this.get(o);return d||(d=new Pg({client:l,queryKey:c,queryHash:o,options:l.defaultQueryOptions(i),state:s,defaultOptions:l.getQueryDefaults(c)}),this.add(d)),d}add(l){this.#e.has(l.queryHash)||(this.#e.set(l.queryHash,l),this.notify({type:"added",query:l}))}remove(l){const i=this.#e.get(l.queryHash);i&&(l.destroy(),i===l&&this.#e.delete(l.queryHash),this.notify({type:"removed",query:l}))}clear(){gt.batch(()=>{this.getAll().forEach(l=>{this.remove(l)})})}get(l){return this.#e.get(l)}getAll(){return[...this.#e.values()]}find(l){const i={exact:!0,...l};return this.getAll().find(s=>Nm(i,s))}findAll(l={}){const i=this.getAll();return Object.keys(l).length>0?i.filter(s=>Nm(l,s)):i}notify(l){gt.batch(()=>{this.listeners.forEach(i=>{i(l)})})}onFocus(){gt.batch(()=>{this.getAll().forEach(l=>{l.onFocus()})})}onOnline(){gt.batch(()=>{this.getAll().forEach(l=>{l.onOnline()})})}},r0=class{#e;#t;#a;#n;#l;#i;#u;#r;constructor(l={}){this.#e=l.queryCache||new u0,this.#t=l.mutationCache||new n0,this.#a=l.defaultOptions||{},this.#n=new Map,this.#l=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#u=Ao.subscribe(async l=>{l&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#r=Hr.subscribe(async l=>{l&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#u?.(),this.#u=void 0,this.#r?.(),this.#r=void 0)}isFetching(l){return this.#e.findAll({...l,fetchStatus:"fetching"}).length}isMutating(l){return this.#t.findAll({...l,status:"pending"}).length}getQueryData(l){const i=this.defaultQueryOptions({queryKey:l});return this.#e.get(i.queryHash)?.state.data}ensureQueryData(l){const i=this.defaultQueryOptions(l),s=this.#e.build(this,i),c=s.state.data;return c===void 0?this.fetchQuery(l):(l.revalidateIfStale&&s.isStaleByTime(Cl(i.staleTime,s))&&this.prefetchQuery(i),Promise.resolve(c))}getQueriesData(l){return this.#e.findAll(l).map(({queryKey:i,state:s})=>{const c=s.data;return[i,c]})}setQueryData(l,i,s){const c=this.defaultQueryOptions({queryKey:l}),d=this.#e.get(c.queryHash)?.state.data,h=Gg(i,d);if(h!==void 0)return this.#e.build(this,c).setData(h,{...s,manual:!0})}setQueriesData(l,i,s){return gt.batch(()=>this.#e.findAll(l).map(({queryKey:c})=>[c,this.setQueryData(c,i,s)]))}getQueryState(l){const i=this.defaultQueryOptions({queryKey:l});return this.#e.get(i.queryHash)?.state}removeQueries(l){const i=this.#e;gt.batch(()=>{i.findAll(l).forEach(s=>{i.remove(s)})})}resetQueries(l,i){const s=this.#e;return gt.batch(()=>(s.findAll(l).forEach(c=>{c.reset()}),this.refetchQueries({type:"active",...l},i)))}cancelQueries(l,i={}){const s={revert:!0,...i},c=gt.batch(()=>this.#e.findAll(l).map(o=>o.cancel(s)));return Promise.all(c).then(Ut).catch(Ut)}invalidateQueries(l,i={}){return gt.batch(()=>(this.#e.findAll(l).forEach(s=>{s.invalidate()}),l?.refetchType==="none"?Promise.resolve():this.refetchQueries({...l,type:l?.refetchType??l?.type??"active"},i)))}refetchQueries(l,i={}){const s={...i,cancelRefetch:i.cancelRefetch??!0},c=gt.batch(()=>this.#e.findAll(l).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let d=o.fetch(void 0,s);return s.throwOnError||(d=d.catch(Ut)),o.state.fetchStatus==="paused"?Promise.resolve():d}));return Promise.all(c).then(Ut)}fetchQuery(l){const i=this.defaultQueryOptions(l);i.retry===void 0&&(i.retry=!1);const s=this.#e.build(this,i);return s.isStaleByTime(Cl(i.staleTime,s))?s.fetch(i):Promise.resolve(s.state.data)}prefetchQuery(l){return this.fetchQuery(l).then(Ut).catch(Ut)}fetchInfiniteQuery(l){return l.behavior=Xm(l.pages),this.fetchQuery(l)}prefetchInfiniteQuery(l){return this.fetchInfiniteQuery(l).then(Ut).catch(Ut)}ensureInfiniteQueryData(l){return l.behavior=Xm(l.pages),this.ensureQueryData(l)}resumePausedMutations(){return Hr.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#a}setDefaultOptions(l){this.#a=l}setQueryDefaults(l,i){this.#n.set(tn(l),{queryKey:l,defaultOptions:i})}getQueryDefaults(l){const i=[...this.#n.values()],s={};return i.forEach(c=>{Pi(l,c.queryKey)&&Object.assign(s,c.defaultOptions)}),s}setMutationDefaults(l,i){this.#l.set(tn(l),{mutationKey:l,defaultOptions:i})}getMutationDefaults(l){const i=[...this.#l.values()],s={};return i.forEach(c=>{Pi(l,c.mutationKey)&&Object.assign(s,c.defaultOptions)}),s}defaultQueryOptions(l){if(l._defaulted)return l;const i={...this.#a.queries,...this.getQueryDefaults(l.queryKey),...l,_defaulted:!0};return i.queryHash||(i.queryHash=Co(i.queryKey,i)),i.refetchOnReconnect===void 0&&(i.refetchOnReconnect=i.networkMode!=="always"),i.throwOnError===void 0&&(i.throwOnError=!!i.suspense),!i.networkMode&&i.persister&&(i.networkMode="offlineFirst"),i.queryFn===zo&&(i.enabled=!1),i}defaultMutationOptions(l){return l?._defaulted?l:{...this.#a.mutations,...l?.mutationKey&&this.getMutationDefaults(l.mutationKey),...l,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},ao={exports:{}},Se={};var Vm;function s0(){if(Vm)return Se;Vm=1;var l=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),h=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),z=Symbol.iterator;function A(R){return R===null||typeof R!="object"?null:(R=z&&R[z]||R["@@iterator"],typeof R=="function"?R:null)}var H={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},q=Object.assign,Y={};function W(R,Q,J){this.props=R,this.context=Q,this.refs=Y,this.updater=J||H}W.prototype.isReactComponent={},W.prototype.setState=function(R,Q){if(typeof R!="object"&&typeof R!="function"&&R!=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,R,Q,"setState")},W.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function k(){}k.prototype=W.prototype;function F(R,Q,J){this.props=R,this.context=Q,this.refs=Y,this.updater=J||H}var ye=F.prototype=new k;ye.constructor=F,q(ye,W.prototype),ye.isPureReactComponent=!0;var ce=Array.isArray;function be(){}var K={H:null,A:null,T:null,S:null},x=Object.prototype.hasOwnProperty;function ve(R,Q,J){var P=J.ref;return{$$typeof:l,type:R,key:Q,ref:P!==void 0?P:null,props:J}}function Oe(R,Q){return ve(R.type,Q,R.props)}function Qe(R){return typeof R=="object"&&R!==null&&R.$$typeof===l}function me(R){var Q={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(J){return Q[J]})}var Ze=/\/+/g;function Ue(R,Q){return typeof R=="object"&&R!==null&&R.key!=null?me(""+R.key):Q.toString(36)}function pe(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then(be,be):(R.status="pending",R.then(function(Q){R.status==="pending"&&(R.status="fulfilled",R.value=Q)},function(Q){R.status==="pending"&&(R.status="rejected",R.reason=Q)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function N(R,Q,J,P,de){var ge=typeof R;(ge==="undefined"||ge==="boolean")&&(R=null);var xe=!1;if(R===null)xe=!0;else switch(ge){case"bigint":case"string":case"number":xe=!0;break;case"object":switch(R.$$typeof){case l:case i:xe=!0;break;case g:return xe=R._init,N(xe(R._payload),Q,J,P,de)}}if(xe)return de=de(R),xe=P===""?"."+Ue(R,0):P,ce(de)?(J="",xe!=null&&(J=xe.replace(Ze,"$&/")+"/"),N(de,Q,J,"",function(zl){return zl})):de!=null&&(Qe(de)&&(de=Oe(de,J+(de.key==null||R&&R.key===de.key?"":(""+de.key).replace(Ze,"$&/")+"/")+xe)),Q.push(de)),1;xe=0;var ct=P===""?".":P+":";if(ce(R))for(var Je=0;Je{const i=M.useContext(Xy);if(!i)throw new Error("No QueryClient set, use QueryClientProvider to set one");return i},o0=({client:l,children:i})=>(M.useEffect(()=>(l.mount(),()=>{l.unmount()}),[l]),O.jsx(Xy.Provider,{value:l,children:i})),Ky=M.createContext(!1),f0=()=>M.useContext(Ky);Ky.Provider;function d0(){let l=!1;return{clearReset:()=>{l=!1},reset:()=>{l=!0},isReset:()=>l}}var h0=M.createContext(d0()),m0=()=>M.useContext(h0),y0=(l,i,s)=>{const c=s?.state.error&&typeof l.throwOnError=="function"?_o(l.throwOnError,[s.state.error,s]):l.throwOnError;(l.suspense||l.experimental_prefetchInRender||c)&&(i.isReset()||(l.retryOnMount=!1))},v0=l=>{M.useEffect(()=>{l.clearReset()},[l])},p0=({result:l,errorResetBoundary:i,throwOnError:s,query:c,suspense:o})=>l.isError&&!i.isReset()&&!l.isFetching&&c&&(o&&l.data===void 0||_o(s,[l.error,c])),g0=l=>{if(l.suspense){const s=o=>o==="static"?o:Math.max(o??1e3,1e3),c=l.staleTime;l.staleTime=typeof c=="function"?(...o)=>s(c(...o)):s(c),typeof l.gcTime=="number"&&(l.gcTime=Math.max(l.gcTime,1e3))}},b0=(l,i)=>l.isLoading&&l.isFetching&&!i,S0=(l,i)=>l?.suspense&&i.isPending,Jm=(l,i,s)=>i.fetchOptimistic(l).catch(()=>{s.clearReset()});function E0(l,i,s){const c=f0(),o=m0(),d=lu(),h=d.defaultQueryOptions(l);d.getDefaultOptions().queries?._experimental_beforeQuery?.(h);const y=d.getQueryCache().get(h.queryHash);h._optimisticResults=c?"isRestoring":"optimistic",g0(h),y0(h,o,y),v0(o);const p=!d.getQueryCache().get(h.queryHash),[m]=M.useState(()=>new i(d,h)),g=m.getOptimisticResult(h),b=!c&&l.subscribed!==!1;if(M.useSyncExternalStore(M.useCallback(z=>{const A=b?m.subscribe(gt.batchCalls(z)):Ut;return m.updateResult(),A},[m,b]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),M.useEffect(()=>{m.setOptions(h)},[h,m]),S0(h,g))throw Jm(h,m,o);if(p0({result:g,errorResetBoundary:o,throwOnError:h.throwOnError,query:y,suspense:h.suspense}))throw g.error;return d.getDefaultOptions().queries?._experimental_afterQuery?.(h,g),h.experimental_prefetchInRender&&!Ii.isServer()&&b0(g,c)&&(p?Jm(h,m,o):y?.promise)?.catch(Ut).finally(()=>{m.updateResult()}),h.notifyOnChangeProps?g:m.trackResult(g)}function an(l,i){return E0(l,Ig)}function Il(l,i){const s=lu(),[c]=M.useState(()=>new i0(s,l));M.useEffect(()=>{c.setOptions(l)},[c,l]);const o=M.useSyncExternalStore(M.useCallback(h=>c.subscribe(gt.batchCalls(h)),[c]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),d=M.useCallback((h,y)=>{c.mutate(h,y).catch(Ut)},[c]);if(o.error&&_o(c.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:d,mutateAsync:o.mutate}}var lo={exports:{}},Ki={},no={exports:{}},io={};var Fm;function R0(){return Fm||(Fm=1,(function(l){function i(N,Z){var le=N.length;N.push(Z);e:for(;0>>1,Re=N[ue];if(0>>1;ueo(J,le))Po(de,J)?(N[ue]=de,N[P]=le,ue=P):(N[ue]=J,N[Q]=le,ue=Q);else if(Po(de,le))N[ue]=de,N[P]=le,ue=P;else break e}}return Z}function o(N,Z){var le=N.sortIndex-Z.sortIndex;return le!==0?le:N.id-Z.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;l.unstable_now=function(){return d.now()}}else{var h=Date,y=h.now();l.unstable_now=function(){return h.now()-y}}var p=[],m=[],g=1,b=null,z=3,A=!1,H=!1,q=!1,Y=!1,W=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,F=typeof setImmediate<"u"?setImmediate:null;function ye(N){for(var Z=s(m);Z!==null;){if(Z.callback===null)c(m);else if(Z.startTime<=N)c(m),Z.sortIndex=Z.expirationTime,i(p,Z);else break;Z=s(m)}}function ce(N){if(q=!1,ye(N),!H)if(s(p)!==null)H=!0,be||(be=!0,me());else{var Z=s(m);Z!==null&&pe(ce,Z.startTime-N)}}var be=!1,K=-1,x=5,ve=-1;function Oe(){return Y?!0:!(l.unstable_now()-veN&&Oe());){var ue=b.callback;if(typeof ue=="function"){b.callback=null,z=b.priorityLevel;var Re=ue(b.expirationTime<=N);if(N=l.unstable_now(),typeof Re=="function"){b.callback=Re,ye(N),Z=!0;break t}b===s(p)&&c(p),ye(N)}else c(p);b=s(p)}if(b!==null)Z=!0;else{var R=s(m);R!==null&&pe(ce,R.startTime-N),Z=!1}}break e}finally{b=null,z=le,A=!1}Z=void 0}}finally{Z?me():be=!1}}}var me;if(typeof F=="function")me=function(){F(Qe)};else if(typeof MessageChannel<"u"){var Ze=new MessageChannel,Ue=Ze.port2;Ze.port1.onmessage=Qe,me=function(){Ue.postMessage(null)}}else me=function(){W(Qe,0)};function pe(N,Z){K=W(function(){N(l.unstable_now())},Z)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function(N){N.callback=null},l.unstable_forceFrameRate=function(N){0>N||125ue?(N.sortIndex=le,i(m,N),s(p)===null&&N===s(m)&&(q?(k(K),K=-1):q=!0,pe(ce,le-ue))):(N.sortIndex=Re,i(p,N),H||A||(H=!0,be||(be=!0,me()))),N},l.unstable_shouldYield=Oe,l.unstable_wrapCallback=function(N){var Z=z;return function(){var le=z;z=Z;try{return N.apply(this,arguments)}finally{z=le}}}})(io)),io}var km;function T0(){return km||(km=1,no.exports=R0()),no.exports}var uo={exports:{}},At={};var $m;function O0(){if($m)return At;$m=1;var l=Uo();function i(p){var m="https://react.dev/errors/"+p;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(i){console.error(i)}}return l(),uo.exports=O0(),uo.exports}var Pm;function M0(){if(Pm)return Ki;Pm=1;var l=T0(),i=Uo(),s=Vy();function c(e){var t="https://react.dev/errors/"+e;if(1Re||(e.current=ue[Re],ue[Re]=null,Re--)}function J(e,t){Re++,ue[Re]=e.current,e.current=t}var P=R(null),de=R(null),ge=R(null),xe=R(null);function ct(e,t){switch(J(ge,t),J(de,e),J(P,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?am(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=am(t),e=lm(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Q(P),J(P,e)}function Je(){Q(P),Q(de),Q(ge)}function zl(e){e.memoizedState!==null&&J(xe,e);var t=P.current,a=lm(t,e.type);t!==a&&(J(de,e),J(P,a))}function nn(e){de.current===e&&(Q(P),Q(de)),xe.current===e&&(Q(xe),qi._currentValue=le)}var $n,vt;function Nt(e){if($n===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);$n=t&&t[1]||"",vt=-1)":-1u||S[n]!==j[u]){var B=` `+S[n].replace(" at new "," at ");return e.displayName&&B.includes("")&&(B=B.replace("",e.displayName)),B}while(1<=n&&0<=u);break}}}finally{un=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Nt(a):""}function Ca(e,t){switch(e.tag){case 26:case 27:case 5:return Nt(e.type);case 16:return Nt("Lazy");case 13:return e.child!==t&&t!==null?Nt("Suspense Fallback"):Nt("Suspense");case 19:return Nt("SuspenseList");case 0:case 15:return Wn(e.type,!1);case 11:return Wn(e.type.render,!1);case 1:return Wn(e.type,!0);case 31:return Nt("Activity");default:return""}}function ou(e){try{var t="",a=null;do t+=Ca(e,a),a=e,e=e.return;while(e);return t}catch(n){return` Error generating stack: `+n.message+` `+n.stack}}var Pn=Object.prototype.hasOwnProperty,rn=l.unstable_scheduleCallback,In=l.unstable_cancelCallback,Kr=l.unstable_shouldYield,Vr=l.unstable_requestPaint,zt=l.unstable_now,za=l.unstable_getCurrentPriorityLevel,Pa=l.unstable_ImmediatePriority,ei=l.unstable_UserBlockingPriority,Ia=l.unstable_NormalPriority,da=l.unstable_LowPriority,Wt=l.unstable_IdlePriority,fu=l.log,Zr=l.unstable_setDisableYieldValue,_a=null,_t=null;function bt(e){if(typeof fu=="function"&&Zr(e),_t&&typeof _t.setStrictMode=="function")try{_t.setStrictMode(_a,e)}catch{}}var xt=Math.clz32?Math.clz32:Jr,du=Math.log,hu=Math.LN2;function Jr(e){return e>>>=0,e===0?32:31-(du(e)/hu|0)|0}var _l=256,ja=262144,jl=4194304;function ha(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function sn(e,t,a){var n=e.pendingLanes;if(n===0)return 0;var u=0,r=e.suspendedLanes,f=e.pingedLanes;e=e.warmLanes;var v=n&134217727;return v!==0?(n=v&~r,n!==0?u=ha(n):(f&=v,f!==0?u=ha(f):a||(a=v&~e,a!==0&&(u=ha(a))))):(v=n&~r,v!==0?u=ha(v):f!==0?u=ha(f):a||(a=n&~e,a!==0&&(u=ha(a)))),u===0?0:t!==0&&t!==u&&(t&r)===0&&(r=u&-u,a=t&-t,r>=a||r===32&&(a&4194048)!==0)?t:u}function el(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Fr(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ti(){var e=jl;return jl<<=1,(jl&62914560)===0&&(jl=4194304),e}function tl(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function ba(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function mu(e,t,a,n,u,r){var f=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var v=e.entanglements,S=e.expirationTimes,j=e.hiddenUpdates;for(a=f&~a;0"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Dv=/[\n"\\]/g;function Pt(e){return e.replace(Dv,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function kr(e,t,a,n,u,r,f,v){e.name="",f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"?e.type=f:e.removeAttribute("type"),t!=null?f==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+ft(t)):e.value!==""+ft(t)&&(e.value=""+ft(t)):f!=="submit"&&f!=="reset"||e.removeAttribute("value"),t!=null?$r(e,f,ft(t)):a!=null?$r(e,f,ft(a)):n!=null&&e.removeAttribute("value"),u==null&&r!=null&&(e.defaultChecked=!!r),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.name=""+ft(v):e.removeAttribute("name")}function ko(e,t,a,n,u,r,f,v){if(r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(e.type=r),t!=null||a!=null){if(!(r!=="submit"&&r!=="reset"||t!=null)){fn(e);return}a=a!=null?""+ft(a):"",t=t!=null?""+ft(t):a,v||t===e.value||(e.value=t),e.defaultValue=t}n=n??u,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=v?e.checked:!!n,e.defaultChecked=!!n,f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.name=f),fn(e)}function $r(e,t,a){t==="number"&&gu(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function dn(e,t,a,n){if(e=e.options,t){t={};for(var u=0;u"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ts=!1;if(wa)try{var li={};Object.defineProperty(li,"passive",{get:function(){ts=!0}}),window.addEventListener("test",li,li),window.removeEventListener("test",li,li)}catch{ts=!1}var ll=null,as=null,Su=null;function af(){if(Su)return Su;var e,t=as,a=t.length,n,u="value"in ll?ll.value:ll.textContent,r=u.length;for(e=0;e=ui),cf=" ",of=!1;function ff(e,t){switch(e){case"keyup":return tp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function df(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var vn=!1;function lp(e,t){switch(e){case"compositionend":return df(t);case"keypress":return t.which!==32?null:(of=!0,cf);case"textInput":return e=t.data,e===cf&&of?null:e;default:return null}}function np(e,t){if(vn)return e==="compositionend"||!rs&&ff(e,t)?(e=af(),Su=as=ll=null,vn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:a,offset:t-e};e=n}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Sf(a)}}function Rf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Rf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Tf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=gu(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=gu(e.document)}return t}function os(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var dp=wa&&"documentMode"in document&&11>=document.documentMode,pn=null,fs=null,oi=null,ds=!1;function Of(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;ds||pn==null||pn!==gu(n)||(n=pn,"selectionStart"in n&&os(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),oi&&ci(oi,n)||(oi=n,n=hr(fs,"onSelect"),0>=f,u-=f,Ra=1<<32-xt(t)+u|a<Te?(je=re,re=null):je=re.sibling;var Be=w(C,re,_[Te],G);if(Be===null){re===null&&(re=je);break}e&&re&&Be.alternate===null&&t(C,re),T=r(Be,T,Te),He===null?oe=Be:He.sibling=Be,He=Be,re=je}if(Te===_.length)return a(C,re),we&&La(C,Te),oe;if(re===null){for(;Te<_.length;Te++)re=X(C,_[Te],G),re!==null&&(T=r(re,T,Te),He===null?oe=re:He.sibling=re,He=re);return we&&La(C,Te),oe}for(re=n(re);Te<_.length;Te++)je=L(re,C,Te,_[Te],G),je!==null&&(e&&je.alternate!==null&&re.delete(je.key===null?Te:je.key),T=r(je,T,Te),He===null?oe=je:He.sibling=je,He=je);return e&&re.forEach(function(Ml){return t(C,Ml)}),we&&La(C,Te),oe}function he(C,T,_,G){if(_==null)throw Error(c(151));for(var oe=null,He=null,re=T,Te=T=0,je=null,Be=_.next();re!==null&&!Be.done;Te++,Be=_.next()){re.index>Te?(je=re,re=null):je=re.sibling;var Ml=w(C,re,Be.value,G);if(Ml===null){re===null&&(re=je);break}e&&re&&Ml.alternate===null&&t(C,re),T=r(Ml,T,Te),He===null?oe=Ml:He.sibling=Ml,He=Ml,re=je}if(Be.done)return a(C,re),we&&La(C,Te),oe;if(re===null){for(;!Be.done;Te++,Be=_.next())Be=X(C,Be.value,G),Be!==null&&(T=r(Be,T,Te),He===null?oe=Be:He.sibling=Be,He=Be);return we&&La(C,Te),oe}for(re=n(re);!Be.done;Te++,Be=_.next())Be=L(re,C,Te,Be.value,G),Be!==null&&(e&&Be.alternate!==null&&re.delete(Be.key===null?Te:Be.key),T=r(Be,T,Te),He===null?oe=Be:He.sibling=Be,He=Be);return e&&re.forEach(function(jg){return t(C,jg)}),we&&La(C,Te),oe}function Ve(C,T,_,G){if(typeof _=="object"&&_!==null&&_.type===q&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case A:e:{for(var oe=_.key;T!==null;){if(T.key===oe){if(oe=_.type,oe===q){if(T.tag===7){a(C,T.sibling),G=u(T,_.props.children),G.return=C,C=G;break e}}else if(T.elementType===oe||typeof oe=="object"&&oe!==null&&oe.$$typeof===x&&Kl(oe)===T.type){a(C,T.sibling),G=u(T,_.props),vi(G,_),G.return=C,C=G;break e}a(C,T);break}else t(C,T);T=T.sibling}_.type===q?(G=ql(_.props.children,C.mode,G,_.key),G.return=C,C=G):(G=zu(_.type,_.key,_.props,null,C.mode,G),vi(G,_),G.return=C,C=G)}return f(C);case H:e:{for(oe=_.key;T!==null;){if(T.key===oe)if(T.tag===4&&T.stateNode.containerInfo===_.containerInfo&&T.stateNode.implementation===_.implementation){a(C,T.sibling),G=u(T,_.children||[]),G.return=C,C=G;break e}else{a(C,T);break}else t(C,T);T=T.sibling}G=bs(_,C.mode,G),G.return=C,C=G}return f(C);case x:return _=Kl(_),Ve(C,T,_,G)}if(pe(_))return ae(C,T,_,G);if(me(_)){if(oe=me(_),typeof oe!="function")throw Error(c(150));return _=oe.call(_),he(C,T,_,G)}if(typeof _.then=="function")return Ve(C,T,Hu(_),G);if(_.$$typeof===F)return Ve(C,T,Uu(C,_),G);Bu(C,_)}return typeof _=="string"&&_!==""||typeof _=="number"||typeof _=="bigint"?(_=""+_,T!==null&&T.tag===6?(a(C,T.sibling),G=u(T,_),G.return=C,C=G):(a(C,T),G=gs(_,C.mode,G),G.return=C,C=G),f(C)):a(C,T)}return function(C,T,_,G){try{yi=0;var oe=Ve(C,T,_,G);return An=null,oe}catch(re){if(re===Dn||re===Nu)throw re;var He=Xt(29,re,null,C.mode);return He.lanes=G,He.return=C,He}}}var Zl=Jf(!0),Ff=Jf(!1),sl=!1;function _s(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function js(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function cl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ol(e,t,a){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(qe&2)!==0){var u=n.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),n.pending=t,t=Cu(e),_f(e,null,a),t}return Au(e,n,t,a),Cu(e)}function pi(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,vu(e,a)}}function Us(e,t){var a=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,a===n)){var u=null,r=null;if(a=a.firstBaseUpdate,a!==null){do{var f={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};r===null?u=r=f:r=r.next=f,a=a.next}while(a!==null);r===null?u=r=t:r=r.next=t}else u=r=t;a={baseState:n.baseState,firstBaseUpdate:u,lastBaseUpdate:r,shared:n.shared,callbacks:n.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var ws=!1;function gi(){if(ws){var e=xn;if(e!==null)throw e}}function bi(e,t,a,n){ws=!1;var u=e.updateQueue;sl=!1;var r=u.firstBaseUpdate,f=u.lastBaseUpdate,v=u.shared.pending;if(v!==null){u.shared.pending=null;var S=v,j=S.next;S.next=null,f===null?r=j:f.next=j,f=S;var B=e.alternate;B!==null&&(B=B.updateQueue,v=B.lastBaseUpdate,v!==f&&(v===null?B.firstBaseUpdate=j:v.next=j,B.lastBaseUpdate=S))}if(r!==null){var X=u.baseState;f=0,B=j=S=null,v=r;do{var w=v.lane&-536870913,L=w!==v.lane;if(L?(_e&w)===w:(n&w)===w){w!==0&&w===Mn&&(ws=!0),B!==null&&(B=B.next={lane:0,tag:v.tag,payload:v.payload,callback:null,next:null});e:{var ae=e,he=v;w=t;var Ve=a;switch(he.tag){case 1:if(ae=he.payload,typeof ae=="function"){X=ae.call(Ve,X,w);break e}X=ae;break e;case 3:ae.flags=ae.flags&-65537|128;case 0:if(ae=he.payload,w=typeof ae=="function"?ae.call(Ve,X,w):ae,w==null)break e;X=b({},X,w);break e;case 2:sl=!0}}w=v.callback,w!==null&&(e.flags|=64,L&&(e.flags|=8192),L=u.callbacks,L===null?u.callbacks=[w]:L.push(w))}else L={lane:w,tag:v.tag,payload:v.payload,callback:v.callback,next:null},B===null?(j=B=L,S=X):B=B.next=L,f|=w;if(v=v.next,v===null){if(v=u.shared.pending,v===null)break;L=v,v=L.next,L.next=null,u.lastBaseUpdate=L,u.shared.pending=null}}while(!0);B===null&&(S=X),u.baseState=S,u.firstBaseUpdate=j,u.lastBaseUpdate=B,r===null&&(u.shared.lanes=0),yl|=f,e.lanes=f,e.memoizedState=X}}function kf(e,t){if(typeof e!="function")throw Error(c(191,e));e.call(t)}function $f(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;er?r:8;var f=N.T,v={};N.T=v,Is(e,!1,t,a);try{var S=u(),j=N.S;if(j!==null&&j(v,S),S!==null&&typeof S=="object"&&typeof S.then=="function"){var B=Ep(S,n);Ri(e,t,B,Ft(e))}else Ri(e,t,n,Ft(e))}catch(X){Ri(e,t,{then:function(){},status:"rejected",reason:X},Ft())}finally{Z.p=r,f!==null&&v.types!==null&&(f.types=v.types),N.T=f}}function Dp(){}function Ws(e,t,a,n){if(e.tag!==5)throw Error(c(476));var u=Ad(e).queue;Dd(e,u,t,le,a===null?Dp:function(){return Cd(e),a(n)})}function Ad(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:le,baseState:le,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qa,lastRenderedState:le},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qa,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Cd(e){var t=Ad(e);t.next===null&&(t=e.alternate.memoizedState),Ri(e,t.next.queue,{},Ft())}function Ps(){return Tt(qi)}function zd(){return rt().memoizedState}function _d(){return rt().memoizedState}function Ap(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Ft();e=cl(a);var n=ol(t,e,a);n!==null&&(Yt(n,t,a),pi(n,t,a)),t={cache:Ds()},e.payload=t;return}t=t.return}}function Cp(e,t,a){var n=Ft();a={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Fu(e)?Ud(t,a):(a=vs(e,t,a,n),a!==null&&(Yt(a,e,n),wd(a,t,n)))}function jd(e,t,a){var n=Ft();Ri(e,t,a,n)}function Ri(e,t,a,n){var u={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Fu(e))Ud(t,u);else{var r=e.alternate;if(e.lanes===0&&(r===null||r.lanes===0)&&(r=t.lastRenderedReducer,r!==null))try{var f=t.lastRenderedState,v=r(f,a);if(u.hasEagerState=!0,u.eagerState=v,Gt(v,f))return Au(e,t,u,0),ke===null&&Du(),!1}catch{}if(a=vs(e,t,u,n),a!==null)return Yt(a,e,n),wd(a,t,n),!0}return!1}function Is(e,t,a,n){if(n={lane:2,revertLane:_c(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Fu(e)){if(t)throw Error(c(479))}else t=vs(e,a,n,2),t!==null&&Yt(t,e,2)}function Fu(e){var t=e.alternate;return e===Ee||t!==null&&t===Ee}function Ud(e,t){zn=Yu=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function wd(e,t,a){if((a&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,vu(e,a)}}var Ti={readContext:Tt,use:Ku,useCallback:lt,useContext:lt,useEffect:lt,useImperativeHandle:lt,useLayoutEffect:lt,useInsertionEffect:lt,useMemo:lt,useReducer:lt,useRef:lt,useState:lt,useDebugValue:lt,useDeferredValue:lt,useTransition:lt,useSyncExternalStore:lt,useId:lt,useHostTransitionStatus:lt,useFormState:lt,useActionState:lt,useOptimistic:lt,useMemoCache:lt,useCacheRefresh:lt};Ti.useEffectEvent=lt;var Nd={readContext:Tt,use:Ku,useCallback:function(e,t){return jt().memoizedState=[e,t===void 0?null:t],e},useContext:Tt,useEffect:gd,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Zu(4194308,4,Rd.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Zu(4194308,4,e,t)},useInsertionEffect:function(e,t){Zu(4,2,e,t)},useMemo:function(e,t){var a=jt();t=t===void 0?null:t;var n=e();if(Jl){bt(!0);try{e()}finally{bt(!1)}}return a.memoizedState=[n,t],n},useReducer:function(e,t,a){var n=jt();if(a!==void 0){var u=a(t);if(Jl){bt(!0);try{a(t)}finally{bt(!1)}}}else u=t;return n.memoizedState=n.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},n.queue=e,e=e.dispatch=Cp.bind(null,Ee,e),[n.memoizedState,e]},useRef:function(e){var t=jt();return e={current:e},t.memoizedState=e},useState:function(e){e=Zs(e);var t=e.queue,a=jd.bind(null,Ee,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:ks,useDeferredValue:function(e,t){var a=jt();return $s(a,e,t)},useTransition:function(){var e=Zs(!1);return e=Dd.bind(null,Ee,e.queue,!0,!1),jt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=Ee,u=jt();if(we){if(a===void 0)throw Error(c(407));a=a()}else{if(a=t(),ke===null)throw Error(c(349));(_e&127)!==0||ad(n,t,a)}u.memoizedState=a;var r={value:a,getSnapshot:t};return u.queue=r,gd(nd.bind(null,n,r,e),[e]),n.flags|=2048,jn(9,{destroy:void 0},ld.bind(null,n,r,a,t),null),a},useId:function(){var e=jt(),t=ke.identifierPrefix;if(we){var a=Ta,n=Ra;a=(n&~(1<<32-xt(n)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Gu++,0<\/script>",r=r.removeChild(r.firstChild);break;case"select":r=typeof n.is=="string"?f.createElement("select",{is:n.is}):f.createElement("select"),n.multiple?r.multiple=!0:n.size&&(r.size=n.size);break;default:r=typeof n.is=="string"?f.createElement(u,{is:n.is}):f.createElement(u)}}r[I]=t,r[ee]=n;e:for(f=t.child;f!==null;){if(f.tag===5||f.tag===6)r.appendChild(f.stateNode);else if(f.tag!==4&&f.tag!==27&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===t)break e;for(;f.sibling===null;){if(f.return===null||f.return===t)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}t.stateNode=r;e:switch(Mt(r,u,n),u){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&Ga(t)}}return et(t),hc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&Ga(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(c(166));if(e=ge.current,Tn(t)){if(e=t.stateNode,a=t.memoizedProps,n=null,u=Rt,u!==null)switch(u.tag){case 27:case 5:n=u.memoizedProps}e[I]=t,e=!!(e.nodeValue===a||n!==null&&n.suppressHydrationWarning===!0||em(e.nodeValue,a)),e||ul(t,!0)}else e=mr(e).createTextNode(n),e[I]=t,t.stateNode=e}return et(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(n=Tn(t),a!==null){if(e===null){if(!n)throw Error(c(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(557));e[I]=t}else Ql(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;et(t),e=!1}else a=Ts(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(Vt(t),t):(Vt(t),null);if((t.flags&128)!==0)throw Error(c(558))}return et(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=Tn(t),n!==null&&n.dehydrated!==null){if(e===null){if(!u)throw Error(c(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(c(317));u[I]=t}else Ql(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;et(t),u=!1}else u=Ts(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(Vt(t),t):(Vt(t),null)}return Vt(t),(t.flags&128)!==0?(t.lanes=a,t):(a=n!==null,e=e!==null&&e.memoizedState!==null,a&&(n=t.child,u=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(u=n.alternate.memoizedState.cachePool.pool),r=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(r=n.memoizedState.cachePool.pool),r!==u&&(n.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),Iu(t,t.updateQueue),et(t),null);case 4:return Je(),e===null&&Nc(t.stateNode.containerInfo),et(t),null;case 10:return Ba(t.type),et(t),null;case 19:if(Q(ut),n=t.memoizedState,n===null)return et(t),null;if(u=(t.flags&128)!==0,r=n.rendering,r===null)if(u)Mi(n,!1);else{if(nt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(r=Qu(e),r!==null){for(t.flags|=128,Mi(n,!1),e=r.updateQueue,t.updateQueue=e,Iu(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)jf(a,e),a=a.sibling;return J(ut,ut.current&1|2),we&&La(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&zt()>nr&&(t.flags|=128,u=!0,Mi(n,!1),t.lanes=4194304)}else{if(!u)if(e=Qu(r),e!==null){if(t.flags|=128,u=!0,e=e.updateQueue,t.updateQueue=e,Iu(t,e),Mi(n,!0),n.tail===null&&n.tailMode==="hidden"&&!r.alternate&&!we)return et(t),null}else 2*zt()-n.renderingStartTime>nr&&a!==536870912&&(t.flags|=128,u=!0,Mi(n,!1),t.lanes=4194304);n.isBackwards?(r.sibling=t.child,t.child=r):(e=n.last,e!==null?e.sibling=r:t.child=r,n.last=r)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=zt(),e.sibling=null,a=ut.current,J(ut,u?a&1|2:a&1),we&&La(t,n.treeForkCount),e):(et(t),null);case 22:case 23:return Vt(t),Ls(),n=t.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?(a&536870912)!==0&&(t.flags&128)===0&&(et(t),t.subtreeFlags&6&&(t.flags|=8192)):et(t),a=t.updateQueue,a!==null&&Iu(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==a&&(t.flags|=2048),e!==null&&Q(Xl),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Ba(dt),et(t),null;case 25:return null;case 30:return null}throw Error(c(156,t.tag))}function wp(e,t){switch(Es(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ba(dt),Je(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return nn(t),null;case 31:if(t.memoizedState!==null){if(Vt(t),t.alternate===null)throw Error(c(340));Ql()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Vt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(c(340));Ql()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Q(ut),null;case 4:return Je(),null;case 10:return Ba(t.type),null;case 22:case 23:return Vt(t),Ls(),e!==null&&Q(Xl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ba(dt),null;case 25:return null;default:return null}}function ih(e,t){switch(Es(t),t.tag){case 3:Ba(dt),Je();break;case 26:case 27:case 5:nn(t);break;case 4:Je();break;case 31:t.memoizedState!==null&&Vt(t);break;case 13:Vt(t);break;case 19:Q(ut);break;case 10:Ba(t.type);break;case 22:case 23:Vt(t),Ls(),e!==null&&Q(Xl);break;case 24:Ba(dt)}}function xi(e,t){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var u=n.next;a=u;do{if((a.tag&e)===e){n=void 0;var r=a.create,f=a.inst;n=r(),f.destroy=n}a=a.next}while(a!==u)}}catch(v){Ge(t,t.return,v)}}function hl(e,t,a){try{var n=t.updateQueue,u=n!==null?n.lastEffect:null;if(u!==null){var r=u.next;n=r;do{if((n.tag&e)===e){var f=n.inst,v=f.destroy;if(v!==void 0){f.destroy=void 0,u=t;var S=a,j=v;try{j()}catch(B){Ge(u,S,B)}}}n=n.next}while(n!==r)}}catch(B){Ge(t,t.return,B)}}function uh(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{$f(t,a)}catch(n){Ge(e,e.return,n)}}}function rh(e,t,a){a.props=Fl(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(n){Ge(e,t,n)}}function Di(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:n=e.stateNode;break;default:n=e.stateNode}typeof a=="function"?e.refCleanup=a(n):a.current=n}}catch(u){Ge(e,t,u)}}function Oa(e,t){var a=e.ref,n=e.refCleanup;if(a!==null)if(typeof n=="function")try{n()}catch(u){Ge(e,t,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(u){Ge(e,t,u)}else a.current=null}function sh(e){var t=e.type,a=e.memoizedProps,n=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break e;case"img":a.src?n.src=a.src:a.srcSet&&(n.srcset=a.srcSet)}}catch(u){Ge(e,e.return,u)}}function mc(e,t,a){try{var n=e.stateNode;ag(n,e.type,a,t),n[ee]=t}catch(u){Ge(e,e.return,u)}}function ch(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Sl(e.type)||e.tag===4}function yc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ch(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Sl(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function vc(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Ua));else if(n!==4&&(n===27&&Sl(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(vc(e,t,a),e=e.sibling;e!==null;)vc(e,t,a),e=e.sibling}function er(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(n!==4&&(n===27&&Sl(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(er(e,t,a),e=e.sibling;e!==null;)er(e,t,a),e=e.sibling}function oh(e){var t=e.stateNode,a=e.memoizedProps;try{for(var n=e.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);Mt(t,n,a),t[I]=e,t[ee]=a}catch(r){Ge(e,e.return,r)}}var Xa=!1,yt=!1,pc=!1,fh=typeof WeakSet=="function"?WeakSet:Set,Et=null;function Np(e,t){if(e=e.containerInfo,Bc=Er,e=Tf(e),os(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var n=a.getSelection&&a.getSelection();if(n&&n.rangeCount!==0){a=n.anchorNode;var u=n.anchorOffset,r=n.focusNode;n=n.focusOffset;try{a.nodeType,r.nodeType}catch{a=null;break e}var f=0,v=-1,S=-1,j=0,B=0,X=e,w=null;t:for(;;){for(var L;X!==a||u!==0&&X.nodeType!==3||(v=f+u),X!==r||n!==0&&X.nodeType!==3||(S=f+n),X.nodeType===3&&(f+=X.nodeValue.length),(L=X.firstChild)!==null;)w=X,X=L;for(;;){if(X===e)break t;if(w===a&&++j===u&&(v=f),w===r&&++B===n&&(S=f),(L=X.nextSibling)!==null)break;X=w,w=X.parentNode}X=L}a=v===-1||S===-1?null:{start:v,end:S}}else a=null}a=a||{start:0,end:0}}else a=null;for(qc={focusedElem:e,selectionRange:a},Er=!1,Et=t;Et!==null;)if(t=Et,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Et=e;else for(;Et!==null;){switch(t=Et,r=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a title"))),Mt(r,n,a),r[I]=e,$e(r),n=r;break e;case"link":var f=pm("link","href",u).get(n+(a.href||""));if(f){for(var v=0;vVe&&(f=Ve,Ve=he,he=f);var C=Ef(v,he),T=Ef(v,Ve);if(C&&T&&(L.rangeCount!==1||L.anchorNode!==C.node||L.anchorOffset!==C.offset||L.focusNode!==T.node||L.focusOffset!==T.offset)){var _=X.createRange();_.setStart(C.node,C.offset),L.removeAllRanges(),he>Ve?(L.addRange(_),L.extend(T.node,T.offset)):(_.setEnd(T.node,T.offset),L.addRange(_))}}}}for(X=[],L=v;L=L.parentNode;)L.nodeType===1&&X.push({element:L,left:L.scrollLeft,top:L.scrollTop});for(typeof v.focus=="function"&&v.focus(),v=0;va?32:a,N.T=null,a=Oc,Oc=null;var r=pl,f=Fa;if(pt=0,Hn=pl=null,Fa=0,(qe&6)!==0)throw Error(c(331));var v=qe;if(qe|=4,Rh(r.current),bh(r,r.current,f,a),qe=v,Ui(0,!1),_t&&typeof _t.onPostCommitFiberRoot=="function")try{_t.onPostCommitFiberRoot(_a,r)}catch{}return!0}finally{Z.p=u,N.T=n,Qh(e,t)}}function Gh(e,t,a){t=ea(a,t),t=lc(e.stateNode,t,2),e=ol(e,t,2),e!==null&&(ba(e,2),Ma(e))}function Ge(e,t,a){if(e.tag===3)Gh(e,e,a);else for(;t!==null;){if(t.tag===3){Gh(t,e,a);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(vl===null||!vl.has(n))){e=ea(a,e),a=Xd(2),n=ol(t,a,2),n!==null&&(Kd(a,n,t,e),ba(n,2),Ma(n));break}}t=t.return}}function Ac(e,t,a){var n=e.pingCache;if(n===null){n=e.pingCache=new Bp;var u=new Set;n.set(t,u)}else u=n.get(t),u===void 0&&(u=new Set,n.set(t,u));u.has(a)||(Sc=!0,u.add(a),e=Xp.bind(null,e,t,a),t.then(e,e))}function Xp(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,ke===e&&(_e&a)===a&&(nt===4||nt===3&&(_e&62914560)===_e&&300>zt()-lr?(qe&2)===0&&Bn(e,0):Ec|=a,Ln===_e&&(Ln=0)),Ma(e)}function Xh(e,t){t===0&&(t=ti()),e=Bl(e,t),e!==null&&(ba(e,t),Ma(e))}function Kp(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Xh(e,a)}function Vp(e,t){var a=0;switch(e.tag){case 31:case 13:var n=e.stateNode,u=e.memoizedState;u!==null&&(a=u.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(c(314))}n!==null&&n.delete(t),Xh(e,a)}function Zp(e,t){return rn(e,t)}var or=null,Qn=null,Cc=!1,fr=!1,zc=!1,bl=0;function Ma(e){e!==Qn&&e.next===null&&(Qn===null?or=Qn=e:Qn=Qn.next=e),fr=!0,Cc||(Cc=!0,Fp())}function Ui(e,t){if(!zc&&fr){zc=!0;do for(var a=!1,n=or;n!==null;){if(e!==0){var u=n.pendingLanes;if(u===0)var r=0;else{var f=n.suspendedLanes,v=n.pingedLanes;r=(1<<31-xt(42|e)+1)-1,r&=u&~(f&~v),r=r&201326741?r&201326741|1:r?r|2:0}r!==0&&(a=!0,Jh(n,r))}else r=_e,r=sn(n,n===ke?r:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(r&3)===0||el(n,r)||(a=!0,Jh(n,r));n=n.next}while(a);zc=!1}}function Jp(){Kh()}function Kh(){fr=Cc=!1;var e=0;bl!==0&&ng()&&(e=bl);for(var t=zt(),a=null,n=or;n!==null;){var u=n.next,r=Vh(n,t);r===0?(n.next=null,a===null?or=u:a.next=u,u===null&&(Qn=a)):(a=n,(e!==0||(r&3)!==0)&&(fr=!0)),n=u}pt!==0&&pt!==5||Ui(e),bl!==0&&(bl=0)}function Vh(e,t){for(var a=e.suspendedLanes,n=e.pingedLanes,u=e.expirationTimes,r=e.pendingLanes&-62914561;0v)break;var B=S.transferSize,X=S.initiatorType;B&&tm(X)&&(S=S.responseEnd,f+=B*(S"u"?null:document;function hm(e,t,a){var n=Yn;if(n&&typeof t=="string"&&t){var u=Pt(t);u='link[rel="'+e+'"][href="'+u+'"]',typeof a=="string"&&(u+='[crossorigin="'+a+'"]'),dm.has(u)||(dm.add(u),e={rel:e,crossOrigin:a,href:t},n.querySelector(u)===null&&(t=n.createElement("link"),Mt(t,"link",e),$e(t),n.head.appendChild(t)))}}function hg(e){ka.D(e),hm("dns-prefetch",e,null)}function mg(e,t){ka.C(e,t),hm("preconnect",e,t)}function yg(e,t,a){ka.L(e,t,a);var n=Yn;if(n&&e&&t){var u='link[rel="preload"][as="'+Pt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(u+='[imagesrcset="'+Pt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(u+='[imagesizes="'+Pt(a.imageSizes)+'"]')):u+='[href="'+Pt(e)+'"]';var r=u;switch(t){case"style":r=Gn(e);break;case"script":r=Xn(e)}ua.has(r)||(e=b({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),ua.set(r,e),n.querySelector(u)!==null||t==="style"&&n.querySelector(Hi(r))||t==="script"&&n.querySelector(Bi(r))||(t=n.createElement("link"),Mt(t,"link",e),$e(t),n.head.appendChild(t)))}}function vg(e,t){ka.m(e,t);var a=Yn;if(a&&e){var n=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+Pt(n)+'"][href="'+Pt(e)+'"]',r=u;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":r=Xn(e)}if(!ua.has(r)&&(e=b({rel:"modulepreload",href:e},t),ua.set(r,e),a.querySelector(u)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Bi(r)))return}n=a.createElement("link"),Mt(n,"link",e),$e(n),a.head.appendChild(n)}}}function pg(e,t,a){ka.S(e,t,a);var n=Yn;if(n&&e){var u=ot(n).hoistableStyles,r=Gn(e);t=t||"default";var f=u.get(r);if(!f){var v={loading:0,preload:null};if(f=n.querySelector(Hi(r)))v.loading=5;else{e=b({rel:"stylesheet",href:e,"data-precedence":t},a),(a=ua.get(r))&&Zc(e,a);var S=f=n.createElement("link");$e(S),Mt(S,"link",e),S._p=new Promise(function(j,B){S.onload=j,S.onerror=B}),S.addEventListener("load",function(){v.loading|=1}),S.addEventListener("error",function(){v.loading|=2}),v.loading|=4,vr(f,t,n)}f={type:"stylesheet",instance:f,count:1,state:v},u.set(r,f)}}}function gg(e,t){ka.X(e,t);var a=Yn;if(a&&e){var n=ot(a).hoistableScripts,u=Xn(e),r=n.get(u);r||(r=a.querySelector(Bi(u)),r||(e=b({src:e,async:!0},t),(t=ua.get(u))&&Jc(e,t),r=a.createElement("script"),$e(r),Mt(r,"link",e),a.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},n.set(u,r))}}function bg(e,t){ka.M(e,t);var a=Yn;if(a&&e){var n=ot(a).hoistableScripts,u=Xn(e),r=n.get(u);r||(r=a.querySelector(Bi(u)),r||(e=b({src:e,async:!0,type:"module"},t),(t=ua.get(u))&&Jc(e,t),r=a.createElement("script"),$e(r),Mt(r,"link",e),a.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},n.set(u,r))}}function mm(e,t,a,n){var u=(u=ge.current)?yr(u):null;if(!u)throw Error(c(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Gn(a.href),a=ot(u).hoistableStyles,n=a.get(t),n||(n={type:"style",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Gn(a.href);var r=ot(u).hoistableStyles,f=r.get(e);if(f||(u=u.ownerDocument||u,f={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},r.set(e,f),(r=u.querySelector(Hi(e)))&&!r._p&&(f.instance=r,f.state.loading=5),ua.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},ua.set(e,a),r||Sg(u,e,a,f.state))),t&&n===null)throw Error(c(528,""));return f}if(t&&n!==null)throw Error(c(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Xn(a),a=ot(u).hoistableScripts,n=a.get(t),n||(n={type:"script",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(c(444,e))}}function Gn(e){return'href="'+Pt(e)+'"'}function Hi(e){return'link[rel="stylesheet"]['+e+"]"}function ym(e){return b({},e,{"data-precedence":e.precedence,precedence:null})}function Sg(e,t,a,n){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?n.loading=1:(t=e.createElement("link"),n.preload=t,t.addEventListener("load",function(){return n.loading|=1}),t.addEventListener("error",function(){return n.loading|=2}),Mt(t,"link",a),$e(t),e.head.appendChild(t))}function Xn(e){return'[src="'+Pt(e)+'"]'}function Bi(e){return"script[async]"+e}function vm(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+Pt(a.href)+'"]');if(n)return t.instance=n,$e(n),n;var u=b({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),$e(n),Mt(n,"style",u),vr(n,a.precedence,e),t.instance=n;case"stylesheet":u=Gn(a.href);var r=e.querySelector(Hi(u));if(r)return t.state.loading|=4,t.instance=r,$e(r),r;n=ym(a),(u=ua.get(u))&&Zc(n,u),r=(e.ownerDocument||e).createElement("link"),$e(r);var f=r;return f._p=new Promise(function(v,S){f.onload=v,f.onerror=S}),Mt(r,"link",n),t.state.loading|=4,vr(r,a.precedence,e),t.instance=r;case"script":return r=Xn(a.src),(u=e.querySelector(Bi(r)))?(t.instance=u,$e(u),u):(n=a,(u=ua.get(r))&&(n=b({},a),Jc(n,u)),e=e.ownerDocument||e,u=e.createElement("script"),$e(u),Mt(u,"link",n),e.head.appendChild(u),t.instance=u);case"void":return null;default:throw Error(c(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(n=t.instance,t.state.loading|=4,vr(n,a.precedence,e));return t.instance}function vr(e,t,a){for(var n=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=n.length?n[n.length-1]:null,r=u,f=0;f title"):null)}function Eg(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function bm(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Rg(e,t,a,n){if(a.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var u=Gn(n.href),r=t.querySelector(Hi(u));if(r){t=r._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=gr.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=r,$e(r);return}r=t.ownerDocument||t,n=ym(n),(u=ua.get(u))&&Zc(n,u),r=r.createElement("link"),$e(r);var f=r;f._p=new Promise(function(v,S){f.onload=v,f.onerror=S}),Mt(r,"link",n),a.instance=r}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=gr.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Fc=0;function Tg(e,t){return e.stylesheets&&e.count===0&&Sr(e,e.stylesheets),0Fc?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(u)}}:null}function gr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Sr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var br=null;function Sr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,br=new Map,t.forEach(Og,e),br=null,gr.call(e))}function Og(e,t){if(!(t.state.loading&4)){var a=br.get(e);if(a)var n=a.get(null);else{a=new Map,br.set(e,a);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),r=0;r"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(i){console.error(i)}}return l(),lo.exports=M0(),lo.exports}var D0=x0();var Zy=l=>{throw TypeError(l)},A0=(l,i,s)=>i.has(l)||Zy("Cannot "+s),ro=(l,i,s)=>(A0(l,i,"read from private field"),s?s.call(l):i.get(l)),C0=(l,i,s)=>i.has(l)?Zy("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(l):i.set(l,s),ey="popstate";function ty(l){return typeof l=="object"&&l!=null&&"pathname"in l&&"search"in l&&"hash"in l&&"state"in l&&"key"in l}function z0(l={}){function i(c,o){let d=o.state?.masked,{pathname:h,search:y,hash:p}=d||c.location;return eu("",{pathname:h,search:y,hash:p},o.state&&o.state.usr||null,o.state&&o.state.key||"default",d?{pathname:c.location.pathname,search:c.location.search,hash:c.location.hash}:void 0)}function s(c,o){return typeof o=="string"?o:Da(o)}return j0(i,s,null,l)}function Me(l,i){if(l===!1||l===null||typeof l>"u")throw new Error(i)}function st(l,i){if(!l){typeof console<"u"&&console.warn(i);try{throw new Error(i)}catch{}}}function _0(){return Math.random().toString(36).substring(2,10)}function ay(l,i){return{usr:l.state,key:l.key,idx:i,masked:l.unstable_mask?{pathname:l.pathname,search:l.search,hash:l.hash}:void 0}}function eu(l,i,s=null,c,o){return{pathname:typeof l=="string"?l:l.pathname,search:"",hash:"",...typeof i=="string"?Aa(i):i,state:s,key:i&&i.key||c||_0(),unstable_mask:o}}function Da({pathname:l="/",search:i="",hash:s=""}){return i&&i!=="?"&&(l+=i.charAt(0)==="?"?i:"?"+i),s&&s!=="#"&&(l+=s.charAt(0)==="#"?s:"#"+s),l}function Aa(l){let i={};if(l){let s=l.indexOf("#");s>=0&&(i.hash=l.substring(s),l=l.substring(0,s));let c=l.indexOf("?");c>=0&&(i.search=l.substring(c),l=l.substring(0,c)),l&&(i.pathname=l)}return i}function j0(l,i,s,c={}){let{window:o=document.defaultView,v5Compat:d=!1}=c,h=o.history,y="POP",p=null,m=g();m==null&&(m=0,h.replaceState({...h.state,idx:m},""));function g(){return(h.state||{idx:null}).idx}function b(){y="POP";let Y=g(),W=Y==null?null:Y-m;m=Y,p&&p({action:y,location:q.location,delta:W})}function z(Y,W){y="PUSH";let k=ty(Y)?Y:eu(q.location,Y,W);m=g()+1;let F=ay(k,m),ye=q.createHref(k.unstable_mask||k);try{h.pushState(F,"",ye)}catch(ce){if(ce instanceof DOMException&&ce.name==="DataCloneError")throw ce;o.location.assign(ye)}d&&p&&p({action:y,location:q.location,delta:1})}function A(Y,W){y="REPLACE";let k=ty(Y)?Y:eu(q.location,Y,W);m=g();let F=ay(k,m),ye=q.createHref(k.unstable_mask||k);h.replaceState(F,"",ye),d&&p&&p({action:y,location:q.location,delta:0})}function H(Y){return Jy(Y)}let q={get action(){return y},get location(){return l(o,h)},listen(Y){if(p)throw new Error("A history only accepts one active listener");return o.addEventListener(ey,b),p=Y,()=>{o.removeEventListener(ey,b),p=null}},createHref(Y){return i(o,Y)},createURL:H,encodeLocation(Y){let W=H(Y);return{pathname:W.pathname,search:W.search,hash:W.hash}},push:z,replace:A,go(Y){return h.go(Y)}};return q}function Jy(l,i=!1){let s="http://localhost";typeof window<"u"&&(s=window.location.origin!=="null"?window.location.origin:window.location.href),Me(s,"No window.location.(origin|href) available to create URL");let c=typeof l=="string"?l:Da(l);return c=c.replace(/ $/,"%20"),!i&&c.startsWith("//")&&(c=s+c),new URL(c,s)}var ki,ly=class{constructor(l){if(C0(this,ki,new Map),l)for(let[i,s]of l)this.set(i,s)}get(l){if(ro(this,ki).has(l))return ro(this,ki).get(l);if(l.defaultValue!==void 0)return l.defaultValue;throw new Error("No value found for context")}set(l,i){ro(this,ki).set(l,i)}};ki=new WeakMap;var U0=new Set(["lazy","caseSensitive","path","id","index","children"]);function w0(l){return U0.has(l)}var N0=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function L0(l){return N0.has(l)}function H0(l){return l.index===!0}function tu(l,i,s=[],c={},o=!1){return l.map((d,h)=>{let y=[...s,String(h)],p=typeof d.id=="string"?d.id:y.join("-");if(Me(d.index!==!0||!d.children,"Cannot specify children on an index route"),Me(o||!c[p],`Found a route id collision on id "${p}". Route id's must be globally unique within Data Router usages`),H0(d)){let m={...d,id:p};return c[p]=ny(m,i(m)),m}else{let m={...d,id:p,children:void 0};return c[p]=ny(m,i(m)),d.children&&(m.children=tu(d.children,i,y,c,o)),m}})}function ny(l,i){return Object.assign(l,{...i,...typeof i.lazy=="object"&&i.lazy!=null?{lazy:{...l.lazy,...i.lazy}}:{}})}function xl(l,i,s="/"){return $i(l,i,s,!1)}function $i(l,i,s,c){let o=typeof i=="string"?Aa(i):i,d=ca(o.pathname||"/",s);if(d==null)return null;let h=Fy(l);q0(h);let y=null;for(let p=0;y==null&&p{let g={relativePath:m===void 0?h.path||"":m,caseSensitive:h.caseSensitive===!0,childrenIndex:y,route:h};if(g.relativePath.startsWith("/")){if(!g.relativePath.startsWith(c)&&p)return;Me(g.relativePath.startsWith(c),`Absolute route path "${g.relativePath}" nested under path "${c}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),g.relativePath=g.relativePath.slice(c.length)}let b=ga([c,g.relativePath]),z=s.concat(g);h.children&&h.children.length>0&&(Me(h.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${b}".`),Fy(h.children,i,z,b,p)),!(h.path==null&&!h.index)&&i.push({path:b,score:Z0(b,h.index),routesMeta:z})};return l.forEach((h,y)=>{if(h.path===""||!h.path?.includes("?"))d(h,y);else for(let p of ky(h.path))d(h,y,!0,p)}),i}function ky(l){let i=l.split("/");if(i.length===0)return[];let[s,...c]=i,o=s.endsWith("?"),d=s.replace(/\?$/,"");if(c.length===0)return o?[d,""]:[d];let h=ky(c.join("/")),y=[];return y.push(...h.map(p=>p===""?d:[d,p].join("/"))),o&&y.push(...h),y.map(p=>l.startsWith("/")&&p===""?"/":p)}function q0(l){l.sort((i,s)=>i.score!==s.score?s.score-i.score:J0(i.routesMeta.map(c=>c.childrenIndex),s.routesMeta.map(c=>c.childrenIndex)))}var Q0=/^:[\w-]+$/,Y0=3,G0=2,X0=1,K0=10,V0=-2,iy=l=>l==="*";function Z0(l,i){let s=l.split("/"),c=s.length;return s.some(iy)&&(c+=V0),i&&(c+=G0),s.filter(o=>!iy(o)).reduce((o,d)=>o+(Q0.test(d)?Y0:d===""?X0:K0),c)}function J0(l,i){return l.length===i.length&&l.slice(0,-1).every((c,o)=>c===i[o])?l[l.length-1]-i[i.length-1]:0}function F0(l,i,s=!1){let{routesMeta:c}=l,o={},d="/",h=[];for(let y=0;y{if(g==="*"){let H=y[z]||"";h=d.slice(0,d.length-H.length).replace(/(.)\/+$/,"$1")}const A=y[z];return b&&!A?m[g]=void 0:m[g]=(A||"").replace(/%2F/g,"/"),m},{}),pathname:d,pathnameBase:h,pattern:l}}function k0(l,i=!1,s=!0){st(l==="*"||!l.endsWith("*")||l.endsWith("/*"),`Route path "${l}" will be treated as if it were "${l.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${l.replace(/\*$/,"/*")}".`);let c=[],o="^"+l.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(h,y,p,m,g)=>{if(c.push({paramName:y,isOptional:p!=null}),p){let b=g.charAt(m+h.length);return b&&b!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return l.endsWith("*")?(c.push({paramName:"*"}),o+=l==="*"||l==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?o+="\\/*$":l!==""&&l!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,i?void 0:"i"),c]}function $0(l){try{return l.split("/").map(i=>decodeURIComponent(i).replace(/\//g,"%2F")).join("/")}catch(i){return st(!1,`The URL path "${l}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${i}).`),l}}function ca(l,i){if(i==="/")return l;if(!l.toLowerCase().startsWith(i.toLowerCase()))return null;let s=i.endsWith("/")?i.length-1:i.length,c=l.charAt(s);return c&&c!=="/"?null:l.slice(s)||"/"}function W0({basename:l,pathname:i}){return i==="/"?l:ga([l,i])}var $y=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,wo=l=>$y.test(l);function P0(l,i="/"){let{pathname:s,search:c="",hash:o=""}=typeof l=="string"?Aa(l):l,d;return s?(s=s.replace(/\/\/+/g,"/"),s.startsWith("/")?d=uy(s.substring(1),"/"):d=uy(s,i)):d=i,{pathname:d,search:eb(c),hash:tb(o)}}function uy(l,i){let s=i.replace(/\/+$/,"").split("/");return l.split("/").forEach(o=>{o===".."?s.length>1&&s.pop():o!=="."&&s.push(o)}),s.length>1?s.join("/"):"/"}function so(l,i,s,c){return`Cannot include a '${l}' character in a manually specified \`to.${i}\` field [${JSON.stringify(c)}]. Please separate it out to the \`to.${s}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function Wy(l){return l.filter((i,s)=>s===0||i.route.path&&i.route.path.length>0)}function Qr(l){let i=Wy(l);return i.map((s,c)=>c===i.length-1?s.pathname:s.pathnameBase)}function nu(l,i,s,c=!1){let o;typeof l=="string"?o=Aa(l):(o={...l},Me(!o.pathname||!o.pathname.includes("?"),so("?","pathname","search",o)),Me(!o.pathname||!o.pathname.includes("#"),so("#","pathname","hash",o)),Me(!o.search||!o.search.includes("#"),so("#","search","hash",o)));let d=l===""||o.pathname==="",h=d?"/":o.pathname,y;if(h==null)y=s;else{let b=i.length-1;if(!c&&h.startsWith("..")){let z=h.split("/");for(;z[0]==="..";)z.shift(),b-=1;o.pathname=z.join("/")}y=b>=0?i[b]:"/"}let p=P0(o,y),m=h&&h!=="/"&&h.endsWith("/"),g=(d||h===".")&&s.endsWith("/");return!p.pathname.endsWith("/")&&(m||g)&&(p.pathname+="/"),p}var ga=l=>l.join("/").replace(/\/\/+/g,"/"),I0=l=>l.replace(/\/+$/,"").replace(/^\/*/,"/"),eb=l=>!l||l==="?"?"":l.startsWith("?")?l:"?"+l,tb=l=>!l||l==="#"?"":l.startsWith("#")?l:"#"+l,iu=class{constructor(l,i,s,c=!1){this.status=l,this.statusText=i||"",this.internal=c,s instanceof Error?(this.data=s.toString(),this.error=s):this.data=s}};function au(l){return l!=null&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.internal=="boolean"&&"data"in l}function uu(l){return l.map(i=>i.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Py=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Iy(l,i){let s=l;if(typeof s!="string"||!$y.test(s))return{absoluteURL:void 0,isExternal:!1,to:s};let c=s,o=!1;if(Py)try{let d=new URL(window.location.href),h=s.startsWith("//")?new URL(d.protocol+s):new URL(s),y=ca(h.pathname,i);h.origin===d.origin&&y!=null?s=y+h.search+h.hash:o=!0}catch{st(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:c,isExternal:o,to:s}}var Al=Symbol("Uninstrumented");function ab(l,i){let s={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};l.forEach(o=>o({id:i.id,index:i.index,path:i.path,instrument(d){let h=Object.keys(s);for(let y of h)d[y]&&s[y].push(d[y])}}));let c={};if(typeof i.lazy=="function"&&s.lazy.length>0){let o=Zn(s.lazy,i.lazy,()=>{});o&&(c.lazy=o)}if(typeof i.lazy=="object"){let o=i.lazy;["middleware","loader","action"].forEach(d=>{let h=o[d],y=s[`lazy.${d}`];if(typeof h=="function"&&y.length>0){let p=Zn(y,h,()=>{});p&&(c.lazy=Object.assign(c.lazy||{},{[d]:p}))}})}return["loader","action"].forEach(o=>{let d=i[o];if(typeof d=="function"&&s[o].length>0){let h=d[Al]??d,y=Zn(s[o],h,(...p)=>ry(p[0]));y&&(o==="loader"&&h.hydrate===!0&&(y.hydrate=!0),y[Al]=h,c[o]=y)}}),i.middleware&&i.middleware.length>0&&s.middleware.length>0&&(c.middleware=i.middleware.map(o=>{let d=o[Al]??o,h=Zn(s.middleware,d,(...y)=>ry(y[0]));return h?(h[Al]=d,h):o})),c}function lb(l,i){let s={navigate:[],fetch:[]};if(i.forEach(c=>c({instrument(o){let d=Object.keys(o);for(let h of d)o[h]&&s[h].push(o[h])}})),s.navigate.length>0){let c=l.navigate[Al]??l.navigate,o=Zn(s.navigate,c,(...d)=>{let[h,y]=d;return{to:typeof h=="number"||typeof h=="string"?h:h?Da(h):".",...sy(l,y??{})}});o&&(o[Al]=c,l.navigate=o)}if(s.fetch.length>0){let c=l.fetch[Al]??l.fetch,o=Zn(s.fetch,c,(...d)=>{let[h,,y,p]=d;return{href:y??".",fetcherKey:h,...sy(l,p??{})}});o&&(o[Al]=c,l.fetch=o)}return l}function Zn(l,i,s){return l.length===0?null:async(...c)=>{let o=await ev(l,s(...c),()=>i(...c),l.length-1);if(o.type==="error")throw o.value;return o.value}}async function ev(l,i,s,c){let o=l[c],d;if(o){let h,y=async()=>(h?console.error("You cannot call instrumented handlers more than once"):h=ev(l,i,s,c-1),d=await h,Me(d,"Expected a result"),d.type==="error"&&d.value instanceof Error?{status:"error",error:d.value}:{status:"success",error:void 0});try{await o(y,i)}catch(p){console.error("An instrumentation function threw an error:",p)}h||await y(),await h}else try{d={type:"success",value:await s()}}catch(h){d={type:"error",value:h}}return d||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function ry(l){let{request:i,context:s,params:c,unstable_pattern:o}=l;return{request:nb(i),params:{...c},unstable_pattern:o,context:ib(s)}}function sy(l,i){return{currentUrl:Da(l.state.location),..."formMethod"in i?{formMethod:i.formMethod}:{},..."formEncType"in i?{formEncType:i.formEncType}:{},..."formData"in i?{formData:i.formData}:{},..."body"in i?{body:i.body}:{}}}function nb(l){return{method:l.method,url:l.url,headers:{get:(...i)=>l.headers.get(...i)}}}function ib(l){if(rb(l)){let i={...l};return Object.freeze(i),i}else return{get:i=>l.get(i)}}var ub=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function rb(l){if(l===null||typeof l!="object")return!1;const i=Object.getPrototypeOf(l);return i===Object.prototype||i===null||Object.getOwnPropertyNames(i).sort().join("\0")===ub}var tv=["POST","PUT","PATCH","DELETE"],sb=new Set(tv),cb=["GET",...tv],ob=new Set(cb),av=new Set([301,302,303,307,308]),fb=new Set([307,308]),co={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},db={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Vi={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},hb=l=>({hasErrorBoundary:!!l.hasErrorBoundary}),lv="remix-router-transitions",nv=Symbol("ResetLoaderData");function mb(l){const i=l.window?l.window:typeof window<"u"?window:void 0,s=typeof i<"u"&&typeof i.document<"u"&&typeof i.document.createElement<"u";Me(l.routes.length>0,"You must provide a non-empty routes array to createRouter");let c=l.hydrationRouteProperties||[],o=l.mapRouteProperties||hb,d=o;if(l.unstable_instrumentations){let E=l.unstable_instrumentations;d=D=>({...o(D),...ab(E.map(U=>U.route).filter(Boolean),D)})}let h={},y=tu(l.routes,d,void 0,h),p,m=l.basename||"/";m.startsWith("/")||(m=`/${m}`);let g=l.dataStrategy||bb,b={unstable_passThroughRequests:!1,...l.future},z=null,A=new Set,H=null,q=null,Y=null,W=l.hydrationData!=null,k=xl(y,l.history.location,m),F=!1,ye=null,ce,be;if(k==null&&!l.patchRoutesOnNavigation){let E=ra(404,{pathname:l.history.location.pathname}),{matches:D,route:U}=Cr(y);ce=!0,be=!ce,k=D,ye={[U.id]:E}}else if(k&&!l.hydrationData&&tl(k,y,l.history.location.pathname).active&&(k=null),k)if(k.some(E=>E.route.lazy))ce=!1,be=!ce;else if(!k.some(E=>No(E.route)))ce=!0,be=!ce;else{let E=l.hydrationData?l.hydrationData.loaderData:null,D=l.hydrationData?l.hydrationData.errors:null,U=k;if(D){let V=k.findIndex($=>D[$.route.id]!==void 0);U=U.slice(0,V+1)}be=!1,ce=!0,U.forEach(V=>{let $=iv(V.route,E,D);be=be||$.renderFallback,ce=ce&&!$.shouldLoad})}else{ce=!1,be=!ce,k=[];let E=tl(null,y,l.history.location.pathname);E.active&&E.matches&&(F=!0,k=E.matches)}let K,x={historyAction:l.history.action,location:l.history.location,matches:k,initialized:ce,renderFallback:be,navigation:co,restoreScrollPosition:l.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:l.hydrationData&&l.hydrationData.loaderData||{},actionData:l.hydrationData&&l.hydrationData.actionData||null,errors:l.hydrationData&&l.hydrationData.errors||ye,fetchers:new Map,blockers:new Map},ve="POP",Oe=null,Qe=!1,me,Ze=!1,Ue=new Map,pe=null,N=!1,Z=!1,le=new Set,ue=new Map,Re=0,R=-1,Q=new Map,J=new Set,P=new Map,de=new Map,ge=new Set,xe=new Map,ct,Je=null;function zl(){if(z=l.history.listen(({action:E,location:D,delta:U})=>{if(ct){ct(),ct=void 0;return}st(xe.size===0||U!=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 V=jl({currentLocation:x.location,nextLocation:D,historyAction:E});if(V&&U!=null){let $=new Promise(ne=>{ct=ne});l.history.go(U*-1),ja(V,{state:"blocked",location:D,proceed(){ja(V,{state:"proceeding",proceed:void 0,reset:void 0,location:D}),$.then(()=>l.history.go(U))},reset(){let ne=new Map(x.blockers);ne.set(V,Vi),vt({blockers:ne})}}),Oe?.resolve(),Oe=null;return}return Ca(E,D)}),s){Hb(i,Ue);let E=()=>Bb(i,Ue);i.addEventListener("pagehide",E),pe=()=>i.removeEventListener("pagehide",E)}return x.initialized||Ca("POP",x.location,{initialHydration:!0}),K}function nn(){z&&z(),pe&&pe(),A.clear(),me&&me.abort(),x.fetchers.forEach((E,D)=>_a(D)),x.blockers.forEach((E,D)=>_l(D))}function $n(E){return A.add(E),()=>A.delete(E)}function vt(E,D={}){E.matches&&(E.matches=E.matches.map($=>{let ne=h[$.route.id],I=$.route;return I.element!==ne.element||I.errorElement!==ne.errorElement||I.hydrateFallbackElement!==ne.hydrateFallbackElement?{...$,route:ne}:$})),x={...x,...E};let U=[],V=[];x.fetchers.forEach(($,ne)=>{$.state==="idle"&&(ge.has(ne)?U.push(ne):V.push(ne))}),ge.forEach($=>{!x.fetchers.has($)&&!ue.has($)&&U.push($)}),[...A].forEach($=>$(x,{deletedFetchers:U,newErrors:E.errors??null,viewTransitionOpts:D.viewTransitionOpts,flushSync:D.flushSync===!0})),U.forEach($=>_a($)),V.forEach($=>x.fetchers.delete($))}function Nt(E,D,{flushSync:U}={}){let V=x.actionData!=null&&x.navigation.formMethod!=null&&Ct(x.navigation.formMethod)&&x.navigation.state==="loading"&&E.state?._isRedirect!==!0,$;D.actionData?Object.keys(D.actionData).length>0?$=D.actionData:$=null:V?$=x.actionData:$=null;let ne=D.loaderData?by(x.loaderData,D.loaderData,D.matches||[],D.errors):x.loaderData,I=x.blockers;I.size>0&&(I=new Map(I),I.forEach((fe,se)=>I.set(se,Vi)));let ee=N?!1:ti(E,D.matches||x.matches),ie=Qe===!0||x.navigation.formMethod!=null&&Ct(x.navigation.formMethod)&&E.state?._isRedirect!==!0;p&&(y=p,p=void 0),N||ve==="POP"||(ve==="PUSH"?l.history.push(E,E.state):ve==="REPLACE"&&l.history.replace(E,E.state));let te;if(ve==="POP"){let fe=Ue.get(x.location.pathname);fe&&fe.has(E.pathname)?te={currentLocation:x.location,nextLocation:E}:Ue.has(E.pathname)&&(te={currentLocation:E,nextLocation:x.location})}else if(Ze){let fe=Ue.get(x.location.pathname);fe?fe.add(E.pathname):(fe=new Set([E.pathname]),Ue.set(x.location.pathname,fe)),te={currentLocation:x.location,nextLocation:E}}vt({...D,actionData:$,loaderData:ne,historyAction:ve,location:E,initialized:!0,renderFallback:!1,navigation:co,revalidation:"idle",restoreScrollPosition:ee,preventScrollReset:ie,blockers:I},{viewTransitionOpts:te,flushSync:U===!0}),ve="POP",Qe=!1,Ze=!1,N=!1,Z=!1,Oe?.resolve(),Oe=null,Je?.resolve(),Je=null}async function un(E,D){if(Oe?.resolve(),Oe=null,typeof E=="number"){Oe||(Oe=Ty());let Fe=Oe.promise;return l.history.go(E),Fe}let U=So(x.location,x.matches,m,E,D?.fromRouteId,D?.relative),{path:V,submission:$,error:ne}=cy(!1,U,D),I;D?.unstable_mask&&(I={pathname:"",search:"",hash:"",...typeof D.unstable_mask=="string"?Aa(D.unstable_mask):{...x.location.unstable_mask,...D.unstable_mask}});let ee=x.location,ie=eu(ee,V,D&&D.state,void 0,I);ie={...ie,...l.history.encodeLocation(ie)};let te=D&&D.replace!=null?D.replace:void 0,fe="PUSH";te===!0?fe="REPLACE":te===!1||$!=null&&Ct($.formMethod)&&$.formAction===x.location.pathname+x.location.search&&(fe="REPLACE");let se=D&&"preventScrollReset"in D?D.preventScrollReset===!0:void 0,Le=(D&&D.flushSync)===!0,De=jl({currentLocation:ee,nextLocation:ie,historyAction:fe});if(De){ja(De,{state:"blocked",location:ie,proceed(){ja(De,{state:"proceeding",proceed:void 0,reset:void 0,location:ie}),un(E,D)},reset(){let Fe=new Map(x.blockers);Fe.set(De,Vi),vt({blockers:Fe})}});return}await Ca(fe,ie,{submission:$,pendingError:ne,preventScrollReset:se,replace:D&&D.replace,enableViewTransition:D&&D.viewTransition,flushSync:Le,callSiteDefaultShouldRevalidate:D&&D.unstable_defaultShouldRevalidate})}function Wn(){Je||(Je=Ty()),Ia(),vt({revalidation:"loading"});let E=Je.promise;return x.navigation.state==="submitting"?E:x.navigation.state==="idle"?(Ca(x.historyAction,x.location,{startUninterruptedRevalidation:!0}),E):(Ca(ve||x.historyAction,x.navigation.location,{overrideNavigation:x.navigation,enableViewTransition:Ze===!0}),E)}async function Ca(E,D,U){me&&me.abort(),me=null,ve=E,N=(U&&U.startUninterruptedRevalidation)===!0,Fr(x.location,x.matches),Qe=(U&&U.preventScrollReset)===!0,Ze=(U&&U.enableViewTransition)===!0;let V=p||y,$=U&&U.overrideNavigation,ne=U?.initialHydration&&x.matches&&x.matches.length>0&&!F?x.matches:xl(V,D,m),I=(U&&U.flushSync)===!0;if(ne&&x.initialized&&!Z&&Db(x.location,D)&&!(U&&U.submission&&Ct(U.submission.formMethod))){Nt(D,{matches:ne},{flushSync:I});return}let ee=tl(ne,V,D.pathname);if(ee.active&&ee.matches&&(ne=ee.matches),!ne){let{error:We,notFoundMatches:at,route:Ne}=ha(D.pathname);Nt(D,{matches:at,loaderData:{},errors:{[Ne.id]:We}},{flushSync:I});return}me=new AbortController;let ie=Vn(l.history,D,me.signal,U&&U.submission),te=l.getContext?await l.getContext():new ly,fe;if(U&&U.pendingError)fe=[Dl(ne).route.id,{type:"error",error:U.pendingError}];else if(U&&U.submission&&Ct(U.submission.formMethod)){let We=await ou(ie,D,U.submission,ne,te,ee.active,U&&U.initialHydration===!0,{replace:U.replace,flushSync:I});if(We.shortCircuited)return;if(We.pendingActionResult){let[at,Ne]=We.pendingActionResult;if(kt(Ne)&&au(Ne.error)&&Ne.error.status===404){me=null,Nt(D,{matches:We.matches,loaderData:{},errors:{[at]:Ne.error}});return}}ne=We.matches||ne,fe=We.pendingActionResult,$=oo(D,U.submission),I=!1,ee.active=!1,ie=Vn(l.history,ie.url,ie.signal)}let{shortCircuited:se,matches:Le,loaderData:De,errors:Fe}=await Pn(ie,D,ne,te,ee.active,$,U&&U.submission,U&&U.fetcherSubmission,U&&U.replace,U&&U.initialHydration===!0,I,fe,U&&U.callSiteDefaultShouldRevalidate);se||(me=null,Nt(D,{matches:Le||ne,...Sy(fe),loaderData:De,errors:Fe}))}async function ou(E,D,U,V,$,ne,I,ee={}){Ia();let ie=Nb(D,U);if(vt({navigation:ie},{flushSync:ee.flushSync===!0}),ne){let se=await ba(V,D.pathname,E.signal);if(se.type==="aborted")return{shortCircuited:!0};if(se.type==="error"){if(se.partialMatches.length===0){let{matches:De,route:Fe}=Cr(y);return{matches:De,pendingActionResult:[Fe.id,{type:"error",error:se.error}]}}let Le=Dl(se.partialMatches).route.id;return{matches:se.partialMatches,pendingActionResult:[Le,{type:"error",error:se.error}]}}else if(se.matches)V=se.matches;else{let{notFoundMatches:Le,error:De,route:Fe}=ha(D.pathname);return{matches:Le,pendingActionResult:[Fe.id,{type:"error",error:De}]}}}let te,fe=Ur(V,D);if(!fe.route.action&&!fe.route.lazy)te={type:"error",error:ra(405,{method:E.method,pathname:D.pathname,routeId:fe.route.id})};else{let se=Jn(d,h,E,D,V,fe,I?[]:c,$),Le=await Pa(E,D,se,$,null);if(te=Le[fe.route.id],!te){for(let De of V)if(Le[De.route.id]){te=Le[De.route.id];break}}if(E.signal.aborted)return{shortCircuited:!0}}if(Pl(te)){let se;return ee&&ee.replace!=null?se=ee.replace:se=vy(te.response.headers.get("Location"),new URL(E.url),m,l.history)===x.location.pathname+x.location.search,await za(E,te,!0,{submission:U,replace:se}),{shortCircuited:!0}}if(kt(te)){let se=Dl(V,fe.route.id);return(ee&&ee.replace)!==!0&&(ve="PUSH"),{matches:V,pendingActionResult:[se.route.id,te,fe.route.id]}}return{matches:V,pendingActionResult:[fe.route.id,te]}}async function Pn(E,D,U,V,$,ne,I,ee,ie,te,fe,se,Le){let De=ne||oo(D,I),Fe=I||ee||Ry(De),We=!N&&!te;if($){if(We){let it=rn(se);vt({navigation:De,...it!==void 0?{actionData:it}:{}},{flushSync:fe})}let Ae=await ba(U,D.pathname,E.signal);if(Ae.type==="aborted")return{shortCircuited:!0};if(Ae.type==="error"){if(Ae.partialMatches.length===0){let{matches:Dt,route:ft}=Cr(y);return{matches:Dt,loaderData:{},errors:{[ft.id]:Ae.error}}}let it=Dl(Ae.partialMatches).route.id;return{matches:Ae.partialMatches,loaderData:{},errors:{[it]:Ae.error}}}else if(Ae.matches)U=Ae.matches;else{let{error:it,notFoundMatches:Dt,route:ft}=ha(D.pathname);return{matches:Dt,loaderData:{},errors:{[ft.id]:it}}}}let at=p||y,{dsMatches:Ne,revalidatingFetchers:ot}=oy(E,V,d,h,l.history,x,U,Fe,D,te?[]:c,te===!0,Z,le,ge,P,J,at,m,l.patchRoutesOnNavigation!=null,se,Le);if(R=++Re,!l.dataStrategy&&!Ne.some(Ae=>Ae.shouldLoad)&&!Ne.some(Ae=>Ae.route.middleware&&Ae.route.middleware.length>0)&&ot.length===0){let Ae=du();return Nt(D,{matches:U,loaderData:{},errors:se&&kt(se[1])?{[se[0]]:se[1].error}:null,...Sy(se),...Ae?{fetchers:new Map(x.fetchers)}:{}},{flushSync:fe}),{shortCircuited:!0}}if(We){let Ae={};if(!$){Ae.navigation=De;let it=rn(se);it!==void 0&&(Ae.actionData=it)}ot.length>0&&(Ae.fetchers=In(ot)),vt(Ae,{flushSync:fe})}ot.forEach(Ae=>{bt(Ae.key),Ae.controller&&ue.set(Ae.key,Ae.controller)});let $e=()=>ot.forEach(Ae=>bt(Ae.key));me&&me.signal.addEventListener("abort",$e);let{loaderResults:al,fetcherResults:ma}=await ei(Ne,ot,E,D,V);if(E.signal.aborted)return{shortCircuited:!0};me&&me.signal.removeEventListener("abort",$e),ot.forEach(Ae=>ue.delete(Ae.key));let St=zr(al);if(St)return await za(E,St.result,!0,{replace:ie}),{shortCircuited:!0};if(St=zr(ma),St)return J.add(St.key),await za(E,St.result,!0,{replace:ie}),{shortCircuited:!0};let{loaderData:Sa,errors:Ul}=gy(x,U,al,se,ot,ma);te&&x.errors&&(Ul={...x.errors,...Ul});let Ea=du(),wl=hu(R),cn=Ea||wl||ot.length>0;return{matches:U,loaderData:Sa,errors:Ul,...cn?{fetchers:new Map(x.fetchers)}:{}}}function rn(E){if(E&&!kt(E[1]))return{[E[0]]:E[1].data};if(x.actionData)return Object.keys(x.actionData).length===0?null:x.actionData}function In(E){return E.forEach(D=>{let U=x.fetchers.get(D.key),V=Zi(void 0,U?U.data:void 0);x.fetchers.set(D.key,V)}),new Map(x.fetchers)}async function Kr(E,D,U,V){bt(E);let $=(V&&V.flushSync)===!0,ne=p||y,I=So(x.location,x.matches,m,U,D,V?.relative),ee=xl(ne,I,m),ie=tl(ee,ne,I);if(ie.active&&ie.matches&&(ee=ie.matches),!ee){Wt(E,D,ra(404,{pathname:I}),{flushSync:$});return}let{path:te,submission:fe,error:se}=cy(!0,I,V);if(se){Wt(E,D,se,{flushSync:$});return}let Le=l.getContext?await l.getContext():new ly,De=(V&&V.preventScrollReset)===!0;if(fe&&Ct(fe.formMethod)){await Vr(E,D,te,ee,Le,ie.active,$,De,fe,V&&V.unstable_defaultShouldRevalidate);return}P.set(E,{routeId:D,path:te}),await zt(E,D,te,ee,Le,ie.active,$,De,fe)}async function Vr(E,D,U,V,$,ne,I,ee,ie,te){Ia(),P.delete(E);let fe=x.fetchers.get(E);da(E,Lb(ie,fe),{flushSync:I});let se=new AbortController,Le=Vn(l.history,U,se.signal,ie);if(ne){let Pe=await ba(V,new URL(Le.url).pathname,Le.signal,E);if(Pe.type==="aborted")return;if(Pe.type==="error"){Wt(E,D,Pe.error,{flushSync:I});return}else if(Pe.matches)V=Pe.matches;else{Wt(E,D,ra(404,{pathname:U}),{flushSync:I});return}}let De=Ur(V,U);if(!De.route.action&&!De.route.lazy){let Pe=ra(405,{method:ie.formMethod,pathname:U,routeId:D});Wt(E,D,Pe,{flushSync:I});return}ue.set(E,se);let Fe=Re,We=Jn(d,h,Le,U,V,De,c,$),at=await Pa(Le,U,We,$,E),Ne=at[De.route.id];if(!Ne){for(let Pe of We)if(at[Pe.route.id]){Ne=at[Pe.route.id];break}}if(Le.signal.aborted){ue.get(E)===se&&ue.delete(E);return}if(ge.has(E)){if(Pl(Ne)||kt(Ne)){da(E,$a(void 0));return}}else{if(Pl(Ne))if(ue.delete(E),R>Fe){da(E,$a(void 0));return}else return J.add(E),da(E,Zi(ie)),za(Le,Ne,!1,{fetcherSubmission:ie,preventScrollReset:ee});if(kt(Ne)){Wt(E,D,Ne.error);return}}let ot=x.navigation.location||x.location,$e=Vn(l.history,ot,se.signal),al=p||y,ma=x.navigation.state!=="idle"?xl(al,x.navigation.location,m):x.matches;Me(ma,"Didn't find any matches after fetcher action");let St=++Re;Q.set(E,St);let Sa=Zi(ie,Ne.data);x.fetchers.set(E,Sa);let{dsMatches:Ul,revalidatingFetchers:Ea}=oy($e,$,d,h,l.history,x,ma,ie,ot,c,!1,Z,le,ge,P,J,al,m,l.patchRoutesOnNavigation!=null,[De.route.id,Ne],te);Ea.filter(Pe=>Pe.key!==E).forEach(Pe=>{let on=Pe.key,fn=x.fetchers.get(on),pu=Zi(void 0,fn?fn.data:void 0);x.fetchers.set(on,pu),bt(on),Pe.controller&&ue.set(on,Pe.controller)}),vt({fetchers:new Map(x.fetchers)});let wl=()=>Ea.forEach(Pe=>bt(Pe.key));se.signal.addEventListener("abort",wl);let{loaderResults:cn,fetcherResults:Ae}=await ei(Ul,Ea,$e,ot,$);if(se.signal.aborted)return;if(se.signal.removeEventListener("abort",wl),Q.delete(E),ue.delete(E),Ea.forEach(Pe=>ue.delete(Pe.key)),x.fetchers.has(E)){let Pe=$a(Ne.data);x.fetchers.set(E,Pe)}let it=zr(cn);if(it)return za($e,it.result,!1,{preventScrollReset:ee});if(it=zr(Ae),it)return J.add(it.key),za($e,it.result,!1,{preventScrollReset:ee});let{loaderData:Dt,errors:ft}=gy(x,ma,cn,void 0,Ea,Ae);hu(St),x.navigation.state==="loading"&&St>R?(Me(ve,"Expected pending action"),me&&me.abort(),Nt(x.navigation.location,{matches:ma,loaderData:Dt,errors:ft,fetchers:new Map(x.fetchers)})):(vt({errors:ft,loaderData:by(x.loaderData,Dt,ma,ft),fetchers:new Map(x.fetchers)}),Z=!1)}async function zt(E,D,U,V,$,ne,I,ee,ie){let te=x.fetchers.get(E);da(E,Zi(ie,te?te.data:void 0),{flushSync:I});let fe=new AbortController,se=Vn(l.history,U,fe.signal);if(ne){let Ne=await ba(V,new URL(se.url).pathname,se.signal,E);if(Ne.type==="aborted")return;if(Ne.type==="error"){Wt(E,D,Ne.error,{flushSync:I});return}else if(Ne.matches)V=Ne.matches;else{Wt(E,D,ra(404,{pathname:U}),{flushSync:I});return}}let Le=Ur(V,U);ue.set(E,fe);let De=Re,Fe=Jn(d,h,se,U,V,Le,c,$),at=(await Pa(se,U,Fe,$,E))[Le.route.id];if(ue.get(E)===fe&&ue.delete(E),!se.signal.aborted){if(ge.has(E)){da(E,$a(void 0));return}if(Pl(at))if(R>De){da(E,$a(void 0));return}else{J.add(E),await za(se,at,!1,{preventScrollReset:ee});return}if(kt(at)){Wt(E,D,at.error);return}da(E,$a(at.data))}}async function za(E,D,U,{submission:V,fetcherSubmission:$,preventScrollReset:ne,replace:I}={}){U||(Oe?.resolve(),Oe=null),D.response.headers.has("X-Remix-Revalidate")&&(Z=!0);let ee=D.response.headers.get("Location");Me(ee,"Expected a Location header on the redirect Response"),ee=vy(ee,new URL(E.url),m,l.history);let ie=eu(x.location,ee,{_isRedirect:!0});if(s){let Fe=!1;if(D.response.headers.has("X-Remix-Reload-Document"))Fe=!0;else if(wo(ee)){const We=Jy(ee,!0);Fe=We.origin!==i.location.origin||ca(We.pathname,m)==null}if(Fe){I?i.location.replace(ee):i.location.assign(ee);return}}me=null;let te=I===!0||D.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:fe,formAction:se,formEncType:Le}=x.navigation;!V&&!$&&fe&&se&&Le&&(V=Ry(x.navigation));let De=V||$;if(fb.has(D.response.status)&&De&&Ct(De.formMethod))await Ca(te,ie,{submission:{...De,formAction:ee},preventScrollReset:ne||Qe,enableViewTransition:U?Ze:void 0});else{let Fe=oo(ie,V);await Ca(te,ie,{overrideNavigation:Fe,fetcherSubmission:$,preventScrollReset:ne||Qe,enableViewTransition:U?Ze:void 0})}}async function Pa(E,D,U,V,$){let ne,I={};try{ne=await Eb(g,E,D,U,$,V,!1)}catch(ee){return U.filter(ie=>ie.shouldLoad).forEach(ie=>{I[ie.route.id]={type:"error",error:ee}}),I}if(E.signal.aborted)return I;if(!Ct(E.method))for(let ee of U){if(ne[ee.route.id]?.type==="error")break;!ne.hasOwnProperty(ee.route.id)&&!x.loaderData.hasOwnProperty(ee.route.id)&&(!x.errors||!x.errors.hasOwnProperty(ee.route.id))&&ee.shouldCallHandler()&&(ne[ee.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${ee.route.id}`)})}for(let[ee,ie]of Object.entries(ne))if(_b(ie)){let te=ie.result;I[ee]={type:"redirect",response:Mb(te,E,ee,U,m)}}else I[ee]=await Ob(ie);return I}async function ei(E,D,U,V,$){let ne=Pa(U,V,E,$,null),I=Promise.all(D.map(async te=>{if(te.matches&&te.match&&te.request&&te.controller){let se=(await Pa(te.request,te.path,te.matches,$,te.key))[te.match.route.id];return{[te.key]:se}}else return Promise.resolve({[te.key]:{type:"error",error:ra(404,{pathname:te.path})}})})),ee=await ne,ie=(await I).reduce((te,fe)=>Object.assign(te,fe),{});return{loaderResults:ee,fetcherResults:ie}}function Ia(){Z=!0,P.forEach((E,D)=>{ue.has(D)&&le.add(D),bt(D)})}function da(E,D,U={}){x.fetchers.set(E,D),vt({fetchers:new Map(x.fetchers)},{flushSync:(U&&U.flushSync)===!0})}function Wt(E,D,U,V={}){let $=Dl(x.matches,D);_a(E),vt({errors:{[$.route.id]:U},fetchers:new Map(x.fetchers)},{flushSync:(V&&V.flushSync)===!0})}function fu(E){return de.set(E,(de.get(E)||0)+1),ge.has(E)&&ge.delete(E),x.fetchers.get(E)||db}function Zr(E,D){bt(E,D?.reason),da(E,$a(null))}function _a(E){let D=x.fetchers.get(E);ue.has(E)&&!(D&&D.state==="loading"&&Q.has(E))&&bt(E),P.delete(E),Q.delete(E),J.delete(E),ge.delete(E),le.delete(E),x.fetchers.delete(E)}function _t(E){let D=(de.get(E)||0)-1;D<=0?(de.delete(E),ge.add(E)):de.set(E,D),vt({fetchers:new Map(x.fetchers)})}function bt(E,D){let U=ue.get(E);U&&(U.abort(D),ue.delete(E))}function xt(E){for(let D of E){let U=fu(D),V=$a(U.data);x.fetchers.set(D,V)}}function du(){let E=[],D=!1;for(let U of J){let V=x.fetchers.get(U);Me(V,`Expected fetcher: ${U}`),V.state==="loading"&&(J.delete(U),E.push(U),D=!0)}return xt(E),D}function hu(E){let D=[];for(let[U,V]of Q)if(V0}function Jr(E,D){let U=x.blockers.get(E)||Vi;return xe.get(E)!==D&&xe.set(E,D),U}function _l(E){x.blockers.delete(E),xe.delete(E)}function ja(E,D){let U=x.blockers.get(E)||Vi;Me(U.state==="unblocked"&&D.state==="blocked"||U.state==="blocked"&&D.state==="blocked"||U.state==="blocked"&&D.state==="proceeding"||U.state==="blocked"&&D.state==="unblocked"||U.state==="proceeding"&&D.state==="unblocked",`Invalid blocker state transition: ${U.state} -> ${D.state}`);let V=new Map(x.blockers);V.set(E,D),vt({blockers:V})}function jl({currentLocation:E,nextLocation:D,historyAction:U}){if(xe.size===0)return;xe.size>1&&st(!1,"A router only supports one blocker at a time");let V=Array.from(xe.entries()),[$,ne]=V[V.length-1],I=x.blockers.get($);if(!(I&&I.state==="proceeding")&&ne({currentLocation:E,nextLocation:D,historyAction:U}))return $}function ha(E){let D=ra(404,{pathname:E}),U=p||y,{matches:V,route:$}=Cr(U);return{notFoundMatches:V,route:$,error:D}}function sn(E,D,U){if(H=E,Y=D,q=U||null,!W&&x.navigation===co){W=!0;let V=ti(x.location,x.matches);V!=null&&vt({restoreScrollPosition:V})}return()=>{H=null,Y=null,q=null}}function el(E,D){return q&&q(E,D.map(V=>B0(V,x.loaderData)))||E.key}function Fr(E,D){if(H&&Y){let U=el(E,D);H[U]=Y()}}function ti(E,D){if(H){let U=el(E,D),V=H[U];if(typeof V=="number")return V}return null}function tl(E,D,U){if(l.patchRoutesOnNavigation)if(E){if(Object.keys(E[0].params).length>0)return{active:!0,matches:$i(D,U,m,!0)}}else return{active:!0,matches:$i(D,U,m,!0)||[]};return{active:!1,matches:null}}async function ba(E,D,U,V){if(!l.patchRoutesOnNavigation)return{type:"success",matches:E};let $=E;for(;;){let ne=p==null,I=p||y,ee=h;try{await l.patchRoutesOnNavigation({signal:U,path:D,matches:$,fetcherKey:V,patch:(fe,se)=>{U.aborted||fy(fe,se,I,ee,d,!1)}})}catch(fe){return{type:"error",error:fe,partialMatches:$}}finally{ne&&!U.aborted&&(y=[...y])}if(U.aborted)return{type:"aborted"};let ie=xl(I,D,m),te=null;if(ie){if(Object.keys(ie[0].params).length===0)return{type:"success",matches:ie};if(te=$i(I,D,m,!0),!(te&&$.lengthU.route.id===D[V].route.id)}function yu(E){h={},p=tu(E,d,void 0,h)}function vu(E,D,U=!1){let V=p==null;fy(E,D,p||y,h,d,U),V&&(y=[...y],vt({}))}return K={get basename(){return m},get future(){return b},get state(){return x},get routes(){return y},get window(){return i},initialize:zl,subscribe:$n,enableScrollRestoration:sn,navigate:un,fetch:Kr,revalidate:Wn,createHref:E=>l.history.createHref(E),encodeLocation:E=>l.history.encodeLocation(E),getFetcher:fu,resetFetcher:Zr,deleteFetcher:_t,dispose:nn,getBlocker:Jr,deleteBlocker:_l,patchRoutes:vu,_internalFetchControllers:ue,_internalSetRoutes:yu,_internalSetStateDoNotUseOrYouWillBreakYourApp(E){vt(E)}},l.unstable_instrumentations&&(K=lb(K,l.unstable_instrumentations.map(E=>E.router).filter(Boolean))),K}function yb(l){return l!=null&&("formData"in l&&l.formData!=null||"body"in l&&l.body!==void 0)}function So(l,i,s,c,o,d){let h,y;if(o){h=[];for(let m of i)if(h.push(m),m.route.id===o){y=m;break}}else h=i,y=i[i.length-1];let p=nu(c||".",Qr(h),ca(l.pathname,s)||l.pathname,d==="path");if(c==null&&(p.search=l.search,p.hash=l.hash),(c==null||c===""||c===".")&&y){let m=Ho(p.search);if(y.route.index&&!m)p.search=p.search?p.search.replace(/^\?/,"?index&"):"?index";else if(!y.route.index&&m){let g=new URLSearchParams(p.search),b=g.getAll("index");g.delete("index"),b.filter(A=>A).forEach(A=>g.append("index",A));let z=g.toString();p.search=z?`?${z}`:""}}return s!=="/"&&(p.pathname=W0({basename:s,pathname:p.pathname})),Da(p)}function cy(l,i,s){if(!s||!yb(s))return{path:i};if(s.formMethod&&!wb(s.formMethod))return{path:i,error:ra(405,{method:s.formMethod})};let c=()=>({path:i,error:ra(400,{type:"invalid-body"})}),d=(s.formMethod||"get").toUpperCase(),h=dv(i);if(s.body!==void 0){if(s.formEncType==="text/plain"){if(!Ct(d))return c();let b=typeof s.body=="string"?s.body:s.body instanceof FormData||s.body instanceof URLSearchParams?Array.from(s.body.entries()).reduce((z,[A,H])=>`${z}${A}=${H} `,""):String(s.body);return{path:i,submission:{formMethod:d,formAction:h,formEncType:s.formEncType,formData:void 0,json:void 0,text:b}}}else if(s.formEncType==="application/json"){if(!Ct(d))return c();try{let b=typeof s.body=="string"?JSON.parse(s.body):s.body;return{path:i,submission:{formMethod:d,formAction:h,formEncType:s.formEncType,formData:void 0,json:b,text:void 0}}}catch{return c()}}}Me(typeof FormData=="function","FormData is not available in this environment");let y,p;if(s.formData)y=Ro(s.formData),p=s.formData;else if(s.body instanceof FormData)y=Ro(s.body),p=s.body;else if(s.body instanceof URLSearchParams)y=s.body,p=py(y);else if(s.body==null)y=new URLSearchParams,p=new FormData;else try{y=new URLSearchParams(s.body),p=py(y)}catch{return c()}let m={formMethod:d,formAction:h,formEncType:s&&s.formEncType||"application/x-www-form-urlencoded",formData:p,json:void 0,text:void 0};if(Ct(m.formMethod))return{path:i,submission:m};let g=Aa(i);return l&&g.search&&Ho(g.search)&&y.append("index",""),g.search=`?${y}`,{path:Da(g),submission:m}}function oy(l,i,s,c,o,d,h,y,p,m,g,b,z,A,H,q,Y,W,k,F,ye){let ce=F?kt(F[1])?F[1].error:F[1].data:void 0,be=o.createURL(d.location),K=o.createURL(p),x;if(g&&d.errors){let pe=Object.keys(d.errors)[0];x=h.findIndex(N=>N.route.id===pe)}else if(F&&kt(F[1])){let pe=F[0];x=h.findIndex(N=>N.route.id===pe)-1}let ve=F?F[1].statusCode:void 0,Oe=ve&&ve>=400,Qe={currentUrl:be,currentParams:d.matches[0]?.params||{},nextUrl:K,nextParams:h[0].params,...y,actionResult:ce,actionStatus:ve},me=uu(h),Ze=h.map((pe,N)=>{let{route:Z}=pe,le=null;if(x!=null&&N>x)le=!1;else if(Z.lazy)le=!0;else if(!No(Z))le=!1;else if(g){let{shouldLoad:Q}=iv(Z,d.loaderData,d.errors);le=Q}else vb(d.loaderData,d.matches[N],pe)&&(le=!0);if(le!==null)return Eo(s,c,l,p,me,pe,m,i,le);let ue=!1;typeof ye=="boolean"?ue=ye:Oe?ue=!1:(b||be.pathname+be.search===K.pathname+K.search||be.search!==K.search||pb(d.matches[N],pe))&&(ue=!0);let Re={...Qe,defaultShouldRevalidate:ue},R=Wi(pe,Re);return Eo(s,c,l,p,me,pe,m,i,R,Re,ye)}),Ue=[];return H.forEach((pe,N)=>{if(g||!h.some(P=>P.route.id===pe.routeId)||A.has(N))return;let Z=d.fetchers.get(N),le=Z&&Z.state!=="idle"&&Z.data===void 0,ue=xl(Y,pe.path,W);if(!ue){if(k&&le)return;Ue.push({key:N,routeId:pe.routeId,path:pe.path,matches:null,match:null,request:null,controller:null});return}if(q.has(N))return;let Re=Ur(ue,pe.path),R=new AbortController,Q=Vn(o,pe.path,R.signal),J=null;if(z.has(N))z.delete(N),J=Jn(s,c,Q,pe.path,ue,Re,m,i);else if(le)b&&(J=Jn(s,c,Q,pe.path,ue,Re,m,i));else{let P;typeof ye=="boolean"?P=ye:Oe?P=!1:P=b;let de={...Qe,defaultShouldRevalidate:P};Wi(Re,de)&&(J=Jn(s,c,Q,pe.path,ue,Re,m,i,de))}J&&Ue.push({key:N,routeId:pe.routeId,path:pe.path,matches:J,match:Re,request:Q,controller:R})}),{dsMatches:Ze,revalidatingFetchers:Ue}}function No(l){return l.loader!=null||l.middleware!=null&&l.middleware.length>0}function iv(l,i,s){if(l.lazy)return{shouldLoad:!0,renderFallback:!0};if(!No(l))return{shouldLoad:!1,renderFallback:!1};let c=i!=null&&l.id in i,o=s!=null&&s[l.id]!==void 0;if(!c&&o)return{shouldLoad:!1,renderFallback:!1};if(typeof l.loader=="function"&&l.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!c};let d=!c&&!o;return{shouldLoad:d,renderFallback:d}}function vb(l,i,s){let c=!i||s.route.id!==i.route.id,o=!l.hasOwnProperty(s.route.id);return c||o}function pb(l,i){let s=l.route.path;return l.pathname!==i.pathname||s!=null&&s.endsWith("*")&&l.params["*"]!==i.params["*"]}function Wi(l,i){if(l.route.shouldRevalidate){let s=l.route.shouldRevalidate(i);if(typeof s=="boolean")return s}return i.defaultShouldRevalidate}function fy(l,i,s,c,o,d){let h;if(l){let m=c[l];Me(m,`No route found to patch children into: routeId = ${l}`),m.children||(m.children=[]),h=m.children}else h=s;let y=[],p=[];if(i.forEach(m=>{let g=h.find(b=>uv(m,b));g?p.push({existingRoute:g,newRoute:m}):y.push(m)}),y.length>0){let m=tu(y,o,[l||"_","patch",String(h?.length||"0")],c);h.push(...m)}if(d&&p.length>0)for(let m=0;mi.children?.some(o=>uv(s,o)))??!1:!1}var dy=new WeakMap,rv=({key:l,route:i,manifest:s,mapRouteProperties:c})=>{let o=s[i.id];if(Me(o,"No route found in manifest"),!o.lazy||typeof o.lazy!="object")return;let d=o.lazy[l];if(!d)return;let h=dy.get(o);h||(h={},dy.set(o,h));let y=h[l];if(y)return y;let p=(async()=>{let m=w0(l),b=o[l]!==void 0&&l!=="hasErrorBoundary";if(m)st(!m,"Route property "+l+" is not a supported lazy route property. This property will be ignored."),h[l]=Promise.resolve();else if(b)st(!1,`Route "${o.id}" has a static property "${l}" defined. The lazy property will be ignored.`);else{let z=await d();z!=null&&(Object.assign(o,{[l]:z}),Object.assign(o,c(o)))}typeof o.lazy=="object"&&(o.lazy[l]=void 0,Object.values(o.lazy).every(z=>z===void 0)&&(o.lazy=void 0))})();return h[l]=p,p},hy=new WeakMap;function gb(l,i,s,c,o){let d=s[l.id];if(Me(d,"No route found in manifest"),!l.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof l.lazy=="function"){let g=hy.get(d);if(g)return{lazyRoutePromise:g,lazyHandlerPromise:g};let b=(async()=>{Me(typeof l.lazy=="function","No lazy route function found");let z=await l.lazy(),A={};for(let H in z){let q=z[H];if(q===void 0)continue;let Y=L0(H),k=d[H]!==void 0&&H!=="hasErrorBoundary";Y?st(!Y,"Route property "+H+" is not a supported property to be returned from a lazy route function. This property will be ignored."):k?st(!k,`Route "${d.id}" has a static property "${H}" defined but its lazy function is also returning a value for this property. The lazy route property "${H}" will be ignored.`):A[H]=q}Object.assign(d,A),Object.assign(d,{...c(d),lazy:void 0})})();return hy.set(d,b),b.catch(()=>{}),{lazyRoutePromise:b,lazyHandlerPromise:b}}let h=Object.keys(l.lazy),y=[],p;for(let g of h){if(o&&o.includes(g))continue;let b=rv({key:g,route:l,manifest:s,mapRouteProperties:c});b&&(y.push(b),g===i&&(p=b))}let m=y.length>0?Promise.all(y).then(()=>{}):void 0;return m?.catch(()=>{}),p?.catch(()=>{}),{lazyRoutePromise:m,lazyHandlerPromise:p}}async function my(l){let i=l.matches.filter(o=>o.shouldLoad),s={};return(await Promise.all(i.map(o=>o.resolve()))).forEach((o,d)=>{s[i[d].route.id]=o}),s}async function bb(l){return l.matches.some(i=>i.route.middleware)?sv(l,()=>my(l)):my(l)}function sv(l,i){return Sb(l,i,c=>{if(Ub(c))throw c;return c},Cb,s);function s(c,o,d){if(d)return Promise.resolve(Object.assign(d.value,{[o]:{type:"error",result:c}}));{let{matches:h}=l,y=Math.min(Math.max(h.findIndex(m=>m.route.id===o),0),Math.max(h.findIndex(m=>m.shouldCallHandler()),0)),p=Dl(h,h[y].route.id).route.id;return Promise.resolve({[p]:{type:"error",result:c}})}}}async function Sb(l,i,s,c,o){let{matches:d,...h}=l,y=d.flatMap(m=>m.route.middleware?m.route.middleware.map(g=>[m.route.id,g]):[]);return await cv(h,y,i,s,c,o)}async function cv(l,i,s,c,o,d,h=0){let{request:y}=l;if(y.signal.aborted)throw y.signal.reason??new Error(`Request aborted: ${y.method} ${y.url}`);let p=i[h];if(!p)return await s();let[m,g]=p,b,z=async()=>{if(b)throw new Error("You may only call `next()` once per middleware");try{return b={value:await cv(l,i,s,c,o,d,h+1)},b.value}catch(A){return b={value:await d(A,m,b)},b.value}};try{let A=await g(l,z),H=A!=null?c(A):void 0;return o(H)?H:b?H??b.value:(b={value:await z()},b.value)}catch(A){return await d(A,m,b)}}function ov(l,i,s,c,o){let d=rv({key:"middleware",route:c.route,manifest:i,mapRouteProperties:l}),h=gb(c.route,Ct(s.method)?"action":"loader",i,l,o);return{middleware:d,route:h.lazyRoutePromise,handler:h.lazyHandlerPromise}}function Eo(l,i,s,c,o,d,h,y,p,m=null,g){let b=!1,z=ov(l,i,s,d,h);return{...d,_lazyPromises:z,shouldLoad:p,shouldRevalidateArgs:m,shouldCallHandler(A){return b=!0,m?typeof g=="boolean"?Wi(d,{...m,defaultShouldRevalidate:g}):typeof A=="boolean"?Wi(d,{...m,defaultShouldRevalidate:A}):Wi(d,m):p},resolve(A){let{lazy:H,loader:q,middleware:Y}=d.route,W=b||p||A&&!Ct(s.method)&&(H||q),k=Y&&Y.length>0&&!q&&!H;return W&&(Ct(s.method)||!k)?Rb({request:s,path:c,unstable_pattern:o,match:d,lazyHandlerPromise:z?.handler,lazyRoutePromise:z?.route,handlerOverride:A,scopedContext:y}):Promise.resolve({type:"data",result:void 0})}}}function Jn(l,i,s,c,o,d,h,y,p=null){return o.map(m=>m.route.id!==d.route.id?{...m,shouldLoad:!1,shouldRevalidateArgs:p,shouldCallHandler:()=>!1,_lazyPromises:ov(l,i,s,m,h),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Eo(l,i,s,c,uu(o),m,h,y,!0,p))}async function Eb(l,i,s,c,o,d,h){c.some(g=>g._lazyPromises?.middleware)&&await Promise.all(c.map(g=>g._lazyPromises?.middleware));let y={request:i,unstable_url:fv(i,s),unstable_pattern:uu(c),params:c[0].params,context:d,matches:c},m=await l({...y,fetcherKey:o,runClientMiddleware:g=>{let b=y;return sv(b,()=>g({...b,fetcherKey:o,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(c.flatMap(g=>[g._lazyPromises?.handler,g._lazyPromises?.route]))}catch{}return m}async function Rb({request:l,path:i,unstable_pattern:s,match:c,lazyHandlerPromise:o,lazyRoutePromise:d,handlerOverride:h,scopedContext:y}){let p,m,g=Ct(l.method),b=g?"action":"loader",z=A=>{let H,q=new Promise((k,F)=>H=F);m=()=>H(),l.signal.addEventListener("abort",m);let Y=k=>typeof A!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${b}" [routeId: ${c.route.id}]`)):A({request:l,unstable_url:fv(l,i),unstable_pattern:s,params:c.params,context:y},...k!==void 0?[k]:[]),W=(async()=>{try{return{type:"data",result:await(h?h(F=>Y(F)):Y())}}catch(k){return{type:"error",result:k}}})();return Promise.race([W,q])};try{let A=g?c.route.action:c.route.loader;if(o||d)if(A){let H,[q]=await Promise.all([z(A).catch(Y=>{H=Y}),o,d]);if(H!==void 0)throw H;p=q}else{await o;let H=g?c.route.action:c.route.loader;if(H)[p]=await Promise.all([z(H),d]);else if(b==="action"){let q=new URL(l.url),Y=q.pathname+q.search;throw ra(405,{method:l.method,pathname:Y,routeId:c.route.id})}else return{type:"data",result:void 0}}else if(A)p=await z(A);else{let H=new URL(l.url),q=H.pathname+H.search;throw ra(404,{pathname:q})}}catch(A){return{type:"error",result:A}}finally{m&&l.signal.removeEventListener("abort",m)}return p}async function Tb(l){let i=l.headers.get("Content-Type");return i&&/\bapplication\/json\b/.test(i)?l.body==null?null:l.json():l.text()}async function Ob(l){let{result:i,type:s}=l;if(Lo(i)){let c;try{c=await Tb(i)}catch(o){return{type:"error",error:o}}return s==="error"?{type:"error",error:new iu(i.status,i.statusText,c),statusCode:i.status,headers:i.headers}:{type:"data",data:c,statusCode:i.status,headers:i.headers}}return s==="error"?Ey(i)?i.data instanceof Error?{type:"error",error:i.data,statusCode:i.init?.status,headers:i.init?.headers?new Headers(i.init.headers):void 0}:{type:"error",error:Ab(i),statusCode:au(i)?i.status:void 0,headers:i.init?.headers?new Headers(i.init.headers):void 0}:{type:"error",error:i,statusCode:au(i)?i.status:void 0}:Ey(i)?{type:"data",data:i.data,statusCode:i.init?.status,headers:i.init?.headers?new Headers(i.init.headers):void 0}:{type:"data",data:i}}function Mb(l,i,s,c,o){let d=l.headers.get("Location");if(Me(d,"Redirects returned/thrown from loaders/actions must have a Location header"),!wo(d)){let h=c.slice(0,c.findIndex(y=>y.route.id===s)+1);d=So(new URL(i.url),h,o,d),l.headers.set("Location",d)}return l}var yy=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function vy(l,i,s,c){if(wo(l)){let o=l,d=o.startsWith("//")?new URL(i.protocol+o):new URL(o);if(yy.includes(d.protocol))throw new Error("Invalid redirect location");let h=ca(d.pathname,s)!=null;if(d.origin===i.origin&&h)return d.pathname+d.search+d.hash}try{let o=c.createURL(l);if(yy.includes(o.protocol))throw new Error("Invalid redirect location")}catch{}return l}function Vn(l,i,s,c){let o=l.createURL(dv(i)).toString(),d={signal:s};if(c&&Ct(c.formMethod)){let{formMethod:h,formEncType:y}=c;d.method=h.toUpperCase(),y==="application/json"?(d.headers=new Headers({"Content-Type":y}),d.body=JSON.stringify(c.json)):y==="text/plain"?d.body=c.text:y==="application/x-www-form-urlencoded"&&c.formData?d.body=Ro(c.formData):d.body=c.formData}return new Request(o,d)}function fv(l,i){let s=new URL(l.url),c=typeof i=="string"?Aa(i):i;if(s.pathname=c.pathname||"/",c.search){let o=new URLSearchParams(c.search),d=o.getAll("index");o.delete("index");for(let h of d.filter(Boolean))o.append("index",h);s.search=o.size?`?${o.toString()}`:""}else s.search="";return s.hash=c.hash||"",s}function Ro(l){let i=new URLSearchParams;for(let[s,c]of l.entries())i.append(s,typeof c=="string"?c:c.name);return i}function py(l){let i=new FormData;for(let[s,c]of l.entries())i.append(s,c);return i}function xb(l,i,s,c=!1,o=!1){let d={},h=null,y,p=!1,m={},g=s&&kt(s[1])?s[1].error:void 0;return l.forEach(b=>{if(!(b.route.id in i))return;let z=b.route.id,A=i[z];if(Me(!Pl(A),"Cannot handle redirect results in processLoaderData"),kt(A)){let H=A.error;if(g!==void 0&&(H=g,g=void 0),h=h||{},o)h[z]=H;else{let q=Dl(l,z);h[q.route.id]==null&&(h[q.route.id]=H)}c||(d[z]=nv),p||(p=!0,y=au(A.error)?A.error.status:500),A.headers&&(m[z]=A.headers)}else d[z]=A.data,A.statusCode&&A.statusCode!==200&&!p&&(y=A.statusCode),A.headers&&(m[z]=A.headers)}),g!==void 0&&s&&(h={[s[0]]:g},s[2]&&(d[s[2]]=void 0)),{loaderData:d,errors:h,statusCode:y||200,loaderHeaders:m}}function gy(l,i,s,c,o,d){let{loaderData:h,errors:y}=xb(i,s,c);return o.filter(p=>!p.matches||p.matches.some(m=>m.shouldLoad)).forEach(p=>{let{key:m,match:g,controller:b}=p;if(b&&b.signal.aborted)return;let z=d[m];if(Me(z,"Did not find corresponding fetcher result"),kt(z)){let A=Dl(l.matches,g?.route.id);y&&y[A.route.id]||(y={...y,[A.route.id]:z.error}),l.fetchers.delete(m)}else if(Pl(z))Me(!1,"Unhandled fetcher revalidation redirect");else{let A=$a(z.data);l.fetchers.set(m,A)}}),{loaderData:h,errors:y}}function by(l,i,s,c){let o=Object.entries(i).filter(([,d])=>d!==nv).reduce((d,[h,y])=>(d[h]=y,d),{});for(let d of s){let h=d.route.id;if(!i.hasOwnProperty(h)&&l.hasOwnProperty(h)&&d.route.loader&&(o[h]=l[h]),c&&c.hasOwnProperty(h))break}return o}function Sy(l){return l?kt(l[1])?{actionData:{}}:{actionData:{[l[0]]:l[1].data}}:{}}function Dl(l,i){return(i?l.slice(0,l.findIndex(c=>c.route.id===i)+1):[...l]).reverse().find(c=>c.route.hasErrorBoundary===!0)||l[0]}function Cr(l){let i=l.length===1?l[0]:l.find(s=>s.index||!s.path||s.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:i}],route:i}}function ra(l,{pathname:i,routeId:s,method:c,type:o,message:d}={}){let h="Unknown Server Error",y="Unknown @remix-run/router error";return l===400?(h="Bad Request",c&&i&&s?y=`You made a ${c} request to "${i}" but did not provide a \`loader\` for route "${s}", so there is no way to handle the request.`:o==="invalid-body"&&(y="Unable to encode submission body")):l===403?(h="Forbidden",y=`Route "${s}" does not match URL "${i}"`):l===404?(h="Not Found",y=`No route matches URL "${i}"`):l===405&&(h="Method Not Allowed",c&&i&&s?y=`You made a ${c.toUpperCase()} request to "${i}" but did not provide an \`action\` for route "${s}", so there is no way to handle the request.`:c&&(y=`Invalid request method "${c.toUpperCase()}"`)),new iu(l||500,h,new Error(y),!0)}function zr(l){let i=Object.entries(l);for(let s=i.length-1;s>=0;s--){let[c,o]=i[s];if(Pl(o))return{key:c,result:o}}}function dv(l){let i=typeof l=="string"?Aa(l):l;return Da({...i,hash:""})}function Db(l,i){return l.pathname!==i.pathname||l.search!==i.search?!1:l.hash===""?i.hash!=="":l.hash===i.hash?!0:i.hash!==""}function Ab(l){return new iu(l.init?.status??500,l.init?.statusText??"Internal Server Error",l.data)}function Cb(l){return l!=null&&typeof l=="object"&&Object.entries(l).every(([i,s])=>typeof i=="string"&&zb(s))}function zb(l){return l!=null&&typeof l=="object"&&"type"in l&&"result"in l&&(l.type==="data"||l.type==="error")}function _b(l){return Lo(l.result)&&av.has(l.result.status)}function kt(l){return l.type==="error"}function Pl(l){return(l&&l.type)==="redirect"}function Ey(l){return typeof l=="object"&&l!=null&&"type"in l&&"data"in l&&"init"in l&&l.type==="DataWithResponseInit"}function Lo(l){return l!=null&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.headers=="object"&&typeof l.body<"u"}function jb(l){return av.has(l)}function Ub(l){return Lo(l)&&jb(l.status)&&l.headers.has("Location")}function wb(l){return ob.has(l.toUpperCase())}function Ct(l){return sb.has(l.toUpperCase())}function Ho(l){return new URLSearchParams(l).getAll("index").some(i=>i==="")}function Ur(l,i){let s=typeof i=="string"?Aa(i).search:i.search;if(l[l.length-1].route.index&&Ho(s||""))return l[l.length-1];let c=Wy(l);return c[c.length-1]}function Ry(l){let{formMethod:i,formAction:s,formEncType:c,text:o,formData:d,json:h}=l;if(!(!i||!s||!c)){if(o!=null)return{formMethod:i,formAction:s,formEncType:c,formData:void 0,json:void 0,text:o};if(d!=null)return{formMethod:i,formAction:s,formEncType:c,formData:d,json:void 0,text:void 0};if(h!==void 0)return{formMethod:i,formAction:s,formEncType:c,formData:void 0,json:h,text:void 0}}}function oo(l,i){return i?{state:"loading",location:l,formMethod:i.formMethod,formAction:i.formAction,formEncType:i.formEncType,formData:i.formData,json:i.json,text:i.text}:{state:"loading",location:l,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Nb(l,i){return{state:"submitting",location:l,formMethod:i.formMethod,formAction:i.formAction,formEncType:i.formEncType,formData:i.formData,json:i.json,text:i.text}}function Zi(l,i){return l?{state:"loading",formMethod:l.formMethod,formAction:l.formAction,formEncType:l.formEncType,formData:l.formData,json:l.json,text:l.text,data:i}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:i}}function Lb(l,i){return{state:"submitting",formMethod:l.formMethod,formAction:l.formAction,formEncType:l.formEncType,formData:l.formData,json:l.json,text:l.text,data:i?i.data:void 0}}function $a(l){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:l}}function Hb(l,i){try{let s=l.sessionStorage.getItem(lv);if(s){let c=JSON.parse(s);for(let[o,d]of Object.entries(c||{}))d&&Array.isArray(d)&&i.set(o,new Set(d||[]))}}catch{}}function Bb(l,i){if(i.size>0){let s={};for(let[c,o]of i)s[c]=[...o];try{l.sessionStorage.setItem(lv,JSON.stringify(s))}catch(c){st(!1,`Failed to save applied view transitions in sessionStorage (${c}).`)}}}function Ty(){let l,i,s=new Promise((c,o)=>{l=async d=>{c(d);try{await s}catch{}},i=async d=>{o(d);try{await s}catch{}}});return{promise:s,resolve:l,reject:i}}var ln=M.createContext(null);ln.displayName="DataRouter";var ru=M.createContext(null);ru.displayName="DataRouterState";var hv=M.createContext(!1);function mv(){return M.useContext(hv)}var Bo=M.createContext({isTransitioning:!1});Bo.displayName="ViewTransition";var yv=M.createContext(new Map);yv.displayName="Fetchers";var qb=M.createContext(null);qb.displayName="Await";var $t=M.createContext(null);$t.displayName="Navigation";var Yr=M.createContext(null);Yr.displayName="Location";var oa=M.createContext({outlet:null,matches:[],isDataRoute:!1});oa.displayName="Route";var qo=M.createContext(null);qo.displayName="RouteError";var vv="REACT_ROUTER_ERROR",Qb="REDIRECT",Yb="ROUTE_ERROR_RESPONSE";function Gb(l){if(l.startsWith(`${vv}:${Qb}:{`))try{let i=JSON.parse(l.slice(28));if(typeof i=="object"&&i&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.location=="string"&&typeof i.reloadDocument=="boolean"&&typeof i.replace=="boolean")return i}catch{}}function Xb(l){if(l.startsWith(`${vv}:${Yb}:{`))try{let i=JSON.parse(l.slice(40));if(typeof i=="object"&&i&&typeof i.status=="number"&&typeof i.statusText=="string")return new iu(i.status,i.statusText,i.data)}catch{}}function Kb(l,{relative:i}={}){Me(kn(),"useHref() may be used only in the context of a component.");let{basename:s,navigator:c}=M.useContext($t),{hash:o,pathname:d,search:h}=cu(l,{relative:i}),y=d;return s!=="/"&&(y=d==="/"?s:ga([s,d])),c.createHref({pathname:y,search:h,hash:o})}function kn(){return M.useContext(Yr)!=null}function fa(){return Me(kn(),"useLocation() may be used only in the context of a component."),M.useContext(Yr).location}var pv="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function gv(l){M.useContext($t).static||M.useLayoutEffect(l)}function su(){let{isDataRoute:l}=M.useContext(oa);return l?uS():Vb()}function Vb(){Me(kn(),"useNavigate() may be used only in the context of a component.");let l=M.useContext(ln),{basename:i,navigator:s}=M.useContext($t),{matches:c}=M.useContext(oa),{pathname:o}=fa(),d=JSON.stringify(Qr(c)),h=M.useRef(!1);return gv(()=>{h.current=!0}),M.useCallback((p,m={})=>{if(st(h.current,pv),!h.current)return;if(typeof p=="number"){s.go(p);return}let g=nu(p,JSON.parse(d),o,m.relative==="path");l==null&&i!=="/"&&(g.pathname=g.pathname==="/"?i:ga([i,g.pathname])),(m.replace?s.replace:s.push)(g,m.state,m)},[i,s,d,o,l])}var Zb=M.createContext(null);function Jb(l){let i=M.useContext(oa).outlet;return M.useMemo(()=>i&&M.createElement(Zb.Provider,{value:l},i),[i,l])}function Fb(){let{matches:l}=M.useContext(oa),i=l[l.length-1];return i?i.params:{}}function cu(l,{relative:i}={}){let{matches:s}=M.useContext(oa),{pathname:c}=fa(),o=JSON.stringify(Qr(s));return M.useMemo(()=>nu(l,JSON.parse(o),c,i==="path"),[l,o,c,i])}function kb(l,i,s){Me(kn(),"useRoutes() may be used only in the context of a component.");let{navigator:c}=M.useContext($t),{matches:o}=M.useContext(oa),d=o[o.length-1],h=d?d.params:{},y=d?d.pathname:"/",p=d?d.pathnameBase:"/",m=d&&d.route;{let Y=m&&m.path||"";Sv(y,!m||Y.endsWith("*")||Y.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${y}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. Please change the parent to .`)}let g=fa(),b;b=g;let z=b.pathname||"/",A=z;if(p!=="/"){let Y=p.replace(/^\//,"").split("/");A="/"+z.replace(/^\//,"").split("/").slice(Y.length).join("/")}let H=xl(l,{pathname:A});return st(m||H!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),st(H==null||H[H.length-1].route.element!==void 0||H[H.length-1].route.Component!==void 0||H[H.length-1].route.lazy!==void 0,`Matched leaf route at location "${b.pathname}${b.search}${b.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`),eS(H&&H.map(Y=>Object.assign({},Y,{params:Object.assign({},h,Y.params),pathname:ga([p,c.encodeLocation?c.encodeLocation(Y.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:Y.pathname]),pathnameBase:Y.pathnameBase==="/"?p:ga([p,c.encodeLocation?c.encodeLocation(Y.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:Y.pathnameBase])})),o,s)}function $b(){let l=iS(),i=au(l)?`${l.status} ${l.statusText}`:l instanceof Error?l.message:JSON.stringify(l),s=l instanceof Error?l.stack:null,c="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:c},d={padding:"2px 4px",backgroundColor:c},h=null;return console.error("Error handled by React Router default ErrorBoundary:",l),h=M.createElement(M.Fragment,null,M.createElement("p",null,"💿 Hey developer 👋"),M.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",M.createElement("code",{style:d},"ErrorBoundary")," or"," ",M.createElement("code",{style:d},"errorElement")," prop on your route.")),M.createElement(M.Fragment,null,M.createElement("h2",null,"Unexpected Application Error!"),M.createElement("h3",{style:{fontStyle:"italic"}},i),s?M.createElement("pre",{style:o},s):null,h)}var Wb=M.createElement($b,null),bv=class extends M.Component{constructor(l){super(l),this.state={location:l.location,revalidation:l.revalidation,error:l.error}}static getDerivedStateFromError(l){return{error:l}}static getDerivedStateFromProps(l,i){return i.location!==l.location||i.revalidation!=="idle"&&l.revalidation==="idle"?{error:l.error,location:l.location,revalidation:l.revalidation}:{error:l.error!==void 0?l.error:i.error,location:i.location,revalidation:l.revalidation||i.revalidation}}componentDidCatch(l,i){this.props.onError?this.props.onError(l,i):console.error("React Router caught the following error during render",l)}render(){let l=this.state.error;if(this.context&&typeof l=="object"&&l&&"digest"in l&&typeof l.digest=="string"){const s=Xb(l.digest);s&&(l=s)}let i=l!==void 0?M.createElement(oa.Provider,{value:this.props.routeContext},M.createElement(qo.Provider,{value:l,children:this.props.component})):this.props.children;return this.context?M.createElement(Pb,{error:l},i):i}};bv.contextType=hv;var fo=new WeakMap;function Pb({children:l,error:i}){let{basename:s}=M.useContext($t);if(typeof i=="object"&&i&&"digest"in i&&typeof i.digest=="string"){let c=Gb(i.digest);if(c){let o=fo.get(i);if(o)throw o;let d=Iy(c.location,s);if(Py&&!fo.get(i))if(d.isExternal||c.reloadDocument)window.location.href=d.absoluteURL||d.to;else{const h=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(d.to,{replace:c.replace}));throw fo.set(i,h),h}return M.createElement("meta",{httpEquiv:"refresh",content:`0;url=${d.absoluteURL||d.to}`})}}return l}function Ib({routeContext:l,match:i,children:s}){let c=M.useContext(ln);return c&&c.static&&c.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(c.staticContext._deepestRenderedBoundaryId=i.route.id),M.createElement(oa.Provider,{value:l},s)}function eS(l,i=[],s){let c=s?.state;if(l==null){if(!c)return null;if(c.errors)l=c.matches;else if(i.length===0&&!c.initialized&&c.matches.length>0)l=c.matches;else return null}let o=l,d=c?.errors;if(d!=null){let g=o.findIndex(b=>b.route.id&&d?.[b.route.id]!==void 0);Me(g>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(d).join(",")}`),o=o.slice(0,Math.min(o.length,g+1))}let h=!1,y=-1;if(s&&c){h=c.renderFallback;for(let g=0;g=0?o=o.slice(0,y+1):o=[o[0]];break}}}}let p=s?.onError,m=c&&p?(g,b)=>{p(g,{location:c.location,params:c.matches?.[0]?.params??{},unstable_pattern:uu(c.matches),errorInfo:b})}:void 0;return o.reduceRight((g,b,z)=>{let A,H=!1,q=null,Y=null;c&&(A=d&&b.route.id?d[b.route.id]:void 0,q=b.route.errorElement||Wb,h&&(y<0&&z===0?(Sv("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),H=!0,Y=null):y===z&&(H=!0,Y=b.route.hydrateFallbackElement||null)));let W=i.concat(o.slice(0,z+1)),k=()=>{let F;return A?F=q:H?F=Y:b.route.Component?F=M.createElement(b.route.Component,null):b.route.element?F=b.route.element:F=g,M.createElement(Ib,{match:b,routeContext:{outlet:g,matches:W,isDataRoute:c!=null},children:F})};return c&&(b.route.ErrorBoundary||b.route.errorElement||z===0)?M.createElement(bv,{location:c.location,revalidation:c.revalidation,component:q,error:A,children:k(),routeContext:{outlet:null,matches:W,isDataRoute:!0},onError:m}):k()},null)}function Qo(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function tS(l){let i=M.useContext(ln);return Me(i,Qo(l)),i}function aS(l){let i=M.useContext(ru);return Me(i,Qo(l)),i}function lS(l){let i=M.useContext(oa);return Me(i,Qo(l)),i}function Yo(l){let i=lS(l),s=i.matches[i.matches.length-1];return Me(s.route.id,`${l} can only be used on routes that contain a unique "id"`),s.route.id}function nS(){return Yo("useRouteId")}function iS(){let l=M.useContext(qo),i=aS("useRouteError"),s=Yo("useRouteError");return l!==void 0?l:i.errors?.[s]}function uS(){let{router:l}=tS("useNavigate"),i=Yo("useNavigate"),s=M.useRef(!1);return gv(()=>{s.current=!0}),M.useCallback(async(o,d={})=>{st(s.current,pv),s.current&&(typeof o=="number"?await l.navigate(o):await l.navigate(o,{fromRouteId:i,...d}))},[l,i])}var Oy={};function Sv(l,i,s){!i&&!Oy[l]&&(Oy[l]=!0,st(!1,s))}var My={};function xy(l,i){!l&&!My[i]&&(My[i]=!0,console.warn(i))}var rS="useOptimistic",Dy=c0[rS],sS=()=>{};function cS(l){return Dy?Dy(l):[l,sS]}function oS(l){let i={hasErrorBoundary:l.hasErrorBoundary||l.ErrorBoundary!=null||l.errorElement!=null};return l.Component&&(l.element&&st(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(i,{element:M.createElement(l.Component),Component:void 0})),l.HydrateFallback&&(l.hydrateFallbackElement&&st(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(i,{hydrateFallbackElement:M.createElement(l.HydrateFallback),HydrateFallback:void 0})),l.ErrorBoundary&&(l.errorElement&&st(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(i,{errorElement:M.createElement(l.ErrorBoundary),ErrorBoundary:void 0})),i}var fS=["HydrateFallback","hydrateFallbackElement"],dS=class{constructor(){this.status="pending",this.promise=new Promise((l,i)=>{this.resolve=s=>{this.status==="pending"&&(this.status="resolved",l(s))},this.reject=s=>{this.status==="pending"&&(this.status="rejected",i(s))}})}};function hS({router:l,flushSync:i,onError:s,unstable_useTransitions:c}){c=mv()||c;let[d,h]=M.useState(l.state),[y,p]=cS(d),[m,g]=M.useState(),[b,z]=M.useState({isTransitioning:!1}),[A,H]=M.useState(),[q,Y]=M.useState(),[W,k]=M.useState(),F=M.useRef(new Map),ye=M.useCallback((x,{deletedFetchers:ve,newErrors:Oe,flushSync:Qe,viewTransitionOpts:me})=>{Oe&&s&&Object.values(Oe).forEach(Ue=>s(Ue,{location:x.location,params:x.matches[0]?.params??{},unstable_pattern:uu(x.matches)})),x.fetchers.forEach((Ue,pe)=>{Ue.data!==void 0&&F.current.set(pe,Ue.data)}),ve.forEach(Ue=>F.current.delete(Ue)),xy(Qe===!1||i!=null,'You provided the `flushSync` option to a router update, but you are not using the `` 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 Ze=l.window!=null&&l.window.document!=null&&typeof l.window.document.startViewTransition=="function";if(xy(me==null||Ze,"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."),!me||!Ze){i&&Qe?i(()=>h(x)):c===!1?h(x):M.startTransition(()=>{c===!0&&p(Ue=>Ay(Ue,x)),h(x)});return}if(i&&Qe){i(()=>{q&&(A?.resolve(),q.skipTransition()),z({isTransitioning:!0,flushSync:!0,currentLocation:me.currentLocation,nextLocation:me.nextLocation})});let Ue=l.window.document.startViewTransition(()=>{i(()=>h(x))});Ue.finished.finally(()=>{i(()=>{H(void 0),Y(void 0),g(void 0),z({isTransitioning:!1})})}),i(()=>Y(Ue));return}q?(A?.resolve(),q.skipTransition(),k({state:x,currentLocation:me.currentLocation,nextLocation:me.nextLocation})):(g(x),z({isTransitioning:!0,flushSync:!1,currentLocation:me.currentLocation,nextLocation:me.nextLocation}))},[l.window,i,q,A,c,p,s]);M.useLayoutEffect(()=>l.subscribe(ye),[l,ye]),M.useEffect(()=>{b.isTransitioning&&!b.flushSync&&H(new dS)},[b]),M.useEffect(()=>{if(A&&m&&l.window){let x=m,ve=A.promise,Oe=l.window.document.startViewTransition(async()=>{c===!1?h(x):M.startTransition(()=>{c===!0&&p(Qe=>Ay(Qe,x)),h(x)}),await ve});Oe.finished.finally(()=>{H(void 0),Y(void 0),g(void 0),z({isTransitioning:!1})}),Y(Oe)}},[m,A,l.window,c,p]),M.useEffect(()=>{A&&m&&y.location.key===m.location.key&&A.resolve()},[A,q,y.location,m]),M.useEffect(()=>{!b.isTransitioning&&W&&(g(W.state),z({isTransitioning:!0,flushSync:!1,currentLocation:W.currentLocation,nextLocation:W.nextLocation}),k(void 0))},[b.isTransitioning,W]);let ce=M.useMemo(()=>({createHref:l.createHref,encodeLocation:l.encodeLocation,go:x=>l.navigate(x),push:(x,ve,Oe)=>l.navigate(x,{state:ve,preventScrollReset:Oe?.preventScrollReset}),replace:(x,ve,Oe)=>l.navigate(x,{replace:!0,state:ve,preventScrollReset:Oe?.preventScrollReset})}),[l]),be=l.basename||"/",K=M.useMemo(()=>({router:l,navigator:ce,static:!1,basename:be,onError:s}),[l,ce,be,s]);return M.createElement(M.Fragment,null,M.createElement(ln.Provider,{value:K},M.createElement(ru.Provider,{value:y},M.createElement(yv.Provider,{value:F.current},M.createElement(Bo.Provider,{value:b},M.createElement(vS,{basename:be,location:y.location,navigationType:y.historyAction,navigator:ce,unstable_useTransitions:c},M.createElement(mS,{routes:l.routes,future:l.future,state:y,isStatic:!1,onError:s})))))),null)}function Ay(l,i){return{...l,navigation:i.navigation.state!=="idle"?i.navigation:l.navigation,revalidation:i.revalidation!=="idle"?i.revalidation:l.revalidation,actionData:i.navigation.state!=="submitting"?i.actionData:l.actionData,fetchers:i.fetchers}}var mS=M.memo(yS);function yS({routes:l,future:i,state:s,isStatic:c,onError:o}){return kb(l,void 0,{state:s,isStatic:c,onError:o})}function To({to:l,replace:i,state:s,relative:c}){Me(kn()," may be used only in the context of a component.");let{static:o}=M.useContext($t);st(!o," must not be used on the initial render in a . This is a no-op, but you should modify your code so the is only ever rendered in response to some user interaction or state change.");let{matches:d}=M.useContext(oa),{pathname:h}=fa(),y=su(),p=nu(l,Qr(d),h,c==="path"),m=JSON.stringify(p);return M.useEffect(()=>{y(JSON.parse(m),{replace:i,state:s,relative:c})},[y,m,c,i,s]),null}function Go(l){return Jb(l.context)}function vS({basename:l="/",children:i=null,location:s,navigationType:c="POP",navigator:o,static:d=!1,unstable_useTransitions:h}){Me(!kn(),"You cannot render a inside another . You should never have more than one in your app.");let y=l.replace(/^\/*/,"/"),p=M.useMemo(()=>({basename:y,navigator:o,static:d,unstable_useTransitions:h,future:{}}),[y,o,d,h]);typeof s=="string"&&(s=Aa(s));let{pathname:m="/",search:g="",hash:b="",state:z=null,key:A="default",unstable_mask:H}=s,q=M.useMemo(()=>{let Y=ca(m,y);return Y==null?null:{location:{pathname:Y,search:g,hash:b,state:z,key:A,unstable_mask:H},navigationType:c}},[y,m,g,b,z,A,c,H]);return st(q!=null,` is not able to match the URL "${m}${g}${b}" because it does not start with the basename, so the won't render anything.`),q==null?null:M.createElement($t.Provider,{value:p},M.createElement(Yr.Provider,{children:i,value:q}))}var wr="get",Nr="application/x-www-form-urlencoded";function Gr(l){return typeof HTMLElement<"u"&&l instanceof HTMLElement}function pS(l){return Gr(l)&&l.tagName.toLowerCase()==="button"}function gS(l){return Gr(l)&&l.tagName.toLowerCase()==="form"}function bS(l){return Gr(l)&&l.tagName.toLowerCase()==="input"}function SS(l){return!!(l.metaKey||l.altKey||l.ctrlKey||l.shiftKey)}function ES(l,i){return l.button===0&&(!i||i==="_self")&&!SS(l)}var _r=null;function RS(){if(_r===null)try{new FormData(document.createElement("form"),0),_r=!1}catch{_r=!0}return _r}var TS=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ho(l){return l!=null&&!TS.has(l)?(st(!1,`"${l}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${Nr}"`),null):l}function OS(l,i){let s,c,o,d,h;if(gS(l)){let y=l.getAttribute("action");c=y?ca(y,i):null,s=l.getAttribute("method")||wr,o=ho(l.getAttribute("enctype"))||Nr,d=new FormData(l)}else if(pS(l)||bS(l)&&(l.type==="submit"||l.type==="image")){let y=l.form;if(y==null)throw new Error('Cannot submit a