db-studio 1.14.1 → 1.14.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/web-dist/assets/{_pathlessLayout-CdSIARYp.js → _pathlessLayout-BHGufnSc.js} +1 -1
- package/dist/web-dist/assets/{_pathlessLayout-BYQmoqT2.js → _pathlessLayout-yNuiTElQ.js} +4 -4
- package/dist/web-dist/assets/{_queryId-IoOxUaz6.js → _queryId-LnHerkD-.js} +1 -1
- package/dist/web-dist/assets/{_table-BI9E6-Je.js → _table-BIRl7wsf.js} +1 -1
- package/dist/web-dist/assets/{_table-ClkqBjYZ.js → _table-DKdWkgl_.js} +1 -1
- package/dist/web-dist/assets/{badge-SEQODpjR.js → badge-D_Kx6BmG.js} +1 -1
- package/dist/web-dist/assets/{browser-CHG4p052.js → browser-LLDBA7Jr.js} +1 -1
- package/dist/web-dist/assets/{bundle-mjs-BZOM22--.js → bundle-mjs-DVXBR05F.js} +1 -1
- package/dist/web-dist/assets/{code-editor-BIfiMFMb.js → code-editor-BpkXdVns.js} +1 -1
- package/dist/web-dist/assets/{database.store-OsasuLJl.js → database.store-Djdh7lNO.js} +1 -1
- package/dist/web-dist/assets/{dist-D_0esNxp.js → dist-C-SdF-L-.js} +1 -1
- package/dist/web-dist/assets/{format-cell-value-D41tFXxV.js → format-cell-value-BtrAFpQa.js} +1 -1
- package/dist/web-dist/assets/{highlighted-body-OFNGDK62-DBl3trdK.js → highlighted-body-OFNGDK62-D860IMcy.js} +1 -1
- package/dist/web-dist/assets/{icons-rRDRsZcq.js → icons-De4HOb_l.js} +1 -1
- package/dist/web-dist/assets/index-DGaShyKg.css +2 -0
- package/dist/web-dist/assets/{index-CJ2YPwW4.js → index-DUbs819O.js} +5 -5
- package/dist/web-dist/assets/{indexes-DMAVA8iJ.js → indexes-Cp3DqRz7.js} +1 -1
- package/dist/web-dist/assets/{logs-DCMuv22K.js → logs-BiM3MAXO.js} +1 -1
- package/dist/web-dist/assets/{mermaid-GHXKKRXX-DJ7TvQxw.js → mermaid-GHXKKRXX-DQBwS7h_.js} +1 -1
- package/dist/web-dist/assets/{middleware-Y6OdmOWR.js → middleware-BbNmPIW8.js} +1 -1
- package/dist/web-dist/assets/{monaco-editor-BO3WVEVM.js → monaco-editor-CNMPKLoW.js} +1 -1
- package/dist/web-dist/assets/{monitoring-BtlIcl3k.js → monitoring-Bv8YDvqU.js} +1 -1
- package/dist/web-dist/assets/{overlay.store-DjYsesE7.js → overlay.store-Cni3_SHg.js} +1 -1
- package/dist/web-dist/assets/{queries.store-CxkLh1ra.js → queries.store-Z6EhVY9R.js} +1 -1
- package/dist/web-dist/assets/{query-runner-keHo7IiI.js → query-runner-CRfNq31h.js} +3 -3
- package/dist/web-dist/assets/{radix-ui-C1Z_SoKk.js → radix-ui-Bk380HgZ.js} +1 -1
- package/dist/web-dist/assets/{react-1gU4DcpZ.js → react-CfXK6joe.js} +1 -1
- package/dist/web-dist/assets/{react-dom-DkH0eaTq.js → react-dom-Y-FhvvJI.js} +1 -1
- package/dist/web-dist/assets/{redis-value-BmLGJf9X.js → redis-value-dNWQPX9M.js} +1 -1
- package/dist/web-dist/assets/{rolldown-runtime-DY1mqKjv.js → rolldown-runtime-BGAbM2vM.js} +1 -1
- package/dist/web-dist/assets/{runner-CvUPs6q4.js → runner-CT8TXCWe.js} +1 -1
- package/dist/web-dist/assets/{schema-C-10JjXl.js → schema--myTsN4I.js} +1 -1
- package/dist/web-dist/assets/schema-Cd61GWLb.js +57 -0
- package/dist/web-dist/assets/{table-C75Kr4aI.js → table-DznwPkbx.js} +1 -1
- package/dist/web-dist/assets/{tanstack-C3XvOIUf.js → tanstack-CJCyKnhp.js} +1 -1
- package/dist/web-dist/assets/{visualizer-CiiH2acP.js → visualizer-CsHwq2yx.js} +1 -1
- package/dist/web-dist/index.html +18 -18
- package/package.json +1 -1
- package/dist/web-dist/assets/index-Be5YdcX5.css +0 -2
- package/dist/web-dist/assets/schema-9nf0q_01.js +0 -57
|
@@ -1 +1 @@
|
|
|
1
|
-
import{kt as n}from"./radix-ui-
|
|
1
|
+
import{kt as n}from"./radix-ui-Bk380HgZ.js";import"./index-DUbs819O.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"db-studio@1.14.2"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="abcdc52d-e4c7-4b50-a583-aab3d884b395",e._sentryDebugIdIdentifier="sentry-dbid-abcdc52d-e4c7-4b50-a583-aab3d884b395")}catch{}})();var d=n();function o(){return(0,d.jsx)("div",{className:"flex-1 flex items-center justify-center",children:"Select a table to view data"})}export{o as component};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as Ei,t as tt}from"./rolldown-runtime-DY1mqKjv.js";import{xt as Cn}from"./icons-rRDRsZcq.js";import{Ot as ha,kt as fa}from"./radix-ui-C1Z_SoKk.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"db-studio@1.14.1"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="a55f6f96-3768-43bc-90cd-676bed02f1f1",e._sentryDebugIdIdentifier="sentry-dbid-a55f6f96-3768-43bc-90cd-676bed02f1f1")}catch{}})();var st=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},pa=class extends st{#t;#e;#s;constructor(){super(),this.#s=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#e||this.setEventListener(this.#s)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(e){this.#s=e,this.#e?.(),this.#e=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#t!==e&&(this.#t=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#t=="boolean"?this.#t:globalThis.document?.visibilityState!=="hidden"}},bn=new pa,ga={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},ma=class{#t=ga;#e=!1;setTimeoutProvider(e){this.#t=e}setTimeout(e,t){return this.#t.setTimeout(e,t)}clearTimeout(e){this.#t.clearTimeout(e)}setInterval(e,t){return this.#t.setInterval(e,t)}clearInterval(e){this.#t.clearInterval(e)}},ke=new ma;function va(e){setTimeout(e,0)}var Sa=typeof window>"u"||"Deno"in globalThis;function q(){}function ya(e,t){return typeof e=="function"?e(t):e}function Hs(e){return typeof e=="number"&&e>=0&&e!==1/0}function _i(e,t){return Math.max(e+(t||0)-Date.now(),0)}function be(e,t){return typeof e=="function"?e(t):e}function J(e,t){return typeof e=="function"?e(t):e}function Wn(e,t){const{type:s="all",exact:n,fetchStatus:r,predicate:i,queryKey:o,stale:a}=e;if(o){if(n){if(t.queryHash!==wn(o,t.options))return!1}else if(!vt(t.queryKey,o))return!1}if(s!=="all"){const u=t.isActive();if(s==="active"&&!u||s==="inactive"&&u)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||r&&r!==t.state.fetchStatus||i&&!i(t))}function Jn(e,t){const{exact:s,status:n,predicate:r,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(s){if(De(t.options.mutationKey)!==De(i))return!1}else if(!vt(t.options.mutationKey,i))return!1}return!(n&&t.state.status!==n||r&&!r(t))}function wn(e,t){return(t?.queryKeyHashFn||De)(e)}function De(e){return JSON.stringify(e,(t,s)=>zs(s)?Object.keys(s).sort().reduce((n,r)=>(n[r]=s[r],n),{}):s)}function vt(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(s=>vt(e[s],t[s])):!1}var Ia=Object.prototype.hasOwnProperty;function Ti(e,t,s=0){if(e===t)return e;if(s>500)return t;const n=Xn(e)&&Xn(t);if(!n&&!(zs(e)&&zs(t)))return t;const r=(n?e:Object.keys(e)).length,i=n?t:Object.keys(t),o=i.length,a=n?new Array(o):{};let u=0;for(let l=0;l<o;l++){const c=n?l:i[l],h=e[c],d=t[c];if(h===d){a[c]=h,(n?l<r:Ia.call(e,c))&&u++;continue}if(h===null||d===null||typeof h!="object"||typeof d!="object"){a[c]=d;continue}const f=Ti(h,d,s+1);a[c]=f,f===h&&u++}return r===o&&u===r?e:a}function Yt(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const s in e)if(e[s]!==t[s])return!1;return!0}function Xn(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function zs(e){if(!Yn(e))return!1;const t=e.constructor;if(t===void 0)return!0;const s=t.prototype;return!(!Yn(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Yn(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ra(e){return new Promise(t=>{ke.setTimeout(t,e)})}function Vs(e,t,s){return typeof s.structuralSharing=="function"?s.structuralSharing(e,t):s.structuralSharing!==!1?Ti(e,t):t}function Ca(e,t,s=0){const n=[...e,t];return s&&n.length>s?n.slice(1):n}function ba(e,t,s=0){const n=[t,...e];return s&&n.length>s?n.slice(0,-1):n}var En=Symbol();function Mi(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===En?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function _n(e,t){return typeof e=="function"?e(...t):!!e}function wa(e,t,s){let n=!1,r;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(r??=t(),n||(n=!0,r.aborted?s():r.addEventListener("abort",s,{once:!0})),r)}),e}var St=(()=>{let e=()=>Sa;return{isServer(){return e()},setIsServer(t){e=t}}})();function qs(){let e,t;const s=new Promise((r,i)=>{e=r,t=i});s.status="pending",s.catch(()=>{});function n(r){Object.assign(s,r),delete s.resolve,delete s.reject}return s.resolve=r=>{n({status:"fulfilled",value:r}),e(r)},s.reject=r=>{n({status:"rejected",reason:r}),t(r)},s}function Pf(e){return e.state.status==="success"}var Ea=va;function _a(){let e=[],t=0,s=a=>{a()},n=a=>{a()},r=Ea;const i=a=>{t?e.push(a):r(()=>{s(a)})},o=()=>{const a=e;e=[],a.length&&r(()=>{n(()=>{a.forEach(u=>{s(u)})})})};return{batch:a=>{let u;t++;try{u=a()}finally{t--,t||o()}return u},batchCalls:a=>(...u)=>{i(()=>{a(...u)})},schedule:i,setNotifyFunction:a=>{s=a},setBatchNotifyFunction:a=>{n=a},setScheduler:a=>{r=a}}}var H=_a(),Ta=class extends st{#t=!0;#e;#s;constructor(){super(),this.#s=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e(!0),s=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",s)}}}}onSubscribe(){this.#e||this.setEventListener(this.#s)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(e){this.#s=e,this.#e?.(),this.#e=e(this.setOnline.bind(this))}setOnline(e){this.#t!==e&&(this.#t=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#t}},Zt=new Ta;function Ma(e){return Math.min(1e3*2**e,3e4)}function Ai(e){return(e??"online")==="online"?Zt.isOnline():!0}var Ks=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Oi(e){let t=!1,s=0,n;const r=qs(),i=()=>r.status!=="pending",o=g=>{if(!i()){const v=new Ks(g);d(v),e.onCancel?.(v)}},a=()=>{t=!0},u=()=>{t=!1},l=()=>bn.isFocused()&&(e.networkMode==="always"||Zt.isOnline())&&e.canRun(),c=()=>Ai(e.networkMode)&&e.canRun(),h=g=>{i()||(n?.(),r.resolve(g))},d=g=>{i()||(n?.(),r.reject(g))},f=()=>new Promise(g=>{n=v=>{(i()||l())&&g(v)},e.onPause?.()}).then(()=>{n=void 0,i()||e.onContinue?.()}),p=()=>{if(i())return;let g;const v=s===0?e.initialPromise:void 0;try{g=v??e.fn()}catch(m){g=Promise.reject(m)}Promise.resolve(g).then(h).catch(m=>{if(i())return;const S=e.retry??(St.isServer()?0:3),C=e.retryDelay??Ma,b=typeof C=="function"?C(s,m):C,w=S===!0||typeof S=="number"&&s<S||typeof S=="function"&&S(s,m);if(t||!w){d(m);return}s++,e.onFail?.(s,m),Ra(b).then(()=>l()?void 0:f()).then(()=>{t?d(m):p()})})};return{promise:r,status:()=>r.status,cancel:o,continue:()=>(n?.(),r),cancelRetry:a,continueRetry:u,canStart:c,start:()=>(c()?p():f().then(p),r)}}var xi=class{#t;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Hs(this.gcTime)&&(this.#t=ke.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(St.isServer()?1/0:3e5))}clearGcTimeout(){this.#t!==void 0&&(ke.clearTimeout(this.#t),this.#t=void 0)}};function Aa(e){return{onFetch:(t,s)=>{const n=t.options,r=t.fetchOptions?.meta?.fetchMore?.direction,i=t.state.data?.pages||[],o=t.state.data?.pageParams||[];let a={pages:[],pageParams:[]},u=0;const l=async()=>{let c=!1;const h=p=>{wa(p,()=>t.signal,()=>c=!0)},d=Mi(t.options,t.fetchOptions),f=async(p,g,v)=>{if(c)return Promise.reject(t.signal.reason);if(g==null&&p.pages.length)return Promise.resolve(p);const S=(()=>{const R={client:t.client,queryKey:t.queryKey,pageParam:g,direction:v?"backward":"forward",meta:t.options.meta};return h(R),R})(),C=await d(S),{maxPages:b}=t.options,w=v?ba:Ca;return{pages:w(p.pages,C,b),pageParams:w(p.pageParams,g,b)}};if(r&&i.length){const p=r==="backward",g=p?Pi:Qs,v={pages:i,pageParams:o};a=await f(v,g(n,v),p)}else{const p=e??i.length;do{const g=u===0?o[0]??n.initialPageParam:Qs(n,a);if(u>0&&g==null)break;a=await f(a,g),u++}while(u<p)}return a};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},s):t.fetchFn=l}}}function Qs(e,{pages:t,pageParams:s}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,s[n],s):void 0}function Pi(e,{pages:t,pageParams:s}){return t.length>0?e.getPreviousPageParam?.(t[0],t,s[0],s):void 0}function Oa(e,t){return t?Qs(e,t)!=null:!1}function xa(e,t){return!t||!e.getPreviousPageParam?!1:Pi(e,t)!=null}var Pa=class extends xi{#t;#e;#s;#n;#i;#r;#a;#l;constructor(e){super(),this.#l=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#n=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=er(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#t}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#a,...e},e?._type&&(this.#t=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=er(this.options);t.data!==void 0&&(this.setState(Zn(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const s=Vs(this.state.data,e,this.options);return this.#o({data:s,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),s}setState(e){this.#o({type:"setState",state:e})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(q).catch(q):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(e=>J(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===En||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>be(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!_i(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#l||this.#h()?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#h(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const a=this.observers.find(u=>u.options.queryFn);a&&this.setOptions(a.options)}const s=new AbortController,n=a=>{Object.defineProperty(a,"signal",{enumerable:!0,get:()=>(this.#l=!0,s.signal)})},r=()=>{const a=Mi(this.options,t),l=(()=>{const c={client:this.#i,queryKey:this.queryKey,meta:this.meta};return n(c),c})();return this.#l=!1,this.options.persister?this.options.persister(a,l,this):a(l)},o=(()=>{const a={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:r};return n(a),a})();(this.#t==="infinite"?Aa(this.options.pages):this.options.behavior)?.onFetch(o,this),this.#s=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#o({type:"fetch",meta:o.fetchOptions?.meta}),this.#r=Oi({initialPromise:t?.initialPromise,fn:o.fetchFn,onCancel:a=>{a instanceof Ks&&a.revert&&this.setState({...this.#s,fetchStatus:"idle"}),s.abort()},onFail:(a,u)=>{this.#o({type:"failed",failureCount:a,error:u})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0});try{const a=await this.#r.start();if(a===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(a),this.#n.config.onSuccess?.(a,this),this.#n.config.onSettled?.(a,this.state.error,this),a}catch(a){if(a instanceof Ks){if(a.silent)return this.#r.promise;if(a.revert){if(this.state.data===void 0)throw a;return this.state.data}}throw this.#o({type:"error",error:a}),this.#n.config.onError?.(a,this),this.#n.config.onSettled?.(this.state.data,a,this),a}finally{this.scheduleGc()}}#o(e){const t=s=>{switch(e.type){case"failed":return{...s,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...ki(s.data,this.options),fetchMeta:e.meta??null};case"success":const n={...s,...Zn(e.data,e.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#s=e.manual?n:void 0,n;case"error":const r=e.error;return{...s,error:r,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...e.state}}};this.state=t(this.state),H.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function ki(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ai(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Zn(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function er(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,s=t!==void 0,n=s?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:s?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var Fi=class extends st{constructor(e,t){super(),this.options=t,this.#t=e,this.#l=null,this.#a=qs(),this.bindMethods(),this.setOptions(t)}#t;#e=void 0;#s=void 0;#n=void 0;#i;#r;#a;#l;#h;#o;#u;#f;#d;#p;#g=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),tr(this.#e,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ws(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ws(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#I(),this.#R(),this.#e.removeObserver(this)}setOptions(e){const t=this.options,s=this.#e;if(this.options=this.#t.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof J(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#C(),this.#e.setOptions(this.options),t._defaulted&&!Yt(this.options,t)&&this.#t.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});const n=this.hasListeners();n&&sr(this.#e,s,this.options,t)&&this.#m(),this.updateResult(),n&&(this.#e!==s||J(this.options.enabled,this.#e)!==J(t.enabled,this.#e)||be(this.options.staleTime,this.#e)!==be(t.staleTime,this.#e))&&this.#c();const r=this.#v();n&&(this.#e!==s||J(this.options.enabled,this.#e)!==J(t.enabled,this.#e)||r!==this.#p)&&this.#S(r)}getOptimisticResult(e){const t=this.#t.getQueryCache().build(this.#t,e),s=this.createResult(t,e);return Fa(this,s)&&(this.#n=s,this.#r=this.options,this.#i=this.#e.state),s}getCurrentResult(){return this.#n}trackResult(e,t){return new Proxy(e,{get:(s,n)=>(this.trackProp(n),t?.(n),n==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#a.status==="pending"&&this.#a.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(s,n))})}trackProp(e){this.#g.add(e)}getCurrentQuery(){return this.#e}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#t.defaultQueryOptions(e),s=this.#t.getQueryCache().build(this.#t,t);return s.fetch().then(()=>this.createResult(s,t))}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#n))}#m(e){this.#C();let t=this.#e.fetch(this.options,e);return e?.throwOnError||(t=t.catch(q)),t}#c(){this.#I();const e=be(this.options.staleTime,this.#e);if(St.isServer()||this.#n.isStale||!Hs(e))return;const t=_i(this.#n.dataUpdatedAt,e)+1;this.#f=ke.setTimeout(()=>{this.#n.isStale||this.updateResult()},t)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#e):this.options.refetchInterval)??!1}#S(e){this.#R(),this.#p=e,!(St.isServer()||J(this.options.enabled,this.#e)===!1||!Hs(this.#p)||this.#p===0)&&(this.#d=ke.setInterval(()=>{(this.options.refetchIntervalInBackground||bn.isFocused())&&this.#m()},this.#p))}#y(){this.#c(),this.#S(this.#v())}#I(){this.#f!==void 0&&(ke.clearTimeout(this.#f),this.#f=void 0)}#R(){this.#d!==void 0&&(ke.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){const s=this.#e,n=this.options,r=this.#n,i=this.#i,o=this.#r,a=e!==s?e.state:this.#s,{state:u}=e;let l={...u},c=!1,h;if(t._optimisticResults){const R=this.hasListeners(),y=!R&&tr(e,t),_=R&&sr(e,s,t,n);(y||_)&&(l={...l,...ki(u.data,e.options)}),t._optimisticResults==="isRestoring"&&(l.fetchStatus="idle")}let{error:d,errorUpdatedAt:f,status:p}=l;h=l.data;let g=!1;if(t.placeholderData!==void 0&&h===void 0&&p==="pending"){let R;r?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(R=r.data,g=!0):R=typeof t.placeholderData=="function"?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,R!==void 0&&(p="success",h=Vs(r?.data,R,t),c=!0)}if(t.select&&h!==void 0&&!g)if(r&&h===i?.data&&t.select===this.#h)h=this.#o;else try{this.#h=t.select,h=t.select(h),h=Vs(r?.data,h,t),this.#o=h,this.#l=null}catch(R){this.#l=R}this.#l&&(d=this.#l,h=this.#o,f=Date.now(),p="error");const v=l.fetchStatus==="fetching",m=p==="pending",S=p==="error",C=m&&v,b=h!==void 0,w={status:p,fetchStatus:l.fetchStatus,isPending:m,isSuccess:p==="success",isError:S,isInitialLoading:C,isLoading:C,data:h,dataUpdatedAt:l.dataUpdatedAt,error:d,errorUpdatedAt:f,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>a.dataUpdateCount||l.errorUpdateCount>a.errorUpdateCount,isFetching:v,isRefetching:v&&!m,isLoadingError:S&&!b,isPaused:l.fetchStatus==="paused",isPlaceholderData:c,isRefetchError:S&&b,isStale:Tn(e,t),refetch:this.refetch,promise:this.#a,isEnabled:J(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const R=w.data!==void 0,y=w.status==="error"&&!R,_=A=>{y?A.reject(w.error):R&&A.resolve(w.data)},O=()=>{const A=this.#a=w.promise=qs();_(A)},T=this.#a;switch(T.status){case"pending":e.queryHash===s.queryHash&&_(T);break;case"fulfilled":(y||w.data!==T.value)&&O();break;case"rejected":(!y||w.error!==T.reason)&&O()}}return w}updateResult(){const e=this.#n,t=this.createResult(this.#e,this.options);if(this.#i=this.#e.state,this.#r=this.options,this.#i.data!==void 0&&(this.#u=this.#e),Yt(t,e))return;this.#n=t;const s=()=>{if(!e)return!0;const{notifyOnChangeProps:n}=this.options,r=typeof n=="function"?n():n;if(r==="all"||!r&&!this.#g.size)return!0;const i=new Set(r??this.#g);return this.options.throwOnError&&i.add("error"),Object.keys(this.#n).some(o=>{const a=o;return this.#n[a]!==e[a]&&i.has(a)})};this.#b({listeners:s()})}#C(){const e=this.#t.getQueryCache().build(this.#t,this.options);if(e===this.#e)return;const t=this.#e;this.#e=e,this.#s=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#b(e){H.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#n)}),this.#t.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function ka(e,t){return J(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&J(t.retryOnMount,e)===!1)}function tr(e,t){return ka(e,t)||e.state.data!==void 0&&Ws(e,t,t.refetchOnMount)}function Ws(e,t,s){if(J(t.enabled,e)!==!1&&be(t.staleTime,e)!=="static"){const n=typeof s=="function"?s(e):s;return n==="always"||n!==!1&&Tn(e,t)}return!1}function sr(e,t,s,n){return(e!==t||J(n.enabled,e)===!1)&&(!s.suspense||e.state.status!=="error")&&Tn(e,s)}function Tn(e,t){return J(t.enabled,e)!==!1&&e.isStaleByTime(be(t.staleTime,e))}function Fa(e,t){return!Yt(e.getCurrentResult(),t)}var La=class extends Fi{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){const{state:s}=e,n=super.createResult(e,t),{isFetching:r,isRefetching:i,isError:o,isRefetchError:a}=n,u=s.fetchMeta?.fetchMore?.direction,l=o&&u==="forward",c=r&&u==="forward",h=o&&u==="backward",d=r&&u==="backward";return{...n,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:Oa(t,s.data),hasPreviousPage:xa(t,s.data),isFetchNextPageError:l,isFetchingNextPage:c,isFetchPreviousPageError:h,isFetchingPreviousPage:d,isRefetchError:a&&!l&&!h,isRefetching:i&&!c&&!d}}},Na=class extends xi{#t;#e;#s;#n;constructor(e){super(),this.#t=e.client,this.mutationId=e.mutationId,this.#s=e.mutationCache,this.#e=[],this.state=e.state||Li(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#e.includes(e)||(this.#e.push(e),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#e=this.#e.filter(t=>t!==e),this.scheduleGc(),this.#s.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#s.remove(this))}continue(){return this.#n?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#i({type:"continue"})},s={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#n=Oi({fn:()=>this.options.mutationFn?this.options.mutationFn(e,s):Promise.reject(new Error("No mutationFn found")),onFail:(i,o)=>{this.#i({type:"failed",failureCount:i,error:o})},onPause:()=>{this.#i({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#s.canRun(this)});const n=this.state.status==="pending",r=!this.#n.canStart();try{if(n)t();else{this.#i({type:"pending",variables:e,isPaused:r}),this.#s.config.onMutate&&await this.#s.config.onMutate(e,this,s);const o=await this.options.onMutate?.(e,s);o!==this.state.context&&this.#i({type:"pending",context:o,variables:e,isPaused:r})}const i=await this.#n.start();return await this.#s.config.onSuccess?.(i,e,this.state.context,this,s),await this.options.onSuccess?.(i,e,this.state.context,s),await this.#s.config.onSettled?.(i,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(i,null,e,this.state.context,s),this.#i({type:"success",data:i}),i}catch(i){try{await this.#s.config.onError?.(i,e,this.state.context,this,s)}catch(o){Promise.reject(o)}try{await this.options.onError?.(i,e,this.state.context,s)}catch(o){Promise.reject(o)}try{await this.#s.config.onSettled?.(void 0,i,this.state.variables,this.state.context,this,s)}catch(o){Promise.reject(o)}try{await this.options.onSettled?.(void 0,i,e,this.state.context,s)}catch(o){Promise.reject(o)}throw this.#i({type:"error",error:i}),i}finally{this.#s.runNext(this)}}#i(e){const t=s=>{switch(e.type){case"failed":return{...s,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...s,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:e.error,failureCount:s.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),H.batch(()=>{this.#e.forEach(s=>{s.onMutationUpdate(e)}),this.#s.notify({mutation:this,type:"updated",action:e})})}};function Li(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Da=class extends st{constructor(e={}){super(),this.config=e,this.#t=new Set,this.#e=new Map,this.#s=0}#t;#e;#s;build(e,t,s){const n=new Na({client:e,mutationCache:this,mutationId:++this.#s,options:e.defaultMutationOptions(t),state:s});return this.add(n),n}add(e){this.#t.add(e);const t=Ot(e);if(typeof t=="string"){const s=this.#e.get(t);s?s.push(e):this.#e.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#t.delete(e)){const t=Ot(e);if(typeof t=="string"){const s=this.#e.get(t);if(s)if(s.length>1){const n=s.indexOf(e);n!==-1&&s.splice(n,1)}else s[0]===e&&this.#e.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Ot(e);if(typeof t=="string"){const s=this.#e.get(t)?.find(n=>n.state.status==="pending");return!s||s===e}else return!0}runNext(e){const t=Ot(e);return typeof t=="string"?this.#e.get(t)?.find(s=>s!==e&&s.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){H.batch(()=>{this.#t.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#t.clear(),this.#e.clear()})}getAll(){return Array.from(this.#t)}find(e){const t={exact:!0,...e};return this.getAll().find(s=>Jn(t,s))}findAll(e={}){return this.getAll().filter(t=>Jn(e,t))}notify(e){H.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return H.batch(()=>Promise.all(e.map(t=>t.continue().catch(q))))}};function Ot(e){return e.options.scope?.id}var ja=class extends st{#t;#e=void 0;#s;#n;constructor(e,t){super(),this.#t=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){const t=this.options;this.options=this.#t.defaultMutationOptions(e),Yt(this.options,t)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#s,observer:this}),t?.mutationKey&&this.options.mutationKey&&De(t.mutationKey)!==De(this.options.mutationKey)?this.reset():this.#s?.state.status==="pending"&&this.#s.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#s?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#r(e)}getCurrentResult(){return this.#e}reset(){this.#s?.removeObserver(this),this.#s=void 0,this.#i(),this.#r()}mutate(e,t){return this.#n=t,this.#s?.removeObserver(this),this.#s=this.#t.getMutationCache().build(this.#t,this.options),this.#s.addObserver(this),this.#s.execute(e)}#i(){const e=this.#s?.state??Li();this.#e={...e,isPending:e.status==="pending",isSuccess:e.status==="success",isError:e.status==="error",isIdle:e.status==="idle",mutate:this.mutate,reset:this.reset}}#r(e){H.batch(()=>{if(this.#n&&this.hasListeners()){const t=this.#e.variables,s=this.#e.context,n={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#n.onSuccess?.(e.data,t,s,n)}catch(r){Promise.reject(r)}try{this.#n.onSettled?.(e.data,null,t,s,n)}catch(r){Promise.reject(r)}}else if(e?.type==="error"){try{this.#n.onError?.(e.error,t,s,n)}catch(r){Promise.reject(r)}try{this.#n.onSettled?.(void 0,e.error,t,s,n)}catch(r){Promise.reject(r)}}}this.listeners.forEach(t=>{t(this.#e)})})}},Ga=class extends st{constructor(e={}){super(),this.config=e,this.#t=new Map}#t;build(e,t,s){const n=t.queryKey,r=t.queryHash??wn(n,t);let i=this.get(r);return i||(i=new Pa({client:e,queryKey:n,queryHash:r,options:e.defaultQueryOptions(t),state:s,defaultOptions:e.getQueryDefaults(n)}),this.add(i)),i}add(e){this.#t.has(e.queryHash)||(this.#t.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#t.get(e.queryHash);t&&(e.destroy(),t===e&&this.#t.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){H.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#t.get(e)}getAll(){return[...this.#t.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(s=>Wn(t,s))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(s=>Wn(e,s)):t}notify(e){H.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){H.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){H.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},kf=class{#t;#e;#s;#n;#i;#r;#a;#l;constructor(e={}){this.#t=e.queryCache||new Ga,this.#e=e.mutationCache||new Da,this.#s=e.defaultOptions||{},this.#n=new Map,this.#i=new Map,this.#r=0}mount(){this.#r++,this.#r===1&&(this.#a=bn.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#t.onFocus())}),this.#l=Zt.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#t.onOnline())}))}unmount(){this.#r--,this.#r===0&&(this.#a?.(),this.#a=void 0,this.#l?.(),this.#l=void 0)}isFetching(e){return this.#t.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#e.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#t.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),s=this.#t.build(this,t),n=s.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&s.isStaleByTime(be(t.staleTime,s))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return this.#t.findAll(e).map(({queryKey:t,state:s})=>[t,s.data])}setQueryData(e,t,s){const n=this.defaultQueryOptions({queryKey:e}),r=this.#t.get(n.queryHash)?.state.data,i=ya(t,r);if(i!==void 0)return this.#t.build(this,n).setData(i,{...s,manual:!0})}setQueriesData(e,t,s){return H.batch(()=>this.#t.findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,s)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#t.get(t.queryHash)?.state}removeQueries(e){const t=this.#t;H.batch(()=>{t.findAll(e).forEach(s=>{t.remove(s)})})}resetQueries(e,t){const s=this.#t;return H.batch(()=>(s.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const s={revert:!0,...t},n=H.batch(()=>this.#t.findAll(e).map(r=>r.cancel(s)));return Promise.all(n).then(q).catch(q)}invalidateQueries(e,t={}){return H.batch(()=>(this.#t.findAll(e).forEach(s=>{s.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const s={...t,cancelRefetch:t.cancelRefetch??!0},n=H.batch(()=>this.#t.findAll(e).filter(r=>!r.isDisabled()&&!r.isStatic()).map(r=>{let i=r.fetch(void 0,s);return s.throwOnError||(i=i.catch(q)),r.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(n).then(q)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const s=this.#t.build(this,t);return s.isStaleByTime(be(t.staleTime,s))?s.fetch(t):Promise.resolve(s.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(q).catch(q)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(q).catch(q)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Zt.isOnline()?this.#e.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#t}getMutationCache(){return this.#e}getDefaultOptions(){return this.#s}setDefaultOptions(e){this.#s=e}setQueryDefaults(e,t){this.#n.set(De(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#n.values()],s={};return t.forEach(n=>{vt(e,n.queryKey)&&Object.assign(s,n.defaultOptions)}),s}setMutationDefaults(e,t){this.#i.set(De(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#i.values()],s={};return t.forEach(n=>{vt(e,n.mutationKey)&&Object.assign(s,n.defaultOptions)}),s}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#s.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=wn(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===En&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#s.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#t.clear(),this.#e.clear()}},I=Ei(Cn(),1),L=fa(),Ni=I.createContext(void 0),Di=e=>{const t=I.useContext(Ni);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Ff=({client:e,children:t})=>(I.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,L.jsx)(Ni.Provider,{value:e,children:t})),ji=I.createContext(!1),$a=()=>I.useContext(ji),Lf=ji.Provider;function Ba(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Ua=I.createContext(Ba()),Ha=()=>I.useContext(Ua),za=(e,t,s)=>{const n=s?.state.error&&typeof e.throwOnError=="function"?_n(e.throwOnError,[s.state.error,s]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},Va=e=>{I.useEffect(()=>{e.clearReset()},[e])},qa=({result:e,errorResetBoundary:t,throwOnError:s,query:n,suspense:r})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(r&&e.data===void 0||_n(s,[e.error,n])),Ka=e=>{if(e.suspense){const s=r=>r==="static"?r:Math.max(r??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...r)=>s(n(...r)):s(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Qa=(e,t)=>e.isLoading&&e.isFetching&&!t,Wa=(e,t)=>e?.suspense&&t.isPending,nr=(e,t,s)=>t.fetchOptimistic(e).catch(()=>{s.clearReset()});function Gi(e,t,s){const n=$a(),r=Ha(),i=Di(s),o=i.defaultQueryOptions(e);i.getDefaultOptions().queries?._experimental_beforeQuery?.(o);const a=i.getQueryCache().get(o.queryHash);o._optimisticResults=n?"isRestoring":"optimistic",Ka(o),za(o,r,a),Va(r);const u=!i.getQueryCache().get(o.queryHash),[l]=I.useState(()=>new t(i,o)),c=l.getOptimisticResult(o),h=!n&&e.subscribed!==!1;if(I.useSyncExternalStore(I.useCallback(d=>{const f=h?l.subscribe(H.batchCalls(d)):q;return l.updateResult(),f},[l,h]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),I.useEffect(()=>{l.setOptions(o)},[o,l]),Wa(o,c))throw nr(o,l,r);if(qa({result:c,errorResetBoundary:r,throwOnError:o.throwOnError,query:a,suspense:o.suspense}))throw c.error;return i.getDefaultOptions().queries?._experimental_afterQuery?.(o,c),o.experimental_prefetchInRender&&!St.isServer()&&Qa(c,n)&&(u?nr(o,l,r):a?.promise)?.catch(q).finally(()=>{l.updateResult()}),o.notifyOnChangeProps?c:l.trackResult(c)}function Nf(e,t){return Gi(e,Fi,t)}function Df(e,t){const s=Di(t),[n]=I.useState(()=>new ja(s,e));I.useEffect(()=>{n.setOptions(e)},[n,e]);const r=I.useSyncExternalStore(I.useCallback(o=>n.subscribe(H.batchCalls(o)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),i=I.useCallback((o,a)=>{n.mutate(o,a).catch(q)},[n]);if(r.error&&_n(n.options.throwOnError,[r.error]))throw r.error;return{...r,mutate:i,mutateAsync:r.mutate}}function jf(e,t){return Gi(e,La,t)}var rr=I.use,Mn=I.useLayoutEffect;function _e(e){return e[e.length-1]}function $i(e,t){return typeof e=="function"?e(t):e}var An=Object.prototype.hasOwnProperty;function Bi(e){for(const t in e)if(An.call(e,t))return!0;return!1}var Kt=()=>Object.create(null),Ke=(e,t)=>we(e,t,!0);function we(e,t,s,n=0){if(e===t)return e;if(n++>500)return t;const r=Array.isArray(e)&&Array.isArray(t);if(!r&&!(es(e)&&es(t)))return t;const i=Object.keys(e),o=i.length,a=Object.keys(t),u=a.length;if(r?o!==e.length||u!==t.length||o&&_e(i)!==`${o-1}`||u&&_e(a)!==`${u-1}`:o!==Object.getOwnPropertyNames(e).length||u!==Object.getOwnPropertyNames(t).length||Object.getOwnPropertySymbols(t).length)return t;let l=0,c,h,d;if(r){for(;l<u&&(d=l,h=e[d],c=t[d],c=h===c?h:typeof h=="object"?we(h,c,s,n):c,c===h);l++);if(l===u&&o===u)return e}else{let p=o===u,g=!0;for(;l<u;l++){d=a[l],h=e[d];const v=t[d];c=h===v?h:typeof h=="object"?we(h,v,s,n):v,p&&=c===h&&(i[l]===d||An.call(e,d)),g&&=Object.is(c,v),i[l]=c}if(p)return Object.getOwnPropertySymbols(e).length?t:e;if(g)return t}const f=r?a.fill(0):s?Kt():{};for(let p=0;p<u;p++)d=r?p:a[p],r?(h=e[d],p>l&&(c=t[d],c=h===c?h:typeof h=="object"?we(h,c,s,n):c),f[d]=p<l?h:c):f[d]=i[p];return f}function es(e){return!e||typeof e!="object"?!1:(Object.getPrototypeOf(e)?.constructor??Object)===Object}function ve(e,t,s,n){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++){const o=e[r],a=t[r];if(o!==a&&!ve(o,a,s,n))return!1}return!0}if(es(e)&&es(t)){if(s){for(const i in t)if((n||t[i]!==void 0)&&!ve(e[i],t[i],s,n))return!1;return!0}let r=0;if(n)r=Object.keys(e).length;else for(const i in e)e[i]!==void 0&&r++;for(const i in t)if((n||t[i]!==void 0)&&(r--===0||!ve(e[i],t[i],s,n)))return!1;return r===0}return!1}function Ja(e){return typeof e?.message!="string"?!1:e.message.startsWith("Failed to fetch dynamically imported module")||e.message.startsWith("error loading dynamically imported module")||e.message.startsWith("Importing a module script failed")}var Xa=/[\x00-\x1f\x7f"<>`{}]/g;function Ya(e){return e.replace(Xa,t=>"%"+t.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function ir(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,s=>{try{return decodeURI(s)}catch{return s}})}return Ya(t)}var Za=["http:","https:","mailto:","tel:"];function yt(e){if(e[0]!=="/"&&e.includes(":"))return/^[\x00-\x20]*([a-z][a-z\d+.\t\n\r-]*:)/i.exec(e)?.[1]?.replace(/[\t\n\r]/g,"").toLowerCase()}var Ui=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function Hi(e,t){if(!e)return!1;if(Ui.test(e))return!0;const s=yt(e);return s?!t.has(s):!1}function at(e){if(!e)return e;let t=e;if(/[%\\\x00-\x1f\x7f]/.test(e)){const s=/%25|%5C/gi;let n=0,r;for(t="";(r=s.exec(e))!==null;)t+=ir(e.slice(n,r.index))+r[0],n=s.lastIndex;t+=ir(n?e.slice(n):e)}return t}function el(e){return/[\s\u0080-\uFFFF]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function tl(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let s=0;s<e.length;s++)if(e[s]!==t[s])return!1;return!0}function On(){throw new Error("Invariant failed")}function Ye(e){return e.replace(/\/{2,}/g,"/")}function zi(e){return e==="/"?e:e.replace(/^\/+/,"")}function de(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/+$/,""):e}function Vi(e){return de(zi(e))}function or(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function ar(e,t,s="never",n){if(t.includes("//")&&(t=Ye(t)),t.startsWith("/"))return t.length===1||s==="preserve"?t:s==="always"?t.endsWith("/")?t:`${t}/`:t.endsWith("/")?t.slice(0,-1):t;const r=t===".";let i;if(n){i=r?e:e+"\0"+t;const l=n.get(i);if(l)return l}let o;if(r)o=e.split("/");else{for(e.includes("//")&&(e=Ye(e)),o=e.split("/");o.length>1&&_e(o)==="";)o.pop();const l=t.split("/");for(let c=0,h=l.length;c<h;c++){const d=l[c];d===""?c?c===h-1&&o.push(d):o=[d]:d===".."?o.length>1?o.pop():o=[""]:d==="."||o.push(d)}}o.length>1&&(_e(o)===""?s==="never"&&o.pop():s==="always"&&o.push(""));const a=o.join("/"),u=(r?Ye(a):a)||"/";return i&&n&&n.set(i,u),u}function sl(e){const t=new Map(e.map(n=>[encodeURIComponent(n),n])),s=new RegExp([...t.keys()].join("|").replace(/[.*()]/g,"\\$&"),"g");return n=>n.replace(s,r=>t.get(r)??r)}function nl(e){return e==null||e===""}function rl(e,t,s){if(typeof t!="string")return""+(t??void 0);const n=e==="_splat";if(n&&(!t||/^[a-zA-Z0-9\-._~!/]*$/.test(t)))return t;let r=encodeURIComponent(t);return n&&(r=r.replaceAll("%2F","/")),s?s(r):r}function lr(e,t,s,n,r){const i=e.endsWith("/")?"/":"";let o="";for(const a of t){if(typeof a=="string"){o+=a;continue}const[u,l,c,h]=a,d=u===2,f=d&&h!==void 0?h+i:h;let p=s[l];if(!(u===3&&p==null)){if(r&&(r[l]=p,d&&(r["*"]=p)),d&&nl(p)){if(c==="/"&&!f)continue;p=""}o+=c+rl(l,p,n)+(f||"")}}return o+i||"/"}function et(e){return e?.isNotFound===!0}function il(){try{return sessionStorage}catch{return}}var ol="tsr-scroll-restoration-v1_3",qi=il();function al(){try{return JSON.parse(qi?.getItem("tsr-scroll-restoration-v1_3")||"{}")}catch{return{}}}function ll(){try{qi?.setItem(ol,JSON.stringify(Je))}catch{}}var Je=al(),ur="data-scroll-restoration-id",ul=e=>e.state.__TSR_key||e.href;function cl(e){const t=e.getAttribute(ur);if(t)return`[${ur}="${t}"]`;let s="",n=e,r;for(;r=n.parentNode;){let i=1,o=n;for(;o=o.previousElementSibling;)i++;const a=`${n.localName}:nth-child(${i})`;s=s?`${a} > ${s}`:a,n=r}return s}var xt=!1,Qt="window";function Js(e){try{return typeof e=="function"?e():document.querySelector(e)}catch{}}function cr(e){const t=new Set;for(const s of e){if(s===Qt)continue;const n=Js(s);n&&t.add(n)}return t}function dl(e,t){const s=t??e.options.scrollRestoration,n=e._scroll;s&&(n.restoring=!0);const r=e.options.getScrollRestorationKey||ul,i=new Set,o=a=>{const u=Je[a]||={};for(const l of i)l===document?u[Qt]={scrollX,scrollY}:l.isConnected&&(u[cl(l)]={scrollX:l.scrollLeft,scrollY:l.scrollTop})};s&&!n.restoration&&(n.restoration=!0,xt=!1,history.scrollRestoration="manual",document.addEventListener("scroll",a=>{xt||i.add(a.target)},!0),e.subscribe("onBeforeLoad",a=>{a.fromLocation&&o(r(a.fromLocation)),i.clear()}),addEventListener("pagehide",()=>{o(r(e.stores.resolvedLocation.get()??e.stores.location.get())),ll()})),!n.reset&&(n.reset=!0,e.subscribe("onRendered",a=>{const u=e.options.scrollRestorationBehavior,l=e.options.scrollToTopSelectors,c=n.next,h=n.hash;let d;if(i.clear(),n.next=!0,n.hash=!1,typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return;const f=r(a.toLocation),p=a.fromLocation&&r(a.fromLocation);if(n.restoring&&p&&p!==f){const g=Je[p];if(g){let v=Je[f];for(const m in g){if(m===Qt){if(c)continue}else{const S=Js(m);if(!S||c&&l&&(d??=cr(l),d.has(S)))continue}v||(v=Je[f]={}),v[m]??=g[m]}}}xt=!0;try{const g=a.toLocation.hash,v=a.toLocation.state.__hashScrollIntoViewOptions??!0;let m=!1;if(c){!g&&l&&(d??=cr(l));const S=g&&v&&h,C=n.restoring?Je[f]:void 0;if(C)for(const b in C){const{scrollX:w,scrollY:R}=C[b];if(b===Qt){if(S)continue;scrollTo({top:R,left:w,behavior:u}),m=!0}else{const y=Js(b);y&&(y.scrollLeft=w,y.scrollTop=R,d?.delete(y))}}if(!g){const b={top:0,left:0,behavior:u};if(m||scrollTo(b),d)for(const w of d)w.scrollTo(b)}}!m&&g&&v&&document.getElementById(g)?.scrollIntoView(v)}finally{xt=!1}}))}function hl(e,t=String){let s;for(const n in e){const r=e[n];r!==void 0&&(s||=new URLSearchParams).set(n,t(r))}return s?s.toString():""}function Rs(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function fl(e){const t=new URLSearchParams(e),s=Object.create(null);for(const[n,r]of t.entries()){const i=s[n];i==null?s[n]=Rs(r):Array.isArray(i)?i.push(Rs(r)):s[n]=[i,Rs(r)]}return s}var Ki=/^(?:\s|["[{\d-]|fa|nu|tr)/,pl=ml(JSON.parse),gl=vl(JSON.stringify,JSON.parse);function ml(e){const t=e===JSON.parse;return s=>{s[0]==="?"&&(s=s.substring(1));const n=fl(s);for(const r in n){const i=n[r];if(typeof i=="string"){if(t&&!Ki.test(i))continue;try{n[r]=e(i)}catch{}}}return n}}function vl(e,t){const s=t===JSON.parse;function n(r){if(r&&typeof r=="object")try{return e(r)}catch{}else if(t&&typeof r=="string"){if(s&&!Ki.test(r))return r;try{return t(r),e(r)}catch{}}return r}return r=>{const i=hl(r,n);return i?`?${i}`:""}}var ft="__root__";function Sl(e){e.statusCode=e.statusCode||e.code||307;const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const s=new Response(null,{status:e.statusCode,headers:t});if(s.options=e,e.throw)throw s;return s}function Qi(e){return e instanceof Response&&!!e.options}function ts(e){const t=new Map;let s,n;return{get(r){const i=t.get(r);if(i)return i.visited=!0,i.value},set(r,i){const o=t.get(r);if(o){o.value=i;return}if(t.size>=e){let u=s?.next().value;for(;!u||u.visited;)u?u.visited=!1:s=t.values(),u=s.next().value;u===n&&(s=void 0),t.delete(u.key)}const a={key:r,value:i,visited:!1};n=a,t.set(r,a)},clear(){t.clear(),s=void 0,n=void 0}}}var Re=4,Wi=5;function yl(e){const t=e.names;if(t)return t;const s=[];for(const n of e)typeof n!="string"&&s.push(n[1]);return e.names=s}function Il(e,t,s){const n=e.substring(t,s);if(n.charCodeAt(0)===36)return n.length===1?[2,"_splat","",void 0]:[1,n.substring(1),"",""];const r=n.indexOf("{");if(r>=0){const i=n.indexOf("}",r),o=n.charCodeAt(r+1)===45,a=r+(o?3:2);if(i>=0&&n.charCodeAt(a-1)===36&&(!o||a<i)){const u=n.substring(a,i);return[o?3:u?1:2,u||"_splat",n.substring(0,r),e.substring(t+i+1,u?s:e.length)]}}return n}function It(e,t,s,n,r,i){let o=s;const a=t.fullPath??t.from,u=t.options,l=a.length,c=a.endsWith("/")?l-1:l,h=u?.caseSensitive??e,d=u?.params?.parse??u?.parseParams;let f,p=i?s-1:0;if(!n||a.includes("$")){f=i?.slice()??[];const m=_e(f);m&&typeof m!="string"&&m[0]===2&&(f[f.length-1]=[m[0],m[1],m[2],m[3]===void 0?void 0:m[3]+a.substring(s-(a[s-2]==="/"?2:1),c)],p=l)}for(;o<l;){const m=o,S=a.indexOf("/",m);let C=S===-1?l:S;const b=Il(a,m,C);o=C+1;let w;if(typeof b=="string"){if(!n)continue;let R=b,y;h?y=n.static??=new Map:(R=b.toLowerCase(),y=n.staticInsensitive??=new Map);const _=y.get(R);if(_)w=_;else{const O=Fe(n);w=O,y.set(R,O)}}else{const R=b[0];let y=b[2],_=b[3]??"";if(R===2&&(C=l,o=C+1),f&&p<C&&(p<m-1&&f.push(a.substring(p,m-1)),b[2]="/"+y,R===2&&b[3]!==void 0&&c<l&&(b[3]=_.slice(0,-1)),f.push(b),p=C),!n)continue;const O=h&&!!(y||_);h||(y=y.toLowerCase(),_=_.toLowerCase());const T=R===1?n.dynamic??=[]:R===3?n.optional??=[]:n.wildcard??=[],A=R!==2&&!d&&T.find(M=>!M.parse&&M.caseSensitive===O&&M.prefix===y&&M.suffix===_);if(A)w=A;else{const M=Fe(n,R,O,y,_);w=M,T.push(M),T.length===2&&r?.push(T)}}n=w}f&&p<c&&f.push(a.substring(p,c));const g=f?.slice();if(!n)return g;if(d&&t.children&&!t.isRoot&&t.id&&t.id.charCodeAt(t.id.lastIndexOf("/")+1)===95){const m=Fe(n,Wi);(n.pathless??=[]).push(m),n=m}const v=(t.path||!t.children)&&!t.isRoot;if(v&&c<l){const m=Fe(n,Re);n.index=m,n=m}return n.parse=d??null,n.priority=u?.params?.priority??0,n.route||(n.data=g,v&&(n.route=t)),[n,o,g]}function Ji(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function Fe(e,t=0,s,n,r){return{kind:t,depth:e?e.depth+1:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,data:void 0,parent:e,parse:null,priority:0,caseSensitive:s,prefix:n,suffix:r}}function Rl(e,t){const s=Fe(),n=[];function r(i,o,a,u){const[l,c,h]=It(!1,i,o,a,n,u);if(i.children)for(const d of i.children)r(d,c,l,h)}for(const i of e)r(i,1,s);for(const i of n)i.sort(Ji);t.masksTree=s,t.flatCache=ts(1e3)}function Cl(e,t){e||="/";const s=t.flatCache.get(e);if(s!==void 0)return s;const n=xn(e,t.masksTree);return t.flatCache.set(e,n),n}function bl(e,t,s,n,r){e||="/",n||="/";const i=t?`case\0${e}`:e;let o=r.singleCache.get(i);return o||(o=Fe(),It(t,{from:e},1,o),r.singleCache.set(i,o)),xn(n,o,s)}function wl(e,t,s=!1){const n=s?e:`nofuzz\0${e}`,r=t.matchCache.get(n);if(r!==void 0)return r;e||="/";let i;try{i=xn(e,t.segmentTree,s)}catch(o){if(o instanceof URIError)i=null;else throw o}return i&&(i.branch=Yi(i.route)),t.matchCache.set(n,i),i}function El(e,t=!1){const s=Fe(),n=[],r={},i={};let o=0;function a(u,l,c,h){if(u.init(o),u.id in r&&On(),r[u.id]=u,o!==0&&u.path){const g=de(u.fullPath);(!i[g]||u.fullPath.endsWith("/"))&&(i[g]=u)}o++;const[d,f,p]=It(t,u,l,c,n,h);if(u._interpolation=p,u.children)for(const g of u.children)a(g,f,d,p)}a(e,1,s);for(const u of n)u.sort(Ji);return{processedTree:{segmentTree:s,singleCache:ts(1e3),matchCache:ts(1e3),flatCache:null,masksTree:null},routesById:r,routesByPath:i}}function xn(e,t,s=!1){const n=e.split("/"),r=Tl(e,n,t,s);if(!r)return null;const[i]=Xi(e,n,r);return{route:r.node.route,rawParams:i}}function Xi(e,t,s){const n=_l(s.node),r=s.node.data&&yl(s.node.data),i=Object.create(null);let o=s.extract?.part??0,a=s.extract?.node??0,u=s.extract?.path??0,l=s.extract?.param??0;for(;a<n.length;o++,a++,u++){const c=n[a];if(c.kind===Re)break;if(c.kind===Wi){o--,u--;continue}const h=t[o],d=u;if(h&&(u+=h.length),c.kind===1||c.kind===3){const f=r[l++];if(c.kind===3&&s.skipped&1<<a){o--,u=d-1;continue}const p=c.suffix||c.prefix?h.substring(c.prefix.length,h.length-c.suffix.length):h;(p||c.kind===1)&&(i[f]=decodeURIComponent(p))}else if(c.kind===2){const f=c,p=e.substring(d+f.prefix.length,e.length-f.suffix.length),g=decodeURIComponent(p);i["*"]=g,i._splat=g;break}}return s.rawParams&&Object.assign(i,s.rawParams),[i,{part:o,node:a,path:u,param:l}]}function Yi(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function _l(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function Tl(e,t,s,n){if(e==="/"&&s.index)return{node:s.index,skipped:0};const r=!_e(t),i=r&&e!=="/",o=t.length-(r?1:0),a=[{node:s,index:1,skipped:0,statics:0,dynamics:0,optionals:0}];let u=null,l=null;for(;a.length;){const c=a.pop(),{node:h,index:d,skipped:f,statics:p,dynamics:g,optionals:v}=c;let{extract:m,rawParams:S}=c;if(h.kind===2&&h.route&&!kt(l,c))continue;if(h.parse){if(!dr(e,t,c))continue;S=c.rawParams,m=c.extract}n&&h.route&&h.kind!==Re&&kt(u,c)&&(u=c);const C=d===o;if(C&&(h.route&&(!i||h.kind===Re||h.kind===2)&&kt(l,c)&&(l=c),!h.optional&&!h.wildcard&&!h.index&&!h.pathless))continue;const b=C?void 0:t[d];let w;if(C&&h.index){const R={node:h.index,index:d,skipped:f,statics:p,dynamics:g,optionals:v,extract:m,rawParams:S};let y=!0;if(h.index.parse&&(dr(e,t,R)||(y=!1)),y){if(!g&&!v&&!f&&Ml(p,o))return R;kt(l,R)&&(l=R)}}if(h.wildcard)for(let R=h.wildcard.length-1;R>=0;R--){const y=h.wildcard[R],{prefix:_,suffix:O}=y;if(!(_&&(C||!(y.caseSensitive?b:w??=b.toLowerCase()).startsWith(_)))){if(O){if(C)continue;const T=t.slice(d).join("/"),A=T.slice(-O.length);if((y.caseSensitive?A:A.toLowerCase())!==O||T.length-O.length<_.length)continue}a.push({node:y,index:o,skipped:f,statics:p,dynamics:g,optionals:v,extract:m,rawParams:S})}}if(h.optional){const R=f|1<<h.depth+1;for(let y=h.optional.length-1;y>=0;y--){const _=h.optional[y];a.push({node:_,index:d,skipped:R,statics:p,dynamics:g,optionals:v,extract:m,rawParams:S})}if(!C)for(let y=h.optional.length-1;y>=0;y--){const _=h.optional[y],{prefix:O,suffix:T}=_;if(O||T){const A=_.caseSensitive?b:w??=b.toLowerCase();if(O&&!A.startsWith(O)||T&&A.indexOf(T,A.length-T.length)<O.length)continue}a.push({node:_,index:d+1,skipped:f,statics:p,dynamics:g,optionals:v+Pt(o,d),extract:m,rawParams:S})}}if(!C&&h.dynamic&&b)for(let R=h.dynamic.length-1;R>=0;R--){const y=h.dynamic[R],{prefix:_,suffix:O}=y;if(_||O){const T=y.caseSensitive?b:w??=b.toLowerCase();if(_&&!T.startsWith(_)||O&&T.indexOf(O,T.length-O.length)<_.length)continue}a.push({node:y,index:d+1,skipped:f,statics:p,dynamics:g+Pt(o,d),optionals:v,extract:m,rawParams:S})}if(!C&&h.staticInsensitive){const R=h.staticInsensitive.get(w??=b.toLowerCase());R&&a.push({node:R,index:d+1,skipped:f,statics:p+Pt(o,d),dynamics:g,optionals:v,extract:m,rawParams:S})}if(!C&&h.static){const R=h.static.get(b);R&&a.push({node:R,index:d+1,skipped:f,statics:p+Pt(o,d),dynamics:g,optionals:v,extract:m,rawParams:S})}if(h.pathless)for(let R=h.pathless.length-1;R>=0;R--){const y=h.pathless[R];a.push({node:y,index:d,skipped:f,statics:p,dynamics:g,optionals:v,extract:m,rawParams:S})}}if(l)return l;if(n&&u){let c=u.index;for(let d=0;d<u.index;d++)c+=t[d].length;const h=c===e.length?"/":e.slice(c);return u.rawParams??=Object.create(null),u.rawParams["**"]=decodeURIComponent(h),u}return null}function Pt(e,t){return 2**(e-t-1)}function Ml(e,t){return e===2**(t-1)-1}function dr(e,t,s){let n,r;try{[n,r]=Xi(e,t,s)}catch{return null}if(s.rawParams=n,s.extract=r,!s.node.parse)return!0;try{if(s.node.parse(n)===!1)return null}catch{}return!0}function kt(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===Re)>(e.node.kind===Re)||t.node.kind===Re==(e.node.kind===Re)&&t.node.depth>e.node.depth))):!0}function Al(e,t,s){const n=Vi(e),r=`/${n}`,i=t?r:r.toLowerCase(),o=`${i}/`,a={input:({url:u})=>{const l=t?u.pathname:u.pathname.toLowerCase();return l===i?u.pathname="/":l.startsWith(o)&&(u.pathname=u.pathname.slice(r.length)),u},output:({url:u})=>(u.pathname=Ye(`/${n}${u.pathname}`),u)};return s?{input:({url:u})=>Xs(s,a.input({url:u})),output:({url:u})=>a.output({url:Zi(s,u)})}:a}function Xs(e,t){const s=e?.input?.({url:t});if(s){if(typeof s=="string")return new URL(s);if(s instanceof URL)return s}return t}function Zi(e,t){const s=e?.output?.({url:t});if(s){if(typeof s=="string")return new URL(s);if(s instanceof URL)return s}return t}function Ol(e,t){const{createMutableStore:s,createReadonlyStore:n,batch:r}=t,i=new Map,o=s("idle"),a=s(e),u=s(void 0),l=s([]),c=n(()=>l.get().map(g=>i.get(g).get())),h=n(()=>({status:o.get(),isLoading:o.get()==="pending",matches:c.get(),location:a.get(),resolvedLocation:u.get()}));function d(g){let v=i.get(g);return v||(v=s(void 0),i.set(g,v)),v}const f={status:o,location:a,resolvedLocation:u,ids:l,matches:c,byRoute:i,__store:h,getMatchStore:d,setMatches:p};function p(g){const v=l.get(),m=g.map(S=>S.routeId);r(()=>{tl(v,m)||l.set(m);for(const S of v)m.includes(S)||i.get(S).set(()=>{});for(const S of g){const C=d(S.routeId);C.get()!==S&&C.set(S)}})}return f}var Ee="__TSR_index",hr="popstate",fr="beforeunload",xl=/^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/;function Wt(e){const t=xl.exec(e);return t?"/"+e.slice(t[0].length):e}function eo(e){return/[\x00-\x1f\x7f]/.test(e)&&(e=e.replace(/[\x00-\x1f\x7f]/g,t=>`
|
|
1
|
+
import{r as Ei,t as tt}from"./rolldown-runtime-BGAbM2vM.js";import{xt as Cn}from"./icons-De4HOb_l.js";import{Ot as ha,kt as fa}from"./radix-ui-Bk380HgZ.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"db-studio@1.14.2"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="a55f6f96-3768-43bc-90cd-676bed02f1f1",e._sentryDebugIdIdentifier="sentry-dbid-a55f6f96-3768-43bc-90cd-676bed02f1f1")}catch{}})();var st=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},pa=class extends st{#t;#e;#s;constructor(){super(),this.#s=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#e||this.setEventListener(this.#s)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(e){this.#s=e,this.#e?.(),this.#e=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#t!==e&&(this.#t=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#t=="boolean"?this.#t:globalThis.document?.visibilityState!=="hidden"}},bn=new pa,ga={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},ma=class{#t=ga;#e=!1;setTimeoutProvider(e){this.#t=e}setTimeout(e,t){return this.#t.setTimeout(e,t)}clearTimeout(e){this.#t.clearTimeout(e)}setInterval(e,t){return this.#t.setInterval(e,t)}clearInterval(e){this.#t.clearInterval(e)}},ke=new ma;function va(e){setTimeout(e,0)}var Sa=typeof window>"u"||"Deno"in globalThis;function q(){}function ya(e,t){return typeof e=="function"?e(t):e}function Hs(e){return typeof e=="number"&&e>=0&&e!==1/0}function _i(e,t){return Math.max(e+(t||0)-Date.now(),0)}function be(e,t){return typeof e=="function"?e(t):e}function J(e,t){return typeof e=="function"?e(t):e}function Wn(e,t){const{type:s="all",exact:n,fetchStatus:r,predicate:i,queryKey:o,stale:a}=e;if(o){if(n){if(t.queryHash!==wn(o,t.options))return!1}else if(!vt(t.queryKey,o))return!1}if(s!=="all"){const u=t.isActive();if(s==="active"&&!u||s==="inactive"&&u)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||r&&r!==t.state.fetchStatus||i&&!i(t))}function Jn(e,t){const{exact:s,status:n,predicate:r,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(s){if(De(t.options.mutationKey)!==De(i))return!1}else if(!vt(t.options.mutationKey,i))return!1}return!(n&&t.state.status!==n||r&&!r(t))}function wn(e,t){return(t?.queryKeyHashFn||De)(e)}function De(e){return JSON.stringify(e,(t,s)=>zs(s)?Object.keys(s).sort().reduce((n,r)=>(n[r]=s[r],n),{}):s)}function vt(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(s=>vt(e[s],t[s])):!1}var Ia=Object.prototype.hasOwnProperty;function Ti(e,t,s=0){if(e===t)return e;if(s>500)return t;const n=Xn(e)&&Xn(t);if(!n&&!(zs(e)&&zs(t)))return t;const r=(n?e:Object.keys(e)).length,i=n?t:Object.keys(t),o=i.length,a=n?new Array(o):{};let u=0;for(let l=0;l<o;l++){const c=n?l:i[l],h=e[c],d=t[c];if(h===d){a[c]=h,(n?l<r:Ia.call(e,c))&&u++;continue}if(h===null||d===null||typeof h!="object"||typeof d!="object"){a[c]=d;continue}const f=Ti(h,d,s+1);a[c]=f,f===h&&u++}return r===o&&u===r?e:a}function Yt(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const s in e)if(e[s]!==t[s])return!1;return!0}function Xn(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function zs(e){if(!Yn(e))return!1;const t=e.constructor;if(t===void 0)return!0;const s=t.prototype;return!(!Yn(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Yn(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ra(e){return new Promise(t=>{ke.setTimeout(t,e)})}function Vs(e,t,s){return typeof s.structuralSharing=="function"?s.structuralSharing(e,t):s.structuralSharing!==!1?Ti(e,t):t}function Ca(e,t,s=0){const n=[...e,t];return s&&n.length>s?n.slice(1):n}function ba(e,t,s=0){const n=[t,...e];return s&&n.length>s?n.slice(0,-1):n}var En=Symbol();function Mi(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===En?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function _n(e,t){return typeof e=="function"?e(...t):!!e}function wa(e,t,s){let n=!1,r;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(r??=t(),n||(n=!0,r.aborted?s():r.addEventListener("abort",s,{once:!0})),r)}),e}var St=(()=>{let e=()=>Sa;return{isServer(){return e()},setIsServer(t){e=t}}})();function qs(){let e,t;const s=new Promise((r,i)=>{e=r,t=i});s.status="pending",s.catch(()=>{});function n(r){Object.assign(s,r),delete s.resolve,delete s.reject}return s.resolve=r=>{n({status:"fulfilled",value:r}),e(r)},s.reject=r=>{n({status:"rejected",reason:r}),t(r)},s}function Pf(e){return e.state.status==="success"}var Ea=va;function _a(){let e=[],t=0,s=a=>{a()},n=a=>{a()},r=Ea;const i=a=>{t?e.push(a):r(()=>{s(a)})},o=()=>{const a=e;e=[],a.length&&r(()=>{n(()=>{a.forEach(u=>{s(u)})})})};return{batch:a=>{let u;t++;try{u=a()}finally{t--,t||o()}return u},batchCalls:a=>(...u)=>{i(()=>{a(...u)})},schedule:i,setNotifyFunction:a=>{s=a},setBatchNotifyFunction:a=>{n=a},setScheduler:a=>{r=a}}}var H=_a(),Ta=class extends st{#t=!0;#e;#s;constructor(){super(),this.#s=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e(!0),s=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",s)}}}}onSubscribe(){this.#e||this.setEventListener(this.#s)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(e){this.#s=e,this.#e?.(),this.#e=e(this.setOnline.bind(this))}setOnline(e){this.#t!==e&&(this.#t=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#t}},Zt=new Ta;function Ma(e){return Math.min(1e3*2**e,3e4)}function Ai(e){return(e??"online")==="online"?Zt.isOnline():!0}var Ks=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Oi(e){let t=!1,s=0,n;const r=qs(),i=()=>r.status!=="pending",o=g=>{if(!i()){const v=new Ks(g);d(v),e.onCancel?.(v)}},a=()=>{t=!0},u=()=>{t=!1},l=()=>bn.isFocused()&&(e.networkMode==="always"||Zt.isOnline())&&e.canRun(),c=()=>Ai(e.networkMode)&&e.canRun(),h=g=>{i()||(n?.(),r.resolve(g))},d=g=>{i()||(n?.(),r.reject(g))},f=()=>new Promise(g=>{n=v=>{(i()||l())&&g(v)},e.onPause?.()}).then(()=>{n=void 0,i()||e.onContinue?.()}),p=()=>{if(i())return;let g;const v=s===0?e.initialPromise:void 0;try{g=v??e.fn()}catch(m){g=Promise.reject(m)}Promise.resolve(g).then(h).catch(m=>{if(i())return;const S=e.retry??(St.isServer()?0:3),C=e.retryDelay??Ma,b=typeof C=="function"?C(s,m):C,w=S===!0||typeof S=="number"&&s<S||typeof S=="function"&&S(s,m);if(t||!w){d(m);return}s++,e.onFail?.(s,m),Ra(b).then(()=>l()?void 0:f()).then(()=>{t?d(m):p()})})};return{promise:r,status:()=>r.status,cancel:o,continue:()=>(n?.(),r),cancelRetry:a,continueRetry:u,canStart:c,start:()=>(c()?p():f().then(p),r)}}var xi=class{#t;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Hs(this.gcTime)&&(this.#t=ke.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(St.isServer()?1/0:3e5))}clearGcTimeout(){this.#t!==void 0&&(ke.clearTimeout(this.#t),this.#t=void 0)}};function Aa(e){return{onFetch:(t,s)=>{const n=t.options,r=t.fetchOptions?.meta?.fetchMore?.direction,i=t.state.data?.pages||[],o=t.state.data?.pageParams||[];let a={pages:[],pageParams:[]},u=0;const l=async()=>{let c=!1;const h=p=>{wa(p,()=>t.signal,()=>c=!0)},d=Mi(t.options,t.fetchOptions),f=async(p,g,v)=>{if(c)return Promise.reject(t.signal.reason);if(g==null&&p.pages.length)return Promise.resolve(p);const S=(()=>{const R={client:t.client,queryKey:t.queryKey,pageParam:g,direction:v?"backward":"forward",meta:t.options.meta};return h(R),R})(),C=await d(S),{maxPages:b}=t.options,w=v?ba:Ca;return{pages:w(p.pages,C,b),pageParams:w(p.pageParams,g,b)}};if(r&&i.length){const p=r==="backward",g=p?Pi:Qs,v={pages:i,pageParams:o};a=await f(v,g(n,v),p)}else{const p=e??i.length;do{const g=u===0?o[0]??n.initialPageParam:Qs(n,a);if(u>0&&g==null)break;a=await f(a,g),u++}while(u<p)}return a};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},s):t.fetchFn=l}}}function Qs(e,{pages:t,pageParams:s}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,s[n],s):void 0}function Pi(e,{pages:t,pageParams:s}){return t.length>0?e.getPreviousPageParam?.(t[0],t,s[0],s):void 0}function Oa(e,t){return t?Qs(e,t)!=null:!1}function xa(e,t){return!t||!e.getPreviousPageParam?!1:Pi(e,t)!=null}var Pa=class extends xi{#t;#e;#s;#n;#i;#r;#a;#l;constructor(e){super(),this.#l=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#n=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=er(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#t}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#a,...e},e?._type&&(this.#t=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=er(this.options);t.data!==void 0&&(this.setState(Zn(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const s=Vs(this.state.data,e,this.options);return this.#o({data:s,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),s}setState(e){this.#o({type:"setState",state:e})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(q).catch(q):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(e=>J(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===En||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>be(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!_i(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#l||this.#h()?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#h(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const a=this.observers.find(u=>u.options.queryFn);a&&this.setOptions(a.options)}const s=new AbortController,n=a=>{Object.defineProperty(a,"signal",{enumerable:!0,get:()=>(this.#l=!0,s.signal)})},r=()=>{const a=Mi(this.options,t),l=(()=>{const c={client:this.#i,queryKey:this.queryKey,meta:this.meta};return n(c),c})();return this.#l=!1,this.options.persister?this.options.persister(a,l,this):a(l)},o=(()=>{const a={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:r};return n(a),a})();(this.#t==="infinite"?Aa(this.options.pages):this.options.behavior)?.onFetch(o,this),this.#s=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#o({type:"fetch",meta:o.fetchOptions?.meta}),this.#r=Oi({initialPromise:t?.initialPromise,fn:o.fetchFn,onCancel:a=>{a instanceof Ks&&a.revert&&this.setState({...this.#s,fetchStatus:"idle"}),s.abort()},onFail:(a,u)=>{this.#o({type:"failed",failureCount:a,error:u})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0});try{const a=await this.#r.start();if(a===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(a),this.#n.config.onSuccess?.(a,this),this.#n.config.onSettled?.(a,this.state.error,this),a}catch(a){if(a instanceof Ks){if(a.silent)return this.#r.promise;if(a.revert){if(this.state.data===void 0)throw a;return this.state.data}}throw this.#o({type:"error",error:a}),this.#n.config.onError?.(a,this),this.#n.config.onSettled?.(this.state.data,a,this),a}finally{this.scheduleGc()}}#o(e){const t=s=>{switch(e.type){case"failed":return{...s,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...ki(s.data,this.options),fetchMeta:e.meta??null};case"success":const n={...s,...Zn(e.data,e.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#s=e.manual?n:void 0,n;case"error":const r=e.error;return{...s,error:r,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...e.state}}};this.state=t(this.state),H.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function ki(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ai(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Zn(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function er(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,s=t!==void 0,n=s?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:s?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var Fi=class extends st{constructor(e,t){super(),this.options=t,this.#t=e,this.#l=null,this.#a=qs(),this.bindMethods(),this.setOptions(t)}#t;#e=void 0;#s=void 0;#n=void 0;#i;#r;#a;#l;#h;#o;#u;#f;#d;#p;#g=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),tr(this.#e,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ws(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ws(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#I(),this.#R(),this.#e.removeObserver(this)}setOptions(e){const t=this.options,s=this.#e;if(this.options=this.#t.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof J(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#C(),this.#e.setOptions(this.options),t._defaulted&&!Yt(this.options,t)&&this.#t.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});const n=this.hasListeners();n&&sr(this.#e,s,this.options,t)&&this.#m(),this.updateResult(),n&&(this.#e!==s||J(this.options.enabled,this.#e)!==J(t.enabled,this.#e)||be(this.options.staleTime,this.#e)!==be(t.staleTime,this.#e))&&this.#c();const r=this.#v();n&&(this.#e!==s||J(this.options.enabled,this.#e)!==J(t.enabled,this.#e)||r!==this.#p)&&this.#S(r)}getOptimisticResult(e){const t=this.#t.getQueryCache().build(this.#t,e),s=this.createResult(t,e);return Fa(this,s)&&(this.#n=s,this.#r=this.options,this.#i=this.#e.state),s}getCurrentResult(){return this.#n}trackResult(e,t){return new Proxy(e,{get:(s,n)=>(this.trackProp(n),t?.(n),n==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#a.status==="pending"&&this.#a.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(s,n))})}trackProp(e){this.#g.add(e)}getCurrentQuery(){return this.#e}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#t.defaultQueryOptions(e),s=this.#t.getQueryCache().build(this.#t,t);return s.fetch().then(()=>this.createResult(s,t))}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#n))}#m(e){this.#C();let t=this.#e.fetch(this.options,e);return e?.throwOnError||(t=t.catch(q)),t}#c(){this.#I();const e=be(this.options.staleTime,this.#e);if(St.isServer()||this.#n.isStale||!Hs(e))return;const t=_i(this.#n.dataUpdatedAt,e)+1;this.#f=ke.setTimeout(()=>{this.#n.isStale||this.updateResult()},t)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#e):this.options.refetchInterval)??!1}#S(e){this.#R(),this.#p=e,!(St.isServer()||J(this.options.enabled,this.#e)===!1||!Hs(this.#p)||this.#p===0)&&(this.#d=ke.setInterval(()=>{(this.options.refetchIntervalInBackground||bn.isFocused())&&this.#m()},this.#p))}#y(){this.#c(),this.#S(this.#v())}#I(){this.#f!==void 0&&(ke.clearTimeout(this.#f),this.#f=void 0)}#R(){this.#d!==void 0&&(ke.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){const s=this.#e,n=this.options,r=this.#n,i=this.#i,o=this.#r,a=e!==s?e.state:this.#s,{state:u}=e;let l={...u},c=!1,h;if(t._optimisticResults){const R=this.hasListeners(),y=!R&&tr(e,t),_=R&&sr(e,s,t,n);(y||_)&&(l={...l,...ki(u.data,e.options)}),t._optimisticResults==="isRestoring"&&(l.fetchStatus="idle")}let{error:d,errorUpdatedAt:f,status:p}=l;h=l.data;let g=!1;if(t.placeholderData!==void 0&&h===void 0&&p==="pending"){let R;r?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(R=r.data,g=!0):R=typeof t.placeholderData=="function"?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,R!==void 0&&(p="success",h=Vs(r?.data,R,t),c=!0)}if(t.select&&h!==void 0&&!g)if(r&&h===i?.data&&t.select===this.#h)h=this.#o;else try{this.#h=t.select,h=t.select(h),h=Vs(r?.data,h,t),this.#o=h,this.#l=null}catch(R){this.#l=R}this.#l&&(d=this.#l,h=this.#o,f=Date.now(),p="error");const v=l.fetchStatus==="fetching",m=p==="pending",S=p==="error",C=m&&v,b=h!==void 0,w={status:p,fetchStatus:l.fetchStatus,isPending:m,isSuccess:p==="success",isError:S,isInitialLoading:C,isLoading:C,data:h,dataUpdatedAt:l.dataUpdatedAt,error:d,errorUpdatedAt:f,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>a.dataUpdateCount||l.errorUpdateCount>a.errorUpdateCount,isFetching:v,isRefetching:v&&!m,isLoadingError:S&&!b,isPaused:l.fetchStatus==="paused",isPlaceholderData:c,isRefetchError:S&&b,isStale:Tn(e,t),refetch:this.refetch,promise:this.#a,isEnabled:J(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const R=w.data!==void 0,y=w.status==="error"&&!R,_=A=>{y?A.reject(w.error):R&&A.resolve(w.data)},O=()=>{const A=this.#a=w.promise=qs();_(A)},T=this.#a;switch(T.status){case"pending":e.queryHash===s.queryHash&&_(T);break;case"fulfilled":(y||w.data!==T.value)&&O();break;case"rejected":(!y||w.error!==T.reason)&&O()}}return w}updateResult(){const e=this.#n,t=this.createResult(this.#e,this.options);if(this.#i=this.#e.state,this.#r=this.options,this.#i.data!==void 0&&(this.#u=this.#e),Yt(t,e))return;this.#n=t;const s=()=>{if(!e)return!0;const{notifyOnChangeProps:n}=this.options,r=typeof n=="function"?n():n;if(r==="all"||!r&&!this.#g.size)return!0;const i=new Set(r??this.#g);return this.options.throwOnError&&i.add("error"),Object.keys(this.#n).some(o=>{const a=o;return this.#n[a]!==e[a]&&i.has(a)})};this.#b({listeners:s()})}#C(){const e=this.#t.getQueryCache().build(this.#t,this.options);if(e===this.#e)return;const t=this.#e;this.#e=e,this.#s=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#b(e){H.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#n)}),this.#t.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function ka(e,t){return J(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&J(t.retryOnMount,e)===!1)}function tr(e,t){return ka(e,t)||e.state.data!==void 0&&Ws(e,t,t.refetchOnMount)}function Ws(e,t,s){if(J(t.enabled,e)!==!1&&be(t.staleTime,e)!=="static"){const n=typeof s=="function"?s(e):s;return n==="always"||n!==!1&&Tn(e,t)}return!1}function sr(e,t,s,n){return(e!==t||J(n.enabled,e)===!1)&&(!s.suspense||e.state.status!=="error")&&Tn(e,s)}function Tn(e,t){return J(t.enabled,e)!==!1&&e.isStaleByTime(be(t.staleTime,e))}function Fa(e,t){return!Yt(e.getCurrentResult(),t)}var La=class extends Fi{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){const{state:s}=e,n=super.createResult(e,t),{isFetching:r,isRefetching:i,isError:o,isRefetchError:a}=n,u=s.fetchMeta?.fetchMore?.direction,l=o&&u==="forward",c=r&&u==="forward",h=o&&u==="backward",d=r&&u==="backward";return{...n,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:Oa(t,s.data),hasPreviousPage:xa(t,s.data),isFetchNextPageError:l,isFetchingNextPage:c,isFetchPreviousPageError:h,isFetchingPreviousPage:d,isRefetchError:a&&!l&&!h,isRefetching:i&&!c&&!d}}},Na=class extends xi{#t;#e;#s;#n;constructor(e){super(),this.#t=e.client,this.mutationId=e.mutationId,this.#s=e.mutationCache,this.#e=[],this.state=e.state||Li(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#e.includes(e)||(this.#e.push(e),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#e=this.#e.filter(t=>t!==e),this.scheduleGc(),this.#s.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#s.remove(this))}continue(){return this.#n?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#i({type:"continue"})},s={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#n=Oi({fn:()=>this.options.mutationFn?this.options.mutationFn(e,s):Promise.reject(new Error("No mutationFn found")),onFail:(i,o)=>{this.#i({type:"failed",failureCount:i,error:o})},onPause:()=>{this.#i({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#s.canRun(this)});const n=this.state.status==="pending",r=!this.#n.canStart();try{if(n)t();else{this.#i({type:"pending",variables:e,isPaused:r}),this.#s.config.onMutate&&await this.#s.config.onMutate(e,this,s);const o=await this.options.onMutate?.(e,s);o!==this.state.context&&this.#i({type:"pending",context:o,variables:e,isPaused:r})}const i=await this.#n.start();return await this.#s.config.onSuccess?.(i,e,this.state.context,this,s),await this.options.onSuccess?.(i,e,this.state.context,s),await this.#s.config.onSettled?.(i,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(i,null,e,this.state.context,s),this.#i({type:"success",data:i}),i}catch(i){try{await this.#s.config.onError?.(i,e,this.state.context,this,s)}catch(o){Promise.reject(o)}try{await this.options.onError?.(i,e,this.state.context,s)}catch(o){Promise.reject(o)}try{await this.#s.config.onSettled?.(void 0,i,this.state.variables,this.state.context,this,s)}catch(o){Promise.reject(o)}try{await this.options.onSettled?.(void 0,i,e,this.state.context,s)}catch(o){Promise.reject(o)}throw this.#i({type:"error",error:i}),i}finally{this.#s.runNext(this)}}#i(e){const t=s=>{switch(e.type){case"failed":return{...s,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...s,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:e.error,failureCount:s.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),H.batch(()=>{this.#e.forEach(s=>{s.onMutationUpdate(e)}),this.#s.notify({mutation:this,type:"updated",action:e})})}};function Li(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Da=class extends st{constructor(e={}){super(),this.config=e,this.#t=new Set,this.#e=new Map,this.#s=0}#t;#e;#s;build(e,t,s){const n=new Na({client:e,mutationCache:this,mutationId:++this.#s,options:e.defaultMutationOptions(t),state:s});return this.add(n),n}add(e){this.#t.add(e);const t=Ot(e);if(typeof t=="string"){const s=this.#e.get(t);s?s.push(e):this.#e.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#t.delete(e)){const t=Ot(e);if(typeof t=="string"){const s=this.#e.get(t);if(s)if(s.length>1){const n=s.indexOf(e);n!==-1&&s.splice(n,1)}else s[0]===e&&this.#e.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Ot(e);if(typeof t=="string"){const s=this.#e.get(t)?.find(n=>n.state.status==="pending");return!s||s===e}else return!0}runNext(e){const t=Ot(e);return typeof t=="string"?this.#e.get(t)?.find(s=>s!==e&&s.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){H.batch(()=>{this.#t.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#t.clear(),this.#e.clear()})}getAll(){return Array.from(this.#t)}find(e){const t={exact:!0,...e};return this.getAll().find(s=>Jn(t,s))}findAll(e={}){return this.getAll().filter(t=>Jn(e,t))}notify(e){H.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return H.batch(()=>Promise.all(e.map(t=>t.continue().catch(q))))}};function Ot(e){return e.options.scope?.id}var ja=class extends st{#t;#e=void 0;#s;#n;constructor(e,t){super(),this.#t=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){const t=this.options;this.options=this.#t.defaultMutationOptions(e),Yt(this.options,t)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#s,observer:this}),t?.mutationKey&&this.options.mutationKey&&De(t.mutationKey)!==De(this.options.mutationKey)?this.reset():this.#s?.state.status==="pending"&&this.#s.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#s?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#r(e)}getCurrentResult(){return this.#e}reset(){this.#s?.removeObserver(this),this.#s=void 0,this.#i(),this.#r()}mutate(e,t){return this.#n=t,this.#s?.removeObserver(this),this.#s=this.#t.getMutationCache().build(this.#t,this.options),this.#s.addObserver(this),this.#s.execute(e)}#i(){const e=this.#s?.state??Li();this.#e={...e,isPending:e.status==="pending",isSuccess:e.status==="success",isError:e.status==="error",isIdle:e.status==="idle",mutate:this.mutate,reset:this.reset}}#r(e){H.batch(()=>{if(this.#n&&this.hasListeners()){const t=this.#e.variables,s=this.#e.context,n={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#n.onSuccess?.(e.data,t,s,n)}catch(r){Promise.reject(r)}try{this.#n.onSettled?.(e.data,null,t,s,n)}catch(r){Promise.reject(r)}}else if(e?.type==="error"){try{this.#n.onError?.(e.error,t,s,n)}catch(r){Promise.reject(r)}try{this.#n.onSettled?.(void 0,e.error,t,s,n)}catch(r){Promise.reject(r)}}}this.listeners.forEach(t=>{t(this.#e)})})}},Ga=class extends st{constructor(e={}){super(),this.config=e,this.#t=new Map}#t;build(e,t,s){const n=t.queryKey,r=t.queryHash??wn(n,t);let i=this.get(r);return i||(i=new Pa({client:e,queryKey:n,queryHash:r,options:e.defaultQueryOptions(t),state:s,defaultOptions:e.getQueryDefaults(n)}),this.add(i)),i}add(e){this.#t.has(e.queryHash)||(this.#t.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#t.get(e.queryHash);t&&(e.destroy(),t===e&&this.#t.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){H.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#t.get(e)}getAll(){return[...this.#t.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(s=>Wn(t,s))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(s=>Wn(e,s)):t}notify(e){H.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){H.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){H.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},kf=class{#t;#e;#s;#n;#i;#r;#a;#l;constructor(e={}){this.#t=e.queryCache||new Ga,this.#e=e.mutationCache||new Da,this.#s=e.defaultOptions||{},this.#n=new Map,this.#i=new Map,this.#r=0}mount(){this.#r++,this.#r===1&&(this.#a=bn.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#t.onFocus())}),this.#l=Zt.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#t.onOnline())}))}unmount(){this.#r--,this.#r===0&&(this.#a?.(),this.#a=void 0,this.#l?.(),this.#l=void 0)}isFetching(e){return this.#t.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#e.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#t.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),s=this.#t.build(this,t),n=s.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&s.isStaleByTime(be(t.staleTime,s))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return this.#t.findAll(e).map(({queryKey:t,state:s})=>[t,s.data])}setQueryData(e,t,s){const n=this.defaultQueryOptions({queryKey:e}),r=this.#t.get(n.queryHash)?.state.data,i=ya(t,r);if(i!==void 0)return this.#t.build(this,n).setData(i,{...s,manual:!0})}setQueriesData(e,t,s){return H.batch(()=>this.#t.findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,s)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#t.get(t.queryHash)?.state}removeQueries(e){const t=this.#t;H.batch(()=>{t.findAll(e).forEach(s=>{t.remove(s)})})}resetQueries(e,t){const s=this.#t;return H.batch(()=>(s.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const s={revert:!0,...t},n=H.batch(()=>this.#t.findAll(e).map(r=>r.cancel(s)));return Promise.all(n).then(q).catch(q)}invalidateQueries(e,t={}){return H.batch(()=>(this.#t.findAll(e).forEach(s=>{s.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const s={...t,cancelRefetch:t.cancelRefetch??!0},n=H.batch(()=>this.#t.findAll(e).filter(r=>!r.isDisabled()&&!r.isStatic()).map(r=>{let i=r.fetch(void 0,s);return s.throwOnError||(i=i.catch(q)),r.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(n).then(q)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const s=this.#t.build(this,t);return s.isStaleByTime(be(t.staleTime,s))?s.fetch(t):Promise.resolve(s.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(q).catch(q)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(q).catch(q)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Zt.isOnline()?this.#e.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#t}getMutationCache(){return this.#e}getDefaultOptions(){return this.#s}setDefaultOptions(e){this.#s=e}setQueryDefaults(e,t){this.#n.set(De(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#n.values()],s={};return t.forEach(n=>{vt(e,n.queryKey)&&Object.assign(s,n.defaultOptions)}),s}setMutationDefaults(e,t){this.#i.set(De(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#i.values()],s={};return t.forEach(n=>{vt(e,n.mutationKey)&&Object.assign(s,n.defaultOptions)}),s}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#s.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=wn(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===En&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#s.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#t.clear(),this.#e.clear()}},I=Ei(Cn(),1),L=fa(),Ni=I.createContext(void 0),Di=e=>{const t=I.useContext(Ni);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Ff=({client:e,children:t})=>(I.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,L.jsx)(Ni.Provider,{value:e,children:t})),ji=I.createContext(!1),$a=()=>I.useContext(ji),Lf=ji.Provider;function Ba(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Ua=I.createContext(Ba()),Ha=()=>I.useContext(Ua),za=(e,t,s)=>{const n=s?.state.error&&typeof e.throwOnError=="function"?_n(e.throwOnError,[s.state.error,s]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},Va=e=>{I.useEffect(()=>{e.clearReset()},[e])},qa=({result:e,errorResetBoundary:t,throwOnError:s,query:n,suspense:r})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(r&&e.data===void 0||_n(s,[e.error,n])),Ka=e=>{if(e.suspense){const s=r=>r==="static"?r:Math.max(r??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...r)=>s(n(...r)):s(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Qa=(e,t)=>e.isLoading&&e.isFetching&&!t,Wa=(e,t)=>e?.suspense&&t.isPending,nr=(e,t,s)=>t.fetchOptimistic(e).catch(()=>{s.clearReset()});function Gi(e,t,s){const n=$a(),r=Ha(),i=Di(s),o=i.defaultQueryOptions(e);i.getDefaultOptions().queries?._experimental_beforeQuery?.(o);const a=i.getQueryCache().get(o.queryHash);o._optimisticResults=n?"isRestoring":"optimistic",Ka(o),za(o,r,a),Va(r);const u=!i.getQueryCache().get(o.queryHash),[l]=I.useState(()=>new t(i,o)),c=l.getOptimisticResult(o),h=!n&&e.subscribed!==!1;if(I.useSyncExternalStore(I.useCallback(d=>{const f=h?l.subscribe(H.batchCalls(d)):q;return l.updateResult(),f},[l,h]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),I.useEffect(()=>{l.setOptions(o)},[o,l]),Wa(o,c))throw nr(o,l,r);if(qa({result:c,errorResetBoundary:r,throwOnError:o.throwOnError,query:a,suspense:o.suspense}))throw c.error;return i.getDefaultOptions().queries?._experimental_afterQuery?.(o,c),o.experimental_prefetchInRender&&!St.isServer()&&Qa(c,n)&&(u?nr(o,l,r):a?.promise)?.catch(q).finally(()=>{l.updateResult()}),o.notifyOnChangeProps?c:l.trackResult(c)}function Nf(e,t){return Gi(e,Fi,t)}function Df(e,t){const s=Di(t),[n]=I.useState(()=>new ja(s,e));I.useEffect(()=>{n.setOptions(e)},[n,e]);const r=I.useSyncExternalStore(I.useCallback(o=>n.subscribe(H.batchCalls(o)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),i=I.useCallback((o,a)=>{n.mutate(o,a).catch(q)},[n]);if(r.error&&_n(n.options.throwOnError,[r.error]))throw r.error;return{...r,mutate:i,mutateAsync:r.mutate}}function jf(e,t){return Gi(e,La,t)}var rr=I.use,Mn=I.useLayoutEffect;function _e(e){return e[e.length-1]}function $i(e,t){return typeof e=="function"?e(t):e}var An=Object.prototype.hasOwnProperty;function Bi(e){for(const t in e)if(An.call(e,t))return!0;return!1}var Kt=()=>Object.create(null),Ke=(e,t)=>we(e,t,!0);function we(e,t,s,n=0){if(e===t)return e;if(n++>500)return t;const r=Array.isArray(e)&&Array.isArray(t);if(!r&&!(es(e)&&es(t)))return t;const i=Object.keys(e),o=i.length,a=Object.keys(t),u=a.length;if(r?o!==e.length||u!==t.length||o&&_e(i)!==`${o-1}`||u&&_e(a)!==`${u-1}`:o!==Object.getOwnPropertyNames(e).length||u!==Object.getOwnPropertyNames(t).length||Object.getOwnPropertySymbols(t).length)return t;let l=0,c,h,d;if(r){for(;l<u&&(d=l,h=e[d],c=t[d],c=h===c?h:typeof h=="object"?we(h,c,s,n):c,c===h);l++);if(l===u&&o===u)return e}else{let p=o===u,g=!0;for(;l<u;l++){d=a[l],h=e[d];const v=t[d];c=h===v?h:typeof h=="object"?we(h,v,s,n):v,p&&=c===h&&(i[l]===d||An.call(e,d)),g&&=Object.is(c,v),i[l]=c}if(p)return Object.getOwnPropertySymbols(e).length?t:e;if(g)return t}const f=r?a.fill(0):s?Kt():{};for(let p=0;p<u;p++)d=r?p:a[p],r?(h=e[d],p>l&&(c=t[d],c=h===c?h:typeof h=="object"?we(h,c,s,n):c),f[d]=p<l?h:c):f[d]=i[p];return f}function es(e){return!e||typeof e!="object"?!1:(Object.getPrototypeOf(e)?.constructor??Object)===Object}function ve(e,t,s,n){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++){const o=e[r],a=t[r];if(o!==a&&!ve(o,a,s,n))return!1}return!0}if(es(e)&&es(t)){if(s){for(const i in t)if((n||t[i]!==void 0)&&!ve(e[i],t[i],s,n))return!1;return!0}let r=0;if(n)r=Object.keys(e).length;else for(const i in e)e[i]!==void 0&&r++;for(const i in t)if((n||t[i]!==void 0)&&(r--===0||!ve(e[i],t[i],s,n)))return!1;return r===0}return!1}function Ja(e){return typeof e?.message!="string"?!1:e.message.startsWith("Failed to fetch dynamically imported module")||e.message.startsWith("error loading dynamically imported module")||e.message.startsWith("Importing a module script failed")}var Xa=/[\x00-\x1f\x7f"<>`{}]/g;function Ya(e){return e.replace(Xa,t=>"%"+t.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function ir(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,s=>{try{return decodeURI(s)}catch{return s}})}return Ya(t)}var Za=["http:","https:","mailto:","tel:"];function yt(e){if(e[0]!=="/"&&e.includes(":"))return/^[\x00-\x20]*([a-z][a-z\d+.\t\n\r-]*:)/i.exec(e)?.[1]?.replace(/[\t\n\r]/g,"").toLowerCase()}var Ui=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function Hi(e,t){if(!e)return!1;if(Ui.test(e))return!0;const s=yt(e);return s?!t.has(s):!1}function at(e){if(!e)return e;let t=e;if(/[%\\\x00-\x1f\x7f]/.test(e)){const s=/%25|%5C/gi;let n=0,r;for(t="";(r=s.exec(e))!==null;)t+=ir(e.slice(n,r.index))+r[0],n=s.lastIndex;t+=ir(n?e.slice(n):e)}return t}function el(e){return/[\s\u0080-\uFFFF]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function tl(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let s=0;s<e.length;s++)if(e[s]!==t[s])return!1;return!0}function On(){throw new Error("Invariant failed")}function Ye(e){return e.replace(/\/{2,}/g,"/")}function zi(e){return e==="/"?e:e.replace(/^\/+/,"")}function de(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/+$/,""):e}function Vi(e){return de(zi(e))}function or(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function ar(e,t,s="never",n){if(t.includes("//")&&(t=Ye(t)),t.startsWith("/"))return t.length===1||s==="preserve"?t:s==="always"?t.endsWith("/")?t:`${t}/`:t.endsWith("/")?t.slice(0,-1):t;const r=t===".";let i;if(n){i=r?e:e+"\0"+t;const l=n.get(i);if(l)return l}let o;if(r)o=e.split("/");else{for(e.includes("//")&&(e=Ye(e)),o=e.split("/");o.length>1&&_e(o)==="";)o.pop();const l=t.split("/");for(let c=0,h=l.length;c<h;c++){const d=l[c];d===""?c?c===h-1&&o.push(d):o=[d]:d===".."?o.length>1?o.pop():o=[""]:d==="."||o.push(d)}}o.length>1&&(_e(o)===""?s==="never"&&o.pop():s==="always"&&o.push(""));const a=o.join("/"),u=(r?Ye(a):a)||"/";return i&&n&&n.set(i,u),u}function sl(e){const t=new Map(e.map(n=>[encodeURIComponent(n),n])),s=new RegExp([...t.keys()].join("|").replace(/[.*()]/g,"\\$&"),"g");return n=>n.replace(s,r=>t.get(r)??r)}function nl(e){return e==null||e===""}function rl(e,t,s){if(typeof t!="string")return""+(t??void 0);const n=e==="_splat";if(n&&(!t||/^[a-zA-Z0-9\-._~!/]*$/.test(t)))return t;let r=encodeURIComponent(t);return n&&(r=r.replaceAll("%2F","/")),s?s(r):r}function lr(e,t,s,n,r){const i=e.endsWith("/")?"/":"";let o="";for(const a of t){if(typeof a=="string"){o+=a;continue}const[u,l,c,h]=a,d=u===2,f=d&&h!==void 0?h+i:h;let p=s[l];if(!(u===3&&p==null)){if(r&&(r[l]=p,d&&(r["*"]=p)),d&&nl(p)){if(c==="/"&&!f)continue;p=""}o+=c+rl(l,p,n)+(f||"")}}return o+i||"/"}function et(e){return e?.isNotFound===!0}function il(){try{return sessionStorage}catch{return}}var ol="tsr-scroll-restoration-v1_3",qi=il();function al(){try{return JSON.parse(qi?.getItem("tsr-scroll-restoration-v1_3")||"{}")}catch{return{}}}function ll(){try{qi?.setItem(ol,JSON.stringify(Je))}catch{}}var Je=al(),ur="data-scroll-restoration-id",ul=e=>e.state.__TSR_key||e.href;function cl(e){const t=e.getAttribute(ur);if(t)return`[${ur}="${t}"]`;let s="",n=e,r;for(;r=n.parentNode;){let i=1,o=n;for(;o=o.previousElementSibling;)i++;const a=`${n.localName}:nth-child(${i})`;s=s?`${a} > ${s}`:a,n=r}return s}var xt=!1,Qt="window";function Js(e){try{return typeof e=="function"?e():document.querySelector(e)}catch{}}function cr(e){const t=new Set;for(const s of e){if(s===Qt)continue;const n=Js(s);n&&t.add(n)}return t}function dl(e,t){const s=t??e.options.scrollRestoration,n=e._scroll;s&&(n.restoring=!0);const r=e.options.getScrollRestorationKey||ul,i=new Set,o=a=>{const u=Je[a]||={};for(const l of i)l===document?u[Qt]={scrollX,scrollY}:l.isConnected&&(u[cl(l)]={scrollX:l.scrollLeft,scrollY:l.scrollTop})};s&&!n.restoration&&(n.restoration=!0,xt=!1,history.scrollRestoration="manual",document.addEventListener("scroll",a=>{xt||i.add(a.target)},!0),e.subscribe("onBeforeLoad",a=>{a.fromLocation&&o(r(a.fromLocation)),i.clear()}),addEventListener("pagehide",()=>{o(r(e.stores.resolvedLocation.get()??e.stores.location.get())),ll()})),!n.reset&&(n.reset=!0,e.subscribe("onRendered",a=>{const u=e.options.scrollRestorationBehavior,l=e.options.scrollToTopSelectors,c=n.next,h=n.hash;let d;if(i.clear(),n.next=!0,n.hash=!1,typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return;const f=r(a.toLocation),p=a.fromLocation&&r(a.fromLocation);if(n.restoring&&p&&p!==f){const g=Je[p];if(g){let v=Je[f];for(const m in g){if(m===Qt){if(c)continue}else{const S=Js(m);if(!S||c&&l&&(d??=cr(l),d.has(S)))continue}v||(v=Je[f]={}),v[m]??=g[m]}}}xt=!0;try{const g=a.toLocation.hash,v=a.toLocation.state.__hashScrollIntoViewOptions??!0;let m=!1;if(c){!g&&l&&(d??=cr(l));const S=g&&v&&h,C=n.restoring?Je[f]:void 0;if(C)for(const b in C){const{scrollX:w,scrollY:R}=C[b];if(b===Qt){if(S)continue;scrollTo({top:R,left:w,behavior:u}),m=!0}else{const y=Js(b);y&&(y.scrollLeft=w,y.scrollTop=R,d?.delete(y))}}if(!g){const b={top:0,left:0,behavior:u};if(m||scrollTo(b),d)for(const w of d)w.scrollTo(b)}}!m&&g&&v&&document.getElementById(g)?.scrollIntoView(v)}finally{xt=!1}}))}function hl(e,t=String){let s;for(const n in e){const r=e[n];r!==void 0&&(s||=new URLSearchParams).set(n,t(r))}return s?s.toString():""}function Rs(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function fl(e){const t=new URLSearchParams(e),s=Object.create(null);for(const[n,r]of t.entries()){const i=s[n];i==null?s[n]=Rs(r):Array.isArray(i)?i.push(Rs(r)):s[n]=[i,Rs(r)]}return s}var Ki=/^(?:\s|["[{\d-]|fa|nu|tr)/,pl=ml(JSON.parse),gl=vl(JSON.stringify,JSON.parse);function ml(e){const t=e===JSON.parse;return s=>{s[0]==="?"&&(s=s.substring(1));const n=fl(s);for(const r in n){const i=n[r];if(typeof i=="string"){if(t&&!Ki.test(i))continue;try{n[r]=e(i)}catch{}}}return n}}function vl(e,t){const s=t===JSON.parse;function n(r){if(r&&typeof r=="object")try{return e(r)}catch{}else if(t&&typeof r=="string"){if(s&&!Ki.test(r))return r;try{return t(r),e(r)}catch{}}return r}return r=>{const i=hl(r,n);return i?`?${i}`:""}}var ft="__root__";function Sl(e){e.statusCode=e.statusCode||e.code||307;const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const s=new Response(null,{status:e.statusCode,headers:t});if(s.options=e,e.throw)throw s;return s}function Qi(e){return e instanceof Response&&!!e.options}function ts(e){const t=new Map;let s,n;return{get(r){const i=t.get(r);if(i)return i.visited=!0,i.value},set(r,i){const o=t.get(r);if(o){o.value=i;return}if(t.size>=e){let u=s?.next().value;for(;!u||u.visited;)u?u.visited=!1:s=t.values(),u=s.next().value;u===n&&(s=void 0),t.delete(u.key)}const a={key:r,value:i,visited:!1};n=a,t.set(r,a)},clear(){t.clear(),s=void 0,n=void 0}}}var Re=4,Wi=5;function yl(e){const t=e.names;if(t)return t;const s=[];for(const n of e)typeof n!="string"&&s.push(n[1]);return e.names=s}function Il(e,t,s){const n=e.substring(t,s);if(n.charCodeAt(0)===36)return n.length===1?[2,"_splat","",void 0]:[1,n.substring(1),"",""];const r=n.indexOf("{");if(r>=0){const i=n.indexOf("}",r),o=n.charCodeAt(r+1)===45,a=r+(o?3:2);if(i>=0&&n.charCodeAt(a-1)===36&&(!o||a<i)){const u=n.substring(a,i);return[o?3:u?1:2,u||"_splat",n.substring(0,r),e.substring(t+i+1,u?s:e.length)]}}return n}function It(e,t,s,n,r,i){let o=s;const a=t.fullPath??t.from,u=t.options,l=a.length,c=a.endsWith("/")?l-1:l,h=u?.caseSensitive??e,d=u?.params?.parse??u?.parseParams;let f,p=i?s-1:0;if(!n||a.includes("$")){f=i?.slice()??[];const m=_e(f);m&&typeof m!="string"&&m[0]===2&&(f[f.length-1]=[m[0],m[1],m[2],m[3]===void 0?void 0:m[3]+a.substring(s-(a[s-2]==="/"?2:1),c)],p=l)}for(;o<l;){const m=o,S=a.indexOf("/",m);let C=S===-1?l:S;const b=Il(a,m,C);o=C+1;let w;if(typeof b=="string"){if(!n)continue;let R=b,y;h?y=n.static??=new Map:(R=b.toLowerCase(),y=n.staticInsensitive??=new Map);const _=y.get(R);if(_)w=_;else{const O=Fe(n);w=O,y.set(R,O)}}else{const R=b[0];let y=b[2],_=b[3]??"";if(R===2&&(C=l,o=C+1),f&&p<C&&(p<m-1&&f.push(a.substring(p,m-1)),b[2]="/"+y,R===2&&b[3]!==void 0&&c<l&&(b[3]=_.slice(0,-1)),f.push(b),p=C),!n)continue;const O=h&&!!(y||_);h||(y=y.toLowerCase(),_=_.toLowerCase());const T=R===1?n.dynamic??=[]:R===3?n.optional??=[]:n.wildcard??=[],A=R!==2&&!d&&T.find(M=>!M.parse&&M.caseSensitive===O&&M.prefix===y&&M.suffix===_);if(A)w=A;else{const M=Fe(n,R,O,y,_);w=M,T.push(M),T.length===2&&r?.push(T)}}n=w}f&&p<c&&f.push(a.substring(p,c));const g=f?.slice();if(!n)return g;if(d&&t.children&&!t.isRoot&&t.id&&t.id.charCodeAt(t.id.lastIndexOf("/")+1)===95){const m=Fe(n,Wi);(n.pathless??=[]).push(m),n=m}const v=(t.path||!t.children)&&!t.isRoot;if(v&&c<l){const m=Fe(n,Re);n.index=m,n=m}return n.parse=d??null,n.priority=u?.params?.priority??0,n.route||(n.data=g,v&&(n.route=t)),[n,o,g]}function Ji(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function Fe(e,t=0,s,n,r){return{kind:t,depth:e?e.depth+1:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,data:void 0,parent:e,parse:null,priority:0,caseSensitive:s,prefix:n,suffix:r}}function Rl(e,t){const s=Fe(),n=[];function r(i,o,a,u){const[l,c,h]=It(!1,i,o,a,n,u);if(i.children)for(const d of i.children)r(d,c,l,h)}for(const i of e)r(i,1,s);for(const i of n)i.sort(Ji);t.masksTree=s,t.flatCache=ts(1e3)}function Cl(e,t){e||="/";const s=t.flatCache.get(e);if(s!==void 0)return s;const n=xn(e,t.masksTree);return t.flatCache.set(e,n),n}function bl(e,t,s,n,r){e||="/",n||="/";const i=t?`case\0${e}`:e;let o=r.singleCache.get(i);return o||(o=Fe(),It(t,{from:e},1,o),r.singleCache.set(i,o)),xn(n,o,s)}function wl(e,t,s=!1){const n=s?e:`nofuzz\0${e}`,r=t.matchCache.get(n);if(r!==void 0)return r;e||="/";let i;try{i=xn(e,t.segmentTree,s)}catch(o){if(o instanceof URIError)i=null;else throw o}return i&&(i.branch=Yi(i.route)),t.matchCache.set(n,i),i}function El(e,t=!1){const s=Fe(),n=[],r={},i={};let o=0;function a(u,l,c,h){if(u.init(o),u.id in r&&On(),r[u.id]=u,o!==0&&u.path){const g=de(u.fullPath);(!i[g]||u.fullPath.endsWith("/"))&&(i[g]=u)}o++;const[d,f,p]=It(t,u,l,c,n,h);if(u._interpolation=p,u.children)for(const g of u.children)a(g,f,d,p)}a(e,1,s);for(const u of n)u.sort(Ji);return{processedTree:{segmentTree:s,singleCache:ts(1e3),matchCache:ts(1e3),flatCache:null,masksTree:null},routesById:r,routesByPath:i}}function xn(e,t,s=!1){const n=e.split("/"),r=Tl(e,n,t,s);if(!r)return null;const[i]=Xi(e,n,r);return{route:r.node.route,rawParams:i}}function Xi(e,t,s){const n=_l(s.node),r=s.node.data&&yl(s.node.data),i=Object.create(null);let o=s.extract?.part??0,a=s.extract?.node??0,u=s.extract?.path??0,l=s.extract?.param??0;for(;a<n.length;o++,a++,u++){const c=n[a];if(c.kind===Re)break;if(c.kind===Wi){o--,u--;continue}const h=t[o],d=u;if(h&&(u+=h.length),c.kind===1||c.kind===3){const f=r[l++];if(c.kind===3&&s.skipped&1<<a){o--,u=d-1;continue}const p=c.suffix||c.prefix?h.substring(c.prefix.length,h.length-c.suffix.length):h;(p||c.kind===1)&&(i[f]=decodeURIComponent(p))}else if(c.kind===2){const f=c,p=e.substring(d+f.prefix.length,e.length-f.suffix.length),g=decodeURIComponent(p);i["*"]=g,i._splat=g;break}}return s.rawParams&&Object.assign(i,s.rawParams),[i,{part:o,node:a,path:u,param:l}]}function Yi(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function _l(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function Tl(e,t,s,n){if(e==="/"&&s.index)return{node:s.index,skipped:0};const r=!_e(t),i=r&&e!=="/",o=t.length-(r?1:0),a=[{node:s,index:1,skipped:0,statics:0,dynamics:0,optionals:0}];let u=null,l=null;for(;a.length;){const c=a.pop(),{node:h,index:d,skipped:f,statics:p,dynamics:g,optionals:v}=c;let{extract:m,rawParams:S}=c;if(h.kind===2&&h.route&&!kt(l,c))continue;if(h.parse){if(!dr(e,t,c))continue;S=c.rawParams,m=c.extract}n&&h.route&&h.kind!==Re&&kt(u,c)&&(u=c);const C=d===o;if(C&&(h.route&&(!i||h.kind===Re||h.kind===2)&&kt(l,c)&&(l=c),!h.optional&&!h.wildcard&&!h.index&&!h.pathless))continue;const b=C?void 0:t[d];let w;if(C&&h.index){const R={node:h.index,index:d,skipped:f,statics:p,dynamics:g,optionals:v,extract:m,rawParams:S};let y=!0;if(h.index.parse&&(dr(e,t,R)||(y=!1)),y){if(!g&&!v&&!f&&Ml(p,o))return R;kt(l,R)&&(l=R)}}if(h.wildcard)for(let R=h.wildcard.length-1;R>=0;R--){const y=h.wildcard[R],{prefix:_,suffix:O}=y;if(!(_&&(C||!(y.caseSensitive?b:w??=b.toLowerCase()).startsWith(_)))){if(O){if(C)continue;const T=t.slice(d).join("/"),A=T.slice(-O.length);if((y.caseSensitive?A:A.toLowerCase())!==O||T.length-O.length<_.length)continue}a.push({node:y,index:o,skipped:f,statics:p,dynamics:g,optionals:v,extract:m,rawParams:S})}}if(h.optional){const R=f|1<<h.depth+1;for(let y=h.optional.length-1;y>=0;y--){const _=h.optional[y];a.push({node:_,index:d,skipped:R,statics:p,dynamics:g,optionals:v,extract:m,rawParams:S})}if(!C)for(let y=h.optional.length-1;y>=0;y--){const _=h.optional[y],{prefix:O,suffix:T}=_;if(O||T){const A=_.caseSensitive?b:w??=b.toLowerCase();if(O&&!A.startsWith(O)||T&&A.indexOf(T,A.length-T.length)<O.length)continue}a.push({node:_,index:d+1,skipped:f,statics:p,dynamics:g,optionals:v+Pt(o,d),extract:m,rawParams:S})}}if(!C&&h.dynamic&&b)for(let R=h.dynamic.length-1;R>=0;R--){const y=h.dynamic[R],{prefix:_,suffix:O}=y;if(_||O){const T=y.caseSensitive?b:w??=b.toLowerCase();if(_&&!T.startsWith(_)||O&&T.indexOf(O,T.length-O.length)<_.length)continue}a.push({node:y,index:d+1,skipped:f,statics:p,dynamics:g+Pt(o,d),optionals:v,extract:m,rawParams:S})}if(!C&&h.staticInsensitive){const R=h.staticInsensitive.get(w??=b.toLowerCase());R&&a.push({node:R,index:d+1,skipped:f,statics:p+Pt(o,d),dynamics:g,optionals:v,extract:m,rawParams:S})}if(!C&&h.static){const R=h.static.get(b);R&&a.push({node:R,index:d+1,skipped:f,statics:p+Pt(o,d),dynamics:g,optionals:v,extract:m,rawParams:S})}if(h.pathless)for(let R=h.pathless.length-1;R>=0;R--){const y=h.pathless[R];a.push({node:y,index:d,skipped:f,statics:p,dynamics:g,optionals:v,extract:m,rawParams:S})}}if(l)return l;if(n&&u){let c=u.index;for(let d=0;d<u.index;d++)c+=t[d].length;const h=c===e.length?"/":e.slice(c);return u.rawParams??=Object.create(null),u.rawParams["**"]=decodeURIComponent(h),u}return null}function Pt(e,t){return 2**(e-t-1)}function Ml(e,t){return e===2**(t-1)-1}function dr(e,t,s){let n,r;try{[n,r]=Xi(e,t,s)}catch{return null}if(s.rawParams=n,s.extract=r,!s.node.parse)return!0;try{if(s.node.parse(n)===!1)return null}catch{}return!0}function kt(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===Re)>(e.node.kind===Re)||t.node.kind===Re==(e.node.kind===Re)&&t.node.depth>e.node.depth))):!0}function Al(e,t,s){const n=Vi(e),r=`/${n}`,i=t?r:r.toLowerCase(),o=`${i}/`,a={input:({url:u})=>{const l=t?u.pathname:u.pathname.toLowerCase();return l===i?u.pathname="/":l.startsWith(o)&&(u.pathname=u.pathname.slice(r.length)),u},output:({url:u})=>(u.pathname=Ye(`/${n}${u.pathname}`),u)};return s?{input:({url:u})=>Xs(s,a.input({url:u})),output:({url:u})=>a.output({url:Zi(s,u)})}:a}function Xs(e,t){const s=e?.input?.({url:t});if(s){if(typeof s=="string")return new URL(s);if(s instanceof URL)return s}return t}function Zi(e,t){const s=e?.output?.({url:t});if(s){if(typeof s=="string")return new URL(s);if(s instanceof URL)return s}return t}function Ol(e,t){const{createMutableStore:s,createReadonlyStore:n,batch:r}=t,i=new Map,o=s("idle"),a=s(e),u=s(void 0),l=s([]),c=n(()=>l.get().map(g=>i.get(g).get())),h=n(()=>({status:o.get(),isLoading:o.get()==="pending",matches:c.get(),location:a.get(),resolvedLocation:u.get()}));function d(g){let v=i.get(g);return v||(v=s(void 0),i.set(g,v)),v}const f={status:o,location:a,resolvedLocation:u,ids:l,matches:c,byRoute:i,__store:h,getMatchStore:d,setMatches:p};function p(g){const v=l.get(),m=g.map(S=>S.routeId);r(()=>{tl(v,m)||l.set(m);for(const S of v)m.includes(S)||i.get(S).set(()=>{});for(const S of g){const C=d(S.routeId);C.get()!==S&&C.set(S)}})}return f}var Ee="__TSR_index",hr="popstate",fr="beforeunload",xl=/^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/;function Wt(e){const t=xl.exec(e);return t?"/"+e.slice(t[0].length):e}function eo(e){return/[\x00-\x1f\x7f]/.test(e)&&(e=e.replace(/[\x00-\x1f\x7f]/g,t=>`
|
|
2
2
|
\r`.includes(t)?"":encodeURIComponent(t))),Wt(e)}function Pl(e){let t=e.getLocation();const s=new Set,n=o=>{t=e.getLocation(),s.forEach(a=>a({location:t,action:o}))},r=o=>{e.notifyOnIndexChange??!0?n(o):t=e.getLocation()},i=async({task:o,navigateOpts:a,...u})=>{if(a?.ignoreBlocker??!1){o();return}const l=e.getBlockers?.()??[],c=u.type==="PUSH"||u.type==="REPLACE";if(typeof document<"u"&&l.length&&c)for(const h of l){const d=ss(u.path,u.state);if(await h.blockerFn({currentLocation:t,nextLocation:d,action:u.type})){e.onBlocked?.();return}}o()};return{get location(){return t},get length(){return e.getLength()},subscribers:s,subscribe:o=>(s.add(o),()=>{s.delete(o)}),push:(o,a,u)=>{const l=t.state[Ee];a=pr(l+1,a),i({task:()=>{e.pushState(o,a),n({type:"PUSH"})},navigateOpts:u,type:"PUSH",path:o,state:a})},replace:(o,a,u)=>{const l=t.state[Ee];a=pr(l,a),i({task:()=>{e.replaceState(o,a),n({type:"REPLACE"})},navigateOpts:u,type:"REPLACE",path:o,state:a})},go:(o,a)=>{i({task:()=>{e.go(o,a?.ignoreBlocker??!1),r({type:"GO",index:o})},navigateOpts:a,type:"GO"})},back:o=>{i({task:()=>{e.back(o?.ignoreBlocker??!1),r({type:"BACK"})},navigateOpts:o,type:"BACK"})},forward:o=>{i({task:()=>{e.forward(o?.ignoreBlocker??!1),r({type:"FORWARD"})},navigateOpts:o,type:"FORWARD"})},canGoBack:()=>t.state[Ee]!==0,createHref:o=>e.createHref(o),block:o=>{if(!e.setBlockers)return()=>{};const a=e.getBlockers?.()??[];return e.setBlockers([...a,o]),()=>{const u=e.getBlockers?.()??[];e.setBlockers?.(u.filter(l=>l!==o))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:n,_getBlockers:()=>e.getBlockers?.()??[]}}function pr(e,t){const s=Pn();return{...t,key:s,__TSR_key:s,[Ee]:e}}function kl(e){const t=e?.window??(typeof document<"u"?window:void 0),s=t.history.pushState,n=t.history.replaceState;let r=[];const i=()=>r,o=y=>r=y,a=y=>eo(e?.createHref?e.createHref(y):y),u=e?.parseLocation??(()=>ss(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const y=Pn();t.history.replaceState({[Ee]:0,key:y,__TSR_key:y},"")}let l=u(),c,h=!1,d=!1,f=!1,p=!1;const g=()=>l;let v;const m=()=>{v&&(R._ignoreSubscribers=!0,(v[2]?t.history.pushState:t.history.replaceState)(v[1],"",v[0]),R._ignoreSubscribers=!1,v=void 0,c=void 0)},S=(y,_,O)=>{const T=e?.createHref?a(_):void 0,A=!!v;A||(c=l),l=ss(_,O),v=[T??l.href,O,v?.[2]||y],A||queueMicrotask(()=>m())},C=y=>{l=u(),R.notify({type:y})},b=async()=>{if(p=!1,d){d=!1;return}const y=u(),_=y.state[Ee]-l.state[Ee],O=_===1,T=_===-1,A=!O&&!T||h;h=!1;const M=A?"GO":T?"BACK":"FORWARD",x=A?{type:"GO",index:_}:{type:T?"BACK":"FORWARD"};if(f)f=!1;else{const P=i();if(typeof document<"u"&&P.length){for(const E of P)if(await E.blockerFn({currentLocation:l,nextLocation:y,action:M})){d=!0,t.history.go(-_),R.notify(x);return}}}l=u(),R.notify(x)},w=y=>{if(p){p=!1;return}let _=!1;const O=i();if(typeof document<"u"&&O.length)for(const T of O){const A=T.enableBeforeUnload??!0;if(A===!0){_=!0;break}if(typeof A=="function"&&A()===!0){_=!0;break}}if(_)return y.preventDefault(),y.returnValue=""},R=Pl({getLocation:g,getLength:()=>t.history.length,pushState:(y,_)=>S(!0,y,_),replaceState:(y,_)=>S(!1,y,_),back:y=>(y&&(f=!0,p=!0),t.history.back()),forward:y=>{y&&(f=!0,p=!0),t.history.forward()},go:(y,_)=>{h=!0,_&&(f=!0,p=!0),t.history.go(y)},createHref:y=>a(y),flush:m,destroy:()=>{t.history.pushState=s,t.history.replaceState=n,t.removeEventListener(fr,w,{capture:!0}),t.removeEventListener(hr,b)},onBlocked:()=>{c&&l!==c&&(l=c)},getBlockers:i,setBlockers:o,notifyOnIndexChange:!1});return R._ignoreNextBeforeUnload=y=>{p=!1;try{y=new URL(y,t.document.baseURI).href,p=/^https?:/.test(y)&&(!y.includes("#")||y.split("#")[0]!==t.location.href.split("#")[0])}catch{}},t.addEventListener(fr,w,{capture:!0}),t.addEventListener(hr,b),t.history.pushState=function(...y){const _=s.apply(t.history,y);return R._ignoreSubscribers||C("PUSH"),_},t.history.replaceState=function(...y){const _=n.apply(t.history,y);return R._ignoreSubscribers||C("REPLACE"),_},R}function ss(e,t){const s=eo(e),n=s.indexOf("#"),r=s.indexOf("?");if(!t){const i=Pn();t={[Ee]:0,key:i,__TSR_key:i}}return{href:s,pathname:s.substring(0,n>0?r>0?Math.min(n,r):n:r>0?r:s.length),hash:n>-1?s.substring(n):"",search:r>-1?s.slice(r,n===-1?void 0:n):"",state:t}}function Pn(){return(Math.random()+1).toString(36).substring(7)}function Cs(e,t){return e.protocol!=="http:"&&e.protocol!=="https:"||e.origin!==t||!!e.username||!!e.password}function bs(e){return e.pathname+e.search+e.hash}function gr(e){return e.options.loader||e.options.beforeLoad||e.lazyFn||e.options.component?.preload||e.options.pendingComponent?.preload}function us(e,t){return{fromLocation:t,toLocation:e,pathChanged:t?.pathname!==e.pathname,hrefChanged:t?.href!==e.href,hashChanged:t?.hash!==e.hash}}function mr({key:e,__TSR_key:t,__TSR_index:s,__hashScrollIntoViewOptions:n,...r}){return r}function Fl(e){return e.findIndex(t=>t.status==="error"||t.status==="notFound"||t._notFound)+1}function Ll(e,t,s,n,r,i){n&&(t=t.slice(0,n)),r&&(s=s.slice(0,r));for(const o of t){if(i&&e._tx!==i)return;s.some(a=>a.routeId===o.routeId)||e.routesById[o.routeId].options.onLeave?.(o)}for(const o of s){if(i&&e._tx!==i)return;e.routesById[o.routeId].options[t.some(a=>a.routeId===o.routeId)?"onStay":"onEnter"]?.(o)}}var Nl=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.startTransition=async s=>(s(),!1),this.update=s=>{const n=this.options;this.options={...n,...s},this.isServer=this.options.isServer??!1??typeof document>"u",this.staticLocations=new WeakMap,this.protocolAllowlist=new Set(this.options.protocolAllowlist),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=kl()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost");const r=this.options.basepath??"/",i=this.options.rewrite,o=this.basepath!==r||n?.rewrite!==i||n?.caseSensitive!==this.options.caseSensitive;if(o&&(this.basepath=r,this.rewrite=r!=="/"&&Vi(r)?Al(r,this.options.caseSensitive,i):i),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let a;a=this.buildRouteTree(),this.setRoutes(a)}if(this.stores)o&&this.stores.location.set(this.latestLocation);else if(this.latestLocation){const a=this.getStoreConfig(this);this.batch=a.batch,this.stores=Ol(this.latestLocation,a),dl(this)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const s=El(this.routeTree,this.options.caseSensitive);return this.options.routeMasks&&Rl(this.options.routeMasks,s.processedTree),{...s,resolvePathCache:ts(1e3)}},this.subscribe=(s,n)=>{const r={eventType:s,fn:n};return this.subscribers.add(r),()=>{this.subscribers.delete(r)}},this.emit=s=>{for(const n of this.subscribers)if(n.eventType===s.type)try{n.fn(s)}catch(r){console.error(r)}},this.parseLocation=(s,n)=>{const r=({pathname:u,search:l,hash:c,href:h},d)=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(u)){const v=this.options.parseSearch(l),m=this.options.stringifySearch(v);return{href:u+m+c,publicHref:u+m+c,pathname:at(u),external:!1,searchStr:m,search:Ke(n?.search,v),hash:at(c.slice(1)),state:we(n?.state,d)}}const f=Xs(this.rewrite,new URL(h,this.origin)),p=this.options.parseSearch(f.search),g=this.options.stringifySearch(p);return f.search=g,{href:f.href.replace(f.origin,""),publicHref:h,pathname:at(Wt(f.pathname)),external:!!this.rewrite&&Cs(f,this.origin),searchStr:g,search:Ke(n?.search,p),hash:at(f.hash.slice(1)),state:we(n?.state,d)}},i=r(s,s.state),{__tempLocation:o,__tempKey:a}=i.state;if(o&&(!a||a===this.tempLocationKey)){const u=r(o,{...o.state,__tempLocation:void 0,key:i.state.key,__TSR_key:i.state.__TSR_key});return u.maskedLocation=i,u}return i},this.matchRoutes=(s,n,r)=>typeof s=="string"?this.matchRoutesInternal({pathname:s,search:n},r):this.matchRoutesInternal(s,n),this.getMatchedRoutes=s=>{const n=Object.create(null),r=wl(de(s),this.processedTree,!0);return r&&Object.assign(n,r.rawParams),[r?.branch||[this.routesById.__root__],n,r?.route]},this.buildLocation=s=>{{const o=this.staticLocations.get(s);if(o)return o}let n=!1;const r=(o={})=>{if(o.href){const P=ss(o.href,{});o={...o,to:Xs(this.rewrite,new URL(P.pathname,this.origin)).pathname,search:this.options.parseSearch(P.search),hash:P.hash.slice(1)}}const a=o._fromLocation||this._pendingLocation||this.latestLocation;let u;const l=()=>(n=!0,a),c=()=>(n=!0,u??=this.matchRoutesLightweight(a)),h=o.to?`${o.to}`:".",d=ar(h[0]==="/"?"":o.unsafeRelative==="path"?l().pathname:o.from??c()[1],h,this.options.trailingSlash,this.resolvePathCache),f=this.routesByPath[de(d)],p=d.includes("$");let g;if(f)g=f._branch??=Yi(f);else if(p)g=[];else{const[P,E,G]=this.getMatchedRoutes(d);g=P,this.options.notFoundRoute&&(!G||G.path!=="/"&&E["**"])&&(g=[...g,this.options.notFoundRoute])}const v=p?f?._interpolation??It(!1,{fullPath:d},0):void 0;let m;for(const P of g){const E=P.options.params?.stringify??P.options.stringifyParams;if(E){const G=c()[3];if(m??=ws(o.params,G),!Bi(m))break;m===G&&(m=Object.assign(Kt(),m));try{Object.assign(m,E(m))}catch{}}}m??=ws(o.params,jl(o.params,v)?c()[3]:Es);const S=s.leaveParams?d:Wt(at(v?lr(d,v,m,this.pathParamsDecoder):d)),C=Gl(g,s._includeValidateSearch),b=()=>{let P=c()[2];if(s._includeValidateSearch&&this.options.search?.strict){const E={};g.forEach(G=>{if(G.options.validateSearch)try{Object.assign(E,Jt(G.options.validateSearch,{...E,...P}))}catch{}}),P=E}return P},w=C.length?$l(C,b(),o):o.search===!0?b():typeof o.search=="function"?o.search(b()):o.search||Es,R=this.options.stringifySearch(w),y=o.hash===!0?l().hash:typeof o.hash=="function"?o.hash(l().hash):o.hash||void 0,_=y?`#${y}`:"",O=o.state?o.state===!0?l().state:typeof o.state=="function"?o.state(l().state):o.state:Es,T=`${S}${R}${_}`;let A,M,x=!1;if(this.rewrite){const P=new URL(T,this.origin),E=P.origin,G=Zi(this.rewrite,P);A=bs(P),Cs(G,E)?(M=G.href,x=!0):M=Wt(bs(G))}else A=el(T),M=A;return{publicHref:M,href:A,pathname:S,search:w,searchStr:R,state:O,hash:y??"",external:x,unmaskOnReload:o.unmaskOnReload}},i=r(s);if(s.mask)i.maskedLocation=r({from:s.from,...s.mask});else if(this.options.routeMasks){const o=Cl(i.pathname,this.processedTree);if(o){const a=Object.assign(Kt(),o.rawParams),{from:u,params:l,...c}=o.route,h=ws(l,a);i.maskedLocation=r({from:s.from,...c,params:h})}}return!n&&s._fromLocation&&!i.maskedLocation&&this.staticLocations.set(s,i),i},this.commitLocation=async({viewTransition:s,ignoreBlocker:n,...r})=>{const i=r.maskedLocation??r;if(i.external)return vr(this,i.publicHref,{replace:r.replace,ignoreBlocker:n});let o;const a=de(this.latestLocation.href)===de(r.href)&&ve(mr(r.state),mr(this.latestLocation.state)),u=this._commitPromise;let l;const c=new Promise(h=>{l=h});if(c.resolve=()=>{l(),u?.resolve()},this._commitPromise=c,a)this.load();else{let{maskedLocation:h,hashScrollIntoView:d,...f}=r;h&&(f={...h,state:{...h.state,__tempKey:void 0,__tempLocation:{...f,search:f.searchStr,state:{...f.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(f.unmaskOnReload??this.options.unmaskOnReload??!1)&&(f.state.__tempKey=this.tempLocationKey)),f.state={...f.state,__hashScrollIntoViewOptions:d??this.options.defaultHashScrollIntoView??!0},this.shouldViewTransition=s,o=r.replace?"REPLACE":"PUSH",this.history[o==="REPLACE"?"replace":"push"](f.publicHref,f.state,{ignoreBlocker:n}),this.history.subscribers.size||this.load({action:{type:o}})}return this._scroll.next=r.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:s,resetScroll:n,hashScrollIntoView:r,viewTransition:i,ignoreBlocker:o,...a}={})=>{const u=this.buildLocation({...a,_includeValidateSearch:!0});this._pendingLocation=u;const l=this.commitLocation({...u,viewTransition:i,replace:s,resetScroll:n,hashScrollIntoView:r,ignoreBlocker:o});return queueMicrotask(()=>{this._pendingLocation===u&&(this._pendingLocation=void 0)}),l},this.navigate=async({to:s,reloadDocument:n,href:r,publicHref:i,...o})=>{const a=r?yt(r):void 0;if(a||n){if(s!==void 0||!r){const l=this.buildLocation({to:s,...o}),c=l.maskedLocation??l;r??=c.publicHref,i??=c.publicHref}return vr(this,!a&&i?i:r,o)}return this.buildAndCommitLocation({...o,href:r,to:s,_isNavigate:!0})},this.load=async s=>{this.updateLatestLocation(),s?.action&&(this._scroll.hash=s.action.type==="PUSH"||s.action.type==="REPLACE"),await Wl(this,s)},this.startViewTransition=s=>{const n=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,n&&typeof document.startViewTransition=="function"){let r;if(typeof n=="object"&&window.CSS?.supports?.("selector(:active-view-transition-type(a))")){const i=this.latestLocation,o=this.stores.resolvedLocation.get(),a=typeof n.types=="function"?n.types(us(i,o)):n.types;if(a===!1)return s();r={update:s,types:a}}else r=s;return document.startViewTransition(r).updateCallbackDone}return s()},this.invalidate=s=>{const n=this._committed,r=s?.filter,i=this._preloads,o=new Set,a=c=>{(!r||r(c))&&o.add(c.id)};n.forEach(a),this._cache.forEach(a),i?.forEach(c=>c.forEach(a)),this._tx?.[3].forEach(a);const u=[];for(const[c,h]of i??[])h.some(d=>o.has(d.id))&&(i.delete(c),u.push(c));const l=c=>{if(o.has(c.id)){const h=this.routesById[c.routeId],d={...c,invalid:!0,...(s?.forcePending||c.status==="error"||c.status==="notFound")&&gr(h)?{status:"pending",error:void 0}:void 0};return c._flight=void 0,d}return c};this._committed=n.map(l);for(const[c,h]of this._cache)o.has(c)&&(h.invalid=!0,s?.forcePending&&(h.status="pending"));for(const c of o)this._flights?.delete(c);for(const c of u)c.abort();return this.shouldViewTransition=!1,this.load({sync:s?.sync})},this.resolveRedirect=s=>{const n=s.options;let r=s.headers.get("Location")||n.href;if(!r){const o=this.buildLocation(n);r=(o.maskedLocation??o).publicHref||"/"}let i;if(Ui.test(r)||(i=yt(r))&&!this.protocolAllowlist.has(i))throw new Error("Redirect blocked: unsafe protocol");if(i==="http:"||i==="https:"){const o=new URL(r);o.pathname.startsWith("//")?r=o.href:Cs(o,this.origin)||(r=bs(o),i=void 0)}return i&&(n.reloadDocument=!0),n.href=r,s.headers.set("Location",r),s},this.clearCache=s=>{const n=this._cache,r=this._preloads,i=s?.filter,o=[],a=[];for(const[l,c]of n)(!i||i(c))&&(a.push(l),o.push(c));const u=[];for(const[l,c]of r??[])(!i||c.some(i))&&(u.push(l),o.push(...c));for(const l of a)n.delete(l);for(const l of u)r.delete(l);for(const l of o){const c=l._flight;l._flight=void 0,c&&!--c[2]&&(this._flights?.get(l.id)===c&&this._flights.delete(l.id),u.push(c[1]))}for(const l of u)l.abort()},this.loadRouteChunk=Ze,this.preloadRoute=s=>Jl(this,s),this.matchRoute=(s,n)=>{const r={...s,to:s.to?ar(s.from||"",s.to,this.options.trailingSlash,this.resolvePathCache):void 0,params:s.params||{},leaveParams:!0},i=this.buildLocation(r),o=this.stores.status.get()==="pending";if(n?.pending&&!o)return!1;const a=n?.pending??!o?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),u=bl(i.pathname,n?.caseSensitive??!1,n?.fuzzy??!1,a.pathname,this.processedTree);return!u||s.params&&!ve(u.rawParams,s.params,!0)?!1:n?.includeSearch??!0?ve(a.search,i.search,!0)?u.rawParams:!1:u.rawParams},this.getStoreConfig=t,e.pathParamsAllowedCharacters?.length&&(this.pathParamsDecoder=sl(e.pathParamsAllowedCharacters)),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??gl,parseSearch:e.parseSearch??pl,protocolAllowlist:e.protocolAllowlist??Za}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes(e){Object.assign(this,e),this.lightweightCache=new WeakMap,this.staticLocations=new WeakMap;const t=this.options.notFoundRoute;t&&(t.init(99999999999),this.routesById[t.id]!==t&&(t._interpolation=It(!1,t,0)),this.routesById[t.id]=t)}matchRoutesInternal(e,t){const[s,n,r]=this.getMatchedRoutes(e.pathname);let i=s,o=!1;(r?r.path!=="/"&&n["**"]:de(e.pathname))&&(this.options.notFoundRoute?i=[...i,this.options.notFoundRoute]:o=!0);const a=o?Bl(this.options.notFoundMode,i):void 0,u=new Array(i.length),l=this._committed,c=(d,f)=>{const p=l[f];return p?.routeId===d.id?p:d===this.options.notFoundRoute?l.find(g=>g.routeId===d.id):void 0};let h;for(let d=0;d<i.length;d++){const f=i[d],p=u[d-1];let g,v,m;{const x=p?.search??e.search,P=p?._strictSearch??void 0;try{const E=Jt(f.options.validateSearch,{...x})??void 0;g={...x,...E},v={...P,...E}}catch(E){let G=E;if(E instanceof ns||(G=new ns(E.message,{cause:E})),t?.throwOnError)throw G;g=x,v={},m=G}}let S="",C="";try{S=f.options.loaderDeps?.({search:g})??"",C=S&&JSON.stringify(S)||""}catch(x){if(t?.throwOnError)throw x;m??=x}const b=Kt(),w=f._interpolation?lr(f.fullPath,f._interpolation,n,this.pathParamsDecoder,b):f.fullPath,R=f.id+w+C,y=c(f,d),_=this._cache.get(R)??(y?.id===R?y:void 0);h=_?._strictParams??Object.assign(b,h);let O;if(!_)try{Sr(f,h)}catch(x){if(et(x)||Qi(x)?O=x:O=new Dl(x.message,{cause:x}),t?.throwOnError)throw O}const T=y?"stay":"enter";let A;if(_)A={..._,cause:T,search:Ke(y?y.search:_.search,g),_strictSearch:v,searchError:m};else{const x=gr(f)?"pending":"success";A={id:R,ssr:f.options.ssr,index:d,routeId:f.id,params:y?.params??h,_strictParams:h,pathname:w,updatedAt:Date.now(),search:y?Ke(y.search,g):g,_strictSearch:v,searchError:m,status:x,isFetching:!1,error:void 0,paramsError:O,context:{},abortController:t?._controller??new AbortController,cause:T,loaderDeps:y?we(y.loaderDeps,S):S,invalid:!1,preload:!1,staticData:f.options.staticData||{},fullPath:f.fullPath}}const M=a===f.id;A._notFound&&!M&&(A.error=void 0),A._notFound=M,u[d]=A}for(let d=0;d<u.length;d++){const f=u[d];f.params=f.cause==="stay"?Ke(f.params,h):h,t?._controller&&(f.context={})}return u}matchRoutesLightweight(e){const t=_e(this.stores.ids.get()),s=t?this.stores.byRoute.get(t).get():void 0,n=s?.id,r=this.lightweightCache.get(e);if(r&&r[0]===n)return r[1];const[i,o]=this.getMatchedRoutes(e.pathname),a=_e(i),u={...e.search};for(const d of i)try{Object.assign(u,Jt(d.options.validateSearch,u))}catch{}const l=s&&s.routeId===a.id&&s.pathname===e.pathname;let c;if(l)c=s.params;else{const d=o;for(const f of i)try{Sr(f,d)}catch{}c=d}const h=[i,a.fullPath,u,c];return this.lightweightCache.set(e,[n,h]),h}};async function vr(e,t,{replace:s,ignoreBlocker:n}){if(!Hi(t,e.protocolAllowlist)){if(!n){const r=e.history._getBlockers();for(const i of r)if(i?.blockerFn&&await i.blockerFn({currentLocation:e.history.location,nextLocation:e.history.location,action:s?"REPLACE":"PUSH"}))return}e.history._ignoreNextBeforeUnload?.(t),s?window.location.replace(t):window.location.href=t}}var ns=class extends Error{},Dl=class extends Error{};function Jt(e,t){if(e==null)return{};if("~standard"in e){const s=e["~standard"].validate(t);if(s instanceof Promise)throw new ns("Async validation not supported");if(s.issues)throw new ns(JSON.stringify(s.issues,void 0,2),{cause:s});return s.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function ws(e,t){if(e===void 0||e===!0)return t;const s=Object.create(null);return e===!1||e===null?s:typeof e=="function"?(Object.assign(s,t),Object.assign(s,e(s))):Object.assign(s,t,e)}function jl(e,t){return typeof e=="function"?!0:!t||e===!1||e===null?!1:e===void 0||e===!0||t.some(s=>typeof s!="string"&&!An.call(e,s[1]))}var Es=Object.freeze({});function Gl(e,t){const s=[];for(let n=0;n<e.length;n++){const r=e[n].options;if("search"in r)r.search?.middlewares&&s.push(...r.search.middlewares);else if(r.preSearchFilters||r.postSearchFilters){const o=({search:a,next:u})=>{const l=u(r.preSearchFilters?r.preSearchFilters.reduce((c,h)=>h(c),a):a);return r.postSearchFilters?r.postSearchFilters.reduce((c,h)=>h(c),l):l};s.push(o)}const i=r.validateSearch;if(t&&i){const o=({search:a,next:u,meta:l})=>{const c=u(a);try{const h=Jt(i,c);if(l&&h)for(const d in h)d in c||(l.defaulted||=new Map).set(d,h[d]);return{...c,...h}}catch{}return c};s.push(o)}}return s}function $l(e,t,s){const n=(r,i,o)=>{if(r>=e.length){if(!s.search)return{};if(s.search===!0)return i;const u=$i(s.search,i);return o&&(o.explicit=u),u}const a=(u,l)=>{if(l){const c=o||{};return{search:n(r+1,u,c),meta:c}}return n(r+1,u,o)};return e[r]({search:i,next:a,meta:o})};return n(0,t)}function Bl(e,t){if(e!=="root"){let s;for(let n=t.length-1;n>=0;n--){const r=t[n];if(r.options.notFoundComponent)return r.id;s||=r.children&&r.id}if(s)return s}return ft}function Sr(e,t){const s=e.options.params?.parse??e.options.parseParams;s&&Object.assign(t,s(t))}function Ys(e,t){return e.options[t]?.preload?.()}function Ul(e,t){const s=Ys(e,"component");let n=Ys(e,"pendingComponent");return t&&(n?n=n.then(t):t()),s&&n?Promise.all([s,n]).then(()=>{}):s??n}function Ze(e,t,s){const n=()=>t===!1?void 0:t?Ys(e,t):Ul(e,s),r=e._lazy;if(r)return r===!0?n():r.then(n);if(!e.lazyFn)return n();const i=e.lazyFn().then(o=>{{const{id:a,...u}=o.options;Object.assign(e.options,u),e._lazy=!0}},o=>{throw e._lazy=void 0,o});return e._lazy=i,i.then(n)}function kn(e){const t=e.findIndex(s=>s.status!=="success"||s._notFound)+1;return t&&t<e.length?e.slice(0,t):e}var he=0,Se=1,cs=2,K=3,Te=[4];function Rt(e){return typeof e[0]=="number"}function $e(e,t){return t.aborted?Promise.race([Promise.reject(t),e]):new Promise((s,n)=>{const r=()=>n(t);t.addEventListener("abort",r,{once:!0}),Promise.resolve(e).then(s,n).then(()=>t.removeEventListener("abort",r))})}function Be(e,t){return e.routesById[t.routeId]}function Ct(e,t,s){return Qi(e)?[K,e]:et(e)?(e.routeId||=s,[cs,e]):t?(typeof e?.then=="function"&&(e=new Error("A Promise was thrown",{cause:e})),[Se,e]):[he,e]}function Fn(e,t){let s=Ct(t,!0,e.id);if(s[0]!==Se)return s;try{e.options.onError?.(s[1])}catch(n){s=Ct(n,!0,e.id)}return s}function pt(e,t,s,n,r){return r[0].signal.aborted?Te:Dn(e,t,s,Fn(s,n),r)}async function Hl(e,t,s,n,r,i){const[o,a]=t,u=s[0].signal,l=!!s[3];for(let c=s[6]??0;c<n;c++){const h=a[c],d=Be(e,h);h.abortController=s[0];const f=a[c-1]?.context??e.options.context??{},p={params:h.params,location:o,navigate:S=>e.navigate({...S,_fromLocation:o}),buildLocation:e.buildLocation,cause:l?"preload":h.cause,abortController:s[0],preload:l,matches:a,routeId:d.id};try{const S=h._ctx||=d.options.context?d.options.context({...p,deps:h.loaderDeps,context:f})||{}:void 0;h.context={...f,...S}}catch(S){return me(e,h),[c,pt(e,t,d,S,s)]}if(u.aborted)return[c,Te];const g=h.paramsError??h.searchError;if(g!==void 0)return me(e,h),[c,pt(e,t,d,g,s)];const v=d.options.beforeLoad;if(!v)continue;const m=h.status;c>=i&&(h.status="pending",s[7]?.());try{bt(e,h,"beforeLoad",s[0]);const S=v({...p,search:h.search,context:h.context,...e.options.additionalContext}),C=await(typeof S?.then=="function"?$e(S,u):S);if(u.aborted)return[c,Te];const b=Dn(e,t,d,Ct(C,!1,d.id),s);if(b[0]!==he)return me(e,h),[c,b];h.context={...h.context,...C}}catch(S){return me(e,h),[c,pt(e,t,d,S,s)]}finally{h.status=m,bt(e,h,!1,s[0])}}r()}function Ln(e,t,s){if(!(!s||--s[2])){if(e._flights?.get(t.id)===s){const n=e._tx;if(n&&!n[0].signal.aborted&&!n[3].includes(t)&&n[3].some(r=>r.id===t.id)&&n[3].some(r=>r.isFetching==="beforeLoad"))return;e._flights.delete(t.id)}return s[1]}}function me(e,t){const s=t._flight;t._flight=void 0,Ln(e,t,s)?.abort()}function W(e,t,s,n){const r=[];for(const i of t)if(!s?.includes(i)){const o=i._flight;if(i._flight=void 0,n&&o?.[2]===1&&e._flights?.get(i.id)===o&&s?.some(a=>a.id===i.id))o[2]=0;else{const a=Ln(e,i,o);a&&r.push(a)}}for(const i of r)i.abort()}function Nn(e){for(const t of e){const s=t._flight;s&&s[2]++}}function bt(e,t,s,n){if(t.isFetching=s,n&&e._tx?.[0]!==n)return;const r=e.stores.byRoute.get(t.routeId),i=r?.get();i?.id===t.id&&r.set({...i,isFetching:s})}function to(e,t,s,n,r,i,o){const a=t[0];return{params:s.params,location:a,navigate:u=>e.navigate({...u,_fromLocation:a}),cause:o?"preload":s.cause,abortController:r,preload:o,deps:s.loaderDeps,parentMatchPromise:i,context:s.context,route:n,...e.options.additionalContext}}async function yr(e,t,s,n,r,i,o){const a=o[0],u=a.signal;if(u.aborted)return Te;if(!r)return[he,void 0];let l=s._flight;bt(e,s,"loader",a);try{if(!l){const c=new AbortController;l=[Promise.resolve().then(()=>r(to(e,t,s,n,c,i,!!o[3]))).then(h=>Ct(h,!1,n.id),h=>Ct(h,!0,n.id)).then(h=>(h[0]!==he&&e._flights?.get(s.id)===l&&(e._flights.delete(s.id),l[2]||c.abort()),h[0]===Se&&l[2]?Fn(n,h[1]):h)),c,1],(e._flights??=new Map).set(s.id,l)}return s._flight=l,s.abortController=l[1],Dn(e,t,n,await $e(l[0],u),o)}catch(c){if(c!==u||!u.aborted)throw c;return me(e,s),Te}finally{bt(e,s,!1,a)}}function Ir(e,t,s){t[0]!==K&&(e.status="success",e.error=void 0,t[0]===he?(e.loaderData=t[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=s):e.invalid=!0)}function zl(e,t,s){const n=e._cache.get(t.id);if(n!==s||e._committed.some(i=>i.id===t.id&&i._flight===t._flight))return;const r={...t,_notFound:void 0,context:{}};r._flight&&r._flight[2]++,e._cache.set(t.id,r),n&&me(e,n)}function Rr(e,t){return t[0]===Se||t[0]===cs?{...e,status:t[0]===Se?"error":"notFound",error:t[1],_flight:void 0}:e}function Vl(e,t,s,n,r,i,o){const a=t[1][s],u=Be(e,a),l=!!i[3],c=e._cache.get(a.id);let h,d=!1,f;try{if(a.status==="success"&&(h=u.options.shouldReload,typeof h=="function"&&(h=h(to(e,t,a,u,i[0],r,l))),i[0].signal.aborted&&(f=Te)),!f)if(a.status!=="success")d=!0;else{const M=l||a.preload?u.options.preloadStaleTime??e.options.defaultPreloadStaleTime??3e4:u.options.staleTime??e.options.defaultStaleTime??0;d=!!(a.invalid||h||h===void 0&&Date.now()-a.updatedAt>=M&&(i[5]||a.cause==="enter"||i[2].some(x=>x.routeId===a.routeId&&x.id!==a.id)))}}catch(M){a.invalid=!0,me(e,a),f=pt(e,t,u,M,i)}const p=u.options.loader,g=typeof p=="function",v=g?p:p?.handler,m=!l||u.options.preload!==!1;let S=m&&p?e._flights?.get(a.id):void 0;S===a._flight||f?S=void 0:S&&!d&&!l&&h===void 0?d=!0:d||(S=void 0);const C=!!(p&&d&&a.status==="success"&&!l&&!i[4]&&((g?void 0:p.staleReloadMode)??e.options.defaultStaleReloadMode)!=="blocking"),b=d&&m,w=b&&!C&&(a.status!=="success"||!!p),R=s>=o?i[7]:void 0,y=u.lazyFn&&u._lazy!==!0?R:void 0;if(b&&!p&&(a.invalid=!1,a.updatedAt=Date.now()),S&&S[2]++,w){const M=a._flight;a._flight=S,Ln(e,a,M)?.abort(),s>=o&&(a.status="pending"),R?.()}b||(a.isFetching=!1);const _=!f&&w?yr(e,t,a,u,v,r,i).then(M=>(Ir(a,M,l),M[0]===he&&(p&&!i[0].signal.aborted&&zl(e,a,c),s>=o&&(a.status="pending")),M)):Promise.resolve(f??[he,a.loaderData]),O=(async()=>{try{const x=Ze(u,void 0,y);x&&await $e(x,i[0].signal)}catch(x){if(!t[1].some((P,E)=>E<=s&&(P.status==="error"||P.status==="notFound"||P._notFound)))return[s,pt(e,t,u,x,i)]}const M=await _;w&&M[0]===he&&a.status==="pending"&&!i[0].signal.aborted&&(a.status="success",R?.())})();if(n.push([s,_,O]),!C)return _.then(M=>Rr(a,M));const T={...a,status:"pending",preload:!1,_flight:S};a.invalid=!1,a.isFetching="loader";const A=yr(e,t,T,u,v,r,i).then(M=>(a.isFetching=!1,Ir(T,M,!1),M));return(t[2]??=[]).push([s,A,O,T]),A.then(M=>Rr(T,M))}async function Zs(e,t,s,n,r=0){const i=s?.[1][1];let o=i?.routeId?t.findIndex(a=>a.routeId===i.routeId):s?.[0]??t.length-1;o<0&&(o=0);for(let a=o;a>=0;a--){const u=Be(e,t[a]);try{const l=Ze(u,!1);l&&await $e(l,n)}catch(l){if(l===n&&n.aborted)throw l}if(u.options.notFoundComponent)return a}return i?.routeId?o:r}function Le(e,t){t[2]&&(W(e,t[2].map(s=>s[3])),t[2]=void 0)}async function Cr(e,t,s,n){let r;try{await Promise.all(e.map(i=>i[1].then(async o=>{const a=i[0];if(!(n&&a>=await n)){if(o[0]>=K)throw[a,o];!r&&o[0]!==he&&(r=[a,o],await Promise.all((s??[]).map(u=>{if(!(u[0]<=a))return u[1].then(l=>{if(l[0]===K)throw[u[0],l]})})))}})))}catch(i){return i}return t??r}function Dn(e,t,s,n,r,i){for(;n[0]===K;){const o=n[1],a=o.options;try{if((a.href||o.headers.has("Location"))&&(e.resolveRedirect(o),a.reloadDocument)||(a.reloadDocument?r[3]:r[1]>=20))return n;const u=e.buildLocation({...a,_fromLocation:t[0],_includeValidateSearch:!0}),l=u.maskedLocation??u;if(l.external){const c=o.clone();return c.options={...a},c.headers.set("Location",l.publicHref),e.resolveRedirect(c),r[3]?[K,c]:[K,c,l]}return[K,o,u]}catch(u){n=i?[Se,u]:Fn(s,u),i=!0}}return n}async function so(e,t,s,n,r,i){const o=t[1];let a=await r,u=!1;const l=o.findIndex(f=>f._notFound),c=f=>f[1][0]===cs?Zs(e,o,f,n.signal):f[0];let h=l<0?o.length:l;if((a?.[1][0]??0)>=K)h=0;else if(a){h=a[2]??=await c(a);for(const f of s){if(f[0]>=h)break;const p=await f[1];if(p[0]!==he&&p[0]<K&&!("loaderData"in o[f[0]])){a=[f[0],p],h=a[2]=await c(a);break}}}for(const f of s){if(f[0]>=h)break;const p=await f[2];if(p){a=p;break}}if((a?.[1][0]??0)>=K){const f=a[1];if(f[0]!==K||f[1].options.reloadDocument||f[2])return Le(e,t),f;u=!0,a=[0,[Se,new Error("Too many redirects")]]}const d=a?a[2]??await c(a):l;if(d>=0){const f=a?.[1],p=f?.[0],g=o[d],v=f?.[1],m=()=>{f&&(g._notFound=void 0,p===Se?g.status="error":(v.routeId=g.routeId,g.routeId===e.routeTree.id?(g.status="success",g._notFound=!0):g.status="notFound"),g.error=v,g.isFetching=!1)};m(),f||i?.();const S=Be(e,g);try{await $e(f?Promise.resolve().then(()=>Ze(S,p===Se?"errorComponent":"notFoundComponent")):Promise.all([Ze(S),Ze(S,"notFoundComponent")]),n.signal)}catch(C){if(C===n.signal&&n.signal.aborted)return Le(e,t),Te}f?u&&(n.abort(),await Promise.all([...s.map(C=>C[1]),...s.map(C=>C[2]),...(t[2]??[]).map(C=>C[1])]),Le(e,t),W(e,o),m()):g.status="success"}return t}async function no(e,t,s,n=0,r=t[1].length){const i=t[1];for(let o=n;o<r;o++){const a=i[o],u=Be(e,a).options;if(u.head||u.scripts)try{const l={ssr:e.options.ssr,matches:i,match:a,params:a.params,loaderData:a.loaderData},[c,h]=await $e(Promise.all([u.head?.(l),u.scripts?.(l)]),s);a.meta=c?.meta,a.links=c?.links,a.headScripts=c?.scripts,a.styles=c?.styles,a.scripts=h}catch(l){if(l===s&&s.aborted)break;console.error(l)}if(a.status!=="success"||a._notFound)break}return t}async function ro(e,t,s,n){const r=[t,s],i=n[0].signal;let o;try{const a=e.stores.matches.get();let u=s.findIndex(m=>m._notFound);if(e.options.notFoundMode!=="root"&&u>=0){const m=await Zs(e,s,void 0,i,u);s[u]._notFound=void 0,s[m]._notFound=!0,u=m}let l=u<0?s.length:u+1,c=0;for(;c<l&&c!==u;){const m=s[c],S=n[2][c],C=a[c];if(S?.id!==m.id||S.status!=="success"||m.preload||C?.id!==m.id||C.status!=="success"||(c++,S._notFound||C._notFound))break}const h=[],d=n[6]??0;let f=d?Promise.resolve(s[d-1]):void 0;const p=()=>{for(let m=d;m<l&&!i.aborted;m++)f=Vl(e,r,m,h,f,n,c)},g=await Hl(e,r,n,l,p,c);if(g){if(n[4]=!0,l=g[0],g[1][0]===cs){const m=await Zs(e,s,g,i);g[2]=m,l=Math.min(l,m+1)}else g[1][0]>=K&&(l=0);p()}if(!i.aborted&&!n[3]){const m=[];for(const[S,C]of e._flights??[])C[2]||(e._flights.delete(S),m.push(C[1]));for(const S of m)S.abort()}const v=so(e,r,h,n[0],Cr(h,g,r[2]),n[7]);r[2]?.length&&(r[3]=Cr(r[2],void 0,void 0,v.then(m=>Rt(m)?0:kn(s).length,()=>0))),o=await v}catch(a){if(Le(e,r),a===i&&i.aborted)return Te;throw a}return Rt(o)?o:no(e,o,i,n[6]===s.length?n[6]:0)}function en(e,t){if(e._tx!==t)return;const s=t[3],n=e.stores.matches.get();let r=e._pending;for(let i=0;i<s.length;i++){const o=s[i],a=o.status==="success"&&!o._notFound,u=n[i]?.id===o.id&&n[i]?.status==="pending";if(a&&!u)continue;const l=Be(e,o),c=a||o.invalid?0:l.options.pendingMs??e.options.defaultPendingMs,h=l.options.pendingComponent??e.options.defaultPendingComponent;if(!h||typeof c!="number"||c===1/0){r&&(r[0]=t,r[2]=0,r[4]=!0);return}const d=l.options.pendingMinMs??e.options.defaultPendingMinMs??0;let f=!1;if(r?.[1]===o.id?(f=r[0]!==t,r[0]=t):(clearTimeout(r?.[3]),e._pending=r=void 0),r||(e._pending=r=[t,o.id,u?Date.now()+d:t[4]+c,void 0,u||void 0,h]),r[4]&&!f&&r[5]===h)return;if(r[5]=h,!r[4]){clearTimeout(r[3]);const v=r[2]-Date.now();if(v>0){r[3]=setTimeout(()=>en(e,t),v);return}r[2]=0}const p=s.map(v=>({...v,_flight:void 0}));p[i].status="pending";const g=r[4]=e.startTransition(()=>e.stores.setMatches(p),p).then(v=>(v&&e._pending===r&&r[4]===g&&!r[2]&&(r[2]=Date.now()+d),v));return}}function lt(e,t){const s=e._pending;(e._tx===t||!e._tx?.[3].some(n=>n.id===s?.[1]))&&(clearTimeout(s?.[3]),e._pending=void 0)}async function br(e,t){const s=e._pending;if(!s)return;clearTimeout(s[3]);const n=s[2]-Date.now();if(!s[4]||n<=0||!kn(t[3]).some(i=>i.id===s[1]))return;let r;try{await $e(new Promise(i=>{r=setTimeout(i,n)}),t[0].signal)}catch{}clearTimeout(r)}function io(e,t){e._committed=t,e.stores.setMatches(t)}function ql(e,t,s,n){const r=e._committed,i=e._lifecycleEnd,o=e._cache;for(const c of s)c.preload=!1,n&&(c._assetEnd=void 0);const a=kn(s).length,u=new Map;{const c=Date.now(),h=new Set;for(let d=0;d<s.length;d++){const f=s[d];(d<a||f.status==="success")&&h.add(f.id)}for(const d of[...r,...o.values()]){if(d.status!=="success"||h.has(d.id))continue;const f=Be(e,d);!f.options.loader||c-d.updatedAt>=(d.preload?f.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:f.options.gcTime??e.options.defaultGcTime??3e5)||u.set(d.id,o.get(d.id)===d?d:{...d,_flight:void 0,isFetching:!1,context:{}})}}t[3]=[],e._cache=u;const l=e._lifecycleEnd=Fl(s);io(e,s),W(e,[...o.values(),...r].filter(c=>c._flight&&u.get(c.id)!==c),s),Ll(e,r,s,i,l,t)}async function Ft(e,t){let s=e._tx;for(;s&&s!==t;)t=s,await s[5],s=e._tx}function oo(e,t,s){const n=s[1].options,r=s[2];if(!r)return e.navigate({...n,replace:!0,ignoreBlocker:!0});if(n.reloadDocument)return e.navigate({href:(r.maskedLocation??r).publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});r._redirects=t[1]+1,e._pendingLocation=r;const i=e.commitLocation({...r,viewTransition:n.viewTransition,replace:!0,resetScroll:n.resetScroll,hashScrollIntoView:n.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{e._pendingLocation===r&&(e._pendingLocation=void 0)}),i}async function Kl(e,t,s,n,r){const i=s.map(u=>({...u}));Nn(i);for(const u of n)me(e,i[u[0]]),i[u[0]]=u[3];const o=[t[2],i];let a;try{a=await so(e,o,n,t[0],r)}catch(u){throw W(e,i),u}if(Rt(a)){W(e,i),a[0]===K&&e._tx===t&&e._committed===s&&await oo(e,t,a);return}if(await no(e,a,t[0].signal),e._tx!==t||e._committed!==s){W(e,i);return}for(const u of i){const l=e._cache.get(u.id);l?._flight&&l._flight===u._flight&&(e._cache.delete(u.id),me(e,l))}io(e,i),W(e,s,i)}async function Ql(e,t,s,n,r,i){const o=await ro(e,t[2],t[3],[t[0],t[1],e._committed,void 0,r,s,i,n]);if(Rt(o)){const h=o[0]===K&&e._tx===t;if((!h||o[1].options.reloadDocument)&<(e,t),W(e,t[3]),t[3]=[],!h)return;if(e._tx!==t){lt(e,t);return}await oo(e,t,o);return}const a=o[1];if(e._tx===t&&await br(e,t),e._tx!==t){lt(e,t),W(e,a),Le(e,o);return}const u=t[2],l=us(u,e.stores.resolvedLocation.get()),c=o[2];await e.startViewTransition(async()=>{if(e._tx===t&&await br(e,t),e._tx!==t){lt(e,t),W(e,a),Le(e,o);return}const h=()=>{lt(e,t),ql(e,t,a,i),e._tx===t&&(e.emit({type:"onLoad",...l}),e._tx===t&&e.emit({type:"onBeforeRouteMount",...l}))},d=await e.startTransition(h,a);if(e._tx!==t){Le(e,o);return}c?.length&&Kl(e,t,a,c,o[3]).catch(console.error),e.batch(()=>{e.stores.resolvedLocation.set(u),e.stores.status.set("idle"),e._tx===t&&e.emit({type:"onResolved",...l}),d&&e._tx===t&&e.emit({type:"onRendered",...l})}),e._tx===t&&(e._commitPromise?.resolve(),e._commitPromise=void 0)})}async function Wl(e,t){const s=e._tx,n=e.stores.resolvedLocation.get(),r=n??e.stores.location.get(),i=e.latestLocation,o=e._pendingLocation,a=o?.href===i.href?o._redirects??0:0,u=e._handoff,l=u?.[0](),c=new AbortController,h=e._preflight;if(e._preflight=c,l||u?.[1](),h?.abort(),!c.signal.aborted){const b=us(i,n);e.emit({type:"onBeforeNavigate",...b}),c.signal.aborted||e.emit({type:"onBeforeLoad",...b})}if(c.signal.aborted){await Ft(e,s);return}const d=r.href===i.href;let f=c;const p=e.matchRoutes(i,{_controller:c});Nn(p);const g=l?u[1](p):void 0;if(g?f=l:l?.abort(),c.signal.aborted){W(e,p),await Ft(e,s);return}e._preflight=void 0;let v;const m=()=>Ql(e,C,d,()=>en(e,C),t?.sync,g),S=t?.sync?new Promise(b=>v=b):Promise.resolve().then(m),C=[f,a,i,p,Date.now(),S.then(()=>Ft(e,C))];if(e._tx=C,s){for(const b of e.stores.matches.get()){if(e._tx!==C)break;b.isFetching&&bt(e,b,!1)}s[0].abort(),W(e,s[3],C[3],!0)}if(e._tx!==C){W(e,C[3]),C[3]=[],v?.(),await Ft(e,C);return}e.batch(()=>{e.stores.status.set("pending"),e.stores.location.set(i)}),(g||!e._committed.length&&p[0]?.status!=="success"&&!p.some(b=>b._notFound))&&en(e,C),v?.(m()),await C[5]}async function Jl(e,t){let s=e.buildLocation(t);for(let n=0;;n++){const r=e._committed,i=new AbortController;let o,a,u;try{try{o=e.matchRoutes(s,{_controller:i}),Nn(o),a=(e._preloads??=new Map).set(i,o),u=await ro(e,s,o,[i,n,r,!0])}finally{a&&(a=a.delete(i),W(e,o)),i.abort()}if(!Rt(u))return u[1];if(!a||u.length<3)return;s=u[2]}catch(l){et(l)||console.error(l);return}}}var Xl="Error preloading route! ☝️",ao=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=t=>{this.originalIndex=t,this._branch=void 0;const s=this.options,n=!s?.path&&!s?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=ft:this.parentRoute||On();let r=n?ft:s?.path;r&&r!=="/"&&(r=zi(r));const i=s?.id||r,o=n?ft:Ye((this.parentRoute.id==="__root__"?"":this.parentRoute.id)+"/"+(i??""));r==="__root__"&&(r="/");const a=o==="__root__"?"/":r===void 0?this.parentRoute.fullPath:Ye(this.parentRoute.fullPath+"/"+r);this._path=r,this._id=o,this._fullPath=a,this._to=de(a)},this.addChildren=t=>this._addFileChildren(t),this._addFileChildren=t=>(Array.isArray(t)&&(this.children=t),typeof t=="object"&&t!==null&&(this.children=Object.values(t)),this),this._addFileTypes=()=>this,this.updateLoader=t=>(Object.assign(this.options,t),this),this.update=t=>(Object.assign(this.options,t),this),this.lazy=t=>(this.lazyFn=t,this),this.redirect=t=>Sl({from:this.fullPath,...t}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}},Yl=class extends ao{constructor(e){super(e)}},jn=class extends I.Component{constructor(...e){super(...e),this.state={error:0},this.reset=()=>{this.setState({error:0})}}static getDerivedStateFromProps(e,t){const s=e.getResetKey();return t.error&&t.resetKey!==s?{resetKey:s,error:0}:{resetKey:s}}static getDerivedStateFromError(e){return{error:[e]}}componentDidCatch(e,t){this.props.onCatch?.(e,t)}render(){const e=this.state.error;return e?I.createElement(this.props.errorComponent??Zl,{error:e[0],reset:this.reset}):this.props.children}};function Zl({error:e}){const[t,s]=I.useState(!1);return(0,L.jsxs)("div",{style:{padding:".5rem",maxWidth:"100%"},children:[(0,L.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[(0,L.jsx)("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),(0,L.jsx)("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>s(n=>!n),children:t?"Hide Error":"Show Error"})]}),(0,L.jsx)("div",{style:{height:".25rem"}}),t?(0,L.jsx)("div",{children:(0,L.jsx)("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e?.message?(0,L.jsx)("code",{children:e.message}):null})}):null]})}var eu=()=>!0,tu=()=>!1;function su({children:e,fallback:t=null}){return(0,L.jsx)(I.Fragment,{children:lo()?e:t})}function lo(){return I.useSyncExternalStore(nu,eu,tu)}function nu(){return()=>{}}var uo=I.createContext(null);function Z(e){const t=I.useContext(uo);return t||void 0,t}var ds=I.createContext(void 0),ru=I.createContext(void 0);function iu({update:e,notify:t,unwatched:s}){return{link:n,unlink:r,propagate:i,checkDirty:o,shallowPropagate:a};function n(l,c,h){const d=c.depsTail;if(d!==void 0&&d.dep===l)return;const f=d!==void 0?d.nextDep:c.deps;if(f!==void 0&&f.dep===l){f.version=h,c.depsTail=f;return}const p=l.subsTail;if(p!==void 0&&p.version===h&&p.sub===c)return;const g=c.depsTail=l.subsTail={version:h,dep:l,sub:c,prevDep:d,nextDep:f,prevSub:p,nextSub:void 0};f!==void 0&&(f.prevDep=g),d!==void 0?d.nextDep=g:c.deps=g,p!==void 0?p.nextSub=g:l.subs=g}function r(l,c=l.sub){const h=l.dep,d=l.prevDep,f=l.nextDep,p=l.nextSub,g=l.prevSub;return f!==void 0?f.prevDep=d:c.depsTail=d,d!==void 0?d.nextDep=f:c.deps=f,p!==void 0?p.prevSub=g:h.subsTail=g,g!==void 0?g.nextSub=p:(h.subs=p)===void 0&&s(h),f}function i(l){let c=l.nextSub,h;e:do{const d=l.sub;let f=d.flags;if(f&60?f&12?f&4?!(f&48)&&u(l,d)?(d.flags=f|40,f&=1):f=0:d.flags=f&-9|32:f=0:d.flags=f|32,f&2&&t(d),f&1){const p=d.subs;if(p!==void 0){const g=(l=p).nextSub;g!==void 0&&(h={value:c,prev:h},c=g);continue}}if((l=c)!==void 0){c=l.nextSub;continue}for(;h!==void 0;)if(l=h.value,h=h.prev,l!==void 0){c=l.nextSub;continue e}break}while(!0)}function o(l,c){let h,d=0,f=!1;e:do{const p=l.dep,g=p.flags;if(c.flags&16)f=!0;else if((g&17)===17){if(e(p)){const v=p.subs;v.nextSub!==void 0&&a(v),f=!0}}else if((g&33)===33){(l.nextSub!==void 0||l.prevSub!==void 0)&&(h={value:l,prev:h}),l=p.deps,c=p,++d;continue}if(!f){const v=l.nextDep;if(v!==void 0){l=v;continue}}for(;d--;){const v=c.subs,m=v.nextSub!==void 0;if(m?(l=h.value,h=h.prev):l=v,f){if(e(c)){m&&a(v),c=l.sub;continue}f=!1}else c.flags&=-33;c=l.sub;const S=l.nextDep;if(S!==void 0){l=S;continue e}}return f}while(!0)}function a(l){do{const c=l.sub,h=c.flags;(h&48)===32&&(c.flags=h|16,(h&6)===2&&t(c))}while((l=l.nextSub)!==void 0)}function u(l,c){let h=c.depsTail;for(;h!==void 0;){if(h===l)return!0;h=h.prevDep}return!1}}function ou(e,t,s){const n=typeof e=="object",r=n?e:void 0;return{next:(n?e.next:e)?.bind(r),error:(n?e.error:t)?.bind(r),complete:(n?e.complete:s)?.bind(r)}}var tn=[],Xt=0,{link:wr,unlink:au,propagate:lu,checkDirty:co,shallowPropagate:Er}=iu({update(e){return e._update()},notify(e){tn[sn++]=e,e.flags&=-3},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,rs(e))}}),Lt=0,sn=0,ce,nn=0;function uu(e){try{++nn,e()}finally{--nn||ho()}}function rs(e){const t=e.depsTail;let s=t!==void 0?t.nextDep:e.deps;for(;s!==void 0;)s=au(s,e)}function ho(){if(!(nn>0)){for(;Lt<sn;){const e=tn[Lt];tn[Lt++]=void 0,e.notify()}Lt=0,sn=0}}function _r(e,t){const s=typeof e=="function",n=e,r={_snapshot:s?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:s?0:1,get(){return ce!==void 0&&wr(r,ce,Xt),r._snapshot},subscribe(i){const o=ou(i),a={current:!1},u=cu(()=>{r.get(),a.current?o.next?.(r._snapshot):a.current=!0});return{unsubscribe:()=>{u.stop()}}},_update(i){const o=ce,a=t?.compare??Object.is;if(s)ce=r,++Xt,r.depsTail=void 0;else if(i===void 0)return!1;s&&(r.flags=5);try{const u=r._snapshot,l=typeof i=="function"?i(u):i===void 0&&s?n(u):i;return u===void 0||!a(u,l)?(r._snapshot=l,!0):!1}finally{ce=o,s&&(r.flags&=-5),rs(r)}}};return s?(r.flags=17,r.get=function(){const i=r.flags;if(i&16||i&32&&co(r.deps,r)){if(r._update()){const o=r.subs;o!==void 0&&Er(o)}}else i&32&&(r.flags=i&-33);return ce!==void 0&&wr(r,ce,Xt),r._snapshot}):r.set=function(i){if(r._update(i)){const o=r.subs;o!==void 0&&(lu(o),Er(o),ho())}},r}function cu(e){const t=()=>{const n=ce;ce=s,++Xt,s.depsTail=void 0,s.flags=6;try{return e()}finally{ce=n,s.flags&=-5,rs(s)}},s={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){const n=this.flags;n&16||n&32&&co(this.deps,this)?t():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,rs(this)}};return t(),s}var du=tt((e=>{var t=Cn();function s(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var n=typeof Object.is=="function"?Object.is:s,r=t.useState,i=t.useEffect,o=t.useLayoutEffect,a=t.useDebugValue;function u(d,f){var p=f(),g=r({inst:{value:p,getSnapshot:f}}),v=g[0].inst,m=g[1];return o(function(){v.value=p,v.getSnapshot=f,l(v)&&m({inst:v})},[d,p,f]),i(function(){return l(v)&&m({inst:v}),d(function(){l(v)&&m({inst:v})})},[d]),a(p),p}function l(d){var f=d.getSnapshot;d=d.value;try{var p=f();return!n(d,p)}catch{return!0}}function c(d,f){return f()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:u;e.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:h})),hu=tt(((e,t)=>{t.exports=du()})),fu=tt((e=>{var t=Cn(),s=hu();function n(c,h){return c===h&&(c!==0||1/c===1/h)||c!==c&&h!==h}var r=typeof Object.is=="function"?Object.is:n,i=s.useSyncExternalStore,o=t.useRef,a=t.useEffect,u=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(c,h,d,f,p){var g=o(null);if(g.current===null){var v={hasValue:!1,value:null};g.current=v}else v=g.current;g=u(function(){function S(y){if(!C){if(C=!0,b=y,y=f(y),p!==void 0&&v.hasValue){var _=v.value;if(p(_,y))return w=_}return w=y}if(_=w,r(b,y))return _;var O=f(y);return p!==void 0&&p(_,O)?(b=y,_):(b=y,w=O)}var C=!1,b,w,R=d===void 0?null:d;return[function(){return S(h())},R===null?void 0:function(){return S(R())}]},[h,d,f,p]);var m=i(c,g[0],g[1]);return a(function(){v.hasValue=!0,v.value=m},[m]),l(m),m}})),pu=tt(((e,t)=>{t.exports=fu()})),gu=pu();function mu(e,t){return e===t}function ye(e,t=n=>n,s){const n=s?.compare??mu,r=(0,I.useCallback)(o=>{const{unsubscribe:a}=e.subscribe(o);return a},[e]),i=(0,I.useCallback)(()=>e.get(),[e]);return(0,gu.useSyncExternalStoreWithSelector)(r,i,i,t,n)}var Tr={};function fo(e,t){const s=I.useRef();return n=>{const r=e?.select?e.select(n):n;return e?.structuralSharing??t.options.defaultStructuralSharing?s.current=we(s.current,r):r}}function Ue(e){const t=Z(),s=I.useContext(e.from?ru:ds),n=e.from??s,r=t.stores.getMatchStore(n),i=fo(e,t),o=ye(r,a=>a?i(a):Tr);if(o!==Tr)return o;(e.shouldThrow??!0)&&On()}function po(e){return Ue({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function go(e){const{select:t,...s}=e;return Ue({...s,select:n=>t?t(n.loaderDeps):n.loaderDeps})}function mo(e){return Ue({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const s=e.strict===!1?t.params:t._strictParams;return e.select?e.select(s):s}})}function vo(e){return Ue({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Gn(e){const t=Z();return I.useCallback(s=>t.navigate({...s,from:s.from??e?.from}),[e?.from,t])}function Gf(e){const t=Z(),s=Gn(),n=I.useRef(null);return Mn(()=>{n.current!==e&&(s(e),n.current=e)},[t,e,s]),null}function So(e){return Ue({...e,select:t=>e.select?e.select(t.context):t.context})}function vu(...e){const t=I.useRef(e),s=t.current;return e.forEach((n,r)=>{ve(s[r],n,!1,!0)||(s[r]=n)}),t.current}function Nt(e,t){e.preloadRoute(t).catch(s=>{console.warn(s),console.warn(Xl)})}var Su={compare:(e,t)=>e[0]===t[0]&&e[1]===t[1]};function yu(e,t){const s=typeof e=="string"&&yt(e);if(s)return t.has(s)?e:null}function Iu(e,t,s,n,r){const i=or(e.pathname,n),o=or(t.pathname,n);return(s?.exact?i!==o:!(i.startsWith(o)&&(i.length===o.length||i[o.length]==="/")))||(s?.includeSearch??!0)&&!ve(e.search,t.search,!s?.exact,s?.explicitUndefined)?!1:s?.includeHash?r&&e.hash===t.hash:!0}function Ru(e,t,s){const n=Z(),r=I.useRef(null),i=I.useCallback($=>{if(r.current=$,typeof t=="function")return t($);t&&(t.current=$)},[t]),{activeOptions:o,to:a,preload:u,preloadDelay:l,hashScrollIntoView:c,replace:h,startTransition:d,resetScroll:f,viewTransition:p,ignoreBlocker:g,disabled:v,target:m,onClick:S,onBlur:C,onFocus:b,onMouseEnter:w,onMouseLeave:R,onTouchStart:y}=e,_=lo(),[O,T,A]=vu(e.search,e.params,o),[M,x]=I.useMemo(()=>[e,{...e}],[n,e.from,e._fromLocation,e.hash,e.to,O,T,e.state,e.mask,e.unsafeRelative]),P=I.useCallback($=>{const te=yu(a,n.protocolAllowlist);if(te!==void 0)return[te??void 0];M._fromLocation||(x._fromLocation=$);const Mt=n.buildLocation(x),ot=_u(Mt,n,v);return[ot,!v&&(!ot||yt(ot))?void 0:Iu($,Mt,A,n.basepath,_)]},[A,v,_,M,x,n,a]),[E,G]=ye(n.stores.location,P,Su),nt=G===void 0?E:void 0,rt=v||E===void 0,_t=I.useRef(!1),fe=e.reloadDocument||nt||rt?!1:u??n.options.defaultPreload,it=l??n.options.defaultPreloadDelay??0,He=I.useCallback($=>{const te=$?.isIntersecting;if(!(te??fe==="intent")){te===!1&&_s(r);return}if(!it){Nt(n,M);return}gt.has(r)||gt.set(r,setTimeout(()=>{gt.delete(r),Nt(n,M)},it))},[n,M,r,fe,it]);I.useEffect(()=>{fe==="render"&&!_t.current&&(_t.current=!0,Nt(n,M));let $;return fe==="viewport"&&r.current&&typeof IntersectionObserver=="function"&&($=new IntersectionObserver(te=>He(te.pop()),{rootMargin:"100px"}),$.observe(r.current)),()=>{$?.disconnect(),_s(r)}},[n,M,fe,He,r]);const ee=wu(e,s);if(ee.ref=t?i:r,nt)return ee.href=nt,ee;const vs=$=>{const te=m??$.currentTarget.getAttribute("target");!rt&&!($.metaKey||$.altKey||$.ctrlKey||$.shiftKey)&&!$.defaultPrevented&&(!te||te==="_self")&&$.button===0&&($.preventDefault(),n.navigate({...M,replace:h,resetScroll:f,hashScrollIntoView:c,startTransition:d,viewTransition:p,ignoreBlocker:g}))},Ss=()=>{fe==="intent"&&Nt(n,M)},Tt=()=>{fe==="intent"&&_s(r)};return ee.onClick=Qe(S,vs),ee.onBlur=Qe(C,Tt),ee.onFocus=Qe(b,He),ee.onMouseEnter=Qe(w,He),ee.onMouseLeave=Qe(R,Tt),ee.onTouchStart=Qe(y,Ss),Eu(ee,e,G,E,rt,s)}var Cu={},bu={className:"active"},yo=new Set(["to","params","search","hash","state","mask","from","unsafeRelative","_fromLocation","reloadDocument","preload","preloadDelay","preloadIntentProximity","hashScrollIntoView","replace","startTransition","resetScroll","viewTransition","ignoreBlocker","activeProps","inactiveProps","activeOptions","_asChild"]);function wu(e,t){const s={};for(const n in e)yo.has(n)||n==="type"&&t!==void 0||n==="disabled"&&t==="a"||(s[n]=e[n]);return s}function Eu(e,t,s,n,r,i){const{activeProps:o,inactiveProps:a,className:u,style:l,target:c}=t,h=$i(s?o:a,{})??(s?bu:Cu);Object.assign(e,h),e.href=n,i!=="a"&&(e.disabled=r),e.target=c;const d=h.style;(l||d)&&(e.style=l&&d?{...l,...d}:l||d);const f=h.className;return(u||f)&&(e.className=u?f?`${u} ${f}`:u:f),r&&(e.role="link",e["aria-disabled"]=!0),s&&(e["data-status"]="active",e["aria-current"]="page"),e}var gt=new WeakMap,_s=e=>{clearTimeout(gt.get(e)),gt.delete(e)},Qe=(e,t)=>e?s=>s.defaultPrevented||(e(s),s.defaultPrevented||t(s)):t;function _u(e,t,s){if(s)return;const n=e.maskedLocation??e,r=n.external?n.publicHref:t.history.createHref(n.publicHref)||"/";if(!((n.external||r!==n.publicHref)&&Hi(r,t.protocolAllowlist)))return r}var Io=I.memo(I.forwardRef((e,t)=>{const s=e._asChild||"a",n=Ru(e,t,s),r=typeof e.children=="function"?e.children({isActive:n["data-status"]==="active"}):e.children;return I.createElement(s,n,r)}),Tu);function Tu(e,t){let s=0;for(const n in t)if(s++,e[n]!==t[n]&&(!yo.has(n)||!ve(e[n],t[n],!1,!0)))return!1;for(const n in e)s--;return s===0}var Mu=class extends ao{constructor(e){super(e),this.useMatch=t=>Ue({...t,from:this.id}),this.useRouteContext=t=>So({...t,from:this.id}),this.useSearch=t=>vo({...t,from:this.id}),this.useParams=t=>mo({...t,from:this.id}),this.useLoaderDeps=t=>go({...t,from:this.id}),this.useLoaderData=t=>po({...t,from:this.id}),this.useNavigate=()=>Gn({from:this.fullPath}),this.Link=I.forwardRef((t,s)=>(0,L.jsx)(Io,{ref:s,from:this.fullPath,...t}))}};function Au(e){return new Mu(e)}var Ou=class extends Yl{constructor(e){super(e),this.useMatch=t=>Ue({...t,from:this.id}),this.useRouteContext=t=>So({...t,from:this.id}),this.useSearch=t=>vo({...t,from:this.id}),this.useParams=t=>mo({...t,from:this.id}),this.useLoaderDeps=t=>go({...t,from:this.id}),this.useLoaderData=t=>po({...t,from:this.id}),this.useNavigate=()=>Gn({from:this.fullPath}),this.Link=I.forwardRef((t,s)=>(0,L.jsx)(Io,{ref:s,from:this.fullPath,...t}))}};function $f(e){return new Ou(e)}function Bf(e){return t=>{const s=Au(t);return s.isRoot=!1,s}}function Uf(e,t){let s,n,r;const i=()=>(s||(r=void 0,s=e().then(a=>{s=void 0,o.preload=void 0,n=a[t??"default"]}).catch(a=>{s=void 0,r=a})),s),o=function(u){if(r){if(Ja(r)&&typeof sessionStorage<"u"){const l=`tanstack_router_reload:${r.message}`;if(!sessionStorage.getItem(l))throw sessionStorage.setItem(l,"1"),window.location.reload(),new Promise(()=>{})}throw r}if(!n)if(rr)rr(i());else throw i();return I.createElement(n,u)};return o.preload=i,o}function xu(e){const t=Z(),s=`not-found-${ye(t.stores.location,n=>n.pathname)}-${ye(t.stores.status)}`;return(0,L.jsx)(jn,{getResetKey:()=>s,onCatch:(n,r)=>{if(et(n))e.onCatch?.(n,r);else throw n},errorComponent:({error:n})=>{if(et(n))return e.fallback?.(n);throw n},children:e.children})}function Pu(){return(0,L.jsx)("p",{children:"Not Found"})}function Xe(e){return(0,L.jsx)(L.Fragment,{children:e.children})}function Ro(e,t,s){return t.options.notFoundComponent?(0,L.jsx)(t.options.notFoundComponent,{...s}):e.options.defaultNotFoundComponent?(0,L.jsx)(e.options.defaultNotFoundComponent,{...s}):(0,L.jsx)(Pu,{})}function hs(e,t){const s=t?.options.pendingComponent??e.options.defaultPendingComponent;return s?(0,L.jsx)(s,{}):null}var ku=(e,t)=>e[0]===t[0]&&e[1]===t[1],Co=(e,t,s)=>!t.isRoot||t.options.shellComponent||t.options.wrapInSuspense||s===!1||s==="data-only"||!e.ssr,bo=I.memo(function({routeId:t}){const s=Z();return(0,L.jsx)(Fu,{router:s,match:ye(s.stores.getMatchStore(t))})});function Fu({router:e,match:t}){const s=e.routesById[t.routeId],n=hs(e,s),r=s.options.errorComponent??e.options.defaultErrorComponent,i=s.options.onCatch??e.options.defaultOnCatch,o=s.isRoot?s.options.notFoundComponent??e.options.notFoundRoute?.options.component:s.options.notFoundComponent,a=t.ssr===!1||t.ssr==="data-only",u=Co(e,s,t.ssr)&&(s.options.wrapInSuspense??n??(s.options.errorComponent?.preload||a))?I.Suspense:Xe,l=r?jn:Xe,c=o?xu:Xe;return(0,L.jsxs)(s.isRoot?s.options.shellComponent??Xe:Xe,{children:[(0,L.jsx)(ds.Provider,{value:t.routeId,children:(0,L.jsx)(u,{fallback:n,children:(0,L.jsx)(l,{getResetKey:()=>t,errorComponent:r,onCatch:(h,d)=>{if(et(h))throw h.routeId??=t.routeId,h;i?.(h,d)},children:(0,L.jsx)(c,{fallback:h=>{if(h.routeId??=t.routeId,h.routeId!==t.routeId)throw h;return I.createElement(o,h)},children:a?(0,L.jsx)(su,{fallback:n,children:(0,L.jsx)(Mr,{match:t})}):(0,L.jsx)(Mr,{match:t})})})})}),null]})}var Mr=I.memo(function({match:t}){const s=Z(),n=t.routeId,r=s.routesById[n],i=I.useMemo(()=>{const a=(r.options.remountDeps??s.options.defaultRemountDeps)?.({routeId:n,loaderDeps:t.loaderDeps,params:t._strictParams,search:t._strictSearch});return a?JSON.stringify(a):void 0},[n,t.loaderDeps,t._strictParams,t._strictSearch,r.options.remountDeps,s.options.defaultRemountDeps]),o=I.useMemo(()=>{const a=r.options.component??s.options.defaultComponent;return a?(0,L.jsx)(a,{},i):(0,L.jsx)(Lu,{})},[i,r.options.component,s.options.defaultComponent]);if(t.status==="pending"){if(s.ssr&&!Co(s,r,t.ssr))return o;if(s._tx)throw s._tx[5];return hs(s,r)}if(t.status==="notFound")return Ro(s,r,t.error);if(t.status==="error")throw t.error;return o}),Lu=I.memo(function(){const t=Z(),s=I.useContext(ds);let n,r,i;{const a=t.stores.getMatchStore(s);[n,r]=ye(a,u=>[!!u._notFound,u.error],{compare:ku}),i=ye(t.stores.ids,u=>u[u.indexOf(s)+1])}if(n)return Ro(t,t.routesById[s],r);if(!i)return null;const o=(0,L.jsx)(bo,{routeId:i});return s==="__root__"?(0,L.jsx)(I.Suspense,{fallback:hs(t),children:o}):o});function wo(e,t){const s=e[1];e.length=0,s?.(t)}function Nu({t:e}){const t=Z(),s=t._rendered??=[];return t.startTransition=(n,r)=>new Promise(i=>{wo(s,!1),s.push(r,i),e(t),I.startTransition(n)}),Mn(()=>{const n=t.history.subscribe(t.load);t.updateLatestLocation();const r=t.latestLocation,i=t.buildLocation({to:r.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(de(r.publicHref)!==de(i.publicHref))return t.commitLocation({...i,replace:!0,ignoreBlocker:!0}),n;const o=t.stores.resolvedLocation.get();return o?.href===r.href&&o.state.__TSR_key===r.state.__TSR_key?s.push(t.stores.matches.get(),a=>{a&&t.emit({type:"onRendered",...us(o,o)})}):t._tx||t.load({sync:!0}).catch(console.error),n},[t,t.history]),null}function Du(){const e=Z(),t=e.routesById[ft],s=hs(e,t),n=e.ssr?Xe:I.Suspense,r=(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Nu,{t:I.useState()[1]}),(0,L.jsx)(n,{fallback:s,children:(0,L.jsx)(ju,{})})]});return e.options.InnerWrap?(0,L.jsx)(e.options.InnerWrap,{children:r}):r}function ju(){const e=Z(),t=e._rendered,s=ye(e.stores.matches,o=>t[0]??o),n=s[0],r=n?.routeId;Mn(()=>{t[0]===s&&wo(t,!0)},[t,s]);const i=r?(0,L.jsx)(bo,{routeId:r}):null;return(0,L.jsx)(ds.Provider,{value:r,children:e.options.disableGlobalCatchBoundary?i:(0,L.jsx)(jn,{getResetKey:()=>n,onCatch:void 0,children:i})})}var Gu=e=>({createMutableStore:_r,createReadonlyStore:_r,batch:uu}),Hf=e=>new $u(e),$u=class extends Nl{constructor(e){super(e,Gu)}};function Bu({router:e,children:t,...s}){Bi(s)&&e.update({...e.options,...s,context:{...e.options.context,...s.context}});const n=(0,L.jsx)(uo.Provider,{value:e,children:t});return e.options.Wrap?(0,L.jsx)(e.options.Wrap,{children:n}):n}function zf({router:e,...t}){return(0,L.jsx)(Bu,{router:e,...t,children:(0,L.jsx)(Du,{})})}function Uu(e,t){if(e===void 0)return{shouldBlockFn:()=>!0,withResolver:!1};if("shouldBlockFn"in e)return e;if(typeof e=="function"){const i=!!(t??!0);return{shouldBlockFn:async()=>i?await e():!1,enableBeforeUnload:i,withResolver:!1}}const s=!!(e.condition??!0),n=e.blockerFn;return{shouldBlockFn:async()=>s&&n!==void 0?await n():s,enableBeforeUnload:s,withResolver:n===void 0}}function Vf(e,t){const{shouldBlockFn:s,enableBeforeUnload:n=!0,disabled:r=!1,withResolver:i=!1}=Uu(e,t),o=Z(),{history:a}=o,[u,l]=I.useState({status:"idle",current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0});return I.useEffect(()=>{const c=async h=>{function d(m){const S=o.parseLocation(m),[,C,b]=o.getMatchedRoutes(S.pathname);return b===void 0?{routeId:"__notFound__",fullPath:S.pathname,pathname:S.pathname,params:C,search:o.options.parseSearch(m.search)}:{routeId:b.id,fullPath:b.fullPath,pathname:S.pathname,params:C,search:o.options.parseSearch(m.search)}}const f=d(h.currentLocation),p=d(h.nextLocation);if(f.routeId==="__notFound__"&&p.routeId!=="__notFound__")return!1;const g=await s({action:h.action,current:f,next:p});if(!i)return g;if(!g)return!1;const v=await new Promise(m=>{l({status:"blocked",current:f,next:p,action:h.action,proceed:()=>m(!1),reset:()=>m(!0)})});return l({status:"idle",current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0}),v};return r?void 0:a.block({blockerFn:c,enableBeforeUnload:n})},[s,n,r,i,a,o]),u}function qf(e){const t=Z();return ye(t.stores.location,fo(e,t))}function Ce(e,t){return typeof e=="function"?e(t):e}function Y(e,t){return s=>{t.setState(n=>({...n,[e]:Ce(s,n[e])}))}}function fs(e){return e instanceof Function}function Hu(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function zu(e,t){const s=[],n=r=>{r.forEach(i=>{s.push(i);const o=t(i);o!=null&&o.length&&n(o)})};return n(e),s}function k(e,t,s){let n=[],r;return i=>{let o;s.key&&s.debug&&(o=Date.now());const a=e(i);if(!(a.length!==n.length||a.some((l,c)=>n[c]!==l)))return r;n=a;let u;if(s.key&&s.debug&&(u=Date.now()),r=t(...a),s==null||s.onChange==null||s.onChange(r),s.key&&s.debug&&s!=null&&s.debug()){const l=Math.round((Date.now()-o)*100)/100,c=Math.round((Date.now()-u)*100)/100,h=c/16,d=(f,p)=>{for(f=String(f);f.length<p;)f=" "+f;return f};console.info(`%c⏱ ${d(c,5)} /${d(l,5)} ms`,`
|
|
3
3
|
font-size: .6rem;
|
|
4
4
|
font-weight: bold;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{kt as t}from"./radix-ui-
|
|
1
|
+
import{kt as t}from"./radix-ui-Bk380HgZ.js";import"./index-DUbs819O.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"db-studio@1.14.2"};var n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="28eae64d-ee3e-437b-82c8-e83c4830a933",e._sentryDebugIdIdentifier="sentry-dbid-28eae64d-ee3e-437b-82c8-e83c4830a933")}catch{}})();var i=t();function d(){return(0,i.jsx)("main",{className:"flex-1 flex items-center justify-center",children:"Visualizer will be available soon!"})}export{d as component};
|
package/dist/web-dist/index.html
CHANGED
|
@@ -5,25 +5,25 @@
|
|
|
5
5
|
<link rel="icon" type="image/png" href="/favicon.png" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>db-studio</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
9
|
-
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-
|
|
10
|
-
<link rel="modulepreload" crossorigin href="/assets/icons-
|
|
11
|
-
<link rel="modulepreload" crossorigin href="/assets/radix-ui-
|
|
12
|
-
<link rel="modulepreload" crossorigin href="/assets/tanstack-
|
|
13
|
-
<link rel="modulepreload" crossorigin href="/assets/react-dom-
|
|
14
|
-
<link rel="modulepreload" crossorigin href="/assets/dist-
|
|
15
|
-
<link rel="modulepreload" crossorigin href="/assets/bundle-mjs-
|
|
16
|
-
<link rel="modulepreload" crossorigin href="/assets/react-
|
|
17
|
-
<link rel="modulepreload" crossorigin href="/assets/monitoring-
|
|
18
|
-
<link rel="modulepreload" crossorigin href="/assets/overlay.store-
|
|
19
|
-
<link rel="modulepreload" crossorigin href="/assets/badge-
|
|
20
|
-
<link rel="modulepreload" crossorigin href="/assets/database.store-
|
|
21
|
-
<link rel="modulepreload" crossorigin href="/assets/format-cell-value-
|
|
22
|
-
<link rel="modulepreload" crossorigin href="/assets/schema-
|
|
23
|
-
<link rel="modulepreload" crossorigin href="/assets/middleware-
|
|
24
|
-
<link rel="modulepreload" crossorigin href="/assets/monaco-editor-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-DUbs819O.js"></script>
|
|
9
|
+
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-BGAbM2vM.js">
|
|
10
|
+
<link rel="modulepreload" crossorigin href="/assets/icons-De4HOb_l.js">
|
|
11
|
+
<link rel="modulepreload" crossorigin href="/assets/radix-ui-Bk380HgZ.js">
|
|
12
|
+
<link rel="modulepreload" crossorigin href="/assets/tanstack-CJCyKnhp.js">
|
|
13
|
+
<link rel="modulepreload" crossorigin href="/assets/react-dom-Y-FhvvJI.js">
|
|
14
|
+
<link rel="modulepreload" crossorigin href="/assets/dist-C-SdF-L-.js">
|
|
15
|
+
<link rel="modulepreload" crossorigin href="/assets/bundle-mjs-DVXBR05F.js">
|
|
16
|
+
<link rel="modulepreload" crossorigin href="/assets/react-CfXK6joe.js">
|
|
17
|
+
<link rel="modulepreload" crossorigin href="/assets/monitoring-Bv8YDvqU.js">
|
|
18
|
+
<link rel="modulepreload" crossorigin href="/assets/overlay.store-Cni3_SHg.js">
|
|
19
|
+
<link rel="modulepreload" crossorigin href="/assets/badge-D_Kx6BmG.js">
|
|
20
|
+
<link rel="modulepreload" crossorigin href="/assets/database.store-Djdh7lNO.js">
|
|
21
|
+
<link rel="modulepreload" crossorigin href="/assets/format-cell-value-BtrAFpQa.js">
|
|
22
|
+
<link rel="modulepreload" crossorigin href="/assets/schema-Cd61GWLb.js">
|
|
23
|
+
<link rel="modulepreload" crossorigin href="/assets/middleware-BbNmPIW8.js">
|
|
24
|
+
<link rel="modulepreload" crossorigin href="/assets/monaco-editor-CNMPKLoW.js">
|
|
25
25
|
<link rel="stylesheet" crossorigin href="/assets/monaco-editor-IL9D_L0g.css">
|
|
26
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
26
|
+
<link rel="stylesheet" crossorigin href="/assets/index-DGaShyKg.css">
|
|
27
27
|
</head>
|
|
28
28
|
<body>
|
|
29
29
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "db-studio",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.14.
|
|
4
|
+
"version": "1.14.2",
|
|
5
5
|
"description": "Modern database client for PostgreSQL with spreadsheet-like grid, AI-powered SQL assistance, ER diagrams, fast data browsing and editing. CLI tool, upcoming desktop & web versions.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"database client",
|