@hogsend/studio 0.1.0 → 0.3.0

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.
@@ -1,225 +0,0 @@
1
- var w1=Object.defineProperty;var mg=n=>{throw TypeError(n)};var E1=(n,s,i)=>s in n?w1(n,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):n[s]=i;var Ga=(n,s,i)=>E1(n,typeof s!="symbol"?s+"":s,i),td=(n,s,i)=>s.has(n)||mg("Cannot "+i);var E=(n,s,i)=>(td(n,s,"read from private field"),i?i.call(n):s.get(n)),de=(n,s,i)=>s.has(n)?mg("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(n):s.set(n,i),ie=(n,s,i,r)=>(td(n,s,"write to private field"),r?r.call(n,i):s.set(n,i),i),Se=(n,s,i)=>(td(n,s,"access private method"),i);var lu=(n,s,i,r)=>({set _(u){ie(n,s,u,i)},get _(){return E(n,s,r)}});(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))r(u);new MutationObserver(u=>{for(const f of u)if(f.type==="childList")for(const d of f.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&r(d)}).observe(document,{childList:!0,subtree:!0});function i(u){const f={};return u.integrity&&(f.integrity=u.integrity),u.referrerPolicy&&(f.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?f.credentials="include":u.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function r(u){if(u.ep)return;u.ep=!0;const f=i(u);fetch(u.href,f)}})();function C1(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var nd={exports:{}},ur={};/**
2
- * @license React
3
- * react-jsx-runtime.production.js
4
- *
5
- * Copyright (c) Meta Platforms, Inc. and affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var yg;function N1(){if(yg)return ur;yg=1;var n=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function i(r,u,f){var d=null;if(f!==void 0&&(d=""+f),u.key!==void 0&&(d=""+u.key),"key"in u){f={};for(var y in u)y!=="key"&&(f[y]=u[y])}else f=u;return u=f.ref,{$$typeof:n,type:r,key:d,ref:u!==void 0?u:null,props:f}}return ur.Fragment=s,ur.jsx=i,ur.jsxs=i,ur}var pg;function M1(){return pg||(pg=1,nd.exports=N1()),nd.exports}var h=M1(),ui=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ks,Za,Zl,Ev,A1=(Ev=class extends ui{constructor(){super();de(this,ks);de(this,Za);de(this,Zl);ie(this,Zl,s=>{if(typeof window<"u"&&window.addEventListener){const i=()=>s();return window.addEventListener("visibilitychange",i,!1),()=>{window.removeEventListener("visibilitychange",i)}}})}onSubscribe(){E(this,Za)||this.setEventListener(E(this,Zl))}onUnsubscribe(){var s;this.hasListeners()||((s=E(this,Za))==null||s.call(this),ie(this,Za,void 0))}setEventListener(s){var i;ie(this,Zl,s),(i=E(this,Za))==null||i.call(this),ie(this,Za,s(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(s){E(this,ks)!==s&&(ie(this,ks,s),this.onFocus())}onFocus(){const s=this.isFocused();this.listeners.forEach(i=>{i(s)})}isFocused(){var s;return typeof E(this,ks)=="boolean"?E(this,ks):((s=globalThis.document)==null?void 0:s.visibilityState)!=="hidden"}},ks=new WeakMap,Za=new WeakMap,Zl=new WeakMap,Ev),th=new A1,O1={setTimeout:(n,s)=>setTimeout(n,s),clearTimeout:n=>clearTimeout(n),setInterval:(n,s)=>setInterval(n,s),clearInterval:n=>clearInterval(n)},Ja,eh,Cv,z1=(Cv=class{constructor(){de(this,Ja,O1);de(this,eh,!1)}setTimeoutProvider(n){ie(this,Ja,n)}setTimeout(n,s){return E(this,Ja).setTimeout(n,s)}clearTimeout(n){E(this,Ja).clearTimeout(n)}setInterval(n,s){return E(this,Ja).setInterval(n,s)}clearInterval(n){E(this,Ja).clearInterval(n)}},Ja=new WeakMap,eh=new WeakMap,Cv),Ds=new z1;function D1(n){setTimeout(n,0)}var U1=typeof window>"u"||"Deno"in globalThis;function Nt(){}function L1(n,s){return typeof n=="function"?n(s):n}function Nd(n){return typeof n=="number"&&n>=0&&n!==1/0}function Bv(n,s){return Math.max(n+(s||0)-Date.now(),0)}function is(n,s){return typeof n=="function"?n(s):n}function tn(n,s){return typeof n=="function"?n(s):n}function gg(n,s){const{type:i="all",exact:r,fetchStatus:u,predicate:f,queryKey:d,stale:y}=n;if(d){if(r){if(s.queryHash!==nh(d,s.options))return!1}else if(!xr(s.queryKey,d))return!1}if(i!=="all"){const g=s.isActive();if(i==="active"&&!g||i==="inactive"&&g)return!1}return!(typeof y=="boolean"&&s.isStale()!==y||u&&u!==s.state.fetchStatus||f&&!f(s))}function vg(n,s){const{exact:i,status:r,predicate:u,mutationKey:f}=n;if(f){if(!s.options.mutationKey)return!1;if(i){if(Js(s.options.mutationKey)!==Js(f))return!1}else if(!xr(s.options.mutationKey,f))return!1}return!(r&&s.state.status!==r||u&&!u(s))}function nh(n,s){return((s==null?void 0:s.queryKeyHashFn)||Js)(n)}function Js(n){return JSON.stringify(n,(s,i)=>Md(i)?Object.keys(i).sort().reduce((r,u)=>(r[u]=i[u],r),{}):i)}function xr(n,s){return n===s?!0:typeof n!=typeof s?!1:n&&s&&typeof n=="object"&&typeof s=="object"?Object.keys(s).every(i=>xr(n[i],s[i])):!1}var k1=Object.prototype.hasOwnProperty;function qv(n,s,i=0){if(n===s)return n;if(i>500)return s;const r=bg(n)&&bg(s);if(!r&&!(Md(n)&&Md(s)))return s;const f=(r?n:Object.keys(n)).length,d=r?s:Object.keys(s),y=d.length,g=r?new Array(y):{};let m=0;for(let b=0;b<y;b++){const v=r?b:d[b],S=n[v],j=s[v];if(S===j){g[v]=S,(r?b<f:k1.call(n,v))&&m++;continue}if(S===null||j===null||typeof S!="object"||typeof j!="object"){g[v]=j;continue}const _=qv(S,j,i+1);g[v]=_,_===S&&m++}return f===y&&m===f?n:g}function wu(n,s){if(!s||Object.keys(n).length!==Object.keys(s).length)return!1;for(const i in n)if(n[i]!==s[i])return!1;return!0}function bg(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function Md(n){if(!xg(n))return!1;const s=n.constructor;if(s===void 0)return!0;const i=s.prototype;return!(!xg(i)||!i.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function xg(n){return Object.prototype.toString.call(n)==="[object Object]"}function B1(n){return new Promise(s=>{Ds.setTimeout(s,n)})}function Ad(n,s,i){return typeof i.structuralSharing=="function"?i.structuralSharing(n,s):i.structuralSharing!==!1?qv(n,s):s}function ah(n){return n}function q1(n,s,i=0){const r=[...n,s];return i&&r.length>i?r.slice(1):r}function H1(n,s,i=0){const r=[s,...n];return i&&r.length>i?r.slice(0,-1):r}var sh=Symbol();function Hv(n,s){return!n.queryFn&&(s!=null&&s.initialPromise)?()=>s.initialPromise:!n.queryFn||n.queryFn===sh?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function lh(n,s){return typeof n=="function"?n(...s):!!n}function G1(n,s,i){let r=!1,u;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(u??(u=s()),r||(r=!0,u.aborted?i():u.addEventListener("abort",i,{once:!0})),u)}),n}var Sr=(()=>{let n=()=>U1;return{isServer(){return n()},setIsServer(s){n=s}}})();function Od(){let n,s;const i=new Promise((u,f)=>{n=u,s=f});i.status="pending",i.catch(()=>{});function r(u){Object.assign(i,u),delete i.resolve,delete i.reject}return i.resolve=u=>{r({status:"fulfilled",value:u}),n(u)},i.reject=u=>{r({status:"rejected",reason:u}),s(u)},i}var Q1=D1;function Y1(){let n=[],s=0,i=y=>{y()},r=y=>{y()},u=Q1;const f=y=>{s?n.push(y):u(()=>{i(y)})},d=()=>{const y=n;n=[],y.length&&u(()=>{r(()=>{y.forEach(g=>{i(g)})})})};return{batch:y=>{let g;s++;try{g=y()}finally{s--,s||d()}return g},batchCalls:y=>(...g)=>{f(()=>{y(...g)})},schedule:f,setNotifyFunction:y=>{i=y},setBatchNotifyFunction:y=>{r=y},setScheduler:y=>{u=y}}}var ft=Y1(),Jl,Fa,Fl,Nv,V1=(Nv=class extends ui{constructor(){super();de(this,Jl,!0);de(this,Fa);de(this,Fl);ie(this,Fl,s=>{if(typeof window<"u"&&window.addEventListener){const i=()=>s(!0),r=()=>s(!1);return window.addEventListener("online",i,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",i),window.removeEventListener("offline",r)}}})}onSubscribe(){E(this,Fa)||this.setEventListener(E(this,Fl))}onUnsubscribe(){var s;this.hasListeners()||((s=E(this,Fa))==null||s.call(this),ie(this,Fa,void 0))}setEventListener(s){var i;ie(this,Fl,s),(i=E(this,Fa))==null||i.call(this),ie(this,Fa,s(this.setOnline.bind(this)))}setOnline(s){E(this,Jl)!==s&&(ie(this,Jl,s),this.listeners.forEach(r=>{r(s)}))}isOnline(){return E(this,Jl)}},Jl=new WeakMap,Fa=new WeakMap,Fl=new WeakMap,Nv),Eu=new V1;function K1(n){return Math.min(1e3*2**n,3e4)}function Gv(n){return(n??"online")==="online"?Eu.isOnline():!0}var zd=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function Qv(n){let s=!1,i=0,r;const u=Od(),f=()=>u.status!=="pending",d=w=>{var R;if(!f()){const U=new zd(w);S(U),(R=n.onCancel)==null||R.call(n,U)}},y=()=>{s=!0},g=()=>{s=!1},m=()=>th.isFocused()&&(n.networkMode==="always"||Eu.isOnline())&&n.canRun(),b=()=>Gv(n.networkMode)&&n.canRun(),v=w=>{f()||(r==null||r(),u.resolve(w))},S=w=>{f()||(r==null||r(),u.reject(w))},j=()=>new Promise(w=>{var R;r=U=>{(f()||m())&&w(U)},(R=n.onPause)==null||R.call(n)}).then(()=>{var w;r=void 0,f()||(w=n.onContinue)==null||w.call(n)}),_=()=>{if(f())return;let w;const R=i===0?n.initialPromise:void 0;try{w=R??n.fn()}catch(U){w=Promise.reject(U)}Promise.resolve(w).then(v).catch(U=>{var D;if(f())return;const k=n.retry??(Sr.isServer()?0:3),H=n.retryDelay??K1,M=typeof H=="function"?H(i,U):H,Q=k===!0||typeof k=="number"&&i<k||typeof k=="function"&&k(i,U);if(s||!Q){S(U);return}i++,(D=n.onFail)==null||D.call(n,i,U),B1(M).then(()=>m()?void 0:j()).then(()=>{s?S(U):_()})})};return{promise:u,status:()=>u.status,cancel:d,continue:()=>(r==null||r(),u),cancelRetry:y,continueRetry:g,canStart:b,start:()=>(b()?_():j().then(_),u)}}var Bs,Mv,Yv=(Mv=class{constructor(){de(this,Bs)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Nd(this.gcTime)&&ie(this,Bs,Ds.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(Sr.isServer()?1/0:300*1e3))}clearGcTimeout(){E(this,Bs)!==void 0&&(Ds.clearTimeout(E(this,Bs)),ie(this,Bs,void 0))}},Bs=new WeakMap,Mv);function X1(n){return{onFetch:(s,i)=>{var b,v,S,j,_;const r=s.options,u=(S=(v=(b=s.fetchOptions)==null?void 0:b.meta)==null?void 0:v.fetchMore)==null?void 0:S.direction,f=((j=s.state.data)==null?void 0:j.pages)||[],d=((_=s.state.data)==null?void 0:_.pageParams)||[];let y={pages:[],pageParams:[]},g=0;const m=async()=>{let w=!1;const R=H=>{G1(H,()=>s.signal,()=>w=!0)},U=Hv(s.options,s.fetchOptions),k=async(H,M,Q)=>{if(w)return Promise.reject(s.signal.reason);if(M==null&&H.pages.length)return Promise.resolve(H);const O=(()=>{const W={client:s.client,queryKey:s.queryKey,pageParam:M,direction:Q?"backward":"forward",meta:s.options.meta};return R(W),W})(),A=await U(O),{maxPages:V}=s.options,$=Q?H1:q1;return{pages:$(H.pages,A,V),pageParams:$(H.pageParams,M,V)}};if(u&&f.length){const H=u==="backward",M=H?P1:Sg,Q={pages:f,pageParams:d},D=M(r,Q);y=await k(Q,D,H)}else{const H=n??f.length;do{const M=g===0?d[0]??r.initialPageParam:Sg(r,y);if(g>0&&M==null)break;y=await k(y,M),g++}while(g<H)}return y};s.options.persister?s.fetchFn=()=>{var w,R;return(R=(w=s.options).persister)==null?void 0:R.call(w,m,{client:s.client,queryKey:s.queryKey,meta:s.options.meta,signal:s.signal},i)}:s.fetchFn=m}}}function Sg(n,{pages:s,pageParams:i}){const r=s.length-1;return s.length>0?n.getNextPageParam(s[r],s,i[r],i):void 0}function P1(n,{pages:s,pageParams:i}){var r;return s.length>0?(r=n.getPreviousPageParam)==null?void 0:r.call(n,s[0],s,i[0],i):void 0}var Il,qs,$l,pn,Hs,mt,Er,Gs,en,Vv,oa,Av,Z1=(Av=class extends Yv{constructor(s){super();de(this,en);de(this,Il);de(this,qs);de(this,$l);de(this,pn);de(this,Hs);de(this,mt);de(this,Er);de(this,Gs);ie(this,Gs,!1),ie(this,Er,s.defaultOptions),this.setOptions(s.options),this.observers=[],ie(this,Hs,s.client),ie(this,pn,E(this,Hs).getQueryCache()),this.queryKey=s.queryKey,this.queryHash=s.queryHash,ie(this,qs,Rg(this.options)),this.state=s.state??E(this,qs),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return E(this,Il)}get promise(){var s;return(s=E(this,mt))==null?void 0:s.promise}setOptions(s){if(this.options={...E(this,Er),...s},s!=null&&s._type&&ie(this,Il,s._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const i=Rg(this.options);i.data!==void 0&&(this.setState(jg(i.data,i.dataUpdatedAt)),ie(this,qs,i))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&E(this,pn).remove(this)}setData(s,i){const r=Ad(this.state.data,s,this.options);return Se(this,en,oa).call(this,{data:r,type:"success",dataUpdatedAt:i==null?void 0:i.updatedAt,manual:i==null?void 0:i.manual}),r}setState(s){Se(this,en,oa).call(this,{type:"setState",state:s})}cancel(s){var r,u;const i=(r=E(this,mt))==null?void 0:r.promise;return(u=E(this,mt))==null||u.cancel(s),i?i.then(Nt).catch(Nt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return E(this,qs)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(s=>tn(s.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===sh||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(s=>is(s.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(s=>s.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(s=0){return this.state.data===void 0?!0:s==="static"?!1:this.state.isInvalidated?!0:!Bv(this.state.dataUpdatedAt,s)}onFocus(){var i;const s=this.observers.find(r=>r.shouldFetchOnWindowFocus());s==null||s.refetch({cancelRefetch:!1}),(i=E(this,mt))==null||i.continue()}onOnline(){var i;const s=this.observers.find(r=>r.shouldFetchOnReconnect());s==null||s.refetch({cancelRefetch:!1}),(i=E(this,mt))==null||i.continue()}addObserver(s){this.observers.includes(s)||(this.observers.push(s),this.clearGcTimeout(),E(this,pn).notify({type:"observerAdded",query:this,observer:s}))}removeObserver(s){this.observers.includes(s)&&(this.observers=this.observers.filter(i=>i!==s),this.observers.length||(E(this,mt)&&(E(this,Gs)||Se(this,en,Vv).call(this)?E(this,mt).cancel({revert:!0}):E(this,mt).cancelRetry()),this.scheduleGc()),E(this,pn).notify({type:"observerRemoved",query:this,observer:s}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Se(this,en,oa).call(this,{type:"invalidate"})}async fetch(s,i){var m,b,v,S,j,_,w,R,U,k,H;if(this.state.fetchStatus!=="idle"&&((m=E(this,mt))==null?void 0:m.status())!=="rejected"){if(this.state.data!==void 0&&(i!=null&&i.cancelRefetch))this.cancel({silent:!0});else if(E(this,mt))return E(this,mt).continueRetry(),E(this,mt).promise}if(s&&this.setOptions(s),!this.options.queryFn){const M=this.observers.find(Q=>Q.options.queryFn);M&&this.setOptions(M.options)}const r=new AbortController,u=M=>{Object.defineProperty(M,"signal",{enumerable:!0,get:()=>(ie(this,Gs,!0),r.signal)})},f=()=>{const M=Hv(this.options,i),D=(()=>{const O={client:E(this,Hs),queryKey:this.queryKey,meta:this.meta};return u(O),O})();return ie(this,Gs,!1),this.options.persister?this.options.persister(M,D,this):M(D)},y=(()=>{const M={fetchOptions:i,options:this.options,queryKey:this.queryKey,client:E(this,Hs),state:this.state,fetchFn:f};return u(M),M})(),g=E(this,Il)==="infinite"?X1(this.options.pages):this.options.behavior;g==null||g.onFetch(y,this),ie(this,$l,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((b=y.fetchOptions)==null?void 0:b.meta))&&Se(this,en,oa).call(this,{type:"fetch",meta:(v=y.fetchOptions)==null?void 0:v.meta}),ie(this,mt,Qv({initialPromise:i==null?void 0:i.initialPromise,fn:y.fetchFn,onCancel:M=>{M instanceof zd&&M.revert&&this.setState({...E(this,$l),fetchStatus:"idle"}),r.abort()},onFail:(M,Q)=>{Se(this,en,oa).call(this,{type:"failed",failureCount:M,error:Q})},onPause:()=>{Se(this,en,oa).call(this,{type:"pause"})},onContinue:()=>{Se(this,en,oa).call(this,{type:"continue"})},retry:y.options.retry,retryDelay:y.options.retryDelay,networkMode:y.options.networkMode,canRun:()=>!0}));try{const M=await E(this,mt).start();if(M===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(M),(j=(S=E(this,pn).config).onSuccess)==null||j.call(S,M,this),(w=(_=E(this,pn).config).onSettled)==null||w.call(_,M,this.state.error,this),M}catch(M){if(M instanceof zd){if(M.silent)return E(this,mt).promise;if(M.revert){if(this.state.data===void 0)throw M;return this.state.data}}throw Se(this,en,oa).call(this,{type:"error",error:M}),(U=(R=E(this,pn).config).onError)==null||U.call(R,M,this),(H=(k=E(this,pn).config).onSettled)==null||H.call(k,this.state.data,M,this),M}finally{this.scheduleGc()}}},Il=new WeakMap,qs=new WeakMap,$l=new WeakMap,pn=new WeakMap,Hs=new WeakMap,mt=new WeakMap,Er=new WeakMap,Gs=new WeakMap,en=new WeakSet,Vv=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},oa=function(s){const i=r=>{switch(s.type){case"failed":return{...r,fetchFailureCount:s.failureCount,fetchFailureReason:s.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Kv(r.data,this.options),fetchMeta:s.meta??null};case"success":const u={...r,...jg(s.data,s.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!s.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ie(this,$l,s.manual?u:void 0),u;case"error":const f=s.error;return{...r,error:f,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:f,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...s.state}}};this.state=i(this.state),ft.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),E(this,pn).notify({query:this,type:"updated",action:s})})},Av);function Kv(n,s){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Gv(s.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function jg(n,s){return{data:n,dataUpdatedAt:s??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Rg(n){const s=typeof n.initialData=="function"?n.initialData():n.initialData,i=s!==void 0,r=i?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:s,dataUpdateCount:0,dataUpdatedAt:i?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}var Bt,Me,Cr,Ct,Qs,Wl,ua,Ia,Nr,ei,ti,Ys,Vs,$a,ni,De,vr,Dd,Ud,Ld,kd,Bd,qd,Hd,Xv,Ov,J1=(Ov=class extends ui{constructor(s,i){super();de(this,De);de(this,Bt);de(this,Me);de(this,Cr);de(this,Ct);de(this,Qs);de(this,Wl);de(this,ua);de(this,Ia);de(this,Nr);de(this,ei);de(this,ti);de(this,Ys);de(this,Vs);de(this,$a);de(this,ni,new Set);this.options=i,ie(this,Bt,s),ie(this,Ia,null),ie(this,ua,Od()),this.bindMethods(),this.setOptions(i)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(E(this,Me).addObserver(this),_g(E(this,Me),this.options)?Se(this,De,vr).call(this):this.updateResult(),Se(this,De,kd).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Gd(E(this,Me),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Gd(E(this,Me),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Se(this,De,Bd).call(this),Se(this,De,qd).call(this),E(this,Me).removeObserver(this)}setOptions(s){const i=this.options,r=E(this,Me);if(this.options=E(this,Bt).defaultQueryOptions(s),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof tn(this.options.enabled,E(this,Me))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Se(this,De,Hd).call(this),E(this,Me).setOptions(this.options),i._defaulted&&!wu(this.options,i)&&E(this,Bt).getQueryCache().notify({type:"observerOptionsUpdated",query:E(this,Me),observer:this});const u=this.hasListeners();u&&Tg(E(this,Me),r,this.options,i)&&Se(this,De,vr).call(this),this.updateResult(),u&&(E(this,Me)!==r||tn(this.options.enabled,E(this,Me))!==tn(i.enabled,E(this,Me))||is(this.options.staleTime,E(this,Me))!==is(i.staleTime,E(this,Me)))&&Se(this,De,Dd).call(this);const f=Se(this,De,Ud).call(this);u&&(E(this,Me)!==r||tn(this.options.enabled,E(this,Me))!==tn(i.enabled,E(this,Me))||f!==E(this,$a))&&Se(this,De,Ld).call(this,f)}getOptimisticResult(s){const i=E(this,Bt).getQueryCache().build(E(this,Bt),s),r=this.createResult(i,s);return I1(this,r)&&(ie(this,Ct,r),ie(this,Wl,this.options),ie(this,Qs,E(this,Me).state)),r}getCurrentResult(){return E(this,Ct)}trackResult(s,i){return new Proxy(s,{get:(r,u)=>(this.trackProp(u),i==null||i(u),u==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&E(this,ua).status==="pending"&&E(this,ua).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,u))})}trackProp(s){E(this,ni).add(s)}getCurrentQuery(){return E(this,Me)}refetch({...s}={}){return this.fetch({...s})}fetchOptimistic(s){const i=E(this,Bt).defaultQueryOptions(s),r=E(this,Bt).getQueryCache().build(E(this,Bt),i);return r.fetch().then(()=>this.createResult(r,i))}fetch(s){return Se(this,De,vr).call(this,{...s,cancelRefetch:s.cancelRefetch??!0}).then(()=>(this.updateResult(),E(this,Ct)))}createResult(s,i){var V;const r=E(this,Me),u=this.options,f=E(this,Ct),d=E(this,Qs),y=E(this,Wl),m=s!==r?s.state:E(this,Cr),{state:b}=s;let v={...b},S=!1,j;if(i._optimisticResults){const $=this.hasListeners(),W=!$&&_g(s,i),Z=$&&Tg(s,r,i,u);(W||Z)&&(v={...v,...Kv(b.data,s.options)}),i._optimisticResults==="isRestoring"&&(v.fetchStatus="idle")}let{error:_,errorUpdatedAt:w,status:R}=v;j=v.data;let U=!1;if(i.placeholderData!==void 0&&j===void 0&&R==="pending"){let $;f!=null&&f.isPlaceholderData&&i.placeholderData===(y==null?void 0:y.placeholderData)?($=f.data,U=!0):$=typeof i.placeholderData=="function"?i.placeholderData((V=E(this,ti))==null?void 0:V.state.data,E(this,ti)):i.placeholderData,$!==void 0&&(R="success",j=Ad(f==null?void 0:f.data,$,i),S=!0)}if(i.select&&j!==void 0&&!U)if(f&&j===(d==null?void 0:d.data)&&i.select===E(this,Nr))j=E(this,ei);else try{ie(this,Nr,i.select),j=i.select(j),j=Ad(f==null?void 0:f.data,j,i),ie(this,ei,j),ie(this,Ia,null)}catch($){ie(this,Ia,$)}E(this,Ia)&&(_=E(this,Ia),j=E(this,ei),w=Date.now(),R="error");const k=v.fetchStatus==="fetching",H=R==="pending",M=R==="error",Q=H&&k,D=j!==void 0,A={status:R,fetchStatus:v.fetchStatus,isPending:H,isSuccess:R==="success",isError:M,isInitialLoading:Q,isLoading:Q,data:j,dataUpdatedAt:v.dataUpdatedAt,error:_,errorUpdatedAt:w,failureCount:v.fetchFailureCount,failureReason:v.fetchFailureReason,errorUpdateCount:v.errorUpdateCount,isFetched:s.isFetched(),isFetchedAfterMount:v.dataUpdateCount>m.dataUpdateCount||v.errorUpdateCount>m.errorUpdateCount,isFetching:k,isRefetching:k&&!H,isLoadingError:M&&!D,isPaused:v.fetchStatus==="paused",isPlaceholderData:S,isRefetchError:M&&D,isStale:ih(s,i),refetch:this.refetch,promise:E(this,ua),isEnabled:tn(i.enabled,s)!==!1};if(this.options.experimental_prefetchInRender){const $=A.data!==void 0,W=A.status==="error"&&!$,Z=he=>{W?he.reject(A.error):$&&he.resolve(A.data)},te=()=>{const he=ie(this,ua,A.promise=Od());Z(he)},ee=E(this,ua);switch(ee.status){case"pending":s.queryHash===r.queryHash&&Z(ee);break;case"fulfilled":(W||A.data!==ee.value)&&te();break;case"rejected":(!W||A.error!==ee.reason)&&te();break}}return A}updateResult(){const s=E(this,Ct),i=this.createResult(E(this,Me),this.options);if(ie(this,Qs,E(this,Me).state),ie(this,Wl,this.options),E(this,Qs).data!==void 0&&ie(this,ti,E(this,Me)),wu(i,s))return;ie(this,Ct,i);const r=()=>{if(!s)return!0;const{notifyOnChangeProps:u}=this.options,f=typeof u=="function"?u():u;if(f==="all"||!f&&!E(this,ni).size)return!0;const d=new Set(f??E(this,ni));return this.options.throwOnError&&d.add("error"),Object.keys(E(this,Ct)).some(y=>{const g=y;return E(this,Ct)[g]!==s[g]&&d.has(g)})};Se(this,De,Xv).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Se(this,De,kd).call(this)}},Bt=new WeakMap,Me=new WeakMap,Cr=new WeakMap,Ct=new WeakMap,Qs=new WeakMap,Wl=new WeakMap,ua=new WeakMap,Ia=new WeakMap,Nr=new WeakMap,ei=new WeakMap,ti=new WeakMap,Ys=new WeakMap,Vs=new WeakMap,$a=new WeakMap,ni=new WeakMap,De=new WeakSet,vr=function(s){Se(this,De,Hd).call(this);let i=E(this,Me).fetch(this.options,s);return s!=null&&s.throwOnError||(i=i.catch(Nt)),i},Dd=function(){Se(this,De,Bd).call(this);const s=is(this.options.staleTime,E(this,Me));if(Sr.isServer()||E(this,Ct).isStale||!Nd(s))return;const r=Bv(E(this,Ct).dataUpdatedAt,s)+1;ie(this,Ys,Ds.setTimeout(()=>{E(this,Ct).isStale||this.updateResult()},r))},Ud=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(E(this,Me)):this.options.refetchInterval)??!1},Ld=function(s){Se(this,De,qd).call(this),ie(this,$a,s),!(Sr.isServer()||tn(this.options.enabled,E(this,Me))===!1||!Nd(E(this,$a))||E(this,$a)===0)&&ie(this,Vs,Ds.setInterval(()=>{(this.options.refetchIntervalInBackground||th.isFocused())&&Se(this,De,vr).call(this)},E(this,$a)))},kd=function(){Se(this,De,Dd).call(this),Se(this,De,Ld).call(this,Se(this,De,Ud).call(this))},Bd=function(){E(this,Ys)!==void 0&&(Ds.clearTimeout(E(this,Ys)),ie(this,Ys,void 0))},qd=function(){E(this,Vs)!==void 0&&(Ds.clearInterval(E(this,Vs)),ie(this,Vs,void 0))},Hd=function(){const s=E(this,Bt).getQueryCache().build(E(this,Bt),this.options);if(s===E(this,Me))return;const i=E(this,Me);ie(this,Me,s),ie(this,Cr,s.state),this.hasListeners()&&(i==null||i.removeObserver(this),s.addObserver(this))},Xv=function(s){ft.batch(()=>{s.listeners&&this.listeners.forEach(i=>{i(E(this,Ct))}),E(this,Bt).getQueryCache().notify({query:E(this,Me),type:"observerResultsUpdated"})})},Ov);function F1(n,s){return tn(s.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&tn(s.retryOnMount,n)===!1)}function _g(n,s){return F1(n,s)||n.state.data!==void 0&&Gd(n,s,s.refetchOnMount)}function Gd(n,s,i){if(tn(s.enabled,n)!==!1&&is(s.staleTime,n)!=="static"){const r=typeof i=="function"?i(n):i;return r==="always"||r!==!1&&ih(n,s)}return!1}function Tg(n,s,i,r){return(n!==s||tn(r.enabled,n)===!1)&&(!i.suspense||n.state.status!=="error")&&ih(n,i)}function ih(n,s){return tn(s.enabled,n)!==!1&&n.isStaleByTime(is(s.staleTime,n))}function I1(n,s){return!wu(n.getCurrentResult(),s)}var Mr,kn,Rt,Ks,Bn,Ka,zv,$1=(zv=class extends Yv{constructor(s){super();de(this,Bn);de(this,Mr);de(this,kn);de(this,Rt);de(this,Ks);ie(this,Mr,s.client),this.mutationId=s.mutationId,ie(this,Rt,s.mutationCache),ie(this,kn,[]),this.state=s.state||Pv(),this.setOptions(s.options),this.scheduleGc()}setOptions(s){this.options=s,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(s){E(this,kn).includes(s)||(E(this,kn).push(s),this.clearGcTimeout(),E(this,Rt).notify({type:"observerAdded",mutation:this,observer:s}))}removeObserver(s){ie(this,kn,E(this,kn).filter(i=>i!==s)),this.scheduleGc(),E(this,Rt).notify({type:"observerRemoved",mutation:this,observer:s})}optionalRemove(){E(this,kn).length||(this.state.status==="pending"?this.scheduleGc():E(this,Rt).remove(this))}continue(){var s;return((s=E(this,Ks))==null?void 0:s.continue())??this.execute(this.state.variables)}async execute(s){var d,y,g,m,b,v,S,j,_,w,R,U,k,H,M,Q,D,O;const i=()=>{Se(this,Bn,Ka).call(this,{type:"continue"})},r={client:E(this,Mr),meta:this.options.meta,mutationKey:this.options.mutationKey};ie(this,Ks,Qv({fn:()=>this.options.mutationFn?this.options.mutationFn(s,r):Promise.reject(new Error("No mutationFn found")),onFail:(A,V)=>{Se(this,Bn,Ka).call(this,{type:"failed",failureCount:A,error:V})},onPause:()=>{Se(this,Bn,Ka).call(this,{type:"pause"})},onContinue:i,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>E(this,Rt).canRun(this)}));const u=this.state.status==="pending",f=!E(this,Ks).canStart();try{if(u)i();else{Se(this,Bn,Ka).call(this,{type:"pending",variables:s,isPaused:f}),E(this,Rt).config.onMutate&&await E(this,Rt).config.onMutate(s,this,r);const V=await((y=(d=this.options).onMutate)==null?void 0:y.call(d,s,r));V!==this.state.context&&Se(this,Bn,Ka).call(this,{type:"pending",context:V,variables:s,isPaused:f})}const A=await E(this,Ks).start();return await((m=(g=E(this,Rt).config).onSuccess)==null?void 0:m.call(g,A,s,this.state.context,this,r)),await((v=(b=this.options).onSuccess)==null?void 0:v.call(b,A,s,this.state.context,r)),await((j=(S=E(this,Rt).config).onSettled)==null?void 0:j.call(S,A,null,this.state.variables,this.state.context,this,r)),await((w=(_=this.options).onSettled)==null?void 0:w.call(_,A,null,s,this.state.context,r)),Se(this,Bn,Ka).call(this,{type:"success",data:A}),A}catch(A){try{await((U=(R=E(this,Rt).config).onError)==null?void 0:U.call(R,A,s,this.state.context,this,r))}catch(V){Promise.reject(V)}try{await((H=(k=this.options).onError)==null?void 0:H.call(k,A,s,this.state.context,r))}catch(V){Promise.reject(V)}try{await((Q=(M=E(this,Rt).config).onSettled)==null?void 0:Q.call(M,void 0,A,this.state.variables,this.state.context,this,r))}catch(V){Promise.reject(V)}try{await((O=(D=this.options).onSettled)==null?void 0:O.call(D,void 0,A,s,this.state.context,r))}catch(V){Promise.reject(V)}throw Se(this,Bn,Ka).call(this,{type:"error",error:A}),A}finally{E(this,Rt).runNext(this)}}},Mr=new WeakMap,kn=new WeakMap,Rt=new WeakMap,Ks=new WeakMap,Bn=new WeakSet,Ka=function(s){const i=r=>{switch(s.type){case"failed":return{...r,failureCount:s.failureCount,failureReason:s.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:s.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:s.isPaused,status:"pending",variables:s.variables,submittedAt:Date.now()};case"success":return{...r,data:s.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:s.error,failureCount:r.failureCount+1,failureReason:s.error,isPaused:!1,status:"error"}}};this.state=i(this.state),ft.batch(()=>{E(this,kn).forEach(r=>{r.onMutationUpdate(s)}),E(this,Rt).notify({mutation:this,type:"updated",action:s})})},zv);function Pv(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ca,wn,Ar,Dv,W1=(Dv=class extends ui{constructor(s={}){super();de(this,ca);de(this,wn);de(this,Ar);this.config=s,ie(this,ca,new Set),ie(this,wn,new Map),ie(this,Ar,0)}build(s,i,r){const u=new $1({client:s,mutationCache:this,mutationId:++lu(this,Ar)._,options:s.defaultMutationOptions(i),state:r});return this.add(u),u}add(s){E(this,ca).add(s);const i=iu(s);if(typeof i=="string"){const r=E(this,wn).get(i);r?r.push(s):E(this,wn).set(i,[s])}this.notify({type:"added",mutation:s})}remove(s){if(E(this,ca).delete(s)){const i=iu(s);if(typeof i=="string"){const r=E(this,wn).get(i);if(r)if(r.length>1){const u=r.indexOf(s);u!==-1&&r.splice(u,1)}else r[0]===s&&E(this,wn).delete(i)}}this.notify({type:"removed",mutation:s})}canRun(s){const i=iu(s);if(typeof i=="string"){const r=E(this,wn).get(i),u=r==null?void 0:r.find(f=>f.state.status==="pending");return!u||u===s}else return!0}runNext(s){var r;const i=iu(s);if(typeof i=="string"){const u=(r=E(this,wn).get(i))==null?void 0:r.find(f=>f!==s&&f.state.isPaused);return(u==null?void 0:u.continue())??Promise.resolve()}else return Promise.resolve()}clear(){ft.batch(()=>{E(this,ca).forEach(s=>{this.notify({type:"removed",mutation:s})}),E(this,ca).clear(),E(this,wn).clear()})}getAll(){return Array.from(E(this,ca))}find(s){const i={exact:!0,...s};return this.getAll().find(r=>vg(i,r))}findAll(s={}){return this.getAll().filter(i=>vg(s,i))}notify(s){ft.batch(()=>{this.listeners.forEach(i=>{i(s)})})}resumePausedMutations(){const s=this.getAll().filter(i=>i.state.isPaused);return ft.batch(()=>Promise.all(s.map(i=>i.continue().catch(Nt))))}},ca=new WeakMap,wn=new WeakMap,Ar=new WeakMap,Dv);function iu(n){var s;return(s=n.options.scope)==null?void 0:s.id}var fa,Wa,qt,da,ya,gu,Qd,Uv,eS=(Uv=class extends ui{constructor(i,r){super();de(this,ya);de(this,fa);de(this,Wa);de(this,qt);de(this,da);ie(this,fa,i),this.setOptions(r),this.bindMethods(),Se(this,ya,gu).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(i){var u;const r=this.options;this.options=E(this,fa).defaultMutationOptions(i),wu(this.options,r)||E(this,fa).getMutationCache().notify({type:"observerOptionsUpdated",mutation:E(this,qt),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Js(r.mutationKey)!==Js(this.options.mutationKey)?this.reset():((u=E(this,qt))==null?void 0:u.state.status)==="pending"&&E(this,qt).setOptions(this.options)}onUnsubscribe(){var i;this.hasListeners()||(i=E(this,qt))==null||i.removeObserver(this)}onMutationUpdate(i){Se(this,ya,gu).call(this),Se(this,ya,Qd).call(this,i)}getCurrentResult(){return E(this,Wa)}reset(){var i;(i=E(this,qt))==null||i.removeObserver(this),ie(this,qt,void 0),Se(this,ya,gu).call(this),Se(this,ya,Qd).call(this)}mutate(i,r){var u;return ie(this,da,r),(u=E(this,qt))==null||u.removeObserver(this),ie(this,qt,E(this,fa).getMutationCache().build(E(this,fa),this.options)),E(this,qt).addObserver(this),E(this,qt).execute(i)}},fa=new WeakMap,Wa=new WeakMap,qt=new WeakMap,da=new WeakMap,ya=new WeakSet,gu=function(){var r;const i=((r=E(this,qt))==null?void 0:r.state)??Pv();ie(this,Wa,{...i,isPending:i.status==="pending",isSuccess:i.status==="success",isError:i.status==="error",isIdle:i.status==="idle",mutate:this.mutate,reset:this.reset})},Qd=function(i){ft.batch(()=>{var r,u,f,d,y,g,m,b;if(E(this,da)&&this.hasListeners()){const v=E(this,Wa).variables,S=E(this,Wa).context,j={client:E(this,fa),meta:this.options.meta,mutationKey:this.options.mutationKey};if((i==null?void 0:i.type)==="success"){try{(u=(r=E(this,da)).onSuccess)==null||u.call(r,i.data,v,S,j)}catch(_){Promise.reject(_)}try{(d=(f=E(this,da)).onSettled)==null||d.call(f,i.data,null,v,S,j)}catch(_){Promise.reject(_)}}else if((i==null?void 0:i.type)==="error"){try{(g=(y=E(this,da)).onError)==null||g.call(y,i.error,v,S,j)}catch(_){Promise.reject(_)}try{(b=(m=E(this,da)).onSettled)==null||b.call(m,void 0,i.error,v,S,j)}catch(_){Promise.reject(_)}}}this.listeners.forEach(v=>{v(E(this,Wa))})})},Uv),qn,Lv,tS=(Lv=class extends ui{constructor(s={}){super();de(this,qn);this.config=s,ie(this,qn,new Map)}build(s,i,r){const u=i.queryKey,f=i.queryHash??nh(u,i);let d=this.get(f);return d||(d=new Z1({client:s,queryKey:u,queryHash:f,options:s.defaultQueryOptions(i),state:r,defaultOptions:s.getQueryDefaults(u)}),this.add(d)),d}add(s){E(this,qn).has(s.queryHash)||(E(this,qn).set(s.queryHash,s),this.notify({type:"added",query:s}))}remove(s){const i=E(this,qn).get(s.queryHash);i&&(s.destroy(),i===s&&E(this,qn).delete(s.queryHash),this.notify({type:"removed",query:s}))}clear(){ft.batch(()=>{this.getAll().forEach(s=>{this.remove(s)})})}get(s){return E(this,qn).get(s)}getAll(){return[...E(this,qn).values()]}find(s){const i={exact:!0,...s};return this.getAll().find(r=>gg(i,r))}findAll(s={}){const i=this.getAll();return Object.keys(s).length>0?i.filter(r=>gg(s,r)):i}notify(s){ft.batch(()=>{this.listeners.forEach(i=>{i(s)})})}onFocus(){ft.batch(()=>{this.getAll().forEach(s=>{s.onFocus()})})}onOnline(){ft.batch(()=>{this.getAll().forEach(s=>{s.onOnline()})})}},qn=new WeakMap,Lv),et,es,ts,ai,si,ns,li,ii,kv,nS=(kv=class{constructor(n={}){de(this,et);de(this,es);de(this,ts);de(this,ai);de(this,si);de(this,ns);de(this,li);de(this,ii);ie(this,et,n.queryCache||new tS),ie(this,es,n.mutationCache||new W1),ie(this,ts,n.defaultOptions||{}),ie(this,ai,new Map),ie(this,si,new Map),ie(this,ns,0)}mount(){lu(this,ns)._++,E(this,ns)===1&&(ie(this,li,th.subscribe(async n=>{n&&(await this.resumePausedMutations(),E(this,et).onFocus())})),ie(this,ii,Eu.subscribe(async n=>{n&&(await this.resumePausedMutations(),E(this,et).onOnline())})))}unmount(){var n,s;lu(this,ns)._--,E(this,ns)===0&&((n=E(this,li))==null||n.call(this),ie(this,li,void 0),(s=E(this,ii))==null||s.call(this),ie(this,ii,void 0))}isFetching(n){return E(this,et).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return E(this,es).findAll({...n,status:"pending"}).length}getQueryData(n){var i;const s=this.defaultQueryOptions({queryKey:n});return(i=E(this,et).get(s.queryHash))==null?void 0:i.state.data}ensureQueryData(n){const s=this.defaultQueryOptions(n),i=E(this,et).build(this,s),r=i.state.data;return r===void 0?this.fetchQuery(n):(n.revalidateIfStale&&i.isStaleByTime(is(s.staleTime,i))&&this.prefetchQuery(s),Promise.resolve(r))}getQueriesData(n){return E(this,et).findAll(n).map(({queryKey:s,state:i})=>{const r=i.data;return[s,r]})}setQueryData(n,s,i){const r=this.defaultQueryOptions({queryKey:n}),u=E(this,et).get(r.queryHash),f=u==null?void 0:u.state.data,d=L1(s,f);if(d!==void 0)return E(this,et).build(this,r).setData(d,{...i,manual:!0})}setQueriesData(n,s,i){return ft.batch(()=>E(this,et).findAll(n).map(({queryKey:r})=>[r,this.setQueryData(r,s,i)]))}getQueryState(n){var i;const s=this.defaultQueryOptions({queryKey:n});return(i=E(this,et).get(s.queryHash))==null?void 0:i.state}removeQueries(n){const s=E(this,et);ft.batch(()=>{s.findAll(n).forEach(i=>{s.remove(i)})})}resetQueries(n,s){const i=E(this,et);return ft.batch(()=>(i.findAll(n).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...n},s)))}cancelQueries(n,s={}){const i={revert:!0,...s},r=ft.batch(()=>E(this,et).findAll(n).map(u=>u.cancel(i)));return Promise.all(r).then(Nt).catch(Nt)}invalidateQueries(n,s={}){return ft.batch(()=>(E(this,et).findAll(n).forEach(i=>{i.invalidate()}),(n==null?void 0:n.refetchType)==="none"?Promise.resolve():this.refetchQueries({...n,type:(n==null?void 0:n.refetchType)??(n==null?void 0:n.type)??"active"},s)))}refetchQueries(n,s={}){const i={...s,cancelRefetch:s.cancelRefetch??!0},r=ft.batch(()=>E(this,et).findAll(n).filter(u=>!u.isDisabled()&&!u.isStatic()).map(u=>{let f=u.fetch(void 0,i);return i.throwOnError||(f=f.catch(Nt)),u.state.fetchStatus==="paused"?Promise.resolve():f}));return Promise.all(r).then(Nt)}fetchQuery(n){const s=this.defaultQueryOptions(n);s.retry===void 0&&(s.retry=!1);const i=E(this,et).build(this,s);return i.isStaleByTime(is(s.staleTime,i))?i.fetch(s):Promise.resolve(i.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(Nt).catch(Nt)}fetchInfiniteQuery(n){return n._type="infinite",this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(Nt).catch(Nt)}ensureInfiniteQueryData(n){return n._type="infinite",this.ensureQueryData(n)}resumePausedMutations(){return Eu.isOnline()?E(this,es).resumePausedMutations():Promise.resolve()}getQueryCache(){return E(this,et)}getMutationCache(){return E(this,es)}getDefaultOptions(){return E(this,ts)}setDefaultOptions(n){ie(this,ts,n)}setQueryDefaults(n,s){E(this,ai).set(Js(n),{queryKey:n,defaultOptions:s})}getQueryDefaults(n){const s=[...E(this,ai).values()],i={};return s.forEach(r=>{xr(n,r.queryKey)&&Object.assign(i,r.defaultOptions)}),i}setMutationDefaults(n,s){E(this,si).set(Js(n),{mutationKey:n,defaultOptions:s})}getMutationDefaults(n){const s=[...E(this,si).values()],i={};return s.forEach(r=>{xr(n,r.mutationKey)&&Object.assign(i,r.defaultOptions)}),i}defaultQueryOptions(n){if(n._defaulted)return n;const s={...E(this,ts).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return s.queryHash||(s.queryHash=nh(s.queryKey,s)),s.refetchOnReconnect===void 0&&(s.refetchOnReconnect=s.networkMode!=="always"),s.throwOnError===void 0&&(s.throwOnError=!!s.suspense),!s.networkMode&&s.persister&&(s.networkMode="offlineFirst"),s.queryFn===sh&&(s.enabled=!1),s}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...E(this,ts).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){E(this,et).clear(),E(this,es).clear()}},et=new WeakMap,es=new WeakMap,ts=new WeakMap,ai=new WeakMap,si=new WeakMap,ns=new WeakMap,li=new WeakMap,ii=new WeakMap,kv),ad={exports:{}},ve={};/**
10
- * @license React
11
- * react.production.js
12
- *
13
- * Copyright (c) Meta Platforms, Inc. and affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var wg;function aS(){if(wg)return ve;wg=1;var n=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),d=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),S=Symbol.iterator;function j(C){return C===null||typeof C!="object"?null:(C=S&&C[S]||C["@@iterator"],typeof C=="function"?C:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,R={};function U(C,F,ae){this.props=C,this.context=F,this.refs=R,this.updater=ae||_}U.prototype.isReactComponent={},U.prototype.setState=function(C,F){if(typeof C!="object"&&typeof C!="function"&&C!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,C,F,"setState")},U.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function k(){}k.prototype=U.prototype;function H(C,F,ae){this.props=C,this.context=F,this.refs=R,this.updater=ae||_}var M=H.prototype=new k;M.constructor=H,w(M,U.prototype),M.isPureReactComponent=!0;var Q=Array.isArray;function D(){}var O={H:null,A:null,T:null,S:null},A=Object.prototype.hasOwnProperty;function V(C,F,ae){var se=ae.ref;return{$$typeof:n,type:C,key:F,ref:se!==void 0?se:null,props:ae}}function $(C,F){return V(C.type,F,C.props)}function W(C){return typeof C=="object"&&C!==null&&C.$$typeof===n}function Z(C){var F={"=":"=0",":":"=2"};return"$"+C.replace(/[=:]/g,function(ae){return F[ae]})}var te=/\/+/g;function ee(C,F){return typeof C=="object"&&C!==null&&C.key!=null?Z(""+C.key):F.toString(36)}function he(C){switch(C.status){case"fulfilled":return C.value;case"rejected":throw C.reason;default:switch(typeof C.status=="string"?C.then(D,D):(C.status="pending",C.then(function(F){C.status==="pending"&&(C.status="fulfilled",C.value=F)},function(F){C.status==="pending"&&(C.status="rejected",C.reason=F)})),C.status){case"fulfilled":return C.value;case"rejected":throw C.reason}}throw C}function L(C,F,ae,se,le){var me=typeof C;(me==="undefined"||me==="boolean")&&(C=null);var Re=!1;if(C===null)Re=!0;else switch(me){case"bigint":case"string":case"number":Re=!0;break;case"object":switch(C.$$typeof){case n:case s:Re=!0;break;case b:return Re=C._init,L(Re(C._payload),F,ae,se,le)}}if(Re)return le=le(C),Re=se===""?"."+ee(C,0):se,Q(le)?(ae="",Re!=null&&(ae=Re.replace(te,"$&/")+"/"),L(le,F,ae,"",function(sn){return sn})):le!=null&&(W(le)&&(le=$(le,ae+(le.key==null||C&&C.key===le.key?"":(""+le.key).replace(te,"$&/")+"/")+Re)),F.push(le)),1;Re=0;var Be=se===""?".":se+":";if(Q(C))for(var ge=0;ge<C.length;ge++)se=C[ge],me=Be+ee(se,ge),Re+=L(se,F,ae,me,le);else if(ge=j(C),typeof ge=="function")for(C=ge.call(C),ge=0;!(se=C.next()).done;)se=se.value,me=Be+ee(se,ge++),Re+=L(se,F,ae,me,le);else if(me==="object"){if(typeof C.then=="function")return L(he(C),F,ae,se,le);throw F=String(C),Error("Objects are not valid as a React child (found: "+(F==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":F)+"). If you meant to render a collection of children, use an array instead.")}return Re}function X(C,F,ae){if(C==null)return C;var se=[],le=0;return L(C,se,"","",function(me){return F.call(ae,me,le++)}),se}function ce(C){if(C._status===-1){var F=C._result;F=F(),F.then(function(ae){(C._status===0||C._status===-1)&&(C._status=1,C._result=ae)},function(ae){(C._status===0||C._status===-1)&&(C._status=2,C._result=ae)}),C._status===-1&&(C._status=0,C._result=F)}if(C._status===1)return C._result.default;throw C._result}var Ce=typeof reportError=="function"?reportError:function(C){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var F=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof C=="object"&&C!==null&&typeof C.message=="string"?String(C.message):String(C),error:C});if(!window.dispatchEvent(F))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",C);return}console.error(C)},ne={map:X,forEach:function(C,F,ae){X(C,function(){F.apply(this,arguments)},ae)},count:function(C){var F=0;return X(C,function(){F++}),F},toArray:function(C){return X(C,function(F){return F})||[]},only:function(C){if(!W(C))throw Error("React.Children.only expected to receive a single React element child.");return C}};return ve.Activity=v,ve.Children=ne,ve.Component=U,ve.Fragment=i,ve.Profiler=u,ve.PureComponent=H,ve.StrictMode=r,ve.Suspense=g,ve.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=O,ve.__COMPILER_RUNTIME={__proto__:null,c:function(C){return O.H.useMemoCache(C)}},ve.cache=function(C){return function(){return C.apply(null,arguments)}},ve.cacheSignal=function(){return null},ve.cloneElement=function(C,F,ae){if(C==null)throw Error("The argument must be a React element, but you passed "+C+".");var se=w({},C.props),le=C.key;if(F!=null)for(me in F.key!==void 0&&(le=""+F.key),F)!A.call(F,me)||me==="key"||me==="__self"||me==="__source"||me==="ref"&&F.ref===void 0||(se[me]=F[me]);var me=arguments.length-2;if(me===1)se.children=ae;else if(1<me){for(var Re=Array(me),Be=0;Be<me;Be++)Re[Be]=arguments[Be+2];se.children=Re}return V(C.type,le,se)},ve.createContext=function(C){return C={$$typeof:d,_currentValue:C,_currentValue2:C,_threadCount:0,Provider:null,Consumer:null},C.Provider=C,C.Consumer={$$typeof:f,_context:C},C},ve.createElement=function(C,F,ae){var se,le={},me=null;if(F!=null)for(se in F.key!==void 0&&(me=""+F.key),F)A.call(F,se)&&se!=="key"&&se!=="__self"&&se!=="__source"&&(le[se]=F[se]);var Re=arguments.length-2;if(Re===1)le.children=ae;else if(1<Re){for(var Be=Array(Re),ge=0;ge<Re;ge++)Be[ge]=arguments[ge+2];le.children=Be}if(C&&C.defaultProps)for(se in Re=C.defaultProps,Re)le[se]===void 0&&(le[se]=Re[se]);return V(C,me,le)},ve.createRef=function(){return{current:null}},ve.forwardRef=function(C){return{$$typeof:y,render:C}},ve.isValidElement=W,ve.lazy=function(C){return{$$typeof:b,_payload:{_status:-1,_result:C},_init:ce}},ve.memo=function(C,F){return{$$typeof:m,type:C,compare:F===void 0?null:F}},ve.startTransition=function(C){var F=O.T,ae={};O.T=ae;try{var se=C(),le=O.S;le!==null&&le(ae,se),typeof se=="object"&&se!==null&&typeof se.then=="function"&&se.then(D,Ce)}catch(me){Ce(me)}finally{F!==null&&ae.types!==null&&(F.types=ae.types),O.T=F}},ve.unstable_useCacheRefresh=function(){return O.H.useCacheRefresh()},ve.use=function(C){return O.H.use(C)},ve.useActionState=function(C,F,ae){return O.H.useActionState(C,F,ae)},ve.useCallback=function(C,F){return O.H.useCallback(C,F)},ve.useContext=function(C){return O.H.useContext(C)},ve.useDebugValue=function(){},ve.useDeferredValue=function(C,F){return O.H.useDeferredValue(C,F)},ve.useEffect=function(C,F){return O.H.useEffect(C,F)},ve.useEffectEvent=function(C){return O.H.useEffectEvent(C)},ve.useId=function(){return O.H.useId()},ve.useImperativeHandle=function(C,F,ae){return O.H.useImperativeHandle(C,F,ae)},ve.useInsertionEffect=function(C,F){return O.H.useInsertionEffect(C,F)},ve.useLayoutEffect=function(C,F){return O.H.useLayoutEffect(C,F)},ve.useMemo=function(C,F){return O.H.useMemo(C,F)},ve.useOptimistic=function(C,F){return O.H.useOptimistic(C,F)},ve.useReducer=function(C,F,ae){return O.H.useReducer(C,F,ae)},ve.useRef=function(C){return O.H.useRef(C)},ve.useState=function(C){return O.H.useState(C)},ve.useSyncExternalStore=function(C,F,ae){return O.H.useSyncExternalStore(C,F,ae)},ve.useTransition=function(){return O.H.useTransition()},ve.version="19.2.6",ve}var Eg;function Or(){return Eg||(Eg=1,ad.exports=aS()),ad.exports}var K=Or();const jr=C1(K);var Zv=K.createContext(void 0),Is=n=>{const s=K.useContext(Zv);if(!s)throw new Error("No QueryClient set, use QueryClientProvider to set one");return s},sS=({client:n,children:s})=>(K.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),h.jsx(Zv.Provider,{value:n,children:s})),Jv=K.createContext(!1),lS=()=>K.useContext(Jv);Jv.Provider;function iS(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var rS=K.createContext(iS()),oS=()=>K.useContext(rS),uS=(n,s,i)=>{const r=i!=null&&i.state.error&&typeof n.throwOnError=="function"?lh(n.throwOnError,[i.state.error,i]):n.throwOnError;(n.suspense||n.experimental_prefetchInRender||r)&&(s.isReset()||(n.retryOnMount=!1))},cS=n=>{K.useEffect(()=>{n.clearReset()},[n])},fS=({result:n,errorResetBoundary:s,throwOnError:i,query:r,suspense:u})=>n.isError&&!s.isReset()&&!n.isFetching&&r&&(u&&n.data===void 0||lh(i,[n.error,r])),dS=n=>{if(n.suspense){const i=u=>u==="static"?u:Math.max(u??1e3,1e3),r=n.staleTime;n.staleTime=typeof r=="function"?(...u)=>i(r(...u)):i(r),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},hS=(n,s)=>n.isLoading&&n.isFetching&&!s,mS=(n,s)=>(n==null?void 0:n.suspense)&&s.isPending,Cg=(n,s,i)=>s.fetchOptimistic(n).catch(()=>{i.clearReset()});function yS(n,s,i){var j,_,w,R;const r=lS(),u=oS(),f=Is(),d=f.defaultQueryOptions(n);(_=(j=f.getDefaultOptions().queries)==null?void 0:j._experimental_beforeQuery)==null||_.call(j,d);const y=f.getQueryCache().get(d.queryHash),g=n.subscribed!==!1;d._optimisticResults=r?"isRestoring":g?"optimistic":void 0,dS(d),uS(d,u,y),cS(u);const m=!f.getQueryCache().get(d.queryHash),[b]=K.useState(()=>new s(f,d)),v=b.getOptimisticResult(d),S=!r&&g;if(K.useSyncExternalStore(K.useCallback(U=>{const k=S?b.subscribe(ft.batchCalls(U)):Nt;return b.updateResult(),k},[b,S]),()=>b.getCurrentResult(),()=>b.getCurrentResult()),K.useEffect(()=>{b.setOptions(d)},[d,b]),mS(d,v))throw Cg(d,b,u);if(fS({result:v,errorResetBoundary:u,throwOnError:d.throwOnError,query:y,suspense:d.suspense}))throw v.error;if((R=(w=f.getDefaultOptions().queries)==null?void 0:w._experimental_afterQuery)==null||R.call(w,d,v),d.experimental_prefetchInRender&&!Sr.isServer()&&hS(v,r)){const U=m?Cg(d,b,u):y==null?void 0:y.promise;U==null||U.catch(Nt).finally(()=>{b.updateResult()})}return d.notifyOnChangeProps?v:b.trackResult(v)}function _t(n,s){return yS(n,J1)}function Fs(n,s){const i=Is(),[r]=K.useState(()=>new eS(i,n));K.useEffect(()=>{r.setOptions(n)},[r,n]);const u=K.useSyncExternalStore(K.useCallback(d=>r.subscribe(ft.batchCalls(d)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),f=K.useCallback((d,y)=>{r.mutate(d,y).catch(Nt)},[r]);if(u.error&&lh(r.options.throwOnError,[u.error]))throw u.error;return{...u,mutate:f,mutateAsync:u.mutate}}var br=typeof window<"u"?K.useLayoutEffect:K.useEffect;function sd(n){const s=K.useRef({value:n,prev:null}),i=s.current.value;return n!==i&&(s.current={value:n,prev:i}),s.current.prev}function pS(n,s,i={},r={}){K.useEffect(()=>{if(!n.current||r.disabled||typeof IntersectionObserver!="function")return;const u=new IntersectionObserver(([f])=>{s(f)},i);return u.observe(n.current),()=>{u.disconnect()}},[s,i,r.disabled,n])}function gS(n){const s=K.useRef(null);return K.useImperativeHandle(n,()=>s.current,[]),s}const Fv=!1;function Rr(n){return n[n.length-1]}function vS(n){return typeof n=="function"}function Us(n,s){return vS(n)?n(s):n}const Iv=Object.prototype.hasOwnProperty,Ng=Object.prototype.propertyIsEnumerable;function $v(n){for(const s in n)if(Iv.call(n,s))return!0;return!1}const bS=()=>Object.create(null),Ns=(n,s)=>as(n,s,bS);function as(n,s,i=()=>({}),r=0){if(n===s)return n;if(r>500)return s;const u=s,f=Og(n)&&Og(u);if(!f&&!(Cu(n)&&Cu(u)))return u;const d=f?n:Mg(n);if(!d)return u;const y=f?u:Mg(u);if(!y)return u;const g=d.length,m=y.length,b=f?new Array(m):i();let v=0;for(let S=0;S<m;S++){const j=f?S:y[S],_=n[j],w=u[j];if(_===w){b[j]=_,(f?S<g:Iv.call(n,j))&&v++;continue}if(_===null||w===null||typeof _!="object"||typeof w!="object"){b[j]=w;continue}const R=as(_,w,i,r+1);b[j]=R,R===_&&v++}return g===m&&v===g?n:b}function Mg(n){const s=Object.getOwnPropertyNames(n);for(const u of s)if(!Ng.call(n,u))return!1;const i=Object.getOwnPropertySymbols(n);if(i.length===0)return s;const r=s;for(const u of i){if(!Ng.call(n,u))return!1;r.push(u)}return r}function Cu(n){if(!Ag(n))return!1;const s=n.constructor;if(typeof s>"u")return!0;const i=s.prototype;return!(!Ag(i)||!i.hasOwnProperty("isPrototypeOf"))}function Ag(n){return Object.prototype.toString.call(n)==="[object Object]"}function Og(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function Xs(n,s,i){if(n===s)return!0;if(typeof n!=typeof s)return!1;if(Array.isArray(n)&&Array.isArray(s)){if(n.length!==s.length)return!1;for(let r=0,u=n.length;r<u;r++)if(!Xs(n[r],s[r],i))return!1;return!0}if(Cu(n)&&Cu(s)){const r=(i==null?void 0:i.ignoreUndefined)??!0;if(i!=null&&i.partial){for(const d in s)if((!r||s[d]!==void 0)&&!Xs(n[d],s[d],i))return!1;return!0}let u=0;if(!r)u=Object.keys(n).length;else for(const d in n)n[d]!==void 0&&u++;let f=0;for(const d in s)if((!r||s[d]!==void 0)&&(f++,f>u||!Xs(n[d],s[d],i)))return!1;return u===f}return!1}function ri(n){let s,i;const r=new Promise((u,f)=>{s=u,i=f});return r.status="pending",r.resolve=u=>{r.status="resolved",r.value=u,s(u),n==null||n(u)},r.reject=u=>{r.status="rejected",i(u)},r}function _r(n){return!!(n&&typeof n=="object"&&typeof n.then=="function")}function xS(n){return n.replace(/[\x00-\x1f\x7f]/g,"")}function zg(n){let s;try{s=decodeURI(n)}catch{s=n.replaceAll(/%[0-9A-F]{2}/gi,i=>{try{return decodeURI(i)}catch{return i}})}return xS(s)}const SS=["http:","https:","mailto:","tel:"];function Nu(n,s){if(!n)return!1;try{const i=new URL(n);return!s.has(i.protocol)}catch{return!1}}function cr(n){if(!n)return{path:n,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(n)&&!n.startsWith("//"))return{path:n,handledProtocolRelativeURL:!1};const s=/%25|%5C/gi;let i=0,r="",u;for(;(u=s.exec(n))!==null;)r+=zg(n.slice(i,u.index))+u[0],i=s.lastIndex;r=r+zg(i?n.slice(i):n);let f=!1;return r.startsWith("//")&&(f=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:f}}function jS(n){return/\s|[^\u0000-\u007F]/.test(n)?n.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):n}function RS(n,s){if(n===s)return!0;if(n.length!==s.length)return!1;for(let i=0;i<n.length;i++)if(n[i]!==s[i])return!1;return!0}function ma(){throw new Error("Invariant failed")}function Tr(n){const s=new Map;let i,r;const u=f=>{f.next&&(f.prev?(f.prev.next=f.next,f.next.prev=f.prev,f.next=void 0,r&&(r.next=f,f.prev=r)):(f.next.prev=void 0,i=f.next,f.next=void 0,r&&(f.prev=r,r.next=f)),r=f)};return{get(f){const d=s.get(f);if(d)return u(d),d.value},set(f,d){if(s.size>=n&&i){const g=i;s.delete(g.key),g.next&&(i=g.next,g.next.prev=void 0),g===r&&(r=void 0)}const y=s.get(f);if(y)y.value=d,u(y);else{const g={key:f,value:d,prev:r};r&&(r.next=g),r=g,i||(i=g),s.set(f,g)}},clear(){s.clear(),i=void 0,r=void 0}}}const ss=4,Wv=5;function _S(n){const s=n.indexOf("{");if(s===-1)return null;const i=n.indexOf("}",s);return i===-1||s+1>=n.length?null:[s,i]}function e0(n,s,i=new Uint16Array(6)){const r=n.indexOf("/",s),u=r===-1?n.length:r,f=n.substring(s,u);if(!f||!f.includes("$"))return i[0]=0,i[1]=s,i[2]=s,i[3]=u,i[4]=u,i[5]=u,i;if(f==="$"){const y=n.length;return i[0]=2,i[1]=s,i[2]=s,i[3]=y,i[4]=y,i[5]=y,i}if(f.charCodeAt(0)===36)return i[0]=1,i[1]=s,i[2]=s+1,i[3]=u,i[4]=u,i[5]=u,i;const d=_S(f);if(d){const[y,g]=d,m=f.charCodeAt(y+1);if(m===45){if(y+2<f.length&&f.charCodeAt(y+2)===36){const b=y+3,v=g;if(b<v)return i[0]=3,i[1]=s+y,i[2]=s+b,i[3]=s+v,i[4]=s+g+1,i[5]=u,i}}else if(m===36){const b=y+1,v=y+2;return v===g?(i[0]=2,i[1]=s+y,i[2]=s+b,i[3]=s+v,i[4]=s+g+1,i[5]=n.length,i):(i[0]=1,i[1]=s+y,i[2]=s+v,i[3]=s+g,i[4]=s+g+1,i[5]=u,i)}}return i[0]=0,i[1]=s,i[2]=s,i[3]=u,i[4]=u,i[5]=u,i}function ku(n,s,i,r,u,f,d){var g,m,b,v,S,j,_,w,R,U;d==null||d(i);let y=r;{const k=i.fullPath??i.from,H=k.length,M=((g=i.options)==null?void 0:g.caseSensitive)??n,Q=((b=(m=i.options)==null?void 0:m.params)==null?void 0:b.parse)??((v=i.options)==null?void 0:v.parseParams);for(;y<H;){const O=e0(k,y,s);let A;const V=y,$=O[5];switch(y=$+1,f++,O[0]){case 0:{const W=k.substring(O[2],O[3]);if(M){const Z=(S=u.static)==null?void 0:S.get(W);if(Z)A=Z;else{u.static??(u.static=new Map);const te=Ls(i.fullPath??i.from);te.parent=u,te.depth=f,A=te,u.static.set(W,te)}}else{const Z=W.toLowerCase(),te=(j=u.staticInsensitive)==null?void 0:j.get(Z);if(te)A=te;else{u.staticInsensitive??(u.staticInsensitive=new Map);const ee=Ls(i.fullPath??i.from);ee.parent=u,ee.depth=f,A=ee,u.staticInsensitive.set(Z,ee)}}break}case 1:{const W=k.substring(V,O[1]),Z=k.substring(O[4],$),te=M&&!!(W||Z),ee=W?te?W:W.toLowerCase():void 0,he=Z?te?Z:Z.toLowerCase():void 0,L=!Q&&((_=u.dynamic)==null?void 0:_.find(X=>!X.parse&&X.caseSensitive===te&&X.prefix===ee&&X.suffix===he));if(L)A=L;else{const X=id(1,i.fullPath??i.from,te,ee,he);A=X,X.depth=f,X.parent=u,u.dynamic??(u.dynamic=[]),u.dynamic.push(X)}break}case 3:{const W=k.substring(V,O[1]),Z=k.substring(O[4],$),te=M&&!!(W||Z),ee=W?te?W:W.toLowerCase():void 0,he=Z?te?Z:Z.toLowerCase():void 0,L=!Q&&((w=u.optional)==null?void 0:w.find(X=>!X.parse&&X.caseSensitive===te&&X.prefix===ee&&X.suffix===he));if(L)A=L;else{const X=id(3,i.fullPath??i.from,te,ee,he);A=X,X.parent=u,X.depth=f,u.optional??(u.optional=[]),u.optional.push(X)}break}case 2:{const W=k.substring(V,O[1]),Z=k.substring(O[4],$),te=M&&!!(W||Z),ee=W?te?W:W.toLowerCase():void 0,he=Z?te?Z:Z.toLowerCase():void 0,L=id(2,i.fullPath??i.from,te,ee,he);A=L,L.parent=u,L.depth=f,u.wildcard??(u.wildcard=[]),u.wildcard.push(L)}}u=A}if(Q&&i.children&&!i.isRoot&&i.id&&i.id.charCodeAt(i.id.lastIndexOf("/")+1)===95){const O=Ls(i.fullPath??i.from);O.kind=Wv,O.parent=u,f++,O.depth=f,u.pathless??(u.pathless=[]),u.pathless.push(O),u=O}const D=(i.path||!i.children)&&!i.isRoot;if(D&&k.endsWith("/")){const O=Ls(i.fullPath??i.from);O.kind=ss,O.parent=u,f++,O.depth=f,u.index=O,u=O}u.parse=Q??null,u.priority=((U=(R=i.options)==null?void 0:R.params)==null?void 0:U.priority)??0,D&&!u.route&&(u.route=i,u.fullPath=i.fullPath??i.from)}if(i.children)for(const k of i.children)ku(n,s,k,y,u,f,d)}function ld(n,s){if(n.parse&&!s.parse)return-1;if(!n.parse&&s.parse)return 1;if(n.parse&&s.parse&&(n.priority||s.priority))return s.priority-n.priority;if(n.prefix&&s.prefix&&n.prefix!==s.prefix){if(n.prefix.startsWith(s.prefix))return-1;if(s.prefix.startsWith(n.prefix))return 1}if(n.suffix&&s.suffix&&n.suffix!==s.suffix){if(n.suffix.endsWith(s.suffix))return-1;if(s.suffix.endsWith(n.suffix))return 1}return n.prefix&&!s.prefix?-1:!n.prefix&&s.prefix?1:n.suffix&&!s.suffix?-1:!n.suffix&&s.suffix?1:n.caseSensitive&&!s.caseSensitive?-1:!n.caseSensitive&&s.caseSensitive?1:0}function Pa(n){var s,i,r;if(n.pathless)for(const u of n.pathless)Pa(u);if(n.static)for(const u of n.static.values())Pa(u);if(n.staticInsensitive)for(const u of n.staticInsensitive.values())Pa(u);if((s=n.dynamic)!=null&&s.length){n.dynamic.sort(ld);for(const u of n.dynamic)Pa(u)}if((i=n.optional)!=null&&i.length){n.optional.sort(ld);for(const u of n.optional)Pa(u)}if((r=n.wildcard)!=null&&r.length){n.wildcard.sort(ld);for(const u of n.wildcard)Pa(u)}}function Ls(n){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:n,parent:null,parse:null,priority:0}}function id(n,s,i,r,u){return{kind:n,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:s,parent:null,parse:null,priority:0,caseSensitive:i,prefix:r,suffix:u}}function TS(n,s){const i=Ls("/"),r=new Uint16Array(6);for(const u of n)ku(!1,r,u,1,i,0);Pa(i),s.masksTree=i,s.flatCache=Tr(1e3)}function wS(n,s){n||(n="/");const i=s.flatCache.get(n);if(i)return i;const r=rh(n,s.masksTree);return s.flatCache.set(n,r),r}function ES(n,s,i,r,u){n||(n="/"),r||(r="/");const f=s?`case\0${n}`:n;let d=u.singleCache.get(f);return d||(d=Ls("/"),ku(s,new Uint16Array(6),{from:n},1,d,0),u.singleCache.set(f,d)),rh(r,d,i)}function CS(n,s,i=!1){const r=i?n:`nofuzz\0${n}`,u=s.matchCache.get(r);if(u!==void 0)return u;n||(n="/");let f;try{f=rh(n,s.segmentTree,i)}catch(d){if(d instanceof URIError)f=null;else throw d}return f&&(f.branch=n0(f.route)),s.matchCache.set(r,f),f}function NS(n){return n==="/"?n:n.replace(/\/{1,}$/,"")}function MS(n,s=!1,i){const r=Ls(n.fullPath),u=new Uint16Array(6),f={},d={};let y=0;return ku(s,u,n,1,r,0,g=>{if(i==null||i(g,y),g.id in f&&ma(),f[g.id]=g,y!==0&&g.path){const m=NS(g.fullPath);(!d[m]||g.fullPath.endsWith("/"))&&(d[m]=g)}y++}),Pa(r),{processedTree:{segmentTree:r,singleCache:Tr(1e3),matchCache:Tr(1e3),flatCache:null,masksTree:null},routesById:f,routesByPath:d}}function rh(n,s,i=!1){const r=n.split("/"),u=OS(n,r,s,i);if(!u)return null;const[f]=t0(n,r,u);return{route:u.node.route,rawParams:f}}function t0(n,s,i){var b,v,S,j,_,w,R,U,k,H;const r=AS(i.node);let u=null;const f=Object.create(null);let d=((b=i.extract)==null?void 0:b.part)??0,y=((v=i.extract)==null?void 0:v.node)??0,g=((S=i.extract)==null?void 0:S.path)??0,m=((j=i.extract)==null?void 0:j.segment)??0;for(;y<r.length;d++,y++,g++,m++){const M=r[y];if(M.kind===ss)break;if(M.kind===Wv){m--,d--,g--;continue}const Q=s[d],D=g;if(Q&&(g+=Q.length),M.kind===1){u??(u=i.node.fullPath.split("/"));const O=u[m],A=((_=M.prefix)==null?void 0:_.length)??0;if(O.charCodeAt(A)===123){const V=((w=M.suffix)==null?void 0:w.length)??0,$=O.substring(A+2,O.length-V-1),W=Q.substring(A,Q.length-V);f[$]=decodeURIComponent(W)}else{const V=O.substring(1);f[V]=decodeURIComponent(Q)}}else if(M.kind===3){if(i.skipped&1<<y){d--,g=D-1;continue}u??(u=i.node.fullPath.split("/"));const O=u[m],A=((R=M.prefix)==null?void 0:R.length)??0,V=((U=M.suffix)==null?void 0:U.length)??0,$=O.substring(A+3,O.length-V-1),W=M.suffix||M.prefix?Q.substring(A,Q.length-V):Q;W&&(f[$]=decodeURIComponent(W))}else if(M.kind===2){const O=M,A=n.substring(D+(((k=O.prefix)==null?void 0:k.length)??0),n.length-(((H=O.suffix)==null?void 0:H.length)??0)),V=decodeURIComponent(A);f["*"]=V,f._splat=V;break}}return i.rawParams&&Object.assign(f,i.rawParams),[f,{part:d,node:y,path:g,segment:m}]}function n0(n){const s=[n];for(;n.parentRoute;)n=n.parentRoute,s.push(n);return s.reverse(),s}function AS(n){const s=Array(n.depth+1);do s[n.depth]=n,n=n.parent;while(n);return s}function OS(n,s,i,r){if(n==="/"&&i.index)return{node:i.index,skipped:0};const u=!Rr(s),f=u&&n!=="/",d=s.length-(u?1:0),y=[{node:i,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let g=null,m=null;for(;y.length;){const b=y.pop(),{node:v,index:S,skipped:j,depth:_,statics:w,dynamics:R,optionals:U}=b;let{extract:k,rawParams:H}=b;if(v.kind===2&&v.route&&!ou(m,b))continue;if(v.parse){if(!Dg(n,s,b))continue;H=b.rawParams,k=b.extract}r&&v.route&&v.kind!==ss&&ou(g,b)&&(g=b);const M=S===d;if(M&&(v.route&&(!f||v.kind===ss||v.kind===2)&&ou(m,b)&&(m=b),!v.optional&&!v.wildcard&&!v.index&&!v.pathless))continue;const Q=M?void 0:s[S];let D;if(M&&v.index){const O={node:v.index,index:S,skipped:j,depth:_+1,statics:w,dynamics:R,optionals:U,extract:k,rawParams:H};let A=!0;if(v.index.parse&&(Dg(n,s,O)||(A=!1)),A){if(!R&&!U&&!j&&zS(w,d))return O;ou(m,O)&&(m=O)}}if(v.wildcard)for(let O=v.wildcard.length-1;O>=0;O--){const A=v.wildcard[O],{prefix:V,suffix:$}=A;if(!(V&&(M||!(A.caseSensitive?Q:D??(D=Q.toLowerCase())).startsWith(V)))){if($){if(M)continue;const W=s.slice(S).join("/").slice(-$.length);if((A.caseSensitive?W:W.toLowerCase())!==$)continue}y.push({node:A,index:d,skipped:j,depth:_+1,statics:w,dynamics:R,optionals:U,extract:k,rawParams:H})}}if(v.optional){const O=j|1<<_,A=_+1;for(let V=v.optional.length-1;V>=0;V--){const $=v.optional[V];y.push({node:$,index:S,skipped:O,depth:A,statics:w,dynamics:R,optionals:U,extract:k,rawParams:H})}if(!M)for(let V=v.optional.length-1;V>=0;V--){const $=v.optional[V],{prefix:W,suffix:Z}=$;if(W||Z){const te=$.caseSensitive?Q:D??(D=Q.toLowerCase());if(W&&!te.startsWith(W)||Z&&!te.endsWith(Z))continue}y.push({node:$,index:S+1,skipped:j,depth:A,statics:w,dynamics:R,optionals:U+ru(d,S),extract:k,rawParams:H})}}if(!M&&v.dynamic&&Q)for(let O=v.dynamic.length-1;O>=0;O--){const A=v.dynamic[O],{prefix:V,suffix:$}=A;if(V||$){const W=A.caseSensitive?Q:D??(D=Q.toLowerCase());if(V&&!W.startsWith(V)||$&&!W.endsWith($))continue}y.push({node:A,index:S+1,skipped:j,depth:_+1,statics:w,dynamics:R+ru(d,S),optionals:U,extract:k,rawParams:H})}if(!M&&v.staticInsensitive){const O=v.staticInsensitive.get(D??(D=Q.toLowerCase()));O&&y.push({node:O,index:S+1,skipped:j,depth:_+1,statics:w+ru(d,S),dynamics:R,optionals:U,extract:k,rawParams:H})}if(!M&&v.static){const O=v.static.get(Q);O&&y.push({node:O,index:S+1,skipped:j,depth:_+1,statics:w+ru(d,S),dynamics:R,optionals:U,extract:k,rawParams:H})}if(v.pathless){const O=_+1;for(let A=v.pathless.length-1;A>=0;A--){const V=v.pathless[A];y.push({node:V,index:S,skipped:j,depth:O,statics:w,dynamics:R,optionals:U,extract:k,rawParams:H})}}}if(m)return m;if(r&&g){let b=g.index;for(let S=0;S<g.index;S++)b+=s[S].length;const v=b===n.length?"/":n.slice(b);return g.rawParams??(g.rawParams=Object.create(null)),g.rawParams["**"]=decodeURIComponent(v),g}return null}function ru(n,s){return 2**(n-s-1)}function zS(n,s){return n===2**(s-1)-1}function Dg(n,s,i){let r,u;try{[r,u]=t0(n,s,i)}catch{return null}if(i.rawParams=r,i.extract=u,!i.node.parse)return!0;try{if(i.node.parse(r)===!1)return null}catch{}return!0}function ou(n,s){return n?s.statics>n.statics||s.statics===n.statics&&(s.dynamics>n.dynamics||s.dynamics===n.dynamics&&(s.optionals>n.optionals||s.optionals===n.optionals&&((s.node.kind===ss)>(n.node.kind===ss)||s.node.kind===ss==(n.node.kind===ss)&&s.depth>n.depth))):!0}function vu(n){return oh(n.filter(s=>s!==void 0).join("/"))}function oh(n){return n.replace(/\/{2,}/g,"/")}function a0(n){return n==="/"?n:n.replace(/^\/{1,}/,"")}function ha(n){const s=n.length;return s>1&&n[s-1]==="/"?n.replace(/\/{1,}$/,""):n}function s0(n){return ha(a0(n))}function Mu(n,s){return n!=null&&n.endsWith("/")&&n!=="/"&&n!==`${s}/`?n.slice(0,-1):n}function DS(n,s,i){return Mu(n,i)===Mu(s,i)}function US({base:n,to:s,trailingSlash:i="never",cache:r}){const u=s.startsWith("/"),f=!u&&s===".";let d;if(r){d=u?s:f?n:n+"\0"+s;const m=r.get(d);if(m)return m}let y;if(f)y=n.split("/");else if(u)y=s.split("/");else{for(y=n.split("/");y.length>1&&Rr(y)==="";)y.pop();const m=s.split("/");for(let b=0,v=m.length;b<v;b++){const S=m[b];S===""?b?b===v-1&&y.push(S):y=[S]:S===".."?y.pop():S==="."||y.push(S)}}y.length>1&&(Rr(y)===""?i==="never"&&y.pop():i==="always"&&y.push(""));const g=oh(y.join("/"))||"/";return d&&r&&r.set(d,g),g}function LS(n){const s=new Map(n.map(u=>[encodeURIComponent(u),u])),i=Array.from(s.keys()).map(u=>u.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(i,"g");return u=>u.replace(r,f=>s.get(f)??f)}function rd(n,s,i){const r=s[n];return typeof r!="string"?r:n==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split("/").map(u=>Lg(u,i)).join("/"):Lg(r,i)}function Ug({path:n,params:s,decoder:i,...r}){let u=!1;const f=Object.create(null);if(!n||n==="/")return{interpolatedPath:"/",usedParams:f,isMissingParams:u};if(!n.includes("$"))return{interpolatedPath:n,usedParams:f,isMissingParams:u};const d=n.length;let y=0,g,m="";for(;y<d;){const b=y;g=e0(n,b,g);const v=g[5];if(y=v+1,b===v)continue;const S=g[0];if(S===0){m+="/"+n.substring(b,v);continue}if(S===2){const j=s._splat;f._splat=j,f["*"]=j;const _=n.substring(b,g[1]),w=n.substring(g[4],v);if(!j){u=!0,(_||w)&&(m+="/"+_+w);continue}const R=rd("_splat",s,i);m+="/"+_+R+w;continue}if(S===1){const j=n.substring(g[2],g[3]);!u&&!(j in s)&&(u=!0),f[j]=s[j];const _=n.substring(b,g[1]),w=n.substring(g[4],v),R=rd(j,s,i)??"undefined";m+="/"+_+R+w;continue}if(S===3){const j=n.substring(g[2],g[3]),_=s[j];if(_==null)continue;f[j]=_;const w=n.substring(b,g[1]),R=n.substring(g[4],v),U=rd(j,s,i)??"";m+="/"+w+U+R;continue}}return n.endsWith("/")&&(m+="/"),{usedParams:f,interpolatedPath:m||"/",isMissingParams:u}}function Lg(n,s){const i=encodeURIComponent(n);return(s==null?void 0:s(i))??i}function Tt(n){return(n==null?void 0:n.isNotFound)===!0}function kS(n,s=String){const i=new URLSearchParams;for(const r in n){const u=n[r];u!==void 0&&i.set(r,s(u))}return i.toString()}function od(n){return n?n==="false"?!1:n==="true"?!0:+n*0===0&&+n+""===n?+n:n:""}function BS(n){const s=new URLSearchParams(n),i=Object.create(null);for(const[r,u]of s.entries()){const f=i[r];f==null?i[r]=od(u):Array.isArray(f)?f.push(od(u)):i[r]=[f,od(u)]}return i}const qS=GS(JSON.parse),HS=QS(JSON.stringify,JSON.parse);function GS(n){return s=>{s[0]==="?"&&(s=s.substring(1));const i=BS(s);for(const r in i){const u=i[r];if(typeof u=="string")try{i[r]=n(u)}catch{}}return i}}function QS(n,s){const i=typeof s=="function";function r(u){if(typeof u=="object"&&u!==null)try{return n(u)}catch{}else if(i&&typeof u=="string")try{return s(u),n(u)}catch{}return u}return u=>{const f=kS(u,r);return f?`?${f}`:""}}const Ps="__root__";function YS(n){if(n.statusCode=n.statusCode||n.code||307,!n._builtLocation&&!n.reloadDocument&&typeof n.href=="string")try{new URL(n.href),n.reloadDocument=!0}catch{}const s=new Headers(n.headers);n.href&&s.get("Location")===null&&s.set("Location",n.href);const i=new Response(null,{status:n.statusCode,headers:s});if(i.options=n,n.throw)throw i;return i}function Gt(n){return n instanceof Response&&!!n.options}const Yd=n=>{var s;if(!n.rendered)return n.rendered=!0,(s=n.onReady)==null?void 0:s.call(n)},VS=n=>n.stores.matchesId.get().some(s=>{var i;return(i=n.stores.matchStores.get(s))==null?void 0:i.get()._forcePending}),Bu=(n,s)=>!!(n.preload&&!n.router.stores.matchStores.has(s)),Zs=(n,s,i=!0)=>{const r={...n.router.options.context??{}},u=i?s:s-1;for(let f=0;f<=u;f++){const d=n.matches[f];if(!d)continue;const y=n.router.getMatch(d.id);y&&Object.assign(r,y.__routeContext,y.__beforeLoadContext)}return r},kg=(n,s)=>{if(!n.matches.length)return;const i=s.routeId,r=n.matches.findIndex(d=>d.routeId===n.router.routeTree.id),u=r>=0?r:0;let f=i?n.matches.findIndex(d=>d.routeId===i):n.firstBadMatchIndex??n.matches.length-1;f<0&&(f=u);for(let d=f;d>=0;d--){const y=n.matches[d];if(n.router.looseRoutesById[y.routeId].options.notFoundComponent)return d}return i?f:u},ls=(n,s,i)=>{var r,u,f;if(!(!Gt(i)&&!Tt(i)))throw Gt(i)&&i.redirectHandled&&!i.options.reloadDocument||(s&&((r=s._nonReactive.beforeLoadPromise)==null||r.resolve(),(u=s._nonReactive.loaderPromise)==null||u.resolve(),s._nonReactive.beforeLoadPromise=void 0,s._nonReactive.loaderPromise=void 0,s._nonReactive.error=i,n.updateMatch(s.id,d=>({...d,status:Gt(i)?"redirected":Tt(i)?"notFound":d.status==="pending"?"success":d.status,context:Zs(n,s.index),isFetching:!1,error:i})),Tt(i)&&!i.routeId&&(i.routeId=s.routeId),(f=s._nonReactive.loadPromise)==null||f.resolve()),Gt(i)&&(n.rendered=!0,i.options._fromLocation=n.location,i.redirectHandled=!0,i=n.router.resolveRedirect(i))),i},l0=(n,s)=>{const i=n.router.getMatch(s);return!!(!i||i._nonReactive.dehydrated)},Bg=(n,s,i)=>{const r=Zs(n,i);n.updateMatch(s,u=>({...u,context:r}))},fr=(n,s,i)=>{var d,y;const{id:r,routeId:u}=n.matches[s],f=n.router.looseRoutesById[u];if(i instanceof Promise)throw i;n.firstBadMatchIndex??(n.firstBadMatchIndex=s),ls(n,n.router.getMatch(r),i);try{(y=(d=f.options).onError)==null||y.call(d,i)}catch(g){i=g,ls(n,n.router.getMatch(r),i)}n.updateMatch(r,g=>{var m,b;return(m=g._nonReactive.beforeLoadPromise)==null||m.resolve(),g._nonReactive.beforeLoadPromise=void 0,(b=g._nonReactive.loadPromise)==null||b.resolve(),{...g,error:i,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}}),!n.preload&&!Gt(i)&&!Tt(i)&&(n.serialError??(n.serialError=i))},i0=(n,s,i,r)=>{var f;if(r._nonReactive.pendingTimeout!==void 0)return;const u=i.options.pendingMs??n.router.options.defaultPendingMs;if(n.onReady&&!Bu(n,s)&&(i.options.loader||i.options.beforeLoad||o0(i))&&typeof u=="number"&&u!==1/0&&(i.options.pendingComponent??((f=n.router.options)==null?void 0:f.defaultPendingComponent))){const d=setTimeout(()=>{Yd(n)},u);r._nonReactive.pendingTimeout=d}},KS=(n,s,i)=>{const r=n.router.getMatch(s);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;i0(n,s,i,r);const u=()=>{const f=n.router.getMatch(s);f.preload&&(f.status==="redirected"||f.status==="notFound")&&ls(n,f,f.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(u):u()},XS=(n,s,i,r)=>{const u=n.router.getMatch(s);let f=u._nonReactive.loadPromise;u._nonReactive.loadPromise=ri(()=>{f==null||f.resolve(),f=void 0});const{paramsError:d,searchError:y}=u;d&&fr(n,i,d),y&&fr(n,i,y),i0(n,s,r,u);const g=new AbortController;let m=!1;const b=()=>{m||(m=!0,n.updateMatch(s,M=>({...M,isFetching:"beforeLoad",fetchCount:M.fetchCount+1,abortController:g})))},v=()=>{var M;(M=u._nonReactive.beforeLoadPromise)==null||M.resolve(),u._nonReactive.beforeLoadPromise=void 0,n.updateMatch(s,Q=>({...Q,isFetching:!1}))};if(!r.options.beforeLoad){n.router.batch(()=>{b(),v()});return}u._nonReactive.beforeLoadPromise=ri();const S={...Zs(n,i,!1),...u.__routeContext},{search:j,params:_,cause:w}=u,R=Bu(n,s),U={search:j,abortController:g,params:_,preload:R,context:S,location:n.location,navigate:M=>n.router.navigate({...M,_fromLocation:n.location}),buildLocation:n.router.buildLocation,cause:R?"preload":w,matches:n.matches,routeId:r.id,...n.router.options.additionalContext},k=M=>{if(M===void 0){n.router.batch(()=>{b(),v()});return}(Gt(M)||Tt(M))&&(b(),fr(n,i,M)),n.router.batch(()=>{b(),n.updateMatch(s,Q=>({...Q,__beforeLoadContext:M})),v()})};let H;try{if(H=r.options.beforeLoad(U),_r(H))return b(),H.catch(M=>{fr(n,i,M)}).then(k)}catch(M){b(),fr(n,i,M)}k(H)},PS=(n,s)=>{const{id:i,routeId:r}=n.matches[s],u=n.router.looseRoutesById[r],f=()=>y(),d=()=>XS(n,i,s,u),y=()=>{if(l0(n,i))return;const g=KS(n,i,u);return _r(g)?g.then(d):d()};return f()},ZS=(n,s,i)=>{var f,d,y,g,m,b;const r=n.router.getMatch(s);if(!r||!i.options.head&&!i.options.scripts&&!i.options.headers)return;const u={ssr:n.router.options.ssr,matches:n.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([(d=(f=i.options).head)==null?void 0:d.call(f,u),(g=(y=i.options).scripts)==null?void 0:g.call(y,u),(b=(m=i.options).headers)==null?void 0:b.call(m,u)]).then(([v,S,j])=>({meta:v==null?void 0:v.meta,links:v==null?void 0:v.links,headScripts:v==null?void 0:v.scripts,headers:j,scripts:S,styles:v==null?void 0:v.styles}))},r0=(n,s,i,r,u)=>{const f=s[r-1],{params:d,loaderDeps:y,abortController:g,cause:m}=n.router.getMatch(i),b=Zs(n,r),v=Bu(n,i);return{params:d,deps:y,preload:!!v,parentMatchPromise:f,abortController:g,context:b,location:n.location,navigate:S=>n.router.navigate({...S,_fromLocation:n.location}),cause:v?"preload":m,route:u,...n.router.options.additionalContext}},qg=async(n,s,i,r,u)=>{var f,d,y,g,m;try{const b=n.router.getMatch(i);try{(!(Fv??n.router.isServer)||b.ssr===!0)&&wr(u);const v=u.options.loader,S=typeof v=="function"?v:v==null?void 0:v.handler,j=S==null?void 0:S(r0(n,s,i,r,u)),_=!!S&&_r(j);if((_||u._lazyPromise||u._componentsPromise||u.options.head||u.options.scripts||u.options.headers||b._nonReactive.minPendingPromise)&&n.updateMatch(i,R=>({...R,isFetching:"loader"})),S){const R=_?await j:j;ls(n,n.router.getMatch(i),R),R!==void 0&&n.updateMatch(i,U=>({...U,loaderData:R}))}u._lazyPromise&&await u._lazyPromise;const w=b._nonReactive.minPendingPromise;w&&await w,u._componentsPromise&&await u._componentsPromise,n.updateMatch(i,R=>({...R,error:void 0,context:Zs(n,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(v){let S=v;if((S==null?void 0:S.name)==="AbortError"){if(b.abortController.signal.aborted){(f=b._nonReactive.loaderPromise)==null||f.resolve(),b._nonReactive.loaderPromise=void 0;return}n.updateMatch(i,_=>({..._,status:_.status==="pending"?"success":_.status,isFetching:!1,context:Zs(n,r)}));return}const j=b._nonReactive.minPendingPromise;j&&await j,Tt(v)&&await((y=(d=u.options.notFoundComponent)==null?void 0:d.preload)==null?void 0:y.call(d)),ls(n,n.router.getMatch(i),v);try{(m=(g=u.options).onError)==null||m.call(g,v)}catch(_){S=_,ls(n,n.router.getMatch(i),_)}!Gt(S)&&!Tt(S)&&await wr(u,["errorComponent"]),n.updateMatch(i,_=>({..._,error:S,context:Zs(n,r),status:"error",isFetching:!1}))}}catch(b){const v=n.router.getMatch(i);v&&(v._nonReactive.loaderPromise=void 0),ls(n,v,b)}},JS=async(n,s,i)=>{var j,_,w,R;async function r(U,k,H,M,Q){const D=Date.now()-k.updatedAt,O=U?Q.options.preloadStaleTime??n.router.options.defaultPreloadStaleTime??3e4:Q.options.staleTime??n.router.options.defaultStaleTime??0,A=Q.options.shouldReload,V=typeof A=="function"?A(r0(n,s,u,i,Q)):A,{status:$,invalid:W}=M,Z=D>=O&&(!!n.forceStaleReload||M.cause==="enter"||H!==void 0&&H!==M.id);d=$==="success"&&(W||(V??Z)),U&&Q.options.preload===!1||(d&&!n.sync&&b?(y=!0,(async()=>{var te,ee;try{await qg(n,s,u,i,Q);const he=n.router.getMatch(u);(te=he._nonReactive.loaderPromise)==null||te.resolve(),(ee=he._nonReactive.loadPromise)==null||ee.resolve(),he._nonReactive.loaderPromise=void 0,he._nonReactive.loadPromise=void 0}catch(he){Gt(he)&&await n.router.navigate(he.options)}})()):$!=="success"||d?await qg(n,s,u,i,Q):Bg(n,u,i))}const{id:u,routeId:f}=n.matches[i];let d=!1,y=!1;const g=n.router.looseRoutesById[f],m=g.options.loader,b=((typeof m=="function"||m==null?void 0:m.staleReloadMode)??n.router.options.defaultStaleReloadMode)!=="blocking";if(l0(n,u)){if(!n.router.getMatch(u))return n.matches[i];Bg(n,u,i)}else{const U=n.router.getMatch(u),k=n.router.stores.matchesId.get()[i],H=((j=k&&n.router.stores.matchStores.get(k)||null)==null?void 0:j.routeId)===f?k:(_=n.router.stores.matches.get().find(Q=>Q.routeId===f))==null?void 0:_.id,M=Bu(n,u);if(U._nonReactive.loaderPromise){if(U.status==="success"&&!n.sync&&!U.preload&&b)return U;await U._nonReactive.loaderPromise;const Q=n.router.getMatch(u),D=Q._nonReactive.error||Q.error;D&&ls(n,Q,D),Q.status==="pending"&&await r(M,U,H,Q,g)}else{const Q=M&&!n.router.stores.matchStores.has(u),D=n.router.getMatch(u);D._nonReactive.loaderPromise=ri(),Q!==D.preload&&n.updateMatch(u,O=>({...O,preload:Q})),await r(M,U,H,D,g)}}const v=n.router.getMatch(u);y||((w=v._nonReactive.loaderPromise)==null||w.resolve(),(R=v._nonReactive.loadPromise)==null||R.resolve(),v._nonReactive.loadPromise=void 0),clearTimeout(v._nonReactive.pendingTimeout),v._nonReactive.pendingTimeout=void 0,y||(v._nonReactive.loaderPromise=void 0),v._nonReactive.dehydrated=void 0;const S=y?v.isFetching:!1;return S!==v.isFetching||v.invalid!==!1?(n.updateMatch(u,U=>({...U,isFetching:S,invalid:!1})),n.router.getMatch(u)):v};async function Hg(n){var S,j;const s=n,i=[];VS(s.router)&&Yd(s);let r;for(let _=0;_<s.matches.length;_++){try{const w=PS(s,_);_r(w)&&await w}catch(w){if(Gt(w))throw w;if(Tt(w))r=w;else if(!s.preload)throw w;break}if(s.serialError||s.firstBadMatchIndex!=null)break}const u=s.firstBadMatchIndex??s.matches.length,f=r&&!s.preload?kg(s,r):void 0,d=r&&s.preload?0:f!==void 0?Math.min(f+1,u):u;let y,g;for(let _=0;_<d;_++)i.push(JS(s,i,_));try{await Promise.all(i)}catch{const _=await Promise.allSettled(i);for(const w of _){if(w.status!=="rejected")continue;const R=w.reason;if(Gt(R))throw R;Tt(R)?y??(y=R):g??(g=R)}if(g!==void 0)throw g}const m=y??(r&&!s.preload?r:void 0);let b=s.firstBadMatchIndex!==void 0?s.firstBadMatchIndex:s.matches.length-1;if(!m&&r&&s.preload)return s.matches;if(m){const _=kg(s,m);_===void 0&&ma();const w=s.matches[_],R=s.router.looseRoutesById[w.routeId],U=(S=s.router.options)==null?void 0:S.defaultNotFoundComponent;!R.options.notFoundComponent&&U&&(R.options.notFoundComponent=U),m.routeId=w.routeId;const k=w.routeId===s.router.routeTree.id;s.updateMatch(w.id,H=>({...H,...k?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:m},isFetching:!1})),b=_,await wr(R,["notFoundComponent"])}else if(!s.preload){const _=s.matches[0];_.globalNotFound||(j=s.router.getMatch(_.id))!=null&&j.globalNotFound&&s.updateMatch(_.id,w=>({...w,globalNotFound:!1,error:void 0}))}if(s.serialError&&s.firstBadMatchIndex!==void 0){const _=s.router.looseRoutesById[s.matches[s.firstBadMatchIndex].routeId];await wr(_,["errorComponent"])}for(let _=0;_<=b;_++){const{id:w,routeId:R}=s.matches[_],U=s.router.looseRoutesById[R];try{const k=ZS(s,w,U);if(k){const H=await k;s.updateMatch(w,M=>({...M,...H}))}}catch(k){console.error(`Error executing head for route ${R}:`,k)}}const v=Yd(s);if(_r(v)&&await v,m)throw m;if(s.serialError&&!s.preload&&!s.onReady)throw s.serialError;return s.matches}function Gg(n,s){const i=s.map(r=>{var u,f;return(f=(u=n.options[r])==null?void 0:u.preload)==null?void 0:f.call(u)}).filter(Boolean);if(i.length!==0)return Promise.all(i)}function wr(n,s=bu){!n._lazyLoaded&&n._lazyPromise===void 0&&(n.lazyFn?n._lazyPromise=n.lazyFn().then(r=>{const{id:u,...f}=r.options;Object.assign(n.options,f),n._lazyLoaded=!0,n._lazyPromise=void 0}):n._lazyLoaded=!0);const i=()=>n._componentsLoaded?void 0:s===bu?(()=>{if(n._componentsPromise===void 0){const r=Gg(n,bu);r?n._componentsPromise=r.then(()=>{n._componentsLoaded=!0,n._componentsPromise=void 0}):n._componentsLoaded=!0}return n._componentsPromise})():Gg(n,s);return n._lazyPromise?n._lazyPromise.then(i):i()}function o0(n){var s;for(const i of bu)if((s=n.options[i])!=null&&s.preload)return!0;return!1}const bu=["component","errorComponent","pendingComponent","notFoundComponent"];function FS(n){return{input:({url:s})=>{for(const i of n)s=Vd(i,s);return s},output:({url:s})=>{for(let i=n.length-1;i>=0;i--)s=u0(n[i],s);return s}}}function IS(n){const s=s0(n.basepath),i=`/${s}`,r=n.caseSensitive?i:i.toLowerCase(),u=`${r}/`;return{input:({url:f})=>{const d=n.caseSensitive?f.pathname:f.pathname.toLowerCase();return d===r?f.pathname="/":d.startsWith(u)&&(f.pathname=f.pathname.slice(i.length)),f},output:({url:f})=>(f.pathname=vu(["/",s,f.pathname]),f)}}function Vd(n,s){var r;const i=(r=n==null?void 0:n.input)==null?void 0:r.call(n,{url:s});if(i){if(typeof i=="string")return new URL(i);if(i instanceof URL)return i}return s}function u0(n,s){var r;const i=(r=n==null?void 0:n.output)==null?void 0:r.call(n,{url:s});if(i){if(typeof i=="string")return new URL(i);if(i instanceof URL)return i}return s}function $S(n,s){const{createMutableStore:i,createReadonlyStore:r,batch:u,init:f}=s,d=new Map,y=new Map,g=new Map,m=i(n.status),b=i(n.loadedAt),v=i(n.isLoading),S=i(n.isTransitioning),j=i(n.location),_=i(n.resolvedLocation),w=i(n.statusCode),R=i(n.redirect),U=i([]),k=i([]),H=i([]),M=r(()=>ud(d,U.get())),Q=r(()=>ud(y,k.get())),D=r(()=>ud(g,H.get())),O=r(()=>U.get()[0]),A=r(()=>U.get().some(X=>{var ce;return((ce=d.get(X))==null?void 0:ce.get().status)==="pending"})),V=r(()=>{var X;return{locationHref:j.get().href,resolvedLocationHref:(X=_.get())==null?void 0:X.href,status:m.get()}}),$=r(()=>({status:m.get(),loadedAt:b.get(),isLoading:v.get(),isTransitioning:S.get(),matches:M.get(),location:j.get(),resolvedLocation:_.get(),statusCode:w.get(),redirect:R.get()})),W=Tr(64);function Z(X){let ce=W.get(X);return ce||(ce=r(()=>{const Ce=U.get();for(const ne of Ce){const C=d.get(ne);if(C&&C.routeId===X)return C.get()}}),W.set(X,ce)),ce}const te={status:m,loadedAt:b,isLoading:v,isTransitioning:S,location:j,resolvedLocation:_,statusCode:w,redirect:R,matchesId:U,pendingIds:k,cachedIds:H,matches:M,pendingMatches:Q,cachedMatches:D,firstId:O,hasPending:A,matchRouteDeps:V,matchStores:d,pendingMatchStores:y,cachedMatchStores:g,__store:$,getRouteMatchStore:Z,setMatches:ee,setPending:he,setCached:L};ee(n.matches),f==null||f(te);function ee(X){cd(X,d,U,i,u)}function he(X){cd(X,y,k,i,u)}function L(X){cd(X,g,H,i,u)}return te}function ud(n,s){const i=[];for(const r of s){const u=n.get(r);u&&i.push(u.get())}return i}function cd(n,s,i,r,u){const f=n.map(y=>y.id),d=new Set(f);u(()=>{for(const y of s.keys())d.has(y)||s.delete(y);for(const y of n){const g=s.get(y.id);if(!g){const m=r(y);m.routeId=y.routeId,s.set(y.id,m);continue}g.routeId=y.routeId,g.get()!==y&&g.set(y)}RS(i.get(),f)||i.set(f)})}var rs="__TSR_index",Qg="popstate",Yg="beforeunload";function WS(n){let s=n.getLocation();const i=new Set,r=d=>{s=n.getLocation(),i.forEach(y=>y({location:s,action:d}))},u=d=>{n.notifyOnIndexChange??!0?r(d):s=n.getLocation()},f=async({task:d,navigateOpts:y,...g})=>{var v,S;if((y==null?void 0:y.ignoreBlocker)??!1){d();return}const m=((v=n.getBlockers)==null?void 0:v.call(n))??[],b=g.type==="PUSH"||g.type==="REPLACE";if(typeof document<"u"&&m.length&&b)for(const j of m){const _=Au(g.path,g.state);if(await j.blockerFn({currentLocation:s,nextLocation:_,action:g.type})){(S=n.onBlocked)==null||S.call(n);return}}d()};return{get location(){return s},get length(){return n.getLength()},subscribers:i,subscribe:d=>(i.add(d),()=>{i.delete(d)}),push:(d,y,g)=>{const m=s.state[rs];y=Vg(m+1,y),f({task:()=>{n.pushState(d,y),r({type:"PUSH"})},navigateOpts:g,type:"PUSH",path:d,state:y})},replace:(d,y,g)=>{const m=s.state[rs];y=Vg(m,y),f({task:()=>{n.replaceState(d,y),r({type:"REPLACE"})},navigateOpts:g,type:"REPLACE",path:d,state:y})},go:(d,y)=>{f({task:()=>{n.go(d),u({type:"GO",index:d})},navigateOpts:y,type:"GO"})},back:d=>{f({task:()=>{n.back((d==null?void 0:d.ignoreBlocker)??!1),u({type:"BACK"})},navigateOpts:d,type:"BACK"})},forward:d=>{f({task:()=>{n.forward((d==null?void 0:d.ignoreBlocker)??!1),u({type:"FORWARD"})},navigateOpts:d,type:"FORWARD"})},canGoBack:()=>s.state[rs]!==0,createHref:d=>n.createHref(d),block:d=>{var g;if(!n.setBlockers)return()=>{};const y=((g=n.getBlockers)==null?void 0:g.call(n))??[];return n.setBlockers([...y,d]),()=>{var b,v;const m=((b=n.getBlockers)==null?void 0:b.call(n))??[];(v=n.setBlockers)==null||v.call(n,m.filter(S=>S!==d))}},flush:()=>{var d;return(d=n.flush)==null?void 0:d.call(n)},destroy:()=>{var d;return(d=n.destroy)==null?void 0:d.call(n)},notify:r}}function Vg(n,s){s||(s={});const i=uh();return{...s,key:i,__TSR_key:i,[rs]:n}}function e2(n){var A,V;const s=typeof document<"u"?window:void 0,i=s.history.pushState,r=s.history.replaceState;let u=[];const f=()=>u,d=$=>u=$,y=($=>$),g=(()=>Au(`${s.location.pathname}${s.location.search}${s.location.hash}`,s.history.state));if(!((A=s.history.state)!=null&&A.__TSR_key)&&!((V=s.history.state)!=null&&V.key)){const $=uh();s.history.replaceState({[rs]:0,key:$,__TSR_key:$},"")}let m=g(),b,v=!1,S=!1,j=!1,_=!1;const w=()=>m;let R,U;const k=()=>{R&&(O._ignoreSubscribers=!0,(R.isPush?s.history.pushState:s.history.replaceState)(R.state,"",R.href),O._ignoreSubscribers=!1,R=void 0,U=void 0,b=void 0)},H=($,W,Z)=>{const te=y(W);U||(b=m),m=Au(W,Z),R={href:te,state:Z,isPush:(R==null?void 0:R.isPush)||$==="push"},U||(U=Promise.resolve().then(()=>k()))},M=$=>{m=g(),O.notify({type:$})},Q=async()=>{if(S){S=!1;return}const $=g(),W=$.state[rs]-m.state[rs],Z=W===1,te=W===-1,ee=!Z&&!te||v;v=!1;const he=ee?"GO":te?"BACK":"FORWARD",L=ee?{type:"GO",index:W}:{type:te?"BACK":"FORWARD"};if(j)j=!1;else{const X=f();if(typeof document<"u"&&X.length){for(const ce of X)if(await ce.blockerFn({currentLocation:m,nextLocation:$,action:he})){S=!0,s.history.go(1),O.notify(L);return}}}m=g(),O.notify(L)},D=$=>{if(_){_=!1;return}let W=!1;const Z=f();if(typeof document<"u"&&Z.length)for(const te of Z){const ee=te.enableBeforeUnload??!0;if(ee===!0){W=!0;break}if(typeof ee=="function"&&ee()===!0){W=!0;break}}if(W)return $.preventDefault(),$.returnValue=""},O=WS({getLocation:w,getLength:()=>s.history.length,pushState:($,W)=>H("push",$,W),replaceState:($,W)=>H("replace",$,W),back:$=>($&&(j=!0),_=!0,s.history.back()),forward:$=>{$&&(j=!0),_=!0,s.history.forward()},go:$=>{v=!0,s.history.go($)},createHref:$=>y($),flush:k,destroy:()=>{s.history.pushState=i,s.history.replaceState=r,s.removeEventListener(Yg,D,{capture:!0}),s.removeEventListener(Qg,Q)},onBlocked:()=>{b&&m!==b&&(m=b)},getBlockers:f,setBlockers:d,notifyOnIndexChange:!1});return s.addEventListener(Yg,D,{capture:!0}),s.addEventListener(Qg,Q),s.history.pushState=function(...$){const W=i.apply(s.history,$);return O._ignoreSubscribers||M("PUSH"),W},s.history.replaceState=function(...$){const W=r.apply(s.history,$);return O._ignoreSubscribers||M("REPLACE"),W},O}function t2(n){let s=n.replace(/[\x00-\x1f\x7f]/g,"");return s.startsWith("//")&&(s="/"+s.replace(/^\/+/,"")),s}function Au(n,s){const i=t2(n),r=i.indexOf("#"),u=i.indexOf("?"),f=uh();return{href:i,pathname:i.substring(0,r>0?u>0?Math.min(r,u):r:u>0?u:i.length),hash:r>-1?i.substring(r):"",search:u>-1?i.slice(u,r===-1?void 0:r):"",state:s||{[rs]:0,key:f,__TSR_key:f}}}function uh(){return(Math.random()+1).toString(36).substring(7)}function Xl(n,s){const i=s,r=n;return{fromLocation:i,toLocation:r,pathChanged:(i==null?void 0:i.pathname)!==r.pathname,hrefChanged:(i==null?void 0:i.href)!==r.href,hashChanged:(i==null?void 0:i.hash)!==r.hash}}const Kd=new WeakMap;var n2=class{constructor(n,s){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.routeBranchCache=new WeakMap,this.startTransition=i=>i(),this.update=i=>{var b;const r=this.options,u=this.basepath??(r==null?void 0:r.basepath)??"/",f=this.basepath===void 0,d=r==null?void 0:r.rewrite;if(this.options={...r,...i},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=LS(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=e2()),this.origin=this.options.origin,this.origin||(window!=null&&window.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let v;this.resolvePathCache=Tr(1e3),v=this.buildRouteTree(),this.setRoutes(v)}if(!this.stores&&this.latestLocation){const v=this.getStoreConfig(this);this.batch=v.batch,this.stores=$S(s2(this.latestLocation),v),y2(this)}let y=!1;const g=this.options.basepath??"/",m=this.options.rewrite;if(f||u!==g||d!==m){this.basepath=g;const v=[],S=s0(g);S&&S!=="/"&&v.push(IS({basepath:g})),m&&v.push(m),this.rewrite=v.length===0?void 0:v.length===1?v[0]:FS(v),this.history&&this.updateLatestLocation(),y=!0}y&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof((b=window.CSS)==null?void 0:b.supports)=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a))"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const i=MS(this.routeTree,this.options.caseSensitive,(r,u)=>{r.init({originalIndex:u})});return this.options.routeMasks&&TS(this.options.routeMasks,i.processedTree),i},this.subscribe=(i,r)=>{const u={eventType:i,fn:r};return this.subscribers.add(u),()=>{this.subscribers.delete(u)}},this.emit=i=>{this.subscribers.forEach(r=>{r.eventType===i.type&&r.fn(i)})},this.parseLocation=(i,r)=>{const u=({pathname:g,search:m,hash:b,href:v,state:S})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(g)){const U=this.options.parseSearch(m),k=this.options.stringifySearch(U);return{href:g+k+b,publicHref:g+k+b,pathname:cr(g).path,external:!1,searchStr:k,search:Ns(r==null?void 0:r.search,U),hash:cr(b.slice(1)).path,state:as(r==null?void 0:r.state,S)}}const j=new URL(v,this.origin),_=Vd(this.rewrite,j),w=this.options.parseSearch(_.search),R=this.options.stringifySearch(w);return _.search=R,{href:_.href.replace(_.origin,""),publicHref:v,pathname:cr(_.pathname).path,external:!!this.rewrite&&_.origin!==this.origin,searchStr:R,search:Ns(r==null?void 0:r.search,w),hash:cr(_.hash.slice(1)).path,state:as(r==null?void 0:r.state,S)}},f=u(i),{__tempLocation:d,__tempKey:y}=f.state;if(d&&(!y||y===this.tempLocationKey)){const g=u(d);return g.state.key=f.state.key,g.state.__TSR_key=f.state.__TSR_key,delete g.state.__tempLocation,{...g,maskedLocation:f}}return f},this.resolvePathWithBase=(i,r)=>US({base:i,to:r.includes("//")?oh(r):r,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(i,r,u)=>typeof i=="string"?this.matchRoutesInternal({pathname:i,search:r},u):this.matchRoutesInternal(i,r),this.getMatchedRoutes=i=>l2({pathname:i,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=i=>{const r=this.getMatch(i);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(i=>{this.cancelMatch(i)}),this.stores.matchesId.get().forEach(i=>{var u;if(this.stores.pendingMatchStores.has(i))return;const r=(u=this.stores.matchStores.get(i))==null?void 0:u.get();r&&(r.status==="pending"||r.isFetching==="loader")&&this.cancelMatch(i)})},this.buildLocation=i=>{const r=(f={})=>{var W,Z;const d=f._fromLocation||this.pendingBuiltLocation||this.latestLocation,y=this.matchRoutesLightweight(d);f.from;const g=f.unsafeRelative==="path"?d.pathname:f.from??y.fullPath,m=f.to?`${f.to}`:void 0,b=y.search,v=Object.assign(Object.create(null),y.params),S=(m==null?void 0:m.charCodeAt(0))===47?"/":this.resolvePathWithBase(g,"."),j=m?this.resolvePathWithBase(S,m):S,_=f.params===!1||f.params===null?Object.create(null):(f.params??!0)===!0?v:Object.assign(v,Us(f.params,v)),w=this.routesByPath[ha(j)];let R;if(w)R=this.getRouteBranch(w);else if(j.includes("$"))R=[];else{const te=this.getMatchedRoutes(j);R=te.matchedRoutes,this.options.notFoundRoute&&(!te.foundRoute||te.foundRoute.path!=="/"&&te.routeParams["**"])&&(R=[...R,this.options.notFoundRoute])}if(R.length&&$v(_))for(const te of R){const ee=((W=te.options.params)==null?void 0:W.stringify)??te.options.stringifyParams;if(ee)try{Object.assign(_,ee(_))}catch{}}const U=i.leaveParams?j:cr(Ug({path:j,params:_,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let k=b;if(i._includeValidateSearch&&((Z=this.options.search)!=null&&Z.strict)){const te={};R.forEach(ee=>{if(ee.options.validateSearch)try{Object.assign(te,xu(ee.options.validateSearch,{...te,...k}))}catch{}}),k=te}k=i2({search:k,dest:f,destRoutes:R,_includeValidateSearch:i._includeValidateSearch}),k=Ns(b,k);const H=this.options.stringifySearch(k),M=f.hash===!0?d.hash:f.hash?Us(f.hash,d.hash):void 0,Q=M?`#${M}`:"";let D=f.state===!0?d.state:f.state?Us(f.state,d.state):{};D=as(d.state,D);const O=`${U}${H}${Q}`;let A,V,$=!1;if(this.rewrite){const te=new URL(O,this.origin),ee=u0(this.rewrite,te);A=te.href.replace(te.origin,""),ee.origin!==this.origin?(V=ee.href,$=!0):V=ee.pathname+ee.search+ee.hash}else A=jS(O),V=A;return{publicHref:V,href:A,pathname:U,search:k,searchStr:H,state:D,hash:M??"",external:$,unmaskOnReload:f.unmaskOnReload}},u=(f={},d)=>{const y=r(f);let g=d?r(d):void 0;if(!g){const m=Object.create(null);if(this.options.routeMasks){const b=wS(y.pathname,this.processedTree);if(b){Object.assign(m,b.rawParams);const{from:v,params:S,...j}=b.route,_=S===!1||S===null?Object.create(null):(S??!0)===!0?m:Object.assign(m,Us(S,m));d={from:i.from,...j,params:_},g=r(d)}}}return g&&(y.maskedLocation=g),y};return i.mask?u(i,{from:i.from,...i.mask}):u(i)},this.commitLocation=async({viewTransition:i,ignoreBlocker:r,...u})=>{let f;const d=()=>{const m=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];m.forEach(v=>{u.state[v]=this.latestLocation.state[v]});const b=Xs(u.state,this.latestLocation.state);return m.forEach(v=>{delete u.state[v]}),b},y=ha(this.latestLocation.href)===ha(u.href);let g=this.commitLocationPromise;if(this.commitLocationPromise=ri(()=>{g==null||g.resolve(),g=void 0}),y&&d())this.load();else{let{maskedLocation:m,hashScrollIntoView:b,...v}=u;m&&(v={...m,state:{...m.state,__tempKey:void 0,__tempLocation:{...v,search:v.searchStr,state:{...v.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(v.unmaskOnReload??this.options.unmaskOnReload??!1)&&(v.state.__tempKey=this.tempLocationKey)),v.state.__hashScrollIntoViewOptions=b??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=i,f=u.replace?"REPLACE":"PUSH",this.history[f==="REPLACE"?"replace":"push"](v.publicHref,v.state,{ignoreBlocker:r})}return this.resetNextScroll=u.resetScroll??!0,this.history.subscribers.size||this.load(f?{action:{type:f}}:void 0),this.commitLocationPromise},this.buildAndCommitLocation=({replace:i,resetScroll:r,hashScrollIntoView:u,viewTransition:f,ignoreBlocker:d,href:y,...g}={})=>{if(y){const v=this.history.location.state.__TSR_index,S=Au(y,{__TSR_index:i?v:v+1}),j=new URL(S.pathname,this.origin);g.to=Vd(this.rewrite,j).pathname,g.search=this.options.parseSearch(S.search),g.hash=S.hash.slice(1)}const m=this.buildLocation({...g,_includeValidateSearch:!0});this.pendingBuiltLocation=m;const b=this.commitLocation({...m,viewTransition:f,replace:i,resetScroll:r,hashScrollIntoView:u,ignoreBlocker:d});return Promise.resolve().then(()=>{this.pendingBuiltLocation===m&&(this.pendingBuiltLocation=void 0)}),b},this.navigate=async({to:i,reloadDocument:r,href:u,publicHref:f,...d})=>{var g,m;let y=!1;if(u)try{new URL(`${u}`),y=!0}catch{}if(y&&!r&&(r=!0),r){if(i!==void 0||!u){const v=this.buildLocation({to:i,...d});u=u??v.publicHref,f=f??v.publicHref}const b=!y&&f?f:u;if(Nu(b,this.protocolAllowlist))return Promise.resolve();if(!d.ignoreBlocker){const v=((m=(g=this.history).getBlockers)==null?void 0:m.call(g))??[];for(const S of v)if(S!=null&&S.blockerFn&&await S.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return d.replace?window.location.replace(b):window.location.href=b,Promise.resolve()}return this.buildAndCommitLocation({...d,href:u,to:i,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const i=this.matchRoutes(this.latestLocation),r=this.stores.cachedMatches.get().filter(u=>!i.some(f=>f.id===u.id));this.batch(()=>{this.stores.status.set("pending"),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(i),this.stores.setCached(r)})},this.load=async i=>{var m;const r=(m=i==null?void 0:i.action)==null?void 0:m.type;let u,f,d;const y=this.stores.resolvedLocation.get()??this.stores.location.get();for(d=new Promise(b=>{this.startTransition(async()=>{var v;try{this.beforeLoad(),r?Kd.set(this.latestLocation,r):Kd.delete(this.latestLocation);const S=this.latestLocation,j=Xl(S,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...j}),this.emit({type:"onBeforeLoad",...j}),await Hg({router:this,sync:i==null?void 0:i.sync,forceStaleReload:y.href===S.href,matches:this.stores.pendingMatches.get(),location:S,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{var k,H;let _=null,w=null,R=null,U=null;this.batch(()=>{const M=this.stores.pendingMatches.get(),Q=M.length,D=this.stores.matches.get();_=Q?D.filter(V=>!this.stores.pendingMatchStores.has(V.id)):null;const O=new Set;for(const V of this.stores.pendingMatchStores.values())V.routeId&&O.add(V.routeId);const A=new Set;for(const V of this.stores.matchStores.values())V.routeId&&A.add(V.routeId);w=Q?D.filter(V=>!O.has(V.routeId)):null,R=Q?M.filter(V=>!A.has(V.routeId)):null,U=Q?M.filter(V=>A.has(V.routeId)):D,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),Q&&(this.stores.setMatches(M),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),..._.filter(V=>V.status!=="error"&&V.status!=="notFound"&&V.status!=="redirected")]),this.clearExpiredCache())});for(const[M,Q]of[[w,"onLeave"],[R,"onEnter"],[U,"onStay"]])if(M)for(const D of M)(H=(k=this.looseRoutesById[D.routeId].options)[Q])==null||H.call(k,D)})})}})}catch(S){Gt(S)?(u=S,this.navigate({...u.options,replace:!0,ignoreBlocker:!0})):Tt(S)&&(f=S);const j=u?u.status:f?404:this.stores.matches.get().some(_=>_.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(j),this.stores.redirect.set(u)})}this.latestLoadPromise===d&&((v=this.commitLocationPromise)==null||v.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),b()})}),this.latestLoadPromise=d,await d;this.latestLoadPromise&&d!==this.latestLoadPromise;)await this.latestLoadPromise;let g;this.hasNotFoundMatch()?g=404:this.stores.matches.get().some(b=>b.status==="error")&&(g=500),g!==void 0&&this.stores.statusCode.set(g)},this.startViewTransition=i=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let u;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const f=this.latestLocation,d=this.stores.resolvedLocation.get(),y=typeof r.types=="function"?r.types(Xl(f,d)):r.types;if(y===!1){i();return}u={update:i,types:y}}else u=i;document.startViewTransition(u)}else i()},this.updateMatch=(i,r)=>{this.startTransition(()=>{const u=this.stores.pendingMatchStores.get(i);if(u){u.set(r);return}const f=this.stores.matchStores.get(i);if(f){f.set(r);return}const d=this.stores.cachedMatchStores.get(i);if(d){const y=r(d.get());y.status==="redirected"?this.stores.cachedMatchStores.delete(i)&&this.stores.cachedIds.set(g=>g.filter(m=>m!==i)):d.set(y)}})},this.getMatch=i=>{var r,u,f;return((r=this.stores.cachedMatchStores.get(i))==null?void 0:r.get())??((u=this.stores.pendingMatchStores.get(i))==null?void 0:u.get())??((f=this.stores.matchStores.get(i))==null?void 0:f.get())},this.invalidate=i=>{const r=u=>{var f;return((f=i==null?void 0:i.filter)==null?void 0:f.call(i,u))??!0?{...u,invalid:!0,...i!=null&&i.forcePending||u.status==="error"||u.status==="notFound"?{status:"pending",error:void 0}:void 0}:u};return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(r)),this.stores.setCached(this.stores.cachedMatches.get().map(r)),this.stores.setPending(this.stores.pendingMatches.get().map(r))}),this.shouldViewTransition=!1,this.load({sync:i==null?void 0:i.sync})},this.getParsedLocationHref=i=>i.publicHref||"/",this.resolveRedirect=i=>{const r=i.headers.get("Location");if(!i.options.href||i.options._builtLocation){const u=i.options._builtLocation??this.buildLocation(i.options),f=this.getParsedLocationHref(u);i.options.href=f,i.headers.set("Location",f)}else if(r)try{const u=new URL(r);if(this.origin&&u.origin===this.origin){const f=u.pathname+u.search+u.hash;i.options.href=f,i.headers.set("Location",f)}}catch{}if(i.options.href&&!i.options._builtLocation&&Nu(i.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return i.headers.get("Location")||i.headers.set("Location",i.options.href),i},this.clearCache=i=>{const r=i==null?void 0:i.filter;r!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(u=>!r(u))):this.stores.setCached([])},this.clearExpiredCache=()=>{const i=Date.now(),r=u=>{const f=this.looseRoutesById[u.routeId];if(!f.options.loader)return!0;const d=(u.preload?f.options.preloadGcTime??this.options.defaultPreloadGcTime:f.options.gcTime??this.options.defaultGcTime)??300*1e3;return u.status==="error"?!0:i-u.updatedAt>=d};this.clearCache({filter:r})},this.loadRouteChunk=wr,this.preloadRoute=async i=>{const r=i._builtLocation??this.buildLocation(i);let u=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:i});const f=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),d=new Set([...f,...this.stores.cachedIds.get()]),y=u.filter(g=>!d.has(g.id));if(y.length){const g=this.stores.cachedMatches.get();this.stores.setCached([...g,...y])}try{return u=await Hg({router:this,matches:u,location:r,preload:!0,updateMatch:(g,m)=>{f.has(g)?u=u.map(b=>b.id===g?m(b):b):this.updateMatch(g,m)}}),u}catch(g){if(Gt(g))return g.options.reloadDocument?void 0:await this.preloadRoute({...g.options,_fromLocation:r});Tt(g)||console.error(g);return}},this.matchRoute=(i,r)=>{const u={...i,to:i.to?this.resolvePathWithBase(i.from||"",i.to):void 0,params:i.params||{},leaveParams:!0},f=this.buildLocation(u);if(r!=null&&r.pending&&this.stores.status.get()!=="pending")return!1;const d=((r==null?void 0:r.pending)===void 0?!this.stores.isLoading.get():r.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),y=ES(f.pathname,(r==null?void 0:r.caseSensitive)??!1,(r==null?void 0:r.fuzzy)??!1,d.pathname,this.processedTree);return!y||i.params&&!Xs(y.rawParams,i.params,{partial:!0})?!1:(r==null?void 0:r.includeSearch)??!0?Xs(d.search,f.search,{partial:!0})?y.rawParams:!1:y.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(i=>i.status==="notFound"||i.globalNotFound),this.getStoreConfig=s,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...n,caseSensitive:n.caseSensitive??!1,notFoundMode:n.notFoundMode??"fuzzy",stringifySearch:n.stringifySearch??HS,parseSearch:n.parseSearch??qS,protocolAllowlist:n.protocolAllowlist??SS}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:n,routesByPath:s,processedTree:i}){this.routesById=n,this.routesByPath=s,this.processedTree=i;const r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(n){let s=this.routeBranchCache.get(n);return s||(s=n0(n),this.routeBranchCache.set(n,s)),s}get looseRoutesById(){return this.routesById}getParentContext(n){return n!=null&&n.id?n.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(n,s){var b,v;const i=this.getMatchedRoutes(n.pathname),{foundRoute:r,routeParams:u}=i;let{matchedRoutes:f}=i,d=!1;(r?r.path!=="/"&&u["**"]:ha(n.pathname))&&(this.options.notFoundRoute?f=[...f,this.options.notFoundRoute]:d=!0);const y=d?o2(this.options.notFoundMode,f):void 0,g=new Array(f.length),m=new Map;for(const S of this.stores.matchStores.values())S.routeId&&m.set(S.routeId,S.get());for(let S=0;S<f.length;S++){const j=f[S],_=g[S-1];let w,R,U;{const ee=(_==null?void 0:_.search)??n.search,he=(_==null?void 0:_._strictSearch)??void 0;try{const L=xu(j.options.validateSearch,{...ee})??void 0;w={...ee,...L},R={...he,...L},U=void 0}catch(L){let X=L;if(L instanceof Ou||(X=new Ou(L.message,{cause:L})),s!=null&&s.throwOnError)throw X;w=ee,R={},U=X}}const k=((v=(b=j.options).loaderDeps)==null?void 0:v.call(b,{search:w}))??"",H=k?JSON.stringify(k):"",{interpolatedPath:M,usedParams:Q}=Ug({path:j.fullPath,params:u,decoder:this.pathParamsDecoder,server:this.isServer}),D=j.id+M+H,O=this.getMatch(D),A=m.get(j.id),V=(O==null?void 0:O._strictParams)??Q;let $;if(!O)try{Kg(j,V)}catch(ee){if(Tt(ee)||Gt(ee)?$=ee:$=new a2(ee.message,{cause:ee}),s!=null&&s.throwOnError)throw $}Object.assign(u,V);const W=A?"stay":"enter";let Z;if(O)Z={...O,cause:W,params:(A==null?void 0:A.params)??u,_strictParams:V,search:Ns(A?A.search:O.search,w),_strictSearch:R};else{const ee=j.options.loader||j.options.beforeLoad||j.lazyFn||o0(j)?"pending":"success";Z={id:D,ssr:j.options.ssr,index:S,routeId:j.id,params:(A==null?void 0:A.params)??u,_strictParams:V,pathname:M,updatedAt:Date.now(),search:A?Ns(A.search,w):w,_strictSearch:R,searchError:void 0,status:ee,isFetching:!1,error:void 0,paramsError:$,__routeContext:void 0,_nonReactive:{loadPromise:ri()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:W,loaderDeps:A?as(A.loaderDeps,k):k,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:j.options.staticData||{},fullPath:j.fullPath}}s!=null&&s.preload||(Z.globalNotFound=y===j.id),Z.searchError=U;const te=this.getParentContext(_);Z.context={...te,...Z.__routeContext,...Z.__beforeLoadContext},g[S]=Z}for(let S=0;S<g.length;S++){const j=g[S],_=this.looseRoutesById[j.routeId],w=this.getMatch(j.id),R=m.get(j.routeId);if(j.params=R?Ns(R.params,u):u,!w){const U=g[S-1],k=this.getParentContext(U);if(_.options.context){const H={deps:j.loaderDeps,params:j.params,context:k??{},location:n,navigate:M=>this.navigate({...M,_fromLocation:n}),buildLocation:this.buildLocation,cause:j.cause,abortController:j.abortController,preload:!!j.preload,matches:g,routeId:_.id};j.__routeContext=_.options.context(H)??void 0}j.context={...k,...j.__routeContext,...j.__beforeLoadContext}}}return g}matchRoutesLightweight(n){var m;const{matchedRoutes:s,routeParams:i}=this.getMatchedRoutes(n.pathname),r=Rr(s),u={...n.search};for(const b of s)try{Object.assign(u,xu(b.options.validateSearch,u))}catch{}const f=Rr(this.stores.matchesId.get()),d=f&&((m=this.stores.matchStores.get(f))==null?void 0:m.get()),y=d&&d.routeId===r.id&&d.pathname===n.pathname;let g;if(y)g=d.params;else{const b=Object.assign(Object.create(null),i);for(const v of s)try{Kg(v,b)}catch{}g=b}return{matchedRoutes:s,fullPath:r.fullPath,search:u,params:g}}},Ou=class extends Error{},a2=class extends Error{};function s2(n){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:n,matches:[],statusCode:200}}function xu(n,s){if(n==null)return{};if("~standard"in n){const i=n["~standard"].validate(s);if(i instanceof Promise)throw new Ou("Async validation not supported");if(i.issues)throw new Ou(JSON.stringify(i.issues,void 0,2),{cause:i});return i.value}return"parse"in n?n.parse(s):typeof n=="function"?n(s):{}}function l2({pathname:n,routesById:s,processedTree:i}){const r=Object.create(null),u=ha(n);let f;const d=CS(u,i,!0);return d&&(f=d.route,Object.assign(r,d.rawParams)),{matchedRoutes:(d==null?void 0:d.branch)||[s.__root__],routeParams:r,foundRoute:f}}function i2({search:n,dest:s,destRoutes:i,_includeValidateSearch:r}){return r2(i)(n,s,r??!1)}function r2(n){var u;const s={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const f of n){if("search"in f.options)(u=f.options.search)!=null&&u.middlewares&&s.middlewares.push(...f.options.search.middlewares);else if(f.options.preSearchFilters||f.options.postSearchFilters){const d=({search:y,next:g})=>{let m=y;"preSearchFilters"in f.options&&f.options.preSearchFilters&&(m=f.options.preSearchFilters.reduce((v,S)=>S(v),y));const b=g(m);return"postSearchFilters"in f.options&&f.options.postSearchFilters?f.options.postSearchFilters.reduce((v,S)=>S(v),b):b};s.middlewares.push(d)}if(f.options.validateSearch){const d=({search:y,next:g})=>{const m=g(y);if(!s._includeValidateSearch)return m;try{return{...m,...xu(f.options.validateSearch,m)??void 0}}catch{return m}};s.middlewares.push(d)}}const i=({search:f})=>{const d=s.dest;return d.search?d.search===!0?f:Us(d.search,f):{}};s.middlewares.push(i);const r=(f,d,y)=>{if(f>=y.length)return d;const g=y[f];return g({search:d,next:b=>r(f+1,b,y)})};return function(d,y,g){return s.dest=y,s._includeValidateSearch=g,r(0,d,s.middlewares)}}function o2(n,s){if(n!=="root")for(let i=s.length-1;i>=0;i--){const r=s[i];if(r.children)return r.id}return Ps}function Kg(n,s){var r;const i=((r=n.options.params)==null?void 0:r.parse)??n.options.parseParams;if(i){const u=i(s);if(u===!1)throw new Error("Route params.parse returned false for a matched route");Object.assign(s,u)}}function u2(){try{return sessionStorage}catch{return}}const c2="tsr-scroll-restoration-v1_3",Pl=u2();function f2(){try{return JSON.parse((Pl==null?void 0:Pl.getItem("tsr-scroll-restoration-v1_3"))||"{}")}catch{return{}}}function d2(){try{Pl==null||Pl.setItem(c2,JSON.stringify(Xa))}catch{}}const Xa=f2(),Xg="data-scroll-restoration-id",h2=n=>n.state.__TSR_key||n.href;function m2(n){const s=n.getAttribute(Xg);if(s)return`[${Xg}="${s}"]`;let i="",r=n,u;for(;u=r.parentNode;){let f=1,d=r;for(;d=d.previousElementSibling;)f++;const y=`${r.localName}:nth-child(${f})`;i=i?`${y} > ${i}`:y,r=u}return i}let uu=!1;const Vl="window";function Xd(n){try{return typeof n=="function"?n():document.querySelector(n)}catch{}}function Pg(n){const s=[];for(const i of n){if(i===Vl)continue;const r=Xd(i);r&&s.push(r)}return s}function y2(n,s){if(n.options.scrollRestoration&&(n.isScrollRestoring=!0),n.isScrollRestorationSetup)return;n.isScrollRestorationSetup=!0,uu=!1;const i=n.options.getScrollRestorationKey||h2,r=new Map,u=(y,g,m)=>{const b=r.get(y)||{};b.scrollX=g,b.scrollY=m,r.set(y,b)};history.scrollRestoration="manual";const f=y=>{if(!(uu||!n.isScrollRestoring))if(y.target===document)u(Vl,scrollX,scrollY);else{const g=y.target;u(g,g.scrollLeft,g.scrollTop)}},d=y=>{if(!n.isScrollRestoring)return;const g=Xa[y]||(Xa[y]={});for(const[m,b]of r)m===Vl?g[Vl]=b:m.isConnected&&(g[m2(m)]=b)};document.addEventListener("scroll",f,!0),n.subscribe("onBeforeLoad",y=>{y.fromLocation&&d(i(y.fromLocation)),r.clear()}),addEventListener("pagehide",()=>{d(i(n.stores.resolvedLocation.get()??n.stores.location.get())),d2()}),n.subscribe("onRendered",y=>{var _;const g=n.options.scrollRestorationBehavior,m=n.options.scrollToTopSelectors,b=n.resetNextScroll;let v;if(r.clear(),b||(n.resetNextScroll=!0),typeof n.options.scrollRestoration=="function"&&!n.options.scrollRestoration({location:n.latestLocation}))return;const S=i(y.toLocation),j=y.fromLocation&&i(y.fromLocation);if(n.isScrollRestoring&&j&&j!==S){const w=Xa[j];if(w){let R=Xa[S];for(const U in w){if(U===Vl){if(b)continue}else{const k=Xd(U);if(!k||b&&m&&(v??(v=Pg(m)),v.includes(k)))continue}R||(R=Xa[S]={}),R[U]??(R[U]=w[U])}}}uu=!0;try{const w=y.toLocation.hash,R=y.toLocation.state.__hashScrollIntoViewOptions??!0;let U=!1;if(b){const k=Kd.get(y.toLocation),H=w&&R&&(k==="PUSH"||k==="REPLACE"),M=n.isScrollRestoring?Xa[S]:void 0;if(M)for(const Q in M){const{scrollX:D,scrollY:O}=M[Q];if(Q===Vl){if(H)continue;scrollTo({top:O,left:D,behavior:g}),U=!0}else{const A=Xd(Q);A&&(A.scrollLeft=D,A.scrollTop=O)}}if(!U&&!w){const Q={top:0,left:0,behavior:g};if(scrollTo(Q),m){v??(v=Pg(m));for(const D of v)D.scrollTo(Q)}}}!U&&w&&R&&((_=document.getElementById(w))==null||_.scrollIntoView(R))}finally{uu=!1}})}const p2="Error preloading route! ☝️";var c0=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(n){if(this.init=s=>{var g,m;this.originalIndex=s.originalIndex;const i=this.options,r=!(i!=null&&i.path)&&!(i!=null&&i.id);this.parentRoute=(m=(g=this.options).getParentRoute)==null?void 0:m.call(g),r?this._path=Ps:this.parentRoute||ma();let u=r?Ps:i==null?void 0:i.path;u&&u!=="/"&&(u=a0(u));const f=(i==null?void 0:i.id)||u;let d=r?Ps:vu([this.parentRoute.id==="__root__"?"":this.parentRoute.id,f]);u==="__root__"&&(u="/"),d!=="__root__"&&(d=vu(["/",d]));const y=d==="__root__"?"/":vu([this.parentRoute.fullPath,u]);this._path=u,this._id=d,this._fullPath=y,this._to=ha(y)},this.addChildren=s=>this._addFileChildren(s),this._addFileChildren=s=>(Array.isArray(s)&&(this.children=s),typeof s=="object"&&s!==null&&(this.children=Object.values(s)),this),this._addFileTypes=()=>this,this.updateLoader=s=>(Object.assign(this.options,s),this),this.update=s=>(Object.assign(this.options,s),this),this.lazy=s=>(this.lazyFn=s,this),this.redirect=s=>YS({from:this.fullPath,...s}),this.options=n||{},this.isRoot=!(n!=null&&n.getParentRoute),n!=null&&n.id&&(n!=null&&n.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}},g2=class extends c0{constructor(n){super(n)}};function ch(n){const s=n.errorComponent??fh;return h.jsx(v2,{getResetKey:n.getResetKey,onCatch:n.onCatch,children:({error:i,reset:r})=>i?K.createElement(s,{error:i,reset:r}):n.children})}var v2=class extends K.Component{constructor(...n){super(...n),this.state={error:null}}static getDerivedStateFromProps(n,s){const i=n.getResetKey();return s.error&&s.resetKey!==i?{resetKey:i,error:null}:{resetKey:i}}static getDerivedStateFromError(n){return{error:n}}reset(){this.setState({error:null})}componentDidCatch(n,s){this.props.onCatch&&this.props.onCatch(n,s)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function fh({error:n}){const[s,i]=K.useState(!1);return h.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[h.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[h.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),h.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>i(r=>!r),children:s?"Hide Error":"Show Error"})]}),h.jsx("div",{style:{height:".25rem"}}),s?h.jsx("div",{children:h.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:n.message?h.jsx("code",{children:n.message}):null})}):null]})}function b2({children:n,fallback:s=null}){return f0()?h.jsx(jr.Fragment,{children:n}):h.jsx(jr.Fragment,{children:s})}function f0(){return jr.useSyncExternalStore(x2,()=>!0,()=>!1)}function x2(){return()=>{}}var d0=K.createContext(null);function an(n){return K.useContext(d0)}var qu=K.createContext(void 0),S2=K.createContext(void 0),Fe=(n=>(n[n.None=0]="None",n[n.Mutable=1]="Mutable",n[n.Watching=2]="Watching",n[n.RecursedCheck=4]="RecursedCheck",n[n.Recursed=8]="Recursed",n[n.Dirty=16]="Dirty",n[n.Pending=32]="Pending",n))(Fe||{});function j2({update:n,notify:s,unwatched:i}){return{link:r,unlink:u,propagate:f,checkDirty:d,shallowPropagate:y};function r(m,b,v){const S=b.depsTail;if(S!==void 0&&S.dep===m)return;const j=S!==void 0?S.nextDep:b.deps;if(j!==void 0&&j.dep===m){j.version=v,b.depsTail=j;return}const _=m.subsTail;if(_!==void 0&&_.version===v&&_.sub===b)return;const w=b.depsTail=m.subsTail={version:v,dep:m,sub:b,prevDep:S,nextDep:j,prevSub:_,nextSub:void 0};j!==void 0&&(j.prevDep=w),S!==void 0?S.nextDep=w:b.deps=w,_!==void 0?_.nextSub=w:m.subs=w}function u(m,b=m.sub){const v=m.dep,S=m.prevDep,j=m.nextDep,_=m.nextSub,w=m.prevSub;return j!==void 0?j.prevDep=S:b.depsTail=S,S!==void 0?S.nextDep=j:b.deps=j,_!==void 0?_.prevSub=w:v.subsTail=w,w!==void 0?w.nextSub=_:(v.subs=_)===void 0&&i(v),j}function f(m){let b=m.nextSub,v;e:do{const S=m.sub;let j=S.flags;if(j&60?j&12?j&4?!(j&48)&&g(m,S)?(S.flags=j|40,j&=1):j=0:S.flags=j&-9|32:j=0:S.flags=j|32,j&2&&s(S),j&1){const _=S.subs;if(_!==void 0){const w=(m=_).nextSub;w!==void 0&&(v={value:b,prev:v},b=w);continue}}if((m=b)!==void 0){b=m.nextSub;continue}for(;v!==void 0;)if(m=v.value,v=v.prev,m!==void 0){b=m.nextSub;continue e}break}while(!0)}function d(m,b){let v,S=0,j=!1;e:do{const _=m.dep,w=_.flags;if(b.flags&16)j=!0;else if((w&17)===17){if(n(_)){const R=_.subs;R.nextSub!==void 0&&y(R),j=!0}}else if((w&33)===33){(m.nextSub!==void 0||m.prevSub!==void 0)&&(v={value:m,prev:v}),m=_.deps,b=_,++S;continue}if(!j){const R=m.nextDep;if(R!==void 0){m=R;continue}}for(;S--;){const R=b.subs,U=R.nextSub!==void 0;if(U?(m=v.value,v=v.prev):m=R,j){if(n(b)){U&&y(R),b=m.sub;continue}j=!1}else b.flags&=-33;b=m.sub;const k=m.nextDep;if(k!==void 0){m=k;continue e}}return j}while(!0)}function y(m){do{const b=m.sub,v=b.flags;(v&48)===32&&(b.flags=v|16,(v&6)===2&&s(b))}while((m=m.nextSub)!==void 0)}function g(m,b){let v=b.depsTail;for(;v!==void 0;){if(v===m)return!0;v=v.prevDep}return!1}}function R2(n,s,i){var f,d,y;const r=typeof n=="object",u=r?n:void 0;return{next:(f=r?n.next:n)==null?void 0:f.bind(u),error:(d=r?n.error:s)==null?void 0:d.bind(u),complete:(y=r?n.complete:i)==null?void 0:y.bind(u)}}const Pd=[];let Su=0;const{link:Zg,unlink:_2,propagate:T2,checkDirty:h0,shallowPropagate:Jg}=j2({update(n){return n._update()},notify(n){Pd[Zd++]=n,n.flags&=~Fe.Watching},unwatched(n){n.depsTail!==void 0&&(n.depsTail=void 0,n.flags=Fe.Mutable|Fe.Dirty,zu(n))}});let cu=0,Zd=0,Un,Jd=0;function m0(n){try{++Jd,n()}finally{--Jd||y0()}}function zu(n){const s=n.depsTail;let i=s!==void 0?s.nextDep:n.deps;for(;i!==void 0;)i=_2(i,n)}function y0(){if(!(Jd>0)){for(;cu<Zd;){const n=Pd[cu];Pd[cu++]=void 0,n.notify()}cu=0,Zd=0}}function Fg(n,s){const i=typeof n=="function",r=n,u={_snapshot:i?void 0:n,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:i?Fe.None:Fe.Mutable,get(){return Un!==void 0&&Zg(u,Un,Su),u._snapshot},subscribe(f){const d=R2(f),y={current:!1},g=w2(()=>{var m;u.get(),y.current?(m=d.next)==null||m.call(d,u._snapshot):y.current=!0});return{unsubscribe:()=>{g.stop()}}},_update(f){const d=Un,y=(s==null?void 0:s.compare)??Object.is;if(i)Un=u,++Su,u.depsTail=void 0;else if(f===void 0)return!1;i&&(u.flags=Fe.Mutable|Fe.RecursedCheck);try{const g=u._snapshot,m=typeof f=="function"?f(g):f===void 0&&i?r(g):f;return g===void 0||!y(g,m)?(u._snapshot=m,!0):!1}finally{Un=d,i&&(u.flags&=~Fe.RecursedCheck),zu(u)}}};return i?(u.flags=Fe.Mutable|Fe.Dirty,u.get=function(){const f=u.flags;if(f&Fe.Dirty||f&Fe.Pending&&h0(u.deps,u)){if(u._update()){const d=u.subs;d!==void 0&&Jg(d)}}else f&Fe.Pending&&(u.flags=f&~Fe.Pending);return Un!==void 0&&Zg(u,Un,Su),u._snapshot}):u.set=function(f){if(u._update(f)){const d=u.subs;d!==void 0&&(T2(d),Jg(d),y0())}},u}function w2(n){const s=()=>{const r=Un;Un=i,++Su,i.depsTail=void 0,i.flags=Fe.Watching|Fe.RecursedCheck;try{return n()}finally{Un=r,i.flags&=~Fe.RecursedCheck,zu(i)}},i={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Fe.Watching|Fe.RecursedCheck,notify(){const r=this.flags;r&Fe.Dirty||r&Fe.Pending&&h0(this.deps,this)?s():this.flags=Fe.Watching},stop(){this.flags=Fe.None,this.depsTail=void 0,zu(this)}};return s(),i}var fd={exports:{}},dd={},hd={exports:{}},md={};/**
18
- * @license React
19
- * use-sync-external-store-shim.production.js
20
- *
21
- * Copyright (c) Meta Platforms, Inc. and affiliates.
22
- *
23
- * This source code is licensed under the MIT license found in the
24
- * LICENSE file in the root directory of this source tree.
25
- */var Ig;function E2(){if(Ig)return md;Ig=1;var n=Or();function s(v,S){return v===S&&(v!==0||1/v===1/S)||v!==v&&S!==S}var i=typeof Object.is=="function"?Object.is:s,r=n.useState,u=n.useEffect,f=n.useLayoutEffect,d=n.useDebugValue;function y(v,S){var j=S(),_=r({inst:{value:j,getSnapshot:S}}),w=_[0].inst,R=_[1];return f(function(){w.value=j,w.getSnapshot=S,g(w)&&R({inst:w})},[v,j,S]),u(function(){return g(w)&&R({inst:w}),v(function(){g(w)&&R({inst:w})})},[v]),d(j),j}function g(v){var S=v.getSnapshot;v=v.value;try{var j=S();return!i(v,j)}catch{return!0}}function m(v,S){return S()}var b=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:y;return md.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:b,md}var $g;function C2(){return $g||($g=1,hd.exports=E2()),hd.exports}/**
26
- * @license React
27
- * use-sync-external-store-shim/with-selector.production.js
28
- *
29
- * Copyright (c) Meta Platforms, Inc. and affiliates.
30
- *
31
- * This source code is licensed under the MIT license found in the
32
- * LICENSE file in the root directory of this source tree.
33
- */var Wg;function N2(){if(Wg)return dd;Wg=1;var n=Or(),s=C2();function i(m,b){return m===b&&(m!==0||1/m===1/b)||m!==m&&b!==b}var r=typeof Object.is=="function"?Object.is:i,u=s.useSyncExternalStore,f=n.useRef,d=n.useEffect,y=n.useMemo,g=n.useDebugValue;return dd.useSyncExternalStoreWithSelector=function(m,b,v,S,j){var _=f(null);if(_.current===null){var w={hasValue:!1,value:null};_.current=w}else w=_.current;_=y(function(){function U(D){if(!k){if(k=!0,H=D,D=S(D),j!==void 0&&w.hasValue){var O=w.value;if(j(O,D))return M=O}return M=D}if(O=M,r(H,D))return O;var A=S(D);return j!==void 0&&j(O,A)?(H=D,O):(H=D,M=A)}var k=!1,H,M,Q=v===void 0?null:v;return[function(){return U(b())},Q===null?void 0:function(){return U(Q())}]},[b,v,S,j]);var R=u(m,_[0],_[1]);return d(function(){w.hasValue=!0,w.value=R},[R]),g(R),R},dd}var ev;function M2(){return ev||(ev=1,fd.exports=N2()),fd.exports}var A2=M2();function O2(n,s){return n===s}function Yt(n,s,i=O2){const r=K.useCallback(d=>{if(!n)return()=>{};const{unsubscribe:y}=n.subscribe(d);return y},[n]),u=K.useCallback(()=>n==null?void 0:n.get(),[n]);return A2.useSyncExternalStoreWithSelector(r,u,u,s,i)}var z2={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function $s(n){const s=an(),i=K.useContext(n.from?S2:qu),r=n.from??i,u=r?n.from?s.stores.getRouteMatchStore(r):s.stores.matchStores.get(r):void 0,f=K.useRef(void 0);return Yt(u??z2,d=>{if((n.shouldThrow??!0)&&!d&&ma(),d===void 0)return;const y=n.select?n.select(d):d;if(n.structuralSharing??s.options.defaultStructuralSharing){const g=as(f.current,y);return f.current=g,g}return y})}function p0(n){return $s({from:n.from,strict:n.strict,structuralSharing:n.structuralSharing,select:s=>n.select?n.select(s.loaderData):s.loaderData})}function g0(n){const{select:s,...i}=n;return $s({...i,select:r=>s?s(r.loaderDeps):r.loaderDeps})}function v0(n){return $s({from:n.from,shouldThrow:n.shouldThrow,structuralSharing:n.structuralSharing,strict:n.strict,select:s=>{const i=n.strict===!1?s.params:s._strictParams;return n.select?n.select(i):i}})}function b0(n){return $s({from:n.from,strict:n.strict,shouldThrow:n.shouldThrow,structuralSharing:n.structuralSharing,select:s=>n.select?n.select(s.search):s.search})}function x0(n){const s=an();return K.useCallback(i=>s.navigate({...i,from:i.from??(n==null?void 0:n.from)}),[n==null?void 0:n.from,s])}function S0(n){return $s({...n,select:s=>n.select?n.select(s.context):s.context})}var yd={exports:{}},jt={};/**
34
- * @license React
35
- * react-dom.production.js
36
- *
37
- * Copyright (c) Meta Platforms, Inc. and affiliates.
38
- *
39
- * This source code is licensed under the MIT license found in the
40
- * LICENSE file in the root directory of this source tree.
41
- */var tv;function D2(){if(tv)return jt;tv=1;var n=Or();function s(g){var m="https://react.dev/errors/"+g;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)m+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+g+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var r={d:{f:i,r:function(){throw Error(s(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},u=Symbol.for("react.portal");function f(g,m,b){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:v==null?null:""+v,children:g,containerInfo:m,implementation:b}}var d=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function y(g,m){if(g==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return jt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,jt.createPortal=function(g,m){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(s(299));return f(g,m,null,b)},jt.flushSync=function(g){var m=d.T,b=r.p;try{if(d.T=null,r.p=2,g)return g()}finally{d.T=m,r.p=b,r.d.f()}},jt.preconnect=function(g,m){typeof g=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,r.d.C(g,m))},jt.prefetchDNS=function(g){typeof g=="string"&&r.d.D(g)},jt.preinit=function(g,m){if(typeof g=="string"&&m&&typeof m.as=="string"){var b=m.as,v=y(b,m.crossOrigin),S=typeof m.integrity=="string"?m.integrity:void 0,j=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;b==="style"?r.d.S(g,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:v,integrity:S,fetchPriority:j}):b==="script"&&r.d.X(g,{crossOrigin:v,integrity:S,fetchPriority:j,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},jt.preinitModule=function(g,m){if(typeof g=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var b=y(m.as,m.crossOrigin);r.d.M(g,{crossOrigin:b,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&r.d.M(g)},jt.preload=function(g,m){if(typeof g=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var b=m.as,v=y(b,m.crossOrigin);r.d.L(g,b,{crossOrigin:v,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},jt.preloadModule=function(g,m){if(typeof g=="string")if(m){var b=y(m.as,m.crossOrigin);r.d.m(g,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:b,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else r.d.m(g)},jt.requestFormReset=function(g){r.d.r(g)},jt.unstable_batchedUpdates=function(g,m){return g(m)},jt.useFormState=function(g,m,b){return d.H.useFormState(g,m,b)},jt.useFormStatus=function(){return d.H.useHostTransitionStatus()},jt.version="19.2.6",jt}var nv;function j0(){if(nv)return yd.exports;nv=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(s){console.error(s)}}return n(),yd.exports=D2(),yd.exports}var U2=j0();function L2(n,s){const i=an(),r=gS(s),{activeProps:u,inactiveProps:f,activeOptions:d,to:y,preload:g,preloadDelay:m,preloadIntentProximity:b,hashScrollIntoView:v,replace:S,startTransition:j,resetScroll:_,viewTransition:w,children:R,target:U,disabled:k,style:H,className:M,onClick:Q,onBlur:D,onFocus:O,onMouseEnter:A,onMouseLeave:V,onTouchStart:$,ignoreBlocker:W,params:Z,search:te,hash:ee,state:he,mask:L,reloadDocument:X,unsafeRelative:ce,from:Ce,_fromLocation:ne,...C}=n,F=f0(),ae=K.useMemo(()=>n,[i,n.from,n._fromLocation,n.hash,n.to,n.search,n.params,n.state,n.mask,n.unsafeRelative]),se=Yt(i.stores.location,qe=>qe,(qe,yt)=>qe.href===yt.href),le=K.useMemo(()=>{const qe={_fromLocation:se,...ae};return i.buildLocation(qe)},[i,se,ae]),me=le.maskedLocation?le.maskedLocation.publicHref:le.publicHref,Re=le.maskedLocation?le.maskedLocation.external:le.external,Be=K.useMemo(()=>Q2(me,Re,i.history,k),[k,Re,me,i.history]),ge=K.useMemo(()=>{if(Be!=null&&Be.external)return Nu(Be.href,i.protocolAllowlist)?void 0:Be.href;if(!Y2(y)&&!(typeof y!="string"||y.indexOf(":")===-1))try{return new URL(y),Nu(y,i.protocolAllowlist)?void 0:y}catch{}},[y,Be,i.protocolAllowlist]),sn=K.useMemo(()=>{if(ge)return!1;if(d!=null&&d.exact){if(!DS(se.pathname,le.pathname,i.basepath))return!1}else{const qe=Mu(se.pathname,i.basepath),yt=Mu(le.pathname,i.basepath);if(!(qe.startsWith(yt)&&(qe.length===yt.length||qe[yt.length]==="/")))return!1}return((d==null?void 0:d.includeSearch)??!0)&&!Xs(se.search,le.search,{partial:!(d!=null&&d.exact),ignoreUndefined:!(d!=null&&d.explicitUndefined)})?!1:d!=null&&d.includeHash?F&&se.hash===le.hash:!0},[d==null?void 0:d.exact,d==null?void 0:d.explicitUndefined,d==null?void 0:d.includeHash,d==null?void 0:d.includeSearch,se,ge,F,le.hash,le.pathname,le.search,i.basepath]),Mt=sn?Us(u,{})??k2:pd,Vt=sn?pd:Us(f,{})??pd,Gn=[M,Mt.className,Vt.className].filter(Boolean).join(" "),wt=(H||Mt.style||Vt.style)&&{...H,...Mt.style,...Vt.style},[yi,nl]=K.useState(!1),Hr=K.useRef(!1),Qn=n.reloadDocument||ge?!1:g??i.options.defaultPreload,cs=m??i.options.defaultPreloadDelay??0,Sn=K.useCallback(()=>{i.preloadRoute({...ae,_builtLocation:le}).catch(qe=>{console.warn(qe),console.warn(p2)})},[i,ae,le]);pS(r,K.useCallback(qe=>{qe!=null&&qe.isIntersecting&&Sn()},[Sn]),G2,{disabled:!!k||Qn!=="viewport"}),K.useEffect(()=>{Hr.current||!k&&Qn==="render"&&(Sn(),Hr.current=!0)},[k,Sn,Qn]);const pi=qe=>{const yt=qe.currentTarget.getAttribute("target"),Nn=U!==void 0?U:yt;if(!k&&!V2(qe)&&!qe.defaultPrevented&&(!Nn||Nn==="_self")&&qe.button===0){qe.preventDefault(),U2.flushSync(()=>{nl(!0)});const al=i.subscribe("onResolved",()=>{al(),nl(!1)});i.navigate({...ae,replace:S,resetScroll:_,hashScrollIntoView:v,startTransition:j,viewTransition:w,ignoreBlocker:W})}};if(ge)return{...C,ref:r,href:ge,...R&&{children:R},...U&&{target:U},...k&&{disabled:k},...H&&{style:H},...M&&{className:M},...Q&&{onClick:Q},...D&&{onBlur:D},...O&&{onFocus:O},...A&&{onMouseEnter:A},...V&&{onMouseLeave:V},...$&&{onTouchStart:$}};const Gr=qe=>{if(k||Qn!=="intent")return;if(!cs){Sn();return}const yt=qe.currentTarget;if(dr.has(yt))return;const Nn=setTimeout(()=>{dr.delete(yt),Sn()},cs);dr.set(yt,Nn)},Gu=qe=>{k||Qn!=="intent"||Sn()},St=qe=>{if(k||!Qn||!cs)return;const yt=qe.currentTarget,Nn=dr.get(yt);Nn&&(clearTimeout(Nn),dr.delete(yt))};return{...C,...Mt,...Vt,href:Be==null?void 0:Be.href,ref:r,onClick:Ql([Q,pi]),onBlur:Ql([D,St]),onFocus:Ql([O,Gr]),onMouseEnter:Ql([A,Gr]),onMouseLeave:Ql([V,St]),onTouchStart:Ql([$,Gu]),disabled:!!k,target:U,...wt&&{style:wt},...Gn&&{className:Gn},...k&&B2,...sn&&q2,...F&&yi&&H2}}var pd={},k2={className:"active"},B2={role:"link","aria-disabled":!0},q2={"data-status":"active","aria-current":"page"},H2={"data-transitioning":"transitioning"},dr=new WeakMap,G2={rootMargin:"100px"},Ql=n=>s=>{for(const i of n)if(i){if(s.defaultPrevented)return;i(s)}};function Q2(n,s,i,r){if(!r)return s?{href:n,external:!0}:{href:i.createHref(n)||"/",external:!1}}function Y2(n){if(typeof n!="string")return!1;const s=n.charCodeAt(0);return s===47?n.charCodeAt(1)!==47:s===46}var dh=K.forwardRef((n,s)=>{const{_asChild:i,...r}=n,{type:u,...f}=L2(r,s),d=typeof r.children=="function"?r.children({isActive:f["data-status"]==="active"}):r.children;if(!i){const{disabled:y,...g}=f;return K.createElement("a",g,d)}return K.createElement(i,f,d)});function V2(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}var K2=class extends c0{constructor(n){super(n),this.useMatch=s=>$s({select:s==null?void 0:s.select,from:this.id,structuralSharing:s==null?void 0:s.structuralSharing}),this.useRouteContext=s=>S0({...s,from:this.id}),this.useSearch=s=>b0({select:s==null?void 0:s.select,structuralSharing:s==null?void 0:s.structuralSharing,from:this.id}),this.useParams=s=>v0({select:s==null?void 0:s.select,structuralSharing:s==null?void 0:s.structuralSharing,from:this.id}),this.useLoaderDeps=s=>g0({...s,from:this.id}),this.useLoaderData=s=>p0({...s,from:this.id}),this.useNavigate=()=>x0({from:this.fullPath}),this.Link=jr.forwardRef((s,i)=>h.jsx(dh,{ref:i,from:this.fullPath,...s}))}};function Ws(n){return new K2(n)}var X2=class extends g2{constructor(n){super(n),this.useMatch=s=>$s({select:s==null?void 0:s.select,from:this.id,structuralSharing:s==null?void 0:s.structuralSharing}),this.useRouteContext=s=>S0({...s,from:this.id}),this.useSearch=s=>b0({select:s==null?void 0:s.select,structuralSharing:s==null?void 0:s.structuralSharing,from:this.id}),this.useParams=s=>v0({select:s==null?void 0:s.select,structuralSharing:s==null?void 0:s.structuralSharing,from:this.id}),this.useLoaderDeps=s=>g0({...s,from:this.id}),this.useLoaderData=s=>p0({...s,from:this.id}),this.useNavigate=()=>x0({from:this.fullPath}),this.Link=jr.forwardRef((s,i)=>h.jsx(dh,{ref:i,from:this.fullPath,...s}))}};function P2(n){return new X2(n)}function Z2(n){const s=an(),i=`not-found-${Yt(s.stores.location,r=>r.pathname)}-${Yt(s.stores.status,r=>r)}`;return h.jsx(ch,{getResetKey:()=>i,onCatch:(r,u)=>{var f;if(Tt(r))(f=n.onCatch)==null||f.call(n,r,u);else throw r},errorComponent:({error:r})=>{var u;if(Tt(r))return(u=n.fallback)==null?void 0:u.call(n,r);throw r},children:n.children})}function J2(){return h.jsx("p",{children:"Not Found"})}function Kl(n){return h.jsx(h.Fragment,{children:n.children})}function R0(n,s,i){return s.options.notFoundComponent?h.jsx(s.options.notFoundComponent,{...i}):n.options.defaultNotFoundComponent?h.jsx(n.options.defaultNotFoundComponent,{...i}):h.jsx(J2,{})}function F2(n){return null}function I2(){return F2(an()),null}var _0=K.memo(function({matchId:s}){const i=an(),r=i.stores.matchStores.get(s);r||ma();const u=Yt(i.stores.loadedAt,d=>d),f=Yt(r,d=>d);return h.jsx($2,{router:i,matchId:s,resetKey:u,matchState:K.useMemo(()=>{var g;const d=f.routeId,y=(g=i.routesById[d].parentRoute)==null?void 0:g.id;return{routeId:d,ssr:f.ssr,_displayPending:f._displayPending,parentRouteId:y}},[f._displayPending,f.routeId,f.ssr,i.routesById])})});function $2({router:n,matchId:s,resetKey:i,matchState:r}){var _,w;const u=n.routesById[r.routeId],f=u.options.pendingComponent??n.options.defaultPendingComponent,d=f?h.jsx(f,{}):null,y=u.options.errorComponent??n.options.defaultErrorComponent,g=u.options.onCatch??n.options.defaultOnCatch,m=u.isRoot?u.options.notFoundComponent??((_=n.options.notFoundRoute)==null?void 0:_.options.component):u.options.notFoundComponent,b=r.ssr===!1||r.ssr==="data-only",v=(!u.isRoot||u.options.wrapInSuspense||b)&&(u.options.wrapInSuspense??f??(((w=u.options.errorComponent)==null?void 0:w.preload)||b))?K.Suspense:Kl,S=y?ch:Kl,j=m?Z2:Kl;return h.jsxs(u.isRoot?u.options.shellComponent??Kl:Kl,{children:[h.jsx(qu.Provider,{value:s,children:h.jsx(v,{fallback:d,children:h.jsx(S,{getResetKey:()=>i,errorComponent:y||fh,onCatch:(R,U)=>{if(Tt(R))throw R.routeId??(R.routeId=r.routeId),R;g==null||g(R,U)},children:h.jsx(j,{fallback:R=>{if(R.routeId??(R.routeId=r.routeId),!m||R.routeId&&R.routeId!==r.routeId||!R.routeId&&!u.isRoot)throw R;return K.createElement(m,R)},children:b||r._displayPending?h.jsx(b2,{fallback:d,children:h.jsx(av,{matchId:s})}):h.jsx(av,{matchId:s})})})})}),r.parentRouteId===Ps?h.jsxs(h.Fragment,{children:[h.jsx(W2,{resetKey:i}),n.options.scrollRestoration&&Fv?h.jsx(I2,{}):null]}):null]})}function W2({resetKey:n}){const s=an(),i=K.useRef(void 0);return br(()=>{const r=s.latestLocation.href;(i.current===void 0||i.current!==r)&&(s.emit({type:"onRendered",...Xl(s.stores.location.get(),s.stores.resolvedLocation.get())}),i.current=r)},[s.latestLocation.state.__TSR_key,n,s]),null}var av=K.memo(function({matchId:s}){const i=an(),r=(b,v)=>{var S;return((S=i.getMatch(b.id))==null?void 0:S._nonReactive[v])??b._nonReactive[v]},u=i.stores.matchStores.get(s);u||ma();const f=Yt(u,b=>b),d=f.routeId,y=i.routesById[d],g=K.useMemo(()=>{var v;const b=(v=i.routesById[d].options.remountDeps??i.options.defaultRemountDeps)==null?void 0:v({routeId:d,loaderDeps:f.loaderDeps,params:f._strictParams,search:f._strictSearch});return b?JSON.stringify(b):void 0},[d,f.loaderDeps,f._strictParams,f._strictSearch,i.options.defaultRemountDeps,i.routesById]),m=K.useMemo(()=>{const b=y.options.component??i.options.defaultComponent;return b?h.jsx(b,{},g):h.jsx(T0,{})},[g,y.options.component,i.options.defaultComponent]);if(f._displayPending)throw r(f,"displayPendingPromise");if(f._forcePending)throw r(f,"minPendingPromise");if(f.status==="pending"){const b=y.options.pendingMinMs??i.options.defaultPendingMinMs;if(b){const v=i.getMatch(f.id);if(v&&!v._nonReactive.minPendingPromise){const S=ri();v._nonReactive.minPendingPromise=S,setTimeout(()=>{S.resolve(),v._nonReactive.minPendingPromise=void 0},b)}}throw r(f,"loadPromise")}if(f.status==="notFound")return Tt(f.error)||ma(),R0(i,y,f.error);if(f.status==="redirected")throw Gt(f.error)||ma(),r(f,"loadPromise");if(f.status==="error")throw f.error;return m}),T0=K.memo(function(){const s=an(),i=K.useContext(qu);let r,u=!1,f;{const m=i?s.stores.matchStores.get(i):void 0;[r,u]=Yt(m,b=>[b==null?void 0:b.routeId,(b==null?void 0:b.globalNotFound)??!1]),f=Yt(s.stores.matchesId,b=>b[b.findIndex(v=>v===i)+1])}const d=r?s.routesById[r]:void 0,y=s.options.defaultPendingComponent?h.jsx(s.options.defaultPendingComponent,{}):null;if(u)return d||ma(),R0(s,d,void 0);if(!f)return null;const g=h.jsx(_0,{matchId:f});return r===Ps?h.jsx(K.Suspense,{fallback:y,children:g}):g});function ej(){const n=an(),s=K.useRef({router:n,mounted:!1}),[i,r]=K.useState(!1),u=Yt(n.stores.isLoading,v=>v),f=Yt(n.stores.hasPending,v=>v),d=sd(u),y=u||i||f,g=sd(y),m=u||f,b=sd(m);return n.startTransition=v=>{r(!0),K.startTransition(()=>{v(),r(!1)})},K.useEffect(()=>{const v=n.history.subscribe(n.load),S=n.buildLocation({to:n.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return ha(n.latestLocation.publicHref)!==ha(S.publicHref)&&n.commitLocation({...S,replace:!0}),()=>{v()}},[n,n.history]),br(()=>{if(typeof window<"u"&&n.ssr||s.current.router===n&&s.current.mounted)return;s.current={router:n,mounted:!0},(async()=>{try{await n.load()}catch(S){console.error(S)}})()},[n]),br(()=>{d&&!u&&n.emit({type:"onLoad",...Xl(n.stores.location.get(),n.stores.resolvedLocation.get())})},[d,n,u]),br(()=>{b&&!m&&n.emit({type:"onBeforeRouteMount",...Xl(n.stores.location.get(),n.stores.resolvedLocation.get())})},[m,b,n]),br(()=>{if(g&&!y){const v=Xl(n.stores.location.get(),n.stores.resolvedLocation.get());n.emit({type:"onResolved",...v}),m0(()=>{n.stores.status.set("idle"),n.stores.resolvedLocation.set(n.stores.location.get())})}},[y,g,n]),null}function tj(){const n=an(),s=n.routesById[Ps].options.pendingComponent??n.options.defaultPendingComponent,i=s?h.jsx(s,{}):null,r=h.jsxs(typeof document<"u"&&n.ssr?Kl:K.Suspense,{fallback:i,children:[h.jsx(ej,{}),h.jsx(nj,{})]});return n.options.InnerWrap?h.jsx(n.options.InnerWrap,{children:r}):r}function nj(){const n=an(),s=Yt(n.stores.firstId,u=>u),i=Yt(n.stores.loadedAt,u=>u),r=s?h.jsx(_0,{matchId:s}):null;return h.jsx(qu.Provider,{value:s,children:n.options.disableGlobalCatchBoundary?r:h.jsx(ch,{getResetKey:()=>i,errorComponent:fh,onCatch:void 0,children:r})})}var aj=n=>({createMutableStore:Fg,createReadonlyStore:Fg,batch:m0}),sj=n=>new lj(n),lj=class extends n2{constructor(n){super(n,aj)}};function ij({router:n,children:s,...i}){$v(i)&&n.update({...n.options,...i,context:{...n.options.context,...i.context}});const r=h.jsx(d0.Provider,{value:n,children:s});return n.options.Wrap?h.jsx(n.options.Wrap,{children:r}):r}function rj({router:n,...s}){return h.jsx(ij,{router:n,...s,children:h.jsx(tj,{})})}function oj(n){const s=an({warn:(n==null?void 0:n.router)===void 0}),i=(n==null?void 0:n.router)||s,r=K.useRef(void 0);return Yt(i.stores.__store,u=>{if(n!=null&&n.select){if(n.structuralSharing??i.options.defaultStructuralSharing){const f=as(r.current,n.select(u));return r.current=f,f}return n.select(u)}return u})}var gd={exports:{}},hr={},vd={exports:{}},bd={};/**
42
- * @license React
43
- * scheduler.production.js
44
- *
45
- * Copyright (c) Meta Platforms, Inc. and affiliates.
46
- *
47
- * This source code is licensed under the MIT license found in the
48
- * LICENSE file in the root directory of this source tree.
49
- */var sv;function uj(){return sv||(sv=1,(function(n){function s(L,X){var ce=L.length;L.push(X);e:for(;0<ce;){var Ce=ce-1>>>1,ne=L[Ce];if(0<u(ne,X))L[Ce]=X,L[ce]=ne,ce=Ce;else break e}}function i(L){return L.length===0?null:L[0]}function r(L){if(L.length===0)return null;var X=L[0],ce=L.pop();if(ce!==X){L[0]=ce;e:for(var Ce=0,ne=L.length,C=ne>>>1;Ce<C;){var F=2*(Ce+1)-1,ae=L[F],se=F+1,le=L[se];if(0>u(ae,ce))se<ne&&0>u(le,ae)?(L[Ce]=le,L[se]=ce,Ce=se):(L[Ce]=ae,L[F]=ce,Ce=F);else if(se<ne&&0>u(le,ce))L[Ce]=le,L[se]=ce,Ce=se;else break e}}return X}function u(L,X){var ce=L.sortIndex-X.sortIndex;return ce!==0?ce:L.id-X.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;n.unstable_now=function(){return f.now()}}else{var d=Date,y=d.now();n.unstable_now=function(){return d.now()-y}}var g=[],m=[],b=1,v=null,S=3,j=!1,_=!1,w=!1,R=!1,U=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,H=typeof setImmediate<"u"?setImmediate:null;function M(L){for(var X=i(m);X!==null;){if(X.callback===null)r(m);else if(X.startTime<=L)r(m),X.sortIndex=X.expirationTime,s(g,X);else break;X=i(m)}}function Q(L){if(w=!1,M(L),!_)if(i(g)!==null)_=!0,D||(D=!0,Z());else{var X=i(m);X!==null&&he(Q,X.startTime-L)}}var D=!1,O=-1,A=5,V=-1;function $(){return R?!0:!(n.unstable_now()-V<A)}function W(){if(R=!1,D){var L=n.unstable_now();V=L;var X=!0;try{e:{_=!1,w&&(w=!1,k(O),O=-1),j=!0;var ce=S;try{t:{for(M(L),v=i(g);v!==null&&!(v.expirationTime>L&&$());){var Ce=v.callback;if(typeof Ce=="function"){v.callback=null,S=v.priorityLevel;var ne=Ce(v.expirationTime<=L);if(L=n.unstable_now(),typeof ne=="function"){v.callback=ne,M(L),X=!0;break t}v===i(g)&&r(g),M(L)}else r(g);v=i(g)}if(v!==null)X=!0;else{var C=i(m);C!==null&&he(Q,C.startTime-L),X=!1}}break e}finally{v=null,S=ce,j=!1}X=void 0}}finally{X?Z():D=!1}}}var Z;if(typeof H=="function")Z=function(){H(W)};else if(typeof MessageChannel<"u"){var te=new MessageChannel,ee=te.port2;te.port1.onmessage=W,Z=function(){ee.postMessage(null)}}else Z=function(){U(W,0)};function he(L,X){O=U(function(){L(n.unstable_now())},X)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(L){L.callback=null},n.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<L?Math.floor(1e3/L):5},n.unstable_getCurrentPriorityLevel=function(){return S},n.unstable_next=function(L){switch(S){case 1:case 2:case 3:var X=3;break;default:X=S}var ce=S;S=X;try{return L()}finally{S=ce}},n.unstable_requestPaint=function(){R=!0},n.unstable_runWithPriority=function(L,X){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var ce=S;S=L;try{return X()}finally{S=ce}},n.unstable_scheduleCallback=function(L,X,ce){var Ce=n.unstable_now();switch(typeof ce=="object"&&ce!==null?(ce=ce.delay,ce=typeof ce=="number"&&0<ce?Ce+ce:Ce):ce=Ce,L){case 1:var ne=-1;break;case 2:ne=250;break;case 5:ne=1073741823;break;case 4:ne=1e4;break;default:ne=5e3}return ne=ce+ne,L={id:b++,callback:X,priorityLevel:L,startTime:ce,expirationTime:ne,sortIndex:-1},ce>Ce?(L.sortIndex=ce,s(m,L),i(g)===null&&L===i(m)&&(w?(k(O),O=-1):w=!0,he(Q,ce-Ce))):(L.sortIndex=ne,s(g,L),_||j||(_=!0,D||(D=!0,Z()))),L},n.unstable_shouldYield=$,n.unstable_wrapCallback=function(L){var X=S;return function(){var ce=S;S=X;try{return L.apply(this,arguments)}finally{S=ce}}}})(bd)),bd}var lv;function cj(){return lv||(lv=1,vd.exports=uj()),vd.exports}/**
50
- * @license React
51
- * react-dom-client.production.js
52
- *
53
- * Copyright (c) Meta Platforms, Inc. and affiliates.
54
- *
55
- * This source code is licensed under the MIT license found in the
56
- * LICENSE file in the root directory of this source tree.
57
- */var iv;function fj(){if(iv)return hr;iv=1;var n=cj(),s=Or(),i=j0();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function u(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function d(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function y(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function g(e){if(f(e)!==e)throw Error(r(188))}function m(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(r(188));return t!==e?null:e}for(var a=e,l=t;;){var o=a.return;if(o===null)break;var c=o.alternate;if(c===null){if(l=o.return,l!==null){a=l;continue}break}if(o.child===c.child){for(c=o.child;c;){if(c===a)return g(o),e;if(c===l)return g(o),t;c=c.sibling}throw Error(r(188))}if(a.return!==l.return)a=o,l=c;else{for(var p=!1,x=o.child;x;){if(x===a){p=!0,a=o,l=c;break}if(x===l){p=!0,l=o,a=c;break}x=x.sibling}if(!p){for(x=c.child;x;){if(x===a){p=!0,a=c,l=o;break}if(x===l){p=!0,l=c,a=o;break}x=x.sibling}if(!p)throw Error(r(189))}}if(a.alternate!==l)throw Error(r(190))}if(a.tag!==3)throw Error(r(188));return a.stateNode.current===a?e:t}function b(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=b(e),t!==null)return t;e=e.sibling}return null}var v=Object.assign,S=Symbol.for("react.element"),j=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),U=Symbol.for("react.profiler"),k=Symbol.for("react.consumer"),H=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),Q=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),V=Symbol.for("react.activity"),$=Symbol.for("react.memo_cache_sentinel"),W=Symbol.iterator;function Z(e){return e===null||typeof e!="object"?null:(e=W&&e[W]||e["@@iterator"],typeof e=="function"?e:null)}var te=Symbol.for("react.client.reference");function ee(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===te?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case w:return"Fragment";case U:return"Profiler";case R:return"StrictMode";case Q:return"Suspense";case D:return"SuspenseList";case V:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case _:return"Portal";case H:return e.displayName||"Context";case k:return(e._context.displayName||"Context")+".Consumer";case M:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case O:return t=e.displayName||null,t!==null?t:ee(e.type)||"Memo";case A:t=e._payload,e=e._init;try{return ee(e(t))}catch{}}return null}var he=Array.isArray,L=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce={pending:!1,data:null,method:null,action:null},Ce=[],ne=-1;function C(e){return{current:e}}function F(e){0>ne||(e.current=Ce[ne],Ce[ne]=null,ne--)}function ae(e,t){ne++,Ce[ne]=e.current,e.current=t}var se=C(null),le=C(null),me=C(null),Re=C(null);function Be(e,t){switch(ae(me,t),ae(le,e),ae(se,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?kp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=kp(t),e=Bp(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}F(se),ae(se,e)}function ge(){F(se),F(le),F(me)}function sn(e){e.memoizedState!==null&&ae(Re,e);var t=se.current,a=Bp(t,e.type);t!==a&&(ae(le,e),ae(se,a))}function Mt(e){le.current===e&&(F(se),F(le)),Re.current===e&&(F(Re),lr._currentValue=ce)}var Vt,Gn;function wt(e){if(Vt===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Vt=t&&t[1]||"",Gn=-1<a.stack.indexOf(`
58
- at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
59
- `+Vt+e+Gn}var yi=!1;function nl(e,t){if(!e||yi)return"";yi=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var I=function(){throw Error()};if(Object.defineProperty(I.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(I,[])}catch(Y){var G=Y}Reflect.construct(e,[],I)}else{try{I.call()}catch(Y){G=Y}e.call(I.prototype)}}else{try{throw Error()}catch(Y){G=Y}(I=e())&&typeof I.catch=="function"&&I.catch(function(){})}}catch(Y){if(Y&&G&&typeof Y.stack=="string")return[Y.stack,G.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var c=l.DetermineComponentFrameRoot(),p=c[0],x=c[1];if(p&&x){var T=p.split(`
60
- `),q=x.split(`
61
- `);for(o=l=0;l<T.length&&!T[l].includes("DetermineComponentFrameRoot");)l++;for(;o<q.length&&!q[o].includes("DetermineComponentFrameRoot");)o++;if(l===T.length||o===q.length)for(l=T.length-1,o=q.length-1;1<=l&&0<=o&&T[l]!==q[o];)o--;for(;1<=l&&0<=o;l--,o--)if(T[l]!==q[o]){if(l!==1||o!==1)do if(l--,o--,0>o||T[l]!==q[o]){var P=`
62
- `+T[l].replace(" at new "," at ");return e.displayName&&P.includes("<anonymous>")&&(P=P.replace("<anonymous>",e.displayName)),P}while(1<=l&&0<=o);break}}}finally{yi=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?wt(a):""}function Hr(e,t){switch(e.tag){case 26:case 27:case 5:return wt(e.type);case 16:return wt("Lazy");case 13:return e.child!==t&&t!==null?wt("Suspense Fallback"):wt("Suspense");case 19:return wt("SuspenseList");case 0:case 15:return nl(e.type,!1);case 11:return nl(e.type.render,!1);case 1:return nl(e.type,!0);case 31:return wt("Activity");default:return""}}function Qn(e){try{var t="",a=null;do t+=Hr(e,a),a=e,e=e.return;while(e);return t}catch(l){return`
63
- Error generating stack: `+l.message+`
64
- `+l.stack}}var cs=Object.prototype.hasOwnProperty,Sn=n.unstable_scheduleCallback,pi=n.unstable_cancelCallback,Gr=n.unstable_shouldYield,Gu=n.unstable_requestPaint,St=n.unstable_now,qe=n.unstable_getCurrentPriorityLevel,yt=n.unstable_ImmediatePriority,Nn=n.unstable_UserBlockingPriority,al=n.unstable_NormalPriority,rb=n.unstable_LowPriority,gh=n.unstable_IdlePriority,ob=n.log,ub=n.unstable_setDisableYieldValue,gi=null,Kt=null;function pa(e){if(typeof ob=="function"&&ub(e),Kt&&typeof Kt.setStrictMode=="function")try{Kt.setStrictMode(gi,e)}catch{}}var Xt=Math.clz32?Math.clz32:db,cb=Math.log,fb=Math.LN2;function db(e){return e>>>=0,e===0?32:31-(cb(e)/fb|0)|0}var Qr=256,Yr=262144,Vr=4194304;function fs(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Kr(e,t,a){var l=e.pendingLanes;if(l===0)return 0;var o=0,c=e.suspendedLanes,p=e.pingedLanes;e=e.warmLanes;var x=l&134217727;return x!==0?(l=x&~c,l!==0?o=fs(l):(p&=x,p!==0?o=fs(p):a||(a=x&~e,a!==0&&(o=fs(a))))):(x=l&~c,x!==0?o=fs(x):p!==0?o=fs(p):a||(a=l&~e,a!==0&&(o=fs(a)))),o===0?0:t!==0&&t!==o&&(t&c)===0&&(c=o&-o,a=t&-t,c>=a||c===32&&(a&4194048)!==0)?t:o}function vi(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function hb(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function vh(){var e=Vr;return Vr<<=1,(Vr&62914560)===0&&(Vr=4194304),e}function Qu(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function bi(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function mb(e,t,a,l,o,c){var p=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var x=e.entanglements,T=e.expirationTimes,q=e.hiddenUpdates;for(a=p&~a;0<a;){var P=31-Xt(a),I=1<<P;x[P]=0,T[P]=-1;var G=q[P];if(G!==null)for(q[P]=null,P=0;P<G.length;P++){var Y=G[P];Y!==null&&(Y.lane&=-536870913)}a&=~I}l!==0&&bh(e,l,0),c!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=c&~(p&~t))}function bh(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-Xt(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|a&261930}function xh(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var l=31-Xt(a),o=1<<l;o&t|e[l]&t&&(e[l]|=t),a&=~o}}function Sh(e,t){var a=t&-t;return a=(a&42)!==0?1:Yu(a),(a&(e.suspendedLanes|t))!==0?0:a}function Yu(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Vu(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function jh(){var e=X.p;return e!==0?e:(e=window.event,e===void 0?32:rg(e.type))}function Rh(e,t){var a=X.p;try{return X.p=e,t()}finally{X.p=a}}var ga=Math.random().toString(36).slice(2),pt="__reactFiber$"+ga,At="__reactProps$"+ga,sl="__reactContainer$"+ga,Ku="__reactEvents$"+ga,yb="__reactListeners$"+ga,pb="__reactHandles$"+ga,_h="__reactResources$"+ga,xi="__reactMarker$"+ga;function Xu(e){delete e[pt],delete e[At],delete e[Ku],delete e[yb],delete e[pb]}function ll(e){var t=e[pt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[sl]||a[pt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=Kp(e);e!==null;){if(a=e[pt])return a;e=Kp(e)}return t}e=a,a=e.parentNode}return null}function il(e){if(e=e[pt]||e[sl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Si(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function rl(e){var t=e[_h];return t||(t=e[_h]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function dt(e){e[xi]=!0}var Th=new Set,wh={};function ds(e,t){ol(e,t),ol(e+"Capture",t)}function ol(e,t){for(wh[e]=t,e=0;e<t.length;e++)Th.add(t[e])}var gb=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Eh={},Ch={};function vb(e){return cs.call(Ch,e)?!0:cs.call(Eh,e)?!1:gb.test(e)?Ch[e]=!0:(Eh[e]=!0,!1)}function Xr(e,t,a){if(vb(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function Pr(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function Yn(e,t,a,l){if(l===null)e.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+l)}}function ln(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Nh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function bb(e,t,a){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var o=l.get,c=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(p){a=""+p,c.call(this,p)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(p){a=""+p},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Pu(e){if(!e._valueTracker){var t=Nh(e)?"checked":"value";e._valueTracker=bb(e,t,""+e[t])}}function Mh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),l="";return e&&(l=Nh(e)?e.checked?"true":"false":e.value),e=l,e!==a?(t.setValue(e),!0):!1}function Zr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var xb=/[\n"\\]/g;function rn(e){return e.replace(xb,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Zu(e,t,a,l,o,c,p,x){e.name="",p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"?e.type=p:e.removeAttribute("type"),t!=null?p==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+ln(t)):e.value!==""+ln(t)&&(e.value=""+ln(t)):p!=="submit"&&p!=="reset"||e.removeAttribute("value"),t!=null?Ju(e,p,ln(t)):a!=null?Ju(e,p,ln(a)):l!=null&&e.removeAttribute("value"),o==null&&c!=null&&(e.defaultChecked=!!c),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.name=""+ln(x):e.removeAttribute("name")}function Ah(e,t,a,l,o,c,p,x){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),t!=null||a!=null){if(!(c!=="submit"&&c!=="reset"||t!=null)){Pu(e);return}a=a!=null?""+ln(a):"",t=t!=null?""+ln(t):a,x||t===e.value||(e.value=t),e.defaultValue=t}l=l??o,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=x?e.checked:!!l,e.defaultChecked=!!l,p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(e.name=p),Pu(e)}function Ju(e,t,a){t==="number"&&Zr(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function ul(e,t,a,l){if(e=e.options,t){t={};for(var o=0;o<a.length;o++)t["$"+a[o]]=!0;for(a=0;a<e.length;a++)o=t.hasOwnProperty("$"+e[a].value),e[a].selected!==o&&(e[a].selected=o),o&&l&&(e[a].defaultSelected=!0)}else{for(a=""+ln(a),t=null,o=0;o<e.length;o++){if(e[o].value===a){e[o].selected=!0,l&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Oh(e,t,a){if(t!=null&&(t=""+ln(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+ln(a):""}function zh(e,t,a,l){if(t==null){if(l!=null){if(a!=null)throw Error(r(92));if(he(l)){if(1<l.length)throw Error(r(93));l=l[0]}a=l}a==null&&(a=""),t=a}a=ln(t),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l),Pu(e)}function cl(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Sb=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Dh(e,t,a){var l=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,a):typeof a!="number"||a===0||Sb.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Uh(e,t,a){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,a!=null){for(var l in a)!a.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var o in t)l=t[o],t.hasOwnProperty(o)&&a[o]!==l&&Dh(e,o,l)}else for(var c in t)t.hasOwnProperty(c)&&Dh(e,c,t[c])}function Fu(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var jb=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Rb=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Jr(e){return Rb.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Vn(){}var Iu=null;function $u(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var fl=null,dl=null;function Lh(e){var t=il(e);if(t&&(e=t.stateNode)){var a=e[At]||null;e:switch(e=t.stateNode,t.type){case"input":if(Zu(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+rn(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var l=a[t];if(l!==e&&l.form===e.form){var o=l[At]||null;if(!o)throw Error(r(90));Zu(l,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<a.length;t++)l=a[t],l.form===e.form&&Mh(l)}break e;case"textarea":Oh(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&ul(e,!!a.multiple,t,!1)}}}var Wu=!1;function kh(e,t,a){if(Wu)return e(t,a);Wu=!0;try{var l=e(t);return l}finally{if(Wu=!1,(fl!==null||dl!==null)&&(ko(),fl&&(t=fl,e=dl,dl=fl=null,Lh(t),e)))for(t=0;t<e.length;t++)Lh(e[t])}}function ji(e,t){var a=e.stateNode;if(a===null)return null;var l=a[At]||null;if(l===null)return null;a=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(r(231,t,typeof a));return a}var Kn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ec=!1;if(Kn)try{var Ri={};Object.defineProperty(Ri,"passive",{get:function(){ec=!0}}),window.addEventListener("test",Ri,Ri),window.removeEventListener("test",Ri,Ri)}catch{ec=!1}var va=null,tc=null,Fr=null;function Bh(){if(Fr)return Fr;var e,t=tc,a=t.length,l,o="value"in va?va.value:va.textContent,c=o.length;for(e=0;e<a&&t[e]===o[e];e++);var p=a-e;for(l=1;l<=p&&t[a-l]===o[c-l];l++);return Fr=o.slice(e,1<l?1-l:void 0)}function Ir(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function $r(){return!0}function qh(){return!1}function Ot(e){function t(a,l,o,c,p){this._reactName=a,this._targetInst=o,this.type=l,this.nativeEvent=c,this.target=p,this.currentTarget=null;for(var x in e)e.hasOwnProperty(x)&&(a=e[x],this[x]=a?a(c):c[x]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?$r:qh,this.isPropagationStopped=qh,this}return v(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=$r)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=$r)},persist:function(){},isPersistent:$r}),t}var hs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Wr=Ot(hs),_i=v({},hs,{view:0,detail:0}),_b=Ot(_i),nc,ac,Ti,eo=v({},_i,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:lc,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ti&&(Ti&&e.type==="mousemove"?(nc=e.screenX-Ti.screenX,ac=e.screenY-Ti.screenY):ac=nc=0,Ti=e),nc)},movementY:function(e){return"movementY"in e?e.movementY:ac}}),Hh=Ot(eo),Tb=v({},eo,{dataTransfer:0}),wb=Ot(Tb),Eb=v({},_i,{relatedTarget:0}),sc=Ot(Eb),Cb=v({},hs,{animationName:0,elapsedTime:0,pseudoElement:0}),Nb=Ot(Cb),Mb=v({},hs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Ab=Ot(Mb),Ob=v({},hs,{data:0}),Gh=Ot(Ob),zb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Db={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Ub={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Lb(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Ub[e])?!!t[e]:!1}function lc(){return Lb}var kb=v({},_i,{key:function(e){if(e.key){var t=zb[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ir(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Db[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:lc,charCode:function(e){return e.type==="keypress"?Ir(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ir(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Bb=Ot(kb),qb=v({},eo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Qh=Ot(qb),Hb=v({},_i,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:lc}),Gb=Ot(Hb),Qb=v({},hs,{propertyName:0,elapsedTime:0,pseudoElement:0}),Yb=Ot(Qb),Vb=v({},eo,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Kb=Ot(Vb),Xb=v({},hs,{newState:0,oldState:0}),Pb=Ot(Xb),Zb=[9,13,27,32],ic=Kn&&"CompositionEvent"in window,wi=null;Kn&&"documentMode"in document&&(wi=document.documentMode);var Jb=Kn&&"TextEvent"in window&&!wi,Yh=Kn&&(!ic||wi&&8<wi&&11>=wi),Vh=" ",Kh=!1;function Xh(e,t){switch(e){case"keyup":return Zb.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ph(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var hl=!1;function Fb(e,t){switch(e){case"compositionend":return Ph(t);case"keypress":return t.which!==32?null:(Kh=!0,Vh);case"textInput":return e=t.data,e===Vh&&Kh?null:e;default:return null}}function Ib(e,t){if(hl)return e==="compositionend"||!ic&&Xh(e,t)?(e=Bh(),Fr=tc=va=null,hl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Yh&&t.locale!=="ko"?null:t.data;default:return null}}var $b={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Zh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!$b[e.type]:t==="textarea"}function Jh(e,t,a,l){fl?dl?dl.push(l):dl=[l]:fl=l,t=Vo(t,"onChange"),0<t.length&&(a=new Wr("onChange","change",null,a,l),e.push({event:a,listeners:t}))}var Ei=null,Ci=null;function Wb(e){Ap(e,0)}function to(e){var t=Si(e);if(Mh(t))return e}function Fh(e,t){if(e==="change")return t}var Ih=!1;if(Kn){var rc;if(Kn){var oc="oninput"in document;if(!oc){var $h=document.createElement("div");$h.setAttribute("oninput","return;"),oc=typeof $h.oninput=="function"}rc=oc}else rc=!1;Ih=rc&&(!document.documentMode||9<document.documentMode)}function Wh(){Ei&&(Ei.detachEvent("onpropertychange",em),Ci=Ei=null)}function em(e){if(e.propertyName==="value"&&to(Ci)){var t=[];Jh(t,Ci,e,$u(e)),kh(Wb,t)}}function ex(e,t,a){e==="focusin"?(Wh(),Ei=t,Ci=a,Ei.attachEvent("onpropertychange",em)):e==="focusout"&&Wh()}function tx(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return to(Ci)}function nx(e,t){if(e==="click")return to(t)}function ax(e,t){if(e==="input"||e==="change")return to(t)}function sx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Pt=typeof Object.is=="function"?Object.is:sx;function Ni(e,t){if(Pt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),l=Object.keys(t);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var o=a[l];if(!cs.call(t,o)||!Pt(e[o],t[o]))return!1}return!0}function tm(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function nm(e,t){var a=tm(e);e=0;for(var l;a;){if(a.nodeType===3){if(l=e+a.textContent.length,e<=t&&l>=t)return{node:a,offset:t-e};e=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=tm(a)}}function am(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?am(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function sm(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Zr(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=Zr(e.document)}return t}function uc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var lx=Kn&&"documentMode"in document&&11>=document.documentMode,ml=null,cc=null,Mi=null,fc=!1;function lm(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;fc||ml==null||ml!==Zr(l)||(l=ml,"selectionStart"in l&&uc(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Mi&&Ni(Mi,l)||(Mi=l,l=Vo(cc,"onSelect"),0<l.length&&(t=new Wr("onSelect","select",null,t,a),e.push({event:t,listeners:l}),t.target=ml)))}function ms(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var yl={animationend:ms("Animation","AnimationEnd"),animationiteration:ms("Animation","AnimationIteration"),animationstart:ms("Animation","AnimationStart"),transitionrun:ms("Transition","TransitionRun"),transitionstart:ms("Transition","TransitionStart"),transitioncancel:ms("Transition","TransitionCancel"),transitionend:ms("Transition","TransitionEnd")},dc={},im={};Kn&&(im=document.createElement("div").style,"AnimationEvent"in window||(delete yl.animationend.animation,delete yl.animationiteration.animation,delete yl.animationstart.animation),"TransitionEvent"in window||delete yl.transitionend.transition);function ys(e){if(dc[e])return dc[e];if(!yl[e])return e;var t=yl[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in im)return dc[e]=t[a];return e}var rm=ys("animationend"),om=ys("animationiteration"),um=ys("animationstart"),ix=ys("transitionrun"),rx=ys("transitionstart"),ox=ys("transitioncancel"),cm=ys("transitionend"),fm=new Map,hc="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");hc.push("scrollEnd");function jn(e,t){fm.set(e,t),ds(t,[e])}var no=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},on=[],pl=0,mc=0;function ao(){for(var e=pl,t=mc=pl=0;t<e;){var a=on[t];on[t++]=null;var l=on[t];on[t++]=null;var o=on[t];on[t++]=null;var c=on[t];if(on[t++]=null,l!==null&&o!==null){var p=l.pending;p===null?o.next=o:(o.next=p.next,p.next=o),l.pending=o}c!==0&&dm(a,o,c)}}function so(e,t,a,l){on[pl++]=e,on[pl++]=t,on[pl++]=a,on[pl++]=l,mc|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function yc(e,t,a,l){return so(e,t,a,l),lo(e)}function ps(e,t){return so(e,null,null,t),lo(e)}function dm(e,t,a){e.lanes|=a;var l=e.alternate;l!==null&&(l.lanes|=a);for(var o=!1,c=e.return;c!==null;)c.childLanes|=a,l=c.alternate,l!==null&&(l.childLanes|=a),c.tag===22&&(e=c.stateNode,e===null||e._visibility&1||(o=!0)),e=c,c=c.return;return e.tag===3?(c=e.stateNode,o&&t!==null&&(o=31-Xt(a),e=c.hiddenUpdates,l=e[o],l===null?e[o]=[t]:l.push(t),t.lane=a|536870912),c):null}function lo(e){if(50<$i)throw $i=0,Tf=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var gl={};function ux(e,t,a,l){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Zt(e,t,a,l){return new ux(e,t,a,l)}function pc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Xn(e,t){var a=e.alternate;return a===null?(a=Zt(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function hm(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function io(e,t,a,l,o,c){var p=0;if(l=e,typeof e=="function")pc(e)&&(p=1);else if(typeof e=="string")p=m1(e,a,se.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case V:return e=Zt(31,a,t,o),e.elementType=V,e.lanes=c,e;case w:return gs(a.children,o,c,t);case R:p=8,o|=24;break;case U:return e=Zt(12,a,t,o|2),e.elementType=U,e.lanes=c,e;case Q:return e=Zt(13,a,t,o),e.elementType=Q,e.lanes=c,e;case D:return e=Zt(19,a,t,o),e.elementType=D,e.lanes=c,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case H:p=10;break e;case k:p=9;break e;case M:p=11;break e;case O:p=14;break e;case A:p=16,l=null;break e}p=29,a=Error(r(130,e===null?"null":typeof e,"")),l=null}return t=Zt(p,a,t,o),t.elementType=e,t.type=l,t.lanes=c,t}function gs(e,t,a,l){return e=Zt(7,e,l,t),e.lanes=a,e}function gc(e,t,a){return e=Zt(6,e,null,t),e.lanes=a,e}function mm(e){var t=Zt(18,null,null,0);return t.stateNode=e,t}function vc(e,t,a){return t=Zt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var ym=new WeakMap;function un(e,t){if(typeof e=="object"&&e!==null){var a=ym.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Qn(t)},ym.set(e,t),t)}return{value:e,source:t,stack:Qn(t)}}var vl=[],bl=0,ro=null,Ai=0,cn=[],fn=0,ba=null,Mn=1,An="";function Pn(e,t){vl[bl++]=Ai,vl[bl++]=ro,ro=e,Ai=t}function pm(e,t,a){cn[fn++]=Mn,cn[fn++]=An,cn[fn++]=ba,ba=e;var l=Mn;e=An;var o=32-Xt(l)-1;l&=~(1<<o),a+=1;var c=32-Xt(t)+o;if(30<c){var p=o-o%5;c=(l&(1<<p)-1).toString(32),l>>=p,o-=p,Mn=1<<32-Xt(t)+o|a<<o|l,An=c+e}else Mn=1<<c|a<<o|l,An=e}function bc(e){e.return!==null&&(Pn(e,1),pm(e,1,0))}function xc(e){for(;e===ro;)ro=vl[--bl],vl[bl]=null,Ai=vl[--bl],vl[bl]=null;for(;e===ba;)ba=cn[--fn],cn[fn]=null,An=cn[--fn],cn[fn]=null,Mn=cn[--fn],cn[fn]=null}function gm(e,t){cn[fn++]=Mn,cn[fn++]=An,cn[fn++]=ba,Mn=t.id,An=t.overflow,ba=e}var gt=null,Xe=null,Ne=!1,xa=null,dn=!1,Sc=Error(r(519));function Sa(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Oi(un(t,e)),Sc}function vm(e){var t=e.stateNode,a=e.type,l=e.memoizedProps;switch(t[pt]=e,t[At]=l,a){case"dialog":Te("cancel",t),Te("close",t);break;case"iframe":case"object":case"embed":Te("load",t);break;case"video":case"audio":for(a=0;a<er.length;a++)Te(er[a],t);break;case"source":Te("error",t);break;case"img":case"image":case"link":Te("error",t),Te("load",t);break;case"details":Te("toggle",t);break;case"input":Te("invalid",t),Ah(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Te("invalid",t);break;case"textarea":Te("invalid",t),zh(t,l.value,l.defaultValue,l.children)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||l.suppressHydrationWarning===!0||Up(t.textContent,a)?(l.popover!=null&&(Te("beforetoggle",t),Te("toggle",t)),l.onScroll!=null&&Te("scroll",t),l.onScrollEnd!=null&&Te("scrollend",t),l.onClick!=null&&(t.onclick=Vn),t=!0):t=!1,t||Sa(e,!0)}function bm(e){for(gt=e.return;gt;)switch(gt.tag){case 5:case 31:case 13:dn=!1;return;case 27:case 3:dn=!0;return;default:gt=gt.return}}function xl(e){if(e!==gt)return!1;if(!Ne)return bm(e),Ne=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Hf(e.type,e.memoizedProps)),a=!a),a&&Xe&&Sa(e),bm(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Xe=Vp(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Xe=Vp(e)}else t===27?(t=Xe,Ua(e.type)?(e=Kf,Kf=null,Xe=e):Xe=t):Xe=gt?mn(e.stateNode.nextSibling):null;return!0}function vs(){Xe=gt=null,Ne=!1}function jc(){var e=xa;return e!==null&&(Lt===null?Lt=e:Lt.push.apply(Lt,e),xa=null),e}function Oi(e){xa===null?xa=[e]:xa.push(e)}var Rc=C(null),bs=null,Zn=null;function ja(e,t,a){ae(Rc,t._currentValue),t._currentValue=a}function Jn(e){e._currentValue=Rc.current,F(Rc)}function _c(e,t,a){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===a)break;e=e.return}}function Tc(e,t,a,l){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var c=o.dependencies;if(c!==null){var p=o.child;c=c.firstContext;e:for(;c!==null;){var x=c;c=o;for(var T=0;T<t.length;T++)if(x.context===t[T]){c.lanes|=a,x=c.alternate,x!==null&&(x.lanes|=a),_c(c.return,a,e),l||(p=null);break e}c=x.next}}else if(o.tag===18){if(p=o.return,p===null)throw Error(r(341));p.lanes|=a,c=p.alternate,c!==null&&(c.lanes|=a),_c(p,a,e),p=null}else p=o.child;if(p!==null)p.return=o;else for(p=o;p!==null;){if(p===e){p=null;break}if(o=p.sibling,o!==null){o.return=p.return,p=o;break}p=p.return}o=p}}function Sl(e,t,a,l){e=null;for(var o=t,c=!1;o!==null;){if(!c){if((o.flags&524288)!==0)c=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var p=o.alternate;if(p===null)throw Error(r(387));if(p=p.memoizedProps,p!==null){var x=o.type;Pt(o.pendingProps.value,p.value)||(e!==null?e.push(x):e=[x])}}else if(o===Re.current){if(p=o.alternate,p===null)throw Error(r(387));p.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(lr):e=[lr])}o=o.return}e!==null&&Tc(t,e,a,l),t.flags|=262144}function oo(e){for(e=e.firstContext;e!==null;){if(!Pt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function xs(e){bs=e,Zn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function vt(e){return xm(bs,e)}function uo(e,t){return bs===null&&xs(e),xm(e,t)}function xm(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Zn===null){if(e===null)throw Error(r(308));Zn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Zn=Zn.next=t;return a}var cx=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},fx=n.unstable_scheduleCallback,dx=n.unstable_NormalPriority,lt={$$typeof:H,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function wc(){return{controller:new cx,data:new Map,refCount:0}}function zi(e){e.refCount--,e.refCount===0&&fx(dx,function(){e.controller.abort()})}var Di=null,Ec=0,jl=0,Rl=null;function hx(e,t){if(Di===null){var a=Di=[];Ec=0,jl=Af(),Rl={status:"pending",value:void 0,then:function(l){a.push(l)}}}return Ec++,t.then(Sm,Sm),t}function Sm(){if(--Ec===0&&Di!==null){Rl!==null&&(Rl.status="fulfilled");var e=Di;Di=null,jl=0,Rl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function mx(e,t){var a=[],l={status:"pending",value:null,reason:null,then:function(o){a.push(o)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var o=0;o<a.length;o++)(0,a[o])(t)},function(o){for(l.status="rejected",l.reason=o,o=0;o<a.length;o++)(0,a[o])(void 0)}),l}var jm=L.S;L.S=function(e,t){lp=St(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&hx(e,t),jm!==null&&jm(e,t)};var Ss=C(null);function Cc(){var e=Ss.current;return e!==null?e:Ke.pooledCache}function co(e,t){t===null?ae(Ss,Ss.current):ae(Ss,t.pool)}function Rm(){var e=Cc();return e===null?null:{parent:lt._currentValue,pool:e}}var _l=Error(r(460)),Nc=Error(r(474)),fo=Error(r(542)),ho={then:function(){}};function _m(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Tm(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Vn,Vn),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Em(e),e;default:if(typeof t.status=="string")t.then(Vn,Vn);else{if(e=Ke,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var o=t;o.status="fulfilled",o.value=l}},function(l){if(t.status==="pending"){var o=t;o.status="rejected",o.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Em(e),e}throw Rs=t,_l}}function js(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Rs=a,_l):a}}var Rs=null;function wm(){if(Rs===null)throw Error(r(459));var e=Rs;return Rs=null,e}function Em(e){if(e===_l||e===fo)throw Error(r(483))}var Tl=null,Ui=0;function mo(e){var t=Ui;return Ui+=1,Tl===null&&(Tl=[]),Tm(Tl,e,t)}function Li(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function yo(e,t){throw t.$$typeof===S?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Cm(e){function t(z,N){if(e){var B=z.deletions;B===null?(z.deletions=[N],z.flags|=16):B.push(N)}}function a(z,N){if(!e)return null;for(;N!==null;)t(z,N),N=N.sibling;return null}function l(z){for(var N=new Map;z!==null;)z.key!==null?N.set(z.key,z):N.set(z.index,z),z=z.sibling;return N}function o(z,N){return z=Xn(z,N),z.index=0,z.sibling=null,z}function c(z,N,B){return z.index=B,e?(B=z.alternate,B!==null?(B=B.index,B<N?(z.flags|=67108866,N):B):(z.flags|=67108866,N)):(z.flags|=1048576,N)}function p(z){return e&&z.alternate===null&&(z.flags|=67108866),z}function x(z,N,B,J){return N===null||N.tag!==6?(N=gc(B,z.mode,J),N.return=z,N):(N=o(N,B),N.return=z,N)}function T(z,N,B,J){var ye=B.type;return ye===w?P(z,N,B.props.children,J,B.key):N!==null&&(N.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===A&&js(ye)===N.type)?(N=o(N,B.props),Li(N,B),N.return=z,N):(N=io(B.type,B.key,B.props,null,z.mode,J),Li(N,B),N.return=z,N)}function q(z,N,B,J){return N===null||N.tag!==4||N.stateNode.containerInfo!==B.containerInfo||N.stateNode.implementation!==B.implementation?(N=vc(B,z.mode,J),N.return=z,N):(N=o(N,B.children||[]),N.return=z,N)}function P(z,N,B,J,ye){return N===null||N.tag!==7?(N=gs(B,z.mode,J,ye),N.return=z,N):(N=o(N,B),N.return=z,N)}function I(z,N,B){if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return N=gc(""+N,z.mode,B),N.return=z,N;if(typeof N=="object"&&N!==null){switch(N.$$typeof){case j:return B=io(N.type,N.key,N.props,null,z.mode,B),Li(B,N),B.return=z,B;case _:return N=vc(N,z.mode,B),N.return=z,N;case A:return N=js(N),I(z,N,B)}if(he(N)||Z(N))return N=gs(N,z.mode,B,null),N.return=z,N;if(typeof N.then=="function")return I(z,mo(N),B);if(N.$$typeof===H)return I(z,uo(z,N),B);yo(z,N)}return null}function G(z,N,B,J){var ye=N!==null?N.key:null;if(typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint")return ye!==null?null:x(z,N,""+B,J);if(typeof B=="object"&&B!==null){switch(B.$$typeof){case j:return B.key===ye?T(z,N,B,J):null;case _:return B.key===ye?q(z,N,B,J):null;case A:return B=js(B),G(z,N,B,J)}if(he(B)||Z(B))return ye!==null?null:P(z,N,B,J,null);if(typeof B.then=="function")return G(z,N,mo(B),J);if(B.$$typeof===H)return G(z,N,uo(z,B),J);yo(z,B)}return null}function Y(z,N,B,J,ye){if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return z=z.get(B)||null,x(N,z,""+J,ye);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case j:return z=z.get(J.key===null?B:J.key)||null,T(N,z,J,ye);case _:return z=z.get(J.key===null?B:J.key)||null,q(N,z,J,ye);case A:return J=js(J),Y(z,N,B,J,ye)}if(he(J)||Z(J))return z=z.get(B)||null,P(N,z,J,ye,null);if(typeof J.then=="function")return Y(z,N,B,mo(J),ye);if(J.$$typeof===H)return Y(z,N,B,uo(N,J),ye);yo(N,J)}return null}function ue(z,N,B,J){for(var ye=null,Ae=null,fe=N,xe=N=0,Ee=null;fe!==null&&xe<B.length;xe++){fe.index>xe?(Ee=fe,fe=null):Ee=fe.sibling;var Oe=G(z,fe,B[xe],J);if(Oe===null){fe===null&&(fe=Ee);break}e&&fe&&Oe.alternate===null&&t(z,fe),N=c(Oe,N,xe),Ae===null?ye=Oe:Ae.sibling=Oe,Ae=Oe,fe=Ee}if(xe===B.length)return a(z,fe),Ne&&Pn(z,xe),ye;if(fe===null){for(;xe<B.length;xe++)fe=I(z,B[xe],J),fe!==null&&(N=c(fe,N,xe),Ae===null?ye=fe:Ae.sibling=fe,Ae=fe);return Ne&&Pn(z,xe),ye}for(fe=l(fe);xe<B.length;xe++)Ee=Y(fe,z,xe,B[xe],J),Ee!==null&&(e&&Ee.alternate!==null&&fe.delete(Ee.key===null?xe:Ee.key),N=c(Ee,N,xe),Ae===null?ye=Ee:Ae.sibling=Ee,Ae=Ee);return e&&fe.forEach(function(Ha){return t(z,Ha)}),Ne&&Pn(z,xe),ye}function pe(z,N,B,J){if(B==null)throw Error(r(151));for(var ye=null,Ae=null,fe=N,xe=N=0,Ee=null,Oe=B.next();fe!==null&&!Oe.done;xe++,Oe=B.next()){fe.index>xe?(Ee=fe,fe=null):Ee=fe.sibling;var Ha=G(z,fe,Oe.value,J);if(Ha===null){fe===null&&(fe=Ee);break}e&&fe&&Ha.alternate===null&&t(z,fe),N=c(Ha,N,xe),Ae===null?ye=Ha:Ae.sibling=Ha,Ae=Ha,fe=Ee}if(Oe.done)return a(z,fe),Ne&&Pn(z,xe),ye;if(fe===null){for(;!Oe.done;xe++,Oe=B.next())Oe=I(z,Oe.value,J),Oe!==null&&(N=c(Oe,N,xe),Ae===null?ye=Oe:Ae.sibling=Oe,Ae=Oe);return Ne&&Pn(z,xe),ye}for(fe=l(fe);!Oe.done;xe++,Oe=B.next())Oe=Y(fe,z,xe,Oe.value,J),Oe!==null&&(e&&Oe.alternate!==null&&fe.delete(Oe.key===null?xe:Oe.key),N=c(Oe,N,xe),Ae===null?ye=Oe:Ae.sibling=Oe,Ae=Oe);return e&&fe.forEach(function(T1){return t(z,T1)}),Ne&&Pn(z,xe),ye}function Qe(z,N,B,J){if(typeof B=="object"&&B!==null&&B.type===w&&B.key===null&&(B=B.props.children),typeof B=="object"&&B!==null){switch(B.$$typeof){case j:e:{for(var ye=B.key;N!==null;){if(N.key===ye){if(ye=B.type,ye===w){if(N.tag===7){a(z,N.sibling),J=o(N,B.props.children),J.return=z,z=J;break e}}else if(N.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===A&&js(ye)===N.type){a(z,N.sibling),J=o(N,B.props),Li(J,B),J.return=z,z=J;break e}a(z,N);break}else t(z,N);N=N.sibling}B.type===w?(J=gs(B.props.children,z.mode,J,B.key),J.return=z,z=J):(J=io(B.type,B.key,B.props,null,z.mode,J),Li(J,B),J.return=z,z=J)}return p(z);case _:e:{for(ye=B.key;N!==null;){if(N.key===ye)if(N.tag===4&&N.stateNode.containerInfo===B.containerInfo&&N.stateNode.implementation===B.implementation){a(z,N.sibling),J=o(N,B.children||[]),J.return=z,z=J;break e}else{a(z,N);break}else t(z,N);N=N.sibling}J=vc(B,z.mode,J),J.return=z,z=J}return p(z);case A:return B=js(B),Qe(z,N,B,J)}if(he(B))return ue(z,N,B,J);if(Z(B)){if(ye=Z(B),typeof ye!="function")throw Error(r(150));return B=ye.call(B),pe(z,N,B,J)}if(typeof B.then=="function")return Qe(z,N,mo(B),J);if(B.$$typeof===H)return Qe(z,N,uo(z,B),J);yo(z,B)}return typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint"?(B=""+B,N!==null&&N.tag===6?(a(z,N.sibling),J=o(N,B),J.return=z,z=J):(a(z,N),J=gc(B,z.mode,J),J.return=z,z=J),p(z)):a(z,N)}return function(z,N,B,J){try{Ui=0;var ye=Qe(z,N,B,J);return Tl=null,ye}catch(fe){if(fe===_l||fe===fo)throw fe;var Ae=Zt(29,fe,null,z.mode);return Ae.lanes=J,Ae.return=z,Ae}finally{}}}var _s=Cm(!0),Nm=Cm(!1),Ra=!1;function Mc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ac(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function _a(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ta(e,t,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(ze&2)!==0){var o=l.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),l.pending=t,t=lo(e),dm(e,null,a),t}return so(e,l,t,a),lo(e)}function ki(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,xh(e,a)}}function Oc(e,t){var a=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var o=null,c=null;if(a=a.firstBaseUpdate,a!==null){do{var p={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};c===null?o=c=p:c=c.next=p,a=a.next}while(a!==null);c===null?o=c=t:c=c.next=t}else o=c=t;a={baseState:l.baseState,firstBaseUpdate:o,lastBaseUpdate:c,shared:l.shared,callbacks:l.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var zc=!1;function Bi(){if(zc){var e=Rl;if(e!==null)throw e}}function qi(e,t,a,l){zc=!1;var o=e.updateQueue;Ra=!1;var c=o.firstBaseUpdate,p=o.lastBaseUpdate,x=o.shared.pending;if(x!==null){o.shared.pending=null;var T=x,q=T.next;T.next=null,p===null?c=q:p.next=q,p=T;var P=e.alternate;P!==null&&(P=P.updateQueue,x=P.lastBaseUpdate,x!==p&&(x===null?P.firstBaseUpdate=q:x.next=q,P.lastBaseUpdate=T))}if(c!==null){var I=o.baseState;p=0,P=q=T=null,x=c;do{var G=x.lane&-536870913,Y=G!==x.lane;if(Y?(we&G)===G:(l&G)===G){G!==0&&G===jl&&(zc=!0),P!==null&&(P=P.next={lane:0,tag:x.tag,payload:x.payload,callback:null,next:null});e:{var ue=e,pe=x;G=t;var Qe=a;switch(pe.tag){case 1:if(ue=pe.payload,typeof ue=="function"){I=ue.call(Qe,I,G);break e}I=ue;break e;case 3:ue.flags=ue.flags&-65537|128;case 0:if(ue=pe.payload,G=typeof ue=="function"?ue.call(Qe,I,G):ue,G==null)break e;I=v({},I,G);break e;case 2:Ra=!0}}G=x.callback,G!==null&&(e.flags|=64,Y&&(e.flags|=8192),Y=o.callbacks,Y===null?o.callbacks=[G]:Y.push(G))}else Y={lane:G,tag:x.tag,payload:x.payload,callback:x.callback,next:null},P===null?(q=P=Y,T=I):P=P.next=Y,p|=G;if(x=x.next,x===null){if(x=o.shared.pending,x===null)break;Y=x,x=Y.next,Y.next=null,o.lastBaseUpdate=Y,o.shared.pending=null}}while(!0);P===null&&(T=I),o.baseState=T,o.firstBaseUpdate=q,o.lastBaseUpdate=P,c===null&&(o.shared.lanes=0),Ma|=p,e.lanes=p,e.memoizedState=I}}function Mm(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function Am(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Mm(a[e],t)}var wl=C(null),po=C(0);function Om(e,t){e=sa,ae(po,e),ae(wl,t),sa=e|t.baseLanes}function Dc(){ae(po,sa),ae(wl,wl.current)}function Uc(){sa=po.current,F(wl),F(po)}var Jt=C(null),hn=null;function wa(e){var t=e.alternate;ae(nt,nt.current&1),ae(Jt,e),hn===null&&(t===null||wl.current!==null||t.memoizedState!==null)&&(hn=e)}function Lc(e){ae(nt,nt.current),ae(Jt,e),hn===null&&(hn=e)}function zm(e){e.tag===22?(ae(nt,nt.current),ae(Jt,e),hn===null&&(hn=e)):Ea()}function Ea(){ae(nt,nt.current),ae(Jt,Jt.current)}function Ft(e){F(Jt),hn===e&&(hn=null),F(nt)}var nt=C(0);function go(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Yf(a)||Vf(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Fn=0,be=null,He=null,it=null,vo=!1,El=!1,Ts=!1,bo=0,Hi=0,Cl=null,yx=0;function $e(){throw Error(r(321))}function kc(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!Pt(e[a],t[a]))return!1;return!0}function Bc(e,t,a,l,o,c){return Fn=c,be=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,L.H=e===null||e.memoizedState===null?py:Wc,Ts=!1,c=a(l,o),Ts=!1,El&&(c=Um(t,a,l,o)),Dm(e),c}function Dm(e){L.H=Yi;var t=He!==null&&He.next!==null;if(Fn=0,it=He=be=null,vo=!1,Hi=0,Cl=null,t)throw Error(r(300));e===null||rt||(e=e.dependencies,e!==null&&oo(e)&&(rt=!0))}function Um(e,t,a,l){be=e;var o=0;do{if(El&&(Cl=null),Hi=0,El=!1,25<=o)throw Error(r(301));if(o+=1,it=He=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}L.H=gy,c=t(a,l)}while(El);return c}function px(){var e=L.H,t=e.useState()[0];return t=typeof t.then=="function"?Gi(t):t,e=e.useState()[0],(He!==null?He.memoizedState:null)!==e&&(be.flags|=1024),t}function qc(){var e=bo!==0;return bo=0,e}function Hc(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Gc(e){if(vo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}vo=!1}Fn=0,it=He=be=null,El=!1,Hi=bo=0,Cl=null}function Et(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return it===null?be.memoizedState=it=e:it=it.next=e,it}function at(){if(He===null){var e=be.alternate;e=e!==null?e.memoizedState:null}else e=He.next;var t=it===null?be.memoizedState:it.next;if(t!==null)it=t,He=e;else{if(e===null)throw be.alternate===null?Error(r(467)):Error(r(310));He=e,e={memoizedState:He.memoizedState,baseState:He.baseState,baseQueue:He.baseQueue,queue:He.queue,next:null},it===null?be.memoizedState=it=e:it=it.next=e}return it}function xo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Gi(e){var t=Hi;return Hi+=1,Cl===null&&(Cl=[]),e=Tm(Cl,e,t),t=be,(it===null?t.memoizedState:it.next)===null&&(t=t.alternate,L.H=t===null||t.memoizedState===null?py:Wc),e}function So(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Gi(e);if(e.$$typeof===H)return vt(e)}throw Error(r(438,String(e)))}function Qc(e){var t=null,a=be.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var l=be.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(o){return o.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=xo(),be.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),l=0;l<e;l++)a[l]=$;return t.index++,a}function In(e,t){return typeof t=="function"?t(e):t}function jo(e){var t=at();return Yc(t,He,e)}function Yc(e,t,a){var l=e.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=a;var o=e.baseQueue,c=l.pending;if(c!==null){if(o!==null){var p=o.next;o.next=c.next,c.next=p}t.baseQueue=o=c,l.pending=null}if(c=e.baseState,o===null)e.memoizedState=c;else{t=o.next;var x=p=null,T=null,q=t,P=!1;do{var I=q.lane&-536870913;if(I!==q.lane?(we&I)===I:(Fn&I)===I){var G=q.revertLane;if(G===0)T!==null&&(T=T.next={lane:0,revertLane:0,gesture:null,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null}),I===jl&&(P=!0);else if((Fn&G)===G){q=q.next,G===jl&&(P=!0);continue}else I={lane:0,revertLane:q.revertLane,gesture:null,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null},T===null?(x=T=I,p=c):T=T.next=I,be.lanes|=G,Ma|=G;I=q.action,Ts&&a(c,I),c=q.hasEagerState?q.eagerState:a(c,I)}else G={lane:I,revertLane:q.revertLane,gesture:q.gesture,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null},T===null?(x=T=G,p=c):T=T.next=G,be.lanes|=I,Ma|=I;q=q.next}while(q!==null&&q!==t);if(T===null?p=c:T.next=x,!Pt(c,e.memoizedState)&&(rt=!0,P&&(a=Rl,a!==null)))throw a;e.memoizedState=c,e.baseState=p,e.baseQueue=T,l.lastRenderedState=c}return o===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Vc(e){var t=at(),a=t.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=e;var l=a.dispatch,o=a.pending,c=t.memoizedState;if(o!==null){a.pending=null;var p=o=o.next;do c=e(c,p.action),p=p.next;while(p!==o);Pt(c,t.memoizedState)||(rt=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),a.lastRenderedState=c}return[c,l]}function Lm(e,t,a){var l=be,o=at(),c=Ne;if(c){if(a===void 0)throw Error(r(407));a=a()}else a=t();var p=!Pt((He||o).memoizedState,a);if(p&&(o.memoizedState=a,rt=!0),o=o.queue,Pc(qm.bind(null,l,o,e),[e]),o.getSnapshot!==t||p||it!==null&&it.memoizedState.tag&1){if(l.flags|=2048,Nl(9,{destroy:void 0},Bm.bind(null,l,o,a,t),null),Ke===null)throw Error(r(349));c||(Fn&127)!==0||km(l,t,a)}return a}function km(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=be.updateQueue,t===null?(t=xo(),be.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Bm(e,t,a,l){t.value=a,t.getSnapshot=l,Hm(t)&&Gm(e)}function qm(e,t,a){return a(function(){Hm(t)&&Gm(e)})}function Hm(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!Pt(e,a)}catch{return!0}}function Gm(e){var t=ps(e,2);t!==null&&kt(t,e,2)}function Kc(e){var t=Et();if(typeof e=="function"){var a=e;if(e=a(),Ts){pa(!0);try{a()}finally{pa(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:In,lastRenderedState:e},t}function Qm(e,t,a,l){return e.baseState=a,Yc(e,He,typeof l=="function"?l:In)}function gx(e,t,a,l,o){if(To(e))throw Error(r(485));if(e=t.action,e!==null){var c={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(p){c.listeners.push(p)}};L.T!==null?a(!0):c.isTransition=!1,l(c),a=t.pending,a===null?(c.next=t.pending=c,Ym(t,c)):(c.next=a.next,t.pending=a.next=c)}}function Ym(e,t){var a=t.action,l=t.payload,o=e.state;if(t.isTransition){var c=L.T,p={};L.T=p;try{var x=a(o,l),T=L.S;T!==null&&T(p,x),Vm(e,t,x)}catch(q){Xc(e,t,q)}finally{c!==null&&p.types!==null&&(c.types=p.types),L.T=c}}else try{c=a(o,l),Vm(e,t,c)}catch(q){Xc(e,t,q)}}function Vm(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){Km(e,t,l)},function(l){return Xc(e,t,l)}):Km(e,t,a)}function Km(e,t,a){t.status="fulfilled",t.value=a,Xm(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Ym(e,a)))}function Xc(e,t,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=a,Xm(t),t=t.next;while(t!==l)}e.action=null}function Xm(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Pm(e,t){return t}function Zm(e,t){if(Ne){var a=Ke.formState;if(a!==null){e:{var l=be;if(Ne){if(Xe){t:{for(var o=Xe,c=dn;o.nodeType!==8;){if(!c){o=null;break t}if(o=mn(o.nextSibling),o===null){o=null;break t}}c=o.data,o=c==="F!"||c==="F"?o:null}if(o){Xe=mn(o.nextSibling),l=o.data==="F!";break e}}Sa(l)}l=!1}l&&(t=a[0])}}return a=Et(),a.memoizedState=a.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pm,lastRenderedState:t},a.queue=l,a=hy.bind(null,be,l),l.dispatch=a,l=Kc(!1),c=$c.bind(null,be,!1,l.queue),l=Et(),o={state:t,dispatch:null,action:e,pending:null},l.queue=o,a=gx.bind(null,be,o,c,a),o.dispatch=a,l.memoizedState=e,[t,a,!1]}function Jm(e){var t=at();return Fm(t,He,e)}function Fm(e,t,a){if(t=Yc(e,t,Pm)[0],e=jo(In)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=Gi(t)}catch(p){throw p===_l?fo:p}else l=t;t=at();var o=t.queue,c=o.dispatch;return a!==t.memoizedState&&(be.flags|=2048,Nl(9,{destroy:void 0},vx.bind(null,o,a),null)),[l,c,e]}function vx(e,t){e.action=t}function Im(e){var t=at(),a=He;if(a!==null)return Fm(t,a,e);at(),t=t.memoizedState,a=at();var l=a.queue.dispatch;return a.memoizedState=e,[t,l,!1]}function Nl(e,t,a,l){return e={tag:e,create:a,deps:l,inst:t,next:null},t=be.updateQueue,t===null&&(t=xo(),be.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(l=a.next,a.next=e,e.next=l,t.lastEffect=e),e}function $m(){return at().memoizedState}function Ro(e,t,a,l){var o=Et();be.flags|=e,o.memoizedState=Nl(1|t,{destroy:void 0},a,l===void 0?null:l)}function _o(e,t,a,l){var o=at();l=l===void 0?null:l;var c=o.memoizedState.inst;He!==null&&l!==null&&kc(l,He.memoizedState.deps)?o.memoizedState=Nl(t,c,a,l):(be.flags|=e,o.memoizedState=Nl(1|t,c,a,l))}function Wm(e,t){Ro(8390656,8,e,t)}function Pc(e,t){_o(2048,8,e,t)}function bx(e){be.flags|=4;var t=be.updateQueue;if(t===null)t=xo(),be.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function ey(e){var t=at().memoizedState;return bx({ref:t,nextImpl:e}),function(){if((ze&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function ty(e,t){return _o(4,2,e,t)}function ny(e,t){return _o(4,4,e,t)}function ay(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function sy(e,t,a){a=a!=null?a.concat([e]):null,_o(4,4,ay.bind(null,t,e),a)}function Zc(){}function ly(e,t){var a=at();t=t===void 0?null:t;var l=a.memoizedState;return t!==null&&kc(t,l[1])?l[0]:(a.memoizedState=[e,t],e)}function iy(e,t){var a=at();t=t===void 0?null:t;var l=a.memoizedState;if(t!==null&&kc(t,l[1]))return l[0];if(l=e(),Ts){pa(!0);try{e()}finally{pa(!1)}}return a.memoizedState=[l,t],l}function Jc(e,t,a){return a===void 0||(Fn&1073741824)!==0&&(we&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=rp(),be.lanes|=e,Ma|=e,a)}function ry(e,t,a,l){return Pt(a,t)?a:wl.current!==null?(e=Jc(e,a,l),Pt(e,t)||(rt=!0),e):(Fn&42)===0||(Fn&1073741824)!==0&&(we&261930)===0?(rt=!0,e.memoizedState=a):(e=rp(),be.lanes|=e,Ma|=e,t)}function oy(e,t,a,l,o){var c=X.p;X.p=c!==0&&8>c?c:8;var p=L.T,x={};L.T=x,$c(e,!1,t,a);try{var T=o(),q=L.S;if(q!==null&&q(x,T),T!==null&&typeof T=="object"&&typeof T.then=="function"){var P=mx(T,l);Qi(e,t,P,Wt(e))}else Qi(e,t,l,Wt(e))}catch(I){Qi(e,t,{then:function(){},status:"rejected",reason:I},Wt())}finally{X.p=c,p!==null&&x.types!==null&&(p.types=x.types),L.T=p}}function xx(){}function Fc(e,t,a,l){if(e.tag!==5)throw Error(r(476));var o=uy(e).queue;oy(e,o,t,ce,a===null?xx:function(){return cy(e),a(l)})}function uy(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ce,baseState:ce,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:In,lastRenderedState:ce},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:In,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function cy(e){var t=uy(e);t.next===null&&(t=e.alternate.memoizedState),Qi(e,t.next.queue,{},Wt())}function Ic(){return vt(lr)}function fy(){return at().memoizedState}function dy(){return at().memoizedState}function Sx(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Wt();e=_a(a);var l=Ta(t,e,a);l!==null&&(kt(l,t,a),ki(l,t,a)),t={cache:wc()},e.payload=t;return}t=t.return}}function jx(e,t,a){var l=Wt();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},To(e)?my(t,a):(a=yc(e,t,a,l),a!==null&&(kt(a,e,l),yy(a,t,l)))}function hy(e,t,a){var l=Wt();Qi(e,t,a,l)}function Qi(e,t,a,l){var o={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(To(e))my(t,o);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var p=t.lastRenderedState,x=c(p,a);if(o.hasEagerState=!0,o.eagerState=x,Pt(x,p))return so(e,t,o,0),Ke===null&&ao(),!1}catch{}finally{}if(a=yc(e,t,o,l),a!==null)return kt(a,e,l),yy(a,t,l),!0}return!1}function $c(e,t,a,l){if(l={lane:2,revertLane:Af(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},To(e)){if(t)throw Error(r(479))}else t=yc(e,a,l,2),t!==null&&kt(t,e,2)}function To(e){var t=e.alternate;return e===be||t!==null&&t===be}function my(e,t){El=vo=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function yy(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,xh(e,a)}}var Yi={readContext:vt,use:So,useCallback:$e,useContext:$e,useEffect:$e,useImperativeHandle:$e,useLayoutEffect:$e,useInsertionEffect:$e,useMemo:$e,useReducer:$e,useRef:$e,useState:$e,useDebugValue:$e,useDeferredValue:$e,useTransition:$e,useSyncExternalStore:$e,useId:$e,useHostTransitionStatus:$e,useFormState:$e,useActionState:$e,useOptimistic:$e,useMemoCache:$e,useCacheRefresh:$e};Yi.useEffectEvent=$e;var py={readContext:vt,use:So,useCallback:function(e,t){return Et().memoizedState=[e,t===void 0?null:t],e},useContext:vt,useEffect:Wm,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Ro(4194308,4,ay.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Ro(4194308,4,e,t)},useInsertionEffect:function(e,t){Ro(4,2,e,t)},useMemo:function(e,t){var a=Et();t=t===void 0?null:t;var l=e();if(Ts){pa(!0);try{e()}finally{pa(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=Et();if(a!==void 0){var o=a(t);if(Ts){pa(!0);try{a(t)}finally{pa(!1)}}}else o=t;return l.memoizedState=l.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},l.queue=e,e=e.dispatch=jx.bind(null,be,e),[l.memoizedState,e]},useRef:function(e){var t=Et();return e={current:e},t.memoizedState=e},useState:function(e){e=Kc(e);var t=e.queue,a=hy.bind(null,be,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Zc,useDeferredValue:function(e,t){var a=Et();return Jc(a,e,t)},useTransition:function(){var e=Kc(!1);return e=oy.bind(null,be,e.queue,!0,!1),Et().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=be,o=Et();if(Ne){if(a===void 0)throw Error(r(407));a=a()}else{if(a=t(),Ke===null)throw Error(r(349));(we&127)!==0||km(l,t,a)}o.memoizedState=a;var c={value:a,getSnapshot:t};return o.queue=c,Wm(qm.bind(null,l,c,e),[e]),l.flags|=2048,Nl(9,{destroy:void 0},Bm.bind(null,l,c,a,t),null),a},useId:function(){var e=Et(),t=Ke.identifierPrefix;if(Ne){var a=An,l=Mn;a=(l&~(1<<32-Xt(l)-1)).toString(32)+a,t="_"+t+"R_"+a,a=bo++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=yx++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Ic,useFormState:Zm,useActionState:Zm,useOptimistic:function(e){var t=Et();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=$c.bind(null,be,!0,a),a.dispatch=t,[e,t]},useMemoCache:Qc,useCacheRefresh:function(){return Et().memoizedState=Sx.bind(null,be)},useEffectEvent:function(e){var t=Et(),a={impl:e};return t.memoizedState=a,function(){if((ze&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}},Wc={readContext:vt,use:So,useCallback:ly,useContext:vt,useEffect:Pc,useImperativeHandle:sy,useInsertionEffect:ty,useLayoutEffect:ny,useMemo:iy,useReducer:jo,useRef:$m,useState:function(){return jo(In)},useDebugValue:Zc,useDeferredValue:function(e,t){var a=at();return ry(a,He.memoizedState,e,t)},useTransition:function(){var e=jo(In)[0],t=at().memoizedState;return[typeof e=="boolean"?e:Gi(e),t]},useSyncExternalStore:Lm,useId:fy,useHostTransitionStatus:Ic,useFormState:Jm,useActionState:Jm,useOptimistic:function(e,t){var a=at();return Qm(a,He,e,t)},useMemoCache:Qc,useCacheRefresh:dy};Wc.useEffectEvent=ey;var gy={readContext:vt,use:So,useCallback:ly,useContext:vt,useEffect:Pc,useImperativeHandle:sy,useInsertionEffect:ty,useLayoutEffect:ny,useMemo:iy,useReducer:Vc,useRef:$m,useState:function(){return Vc(In)},useDebugValue:Zc,useDeferredValue:function(e,t){var a=at();return He===null?Jc(a,e,t):ry(a,He.memoizedState,e,t)},useTransition:function(){var e=Vc(In)[0],t=at().memoizedState;return[typeof e=="boolean"?e:Gi(e),t]},useSyncExternalStore:Lm,useId:fy,useHostTransitionStatus:Ic,useFormState:Im,useActionState:Im,useOptimistic:function(e,t){var a=at();return He!==null?Qm(a,He,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Qc,useCacheRefresh:dy};gy.useEffectEvent=ey;function ef(e,t,a,l){t=e.memoizedState,a=a(l,t),a=a==null?t:v({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var tf={enqueueSetState:function(e,t,a){e=e._reactInternals;var l=Wt(),o=_a(l);o.payload=t,a!=null&&(o.callback=a),t=Ta(e,o,l),t!==null&&(kt(t,e,l),ki(t,e,l))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var l=Wt(),o=_a(l);o.tag=1,o.payload=t,a!=null&&(o.callback=a),t=Ta(e,o,l),t!==null&&(kt(t,e,l),ki(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Wt(),l=_a(a);l.tag=2,t!=null&&(l.callback=t),t=Ta(e,l,a),t!==null&&(kt(t,e,a),ki(t,e,a))}};function vy(e,t,a,l,o,c,p){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,c,p):t.prototype&&t.prototype.isPureReactComponent?!Ni(a,l)||!Ni(o,c):!0}function by(e,t,a,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,l),t.state!==e&&tf.enqueueReplaceState(t,t.state,null)}function ws(e,t){var a=t;if("ref"in t){a={};for(var l in t)l!=="ref"&&(a[l]=t[l])}if(e=e.defaultProps){a===t&&(a=v({},a));for(var o in e)a[o]===void 0&&(a[o]=e[o])}return a}function xy(e){no(e)}function Sy(e){console.error(e)}function jy(e){no(e)}function wo(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Ry(e,t,a){try{var l=e.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function nf(e,t,a){return a=_a(a),a.tag=3,a.payload={element:null},a.callback=function(){wo(e,t)},a}function _y(e){return e=_a(e),e.tag=3,e}function Ty(e,t,a,l){var o=a.type.getDerivedStateFromError;if(typeof o=="function"){var c=l.value;e.payload=function(){return o(c)},e.callback=function(){Ry(t,a,l)}}var p=a.stateNode;p!==null&&typeof p.componentDidCatch=="function"&&(e.callback=function(){Ry(t,a,l),typeof o!="function"&&(Aa===null?Aa=new Set([this]):Aa.add(this));var x=l.stack;this.componentDidCatch(l.value,{componentStack:x!==null?x:""})})}function Rx(e,t,a,l,o){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=a.alternate,t!==null&&Sl(t,a,o,!0),a=Jt.current,a!==null){switch(a.tag){case 31:case 13:return hn===null?Bo():a.alternate===null&&We===0&&(We=3),a.flags&=-257,a.flags|=65536,a.lanes=o,l===ho?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([l]):t.add(l),Cf(e,l,o)),!1;case 22:return a.flags|=65536,l===ho?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([l]):a.add(l)),Cf(e,l,o)),!1}throw Error(r(435,a.tag))}return Cf(e,l,o),Bo(),!1}if(Ne)return t=Jt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,l!==Sc&&(e=Error(r(422),{cause:l}),Oi(un(e,a)))):(l!==Sc&&(t=Error(r(423),{cause:l}),Oi(un(t,a))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,l=un(l,a),o=nf(e.stateNode,l,o),Oc(e,o),We!==4&&(We=2)),!1;var c=Error(r(520),{cause:l});if(c=un(c,a),Ii===null?Ii=[c]:Ii.push(c),We!==4&&(We=2),t===null)return!0;l=un(l,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=o&-o,a.lanes|=e,e=nf(a.stateNode,l,e),Oc(a,e),!1;case 1:if(t=a.type,c=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(Aa===null||!Aa.has(c))))return a.flags|=65536,o&=-o,a.lanes|=o,o=_y(o),Ty(o,e,a,l),Oc(a,o),!1}a=a.return}while(a!==null);return!1}var af=Error(r(461)),rt=!1;function bt(e,t,a,l){t.child=e===null?Nm(t,null,a,l):_s(t,e.child,a,l)}function wy(e,t,a,l,o){a=a.render;var c=t.ref;if("ref"in l){var p={};for(var x in l)x!=="ref"&&(p[x]=l[x])}else p=l;return xs(t),l=Bc(e,t,a,p,c,o),x=qc(),e!==null&&!rt?(Hc(e,t,o),$n(e,t,o)):(Ne&&x&&bc(t),t.flags|=1,bt(e,t,l,o),t.child)}function Ey(e,t,a,l,o){if(e===null){var c=a.type;return typeof c=="function"&&!pc(c)&&c.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=c,Cy(e,t,c,l,o)):(e=io(a.type,null,l,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!df(e,o)){var p=c.memoizedProps;if(a=a.compare,a=a!==null?a:Ni,a(p,l)&&e.ref===t.ref)return $n(e,t,o)}return t.flags|=1,e=Xn(c,l),e.ref=t.ref,e.return=t,t.child=e}function Cy(e,t,a,l,o){if(e!==null){var c=e.memoizedProps;if(Ni(c,l)&&e.ref===t.ref)if(rt=!1,t.pendingProps=l=c,df(e,o))(e.flags&131072)!==0&&(rt=!0);else return t.lanes=e.lanes,$n(e,t,o)}return sf(e,t,a,l,o)}function Ny(e,t,a,l){var o=l.children,c=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(c=c!==null?c.baseLanes|a:a,e!==null){for(l=t.child=e.child,o=0;l!==null;)o=o|l.lanes|l.childLanes,l=l.sibling;l=o&~c}else l=0,t.child=null;return My(e,t,c,a,l)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&co(t,c!==null?c.cachePool:null),c!==null?Om(t,c):Dc(),zm(t);else return l=t.lanes=536870912,My(e,t,c!==null?c.baseLanes|a:a,a,l)}else c!==null?(co(t,c.cachePool),Om(t,c),Ea(),t.memoizedState=null):(e!==null&&co(t,null),Dc(),Ea());return bt(e,t,o,a),t.child}function Vi(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function My(e,t,a,l,o){var c=Cc();return c=c===null?null:{parent:lt._currentValue,pool:c},t.memoizedState={baseLanes:a,cachePool:c},e!==null&&co(t,null),Dc(),zm(t),e!==null&&Sl(e,t,l,!0),t.childLanes=o,null}function Eo(e,t){return t=No({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Ay(e,t,a){return _s(t,e.child,null,a),e=Eo(t,t.pendingProps),e.flags|=2,Ft(t),t.memoizedState=null,e}function _x(e,t,a){var l=t.pendingProps,o=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ne){if(l.mode==="hidden")return e=Eo(t,l),t.lanes=536870912,Vi(null,e);if(Lc(t),(e=Xe)?(e=Yp(e,dn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ba!==null?{id:Mn,overflow:An}:null,retryLane:536870912,hydrationErrors:null},a=mm(e),a.return=t,t.child=a,gt=t,Xe=null)):e=null,e===null)throw Sa(t);return t.lanes=536870912,null}return Eo(t,l)}var c=e.memoizedState;if(c!==null){var p=c.dehydrated;if(Lc(t),o)if(t.flags&256)t.flags&=-257,t=Ay(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(rt||Sl(e,t,a,!1),o=(a&e.childLanes)!==0,rt||o){if(l=Ke,l!==null&&(p=Sh(l,a),p!==0&&p!==c.retryLane))throw c.retryLane=p,ps(e,p),kt(l,e,p),af;Bo(),t=Ay(e,t,a)}else e=c.treeContext,Xe=mn(p.nextSibling),gt=t,Ne=!0,xa=null,dn=!1,e!==null&&gm(t,e),t=Eo(t,l),t.flags|=4096;return t}return e=Xn(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Co(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(r(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function sf(e,t,a,l,o){return xs(t),a=Bc(e,t,a,l,void 0,o),l=qc(),e!==null&&!rt?(Hc(e,t,o),$n(e,t,o)):(Ne&&l&&bc(t),t.flags|=1,bt(e,t,a,o),t.child)}function Oy(e,t,a,l,o,c){return xs(t),t.updateQueue=null,a=Um(t,l,a,o),Dm(e),l=qc(),e!==null&&!rt?(Hc(e,t,c),$n(e,t,c)):(Ne&&l&&bc(t),t.flags|=1,bt(e,t,a,c),t.child)}function zy(e,t,a,l,o){if(xs(t),t.stateNode===null){var c=gl,p=a.contextType;typeof p=="object"&&p!==null&&(c=vt(p)),c=new a(l,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=tf,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=l,c.state=t.memoizedState,c.refs={},Mc(t),p=a.contextType,c.context=typeof p=="object"&&p!==null?vt(p):gl,c.state=t.memoizedState,p=a.getDerivedStateFromProps,typeof p=="function"&&(ef(t,a,p,l),c.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(p=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),p!==c.state&&tf.enqueueReplaceState(c,c.state,null),qi(t,l,c,o),Bi(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){c=t.stateNode;var x=t.memoizedProps,T=ws(a,x);c.props=T;var q=c.context,P=a.contextType;p=gl,typeof P=="object"&&P!==null&&(p=vt(P));var I=a.getDerivedStateFromProps;P=typeof I=="function"||typeof c.getSnapshotBeforeUpdate=="function",x=t.pendingProps!==x,P||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(x||q!==p)&&by(t,c,l,p),Ra=!1;var G=t.memoizedState;c.state=G,qi(t,l,c,o),Bi(),q=t.memoizedState,x||G!==q||Ra?(typeof I=="function"&&(ef(t,a,I,l),q=t.memoizedState),(T=Ra||vy(t,a,T,l,G,q,p))?(P||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=q),c.props=l,c.state=q,c.context=p,l=T):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{c=t.stateNode,Ac(e,t),p=t.memoizedProps,P=ws(a,p),c.props=P,I=t.pendingProps,G=c.context,q=a.contextType,T=gl,typeof q=="object"&&q!==null&&(T=vt(q)),x=a.getDerivedStateFromProps,(q=typeof x=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(p!==I||G!==T)&&by(t,c,l,T),Ra=!1,G=t.memoizedState,c.state=G,qi(t,l,c,o),Bi();var Y=t.memoizedState;p!==I||G!==Y||Ra||e!==null&&e.dependencies!==null&&oo(e.dependencies)?(typeof x=="function"&&(ef(t,a,x,l),Y=t.memoizedState),(P=Ra||vy(t,a,P,l,G,Y,T)||e!==null&&e.dependencies!==null&&oo(e.dependencies))?(q||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(l,Y,T),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(l,Y,T)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||p===e.memoizedProps&&G===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&G===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=Y),c.props=l,c.state=Y,c.context=T,l=P):(typeof c.componentDidUpdate!="function"||p===e.memoizedProps&&G===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&G===e.memoizedState||(t.flags|=1024),l=!1)}return c=l,Co(e,t),l=(t.flags&128)!==0,c||l?(c=t.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:c.render(),t.flags|=1,e!==null&&l?(t.child=_s(t,e.child,null,o),t.child=_s(t,null,a,o)):bt(e,t,a,o),t.memoizedState=c.state,e=t.child):e=$n(e,t,o),e}function Dy(e,t,a,l){return vs(),t.flags|=256,bt(e,t,a,l),t.child}var lf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function rf(e){return{baseLanes:e,cachePool:Rm()}}function of(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=$t),e}function Uy(e,t,a){var l=t.pendingProps,o=!1,c=(t.flags&128)!==0,p;if((p=c)||(p=e!==null&&e.memoizedState===null?!1:(nt.current&2)!==0),p&&(o=!0,t.flags&=-129),p=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ne){if(o?wa(t):Ea(),(e=Xe)?(e=Yp(e,dn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ba!==null?{id:Mn,overflow:An}:null,retryLane:536870912,hydrationErrors:null},a=mm(e),a.return=t,t.child=a,gt=t,Xe=null)):e=null,e===null)throw Sa(t);return Vf(e)?t.lanes=32:t.lanes=536870912,null}var x=l.children;return l=l.fallback,o?(Ea(),o=t.mode,x=No({mode:"hidden",children:x},o),l=gs(l,o,a,null),x.return=t,l.return=t,x.sibling=l,t.child=x,l=t.child,l.memoizedState=rf(a),l.childLanes=of(e,p,a),t.memoizedState=lf,Vi(null,l)):(wa(t),uf(t,x))}var T=e.memoizedState;if(T!==null&&(x=T.dehydrated,x!==null)){if(c)t.flags&256?(wa(t),t.flags&=-257,t=cf(e,t,a)):t.memoizedState!==null?(Ea(),t.child=e.child,t.flags|=128,t=null):(Ea(),x=l.fallback,o=t.mode,l=No({mode:"visible",children:l.children},o),x=gs(x,o,a,null),x.flags|=2,l.return=t,x.return=t,l.sibling=x,t.child=l,_s(t,e.child,null,a),l=t.child,l.memoizedState=rf(a),l.childLanes=of(e,p,a),t.memoizedState=lf,t=Vi(null,l));else if(wa(t),Vf(x)){if(p=x.nextSibling&&x.nextSibling.dataset,p)var q=p.dgst;p=q,l=Error(r(419)),l.stack="",l.digest=p,Oi({value:l,source:null,stack:null}),t=cf(e,t,a)}else if(rt||Sl(e,t,a,!1),p=(a&e.childLanes)!==0,rt||p){if(p=Ke,p!==null&&(l=Sh(p,a),l!==0&&l!==T.retryLane))throw T.retryLane=l,ps(e,l),kt(p,e,l),af;Yf(x)||Bo(),t=cf(e,t,a)}else Yf(x)?(t.flags|=192,t.child=e.child,t=null):(e=T.treeContext,Xe=mn(x.nextSibling),gt=t,Ne=!0,xa=null,dn=!1,e!==null&&gm(t,e),t=uf(t,l.children),t.flags|=4096);return t}return o?(Ea(),x=l.fallback,o=t.mode,T=e.child,q=T.sibling,l=Xn(T,{mode:"hidden",children:l.children}),l.subtreeFlags=T.subtreeFlags&65011712,q!==null?x=Xn(q,x):(x=gs(x,o,a,null),x.flags|=2),x.return=t,l.return=t,l.sibling=x,t.child=l,Vi(null,l),l=t.child,x=e.child.memoizedState,x===null?x=rf(a):(o=x.cachePool,o!==null?(T=lt._currentValue,o=o.parent!==T?{parent:T,pool:T}:o):o=Rm(),x={baseLanes:x.baseLanes|a,cachePool:o}),l.memoizedState=x,l.childLanes=of(e,p,a),t.memoizedState=lf,Vi(e.child,l)):(wa(t),a=e.child,e=a.sibling,a=Xn(a,{mode:"visible",children:l.children}),a.return=t,a.sibling=null,e!==null&&(p=t.deletions,p===null?(t.deletions=[e],t.flags|=16):p.push(e)),t.child=a,t.memoizedState=null,a)}function uf(e,t){return t=No({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function No(e,t){return e=Zt(22,e,null,t),e.lanes=0,e}function cf(e,t,a){return _s(t,e.child,null,a),e=uf(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ly(e,t,a){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),_c(e.return,t,a)}function ff(e,t,a,l,o,c){var p=e.memoizedState;p===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:o,treeForkCount:c}:(p.isBackwards=t,p.rendering=null,p.renderingStartTime=0,p.last=l,p.tail=a,p.tailMode=o,p.treeForkCount=c)}function ky(e,t,a){var l=t.pendingProps,o=l.revealOrder,c=l.tail;l=l.children;var p=nt.current,x=(p&2)!==0;if(x?(p=p&1|2,t.flags|=128):p&=1,ae(nt,p),bt(e,t,l,a),l=Ne?Ai:0,!x&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ly(e,a,t);else if(e.tag===19)Ly(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(o){case"forwards":for(a=t.child,o=null;a!==null;)e=a.alternate,e!==null&&go(e)===null&&(o=a),a=a.sibling;a=o,a===null?(o=t.child,t.child=null):(o=a.sibling,a.sibling=null),ff(t,!1,o,a,c,l);break;case"backwards":case"unstable_legacy-backwards":for(a=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&go(e)===null){t.child=o;break}e=o.sibling,o.sibling=a,a=o,o=e}ff(t,!0,a,null,c,l);break;case"together":ff(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function $n(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Ma|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Sl(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,a=Xn(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Xn(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function df(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&oo(e)))}function Tx(e,t,a){switch(t.tag){case 3:Be(t,t.stateNode.containerInfo),ja(t,lt,e.memoizedState.cache),vs();break;case 27:case 5:sn(t);break;case 4:Be(t,t.stateNode.containerInfo);break;case 10:ja(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Lc(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(wa(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Uy(e,t,a):(wa(t),e=$n(e,t,a),e!==null?e.sibling:null);wa(t);break;case 19:var o=(e.flags&128)!==0;if(l=(a&t.childLanes)!==0,l||(Sl(e,t,a,!1),l=(a&t.childLanes)!==0),o){if(l)return ky(e,t,a);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),ae(nt,nt.current),l)break;return null;case 22:return t.lanes=0,Ny(e,t,a,t.pendingProps);case 24:ja(t,lt,e.memoizedState.cache)}return $n(e,t,a)}function By(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)rt=!0;else{if(!df(e,a)&&(t.flags&128)===0)return rt=!1,Tx(e,t,a);rt=(e.flags&131072)!==0}else rt=!1,Ne&&(t.flags&1048576)!==0&&pm(t,Ai,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=js(t.elementType),t.type=e,typeof e=="function")pc(e)?(l=ws(e,l),t.tag=1,t=zy(null,t,e,l,a)):(t.tag=0,t=sf(null,t,e,l,a));else{if(e!=null){var o=e.$$typeof;if(o===M){t.tag=11,t=wy(null,t,e,l,a);break e}else if(o===O){t.tag=14,t=Ey(null,t,e,l,a);break e}}throw t=ee(e)||e,Error(r(306,t,""))}}return t;case 0:return sf(e,t,t.type,t.pendingProps,a);case 1:return l=t.type,o=ws(l,t.pendingProps),zy(e,t,l,o,a);case 3:e:{if(Be(t,t.stateNode.containerInfo),e===null)throw Error(r(387));l=t.pendingProps;var c=t.memoizedState;o=c.element,Ac(e,t),qi(t,l,null,a);var p=t.memoizedState;if(l=p.cache,ja(t,lt,l),l!==c.cache&&Tc(t,[lt],a,!0),Bi(),l=p.element,c.isDehydrated)if(c={element:l,isDehydrated:!1,cache:p.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=Dy(e,t,l,a);break e}else if(l!==o){o=un(Error(r(424)),t),Oi(o),t=Dy(e,t,l,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Xe=mn(e.firstChild),gt=t,Ne=!0,xa=null,dn=!0,a=Nm(t,null,l,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(vs(),l===o){t=$n(e,t,a);break e}bt(e,t,l,a)}t=t.child}return t;case 26:return Co(e,t),e===null?(a=Jp(t.type,null,t.pendingProps,null))?t.memoizedState=a:Ne||(a=t.type,e=t.pendingProps,l=Ko(me.current).createElement(a),l[pt]=t,l[At]=e,xt(l,a,e),dt(l),t.stateNode=l):t.memoizedState=Jp(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return sn(t),e===null&&Ne&&(l=t.stateNode=Xp(t.type,t.pendingProps,me.current),gt=t,dn=!0,o=Xe,Ua(t.type)?(Kf=o,Xe=mn(l.firstChild)):Xe=o),bt(e,t,t.pendingProps.children,a),Co(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ne&&((o=l=Xe)&&(l=t1(l,t.type,t.pendingProps,dn),l!==null?(t.stateNode=l,gt=t,Xe=mn(l.firstChild),dn=!1,o=!0):o=!1),o||Sa(t)),sn(t),o=t.type,c=t.pendingProps,p=e!==null?e.memoizedProps:null,l=c.children,Hf(o,c)?l=null:p!==null&&Hf(o,p)&&(t.flags|=32),t.memoizedState!==null&&(o=Bc(e,t,px,null,null,a),lr._currentValue=o),Co(e,t),bt(e,t,l,a),t.child;case 6:return e===null&&Ne&&((e=a=Xe)&&(a=n1(a,t.pendingProps,dn),a!==null?(t.stateNode=a,gt=t,Xe=null,e=!0):e=!1),e||Sa(t)),null;case 13:return Uy(e,t,a);case 4:return Be(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=_s(t,null,l,a):bt(e,t,l,a),t.child;case 11:return wy(e,t,t.type,t.pendingProps,a);case 7:return bt(e,t,t.pendingProps,a),t.child;case 8:return bt(e,t,t.pendingProps.children,a),t.child;case 12:return bt(e,t,t.pendingProps.children,a),t.child;case 10:return l=t.pendingProps,ja(t,t.type,l.value),bt(e,t,l.children,a),t.child;case 9:return o=t.type._context,l=t.pendingProps.children,xs(t),o=vt(o),l=l(o),t.flags|=1,bt(e,t,l,a),t.child;case 14:return Ey(e,t,t.type,t.pendingProps,a);case 15:return Cy(e,t,t.type,t.pendingProps,a);case 19:return ky(e,t,a);case 31:return _x(e,t,a);case 22:return Ny(e,t,a,t.pendingProps);case 24:return xs(t),l=vt(lt),e===null?(o=Cc(),o===null&&(o=Ke,c=wc(),o.pooledCache=c,c.refCount++,c!==null&&(o.pooledCacheLanes|=a),o=c),t.memoizedState={parent:l,cache:o},Mc(t),ja(t,lt,o)):((e.lanes&a)!==0&&(Ac(e,t),qi(t,null,null,a),Bi()),o=e.memoizedState,c=t.memoizedState,o.parent!==l?(o={parent:l,cache:l},t.memoizedState=o,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=o),ja(t,lt,l)):(l=c.cache,ja(t,lt,l),l!==o.cache&&Tc(t,[lt],a,!0))),bt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function Wn(e){e.flags|=4}function hf(e,t,a,l,o){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(o&335544128)===o)if(e.stateNode.complete)e.flags|=8192;else if(fp())e.flags|=8192;else throw Rs=ho,Nc}else e.flags&=-16777217}function qy(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!eg(t))if(fp())e.flags|=8192;else throw Rs=ho,Nc}function Mo(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?vh():536870912,e.lanes|=t,zl|=t)}function Ki(e,t){if(!Ne)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function Pe(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,l=0;if(t)for(var o=e.child;o!==null;)a|=o.lanes|o.childLanes,l|=o.subtreeFlags&65011712,l|=o.flags&65011712,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)a|=o.lanes|o.childLanes,l|=o.subtreeFlags,l|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=l,e.childLanes=a,t}function wx(e,t,a){var l=t.pendingProps;switch(xc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Pe(t),null;case 1:return Pe(t),null;case 3:return a=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Jn(lt),ge(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(xl(t)?Wn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,jc())),Pe(t),null;case 26:var o=t.type,c=t.memoizedState;return e===null?(Wn(t),c!==null?(Pe(t),qy(t,c)):(Pe(t),hf(t,o,null,l,a))):c?c!==e.memoizedState?(Wn(t),Pe(t),qy(t,c)):(Pe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&Wn(t),Pe(t),hf(t,o,e,l,a)),null;case 27:if(Mt(t),a=me.current,o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Wn(t);else{if(!l){if(t.stateNode===null)throw Error(r(166));return Pe(t),null}e=se.current,xl(t)?vm(t):(e=Xp(o,l,a),t.stateNode=e,Wn(t))}return Pe(t),null;case 5:if(Mt(t),o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Wn(t);else{if(!l){if(t.stateNode===null)throw Error(r(166));return Pe(t),null}if(c=se.current,xl(t))vm(t);else{var p=Ko(me.current);switch(c){case 1:c=p.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:c=p.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":c=p.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":c=p.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":c=p.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof l.is=="string"?p.createElement("select",{is:l.is}):p.createElement("select"),l.multiple?c.multiple=!0:l.size&&(c.size=l.size);break;default:c=typeof l.is=="string"?p.createElement(o,{is:l.is}):p.createElement(o)}}c[pt]=t,c[At]=l;e:for(p=t.child;p!==null;){if(p.tag===5||p.tag===6)c.appendChild(p.stateNode);else if(p.tag!==4&&p.tag!==27&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===t)break e;for(;p.sibling===null;){if(p.return===null||p.return===t)break e;p=p.return}p.sibling.return=p.return,p=p.sibling}t.stateNode=c;e:switch(xt(c,o,l),o){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Wn(t)}}return Pe(t),hf(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&Wn(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(r(166));if(e=me.current,xl(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,o=gt,o!==null)switch(o.tag){case 27:case 5:l=o.memoizedProps}e[pt]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||Up(e.nodeValue,a)),e||Sa(t,!0)}else e=Ko(e).createTextNode(l),e[pt]=t,t.stateNode=e}return Pe(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(l=xl(t),a!==null){if(e===null){if(!l)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[pt]=t}else vs(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Pe(t),e=!1}else a=jc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(Ft(t),t):(Ft(t),null);if((t.flags&128)!==0)throw Error(r(558))}return Pe(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=xl(t),l!==null&&l.dehydrated!==null){if(e===null){if(!o)throw Error(r(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));o[pt]=t}else vs(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Pe(t),o=!1}else o=jc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(Ft(t),t):(Ft(t),null)}return Ft(t),(t.flags&128)!==0?(t.lanes=a,t):(a=l!==null,e=e!==null&&e.memoizedState!==null,a&&(l=t.child,o=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(o=l.alternate.memoizedState.cachePool.pool),c=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(c=l.memoizedState.cachePool.pool),c!==o&&(l.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),Mo(t,t.updateQueue),Pe(t),null);case 4:return ge(),e===null&&Uf(t.stateNode.containerInfo),Pe(t),null;case 10:return Jn(t.type),Pe(t),null;case 19:if(F(nt),l=t.memoizedState,l===null)return Pe(t),null;if(o=(t.flags&128)!==0,c=l.rendering,c===null)if(o)Ki(l,!1);else{if(We!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=go(e),c!==null){for(t.flags|=128,Ki(l,!1),e=c.updateQueue,t.updateQueue=e,Mo(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)hm(a,e),a=a.sibling;return ae(nt,nt.current&1|2),Ne&&Pn(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&St()>Uo&&(t.flags|=128,o=!0,Ki(l,!1),t.lanes=4194304)}else{if(!o)if(e=go(c),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,Mo(t,e),Ki(l,!0),l.tail===null&&l.tailMode==="hidden"&&!c.alternate&&!Ne)return Pe(t),null}else 2*St()-l.renderingStartTime>Uo&&a!==536870912&&(t.flags|=128,o=!0,Ki(l,!1),t.lanes=4194304);l.isBackwards?(c.sibling=t.child,t.child=c):(e=l.last,e!==null?e.sibling=c:t.child=c,l.last=c)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=St(),e.sibling=null,a=nt.current,ae(nt,o?a&1|2:a&1),Ne&&Pn(t,l.treeForkCount),e):(Pe(t),null);case 22:case 23:return Ft(t),Uc(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(a&536870912)!==0&&(t.flags&128)===0&&(Pe(t),t.subtreeFlags&6&&(t.flags|=8192)):Pe(t),a=t.updateQueue,a!==null&&Mo(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==a&&(t.flags|=2048),e!==null&&F(Ss),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Jn(lt),Pe(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function Ex(e,t){switch(xc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Jn(lt),ge(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Mt(t),null;case 31:if(t.memoizedState!==null){if(Ft(t),t.alternate===null)throw Error(r(340));vs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Ft(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));vs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return F(nt),null;case 4:return ge(),null;case 10:return Jn(t.type),null;case 22:case 23:return Ft(t),Uc(),e!==null&&F(Ss),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Jn(lt),null;case 25:return null;default:return null}}function Hy(e,t){switch(xc(t),t.tag){case 3:Jn(lt),ge();break;case 26:case 27:case 5:Mt(t);break;case 4:ge();break;case 31:t.memoizedState!==null&&Ft(t);break;case 13:Ft(t);break;case 19:F(nt);break;case 10:Jn(t.type);break;case 22:case 23:Ft(t),Uc(),e!==null&&F(Ss);break;case 24:Jn(lt)}}function Xi(e,t){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var o=l.next;a=o;do{if((a.tag&e)===e){l=void 0;var c=a.create,p=a.inst;l=c(),p.destroy=l}a=a.next}while(a!==o)}}catch(x){Le(t,t.return,x)}}function Ca(e,t,a){try{var l=t.updateQueue,o=l!==null?l.lastEffect:null;if(o!==null){var c=o.next;l=c;do{if((l.tag&e)===e){var p=l.inst,x=p.destroy;if(x!==void 0){p.destroy=void 0,o=t;var T=a,q=x;try{q()}catch(P){Le(o,T,P)}}}l=l.next}while(l!==c)}}catch(P){Le(t,t.return,P)}}function Gy(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Am(t,a)}catch(l){Le(e,e.return,l)}}}function Qy(e,t,a){a.props=ws(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){Le(e,t,l)}}function Pi(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof a=="function"?e.refCleanup=a(l):a.current=l}}catch(o){Le(e,t,o)}}function On(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(o){Le(e,t,o)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(o){Le(e,t,o)}else a.current=null}function Yy(e){var t=e.type,a=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(o){Le(e,e.return,o)}}function mf(e,t,a){try{var l=e.stateNode;Jx(l,e.type,a,t),l[At]=t}catch(o){Le(e,e.return,o)}}function Vy(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ua(e.type)||e.tag===4}function yf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Vy(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Ua(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function pf(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Vn));else if(l!==4&&(l===27&&Ua(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(pf(e,t,a),e=e.sibling;e!==null;)pf(e,t,a),e=e.sibling}function Ao(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(l!==4&&(l===27&&Ua(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Ao(e,t,a),e=e.sibling;e!==null;)Ao(e,t,a),e=e.sibling}function Ky(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);xt(t,l,a),t[pt]=e,t[At]=a}catch(c){Le(e,e.return,c)}}var ea=!1,ot=!1,gf=!1,Xy=typeof WeakSet=="function"?WeakSet:Set,ht=null;function Cx(e,t){if(e=e.containerInfo,Bf=$o,e=sm(e),uc(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var o=l.anchorOffset,c=l.focusNode;l=l.focusOffset;try{a.nodeType,c.nodeType}catch{a=null;break e}var p=0,x=-1,T=-1,q=0,P=0,I=e,G=null;t:for(;;){for(var Y;I!==a||o!==0&&I.nodeType!==3||(x=p+o),I!==c||l!==0&&I.nodeType!==3||(T=p+l),I.nodeType===3&&(p+=I.nodeValue.length),(Y=I.firstChild)!==null;)G=I,I=Y;for(;;){if(I===e)break t;if(G===a&&++q===o&&(x=p),G===c&&++P===l&&(T=p),(Y=I.nextSibling)!==null)break;I=G,G=I.parentNode}I=Y}a=x===-1||T===-1?null:{start:x,end:T}}else a=null}a=a||{start:0,end:0}}else a=null;for(qf={focusedElem:e,selectionRange:a},$o=!1,ht=t;ht!==null;)if(t=ht,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ht=e;else for(;ht!==null;){switch(t=ht,c=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)o=e[a],o.ref.impl=o.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&c!==null){e=void 0,a=t,o=c.memoizedProps,c=c.memoizedState,l=a.stateNode;try{var ue=ws(a.type,o);e=l.getSnapshotBeforeUpdate(ue,c),l.__reactInternalSnapshotBeforeUpdate=e}catch(pe){Le(a,a.return,pe)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Qf(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Qf(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(r(163))}if(e=t.sibling,e!==null){e.return=t.return,ht=e;break}ht=t.return}}function Py(e,t,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:na(e,a),l&4&&Xi(5,a);break;case 1:if(na(e,a),l&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(p){Le(a,a.return,p)}else{var o=ws(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(p){Le(a,a.return,p)}}l&64&&Gy(a),l&512&&Pi(a,a.return);break;case 3:if(na(e,a),l&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{Am(e,t)}catch(p){Le(a,a.return,p)}}break;case 27:t===null&&l&4&&Ky(a);case 26:case 5:na(e,a),t===null&&l&4&&Yy(a),l&512&&Pi(a,a.return);break;case 12:na(e,a);break;case 31:na(e,a),l&4&&Fy(e,a);break;case 13:na(e,a),l&4&&Iy(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=kx.bind(null,a),a1(e,a))));break;case 22:if(l=a.memoizedState!==null||ea,!l){t=t!==null&&t.memoizedState!==null||ot,o=ea;var c=ot;ea=l,(ot=t)&&!c?aa(e,a,(a.subtreeFlags&8772)!==0):na(e,a),ea=o,ot=c}break;case 30:break;default:na(e,a)}}function Zy(e){var t=e.alternate;t!==null&&(e.alternate=null,Zy(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Xu(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Je=null,zt=!1;function ta(e,t,a){for(a=a.child;a!==null;)Jy(e,t,a),a=a.sibling}function Jy(e,t,a){if(Kt&&typeof Kt.onCommitFiberUnmount=="function")try{Kt.onCommitFiberUnmount(gi,a)}catch{}switch(a.tag){case 26:ot||On(a,t),ta(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:ot||On(a,t);var l=Je,o=zt;Ua(a.type)&&(Je=a.stateNode,zt=!1),ta(e,t,a),nr(a.stateNode),Je=l,zt=o;break;case 5:ot||On(a,t);case 6:if(l=Je,o=zt,Je=null,ta(e,t,a),Je=l,zt=o,Je!==null)if(zt)try{(Je.nodeType===9?Je.body:Je.nodeName==="HTML"?Je.ownerDocument.body:Je).removeChild(a.stateNode)}catch(c){Le(a,t,c)}else try{Je.removeChild(a.stateNode)}catch(c){Le(a,t,c)}break;case 18:Je!==null&&(zt?(e=Je,Gp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Gl(e)):Gp(Je,a.stateNode));break;case 4:l=Je,o=zt,Je=a.stateNode.containerInfo,zt=!0,ta(e,t,a),Je=l,zt=o;break;case 0:case 11:case 14:case 15:Ca(2,a,t),ot||Ca(4,a,t),ta(e,t,a);break;case 1:ot||(On(a,t),l=a.stateNode,typeof l.componentWillUnmount=="function"&&Qy(a,t,l)),ta(e,t,a);break;case 21:ta(e,t,a);break;case 22:ot=(l=ot)||a.memoizedState!==null,ta(e,t,a),ot=l;break;default:ta(e,t,a)}}function Fy(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Gl(e)}catch(a){Le(t,t.return,a)}}}function Iy(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Gl(e)}catch(a){Le(t,t.return,a)}}function Nx(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Xy),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Xy),t;default:throw Error(r(435,e.tag))}}function Oo(e,t){var a=Nx(e);t.forEach(function(l){if(!a.has(l)){a.add(l);var o=Bx.bind(null,e,l);l.then(o,o)}})}function Dt(e,t){var a=t.deletions;if(a!==null)for(var l=0;l<a.length;l++){var o=a[l],c=e,p=t,x=p;e:for(;x!==null;){switch(x.tag){case 27:if(Ua(x.type)){Je=x.stateNode,zt=!1;break e}break;case 5:Je=x.stateNode,zt=!1;break e;case 3:case 4:Je=x.stateNode.containerInfo,zt=!0;break e}x=x.return}if(Je===null)throw Error(r(160));Jy(c,p,o),Je=null,zt=!1,c=o.alternate,c!==null&&(c.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)$y(t,e),t=t.sibling}var Rn=null;function $y(e,t){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Dt(t,e),Ut(e),l&4&&(Ca(3,e,e.return),Xi(3,e),Ca(5,e,e.return));break;case 1:Dt(t,e),Ut(e),l&512&&(ot||a===null||On(a,a.return)),l&64&&ea&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?l:a.concat(l))));break;case 26:var o=Rn;if(Dt(t,e),Ut(e),l&512&&(ot||a===null||On(a,a.return)),l&4){var c=a!==null?a.memoizedState:null;if(l=e.memoizedState,a===null)if(l===null)if(e.stateNode===null){e:{l=e.type,a=e.memoizedProps,o=o.ownerDocument||o;t:switch(l){case"title":c=o.getElementsByTagName("title")[0],(!c||c[xi]||c[pt]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=o.createElement(l),o.head.insertBefore(c,o.querySelector("head > title"))),xt(c,l,a),c[pt]=e,dt(c),l=c;break e;case"link":var p=$p("link","href",o).get(l+(a.href||""));if(p){for(var x=0;x<p.length;x++)if(c=p[x],c.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&c.getAttribute("rel")===(a.rel==null?null:a.rel)&&c.getAttribute("title")===(a.title==null?null:a.title)&&c.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){p.splice(x,1);break t}}c=o.createElement(l),xt(c,l,a),o.head.appendChild(c);break;case"meta":if(p=$p("meta","content",o).get(l+(a.content||""))){for(x=0;x<p.length;x++)if(c=p[x],c.getAttribute("content")===(a.content==null?null:""+a.content)&&c.getAttribute("name")===(a.name==null?null:a.name)&&c.getAttribute("property")===(a.property==null?null:a.property)&&c.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&c.getAttribute("charset")===(a.charSet==null?null:a.charSet)){p.splice(x,1);break t}}c=o.createElement(l),xt(c,l,a),o.head.appendChild(c);break;default:throw Error(r(468,l))}c[pt]=e,dt(c),l=c}e.stateNode=l}else Wp(o,e.type,e.stateNode);else e.stateNode=Ip(o,l,e.memoizedProps);else c!==l?(c===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):c.count--,l===null?Wp(o,e.type,e.stateNode):Ip(o,l,e.memoizedProps)):l===null&&e.stateNode!==null&&mf(e,e.memoizedProps,a.memoizedProps)}break;case 27:Dt(t,e),Ut(e),l&512&&(ot||a===null||On(a,a.return)),a!==null&&l&4&&mf(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Dt(t,e),Ut(e),l&512&&(ot||a===null||On(a,a.return)),e.flags&32){o=e.stateNode;try{cl(o,"")}catch(ue){Le(e,e.return,ue)}}l&4&&e.stateNode!=null&&(o=e.memoizedProps,mf(e,o,a!==null?a.memoizedProps:o)),l&1024&&(gf=!0);break;case 6:if(Dt(t,e),Ut(e),l&4){if(e.stateNode===null)throw Error(r(162));l=e.memoizedProps,a=e.stateNode;try{a.nodeValue=l}catch(ue){Le(e,e.return,ue)}}break;case 3:if(Zo=null,o=Rn,Rn=Xo(t.containerInfo),Dt(t,e),Rn=o,Ut(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{Gl(t.containerInfo)}catch(ue){Le(e,e.return,ue)}gf&&(gf=!1,Wy(e));break;case 4:l=Rn,Rn=Xo(e.stateNode.containerInfo),Dt(t,e),Ut(e),Rn=l;break;case 12:Dt(t,e),Ut(e);break;case 31:Dt(t,e),Ut(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Oo(e,l)));break;case 13:Dt(t,e),Ut(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Do=St()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Oo(e,l)));break;case 22:o=e.memoizedState!==null;var T=a!==null&&a.memoizedState!==null,q=ea,P=ot;if(ea=q||o,ot=P||T,Dt(t,e),ot=P,ea=q,Ut(e),l&8192)e:for(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,o&&(a===null||T||ea||ot||Es(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){T=a=t;try{if(c=T.stateNode,o)p=c.style,typeof p.setProperty=="function"?p.setProperty("display","none","important"):p.display="none";else{x=T.stateNode;var I=T.memoizedProps.style,G=I!=null&&I.hasOwnProperty("display")?I.display:null;x.style.display=G==null||typeof G=="boolean"?"":(""+G).trim()}}catch(ue){Le(T,T.return,ue)}}}else if(t.tag===6){if(a===null){T=t;try{T.stateNode.nodeValue=o?"":T.memoizedProps}catch(ue){Le(T,T.return,ue)}}}else if(t.tag===18){if(a===null){T=t;try{var Y=T.stateNode;o?Qp(Y,!0):Qp(T.stateNode,!1)}catch(ue){Le(T,T.return,ue)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(a=l.retryQueue,a!==null&&(l.retryQueue=null,Oo(e,a))));break;case 19:Dt(t,e),Ut(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Oo(e,l)));break;case 30:break;case 21:break;default:Dt(t,e),Ut(e)}}function Ut(e){var t=e.flags;if(t&2){try{for(var a,l=e.return;l!==null;){if(Vy(l)){a=l;break}l=l.return}if(a==null)throw Error(r(160));switch(a.tag){case 27:var o=a.stateNode,c=yf(e);Ao(e,c,o);break;case 5:var p=a.stateNode;a.flags&32&&(cl(p,""),a.flags&=-33);var x=yf(e);Ao(e,x,p);break;case 3:case 4:var T=a.stateNode.containerInfo,q=yf(e);pf(e,q,T);break;default:throw Error(r(161))}}catch(P){Le(e,e.return,P)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Wy(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Wy(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function na(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Py(e,t.alternate,t),t=t.sibling}function Es(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ca(4,t,t.return),Es(t);break;case 1:On(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Qy(t,t.return,a),Es(t);break;case 27:nr(t.stateNode);case 26:case 5:On(t,t.return),Es(t);break;case 22:t.memoizedState===null&&Es(t);break;case 30:Es(t);break;default:Es(t)}e=e.sibling}}function aa(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,o=e,c=t,p=c.flags;switch(c.tag){case 0:case 11:case 15:aa(o,c,a),Xi(4,c);break;case 1:if(aa(o,c,a),l=c,o=l.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(q){Le(l,l.return,q)}if(l=c,o=l.updateQueue,o!==null){var x=l.stateNode;try{var T=o.shared.hiddenCallbacks;if(T!==null)for(o.shared.hiddenCallbacks=null,o=0;o<T.length;o++)Mm(T[o],x)}catch(q){Le(l,l.return,q)}}a&&p&64&&Gy(c),Pi(c,c.return);break;case 27:Ky(c);case 26:case 5:aa(o,c,a),a&&l===null&&p&4&&Yy(c),Pi(c,c.return);break;case 12:aa(o,c,a);break;case 31:aa(o,c,a),a&&p&4&&Fy(o,c);break;case 13:aa(o,c,a),a&&p&4&&Iy(o,c);break;case 22:c.memoizedState===null&&aa(o,c,a),Pi(c,c.return);break;case 30:break;default:aa(o,c,a)}t=t.sibling}}function vf(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&zi(a))}function bf(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&zi(e))}function _n(e,t,a,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)ep(e,t,a,l),t=t.sibling}function ep(e,t,a,l){var o=t.flags;switch(t.tag){case 0:case 11:case 15:_n(e,t,a,l),o&2048&&Xi(9,t);break;case 1:_n(e,t,a,l);break;case 3:_n(e,t,a,l),o&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&zi(e)));break;case 12:if(o&2048){_n(e,t,a,l),e=t.stateNode;try{var c=t.memoizedProps,p=c.id,x=c.onPostCommit;typeof x=="function"&&x(p,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(T){Le(t,t.return,T)}}else _n(e,t,a,l);break;case 31:_n(e,t,a,l);break;case 13:_n(e,t,a,l);break;case 23:break;case 22:c=t.stateNode,p=t.alternate,t.memoizedState!==null?c._visibility&2?_n(e,t,a,l):Zi(e,t):c._visibility&2?_n(e,t,a,l):(c._visibility|=2,Ml(e,t,a,l,(t.subtreeFlags&10256)!==0||!1)),o&2048&&vf(p,t);break;case 24:_n(e,t,a,l),o&2048&&bf(t.alternate,t);break;default:_n(e,t,a,l)}}function Ml(e,t,a,l,o){for(o=o&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var c=e,p=t,x=a,T=l,q=p.flags;switch(p.tag){case 0:case 11:case 15:Ml(c,p,x,T,o),Xi(8,p);break;case 23:break;case 22:var P=p.stateNode;p.memoizedState!==null?P._visibility&2?Ml(c,p,x,T,o):Zi(c,p):(P._visibility|=2,Ml(c,p,x,T,o)),o&&q&2048&&vf(p.alternate,p);break;case 24:Ml(c,p,x,T,o),o&&q&2048&&bf(p.alternate,p);break;default:Ml(c,p,x,T,o)}t=t.sibling}}function Zi(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,l=t,o=l.flags;switch(l.tag){case 22:Zi(a,l),o&2048&&vf(l.alternate,l);break;case 24:Zi(a,l),o&2048&&bf(l.alternate,l);break;default:Zi(a,l)}t=t.sibling}}var Ji=8192;function Al(e,t,a){if(e.subtreeFlags&Ji)for(e=e.child;e!==null;)tp(e,t,a),e=e.sibling}function tp(e,t,a){switch(e.tag){case 26:Al(e,t,a),e.flags&Ji&&e.memoizedState!==null&&y1(a,Rn,e.memoizedState,e.memoizedProps);break;case 5:Al(e,t,a);break;case 3:case 4:var l=Rn;Rn=Xo(e.stateNode.containerInfo),Al(e,t,a),Rn=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Ji,Ji=16777216,Al(e,t,a),Ji=l):Al(e,t,a));break;default:Al(e,t,a)}}function np(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Fi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];ht=l,sp(l,e)}np(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)ap(e),e=e.sibling}function ap(e){switch(e.tag){case 0:case 11:case 15:Fi(e),e.flags&2048&&Ca(9,e,e.return);break;case 3:Fi(e);break;case 12:Fi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,zo(e)):Fi(e);break;default:Fi(e)}}function zo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];ht=l,sp(l,e)}np(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ca(8,t,t.return),zo(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,zo(t));break;default:zo(t)}e=e.sibling}}function sp(e,t){for(;ht!==null;){var a=ht;switch(a.tag){case 0:case 11:case 15:Ca(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var l=a.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:zi(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,ht=l;else e:for(a=e;ht!==null;){l=ht;var o=l.sibling,c=l.return;if(Zy(l),l===a){ht=null;break e}if(o!==null){o.return=c,ht=o;break e}ht=c}}}var Mx={getCacheForType:function(e){var t=vt(lt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return vt(lt).controller.signal}},Ax=typeof WeakMap=="function"?WeakMap:Map,ze=0,Ke=null,_e=null,we=0,Ue=0,It=null,Na=!1,Ol=!1,xf=!1,sa=0,We=0,Ma=0,Cs=0,Sf=0,$t=0,zl=0,Ii=null,Lt=null,jf=!1,Do=0,lp=0,Uo=1/0,Lo=null,Aa=null,ut=0,Oa=null,Dl=null,la=0,Rf=0,_f=null,ip=null,$i=0,Tf=null;function Wt(){return(ze&2)!==0&&we!==0?we&-we:L.T!==null?Af():jh()}function rp(){if($t===0)if((we&536870912)===0||Ne){var e=Yr;Yr<<=1,(Yr&3932160)===0&&(Yr=262144),$t=e}else $t=536870912;return e=Jt.current,e!==null&&(e.flags|=32),$t}function kt(e,t,a){(e===Ke&&(Ue===2||Ue===9)||e.cancelPendingCommit!==null)&&(Ul(e,0),za(e,we,$t,!1)),bi(e,a),((ze&2)===0||e!==Ke)&&(e===Ke&&((ze&2)===0&&(Cs|=a),We===4&&za(e,we,$t,!1)),zn(e))}function op(e,t,a){if((ze&6)!==0)throw Error(r(327));var l=!a&&(t&127)===0&&(t&e.expiredLanes)===0||vi(e,t),o=l?Dx(e,t):Ef(e,t,!0),c=l;do{if(o===0){Ol&&!l&&za(e,t,0,!1);break}else{if(a=e.current.alternate,c&&!Ox(a)){o=Ef(e,t,!1),c=!1;continue}if(o===2){if(c=t,e.errorRecoveryDisabledLanes&c)var p=0;else p=e.pendingLanes&-536870913,p=p!==0?p:p&536870912?536870912:0;if(p!==0){t=p;e:{var x=e;o=Ii;var T=x.current.memoizedState.isDehydrated;if(T&&(Ul(x,p).flags|=256),p=Ef(x,p,!1),p!==2){if(xf&&!T){x.errorRecoveryDisabledLanes|=c,Cs|=c,o=4;break e}c=Lt,Lt=o,c!==null&&(Lt===null?Lt=c:Lt.push.apply(Lt,c))}o=p}if(c=!1,o!==2)continue}}if(o===1){Ul(e,0),za(e,t,0,!0);break}e:{switch(l=e,c=o,c){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:za(l,t,$t,!Na);break e;case 2:Lt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(o=Do+300-St(),10<o)){if(za(l,t,$t,!Na),Kr(l,0,!0)!==0)break e;la=t,l.timeoutHandle=qp(up.bind(null,l,a,Lt,Lo,jf,t,$t,Cs,zl,Na,c,"Throttled",-0,0),o);break e}up(l,a,Lt,Lo,jf,t,$t,Cs,zl,Na,c,null,-0,0)}}break}while(!0);zn(e)}function up(e,t,a,l,o,c,p,x,T,q,P,I,G,Y){if(e.timeoutHandle=-1,I=t.subtreeFlags,I&8192||(I&16785408)===16785408){I={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Vn},tp(t,c,I);var ue=(c&62914560)===c?Do-St():(c&4194048)===c?lp-St():0;if(ue=p1(I,ue),ue!==null){la=c,e.cancelPendingCommit=ue(gp.bind(null,e,t,c,a,l,o,p,x,T,P,I,null,G,Y)),za(e,c,p,!q);return}}gp(e,t,c,a,l,o,p,x,T)}function Ox(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var l=0;l<a.length;l++){var o=a[l],c=o.getSnapshot;o=o.value;try{if(!Pt(c(),o))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function za(e,t,a,l){t&=~Sf,t&=~Cs,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var o=t;0<o;){var c=31-Xt(o),p=1<<c;l[c]=-1,o&=~p}a!==0&&bh(e,a,t)}function ko(){return(ze&6)===0?(Wi(0),!1):!0}function wf(){if(_e!==null){if(Ue===0)var e=_e.return;else e=_e,Zn=bs=null,Gc(e),Tl=null,Ui=0,e=_e;for(;e!==null;)Hy(e.alternate,e),e=e.return;_e=null}}function Ul(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,$x(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),la=0,wf(),Ke=e,_e=a=Xn(e.current,null),we=t,Ue=0,It=null,Na=!1,Ol=vi(e,t),xf=!1,zl=$t=Sf=Cs=Ma=We=0,Lt=Ii=null,jf=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var o=31-Xt(l),c=1<<o;t|=e[o],l&=~c}return sa=t,ao(),a}function cp(e,t){be=null,L.H=Yi,t===_l||t===fo?(t=wm(),Ue=3):t===Nc?(t=wm(),Ue=4):Ue=t===af?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,It=t,_e===null&&(We=1,wo(e,un(t,e.current)))}function fp(){var e=Jt.current;return e===null?!0:(we&4194048)===we?hn===null:(we&62914560)===we||(we&536870912)!==0?e===hn:!1}function dp(){var e=L.H;return L.H=Yi,e===null?Yi:e}function hp(){var e=L.A;return L.A=Mx,e}function Bo(){We=4,Na||(we&4194048)!==we&&Jt.current!==null||(Ol=!0),(Ma&134217727)===0&&(Cs&134217727)===0||Ke===null||za(Ke,we,$t,!1)}function Ef(e,t,a){var l=ze;ze|=2;var o=dp(),c=hp();(Ke!==e||we!==t)&&(Lo=null,Ul(e,t)),t=!1;var p=We;e:do try{if(Ue!==0&&_e!==null){var x=_e,T=It;switch(Ue){case 8:wf(),p=6;break e;case 3:case 2:case 9:case 6:Jt.current===null&&(t=!0);var q=Ue;if(Ue=0,It=null,Ll(e,x,T,q),a&&Ol){p=0;break e}break;default:q=Ue,Ue=0,It=null,Ll(e,x,T,q)}}zx(),p=We;break}catch(P){cp(e,P)}while(!0);return t&&e.shellSuspendCounter++,Zn=bs=null,ze=l,L.H=o,L.A=c,_e===null&&(Ke=null,we=0,ao()),p}function zx(){for(;_e!==null;)mp(_e)}function Dx(e,t){var a=ze;ze|=2;var l=dp(),o=hp();Ke!==e||we!==t?(Lo=null,Uo=St()+500,Ul(e,t)):Ol=vi(e,t);e:do try{if(Ue!==0&&_e!==null){t=_e;var c=It;t:switch(Ue){case 1:Ue=0,It=null,Ll(e,t,c,1);break;case 2:case 9:if(_m(c)){Ue=0,It=null,yp(t);break}t=function(){Ue!==2&&Ue!==9||Ke!==e||(Ue=7),zn(e)},c.then(t,t);break e;case 3:Ue=7;break e;case 4:Ue=5;break e;case 7:_m(c)?(Ue=0,It=null,yp(t)):(Ue=0,It=null,Ll(e,t,c,7));break;case 5:var p=null;switch(_e.tag){case 26:p=_e.memoizedState;case 5:case 27:var x=_e;if(p?eg(p):x.stateNode.complete){Ue=0,It=null;var T=x.sibling;if(T!==null)_e=T;else{var q=x.return;q!==null?(_e=q,qo(q)):_e=null}break t}}Ue=0,It=null,Ll(e,t,c,5);break;case 6:Ue=0,It=null,Ll(e,t,c,6);break;case 8:wf(),We=6;break e;default:throw Error(r(462))}}Ux();break}catch(P){cp(e,P)}while(!0);return Zn=bs=null,L.H=l,L.A=o,ze=a,_e!==null?0:(Ke=null,we=0,ao(),We)}function Ux(){for(;_e!==null&&!Gr();)mp(_e)}function mp(e){var t=By(e.alternate,e,sa);e.memoizedProps=e.pendingProps,t===null?qo(e):_e=t}function yp(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=Oy(a,t,t.pendingProps,t.type,void 0,we);break;case 11:t=Oy(a,t,t.pendingProps,t.type.render,t.ref,we);break;case 5:Gc(t);default:Hy(a,t),t=_e=hm(t,sa),t=By(a,t,sa)}e.memoizedProps=e.pendingProps,t===null?qo(e):_e=t}function Ll(e,t,a,l){Zn=bs=null,Gc(t),Tl=null,Ui=0;var o=t.return;try{if(Rx(e,o,t,a,we)){We=1,wo(e,un(a,e.current)),_e=null;return}}catch(c){if(o!==null)throw _e=o,c;We=1,wo(e,un(a,e.current)),_e=null;return}t.flags&32768?(Ne||l===1?e=!0:Ol||(we&536870912)!==0?e=!1:(Na=e=!0,(l===2||l===9||l===3||l===6)&&(l=Jt.current,l!==null&&l.tag===13&&(l.flags|=16384))),pp(t,e)):qo(t)}function qo(e){var t=e;do{if((t.flags&32768)!==0){pp(t,Na);return}e=t.return;var a=wx(t.alternate,t,sa);if(a!==null){_e=a;return}if(t=t.sibling,t!==null){_e=t;return}_e=t=e}while(t!==null);We===0&&(We=5)}function pp(e,t){do{var a=Ex(e.alternate,e);if(a!==null){a.flags&=32767,_e=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){_e=e;return}_e=e=a}while(e!==null);We=6,_e=null}function gp(e,t,a,l,o,c,p,x,T){e.cancelPendingCommit=null;do Ho();while(ut!==0);if((ze&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(c=t.lanes|t.childLanes,c|=mc,mb(e,a,c,p,x,T),e===Ke&&(_e=Ke=null,we=0),Dl=t,Oa=e,la=a,Rf=c,_f=o,ip=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,qx(al,function(){return jp(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=L.T,L.T=null,o=X.p,X.p=2,p=ze,ze|=4;try{Cx(e,t,a)}finally{ze=p,X.p=o,L.T=l}}ut=1,vp(),bp(),xp()}}function vp(){if(ut===1){ut=0;var e=Oa,t=Dl,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=L.T,L.T=null;var l=X.p;X.p=2;var o=ze;ze|=4;try{$y(t,e);var c=qf,p=sm(e.containerInfo),x=c.focusedElem,T=c.selectionRange;if(p!==x&&x&&x.ownerDocument&&am(x.ownerDocument.documentElement,x)){if(T!==null&&uc(x)){var q=T.start,P=T.end;if(P===void 0&&(P=q),"selectionStart"in x)x.selectionStart=q,x.selectionEnd=Math.min(P,x.value.length);else{var I=x.ownerDocument||document,G=I&&I.defaultView||window;if(G.getSelection){var Y=G.getSelection(),ue=x.textContent.length,pe=Math.min(T.start,ue),Qe=T.end===void 0?pe:Math.min(T.end,ue);!Y.extend&&pe>Qe&&(p=Qe,Qe=pe,pe=p);var z=nm(x,pe),N=nm(x,Qe);if(z&&N&&(Y.rangeCount!==1||Y.anchorNode!==z.node||Y.anchorOffset!==z.offset||Y.focusNode!==N.node||Y.focusOffset!==N.offset)){var B=I.createRange();B.setStart(z.node,z.offset),Y.removeAllRanges(),pe>Qe?(Y.addRange(B),Y.extend(N.node,N.offset)):(B.setEnd(N.node,N.offset),Y.addRange(B))}}}}for(I=[],Y=x;Y=Y.parentNode;)Y.nodeType===1&&I.push({element:Y,left:Y.scrollLeft,top:Y.scrollTop});for(typeof x.focus=="function"&&x.focus(),x=0;x<I.length;x++){var J=I[x];J.element.scrollLeft=J.left,J.element.scrollTop=J.top}}$o=!!Bf,qf=Bf=null}finally{ze=o,X.p=l,L.T=a}}e.current=t,ut=2}}function bp(){if(ut===2){ut=0;var e=Oa,t=Dl,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=L.T,L.T=null;var l=X.p;X.p=2;var o=ze;ze|=4;try{Py(e,t.alternate,t)}finally{ze=o,X.p=l,L.T=a}}ut=3}}function xp(){if(ut===4||ut===3){ut=0,Gu();var e=Oa,t=Dl,a=la,l=ip;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?ut=5:(ut=0,Dl=Oa=null,Sp(e,e.pendingLanes));var o=e.pendingLanes;if(o===0&&(Aa=null),Vu(a),t=t.stateNode,Kt&&typeof Kt.onCommitFiberRoot=="function")try{Kt.onCommitFiberRoot(gi,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=L.T,o=X.p,X.p=2,L.T=null;try{for(var c=e.onRecoverableError,p=0;p<l.length;p++){var x=l[p];c(x.value,{componentStack:x.stack})}}finally{L.T=t,X.p=o}}(la&3)!==0&&Ho(),zn(e),o=e.pendingLanes,(a&261930)!==0&&(o&42)!==0?e===Tf?$i++:($i=0,Tf=e):$i=0,Wi(0)}}function Sp(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,zi(t)))}function Ho(){return vp(),bp(),xp(),jp()}function jp(){if(ut!==5)return!1;var e=Oa,t=Rf;Rf=0;var a=Vu(la),l=L.T,o=X.p;try{X.p=32>a?32:a,L.T=null,a=_f,_f=null;var c=Oa,p=la;if(ut=0,Dl=Oa=null,la=0,(ze&6)!==0)throw Error(r(331));var x=ze;if(ze|=4,ap(c.current),ep(c,c.current,p,a),ze=x,Wi(0,!1),Kt&&typeof Kt.onPostCommitFiberRoot=="function")try{Kt.onPostCommitFiberRoot(gi,c)}catch{}return!0}finally{X.p=o,L.T=l,Sp(e,t)}}function Rp(e,t,a){t=un(a,t),t=nf(e.stateNode,t,2),e=Ta(e,t,2),e!==null&&(bi(e,2),zn(e))}function Le(e,t,a){if(e.tag===3)Rp(e,e,a);else for(;t!==null;){if(t.tag===3){Rp(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Aa===null||!Aa.has(l))){e=un(a,e),a=_y(2),l=Ta(t,a,2),l!==null&&(Ty(a,l,t,e),bi(l,2),zn(l));break}}t=t.return}}function Cf(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new Ax;var o=new Set;l.set(t,o)}else o=l.get(t),o===void 0&&(o=new Set,l.set(t,o));o.has(a)||(xf=!0,o.add(a),e=Lx.bind(null,e,t,a),t.then(e,e))}function Lx(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Ke===e&&(we&a)===a&&(We===4||We===3&&(we&62914560)===we&&300>St()-Do?(ze&2)===0&&Ul(e,0):Sf|=a,zl===we&&(zl=0)),zn(e)}function _p(e,t){t===0&&(t=vh()),e=ps(e,t),e!==null&&(bi(e,t),zn(e))}function kx(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),_p(e,a)}function Bx(e,t){var a=0;switch(e.tag){case 31:case 13:var l=e.stateNode,o=e.memoizedState;o!==null&&(a=o.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(r(314))}l!==null&&l.delete(t),_p(e,a)}function qx(e,t){return Sn(e,t)}var Go=null,kl=null,Nf=!1,Qo=!1,Mf=!1,Da=0;function zn(e){e!==kl&&e.next===null&&(kl===null?Go=kl=e:kl=kl.next=e),Qo=!0,Nf||(Nf=!0,Gx())}function Wi(e,t){if(!Mf&&Qo){Mf=!0;do for(var a=!1,l=Go;l!==null;){if(e!==0){var o=l.pendingLanes;if(o===0)var c=0;else{var p=l.suspendedLanes,x=l.pingedLanes;c=(1<<31-Xt(42|e)+1)-1,c&=o&~(p&~x),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(a=!0,Cp(l,c))}else c=we,c=Kr(l,l===Ke?c:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(c&3)===0||vi(l,c)||(a=!0,Cp(l,c));l=l.next}while(a);Mf=!1}}function Hx(){Tp()}function Tp(){Qo=Nf=!1;var e=0;Da!==0&&Ix()&&(e=Da);for(var t=St(),a=null,l=Go;l!==null;){var o=l.next,c=wp(l,t);c===0?(l.next=null,a===null?Go=o:a.next=o,o===null&&(kl=a)):(a=l,(e!==0||(c&3)!==0)&&(Qo=!0)),l=o}ut!==0&&ut!==5||Wi(e),Da!==0&&(Da=0)}function wp(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,o=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var p=31-Xt(c),x=1<<p,T=o[p];T===-1?((x&a)===0||(x&l)!==0)&&(o[p]=hb(x,t)):T<=t&&(e.expiredLanes|=x),c&=~x}if(t=Ke,a=we,a=Kr(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,a===0||e===t&&(Ue===2||Ue===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&pi(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||vi(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(l!==null&&pi(l),Vu(a)){case 2:case 8:a=Nn;break;case 32:a=al;break;case 268435456:a=gh;break;default:a=al}return l=Ep.bind(null,e),a=Sn(a,l),e.callbackPriority=t,e.callbackNode=a,t}return l!==null&&l!==null&&pi(l),e.callbackPriority=2,e.callbackNode=null,2}function Ep(e,t){if(ut!==0&&ut!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Ho()&&e.callbackNode!==a)return null;var l=we;return l=Kr(e,e===Ke?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(op(e,l,t),wp(e,St()),e.callbackNode!=null&&e.callbackNode===a?Ep.bind(null,e):null)}function Cp(e,t){if(Ho())return null;op(e,t,!0)}function Gx(){Wx(function(){(ze&6)!==0?Sn(yt,Hx):Tp()})}function Af(){if(Da===0){var e=jl;e===0&&(e=Qr,Qr<<=1,(Qr&261888)===0&&(Qr=256)),Da=e}return Da}function Np(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Jr(""+e)}function Mp(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function Qx(e,t,a,l,o){if(t==="submit"&&a&&a.stateNode===o){var c=Np((o[At]||null).action),p=l.submitter;p&&(t=(t=p[At]||null)?Np(t.formAction):p.getAttribute("formAction"),t!==null&&(c=t,p=null));var x=new Wr("action","action",null,l,o);e.push({event:x,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Da!==0){var T=p?Mp(o,p):new FormData(o);Fc(a,{pending:!0,data:T,method:o.method,action:c},null,T)}}else typeof c=="function"&&(x.preventDefault(),T=p?Mp(o,p):new FormData(o),Fc(a,{pending:!0,data:T,method:o.method,action:c},c,T))},currentTarget:o}]})}}for(var Of=0;Of<hc.length;Of++){var zf=hc[Of],Yx=zf.toLowerCase(),Vx=zf[0].toUpperCase()+zf.slice(1);jn(Yx,"on"+Vx)}jn(rm,"onAnimationEnd"),jn(om,"onAnimationIteration"),jn(um,"onAnimationStart"),jn("dblclick","onDoubleClick"),jn("focusin","onFocus"),jn("focusout","onBlur"),jn(ix,"onTransitionRun"),jn(rx,"onTransitionStart"),jn(ox,"onTransitionCancel"),jn(cm,"onTransitionEnd"),ol("onMouseEnter",["mouseout","mouseover"]),ol("onMouseLeave",["mouseout","mouseover"]),ol("onPointerEnter",["pointerout","pointerover"]),ol("onPointerLeave",["pointerout","pointerover"]),ds("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ds("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ds("onBeforeInput",["compositionend","keypress","textInput","paste"]),ds("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ds("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ds("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var er="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Kx=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(er));function Ap(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var l=e[a],o=l.event;l=l.listeners;e:{var c=void 0;if(t)for(var p=l.length-1;0<=p;p--){var x=l[p],T=x.instance,q=x.currentTarget;if(x=x.listener,T!==c&&o.isPropagationStopped())break e;c=x,o.currentTarget=q;try{c(o)}catch(P){no(P)}o.currentTarget=null,c=T}else for(p=0;p<l.length;p++){if(x=l[p],T=x.instance,q=x.currentTarget,x=x.listener,T!==c&&o.isPropagationStopped())break e;c=x,o.currentTarget=q;try{c(o)}catch(P){no(P)}o.currentTarget=null,c=T}}}}function Te(e,t){var a=t[Ku];a===void 0&&(a=t[Ku]=new Set);var l=e+"__bubble";a.has(l)||(Op(t,e,2,!1),a.add(l))}function Df(e,t,a){var l=0;t&&(l|=4),Op(a,e,l,t)}var Yo="_reactListening"+Math.random().toString(36).slice(2);function Uf(e){if(!e[Yo]){e[Yo]=!0,Th.forEach(function(a){a!=="selectionchange"&&(Kx.has(a)||Df(a,!1,e),Df(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Yo]||(t[Yo]=!0,Df("selectionchange",!1,t))}}function Op(e,t,a,l){switch(rg(t)){case 2:var o=b1;break;case 8:o=x1;break;default:o=Ff}a=o.bind(null,t,a,e),o=void 0,!ec||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),l?o!==void 0?e.addEventListener(t,a,{capture:!0,passive:o}):e.addEventListener(t,a,!0):o!==void 0?e.addEventListener(t,a,{passive:o}):e.addEventListener(t,a,!1)}function Lf(e,t,a,l,o){var c=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var p=l.tag;if(p===3||p===4){var x=l.stateNode.containerInfo;if(x===o)break;if(p===4)for(p=l.return;p!==null;){var T=p.tag;if((T===3||T===4)&&p.stateNode.containerInfo===o)return;p=p.return}for(;x!==null;){if(p=ll(x),p===null)return;if(T=p.tag,T===5||T===6||T===26||T===27){l=c=p;continue e}x=x.parentNode}}l=l.return}kh(function(){var q=c,P=$u(a),I=[];e:{var G=fm.get(e);if(G!==void 0){var Y=Wr,ue=e;switch(e){case"keypress":if(Ir(a)===0)break e;case"keydown":case"keyup":Y=Bb;break;case"focusin":ue="focus",Y=sc;break;case"focusout":ue="blur",Y=sc;break;case"beforeblur":case"afterblur":Y=sc;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Y=Hh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Y=wb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Y=Gb;break;case rm:case om:case um:Y=Nb;break;case cm:Y=Yb;break;case"scroll":case"scrollend":Y=_b;break;case"wheel":Y=Kb;break;case"copy":case"cut":case"paste":Y=Ab;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Y=Qh;break;case"toggle":case"beforetoggle":Y=Pb}var pe=(t&4)!==0,Qe=!pe&&(e==="scroll"||e==="scrollend"),z=pe?G!==null?G+"Capture":null:G;pe=[];for(var N=q,B;N!==null;){var J=N;if(B=J.stateNode,J=J.tag,J!==5&&J!==26&&J!==27||B===null||z===null||(J=ji(N,z),J!=null&&pe.push(tr(N,J,B))),Qe)break;N=N.return}0<pe.length&&(G=new Y(G,ue,null,a,P),I.push({event:G,listeners:pe}))}}if((t&7)===0){e:{if(G=e==="mouseover"||e==="pointerover",Y=e==="mouseout"||e==="pointerout",G&&a!==Iu&&(ue=a.relatedTarget||a.fromElement)&&(ll(ue)||ue[sl]))break e;if((Y||G)&&(G=P.window===P?P:(G=P.ownerDocument)?G.defaultView||G.parentWindow:window,Y?(ue=a.relatedTarget||a.toElement,Y=q,ue=ue?ll(ue):null,ue!==null&&(Qe=f(ue),pe=ue.tag,ue!==Qe||pe!==5&&pe!==27&&pe!==6)&&(ue=null)):(Y=null,ue=q),Y!==ue)){if(pe=Hh,J="onMouseLeave",z="onMouseEnter",N="mouse",(e==="pointerout"||e==="pointerover")&&(pe=Qh,J="onPointerLeave",z="onPointerEnter",N="pointer"),Qe=Y==null?G:Si(Y),B=ue==null?G:Si(ue),G=new pe(J,N+"leave",Y,a,P),G.target=Qe,G.relatedTarget=B,J=null,ll(P)===q&&(pe=new pe(z,N+"enter",ue,a,P),pe.target=B,pe.relatedTarget=Qe,J=pe),Qe=J,Y&&ue)t:{for(pe=Xx,z=Y,N=ue,B=0,J=z;J;J=pe(J))B++;J=0;for(var ye=N;ye;ye=pe(ye))J++;for(;0<B-J;)z=pe(z),B--;for(;0<J-B;)N=pe(N),J--;for(;B--;){if(z===N||N!==null&&z===N.alternate){pe=z;break t}z=pe(z),N=pe(N)}pe=null}else pe=null;Y!==null&&zp(I,G,Y,pe,!1),ue!==null&&Qe!==null&&zp(I,Qe,ue,pe,!0)}}e:{if(G=q?Si(q):window,Y=G.nodeName&&G.nodeName.toLowerCase(),Y==="select"||Y==="input"&&G.type==="file")var Ae=Fh;else if(Zh(G))if(Ih)Ae=ax;else{Ae=tx;var fe=ex}else Y=G.nodeName,!Y||Y.toLowerCase()!=="input"||G.type!=="checkbox"&&G.type!=="radio"?q&&Fu(q.elementType)&&(Ae=Fh):Ae=nx;if(Ae&&(Ae=Ae(e,q))){Jh(I,Ae,a,P);break e}fe&&fe(e,G,q),e==="focusout"&&q&&G.type==="number"&&q.memoizedProps.value!=null&&Ju(G,"number",G.value)}switch(fe=q?Si(q):window,e){case"focusin":(Zh(fe)||fe.contentEditable==="true")&&(ml=fe,cc=q,Mi=null);break;case"focusout":Mi=cc=ml=null;break;case"mousedown":fc=!0;break;case"contextmenu":case"mouseup":case"dragend":fc=!1,lm(I,a,P);break;case"selectionchange":if(lx)break;case"keydown":case"keyup":lm(I,a,P)}var xe;if(ic)e:{switch(e){case"compositionstart":var Ee="onCompositionStart";break e;case"compositionend":Ee="onCompositionEnd";break e;case"compositionupdate":Ee="onCompositionUpdate";break e}Ee=void 0}else hl?Xh(e,a)&&(Ee="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Ee="onCompositionStart");Ee&&(Yh&&a.locale!=="ko"&&(hl||Ee!=="onCompositionStart"?Ee==="onCompositionEnd"&&hl&&(xe=Bh()):(va=P,tc="value"in va?va.value:va.textContent,hl=!0)),fe=Vo(q,Ee),0<fe.length&&(Ee=new Gh(Ee,e,null,a,P),I.push({event:Ee,listeners:fe}),xe?Ee.data=xe:(xe=Ph(a),xe!==null&&(Ee.data=xe)))),(xe=Jb?Fb(e,a):Ib(e,a))&&(Ee=Vo(q,"onBeforeInput"),0<Ee.length&&(fe=new Gh("onBeforeInput","beforeinput",null,a,P),I.push({event:fe,listeners:Ee}),fe.data=xe)),Qx(I,e,q,a,P)}Ap(I,t)})}function tr(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Vo(e,t){for(var a=t+"Capture",l=[];e!==null;){var o=e,c=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||c===null||(o=ji(e,a),o!=null&&l.unshift(tr(e,o,c)),o=ji(e,t),o!=null&&l.push(tr(e,o,c))),e.tag===3)return l;e=e.return}return[]}function Xx(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function zp(e,t,a,l,o){for(var c=t._reactName,p=[];a!==null&&a!==l;){var x=a,T=x.alternate,q=x.stateNode;if(x=x.tag,T!==null&&T===l)break;x!==5&&x!==26&&x!==27||q===null||(T=q,o?(q=ji(a,c),q!=null&&p.unshift(tr(a,q,T))):o||(q=ji(a,c),q!=null&&p.push(tr(a,q,T)))),a=a.return}p.length!==0&&e.push({event:t,listeners:p})}var Px=/\r\n?/g,Zx=/\u0000|\uFFFD/g;function Dp(e){return(typeof e=="string"?e:""+e).replace(Px,`
65
- `).replace(Zx,"")}function Up(e,t){return t=Dp(t),Dp(e)===t}function Ge(e,t,a,l,o,c){switch(a){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||cl(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&cl(e,""+l);break;case"className":Pr(e,"class",l);break;case"tabIndex":Pr(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Pr(e,a,l);break;case"style":Uh(e,l,c);break;case"data":if(t!=="object"){Pr(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=Jr(""+l),e.setAttribute(a,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof c=="function"&&(a==="formAction"?(t!=="input"&&Ge(e,t,"name",o.name,o,null),Ge(e,t,"formEncType",o.formEncType,o,null),Ge(e,t,"formMethod",o.formMethod,o,null),Ge(e,t,"formTarget",o.formTarget,o,null)):(Ge(e,t,"encType",o.encType,o,null),Ge(e,t,"method",o.method,o,null),Ge(e,t,"target",o.target,o,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=Jr(""+l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=Vn);break;case"onScroll":l!=null&&Te("scroll",e);break;case"onScrollEnd":l!=null&&Te("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(a=l.__html,a!=null){if(o.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}a=Jr(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""+l):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":l===!0?e.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,l):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(a,l):e.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(a):e.setAttribute(a,l);break;case"popover":Te("beforetoggle",e),Te("toggle",e),Xr(e,"popover",l);break;case"xlinkActuate":Yn(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Yn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Yn(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Yn(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Yn(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Yn(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Yn(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Yn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Yn(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Xr(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=jb.get(a)||a,Xr(e,a,l))}}function kf(e,t,a,l,o,c){switch(a){case"style":Uh(e,l,c);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(a=l.__html,a!=null){if(o.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"children":typeof l=="string"?cl(e,l):(typeof l=="number"||typeof l=="bigint")&&cl(e,""+l);break;case"onScroll":l!=null&&Te("scroll",e);break;case"onScrollEnd":l!=null&&Te("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Vn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!wh.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(o=a.endsWith("Capture"),t=a.slice(2,o?a.length-7:void 0),c=e[At]||null,c=c!=null?c[a]:null,typeof c=="function"&&e.removeEventListener(t,c,o),typeof l=="function")){typeof c!="function"&&c!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,l,o);break e}a in e?e[a]=l:l===!0?e.setAttribute(a,""):Xr(e,a,l)}}}function xt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Te("error",e),Te("load",e);var l=!1,o=!1,c;for(c in a)if(a.hasOwnProperty(c)){var p=a[c];if(p!=null)switch(c){case"src":l=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Ge(e,t,c,p,a,null)}}o&&Ge(e,t,"srcSet",a.srcSet,a,null),l&&Ge(e,t,"src",a.src,a,null);return;case"input":Te("invalid",e);var x=c=p=o=null,T=null,q=null;for(l in a)if(a.hasOwnProperty(l)){var P=a[l];if(P!=null)switch(l){case"name":o=P;break;case"type":p=P;break;case"checked":T=P;break;case"defaultChecked":q=P;break;case"value":c=P;break;case"defaultValue":x=P;break;case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(r(137,t));break;default:Ge(e,t,l,P,a,null)}}Ah(e,c,x,T,q,p,o,!1);return;case"select":Te("invalid",e),l=p=c=null;for(o in a)if(a.hasOwnProperty(o)&&(x=a[o],x!=null))switch(o){case"value":c=x;break;case"defaultValue":p=x;break;case"multiple":l=x;default:Ge(e,t,o,x,a,null)}t=c,a=p,e.multiple=!!l,t!=null?ul(e,!!l,t,!1):a!=null&&ul(e,!!l,a,!0);return;case"textarea":Te("invalid",e),c=o=l=null;for(p in a)if(a.hasOwnProperty(p)&&(x=a[p],x!=null))switch(p){case"value":l=x;break;case"defaultValue":o=x;break;case"children":c=x;break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(r(91));break;default:Ge(e,t,p,x,a,null)}zh(e,l,o,c);return;case"option":for(T in a)if(a.hasOwnProperty(T)&&(l=a[T],l!=null))switch(T){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:Ge(e,t,T,l,a,null)}return;case"dialog":Te("beforetoggle",e),Te("toggle",e),Te("cancel",e),Te("close",e);break;case"iframe":case"object":Te("load",e);break;case"video":case"audio":for(l=0;l<er.length;l++)Te(er[l],e);break;case"image":Te("error",e),Te("load",e);break;case"details":Te("toggle",e);break;case"embed":case"source":case"link":Te("error",e),Te("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(q in a)if(a.hasOwnProperty(q)&&(l=a[q],l!=null))switch(q){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Ge(e,t,q,l,a,null)}return;default:if(Fu(t)){for(P in a)a.hasOwnProperty(P)&&(l=a[P],l!==void 0&&kf(e,t,P,l,a,void 0));return}}for(x in a)a.hasOwnProperty(x)&&(l=a[x],l!=null&&Ge(e,t,x,l,a,null))}function Jx(e,t,a,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,c=null,p=null,x=null,T=null,q=null,P=null;for(Y in a){var I=a[Y];if(a.hasOwnProperty(Y)&&I!=null)switch(Y){case"checked":break;case"value":break;case"defaultValue":T=I;default:l.hasOwnProperty(Y)||Ge(e,t,Y,null,l,I)}}for(var G in l){var Y=l[G];if(I=a[G],l.hasOwnProperty(G)&&(Y!=null||I!=null))switch(G){case"type":c=Y;break;case"name":o=Y;break;case"checked":q=Y;break;case"defaultChecked":P=Y;break;case"value":p=Y;break;case"defaultValue":x=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(r(137,t));break;default:Y!==I&&Ge(e,t,G,Y,l,I)}}Zu(e,p,x,T,q,P,c,o);return;case"select":Y=p=x=G=null;for(c in a)if(T=a[c],a.hasOwnProperty(c)&&T!=null)switch(c){case"value":break;case"multiple":Y=T;default:l.hasOwnProperty(c)||Ge(e,t,c,null,l,T)}for(o in l)if(c=l[o],T=a[o],l.hasOwnProperty(o)&&(c!=null||T!=null))switch(o){case"value":G=c;break;case"defaultValue":x=c;break;case"multiple":p=c;default:c!==T&&Ge(e,t,o,c,l,T)}t=x,a=p,l=Y,G!=null?ul(e,!!a,G,!1):!!l!=!!a&&(t!=null?ul(e,!!a,t,!0):ul(e,!!a,a?[]:"",!1));return;case"textarea":Y=G=null;for(x in a)if(o=a[x],a.hasOwnProperty(x)&&o!=null&&!l.hasOwnProperty(x))switch(x){case"value":break;case"children":break;default:Ge(e,t,x,null,l,o)}for(p in l)if(o=l[p],c=a[p],l.hasOwnProperty(p)&&(o!=null||c!=null))switch(p){case"value":G=o;break;case"defaultValue":Y=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(r(91));break;default:o!==c&&Ge(e,t,p,o,l,c)}Oh(e,G,Y);return;case"option":for(var ue in a)if(G=a[ue],a.hasOwnProperty(ue)&&G!=null&&!l.hasOwnProperty(ue))switch(ue){case"selected":e.selected=!1;break;default:Ge(e,t,ue,null,l,G)}for(T in l)if(G=l[T],Y=a[T],l.hasOwnProperty(T)&&G!==Y&&(G!=null||Y!=null))switch(T){case"selected":e.selected=G&&typeof G!="function"&&typeof G!="symbol";break;default:Ge(e,t,T,G,l,Y)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var pe in a)G=a[pe],a.hasOwnProperty(pe)&&G!=null&&!l.hasOwnProperty(pe)&&Ge(e,t,pe,null,l,G);for(q in l)if(G=l[q],Y=a[q],l.hasOwnProperty(q)&&G!==Y&&(G!=null||Y!=null))switch(q){case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(r(137,t));break;default:Ge(e,t,q,G,l,Y)}return;default:if(Fu(t)){for(var Qe in a)G=a[Qe],a.hasOwnProperty(Qe)&&G!==void 0&&!l.hasOwnProperty(Qe)&&kf(e,t,Qe,void 0,l,G);for(P in l)G=l[P],Y=a[P],!l.hasOwnProperty(P)||G===Y||G===void 0&&Y===void 0||kf(e,t,P,G,l,Y);return}}for(var z in a)G=a[z],a.hasOwnProperty(z)&&G!=null&&!l.hasOwnProperty(z)&&Ge(e,t,z,null,l,G);for(I in l)G=l[I],Y=a[I],!l.hasOwnProperty(I)||G===Y||G==null&&Y==null||Ge(e,t,I,G,l,Y)}function Lp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Fx(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),l=0;l<a.length;l++){var o=a[l],c=o.transferSize,p=o.initiatorType,x=o.duration;if(c&&x&&Lp(p)){for(p=0,x=o.responseEnd,l+=1;l<a.length;l++){var T=a[l],q=T.startTime;if(q>x)break;var P=T.transferSize,I=T.initiatorType;P&&Lp(I)&&(T=T.responseEnd,p+=P*(T<x?1:(x-q)/(T-q)))}if(--l,t+=8*(c+p)/(o.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Bf=null,qf=null;function Ko(e){return e.nodeType===9?e:e.ownerDocument}function kp(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Bp(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Hf(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Gf=null;function Ix(){var e=window.event;return e&&e.type==="popstate"?e===Gf?!1:(Gf=e,!0):(Gf=null,!1)}var qp=typeof setTimeout=="function"?setTimeout:void 0,$x=typeof clearTimeout=="function"?clearTimeout:void 0,Hp=typeof Promise=="function"?Promise:void 0,Wx=typeof queueMicrotask=="function"?queueMicrotask:typeof Hp<"u"?function(e){return Hp.resolve(null).then(e).catch(e1)}:qp;function e1(e){setTimeout(function(){throw e})}function Ua(e){return e==="head"}function Gp(e,t){var a=t,l=0;do{var o=a.nextSibling;if(e.removeChild(a),o&&o.nodeType===8)if(a=o.data,a==="/$"||a==="/&"){if(l===0){e.removeChild(o),Gl(t);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")nr(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,nr(a);for(var c=a.firstChild;c;){var p=c.nextSibling,x=c.nodeName;c[xi]||x==="SCRIPT"||x==="STYLE"||x==="LINK"&&c.rel.toLowerCase()==="stylesheet"||a.removeChild(c),c=p}}else a==="body"&&nr(e.ownerDocument.body);a=o}while(a);Gl(t)}function Qp(e,t){var a=e;e=0;do{var l=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),l&&l.nodeType===8)if(a=l.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=l}while(a)}function Qf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Qf(a),Xu(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function t1(e,t,a,l){for(;e.nodeType===1;){var o=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[xi])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(c=e.getAttribute("rel"),c==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(c!==o.rel||e.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||e.getAttribute("title")!==(o.title==null?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(c=e.getAttribute("src"),(c!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&c&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var c=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===c)return e}else return e;if(e=mn(e.nextSibling),e===null)break}return null}function n1(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=mn(e.nextSibling),e===null))return null;return e}function Yp(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=mn(e.nextSibling),e===null))return null;return e}function Yf(e){return e.data==="$?"||e.data==="$~"}function Vf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function a1(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var l=function(){t(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function mn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Kf=null;function Vp(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return mn(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function Kp(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function Xp(e,t,a){switch(t=Ko(a),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function nr(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Xu(e)}var yn=new Map,Pp=new Set;function Xo(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ia=X.d;X.d={f:s1,r:l1,D:i1,C:r1,L:o1,m:u1,X:f1,S:c1,M:d1};function s1(){var e=ia.f(),t=ko();return e||t}function l1(e){var t=il(e);t!==null&&t.tag===5&&t.type==="form"?cy(t):ia.r(e)}var Bl=typeof document>"u"?null:document;function Zp(e,t,a){var l=Bl;if(l&&typeof t=="string"&&t){var o=rn(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof a=="string"&&(o+='[crossorigin="'+a+'"]'),Pp.has(o)||(Pp.add(o),e={rel:e,crossOrigin:a,href:t},l.querySelector(o)===null&&(t=l.createElement("link"),xt(t,"link",e),dt(t),l.head.appendChild(t)))}}function i1(e){ia.D(e),Zp("dns-prefetch",e,null)}function r1(e,t){ia.C(e,t),Zp("preconnect",e,t)}function o1(e,t,a){ia.L(e,t,a);var l=Bl;if(l&&e&&t){var o='link[rel="preload"][as="'+rn(t)+'"]';t==="image"&&a&&a.imageSrcSet?(o+='[imagesrcset="'+rn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(o+='[imagesizes="'+rn(a.imageSizes)+'"]')):o+='[href="'+rn(e)+'"]';var c=o;switch(t){case"style":c=ql(e);break;case"script":c=Hl(e)}yn.has(c)||(e=v({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),yn.set(c,e),l.querySelector(o)!==null||t==="style"&&l.querySelector(ar(c))||t==="script"&&l.querySelector(sr(c))||(t=l.createElement("link"),xt(t,"link",e),dt(t),l.head.appendChild(t)))}}function u1(e,t){ia.m(e,t);var a=Bl;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+rn(l)+'"][href="'+rn(e)+'"]',c=o;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=Hl(e)}if(!yn.has(c)&&(e=v({rel:"modulepreload",href:e},t),yn.set(c,e),a.querySelector(o)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(sr(c)))return}l=a.createElement("link"),xt(l,"link",e),dt(l),a.head.appendChild(l)}}}function c1(e,t,a){ia.S(e,t,a);var l=Bl;if(l&&e){var o=rl(l).hoistableStyles,c=ql(e);t=t||"default";var p=o.get(c);if(!p){var x={loading:0,preload:null};if(p=l.querySelector(ar(c)))x.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":t},a),(a=yn.get(c))&&Xf(e,a);var T=p=l.createElement("link");dt(T),xt(T,"link",e),T._p=new Promise(function(q,P){T.onload=q,T.onerror=P}),T.addEventListener("load",function(){x.loading|=1}),T.addEventListener("error",function(){x.loading|=2}),x.loading|=4,Po(p,t,l)}p={type:"stylesheet",instance:p,count:1,state:x},o.set(c,p)}}}function f1(e,t){ia.X(e,t);var a=Bl;if(a&&e){var l=rl(a).hoistableScripts,o=Hl(e),c=l.get(o);c||(c=a.querySelector(sr(o)),c||(e=v({src:e,async:!0},t),(t=yn.get(o))&&Pf(e,t),c=a.createElement("script"),dt(c),xt(c,"link",e),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},l.set(o,c))}}function d1(e,t){ia.M(e,t);var a=Bl;if(a&&e){var l=rl(a).hoistableScripts,o=Hl(e),c=l.get(o);c||(c=a.querySelector(sr(o)),c||(e=v({src:e,async:!0,type:"module"},t),(t=yn.get(o))&&Pf(e,t),c=a.createElement("script"),dt(c),xt(c,"link",e),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},l.set(o,c))}}function Jp(e,t,a,l){var o=(o=me.current)?Xo(o):null;if(!o)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=ql(a.href),a=rl(o).hoistableStyles,l=a.get(t),l||(l={type:"style",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=ql(a.href);var c=rl(o).hoistableStyles,p=c.get(e);if(p||(o=o.ownerDocument||o,p={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,p),(c=o.querySelector(ar(e)))&&!c._p&&(p.instance=c,p.state.loading=5),yn.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},yn.set(e,a),c||h1(o,e,a,p.state))),t&&l===null)throw Error(r(528,""));return p}if(t&&l!==null)throw Error(r(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Hl(a),a=rl(o).hoistableScripts,l=a.get(t),l||(l={type:"script",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function ql(e){return'href="'+rn(e)+'"'}function ar(e){return'link[rel="stylesheet"]['+e+"]"}function Fp(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function h1(e,t,a,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),xt(t,"link",a),dt(t),e.head.appendChild(t))}function Hl(e){return'[src="'+rn(e)+'"]'}function sr(e){return"script[async]"+e}function Ip(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+rn(a.href)+'"]');if(l)return t.instance=l,dt(l),l;var o=v({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),dt(l),xt(l,"style",o),Po(l,a.precedence,e),t.instance=l;case"stylesheet":o=ql(a.href);var c=e.querySelector(ar(o));if(c)return t.state.loading|=4,t.instance=c,dt(c),c;l=Fp(a),(o=yn.get(o))&&Xf(l,o),c=(e.ownerDocument||e).createElement("link"),dt(c);var p=c;return p._p=new Promise(function(x,T){p.onload=x,p.onerror=T}),xt(c,"link",l),t.state.loading|=4,Po(c,a.precedence,e),t.instance=c;case"script":return c=Hl(a.src),(o=e.querySelector(sr(c)))?(t.instance=o,dt(o),o):(l=a,(o=yn.get(c))&&(l=v({},a),Pf(l,o)),e=e.ownerDocument||e,o=e.createElement("script"),dt(o),xt(o,"link",l),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,Po(l,a.precedence,e));return t.instance}function Po(e,t,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=l.length?l[l.length-1]:null,c=o,p=0;p<l.length;p++){var x=l[p];if(x.dataset.precedence===t)c=x;else if(c!==o)break}c?c.parentNode.insertBefore(e,c.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function Xf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Pf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Zo=null;function $p(e,t,a){if(Zo===null){var l=new Map,o=Zo=new Map;o.set(a,l)}else o=Zo,l=o.get(a),l||(l=new Map,o.set(a,l));if(l.has(e))return l;for(l.set(e,null),a=a.getElementsByTagName(e),o=0;o<a.length;o++){var c=a[o];if(!(c[xi]||c[pt]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var p=c.getAttribute(t)||"";p=e+p;var x=l.get(p);x?x.push(c):l.set(p,[c])}}return l}function Wp(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function m1(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function eg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function y1(e,t,a,l){if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var o=ql(l.href),c=t.querySelector(ar(o));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Jo.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=c,dt(c);return}c=t.ownerDocument||t,l=Fp(l),(o=yn.get(o))&&Xf(l,o),c=c.createElement("link"),dt(c);var p=c;p._p=new Promise(function(x,T){p.onload=x,p.onerror=T}),xt(c,"link",l),a.instance=c}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Jo.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Zf=0;function p1(e,t){return e.stylesheets&&e.count===0&&Io(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var l=setTimeout(function(){if(e.stylesheets&&Io(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},6e4+t);0<e.imgBytes&&Zf===0&&(Zf=62500*Fx());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Io(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>Zf?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(o)}}:null}function Jo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Io(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Fo=null;function Io(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Fo=new Map,t.forEach(g1,e),Fo=null,Jo.call(e))}function g1(e,t){if(!(t.state.loading&4)){var a=Fo.get(e);if(a)var l=a.get(null);else{a=new Map,Fo.set(e,a);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<o.length;c++){var p=o[c];(p.nodeName==="LINK"||p.getAttribute("media")!=="not all")&&(a.set(p.dataset.precedence,p),l=p)}l&&a.set(null,l)}o=t.instance,p=o.getAttribute("data-precedence"),c=a.get(p)||l,c===l&&a.set(null,o),a.set(p,o),this.count++,l=Jo.bind(this),o.addEventListener("load",l),o.addEventListener("error",l),c?c.parentNode.insertBefore(o,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var lr={$$typeof:H,Provider:null,Consumer:null,_currentValue:ce,_currentValue2:ce,_threadCount:0};function v1(e,t,a,l,o,c,p,x,T){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Qu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Qu(0),this.hiddenUpdates=Qu(null),this.identifierPrefix=l,this.onUncaughtError=o,this.onCaughtError=c,this.onRecoverableError=p,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=T,this.incompleteTransitions=new Map}function tg(e,t,a,l,o,c,p,x,T,q,P,I){return e=new v1(e,t,a,p,T,q,P,I,x),t=1,c===!0&&(t|=24),c=Zt(3,null,null,t),e.current=c,c.stateNode=e,t=wc(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:l,isDehydrated:a,cache:t},Mc(c),e}function ng(e){return e?(e=gl,e):gl}function ag(e,t,a,l,o,c){o=ng(o),l.context===null?l.context=o:l.pendingContext=o,l=_a(t),l.payload={element:a},c=c===void 0?null:c,c!==null&&(l.callback=c),a=Ta(e,l,t),a!==null&&(kt(a,e,t),ki(a,e,t))}function sg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function Jf(e,t){sg(e,t),(e=e.alternate)&&sg(e,t)}function lg(e){if(e.tag===13||e.tag===31){var t=ps(e,67108864);t!==null&&kt(t,e,67108864),Jf(e,67108864)}}function ig(e){if(e.tag===13||e.tag===31){var t=Wt();t=Yu(t);var a=ps(e,t);a!==null&&kt(a,e,t),Jf(e,t)}}var $o=!0;function b1(e,t,a,l){var o=L.T;L.T=null;var c=X.p;try{X.p=2,Ff(e,t,a,l)}finally{X.p=c,L.T=o}}function x1(e,t,a,l){var o=L.T;L.T=null;var c=X.p;try{X.p=8,Ff(e,t,a,l)}finally{X.p=c,L.T=o}}function Ff(e,t,a,l){if($o){var o=If(l);if(o===null)Lf(e,t,l,Wo,a),og(e,l);else if(j1(o,e,t,a,l))l.stopPropagation();else if(og(e,l),t&4&&-1<S1.indexOf(e)){for(;o!==null;){var c=il(o);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var p=fs(c.pendingLanes);if(p!==0){var x=c;for(x.pendingLanes|=2,x.entangledLanes|=2;p;){var T=1<<31-Xt(p);x.entanglements[1]|=T,p&=~T}zn(c),(ze&6)===0&&(Uo=St()+500,Wi(0))}}break;case 31:case 13:x=ps(c,2),x!==null&&kt(x,c,2),ko(),Jf(c,2)}if(c=If(l),c===null&&Lf(e,t,l,Wo,a),c===o)break;o=c}o!==null&&l.stopPropagation()}else Lf(e,t,l,null,a)}}function If(e){return e=$u(e),$f(e)}var Wo=null;function $f(e){if(Wo=null,e=ll(e),e!==null){var t=f(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=d(t),e!==null)return e;e=null}else if(a===31){if(e=y(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Wo=e,null}function rg(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(qe()){case yt:return 2;case Nn:return 8;case al:case rb:return 32;case gh:return 268435456;default:return 32}default:return 32}}var Wf=!1,La=null,ka=null,Ba=null,ir=new Map,rr=new Map,qa=[],S1="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function og(e,t){switch(e){case"focusin":case"focusout":La=null;break;case"dragenter":case"dragleave":ka=null;break;case"mouseover":case"mouseout":Ba=null;break;case"pointerover":case"pointerout":ir.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":rr.delete(t.pointerId)}}function or(e,t,a,l,o,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:a,eventSystemFlags:l,nativeEvent:c,targetContainers:[o]},t!==null&&(t=il(t),t!==null&&lg(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function j1(e,t,a,l,o){switch(t){case"focusin":return La=or(La,e,t,a,l,o),!0;case"dragenter":return ka=or(ka,e,t,a,l,o),!0;case"mouseover":return Ba=or(Ba,e,t,a,l,o),!0;case"pointerover":var c=o.pointerId;return ir.set(c,or(ir.get(c)||null,e,t,a,l,o)),!0;case"gotpointercapture":return c=o.pointerId,rr.set(c,or(rr.get(c)||null,e,t,a,l,o)),!0}return!1}function ug(e){var t=ll(e.target);if(t!==null){var a=f(t);if(a!==null){if(t=a.tag,t===13){if(t=d(a),t!==null){e.blockedOn=t,Rh(e.priority,function(){ig(a)});return}}else if(t===31){if(t=y(a),t!==null){e.blockedOn=t,Rh(e.priority,function(){ig(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function eu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=If(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);Iu=l,a.target.dispatchEvent(l),Iu=null}else return t=il(a),t!==null&&lg(t),e.blockedOn=a,!1;t.shift()}return!0}function cg(e,t,a){eu(e)&&a.delete(t)}function R1(){Wf=!1,La!==null&&eu(La)&&(La=null),ka!==null&&eu(ka)&&(ka=null),Ba!==null&&eu(Ba)&&(Ba=null),ir.forEach(cg),rr.forEach(cg)}function tu(e,t){e.blockedOn===t&&(e.blockedOn=null,Wf||(Wf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,R1)))}var nu=null;function fg(e){nu!==e&&(nu=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){nu===e&&(nu=null);for(var t=0;t<e.length;t+=3){var a=e[t],l=e[t+1],o=e[t+2];if(typeof l!="function"){if($f(l||a)===null)continue;break}var c=il(a);c!==null&&(e.splice(t,3),t-=3,Fc(c,{pending:!0,data:o,method:a.method,action:l},l,o))}}))}function Gl(e){function t(T){return tu(T,e)}La!==null&&tu(La,e),ka!==null&&tu(ka,e),Ba!==null&&tu(Ba,e),ir.forEach(t),rr.forEach(t);for(var a=0;a<qa.length;a++){var l=qa[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<qa.length&&(a=qa[0],a.blockedOn===null);)ug(a),a.blockedOn===null&&qa.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var o=a[l],c=a[l+1],p=o[At]||null;if(typeof c=="function")p||fg(a);else if(p){var x=null;if(c&&c.hasAttribute("formAction")){if(o=c,p=c[At]||null)x=p.formAction;else if($f(o)!==null)continue}else x=p.action;typeof x=="function"?a[l+1]=x:(a.splice(l,3),l-=3),fg(a)}}}function dg(){function e(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(p){return o=p})},focusReset:"manual",scroll:"manual"})}function t(){o!==null&&(o(),o=null),l||setTimeout(a,20)}function a(){if(!l&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,o=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),o!==null&&(o(),o=null)}}}function ed(e){this._internalRoot=e}au.prototype.render=ed.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var a=t.current,l=Wt();ag(a,l,e,t,null,null)},au.prototype.unmount=ed.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ag(e.current,2,null,e,null,null),ko(),t[sl]=null}};function au(e){this._internalRoot=e}au.prototype.unstable_scheduleHydration=function(e){if(e){var t=jh();e={blockedOn:null,target:e,priority:t};for(var a=0;a<qa.length&&t!==0&&t<qa[a].priority;a++);qa.splice(a,0,e),a===0&&ug(e)}};var hg=s.version;if(hg!=="19.2.6")throw Error(r(527,hg,"19.2.6"));X.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=m(t),e=e!==null?b(e):null,e=e===null?null:e.stateNode,e};var _1={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var su=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!su.isDisabled&&su.supportsFiber)try{gi=su.inject(_1),Kt=su}catch{}}return hr.createRoot=function(e,t){if(!u(e))throw Error(r(299));var a=!1,l="",o=xy,c=Sy,p=jy;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(p=t.onRecoverableError)),t=tg(e,1,!1,null,null,a,l,null,o,c,p,dg),e[sl]=t.current,Uf(e),new ed(t)},hr.hydrateRoot=function(e,t,a){if(!u(e))throw Error(r(299));var l=!1,o="",c=xy,p=Sy,x=jy,T=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(o=a.identifierPrefix),a.onUncaughtError!==void 0&&(c=a.onUncaughtError),a.onCaughtError!==void 0&&(p=a.onCaughtError),a.onRecoverableError!==void 0&&(x=a.onRecoverableError),a.formState!==void 0&&(T=a.formState)),t=tg(e,1,!0,t,a??null,l,o,T,c,p,x,dg),t.context=ng(null),a=t.current,l=Wt(),l=Yu(l),o=_a(l),o.callback=null,Ta(a,o,l),a=l,t.current.lanes=a,bi(t,a),zn(t),e[sl]=t.current,Uf(e),new au(t)},hr.version="19.2.6",hr}var rv;function dj(){if(rv)return gd.exports;rv=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(s){console.error(s)}}return n(),gd.exports=fj(),gd.exports}var hj=dj();function mj(){var n;return typeof window<"u"&&((n=window.__HOGSEND_STUDIO__)!=null&&n.baseUrl)?window.__HOGSEND_STUDIO__.baseUrl.replace(/\/$/,""):typeof window<"u"?window.location.origin:""}const w0={baseUrl:mj()};class bn extends Error{constructor(i,r,u){super(r);Ga(this,"status");Ga(this,"body");this.name="ApiError",this.status=i,this.body=u}}function yj(n,s){const r=`${w0.baseUrl}${n.startsWith("/")?n:`/${n}`}`;if(!s)return r;const u=new URLSearchParams;for(const[d,y]of Object.entries(s))y!=null&&u.append(d,String(y));const f=u.toString();return f?`${r}?${f}`:r}async function mr(n,s={}){const{json:i,query:r,headers:u,...f}=s,d={credentials:"include",...f,headers:{Accept:"application/json",...i!==void 0?{"Content-Type":"application/json"}:{},...u}};i!==void 0&&(d.body=JSON.stringify(i));const y=await fetch(yj(n,r),d),m=(y.headers.get("content-type")??"").includes("application/json"),b=m?await y.json().catch(()=>null):await y.text().catch(()=>null);if(!y.ok){const v=(m&&b&&typeof b=="object"&&"message"in b&&typeof b.message=="string"?b.message:null)??`Request failed with status ${y.status}`;throw new bn(y.status,v,b)}return b}const tt={request:mr,get:(n,s)=>mr(n,{...s,method:"GET"}),post:(n,s)=>mr(n,{...s,method:"POST"}),put:(n,s)=>mr(n,{...s,method:"PUT"}),delete:(n,s)=>mr(n,{...s,method:"DELETE"})};function pj(){return tt.get("/v1/auth/status")}var gj={};const ju=Object.create(null),yr=n=>{var s;return gj||((s=globalThis.Deno)==null?void 0:s.env.toObject())||globalThis.__env__||(n?ju:globalThis)},Ms=new Proxy(ju,{get(n,s){return yr()[s]??ju[s]},has(n,s){return s in yr()||s in ju},set(n,s,i){const r=yr(!0);return r[s]=i,!0},deleteProperty(n,s){if(!s)return!1;const i=yr(!0);return delete i[s],!0},ownKeys(){const n=yr(!0);return Object.keys(n)}});var Ru=class extends Error{constructor(n,s){super(n,s),this.name="BetterAuthError",this.message=n,this.stack=""}};function vj(n){try{return(new URL(n).pathname.replace(/\/+$/,"")||"/")!=="/"}catch{throw new Ru(`Invalid base URL: ${n}. Please provide a valid base URL.`)}}function bj(n){try{const s=new URL(n);if(s.protocol!=="http:"&&s.protocol!=="https:")throw new Ru(`Invalid base URL: ${n}. URL must include 'http://' or 'https://'`)}catch(s){throw s instanceof Ru?s:new Ru(`Invalid base URL: ${n}. Please provide a valid base URL.`,{cause:s})}}function xd(n,s="/api/auth"){if(bj(n),vj(n))return n;const i=n.replace(/\/+$/,"");return!s||s==="/"?i:(s=s.startsWith("/")?s:`/${s}`,`${i}${s}`)}function xj(n,s,i,r,u){if(n)return xd(n,s);{const f=Ms.BETTER_AUTH_URL||Ms.NEXT_PUBLIC_BETTER_AUTH_URL||Ms.PUBLIC_BETTER_AUTH_URL||Ms.NUXT_PUBLIC_BETTER_AUTH_URL||Ms.NUXT_PUBLIC_AUTH_URL||(Ms.BASE_URL!=="/"?Ms.BASE_URL:void 0);if(f)return xd(f,s)}if(typeof window<"u"&&window.location)return xd(window.location.origin,s)}const Sj={proto:/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,constructor:/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,protoShort:/"__proto__"\s*:/,constructorShort:/"constructor"\s*:/},jj=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,ov={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:Number.POSITIVE_INFINITY,"-infinity":Number.NEGATIVE_INFINITY},Rj=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function _j(n){return n instanceof Date&&!isNaN(n.getTime())}function Tj(n){const s=Rj.exec(n);if(!s)return null;const[,i,r,u,f,d,y,g,m,b,v]=s,S=new Date(Date.UTC(parseInt(i,10),parseInt(r,10)-1,parseInt(u,10),parseInt(f,10),parseInt(d,10),parseInt(y,10),g?parseInt(g.padEnd(3,"0"),10):0));if(m){const j=(parseInt(b,10)*60+parseInt(v,10))*(m==="+"?-1:1);S.setUTCMinutes(S.getUTCMinutes()+j)}return _j(S)?S:null}function wj(n,s={}){const{strict:i=!1,warnings:r=!1,reviver:u,parseDates:f=!0}=s;if(typeof n!="string")return n;const d=n.trim();if(d.length>0&&d[0]==='"'&&d.endsWith('"')&&!d.slice(1,-1).includes('"'))return d.slice(1,-1);const y=d.toLowerCase();if(y.length<=9&&y in ov)return ov[y];if(!jj.test(d)){if(i)throw new SyntaxError("[better-json] Invalid JSON");return n}if(Object.entries(Sj).some(([g,m])=>{const b=m.test(d);return b&&r&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${g} pattern`),b})&&i)throw new Error("[better-json] Potential prototype pollution attempt detected");try{return JSON.parse(d,(m,b)=>{if(m==="__proto__"||m==="constructor"&&b&&typeof b=="object"&&"prototype"in b){r&&console.warn(`[better-json] Dropping "${m}" key to prevent prototype pollution`);return}if(f&&typeof b=="string"){const v=Tj(b);if(v)return v}return u?u(m,b):b})}catch(g){if(i)throw g;return n}}function Ej(n,s={strict:!0}){return wj(n,s)}const Cj={id:"redirect",name:"Redirect",hooks:{onSuccess(n){var s,i;if((s=n.data)!=null&&s.url&&((i=n.data)!=null&&i.redirect)&&typeof window<"u"&&window.location&&window.location)try{window.location.href=n.data.url}catch{}}}};let Tn=[],Qa=0;const fu=4,Nj=globalThis.nanostoresGlobal||(globalThis.nanostoresGlobal={epoch:0}),E0=n=>{let s=[],i={get(){return i.lc||i.listen(()=>{})(),i.value},init:n,lc:0,listen(r){return i.lc=s.push(r),()=>{for(let f=Qa+fu;f<Tn.length;)Tn[f]===r?Tn.splice(f,fu):f+=fu;let u=s.indexOf(r);~u&&(s.splice(u,1),--i.lc||i.off())}},notify(r,u){Nj.epoch++;let f=!Tn.length;for(let d of s)Tn.push(d,i.value,r,u);if(f){for(Qa=0;Qa<Tn.length;Qa+=fu)Tn[Qa](Tn[Qa+1],Tn[Qa+2],Tn[Qa+3]);Tn.length=0}},off(){},set(r){let u=i.value;u!==r&&(i.value=r,i.notify(u))},subscribe(r){let u=i.listen(r);return r(i.value),u},value:n};return i},Mj=5,du=6,hu=10;let Aj=(n,s,i,r)=>(n.events=n.events||{},n.events[i+hu]||(n.events[i+hu]=r(u=>{n.events[i].reduceRight((f,d)=>(d(f),f),{shared:{},...u})})),n.events[i]=n.events[i]||[],n.events[i].push(s),()=>{let u=n.events[i],f=u.indexOf(s);u.splice(f,1),u.length||(delete n.events[i],n.events[i+hu](),delete n.events[i+hu])});const Oj=1e3;let C0=(n,s)=>Aj(n,r=>{let u=s(r);u&&n.events[du].push(u)},Mj,r=>{let u=n.listen;n.listen=(...d)=>(!n.lc&&!n.active&&(n.active=!0,r()),u(...d));let f=n.off;return n.events[du]=[],n.off=()=>{f(),setTimeout(()=>{if(n.active&&!n.lc){n.active=!1;for(let d of n.events[du])d();n.events[du]=[]}},Oj)},()=>{n.listen=u,n.off=f}});function zj(n,s,i){let r=new Set(s).add(void 0);return n.listen((u,f,d)=>{r.has(d)&&i(u,f,d)})}const Dj=()=>typeof window>"u",Uj=(n,s,i,r)=>{const u=E0({data:null,error:null,isPending:!0,isRefetching:!1,refetch:y=>f(y)}),f=async y=>new Promise(g=>{const m=typeof r=="function"?r({data:u.get().data,error:u.get().error,isPending:u.get().isPending}):r;i(s,{...m,query:{...m==null?void 0:m.query,...y==null?void 0:y.query},async onSuccess(b){var v;u.set({data:b.data,error:null,isPending:!1,isRefetching:!1,refetch:u.value.refetch}),await((v=m==null?void 0:m.onSuccess)==null?void 0:v.call(m,b))},async onError(b){var w,R;const{request:v}=b,S=typeof v.retry=="number"?v.retry:(w=v.retry)==null?void 0:w.attempts,j=v.retryAttempt||0;if(S&&j<S)return;const _=b.error.status===401;u.set({error:b.error,data:_?null:u.get().data,isPending:!1,isRefetching:!1,refetch:u.value.refetch}),await((R=m==null?void 0:m.onError)==null?void 0:R.call(m,b))},async onRequest(b){var S;const v=u.get();u.set({isPending:v.data===null,data:v.data,error:null,isRefetching:!0,refetch:u.value.refetch}),await((S=m==null?void 0:m.onRequest)==null?void 0:S.call(m,b))}}).catch(b=>{u.set({error:b,data:u.get().data,isPending:!1,isRefetching:!1,refetch:u.value.refetch})}).finally(()=>{g(void 0)})});n=Array.isArray(n)?n:[n];let d=!1;for(const y of n)y.subscribe(async()=>{Dj()||(d?await f():C0(u,()=>{const g=setTimeout(async()=>{d||(d=!0,await f())},0);return()=>{u.off(),y.off(),clearTimeout(g)}}))});return u},Sd=Symbol.for("better-auth:broadcast-channel"),Lj=()=>Math.floor(Date.now()/1e3);var kj=class{constructor(n="better-auth.message"){Ga(this,"listeners",new Set);Ga(this,"name");this.name=n}subscribe(n){return this.listeners.add(n),()=>{this.listeners.delete(n)}}post(n){if(!(typeof window>"u"))try{localStorage.setItem(this.name,JSON.stringify({...n,timestamp:Lj()}))}catch{}}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};const n=s=>{if(s.key!==this.name)return;const i=JSON.parse(s.newValue??"{}");(i==null?void 0:i.event)!=="session"||!(i!=null&&i.data)||this.listeners.forEach(r=>r(i))};return window.addEventListener("storage",n),()=>{window.removeEventListener("storage",n)}}};function jd(n="better-auth.message"){return globalThis[Sd]||(globalThis[Sd]=new kj(n)),globalThis[Sd]}const Rd=Symbol.for("better-auth:focus-manager");var Bj=class{constructor(){Ga(this,"listeners",new Set)}subscribe(n){return this.listeners.add(n),()=>{this.listeners.delete(n)}}setFocused(n){this.listeners.forEach(s=>s(n))}setup(){if(typeof window>"u"||typeof document>"u"||typeof window.addEventListener>"u")return()=>{};const n=()=>{document.visibilityState==="visible"&&this.setFocused(!0)};return document.addEventListener("visibilitychange",n,!1),()=>{document.removeEventListener("visibilitychange",n,!1)}}};function uv(){return globalThis[Rd]||(globalThis[Rd]=new Bj),globalThis[Rd]}const _d=Symbol.for("better-auth:online-manager");var qj=class{constructor(){Ga(this,"listeners",new Set);Ga(this,"isOnline",typeof navigator<"u"?navigator.onLine:!0)}subscribe(n){return this.listeners.add(n),()=>{this.listeners.delete(n)}}setOnline(n){this.isOnline=n,this.listeners.forEach(s=>s(n))}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};const n=()=>this.setOnline(!0),s=()=>this.setOnline(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",n,!1),window.removeEventListener("offline",s,!1)}}};function Td(){return globalThis[_d]||(globalThis[_d]=new qj),globalThis[_d]}const Yl=()=>Math.floor(Date.now()/1e3);function cv(n){return typeof n=="object"&&n!==null&&"data"in n&&"error"in n?n:{data:n,error:null}}const Hj=5;function Gj(n){var k,H,M;const{sessionAtom:s,sessionSignal:i,$fetch:r,options:u={}}=n,f=((k=u.sessionOptions)==null?void 0:k.refetchInterval)??0,d=((H=u.sessionOptions)==null?void 0:H.refetchOnWindowFocus)??!0,y=((M=u.sessionOptions)==null?void 0:M.refetchWhenOffline)??!1,g={lastSync:0,lastSessionRequest:0,cachedSession:void 0},m=()=>y||Td().isOnline,b=Q=>{if(!m())return;if((Q==null?void 0:Q.event)==="storage"){g.lastSync=Yl(),i.set(!i.get());return}const D=s.get(),O=()=>{g.lastSessionRequest=Yl(),r("/get-session").then(async A=>{let{data:V,error:$}=cv(A);if(V!=null&&V.needsRefresh)try{const Z=await r("/get-session",{method:"POST"});({data:V,error:$}=cv(Z))}catch{}const W=V!=null&&V.session&&(V!=null&&V.user)?V:null;s.set({...D,data:W,error:$}),g.lastSync=Yl(),i.set(!i.get())}).catch(()=>{})};if((Q==null?void 0:Q.event)==="poll"){O();return}if((Q==null?void 0:Q.event)==="visibilitychange"){if(Yl()-g.lastSessionRequest<Hj)return;g.lastSessionRequest=Yl()}if((Q==null?void 0:Q.event)==="visibilitychange"){O();return}((D==null?void 0:D.data)===null||(D==null?void 0:D.data)===void 0)&&(g.lastSync=Yl(),i.set(!i.get()))},v=Q=>{jd().post({event:"session",data:{trigger:Q},clientId:Math.random().toString(36).substring(7)})},S=()=>{f&&f>0&&(g.pollInterval=setInterval(()=>{var Q;(Q=s.get())!=null&&Q.data&&b({event:"poll"})},f*1e3))},j=()=>{g.unsubscribeBroadcast=jd().subscribe(()=>{b({event:"storage"})})},_=()=>{d&&(g.unsubscribeFocus=uv().subscribe(()=>{b({event:"visibilitychange"})}))},w=()=>{g.unsubscribeOnline=Td().subscribe(Q=>{Q&&b({event:"visibilitychange"})})};return{init:()=>{S(),j(),_(),w(),jd().setup(),uv().setup(),Td().setup()},cleanup:()=>{g.pollInterval&&(clearInterval(g.pollInterval),g.pollInterval=void 0),g.unsubscribeBroadcast&&(g.unsubscribeBroadcast(),g.unsubscribeBroadcast=void 0),g.unsubscribeFocus&&(g.unsubscribeFocus(),g.unsubscribeFocus=void 0),g.unsubscribeOnline&&(g.unsubscribeOnline(),g.unsubscribeOnline=void 0),g.lastSync=0,g.lastSessionRequest=0,g.cachedSession=void 0},triggerRefetch:b,broadcastSessionUpdate:v}}function Qj(n,s){const i=E0(!1),r=Uj(i,"/get-session",n,{method:"GET"});let u=()=>{};return C0(r,()=>{const f=Gj({sessionAtom:r,sessionSignal:i,$fetch:n,options:s});return f.init(),u=f.broadcastSessionUpdate,()=>{f.cleanup()}}),{session:r,$sessionSignal:i,broadcastSessionUpdate:f=>u(f)}}function wd(n){if(n===null||typeof n!="object")return!1;const s=Object.getPrototypeOf(n);return s!==null&&s!==Object.prototype&&Object.getPrototypeOf(s)!==null||Symbol.iterator in n?!1:Symbol.toStringTag in n?Object.prototype.toString.call(n)==="[object Module]":!0}function Fd(n,s,i=".",r){if(!wd(s))return Fd(n,{},i,r);const u={...s};for(const f of Object.keys(n)){if(f==="__proto__"||f==="constructor")continue;const d=n[f];d!=null&&(r&&r(u,f,d,i)||(Array.isArray(d)&&Array.isArray(u[f])?u[f]=[...d,...u[f]]:wd(d)&&wd(u[f])?u[f]=Fd(d,u[f],(i?`${i}.`:"")+f.toString(),r):u[f]=d))}return u}function Yj(n){return(...s)=>s.reduce((i,r)=>Fd(i,r,"",n),{})}const Vj=Yj();var Kj=Object.defineProperty,Xj=Object.defineProperties,Pj=Object.getOwnPropertyDescriptors,fv=Object.getOwnPropertySymbols,Zj=Object.prototype.hasOwnProperty,Jj=Object.prototype.propertyIsEnumerable,dv=(n,s,i)=>s in n?Kj(n,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):n[s]=i,En=(n,s)=>{for(var i in s||(s={}))Zj.call(s,i)&&dv(n,i,s[i]);if(fv)for(var i of fv(s))Jj.call(s,i)&&dv(n,i,s[i]);return n},Ln=(n,s)=>Xj(n,Pj(s)),Fj=class extends Error{constructor(n,s,i){super(s||n.toString(),{cause:i}),this.status=n,this.statusText=s,this.error=i,Error.captureStackTrace(this,this.constructor)}},Ij=async(n,s)=>{var i,r,u,f,d,y;let g=s||{};const m={onRequest:[s==null?void 0:s.onRequest],onResponse:[s==null?void 0:s.onResponse],onSuccess:[s==null?void 0:s.onSuccess],onError:[s==null?void 0:s.onError],onRetry:[s==null?void 0:s.onRetry]};if(!s||!(s!=null&&s.plugins))return{url:n,options:g,hooks:m};for(const b of(s==null?void 0:s.plugins)||[]){if(b.init){const v=await((i=b.init)==null?void 0:i.call(b,n.toString(),s));g=v.options||g,n=v.url}m.onRequest.push((r=b.hooks)==null?void 0:r.onRequest),m.onResponse.push((u=b.hooks)==null?void 0:u.onResponse),m.onSuccess.push((f=b.hooks)==null?void 0:f.onSuccess),m.onError.push((d=b.hooks)==null?void 0:d.onError),m.onRetry.push((y=b.hooks)==null?void 0:y.onRetry)}return{url:n,options:g,hooks:m}},hv=class{constructor(n){this.options=n}shouldAttemptRetry(n,s){return this.options.shouldRetry?Promise.resolve(n<this.options.attempts&&this.options.shouldRetry(s)):Promise.resolve(n<this.options.attempts)}getDelay(){return this.options.delay}},$j=class{constructor(n){this.options=n}shouldAttemptRetry(n,s){return this.options.shouldRetry?Promise.resolve(n<this.options.attempts&&this.options.shouldRetry(s)):Promise.resolve(n<this.options.attempts)}getDelay(n){return Math.min(this.options.maxDelay,this.options.baseDelay*2**n)}};function Wj(n){if(typeof n=="number")return new hv({type:"linear",attempts:n,delay:1e3});switch(n.type){case"linear":return new hv(n);case"exponential":return new $j(n);default:throw new Error("Invalid retry strategy")}}var eR=async n=>{const s={},i=async r=>typeof r=="function"?await r():r;if(n!=null&&n.auth){if(n.auth.type==="Bearer"){const r=await i(n.auth.token);if(!r)return s;s.authorization=`Bearer ${r}`}else if(n.auth.type==="Basic"){const[r,u]=await Promise.all([i(n.auth.username),i(n.auth.password)]);if(!r||!u)return s;s.authorization=`Basic ${btoa(`${r}:${u}`)}`}else if(n.auth.type==="Custom"){const[r,u]=await Promise.all([i(n.auth.prefix),i(n.auth.value)]);if(!u)return s;s.authorization=`${r??""} ${u}`}}return s},tR=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function nR(n){const s=n.headers.get("content-type"),i=new Set(["image/svg","application/xml","application/xhtml","application/html"]);if(!s)return"json";const r=s.split(";").shift()||"";return tR.test(r)?"json":i.has(r)||r.startsWith("text/")?"text":"blob"}function aR(n){try{return JSON.parse(n),!0}catch{return!1}}function Id(n){if(n===void 0)return!1;const s=typeof n;return s==="string"||s==="number"||s==="boolean"||s===null?!0:s!=="object"?!1:Array.isArray(n)?!0:n.buffer?!1:n.constructor&&n.constructor.name==="Object"||typeof n.toJSON=="function"}function mv(n){try{return JSON.parse(n)}catch{return n}}function yv(n){return typeof n=="function"}function sR(n){if(n!=null&&n.customFetchImpl)return n.customFetchImpl;if(typeof globalThis<"u"&&yv(globalThis.fetch))return globalThis.fetch;if(typeof window<"u"&&yv(window.fetch))return window.fetch;throw new Error("No fetch implementation found")}async function lR(n){const s=new Headers(n==null?void 0:n.headers),i=await eR(n);for(const[r,u]of Object.entries(i||{}))s.set(r,u);if(!s.has("content-type")){const r=iR(n==null?void 0:n.body);r&&s.set("content-type",r)}return s}function iR(n){return Id(n)?"application/json":null}function rR(n){if(!(n!=null&&n.body))return null;const s=new Headers(n==null?void 0:n.headers);if(Id(n.body)&&!s.has("content-type")){for(const[i,r]of Object.entries(n==null?void 0:n.body))r instanceof Date&&(n.body[i]=r.toISOString());return JSON.stringify(n.body)}return s.has("content-type")&&s.get("content-type")==="application/x-www-form-urlencoded"&&Id(n.body)?new URLSearchParams(n.body).toString():n.body}function oR(n,s){var i;if(s!=null&&s.method)return s.method.toUpperCase();if(n.startsWith("@")){const r=(i=n.split("@")[1])==null?void 0:i.split("/")[0];return M0.includes(r)?r.toUpperCase():s!=null&&s.body?"POST":"GET"}return s!=null&&s.body?"POST":"GET"}function uR(n,s){let i;return!(n!=null&&n.signal)&&(n!=null&&n.timeout)&&(i=setTimeout(()=>s==null?void 0:s.abort(),n==null?void 0:n.timeout)),{abortTimeout:i,clearTimeout:()=>{i&&clearTimeout(i)}}}var cR=class N0 extends Error{constructor(s,i){super(i||JSON.stringify(s,null,2)),this.issues=s,Object.setPrototypeOf(this,N0.prototype)}};async function _u(n,s){const i=await n["~standard"].validate(s);if(i.issues)throw new cR(i.issues);return i.value}var M0=["get","post","put","patch","delete"],fR=n=>({id:"apply-schema",name:"Apply Schema",version:"1.0.0",async init(s,i){var r,u,f,d;const y=((u=(r=n.plugins)==null?void 0:r.find(g=>{var m;return(m=g.schema)!=null&&m.config?s.startsWith(g.schema.config.baseURL||"")||s.startsWith(g.schema.config.prefix||""):!1}))==null?void 0:u.schema)||n.schema;if(y){let g=s;(f=y.config)!=null&&f.prefix&&g.startsWith(y.config.prefix)&&(g=g.replace(y.config.prefix,""),y.config.baseURL&&(s=s.replace(y.config.prefix,y.config.baseURL))),(d=y.config)!=null&&d.baseURL&&g.startsWith(y.config.baseURL)&&(g=g.replace(y.config.baseURL,""));const m=y.schema[g];if(m){let b=Ln(En({},i),{method:m.method,output:m.output});return i!=null&&i.disableValidation||(b=Ln(En({},b),{body:m.input?await _u(m.input,i==null?void 0:i.body):i==null?void 0:i.body,params:m.params?await _u(m.params,i==null?void 0:i.params):i==null?void 0:i.params,query:m.query?await _u(m.query,i==null?void 0:i.query):i==null?void 0:i.query})),{url:s,options:b}}}return{url:s,options:i}}}),dR=n=>{async function s(i,r){const u=Ln(En(En({},n),r),{plugins:[...(n==null?void 0:n.plugins)||[],fR(n||{}),...(r==null?void 0:r.plugins)||[]]});if(n!=null&&n.catchAllError)try{return await $d(i,u)}catch(f){return{data:null,error:{status:500,statusText:"Fetch Error",message:"Fetch related error. Captured by catchAllError option. See error property for more details.",error:f}}}return await $d(i,u)}return s};function hR(n,s){const{baseURL:i,params:r,query:u}=s||{query:{},params:{},baseURL:""};let f=n.startsWith("http")?n.split("/").slice(0,3).join("/"):i||"";if(n.startsWith("@")){const v=n.toString().split("@")[1].split("/")[0];M0.includes(v)&&(n=n.replace(`@${v}/`,"/"))}f.endsWith("/")||(f+="/");let[d,y]=n.replace(f,"").split("?");const g=new URLSearchParams(y);for(const[v,S]of Object.entries(u||{})){if(S==null)continue;let j;if(typeof S=="string")j=S;else if(Array.isArray(S)){for(const _ of S)g.append(v,_);continue}else j=JSON.stringify(S);g.set(v,j)}if(r)if(Array.isArray(r)){const v=d.split("/").filter(S=>S.startsWith(":"));for(const[S,j]of v.entries()){const _=r[S];d=d.replace(j,_)}}else for(const[v,S]of Object.entries(r))d=d.replace(`:${v}`,String(S));d=d.split("/").map(encodeURIComponent).join("/"),d.startsWith("/")&&(d=d.slice(1));let m=g.toString();return m=m.length>0?`?${m}`.replace(/\+/g,"%20"):"",f.startsWith("http")?new URL(`${d}${m}`,f):`${f}${d}${m}`}var $d=async(n,s)=>{var i,r,u,f,d,y,g,m;const{hooks:b,url:v,options:S}=await Ij(n,s),j=sR(S),_=new AbortController,w=(i=S.signal)!=null?i:_.signal,R=hR(v,S),U=rR(S),k=await lR(S),H=oR(v,S);let M=Ln(En({},S),{url:R,headers:k,body:U,method:H,signal:w});for(const te of b.onRequest)if(te){const ee=await te(M);typeof ee=="object"&&ee!==null&&(M=ee)}("pipeTo"in M&&typeof M.pipeTo=="function"||typeof((r=s==null?void 0:s.body)==null?void 0:r.pipe)=="function")&&("duplex"in M||(M.duplex="half"));const{clearTimeout:Q}=uR(S,_);let D=await j(M.url,M);Q();const O={response:D,request:M};for(const te of b.onResponse)if(te){const ee=await te(Ln(En({},O),{response:(u=s==null?void 0:s.hookOptions)!=null&&u.cloneResponse?D.clone():D}));ee instanceof Response?D=ee:typeof ee=="object"&&ee!==null&&(D=ee.response)}if(D.ok){if(!(M.method!=="HEAD"))return{data:"",error:null};const ee=nR(D),he={data:null,response:D,request:M};if(ee==="json"||ee==="text"){const L=await D.text(),X=(f=M.jsonParser)!=null?f:mv;he.data=await X(L)}else he.data=await D[ee]();M!=null&&M.output&&M.output&&!M.disableValidation&&(he.data=await _u(M.output,he.data));for(const L of b.onSuccess)L&&await L(Ln(En({},he),{response:(d=s==null?void 0:s.hookOptions)!=null&&d.cloneResponse?D.clone():D}));return s!=null&&s.throw?he.data:{data:he.data,error:null}}const A=(y=s==null?void 0:s.jsonParser)!=null?y:mv,V=await D.text(),$=aR(V),W=$?await A(V):null,Z={response:D,responseText:V,request:M,error:Ln(En({},W),{status:D.status,statusText:D.statusText})};for(const te of b.onError)te&&await te(Ln(En({},Z),{response:(g=s==null?void 0:s.hookOptions)!=null&&g.cloneResponse?D.clone():D}));if(s!=null&&s.retry){const te=Wj(s.retry),ee=(m=s.retryAttempt)!=null?m:0;if(await te.shouldAttemptRetry(ee,D)){for(const L of b.onRetry)L&&await L(O);const he=te.getDelay(ee);return await new Promise(L=>setTimeout(L,he)),await $d(n,Ln(En({},s),{retryAttempt:ee+1}))}}if(s!=null&&s.throw)throw new Fj(D.status,D.statusText,$?W:V);return{data:null,error:Ln(En({},W),{status:D.status,statusText:D.statusText})}},As={};const mR=n=>{if(typeof process>"u")return;const s=n??"/api/auth";if(As.NEXT_PUBLIC_AUTH_URL)return As.NEXT_PUBLIC_AUTH_URL;if(typeof window>"u"){if(As.NEXTAUTH_URL)try{return As.NEXTAUTH_URL}catch{}if(As.VERCEL_URL)try{const i=As.VERCEL_URL.startsWith("http")?"":"https://";return`${new URL(`${i}${As.VERCEL_URL}`).origin}${s}`}catch{}}},yR=(n,s)=>{var Q,D,O,A,V,$,W;const i="credentials"in Request.prototype,r=xj(n==null?void 0:n.baseURL,n==null?void 0:n.basePath)??mR(n==null?void 0:n.basePath)??"/api/auth",u=((Q=n==null?void 0:n.plugins)==null?void 0:Q.flatMap(Z=>Z.fetchPlugins).filter(Z=>Z!==void 0))||[],f={id:"lifecycle-hooks",name:"lifecycle-hooks",hooks:{onSuccess:(D=n==null?void 0:n.fetchOptions)==null?void 0:D.onSuccess,onError:(O=n==null?void 0:n.fetchOptions)==null?void 0:O.onError,onRequest:(A=n==null?void 0:n.fetchOptions)==null?void 0:A.onRequest,onResponse:(V=n==null?void 0:n.fetchOptions)==null?void 0:V.onResponse}},{onSuccess:d,onError:y,onRequest:g,onResponse:m,...b}=(n==null?void 0:n.fetchOptions)||{},v=dR({baseURL:r,...i?{credentials:"include"}:{},method:"GET",jsonParser(Z){return Z?Ej(Z,{strict:!1}):null},customFetchImpl:fetch,...b,plugins:[f,...b.plugins||[],...n!=null&&n.disableDefaultFetchPlugins?[]:[Cj],...u]}),{$sessionSignal:S,session:j,broadcastSessionUpdate:_}=Qj(v,n),w=(n==null?void 0:n.plugins)||[];let R={};const U={$sessionSignal:S,session:j},k={"/sign-out":"POST","/revoke-sessions":"POST","/revoke-other-sessions":"POST","/delete-user":"POST"},H=[{signal:"$sessionSignal",matcher(Z){return Z==="/sign-out"||Z==="/update-user"||Z==="/update-session"||Z==="/sign-up/email"||Z==="/sign-in/email"||Z==="/delete-user"||Z==="/verify-email"||Z==="/revoke-sessions"||Z==="/revoke-session"||Z==="/revoke-other-sessions"||Z==="/change-email"||Z==="/change-password"},callback(Z){Z==="/sign-out"?_("signout"):(Z==="/update-user"||Z==="/update-session")&&_("updateUser")}}];for(const Z of w)Z.getAtoms&&Object.assign(U,($=Z.getAtoms)==null?void 0:$.call(Z,v)),Z.pathMethods&&Object.assign(k,Z.pathMethods),Z.atomListeners&&H.push(...Z.atomListeners);const M={notify:Z=>{U[Z].set(!U[Z].get())},listen:(Z,te)=>{U[Z].subscribe(te)},atoms:U};for(const Z of w)Z.getActions&&(R=Vj(((W=Z.getActions)==null?void 0:W.call(Z,v,M,n))??{},R));return{get baseURL(){return r},pluginsActions:R,pluginsAtoms:U,pluginPathMethods:k,atomListeners:H,$fetch:v,$store:M}};function pR(n){return typeof n=="object"&&n!==null&&"get"in n&&typeof n.get=="function"&&"lc"in n&&typeof n.lc=="number"}function gR(n,s,i){const r=s[n],{fetchOptions:u,query:f,...d}=i||{};return r||(u!=null&&u.method?u.method:d&&Object.keys(d).length>0?"POST":"GET")}function vR(n,s,i,r,u){function f(d=[]){return new Proxy(function(){},{get(y,g){if(typeof g!="string"||g==="then"||g==="catch"||g==="finally")return;const m=[...d,g];let b=n;for(const v of m)if(b&&typeof b=="object"&&v in b)b=b[v];else{b=void 0;break}return typeof b=="function"||pR(b)?b:f(m)},apply:async(y,g,m)=>{const b="/"+d.map(k=>k.replace(/[A-Z]/g,H=>`-${H.toLowerCase()}`)).join("/"),v=m[0]||{},S=m[1]||{},{query:j,fetchOptions:_,...w}=v,R={...S,..._},U=gR(b,i,v);return await s(b,{...R,body:U==="GET"?void 0:{...w,...(R==null?void 0:R.body)||{}},query:j||(R==null?void 0:R.query),method:U,async onSuccess(k){var Q,D;if(await((Q=R==null?void 0:R.onSuccess)==null?void 0:Q.call(R,k)),!u||R.disableSignal)return;const H=u.filter(O=>O.matcher(b));if(!H.length)return;const M=new Set;for(const O of H){const A=r[O.signal];if(!A)return;if(M.has(O.signal))continue;M.add(O.signal);const V=A.get();setTimeout(()=>{A.set(!V)},10),(D=O.callback)==null||D.call(O,b)}}})}})}return f()}function bR(n,s={}){const i=K.useRef(n.get()),{keys:r,deps:u=[n,r]}=s,f=K.useCallback(y=>{const g=m=>{i.current!==m&&(i.current=m,y())};return g(n.value),r!=null&&r.length?zj(n,r,g):n.listen(g)},u),d=()=>i.current;return K.useSyncExternalStore(f,d,d)}function xR(n){return n.charAt(0).toUpperCase()+n.slice(1)}function SR(n){return`use${xR(n)}`}function jR(n){const{pluginPathMethods:s,pluginsActions:i,pluginsAtoms:r,$fetch:u,$store:f,atomListeners:d}=yR(n),y={};for(const[g,m]of Object.entries(r))y[SR(g)]=()=>bR(m);return vR({...i,...y,$fetch:u,$store:f},u,s,r,d)}const RR=jR({baseURL:`${w0.baseUrl}/api/auth`,fetchOptions:{credentials:"include"}}),{signIn:_R,signUp:TR,signOut:wR,useSession:A0}=RR;function O0(n){var s,i,r="";if(typeof n=="string"||typeof n=="number")r+=n;else if(typeof n=="object")if(Array.isArray(n)){var u=n.length;for(s=0;s<u;s++)n[s]&&(i=O0(n[s]))&&(r&&(r+=" "),r+=i)}else for(i in n)n[i]&&(r&&(r+=" "),r+=i);return r}function z0(){for(var n,s,i=0,r="",u=arguments.length;i<u;i++)(n=arguments[i])&&(s=O0(n))&&(r&&(r+=" "),r+=s);return r}const pv=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,gv=z0,D0=(n,s)=>i=>{var r;if((s==null?void 0:s.variants)==null)return gv(n,i==null?void 0:i.class,i==null?void 0:i.className);const{variants:u,defaultVariants:f}=s,d=Object.keys(u).map(m=>{const b=i==null?void 0:i[m],v=f==null?void 0:f[m];if(b===null)return null;const S=pv(b)||pv(v);return u[m][S]}),y=i&&Object.entries(i).reduce((m,b)=>{let[v,S]=b;return S===void 0||(m[v]=S),m},{}),g=s==null||(r=s.compoundVariants)===null||r===void 0?void 0:r.reduce((m,b)=>{let{class:v,className:S,...j}=b;return Object.entries(j).every(_=>{let[w,R]=_;return Array.isArray(R)?R.includes({...f,...y}[w]):{...f,...y}[w]===R})?[...m,v,S]:m},[]);return gv(n,d,g,i==null?void 0:i.class,i==null?void 0:i.className)},ER=(n,s)=>{const i=new Array(n.length+s.length);for(let r=0;r<n.length;r++)i[r]=n[r];for(let r=0;r<s.length;r++)i[n.length+r]=s[r];return i},CR=(n,s)=>({classGroupId:n,validator:s}),U0=(n=new Map,s=null,i)=>({nextPart:n,validators:s,classGroupId:i}),Du="-",vv=[],NR="arbitrary..",MR=n=>{const s=OR(n),{conflictingClassGroups:i,conflictingClassGroupModifiers:r}=n;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return AR(d);const y=d.split(Du),g=y[0]===""&&y.length>1?1:0;return L0(y,g,s)},getConflictingClassGroupIds:(d,y)=>{if(y){const g=r[d],m=i[d];return g?m?ER(m,g):g:m||vv}return i[d]||vv}}},L0=(n,s,i)=>{if(n.length-s===0)return i.classGroupId;const u=n[s],f=i.nextPart.get(u);if(f){const m=L0(n,s+1,f);if(m)return m}const d=i.validators;if(d===null)return;const y=s===0?n.join(Du):n.slice(s).join(Du),g=d.length;for(let m=0;m<g;m++){const b=d[m];if(b.validator(y))return b.classGroupId}},AR=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const s=n.slice(1,-1),i=s.indexOf(":"),r=s.slice(0,i);return r?NR+r:void 0})(),OR=n=>{const{theme:s,classGroups:i}=n;return zR(i,s)},zR=(n,s)=>{const i=U0();for(const r in n){const u=n[r];hh(u,i,r,s)}return i},hh=(n,s,i,r)=>{const u=n.length;for(let f=0;f<u;f++){const d=n[f];DR(d,s,i,r)}},DR=(n,s,i,r)=>{if(typeof n=="string"){UR(n,s,i);return}if(typeof n=="function"){LR(n,s,i,r);return}kR(n,s,i,r)},UR=(n,s,i)=>{const r=n===""?s:k0(s,n);r.classGroupId=i},LR=(n,s,i,r)=>{if(BR(n)){hh(n(r),s,i,r);return}s.validators===null&&(s.validators=[]),s.validators.push(CR(i,n))},kR=(n,s,i,r)=>{const u=Object.entries(n),f=u.length;for(let d=0;d<f;d++){const[y,g]=u[d];hh(g,k0(s,y),i,r)}},k0=(n,s)=>{let i=n;const r=s.split(Du),u=r.length;for(let f=0;f<u;f++){const d=r[f];let y=i.nextPart.get(d);y||(y=U0(),i.nextPart.set(d,y)),i=y}return i},BR=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,qR=n=>{if(n<1)return{get:()=>{},set:()=>{}};let s=0,i=Object.create(null),r=Object.create(null);const u=(f,d)=>{i[f]=d,s++,s>n&&(s=0,r=i,i=Object.create(null))};return{get(f){let d=i[f];if(d!==void 0)return d;if((d=r[f])!==void 0)return u(f,d),d},set(f,d){f in i?i[f]=d:u(f,d)}}},Wd="!",bv=":",HR=[],xv=(n,s,i,r,u)=>({modifiers:n,hasImportantModifier:s,baseClassName:i,maybePostfixModifierPosition:r,isExternal:u}),GR=n=>{const{prefix:s,experimentalParseClassName:i}=n;let r=u=>{const f=[];let d=0,y=0,g=0,m;const b=u.length;for(let w=0;w<b;w++){const R=u[w];if(d===0&&y===0){if(R===bv){f.push(u.slice(g,w)),g=w+1;continue}if(R==="/"){m=w;continue}}R==="["?d++:R==="]"?d--:R==="("?y++:R===")"&&y--}const v=f.length===0?u:u.slice(g);let S=v,j=!1;v.endsWith(Wd)?(S=v.slice(0,-1),j=!0):v.startsWith(Wd)&&(S=v.slice(1),j=!0);const _=m&&m>g?m-g:void 0;return xv(f,j,S,_)};if(s){const u=s+bv,f=r;r=d=>d.startsWith(u)?f(d.slice(u.length)):xv(HR,!1,d,void 0,!0)}if(i){const u=r;r=f=>i({className:f,parseClassName:u})}return r},QR=n=>{const s=new Map;return n.orderSensitiveModifiers.forEach((i,r)=>{s.set(i,1e6+r)}),i=>{const r=[];let u=[];for(let f=0;f<i.length;f++){const d=i[f],y=d[0]==="[",g=s.has(d);y||g?(u.length>0&&(u.sort(),r.push(...u),u=[]),r.push(d)):u.push(d)}return u.length>0&&(u.sort(),r.push(...u)),r}},YR=n=>({cache:qR(n.cacheSize),parseClassName:GR(n),sortModifiers:QR(n),postfixLookupClassGroupIds:VR(n),...MR(n)}),VR=n=>{const s=Object.create(null),i=n.postfixLookupClassGroups;if(i)for(let r=0;r<i.length;r++)s[i[r]]=!0;return s},KR=/\s+/,XR=(n,s)=>{const{parseClassName:i,getClassGroupId:r,getConflictingClassGroupIds:u,sortModifiers:f,postfixLookupClassGroupIds:d}=s,y=[],g=n.trim().split(KR);let m="";for(let b=g.length-1;b>=0;b-=1){const v=g[b],{isExternal:S,modifiers:j,hasImportantModifier:_,baseClassName:w,maybePostfixModifierPosition:R}=i(v);if(S){m=v+(m.length>0?" "+m:m);continue}let U=!!R,k;if(U){const O=w.substring(0,R);k=r(O);const A=k&&d[k]?r(w):void 0;A&&A!==k&&(k=A,U=!1)}else k=r(w);if(!k){if(!U){m=v+(m.length>0?" "+m:m);continue}if(k=r(w),!k){m=v+(m.length>0?" "+m:m);continue}U=!1}const H=j.length===0?"":j.length===1?j[0]:f(j).join(":"),M=_?H+Wd:H,Q=M+k;if(y.indexOf(Q)>-1)continue;y.push(Q);const D=u(k,U);for(let O=0;O<D.length;++O){const A=D[O];y.push(M+A)}m=v+(m.length>0?" "+m:m)}return m},PR=(...n)=>{let s=0,i,r,u="";for(;s<n.length;)(i=n[s++])&&(r=B0(i))&&(u&&(u+=" "),u+=r);return u},B0=n=>{if(typeof n=="string")return n;let s,i="";for(let r=0;r<n.length;r++)n[r]&&(s=B0(n[r]))&&(i&&(i+=" "),i+=s);return i},ZR=(n,...s)=>{let i,r,u,f;const d=g=>{const m=s.reduce((b,v)=>v(b),n());return i=YR(m),r=i.cache.get,u=i.cache.set,f=y,y(g)},y=g=>{const m=r(g);if(m)return m;const b=XR(g,i);return u(g,b),b};return f=d,(...g)=>f(PR(...g))},JR=[],ct=n=>{const s=i=>i[n]||JR;return s.isThemeGetter=!0,s},q0=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,H0=/^\((?:(\w[\w-]*):)?(.+)\)$/i,FR=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,IR=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,$R=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,WR=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,e_=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,t_=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ya=n=>FR.test(n),je=n=>!!n&&!Number.isNaN(Number(n)),Dn=n=>!!n&&Number.isInteger(Number(n)),Ed=n=>n.endsWith("%")&&je(n.slice(0,-1)),ra=n=>IR.test(n),G0=()=>!0,n_=n=>$R.test(n)&&!WR.test(n),mh=()=>!1,a_=n=>e_.test(n),s_=n=>t_.test(n),l_=n=>!re(n)&&!oe(n),i_=n=>n.startsWith("@container")&&(n[10]==="/"&&n[11]!==void 0||n[11]==="s"&&n[16]!==void 0&&n.startsWith("-size/",10)||n[11]==="n"&&n[18]!==void 0&&n.startsWith("-normal/",10)),r_=n=>os(n,V0,mh),re=n=>q0.test(n),Os=n=>os(n,K0,n_),Sv=n=>os(n,y_,je),o_=n=>os(n,P0,G0),u_=n=>os(n,X0,mh),jv=n=>os(n,Q0,mh),c_=n=>os(n,Y0,s_),mu=n=>os(n,Z0,a_),oe=n=>H0.test(n),pr=n=>el(n,K0),f_=n=>el(n,X0),Rv=n=>el(n,Q0),d_=n=>el(n,V0),h_=n=>el(n,Y0),yu=n=>el(n,Z0,!0),m_=n=>el(n,P0,!0),os=(n,s,i)=>{const r=q0.exec(n);return r?r[1]?s(r[1]):i(r[2]):!1},el=(n,s,i=!1)=>{const r=H0.exec(n);return r?r[1]?s(r[1]):i:!1},Q0=n=>n==="position"||n==="percentage",Y0=n=>n==="image"||n==="url",V0=n=>n==="length"||n==="size"||n==="bg-size",K0=n=>n==="length",y_=n=>n==="number",X0=n=>n==="family-name",P0=n=>n==="number"||n==="weight",Z0=n=>n==="shadow",p_=()=>{const n=ct("color"),s=ct("font"),i=ct("text"),r=ct("font-weight"),u=ct("tracking"),f=ct("leading"),d=ct("breakpoint"),y=ct("container"),g=ct("spacing"),m=ct("radius"),b=ct("shadow"),v=ct("inset-shadow"),S=ct("text-shadow"),j=ct("drop-shadow"),_=ct("blur"),w=ct("perspective"),R=ct("aspect"),U=ct("ease"),k=ct("animate"),H=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],Q=()=>[...M(),oe,re],D=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto","contain","none"],A=()=>[oe,re,g],V=()=>[Ya,"full","auto",...A()],$=()=>[Dn,"none","subgrid",oe,re],W=()=>["auto",{span:["full",Dn,oe,re]},Dn,oe,re],Z=()=>[Dn,"auto",oe,re],te=()=>["auto","min","max","fr",oe,re],ee=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],he=()=>["start","end","center","stretch","center-safe","end-safe"],L=()=>["auto",...A()],X=()=>[Ya,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...A()],ce=()=>[Ya,"screen","full","dvw","lvw","svw","min","max","fit",...A()],Ce=()=>[Ya,"screen","full","lh","dvh","lvh","svh","min","max","fit",...A()],ne=()=>[n,oe,re],C=()=>[...M(),Rv,jv,{position:[oe,re]}],F=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ae=()=>["auto","cover","contain",d_,r_,{size:[oe,re]}],se=()=>[Ed,pr,Os],le=()=>["","none","full",m,oe,re],me=()=>["",je,pr,Os],Re=()=>["solid","dashed","dotted","double"],Be=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ge=()=>[je,Ed,Rv,jv],sn=()=>["","none",_,oe,re],Mt=()=>["none",je,oe,re],Vt=()=>["none",je,oe,re],Gn=()=>[je,oe,re],wt=()=>[Ya,"full",...A()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ra],breakpoint:[ra],color:[G0],container:[ra],"drop-shadow":[ra],ease:["in","out","in-out"],font:[l_],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ra],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ra],shadow:[ra],spacing:["px",je],text:[ra],"text-shadow":[ra],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ya,re,oe,R]}],container:["container"],"container-type":[{"@container":["","normal","size",oe,re]}],"container-named":[i_],columns:[{columns:[je,re,oe,y]}],"break-after":[{"break-after":H()}],"break-before":[{"break-before":H()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:Q()}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:V()}],"inset-x":[{"inset-x":V()}],"inset-y":[{"inset-y":V()}],start:[{"inset-s":V(),start:V()}],end:[{"inset-e":V(),end:V()}],"inset-bs":[{"inset-bs":V()}],"inset-be":[{"inset-be":V()}],top:[{top:V()}],right:[{right:V()}],bottom:[{bottom:V()}],left:[{left:V()}],visibility:["visible","invisible","collapse"],z:[{z:[Dn,"auto",oe,re]}],basis:[{basis:[Ya,"full","auto",y,...A()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[je,Ya,"auto","initial","none",re]}],grow:[{grow:["",je,oe,re]}],shrink:[{shrink:["",je,oe,re]}],order:[{order:[Dn,"first","last","none",oe,re]}],"grid-cols":[{"grid-cols":$()}],"col-start-end":[{col:W()}],"col-start":[{"col-start":Z()}],"col-end":[{"col-end":Z()}],"grid-rows":[{"grid-rows":$()}],"row-start-end":[{row:W()}],"row-start":[{"row-start":Z()}],"row-end":[{"row-end":Z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":te()}],"auto-rows":[{"auto-rows":te()}],gap:[{gap:A()}],"gap-x":[{"gap-x":A()}],"gap-y":[{"gap-y":A()}],"justify-content":[{justify:[...ee(),"normal"]}],"justify-items":[{"justify-items":[...he(),"normal"]}],"justify-self":[{"justify-self":["auto",...he()]}],"align-content":[{content:["normal",...ee()]}],"align-items":[{items:[...he(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...he(),{baseline:["","last"]}]}],"place-content":[{"place-content":ee()}],"place-items":[{"place-items":[...he(),"baseline"]}],"place-self":[{"place-self":["auto",...he()]}],p:[{p:A()}],px:[{px:A()}],py:[{py:A()}],ps:[{ps:A()}],pe:[{pe:A()}],pbs:[{pbs:A()}],pbe:[{pbe:A()}],pt:[{pt:A()}],pr:[{pr:A()}],pb:[{pb:A()}],pl:[{pl:A()}],m:[{m:L()}],mx:[{mx:L()}],my:[{my:L()}],ms:[{ms:L()}],me:[{me:L()}],mbs:[{mbs:L()}],mbe:[{mbe:L()}],mt:[{mt:L()}],mr:[{mr:L()}],mb:[{mb:L()}],ml:[{ml:L()}],"space-x":[{"space-x":A()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":A()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],"inline-size":[{inline:["auto",...ce()]}],"min-inline-size":[{"min-inline":["auto",...ce()]}],"max-inline-size":[{"max-inline":["none",...ce()]}],"block-size":[{block:["auto",...Ce()]}],"min-block-size":[{"min-block":["auto",...Ce()]}],"max-block-size":[{"max-block":["none",...Ce()]}],w:[{w:[y,"screen",...X()]}],"min-w":[{"min-w":[y,"screen","none",...X()]}],"max-w":[{"max-w":[y,"screen","none","prose",{screen:[d]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh",...X()]}],"font-size":[{text:["base",i,pr,Os]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,m_,o_]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ed,re]}],"font-family":[{font:[f_,u_,s]}],"font-features":[{"font-features":[re]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[u,oe,re]}],"line-clamp":[{"line-clamp":[je,"none",oe,Sv]}],leading:[{leading:[f,...A()]}],"list-image":[{"list-image":["none",oe,re]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",oe,re]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:ne()}],"text-color":[{text:ne()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Re(),"wavy"]}],"text-decoration-thickness":[{decoration:[je,"from-font","auto",oe,Os]}],"text-decoration-color":[{decoration:ne()}],"underline-offset":[{"underline-offset":[je,"auto",oe,re]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:A()}],"tab-size":[{tab:[Dn,oe,re]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",oe,re]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",oe,re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:C()}],"bg-repeat":[{bg:F()}],"bg-size":[{bg:ae()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Dn,oe,re],radial:["",oe,re],conic:[Dn,oe,re]},h_,c_]}],"bg-color":[{bg:ne()}],"gradient-from-pos":[{from:se()}],"gradient-via-pos":[{via:se()}],"gradient-to-pos":[{to:se()}],"gradient-from":[{from:ne()}],"gradient-via":[{via:ne()}],"gradient-to":[{to:ne()}],rounded:[{rounded:le()}],"rounded-s":[{"rounded-s":le()}],"rounded-e":[{"rounded-e":le()}],"rounded-t":[{"rounded-t":le()}],"rounded-r":[{"rounded-r":le()}],"rounded-b":[{"rounded-b":le()}],"rounded-l":[{"rounded-l":le()}],"rounded-ss":[{"rounded-ss":le()}],"rounded-se":[{"rounded-se":le()}],"rounded-ee":[{"rounded-ee":le()}],"rounded-es":[{"rounded-es":le()}],"rounded-tl":[{"rounded-tl":le()}],"rounded-tr":[{"rounded-tr":le()}],"rounded-br":[{"rounded-br":le()}],"rounded-bl":[{"rounded-bl":le()}],"border-w":[{border:me()}],"border-w-x":[{"border-x":me()}],"border-w-y":[{"border-y":me()}],"border-w-s":[{"border-s":me()}],"border-w-e":[{"border-e":me()}],"border-w-bs":[{"border-bs":me()}],"border-w-be":[{"border-be":me()}],"border-w-t":[{"border-t":me()}],"border-w-r":[{"border-r":me()}],"border-w-b":[{"border-b":me()}],"border-w-l":[{"border-l":me()}],"divide-x":[{"divide-x":me()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":me()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Re(),"hidden","none"]}],"divide-style":[{divide:[...Re(),"hidden","none"]}],"border-color":[{border:ne()}],"border-color-x":[{"border-x":ne()}],"border-color-y":[{"border-y":ne()}],"border-color-s":[{"border-s":ne()}],"border-color-e":[{"border-e":ne()}],"border-color-bs":[{"border-bs":ne()}],"border-color-be":[{"border-be":ne()}],"border-color-t":[{"border-t":ne()}],"border-color-r":[{"border-r":ne()}],"border-color-b":[{"border-b":ne()}],"border-color-l":[{"border-l":ne()}],"divide-color":[{divide:ne()}],"outline-style":[{outline:[...Re(),"none","hidden"]}],"outline-offset":[{"outline-offset":[je,oe,re]}],"outline-w":[{outline:["",je,pr,Os]}],"outline-color":[{outline:ne()}],shadow:[{shadow:["","none",b,yu,mu]}],"shadow-color":[{shadow:ne()}],"inset-shadow":[{"inset-shadow":["none",v,yu,mu]}],"inset-shadow-color":[{"inset-shadow":ne()}],"ring-w":[{ring:me()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:ne()}],"ring-offset-w":[{"ring-offset":[je,Os]}],"ring-offset-color":[{"ring-offset":ne()}],"inset-ring-w":[{"inset-ring":me()}],"inset-ring-color":[{"inset-ring":ne()}],"text-shadow":[{"text-shadow":["none",S,yu,mu]}],"text-shadow-color":[{"text-shadow":ne()}],opacity:[{opacity:[je,oe,re]}],"mix-blend":[{"mix-blend":[...Be(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Be()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[je]}],"mask-image-linear-from-pos":[{"mask-linear-from":ge()}],"mask-image-linear-to-pos":[{"mask-linear-to":ge()}],"mask-image-linear-from-color":[{"mask-linear-from":ne()}],"mask-image-linear-to-color":[{"mask-linear-to":ne()}],"mask-image-t-from-pos":[{"mask-t-from":ge()}],"mask-image-t-to-pos":[{"mask-t-to":ge()}],"mask-image-t-from-color":[{"mask-t-from":ne()}],"mask-image-t-to-color":[{"mask-t-to":ne()}],"mask-image-r-from-pos":[{"mask-r-from":ge()}],"mask-image-r-to-pos":[{"mask-r-to":ge()}],"mask-image-r-from-color":[{"mask-r-from":ne()}],"mask-image-r-to-color":[{"mask-r-to":ne()}],"mask-image-b-from-pos":[{"mask-b-from":ge()}],"mask-image-b-to-pos":[{"mask-b-to":ge()}],"mask-image-b-from-color":[{"mask-b-from":ne()}],"mask-image-b-to-color":[{"mask-b-to":ne()}],"mask-image-l-from-pos":[{"mask-l-from":ge()}],"mask-image-l-to-pos":[{"mask-l-to":ge()}],"mask-image-l-from-color":[{"mask-l-from":ne()}],"mask-image-l-to-color":[{"mask-l-to":ne()}],"mask-image-x-from-pos":[{"mask-x-from":ge()}],"mask-image-x-to-pos":[{"mask-x-to":ge()}],"mask-image-x-from-color":[{"mask-x-from":ne()}],"mask-image-x-to-color":[{"mask-x-to":ne()}],"mask-image-y-from-pos":[{"mask-y-from":ge()}],"mask-image-y-to-pos":[{"mask-y-to":ge()}],"mask-image-y-from-color":[{"mask-y-from":ne()}],"mask-image-y-to-color":[{"mask-y-to":ne()}],"mask-image-radial":[{"mask-radial":[oe,re]}],"mask-image-radial-from-pos":[{"mask-radial-from":ge()}],"mask-image-radial-to-pos":[{"mask-radial-to":ge()}],"mask-image-radial-from-color":[{"mask-radial-from":ne()}],"mask-image-radial-to-color":[{"mask-radial-to":ne()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":M()}],"mask-image-conic-pos":[{"mask-conic":[je]}],"mask-image-conic-from-pos":[{"mask-conic-from":ge()}],"mask-image-conic-to-pos":[{"mask-conic-to":ge()}],"mask-image-conic-from-color":[{"mask-conic-from":ne()}],"mask-image-conic-to-color":[{"mask-conic-to":ne()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:C()}],"mask-repeat":[{mask:F()}],"mask-size":[{mask:ae()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",oe,re]}],filter:[{filter:["","none",oe,re]}],blur:[{blur:sn()}],brightness:[{brightness:[je,oe,re]}],contrast:[{contrast:[je,oe,re]}],"drop-shadow":[{"drop-shadow":["","none",j,yu,mu]}],"drop-shadow-color":[{"drop-shadow":ne()}],grayscale:[{grayscale:["",je,oe,re]}],"hue-rotate":[{"hue-rotate":[je,oe,re]}],invert:[{invert:["",je,oe,re]}],saturate:[{saturate:[je,oe,re]}],sepia:[{sepia:["",je,oe,re]}],"backdrop-filter":[{"backdrop-filter":["","none",oe,re]}],"backdrop-blur":[{"backdrop-blur":sn()}],"backdrop-brightness":[{"backdrop-brightness":[je,oe,re]}],"backdrop-contrast":[{"backdrop-contrast":[je,oe,re]}],"backdrop-grayscale":[{"backdrop-grayscale":["",je,oe,re]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[je,oe,re]}],"backdrop-invert":[{"backdrop-invert":["",je,oe,re]}],"backdrop-opacity":[{"backdrop-opacity":[je,oe,re]}],"backdrop-saturate":[{"backdrop-saturate":[je,oe,re]}],"backdrop-sepia":[{"backdrop-sepia":["",je,oe,re]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":A()}],"border-spacing-x":[{"border-spacing-x":A()}],"border-spacing-y":[{"border-spacing-y":A()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",oe,re]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[je,"initial",oe,re]}],ease:[{ease:["linear","initial",U,oe,re]}],delay:[{delay:[je,oe,re]}],animate:[{animate:["none",k,oe,re]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,oe,re]}],"perspective-origin":[{"perspective-origin":Q()}],rotate:[{rotate:Mt()}],"rotate-x":[{"rotate-x":Mt()}],"rotate-y":[{"rotate-y":Mt()}],"rotate-z":[{"rotate-z":Mt()}],scale:[{scale:Vt()}],"scale-x":[{"scale-x":Vt()}],"scale-y":[{"scale-y":Vt()}],"scale-z":[{"scale-z":Vt()}],"scale-3d":["scale-3d"],skew:[{skew:Gn()}],"skew-x":[{"skew-x":Gn()}],"skew-y":[{"skew-y":Gn()}],transform:[{transform:[oe,re,"","none","gpu","cpu"]}],"transform-origin":[{origin:Q()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:wt()}],"translate-x":[{"translate-x":wt()}],"translate-y":[{"translate-y":wt()}],"translate-z":[{"translate-z":wt()}],"translate-none":["translate-none"],zoom:[{zoom:[Dn,oe,re]}],accent:[{accent:ne()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:ne()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",oe,re]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":ne()}],"scrollbar-track-color":[{"scrollbar-track":ne()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mbs":[{"scroll-mbs":A()}],"scroll-mbe":[{"scroll-mbe":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pbs":[{"scroll-pbs":A()}],"scroll-pbe":[{"scroll-pbe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",oe,re]}],fill:[{fill:["none",...ne()]}],"stroke-w":[{stroke:[je,pr,Os,Sv]}],stroke:[{stroke:["none",...ne()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},g_=ZR(p_);function Ze(...n){return g_(z0(n))}const v_=D0("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Ie=K.forwardRef(({className:n,variant:s,size:i,...r},u)=>h.jsx("button",{type:"button",className:Ze(v_({variant:s,size:i,className:n})),ref:u,...r}));Ie.displayName="Button";const zr=K.forwardRef(({className:n,...s},i)=>h.jsx("div",{ref:i,className:Ze("rounded-lg border bg-card text-card-foreground shadow-sm",n),...s}));zr.displayName="Card";const Dr=K.forwardRef(({className:n,...s},i)=>h.jsx("div",{ref:i,className:Ze("flex flex-col space-y-1.5 p-6",n),...s}));Dr.displayName="CardHeader";const Ur=K.forwardRef(({className:n,...s},i)=>h.jsx("div",{ref:i,className:Ze("text-lg font-semibold leading-none tracking-tight",n),...s}));Ur.displayName="CardTitle";const J0=K.forwardRef(({className:n,...s},i)=>h.jsx("div",{ref:i,className:Ze("text-sm text-muted-foreground",n),...s}));J0.displayName="CardDescription";const Lr=K.forwardRef(({className:n,...s},i)=>h.jsx("div",{ref:i,className:Ze("p-6 pt-0",n),...s}));Lr.displayName="CardContent";const b_=K.forwardRef(({className:n,...s},i)=>h.jsx("div",{ref:i,className:Ze("flex items-center p-6 pt-0",n),...s}));b_.displayName="CardFooter";const vn=K.forwardRef(({className:n,type:s,...i},r)=>h.jsx("input",{type:s,className:Ze("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",n),ref:r,...i}));vn.displayName="Input";function x_({mode:n,onSuccess:s}){const i=n==="setup",[r,u]=K.useState(""),[f,d]=K.useState(""),[y,g]=K.useState(""),[m,b]=K.useState(null),[v,S]=K.useState(!1);async function j(_){_.preventDefault(),b(null),S(!0);try{const w=i?await TR.email({name:r||f,email:f,password:y}):await _R.email({email:f,password:y});if(w.error){b(w.error.message??"Authentication failed.");return}s()}catch(w){b(w instanceof Error?w.message:"Something went wrong.")}finally{S(!1)}}return h.jsxs(zr,{className:"w-full max-w-sm",children:[h.jsxs(Dr,{children:[h.jsx(Ur,{children:i?"Create admin account":"Sign in to Studio"}),h.jsx(J0,{children:i?"No users exist yet. Create the first admin to get started.":"Enter your credentials to access Hogsend Studio."})]}),h.jsx(Lr,{children:h.jsxs("form",{className:"space-y-4",onSubmit:j,children:[i?h.jsxs("div",{className:"space-y-1.5",children:[h.jsx("label",{className:"text-sm font-medium",htmlFor:"name",children:"Name"}),h.jsx(vn,{id:"name",value:r,onChange:_=>u(_.target.value),placeholder:"Your name",autoComplete:"name"})]}):null,h.jsxs("div",{className:"space-y-1.5",children:[h.jsx("label",{className:"text-sm font-medium",htmlFor:"email",children:"Email"}),h.jsx(vn,{id:"email",type:"email",required:!0,value:f,onChange:_=>d(_.target.value),placeholder:"you@example.com",autoComplete:"email"})]}),h.jsxs("div",{className:"space-y-1.5",children:[h.jsx("label",{className:"text-sm font-medium",htmlFor:"password",children:"Password"}),h.jsx(vn,{id:"password",type:"password",required:!0,minLength:8,value:y,onChange:_=>g(_.target.value),placeholder:"••••••••",autoComplete:i?"new-password":"current-password"})]}),m?h.jsx("p",{className:"text-sm text-destructive",children:m}):null,h.jsx(Ie,{type:"submit",className:"w-full",disabled:v,children:v?"Please wait…":i?"Create admin":"Sign in"})]})})]})}function _v({mode:n,onSuccess:s}){return h.jsx("div",{className:"flex h-full items-center justify-center bg-muted/30 p-6",children:h.jsx(x_,{mode:n,onSuccess:s})})}function Cd({children:n}){return h.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:n})}function S_({children:n}){const{data:s,isPending:i,isError:r,refetch:u}=_t({queryKey:["auth-status"],queryFn:pj,retry:1,staleTime:0}),{data:f,isPending:d,refetch:y}=A0();return i?h.jsx(Cd,{children:"Loading…"}):r?h.jsx(Cd,{children:"Unable to reach the Hogsend API."}):s!=null&&s.needsSetup?h.jsx(_v,{mode:"setup",onSuccess:()=>{u(),y()}}):d?h.jsx(Cd,{children:"Loading…"}):f!=null&&f.user?h.jsx(h.Fragment,{children:n}):h.jsx(_v,{mode:"login",onSuccess:()=>{y()}})}/**
66
- * @license lucide-react v0.474.0 - ISC
67
- *
68
- * This source code is licensed under the ISC license.
69
- * See the LICENSE file in the root directory of this source tree.
70
- */const j_=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),F0=(...n)=>n.filter((s,i,r)=>!!s&&s.trim()!==""&&r.indexOf(s)===i).join(" ").trim();/**
71
- * @license lucide-react v0.474.0 - ISC
72
- *
73
- * This source code is licensed under the ISC license.
74
- * See the LICENSE file in the root directory of this source tree.
75
- */var R_={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
76
- * @license lucide-react v0.474.0 - ISC
77
- *
78
- * This source code is licensed under the ISC license.
79
- * See the LICENSE file in the root directory of this source tree.
80
- */const __=K.forwardRef(({color:n="currentColor",size:s=24,strokeWidth:i=2,absoluteStrokeWidth:r,className:u="",children:f,iconNode:d,...y},g)=>K.createElement("svg",{ref:g,...R_,width:s,height:s,stroke:n,strokeWidth:r?Number(i)*24/Number(s):i,className:F0("lucide",u),...y},[...d.map(([m,b])=>K.createElement(m,b)),...Array.isArray(f)?f:[f]]));/**
81
- * @license lucide-react v0.474.0 - ISC
82
- *
83
- * This source code is licensed under the ISC license.
84
- * See the LICENSE file in the root directory of this source tree.
85
- */const Ve=(n,s)=>{const i=K.forwardRef(({className:r,...u},f)=>K.createElement(__,{ref:f,iconNode:s,className:F0(`lucide-${j_(n)}`,r),...u}));return i.displayName=`${n}`,i};/**
86
- * @license lucide-react v0.474.0 - ISC
87
- *
88
- * This source code is licensed under the ISC license.
89
- * See the LICENSE file in the root directory of this source tree.
90
- */const T_=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],w_=Ve("ArrowDown",T_);/**
91
- * @license lucide-react v0.474.0 - ISC
92
- *
93
- * This source code is licensed under the ISC license.
94
- * See the LICENSE file in the root directory of this source tree.
95
- */const E_=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],C_=Ve("ArrowUp",E_);/**
96
- * @license lucide-react v0.474.0 - ISC
97
- *
98
- * This source code is licensed under the ISC license.
99
- * See the LICENSE file in the root directory of this source tree.
100
- */const N_=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]],I0=Ve("Ban",N_);/**
101
- * @license lucide-react v0.474.0 - ISC
102
- *
103
- * This source code is licensed under the ISC license.
104
- * See the LICENSE file in the root directory of this source tree.
105
- */const M_=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],A_=Ve("Check",M_);/**
106
- * @license lucide-react v0.474.0 - ISC
107
- *
108
- * This source code is licensed under the ISC license.
109
- * See the LICENSE file in the root directory of this source tree.
110
- */const O_=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],z_=Ve("ChevronDown",O_);/**
111
- * @license lucide-react v0.474.0 - ISC
112
- *
113
- * This source code is licensed under the ISC license.
114
- * See the LICENSE file in the root directory of this source tree.
115
- */const D_=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],U_=Ve("CircleAlert",D_);/**
116
- * @license lucide-react v0.474.0 - ISC
117
- *
118
- * This source code is licensed under the ISC license.
119
- * See the LICENSE file in the root directory of this source tree.
120
- */const L_=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],k_=Ve("CircleCheck",L_);/**
121
- * @license lucide-react v0.474.0 - ISC
122
- *
123
- * This source code is licensed under the ISC license.
124
- * See the LICENSE file in the root directory of this source tree.
125
- */const B_=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],$0=Ve("CircleX",B_);/**
126
- * @license lucide-react v0.474.0 - ISC
127
- *
128
- * This source code is licensed under the ISC license.
129
- * See the LICENSE file in the root directory of this source tree.
130
- */const q_=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],H_=Ve("Copy",q_);/**
131
- * @license lucide-react v0.474.0 - ISC
132
- *
133
- * This source code is licensed under the ISC license.
134
- * See the LICENSE file in the root directory of this source tree.
135
- */const G_=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Q_=Ve("Eye",G_);/**
136
- * @license lucide-react v0.474.0 - ISC
137
- *
138
- * This source code is licensed under the ISC license.
139
- * See the LICENSE file in the root directory of this source tree.
140
- */const Y_=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],yh=Ve("GitBranch",Y_);/**
141
- * @license lucide-react v0.474.0 - ISC
142
- *
143
- * This source code is licensed under the ISC license.
144
- * See the LICENSE file in the root directory of this source tree.
145
- */const V_=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]],K_=Ve("Inbox",V_);/**
146
- * @license lucide-react v0.474.0 - ISC
147
- *
148
- * This source code is licensed under the ISC license.
149
- * See the LICENSE file in the root directory of this source tree.
150
- */const X_=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],P_=Ve("KeyRound",X_);/**
151
- * @license lucide-react v0.474.0 - ISC
152
- *
153
- * This source code is licensed under the ISC license.
154
- * See the LICENSE file in the root directory of this source tree.
155
- */const Z_=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],J_=Ve("LayoutDashboard",Z_);/**
156
- * @license lucide-react v0.474.0 - ISC
157
- *
158
- * This source code is licensed under the ISC license.
159
- * See the LICENSE file in the root directory of this source tree.
160
- */const F_=[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]],I_=Ve("LogOut",F_);/**
161
- * @license lucide-react v0.474.0 - ISC
162
- *
163
- * This source code is licensed under the ISC license.
164
- * See the LICENSE file in the root directory of this source tree.
165
- */const $_=[["path",{d:"M22 13V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h8",key:"12jkf8"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}],["path",{d:"m16 19 2 2 4-4",key:"1b14m6"}]],Tv=Ve("MailCheck",$_);/**
166
- * @license lucide-react v0.474.0 - ISC
167
- *
168
- * This source code is licensed under the ISC license.
169
- * See the LICENSE file in the root directory of this source tree.
170
- */const W_=[["path",{d:"M22 10.5V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h12.5",key:"e61zoh"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}],["path",{d:"M20 14v4",key:"1hm744"}],["path",{d:"M20 22v.01",key:"12bgn6"}]],W0=Ve("MailWarning",W_);/**
171
- * @license lucide-react v0.474.0 - ISC
172
- *
173
- * This source code is licensed under the ISC license.
174
- * See the LICENSE file in the root directory of this source tree.
175
- */const eT=[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]],eb=Ve("Mail",eT);/**
176
- * @license lucide-react v0.474.0 - ISC
177
- *
178
- * This source code is licensed under the ISC license.
179
- * See the LICENSE file in the root directory of this source tree.
180
- */const tT=[["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z",key:"s0h3yz"}]],nT=Ve("MousePointerClick",tT);/**
181
- * @license lucide-react v0.474.0 - ISC
182
- *
183
- * This source code is licensed under the ISC license.
184
- * See the LICENSE file in the root directory of this source tree.
185
- */const aT=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],sT=Ve("Plus",aT);/**
186
- * @license lucide-react v0.474.0 - ISC
187
- *
188
- * This source code is licensed under the ISC license.
189
- * See the LICENSE file in the root directory of this source tree.
190
- */const lT=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],iT=Ve("Search",lT);/**
191
- * @license lucide-react v0.474.0 - ISC
192
- *
193
- * This source code is licensed under the ISC license.
194
- * See the LICENSE file in the root directory of this source tree.
195
- */const rT=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],kr=Ve("Send",rT);/**
196
- * @license lucide-react v0.474.0 - ISC
197
- *
198
- * This source code is licensed under the ISC license.
199
- * See the LICENSE file in the root directory of this source tree.
200
- */const oT=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],uT=Ve("Settings",oT);/**
201
- * @license lucide-react v0.474.0 - ISC
202
- *
203
- * This source code is licensed under the ISC license.
204
- * See the LICENSE file in the root directory of this source tree.
205
- */const cT=[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]],tb=Ve("Sparkles",cT);/**
206
- * @license lucide-react v0.474.0 - ISC
207
- *
208
- * This source code is licensed under the ISC license.
209
- * See the LICENSE file in the root directory of this source tree.
210
- */const fT=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]],dT=Ve("UserMinus",fT);/**
211
- * @license lucide-react v0.474.0 - ISC
212
- *
213
- * This source code is licensed under the ISC license.
214
- * See the LICENSE file in the root directory of this source tree.
215
- */const hT=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]],nb=Ve("Users",hT);/**
216
- * @license lucide-react v0.474.0 - ISC
217
- *
218
- * This source code is licensed under the ISC license.
219
- * See the LICENSE file in the root directory of this source tree.
220
- */const mT=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ph=Ve("X",mT);/**
221
- * @license lucide-react v0.474.0 - ISC
222
- *
223
- * This source code is licensed under the ISC license.
224
- * See the LICENSE file in the root directory of this source tree.
225
- */const yT=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],pT=Ve("Zap",yT),ab=K.createContext(null);function gT({children:n}){const[s,i]=K.useState([]),r=K.useRef(0),u=K.useCallback(y=>{i(g=>g.filter(m=>m.id!==y))},[]),f=K.useCallback(y=>{const g=++r.current,m={id:g,title:y.title,description:y.description,variant:y.variant??"success"};i(b=>[...b,m]),window.setTimeout(()=>u(g),5e3)},[u]),d=K.useMemo(()=>({toast:f}),[f]);return h.jsxs(ab.Provider,{value:d,children:[n,h.jsx("div",{className:"pointer-events-none fixed bottom-4 right-4 z-[60] flex w-full max-w-sm flex-col gap-2",children:s.map(y=>h.jsxs("div",{className:Ze("pointer-events-auto flex items-start gap-3 rounded-md border bg-card p-4 shadow-lg",y.variant==="error"&&"border-destructive/40"),children:[y.variant==="success"?h.jsx(k_,{className:"mt-0.5 h-5 w-5 shrink-0 text-emerald-500"}):h.jsx($0,{className:"mt-0.5 h-5 w-5 shrink-0 text-destructive"}),h.jsxs("div",{className:"flex-1 space-y-0.5",children:[h.jsx("p",{className:"text-sm font-medium",children:y.title}),y.description?h.jsx("p",{className:"text-sm text-muted-foreground",children:y.description}):null]}),h.jsx("button",{type:"button","aria-label":"Dismiss",className:"text-muted-foreground transition-colors hover:text-foreground",onClick:()=>u(y.id),children:h.jsx(ph,{className:"h-4 w-4"})})]},y.id))})]})}function ci(){const n=K.useContext(ab);if(!n)throw new Error("useToast must be used within a ToastProvider");return n}const vT=new nS({defaultOptions:{queries:{staleTime:3e4,retry:(n,s)=>s instanceof bn&&[401,403].includes(s.status)?!1:n<2,refetchOnWindowFocus:!1}}}),bT=[{label:"Overview",path:"/",icon:J_},{label:"Sends",path:"/sends",icon:kr},{label:"Templates",path:"/templates",icon:eb},{label:"Journeys",path:"/journeys",icon:yh},{label:"Contacts",path:"/contacts",icon:nb},{label:"Suppressions",path:"/suppressions",icon:I0},{label:"Settings",path:"/settings",icon:uT}];function xT(){const n=oj({select:s=>s.location.pathname});return h.jsxs("aside",{className:"flex h-full w-60 flex-col border-r bg-card",children:[h.jsx("div",{className:"flex h-14 items-center border-b px-5",children:h.jsx("span",{className:"text-sm font-semibold tracking-tight",children:"Hogsend Studio"})}),h.jsx("nav",{className:"flex-1 space-y-1 overflow-y-auto p-2",children:bT.map(s=>{const i=s.path==="/"?n==="/":n.startsWith(s.path),r=s.icon;return h.jsxs(dh,{to:s.path,className:Ze("flex items-center gap-3 rounded-md px-3 py-2 text-sm font-medium transition-colors",i?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:[h.jsx(r,{className:"h-4 w-4"}),s.label]},s.path)})})]})}function ST(){const{data:n}=A0();return h.jsxs("div",{className:"flex h-full",children:[h.jsx(xT,{}),h.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[h.jsxs("header",{className:"flex h-14 items-center justify-end gap-3 border-b bg-card px-6",children:[n!=null&&n.user?h.jsx("span",{className:"text-sm text-muted-foreground",children:n.user.email}):null,h.jsxs(Ie,{variant:"ghost",size:"sm",onClick:()=>{wR()},children:[h.jsx(I_,{className:"h-4 w-4"}),"Sign out"]})]}),h.jsx("main",{className:"flex-1 overflow-y-auto p-6",children:h.jsx(T0,{})})]})]})}function nn({className:n,...s}){return h.jsx("div",{className:Ze("animate-pulse rounded-md bg-muted",n),...s})}function Br({rows:n=6}){return h.jsxs("div",{className:"space-y-2",children:[h.jsx(nn,{className:"h-9 w-full"}),Array.from({length:n}).map((s,i)=>h.jsx(nn,{className:"h-12 w-full"},i))]})}function jT({count:n=4}){return h.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:Array.from({length:n}).map((s,i)=>h.jsx(nn,{className:"h-28 w-full"},i))})}function fi({title:n,description:s,icon:i=K_}){return h.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 rounded-lg border border-dashed p-12 text-center",children:[h.jsx(i,{className:"h-8 w-8 text-muted-foreground"}),h.jsx("p",{className:"text-sm font-medium",children:n}),s?h.jsx("p",{className:"max-w-sm text-sm text-muted-foreground",children:s}):null]})}function xn({error:n,onRetry:s}){const i=n instanceof bn||n instanceof Error?n.message:"Something went wrong.";return h.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 rounded-lg border border-destructive/40 bg-destructive/5 p-12 text-center",children:[h.jsx(U_,{className:"h-8 w-8 text-destructive"}),h.jsxs("div",{className:"space-y-1",children:[h.jsx("p",{className:"text-sm font-medium",children:"Failed to load"}),h.jsx("p",{className:"max-w-sm text-sm text-muted-foreground",children:i})]}),s?h.jsx(Ie,{variant:"outline",size:"sm",onClick:s,children:"Retry"}):null]})}function tl({title:n,description:s,action:i}){return h.jsxs("div",{className:"flex items-start justify-between gap-4",children:[h.jsxs("div",{children:[h.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:n}),s?h.jsx("p",{className:"text-sm text-muted-foreground",children:s}):null]}),i?h.jsx("div",{className:"shrink-0",children:i}):null]})}const di=K.forwardRef(({className:n,...s},i)=>h.jsx("div",{className:"relative w-full overflow-auto",children:h.jsx("table",{ref:i,className:Ze("w-full caption-bottom text-sm",n),...s})}));di.displayName="Table";const hi=K.forwardRef(({className:n,...s},i)=>h.jsx("thead",{ref:i,className:Ze("[&_tr]:border-b",n),...s}));hi.displayName="TableHeader";const mi=K.forwardRef(({className:n,...s},i)=>h.jsx("tbody",{ref:i,className:Ze("[&_tr:last-child]:border-0",n),...s}));mi.displayName="TableBody";const Cn=K.forwardRef(({className:n,...s},i)=>h.jsx("tr",{ref:i,className:Ze("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",n),...s}));Cn.displayName="TableRow";const Ye=K.forwardRef(({className:n,...s},i)=>h.jsx("th",{ref:i,className:Ze("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",n),...s}));Ye.displayName="TableHead";const ke=K.forwardRef(({className:n,...s},i)=>h.jsx("td",{ref:i,className:Ze("p-2 align-middle [&:has([role=checkbox])]:pr-0",n),...s}));ke.displayName="TableCell";const RT=K.forwardRef(({className:n,...s},i)=>h.jsx("caption",{ref:i,className:Ze("mt-4 text-sm text-muted-foreground",n),...s}));RT.displayName="TableCaption";function _T(){return tt.get("/v1/admin/metrics/overview")}function TT(n){return tt.get("/v1/admin/emails",{query:n})}function wT(n){return tt.get(`/v1/admin/emails/${n}`)}function ET(n){return tt.post(`/v1/admin/emails/${n}/resend`)}function CT(){return tt.get("/v1/admin/templates")}function NT(n){return tt.get(`/v1/admin/templates/${encodeURIComponent(n)}/preview`)}function MT(n,s){return tt.post(`/v1/admin/templates/${encodeURIComponent(n)}/send-test`,{json:{to:s}})}function AT(n){return tt.get(`/v1/admin/reporting/templates/${encodeURIComponent(n)}`)}function OT(){return tt.get("/v1/admin/metrics/journeys")}function zT(n){return tt.get(`/v1/admin/metrics/journeys/${encodeURIComponent(n)}`)}function DT(){return tt.get("/v1/admin/journeys",{query:{limit:100}})}function UT(n,s){return tt.put(`/v1/admin/journeys/${encodeURIComponent(n)}`,{json:{enabled:s}})}function LT(n){return tt.get("/v1/admin/contacts",{query:{search:n,limit:50}})}function kT(n){return tt.get(`/v1/admin/contacts/${encodeURIComponent(n)}`)}function BT(n){return tt.get(`/v1/admin/reporting/contacts/${encodeURIComponent(n)}/activity`)}function qT(n){return tt.get(`/v1/admin/contacts/${encodeURIComponent(n)}/timeline`,{query:{limit:100}})}function sb(n,s){return tt.put(`/v1/admin/contacts/${encodeURIComponent(n)}/preferences`,{json:s})}function HT(n){return tt.get("/v1/admin/suppressions",{query:{type:n,limit:200}})}function GT(){return tt.get("/v1/admin/api-keys",{query:{limit:100,includeRevoked:"true"}})}function QT(n){return tt.post("/v1/admin/api-keys",{json:n})}function YT(n){return tt.delete(`/v1/admin/api-keys/${encodeURIComponent(n)}`)}const st={overview:["overview"],emails:n=>["emails",n],email:n=>["email",n],templates:["templates"],templatePreview:n=>["template-preview",n],templateReport:n=>["template-report",n],journeyMetrics:["journey-metrics"],journeys:["journeys"],journeyFunnel:n=>["journey-funnel",n],contacts:n=>["contacts",n],contact:n=>["contact",n],contactActivity:n=>["contact-activity",n],contactTimeline:n=>["contact-timeline",n],suppressions:n=>["suppressions",n],apiKeys:["api-keys"]};function Hn(n){if(!n)return"—";const s=new Date(n);return Number.isNaN(s.getTime())?"—":s.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function Tu(n){if(!n)return"—";const s=new Date(n);return Number.isNaN(s.getTime())?"—":s.toLocaleDateString(void 0,{month:"short",day:"numeric"})}function VT(n){if(!n)return"—";const s=new Date(n);if(Number.isNaN(s.getTime()))return"—";const i=Date.now()-s.getTime(),r=Math.round(i/1e3);if(r<60)return"just now";const u=Math.round(r/60);if(u<60)return`${u}m ago`;const f=Math.round(u/60);if(f<24)return`${f}h ago`;const d=Math.round(f/24);return d<30?`${d}d ago`:Tu(n)}function oi(n){return n==null||Number.isNaN(n)?"—":`${(n*100).toFixed(1)}%`}function Ht(n){return n==null||Number.isNaN(n)?"—":n.toLocaleString()}function KT(n){if(n==null||Number.isNaN(n))return"—";if(n<60)return`${Math.round(n)}s`;const s=Math.floor(n/60);if(s<60)return`${s}m`;const i=Math.floor(s/60),r=s%60;if(i<24)return r?`${i}h ${r}m`:`${i}h`;const u=Math.floor(i/24),f=i%24;return f?`${u}d ${f}h`:`${u}d`}function XT(n,s=48){return n.length>s?`${n.slice(0,s-1)}…`:n}const PT=D0("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Qt({className:n,variant:s,...i}){return h.jsx("div",{className:Ze(PT({variant:s}),n),...i})}const ZT={delivered:{variant:"outline",className:"border-emerald-500/40 text-emerald-600 dark:text-emerald-400"},opened:{variant:"outline",className:"border-sky-500/40 text-sky-600 dark:text-sky-400"},clicked:{variant:"outline",className:"border-violet-500/40 text-violet-600 dark:text-violet-400"},sent:{variant:"secondary"},rendered:{variant:"secondary"},queued:{variant:"secondary"},bounced:{variant:"destructive"},complained:{variant:"destructive"},failed:{variant:"destructive"}};function Hu({status:n}){const s=ZT[n]??{variant:"outline"};return h.jsx(Qt,{variant:s.variant,className:Ze("capitalize",s.className),children:n})}function Uu({open:n,onClose:s,title:i,description:r,children:u,footer:f,className:d}){return K.useEffect(()=>{if(!n)return;const y=g=>{g.key==="Escape"&&s()};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[n,s]),n?h.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[h.jsx("button",{type:"button","aria-label":"Close dialog",className:"absolute inset-0 bg-black/50",onClick:s}),h.jsxs("div",{role:"dialog","aria-modal":"true",className:Ze("relative z-10 w-full max-w-lg rounded-lg border bg-card p-6 shadow-lg",d),children:[h.jsxs("div",{className:"mb-4 flex items-start justify-between gap-4",children:[h.jsxs("div",{className:"space-y-1",children:[h.jsx("h2",{className:"text-lg font-semibold leading-none tracking-tight",children:i}),r?h.jsx("p",{className:"text-sm text-muted-foreground",children:r}):null]}),h.jsx(Ie,{variant:"ghost",size:"icon",className:"-mr-2 -mt-2 h-8 w-8",onClick:s,"aria-label":"Close",children:h.jsx(ph,{className:"h-4 w-4"})})]}),u?h.jsx("div",{className:"space-y-4",children:u}):null,f?h.jsx("div",{className:"mt-6 flex justify-end gap-2",children:f}):null]})]}):null}function qr({open:n,onClose:s,onConfirm:i,title:r,description:u,confirmLabel:f="Confirm",cancelLabel:d="Cancel",destructive:y,loading:g}){return h.jsx(Uu,{open:n,onClose:s,title:r,description:u,footer:h.jsxs(h.Fragment,{children:[h.jsx(Ie,{variant:"outline",onClick:s,disabled:g,children:d}),h.jsx(Ie,{variant:y?"destructive":"default",onClick:i,disabled:g,children:g?"Working…":f})]})})}function lb({open:n,onClose:s,title:i,description:r,children:u,className:f}){return K.useEffect(()=>{if(!n)return;const d=y=>{y.key==="Escape"&&s()};return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[n,s]),n?h.jsxs("div",{className:"fixed inset-0 z-50",children:[h.jsx("button",{type:"button","aria-label":"Close panel",className:"absolute inset-0 bg-black/50",onClick:s}),h.jsxs("div",{role:"dialog","aria-modal":"true",className:Ze("absolute inset-y-0 right-0 flex w-full max-w-2xl flex-col border-l bg-card shadow-xl",f),children:[h.jsxs("div",{className:"flex items-start justify-between gap-4 border-b p-6",children:[h.jsxs("div",{className:"space-y-1",children:[h.jsx("h2",{className:"text-lg font-semibold leading-none tracking-tight",children:i}),r?h.jsx("p",{className:"break-all text-sm text-muted-foreground",children:r}):null]}),h.jsx(Ie,{variant:"ghost",size:"icon",className:"-mr-2 -mt-2 h-8 w-8 shrink-0",onClick:s,"aria-label":"Close",children:h.jsx(ph,{className:"h-4 w-4"})})]}),h.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:u})]})]}):null}const JT={event:pT,journey:yh,email:eb};function FT({entry:n}){const s=JT[n.type],i=n.data,r=n.type==="event"?String(i.event??"event"):n.type==="journey"?`${String(i.journeyId??"journey")} · ${String(i.status??"")}`:String(i.subject??i.templateKey??"email");return h.jsxs("li",{className:"flex gap-3",children:[h.jsx("span",{className:"mt-0.5 flex h-7 w-7 shrink-0 items-center justify-center rounded-full border bg-card",children:h.jsx(s,{className:"h-3.5 w-3.5 text-muted-foreground"})}),h.jsxs("div",{className:"min-w-0 flex-1 pb-3",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("p",{className:"truncate text-sm font-medium",children:r}),n.type==="email"&&i.status?h.jsx(Hu,{status:String(i.status)}):null]}),h.jsx("p",{className:"text-xs text-muted-foreground",children:Hn(n.timestamp)})]})]})}function IT({contactId:n,onClose:s}){var _,w;const i=n!==null,{toast:r}=ci(),u=Is(),[f,d]=K.useState(!1),y=_t({queryKey:n?st.contact(n):["contact","none"],queryFn:()=>kT(n),enabled:i}),g=_t({queryKey:n?st.contactActivity(n):["activity","none"],queryFn:()=>BT(n),enabled:i}),m=_t({queryKey:n?st.contactTimeline(n):["timeline","none"],queryFn:()=>qT(n),enabled:i}),b=Fs({mutationFn:()=>sb(n,{suppressed:!1}),onSuccess:()=>{r({title:"Contact un-suppressed",description:"They can receive emails again."}),d(!1),n&&u.invalidateQueries({queryKey:st.contact(n)}),u.invalidateQueries({queryKey:["suppressions"]})},onError:R=>{r({variant:"error",title:"Un-suppress failed",description:R instanceof bn?R.message:"Unexpected error."}),d(!1)}}),v=(_=y.data)==null?void 0:_.contact,S=(w=y.data)==null?void 0:w.preferences,j=(S==null?void 0:S.suppressed)||(S==null?void 0:S.unsubscribedAll);return h.jsxs(h.Fragment,{children:[h.jsx(lb,{open:i,onClose:s,title:(v==null?void 0:v.email)??(v==null?void 0:v.externalId)??"Contact",description:v?v.externalId:void 0,children:y.isPending?h.jsxs("div",{className:"space-y-4",children:[h.jsx(nn,{className:"h-24 w-full"}),h.jsx(nn,{className:"h-40 w-full"})]}):y.isError?h.jsx(xn,{error:y.error,onRetry:()=>y.refetch()}):v?h.jsxs("div",{className:"space-y-6",children:[h.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[S!=null&&S.suppressed?h.jsx(Qt,{variant:"destructive",children:"Suppressed"}):null,S!=null&&S.unsubscribedAll?h.jsx(Qt,{variant:"destructive",children:"Unsubscribed"}):null,S&&S.bounceCount>0?h.jsxs(Qt,{variant:"secondary",children:[S.bounceCount," bounce",S.bounceCount===1?"":"s"]}):null,j?null:h.jsx(Qt,{variant:"outline",className:"border-emerald-500/40 text-emerald-600 dark:text-emerald-400",children:"Subscribed"}),j?h.jsx(Ie,{size:"sm",variant:"outline",className:"ml-auto",onClick:()=>d(!0),children:"Un-suppress"}):null]}),h.jsxs("dl",{className:"grid grid-cols-2 gap-4",children:[h.jsxs("div",{children:[h.jsx("dt",{className:"text-xs text-muted-foreground",children:"First seen"}),h.jsx("dd",{className:"text-sm",children:Hn(v.firstSeenAt)})]}),h.jsxs("div",{children:[h.jsx("dt",{className:"text-xs text-muted-foreground",children:"Last seen"}),h.jsx("dd",{className:"text-sm",children:Hn(v.lastSeenAt)})]})]}),h.jsxs("section",{children:[h.jsxs("h3",{className:"mb-3 text-sm font-semibold",children:["Email activity",g.data?` (${g.data.total})`:""]}),g.isPending?h.jsx(nn,{className:"h-20 w-full"}):g.isError?h.jsx("p",{className:"text-sm text-muted-foreground",children:"Could not load email activity."}):g.data&&g.data.sends.length>0?h.jsx("ul",{className:"space-y-2",children:g.data.sends.slice(0,10).map(R=>h.jsxs("li",{className:"flex items-center justify-between gap-3 rounded-md border p-3",children:[h.jsxs("div",{className:"min-w-0",children:[h.jsx("p",{className:"truncate text-sm font-medium",children:R.subject}),h.jsx("p",{className:"text-xs text-muted-foreground",children:Hn(R.createdAt)})]}),h.jsx(Hu,{status:R.status})]},R.id))}):h.jsx("p",{className:"text-sm text-muted-foreground",children:"No emails sent."})]}),h.jsxs("section",{children:[h.jsx("h3",{className:"mb-3 text-sm font-semibold",children:"Timeline"}),m.isPending?h.jsx(nn,{className:"h-20 w-full"}):m.isError?h.jsx("p",{className:"text-sm text-muted-foreground",children:"Could not load timeline."}):m.data&&m.data.timeline.length>0?h.jsx("ul",{children:m.data.timeline.map((R,U)=>h.jsx(FT,{entry:R},`${R.type}-${R.timestamp}-${U}`))}):h.jsx("p",{className:"text-sm text-muted-foreground",children:"No activity yet."})]})]}):null}),h.jsx(qr,{open:f,onClose:()=>d(!1),onConfirm:()=>b.mutate(),title:"Un-suppress this contact?",description:"They will be eligible to receive emails again.",confirmLabel:"Un-suppress",loading:b.isPending})]})}function $T(){var g;const[n,s]=K.useState(""),[i,r]=K.useState(""),[u,f]=K.useState(null);K.useEffect(()=>{const m=window.setTimeout(()=>r(n.trim()),300);return()=>window.clearTimeout(m)},[n]);const d=_t({queryKey:st.contacts(i),queryFn:()=>LT(i||void 0),placeholderData:ah}),y=((g=d.data)==null?void 0:g.contacts)??[];return h.jsxs("div",{className:"space-y-6",children:[h.jsx(tl,{title:"Contacts",description:"Search contacts and review their full activity timeline."}),h.jsxs("div",{className:"relative max-w-sm",children:[h.jsx(iT,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),h.jsx(vn,{placeholder:"Search by email or external ID…",className:"pl-9",value:n,onChange:m=>s(m.target.value)})]}),d.isPending?h.jsx(Br,{}):d.isError?h.jsx(xn,{error:d.error,onRetry:()=>d.refetch()}):y.length===0?h.jsx(fi,{title:"No contacts found",description:i?"No contacts match your search.":"Contacts appear here as events are ingested."}):h.jsx("div",{className:"rounded-lg border",children:h.jsxs(di,{children:[h.jsx(hi,{children:h.jsxs(Cn,{children:[h.jsx(Ye,{children:"Email"}),h.jsx(Ye,{children:"External ID"}),h.jsx(Ye,{className:"text-right",children:"Last seen"})]})}),h.jsx(mi,{children:y.map(m=>h.jsxs(Cn,{className:"cursor-pointer",onClick:()=>f(m.id),children:[h.jsx(ke,{className:"font-medium",children:m.email??"—"}),h.jsx(ke,{className:"text-muted-foreground",children:m.externalId}),h.jsx(ke,{className:"text-right text-muted-foreground",children:VT(m.lastSeenAt)})]},m.id))})]})}),h.jsx(IT,{contactId:u,onClose:()=>f(null)})]})}function WT({step:n,base:s}){const i=s>0?n.value/s:0,r=i*100;return h.jsxs("div",{className:"space-y-1",children:[h.jsxs("div",{className:"flex items-center justify-between text-sm",children:[h.jsx("span",{className:"font-medium",children:n.label}),h.jsxs("span",{className:"text-muted-foreground",children:[Ht(n.value),s>0?h.jsxs("span",{className:"ml-1 text-xs",children:["(",oi(i),")"]}):null]})]}),h.jsx("div",{className:"h-2 overflow-hidden rounded-full bg-muted",children:h.jsx("div",{className:"h-full rounded-full bg-primary",style:{width:`${Math.min(r,100)}%`}})})]})}function ew({journeyId:n}){const s=_t({queryKey:st.journeyFunnel(n),queryFn:()=>zT(n)});if(s.isPending)return h.jsx(nn,{className:"h-48 w-full"});if(s.isError)return h.jsx(xn,{error:s.error,onRetry:()=>s.refetch()});const i=s.data,r=[{label:"Enrolled",value:i.enrolled},{label:"Email sent",value:i.emailSent},{label:"Opened",value:i.emailOpened},{label:"Clicked",value:i.emailClicked},{label:"Completed",value:i.completed}];return h.jsxs("div",{className:"space-y-4",children:[h.jsx("div",{className:"space-y-3",children:r.map(u=>h.jsx(WT,{step:u,base:i.enrolled},u.label))}),h.jsxs("div",{className:"flex gap-4 border-t pt-3 text-sm text-muted-foreground",children:[h.jsxs("span",{children:["Failed: ",Ht(i.failed)]}),h.jsxs("span",{children:["Exited: ",Ht(i.exited)]})]})]})}function tw(){var _,w;const{toast:n}=ci(),s=Is(),[i,r]=K.useState(null),[u,f]=K.useState(null),d=_t({queryKey:st.journeyMetrics,queryFn:OT}),y=_t({queryKey:st.journeys,queryFn:DT}),g=Fs({mutationFn:R=>UT(R.id,R.enabled),onSuccess:(R,U)=>{n({title:U.enabled?"Journey enabled":"Journey disabled"}),f(null),s.invalidateQueries({queryKey:st.journeys}),s.invalidateQueries({queryKey:st.journeyMetrics})},onError:R=>{n({variant:"error",title:"Update failed",description:R instanceof bn?R.message:"Unexpected error."}),f(null)}}),m=d.isPending||y.isPending,b=d.isError||y.isError,v=new Map((((_=y.data)==null?void 0:_.journeys)??[]).map(R=>[R.id,R.enabled])),S=(((w=d.data)==null?void 0:w.journeys)??[]).map(R=>({...R,enabled:v.get(R.journeyId)??!1})),j=S.find(R=>R.journeyId===i)??null;return h.jsxs("div",{className:"space-y-6",children:[h.jsx(tl,{title:"Journeys",description:"Lifecycle journeys, completion rates, and per-journey funnels."}),m?h.jsx(Br,{}):b?h.jsx(xn,{error:d.error??y.error,onRetry:()=>{d.refetch(),y.refetch()}}):S.length===0?h.jsx(fi,{title:"No journeys registered",description:"Define a journey with defineJourney() and it will show up here."}):h.jsx("div",{className:"rounded-lg border",children:h.jsxs(di,{children:[h.jsx(hi,{children:h.jsxs(Cn,{children:[h.jsx(Ye,{children:"Journey"}),h.jsx(Ye,{className:"text-right",children:"Enrolled"}),h.jsx(Ye,{className:"text-right",children:"Active"}),h.jsx(Ye,{className:"text-right",children:"Completed"}),h.jsx(Ye,{className:"text-right",children:"Completion"}),h.jsx(Ye,{className:"text-right",children:"Avg duration"}),h.jsx(Ye,{children:"State"}),h.jsx(Ye,{className:"text-right",children:"Action"})]})}),h.jsx(mi,{children:S.map(R=>h.jsxs(Cn,{className:"cursor-pointer","data-state":R.journeyId===i?"selected":void 0,onClick:()=>r(U=>U===R.journeyId?null:R.journeyId),children:[h.jsxs(ke,{children:[h.jsx("span",{className:"font-medium",children:R.name}),h.jsx("span",{className:"block text-xs text-muted-foreground",children:R.journeyId})]}),h.jsx(ke,{className:"text-right",children:Ht(R.enrolled)}),h.jsx(ke,{className:"text-right",children:Ht(R.active)}),h.jsx(ke,{className:"text-right",children:Ht(R.completed)}),h.jsx(ke,{className:"text-right",children:oi(R.completionRate)}),h.jsx(ke,{className:"text-right text-muted-foreground",children:KT(R.avgDurationSecs)}),h.jsx(ke,{children:h.jsx(Qt,{variant:R.enabled?"default":"secondary",children:R.enabled?"Enabled":"Disabled"})}),h.jsx(ke,{className:"text-right",children:h.jsx(Ie,{variant:"outline",size:"sm",onClick:U=>{U.stopPropagation(),f(R)},children:R.enabled?"Disable":"Enable"})})]},R.journeyId))})]})}),j?h.jsxs(zr,{children:[h.jsx(Dr,{children:h.jsxs(Ur,{className:"text-base",children:[j.name," — funnel"]})}),h.jsx(Lr,{children:h.jsx(ew,{journeyId:j.journeyId})})]}):null,h.jsx(qr,{open:u!==null,onClose:()=>f(null),onConfirm:()=>u&&g.mutate({id:u.journeyId,enabled:!u.enabled}),title:u!=null&&u.enabled?"Disable this journey?":"Enable this journey?",description:u!=null&&u.enabled?"New events will stop enrolling users into this journey.":"New matching events will start enrolling users into this journey.",confirmLabel:u!=null&&u.enabled?"Disable":"Enable",destructive:u==null?void 0:u.enabled,loading:g.isPending})]})}function zs({label:n,value:s,hint:i,icon:r}){return h.jsxs(zr,{children:[h.jsxs(Dr,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[h.jsx(Ur,{className:"text-sm font-medium text-muted-foreground",children:n}),r?h.jsx(r,{className:"h-4 w-4 text-muted-foreground"}):null]}),h.jsxs(Lr,{children:[h.jsx("div",{className:"text-2xl font-semibold tracking-tight",children:s}),i?h.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:i}):null]})]})}function nw(){const n=_t({queryKey:st.overview,queryFn:_T});return h.jsxs("div",{className:"space-y-6",children:[h.jsx(tl,{title:"Overview",description:"Key delivery and engagement metrics at a glance."}),n.isPending?h.jsx(jT,{count:6}):n.isError?h.jsx(xn,{error:n.error,onRetry:()=>n.refetch()}):h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:[h.jsx(zs,{label:"Total contacts",value:Ht(n.data.totalContacts),icon:nb}),h.jsx(zs,{label:"Active journeys",value:Ht(n.data.activeJourneys),hint:"Instances active or waiting",icon:yh}),h.jsx(zs,{label:"Sent (24h)",value:Ht(n.data.emailsSent24h),icon:kr}),h.jsx(zs,{label:"Sent (7d)",value:Ht(n.data.emailsSent7d),icon:Tv}),h.jsx(zs,{label:"Sent (30d)",value:Ht(n.data.emailsSent30d),icon:Tv}),h.jsx(zs,{label:"Bounce rate (30d)",value:oi(n.data.bounceRate30d),hint:"Bounced / sent in last 30 days",icon:W0})]}),h.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:h.jsx(zs,{label:"Unsubscribe rate",value:oi(n.data.unsubscribeRate),hint:"Unsubscribed / total preferences",icon:dT})})]})]})}function gn({className:n,...s}){return h.jsx("label",{className:Ze("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",n),...s})}const Lu=K.forwardRef(({className:n,children:s,...i},r)=>h.jsxs("div",{className:"relative",children:[h.jsx("select",{ref:r,className:Ze("flex h-9 w-full appearance-none rounded-md border border-input bg-transparent px-3 py-1 pr-8 text-sm shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",n),...i,children:s}),h.jsx(z_,{className:"pointer-events-none absolute right-2 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"})]}));Lu.displayName="Select";const aw={queued:tb,sent:kr,delivered:A_,opened:Q_,clicked:nT,bounced:W0,complained:I0,failed:$0};function sw({event:n}){const s=aw[n.type]??tb;return h.jsxs("li",{className:"flex gap-3",children:[h.jsxs("div",{className:"flex flex-col items-center",children:[h.jsx("span",{className:"flex h-7 w-7 items-center justify-center rounded-full border bg-card",children:h.jsx(s,{className:"h-3.5 w-3.5 text-muted-foreground"})}),h.jsx("span",{className:"w-px flex-1 bg-border"})]}),h.jsxs("div",{className:"pb-4",children:[h.jsx("p",{className:"text-sm font-medium capitalize",children:n.type}),h.jsx("p",{className:"text-xs text-muted-foreground",children:Hn(n.timestamp)}),n.url?h.jsx("p",{className:"mt-0.5 break-all text-xs text-muted-foreground",children:n.url}):null]})]})}function Va({label:n,value:s}){return h.jsxs("div",{className:"space-y-0.5",children:[h.jsx("dt",{className:"text-xs text-muted-foreground",children:n}),h.jsx("dd",{className:"break-all text-sm",children:s})]})}function lw({emailId:n,onClose:s}){const i=n!==null,{toast:r}=ci(),u=Is(),[f,d]=K.useState(!1),y=_t({queryKey:n?st.email(n):["email","none"],queryFn:()=>wT(n),enabled:i}),g=Fs({mutationFn:()=>ET(n),onSuccess:()=>{r({title:"Resend queued",description:"A fresh send was queued from this template."}),d(!1),u.invalidateQueries({queryKey:["emails"]}),n&&u.invalidateQueries({queryKey:st.email(n)})},onError:v=>{r({variant:"error",title:"Resend failed",description:v instanceof bn?v.message:"Unexpected error."}),d(!1)}}),m=y.data,b=m&&["failed","bounced"].includes(m.email.status);return h.jsxs(h.Fragment,{children:[h.jsx(lb,{open:i,onClose:s,title:"Email send",description:m==null?void 0:m.email.subject,children:y.isPending?h.jsxs("div",{className:"space-y-4",children:[h.jsx(nn,{className:"h-24 w-full"}),h.jsx(nn,{className:"h-40 w-full"})]}):y.isError?h.jsx(xn,{error:y.error,onRetry:()=>y.refetch()}):m?h.jsxs("div",{className:"space-y-6",children:[h.jsxs("div",{className:"flex items-center justify-between gap-2",children:[h.jsx(Hu,{status:m.email.status}),b?h.jsxs(Ie,{size:"sm",variant:"outline",onClick:()=>d(!0),children:[h.jsx(kr,{className:"h-4 w-4"}),"Resend"]}):null]}),h.jsxs("dl",{className:"grid grid-cols-2 gap-4",children:[h.jsx(Va,{label:"To",value:m.email.toEmail}),h.jsx(Va,{label:"From",value:m.email.fromEmail}),h.jsx(Va,{label:"Template",value:m.email.templateKey??"—"}),h.jsx(Va,{label:"Category",value:m.email.category??"—"}),h.jsx(Va,{label:"Journey",value:m.email.journeyId??"—"}),h.jsx(Va,{label:"User",value:m.email.userId??"—"}),h.jsx(Va,{label:"Resend ID",value:m.email.resendId??"—"}),h.jsx(Va,{label:"Created",value:Hn(m.email.createdAt)})]}),h.jsxs("section",{children:[h.jsx("h3",{className:"mb-3 text-sm font-semibold",children:"Timeline"}),m.events.length===0?h.jsx("p",{className:"text-sm text-muted-foreground",children:"No delivery events recorded yet."}):h.jsx("ul",{className:"[&>li:last-child>div:first-child>span:last-child]:hidden",children:m.events.map((v,S)=>h.jsx(sw,{event:v},`${v.type}-${v.timestamp}-${S}`))})]}),h.jsxs("section",{children:[h.jsxs("h3",{className:"mb-3 text-sm font-semibold",children:["Tracked links (",m.trackedLinks.length,")"]}),m.trackedLinks.length===0?h.jsx("p",{className:"text-sm text-muted-foreground",children:"No tracked links in this email."}):h.jsx("ul",{className:"space-y-2",children:m.trackedLinks.map(v=>h.jsxs("li",{className:"flex items-center justify-between gap-3 rounded-md border p-3",children:[h.jsx("span",{className:"break-all text-sm",children:v.originalUrl}),h.jsxs("span",{className:"shrink-0 text-xs text-muted-foreground",children:[v.clickCount," click",v.clickCount===1?"":"s"]})]},v.id))})]})]}):null}),h.jsx(qr,{open:f,onClose:()=>d(!1),onConfirm:()=>g.mutate(),title:"Resend this email?",description:"A new send will be queued from the original template and recipient.",confirmLabel:"Resend",loading:g.isPending})]})}const iw=["queued","rendered","sent","delivered","opened","clicked","bounced","complained","failed"],rw=["opened","clicked","bounced","complained"],gr=25,wv={templateKey:"",status:"",engagement:"",journeyId:"",userId:"",from:"",to:""};function ow(){var M,Q;const[n,s]=K.useState(wv),[i,r]=K.useState("createdAt"),[u,f]=K.useState("desc"),[d,y]=K.useState(0),[g,m]=K.useState(null),b=n.from?new Date(`${n.from}T00:00:00`).toISOString():void 0,v=n.to?new Date(`${n.to}T23:59:59`).toISOString():void 0,S={limit:gr,offset:d,templateKey:n.templateKey||void 0,status:n.status||void 0,engagement:n.engagement||void 0,journeyId:n.journeyId||void 0,userId:n.userId||void 0,from:b,to:v,sort:i,order:u},j=_t({queryKey:st.emails(S),queryFn:()=>TT(S),placeholderData:ah});function _(D){s(O=>({...O,...D})),y(0)}function w(D){i===D?f(O=>O==="asc"?"desc":"asc"):(r(D),f("desc")),y(0)}const R=Object.values(n).some(Boolean),U=((M=j.data)==null?void 0:M.total)??0,k=((Q=j.data)==null?void 0:Q.emails)??[];function H({column:D,label:O}){const A=i===D;return h.jsx(Ye,{children:h.jsxs("button",{type:"button",className:"inline-flex items-center gap-1 font-medium hover:text-foreground",onClick:()=>w(D),children:[O,A?u==="asc"?h.jsx(C_,{className:"h-3 w-3"}):h.jsx(w_,{className:"h-3 w-3"}):null]})})}return h.jsxs("div",{className:"space-y-6",children:[h.jsx(tl,{title:"Sends",description:"Every email sent — filter, sort, and drill into the timeline."}),h.jsxs("div",{className:"grid gap-3 rounded-lg border p-4 md:grid-cols-3 lg:grid-cols-4",children:[h.jsxs("div",{className:"space-y-1.5",children:[h.jsx(gn,{htmlFor:"f-template",children:"Template"}),h.jsx(vn,{id:"f-template",placeholder:"template key",value:n.templateKey,onChange:D=>_({templateKey:D.target.value})})]}),h.jsxs("div",{className:"space-y-1.5",children:[h.jsx(gn,{htmlFor:"f-status",children:"Status"}),h.jsxs(Lu,{id:"f-status",value:n.status,onChange:D=>_({status:D.target.value}),children:[h.jsx("option",{value:"",children:"All"}),iw.map(D=>h.jsx("option",{value:D,children:D},D))]})]}),h.jsxs("div",{className:"space-y-1.5",children:[h.jsx(gn,{htmlFor:"f-engagement",children:"Engagement"}),h.jsxs(Lu,{id:"f-engagement",value:n.engagement,onChange:D=>_({engagement:D.target.value}),children:[h.jsx("option",{value:"",children:"Any"}),rw.map(D=>h.jsx("option",{value:D,children:D},D))]})]}),h.jsxs("div",{className:"space-y-1.5",children:[h.jsx(gn,{htmlFor:"f-journey",children:"Journey ID"}),h.jsx(vn,{id:"f-journey",placeholder:"journey id",value:n.journeyId,onChange:D=>_({journeyId:D.target.value})})]}),h.jsxs("div",{className:"space-y-1.5",children:[h.jsx(gn,{htmlFor:"f-user",children:"User ID"}),h.jsx(vn,{id:"f-user",placeholder:"user id",value:n.userId,onChange:D=>_({userId:D.target.value})})]}),h.jsxs("div",{className:"space-y-1.5",children:[h.jsx(gn,{htmlFor:"f-from",children:"From"}),h.jsx(vn,{id:"f-from",type:"date",value:n.from,onChange:D=>_({from:D.target.value})})]}),h.jsxs("div",{className:"space-y-1.5",children:[h.jsx(gn,{htmlFor:"f-to",children:"To"}),h.jsx(vn,{id:"f-to",type:"date",value:n.to,onChange:D=>_({to:D.target.value})})]}),R?h.jsx("div",{className:"flex items-end",children:h.jsx(Ie,{variant:"ghost",size:"sm",onClick:()=>{s(wv),y(0)},children:"Clear filters"})}):null]}),j.isPending?h.jsx(Br,{}):j.isError?h.jsx(xn,{error:j.error,onRetry:()=>j.refetch()}):k.length===0?h.jsx(fi,{title:"No sends found",description:R?"Try widening or clearing your filters.":"Emails will appear here once your journeys start sending."}):h.jsx("div",{className:"rounded-lg border",children:h.jsxs(di,{children:[h.jsx(hi,{children:h.jsxs(Cn,{children:[h.jsx(Ye,{children:"Recipient"}),h.jsx(Ye,{children:"Subject"}),h.jsx(Ye,{children:"Template"}),h.jsx(Ye,{children:"Status"}),h.jsx(H,{column:"sentAt",label:"Sent"}),h.jsx(H,{column:"createdAt",label:"Created"})]})}),h.jsx(mi,{children:k.map(D=>h.jsxs(Cn,{className:"cursor-pointer",onClick:()=>m(D.id),children:[h.jsx(ke,{className:"font-medium",children:D.toEmail}),h.jsx(ke,{children:XT(D.subject,40)}),h.jsx(ke,{className:"text-muted-foreground",children:D.templateKey??"—"}),h.jsx(ke,{children:h.jsx(Hu,{status:D.status})}),h.jsx(ke,{className:"text-muted-foreground",children:Hn(D.sentAt)}),h.jsx(ke,{className:"text-muted-foreground",children:Hn(D.createdAt)})]},D.id))})]})}),U>0?h.jsxs("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[h.jsxs("span",{children:[d+1,"–",Math.min(d+gr,U)," of ",U]}),h.jsxs("div",{className:"flex gap-2",children:[h.jsx(Ie,{variant:"outline",size:"sm",disabled:d===0,onClick:()=>y(D=>Math.max(0,D-gr)),children:"Previous"}),h.jsx(Ie,{variant:"outline",size:"sm",disabled:d+gr>=U,onClick:()=>y(D=>D+gr),children:"Next"})]})]}):null,h.jsx(lw,{emailId:g,onClose:()=>m(null)})]})}const uw=["read","journey-admin","full-admin"];function cw(){var k;const{toast:n}=ci(),s=Is(),[i,r]=K.useState(!1),[u,f]=K.useState(""),[d,y]=K.useState(["read"]),[g,m]=K.useState(null),[b,v]=K.useState(null),S=_t({queryKey:st.apiKeys,queryFn:GT}),j=Fs({mutationFn:()=>QT({name:u.trim(),scopes:d}),onSuccess:H=>{r(!1),f(""),y(["read"]),m(H),s.invalidateQueries({queryKey:st.apiKeys})},onError:H=>{n({variant:"error",title:"Could not create key",description:H instanceof bn?H.message:"Unexpected error."})}}),_=Fs({mutationFn:H=>YT(H),onSuccess:()=>{n({title:"API key revoked"}),v(null),s.invalidateQueries({queryKey:st.apiKeys})},onError:H=>{n({variant:"error",title:"Revoke failed",description:H instanceof bn?H.message:"Unexpected error."}),v(null)}});function w(H){y(M=>M.includes(H)?M.filter(Q=>Q!==H):[...M,H])}async function R(H){try{await navigator.clipboard.writeText(H),n({title:"Copied to clipboard"})}catch{n({variant:"error",title:"Copy failed"})}}const U=((k=S.data)==null?void 0:k.keys)??[];return h.jsxs("div",{className:"space-y-6",children:[h.jsx(tl,{title:"Settings",description:"API keys for programmatic access to the Hogsend admin API.",action:h.jsxs(Ie,{onClick:()=>r(!0),children:[h.jsx(sT,{className:"h-4 w-4"}),"New API key"]})}),S.isPending?h.jsx(Br,{}):S.isError?h.jsx(xn,{error:S.error,onRetry:()=>S.refetch()}):U.length===0?h.jsx(fi,{icon:P_,title:"No API keys",description:"Create a key to authenticate API and webhook requests."}):h.jsx("div",{className:"rounded-lg border",children:h.jsxs(di,{children:[h.jsx(hi,{children:h.jsxs(Cn,{children:[h.jsx(Ye,{children:"Name"}),h.jsx(Ye,{children:"Prefix"}),h.jsx(Ye,{children:"Scopes"}),h.jsx(Ye,{children:"Last used"}),h.jsx(Ye,{children:"Status"}),h.jsx(Ye,{className:"text-right",children:"Action"})]})}),h.jsx(mi,{children:U.map(H=>{const M=H.revokedAt!==null;return h.jsxs(Cn,{children:[h.jsx(ke,{className:"font-medium",children:H.name}),h.jsxs(ke,{className:"font-mono text-xs text-muted-foreground",children:[H.keyPrefix,"…"]}),h.jsx(ke,{children:h.jsx("div",{className:"flex flex-wrap gap-1",children:H.scopes.map(Q=>h.jsx(Qt,{variant:"secondary",children:Q},Q))})}),h.jsx(ke,{className:"text-muted-foreground",children:Hn(H.lastUsedAt)}),h.jsx(ke,{children:M?h.jsx(Qt,{variant:"outline",children:"Revoked"}):h.jsx(Qt,{variant:"outline",className:"border-emerald-500/40 text-emerald-600 dark:text-emerald-400",children:"Active"})}),h.jsx(ke,{className:"text-right",children:M?null:h.jsx(Ie,{variant:"outline",size:"sm",onClick:()=>v(H),children:"Revoke"})})]},H.id)})})]})}),h.jsxs(Uu,{open:i,onClose:()=>r(!1),title:"Create API key",description:"Choose a descriptive name and the scopes this key needs.",footer:h.jsxs(h.Fragment,{children:[h.jsx(Ie,{variant:"outline",onClick:()=>r(!1),children:"Cancel"}),h.jsx(Ie,{onClick:()=>j.mutate(),disabled:!u.trim()||d.length===0||j.isPending,children:j.isPending?"Creating…":"Create key"})]}),children:[h.jsxs("div",{className:"space-y-1.5",children:[h.jsx(gn,{htmlFor:"key-name",children:"Name"}),h.jsx(vn,{id:"key-name",placeholder:"CI ingest key",value:u,onChange:H=>f(H.target.value)})]}),h.jsxs("div",{className:"space-y-2",children:[h.jsx(gn,{children:"Scopes"}),h.jsx("div",{className:"flex flex-col gap-2",children:uw.map(H=>h.jsxs("label",{className:"flex items-center gap-2 text-sm",htmlFor:`scope-${H}`,children:[h.jsx("input",{id:`scope-${H}`,type:"checkbox",className:"h-4 w-4 rounded border-input",checked:d.includes(H),onChange:()=>w(H)}),H]},H))})]})]}),h.jsx(Uu,{open:g!==null,onClose:()=>m(null),title:"API key created",description:"Copy this key now — it will not be shown again.",footer:h.jsx(Ie,{onClick:()=>m(null),children:"Done"}),children:g?h.jsxs("div",{className:"space-y-2",children:[h.jsx(gn,{children:"Secret key"}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("code",{className:"flex-1 break-all rounded-md border bg-muted px-3 py-2 font-mono text-xs",children:g.key}),h.jsx(Ie,{variant:"outline",size:"icon",onClick:()=>R(g.key),"aria-label":"Copy key",children:h.jsx(H_,{className:"h-4 w-4"})})]})]}):null}),h.jsx(qr,{open:b!==null,onClose:()=>v(null),onConfirm:()=>b&&_.mutate(b.id),title:"Revoke this API key?",description:b?`"${b.name}" will stop working immediately. This cannot be undone.`:void 0,confirmLabel:"Revoke",destructive:!0,loading:_.isPending})]})}const fw=[{value:"",label:"All"},{value:"bounced",label:"Bounced"},{value:"unsubscribed",label:"Unsubscribed"},{value:"complained",label:"Complained"}];function dw({row:n}){return h.jsxs("div",{className:"flex flex-wrap gap-1",children:[n.unsubscribedAll?h.jsx(Qt,{variant:"destructive",children:"Unsubscribed"}):null,n.bounceCount>0?h.jsxs(Qt,{variant:"secondary",children:[Ht(n.bounceCount)," bounce"]}):null,n.suppressed&&n.bounceCount===0&&!n.unsubscribedAll?h.jsx(Qt,{variant:"destructive",children:"Complained"}):null,n.suppressed&&!n.unsubscribedAll&&n.bounceCount>0?h.jsx(Qt,{variant:"destructive",children:"Suppressed"}):null]})}function hw(){var m;const{toast:n}=ci(),s=Is(),[i,r]=K.useState(""),[u,f]=K.useState(null),d=_t({queryKey:st.suppressions(i),queryFn:()=>HT(i||void 0),placeholderData:ah}),y=Fs({mutationFn:b=>sb(b.userId,{suppressed:!1,unsubscribedAll:!1}),onSuccess:()=>{n({title:"Recipient restored",description:"They can receive emails again."}),f(null),s.invalidateQueries({queryKey:["suppressions"]})},onError:b=>{n({variant:"error",title:"Un-suppress failed",description:b instanceof bn?b.message:"Unexpected error."}),f(null)}}),g=((m=d.data)==null?void 0:m.suppressions)??[];return h.jsxs("div",{className:"space-y-6",children:[h.jsx(tl,{title:"Suppressions",description:"Bounced, unsubscribed, and complained recipients."}),h.jsxs("div",{className:"flex max-w-xs flex-col gap-1.5",children:[h.jsx(gn,{htmlFor:"supp-type",children:"Type"}),h.jsx(Lu,{id:"supp-type",value:i,onChange:b=>r(b.target.value),children:fw.map(b=>h.jsx("option",{value:b.value,children:b.label},b.value))})]}),d.isPending?h.jsx(Br,{}):d.isError?h.jsx(xn,{error:d.error,onRetry:()=>d.refetch()}):g.length===0?h.jsx(fi,{title:"No suppressions",description:"Recipients who bounce, unsubscribe, or complain appear here."}):h.jsx("div",{className:"rounded-lg border",children:h.jsxs(di,{children:[h.jsx(hi,{children:h.jsxs(Cn,{children:[h.jsx(Ye,{children:"Email"}),h.jsx(Ye,{children:"User ID"}),h.jsx(Ye,{children:"Reason"}),h.jsx(Ye,{className:"text-right",children:"Suppressed"}),h.jsx(Ye,{className:"text-right",children:"Action"})]})}),h.jsx(mi,{children:g.map(b=>h.jsxs(Cn,{children:[h.jsx(ke,{className:"font-medium",children:b.email}),h.jsx(ke,{className:"text-muted-foreground",children:b.userId}),h.jsx(ke,{children:h.jsx(dw,{row:b})}),h.jsx(ke,{className:"text-right text-muted-foreground",children:Hn(b.suppressedAt)}),h.jsx(ke,{className:"text-right",children:h.jsx(Ie,{variant:"outline",size:"sm",onClick:()=>f(b),children:"Un-suppress"})})]},b.id))})]})}),h.jsx(qr,{open:u!==null,onClose:()=>f(null),onConfirm:()=>u&&y.mutate(u),title:"Un-suppress this recipient?",description:u?`${u.email} will be eligible to receive emails again.`:void 0,confirmLabel:"Un-suppress",loading:y.isPending})]})}function mw({data:n,height:s=160,label:i="value"}){var u,f;if(n.length===0)return h.jsx("div",{className:"flex items-center justify-center rounded-md border border-dashed text-sm text-muted-foreground",style:{height:s},children:"No data in range"});const r=Math.max(...n.map(d=>d.value),1);return h.jsxs("div",{className:"space-y-2",children:[h.jsx("div",{className:"flex items-end gap-1 rounded-md border bg-muted/20 p-3",style:{height:s},children:n.map(d=>{const y=d.value/r*100;return h.jsx("div",{className:"group flex flex-1 flex-col items-center justify-end",title:`${Tu(d.date)}: ${d.value} ${i}`,children:h.jsx("div",{className:"w-full min-w-[2px] rounded-t bg-primary/70 transition-colors group-hover:bg-primary",style:{height:`${Math.max(y,d.value>0?4:0)}%`}})},d.date)})}),h.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground",children:[h.jsx("span",{children:Tu((u=n[0])==null?void 0:u.date)}),h.jsx("span",{children:Tu((f=n[n.length-1])==null?void 0:f.date)})]})]})}function pu({label:n,value:s}){return h.jsxs("div",{className:"rounded-md border p-3",children:[h.jsx("p",{className:"text-xs text-muted-foreground",children:n}),h.jsx("p",{className:"text-lg font-semibold",children:s})]})}function yw({template:n}){const{toast:s}=ci(),[i,r]=K.useState(!1),[u,f]=K.useState(""),d=_t({queryKey:st.templatePreview(n.key),queryFn:()=>NT(n.key)}),y=_t({queryKey:st.templateReport(n.key),queryFn:()=>AT(n.key),retry:(b,v)=>!(v instanceof bn&&v.status===404)&&b<2}),g=Fs({mutationFn:()=>MT(n.key,u),onSuccess:b=>{s({title:"Test email sent",description:`Status: ${b.status}.`}),r(!1),f("")},onError:b=>{s({variant:"error",title:"Send-test failed",description:b instanceof bn?b.message:"Unexpected error."})}}),m=y.isError&&y.error instanceof bn&&y.error.status===404;return h.jsxs("div",{className:"space-y-6",children:[h.jsxs("div",{className:"flex items-start justify-between gap-4",children:[h.jsxs("div",{className:"space-y-1",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("h2",{className:"text-xl font-semibold tracking-tight",children:n.key}),n.category?h.jsx(Qt,{variant:"secondary",children:n.category}):null]}),h.jsx("p",{className:"text-sm text-muted-foreground",children:n.defaultSubject})]}),h.jsxs(Ie,{onClick:()=>r(!0),children:[h.jsx(kr,{className:"h-4 w-4"}),"Send test"]})]}),h.jsxs("section",{className:"space-y-3",children:[h.jsx("h3",{className:"text-sm font-semibold",children:"Performance"}),y.isPending?h.jsx(nn,{className:"h-28 w-full"}):m?h.jsx("p",{className:"rounded-md border border-dashed p-6 text-center text-sm text-muted-foreground",children:"This template has never been sent."}):y.isError?h.jsx(xn,{error:y.error,onRetry:()=>y.refetch()}):y.data?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-4",children:[h.jsx(pu,{label:"Sent",value:Ht(y.data.totals.sent)}),h.jsx(pu,{label:"Delivered",value:Ht(y.data.totals.delivered)}),h.jsx(pu,{label:"Open rate",value:oi(y.data.totals.openRate)}),h.jsx(pu,{label:"Click rate",value:oi(y.data.totals.clickRate)})]}),h.jsxs(zr,{children:[h.jsx(Dr,{className:"pb-2",children:h.jsx(Ur,{className:"text-sm font-medium text-muted-foreground",children:"Sends over time"})}),h.jsx(Lr,{children:h.jsx(mw,{label:"sent",data:y.data.series.map(b=>({date:b.date,value:b.sent}))})})]})]}):null]}),h.jsxs("section",{className:"space-y-3",children:[h.jsx("h3",{className:"text-sm font-semibold",children:"Preview"}),d.isPending?h.jsx(nn,{className:"h-96 w-full"}):d.isError?h.jsx(xn,{error:d.error,onRetry:()=>d.refetch()}):d.data?h.jsx("div",{className:"overflow-hidden rounded-lg border bg-white",children:h.jsx("iframe",{title:`${n.key} preview`,srcDoc:d.data.html,sandbox:"",className:"h-[600px] w-full"})}):null]}),h.jsx(Uu,{open:i,onClose:()=>r(!1),title:"Send a test email",description:`Sends "${n.key}" with example props.`,footer:h.jsxs(h.Fragment,{children:[h.jsx(Ie,{variant:"outline",onClick:()=>r(!1),children:"Cancel"}),h.jsx(Ie,{onClick:()=>g.mutate(),disabled:!u||g.isPending,children:g.isPending?"Sending…":"Send test"})]}),children:h.jsxs("div",{className:"space-y-1.5",children:[h.jsx(gn,{htmlFor:"test-to",children:"Recipient email"}),h.jsx(vn,{id:"test-to",type:"email",placeholder:"you@example.com",value:u,onChange:b=>f(b.target.value)})]})})]})}function pw(){var f;const n=_t({queryKey:st.templates,queryFn:CT}),[s,i]=K.useState(null),r=((f=n.data)==null?void 0:f.templates)??[];K.useEffect(()=>{const d=r[0];s===null&&d&&i(d.key)},[s,r]);const u=r.find(d=>d.key===s)??null;return h.jsxs("div",{className:"space-y-6",children:[h.jsx(tl,{title:"Templates",description:"Catalog, per-template stats, live previews, and send-test."}),n.isPending?h.jsx(nn,{className:"h-96 w-full"}):n.isError?h.jsx(xn,{error:n.error,onRetry:()=>n.refetch()}):r.length===0?h.jsx(fi,{title:"No templates registered",description:"Templates appear here once they're added to your email registry."}):h.jsxs("div",{className:"grid gap-6 lg:grid-cols-[260px_1fr]",children:[h.jsx("nav",{className:"space-y-1",children:r.map(d=>h.jsxs("button",{type:"button",onClick:()=>i(d.key),className:Ze("w-full rounded-md px-3 py-2 text-left text-sm transition-colors",d.key===s?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:[h.jsx("span",{className:"block font-medium",children:d.key}),d.category?h.jsx("span",{className:"block text-xs opacity-70",children:d.category}):null]},d.key))}),u?h.jsx(yw,{template:u},u.key):null]})]})}const us=P2({component:ST}),gw=Ws({getParentRoute:()=>us,path:"/",component:nw}),vw=Ws({getParentRoute:()=>us,path:"/sends",component:ow}),bw=Ws({getParentRoute:()=>us,path:"/templates",component:pw}),xw=Ws({getParentRoute:()=>us,path:"/journeys",component:tw}),Sw=Ws({getParentRoute:()=>us,path:"/contacts",component:$T}),jw=Ws({getParentRoute:()=>us,path:"/suppressions",component:hw}),Rw=Ws({getParentRoute:()=>us,path:"/settings",component:cw}),_w=us.addChildren([gw,vw,bw,xw,Sw,jw,Rw]),Tw=sj({routeTree:_w,basepath:"/studio",defaultPreload:"intent"}),ib=document.getElementById("root");if(!ib)throw new Error("Root element #root not found");hj.createRoot(ib).render(h.jsx(K.StrictMode,{children:h.jsx(sS,{client:vT,children:h.jsx(gT,{children:h.jsx(S_,{children:h.jsx(rj,{router:Tw})})})})}));