@hogsend/cli 0.21.0 → 0.22.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.
- package/dist/bin.js +409 -47
- package/dist/bin.js.map +1 -1
- package/package.json +4 -4
- package/src/__tests__/connect-command.test.ts +13 -2
- package/src/__tests__/connect-discord-flow.test.ts +407 -0
- package/src/commands/connect.ts +167 -28
- package/src/lib/connect-discord-flow.ts +427 -0
- package/studio/assets/index-BCzbYwYS.css +1 -0
- package/studio/assets/index-DhnoxvTR.js +280 -0
- package/studio/index.html +2 -2
- package/studio/assets/index-Bf2wN1Hs.css +0 -1
- package/studio/assets/index-JPChDjmd.js +0 -265
|
@@ -1,265 +0,0 @@
|
|
|
1
|
-
var Y1=Object.defineProperty;var wg=n=>{throw TypeError(n)};var P1=(n,s,l)=>s in n?Y1(n,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):n[s]=l;var $a=(n,s,l)=>P1(n,typeof s!="symbol"?s+"":s,l),ld=(n,s,l)=>s.has(n)||wg("Cannot "+l);var E=(n,s,l)=>(ld(n,s,"read from private field"),l?l.call(n):s.get(n)),de=(n,s,l)=>s.has(n)?wg("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(n):s.set(n,l),le=(n,s,l,r)=>(ld(n,s,"write to private field"),r?r.call(n,l):s.set(n,l),l),we=(n,s,l)=>(ld(n,s,"access private method"),l);var fc=(n,s,l,r)=>({set _(c){le(n,s,c,l)},get _(){return E(n,s,r)}});(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))r(c);new MutationObserver(c=>{for(const d of c)if(d.type==="childList")for(const h of d.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&r(h)}).observe(document,{childList:!0,subtree:!0});function l(c){const d={};return c.integrity&&(d.integrity=c.integrity),c.referrerPolicy&&(d.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?d.credentials="include":c.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function r(c){if(c.ep)return;c.ep=!0;const d=l(c);fetch(c.href,d)}})();function K1(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var rd={exports:{}},xr={};/**
|
|
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 Ng;function X1(){if(Ng)return xr;Ng=1;var n=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function l(r,c,d){var h=null;if(d!==void 0&&(h=""+d),c.key!==void 0&&(h=""+c.key),"key"in c){d={};for(var y in c)y!=="key"&&(d[y]=c[y])}else d=c;return c=d.ref,{$$typeof:n,type:r,key:h,ref:c!==void 0?c:null,props:d}}return xr.Fragment=s,xr.jsx=l,xr.jsxs=l,xr}var Rg;function Z1(){return Rg||(Rg=1,rd.exports=X1()),rd.exports}var u=Z1(),Nl=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(){}},Is,is,rl,Hv,F1=(Hv=class extends Nl{constructor(){super();de(this,Is);de(this,is);de(this,rl);le(this,rl,s=>{if(typeof window<"u"&&window.addEventListener){const l=()=>s();return window.addEventListener("visibilitychange",l,!1),()=>{window.removeEventListener("visibilitychange",l)}}})}onSubscribe(){E(this,is)||this.setEventListener(E(this,rl))}onUnsubscribe(){var s;this.hasListeners()||((s=E(this,is))==null||s.call(this),le(this,is,void 0))}setEventListener(s){var l;le(this,rl,s),(l=E(this,is))==null||l.call(this),le(this,is,s(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(s){E(this,Is)!==s&&(le(this,Is,s),this.onFocus())}onFocus(){const s=this.isFocused();this.listeners.forEach(l=>{l(s)})}isFocused(){var s;return typeof E(this,Is)=="boolean"?E(this,Is):((s=globalThis.document)==null?void 0:s.visibilityState)!=="hidden"}},Is=new WeakMap,is=new WeakMap,rl=new WeakMap,Hv),oh=new F1,J1={setTimeout:(n,s)=>setTimeout(n,s),clearTimeout:n=>clearTimeout(n),setInterval:(n,s)=>setInterval(n,s),clearInterval:n=>clearInterval(n)},ls,rh,Qv,I1=(Qv=class{constructor(){de(this,ls,J1);de(this,rh,!1)}setTimeoutProvider(n){le(this,ls,n)}setTimeout(n,s){return E(this,ls).setTimeout(n,s)}clearTimeout(n){E(this,ls).clearTimeout(n)}setInterval(n,s){return E(this,ls).setInterval(n,s)}clearInterval(n){E(this,ls).clearInterval(n)}},ls=new WeakMap,rh=new WeakMap,Qv),Zs=new I1;function $1(n){setTimeout(n,0)}var W1=typeof window>"u"||"Deno"in globalThis;function kt(){}function eS(n,s){return typeof n=="function"?n(s):n}function kd(n){return typeof n=="number"&&n>=0&&n!==1/0}function Iv(n,s){return Math.max(n+(s||0)-Date.now(),0)}function gs(n,s){return typeof n=="function"?n(s):n}function fn(n,s){return typeof n=="function"?n(s):n}function _g(n,s){const{type:l="all",exact:r,fetchStatus:c,predicate:d,queryKey:h,stale:y}=n;if(h){if(r){if(s.queryHash!==ch(h,s.options))return!1}else if(!Ar(s.queryKey,h))return!1}if(l!=="all"){const p=s.isActive();if(l==="active"&&!p||l==="inactive"&&p)return!1}return!(typeof y=="boolean"&&s.isStale()!==y||c&&c!==s.state.fetchStatus||d&&!d(s))}function Eg(n,s){const{exact:l,status:r,predicate:c,mutationKey:d}=n;if(d){if(!s.options.mutationKey)return!1;if(l){if(ci(s.options.mutationKey)!==ci(d))return!1}else if(!Ar(s.options.mutationKey,d))return!1}return!(r&&s.state.status!==r||c&&!c(s))}function ch(n,s){return((s==null?void 0:s.queryKeyHashFn)||ci)(n)}function ci(n){return JSON.stringify(n,(s,l)=>Dd(l)?Object.keys(l).sort().reduce((r,c)=>(r[c]=l[c],r),{}):l)}function Ar(n,s){return n===s?!0:typeof n!=typeof s?!1:n&&s&&typeof n=="object"&&typeof s=="object"?Object.keys(s).every(l=>Ar(n[l],s[l])):!1}var tS=Object.prototype.hasOwnProperty;function $v(n,s,l=0){if(n===s)return n;if(l>500)return s;const r=Tg(n)&&Tg(s);if(!r&&!(Dd(n)&&Dd(s)))return s;const d=(r?n:Object.keys(n)).length,h=r?s:Object.keys(s),y=h.length,p=r?new Array(y):{};let m=0;for(let b=0;b<y;b++){const v=r?b:h[b],x=n[v],w=s[v];if(x===w){p[v]=x,(r?b<d:tS.call(n,v))&&m++;continue}if(x===null||w===null||typeof x!="object"||typeof w!="object"){p[v]=w;continue}const N=$v(x,w,l+1);p[v]=N,N===x&&m++}return d===y&&m===d?n:p}function Oc(n,s){if(!s||Object.keys(n).length!==Object.keys(s).length)return!1;for(const l in n)if(n[l]!==s[l])return!1;return!0}function Tg(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function Dd(n){if(!Cg(n))return!1;const s=n.constructor;if(s===void 0)return!0;const l=s.prototype;return!(!Cg(l)||!l.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function Cg(n){return Object.prototype.toString.call(n)==="[object Object]"}function nS(n){return new Promise(s=>{Zs.setTimeout(s,n)})}function Ud(n,s,l){return typeof l.structuralSharing=="function"?l.structuralSharing(n,s):l.structuralSharing!==!1?$v(n,s):s}function uh(n){return n}function aS(n,s,l=0){const r=[...n,s];return l&&r.length>l?r.slice(1):r}function sS(n,s,l=0){const r=[s,...n];return l&&r.length>l?r.slice(0,-1):r}var fh=Symbol();function Wv(n,s){return!n.queryFn&&(s!=null&&s.initialPromise)?()=>s.initialPromise:!n.queryFn||n.queryFn===fh?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function dh(n,s){return typeof n=="function"?n(...s):!!n}function iS(n,s,l){let r=!1,c;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(c??(c=s()),r||(r=!0,c.aborted?l():c.addEventListener("abort",l,{once:!0})),c)}),n}var Or=(()=>{let n=()=>W1;return{isServer(){return n()},setIsServer(s){n=s}}})();function Ld(){let n,s;const l=new Promise((c,d)=>{n=c,s=d});l.status="pending",l.catch(()=>{});function r(c){Object.assign(l,c),delete l.resolve,delete l.reject}return l.resolve=c=>{r({status:"fulfilled",value:c}),n(c)},l.reject=c=>{r({status:"rejected",reason:c}),s(c)},l}var lS=$1;function rS(){let n=[],s=0,l=y=>{y()},r=y=>{y()},c=lS;const d=y=>{s?n.push(y):c(()=>{l(y)})},h=()=>{const y=n;n=[],y.length&&c(()=>{r(()=>{y.forEach(p=>{l(p)})})})};return{batch:y=>{let p;s++;try{p=y()}finally{s--,s||h()}return p},batchCalls:y=>(...p)=>{d(()=>{y(...p)})},schedule:d,setNotifyFunction:y=>{l=y},setBatchNotifyFunction:y=>{r=y},setScheduler:y=>{c=y}}}var mt=rS(),ol,rs,cl,Gv,oS=(Gv=class extends Nl{constructor(){super();de(this,ol,!0);de(this,rs);de(this,cl);le(this,cl,s=>{if(typeof window<"u"&&window.addEventListener){const l=()=>s(!0),r=()=>s(!1);return window.addEventListener("online",l,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",l),window.removeEventListener("offline",r)}}})}onSubscribe(){E(this,rs)||this.setEventListener(E(this,cl))}onUnsubscribe(){var s;this.hasListeners()||((s=E(this,rs))==null||s.call(this),le(this,rs,void 0))}setEventListener(s){var l;le(this,cl,s),(l=E(this,rs))==null||l.call(this),le(this,rs,s(this.setOnline.bind(this)))}setOnline(s){E(this,ol)!==s&&(le(this,ol,s),this.listeners.forEach(r=>{r(s)}))}isOnline(){return E(this,ol)}},ol=new WeakMap,rs=new WeakMap,cl=new WeakMap,Gv),zc=new oS;function cS(n){return Math.min(1e3*2**n,3e4)}function e0(n){return(n??"online")==="online"?zc.isOnline():!0}var Bd=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function t0(n){let s=!1,l=0,r;const c=Ld(),d=()=>c.status!=="pending",h=R=>{var j;if(!d()){const z=new Bd(R);x(z),(j=n.onCancel)==null||j.call(n,z)}},y=()=>{s=!0},p=()=>{s=!1},m=()=>oh.isFocused()&&(n.networkMode==="always"||zc.isOnline())&&n.canRun(),b=()=>e0(n.networkMode)&&n.canRun(),v=R=>{d()||(r==null||r(),c.resolve(R))},x=R=>{d()||(r==null||r(),c.reject(R))},w=()=>new Promise(R=>{var j;r=z=>{(d()||m())&&R(z)},(j=n.onPause)==null||j.call(n)}).then(()=>{var R;r=void 0,d()||(R=n.onContinue)==null||R.call(n)}),N=()=>{if(d())return;let R;const j=l===0?n.initialPromise:void 0;try{R=j??n.fn()}catch(z){R=Promise.reject(z)}Promise.resolve(R).then(v).catch(z=>{var U;if(d())return;const A=n.retry??(Or.isServer()?0:3),B=n.retryDelay??cS,T=typeof B=="function"?B(l,z):B,Q=A===!0||typeof A=="number"&&l<A||typeof A=="function"&&A(l,z);if(s||!Q){x(z);return}l++,(U=n.onFail)==null||U.call(n,l,z),nS(T).then(()=>m()?void 0:w()).then(()=>{s?x(z):N()})})};return{promise:c,status:()=>c.status,cancel:h,continue:()=>(r==null||r(),c),cancelRetry:y,continueRetry:p,canStart:b,start:()=>(b()?N():w().then(N),c)}}var $s,Vv,n0=(Vv=class{constructor(){de(this,$s)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),kd(this.gcTime)&&le(this,$s,Zs.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(Or.isServer()?1/0:300*1e3))}clearGcTimeout(){E(this,$s)!==void 0&&(Zs.clearTimeout(E(this,$s)),le(this,$s,void 0))}},$s=new WeakMap,Vv);function uS(n){return{onFetch:(s,l)=>{var b,v,x,w,N;const r=s.options,c=(x=(v=(b=s.fetchOptions)==null?void 0:b.meta)==null?void 0:v.fetchMore)==null?void 0:x.direction,d=((w=s.state.data)==null?void 0:w.pages)||[],h=((N=s.state.data)==null?void 0:N.pageParams)||[];let y={pages:[],pageParams:[]},p=0;const m=async()=>{let R=!1;const j=B=>{iS(B,()=>s.signal,()=>R=!0)},z=Wv(s.options,s.fetchOptions),A=async(B,T,Q)=>{if(R)return Promise.reject(s.signal.reason);if(T==null&&B.pages.length)return Promise.resolve(B);const k=(()=>{const W={client:s.client,queryKey:s.queryKey,pageParam:T,direction:Q?"backward":"forward",meta:s.options.meta};return j(W),W})(),O=await z(k),{maxPages:P}=s.options,$=Q?sS:aS;return{pages:$(B.pages,O,P),pageParams:$(B.pageParams,T,P)}};if(c&&d.length){const B=c==="backward",T=B?fS:Mg,Q={pages:d,pageParams:h},U=T(r,Q);y=await A(Q,U,B)}else{const B=n??d.length;do{const T=p===0?h[0]??r.initialPageParam:Mg(r,y);if(p>0&&T==null)break;y=await A(y,T),p++}while(p<B)}return y};s.options.persister?s.fetchFn=()=>{var R,j;return(j=(R=s.options).persister)==null?void 0:j.call(R,m,{client:s.client,queryKey:s.queryKey,meta:s.options.meta,signal:s.signal},l)}:s.fetchFn=m}}}function Mg(n,{pages:s,pageParams:l}){const r=s.length-1;return s.length>0?n.getNextPageParam(s[r],s,l[r],l):void 0}function fS(n,{pages:s,pageParams:l}){var r;return s.length>0?(r=n.getPreviousPageParam)==null?void 0:r.call(n,s[0],s,l[0],l):void 0}var ul,Ws,fl,Rn,ei,gt,Br,ti,un,a0,ga,Yv,dS=(Yv=class extends n0{constructor(s){super();de(this,un);de(this,ul);de(this,Ws);de(this,fl);de(this,Rn);de(this,ei);de(this,gt);de(this,Br);de(this,ti);le(this,ti,!1),le(this,Br,s.defaultOptions),this.setOptions(s.options),this.observers=[],le(this,ei,s.client),le(this,Rn,E(this,ei).getQueryCache()),this.queryKey=s.queryKey,this.queryHash=s.queryHash,le(this,Ws,Og(this.options)),this.state=s.state??E(this,Ws),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return E(this,ul)}get promise(){var s;return(s=E(this,gt))==null?void 0:s.promise}setOptions(s){if(this.options={...E(this,Br),...s},s!=null&&s._type&&le(this,ul,s._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const l=Og(this.options);l.data!==void 0&&(this.setState(Ag(l.data,l.dataUpdatedAt)),le(this,Ws,l))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&E(this,Rn).remove(this)}setData(s,l){const r=Ud(this.state.data,s,this.options);return we(this,un,ga).call(this,{data:r,type:"success",dataUpdatedAt:l==null?void 0:l.updatedAt,manual:l==null?void 0:l.manual}),r}setState(s){we(this,un,ga).call(this,{type:"setState",state:s})}cancel(s){var r,c;const l=(r=E(this,gt))==null?void 0:r.promise;return(c=E(this,gt))==null||c.cancel(s),l?l.then(kt).catch(kt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return E(this,Ws)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(s=>fn(s.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===fh||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(s=>gs(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:!Iv(this.state.dataUpdatedAt,s)}onFocus(){var l;const s=this.observers.find(r=>r.shouldFetchOnWindowFocus());s==null||s.refetch({cancelRefetch:!1}),(l=E(this,gt))==null||l.continue()}onOnline(){var l;const s=this.observers.find(r=>r.shouldFetchOnReconnect());s==null||s.refetch({cancelRefetch:!1}),(l=E(this,gt))==null||l.continue()}addObserver(s){this.observers.includes(s)||(this.observers.push(s),this.clearGcTimeout(),E(this,Rn).notify({type:"observerAdded",query:this,observer:s}))}removeObserver(s){this.observers.includes(s)&&(this.observers=this.observers.filter(l=>l!==s),this.observers.length||(E(this,gt)&&(E(this,ti)||we(this,un,a0).call(this)?E(this,gt).cancel({revert:!0}):E(this,gt).cancelRetry()),this.scheduleGc()),E(this,Rn).notify({type:"observerRemoved",query:this,observer:s}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||we(this,un,ga).call(this,{type:"invalidate"})}async fetch(s,l){var m,b,v,x,w,N,R,j,z,A,B;if(this.state.fetchStatus!=="idle"&&((m=E(this,gt))==null?void 0:m.status())!=="rejected"){if(this.state.data!==void 0&&(l!=null&&l.cancelRefetch))this.cancel({silent:!0});else if(E(this,gt))return E(this,gt).continueRetry(),E(this,gt).promise}if(s&&this.setOptions(s),!this.options.queryFn){const T=this.observers.find(Q=>Q.options.queryFn);T&&this.setOptions(T.options)}const r=new AbortController,c=T=>{Object.defineProperty(T,"signal",{enumerable:!0,get:()=>(le(this,ti,!0),r.signal)})},d=()=>{const T=Wv(this.options,l),U=(()=>{const k={client:E(this,ei),queryKey:this.queryKey,meta:this.meta};return c(k),k})();return le(this,ti,!1),this.options.persister?this.options.persister(T,U,this):T(U)},y=(()=>{const T={fetchOptions:l,options:this.options,queryKey:this.queryKey,client:E(this,ei),state:this.state,fetchFn:d};return c(T),T})(),p=E(this,ul)==="infinite"?uS(this.options.pages):this.options.behavior;p==null||p.onFetch(y,this),le(this,fl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((b=y.fetchOptions)==null?void 0:b.meta))&&we(this,un,ga).call(this,{type:"fetch",meta:(v=y.fetchOptions)==null?void 0:v.meta}),le(this,gt,t0({initialPromise:l==null?void 0:l.initialPromise,fn:y.fetchFn,onCancel:T=>{T instanceof Bd&&T.revert&&this.setState({...E(this,fl),fetchStatus:"idle"}),r.abort()},onFail:(T,Q)=>{we(this,un,ga).call(this,{type:"failed",failureCount:T,error:Q})},onPause:()=>{we(this,un,ga).call(this,{type:"pause"})},onContinue:()=>{we(this,un,ga).call(this,{type:"continue"})},retry:y.options.retry,retryDelay:y.options.retryDelay,networkMode:y.options.networkMode,canRun:()=>!0}));try{const T=await E(this,gt).start();if(T===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(T),(w=(x=E(this,Rn).config).onSuccess)==null||w.call(x,T,this),(R=(N=E(this,Rn).config).onSettled)==null||R.call(N,T,this.state.error,this),T}catch(T){if(T instanceof Bd){if(T.silent)return E(this,gt).promise;if(T.revert){if(this.state.data===void 0)throw T;return this.state.data}}throw we(this,un,ga).call(this,{type:"error",error:T}),(z=(j=E(this,Rn).config).onError)==null||z.call(j,T,this),(B=(A=E(this,Rn).config).onSettled)==null||B.call(A,this.state.data,T,this),T}finally{this.scheduleGc()}}},ul=new WeakMap,Ws=new WeakMap,fl=new WeakMap,Rn=new WeakMap,ei=new WeakMap,gt=new WeakMap,Br=new WeakMap,ti=new WeakMap,un=new WeakSet,a0=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},ga=function(s){const l=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,...s0(r.data,this.options),fetchMeta:s.meta??null};case"success":const c={...r,...Ag(s.data,s.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!s.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return le(this,fl,s.manual?c:void 0),c;case"error":const d=s.error;return{...r,error:d,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:d,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...s.state}}};this.state=l(this.state),mt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),E(this,Rn).notify({query:this,type:"updated",action:s})})},Yv);function s0(n,s){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:e0(s.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function Ag(n,s){return{data:n,dataUpdatedAt:s??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Og(n){const s=typeof n.initialData=="function"?n.initialData():n.initialData,l=s!==void 0,r=l?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:s,dataUpdateCount:0,dataUpdatedAt:l?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:l?"success":"pending",fetchStatus:"idle"}}var Kt,ke,qr,zt,ni,dl,va,os,Hr,hl,ml,ai,si,cs,pl,He,Cr,qd,Hd,Qd,Gd,Vd,Yd,Pd,i0,Pv,hS=(Pv=class extends Nl{constructor(s,l){super();de(this,He);de(this,Kt);de(this,ke);de(this,qr);de(this,zt);de(this,ni);de(this,dl);de(this,va);de(this,os);de(this,Hr);de(this,hl);de(this,ml);de(this,ai);de(this,si);de(this,cs);de(this,pl,new Set);this.options=l,le(this,Kt,s),le(this,os,null),le(this,va,Ld()),this.bindMethods(),this.setOptions(l)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(E(this,ke).addObserver(this),zg(E(this,ke),this.options)?we(this,He,Cr).call(this):this.updateResult(),we(this,He,Gd).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Kd(E(this,ke),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Kd(E(this,ke),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,we(this,He,Vd).call(this),we(this,He,Yd).call(this),E(this,ke).removeObserver(this)}setOptions(s){const l=this.options,r=E(this,ke);if(this.options=E(this,Kt).defaultQueryOptions(s),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof fn(this.options.enabled,E(this,ke))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");we(this,He,Pd).call(this),E(this,ke).setOptions(this.options),l._defaulted&&!Oc(this.options,l)&&E(this,Kt).getQueryCache().notify({type:"observerOptionsUpdated",query:E(this,ke),observer:this});const c=this.hasListeners();c&&kg(E(this,ke),r,this.options,l)&&we(this,He,Cr).call(this),this.updateResult(),c&&(E(this,ke)!==r||fn(this.options.enabled,E(this,ke))!==fn(l.enabled,E(this,ke))||gs(this.options.staleTime,E(this,ke))!==gs(l.staleTime,E(this,ke)))&&we(this,He,qd).call(this);const d=we(this,He,Hd).call(this);c&&(E(this,ke)!==r||fn(this.options.enabled,E(this,ke))!==fn(l.enabled,E(this,ke))||d!==E(this,cs))&&we(this,He,Qd).call(this,d)}getOptimisticResult(s){const l=E(this,Kt).getQueryCache().build(E(this,Kt),s),r=this.createResult(l,s);return pS(this,r)&&(le(this,zt,r),le(this,dl,this.options),le(this,ni,E(this,ke).state)),r}getCurrentResult(){return E(this,zt)}trackResult(s,l){return new Proxy(s,{get:(r,c)=>(this.trackProp(c),l==null||l(c),c==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&E(this,va).status==="pending"&&E(this,va).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,c))})}trackProp(s){E(this,pl).add(s)}getCurrentQuery(){return E(this,ke)}refetch({...s}={}){return this.fetch({...s})}fetchOptimistic(s){const l=E(this,Kt).defaultQueryOptions(s),r=E(this,Kt).getQueryCache().build(E(this,Kt),l);return r.fetch().then(()=>this.createResult(r,l))}fetch(s){return we(this,He,Cr).call(this,{...s,cancelRefetch:s.cancelRefetch??!0}).then(()=>(this.updateResult(),E(this,zt)))}createResult(s,l){var P;const r=E(this,ke),c=this.options,d=E(this,zt),h=E(this,ni),y=E(this,dl),m=s!==r?s.state:E(this,qr),{state:b}=s;let v={...b},x=!1,w;if(l._optimisticResults){const $=this.hasListeners(),W=!$&&zg(s,l),Z=$&&kg(s,r,l,c);(W||Z)&&(v={...v,...s0(b.data,s.options)}),l._optimisticResults==="isRestoring"&&(v.fetchStatus="idle")}let{error:N,errorUpdatedAt:R,status:j}=v;w=v.data;let z=!1;if(l.placeholderData!==void 0&&w===void 0&&j==="pending"){let $;d!=null&&d.isPlaceholderData&&l.placeholderData===(y==null?void 0:y.placeholderData)?($=d.data,z=!0):$=typeof l.placeholderData=="function"?l.placeholderData((P=E(this,ml))==null?void 0:P.state.data,E(this,ml)):l.placeholderData,$!==void 0&&(j="success",w=Ud(d==null?void 0:d.data,$,l),x=!0)}if(l.select&&w!==void 0&&!z)if(d&&w===(h==null?void 0:h.data)&&l.select===E(this,Hr))w=E(this,hl);else try{le(this,Hr,l.select),w=l.select(w),w=Ud(d==null?void 0:d.data,w,l),le(this,hl,w),le(this,os,null)}catch($){le(this,os,$)}E(this,os)&&(N=E(this,os),w=E(this,hl),R=Date.now(),j="error");const A=v.fetchStatus==="fetching",B=j==="pending",T=j==="error",Q=B&&A,U=w!==void 0,O={status:j,fetchStatus:v.fetchStatus,isPending:B,isSuccess:j==="success",isError:T,isInitialLoading:Q,isLoading:Q,data:w,dataUpdatedAt:v.dataUpdatedAt,error:N,errorUpdatedAt:R,failureCount:v.fetchFailureCount,failureReason:v.fetchFailureReason,errorUpdateCount:v.errorUpdateCount,isFetched:s.isFetched(),isFetchedAfterMount:v.dataUpdateCount>m.dataUpdateCount||v.errorUpdateCount>m.errorUpdateCount,isFetching:A,isRefetching:A&&!B,isLoadingError:T&&!U,isPaused:v.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:T&&U,isStale:hh(s,l),refetch:this.refetch,promise:E(this,va),isEnabled:fn(l.enabled,s)!==!1};if(this.options.experimental_prefetchInRender){const $=O.data!==void 0,W=O.status==="error"&&!$,Z=he=>{W?he.reject(O.error):$&&he.resolve(O.data)},te=()=>{const he=le(this,va,O.promise=Ld());Z(he)},ee=E(this,va);switch(ee.status){case"pending":s.queryHash===r.queryHash&&Z(ee);break;case"fulfilled":(W||O.data!==ee.value)&&te();break;case"rejected":(!W||O.error!==ee.reason)&&te();break}}return O}updateResult(){const s=E(this,zt),l=this.createResult(E(this,ke),this.options);if(le(this,ni,E(this,ke).state),le(this,dl,this.options),E(this,ni).data!==void 0&&le(this,ml,E(this,ke)),Oc(l,s))return;le(this,zt,l);const r=()=>{if(!s)return!0;const{notifyOnChangeProps:c}=this.options,d=typeof c=="function"?c():c;if(d==="all"||!d&&!E(this,pl).size)return!0;const h=new Set(d??E(this,pl));return this.options.throwOnError&&h.add("error"),Object.keys(E(this,zt)).some(y=>{const p=y;return E(this,zt)[p]!==s[p]&&h.has(p)})};we(this,He,i0).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&we(this,He,Gd).call(this)}},Kt=new WeakMap,ke=new WeakMap,qr=new WeakMap,zt=new WeakMap,ni=new WeakMap,dl=new WeakMap,va=new WeakMap,os=new WeakMap,Hr=new WeakMap,hl=new WeakMap,ml=new WeakMap,ai=new WeakMap,si=new WeakMap,cs=new WeakMap,pl=new WeakMap,He=new WeakSet,Cr=function(s){we(this,He,Pd).call(this);let l=E(this,ke).fetch(this.options,s);return s!=null&&s.throwOnError||(l=l.catch(kt)),l},qd=function(){we(this,He,Vd).call(this);const s=gs(this.options.staleTime,E(this,ke));if(Or.isServer()||E(this,zt).isStale||!kd(s))return;const r=Iv(E(this,zt).dataUpdatedAt,s)+1;le(this,ai,Zs.setTimeout(()=>{E(this,zt).isStale||this.updateResult()},r))},Hd=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(E(this,ke)):this.options.refetchInterval)??!1},Qd=function(s){we(this,He,Yd).call(this),le(this,cs,s),!(Or.isServer()||fn(this.options.enabled,E(this,ke))===!1||!kd(E(this,cs))||E(this,cs)===0)&&le(this,si,Zs.setInterval(()=>{(this.options.refetchIntervalInBackground||oh.isFocused())&&we(this,He,Cr).call(this)},E(this,cs)))},Gd=function(){we(this,He,qd).call(this),we(this,He,Qd).call(this,we(this,He,Hd).call(this))},Vd=function(){E(this,ai)!==void 0&&(Zs.clearTimeout(E(this,ai)),le(this,ai,void 0))},Yd=function(){E(this,si)!==void 0&&(Zs.clearInterval(E(this,si)),le(this,si,void 0))},Pd=function(){const s=E(this,Kt).getQueryCache().build(E(this,Kt),this.options);if(s===E(this,ke))return;const l=E(this,ke);le(this,ke,s),le(this,qr,s.state),this.hasListeners()&&(l==null||l.removeObserver(this),s.addObserver(this))},i0=function(s){mt.batch(()=>{s.listeners&&this.listeners.forEach(l=>{l(E(this,zt))}),E(this,Kt).getQueryCache().notify({query:E(this,ke),type:"observerResultsUpdated"})})},Pv);function mS(n,s){return fn(s.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&fn(s.retryOnMount,n)===!1)}function zg(n,s){return mS(n,s)||n.state.data!==void 0&&Kd(n,s,s.refetchOnMount)}function Kd(n,s,l){if(fn(s.enabled,n)!==!1&&gs(s.staleTime,n)!=="static"){const r=typeof l=="function"?l(n):l;return r==="always"||r!==!1&&hh(n,s)}return!1}function kg(n,s,l,r){return(n!==s||fn(r.enabled,n)===!1)&&(!l.suspense||n.state.status!=="error")&&hh(n,l)}function hh(n,s){return fn(s.enabled,n)!==!1&&n.isStaleByTime(gs(s.staleTime,n))}function pS(n,s){return!Oc(n.getCurrentResult(),s)}var Qr,Yn,Tt,ii,Pn,ns,Kv,yS=(Kv=class extends n0{constructor(s){super();de(this,Pn);de(this,Qr);de(this,Yn);de(this,Tt);de(this,ii);le(this,Qr,s.client),this.mutationId=s.mutationId,le(this,Tt,s.mutationCache),le(this,Yn,[]),this.state=s.state||l0(),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,Yn).includes(s)||(E(this,Yn).push(s),this.clearGcTimeout(),E(this,Tt).notify({type:"observerAdded",mutation:this,observer:s}))}removeObserver(s){le(this,Yn,E(this,Yn).filter(l=>l!==s)),this.scheduleGc(),E(this,Tt).notify({type:"observerRemoved",mutation:this,observer:s})}optionalRemove(){E(this,Yn).length||(this.state.status==="pending"?this.scheduleGc():E(this,Tt).remove(this))}continue(){var s;return((s=E(this,ii))==null?void 0:s.continue())??this.execute(this.state.variables)}async execute(s){var h,y,p,m,b,v,x,w,N,R,j,z,A,B,T,Q,U,k;const l=()=>{we(this,Pn,ns).call(this,{type:"continue"})},r={client:E(this,Qr),meta:this.options.meta,mutationKey:this.options.mutationKey};le(this,ii,t0({fn:()=>this.options.mutationFn?this.options.mutationFn(s,r):Promise.reject(new Error("No mutationFn found")),onFail:(O,P)=>{we(this,Pn,ns).call(this,{type:"failed",failureCount:O,error:P})},onPause:()=>{we(this,Pn,ns).call(this,{type:"pause"})},onContinue:l,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>E(this,Tt).canRun(this)}));const c=this.state.status==="pending",d=!E(this,ii).canStart();try{if(c)l();else{we(this,Pn,ns).call(this,{type:"pending",variables:s,isPaused:d}),E(this,Tt).config.onMutate&&await E(this,Tt).config.onMutate(s,this,r);const P=await((y=(h=this.options).onMutate)==null?void 0:y.call(h,s,r));P!==this.state.context&&we(this,Pn,ns).call(this,{type:"pending",context:P,variables:s,isPaused:d})}const O=await E(this,ii).start();return await((m=(p=E(this,Tt).config).onSuccess)==null?void 0:m.call(p,O,s,this.state.context,this,r)),await((v=(b=this.options).onSuccess)==null?void 0:v.call(b,O,s,this.state.context,r)),await((w=(x=E(this,Tt).config).onSettled)==null?void 0:w.call(x,O,null,this.state.variables,this.state.context,this,r)),await((R=(N=this.options).onSettled)==null?void 0:R.call(N,O,null,s,this.state.context,r)),we(this,Pn,ns).call(this,{type:"success",data:O}),O}catch(O){try{await((z=(j=E(this,Tt).config).onError)==null?void 0:z.call(j,O,s,this.state.context,this,r))}catch(P){Promise.reject(P)}try{await((B=(A=this.options).onError)==null?void 0:B.call(A,O,s,this.state.context,r))}catch(P){Promise.reject(P)}try{await((Q=(T=E(this,Tt).config).onSettled)==null?void 0:Q.call(T,void 0,O,this.state.variables,this.state.context,this,r))}catch(P){Promise.reject(P)}try{await((k=(U=this.options).onSettled)==null?void 0:k.call(U,void 0,O,s,this.state.context,r))}catch(P){Promise.reject(P)}throw we(this,Pn,ns).call(this,{type:"error",error:O}),O}finally{E(this,Tt).runNext(this)}}},Qr=new WeakMap,Yn=new WeakMap,Tt=new WeakMap,ii=new WeakMap,Pn=new WeakSet,ns=function(s){const l=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=l(this.state),mt.batch(()=>{E(this,Yn).forEach(r=>{r.onMutationUpdate(s)}),E(this,Tt).notify({mutation:this,type:"updated",action:s})})},Kv);function l0(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ba,On,Gr,Xv,gS=(Xv=class extends Nl{constructor(s={}){super();de(this,ba);de(this,On);de(this,Gr);this.config=s,le(this,ba,new Set),le(this,On,new Map),le(this,Gr,0)}build(s,l,r){const c=new yS({client:s,mutationCache:this,mutationId:++fc(this,Gr)._,options:s.defaultMutationOptions(l),state:r});return this.add(c),c}add(s){E(this,ba).add(s);const l=dc(s);if(typeof l=="string"){const r=E(this,On).get(l);r?r.push(s):E(this,On).set(l,[s])}this.notify({type:"added",mutation:s})}remove(s){if(E(this,ba).delete(s)){const l=dc(s);if(typeof l=="string"){const r=E(this,On).get(l);if(r)if(r.length>1){const c=r.indexOf(s);c!==-1&&r.splice(c,1)}else r[0]===s&&E(this,On).delete(l)}}this.notify({type:"removed",mutation:s})}canRun(s){const l=dc(s);if(typeof l=="string"){const r=E(this,On).get(l),c=r==null?void 0:r.find(d=>d.state.status==="pending");return!c||c===s}else return!0}runNext(s){var r;const l=dc(s);if(typeof l=="string"){const c=(r=E(this,On).get(l))==null?void 0:r.find(d=>d!==s&&d.state.isPaused);return(c==null?void 0:c.continue())??Promise.resolve()}else return Promise.resolve()}clear(){mt.batch(()=>{E(this,ba).forEach(s=>{this.notify({type:"removed",mutation:s})}),E(this,ba).clear(),E(this,On).clear()})}getAll(){return Array.from(E(this,ba))}find(s){const l={exact:!0,...s};return this.getAll().find(r=>Eg(l,r))}findAll(s={}){return this.getAll().filter(l=>Eg(s,l))}notify(s){mt.batch(()=>{this.listeners.forEach(l=>{l(s)})})}resumePausedMutations(){const s=this.getAll().filter(l=>l.state.isPaused);return mt.batch(()=>Promise.all(s.map(l=>l.continue().catch(kt))))}},ba=new WeakMap,On=new WeakMap,Gr=new WeakMap,Xv);function dc(n){var s;return(s=n.options.scope)==null?void 0:s.id}var xa,us,Xt,Sa,Na,wc,Xd,Zv,vS=(Zv=class extends Nl{constructor(l,r){super();de(this,Na);de(this,xa);de(this,us);de(this,Xt);de(this,Sa);le(this,xa,l),this.setOptions(r),this.bindMethods(),we(this,Na,wc).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(l){var c;const r=this.options;this.options=E(this,xa).defaultMutationOptions(l),Oc(this.options,r)||E(this,xa).getMutationCache().notify({type:"observerOptionsUpdated",mutation:E(this,Xt),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&ci(r.mutationKey)!==ci(this.options.mutationKey)?this.reset():((c=E(this,Xt))==null?void 0:c.state.status)==="pending"&&E(this,Xt).setOptions(this.options)}onUnsubscribe(){var l;this.hasListeners()||(l=E(this,Xt))==null||l.removeObserver(this)}onMutationUpdate(l){we(this,Na,wc).call(this),we(this,Na,Xd).call(this,l)}getCurrentResult(){return E(this,us)}reset(){var l;(l=E(this,Xt))==null||l.removeObserver(this),le(this,Xt,void 0),we(this,Na,wc).call(this),we(this,Na,Xd).call(this)}mutate(l,r){var c;return le(this,Sa,r),(c=E(this,Xt))==null||c.removeObserver(this),le(this,Xt,E(this,xa).getMutationCache().build(E(this,xa),this.options)),E(this,Xt).addObserver(this),E(this,Xt).execute(l)}},xa=new WeakMap,us=new WeakMap,Xt=new WeakMap,Sa=new WeakMap,Na=new WeakSet,wc=function(){var r;const l=((r=E(this,Xt))==null?void 0:r.state)??l0();le(this,us,{...l,isPending:l.status==="pending",isSuccess:l.status==="success",isError:l.status==="error",isIdle:l.status==="idle",mutate:this.mutate,reset:this.reset})},Xd=function(l){mt.batch(()=>{var r,c,d,h,y,p,m,b;if(E(this,Sa)&&this.hasListeners()){const v=E(this,us).variables,x=E(this,us).context,w={client:E(this,xa),meta:this.options.meta,mutationKey:this.options.mutationKey};if((l==null?void 0:l.type)==="success"){try{(c=(r=E(this,Sa)).onSuccess)==null||c.call(r,l.data,v,x,w)}catch(N){Promise.reject(N)}try{(h=(d=E(this,Sa)).onSettled)==null||h.call(d,l.data,null,v,x,w)}catch(N){Promise.reject(N)}}else if((l==null?void 0:l.type)==="error"){try{(p=(y=E(this,Sa)).onError)==null||p.call(y,l.error,v,x,w)}catch(N){Promise.reject(N)}try{(b=(m=E(this,Sa)).onSettled)==null||b.call(m,void 0,l.error,v,x,w)}catch(N){Promise.reject(N)}}}this.listeners.forEach(v=>{v(E(this,us))})})},Zv),Kn,Fv,bS=(Fv=class extends Nl{constructor(s={}){super();de(this,Kn);this.config=s,le(this,Kn,new Map)}build(s,l,r){const c=l.queryKey,d=l.queryHash??ch(c,l);let h=this.get(d);return h||(h=new dS({client:s,queryKey:c,queryHash:d,options:s.defaultQueryOptions(l),state:r,defaultOptions:s.getQueryDefaults(c)}),this.add(h)),h}add(s){E(this,Kn).has(s.queryHash)||(E(this,Kn).set(s.queryHash,s),this.notify({type:"added",query:s}))}remove(s){const l=E(this,Kn).get(s.queryHash);l&&(s.destroy(),l===s&&E(this,Kn).delete(s.queryHash),this.notify({type:"removed",query:s}))}clear(){mt.batch(()=>{this.getAll().forEach(s=>{this.remove(s)})})}get(s){return E(this,Kn).get(s)}getAll(){return[...E(this,Kn).values()]}find(s){const l={exact:!0,...s};return this.getAll().find(r=>_g(l,r))}findAll(s={}){const l=this.getAll();return Object.keys(s).length>0?l.filter(r=>_g(s,r)):l}notify(s){mt.batch(()=>{this.listeners.forEach(l=>{l(s)})})}onFocus(){mt.batch(()=>{this.getAll().forEach(s=>{s.onFocus()})})}onOnline(){mt.batch(()=>{this.getAll().forEach(s=>{s.onOnline()})})}},Kn=new WeakMap,Fv),nt,fs,ds,yl,gl,hs,vl,bl,Jv,xS=(Jv=class{constructor(n={}){de(this,nt);de(this,fs);de(this,ds);de(this,yl);de(this,gl);de(this,hs);de(this,vl);de(this,bl);le(this,nt,n.queryCache||new bS),le(this,fs,n.mutationCache||new gS),le(this,ds,n.defaultOptions||{}),le(this,yl,new Map),le(this,gl,new Map),le(this,hs,0)}mount(){fc(this,hs)._++,E(this,hs)===1&&(le(this,vl,oh.subscribe(async n=>{n&&(await this.resumePausedMutations(),E(this,nt).onFocus())})),le(this,bl,zc.subscribe(async n=>{n&&(await this.resumePausedMutations(),E(this,nt).onOnline())})))}unmount(){var n,s;fc(this,hs)._--,E(this,hs)===0&&((n=E(this,vl))==null||n.call(this),le(this,vl,void 0),(s=E(this,bl))==null||s.call(this),le(this,bl,void 0))}isFetching(n){return E(this,nt).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return E(this,fs).findAll({...n,status:"pending"}).length}getQueryData(n){var l;const s=this.defaultQueryOptions({queryKey:n});return(l=E(this,nt).get(s.queryHash))==null?void 0:l.state.data}ensureQueryData(n){const s=this.defaultQueryOptions(n),l=E(this,nt).build(this,s),r=l.state.data;return r===void 0?this.fetchQuery(n):(n.revalidateIfStale&&l.isStaleByTime(gs(s.staleTime,l))&&this.prefetchQuery(s),Promise.resolve(r))}getQueriesData(n){return E(this,nt).findAll(n).map(({queryKey:s,state:l})=>{const r=l.data;return[s,r]})}setQueryData(n,s,l){const r=this.defaultQueryOptions({queryKey:n}),c=E(this,nt).get(r.queryHash),d=c==null?void 0:c.state.data,h=eS(s,d);if(h!==void 0)return E(this,nt).build(this,r).setData(h,{...l,manual:!0})}setQueriesData(n,s,l){return mt.batch(()=>E(this,nt).findAll(n).map(({queryKey:r})=>[r,this.setQueryData(r,s,l)]))}getQueryState(n){var l;const s=this.defaultQueryOptions({queryKey:n});return(l=E(this,nt).get(s.queryHash))==null?void 0:l.state}removeQueries(n){const s=E(this,nt);mt.batch(()=>{s.findAll(n).forEach(l=>{s.remove(l)})})}resetQueries(n,s){const l=E(this,nt);return mt.batch(()=>(l.findAll(n).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...n},s)))}cancelQueries(n,s={}){const l={revert:!0,...s},r=mt.batch(()=>E(this,nt).findAll(n).map(c=>c.cancel(l)));return Promise.all(r).then(kt).catch(kt)}invalidateQueries(n,s={}){return mt.batch(()=>(E(this,nt).findAll(n).forEach(l=>{l.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 l={...s,cancelRefetch:s.cancelRefetch??!0},r=mt.batch(()=>E(this,nt).findAll(n).filter(c=>!c.isDisabled()&&!c.isStatic()).map(c=>{let d=c.fetch(void 0,l);return l.throwOnError||(d=d.catch(kt)),c.state.fetchStatus==="paused"?Promise.resolve():d}));return Promise.all(r).then(kt)}fetchQuery(n){const s=this.defaultQueryOptions(n);s.retry===void 0&&(s.retry=!1);const l=E(this,nt).build(this,s);return l.isStaleByTime(gs(s.staleTime,l))?l.fetch(s):Promise.resolve(l.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(kt).catch(kt)}fetchInfiniteQuery(n){return n._type="infinite",this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(kt).catch(kt)}ensureInfiniteQueryData(n){return n._type="infinite",this.ensureQueryData(n)}resumePausedMutations(){return zc.isOnline()?E(this,fs).resumePausedMutations():Promise.resolve()}getQueryCache(){return E(this,nt)}getMutationCache(){return E(this,fs)}getDefaultOptions(){return E(this,ds)}setDefaultOptions(n){le(this,ds,n)}setQueryDefaults(n,s){E(this,yl).set(ci(n),{queryKey:n,defaultOptions:s})}getQueryDefaults(n){const s=[...E(this,yl).values()],l={};return s.forEach(r=>{Ar(n,r.queryKey)&&Object.assign(l,r.defaultOptions)}),l}setMutationDefaults(n,s){E(this,gl).set(ci(n),{mutationKey:n,defaultOptions:s})}getMutationDefaults(n){const s=[...E(this,gl).values()],l={};return s.forEach(r=>{Ar(n,r.mutationKey)&&Object.assign(l,r.defaultOptions)}),l}defaultQueryOptions(n){if(n._defaulted)return n;const s={...E(this,ds).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return s.queryHash||(s.queryHash=ch(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===fh&&(s.enabled=!1),s}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...E(this,ds).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){E(this,nt).clear(),E(this,fs).clear()}},nt=new WeakMap,fs=new WeakMap,ds=new WeakMap,yl=new WeakMap,gl=new WeakMap,hs=new WeakMap,vl=new WeakMap,bl=new WeakMap,Jv),od={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 Dg;function SS(){if(Dg)return ve;Dg=1;var n=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),h=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),x=Symbol.iterator;function w(C){return C===null||typeof C!="object"?null:(C=x&&C[x]||C["@@iterator"],typeof C=="function"?C:null)}var N={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},R=Object.assign,j={};function z(C,J,ae){this.props=C,this.context=J,this.refs=j,this.updater=ae||N}z.prototype.isReactComponent={},z.prototype.setState=function(C,J){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,J,"setState")},z.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function A(){}A.prototype=z.prototype;function B(C,J,ae){this.props=C,this.context=J,this.refs=j,this.updater=ae||N}var T=B.prototype=new A;T.constructor=B,R(T,z.prototype),T.isPureReactComponent=!0;var Q=Array.isArray;function U(){}var k={H:null,A:null,T:null,S:null},O=Object.prototype.hasOwnProperty;function P(C,J,ae){var se=ae.ref;return{$$typeof:n,type:C,key:J,ref:se!==void 0?se:null,props:ae}}function $(C,J){return P(C.type,J,C.props)}function W(C){return typeof C=="object"&&C!==null&&C.$$typeof===n}function Z(C){var J={"=":"=0",":":"=2"};return"$"+C.replace(/[=:]/g,function(ae){return J[ae]})}var te=/\/+/g;function ee(C,J){return typeof C=="object"&&C!==null&&C.key!=null?Z(""+C.key):J.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(U,U):(C.status="pending",C.then(function(J){C.status==="pending"&&(C.status="fulfilled",C.value=J)},function(J){C.status==="pending"&&(C.status="rejected",C.reason=J)})),C.status){case"fulfilled":return C.value;case"rejected":throw C.reason}}throw C}function L(C,J,ae,se,ie){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),J,ae,se,ie)}}if(Re)return ie=ie(C),Re=se===""?"."+ee(C,0):se,Q(ie)?(ae="",Re!=null&&(ae=Re.replace(te,"$&/")+"/"),L(ie,J,ae,"",function(mn){return mn})):ie!=null&&(W(ie)&&(ie=$(ie,ae+(ie.key==null||C&&C.key===ie.key?"":(""+ie.key).replace(te,"$&/")+"/")+Re)),J.push(ie)),1;Re=0;var Ve=se===""?".":se+":";if(Q(C))for(var ge=0;ge<C.length;ge++)se=C[ge],me=Ve+ee(se,ge),Re+=L(se,J,ae,me,ie);else if(ge=w(C),typeof ge=="function")for(C=ge.call(C),ge=0;!(se=C.next()).done;)se=se.value,me=Ve+ee(se,ge++),Re+=L(se,J,ae,me,ie);else if(me==="object"){if(typeof C.then=="function")return L(he(C),J,ae,se,ie);throw J=String(C),Error("Objects are not valid as a React child (found: "+(J==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":J)+"). If you meant to render a collection of children, use an array instead.")}return Re}function K(C,J,ae){if(C==null)return C;var se=[],ie=0;return L(C,se,"","",function(me){return J.call(ae,me,ie++)}),se}function ue(C){if(C._status===-1){var J=C._result;J=J(),J.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=J)}if(C._status===1)return C._result.default;throw C._result}var Oe=typeof reportError=="function"?reportError:function(C){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var J=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(J))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",C);return}console.error(C)},ne={map:K,forEach:function(C,J,ae){K(C,function(){J.apply(this,arguments)},ae)},count:function(C){var J=0;return K(C,function(){J++}),J},toArray:function(C){return K(C,function(J){return J})||[]},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=z,ve.Fragment=l,ve.Profiler=c,ve.PureComponent=B,ve.StrictMode=r,ve.Suspense=p,ve.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=k,ve.__COMPILER_RUNTIME={__proto__:null,c:function(C){return k.H.useMemoCache(C)}},ve.cache=function(C){return function(){return C.apply(null,arguments)}},ve.cacheSignal=function(){return null},ve.cloneElement=function(C,J,ae){if(C==null)throw Error("The argument must be a React element, but you passed "+C+".");var se=R({},C.props),ie=C.key;if(J!=null)for(me in J.key!==void 0&&(ie=""+J.key),J)!O.call(J,me)||me==="key"||me==="__self"||me==="__source"||me==="ref"&&J.ref===void 0||(se[me]=J[me]);var me=arguments.length-2;if(me===1)se.children=ae;else if(1<me){for(var Re=Array(me),Ve=0;Ve<me;Ve++)Re[Ve]=arguments[Ve+2];se.children=Re}return P(C.type,ie,se)},ve.createContext=function(C){return C={$$typeof:h,_currentValue:C,_currentValue2:C,_threadCount:0,Provider:null,Consumer:null},C.Provider=C,C.Consumer={$$typeof:d,_context:C},C},ve.createElement=function(C,J,ae){var se,ie={},me=null;if(J!=null)for(se in J.key!==void 0&&(me=""+J.key),J)O.call(J,se)&&se!=="key"&&se!=="__self"&&se!=="__source"&&(ie[se]=J[se]);var Re=arguments.length-2;if(Re===1)ie.children=ae;else if(1<Re){for(var Ve=Array(Re),ge=0;ge<Re;ge++)Ve[ge]=arguments[ge+2];ie.children=Ve}if(C&&C.defaultProps)for(se in Re=C.defaultProps,Re)ie[se]===void 0&&(ie[se]=Re[se]);return P(C,me,ie)},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:ue}},ve.memo=function(C,J){return{$$typeof:m,type:C,compare:J===void 0?null:J}},ve.startTransition=function(C){var J=k.T,ae={};k.T=ae;try{var se=C(),ie=k.S;ie!==null&&ie(ae,se),typeof se=="object"&&se!==null&&typeof se.then=="function"&&se.then(U,Oe)}catch(me){Oe(me)}finally{J!==null&&ae.types!==null&&(J.types=ae.types),k.T=J}},ve.unstable_useCacheRefresh=function(){return k.H.useCacheRefresh()},ve.use=function(C){return k.H.use(C)},ve.useActionState=function(C,J,ae){return k.H.useActionState(C,J,ae)},ve.useCallback=function(C,J){return k.H.useCallback(C,J)},ve.useContext=function(C){return k.H.useContext(C)},ve.useDebugValue=function(){},ve.useDeferredValue=function(C,J){return k.H.useDeferredValue(C,J)},ve.useEffect=function(C,J){return k.H.useEffect(C,J)},ve.useEffectEvent=function(C){return k.H.useEffectEvent(C)},ve.useId=function(){return k.H.useId()},ve.useImperativeHandle=function(C,J,ae){return k.H.useImperativeHandle(C,J,ae)},ve.useInsertionEffect=function(C,J){return k.H.useInsertionEffect(C,J)},ve.useLayoutEffect=function(C,J){return k.H.useLayoutEffect(C,J)},ve.useMemo=function(C,J){return k.H.useMemo(C,J)},ve.useOptimistic=function(C,J){return k.H.useOptimistic(C,J)},ve.useReducer=function(C,J,ae){return k.H.useReducer(C,J,ae)},ve.useRef=function(C){return k.H.useRef(C)},ve.useState=function(C){return k.H.useState(C)},ve.useSyncExternalStore=function(C,J,ae){return k.H.useSyncExternalStore(C,J,ae)},ve.useTransition=function(){return k.H.useTransition()},ve.version="19.2.6",ve}var Ug;function Vr(){return Ug||(Ug=1,od.exports=SS()),od.exports}var V=Vr();const zr=K1(V);var r0=V.createContext(void 0),_a=n=>{const s=V.useContext(r0);if(!s)throw new Error("No QueryClient set, use QueryClientProvider to set one");return s},jS=({client:n,children:s})=>(V.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),u.jsx(r0.Provider,{value:n,children:s})),o0=V.createContext(!1),wS=()=>V.useContext(o0);o0.Provider;function NS(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var RS=V.createContext(NS()),_S=()=>V.useContext(RS),ES=(n,s,l)=>{const r=l!=null&&l.state.error&&typeof n.throwOnError=="function"?dh(n.throwOnError,[l.state.error,l]):n.throwOnError;(n.suspense||n.experimental_prefetchInRender||r)&&(s.isReset()||(n.retryOnMount=!1))},TS=n=>{V.useEffect(()=>{n.clearReset()},[n])},CS=({result:n,errorResetBoundary:s,throwOnError:l,query:r,suspense:c})=>n.isError&&!s.isReset()&&!n.isFetching&&r&&(c&&n.data===void 0||dh(l,[n.error,r])),MS=n=>{if(n.suspense){const l=c=>c==="static"?c:Math.max(c??1e3,1e3),r=n.staleTime;n.staleTime=typeof r=="function"?(...c)=>l(r(...c)):l(r),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},AS=(n,s)=>n.isLoading&&n.isFetching&&!s,OS=(n,s)=>(n==null?void 0:n.suspense)&&s.isPending,Lg=(n,s,l)=>s.fetchOptimistic(n).catch(()=>{l.clearReset()});function zS(n,s,l){var w,N,R,j;const r=wS(),c=_S(),d=_a(),h=d.defaultQueryOptions(n);(N=(w=d.getDefaultOptions().queries)==null?void 0:w._experimental_beforeQuery)==null||N.call(w,h);const y=d.getQueryCache().get(h.queryHash),p=n.subscribed!==!1;h._optimisticResults=r?"isRestoring":p?"optimistic":void 0,MS(h),ES(h,c,y),TS(c);const m=!d.getQueryCache().get(h.queryHash),[b]=V.useState(()=>new s(d,h)),v=b.getOptimisticResult(h),x=!r&&p;if(V.useSyncExternalStore(V.useCallback(z=>{const A=x?b.subscribe(mt.batchCalls(z)):kt;return b.updateResult(),A},[b,x]),()=>b.getCurrentResult(),()=>b.getCurrentResult()),V.useEffect(()=>{b.setOptions(h)},[h,b]),OS(h,v))throw Lg(h,b,c);if(CS({result:v,errorResetBoundary:c,throwOnError:h.throwOnError,query:y,suspense:h.suspense}))throw v.error;if((j=(R=d.getDefaultOptions().queries)==null?void 0:R._experimental_afterQuery)==null||j.call(R,h,v),h.experimental_prefetchInRender&&!Or.isServer()&&AS(v,r)){const z=m?Lg(h,b,c):y==null?void 0:y.promise;z==null||z.catch(kt).finally(()=>{b.updateResult()})}return h.notifyOnChangeProps?v:b.trackResult(v)}function at(n,s){return zS(n,hS)}function _n(n,s){const l=_a(),[r]=V.useState(()=>new vS(l,n));V.useEffect(()=>{r.setOptions(n)},[r,n]);const c=V.useSyncExternalStore(V.useCallback(h=>r.subscribe(mt.batchCalls(h)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),d=V.useCallback((h,y)=>{r.mutate(h,y).catch(kt)},[r]);if(c.error&&dh(r.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:d,mutateAsync:c.mutate}}var Mr=typeof window<"u"?V.useLayoutEffect:V.useEffect;function cd(n){const s=V.useRef({value:n,prev:null}),l=s.current.value;return n!==l&&(s.current={value:n,prev:l}),s.current.prev}function kS(n,s,l={},r={}){V.useEffect(()=>{if(!n.current||r.disabled||typeof IntersectionObserver!="function")return;const c=new IntersectionObserver(([d])=>{s(d)},l);return c.observe(n.current),()=>{c.disconnect()}},[s,l,r.disabled,n])}function DS(n){const s=V.useRef(null);return V.useImperativeHandle(n,()=>s.current,[]),s}const c0=!1;function kr(n){return n[n.length-1]}function US(n){return typeof n=="function"}function Fs(n,s){return US(n)?n(s):n}const u0=Object.prototype.hasOwnProperty,Bg=Object.prototype.propertyIsEnumerable;function f0(n){for(const s in n)if(u0.call(n,s))return!0;return!1}const LS=()=>Object.create(null),Vs=(n,s)=>ms(n,s,LS);function ms(n,s,l=()=>({}),r=0){if(n===s)return n;if(r>500)return s;const c=s,d=Qg(n)&&Qg(c);if(!d&&!(kc(n)&&kc(c)))return c;const h=d?n:qg(n);if(!h)return c;const y=d?c:qg(c);if(!y)return c;const p=h.length,m=y.length,b=d?new Array(m):l();let v=0;for(let x=0;x<m;x++){const w=d?x:y[x],N=n[w],R=c[w];if(N===R){b[w]=N,(d?x<p:u0.call(n,w))&&v++;continue}if(N===null||R===null||typeof N!="object"||typeof R!="object"){b[w]=R;continue}const j=ms(N,R,l,r+1);b[w]=j,j===N&&v++}return p===m&&v===p?n:b}function qg(n){const s=Object.getOwnPropertyNames(n);for(const c of s)if(!Bg.call(n,c))return!1;const l=Object.getOwnPropertySymbols(n);if(l.length===0)return s;const r=s;for(const c of l){if(!Bg.call(n,c))return!1;r.push(c)}return r}function kc(n){if(!Hg(n))return!1;const s=n.constructor;if(typeof s>"u")return!0;const l=s.prototype;return!(!Hg(l)||!l.hasOwnProperty("isPrototypeOf"))}function Hg(n){return Object.prototype.toString.call(n)==="[object Object]"}function Qg(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function li(n,s,l){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,c=n.length;r<c;r++)if(!li(n[r],s[r],l))return!1;return!0}if(kc(n)&&kc(s)){const r=(l==null?void 0:l.ignoreUndefined)??!0;if(l!=null&&l.partial){for(const h in s)if((!r||s[h]!==void 0)&&!li(n[h],s[h],l))return!1;return!0}let c=0;if(!r)c=Object.keys(n).length;else for(const h in n)n[h]!==void 0&&c++;let d=0;for(const h in s)if((!r||s[h]!==void 0)&&(d++,d>c||!li(n[h],s[h],l)))return!1;return c===d}return!1}function xl(n){let s,l;const r=new Promise((c,d)=>{s=c,l=d});return r.status="pending",r.resolve=c=>{r.status="resolved",r.value=c,s(c),n==null||n(c)},r.reject=c=>{r.status="rejected",l(c)},r}function Dr(n){return!!(n&&typeof n=="object"&&typeof n.then=="function")}function BS(n){return n.replace(/[\x00-\x1f\x7f]/g,"")}function Gg(n){let s;try{s=decodeURI(n)}catch{s=n.replaceAll(/%[0-9A-F]{2}/gi,l=>{try{return decodeURI(l)}catch{return l}})}return BS(s)}const qS=["http:","https:","mailto:","tel:"];function Dc(n,s){if(!n)return!1;try{const l=new URL(n);return!s.has(l.protocol)}catch{return!1}}function Sr(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 l=0,r="",c;for(;(c=s.exec(n))!==null;)r+=Gg(n.slice(l,c.index))+c[0],l=s.lastIndex;r=r+Gg(l?n.slice(l):n);let d=!1;return r.startsWith("//")&&(d=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:d}}function HS(n){return/\s|[^\u0000-\u007F]/.test(n)?n.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):n}function QS(n,s){if(n===s)return!0;if(n.length!==s.length)return!1;for(let l=0;l<n.length;l++)if(n[l]!==s[l])return!1;return!0}function wa(){throw new Error("Invariant failed")}function Ur(n){const s=new Map;let l,r;const c=d=>{d.next&&(d.prev?(d.prev.next=d.next,d.next.prev=d.prev,d.next=void 0,r&&(r.next=d,d.prev=r)):(d.next.prev=void 0,l=d.next,d.next=void 0,r&&(d.prev=r,r.next=d)),r=d)};return{get(d){const h=s.get(d);if(h)return c(h),h.value},set(d,h){if(s.size>=n&&l){const p=l;s.delete(p.key),p.next&&(l=p.next,p.next.prev=void 0),p===r&&(r=void 0)}const y=s.get(d);if(y)y.value=h,c(y);else{const p={key:d,value:h,prev:r};r&&(r.next=p),r=p,l||(l=p),s.set(d,p)}},clear(){s.clear(),l=void 0,r=void 0}}}const ps=4,d0=5;function GS(n){const s=n.indexOf("{");if(s===-1)return null;const l=n.indexOf("}",s);return l===-1||s+1>=n.length?null:[s,l]}function h0(n,s,l=new Uint16Array(6)){const r=n.indexOf("/",s),c=r===-1?n.length:r,d=n.substring(s,c);if(!d||!d.includes("$"))return l[0]=0,l[1]=s,l[2]=s,l[3]=c,l[4]=c,l[5]=c,l;if(d==="$"){const y=n.length;return l[0]=2,l[1]=s,l[2]=s,l[3]=y,l[4]=y,l[5]=y,l}if(d.charCodeAt(0)===36)return l[0]=1,l[1]=s,l[2]=s+1,l[3]=c,l[4]=c,l[5]=c,l;const h=GS(d);if(h){const[y,p]=h,m=d.charCodeAt(y+1);if(m===45){if(y+2<d.length&&d.charCodeAt(y+2)===36){const b=y+3,v=p;if(b<v)return l[0]=3,l[1]=s+y,l[2]=s+b,l[3]=s+v,l[4]=s+p+1,l[5]=c,l}}else if(m===36){const b=y+1,v=y+2;return v===p?(l[0]=2,l[1]=s+y,l[2]=s+b,l[3]=s+v,l[4]=s+p+1,l[5]=n.length,l):(l[0]=1,l[1]=s+y,l[2]=s+v,l[3]=s+p,l[4]=s+p+1,l[5]=c,l)}}return l[0]=0,l[1]=s,l[2]=s,l[3]=c,l[4]=c,l[5]=c,l}function Vc(n,s,l,r,c,d,h){var p,m,b,v,x,w,N,R,j,z;h==null||h(l);let y=r;{const A=l.fullPath??l.from,B=A.length,T=((p=l.options)==null?void 0:p.caseSensitive)??n,Q=((b=(m=l.options)==null?void 0:m.params)==null?void 0:b.parse)??((v=l.options)==null?void 0:v.parseParams);for(;y<B;){const k=h0(A,y,s);let O;const P=y,$=k[5];switch(y=$+1,d++,k[0]){case 0:{const W=A.substring(k[2],k[3]);if(T){const Z=(x=c.static)==null?void 0:x.get(W);if(Z)O=Z;else{c.static??(c.static=new Map);const te=Js(l.fullPath??l.from);te.parent=c,te.depth=d,O=te,c.static.set(W,te)}}else{const Z=W.toLowerCase(),te=(w=c.staticInsensitive)==null?void 0:w.get(Z);if(te)O=te;else{c.staticInsensitive??(c.staticInsensitive=new Map);const ee=Js(l.fullPath??l.from);ee.parent=c,ee.depth=d,O=ee,c.staticInsensitive.set(Z,ee)}}break}case 1:{const W=A.substring(P,k[1]),Z=A.substring(k[4],$),te=T&&!!(W||Z),ee=W?te?W:W.toLowerCase():void 0,he=Z?te?Z:Z.toLowerCase():void 0,L=!Q&&((N=c.dynamic)==null?void 0:N.find(K=>!K.parse&&K.caseSensitive===te&&K.prefix===ee&&K.suffix===he));if(L)O=L;else{const K=fd(1,l.fullPath??l.from,te,ee,he);O=K,K.depth=d,K.parent=c,c.dynamic??(c.dynamic=[]),c.dynamic.push(K)}break}case 3:{const W=A.substring(P,k[1]),Z=A.substring(k[4],$),te=T&&!!(W||Z),ee=W?te?W:W.toLowerCase():void 0,he=Z?te?Z:Z.toLowerCase():void 0,L=!Q&&((R=c.optional)==null?void 0:R.find(K=>!K.parse&&K.caseSensitive===te&&K.prefix===ee&&K.suffix===he));if(L)O=L;else{const K=fd(3,l.fullPath??l.from,te,ee,he);O=K,K.parent=c,K.depth=d,c.optional??(c.optional=[]),c.optional.push(K)}break}case 2:{const W=A.substring(P,k[1]),Z=A.substring(k[4],$),te=T&&!!(W||Z),ee=W?te?W:W.toLowerCase():void 0,he=Z?te?Z:Z.toLowerCase():void 0,L=fd(2,l.fullPath??l.from,te,ee,he);O=L,L.parent=c,L.depth=d,c.wildcard??(c.wildcard=[]),c.wildcard.push(L)}}c=O}if(Q&&l.children&&!l.isRoot&&l.id&&l.id.charCodeAt(l.id.lastIndexOf("/")+1)===95){const k=Js(l.fullPath??l.from);k.kind=d0,k.parent=c,d++,k.depth=d,c.pathless??(c.pathless=[]),c.pathless.push(k),c=k}const U=(l.path||!l.children)&&!l.isRoot;if(U&&A.endsWith("/")){const k=Js(l.fullPath??l.from);k.kind=ps,k.parent=c,d++,k.depth=d,c.index=k,c=k}c.parse=Q??null,c.priority=((z=(j=l.options)==null?void 0:j.params)==null?void 0:z.priority)??0,U&&!c.route&&(c.route=l,c.fullPath=l.fullPath??l.from)}if(l.children)for(const A of l.children)Vc(n,s,A,y,c,d,h)}function ud(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 ss(n){var s,l,r;if(n.pathless)for(const c of n.pathless)ss(c);if(n.static)for(const c of n.static.values())ss(c);if(n.staticInsensitive)for(const c of n.staticInsensitive.values())ss(c);if((s=n.dynamic)!=null&&s.length){n.dynamic.sort(ud);for(const c of n.dynamic)ss(c)}if((l=n.optional)!=null&&l.length){n.optional.sort(ud);for(const c of n.optional)ss(c)}if((r=n.wildcard)!=null&&r.length){n.wildcard.sort(ud);for(const c of n.wildcard)ss(c)}}function Js(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 fd(n,s,l,r,c){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:l,prefix:r,suffix:c}}function VS(n,s){const l=Js("/"),r=new Uint16Array(6);for(const c of n)Vc(!1,r,c,1,l,0);ss(l),s.masksTree=l,s.flatCache=Ur(1e3)}function YS(n,s){n||(n="/");const l=s.flatCache.get(n);if(l)return l;const r=mh(n,s.masksTree);return s.flatCache.set(n,r),r}function PS(n,s,l,r,c){n||(n="/"),r||(r="/");const d=s?`case\0${n}`:n;let h=c.singleCache.get(d);return h||(h=Js("/"),Vc(s,new Uint16Array(6),{from:n},1,h,0),c.singleCache.set(d,h)),mh(r,h,l)}function KS(n,s,l=!1){const r=l?n:`nofuzz\0${n}`,c=s.matchCache.get(r);if(c!==void 0)return c;n||(n="/");let d;try{d=mh(n,s.segmentTree,l)}catch(h){if(h instanceof URIError)d=null;else throw h}return d&&(d.branch=p0(d.route)),s.matchCache.set(r,d),d}function XS(n){return n==="/"?n:n.replace(/\/{1,}$/,"")}function ZS(n,s=!1,l){const r=Js(n.fullPath),c=new Uint16Array(6),d={},h={};let y=0;return Vc(s,c,n,1,r,0,p=>{if(l==null||l(p,y),p.id in d&&wa(),d[p.id]=p,y!==0&&p.path){const m=XS(p.fullPath);(!h[m]||p.fullPath.endsWith("/"))&&(h[m]=p)}y++}),ss(r),{processedTree:{segmentTree:r,singleCache:Ur(1e3),matchCache:Ur(1e3),flatCache:null,masksTree:null},routesById:d,routesByPath:h}}function mh(n,s,l=!1){const r=n.split("/"),c=JS(n,r,s,l);if(!c)return null;const[d]=m0(n,r,c);return{route:c.node.route,rawParams:d}}function m0(n,s,l){var b,v,x,w,N,R,j,z,A,B;const r=FS(l.node);let c=null;const d=Object.create(null);let h=((b=l.extract)==null?void 0:b.part)??0,y=((v=l.extract)==null?void 0:v.node)??0,p=((x=l.extract)==null?void 0:x.path)??0,m=((w=l.extract)==null?void 0:w.segment)??0;for(;y<r.length;h++,y++,p++,m++){const T=r[y];if(T.kind===ps)break;if(T.kind===d0){m--,h--,p--;continue}const Q=s[h],U=p;if(Q&&(p+=Q.length),T.kind===1){c??(c=l.node.fullPath.split("/"));const k=c[m],O=((N=T.prefix)==null?void 0:N.length)??0;if(k.charCodeAt(O)===123){const P=((R=T.suffix)==null?void 0:R.length)??0,$=k.substring(O+2,k.length-P-1),W=Q.substring(O,Q.length-P);d[$]=decodeURIComponent(W)}else{const P=k.substring(1);d[P]=decodeURIComponent(Q)}}else if(T.kind===3){if(l.skipped&1<<y){h--,p=U-1;continue}c??(c=l.node.fullPath.split("/"));const k=c[m],O=((j=T.prefix)==null?void 0:j.length)??0,P=((z=T.suffix)==null?void 0:z.length)??0,$=k.substring(O+3,k.length-P-1),W=T.suffix||T.prefix?Q.substring(O,Q.length-P):Q;W&&(d[$]=decodeURIComponent(W))}else if(T.kind===2){const k=T,O=n.substring(U+(((A=k.prefix)==null?void 0:A.length)??0),n.length-(((B=k.suffix)==null?void 0:B.length)??0)),P=decodeURIComponent(O);d["*"]=P,d._splat=P;break}}return l.rawParams&&Object.assign(d,l.rawParams),[d,{part:h,node:y,path:p,segment:m}]}function p0(n){const s=[n];for(;n.parentRoute;)n=n.parentRoute,s.push(n);return s.reverse(),s}function FS(n){const s=Array(n.depth+1);do s[n.depth]=n,n=n.parent;while(n);return s}function JS(n,s,l,r){if(n==="/"&&l.index)return{node:l.index,skipped:0};const c=!kr(s),d=c&&n!=="/",h=s.length-(c?1:0),y=[{node:l,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let p=null,m=null;for(;y.length;){const b=y.pop(),{node:v,index:x,skipped:w,depth:N,statics:R,dynamics:j,optionals:z}=b;let{extract:A,rawParams:B}=b;if(v.kind===2&&v.route&&!mc(m,b))continue;if(v.parse){if(!Vg(n,s,b))continue;B=b.rawParams,A=b.extract}r&&v.route&&v.kind!==ps&&mc(p,b)&&(p=b);const T=x===h;if(T&&(v.route&&(!d||v.kind===ps||v.kind===2)&&mc(m,b)&&(m=b),!v.optional&&!v.wildcard&&!v.index&&!v.pathless))continue;const Q=T?void 0:s[x];let U;if(T&&v.index){const k={node:v.index,index:x,skipped:w,depth:N+1,statics:R,dynamics:j,optionals:z,extract:A,rawParams:B};let O=!0;if(v.index.parse&&(Vg(n,s,k)||(O=!1)),O){if(!j&&!z&&!w&&IS(R,h))return k;mc(m,k)&&(m=k)}}if(v.wildcard)for(let k=v.wildcard.length-1;k>=0;k--){const O=v.wildcard[k],{prefix:P,suffix:$}=O;if(!(P&&(T||!(O.caseSensitive?Q:U??(U=Q.toLowerCase())).startsWith(P)))){if($){if(T)continue;const W=s.slice(x).join("/").slice(-$.length);if((O.caseSensitive?W:W.toLowerCase())!==$)continue}y.push({node:O,index:h,skipped:w,depth:N+1,statics:R,dynamics:j,optionals:z,extract:A,rawParams:B})}}if(v.optional){const k=w|1<<N,O=N+1;for(let P=v.optional.length-1;P>=0;P--){const $=v.optional[P];y.push({node:$,index:x,skipped:k,depth:O,statics:R,dynamics:j,optionals:z,extract:A,rawParams:B})}if(!T)for(let P=v.optional.length-1;P>=0;P--){const $=v.optional[P],{prefix:W,suffix:Z}=$;if(W||Z){const te=$.caseSensitive?Q:U??(U=Q.toLowerCase());if(W&&!te.startsWith(W)||Z&&!te.endsWith(Z))continue}y.push({node:$,index:x+1,skipped:w,depth:O,statics:R,dynamics:j,optionals:z+hc(h,x),extract:A,rawParams:B})}}if(!T&&v.dynamic&&Q)for(let k=v.dynamic.length-1;k>=0;k--){const O=v.dynamic[k],{prefix:P,suffix:$}=O;if(P||$){const W=O.caseSensitive?Q:U??(U=Q.toLowerCase());if(P&&!W.startsWith(P)||$&&!W.endsWith($))continue}y.push({node:O,index:x+1,skipped:w,depth:N+1,statics:R,dynamics:j+hc(h,x),optionals:z,extract:A,rawParams:B})}if(!T&&v.staticInsensitive){const k=v.staticInsensitive.get(U??(U=Q.toLowerCase()));k&&y.push({node:k,index:x+1,skipped:w,depth:N+1,statics:R+hc(h,x),dynamics:j,optionals:z,extract:A,rawParams:B})}if(!T&&v.static){const k=v.static.get(Q);k&&y.push({node:k,index:x+1,skipped:w,depth:N+1,statics:R+hc(h,x),dynamics:j,optionals:z,extract:A,rawParams:B})}if(v.pathless){const k=N+1;for(let O=v.pathless.length-1;O>=0;O--){const P=v.pathless[O];y.push({node:P,index:x,skipped:w,depth:k,statics:R,dynamics:j,optionals:z,extract:A,rawParams:B})}}}if(m)return m;if(r&&p){let b=p.index;for(let x=0;x<p.index;x++)b+=s[x].length;const v=b===n.length?"/":n.slice(b);return p.rawParams??(p.rawParams=Object.create(null)),p.rawParams["**"]=decodeURIComponent(v),p}return null}function hc(n,s){return 2**(n-s-1)}function IS(n,s){return n===2**(s-1)-1}function Vg(n,s,l){let r,c;try{[r,c]=m0(n,s,l)}catch{return null}if(l.rawParams=r,l.extract=c,!l.node.parse)return!0;try{if(l.node.parse(r)===!1)return null}catch{}return!0}function mc(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===ps)>(n.node.kind===ps)||s.node.kind===ps==(n.node.kind===ps)&&s.depth>n.depth))):!0}function Nc(n){return ph(n.filter(s=>s!==void 0).join("/"))}function ph(n){return n.replace(/\/{2,}/g,"/")}function y0(n){return n==="/"?n:n.replace(/^\/{1,}/,"")}function ja(n){const s=n.length;return s>1&&n[s-1]==="/"?n.replace(/\/{1,}$/,""):n}function g0(n){return ja(y0(n))}function Uc(n,s){return n!=null&&n.endsWith("/")&&n!=="/"&&n!==`${s}/`?n.slice(0,-1):n}function $S(n,s,l){return Uc(n,l)===Uc(s,l)}function WS({base:n,to:s,trailingSlash:l="never",cache:r}){const c=s.startsWith("/"),d=!c&&s===".";let h;if(r){h=c?s:d?n:n+"\0"+s;const m=r.get(h);if(m)return m}let y;if(d)y=n.split("/");else if(c)y=s.split("/");else{for(y=n.split("/");y.length>1&&kr(y)==="";)y.pop();const m=s.split("/");for(let b=0,v=m.length;b<v;b++){const x=m[b];x===""?b?b===v-1&&y.push(x):y=[x]:x===".."?y.pop():x==="."||y.push(x)}}y.length>1&&(kr(y)===""?l==="never"&&y.pop():l==="always"&&y.push(""));const p=ph(y.join("/"))||"/";return h&&r&&r.set(h,p),p}function ej(n){const s=new Map(n.map(c=>[encodeURIComponent(c),c])),l=Array.from(s.keys()).map(c=>c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(l,"g");return c=>c.replace(r,d=>s.get(d)??d)}function dd(n,s,l){const r=s[n];return typeof r!="string"?r:n==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split("/").map(c=>Pg(c,l)).join("/"):Pg(r,l)}function Yg({path:n,params:s,decoder:l,...r}){let c=!1;const d=Object.create(null);if(!n||n==="/")return{interpolatedPath:"/",usedParams:d,isMissingParams:c};if(!n.includes("$"))return{interpolatedPath:n,usedParams:d,isMissingParams:c};const h=n.length;let y=0,p,m="";for(;y<h;){const b=y;p=h0(n,b,p);const v=p[5];if(y=v+1,b===v)continue;const x=p[0];if(x===0){m+="/"+n.substring(b,v);continue}if(x===2){const w=s._splat;d._splat=w,d["*"]=w;const N=n.substring(b,p[1]),R=n.substring(p[4],v);if(!w){c=!0,(N||R)&&(m+="/"+N+R);continue}const j=dd("_splat",s,l);m+="/"+N+j+R;continue}if(x===1){const w=n.substring(p[2],p[3]);!c&&!(w in s)&&(c=!0),d[w]=s[w];const N=n.substring(b,p[1]),R=n.substring(p[4],v),j=dd(w,s,l)??"undefined";m+="/"+N+j+R;continue}if(x===3){const w=n.substring(p[2],p[3]),N=s[w];if(N==null)continue;d[w]=N;const R=n.substring(b,p[1]),j=n.substring(p[4],v),z=dd(w,s,l)??"";m+="/"+R+z+j;continue}}return n.endsWith("/")&&(m+="/"),{usedParams:d,interpolatedPath:m||"/",isMissingParams:c}}function Pg(n,s){const l=encodeURIComponent(n);return(s==null?void 0:s(l))??l}function Ct(n){return(n==null?void 0:n.isNotFound)===!0}function tj(n,s=String){const l=new URLSearchParams;for(const r in n){const c=n[r];c!==void 0&&l.set(r,s(c))}return l.toString()}function hd(n){return n?n==="false"?!1:n==="true"?!0:+n*0===0&&+n+""===n?+n:n:""}function nj(n){const s=new URLSearchParams(n),l=Object.create(null);for(const[r,c]of s.entries()){const d=l[r];d==null?l[r]=hd(c):Array.isArray(d)?d.push(hd(c)):l[r]=[d,hd(c)]}return l}const aj=ij(JSON.parse),sj=lj(JSON.stringify,JSON.parse);function ij(n){return s=>{s[0]==="?"&&(s=s.substring(1));const l=nj(s);for(const r in l){const c=l[r];if(typeof c=="string")try{l[r]=n(c)}catch{}}return l}}function lj(n,s){const l=typeof s=="function";function r(c){if(typeof c=="object"&&c!==null)try{return n(c)}catch{}else if(l&&typeof c=="string")try{return s(c),n(c)}catch{}return c}return c=>{const d=tj(c,r);return d?`?${d}`:""}}const ri="__root__";function rj(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 l=new Response(null,{status:n.statusCode,headers:s});if(l.options=n,n.throw)throw l;return l}function Zt(n){return n instanceof Response&&!!n.options}const Zd=n=>{var s;if(!n.rendered)return n.rendered=!0,(s=n.onReady)==null?void 0:s.call(n)},oj=n=>n.stores.matchesId.get().some(s=>{var l;return(l=n.stores.matchStores.get(s))==null?void 0:l.get()._forcePending}),Yc=(n,s)=>!!(n.preload&&!n.router.stores.matchStores.has(s)),oi=(n,s,l=!0)=>{const r={...n.router.options.context??{}},c=l?s:s-1;for(let d=0;d<=c;d++){const h=n.matches[d];if(!h)continue;const y=n.router.getMatch(h.id);y&&Object.assign(r,y.__routeContext,y.__beforeLoadContext)}return r},Kg=(n,s)=>{if(!n.matches.length)return;const l=s.routeId,r=n.matches.findIndex(h=>h.routeId===n.router.routeTree.id),c=r>=0?r:0;let d=l?n.matches.findIndex(h=>h.routeId===l):n.firstBadMatchIndex??n.matches.length-1;d<0&&(d=c);for(let h=d;h>=0;h--){const y=n.matches[h];if(n.router.looseRoutesById[y.routeId].options.notFoundComponent)return h}return l?d:c},ys=(n,s,l)=>{var r,c,d;if(!(!Zt(l)&&!Ct(l)))throw Zt(l)&&l.redirectHandled&&!l.options.reloadDocument||(s&&((r=s._nonReactive.beforeLoadPromise)==null||r.resolve(),(c=s._nonReactive.loaderPromise)==null||c.resolve(),s._nonReactive.beforeLoadPromise=void 0,s._nonReactive.loaderPromise=void 0,s._nonReactive.error=l,n.updateMatch(s.id,h=>({...h,status:Zt(l)?"redirected":Ct(l)?"notFound":h.status==="pending"?"success":h.status,context:oi(n,s.index),isFetching:!1,error:l})),Ct(l)&&!l.routeId&&(l.routeId=s.routeId),(d=s._nonReactive.loadPromise)==null||d.resolve()),Zt(l)&&(n.rendered=!0,l.options._fromLocation=n.location,l.redirectHandled=!0,l=n.router.resolveRedirect(l))),l},v0=(n,s)=>{const l=n.router.getMatch(s);return!!(!l||l._nonReactive.dehydrated)},Xg=(n,s,l)=>{const r=oi(n,l);n.updateMatch(s,c=>({...c,context:r}))},jr=(n,s,l)=>{var h,y;const{id:r,routeId:c}=n.matches[s],d=n.router.looseRoutesById[c];if(l instanceof Promise)throw l;n.firstBadMatchIndex??(n.firstBadMatchIndex=s),ys(n,n.router.getMatch(r),l);try{(y=(h=d.options).onError)==null||y.call(h,l)}catch(p){l=p,ys(n,n.router.getMatch(r),l)}n.updateMatch(r,p=>{var m,b;return(m=p._nonReactive.beforeLoadPromise)==null||m.resolve(),p._nonReactive.beforeLoadPromise=void 0,(b=p._nonReactive.loadPromise)==null||b.resolve(),{...p,error:l,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}}),!n.preload&&!Zt(l)&&!Ct(l)&&(n.serialError??(n.serialError=l))},b0=(n,s,l,r)=>{var d;if(r._nonReactive.pendingTimeout!==void 0)return;const c=l.options.pendingMs??n.router.options.defaultPendingMs;if(n.onReady&&!Yc(n,s)&&(l.options.loader||l.options.beforeLoad||S0(l))&&typeof c=="number"&&c!==1/0&&(l.options.pendingComponent??((d=n.router.options)==null?void 0:d.defaultPendingComponent))){const h=setTimeout(()=>{Zd(n)},c);r._nonReactive.pendingTimeout=h}},cj=(n,s,l)=>{const r=n.router.getMatch(s);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;b0(n,s,l,r);const c=()=>{const d=n.router.getMatch(s);d.preload&&(d.status==="redirected"||d.status==="notFound")&&ys(n,d,d.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(c):c()},uj=(n,s,l,r)=>{const c=n.router.getMatch(s);let d=c._nonReactive.loadPromise;c._nonReactive.loadPromise=xl(()=>{d==null||d.resolve(),d=void 0});const{paramsError:h,searchError:y}=c;h&&jr(n,l,h),y&&jr(n,l,y),b0(n,s,r,c);const p=new AbortController;let m=!1;const b=()=>{m||(m=!0,n.updateMatch(s,T=>({...T,isFetching:"beforeLoad",fetchCount:T.fetchCount+1,abortController:p})))},v=()=>{var T;(T=c._nonReactive.beforeLoadPromise)==null||T.resolve(),c._nonReactive.beforeLoadPromise=void 0,n.updateMatch(s,Q=>({...Q,isFetching:!1}))};if(!r.options.beforeLoad){n.router.batch(()=>{b(),v()});return}c._nonReactive.beforeLoadPromise=xl();const x={...oi(n,l,!1),...c.__routeContext},{search:w,params:N,cause:R}=c,j=Yc(n,s),z={search:w,abortController:p,params:N,preload:j,context:x,location:n.location,navigate:T=>n.router.navigate({...T,_fromLocation:n.location}),buildLocation:n.router.buildLocation,cause:j?"preload":R,matches:n.matches,routeId:r.id,...n.router.options.additionalContext},A=T=>{if(T===void 0){n.router.batch(()=>{b(),v()});return}(Zt(T)||Ct(T))&&(b(),jr(n,l,T)),n.router.batch(()=>{b(),n.updateMatch(s,Q=>({...Q,__beforeLoadContext:T})),v()})};let B;try{if(B=r.options.beforeLoad(z),Dr(B))return b(),B.catch(T=>{jr(n,l,T)}).then(A)}catch(T){b(),jr(n,l,T)}A(B)},fj=(n,s)=>{const{id:l,routeId:r}=n.matches[s],c=n.router.looseRoutesById[r],d=()=>y(),h=()=>uj(n,l,s,c),y=()=>{if(v0(n,l))return;const p=cj(n,l,c);return Dr(p)?p.then(h):h()};return d()},dj=(n,s,l)=>{var d,h,y,p,m,b;const r=n.router.getMatch(s);if(!r||!l.options.head&&!l.options.scripts&&!l.options.headers)return;const c={ssr:n.router.options.ssr,matches:n.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([(h=(d=l.options).head)==null?void 0:h.call(d,c),(p=(y=l.options).scripts)==null?void 0:p.call(y,c),(b=(m=l.options).headers)==null?void 0:b.call(m,c)]).then(([v,x,w])=>({meta:v==null?void 0:v.meta,links:v==null?void 0:v.links,headScripts:v==null?void 0:v.scripts,headers:w,scripts:x,styles:v==null?void 0:v.styles}))},x0=(n,s,l,r,c)=>{const d=s[r-1],{params:h,loaderDeps:y,abortController:p,cause:m}=n.router.getMatch(l),b=oi(n,r),v=Yc(n,l);return{params:h,deps:y,preload:!!v,parentMatchPromise:d,abortController:p,context:b,location:n.location,navigate:x=>n.router.navigate({...x,_fromLocation:n.location}),cause:v?"preload":m,route:c,...n.router.options.additionalContext}},Zg=async(n,s,l,r,c)=>{var d,h,y,p,m;try{const b=n.router.getMatch(l);try{(!(c0??n.router.isServer)||b.ssr===!0)&&Lr(c);const v=c.options.loader,x=typeof v=="function"?v:v==null?void 0:v.handler,w=x==null?void 0:x(x0(n,s,l,r,c)),N=!!x&&Dr(w);if((N||c._lazyPromise||c._componentsPromise||c.options.head||c.options.scripts||c.options.headers||b._nonReactive.minPendingPromise)&&n.updateMatch(l,j=>({...j,isFetching:"loader"})),x){const j=N?await w:w;ys(n,n.router.getMatch(l),j),j!==void 0&&n.updateMatch(l,z=>({...z,loaderData:j}))}c._lazyPromise&&await c._lazyPromise;const R=b._nonReactive.minPendingPromise;R&&await R,c._componentsPromise&&await c._componentsPromise,n.updateMatch(l,j=>({...j,error:void 0,context:oi(n,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(v){let x=v;if((x==null?void 0:x.name)==="AbortError"){if(b.abortController.signal.aborted){(d=b._nonReactive.loaderPromise)==null||d.resolve(),b._nonReactive.loaderPromise=void 0;return}n.updateMatch(l,N=>({...N,status:N.status==="pending"?"success":N.status,isFetching:!1,context:oi(n,r)}));return}const w=b._nonReactive.minPendingPromise;w&&await w,Ct(v)&&await((y=(h=c.options.notFoundComponent)==null?void 0:h.preload)==null?void 0:y.call(h)),ys(n,n.router.getMatch(l),v);try{(m=(p=c.options).onError)==null||m.call(p,v)}catch(N){x=N,ys(n,n.router.getMatch(l),N)}!Zt(x)&&!Ct(x)&&await Lr(c,["errorComponent"]),n.updateMatch(l,N=>({...N,error:x,context:oi(n,r),status:"error",isFetching:!1}))}}catch(b){const v=n.router.getMatch(l);v&&(v._nonReactive.loaderPromise=void 0),ys(n,v,b)}},hj=async(n,s,l)=>{var w,N,R,j;async function r(z,A,B,T,Q){const U=Date.now()-A.updatedAt,k=z?Q.options.preloadStaleTime??n.router.options.defaultPreloadStaleTime??3e4:Q.options.staleTime??n.router.options.defaultStaleTime??0,O=Q.options.shouldReload,P=typeof O=="function"?O(x0(n,s,c,l,Q)):O,{status:$,invalid:W}=T,Z=U>=k&&(!!n.forceStaleReload||T.cause==="enter"||B!==void 0&&B!==T.id);h=$==="success"&&(W||(P??Z)),z&&Q.options.preload===!1||(h&&!n.sync&&b?(y=!0,(async()=>{var te,ee;try{await Zg(n,s,c,l,Q);const he=n.router.getMatch(c);(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){Zt(he)&&await n.router.navigate(he.options)}})()):$!=="success"||h?await Zg(n,s,c,l,Q):Xg(n,c,l))}const{id:c,routeId:d}=n.matches[l];let h=!1,y=!1;const p=n.router.looseRoutesById[d],m=p.options.loader,b=((typeof m=="function"||m==null?void 0:m.staleReloadMode)??n.router.options.defaultStaleReloadMode)!=="blocking";if(v0(n,c)){if(!n.router.getMatch(c))return n.matches[l];Xg(n,c,l)}else{const z=n.router.getMatch(c),A=n.router.stores.matchesId.get()[l],B=((w=A&&n.router.stores.matchStores.get(A)||null)==null?void 0:w.routeId)===d?A:(N=n.router.stores.matches.get().find(Q=>Q.routeId===d))==null?void 0:N.id,T=Yc(n,c);if(z._nonReactive.loaderPromise){if(z.status==="success"&&!n.sync&&!z.preload&&b)return z;await z._nonReactive.loaderPromise;const Q=n.router.getMatch(c),U=Q._nonReactive.error||Q.error;U&&ys(n,Q,U),Q.status==="pending"&&await r(T,z,B,Q,p)}else{const Q=T&&!n.router.stores.matchStores.has(c),U=n.router.getMatch(c);U._nonReactive.loaderPromise=xl(),Q!==U.preload&&n.updateMatch(c,k=>({...k,preload:Q})),await r(T,z,B,U,p)}}const v=n.router.getMatch(c);y||((R=v._nonReactive.loaderPromise)==null||R.resolve(),(j=v._nonReactive.loadPromise)==null||j.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 x=y?v.isFetching:!1;return x!==v.isFetching||v.invalid!==!1?(n.updateMatch(c,z=>({...z,isFetching:x,invalid:!1})),n.router.getMatch(c)):v};async function Fg(n){var x,w;const s=n,l=[];oj(s.router)&&Zd(s);let r;for(let N=0;N<s.matches.length;N++){try{const R=fj(s,N);Dr(R)&&await R}catch(R){if(Zt(R))throw R;if(Ct(R))r=R;else if(!s.preload)throw R;break}if(s.serialError||s.firstBadMatchIndex!=null)break}const c=s.firstBadMatchIndex??s.matches.length,d=r&&!s.preload?Kg(s,r):void 0,h=r&&s.preload?0:d!==void 0?Math.min(d+1,c):c;let y,p;for(let N=0;N<h;N++)l.push(hj(s,l,N));try{await Promise.all(l)}catch{const N=await Promise.allSettled(l);for(const R of N){if(R.status!=="rejected")continue;const j=R.reason;if(Zt(j))throw j;Ct(j)?y??(y=j):p??(p=j)}if(p!==void 0)throw p}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 N=Kg(s,m);N===void 0&&wa();const R=s.matches[N],j=s.router.looseRoutesById[R.routeId],z=(x=s.router.options)==null?void 0:x.defaultNotFoundComponent;!j.options.notFoundComponent&&z&&(j.options.notFoundComponent=z),m.routeId=R.routeId;const A=R.routeId===s.router.routeTree.id;s.updateMatch(R.id,B=>({...B,...A?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:m},isFetching:!1})),b=N,await Lr(j,["notFoundComponent"])}else if(!s.preload){const N=s.matches[0];N.globalNotFound||(w=s.router.getMatch(N.id))!=null&&w.globalNotFound&&s.updateMatch(N.id,R=>({...R,globalNotFound:!1,error:void 0}))}if(s.serialError&&s.firstBadMatchIndex!==void 0){const N=s.router.looseRoutesById[s.matches[s.firstBadMatchIndex].routeId];await Lr(N,["errorComponent"])}for(let N=0;N<=b;N++){const{id:R,routeId:j}=s.matches[N],z=s.router.looseRoutesById[j];try{const A=dj(s,R,z);if(A){const B=await A;s.updateMatch(R,T=>({...T,...B}))}}catch(A){console.error(`Error executing head for route ${j}:`,A)}}const v=Zd(s);if(Dr(v)&&await v,m)throw m;if(s.serialError&&!s.preload&&!s.onReady)throw s.serialError;return s.matches}function Jg(n,s){const l=s.map(r=>{var c,d;return(d=(c=n.options[r])==null?void 0:c.preload)==null?void 0:d.call(c)}).filter(Boolean);if(l.length!==0)return Promise.all(l)}function Lr(n,s=Rc){!n._lazyLoaded&&n._lazyPromise===void 0&&(n.lazyFn?n._lazyPromise=n.lazyFn().then(r=>{const{id:c,...d}=r.options;Object.assign(n.options,d),n._lazyLoaded=!0,n._lazyPromise=void 0}):n._lazyLoaded=!0);const l=()=>n._componentsLoaded?void 0:s===Rc?(()=>{if(n._componentsPromise===void 0){const r=Jg(n,Rc);r?n._componentsPromise=r.then(()=>{n._componentsLoaded=!0,n._componentsPromise=void 0}):n._componentsLoaded=!0}return n._componentsPromise})():Jg(n,s);return n._lazyPromise?n._lazyPromise.then(l):l()}function S0(n){var s;for(const l of Rc)if((s=n.options[l])!=null&&s.preload)return!0;return!1}const Rc=["component","errorComponent","pendingComponent","notFoundComponent"];function mj(n){return{input:({url:s})=>{for(const l of n)s=Fd(l,s);return s},output:({url:s})=>{for(let l=n.length-1;l>=0;l--)s=j0(n[l],s);return s}}}function pj(n){const s=g0(n.basepath),l=`/${s}`,r=n.caseSensitive?l:l.toLowerCase(),c=`${r}/`;return{input:({url:d})=>{const h=n.caseSensitive?d.pathname:d.pathname.toLowerCase();return h===r?d.pathname="/":h.startsWith(c)&&(d.pathname=d.pathname.slice(l.length)),d},output:({url:d})=>(d.pathname=Nc(["/",s,d.pathname]),d)}}function Fd(n,s){var r;const l=(r=n==null?void 0:n.input)==null?void 0:r.call(n,{url:s});if(l){if(typeof l=="string")return new URL(l);if(l instanceof URL)return l}return s}function j0(n,s){var r;const l=(r=n==null?void 0:n.output)==null?void 0:r.call(n,{url:s});if(l){if(typeof l=="string")return new URL(l);if(l instanceof URL)return l}return s}function yj(n,s){const{createMutableStore:l,createReadonlyStore:r,batch:c,init:d}=s,h=new Map,y=new Map,p=new Map,m=l(n.status),b=l(n.loadedAt),v=l(n.isLoading),x=l(n.isTransitioning),w=l(n.location),N=l(n.resolvedLocation),R=l(n.statusCode),j=l(n.redirect),z=l([]),A=l([]),B=l([]),T=r(()=>md(h,z.get())),Q=r(()=>md(y,A.get())),U=r(()=>md(p,B.get())),k=r(()=>z.get()[0]),O=r(()=>z.get().some(K=>{var ue;return((ue=h.get(K))==null?void 0:ue.get().status)==="pending"})),P=r(()=>{var K;return{locationHref:w.get().href,resolvedLocationHref:(K=N.get())==null?void 0:K.href,status:m.get()}}),$=r(()=>({status:m.get(),loadedAt:b.get(),isLoading:v.get(),isTransitioning:x.get(),matches:T.get(),location:w.get(),resolvedLocation:N.get(),statusCode:R.get(),redirect:j.get()})),W=Ur(64);function Z(K){let ue=W.get(K);return ue||(ue=r(()=>{const Oe=z.get();for(const ne of Oe){const C=h.get(ne);if(C&&C.routeId===K)return C.get()}}),W.set(K,ue)),ue}const te={status:m,loadedAt:b,isLoading:v,isTransitioning:x,location:w,resolvedLocation:N,statusCode:R,redirect:j,matchesId:z,pendingIds:A,cachedIds:B,matches:T,pendingMatches:Q,cachedMatches:U,firstId:k,hasPending:O,matchRouteDeps:P,matchStores:h,pendingMatchStores:y,cachedMatchStores:p,__store:$,getRouteMatchStore:Z,setMatches:ee,setPending:he,setCached:L};ee(n.matches),d==null||d(te);function ee(K){pd(K,h,z,l,c)}function he(K){pd(K,y,A,l,c)}function L(K){pd(K,p,B,l,c)}return te}function md(n,s){const l=[];for(const r of s){const c=n.get(r);c&&l.push(c.get())}return l}function pd(n,s,l,r,c){const d=n.map(y=>y.id),h=new Set(d);c(()=>{for(const y of s.keys())h.has(y)||s.delete(y);for(const y of n){const p=s.get(y.id);if(!p){const m=r(y);m.routeId=y.routeId,s.set(y.id,m);continue}p.routeId=y.routeId,p.get()!==y&&p.set(y)}QS(l.get(),d)||l.set(d)})}var vs="__TSR_index",Ig="popstate",$g="beforeunload";function gj(n){let s=n.getLocation();const l=new Set,r=h=>{s=n.getLocation(),l.forEach(y=>y({location:s,action:h}))},c=h=>{n.notifyOnIndexChange??!0?r(h):s=n.getLocation()},d=async({task:h,navigateOpts:y,...p})=>{var v,x;if((y==null?void 0:y.ignoreBlocker)??!1){h();return}const m=((v=n.getBlockers)==null?void 0:v.call(n))??[],b=p.type==="PUSH"||p.type==="REPLACE";if(typeof document<"u"&&m.length&&b)for(const w of m){const N=Lc(p.path,p.state);if(await w.blockerFn({currentLocation:s,nextLocation:N,action:p.type})){(x=n.onBlocked)==null||x.call(n);return}}h()};return{get location(){return s},get length(){return n.getLength()},subscribers:l,subscribe:h=>(l.add(h),()=>{l.delete(h)}),push:(h,y,p)=>{const m=s.state[vs];y=Wg(m+1,y),d({task:()=>{n.pushState(h,y),r({type:"PUSH"})},navigateOpts:p,type:"PUSH",path:h,state:y})},replace:(h,y,p)=>{const m=s.state[vs];y=Wg(m,y),d({task:()=>{n.replaceState(h,y),r({type:"REPLACE"})},navigateOpts:p,type:"REPLACE",path:h,state:y})},go:(h,y)=>{d({task:()=>{n.go(h),c({type:"GO",index:h})},navigateOpts:y,type:"GO"})},back:h=>{d({task:()=>{n.back((h==null?void 0:h.ignoreBlocker)??!1),c({type:"BACK"})},navigateOpts:h,type:"BACK"})},forward:h=>{d({task:()=>{n.forward((h==null?void 0:h.ignoreBlocker)??!1),c({type:"FORWARD"})},navigateOpts:h,type:"FORWARD"})},canGoBack:()=>s.state[vs]!==0,createHref:h=>n.createHref(h),block:h=>{var p;if(!n.setBlockers)return()=>{};const y=((p=n.getBlockers)==null?void 0:p.call(n))??[];return n.setBlockers([...y,h]),()=>{var b,v;const m=((b=n.getBlockers)==null?void 0:b.call(n))??[];(v=n.setBlockers)==null||v.call(n,m.filter(x=>x!==h))}},flush:()=>{var h;return(h=n.flush)==null?void 0:h.call(n)},destroy:()=>{var h;return(h=n.destroy)==null?void 0:h.call(n)},notify:r}}function Wg(n,s){s||(s={});const l=yh();return{...s,key:l,__TSR_key:l,[vs]:n}}function vj(n){var O,P;const s=typeof document<"u"?window:void 0,l=s.history.pushState,r=s.history.replaceState;let c=[];const d=()=>c,h=$=>c=$,y=($=>$),p=(()=>Lc(`${s.location.pathname}${s.location.search}${s.location.hash}`,s.history.state));if(!((O=s.history.state)!=null&&O.__TSR_key)&&!((P=s.history.state)!=null&&P.key)){const $=yh();s.history.replaceState({[vs]:0,key:$,__TSR_key:$},"")}let m=p(),b,v=!1,x=!1,w=!1,N=!1;const R=()=>m;let j,z;const A=()=>{j&&(k._ignoreSubscribers=!0,(j.isPush?s.history.pushState:s.history.replaceState)(j.state,"",j.href),k._ignoreSubscribers=!1,j=void 0,z=void 0,b=void 0)},B=($,W,Z)=>{const te=y(W);z||(b=m),m=Lc(W,Z),j={href:te,state:Z,isPush:(j==null?void 0:j.isPush)||$==="push"},z||(z=Promise.resolve().then(()=>A()))},T=$=>{m=p(),k.notify({type:$})},Q=async()=>{if(x){x=!1;return}const $=p(),W=$.state[vs]-m.state[vs],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(w)w=!1;else{const K=d();if(typeof document<"u"&&K.length){for(const ue of K)if(await ue.blockerFn({currentLocation:m,nextLocation:$,action:he})){x=!0,s.history.go(1),k.notify(L);return}}}m=p(),k.notify(L)},U=$=>{if(N){N=!1;return}let W=!1;const Z=d();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=""},k=gj({getLocation:R,getLength:()=>s.history.length,pushState:($,W)=>B("push",$,W),replaceState:($,W)=>B("replace",$,W),back:$=>($&&(w=!0),N=!0,s.history.back()),forward:$=>{$&&(w=!0),N=!0,s.history.forward()},go:$=>{v=!0,s.history.go($)},createHref:$=>y($),flush:A,destroy:()=>{s.history.pushState=l,s.history.replaceState=r,s.removeEventListener($g,U,{capture:!0}),s.removeEventListener(Ig,Q)},onBlocked:()=>{b&&m!==b&&(m=b)},getBlockers:d,setBlockers:h,notifyOnIndexChange:!1});return s.addEventListener($g,U,{capture:!0}),s.addEventListener(Ig,Q),s.history.pushState=function(...$){const W=l.apply(s.history,$);return k._ignoreSubscribers||T("PUSH"),W},s.history.replaceState=function(...$){const W=r.apply(s.history,$);return k._ignoreSubscribers||T("REPLACE"),W},k}function bj(n){let s=n.replace(/[\x00-\x1f\x7f]/g,"");return s.startsWith("//")&&(s="/"+s.replace(/^\/+/,"")),s}function Lc(n,s){const l=bj(n),r=l.indexOf("#"),c=l.indexOf("?"),d=yh();return{href:l,pathname:l.substring(0,r>0?c>0?Math.min(r,c):r:c>0?c:l.length),hash:r>-1?l.substring(r):"",search:c>-1?l.slice(c,r===-1?void 0:r):"",state:s||{[vs]:0,key:d,__TSR_key:d}}}function yh(){return(Math.random()+1).toString(36).substring(7)}function il(n,s){const l=s,r=n;return{fromLocation:l,toLocation:r,pathChanged:(l==null?void 0:l.pathname)!==r.pathname,hrefChanged:(l==null?void 0:l.href)!==r.href,hashChanged:(l==null?void 0:l.hash)!==r.hash}}const Jd=new WeakMap;var xj=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=l=>l(),this.update=l=>{var b;const r=this.options,c=this.basepath??(r==null?void 0:r.basepath)??"/",d=this.basepath===void 0,h=r==null?void 0:r.rewrite;if(this.options={...r,...l},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=ej(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=vj()),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=Ur(1e3),v=this.buildRouteTree(),this.setRoutes(v)}if(!this.stores&&this.latestLocation){const v=this.getStoreConfig(this);this.batch=v.batch,this.stores=yj(jj(this.latestLocation),v),zj(this)}let y=!1;const p=this.options.basepath??"/",m=this.options.rewrite;if(d||c!==p||h!==m){this.basepath=p;const v=[],x=g0(p);x&&x!=="/"&&v.push(pj({basepath:p})),m&&v.push(m),this.rewrite=v.length===0?void 0:v.length===1?v[0]:mj(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 l=ZS(this.routeTree,this.options.caseSensitive,(r,c)=>{r.init({originalIndex:c})});return this.options.routeMasks&&VS(this.options.routeMasks,l.processedTree),l},this.subscribe=(l,r)=>{const c={eventType:l,fn:r};return this.subscribers.add(c),()=>{this.subscribers.delete(c)}},this.emit=l=>{this.subscribers.forEach(r=>{r.eventType===l.type&&r.fn(l)})},this.parseLocation=(l,r)=>{const c=({pathname:p,search:m,hash:b,href:v,state:x})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(p)){const z=this.options.parseSearch(m),A=this.options.stringifySearch(z);return{href:p+A+b,publicHref:p+A+b,pathname:Sr(p).path,external:!1,searchStr:A,search:Vs(r==null?void 0:r.search,z),hash:Sr(b.slice(1)).path,state:ms(r==null?void 0:r.state,x)}}const w=new URL(v,this.origin),N=Fd(this.rewrite,w),R=this.options.parseSearch(N.search),j=this.options.stringifySearch(R);return N.search=j,{href:N.href.replace(N.origin,""),publicHref:v,pathname:Sr(N.pathname).path,external:!!this.rewrite&&N.origin!==this.origin,searchStr:j,search:Vs(r==null?void 0:r.search,R),hash:Sr(N.hash.slice(1)).path,state:ms(r==null?void 0:r.state,x)}},d=c(l),{__tempLocation:h,__tempKey:y}=d.state;if(h&&(!y||y===this.tempLocationKey)){const p=c(h);return p.state.key=d.state.key,p.state.__TSR_key=d.state.__TSR_key,delete p.state.__tempLocation,{...p,maskedLocation:d}}return d},this.resolvePathWithBase=(l,r)=>WS({base:l,to:r.includes("//")?ph(r):r,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(l,r,c)=>typeof l=="string"?this.matchRoutesInternal({pathname:l,search:r},c):this.matchRoutesInternal(l,r),this.getMatchedRoutes=l=>wj({pathname:l,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=l=>{const r=this.getMatch(l);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(l=>{this.cancelMatch(l)}),this.stores.matchesId.get().forEach(l=>{var c;if(this.stores.pendingMatchStores.has(l))return;const r=(c=this.stores.matchStores.get(l))==null?void 0:c.get();r&&(r.status==="pending"||r.isFetching==="loader")&&this.cancelMatch(l)})},this.buildLocation=l=>{const r=(d={})=>{var W,Z;const h=d._fromLocation||this.pendingBuiltLocation||this.latestLocation,y=this.matchRoutesLightweight(h);d.from;const p=d.unsafeRelative==="path"?h.pathname:d.from??y.fullPath,m=d.to?`${d.to}`:void 0,b=y.search,v=Object.assign(Object.create(null),y.params),x=(m==null?void 0:m.charCodeAt(0))===47?"/":this.resolvePathWithBase(p,"."),w=m?this.resolvePathWithBase(x,m):x,N=d.params===!1||d.params===null?Object.create(null):(d.params??!0)===!0?v:Object.assign(v,Fs(d.params,v)),R=this.routesByPath[ja(w)];let j;if(R)j=this.getRouteBranch(R);else if(w.includes("$"))j=[];else{const te=this.getMatchedRoutes(w);j=te.matchedRoutes,this.options.notFoundRoute&&(!te.foundRoute||te.foundRoute.path!=="/"&&te.routeParams["**"])&&(j=[...j,this.options.notFoundRoute])}if(j.length&&f0(N))for(const te of j){const ee=((W=te.options.params)==null?void 0:W.stringify)??te.options.stringifyParams;if(ee)try{Object.assign(N,ee(N))}catch{}}const z=l.leaveParams?w:Sr(Yg({path:w,params:N,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let A=b;if(l._includeValidateSearch&&((Z=this.options.search)!=null&&Z.strict)){const te={};j.forEach(ee=>{if(ee.options.validateSearch)try{Object.assign(te,_c(ee.options.validateSearch,{...te,...A}))}catch{}}),A=te}A=Nj({search:A,dest:d,destRoutes:j,_includeValidateSearch:l._includeValidateSearch}),A=Vs(b,A);const B=this.options.stringifySearch(A),T=d.hash===!0?h.hash:d.hash?Fs(d.hash,h.hash):void 0,Q=T?`#${T}`:"";let U=d.state===!0?h.state:d.state?Fs(d.state,h.state):{};U=ms(h.state,U);const k=`${z}${B}${Q}`;let O,P,$=!1;if(this.rewrite){const te=new URL(k,this.origin),ee=j0(this.rewrite,te);O=te.href.replace(te.origin,""),ee.origin!==this.origin?(P=ee.href,$=!0):P=ee.pathname+ee.search+ee.hash}else O=HS(k),P=O;return{publicHref:P,href:O,pathname:z,search:A,searchStr:B,state:U,hash:T??"",external:$,unmaskOnReload:d.unmaskOnReload}},c=(d={},h)=>{const y=r(d);let p=h?r(h):void 0;if(!p){const m=Object.create(null);if(this.options.routeMasks){const b=YS(y.pathname,this.processedTree);if(b){Object.assign(m,b.rawParams);const{from:v,params:x,...w}=b.route,N=x===!1||x===null?Object.create(null):(x??!0)===!0?m:Object.assign(m,Fs(x,m));h={from:l.from,...w,params:N},p=r(h)}}}return p&&(y.maskedLocation=p),y};return l.mask?c(l,{from:l.from,...l.mask}):c(l)},this.commitLocation=async({viewTransition:l,ignoreBlocker:r,...c})=>{let d;const h=()=>{const m=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];m.forEach(v=>{c.state[v]=this.latestLocation.state[v]});const b=li(c.state,this.latestLocation.state);return m.forEach(v=>{delete c.state[v]}),b},y=ja(this.latestLocation.href)===ja(c.href);let p=this.commitLocationPromise;if(this.commitLocationPromise=xl(()=>{p==null||p.resolve(),p=void 0}),y&&h())this.load();else{let{maskedLocation:m,hashScrollIntoView:b,...v}=c;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=l,d=c.replace?"REPLACE":"PUSH",this.history[d==="REPLACE"?"replace":"push"](v.publicHref,v.state,{ignoreBlocker:r})}return this.resetNextScroll=c.resetScroll??!0,this.history.subscribers.size||this.load(d?{action:{type:d}}:void 0),this.commitLocationPromise},this.buildAndCommitLocation=({replace:l,resetScroll:r,hashScrollIntoView:c,viewTransition:d,ignoreBlocker:h,href:y,...p}={})=>{if(y){const v=this.history.location.state.__TSR_index,x=Lc(y,{__TSR_index:l?v:v+1}),w=new URL(x.pathname,this.origin);p.to=Fd(this.rewrite,w).pathname,p.search=this.options.parseSearch(x.search),p.hash=x.hash.slice(1)}const m=this.buildLocation({...p,_includeValidateSearch:!0});this.pendingBuiltLocation=m;const b=this.commitLocation({...m,viewTransition:d,replace:l,resetScroll:r,hashScrollIntoView:c,ignoreBlocker:h});return Promise.resolve().then(()=>{this.pendingBuiltLocation===m&&(this.pendingBuiltLocation=void 0)}),b},this.navigate=async({to:l,reloadDocument:r,href:c,publicHref:d,...h})=>{var p,m;let y=!1;if(c)try{new URL(`${c}`),y=!0}catch{}if(y&&!r&&(r=!0),r){if(l!==void 0||!c){const v=this.buildLocation({to:l,...h});c=c??v.publicHref,d=d??v.publicHref}const b=!y&&d?d:c;if(Dc(b,this.protocolAllowlist))return Promise.resolve();if(!h.ignoreBlocker){const v=((m=(p=this.history).getBlockers)==null?void 0:m.call(p))??[];for(const x of v)if(x!=null&&x.blockerFn&&await x.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return h.replace?window.location.replace(b):window.location.href=b,Promise.resolve()}return this.buildAndCommitLocation({...h,href:c,to:l,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const l=this.matchRoutes(this.latestLocation),r=this.stores.cachedMatches.get().filter(c=>!l.some(d=>d.id===c.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(l),this.stores.setCached(r)})},this.load=async l=>{var m;const r=(m=l==null?void 0:l.action)==null?void 0:m.type;let c,d,h;const y=this.stores.resolvedLocation.get()??this.stores.location.get();for(h=new Promise(b=>{this.startTransition(async()=>{var v;try{this.beforeLoad(),r?Jd.set(this.latestLocation,r):Jd.delete(this.latestLocation);const x=this.latestLocation,w=il(x,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...w}),this.emit({type:"onBeforeLoad",...w}),await Fg({router:this,sync:l==null?void 0:l.sync,forceStaleReload:y.href===x.href,matches:this.stores.pendingMatches.get(),location:x,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{var A,B;let N=null,R=null,j=null,z=null;this.batch(()=>{const T=this.stores.pendingMatches.get(),Q=T.length,U=this.stores.matches.get();N=Q?U.filter(P=>!this.stores.pendingMatchStores.has(P.id)):null;const k=new Set;for(const P of this.stores.pendingMatchStores.values())P.routeId&&k.add(P.routeId);const O=new Set;for(const P of this.stores.matchStores.values())P.routeId&&O.add(P.routeId);R=Q?U.filter(P=>!k.has(P.routeId)):null,j=Q?T.filter(P=>!O.has(P.routeId)):null,z=Q?T.filter(P=>O.has(P.routeId)):U,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),Q&&(this.stores.setMatches(T),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...N.filter(P=>P.status!=="error"&&P.status!=="notFound"&&P.status!=="redirected")]),this.clearExpiredCache())});for(const[T,Q]of[[R,"onLeave"],[j,"onEnter"],[z,"onStay"]])if(T)for(const U of T)(B=(A=this.looseRoutesById[U.routeId].options)[Q])==null||B.call(A,U)})})}})}catch(x){Zt(x)?(c=x,this.navigate({...c.options,replace:!0,ignoreBlocker:!0})):Ct(x)&&(d=x);const w=c?c.status:d?404:this.stores.matches.get().some(N=>N.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(w),this.stores.redirect.set(c)})}this.latestLoadPromise===h&&((v=this.commitLocationPromise)==null||v.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),b()})}),this.latestLoadPromise=h,await h;this.latestLoadPromise&&h!==this.latestLoadPromise;)await this.latestLoadPromise;let p;this.hasNotFoundMatch()?p=404:this.stores.matches.get().some(b=>b.status==="error")&&(p=500),p!==void 0&&this.stores.statusCode.set(p)},this.startViewTransition=l=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let c;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const d=this.latestLocation,h=this.stores.resolvedLocation.get(),y=typeof r.types=="function"?r.types(il(d,h)):r.types;if(y===!1){l();return}c={update:l,types:y}}else c=l;document.startViewTransition(c)}else l()},this.updateMatch=(l,r)=>{this.startTransition(()=>{const c=this.stores.pendingMatchStores.get(l);if(c){c.set(r);return}const d=this.stores.matchStores.get(l);if(d){d.set(r);return}const h=this.stores.cachedMatchStores.get(l);if(h){const y=r(h.get());y.status==="redirected"?this.stores.cachedMatchStores.delete(l)&&this.stores.cachedIds.set(p=>p.filter(m=>m!==l)):h.set(y)}})},this.getMatch=l=>{var r,c,d;return((r=this.stores.cachedMatchStores.get(l))==null?void 0:r.get())??((c=this.stores.pendingMatchStores.get(l))==null?void 0:c.get())??((d=this.stores.matchStores.get(l))==null?void 0:d.get())},this.invalidate=l=>{const r=c=>{var d;return((d=l==null?void 0:l.filter)==null?void 0:d.call(l,c))??!0?{...c,invalid:!0,...l!=null&&l.forcePending||c.status==="error"||c.status==="notFound"?{status:"pending",error:void 0}:void 0}:c};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:l==null?void 0:l.sync})},this.getParsedLocationHref=l=>l.publicHref||"/",this.resolveRedirect=l=>{const r=l.headers.get("Location");if(!l.options.href||l.options._builtLocation){const c=l.options._builtLocation??this.buildLocation(l.options),d=this.getParsedLocationHref(c);l.options.href=d,l.headers.set("Location",d)}else if(r)try{const c=new URL(r);if(this.origin&&c.origin===this.origin){const d=c.pathname+c.search+c.hash;l.options.href=d,l.headers.set("Location",d)}}catch{}if(l.options.href&&!l.options._builtLocation&&Dc(l.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return l.headers.get("Location")||l.headers.set("Location",l.options.href),l},this.clearCache=l=>{const r=l==null?void 0:l.filter;r!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(c=>!r(c))):this.stores.setCached([])},this.clearExpiredCache=()=>{const l=Date.now(),r=c=>{const d=this.looseRoutesById[c.routeId];if(!d.options.loader)return!0;const h=(c.preload?d.options.preloadGcTime??this.options.defaultPreloadGcTime:d.options.gcTime??this.options.defaultGcTime)??300*1e3;return c.status==="error"?!0:l-c.updatedAt>=h};this.clearCache({filter:r})},this.loadRouteChunk=Lr,this.preloadRoute=async l=>{const r=l._builtLocation??this.buildLocation(l);let c=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:l});const d=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),h=new Set([...d,...this.stores.cachedIds.get()]),y=c.filter(p=>!h.has(p.id));if(y.length){const p=this.stores.cachedMatches.get();this.stores.setCached([...p,...y])}try{return c=await Fg({router:this,matches:c,location:r,preload:!0,updateMatch:(p,m)=>{d.has(p)?c=c.map(b=>b.id===p?m(b):b):this.updateMatch(p,m)}}),c}catch(p){if(Zt(p))return p.options.reloadDocument?void 0:await this.preloadRoute({...p.options,_fromLocation:r});Ct(p)||console.error(p);return}},this.matchRoute=(l,r)=>{const c={...l,to:l.to?this.resolvePathWithBase(l.from||"",l.to):void 0,params:l.params||{},leaveParams:!0},d=this.buildLocation(c);if(r!=null&&r.pending&&this.stores.status.get()!=="pending")return!1;const h=((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=PS(d.pathname,(r==null?void 0:r.caseSensitive)??!1,(r==null?void 0:r.fuzzy)??!1,h.pathname,this.processedTree);return!y||l.params&&!li(y.rawParams,l.params,{partial:!0})?!1:(r==null?void 0:r.includeSearch)??!0?li(h.search,d.search,{partial:!0})?y.rawParams:!1:y.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(l=>l.status==="notFound"||l.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??sj,parseSearch:n.parseSearch??aj,protocolAllowlist:n.protocolAllowlist??qS}),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:l}){this.routesById=n,this.routesByPath=s,this.processedTree=l;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=p0(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 l=this.getMatchedRoutes(n.pathname),{foundRoute:r,routeParams:c}=l;let{matchedRoutes:d}=l,h=!1;(r?r.path!=="/"&&c["**"]:ja(n.pathname))&&(this.options.notFoundRoute?d=[...d,this.options.notFoundRoute]:h=!0);const y=h?_j(this.options.notFoundMode,d):void 0,p=new Array(d.length),m=new Map;for(const x of this.stores.matchStores.values())x.routeId&&m.set(x.routeId,x.get());for(let x=0;x<d.length;x++){const w=d[x],N=p[x-1];let R,j,z;{const ee=(N==null?void 0:N.search)??n.search,he=(N==null?void 0:N._strictSearch)??void 0;try{const L=_c(w.options.validateSearch,{...ee})??void 0;R={...ee,...L},j={...he,...L},z=void 0}catch(L){let K=L;if(L instanceof Bc||(K=new Bc(L.message,{cause:L})),s!=null&&s.throwOnError)throw K;R=ee,j={},z=K}}const A=((v=(b=w.options).loaderDeps)==null?void 0:v.call(b,{search:R}))??"",B=A?JSON.stringify(A):"",{interpolatedPath:T,usedParams:Q}=Yg({path:w.fullPath,params:c,decoder:this.pathParamsDecoder,server:this.isServer}),U=w.id+T+B,k=this.getMatch(U),O=m.get(w.id),P=(k==null?void 0:k._strictParams)??Q;let $;if(!k)try{ev(w,P)}catch(ee){if(Ct(ee)||Zt(ee)?$=ee:$=new Sj(ee.message,{cause:ee}),s!=null&&s.throwOnError)throw $}Object.assign(c,P);const W=O?"stay":"enter";let Z;if(k)Z={...k,cause:W,params:(O==null?void 0:O.params)??c,_strictParams:P,search:Vs(O?O.search:k.search,R),_strictSearch:j};else{const ee=w.options.loader||w.options.beforeLoad||w.lazyFn||S0(w)?"pending":"success";Z={id:U,ssr:w.options.ssr,index:x,routeId:w.id,params:(O==null?void 0:O.params)??c,_strictParams:P,pathname:T,updatedAt:Date.now(),search:O?Vs(O.search,R):R,_strictSearch:j,searchError:void 0,status:ee,isFetching:!1,error:void 0,paramsError:$,__routeContext:void 0,_nonReactive:{loadPromise:xl()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:W,loaderDeps:O?ms(O.loaderDeps,A):A,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:w.options.staticData||{},fullPath:w.fullPath}}s!=null&&s.preload||(Z.globalNotFound=y===w.id),Z.searchError=z;const te=this.getParentContext(N);Z.context={...te,...Z.__routeContext,...Z.__beforeLoadContext},p[x]=Z}for(let x=0;x<p.length;x++){const w=p[x],N=this.looseRoutesById[w.routeId],R=this.getMatch(w.id),j=m.get(w.routeId);if(w.params=j?Vs(j.params,c):c,!R){const z=p[x-1],A=this.getParentContext(z);if(N.options.context){const B={deps:w.loaderDeps,params:w.params,context:A??{},location:n,navigate:T=>this.navigate({...T,_fromLocation:n}),buildLocation:this.buildLocation,cause:w.cause,abortController:w.abortController,preload:!!w.preload,matches:p,routeId:N.id};w.__routeContext=N.options.context(B)??void 0}w.context={...A,...w.__routeContext,...w.__beforeLoadContext}}}return p}matchRoutesLightweight(n){var m;const{matchedRoutes:s,routeParams:l}=this.getMatchedRoutes(n.pathname),r=kr(s),c={...n.search};for(const b of s)try{Object.assign(c,_c(b.options.validateSearch,c))}catch{}const d=kr(this.stores.matchesId.get()),h=d&&((m=this.stores.matchStores.get(d))==null?void 0:m.get()),y=h&&h.routeId===r.id&&h.pathname===n.pathname;let p;if(y)p=h.params;else{const b=Object.assign(Object.create(null),l);for(const v of s)try{ev(v,b)}catch{}p=b}return{matchedRoutes:s,fullPath:r.fullPath,search:c,params:p}}},Bc=class extends Error{},Sj=class extends Error{};function jj(n){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:n,matches:[],statusCode:200}}function _c(n,s){if(n==null)return{};if("~standard"in n){const l=n["~standard"].validate(s);if(l instanceof Promise)throw new Bc("Async validation not supported");if(l.issues)throw new Bc(JSON.stringify(l.issues,void 0,2),{cause:l});return l.value}return"parse"in n?n.parse(s):typeof n=="function"?n(s):{}}function wj({pathname:n,routesById:s,processedTree:l}){const r=Object.create(null),c=ja(n);let d;const h=KS(c,l,!0);return h&&(d=h.route,Object.assign(r,h.rawParams)),{matchedRoutes:(h==null?void 0:h.branch)||[s.__root__],routeParams:r,foundRoute:d}}function Nj({search:n,dest:s,destRoutes:l,_includeValidateSearch:r}){return Rj(l)(n,s,r??!1)}function Rj(n){var c;const s={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const d of n){if("search"in d.options)(c=d.options.search)!=null&&c.middlewares&&s.middlewares.push(...d.options.search.middlewares);else if(d.options.preSearchFilters||d.options.postSearchFilters){const h=({search:y,next:p})=>{let m=y;"preSearchFilters"in d.options&&d.options.preSearchFilters&&(m=d.options.preSearchFilters.reduce((v,x)=>x(v),y));const b=p(m);return"postSearchFilters"in d.options&&d.options.postSearchFilters?d.options.postSearchFilters.reduce((v,x)=>x(v),b):b};s.middlewares.push(h)}if(d.options.validateSearch){const h=({search:y,next:p})=>{const m=p(y);if(!s._includeValidateSearch)return m;try{return{...m,..._c(d.options.validateSearch,m)??void 0}}catch{return m}};s.middlewares.push(h)}}const l=({search:d})=>{const h=s.dest;return h.search?h.search===!0?d:Fs(h.search,d):{}};s.middlewares.push(l);const r=(d,h,y)=>{if(d>=y.length)return h;const p=y[d];return p({search:h,next:b=>r(d+1,b,y)})};return function(h,y,p){return s.dest=y,s._includeValidateSearch=p,r(0,h,s.middlewares)}}function _j(n,s){if(n!=="root")for(let l=s.length-1;l>=0;l--){const r=s[l];if(r.children)return r.id}return ri}function ev(n,s){var r;const l=((r=n.options.params)==null?void 0:r.parse)??n.options.parseParams;if(l){const c=l(s);if(c===!1)throw new Error("Route params.parse returned false for a matched route");Object.assign(s,c)}}function Ej(){try{return sessionStorage}catch{return}}const Tj="tsr-scroll-restoration-v1_3",ll=Ej();function Cj(){try{return JSON.parse((ll==null?void 0:ll.getItem("tsr-scroll-restoration-v1_3"))||"{}")}catch{return{}}}function Mj(){try{ll==null||ll.setItem(Tj,JSON.stringify(as))}catch{}}const as=Cj(),tv="data-scroll-restoration-id",Aj=n=>n.state.__TSR_key||n.href;function Oj(n){const s=n.getAttribute(tv);if(s)return`[${tv}="${s}"]`;let l="",r=n,c;for(;c=r.parentNode;){let d=1,h=r;for(;h=h.previousElementSibling;)d++;const y=`${r.localName}:nth-child(${d})`;l=l?`${y} > ${l}`:y,r=c}return l}let pc=!1;const al="window";function Id(n){try{return typeof n=="function"?n():document.querySelector(n)}catch{}}function nv(n){const s=[];for(const l of n){if(l===al)continue;const r=Id(l);r&&s.push(r)}return s}function zj(n,s){if(n.options.scrollRestoration&&(n.isScrollRestoring=!0),n.isScrollRestorationSetup)return;n.isScrollRestorationSetup=!0,pc=!1;const l=n.options.getScrollRestorationKey||Aj,r=new Map,c=(y,p,m)=>{const b=r.get(y)||{};b.scrollX=p,b.scrollY=m,r.set(y,b)};history.scrollRestoration="manual";const d=y=>{if(!(pc||!n.isScrollRestoring))if(y.target===document)c(al,scrollX,scrollY);else{const p=y.target;c(p,p.scrollLeft,p.scrollTop)}},h=y=>{if(!n.isScrollRestoring)return;const p=as[y]||(as[y]={});for(const[m,b]of r)m===al?p[al]=b:m.isConnected&&(p[Oj(m)]=b)};document.addEventListener("scroll",d,!0),n.subscribe("onBeforeLoad",y=>{y.fromLocation&&h(l(y.fromLocation)),r.clear()}),addEventListener("pagehide",()=>{h(l(n.stores.resolvedLocation.get()??n.stores.location.get())),Mj()}),n.subscribe("onRendered",y=>{var N;const p=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 x=l(y.toLocation),w=y.fromLocation&&l(y.fromLocation);if(n.isScrollRestoring&&w&&w!==x){const R=as[w];if(R){let j=as[x];for(const z in R){if(z===al){if(b)continue}else{const A=Id(z);if(!A||b&&m&&(v??(v=nv(m)),v.includes(A)))continue}j||(j=as[x]={}),j[z]??(j[z]=R[z])}}}pc=!0;try{const R=y.toLocation.hash,j=y.toLocation.state.__hashScrollIntoViewOptions??!0;let z=!1;if(b){const A=Jd.get(y.toLocation),B=R&&j&&(A==="PUSH"||A==="REPLACE"),T=n.isScrollRestoring?as[x]:void 0;if(T)for(const Q in T){const{scrollX:U,scrollY:k}=T[Q];if(Q===al){if(B)continue;scrollTo({top:k,left:U,behavior:p}),z=!0}else{const O=Id(Q);O&&(O.scrollLeft=U,O.scrollTop=k)}}if(!z&&!R){const Q={top:0,left:0,behavior:p};if(scrollTo(Q),m){v??(v=nv(m));for(const U of v)U.scrollTo(Q)}}}!z&&R&&j&&((N=document.getElementById(R))==null||N.scrollIntoView(j))}finally{pc=!1}})}const kj="Error preloading route! ☝️";var w0=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 p,m;this.originalIndex=s.originalIndex;const l=this.options,r=!(l!=null&&l.path)&&!(l!=null&&l.id);this.parentRoute=(m=(p=this.options).getParentRoute)==null?void 0:m.call(p),r?this._path=ri:this.parentRoute||wa();let c=r?ri:l==null?void 0:l.path;c&&c!=="/"&&(c=y0(c));const d=(l==null?void 0:l.id)||c;let h=r?ri:Nc([this.parentRoute.id==="__root__"?"":this.parentRoute.id,d]);c==="__root__"&&(c="/"),h!=="__root__"&&(h=Nc(["/",h]));const y=h==="__root__"?"/":Nc([this.parentRoute.fullPath,c]);this._path=c,this._id=h,this._fullPath=y,this._to=ja(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=>rj({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.")}},Dj=class extends w0{constructor(n){super(n)}};function gh(n){const s=n.errorComponent??vh;return u.jsx(Uj,{getResetKey:n.getResetKey,onCatch:n.onCatch,children:({error:l,reset:r})=>l?V.createElement(s,{error:l,reset:r}):n.children})}var Uj=class extends V.Component{constructor(...n){super(...n),this.state={error:null}}static getDerivedStateFromProps(n,s){const l=n.getResetKey();return s.error&&s.resetKey!==l?{resetKey:l,error:null}:{resetKey:l}}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 vh({error:n}){const[s,l]=V.useState(!1);return u.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[u.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[u.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),u.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>l(r=>!r),children:s?"Hide Error":"Show Error"})]}),u.jsx("div",{style:{height:".25rem"}}),s?u.jsx("div",{children:u.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:n.message?u.jsx("code",{children:n.message}):null})}):null]})}function Lj({children:n,fallback:s=null}){return N0()?u.jsx(zr.Fragment,{children:n}):u.jsx(zr.Fragment,{children:s})}function N0(){return zr.useSyncExternalStore(Bj,()=>!0,()=>!1)}function Bj(){return()=>{}}var R0=V.createContext(null);function hn(n){return V.useContext(R0)}var Pc=V.createContext(void 0),qj=V.createContext(void 0),We=(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))(We||{});function Hj({update:n,notify:s,unwatched:l}){return{link:r,unlink:c,propagate:d,checkDirty:h,shallowPropagate:y};function r(m,b,v){const x=b.depsTail;if(x!==void 0&&x.dep===m)return;const w=x!==void 0?x.nextDep:b.deps;if(w!==void 0&&w.dep===m){w.version=v,b.depsTail=w;return}const N=m.subsTail;if(N!==void 0&&N.version===v&&N.sub===b)return;const R=b.depsTail=m.subsTail={version:v,dep:m,sub:b,prevDep:x,nextDep:w,prevSub:N,nextSub:void 0};w!==void 0&&(w.prevDep=R),x!==void 0?x.nextDep=R:b.deps=R,N!==void 0?N.nextSub=R:m.subs=R}function c(m,b=m.sub){const v=m.dep,x=m.prevDep,w=m.nextDep,N=m.nextSub,R=m.prevSub;return w!==void 0?w.prevDep=x:b.depsTail=x,x!==void 0?x.nextDep=w:b.deps=w,N!==void 0?N.prevSub=R:v.subsTail=R,R!==void 0?R.nextSub=N:(v.subs=N)===void 0&&l(v),w}function d(m){let b=m.nextSub,v;e:do{const x=m.sub;let w=x.flags;if(w&60?w&12?w&4?!(w&48)&&p(m,x)?(x.flags=w|40,w&=1):w=0:x.flags=w&-9|32:w=0:x.flags=w|32,w&2&&s(x),w&1){const N=x.subs;if(N!==void 0){const R=(m=N).nextSub;R!==void 0&&(v={value:b,prev:v},b=R);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 h(m,b){let v,x=0,w=!1;e:do{const N=m.dep,R=N.flags;if(b.flags&16)w=!0;else if((R&17)===17){if(n(N)){const j=N.subs;j.nextSub!==void 0&&y(j),w=!0}}else if((R&33)===33){(m.nextSub!==void 0||m.prevSub!==void 0)&&(v={value:m,prev:v}),m=N.deps,b=N,++x;continue}if(!w){const j=m.nextDep;if(j!==void 0){m=j;continue}}for(;x--;){const j=b.subs,z=j.nextSub!==void 0;if(z?(m=v.value,v=v.prev):m=j,w){if(n(b)){z&&y(j),b=m.sub;continue}w=!1}else b.flags&=-33;b=m.sub;const A=m.nextDep;if(A!==void 0){m=A;continue e}}return w}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 p(m,b){let v=b.depsTail;for(;v!==void 0;){if(v===m)return!0;v=v.prevDep}return!1}}function Qj(n,s,l){var d,h,y;const r=typeof n=="object",c=r?n:void 0;return{next:(d=r?n.next:n)==null?void 0:d.bind(c),error:(h=r?n.error:s)==null?void 0:h.bind(c),complete:(y=r?n.complete:l)==null?void 0:y.bind(c)}}const $d=[];let Ec=0;const{link:av,unlink:Gj,propagate:Vj,checkDirty:_0,shallowPropagate:sv}=Hj({update(n){return n._update()},notify(n){$d[Wd++]=n,n.flags&=~We.Watching},unwatched(n){n.depsTail!==void 0&&(n.depsTail=void 0,n.flags=We.Mutable|We.Dirty,qc(n))}});let yc=0,Wd=0,Gn,eh=0;function E0(n){try{++eh,n()}finally{--eh||T0()}}function qc(n){const s=n.depsTail;let l=s!==void 0?s.nextDep:n.deps;for(;l!==void 0;)l=Gj(l,n)}function T0(){if(!(eh>0)){for(;yc<Wd;){const n=$d[yc];$d[yc++]=void 0,n.notify()}yc=0,Wd=0}}function iv(n,s){const l=typeof n=="function",r=n,c={_snapshot:l?void 0:n,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:l?We.None:We.Mutable,get(){return Gn!==void 0&&av(c,Gn,Ec),c._snapshot},subscribe(d){const h=Qj(d),y={current:!1},p=Yj(()=>{var m;c.get(),y.current?(m=h.next)==null||m.call(h,c._snapshot):y.current=!0});return{unsubscribe:()=>{p.stop()}}},_update(d){const h=Gn,y=(s==null?void 0:s.compare)??Object.is;if(l)Gn=c,++Ec,c.depsTail=void 0;else if(d===void 0)return!1;l&&(c.flags=We.Mutable|We.RecursedCheck);try{const p=c._snapshot,m=typeof d=="function"?d(p):d===void 0&&l?r(p):d;return p===void 0||!y(p,m)?(c._snapshot=m,!0):!1}finally{Gn=h,l&&(c.flags&=~We.RecursedCheck),qc(c)}}};return l?(c.flags=We.Mutable|We.Dirty,c.get=function(){const d=c.flags;if(d&We.Dirty||d&We.Pending&&_0(c.deps,c)){if(c._update()){const h=c.subs;h!==void 0&&sv(h)}}else d&We.Pending&&(c.flags=d&~We.Pending);return Gn!==void 0&&av(c,Gn,Ec),c._snapshot}):c.set=function(d){if(c._update(d)){const h=c.subs;h!==void 0&&(Vj(h),sv(h),T0())}},c}function Yj(n){const s=()=>{const r=Gn;Gn=l,++Ec,l.depsTail=void 0,l.flags=We.Watching|We.RecursedCheck;try{return n()}finally{Gn=r,l.flags&=~We.RecursedCheck,qc(l)}},l={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:We.Watching|We.RecursedCheck,notify(){const r=this.flags;r&We.Dirty||r&We.Pending&&_0(this.deps,this)?s():this.flags=We.Watching},stop(){this.flags=We.None,this.depsTail=void 0,qc(this)}};return s(),l}var yd={exports:{}},gd={},vd={exports:{}},bd={};/**
|
|
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 lv;function Pj(){if(lv)return bd;lv=1;var n=Vr();function s(v,x){return v===x&&(v!==0||1/v===1/x)||v!==v&&x!==x}var l=typeof Object.is=="function"?Object.is:s,r=n.useState,c=n.useEffect,d=n.useLayoutEffect,h=n.useDebugValue;function y(v,x){var w=x(),N=r({inst:{value:w,getSnapshot:x}}),R=N[0].inst,j=N[1];return d(function(){R.value=w,R.getSnapshot=x,p(R)&&j({inst:R})},[v,w,x]),c(function(){return p(R)&&j({inst:R}),v(function(){p(R)&&j({inst:R})})},[v]),h(w),w}function p(v){var x=v.getSnapshot;v=v.value;try{var w=x();return!l(v,w)}catch{return!0}}function m(v,x){return x()}var b=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:y;return bd.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:b,bd}var rv;function Kj(){return rv||(rv=1,vd.exports=Pj()),vd.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 ov;function Xj(){if(ov)return gd;ov=1;var n=Vr(),s=Kj();function l(m,b){return m===b&&(m!==0||1/m===1/b)||m!==m&&b!==b}var r=typeof Object.is=="function"?Object.is:l,c=s.useSyncExternalStore,d=n.useRef,h=n.useEffect,y=n.useMemo,p=n.useDebugValue;return gd.useSyncExternalStoreWithSelector=function(m,b,v,x,w){var N=d(null);if(N.current===null){var R={hasValue:!1,value:null};N.current=R}else R=N.current;N=y(function(){function z(U){if(!A){if(A=!0,B=U,U=x(U),w!==void 0&&R.hasValue){var k=R.value;if(w(k,U))return T=k}return T=U}if(k=T,r(B,U))return k;var O=x(U);return w!==void 0&&w(k,O)?(B=U,k):(B=U,T=O)}var A=!1,B,T,Q=v===void 0?null:v;return[function(){return z(b())},Q===null?void 0:function(){return z(Q())}]},[b,v,x,w]);var j=c(m,N[0],N[1]);return h(function(){R.hasValue=!0,R.value=j},[j]),p(j),j},gd}var cv;function Zj(){return cv||(cv=1,yd.exports=Xj()),yd.exports}var Fj=Zj();function Jj(n,s){return n===s}function $t(n,s,l=Jj){const r=V.useCallback(h=>{if(!n)return()=>{};const{unsubscribe:y}=n.subscribe(h);return y},[n]),c=V.useCallback(()=>n==null?void 0:n.get(),[n]);return Fj.useSyncExternalStoreWithSelector(r,c,c,s,l)}var Ij={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function fi(n){const s=hn(),l=V.useContext(n.from?qj:Pc),r=n.from??l,c=r?n.from?s.stores.getRouteMatchStore(r):s.stores.matchStores.get(r):void 0,d=V.useRef(void 0);return $t(c??Ij,h=>{if((n.shouldThrow??!0)&&!h&&wa(),h===void 0)return;const y=n.select?n.select(h):h;if(n.structuralSharing??s.options.defaultStructuralSharing){const p=ms(d.current,y);return d.current=p,p}return y})}function C0(n){return fi({from:n.from,strict:n.strict,structuralSharing:n.structuralSharing,select:s=>n.select?n.select(s.loaderData):s.loaderData})}function M0(n){const{select:s,...l}=n;return fi({...l,select:r=>s?s(r.loaderDeps):r.loaderDeps})}function A0(n){return fi({from:n.from,shouldThrow:n.shouldThrow,structuralSharing:n.structuralSharing,strict:n.strict,select:s=>{const l=n.strict===!1?s.params:s._strictParams;return n.select?n.select(l):l}})}function O0(n){return fi({from:n.from,strict:n.strict,shouldThrow:n.shouldThrow,structuralSharing:n.structuralSharing,select:s=>n.select?n.select(s.search):s.search})}function z0(n){const s=hn();return V.useCallback(l=>s.navigate({...l,from:l.from??(n==null?void 0:n.from)}),[n==null?void 0:n.from,s])}function k0(n){return fi({...n,select:s=>n.select?n.select(s.context):s.context})}var xd={exports:{}},Et={};/**
|
|
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 uv;function $j(){if(uv)return Et;uv=1;var n=Vr();function s(p){var m="https://react.dev/errors/"+p;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 #"+p+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(){}var r={d:{f:l,r:function(){throw Error(s(522))},D:l,C:l,L:l,m:l,X:l,S:l,M:l},p:0,findDOMNode:null},c=Symbol.for("react.portal");function d(p,m,b){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:v==null?null:""+v,children:p,containerInfo:m,implementation:b}}var h=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function y(p,m){if(p==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return Et.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Et.createPortal=function(p,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 d(p,m,null,b)},Et.flushSync=function(p){var m=h.T,b=r.p;try{if(h.T=null,r.p=2,p)return p()}finally{h.T=m,r.p=b,r.d.f()}},Et.preconnect=function(p,m){typeof p=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,r.d.C(p,m))},Et.prefetchDNS=function(p){typeof p=="string"&&r.d.D(p)},Et.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var b=m.as,v=y(b,m.crossOrigin),x=typeof m.integrity=="string"?m.integrity:void 0,w=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;b==="style"?r.d.S(p,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:v,integrity:x,fetchPriority:w}):b==="script"&&r.d.X(p,{crossOrigin:v,integrity:x,fetchPriority:w,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Et.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var b=y(m.as,m.crossOrigin);r.d.M(p,{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(p)},Et.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var b=m.as,v=y(b,m.crossOrigin);r.d.L(p,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})}},Et.preloadModule=function(p,m){if(typeof p=="string")if(m){var b=y(m.as,m.crossOrigin);r.d.m(p,{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(p)},Et.requestFormReset=function(p){r.d.r(p)},Et.unstable_batchedUpdates=function(p,m){return p(m)},Et.useFormState=function(p,m,b){return h.H.useFormState(p,m,b)},Et.useFormStatus=function(){return h.H.useHostTransitionStatus()},Et.version="19.2.6",Et}var fv;function D0(){if(fv)return xd.exports;fv=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(),xd.exports=$j(),xd.exports}var Wj=D0();function ew(n,s){const l=hn(),r=DS(s),{activeProps:c,inactiveProps:d,activeOptions:h,to:y,preload:p,preloadDelay:m,preloadIntentProximity:b,hashScrollIntoView:v,replace:x,startTransition:w,resetScroll:N,viewTransition:R,children:j,target:z,disabled:A,style:B,className:T,onClick:Q,onBlur:U,onFocus:k,onMouseEnter:O,onMouseLeave:P,onTouchStart:$,ignoreBlocker:W,params:Z,search:te,hash:ee,state:he,mask:L,reloadDocument:K,unsafeRelative:ue,from:Oe,_fromLocation:ne,...C}=n,J=N0(),ae=V.useMemo(()=>n,[l,n.from,n._fromLocation,n.hash,n.to,n.search,n.params,n.state,n.mask,n.unsafeRelative]),se=$t(l.stores.location,Ye=>Ye,(Ye,bt)=>Ye.href===bt.href),ie=V.useMemo(()=>{const Ye={_fromLocation:se,...ae};return l.buildLocation(Ye)},[l,se,ae]),me=ie.maskedLocation?ie.maskedLocation.publicHref:ie.publicHref,Re=ie.maskedLocation?ie.maskedLocation.external:ie.external,Ve=V.useMemo(()=>lw(me,Re,l.history,A),[A,Re,me,l.history]),ge=V.useMemo(()=>{if(Ve!=null&&Ve.external)return Dc(Ve.href,l.protocolAllowlist)?void 0:Ve.href;if(!rw(y)&&!(typeof y!="string"||y.indexOf(":")===-1))try{return new URL(y),Dc(y,l.protocolAllowlist)?void 0:y}catch{}},[y,Ve,l.protocolAllowlist]),mn=V.useMemo(()=>{if(ge)return!1;if(h!=null&&h.exact){if(!$S(se.pathname,ie.pathname,l.basepath))return!1}else{const Ye=Uc(se.pathname,l.basepath),bt=Uc(ie.pathname,l.basepath);if(!(Ye.startsWith(bt)&&(Ye.length===bt.length||Ye[bt.length]==="/")))return!1}return((h==null?void 0:h.includeSearch)??!0)&&!li(se.search,ie.search,{partial:!(h!=null&&h.exact),ignoreUndefined:!(h!=null&&h.explicitUndefined)})?!1:h!=null&&h.includeHash?J&&se.hash===ie.hash:!0},[h==null?void 0:h.exact,h==null?void 0:h.explicitUndefined,h==null?void 0:h.includeHash,h==null?void 0:h.includeSearch,se,ge,J,ie.hash,ie.pathname,ie.search,l.basepath]),Bt=mn?Fs(c,{})??tw:Sd,Wt=mn?Sd:Fs(d,{})??Sd,Jn=[T,Bt.className,Wt.className].filter(Boolean).join(" "),At=(B||Bt.style||Wt.style)&&{...B,...Bt.style,...Wt.style},[_l,mi]=V.useState(!1),Kr=V.useRef(!1),In=n.reloadDocument||ge?!1:p??l.options.defaultPreload,Ns=m??l.options.defaultPreloadDelay??0,En=V.useCallback(()=>{l.preloadRoute({...ae,_builtLocation:ie}).catch(Ye=>{console.warn(Ye),console.warn(kj)})},[l,ae,ie]);kS(r,V.useCallback(Ye=>{Ye!=null&&Ye.isIntersecting&&En()},[En]),iw,{disabled:!!A||In!=="viewport"}),V.useEffect(()=>{Kr.current||!A&&In==="render"&&(En(),Kr.current=!0)},[A,En,In]);const El=Ye=>{const bt=Ye.currentTarget.getAttribute("target"),Un=z!==void 0?z:bt;if(!A&&!ow(Ye)&&!Ye.defaultPrevented&&(!Un||Un==="_self")&&Ye.button===0){Ye.preventDefault(),Wj.flushSync(()=>{mi(!0)});const pi=l.subscribe("onResolved",()=>{pi(),mi(!1)});l.navigate({...ae,replace:x,resetScroll:N,hashScrollIntoView:v,startTransition:w,viewTransition:R,ignoreBlocker:W})}};if(ge)return{...C,ref:r,href:ge,...j&&{children:j},...z&&{target:z},...A&&{disabled:A},...B&&{style:B},...T&&{className:T},...Q&&{onClick:Q},...U&&{onBlur:U},...k&&{onFocus:k},...O&&{onMouseEnter:O},...P&&{onMouseLeave:P},...$&&{onTouchStart:$}};const Xr=Ye=>{if(A||In!=="intent")return;if(!Ns){En();return}const bt=Ye.currentTarget;if(wr.has(bt))return;const Un=setTimeout(()=>{wr.delete(bt),En()},Ns);wr.set(bt,Un)},Kc=Ye=>{A||In!=="intent"||En()},_t=Ye=>{if(A||!In||!Ns)return;const bt=Ye.currentTarget,Un=wr.get(bt);Un&&(clearTimeout(Un),wr.delete(bt))};return{...C,...Bt,...Wt,href:Ve==null?void 0:Ve.href,ref:r,onClick:el([Q,El]),onBlur:el([U,_t]),onFocus:el([k,Xr]),onMouseEnter:el([O,Xr]),onMouseLeave:el([P,_t]),onTouchStart:el([$,Kc]),disabled:!!A,target:z,...At&&{style:At},...Jn&&{className:Jn},...A&&nw,...mn&&aw,...J&&_l&&sw}}var Sd={},tw={className:"active"},nw={role:"link","aria-disabled":!0},aw={"data-status":"active","aria-current":"page"},sw={"data-transitioning":"transitioning"},wr=new WeakMap,iw={rootMargin:"100px"},el=n=>s=>{for(const l of n)if(l){if(s.defaultPrevented)return;l(s)}};function lw(n,s,l,r){if(!r)return s?{href:n,external:!0}:{href:l.createHref(n)||"/",external:!1}}function rw(n){if(typeof n!="string")return!1;const s=n.charCodeAt(0);return s===47?n.charCodeAt(1)!==47:s===46}var Sl=V.forwardRef((n,s)=>{const{_asChild:l,...r}=n,{type:c,...d}=ew(r,s),h=typeof r.children=="function"?r.children({isActive:d["data-status"]==="active"}):r.children;if(!l){const{disabled:y,...p}=d;return V.createElement("a",p,h)}return V.createElement(l,d,h)});function ow(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}var cw=class extends w0{constructor(n){super(n),this.useMatch=s=>fi({select:s==null?void 0:s.select,from:this.id,structuralSharing:s==null?void 0:s.structuralSharing}),this.useRouteContext=s=>k0({...s,from:this.id}),this.useSearch=s=>O0({select:s==null?void 0:s.select,structuralSharing:s==null?void 0:s.structuralSharing,from:this.id}),this.useParams=s=>A0({select:s==null?void 0:s.select,structuralSharing:s==null?void 0:s.structuralSharing,from:this.id}),this.useLoaderDeps=s=>M0({...s,from:this.id}),this.useLoaderData=s=>C0({...s,from:this.id}),this.useNavigate=()=>z0({from:this.fullPath}),this.Link=zr.forwardRef((s,l)=>u.jsx(Sl,{ref:l,from:this.fullPath,...s}))}};function Xn(n){return new cw(n)}var uw=class extends Dj{constructor(n){super(n),this.useMatch=s=>fi({select:s==null?void 0:s.select,from:this.id,structuralSharing:s==null?void 0:s.structuralSharing}),this.useRouteContext=s=>k0({...s,from:this.id}),this.useSearch=s=>O0({select:s==null?void 0:s.select,structuralSharing:s==null?void 0:s.structuralSharing,from:this.id}),this.useParams=s=>A0({select:s==null?void 0:s.select,structuralSharing:s==null?void 0:s.structuralSharing,from:this.id}),this.useLoaderDeps=s=>M0({...s,from:this.id}),this.useLoaderData=s=>C0({...s,from:this.id}),this.useNavigate=()=>z0({from:this.fullPath}),this.Link=zr.forwardRef((s,l)=>u.jsx(Sl,{ref:l,from:this.fullPath,...s}))}};function fw(n){return new uw(n)}function dw(n){const s=hn(),l=`not-found-${$t(s.stores.location,r=>r.pathname)}-${$t(s.stores.status,r=>r)}`;return u.jsx(gh,{getResetKey:()=>l,onCatch:(r,c)=>{var d;if(Ct(r))(d=n.onCatch)==null||d.call(n,r,c);else throw r},errorComponent:({error:r})=>{var c;if(Ct(r))return(c=n.fallback)==null?void 0:c.call(n,r);throw r},children:n.children})}function hw(){return u.jsx("p",{children:"Not Found"})}function sl(n){return u.jsx(u.Fragment,{children:n.children})}function U0(n,s,l){return s.options.notFoundComponent?u.jsx(s.options.notFoundComponent,{...l}):n.options.defaultNotFoundComponent?u.jsx(n.options.defaultNotFoundComponent,{...l}):u.jsx(hw,{})}function mw(n){return null}function pw(){return mw(hn()),null}var L0=V.memo(function({matchId:s}){const l=hn(),r=l.stores.matchStores.get(s);r||wa();const c=$t(l.stores.loadedAt,h=>h),d=$t(r,h=>h);return u.jsx(yw,{router:l,matchId:s,resetKey:c,matchState:V.useMemo(()=>{var p;const h=d.routeId,y=(p=l.routesById[h].parentRoute)==null?void 0:p.id;return{routeId:h,ssr:d.ssr,_displayPending:d._displayPending,parentRouteId:y}},[d._displayPending,d.routeId,d.ssr,l.routesById])})});function yw({router:n,matchId:s,resetKey:l,matchState:r}){var N,R;const c=n.routesById[r.routeId],d=c.options.pendingComponent??n.options.defaultPendingComponent,h=d?u.jsx(d,{}):null,y=c.options.errorComponent??n.options.defaultErrorComponent,p=c.options.onCatch??n.options.defaultOnCatch,m=c.isRoot?c.options.notFoundComponent??((N=n.options.notFoundRoute)==null?void 0:N.options.component):c.options.notFoundComponent,b=r.ssr===!1||r.ssr==="data-only",v=(!c.isRoot||c.options.wrapInSuspense||b)&&(c.options.wrapInSuspense??d??(((R=c.options.errorComponent)==null?void 0:R.preload)||b))?V.Suspense:sl,x=y?gh:sl,w=m?dw:sl;return u.jsxs(c.isRoot?c.options.shellComponent??sl:sl,{children:[u.jsx(Pc.Provider,{value:s,children:u.jsx(v,{fallback:h,children:u.jsx(x,{getResetKey:()=>l,errorComponent:y||vh,onCatch:(j,z)=>{if(Ct(j))throw j.routeId??(j.routeId=r.routeId),j;p==null||p(j,z)},children:u.jsx(w,{fallback:j=>{if(j.routeId??(j.routeId=r.routeId),!m||j.routeId&&j.routeId!==r.routeId||!j.routeId&&!c.isRoot)throw j;return V.createElement(m,j)},children:b||r._displayPending?u.jsx(Lj,{fallback:h,children:u.jsx(dv,{matchId:s})}):u.jsx(dv,{matchId:s})})})})}),r.parentRouteId===ri?u.jsxs(u.Fragment,{children:[u.jsx(gw,{resetKey:l}),n.options.scrollRestoration&&c0?u.jsx(pw,{}):null]}):null]})}function gw({resetKey:n}){const s=hn(),l=V.useRef(void 0);return Mr(()=>{const r=s.latestLocation.href;(l.current===void 0||l.current!==r)&&(s.emit({type:"onRendered",...il(s.stores.location.get(),s.stores.resolvedLocation.get())}),l.current=r)},[s.latestLocation.state.__TSR_key,n,s]),null}var dv=V.memo(function({matchId:s}){const l=hn(),r=(b,v)=>{var x;return((x=l.getMatch(b.id))==null?void 0:x._nonReactive[v])??b._nonReactive[v]},c=l.stores.matchStores.get(s);c||wa();const d=$t(c,b=>b),h=d.routeId,y=l.routesById[h],p=V.useMemo(()=>{var v;const b=(v=l.routesById[h].options.remountDeps??l.options.defaultRemountDeps)==null?void 0:v({routeId:h,loaderDeps:d.loaderDeps,params:d._strictParams,search:d._strictSearch});return b?JSON.stringify(b):void 0},[h,d.loaderDeps,d._strictParams,d._strictSearch,l.options.defaultRemountDeps,l.routesById]),m=V.useMemo(()=>{const b=y.options.component??l.options.defaultComponent;return b?u.jsx(b,{},p):u.jsx(B0,{})},[p,y.options.component,l.options.defaultComponent]);if(d._displayPending)throw r(d,"displayPendingPromise");if(d._forcePending)throw r(d,"minPendingPromise");if(d.status==="pending"){const b=y.options.pendingMinMs??l.options.defaultPendingMinMs;if(b){const v=l.getMatch(d.id);if(v&&!v._nonReactive.minPendingPromise){const x=xl();v._nonReactive.minPendingPromise=x,setTimeout(()=>{x.resolve(),v._nonReactive.minPendingPromise=void 0},b)}}throw r(d,"loadPromise")}if(d.status==="notFound")return Ct(d.error)||wa(),U0(l,y,d.error);if(d.status==="redirected")throw Zt(d.error)||wa(),r(d,"loadPromise");if(d.status==="error")throw d.error;return m}),B0=V.memo(function(){const s=hn(),l=V.useContext(Pc);let r,c=!1,d;{const m=l?s.stores.matchStores.get(l):void 0;[r,c]=$t(m,b=>[b==null?void 0:b.routeId,(b==null?void 0:b.globalNotFound)??!1]),d=$t(s.stores.matchesId,b=>b[b.findIndex(v=>v===l)+1])}const h=r?s.routesById[r]:void 0,y=s.options.defaultPendingComponent?u.jsx(s.options.defaultPendingComponent,{}):null;if(c)return h||wa(),U0(s,h,void 0);if(!d)return null;const p=u.jsx(L0,{matchId:d});return r===ri?u.jsx(V.Suspense,{fallback:y,children:p}):p});function vw(){const n=hn(),s=V.useRef({router:n,mounted:!1}),[l,r]=V.useState(!1),c=$t(n.stores.isLoading,v=>v),d=$t(n.stores.hasPending,v=>v),h=cd(c),y=c||l||d,p=cd(y),m=c||d,b=cd(m);return n.startTransition=v=>{r(!0),V.startTransition(()=>{v(),r(!1)})},V.useEffect(()=>{const v=n.history.subscribe(n.load),x=n.buildLocation({to:n.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return ja(n.latestLocation.publicHref)!==ja(x.publicHref)&&n.commitLocation({...x,replace:!0}),()=>{v()}},[n,n.history]),Mr(()=>{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(x){console.error(x)}})()},[n]),Mr(()=>{h&&!c&&n.emit({type:"onLoad",...il(n.stores.location.get(),n.stores.resolvedLocation.get())})},[h,n,c]),Mr(()=>{b&&!m&&n.emit({type:"onBeforeRouteMount",...il(n.stores.location.get(),n.stores.resolvedLocation.get())})},[m,b,n]),Mr(()=>{if(p&&!y){const v=il(n.stores.location.get(),n.stores.resolvedLocation.get());n.emit({type:"onResolved",...v}),E0(()=>{n.stores.status.set("idle"),n.stores.resolvedLocation.set(n.stores.location.get())})}},[y,p,n]),null}function bw(){const n=hn(),s=n.routesById[ri].options.pendingComponent??n.options.defaultPendingComponent,l=s?u.jsx(s,{}):null,r=u.jsxs(typeof document<"u"&&n.ssr?sl:V.Suspense,{fallback:l,children:[u.jsx(vw,{}),u.jsx(xw,{})]});return n.options.InnerWrap?u.jsx(n.options.InnerWrap,{children:r}):r}function xw(){const n=hn(),s=$t(n.stores.firstId,c=>c),l=$t(n.stores.loadedAt,c=>c),r=s?u.jsx(L0,{matchId:s}):null;return u.jsx(Pc.Provider,{value:s,children:n.options.disableGlobalCatchBoundary?r:u.jsx(gh,{getResetKey:()=>l,errorComponent:vh,onCatch:void 0,children:r})})}var Sw=n=>({createMutableStore:iv,createReadonlyStore:iv,batch:E0}),jw=n=>new ww(n),ww=class extends xj{constructor(n){super(n,Sw)}};function Nw({router:n,children:s,...l}){f0(l)&&n.update({...n.options,...l,context:{...n.options.context,...l.context}});const r=u.jsx(R0.Provider,{value:n,children:s});return n.options.Wrap?u.jsx(n.options.Wrap,{children:r}):r}function Rw({router:n,...s}){return u.jsx(Nw,{router:n,...s,children:u.jsx(bw,{})})}function _w(n){const s=hn({warn:(n==null?void 0:n.router)===void 0}),l=(n==null?void 0:n.router)||s,r=V.useRef(void 0);return $t(l.stores.__store,c=>{if(n!=null&&n.select){if(n.structuralSharing??l.options.defaultStructuralSharing){const d=ms(r.current,n.select(c));return r.current=d,d}return n.select(c)}return c})}var jd={exports:{}},Nr={},wd={exports:{}},Nd={};/**
|
|
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 hv;function Ew(){return hv||(hv=1,(function(n){function s(L,K){var ue=L.length;L.push(K);e:for(;0<ue;){var Oe=ue-1>>>1,ne=L[Oe];if(0<c(ne,K))L[Oe]=K,L[ue]=ne,ue=Oe;else break e}}function l(L){return L.length===0?null:L[0]}function r(L){if(L.length===0)return null;var K=L[0],ue=L.pop();if(ue!==K){L[0]=ue;e:for(var Oe=0,ne=L.length,C=ne>>>1;Oe<C;){var J=2*(Oe+1)-1,ae=L[J],se=J+1,ie=L[se];if(0>c(ae,ue))se<ne&&0>c(ie,ae)?(L[Oe]=ie,L[se]=ue,Oe=se):(L[Oe]=ae,L[J]=ue,Oe=J);else if(se<ne&&0>c(ie,ue))L[Oe]=ie,L[se]=ue,Oe=se;else break e}}return K}function c(L,K){var ue=L.sortIndex-K.sortIndex;return ue!==0?ue:L.id-K.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;n.unstable_now=function(){return d.now()}}else{var h=Date,y=h.now();n.unstable_now=function(){return h.now()-y}}var p=[],m=[],b=1,v=null,x=3,w=!1,N=!1,R=!1,j=!1,z=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,B=typeof setImmediate<"u"?setImmediate:null;function T(L){for(var K=l(m);K!==null;){if(K.callback===null)r(m);else if(K.startTime<=L)r(m),K.sortIndex=K.expirationTime,s(p,K);else break;K=l(m)}}function Q(L){if(R=!1,T(L),!N)if(l(p)!==null)N=!0,U||(U=!0,Z());else{var K=l(m);K!==null&&he(Q,K.startTime-L)}}var U=!1,k=-1,O=5,P=-1;function $(){return j?!0:!(n.unstable_now()-P<O)}function W(){if(j=!1,U){var L=n.unstable_now();P=L;var K=!0;try{e:{N=!1,R&&(R=!1,A(k),k=-1),w=!0;var ue=x;try{t:{for(T(L),v=l(p);v!==null&&!(v.expirationTime>L&&$());){var Oe=v.callback;if(typeof Oe=="function"){v.callback=null,x=v.priorityLevel;var ne=Oe(v.expirationTime<=L);if(L=n.unstable_now(),typeof ne=="function"){v.callback=ne,T(L),K=!0;break t}v===l(p)&&r(p),T(L)}else r(p);v=l(p)}if(v!==null)K=!0;else{var C=l(m);C!==null&&he(Q,C.startTime-L),K=!1}}break e}finally{v=null,x=ue,w=!1}K=void 0}}finally{K?Z():U=!1}}}var Z;if(typeof B=="function")Z=function(){B(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(){z(W,0)};function he(L,K){k=z(function(){L(n.unstable_now())},K)}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"):O=0<L?Math.floor(1e3/L):5},n.unstable_getCurrentPriorityLevel=function(){return x},n.unstable_next=function(L){switch(x){case 1:case 2:case 3:var K=3;break;default:K=x}var ue=x;x=K;try{return L()}finally{x=ue}},n.unstable_requestPaint=function(){j=!0},n.unstable_runWithPriority=function(L,K){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var ue=x;x=L;try{return K()}finally{x=ue}},n.unstable_scheduleCallback=function(L,K,ue){var Oe=n.unstable_now();switch(typeof ue=="object"&&ue!==null?(ue=ue.delay,ue=typeof ue=="number"&&0<ue?Oe+ue:Oe):ue=Oe,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=ue+ne,L={id:b++,callback:K,priorityLevel:L,startTime:ue,expirationTime:ne,sortIndex:-1},ue>Oe?(L.sortIndex=ue,s(m,L),l(p)===null&&L===l(m)&&(R?(A(k),k=-1):R=!0,he(Q,ue-Oe))):(L.sortIndex=ne,s(p,L),N||w||(N=!0,U||(U=!0,Z()))),L},n.unstable_shouldYield=$,n.unstable_wrapCallback=function(L){var K=x;return function(){var ue=x;x=K;try{return L.apply(this,arguments)}finally{x=ue}}}})(Nd)),Nd}var mv;function Tw(){return mv||(mv=1,wd.exports=Ew()),wd.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 pv;function Cw(){if(pv)return Nr;pv=1;var n=Tw(),s=Vr(),l=D0();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 c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function d(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 h(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 p(e){if(d(e)!==e)throw Error(r(188))}function m(e){var t=e.alternate;if(!t){if(t=d(e),t===null)throw Error(r(188));return t!==e?null:e}for(var a=e,i=t;;){var o=a.return;if(o===null)break;var f=o.alternate;if(f===null){if(i=o.return,i!==null){a=i;continue}break}if(o.child===f.child){for(f=o.child;f;){if(f===a)return p(o),e;if(f===i)return p(o),t;f=f.sibling}throw Error(r(188))}if(a.return!==i.return)a=o,i=f;else{for(var g=!1,S=o.child;S;){if(S===a){g=!0,a=o,i=f;break}if(S===i){g=!0,i=o,a=f;break}S=S.sibling}if(!g){for(S=f.child;S;){if(S===a){g=!0,a=f,i=o;break}if(S===i){g=!0,i=f,a=o;break}S=S.sibling}if(!g)throw Error(r(189))}}if(a.alternate!==i)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,x=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),j=Symbol.for("react.strict_mode"),z=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),B=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),Q=Symbol.for("react.suspense"),U=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),P=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 R:return"Fragment";case z:return"Profiler";case j:return"StrictMode";case Q:return"Suspense";case U:return"SuspenseList";case P:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case N:return"Portal";case B:return e.displayName||"Context";case A:return(e._context.displayName||"Context")+".Consumer";case T:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case k:return t=e.displayName||null,t!==null?t:ee(e.type)||"Memo";case O: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,K=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ue={pending:!1,data:null,method:null,action:null},Oe=[],ne=-1;function C(e){return{current:e}}function J(e){0>ne||(e.current=Oe[ne],Oe[ne]=null,ne--)}function ae(e,t){ne++,Oe[ne]=e.current,e.current=t}var se=C(null),ie=C(null),me=C(null),Re=C(null);function Ve(e,t){switch(ae(me,t),ae(ie,e),ae(se,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Ky(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Ky(t),e=Xy(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}J(se),ae(se,e)}function ge(){J(se),J(ie),J(me)}function mn(e){e.memoizedState!==null&&ae(Re,e);var t=se.current,a=Xy(t,e.type);t!==a&&(ae(ie,e),ae(se,a))}function Bt(e){ie.current===e&&(J(se),J(ie)),Re.current===e&&(J(Re),yr._currentValue=ue)}var Wt,Jn;function At(e){if(Wt===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Wt=t&&t[1]||"",Jn=-1<a.stack.indexOf(`
|
|
58
|
-
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
59
|
-
`+Wt+e+Jn}var _l=!1;function mi(e,t){if(!e||_l)return"";_l=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var i={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]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=i.DetermineComponentFrameRoot(),g=f[0],S=f[1];if(g&&S){var _=g.split(`
|
|
60
|
-
`),H=S.split(`
|
|
61
|
-
`);for(o=i=0;i<_.length&&!_[i].includes("DetermineComponentFrameRoot");)i++;for(;o<H.length&&!H[o].includes("DetermineComponentFrameRoot");)o++;if(i===_.length||o===H.length)for(i=_.length-1,o=H.length-1;1<=i&&0<=o&&_[i]!==H[o];)o--;for(;1<=i&&0<=o;i--,o--)if(_[i]!==H[o]){if(i!==1||o!==1)do if(i--,o--,0>o||_[i]!==H[o]){var X=`
|
|
62
|
-
`+_[i].replace(" at new "," at ");return e.displayName&&X.includes("<anonymous>")&&(X=X.replace("<anonymous>",e.displayName)),X}while(1<=i&&0<=o);break}}}finally{_l=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?At(a):""}function Kr(e,t){switch(e.tag){case 26:case 27:case 5:return At(e.type);case 16:return At("Lazy");case 13:return e.child!==t&&t!==null?At("Suspense Fallback"):At("Suspense");case 19:return At("SuspenseList");case 0:case 15:return mi(e.type,!1);case 11:return mi(e.type.render,!1);case 1:return mi(e.type,!0);case 31:return At("Activity");default:return""}}function In(e){try{var t="",a=null;do t+=Kr(e,a),a=e,e=e.return;while(e);return t}catch(i){return`
|
|
63
|
-
Error generating stack: `+i.message+`
|
|
64
|
-
`+i.stack}}var Ns=Object.prototype.hasOwnProperty,En=n.unstable_scheduleCallback,El=n.unstable_cancelCallback,Xr=n.unstable_shouldYield,Kc=n.unstable_requestPaint,_t=n.unstable_now,Ye=n.unstable_getCurrentPriorityLevel,bt=n.unstable_ImmediatePriority,Un=n.unstable_UserBlockingPriority,pi=n.unstable_NormalPriority,Rb=n.unstable_LowPriority,_h=n.unstable_IdlePriority,_b=n.log,Eb=n.unstable_setDisableYieldValue,Tl=null,en=null;function Ea(e){if(typeof _b=="function"&&Eb(e),en&&typeof en.setStrictMode=="function")try{en.setStrictMode(Tl,e)}catch{}}var tn=Math.clz32?Math.clz32:Mb,Tb=Math.log,Cb=Math.LN2;function Mb(e){return e>>>=0,e===0?32:31-(Tb(e)/Cb|0)|0}var Zr=256,Fr=262144,Jr=4194304;function Rs(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 Ir(e,t,a){var i=e.pendingLanes;if(i===0)return 0;var o=0,f=e.suspendedLanes,g=e.pingedLanes;e=e.warmLanes;var S=i&134217727;return S!==0?(i=S&~f,i!==0?o=Rs(i):(g&=S,g!==0?o=Rs(g):a||(a=S&~e,a!==0&&(o=Rs(a))))):(S=i&~f,S!==0?o=Rs(S):g!==0?o=Rs(g):a||(a=i&~e,a!==0&&(o=Rs(a)))),o===0?0:t!==0&&t!==o&&(t&f)===0&&(f=o&-o,a=t&-t,f>=a||f===32&&(a&4194048)!==0)?t:o}function Cl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ab(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 Eh(){var e=Jr;return Jr<<=1,(Jr&62914560)===0&&(Jr=4194304),e}function Xc(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Ml(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ob(e,t,a,i,o,f){var g=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 S=e.entanglements,_=e.expirationTimes,H=e.hiddenUpdates;for(a=g&~a;0<a;){var X=31-tn(a),I=1<<X;S[X]=0,_[X]=-1;var G=H[X];if(G!==null)for(H[X]=null,X=0;X<G.length;X++){var Y=G[X];Y!==null&&(Y.lane&=-536870913)}a&=~I}i!==0&&Th(e,i,0),f!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=f&~(g&~t))}function Th(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var i=31-tn(t);e.entangledLanes|=t,e.entanglements[i]=e.entanglements[i]|1073741824|a&261930}function Ch(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var i=31-tn(a),o=1<<i;o&t|e[i]&t&&(e[i]|=t),a&=~o}}function Mh(e,t){var a=t&-t;return a=(a&42)!==0?1:Zc(a),(a&(e.suspendedLanes|t))!==0?0:a}function Zc(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 Fc(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Ah(){var e=K.p;return e!==0?e:(e=window.event,e===void 0?32:yg(e.type))}function Oh(e,t){var a=K.p;try{return K.p=e,t()}finally{K.p=a}}var Ta=Math.random().toString(36).slice(2),xt="__reactFiber$"+Ta,qt="__reactProps$"+Ta,yi="__reactContainer$"+Ta,Jc="__reactEvents$"+Ta,zb="__reactListeners$"+Ta,kb="__reactHandles$"+Ta,zh="__reactResources$"+Ta,Al="__reactMarker$"+Ta;function Ic(e){delete e[xt],delete e[qt],delete e[Jc],delete e[zb],delete e[kb]}function gi(e){var t=e[xt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[yi]||a[xt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=eg(e);e!==null;){if(a=e[xt])return a;e=eg(e)}return t}e=a,a=e.parentNode}return null}function vi(e){if(e=e[xt]||e[yi]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ol(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function bi(e){var t=e[zh];return t||(t=e[zh]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function pt(e){e[Al]=!0}var kh=new Set,Dh={};function _s(e,t){xi(e,t),xi(e+"Capture",t)}function xi(e,t){for(Dh[e]=t,e=0;e<t.length;e++)kh.add(t[e])}var Db=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]*$"),Uh={},Lh={};function Ub(e){return Ns.call(Lh,e)?!0:Ns.call(Uh,e)?!1:Db.test(e)?Lh[e]=!0:(Uh[e]=!0,!1)}function $r(e,t,a){if(Ub(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var i=t.toLowerCase().slice(0,5);if(i!=="data-"&&i!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function Wr(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 $n(e,t,a,i){if(i===null)e.removeAttribute(a);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+i)}}function pn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Bh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Lb(e,t,a){var i=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var o=i.get,f=i.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(g){a=""+g,f.call(this,g)}}),Object.defineProperty(e,t,{enumerable:i.enumerable}),{getValue:function(){return a},setValue:function(g){a=""+g},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function $c(e){if(!e._valueTracker){var t=Bh(e)?"checked":"value";e._valueTracker=Lb(e,t,""+e[t])}}function qh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),i="";return e&&(i=Bh(e)?e.checked?"true":"false":e.value),e=i,e!==a?(t.setValue(e),!0):!1}function eo(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 Bb=/[\n"\\]/g;function yn(e){return e.replace(Bb,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Wc(e,t,a,i,o,f,g,S){e.name="",g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?e.type=g:e.removeAttribute("type"),t!=null?g==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+pn(t)):e.value!==""+pn(t)&&(e.value=""+pn(t)):g!=="submit"&&g!=="reset"||e.removeAttribute("value"),t!=null?eu(e,g,pn(t)):a!=null?eu(e,g,pn(a)):i!=null&&e.removeAttribute("value"),o==null&&f!=null&&(e.defaultChecked=!!f),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?e.name=""+pn(S):e.removeAttribute("name")}function Hh(e,t,a,i,o,f,g,S){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.type=f),t!=null||a!=null){if(!(f!=="submit"&&f!=="reset"||t!=null)){$c(e);return}a=a!=null?""+pn(a):"",t=t!=null?""+pn(t):a,S||t===e.value||(e.value=t),e.defaultValue=t}i=i??o,i=typeof i!="function"&&typeof i!="symbol"&&!!i,e.checked=S?e.checked:!!i,e.defaultChecked=!!i,g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(e.name=g),$c(e)}function eu(e,t,a){t==="number"&&eo(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Si(e,t,a,i){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&&i&&(e[a].defaultSelected=!0)}else{for(a=""+pn(a),t=null,o=0;o<e.length;o++){if(e[o].value===a){e[o].selected=!0,i&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Qh(e,t,a){if(t!=null&&(t=""+pn(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+pn(a):""}function Gh(e,t,a,i){if(t==null){if(i!=null){if(a!=null)throw Error(r(92));if(he(i)){if(1<i.length)throw Error(r(93));i=i[0]}a=i}a==null&&(a=""),t=a}a=pn(t),e.defaultValue=a,i=e.textContent,i===a&&i!==""&&i!==null&&(e.value=i),$c(e)}function ji(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var qb=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 Vh(e,t,a){var i=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?i?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":i?e.setProperty(t,a):typeof a!="number"||a===0||qb.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Yh(e,t,a){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,a!=null){for(var i in a)!a.hasOwnProperty(i)||t!=null&&t.hasOwnProperty(i)||(i.indexOf("--")===0?e.setProperty(i,""):i==="float"?e.cssFloat="":e[i]="");for(var o in t)i=t[o],t.hasOwnProperty(o)&&a[o]!==i&&Vh(e,o,i)}else for(var f in t)t.hasOwnProperty(f)&&Vh(e,f,t[f])}function tu(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 Hb=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"]]),Qb=/^[\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 to(e){return Qb.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Wn(){}var nu=null;function au(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var wi=null,Ni=null;function Ph(e){var t=vi(e);if(t&&(e=t.stateNode)){var a=e[qt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Wc(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="'+yn(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var i=a[t];if(i!==e&&i.form===e.form){var o=i[qt]||null;if(!o)throw Error(r(90));Wc(i,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<a.length;t++)i=a[t],i.form===e.form&&qh(i)}break e;case"textarea":Qh(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&Si(e,!!a.multiple,t,!1)}}}var su=!1;function Kh(e,t,a){if(su)return e(t,a);su=!0;try{var i=e(t);return i}finally{if(su=!1,(wi!==null||Ni!==null)&&(Vo(),wi&&(t=wi,e=Ni,Ni=wi=null,Ph(t),e)))for(t=0;t<e.length;t++)Ph(e[t])}}function zl(e,t){var a=e.stateNode;if(a===null)return null;var i=a[qt]||null;if(i===null)return null;a=i[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":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(r(231,t,typeof a));return a}var ea=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),iu=!1;if(ea)try{var kl={};Object.defineProperty(kl,"passive",{get:function(){iu=!0}}),window.addEventListener("test",kl,kl),window.removeEventListener("test",kl,kl)}catch{iu=!1}var Ca=null,lu=null,no=null;function Xh(){if(no)return no;var e,t=lu,a=t.length,i,o="value"in Ca?Ca.value:Ca.textContent,f=o.length;for(e=0;e<a&&t[e]===o[e];e++);var g=a-e;for(i=1;i<=g&&t[a-i]===o[f-i];i++);return no=o.slice(e,1<i?1-i:void 0)}function ao(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 so(){return!0}function Zh(){return!1}function Ht(e){function t(a,i,o,f,g){this._reactName=a,this._targetInst=o,this.type=i,this.nativeEvent=f,this.target=g,this.currentTarget=null;for(var S in e)e.hasOwnProperty(S)&&(a=e[S],this[S]=a?a(f):f[S]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?so:Zh,this.isPropagationStopped=Zh,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=so)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=so)},persist:function(){},isPersistent:so}),t}var Es={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},io=Ht(Es),Dl=v({},Es,{view:0,detail:0}),Gb=Ht(Dl),ru,ou,Ul,lo=v({},Dl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:uu,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!==Ul&&(Ul&&e.type==="mousemove"?(ru=e.screenX-Ul.screenX,ou=e.screenY-Ul.screenY):ou=ru=0,Ul=e),ru)},movementY:function(e){return"movementY"in e?e.movementY:ou}}),Fh=Ht(lo),Vb=v({},lo,{dataTransfer:0}),Yb=Ht(Vb),Pb=v({},Dl,{relatedTarget:0}),cu=Ht(Pb),Kb=v({},Es,{animationName:0,elapsedTime:0,pseudoElement:0}),Xb=Ht(Kb),Zb=v({},Es,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Fb=Ht(Zb),Jb=v({},Es,{data:0}),Jh=Ht(Jb),Ib={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},$b={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"},Wb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ex(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Wb[e])?!!t[e]:!1}function uu(){return ex}var tx=v({},Dl,{key:function(e){if(e.key){var t=Ib[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ao(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?$b[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:uu,charCode:function(e){return e.type==="keypress"?ao(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ao(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),nx=Ht(tx),ax=v({},lo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ih=Ht(ax),sx=v({},Dl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:uu}),ix=Ht(sx),lx=v({},Es,{propertyName:0,elapsedTime:0,pseudoElement:0}),rx=Ht(lx),ox=v({},lo,{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}),cx=Ht(ox),ux=v({},Es,{newState:0,oldState:0}),fx=Ht(ux),dx=[9,13,27,32],fu=ea&&"CompositionEvent"in window,Ll=null;ea&&"documentMode"in document&&(Ll=document.documentMode);var hx=ea&&"TextEvent"in window&&!Ll,$h=ea&&(!fu||Ll&&8<Ll&&11>=Ll),Wh=" ",em=!1;function tm(e,t){switch(e){case"keyup":return dx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function nm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ri=!1;function mx(e,t){switch(e){case"compositionend":return nm(t);case"keypress":return t.which!==32?null:(em=!0,Wh);case"textInput":return e=t.data,e===Wh&&em?null:e;default:return null}}function px(e,t){if(Ri)return e==="compositionend"||!fu&&tm(e,t)?(e=Xh(),no=lu=Ca=null,Ri=!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 $h&&t.locale!=="ko"?null:t.data;default:return null}}var yx={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 am(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!yx[e.type]:t==="textarea"}function sm(e,t,a,i){wi?Ni?Ni.push(i):Ni=[i]:wi=i,t=Jo(t,"onChange"),0<t.length&&(a=new io("onChange","change",null,a,i),e.push({event:a,listeners:t}))}var Bl=null,ql=null;function gx(e){Hy(e,0)}function ro(e){var t=Ol(e);if(qh(t))return e}function im(e,t){if(e==="change")return t}var lm=!1;if(ea){var du;if(ea){var hu="oninput"in document;if(!hu){var rm=document.createElement("div");rm.setAttribute("oninput","return;"),hu=typeof rm.oninput=="function"}du=hu}else du=!1;lm=du&&(!document.documentMode||9<document.documentMode)}function om(){Bl&&(Bl.detachEvent("onpropertychange",cm),ql=Bl=null)}function cm(e){if(e.propertyName==="value"&&ro(ql)){var t=[];sm(t,ql,e,au(e)),Kh(gx,t)}}function vx(e,t,a){e==="focusin"?(om(),Bl=t,ql=a,Bl.attachEvent("onpropertychange",cm)):e==="focusout"&&om()}function bx(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ro(ql)}function xx(e,t){if(e==="click")return ro(t)}function Sx(e,t){if(e==="input"||e==="change")return ro(t)}function jx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var nn=typeof Object.is=="function"?Object.is:jx;function Hl(e,t){if(nn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),i=Object.keys(t);if(a.length!==i.length)return!1;for(i=0;i<a.length;i++){var o=a[i];if(!Ns.call(t,o)||!nn(e[o],t[o]))return!1}return!0}function um(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function fm(e,t){var a=um(e);e=0;for(var i;a;){if(a.nodeType===3){if(i=e+a.textContent.length,e<=t&&i>=t)return{node:a,offset:t-e};e=i}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=um(a)}}function dm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?dm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function hm(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=eo(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=eo(e.document)}return t}function mu(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 wx=ea&&"documentMode"in document&&11>=document.documentMode,_i=null,pu=null,Ql=null,yu=!1;function mm(e,t,a){var i=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;yu||_i==null||_i!==eo(i)||(i=_i,"selectionStart"in i&&mu(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),Ql&&Hl(Ql,i)||(Ql=i,i=Jo(pu,"onSelect"),0<i.length&&(t=new io("onSelect","select",null,t,a),e.push({event:t,listeners:i}),t.target=_i)))}function Ts(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Ei={animationend:Ts("Animation","AnimationEnd"),animationiteration:Ts("Animation","AnimationIteration"),animationstart:Ts("Animation","AnimationStart"),transitionrun:Ts("Transition","TransitionRun"),transitionstart:Ts("Transition","TransitionStart"),transitioncancel:Ts("Transition","TransitionCancel"),transitionend:Ts("Transition","TransitionEnd")},gu={},pm={};ea&&(pm=document.createElement("div").style,"AnimationEvent"in window||(delete Ei.animationend.animation,delete Ei.animationiteration.animation,delete Ei.animationstart.animation),"TransitionEvent"in window||delete Ei.transitionend.transition);function Cs(e){if(gu[e])return gu[e];if(!Ei[e])return e;var t=Ei[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in pm)return gu[e]=t[a];return e}var ym=Cs("animationend"),gm=Cs("animationiteration"),vm=Cs("animationstart"),Nx=Cs("transitionrun"),Rx=Cs("transitionstart"),_x=Cs("transitioncancel"),bm=Cs("transitionend"),xm=new Map,vu="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(" ");vu.push("scrollEnd");function Tn(e,t){xm.set(e,t),_s(t,[e])}var oo=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)},gn=[],Ti=0,bu=0;function co(){for(var e=Ti,t=bu=Ti=0;t<e;){var a=gn[t];gn[t++]=null;var i=gn[t];gn[t++]=null;var o=gn[t];gn[t++]=null;var f=gn[t];if(gn[t++]=null,i!==null&&o!==null){var g=i.pending;g===null?o.next=o:(o.next=g.next,g.next=o),i.pending=o}f!==0&&Sm(a,o,f)}}function uo(e,t,a,i){gn[Ti++]=e,gn[Ti++]=t,gn[Ti++]=a,gn[Ti++]=i,bu|=i,e.lanes|=i,e=e.alternate,e!==null&&(e.lanes|=i)}function xu(e,t,a,i){return uo(e,t,a,i),fo(e)}function Ms(e,t){return uo(e,null,null,t),fo(e)}function Sm(e,t,a){e.lanes|=a;var i=e.alternate;i!==null&&(i.lanes|=a);for(var o=!1,f=e.return;f!==null;)f.childLanes|=a,i=f.alternate,i!==null&&(i.childLanes|=a),f.tag===22&&(e=f.stateNode,e===null||e._visibility&1||(o=!0)),e=f,f=f.return;return e.tag===3?(f=e.stateNode,o&&t!==null&&(o=31-tn(a),e=f.hiddenUpdates,i=e[o],i===null?e[o]=[t]:i.push(t),t.lane=a|536870912),f):null}function fo(e){if(50<cr)throw cr=0,Mf=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ci={};function Ex(e,t,a,i){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=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function an(e,t,a,i){return new Ex(e,t,a,i)}function Su(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ta(e,t){var a=e.alternate;return a===null?(a=an(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 jm(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 ho(e,t,a,i,o,f){var g=0;if(i=e,typeof e=="function")Su(e)&&(g=1);else if(typeof e=="string")g=O1(e,a,se.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case P:return e=an(31,a,t,o),e.elementType=P,e.lanes=f,e;case R:return As(a.children,o,f,t);case j:g=8,o|=24;break;case z:return e=an(12,a,t,o|2),e.elementType=z,e.lanes=f,e;case Q:return e=an(13,a,t,o),e.elementType=Q,e.lanes=f,e;case U:return e=an(19,a,t,o),e.elementType=U,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case B:g=10;break e;case A:g=9;break e;case T:g=11;break e;case k:g=14;break e;case O:g=16,i=null;break e}g=29,a=Error(r(130,e===null?"null":typeof e,"")),i=null}return t=an(g,a,t,o),t.elementType=e,t.type=i,t.lanes=f,t}function As(e,t,a,i){return e=an(7,e,i,t),e.lanes=a,e}function ju(e,t,a){return e=an(6,e,null,t),e.lanes=a,e}function wm(e){var t=an(18,null,null,0);return t.stateNode=e,t}function wu(e,t,a){return t=an(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Nm=new WeakMap;function vn(e,t){if(typeof e=="object"&&e!==null){var a=Nm.get(e);return a!==void 0?a:(t={value:e,source:t,stack:In(t)},Nm.set(e,t),t)}return{value:e,source:t,stack:In(t)}}var Mi=[],Ai=0,mo=null,Gl=0,bn=[],xn=0,Ma=null,Ln=1,Bn="";function na(e,t){Mi[Ai++]=Gl,Mi[Ai++]=mo,mo=e,Gl=t}function Rm(e,t,a){bn[xn++]=Ln,bn[xn++]=Bn,bn[xn++]=Ma,Ma=e;var i=Ln;e=Bn;var o=32-tn(i)-1;i&=~(1<<o),a+=1;var f=32-tn(t)+o;if(30<f){var g=o-o%5;f=(i&(1<<g)-1).toString(32),i>>=g,o-=g,Ln=1<<32-tn(t)+o|a<<o|i,Bn=f+e}else Ln=1<<f|a<<o|i,Bn=e}function Nu(e){e.return!==null&&(na(e,1),Rm(e,1,0))}function Ru(e){for(;e===mo;)mo=Mi[--Ai],Mi[Ai]=null,Gl=Mi[--Ai],Mi[Ai]=null;for(;e===Ma;)Ma=bn[--xn],bn[xn]=null,Bn=bn[--xn],bn[xn]=null,Ln=bn[--xn],bn[xn]=null}function _m(e,t){bn[xn++]=Ln,bn[xn++]=Bn,bn[xn++]=Ma,Ln=t.id,Bn=t.overflow,Ma=e}var St=null,Je=null,ze=!1,Aa=null,Sn=!1,_u=Error(r(519));function Oa(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Vl(vn(t,e)),_u}function Em(e){var t=e.stateNode,a=e.type,i=e.memoizedProps;switch(t[xt]=e,t[qt]=i,a){case"dialog":Ee("cancel",t),Ee("close",t);break;case"iframe":case"object":case"embed":Ee("load",t);break;case"video":case"audio":for(a=0;a<fr.length;a++)Ee(fr[a],t);break;case"source":Ee("error",t);break;case"img":case"image":case"link":Ee("error",t),Ee("load",t);break;case"details":Ee("toggle",t);break;case"input":Ee("invalid",t),Hh(t,i.value,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name,!0);break;case"select":Ee("invalid",t);break;case"textarea":Ee("invalid",t),Gh(t,i.value,i.defaultValue,i.children)}a=i.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||i.suppressHydrationWarning===!0||Yy(t.textContent,a)?(i.popover!=null&&(Ee("beforetoggle",t),Ee("toggle",t)),i.onScroll!=null&&Ee("scroll",t),i.onScrollEnd!=null&&Ee("scrollend",t),i.onClick!=null&&(t.onclick=Wn),t=!0):t=!1,t||Oa(e,!0)}function Tm(e){for(St=e.return;St;)switch(St.tag){case 5:case 31:case 13:Sn=!1;return;case 27:case 3:Sn=!0;return;default:St=St.return}}function Oi(e){if(e!==St)return!1;if(!ze)return Tm(e),ze=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Pf(e.type,e.memoizedProps)),a=!a),a&&Je&&Oa(e),Tm(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Je=Wy(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Je=Wy(e)}else t===27?(t=Je,Ka(e.type)?(e=Jf,Jf=null,Je=e):Je=t):Je=St?wn(e.stateNode.nextSibling):null;return!0}function Os(){Je=St=null,ze=!1}function Eu(){var e=Aa;return e!==null&&(Yt===null?Yt=e:Yt.push.apply(Yt,e),Aa=null),e}function Vl(e){Aa===null?Aa=[e]:Aa.push(e)}var Tu=C(null),zs=null,aa=null;function za(e,t,a){ae(Tu,t._currentValue),t._currentValue=a}function sa(e){e._currentValue=Tu.current,J(Tu)}function Cu(e,t,a){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===a)break;e=e.return}}function Mu(e,t,a,i){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var f=o.dependencies;if(f!==null){var g=o.child;f=f.firstContext;e:for(;f!==null;){var S=f;f=o;for(var _=0;_<t.length;_++)if(S.context===t[_]){f.lanes|=a,S=f.alternate,S!==null&&(S.lanes|=a),Cu(f.return,a,e),i||(g=null);break e}f=S.next}}else if(o.tag===18){if(g=o.return,g===null)throw Error(r(341));g.lanes|=a,f=g.alternate,f!==null&&(f.lanes|=a),Cu(g,a,e),g=null}else g=o.child;if(g!==null)g.return=o;else for(g=o;g!==null;){if(g===e){g=null;break}if(o=g.sibling,o!==null){o.return=g.return,g=o;break}g=g.return}o=g}}function zi(e,t,a,i){e=null;for(var o=t,f=!1;o!==null;){if(!f){if((o.flags&524288)!==0)f=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var g=o.alternate;if(g===null)throw Error(r(387));if(g=g.memoizedProps,g!==null){var S=o.type;nn(o.pendingProps.value,g.value)||(e!==null?e.push(S):e=[S])}}else if(o===Re.current){if(g=o.alternate,g===null)throw Error(r(387));g.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(yr):e=[yr])}o=o.return}e!==null&&Mu(t,e,a,i),t.flags|=262144}function po(e){for(e=e.firstContext;e!==null;){if(!nn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ks(e){zs=e,aa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function jt(e){return Cm(zs,e)}function yo(e,t){return zs===null&&ks(e),Cm(e,t)}function Cm(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},aa===null){if(e===null)throw Error(r(308));aa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else aa=aa.next=t;return a}var Tx=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,i){e.push(i)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},Cx=n.unstable_scheduleCallback,Mx=n.unstable_NormalPriority,rt={$$typeof:B,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Au(){return{controller:new Tx,data:new Map,refCount:0}}function Yl(e){e.refCount--,e.refCount===0&&Cx(Mx,function(){e.controller.abort()})}var Pl=null,Ou=0,ki=0,Di=null;function Ax(e,t){if(Pl===null){var a=Pl=[];Ou=0,ki=Uf(),Di={status:"pending",value:void 0,then:function(i){a.push(i)}}}return Ou++,t.then(Mm,Mm),t}function Mm(){if(--Ou===0&&Pl!==null){Di!==null&&(Di.status="fulfilled");var e=Pl;Pl=null,ki=0,Di=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Ox(e,t){var a=[],i={status:"pending",value:null,reason:null,then:function(o){a.push(o)}};return e.then(function(){i.status="fulfilled",i.value=t;for(var o=0;o<a.length;o++)(0,a[o])(t)},function(o){for(i.status="rejected",i.reason=o,o=0;o<a.length;o++)(0,a[o])(void 0)}),i}var Am=L.S;L.S=function(e,t){my=_t(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Ax(e,t),Am!==null&&Am(e,t)};var Ds=C(null);function zu(){var e=Ds.current;return e!==null?e:Fe.pooledCache}function go(e,t){t===null?ae(Ds,Ds.current):ae(Ds,t.pool)}function Om(){var e=zu();return e===null?null:{parent:rt._currentValue,pool:e}}var Ui=Error(r(460)),ku=Error(r(474)),vo=Error(r(542)),bo={then:function(){}};function zm(e){return e=e.status,e==="fulfilled"||e==="rejected"}function km(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Wn,Wn),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Um(e),e;default:if(typeof t.status=="string")t.then(Wn,Wn);else{if(e=Fe,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(i){if(t.status==="pending"){var o=t;o.status="fulfilled",o.value=i}},function(i){if(t.status==="pending"){var o=t;o.status="rejected",o.reason=i}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Um(e),e}throw Ls=t,Ui}}function Us(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Ls=a,Ui):a}}var Ls=null;function Dm(){if(Ls===null)throw Error(r(459));var e=Ls;return Ls=null,e}function Um(e){if(e===Ui||e===vo)throw Error(r(483))}var Li=null,Kl=0;function xo(e){var t=Kl;return Kl+=1,Li===null&&(Li=[]),km(Li,e,t)}function Xl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function So(e,t){throw t.$$typeof===x?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Lm(e){function t(D,M){if(e){var q=D.deletions;q===null?(D.deletions=[M],D.flags|=16):q.push(M)}}function a(D,M){if(!e)return null;for(;M!==null;)t(D,M),M=M.sibling;return null}function i(D){for(var M=new Map;D!==null;)D.key!==null?M.set(D.key,D):M.set(D.index,D),D=D.sibling;return M}function o(D,M){return D=ta(D,M),D.index=0,D.sibling=null,D}function f(D,M,q){return D.index=q,e?(q=D.alternate,q!==null?(q=q.index,q<M?(D.flags|=67108866,M):q):(D.flags|=67108866,M)):(D.flags|=1048576,M)}function g(D){return e&&D.alternate===null&&(D.flags|=67108866),D}function S(D,M,q,F){return M===null||M.tag!==6?(M=ju(q,D.mode,F),M.return=D,M):(M=o(M,q),M.return=D,M)}function _(D,M,q,F){var pe=q.type;return pe===R?X(D,M,q.props.children,F,q.key):M!==null&&(M.elementType===pe||typeof pe=="object"&&pe!==null&&pe.$$typeof===O&&Us(pe)===M.type)?(M=o(M,q.props),Xl(M,q),M.return=D,M):(M=ho(q.type,q.key,q.props,null,D.mode,F),Xl(M,q),M.return=D,M)}function H(D,M,q,F){return M===null||M.tag!==4||M.stateNode.containerInfo!==q.containerInfo||M.stateNode.implementation!==q.implementation?(M=wu(q,D.mode,F),M.return=D,M):(M=o(M,q.children||[]),M.return=D,M)}function X(D,M,q,F,pe){return M===null||M.tag!==7?(M=As(q,D.mode,F,pe),M.return=D,M):(M=o(M,q),M.return=D,M)}function I(D,M,q){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=ju(""+M,D.mode,q),M.return=D,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case w:return q=ho(M.type,M.key,M.props,null,D.mode,q),Xl(q,M),q.return=D,q;case N:return M=wu(M,D.mode,q),M.return=D,M;case O:return M=Us(M),I(D,M,q)}if(he(M)||Z(M))return M=As(M,D.mode,q,null),M.return=D,M;if(typeof M.then=="function")return I(D,xo(M),q);if(M.$$typeof===B)return I(D,yo(D,M),q);So(D,M)}return null}function G(D,M,q,F){var pe=M!==null?M.key:null;if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return pe!==null?null:S(D,M,""+q,F);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case w:return q.key===pe?_(D,M,q,F):null;case N:return q.key===pe?H(D,M,q,F):null;case O:return q=Us(q),G(D,M,q,F)}if(he(q)||Z(q))return pe!==null?null:X(D,M,q,F,null);if(typeof q.then=="function")return G(D,M,xo(q),F);if(q.$$typeof===B)return G(D,M,yo(D,q),F);So(D,q)}return null}function Y(D,M,q,F,pe){if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return D=D.get(q)||null,S(M,D,""+F,pe);if(typeof F=="object"&&F!==null){switch(F.$$typeof){case w:return D=D.get(F.key===null?q:F.key)||null,_(M,D,F,pe);case N:return D=D.get(F.key===null?q:F.key)||null,H(M,D,F,pe);case O:return F=Us(F),Y(D,M,q,F,pe)}if(he(F)||Z(F))return D=D.get(q)||null,X(M,D,F,pe,null);if(typeof F.then=="function")return Y(D,M,q,xo(F),pe);if(F.$$typeof===B)return Y(D,M,q,yo(M,F),pe);So(M,F)}return null}function ce(D,M,q,F){for(var pe=null,De=null,fe=M,je=M=0,Me=null;fe!==null&&je<q.length;je++){fe.index>je?(Me=fe,fe=null):Me=fe.sibling;var Ue=G(D,fe,q[je],F);if(Ue===null){fe===null&&(fe=Me);break}e&&fe&&Ue.alternate===null&&t(D,fe),M=f(Ue,M,je),De===null?pe=Ue:De.sibling=Ue,De=Ue,fe=Me}if(je===q.length)return a(D,fe),ze&&na(D,je),pe;if(fe===null){for(;je<q.length;je++)fe=I(D,q[je],F),fe!==null&&(M=f(fe,M,je),De===null?pe=fe:De.sibling=fe,De=fe);return ze&&na(D,je),pe}for(fe=i(fe);je<q.length;je++)Me=Y(fe,D,je,q[je],F),Me!==null&&(e&&Me.alternate!==null&&fe.delete(Me.key===null?je:Me.key),M=f(Me,M,je),De===null?pe=Me:De.sibling=Me,De=Me);return e&&fe.forEach(function(Ia){return t(D,Ia)}),ze&&na(D,je),pe}function ye(D,M,q,F){if(q==null)throw Error(r(151));for(var pe=null,De=null,fe=M,je=M=0,Me=null,Ue=q.next();fe!==null&&!Ue.done;je++,Ue=q.next()){fe.index>je?(Me=fe,fe=null):Me=fe.sibling;var Ia=G(D,fe,Ue.value,F);if(Ia===null){fe===null&&(fe=Me);break}e&&fe&&Ia.alternate===null&&t(D,fe),M=f(Ia,M,je),De===null?pe=Ia:De.sibling=Ia,De=Ia,fe=Me}if(Ue.done)return a(D,fe),ze&&na(D,je),pe;if(fe===null){for(;!Ue.done;je++,Ue=q.next())Ue=I(D,Ue.value,F),Ue!==null&&(M=f(Ue,M,je),De===null?pe=Ue:De.sibling=Ue,De=Ue);return ze&&na(D,je),pe}for(fe=i(fe);!Ue.done;je++,Ue=q.next())Ue=Y(fe,D,je,Ue.value,F),Ue!==null&&(e&&Ue.alternate!==null&&fe.delete(Ue.key===null?je:Ue.key),M=f(Ue,M,je),De===null?pe=Ue:De.sibling=Ue,De=Ue);return e&&fe.forEach(function(V1){return t(D,V1)}),ze&&na(D,je),pe}function Xe(D,M,q,F){if(typeof q=="object"&&q!==null&&q.type===R&&q.key===null&&(q=q.props.children),typeof q=="object"&&q!==null){switch(q.$$typeof){case w:e:{for(var pe=q.key;M!==null;){if(M.key===pe){if(pe=q.type,pe===R){if(M.tag===7){a(D,M.sibling),F=o(M,q.props.children),F.return=D,D=F;break e}}else if(M.elementType===pe||typeof pe=="object"&&pe!==null&&pe.$$typeof===O&&Us(pe)===M.type){a(D,M.sibling),F=o(M,q.props),Xl(F,q),F.return=D,D=F;break e}a(D,M);break}else t(D,M);M=M.sibling}q.type===R?(F=As(q.props.children,D.mode,F,q.key),F.return=D,D=F):(F=ho(q.type,q.key,q.props,null,D.mode,F),Xl(F,q),F.return=D,D=F)}return g(D);case N:e:{for(pe=q.key;M!==null;){if(M.key===pe)if(M.tag===4&&M.stateNode.containerInfo===q.containerInfo&&M.stateNode.implementation===q.implementation){a(D,M.sibling),F=o(M,q.children||[]),F.return=D,D=F;break e}else{a(D,M);break}else t(D,M);M=M.sibling}F=wu(q,D.mode,F),F.return=D,D=F}return g(D);case O:return q=Us(q),Xe(D,M,q,F)}if(he(q))return ce(D,M,q,F);if(Z(q)){if(pe=Z(q),typeof pe!="function")throw Error(r(150));return q=pe.call(q),ye(D,M,q,F)}if(typeof q.then=="function")return Xe(D,M,xo(q),F);if(q.$$typeof===B)return Xe(D,M,yo(D,q),F);So(D,q)}return typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint"?(q=""+q,M!==null&&M.tag===6?(a(D,M.sibling),F=o(M,q),F.return=D,D=F):(a(D,M),F=ju(q,D.mode,F),F.return=D,D=F),g(D)):a(D,M)}return function(D,M,q,F){try{Kl=0;var pe=Xe(D,M,q,F);return Li=null,pe}catch(fe){if(fe===Ui||fe===vo)throw fe;var De=an(29,fe,null,D.mode);return De.lanes=F,De.return=D,De}finally{}}}var Bs=Lm(!0),Bm=Lm(!1),ka=!1;function Du(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Uu(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 Da(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ua(e,t,a){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(Le&2)!==0){var o=i.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),i.pending=t,t=fo(e),Sm(e,null,a),t}return uo(e,i,t,a),fo(e)}function Zl(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var i=t.lanes;i&=e.pendingLanes,a|=i,t.lanes=a,Ch(e,a)}}function Lu(e,t){var a=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,a===i)){var o=null,f=null;if(a=a.firstBaseUpdate,a!==null){do{var g={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};f===null?o=f=g:f=f.next=g,a=a.next}while(a!==null);f===null?o=f=t:f=f.next=t}else o=f=t;a={baseState:i.baseState,firstBaseUpdate:o,lastBaseUpdate:f,shared:i.shared,callbacks:i.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Bu=!1;function Fl(){if(Bu){var e=Di;if(e!==null)throw e}}function Jl(e,t,a,i){Bu=!1;var o=e.updateQueue;ka=!1;var f=o.firstBaseUpdate,g=o.lastBaseUpdate,S=o.shared.pending;if(S!==null){o.shared.pending=null;var _=S,H=_.next;_.next=null,g===null?f=H:g.next=H,g=_;var X=e.alternate;X!==null&&(X=X.updateQueue,S=X.lastBaseUpdate,S!==g&&(S===null?X.firstBaseUpdate=H:S.next=H,X.lastBaseUpdate=_))}if(f!==null){var I=o.baseState;g=0,X=H=_=null,S=f;do{var G=S.lane&-536870913,Y=G!==S.lane;if(Y?(Ce&G)===G:(i&G)===G){G!==0&&G===ki&&(Bu=!0),X!==null&&(X=X.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var ce=e,ye=S;G=t;var Xe=a;switch(ye.tag){case 1:if(ce=ye.payload,typeof ce=="function"){I=ce.call(Xe,I,G);break e}I=ce;break e;case 3:ce.flags=ce.flags&-65537|128;case 0:if(ce=ye.payload,G=typeof ce=="function"?ce.call(Xe,I,G):ce,G==null)break e;I=v({},I,G);break e;case 2:ka=!0}}G=S.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:S.tag,payload:S.payload,callback:S.callback,next:null},X===null?(H=X=Y,_=I):X=X.next=Y,g|=G;if(S=S.next,S===null){if(S=o.shared.pending,S===null)break;Y=S,S=Y.next,Y.next=null,o.lastBaseUpdate=Y,o.shared.pending=null}}while(!0);X===null&&(_=I),o.baseState=_,o.firstBaseUpdate=H,o.lastBaseUpdate=X,f===null&&(o.shared.lanes=0),Qa|=g,e.lanes=g,e.memoizedState=I}}function qm(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function Hm(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)qm(a[e],t)}var Bi=C(null),jo=C(0);function Qm(e,t){e=ha,ae(jo,e),ae(Bi,t),ha=e|t.baseLanes}function qu(){ae(jo,ha),ae(Bi,Bi.current)}function Hu(){ha=jo.current,J(Bi),J(jo)}var sn=C(null),jn=null;function La(e){var t=e.alternate;ae(st,st.current&1),ae(sn,e),jn===null&&(t===null||Bi.current!==null||t.memoizedState!==null)&&(jn=e)}function Qu(e){ae(st,st.current),ae(sn,e),jn===null&&(jn=e)}function Gm(e){e.tag===22?(ae(st,st.current),ae(sn,e),jn===null&&(jn=e)):Ba()}function Ba(){ae(st,st.current),ae(sn,sn.current)}function ln(e){J(sn),jn===e&&(jn=null),J(st)}var st=C(0);function wo(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Zf(a)||Ff(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 ia=0,xe=null,Pe=null,ot=null,No=!1,qi=!1,qs=!1,Ro=0,Il=0,Hi=null,zx=0;function et(){throw Error(r(321))}function Gu(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!nn(e[a],t[a]))return!1;return!0}function Vu(e,t,a,i,o,f){return ia=f,xe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,L.H=e===null||e.memoizedState===null?Rp:sf,qs=!1,f=a(i,o),qs=!1,qi&&(f=Ym(t,a,i,o)),Vm(e),f}function Vm(e){L.H=er;var t=Pe!==null&&Pe.next!==null;if(ia=0,ot=Pe=xe=null,No=!1,Il=0,Hi=null,t)throw Error(r(300));e===null||ct||(e=e.dependencies,e!==null&&po(e)&&(ct=!0))}function Ym(e,t,a,i){xe=e;var o=0;do{if(qi&&(Hi=null),Il=0,qi=!1,25<=o)throw Error(r(301));if(o+=1,ot=Pe=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}L.H=_p,f=t(a,i)}while(qi);return f}function kx(){var e=L.H,t=e.useState()[0];return t=typeof t.then=="function"?$l(t):t,e=e.useState()[0],(Pe!==null?Pe.memoizedState:null)!==e&&(xe.flags|=1024),t}function Yu(){var e=Ro!==0;return Ro=0,e}function Pu(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Ku(e){if(No){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}No=!1}ia=0,ot=Pe=xe=null,qi=!1,Il=Ro=0,Hi=null}function Ot(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ot===null?xe.memoizedState=ot=e:ot=ot.next=e,ot}function it(){if(Pe===null){var e=xe.alternate;e=e!==null?e.memoizedState:null}else e=Pe.next;var t=ot===null?xe.memoizedState:ot.next;if(t!==null)ot=t,Pe=e;else{if(e===null)throw xe.alternate===null?Error(r(467)):Error(r(310));Pe=e,e={memoizedState:Pe.memoizedState,baseState:Pe.baseState,baseQueue:Pe.baseQueue,queue:Pe.queue,next:null},ot===null?xe.memoizedState=ot=e:ot=ot.next=e}return ot}function _o(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function $l(e){var t=Il;return Il+=1,Hi===null&&(Hi=[]),e=km(Hi,e,t),t=xe,(ot===null?t.memoizedState:ot.next)===null&&(t=t.alternate,L.H=t===null||t.memoizedState===null?Rp:sf),e}function Eo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return $l(e);if(e.$$typeof===B)return jt(e)}throw Error(r(438,String(e)))}function Xu(e){var t=null,a=xe.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var i=xe.alternate;i!==null&&(i=i.updateQueue,i!==null&&(i=i.memoCache,i!=null&&(t={data:i.data.map(function(o){return o.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=_o(),xe.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),i=0;i<e;i++)a[i]=$;return t.index++,a}function la(e,t){return typeof t=="function"?t(e):t}function To(e){var t=it();return Zu(t,Pe,e)}function Zu(e,t,a){var i=e.queue;if(i===null)throw Error(r(311));i.lastRenderedReducer=a;var o=e.baseQueue,f=i.pending;if(f!==null){if(o!==null){var g=o.next;o.next=f.next,f.next=g}t.baseQueue=o=f,i.pending=null}if(f=e.baseState,o===null)e.memoizedState=f;else{t=o.next;var S=g=null,_=null,H=t,X=!1;do{var I=H.lane&-536870913;if(I!==H.lane?(Ce&I)===I:(ia&I)===I){var G=H.revertLane;if(G===0)_!==null&&(_=_.next={lane:0,revertLane:0,gesture:null,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null}),I===ki&&(X=!0);else if((ia&G)===G){H=H.next,G===ki&&(X=!0);continue}else I={lane:0,revertLane:H.revertLane,gesture:null,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},_===null?(S=_=I,g=f):_=_.next=I,xe.lanes|=G,Qa|=G;I=H.action,qs&&a(f,I),f=H.hasEagerState?H.eagerState:a(f,I)}else G={lane:I,revertLane:H.revertLane,gesture:H.gesture,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},_===null?(S=_=G,g=f):_=_.next=G,xe.lanes|=I,Qa|=I;H=H.next}while(H!==null&&H!==t);if(_===null?g=f:_.next=S,!nn(f,e.memoizedState)&&(ct=!0,X&&(a=Di,a!==null)))throw a;e.memoizedState=f,e.baseState=g,e.baseQueue=_,i.lastRenderedState=f}return o===null&&(i.lanes=0),[e.memoizedState,i.dispatch]}function Fu(e){var t=it(),a=t.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=e;var i=a.dispatch,o=a.pending,f=t.memoizedState;if(o!==null){a.pending=null;var g=o=o.next;do f=e(f,g.action),g=g.next;while(g!==o);nn(f,t.memoizedState)||(ct=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),a.lastRenderedState=f}return[f,i]}function Pm(e,t,a){var i=xe,o=it(),f=ze;if(f){if(a===void 0)throw Error(r(407));a=a()}else a=t();var g=!nn((Pe||o).memoizedState,a);if(g&&(o.memoizedState=a,ct=!0),o=o.queue,$u(Zm.bind(null,i,o,e),[e]),o.getSnapshot!==t||g||ot!==null&&ot.memoizedState.tag&1){if(i.flags|=2048,Qi(9,{destroy:void 0},Xm.bind(null,i,o,a,t),null),Fe===null)throw Error(r(349));f||(ia&127)!==0||Km(i,t,a)}return a}function Km(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=xe.updateQueue,t===null?(t=_o(),xe.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Xm(e,t,a,i){t.value=a,t.getSnapshot=i,Fm(t)&&Jm(e)}function Zm(e,t,a){return a(function(){Fm(t)&&Jm(e)})}function Fm(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!nn(e,a)}catch{return!0}}function Jm(e){var t=Ms(e,2);t!==null&&Pt(t,e,2)}function Ju(e){var t=Ot();if(typeof e=="function"){var a=e;if(e=a(),qs){Ea(!0);try{a()}finally{Ea(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:la,lastRenderedState:e},t}function Im(e,t,a,i){return e.baseState=a,Zu(e,Pe,typeof i=="function"?i:la)}function Dx(e,t,a,i,o){if(Ao(e))throw Error(r(485));if(e=t.action,e!==null){var f={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(g){f.listeners.push(g)}};L.T!==null?a(!0):f.isTransition=!1,i(f),a=t.pending,a===null?(f.next=t.pending=f,$m(t,f)):(f.next=a.next,t.pending=a.next=f)}}function $m(e,t){var a=t.action,i=t.payload,o=e.state;if(t.isTransition){var f=L.T,g={};L.T=g;try{var S=a(o,i),_=L.S;_!==null&&_(g,S),Wm(e,t,S)}catch(H){Iu(e,t,H)}finally{f!==null&&g.types!==null&&(f.types=g.types),L.T=f}}else try{f=a(o,i),Wm(e,t,f)}catch(H){Iu(e,t,H)}}function Wm(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(i){ep(e,t,i)},function(i){return Iu(e,t,i)}):ep(e,t,a)}function ep(e,t,a){t.status="fulfilled",t.value=a,tp(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,$m(e,a)))}function Iu(e,t,a){var i=e.pending;if(e.pending=null,i!==null){i=i.next;do t.status="rejected",t.reason=a,tp(t),t=t.next;while(t!==i)}e.action=null}function tp(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function np(e,t){return t}function ap(e,t){if(ze){var a=Fe.formState;if(a!==null){e:{var i=xe;if(ze){if(Je){t:{for(var o=Je,f=Sn;o.nodeType!==8;){if(!f){o=null;break t}if(o=wn(o.nextSibling),o===null){o=null;break t}}f=o.data,o=f==="F!"||f==="F"?o:null}if(o){Je=wn(o.nextSibling),i=o.data==="F!";break e}}Oa(i)}i=!1}i&&(t=a[0])}}return a=Ot(),a.memoizedState=a.baseState=t,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:np,lastRenderedState:t},a.queue=i,a=jp.bind(null,xe,i),i.dispatch=a,i=Ju(!1),f=af.bind(null,xe,!1,i.queue),i=Ot(),o={state:t,dispatch:null,action:e,pending:null},i.queue=o,a=Dx.bind(null,xe,o,f,a),o.dispatch=a,i.memoizedState=e,[t,a,!1]}function sp(e){var t=it();return ip(t,Pe,e)}function ip(e,t,a){if(t=Zu(e,t,np)[0],e=To(la)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var i=$l(t)}catch(g){throw g===Ui?vo:g}else i=t;t=it();var o=t.queue,f=o.dispatch;return a!==t.memoizedState&&(xe.flags|=2048,Qi(9,{destroy:void 0},Ux.bind(null,o,a),null)),[i,f,e]}function Ux(e,t){e.action=t}function lp(e){var t=it(),a=Pe;if(a!==null)return ip(t,a,e);it(),t=t.memoizedState,a=it();var i=a.queue.dispatch;return a.memoizedState=e,[t,i,!1]}function Qi(e,t,a,i){return e={tag:e,create:a,deps:i,inst:t,next:null},t=xe.updateQueue,t===null&&(t=_o(),xe.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(i=a.next,a.next=e,e.next=i,t.lastEffect=e),e}function rp(){return it().memoizedState}function Co(e,t,a,i){var o=Ot();xe.flags|=e,o.memoizedState=Qi(1|t,{destroy:void 0},a,i===void 0?null:i)}function Mo(e,t,a,i){var o=it();i=i===void 0?null:i;var f=o.memoizedState.inst;Pe!==null&&i!==null&&Gu(i,Pe.memoizedState.deps)?o.memoizedState=Qi(t,f,a,i):(xe.flags|=e,o.memoizedState=Qi(1|t,f,a,i))}function op(e,t){Co(8390656,8,e,t)}function $u(e,t){Mo(2048,8,e,t)}function Lx(e){xe.flags|=4;var t=xe.updateQueue;if(t===null)t=_o(),xe.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function cp(e){var t=it().memoizedState;return Lx({ref:t,nextImpl:e}),function(){if((Le&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function up(e,t){return Mo(4,2,e,t)}function fp(e,t){return Mo(4,4,e,t)}function dp(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 hp(e,t,a){a=a!=null?a.concat([e]):null,Mo(4,4,dp.bind(null,t,e),a)}function Wu(){}function mp(e,t){var a=it();t=t===void 0?null:t;var i=a.memoizedState;return t!==null&&Gu(t,i[1])?i[0]:(a.memoizedState=[e,t],e)}function pp(e,t){var a=it();t=t===void 0?null:t;var i=a.memoizedState;if(t!==null&&Gu(t,i[1]))return i[0];if(i=e(),qs){Ea(!0);try{e()}finally{Ea(!1)}}return a.memoizedState=[i,t],i}function ef(e,t,a){return a===void 0||(ia&1073741824)!==0&&(Ce&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=yy(),xe.lanes|=e,Qa|=e,a)}function yp(e,t,a,i){return nn(a,t)?a:Bi.current!==null?(e=ef(e,a,i),nn(e,t)||(ct=!0),e):(ia&42)===0||(ia&1073741824)!==0&&(Ce&261930)===0?(ct=!0,e.memoizedState=a):(e=yy(),xe.lanes|=e,Qa|=e,t)}function gp(e,t,a,i,o){var f=K.p;K.p=f!==0&&8>f?f:8;var g=L.T,S={};L.T=S,af(e,!1,t,a);try{var _=o(),H=L.S;if(H!==null&&H(S,_),_!==null&&typeof _=="object"&&typeof _.then=="function"){var X=Ox(_,i);Wl(e,t,X,cn(e))}else Wl(e,t,i,cn(e))}catch(I){Wl(e,t,{then:function(){},status:"rejected",reason:I},cn())}finally{K.p=f,g!==null&&S.types!==null&&(g.types=S.types),L.T=g}}function Bx(){}function tf(e,t,a,i){if(e.tag!==5)throw Error(r(476));var o=vp(e).queue;gp(e,o,t,ue,a===null?Bx:function(){return bp(e),a(i)})}function vp(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ue,baseState:ue,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:la,lastRenderedState:ue},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:la,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function bp(e){var t=vp(e);t.next===null&&(t=e.alternate.memoizedState),Wl(e,t.next.queue,{},cn())}function nf(){return jt(yr)}function xp(){return it().memoizedState}function Sp(){return it().memoizedState}function qx(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=cn();e=Da(a);var i=Ua(t,e,a);i!==null&&(Pt(i,t,a),Zl(i,t,a)),t={cache:Au()},e.payload=t;return}t=t.return}}function Hx(e,t,a){var i=cn();a={lane:i,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Ao(e)?wp(t,a):(a=xu(e,t,a,i),a!==null&&(Pt(a,e,i),Np(a,t,i)))}function jp(e,t,a){var i=cn();Wl(e,t,a,i)}function Wl(e,t,a,i){var o={lane:i,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Ao(e))wp(t,o);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var g=t.lastRenderedState,S=f(g,a);if(o.hasEagerState=!0,o.eagerState=S,nn(S,g))return uo(e,t,o,0),Fe===null&&co(),!1}catch{}finally{}if(a=xu(e,t,o,i),a!==null)return Pt(a,e,i),Np(a,t,i),!0}return!1}function af(e,t,a,i){if(i={lane:2,revertLane:Uf(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Ao(e)){if(t)throw Error(r(479))}else t=xu(e,a,i,2),t!==null&&Pt(t,e,2)}function Ao(e){var t=e.alternate;return e===xe||t!==null&&t===xe}function wp(e,t){qi=No=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Np(e,t,a){if((a&4194048)!==0){var i=t.lanes;i&=e.pendingLanes,a|=i,t.lanes=a,Ch(e,a)}}var er={readContext:jt,use:Eo,useCallback:et,useContext:et,useEffect:et,useImperativeHandle:et,useLayoutEffect:et,useInsertionEffect:et,useMemo:et,useReducer:et,useRef:et,useState:et,useDebugValue:et,useDeferredValue:et,useTransition:et,useSyncExternalStore:et,useId:et,useHostTransitionStatus:et,useFormState:et,useActionState:et,useOptimistic:et,useMemoCache:et,useCacheRefresh:et};er.useEffectEvent=et;var Rp={readContext:jt,use:Eo,useCallback:function(e,t){return Ot().memoizedState=[e,t===void 0?null:t],e},useContext:jt,useEffect:op,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Co(4194308,4,dp.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Co(4194308,4,e,t)},useInsertionEffect:function(e,t){Co(4,2,e,t)},useMemo:function(e,t){var a=Ot();t=t===void 0?null:t;var i=e();if(qs){Ea(!0);try{e()}finally{Ea(!1)}}return a.memoizedState=[i,t],i},useReducer:function(e,t,a){var i=Ot();if(a!==void 0){var o=a(t);if(qs){Ea(!0);try{a(t)}finally{Ea(!1)}}}else o=t;return i.memoizedState=i.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},i.queue=e,e=e.dispatch=Hx.bind(null,xe,e),[i.memoizedState,e]},useRef:function(e){var t=Ot();return e={current:e},t.memoizedState=e},useState:function(e){e=Ju(e);var t=e.queue,a=jp.bind(null,xe,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Wu,useDeferredValue:function(e,t){var a=Ot();return ef(a,e,t)},useTransition:function(){var e=Ju(!1);return e=gp.bind(null,xe,e.queue,!0,!1),Ot().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var i=xe,o=Ot();if(ze){if(a===void 0)throw Error(r(407));a=a()}else{if(a=t(),Fe===null)throw Error(r(349));(Ce&127)!==0||Km(i,t,a)}o.memoizedState=a;var f={value:a,getSnapshot:t};return o.queue=f,op(Zm.bind(null,i,f,e),[e]),i.flags|=2048,Qi(9,{destroy:void 0},Xm.bind(null,i,f,a,t),null),a},useId:function(){var e=Ot(),t=Fe.identifierPrefix;if(ze){var a=Bn,i=Ln;a=(i&~(1<<32-tn(i)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Ro++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=zx++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:nf,useFormState:ap,useActionState:ap,useOptimistic:function(e){var t=Ot();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=af.bind(null,xe,!0,a),a.dispatch=t,[e,t]},useMemoCache:Xu,useCacheRefresh:function(){return Ot().memoizedState=qx.bind(null,xe)},useEffectEvent:function(e){var t=Ot(),a={impl:e};return t.memoizedState=a,function(){if((Le&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}},sf={readContext:jt,use:Eo,useCallback:mp,useContext:jt,useEffect:$u,useImperativeHandle:hp,useInsertionEffect:up,useLayoutEffect:fp,useMemo:pp,useReducer:To,useRef:rp,useState:function(){return To(la)},useDebugValue:Wu,useDeferredValue:function(e,t){var a=it();return yp(a,Pe.memoizedState,e,t)},useTransition:function(){var e=To(la)[0],t=it().memoizedState;return[typeof e=="boolean"?e:$l(e),t]},useSyncExternalStore:Pm,useId:xp,useHostTransitionStatus:nf,useFormState:sp,useActionState:sp,useOptimistic:function(e,t){var a=it();return Im(a,Pe,e,t)},useMemoCache:Xu,useCacheRefresh:Sp};sf.useEffectEvent=cp;var _p={readContext:jt,use:Eo,useCallback:mp,useContext:jt,useEffect:$u,useImperativeHandle:hp,useInsertionEffect:up,useLayoutEffect:fp,useMemo:pp,useReducer:Fu,useRef:rp,useState:function(){return Fu(la)},useDebugValue:Wu,useDeferredValue:function(e,t){var a=it();return Pe===null?ef(a,e,t):yp(a,Pe.memoizedState,e,t)},useTransition:function(){var e=Fu(la)[0],t=it().memoizedState;return[typeof e=="boolean"?e:$l(e),t]},useSyncExternalStore:Pm,useId:xp,useHostTransitionStatus:nf,useFormState:lp,useActionState:lp,useOptimistic:function(e,t){var a=it();return Pe!==null?Im(a,Pe,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Xu,useCacheRefresh:Sp};_p.useEffectEvent=cp;function lf(e,t,a,i){t=e.memoizedState,a=a(i,t),a=a==null?t:v({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var rf={enqueueSetState:function(e,t,a){e=e._reactInternals;var i=cn(),o=Da(i);o.payload=t,a!=null&&(o.callback=a),t=Ua(e,o,i),t!==null&&(Pt(t,e,i),Zl(t,e,i))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var i=cn(),o=Da(i);o.tag=1,o.payload=t,a!=null&&(o.callback=a),t=Ua(e,o,i),t!==null&&(Pt(t,e,i),Zl(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=cn(),i=Da(a);i.tag=2,t!=null&&(i.callback=t),t=Ua(e,i,a),t!==null&&(Pt(t,e,a),Zl(t,e,a))}};function Ep(e,t,a,i,o,f,g){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,f,g):t.prototype&&t.prototype.isPureReactComponent?!Hl(a,i)||!Hl(o,f):!0}function Tp(e,t,a,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,i),t.state!==e&&rf.enqueueReplaceState(t,t.state,null)}function Hs(e,t){var a=t;if("ref"in t){a={};for(var i in t)i!=="ref"&&(a[i]=t[i])}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 Cp(e){oo(e)}function Mp(e){console.error(e)}function Ap(e){oo(e)}function Oo(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(i){setTimeout(function(){throw i})}}function Op(e,t,a){try{var i=e.onCaughtError;i(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function of(e,t,a){return a=Da(a),a.tag=3,a.payload={element:null},a.callback=function(){Oo(e,t)},a}function zp(e){return e=Da(e),e.tag=3,e}function kp(e,t,a,i){var o=a.type.getDerivedStateFromError;if(typeof o=="function"){var f=i.value;e.payload=function(){return o(f)},e.callback=function(){Op(t,a,i)}}var g=a.stateNode;g!==null&&typeof g.componentDidCatch=="function"&&(e.callback=function(){Op(t,a,i),typeof o!="function"&&(Ga===null?Ga=new Set([this]):Ga.add(this));var S=i.stack;this.componentDidCatch(i.value,{componentStack:S!==null?S:""})})}function Qx(e,t,a,i,o){if(a.flags|=32768,i!==null&&typeof i=="object"&&typeof i.then=="function"){if(t=a.alternate,t!==null&&zi(t,a,o,!0),a=sn.current,a!==null){switch(a.tag){case 31:case 13:return jn===null?Yo():a.alternate===null&&tt===0&&(tt=3),a.flags&=-257,a.flags|=65536,a.lanes=o,i===bo?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([i]):t.add(i),zf(e,i,o)),!1;case 22:return a.flags|=65536,i===bo?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([i])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([i]):a.add(i)),zf(e,i,o)),!1}throw Error(r(435,a.tag))}return zf(e,i,o),Yo(),!1}if(ze)return t=sn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,i!==_u&&(e=Error(r(422),{cause:i}),Vl(vn(e,a)))):(i!==_u&&(t=Error(r(423),{cause:i}),Vl(vn(t,a))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,i=vn(i,a),o=of(e.stateNode,i,o),Lu(e,o),tt!==4&&(tt=2)),!1;var f=Error(r(520),{cause:i});if(f=vn(f,a),or===null?or=[f]:or.push(f),tt!==4&&(tt=2),t===null)return!0;i=vn(i,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=o&-o,a.lanes|=e,e=of(a.stateNode,i,e),Lu(a,e),!1;case 1:if(t=a.type,f=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(Ga===null||!Ga.has(f))))return a.flags|=65536,o&=-o,a.lanes|=o,o=zp(o),kp(o,e,a,i),Lu(a,o),!1}a=a.return}while(a!==null);return!1}var cf=Error(r(461)),ct=!1;function wt(e,t,a,i){t.child=e===null?Bm(t,null,a,i):Bs(t,e.child,a,i)}function Dp(e,t,a,i,o){a=a.render;var f=t.ref;if("ref"in i){var g={};for(var S in i)S!=="ref"&&(g[S]=i[S])}else g=i;return ks(t),i=Vu(e,t,a,g,f,o),S=Yu(),e!==null&&!ct?(Pu(e,t,o),ra(e,t,o)):(ze&&S&&Nu(t),t.flags|=1,wt(e,t,i,o),t.child)}function Up(e,t,a,i,o){if(e===null){var f=a.type;return typeof f=="function"&&!Su(f)&&f.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=f,Lp(e,t,f,i,o)):(e=ho(a.type,null,i,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,!gf(e,o)){var g=f.memoizedProps;if(a=a.compare,a=a!==null?a:Hl,a(g,i)&&e.ref===t.ref)return ra(e,t,o)}return t.flags|=1,e=ta(f,i),e.ref=t.ref,e.return=t,t.child=e}function Lp(e,t,a,i,o){if(e!==null){var f=e.memoizedProps;if(Hl(f,i)&&e.ref===t.ref)if(ct=!1,t.pendingProps=i=f,gf(e,o))(e.flags&131072)!==0&&(ct=!0);else return t.lanes=e.lanes,ra(e,t,o)}return uf(e,t,a,i,o)}function Bp(e,t,a,i){var o=i.children,f=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.mode==="hidden"){if((t.flags&128)!==0){if(f=f!==null?f.baseLanes|a:a,e!==null){for(i=t.child=e.child,o=0;i!==null;)o=o|i.lanes|i.childLanes,i=i.sibling;i=o&~f}else i=0,t.child=null;return qp(e,t,f,a,i)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&go(t,f!==null?f.cachePool:null),f!==null?Qm(t,f):qu(),Gm(t);else return i=t.lanes=536870912,qp(e,t,f!==null?f.baseLanes|a:a,a,i)}else f!==null?(go(t,f.cachePool),Qm(t,f),Ba(),t.memoizedState=null):(e!==null&&go(t,null),qu(),Ba());return wt(e,t,o,a),t.child}function tr(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function qp(e,t,a,i,o){var f=zu();return f=f===null?null:{parent:rt._currentValue,pool:f},t.memoizedState={baseLanes:a,cachePool:f},e!==null&&go(t,null),qu(),Gm(t),e!==null&&zi(e,t,i,!0),t.childLanes=o,null}function zo(e,t){return t=Do({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Hp(e,t,a){return Bs(t,e.child,null,a),e=zo(t,t.pendingProps),e.flags|=2,ln(t),t.memoizedState=null,e}function Gx(e,t,a){var i=t.pendingProps,o=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ze){if(i.mode==="hidden")return e=zo(t,i),t.lanes=536870912,tr(null,e);if(Qu(t),(e=Je)?(e=$y(e,Sn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ma!==null?{id:Ln,overflow:Bn}:null,retryLane:536870912,hydrationErrors:null},a=wm(e),a.return=t,t.child=a,St=t,Je=null)):e=null,e===null)throw Oa(t);return t.lanes=536870912,null}return zo(t,i)}var f=e.memoizedState;if(f!==null){var g=f.dehydrated;if(Qu(t),o)if(t.flags&256)t.flags&=-257,t=Hp(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(ct||zi(e,t,a,!1),o=(a&e.childLanes)!==0,ct||o){if(i=Fe,i!==null&&(g=Mh(i,a),g!==0&&g!==f.retryLane))throw f.retryLane=g,Ms(e,g),Pt(i,e,g),cf;Yo(),t=Hp(e,t,a)}else e=f.treeContext,Je=wn(g.nextSibling),St=t,ze=!0,Aa=null,Sn=!1,e!==null&&_m(t,e),t=zo(t,i),t.flags|=4096;return t}return e=ta(e.child,{mode:i.mode,children:i.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ko(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 uf(e,t,a,i,o){return ks(t),a=Vu(e,t,a,i,void 0,o),i=Yu(),e!==null&&!ct?(Pu(e,t,o),ra(e,t,o)):(ze&&i&&Nu(t),t.flags|=1,wt(e,t,a,o),t.child)}function Qp(e,t,a,i,o,f){return ks(t),t.updateQueue=null,a=Ym(t,i,a,o),Vm(e),i=Yu(),e!==null&&!ct?(Pu(e,t,f),ra(e,t,f)):(ze&&i&&Nu(t),t.flags|=1,wt(e,t,a,f),t.child)}function Gp(e,t,a,i,o){if(ks(t),t.stateNode===null){var f=Ci,g=a.contextType;typeof g=="object"&&g!==null&&(f=jt(g)),f=new a(i,f),t.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=rf,t.stateNode=f,f._reactInternals=t,f=t.stateNode,f.props=i,f.state=t.memoizedState,f.refs={},Du(t),g=a.contextType,f.context=typeof g=="object"&&g!==null?jt(g):Ci,f.state=t.memoizedState,g=a.getDerivedStateFromProps,typeof g=="function"&&(lf(t,a,g,i),f.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(g=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),g!==f.state&&rf.enqueueReplaceState(f,f.state,null),Jl(t,i,f,o),Fl(),f.state=t.memoizedState),typeof f.componentDidMount=="function"&&(t.flags|=4194308),i=!0}else if(e===null){f=t.stateNode;var S=t.memoizedProps,_=Hs(a,S);f.props=_;var H=f.context,X=a.contextType;g=Ci,typeof X=="object"&&X!==null&&(g=jt(X));var I=a.getDerivedStateFromProps;X=typeof I=="function"||typeof f.getSnapshotBeforeUpdate=="function",S=t.pendingProps!==S,X||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(S||H!==g)&&Tp(t,f,i,g),ka=!1;var G=t.memoizedState;f.state=G,Jl(t,i,f,o),Fl(),H=t.memoizedState,S||G!==H||ka?(typeof I=="function"&&(lf(t,a,I,i),H=t.memoizedState),(_=ka||Ep(t,a,_,i,G,H,g))?(X||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(t.flags|=4194308)):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=H),f.props=i,f.state=H,f.context=g,i=_):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{f=t.stateNode,Uu(e,t),g=t.memoizedProps,X=Hs(a,g),f.props=X,I=t.pendingProps,G=f.context,H=a.contextType,_=Ci,typeof H=="object"&&H!==null&&(_=jt(H)),S=a.getDerivedStateFromProps,(H=typeof S=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(g!==I||G!==_)&&Tp(t,f,i,_),ka=!1,G=t.memoizedState,f.state=G,Jl(t,i,f,o),Fl();var Y=t.memoizedState;g!==I||G!==Y||ka||e!==null&&e.dependencies!==null&&po(e.dependencies)?(typeof S=="function"&&(lf(t,a,S,i),Y=t.memoizedState),(X=ka||Ep(t,a,X,i,G,Y,_)||e!==null&&e.dependencies!==null&&po(e.dependencies))?(H||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(i,Y,_),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(i,Y,_)),typeof f.componentDidUpdate=="function"&&(t.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof f.componentDidUpdate!="function"||g===e.memoizedProps&&G===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&G===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=Y),f.props=i,f.state=Y,f.context=_,i=X):(typeof f.componentDidUpdate!="function"||g===e.memoizedProps&&G===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&G===e.memoizedState||(t.flags|=1024),i=!1)}return f=i,ko(e,t),i=(t.flags&128)!==0,f||i?(f=t.stateNode,a=i&&typeof a.getDerivedStateFromError!="function"?null:f.render(),t.flags|=1,e!==null&&i?(t.child=Bs(t,e.child,null,o),t.child=Bs(t,null,a,o)):wt(e,t,a,o),t.memoizedState=f.state,e=t.child):e=ra(e,t,o),e}function Vp(e,t,a,i){return Os(),t.flags|=256,wt(e,t,a,i),t.child}var ff={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function df(e){return{baseLanes:e,cachePool:Om()}}function hf(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=on),e}function Yp(e,t,a){var i=t.pendingProps,o=!1,f=(t.flags&128)!==0,g;if((g=f)||(g=e!==null&&e.memoizedState===null?!1:(st.current&2)!==0),g&&(o=!0,t.flags&=-129),g=(t.flags&32)!==0,t.flags&=-33,e===null){if(ze){if(o?La(t):Ba(),(e=Je)?(e=$y(e,Sn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ma!==null?{id:Ln,overflow:Bn}:null,retryLane:536870912,hydrationErrors:null},a=wm(e),a.return=t,t.child=a,St=t,Je=null)):e=null,e===null)throw Oa(t);return Ff(e)?t.lanes=32:t.lanes=536870912,null}var S=i.children;return i=i.fallback,o?(Ba(),o=t.mode,S=Do({mode:"hidden",children:S},o),i=As(i,o,a,null),S.return=t,i.return=t,S.sibling=i,t.child=S,i=t.child,i.memoizedState=df(a),i.childLanes=hf(e,g,a),t.memoizedState=ff,tr(null,i)):(La(t),mf(t,S))}var _=e.memoizedState;if(_!==null&&(S=_.dehydrated,S!==null)){if(f)t.flags&256?(La(t),t.flags&=-257,t=pf(e,t,a)):t.memoizedState!==null?(Ba(),t.child=e.child,t.flags|=128,t=null):(Ba(),S=i.fallback,o=t.mode,i=Do({mode:"visible",children:i.children},o),S=As(S,o,a,null),S.flags|=2,i.return=t,S.return=t,i.sibling=S,t.child=i,Bs(t,e.child,null,a),i=t.child,i.memoizedState=df(a),i.childLanes=hf(e,g,a),t.memoizedState=ff,t=tr(null,i));else if(La(t),Ff(S)){if(g=S.nextSibling&&S.nextSibling.dataset,g)var H=g.dgst;g=H,i=Error(r(419)),i.stack="",i.digest=g,Vl({value:i,source:null,stack:null}),t=pf(e,t,a)}else if(ct||zi(e,t,a,!1),g=(a&e.childLanes)!==0,ct||g){if(g=Fe,g!==null&&(i=Mh(g,a),i!==0&&i!==_.retryLane))throw _.retryLane=i,Ms(e,i),Pt(g,e,i),cf;Zf(S)||Yo(),t=pf(e,t,a)}else Zf(S)?(t.flags|=192,t.child=e.child,t=null):(e=_.treeContext,Je=wn(S.nextSibling),St=t,ze=!0,Aa=null,Sn=!1,e!==null&&_m(t,e),t=mf(t,i.children),t.flags|=4096);return t}return o?(Ba(),S=i.fallback,o=t.mode,_=e.child,H=_.sibling,i=ta(_,{mode:"hidden",children:i.children}),i.subtreeFlags=_.subtreeFlags&65011712,H!==null?S=ta(H,S):(S=As(S,o,a,null),S.flags|=2),S.return=t,i.return=t,i.sibling=S,t.child=i,tr(null,i),i=t.child,S=e.child.memoizedState,S===null?S=df(a):(o=S.cachePool,o!==null?(_=rt._currentValue,o=o.parent!==_?{parent:_,pool:_}:o):o=Om(),S={baseLanes:S.baseLanes|a,cachePool:o}),i.memoizedState=S,i.childLanes=hf(e,g,a),t.memoizedState=ff,tr(e.child,i)):(La(t),a=e.child,e=a.sibling,a=ta(a,{mode:"visible",children:i.children}),a.return=t,a.sibling=null,e!==null&&(g=t.deletions,g===null?(t.deletions=[e],t.flags|=16):g.push(e)),t.child=a,t.memoizedState=null,a)}function mf(e,t){return t=Do({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Do(e,t){return e=an(22,e,null,t),e.lanes=0,e}function pf(e,t,a){return Bs(t,e.child,null,a),e=mf(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Pp(e,t,a){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),Cu(e.return,t,a)}function yf(e,t,a,i,o,f){var g=e.memoizedState;g===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:a,tailMode:o,treeForkCount:f}:(g.isBackwards=t,g.rendering=null,g.renderingStartTime=0,g.last=i,g.tail=a,g.tailMode=o,g.treeForkCount=f)}function Kp(e,t,a){var i=t.pendingProps,o=i.revealOrder,f=i.tail;i=i.children;var g=st.current,S=(g&2)!==0;if(S?(g=g&1|2,t.flags|=128):g&=1,ae(st,g),wt(e,t,i,a),i=ze?Gl:0,!S&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Pp(e,a,t);else if(e.tag===19)Pp(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&&wo(e)===null&&(o=a),a=a.sibling;a=o,a===null?(o=t.child,t.child=null):(o=a.sibling,a.sibling=null),yf(t,!1,o,a,f,i);break;case"backwards":case"unstable_legacy-backwards":for(a=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&wo(e)===null){t.child=o;break}e=o.sibling,o.sibling=a,a=o,o=e}yf(t,!0,a,null,f,i);break;case"together":yf(t,!1,null,null,void 0,i);break;default:t.memoizedState=null}return t.child}function ra(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Qa|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(zi(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=ta(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=ta(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function gf(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&po(e)))}function Vx(e,t,a){switch(t.tag){case 3:Ve(t,t.stateNode.containerInfo),za(t,rt,e.memoizedState.cache),Os();break;case 27:case 5:mn(t);break;case 4:Ve(t,t.stateNode.containerInfo);break;case 10:za(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Qu(t),null;break;case 13:var i=t.memoizedState;if(i!==null)return i.dehydrated!==null?(La(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Yp(e,t,a):(La(t),e=ra(e,t,a),e!==null?e.sibling:null);La(t);break;case 19:var o=(e.flags&128)!==0;if(i=(a&t.childLanes)!==0,i||(zi(e,t,a,!1),i=(a&t.childLanes)!==0),o){if(i)return Kp(e,t,a);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),ae(st,st.current),i)break;return null;case 22:return t.lanes=0,Bp(e,t,a,t.pendingProps);case 24:za(t,rt,e.memoizedState.cache)}return ra(e,t,a)}function Xp(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)ct=!0;else{if(!gf(e,a)&&(t.flags&128)===0)return ct=!1,Vx(e,t,a);ct=(e.flags&131072)!==0}else ct=!1,ze&&(t.flags&1048576)!==0&&Rm(t,Gl,t.index);switch(t.lanes=0,t.tag){case 16:e:{var i=t.pendingProps;if(e=Us(t.elementType),t.type=e,typeof e=="function")Su(e)?(i=Hs(e,i),t.tag=1,t=Gp(null,t,e,i,a)):(t.tag=0,t=uf(null,t,e,i,a));else{if(e!=null){var o=e.$$typeof;if(o===T){t.tag=11,t=Dp(null,t,e,i,a);break e}else if(o===k){t.tag=14,t=Up(null,t,e,i,a);break e}}throw t=ee(e)||e,Error(r(306,t,""))}}return t;case 0:return uf(e,t,t.type,t.pendingProps,a);case 1:return i=t.type,o=Hs(i,t.pendingProps),Gp(e,t,i,o,a);case 3:e:{if(Ve(t,t.stateNode.containerInfo),e===null)throw Error(r(387));i=t.pendingProps;var f=t.memoizedState;o=f.element,Uu(e,t),Jl(t,i,null,a);var g=t.memoizedState;if(i=g.cache,za(t,rt,i),i!==f.cache&&Mu(t,[rt],a,!0),Fl(),i=g.element,f.isDehydrated)if(f={element:i,isDehydrated:!1,cache:g.cache},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){t=Vp(e,t,i,a);break e}else if(i!==o){o=vn(Error(r(424)),t),Vl(o),t=Vp(e,t,i,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(Je=wn(e.firstChild),St=t,ze=!0,Aa=null,Sn=!0,a=Bm(t,null,i,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Os(),i===o){t=ra(e,t,a);break e}wt(e,t,i,a)}t=t.child}return t;case 26:return ko(e,t),e===null?(a=sg(t.type,null,t.pendingProps,null))?t.memoizedState=a:ze||(a=t.type,e=t.pendingProps,i=Io(me.current).createElement(a),i[xt]=t,i[qt]=e,Nt(i,a,e),pt(i),t.stateNode=i):t.memoizedState=sg(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return mn(t),e===null&&ze&&(i=t.stateNode=tg(t.type,t.pendingProps,me.current),St=t,Sn=!0,o=Je,Ka(t.type)?(Jf=o,Je=wn(i.firstChild)):Je=o),wt(e,t,t.pendingProps.children,a),ko(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ze&&((o=i=Je)&&(i=b1(i,t.type,t.pendingProps,Sn),i!==null?(t.stateNode=i,St=t,Je=wn(i.firstChild),Sn=!1,o=!0):o=!1),o||Oa(t)),mn(t),o=t.type,f=t.pendingProps,g=e!==null?e.memoizedProps:null,i=f.children,Pf(o,f)?i=null:g!==null&&Pf(o,g)&&(t.flags|=32),t.memoizedState!==null&&(o=Vu(e,t,kx,null,null,a),yr._currentValue=o),ko(e,t),wt(e,t,i,a),t.child;case 6:return e===null&&ze&&((e=a=Je)&&(a=x1(a,t.pendingProps,Sn),a!==null?(t.stateNode=a,St=t,Je=null,e=!0):e=!1),e||Oa(t)),null;case 13:return Yp(e,t,a);case 4:return Ve(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Bs(t,null,i,a):wt(e,t,i,a),t.child;case 11:return Dp(e,t,t.type,t.pendingProps,a);case 7:return wt(e,t,t.pendingProps,a),t.child;case 8:return wt(e,t,t.pendingProps.children,a),t.child;case 12:return wt(e,t,t.pendingProps.children,a),t.child;case 10:return i=t.pendingProps,za(t,t.type,i.value),wt(e,t,i.children,a),t.child;case 9:return o=t.type._context,i=t.pendingProps.children,ks(t),o=jt(o),i=i(o),t.flags|=1,wt(e,t,i,a),t.child;case 14:return Up(e,t,t.type,t.pendingProps,a);case 15:return Lp(e,t,t.type,t.pendingProps,a);case 19:return Kp(e,t,a);case 31:return Gx(e,t,a);case 22:return Bp(e,t,a,t.pendingProps);case 24:return ks(t),i=jt(rt),e===null?(o=zu(),o===null&&(o=Fe,f=Au(),o.pooledCache=f,f.refCount++,f!==null&&(o.pooledCacheLanes|=a),o=f),t.memoizedState={parent:i,cache:o},Du(t),za(t,rt,o)):((e.lanes&a)!==0&&(Uu(e,t),Jl(t,null,null,a),Fl()),o=e.memoizedState,f=t.memoizedState,o.parent!==i?(o={parent:i,cache:i},t.memoizedState=o,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=o),za(t,rt,i)):(i=f.cache,za(t,rt,i),i!==o.cache&&Mu(t,[rt],a,!0))),wt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function oa(e){e.flags|=4}function vf(e,t,a,i,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(xy())e.flags|=8192;else throw Ls=bo,ku}else e.flags&=-16777217}function Zp(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!cg(t))if(xy())e.flags|=8192;else throw Ls=bo,ku}function Uo(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Eh():536870912,e.lanes|=t,Pi|=t)}function nr(e,t){if(!ze)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 i=null;a!==null;)a.alternate!==null&&(i=a),a=a.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function Ie(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,i=0;if(t)for(var o=e.child;o!==null;)a|=o.lanes|o.childLanes,i|=o.subtreeFlags&65011712,i|=o.flags&65011712,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)a|=o.lanes|o.childLanes,i|=o.subtreeFlags,i|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=i,e.childLanes=a,t}function Yx(e,t,a){var i=t.pendingProps;switch(Ru(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ie(t),null;case 1:return Ie(t),null;case 3:return a=t.stateNode,i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),sa(rt),ge(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Oi(t)?oa(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Eu())),Ie(t),null;case 26:var o=t.type,f=t.memoizedState;return e===null?(oa(t),f!==null?(Ie(t),Zp(t,f)):(Ie(t),vf(t,o,null,i,a))):f?f!==e.memoizedState?(oa(t),Ie(t),Zp(t,f)):(Ie(t),t.flags&=-16777217):(e=e.memoizedProps,e!==i&&oa(t),Ie(t),vf(t,o,e,i,a)),null;case 27:if(Bt(t),a=me.current,o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&oa(t);else{if(!i){if(t.stateNode===null)throw Error(r(166));return Ie(t),null}e=se.current,Oi(t)?Em(t):(e=tg(o,i,a),t.stateNode=e,oa(t))}return Ie(t),null;case 5:if(Bt(t),o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&oa(t);else{if(!i){if(t.stateNode===null)throw Error(r(166));return Ie(t),null}if(f=se.current,Oi(t))Em(t);else{var g=Io(me.current);switch(f){case 1:f=g.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:f=g.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":f=g.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":f=g.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":f=g.createElement("div"),f.innerHTML="<script><\/script>",f=f.removeChild(f.firstChild);break;case"select":f=typeof i.is=="string"?g.createElement("select",{is:i.is}):g.createElement("select"),i.multiple?f.multiple=!0:i.size&&(f.size=i.size);break;default:f=typeof i.is=="string"?g.createElement(o,{is:i.is}):g.createElement(o)}}f[xt]=t,f[qt]=i;e:for(g=t.child;g!==null;){if(g.tag===5||g.tag===6)f.appendChild(g.stateNode);else if(g.tag!==4&&g.tag!==27&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===t)break e;for(;g.sibling===null;){if(g.return===null||g.return===t)break e;g=g.return}g.sibling.return=g.return,g=g.sibling}t.stateNode=f;e:switch(Nt(f,o,i),o){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&oa(t)}}return Ie(t),vf(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==i&&oa(t);else{if(typeof i!="string"&&t.stateNode===null)throw Error(r(166));if(e=me.current,Oi(t)){if(e=t.stateNode,a=t.memoizedProps,i=null,o=St,o!==null)switch(o.tag){case 27:case 5:i=o.memoizedProps}e[xt]=t,e=!!(e.nodeValue===a||i!==null&&i.suppressHydrationWarning===!0||Yy(e.nodeValue,a)),e||Oa(t,!0)}else e=Io(e).createTextNode(i),e[xt]=t,t.stateNode=e}return Ie(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(i=Oi(t),a!==null){if(e===null){if(!i)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[xt]=t}else Os(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ie(t),e=!1}else a=Eu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(ln(t),t):(ln(t),null);if((t.flags&128)!==0)throw Error(r(558))}return Ie(t),null;case 13:if(i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=Oi(t),i!==null&&i.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[xt]=t}else Os(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ie(t),o=!1}else o=Eu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(ln(t),t):(ln(t),null)}return ln(t),(t.flags&128)!==0?(t.lanes=a,t):(a=i!==null,e=e!==null&&e.memoizedState!==null,a&&(i=t.child,o=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(o=i.alternate.memoizedState.cachePool.pool),f=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(f=i.memoizedState.cachePool.pool),f!==o&&(i.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),Uo(t,t.updateQueue),Ie(t),null);case 4:return ge(),e===null&&Hf(t.stateNode.containerInfo),Ie(t),null;case 10:return sa(t.type),Ie(t),null;case 19:if(J(st),i=t.memoizedState,i===null)return Ie(t),null;if(o=(t.flags&128)!==0,f=i.rendering,f===null)if(o)nr(i,!1);else{if(tt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=wo(e),f!==null){for(t.flags|=128,nr(i,!1),e=f.updateQueue,t.updateQueue=e,Uo(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)jm(a,e),a=a.sibling;return ae(st,st.current&1|2),ze&&na(t,i.treeForkCount),t.child}e=e.sibling}i.tail!==null&&_t()>Qo&&(t.flags|=128,o=!0,nr(i,!1),t.lanes=4194304)}else{if(!o)if(e=wo(f),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,Uo(t,e),nr(i,!0),i.tail===null&&i.tailMode==="hidden"&&!f.alternate&&!ze)return Ie(t),null}else 2*_t()-i.renderingStartTime>Qo&&a!==536870912&&(t.flags|=128,o=!0,nr(i,!1),t.lanes=4194304);i.isBackwards?(f.sibling=t.child,t.child=f):(e=i.last,e!==null?e.sibling=f:t.child=f,i.last=f)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=_t(),e.sibling=null,a=st.current,ae(st,o?a&1|2:a&1),ze&&na(t,i.treeForkCount),e):(Ie(t),null);case 22:case 23:return ln(t),Hu(),i=t.memoizedState!==null,e!==null?e.memoizedState!==null!==i&&(t.flags|=8192):i&&(t.flags|=8192),i?(a&536870912)!==0&&(t.flags&128)===0&&(Ie(t),t.subtreeFlags&6&&(t.flags|=8192)):Ie(t),a=t.updateQueue,a!==null&&Uo(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),i=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),i!==a&&(t.flags|=2048),e!==null&&J(Ds),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),sa(rt),Ie(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function Px(e,t){switch(Ru(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return sa(rt),ge(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Bt(t),null;case 31:if(t.memoizedState!==null){if(ln(t),t.alternate===null)throw Error(r(340));Os()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ln(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Os()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return J(st),null;case 4:return ge(),null;case 10:return sa(t.type),null;case 22:case 23:return ln(t),Hu(),e!==null&&J(Ds),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return sa(rt),null;case 25:return null;default:return null}}function Fp(e,t){switch(Ru(t),t.tag){case 3:sa(rt),ge();break;case 26:case 27:case 5:Bt(t);break;case 4:ge();break;case 31:t.memoizedState!==null&&ln(t);break;case 13:ln(t);break;case 19:J(st);break;case 10:sa(t.type);break;case 22:case 23:ln(t),Hu(),e!==null&&J(Ds);break;case 24:sa(rt)}}function ar(e,t){try{var a=t.updateQueue,i=a!==null?a.lastEffect:null;if(i!==null){var o=i.next;a=o;do{if((a.tag&e)===e){i=void 0;var f=a.create,g=a.inst;i=f(),g.destroy=i}a=a.next}while(a!==o)}}catch(S){Ge(t,t.return,S)}}function qa(e,t,a){try{var i=t.updateQueue,o=i!==null?i.lastEffect:null;if(o!==null){var f=o.next;i=f;do{if((i.tag&e)===e){var g=i.inst,S=g.destroy;if(S!==void 0){g.destroy=void 0,o=t;var _=a,H=S;try{H()}catch(X){Ge(o,_,X)}}}i=i.next}while(i!==f)}}catch(X){Ge(t,t.return,X)}}function Jp(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Hm(t,a)}catch(i){Ge(e,e.return,i)}}}function Ip(e,t,a){a.props=Hs(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(i){Ge(e,t,i)}}function sr(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var i=e.stateNode;break;case 30:i=e.stateNode;break;default:i=e.stateNode}typeof a=="function"?e.refCleanup=a(i):a.current=i}}catch(o){Ge(e,t,o)}}function qn(e,t){var a=e.ref,i=e.refCleanup;if(a!==null)if(typeof i=="function")try{i()}catch(o){Ge(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){Ge(e,t,o)}else a.current=null}function $p(e){var t=e.type,a=e.memoizedProps,i=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&i.focus();break e;case"img":a.src?i.src=a.src:a.srcSet&&(i.srcset=a.srcSet)}}catch(o){Ge(e,e.return,o)}}function bf(e,t,a){try{var i=e.stateNode;h1(i,e.type,a,t),i[qt]=t}catch(o){Ge(e,e.return,o)}}function Wp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ka(e.type)||e.tag===4}function xf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Wp(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&&Ka(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 Sf(e,t,a){var i=e.tag;if(i===5||i===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=Wn));else if(i!==4&&(i===27&&Ka(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Sf(e,t,a),e=e.sibling;e!==null;)Sf(e,t,a),e=e.sibling}function Lo(e,t,a){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(i!==4&&(i===27&&Ka(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Lo(e,t,a),e=e.sibling;e!==null;)Lo(e,t,a),e=e.sibling}function ey(e){var t=e.stateNode,a=e.memoizedProps;try{for(var i=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);Nt(t,i,a),t[xt]=e,t[qt]=a}catch(f){Ge(e,e.return,f)}}var ca=!1,ut=!1,jf=!1,ty=typeof WeakSet=="function"?WeakSet:Set,yt=null;function Kx(e,t){if(e=e.containerInfo,Vf=sc,e=hm(e),mu(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var i=a.getSelection&&a.getSelection();if(i&&i.rangeCount!==0){a=i.anchorNode;var o=i.anchorOffset,f=i.focusNode;i=i.focusOffset;try{a.nodeType,f.nodeType}catch{a=null;break e}var g=0,S=-1,_=-1,H=0,X=0,I=e,G=null;t:for(;;){for(var Y;I!==a||o!==0&&I.nodeType!==3||(S=g+o),I!==f||i!==0&&I.nodeType!==3||(_=g+i),I.nodeType===3&&(g+=I.nodeValue.length),(Y=I.firstChild)!==null;)G=I,I=Y;for(;;){if(I===e)break t;if(G===a&&++H===o&&(S=g),G===f&&++X===i&&(_=g),(Y=I.nextSibling)!==null)break;I=G,G=I.parentNode}I=Y}a=S===-1||_===-1?null:{start:S,end:_}}else a=null}a=a||{start:0,end:0}}else a=null;for(Yf={focusedElem:e,selectionRange:a},sc=!1,yt=t;yt!==null;)if(t=yt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,yt=e;else for(;yt!==null;){switch(t=yt,f=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&&f!==null){e=void 0,a=t,o=f.memoizedProps,f=f.memoizedState,i=a.stateNode;try{var ce=Hs(a.type,o);e=i.getSnapshotBeforeUpdate(ce,f),i.__reactInternalSnapshotBeforeUpdate=e}catch(ye){Ge(a,a.return,ye)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Xf(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Xf(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,yt=e;break}yt=t.return}}function ny(e,t,a){var i=a.flags;switch(a.tag){case 0:case 11:case 15:fa(e,a),i&4&&ar(5,a);break;case 1:if(fa(e,a),i&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(g){Ge(a,a.return,g)}else{var o=Hs(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(g){Ge(a,a.return,g)}}i&64&&Jp(a),i&512&&sr(a,a.return);break;case 3:if(fa(e,a),i&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{Hm(e,t)}catch(g){Ge(a,a.return,g)}}break;case 27:t===null&&i&4&&ey(a);case 26:case 5:fa(e,a),t===null&&i&4&&$p(a),i&512&&sr(a,a.return);break;case 12:fa(e,a);break;case 31:fa(e,a),i&4&&iy(e,a);break;case 13:fa(e,a),i&4&&ly(e,a),i&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=t1.bind(null,a),S1(e,a))));break;case 22:if(i=a.memoizedState!==null||ca,!i){t=t!==null&&t.memoizedState!==null||ut,o=ca;var f=ut;ca=i,(ut=t)&&!f?da(e,a,(a.subtreeFlags&8772)!==0):fa(e,a),ca=o,ut=f}break;case 30:break;default:fa(e,a)}}function ay(e){var t=e.alternate;t!==null&&(e.alternate=null,ay(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ic(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 $e=null,Qt=!1;function ua(e,t,a){for(a=a.child;a!==null;)sy(e,t,a),a=a.sibling}function sy(e,t,a){if(en&&typeof en.onCommitFiberUnmount=="function")try{en.onCommitFiberUnmount(Tl,a)}catch{}switch(a.tag){case 26:ut||qn(a,t),ua(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:ut||qn(a,t);var i=$e,o=Qt;Ka(a.type)&&($e=a.stateNode,Qt=!1),ua(e,t,a),hr(a.stateNode),$e=i,Qt=o;break;case 5:ut||qn(a,t);case 6:if(i=$e,o=Qt,$e=null,ua(e,t,a),$e=i,Qt=o,$e!==null)if(Qt)try{($e.nodeType===9?$e.body:$e.nodeName==="HTML"?$e.ownerDocument.body:$e).removeChild(a.stateNode)}catch(f){Ge(a,t,f)}else try{$e.removeChild(a.stateNode)}catch(f){Ge(a,t,f)}break;case 18:$e!==null&&(Qt?(e=$e,Jy(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Wi(e)):Jy($e,a.stateNode));break;case 4:i=$e,o=Qt,$e=a.stateNode.containerInfo,Qt=!0,ua(e,t,a),$e=i,Qt=o;break;case 0:case 11:case 14:case 15:qa(2,a,t),ut||qa(4,a,t),ua(e,t,a);break;case 1:ut||(qn(a,t),i=a.stateNode,typeof i.componentWillUnmount=="function"&&Ip(a,t,i)),ua(e,t,a);break;case 21:ua(e,t,a);break;case 22:ut=(i=ut)||a.memoizedState!==null,ua(e,t,a),ut=i;break;default:ua(e,t,a)}}function iy(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Wi(e)}catch(a){Ge(t,t.return,a)}}}function ly(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Wi(e)}catch(a){Ge(t,t.return,a)}}function Xx(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ty),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ty),t;default:throw Error(r(435,e.tag))}}function Bo(e,t){var a=Xx(e);t.forEach(function(i){if(!a.has(i)){a.add(i);var o=n1.bind(null,e,i);i.then(o,o)}})}function Gt(e,t){var a=t.deletions;if(a!==null)for(var i=0;i<a.length;i++){var o=a[i],f=e,g=t,S=g;e:for(;S!==null;){switch(S.tag){case 27:if(Ka(S.type)){$e=S.stateNode,Qt=!1;break e}break;case 5:$e=S.stateNode,Qt=!1;break e;case 3:case 4:$e=S.stateNode.containerInfo,Qt=!0;break e}S=S.return}if($e===null)throw Error(r(160));sy(f,g,o),$e=null,Qt=!1,f=o.alternate,f!==null&&(f.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)ry(t,e),t=t.sibling}var Cn=null;function ry(e,t){var a=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Gt(t,e),Vt(e),i&4&&(qa(3,e,e.return),ar(3,e),qa(5,e,e.return));break;case 1:Gt(t,e),Vt(e),i&512&&(ut||a===null||qn(a,a.return)),i&64&&ca&&(e=e.updateQueue,e!==null&&(i=e.callbacks,i!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?i:a.concat(i))));break;case 26:var o=Cn;if(Gt(t,e),Vt(e),i&512&&(ut||a===null||qn(a,a.return)),i&4){var f=a!==null?a.memoizedState:null;if(i=e.memoizedState,a===null)if(i===null)if(e.stateNode===null){e:{i=e.type,a=e.memoizedProps,o=o.ownerDocument||o;t:switch(i){case"title":f=o.getElementsByTagName("title")[0],(!f||f[Al]||f[xt]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=o.createElement(i),o.head.insertBefore(f,o.querySelector("head > title"))),Nt(f,i,a),f[xt]=e,pt(f),i=f;break e;case"link":var g=rg("link","href",o).get(i+(a.href||""));if(g){for(var S=0;S<g.length;S++)if(f=g[S],f.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&f.getAttribute("rel")===(a.rel==null?null:a.rel)&&f.getAttribute("title")===(a.title==null?null:a.title)&&f.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){g.splice(S,1);break t}}f=o.createElement(i),Nt(f,i,a),o.head.appendChild(f);break;case"meta":if(g=rg("meta","content",o).get(i+(a.content||""))){for(S=0;S<g.length;S++)if(f=g[S],f.getAttribute("content")===(a.content==null?null:""+a.content)&&f.getAttribute("name")===(a.name==null?null:a.name)&&f.getAttribute("property")===(a.property==null?null:a.property)&&f.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&f.getAttribute("charset")===(a.charSet==null?null:a.charSet)){g.splice(S,1);break t}}f=o.createElement(i),Nt(f,i,a),o.head.appendChild(f);break;default:throw Error(r(468,i))}f[xt]=e,pt(f),i=f}e.stateNode=i}else og(o,e.type,e.stateNode);else e.stateNode=lg(o,i,e.memoizedProps);else f!==i?(f===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):f.count--,i===null?og(o,e.type,e.stateNode):lg(o,i,e.memoizedProps)):i===null&&e.stateNode!==null&&bf(e,e.memoizedProps,a.memoizedProps)}break;case 27:Gt(t,e),Vt(e),i&512&&(ut||a===null||qn(a,a.return)),a!==null&&i&4&&bf(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Gt(t,e),Vt(e),i&512&&(ut||a===null||qn(a,a.return)),e.flags&32){o=e.stateNode;try{ji(o,"")}catch(ce){Ge(e,e.return,ce)}}i&4&&e.stateNode!=null&&(o=e.memoizedProps,bf(e,o,a!==null?a.memoizedProps:o)),i&1024&&(jf=!0);break;case 6:if(Gt(t,e),Vt(e),i&4){if(e.stateNode===null)throw Error(r(162));i=e.memoizedProps,a=e.stateNode;try{a.nodeValue=i}catch(ce){Ge(e,e.return,ce)}}break;case 3:if(ec=null,o=Cn,Cn=$o(t.containerInfo),Gt(t,e),Cn=o,Vt(e),i&4&&a!==null&&a.memoizedState.isDehydrated)try{Wi(t.containerInfo)}catch(ce){Ge(e,e.return,ce)}jf&&(jf=!1,oy(e));break;case 4:i=Cn,Cn=$o(e.stateNode.containerInfo),Gt(t,e),Vt(e),Cn=i;break;case 12:Gt(t,e),Vt(e);break;case 31:Gt(t,e),Vt(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,Bo(e,i)));break;case 13:Gt(t,e),Vt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Ho=_t()),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,Bo(e,i)));break;case 22:o=e.memoizedState!==null;var _=a!==null&&a.memoizedState!==null,H=ca,X=ut;if(ca=H||o,ut=X||_,Gt(t,e),ut=X,ca=H,Vt(e),i&8192)e:for(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,o&&(a===null||_||ca||ut||Qs(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){_=a=t;try{if(f=_.stateNode,o)g=f.style,typeof g.setProperty=="function"?g.setProperty("display","none","important"):g.display="none";else{S=_.stateNode;var I=_.memoizedProps.style,G=I!=null&&I.hasOwnProperty("display")?I.display:null;S.style.display=G==null||typeof G=="boolean"?"":(""+G).trim()}}catch(ce){Ge(_,_.return,ce)}}}else if(t.tag===6){if(a===null){_=t;try{_.stateNode.nodeValue=o?"":_.memoizedProps}catch(ce){Ge(_,_.return,ce)}}}else if(t.tag===18){if(a===null){_=t;try{var Y=_.stateNode;o?Iy(Y,!0):Iy(_.stateNode,!1)}catch(ce){Ge(_,_.return,ce)}}}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}i&4&&(i=e.updateQueue,i!==null&&(a=i.retryQueue,a!==null&&(i.retryQueue=null,Bo(e,a))));break;case 19:Gt(t,e),Vt(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,Bo(e,i)));break;case 30:break;case 21:break;default:Gt(t,e),Vt(e)}}function Vt(e){var t=e.flags;if(t&2){try{for(var a,i=e.return;i!==null;){if(Wp(i)){a=i;break}i=i.return}if(a==null)throw Error(r(160));switch(a.tag){case 27:var o=a.stateNode,f=xf(e);Lo(e,f,o);break;case 5:var g=a.stateNode;a.flags&32&&(ji(g,""),a.flags&=-33);var S=xf(e);Lo(e,S,g);break;case 3:case 4:var _=a.stateNode.containerInfo,H=xf(e);Sf(e,H,_);break;default:throw Error(r(161))}}catch(X){Ge(e,e.return,X)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function oy(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;oy(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function fa(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ny(e,t.alternate,t),t=t.sibling}function Qs(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:qa(4,t,t.return),Qs(t);break;case 1:qn(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Ip(t,t.return,a),Qs(t);break;case 27:hr(t.stateNode);case 26:case 5:qn(t,t.return),Qs(t);break;case 22:t.memoizedState===null&&Qs(t);break;case 30:Qs(t);break;default:Qs(t)}e=e.sibling}}function da(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var i=t.alternate,o=e,f=t,g=f.flags;switch(f.tag){case 0:case 11:case 15:da(o,f,a),ar(4,f);break;case 1:if(da(o,f,a),i=f,o=i.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(H){Ge(i,i.return,H)}if(i=f,o=i.updateQueue,o!==null){var S=i.stateNode;try{var _=o.shared.hiddenCallbacks;if(_!==null)for(o.shared.hiddenCallbacks=null,o=0;o<_.length;o++)qm(_[o],S)}catch(H){Ge(i,i.return,H)}}a&&g&64&&Jp(f),sr(f,f.return);break;case 27:ey(f);case 26:case 5:da(o,f,a),a&&i===null&&g&4&&$p(f),sr(f,f.return);break;case 12:da(o,f,a);break;case 31:da(o,f,a),a&&g&4&&iy(o,f);break;case 13:da(o,f,a),a&&g&4&&ly(o,f);break;case 22:f.memoizedState===null&&da(o,f,a),sr(f,f.return);break;case 30:break;default:da(o,f,a)}t=t.sibling}}function wf(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&&Yl(a))}function Nf(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Yl(e))}function Mn(e,t,a,i){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)cy(e,t,a,i),t=t.sibling}function cy(e,t,a,i){var o=t.flags;switch(t.tag){case 0:case 11:case 15:Mn(e,t,a,i),o&2048&&ar(9,t);break;case 1:Mn(e,t,a,i);break;case 3:Mn(e,t,a,i),o&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Yl(e)));break;case 12:if(o&2048){Mn(e,t,a,i),e=t.stateNode;try{var f=t.memoizedProps,g=f.id,S=f.onPostCommit;typeof S=="function"&&S(g,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(_){Ge(t,t.return,_)}}else Mn(e,t,a,i);break;case 31:Mn(e,t,a,i);break;case 13:Mn(e,t,a,i);break;case 23:break;case 22:f=t.stateNode,g=t.alternate,t.memoizedState!==null?f._visibility&2?Mn(e,t,a,i):ir(e,t):f._visibility&2?Mn(e,t,a,i):(f._visibility|=2,Gi(e,t,a,i,(t.subtreeFlags&10256)!==0||!1)),o&2048&&wf(g,t);break;case 24:Mn(e,t,a,i),o&2048&&Nf(t.alternate,t);break;default:Mn(e,t,a,i)}}function Gi(e,t,a,i,o){for(o=o&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var f=e,g=t,S=a,_=i,H=g.flags;switch(g.tag){case 0:case 11:case 15:Gi(f,g,S,_,o),ar(8,g);break;case 23:break;case 22:var X=g.stateNode;g.memoizedState!==null?X._visibility&2?Gi(f,g,S,_,o):ir(f,g):(X._visibility|=2,Gi(f,g,S,_,o)),o&&H&2048&&wf(g.alternate,g);break;case 24:Gi(f,g,S,_,o),o&&H&2048&&Nf(g.alternate,g);break;default:Gi(f,g,S,_,o)}t=t.sibling}}function ir(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,i=t,o=i.flags;switch(i.tag){case 22:ir(a,i),o&2048&&wf(i.alternate,i);break;case 24:ir(a,i),o&2048&&Nf(i.alternate,i);break;default:ir(a,i)}t=t.sibling}}var lr=8192;function Vi(e,t,a){if(e.subtreeFlags&lr)for(e=e.child;e!==null;)uy(e,t,a),e=e.sibling}function uy(e,t,a){switch(e.tag){case 26:Vi(e,t,a),e.flags&lr&&e.memoizedState!==null&&z1(a,Cn,e.memoizedState,e.memoizedProps);break;case 5:Vi(e,t,a);break;case 3:case 4:var i=Cn;Cn=$o(e.stateNode.containerInfo),Vi(e,t,a),Cn=i;break;case 22:e.memoizedState===null&&(i=e.alternate,i!==null&&i.memoizedState!==null?(i=lr,lr=16777216,Vi(e,t,a),lr=i):Vi(e,t,a));break;default:Vi(e,t,a)}}function fy(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 rr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var i=t[a];yt=i,hy(i,e)}fy(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)dy(e),e=e.sibling}function dy(e){switch(e.tag){case 0:case 11:case 15:rr(e),e.flags&2048&&qa(9,e,e.return);break;case 3:rr(e);break;case 12:rr(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,qo(e)):rr(e);break;default:rr(e)}}function qo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var i=t[a];yt=i,hy(i,e)}fy(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:qa(8,t,t.return),qo(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,qo(t));break;default:qo(t)}e=e.sibling}}function hy(e,t){for(;yt!==null;){var a=yt;switch(a.tag){case 0:case 11:case 15:qa(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var i=a.memoizedState.cachePool.pool;i!=null&&i.refCount++}break;case 24:Yl(a.memoizedState.cache)}if(i=a.child,i!==null)i.return=a,yt=i;else e:for(a=e;yt!==null;){i=yt;var o=i.sibling,f=i.return;if(ay(i),i===a){yt=null;break e}if(o!==null){o.return=f,yt=o;break e}yt=f}}}var Zx={getCacheForType:function(e){var t=jt(rt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return jt(rt).controller.signal}},Fx=typeof WeakMap=="function"?WeakMap:Map,Le=0,Fe=null,_e=null,Ce=0,Qe=0,rn=null,Ha=!1,Yi=!1,Rf=!1,ha=0,tt=0,Qa=0,Gs=0,_f=0,on=0,Pi=0,or=null,Yt=null,Ef=!1,Ho=0,my=0,Qo=1/0,Go=null,Ga=null,dt=0,Va=null,Ki=null,ma=0,Tf=0,Cf=null,py=null,cr=0,Mf=null;function cn(){return(Le&2)!==0&&Ce!==0?Ce&-Ce:L.T!==null?Uf():Ah()}function yy(){if(on===0)if((Ce&536870912)===0||ze){var e=Fr;Fr<<=1,(Fr&3932160)===0&&(Fr=262144),on=e}else on=536870912;return e=sn.current,e!==null&&(e.flags|=32),on}function Pt(e,t,a){(e===Fe&&(Qe===2||Qe===9)||e.cancelPendingCommit!==null)&&(Xi(e,0),Ya(e,Ce,on,!1)),Ml(e,a),((Le&2)===0||e!==Fe)&&(e===Fe&&((Le&2)===0&&(Gs|=a),tt===4&&Ya(e,Ce,on,!1)),Hn(e))}function gy(e,t,a){if((Le&6)!==0)throw Error(r(327));var i=!a&&(t&127)===0&&(t&e.expiredLanes)===0||Cl(e,t),o=i?$x(e,t):Of(e,t,!0),f=i;do{if(o===0){Yi&&!i&&Ya(e,t,0,!1);break}else{if(a=e.current.alternate,f&&!Jx(a)){o=Of(e,t,!1),f=!1;continue}if(o===2){if(f=t,e.errorRecoveryDisabledLanes&f)var g=0;else g=e.pendingLanes&-536870913,g=g!==0?g:g&536870912?536870912:0;if(g!==0){t=g;e:{var S=e;o=or;var _=S.current.memoizedState.isDehydrated;if(_&&(Xi(S,g).flags|=256),g=Of(S,g,!1),g!==2){if(Rf&&!_){S.errorRecoveryDisabledLanes|=f,Gs|=f,o=4;break e}f=Yt,Yt=o,f!==null&&(Yt===null?Yt=f:Yt.push.apply(Yt,f))}o=g}if(f=!1,o!==2)continue}}if(o===1){Xi(e,0),Ya(e,t,0,!0);break}e:{switch(i=e,f=o,f){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:Ya(i,t,on,!Ha);break e;case 2:Yt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(o=Ho+300-_t(),10<o)){if(Ya(i,t,on,!Ha),Ir(i,0,!0)!==0)break e;ma=t,i.timeoutHandle=Zy(vy.bind(null,i,a,Yt,Go,Ef,t,on,Gs,Pi,Ha,f,"Throttled",-0,0),o);break e}vy(i,a,Yt,Go,Ef,t,on,Gs,Pi,Ha,f,null,-0,0)}}break}while(!0);Hn(e)}function vy(e,t,a,i,o,f,g,S,_,H,X,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:Wn},uy(t,f,I);var ce=(f&62914560)===f?Ho-_t():(f&4194048)===f?my-_t():0;if(ce=k1(I,ce),ce!==null){ma=f,e.cancelPendingCommit=ce(_y.bind(null,e,t,f,a,i,o,g,S,_,X,I,null,G,Y)),Ya(e,f,g,!H);return}}_y(e,t,f,a,i,o,g,S,_)}function Jx(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 i=0;i<a.length;i++){var o=a[i],f=o.getSnapshot;o=o.value;try{if(!nn(f(),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 Ya(e,t,a,i){t&=~_f,t&=~Gs,e.suspendedLanes|=t,e.pingedLanes&=~t,i&&(e.warmLanes|=t),i=e.expirationTimes;for(var o=t;0<o;){var f=31-tn(o),g=1<<f;i[f]=-1,o&=~g}a!==0&&Th(e,a,t)}function Vo(){return(Le&6)===0?(ur(0),!1):!0}function Af(){if(_e!==null){if(Qe===0)var e=_e.return;else e=_e,aa=zs=null,Ku(e),Li=null,Kl=0,e=_e;for(;e!==null;)Fp(e.alternate,e),e=e.return;_e=null}}function Xi(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,y1(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),ma=0,Af(),Fe=e,_e=a=ta(e.current,null),Ce=t,Qe=0,rn=null,Ha=!1,Yi=Cl(e,t),Rf=!1,Pi=on=_f=Gs=Qa=tt=0,Yt=or=null,Ef=!1,(t&8)!==0&&(t|=t&32);var i=e.entangledLanes;if(i!==0)for(e=e.entanglements,i&=t;0<i;){var o=31-tn(i),f=1<<o;t|=e[o],i&=~f}return ha=t,co(),a}function by(e,t){xe=null,L.H=er,t===Ui||t===vo?(t=Dm(),Qe=3):t===ku?(t=Dm(),Qe=4):Qe=t===cf?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,rn=t,_e===null&&(tt=1,Oo(e,vn(t,e.current)))}function xy(){var e=sn.current;return e===null?!0:(Ce&4194048)===Ce?jn===null:(Ce&62914560)===Ce||(Ce&536870912)!==0?e===jn:!1}function Sy(){var e=L.H;return L.H=er,e===null?er:e}function jy(){var e=L.A;return L.A=Zx,e}function Yo(){tt=4,Ha||(Ce&4194048)!==Ce&&sn.current!==null||(Yi=!0),(Qa&134217727)===0&&(Gs&134217727)===0||Fe===null||Ya(Fe,Ce,on,!1)}function Of(e,t,a){var i=Le;Le|=2;var o=Sy(),f=jy();(Fe!==e||Ce!==t)&&(Go=null,Xi(e,t)),t=!1;var g=tt;e:do try{if(Qe!==0&&_e!==null){var S=_e,_=rn;switch(Qe){case 8:Af(),g=6;break e;case 3:case 2:case 9:case 6:sn.current===null&&(t=!0);var H=Qe;if(Qe=0,rn=null,Zi(e,S,_,H),a&&Yi){g=0;break e}break;default:H=Qe,Qe=0,rn=null,Zi(e,S,_,H)}}Ix(),g=tt;break}catch(X){by(e,X)}while(!0);return t&&e.shellSuspendCounter++,aa=zs=null,Le=i,L.H=o,L.A=f,_e===null&&(Fe=null,Ce=0,co()),g}function Ix(){for(;_e!==null;)wy(_e)}function $x(e,t){var a=Le;Le|=2;var i=Sy(),o=jy();Fe!==e||Ce!==t?(Go=null,Qo=_t()+500,Xi(e,t)):Yi=Cl(e,t);e:do try{if(Qe!==0&&_e!==null){t=_e;var f=rn;t:switch(Qe){case 1:Qe=0,rn=null,Zi(e,t,f,1);break;case 2:case 9:if(zm(f)){Qe=0,rn=null,Ny(t);break}t=function(){Qe!==2&&Qe!==9||Fe!==e||(Qe=7),Hn(e)},f.then(t,t);break e;case 3:Qe=7;break e;case 4:Qe=5;break e;case 7:zm(f)?(Qe=0,rn=null,Ny(t)):(Qe=0,rn=null,Zi(e,t,f,7));break;case 5:var g=null;switch(_e.tag){case 26:g=_e.memoizedState;case 5:case 27:var S=_e;if(g?cg(g):S.stateNode.complete){Qe=0,rn=null;var _=S.sibling;if(_!==null)_e=_;else{var H=S.return;H!==null?(_e=H,Po(H)):_e=null}break t}}Qe=0,rn=null,Zi(e,t,f,5);break;case 6:Qe=0,rn=null,Zi(e,t,f,6);break;case 8:Af(),tt=6;break e;default:throw Error(r(462))}}Wx();break}catch(X){by(e,X)}while(!0);return aa=zs=null,L.H=i,L.A=o,Le=a,_e!==null?0:(Fe=null,Ce=0,co(),tt)}function Wx(){for(;_e!==null&&!Xr();)wy(_e)}function wy(e){var t=Xp(e.alternate,e,ha);e.memoizedProps=e.pendingProps,t===null?Po(e):_e=t}function Ny(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=Qp(a,t,t.pendingProps,t.type,void 0,Ce);break;case 11:t=Qp(a,t,t.pendingProps,t.type.render,t.ref,Ce);break;case 5:Ku(t);default:Fp(a,t),t=_e=jm(t,ha),t=Xp(a,t,ha)}e.memoizedProps=e.pendingProps,t===null?Po(e):_e=t}function Zi(e,t,a,i){aa=zs=null,Ku(t),Li=null,Kl=0;var o=t.return;try{if(Qx(e,o,t,a,Ce)){tt=1,Oo(e,vn(a,e.current)),_e=null;return}}catch(f){if(o!==null)throw _e=o,f;tt=1,Oo(e,vn(a,e.current)),_e=null;return}t.flags&32768?(ze||i===1?e=!0:Yi||(Ce&536870912)!==0?e=!1:(Ha=e=!0,(i===2||i===9||i===3||i===6)&&(i=sn.current,i!==null&&i.tag===13&&(i.flags|=16384))),Ry(t,e)):Po(t)}function Po(e){var t=e;do{if((t.flags&32768)!==0){Ry(t,Ha);return}e=t.return;var a=Yx(t.alternate,t,ha);if(a!==null){_e=a;return}if(t=t.sibling,t!==null){_e=t;return}_e=t=e}while(t!==null);tt===0&&(tt=5)}function Ry(e,t){do{var a=Px(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);tt=6,_e=null}function _y(e,t,a,i,o,f,g,S,_){e.cancelPendingCommit=null;do Ko();while(dt!==0);if((Le&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(f=t.lanes|t.childLanes,f|=bu,Ob(e,a,f,g,S,_),e===Fe&&(_e=Fe=null,Ce=0),Ki=t,Va=e,ma=a,Tf=f,Cf=o,py=i,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,a1(pi,function(){return Ay(),null})):(e.callbackNode=null,e.callbackPriority=0),i=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||i){i=L.T,L.T=null,o=K.p,K.p=2,g=Le,Le|=4;try{Kx(e,t,a)}finally{Le=g,K.p=o,L.T=i}}dt=1,Ey(),Ty(),Cy()}}function Ey(){if(dt===1){dt=0;var e=Va,t=Ki,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=L.T,L.T=null;var i=K.p;K.p=2;var o=Le;Le|=4;try{ry(t,e);var f=Yf,g=hm(e.containerInfo),S=f.focusedElem,_=f.selectionRange;if(g!==S&&S&&S.ownerDocument&&dm(S.ownerDocument.documentElement,S)){if(_!==null&&mu(S)){var H=_.start,X=_.end;if(X===void 0&&(X=H),"selectionStart"in S)S.selectionStart=H,S.selectionEnd=Math.min(X,S.value.length);else{var I=S.ownerDocument||document,G=I&&I.defaultView||window;if(G.getSelection){var Y=G.getSelection(),ce=S.textContent.length,ye=Math.min(_.start,ce),Xe=_.end===void 0?ye:Math.min(_.end,ce);!Y.extend&&ye>Xe&&(g=Xe,Xe=ye,ye=g);var D=fm(S,ye),M=fm(S,Xe);if(D&&M&&(Y.rangeCount!==1||Y.anchorNode!==D.node||Y.anchorOffset!==D.offset||Y.focusNode!==M.node||Y.focusOffset!==M.offset)){var q=I.createRange();q.setStart(D.node,D.offset),Y.removeAllRanges(),ye>Xe?(Y.addRange(q),Y.extend(M.node,M.offset)):(q.setEnd(M.node,M.offset),Y.addRange(q))}}}}for(I=[],Y=S;Y=Y.parentNode;)Y.nodeType===1&&I.push({element:Y,left:Y.scrollLeft,top:Y.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<I.length;S++){var F=I[S];F.element.scrollLeft=F.left,F.element.scrollTop=F.top}}sc=!!Vf,Yf=Vf=null}finally{Le=o,K.p=i,L.T=a}}e.current=t,dt=2}}function Ty(){if(dt===2){dt=0;var e=Va,t=Ki,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=L.T,L.T=null;var i=K.p;K.p=2;var o=Le;Le|=4;try{ny(e,t.alternate,t)}finally{Le=o,K.p=i,L.T=a}}dt=3}}function Cy(){if(dt===4||dt===3){dt=0,Kc();var e=Va,t=Ki,a=ma,i=py;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?dt=5:(dt=0,Ki=Va=null,My(e,e.pendingLanes));var o=e.pendingLanes;if(o===0&&(Ga=null),Fc(a),t=t.stateNode,en&&typeof en.onCommitFiberRoot=="function")try{en.onCommitFiberRoot(Tl,t,void 0,(t.current.flags&128)===128)}catch{}if(i!==null){t=L.T,o=K.p,K.p=2,L.T=null;try{for(var f=e.onRecoverableError,g=0;g<i.length;g++){var S=i[g];f(S.value,{componentStack:S.stack})}}finally{L.T=t,K.p=o}}(ma&3)!==0&&Ko(),Hn(e),o=e.pendingLanes,(a&261930)!==0&&(o&42)!==0?e===Mf?cr++:(cr=0,Mf=e):cr=0,ur(0)}}function My(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Yl(t)))}function Ko(){return Ey(),Ty(),Cy(),Ay()}function Ay(){if(dt!==5)return!1;var e=Va,t=Tf;Tf=0;var a=Fc(ma),i=L.T,o=K.p;try{K.p=32>a?32:a,L.T=null,a=Cf,Cf=null;var f=Va,g=ma;if(dt=0,Ki=Va=null,ma=0,(Le&6)!==0)throw Error(r(331));var S=Le;if(Le|=4,dy(f.current),cy(f,f.current,g,a),Le=S,ur(0,!1),en&&typeof en.onPostCommitFiberRoot=="function")try{en.onPostCommitFiberRoot(Tl,f)}catch{}return!0}finally{K.p=o,L.T=i,My(e,t)}}function Oy(e,t,a){t=vn(a,t),t=of(e.stateNode,t,2),e=Ua(e,t,2),e!==null&&(Ml(e,2),Hn(e))}function Ge(e,t,a){if(e.tag===3)Oy(e,e,a);else for(;t!==null;){if(t.tag===3){Oy(t,e,a);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(Ga===null||!Ga.has(i))){e=vn(a,e),a=zp(2),i=Ua(t,a,2),i!==null&&(kp(a,i,t,e),Ml(i,2),Hn(i));break}}t=t.return}}function zf(e,t,a){var i=e.pingCache;if(i===null){i=e.pingCache=new Fx;var o=new Set;i.set(t,o)}else o=i.get(t),o===void 0&&(o=new Set,i.set(t,o));o.has(a)||(Rf=!0,o.add(a),e=e1.bind(null,e,t,a),t.then(e,e))}function e1(e,t,a){var i=e.pingCache;i!==null&&i.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Fe===e&&(Ce&a)===a&&(tt===4||tt===3&&(Ce&62914560)===Ce&&300>_t()-Ho?(Le&2)===0&&Xi(e,0):_f|=a,Pi===Ce&&(Pi=0)),Hn(e)}function zy(e,t){t===0&&(t=Eh()),e=Ms(e,t),e!==null&&(Ml(e,t),Hn(e))}function t1(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),zy(e,a)}function n1(e,t){var a=0;switch(e.tag){case 31:case 13:var i=e.stateNode,o=e.memoizedState;o!==null&&(a=o.retryLane);break;case 19:i=e.stateNode;break;case 22:i=e.stateNode._retryCache;break;default:throw Error(r(314))}i!==null&&i.delete(t),zy(e,a)}function a1(e,t){return En(e,t)}var Xo=null,Fi=null,kf=!1,Zo=!1,Df=!1,Pa=0;function Hn(e){e!==Fi&&e.next===null&&(Fi===null?Xo=Fi=e:Fi=Fi.next=e),Zo=!0,kf||(kf=!0,i1())}function ur(e,t){if(!Df&&Zo){Df=!0;do for(var a=!1,i=Xo;i!==null;){if(e!==0){var o=i.pendingLanes;if(o===0)var f=0;else{var g=i.suspendedLanes,S=i.pingedLanes;f=(1<<31-tn(42|e)+1)-1,f&=o&~(g&~S),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(a=!0,Ly(i,f))}else f=Ce,f=Ir(i,i===Fe?f:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),(f&3)===0||Cl(i,f)||(a=!0,Ly(i,f));i=i.next}while(a);Df=!1}}function s1(){ky()}function ky(){Zo=kf=!1;var e=0;Pa!==0&&p1()&&(e=Pa);for(var t=_t(),a=null,i=Xo;i!==null;){var o=i.next,f=Dy(i,t);f===0?(i.next=null,a===null?Xo=o:a.next=o,o===null&&(Fi=a)):(a=i,(e!==0||(f&3)!==0)&&(Zo=!0)),i=o}dt!==0&&dt!==5||ur(e),Pa!==0&&(Pa=0)}function Dy(e,t){for(var a=e.suspendedLanes,i=e.pingedLanes,o=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var g=31-tn(f),S=1<<g,_=o[g];_===-1?((S&a)===0||(S&i)!==0)&&(o[g]=Ab(S,t)):_<=t&&(e.expiredLanes|=S),f&=~S}if(t=Fe,a=Ce,a=Ir(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i=e.callbackNode,a===0||e===t&&(Qe===2||Qe===9)||e.cancelPendingCommit!==null)return i!==null&&i!==null&&El(i),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Cl(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(i!==null&&El(i),Fc(a)){case 2:case 8:a=Un;break;case 32:a=pi;break;case 268435456:a=_h;break;default:a=pi}return i=Uy.bind(null,e),a=En(a,i),e.callbackPriority=t,e.callbackNode=a,t}return i!==null&&i!==null&&El(i),e.callbackPriority=2,e.callbackNode=null,2}function Uy(e,t){if(dt!==0&&dt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Ko()&&e.callbackNode!==a)return null;var i=Ce;return i=Ir(e,e===Fe?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i===0?null:(gy(e,i,t),Dy(e,_t()),e.callbackNode!=null&&e.callbackNode===a?Uy.bind(null,e):null)}function Ly(e,t){if(Ko())return null;gy(e,t,!0)}function i1(){g1(function(){(Le&6)!==0?En(bt,s1):ky()})}function Uf(){if(Pa===0){var e=ki;e===0&&(e=Zr,Zr<<=1,(Zr&261888)===0&&(Zr=256)),Pa=e}return Pa}function By(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:to(""+e)}function qy(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 l1(e,t,a,i,o){if(t==="submit"&&a&&a.stateNode===o){var f=By((o[qt]||null).action),g=i.submitter;g&&(t=(t=g[qt]||null)?By(t.formAction):g.getAttribute("formAction"),t!==null&&(f=t,g=null));var S=new io("action","action",null,i,o);e.push({event:S,listeners:[{instance:null,listener:function(){if(i.defaultPrevented){if(Pa!==0){var _=g?qy(o,g):new FormData(o);tf(a,{pending:!0,data:_,method:o.method,action:f},null,_)}}else typeof f=="function"&&(S.preventDefault(),_=g?qy(o,g):new FormData(o),tf(a,{pending:!0,data:_,method:o.method,action:f},f,_))},currentTarget:o}]})}}for(var Lf=0;Lf<vu.length;Lf++){var Bf=vu[Lf],r1=Bf.toLowerCase(),o1=Bf[0].toUpperCase()+Bf.slice(1);Tn(r1,"on"+o1)}Tn(ym,"onAnimationEnd"),Tn(gm,"onAnimationIteration"),Tn(vm,"onAnimationStart"),Tn("dblclick","onDoubleClick"),Tn("focusin","onFocus"),Tn("focusout","onBlur"),Tn(Nx,"onTransitionRun"),Tn(Rx,"onTransitionStart"),Tn(_x,"onTransitionCancel"),Tn(bm,"onTransitionEnd"),xi("onMouseEnter",["mouseout","mouseover"]),xi("onMouseLeave",["mouseout","mouseover"]),xi("onPointerEnter",["pointerout","pointerover"]),xi("onPointerLeave",["pointerout","pointerover"]),_s("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),_s("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),_s("onBeforeInput",["compositionend","keypress","textInput","paste"]),_s("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),_s("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),_s("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var fr="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(" "),c1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(fr));function Hy(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var i=e[a],o=i.event;i=i.listeners;e:{var f=void 0;if(t)for(var g=i.length-1;0<=g;g--){var S=i[g],_=S.instance,H=S.currentTarget;if(S=S.listener,_!==f&&o.isPropagationStopped())break e;f=S,o.currentTarget=H;try{f(o)}catch(X){oo(X)}o.currentTarget=null,f=_}else for(g=0;g<i.length;g++){if(S=i[g],_=S.instance,H=S.currentTarget,S=S.listener,_!==f&&o.isPropagationStopped())break e;f=S,o.currentTarget=H;try{f(o)}catch(X){oo(X)}o.currentTarget=null,f=_}}}}function Ee(e,t){var a=t[Jc];a===void 0&&(a=t[Jc]=new Set);var i=e+"__bubble";a.has(i)||(Qy(t,e,2,!1),a.add(i))}function qf(e,t,a){var i=0;t&&(i|=4),Qy(a,e,i,t)}var Fo="_reactListening"+Math.random().toString(36).slice(2);function Hf(e){if(!e[Fo]){e[Fo]=!0,kh.forEach(function(a){a!=="selectionchange"&&(c1.has(a)||qf(a,!1,e),qf(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Fo]||(t[Fo]=!0,qf("selectionchange",!1,t))}}function Qy(e,t,a,i){switch(yg(t)){case 2:var o=L1;break;case 8:o=B1;break;default:o=td}a=o.bind(null,t,a,e),o=void 0,!iu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),i?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 Qf(e,t,a,i,o){var f=i;if((t&1)===0&&(t&2)===0&&i!==null)e:for(;;){if(i===null)return;var g=i.tag;if(g===3||g===4){var S=i.stateNode.containerInfo;if(S===o)break;if(g===4)for(g=i.return;g!==null;){var _=g.tag;if((_===3||_===4)&&g.stateNode.containerInfo===o)return;g=g.return}for(;S!==null;){if(g=gi(S),g===null)return;if(_=g.tag,_===5||_===6||_===26||_===27){i=f=g;continue e}S=S.parentNode}}i=i.return}Kh(function(){var H=f,X=au(a),I=[];e:{var G=xm.get(e);if(G!==void 0){var Y=io,ce=e;switch(e){case"keypress":if(ao(a)===0)break e;case"keydown":case"keyup":Y=nx;break;case"focusin":ce="focus",Y=cu;break;case"focusout":ce="blur",Y=cu;break;case"beforeblur":case"afterblur":Y=cu;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=Fh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Y=Yb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Y=ix;break;case ym:case gm:case vm:Y=Xb;break;case bm:Y=rx;break;case"scroll":case"scrollend":Y=Gb;break;case"wheel":Y=cx;break;case"copy":case"cut":case"paste":Y=Fb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Y=Ih;break;case"toggle":case"beforetoggle":Y=fx}var ye=(t&4)!==0,Xe=!ye&&(e==="scroll"||e==="scrollend"),D=ye?G!==null?G+"Capture":null:G;ye=[];for(var M=H,q;M!==null;){var F=M;if(q=F.stateNode,F=F.tag,F!==5&&F!==26&&F!==27||q===null||D===null||(F=zl(M,D),F!=null&&ye.push(dr(M,F,q))),Xe)break;M=M.return}0<ye.length&&(G=new Y(G,ce,null,a,X),I.push({event:G,listeners:ye}))}}if((t&7)===0){e:{if(G=e==="mouseover"||e==="pointerover",Y=e==="mouseout"||e==="pointerout",G&&a!==nu&&(ce=a.relatedTarget||a.fromElement)&&(gi(ce)||ce[yi]))break e;if((Y||G)&&(G=X.window===X?X:(G=X.ownerDocument)?G.defaultView||G.parentWindow:window,Y?(ce=a.relatedTarget||a.toElement,Y=H,ce=ce?gi(ce):null,ce!==null&&(Xe=d(ce),ye=ce.tag,ce!==Xe||ye!==5&&ye!==27&&ye!==6)&&(ce=null)):(Y=null,ce=H),Y!==ce)){if(ye=Fh,F="onMouseLeave",D="onMouseEnter",M="mouse",(e==="pointerout"||e==="pointerover")&&(ye=Ih,F="onPointerLeave",D="onPointerEnter",M="pointer"),Xe=Y==null?G:Ol(Y),q=ce==null?G:Ol(ce),G=new ye(F,M+"leave",Y,a,X),G.target=Xe,G.relatedTarget=q,F=null,gi(X)===H&&(ye=new ye(D,M+"enter",ce,a,X),ye.target=q,ye.relatedTarget=Xe,F=ye),Xe=F,Y&&ce)t:{for(ye=u1,D=Y,M=ce,q=0,F=D;F;F=ye(F))q++;F=0;for(var pe=M;pe;pe=ye(pe))F++;for(;0<q-F;)D=ye(D),q--;for(;0<F-q;)M=ye(M),F--;for(;q--;){if(D===M||M!==null&&D===M.alternate){ye=D;break t}D=ye(D),M=ye(M)}ye=null}else ye=null;Y!==null&&Gy(I,G,Y,ye,!1),ce!==null&&Xe!==null&&Gy(I,Xe,ce,ye,!0)}}e:{if(G=H?Ol(H):window,Y=G.nodeName&&G.nodeName.toLowerCase(),Y==="select"||Y==="input"&&G.type==="file")var De=im;else if(am(G))if(lm)De=Sx;else{De=bx;var fe=vx}else Y=G.nodeName,!Y||Y.toLowerCase()!=="input"||G.type!=="checkbox"&&G.type!=="radio"?H&&tu(H.elementType)&&(De=im):De=xx;if(De&&(De=De(e,H))){sm(I,De,a,X);break e}fe&&fe(e,G,H),e==="focusout"&&H&&G.type==="number"&&H.memoizedProps.value!=null&&eu(G,"number",G.value)}switch(fe=H?Ol(H):window,e){case"focusin":(am(fe)||fe.contentEditable==="true")&&(_i=fe,pu=H,Ql=null);break;case"focusout":Ql=pu=_i=null;break;case"mousedown":yu=!0;break;case"contextmenu":case"mouseup":case"dragend":yu=!1,mm(I,a,X);break;case"selectionchange":if(wx)break;case"keydown":case"keyup":mm(I,a,X)}var je;if(fu)e:{switch(e){case"compositionstart":var Me="onCompositionStart";break e;case"compositionend":Me="onCompositionEnd";break e;case"compositionupdate":Me="onCompositionUpdate";break e}Me=void 0}else Ri?tm(e,a)&&(Me="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Me="onCompositionStart");Me&&($h&&a.locale!=="ko"&&(Ri||Me!=="onCompositionStart"?Me==="onCompositionEnd"&&Ri&&(je=Xh()):(Ca=X,lu="value"in Ca?Ca.value:Ca.textContent,Ri=!0)),fe=Jo(H,Me),0<fe.length&&(Me=new Jh(Me,e,null,a,X),I.push({event:Me,listeners:fe}),je?Me.data=je:(je=nm(a),je!==null&&(Me.data=je)))),(je=hx?mx(e,a):px(e,a))&&(Me=Jo(H,"onBeforeInput"),0<Me.length&&(fe=new Jh("onBeforeInput","beforeinput",null,a,X),I.push({event:fe,listeners:Me}),fe.data=je)),l1(I,e,H,a,X)}Hy(I,t)})}function dr(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Jo(e,t){for(var a=t+"Capture",i=[];e!==null;){var o=e,f=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||f===null||(o=zl(e,a),o!=null&&i.unshift(dr(e,o,f)),o=zl(e,t),o!=null&&i.push(dr(e,o,f))),e.tag===3)return i;e=e.return}return[]}function u1(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Gy(e,t,a,i,o){for(var f=t._reactName,g=[];a!==null&&a!==i;){var S=a,_=S.alternate,H=S.stateNode;if(S=S.tag,_!==null&&_===i)break;S!==5&&S!==26&&S!==27||H===null||(_=H,o?(H=zl(a,f),H!=null&&g.unshift(dr(a,H,_))):o||(H=zl(a,f),H!=null&&g.push(dr(a,H,_)))),a=a.return}g.length!==0&&e.push({event:t,listeners:g})}var f1=/\r\n?/g,d1=/\u0000|\uFFFD/g;function Vy(e){return(typeof e=="string"?e:""+e).replace(f1,`
|
|
65
|
-
`).replace(d1,"")}function Yy(e,t){return t=Vy(t),Vy(e)===t}function Ke(e,t,a,i,o,f){switch(a){case"children":typeof i=="string"?t==="body"||t==="textarea"&&i===""||ji(e,i):(typeof i=="number"||typeof i=="bigint")&&t!=="body"&&ji(e,""+i);break;case"className":Wr(e,"class",i);break;case"tabIndex":Wr(e,"tabindex",i);break;case"dir":case"role":case"viewBox":case"width":case"height":Wr(e,a,i);break;case"style":Yh(e,i,f);break;case"data":if(t!=="object"){Wr(e,"data",i);break}case"src":case"href":if(i===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(i==null||typeof i=="function"||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(a);break}i=to(""+i),e.setAttribute(a,i);break;case"action":case"formAction":if(typeof i=="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 f=="function"&&(a==="formAction"?(t!=="input"&&Ke(e,t,"name",o.name,o,null),Ke(e,t,"formEncType",o.formEncType,o,null),Ke(e,t,"formMethod",o.formMethod,o,null),Ke(e,t,"formTarget",o.formTarget,o,null)):(Ke(e,t,"encType",o.encType,o,null),Ke(e,t,"method",o.method,o,null),Ke(e,t,"target",o.target,o,null)));if(i==null||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(a);break}i=to(""+i),e.setAttribute(a,i);break;case"onClick":i!=null&&(e.onclick=Wn);break;case"onScroll":i!=null&&Ee("scroll",e);break;case"onScrollEnd":i!=null&&Ee("scrollend",e);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(r(61));if(a=i.__html,a!=null){if(o.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"multiple":e.multiple=i&&typeof i!="function"&&typeof i!="symbol";break;case"muted":e.muted=i&&typeof i!="function"&&typeof i!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(i==null||typeof i=="function"||typeof i=="boolean"||typeof i=="symbol"){e.removeAttribute("xlink:href");break}a=to(""+i),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":i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(a,""+i):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":i&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":i===!0?e.setAttribute(a,""):i!==!1&&i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(a,i):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":i!=null&&typeof i!="function"&&typeof i!="symbol"&&!isNaN(i)&&1<=i?e.setAttribute(a,i):e.removeAttribute(a);break;case"rowSpan":case"start":i==null||typeof i=="function"||typeof i=="symbol"||isNaN(i)?e.removeAttribute(a):e.setAttribute(a,i);break;case"popover":Ee("beforetoggle",e),Ee("toggle",e),$r(e,"popover",i);break;case"xlinkActuate":$n(e,"http://www.w3.org/1999/xlink","xlink:actuate",i);break;case"xlinkArcrole":$n(e,"http://www.w3.org/1999/xlink","xlink:arcrole",i);break;case"xlinkRole":$n(e,"http://www.w3.org/1999/xlink","xlink:role",i);break;case"xlinkShow":$n(e,"http://www.w3.org/1999/xlink","xlink:show",i);break;case"xlinkTitle":$n(e,"http://www.w3.org/1999/xlink","xlink:title",i);break;case"xlinkType":$n(e,"http://www.w3.org/1999/xlink","xlink:type",i);break;case"xmlBase":$n(e,"http://www.w3.org/XML/1998/namespace","xml:base",i);break;case"xmlLang":$n(e,"http://www.w3.org/XML/1998/namespace","xml:lang",i);break;case"xmlSpace":$n(e,"http://www.w3.org/XML/1998/namespace","xml:space",i);break;case"is":$r(e,"is",i);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=Hb.get(a)||a,$r(e,a,i))}}function Gf(e,t,a,i,o,f){switch(a){case"style":Yh(e,i,f);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(r(61));if(a=i.__html,a!=null){if(o.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"children":typeof i=="string"?ji(e,i):(typeof i=="number"||typeof i=="bigint")&&ji(e,""+i);break;case"onScroll":i!=null&&Ee("scroll",e);break;case"onScrollEnd":i!=null&&Ee("scrollend",e);break;case"onClick":i!=null&&(e.onclick=Wn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Dh.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(o=a.endsWith("Capture"),t=a.slice(2,o?a.length-7:void 0),f=e[qt]||null,f=f!=null?f[a]:null,typeof f=="function"&&e.removeEventListener(t,f,o),typeof i=="function")){typeof f!="function"&&f!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,i,o);break e}a in e?e[a]=i:i===!0?e.setAttribute(a,""):$r(e,a,i)}}}function Nt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ee("error",e),Ee("load",e);var i=!1,o=!1,f;for(f in a)if(a.hasOwnProperty(f)){var g=a[f];if(g!=null)switch(f){case"src":i=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Ke(e,t,f,g,a,null)}}o&&Ke(e,t,"srcSet",a.srcSet,a,null),i&&Ke(e,t,"src",a.src,a,null);return;case"input":Ee("invalid",e);var S=f=g=o=null,_=null,H=null;for(i in a)if(a.hasOwnProperty(i)){var X=a[i];if(X!=null)switch(i){case"name":o=X;break;case"type":g=X;break;case"checked":_=X;break;case"defaultChecked":H=X;break;case"value":f=X;break;case"defaultValue":S=X;break;case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(r(137,t));break;default:Ke(e,t,i,X,a,null)}}Hh(e,f,S,_,H,g,o,!1);return;case"select":Ee("invalid",e),i=g=f=null;for(o in a)if(a.hasOwnProperty(o)&&(S=a[o],S!=null))switch(o){case"value":f=S;break;case"defaultValue":g=S;break;case"multiple":i=S;default:Ke(e,t,o,S,a,null)}t=f,a=g,e.multiple=!!i,t!=null?Si(e,!!i,t,!1):a!=null&&Si(e,!!i,a,!0);return;case"textarea":Ee("invalid",e),f=o=i=null;for(g in a)if(a.hasOwnProperty(g)&&(S=a[g],S!=null))switch(g){case"value":i=S;break;case"defaultValue":o=S;break;case"children":f=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(r(91));break;default:Ke(e,t,g,S,a,null)}Gh(e,i,o,f);return;case"option":for(_ in a)if(a.hasOwnProperty(_)&&(i=a[_],i!=null))switch(_){case"selected":e.selected=i&&typeof i!="function"&&typeof i!="symbol";break;default:Ke(e,t,_,i,a,null)}return;case"dialog":Ee("beforetoggle",e),Ee("toggle",e),Ee("cancel",e),Ee("close",e);break;case"iframe":case"object":Ee("load",e);break;case"video":case"audio":for(i=0;i<fr.length;i++)Ee(fr[i],e);break;case"image":Ee("error",e),Ee("load",e);break;case"details":Ee("toggle",e);break;case"embed":case"source":case"link":Ee("error",e),Ee("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(H in a)if(a.hasOwnProperty(H)&&(i=a[H],i!=null))switch(H){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Ke(e,t,H,i,a,null)}return;default:if(tu(t)){for(X in a)a.hasOwnProperty(X)&&(i=a[X],i!==void 0&&Gf(e,t,X,i,a,void 0));return}}for(S in a)a.hasOwnProperty(S)&&(i=a[S],i!=null&&Ke(e,t,S,i,a,null))}function h1(e,t,a,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,f=null,g=null,S=null,_=null,H=null,X=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":_=I;default:i.hasOwnProperty(Y)||Ke(e,t,Y,null,i,I)}}for(var G in i){var Y=i[G];if(I=a[G],i.hasOwnProperty(G)&&(Y!=null||I!=null))switch(G){case"type":f=Y;break;case"name":o=Y;break;case"checked":H=Y;break;case"defaultChecked":X=Y;break;case"value":g=Y;break;case"defaultValue":S=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(r(137,t));break;default:Y!==I&&Ke(e,t,G,Y,i,I)}}Wc(e,g,S,_,H,X,f,o);return;case"select":Y=g=S=G=null;for(f in a)if(_=a[f],a.hasOwnProperty(f)&&_!=null)switch(f){case"value":break;case"multiple":Y=_;default:i.hasOwnProperty(f)||Ke(e,t,f,null,i,_)}for(o in i)if(f=i[o],_=a[o],i.hasOwnProperty(o)&&(f!=null||_!=null))switch(o){case"value":G=f;break;case"defaultValue":S=f;break;case"multiple":g=f;default:f!==_&&Ke(e,t,o,f,i,_)}t=S,a=g,i=Y,G!=null?Si(e,!!a,G,!1):!!i!=!!a&&(t!=null?Si(e,!!a,t,!0):Si(e,!!a,a?[]:"",!1));return;case"textarea":Y=G=null;for(S in a)if(o=a[S],a.hasOwnProperty(S)&&o!=null&&!i.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:Ke(e,t,S,null,i,o)}for(g in i)if(o=i[g],f=a[g],i.hasOwnProperty(g)&&(o!=null||f!=null))switch(g){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!==f&&Ke(e,t,g,o,i,f)}Qh(e,G,Y);return;case"option":for(var ce in a)if(G=a[ce],a.hasOwnProperty(ce)&&G!=null&&!i.hasOwnProperty(ce))switch(ce){case"selected":e.selected=!1;break;default:Ke(e,t,ce,null,i,G)}for(_ in i)if(G=i[_],Y=a[_],i.hasOwnProperty(_)&&G!==Y&&(G!=null||Y!=null))switch(_){case"selected":e.selected=G&&typeof G!="function"&&typeof G!="symbol";break;default:Ke(e,t,_,G,i,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 ye in a)G=a[ye],a.hasOwnProperty(ye)&&G!=null&&!i.hasOwnProperty(ye)&&Ke(e,t,ye,null,i,G);for(H in i)if(G=i[H],Y=a[H],i.hasOwnProperty(H)&&G!==Y&&(G!=null||Y!=null))switch(H){case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(r(137,t));break;default:Ke(e,t,H,G,i,Y)}return;default:if(tu(t)){for(var Xe in a)G=a[Xe],a.hasOwnProperty(Xe)&&G!==void 0&&!i.hasOwnProperty(Xe)&&Gf(e,t,Xe,void 0,i,G);for(X in i)G=i[X],Y=a[X],!i.hasOwnProperty(X)||G===Y||G===void 0&&Y===void 0||Gf(e,t,X,G,i,Y);return}}for(var D in a)G=a[D],a.hasOwnProperty(D)&&G!=null&&!i.hasOwnProperty(D)&&Ke(e,t,D,null,i,G);for(I in i)G=i[I],Y=a[I],!i.hasOwnProperty(I)||G===Y||G==null&&Y==null||Ke(e,t,I,G,i,Y)}function Py(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function m1(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),i=0;i<a.length;i++){var o=a[i],f=o.transferSize,g=o.initiatorType,S=o.duration;if(f&&S&&Py(g)){for(g=0,S=o.responseEnd,i+=1;i<a.length;i++){var _=a[i],H=_.startTime;if(H>S)break;var X=_.transferSize,I=_.initiatorType;X&&Py(I)&&(_=_.responseEnd,g+=X*(_<S?1:(S-H)/(_-H)))}if(--i,t+=8*(f+g)/(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 Vf=null,Yf=null;function Io(e){return e.nodeType===9?e:e.ownerDocument}function Ky(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 Xy(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 Pf(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 Kf=null;function p1(){var e=window.event;return e&&e.type==="popstate"?e===Kf?!1:(Kf=e,!0):(Kf=null,!1)}var Zy=typeof setTimeout=="function"?setTimeout:void 0,y1=typeof clearTimeout=="function"?clearTimeout:void 0,Fy=typeof Promise=="function"?Promise:void 0,g1=typeof queueMicrotask=="function"?queueMicrotask:typeof Fy<"u"?function(e){return Fy.resolve(null).then(e).catch(v1)}:Zy;function v1(e){setTimeout(function(){throw e})}function Ka(e){return e==="head"}function Jy(e,t){var a=t,i=0;do{var o=a.nextSibling;if(e.removeChild(a),o&&o.nodeType===8)if(a=o.data,a==="/$"||a==="/&"){if(i===0){e.removeChild(o),Wi(t);return}i--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")i++;else if(a==="html")hr(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,hr(a);for(var f=a.firstChild;f;){var g=f.nextSibling,S=f.nodeName;f[Al]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&f.rel.toLowerCase()==="stylesheet"||a.removeChild(f),f=g}}else a==="body"&&hr(e.ownerDocument.body);a=o}while(a);Wi(t)}function Iy(e,t){var a=e;e=0;do{var i=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||""),i&&i.nodeType===8)if(a=i.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=i}while(a)}function Xf(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":Xf(a),Ic(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function b1(e,t,a,i){for(;e.nodeType===1;){var o=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!i&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(i){if(!e[Al])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(f=e.getAttribute("rel"),f==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(f!==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(f=e.getAttribute("src"),(f!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&f&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var f=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===f)return e}else return e;if(e=wn(e.nextSibling),e===null)break}return null}function x1(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=wn(e.nextSibling),e===null))return null;return e}function $y(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=wn(e.nextSibling),e===null))return null;return e}function Zf(e){return e.data==="$?"||e.data==="$~"}function Ff(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function S1(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var i=function(){t(),a.removeEventListener("DOMContentLoaded",i)};a.addEventListener("DOMContentLoaded",i),e._reactRetry=i}}function wn(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 Jf=null;function Wy(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return wn(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function eg(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 tg(e,t,a){switch(t=Io(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 hr(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ic(e)}var Nn=new Map,ng=new Set;function $o(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var pa=K.d;K.d={f:j1,r:w1,D:N1,C:R1,L:_1,m:E1,X:C1,S:T1,M:M1};function j1(){var e=pa.f(),t=Vo();return e||t}function w1(e){var t=vi(e);t!==null&&t.tag===5&&t.type==="form"?bp(t):pa.r(e)}var Ji=typeof document>"u"?null:document;function ag(e,t,a){var i=Ji;if(i&&typeof t=="string"&&t){var o=yn(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof a=="string"&&(o+='[crossorigin="'+a+'"]'),ng.has(o)||(ng.add(o),e={rel:e,crossOrigin:a,href:t},i.querySelector(o)===null&&(t=i.createElement("link"),Nt(t,"link",e),pt(t),i.head.appendChild(t)))}}function N1(e){pa.D(e),ag("dns-prefetch",e,null)}function R1(e,t){pa.C(e,t),ag("preconnect",e,t)}function _1(e,t,a){pa.L(e,t,a);var i=Ji;if(i&&e&&t){var o='link[rel="preload"][as="'+yn(t)+'"]';t==="image"&&a&&a.imageSrcSet?(o+='[imagesrcset="'+yn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(o+='[imagesizes="'+yn(a.imageSizes)+'"]')):o+='[href="'+yn(e)+'"]';var f=o;switch(t){case"style":f=Ii(e);break;case"script":f=$i(e)}Nn.has(f)||(e=v({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Nn.set(f,e),i.querySelector(o)!==null||t==="style"&&i.querySelector(mr(f))||t==="script"&&i.querySelector(pr(f))||(t=i.createElement("link"),Nt(t,"link",e),pt(t),i.head.appendChild(t)))}}function E1(e,t){pa.m(e,t);var a=Ji;if(a&&e){var i=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+yn(i)+'"][href="'+yn(e)+'"]',f=o;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=$i(e)}if(!Nn.has(f)&&(e=v({rel:"modulepreload",href:e},t),Nn.set(f,e),a.querySelector(o)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(pr(f)))return}i=a.createElement("link"),Nt(i,"link",e),pt(i),a.head.appendChild(i)}}}function T1(e,t,a){pa.S(e,t,a);var i=Ji;if(i&&e){var o=bi(i).hoistableStyles,f=Ii(e);t=t||"default";var g=o.get(f);if(!g){var S={loading:0,preload:null};if(g=i.querySelector(mr(f)))S.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Nn.get(f))&&If(e,a);var _=g=i.createElement("link");pt(_),Nt(_,"link",e),_._p=new Promise(function(H,X){_.onload=H,_.onerror=X}),_.addEventListener("load",function(){S.loading|=1}),_.addEventListener("error",function(){S.loading|=2}),S.loading|=4,Wo(g,t,i)}g={type:"stylesheet",instance:g,count:1,state:S},o.set(f,g)}}}function C1(e,t){pa.X(e,t);var a=Ji;if(a&&e){var i=bi(a).hoistableScripts,o=$i(e),f=i.get(o);f||(f=a.querySelector(pr(o)),f||(e=v({src:e,async:!0},t),(t=Nn.get(o))&&$f(e,t),f=a.createElement("script"),pt(f),Nt(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},i.set(o,f))}}function M1(e,t){pa.M(e,t);var a=Ji;if(a&&e){var i=bi(a).hoistableScripts,o=$i(e),f=i.get(o);f||(f=a.querySelector(pr(o)),f||(e=v({src:e,async:!0,type:"module"},t),(t=Nn.get(o))&&$f(e,t),f=a.createElement("script"),pt(f),Nt(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},i.set(o,f))}}function sg(e,t,a,i){var o=(o=me.current)?$o(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=Ii(a.href),a=bi(o).hoistableStyles,i=a.get(t),i||(i={type:"style",instance:null,count:0,state:null},a.set(t,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Ii(a.href);var f=bi(o).hoistableStyles,g=f.get(e);if(g||(o=o.ownerDocument||o,g={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(e,g),(f=o.querySelector(mr(e)))&&!f._p&&(g.instance=f,g.state.loading=5),Nn.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},Nn.set(e,a),f||A1(o,e,a,g.state))),t&&i===null)throw Error(r(528,""));return g}if(t&&i!==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=$i(a),a=bi(o).hoistableScripts,i=a.get(t),i||(i={type:"script",instance:null,count:0,state:null},a.set(t,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Ii(e){return'href="'+yn(e)+'"'}function mr(e){return'link[rel="stylesheet"]['+e+"]"}function ig(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function A1(e,t,a,i){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?i.loading=1:(t=e.createElement("link"),i.preload=t,t.addEventListener("load",function(){return i.loading|=1}),t.addEventListener("error",function(){return i.loading|=2}),Nt(t,"link",a),pt(t),e.head.appendChild(t))}function $i(e){return'[src="'+yn(e)+'"]'}function pr(e){return"script[async]"+e}function lg(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var i=e.querySelector('style[data-href~="'+yn(a.href)+'"]');if(i)return t.instance=i,pt(i),i;var o=v({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return i=(e.ownerDocument||e).createElement("style"),pt(i),Nt(i,"style",o),Wo(i,a.precedence,e),t.instance=i;case"stylesheet":o=Ii(a.href);var f=e.querySelector(mr(o));if(f)return t.state.loading|=4,t.instance=f,pt(f),f;i=ig(a),(o=Nn.get(o))&&If(i,o),f=(e.ownerDocument||e).createElement("link"),pt(f);var g=f;return g._p=new Promise(function(S,_){g.onload=S,g.onerror=_}),Nt(f,"link",i),t.state.loading|=4,Wo(f,a.precedence,e),t.instance=f;case"script":return f=$i(a.src),(o=e.querySelector(pr(f)))?(t.instance=o,pt(o),o):(i=a,(o=Nn.get(f))&&(i=v({},a),$f(i,o)),e=e.ownerDocument||e,o=e.createElement("script"),pt(o),Nt(o,"link",i),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&&(i=t.instance,t.state.loading|=4,Wo(i,a.precedence,e));return t.instance}function Wo(e,t,a){for(var i=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=i.length?i[i.length-1]:null,f=o,g=0;g<i.length;g++){var S=i[g];if(S.dataset.precedence===t)f=S;else if(f!==o)break}f?f.parentNode.insertBefore(e,f.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function If(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function $f(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ec=null;function rg(e,t,a){if(ec===null){var i=new Map,o=ec=new Map;o.set(a,i)}else o=ec,i=o.get(a),i||(i=new Map,o.set(a,i));if(i.has(e))return i;for(i.set(e,null),a=a.getElementsByTagName(e),o=0;o<a.length;o++){var f=a[o];if(!(f[Al]||f[xt]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var g=f.getAttribute(t)||"";g=e+g;var S=i.get(g);S?S.push(f):i.set(g,[f])}}return i}function og(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function O1(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 cg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function z1(e,t,a,i){if(a.type==="stylesheet"&&(typeof i.media!="string"||matchMedia(i.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var o=Ii(i.href),f=t.querySelector(mr(o));if(f){t=f._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=tc.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=f,pt(f);return}f=t.ownerDocument||t,i=ig(i),(o=Nn.get(o))&&If(i,o),f=f.createElement("link"),pt(f);var g=f;g._p=new Promise(function(S,_){g.onload=S,g.onerror=_}),Nt(f,"link",i),a.instance=f}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=tc.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Wf=0;function k1(e,t){return e.stylesheets&&e.count===0&&ac(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var i=setTimeout(function(){if(e.stylesheets&&ac(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},6e4+t);0<e.imgBytes&&Wf===0&&(Wf=62500*m1());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ac(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>Wf?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(i),clearTimeout(o)}}:null}function tc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ac(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var nc=null;function ac(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,nc=new Map,t.forEach(D1,e),nc=null,tc.call(e))}function D1(e,t){if(!(t.state.loading&4)){var a=nc.get(e);if(a)var i=a.get(null);else{a=new Map,nc.set(e,a);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<o.length;f++){var g=o[f];(g.nodeName==="LINK"||g.getAttribute("media")!=="not all")&&(a.set(g.dataset.precedence,g),i=g)}i&&a.set(null,i)}o=t.instance,g=o.getAttribute("data-precedence"),f=a.get(g)||i,f===i&&a.set(null,o),a.set(g,o),this.count++,i=tc.bind(this),o.addEventListener("load",i),o.addEventListener("error",i),f?f.parentNode.insertBefore(o,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var yr={$$typeof:B,Provider:null,Consumer:null,_currentValue:ue,_currentValue2:ue,_threadCount:0};function U1(e,t,a,i,o,f,g,S,_){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=Xc(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xc(0),this.hiddenUpdates=Xc(null),this.identifierPrefix=i,this.onUncaughtError=o,this.onCaughtError=f,this.onRecoverableError=g,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=_,this.incompleteTransitions=new Map}function ug(e,t,a,i,o,f,g,S,_,H,X,I){return e=new U1(e,t,a,g,_,H,X,I,S),t=1,f===!0&&(t|=24),f=an(3,null,null,t),e.current=f,f.stateNode=e,t=Au(),t.refCount++,e.pooledCache=t,t.refCount++,f.memoizedState={element:i,isDehydrated:a,cache:t},Du(f),e}function fg(e){return e?(e=Ci,e):Ci}function dg(e,t,a,i,o,f){o=fg(o),i.context===null?i.context=o:i.pendingContext=o,i=Da(t),i.payload={element:a},f=f===void 0?null:f,f!==null&&(i.callback=f),a=Ua(e,i,t),a!==null&&(Pt(a,e,t),Zl(a,e,t))}function hg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function ed(e,t){hg(e,t),(e=e.alternate)&&hg(e,t)}function mg(e){if(e.tag===13||e.tag===31){var t=Ms(e,67108864);t!==null&&Pt(t,e,67108864),ed(e,67108864)}}function pg(e){if(e.tag===13||e.tag===31){var t=cn();t=Zc(t);var a=Ms(e,t);a!==null&&Pt(a,e,t),ed(e,t)}}var sc=!0;function L1(e,t,a,i){var o=L.T;L.T=null;var f=K.p;try{K.p=2,td(e,t,a,i)}finally{K.p=f,L.T=o}}function B1(e,t,a,i){var o=L.T;L.T=null;var f=K.p;try{K.p=8,td(e,t,a,i)}finally{K.p=f,L.T=o}}function td(e,t,a,i){if(sc){var o=nd(i);if(o===null)Qf(e,t,i,ic,a),gg(e,i);else if(H1(o,e,t,a,i))i.stopPropagation();else if(gg(e,i),t&4&&-1<q1.indexOf(e)){for(;o!==null;){var f=vi(o);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var g=Rs(f.pendingLanes);if(g!==0){var S=f;for(S.pendingLanes|=2,S.entangledLanes|=2;g;){var _=1<<31-tn(g);S.entanglements[1]|=_,g&=~_}Hn(f),(Le&6)===0&&(Qo=_t()+500,ur(0))}}break;case 31:case 13:S=Ms(f,2),S!==null&&Pt(S,f,2),Vo(),ed(f,2)}if(f=nd(i),f===null&&Qf(e,t,i,ic,a),f===o)break;o=f}o!==null&&i.stopPropagation()}else Qf(e,t,i,null,a)}}function nd(e){return e=au(e),ad(e)}var ic=null;function ad(e){if(ic=null,e=gi(e),e!==null){var t=d(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=h(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 ic=e,null}function yg(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(Ye()){case bt:return 2;case Un:return 8;case pi:case Rb:return 32;case _h:return 268435456;default:return 32}default:return 32}}var sd=!1,Xa=null,Za=null,Fa=null,gr=new Map,vr=new Map,Ja=[],q1="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 gg(e,t){switch(e){case"focusin":case"focusout":Xa=null;break;case"dragenter":case"dragleave":Za=null;break;case"mouseover":case"mouseout":Fa=null;break;case"pointerover":case"pointerout":gr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":vr.delete(t.pointerId)}}function br(e,t,a,i,o,f){return e===null||e.nativeEvent!==f?(e={blockedOn:t,domEventName:a,eventSystemFlags:i,nativeEvent:f,targetContainers:[o]},t!==null&&(t=vi(t),t!==null&&mg(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function H1(e,t,a,i,o){switch(t){case"focusin":return Xa=br(Xa,e,t,a,i,o),!0;case"dragenter":return Za=br(Za,e,t,a,i,o),!0;case"mouseover":return Fa=br(Fa,e,t,a,i,o),!0;case"pointerover":var f=o.pointerId;return gr.set(f,br(gr.get(f)||null,e,t,a,i,o)),!0;case"gotpointercapture":return f=o.pointerId,vr.set(f,br(vr.get(f)||null,e,t,a,i,o)),!0}return!1}function vg(e){var t=gi(e.target);if(t!==null){var a=d(t);if(a!==null){if(t=a.tag,t===13){if(t=h(a),t!==null){e.blockedOn=t,Oh(e.priority,function(){pg(a)});return}}else if(t===31){if(t=y(a),t!==null){e.blockedOn=t,Oh(e.priority,function(){pg(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 lc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=nd(e.nativeEvent);if(a===null){a=e.nativeEvent;var i=new a.constructor(a.type,a);nu=i,a.target.dispatchEvent(i),nu=null}else return t=vi(a),t!==null&&mg(t),e.blockedOn=a,!1;t.shift()}return!0}function bg(e,t,a){lc(e)&&a.delete(t)}function Q1(){sd=!1,Xa!==null&&lc(Xa)&&(Xa=null),Za!==null&&lc(Za)&&(Za=null),Fa!==null&&lc(Fa)&&(Fa=null),gr.forEach(bg),vr.forEach(bg)}function rc(e,t){e.blockedOn===t&&(e.blockedOn=null,sd||(sd=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Q1)))}var oc=null;function xg(e){oc!==e&&(oc=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){oc===e&&(oc=null);for(var t=0;t<e.length;t+=3){var a=e[t],i=e[t+1],o=e[t+2];if(typeof i!="function"){if(ad(i||a)===null)continue;break}var f=vi(a);f!==null&&(e.splice(t,3),t-=3,tf(f,{pending:!0,data:o,method:a.method,action:i},i,o))}}))}function Wi(e){function t(_){return rc(_,e)}Xa!==null&&rc(Xa,e),Za!==null&&rc(Za,e),Fa!==null&&rc(Fa,e),gr.forEach(t),vr.forEach(t);for(var a=0;a<Ja.length;a++){var i=Ja[a];i.blockedOn===e&&(i.blockedOn=null)}for(;0<Ja.length&&(a=Ja[0],a.blockedOn===null);)vg(a),a.blockedOn===null&&Ja.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(i=0;i<a.length;i+=3){var o=a[i],f=a[i+1],g=o[qt]||null;if(typeof f=="function")g||xg(a);else if(g){var S=null;if(f&&f.hasAttribute("formAction")){if(o=f,g=f[qt]||null)S=g.formAction;else if(ad(o)!==null)continue}else S=g.action;typeof S=="function"?a[i+1]=S:(a.splice(i,3),i-=3),xg(a)}}}function Sg(){function e(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(g){return o=g})},focusReset:"manual",scroll:"manual"})}function t(){o!==null&&(o(),o=null),i||setTimeout(a,20)}function a(){if(!i&&!navigation.transition){var f=navigation.currentEntry;f&&f.url!=null&&navigation.navigate(f.url,{state:f.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var i=!1,o=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){i=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),o!==null&&(o(),o=null)}}}function id(e){this._internalRoot=e}cc.prototype.render=id.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var a=t.current,i=cn();dg(a,i,e,t,null,null)},cc.prototype.unmount=id.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;dg(e.current,2,null,e,null,null),Vo(),t[yi]=null}};function cc(e){this._internalRoot=e}cc.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ah();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Ja.length&&t!==0&&t<Ja[a].priority;a++);Ja.splice(a,0,e),a===0&&vg(e)}};var jg=s.version;if(jg!=="19.2.6")throw Error(r(527,jg,"19.2.6"));K.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 G1={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var uc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!uc.isDisabled&&uc.supportsFiber)try{Tl=uc.inject(G1),en=uc}catch{}}return Nr.createRoot=function(e,t){if(!c(e))throw Error(r(299));var a=!1,i="",o=Cp,f=Mp,g=Ap;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(f=t.onCaughtError),t.onRecoverableError!==void 0&&(g=t.onRecoverableError)),t=ug(e,1,!1,null,null,a,i,null,o,f,g,Sg),e[yi]=t.current,Hf(e),new id(t)},Nr.hydrateRoot=function(e,t,a){if(!c(e))throw Error(r(299));var i=!1,o="",f=Cp,g=Mp,S=Ap,_=null;return a!=null&&(a.unstable_strictMode===!0&&(i=!0),a.identifierPrefix!==void 0&&(o=a.identifierPrefix),a.onUncaughtError!==void 0&&(f=a.onUncaughtError),a.onCaughtError!==void 0&&(g=a.onCaughtError),a.onRecoverableError!==void 0&&(S=a.onRecoverableError),a.formState!==void 0&&(_=a.formState)),t=ug(e,1,!0,t,a??null,i,o,_,f,g,S,Sg),t.context=fg(null),a=t.current,i=cn(),i=Zc(i),o=Da(i),o.callback=null,Ua(a,o,i),a=i,t.current.lanes=a,Ml(t,a),Hn(t),e[yi]=t.current,Hf(e),new cc(t)},Nr.version="19.2.6",Nr}var yv;function Mw(){if(yv)return jd.exports;yv=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(),jd.exports=Cw(),jd.exports}var Aw=Mw();function Ow(){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 q0={baseUrl:Ow()};class Ut extends Error{constructor(l,r,c){super(r);$a(this,"status");$a(this,"body");this.name="ApiError",this.status=l,this.body=c}}function zw(n,s){const r=`${q0.baseUrl}${n.startsWith("/")?n:`/${n}`}`;if(!s)return r;const c=new URLSearchParams;for(const[h,y]of Object.entries(s))y!=null&&c.append(h,String(y));const d=c.toString();return d?`${r}?${d}`:r}async function tl(n,s={}){const{json:l,query:r,headers:c,...d}=s,h={credentials:"include",...d,headers:{Accept:"application/json",...l!==void 0?{"Content-Type":"application/json"}:{},...c}};l!==void 0&&(h.body=JSON.stringify(l));const y=await fetch(zw(n,r),h),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 Ut(y.status,v,b)}return b}const Be={request:tl,get:(n,s)=>tl(n,{...s,method:"GET"}),post:(n,s)=>tl(n,{...s,method:"POST"}),put:(n,s)=>tl(n,{...s,method:"PUT"}),patch:(n,s)=>tl(n,{...s,method:"PATCH"}),delete:(n,s)=>tl(n,{...s,method:"DELETE"})};function kw(){return Be.get("/v1/auth/status")}var Dw={};const Tc=Object.create(null),Rr=n=>{var s;return Dw||((s=globalThis.Deno)==null?void 0:s.env.toObject())||globalThis.__env__||(n?Tc:globalThis)},Ys=new Proxy(Tc,{get(n,s){return Rr()[s]??Tc[s]},has(n,s){return s in Rr()||s in Tc},set(n,s,l){const r=Rr(!0);return r[s]=l,!0},deleteProperty(n,s){if(!s)return!1;const l=Rr(!0);return delete l[s],!0},ownKeys(){const n=Rr(!0);return Object.keys(n)}});var Cc=class extends Error{constructor(n,s){super(n,s),this.name="BetterAuthError",this.message=n,this.stack=""}};function Uw(n){try{return(new URL(n).pathname.replace(/\/+$/,"")||"/")!=="/"}catch{throw new Cc(`Invalid base URL: ${n}. Please provide a valid base URL.`)}}function Lw(n){try{const s=new URL(n);if(s.protocol!=="http:"&&s.protocol!=="https:")throw new Cc(`Invalid base URL: ${n}. URL must include 'http://' or 'https://'`)}catch(s){throw s instanceof Cc?s:new Cc(`Invalid base URL: ${n}. Please provide a valid base URL.`,{cause:s})}}function Rd(n,s="/api/auth"){if(Lw(n),Uw(n))return n;const l=n.replace(/\/+$/,"");return!s||s==="/"?l:(s=s.startsWith("/")?s:`/${s}`,`${l}${s}`)}function Bw(n,s,l,r,c){if(n)return Rd(n,s);{const d=Ys.BETTER_AUTH_URL||Ys.NEXT_PUBLIC_BETTER_AUTH_URL||Ys.PUBLIC_BETTER_AUTH_URL||Ys.NUXT_PUBLIC_BETTER_AUTH_URL||Ys.NUXT_PUBLIC_AUTH_URL||(Ys.BASE_URL!=="/"?Ys.BASE_URL:void 0);if(d)return Rd(d,s)}if(typeof window<"u"&&window.location)return Rd(window.location.origin,s)}const qw={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*:/},Hw=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,gv={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:Number.POSITIVE_INFINITY,"-infinity":Number.NEGATIVE_INFINITY},Qw=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function Gw(n){return n instanceof Date&&!isNaN(n.getTime())}function Vw(n){const s=Qw.exec(n);if(!s)return null;const[,l,r,c,d,h,y,p,m,b,v]=s,x=new Date(Date.UTC(parseInt(l,10),parseInt(r,10)-1,parseInt(c,10),parseInt(d,10),parseInt(h,10),parseInt(y,10),p?parseInt(p.padEnd(3,"0"),10):0));if(m){const w=(parseInt(b,10)*60+parseInt(v,10))*(m==="+"?-1:1);x.setUTCMinutes(x.getUTCMinutes()+w)}return Gw(x)?x:null}function Yw(n,s={}){const{strict:l=!1,warnings:r=!1,reviver:c,parseDates:d=!0}=s;if(typeof n!="string")return n;const h=n.trim();if(h.length>0&&h[0]==='"'&&h.endsWith('"')&&!h.slice(1,-1).includes('"'))return h.slice(1,-1);const y=h.toLowerCase();if(y.length<=9&&y in gv)return gv[y];if(!Hw.test(h)){if(l)throw new SyntaxError("[better-json] Invalid JSON");return n}if(Object.entries(qw).some(([p,m])=>{const b=m.test(h);return b&&r&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${p} pattern`),b})&&l)throw new Error("[better-json] Potential prototype pollution attempt detected");try{return JSON.parse(h,(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(d&&typeof b=="string"){const v=Vw(b);if(v)return v}return c?c(m,b):b})}catch(p){if(l)throw p;return n}}function Pw(n,s={strict:!0}){return Yw(n,s)}const Kw={id:"redirect",name:"Redirect",hooks:{onSuccess(n){var s,l;if((s=n.data)!=null&&s.url&&((l=n.data)!=null&&l.redirect)&&typeof window<"u"&&window.location&&window.location)try{window.location.href=n.data.url}catch{}}}};let An=[],Wa=0;const gc=4,Xw=globalThis.nanostoresGlobal||(globalThis.nanostoresGlobal={epoch:0}),H0=n=>{let s=[],l={get(){return l.lc||l.listen(()=>{})(),l.value},init:n,lc:0,listen(r){return l.lc=s.push(r),()=>{for(let d=Wa+gc;d<An.length;)An[d]===r?An.splice(d,gc):d+=gc;let c=s.indexOf(r);~c&&(s.splice(c,1),--l.lc||l.off())}},notify(r,c){Xw.epoch++;let d=!An.length;for(let h of s)An.push(h,l.value,r,c);if(d){for(Wa=0;Wa<An.length;Wa+=gc)An[Wa](An[Wa+1],An[Wa+2],An[Wa+3]);An.length=0}},off(){},set(r){let c=l.value;c!==r&&(l.value=r,l.notify(c))},subscribe(r){let c=l.listen(r);return r(l.value),c},value:n};return l},Zw=5,vc=6,bc=10;let Fw=(n,s,l,r)=>(n.events=n.events||{},n.events[l+bc]||(n.events[l+bc]=r(c=>{n.events[l].reduceRight((d,h)=>(h(d),d),{shared:{},...c})})),n.events[l]=n.events[l]||[],n.events[l].push(s),()=>{let c=n.events[l],d=c.indexOf(s);c.splice(d,1),c.length||(delete n.events[l],n.events[l+bc](),delete n.events[l+bc])});const Jw=1e3;let Q0=(n,s)=>Fw(n,r=>{let c=s(r);c&&n.events[vc].push(c)},Zw,r=>{let c=n.listen;n.listen=(...h)=>(!n.lc&&!n.active&&(n.active=!0,r()),c(...h));let d=n.off;return n.events[vc]=[],n.off=()=>{d(),setTimeout(()=>{if(n.active&&!n.lc){n.active=!1;for(let h of n.events[vc])h();n.events[vc]=[]}},Jw)},()=>{n.listen=c,n.off=d}});function Iw(n,s,l){let r=new Set(s).add(void 0);return n.listen((c,d,h)=>{r.has(h)&&l(c,d,h)})}const $w=()=>typeof window>"u",Ww=(n,s,l,r)=>{const c=H0({data:null,error:null,isPending:!0,isRefetching:!1,refetch:y=>d(y)}),d=async y=>new Promise(p=>{const m=typeof r=="function"?r({data:c.get().data,error:c.get().error,isPending:c.get().isPending}):r;l(s,{...m,query:{...m==null?void 0:m.query,...y==null?void 0:y.query},async onSuccess(b){var v;c.set({data:b.data,error:null,isPending:!1,isRefetching:!1,refetch:c.value.refetch}),await((v=m==null?void 0:m.onSuccess)==null?void 0:v.call(m,b))},async onError(b){var R,j;const{request:v}=b,x=typeof v.retry=="number"?v.retry:(R=v.retry)==null?void 0:R.attempts,w=v.retryAttempt||0;if(x&&w<x)return;const N=b.error.status===401;c.set({error:b.error,data:N?null:c.get().data,isPending:!1,isRefetching:!1,refetch:c.value.refetch}),await((j=m==null?void 0:m.onError)==null?void 0:j.call(m,b))},async onRequest(b){var x;const v=c.get();c.set({isPending:v.data===null,data:v.data,error:null,isRefetching:!0,refetch:c.value.refetch}),await((x=m==null?void 0:m.onRequest)==null?void 0:x.call(m,b))}}).catch(b=>{c.set({error:b,data:c.get().data,isPending:!1,isRefetching:!1,refetch:c.value.refetch})}).finally(()=>{p(void 0)})});n=Array.isArray(n)?n:[n];let h=!1;for(const y of n)y.subscribe(async()=>{$w()||(h?await d():Q0(c,()=>{const p=setTimeout(async()=>{h||(h=!0,await d())},0);return()=>{c.off(),y.off(),clearTimeout(p)}}))});return c},_d=Symbol.for("better-auth:broadcast-channel"),e2=()=>Math.floor(Date.now()/1e3);var t2=class{constructor(n="better-auth.message"){$a(this,"listeners",new Set);$a(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:e2()}))}catch{}}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};const n=s=>{if(s.key!==this.name)return;const l=JSON.parse(s.newValue??"{}");(l==null?void 0:l.event)!=="session"||!(l!=null&&l.data)||this.listeners.forEach(r=>r(l))};return window.addEventListener("storage",n),()=>{window.removeEventListener("storage",n)}}};function Ed(n="better-auth.message"){return globalThis[_d]||(globalThis[_d]=new t2(n)),globalThis[_d]}const Td=Symbol.for("better-auth:focus-manager");var n2=class{constructor(){$a(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 vv(){return globalThis[Td]||(globalThis[Td]=new n2),globalThis[Td]}const Cd=Symbol.for("better-auth:online-manager");var a2=class{constructor(){$a(this,"listeners",new Set);$a(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 Md(){return globalThis[Cd]||(globalThis[Cd]=new a2),globalThis[Cd]}const nl=()=>Math.floor(Date.now()/1e3);function bv(n){return typeof n=="object"&&n!==null&&"data"in n&&"error"in n?n:{data:n,error:null}}const s2=5;function i2(n){var A,B,T;const{sessionAtom:s,sessionSignal:l,$fetch:r,options:c={}}=n,d=((A=c.sessionOptions)==null?void 0:A.refetchInterval)??0,h=((B=c.sessionOptions)==null?void 0:B.refetchOnWindowFocus)??!0,y=((T=c.sessionOptions)==null?void 0:T.refetchWhenOffline)??!1,p={lastSync:0,lastSessionRequest:0,cachedSession:void 0},m=()=>y||Md().isOnline,b=Q=>{if(!m())return;if((Q==null?void 0:Q.event)==="storage"){p.lastSync=nl(),l.set(!l.get());return}const U=s.get(),k=()=>{p.lastSessionRequest=nl(),r("/get-session").then(async O=>{let{data:P,error:$}=bv(O);if(P!=null&&P.needsRefresh)try{const Z=await r("/get-session",{method:"POST"});({data:P,error:$}=bv(Z))}catch{}const W=P!=null&&P.session&&(P!=null&&P.user)?P:null;s.set({...U,data:W,error:$}),p.lastSync=nl(),l.set(!l.get())}).catch(()=>{})};if((Q==null?void 0:Q.event)==="poll"){k();return}if((Q==null?void 0:Q.event)==="visibilitychange"){if(nl()-p.lastSessionRequest<s2)return;p.lastSessionRequest=nl()}if((Q==null?void 0:Q.event)==="visibilitychange"){k();return}((U==null?void 0:U.data)===null||(U==null?void 0:U.data)===void 0)&&(p.lastSync=nl(),l.set(!l.get()))},v=Q=>{Ed().post({event:"session",data:{trigger:Q},clientId:Math.random().toString(36).substring(7)})},x=()=>{d&&d>0&&(p.pollInterval=setInterval(()=>{var Q;(Q=s.get())!=null&&Q.data&&b({event:"poll"})},d*1e3))},w=()=>{p.unsubscribeBroadcast=Ed().subscribe(()=>{b({event:"storage"})})},N=()=>{h&&(p.unsubscribeFocus=vv().subscribe(()=>{b({event:"visibilitychange"})}))},R=()=>{p.unsubscribeOnline=Md().subscribe(Q=>{Q&&b({event:"visibilitychange"})})};return{init:()=>{x(),w(),N(),R(),Ed().setup(),vv().setup(),Md().setup()},cleanup:()=>{p.pollInterval&&(clearInterval(p.pollInterval),p.pollInterval=void 0),p.unsubscribeBroadcast&&(p.unsubscribeBroadcast(),p.unsubscribeBroadcast=void 0),p.unsubscribeFocus&&(p.unsubscribeFocus(),p.unsubscribeFocus=void 0),p.unsubscribeOnline&&(p.unsubscribeOnline(),p.unsubscribeOnline=void 0),p.lastSync=0,p.lastSessionRequest=0,p.cachedSession=void 0},triggerRefetch:b,broadcastSessionUpdate:v}}function l2(n,s){const l=H0(!1),r=Ww(l,"/get-session",n,{method:"GET"});let c=()=>{};return Q0(r,()=>{const d=i2({sessionAtom:r,sessionSignal:l,$fetch:n,options:s});return d.init(),c=d.broadcastSessionUpdate,()=>{d.cleanup()}}),{session:r,$sessionSignal:l,broadcastSessionUpdate:d=>c(d)}}function Ad(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 th(n,s,l=".",r){if(!Ad(s))return th(n,{},l,r);const c={...s};for(const d of Object.keys(n)){if(d==="__proto__"||d==="constructor")continue;const h=n[d];h!=null&&(r&&r(c,d,h,l)||(Array.isArray(h)&&Array.isArray(c[d])?c[d]=[...h,...c[d]]:Ad(h)&&Ad(c[d])?c[d]=th(h,c[d],(l?`${l}.`:"")+d.toString(),r):c[d]=h))}return c}function r2(n){return(...s)=>s.reduce((l,r)=>th(l,r,"",n),{})}const o2=r2();var c2=Object.defineProperty,u2=Object.defineProperties,f2=Object.getOwnPropertyDescriptors,xv=Object.getOwnPropertySymbols,d2=Object.prototype.hasOwnProperty,h2=Object.prototype.propertyIsEnumerable,Sv=(n,s,l)=>s in n?c2(n,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):n[s]=l,zn=(n,s)=>{for(var l in s||(s={}))d2.call(s,l)&&Sv(n,l,s[l]);if(xv)for(var l of xv(s))h2.call(s,l)&&Sv(n,l,s[l]);return n},Vn=(n,s)=>u2(n,f2(s)),m2=class extends Error{constructor(n,s,l){super(s||n.toString(),{cause:l}),this.status=n,this.statusText=s,this.error=l,Error.captureStackTrace(this,this.constructor)}},p2=async(n,s)=>{var l,r,c,d,h,y;let p=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:p,hooks:m};for(const b of(s==null?void 0:s.plugins)||[]){if(b.init){const v=await((l=b.init)==null?void 0:l.call(b,n.toString(),s));p=v.options||p,n=v.url}m.onRequest.push((r=b.hooks)==null?void 0:r.onRequest),m.onResponse.push((c=b.hooks)==null?void 0:c.onResponse),m.onSuccess.push((d=b.hooks)==null?void 0:d.onSuccess),m.onError.push((h=b.hooks)==null?void 0:h.onError),m.onRetry.push((y=b.hooks)==null?void 0:y.onRetry)}return{url:n,options:p,hooks:m}},jv=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}},y2=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 g2(n){if(typeof n=="number")return new jv({type:"linear",attempts:n,delay:1e3});switch(n.type){case"linear":return new jv(n);case"exponential":return new y2(n);default:throw new Error("Invalid retry strategy")}}var v2=async n=>{const s={},l=async r=>typeof r=="function"?await r():r;if(n!=null&&n.auth){if(n.auth.type==="Bearer"){const r=await l(n.auth.token);if(!r)return s;s.authorization=`Bearer ${r}`}else if(n.auth.type==="Basic"){const[r,c]=await Promise.all([l(n.auth.username),l(n.auth.password)]);if(!r||!c)return s;s.authorization=`Basic ${btoa(`${r}:${c}`)}`}else if(n.auth.type==="Custom"){const[r,c]=await Promise.all([l(n.auth.prefix),l(n.auth.value)]);if(!c)return s;s.authorization=`${r??""} ${c}`}}return s},b2=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function x2(n){const s=n.headers.get("content-type"),l=new Set(["image/svg","application/xml","application/xhtml","application/html"]);if(!s)return"json";const r=s.split(";").shift()||"";return b2.test(r)?"json":l.has(r)||r.startsWith("text/")?"text":"blob"}function S2(n){try{return JSON.parse(n),!0}catch{return!1}}function nh(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 wv(n){try{return JSON.parse(n)}catch{return n}}function Nv(n){return typeof n=="function"}function j2(n){if(n!=null&&n.customFetchImpl)return n.customFetchImpl;if(typeof globalThis<"u"&&Nv(globalThis.fetch))return globalThis.fetch;if(typeof window<"u"&&Nv(window.fetch))return window.fetch;throw new Error("No fetch implementation found")}async function w2(n){const s=new Headers(n==null?void 0:n.headers),l=await v2(n);for(const[r,c]of Object.entries(l||{}))s.set(r,c);if(!s.has("content-type")){const r=N2(n==null?void 0:n.body);r&&s.set("content-type",r)}return s}function N2(n){return nh(n)?"application/json":null}function R2(n){if(!(n!=null&&n.body))return null;const s=new Headers(n==null?void 0:n.headers);if(nh(n.body)&&!s.has("content-type")){for(const[l,r]of Object.entries(n==null?void 0:n.body))r instanceof Date&&(n.body[l]=r.toISOString());return JSON.stringify(n.body)}return s.has("content-type")&&s.get("content-type")==="application/x-www-form-urlencoded"&&nh(n.body)?new URLSearchParams(n.body).toString():n.body}function _2(n,s){var l;if(s!=null&&s.method)return s.method.toUpperCase();if(n.startsWith("@")){const r=(l=n.split("@")[1])==null?void 0:l.split("/")[0];return V0.includes(r)?r.toUpperCase():s!=null&&s.body?"POST":"GET"}return s!=null&&s.body?"POST":"GET"}function E2(n,s){let l;return!(n!=null&&n.signal)&&(n!=null&&n.timeout)&&(l=setTimeout(()=>s==null?void 0:s.abort(),n==null?void 0:n.timeout)),{abortTimeout:l,clearTimeout:()=>{l&&clearTimeout(l)}}}var T2=class G0 extends Error{constructor(s,l){super(l||JSON.stringify(s,null,2)),this.issues=s,Object.setPrototypeOf(this,G0.prototype)}};async function Mc(n,s){const l=await n["~standard"].validate(s);if(l.issues)throw new T2(l.issues);return l.value}var V0=["get","post","put","patch","delete"],C2=n=>({id:"apply-schema",name:"Apply Schema",version:"1.0.0",async init(s,l){var r,c,d,h;const y=((c=(r=n.plugins)==null?void 0:r.find(p=>{var m;return(m=p.schema)!=null&&m.config?s.startsWith(p.schema.config.baseURL||"")||s.startsWith(p.schema.config.prefix||""):!1}))==null?void 0:c.schema)||n.schema;if(y){let p=s;(d=y.config)!=null&&d.prefix&&p.startsWith(y.config.prefix)&&(p=p.replace(y.config.prefix,""),y.config.baseURL&&(s=s.replace(y.config.prefix,y.config.baseURL))),(h=y.config)!=null&&h.baseURL&&p.startsWith(y.config.baseURL)&&(p=p.replace(y.config.baseURL,""));const m=y.schema[p];if(m){let b=Vn(zn({},l),{method:m.method,output:m.output});return l!=null&&l.disableValidation||(b=Vn(zn({},b),{body:m.input?await Mc(m.input,l==null?void 0:l.body):l==null?void 0:l.body,params:m.params?await Mc(m.params,l==null?void 0:l.params):l==null?void 0:l.params,query:m.query?await Mc(m.query,l==null?void 0:l.query):l==null?void 0:l.query})),{url:s,options:b}}}return{url:s,options:l}}}),M2=n=>{async function s(l,r){const c=Vn(zn(zn({},n),r),{plugins:[...(n==null?void 0:n.plugins)||[],C2(n||{}),...(r==null?void 0:r.plugins)||[]]});if(n!=null&&n.catchAllError)try{return await ah(l,c)}catch(d){return{data:null,error:{status:500,statusText:"Fetch Error",message:"Fetch related error. Captured by catchAllError option. See error property for more details.",error:d}}}return await ah(l,c)}return s};function A2(n,s){const{baseURL:l,params:r,query:c}=s||{query:{},params:{},baseURL:""};let d=n.startsWith("http")?n.split("/").slice(0,3).join("/"):l||"";if(n.startsWith("@")){const v=n.toString().split("@")[1].split("/")[0];V0.includes(v)&&(n=n.replace(`@${v}/`,"/"))}d.endsWith("/")||(d+="/");let[h,y]=n.replace(d,"").split("?");const p=new URLSearchParams(y);for(const[v,x]of Object.entries(c||{})){if(x==null)continue;let w;if(typeof x=="string")w=x;else if(Array.isArray(x)){for(const N of x)p.append(v,N);continue}else w=JSON.stringify(x);p.set(v,w)}if(r)if(Array.isArray(r)){const v=h.split("/").filter(x=>x.startsWith(":"));for(const[x,w]of v.entries()){const N=r[x];h=h.replace(w,N)}}else for(const[v,x]of Object.entries(r))h=h.replace(`:${v}`,String(x));h=h.split("/").map(encodeURIComponent).join("/"),h.startsWith("/")&&(h=h.slice(1));let m=p.toString();return m=m.length>0?`?${m}`.replace(/\+/g,"%20"):"",d.startsWith("http")?new URL(`${h}${m}`,d):`${d}${h}${m}`}var ah=async(n,s)=>{var l,r,c,d,h,y,p,m;const{hooks:b,url:v,options:x}=await p2(n,s),w=j2(x),N=new AbortController,R=(l=x.signal)!=null?l:N.signal,j=A2(v,x),z=R2(x),A=await w2(x),B=_2(v,x);let T=Vn(zn({},x),{url:j,headers:A,body:z,method:B,signal:R});for(const te of b.onRequest)if(te){const ee=await te(T);typeof ee=="object"&&ee!==null&&(T=ee)}("pipeTo"in T&&typeof T.pipeTo=="function"||typeof((r=s==null?void 0:s.body)==null?void 0:r.pipe)=="function")&&("duplex"in T||(T.duplex="half"));const{clearTimeout:Q}=E2(x,N);let U=await w(T.url,T);Q();const k={response:U,request:T};for(const te of b.onResponse)if(te){const ee=await te(Vn(zn({},k),{response:(c=s==null?void 0:s.hookOptions)!=null&&c.cloneResponse?U.clone():U}));ee instanceof Response?U=ee:typeof ee=="object"&&ee!==null&&(U=ee.response)}if(U.ok){if(!(T.method!=="HEAD"))return{data:"",error:null};const ee=x2(U),he={data:null,response:U,request:T};if(ee==="json"||ee==="text"){const L=await U.text(),K=(d=T.jsonParser)!=null?d:wv;he.data=await K(L)}else he.data=await U[ee]();T!=null&&T.output&&T.output&&!T.disableValidation&&(he.data=await Mc(T.output,he.data));for(const L of b.onSuccess)L&&await L(Vn(zn({},he),{response:(h=s==null?void 0:s.hookOptions)!=null&&h.cloneResponse?U.clone():U}));return s!=null&&s.throw?he.data:{data:he.data,error:null}}const O=(y=s==null?void 0:s.jsonParser)!=null?y:wv,P=await U.text(),$=S2(P),W=$?await O(P):null,Z={response:U,responseText:P,request:T,error:Vn(zn({},W),{status:U.status,statusText:U.statusText})};for(const te of b.onError)te&&await te(Vn(zn({},Z),{response:(p=s==null?void 0:s.hookOptions)!=null&&p.cloneResponse?U.clone():U}));if(s!=null&&s.retry){const te=g2(s.retry),ee=(m=s.retryAttempt)!=null?m:0;if(await te.shouldAttemptRetry(ee,U)){for(const L of b.onRetry)L&&await L(k);const he=te.getDelay(ee);return await new Promise(L=>setTimeout(L,he)),await ah(n,Vn(zn({},s),{retryAttempt:ee+1}))}}if(s!=null&&s.throw)throw new m2(U.status,U.statusText,$?W:P);return{data:null,error:Vn(zn({},W),{status:U.status,statusText:U.statusText})}},Ps={};const O2=n=>{if(typeof process>"u")return;const s=n??"/api/auth";if(Ps.NEXT_PUBLIC_AUTH_URL)return Ps.NEXT_PUBLIC_AUTH_URL;if(typeof window>"u"){if(Ps.NEXTAUTH_URL)try{return Ps.NEXTAUTH_URL}catch{}if(Ps.VERCEL_URL)try{const l=Ps.VERCEL_URL.startsWith("http")?"":"https://";return`${new URL(`${l}${Ps.VERCEL_URL}`).origin}${s}`}catch{}}},z2=(n,s)=>{var Q,U,k,O,P,$,W;const l="credentials"in Request.prototype,r=Bw(n==null?void 0:n.baseURL,n==null?void 0:n.basePath)??O2(n==null?void 0:n.basePath)??"/api/auth",c=((Q=n==null?void 0:n.plugins)==null?void 0:Q.flatMap(Z=>Z.fetchPlugins).filter(Z=>Z!==void 0))||[],d={id:"lifecycle-hooks",name:"lifecycle-hooks",hooks:{onSuccess:(U=n==null?void 0:n.fetchOptions)==null?void 0:U.onSuccess,onError:(k=n==null?void 0:n.fetchOptions)==null?void 0:k.onError,onRequest:(O=n==null?void 0:n.fetchOptions)==null?void 0:O.onRequest,onResponse:(P=n==null?void 0:n.fetchOptions)==null?void 0:P.onResponse}},{onSuccess:h,onError:y,onRequest:p,onResponse:m,...b}=(n==null?void 0:n.fetchOptions)||{},v=M2({baseURL:r,...l?{credentials:"include"}:{},method:"GET",jsonParser(Z){return Z?Pw(Z,{strict:!1}):null},customFetchImpl:fetch,...b,plugins:[d,...b.plugins||[],...n!=null&&n.disableDefaultFetchPlugins?[]:[Kw],...c]}),{$sessionSignal:x,session:w,broadcastSessionUpdate:N}=l2(v,n),R=(n==null?void 0:n.plugins)||[];let j={};const z={$sessionSignal:x,session:w},A={"/sign-out":"POST","/revoke-sessions":"POST","/revoke-other-sessions":"POST","/delete-user":"POST"},B=[{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"?N("signout"):(Z==="/update-user"||Z==="/update-session")&&N("updateUser")}}];for(const Z of R)Z.getAtoms&&Object.assign(z,($=Z.getAtoms)==null?void 0:$.call(Z,v)),Z.pathMethods&&Object.assign(A,Z.pathMethods),Z.atomListeners&&B.push(...Z.atomListeners);const T={notify:Z=>{z[Z].set(!z[Z].get())},listen:(Z,te)=>{z[Z].subscribe(te)},atoms:z};for(const Z of R)Z.getActions&&(j=o2(((W=Z.getActions)==null?void 0:W.call(Z,v,T,n))??{},j));return{get baseURL(){return r},pluginsActions:j,pluginsAtoms:z,pluginPathMethods:A,atomListeners:B,$fetch:v,$store:T}};function k2(n){return typeof n=="object"&&n!==null&&"get"in n&&typeof n.get=="function"&&"lc"in n&&typeof n.lc=="number"}function D2(n,s,l){const r=s[n],{fetchOptions:c,query:d,...h}=l||{};return r||(c!=null&&c.method?c.method:h&&Object.keys(h).length>0?"POST":"GET")}function U2(n,s,l,r,c){function d(h=[]){return new Proxy(function(){},{get(y,p){if(typeof p!="string"||p==="then"||p==="catch"||p==="finally")return;const m=[...h,p];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"||k2(b)?b:d(m)},apply:async(y,p,m)=>{const b="/"+h.map(A=>A.replace(/[A-Z]/g,B=>`-${B.toLowerCase()}`)).join("/"),v=m[0]||{},x=m[1]||{},{query:w,fetchOptions:N,...R}=v,j={...x,...N},z=D2(b,l,v);return await s(b,{...j,body:z==="GET"?void 0:{...R,...(j==null?void 0:j.body)||{}},query:w||(j==null?void 0:j.query),method:z,async onSuccess(A){var Q,U;if(await((Q=j==null?void 0:j.onSuccess)==null?void 0:Q.call(j,A)),!c||j.disableSignal)return;const B=c.filter(k=>k.matcher(b));if(!B.length)return;const T=new Set;for(const k of B){const O=r[k.signal];if(!O)return;if(T.has(k.signal))continue;T.add(k.signal);const P=O.get();setTimeout(()=>{O.set(!P)},10),(U=k.callback)==null||U.call(k,b)}}})}})}return d()}function L2(n,s={}){const l=V.useRef(n.get()),{keys:r,deps:c=[n,r]}=s,d=V.useCallback(y=>{const p=m=>{l.current!==m&&(l.current=m,y())};return p(n.value),r!=null&&r.length?Iw(n,r,p):n.listen(p)},c),h=()=>l.current;return V.useSyncExternalStore(d,h,h)}function B2(n){return n.charAt(0).toUpperCase()+n.slice(1)}function q2(n){return`use${B2(n)}`}function H2(n){const{pluginPathMethods:s,pluginsActions:l,pluginsAtoms:r,$fetch:c,$store:d,atomListeners:h}=z2(n),y={};for(const[p,m]of Object.entries(r))y[q2(p)]=()=>L2(m);return U2({...l,...y,$fetch:c,$store:d},c,s,r,h)}const Q2=H2({baseURL:`${q0.baseUrl}/api/auth`,fetchOptions:{credentials:"include"}}),{signIn:G2,signOut:V2,useSession:Y0,requestPasswordReset:Y2,resetPassword:P2}=Q2;function P0(n){var s,l,r="";if(typeof n=="string"||typeof n=="number")r+=n;else if(typeof n=="object")if(Array.isArray(n)){var c=n.length;for(s=0;s<c;s++)n[s]&&(l=P0(n[s]))&&(r&&(r+=" "),r+=l)}else for(l in n)n[l]&&(r&&(r+=" "),r+=l);return r}function K0(){for(var n,s,l=0,r="",c=arguments.length;l<c;l++)(n=arguments[l])&&(s=P0(n))&&(r&&(r+=" "),r+=s);return r}const K2=(n,s)=>{const l=new Array(n.length+s.length);for(let r=0;r<n.length;r++)l[r]=n[r];for(let r=0;r<s.length;r++)l[n.length+r]=s[r];return l},X2=(n,s)=>({classGroupId:n,validator:s}),X0=(n=new Map,s=null,l)=>({nextPart:n,validators:s,classGroupId:l}),Hc="-",Rv=[],Z2="arbitrary..",F2=n=>{const s=I2(n),{conflictingClassGroups:l,conflictingClassGroupModifiers:r}=n;return{getClassGroupId:h=>{if(h.startsWith("[")&&h.endsWith("]"))return J2(h);const y=h.split(Hc),p=y[0]===""&&y.length>1?1:0;return Z0(y,p,s)},getConflictingClassGroupIds:(h,y)=>{if(y){const p=r[h],m=l[h];return p?m?K2(m,p):p:m||Rv}return l[h]||Rv}}},Z0=(n,s,l)=>{if(n.length-s===0)return l.classGroupId;const c=n[s],d=l.nextPart.get(c);if(d){const m=Z0(n,s+1,d);if(m)return m}const h=l.validators;if(h===null)return;const y=s===0?n.join(Hc):n.slice(s).join(Hc),p=h.length;for(let m=0;m<p;m++){const b=h[m];if(b.validator(y))return b.classGroupId}},J2=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const s=n.slice(1,-1),l=s.indexOf(":"),r=s.slice(0,l);return r?Z2+r:void 0})(),I2=n=>{const{theme:s,classGroups:l}=n;return $2(l,s)},$2=(n,s)=>{const l=X0();for(const r in n){const c=n[r];bh(c,l,r,s)}return l},bh=(n,s,l,r)=>{const c=n.length;for(let d=0;d<c;d++){const h=n[d];W2(h,s,l,r)}},W2=(n,s,l,r)=>{if(typeof n=="string"){eN(n,s,l);return}if(typeof n=="function"){tN(n,s,l,r);return}nN(n,s,l,r)},eN=(n,s,l)=>{const r=n===""?s:F0(s,n);r.classGroupId=l},tN=(n,s,l,r)=>{if(aN(n)){bh(n(r),s,l,r);return}s.validators===null&&(s.validators=[]),s.validators.push(X2(l,n))},nN=(n,s,l,r)=>{const c=Object.entries(n),d=c.length;for(let h=0;h<d;h++){const[y,p]=c[h];bh(p,F0(s,y),l,r)}},F0=(n,s)=>{let l=n;const r=s.split(Hc),c=r.length;for(let d=0;d<c;d++){const h=r[d];let y=l.nextPart.get(h);y||(y=X0(),l.nextPart.set(h,y)),l=y}return l},aN=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,sN=n=>{if(n<1)return{get:()=>{},set:()=>{}};let s=0,l=Object.create(null),r=Object.create(null);const c=(d,h)=>{l[d]=h,s++,s>n&&(s=0,r=l,l=Object.create(null))};return{get(d){let h=l[d];if(h!==void 0)return h;if((h=r[d])!==void 0)return c(d,h),h},set(d,h){d in l?l[d]=h:c(d,h)}}},sh="!",_v=":",iN=[],Ev=(n,s,l,r,c)=>({modifiers:n,hasImportantModifier:s,baseClassName:l,maybePostfixModifierPosition:r,isExternal:c}),lN=n=>{const{prefix:s,experimentalParseClassName:l}=n;let r=c=>{const d=[];let h=0,y=0,p=0,m;const b=c.length;for(let R=0;R<b;R++){const j=c[R];if(h===0&&y===0){if(j===_v){d.push(c.slice(p,R)),p=R+1;continue}if(j==="/"){m=R;continue}}j==="["?h++:j==="]"?h--:j==="("?y++:j===")"&&y--}const v=d.length===0?c:c.slice(p);let x=v,w=!1;v.endsWith(sh)?(x=v.slice(0,-1),w=!0):v.startsWith(sh)&&(x=v.slice(1),w=!0);const N=m&&m>p?m-p:void 0;return Ev(d,w,x,N)};if(s){const c=s+_v,d=r;r=h=>h.startsWith(c)?d(h.slice(c.length)):Ev(iN,!1,h,void 0,!0)}if(l){const c=r;r=d=>l({className:d,parseClassName:c})}return r},rN=n=>{const s=new Map;return n.orderSensitiveModifiers.forEach((l,r)=>{s.set(l,1e6+r)}),l=>{const r=[];let c=[];for(let d=0;d<l.length;d++){const h=l[d],y=h[0]==="[",p=s.has(h);y||p?(c.length>0&&(c.sort(),r.push(...c),c=[]),r.push(h)):c.push(h)}return c.length>0&&(c.sort(),r.push(...c)),r}},oN=n=>({cache:sN(n.cacheSize),parseClassName:lN(n),sortModifiers:rN(n),postfixLookupClassGroupIds:cN(n),...F2(n)}),cN=n=>{const s=Object.create(null),l=n.postfixLookupClassGroups;if(l)for(let r=0;r<l.length;r++)s[l[r]]=!0;return s},uN=/\s+/,fN=(n,s)=>{const{parseClassName:l,getClassGroupId:r,getConflictingClassGroupIds:c,sortModifiers:d,postfixLookupClassGroupIds:h}=s,y=[],p=n.trim().split(uN);let m="";for(let b=p.length-1;b>=0;b-=1){const v=p[b],{isExternal:x,modifiers:w,hasImportantModifier:N,baseClassName:R,maybePostfixModifierPosition:j}=l(v);if(x){m=v+(m.length>0?" "+m:m);continue}let z=!!j,A;if(z){const k=R.substring(0,j);A=r(k);const O=A&&h[A]?r(R):void 0;O&&O!==A&&(A=O,z=!1)}else A=r(R);if(!A){if(!z){m=v+(m.length>0?" "+m:m);continue}if(A=r(R),!A){m=v+(m.length>0?" "+m:m);continue}z=!1}const B=w.length===0?"":w.length===1?w[0]:d(w).join(":"),T=N?B+sh:B,Q=T+A;if(y.indexOf(Q)>-1)continue;y.push(Q);const U=c(A,z);for(let k=0;k<U.length;++k){const O=U[k];y.push(T+O)}m=v+(m.length>0?" "+m:m)}return m},dN=(...n)=>{let s=0,l,r,c="";for(;s<n.length;)(l=n[s++])&&(r=J0(l))&&(c&&(c+=" "),c+=r);return c},J0=n=>{if(typeof n=="string")return n;let s,l="";for(let r=0;r<n.length;r++)n[r]&&(s=J0(n[r]))&&(l&&(l+=" "),l+=s);return l},hN=(n,...s)=>{let l,r,c,d;const h=p=>{const m=s.reduce((b,v)=>v(b),n());return l=oN(m),r=l.cache.get,c=l.cache.set,d=y,y(p)},y=p=>{const m=r(p);if(m)return m;const b=fN(p,l);return c(p,b),b};return d=h,(...p)=>d(dN(...p))},mN=[],ht=n=>{const s=l=>l[n]||mN;return s.isThemeGetter=!0,s},I0=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,$0=/^\((?:(\w[\w-]*):)?(.+)\)$/i,pN=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,yN=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,gN=/\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$/,vN=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,bN=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,xN=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,es=n=>pN.test(n),Ne=n=>!!n&&!Number.isNaN(Number(n)),Qn=n=>!!n&&Number.isInteger(Number(n)),Od=n=>n.endsWith("%")&&Ne(n.slice(0,-1)),ya=n=>yN.test(n),W0=()=>!0,SN=n=>gN.test(n)&&!vN.test(n),xh=()=>!1,jN=n=>bN.test(n),wN=n=>xN.test(n),NN=n=>!re(n)&&!oe(n),RN=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)),_N=n=>xs(n,nb,xh),re=n=>I0.test(n),Ks=n=>xs(n,ab,SN),Tv=n=>xs(n,kN,Ne),EN=n=>xs(n,ib,W0),TN=n=>xs(n,sb,xh),Cv=n=>xs(n,eb,xh),CN=n=>xs(n,tb,wN),xc=n=>xs(n,lb,jN),oe=n=>$0.test(n),_r=n=>di(n,ab),MN=n=>di(n,sb),Mv=n=>di(n,eb),AN=n=>di(n,nb),ON=n=>di(n,tb),Sc=n=>di(n,lb,!0),zN=n=>di(n,ib,!0),xs=(n,s,l)=>{const r=I0.exec(n);return r?r[1]?s(r[1]):l(r[2]):!1},di=(n,s,l=!1)=>{const r=$0.exec(n);return r?r[1]?s(r[1]):l:!1},eb=n=>n==="position"||n==="percentage",tb=n=>n==="image"||n==="url",nb=n=>n==="length"||n==="size"||n==="bg-size",ab=n=>n==="length",kN=n=>n==="number",sb=n=>n==="family-name",ib=n=>n==="number"||n==="weight",lb=n=>n==="shadow",DN=()=>{const n=ht("color"),s=ht("font"),l=ht("text"),r=ht("font-weight"),c=ht("tracking"),d=ht("leading"),h=ht("breakpoint"),y=ht("container"),p=ht("spacing"),m=ht("radius"),b=ht("shadow"),v=ht("inset-shadow"),x=ht("text-shadow"),w=ht("drop-shadow"),N=ht("blur"),R=ht("perspective"),j=ht("aspect"),z=ht("ease"),A=ht("animate"),B=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],Q=()=>[...T(),oe,re],U=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],O=()=>[oe,re,p],P=()=>[es,"full","auto",...O()],$=()=>[Qn,"none","subgrid",oe,re],W=()=>["auto",{span:["full",Qn,oe,re]},Qn,oe,re],Z=()=>[Qn,"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",...O()],K=()=>[es,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...O()],ue=()=>[es,"screen","full","dvw","lvw","svw","min","max","fit",...O()],Oe=()=>[es,"screen","full","lh","dvh","lvh","svh","min","max","fit",...O()],ne=()=>[n,oe,re],C=()=>[...T(),Mv,Cv,{position:[oe,re]}],J=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ae=()=>["auto","cover","contain",AN,_N,{size:[oe,re]}],se=()=>[Od,_r,Ks],ie=()=>["","none","full",m,oe,re],me=()=>["",Ne,_r,Ks],Re=()=>["solid","dashed","dotted","double"],Ve=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ge=()=>[Ne,Od,Mv,Cv],mn=()=>["","none",N,oe,re],Bt=()=>["none",Ne,oe,re],Wt=()=>["none",Ne,oe,re],Jn=()=>[Ne,oe,re],At=()=>[es,"full",...O()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ya],breakpoint:[ya],color:[W0],container:[ya],"drop-shadow":[ya],ease:["in","out","in-out"],font:[NN],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ya],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ya],shadow:[ya],spacing:["px",Ne],text:[ya],"text-shadow":[ya],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",es,re,oe,j]}],container:["container"],"container-type":[{"@container":["","normal","size",oe,re]}],"container-named":[RN],columns:[{columns:[Ne,re,oe,y]}],"break-after":[{"break-after":B()}],"break-before":[{"break-before":B()}],"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:U()}],"overflow-x":[{"overflow-x":U()}],"overflow-y":[{"overflow-y":U()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{"inset-s":P(),start:P()}],end:[{"inset-e":P(),end:P()}],"inset-bs":[{"inset-bs":P()}],"inset-be":[{"inset-be":P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[Qn,"auto",oe,re]}],basis:[{basis:[es,"full","auto",y,...O()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ne,es,"auto","initial","none",re]}],grow:[{grow:["",Ne,oe,re]}],shrink:[{shrink:["",Ne,oe,re]}],order:[{order:[Qn,"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:O()}],"gap-x":[{"gap-x":O()}],"gap-y":[{"gap-y":O()}],"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:O()}],px:[{px:O()}],py:[{py:O()}],ps:[{ps:O()}],pe:[{pe:O()}],pbs:[{pbs:O()}],pbe:[{pbe:O()}],pt:[{pt:O()}],pr:[{pr:O()}],pb:[{pb:O()}],pl:[{pl:O()}],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":O()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":O()}],"space-y-reverse":["space-y-reverse"],size:[{size:K()}],"inline-size":[{inline:["auto",...ue()]}],"min-inline-size":[{"min-inline":["auto",...ue()]}],"max-inline-size":[{"max-inline":["none",...ue()]}],"block-size":[{block:["auto",...Oe()]}],"min-block-size":[{"min-block":["auto",...Oe()]}],"max-block-size":[{"max-block":["none",...Oe()]}],w:[{w:[y,"screen",...K()]}],"min-w":[{"min-w":[y,"screen","none",...K()]}],"max-w":[{"max-w":[y,"screen","none","prose",{screen:[h]},...K()]}],h:[{h:["screen","lh",...K()]}],"min-h":[{"min-h":["screen","lh","none",...K()]}],"max-h":[{"max-h":["screen","lh",...K()]}],"font-size":[{text:["base",l,_r,Ks]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,zN,EN]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Od,re]}],"font-family":[{font:[MN,TN,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:[c,oe,re]}],"line-clamp":[{"line-clamp":[Ne,"none",oe,Tv]}],leading:[{leading:[d,...O()]}],"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:[Ne,"from-font","auto",oe,Ks]}],"text-decoration-color":[{decoration:ne()}],"underline-offset":[{"underline-offset":[Ne,"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:O()}],"tab-size":[{tab:[Qn,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:J()}],"bg-size":[{bg:ae()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Qn,oe,re],radial:["",oe,re],conic:[Qn,oe,re]},ON,CN]}],"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:ie()}],"rounded-s":[{"rounded-s":ie()}],"rounded-e":[{"rounded-e":ie()}],"rounded-t":[{"rounded-t":ie()}],"rounded-r":[{"rounded-r":ie()}],"rounded-b":[{"rounded-b":ie()}],"rounded-l":[{"rounded-l":ie()}],"rounded-ss":[{"rounded-ss":ie()}],"rounded-se":[{"rounded-se":ie()}],"rounded-ee":[{"rounded-ee":ie()}],"rounded-es":[{"rounded-es":ie()}],"rounded-tl":[{"rounded-tl":ie()}],"rounded-tr":[{"rounded-tr":ie()}],"rounded-br":[{"rounded-br":ie()}],"rounded-bl":[{"rounded-bl":ie()}],"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":[Ne,oe,re]}],"outline-w":[{outline:["",Ne,_r,Ks]}],"outline-color":[{outline:ne()}],shadow:[{shadow:["","none",b,Sc,xc]}],"shadow-color":[{shadow:ne()}],"inset-shadow":[{"inset-shadow":["none",v,Sc,xc]}],"inset-shadow-color":[{"inset-shadow":ne()}],"ring-w":[{ring:me()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:ne()}],"ring-offset-w":[{"ring-offset":[Ne,Ks]}],"ring-offset-color":[{"ring-offset":ne()}],"inset-ring-w":[{"inset-ring":me()}],"inset-ring-color":[{"inset-ring":ne()}],"text-shadow":[{"text-shadow":["none",x,Sc,xc]}],"text-shadow-color":[{"text-shadow":ne()}],opacity:[{opacity:[Ne,oe,re]}],"mix-blend":[{"mix-blend":[...Ve(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ve()}],"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":[Ne]}],"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":T()}],"mask-image-conic-pos":[{"mask-conic":[Ne]}],"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:J()}],"mask-size":[{mask:ae()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",oe,re]}],filter:[{filter:["","none",oe,re]}],blur:[{blur:mn()}],brightness:[{brightness:[Ne,oe,re]}],contrast:[{contrast:[Ne,oe,re]}],"drop-shadow":[{"drop-shadow":["","none",w,Sc,xc]}],"drop-shadow-color":[{"drop-shadow":ne()}],grayscale:[{grayscale:["",Ne,oe,re]}],"hue-rotate":[{"hue-rotate":[Ne,oe,re]}],invert:[{invert:["",Ne,oe,re]}],saturate:[{saturate:[Ne,oe,re]}],sepia:[{sepia:["",Ne,oe,re]}],"backdrop-filter":[{"backdrop-filter":["","none",oe,re]}],"backdrop-blur":[{"backdrop-blur":mn()}],"backdrop-brightness":[{"backdrop-brightness":[Ne,oe,re]}],"backdrop-contrast":[{"backdrop-contrast":[Ne,oe,re]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ne,oe,re]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ne,oe,re]}],"backdrop-invert":[{"backdrop-invert":["",Ne,oe,re]}],"backdrop-opacity":[{"backdrop-opacity":[Ne,oe,re]}],"backdrop-saturate":[{"backdrop-saturate":[Ne,oe,re]}],"backdrop-sepia":[{"backdrop-sepia":["",Ne,oe,re]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":O()}],"border-spacing-x":[{"border-spacing-x":O()}],"border-spacing-y":[{"border-spacing-y":O()}],"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:[Ne,"initial",oe,re]}],ease:[{ease:["linear","initial",z,oe,re]}],delay:[{delay:[Ne,oe,re]}],animate:[{animate:["none",A,oe,re]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[R,oe,re]}],"perspective-origin":[{"perspective-origin":Q()}],rotate:[{rotate:Bt()}],"rotate-x":[{"rotate-x":Bt()}],"rotate-y":[{"rotate-y":Bt()}],"rotate-z":[{"rotate-z":Bt()}],scale:[{scale:Wt()}],"scale-x":[{"scale-x":Wt()}],"scale-y":[{"scale-y":Wt()}],"scale-z":[{"scale-z":Wt()}],"scale-3d":["scale-3d"],skew:[{skew:Jn()}],"skew-x":[{"skew-x":Jn()}],"skew-y":[{"skew-y":Jn()}],transform:[{transform:[oe,re,"","none","gpu","cpu"]}],"transform-origin":[{origin:Q()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:At()}],"translate-x":[{"translate-x":At()}],"translate-y":[{"translate-y":At()}],"translate-z":[{"translate-z":At()}],"translate-none":["translate-none"],zoom:[{zoom:[Qn,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":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mbs":[{"scroll-mbs":O()}],"scroll-mbe":[{"scroll-mbe":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pbs":[{"scroll-pbs":O()}],"scroll-pbe":[{"scroll-pbe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"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:[Ne,_r,Ks,Tv]}],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"]}},UN=hN(DN);function Ze(...n){return UN(K0(n))}function rb({className:n}){return u.jsxs("span",{className:Ze("inline-flex items-center gap-2.5",n),children:[u.jsx("span",{"aria-hidden":"true",className:"flex size-7 shrink-0 items-center justify-center rounded-[6px] bg-accent text-white",children:u.jsxs("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",className:"size-4",xmlns:"http://www.w3.org/2000/svg",children:[u.jsx("path",{d:"M3.5 12 20 4.5 14 20l-3.2-6.4L3.5 12Z",fill:"currentColor"}),u.jsx("path",{d:"m10.8 13.2 6.4-7.4",stroke:"#F64838",strokeWidth:"1.4",strokeLinecap:"round"})]})}),u.jsx("span",{className:"font-display font-medium text-lg leading-none tracking-[-0.02em]",children:"Hogsend"})]})}const Av=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,Ov=K0,ob=(n,s)=>l=>{var r;if((s==null?void 0:s.variants)==null)return Ov(n,l==null?void 0:l.class,l==null?void 0:l.className);const{variants:c,defaultVariants:d}=s,h=Object.keys(c).map(m=>{const b=l==null?void 0:l[m],v=d==null?void 0:d[m];if(b===null)return null;const x=Av(b)||Av(v);return c[m][x]}),y=l&&Object.entries(l).reduce((m,b)=>{let[v,x]=b;return x===void 0||(m[v]=x),m},{}),p=s==null||(r=s.compoundVariants)===null||r===void 0?void 0:r.reduce((m,b)=>{let{class:v,className:x,...w}=b;return Object.entries(w).every(N=>{let[R,j]=N;return Array.isArray(j)?j.includes({...d,...y}[R]):{...d,...y}[R]===j})?[...m,v,x]:m},[]);return Ov(n,h,p,l==null?void 0:l.class,l==null?void 0:l.className)},Sh=ob("group inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-[10px] text-sm font-medium tracking-[-0.02em] transition-colors duration-200 outline-none focus-visible:ring-2 focus-visible:ring-accent disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-white text-[#0a0a0a] hover:bg-white/90",destructive:"bg-accent text-white hover:bg-accent-deep",outline:"border border-hairline-faint bg-transparent text-white/80 hover:border-white/15 hover:bg-white/5 hover:text-white",secondary:"bg-white/[0.06] text-white/80 hover:bg-white/10 hover:text-white",ghost:"text-white/70 hover:bg-white/5 hover:text-white",link:"text-white underline-offset-4 hover:text-white/80 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-[8px] px-3 text-xs",lg:"h-10 px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Te=V.forwardRef(({className:n,variant:s,size:l,...r},c)=>u.jsx("button",{type:"button",className:Ze(Sh({variant:s,size:l,className:n})),ref:c,...r}));Te.displayName="Button";const Ft=V.forwardRef(({className:n,...s},l)=>u.jsx("div",{ref:l,className:Ze("rounded-md border border-hairline-faint bg-white/[0.015] text-white transition-colors duration-200 hover:border-white/15",n),...s}));Ft.displayName="Card";const Jt=V.forwardRef(({className:n,...s},l)=>u.jsx("div",{ref:l,className:Ze("flex flex-col space-y-1.5 p-6",n),...s}));Jt.displayName="CardHeader";const dn=V.forwardRef(({className:n,...s},l)=>u.jsx("div",{ref:l,className:Ze("font-display text-lg leading-none tracking-[-0.02em] text-white",n),...s}));dn.displayName="CardTitle";const bs=V.forwardRef(({className:n,...s},l)=>u.jsx("div",{ref:l,className:Ze("text-sm text-white/60",n),...s}));bs.displayName="CardDescription";const It=V.forwardRef(({className:n,...s},l)=>u.jsx("div",{ref:l,className:Ze("p-6 pt-0",n),...s}));It.displayName="CardContent";const LN=V.forwardRef(({className:n,...s},l)=>u.jsx("div",{ref:l,className:Ze("flex items-center p-6 pt-0",n),...s}));LN.displayName="CardFooter";const vt=V.forwardRef(({className:n,type:s,...l},r)=>u.jsx("input",{type:s,className:Ze("flex h-9 w-full rounded-md border border-hairline-faint bg-white/[0.04] px-3 py-1 text-sm text-white transition-colors duration-200 file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-white/40 hover:border-white/15 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent disabled:cursor-not-allowed disabled:opacity-50",n),ref:r,...l}));vt.displayName="Input";function BN(){return typeof window>"u"?"/studio/":`${window.location.origin}/studio/`}function cb({children:n}){return u.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-8 bg-ink p-6",children:[u.jsxs("div",{className:"flex flex-col items-center gap-3",children:[u.jsx(rb,{}),u.jsx("span",{className:"eyebrow text-white/50",children:"Studio"})]}),n]})}function qN({onSuccess:n,onForgot:s}){const[l,r]=V.useState(""),[c,d]=V.useState(""),[h,y]=V.useState(null),[p,m]=V.useState(!1);async function b(v){v.preventDefault(),y(null),m(!0);try{const x=await G2.email({email:l,password:c});if(x.error){y(x.error.message??"Authentication failed.");return}n()}catch(x){y(x instanceof Error?x.message:"Something went wrong.")}finally{m(!1)}}return u.jsxs(Ft,{className:"glass-panel w-full max-w-sm",children:[u.jsxs(Jt,{children:[u.jsx(dn,{children:"Sign in to Studio"}),u.jsx(bs,{children:"Enter your credentials to access Hogsend Studio."})]}),u.jsx(It,{children:u.jsxs("form",{className:"space-y-4",onSubmit:b,children:[u.jsxs("div",{className:"space-y-1.5",children:[u.jsx("label",{className:"text-sm font-medium text-white/80",htmlFor:"email",children:"Email"}),u.jsx(vt,{id:"email",type:"email",required:!0,value:l,onChange:v=>r(v.target.value),placeholder:"you@example.com",autoComplete:"email"})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("label",{className:"text-sm font-medium text-white/80",htmlFor:"password",children:"Password"}),u.jsx("button",{type:"button",onClick:s,className:"text-white/50 text-xs transition-colors duration-200 hover:text-white",children:"Forgot password?"})]}),u.jsx(vt,{id:"password",type:"password",required:!0,minLength:8,value:c,onChange:v=>d(v.target.value),placeholder:"••••••••",autoComplete:"current-password"})]}),h?u.jsx("p",{className:"text-sm text-accent",children:h}):null,u.jsx(Te,{type:"submit",className:"w-full",disabled:p,children:p?"Please wait…":"Sign in"})]})})]})}function HN({onReload:n}){return u.jsxs(Ft,{className:"glass-panel w-full max-w-md",children:[u.jsxs(Jt,{children:[u.jsx(dn,{children:"No admin exists yet"}),u.jsx(bs,{children:"Create the first admin from your server — there is no sign-up over the web."})]}),u.jsxs(It,{className:"space-y-4",children:[u.jsxs("div",{className:"space-y-2 text-sm text-white/60",children:[u.jsx("p",{children:"Run the CLI where your app is deployed:"}),u.jsx("pre",{className:"rounded-md border border-hairline-faint bg-white/[0.04] p-3 font-mono text-white/90 text-xs",children:u.jsx("code",{children:"hogsend studio admin create"})}),u.jsxs("p",{children:["…or set ",u.jsx("code",{children:"STUDIO_ADMIN_EMAIL"})," (and optionally"," ",u.jsx("code",{children:"STUDIO_ADMIN_PASSWORD"}),") in your environment and restart the API. If you didn't set a password, one is printed once to the server log."]}),u.jsx("p",{children:"Then reload this page."})]}),u.jsx(Te,{type:"button",className:"w-full",onClick:n,children:"Reload"})]})]})}function zv({onBack:n}){const[s,l]=V.useState(""),[r,c]=V.useState(!1),[d,h]=V.useState(!1),[y,p]=V.useState(null);async function m(b){b.preventDefault(),p(null),c(!0);try{await Y2({email:s,redirectTo:BN()}),h(!0)}catch(v){p(v instanceof Error?v.message:"Something went wrong.")}finally{c(!1)}}return u.jsxs(Ft,{className:"glass-panel w-full max-w-sm",children:[u.jsxs(Jt,{children:[u.jsx(dn,{children:"Reset your password"}),u.jsx(bs,{children:"Enter your account email and we'll send you a reset link."})]}),u.jsx(It,{children:d?u.jsxs("div",{className:"space-y-4",children:[u.jsx("p",{className:"text-sm text-white/60",children:"If that email matches an account, a reset link is on its way. The link expires in 15 minutes and can be used once."}),u.jsx(Te,{type:"button",variant:"outline",className:"w-full",onClick:n,children:"Back to sign in"})]}):u.jsxs("form",{className:"space-y-4",onSubmit:m,children:[u.jsxs("div",{className:"space-y-1.5",children:[u.jsx("label",{className:"text-sm font-medium text-white/80",htmlFor:"forgot-email",children:"Email"}),u.jsx(vt,{id:"forgot-email",type:"email",required:!0,value:s,onChange:b=>l(b.target.value),placeholder:"you@example.com",autoComplete:"email"})]}),y?u.jsx("p",{className:"text-sm text-accent",children:y}):null,u.jsx(Te,{type:"submit",className:"w-full",disabled:r,children:r?"Sending…":"Send reset link"}),u.jsx("button",{type:"button",onClick:n,className:"w-full text-center text-white/50 text-xs transition-colors duration-200 hover:text-white",children:"Back to sign in"})]})})]})}function QN({token:n,onBack:s}){const[l,r]=V.useState(""),[c,d]=V.useState(""),[h,y]=V.useState(!1),[p,m]=V.useState(!1),[b,v]=V.useState(null);async function x(w){if(w.preventDefault(),v(null),l!==c){v("Passwords don't match.");return}y(!0);try{const N=await P2({newPassword:l,token:n});if(N.error){v(N.error.message??"This reset link is invalid or has expired. Request a new one.");return}m(!0)}catch(N){v(N instanceof Error?N.message:"Something went wrong.")}finally{y(!1)}}return u.jsxs(Ft,{className:"glass-panel w-full max-w-sm",children:[u.jsxs(Jt,{children:[u.jsx(dn,{children:"Choose a new password"}),u.jsx(bs,{children:p?"Your password has been updated.":"Enter a new password for your account."})]}),u.jsx(It,{children:p?u.jsx(Te,{type:"button",className:"w-full",onClick:s,children:"Back to sign in"}):u.jsxs("form",{className:"space-y-4",onSubmit:x,children:[u.jsxs("div",{className:"space-y-1.5",children:[u.jsx("label",{className:"text-sm font-medium text-white/80",htmlFor:"new-password",children:"New password"}),u.jsx(vt,{id:"new-password",type:"password",required:!0,minLength:8,value:l,onChange:w=>r(w.target.value),placeholder:"••••••••",autoComplete:"new-password"})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx("label",{className:"text-sm font-medium text-white/80",htmlFor:"confirm-password",children:"Confirm password"}),u.jsx(vt,{id:"confirm-password",type:"password",required:!0,minLength:8,value:c,onChange:w=>d(w.target.value),placeholder:"••••••••",autoComplete:"new-password"})]}),b?u.jsx("p",{className:"text-sm text-accent",children:b}):null,u.jsx(Te,{type:"submit",className:"w-full",disabled:h,children:h?"Updating…":"Update password"}),u.jsx("button",{type:"button",onClick:s,className:"w-full text-center text-white/50 text-xs transition-colors duration-200 hover:text-white",children:"Back to sign in"})]})})]})}function kv({mode:n,onSuccess:s,onModeChange:l,resetToken:r}){const c=()=>l==null?void 0:l("login");let d;return n==="forgot"?d=u.jsx(zv,{onBack:c}):n==="reset"?d=r?u.jsx(QN,{token:r,onBack:c}):u.jsx(zv,{onBack:c}):d=u.jsx(qN,{onSuccess:s,onForgot:()=>l==null?void 0:l("forgot")}),u.jsx(cb,{children:d})}function zd({children:n}){return u.jsx("div",{className:"flex h-full items-center justify-center bg-ink text-sm text-white/50",children:n})}function GN(){return typeof window>"u"?"":new URLSearchParams(window.location.search).get("token")??""}function VN(){if(typeof window>"u")return;const n=new URL(window.location.href);n.searchParams.has("token")&&(n.searchParams.delete("token"),window.history.replaceState({},"",n.toString()))}function YN({children:n}){const[s]=V.useState(()=>{const v=GN();return v&&VN(),v}),[l,r]=V.useState(()=>s?"reset":null),{data:c,isPending:d,isError:h,refetch:y}=at({queryKey:["auth-status"],queryFn:kw,retry:1,staleTime:0}),{data:p,isPending:m,refetch:b}=Y0();return l==="reset"||l==="forgot"?u.jsx(kv,{mode:l,resetToken:s,onModeChange:r,onSuccess:()=>{b()}}):d?u.jsx(zd,{children:"Loading…"}):h?u.jsx(zd,{children:"Unable to reach the Hogsend API."}):c!=null&&c.needsSetup?u.jsx(cb,{children:u.jsx(HN,{onReload:()=>{y(),b()}})}):m?u.jsx(zd,{children:"Loading…"}):p!=null&&p.user?u.jsx(u.Fragment,{children:n}):u.jsx(kv,{mode:"login",onModeChange:r,onSuccess:()=>{b()}})}/**
|
|
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 PN=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ub=(...n)=>n.filter((s,l,r)=>!!s&&s.trim()!==""&&r.indexOf(s)===l).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 KN={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 XN=V.forwardRef(({color:n="currentColor",size:s=24,strokeWidth:l=2,absoluteStrokeWidth:r,className:c="",children:d,iconNode:h,...y},p)=>V.createElement("svg",{ref:p,...KN,width:s,height:s,stroke:n,strokeWidth:r?Number(l)*24/Number(s):l,className:ub("lucide",c),...y},[...h.map(([m,b])=>V.createElement(m,b)),...Array.isArray(d)?d:[d]]));/**
|
|
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 Ae=(n,s)=>{const l=V.forwardRef(({className:r,...c},d)=>V.createElement(XN,{ref:d,iconNode:s,className:ub(`lucide-${PN(n)}`,r),...c}));return l.displayName=`${n}`,l};/**
|
|
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 ZN=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],FN=Ae("ArrowDown",ZN);/**
|
|
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 JN=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],fb=Ae("ArrowUpRight",JN);/**
|
|
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 IN=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],$N=Ae("ArrowUp",IN);/**
|
|
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 WN=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]],db=Ae("Ban",WN);/**
|
|
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 eR=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],tR=Ae("BookOpen",eR);/**
|
|
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 nR=[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]],aR=Ae("Boxes",nR);/**
|
|
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 sR=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],iR=Ae("Check",sR);/**
|
|
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 lR=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],rR=Ae("ChevronDown",lR);/**
|
|
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 oR=[["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"}]],cR=Ae("CircleAlert",oR);/**
|
|
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 uR=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],hb=Ae("CircleCheck",uR);/**
|
|
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 fR=[["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"}]],mb=Ae("CircleX",fR);/**
|
|
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 dR=[["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"}]],pb=Ae("Copy",dR);/**
|
|
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 hR=[["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"}]],mR=Ae("Eye",hR);/**
|
|
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 pR=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]],yR=Ae("FlaskConical",pR);/**
|
|
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 gR=[["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"}]],jh=Ae("GitBranch",gR);/**
|
|
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 vR=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],ih=Ae("Globe",vR);/**
|
|
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 bR=[["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"}]],xR=Ae("Inbox",bR);/**
|
|
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 SR=[["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"}]],jR=Ae("KeyRound",SR);/**
|
|
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 wR=[["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"}]],NR=Ae("LayoutDashboard",wR);/**
|
|
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 RR=[["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"}]],_R=Ae("LogOut",RR);/**
|
|
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 ER=[["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"}]],Dv=Ae("MailCheck",ER);/**
|
|
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 TR=[["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"}]],yb=Ae("MailWarning",TR);/**
|
|
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 CR=[["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"}]],gb=Ae("Mail",CR);/**
|
|
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 MR=[["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"}]],AR=Ae("MousePointerClick",MR);/**
|
|
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 OR=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],zR=Ae("Plus",OR);/**
|
|
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 kR=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],DR=Ae("RefreshCw",kR);/**
|
|
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 UR=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],LR=Ae("Search",UR);/**
|
|
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 BR=[["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"}]],Yr=Ae("Send",BR);/**
|
|
226
|
-
* @license lucide-react v0.474.0 - ISC
|
|
227
|
-
*
|
|
228
|
-
* This source code is licensed under the ISC license.
|
|
229
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
230
|
-
*/const qR=[["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"}]],HR=Ae("Settings",qR);/**
|
|
231
|
-
* @license lucide-react v0.474.0 - ISC
|
|
232
|
-
*
|
|
233
|
-
* This source code is licensed under the ISC license.
|
|
234
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
235
|
-
*/const QR=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],GR=Ae("ShieldCheck",QR);/**
|
|
236
|
-
* @license lucide-react v0.474.0 - ISC
|
|
237
|
-
*
|
|
238
|
-
* This source code is licensed under the ISC license.
|
|
239
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
240
|
-
*/const VR=[["path",{d:"m18 14 4 4-4 4",key:"10pe0f"}],["path",{d:"m18 2 4 4-4 4",key:"pucp1d"}],["path",{d:"M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22",key:"1ailkh"}],["path",{d:"M2 6h1.972a4 4 0 0 1 3.6 2.2",key:"km57vx"}],["path",{d:"M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45",key:"os18l9"}]],YR=Ae("Shuffle",VR);/**
|
|
241
|
-
* @license lucide-react v0.474.0 - ISC
|
|
242
|
-
*
|
|
243
|
-
* This source code is licensed under the ISC license.
|
|
244
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
245
|
-
*/const PR=[["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"}]],vb=Ae("Sparkles",PR);/**
|
|
246
|
-
* @license lucide-react v0.474.0 - ISC
|
|
247
|
-
*
|
|
248
|
-
* This source code is licensed under the ISC license.
|
|
249
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
250
|
-
*/const KR=[["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"}]],XR=Ae("UserMinus",KR);/**
|
|
251
|
-
* @license lucide-react v0.474.0 - ISC
|
|
252
|
-
*
|
|
253
|
-
* This source code is licensed under the ISC license.
|
|
254
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
255
|
-
*/const ZR=[["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"}]],bb=Ae("Users",ZR);/**
|
|
256
|
-
* @license lucide-react v0.474.0 - ISC
|
|
257
|
-
*
|
|
258
|
-
* This source code is licensed under the ISC license.
|
|
259
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
260
|
-
*/const FR=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],wh=Ae("X",FR);/**
|
|
261
|
-
* @license lucide-react v0.474.0 - ISC
|
|
262
|
-
*
|
|
263
|
-
* This source code is licensed under the ISC license.
|
|
264
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
265
|
-
*/const JR=[["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"}]],Nh=Ae("Zap",JR),xb=V.createContext(null);function IR({children:n}){const[s,l]=V.useState([]),r=V.useRef(0),c=V.useCallback(y=>{l(p=>p.filter(m=>m.id!==y))},[]),d=V.useCallback(y=>{const p=++r.current,m={id:p,title:y.title,description:y.description,variant:y.variant??"success"};l(b=>[...b,m]),window.setTimeout(()=>c(p),5e3)},[c]),h=V.useMemo(()=>({toast:d}),[d]);return u.jsxs(xb.Provider,{value:h,children:[n,u.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=>u.jsxs("div",{className:Ze("glass-panel pointer-events-auto flex items-start gap-3 p-4 text-white shadow-black/50 shadow-xl",y.variant==="error"&&"border-accent/40"),children:[y.variant==="success"?u.jsx(hb,{strokeWidth:1.5,className:"mt-0.5 h-5 w-5 shrink-0 text-white/90"}):u.jsx(mb,{strokeWidth:1.5,className:"mt-0.5 h-5 w-5 shrink-0 text-accent"}),u.jsxs("div",{className:"flex-1 space-y-0.5",children:[u.jsx("p",{className:"text-sm font-medium text-white",children:y.title}),y.description?u.jsx("p",{className:"text-sm text-white/60",children:y.description}):null]}),u.jsx("button",{type:"button","aria-label":"Dismiss",className:"text-white/50 transition-colors hover:text-white",onClick:()=>c(y.id),children:u.jsx(wh,{className:"h-4 w-4"})})]},y.id))})]})}function Zn(){const n=V.useContext(xb);if(!n)throw new Error("useToast must be used within a ToastProvider");return n}const $R=new xS({defaultOptions:{queries:{staleTime:3e4,retry:(n,s)=>s instanceof Ut&&[401,403].includes(s.status)?!1:n<2,refetchOnWindowFocus:!1}}}),Er="https://docs.hogsend.com",ui={docs:Er,quickstart:`${Er}/docs/getting-started`,recipes:`${Er}/docs/recipes`,journeys:`${Er}/docs/guides/journeys`,buckets:`${Er}/docs/guides/buckets`},WR=[{label:"Overview",path:"/",icon:NR},{label:"Sends",path:"/sends",icon:Yr},{label:"Templates",path:"/templates",icon:gb},{label:"Journeys",path:"/journeys",icon:jh},{label:"Buckets",path:"/buckets",icon:aR},{label:"Contacts",path:"/contacts",icon:bb},{label:"Suppressions",path:"/suppressions",icon:db},{label:"Debug",path:"/debug",icon:yR},{label:"Setup",path:"/setup",icon:ih},{label:"Settings",path:"/settings",icon:HR}];function e_(){const n=_w({select:s=>s.location.pathname});return u.jsxs("aside",{className:"flex h-full w-60 flex-col border-r border-hairline-faint bg-ink",children:[u.jsx("div",{className:"flex h-14 items-center border-b border-hairline-faint px-5",children:u.jsx(rb,{})}),u.jsx("nav",{className:"flex-1 space-y-1 overflow-y-auto p-2",children:WR.map(s=>{const l=s.path==="/"?n==="/":n.startsWith(s.path),r=s.icon;return u.jsxs(Sl,{to:s.path,className:Ze("flex items-center gap-3 rounded-md px-3 py-2 text-[15px] tracking-[-0.02em] outline-none transition-colors duration-200 focus-visible:ring-2 focus-visible:ring-accent",l?"bg-accent-tint text-accent":"text-white/60 hover:bg-white/5 hover:text-white"),children:[u.jsx(r,{strokeWidth:1.5,className:"h-4 w-4"}),s.label]},s.path)})}),u.jsx("div",{className:"border-t border-hairline-faint p-2",children:u.jsxs("a",{href:ui.docs,target:"_blank",rel:"noreferrer",className:"group flex items-center gap-3 rounded-md px-3 py-2 text-[15px] tracking-[-0.02em] text-white/60 outline-none transition-colors duration-200 hover:bg-white/5 hover:text-white focus-visible:ring-2 focus-visible:ring-accent",children:[u.jsx(tR,{strokeWidth:1.5,className:"h-4 w-4"}),"Docs",u.jsx(fb,{className:"ml-auto h-3.5 w-3.5 opacity-60 transition-transform duration-200 group-hover:translate-x-0.5 group-hover:-translate-y-0.5"})]})})]})}function t_(){const{data:n}=Y0();return u.jsxs("div",{className:"flex h-full bg-ink text-white",children:[u.jsx(e_,{}),u.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[u.jsxs("header",{className:"flex h-14 items-center justify-end gap-3 border-b border-hairline-faint bg-ink/30 px-6 backdrop-blur-[7px]",children:[n!=null&&n.user?u.jsx("span",{className:"text-sm text-white/50",children:n.user.email}):null,u.jsxs(Te,{variant:"ghost",size:"sm",onClick:()=>{V2()},children:[u.jsx(_R,{strokeWidth:1.5,className:"h-4 w-4"}),"Sign out"]})]}),u.jsx("main",{className:"flex-1 overflow-y-auto p-6",children:u.jsx(B0,{})})]})]})}function Dt({className:n,...s}){return u.jsx("div",{className:Ze("animate-pulse rounded-md bg-white/5",n),...s})}function hi({rows:n=6}){return u.jsxs("div",{className:"space-y-2",children:[u.jsx(Dt,{className:"h-9 w-full"}),Array.from({length:n}).map((s,l)=>u.jsx(Dt,{className:"h-12 w-full"},l))]})}function n_({count:n=4}){return u.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:Array.from({length:n}).map((s,l)=>u.jsx(Dt,{className:"h-28 w-full"},l))})}function Ra({title:n,description:s,icon:l=xR,action:r}){return u.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 rounded-md border border-dashed border-white/15 p-12 text-center",children:[u.jsx(l,{strokeWidth:1.5,className:"h-8 w-8 text-white/30"}),u.jsx("p",{className:"text-sm font-medium text-white",children:n}),s?u.jsx("p",{className:"max-w-sm text-sm text-white/60",children:s}):null,r?u.jsx("div",{className:"mt-2 flex flex-wrap items-center justify-center gap-2",children:r}):null]})}function Mt({error:n,onRetry:s}){const l=n instanceof Ut||n instanceof Error?n.message:"Something went wrong.";return u.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 rounded-md border border-accent/40 bg-accent/5 p-12 text-center",children:[u.jsx(cR,{strokeWidth:1.5,className:"h-8 w-8 text-accent"}),u.jsxs("div",{className:"space-y-1",children:[u.jsx("p",{className:"text-sm font-medium text-white",children:"Failed to load"}),u.jsx("p",{className:"max-w-sm text-sm text-white/60",children:l})]}),s?u.jsx(Te,{variant:"outline",size:"sm",onClick:s,children:"Retry"}):null]})}function Fn({title:n,description:s,action:l}){return u.jsxs("div",{className:"flex items-start justify-between gap-4",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"font-display text-2xl text-white tracking-[-0.02em]",children:n}),s?u.jsx("p",{className:"mt-1 text-sm text-white/60",children:s}):null]}),l?u.jsx("div",{className:"shrink-0",children:l}):null]})}const a_=ob("inline-flex items-center rounded-[3px] border px-2 py-0.5 text-xs font-medium transition-colors",{variants:{variant:{default:"border-accent bg-accent-tint text-white",secondary:"border-white/[0.08] bg-white/[0.06] text-white/80",destructive:"border-accent/40 bg-accent-tint text-accent",outline:"border-white/[0.08] text-white/70"}},defaultVariants:{variant:"default"}});function lt({className:n,variant:s,...l}){return u.jsx("div",{className:Ze(a_({variant:s}),n),...l})}function Qc({open:n,onClose:s,title:l,description:r,children:c,footer:d,className:h}){return V.useEffect(()=>{if(!n)return;const y=p=>{p.key==="Escape"&&s()};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[n,s]),n?u.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[u.jsx("button",{type:"button","aria-label":"Close dialog",className:"absolute inset-0 bg-black/60",onClick:s}),u.jsxs("div",{role:"dialog","aria-modal":"true",className:Ze("glass-panel relative z-10 w-full max-w-lg p-6 text-white shadow-black/50 shadow-xl",h),children:[u.jsxs("div",{className:"mb-4 flex items-start justify-between gap-4",children:[u.jsxs("div",{className:"space-y-1",children:[u.jsx("h2",{className:"font-display text-lg leading-none tracking-[-0.02em] text-white",children:l}),r?u.jsx("p",{className:"text-sm text-white/60",children:r}):null]}),u.jsx(Te,{variant:"ghost",size:"icon",className:"-mr-2 -mt-2 h-8 w-8",onClick:s,"aria-label":"Close",children:u.jsx(wh,{className:"h-4 w-4"})})]}),c?u.jsx("div",{className:"space-y-4",children:c}):null,d?u.jsx("div",{className:"mt-6 flex justify-end gap-2",children:d}):null]})]}):null}function Rl({open:n,onClose:s,onConfirm:l,title:r,description:c,confirmLabel:d="Confirm",cancelLabel:h="Cancel",destructive:y,loading:p}){return u.jsx(Qc,{open:n,onClose:s,title:r,description:c,footer:u.jsxs(u.Fragment,{children:[u.jsx(Te,{variant:"outline",onClick:s,disabled:p,children:h}),u.jsx(Te,{variant:y?"destructive":"default",onClick:l,disabled:p,children:p?"Working…":d})]})})}function jl({href:n,children:s,variant:l="outline",className:r}){return u.jsxs("a",{href:n,target:"_blank",rel:"noreferrer",className:Ze(Sh({variant:l,size:"sm"}),r),children:[s,u.jsx(fb,{strokeWidth:2,className:"h-3.5 w-3.5 shrink-0 opacity-70 transition-transform duration-200 group-hover:translate-x-0.5 group-hover:-translate-y-0.5"})]})}const Ss=V.forwardRef(({className:n,...s},l)=>u.jsx("div",{className:"relative w-full overflow-auto",children:u.jsx("table",{ref:l,className:Ze("w-full caption-bottom text-sm",n),...s})}));Ss.displayName="Table";const js=V.forwardRef(({className:n,...s},l)=>u.jsx("thead",{ref:l,className:Ze("[&_tr]:border-b [&_tr]:border-hairline-faint",n),...s}));js.displayName="TableHeader";const ws=V.forwardRef(({className:n,...s},l)=>u.jsx("tbody",{ref:l,className:Ze("[&_tr:last-child]:border-0",n),...s}));ws.displayName="TableBody";const Lt=V.forwardRef(({className:n,...s},l)=>u.jsx("tr",{ref:l,className:Ze("border-b border-hairline-faint transition-colors hover:bg-white/[0.03] data-[state=selected]:bg-white/[0.06]",n),...s}));Lt.displayName="TableRow";const Se=V.forwardRef(({className:n,...s},l)=>u.jsx("th",{ref:l,className:Ze("h-10 px-2 text-left align-middle font-normal text-white/50 text-xs uppercase tracking-[0.04em] [&:has([role=checkbox])]:pr-0",n),...s}));Se.displayName="TableHead";const be=V.forwardRef(({className:n,...s},l)=>u.jsx("td",{ref:l,className:Ze("p-2 align-middle [&:has([role=checkbox])]:pr-0",n),...s}));be.displayName="TableCell";const s_=V.forwardRef(({className:n,...s},l)=>u.jsx("caption",{ref:l,className:Ze("mt-4 text-sm text-white/50",n),...s}));s_.displayName="TableCaption";function i_(){return Be.get("/v1/admin/metrics/overview")}function l_(n){return Be.get("/v1/admin/emails",{query:n})}function r_(n){return Be.get(`/v1/admin/emails/${n}`)}function o_(n){return Be.post(`/v1/admin/emails/${n}/resend`)}function c_(){return Be.get("/v1/admin/templates")}function u_(n){return Be.get(`/v1/admin/templates/${encodeURIComponent(n)}/preview`)}function f_(n,s){return Be.post(`/v1/admin/templates/${encodeURIComponent(n)}/send-test`,{json:{to:s}})}function d_(n){return Be.get(`/v1/admin/reporting/templates/${encodeURIComponent(n)}`)}function h_(){return Be.get("/v1/admin/metrics/journeys")}function m_(n){return Be.get(`/v1/admin/metrics/journeys/${encodeURIComponent(n)}`)}function Sb(){return Be.get("/v1/admin/journeys",{query:{limit:100}})}function p_(n,s){return Be.put(`/v1/admin/journeys/${encodeURIComponent(n)}`,{json:{enabled:s}})}function y_(){return Be.get("/v1/admin/buckets",{query:{limit:100}})}function g_(n){return Be.get(`/v1/admin/buckets/${encodeURIComponent(n)}`)}function v_(){return Be.get("/v1/admin/metrics/buckets")}function b_(n,s){return Be.get(`/v1/admin/metrics/buckets/${encodeURIComponent(n)}`,{query:{period:s}})}function x_(n,s){return Be.patch(`/v1/admin/buckets/${encodeURIComponent(n)}`,{json:{enabled:s}})}function S_(n){return Be.get("/v1/admin/contacts",{query:{search:n,limit:50}})}function j_(n){return Be.get(`/v1/admin/contacts/${encodeURIComponent(n)}`)}function w_(n){return Be.get(`/v1/admin/reporting/contacts/${encodeURIComponent(n)}/activity`)}function N_(n){return Be.get(`/v1/admin/contacts/${encodeURIComponent(n)}/timeline`,{query:{limit:100}})}function jb(n,s){return Be.put(`/v1/admin/contacts/${encodeURIComponent(n)}/preferences`,{json:s})}function R_(n){return Be.get("/v1/admin/suppressions",{query:{type:n,limit:200}})}function __(){return Be.get("/v1/admin/api-keys",{query:{limit:100,includeRevoked:"true"}})}function E_(n){return Be.post("/v1/admin/api-keys",{json:n})}function T_(n){return Be.delete(`/v1/admin/api-keys/${encodeURIComponent(n)}`)}function C_(n){return Be.post("/v1/admin/events",{json:{event:n.event,userId:n.userId,userEmail:n.userEmail,properties:n.properties??{}}})}function Uv(n){return Be.get("/v1/admin/domain",{query:{refresh:n?"true":void 0}})}function M_(n){return Be.post("/v1/admin/domain",{json:{domain:n}})}function A_(){return Be.post("/v1/admin/domain/verify")}const qe={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],buckets:["buckets"],bucketMetrics:["bucket-metrics"],bucket:n=>["bucket",n],bucketTrend:n=>["bucket-trend",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"],domain:["domain"]};function kn(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 Ac(n){if(!n)return"—";const s=new Date(n);return Number.isNaN(s.getTime())?"—":s.toLocaleDateString(void 0,{month:"short",day:"numeric"})}function O_(n){if(!n)return"—";const s=new Date(n);if(Number.isNaN(s.getTime()))return"—";const l=Date.now()-s.getTime(),r=Math.round(l/1e3);if(r<60)return"just now";const c=Math.round(r/60);if(c<60)return`${c}m ago`;const d=Math.round(c/60);if(d<24)return`${d}h ago`;const h=Math.round(d/24);return h<30?`${h}d ago`:Ac(n)}function wl(n){return n==null||Number.isNaN(n)?"—":`${(n*100).toFixed(1)}%`}function ft(n){return n==null||Number.isNaN(n)?"—":n.toLocaleString()}function Rh(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 l=Math.floor(s/60),r=s%60;if(l<24)return r?`${l}h ${r}m`:`${l}h`;const c=Math.floor(l/24),d=l%24;return d?`${c}d ${d}h`:`${c}d`}function z_(n){if(!n)return null;const s=(n.hours??0)*3600+(n.minutes??0)*60+(n.seconds??0);return s>0?Rh(s):null}function k_(n,s=48){return n.length>s?`${n.slice(0,s-1)}…`:n}function lh({data:n,height:s=160,label:l="value"}){var c,d;if(n.length===0)return u.jsx("div",{className:"flex items-center justify-center rounded-md border border-dashed border-white/15 text-sm text-white/50",style:{height:s},children:"No data in range"});const r=Math.max(...n.map(h=>h.value),1);return u.jsxs("div",{className:"space-y-2",children:[u.jsx("div",{className:"flex items-end gap-1 rounded-md border border-hairline-faint bg-white/[0.015] p-3",style:{height:s},children:n.map(h=>{const y=h.value/r*100;return u.jsx("div",{className:"group flex flex-1 flex-col items-center justify-end",title:`${Ac(h.date)}: ${h.value} ${l}`,children:u.jsx("div",{className:"w-full min-w-[2px] rounded-t bg-white/15 transition-colors duration-200 group-hover:bg-accent",style:{height:`${Math.max(y,h.value>0?4:0)}%`}})},h.date)})}),u.jsxs("div",{className:"flex justify-between text-[11px] text-white/40 uppercase tracking-[0.04em]",children:[u.jsx("span",{children:Ac((c=n[0])==null?void 0:c.date)}),u.jsx("span",{children:Ac((d=n[n.length-1])==null?void 0:d.date)})]})]})}function D_({bucketId:n}){const s=at({queryKey:qe.bucketTrend(n),queryFn:()=>b_(n)});if(s.isPending)return u.jsx(Dt,{className:"h-48 w-full"});if(s.isError)return u.jsx(Mt,{error:s.error,onRetry:()=>s.refetch()});const l=s.data,r=l.points.map(y=>({date:y.date,value:y.entered})),c=l.points.map(y=>({date:y.date,value:y.left})),d=l.points.reduce((y,p)=>y+p.entered,0),h=l.points.reduce((y,p)=>y+p.left,0);return u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{className:"flex flex-wrap gap-6 text-sm",children:[u.jsxs("div",{className:"space-y-1",children:[u.jsx("span",{className:"eyebrow block text-white/50",children:"Current size"}),u.jsx("span",{className:"font-display text-lg text-white",children:ft(l.size)})]}),u.jsxs("div",{className:"space-y-1",children:[u.jsx("span",{className:"eyebrow block text-white/50",children:"Entered (range)"}),u.jsx("span",{className:"font-display text-lg text-white",children:ft(d)})]}),u.jsxs("div",{className:"space-y-1",children:[u.jsx("span",{className:"eyebrow block text-white/50",children:"Left (range)"}),u.jsx("span",{className:"font-display text-lg text-white",children:ft(h)})]})]}),u.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx("span",{className:"eyebrow block text-white/50",children:"Entered over time"}),u.jsx(lh,{data:r,label:"joined"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx("span",{className:"eyebrow block text-white/50",children:"Left over time"}),u.jsx(lh,{data:c,label:"left"})]})]})]})}function U_(){var N,R;const{toast:n}=Zn(),s=_a(),[l,r]=V.useState(null),[c,d]=V.useState(null),h=at({queryKey:qe.bucketMetrics,queryFn:v_}),y=at({queryKey:qe.buckets,queryFn:y_}),p=_n({mutationFn:j=>x_(j.id,j.enabled),onSuccess:(j,z)=>{n({title:z.enabled?"Bucket enabled":"Bucket disabled"}),d(null),s.invalidateQueries({queryKey:qe.buckets}),s.invalidateQueries({queryKey:qe.bucketMetrics})},onError:j=>{n({variant:"error",title:"Update failed",description:j instanceof Ut?j.message:"Unexpected error."}),d(null)}}),m=h.isPending||y.isPending,b=h.isError||y.isError,v=new Map((((N=y.data)==null?void 0:N.buckets)??[]).map(j=>[j.id,j])),x=(((R=h.data)==null?void 0:R.buckets)??[]).map(j=>{const z=v.get(j.bucketId);return{...j,enabled:(z==null?void 0:z.enabled)??!1,kind:(z==null?void 0:z.kind)??"dynamic",timeBased:(z==null?void 0:z.timeBased)??!1}}),w=x.find(j=>j.bucketId===l)??null;return u.jsxs("div",{className:"space-y-6",children:[u.jsx(Fn,{title:"Buckets",description:"Real-time, code-defined membership. Sizes, enter/leave trends, and which journeys each bucket feeds — observe only, authoring stays in code."}),m?u.jsx(hi,{}):b?u.jsx(Mt,{error:h.error??y.error,onRetry:()=>{h.refetch(),y.refetch()}}):x.length===0?u.jsx(Ra,{title:"No buckets registered",description:"Buckets are real-time, code-defined audiences (defineBucket()). Add one to your app and members appear here as events arrive.",action:u.jsxs(u.Fragment,{children:[u.jsx(jl,{href:ui.buckets,children:"How to create a bucket"}),u.jsx(jl,{href:ui.recipes,variant:"ghost",children:"Recipes"})]})}):u.jsx("div",{className:"rounded-lg border bg-white/[0.015]",children:u.jsxs(Ss,{children:[u.jsx(js,{children:u.jsxs(Lt,{children:[u.jsx(Se,{children:"Bucket"}),u.jsx(Se,{className:"text-right",children:"Current size"}),u.jsx(Se,{className:"text-right",children:"Entered"}),u.jsx(Se,{className:"text-right",children:"Left"}),u.jsx(Se,{className:"text-right",children:"Avg dwell"}),u.jsx(Se,{children:"Freshness"}),u.jsx(Se,{children:"State"}),u.jsx(Se,{className:"text-right",children:"Action"})]})}),u.jsx(ws,{children:x.map(j=>u.jsxs(Lt,{className:"cursor-pointer","data-state":j.bucketId===l?"selected":void 0,onClick:()=>r(z=>z===j.bucketId?null:j.bucketId),children:[u.jsxs(be,{children:[u.jsx("span",{className:"font-medium text-white",children:j.name}),u.jsx("span",{className:"block font-mono text-xs text-white/70",children:j.bucketId})]}),u.jsx(be,{className:"text-right",children:ft(j.size)}),u.jsx(be,{className:"text-right",children:ft(j.entered)}),u.jsx(be,{className:"text-right",children:ft(j.left)}),u.jsx(be,{className:"text-right text-white/60",children:Rh(j.avgDwellSecs)}),u.jsx(be,{children:u.jsx(L_,{timeBased:j.timeBased})}),u.jsx(be,{children:u.jsx(lt,{variant:j.enabled?"default":"secondary",children:j.enabled?"Enabled":"Disabled"})}),u.jsx(be,{className:"text-right",children:u.jsx(Te,{variant:"outline",size:"sm",onClick:z=>{z.stopPropagation(),d(j)},children:j.enabled?"Disable":"Enable"})})]},j.bucketId))})]})}),w?u.jsxs("div",{className:"space-y-6",children:[u.jsxs(Ft,{children:[u.jsx(Jt,{children:u.jsxs(dn,{className:"text-base",children:[w.name," — feeds journeys"]})}),u.jsx(It,{children:u.jsx(B_,{bucketId:w.bucketId})})]}),u.jsxs(Ft,{children:[u.jsx(Jt,{children:u.jsxs(dn,{className:"text-base",children:[w.name," — enter / leave over time"]})}),u.jsx(It,{children:u.jsx(D_,{bucketId:w.bucketId})})]})]}):null,u.jsx(Rl,{open:c!==null,onClose:()=>d(null),onConfirm:()=>c&&p.mutate({id:c.bucketId,enabled:!c.enabled}),title:c!=null&&c.enabled?"Disable this bucket?":"Enable this bucket?",description:c!=null&&c.enabled?"Membership will stop being recomputed; in-flight members stay until they leave.":"Matching users will start being added to this bucket again.",confirmLabel:c!=null&&c.enabled?"Disable":"Enable",destructive:c==null?void 0:c.enabled,loading:p.isPending})]})}function L_({timeBased:n}){return n?u.jsx(lt,{variant:"outline",className:"border-white/[0.08] bg-white/[0.04] text-white/50",title:"Time-based — leaves lag the reconcile cron",children:"Building"}):u.jsx(lt,{variant:"outline",className:"border-white/15 bg-white/[0.06] text-white/80",title:"Event-driven — transitions in real time",children:"Live"})}function B_({bucketId:n}){const s=at({queryKey:qe.bucket(n),queryFn:()=>g_(n)});if(s.isPending)return u.jsx(Dt,{className:"h-10 w-full"});if(s.isError)return u.jsx(Mt,{error:s.error,onRetry:()=>s.refetch()});const l=s.data.bucket.feedsJourneys,r=z_(s.data.bucket.maxDwell);return u.jsxs("div",{className:"space-y-3",children:[r?u.jsxs(lt,{variant:"outline",title:"Members are force-removed maxDwell after joining, regardless of criteria.",children:["Time-boxed · ",r]}):null,l.length===0?u.jsxs("div",{className:"space-y-1 text-sm text-white/60",children:[u.jsxs("p",{children:["No journeys are bound to this bucket's transitions yet. Bind one to THIS bucket with the typed refs"," ",u.jsx("code",{className:"text-xs",children:"bucket.entered"})," /"," ",u.jsx("code",{className:"text-xs",children:"bucket.left"})," (e.g."," ",u.jsx("code",{className:"text-xs",children:"{ trigger: { event: bucket.entered } }"}),"), or colocate a reaction with"," ",u.jsx("code",{className:"text-xs",children:'bucket.on("enter", ...)'}),"."]}),u.jsxs("p",{children:["To react to ANY bucket, use the generic"," ",u.jsx("code",{className:"text-xs",children:"Events.BUCKET_ENTERED"})," /"," ",u.jsx("code",{className:"text-xs",children:"Events.BUCKET_LEFT"})," constants."]})]}):u.jsx("div",{className:"flex flex-wrap gap-2",children:l.map(c=>u.jsxs(lt,{variant:c.owned?"default":"secondary",title:c.trigger,children:[c.name,c.owned?u.jsx("span",{className:"ml-1.5 text-[10px] uppercase tracking-[0.04em] text-white/50",children:"owned"}):null]},`${c.id}-${c.trigger}`))})]})}const q_={delivered:{variant:"outline",className:"border-white/15 bg-white/[0.06] text-white/80"},opened:{variant:"outline",className:"border-white/20 bg-white/[0.08] text-white/90"},clicked:{variant:"outline",className:"border-white/30 bg-white/[0.12] text-white"},sent:{variant:"outline",className:"border-white/[0.08] bg-white/[0.04] text-white/50"},rendered:{variant:"outline",className:"border-white/[0.08] bg-white/[0.04] text-white/50"},queued:{variant:"outline",className:"border-white/[0.08] bg-white/[0.04] text-white/50"},bounced:{variant:"destructive"},complained:{variant:"destructive"},failed:{variant:"destructive"}};function Pr({status:n}){const s=q_[n]??{variant:"outline"};return u.jsx(lt,{variant:s.variant,className:Ze("capitalize",s.className),children:n})}function wb({open:n,onClose:s,title:l,description:r,children:c,className:d}){return V.useEffect(()=>{if(!n)return;const h=y=>{y.key==="Escape"&&s()};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[n,s]),n?u.jsxs("div",{className:"fixed inset-0 z-50",children:[u.jsx("button",{type:"button","aria-label":"Close panel",className:"absolute inset-0 bg-black/60",onClick:s}),u.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 border-white/10 bg-raised text-white shadow-black/50 shadow-xl",d),children:[u.jsxs("div",{className:"flex items-start justify-between gap-4 border-b border-hairline-faint p-6",children:[u.jsxs("div",{className:"space-y-1",children:[u.jsx("h2",{className:"font-display text-lg leading-none tracking-[-0.02em] text-white",children:l}),r?u.jsx("p",{className:"break-all text-sm text-white/60",children:r}):null]}),u.jsx(Te,{variant:"ghost",size:"icon",className:"-mr-2 -mt-2 h-8 w-8 shrink-0",onClick:s,"aria-label":"Close",children:u.jsx(wh,{className:"h-4 w-4"})})]}),u.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:c})]})]}):null}const H_={event:Nh,journey:jh,email:gb};function Q_({entry:n}){const s=H_[n.type],l=n.data,r=n.type==="event"?String(l.event??"event"):n.type==="journey"?`${String(l.journeyId??"journey")} · ${String(l.status??"")}`:String(l.subject??l.templateKey??"email");return u.jsxs("li",{className:"flex gap-3",children:[u.jsx("span",{className:"mt-0.5 flex h-7 w-7 shrink-0 items-center justify-center rounded-full border border-hairline-faint bg-white/[0.04]",children:u.jsx(s,{className:"h-3.5 w-3.5 text-white/50",strokeWidth:1.5})}),u.jsxs("div",{className:"min-w-0 flex-1 pb-3",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("p",{className:"truncate text-sm font-medium text-white",children:r}),n.type==="email"&&l.status?u.jsx(Pr,{status:String(l.status)}):null]}),u.jsx("p",{className:"text-xs text-white/50",children:kn(n.timestamp)})]})]})}function G_({contactId:n,onClose:s}){var N,R;const l=n!==null,{toast:r}=Zn(),c=_a(),[d,h]=V.useState(!1),y=at({queryKey:n?qe.contact(n):["contact","none"],queryFn:()=>j_(n),enabled:l}),p=at({queryKey:n?qe.contactActivity(n):["activity","none"],queryFn:()=>w_(n),enabled:l}),m=at({queryKey:n?qe.contactTimeline(n):["timeline","none"],queryFn:()=>N_(n),enabled:l}),b=_n({mutationFn:()=>jb(n,{suppressed:!1}),onSuccess:()=>{r({title:"Contact un-suppressed",description:"They can receive emails again."}),h(!1),n&&c.invalidateQueries({queryKey:qe.contact(n)}),c.invalidateQueries({queryKey:["suppressions"]})},onError:j=>{r({variant:"error",title:"Un-suppress failed",description:j instanceof Ut?j.message:"Unexpected error."}),h(!1)}}),v=(N=y.data)==null?void 0:N.contact,x=(R=y.data)==null?void 0:R.preferences,w=(x==null?void 0:x.suppressed)||(x==null?void 0:x.unsubscribedAll);return u.jsxs(u.Fragment,{children:[u.jsx(wb,{open:l,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?u.jsxs("div",{className:"space-y-4",children:[u.jsx(Dt,{className:"h-24 w-full"}),u.jsx(Dt,{className:"h-40 w-full"})]}):y.isError?u.jsx(Mt,{error:y.error,onRetry:()=>y.refetch()}):v?u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[x!=null&&x.suppressed?u.jsx(lt,{variant:"destructive",children:"Suppressed"}):null,x!=null&&x.unsubscribedAll?u.jsx(lt,{variant:"destructive",children:"Unsubscribed"}):null,x&&x.bounceCount>0?u.jsxs(lt,{variant:"secondary",children:[x.bounceCount," bounce",x.bounceCount===1?"":"s"]}):null,w?null:u.jsx(lt,{variant:"outline",className:"border-white/15 bg-white/[0.06] text-white/80",children:"Subscribed"}),w?u.jsx(Te,{size:"sm",variant:"outline",className:"ml-auto",onClick:()=>h(!0),children:"Un-suppress"}):null]}),u.jsxs("dl",{className:"grid grid-cols-2 gap-4",children:[u.jsxs("div",{children:[u.jsx("dt",{className:"text-xs text-white/50",children:"First seen"}),u.jsx("dd",{className:"text-sm text-white",children:kn(v.firstSeenAt)})]}),u.jsxs("div",{children:[u.jsx("dt",{className:"text-xs text-white/50",children:"Last seen"}),u.jsx("dd",{className:"text-sm text-white",children:kn(v.lastSeenAt)})]})]}),u.jsxs("section",{children:[u.jsxs("h3",{className:"eyebrow mb-3 text-white/50",children:["Email activity",p.data?` (${p.data.total})`:""]}),p.isPending?u.jsx(Dt,{className:"h-20 w-full"}):p.isError?u.jsx("p",{className:"text-sm text-white/60",children:"Could not load email activity."}):p.data&&p.data.sends.length>0?u.jsx("ul",{className:"space-y-2",children:p.data.sends.slice(0,10).map(j=>u.jsxs("li",{className:"flex items-center justify-between gap-3 rounded-md border bg-white/[0.015] p-3",children:[u.jsxs("div",{className:"min-w-0",children:[u.jsx("p",{className:"truncate text-sm font-medium text-white",children:j.subject}),u.jsx("p",{className:"text-xs text-white/50",children:kn(j.createdAt)})]}),u.jsx(Pr,{status:j.status})]},j.id))}):u.jsx("p",{className:"text-sm text-white/60",children:"No emails sent."})]}),u.jsxs("section",{children:[u.jsx("h3",{className:"eyebrow mb-3 text-white/50",children:"Timeline"}),m.isPending?u.jsx(Dt,{className:"h-20 w-full"}):m.isError?u.jsx("p",{className:"text-sm text-white/60",children:"Could not load timeline."}):m.data&&m.data.timeline.length>0?u.jsx("ul",{children:m.data.timeline.map((j,z)=>u.jsx(Q_,{entry:j},`${j.type}-${j.timestamp}-${z}`))}):u.jsx("p",{className:"text-sm text-white/60",children:"No activity yet."})]})]}):null}),u.jsx(Rl,{open:d,onClose:()=>h(!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 V_(){var p;const[n,s]=V.useState(""),[l,r]=V.useState(""),[c,d]=V.useState(null);V.useEffect(()=>{const m=window.setTimeout(()=>r(n.trim()),300);return()=>window.clearTimeout(m)},[n]);const h=at({queryKey:qe.contacts(l),queryFn:()=>S_(l||void 0),placeholderData:uh}),y=((p=h.data)==null?void 0:p.contacts)??[];return u.jsxs("div",{className:"space-y-6",children:[u.jsx(Fn,{title:"Contacts",description:"Search contacts and review their full activity timeline."}),u.jsxs("div",{className:"relative max-w-sm",children:[u.jsx(LR,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-white/40",strokeWidth:1.5}),u.jsx(vt,{placeholder:"Search by email or external ID…",className:"pl-9",value:n,onChange:m=>s(m.target.value)})]}),h.isPending?u.jsx(hi,{}):h.isError?u.jsx(Mt,{error:h.error,onRetry:()=>h.refetch()}):y.length===0?u.jsx(Ra,{title:"No contacts found",description:l?"No contacts match your search.":"Contacts appear here as events are ingested."}):u.jsx("div",{className:"rounded-lg border bg-white/[0.015]",children:u.jsxs(Ss,{children:[u.jsx(js,{children:u.jsxs(Lt,{children:[u.jsx(Se,{children:"Email"}),u.jsx(Se,{children:"External ID"}),u.jsx(Se,{className:"text-right",children:"Last seen"})]})}),u.jsx(ws,{children:y.map(m=>u.jsxs(Lt,{className:"cursor-pointer",onClick:()=>d(m.id),children:[u.jsx(be,{className:"font-medium text-white",children:m.email??"—"}),u.jsx(be,{className:"font-mono text-xs text-white/70",children:m.externalId}),u.jsx(be,{className:"text-right text-white/60",children:O_(m.lastSeenAt)})]},m.id))})]})}),u.jsx(G_,{contactId:c,onClose:()=>d(null)})]})}function Rt({className:n,...s}){return u.jsx("label",{className:Ze("text-sm font-medium leading-none text-white/80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",n),...s})}function Lv(){return`test_${Math.random().toString(36).slice(2,10)}`}function Y_(n){const s=n.trim();if(!s)return{ok:!0,value:{}};try{const l=JSON.parse(s);return l===null||typeof l!="object"||Array.isArray(l)?{ok:!1,error:"Properties must be a JSON object."}:{ok:!0,value:l}}catch(l){return{ok:!1,error:l instanceof Error?l.message:"Invalid JSON."}}}function P_(){const{toast:n}=Zn(),[s,l]=V.useState(""),[r,c]=V.useState(Lv),[d,h]=V.useState(""),[y,p]=V.useState("{}"),[m,b]=V.useState(null),[v,x]=V.useState(null),w=at({queryKey:qe.journeys,queryFn:Sb}),N=V.useMemo(()=>{var B;const A=new Map;for(const T of((B=w.data)==null?void 0:B.journeys)??[]){const Q=A.get(T.trigger.event)??[];Q.push(T.name),A.set(T.trigger.event,Q)}return Array.from(A,([T,Q])=>({event:T,journeys:Q}))},[w.data]),R=_n({mutationFn:A=>C_(A),onSuccess:A=>{x(A),n({title:"Event ingested",description:`Stored: ${A.stored} · ${A.exits.length} journey exit(s).`})},onError:A=>{n({variant:"error",title:"Ingest failed",description:A instanceof Ut?A.message:"Unexpected error."})}}),j=()=>{const A=Y_(y);if(!A.ok){b(A.error);return}b(null),R.mutate({event:s.trim(),userId:r.trim(),userEmail:d.trim()||void 0,properties:A.value})},z=!!s.trim()&&!!r.trim()&&!R.isPending;return u.jsxs("div",{className:"space-y-6",children:[u.jsx(Fn,{title:"Debug",description:"Fire events into the ingest pipeline — exactly what real events do. Trigger journeys locally without a PostHog tunnel."}),u.jsxs("div",{className:"grid gap-6 lg:grid-cols-3",children:[u.jsxs(Ft,{className:"lg:col-span-2",children:[u.jsxs(Jt,{children:[u.jsx(dn,{className:"text-base",children:"Send a test event"}),u.jsxs(bs,{children:["POSTs to ",u.jsx("code",{className:"text-xs",children:"/v1/ingest"}),". Journeys whose trigger matches will enrol this user."]})]}),u.jsxs(It,{className:"space-y-4",children:[u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Rt,{htmlFor:"event",children:"Event name"}),u.jsx(vt,{id:"event",list:"event-presets",placeholder:"e.g. user.created",value:s,onChange:A=>l(A.target.value)}),u.jsx("datalist",{id:"event-presets",children:N.map(A=>u.jsx("option",{value:A.event},A.event))})]}),u.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Rt,{htmlFor:"userId",children:"User ID"}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx(vt,{id:"userId",placeholder:"test_user",value:r,onChange:A=>c(A.target.value)}),u.jsx(Te,{variant:"outline",size:"icon",title:"Generate a random test user ID",onClick:()=>c(Lv()),children:u.jsx(YR,{className:"h-4 w-4"})})]})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Rt,{htmlFor:"userEmail",children:"User email (optional)"}),u.jsx(vt,{id:"userEmail",type:"email",placeholder:"you@example.com",value:d,onChange:A=>h(A.target.value)})]})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Rt,{htmlFor:"props",children:"Properties (JSON)"}),u.jsx("textarea",{id:"props",spellCheck:!1,className:"flex min-h-[140px] w-full rounded-md border border-hairline-faint bg-white/[0.04] px-3 py-2 font-mono text-sm text-white transition-colors duration-200 placeholder:text-white/40 hover:border-white/15 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",value:y,onChange:A=>{p(A.target.value),m&&b(null)}}),m?u.jsx("p",{className:"text-xs text-accent",children:m}):null]}),u.jsx("div",{className:"flex justify-end",children:u.jsxs(Te,{onClick:j,disabled:!z,children:[u.jsx(Nh,{className:"h-4 w-4"}),R.isPending?"Sending…":"Send event"]})})]})]}),u.jsxs("div",{className:"space-y-6",children:[u.jsxs(Ft,{children:[u.jsxs(Jt,{children:[u.jsx(dn,{className:"text-base",children:"Journey triggers"}),u.jsx(bs,{children:"Events that enrol a registered journey. Click to fill the form."})]}),u.jsx(It,{children:N.length===0?u.jsx("p",{className:"text-sm text-white/60",children:"No journeys registered yet. Any event name still works — define a journey to see triggers here."}):u.jsx("div",{className:"flex flex-wrap gap-2",children:N.map(A=>u.jsx(Te,{variant:"outline",size:"sm",title:`Triggers: ${A.journeys.join(", ")}`,onClick:()=>l(A.event),children:A.event},A.event))})})]}),v?u.jsxs(Ft,{children:[u.jsx(Jt,{children:u.jsxs(dn,{className:"flex items-center gap-2 text-base",children:[u.jsx(hb,{className:"h-4 w-4 text-white/90"}),"Result"]})}),u.jsxs(It,{className:"space-y-3",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(lt,{variant:v.stored?"default":"secondary",children:v.stored?"Stored":"Not stored"}),u.jsxs("span",{className:"text-sm text-white/60",children:[v.exits.length," journey exit(s)"]})]}),u.jsx("pre",{className:"max-h-48 overflow-auto rounded-md border border-hairline-faint bg-white/[0.04] p-3 font-mono text-xs text-white/90",children:JSON.stringify(v,null,2)}),u.jsxs("p",{className:"text-sm text-white/60",children:["See the effect in"," ",u.jsx(Sl,{to:"/journeys",className:"text-white transition-colors duration-200 hover:text-white/80",children:"Journeys"})," ","or the"," ",u.jsx(Sl,{to:"/contacts",className:"text-white transition-colors duration-200 hover:text-white/80",children:"contact's timeline"}),". Make sure the worker is running."]})]})]}):null]})]})]})}function K_({step:n,base:s}){const l=s>0?n.value/s:0,r=l*100;return u.jsxs("div",{className:"space-y-1",children:[u.jsxs("div",{className:"flex items-center justify-between text-sm",children:[u.jsx("span",{className:"font-medium text-white/80",children:n.label}),u.jsxs("span",{className:"text-white/60",children:[ft(n.value),s>0?u.jsxs("span",{className:"ml-1 text-xs text-white/50",children:["(",wl(l),")"]}):null]})]}),u.jsx("div",{className:"h-2 overflow-hidden rounded-full bg-white/[0.06]",children:u.jsx("div",{className:"h-full rounded-full bg-white/40",style:{width:`${Math.min(r,100)}%`}})})]})}function X_({journeyId:n}){const s=at({queryKey:qe.journeyFunnel(n),queryFn:()=>m_(n)});if(s.isPending)return u.jsx(Dt,{className:"h-48 w-full"});if(s.isError)return u.jsx(Mt,{error:s.error,onRetry:()=>s.refetch()});const l=s.data,r=[{label:"Enrolled",value:l.enrolled},{label:"Email sent",value:l.emailSent},{label:"Opened",value:l.emailOpened},{label:"Clicked",value:l.emailClicked},{label:"Completed",value:l.completed}];return u.jsxs("div",{className:"space-y-4",children:[u.jsx("div",{className:"space-y-3",children:r.map(c=>u.jsx(K_,{step:c,base:l.enrolled},c.label))}),u.jsxs("div",{className:"flex gap-4 border-t pt-3 text-sm text-white/60",children:[u.jsxs("span",{children:["Failed: ",ft(l.failed)]}),u.jsxs("span",{children:["Exited: ",ft(l.exited)]})]})]})}function Z_(){var N,R;const{toast:n}=Zn(),s=_a(),[l,r]=V.useState(null),[c,d]=V.useState(null),h=at({queryKey:qe.journeyMetrics,queryFn:h_}),y=at({queryKey:qe.journeys,queryFn:Sb}),p=_n({mutationFn:j=>p_(j.id,j.enabled),onSuccess:(j,z)=>{n({title:z.enabled?"Journey enabled":"Journey disabled"}),d(null),s.invalidateQueries({queryKey:qe.journeys}),s.invalidateQueries({queryKey:qe.journeyMetrics})},onError:j=>{n({variant:"error",title:"Update failed",description:j instanceof Ut?j.message:"Unexpected error."}),d(null)}}),m=h.isPending||y.isPending,b=h.isError||y.isError,v=new Map((((N=y.data)==null?void 0:N.journeys)??[]).map(j=>[j.id,j.enabled])),x=(((R=h.data)==null?void 0:R.journeys)??[]).map(j=>({...j,enabled:v.get(j.journeyId)??!1})),w=x.find(j=>j.journeyId===l)??null;return u.jsxs("div",{className:"space-y-6",children:[u.jsx(Fn,{title:"Journeys",description:"Lifecycle journeys, completion rates, and per-journey funnels."}),m?u.jsx(hi,{}):b?u.jsx(Mt,{error:h.error??y.error,onRetry:()=>{h.refetch(),y.refetch()}}):x.length===0?u.jsx(Ra,{title:"No journeys registered",description:"Journeys are defined in code with defineJourney(). Add one to your app, then fire its trigger event from Debug to see it here.",action:u.jsxs(u.Fragment,{children:[u.jsx(jl,{href:ui.journeys,children:"How to create a journey"}),u.jsx(jl,{href:ui.recipes,variant:"ghost",children:"Recipes"})]})}):u.jsx("div",{className:"rounded-lg border bg-white/[0.015]",children:u.jsxs(Ss,{children:[u.jsx(js,{children:u.jsxs(Lt,{children:[u.jsx(Se,{children:"Journey"}),u.jsx(Se,{className:"text-right",children:"Enrolled"}),u.jsx(Se,{className:"text-right",children:"Active"}),u.jsx(Se,{className:"text-right",children:"Completed"}),u.jsx(Se,{className:"text-right",children:"Completion"}),u.jsx(Se,{className:"text-right",children:"Avg duration"}),u.jsx(Se,{children:"State"}),u.jsx(Se,{className:"text-right",children:"Action"})]})}),u.jsx(ws,{children:x.map(j=>u.jsxs(Lt,{className:"cursor-pointer","data-state":j.journeyId===l?"selected":void 0,onClick:()=>r(z=>z===j.journeyId?null:j.journeyId),children:[u.jsxs(be,{children:[u.jsx("span",{className:"font-medium text-white",children:j.name}),u.jsx("span",{className:"block font-mono text-xs text-white/70",children:j.journeyId})]}),u.jsx(be,{className:"text-right",children:ft(j.enrolled)}),u.jsx(be,{className:"text-right",children:ft(j.active)}),u.jsx(be,{className:"text-right",children:ft(j.completed)}),u.jsx(be,{className:"text-right",children:wl(j.completionRate)}),u.jsx(be,{className:"text-right text-white/60",children:Rh(j.avgDurationSecs)}),u.jsx(be,{children:u.jsx(lt,{variant:j.enabled?"default":"secondary",children:j.enabled?"Enabled":"Disabled"})}),u.jsx(be,{className:"text-right",children:u.jsx(Te,{variant:"outline",size:"sm",onClick:z=>{z.stopPropagation(),d(j)},children:j.enabled?"Disable":"Enable"})})]},j.journeyId))})]})}),w?u.jsxs(Ft,{children:[u.jsx(Jt,{children:u.jsxs(dn,{children:[w.name," — funnel"]})}),u.jsx(It,{children:u.jsx(X_,{journeyId:w.journeyId})})]}):null,u.jsx(Rl,{open:c!==null,onClose:()=>d(null),onConfirm:()=>c&&p.mutate({id:c.journeyId,enabled:!c.enabled}),title:c!=null&&c.enabled?"Disable this journey?":"Enable this journey?",description:c!=null&&c.enabled?"New events will stop enrolling users into this journey.":"New matching events will start enrolling users into this journey.",confirmLabel:c!=null&&c.enabled?"Disable":"Enable",destructive:c==null?void 0:c.enabled,loading:p.isPending})]})}function Xs({label:n,value:s,hint:l,icon:r}){return u.jsxs(Ft,{children:[u.jsxs(Jt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[u.jsx("span",{className:"eyebrow text-white/50",children:n}),r?u.jsx(r,{strokeWidth:1.5,className:"h-4 w-4 text-white/30"}):null]}),u.jsxs(It,{children:[u.jsx("div",{className:"font-display text-[28px] leading-none text-white tracking-[-0.02em]",children:s}),l?u.jsx("p",{className:"mt-2 text-xs text-white/50",children:l}):null]})]})}function F_(n){return n.totalContacts===0&&n.activeJourneys===0&&n.emailsSent30d===0}function J_(){return u.jsxs(Ft,{className:"border-accent/40 bg-accent-tint hover:border-accent/40",children:[u.jsxs(Jt,{children:[u.jsx(dn,{className:"text-base",children:"Welcome to Hogsend Studio"}),u.jsx(bs,{children:"Studio observes your code-first lifecycle engine. Here's the path to your first running journey."})]}),u.jsxs(It,{className:"space-y-4",children:[u.jsxs("ol",{className:"space-y-1.5 text-sm text-white/60",children:[u.jsxs("li",{children:[u.jsx("span",{className:"font-medium text-white",children:"1."})," Define a journey in code and start the worker."]}),u.jsxs("li",{children:[u.jsx("span",{className:"font-medium text-white",children:"2."})," Fire its trigger event to enrol a test user."]}),u.jsxs("li",{children:[u.jsx("span",{className:"font-medium text-white",children:"3."})," Watch enrolments, sends, and exits land here."]})]}),u.jsxs("div",{className:"flex flex-wrap gap-2",children:[u.jsxs(Sl,{to:"/debug",className:Ze(Sh({size:"sm"})),children:[u.jsx(Nh,{className:"h-4 w-4"}),"Send a test event"]}),u.jsx(jl,{href:ui.quickstart,children:"Quickstart"}),u.jsx(jl,{href:ui.journeys,variant:"ghost",children:"Create a journey"})]})]})]})}function I_(){const n=at({queryKey:qe.overview,queryFn:i_});return u.jsxs("div",{className:"space-y-6",children:[u.jsx(Fn,{title:"Overview",description:"Key delivery and engagement metrics at a glance."}),n.isPending?u.jsx(n_,{count:6}):n.isError?u.jsx(Mt,{error:n.error,onRetry:()=>n.refetch()}):u.jsxs(u.Fragment,{children:[F_(n.data)?u.jsx(J_,{}):null,u.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:[u.jsx(Xs,{label:"Total contacts",value:ft(n.data.totalContacts),icon:bb}),u.jsx(Xs,{label:"Active journeys",value:ft(n.data.activeJourneys),hint:"Instances active or waiting",icon:jh}),u.jsx(Xs,{label:"Sent (24h)",value:ft(n.data.emailsSent24h),icon:Yr}),u.jsx(Xs,{label:"Sent (7d)",value:ft(n.data.emailsSent7d),icon:Dv}),u.jsx(Xs,{label:"Sent (30d)",value:ft(n.data.emailsSent30d),icon:Dv}),u.jsx(Xs,{label:"Bounce rate (30d)",value:wl(n.data.bounceRate30d),hint:"Bounced / sent in last 30 days",icon:yb})]}),u.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:u.jsx(Xs,{label:"Unsubscribe rate",value:wl(n.data.unsubscribeRate),hint:"Unsubscribed / total preferences",icon:XR})})]})]})}const Gc=V.forwardRef(({className:n,children:s,...l},r)=>u.jsxs("div",{className:"relative",children:[u.jsx("select",{ref:r,className:Ze("flex h-9 w-full appearance-none rounded-md border border-hairline-faint bg-white/[0.04] px-3 py-1 pr-8 text-sm text-white transition-colors duration-200 hover:border-white/15 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent disabled:cursor-not-allowed disabled:opacity-50 [&>option]:bg-raised [&>option]:text-white",n),...l,children:s}),u.jsx(rR,{className:"pointer-events-none absolute right-2 top-1/2 h-4 w-4 -translate-y-1/2 text-white/40"})]}));Gc.displayName="Select";const $_={queued:vb,sent:Yr,delivered:iR,opened:mR,clicked:AR,bounced:yb,complained:db,failed:mb};function W_({event:n}){const s=$_[n.type]??vb;return u.jsxs("li",{className:"flex gap-3",children:[u.jsxs("div",{className:"flex flex-col items-center",children:[u.jsx("span",{className:"flex h-7 w-7 items-center justify-center rounded-full border border-hairline-faint bg-white/[0.04]",children:u.jsx(s,{strokeWidth:1.5,className:"h-3.5 w-3.5 text-white/50"})}),u.jsx("span",{className:"w-px flex-1 bg-white/[0.08]"})]}),u.jsxs("div",{className:"pb-4",children:[u.jsx("p",{className:"text-sm font-medium capitalize text-white",children:n.type}),u.jsx("p",{className:"text-xs text-white/50",children:kn(n.timestamp)}),n.url?u.jsx("p",{className:"mt-0.5 break-all text-xs text-white/50",children:n.url}):null]})]})}function ts({label:n,value:s,mono:l=!1}){return u.jsxs("div",{className:"space-y-0.5",children:[u.jsx("dt",{className:"text-xs text-white/50",children:n}),u.jsx("dd",{className:l?"break-all font-mono text-xs text-white/70":"break-all text-sm text-white",children:s})]})}function eE({emailId:n,onClose:s}){const l=n!==null,{toast:r}=Zn(),c=_a(),[d,h]=V.useState(!1),y=at({queryKey:n?qe.email(n):["email","none"],queryFn:()=>r_(n),enabled:l}),p=_n({mutationFn:()=>o_(n),onSuccess:()=>{r({title:"Resend queued",description:"A fresh send was queued from this template."}),h(!1),c.invalidateQueries({queryKey:["emails"]}),n&&c.invalidateQueries({queryKey:qe.email(n)})},onError:v=>{r({variant:"error",title:"Resend failed",description:v instanceof Ut?v.message:"Unexpected error."}),h(!1)}}),m=y.data,b=m&&["failed","bounced"].includes(m.email.status);return u.jsxs(u.Fragment,{children:[u.jsx(wb,{open:l,onClose:s,title:"Email send",description:m==null?void 0:m.email.subject,children:y.isPending?u.jsxs("div",{className:"space-y-4",children:[u.jsx(Dt,{className:"h-24 w-full"}),u.jsx(Dt,{className:"h-40 w-full"})]}):y.isError?u.jsx(Mt,{error:y.error,onRetry:()=>y.refetch()}):m?u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{className:"flex items-center justify-between gap-2",children:[u.jsx(Pr,{status:m.email.status}),b?u.jsxs(Te,{size:"sm",variant:"outline",onClick:()=>h(!0),children:[u.jsx(Yr,{className:"h-4 w-4"}),"Resend"]}):null]}),u.jsxs("dl",{className:"grid grid-cols-2 gap-4",children:[u.jsx(ts,{label:"To",value:m.email.toEmail,mono:!0}),u.jsx(ts,{label:"From",value:m.email.fromEmail,mono:!0}),u.jsx(ts,{label:"Template",value:m.email.templateKey??"—"}),u.jsx(ts,{label:"Category",value:m.email.category??"—"}),u.jsx(ts,{label:"Journey",value:m.email.journeyId??"—",mono:!0}),u.jsx(ts,{label:"User",value:m.email.userId??"—",mono:!0}),u.jsx(ts,{label:"Message ID",value:m.email.messageId??"—",mono:!0}),u.jsx(ts,{label:"Created",value:kn(m.email.createdAt)})]}),u.jsxs("section",{children:[u.jsx("h3",{className:"eyebrow mb-3 text-white/50",children:"Timeline"}),m.events.length===0?u.jsx("p",{className:"text-sm text-white/60",children:"No delivery events recorded yet."}):u.jsx("ul",{className:"[&>li:last-child>div:first-child>span:last-child]:hidden",children:m.events.map((v,x)=>u.jsx(W_,{event:v},`${v.type}-${v.timestamp}-${x}`))})]}),u.jsxs("section",{children:[u.jsxs("h3",{className:"eyebrow mb-3 text-white/50",children:["Tracked links (",m.trackedLinks.length,")"]}),m.trackedLinks.length===0?u.jsx("p",{className:"text-sm text-white/60",children:"No tracked links in this email."}):u.jsx("ul",{className:"space-y-2",children:m.trackedLinks.map(v=>u.jsxs("li",{className:"flex items-center justify-between gap-3 rounded-md border bg-white/[0.015] p-3",children:[u.jsx("span",{className:"break-all text-sm text-white/80",children:v.originalUrl}),u.jsxs("span",{className:"shrink-0 text-xs text-white/50",children:[v.clickCount," click",v.clickCount===1?"":"s"]})]},v.id))})]})]}):null}),u.jsx(Rl,{open:d,onClose:()=>h(!1),onConfirm:()=>p.mutate(),title:"Resend this email?",description:"A new send will be queued from the original template and recipient.",confirmLabel:"Resend",loading:p.isPending})]})}const tE=["queued","rendered","sent","delivered","opened","clicked","bounced","complained","failed"],nE=["opened","clicked","bounced","complained"],Tr=25,Bv={templateKey:"",status:"",engagement:"",journeyId:"",userId:"",from:"",to:""};function aE(){var T,Q;const[n,s]=V.useState(Bv),[l,r]=V.useState("createdAt"),[c,d]=V.useState("desc"),[h,y]=V.useState(0),[p,m]=V.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,x={limit:Tr,offset:h,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:l,order:c},w=at({queryKey:qe.emails(x),queryFn:()=>l_(x),placeholderData:uh});function N(U){s(k=>({...k,...U})),y(0)}function R(U){l===U?d(k=>k==="asc"?"desc":"asc"):(r(U),d("desc")),y(0)}const j=Object.values(n).some(Boolean),z=((T=w.data)==null?void 0:T.total)??0,A=((Q=w.data)==null?void 0:Q.emails)??[];function B({column:U,label:k}){const O=l===U;return u.jsx(Se,{children:u.jsxs("button",{type:"button",className:"inline-flex items-center gap-1 transition-colors duration-200 hover:text-white",onClick:()=>R(U),children:[k,O?c==="asc"?u.jsx($N,{className:"h-3 w-3"}):u.jsx(FN,{className:"h-3 w-3"}):null]})})}return u.jsxs("div",{className:"space-y-6",children:[u.jsx(Fn,{title:"Sends",description:"Every email sent — filter, sort, and drill into the timeline."}),u.jsxs("div",{className:"grid gap-3 rounded-lg border bg-white/[0.015] p-4 md:grid-cols-3 lg:grid-cols-4",children:[u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Rt,{htmlFor:"f-template",children:"Template"}),u.jsx(vt,{id:"f-template",placeholder:"template key",value:n.templateKey,onChange:U=>N({templateKey:U.target.value})})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Rt,{htmlFor:"f-status",children:"Status"}),u.jsxs(Gc,{id:"f-status",value:n.status,onChange:U=>N({status:U.target.value}),children:[u.jsx("option",{value:"",children:"All"}),tE.map(U=>u.jsx("option",{value:U,children:U},U))]})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Rt,{htmlFor:"f-engagement",children:"Engagement"}),u.jsxs(Gc,{id:"f-engagement",value:n.engagement,onChange:U=>N({engagement:U.target.value}),children:[u.jsx("option",{value:"",children:"Any"}),nE.map(U=>u.jsx("option",{value:U,children:U},U))]})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Rt,{htmlFor:"f-journey",children:"Journey ID"}),u.jsx(vt,{id:"f-journey",placeholder:"journey id",value:n.journeyId,onChange:U=>N({journeyId:U.target.value})})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Rt,{htmlFor:"f-user",children:"User ID"}),u.jsx(vt,{id:"f-user",placeholder:"user id",value:n.userId,onChange:U=>N({userId:U.target.value})})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Rt,{htmlFor:"f-from",children:"From"}),u.jsx(vt,{id:"f-from",type:"date",value:n.from,onChange:U=>N({from:U.target.value})})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Rt,{htmlFor:"f-to",children:"To"}),u.jsx(vt,{id:"f-to",type:"date",value:n.to,onChange:U=>N({to:U.target.value})})]}),j?u.jsx("div",{className:"flex items-end",children:u.jsx(Te,{variant:"ghost",size:"sm",onClick:()=>{s(Bv),y(0)},children:"Clear filters"})}):null]}),w.isPending?u.jsx(hi,{}):w.isError?u.jsx(Mt,{error:w.error,onRetry:()=>w.refetch()}):A.length===0?u.jsx(Ra,{title:"No sends found",description:j?"Try widening or clearing your filters.":"Emails will appear here once your journeys start sending."}):u.jsx("div",{className:"rounded-lg border bg-white/[0.015]",children:u.jsxs(Ss,{children:[u.jsx(js,{children:u.jsxs(Lt,{children:[u.jsx(Se,{children:"Recipient"}),u.jsx(Se,{children:"Subject"}),u.jsx(Se,{children:"Template"}),u.jsx(Se,{children:"Status"}),u.jsx(B,{column:"sentAt",label:"Sent"}),u.jsx(B,{column:"createdAt",label:"Created"})]})}),u.jsx(ws,{children:A.map(U=>u.jsxs(Lt,{className:"cursor-pointer",onClick:()=>m(U.id),children:[u.jsx(be,{className:"font-medium text-white",children:U.toEmail}),u.jsx(be,{className:"text-white/80",children:k_(U.subject,40)}),u.jsx(be,{className:"text-white/60",children:U.templateKey??"—"}),u.jsx(be,{children:u.jsx(Pr,{status:U.status})}),u.jsx(be,{className:"text-white/60",children:kn(U.sentAt)}),u.jsx(be,{className:"text-white/60",children:kn(U.createdAt)})]},U.id))})]})}),z>0?u.jsxs("div",{className:"flex items-center justify-between text-sm text-white/60",children:[u.jsxs("span",{children:[h+1,"–",Math.min(h+Tr,z)," of ",z]}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx(Te,{variant:"outline",size:"sm",disabled:h===0,onClick:()=>y(U=>Math.max(0,U-Tr)),children:"Previous"}),u.jsx(Te,{variant:"outline",size:"sm",disabled:h+Tr>=z,onClick:()=>y(U=>U+Tr),children:"Next"})]})]}):null,u.jsx(eE,{emailId:p,onClose:()=>m(null)})]})}const sE=["read","journey-admin","full-admin"];function iE(){var A;const{toast:n}=Zn(),s=_a(),[l,r]=V.useState(!1),[c,d]=V.useState(""),[h,y]=V.useState(["read"]),[p,m]=V.useState(null),[b,v]=V.useState(null),x=at({queryKey:qe.apiKeys,queryFn:__}),w=_n({mutationFn:()=>E_({name:c.trim(),scopes:h}),onSuccess:B=>{r(!1),d(""),y(["read"]),m(B),s.invalidateQueries({queryKey:qe.apiKeys})},onError:B=>{n({variant:"error",title:"Could not create key",description:B instanceof Ut?B.message:"Unexpected error."})}}),N=_n({mutationFn:B=>T_(B),onSuccess:()=>{n({title:"API key revoked"}),v(null),s.invalidateQueries({queryKey:qe.apiKeys})},onError:B=>{n({variant:"error",title:"Revoke failed",description:B instanceof Ut?B.message:"Unexpected error."}),v(null)}});function R(B){y(T=>T.includes(B)?T.filter(Q=>Q!==B):[...T,B])}async function j(B){try{await navigator.clipboard.writeText(B),n({title:"Copied to clipboard"})}catch{n({variant:"error",title:"Copy failed"})}}const z=((A=x.data)==null?void 0:A.keys)??[];return u.jsxs("div",{className:"space-y-6",children:[u.jsx(Fn,{title:"Settings",description:"API keys for programmatic access to the Hogsend admin API.",action:u.jsxs(Te,{onClick:()=>r(!0),children:[u.jsx(zR,{className:"h-4 w-4"}),"New API key"]})}),x.isPending?u.jsx(hi,{}):x.isError?u.jsx(Mt,{error:x.error,onRetry:()=>x.refetch()}):z.length===0?u.jsx(Ra,{icon:jR,title:"No API keys",description:"Create a key to authenticate API and webhook requests."}):u.jsx("div",{className:"rounded-lg border bg-white/[0.015]",children:u.jsxs(Ss,{children:[u.jsx(js,{children:u.jsxs(Lt,{children:[u.jsx(Se,{children:"Name"}),u.jsx(Se,{children:"Prefix"}),u.jsx(Se,{children:"Scopes"}),u.jsx(Se,{children:"Last used"}),u.jsx(Se,{children:"Status"}),u.jsx(Se,{className:"text-right",children:"Action"})]})}),u.jsx(ws,{children:z.map(B=>{const T=B.revokedAt!==null;return u.jsxs(Lt,{children:[u.jsx(be,{className:"font-medium text-white",children:B.name}),u.jsxs(be,{className:"font-mono text-xs text-white/70",children:[B.keyPrefix,"…"]}),u.jsx(be,{children:u.jsx("div",{className:"flex flex-wrap gap-1",children:B.scopes.map(Q=>u.jsx(lt,{variant:"secondary",children:Q},Q))})}),u.jsx(be,{className:"text-white/60",children:kn(B.lastUsedAt)}),u.jsx(be,{children:T?u.jsx(lt,{variant:"destructive",children:"Revoked"}):u.jsx(lt,{variant:"outline",className:"border-white/15 bg-white/[0.06] text-white/80",children:"Active"})}),u.jsx(be,{className:"text-right",children:T?null:u.jsx(Te,{variant:"outline",size:"sm",onClick:()=>v(B),children:"Revoke"})})]},B.id)})})]})}),u.jsxs(Qc,{open:l,onClose:()=>r(!1),title:"Create API key",description:"Choose a descriptive name and the scopes this key needs.",footer:u.jsxs(u.Fragment,{children:[u.jsx(Te,{variant:"outline",onClick:()=>r(!1),children:"Cancel"}),u.jsx(Te,{onClick:()=>w.mutate(),disabled:!c.trim()||h.length===0||w.isPending,children:w.isPending?"Creating…":"Create key"})]}),children:[u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Rt,{htmlFor:"key-name",children:"Name"}),u.jsx(vt,{id:"key-name",placeholder:"CI ingest key",value:c,onChange:B=>d(B.target.value)})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(Rt,{children:"Scopes"}),u.jsx("div",{className:"flex flex-col gap-2",children:sE.map(B=>u.jsxs("label",{className:"flex items-center gap-2 text-sm text-white/80",htmlFor:`scope-${B}`,children:[u.jsx("input",{id:`scope-${B}`,type:"checkbox",className:"h-4 w-4 rounded border-hairline-faint accent-accent",checked:h.includes(B),onChange:()=>R(B)}),B]},B))})]})]}),u.jsx(Qc,{open:p!==null,onClose:()=>m(null),title:"API key created",description:"Copy this key now — it will not be shown again.",footer:u.jsx(Te,{onClick:()=>m(null),children:"Done"}),children:p?u.jsxs("div",{className:"space-y-2",children:[u.jsx(Rt,{children:"Secret key"}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("code",{className:"flex-1 break-all rounded-md border border-hairline-faint bg-white/[0.04] px-3 py-2 font-mono text-xs text-white/90",children:p.key}),u.jsx(Te,{variant:"outline",size:"icon",onClick:()=>j(p.key),"aria-label":"Copy key",children:u.jsx(pb,{className:"h-4 w-4"})})]})]}):null}),u.jsx(Rl,{open:b!==null,onClose:()=>v(null),onConfirm:()=>b&&N.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:N.isPending})]})}const lE=/^([a-z0-9]([a-z0-9-]*[a-z0-9])?\.)+[a-z]{2,}$/i,rE={verified:{variant:"outline",className:"border-white/15 bg-white/[0.06] text-white/80"},pending:{variant:"secondary"},failed:{variant:"destructive"},not_found:{variant:"outline"}};function oE({state:n}){const s=rE[n];return u.jsx(lt,{variant:s.variant,className:s.className,children:n.replace("_"," ")})}function cE({testMode:n}){return n.active?u.jsxs("div",{className:"rounded-md border border-accent/40 bg-accent-tint p-4 text-sm",children:[u.jsxs("p",{className:"font-medium text-accent",children:["Test mode is active",n.reason==="domain_unverified"?" — sending domain not verified":n.reason==="env_flag"?" — forced via HOGSEND_TEST_MODE":""]}),u.jsxs("p",{className:"mt-1 text-white/60",children:[n.redirectTo?`All sends are redirected to ${n.redirectTo}.`:"No redirect address is configured — sends will fail until one is set.",n.fromOverride?` From address is overridden to ${n.fromOverride}.`:""]})]}):null}function qv({value:n}){const{toast:s}=Zn();return u.jsx(Te,{variant:"ghost",size:"sm","aria-label":"Copy value",onClick:()=>{navigator.clipboard.writeText(n).then(()=>{s({title:"Copied",description:"Value copied to clipboard."})})},children:u.jsx(pb,{className:"h-3.5 w-3.5",strokeWidth:1.5})})}function uE({onSubmit:n,loading:s}){const[l,r]=V.useState(""),c=lE.test(l);return u.jsxs("form",{className:"flex max-w-md items-end gap-2",onSubmit:d=>{d.preventDefault(),c&&n(l.toLowerCase())},children:[u.jsxs("div",{className:"flex flex-1 flex-col gap-1.5",children:[u.jsx(Rt,{htmlFor:"setup-domain",children:"Sending domain"}),u.jsx(vt,{id:"setup-domain",placeholder:"mysite.com",value:l,onChange:d=>r(d.target.value)})]}),u.jsx(Te,{type:"submit",disabled:!c||s,children:s?"Adding…":"Add domain"})]})}function fE(){var v,x,w;const{toast:n}=Zn(),s=_a(),l=at({queryKey:qe.domain,queryFn:()=>Uv()}),r=N=>{s.setQueryData(qe.domain,N)},c=N=>R=>{n({variant:"error",title:N,description:R instanceof Ut?R.status===501?"The active email provider does not support domain management.":R.message:"Unexpected error."})},d=_n({mutationFn:()=>Uv(!0),onSuccess:r,onError:c("Re-check failed")}),h=_n({mutationFn:()=>A_(),onSuccess:N=>{var R;r(N),n({title:"Verification pass triggered",description:((R=N.status)==null?void 0:R.state)==="verified"?"Domain is verified.":"DNS can take a few minutes — re-check shortly."})},onError:c("Verify failed")}),y=_n({mutationFn:N=>M_(N),onSuccess:N=>{r(N),n({title:"Domain registered",description:"Add the DNS records below at your DNS host."})},onError:c("Add domain failed")}),p=l.data,m=((v=p==null?void 0:p.status)==null?void 0:v.records)??[],b=(p==null?void 0:p.supported)===!0&&(p.status===null||p.status.state==="not_found");return u.jsxs("div",{className:"space-y-6",children:[u.jsx(Fn,{title:"Setup",description:"Sending-domain verification — DNS records, status, and test mode.",action:p!=null&&p.supported?u.jsxs("div",{className:"flex gap-2",children:[u.jsxs(Te,{variant:"outline",size:"sm",onClick:()=>d.mutate(),disabled:d.isPending,children:[u.jsx(DR,{className:"h-4 w-4"}),d.isPending?"Checking…":"Re-check"]}),p.domain?u.jsxs(Te,{size:"sm",onClick:()=>h.mutate(),disabled:h.isPending,children:[u.jsx(GR,{className:"h-4 w-4"}),h.isPending?"Verifying…":"Verify"]}):null]}):null}),l.isPending?u.jsx(hi,{}):l.isError?u.jsx(Mt,{error:l.error,onRetry:()=>l.refetch()}):p?p.supported?u.jsxs(u.Fragment,{children:[u.jsx(cE,{testMode:p.testMode}),u.jsxs("div",{className:"flex flex-wrap items-center gap-x-6 gap-y-2 rounded-lg border bg-white/[0.015] p-4 text-sm",children:[u.jsxs("span",{children:[u.jsx("span",{className:"text-white/60",children:"Domain: "}),u.jsx("span",{className:"font-medium text-white",children:p.domain??"not configured"})]}),u.jsxs("span",{children:[u.jsx("span",{className:"text-white/60",children:"Provider: "}),u.jsx("span",{className:"font-medium text-white",children:p.providerId})]}),u.jsxs("span",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"text-white/60",children:"State:"}),u.jsx(oE,{state:((x=p.status)==null?void 0:x.state)??"not_found"})]}),(w=p.status)!=null&&w.checkedAt?u.jsxs("span",{className:"text-white/50",children:["Checked ",kn(p.status.checkedAt)]}):null]}),b?u.jsxs("div",{className:"space-y-3",children:[u.jsx("p",{className:"text-sm text-white/60",children:p.domain?`${p.domain} isn't registered with ${p.providerId} yet — add it to get the DNS records.`:"No sending domain configured. Add one to get the DNS records to verify."}),u.jsx(uE,{onSubmit:N=>y.mutate(N),loading:y.isPending})]}):null,m.length>0?u.jsx("div",{className:"rounded-lg border bg-white/[0.015]",children:u.jsxs(Ss,{children:[u.jsx(js,{children:u.jsxs(Lt,{children:[u.jsx(Se,{children:"Type"}),u.jsx(Se,{children:"Name"}),u.jsx(Se,{children:"Value"}),u.jsx(Se,{className:"text-right",children:"Priority"}),u.jsx(Se,{children:"Purpose"}),u.jsx(Se,{children:"Status"})]})}),u.jsx(ws,{children:m.map(N=>u.jsxs(Lt,{children:[u.jsx(be,{className:"font-medium text-white",children:N.type}),u.jsx(be,{className:"font-mono text-xs text-white/70",children:u.jsxs("span",{className:"flex items-center gap-1",children:[N.name,u.jsx(qv,{value:N.name})]})}),u.jsx(be,{className:"max-w-[18rem] font-mono text-xs text-white/70",children:u.jsxs("span",{className:"flex items-center gap-1",children:[u.jsx("span",{className:"truncate",title:N.value,children:N.value}),u.jsx(qv,{value:N.value})]})}),u.jsx(be,{className:"text-right text-white/60",children:N.priority??""}),u.jsx(be,{className:"text-white/60",children:N.purpose}),u.jsx(be,{children:u.jsx(Pr,{status:N.status})})]},`${N.type}-${N.name}-${N.value}`))})]})}):b?null:u.jsx(Ra,{icon:ih,title:"No DNS records yet",description:"The provider hasn't reported any DNS records for this domain. Re-check, or verify it in the provider dashboard."})]}):u.jsx(Ra,{icon:ih,title:"Domain management not supported",description:`The active email provider (${p.providerId}) does not expose a domains API. Verify your sending domain in the provider's own dashboard instead.`}):null]})}const dE=[{value:"",label:"All"},{value:"bounced",label:"Bounced"},{value:"unsubscribed",label:"Unsubscribed"},{value:"complained",label:"Complained"}];function hE({row:n}){return u.jsxs("div",{className:"flex flex-wrap gap-1",children:[n.unsubscribedAll?u.jsx(lt,{variant:"destructive",children:"Unsubscribed"}):null,n.bounceCount>0?u.jsxs(lt,{variant:"secondary",children:[ft(n.bounceCount)," bounce"]}):null,n.suppressed&&n.bounceCount===0&&!n.unsubscribedAll?u.jsx(lt,{variant:"destructive",children:"Complained"}):null,n.suppressed&&!n.unsubscribedAll&&n.bounceCount>0?u.jsx(lt,{variant:"destructive",children:"Suppressed"}):null]})}function mE(){var m;const{toast:n}=Zn(),s=_a(),[l,r]=V.useState(""),[c,d]=V.useState(null),h=at({queryKey:qe.suppressions(l),queryFn:()=>R_(l||void 0),placeholderData:uh}),y=_n({mutationFn:b=>jb(b.userId,{suppressed:!1,unsubscribedAll:!1}),onSuccess:()=>{n({title:"Recipient restored",description:"They can receive emails again."}),d(null),s.invalidateQueries({queryKey:["suppressions"]})},onError:b=>{n({variant:"error",title:"Un-suppress failed",description:b instanceof Ut?b.message:"Unexpected error."}),d(null)}}),p=((m=h.data)==null?void 0:m.suppressions)??[];return u.jsxs("div",{className:"space-y-6",children:[u.jsx(Fn,{title:"Suppressions",description:"Bounced, unsubscribed, and complained recipients."}),u.jsxs("div",{className:"flex max-w-xs flex-col gap-1.5",children:[u.jsx(Rt,{htmlFor:"supp-type",children:"Type"}),u.jsx(Gc,{id:"supp-type",value:l,onChange:b=>r(b.target.value),children:dE.map(b=>u.jsx("option",{value:b.value,children:b.label},b.value))})]}),h.isPending?u.jsx(hi,{}):h.isError?u.jsx(Mt,{error:h.error,onRetry:()=>h.refetch()}):p.length===0?u.jsx(Ra,{title:"No suppressions",description:"Recipients who bounce, unsubscribe, or complain appear here."}):u.jsx("div",{className:"rounded-lg border bg-white/[0.015]",children:u.jsxs(Ss,{children:[u.jsx(js,{children:u.jsxs(Lt,{children:[u.jsx(Se,{children:"Email"}),u.jsx(Se,{children:"User ID"}),u.jsx(Se,{children:"Reason"}),u.jsx(Se,{className:"text-right",children:"Suppressed"}),u.jsx(Se,{className:"text-right",children:"Action"})]})}),u.jsx(ws,{children:p.map(b=>u.jsxs(Lt,{children:[u.jsx(be,{className:"font-medium text-white",children:b.email}),u.jsx(be,{className:"font-mono text-xs text-white/70",children:b.userId}),u.jsx(be,{children:u.jsx(hE,{row:b})}),u.jsx(be,{className:"text-right text-white/60",children:kn(b.suppressedAt)}),u.jsx(be,{className:"text-right",children:u.jsx(Te,{variant:"outline",size:"sm",onClick:()=>d(b),children:"Un-suppress"})})]},b.id))})]})}),u.jsx(Rl,{open:c!==null,onClose:()=>d(null),onConfirm:()=>c&&y.mutate(c),title:"Un-suppress this recipient?",description:c?`${c.email} will be eligible to receive emails again.`:void 0,confirmLabel:"Un-suppress",loading:y.isPending})]})}function jc({label:n,value:s}){return u.jsxs("div",{className:"rounded-md border border-hairline-faint bg-white/[0.015] p-3",children:[u.jsx("p",{className:"eyebrow text-white/50",children:n}),u.jsx("p",{className:"mt-2 font-display text-lg text-white tracking-[-0.02em]",children:s})]})}function pE({template:n}){const{toast:s}=Zn(),[l,r]=V.useState(!1),[c,d]=V.useState(""),h=at({queryKey:qe.templatePreview(n.key),queryFn:()=>u_(n.key)}),y=at({queryKey:qe.templateReport(n.key),queryFn:()=>d_(n.key),retry:(b,v)=>!(v instanceof Ut&&v.status===404)&&b<2}),p=_n({mutationFn:()=>f_(n.key,c),onSuccess:b=>{s({title:"Test email sent",description:`Status: ${b.status}.`}),r(!1),d("")},onError:b=>{s({variant:"error",title:"Send-test failed",description:b instanceof Ut?b.message:"Unexpected error."})}}),m=y.isError&&y.error instanceof Ut&&y.error.status===404;return u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{className:"flex items-start justify-between gap-4",children:[u.jsxs("div",{className:"space-y-1",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("h2",{className:"font-display text-xl text-white tracking-[-0.02em]",children:n.key}),n.category?u.jsx(lt,{variant:"secondary",children:n.category}):null]}),u.jsx("p",{className:"text-sm text-white/60",children:n.defaultSubject})]}),u.jsxs(Te,{onClick:()=>r(!0),children:[u.jsx(Yr,{className:"h-4 w-4"}),"Send test"]})]}),u.jsxs("section",{className:"space-y-3",children:[u.jsx("h3",{className:"eyebrow text-white/50",children:"Performance"}),y.isPending?u.jsx(Dt,{className:"h-28 w-full"}):m?u.jsx("p",{className:"rounded-md border border-dashed border-white/15 p-6 text-center text-sm text-white/60",children:"This template has never been sent."}):y.isError?u.jsx(Mt,{error:y.error,onRetry:()=>y.refetch()}):y.data?u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-4",children:[u.jsx(jc,{label:"Sent",value:ft(y.data.totals.sent)}),u.jsx(jc,{label:"Delivered",value:ft(y.data.totals.delivered)}),u.jsx(jc,{label:"Open rate",value:wl(y.data.totals.openRate)}),u.jsx(jc,{label:"Click rate",value:wl(y.data.totals.clickRate)})]}),u.jsxs(Ft,{children:[u.jsx(Jt,{className:"pb-2",children:u.jsx(dn,{className:"eyebrow text-white/50",children:"Sends over time"})}),u.jsx(It,{children:u.jsx(lh,{label:"sent",data:y.data.series.map(b=>({date:b.date,value:b.sent}))})})]})]}):null]}),u.jsxs("section",{className:"space-y-3",children:[u.jsx("h3",{className:"eyebrow text-white/50",children:"Preview"}),h.isPending?u.jsx(Dt,{className:"h-96 w-full"}):h.isError?u.jsx(Mt,{error:h.error,onRetry:()=>h.refetch()}):h.data?u.jsx("div",{className:"overflow-hidden rounded-lg border bg-white",children:u.jsx("iframe",{title:`${n.key} preview`,srcDoc:h.data.html,sandbox:"",className:"h-[600px] w-full"})}):null]}),u.jsx(Qc,{open:l,onClose:()=>r(!1),title:"Send a test email",description:`Sends "${n.key}" with example props.`,footer:u.jsxs(u.Fragment,{children:[u.jsx(Te,{variant:"outline",onClick:()=>r(!1),children:"Cancel"}),u.jsx(Te,{onClick:()=>p.mutate(),disabled:!c||p.isPending,children:p.isPending?"Sending…":"Send test"})]}),children:u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Rt,{htmlFor:"test-to",children:"Recipient email"}),u.jsx(vt,{id:"test-to",type:"email",placeholder:"you@example.com",value:c,onChange:b=>d(b.target.value)})]})})]})}function yE(){var d;const n=at({queryKey:qe.templates,queryFn:c_}),[s,l]=V.useState(null),r=((d=n.data)==null?void 0:d.templates)??[];V.useEffect(()=>{const h=r[0];s===null&&h&&l(h.key)},[s,r]);const c=r.find(h=>h.key===s)??null;return u.jsxs("div",{className:"space-y-6",children:[u.jsx(Fn,{title:"Templates",description:"Catalog, per-template stats, live previews, and send-test."}),n.isPending?u.jsx(Dt,{className:"h-96 w-full"}):n.isError?u.jsx(Mt,{error:n.error,onRetry:()=>n.refetch()}):r.length===0?u.jsx(Ra,{title:"No templates registered",description:"Templates appear here once they're added to your email registry."}):u.jsxs("div",{className:"grid gap-6 lg:grid-cols-[260px_1fr]",children:[u.jsx("nav",{className:"space-y-1",children:r.map(h=>u.jsxs("button",{type:"button",onClick:()=>l(h.key),className:Ze("w-full rounded-md px-3 py-2 text-left text-sm transition-colors duration-200",h.key===s?"bg-accent-tint text-accent":"text-white/60 hover:bg-white/5 hover:text-white"),children:[u.jsx("span",{className:"block font-medium",children:h.key}),h.category?u.jsx("span",{className:"block text-xs opacity-70",children:h.category}):null]},h.key))}),c?u.jsx(pE,{template:c},c.key):null]})]})}const Dn=fw({component:t_}),gE=Xn({getParentRoute:()=>Dn,path:"/",component:I_}),vE=Xn({getParentRoute:()=>Dn,path:"/sends",component:aE}),bE=Xn({getParentRoute:()=>Dn,path:"/templates",component:yE}),xE=Xn({getParentRoute:()=>Dn,path:"/journeys",component:Z_}),SE=Xn({getParentRoute:()=>Dn,path:"/buckets",component:U_}),jE=Xn({getParentRoute:()=>Dn,path:"/contacts",component:V_}),wE=Xn({getParentRoute:()=>Dn,path:"/suppressions",component:mE}),NE=Xn({getParentRoute:()=>Dn,path:"/setup",component:fE}),RE=Xn({getParentRoute:()=>Dn,path:"/settings",component:iE}),_E=Xn({getParentRoute:()=>Dn,path:"/debug",component:P_}),EE=Dn.addChildren([gE,vE,bE,xE,SE,jE,wE,_E,NE,RE]),TE=jw({routeTree:EE,basepath:"/studio",defaultPreload:"intent"}),Nb=document.getElementById("root");if(!Nb)throw new Error("Root element #root not found");Aw.createRoot(Nb).render(u.jsx(V.StrictMode,{children:u.jsx(jS,{client:$R,children:u.jsx(IR,{children:u.jsx(YN,{children:u.jsx(Rw,{router:TE})})})})}));
|