@hogsend/cli 0.25.0 → 0.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,280 +0,0 @@
1
- var F1=Object.defineProperty;var _g=n=>{throw TypeError(n)};var I1=(n,s,i)=>s in n?F1(n,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):n[s]=i;var $a=(n,s,i)=>I1(n,typeof s!="symbol"?s+"":s,i),rd=(n,s,i)=>s.has(n)||_g("Cannot "+i);var E=(n,s,i)=>(rd(n,s,"read from private field"),i?i.call(n):s.get(n)),de=(n,s,i)=>s.has(n)?_g("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(n):s.set(n,i),le=(n,s,i,r)=>(rd(n,s,"write to private field"),r?r.call(n,i):s.set(n,i),i),Ne=(n,s,i)=>(rd(n,s,"access private method"),i);var fc=(n,s,i,r)=>({set _(c){le(n,s,c,i)},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 i(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=i(c);fetch(c.href,d)}})();function J1(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var od={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 Eg;function $1(){if(Eg)return xr;Eg=1;var n=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function i(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=i,xr.jsxs=i,xr}var Cg;function W1(){return Cg||(Cg=1,od.exports=$1()),od.exports}var u=W1(),Rl=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(){}},Js,is,ol,Pv,eS=(Pv=class extends Rl{constructor(){super();de(this,Js);de(this,is);de(this,ol);le(this,ol,s=>{if(typeof window<"u"&&window.addEventListener){const i=()=>s();return window.addEventListener("visibilitychange",i,!1),()=>{window.removeEventListener("visibilitychange",i)}}})}onSubscribe(){E(this,is)||this.setEventListener(E(this,ol))}onUnsubscribe(){var s;this.hasListeners()||((s=E(this,is))==null||s.call(this),le(this,is,void 0))}setEventListener(s){var i;le(this,ol,s),(i=E(this,is))==null||i.call(this),le(this,is,s(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(s){E(this,Js)!==s&&(le(this,Js,s),this.onFocus())}onFocus(){const s=this.isFocused();this.listeners.forEach(i=>{i(s)})}isFocused(){var s;return typeof E(this,Js)=="boolean"?E(this,Js):((s=globalThis.document)==null?void 0:s.visibilityState)!=="hidden"}},Js=new WeakMap,is=new WeakMap,ol=new WeakMap,Pv),ch=new eS,tS={setTimeout:(n,s)=>setTimeout(n,s),clearTimeout:n=>clearTimeout(n),setInterval:(n,s)=>setInterval(n,s),clearInterval:n=>clearInterval(n)},ls,oh,Yv,nS=(Yv=class{constructor(){de(this,ls,tS);de(this,oh,!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,oh=new WeakMap,Yv),Zs=new nS;function aS(n){setTimeout(n,0)}var sS=typeof window>"u"||"Deno"in globalThis;function Dt(){}function iS(n,s){return typeof n=="function"?n(s):n}function Dd(n){return typeof n=="number"&&n>=0&&n!==1/0}function t0(n,s){return Math.max(n+(s||0)-Date.now(),0)}function gs(n,s){return typeof n=="function"?n(s):n}function dn(n,s){return typeof n=="function"?n(s):n}function Tg(n,s){const{type:i="all",exact:r,fetchStatus:c,predicate:d,queryKey:h,stale:y}=n;if(h){if(r){if(s.queryHash!==uh(h,s.options))return!1}else if(!Ar(s.queryKey,h))return!1}if(i!=="all"){const p=s.isActive();if(i==="active"&&!p||i==="inactive"&&p)return!1}return!(typeof y=="boolean"&&s.isStale()!==y||c&&c!==s.state.fetchStatus||d&&!d(s))}function Mg(n,s){const{exact:i,status:r,predicate:c,mutationKey:d}=n;if(d){if(!s.options.mutationKey)return!1;if(i){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 uh(n,s){return((s==null?void 0:s.queryKeyHashFn)||ci)(n)}function ci(n){return JSON.stringify(n,(s,i)=>Ud(i)?Object.keys(i).sort().reduce((r,c)=>(r[c]=i[c],r),{}):i)}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(i=>Ar(n[i],s[i])):!1}var lS=Object.prototype.hasOwnProperty;function n0(n,s,i=0){if(n===s)return n;if(i>500)return s;const r=Ag(n)&&Ag(s);if(!r&&!(Ud(n)&&Ud(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:lS.call(n,v))&&m++;continue}if(x===null||w===null||typeof x!="object"||typeof w!="object"){p[v]=w;continue}const N=n0(x,w,i+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 i in n)if(n[i]!==s[i])return!1;return!0}function Ag(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function Ud(n){if(!Og(n))return!1;const s=n.constructor;if(s===void 0)return!0;const i=s.prototype;return!(!Og(i)||!i.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function Og(n){return Object.prototype.toString.call(n)==="[object Object]"}function rS(n){return new Promise(s=>{Zs.setTimeout(s,n)})}function Ld(n,s,i){return typeof i.structuralSharing=="function"?i.structuralSharing(n,s):i.structuralSharing!==!1?n0(n,s):s}function fh(n){return n}function oS(n,s,i=0){const r=[...n,s];return i&&r.length>i?r.slice(1):r}function cS(n,s,i=0){const r=[s,...n];return i&&r.length>i?r.slice(0,-1):r}var dh=Symbol();function a0(n,s){return!n.queryFn&&(s!=null&&s.initialPromise)?()=>s.initialPromise:!n.queryFn||n.queryFn===dh?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function hh(n,s){return typeof n=="function"?n(...s):!!n}function uS(n,s,i){let r=!1,c;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(c??(c=s()),r||(r=!0,c.aborted?i():c.addEventListener("abort",i,{once:!0})),c)}),n}var Or=(()=>{let n=()=>sS;return{isServer(){return n()},setIsServer(s){n=s}}})();function Bd(){let n,s;const i=new Promise((c,d)=>{n=c,s=d});i.status="pending",i.catch(()=>{});function r(c){Object.assign(i,c),delete i.resolve,delete i.reject}return i.resolve=c=>{r({status:"fulfilled",value:c}),n(c)},i.reject=c=>{r({status:"rejected",reason:c}),s(c)},i}var fS=aS;function dS(){let n=[],s=0,i=y=>{y()},r=y=>{y()},c=fS;const d=y=>{s?n.push(y):c(()=>{i(y)})},h=()=>{const y=n;n=[],y.length&&c(()=>{r(()=>{y.forEach(p=>{i(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=>{i=y},setBatchNotifyFunction:y=>{r=y},setScheduler:y=>{c=y}}}var mt=dS(),cl,rs,ul,Kv,hS=(Kv=class extends Rl{constructor(){super();de(this,cl,!0);de(this,rs);de(this,ul);le(this,ul,s=>{if(typeof window<"u"&&window.addEventListener){const i=()=>s(!0),r=()=>s(!1);return window.addEventListener("online",i,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",i),window.removeEventListener("offline",r)}}})}onSubscribe(){E(this,rs)||this.setEventListener(E(this,ul))}onUnsubscribe(){var s;this.hasListeners()||((s=E(this,rs))==null||s.call(this),le(this,rs,void 0))}setEventListener(s){var i;le(this,ul,s),(i=E(this,rs))==null||i.call(this),le(this,rs,s(this.setOnline.bind(this)))}setOnline(s){E(this,cl)!==s&&(le(this,cl,s),this.listeners.forEach(r=>{r(s)}))}isOnline(){return E(this,cl)}},cl=new WeakMap,rs=new WeakMap,ul=new WeakMap,Kv),kc=new hS;function mS(n){return Math.min(1e3*2**n,3e4)}function s0(n){return(n??"online")==="online"?kc.isOnline():!0}var qd=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function i0(n){let s=!1,i=0,r;const c=Bd(),d=()=>c.status!=="pending",h=R=>{var j;if(!d()){const k=new qd(R);x(k),(j=n.onCancel)==null||j.call(n,k)}},y=()=>{s=!0},p=()=>{s=!1},m=()=>ch.isFocused()&&(n.networkMode==="always"||kc.isOnline())&&n.canRun(),b=()=>s0(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=k=>{(d()||m())&&R(k)},(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=i===0?n.initialPromise:void 0;try{R=j??n.fn()}catch(k){R=Promise.reject(k)}Promise.resolve(R).then(v).catch(k=>{var U;if(d())return;const A=n.retry??(Or.isServer()?0:3),B=n.retryDelay??mS,C=typeof B=="function"?B(i,k):B,Q=A===!0||typeof A=="number"&&i<A||typeof A=="function"&&A(i,k);if(s||!Q){x(k);return}i++,(U=n.onFail)==null||U.call(n,i,k),rS(C).then(()=>m()?void 0:w()).then(()=>{s?x(k):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,Xv,l0=(Xv=class{constructor(){de(this,$s)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Dd(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,Xv);function pS(n){return{onFetch:(s,i)=>{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=>{uS(B,()=>s.signal,()=>R=!0)},k=a0(s.options,s.fetchOptions),A=async(B,C,Q)=>{if(R)return Promise.reject(s.signal.reason);if(C==null&&B.pages.length)return Promise.resolve(B);const z=(()=>{const W={client:s.client,queryKey:s.queryKey,pageParam:C,direction:Q?"backward":"forward",meta:s.options.meta};return j(W),W})(),O=await k(z),{maxPages:Y}=s.options,$=Q?cS:oS;return{pages:$(B.pages,O,Y),pageParams:$(B.pageParams,C,Y)}};if(c&&d.length){const B=c==="backward",C=B?yS:kg,Q={pages:d,pageParams:h},U=C(r,Q);y=await A(Q,U,B)}else{const B=n??d.length;do{const C=p===0?h[0]??r.initialPageParam:kg(r,y);if(p>0&&C==null)break;y=await A(y,C),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},i)}:s.fetchFn=m}}}function kg(n,{pages:s,pageParams:i}){const r=s.length-1;return s.length>0?n.getNextPageParam(s[r],s,i[r],i):void 0}function yS(n,{pages:s,pageParams:i}){var r;return s.length>0?(r=n.getPreviousPageParam)==null?void 0:r.call(n,s[0],s,i[0],i):void 0}var fl,Ws,dl,_n,ei,gt,Br,ti,fn,r0,ba,Zv,gS=(Zv=class extends l0{constructor(s){super();de(this,fn);de(this,fl);de(this,Ws);de(this,dl);de(this,_n);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,_n,E(this,ei).getQueryCache()),this.queryKey=s.queryKey,this.queryHash=s.queryHash,le(this,Ws,Dg(this.options)),this.state=s.state??E(this,Ws),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return E(this,fl)}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,fl,s._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const i=Dg(this.options);i.data!==void 0&&(this.setState(zg(i.data,i.dataUpdatedAt)),le(this,Ws,i))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&E(this,_n).remove(this)}setData(s,i){const r=Ld(this.state.data,s,this.options);return Ne(this,fn,ba).call(this,{data:r,type:"success",dataUpdatedAt:i==null?void 0:i.updatedAt,manual:i==null?void 0:i.manual}),r}setState(s){Ne(this,fn,ba).call(this,{type:"setState",state:s})}cancel(s){var r,c;const i=(r=E(this,gt))==null?void 0:r.promise;return(c=E(this,gt))==null||c.cancel(s),i?i.then(Dt).catch(Dt):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=>dn(s.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===dh||!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:!t0(this.state.dataUpdatedAt,s)}onFocus(){var i;const s=this.observers.find(r=>r.shouldFetchOnWindowFocus());s==null||s.refetch({cancelRefetch:!1}),(i=E(this,gt))==null||i.continue()}onOnline(){var i;const s=this.observers.find(r=>r.shouldFetchOnReconnect());s==null||s.refetch({cancelRefetch:!1}),(i=E(this,gt))==null||i.continue()}addObserver(s){this.observers.includes(s)||(this.observers.push(s),this.clearGcTimeout(),E(this,_n).notify({type:"observerAdded",query:this,observer:s}))}removeObserver(s){this.observers.includes(s)&&(this.observers=this.observers.filter(i=>i!==s),this.observers.length||(E(this,gt)&&(E(this,ti)||Ne(this,fn,r0).call(this)?E(this,gt).cancel({revert:!0}):E(this,gt).cancelRetry()),this.scheduleGc()),E(this,_n).notify({type:"observerRemoved",query:this,observer:s}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ne(this,fn,ba).call(this,{type:"invalidate"})}async fetch(s,i){var m,b,v,x,w,N,R,j,k,A,B;if(this.state.fetchStatus!=="idle"&&((m=E(this,gt))==null?void 0:m.status())!=="rejected"){if(this.state.data!==void 0&&(i!=null&&i.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 C=this.observers.find(Q=>Q.options.queryFn);C&&this.setOptions(C.options)}const r=new AbortController,c=C=>{Object.defineProperty(C,"signal",{enumerable:!0,get:()=>(le(this,ti,!0),r.signal)})},d=()=>{const C=a0(this.options,i),U=(()=>{const z={client:E(this,ei),queryKey:this.queryKey,meta:this.meta};return c(z),z})();return le(this,ti,!1),this.options.persister?this.options.persister(C,U,this):C(U)},y=(()=>{const C={fetchOptions:i,options:this.options,queryKey:this.queryKey,client:E(this,ei),state:this.state,fetchFn:d};return c(C),C})(),p=E(this,fl)==="infinite"?pS(this.options.pages):this.options.behavior;p==null||p.onFetch(y,this),le(this,dl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((b=y.fetchOptions)==null?void 0:b.meta))&&Ne(this,fn,ba).call(this,{type:"fetch",meta:(v=y.fetchOptions)==null?void 0:v.meta}),le(this,gt,i0({initialPromise:i==null?void 0:i.initialPromise,fn:y.fetchFn,onCancel:C=>{C instanceof qd&&C.revert&&this.setState({...E(this,dl),fetchStatus:"idle"}),r.abort()},onFail:(C,Q)=>{Ne(this,fn,ba).call(this,{type:"failed",failureCount:C,error:Q})},onPause:()=>{Ne(this,fn,ba).call(this,{type:"pause"})},onContinue:()=>{Ne(this,fn,ba).call(this,{type:"continue"})},retry:y.options.retry,retryDelay:y.options.retryDelay,networkMode:y.options.networkMode,canRun:()=>!0}));try{const C=await E(this,gt).start();if(C===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(C),(w=(x=E(this,_n).config).onSuccess)==null||w.call(x,C,this),(R=(N=E(this,_n).config).onSettled)==null||R.call(N,C,this.state.error,this),C}catch(C){if(C instanceof qd){if(C.silent)return E(this,gt).promise;if(C.revert){if(this.state.data===void 0)throw C;return this.state.data}}throw Ne(this,fn,ba).call(this,{type:"error",error:C}),(k=(j=E(this,_n).config).onError)==null||k.call(j,C,this),(B=(A=E(this,_n).config).onSettled)==null||B.call(A,this.state.data,C,this),C}finally{this.scheduleGc()}}},fl=new WeakMap,Ws=new WeakMap,dl=new WeakMap,_n=new WeakMap,ei=new WeakMap,gt=new WeakMap,Br=new WeakMap,ti=new WeakMap,fn=new WeakSet,r0=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},ba=function(s){const i=r=>{switch(s.type){case"failed":return{...r,fetchFailureCount:s.failureCount,fetchFailureReason:s.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...o0(r.data,this.options),fetchMeta:s.meta??null};case"success":const c={...r,...zg(s.data,s.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!s.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return le(this,dl,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=i(this.state),mt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),E(this,_n).notify({query:this,type:"updated",action:s})})},Zv);function o0(n,s){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:s0(s.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function zg(n,s){return{data:n,dataUpdatedAt:s??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Dg(n){const s=typeof n.initialData=="function"?n.initialData():n.initialData,i=s!==void 0,r=i?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:s,dataUpdateCount:0,dataUpdatedAt:i?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}var Ft,ze,qr,zt,ni,hl,xa,os,Hr,ml,pl,ai,si,cs,yl,Qe,Tr,Hd,Qd,Gd,Vd,Pd,Yd,Kd,c0,Fv,vS=(Fv=class extends Rl{constructor(s,i){super();de(this,Qe);de(this,Ft);de(this,ze);de(this,qr);de(this,zt);de(this,ni);de(this,hl);de(this,xa);de(this,os);de(this,Hr);de(this,ml);de(this,pl);de(this,ai);de(this,si);de(this,cs);de(this,yl,new Set);this.options=i,le(this,Ft,s),le(this,os,null),le(this,xa,Bd()),this.bindMethods(),this.setOptions(i)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(E(this,ze).addObserver(this),Ug(E(this,ze),this.options)?Ne(this,Qe,Tr).call(this):this.updateResult(),Ne(this,Qe,Vd).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Xd(E(this,ze),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Xd(E(this,ze),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ne(this,Qe,Pd).call(this),Ne(this,Qe,Yd).call(this),E(this,ze).removeObserver(this)}setOptions(s){const i=this.options,r=E(this,ze);if(this.options=E(this,Ft).defaultQueryOptions(s),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof dn(this.options.enabled,E(this,ze))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ne(this,Qe,Kd).call(this),E(this,ze).setOptions(this.options),i._defaulted&&!Oc(this.options,i)&&E(this,Ft).getQueryCache().notify({type:"observerOptionsUpdated",query:E(this,ze),observer:this});const c=this.hasListeners();c&&Lg(E(this,ze),r,this.options,i)&&Ne(this,Qe,Tr).call(this),this.updateResult(),c&&(E(this,ze)!==r||dn(this.options.enabled,E(this,ze))!==dn(i.enabled,E(this,ze))||gs(this.options.staleTime,E(this,ze))!==gs(i.staleTime,E(this,ze)))&&Ne(this,Qe,Hd).call(this);const d=Ne(this,Qe,Qd).call(this);c&&(E(this,ze)!==r||dn(this.options.enabled,E(this,ze))!==dn(i.enabled,E(this,ze))||d!==E(this,cs))&&Ne(this,Qe,Gd).call(this,d)}getOptimisticResult(s){const i=E(this,Ft).getQueryCache().build(E(this,Ft),s),r=this.createResult(i,s);return xS(this,r)&&(le(this,zt,r),le(this,hl,this.options),le(this,ni,E(this,ze).state)),r}getCurrentResult(){return E(this,zt)}trackResult(s,i){return new Proxy(s,{get:(r,c)=>(this.trackProp(c),i==null||i(c),c==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&E(this,xa).status==="pending"&&E(this,xa).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,c))})}trackProp(s){E(this,yl).add(s)}getCurrentQuery(){return E(this,ze)}refetch({...s}={}){return this.fetch({...s})}fetchOptimistic(s){const i=E(this,Ft).defaultQueryOptions(s),r=E(this,Ft).getQueryCache().build(E(this,Ft),i);return r.fetch().then(()=>this.createResult(r,i))}fetch(s){return Ne(this,Qe,Tr).call(this,{...s,cancelRefetch:s.cancelRefetch??!0}).then(()=>(this.updateResult(),E(this,zt)))}createResult(s,i){var Y;const r=E(this,ze),c=this.options,d=E(this,zt),h=E(this,ni),y=E(this,hl),m=s!==r?s.state:E(this,qr),{state:b}=s;let v={...b},x=!1,w;if(i._optimisticResults){const $=this.hasListeners(),W=!$&&Ug(s,i),Z=$&&Lg(s,r,i,c);(W||Z)&&(v={...v,...o0(b.data,s.options)}),i._optimisticResults==="isRestoring"&&(v.fetchStatus="idle")}let{error:N,errorUpdatedAt:R,status:j}=v;w=v.data;let k=!1;if(i.placeholderData!==void 0&&w===void 0&&j==="pending"){let $;d!=null&&d.isPlaceholderData&&i.placeholderData===(y==null?void 0:y.placeholderData)?($=d.data,k=!0):$=typeof i.placeholderData=="function"?i.placeholderData((Y=E(this,pl))==null?void 0:Y.state.data,E(this,pl)):i.placeholderData,$!==void 0&&(j="success",w=Ld(d==null?void 0:d.data,$,i),x=!0)}if(i.select&&w!==void 0&&!k)if(d&&w===(h==null?void 0:h.data)&&i.select===E(this,Hr))w=E(this,ml);else try{le(this,Hr,i.select),w=i.select(w),w=Ld(d==null?void 0:d.data,w,i),le(this,ml,w),le(this,os,null)}catch($){le(this,os,$)}E(this,os)&&(N=E(this,os),w=E(this,ml),R=Date.now(),j="error");const A=v.fetchStatus==="fetching",B=j==="pending",C=j==="error",Q=B&&A,U=w!==void 0,O={status:j,fetchStatus:v.fetchStatus,isPending:B,isSuccess:j==="success",isError:C,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:C&&!U,isPaused:v.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:C&&U,isStale:mh(s,i),refetch:this.refetch,promise:E(this,xa),isEnabled:dn(i.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,xa,O.promise=Bd());Z(he)},ee=E(this,xa);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),i=this.createResult(E(this,ze),this.options);if(le(this,ni,E(this,ze).state),le(this,hl,this.options),E(this,ni).data!==void 0&&le(this,pl,E(this,ze)),Oc(i,s))return;le(this,zt,i);const r=()=>{if(!s)return!0;const{notifyOnChangeProps:c}=this.options,d=typeof c=="function"?c():c;if(d==="all"||!d&&!E(this,yl).size)return!0;const h=new Set(d??E(this,yl));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)})};Ne(this,Qe,c0).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ne(this,Qe,Vd).call(this)}},Ft=new WeakMap,ze=new WeakMap,qr=new WeakMap,zt=new WeakMap,ni=new WeakMap,hl=new WeakMap,xa=new WeakMap,os=new WeakMap,Hr=new WeakMap,ml=new WeakMap,pl=new WeakMap,ai=new WeakMap,si=new WeakMap,cs=new WeakMap,yl=new WeakMap,Qe=new WeakSet,Tr=function(s){Ne(this,Qe,Kd).call(this);let i=E(this,ze).fetch(this.options,s);return s!=null&&s.throwOnError||(i=i.catch(Dt)),i},Hd=function(){Ne(this,Qe,Pd).call(this);const s=gs(this.options.staleTime,E(this,ze));if(Or.isServer()||E(this,zt).isStale||!Dd(s))return;const r=t0(E(this,zt).dataUpdatedAt,s)+1;le(this,ai,Zs.setTimeout(()=>{E(this,zt).isStale||this.updateResult()},r))},Qd=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(E(this,ze)):this.options.refetchInterval)??!1},Gd=function(s){Ne(this,Qe,Yd).call(this),le(this,cs,s),!(Or.isServer()||dn(this.options.enabled,E(this,ze))===!1||!Dd(E(this,cs))||E(this,cs)===0)&&le(this,si,Zs.setInterval(()=>{(this.options.refetchIntervalInBackground||ch.isFocused())&&Ne(this,Qe,Tr).call(this)},E(this,cs)))},Vd=function(){Ne(this,Qe,Hd).call(this),Ne(this,Qe,Gd).call(this,Ne(this,Qe,Qd).call(this))},Pd=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))},Kd=function(){const s=E(this,Ft).getQueryCache().build(E(this,Ft),this.options);if(s===E(this,ze))return;const i=E(this,ze);le(this,ze,s),le(this,qr,s.state),this.hasListeners()&&(i==null||i.removeObserver(this),s.addObserver(this))},c0=function(s){mt.batch(()=>{s.listeners&&this.listeners.forEach(i=>{i(E(this,zt))}),E(this,Ft).getQueryCache().notify({query:E(this,ze),type:"observerResultsUpdated"})})},Fv);function bS(n,s){return dn(s.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&dn(s.retryOnMount,n)===!1)}function Ug(n,s){return bS(n,s)||n.state.data!==void 0&&Xd(n,s,s.refetchOnMount)}function Xd(n,s,i){if(dn(s.enabled,n)!==!1&&gs(s.staleTime,n)!=="static"){const r=typeof i=="function"?i(n):i;return r==="always"||r!==!1&&mh(n,s)}return!1}function Lg(n,s,i,r){return(n!==s||dn(r.enabled,n)===!1)&&(!i.suspense||n.state.status!=="error")&&mh(n,i)}function mh(n,s){return dn(s.enabled,n)!==!1&&n.isStaleByTime(gs(s.staleTime,n))}function xS(n,s){return!Oc(n.getCurrentResult(),s)}var Qr,Xn,Tt,ii,Zn,ns,Iv,SS=(Iv=class extends l0{constructor(s){super();de(this,Zn);de(this,Qr);de(this,Xn);de(this,Tt);de(this,ii);le(this,Qr,s.client),this.mutationId=s.mutationId,le(this,Tt,s.mutationCache),le(this,Xn,[]),this.state=s.state||u0(),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,Xn).includes(s)||(E(this,Xn).push(s),this.clearGcTimeout(),E(this,Tt).notify({type:"observerAdded",mutation:this,observer:s}))}removeObserver(s){le(this,Xn,E(this,Xn).filter(i=>i!==s)),this.scheduleGc(),E(this,Tt).notify({type:"observerRemoved",mutation:this,observer:s})}optionalRemove(){E(this,Xn).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,k,A,B,C,Q,U,z;const i=()=>{Ne(this,Zn,ns).call(this,{type:"continue"})},r={client:E(this,Qr),meta:this.options.meta,mutationKey:this.options.mutationKey};le(this,ii,i0({fn:()=>this.options.mutationFn?this.options.mutationFn(s,r):Promise.reject(new Error("No mutationFn found")),onFail:(O,Y)=>{Ne(this,Zn,ns).call(this,{type:"failed",failureCount:O,error:Y})},onPause:()=>{Ne(this,Zn,ns).call(this,{type:"pause"})},onContinue:i,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)i();else{Ne(this,Zn,ns).call(this,{type:"pending",variables:s,isPaused:d}),E(this,Tt).config.onMutate&&await E(this,Tt).config.onMutate(s,this,r);const Y=await((y=(h=this.options).onMutate)==null?void 0:y.call(h,s,r));Y!==this.state.context&&Ne(this,Zn,ns).call(this,{type:"pending",context:Y,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)),Ne(this,Zn,ns).call(this,{type:"success",data:O}),O}catch(O){try{await((k=(j=E(this,Tt).config).onError)==null?void 0:k.call(j,O,s,this.state.context,this,r))}catch(Y){Promise.reject(Y)}try{await((B=(A=this.options).onError)==null?void 0:B.call(A,O,s,this.state.context,r))}catch(Y){Promise.reject(Y)}try{await((Q=(C=E(this,Tt).config).onSettled)==null?void 0:Q.call(C,void 0,O,this.state.variables,this.state.context,this,r))}catch(Y){Promise.reject(Y)}try{await((z=(U=this.options).onSettled)==null?void 0:z.call(U,void 0,O,s,this.state.context,r))}catch(Y){Promise.reject(Y)}throw Ne(this,Zn,ns).call(this,{type:"error",error:O}),O}finally{E(this,Tt).runNext(this)}}},Qr=new WeakMap,Xn=new WeakMap,Tt=new WeakMap,ii=new WeakMap,Zn=new WeakSet,ns=function(s){const i=r=>{switch(s.type){case"failed":return{...r,failureCount:s.failureCount,failureReason:s.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:s.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:s.isPaused,status:"pending",variables:s.variables,submittedAt:Date.now()};case"success":return{...r,data:s.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:s.error,failureCount:r.failureCount+1,failureReason:s.error,isPaused:!1,status:"error"}}};this.state=i(this.state),mt.batch(()=>{E(this,Xn).forEach(r=>{r.onMutationUpdate(s)}),E(this,Tt).notify({mutation:this,type:"updated",action:s})})},Iv);function u0(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Sa,Dn,Gr,Jv,jS=(Jv=class extends Rl{constructor(s={}){super();de(this,Sa);de(this,Dn);de(this,Gr);this.config=s,le(this,Sa,new Set),le(this,Dn,new Map),le(this,Gr,0)}build(s,i,r){const c=new SS({client:s,mutationCache:this,mutationId:++fc(this,Gr)._,options:s.defaultMutationOptions(i),state:r});return this.add(c),c}add(s){E(this,Sa).add(s);const i=dc(s);if(typeof i=="string"){const r=E(this,Dn).get(i);r?r.push(s):E(this,Dn).set(i,[s])}this.notify({type:"added",mutation:s})}remove(s){if(E(this,Sa).delete(s)){const i=dc(s);if(typeof i=="string"){const r=E(this,Dn).get(i);if(r)if(r.length>1){const c=r.indexOf(s);c!==-1&&r.splice(c,1)}else r[0]===s&&E(this,Dn).delete(i)}}this.notify({type:"removed",mutation:s})}canRun(s){const i=dc(s);if(typeof i=="string"){const r=E(this,Dn).get(i),c=r==null?void 0:r.find(d=>d.state.status==="pending");return!c||c===s}else return!0}runNext(s){var r;const i=dc(s);if(typeof i=="string"){const c=(r=E(this,Dn).get(i))==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,Sa).forEach(s=>{this.notify({type:"removed",mutation:s})}),E(this,Sa).clear(),E(this,Dn).clear()})}getAll(){return Array.from(E(this,Sa))}find(s){const i={exact:!0,...s};return this.getAll().find(r=>Mg(i,r))}findAll(s={}){return this.getAll().filter(i=>Mg(s,i))}notify(s){mt.batch(()=>{this.listeners.forEach(i=>{i(s)})})}resumePausedMutations(){const s=this.getAll().filter(i=>i.state.isPaused);return mt.batch(()=>Promise.all(s.map(i=>i.continue().catch(Dt))))}},Sa=new WeakMap,Dn=new WeakMap,Gr=new WeakMap,Jv);function dc(n){var s;return(s=n.options.scope)==null?void 0:s.id}var ja,us,It,wa,_a,wc,Zd,$v,wS=($v=class extends Rl{constructor(i,r){super();de(this,_a);de(this,ja);de(this,us);de(this,It);de(this,wa);le(this,ja,i),this.setOptions(r),this.bindMethods(),Ne(this,_a,wc).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(i){var c;const r=this.options;this.options=E(this,ja).defaultMutationOptions(i),Oc(this.options,r)||E(this,ja).getMutationCache().notify({type:"observerOptionsUpdated",mutation:E(this,It),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&ci(r.mutationKey)!==ci(this.options.mutationKey)?this.reset():((c=E(this,It))==null?void 0:c.state.status)==="pending"&&E(this,It).setOptions(this.options)}onUnsubscribe(){var i;this.hasListeners()||(i=E(this,It))==null||i.removeObserver(this)}onMutationUpdate(i){Ne(this,_a,wc).call(this),Ne(this,_a,Zd).call(this,i)}getCurrentResult(){return E(this,us)}reset(){var i;(i=E(this,It))==null||i.removeObserver(this),le(this,It,void 0),Ne(this,_a,wc).call(this),Ne(this,_a,Zd).call(this)}mutate(i,r){var c;return le(this,wa,r),(c=E(this,It))==null||c.removeObserver(this),le(this,It,E(this,ja).getMutationCache().build(E(this,ja),this.options)),E(this,It).addObserver(this),E(this,It).execute(i)}},ja=new WeakMap,us=new WeakMap,It=new WeakMap,wa=new WeakMap,_a=new WeakSet,wc=function(){var r;const i=((r=E(this,It))==null?void 0:r.state)??u0();le(this,us,{...i,isPending:i.status==="pending",isSuccess:i.status==="success",isError:i.status==="error",isIdle:i.status==="idle",mutate:this.mutate,reset:this.reset})},Zd=function(i){mt.batch(()=>{var r,c,d,h,y,p,m,b;if(E(this,wa)&&this.hasListeners()){const v=E(this,us).variables,x=E(this,us).context,w={client:E(this,ja),meta:this.options.meta,mutationKey:this.options.mutationKey};if((i==null?void 0:i.type)==="success"){try{(c=(r=E(this,wa)).onSuccess)==null||c.call(r,i.data,v,x,w)}catch(N){Promise.reject(N)}try{(h=(d=E(this,wa)).onSettled)==null||h.call(d,i.data,null,v,x,w)}catch(N){Promise.reject(N)}}else if((i==null?void 0:i.type)==="error"){try{(p=(y=E(this,wa)).onError)==null||p.call(y,i.error,v,x,w)}catch(N){Promise.reject(N)}try{(b=(m=E(this,wa)).onSettled)==null||b.call(m,void 0,i.error,v,x,w)}catch(N){Promise.reject(N)}}}this.listeners.forEach(v=>{v(E(this,us))})})},$v),Fn,Wv,NS=(Wv=class extends Rl{constructor(s={}){super();de(this,Fn);this.config=s,le(this,Fn,new Map)}build(s,i,r){const c=i.queryKey,d=i.queryHash??uh(c,i);let h=this.get(d);return h||(h=new gS({client:s,queryKey:c,queryHash:d,options:s.defaultQueryOptions(i),state:r,defaultOptions:s.getQueryDefaults(c)}),this.add(h)),h}add(s){E(this,Fn).has(s.queryHash)||(E(this,Fn).set(s.queryHash,s),this.notify({type:"added",query:s}))}remove(s){const i=E(this,Fn).get(s.queryHash);i&&(s.destroy(),i===s&&E(this,Fn).delete(s.queryHash),this.notify({type:"removed",query:s}))}clear(){mt.batch(()=>{this.getAll().forEach(s=>{this.remove(s)})})}get(s){return E(this,Fn).get(s)}getAll(){return[...E(this,Fn).values()]}find(s){const i={exact:!0,...s};return this.getAll().find(r=>Tg(i,r))}findAll(s={}){const i=this.getAll();return Object.keys(s).length>0?i.filter(r=>Tg(s,r)):i}notify(s){mt.batch(()=>{this.listeners.forEach(i=>{i(s)})})}onFocus(){mt.batch(()=>{this.getAll().forEach(s=>{s.onFocus()})})}onOnline(){mt.batch(()=>{this.getAll().forEach(s=>{s.onOnline()})})}},Fn=new WeakMap,Wv),st,fs,ds,gl,vl,hs,bl,xl,e0,RS=(e0=class{constructor(n={}){de(this,st);de(this,fs);de(this,ds);de(this,gl);de(this,vl);de(this,hs);de(this,bl);de(this,xl);le(this,st,n.queryCache||new NS),le(this,fs,n.mutationCache||new jS),le(this,ds,n.defaultOptions||{}),le(this,gl,new Map),le(this,vl,new Map),le(this,hs,0)}mount(){fc(this,hs)._++,E(this,hs)===1&&(le(this,bl,ch.subscribe(async n=>{n&&(await this.resumePausedMutations(),E(this,st).onFocus())})),le(this,xl,kc.subscribe(async n=>{n&&(await this.resumePausedMutations(),E(this,st).onOnline())})))}unmount(){var n,s;fc(this,hs)._--,E(this,hs)===0&&((n=E(this,bl))==null||n.call(this),le(this,bl,void 0),(s=E(this,xl))==null||s.call(this),le(this,xl,void 0))}isFetching(n){return E(this,st).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return E(this,fs).findAll({...n,status:"pending"}).length}getQueryData(n){var i;const s=this.defaultQueryOptions({queryKey:n});return(i=E(this,st).get(s.queryHash))==null?void 0:i.state.data}ensureQueryData(n){const s=this.defaultQueryOptions(n),i=E(this,st).build(this,s),r=i.state.data;return r===void 0?this.fetchQuery(n):(n.revalidateIfStale&&i.isStaleByTime(gs(s.staleTime,i))&&this.prefetchQuery(s),Promise.resolve(r))}getQueriesData(n){return E(this,st).findAll(n).map(({queryKey:s,state:i})=>{const r=i.data;return[s,r]})}setQueryData(n,s,i){const r=this.defaultQueryOptions({queryKey:n}),c=E(this,st).get(r.queryHash),d=c==null?void 0:c.state.data,h=iS(s,d);if(h!==void 0)return E(this,st).build(this,r).setData(h,{...i,manual:!0})}setQueriesData(n,s,i){return mt.batch(()=>E(this,st).findAll(n).map(({queryKey:r})=>[r,this.setQueryData(r,s,i)]))}getQueryState(n){var i;const s=this.defaultQueryOptions({queryKey:n});return(i=E(this,st).get(s.queryHash))==null?void 0:i.state}removeQueries(n){const s=E(this,st);mt.batch(()=>{s.findAll(n).forEach(i=>{s.remove(i)})})}resetQueries(n,s){const i=E(this,st);return mt.batch(()=>(i.findAll(n).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...n},s)))}cancelQueries(n,s={}){const i={revert:!0,...s},r=mt.batch(()=>E(this,st).findAll(n).map(c=>c.cancel(i)));return Promise.all(r).then(Dt).catch(Dt)}invalidateQueries(n,s={}){return mt.batch(()=>(E(this,st).findAll(n).forEach(i=>{i.invalidate()}),(n==null?void 0:n.refetchType)==="none"?Promise.resolve():this.refetchQueries({...n,type:(n==null?void 0:n.refetchType)??(n==null?void 0:n.type)??"active"},s)))}refetchQueries(n,s={}){const i={...s,cancelRefetch:s.cancelRefetch??!0},r=mt.batch(()=>E(this,st).findAll(n).filter(c=>!c.isDisabled()&&!c.isStatic()).map(c=>{let d=c.fetch(void 0,i);return i.throwOnError||(d=d.catch(Dt)),c.state.fetchStatus==="paused"?Promise.resolve():d}));return Promise.all(r).then(Dt)}fetchQuery(n){const s=this.defaultQueryOptions(n);s.retry===void 0&&(s.retry=!1);const i=E(this,st).build(this,s);return i.isStaleByTime(gs(s.staleTime,i))?i.fetch(s):Promise.resolve(i.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(Dt).catch(Dt)}fetchInfiniteQuery(n){return n._type="infinite",this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(Dt).catch(Dt)}ensureInfiniteQueryData(n){return n._type="infinite",this.ensureQueryData(n)}resumePausedMutations(){return kc.isOnline()?E(this,fs).resumePausedMutations():Promise.resolve()}getQueryCache(){return E(this,st)}getMutationCache(){return E(this,fs)}getDefaultOptions(){return E(this,ds)}setDefaultOptions(n){le(this,ds,n)}setQueryDefaults(n,s){E(this,gl).set(ci(n),{queryKey:n,defaultOptions:s})}getQueryDefaults(n){const s=[...E(this,gl).values()],i={};return s.forEach(r=>{Ar(n,r.queryKey)&&Object.assign(i,r.defaultOptions)}),i}setMutationDefaults(n,s){E(this,vl).set(ci(n),{mutationKey:n,defaultOptions:s})}getMutationDefaults(n){const s=[...E(this,vl).values()],i={};return s.forEach(r=>{Ar(n,r.mutationKey)&&Object.assign(i,r.defaultOptions)}),i}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=uh(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===dh&&(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,st).clear(),E(this,fs).clear()}},st=new WeakMap,fs=new WeakMap,ds=new WeakMap,gl=new WeakMap,vl=new WeakMap,hs=new WeakMap,bl=new WeakMap,xl=new WeakMap,e0),cd={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 Bg;function _S(){if(Bg)return ve;Bg=1;var n=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),i=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(T){return T===null||typeof T!="object"?null:(T=x&&T[x]||T["@@iterator"],typeof T=="function"?T:null)}var N={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},R=Object.assign,j={};function k(T,I,ae){this.props=T,this.context=I,this.refs=j,this.updater=ae||N}k.prototype.isReactComponent={},k.prototype.setState=function(T,I){if(typeof T!="object"&&typeof T!="function"&&T!=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,T,I,"setState")},k.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function A(){}A.prototype=k.prototype;function B(T,I,ae){this.props=T,this.context=I,this.refs=j,this.updater=ae||N}var C=B.prototype=new A;C.constructor=B,R(C,k.prototype),C.isPureReactComponent=!0;var Q=Array.isArray;function U(){}var z={H:null,A:null,T:null,S:null},O=Object.prototype.hasOwnProperty;function Y(T,I,ae){var se=ae.ref;return{$$typeof:n,type:T,key:I,ref:se!==void 0?se:null,props:ae}}function $(T,I){return Y(T.type,I,T.props)}function W(T){return typeof T=="object"&&T!==null&&T.$$typeof===n}function Z(T){var I={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(ae){return I[ae]})}var te=/\/+/g;function ee(T,I){return typeof T=="object"&&T!==null&&T.key!=null?Z(""+T.key):I.toString(36)}function he(T){switch(T.status){case"fulfilled":return T.value;case"rejected":throw T.reason;default:switch(typeof T.status=="string"?T.then(U,U):(T.status="pending",T.then(function(I){T.status==="pending"&&(T.status="fulfilled",T.value=I)},function(I){T.status==="pending"&&(T.status="rejected",T.reason=I)})),T.status){case"fulfilled":return T.value;case"rejected":throw T.reason}}throw T}function L(T,I,ae,se,ie){var me=typeof T;(me==="undefined"||me==="boolean")&&(T=null);var Ee=!1;if(T===null)Ee=!0;else switch(me){case"bigint":case"string":case"number":Ee=!0;break;case"object":switch(T.$$typeof){case n:case s:Ee=!0;break;case b:return Ee=T._init,L(Ee(T._payload),I,ae,se,ie)}}if(Ee)return ie=ie(T),Ee=se===""?"."+ee(T,0):se,Q(ie)?(ae="",Ee!=null&&(ae=Ee.replace(te,"$&/")+"/"),L(ie,I,ae,"",function(pn){return pn})):ie!=null&&(W(ie)&&(ie=$(ie,ae+(ie.key==null||T&&T.key===ie.key?"":(""+ie.key).replace(te,"$&/")+"/")+Ee)),I.push(ie)),1;Ee=0;var Pe=se===""?".":se+":";if(Q(T))for(var ge=0;ge<T.length;ge++)se=T[ge],me=Pe+ee(se,ge),Ee+=L(se,I,ae,me,ie);else if(ge=w(T),typeof ge=="function")for(T=ge.call(T),ge=0;!(se=T.next()).done;)se=se.value,me=Pe+ee(se,ge++),Ee+=L(se,I,ae,me,ie);else if(me==="object"){if(typeof T.then=="function")return L(he(T),I,ae,se,ie);throw I=String(T),Error("Objects are not valid as a React child (found: "+(I==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":I)+"). If you meant to render a collection of children, use an array instead.")}return Ee}function K(T,I,ae){if(T==null)return T;var se=[],ie=0;return L(T,se,"","",function(me){return I.call(ae,me,ie++)}),se}function ue(T){if(T._status===-1){var I=T._result;I=I(),I.then(function(ae){(T._status===0||T._status===-1)&&(T._status=1,T._result=ae)},function(ae){(T._status===0||T._status===-1)&&(T._status=2,T._result=ae)}),T._status===-1&&(T._status=0,T._result=I)}if(T._status===1)return T._result.default;throw T._result}var Oe=typeof reportError=="function"?reportError:function(T){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var I=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof T=="object"&&T!==null&&typeof T.message=="string"?String(T.message):String(T),error:T});if(!window.dispatchEvent(I))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",T);return}console.error(T)},ne={map:K,forEach:function(T,I,ae){K(T,function(){I.apply(this,arguments)},ae)},count:function(T){var I=0;return K(T,function(){I++}),I},toArray:function(T){return K(T,function(I){return I})||[]},only:function(T){if(!W(T))throw Error("React.Children.only expected to receive a single React element child.");return T}};return ve.Activity=v,ve.Children=ne,ve.Component=k,ve.Fragment=i,ve.Profiler=c,ve.PureComponent=B,ve.StrictMode=r,ve.Suspense=p,ve.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=z,ve.__COMPILER_RUNTIME={__proto__:null,c:function(T){return z.H.useMemoCache(T)}},ve.cache=function(T){return function(){return T.apply(null,arguments)}},ve.cacheSignal=function(){return null},ve.cloneElement=function(T,I,ae){if(T==null)throw Error("The argument must be a React element, but you passed "+T+".");var se=R({},T.props),ie=T.key;if(I!=null)for(me in I.key!==void 0&&(ie=""+I.key),I)!O.call(I,me)||me==="key"||me==="__self"||me==="__source"||me==="ref"&&I.ref===void 0||(se[me]=I[me]);var me=arguments.length-2;if(me===1)se.children=ae;else if(1<me){for(var Ee=Array(me),Pe=0;Pe<me;Pe++)Ee[Pe]=arguments[Pe+2];se.children=Ee}return Y(T.type,ie,se)},ve.createContext=function(T){return T={$$typeof:h,_currentValue:T,_currentValue2:T,_threadCount:0,Provider:null,Consumer:null},T.Provider=T,T.Consumer={$$typeof:d,_context:T},T},ve.createElement=function(T,I,ae){var se,ie={},me=null;if(I!=null)for(se in I.key!==void 0&&(me=""+I.key),I)O.call(I,se)&&se!=="key"&&se!=="__self"&&se!=="__source"&&(ie[se]=I[se]);var Ee=arguments.length-2;if(Ee===1)ie.children=ae;else if(1<Ee){for(var Pe=Array(Ee),ge=0;ge<Ee;ge++)Pe[ge]=arguments[ge+2];ie.children=Pe}if(T&&T.defaultProps)for(se in Ee=T.defaultProps,Ee)ie[se]===void 0&&(ie[se]=Ee[se]);return Y(T,me,ie)},ve.createRef=function(){return{current:null}},ve.forwardRef=function(T){return{$$typeof:y,render:T}},ve.isValidElement=W,ve.lazy=function(T){return{$$typeof:b,_payload:{_status:-1,_result:T},_init:ue}},ve.memo=function(T,I){return{$$typeof:m,type:T,compare:I===void 0?null:I}},ve.startTransition=function(T){var I=z.T,ae={};z.T=ae;try{var se=T(),ie=z.S;ie!==null&&ie(ae,se),typeof se=="object"&&se!==null&&typeof se.then=="function"&&se.then(U,Oe)}catch(me){Oe(me)}finally{I!==null&&ae.types!==null&&(I.types=ae.types),z.T=I}},ve.unstable_useCacheRefresh=function(){return z.H.useCacheRefresh()},ve.use=function(T){return z.H.use(T)},ve.useActionState=function(T,I,ae){return z.H.useActionState(T,I,ae)},ve.useCallback=function(T,I){return z.H.useCallback(T,I)},ve.useContext=function(T){return z.H.useContext(T)},ve.useDebugValue=function(){},ve.useDeferredValue=function(T,I){return z.H.useDeferredValue(T,I)},ve.useEffect=function(T,I){return z.H.useEffect(T,I)},ve.useEffectEvent=function(T){return z.H.useEffectEvent(T)},ve.useId=function(){return z.H.useId()},ve.useImperativeHandle=function(T,I,ae){return z.H.useImperativeHandle(T,I,ae)},ve.useInsertionEffect=function(T,I){return z.H.useInsertionEffect(T,I)},ve.useLayoutEffect=function(T,I){return z.H.useLayoutEffect(T,I)},ve.useMemo=function(T,I){return z.H.useMemo(T,I)},ve.useOptimistic=function(T,I){return z.H.useOptimistic(T,I)},ve.useReducer=function(T,I,ae){return z.H.useReducer(T,I,ae)},ve.useRef=function(T){return z.H.useRef(T)},ve.useState=function(T){return z.H.useState(T)},ve.useSyncExternalStore=function(T,I,ae){return z.H.useSyncExternalStore(T,I,ae)},ve.useTransition=function(){return z.H.useTransition()},ve.version="19.2.6",ve}var qg;function Vr(){return qg||(qg=1,cd.exports=_S()),cd.exports}var V=Vr();const kr=J1(V);var f0=V.createContext(void 0),Jn=n=>{const s=V.useContext(f0);if(!s)throw new Error("No QueryClient set, use QueryClientProvider to set one");return s},ES=({client:n,children:s})=>(V.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),u.jsx(f0.Provider,{value:n,children:s})),d0=V.createContext(!1),CS=()=>V.useContext(d0);d0.Provider;function TS(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var MS=V.createContext(TS()),AS=()=>V.useContext(MS),OS=(n,s,i)=>{const r=i!=null&&i.state.error&&typeof n.throwOnError=="function"?hh(n.throwOnError,[i.state.error,i]):n.throwOnError;(n.suspense||n.experimental_prefetchInRender||r)&&(s.isReset()||(n.retryOnMount=!1))},kS=n=>{V.useEffect(()=>{n.clearReset()},[n])},zS=({result:n,errorResetBoundary:s,throwOnError:i,query:r,suspense:c})=>n.isError&&!s.isReset()&&!n.isFetching&&r&&(c&&n.data===void 0||hh(i,[n.error,r])),DS=n=>{if(n.suspense){const i=c=>c==="static"?c:Math.max(c??1e3,1e3),r=n.staleTime;n.staleTime=typeof r=="function"?(...c)=>i(r(...c)):i(r),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},US=(n,s)=>n.isLoading&&n.isFetching&&!s,LS=(n,s)=>(n==null?void 0:n.suspense)&&s.isPending,Hg=(n,s,i)=>s.fetchOptimistic(n).catch(()=>{i.clearReset()});function BS(n,s,i){var w,N,R,j;const r=CS(),c=AS(),d=Jn(),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,DS(h),OS(h,c,y),kS(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(k=>{const A=x?b.subscribe(mt.batchCalls(k)):Dt;return b.updateResult(),A},[b,x]),()=>b.getCurrentResult(),()=>b.getCurrentResult()),V.useEffect(()=>{b.setOptions(h)},[h,b]),LS(h,v))throw Hg(h,b,c);if(zS({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()&&US(v,r)){const k=m?Hg(h,b,c):y==null?void 0:y.promise;k==null||k.catch(Dt).finally(()=>{b.updateResult()})}return h.notifyOnChangeProps?v:b.trackResult(v)}function tt(n,s){return BS(n,vS)}function hn(n,s){const i=Jn(),[r]=V.useState(()=>new wS(i,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(Dt)},[r]);if(c.error&&hh(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 ud(n){const s=V.useRef({value:n,prev:null}),i=s.current.value;return n!==i&&(s.current={value:n,prev:i}),s.current.prev}function qS(n,s,i={},r={}){V.useEffect(()=>{if(!n.current||r.disabled||typeof IntersectionObserver!="function")return;const c=new IntersectionObserver(([d])=>{s(d)},i);return c.observe(n.current),()=>{c.disconnect()}},[s,i,r.disabled,n])}function HS(n){const s=V.useRef(null);return V.useImperativeHandle(n,()=>s.current,[]),s}const h0=!1;function zr(n){return n[n.length-1]}function QS(n){return typeof n=="function"}function Fs(n,s){return QS(n)?n(s):n}const m0=Object.prototype.hasOwnProperty,Qg=Object.prototype.propertyIsEnumerable;function p0(n){for(const s in n)if(m0.call(n,s))return!0;return!1}const GS=()=>Object.create(null),Vs=(n,s)=>ms(n,s,GS);function ms(n,s,i=()=>({}),r=0){if(n===s)return n;if(r>500)return s;const c=s,d=Pg(n)&&Pg(c);if(!d&&!(zc(n)&&zc(c)))return c;const h=d?n:Gg(n);if(!h)return c;const y=d?c:Gg(c);if(!y)return c;const p=h.length,m=y.length,b=d?new Array(m):i();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:m0.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,i,r+1);b[w]=j,j===N&&v++}return p===m&&v===p?n:b}function Gg(n){const s=Object.getOwnPropertyNames(n);for(const c of s)if(!Qg.call(n,c))return!1;const i=Object.getOwnPropertySymbols(n);if(i.length===0)return s;const r=s;for(const c of i){if(!Qg.call(n,c))return!1;r.push(c)}return r}function zc(n){if(!Vg(n))return!1;const s=n.constructor;if(typeof s>"u")return!0;const i=s.prototype;return!(!Vg(i)||!i.hasOwnProperty("isPrototypeOf"))}function Vg(n){return Object.prototype.toString.call(n)==="[object Object]"}function Pg(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function li(n,s,i){if(n===s)return!0;if(typeof n!=typeof s)return!1;if(Array.isArray(n)&&Array.isArray(s)){if(n.length!==s.length)return!1;for(let r=0,c=n.length;r<c;r++)if(!li(n[r],s[r],i))return!1;return!0}if(zc(n)&&zc(s)){const r=(i==null?void 0:i.ignoreUndefined)??!0;if(i!=null&&i.partial){for(const h in s)if((!r||s[h]!==void 0)&&!li(n[h],s[h],i))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],i)))return!1;return c===d}return!1}function Sl(n){let s,i;const r=new Promise((c,d)=>{s=c,i=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",i(c)},r}function Dr(n){return!!(n&&typeof n=="object"&&typeof n.then=="function")}function VS(n){return n.replace(/[\x00-\x1f\x7f]/g,"")}function Yg(n){let s;try{s=decodeURI(n)}catch{s=n.replaceAll(/%[0-9A-F]{2}/gi,i=>{try{return decodeURI(i)}catch{return i}})}return VS(s)}const PS=["http:","https:","mailto:","tel:"];function Dc(n,s){if(!n)return!1;try{const i=new URL(n);return!s.has(i.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 i=0,r="",c;for(;(c=s.exec(n))!==null;)r+=Yg(n.slice(i,c.index))+c[0],i=s.lastIndex;r=r+Yg(i?n.slice(i):n);let d=!1;return r.startsWith("//")&&(d=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:d}}function YS(n){return/\s|[^\u0000-\u007F]/.test(n)?n.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):n}function KS(n,s){if(n===s)return!0;if(n.length!==s.length)return!1;for(let i=0;i<n.length;i++)if(n[i]!==s[i])return!1;return!0}function Ra(){throw new Error("Invariant failed")}function Ur(n){const s=new Map;let i,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,i=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&&i){const p=i;s.delete(p.key),p.next&&(i=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,i||(i=p),s.set(d,p)}},clear(){s.clear(),i=void 0,r=void 0}}}const ps=4,y0=5;function XS(n){const s=n.indexOf("{");if(s===-1)return null;const i=n.indexOf("}",s);return i===-1||s+1>=n.length?null:[s,i]}function g0(n,s,i=new Uint16Array(6)){const r=n.indexOf("/",s),c=r===-1?n.length:r,d=n.substring(s,c);if(!d||!d.includes("$"))return i[0]=0,i[1]=s,i[2]=s,i[3]=c,i[4]=c,i[5]=c,i;if(d==="$"){const y=n.length;return i[0]=2,i[1]=s,i[2]=s,i[3]=y,i[4]=y,i[5]=y,i}if(d.charCodeAt(0)===36)return i[0]=1,i[1]=s,i[2]=s+1,i[3]=c,i[4]=c,i[5]=c,i;const h=XS(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 i[0]=3,i[1]=s+y,i[2]=s+b,i[3]=s+v,i[4]=s+p+1,i[5]=c,i}}else if(m===36){const b=y+1,v=y+2;return v===p?(i[0]=2,i[1]=s+y,i[2]=s+b,i[3]=s+v,i[4]=s+p+1,i[5]=n.length,i):(i[0]=1,i[1]=s+y,i[2]=s+v,i[3]=s+p,i[4]=s+p+1,i[5]=c,i)}}return i[0]=0,i[1]=s,i[2]=s,i[3]=c,i[4]=c,i[5]=c,i}function Vc(n,s,i,r,c,d,h){var p,m,b,v,x,w,N,R,j,k;h==null||h(i);let y=r;{const A=i.fullPath??i.from,B=A.length,C=((p=i.options)==null?void 0:p.caseSensitive)??n,Q=((b=(m=i.options)==null?void 0:m.params)==null?void 0:b.parse)??((v=i.options)==null?void 0:v.parseParams);for(;y<B;){const z=g0(A,y,s);let O;const Y=y,$=z[5];switch(y=$+1,d++,z[0]){case 0:{const W=A.substring(z[2],z[3]);if(C){const Z=(x=c.static)==null?void 0:x.get(W);if(Z)O=Z;else{c.static??(c.static=new Map);const te=Is(i.fullPath??i.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=Is(i.fullPath??i.from);ee.parent=c,ee.depth=d,O=ee,c.staticInsensitive.set(Z,ee)}}break}case 1:{const W=A.substring(Y,z[1]),Z=A.substring(z[4],$),te=C&&!!(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=dd(1,i.fullPath??i.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(Y,z[1]),Z=A.substring(z[4],$),te=C&&!!(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=dd(3,i.fullPath??i.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(Y,z[1]),Z=A.substring(z[4],$),te=C&&!!(W||Z),ee=W?te?W:W.toLowerCase():void 0,he=Z?te?Z:Z.toLowerCase():void 0,L=dd(2,i.fullPath??i.from,te,ee,he);O=L,L.parent=c,L.depth=d,c.wildcard??(c.wildcard=[]),c.wildcard.push(L)}}c=O}if(Q&&i.children&&!i.isRoot&&i.id&&i.id.charCodeAt(i.id.lastIndexOf("/")+1)===95){const z=Is(i.fullPath??i.from);z.kind=y0,z.parent=c,d++,z.depth=d,c.pathless??(c.pathless=[]),c.pathless.push(z),c=z}const U=(i.path||!i.children)&&!i.isRoot;if(U&&A.endsWith("/")){const z=Is(i.fullPath??i.from);z.kind=ps,z.parent=c,d++,z.depth=d,c.index=z,c=z}c.parse=Q??null,c.priority=((k=(j=i.options)==null?void 0:j.params)==null?void 0:k.priority)??0,U&&!c.route&&(c.route=i,c.fullPath=i.fullPath??i.from)}if(i.children)for(const A of i.children)Vc(n,s,A,y,c,d,h)}function fd(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,i,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(fd);for(const c of n.dynamic)ss(c)}if((i=n.optional)!=null&&i.length){n.optional.sort(fd);for(const c of n.optional)ss(c)}if((r=n.wildcard)!=null&&r.length){n.wildcard.sort(fd);for(const c of n.wildcard)ss(c)}}function Is(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 dd(n,s,i,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:i,prefix:r,suffix:c}}function ZS(n,s){const i=Is("/"),r=new Uint16Array(6);for(const c of n)Vc(!1,r,c,1,i,0);ss(i),s.masksTree=i,s.flatCache=Ur(1e3)}function FS(n,s){n||(n="/");const i=s.flatCache.get(n);if(i)return i;const r=ph(n,s.masksTree);return s.flatCache.set(n,r),r}function IS(n,s,i,r,c){n||(n="/"),r||(r="/");const d=s?`case\0${n}`:n;let h=c.singleCache.get(d);return h||(h=Is("/"),Vc(s,new Uint16Array(6),{from:n},1,h,0),c.singleCache.set(d,h)),ph(r,h,i)}function JS(n,s,i=!1){const r=i?n:`nofuzz\0${n}`,c=s.matchCache.get(r);if(c!==void 0)return c;n||(n="/");let d;try{d=ph(n,s.segmentTree,i)}catch(h){if(h instanceof URIError)d=null;else throw h}return d&&(d.branch=b0(d.route)),s.matchCache.set(r,d),d}function $S(n){return n==="/"?n:n.replace(/\/{1,}$/,"")}function WS(n,s=!1,i){const r=Is(n.fullPath),c=new Uint16Array(6),d={},h={};let y=0;return Vc(s,c,n,1,r,0,p=>{if(i==null||i(p,y),p.id in d&&Ra(),d[p.id]=p,y!==0&&p.path){const m=$S(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 ph(n,s,i=!1){const r=n.split("/"),c=tj(n,r,s,i);if(!c)return null;const[d]=v0(n,r,c);return{route:c.node.route,rawParams:d}}function v0(n,s,i){var b,v,x,w,N,R,j,k,A,B;const r=ej(i.node);let c=null;const d=Object.create(null);let h=((b=i.extract)==null?void 0:b.part)??0,y=((v=i.extract)==null?void 0:v.node)??0,p=((x=i.extract)==null?void 0:x.path)??0,m=((w=i.extract)==null?void 0:w.segment)??0;for(;y<r.length;h++,y++,p++,m++){const C=r[y];if(C.kind===ps)break;if(C.kind===y0){m--,h--,p--;continue}const Q=s[h],U=p;if(Q&&(p+=Q.length),C.kind===1){c??(c=i.node.fullPath.split("/"));const z=c[m],O=((N=C.prefix)==null?void 0:N.length)??0;if(z.charCodeAt(O)===123){const Y=((R=C.suffix)==null?void 0:R.length)??0,$=z.substring(O+2,z.length-Y-1),W=Q.substring(O,Q.length-Y);d[$]=decodeURIComponent(W)}else{const Y=z.substring(1);d[Y]=decodeURIComponent(Q)}}else if(C.kind===3){if(i.skipped&1<<y){h--,p=U-1;continue}c??(c=i.node.fullPath.split("/"));const z=c[m],O=((j=C.prefix)==null?void 0:j.length)??0,Y=((k=C.suffix)==null?void 0:k.length)??0,$=z.substring(O+3,z.length-Y-1),W=C.suffix||C.prefix?Q.substring(O,Q.length-Y):Q;W&&(d[$]=decodeURIComponent(W))}else if(C.kind===2){const z=C,O=n.substring(U+(((A=z.prefix)==null?void 0:A.length)??0),n.length-(((B=z.suffix)==null?void 0:B.length)??0)),Y=decodeURIComponent(O);d["*"]=Y,d._splat=Y;break}}return i.rawParams&&Object.assign(d,i.rawParams),[d,{part:h,node:y,path:p,segment:m}]}function b0(n){const s=[n];for(;n.parentRoute;)n=n.parentRoute,s.push(n);return s.reverse(),s}function ej(n){const s=Array(n.depth+1);do s[n.depth]=n,n=n.parent;while(n);return s}function tj(n,s,i,r){if(n==="/"&&i.index)return{node:i.index,skipped:0};const c=!zr(s),d=c&&n!=="/",h=s.length-(c?1:0),y=[{node:i,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:k}=b;let{extract:A,rawParams:B}=b;if(v.kind===2&&v.route&&!mc(m,b))continue;if(v.parse){if(!Kg(n,s,b))continue;B=b.rawParams,A=b.extract}r&&v.route&&v.kind!==ps&&mc(p,b)&&(p=b);const C=x===h;if(C&&(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=C?void 0:s[x];let U;if(C&&v.index){const z={node:v.index,index:x,skipped:w,depth:N+1,statics:R,dynamics:j,optionals:k,extract:A,rawParams:B};let O=!0;if(v.index.parse&&(Kg(n,s,z)||(O=!1)),O){if(!j&&!k&&!w&&nj(R,h))return z;mc(m,z)&&(m=z)}}if(v.wildcard)for(let z=v.wildcard.length-1;z>=0;z--){const O=v.wildcard[z],{prefix:Y,suffix:$}=O;if(!(Y&&(C||!(O.caseSensitive?Q:U??(U=Q.toLowerCase())).startsWith(Y)))){if($){if(C)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:k,extract:A,rawParams:B})}}if(v.optional){const z=w|1<<N,O=N+1;for(let Y=v.optional.length-1;Y>=0;Y--){const $=v.optional[Y];y.push({node:$,index:x,skipped:z,depth:O,statics:R,dynamics:j,optionals:k,extract:A,rawParams:B})}if(!C)for(let Y=v.optional.length-1;Y>=0;Y--){const $=v.optional[Y],{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:k+hc(h,x),extract:A,rawParams:B})}}if(!C&&v.dynamic&&Q)for(let z=v.dynamic.length-1;z>=0;z--){const O=v.dynamic[z],{prefix:Y,suffix:$}=O;if(Y||$){const W=O.caseSensitive?Q:U??(U=Q.toLowerCase());if(Y&&!W.startsWith(Y)||$&&!W.endsWith($))continue}y.push({node:O,index:x+1,skipped:w,depth:N+1,statics:R,dynamics:j+hc(h,x),optionals:k,extract:A,rawParams:B})}if(!C&&v.staticInsensitive){const z=v.staticInsensitive.get(U??(U=Q.toLowerCase()));z&&y.push({node:z,index:x+1,skipped:w,depth:N+1,statics:R+hc(h,x),dynamics:j,optionals:k,extract:A,rawParams:B})}if(!C&&v.static){const z=v.static.get(Q);z&&y.push({node:z,index:x+1,skipped:w,depth:N+1,statics:R+hc(h,x),dynamics:j,optionals:k,extract:A,rawParams:B})}if(v.pathless){const z=N+1;for(let O=v.pathless.length-1;O>=0;O--){const Y=v.pathless[O];y.push({node:Y,index:x,skipped:w,depth:z,statics:R,dynamics:j,optionals:k,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 nj(n,s){return n===2**(s-1)-1}function Kg(n,s,i){let r,c;try{[r,c]=v0(n,s,i)}catch{return null}if(i.rawParams=r,i.extract=c,!i.node.parse)return!0;try{if(i.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 yh(n.filter(s=>s!==void 0).join("/"))}function yh(n){return n.replace(/\/{2,}/g,"/")}function x0(n){return n==="/"?n:n.replace(/^\/{1,}/,"")}function Na(n){const s=n.length;return s>1&&n[s-1]==="/"?n.replace(/\/{1,}$/,""):n}function S0(n){return Na(x0(n))}function Uc(n,s){return n!=null&&n.endsWith("/")&&n!=="/"&&n!==`${s}/`?n.slice(0,-1):n}function aj(n,s,i){return Uc(n,i)===Uc(s,i)}function sj({base:n,to:s,trailingSlash:i="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&&zr(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&&(zr(y)===""?i==="never"&&y.pop():i==="always"&&y.push(""));const p=yh(y.join("/"))||"/";return h&&r&&r.set(h,p),p}function ij(n){const s=new Map(n.map(c=>[encodeURIComponent(c),c])),i=Array.from(s.keys()).map(c=>c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(i,"g");return c=>c.replace(r,d=>s.get(d)??d)}function hd(n,s,i){const r=s[n];return typeof r!="string"?r:n==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split("/").map(c=>Zg(c,i)).join("/"):Zg(r,i)}function Xg({path:n,params:s,decoder:i,...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=g0(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=hd("_splat",s,i);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=hd(w,s,i)??"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),k=hd(w,s,i)??"";m+="/"+R+k+j;continue}}return n.endsWith("/")&&(m+="/"),{usedParams:d,interpolatedPath:m||"/",isMissingParams:c}}function Zg(n,s){const i=encodeURIComponent(n);return(s==null?void 0:s(i))??i}function Mt(n){return(n==null?void 0:n.isNotFound)===!0}function lj(n,s=String){const i=new URLSearchParams;for(const r in n){const c=n[r];c!==void 0&&i.set(r,s(c))}return i.toString()}function md(n){return n?n==="false"?!1:n==="true"?!0:+n*0===0&&+n+""===n?+n:n:""}function rj(n){const s=new URLSearchParams(n),i=Object.create(null);for(const[r,c]of s.entries()){const d=i[r];d==null?i[r]=md(c):Array.isArray(d)?d.push(md(c)):i[r]=[d,md(c)]}return i}const oj=uj(JSON.parse),cj=fj(JSON.stringify,JSON.parse);function uj(n){return s=>{s[0]==="?"&&(s=s.substring(1));const i=rj(s);for(const r in i){const c=i[r];if(typeof c=="string")try{i[r]=n(c)}catch{}}return i}}function fj(n,s){const i=typeof s=="function";function r(c){if(typeof c=="object"&&c!==null)try{return n(c)}catch{}else if(i&&typeof c=="string")try{return s(c),n(c)}catch{}return c}return c=>{const d=lj(c,r);return d?`?${d}`:""}}const ri="__root__";function dj(n){if(n.statusCode=n.statusCode||n.code||307,!n._builtLocation&&!n.reloadDocument&&typeof n.href=="string")try{new URL(n.href),n.reloadDocument=!0}catch{}const s=new Headers(n.headers);n.href&&s.get("Location")===null&&s.set("Location",n.href);const i=new Response(null,{status:n.statusCode,headers:s});if(i.options=n,n.throw)throw i;return i}function Jt(n){return n instanceof Response&&!!n.options}const Fd=n=>{var s;if(!n.rendered)return n.rendered=!0,(s=n.onReady)==null?void 0:s.call(n)},hj=n=>n.stores.matchesId.get().some(s=>{var i;return(i=n.stores.matchStores.get(s))==null?void 0:i.get()._forcePending}),Pc=(n,s)=>!!(n.preload&&!n.router.stores.matchStores.has(s)),oi=(n,s,i=!0)=>{const r={...n.router.options.context??{}},c=i?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},Fg=(n,s)=>{if(!n.matches.length)return;const i=s.routeId,r=n.matches.findIndex(h=>h.routeId===n.router.routeTree.id),c=r>=0?r:0;let d=i?n.matches.findIndex(h=>h.routeId===i):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 i?d:c},ys=(n,s,i)=>{var r,c,d;if(!(!Jt(i)&&!Mt(i)))throw Jt(i)&&i.redirectHandled&&!i.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=i,n.updateMatch(s.id,h=>({...h,status:Jt(i)?"redirected":Mt(i)?"notFound":h.status==="pending"?"success":h.status,context:oi(n,s.index),isFetching:!1,error:i})),Mt(i)&&!i.routeId&&(i.routeId=s.routeId),(d=s._nonReactive.loadPromise)==null||d.resolve()),Jt(i)&&(n.rendered=!0,i.options._fromLocation=n.location,i.redirectHandled=!0,i=n.router.resolveRedirect(i))),i},j0=(n,s)=>{const i=n.router.getMatch(s);return!!(!i||i._nonReactive.dehydrated)},Ig=(n,s,i)=>{const r=oi(n,i);n.updateMatch(s,c=>({...c,context:r}))},jr=(n,s,i)=>{var h,y;const{id:r,routeId:c}=n.matches[s],d=n.router.looseRoutesById[c];if(i instanceof Promise)throw i;n.firstBadMatchIndex??(n.firstBadMatchIndex=s),ys(n,n.router.getMatch(r),i);try{(y=(h=d.options).onError)==null||y.call(h,i)}catch(p){i=p,ys(n,n.router.getMatch(r),i)}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:i,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}}),!n.preload&&!Jt(i)&&!Mt(i)&&(n.serialError??(n.serialError=i))},w0=(n,s,i,r)=>{var d;if(r._nonReactive.pendingTimeout!==void 0)return;const c=i.options.pendingMs??n.router.options.defaultPendingMs;if(n.onReady&&!Pc(n,s)&&(i.options.loader||i.options.beforeLoad||R0(i))&&typeof c=="number"&&c!==1/0&&(i.options.pendingComponent??((d=n.router.options)==null?void 0:d.defaultPendingComponent))){const h=setTimeout(()=>{Fd(n)},c);r._nonReactive.pendingTimeout=h}},mj=(n,s,i)=>{const r=n.router.getMatch(s);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;w0(n,s,i,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()},pj=(n,s,i,r)=>{const c=n.router.getMatch(s);let d=c._nonReactive.loadPromise;c._nonReactive.loadPromise=Sl(()=>{d==null||d.resolve(),d=void 0});const{paramsError:h,searchError:y}=c;h&&jr(n,i,h),y&&jr(n,i,y),w0(n,s,r,c);const p=new AbortController;let m=!1;const b=()=>{m||(m=!0,n.updateMatch(s,C=>({...C,isFetching:"beforeLoad",fetchCount:C.fetchCount+1,abortController:p})))},v=()=>{var C;(C=c._nonReactive.beforeLoadPromise)==null||C.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=Sl();const x={...oi(n,i,!1),...c.__routeContext},{search:w,params:N,cause:R}=c,j=Pc(n,s),k={search:w,abortController:p,params:N,preload:j,context:x,location:n.location,navigate:C=>n.router.navigate({...C,_fromLocation:n.location}),buildLocation:n.router.buildLocation,cause:j?"preload":R,matches:n.matches,routeId:r.id,...n.router.options.additionalContext},A=C=>{if(C===void 0){n.router.batch(()=>{b(),v()});return}(Jt(C)||Mt(C))&&(b(),jr(n,i,C)),n.router.batch(()=>{b(),n.updateMatch(s,Q=>({...Q,__beforeLoadContext:C})),v()})};let B;try{if(B=r.options.beforeLoad(k),Dr(B))return b(),B.catch(C=>{jr(n,i,C)}).then(A)}catch(C){b(),jr(n,i,C)}A(B)},yj=(n,s)=>{const{id:i,routeId:r}=n.matches[s],c=n.router.looseRoutesById[r],d=()=>y(),h=()=>pj(n,i,s,c),y=()=>{if(j0(n,i))return;const p=mj(n,i,c);return Dr(p)?p.then(h):h()};return d()},gj=(n,s,i)=>{var d,h,y,p,m,b;const r=n.router.getMatch(s);if(!r||!i.options.head&&!i.options.scripts&&!i.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=i.options).head)==null?void 0:h.call(d,c),(p=(y=i.options).scripts)==null?void 0:p.call(y,c),(b=(m=i.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}))},N0=(n,s,i,r,c)=>{const d=s[r-1],{params:h,loaderDeps:y,abortController:p,cause:m}=n.router.getMatch(i),b=oi(n,r),v=Pc(n,i);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}},Jg=async(n,s,i,r,c)=>{var d,h,y,p,m;try{const b=n.router.getMatch(i);try{(!(h0??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(N0(n,s,i,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(i,j=>({...j,isFetching:"loader"})),x){const j=N?await w:w;ys(n,n.router.getMatch(i),j),j!==void 0&&n.updateMatch(i,k=>({...k,loaderData:j}))}c._lazyPromise&&await c._lazyPromise;const R=b._nonReactive.minPendingPromise;R&&await R,c._componentsPromise&&await c._componentsPromise,n.updateMatch(i,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(i,N=>({...N,status:N.status==="pending"?"success":N.status,isFetching:!1,context:oi(n,r)}));return}const w=b._nonReactive.minPendingPromise;w&&await w,Mt(v)&&await((y=(h=c.options.notFoundComponent)==null?void 0:h.preload)==null?void 0:y.call(h)),ys(n,n.router.getMatch(i),v);try{(m=(p=c.options).onError)==null||m.call(p,v)}catch(N){x=N,ys(n,n.router.getMatch(i),N)}!Jt(x)&&!Mt(x)&&await Lr(c,["errorComponent"]),n.updateMatch(i,N=>({...N,error:x,context:oi(n,r),status:"error",isFetching:!1}))}}catch(b){const v=n.router.getMatch(i);v&&(v._nonReactive.loaderPromise=void 0),ys(n,v,b)}},vj=async(n,s,i)=>{var w,N,R,j;async function r(k,A,B,C,Q){const U=Date.now()-A.updatedAt,z=k?Q.options.preloadStaleTime??n.router.options.defaultPreloadStaleTime??3e4:Q.options.staleTime??n.router.options.defaultStaleTime??0,O=Q.options.shouldReload,Y=typeof O=="function"?O(N0(n,s,c,i,Q)):O,{status:$,invalid:W}=C,Z=U>=z&&(!!n.forceStaleReload||C.cause==="enter"||B!==void 0&&B!==C.id);h=$==="success"&&(W||(Y??Z)),k&&Q.options.preload===!1||(h&&!n.sync&&b?(y=!0,(async()=>{var te,ee;try{await Jg(n,s,c,i,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){Jt(he)&&await n.router.navigate(he.options)}})()):$!=="success"||h?await Jg(n,s,c,i,Q):Ig(n,c,i))}const{id:c,routeId:d}=n.matches[i];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(j0(n,c)){if(!n.router.getMatch(c))return n.matches[i];Ig(n,c,i)}else{const k=n.router.getMatch(c),A=n.router.stores.matchesId.get()[i],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,C=Pc(n,c);if(k._nonReactive.loaderPromise){if(k.status==="success"&&!n.sync&&!k.preload&&b)return k;await k._nonReactive.loaderPromise;const Q=n.router.getMatch(c),U=Q._nonReactive.error||Q.error;U&&ys(n,Q,U),Q.status==="pending"&&await r(C,k,B,Q,p)}else{const Q=C&&!n.router.stores.matchStores.has(c),U=n.router.getMatch(c);U._nonReactive.loaderPromise=Sl(),Q!==U.preload&&n.updateMatch(c,z=>({...z,preload:Q})),await r(C,k,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,k=>({...k,isFetching:x,invalid:!1})),n.router.getMatch(c)):v};async function $g(n){var x,w;const s=n,i=[];hj(s.router)&&Fd(s);let r;for(let N=0;N<s.matches.length;N++){try{const R=yj(s,N);Dr(R)&&await R}catch(R){if(Jt(R))throw R;if(Mt(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?Fg(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++)i.push(vj(s,i,N));try{await Promise.all(i)}catch{const N=await Promise.allSettled(i);for(const R of N){if(R.status!=="rejected")continue;const j=R.reason;if(Jt(j))throw j;Mt(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=Fg(s,m);N===void 0&&Ra();const R=s.matches[N],j=s.router.looseRoutesById[R.routeId],k=(x=s.router.options)==null?void 0:x.defaultNotFoundComponent;!j.options.notFoundComponent&&k&&(j.options.notFoundComponent=k),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],k=s.router.looseRoutesById[j];try{const A=gj(s,R,k);if(A){const B=await A;s.updateMatch(R,C=>({...C,...B}))}}catch(A){console.error(`Error executing head for route ${j}:`,A)}}const v=Fd(s);if(Dr(v)&&await v,m)throw m;if(s.serialError&&!s.preload&&!s.onReady)throw s.serialError;return s.matches}function Wg(n,s){const i=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(i.length!==0)return Promise.all(i)}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 i=()=>n._componentsLoaded?void 0:s===Rc?(()=>{if(n._componentsPromise===void 0){const r=Wg(n,Rc);r?n._componentsPromise=r.then(()=>{n._componentsLoaded=!0,n._componentsPromise=void 0}):n._componentsLoaded=!0}return n._componentsPromise})():Wg(n,s);return n._lazyPromise?n._lazyPromise.then(i):i()}function R0(n){var s;for(const i of Rc)if((s=n.options[i])!=null&&s.preload)return!0;return!1}const Rc=["component","errorComponent","pendingComponent","notFoundComponent"];function bj(n){return{input:({url:s})=>{for(const i of n)s=Id(i,s);return s},output:({url:s})=>{for(let i=n.length-1;i>=0;i--)s=_0(n[i],s);return s}}}function xj(n){const s=S0(n.basepath),i=`/${s}`,r=n.caseSensitive?i:i.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(i.length)),d},output:({url:d})=>(d.pathname=Nc(["/",s,d.pathname]),d)}}function Id(n,s){var r;const i=(r=n==null?void 0:n.input)==null?void 0:r.call(n,{url:s});if(i){if(typeof i=="string")return new URL(i);if(i instanceof URL)return i}return s}function _0(n,s){var r;const i=(r=n==null?void 0:n.output)==null?void 0:r.call(n,{url:s});if(i){if(typeof i=="string")return new URL(i);if(i instanceof URL)return i}return s}function Sj(n,s){const{createMutableStore:i,createReadonlyStore:r,batch:c,init:d}=s,h=new Map,y=new Map,p=new Map,m=i(n.status),b=i(n.loadedAt),v=i(n.isLoading),x=i(n.isTransitioning),w=i(n.location),N=i(n.resolvedLocation),R=i(n.statusCode),j=i(n.redirect),k=i([]),A=i([]),B=i([]),C=r(()=>pd(h,k.get())),Q=r(()=>pd(y,A.get())),U=r(()=>pd(p,B.get())),z=r(()=>k.get()[0]),O=r(()=>k.get().some(K=>{var ue;return((ue=h.get(K))==null?void 0:ue.get().status)==="pending"})),Y=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:C.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=k.get();for(const ne of Oe){const T=h.get(ne);if(T&&T.routeId===K)return T.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:k,pendingIds:A,cachedIds:B,matches:C,pendingMatches:Q,cachedMatches:U,firstId:z,hasPending:O,matchRouteDeps:Y,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){yd(K,h,k,i,c)}function he(K){yd(K,y,A,i,c)}function L(K){yd(K,p,B,i,c)}return te}function pd(n,s){const i=[];for(const r of s){const c=n.get(r);c&&i.push(c.get())}return i}function yd(n,s,i,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)}KS(i.get(),d)||i.set(d)})}var vs="__TSR_index",ev="popstate",tv="beforeunload";function jj(n){let s=n.getLocation();const i=new Set,r=h=>{s=n.getLocation(),i.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:i,subscribe:h=>(i.add(h),()=>{i.delete(h)}),push:(h,y,p)=>{const m=s.state[vs];y=nv(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=nv(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 nv(n,s){s||(s={});const i=gh();return{...s,key:i,__TSR_key:i,[vs]:n}}function wj(n){var O,Y;const s=typeof document<"u"?window:void 0,i=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)&&!((Y=s.history.state)!=null&&Y.key)){const $=gh();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,k;const A=()=>{j&&(z._ignoreSubscribers=!0,(j.isPush?s.history.pushState:s.history.replaceState)(j.state,"",j.href),z._ignoreSubscribers=!1,j=void 0,k=void 0,b=void 0)},B=($,W,Z)=>{const te=y(W);k||(b=m),m=Lc(W,Z),j={href:te,state:Z,isPush:(j==null?void 0:j.isPush)||$==="push"},k||(k=Promise.resolve().then(()=>A()))},C=$=>{m=p(),z.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),z.notify(L);return}}}m=p(),z.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=""},z=jj({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=i,s.history.replaceState=r,s.removeEventListener(tv,U,{capture:!0}),s.removeEventListener(ev,Q)},onBlocked:()=>{b&&m!==b&&(m=b)},getBlockers:d,setBlockers:h,notifyOnIndexChange:!1});return s.addEventListener(tv,U,{capture:!0}),s.addEventListener(ev,Q),s.history.pushState=function(...$){const W=i.apply(s.history,$);return z._ignoreSubscribers||C("PUSH"),W},s.history.replaceState=function(...$){const W=r.apply(s.history,$);return z._ignoreSubscribers||C("REPLACE"),W},z}function Nj(n){let s=n.replace(/[\x00-\x1f\x7f]/g,"");return s.startsWith("//")&&(s="/"+s.replace(/^\/+/,"")),s}function Lc(n,s){const i=Nj(n),r=i.indexOf("#"),c=i.indexOf("?"),d=gh();return{href:i,pathname:i.substring(0,r>0?c>0?Math.min(r,c):r:c>0?c:i.length),hash:r>-1?i.substring(r):"",search:c>-1?i.slice(c,r===-1?void 0:r):"",state:s||{[vs]:0,key:d,__TSR_key:d}}}function gh(){return(Math.random()+1).toString(36).substring(7)}function ll(n,s){const i=s,r=n;return{fromLocation:i,toLocation:r,pathChanged:(i==null?void 0:i.pathname)!==r.pathname,hrefChanged:(i==null?void 0:i.href)!==r.href,hashChanged:(i==null?void 0:i.hash)!==r.hash}}const Jd=new WeakMap;var Rj=class{constructor(n,s){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.routeBranchCache=new WeakMap,this.startTransition=i=>i(),this.update=i=>{var b;const r=this.options,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,...i},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=ij(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=wj()),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=Sj(Ej(this.latestLocation),v),Bj(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=S0(p);x&&x!=="/"&&v.push(xj({basepath:p})),m&&v.push(m),this.rewrite=v.length===0?void 0:v.length===1?v[0]:bj(v),this.history&&this.updateLatestLocation(),y=!0}y&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof((b=window.CSS)==null?void 0:b.supports)=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a))"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const i=WS(this.routeTree,this.options.caseSensitive,(r,c)=>{r.init({originalIndex:c})});return this.options.routeMasks&&ZS(this.options.routeMasks,i.processedTree),i},this.subscribe=(i,r)=>{const c={eventType:i,fn:r};return this.subscribers.add(c),()=>{this.subscribers.delete(c)}},this.emit=i=>{this.subscribers.forEach(r=>{r.eventType===i.type&&r.fn(i)})},this.parseLocation=(i,r)=>{const c=({pathname:p,search:m,hash:b,href:v,state:x})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(p)){const k=this.options.parseSearch(m),A=this.options.stringifySearch(k);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,k),hash:Sr(b.slice(1)).path,state:ms(r==null?void 0:r.state,x)}}const w=new URL(v,this.origin),N=Id(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(i),{__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=(i,r)=>sj({base:i,to:r.includes("//")?yh(r):r,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(i,r,c)=>typeof i=="string"?this.matchRoutesInternal({pathname:i,search:r},c):this.matchRoutesInternal(i,r),this.getMatchedRoutes=i=>Cj({pathname:i,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=i=>{const r=this.getMatch(i);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(i=>{this.cancelMatch(i)}),this.stores.matchesId.get().forEach(i=>{var c;if(this.stores.pendingMatchStores.has(i))return;const r=(c=this.stores.matchStores.get(i))==null?void 0:c.get();r&&(r.status==="pending"||r.isFetching==="loader")&&this.cancelMatch(i)})},this.buildLocation=i=>{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[Na(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&&p0(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 k=i.leaveParams?w:Sr(Xg({path:w,params:N,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let A=b;if(i._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=Tj({search:A,dest:d,destRoutes:j,_includeValidateSearch:i._includeValidateSearch}),A=Vs(b,A);const B=this.options.stringifySearch(A),C=d.hash===!0?h.hash:d.hash?Fs(d.hash,h.hash):void 0,Q=C?`#${C}`:"";let U=d.state===!0?h.state:d.state?Fs(d.state,h.state):{};U=ms(h.state,U);const z=`${k}${B}${Q}`;let O,Y,$=!1;if(this.rewrite){const te=new URL(z,this.origin),ee=_0(this.rewrite,te);O=te.href.replace(te.origin,""),ee.origin!==this.origin?(Y=ee.href,$=!0):Y=ee.pathname+ee.search+ee.hash}else O=YS(z),Y=O;return{publicHref:Y,href:O,pathname:k,search:A,searchStr:B,state:U,hash:C??"",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=FS(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:i.from,...w,params:N},p=r(h)}}}return p&&(y.maskedLocation=p),y};return i.mask?c(i,{from:i.from,...i.mask}):c(i)},this.commitLocation=async({viewTransition:i,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=Na(this.latestLocation.href)===Na(c.href);let p=this.commitLocationPromise;if(this.commitLocationPromise=Sl(()=>{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=i,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:i,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:i?v:v+1}),w=new URL(x.pathname,this.origin);p.to=Id(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:i,resetScroll:r,hashScrollIntoView:c,ignoreBlocker:h});return Promise.resolve().then(()=>{this.pendingBuiltLocation===m&&(this.pendingBuiltLocation=void 0)}),b},this.navigate=async({to:i,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(i!==void 0||!c){const v=this.buildLocation({to:i,...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:i,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const i=this.matchRoutes(this.latestLocation),r=this.stores.cachedMatches.get().filter(c=>!i.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(i),this.stores.setCached(r)})},this.load=async i=>{var m;const r=(m=i==null?void 0:i.action)==null?void 0:m.type;let 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=ll(x,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...w}),this.emit({type:"onBeforeLoad",...w}),await $g({router:this,sync:i==null?void 0:i.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,k=null;this.batch(()=>{const C=this.stores.pendingMatches.get(),Q=C.length,U=this.stores.matches.get();N=Q?U.filter(Y=>!this.stores.pendingMatchStores.has(Y.id)):null;const z=new Set;for(const Y of this.stores.pendingMatchStores.values())Y.routeId&&z.add(Y.routeId);const O=new Set;for(const Y of this.stores.matchStores.values())Y.routeId&&O.add(Y.routeId);R=Q?U.filter(Y=>!z.has(Y.routeId)):null,j=Q?C.filter(Y=>!O.has(Y.routeId)):null,k=Q?C.filter(Y=>O.has(Y.routeId)):U,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),Q&&(this.stores.setMatches(C),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...N.filter(Y=>Y.status!=="error"&&Y.status!=="notFound"&&Y.status!=="redirected")]),this.clearExpiredCache())});for(const[C,Q]of[[R,"onLeave"],[j,"onEnter"],[k,"onStay"]])if(C)for(const U of C)(B=(A=this.looseRoutesById[U.routeId].options)[Q])==null||B.call(A,U)})})}})}catch(x){Jt(x)?(c=x,this.navigate({...c.options,replace:!0,ignoreBlocker:!0})):Mt(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=i=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let c;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const d=this.latestLocation,h=this.stores.resolvedLocation.get(),y=typeof r.types=="function"?r.types(ll(d,h)):r.types;if(y===!1){i();return}c={update:i,types:y}}else c=i;document.startViewTransition(c)}else i()},this.updateMatch=(i,r)=>{this.startTransition(()=>{const c=this.stores.pendingMatchStores.get(i);if(c){c.set(r);return}const d=this.stores.matchStores.get(i);if(d){d.set(r);return}const h=this.stores.cachedMatchStores.get(i);if(h){const y=r(h.get());y.status==="redirected"?this.stores.cachedMatchStores.delete(i)&&this.stores.cachedIds.set(p=>p.filter(m=>m!==i)):h.set(y)}})},this.getMatch=i=>{var r,c,d;return((r=this.stores.cachedMatchStores.get(i))==null?void 0:r.get())??((c=this.stores.pendingMatchStores.get(i))==null?void 0:c.get())??((d=this.stores.matchStores.get(i))==null?void 0:d.get())},this.invalidate=i=>{const r=c=>{var d;return((d=i==null?void 0:i.filter)==null?void 0:d.call(i,c))??!0?{...c,invalid:!0,...i!=null&&i.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:i==null?void 0:i.sync})},this.getParsedLocationHref=i=>i.publicHref||"/",this.resolveRedirect=i=>{const r=i.headers.get("Location");if(!i.options.href||i.options._builtLocation){const c=i.options._builtLocation??this.buildLocation(i.options),d=this.getParsedLocationHref(c);i.options.href=d,i.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;i.options.href=d,i.headers.set("Location",d)}}catch{}if(i.options.href&&!i.options._builtLocation&&Dc(i.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return i.headers.get("Location")||i.headers.set("Location",i.options.href),i},this.clearCache=i=>{const r=i==null?void 0:i.filter;r!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(c=>!r(c))):this.stores.setCached([])},this.clearExpiredCache=()=>{const i=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:i-c.updatedAt>=h};this.clearCache({filter:r})},this.loadRouteChunk=Lr,this.preloadRoute=async i=>{const r=i._builtLocation??this.buildLocation(i);let c=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:i});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 $g({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(Jt(p))return p.options.reloadDocument?void 0:await this.preloadRoute({...p.options,_fromLocation:r});Mt(p)||console.error(p);return}},this.matchRoute=(i,r)=>{const c={...i,to:i.to?this.resolvePathWithBase(i.from||"",i.to):void 0,params:i.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=IS(d.pathname,(r==null?void 0:r.caseSensitive)??!1,(r==null?void 0:r.fuzzy)??!1,h.pathname,this.processedTree);return!y||i.params&&!li(y.rawParams,i.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(i=>i.status==="notFound"||i.globalNotFound),this.getStoreConfig=s,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...n,caseSensitive:n.caseSensitive??!1,notFoundMode:n.notFoundMode??"fuzzy",stringifySearch:n.stringifySearch??cj,parseSearch:n.parseSearch??oj,protocolAllowlist:n.protocolAllowlist??PS}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:n,routesByPath:s,processedTree:i}){this.routesById=n,this.routesByPath=s,this.processedTree=i;const r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(n){let s=this.routeBranchCache.get(n);return s||(s=b0(n),this.routeBranchCache.set(n,s)),s}get looseRoutesById(){return this.routesById}getParentContext(n){return n!=null&&n.id?n.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(n,s){var b,v;const i=this.getMatchedRoutes(n.pathname),{foundRoute:r,routeParams:c}=i;let{matchedRoutes:d}=i,h=!1;(r?r.path!=="/"&&c["**"]:Na(n.pathname))&&(this.options.notFoundRoute?d=[...d,this.options.notFoundRoute]:h=!0);const y=h?Aj(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,k;{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},k=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={},k=K}}const A=((v=(b=w.options).loaderDeps)==null?void 0:v.call(b,{search:R}))??"",B=A?JSON.stringify(A):"",{interpolatedPath:C,usedParams:Q}=Xg({path:w.fullPath,params:c,decoder:this.pathParamsDecoder,server:this.isServer}),U=w.id+C+B,z=this.getMatch(U),O=m.get(w.id),Y=(z==null?void 0:z._strictParams)??Q;let $;if(!z)try{av(w,Y)}catch(ee){if(Mt(ee)||Jt(ee)?$=ee:$=new _j(ee.message,{cause:ee}),s!=null&&s.throwOnError)throw $}Object.assign(c,Y);const W=O?"stay":"enter";let Z;if(z)Z={...z,cause:W,params:(O==null?void 0:O.params)??c,_strictParams:Y,search:Vs(O?O.search:z.search,R),_strictSearch:j};else{const ee=w.options.loader||w.options.beforeLoad||w.lazyFn||R0(w)?"pending":"success";Z={id:U,ssr:w.options.ssr,index:x,routeId:w.id,params:(O==null?void 0:O.params)??c,_strictParams:Y,pathname:C,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:Sl()},__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=k;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 k=p[x-1],A=this.getParentContext(k);if(N.options.context){const B={deps:w.loaderDeps,params:w.params,context:A??{},location:n,navigate:C=>this.navigate({...C,_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:i}=this.getMatchedRoutes(n.pathname),r=zr(s),c={...n.search};for(const b of s)try{Object.assign(c,_c(b.options.validateSearch,c))}catch{}const d=zr(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),i);for(const v of s)try{av(v,b)}catch{}p=b}return{matchedRoutes:s,fullPath:r.fullPath,search:c,params:p}}},Bc=class extends Error{},_j=class extends Error{};function Ej(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 i=n["~standard"].validate(s);if(i instanceof Promise)throw new Bc("Async validation not supported");if(i.issues)throw new Bc(JSON.stringify(i.issues,void 0,2),{cause:i});return i.value}return"parse"in n?n.parse(s):typeof n=="function"?n(s):{}}function Cj({pathname:n,routesById:s,processedTree:i}){const r=Object.create(null),c=Na(n);let d;const h=JS(c,i,!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 Tj({search:n,dest:s,destRoutes:i,_includeValidateSearch:r}){return Mj(i)(n,s,r??!1)}function Mj(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 i=({search:d})=>{const h=s.dest;return h.search?h.search===!0?d:Fs(h.search,d):{}};s.middlewares.push(i);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 Aj(n,s){if(n!=="root")for(let i=s.length-1;i>=0;i--){const r=s[i];if(r.children)return r.id}return ri}function av(n,s){var r;const i=((r=n.options.params)==null?void 0:r.parse)??n.options.parseParams;if(i){const c=i(s);if(c===!1)throw new Error("Route params.parse returned false for a matched route");Object.assign(s,c)}}function Oj(){try{return sessionStorage}catch{return}}const kj="tsr-scroll-restoration-v1_3",rl=Oj();function zj(){try{return JSON.parse((rl==null?void 0:rl.getItem("tsr-scroll-restoration-v1_3"))||"{}")}catch{return{}}}function Dj(){try{rl==null||rl.setItem(kj,JSON.stringify(as))}catch{}}const as=zj(),sv="data-scroll-restoration-id",Uj=n=>n.state.__TSR_key||n.href;function Lj(n){const s=n.getAttribute(sv);if(s)return`[${sv}="${s}"]`;let i="",r=n,c;for(;c=r.parentNode;){let d=1,h=r;for(;h=h.previousElementSibling;)d++;const y=`${r.localName}:nth-child(${d})`;i=i?`${y} > ${i}`:y,r=c}return i}let pc=!1;const sl="window";function $d(n){try{return typeof n=="function"?n():document.querySelector(n)}catch{}}function iv(n){const s=[];for(const i of n){if(i===sl)continue;const r=$d(i);r&&s.push(r)}return s}function Bj(n,s){if(n.options.scrollRestoration&&(n.isScrollRestoring=!0),n.isScrollRestorationSetup)return;n.isScrollRestorationSetup=!0,pc=!1;const i=n.options.getScrollRestorationKey||Uj,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(sl,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===sl?p[sl]=b:m.isConnected&&(p[Lj(m)]=b)};document.addEventListener("scroll",d,!0),n.subscribe("onBeforeLoad",y=>{y.fromLocation&&h(i(y.fromLocation)),r.clear()}),addEventListener("pagehide",()=>{h(i(n.stores.resolvedLocation.get()??n.stores.location.get())),Dj()}),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=i(y.toLocation),w=y.fromLocation&&i(y.fromLocation);if(n.isScrollRestoring&&w&&w!==x){const R=as[w];if(R){let j=as[x];for(const k in R){if(k===sl){if(b)continue}else{const A=$d(k);if(!A||b&&m&&(v??(v=iv(m)),v.includes(A)))continue}j||(j=as[x]={}),j[k]??(j[k]=R[k])}}}pc=!0;try{const R=y.toLocation.hash,j=y.toLocation.state.__hashScrollIntoViewOptions??!0;let k=!1;if(b){const A=Jd.get(y.toLocation),B=R&&j&&(A==="PUSH"||A==="REPLACE"),C=n.isScrollRestoring?as[x]:void 0;if(C)for(const Q in C){const{scrollX:U,scrollY:z}=C[Q];if(Q===sl){if(B)continue;scrollTo({top:z,left:U,behavior:p}),k=!0}else{const O=$d(Q);O&&(O.scrollLeft=U,O.scrollTop=z)}}if(!k&&!R){const Q={top:0,left:0,behavior:p};if(scrollTo(Q),m){v??(v=iv(m));for(const U of v)U.scrollTo(Q)}}}!k&&R&&j&&((N=document.getElementById(R))==null||N.scrollIntoView(j))}finally{pc=!1}})}const qj="Error preloading route! ☝️";var E0=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 i=this.options,r=!(i!=null&&i.path)&&!(i!=null&&i.id);this.parentRoute=(m=(p=this.options).getParentRoute)==null?void 0:m.call(p),r?this._path=ri:this.parentRoute||Ra();let c=r?ri:i==null?void 0:i.path;c&&c!=="/"&&(c=x0(c));const d=(i==null?void 0:i.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=Na(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=>dj({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.")}},Hj=class extends E0{constructor(n){super(n)}};function vh(n){const s=n.errorComponent??bh;return u.jsx(Qj,{getResetKey:n.getResetKey,onCatch:n.onCatch,children:({error:i,reset:r})=>i?V.createElement(s,{error:i,reset:r}):n.children})}var Qj=class extends V.Component{constructor(...n){super(...n),this.state={error:null}}static getDerivedStateFromProps(n,s){const i=n.getResetKey();return s.error&&s.resetKey!==i?{resetKey:i,error:null}:{resetKey:i}}static getDerivedStateFromError(n){return{error:n}}reset(){this.setState({error:null})}componentDidCatch(n,s){this.props.onCatch&&this.props.onCatch(n,s)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function bh({error:n}){const[s,i]=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:()=>i(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 Gj({children:n,fallback:s=null}){return C0()?u.jsx(kr.Fragment,{children:n}):u.jsx(kr.Fragment,{children:s})}function C0(){return kr.useSyncExternalStore(Vj,()=>!0,()=>!1)}function Vj(){return()=>{}}var T0=V.createContext(null);function mn(n){return V.useContext(T0)}var Yc=V.createContext(void 0),Pj=V.createContext(void 0),et=(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))(et||{});function Yj({update:n,notify:s,unwatched:i}){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&&i(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,k=j.nextSub!==void 0;if(k?(m=v.value,v=v.prev):m=j,w){if(n(b)){k&&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 Kj(n,s,i){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:i)==null?void 0:y.bind(c)}}const Wd=[];let Ec=0;const{link:lv,unlink:Xj,propagate:Zj,checkDirty:M0,shallowPropagate:rv}=Yj({update(n){return n._update()},notify(n){Wd[eh++]=n,n.flags&=~et.Watching},unwatched(n){n.depsTail!==void 0&&(n.depsTail=void 0,n.flags=et.Mutable|et.Dirty,qc(n))}});let yc=0,eh=0,Yn,th=0;function A0(n){try{++th,n()}finally{--th||O0()}}function qc(n){const s=n.depsTail;let i=s!==void 0?s.nextDep:n.deps;for(;i!==void 0;)i=Xj(i,n)}function O0(){if(!(th>0)){for(;yc<eh;){const n=Wd[yc];Wd[yc++]=void 0,n.notify()}yc=0,eh=0}}function ov(n,s){const i=typeof n=="function",r=n,c={_snapshot:i?void 0:n,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:i?et.None:et.Mutable,get(){return Yn!==void 0&&lv(c,Yn,Ec),c._snapshot},subscribe(d){const h=Kj(d),y={current:!1},p=Fj(()=>{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=Yn,y=(s==null?void 0:s.compare)??Object.is;if(i)Yn=c,++Ec,c.depsTail=void 0;else if(d===void 0)return!1;i&&(c.flags=et.Mutable|et.RecursedCheck);try{const p=c._snapshot,m=typeof d=="function"?d(p):d===void 0&&i?r(p):d;return p===void 0||!y(p,m)?(c._snapshot=m,!0):!1}finally{Yn=h,i&&(c.flags&=~et.RecursedCheck),qc(c)}}};return i?(c.flags=et.Mutable|et.Dirty,c.get=function(){const d=c.flags;if(d&et.Dirty||d&et.Pending&&M0(c.deps,c)){if(c._update()){const h=c.subs;h!==void 0&&rv(h)}}else d&et.Pending&&(c.flags=d&~et.Pending);return Yn!==void 0&&lv(c,Yn,Ec),c._snapshot}):c.set=function(d){if(c._update(d)){const h=c.subs;h!==void 0&&(Zj(h),rv(h),O0())}},c}function Fj(n){const s=()=>{const r=Yn;Yn=i,++Ec,i.depsTail=void 0,i.flags=et.Watching|et.RecursedCheck;try{return n()}finally{Yn=r,i.flags&=~et.RecursedCheck,qc(i)}},i={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:et.Watching|et.RecursedCheck,notify(){const r=this.flags;r&et.Dirty||r&et.Pending&&M0(this.deps,this)?s():this.flags=et.Watching},stop(){this.flags=et.None,this.depsTail=void 0,qc(this)}};return s(),i}var gd={exports:{}},vd={},bd={exports:{}},xd={};/**
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 cv;function Ij(){if(cv)return xd;cv=1;var n=Vr();function s(v,x){return v===x&&(v!==0||1/v===1/x)||v!==v&&x!==x}var i=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!i(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 xd.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:b,xd}var uv;function Jj(){return uv||(uv=1,bd.exports=Ij()),bd.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 fv;function $j(){if(fv)return vd;fv=1;var n=Vr(),s=Jj();function i(m,b){return m===b&&(m!==0||1/m===1/b)||m!==m&&b!==b}var r=typeof Object.is=="function"?Object.is:i,c=s.useSyncExternalStore,d=n.useRef,h=n.useEffect,y=n.useMemo,p=n.useDebugValue;return vd.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 k(U){if(!A){if(A=!0,B=U,U=x(U),w!==void 0&&R.hasValue){var z=R.value;if(w(z,U))return C=z}return C=U}if(z=C,r(B,U))return z;var O=x(U);return w!==void 0&&w(z,O)?(B=U,z):(B=U,C=O)}var A=!1,B,C,Q=v===void 0?null:v;return[function(){return k(b())},Q===null?void 0:function(){return k(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},vd}var dv;function Wj(){return dv||(dv=1,gd.exports=$j()),gd.exports}var ew=Wj();function tw(n,s){return n===s}function Wt(n,s,i=tw){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 ew.useSyncExternalStoreWithSelector(r,c,c,s,i)}var nw={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function fi(n){const s=mn(),i=V.useContext(n.from?Pj:Yc),r=n.from??i,c=r?n.from?s.stores.getRouteMatchStore(r):s.stores.matchStores.get(r):void 0,d=V.useRef(void 0);return Wt(c??nw,h=>{if((n.shouldThrow??!0)&&!h&&Ra(),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 k0(n){return fi({from:n.from,strict:n.strict,structuralSharing:n.structuralSharing,select:s=>n.select?n.select(s.loaderData):s.loaderData})}function z0(n){const{select:s,...i}=n;return fi({...i,select:r=>s?s(r.loaderDeps):r.loaderDeps})}function D0(n){return fi({from:n.from,shouldThrow:n.shouldThrow,structuralSharing:n.structuralSharing,strict:n.strict,select:s=>{const i=n.strict===!1?s.params:s._strictParams;return n.select?n.select(i):i}})}function U0(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 L0(n){const s=mn();return V.useCallback(i=>s.navigate({...i,from:i.from??(n==null?void 0:n.from)}),[n==null?void 0:n.from,s])}function B0(n){return fi({...n,select:s=>n.select?n.select(s.context):s.context})}var Sd={exports:{}},Ct={};/**
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 hv;function aw(){if(hv)return Ct;hv=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 i(){}var r={d:{f:i,r:function(){throw Error(s(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},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 Ct.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Ct.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)},Ct.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()}},Ct.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))},Ct.prefetchDNS=function(p){typeof p=="string"&&r.d.D(p)},Ct.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})}},Ct.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)},Ct.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})}},Ct.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)},Ct.requestFormReset=function(p){r.d.r(p)},Ct.unstable_batchedUpdates=function(p,m){return p(m)},Ct.useFormState=function(p,m,b){return h.H.useFormState(p,m,b)},Ct.useFormStatus=function(){return h.H.useHostTransitionStatus()},Ct.version="19.2.6",Ct}var mv;function q0(){if(mv)return Sd.exports;mv=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(),Sd.exports=aw(),Sd.exports}var sw=q0();function iw(n,s){const i=mn(),r=HS(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:k,disabled:A,style:B,className:C,onClick:Q,onBlur:U,onFocus:z,onMouseEnter:O,onMouseLeave:Y,onTouchStart:$,ignoreBlocker:W,params:Z,search:te,hash:ee,state:he,mask:L,reloadDocument:K,unsafeRelative:ue,from:Oe,_fromLocation:ne,...T}=n,I=C0(),ae=V.useMemo(()=>n,[i,n.from,n._fromLocation,n.hash,n.to,n.search,n.params,n.state,n.mask,n.unsafeRelative]),se=Wt(i.stores.location,Ye=>Ye,(Ye,bt)=>Ye.href===bt.href),ie=V.useMemo(()=>{const Ye={_fromLocation:se,...ae};return i.buildLocation(Ye)},[i,se,ae]),me=ie.maskedLocation?ie.maskedLocation.publicHref:ie.publicHref,Ee=ie.maskedLocation?ie.maskedLocation.external:ie.external,Pe=V.useMemo(()=>fw(me,Ee,i.history,A),[A,Ee,me,i.history]),ge=V.useMemo(()=>{if(Pe!=null&&Pe.external)return Dc(Pe.href,i.protocolAllowlist)?void 0:Pe.href;if(!dw(y)&&!(typeof y!="string"||y.indexOf(":")===-1))try{return new URL(y),Dc(y,i.protocolAllowlist)?void 0:y}catch{}},[y,Pe,i.protocolAllowlist]),pn=V.useMemo(()=>{if(ge)return!1;if(h!=null&&h.exact){if(!aj(se.pathname,ie.pathname,i.basepath))return!1}else{const Ye=Uc(se.pathname,i.basepath),bt=Uc(ie.pathname,i.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?I&&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,I,ie.hash,ie.pathname,ie.search,i.basepath]),Qt=pn?Fs(c,{})??lw:jd,en=pn?jd:Fs(d,{})??jd,$n=[C,Qt.className,en.className].filter(Boolean).join(" "),Ot=(B||Qt.style||en.style)&&{...B,...Qt.style,...en.style},[_l,pi]=V.useState(!1),Kr=V.useRef(!1),Wn=n.reloadDocument||ge?!1:p??i.options.defaultPreload,Ns=m??i.options.defaultPreloadDelay??0,Mn=V.useCallback(()=>{i.preloadRoute({...ae,_builtLocation:ie}).catch(Ye=>{console.warn(Ye),console.warn(qj)})},[i,ae,ie]);qS(r,V.useCallback(Ye=>{Ye!=null&&Ye.isIntersecting&&Mn()},[Mn]),uw,{disabled:!!A||Wn!=="viewport"}),V.useEffect(()=>{Kr.current||!A&&Wn==="render"&&(Mn(),Kr.current=!0)},[A,Mn,Wn]);const El=Ye=>{const bt=Ye.currentTarget.getAttribute("target"),qn=k!==void 0?k:bt;if(!A&&!hw(Ye)&&!Ye.defaultPrevented&&(!qn||qn==="_self")&&Ye.button===0){Ye.preventDefault(),sw.flushSync(()=>{pi(!0)});const yi=i.subscribe("onResolved",()=>{yi(),pi(!1)});i.navigate({...ae,replace:x,resetScroll:N,hashScrollIntoView:v,startTransition:w,viewTransition:R,ignoreBlocker:W})}};if(ge)return{...T,ref:r,href:ge,...j&&{children:j},...k&&{target:k},...A&&{disabled:A},...B&&{style:B},...C&&{className:C},...Q&&{onClick:Q},...U&&{onBlur:U},...z&&{onFocus:z},...O&&{onMouseEnter:O},...Y&&{onMouseLeave:Y},...$&&{onTouchStart:$}};const Xr=Ye=>{if(A||Wn!=="intent")return;if(!Ns){Mn();return}const bt=Ye.currentTarget;if(wr.has(bt))return;const qn=setTimeout(()=>{wr.delete(bt),Mn()},Ns);wr.set(bt,qn)},Xc=Ye=>{A||Wn!=="intent"||Mn()},Et=Ye=>{if(A||!Wn||!Ns)return;const bt=Ye.currentTarget,qn=wr.get(bt);qn&&(clearTimeout(qn),wr.delete(bt))};return{...T,...Qt,...en,href:Pe==null?void 0:Pe.href,ref:r,onClick:tl([Q,El]),onBlur:tl([U,Et]),onFocus:tl([z,Xr]),onMouseEnter:tl([O,Xr]),onMouseLeave:tl([Y,Et]),onTouchStart:tl([$,Xc]),disabled:!!A,target:k,...Ot&&{style:Ot},...$n&&{className:$n},...A&&rw,...pn&&ow,...I&&_l&&cw}}var jd={},lw={className:"active"},rw={role:"link","aria-disabled":!0},ow={"data-status":"active","aria-current":"page"},cw={"data-transitioning":"transitioning"},wr=new WeakMap,uw={rootMargin:"100px"},tl=n=>s=>{for(const i of n)if(i){if(s.defaultPrevented)return;i(s)}};function fw(n,s,i,r){if(!r)return s?{href:n,external:!0}:{href:i.createHref(n)||"/",external:!1}}function dw(n){if(typeof n!="string")return!1;const s=n.charCodeAt(0);return s===47?n.charCodeAt(1)!==47:s===46}var jl=V.forwardRef((n,s)=>{const{_asChild:i,...r}=n,{type:c,...d}=iw(r,s),h=typeof r.children=="function"?r.children({isActive:d["data-status"]==="active"}):r.children;if(!i){const{disabled:y,...p}=d;return V.createElement("a",p,h)}return V.createElement(i,d,h)});function hw(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}var mw=class extends E0{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=>B0({...s,from:this.id}),this.useSearch=s=>U0({select:s==null?void 0:s.select,structuralSharing:s==null?void 0:s.structuralSharing,from:this.id}),this.useParams=s=>D0({select:s==null?void 0:s.select,structuralSharing:s==null?void 0:s.structuralSharing,from:this.id}),this.useLoaderDeps=s=>z0({...s,from:this.id}),this.useLoaderData=s=>k0({...s,from:this.id}),this.useNavigate=()=>L0({from:this.fullPath}),this.Link=kr.forwardRef((s,i)=>u.jsx(jl,{ref:i,from:this.fullPath,...s}))}};function Ln(n){return new mw(n)}var pw=class extends Hj{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=>B0({...s,from:this.id}),this.useSearch=s=>U0({select:s==null?void 0:s.select,structuralSharing:s==null?void 0:s.structuralSharing,from:this.id}),this.useParams=s=>D0({select:s==null?void 0:s.select,structuralSharing:s==null?void 0:s.structuralSharing,from:this.id}),this.useLoaderDeps=s=>z0({...s,from:this.id}),this.useLoaderData=s=>k0({...s,from:this.id}),this.useNavigate=()=>L0({from:this.fullPath}),this.Link=kr.forwardRef((s,i)=>u.jsx(jl,{ref:i,from:this.fullPath,...s}))}};function yw(n){return new pw(n)}function gw(n){const s=mn(),i=`not-found-${Wt(s.stores.location,r=>r.pathname)}-${Wt(s.stores.status,r=>r)}`;return u.jsx(vh,{getResetKey:()=>i,onCatch:(r,c)=>{var d;if(Mt(r))(d=n.onCatch)==null||d.call(n,r,c);else throw r},errorComponent:({error:r})=>{var c;if(Mt(r))return(c=n.fallback)==null?void 0:c.call(n,r);throw r},children:n.children})}function vw(){return u.jsx("p",{children:"Not Found"})}function il(n){return u.jsx(u.Fragment,{children:n.children})}function H0(n,s,i){return s.options.notFoundComponent?u.jsx(s.options.notFoundComponent,{...i}):n.options.defaultNotFoundComponent?u.jsx(n.options.defaultNotFoundComponent,{...i}):u.jsx(vw,{})}function bw(n){return null}function xw(){return bw(mn()),null}var Q0=V.memo(function({matchId:s}){const i=mn(),r=i.stores.matchStores.get(s);r||Ra();const c=Wt(i.stores.loadedAt,h=>h),d=Wt(r,h=>h);return u.jsx(Sw,{router:i,matchId:s,resetKey:c,matchState:V.useMemo(()=>{var p;const h=d.routeId,y=(p=i.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,i.routesById])})});function Sw({router:n,matchId:s,resetKey:i,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:il,x=y?vh:il,w=m?gw:il;return u.jsxs(c.isRoot?c.options.shellComponent??il:il,{children:[u.jsx(Yc.Provider,{value:s,children:u.jsx(v,{fallback:h,children:u.jsx(x,{getResetKey:()=>i,errorComponent:y||bh,onCatch:(j,k)=>{if(Mt(j))throw j.routeId??(j.routeId=r.routeId),j;p==null||p(j,k)},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(Gj,{fallback:h,children:u.jsx(pv,{matchId:s})}):u.jsx(pv,{matchId:s})})})})}),r.parentRouteId===ri?u.jsxs(u.Fragment,{children:[u.jsx(jw,{resetKey:i}),n.options.scrollRestoration&&h0?u.jsx(xw,{}):null]}):null]})}function jw({resetKey:n}){const s=mn(),i=V.useRef(void 0);return Mr(()=>{const r=s.latestLocation.href;(i.current===void 0||i.current!==r)&&(s.emit({type:"onRendered",...ll(s.stores.location.get(),s.stores.resolvedLocation.get())}),i.current=r)},[s.latestLocation.state.__TSR_key,n,s]),null}var pv=V.memo(function({matchId:s}){const i=mn(),r=(b,v)=>{var x;return((x=i.getMatch(b.id))==null?void 0:x._nonReactive[v])??b._nonReactive[v]},c=i.stores.matchStores.get(s);c||Ra();const d=Wt(c,b=>b),h=d.routeId,y=i.routesById[h],p=V.useMemo(()=>{var v;const b=(v=i.routesById[h].options.remountDeps??i.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,i.options.defaultRemountDeps,i.routesById]),m=V.useMemo(()=>{const b=y.options.component??i.options.defaultComponent;return b?u.jsx(b,{},p):u.jsx(G0,{})},[p,y.options.component,i.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??i.options.defaultPendingMinMs;if(b){const v=i.getMatch(d.id);if(v&&!v._nonReactive.minPendingPromise){const x=Sl();v._nonReactive.minPendingPromise=x,setTimeout(()=>{x.resolve(),v._nonReactive.minPendingPromise=void 0},b)}}throw r(d,"loadPromise")}if(d.status==="notFound")return Mt(d.error)||Ra(),H0(i,y,d.error);if(d.status==="redirected")throw Jt(d.error)||Ra(),r(d,"loadPromise");if(d.status==="error")throw d.error;return m}),G0=V.memo(function(){const s=mn(),i=V.useContext(Yc);let r,c=!1,d;{const m=i?s.stores.matchStores.get(i):void 0;[r,c]=Wt(m,b=>[b==null?void 0:b.routeId,(b==null?void 0:b.globalNotFound)??!1]),d=Wt(s.stores.matchesId,b=>b[b.findIndex(v=>v===i)+1])}const h=r?s.routesById[r]:void 0,y=s.options.defaultPendingComponent?u.jsx(s.options.defaultPendingComponent,{}):null;if(c)return h||Ra(),H0(s,h,void 0);if(!d)return null;const p=u.jsx(Q0,{matchId:d});return r===ri?u.jsx(V.Suspense,{fallback:y,children:p}):p});function ww(){const n=mn(),s=V.useRef({router:n,mounted:!1}),[i,r]=V.useState(!1),c=Wt(n.stores.isLoading,v=>v),d=Wt(n.stores.hasPending,v=>v),h=ud(c),y=c||i||d,p=ud(y),m=c||d,b=ud(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 Na(n.latestLocation.publicHref)!==Na(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",...ll(n.stores.location.get(),n.stores.resolvedLocation.get())})},[h,n,c]),Mr(()=>{b&&!m&&n.emit({type:"onBeforeRouteMount",...ll(n.stores.location.get(),n.stores.resolvedLocation.get())})},[m,b,n]),Mr(()=>{if(p&&!y){const v=ll(n.stores.location.get(),n.stores.resolvedLocation.get());n.emit({type:"onResolved",...v}),A0(()=>{n.stores.status.set("idle"),n.stores.resolvedLocation.set(n.stores.location.get())})}},[y,p,n]),null}function Nw(){const n=mn(),s=n.routesById[ri].options.pendingComponent??n.options.defaultPendingComponent,i=s?u.jsx(s,{}):null,r=u.jsxs(typeof document<"u"&&n.ssr?il:V.Suspense,{fallback:i,children:[u.jsx(ww,{}),u.jsx(Rw,{})]});return n.options.InnerWrap?u.jsx(n.options.InnerWrap,{children:r}):r}function Rw(){const n=mn(),s=Wt(n.stores.firstId,c=>c),i=Wt(n.stores.loadedAt,c=>c),r=s?u.jsx(Q0,{matchId:s}):null;return u.jsx(Yc.Provider,{value:s,children:n.options.disableGlobalCatchBoundary?r:u.jsx(vh,{getResetKey:()=>i,errorComponent:bh,onCatch:void 0,children:r})})}var _w=n=>({createMutableStore:ov,createReadonlyStore:ov,batch:A0}),Ew=n=>new Cw(n),Cw=class extends Rj{constructor(n){super(n,_w)}};function Tw({router:n,children:s,...i}){p0(i)&&n.update({...n.options,...i,context:{...n.options.context,...i.context}});const r=u.jsx(T0.Provider,{value:n,children:s});return n.options.Wrap?u.jsx(n.options.Wrap,{children:r}):r}function Mw({router:n,...s}){return u.jsx(Tw,{router:n,...s,children:u.jsx(Nw,{})})}function Aw(n){const s=mn({warn:(n==null?void 0:n.router)===void 0}),i=(n==null?void 0:n.router)||s,r=V.useRef(void 0);return Wt(i.stores.__store,c=>{if(n!=null&&n.select){if(n.structuralSharing??i.options.defaultStructuralSharing){const d=ms(r.current,n.select(c));return r.current=d,d}return n.select(c)}return c})}var wd={exports:{}},Nr={},Nd={exports:{}},Rd={};/**
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 yv;function Ow(){return yv||(yv=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 i(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,T=ne>>>1;Oe<T;){var I=2*(Oe+1)-1,ae=L[I],se=I+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[I]=ue,Oe=I);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,k=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,B=typeof setImmediate<"u"?setImmediate:null;function C(L){for(var K=i(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=i(m)}}function Q(L){if(R=!1,C(L),!N)if(i(p)!==null)N=!0,U||(U=!0,Z());else{var K=i(m);K!==null&&he(Q,K.startTime-L)}}var U=!1,z=-1,O=5,Y=-1;function $(){return j?!0:!(n.unstable_now()-Y<O)}function W(){if(j=!1,U){var L=n.unstable_now();Y=L;var K=!0;try{e:{N=!1,R&&(R=!1,A(z),z=-1),w=!0;var ue=x;try{t:{for(C(L),v=i(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,C(L),K=!0;break t}v===i(p)&&r(p),C(L)}else r(p);v=i(p)}if(v!==null)K=!0;else{var T=i(m);T!==null&&he(Q,T.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(){k(W,0)};function he(L,K){z=k(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),i(p)===null&&L===i(m)&&(R?(A(z),z=-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}}}})(Rd)),Rd}var gv;function kw(){return gv||(gv=1,Nd.exports=Ow()),Nd.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 vv;function zw(){if(vv)return Nr;vv=1;var n=kw(),s=Vr(),i=q0();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,l=t;;){var o=a.return;if(o===null)break;var f=o.alternate;if(f===null){if(l=o.return,l!==null){a=l;continue}break}if(o.child===f.child){for(f=o.child;f;){if(f===a)return p(o),e;if(f===l)return p(o),t;f=f.sibling}throw Error(r(188))}if(a.return!==l.return)a=o,l=f;else{for(var g=!1,S=o.child;S;){if(S===a){g=!0,a=o,l=f;break}if(S===l){g=!0,l=o,a=f;break}S=S.sibling}if(!g){for(S=f.child;S;){if(S===a){g=!0,a=f,l=o;break}if(S===l){g=!0,l=f,a=o;break}S=S.sibling}if(!g)throw Error(r(189))}}if(a.alternate!==l)throw Error(r(190))}if(a.tag!==3)throw Error(r(188));return a.stateNode.current===a?e:t}function b(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=b(e),t!==null)return t;e=e.sibling}return null}var v=Object.assign,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"),k=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),B=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),Q=Symbol.for("react.suspense"),U=Symbol.for("react.suspense_list"),z=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),Y=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 k:return"Profiler";case j:return"StrictMode";case Q:return"Suspense";case U:return"SuspenseList";case Y: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 C:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case z: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=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ue={pending:!1,data:null,method:null,action:null},Oe=[],ne=-1;function T(e){return{current:e}}function I(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=T(null),ie=T(null),me=T(null),Ee=T(null);function Pe(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)?Fy(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Fy(t),e=Iy(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}I(se),ae(se,e)}function ge(){I(se),I(ie),I(me)}function pn(e){e.memoizedState!==null&&ae(Ee,e);var t=se.current,a=Iy(t,e.type);t!==a&&(ae(ie,e),ae(se,a))}function Qt(e){ie.current===e&&(I(se),I(ie)),Ee.current===e&&(I(Ee),yr._currentValue=ue)}var en,$n;function Ot(e){if(en===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);en=t&&t[1]||"",$n=-1<a.stack.indexOf(`
58
- at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
59
- `+en+e+$n}var _l=!1;function pi(e,t){if(!e||_l)return"";_l=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var J=function(){throw Error()};if(Object.defineProperty(J.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(J,[])}catch(P){var G=P}Reflect.construct(e,[],J)}else{try{J.call()}catch(P){G=P}e.call(J.prototype)}}else{try{throw Error()}catch(P){G=P}(J=e())&&typeof J.catch=="function"&&J.catch(function(){})}}catch(P){if(P&&G&&typeof P.stack=="string")return[P.stack,G.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=l.DetermineComponentFrameRoot(),g=f[0],S=f[1];if(g&&S){var _=g.split(`
60
- `),H=S.split(`
61
- `);for(o=l=0;l<_.length&&!_[l].includes("DetermineComponentFrameRoot");)l++;for(;o<H.length&&!H[o].includes("DetermineComponentFrameRoot");)o++;if(l===_.length||o===H.length)for(l=_.length-1,o=H.length-1;1<=l&&0<=o&&_[l]!==H[o];)o--;for(;1<=l&&0<=o;l--,o--)if(_[l]!==H[o]){if(l!==1||o!==1)do if(l--,o--,0>o||_[l]!==H[o]){var X=`
62
- `+_[l].replace(" at new "," at ");return e.displayName&&X.includes("<anonymous>")&&(X=X.replace("<anonymous>",e.displayName)),X}while(1<=l&&0<=o);break}}}finally{_l=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Ot(a):""}function Kr(e,t){switch(e.tag){case 26:case 27:case 5:return Ot(e.type);case 16:return Ot("Lazy");case 13:return e.child!==t&&t!==null?Ot("Suspense Fallback"):Ot("Suspense");case 19:return Ot("SuspenseList");case 0:case 15:return pi(e.type,!1);case 11:return pi(e.type.render,!1);case 1:return pi(e.type,!0);case 31:return Ot("Activity");default:return""}}function Wn(e){try{var t="",a=null;do t+=Kr(e,a),a=e,e=e.return;while(e);return t}catch(l){return`
63
- Error generating stack: `+l.message+`
64
- `+l.stack}}var Ns=Object.prototype.hasOwnProperty,Mn=n.unstable_scheduleCallback,El=n.unstable_cancelCallback,Xr=n.unstable_shouldYield,Xc=n.unstable_requestPaint,Et=n.unstable_now,Ye=n.unstable_getCurrentPriorityLevel,bt=n.unstable_ImmediatePriority,qn=n.unstable_UserBlockingPriority,yi=n.unstable_NormalPriority,Mb=n.unstable_LowPriority,Th=n.unstable_IdlePriority,Ab=n.log,Ob=n.unstable_setDisableYieldValue,Cl=null,tn=null;function Ea(e){if(typeof Ab=="function"&&Ob(e),tn&&typeof tn.setStrictMode=="function")try{tn.setStrictMode(Cl,e)}catch{}}var nn=Math.clz32?Math.clz32:Db,kb=Math.log,zb=Math.LN2;function Db(e){return e>>>=0,e===0?32:31-(kb(e)/zb|0)|0}var Zr=256,Fr=262144,Ir=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 Jr(e,t,a){var l=e.pendingLanes;if(l===0)return 0;var o=0,f=e.suspendedLanes,g=e.pingedLanes;e=e.warmLanes;var S=l&134217727;return S!==0?(l=S&~f,l!==0?o=Rs(l):(g&=S,g!==0?o=Rs(g):a||(a=S&~e,a!==0&&(o=Rs(a))))):(S=l&~f,S!==0?o=Rs(S):g!==0?o=Rs(g):a||(a=l&~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 Tl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ub(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 Mh(){var e=Ir;return Ir<<=1,(Ir&62914560)===0&&(Ir=4194304),e}function Zc(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 Lb(e,t,a,l,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-nn(a),J=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 P=G[X];P!==null&&(P.lane&=-536870913)}a&=~J}l!==0&&Ah(e,l,0),f!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=f&~(g&~t))}function Ah(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-nn(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|a&261930}function Oh(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var l=31-nn(a),o=1<<l;o&t|e[l]&t&&(e[l]|=t),a&=~o}}function kh(e,t){var a=t&-t;return a=(a&42)!==0?1:Fc(a),(a&(e.suspendedLanes|t))!==0?0:a}function Fc(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 Ic(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function zh(){var e=K.p;return e!==0?e:(e=window.event,e===void 0?32:bg(e.type))}function Dh(e,t){var a=K.p;try{return K.p=e,t()}finally{K.p=a}}var Ca=Math.random().toString(36).slice(2),xt="__reactFiber$"+Ca,Gt="__reactProps$"+Ca,gi="__reactContainer$"+Ca,Jc="__reactEvents$"+Ca,Bb="__reactListeners$"+Ca,qb="__reactHandles$"+Ca,Uh="__reactResources$"+Ca,Al="__reactMarker$"+Ca;function $c(e){delete e[xt],delete e[Gt],delete e[Jc],delete e[Bb],delete e[qb]}function vi(e){var t=e[xt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[gi]||a[xt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=ag(e);e!==null;){if(a=e[xt])return a;e=ag(e)}return t}e=a,a=e.parentNode}return null}function bi(e){if(e=e[xt]||e[gi]){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 xi(e){var t=e[Uh];return t||(t=e[Uh]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function pt(e){e[Al]=!0}var Lh=new Set,Bh={};function _s(e,t){Si(e,t),Si(e+"Capture",t)}function Si(e,t){for(Bh[e]=t,e=0;e<t.length;e++)Lh.add(t[e])}var Hb=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]*$"),qh={},Hh={};function Qb(e){return Ns.call(Hh,e)?!0:Ns.call(qh,e)?!1:Hb.test(e)?Hh[e]=!0:(qh[e]=!0,!1)}function $r(e,t,a){if(Qb(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function 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 ea(e,t,a,l){if(l===null)e.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+l)}}function yn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Qh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Gb(e,t,a){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var o=l.get,f=l.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:l.enumerable}),{getValue:function(){return a},setValue:function(g){a=""+g},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Wc(e){if(!e._valueTracker){var t=Qh(e)?"checked":"value";e._valueTracker=Gb(e,t,""+e[t])}}function Gh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),l="";return e&&(l=Qh(e)?e.checked?"true":"false":e.value),e=l,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 Vb=/[\n"\\]/g;function gn(e){return e.replace(Vb,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function eu(e,t,a,l,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=""+yn(t)):e.value!==""+yn(t)&&(e.value=""+yn(t)):g!=="submit"&&g!=="reset"||e.removeAttribute("value"),t!=null?tu(e,g,yn(t)):a!=null?tu(e,g,yn(a)):l!=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=""+yn(S):e.removeAttribute("name")}function Vh(e,t,a,l,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)){Wc(e);return}a=a!=null?""+yn(a):"",t=t!=null?""+yn(t):a,S||t===e.value||(e.value=t),e.defaultValue=t}l=l??o,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=S?e.checked:!!l,e.defaultChecked=!!l,g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(e.name=g),Wc(e)}function tu(e,t,a){t==="number"&&eo(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function ji(e,t,a,l){if(e=e.options,t){t={};for(var o=0;o<a.length;o++)t["$"+a[o]]=!0;for(a=0;a<e.length;a++)o=t.hasOwnProperty("$"+e[a].value),e[a].selected!==o&&(e[a].selected=o),o&&l&&(e[a].defaultSelected=!0)}else{for(a=""+yn(a),t=null,o=0;o<e.length;o++){if(e[o].value===a){e[o].selected=!0,l&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Ph(e,t,a){if(t!=null&&(t=""+yn(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+yn(a):""}function Yh(e,t,a,l){if(t==null){if(l!=null){if(a!=null)throw Error(r(92));if(he(l)){if(1<l.length)throw Error(r(93));l=l[0]}a=l}a==null&&(a=""),t=a}a=yn(t),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l),Wc(e)}function wi(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Pb=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 Kh(e,t,a){var l=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,a):typeof a!="number"||a===0||Pb.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Xh(e,t,a){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,a!=null){for(var l in a)!a.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var o in t)l=t[o],t.hasOwnProperty(o)&&a[o]!==l&&Kh(e,o,l)}else for(var f in t)t.hasOwnProperty(f)&&Kh(e,f,t[f])}function nu(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 Yb=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"]]),Kb=/^[\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 Kb.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ta(){}var au=null;function su(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ni=null,Ri=null;function Zh(e){var t=bi(e);if(t&&(e=t.stateNode)){var a=e[Gt]||null;e:switch(e=t.stateNode,t.type){case"input":if(eu(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="'+gn(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var l=a[t];if(l!==e&&l.form===e.form){var o=l[Gt]||null;if(!o)throw Error(r(90));eu(l,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<a.length;t++)l=a[t],l.form===e.form&&Gh(l)}break e;case"textarea":Ph(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&ji(e,!!a.multiple,t,!1)}}}var iu=!1;function Fh(e,t,a){if(iu)return e(t,a);iu=!0;try{var l=e(t);return l}finally{if(iu=!1,(Ni!==null||Ri!==null)&&(Vo(),Ni&&(t=Ni,e=Ri,Ri=Ni=null,Zh(t),e)))for(t=0;t<e.length;t++)Zh(e[t])}}function kl(e,t){var a=e.stateNode;if(a===null)return null;var l=a[Gt]||null;if(l===null)return null;a=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(r(231,t,typeof a));return a}var na=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),lu=!1;if(na)try{var zl={};Object.defineProperty(zl,"passive",{get:function(){lu=!0}}),window.addEventListener("test",zl,zl),window.removeEventListener("test",zl,zl)}catch{lu=!1}var Ta=null,ru=null,no=null;function Ih(){if(no)return no;var e,t=ru,a=t.length,l,o="value"in Ta?Ta.value:Ta.textContent,f=o.length;for(e=0;e<a&&t[e]===o[e];e++);var g=a-e;for(l=1;l<=g&&t[a-l]===o[f-l];l++);return no=o.slice(e,1<l?1-l: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 Jh(){return!1}function Vt(e){function t(a,l,o,f,g){this._reactName=a,this._targetInst=o,this.type=l,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:Jh,this.isPropagationStopped=Jh,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=Vt(Es),Dl=v({},Es,{view:0,detail:0}),Xb=Vt(Dl),ou,cu,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:fu,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"?(ou=e.screenX-Ul.screenX,cu=e.screenY-Ul.screenY):cu=ou=0,Ul=e),ou)},movementY:function(e){return"movementY"in e?e.movementY:cu}}),$h=Vt(lo),Zb=v({},lo,{dataTransfer:0}),Fb=Vt(Zb),Ib=v({},Dl,{relatedTarget:0}),uu=Vt(Ib),Jb=v({},Es,{animationName:0,elapsedTime:0,pseudoElement:0}),$b=Vt(Jb),Wb=v({},Es,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ex=Vt(Wb),tx=v({},Es,{data:0}),Wh=Vt(tx),nx={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ax={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"},sx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ix(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=sx[e])?!!t[e]:!1}function fu(){return ix}var lx=v({},Dl,{key:function(e){if(e.key){var t=nx[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"?ax[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:fu,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}}),rx=Vt(lx),ox=v({},lo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),em=Vt(ox),cx=v({},Dl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:fu}),ux=Vt(cx),fx=v({},Es,{propertyName:0,elapsedTime:0,pseudoElement:0}),dx=Vt(fx),hx=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}),mx=Vt(hx),px=v({},Es,{newState:0,oldState:0}),yx=Vt(px),gx=[9,13,27,32],du=na&&"CompositionEvent"in window,Ll=null;na&&"documentMode"in document&&(Ll=document.documentMode);var vx=na&&"TextEvent"in window&&!Ll,tm=na&&(!du||Ll&&8<Ll&&11>=Ll),nm=" ",am=!1;function sm(e,t){switch(e){case"keyup":return gx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function im(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var _i=!1;function bx(e,t){switch(e){case"compositionend":return im(t);case"keypress":return t.which!==32?null:(am=!0,nm);case"textInput":return e=t.data,e===nm&&am?null:e;default:return null}}function xx(e,t){if(_i)return e==="compositionend"||!du&&sm(e,t)?(e=Ih(),no=ru=Ta=null,_i=!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 tm&&t.locale!=="ko"?null:t.data;default:return null}}var Sx={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 lm(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Sx[e.type]:t==="textarea"}function rm(e,t,a,l){Ni?Ri?Ri.push(l):Ri=[l]:Ni=l,t=Io(t,"onChange"),0<t.length&&(a=new io("onChange","change",null,a,l),e.push({event:a,listeners:t}))}var Bl=null,ql=null;function jx(e){Vy(e,0)}function ro(e){var t=Ol(e);if(Gh(t))return e}function om(e,t){if(e==="change")return t}var cm=!1;if(na){var hu;if(na){var mu="oninput"in document;if(!mu){var um=document.createElement("div");um.setAttribute("oninput","return;"),mu=typeof um.oninput=="function"}hu=mu}else hu=!1;cm=hu&&(!document.documentMode||9<document.documentMode)}function fm(){Bl&&(Bl.detachEvent("onpropertychange",dm),ql=Bl=null)}function dm(e){if(e.propertyName==="value"&&ro(ql)){var t=[];rm(t,ql,e,su(e)),Fh(jx,t)}}function wx(e,t,a){e==="focusin"?(fm(),Bl=t,ql=a,Bl.attachEvent("onpropertychange",dm)):e==="focusout"&&fm()}function Nx(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ro(ql)}function Rx(e,t){if(e==="click")return ro(t)}function _x(e,t){if(e==="input"||e==="change")return ro(t)}function Ex(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var an=typeof Object.is=="function"?Object.is:Ex;function Hl(e,t){if(an(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),l=Object.keys(t);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var o=a[l];if(!Ns.call(t,o)||!an(e[o],t[o]))return!1}return!0}function hm(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function mm(e,t){var a=hm(e);e=0;for(var l;a;){if(a.nodeType===3){if(l=e+a.textContent.length,e<=t&&l>=t)return{node:a,offset:t-e};e=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=hm(a)}}function pm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?pm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ym(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 pu(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 Cx=na&&"documentMode"in document&&11>=document.documentMode,Ei=null,yu=null,Ql=null,gu=!1;function gm(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;gu||Ei==null||Ei!==eo(l)||(l=Ei,"selectionStart"in l&&pu(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Ql&&Hl(Ql,l)||(Ql=l,l=Io(yu,"onSelect"),0<l.length&&(t=new io("onSelect","select",null,t,a),e.push({event:t,listeners:l}),t.target=Ei)))}function Cs(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Ci={animationend:Cs("Animation","AnimationEnd"),animationiteration:Cs("Animation","AnimationIteration"),animationstart:Cs("Animation","AnimationStart"),transitionrun:Cs("Transition","TransitionRun"),transitionstart:Cs("Transition","TransitionStart"),transitioncancel:Cs("Transition","TransitionCancel"),transitionend:Cs("Transition","TransitionEnd")},vu={},vm={};na&&(vm=document.createElement("div").style,"AnimationEvent"in window||(delete Ci.animationend.animation,delete Ci.animationiteration.animation,delete Ci.animationstart.animation),"TransitionEvent"in window||delete Ci.transitionend.transition);function Ts(e){if(vu[e])return vu[e];if(!Ci[e])return e;var t=Ci[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in vm)return vu[e]=t[a];return e}var bm=Ts("animationend"),xm=Ts("animationiteration"),Sm=Ts("animationstart"),Tx=Ts("transitionrun"),Mx=Ts("transitionstart"),Ax=Ts("transitioncancel"),jm=Ts("transitionend"),wm=new Map,bu="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(" ");bu.push("scrollEnd");function An(e,t){wm.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)},vn=[],Ti=0,xu=0;function co(){for(var e=Ti,t=xu=Ti=0;t<e;){var a=vn[t];vn[t++]=null;var l=vn[t];vn[t++]=null;var o=vn[t];vn[t++]=null;var f=vn[t];if(vn[t++]=null,l!==null&&o!==null){var g=l.pending;g===null?o.next=o:(o.next=g.next,g.next=o),l.pending=o}f!==0&&Nm(a,o,f)}}function uo(e,t,a,l){vn[Ti++]=e,vn[Ti++]=t,vn[Ti++]=a,vn[Ti++]=l,xu|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Su(e,t,a,l){return uo(e,t,a,l),fo(e)}function Ms(e,t){return uo(e,null,null,t),fo(e)}function Nm(e,t,a){e.lanes|=a;var l=e.alternate;l!==null&&(l.lanes|=a);for(var o=!1,f=e.return;f!==null;)f.childLanes|=a,l=f.alternate,l!==null&&(l.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-nn(a),e=f.hiddenUpdates,l=e[o],l===null?e[o]=[t]:l.push(t),t.lane=a|536870912),f):null}function fo(e){if(50<cr)throw cr=0,Af=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Mi={};function Ox(e,t,a,l){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function sn(e,t,a,l){return new Ox(e,t,a,l)}function ju(e){return e=e.prototype,!(!e||!e.isReactComponent)}function aa(e,t){var a=e.alternate;return a===null?(a=sn(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 Rm(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,l,o,f){var g=0;if(l=e,typeof e=="function")ju(e)&&(g=1);else if(typeof e=="string")g=L1(e,a,se.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Y:return e=sn(31,a,t,o),e.elementType=Y,e.lanes=f,e;case R:return As(a.children,o,f,t);case j:g=8,o|=24;break;case k:return e=sn(12,a,t,o|2),e.elementType=k,e.lanes=f,e;case Q:return e=sn(13,a,t,o),e.elementType=Q,e.lanes=f,e;case U:return e=sn(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 C:g=11;break e;case z:g=14;break e;case O:g=16,l=null;break e}g=29,a=Error(r(130,e===null?"null":typeof e,"")),l=null}return t=sn(g,a,t,o),t.elementType=e,t.type=l,t.lanes=f,t}function As(e,t,a,l){return e=sn(7,e,l,t),e.lanes=a,e}function wu(e,t,a){return e=sn(6,e,null,t),e.lanes=a,e}function _m(e){var t=sn(18,null,null,0);return t.stateNode=e,t}function Nu(e,t,a){return t=sn(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Em=new WeakMap;function bn(e,t){if(typeof e=="object"&&e!==null){var a=Em.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Wn(t)},Em.set(e,t),t)}return{value:e,source:t,stack:Wn(t)}}var Ai=[],Oi=0,mo=null,Gl=0,xn=[],Sn=0,Ma=null,Hn=1,Qn="";function sa(e,t){Ai[Oi++]=Gl,Ai[Oi++]=mo,mo=e,Gl=t}function Cm(e,t,a){xn[Sn++]=Hn,xn[Sn++]=Qn,xn[Sn++]=Ma,Ma=e;var l=Hn;e=Qn;var o=32-nn(l)-1;l&=~(1<<o),a+=1;var f=32-nn(t)+o;if(30<f){var g=o-o%5;f=(l&(1<<g)-1).toString(32),l>>=g,o-=g,Hn=1<<32-nn(t)+o|a<<o|l,Qn=f+e}else Hn=1<<f|a<<o|l,Qn=e}function Ru(e){e.return!==null&&(sa(e,1),Cm(e,1,0))}function _u(e){for(;e===mo;)mo=Ai[--Oi],Ai[Oi]=null,Gl=Ai[--Oi],Ai[Oi]=null;for(;e===Ma;)Ma=xn[--Sn],xn[Sn]=null,Qn=xn[--Sn],xn[Sn]=null,Hn=xn[--Sn],xn[Sn]=null}function Tm(e,t){xn[Sn++]=Hn,xn[Sn++]=Qn,xn[Sn++]=Ma,Hn=t.id,Qn=t.overflow,Ma=e}var St=null,Je=null,ke=!1,Aa=null,jn=!1,Eu=Error(r(519));function Oa(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Vl(bn(t,e)),Eu}function Mm(e){var t=e.stateNode,a=e.type,l=e.memoizedProps;switch(t[xt]=e,t[Gt]=l,a){case"dialog":Te("cancel",t),Te("close",t);break;case"iframe":case"object":case"embed":Te("load",t);break;case"video":case"audio":for(a=0;a<fr.length;a++)Te(fr[a],t);break;case"source":Te("error",t);break;case"img":case"image":case"link":Te("error",t),Te("load",t);break;case"details":Te("toggle",t);break;case"input":Te("invalid",t),Vh(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Te("invalid",t);break;case"textarea":Te("invalid",t),Yh(t,l.value,l.defaultValue,l.children)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||l.suppressHydrationWarning===!0||Xy(t.textContent,a)?(l.popover!=null&&(Te("beforetoggle",t),Te("toggle",t)),l.onScroll!=null&&Te("scroll",t),l.onScrollEnd!=null&&Te("scrollend",t),l.onClick!=null&&(t.onclick=ta),t=!0):t=!1,t||Oa(e,!0)}function Am(e){for(St=e.return;St;)switch(St.tag){case 5:case 31:case 13:jn=!1;return;case 27:case 3:jn=!0;return;default:St=St.return}}function ki(e){if(e!==St)return!1;if(!ke)return Am(e),ke=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Kf(e.type,e.memoizedProps)),a=!a),a&&Je&&Oa(e),Am(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Je=ng(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Je=ng(e)}else t===27?(t=Je,Ka(e.type)?(e=Jf,Jf=null,Je=e):Je=t):Je=St?Nn(e.stateNode.nextSibling):null;return!0}function Os(){Je=St=null,ke=!1}function Cu(){var e=Aa;return e!==null&&(Xt===null?Xt=e:Xt.push.apply(Xt,e),Aa=null),e}function Vl(e){Aa===null?Aa=[e]:Aa.push(e)}var Tu=T(null),ks=null,ia=null;function ka(e,t,a){ae(Tu,t._currentValue),t._currentValue=a}function la(e){e._currentValue=Tu.current,I(Tu)}function Mu(e,t,a){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===a)break;e=e.return}}function Au(e,t,a,l){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),Mu(f.return,a,e),l||(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),Mu(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,l){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;an(o.pendingProps.value,g.value)||(e!==null?e.push(S):e=[S])}}else if(o===Ee.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&&Au(t,e,a,l),t.flags|=262144}function po(e){for(e=e.firstContext;e!==null;){if(!an(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function zs(e){ks=e,ia=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function jt(e){return Om(ks,e)}function yo(e,t){return ks===null&&zs(e),Om(e,t)}function Om(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},ia===null){if(e===null)throw Error(r(308));ia=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ia=ia.next=t;return a}var kx=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},zx=n.unstable_scheduleCallback,Dx=n.unstable_NormalPriority,rt={$$typeof:B,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ou(){return{controller:new kx,data:new Map,refCount:0}}function Pl(e){e.refCount--,e.refCount===0&&zx(Dx,function(){e.controller.abort()})}var Yl=null,ku=0,Di=0,Ui=null;function Ux(e,t){if(Yl===null){var a=Yl=[];ku=0,Di=Lf(),Ui={status:"pending",value:void 0,then:function(l){a.push(l)}}}return ku++,t.then(km,km),t}function km(){if(--ku===0&&Yl!==null){Ui!==null&&(Ui.status="fulfilled");var e=Yl;Yl=null,Di=0,Ui=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Lx(e,t){var a=[],l={status:"pending",value:null,reason:null,then:function(o){a.push(o)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var o=0;o<a.length;o++)(0,a[o])(t)},function(o){for(l.status="rejected",l.reason=o,o=0;o<a.length;o++)(0,a[o])(void 0)}),l}var zm=L.S;L.S=function(e,t){gy=Et(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Ux(e,t),zm!==null&&zm(e,t)};var Ds=T(null);function zu(){var e=Ds.current;return e!==null?e:Ie.pooledCache}function go(e,t){t===null?ae(Ds,Ds.current):ae(Ds,t.pool)}function Dm(){var e=zu();return e===null?null:{parent:rt._currentValue,pool:e}}var Li=Error(r(460)),Du=Error(r(474)),vo=Error(r(542)),bo={then:function(){}};function Um(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Lm(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(ta,ta),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,qm(e),e;default:if(typeof t.status=="string")t.then(ta,ta);else{if(e=Ie,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var o=t;o.status="fulfilled",o.value=l}},function(l){if(t.status==="pending"){var o=t;o.status="rejected",o.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,qm(e),e}throw Ls=t,Li}}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,Li):a}}var Ls=null;function Bm(){if(Ls===null)throw Error(r(459));var e=Ls;return Ls=null,e}function qm(e){if(e===Li||e===vo)throw Error(r(483))}var Bi=null,Kl=0;function xo(e){var t=Kl;return Kl+=1,Bi===null&&(Bi=[]),Lm(Bi,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 Hm(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 l(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=aa(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=wu(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=Nu(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 J(D,M,q){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=wu(""+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=Nu(M,D.mode,q),M.return=D,M;case O:return M=Us(M),J(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 J(D,xo(M),q);if(M.$$typeof===B)return J(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 P(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),P(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 P(D,M,q,xo(F),pe);if(F.$$typeof===B)return P(D,M,q,yo(M,F),pe);So(M,F)}return null}function ce(D,M,q,F){for(var pe=null,Be=null,fe=M,we=M=0,Ae=null;fe!==null&&we<q.length;we++){fe.index>we?(Ae=fe,fe=null):Ae=fe.sibling;var qe=G(D,fe,q[we],F);if(qe===null){fe===null&&(fe=Ae);break}e&&fe&&qe.alternate===null&&t(D,fe),M=f(qe,M,we),Be===null?pe=qe:Be.sibling=qe,Be=qe,fe=Ae}if(we===q.length)return a(D,fe),ke&&sa(D,we),pe;if(fe===null){for(;we<q.length;we++)fe=J(D,q[we],F),fe!==null&&(M=f(fe,M,we),Be===null?pe=fe:Be.sibling=fe,Be=fe);return ke&&sa(D,we),pe}for(fe=l(fe);we<q.length;we++)Ae=P(fe,D,we,q[we],F),Ae!==null&&(e&&Ae.alternate!==null&&fe.delete(Ae.key===null?we:Ae.key),M=f(Ae,M,we),Be===null?pe=Ae:Be.sibling=Ae,Be=Ae);return e&&fe.forEach(function(Ja){return t(D,Ja)}),ke&&sa(D,we),pe}function ye(D,M,q,F){if(q==null)throw Error(r(151));for(var pe=null,Be=null,fe=M,we=M=0,Ae=null,qe=q.next();fe!==null&&!qe.done;we++,qe=q.next()){fe.index>we?(Ae=fe,fe=null):Ae=fe.sibling;var Ja=G(D,fe,qe.value,F);if(Ja===null){fe===null&&(fe=Ae);break}e&&fe&&Ja.alternate===null&&t(D,fe),M=f(Ja,M,we),Be===null?pe=Ja:Be.sibling=Ja,Be=Ja,fe=Ae}if(qe.done)return a(D,fe),ke&&sa(D,we),pe;if(fe===null){for(;!qe.done;we++,qe=q.next())qe=J(D,qe.value,F),qe!==null&&(M=f(qe,M,we),Be===null?pe=qe:Be.sibling=qe,Be=qe);return ke&&sa(D,we),pe}for(fe=l(fe);!qe.done;we++,qe=q.next())qe=P(fe,D,we,qe.value,F),qe!==null&&(e&&qe.alternate!==null&&fe.delete(qe.key===null?we:qe.key),M=f(qe,M,we),Be===null?pe=qe:Be.sibling=qe,Be=qe);return e&&fe.forEach(function(Z1){return t(D,Z1)}),ke&&sa(D,we),pe}function Ze(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=Nu(q,D.mode,F),F.return=D,D=F}return g(D);case O:return q=Us(q),Ze(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 Ze(D,M,xo(q),F);if(q.$$typeof===B)return Ze(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=wu(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=Ze(D,M,q,F);return Bi=null,pe}catch(fe){if(fe===Li||fe===vo)throw fe;var Be=sn(29,fe,null,D.mode);return Be.lanes=F,Be.return=D,Be}finally{}}}var Bs=Hm(!0),Qm=Hm(!1),za=!1;function Uu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Lu(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 l=e.updateQueue;if(l===null)return null;if(l=l.shared,(He&2)!==0){var o=l.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),l.pending=t,t=fo(e),Nm(e,null,a),t}return uo(e,l,t,a),fo(e)}function Zl(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,Oh(e,a)}}function Bu(e,t){var a=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,a===l)){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:l.baseState,firstBaseUpdate:o,lastBaseUpdate:f,shared:l.shared,callbacks:l.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var qu=!1;function Fl(){if(qu){var e=Ui;if(e!==null)throw e}}function Il(e,t,a,l){qu=!1;var o=e.updateQueue;za=!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 J=o.baseState;g=0,X=H=_=null,S=f;do{var G=S.lane&-536870913,P=G!==S.lane;if(P?(Me&G)===G:(l&G)===G){G!==0&&G===Di&&(qu=!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 Ze=a;switch(ye.tag){case 1:if(ce=ye.payload,typeof ce=="function"){J=ce.call(Ze,J,G);break e}J=ce;break e;case 3:ce.flags=ce.flags&-65537|128;case 0:if(ce=ye.payload,G=typeof ce=="function"?ce.call(Ze,J,G):ce,G==null)break e;J=v({},J,G);break e;case 2:za=!0}}G=S.callback,G!==null&&(e.flags|=64,P&&(e.flags|=8192),P=o.callbacks,P===null?o.callbacks=[G]:P.push(G))}else P={lane:G,tag:S.tag,payload:S.payload,callback:S.callback,next:null},X===null?(H=X=P,_=J):X=X.next=P,g|=G;if(S=S.next,S===null){if(S=o.shared.pending,S===null)break;P=S,S=P.next,P.next=null,o.lastBaseUpdate=P,o.shared.pending=null}}while(!0);X===null&&(_=J),o.baseState=_,o.firstBaseUpdate=H,o.lastBaseUpdate=X,f===null&&(o.shared.lanes=0),Qa|=g,e.lanes=g,e.memoizedState=J}}function Gm(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function Vm(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Gm(a[e],t)}var qi=T(null),jo=T(0);function Pm(e,t){e=pa,ae(jo,e),ae(qi,t),pa=e|t.baseLanes}function Hu(){ae(jo,pa),ae(qi,qi.current)}function Qu(){pa=jo.current,I(qi),I(jo)}var ln=T(null),wn=null;function La(e){var t=e.alternate;ae(it,it.current&1),ae(ln,e),wn===null&&(t===null||qi.current!==null||t.memoizedState!==null)&&(wn=e)}function Gu(e){ae(it,it.current),ae(ln,e),wn===null&&(wn=e)}function Ym(e){e.tag===22?(ae(it,it.current),ae(ln,e),wn===null&&(wn=e)):Ba()}function Ba(){ae(it,it.current),ae(ln,ln.current)}function rn(e){I(ln),wn===e&&(wn=null),I(it)}var it=T(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||Ff(a)||If(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 ra=0,xe=null,Ke=null,ot=null,No=!1,Hi=!1,qs=!1,Ro=0,Jl=0,Qi=null,Bx=0;function nt(){throw Error(r(321))}function Vu(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!an(e[a],t[a]))return!1;return!0}function Pu(e,t,a,l,o,f){return ra=f,xe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,L.H=e===null||e.memoizedState===null?Cp:lf,qs=!1,f=a(l,o),qs=!1,Hi&&(f=Xm(t,a,l,o)),Km(e),f}function Km(e){L.H=er;var t=Ke!==null&&Ke.next!==null;if(ra=0,ot=Ke=xe=null,No=!1,Jl=0,Qi=null,t)throw Error(r(300));e===null||ct||(e=e.dependencies,e!==null&&po(e)&&(ct=!0))}function Xm(e,t,a,l){xe=e;var o=0;do{if(Hi&&(Qi=null),Jl=0,Hi=!1,25<=o)throw Error(r(301));if(o+=1,ot=Ke=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=Tp,f=t(a,l)}while(Hi);return f}function qx(){var e=L.H,t=e.useState()[0];return t=typeof t.then=="function"?$l(t):t,e=e.useState()[0],(Ke!==null?Ke.memoizedState:null)!==e&&(xe.flags|=1024),t}function Yu(){var e=Ro!==0;return Ro=0,e}function Ku(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Xu(e){if(No){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}No=!1}ra=0,ot=Ke=xe=null,Hi=!1,Jl=Ro=0,Qi=null}function kt(){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 lt(){if(Ke===null){var e=xe.alternate;e=e!==null?e.memoizedState:null}else e=Ke.next;var t=ot===null?xe.memoizedState:ot.next;if(t!==null)ot=t,Ke=e;else{if(e===null)throw xe.alternate===null?Error(r(467)):Error(r(310));Ke=e,e={memoizedState:Ke.memoizedState,baseState:Ke.baseState,baseQueue:Ke.baseQueue,queue:Ke.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=Jl;return Jl+=1,Qi===null&&(Qi=[]),e=Lm(Qi,e,t),t=xe,(ot===null?t.memoizedState:ot.next)===null&&(t=t.alternate,L.H=t===null||t.memoizedState===null?Cp:lf),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 Zu(e){var t=null,a=xe.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var l=xe.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(o){return o.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=_o(),xe.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),l=0;l<e;l++)a[l]=$;return t.index++,a}function oa(e,t){return typeof t=="function"?t(e):t}function Co(e){var t=lt();return Fu(t,Ke,e)}function Fu(e,t,a){var l=e.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=a;var o=e.baseQueue,f=l.pending;if(f!==null){if(o!==null){var g=o.next;o.next=f.next,f.next=g}t.baseQueue=o=f,l.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 J=H.lane&-536870913;if(J!==H.lane?(Me&J)===J:(ra&J)===J){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}),J===Di&&(X=!0);else if((ra&G)===G){H=H.next,G===Di&&(X=!0);continue}else J={lane:0,revertLane:H.revertLane,gesture:null,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},_===null?(S=_=J,g=f):_=_.next=J,xe.lanes|=G,Qa|=G;J=H.action,qs&&a(f,J),f=H.hasEagerState?H.eagerState:a(f,J)}else G={lane:J,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|=J,Qa|=J;H=H.next}while(H!==null&&H!==t);if(_===null?g=f:_.next=S,!an(f,e.memoizedState)&&(ct=!0,X&&(a=Ui,a!==null)))throw a;e.memoizedState=f,e.baseState=g,e.baseQueue=_,l.lastRenderedState=f}return o===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Iu(e){var t=lt(),a=t.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=e;var l=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);an(f,t.memoizedState)||(ct=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),a.lastRenderedState=f}return[f,l]}function Zm(e,t,a){var l=xe,o=lt(),f=ke;if(f){if(a===void 0)throw Error(r(407));a=a()}else a=t();var g=!an((Ke||o).memoizedState,a);if(g&&(o.memoizedState=a,ct=!0),o=o.queue,Wu(Jm.bind(null,l,o,e),[e]),o.getSnapshot!==t||g||ot!==null&&ot.memoizedState.tag&1){if(l.flags|=2048,Gi(9,{destroy:void 0},Im.bind(null,l,o,a,t),null),Ie===null)throw Error(r(349));f||(ra&127)!==0||Fm(l,t,a)}return a}function Fm(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 Im(e,t,a,l){t.value=a,t.getSnapshot=l,$m(t)&&Wm(e)}function Jm(e,t,a){return a(function(){$m(t)&&Wm(e)})}function $m(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!an(e,a)}catch{return!0}}function Wm(e){var t=Ms(e,2);t!==null&&Zt(t,e,2)}function Ju(e){var t=kt();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:oa,lastRenderedState:e},t}function ep(e,t,a,l){return e.baseState=a,Fu(e,Ke,typeof l=="function"?l:oa)}function Hx(e,t,a,l,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,l(f),a=t.pending,a===null?(f.next=t.pending=f,tp(t,f)):(f.next=a.next,t.pending=a.next=f)}}function tp(e,t){var a=t.action,l=t.payload,o=e.state;if(t.isTransition){var f=L.T,g={};L.T=g;try{var S=a(o,l),_=L.S;_!==null&&_(g,S),np(e,t,S)}catch(H){$u(e,t,H)}finally{f!==null&&g.types!==null&&(f.types=g.types),L.T=f}}else try{f=a(o,l),np(e,t,f)}catch(H){$u(e,t,H)}}function np(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){ap(e,t,l)},function(l){return $u(e,t,l)}):ap(e,t,a)}function ap(e,t,a){t.status="fulfilled",t.value=a,sp(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,tp(e,a)))}function $u(e,t,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=a,sp(t),t=t.next;while(t!==l)}e.action=null}function sp(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ip(e,t){return t}function lp(e,t){if(ke){var a=Ie.formState;if(a!==null){e:{var l=xe;if(ke){if(Je){t:{for(var o=Je,f=jn;o.nodeType!==8;){if(!f){o=null;break t}if(o=Nn(o.nextSibling),o===null){o=null;break t}}f=o.data,o=f==="F!"||f==="F"?o:null}if(o){Je=Nn(o.nextSibling),l=o.data==="F!";break e}}Oa(l)}l=!1}l&&(t=a[0])}}return a=kt(),a.memoizedState=a.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ip,lastRenderedState:t},a.queue=l,a=Rp.bind(null,xe,l),l.dispatch=a,l=Ju(!1),f=sf.bind(null,xe,!1,l.queue),l=kt(),o={state:t,dispatch:null,action:e,pending:null},l.queue=o,a=Hx.bind(null,xe,o,f,a),o.dispatch=a,l.memoizedState=e,[t,a,!1]}function rp(e){var t=lt();return op(t,Ke,e)}function op(e,t,a){if(t=Fu(e,t,ip)[0],e=Co(oa)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=$l(t)}catch(g){throw g===Li?vo:g}else l=t;t=lt();var o=t.queue,f=o.dispatch;return a!==t.memoizedState&&(xe.flags|=2048,Gi(9,{destroy:void 0},Qx.bind(null,o,a),null)),[l,f,e]}function Qx(e,t){e.action=t}function cp(e){var t=lt(),a=Ke;if(a!==null)return op(t,a,e);lt(),t=t.memoizedState,a=lt();var l=a.queue.dispatch;return a.memoizedState=e,[t,l,!1]}function Gi(e,t,a,l){return e={tag:e,create:a,deps:l,inst:t,next:null},t=xe.updateQueue,t===null&&(t=_o(),xe.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(l=a.next,a.next=e,e.next=l,t.lastEffect=e),e}function up(){return lt().memoizedState}function To(e,t,a,l){var o=kt();xe.flags|=e,o.memoizedState=Gi(1|t,{destroy:void 0},a,l===void 0?null:l)}function Mo(e,t,a,l){var o=lt();l=l===void 0?null:l;var f=o.memoizedState.inst;Ke!==null&&l!==null&&Vu(l,Ke.memoizedState.deps)?o.memoizedState=Gi(t,f,a,l):(xe.flags|=e,o.memoizedState=Gi(1|t,f,a,l))}function fp(e,t){To(8390656,8,e,t)}function Wu(e,t){Mo(2048,8,e,t)}function Gx(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 dp(e){var t=lt().memoizedState;return Gx({ref:t,nextImpl:e}),function(){if((He&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function hp(e,t){return Mo(4,2,e,t)}function mp(e,t){return Mo(4,4,e,t)}function pp(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 yp(e,t,a){a=a!=null?a.concat([e]):null,Mo(4,4,pp.bind(null,t,e),a)}function ef(){}function gp(e,t){var a=lt();t=t===void 0?null:t;var l=a.memoizedState;return t!==null&&Vu(t,l[1])?l[0]:(a.memoizedState=[e,t],e)}function vp(e,t){var a=lt();t=t===void 0?null:t;var l=a.memoizedState;if(t!==null&&Vu(t,l[1]))return l[0];if(l=e(),qs){Ea(!0);try{e()}finally{Ea(!1)}}return a.memoizedState=[l,t],l}function tf(e,t,a){return a===void 0||(ra&1073741824)!==0&&(Me&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=by(),xe.lanes|=e,Qa|=e,a)}function bp(e,t,a,l){return an(a,t)?a:qi.current!==null?(e=tf(e,a,l),an(e,t)||(ct=!0),e):(ra&42)===0||(ra&1073741824)!==0&&(Me&261930)===0?(ct=!0,e.memoizedState=a):(e=by(),xe.lanes|=e,Qa|=e,t)}function xp(e,t,a,l,o){var f=K.p;K.p=f!==0&&8>f?f:8;var g=L.T,S={};L.T=S,sf(e,!1,t,a);try{var _=o(),H=L.S;if(H!==null&&H(S,_),_!==null&&typeof _=="object"&&typeof _.then=="function"){var X=Lx(_,l);Wl(e,t,X,un(e))}else Wl(e,t,l,un(e))}catch(J){Wl(e,t,{then:function(){},status:"rejected",reason:J},un())}finally{K.p=f,g!==null&&S.types!==null&&(g.types=S.types),L.T=g}}function Vx(){}function nf(e,t,a,l){if(e.tag!==5)throw Error(r(476));var o=Sp(e).queue;xp(e,o,t,ue,a===null?Vx:function(){return jp(e),a(l)})}function Sp(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:oa,lastRenderedState:ue},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:oa,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function jp(e){var t=Sp(e);t.next===null&&(t=e.alternate.memoizedState),Wl(e,t.next.queue,{},un())}function af(){return jt(yr)}function wp(){return lt().memoizedState}function Np(){return lt().memoizedState}function Px(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=un();e=Da(a);var l=Ua(t,e,a);l!==null&&(Zt(l,t,a),Zl(l,t,a)),t={cache:Ou()},e.payload=t;return}t=t.return}}function Yx(e,t,a){var l=un();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Ao(e)?_p(t,a):(a=Su(e,t,a,l),a!==null&&(Zt(a,e,l),Ep(a,t,l)))}function Rp(e,t,a){var l=un();Wl(e,t,a,l)}function Wl(e,t,a,l){var o={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Ao(e))_p(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,an(S,g))return uo(e,t,o,0),Ie===null&&co(),!1}catch{}finally{}if(a=Su(e,t,o,l),a!==null)return Zt(a,e,l),Ep(a,t,l),!0}return!1}function sf(e,t,a,l){if(l={lane:2,revertLane:Lf(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Ao(e)){if(t)throw Error(r(479))}else t=Su(e,a,l,2),t!==null&&Zt(t,e,2)}function Ao(e){var t=e.alternate;return e===xe||t!==null&&t===xe}function _p(e,t){Hi=No=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Ep(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,Oh(e,a)}}var er={readContext:jt,use:Eo,useCallback:nt,useContext:nt,useEffect:nt,useImperativeHandle:nt,useLayoutEffect:nt,useInsertionEffect:nt,useMemo:nt,useReducer:nt,useRef:nt,useState:nt,useDebugValue:nt,useDeferredValue:nt,useTransition:nt,useSyncExternalStore:nt,useId:nt,useHostTransitionStatus:nt,useFormState:nt,useActionState:nt,useOptimistic:nt,useMemoCache:nt,useCacheRefresh:nt};er.useEffectEvent=nt;var Cp={readContext:jt,use:Eo,useCallback:function(e,t){return kt().memoizedState=[e,t===void 0?null:t],e},useContext:jt,useEffect:fp,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,To(4194308,4,pp.bind(null,t,e),a)},useLayoutEffect:function(e,t){return To(4194308,4,e,t)},useInsertionEffect:function(e,t){To(4,2,e,t)},useMemo:function(e,t){var a=kt();t=t===void 0?null:t;var l=e();if(qs){Ea(!0);try{e()}finally{Ea(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=kt();if(a!==void 0){var o=a(t);if(qs){Ea(!0);try{a(t)}finally{Ea(!1)}}}else o=t;return l.memoizedState=l.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},l.queue=e,e=e.dispatch=Yx.bind(null,xe,e),[l.memoizedState,e]},useRef:function(e){var t=kt();return e={current:e},t.memoizedState=e},useState:function(e){e=Ju(e);var t=e.queue,a=Rp.bind(null,xe,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:ef,useDeferredValue:function(e,t){var a=kt();return tf(a,e,t)},useTransition:function(){var e=Ju(!1);return e=xp.bind(null,xe,e.queue,!0,!1),kt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=xe,o=kt();if(ke){if(a===void 0)throw Error(r(407));a=a()}else{if(a=t(),Ie===null)throw Error(r(349));(Me&127)!==0||Fm(l,t,a)}o.memoizedState=a;var f={value:a,getSnapshot:t};return o.queue=f,fp(Jm.bind(null,l,f,e),[e]),l.flags|=2048,Gi(9,{destroy:void 0},Im.bind(null,l,f,a,t),null),a},useId:function(){var e=kt(),t=Ie.identifierPrefix;if(ke){var a=Qn,l=Hn;a=(l&~(1<<32-nn(l)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Ro++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=Bx++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:af,useFormState:lp,useActionState:lp,useOptimistic:function(e){var t=kt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=sf.bind(null,xe,!0,a),a.dispatch=t,[e,t]},useMemoCache:Zu,useCacheRefresh:function(){return kt().memoizedState=Px.bind(null,xe)},useEffectEvent:function(e){var t=kt(),a={impl:e};return t.memoizedState=a,function(){if((He&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}},lf={readContext:jt,use:Eo,useCallback:gp,useContext:jt,useEffect:Wu,useImperativeHandle:yp,useInsertionEffect:hp,useLayoutEffect:mp,useMemo:vp,useReducer:Co,useRef:up,useState:function(){return Co(oa)},useDebugValue:ef,useDeferredValue:function(e,t){var a=lt();return bp(a,Ke.memoizedState,e,t)},useTransition:function(){var e=Co(oa)[0],t=lt().memoizedState;return[typeof e=="boolean"?e:$l(e),t]},useSyncExternalStore:Zm,useId:wp,useHostTransitionStatus:af,useFormState:rp,useActionState:rp,useOptimistic:function(e,t){var a=lt();return ep(a,Ke,e,t)},useMemoCache:Zu,useCacheRefresh:Np};lf.useEffectEvent=dp;var Tp={readContext:jt,use:Eo,useCallback:gp,useContext:jt,useEffect:Wu,useImperativeHandle:yp,useInsertionEffect:hp,useLayoutEffect:mp,useMemo:vp,useReducer:Iu,useRef:up,useState:function(){return Iu(oa)},useDebugValue:ef,useDeferredValue:function(e,t){var a=lt();return Ke===null?tf(a,e,t):bp(a,Ke.memoizedState,e,t)},useTransition:function(){var e=Iu(oa)[0],t=lt().memoizedState;return[typeof e=="boolean"?e:$l(e),t]},useSyncExternalStore:Zm,useId:wp,useHostTransitionStatus:af,useFormState:cp,useActionState:cp,useOptimistic:function(e,t){var a=lt();return Ke!==null?ep(a,Ke,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Zu,useCacheRefresh:Np};Tp.useEffectEvent=dp;function rf(e,t,a,l){t=e.memoizedState,a=a(l,t),a=a==null?t:v({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var of={enqueueSetState:function(e,t,a){e=e._reactInternals;var l=un(),o=Da(l);o.payload=t,a!=null&&(o.callback=a),t=Ua(e,o,l),t!==null&&(Zt(t,e,l),Zl(t,e,l))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var l=un(),o=Da(l);o.tag=1,o.payload=t,a!=null&&(o.callback=a),t=Ua(e,o,l),t!==null&&(Zt(t,e,l),Zl(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=un(),l=Da(a);l.tag=2,t!=null&&(l.callback=t),t=Ua(e,l,a),t!==null&&(Zt(t,e,a),Zl(t,e,a))}};function Mp(e,t,a,l,o,f,g){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,f,g):t.prototype&&t.prototype.isPureReactComponent?!Hl(a,l)||!Hl(o,f):!0}function Ap(e,t,a,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,l),t.state!==e&&of.enqueueReplaceState(t,t.state,null)}function Hs(e,t){var a=t;if("ref"in t){a={};for(var l in t)l!=="ref"&&(a[l]=t[l])}if(e=e.defaultProps){a===t&&(a=v({},a));for(var o in e)a[o]===void 0&&(a[o]=e[o])}return a}function Op(e){oo(e)}function kp(e){console.error(e)}function zp(e){oo(e)}function Oo(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Dp(e,t,a){try{var l=e.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function cf(e,t,a){return a=Da(a),a.tag=3,a.payload={element:null},a.callback=function(){Oo(e,t)},a}function Up(e){return e=Da(e),e.tag=3,e}function Lp(e,t,a,l){var o=a.type.getDerivedStateFromError;if(typeof o=="function"){var f=l.value;e.payload=function(){return o(f)},e.callback=function(){Dp(t,a,l)}}var g=a.stateNode;g!==null&&typeof g.componentDidCatch=="function"&&(e.callback=function(){Dp(t,a,l),typeof o!="function"&&(Ga===null?Ga=new Set([this]):Ga.add(this));var S=l.stack;this.componentDidCatch(l.value,{componentStack:S!==null?S:""})})}function Kx(e,t,a,l,o){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=a.alternate,t!==null&&zi(t,a,o,!0),a=ln.current,a!==null){switch(a.tag){case 31:case 13:return wn===null?Po():a.alternate===null&&at===0&&(at=3),a.flags&=-257,a.flags|=65536,a.lanes=o,l===bo?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([l]):t.add(l),zf(e,l,o)),!1;case 22:return a.flags|=65536,l===bo?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([l]):a.add(l)),zf(e,l,o)),!1}throw Error(r(435,a.tag))}return zf(e,l,o),Po(),!1}if(ke)return t=ln.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,l!==Eu&&(e=Error(r(422),{cause:l}),Vl(bn(e,a)))):(l!==Eu&&(t=Error(r(423),{cause:l}),Vl(bn(t,a))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,l=bn(l,a),o=cf(e.stateNode,l,o),Bu(e,o),at!==4&&(at=2)),!1;var f=Error(r(520),{cause:l});if(f=bn(f,a),or===null?or=[f]:or.push(f),at!==4&&(at=2),t===null)return!0;l=bn(l,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=o&-o,a.lanes|=e,e=cf(a.stateNode,l,e),Bu(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=Up(o),Lp(o,e,a,l),Bu(a,o),!1}a=a.return}while(a!==null);return!1}var uf=Error(r(461)),ct=!1;function wt(e,t,a,l){t.child=e===null?Qm(t,null,a,l):Bs(t,e.child,a,l)}function Bp(e,t,a,l,o){a=a.render;var f=t.ref;if("ref"in l){var g={};for(var S in l)S!=="ref"&&(g[S]=l[S])}else g=l;return zs(t),l=Pu(e,t,a,g,f,o),S=Yu(),e!==null&&!ct?(Ku(e,t,o),ca(e,t,o)):(ke&&S&&Ru(t),t.flags|=1,wt(e,t,l,o),t.child)}function qp(e,t,a,l,o){if(e===null){var f=a.type;return typeof f=="function"&&!ju(f)&&f.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=f,Hp(e,t,f,l,o)):(e=ho(a.type,null,l,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,!vf(e,o)){var g=f.memoizedProps;if(a=a.compare,a=a!==null?a:Hl,a(g,l)&&e.ref===t.ref)return ca(e,t,o)}return t.flags|=1,e=aa(f,l),e.ref=t.ref,e.return=t,t.child=e}function Hp(e,t,a,l,o){if(e!==null){var f=e.memoizedProps;if(Hl(f,l)&&e.ref===t.ref)if(ct=!1,t.pendingProps=l=f,vf(e,o))(e.flags&131072)!==0&&(ct=!0);else return t.lanes=e.lanes,ca(e,t,o)}return ff(e,t,a,l,o)}function Qp(e,t,a,l){var o=l.children,f=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(f=f!==null?f.baseLanes|a:a,e!==null){for(l=t.child=e.child,o=0;l!==null;)o=o|l.lanes|l.childLanes,l=l.sibling;l=o&~f}else l=0,t.child=null;return Gp(e,t,f,a,l)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&go(t,f!==null?f.cachePool:null),f!==null?Pm(t,f):Hu(),Ym(t);else return l=t.lanes=536870912,Gp(e,t,f!==null?f.baseLanes|a:a,a,l)}else f!==null?(go(t,f.cachePool),Pm(t,f),Ba(),t.memoizedState=null):(e!==null&&go(t,null),Hu(),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 Gp(e,t,a,l,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),Hu(),Ym(t),e!==null&&zi(e,t,l,!0),t.childLanes=o,null}function ko(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 Vp(e,t,a){return Bs(t,e.child,null,a),e=ko(t,t.pendingProps),e.flags|=2,rn(t),t.memoizedState=null,e}function Xx(e,t,a){var l=t.pendingProps,o=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ke){if(l.mode==="hidden")return e=ko(t,l),t.lanes=536870912,tr(null,e);if(Gu(t),(e=Je)?(e=tg(e,jn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ma!==null?{id:Hn,overflow:Qn}:null,retryLane:536870912,hydrationErrors:null},a=_m(e),a.return=t,t.child=a,St=t,Je=null)):e=null,e===null)throw Oa(t);return t.lanes=536870912,null}return ko(t,l)}var f=e.memoizedState;if(f!==null){var g=f.dehydrated;if(Gu(t),o)if(t.flags&256)t.flags&=-257,t=Vp(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(l=Ie,l!==null&&(g=kh(l,a),g!==0&&g!==f.retryLane))throw f.retryLane=g,Ms(e,g),Zt(l,e,g),uf;Po(),t=Vp(e,t,a)}else e=f.treeContext,Je=Nn(g.nextSibling),St=t,ke=!0,Aa=null,jn=!1,e!==null&&Tm(t,e),t=ko(t,l),t.flags|=4096;return t}return e=aa(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function zo(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 ff(e,t,a,l,o){return zs(t),a=Pu(e,t,a,l,void 0,o),l=Yu(),e!==null&&!ct?(Ku(e,t,o),ca(e,t,o)):(ke&&l&&Ru(t),t.flags|=1,wt(e,t,a,o),t.child)}function Pp(e,t,a,l,o,f){return zs(t),t.updateQueue=null,a=Xm(t,l,a,o),Km(e),l=Yu(),e!==null&&!ct?(Ku(e,t,f),ca(e,t,f)):(ke&&l&&Ru(t),t.flags|=1,wt(e,t,a,f),t.child)}function Yp(e,t,a,l,o){if(zs(t),t.stateNode===null){var f=Mi,g=a.contextType;typeof g=="object"&&g!==null&&(f=jt(g)),f=new a(l,f),t.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=of,t.stateNode=f,f._reactInternals=t,f=t.stateNode,f.props=l,f.state=t.memoizedState,f.refs={},Uu(t),g=a.contextType,f.context=typeof g=="object"&&g!==null?jt(g):Mi,f.state=t.memoizedState,g=a.getDerivedStateFromProps,typeof g=="function"&&(rf(t,a,g,l),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&&of.enqueueReplaceState(f,f.state,null),Il(t,l,f,o),Fl(),f.state=t.memoizedState),typeof f.componentDidMount=="function"&&(t.flags|=4194308),l=!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=Mi,typeof X=="object"&&X!==null&&(g=jt(X));var J=a.getDerivedStateFromProps;X=typeof J=="function"||typeof f.getSnapshotBeforeUpdate=="function",S=t.pendingProps!==S,X||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(S||H!==g)&&Ap(t,f,l,g),za=!1;var G=t.memoizedState;f.state=G,Il(t,l,f,o),Fl(),H=t.memoizedState,S||G!==H||za?(typeof J=="function"&&(rf(t,a,J,l),H=t.memoizedState),(_=za||Mp(t,a,_,l,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=l,t.memoizedState=H),f.props=l,f.state=H,f.context=g,l=_):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{f=t.stateNode,Lu(e,t),g=t.memoizedProps,X=Hs(a,g),f.props=X,J=t.pendingProps,G=f.context,H=a.contextType,_=Mi,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!==J||G!==_)&&Ap(t,f,l,_),za=!1,G=t.memoizedState,f.state=G,Il(t,l,f,o),Fl();var P=t.memoizedState;g!==J||G!==P||za||e!==null&&e.dependencies!==null&&po(e.dependencies)?(typeof S=="function"&&(rf(t,a,S,l),P=t.memoizedState),(X=za||Mp(t,a,X,l,G,P,_)||e!==null&&e.dependencies!==null&&po(e.dependencies))?(H||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(l,P,_),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(l,P,_)),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=l,t.memoizedState=P),f.props=l,f.state=P,f.context=_,l=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),l=!1)}return f=l,zo(e,t),l=(t.flags&128)!==0,f||l?(f=t.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:f.render(),t.flags|=1,e!==null&&l?(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=ca(e,t,o),e}function Kp(e,t,a,l){return Os(),t.flags|=256,wt(e,t,a,l),t.child}var df={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function hf(e){return{baseLanes:e,cachePool:Dm()}}function mf(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=cn),e}function Xp(e,t,a){var l=t.pendingProps,o=!1,f=(t.flags&128)!==0,g;if((g=f)||(g=e!==null&&e.memoizedState===null?!1:(it.current&2)!==0),g&&(o=!0,t.flags&=-129),g=(t.flags&32)!==0,t.flags&=-33,e===null){if(ke){if(o?La(t):Ba(),(e=Je)?(e=tg(e,jn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ma!==null?{id:Hn,overflow:Qn}:null,retryLane:536870912,hydrationErrors:null},a=_m(e),a.return=t,t.child=a,St=t,Je=null)):e=null,e===null)throw Oa(t);return If(e)?t.lanes=32:t.lanes=536870912,null}var S=l.children;return l=l.fallback,o?(Ba(),o=t.mode,S=Do({mode:"hidden",children:S},o),l=As(l,o,a,null),S.return=t,l.return=t,S.sibling=l,t.child=S,l=t.child,l.memoizedState=hf(a),l.childLanes=mf(e,g,a),t.memoizedState=df,tr(null,l)):(La(t),pf(t,S))}var _=e.memoizedState;if(_!==null&&(S=_.dehydrated,S!==null)){if(f)t.flags&256?(La(t),t.flags&=-257,t=yf(e,t,a)):t.memoizedState!==null?(Ba(),t.child=e.child,t.flags|=128,t=null):(Ba(),S=l.fallback,o=t.mode,l=Do({mode:"visible",children:l.children},o),S=As(S,o,a,null),S.flags|=2,l.return=t,S.return=t,l.sibling=S,t.child=l,Bs(t,e.child,null,a),l=t.child,l.memoizedState=hf(a),l.childLanes=mf(e,g,a),t.memoizedState=df,t=tr(null,l));else if(La(t),If(S)){if(g=S.nextSibling&&S.nextSibling.dataset,g)var H=g.dgst;g=H,l=Error(r(419)),l.stack="",l.digest=g,Vl({value:l,source:null,stack:null}),t=yf(e,t,a)}else if(ct||zi(e,t,a,!1),g=(a&e.childLanes)!==0,ct||g){if(g=Ie,g!==null&&(l=kh(g,a),l!==0&&l!==_.retryLane))throw _.retryLane=l,Ms(e,l),Zt(g,e,l),uf;Ff(S)||Po(),t=yf(e,t,a)}else Ff(S)?(t.flags|=192,t.child=e.child,t=null):(e=_.treeContext,Je=Nn(S.nextSibling),St=t,ke=!0,Aa=null,jn=!1,e!==null&&Tm(t,e),t=pf(t,l.children),t.flags|=4096);return t}return o?(Ba(),S=l.fallback,o=t.mode,_=e.child,H=_.sibling,l=aa(_,{mode:"hidden",children:l.children}),l.subtreeFlags=_.subtreeFlags&65011712,H!==null?S=aa(H,S):(S=As(S,o,a,null),S.flags|=2),S.return=t,l.return=t,l.sibling=S,t.child=l,tr(null,l),l=t.child,S=e.child.memoizedState,S===null?S=hf(a):(o=S.cachePool,o!==null?(_=rt._currentValue,o=o.parent!==_?{parent:_,pool:_}:o):o=Dm(),S={baseLanes:S.baseLanes|a,cachePool:o}),l.memoizedState=S,l.childLanes=mf(e,g,a),t.memoizedState=df,tr(e.child,l)):(La(t),a=e.child,e=a.sibling,a=aa(a,{mode:"visible",children:l.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 pf(e,t){return t=Do({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Do(e,t){return e=sn(22,e,null,t),e.lanes=0,e}function yf(e,t,a){return Bs(t,e.child,null,a),e=pf(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Zp(e,t,a){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Mu(e.return,t,a)}function gf(e,t,a,l,o,f){var g=e.memoizedState;g===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:o,treeForkCount:f}:(g.isBackwards=t,g.rendering=null,g.renderingStartTime=0,g.last=l,g.tail=a,g.tailMode=o,g.treeForkCount=f)}function Fp(e,t,a){var l=t.pendingProps,o=l.revealOrder,f=l.tail;l=l.children;var g=it.current,S=(g&2)!==0;if(S?(g=g&1|2,t.flags|=128):g&=1,ae(it,g),wt(e,t,l,a),l=ke?Gl:0,!S&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Zp(e,a,t);else if(e.tag===19)Zp(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),gf(t,!1,o,a,f,l);break;case"backwards":case"unstable_legacy-backwards":for(a=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&wo(e)===null){t.child=o;break}e=o.sibling,o.sibling=a,a=o,o=e}gf(t,!0,a,null,f,l);break;case"together":gf(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function ca(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=aa(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=aa(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function vf(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&po(e)))}function Zx(e,t,a){switch(t.tag){case 3:Pe(t,t.stateNode.containerInfo),ka(t,rt,e.memoizedState.cache),Os();break;case 27:case 5:pn(t);break;case 4:Pe(t,t.stateNode.containerInfo);break;case 10:ka(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Gu(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(La(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Xp(e,t,a):(La(t),e=ca(e,t,a),e!==null?e.sibling:null);La(t);break;case 19:var o=(e.flags&128)!==0;if(l=(a&t.childLanes)!==0,l||(zi(e,t,a,!1),l=(a&t.childLanes)!==0),o){if(l)return Fp(e,t,a);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),ae(it,it.current),l)break;return null;case 22:return t.lanes=0,Qp(e,t,a,t.pendingProps);case 24:ka(t,rt,e.memoizedState.cache)}return ca(e,t,a)}function Ip(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)ct=!0;else{if(!vf(e,a)&&(t.flags&128)===0)return ct=!1,Zx(e,t,a);ct=(e.flags&131072)!==0}else ct=!1,ke&&(t.flags&1048576)!==0&&Cm(t,Gl,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=Us(t.elementType),t.type=e,typeof e=="function")ju(e)?(l=Hs(e,l),t.tag=1,t=Yp(null,t,e,l,a)):(t.tag=0,t=ff(null,t,e,l,a));else{if(e!=null){var o=e.$$typeof;if(o===C){t.tag=11,t=Bp(null,t,e,l,a);break e}else if(o===z){t.tag=14,t=qp(null,t,e,l,a);break e}}throw t=ee(e)||e,Error(r(306,t,""))}}return t;case 0:return ff(e,t,t.type,t.pendingProps,a);case 1:return l=t.type,o=Hs(l,t.pendingProps),Yp(e,t,l,o,a);case 3:e:{if(Pe(t,t.stateNode.containerInfo),e===null)throw Error(r(387));l=t.pendingProps;var f=t.memoizedState;o=f.element,Lu(e,t),Il(t,l,null,a);var g=t.memoizedState;if(l=g.cache,ka(t,rt,l),l!==f.cache&&Au(t,[rt],a,!0),Fl(),l=g.element,f.isDehydrated)if(f={element:l,isDehydrated:!1,cache:g.cache},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){t=Kp(e,t,l,a);break e}else if(l!==o){o=bn(Error(r(424)),t),Vl(o),t=Kp(e,t,l,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Je=Nn(e.firstChild),St=t,ke=!0,Aa=null,jn=!0,a=Qm(t,null,l,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Os(),l===o){t=ca(e,t,a);break e}wt(e,t,l,a)}t=t.child}return t;case 26:return zo(e,t),e===null?(a=rg(t.type,null,t.pendingProps,null))?t.memoizedState=a:ke||(a=t.type,e=t.pendingProps,l=Jo(me.current).createElement(a),l[xt]=t,l[Gt]=e,Nt(l,a,e),pt(l),t.stateNode=l):t.memoizedState=rg(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return pn(t),e===null&&ke&&(l=t.stateNode=sg(t.type,t.pendingProps,me.current),St=t,jn=!0,o=Je,Ka(t.type)?(Jf=o,Je=Nn(l.firstChild)):Je=o),wt(e,t,t.pendingProps.children,a),zo(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ke&&((o=l=Je)&&(l=N1(l,t.type,t.pendingProps,jn),l!==null?(t.stateNode=l,St=t,Je=Nn(l.firstChild),jn=!1,o=!0):o=!1),o||Oa(t)),pn(t),o=t.type,f=t.pendingProps,g=e!==null?e.memoizedProps:null,l=f.children,Kf(o,f)?l=null:g!==null&&Kf(o,g)&&(t.flags|=32),t.memoizedState!==null&&(o=Pu(e,t,qx,null,null,a),yr._currentValue=o),zo(e,t),wt(e,t,l,a),t.child;case 6:return e===null&&ke&&((e=a=Je)&&(a=R1(a,t.pendingProps,jn),a!==null?(t.stateNode=a,St=t,Je=null,e=!0):e=!1),e||Oa(t)),null;case 13:return Xp(e,t,a);case 4:return Pe(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=Bs(t,null,l,a):wt(e,t,l,a),t.child;case 11:return Bp(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 l=t.pendingProps,ka(t,t.type,l.value),wt(e,t,l.children,a),t.child;case 9:return o=t.type._context,l=t.pendingProps.children,zs(t),o=jt(o),l=l(o),t.flags|=1,wt(e,t,l,a),t.child;case 14:return qp(e,t,t.type,t.pendingProps,a);case 15:return Hp(e,t,t.type,t.pendingProps,a);case 19:return Fp(e,t,a);case 31:return Xx(e,t,a);case 22:return Qp(e,t,a,t.pendingProps);case 24:return zs(t),l=jt(rt),e===null?(o=zu(),o===null&&(o=Ie,f=Ou(),o.pooledCache=f,f.refCount++,f!==null&&(o.pooledCacheLanes|=a),o=f),t.memoizedState={parent:l,cache:o},Uu(t),ka(t,rt,o)):((e.lanes&a)!==0&&(Lu(e,t),Il(t,null,null,a),Fl()),o=e.memoizedState,f=t.memoizedState,o.parent!==l?(o={parent:l,cache:l},t.memoizedState=o,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=o),ka(t,rt,l)):(l=f.cache,ka(t,rt,l),l!==o.cache&&Au(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 ua(e){e.flags|=4}function bf(e,t,a,l,o){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(o&335544128)===o)if(e.stateNode.complete)e.flags|=8192;else if(wy())e.flags|=8192;else throw Ls=bo,Du}else e.flags&=-16777217}function Jp(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!dg(t))if(wy())e.flags|=8192;else throw Ls=bo,Du}function Uo(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Mh():536870912,e.lanes|=t,Ki|=t)}function nr(e,t){if(!ke)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function $e(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,l=0;if(t)for(var o=e.child;o!==null;)a|=o.lanes|o.childLanes,l|=o.subtreeFlags&65011712,l|=o.flags&65011712,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)a|=o.lanes|o.childLanes,l|=o.subtreeFlags,l|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=l,e.childLanes=a,t}function Fx(e,t,a){var l=t.pendingProps;switch(_u(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return $e(t),null;case 1:return $e(t),null;case 3:return a=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),la(rt),ge(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(ki(t)?ua(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Cu())),$e(t),null;case 26:var o=t.type,f=t.memoizedState;return e===null?(ua(t),f!==null?($e(t),Jp(t,f)):($e(t),bf(t,o,null,l,a))):f?f!==e.memoizedState?(ua(t),$e(t),Jp(t,f)):($e(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&ua(t),$e(t),bf(t,o,e,l,a)),null;case 27:if(Qt(t),a=me.current,o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&ua(t);else{if(!l){if(t.stateNode===null)throw Error(r(166));return $e(t),null}e=se.current,ki(t)?Mm(t):(e=sg(o,l,a),t.stateNode=e,ua(t))}return $e(t),null;case 5:if(Qt(t),o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&ua(t);else{if(!l){if(t.stateNode===null)throw Error(r(166));return $e(t),null}if(f=se.current,ki(t))Mm(t);else{var g=Jo(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 l.is=="string"?g.createElement("select",{is:l.is}):g.createElement("select"),l.multiple?f.multiple=!0:l.size&&(f.size=l.size);break;default:f=typeof l.is=="string"?g.createElement(o,{is:l.is}):g.createElement(o)}}f[xt]=t,f[Gt]=l;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,l),o){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&ua(t)}}return $e(t),bf(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&ua(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(r(166));if(e=me.current,ki(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,o=St,o!==null)switch(o.tag){case 27:case 5:l=o.memoizedProps}e[xt]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||Xy(e.nodeValue,a)),e||Oa(t,!0)}else e=Jo(e).createTextNode(l),e[xt]=t,t.stateNode=e}return $e(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(l=ki(t),a!==null){if(e===null){if(!l)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[xt]=t}else Os(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;$e(t),e=!1}else a=Cu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(rn(t),t):(rn(t),null);if((t.flags&128)!==0)throw Error(r(558))}return $e(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=ki(t),l!==null&&l.dehydrated!==null){if(e===null){if(!o)throw Error(r(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));o[xt]=t}else Os(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;$e(t),o=!1}else o=Cu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(rn(t),t):(rn(t),null)}return rn(t),(t.flags&128)!==0?(t.lanes=a,t):(a=l!==null,e=e!==null&&e.memoizedState!==null,a&&(l=t.child,o=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(o=l.alternate.memoizedState.cachePool.pool),f=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(f=l.memoizedState.cachePool.pool),f!==o&&(l.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),Uo(t,t.updateQueue),$e(t),null);case 4:return ge(),e===null&&Qf(t.stateNode.containerInfo),$e(t),null;case 10:return la(t.type),$e(t),null;case 19:if(I(it),l=t.memoizedState,l===null)return $e(t),null;if(o=(t.flags&128)!==0,f=l.rendering,f===null)if(o)nr(l,!1);else{if(at!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=wo(e),f!==null){for(t.flags|=128,nr(l,!1),e=f.updateQueue,t.updateQueue=e,Uo(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Rm(a,e),a=a.sibling;return ae(it,it.current&1|2),ke&&sa(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&Et()>Qo&&(t.flags|=128,o=!0,nr(l,!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(l,!0),l.tail===null&&l.tailMode==="hidden"&&!f.alternate&&!ke)return $e(t),null}else 2*Et()-l.renderingStartTime>Qo&&a!==536870912&&(t.flags|=128,o=!0,nr(l,!1),t.lanes=4194304);l.isBackwards?(f.sibling=t.child,t.child=f):(e=l.last,e!==null?e.sibling=f:t.child=f,l.last=f)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=Et(),e.sibling=null,a=it.current,ae(it,o?a&1|2:a&1),ke&&sa(t,l.treeForkCount),e):($e(t),null);case 22:case 23:return rn(t),Qu(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(a&536870912)!==0&&(t.flags&128)===0&&($e(t),t.subtreeFlags&6&&(t.flags|=8192)):$e(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),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==a&&(t.flags|=2048),e!==null&&I(Ds),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),la(rt),$e(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function Ix(e,t){switch(_u(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return la(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 Qt(t),null;case 31:if(t.memoizedState!==null){if(rn(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(rn(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 I(it),null;case 4:return ge(),null;case 10:return la(t.type),null;case 22:case 23:return rn(t),Qu(),e!==null&&I(Ds),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return la(rt),null;case 25:return null;default:return null}}function $p(e,t){switch(_u(t),t.tag){case 3:la(rt),ge();break;case 26:case 27:case 5:Qt(t);break;case 4:ge();break;case 31:t.memoizedState!==null&&rn(t);break;case 13:rn(t);break;case 19:I(it);break;case 10:la(t.type);break;case 22:case 23:rn(t),Qu(),e!==null&&I(Ds);break;case 24:la(rt)}}function ar(e,t){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var o=l.next;a=o;do{if((a.tag&e)===e){l=void 0;var f=a.create,g=a.inst;l=f(),g.destroy=l}a=a.next}while(a!==o)}}catch(S){Ve(t,t.return,S)}}function qa(e,t,a){try{var l=t.updateQueue,o=l!==null?l.lastEffect:null;if(o!==null){var f=o.next;l=f;do{if((l.tag&e)===e){var g=l.inst,S=g.destroy;if(S!==void 0){g.destroy=void 0,o=t;var _=a,H=S;try{H()}catch(X){Ve(o,_,X)}}}l=l.next}while(l!==f)}}catch(X){Ve(t,t.return,X)}}function Wp(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Vm(t,a)}catch(l){Ve(e,e.return,l)}}}function ey(e,t,a){a.props=Hs(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){Ve(e,t,l)}}function sr(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof a=="function"?e.refCleanup=a(l):a.current=l}}catch(o){Ve(e,t,o)}}function Gn(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(o){Ve(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){Ve(e,t,o)}else a.current=null}function ty(e){var t=e.type,a=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(o){Ve(e,e.return,o)}}function xf(e,t,a){try{var l=e.stateNode;v1(l,e.type,a,t),l[Gt]=t}catch(o){Ve(e,e.return,o)}}function ny(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ka(e.type)||e.tag===4}function Sf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ny(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 jf(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=ta));else if(l!==4&&(l===27&&Ka(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(jf(e,t,a),e=e.sibling;e!==null;)jf(e,t,a),e=e.sibling}function Lo(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(l!==4&&(l===27&&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 ay(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);Nt(t,l,a),t[xt]=e,t[Gt]=a}catch(f){Ve(e,e.return,f)}}var fa=!1,ut=!1,wf=!1,sy=typeof WeakSet=="function"?WeakSet:Set,yt=null;function Jx(e,t){if(e=e.containerInfo,Pf=sc,e=ym(e),pu(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var o=l.anchorOffset,f=l.focusNode;l=l.focusOffset;try{a.nodeType,f.nodeType}catch{a=null;break e}var g=0,S=-1,_=-1,H=0,X=0,J=e,G=null;t:for(;;){for(var P;J!==a||o!==0&&J.nodeType!==3||(S=g+o),J!==f||l!==0&&J.nodeType!==3||(_=g+l),J.nodeType===3&&(g+=J.nodeValue.length),(P=J.firstChild)!==null;)G=J,J=P;for(;;){if(J===e)break t;if(G===a&&++H===o&&(S=g),G===f&&++X===l&&(_=g),(P=J.nextSibling)!==null)break;J=G,G=J.parentNode}J=P}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,l=a.stateNode;try{var ce=Hs(a.type,o);e=l.getSnapshotBeforeUpdate(ce,f),l.__reactInternalSnapshotBeforeUpdate=e}catch(ye){Ve(a,a.return,ye)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Zf(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Zf(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 iy(e,t,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:ha(e,a),l&4&&ar(5,a);break;case 1:if(ha(e,a),l&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(g){Ve(a,a.return,g)}else{var o=Hs(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(g){Ve(a,a.return,g)}}l&64&&Wp(a),l&512&&sr(a,a.return);break;case 3:if(ha(e,a),l&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{Vm(e,t)}catch(g){Ve(a,a.return,g)}}break;case 27:t===null&&l&4&&ay(a);case 26:case 5:ha(e,a),t===null&&l&4&&ty(a),l&512&&sr(a,a.return);break;case 12:ha(e,a);break;case 31:ha(e,a),l&4&&oy(e,a);break;case 13:ha(e,a),l&4&&cy(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=l1.bind(null,a),_1(e,a))));break;case 22:if(l=a.memoizedState!==null||fa,!l){t=t!==null&&t.memoizedState!==null||ut,o=fa;var f=ut;fa=l,(ut=t)&&!f?ma(e,a,(a.subtreeFlags&8772)!==0):ha(e,a),fa=o,ut=f}break;case 30:break;default:ha(e,a)}}function ly(e){var t=e.alternate;t!==null&&(e.alternate=null,ly(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&$c(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 We=null,Pt=!1;function da(e,t,a){for(a=a.child;a!==null;)ry(e,t,a),a=a.sibling}function ry(e,t,a){if(tn&&typeof tn.onCommitFiberUnmount=="function")try{tn.onCommitFiberUnmount(Cl,a)}catch{}switch(a.tag){case 26:ut||Gn(a,t),da(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:ut||Gn(a,t);var l=We,o=Pt;Ka(a.type)&&(We=a.stateNode,Pt=!1),da(e,t,a),hr(a.stateNode),We=l,Pt=o;break;case 5:ut||Gn(a,t);case 6:if(l=We,o=Pt,We=null,da(e,t,a),We=l,Pt=o,We!==null)if(Pt)try{(We.nodeType===9?We.body:We.nodeName==="HTML"?We.ownerDocument.body:We).removeChild(a.stateNode)}catch(f){Ve(a,t,f)}else try{We.removeChild(a.stateNode)}catch(f){Ve(a,t,f)}break;case 18:We!==null&&(Pt?(e=We,Wy(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),el(e)):Wy(We,a.stateNode));break;case 4:l=We,o=Pt,We=a.stateNode.containerInfo,Pt=!0,da(e,t,a),We=l,Pt=o;break;case 0:case 11:case 14:case 15:qa(2,a,t),ut||qa(4,a,t),da(e,t,a);break;case 1:ut||(Gn(a,t),l=a.stateNode,typeof l.componentWillUnmount=="function"&&ey(a,t,l)),da(e,t,a);break;case 21:da(e,t,a);break;case 22:ut=(l=ut)||a.memoizedState!==null,da(e,t,a),ut=l;break;default:da(e,t,a)}}function oy(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{el(e)}catch(a){Ve(t,t.return,a)}}}function cy(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{el(e)}catch(a){Ve(t,t.return,a)}}function $x(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new sy),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new sy),t;default:throw Error(r(435,e.tag))}}function Bo(e,t){var a=$x(e);t.forEach(function(l){if(!a.has(l)){a.add(l);var o=r1.bind(null,e,l);l.then(o,o)}})}function Yt(e,t){var a=t.deletions;if(a!==null)for(var l=0;l<a.length;l++){var o=a[l],f=e,g=t,S=g;e:for(;S!==null;){switch(S.tag){case 27:if(Ka(S.type)){We=S.stateNode,Pt=!1;break e}break;case 5:We=S.stateNode,Pt=!1;break e;case 3:case 4:We=S.stateNode.containerInfo,Pt=!0;break e}S=S.return}if(We===null)throw Error(r(160));ry(f,g,o),We=null,Pt=!1,f=o.alternate,f!==null&&(f.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)uy(t,e),t=t.sibling}var On=null;function uy(e,t){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Yt(t,e),Kt(e),l&4&&(qa(3,e,e.return),ar(3,e),qa(5,e,e.return));break;case 1:Yt(t,e),Kt(e),l&512&&(ut||a===null||Gn(a,a.return)),l&64&&fa&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?l:a.concat(l))));break;case 26:var o=On;if(Yt(t,e),Kt(e),l&512&&(ut||a===null||Gn(a,a.return)),l&4){var f=a!==null?a.memoizedState:null;if(l=e.memoizedState,a===null)if(l===null)if(e.stateNode===null){e:{l=e.type,a=e.memoizedProps,o=o.ownerDocument||o;t:switch(l){case"title":f=o.getElementsByTagName("title")[0],(!f||f[Al]||f[xt]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=o.createElement(l),o.head.insertBefore(f,o.querySelector("head > title"))),Nt(f,l,a),f[xt]=e,pt(f),l=f;break e;case"link":var g=ug("link","href",o).get(l+(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(l),Nt(f,l,a),o.head.appendChild(f);break;case"meta":if(g=ug("meta","content",o).get(l+(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(l),Nt(f,l,a),o.head.appendChild(f);break;default:throw Error(r(468,l))}f[xt]=e,pt(f),l=f}e.stateNode=l}else fg(o,e.type,e.stateNode);else e.stateNode=cg(o,l,e.memoizedProps);else f!==l?(f===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):f.count--,l===null?fg(o,e.type,e.stateNode):cg(o,l,e.memoizedProps)):l===null&&e.stateNode!==null&&xf(e,e.memoizedProps,a.memoizedProps)}break;case 27:Yt(t,e),Kt(e),l&512&&(ut||a===null||Gn(a,a.return)),a!==null&&l&4&&xf(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Yt(t,e),Kt(e),l&512&&(ut||a===null||Gn(a,a.return)),e.flags&32){o=e.stateNode;try{wi(o,"")}catch(ce){Ve(e,e.return,ce)}}l&4&&e.stateNode!=null&&(o=e.memoizedProps,xf(e,o,a!==null?a.memoizedProps:o)),l&1024&&(wf=!0);break;case 6:if(Yt(t,e),Kt(e),l&4){if(e.stateNode===null)throw Error(r(162));l=e.memoizedProps,a=e.stateNode;try{a.nodeValue=l}catch(ce){Ve(e,e.return,ce)}}break;case 3:if(ec=null,o=On,On=$o(t.containerInfo),Yt(t,e),On=o,Kt(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{el(t.containerInfo)}catch(ce){Ve(e,e.return,ce)}wf&&(wf=!1,fy(e));break;case 4:l=On,On=$o(e.stateNode.containerInfo),Yt(t,e),Kt(e),On=l;break;case 12:Yt(t,e),Kt(e);break;case 31:Yt(t,e),Kt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Bo(e,l)));break;case 13:Yt(t,e),Kt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Ho=Et()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Bo(e,l)));break;case 22:o=e.memoizedState!==null;var _=a!==null&&a.memoizedState!==null,H=fa,X=ut;if(fa=H||o,ut=X||_,Yt(t,e),ut=X,fa=H,Kt(e),l&8192)e:for(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,o&&(a===null||_||fa||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 J=_.memoizedProps.style,G=J!=null&&J.hasOwnProperty("display")?J.display:null;S.style.display=G==null||typeof G=="boolean"?"":(""+G).trim()}}catch(ce){Ve(_,_.return,ce)}}}else if(t.tag===6){if(a===null){_=t;try{_.stateNode.nodeValue=o?"":_.memoizedProps}catch(ce){Ve(_,_.return,ce)}}}else if(t.tag===18){if(a===null){_=t;try{var P=_.stateNode;o?eg(P,!0):eg(_.stateNode,!1)}catch(ce){Ve(_,_.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}l&4&&(l=e.updateQueue,l!==null&&(a=l.retryQueue,a!==null&&(l.retryQueue=null,Bo(e,a))));break;case 19:Yt(t,e),Kt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Bo(e,l)));break;case 30:break;case 21:break;default:Yt(t,e),Kt(e)}}function Kt(e){var t=e.flags;if(t&2){try{for(var a,l=e.return;l!==null;){if(ny(l)){a=l;break}l=l.return}if(a==null)throw Error(r(160));switch(a.tag){case 27:var o=a.stateNode,f=Sf(e);Lo(e,f,o);break;case 5:var g=a.stateNode;a.flags&32&&(wi(g,""),a.flags&=-33);var S=Sf(e);Lo(e,S,g);break;case 3:case 4:var _=a.stateNode.containerInfo,H=Sf(e);jf(e,H,_);break;default:throw Error(r(161))}}catch(X){Ve(e,e.return,X)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function fy(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;fy(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ha(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)iy(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:Gn(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&ey(t,t.return,a),Qs(t);break;case 27:hr(t.stateNode);case 26:case 5:Gn(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 ma(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,o=e,f=t,g=f.flags;switch(f.tag){case 0:case 11:case 15:ma(o,f,a),ar(4,f);break;case 1:if(ma(o,f,a),l=f,o=l.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(H){Ve(l,l.return,H)}if(l=f,o=l.updateQueue,o!==null){var S=l.stateNode;try{var _=o.shared.hiddenCallbacks;if(_!==null)for(o.shared.hiddenCallbacks=null,o=0;o<_.length;o++)Gm(_[o],S)}catch(H){Ve(l,l.return,H)}}a&&g&64&&Wp(f),sr(f,f.return);break;case 27:ay(f);case 26:case 5:ma(o,f,a),a&&l===null&&g&4&&ty(f),sr(f,f.return);break;case 12:ma(o,f,a);break;case 31:ma(o,f,a),a&&g&4&&oy(o,f);break;case 13:ma(o,f,a),a&&g&4&&cy(o,f);break;case 22:f.memoizedState===null&&ma(o,f,a),sr(f,f.return);break;case 30:break;default:ma(o,f,a)}t=t.sibling}}function Nf(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&&Pl(a))}function Rf(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Pl(e))}function kn(e,t,a,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)dy(e,t,a,l),t=t.sibling}function dy(e,t,a,l){var o=t.flags;switch(t.tag){case 0:case 11:case 15:kn(e,t,a,l),o&2048&&ar(9,t);break;case 1:kn(e,t,a,l);break;case 3:kn(e,t,a,l),o&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Pl(e)));break;case 12:if(o&2048){kn(e,t,a,l),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(_){Ve(t,t.return,_)}}else kn(e,t,a,l);break;case 31:kn(e,t,a,l);break;case 13:kn(e,t,a,l);break;case 23:break;case 22:f=t.stateNode,g=t.alternate,t.memoizedState!==null?f._visibility&2?kn(e,t,a,l):ir(e,t):f._visibility&2?kn(e,t,a,l):(f._visibility|=2,Vi(e,t,a,l,(t.subtreeFlags&10256)!==0||!1)),o&2048&&Nf(g,t);break;case 24:kn(e,t,a,l),o&2048&&Rf(t.alternate,t);break;default:kn(e,t,a,l)}}function Vi(e,t,a,l,o){for(o=o&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var f=e,g=t,S=a,_=l,H=g.flags;switch(g.tag){case 0:case 11:case 15:Vi(f,g,S,_,o),ar(8,g);break;case 23:break;case 22:var X=g.stateNode;g.memoizedState!==null?X._visibility&2?Vi(f,g,S,_,o):ir(f,g):(X._visibility|=2,Vi(f,g,S,_,o)),o&&H&2048&&Nf(g.alternate,g);break;case 24:Vi(f,g,S,_,o),o&&H&2048&&Rf(g.alternate,g);break;default:Vi(f,g,S,_,o)}t=t.sibling}}function ir(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,l=t,o=l.flags;switch(l.tag){case 22:ir(a,l),o&2048&&Nf(l.alternate,l);break;case 24:ir(a,l),o&2048&&Rf(l.alternate,l);break;default:ir(a,l)}t=t.sibling}}var lr=8192;function Pi(e,t,a){if(e.subtreeFlags&lr)for(e=e.child;e!==null;)hy(e,t,a),e=e.sibling}function hy(e,t,a){switch(e.tag){case 26:Pi(e,t,a),e.flags&lr&&e.memoizedState!==null&&B1(a,On,e.memoizedState,e.memoizedProps);break;case 5:Pi(e,t,a);break;case 3:case 4:var l=On;On=$o(e.stateNode.containerInfo),Pi(e,t,a),On=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=lr,lr=16777216,Pi(e,t,a),lr=l):Pi(e,t,a));break;default:Pi(e,t,a)}}function my(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 l=t[a];yt=l,yy(l,e)}my(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)py(e),e=e.sibling}function py(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 l=t[a];yt=l,yy(l,e)}my(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 yy(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 l=a.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Pl(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,yt=l;else e:for(a=e;yt!==null;){l=yt;var o=l.sibling,f=l.return;if(ly(l),l===a){yt=null;break e}if(o!==null){o.return=f,yt=o;break e}yt=f}}}var Wx={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}},e1=typeof WeakMap=="function"?WeakMap:Map,He=0,Ie=null,Ce=null,Me=0,Ge=0,on=null,Ha=!1,Yi=!1,_f=!1,pa=0,at=0,Qa=0,Gs=0,Ef=0,cn=0,Ki=0,or=null,Xt=null,Cf=!1,Ho=0,gy=0,Qo=1/0,Go=null,Ga=null,dt=0,Va=null,Xi=null,ya=0,Tf=0,Mf=null,vy=null,cr=0,Af=null;function un(){return(He&2)!==0&&Me!==0?Me&-Me:L.T!==null?Lf():zh()}function by(){if(cn===0)if((Me&536870912)===0||ke){var e=Fr;Fr<<=1,(Fr&3932160)===0&&(Fr=262144),cn=e}else cn=536870912;return e=ln.current,e!==null&&(e.flags|=32),cn}function Zt(e,t,a){(e===Ie&&(Ge===2||Ge===9)||e.cancelPendingCommit!==null)&&(Zi(e,0),Pa(e,Me,cn,!1)),Ml(e,a),((He&2)===0||e!==Ie)&&(e===Ie&&((He&2)===0&&(Gs|=a),at===4&&Pa(e,Me,cn,!1)),Vn(e))}function xy(e,t,a){if((He&6)!==0)throw Error(r(327));var l=!a&&(t&127)===0&&(t&e.expiredLanes)===0||Tl(e,t),o=l?a1(e,t):kf(e,t,!0),f=l;do{if(o===0){Yi&&!l&&Pa(e,t,0,!1);break}else{if(a=e.current.alternate,f&&!t1(a)){o=kf(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(_&&(Zi(S,g).flags|=256),g=kf(S,g,!1),g!==2){if(_f&&!_){S.errorRecoveryDisabledLanes|=f,Gs|=f,o=4;break e}f=Xt,Xt=o,f!==null&&(Xt===null?Xt=f:Xt.push.apply(Xt,f))}o=g}if(f=!1,o!==2)continue}}if(o===1){Zi(e,0),Pa(e,t,0,!0);break}e:{switch(l=e,f=o,f){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:Pa(l,t,cn,!Ha);break e;case 2:Xt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(o=Ho+300-Et(),10<o)){if(Pa(l,t,cn,!Ha),Jr(l,0,!0)!==0)break e;ya=t,l.timeoutHandle=Jy(Sy.bind(null,l,a,Xt,Go,Cf,t,cn,Gs,Ki,Ha,f,"Throttled",-0,0),o);break e}Sy(l,a,Xt,Go,Cf,t,cn,Gs,Ki,Ha,f,null,-0,0)}}break}while(!0);Vn(e)}function Sy(e,t,a,l,o,f,g,S,_,H,X,J,G,P){if(e.timeoutHandle=-1,J=t.subtreeFlags,J&8192||(J&16785408)===16785408){J={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ta},hy(t,f,J);var ce=(f&62914560)===f?Ho-Et():(f&4194048)===f?gy-Et():0;if(ce=q1(J,ce),ce!==null){ya=f,e.cancelPendingCommit=ce(Ty.bind(null,e,t,f,a,l,o,g,S,_,X,J,null,G,P)),Pa(e,f,g,!H);return}}Ty(e,t,f,a,l,o,g,S,_)}function t1(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var l=0;l<a.length;l++){var o=a[l],f=o.getSnapshot;o=o.value;try{if(!an(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 Pa(e,t,a,l){t&=~Ef,t&=~Gs,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var o=t;0<o;){var f=31-nn(o),g=1<<f;l[f]=-1,o&=~g}a!==0&&Ah(e,a,t)}function Vo(){return(He&6)===0?(ur(0),!1):!0}function Of(){if(Ce!==null){if(Ge===0)var e=Ce.return;else e=Ce,ia=ks=null,Xu(e),Bi=null,Kl=0,e=Ce;for(;e!==null;)$p(e.alternate,e),e=e.return;Ce=null}}function Zi(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,S1(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),ya=0,Of(),Ie=e,Ce=a=aa(e.current,null),Me=t,Ge=0,on=null,Ha=!1,Yi=Tl(e,t),_f=!1,Ki=cn=Ef=Gs=Qa=at=0,Xt=or=null,Cf=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var o=31-nn(l),f=1<<o;t|=e[o],l&=~f}return pa=t,co(),a}function jy(e,t){xe=null,L.H=er,t===Li||t===vo?(t=Bm(),Ge=3):t===Du?(t=Bm(),Ge=4):Ge=t===uf?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,on=t,Ce===null&&(at=1,Oo(e,bn(t,e.current)))}function wy(){var e=ln.current;return e===null?!0:(Me&4194048)===Me?wn===null:(Me&62914560)===Me||(Me&536870912)!==0?e===wn:!1}function Ny(){var e=L.H;return L.H=er,e===null?er:e}function Ry(){var e=L.A;return L.A=Wx,e}function Po(){at=4,Ha||(Me&4194048)!==Me&&ln.current!==null||(Yi=!0),(Qa&134217727)===0&&(Gs&134217727)===0||Ie===null||Pa(Ie,Me,cn,!1)}function kf(e,t,a){var l=He;He|=2;var o=Ny(),f=Ry();(Ie!==e||Me!==t)&&(Go=null,Zi(e,t)),t=!1;var g=at;e:do try{if(Ge!==0&&Ce!==null){var S=Ce,_=on;switch(Ge){case 8:Of(),g=6;break e;case 3:case 2:case 9:case 6:ln.current===null&&(t=!0);var H=Ge;if(Ge=0,on=null,Fi(e,S,_,H),a&&Yi){g=0;break e}break;default:H=Ge,Ge=0,on=null,Fi(e,S,_,H)}}n1(),g=at;break}catch(X){jy(e,X)}while(!0);return t&&e.shellSuspendCounter++,ia=ks=null,He=l,L.H=o,L.A=f,Ce===null&&(Ie=null,Me=0,co()),g}function n1(){for(;Ce!==null;)_y(Ce)}function a1(e,t){var a=He;He|=2;var l=Ny(),o=Ry();Ie!==e||Me!==t?(Go=null,Qo=Et()+500,Zi(e,t)):Yi=Tl(e,t);e:do try{if(Ge!==0&&Ce!==null){t=Ce;var f=on;t:switch(Ge){case 1:Ge=0,on=null,Fi(e,t,f,1);break;case 2:case 9:if(Um(f)){Ge=0,on=null,Ey(t);break}t=function(){Ge!==2&&Ge!==9||Ie!==e||(Ge=7),Vn(e)},f.then(t,t);break e;case 3:Ge=7;break e;case 4:Ge=5;break e;case 7:Um(f)?(Ge=0,on=null,Ey(t)):(Ge=0,on=null,Fi(e,t,f,7));break;case 5:var g=null;switch(Ce.tag){case 26:g=Ce.memoizedState;case 5:case 27:var S=Ce;if(g?dg(g):S.stateNode.complete){Ge=0,on=null;var _=S.sibling;if(_!==null)Ce=_;else{var H=S.return;H!==null?(Ce=H,Yo(H)):Ce=null}break t}}Ge=0,on=null,Fi(e,t,f,5);break;case 6:Ge=0,on=null,Fi(e,t,f,6);break;case 8:Of(),at=6;break e;default:throw Error(r(462))}}s1();break}catch(X){jy(e,X)}while(!0);return ia=ks=null,L.H=l,L.A=o,He=a,Ce!==null?0:(Ie=null,Me=0,co(),at)}function s1(){for(;Ce!==null&&!Xr();)_y(Ce)}function _y(e){var t=Ip(e.alternate,e,pa);e.memoizedProps=e.pendingProps,t===null?Yo(e):Ce=t}function Ey(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=Pp(a,t,t.pendingProps,t.type,void 0,Me);break;case 11:t=Pp(a,t,t.pendingProps,t.type.render,t.ref,Me);break;case 5:Xu(t);default:$p(a,t),t=Ce=Rm(t,pa),t=Ip(a,t,pa)}e.memoizedProps=e.pendingProps,t===null?Yo(e):Ce=t}function Fi(e,t,a,l){ia=ks=null,Xu(t),Bi=null,Kl=0;var o=t.return;try{if(Kx(e,o,t,a,Me)){at=1,Oo(e,bn(a,e.current)),Ce=null;return}}catch(f){if(o!==null)throw Ce=o,f;at=1,Oo(e,bn(a,e.current)),Ce=null;return}t.flags&32768?(ke||l===1?e=!0:Yi||(Me&536870912)!==0?e=!1:(Ha=e=!0,(l===2||l===9||l===3||l===6)&&(l=ln.current,l!==null&&l.tag===13&&(l.flags|=16384))),Cy(t,e)):Yo(t)}function Yo(e){var t=e;do{if((t.flags&32768)!==0){Cy(t,Ha);return}e=t.return;var a=Fx(t.alternate,t,pa);if(a!==null){Ce=a;return}if(t=t.sibling,t!==null){Ce=t;return}Ce=t=e}while(t!==null);at===0&&(at=5)}function Cy(e,t){do{var a=Ix(e.alternate,e);if(a!==null){a.flags&=32767,Ce=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Ce=e;return}Ce=e=a}while(e!==null);at=6,Ce=null}function Ty(e,t,a,l,o,f,g,S,_){e.cancelPendingCommit=null;do Ko();while(dt!==0);if((He&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(f=t.lanes|t.childLanes,f|=xu,Lb(e,a,f,g,S,_),e===Ie&&(Ce=Ie=null,Me=0),Xi=t,Va=e,ya=a,Tf=f,Mf=o,vy=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,o1(yi,function(){return zy(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=L.T,L.T=null,o=K.p,K.p=2,g=He,He|=4;try{Jx(e,t,a)}finally{He=g,K.p=o,L.T=l}}dt=1,My(),Ay(),Oy()}}function My(){if(dt===1){dt=0;var e=Va,t=Xi,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=L.T,L.T=null;var l=K.p;K.p=2;var o=He;He|=4;try{uy(t,e);var f=Yf,g=ym(e.containerInfo),S=f.focusedElem,_=f.selectionRange;if(g!==S&&S&&S.ownerDocument&&pm(S.ownerDocument.documentElement,S)){if(_!==null&&pu(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 J=S.ownerDocument||document,G=J&&J.defaultView||window;if(G.getSelection){var P=G.getSelection(),ce=S.textContent.length,ye=Math.min(_.start,ce),Ze=_.end===void 0?ye:Math.min(_.end,ce);!P.extend&&ye>Ze&&(g=Ze,Ze=ye,ye=g);var D=mm(S,ye),M=mm(S,Ze);if(D&&M&&(P.rangeCount!==1||P.anchorNode!==D.node||P.anchorOffset!==D.offset||P.focusNode!==M.node||P.focusOffset!==M.offset)){var q=J.createRange();q.setStart(D.node,D.offset),P.removeAllRanges(),ye>Ze?(P.addRange(q),P.extend(M.node,M.offset)):(q.setEnd(M.node,M.offset),P.addRange(q))}}}}for(J=[],P=S;P=P.parentNode;)P.nodeType===1&&J.push({element:P,left:P.scrollLeft,top:P.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<J.length;S++){var F=J[S];F.element.scrollLeft=F.left,F.element.scrollTop=F.top}}sc=!!Pf,Yf=Pf=null}finally{He=o,K.p=l,L.T=a}}e.current=t,dt=2}}function Ay(){if(dt===2){dt=0;var e=Va,t=Xi,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=L.T,L.T=null;var l=K.p;K.p=2;var o=He;He|=4;try{iy(e,t.alternate,t)}finally{He=o,K.p=l,L.T=a}}dt=3}}function Oy(){if(dt===4||dt===3){dt=0,Xc();var e=Va,t=Xi,a=ya,l=vy;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?dt=5:(dt=0,Xi=Va=null,ky(e,e.pendingLanes));var o=e.pendingLanes;if(o===0&&(Ga=null),Ic(a),t=t.stateNode,tn&&typeof tn.onCommitFiberRoot=="function")try{tn.onCommitFiberRoot(Cl,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=L.T,o=K.p,K.p=2,L.T=null;try{for(var f=e.onRecoverableError,g=0;g<l.length;g++){var S=l[g];f(S.value,{componentStack:S.stack})}}finally{L.T=t,K.p=o}}(ya&3)!==0&&Ko(),Vn(e),o=e.pendingLanes,(a&261930)!==0&&(o&42)!==0?e===Af?cr++:(cr=0,Af=e):cr=0,ur(0)}}function ky(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Pl(t)))}function Ko(){return My(),Ay(),Oy(),zy()}function zy(){if(dt!==5)return!1;var e=Va,t=Tf;Tf=0;var a=Ic(ya),l=L.T,o=K.p;try{K.p=32>a?32:a,L.T=null,a=Mf,Mf=null;var f=Va,g=ya;if(dt=0,Xi=Va=null,ya=0,(He&6)!==0)throw Error(r(331));var S=He;if(He|=4,py(f.current),dy(f,f.current,g,a),He=S,ur(0,!1),tn&&typeof tn.onPostCommitFiberRoot=="function")try{tn.onPostCommitFiberRoot(Cl,f)}catch{}return!0}finally{K.p=o,L.T=l,ky(e,t)}}function Dy(e,t,a){t=bn(a,t),t=cf(e.stateNode,t,2),e=Ua(e,t,2),e!==null&&(Ml(e,2),Vn(e))}function Ve(e,t,a){if(e.tag===3)Dy(e,e,a);else for(;t!==null;){if(t.tag===3){Dy(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Ga===null||!Ga.has(l))){e=bn(a,e),a=Up(2),l=Ua(t,a,2),l!==null&&(Lp(a,l,t,e),Ml(l,2),Vn(l));break}}t=t.return}}function zf(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new e1;var o=new Set;l.set(t,o)}else o=l.get(t),o===void 0&&(o=new Set,l.set(t,o));o.has(a)||(_f=!0,o.add(a),e=i1.bind(null,e,t,a),t.then(e,e))}function i1(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Ie===e&&(Me&a)===a&&(at===4||at===3&&(Me&62914560)===Me&&300>Et()-Ho?(He&2)===0&&Zi(e,0):Ef|=a,Ki===Me&&(Ki=0)),Vn(e)}function Uy(e,t){t===0&&(t=Mh()),e=Ms(e,t),e!==null&&(Ml(e,t),Vn(e))}function l1(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Uy(e,a)}function r1(e,t){var a=0;switch(e.tag){case 31:case 13:var l=e.stateNode,o=e.memoizedState;o!==null&&(a=o.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(r(314))}l!==null&&l.delete(t),Uy(e,a)}function o1(e,t){return Mn(e,t)}var Xo=null,Ii=null,Df=!1,Zo=!1,Uf=!1,Ya=0;function Vn(e){e!==Ii&&e.next===null&&(Ii===null?Xo=Ii=e:Ii=Ii.next=e),Zo=!0,Df||(Df=!0,u1())}function ur(e,t){if(!Uf&&Zo){Uf=!0;do for(var a=!1,l=Xo;l!==null;){if(e!==0){var o=l.pendingLanes;if(o===0)var f=0;else{var g=l.suspendedLanes,S=l.pingedLanes;f=(1<<31-nn(42|e)+1)-1,f&=o&~(g&~S),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(a=!0,Hy(l,f))}else f=Me,f=Jr(l,l===Ie?f:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(f&3)===0||Tl(l,f)||(a=!0,Hy(l,f));l=l.next}while(a);Uf=!1}}function c1(){Ly()}function Ly(){Zo=Df=!1;var e=0;Ya!==0&&x1()&&(e=Ya);for(var t=Et(),a=null,l=Xo;l!==null;){var o=l.next,f=By(l,t);f===0?(l.next=null,a===null?Xo=o:a.next=o,o===null&&(Ii=a)):(a=l,(e!==0||(f&3)!==0)&&(Zo=!0)),l=o}dt!==0&&dt!==5||ur(e),Ya!==0&&(Ya=0)}function By(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,o=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var g=31-nn(f),S=1<<g,_=o[g];_===-1?((S&a)===0||(S&l)!==0)&&(o[g]=Ub(S,t)):_<=t&&(e.expiredLanes|=S),f&=~S}if(t=Ie,a=Me,a=Jr(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,a===0||e===t&&(Ge===2||Ge===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&El(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Tl(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(l!==null&&El(l),Ic(a)){case 2:case 8:a=qn;break;case 32:a=yi;break;case 268435456:a=Th;break;default:a=yi}return l=qy.bind(null,e),a=Mn(a,l),e.callbackPriority=t,e.callbackNode=a,t}return l!==null&&l!==null&&El(l),e.callbackPriority=2,e.callbackNode=null,2}function qy(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 l=Me;return l=Jr(e,e===Ie?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(xy(e,l,t),By(e,Et()),e.callbackNode!=null&&e.callbackNode===a?qy.bind(null,e):null)}function Hy(e,t){if(Ko())return null;xy(e,t,!0)}function u1(){j1(function(){(He&6)!==0?Mn(bt,c1):Ly()})}function Lf(){if(Ya===0){var e=Di;e===0&&(e=Zr,Zr<<=1,(Zr&261888)===0&&(Zr=256)),Ya=e}return Ya}function Qy(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:to(""+e)}function Gy(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 f1(e,t,a,l,o){if(t==="submit"&&a&&a.stateNode===o){var f=Qy((o[Gt]||null).action),g=l.submitter;g&&(t=(t=g[Gt]||null)?Qy(t.formAction):g.getAttribute("formAction"),t!==null&&(f=t,g=null));var S=new io("action","action",null,l,o);e.push({event:S,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Ya!==0){var _=g?Gy(o,g):new FormData(o);nf(a,{pending:!0,data:_,method:o.method,action:f},null,_)}}else typeof f=="function"&&(S.preventDefault(),_=g?Gy(o,g):new FormData(o),nf(a,{pending:!0,data:_,method:o.method,action:f},f,_))},currentTarget:o}]})}}for(var Bf=0;Bf<bu.length;Bf++){var qf=bu[Bf],d1=qf.toLowerCase(),h1=qf[0].toUpperCase()+qf.slice(1);An(d1,"on"+h1)}An(bm,"onAnimationEnd"),An(xm,"onAnimationIteration"),An(Sm,"onAnimationStart"),An("dblclick","onDoubleClick"),An("focusin","onFocus"),An("focusout","onBlur"),An(Tx,"onTransitionRun"),An(Mx,"onTransitionStart"),An(Ax,"onTransitionCancel"),An(jm,"onTransitionEnd"),Si("onMouseEnter",["mouseout","mouseover"]),Si("onMouseLeave",["mouseout","mouseover"]),Si("onPointerEnter",["pointerout","pointerover"]),Si("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(" "),m1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(fr));function Vy(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var l=e[a],o=l.event;l=l.listeners;e:{var f=void 0;if(t)for(var g=l.length-1;0<=g;g--){var S=l[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<l.length;g++){if(S=l[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 Te(e,t){var a=t[Jc];a===void 0&&(a=t[Jc]=new Set);var l=e+"__bubble";a.has(l)||(Py(t,e,2,!1),a.add(l))}function Hf(e,t,a){var l=0;t&&(l|=4),Py(a,e,l,t)}var Fo="_reactListening"+Math.random().toString(36).slice(2);function Qf(e){if(!e[Fo]){e[Fo]=!0,Lh.forEach(function(a){a!=="selectionchange"&&(m1.has(a)||Hf(a,!1,e),Hf(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Fo]||(t[Fo]=!0,Hf("selectionchange",!1,t))}}function Py(e,t,a,l){switch(bg(t)){case 2:var o=G1;break;case 8:o=V1;break;default:o=nd}a=o.bind(null,t,a,e),o=void 0,!lu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),l?o!==void 0?e.addEventListener(t,a,{capture:!0,passive:o}):e.addEventListener(t,a,!0):o!==void 0?e.addEventListener(t,a,{passive:o}):e.addEventListener(t,a,!1)}function Gf(e,t,a,l,o){var f=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var g=l.tag;if(g===3||g===4){var S=l.stateNode.containerInfo;if(S===o)break;if(g===4)for(g=l.return;g!==null;){var _=g.tag;if((_===3||_===4)&&g.stateNode.containerInfo===o)return;g=g.return}for(;S!==null;){if(g=vi(S),g===null)return;if(_=g.tag,_===5||_===6||_===26||_===27){l=f=g;continue e}S=S.parentNode}}l=l.return}Fh(function(){var H=f,X=su(a),J=[];e:{var G=wm.get(e);if(G!==void 0){var P=io,ce=e;switch(e){case"keypress":if(ao(a)===0)break e;case"keydown":case"keyup":P=rx;break;case"focusin":ce="focus",P=uu;break;case"focusout":ce="blur",P=uu;break;case"beforeblur":case"afterblur":P=uu;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":P=$h;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":P=Fb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":P=ux;break;case bm:case xm:case Sm:P=$b;break;case jm:P=dx;break;case"scroll":case"scrollend":P=Xb;break;case"wheel":P=mx;break;case"copy":case"cut":case"paste":P=ex;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":P=em;break;case"toggle":case"beforetoggle":P=yx}var ye=(t&4)!==0,Ze=!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=kl(M,D),F!=null&&ye.push(dr(M,F,q))),Ze)break;M=M.return}0<ye.length&&(G=new P(G,ce,null,a,X),J.push({event:G,listeners:ye}))}}if((t&7)===0){e:{if(G=e==="mouseover"||e==="pointerover",P=e==="mouseout"||e==="pointerout",G&&a!==au&&(ce=a.relatedTarget||a.fromElement)&&(vi(ce)||ce[gi]))break e;if((P||G)&&(G=X.window===X?X:(G=X.ownerDocument)?G.defaultView||G.parentWindow:window,P?(ce=a.relatedTarget||a.toElement,P=H,ce=ce?vi(ce):null,ce!==null&&(Ze=d(ce),ye=ce.tag,ce!==Ze||ye!==5&&ye!==27&&ye!==6)&&(ce=null)):(P=null,ce=H),P!==ce)){if(ye=$h,F="onMouseLeave",D="onMouseEnter",M="mouse",(e==="pointerout"||e==="pointerover")&&(ye=em,F="onPointerLeave",D="onPointerEnter",M="pointer"),Ze=P==null?G:Ol(P),q=ce==null?G:Ol(ce),G=new ye(F,M+"leave",P,a,X),G.target=Ze,G.relatedTarget=q,F=null,vi(X)===H&&(ye=new ye(D,M+"enter",ce,a,X),ye.target=q,ye.relatedTarget=Ze,F=ye),Ze=F,P&&ce)t:{for(ye=p1,D=P,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;P!==null&&Yy(J,G,P,ye,!1),ce!==null&&Ze!==null&&Yy(J,Ze,ce,ye,!0)}}e:{if(G=H?Ol(H):window,P=G.nodeName&&G.nodeName.toLowerCase(),P==="select"||P==="input"&&G.type==="file")var Be=om;else if(lm(G))if(cm)Be=_x;else{Be=Nx;var fe=wx}else P=G.nodeName,!P||P.toLowerCase()!=="input"||G.type!=="checkbox"&&G.type!=="radio"?H&&nu(H.elementType)&&(Be=om):Be=Rx;if(Be&&(Be=Be(e,H))){rm(J,Be,a,X);break e}fe&&fe(e,G,H),e==="focusout"&&H&&G.type==="number"&&H.memoizedProps.value!=null&&tu(G,"number",G.value)}switch(fe=H?Ol(H):window,e){case"focusin":(lm(fe)||fe.contentEditable==="true")&&(Ei=fe,yu=H,Ql=null);break;case"focusout":Ql=yu=Ei=null;break;case"mousedown":gu=!0;break;case"contextmenu":case"mouseup":case"dragend":gu=!1,gm(J,a,X);break;case"selectionchange":if(Cx)break;case"keydown":case"keyup":gm(J,a,X)}var we;if(du)e:{switch(e){case"compositionstart":var Ae="onCompositionStart";break e;case"compositionend":Ae="onCompositionEnd";break e;case"compositionupdate":Ae="onCompositionUpdate";break e}Ae=void 0}else _i?sm(e,a)&&(Ae="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Ae="onCompositionStart");Ae&&(tm&&a.locale!=="ko"&&(_i||Ae!=="onCompositionStart"?Ae==="onCompositionEnd"&&_i&&(we=Ih()):(Ta=X,ru="value"in Ta?Ta.value:Ta.textContent,_i=!0)),fe=Io(H,Ae),0<fe.length&&(Ae=new Wh(Ae,e,null,a,X),J.push({event:Ae,listeners:fe}),we?Ae.data=we:(we=im(a),we!==null&&(Ae.data=we)))),(we=vx?bx(e,a):xx(e,a))&&(Ae=Io(H,"onBeforeInput"),0<Ae.length&&(fe=new Wh("onBeforeInput","beforeinput",null,a,X),J.push({event:fe,listeners:Ae}),fe.data=we)),f1(J,e,H,a,X)}Vy(J,t)})}function dr(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Io(e,t){for(var a=t+"Capture",l=[];e!==null;){var o=e,f=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||f===null||(o=kl(e,a),o!=null&&l.unshift(dr(e,o,f)),o=kl(e,t),o!=null&&l.push(dr(e,o,f))),e.tag===3)return l;e=e.return}return[]}function p1(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Yy(e,t,a,l,o){for(var f=t._reactName,g=[];a!==null&&a!==l;){var S=a,_=S.alternate,H=S.stateNode;if(S=S.tag,_!==null&&_===l)break;S!==5&&S!==26&&S!==27||H===null||(_=H,o?(H=kl(a,f),H!=null&&g.unshift(dr(a,H,_))):o||(H=kl(a,f),H!=null&&g.push(dr(a,H,_)))),a=a.return}g.length!==0&&e.push({event:t,listeners:g})}var y1=/\r\n?/g,g1=/\u0000|\uFFFD/g;function Ky(e){return(typeof e=="string"?e:""+e).replace(y1,`
65
- `).replace(g1,"")}function Xy(e,t){return t=Ky(t),Ky(e)===t}function Xe(e,t,a,l,o,f){switch(a){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||wi(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&wi(e,""+l);break;case"className":Wr(e,"class",l);break;case"tabIndex":Wr(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Wr(e,a,l);break;case"style":Xh(e,l,f);break;case"data":if(t!=="object"){Wr(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=to(""+l),e.setAttribute(a,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof f=="function"&&(a==="formAction"?(t!=="input"&&Xe(e,t,"name",o.name,o,null),Xe(e,t,"formEncType",o.formEncType,o,null),Xe(e,t,"formMethod",o.formMethod,o,null),Xe(e,t,"formTarget",o.formTarget,o,null)):(Xe(e,t,"encType",o.encType,o,null),Xe(e,t,"method",o.method,o,null),Xe(e,t,"target",o.target,o,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=to(""+l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=ta);break;case"onScroll":l!=null&&Te("scroll",e);break;case"onScrollEnd":l!=null&&Te("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(a=l.__html,a!=null){if(o.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}a=to(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""+l):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":l===!0?e.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,l):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(a,l):e.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(a):e.setAttribute(a,l);break;case"popover":Te("beforetoggle",e),Te("toggle",e),$r(e,"popover",l);break;case"xlinkActuate":ea(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":ea(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":ea(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":ea(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":ea(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":ea(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":ea(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":ea(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":ea(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":$r(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=Yb.get(a)||a,$r(e,a,l))}}function Vf(e,t,a,l,o,f){switch(a){case"style":Xh(e,l,f);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(a=l.__html,a!=null){if(o.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"children":typeof l=="string"?wi(e,l):(typeof l=="number"||typeof l=="bigint")&&wi(e,""+l);break;case"onScroll":l!=null&&Te("scroll",e);break;case"onScrollEnd":l!=null&&Te("scrollend",e);break;case"onClick":l!=null&&(e.onclick=ta);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Bh.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[Gt]||null,f=f!=null?f[a]:null,typeof f=="function"&&e.removeEventListener(t,f,o),typeof l=="function")){typeof f!="function"&&f!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,l,o);break e}a in e?e[a]=l:l===!0?e.setAttribute(a,""):$r(e,a,l)}}}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":Te("error",e),Te("load",e);var l=!1,o=!1,f;for(f in a)if(a.hasOwnProperty(f)){var g=a[f];if(g!=null)switch(f){case"src":l=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Xe(e,t,f,g,a,null)}}o&&Xe(e,t,"srcSet",a.srcSet,a,null),l&&Xe(e,t,"src",a.src,a,null);return;case"input":Te("invalid",e);var S=f=g=o=null,_=null,H=null;for(l in a)if(a.hasOwnProperty(l)){var X=a[l];if(X!=null)switch(l){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:Xe(e,t,l,X,a,null)}}Vh(e,f,S,_,H,g,o,!1);return;case"select":Te("invalid",e),l=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":l=S;default:Xe(e,t,o,S,a,null)}t=f,a=g,e.multiple=!!l,t!=null?ji(e,!!l,t,!1):a!=null&&ji(e,!!l,a,!0);return;case"textarea":Te("invalid",e),f=o=l=null;for(g in a)if(a.hasOwnProperty(g)&&(S=a[g],S!=null))switch(g){case"value":l=S;break;case"defaultValue":o=S;break;case"children":f=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(r(91));break;default:Xe(e,t,g,S,a,null)}Yh(e,l,o,f);return;case"option":for(_ in a)if(a.hasOwnProperty(_)&&(l=a[_],l!=null))switch(_){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:Xe(e,t,_,l,a,null)}return;case"dialog":Te("beforetoggle",e),Te("toggle",e),Te("cancel",e),Te("close",e);break;case"iframe":case"object":Te("load",e);break;case"video":case"audio":for(l=0;l<fr.length;l++)Te(fr[l],e);break;case"image":Te("error",e),Te("load",e);break;case"details":Te("toggle",e);break;case"embed":case"source":case"link":Te("error",e),Te("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(H in a)if(a.hasOwnProperty(H)&&(l=a[H],l!=null))switch(H){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Xe(e,t,H,l,a,null)}return;default:if(nu(t)){for(X in a)a.hasOwnProperty(X)&&(l=a[X],l!==void 0&&Vf(e,t,X,l,a,void 0));return}}for(S in a)a.hasOwnProperty(S)&&(l=a[S],l!=null&&Xe(e,t,S,l,a,null))}function v1(e,t,a,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,f=null,g=null,S=null,_=null,H=null,X=null;for(P in a){var J=a[P];if(a.hasOwnProperty(P)&&J!=null)switch(P){case"checked":break;case"value":break;case"defaultValue":_=J;default:l.hasOwnProperty(P)||Xe(e,t,P,null,l,J)}}for(var G in l){var P=l[G];if(J=a[G],l.hasOwnProperty(G)&&(P!=null||J!=null))switch(G){case"type":f=P;break;case"name":o=P;break;case"checked":H=P;break;case"defaultChecked":X=P;break;case"value":g=P;break;case"defaultValue":S=P;break;case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(r(137,t));break;default:P!==J&&Xe(e,t,G,P,l,J)}}eu(e,g,S,_,H,X,f,o);return;case"select":P=g=S=G=null;for(f in a)if(_=a[f],a.hasOwnProperty(f)&&_!=null)switch(f){case"value":break;case"multiple":P=_;default:l.hasOwnProperty(f)||Xe(e,t,f,null,l,_)}for(o in l)if(f=l[o],_=a[o],l.hasOwnProperty(o)&&(f!=null||_!=null))switch(o){case"value":G=f;break;case"defaultValue":S=f;break;case"multiple":g=f;default:f!==_&&Xe(e,t,o,f,l,_)}t=S,a=g,l=P,G!=null?ji(e,!!a,G,!1):!!l!=!!a&&(t!=null?ji(e,!!a,t,!0):ji(e,!!a,a?[]:"",!1));return;case"textarea":P=G=null;for(S in a)if(o=a[S],a.hasOwnProperty(S)&&o!=null&&!l.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:Xe(e,t,S,null,l,o)}for(g in l)if(o=l[g],f=a[g],l.hasOwnProperty(g)&&(o!=null||f!=null))switch(g){case"value":G=o;break;case"defaultValue":P=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(r(91));break;default:o!==f&&Xe(e,t,g,o,l,f)}Ph(e,G,P);return;case"option":for(var ce in a)if(G=a[ce],a.hasOwnProperty(ce)&&G!=null&&!l.hasOwnProperty(ce))switch(ce){case"selected":e.selected=!1;break;default:Xe(e,t,ce,null,l,G)}for(_ in l)if(G=l[_],P=a[_],l.hasOwnProperty(_)&&G!==P&&(G!=null||P!=null))switch(_){case"selected":e.selected=G&&typeof G!="function"&&typeof G!="symbol";break;default:Xe(e,t,_,G,l,P)}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&&!l.hasOwnProperty(ye)&&Xe(e,t,ye,null,l,G);for(H in l)if(G=l[H],P=a[H],l.hasOwnProperty(H)&&G!==P&&(G!=null||P!=null))switch(H){case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(r(137,t));break;default:Xe(e,t,H,G,l,P)}return;default:if(nu(t)){for(var Ze in a)G=a[Ze],a.hasOwnProperty(Ze)&&G!==void 0&&!l.hasOwnProperty(Ze)&&Vf(e,t,Ze,void 0,l,G);for(X in l)G=l[X],P=a[X],!l.hasOwnProperty(X)||G===P||G===void 0&&P===void 0||Vf(e,t,X,G,l,P);return}}for(var D in a)G=a[D],a.hasOwnProperty(D)&&G!=null&&!l.hasOwnProperty(D)&&Xe(e,t,D,null,l,G);for(J in l)G=l[J],P=a[J],!l.hasOwnProperty(J)||G===P||G==null&&P==null||Xe(e,t,J,G,l,P)}function Zy(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function b1(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),l=0;l<a.length;l++){var o=a[l],f=o.transferSize,g=o.initiatorType,S=o.duration;if(f&&S&&Zy(g)){for(g=0,S=o.responseEnd,l+=1;l<a.length;l++){var _=a[l],H=_.startTime;if(H>S)break;var X=_.transferSize,J=_.initiatorType;X&&Zy(J)&&(_=_.responseEnd,g+=X*(_<S?1:(S-H)/(_-H)))}if(--l,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 Pf=null,Yf=null;function Jo(e){return e.nodeType===9?e:e.ownerDocument}function Fy(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 Iy(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 Kf(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 Xf=null;function x1(){var e=window.event;return e&&e.type==="popstate"?e===Xf?!1:(Xf=e,!0):(Xf=null,!1)}var Jy=typeof setTimeout=="function"?setTimeout:void 0,S1=typeof clearTimeout=="function"?clearTimeout:void 0,$y=typeof Promise=="function"?Promise:void 0,j1=typeof queueMicrotask=="function"?queueMicrotask:typeof $y<"u"?function(e){return $y.resolve(null).then(e).catch(w1)}:Jy;function w1(e){setTimeout(function(){throw e})}function Ka(e){return e==="head"}function Wy(e,t){var a=t,l=0;do{var o=a.nextSibling;if(e.removeChild(a),o&&o.nodeType===8)if(a=o.data,a==="/$"||a==="/&"){if(l===0){e.removeChild(o),el(t);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;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);el(t)}function eg(e,t){var a=e;e=0;do{var l=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),l&&l.nodeType===8)if(a=l.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=l}while(a)}function Zf(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":Zf(a),$c(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function N1(e,t,a,l){for(;e.nodeType===1;){var o=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[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=Nn(e.nextSibling),e===null)break}return null}function R1(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Nn(e.nextSibling),e===null))return null;return e}function tg(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Nn(e.nextSibling),e===null))return null;return e}function Ff(e){return e.data==="$?"||e.data==="$~"}function If(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function _1(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var l=function(){t(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function Nn(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 ng(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return Nn(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function ag(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 sg(e,t,a){switch(t=Jo(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]);$c(e)}var Rn=new Map,ig=new Set;function $o(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ga=K.d;K.d={f:E1,r:C1,D:T1,C:M1,L:A1,m:O1,X:z1,S:k1,M:D1};function E1(){var e=ga.f(),t=Vo();return e||t}function C1(e){var t=bi(e);t!==null&&t.tag===5&&t.type==="form"?jp(t):ga.r(e)}var Ji=typeof document>"u"?null:document;function lg(e,t,a){var l=Ji;if(l&&typeof t=="string"&&t){var o=gn(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof a=="string"&&(o+='[crossorigin="'+a+'"]'),ig.has(o)||(ig.add(o),e={rel:e,crossOrigin:a,href:t},l.querySelector(o)===null&&(t=l.createElement("link"),Nt(t,"link",e),pt(t),l.head.appendChild(t)))}}function T1(e){ga.D(e),lg("dns-prefetch",e,null)}function M1(e,t){ga.C(e,t),lg("preconnect",e,t)}function A1(e,t,a){ga.L(e,t,a);var l=Ji;if(l&&e&&t){var o='link[rel="preload"][as="'+gn(t)+'"]';t==="image"&&a&&a.imageSrcSet?(o+='[imagesrcset="'+gn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(o+='[imagesizes="'+gn(a.imageSizes)+'"]')):o+='[href="'+gn(e)+'"]';var f=o;switch(t){case"style":f=$i(e);break;case"script":f=Wi(e)}Rn.has(f)||(e=v({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Rn.set(f,e),l.querySelector(o)!==null||t==="style"&&l.querySelector(mr(f))||t==="script"&&l.querySelector(pr(f))||(t=l.createElement("link"),Nt(t,"link",e),pt(t),l.head.appendChild(t)))}}function O1(e,t){ga.m(e,t);var a=Ji;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+gn(l)+'"][href="'+gn(e)+'"]',f=o;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=Wi(e)}if(!Rn.has(f)&&(e=v({rel:"modulepreload",href:e},t),Rn.set(f,e),a.querySelector(o)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(pr(f)))return}l=a.createElement("link"),Nt(l,"link",e),pt(l),a.head.appendChild(l)}}}function k1(e,t,a){ga.S(e,t,a);var l=Ji;if(l&&e){var o=xi(l).hoistableStyles,f=$i(e);t=t||"default";var g=o.get(f);if(!g){var S={loading:0,preload:null};if(g=l.querySelector(mr(f)))S.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Rn.get(f))&&$f(e,a);var _=g=l.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,l)}g={type:"stylesheet",instance:g,count:1,state:S},o.set(f,g)}}}function z1(e,t){ga.X(e,t);var a=Ji;if(a&&e){var l=xi(a).hoistableScripts,o=Wi(e),f=l.get(o);f||(f=a.querySelector(pr(o)),f||(e=v({src:e,async:!0},t),(t=Rn.get(o))&&Wf(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},l.set(o,f))}}function D1(e,t){ga.M(e,t);var a=Ji;if(a&&e){var l=xi(a).hoistableScripts,o=Wi(e),f=l.get(o);f||(f=a.querySelector(pr(o)),f||(e=v({src:e,async:!0,type:"module"},t),(t=Rn.get(o))&&Wf(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},l.set(o,f))}}function rg(e,t,a,l){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=$i(a.href),a=xi(o).hoistableStyles,l=a.get(t),l||(l={type:"style",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=$i(a.href);var f=xi(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),Rn.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},Rn.set(e,a),f||U1(o,e,a,g.state))),t&&l===null)throw Error(r(528,""));return g}if(t&&l!==null)throw Error(r(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Wi(a),a=xi(o).hoistableScripts,l=a.get(t),l||(l={type:"script",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function $i(e){return'href="'+gn(e)+'"'}function mr(e){return'link[rel="stylesheet"]['+e+"]"}function og(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function U1(e,t,a,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),Nt(t,"link",a),pt(t),e.head.appendChild(t))}function Wi(e){return'[src="'+gn(e)+'"]'}function pr(e){return"script[async]"+e}function cg(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+gn(a.href)+'"]');if(l)return t.instance=l,pt(l),l;var o=v({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),pt(l),Nt(l,"style",o),Wo(l,a.precedence,e),t.instance=l;case"stylesheet":o=$i(a.href);var f=e.querySelector(mr(o));if(f)return t.state.loading|=4,t.instance=f,pt(f),f;l=og(a),(o=Rn.get(o))&&$f(l,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",l),t.state.loading|=4,Wo(f,a.precedence,e),t.instance=f;case"script":return f=Wi(a.src),(o=e.querySelector(pr(f)))?(t.instance=o,pt(o),o):(l=a,(o=Rn.get(f))&&(l=v({},a),Wf(l,o)),e=e.ownerDocument||e,o=e.createElement("script"),pt(o),Nt(o,"link",l),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,Wo(l,a.precedence,e));return t.instance}function Wo(e,t,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=l.length?l[l.length-1]:null,f=o,g=0;g<l.length;g++){var S=l[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 $f(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Wf(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 ug(e,t,a){if(ec===null){var l=new Map,o=ec=new Map;o.set(a,l)}else o=ec,l=o.get(a),l||(l=new Map,o.set(a,l));if(l.has(e))return l;for(l.set(e,null),a=a.getElementsByTagName(e),o=0;o<a.length;o++){var 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=l.get(g);S?S.push(f):l.set(g,[f])}}return l}function fg(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function L1(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 dg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function B1(e,t,a,l){if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var o=$i(l.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,l=og(l),(o=Rn.get(o))&&$f(l,o),f=f.createElement("link"),pt(f);var g=f;g._p=new Promise(function(S,_){g.onload=S,g.onerror=_}),Nt(f,"link",l),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 ed=0;function q1(e,t){return e.stylesheets&&e.count===0&&ac(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var l=setTimeout(function(){if(e.stylesheets&&ac(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},6e4+t);0<e.imgBytes&&ed===0&&(ed=62500*b1());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>ed?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),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(H1,e),nc=null,tc.call(e))}function H1(e,t){if(!(t.state.loading&4)){var a=nc.get(e);if(a)var l=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),l=g)}l&&a.set(null,l)}o=t.instance,g=o.getAttribute("data-precedence"),f=a.get(g)||l,f===l&&a.set(null,o),a.set(g,o),this.count++,l=tc.bind(this),o.addEventListener("load",l),o.addEventListener("error",l),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 Q1(e,t,a,l,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=Zc(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Zc(0),this.hiddenUpdates=Zc(null),this.identifierPrefix=l,this.onUncaughtError=o,this.onCaughtError=f,this.onRecoverableError=g,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=_,this.incompleteTransitions=new Map}function hg(e,t,a,l,o,f,g,S,_,H,X,J){return e=new Q1(e,t,a,g,_,H,X,J,S),t=1,f===!0&&(t|=24),f=sn(3,null,null,t),e.current=f,f.stateNode=e,t=Ou(),t.refCount++,e.pooledCache=t,t.refCount++,f.memoizedState={element:l,isDehydrated:a,cache:t},Uu(f),e}function mg(e){return e?(e=Mi,e):Mi}function pg(e,t,a,l,o,f){o=mg(o),l.context===null?l.context=o:l.pendingContext=o,l=Da(t),l.payload={element:a},f=f===void 0?null:f,f!==null&&(l.callback=f),a=Ua(e,l,t),a!==null&&(Zt(a,e,t),Zl(a,e,t))}function yg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function td(e,t){yg(e,t),(e=e.alternate)&&yg(e,t)}function gg(e){if(e.tag===13||e.tag===31){var t=Ms(e,67108864);t!==null&&Zt(t,e,67108864),td(e,67108864)}}function vg(e){if(e.tag===13||e.tag===31){var t=un();t=Fc(t);var a=Ms(e,t);a!==null&&Zt(a,e,t),td(e,t)}}var sc=!0;function G1(e,t,a,l){var o=L.T;L.T=null;var f=K.p;try{K.p=2,nd(e,t,a,l)}finally{K.p=f,L.T=o}}function V1(e,t,a,l){var o=L.T;L.T=null;var f=K.p;try{K.p=8,nd(e,t,a,l)}finally{K.p=f,L.T=o}}function nd(e,t,a,l){if(sc){var o=ad(l);if(o===null)Gf(e,t,l,ic,a),xg(e,l);else if(Y1(o,e,t,a,l))l.stopPropagation();else if(xg(e,l),t&4&&-1<P1.indexOf(e)){for(;o!==null;){var f=bi(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-nn(g);S.entanglements[1]|=_,g&=~_}Vn(f),(He&6)===0&&(Qo=Et()+500,ur(0))}}break;case 31:case 13:S=Ms(f,2),S!==null&&Zt(S,f,2),Vo(),td(f,2)}if(f=ad(l),f===null&&Gf(e,t,l,ic,a),f===o)break;o=f}o!==null&&l.stopPropagation()}else Gf(e,t,l,null,a)}}function ad(e){return e=su(e),sd(e)}var ic=null;function sd(e){if(ic=null,e=vi(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 bg(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 qn:return 8;case yi:case Mb:return 32;case Th:return 268435456;default:return 32}default:return 32}}var id=!1,Xa=null,Za=null,Fa=null,gr=new Map,vr=new Map,Ia=[],P1="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 xg(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,l,o,f){return e===null||e.nativeEvent!==f?(e={blockedOn:t,domEventName:a,eventSystemFlags:l,nativeEvent:f,targetContainers:[o]},t!==null&&(t=bi(t),t!==null&&gg(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function Y1(e,t,a,l,o){switch(t){case"focusin":return Xa=br(Xa,e,t,a,l,o),!0;case"dragenter":return Za=br(Za,e,t,a,l,o),!0;case"mouseover":return Fa=br(Fa,e,t,a,l,o),!0;case"pointerover":var f=o.pointerId;return gr.set(f,br(gr.get(f)||null,e,t,a,l,o)),!0;case"gotpointercapture":return f=o.pointerId,vr.set(f,br(vr.get(f)||null,e,t,a,l,o)),!0}return!1}function Sg(e){var t=vi(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,Dh(e.priority,function(){vg(a)});return}}else if(t===31){if(t=y(a),t!==null){e.blockedOn=t,Dh(e.priority,function(){vg(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=ad(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);au=l,a.target.dispatchEvent(l),au=null}else return t=bi(a),t!==null&&gg(t),e.blockedOn=a,!1;t.shift()}return!0}function jg(e,t,a){lc(e)&&a.delete(t)}function K1(){id=!1,Xa!==null&&lc(Xa)&&(Xa=null),Za!==null&&lc(Za)&&(Za=null),Fa!==null&&lc(Fa)&&(Fa=null),gr.forEach(jg),vr.forEach(jg)}function rc(e,t){e.blockedOn===t&&(e.blockedOn=null,id||(id=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,K1)))}var oc=null;function wg(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],l=e[t+1],o=e[t+2];if(typeof l!="function"){if(sd(l||a)===null)continue;break}var f=bi(a);f!==null&&(e.splice(t,3),t-=3,nf(f,{pending:!0,data:o,method:a.method,action:l},l,o))}}))}function el(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<Ia.length;a++){var l=Ia[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Ia.length&&(a=Ia[0],a.blockedOn===null);)Sg(a),a.blockedOn===null&&Ia.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var o=a[l],f=a[l+1],g=o[Gt]||null;if(typeof f=="function")g||wg(a);else if(g){var S=null;if(f&&f.hasAttribute("formAction")){if(o=f,g=f[Gt]||null)S=g.formAction;else if(sd(o)!==null)continue}else S=g.action;typeof S=="function"?a[l+1]=S:(a.splice(l,3),l-=3),wg(a)}}}function Ng(){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),l||setTimeout(a,20)}function a(){if(!l&&!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 l=!1,o=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),o!==null&&(o(),o=null)}}}function ld(e){this._internalRoot=e}cc.prototype.render=ld.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var a=t.current,l=un();pg(a,l,e,t,null,null)},cc.prototype.unmount=ld.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;pg(e.current,2,null,e,null,null),Vo(),t[gi]=null}};function cc(e){this._internalRoot=e}cc.prototype.unstable_scheduleHydration=function(e){if(e){var t=zh();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Ia.length&&t!==0&&t<Ia[a].priority;a++);Ia.splice(a,0,e),a===0&&Sg(e)}};var Rg=s.version;if(Rg!=="19.2.6")throw Error(r(527,Rg,"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 X1={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{Cl=uc.inject(X1),tn=uc}catch{}}return Nr.createRoot=function(e,t){if(!c(e))throw Error(r(299));var a=!1,l="",o=Op,f=kp,g=zp;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(f=t.onCaughtError),t.onRecoverableError!==void 0&&(g=t.onRecoverableError)),t=hg(e,1,!1,null,null,a,l,null,o,f,g,Ng),e[gi]=t.current,Qf(e),new ld(t)},Nr.hydrateRoot=function(e,t,a){if(!c(e))throw Error(r(299));var l=!1,o="",f=Op,g=kp,S=zp,_=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!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=hg(e,1,!0,t,a??null,l,o,_,f,g,S,Ng),t.context=mg(null),a=t.current,l=un(),l=Fc(l),o=Da(l),o.callback=null,Ua(a,o,l),a=l,t.current.lanes=a,Ml(t,a),Vn(t),e[gi]=t.current,Qf(e),new cc(t)},Nr.version="19.2.6",Nr}var bv;function Dw(){if(bv)return wd.exports;bv=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(),wd.exports=zw(),wd.exports}var Uw=Dw();function Lw(){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 V0={baseUrl:Lw()};class At extends Error{constructor(i,r,c){super(r);$a(this,"status");$a(this,"body");this.name="ApiError",this.status=i,this.body=c}}function Bw(n,s){const r=`${V0.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 nl(n,s={}){const{json:i,query:r,headers:c,...d}=s,h={credentials:"include",...d,headers:{Accept:"application/json",...i!==void 0?{"Content-Type":"application/json"}:{},...c}};i!==void 0&&(h.body=JSON.stringify(i));const y=await fetch(Bw(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 At(y.status,v,b)}return b}const Le={request:nl,get:(n,s)=>nl(n,{...s,method:"GET"}),post:(n,s)=>nl(n,{...s,method:"POST"}),put:(n,s)=>nl(n,{...s,method:"PUT"}),patch:(n,s)=>nl(n,{...s,method:"PATCH"}),delete:(n,s)=>nl(n,{...s,method:"DELETE"})};function qw(){return Le.get("/v1/auth/status")}var Hw={};const Cc=Object.create(null),Rr=n=>{var s;return Hw||((s=globalThis.Deno)==null?void 0:s.env.toObject())||globalThis.__env__||(n?Cc:globalThis)},Ps=new Proxy(Cc,{get(n,s){return Rr()[s]??Cc[s]},has(n,s){return s in Rr()||s in Cc},set(n,s,i){const r=Rr(!0);return r[s]=i,!0},deleteProperty(n,s){if(!s)return!1;const i=Rr(!0);return delete i[s],!0},ownKeys(){const n=Rr(!0);return Object.keys(n)}});var Tc=class extends Error{constructor(n,s){super(n,s),this.name="BetterAuthError",this.message=n,this.stack=""}};function Qw(n){try{return(new URL(n).pathname.replace(/\/+$/,"")||"/")!=="/"}catch{throw new Tc(`Invalid base URL: ${n}. Please provide a valid base URL.`)}}function Gw(n){try{const s=new URL(n);if(s.protocol!=="http:"&&s.protocol!=="https:")throw new Tc(`Invalid base URL: ${n}. URL must include 'http://' or 'https://'`)}catch(s){throw s instanceof Tc?s:new Tc(`Invalid base URL: ${n}. Please provide a valid base URL.`,{cause:s})}}function _d(n,s="/api/auth"){if(Gw(n),Qw(n))return n;const i=n.replace(/\/+$/,"");return!s||s==="/"?i:(s=s.startsWith("/")?s:`/${s}`,`${i}${s}`)}function Vw(n,s,i,r,c){if(n)return _d(n,s);{const d=Ps.BETTER_AUTH_URL||Ps.NEXT_PUBLIC_BETTER_AUTH_URL||Ps.PUBLIC_BETTER_AUTH_URL||Ps.NUXT_PUBLIC_BETTER_AUTH_URL||Ps.NUXT_PUBLIC_AUTH_URL||(Ps.BASE_URL!=="/"?Ps.BASE_URL:void 0);if(d)return _d(d,s)}if(typeof window<"u"&&window.location)return _d(window.location.origin,s)}const Pw={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*:/},Yw=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,xv={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:Number.POSITIVE_INFINITY,"-infinity":Number.NEGATIVE_INFINITY},Kw=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function Xw(n){return n instanceof Date&&!isNaN(n.getTime())}function Zw(n){const s=Kw.exec(n);if(!s)return null;const[,i,r,c,d,h,y,p,m,b,v]=s,x=new Date(Date.UTC(parseInt(i,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 Xw(x)?x:null}function Fw(n,s={}){const{strict:i=!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 xv)return xv[y];if(!Yw.test(h)){if(i)throw new SyntaxError("[better-json] Invalid JSON");return n}if(Object.entries(Pw).some(([p,m])=>{const b=m.test(h);return b&&r&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${p} pattern`),b})&&i)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=Zw(b);if(v)return v}return c?c(m,b):b})}catch(p){if(i)throw p;return n}}function Iw(n,s={strict:!0}){return Fw(n,s)}const Jw={id:"redirect",name:"Redirect",hooks:{onSuccess(n){var s,i;if((s=n.data)!=null&&s.url&&((i=n.data)!=null&&i.redirect)&&typeof window<"u"&&window.location&&window.location)try{window.location.href=n.data.url}catch{}}}};let zn=[],Wa=0;const gc=4,$w=globalThis.nanostoresGlobal||(globalThis.nanostoresGlobal={epoch:0}),P0=n=>{let s=[],i={get(){return i.lc||i.listen(()=>{})(),i.value},init:n,lc:0,listen(r){return i.lc=s.push(r),()=>{for(let d=Wa+gc;d<zn.length;)zn[d]===r?zn.splice(d,gc):d+=gc;let c=s.indexOf(r);~c&&(s.splice(c,1),--i.lc||i.off())}},notify(r,c){$w.epoch++;let d=!zn.length;for(let h of s)zn.push(h,i.value,r,c);if(d){for(Wa=0;Wa<zn.length;Wa+=gc)zn[Wa](zn[Wa+1],zn[Wa+2],zn[Wa+3]);zn.length=0}},off(){},set(r){let c=i.value;c!==r&&(i.value=r,i.notify(c))},subscribe(r){let c=i.listen(r);return r(i.value),c},value:n};return i},Ww=5,vc=6,bc=10;let e2=(n,s,i,r)=>(n.events=n.events||{},n.events[i+bc]||(n.events[i+bc]=r(c=>{n.events[i].reduceRight((d,h)=>(h(d),d),{shared:{},...c})})),n.events[i]=n.events[i]||[],n.events[i].push(s),()=>{let c=n.events[i],d=c.indexOf(s);c.splice(d,1),c.length||(delete n.events[i],n.events[i+bc](),delete n.events[i+bc])});const t2=1e3;let Y0=(n,s)=>e2(n,r=>{let c=s(r);c&&n.events[vc].push(c)},Ww,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]=[]}},t2)},()=>{n.listen=c,n.off=d}});function n2(n,s,i){let r=new Set(s).add(void 0);return n.listen((c,d,h)=>{r.has(h)&&i(c,d,h)})}const a2=()=>typeof window>"u",s2=(n,s,i,r)=>{const c=P0({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;i(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()=>{a2()||(h?await d():Y0(c,()=>{const p=setTimeout(async()=>{h||(h=!0,await d())},0);return()=>{c.off(),y.off(),clearTimeout(p)}}))});return c},Ed=Symbol.for("better-auth:broadcast-channel"),i2=()=>Math.floor(Date.now()/1e3);var l2=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:i2()}))}catch{}}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};const n=s=>{if(s.key!==this.name)return;const i=JSON.parse(s.newValue??"{}");(i==null?void 0:i.event)!=="session"||!(i!=null&&i.data)||this.listeners.forEach(r=>r(i))};return window.addEventListener("storage",n),()=>{window.removeEventListener("storage",n)}}};function Cd(n="better-auth.message"){return globalThis[Ed]||(globalThis[Ed]=new l2(n)),globalThis[Ed]}const Td=Symbol.for("better-auth:focus-manager");var r2=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 Sv(){return globalThis[Td]||(globalThis[Td]=new r2),globalThis[Td]}const Md=Symbol.for("better-auth:online-manager");var o2=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 Ad(){return globalThis[Md]||(globalThis[Md]=new o2),globalThis[Md]}const al=()=>Math.floor(Date.now()/1e3);function jv(n){return typeof n=="object"&&n!==null&&"data"in n&&"error"in n?n:{data:n,error:null}}const c2=5;function u2(n){var A,B,C;const{sessionAtom:s,sessionSignal:i,$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=((C=c.sessionOptions)==null?void 0:C.refetchWhenOffline)??!1,p={lastSync:0,lastSessionRequest:0,cachedSession:void 0},m=()=>y||Ad().isOnline,b=Q=>{if(!m())return;if((Q==null?void 0:Q.event)==="storage"){p.lastSync=al(),i.set(!i.get());return}const U=s.get(),z=()=>{p.lastSessionRequest=al(),r("/get-session").then(async O=>{let{data:Y,error:$}=jv(O);if(Y!=null&&Y.needsRefresh)try{const Z=await r("/get-session",{method:"POST"});({data:Y,error:$}=jv(Z))}catch{}const W=Y!=null&&Y.session&&(Y!=null&&Y.user)?Y:null;s.set({...U,data:W,error:$}),p.lastSync=al(),i.set(!i.get())}).catch(()=>{})};if((Q==null?void 0:Q.event)==="poll"){z();return}if((Q==null?void 0:Q.event)==="visibilitychange"){if(al()-p.lastSessionRequest<c2)return;p.lastSessionRequest=al()}if((Q==null?void 0:Q.event)==="visibilitychange"){z();return}((U==null?void 0:U.data)===null||(U==null?void 0:U.data)===void 0)&&(p.lastSync=al(),i.set(!i.get()))},v=Q=>{Cd().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=Cd().subscribe(()=>{b({event:"storage"})})},N=()=>{h&&(p.unsubscribeFocus=Sv().subscribe(()=>{b({event:"visibilitychange"})}))},R=()=>{p.unsubscribeOnline=Ad().subscribe(Q=>{Q&&b({event:"visibilitychange"})})};return{init:()=>{x(),w(),N(),R(),Cd().setup(),Sv().setup(),Ad().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 f2(n,s){const i=P0(!1),r=s2(i,"/get-session",n,{method:"GET"});let c=()=>{};return Y0(r,()=>{const d=u2({sessionAtom:r,sessionSignal:i,$fetch:n,options:s});return d.init(),c=d.broadcastSessionUpdate,()=>{d.cleanup()}}),{session:r,$sessionSignal:i,broadcastSessionUpdate:d=>c(d)}}function Od(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 nh(n,s,i=".",r){if(!Od(s))return nh(n,{},i,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,i)||(Array.isArray(h)&&Array.isArray(c[d])?c[d]=[...h,...c[d]]:Od(h)&&Od(c[d])?c[d]=nh(h,c[d],(i?`${i}.`:"")+d.toString(),r):c[d]=h))}return c}function d2(n){return(...s)=>s.reduce((i,r)=>nh(i,r,"",n),{})}const h2=d2();var m2=Object.defineProperty,p2=Object.defineProperties,y2=Object.getOwnPropertyDescriptors,wv=Object.getOwnPropertySymbols,g2=Object.prototype.hasOwnProperty,v2=Object.prototype.propertyIsEnumerable,Nv=(n,s,i)=>s in n?m2(n,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):n[s]=i,Un=(n,s)=>{for(var i in s||(s={}))g2.call(s,i)&&Nv(n,i,s[i]);if(wv)for(var i of wv(s))v2.call(s,i)&&Nv(n,i,s[i]);return n},Kn=(n,s)=>p2(n,y2(s)),b2=class extends Error{constructor(n,s,i){super(s||n.toString(),{cause:i}),this.status=n,this.statusText=s,this.error=i,Error.captureStackTrace(this,this.constructor)}},x2=async(n,s)=>{var i,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((i=b.init)==null?void 0:i.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}},Rv=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}},S2=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 j2(n){if(typeof n=="number")return new Rv({type:"linear",attempts:n,delay:1e3});switch(n.type){case"linear":return new Rv(n);case"exponential":return new S2(n);default:throw new Error("Invalid retry strategy")}}var w2=async n=>{const s={},i=async r=>typeof r=="function"?await r():r;if(n!=null&&n.auth){if(n.auth.type==="Bearer"){const r=await i(n.auth.token);if(!r)return s;s.authorization=`Bearer ${r}`}else if(n.auth.type==="Basic"){const[r,c]=await Promise.all([i(n.auth.username),i(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([i(n.auth.prefix),i(n.auth.value)]);if(!c)return s;s.authorization=`${r??""} ${c}`}}return s},N2=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function R2(n){const s=n.headers.get("content-type"),i=new Set(["image/svg","application/xml","application/xhtml","application/html"]);if(!s)return"json";const r=s.split(";").shift()||"";return N2.test(r)?"json":i.has(r)||r.startsWith("text/")?"text":"blob"}function _2(n){try{return JSON.parse(n),!0}catch{return!1}}function ah(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 _v(n){try{return JSON.parse(n)}catch{return n}}function Ev(n){return typeof n=="function"}function E2(n){if(n!=null&&n.customFetchImpl)return n.customFetchImpl;if(typeof globalThis<"u"&&Ev(globalThis.fetch))return globalThis.fetch;if(typeof window<"u"&&Ev(window.fetch))return window.fetch;throw new Error("No fetch implementation found")}async function C2(n){const s=new Headers(n==null?void 0:n.headers),i=await w2(n);for(const[r,c]of Object.entries(i||{}))s.set(r,c);if(!s.has("content-type")){const r=T2(n==null?void 0:n.body);r&&s.set("content-type",r)}return s}function T2(n){return ah(n)?"application/json":null}function M2(n){if(!(n!=null&&n.body))return null;const s=new Headers(n==null?void 0:n.headers);if(ah(n.body)&&!s.has("content-type")){for(const[i,r]of Object.entries(n==null?void 0:n.body))r instanceof Date&&(n.body[i]=r.toISOString());return JSON.stringify(n.body)}return s.has("content-type")&&s.get("content-type")==="application/x-www-form-urlencoded"&&ah(n.body)?new URLSearchParams(n.body).toString():n.body}function A2(n,s){var i;if(s!=null&&s.method)return s.method.toUpperCase();if(n.startsWith("@")){const r=(i=n.split("@")[1])==null?void 0:i.split("/")[0];return X0.includes(r)?r.toUpperCase():s!=null&&s.body?"POST":"GET"}return s!=null&&s.body?"POST":"GET"}function O2(n,s){let i;return!(n!=null&&n.signal)&&(n!=null&&n.timeout)&&(i=setTimeout(()=>s==null?void 0:s.abort(),n==null?void 0:n.timeout)),{abortTimeout:i,clearTimeout:()=>{i&&clearTimeout(i)}}}var k2=class K0 extends Error{constructor(s,i){super(i||JSON.stringify(s,null,2)),this.issues=s,Object.setPrototypeOf(this,K0.prototype)}};async function Mc(n,s){const i=await n["~standard"].validate(s);if(i.issues)throw new k2(i.issues);return i.value}var X0=["get","post","put","patch","delete"],z2=n=>({id:"apply-schema",name:"Apply Schema",version:"1.0.0",async init(s,i){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=Kn(Un({},i),{method:m.method,output:m.output});return i!=null&&i.disableValidation||(b=Kn(Un({},b),{body:m.input?await Mc(m.input,i==null?void 0:i.body):i==null?void 0:i.body,params:m.params?await Mc(m.params,i==null?void 0:i.params):i==null?void 0:i.params,query:m.query?await Mc(m.query,i==null?void 0:i.query):i==null?void 0:i.query})),{url:s,options:b}}}return{url:s,options:i}}}),D2=n=>{async function s(i,r){const c=Kn(Un(Un({},n),r),{plugins:[...(n==null?void 0:n.plugins)||[],z2(n||{}),...(r==null?void 0:r.plugins)||[]]});if(n!=null&&n.catchAllError)try{return await sh(i,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 sh(i,c)}return s};function U2(n,s){const{baseURL:i,params:r,query:c}=s||{query:{},params:{},baseURL:""};let d=n.startsWith("http")?n.split("/").slice(0,3).join("/"):i||"";if(n.startsWith("@")){const v=n.toString().split("@")[1].split("/")[0];X0.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 sh=async(n,s)=>{var i,r,c,d,h,y,p,m;const{hooks:b,url:v,options:x}=await x2(n,s),w=E2(x),N=new AbortController,R=(i=x.signal)!=null?i:N.signal,j=U2(v,x),k=M2(x),A=await C2(x),B=A2(v,x);let C=Kn(Un({},x),{url:j,headers:A,body:k,method:B,signal:R});for(const te of b.onRequest)if(te){const ee=await te(C);typeof ee=="object"&&ee!==null&&(C=ee)}("pipeTo"in C&&typeof C.pipeTo=="function"||typeof((r=s==null?void 0:s.body)==null?void 0:r.pipe)=="function")&&("duplex"in C||(C.duplex="half"));const{clearTimeout:Q}=O2(x,N);let U=await w(C.url,C);Q();const z={response:U,request:C};for(const te of b.onResponse)if(te){const ee=await te(Kn(Un({},z),{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(!(C.method!=="HEAD"))return{data:"",error:null};const ee=R2(U),he={data:null,response:U,request:C};if(ee==="json"||ee==="text"){const L=await U.text(),K=(d=C.jsonParser)!=null?d:_v;he.data=await K(L)}else he.data=await U[ee]();C!=null&&C.output&&C.output&&!C.disableValidation&&(he.data=await Mc(C.output,he.data));for(const L of b.onSuccess)L&&await L(Kn(Un({},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:_v,Y=await U.text(),$=_2(Y),W=$?await O(Y):null,Z={response:U,responseText:Y,request:C,error:Kn(Un({},W),{status:U.status,statusText:U.statusText})};for(const te of b.onError)te&&await te(Kn(Un({},Z),{response:(p=s==null?void 0:s.hookOptions)!=null&&p.cloneResponse?U.clone():U}));if(s!=null&&s.retry){const te=j2(s.retry),ee=(m=s.retryAttempt)!=null?m:0;if(await te.shouldAttemptRetry(ee,U)){for(const L of b.onRetry)L&&await L(z);const he=te.getDelay(ee);return await new Promise(L=>setTimeout(L,he)),await sh(n,Kn(Un({},s),{retryAttempt:ee+1}))}}if(s!=null&&s.throw)throw new b2(U.status,U.statusText,$?W:Y);return{data:null,error:Kn(Un({},W),{status:U.status,statusText:U.statusText})}},Ys={};const L2=n=>{if(typeof process>"u")return;const s=n??"/api/auth";if(Ys.NEXT_PUBLIC_AUTH_URL)return Ys.NEXT_PUBLIC_AUTH_URL;if(typeof window>"u"){if(Ys.NEXTAUTH_URL)try{return Ys.NEXTAUTH_URL}catch{}if(Ys.VERCEL_URL)try{const i=Ys.VERCEL_URL.startsWith("http")?"":"https://";return`${new URL(`${i}${Ys.VERCEL_URL}`).origin}${s}`}catch{}}},B2=(n,s)=>{var Q,U,z,O,Y,$,W;const i="credentials"in Request.prototype,r=Vw(n==null?void 0:n.baseURL,n==null?void 0:n.basePath)??L2(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:(z=n==null?void 0:n.fetchOptions)==null?void 0:z.onError,onRequest:(O=n==null?void 0:n.fetchOptions)==null?void 0:O.onRequest,onResponse:(Y=n==null?void 0:n.fetchOptions)==null?void 0:Y.onResponse}},{onSuccess:h,onError:y,onRequest:p,onResponse:m,...b}=(n==null?void 0:n.fetchOptions)||{},v=D2({baseURL:r,...i?{credentials:"include"}:{},method:"GET",jsonParser(Z){return Z?Iw(Z,{strict:!1}):null},customFetchImpl:fetch,...b,plugins:[d,...b.plugins||[],...n!=null&&n.disableDefaultFetchPlugins?[]:[Jw],...c]}),{$sessionSignal:x,session:w,broadcastSessionUpdate:N}=f2(v,n),R=(n==null?void 0:n.plugins)||[];let j={};const k={$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(k,($=Z.getAtoms)==null?void 0:$.call(Z,v)),Z.pathMethods&&Object.assign(A,Z.pathMethods),Z.atomListeners&&B.push(...Z.atomListeners);const C={notify:Z=>{k[Z].set(!k[Z].get())},listen:(Z,te)=>{k[Z].subscribe(te)},atoms:k};for(const Z of R)Z.getActions&&(j=h2(((W=Z.getActions)==null?void 0:W.call(Z,v,C,n))??{},j));return{get baseURL(){return r},pluginsActions:j,pluginsAtoms:k,pluginPathMethods:A,atomListeners:B,$fetch:v,$store:C}};function q2(n){return typeof n=="object"&&n!==null&&"get"in n&&typeof n.get=="function"&&"lc"in n&&typeof n.lc=="number"}function H2(n,s,i){const r=s[n],{fetchOptions:c,query:d,...h}=i||{};return r||(c!=null&&c.method?c.method:h&&Object.keys(h).length>0?"POST":"GET")}function Q2(n,s,i,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"||q2(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},k=H2(b,i,v);return await s(b,{...j,body:k==="GET"?void 0:{...R,...(j==null?void 0:j.body)||{}},query:w||(j==null?void 0:j.query),method:k,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(z=>z.matcher(b));if(!B.length)return;const C=new Set;for(const z of B){const O=r[z.signal];if(!O)return;if(C.has(z.signal))continue;C.add(z.signal);const Y=O.get();setTimeout(()=>{O.set(!Y)},10),(U=z.callback)==null||U.call(z,b)}}})}})}return d()}function G2(n,s={}){const i=V.useRef(n.get()),{keys:r,deps:c=[n,r]}=s,d=V.useCallback(y=>{const p=m=>{i.current!==m&&(i.current=m,y())};return p(n.value),r!=null&&r.length?n2(n,r,p):n.listen(p)},c),h=()=>i.current;return V.useSyncExternalStore(d,h,h)}function V2(n){return n.charAt(0).toUpperCase()+n.slice(1)}function P2(n){return`use${V2(n)}`}function Y2(n){const{pluginPathMethods:s,pluginsActions:i,pluginsAtoms:r,$fetch:c,$store:d,atomListeners:h}=B2(n),y={};for(const[p,m]of Object.entries(r))y[P2(p)]=()=>G2(m);return Q2({...i,...y,$fetch:c,$store:d},c,s,r,h)}const K2=Y2({baseURL:`${V0.baseUrl}/api/auth`,fetchOptions:{credentials:"include"}}),{signIn:X2,signOut:Z2,useSession:Z0,requestPasswordReset:F2,resetPassword:I2}=K2;function F0(n){var s,i,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]&&(i=F0(n[s]))&&(r&&(r+=" "),r+=i)}else for(i in n)n[i]&&(r&&(r+=" "),r+=i);return r}function I0(){for(var n,s,i=0,r="",c=arguments.length;i<c;i++)(n=arguments[i])&&(s=F0(n))&&(r&&(r+=" "),r+=s);return r}const J2=(n,s)=>{const i=new Array(n.length+s.length);for(let r=0;r<n.length;r++)i[r]=n[r];for(let r=0;r<s.length;r++)i[n.length+r]=s[r];return i},$2=(n,s)=>({classGroupId:n,validator:s}),J0=(n=new Map,s=null,i)=>({nextPart:n,validators:s,classGroupId:i}),Hc="-",Cv=[],W2="arbitrary..",eN=n=>{const s=nN(n),{conflictingClassGroups:i,conflictingClassGroupModifiers:r}=n;return{getClassGroupId:h=>{if(h.startsWith("[")&&h.endsWith("]"))return tN(h);const y=h.split(Hc),p=y[0]===""&&y.length>1?1:0;return $0(y,p,s)},getConflictingClassGroupIds:(h,y)=>{if(y){const p=r[h],m=i[h];return p?m?J2(m,p):p:m||Cv}return i[h]||Cv}}},$0=(n,s,i)=>{if(n.length-s===0)return i.classGroupId;const c=n[s],d=i.nextPart.get(c);if(d){const m=$0(n,s+1,d);if(m)return m}const h=i.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}},tN=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const s=n.slice(1,-1),i=s.indexOf(":"),r=s.slice(0,i);return r?W2+r:void 0})(),nN=n=>{const{theme:s,classGroups:i}=n;return aN(i,s)},aN=(n,s)=>{const i=J0();for(const r in n){const c=n[r];xh(c,i,r,s)}return i},xh=(n,s,i,r)=>{const c=n.length;for(let d=0;d<c;d++){const h=n[d];sN(h,s,i,r)}},sN=(n,s,i,r)=>{if(typeof n=="string"){iN(n,s,i);return}if(typeof n=="function"){lN(n,s,i,r);return}rN(n,s,i,r)},iN=(n,s,i)=>{const r=n===""?s:W0(s,n);r.classGroupId=i},lN=(n,s,i,r)=>{if(oN(n)){xh(n(r),s,i,r);return}s.validators===null&&(s.validators=[]),s.validators.push($2(i,n))},rN=(n,s,i,r)=>{const c=Object.entries(n),d=c.length;for(let h=0;h<d;h++){const[y,p]=c[h];xh(p,W0(s,y),i,r)}},W0=(n,s)=>{let i=n;const r=s.split(Hc),c=r.length;for(let d=0;d<c;d++){const h=r[d];let y=i.nextPart.get(h);y||(y=J0(),i.nextPart.set(h,y)),i=y}return i},oN=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,cN=n=>{if(n<1)return{get:()=>{},set:()=>{}};let s=0,i=Object.create(null),r=Object.create(null);const c=(d,h)=>{i[d]=h,s++,s>n&&(s=0,r=i,i=Object.create(null))};return{get(d){let h=i[d];if(h!==void 0)return h;if((h=r[d])!==void 0)return c(d,h),h},set(d,h){d in i?i[d]=h:c(d,h)}}},ih="!",Tv=":",uN=[],Mv=(n,s,i,r,c)=>({modifiers:n,hasImportantModifier:s,baseClassName:i,maybePostfixModifierPosition:r,isExternal:c}),fN=n=>{const{prefix:s,experimentalParseClassName:i}=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===Tv){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(ih)?(x=v.slice(0,-1),w=!0):v.startsWith(ih)&&(x=v.slice(1),w=!0);const N=m&&m>p?m-p:void 0;return Mv(d,w,x,N)};if(s){const c=s+Tv,d=r;r=h=>h.startsWith(c)?d(h.slice(c.length)):Mv(uN,!1,h,void 0,!0)}if(i){const c=r;r=d=>i({className:d,parseClassName:c})}return r},dN=n=>{const s=new Map;return n.orderSensitiveModifiers.forEach((i,r)=>{s.set(i,1e6+r)}),i=>{const r=[];let c=[];for(let d=0;d<i.length;d++){const h=i[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}},hN=n=>({cache:cN(n.cacheSize),parseClassName:fN(n),sortModifiers:dN(n),postfixLookupClassGroupIds:mN(n),...eN(n)}),mN=n=>{const s=Object.create(null),i=n.postfixLookupClassGroups;if(i)for(let r=0;r<i.length;r++)s[i[r]]=!0;return s},pN=/\s+/,yN=(n,s)=>{const{parseClassName:i,getClassGroupId:r,getConflictingClassGroupIds:c,sortModifiers:d,postfixLookupClassGroupIds:h}=s,y=[],p=n.trim().split(pN);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}=i(v);if(x){m=v+(m.length>0?" "+m:m);continue}let k=!!j,A;if(k){const z=R.substring(0,j);A=r(z);const O=A&&h[A]?r(R):void 0;O&&O!==A&&(A=O,k=!1)}else A=r(R);if(!A){if(!k){m=v+(m.length>0?" "+m:m);continue}if(A=r(R),!A){m=v+(m.length>0?" "+m:m);continue}k=!1}const B=w.length===0?"":w.length===1?w[0]:d(w).join(":"),C=N?B+ih:B,Q=C+A;if(y.indexOf(Q)>-1)continue;y.push(Q);const U=c(A,k);for(let z=0;z<U.length;++z){const O=U[z];y.push(C+O)}m=v+(m.length>0?" "+m:m)}return m},gN=(...n)=>{let s=0,i,r,c="";for(;s<n.length;)(i=n[s++])&&(r=eb(i))&&(c&&(c+=" "),c+=r);return c},eb=n=>{if(typeof n=="string")return n;let s,i="";for(let r=0;r<n.length;r++)n[r]&&(s=eb(n[r]))&&(i&&(i+=" "),i+=s);return i},vN=(n,...s)=>{let i,r,c,d;const h=p=>{const m=s.reduce((b,v)=>v(b),n());return i=hN(m),r=i.cache.get,c=i.cache.set,d=y,y(p)},y=p=>{const m=r(p);if(m)return m;const b=yN(p,i);return c(p,b),b};return d=h,(...p)=>d(gN(...p))},bN=[],ht=n=>{const s=i=>i[n]||bN;return s.isThemeGetter=!0,s},tb=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,nb=/^\((?:(\w[\w-]*):)?(.+)\)$/i,xN=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,SN=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,jN=/\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$/,wN=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,NN=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,RN=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,es=n=>xN.test(n),Re=n=>!!n&&!Number.isNaN(Number(n)),Pn=n=>!!n&&Number.isInteger(Number(n)),kd=n=>n.endsWith("%")&&Re(n.slice(0,-1)),va=n=>SN.test(n),ab=()=>!0,_N=n=>jN.test(n)&&!wN.test(n),Sh=()=>!1,EN=n=>NN.test(n),CN=n=>RN.test(n),TN=n=>!re(n)&&!oe(n),MN=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)),AN=n=>xs(n,lb,Sh),re=n=>tb.test(n),Ks=n=>xs(n,rb,_N),Av=n=>xs(n,qN,Re),ON=n=>xs(n,cb,ab),kN=n=>xs(n,ob,Sh),Ov=n=>xs(n,sb,Sh),zN=n=>xs(n,ib,CN),xc=n=>xs(n,ub,EN),oe=n=>nb.test(n),_r=n=>di(n,rb),DN=n=>di(n,ob),kv=n=>di(n,sb),UN=n=>di(n,lb),LN=n=>di(n,ib),Sc=n=>di(n,ub,!0),BN=n=>di(n,cb,!0),xs=(n,s,i)=>{const r=tb.exec(n);return r?r[1]?s(r[1]):i(r[2]):!1},di=(n,s,i=!1)=>{const r=nb.exec(n);return r?r[1]?s(r[1]):i:!1},sb=n=>n==="position"||n==="percentage",ib=n=>n==="image"||n==="url",lb=n=>n==="length"||n==="size"||n==="bg-size",rb=n=>n==="length",qN=n=>n==="number",ob=n=>n==="family-name",cb=n=>n==="number"||n==="weight",ub=n=>n==="shadow",HN=()=>{const n=ht("color"),s=ht("font"),i=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"),k=ht("ease"),A=ht("animate"),B=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],Q=()=>[...C(),oe,re],U=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto","contain","none"],O=()=>[oe,re,p],Y=()=>[es,"full","auto",...O()],$=()=>[Pn,"none","subgrid",oe,re],W=()=>["auto",{span:["full",Pn,oe,re]},Pn,oe,re],Z=()=>[Pn,"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],T=()=>[...C(),kv,Ov,{position:[oe,re]}],I=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ae=()=>["auto","cover","contain",UN,AN,{size:[oe,re]}],se=()=>[kd,_r,Ks],ie=()=>["","none","full",m,oe,re],me=()=>["",Re,_r,Ks],Ee=()=>["solid","dashed","dotted","double"],Pe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ge=()=>[Re,kd,kv,Ov],pn=()=>["","none",N,oe,re],Qt=()=>["none",Re,oe,re],en=()=>["none",Re,oe,re],$n=()=>[Re,oe,re],Ot=()=>[es,"full",...O()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[va],breakpoint:[va],color:[ab],container:[va],"drop-shadow":[va],ease:["in","out","in-out"],font:[TN],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[va],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[va],shadow:[va],spacing:["px",Re],text:[va],"text-shadow":[va],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":[MN],columns:[{columns:[Re,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:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Y()}],"inset-x":[{"inset-x":Y()}],"inset-y":[{"inset-y":Y()}],start:[{"inset-s":Y(),start:Y()}],end:[{"inset-e":Y(),end:Y()}],"inset-bs":[{"inset-bs":Y()}],"inset-be":[{"inset-be":Y()}],top:[{top:Y()}],right:[{right:Y()}],bottom:[{bottom:Y()}],left:[{left:Y()}],visibility:["visible","invisible","collapse"],z:[{z:[Pn,"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:[Re,es,"auto","initial","none",re]}],grow:[{grow:["",Re,oe,re]}],shrink:[{shrink:["",Re,oe,re]}],order:[{order:[Pn,"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",i,_r,Ks]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,BN,ON]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",kd,re]}],"font-family":[{font:[DN,kN,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":[Re,"none",oe,Av]}],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:[...Ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[Re,"from-font","auto",oe,Ks]}],"text-decoration-color":[{decoration:ne()}],"underline-offset":[{"underline-offset":[Re,"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:[Pn,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:T()}],"bg-repeat":[{bg:I()}],"bg-size":[{bg:ae()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Pn,oe,re],radial:["",oe,re],conic:[Pn,oe,re]},LN,zN]}],"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:[...Ee(),"hidden","none"]}],"divide-style":[{divide:[...Ee(),"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:[...Ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Re,oe,re]}],"outline-w":[{outline:["",Re,_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":[Re,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:[Re,oe,re]}],"mix-blend":[{"mix-blend":[...Pe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Pe()}],"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":[Re]}],"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":C()}],"mask-image-conic-pos":[{"mask-conic":[Re]}],"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:T()}],"mask-repeat":[{mask:I()}],"mask-size":[{mask:ae()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",oe,re]}],filter:[{filter:["","none",oe,re]}],blur:[{blur:pn()}],brightness:[{brightness:[Re,oe,re]}],contrast:[{contrast:[Re,oe,re]}],"drop-shadow":[{"drop-shadow":["","none",w,Sc,xc]}],"drop-shadow-color":[{"drop-shadow":ne()}],grayscale:[{grayscale:["",Re,oe,re]}],"hue-rotate":[{"hue-rotate":[Re,oe,re]}],invert:[{invert:["",Re,oe,re]}],saturate:[{saturate:[Re,oe,re]}],sepia:[{sepia:["",Re,oe,re]}],"backdrop-filter":[{"backdrop-filter":["","none",oe,re]}],"backdrop-blur":[{"backdrop-blur":pn()}],"backdrop-brightness":[{"backdrop-brightness":[Re,oe,re]}],"backdrop-contrast":[{"backdrop-contrast":[Re,oe,re]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Re,oe,re]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Re,oe,re]}],"backdrop-invert":[{"backdrop-invert":["",Re,oe,re]}],"backdrop-opacity":[{"backdrop-opacity":[Re,oe,re]}],"backdrop-saturate":[{"backdrop-saturate":[Re,oe,re]}],"backdrop-sepia":[{"backdrop-sepia":["",Re,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:[Re,"initial",oe,re]}],ease:[{ease:["linear","initial",k,oe,re]}],delay:[{delay:[Re,oe,re]}],animate:[{animate:["none",A,oe,re]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[R,oe,re]}],"perspective-origin":[{"perspective-origin":Q()}],rotate:[{rotate:Qt()}],"rotate-x":[{"rotate-x":Qt()}],"rotate-y":[{"rotate-y":Qt()}],"rotate-z":[{"rotate-z":Qt()}],scale:[{scale:en()}],"scale-x":[{"scale-x":en()}],"scale-y":[{"scale-y":en()}],"scale-z":[{"scale-z":en()}],"scale-3d":["scale-3d"],skew:[{skew:$n()}],"skew-x":[{"skew-x":$n()}],"skew-y":[{"skew-y":$n()}],transform:[{transform:[oe,re,"","none","gpu","cpu"]}],"transform-origin":[{origin:Q()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ot()}],"translate-x":[{"translate-x":Ot()}],"translate-y":[{"translate-y":Ot()}],"translate-z":[{"translate-z":Ot()}],"translate-none":["translate-none"],zoom:[{zoom:[Pn,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:[Re,_r,Ks,Av]}],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"]}},QN=vN(HN);function Fe(...n){return QN(I0(n))}function fb({className:n}){return u.jsxs("span",{className:Fe("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 zv=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,Dv=I0,db=(n,s)=>i=>{var r;if((s==null?void 0:s.variants)==null)return Dv(n,i==null?void 0:i.class,i==null?void 0:i.className);const{variants:c,defaultVariants:d}=s,h=Object.keys(c).map(m=>{const b=i==null?void 0:i[m],v=d==null?void 0:d[m];if(b===null)return null;const x=zv(b)||zv(v);return c[m][x]}),y=i&&Object.entries(i).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 Dv(n,h,p,i==null?void 0:i.class,i==null?void 0:i.className)},jh=db("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"}}),je=V.forwardRef(({className:n,variant:s,size:i,...r},c)=>u.jsx("button",{type:"button",className:Fe(jh({variant:s,size:i,className:n})),ref:c,...r}));je.displayName="Button";const Lt=V.forwardRef(({className:n,...s},i)=>u.jsx("div",{ref:i,className:Fe("rounded-md border border-hairline-faint bg-white/[0.015] text-white transition-colors duration-200 hover:border-white/15",n),...s}));Lt.displayName="Card";const Bt=V.forwardRef(({className:n,...s},i)=>u.jsx("div",{ref:i,className:Fe("flex flex-col space-y-1.5 p-6",n),...s}));Bt.displayName="CardHeader";const $t=V.forwardRef(({className:n,...s},i)=>u.jsx("div",{ref:i,className:Fe("font-display text-lg leading-none tracking-[-0.02em] text-white",n),...s}));$t.displayName="CardTitle";const bs=V.forwardRef(({className:n,...s},i)=>u.jsx("div",{ref:i,className:Fe("text-sm text-white/60",n),...s}));bs.displayName="CardDescription";const qt=V.forwardRef(({className:n,...s},i)=>u.jsx("div",{ref:i,className:Fe("p-6 pt-0",n),...s}));qt.displayName="CardContent";const GN=V.forwardRef(({className:n,...s},i)=>u.jsx("div",{ref:i,className:Fe("flex items-center p-6 pt-0",n),...s}));GN.displayName="CardFooter";const vt=V.forwardRef(({className:n,type:s,...i},r)=>u.jsx("input",{type:s,className:Fe("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,...i}));vt.displayName="Input";function VN(){return typeof window>"u"?"/studio/":`${window.location.origin}/studio/`}function hb({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(fb,{}),u.jsx("span",{className:"eyebrow text-white/50",children:"Studio"})]}),n]})}function PN({onSuccess:n,onForgot:s}){const[i,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 X2.email({email:i,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(Lt,{className:"glass-panel w-full max-w-sm",children:[u.jsxs(Bt,{children:[u.jsx($t,{children:"Sign in to Studio"}),u.jsx(bs,{children:"Enter your credentials to access Hogsend Studio."})]}),u.jsx(qt,{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:i,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(je,{type:"submit",className:"w-full",disabled:p,children:p?"Please wait…":"Sign in"})]})})]})}function YN({onReload:n}){return u.jsxs(Lt,{className:"glass-panel w-full max-w-md",children:[u.jsxs(Bt,{children:[u.jsx($t,{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(qt,{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(je,{type:"button",className:"w-full",onClick:n,children:"Reload"})]})]})}function Uv({onBack:n}){const[s,i]=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 F2({email:s,redirectTo:VN()}),h(!0)}catch(v){p(v instanceof Error?v.message:"Something went wrong.")}finally{c(!1)}}return u.jsxs(Lt,{className:"glass-panel w-full max-w-sm",children:[u.jsxs(Bt,{children:[u.jsx($t,{children:"Reset your password"}),u.jsx(bs,{children:"Enter your account email and we'll send you a reset link."})]}),u.jsx(qt,{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(je,{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=>i(b.target.value),placeholder:"you@example.com",autoComplete:"email"})]}),y?u.jsx("p",{className:"text-sm text-accent",children:y}):null,u.jsx(je,{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 KN({token:n,onBack:s}){const[i,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),i!==c){v("Passwords don't match.");return}y(!0);try{const N=await I2({newPassword:i,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(Lt,{className:"glass-panel w-full max-w-sm",children:[u.jsxs(Bt,{children:[u.jsx($t,{children:"Choose a new password"}),u.jsx(bs,{children:p?"Your password has been updated.":"Enter a new password for your account."})]}),u.jsx(qt,{children:p?u.jsx(je,{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:i,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(je,{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 Lv({mode:n,onSuccess:s,onModeChange:i,resetToken:r}){const c=()=>i==null?void 0:i("login");let d;return n==="forgot"?d=u.jsx(Uv,{onBack:c}):n==="reset"?d=r?u.jsx(KN,{token:r,onBack:c}):u.jsx(Uv,{onBack:c}):d=u.jsx(PN,{onSuccess:s,onForgot:()=>i==null?void 0:i("forgot")}),u.jsx(hb,{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 XN(){return typeof window>"u"?"":new URLSearchParams(window.location.search).get("token")??""}function ZN(){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 FN({children:n}){const[s]=V.useState(()=>{const v=XN();return v&&ZN(),v}),[i,r]=V.useState(()=>s?"reset":null),{data:c,isPending:d,isError:h,refetch:y}=tt({queryKey:["auth-status"],queryFn:qw,retry:1,staleTime:0}),{data:p,isPending:m,refetch:b}=Z0();return i==="reset"||i==="forgot"?u.jsx(Lv,{mode:i,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(hb,{children:u.jsx(YN,{onReload:()=>{y(),b()}})}):m?u.jsx(zd,{children:"Loading…"}):p!=null&&p.user?u.jsx(u.Fragment,{children:n}):u.jsx(Lv,{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 IN=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),mb=(...n)=>n.filter((s,i,r)=>!!s&&s.trim()!==""&&r.indexOf(s)===i).join(" ").trim();/**
71
- * @license lucide-react v0.474.0 - ISC
72
- *
73
- * This source code is licensed under the ISC license.
74
- * See the LICENSE file in the root directory of this source tree.
75
- */var JN={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 $N=V.forwardRef(({color:n="currentColor",size:s=24,strokeWidth:i=2,absoluteStrokeWidth:r,className:c="",children:d,iconNode:h,...y},p)=>V.createElement("svg",{ref:p,...JN,width:s,height:s,stroke:n,strokeWidth:r?Number(i)*24/Number(s):i,className:mb("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 _e=(n,s)=>{const i=V.forwardRef(({className:r,...c},d)=>V.createElement($N,{ref:d,iconNode:s,className:mb(`lucide-${IN(n)}`,r),...c}));return i.displayName=`${n}`,i};/**
86
- * @license lucide-react v0.474.0 - ISC
87
- *
88
- * This source code is licensed under the ISC license.
89
- * See the LICENSE file in the root directory of this source tree.
90
- */const WN=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],eR=_e("ArrowDown",WN);/**
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 tR=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],wh=_e("ArrowUpRight",tR);/**
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 nR=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],aR=_e("ArrowUp",nR);/**
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 sR=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]],pb=_e("Ban",sR);/**
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 iR=[["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"}]],lR=_e("BookOpen",iR);/**
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 rR=[["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"}]],oR=_e("Boxes",rR);/**
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 cR=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],uR=_e("Check",cR);/**
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 fR=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],dR=_e("ChevronDown",fR);/**
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 hR=[["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"}]],mR=_e("CircleAlert",hR);/**
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 pR=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],yb=_e("CircleCheck",pR);/**
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 yR=[["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"}]],gb=_e("CircleX",yR);/**
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 gR=[["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"}]],Nh=_e("Copy",gR);/**
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 vR=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],bR=_e("ExternalLink",vR);/**
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 xR=[["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"}]],SR=_e("Eye",xR);/**
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 jR=[["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"}]],wR=_e("FlaskConical",jR);/**
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 NR=[["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"}]],Rh=_e("GitBranch",NR);/**
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 RR=[["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"}]],lh=_e("Globe",RR);/**
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 _R=[["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"}]],ER=_e("Inbox",_R);/**
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 CR=[["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"}]],TR=_e("KeyRound",CR);/**
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 MR=[["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"}]],AR=_e("LayoutDashboard",MR);/**
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 OR=[["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"}]],kR=_e("LogOut",OR);/**
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 zR=[["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"}]],Bv=_e("MailCheck",zR);/**
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 DR=[["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"}]],vb=_e("MailWarning",DR);/**
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 UR=[["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"}]],bb=_e("Mail",UR);/**
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 LR=[["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"}]],BR=_e("MousePointerClick",LR);/**
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 qR=[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]],Kc=_e("Plug",qR);/**
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 HR=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],QR=_e("Plus",HR);/**
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 GR=[["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"}]],xb=_e("RefreshCw",GR);/**
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 VR=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],PR=_e("Search",VR);/**
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 YR=[["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"}]],Pr=_e("Send",YR);/**
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 KR=[["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"}]],XR=_e("Settings",KR);/**
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 ZR=[["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"}]],FR=_e("ShieldCheck",ZR);/**
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 IR=[["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"}]],JR=_e("Shuffle",IR);/**
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 $R=[["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"}]],Sb=_e("Sparkles",$R);/**
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 WR=[["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"}]],e_=_e("UserMinus",WR);/**
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 t_=[["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"}]],jb=_e("Users",t_);/**
266
- * @license lucide-react v0.474.0 - ISC
267
- *
268
- * This source code is licensed under the ISC license.
269
- * See the LICENSE file in the root directory of this source tree.
270
- */const n_=[["path",{d:"M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2",key:"q3hayz"}],["path",{d:"m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06",key:"1go1hn"}],["path",{d:"m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8",key:"qlwsc0"}]],a_=_e("Webhook",n_);/**
271
- * @license lucide-react v0.474.0 - ISC
272
- *
273
- * This source code is licensed under the ISC license.
274
- * See the LICENSE file in the root directory of this source tree.
275
- */const s_=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],_h=_e("X",s_);/**
276
- * @license lucide-react v0.474.0 - ISC
277
- *
278
- * This source code is licensed under the ISC license.
279
- * See the LICENSE file in the root directory of this source tree.
280
- */const i_=[["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"}]],Eh=_e("Zap",i_),wb=V.createContext(null);function l_({children:n}){const[s,i]=V.useState([]),r=V.useRef(0),c=V.useCallback(y=>{i(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"};i(b=>[...b,m]),window.setTimeout(()=>c(p),5e3)},[c]),h=V.useMemo(()=>({toast:d}),[d]);return u.jsxs(wb.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:Fe("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(yb,{strokeWidth:1.5,className:"mt-0.5 h-5 w-5 shrink-0 text-white/90"}):u.jsx(gb,{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(_h,{className:"h-4 w-4"})})]},y.id))})]})}function Cn(){const n=V.useContext(wb);if(!n)throw new Error("useToast must be used within a ToastProvider");return n}const r_=new RS({defaultOptions:{queries:{staleTime:3e4,retry:(n,s)=>s instanceof At&&[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`},o_=[{label:"Overview",path:"/",icon:AR},{label:"Sends",path:"/sends",icon:Pr},{label:"Templates",path:"/templates",icon:bb},{label:"Journeys",path:"/journeys",icon:Rh},{label:"Buckets",path:"/buckets",icon:oR},{label:"Contacts",path:"/contacts",icon:jb},{label:"Suppressions",path:"/suppressions",icon:pb},{label:"Debug",path:"/debug",icon:wR},{label:"Integrations",path:"/integrations",icon:Kc},{label:"Setup",path:"/setup",icon:lh},{label:"Settings",path:"/settings",icon:XR}];function c_(){const n=Aw({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(fb,{})}),u.jsx("nav",{className:"flex-1 space-y-1 overflow-y-auto p-2",children:o_.map(s=>{const i=s.path==="/"?n==="/":n.startsWith(s.path),r=s.icon;return u.jsxs(jl,{to:s.path,className:Fe("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",i?"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(lR,{strokeWidth:1.5,className:"h-4 w-4"}),"Docs",u.jsx(wh,{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 u_(){const{data:n}=Z0();return u.jsxs("div",{className:"flex h-full bg-ink text-white",children:[u.jsx(c_,{}),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(je,{variant:"ghost",size:"sm",onClick:()=>{Z2()},children:[u.jsx(kR,{strokeWidth:1.5,className:"h-4 w-4"}),"Sign out"]})]}),u.jsx("main",{className:"flex-1 overflow-y-auto p-6",children:u.jsx(G0,{})})]})]})}function Ut({className:n,...s}){return u.jsx("div",{className:Fe("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(Ut,{className:"h-9 w-full"}),Array.from({length:n}).map((s,i)=>u.jsx(Ut,{className:"h-12 w-full"},i))]})}function Nb({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,i)=>u.jsx(Ut,{className:"h-28 w-full"},i))})}function In({title:n,description:s,icon:i=ER,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(i,{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 _t({error:n,onRetry:s}){const i=n instanceof At||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(mR,{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:i})]}),s?u.jsx(je,{variant:"outline",size:"sm",onClick:s,children:"Retry"}):null]})}function Bn({title:n,description:s,action:i}){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]}),i?u.jsx("div",{className:"shrink-0",children:i}):null]})}const f_=db("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 De({className:n,variant:s,...i}){return u.jsx("div",{className:Fe(f_({variant:s}),n),...i})}function Qc({open:n,onClose:s,title:i,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:Fe("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:i}),r?u.jsx("p",{className:"text-sm text-white/60",children:r}):null]}),u.jsx(je,{variant:"ghost",size:"icon",className:"-mr-2 -mt-2 h-8 w-8",onClick:s,"aria-label":"Close",children:u.jsx(_h,{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 mi({open:n,onClose:s,onConfirm:i,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(je,{variant:"outline",onClick:s,disabled:p,children:h}),u.jsx(je,{variant:y?"destructive":"default",onClick:i,disabled:p,children:p?"Working…":d})]})})}function wl({href:n,children:s,variant:i="outline",className:r}){return u.jsxs("a",{href:n,target:"_blank",rel:"noreferrer",className:Fe(jh({variant:i,size:"sm"}),r),children:[s,u.jsx(wh,{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},i)=>u.jsx("div",{className:"relative w-full overflow-auto",children:u.jsx("table",{ref:i,className:Fe("w-full caption-bottom text-sm",n),...s})}));Ss.displayName="Table";const js=V.forwardRef(({className:n,...s},i)=>u.jsx("thead",{ref:i,className:Fe("[&_tr]:border-b [&_tr]:border-hairline-faint",n),...s}));js.displayName="TableHeader";const ws=V.forwardRef(({className:n,...s},i)=>u.jsx("tbody",{ref:i,className:Fe("[&_tr:last-child]:border-0",n),...s}));ws.displayName="TableBody";const Ht=V.forwardRef(({className:n,...s},i)=>u.jsx("tr",{ref:i,className:Fe("border-b border-hairline-faint transition-colors hover:bg-white/[0.03] data-[state=selected]:bg-white/[0.06]",n),...s}));Ht.displayName="TableRow";const Se=V.forwardRef(({className:n,...s},i)=>u.jsx("th",{ref:i,className:Fe("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},i)=>u.jsx("td",{ref:i,className:Fe("p-2 align-middle [&:has([role=checkbox])]:pr-0",n),...s}));be.displayName="TableCell";const d_=V.forwardRef(({className:n,...s},i)=>u.jsx("caption",{ref:i,className:Fe("mt-4 text-sm text-white/50",n),...s}));d_.displayName="TableCaption";function h_(){return Le.get("/v1/admin/metrics/overview")}function m_(n){return Le.get("/v1/admin/emails",{query:n})}function p_(n){return Le.get(`/v1/admin/emails/${n}`)}function y_(n){return Le.post(`/v1/admin/emails/${n}/resend`)}function g_(){return Le.get("/v1/admin/templates")}function v_(n){return Le.get(`/v1/admin/templates/${encodeURIComponent(n)}/preview`)}function b_(n,s){return Le.post(`/v1/admin/templates/${encodeURIComponent(n)}/send-test`,{json:{to:s}})}function x_(n){return Le.get(`/v1/admin/reporting/templates/${encodeURIComponent(n)}`)}function S_(){return Le.get("/v1/admin/metrics/journeys")}function j_(n){return Le.get(`/v1/admin/metrics/journeys/${encodeURIComponent(n)}`)}function Rb(){return Le.get("/v1/admin/journeys",{query:{limit:100}})}function w_(n,s){return Le.put(`/v1/admin/journeys/${encodeURIComponent(n)}`,{json:{enabled:s}})}function N_(){return Le.get("/v1/admin/buckets",{query:{limit:100}})}function R_(n){return Le.get(`/v1/admin/buckets/${encodeURIComponent(n)}`)}function __(){return Le.get("/v1/admin/metrics/buckets")}function E_(n,s){return Le.get(`/v1/admin/metrics/buckets/${encodeURIComponent(n)}`,{query:{period:s}})}function C_(n,s){return Le.patch(`/v1/admin/buckets/${encodeURIComponent(n)}`,{json:{enabled:s}})}function T_(n){return Le.get("/v1/admin/contacts",{query:{search:n,limit:50}})}function M_(n){return Le.get(`/v1/admin/contacts/${encodeURIComponent(n)}`)}function A_(n){return Le.get(`/v1/admin/reporting/contacts/${encodeURIComponent(n)}/activity`)}function O_(n){return Le.get(`/v1/admin/contacts/${encodeURIComponent(n)}/timeline`,{query:{limit:100}})}function _b(n,s){return Le.put(`/v1/admin/contacts/${encodeURIComponent(n)}/preferences`,{json:s})}function k_(n){return Le.get("/v1/admin/suppressions",{query:{type:n,limit:200}})}function z_(){return Le.get("/v1/admin/api-keys",{query:{limit:100,includeRevoked:"true"}})}function D_(n){return Le.post("/v1/admin/api-keys",{json:n})}function U_(n){return Le.delete(`/v1/admin/api-keys/${encodeURIComponent(n)}`)}function L_(n){return Le.post("/v1/admin/events",{json:{event:n.event,userId:n.userId,userEmail:n.userEmail,properties:n.properties??{}}})}function qv(n){return Le.get("/v1/admin/domain",{query:{refresh:n?"true":void 0}})}function B_(n){return Le.post("/v1/admin/domain",{json:{domain:n}})}function q_(){return Le.post("/v1/admin/domain/verify")}function H_(){return Le.get("/v1/admin/connectors")}function Q_(){return Le.get("/v1/admin/connectors/discord/connect-info")}function G_(n){return Le.delete(`/v1/admin/provider-credentials/${encodeURIComponent(n)}`)}const Ue={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"],integrations:["integrations"],discordConnectInfo:["discord-connect-info"]};function En(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 V_(n){if(!n)return"—";const s=new Date(n);if(Number.isNaN(s.getTime()))return"—";const i=Date.now()-s.getTime(),r=Math.round(i/1e3);if(r<60)return"just now";const 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 Nl(n){return n==null||Number.isNaN(n)?"—":`${(n*100).toFixed(1)}%`}function ft(n){return n==null||Number.isNaN(n)?"—":n.toLocaleString()}function Ch(n){if(n==null||Number.isNaN(n))return"—";if(n<60)return`${Math.round(n)}s`;const s=Math.floor(n/60);if(s<60)return`${s}m`;const i=Math.floor(s/60),r=s%60;if(i<24)return r?`${i}h ${r}m`:`${i}h`;const c=Math.floor(i/24),d=i%24;return d?`${c}d ${d}h`:`${c}d`}function P_(n){if(!n)return null;const s=(n.hours??0)*3600+(n.minutes??0)*60+(n.seconds??0);return s>0?Ch(s):null}function Y_(n,s=48){return n.length>s?`${n.slice(0,s-1)}…`:n}function rh({data:n,height:s=160,label:i="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} ${i}`,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 K_({bucketId:n}){const s=tt({queryKey:Ue.bucketTrend(n),queryFn:()=>E_(n)});if(s.isPending)return u.jsx(Ut,{className:"h-48 w-full"});if(s.isError)return u.jsx(_t,{error:s.error,onRetry:()=>s.refetch()});const i=s.data,r=i.points.map(y=>({date:y.date,value:y.entered})),c=i.points.map(y=>({date:y.date,value:y.left})),d=i.points.reduce((y,p)=>y+p.entered,0),h=i.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(i.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(rh,{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(rh,{data:c,label:"left"})]})]})]})}function X_(){var N,R;const{toast:n}=Cn(),s=Jn(),[i,r]=V.useState(null),[c,d]=V.useState(null),h=tt({queryKey:Ue.bucketMetrics,queryFn:__}),y=tt({queryKey:Ue.buckets,queryFn:N_}),p=hn({mutationFn:j=>C_(j.id,j.enabled),onSuccess:(j,k)=>{n({title:k.enabled?"Bucket enabled":"Bucket disabled"}),d(null),s.invalidateQueries({queryKey:Ue.buckets}),s.invalidateQueries({queryKey:Ue.bucketMetrics})},onError:j=>{n({variant:"error",title:"Update failed",description:j instanceof At?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 k=v.get(j.bucketId);return{...j,enabled:(k==null?void 0:k.enabled)??!1,kind:(k==null?void 0:k.kind)??"dynamic",timeBased:(k==null?void 0:k.timeBased)??!1}}),w=x.find(j=>j.bucketId===i)??null;return u.jsxs("div",{className:"space-y-6",children:[u.jsx(Bn,{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(_t,{error:h.error??y.error,onRetry:()=>{h.refetch(),y.refetch()}}):x.length===0?u.jsx(In,{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(wl,{href:ui.buckets,children:"How to create a bucket"}),u.jsx(wl,{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(Ht,{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(Ht,{className:"cursor-pointer","data-state":j.bucketId===i?"selected":void 0,onClick:()=>r(k=>k===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:Ch(j.avgDwellSecs)}),u.jsx(be,{children:u.jsx(Z_,{timeBased:j.timeBased})}),u.jsx(be,{children:u.jsx(De,{variant:j.enabled?"default":"secondary",children:j.enabled?"Enabled":"Disabled"})}),u.jsx(be,{className:"text-right",children:u.jsx(je,{variant:"outline",size:"sm",onClick:k=>{k.stopPropagation(),d(j)},children:j.enabled?"Disable":"Enable"})})]},j.bucketId))})]})}),w?u.jsxs("div",{className:"space-y-6",children:[u.jsxs(Lt,{children:[u.jsx(Bt,{children:u.jsxs($t,{className:"text-base",children:[w.name," — feeds journeys"]})}),u.jsx(qt,{children:u.jsx(F_,{bucketId:w.bucketId})})]}),u.jsxs(Lt,{children:[u.jsx(Bt,{children:u.jsxs($t,{className:"text-base",children:[w.name," — enter / leave over time"]})}),u.jsx(qt,{children:u.jsx(K_,{bucketId:w.bucketId})})]})]}):null,u.jsx(mi,{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 Z_({timeBased:n}){return n?u.jsx(De,{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(De,{variant:"outline",className:"border-white/15 bg-white/[0.06] text-white/80",title:"Event-driven — transitions in real time",children:"Live"})}function F_({bucketId:n}){const s=tt({queryKey:Ue.bucket(n),queryFn:()=>R_(n)});if(s.isPending)return u.jsx(Ut,{className:"h-10 w-full"});if(s.isError)return u.jsx(_t,{error:s.error,onRetry:()=>s.refetch()});const i=s.data.bucket.feedsJourneys,r=P_(s.data.bucket.maxDwell);return u.jsxs("div",{className:"space-y-3",children:[r?u.jsxs(De,{variant:"outline",title:"Members are force-removed maxDwell after joining, regardless of criteria.",children:["Time-boxed · ",r]}):null,i.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:i.map(c=>u.jsxs(De,{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 I_={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 Yr({status:n}){const s=I_[n]??{variant:"outline"};return u.jsx(De,{variant:s.variant,className:Fe("capitalize",s.className),children:n})}function Eb({open:n,onClose:s,title:i,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:Fe("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:i}),r?u.jsx("p",{className:"break-all text-sm text-white/60",children:r}):null]}),u.jsx(je,{variant:"ghost",size:"icon",className:"-mr-2 -mt-2 h-8 w-8 shrink-0",onClick:s,"aria-label":"Close",children:u.jsx(_h,{className:"h-4 w-4"})})]}),u.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:c})]})]}):null}const J_={event:Eh,journey:Rh,email:bb};function $_({entry:n}){const s=J_[n.type],i=n.data,r=n.type==="event"?String(i.event??"event"):n.type==="journey"?`${String(i.journeyId??"journey")} · ${String(i.status??"")}`:String(i.subject??i.templateKey??"email");return 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"&&i.status?u.jsx(Yr,{status:String(i.status)}):null]}),u.jsx("p",{className:"text-xs text-white/50",children:En(n.timestamp)})]})]})}function W_({contactId:n,onClose:s}){var N,R;const i=n!==null,{toast:r}=Cn(),c=Jn(),[d,h]=V.useState(!1),y=tt({queryKey:n?Ue.contact(n):["contact","none"],queryFn:()=>M_(n),enabled:i}),p=tt({queryKey:n?Ue.contactActivity(n):["activity","none"],queryFn:()=>A_(n),enabled:i}),m=tt({queryKey:n?Ue.contactTimeline(n):["timeline","none"],queryFn:()=>O_(n),enabled:i}),b=hn({mutationFn:()=>_b(n,{suppressed:!1,unsubscribedAll:!1}),onSuccess:()=>{r({title:"Contact un-suppressed",description:"They can receive emails again."}),h(!1),n&&c.invalidateQueries({queryKey:Ue.contact(n)}),c.invalidateQueries({queryKey:["suppressions"]})},onError:j=>{r({variant:"error",title:"Un-suppress failed",description:j instanceof At?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(Eb,{open:i,onClose:s,title:(v==null?void 0:v.email)??(v==null?void 0:v.externalId)??"Contact",description:v?v.externalId:void 0,children:y.isPending?u.jsxs("div",{className:"space-y-4",children:[u.jsx(Ut,{className:"h-24 w-full"}),u.jsx(Ut,{className:"h-40 w-full"})]}):y.isError?u.jsx(_t,{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(De,{variant:"destructive",children:"Suppressed"}):null,x!=null&&x.unsubscribedAll?u.jsx(De,{variant:"destructive",children:"Unsubscribed"}):null,x&&x.bounceCount>0?u.jsxs(De,{variant:"secondary",children:[x.bounceCount," bounce",x.bounceCount===1?"":"s"]}):null,w?null:u.jsx(De,{variant:"outline",className:"border-white/15 bg-white/[0.06] text-white/80",children:"Subscribed"}),w?u.jsx(je,{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:En(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:En(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(Ut,{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:En(j.createdAt)})]}),u.jsx(Yr,{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(Ut,{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,k)=>u.jsx($_,{entry:j},`${j.type}-${j.timestamp}-${k}`))}):u.jsx("p",{className:"text-sm text-white/60",children:"No activity yet."})]})]}):null}),u.jsx(mi,{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 eE(){var p;const[n,s]=V.useState(""),[i,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=tt({queryKey:Ue.contacts(i),queryFn:()=>T_(i||void 0),placeholderData:fh}),y=((p=h.data)==null?void 0:p.contacts)??[];return u.jsxs("div",{className:"space-y-6",children:[u.jsx(Bn,{title:"Contacts",description:"Search contacts and review their full activity timeline."}),u.jsxs("div",{className:"relative max-w-sm",children:[u.jsx(PR,{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(_t,{error:h.error,onRetry:()=>h.refetch()}):y.length===0?u.jsx(In,{title:"No contacts found",description:i?"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(Ht,{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(Ht,{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:V_(m.lastSeenAt)})]},m.id))})]})}),u.jsx(W_,{contactId:c,onClose:()=>d(null)})]})}function Rt({className:n,...s}){return u.jsx("label",{className:Fe("text-sm font-medium leading-none text-white/80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",n),...s})}function Hv(){return`test_${Math.random().toString(36).slice(2,10)}`}function tE(n){const s=n.trim();if(!s)return{ok:!0,value:{}};try{const i=JSON.parse(s);return i===null||typeof i!="object"||Array.isArray(i)?{ok:!1,error:"Properties must be a JSON object."}:{ok:!0,value:i}}catch(i){return{ok:!1,error:i instanceof Error?i.message:"Invalid JSON."}}}function nE(){const{toast:n}=Cn(),[s,i]=V.useState(""),[r,c]=V.useState(Hv),[d,h]=V.useState(""),[y,p]=V.useState("{}"),[m,b]=V.useState(null),[v,x]=V.useState(null),w=tt({queryKey:Ue.journeys,queryFn:Rb}),N=V.useMemo(()=>{var B;const A=new Map;for(const C of((B=w.data)==null?void 0:B.journeys)??[]){const Q=A.get(C.trigger.event)??[];Q.push(C.name),A.set(C.trigger.event,Q)}return Array.from(A,([C,Q])=>({event:C,journeys:Q}))},[w.data]),R=hn({mutationFn:A=>L_(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 At?A.message:"Unexpected error."})}}),j=()=>{const A=tE(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})},k=!!s.trim()&&!!r.trim()&&!R.isPending;return u.jsxs("div",{className:"space-y-6",children:[u.jsx(Bn,{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(Lt,{className:"lg:col-span-2",children:[u.jsxs(Bt,{children:[u.jsx($t,{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(qt,{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=>i(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(je,{variant:"outline",size:"icon",title:"Generate a random test user ID",onClick:()=>c(Hv()),children:u.jsx(JR,{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(je,{onClick:j,disabled:!k,children:[u.jsx(Eh,{className:"h-4 w-4"}),R.isPending?"Sending…":"Send event"]})})]})]}),u.jsxs("div",{className:"space-y-6",children:[u.jsxs(Lt,{children:[u.jsxs(Bt,{children:[u.jsx($t,{className:"text-base",children:"Journey triggers"}),u.jsx(bs,{children:"Events that enrol a registered journey. Click to fill the form."})]}),u.jsx(qt,{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(je,{variant:"outline",size:"sm",title:`Triggers: ${A.journeys.join(", ")}`,onClick:()=>i(A.event),children:A.event},A.event))})})]}),v?u.jsxs(Lt,{children:[u.jsx(Bt,{children:u.jsxs($t,{className:"flex items-center gap-2 text-base",children:[u.jsx(yb,{className:"h-4 w-4 text-white/90"}),"Result"]})}),u.jsxs(qt,{className:"space-y-3",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(De,{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(jl,{to:"/journeys",className:"text-white transition-colors duration-200 hover:text-white/80",children:"Journeys"})," ","or the"," ",u.jsx(jl,{to:"/contacts",className:"text-white transition-colors duration-200 hover:text-white/80",children:"contact's timeline"}),". Make sure the worker is running."]})]})]}):null]})]})]})}const aE={webhook:"Webhook",gateway:"Gateway",poll:"Poll"};function sE({transport:n}){return u.jsx(De,{variant:"secondary",className:"font-mono text-[11px]",children:aE[n]})}function iE({credential:n}){return n!=null&&n.connected?u.jsx(De,{variant:"outline",className:"border-white/15 bg-white/[0.06] text-white/80",children:"Connected"}):u.jsx(De,{variant:"outline",className:"text-white/50",children:"Not connected"})}function lE({integration:n}){return u.jsxs("div",{className:"flex flex-wrap gap-1",children:[n.hasConnector?u.jsx(De,{variant:"outline",className:"text-white/60",children:"Inbound"}):null,n.hasDestination?u.jsx(De,{variant:"outline",className:"text-white/60",children:"Outbound"}):null]})}function Cb({label:n,value:s}){const{toast:i}=Cn();return u.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[u.jsx("span",{className:"shrink-0 text-white/50",children:n}),u.jsx("code",{className:"flex-1 truncate rounded border border-hairline-faint bg-white/[0.04] px-2 py-1 font-mono text-white/70",children:s}),u.jsx(je,{variant:"ghost",size:"icon",className:"h-7 w-7","aria-label":`Copy ${n}`,onClick:()=>{navigator.clipboard.writeText(s).then(()=>{i({title:"Copied",description:`${n} copied.`})})},children:u.jsx(Nh,{className:"h-3.5 w-3.5",strokeWidth:1.5})})]})}const rE=[{bit:2,label:"Members"},{bit:256,label:"Presence"},{bit:512,label:"Messages"},{bit:1024,label:"Reactions"},{bit:32768,label:"Message content"}];function oE({intents:n}){const s=rE.filter(i=>(n&i.bit)!==0);return s.length===0?null:u.jsx("div",{className:"flex flex-wrap gap-1",children:s.map(i=>u.jsx(De,{variant:"secondary",className:"text-[11px]",children:i.label},i.label))})}function Qv({label:n,value:s}){return u.jsxs("div",{className:"rounded-md border border-hairline-faint bg-white/[0.015] px-3 py-2",children:[u.jsx("p",{className:"font-display text-lg text-white tabular-nums",children:s}),u.jsx("p",{className:"text-[11px] text-white/50",children:n})]})}function cE({integration:n,connectInfo:s}){var d;const i=n.gateway,r=!!((d=n.credential)!=null&&d.connected),c=(s==null?void 0:s.installUrl)??null;return u.jsxs("div",{className:"space-y-4",children:[r?null:u.jsxs("div",{className:"rounded-md border border-accent/40 bg-accent-tint p-3 text-xs text-white/70",children:[u.jsx("p",{className:"font-medium text-accent",children:"Connect via CLI"}),u.jsxs("p",{className:"mt-1",children:["Discord secrets are pasted through the CLI — Studio never stores tokens. Run"," ",u.jsx("code",{className:"rounded bg-white/[0.06] px-1 py-0.5 font-mono",children:"hogsend connect discord"})," ","to paste the bot token + client secret, then return here to invite the bot."]})]}),u.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u.jsx("span",{className:"text-xs text-white/50",children:"Bot:"}),(i==null?void 0:i.botInstalled)===!0?u.jsx(De,{variant:"outline",className:"border-white/15 bg-white/[0.06] text-white/80",children:"Installed"}):(i==null?void 0:i.botInstalled)===!1?u.jsx(De,{variant:"outline",className:"text-white/50",children:"Not installed"}):u.jsx(De,{variant:"outline",className:"text-white/40",children:"Unknown"}),u.jsx("span",{className:"text-xs text-white/50",children:"Worker:"}),i!=null&&i.workerHealthy?u.jsx(De,{variant:"outline",className:"border-white/15 bg-white/[0.06] text-white/80",children:"Online"}):u.jsx(De,{variant:"outline",className:"text-white/50",children:"Offline"})]}),i!=null&&i.guildId?u.jsx(Cb,{label:"Guild",value:i.guildId}):null,i!=null&&i.intents?u.jsx(oE,{intents:i.intents}):null,i?u.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[u.jsx(Qv,{label:"Linked members",value:i.linkedMembers}),u.jsx(Qv,{label:"Unlinked members",value:i.unlinkedMembers})]}):null,c?u.jsx("a",{href:c,target:"_blank",rel:"noreferrer",children:u.jsxs(je,{variant:"secondary",size:"sm",className:"w-full",children:[u.jsx(Kc,{className:"h-4 w-4",strokeWidth:1.5}),i!=null&&i.botInstalled?"Re-invite bot":"Invite bot",u.jsx(wh,{className:"ml-auto h-3.5 w-3.5 opacity-60"})]})}):null]})}function uE({integration:n}){const s=n.webhook;return s?u.jsxs("div",{className:"space-y-3",children:[u.jsx(Cb,{label:"URL",value:s.url}),u.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[u.jsx("span",{className:"text-white/50",children:"Verify secret:"}),s.secretConfigured?u.jsx(De,{variant:"outline",className:"border-white/15 bg-white/[0.06] text-white/80",children:"Configured"}):u.jsx(De,{variant:"destructive",children:"Open — no secret"})]})]}):null}function fE({integration:n,connectInfo:s,onDisconnect:i}){var d,h;const r=n.id==="discord",c=!!((d=n.credential)!=null&&d.connected);return u.jsxs(Lt,{className:"flex flex-col",children:[u.jsxs(Bt,{className:"space-y-3",children:[u.jsxs("div",{className:"flex items-start justify-between gap-3",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[n.transport==="webhook"?u.jsx(a_,{className:"h-4 w-4 text-white/40",strokeWidth:1.5}):u.jsx(Kc,{className:"h-4 w-4 text-white/40",strokeWidth:1.5}),u.jsx($t,{children:n.name})]}),u.jsx(iE,{credential:n.credential})]}),n.description?u.jsx("p",{className:"text-sm text-white/60",children:n.description}):null,u.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u.jsx(sE,{transport:n.transport}),u.jsx(lE,{integration:n})]})]}),u.jsxs(qt,{className:"flex-1 space-y-4",children:[r?u.jsx(cE,{integration:n,connectInfo:s}):n.transport==="webhook"?u.jsx(uE,{integration:n}):null,(h=n.credential)!=null&&h.updatedAt?u.jsxs("p",{className:"text-[11px] text-white/40",children:["Connected ",En(n.credential.updatedAt)]}):null,c?u.jsx(je,{variant:"outline",size:"sm",className:"w-full",onClick:()=>i(n),children:"Disconnect"}):null]})]})}function dE(){var p;const{toast:n}=Cn(),s=Jn(),[i,r]=V.useState(null),c=tt({queryKey:Ue.integrations,queryFn:H_}),d=tt({queryKey:Ue.discordConnectInfo,queryFn:Q_,retry:!1}),h=hn({mutationFn:m=>G_(m),onSuccess:()=>{n({title:"Integration disconnected"}),r(null),s.invalidateQueries({queryKey:Ue.integrations}),s.invalidateQueries({queryKey:Ue.discordConnectInfo})},onError:m=>{n({variant:"error",title:"Disconnect failed",description:m instanceof At?m.message:"Unexpected error."}),r(null)}}),y=((p=c.data)==null?void 0:p.integrations)??[];return u.jsxs("div",{className:"space-y-6",children:[u.jsx(Bn,{title:"Integrations",description:"Code-registered connectors and destinations. Connect via the CLI, then observe and manage here.",action:u.jsxs(je,{variant:"outline",size:"sm",onClick:()=>c.refetch(),disabled:c.isFetching,children:[u.jsx(xb,{className:"h-4 w-4"}),c.isFetching?"Refreshing…":"Refresh"]})}),c.isPending?u.jsx(Nb,{count:4}):c.isError?u.jsx(_t,{error:c.error,onRetry:()=>c.refetch()}):y.length===0?u.jsx(In,{icon:Kc,title:"No integrations registered",description:"Register a connector or destination in code, then it appears here to connect.",action:u.jsx("a",{href:"https://docs.hogsend.com/docs/guides/events",target:"_blank",rel:"noreferrer",children:u.jsxs(je,{variant:"outline",size:"sm",children:[u.jsx(bR,{className:"h-4 w-4"}),"Connector docs"]})})}):u.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:y.map(m=>u.jsx(fE,{integration:m,connectInfo:m.id==="discord"?d.data:void 0,onDisconnect:r},m.id))}),u.jsx(mi,{open:i!==null,onClose:()=>r(null),onConfirm:()=>i&&h.mutate(i.id),title:"Disconnect this integration?",description:i?`Purges all stored credentials for "${i.name}" — the OAuth grant and any derived config. The bot stays in your server until you remove it there. This cannot be undone.`:void 0,confirmLabel:"Disconnect",destructive:!0,loading:h.isPending})]})}function hE({step:n,base:s}){const i=s>0?n.value/s:0,r=i*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:["(",Nl(i),")"]}):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 mE({journeyId:n}){const s=tt({queryKey:Ue.journeyFunnel(n),queryFn:()=>j_(n)});if(s.isPending)return u.jsx(Ut,{className:"h-48 w-full"});if(s.isError)return u.jsx(_t,{error:s.error,onRetry:()=>s.refetch()});const i=s.data,r=[{label:"Enrolled",value:i.enrolled},{label:"Email sent",value:i.emailSent},{label:"Opened",value:i.emailOpened},{label:"Clicked",value:i.emailClicked},{label:"Completed",value:i.completed}];return u.jsxs("div",{className:"space-y-4",children:[u.jsx("div",{className:"space-y-3",children:r.map(c=>u.jsx(hE,{step:c,base:i.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(i.failed)]}),u.jsxs("span",{children:["Exited: ",ft(i.exited)]})]})]})}function pE(){var N,R;const{toast:n}=Cn(),s=Jn(),[i,r]=V.useState(null),[c,d]=V.useState(null),h=tt({queryKey:Ue.journeyMetrics,queryFn:S_}),y=tt({queryKey:Ue.journeys,queryFn:Rb}),p=hn({mutationFn:j=>w_(j.id,j.enabled),onSuccess:(j,k)=>{n({title:k.enabled?"Journey enabled":"Journey disabled"}),d(null),s.invalidateQueries({queryKey:Ue.journeys}),s.invalidateQueries({queryKey:Ue.journeyMetrics})},onError:j=>{n({variant:"error",title:"Update failed",description:j instanceof At?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===i)??null;return u.jsxs("div",{className:"space-y-6",children:[u.jsx(Bn,{title:"Journeys",description:"Lifecycle journeys, completion rates, and per-journey funnels."}),m?u.jsx(hi,{}):b?u.jsx(_t,{error:h.error??y.error,onRetry:()=>{h.refetch(),y.refetch()}}):x.length===0?u.jsx(In,{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(wl,{href:ui.journeys,children:"How to create a journey"}),u.jsx(wl,{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(Ht,{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(Ht,{className:"cursor-pointer","data-state":j.journeyId===i?"selected":void 0,onClick:()=>r(k=>k===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:Nl(j.completionRate)}),u.jsx(be,{className:"text-right text-white/60",children:Ch(j.avgDurationSecs)}),u.jsx(be,{children:u.jsx(De,{variant:j.enabled?"default":"secondary",children:j.enabled?"Enabled":"Disabled"})}),u.jsx(be,{className:"text-right",children:u.jsx(je,{variant:"outline",size:"sm",onClick:k=>{k.stopPropagation(),d(j)},children:j.enabled?"Disable":"Enable"})})]},j.journeyId))})]})}),w?u.jsxs(Lt,{children:[u.jsx(Bt,{children:u.jsxs($t,{children:[w.name," — funnel"]})}),u.jsx(qt,{children:u.jsx(mE,{journeyId:w.journeyId})})]}):null,u.jsx(mi,{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:i,icon:r}){return u.jsxs(Lt,{children:[u.jsxs(Bt,{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(qt,{children:[u.jsx("div",{className:"font-display text-[28px] leading-none text-white tracking-[-0.02em]",children:s}),i?u.jsx("p",{className:"mt-2 text-xs text-white/50",children:i}):null]})]})}function yE(n){return n.totalContacts===0&&n.activeJourneys===0&&n.emailsSent30d===0}function gE(){return u.jsxs(Lt,{className:"border-accent/40 bg-accent-tint hover:border-accent/40",children:[u.jsxs(Bt,{children:[u.jsx($t,{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(qt,{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(jl,{to:"/debug",className:Fe(jh({size:"sm"})),children:[u.jsx(Eh,{className:"h-4 w-4"}),"Send a test event"]}),u.jsx(wl,{href:ui.quickstart,children:"Quickstart"}),u.jsx(wl,{href:ui.journeys,variant:"ghost",children:"Create a journey"})]})]})]})}function vE(){const n=tt({queryKey:Ue.overview,queryFn:h_});return u.jsxs("div",{className:"space-y-6",children:[u.jsx(Bn,{title:"Overview",description:"Key delivery and engagement metrics at a glance."}),n.isPending?u.jsx(Nb,{count:6}):n.isError?u.jsx(_t,{error:n.error,onRetry:()=>n.refetch()}):u.jsxs(u.Fragment,{children:[yE(n.data)?u.jsx(gE,{}):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:jb}),u.jsx(Xs,{label:"Active journeys",value:ft(n.data.activeJourneys),hint:"Instances active or waiting",icon:Rh}),u.jsx(Xs,{label:"Sent (24h)",value:ft(n.data.emailsSent24h),icon:Pr}),u.jsx(Xs,{label:"Sent (7d)",value:ft(n.data.emailsSent7d),icon:Bv}),u.jsx(Xs,{label:"Sent (30d)",value:ft(n.data.emailsSent30d),icon:Bv}),u.jsx(Xs,{label:"Bounce rate (30d)",value:Nl(n.data.bounceRate30d),hint:"Bounced / sent in last 30 days",icon:vb})]}),u.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:u.jsx(Xs,{label:"Unsubscribe rate",value:Nl(n.data.unsubscribeRate),hint:"Unsubscribed / total preferences",icon:e_})})]})]})}const Gc=V.forwardRef(({className:n,children:s,...i},r)=>u.jsxs("div",{className:"relative",children:[u.jsx("select",{ref:r,className:Fe("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),...i,children:s}),u.jsx(dR,{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 bE={queued:Sb,sent:Pr,delivered:uR,opened:SR,clicked:BR,bounced:vb,complained:pb,failed:gb};function xE({event:n}){const s=bE[n.type]??Sb;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:En(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:i=!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:i?"break-all font-mono text-xs text-white/70":"break-all text-sm text-white",children:s})]})}function SE({emailId:n,onClose:s}){const i=n!==null,{toast:r}=Cn(),c=Jn(),[d,h]=V.useState(!1),y=tt({queryKey:n?Ue.email(n):["email","none"],queryFn:()=>p_(n),enabled:i}),p=hn({mutationFn:()=>y_(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:Ue.email(n)})},onError:v=>{r({variant:"error",title:"Resend failed",description:v instanceof At?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(Eb,{open:i,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(Ut,{className:"h-24 w-full"}),u.jsx(Ut,{className:"h-40 w-full"})]}):y.isError?u.jsx(_t,{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(Yr,{status:m.email.status}),b?u.jsxs(je,{size:"sm",variant:"outline",onClick:()=>h(!0),children:[u.jsx(Pr,{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:En(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(xE,{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(mi,{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 jE=["queued","rendered","sent","delivered","opened","clicked","bounced","complained","failed"],wE=["opened","clicked","bounced","complained"],Cr=25,Gv={templateKey:"",status:"",engagement:"",journeyId:"",userId:"",from:"",to:""};function NE(){var C,Q;const[n,s]=V.useState(Gv),[i,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:Cr,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:i,order:c},w=tt({queryKey:Ue.emails(x),queryFn:()=>m_(x),placeholderData:fh});function N(U){s(z=>({...z,...U})),y(0)}function R(U){i===U?d(z=>z==="asc"?"desc":"asc"):(r(U),d("desc")),y(0)}const j=Object.values(n).some(Boolean),k=((C=w.data)==null?void 0:C.total)??0,A=((Q=w.data)==null?void 0:Q.emails)??[];function B({column:U,label:z}){const O=i===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:[z,O?c==="asc"?u.jsx(aR,{className:"h-3 w-3"}):u.jsx(eR,{className:"h-3 w-3"}):null]})})}return u.jsxs("div",{className:"space-y-6",children:[u.jsx(Bn,{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"}),jE.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"}),wE.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(je,{variant:"ghost",size:"sm",onClick:()=>{s(Gv),y(0)},children:"Clear filters"})}):null]}),w.isPending?u.jsx(hi,{}):w.isError?u.jsx(_t,{error:w.error,onRetry:()=>w.refetch()}):A.length===0?u.jsx(In,{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(Ht,{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(Ht,{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:Y_(U.subject,40)}),u.jsx(be,{className:"text-white/60",children:U.templateKey??"—"}),u.jsx(be,{children:u.jsx(Yr,{status:U.status})}),u.jsx(be,{className:"text-white/60",children:En(U.sentAt)}),u.jsx(be,{className:"text-white/60",children:En(U.createdAt)})]},U.id))})]})}),k>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+Cr,k)," of ",k]}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx(je,{variant:"outline",size:"sm",disabled:h===0,onClick:()=>y(U=>Math.max(0,U-Cr)),children:"Previous"}),u.jsx(je,{variant:"outline",size:"sm",disabled:h+Cr>=k,onClick:()=>y(U=>U+Cr),children:"Next"})]})]}):null,u.jsx(SE,{emailId:p,onClose:()=>m(null)})]})}const RE=["read","journey-admin","full-admin"];function _E(){var A;const{toast:n}=Cn(),s=Jn(),[i,r]=V.useState(!1),[c,d]=V.useState(""),[h,y]=V.useState(["read"]),[p,m]=V.useState(null),[b,v]=V.useState(null),x=tt({queryKey:Ue.apiKeys,queryFn:z_}),w=hn({mutationFn:()=>D_({name:c.trim(),scopes:h}),onSuccess:B=>{r(!1),d(""),y(["read"]),m(B),s.invalidateQueries({queryKey:Ue.apiKeys})},onError:B=>{n({variant:"error",title:"Could not create key",description:B instanceof At?B.message:"Unexpected error."})}}),N=hn({mutationFn:B=>U_(B),onSuccess:()=>{n({title:"API key revoked"}),v(null),s.invalidateQueries({queryKey:Ue.apiKeys})},onError:B=>{n({variant:"error",title:"Revoke failed",description:B instanceof At?B.message:"Unexpected error."}),v(null)}});function R(B){y(C=>C.includes(B)?C.filter(Q=>Q!==B):[...C,B])}async function j(B){try{await navigator.clipboard.writeText(B),n({title:"Copied to clipboard"})}catch{n({variant:"error",title:"Copy failed"})}}const k=((A=x.data)==null?void 0:A.keys)??[];return u.jsxs("div",{className:"space-y-6",children:[u.jsx(Bn,{title:"Settings",description:"API keys for programmatic access to the Hogsend admin API.",action:u.jsxs(je,{onClick:()=>r(!0),children:[u.jsx(QR,{className:"h-4 w-4"}),"New API key"]})}),x.isPending?u.jsx(hi,{}):x.isError?u.jsx(_t,{error:x.error,onRetry:()=>x.refetch()}):k.length===0?u.jsx(In,{icon:TR,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(Ht,{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:k.map(B=>{const C=B.revokedAt!==null;return u.jsxs(Ht,{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(De,{variant:"secondary",children:Q},Q))})}),u.jsx(be,{className:"text-white/60",children:En(B.lastUsedAt)}),u.jsx(be,{children:C?u.jsx(De,{variant:"destructive",children:"Revoked"}):u.jsx(De,{variant:"outline",className:"border-white/15 bg-white/[0.06] text-white/80",children:"Active"})}),u.jsx(be,{className:"text-right",children:C?null:u.jsx(je,{variant:"outline",size:"sm",onClick:()=>v(B),children:"Revoke"})})]},B.id)})})]})}),u.jsxs(Qc,{open:i,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(je,{variant:"outline",onClick:()=>r(!1),children:"Cancel"}),u.jsx(je,{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:RE.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(je,{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(je,{variant:"outline",size:"icon",onClick:()=>j(p.key),"aria-label":"Copy key",children:u.jsx(Nh,{className:"h-4 w-4"})})]})]}):null}),u.jsx(mi,{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 EE=/^([a-z0-9]([a-z0-9-]*[a-z0-9])?\.)+[a-z]{2,}$/i,CE={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 TE({state:n}){const s=CE[n];return u.jsx(De,{variant:s.variant,className:s.className,children:n.replace("_"," ")})}function ME({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 Vv({value:n}){const{toast:s}=Cn();return u.jsx(je,{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(Nh,{className:"h-3.5 w-3.5",strokeWidth:1.5})})}function AE({onSubmit:n,loading:s}){const[i,r]=V.useState(""),c=EE.test(i);return u.jsxs("form",{className:"flex max-w-md items-end gap-2",onSubmit:d=>{d.preventDefault(),c&&n(i.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:i,onChange:d=>r(d.target.value)})]}),u.jsx(je,{type:"submit",disabled:!c||s,children:s?"Adding…":"Add domain"})]})}function OE(){var v,x,w;const{toast:n}=Cn(),s=Jn(),i=tt({queryKey:Ue.domain,queryFn:()=>qv()}),r=N=>{s.setQueryData(Ue.domain,N)},c=N=>R=>{n({variant:"error",title:N,description:R instanceof At?R.status===501?"The active email provider does not support domain management.":R.message:"Unexpected error."})},d=hn({mutationFn:()=>qv(!0),onSuccess:r,onError:c("Re-check failed")}),h=hn({mutationFn:()=>q_(),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=hn({mutationFn:N=>B_(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=i.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(Bn,{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(je,{variant:"outline",size:"sm",onClick:()=>d.mutate(),disabled:d.isPending,children:[u.jsx(xb,{className:"h-4 w-4"}),d.isPending?"Checking…":"Re-check"]}),p.domain?u.jsxs(je,{size:"sm",onClick:()=>h.mutate(),disabled:h.isPending,children:[u.jsx(FR,{className:"h-4 w-4"}),h.isPending?"Verifying…":"Verify"]}):null]}):null}),i.isPending?u.jsx(hi,{}):i.isError?u.jsx(_t,{error:i.error,onRetry:()=>i.refetch()}):p?p.supported?u.jsxs(u.Fragment,{children:[u.jsx(ME,{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(TE,{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 ",En(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(AE,{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(Ht,{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(Ht,{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(Vv,{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(Vv,{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(Yr,{status:N.status})})]},`${N.type}-${N.name}-${N.value}`))})]})}):b?null:u.jsx(In,{icon:lh,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(In,{icon:lh,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 kE=[{value:"",label:"All"},{value:"bounced",label:"Bounced"},{value:"unsubscribed",label:"Unsubscribed"},{value:"complained",label:"Complained"}];function zE({row:n}){return u.jsxs("div",{className:"flex flex-wrap gap-1",children:[n.unsubscribedAll?u.jsx(De,{variant:"destructive",children:"Unsubscribed"}):null,n.bounceCount>0?u.jsxs(De,{variant:"secondary",children:[ft(n.bounceCount)," bounce"]}):null,n.suppressed&&n.bounceCount===0&&!n.unsubscribedAll?u.jsx(De,{variant:"destructive",children:"Complained"}):null,n.suppressed&&!n.unsubscribedAll&&n.bounceCount>0?u.jsx(De,{variant:"destructive",children:"Suppressed"}):null]})}function DE(){var m;const{toast:n}=Cn(),s=Jn(),[i,r]=V.useState(""),[c,d]=V.useState(null),h=tt({queryKey:Ue.suppressions(i),queryFn:()=>k_(i||void 0),placeholderData:fh}),y=hn({mutationFn:b=>_b(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 At?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(Bn,{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:i,onChange:b=>r(b.target.value),children:kE.map(b=>u.jsx("option",{value:b.value,children:b.label},b.value))})]}),h.isPending?u.jsx(hi,{}):h.isError?u.jsx(_t,{error:h.error,onRetry:()=>h.refetch()}):p.length===0?u.jsx(In,{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(Ht,{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(Ht,{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(zE,{row:b})}),u.jsx(be,{className:"text-right text-white/60",children:En(b.suppressedAt)}),u.jsx(be,{className:"text-right",children:u.jsx(je,{variant:"outline",size:"sm",onClick:()=>d(b),children:"Un-suppress"})})]},b.id))})]})}),u.jsx(mi,{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 UE({template:n}){const{toast:s}=Cn(),[i,r]=V.useState(!1),[c,d]=V.useState(""),h=tt({queryKey:Ue.templatePreview(n.key),queryFn:()=>v_(n.key)}),y=tt({queryKey:Ue.templateReport(n.key),queryFn:()=>x_(n.key),retry:(b,v)=>!(v instanceof At&&v.status===404)&&b<2}),p=hn({mutationFn:()=>b_(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 At?b.message:"Unexpected error."})}}),m=y.isError&&y.error instanceof At&&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(De,{variant:"secondary",children:n.category}):null]}),u.jsx("p",{className:"text-sm text-white/60",children:n.defaultSubject})]}),u.jsxs(je,{onClick:()=>r(!0),children:[u.jsx(Pr,{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(Ut,{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(_t,{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:Nl(y.data.totals.openRate)}),u.jsx(jc,{label:"Click rate",value:Nl(y.data.totals.clickRate)})]}),u.jsxs(Lt,{children:[u.jsx(Bt,{className:"pb-2",children:u.jsx($t,{className:"eyebrow text-white/50",children:"Sends over time"})}),u.jsx(qt,{children:u.jsx(rh,{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(Ut,{className:"h-96 w-full"}):h.isError?u.jsx(_t,{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:i,onClose:()=>r(!1),title:"Send a test email",description:`Sends "${n.key}" with example props.`,footer:u.jsxs(u.Fragment,{children:[u.jsx(je,{variant:"outline",onClick:()=>r(!1),children:"Cancel"}),u.jsx(je,{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 LE(){var d;const n=tt({queryKey:Ue.templates,queryFn:g_}),[s,i]=V.useState(null),r=((d=n.data)==null?void 0:d.templates)??[];V.useEffect(()=>{const h=r[0];s===null&&h&&i(h.key)},[s,r]);const c=r.find(h=>h.key===s)??null;return u.jsxs("div",{className:"space-y-6",children:[u.jsx(Bn,{title:"Templates",description:"Catalog, per-template stats, live previews, and send-test."}),n.isPending?u.jsx(Ut,{className:"h-96 w-full"}):n.isError?u.jsx(_t,{error:n.error,onRetry:()=>n.refetch()}):r.length===0?u.jsx(In,{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:()=>i(h.key),className:Fe("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(UE,{template:c},c.key):null]})]})}const Tn=yw({component:u_}),BE=Ln({getParentRoute:()=>Tn,path:"/",component:vE}),qE=Ln({getParentRoute:()=>Tn,path:"/sends",component:NE}),HE=Ln({getParentRoute:()=>Tn,path:"/templates",component:LE}),QE=Ln({getParentRoute:()=>Tn,path:"/journeys",component:pE}),GE=Ln({getParentRoute:()=>Tn,path:"/buckets",component:X_}),VE=Ln({getParentRoute:()=>Tn,path:"/contacts",component:eE}),PE=Ln({getParentRoute:()=>Tn,path:"/suppressions",component:DE}),YE=Ln({getParentRoute:()=>Tn,path:"/integrations",component:dE}),KE=Ln({getParentRoute:()=>Tn,path:"/setup",component:OE}),XE=Ln({getParentRoute:()=>Tn,path:"/settings",component:_E}),ZE=Ln({getParentRoute:()=>Tn,path:"/debug",component:nE}),FE=Tn.addChildren([BE,qE,HE,QE,GE,VE,PE,ZE,YE,KE,XE]),IE=Ew({routeTree:FE,basepath:"/studio",defaultPreload:"intent"}),Tb=document.getElementById("root");if(!Tb)throw new Error("Root element #root not found");Uw.createRoot(Tb).render(u.jsx(V.StrictMode,{children:u.jsx(ES,{client:r_,children:u.jsx(l_,{children:u.jsx(FN,{children:u.jsx(Mw,{router:IE})})})})}));