@openloaf/openspeech-frontend 0.2.33 → 0.2.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/App-BN09Ng5O.css +1 -0
- package/dist/assets/{main-DlvFGYyF.js → main-Ccp2r9X-.js} +1 -1
- package/dist/assets/{promo-CahAwHKk.js → promo-aMad1HB1.js} +1 -1
- package/dist/index.html +3 -3
- package/dist/promo.html +3 -3
- package/package.json +1 -1
- package/dist/assets/App-CmMEhsn6.css +0 -1
- /package/dist/assets/{App-CCIcF_r7.js → App-Bq4YFGdc.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as h,R as xp,a as zD,g as ya,b as he,c as Uv,d as Xe,j as u,X as fr,S as Kr,A as qt,m as we,e as cw,K as FD,f as BD}from"./proxy-C8trGop7.js";import{i as ne,g as Kv,k as WD,a as Vv,u as HD,b as UD,d as on,B as qv,r as Ja,S as XC,f as KD,c as uw,e as Vd,h as Gv,n as vd,j as VD,l as qD,m as GD,o as YD,p as xd,q as Yv,s as bp,t as fy,M as XD,v as Xv,w as Zv,C as pr,x as ZC,y as QC,W as ZD,z as QD}from"./App-CCIcF_r7.js";import{C as JD,L as eL,a as tL,S as nL,b as rL,P as iL,B as aL,M as oL,W as py,G as sL,T as lL,c as cL,d as uL,e as Wc,f as dL,g as fL,h as $o,i as yr,j as JC,k as eo,l as Vs,m as Qv,n as Jv,o as dw,D as wp,F as pL,A as eP,p as hL}from"./index-CpFdKgxj.js";var tP=e=>{throw TypeError(e)},mL=(e,t,n)=>t.has(e)||tP("Cannot "+n),Ah=(e,t,n)=>(mL(e,t,"read from private field"),n?n.call(e):t.get(e)),gL=(e,t,n)=>t.has(e)?tP("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),fw="popstate";function pw(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function yL(e={}){function t(r,i){let a=i.state?.masked,{pathname:o,search:s,hash:l}=a||r.location;return dc("",{pathname:o,search:s,hash:l},i.state&&i.state.usr||null,i.state&&i.state.key||"default",a?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function n(r,i){return typeof i=="string"?i:Mi(i)}return xL(t,n,null,e)}function et(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function sn(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function vL(){return Math.random().toString(36).substring(2,10)}function hw(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function dc(e,t,n=null,r,i){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Hi(t):t,state:n,key:t&&t.key||r||vL(),unstable_mask:i}}function Mi({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Hi(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function xL(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s="POP",l=null,c=f();c==null&&(c=0,o.replaceState({...o.state,idx:c},""));function f(){return(o.state||{idx:null}).idx}function d(){s="POP";let x=f(),v=x==null?null:x-c;c=x,l&&l({action:s,location:g.location,delta:v})}function p(x,v){s="PUSH";let b=pw(x)?x:dc(g.location,x,v);c=f()+1;let w=hw(b,c),k=g.createHref(b.unstable_mask||b);try{o.pushState(w,"",k)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;i.location.assign(k)}a&&l&&l({action:s,location:g.location,delta:1})}function m(x,v){s="REPLACE";let b=pw(x)?x:dc(g.location,x,v);c=f();let w=hw(b,c),k=g.createHref(b.unstable_mask||b);o.replaceState(w,"",k),a&&l&&l({action:s,location:g.location,delta:0})}function y(x){return nP(x)}let g={get action(){return s},get location(){return e(i,o)},listen(x){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(fw,d),l=x,()=>{i.removeEventListener(fw,d),l=null}},createHref(x){return t(i,x)},createURL:y,encodeLocation(x){let v=y(x);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:p,replace:m,go(x){return o.go(x)}};return g}function nP(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),et(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:Mi(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}var Bl,mw=class{constructor(e){if(gL(this,Bl,new Map),e)for(let[t,n]of e)this.set(t,n)}get(e){if(Ah(this,Bl).has(e))return Ah(this,Bl).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){Ah(this,Bl).set(e,t)}};Bl=new WeakMap;var bL=new Set(["lazy","caseSensitive","path","id","index","children"]);function wL(e){return bL.has(e)}var _L=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function SL(e){return _L.has(e)}function kL(e){return e.index===!0}function fc(e,t,n=[],r={},i=!1){return e.map((a,o)=>{let s=[...n,String(o)],l=typeof a.id=="string"?a.id:s.join("-");if(et(a.index!==!0||!a.children,"Cannot specify children on an index route"),et(i||!r[l],`Found a route id collision on id "${l}". Route id's must be globally unique within Data Router usages`),kL(a)){let c={...a,id:l};return r[l]=gw(c,t(c)),c}else{let c={...a,id:l,children:void 0};return r[l]=gw(c,t(c)),a.children&&(c.children=fc(a.children,t,s,r,i)),c}})}function gw(e,t){return Object.assign(e,{...t,...typeof t.lazy=="object"&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function Da(e,t,n="/"){return Wl(e,t,n,!1)}function Wl(e,t,n,r){let i=typeof t=="string"?Hi(t):t,a=Gr(i.pathname||"/",n);if(a==null)return null;let o=rP(e);jL(o);let s=null;for(let l=0;s==null&&l<o.length;++l){let c=LL(a);s=IL(o[l],c,r)}return s}function EL(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function rP(e,t=[],n=[],r="",i=!1){let a=(o,s,l=i,c)=>{let f={relativePath:c===void 0?o.path||"":c,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};if(f.relativePath.startsWith("/")){if(!f.relativePath.startsWith(r)&&l)return;et(f.relativePath.startsWith(r),`Absolute route path "${f.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),f.relativePath=f.relativePath.slice(r.length)}let d=Vr([r,f.relativePath]),p=n.concat(f);o.children&&o.children.length>0&&(et(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${d}".`),rP(o.children,t,p,d,l)),!(o.path==null&&!o.index)&&t.push({path:d,score:AL(d,o.index),routesMeta:p})};return e.forEach((o,s)=>{if(o.path===""||!o.path?.includes("?"))a(o,s);else for(let l of iP(o.path))a(o,s,!0,l)}),t}function iP(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),a=n.replace(/\?$/,"");if(r.length===0)return i?[a,""]:[a];let o=iP(r.join("/")),s=[];return s.push(...o.map(l=>l===""?a:[a,l].join("/"))),i&&s.push(...o),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function jL(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:ML(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var CL=/^:[\w-]+$/,PL=3,NL=2,TL=1,OL=10,RL=-2,yw=e=>e==="*";function AL(e,t){let n=e.split("/"),r=n.length;return n.some(yw)&&(r+=RL),t&&(r+=NL),n.filter(i=>!yw(i)).reduce((i,a)=>i+(CL.test(a)?PL:a===""?TL:OL),r)}function ML(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function IL(e,t,n=!1){let{routesMeta:r}=e,i={},a="/",o=[];for(let s=0;s<r.length;++s){let l=r[s],c=s===r.length-1,f=a==="/"?t:t.slice(a.length)||"/",d=qd({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},f),p=l.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=qd({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},f)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:Vr([a,d.pathname]),pathnameBase:FL(Vr([a,d.pathnameBase])),route:p}),d.pathnameBase!=="/"&&(a=Vr([a,d.pathnameBase]))}return o}function qd(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=DL(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,"$1"),s=i.slice(1);return{params:r.reduce((c,{paramName:f,isOptional:d},p)=>{if(f==="*"){let y=s[p]||"";o=a.slice(0,a.length-y.length).replace(/(.)\/+$/,"$1")}const m=s[p];return d&&!m?c[f]=void 0:c[f]=(m||"").replace(/%2F/g,"/"),c},{}),pathname:a,pathnameBase:o,pattern:e}}function DL(e,t=!1,n=!0){sn(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,s,l,c,f)=>{if(r.push({paramName:s,isOptional:l!=null}),l){let d=f.charAt(c+o.length);return d&&d!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function LL(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return sn(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Gr(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function $L({basename:e,pathname:t}){return t==="/"?e:Vr([e,t])}var aP=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ex=e=>aP.test(e);function zL(e,t="/"){let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Hi(e):e,a;return n?(n=nx(n),n.startsWith("/")?a=vw(n.substring(1),"/"):a=vw(n,t)):a=t,{pathname:a,search:BL(r),hash:WL(i)}}function vw(e,t){let n=Gd(t).split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Mh(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function oP(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function tx(e){let t=oP(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function _p(e,t,n,r=!1){let i;typeof e=="string"?i=Hi(e):(i={...e},et(!i.pathname||!i.pathname.includes("?"),Mh("?","pathname","search",i)),et(!i.pathname||!i.pathname.includes("#"),Mh("#","pathname","hash",i)),et(!i.search||!i.search.includes("#"),Mh("#","search","hash",i)));let a=e===""||i.pathname==="",o=a?"/":i.pathname,s;if(o==null)s=n;else{let d=t.length-1;if(!r&&o.startsWith("..")){let p=o.split("/");for(;p[0]==="..";)p.shift(),d-=1;i.pathname=p.join("/")}s=d>=0?t[d]:"/"}let l=zL(i,s),c=o&&o!=="/"&&o.endsWith("/"),f=(a||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||f)&&(l.pathname+="/"),l}var nx=e=>e.replace(/\/\/+/g,"/"),Vr=e=>nx(e.join("/")),Gd=e=>e.replace(/\/+$/,""),FL=e=>Gd(e).replace(/^\/*/,"/"),BL=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,WL=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,Hc=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function pc(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function Uc(e){let t=e.map(n=>n.route.path).filter(Boolean);return Vr(t)||"/"}var sP=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function lP(e,t){let n=e;if(typeof n!="string"||!aP.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(sP)try{let a=new URL(window.location.href),o=n.startsWith("//")?new URL(a.protocol+n):new URL(n),s=Gr(o.pathname,t);o.origin===a.origin&&s!=null?n=s+o.search+o.hash:i=!0}catch{sn(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}var Wa=Symbol("Uninstrumented");function HL(e,t){let n={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(i=>i({id:t.id,index:t.index,path:t.path,instrument(a){let o=Object.keys(n);for(let s of o)a[s]&&n[s].push(a[s])}}));let r={};if(typeof t.lazy=="function"&&n.lazy.length>0){let i=Ps(n.lazy,t.lazy,()=>{});i&&(r.lazy=i)}if(typeof t.lazy=="object"){let i=t.lazy;["middleware","loader","action"].forEach(a=>{let o=i[a],s=n[`lazy.${a}`];if(typeof o=="function"&&s.length>0){let l=Ps(s,o,()=>{});l&&(r.lazy=Object.assign(r.lazy||{},{[a]:l}))}})}return["loader","action"].forEach(i=>{let a=t[i];if(typeof a=="function"&&n[i].length>0){let o=a[Wa]??a,s=Ps(n[i],o,(...l)=>xw(l[0]));s&&(i==="loader"&&o.hydrate===!0&&(s.hydrate=!0),s[Wa]=o,r[i]=s)}}),t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map(i=>{let a=i[Wa]??i,o=Ps(n.middleware,a,(...s)=>xw(s[0]));return o?(o[Wa]=a,o):i})),r}function UL(e,t){let n={navigate:[],fetch:[]};if(t.forEach(r=>r({instrument(i){let a=Object.keys(i);for(let o of a)i[o]&&n[o].push(i[o])}})),n.navigate.length>0){let r=e.navigate[Wa]??e.navigate,i=Ps(n.navigate,r,(...a)=>{let[o,s]=a;return{to:typeof o=="number"||typeof o=="string"?o:o?Mi(o):".",...bw(e,s??{})}});i&&(i[Wa]=r,e.navigate=i)}if(n.fetch.length>0){let r=e.fetch[Wa]??e.fetch,i=Ps(n.fetch,r,(...a)=>{let[o,,s,l]=a;return{href:s??".",fetcherKey:o,...bw(e,l??{})}});i&&(i[Wa]=r,e.fetch=i)}return e}function Ps(e,t,n){return e.length===0?null:async(...r)=>{let i=await cP(e,n(...r),()=>t(...r),e.length-1);if(i.type==="error")throw i.value;return i.value}}async function cP(e,t,n,r){let i=e[r],a;if(i){let o,s=async()=>(o?console.error("You cannot call instrumented handlers more than once"):o=cP(e,t,n,r-1),a=await o,et(a,"Expected a result"),a.type==="error"&&a.value instanceof Error?{status:"error",error:a.value}:{status:"success",error:void 0});try{await i(s,t)}catch(l){console.error("An instrumentation function threw an error:",l)}o||await s(),await o}else try{a={type:"success",value:await n()}}catch(o){a={type:"error",value:o}}return a||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function xw(e){let{request:t,context:n,params:r,unstable_pattern:i}=e;return{request:KL(t),params:{...r},unstable_pattern:i,context:VL(n)}}function bw(e,t){return{currentUrl:Mi(e.state.location),..."formMethod"in t?{formMethod:t.formMethod}:{},..."formEncType"in t?{formEncType:t.formEncType}:{},..."formData"in t?{formData:t.formData}:{},..."body"in t?{body:t.body}:{}}}function KL(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function VL(e){if(GL(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var qL=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function GL(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===qL}var uP=["POST","PUT","PATCH","DELETE"],YL=new Set(uP),XL=["GET",...uP],ZL=new Set(XL),dP=new Set([301,302,303,307,308]),QL=new Set([307,308]),Ih={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},JL={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},_l={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},e$=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),fP="remix-router-transitions",pP=Symbol("ResetLoaderData");function t$(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u";et(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let r=e.hydrationRouteProperties||[],i=e.mapRouteProperties||e$,a=i;if(e.unstable_instrumentations){let F=e.unstable_instrumentations;a=G=>({...i(G),...HL(F.map(X=>X.route).filter(Boolean),G)})}let o={},s=fc(e.routes,a,void 0,o),l,c=e.basename||"/";c.startsWith("/")||(c=`/${c}`);let f=e.dataStrategy||o$,d={unstable_passThroughRequests:!1,...e.future},p=null,m=new Set,y=null,g=null,x=null,v=e.hydrationData!=null,b=Da(s,e.history.location,c),w=!1,k=null,S,E;if(b==null&&!e.patchRoutesOnNavigation){let F=$r(404,{pathname:e.history.location.pathname}),{matches:G,route:X}=ku(s);S=!0,E=!S,b=G,k={[X.id]:F}}else if(b&&!e.hydrationData&&xr(b,s,e.history.location.pathname).active&&(b=null),b)if(b.some(F=>F.route.lazy))S=!1,E=!S;else if(!b.some(F=>rx(F.route)))S=!0,E=!S;else{let F=e.hydrationData?e.hydrationData.loaderData:null,G=e.hydrationData?e.hydrationData.errors:null,X=b;if(G){let ce=b.findIndex(pe=>G[pe.route.id]!==void 0);X=X.slice(0,ce+1)}E=!1,S=!0,X.forEach(ce=>{let pe=hP(ce.route,F,G);E=E||pe.renderFallback,S=S&&!pe.shouldLoad})}else{S=!1,E=!S,b=[];let F=xr(null,s,e.history.location.pathname);F.active&&F.matches&&(w=!0,b=F.matches)}let j,_={historyAction:e.history.action,location:e.history.location,matches:b,initialized:S,renderFallback:E,navigation:Ih,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||k,fetchers:new Map,blockers:new Map},P="POP",C=null,T=!1,O,M=!1,R=new Map,N=null,A=!1,D=!1,H=new Set,z=new Map,$=0,re=-1,Q=new Map,V=new Set,I=new Map,L=new Map,W=new Set,te=new Map,U,q=null;function ee(){if(p=e.history.listen(({action:F,location:G,delta:X})=>{if(U){U(),U=void 0;return}sn(te.size===0||X!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let ce=Kn({currentLocation:_.location,nextLocation:G,historyAction:F});if(ce&&X!=null){let pe=new Promise(Me=>{U=Me});e.history.go(X*-1),Wt(ce,{state:"blocked",location:G,proceed(){Wt(ce,{state:"proceeding",proceed:void 0,reset:void 0,location:G}),pe.then(()=>e.history.go(X))},reset(){let Me=new Map(_.blockers);Me.set(ce,_l),fe({blockers:Me})}}),C?.resolve(),C=null;return}return ve(F,G)}),n){k$(t,R);let F=()=>E$(t,R);t.addEventListener("pagehide",F),N=()=>t.removeEventListener("pagehide",F)}return _.initialized||ve("POP",_.location,{initialHydration:!0}),j}function ue(){p&&p(),N&&N(),m.clear(),O&&O.abort(),_.fetchers.forEach((F,G)=>lt(G)),_.blockers.forEach((F,G)=>Sn(G))}function Y(F){return m.add(F),()=>m.delete(F)}function fe(F,G={}){F.matches&&(F.matches=F.matches.map(pe=>{let Me=o[pe.route.id],Ae=pe.route;return Ae.element!==Me.element||Ae.errorElement!==Me.errorElement||Ae.hydrateFallbackElement!==Me.hydrateFallbackElement?{...pe,route:Me}:pe})),_={..._,...F};let X=[],ce=[];_.fetchers.forEach((pe,Me)=>{pe.state==="idle"&&(W.has(Me)?X.push(Me):ce.push(Me))}),W.forEach(pe=>{!_.fetchers.has(pe)&&!z.has(pe)&&X.push(pe)}),[...m].forEach(pe=>pe(_,{deletedFetchers:X,newErrors:F.errors??null,viewTransitionOpts:G.viewTransitionOpts,flushSync:G.flushSync===!0})),X.forEach(pe=>lt(pe)),ce.forEach(pe=>_.fetchers.delete(pe))}function me(F,G,{flushSync:X}={}){let ce=_.actionData!=null&&_.navigation.formMethod!=null&&Fn(_.navigation.formMethod)&&_.navigation.state==="loading"&&F.state?._isRedirect!==!0,pe;G.actionData?Object.keys(G.actionData).length>0?pe=G.actionData:pe=null:ce?pe=_.actionData:pe=null;let Me=G.loaderData?Ow(_.loaderData,G.loaderData,G.matches||[],G.errors):_.loaderData,Ae=_.blockers;Ae.size>0&&(Ae=new Map(Ae),Ae.forEach((Be,Ie)=>Ae.set(Ie,_l)));let Te=A?!1:rn(F,G.matches||_.matches),$e=T===!0||_.navigation.formMethod!=null&&Fn(_.navigation.formMethod)&&F.state?._isRedirect!==!0;l&&(s=l,l=void 0),A||P==="POP"||(P==="PUSH"?e.history.push(F,F.state):P==="REPLACE"&&e.history.replace(F,F.state));let Se;if(P==="POP"){let Be=R.get(_.location.pathname);Be&&Be.has(F.pathname)?Se={currentLocation:_.location,nextLocation:F}:R.has(F.pathname)&&(Se={currentLocation:F,nextLocation:_.location})}else if(M){let Be=R.get(_.location.pathname);Be?Be.add(F.pathname):(Be=new Set([F.pathname]),R.set(_.location.pathname,Be)),Se={currentLocation:_.location,nextLocation:F}}fe({...G,actionData:pe,loaderData:Me,historyAction:P,location:F,initialized:!0,renderFallback:!1,navigation:Ih,revalidation:"idle",restoreScrollPosition:Te,preventScrollReset:$e,blockers:Ae},{viewTransitionOpts:Se,flushSync:X===!0}),P="POP",T=!1,M=!1,A=!1,D=!1,C?.resolve(),C=null,q?.resolve(),q=null}async function je(F,G){if(C?.resolve(),C=null,typeof F=="number"){C||(C=Iw());let At=C.promise;return e.history.go(F),At}let X=hy(_.location,_.matches,c,F,G?.fromRouteId,G?.relative),{path:ce,submission:pe,error:Me}=ww(!1,X,G),Ae;G?.unstable_mask&&(Ae={pathname:"",search:"",hash:"",...typeof G.unstable_mask=="string"?Hi(G.unstable_mask):{..._.location.unstable_mask,...G.unstable_mask}});let Te=_.location,$e=dc(Te,ce,G&&G.state,void 0,Ae);$e={...$e,...e.history.encodeLocation($e)};let Se=G&&G.replace!=null?G.replace:void 0,Be="PUSH";Se===!0?Be="REPLACE":Se===!1||pe!=null&&Fn(pe.formMethod)&&pe.formAction===_.location.pathname+_.location.search&&(Be="REPLACE");let Ie=G&&"preventScrollReset"in G?G.preventScrollReset===!0:void 0,gt=(G&&G.flushSync)===!0,ft=Kn({currentLocation:Te,nextLocation:$e,historyAction:Be});if(ft){Wt(ft,{state:"blocked",location:$e,proceed(){Wt(ft,{state:"proceeding",proceed:void 0,reset:void 0,location:$e}),je(F,G)},reset(){let At=new Map(_.blockers);At.set(ft,_l),fe({blockers:At})}});return}await ve(Be,$e,{submission:pe,pendingError:Me,preventScrollReset:Ie,replace:G&&G.replace,enableViewTransition:G&&G.viewTransition,flushSync:gt,callSiteDefaultShouldRevalidate:G&&G.unstable_defaultShouldRevalidate})}function ye(){q||(q=Iw()),Ye(),fe({revalidation:"loading"});let F=q.promise;return _.navigation.state==="submitting"?F:_.navigation.state==="idle"?(ve(_.historyAction,_.location,{startUninterruptedRevalidation:!0}),F):(ve(P||_.historyAction,_.navigation.location,{overrideNavigation:_.navigation,enableViewTransition:M===!0}),F)}async function ve(F,G,X){O&&O.abort(),O=null,P=F,A=(X&&X.startUninterruptedRevalidation)===!0,Rt(_.location,_.matches),T=(X&&X.preventScrollReset)===!0,M=(X&&X.enableViewTransition)===!0;let ce=l||s,pe=X&&X.overrideNavigation,Me=X?.initialHydration&&_.matches&&_.matches.length>0&&!w?_.matches:Da(ce,G,c),Ae=(X&&X.flushSync)===!0;if(Me&&_.initialized&&!D&&h$(_.location,G)&&!(X&&X.submission&&Fn(X.submission.formMethod))){me(G,{matches:Me},{flushSync:Ae});return}let Te=xr(Me,ce,G.pathname);if(Te.active&&Te.matches&&(Me=Te.matches),!Me){let{error:Ht,notFoundMatches:En,route:ht}=mn(G.pathname);me(G,{matches:En,loaderData:{},errors:{[ht.id]:Ht}},{flushSync:Ae});return}O=new AbortController;let $e=Es(e.history,G,O.signal,X&&X.submission),Se=e.getContext?await e.getContext():new mw,Be;if(X&&X.pendingError)Be=[La(Me).route.id,{type:"error",error:X.pendingError}];else if(X&&X.submission&&Fn(X.submission.formMethod)){let Ht=await Oe($e,G,X.submission,Me,Se,Te.active,X&&X.initialHydration===!0,{replace:X.replace,flushSync:Ae});if(Ht.shortCircuited)return;if(Ht.pendingActionResult){let[En,ht]=Ht.pendingActionResult;if(wr(ht)&&pc(ht.error)&&ht.error.status===404){O=null,me(G,{matches:Ht.matches,loaderData:{},errors:{[En]:ht.error}});return}}Me=Ht.matches||Me,Be=Ht.pendingActionResult,pe=Dh(G,X.submission),Ae=!1,Te.active=!1,$e=Es(e.history,$e.url,$e.signal)}let{shortCircuited:Ie,matches:gt,loaderData:ft,errors:At}=await ge($e,G,Me,Se,Te.active,pe,X&&X.submission,X&&X.fetcherSubmission,X&&X.replace,X&&X.initialHydration===!0,Ae,Be,X&&X.callSiteDefaultShouldRevalidate);Ie||(O=null,me(G,{matches:gt||Me,...Rw(Be),loaderData:ft,errors:At}))}async function Oe(F,G,X,ce,pe,Me,Ae,Te={}){Ye();let $e=_$(G,X);if(fe({navigation:$e},{flushSync:Te.flushSync===!0}),Me){let Ie=await kt(ce,G.pathname,F.signal);if(Ie.type==="aborted")return{shortCircuited:!0};if(Ie.type==="error"){if(Ie.partialMatches.length===0){let{matches:ft,route:At}=ku(s);return{matches:ft,pendingActionResult:[At.id,{type:"error",error:Ie.error}]}}let gt=La(Ie.partialMatches).route.id;return{matches:Ie.partialMatches,pendingActionResult:[gt,{type:"error",error:Ie.error}]}}else if(Ie.matches)ce=Ie.matches;else{let{notFoundMatches:gt,error:ft,route:At}=mn(G.pathname);return{matches:gt,pendingActionResult:[At.id,{type:"error",error:ft}]}}}let Se,Be=bd(ce,G);if(!Be.route.action&&!Be.route.lazy)Se={type:"error",error:$r(405,{method:F.method,pathname:G.pathname,routeId:Be.route.id})};else{let Ie=As(a,o,F,G,ce,Be,Ae?[]:r,pe),gt=await Pe(F,G,Ie,pe,null);if(Se=gt[Be.route.id],!Se){for(let ft of ce)if(gt[ft.route.id]){Se=gt[ft.route.id];break}}if(F.signal.aborted)return{shortCircuited:!0}}if(No(Se)){let Ie;return Te&&Te.replace!=null?Ie=Te.replace:Ie=Pw(Se.response.headers.get("Location"),new URL(F.url),c,e.history)===_.location.pathname+_.location.search,await be(F,Se,!0,{submission:X,replace:Ie}),{shortCircuited:!0}}if(wr(Se)){let Ie=La(ce,Be.route.id);return(Te&&Te.replace)!==!0&&(P="PUSH"),{matches:ce,pendingActionResult:[Ie.route.id,Se,Be.route.id]}}return{matches:ce,pendingActionResult:[Be.route.id,Se]}}async function ge(F,G,X,ce,pe,Me,Ae,Te,$e,Se,Be,Ie,gt){let ft=Me||Dh(G,Ae),At=Ae||Te||Mw(ft),Ht=!A&&!Se;if(pe){if(Ht){let Ln=Re(Ie);fe({navigation:ft,...Ln!==void 0?{actionData:Ln}:{}},{flushSync:Be})}let ct=await kt(X,G.pathname,F.signal);if(ct.type==="aborted")return{shortCircuited:!0};if(ct.type==="error"){if(ct.partialMatches.length===0){let{matches:ps,route:ho}=ku(s);return{matches:ps,loaderData:{},errors:{[ho.id]:ct.error}}}let Ln=La(ct.partialMatches).route.id;return{matches:ct.partialMatches,loaderData:{},errors:{[Ln]:ct.error}}}else if(ct.matches)X=ct.matches;else{let{error:Ln,notFoundMatches:ps,route:ho}=mn(G.pathname);return{matches:ps,loaderData:{},errors:{[ho.id]:Ln}}}}let En=l||s,{dsMatches:ht,revalidatingFetchers:br}=_w(F,ce,a,o,e.history,_,X,At,G,Se?[]:r,Se===!0,D,H,W,I,V,En,c,e.patchRoutesOnNavigation!=null,Ie,gt);if(re=++$,!e.dataStrategy&&!ht.some(ct=>ct.shouldLoad)&&!ht.some(ct=>ct.route.middleware&&ct.route.middleware.length>0)&&br.length===0){let ct=vr();return me(G,{matches:X,loaderData:{},errors:Ie&&wr(Ie[1])?{[Ie[0]]:Ie[1].error}:null,...Rw(Ie),...ct?{fetchers:new Map(_.fetchers)}:{}},{flushSync:Be}),{shortCircuited:!0}}if(Ht){let ct={};if(!pe){ct.navigation=ft;let Ln=Re(Ie);Ln!==void 0&&(ct.actionData=Ln)}br.length>0&&(ct.fetchers=oe(br)),fe(ct,{flushSync:Be})}br.forEach(ct=>{nn(ct.key),ct.controller&&z.set(ct.key,ct.controller)});let fo=()=>br.forEach(ct=>nn(ct.key));O&&O.signal.addEventListener("abort",fo);let{loaderResults:bl,fetcherResults:Pa}=await ae(ht,br,F,G,ce);if(F.signal.aborted)return{shortCircuited:!0};O&&O.signal.removeEventListener("abort",fo),br.forEach(ct=>z.delete(ct.key));let mi=Eu(bl);if(mi)return await be(F,mi.result,!0,{replace:$e}),{shortCircuited:!0};if(mi=Eu(Pa),mi)return V.add(mi.key),await be(F,mi.result,!0,{replace:$e}),{shortCircuited:!0};let{loaderData:Rh,errors:wl}=Tw(_,X,bl,Ie,br,Pa);Se&&_.errors&&(wl={..._.errors,...wl});let po=vr(),wu=nt(re),_u=po||wu||br.length>0;return{matches:X,loaderData:Rh,errors:wl,..._u?{fetchers:new Map(_.fetchers)}:{}}}function Re(F){if(F&&!wr(F[1]))return{[F[0]]:F[1].data};if(_.actionData)return Object.keys(_.actionData).length===0?null:_.actionData}function oe(F){return F.forEach(G=>{let X=_.fetchers.get(G.key),ce=Sl(void 0,X?X.data:void 0);_.fetchers.set(G.key,ce)}),new Map(_.fetchers)}async function de(F,G,X,ce){nn(F);let pe=(ce&&ce.flushSync)===!0,Me=l||s,Ae=hy(_.location,_.matches,c,X,G,ce?.relative),Te=Da(Me,Ae,c),$e=xr(Te,Me,Ae);if($e.active&&$e.matches&&(Te=$e.matches),!Te){Qe(F,G,$r(404,{pathname:Ae}),{flushSync:pe});return}let{path:Se,submission:Be,error:Ie}=ww(!0,Ae,ce);if(Ie){Qe(F,G,Ie,{flushSync:pe});return}let gt=e.getContext?await e.getContext():new mw,ft=(ce&&ce.preventScrollReset)===!0;if(Be&&Fn(Be.formMethod)){await K(F,G,Se,Te,gt,$e.active,pe,ft,Be,ce&&ce.unstable_defaultShouldRevalidate);return}I.set(F,{routeId:G,path:Se}),await se(F,G,Se,Te,gt,$e.active,pe,ft,Be)}async function K(F,G,X,ce,pe,Me,Ae,Te,$e,Se){Ye(),I.delete(F);let Be=_.fetchers.get(F);Ze(F,S$($e,Be),{flushSync:Ae});let Ie=new AbortController,gt=Es(e.history,X,Ie.signal,$e);if(Me){let Lt=await kt(ce,new URL(gt.url).pathname,gt.signal,F);if(Lt.type==="aborted")return;if(Lt.type==="error"){Qe(F,G,Lt.error,{flushSync:Ae});return}else if(Lt.matches)ce=Lt.matches;else{Qe(F,G,$r(404,{pathname:X}),{flushSync:Ae});return}}let ft=bd(ce,X);if(!ft.route.action&&!ft.route.lazy){let Lt=$r(405,{method:$e.formMethod,pathname:X,routeId:G});Qe(F,G,Lt,{flushSync:Ae});return}z.set(F,Ie);let At=$,Ht=As(a,o,gt,X,ce,ft,r,pe),En=await Pe(gt,X,Ht,pe,F),ht=En[ft.route.id];if(!ht){for(let Lt of Ht)if(En[Lt.route.id]){ht=En[Lt.route.id];break}}if(gt.signal.aborted){z.get(F)===Ie&&z.delete(F);return}if(W.has(F)){if(No(ht)||wr(ht)){Ze(F,Yi(void 0));return}}else{if(No(ht))if(z.delete(F),re>At){Ze(F,Yi(void 0));return}else return V.add(F),Ze(F,Sl($e)),be(gt,ht,!1,{fetcherSubmission:$e,preventScrollReset:Te});if(wr(ht)){Qe(F,G,ht.error);return}}let br=_.navigation.location||_.location,fo=Es(e.history,br,Ie.signal),bl=l||s,Pa=_.navigation.state!=="idle"?Da(bl,_.navigation.location,c):_.matches;et(Pa,"Didn't find any matches after fetcher action");let mi=++$;Q.set(F,mi);let Rh=Sl($e,ht.data);_.fetchers.set(F,Rh);let{dsMatches:wl,revalidatingFetchers:po}=_w(fo,pe,a,o,e.history,_,Pa,$e,br,r,!1,D,H,W,I,V,bl,c,e.patchRoutesOnNavigation!=null,[ft.route.id,ht],Se);po.filter(Lt=>Lt.key!==F).forEach(Lt=>{let Su=Lt.key,lw=_.fetchers.get(Su),$D=Sl(void 0,lw?lw.data:void 0);_.fetchers.set(Su,$D),nn(Su),Lt.controller&&z.set(Su,Lt.controller)}),fe({fetchers:new Map(_.fetchers)});let wu=()=>po.forEach(Lt=>nn(Lt.key));Ie.signal.addEventListener("abort",wu);let{loaderResults:_u,fetcherResults:ct}=await ae(wl,po,fo,br,pe);if(Ie.signal.aborted)return;if(Ie.signal.removeEventListener("abort",wu),Q.delete(F),z.delete(F),po.forEach(Lt=>z.delete(Lt.key)),_.fetchers.has(F)){let Lt=Yi(ht.data);_.fetchers.set(F,Lt)}let Ln=Eu(_u);if(Ln)return be(fo,Ln.result,!1,{preventScrollReset:Te});if(Ln=Eu(ct),Ln)return V.add(Ln.key),be(fo,Ln.result,!1,{preventScrollReset:Te});let{loaderData:ps,errors:ho}=Tw(_,Pa,_u,void 0,po,ct);nt(mi),_.navigation.state==="loading"&&mi>re?(et(P,"Expected pending action"),O&&O.abort(),me(_.navigation.location,{matches:Pa,loaderData:ps,errors:ho,fetchers:new Map(_.fetchers)})):(fe({errors:ho,loaderData:Ow(_.loaderData,ps,Pa,ho),fetchers:new Map(_.fetchers)}),D=!1)}async function se(F,G,X,ce,pe,Me,Ae,Te,$e){let Se=_.fetchers.get(F);Ze(F,Sl($e,Se?Se.data:void 0),{flushSync:Ae});let Be=new AbortController,Ie=Es(e.history,X,Be.signal);if(Me){let ht=await kt(ce,new URL(Ie.url).pathname,Ie.signal,F);if(ht.type==="aborted")return;if(ht.type==="error"){Qe(F,G,ht.error,{flushSync:Ae});return}else if(ht.matches)ce=ht.matches;else{Qe(F,G,$r(404,{pathname:X}),{flushSync:Ae});return}}let gt=bd(ce,X);z.set(F,Be);let ft=$,At=As(a,o,Ie,X,ce,gt,r,pe),Ht=await Pe(Ie,X,At,pe,F),En=Ht[gt.route.id];if(!En){for(let ht of ce)if(Ht[ht.route.id]){En=Ht[ht.route.id];break}}if(z.get(F)===Be&&z.delete(F),!Ie.signal.aborted){if(W.has(F)){Ze(F,Yi(void 0));return}if(No(En))if(re>ft){Ze(F,Yi(void 0));return}else{V.add(F),await be(Ie,En,!1,{preventScrollReset:Te});return}if(wr(En)){Qe(F,G,En.error);return}Ze(F,Yi(En.data))}}async function be(F,G,X,{submission:ce,fetcherSubmission:pe,preventScrollReset:Me,replace:Ae}={}){X||(C?.resolve(),C=null),G.response.headers.has("X-Remix-Revalidate")&&(D=!0);let Te=G.response.headers.get("Location");et(Te,"Expected a Location header on the redirect Response"),Te=Pw(Te,new URL(F.url),c,e.history);let $e=dc(_.location,Te,{_isRedirect:!0});if(n){let At=!1;if(G.response.headers.has("X-Remix-Reload-Document"))At=!0;else if(ex(Te)){const Ht=nP(Te,!0);At=Ht.origin!==t.location.origin||Gr(Ht.pathname,c)==null}if(At){Ae?t.location.replace(Te):t.location.assign(Te);return}}O=null;let Se=Ae===!0||G.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Be,formAction:Ie,formEncType:gt}=_.navigation;!ce&&!pe&&Be&&Ie&>&&(ce=Mw(_.navigation));let ft=ce||pe;if(QL.has(G.response.status)&&ft&&Fn(ft.formMethod))await ve(Se,$e,{submission:{...ft,formAction:Te},preventScrollReset:Me||T,enableViewTransition:X?M:void 0});else{let At=Dh($e,ce);await ve(Se,$e,{overrideNavigation:At,fetcherSubmission:pe,preventScrollReset:Me||T,enableViewTransition:X?M:void 0})}}async function Pe(F,G,X,ce,pe){let Me,Ae={};try{Me=await l$(f,F,G,X,pe,ce,!1)}catch(Te){return X.filter($e=>$e.shouldLoad).forEach($e=>{Ae[$e.route.id]={type:"error",error:Te}}),Ae}if(F.signal.aborted)return Ae;if(!Fn(F.method))for(let Te of X){if(Me[Te.route.id]?.type==="error")break;!Me.hasOwnProperty(Te.route.id)&&!_.loaderData.hasOwnProperty(Te.route.id)&&(!_.errors||!_.errors.hasOwnProperty(Te.route.id))&&Te.shouldCallHandler()&&(Me[Te.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${Te.route.id}`)})}for(let[Te,$e]of Object.entries(Me))if(v$($e)){let Se=$e.result;Ae[Te]={type:"redirect",response:f$(Se,F,Te,X,c)}}else Ae[Te]=await d$($e);return Ae}async function ae(F,G,X,ce,pe){let Me=Pe(X,ce,F,pe,null),Ae=Promise.all(G.map(async Se=>{if(Se.matches&&Se.match&&Se.request&&Se.controller){let Ie=(await Pe(Se.request,Se.path,Se.matches,pe,Se.key))[Se.match.route.id];return{[Se.key]:Ie}}else return Promise.resolve({[Se.key]:{type:"error",error:$r(404,{pathname:Se.path})}})})),Te=await Me,$e=(await Ae).reduce((Se,Be)=>Object.assign(Se,Be),{});return{loaderResults:Te,fetcherResults:$e}}function Ye(){D=!0,I.forEach((F,G)=>{z.has(G)&&H.add(G),nn(G)})}function Ze(F,G,X={}){_.fetchers.set(F,G),fe({fetchers:new Map(_.fetchers)},{flushSync:(X&&X.flushSync)===!0})}function Qe(F,G,X,ce={}){let pe=La(_.matches,G);lt(F),fe({errors:{[pe.route.id]:X},fetchers:new Map(_.fetchers)},{flushSync:(ce&&ce.flushSync)===!0})}function Ne(F){return L.set(F,(L.get(F)||0)+1),W.has(F)&&W.delete(F),_.fetchers.get(F)||JL}function Le(F,G){nn(F,G?.reason),Ze(F,Yi(null))}function lt(F){let G=_.fetchers.get(F);z.has(F)&&!(G&&G.state==="loading"&&Q.has(F))&&nn(F),I.delete(F),Q.delete(F),V.delete(F),W.delete(F),H.delete(F),_.fetchers.delete(F)}function In(F){let G=(L.get(F)||0)-1;G<=0?(L.delete(F),W.add(F)):L.set(F,G),fe({fetchers:new Map(_.fetchers)})}function nn(F,G){let X=z.get(F);X&&(X.abort(G),z.delete(F))}function Ar(F){for(let G of F){let X=Ne(G),ce=Yi(X.data);_.fetchers.set(G,ce)}}function vr(){let F=[],G=!1;for(let X of V){let ce=_.fetchers.get(X);et(ce,`Expected fetcher: ${X}`),ce.state==="loading"&&(V.delete(X),F.push(X),G=!0)}return Ar(F),G}function nt(F){let G=[];for(let[X,ce]of Q)if(ce<F){let pe=_.fetchers.get(X);et(pe,`Expected fetcher: ${X}`),pe.state==="loading"&&(nn(X),Q.delete(X),G.push(X))}return Ar(G),G.length>0}function vt(F,G){let X=_.blockers.get(F)||_l;return te.get(F)!==G&&te.set(F,G),X}function Sn(F){_.blockers.delete(F),te.delete(F)}function Wt(F,G){let X=_.blockers.get(F)||_l;et(X.state==="unblocked"&&G.state==="blocked"||X.state==="blocked"&&G.state==="blocked"||X.state==="blocked"&&G.state==="proceeding"||X.state==="blocked"&&G.state==="unblocked"||X.state==="proceeding"&&G.state==="unblocked",`Invalid blocker state transition: ${X.state} -> ${G.state}`);let ce=new Map(_.blockers);ce.set(F,G),fe({blockers:ce})}function Kn({currentLocation:F,nextLocation:G,historyAction:X}){if(te.size===0)return;te.size>1&&sn(!1,"A router only supports one blocker at a time");let ce=Array.from(te.entries()),[pe,Me]=ce[ce.length-1],Ae=_.blockers.get(pe);if(!(Ae&&Ae.state==="proceeding")&&Me({currentLocation:F,nextLocation:G,historyAction:X}))return pe}function mn(F){let G=$r(404,{pathname:F}),X=l||s,{matches:ce,route:pe}=ku(X);return{notFoundMatches:ce,route:pe,error:G}}function We(F,G,X){if(y=F,x=G,g=X||null,!v&&_.navigation===Ih){v=!0;let ce=rn(_.location,_.matches);ce!=null&&fe({restoreScrollPosition:ce})}return()=>{y=null,x=null,g=null}}function xt(F,G){return g&&g(F,G.map(ce=>EL(ce,_.loaderData)))||F.key}function Rt(F,G){if(y&&x){let X=xt(F,G);y[X]=x()}}function rn(F,G){if(y){let X=xt(F,G),ce=y[X];if(typeof ce=="number")return ce}return null}function xr(F,G,X){if(e.patchRoutesOnNavigation)if(F){if(Object.keys(F[0].params).length>0)return{active:!0,matches:Wl(G,X,c,!0)}}else return{active:!0,matches:Wl(G,X,c,!0)||[]};return{active:!1,matches:null}}async function kt(F,G,X,ce){if(!e.patchRoutesOnNavigation)return{type:"success",matches:F};let pe=F;for(;;){let Me=l==null,Ae=l||s,Te=o;try{await e.patchRoutesOnNavigation({signal:X,path:G,matches:pe,fetcherKey:ce,patch:(Be,Ie)=>{X.aborted||Sw(Be,Ie,Ae,Te,a,!1)}})}catch(Be){return{type:"error",error:Be,partialMatches:pe}}finally{Me&&!X.aborted&&(s=[...s])}if(X.aborted)return{type:"aborted"};let $e=Da(Ae,G,c),Se=null;if($e){if(Object.keys($e[0].params).length===0)return{type:"success",matches:$e};if(Se=Wl(Ae,G,c,!0),!(Se&&pe.length<Se.length&&kn(pe,Se.slice(0,pe.length))))return{type:"success",matches:$e}}if(Se||(Se=Wl(Ae,G,c,!0)),!Se||kn(pe,Se))return{type:"success",matches:null};pe=Se}}function kn(F,G){return F.length===G.length&&F.every((X,ce)=>X.route.id===G[ce].route.id)}function hi(F){o={},l=fc(F,a,void 0,o)}function Dn(F,G,X=!1){let ce=l==null;Sw(F,G,l||s,o,a,X),ce&&(s=[...s],fe({}))}return j={get basename(){return c},get future(){return d},get state(){return _},get routes(){return s},get window(){return t},initialize:ee,subscribe:Y,enableScrollRestoration:We,navigate:je,fetch:de,revalidate:ye,createHref:F=>e.history.createHref(F),encodeLocation:F=>e.history.encodeLocation(F),getFetcher:Ne,resetFetcher:Le,deleteFetcher:In,dispose:ue,getBlocker:vt,deleteBlocker:Sn,patchRoutes:Dn,_internalFetchControllers:z,_internalSetRoutes:hi,_internalSetStateDoNotUseOrYouWillBreakYourApp(F){fe(F)}},e.unstable_instrumentations&&(j=UL(j,e.unstable_instrumentations.map(F=>F.router).filter(Boolean))),j}function n$(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function hy(e,t,n,r,i,a){let o,s;if(i){o=[];for(let c of t)if(o.push(c),c.route.id===i){s=c;break}}else o=t,s=t[t.length-1];let l=_p(r||".",tx(o),Gr(e.pathname,n)||e.pathname,a==="path");if(r==null&&(l.search=e.search,l.hash=e.hash),(r==null||r===""||r===".")&&s){let c=ax(l.search);if(s.route.index&&!c)l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index";else if(!s.route.index&&c){let f=new URLSearchParams(l.search),d=f.getAll("index");f.delete("index"),d.filter(m=>m).forEach(m=>f.append("index",m));let p=f.toString();l.search=p?`?${p}`:""}}return n!=="/"&&(l.pathname=$L({basename:n,pathname:l.pathname})),Mi(l)}function ww(e,t,n){if(!n||!n$(n))return{path:t};if(n.formMethod&&!w$(n.formMethod))return{path:t,error:$r(405,{method:n.formMethod})};let r=()=>({path:t,error:$r(400,{type:"invalid-body"})}),a=(n.formMethod||"get").toUpperCase(),o=wP(t);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!Fn(a))return r();let d=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((p,[m,y])=>`${p}${m}=${y}
|
|
1
|
+
import{r as h,R as xp,a as zD,g as ya,b as he,c as Uv,d as Xe,j as u,X as fr,S as Kr,A as qt,m as we,e as cw,K as FD,f as BD}from"./proxy-C8trGop7.js";import{i as ne,g as Kv,k as WD,a as Vv,u as HD,b as UD,d as on,B as qv,r as Ja,S as XC,f as KD,c as uw,e as Vd,h as Gv,n as vd,j as VD,l as qD,m as GD,o as YD,p as xd,q as Yv,s as bp,t as fy,M as XD,v as Xv,w as Zv,C as pr,x as ZC,y as QC,W as ZD,z as QD}from"./App-Bq4YFGdc.js";import{C as JD,L as eL,a as tL,S as nL,b as rL,P as iL,B as aL,M as oL,W as py,G as sL,T as lL,c as cL,d as uL,e as Wc,f as dL,g as fL,h as $o,i as yr,j as JC,k as eo,l as Vs,m as Qv,n as Jv,o as dw,D as wp,F as pL,A as eP,p as hL}from"./index-CpFdKgxj.js";var tP=e=>{throw TypeError(e)},mL=(e,t,n)=>t.has(e)||tP("Cannot "+n),Ah=(e,t,n)=>(mL(e,t,"read from private field"),n?n.call(e):t.get(e)),gL=(e,t,n)=>t.has(e)?tP("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),fw="popstate";function pw(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function yL(e={}){function t(r,i){let a=i.state?.masked,{pathname:o,search:s,hash:l}=a||r.location;return dc("",{pathname:o,search:s,hash:l},i.state&&i.state.usr||null,i.state&&i.state.key||"default",a?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function n(r,i){return typeof i=="string"?i:Mi(i)}return xL(t,n,null,e)}function et(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function sn(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function vL(){return Math.random().toString(36).substring(2,10)}function hw(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function dc(e,t,n=null,r,i){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Hi(t):t,state:n,key:t&&t.key||r||vL(),unstable_mask:i}}function Mi({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Hi(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function xL(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s="POP",l=null,c=f();c==null&&(c=0,o.replaceState({...o.state,idx:c},""));function f(){return(o.state||{idx:null}).idx}function d(){s="POP";let x=f(),v=x==null?null:x-c;c=x,l&&l({action:s,location:g.location,delta:v})}function p(x,v){s="PUSH";let b=pw(x)?x:dc(g.location,x,v);c=f()+1;let w=hw(b,c),k=g.createHref(b.unstable_mask||b);try{o.pushState(w,"",k)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;i.location.assign(k)}a&&l&&l({action:s,location:g.location,delta:1})}function m(x,v){s="REPLACE";let b=pw(x)?x:dc(g.location,x,v);c=f();let w=hw(b,c),k=g.createHref(b.unstable_mask||b);o.replaceState(w,"",k),a&&l&&l({action:s,location:g.location,delta:0})}function y(x){return nP(x)}let g={get action(){return s},get location(){return e(i,o)},listen(x){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(fw,d),l=x,()=>{i.removeEventListener(fw,d),l=null}},createHref(x){return t(i,x)},createURL:y,encodeLocation(x){let v=y(x);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:p,replace:m,go(x){return o.go(x)}};return g}function nP(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),et(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:Mi(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}var Bl,mw=class{constructor(e){if(gL(this,Bl,new Map),e)for(let[t,n]of e)this.set(t,n)}get(e){if(Ah(this,Bl).has(e))return Ah(this,Bl).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){Ah(this,Bl).set(e,t)}};Bl=new WeakMap;var bL=new Set(["lazy","caseSensitive","path","id","index","children"]);function wL(e){return bL.has(e)}var _L=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function SL(e){return _L.has(e)}function kL(e){return e.index===!0}function fc(e,t,n=[],r={},i=!1){return e.map((a,o)=>{let s=[...n,String(o)],l=typeof a.id=="string"?a.id:s.join("-");if(et(a.index!==!0||!a.children,"Cannot specify children on an index route"),et(i||!r[l],`Found a route id collision on id "${l}". Route id's must be globally unique within Data Router usages`),kL(a)){let c={...a,id:l};return r[l]=gw(c,t(c)),c}else{let c={...a,id:l,children:void 0};return r[l]=gw(c,t(c)),a.children&&(c.children=fc(a.children,t,s,r,i)),c}})}function gw(e,t){return Object.assign(e,{...t,...typeof t.lazy=="object"&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function Da(e,t,n="/"){return Wl(e,t,n,!1)}function Wl(e,t,n,r){let i=typeof t=="string"?Hi(t):t,a=Gr(i.pathname||"/",n);if(a==null)return null;let o=rP(e);jL(o);let s=null;for(let l=0;s==null&&l<o.length;++l){let c=LL(a);s=IL(o[l],c,r)}return s}function EL(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function rP(e,t=[],n=[],r="",i=!1){let a=(o,s,l=i,c)=>{let f={relativePath:c===void 0?o.path||"":c,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};if(f.relativePath.startsWith("/")){if(!f.relativePath.startsWith(r)&&l)return;et(f.relativePath.startsWith(r),`Absolute route path "${f.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),f.relativePath=f.relativePath.slice(r.length)}let d=Vr([r,f.relativePath]),p=n.concat(f);o.children&&o.children.length>0&&(et(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${d}".`),rP(o.children,t,p,d,l)),!(o.path==null&&!o.index)&&t.push({path:d,score:AL(d,o.index),routesMeta:p})};return e.forEach((o,s)=>{if(o.path===""||!o.path?.includes("?"))a(o,s);else for(let l of iP(o.path))a(o,s,!0,l)}),t}function iP(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),a=n.replace(/\?$/,"");if(r.length===0)return i?[a,""]:[a];let o=iP(r.join("/")),s=[];return s.push(...o.map(l=>l===""?a:[a,l].join("/"))),i&&s.push(...o),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function jL(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:ML(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var CL=/^:[\w-]+$/,PL=3,NL=2,TL=1,OL=10,RL=-2,yw=e=>e==="*";function AL(e,t){let n=e.split("/"),r=n.length;return n.some(yw)&&(r+=RL),t&&(r+=NL),n.filter(i=>!yw(i)).reduce((i,a)=>i+(CL.test(a)?PL:a===""?TL:OL),r)}function ML(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function IL(e,t,n=!1){let{routesMeta:r}=e,i={},a="/",o=[];for(let s=0;s<r.length;++s){let l=r[s],c=s===r.length-1,f=a==="/"?t:t.slice(a.length)||"/",d=qd({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},f),p=l.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=qd({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},f)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:Vr([a,d.pathname]),pathnameBase:FL(Vr([a,d.pathnameBase])),route:p}),d.pathnameBase!=="/"&&(a=Vr([a,d.pathnameBase]))}return o}function qd(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=DL(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,"$1"),s=i.slice(1);return{params:r.reduce((c,{paramName:f,isOptional:d},p)=>{if(f==="*"){let y=s[p]||"";o=a.slice(0,a.length-y.length).replace(/(.)\/+$/,"$1")}const m=s[p];return d&&!m?c[f]=void 0:c[f]=(m||"").replace(/%2F/g,"/"),c},{}),pathname:a,pathnameBase:o,pattern:e}}function DL(e,t=!1,n=!0){sn(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,s,l,c,f)=>{if(r.push({paramName:s,isOptional:l!=null}),l){let d=f.charAt(c+o.length);return d&&d!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function LL(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return sn(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Gr(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function $L({basename:e,pathname:t}){return t==="/"?e:Vr([e,t])}var aP=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ex=e=>aP.test(e);function zL(e,t="/"){let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Hi(e):e,a;return n?(n=nx(n),n.startsWith("/")?a=vw(n.substring(1),"/"):a=vw(n,t)):a=t,{pathname:a,search:BL(r),hash:WL(i)}}function vw(e,t){let n=Gd(t).split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Mh(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function oP(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function tx(e){let t=oP(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function _p(e,t,n,r=!1){let i;typeof e=="string"?i=Hi(e):(i={...e},et(!i.pathname||!i.pathname.includes("?"),Mh("?","pathname","search",i)),et(!i.pathname||!i.pathname.includes("#"),Mh("#","pathname","hash",i)),et(!i.search||!i.search.includes("#"),Mh("#","search","hash",i)));let a=e===""||i.pathname==="",o=a?"/":i.pathname,s;if(o==null)s=n;else{let d=t.length-1;if(!r&&o.startsWith("..")){let p=o.split("/");for(;p[0]==="..";)p.shift(),d-=1;i.pathname=p.join("/")}s=d>=0?t[d]:"/"}let l=zL(i,s),c=o&&o!=="/"&&o.endsWith("/"),f=(a||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||f)&&(l.pathname+="/"),l}var nx=e=>e.replace(/\/\/+/g,"/"),Vr=e=>nx(e.join("/")),Gd=e=>e.replace(/\/+$/,""),FL=e=>Gd(e).replace(/^\/*/,"/"),BL=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,WL=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,Hc=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function pc(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function Uc(e){let t=e.map(n=>n.route.path).filter(Boolean);return Vr(t)||"/"}var sP=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function lP(e,t){let n=e;if(typeof n!="string"||!aP.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(sP)try{let a=new URL(window.location.href),o=n.startsWith("//")?new URL(a.protocol+n):new URL(n),s=Gr(o.pathname,t);o.origin===a.origin&&s!=null?n=s+o.search+o.hash:i=!0}catch{sn(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}var Wa=Symbol("Uninstrumented");function HL(e,t){let n={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(i=>i({id:t.id,index:t.index,path:t.path,instrument(a){let o=Object.keys(n);for(let s of o)a[s]&&n[s].push(a[s])}}));let r={};if(typeof t.lazy=="function"&&n.lazy.length>0){let i=Ps(n.lazy,t.lazy,()=>{});i&&(r.lazy=i)}if(typeof t.lazy=="object"){let i=t.lazy;["middleware","loader","action"].forEach(a=>{let o=i[a],s=n[`lazy.${a}`];if(typeof o=="function"&&s.length>0){let l=Ps(s,o,()=>{});l&&(r.lazy=Object.assign(r.lazy||{},{[a]:l}))}})}return["loader","action"].forEach(i=>{let a=t[i];if(typeof a=="function"&&n[i].length>0){let o=a[Wa]??a,s=Ps(n[i],o,(...l)=>xw(l[0]));s&&(i==="loader"&&o.hydrate===!0&&(s.hydrate=!0),s[Wa]=o,r[i]=s)}}),t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map(i=>{let a=i[Wa]??i,o=Ps(n.middleware,a,(...s)=>xw(s[0]));return o?(o[Wa]=a,o):i})),r}function UL(e,t){let n={navigate:[],fetch:[]};if(t.forEach(r=>r({instrument(i){let a=Object.keys(i);for(let o of a)i[o]&&n[o].push(i[o])}})),n.navigate.length>0){let r=e.navigate[Wa]??e.navigate,i=Ps(n.navigate,r,(...a)=>{let[o,s]=a;return{to:typeof o=="number"||typeof o=="string"?o:o?Mi(o):".",...bw(e,s??{})}});i&&(i[Wa]=r,e.navigate=i)}if(n.fetch.length>0){let r=e.fetch[Wa]??e.fetch,i=Ps(n.fetch,r,(...a)=>{let[o,,s,l]=a;return{href:s??".",fetcherKey:o,...bw(e,l??{})}});i&&(i[Wa]=r,e.fetch=i)}return e}function Ps(e,t,n){return e.length===0?null:async(...r)=>{let i=await cP(e,n(...r),()=>t(...r),e.length-1);if(i.type==="error")throw i.value;return i.value}}async function cP(e,t,n,r){let i=e[r],a;if(i){let o,s=async()=>(o?console.error("You cannot call instrumented handlers more than once"):o=cP(e,t,n,r-1),a=await o,et(a,"Expected a result"),a.type==="error"&&a.value instanceof Error?{status:"error",error:a.value}:{status:"success",error:void 0});try{await i(s,t)}catch(l){console.error("An instrumentation function threw an error:",l)}o||await s(),await o}else try{a={type:"success",value:await n()}}catch(o){a={type:"error",value:o}}return a||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function xw(e){let{request:t,context:n,params:r,unstable_pattern:i}=e;return{request:KL(t),params:{...r},unstable_pattern:i,context:VL(n)}}function bw(e,t){return{currentUrl:Mi(e.state.location),..."formMethod"in t?{formMethod:t.formMethod}:{},..."formEncType"in t?{formEncType:t.formEncType}:{},..."formData"in t?{formData:t.formData}:{},..."body"in t?{body:t.body}:{}}}function KL(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function VL(e){if(GL(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var qL=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function GL(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===qL}var uP=["POST","PUT","PATCH","DELETE"],YL=new Set(uP),XL=["GET",...uP],ZL=new Set(XL),dP=new Set([301,302,303,307,308]),QL=new Set([307,308]),Ih={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},JL={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},_l={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},e$=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),fP="remix-router-transitions",pP=Symbol("ResetLoaderData");function t$(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u";et(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let r=e.hydrationRouteProperties||[],i=e.mapRouteProperties||e$,a=i;if(e.unstable_instrumentations){let F=e.unstable_instrumentations;a=G=>({...i(G),...HL(F.map(X=>X.route).filter(Boolean),G)})}let o={},s=fc(e.routes,a,void 0,o),l,c=e.basename||"/";c.startsWith("/")||(c=`/${c}`);let f=e.dataStrategy||o$,d={unstable_passThroughRequests:!1,...e.future},p=null,m=new Set,y=null,g=null,x=null,v=e.hydrationData!=null,b=Da(s,e.history.location,c),w=!1,k=null,S,E;if(b==null&&!e.patchRoutesOnNavigation){let F=$r(404,{pathname:e.history.location.pathname}),{matches:G,route:X}=ku(s);S=!0,E=!S,b=G,k={[X.id]:F}}else if(b&&!e.hydrationData&&xr(b,s,e.history.location.pathname).active&&(b=null),b)if(b.some(F=>F.route.lazy))S=!1,E=!S;else if(!b.some(F=>rx(F.route)))S=!0,E=!S;else{let F=e.hydrationData?e.hydrationData.loaderData:null,G=e.hydrationData?e.hydrationData.errors:null,X=b;if(G){let ce=b.findIndex(pe=>G[pe.route.id]!==void 0);X=X.slice(0,ce+1)}E=!1,S=!0,X.forEach(ce=>{let pe=hP(ce.route,F,G);E=E||pe.renderFallback,S=S&&!pe.shouldLoad})}else{S=!1,E=!S,b=[];let F=xr(null,s,e.history.location.pathname);F.active&&F.matches&&(w=!0,b=F.matches)}let j,_={historyAction:e.history.action,location:e.history.location,matches:b,initialized:S,renderFallback:E,navigation:Ih,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||k,fetchers:new Map,blockers:new Map},P="POP",C=null,T=!1,O,M=!1,R=new Map,N=null,A=!1,D=!1,H=new Set,z=new Map,$=0,re=-1,Q=new Map,V=new Set,I=new Map,L=new Map,W=new Set,te=new Map,U,q=null;function ee(){if(p=e.history.listen(({action:F,location:G,delta:X})=>{if(U){U(),U=void 0;return}sn(te.size===0||X!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let ce=Kn({currentLocation:_.location,nextLocation:G,historyAction:F});if(ce&&X!=null){let pe=new Promise(Me=>{U=Me});e.history.go(X*-1),Wt(ce,{state:"blocked",location:G,proceed(){Wt(ce,{state:"proceeding",proceed:void 0,reset:void 0,location:G}),pe.then(()=>e.history.go(X))},reset(){let Me=new Map(_.blockers);Me.set(ce,_l),fe({blockers:Me})}}),C?.resolve(),C=null;return}return ve(F,G)}),n){k$(t,R);let F=()=>E$(t,R);t.addEventListener("pagehide",F),N=()=>t.removeEventListener("pagehide",F)}return _.initialized||ve("POP",_.location,{initialHydration:!0}),j}function ue(){p&&p(),N&&N(),m.clear(),O&&O.abort(),_.fetchers.forEach((F,G)=>lt(G)),_.blockers.forEach((F,G)=>Sn(G))}function Y(F){return m.add(F),()=>m.delete(F)}function fe(F,G={}){F.matches&&(F.matches=F.matches.map(pe=>{let Me=o[pe.route.id],Ae=pe.route;return Ae.element!==Me.element||Ae.errorElement!==Me.errorElement||Ae.hydrateFallbackElement!==Me.hydrateFallbackElement?{...pe,route:Me}:pe})),_={..._,...F};let X=[],ce=[];_.fetchers.forEach((pe,Me)=>{pe.state==="idle"&&(W.has(Me)?X.push(Me):ce.push(Me))}),W.forEach(pe=>{!_.fetchers.has(pe)&&!z.has(pe)&&X.push(pe)}),[...m].forEach(pe=>pe(_,{deletedFetchers:X,newErrors:F.errors??null,viewTransitionOpts:G.viewTransitionOpts,flushSync:G.flushSync===!0})),X.forEach(pe=>lt(pe)),ce.forEach(pe=>_.fetchers.delete(pe))}function me(F,G,{flushSync:X}={}){let ce=_.actionData!=null&&_.navigation.formMethod!=null&&Fn(_.navigation.formMethod)&&_.navigation.state==="loading"&&F.state?._isRedirect!==!0,pe;G.actionData?Object.keys(G.actionData).length>0?pe=G.actionData:pe=null:ce?pe=_.actionData:pe=null;let Me=G.loaderData?Ow(_.loaderData,G.loaderData,G.matches||[],G.errors):_.loaderData,Ae=_.blockers;Ae.size>0&&(Ae=new Map(Ae),Ae.forEach((Be,Ie)=>Ae.set(Ie,_l)));let Te=A?!1:rn(F,G.matches||_.matches),$e=T===!0||_.navigation.formMethod!=null&&Fn(_.navigation.formMethod)&&F.state?._isRedirect!==!0;l&&(s=l,l=void 0),A||P==="POP"||(P==="PUSH"?e.history.push(F,F.state):P==="REPLACE"&&e.history.replace(F,F.state));let Se;if(P==="POP"){let Be=R.get(_.location.pathname);Be&&Be.has(F.pathname)?Se={currentLocation:_.location,nextLocation:F}:R.has(F.pathname)&&(Se={currentLocation:F,nextLocation:_.location})}else if(M){let Be=R.get(_.location.pathname);Be?Be.add(F.pathname):(Be=new Set([F.pathname]),R.set(_.location.pathname,Be)),Se={currentLocation:_.location,nextLocation:F}}fe({...G,actionData:pe,loaderData:Me,historyAction:P,location:F,initialized:!0,renderFallback:!1,navigation:Ih,revalidation:"idle",restoreScrollPosition:Te,preventScrollReset:$e,blockers:Ae},{viewTransitionOpts:Se,flushSync:X===!0}),P="POP",T=!1,M=!1,A=!1,D=!1,C?.resolve(),C=null,q?.resolve(),q=null}async function je(F,G){if(C?.resolve(),C=null,typeof F=="number"){C||(C=Iw());let At=C.promise;return e.history.go(F),At}let X=hy(_.location,_.matches,c,F,G?.fromRouteId,G?.relative),{path:ce,submission:pe,error:Me}=ww(!1,X,G),Ae;G?.unstable_mask&&(Ae={pathname:"",search:"",hash:"",...typeof G.unstable_mask=="string"?Hi(G.unstable_mask):{..._.location.unstable_mask,...G.unstable_mask}});let Te=_.location,$e=dc(Te,ce,G&&G.state,void 0,Ae);$e={...$e,...e.history.encodeLocation($e)};let Se=G&&G.replace!=null?G.replace:void 0,Be="PUSH";Se===!0?Be="REPLACE":Se===!1||pe!=null&&Fn(pe.formMethod)&&pe.formAction===_.location.pathname+_.location.search&&(Be="REPLACE");let Ie=G&&"preventScrollReset"in G?G.preventScrollReset===!0:void 0,gt=(G&&G.flushSync)===!0,ft=Kn({currentLocation:Te,nextLocation:$e,historyAction:Be});if(ft){Wt(ft,{state:"blocked",location:$e,proceed(){Wt(ft,{state:"proceeding",proceed:void 0,reset:void 0,location:$e}),je(F,G)},reset(){let At=new Map(_.blockers);At.set(ft,_l),fe({blockers:At})}});return}await ve(Be,$e,{submission:pe,pendingError:Me,preventScrollReset:Ie,replace:G&&G.replace,enableViewTransition:G&&G.viewTransition,flushSync:gt,callSiteDefaultShouldRevalidate:G&&G.unstable_defaultShouldRevalidate})}function ye(){q||(q=Iw()),Ye(),fe({revalidation:"loading"});let F=q.promise;return _.navigation.state==="submitting"?F:_.navigation.state==="idle"?(ve(_.historyAction,_.location,{startUninterruptedRevalidation:!0}),F):(ve(P||_.historyAction,_.navigation.location,{overrideNavigation:_.navigation,enableViewTransition:M===!0}),F)}async function ve(F,G,X){O&&O.abort(),O=null,P=F,A=(X&&X.startUninterruptedRevalidation)===!0,Rt(_.location,_.matches),T=(X&&X.preventScrollReset)===!0,M=(X&&X.enableViewTransition)===!0;let ce=l||s,pe=X&&X.overrideNavigation,Me=X?.initialHydration&&_.matches&&_.matches.length>0&&!w?_.matches:Da(ce,G,c),Ae=(X&&X.flushSync)===!0;if(Me&&_.initialized&&!D&&h$(_.location,G)&&!(X&&X.submission&&Fn(X.submission.formMethod))){me(G,{matches:Me},{flushSync:Ae});return}let Te=xr(Me,ce,G.pathname);if(Te.active&&Te.matches&&(Me=Te.matches),!Me){let{error:Ht,notFoundMatches:En,route:ht}=mn(G.pathname);me(G,{matches:En,loaderData:{},errors:{[ht.id]:Ht}},{flushSync:Ae});return}O=new AbortController;let $e=Es(e.history,G,O.signal,X&&X.submission),Se=e.getContext?await e.getContext():new mw,Be;if(X&&X.pendingError)Be=[La(Me).route.id,{type:"error",error:X.pendingError}];else if(X&&X.submission&&Fn(X.submission.formMethod)){let Ht=await Oe($e,G,X.submission,Me,Se,Te.active,X&&X.initialHydration===!0,{replace:X.replace,flushSync:Ae});if(Ht.shortCircuited)return;if(Ht.pendingActionResult){let[En,ht]=Ht.pendingActionResult;if(wr(ht)&&pc(ht.error)&&ht.error.status===404){O=null,me(G,{matches:Ht.matches,loaderData:{},errors:{[En]:ht.error}});return}}Me=Ht.matches||Me,Be=Ht.pendingActionResult,pe=Dh(G,X.submission),Ae=!1,Te.active=!1,$e=Es(e.history,$e.url,$e.signal)}let{shortCircuited:Ie,matches:gt,loaderData:ft,errors:At}=await ge($e,G,Me,Se,Te.active,pe,X&&X.submission,X&&X.fetcherSubmission,X&&X.replace,X&&X.initialHydration===!0,Ae,Be,X&&X.callSiteDefaultShouldRevalidate);Ie||(O=null,me(G,{matches:gt||Me,...Rw(Be),loaderData:ft,errors:At}))}async function Oe(F,G,X,ce,pe,Me,Ae,Te={}){Ye();let $e=_$(G,X);if(fe({navigation:$e},{flushSync:Te.flushSync===!0}),Me){let Ie=await kt(ce,G.pathname,F.signal);if(Ie.type==="aborted")return{shortCircuited:!0};if(Ie.type==="error"){if(Ie.partialMatches.length===0){let{matches:ft,route:At}=ku(s);return{matches:ft,pendingActionResult:[At.id,{type:"error",error:Ie.error}]}}let gt=La(Ie.partialMatches).route.id;return{matches:Ie.partialMatches,pendingActionResult:[gt,{type:"error",error:Ie.error}]}}else if(Ie.matches)ce=Ie.matches;else{let{notFoundMatches:gt,error:ft,route:At}=mn(G.pathname);return{matches:gt,pendingActionResult:[At.id,{type:"error",error:ft}]}}}let Se,Be=bd(ce,G);if(!Be.route.action&&!Be.route.lazy)Se={type:"error",error:$r(405,{method:F.method,pathname:G.pathname,routeId:Be.route.id})};else{let Ie=As(a,o,F,G,ce,Be,Ae?[]:r,pe),gt=await Pe(F,G,Ie,pe,null);if(Se=gt[Be.route.id],!Se){for(let ft of ce)if(gt[ft.route.id]){Se=gt[ft.route.id];break}}if(F.signal.aborted)return{shortCircuited:!0}}if(No(Se)){let Ie;return Te&&Te.replace!=null?Ie=Te.replace:Ie=Pw(Se.response.headers.get("Location"),new URL(F.url),c,e.history)===_.location.pathname+_.location.search,await be(F,Se,!0,{submission:X,replace:Ie}),{shortCircuited:!0}}if(wr(Se)){let Ie=La(ce,Be.route.id);return(Te&&Te.replace)!==!0&&(P="PUSH"),{matches:ce,pendingActionResult:[Ie.route.id,Se,Be.route.id]}}return{matches:ce,pendingActionResult:[Be.route.id,Se]}}async function ge(F,G,X,ce,pe,Me,Ae,Te,$e,Se,Be,Ie,gt){let ft=Me||Dh(G,Ae),At=Ae||Te||Mw(ft),Ht=!A&&!Se;if(pe){if(Ht){let Ln=Re(Ie);fe({navigation:ft,...Ln!==void 0?{actionData:Ln}:{}},{flushSync:Be})}let ct=await kt(X,G.pathname,F.signal);if(ct.type==="aborted")return{shortCircuited:!0};if(ct.type==="error"){if(ct.partialMatches.length===0){let{matches:ps,route:ho}=ku(s);return{matches:ps,loaderData:{},errors:{[ho.id]:ct.error}}}let Ln=La(ct.partialMatches).route.id;return{matches:ct.partialMatches,loaderData:{},errors:{[Ln]:ct.error}}}else if(ct.matches)X=ct.matches;else{let{error:Ln,notFoundMatches:ps,route:ho}=mn(G.pathname);return{matches:ps,loaderData:{},errors:{[ho.id]:Ln}}}}let En=l||s,{dsMatches:ht,revalidatingFetchers:br}=_w(F,ce,a,o,e.history,_,X,At,G,Se?[]:r,Se===!0,D,H,W,I,V,En,c,e.patchRoutesOnNavigation!=null,Ie,gt);if(re=++$,!e.dataStrategy&&!ht.some(ct=>ct.shouldLoad)&&!ht.some(ct=>ct.route.middleware&&ct.route.middleware.length>0)&&br.length===0){let ct=vr();return me(G,{matches:X,loaderData:{},errors:Ie&&wr(Ie[1])?{[Ie[0]]:Ie[1].error}:null,...Rw(Ie),...ct?{fetchers:new Map(_.fetchers)}:{}},{flushSync:Be}),{shortCircuited:!0}}if(Ht){let ct={};if(!pe){ct.navigation=ft;let Ln=Re(Ie);Ln!==void 0&&(ct.actionData=Ln)}br.length>0&&(ct.fetchers=oe(br)),fe(ct,{flushSync:Be})}br.forEach(ct=>{nn(ct.key),ct.controller&&z.set(ct.key,ct.controller)});let fo=()=>br.forEach(ct=>nn(ct.key));O&&O.signal.addEventListener("abort",fo);let{loaderResults:bl,fetcherResults:Pa}=await ae(ht,br,F,G,ce);if(F.signal.aborted)return{shortCircuited:!0};O&&O.signal.removeEventListener("abort",fo),br.forEach(ct=>z.delete(ct.key));let mi=Eu(bl);if(mi)return await be(F,mi.result,!0,{replace:$e}),{shortCircuited:!0};if(mi=Eu(Pa),mi)return V.add(mi.key),await be(F,mi.result,!0,{replace:$e}),{shortCircuited:!0};let{loaderData:Rh,errors:wl}=Tw(_,X,bl,Ie,br,Pa);Se&&_.errors&&(wl={..._.errors,...wl});let po=vr(),wu=nt(re),_u=po||wu||br.length>0;return{matches:X,loaderData:Rh,errors:wl,..._u?{fetchers:new Map(_.fetchers)}:{}}}function Re(F){if(F&&!wr(F[1]))return{[F[0]]:F[1].data};if(_.actionData)return Object.keys(_.actionData).length===0?null:_.actionData}function oe(F){return F.forEach(G=>{let X=_.fetchers.get(G.key),ce=Sl(void 0,X?X.data:void 0);_.fetchers.set(G.key,ce)}),new Map(_.fetchers)}async function de(F,G,X,ce){nn(F);let pe=(ce&&ce.flushSync)===!0,Me=l||s,Ae=hy(_.location,_.matches,c,X,G,ce?.relative),Te=Da(Me,Ae,c),$e=xr(Te,Me,Ae);if($e.active&&$e.matches&&(Te=$e.matches),!Te){Qe(F,G,$r(404,{pathname:Ae}),{flushSync:pe});return}let{path:Se,submission:Be,error:Ie}=ww(!0,Ae,ce);if(Ie){Qe(F,G,Ie,{flushSync:pe});return}let gt=e.getContext?await e.getContext():new mw,ft=(ce&&ce.preventScrollReset)===!0;if(Be&&Fn(Be.formMethod)){await K(F,G,Se,Te,gt,$e.active,pe,ft,Be,ce&&ce.unstable_defaultShouldRevalidate);return}I.set(F,{routeId:G,path:Se}),await se(F,G,Se,Te,gt,$e.active,pe,ft,Be)}async function K(F,G,X,ce,pe,Me,Ae,Te,$e,Se){Ye(),I.delete(F);let Be=_.fetchers.get(F);Ze(F,S$($e,Be),{flushSync:Ae});let Ie=new AbortController,gt=Es(e.history,X,Ie.signal,$e);if(Me){let Lt=await kt(ce,new URL(gt.url).pathname,gt.signal,F);if(Lt.type==="aborted")return;if(Lt.type==="error"){Qe(F,G,Lt.error,{flushSync:Ae});return}else if(Lt.matches)ce=Lt.matches;else{Qe(F,G,$r(404,{pathname:X}),{flushSync:Ae});return}}let ft=bd(ce,X);if(!ft.route.action&&!ft.route.lazy){let Lt=$r(405,{method:$e.formMethod,pathname:X,routeId:G});Qe(F,G,Lt,{flushSync:Ae});return}z.set(F,Ie);let At=$,Ht=As(a,o,gt,X,ce,ft,r,pe),En=await Pe(gt,X,Ht,pe,F),ht=En[ft.route.id];if(!ht){for(let Lt of Ht)if(En[Lt.route.id]){ht=En[Lt.route.id];break}}if(gt.signal.aborted){z.get(F)===Ie&&z.delete(F);return}if(W.has(F)){if(No(ht)||wr(ht)){Ze(F,Yi(void 0));return}}else{if(No(ht))if(z.delete(F),re>At){Ze(F,Yi(void 0));return}else return V.add(F),Ze(F,Sl($e)),be(gt,ht,!1,{fetcherSubmission:$e,preventScrollReset:Te});if(wr(ht)){Qe(F,G,ht.error);return}}let br=_.navigation.location||_.location,fo=Es(e.history,br,Ie.signal),bl=l||s,Pa=_.navigation.state!=="idle"?Da(bl,_.navigation.location,c):_.matches;et(Pa,"Didn't find any matches after fetcher action");let mi=++$;Q.set(F,mi);let Rh=Sl($e,ht.data);_.fetchers.set(F,Rh);let{dsMatches:wl,revalidatingFetchers:po}=_w(fo,pe,a,o,e.history,_,Pa,$e,br,r,!1,D,H,W,I,V,bl,c,e.patchRoutesOnNavigation!=null,[ft.route.id,ht],Se);po.filter(Lt=>Lt.key!==F).forEach(Lt=>{let Su=Lt.key,lw=_.fetchers.get(Su),$D=Sl(void 0,lw?lw.data:void 0);_.fetchers.set(Su,$D),nn(Su),Lt.controller&&z.set(Su,Lt.controller)}),fe({fetchers:new Map(_.fetchers)});let wu=()=>po.forEach(Lt=>nn(Lt.key));Ie.signal.addEventListener("abort",wu);let{loaderResults:_u,fetcherResults:ct}=await ae(wl,po,fo,br,pe);if(Ie.signal.aborted)return;if(Ie.signal.removeEventListener("abort",wu),Q.delete(F),z.delete(F),po.forEach(Lt=>z.delete(Lt.key)),_.fetchers.has(F)){let Lt=Yi(ht.data);_.fetchers.set(F,Lt)}let Ln=Eu(_u);if(Ln)return be(fo,Ln.result,!1,{preventScrollReset:Te});if(Ln=Eu(ct),Ln)return V.add(Ln.key),be(fo,Ln.result,!1,{preventScrollReset:Te});let{loaderData:ps,errors:ho}=Tw(_,Pa,_u,void 0,po,ct);nt(mi),_.navigation.state==="loading"&&mi>re?(et(P,"Expected pending action"),O&&O.abort(),me(_.navigation.location,{matches:Pa,loaderData:ps,errors:ho,fetchers:new Map(_.fetchers)})):(fe({errors:ho,loaderData:Ow(_.loaderData,ps,Pa,ho),fetchers:new Map(_.fetchers)}),D=!1)}async function se(F,G,X,ce,pe,Me,Ae,Te,$e){let Se=_.fetchers.get(F);Ze(F,Sl($e,Se?Se.data:void 0),{flushSync:Ae});let Be=new AbortController,Ie=Es(e.history,X,Be.signal);if(Me){let ht=await kt(ce,new URL(Ie.url).pathname,Ie.signal,F);if(ht.type==="aborted")return;if(ht.type==="error"){Qe(F,G,ht.error,{flushSync:Ae});return}else if(ht.matches)ce=ht.matches;else{Qe(F,G,$r(404,{pathname:X}),{flushSync:Ae});return}}let gt=bd(ce,X);z.set(F,Be);let ft=$,At=As(a,o,Ie,X,ce,gt,r,pe),Ht=await Pe(Ie,X,At,pe,F),En=Ht[gt.route.id];if(!En){for(let ht of ce)if(Ht[ht.route.id]){En=Ht[ht.route.id];break}}if(z.get(F)===Be&&z.delete(F),!Ie.signal.aborted){if(W.has(F)){Ze(F,Yi(void 0));return}if(No(En))if(re>ft){Ze(F,Yi(void 0));return}else{V.add(F),await be(Ie,En,!1,{preventScrollReset:Te});return}if(wr(En)){Qe(F,G,En.error);return}Ze(F,Yi(En.data))}}async function be(F,G,X,{submission:ce,fetcherSubmission:pe,preventScrollReset:Me,replace:Ae}={}){X||(C?.resolve(),C=null),G.response.headers.has("X-Remix-Revalidate")&&(D=!0);let Te=G.response.headers.get("Location");et(Te,"Expected a Location header on the redirect Response"),Te=Pw(Te,new URL(F.url),c,e.history);let $e=dc(_.location,Te,{_isRedirect:!0});if(n){let At=!1;if(G.response.headers.has("X-Remix-Reload-Document"))At=!0;else if(ex(Te)){const Ht=nP(Te,!0);At=Ht.origin!==t.location.origin||Gr(Ht.pathname,c)==null}if(At){Ae?t.location.replace(Te):t.location.assign(Te);return}}O=null;let Se=Ae===!0||G.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Be,formAction:Ie,formEncType:gt}=_.navigation;!ce&&!pe&&Be&&Ie&>&&(ce=Mw(_.navigation));let ft=ce||pe;if(QL.has(G.response.status)&&ft&&Fn(ft.formMethod))await ve(Se,$e,{submission:{...ft,formAction:Te},preventScrollReset:Me||T,enableViewTransition:X?M:void 0});else{let At=Dh($e,ce);await ve(Se,$e,{overrideNavigation:At,fetcherSubmission:pe,preventScrollReset:Me||T,enableViewTransition:X?M:void 0})}}async function Pe(F,G,X,ce,pe){let Me,Ae={};try{Me=await l$(f,F,G,X,pe,ce,!1)}catch(Te){return X.filter($e=>$e.shouldLoad).forEach($e=>{Ae[$e.route.id]={type:"error",error:Te}}),Ae}if(F.signal.aborted)return Ae;if(!Fn(F.method))for(let Te of X){if(Me[Te.route.id]?.type==="error")break;!Me.hasOwnProperty(Te.route.id)&&!_.loaderData.hasOwnProperty(Te.route.id)&&(!_.errors||!_.errors.hasOwnProperty(Te.route.id))&&Te.shouldCallHandler()&&(Me[Te.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${Te.route.id}`)})}for(let[Te,$e]of Object.entries(Me))if(v$($e)){let Se=$e.result;Ae[Te]={type:"redirect",response:f$(Se,F,Te,X,c)}}else Ae[Te]=await d$($e);return Ae}async function ae(F,G,X,ce,pe){let Me=Pe(X,ce,F,pe,null),Ae=Promise.all(G.map(async Se=>{if(Se.matches&&Se.match&&Se.request&&Se.controller){let Ie=(await Pe(Se.request,Se.path,Se.matches,pe,Se.key))[Se.match.route.id];return{[Se.key]:Ie}}else return Promise.resolve({[Se.key]:{type:"error",error:$r(404,{pathname:Se.path})}})})),Te=await Me,$e=(await Ae).reduce((Se,Be)=>Object.assign(Se,Be),{});return{loaderResults:Te,fetcherResults:$e}}function Ye(){D=!0,I.forEach((F,G)=>{z.has(G)&&H.add(G),nn(G)})}function Ze(F,G,X={}){_.fetchers.set(F,G),fe({fetchers:new Map(_.fetchers)},{flushSync:(X&&X.flushSync)===!0})}function Qe(F,G,X,ce={}){let pe=La(_.matches,G);lt(F),fe({errors:{[pe.route.id]:X},fetchers:new Map(_.fetchers)},{flushSync:(ce&&ce.flushSync)===!0})}function Ne(F){return L.set(F,(L.get(F)||0)+1),W.has(F)&&W.delete(F),_.fetchers.get(F)||JL}function Le(F,G){nn(F,G?.reason),Ze(F,Yi(null))}function lt(F){let G=_.fetchers.get(F);z.has(F)&&!(G&&G.state==="loading"&&Q.has(F))&&nn(F),I.delete(F),Q.delete(F),V.delete(F),W.delete(F),H.delete(F),_.fetchers.delete(F)}function In(F){let G=(L.get(F)||0)-1;G<=0?(L.delete(F),W.add(F)):L.set(F,G),fe({fetchers:new Map(_.fetchers)})}function nn(F,G){let X=z.get(F);X&&(X.abort(G),z.delete(F))}function Ar(F){for(let G of F){let X=Ne(G),ce=Yi(X.data);_.fetchers.set(G,ce)}}function vr(){let F=[],G=!1;for(let X of V){let ce=_.fetchers.get(X);et(ce,`Expected fetcher: ${X}`),ce.state==="loading"&&(V.delete(X),F.push(X),G=!0)}return Ar(F),G}function nt(F){let G=[];for(let[X,ce]of Q)if(ce<F){let pe=_.fetchers.get(X);et(pe,`Expected fetcher: ${X}`),pe.state==="loading"&&(nn(X),Q.delete(X),G.push(X))}return Ar(G),G.length>0}function vt(F,G){let X=_.blockers.get(F)||_l;return te.get(F)!==G&&te.set(F,G),X}function Sn(F){_.blockers.delete(F),te.delete(F)}function Wt(F,G){let X=_.blockers.get(F)||_l;et(X.state==="unblocked"&&G.state==="blocked"||X.state==="blocked"&&G.state==="blocked"||X.state==="blocked"&&G.state==="proceeding"||X.state==="blocked"&&G.state==="unblocked"||X.state==="proceeding"&&G.state==="unblocked",`Invalid blocker state transition: ${X.state} -> ${G.state}`);let ce=new Map(_.blockers);ce.set(F,G),fe({blockers:ce})}function Kn({currentLocation:F,nextLocation:G,historyAction:X}){if(te.size===0)return;te.size>1&&sn(!1,"A router only supports one blocker at a time");let ce=Array.from(te.entries()),[pe,Me]=ce[ce.length-1],Ae=_.blockers.get(pe);if(!(Ae&&Ae.state==="proceeding")&&Me({currentLocation:F,nextLocation:G,historyAction:X}))return pe}function mn(F){let G=$r(404,{pathname:F}),X=l||s,{matches:ce,route:pe}=ku(X);return{notFoundMatches:ce,route:pe,error:G}}function We(F,G,X){if(y=F,x=G,g=X||null,!v&&_.navigation===Ih){v=!0;let ce=rn(_.location,_.matches);ce!=null&&fe({restoreScrollPosition:ce})}return()=>{y=null,x=null,g=null}}function xt(F,G){return g&&g(F,G.map(ce=>EL(ce,_.loaderData)))||F.key}function Rt(F,G){if(y&&x){let X=xt(F,G);y[X]=x()}}function rn(F,G){if(y){let X=xt(F,G),ce=y[X];if(typeof ce=="number")return ce}return null}function xr(F,G,X){if(e.patchRoutesOnNavigation)if(F){if(Object.keys(F[0].params).length>0)return{active:!0,matches:Wl(G,X,c,!0)}}else return{active:!0,matches:Wl(G,X,c,!0)||[]};return{active:!1,matches:null}}async function kt(F,G,X,ce){if(!e.patchRoutesOnNavigation)return{type:"success",matches:F};let pe=F;for(;;){let Me=l==null,Ae=l||s,Te=o;try{await e.patchRoutesOnNavigation({signal:X,path:G,matches:pe,fetcherKey:ce,patch:(Be,Ie)=>{X.aborted||Sw(Be,Ie,Ae,Te,a,!1)}})}catch(Be){return{type:"error",error:Be,partialMatches:pe}}finally{Me&&!X.aborted&&(s=[...s])}if(X.aborted)return{type:"aborted"};let $e=Da(Ae,G,c),Se=null;if($e){if(Object.keys($e[0].params).length===0)return{type:"success",matches:$e};if(Se=Wl(Ae,G,c,!0),!(Se&&pe.length<Se.length&&kn(pe,Se.slice(0,pe.length))))return{type:"success",matches:$e}}if(Se||(Se=Wl(Ae,G,c,!0)),!Se||kn(pe,Se))return{type:"success",matches:null};pe=Se}}function kn(F,G){return F.length===G.length&&F.every((X,ce)=>X.route.id===G[ce].route.id)}function hi(F){o={},l=fc(F,a,void 0,o)}function Dn(F,G,X=!1){let ce=l==null;Sw(F,G,l||s,o,a,X),ce&&(s=[...s],fe({}))}return j={get basename(){return c},get future(){return d},get state(){return _},get routes(){return s},get window(){return t},initialize:ee,subscribe:Y,enableScrollRestoration:We,navigate:je,fetch:de,revalidate:ye,createHref:F=>e.history.createHref(F),encodeLocation:F=>e.history.encodeLocation(F),getFetcher:Ne,resetFetcher:Le,deleteFetcher:In,dispose:ue,getBlocker:vt,deleteBlocker:Sn,patchRoutes:Dn,_internalFetchControllers:z,_internalSetRoutes:hi,_internalSetStateDoNotUseOrYouWillBreakYourApp(F){fe(F)}},e.unstable_instrumentations&&(j=UL(j,e.unstable_instrumentations.map(F=>F.router).filter(Boolean))),j}function n$(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function hy(e,t,n,r,i,a){let o,s;if(i){o=[];for(let c of t)if(o.push(c),c.route.id===i){s=c;break}}else o=t,s=t[t.length-1];let l=_p(r||".",tx(o),Gr(e.pathname,n)||e.pathname,a==="path");if(r==null&&(l.search=e.search,l.hash=e.hash),(r==null||r===""||r===".")&&s){let c=ax(l.search);if(s.route.index&&!c)l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index";else if(!s.route.index&&c){let f=new URLSearchParams(l.search),d=f.getAll("index");f.delete("index"),d.filter(m=>m).forEach(m=>f.append("index",m));let p=f.toString();l.search=p?`?${p}`:""}}return n!=="/"&&(l.pathname=$L({basename:n,pathname:l.pathname})),Mi(l)}function ww(e,t,n){if(!n||!n$(n))return{path:t};if(n.formMethod&&!w$(n.formMethod))return{path:t,error:$r(405,{method:n.formMethod})};let r=()=>({path:t,error:$r(400,{type:"invalid-body"})}),a=(n.formMethod||"get").toUpperCase(),o=wP(t);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!Fn(a))return r();let d=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((p,[m,y])=>`${p}${m}=${y}
|
|
2
2
|
`,""):String(n.body);return{path:t,submission:{formMethod:a,formAction:o,formEncType:n.formEncType,formData:void 0,json:void 0,text:d}}}else if(n.formEncType==="application/json"){if(!Fn(a))return r();try{let d=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:a,formAction:o,formEncType:n.formEncType,formData:void 0,json:d,text:void 0}}}catch{return r()}}}et(typeof FormData=="function","FormData is not available in this environment");let s,l;if(n.formData)s=gy(n.formData),l=n.formData;else if(n.body instanceof FormData)s=gy(n.body),l=n.body;else if(n.body instanceof URLSearchParams)s=n.body,l=Nw(s);else if(n.body==null)s=new URLSearchParams,l=new FormData;else try{s=new URLSearchParams(n.body),l=Nw(s)}catch{return r()}let c={formMethod:a,formAction:o,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:l,json:void 0,text:void 0};if(Fn(c.formMethod))return{path:t,submission:c};let f=Hi(t);return e&&f.search&&ax(f.search)&&s.append("index",""),f.search=`?${s}`,{path:Mi(f),submission:c}}function _w(e,t,n,r,i,a,o,s,l,c,f,d,p,m,y,g,x,v,b,w,k){let S=w?wr(w[1])?w[1].error:w[1].data:void 0,E=i.createURL(a.location),j=i.createURL(l),_;if(f&&a.errors){let N=Object.keys(a.errors)[0];_=o.findIndex(A=>A.route.id===N)}else if(w&&wr(w[1])){let N=w[0];_=o.findIndex(A=>A.route.id===N)-1}let P=w?w[1].statusCode:void 0,C=P&&P>=400,T={currentUrl:E,currentParams:a.matches[0]?.params||{},nextUrl:j,nextParams:o[0].params,...s,actionResult:S,actionStatus:P},O=Uc(o),M=o.map((N,A)=>{let{route:D}=N,H=null;if(_!=null&&A>_)H=!1;else if(D.lazy)H=!0;else if(!rx(D))H=!1;else if(f){let{shouldLoad:Q}=hP(D,a.loaderData,a.errors);H=Q}else r$(a.loaderData,a.matches[A],N)&&(H=!0);if(H!==null)return my(n,r,e,l,O,N,c,t,H);let z=!1;typeof k=="boolean"?z=k:C?z=!1:(d||E.pathname+E.search===j.pathname+j.search||E.search!==j.search||i$(a.matches[A],N))&&(z=!0);let $={...T,defaultShouldRevalidate:z},re=Yl(N,$);return my(n,r,e,l,O,N,c,t,re,$,k)}),R=[];return y.forEach((N,A)=>{if(f||!o.some(I=>I.route.id===N.routeId)||m.has(A))return;let D=a.fetchers.get(A),H=D&&D.state!=="idle"&&D.data===void 0,z=Da(x,N.path,v);if(!z){if(b&&H)return;R.push({key:A,routeId:N.routeId,path:N.path,matches:null,match:null,request:null,controller:null});return}if(g.has(A))return;let $=bd(z,N.path),re=new AbortController,Q=Es(i,N.path,re.signal),V=null;if(p.has(A))p.delete(A),V=As(n,r,Q,N.path,z,$,c,t);else if(H)d&&(V=As(n,r,Q,N.path,z,$,c,t));else{let I;typeof k=="boolean"?I=k:C?I=!1:I=d;let L={...T,defaultShouldRevalidate:I};Yl($,L)&&(V=As(n,r,Q,N.path,z,$,c,t,L))}V&&R.push({key:A,routeId:N.routeId,path:N.path,matches:V,match:$,request:Q,controller:re})}),{dsMatches:M,revalidatingFetchers:R}}function rx(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function hP(e,t,n){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!rx(e))return{shouldLoad:!1,renderFallback:!1};let r=t!=null&&e.id in t,i=n!=null&&n[e.id]!==void 0;if(!r&&i)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader=="function"&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!r};let a=!r&&!i;return{shouldLoad:a,renderFallback:a}}function r$(e,t,n){let r=!t||n.route.id!==t.route.id,i=!e.hasOwnProperty(n.route.id);return r||i}function i$(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function Yl(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}function Sw(e,t,n,r,i,a){let o;if(e){let c=r[e];et(c,`No route found to patch children into: routeId = ${e}`),c.children||(c.children=[]),o=c.children}else o=n;let s=[],l=[];if(t.forEach(c=>{let f=o.find(d=>mP(c,d));f?l.push({existingRoute:f,newRoute:c}):s.push(c)}),s.length>0){let c=fc(s,i,[e||"_","patch",String(o?.length||"0")],r);o.push(...c)}if(a&&l.length>0)for(let c=0;c<l.length;c++){let{existingRoute:f,newRoute:d}=l[c],p=f,[m]=fc([d],i,[],{},!0);Object.assign(p,{element:m.element?m.element:p.element,errorElement:m.errorElement?m.errorElement:p.errorElement,hydrateFallbackElement:m.hydrateFallbackElement?m.hydrateFallbackElement:p.hydrateFallbackElement})}}function mP(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children?.every((n,r)=>t.children?.some(i=>mP(n,i)))??!1:!1}var kw=new WeakMap,gP=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let i=n[t.id];if(et(i,"No route found in manifest"),!i.lazy||typeof i.lazy!="object")return;let a=i.lazy[e];if(!a)return;let o=kw.get(i);o||(o={},kw.set(i,o));let s=o[e];if(s)return s;let l=(async()=>{let c=wL(e),d=i[e]!==void 0&&e!=="hasErrorBoundary";if(c)sn(!c,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),o[e]=Promise.resolve();else if(d)sn(!1,`Route "${i.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let p=await a();p!=null&&(Object.assign(i,{[e]:p}),Object.assign(i,r(i)))}typeof i.lazy=="object"&&(i.lazy[e]=void 0,Object.values(i.lazy).every(p=>p===void 0)&&(i.lazy=void 0))})();return o[e]=l,l},Ew=new WeakMap;function a$(e,t,n,r,i){let a=n[e.id];if(et(a,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let f=Ew.get(a);if(f)return{lazyRoutePromise:f,lazyHandlerPromise:f};let d=(async()=>{et(typeof e.lazy=="function","No lazy route function found");let p=await e.lazy(),m={};for(let y in p){let g=p[y];if(g===void 0)continue;let x=SL(y),b=a[y]!==void 0&&y!=="hasErrorBoundary";x?sn(!x,"Route property "+y+" is not a supported property to be returned from a lazy route function. This property will be ignored."):b?sn(!b,`Route "${a.id}" has a static property "${y}" defined but its lazy function is also returning a value for this property. The lazy route property "${y}" will be ignored.`):m[y]=g}Object.assign(a,m),Object.assign(a,{...r(a),lazy:void 0})})();return Ew.set(a,d),d.catch(()=>{}),{lazyRoutePromise:d,lazyHandlerPromise:d}}let o=Object.keys(e.lazy),s=[],l;for(let f of o){if(i&&i.includes(f))continue;let d=gP({key:f,route:e,manifest:n,mapRouteProperties:r});d&&(s.push(d),f===t&&(l=d))}let c=s.length>0?Promise.all(s).then(()=>{}):void 0;return c?.catch(()=>{}),l?.catch(()=>{}),{lazyRoutePromise:c,lazyHandlerPromise:l}}async function jw(e){let t=e.matches.filter(i=>i.shouldLoad),n={};return(await Promise.all(t.map(i=>i.resolve()))).forEach((i,a)=>{n[t[a].route.id]=i}),n}async function o$(e){return e.matches.some(t=>t.route.middleware)?yP(e,()=>jw(e)):jw(e)}function yP(e,t){return s$(e,t,r=>{if(b$(r))throw r;return r},g$,n);function n(r,i,a){if(a)return Promise.resolve(Object.assign(a.value,{[i]:{type:"error",result:r}}));{let{matches:o}=e,s=Math.min(Math.max(o.findIndex(c=>c.route.id===i),0),Math.max(o.findIndex(c=>c.shouldCallHandler()),0)),l=La(o,o[s].route.id).route.id;return Promise.resolve({[l]:{type:"error",result:r}})}}}async function s$(e,t,n,r,i){let{matches:a,...o}=e,s=a.flatMap(c=>c.route.middleware?c.route.middleware.map(f=>[c.route.id,f]):[]);return await vP(o,s,t,n,r,i)}async function vP(e,t,n,r,i,a,o=0){let{request:s}=e;if(s.signal.aborted)throw s.signal.reason??new Error(`Request aborted: ${s.method} ${s.url}`);let l=t[o];if(!l)return await n();let[c,f]=l,d,p=async()=>{if(d)throw new Error("You may only call `next()` once per middleware");try{return d={value:await vP(e,t,n,r,i,a,o+1)},d.value}catch(m){return d={value:await a(m,c,d)},d.value}};try{let m=await f(e,p),y=m!=null?r(m):void 0;return i(y)?y:d?y??d.value:(d={value:await p()},d.value)}catch(m){return await a(m,c,d)}}function xP(e,t,n,r,i){let a=gP({key:"middleware",route:r.route,manifest:t,mapRouteProperties:e}),o=a$(r.route,Fn(n.method)?"action":"loader",t,e,i);return{middleware:a,route:o.lazyRoutePromise,handler:o.lazyHandlerPromise}}function my(e,t,n,r,i,a,o,s,l,c=null,f){let d=!1,p=xP(e,t,n,a,o);return{...a,_lazyPromises:p,shouldLoad:l,shouldRevalidateArgs:c,shouldCallHandler(m){return d=!0,c?typeof f=="boolean"?Yl(a,{...c,defaultShouldRevalidate:f}):typeof m=="boolean"?Yl(a,{...c,defaultShouldRevalidate:m}):Yl(a,c):l},resolve(m){let{lazy:y,loader:g,middleware:x}=a.route,v=d||l||m&&!Fn(n.method)&&(y||g),b=x&&x.length>0&&!g&&!y;return v&&(Fn(n.method)||!b)?c$({request:n,path:r,unstable_pattern:i,match:a,lazyHandlerPromise:p?.handler,lazyRoutePromise:p?.route,handlerOverride:m,scopedContext:s}):Promise.resolve({type:"data",result:void 0})}}}function As(e,t,n,r,i,a,o,s,l=null){return i.map(c=>c.route.id!==a.route.id?{...c,shouldLoad:!1,shouldRevalidateArgs:l,shouldCallHandler:()=>!1,_lazyPromises:xP(e,t,n,c,o),resolve:()=>Promise.resolve({type:"data",result:void 0})}:my(e,t,n,r,Uc(i),c,o,s,!0,l))}async function l$(e,t,n,r,i,a,o){r.some(f=>f._lazyPromises?.middleware)&&await Promise.all(r.map(f=>f._lazyPromises?.middleware));let s={request:t,unstable_url:bP(t,n),unstable_pattern:Uc(r),params:r[0].params,context:a,matches:r},c=await e({...s,fetcherKey:i,runClientMiddleware:f=>{let d=s;return yP(d,()=>f({...d,fetcherKey:i,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(r.flatMap(f=>[f._lazyPromises?.handler,f._lazyPromises?.route]))}catch{}return c}async function c$({request:e,path:t,unstable_pattern:n,match:r,lazyHandlerPromise:i,lazyRoutePromise:a,handlerOverride:o,scopedContext:s}){let l,c,f=Fn(e.method),d=f?"action":"loader",p=m=>{let y,g=new Promise((b,w)=>y=w);c=()=>y(),e.signal.addEventListener("abort",c);let x=b=>typeof m!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${d}" [routeId: ${r.route.id}]`)):m({request:e,unstable_url:bP(e,t),unstable_pattern:n,params:r.params,context:s},...b!==void 0?[b]:[]),v=(async()=>{try{return{type:"data",result:await(o?o(w=>x(w)):x())}}catch(b){return{type:"error",result:b}}})();return Promise.race([v,g])};try{let m=f?r.route.action:r.route.loader;if(i||a)if(m){let y,[g]=await Promise.all([p(m).catch(x=>{y=x}),i,a]);if(y!==void 0)throw y;l=g}else{await i;let y=f?r.route.action:r.route.loader;if(y)[l]=await Promise.all([p(y),a]);else if(d==="action"){let g=new URL(e.url),x=g.pathname+g.search;throw $r(405,{method:e.method,pathname:x,routeId:r.route.id})}else return{type:"data",result:void 0}}else if(m)l=await p(m);else{let y=new URL(e.url),g=y.pathname+y.search;throw $r(404,{pathname:g})}}catch(m){return{type:"error",result:m}}finally{c&&e.signal.removeEventListener("abort",c)}return l}async function u$(e){let t=e.headers.get("Content-Type");return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function d$(e){let{result:t,type:n}=e;if(ix(t)){let r;try{r=await u$(t)}catch(i){return{type:"error",error:i}}return n==="error"?{type:"error",error:new Hc(t.status,t.statusText,r),statusCode:t.status,headers:t.headers}:{type:"data",data:r,statusCode:t.status,headers:t.headers}}return n==="error"?Aw(t)?t.data instanceof Error?{type:"error",error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:m$(t),statusCode:pc(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:pc(t)?t.status:void 0}:Aw(t)?{type:"data",data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"data",data:t}}function f$(e,t,n,r,i){let a=e.headers.get("Location");if(et(a,"Redirects returned/thrown from loaders/actions must have a Location header"),!ex(a)){let o=r.slice(0,r.findIndex(s=>s.route.id===n)+1);a=hy(new URL(t.url),o,i,a),e.headers.set("Location",a)}return e}var Cw=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function Pw(e,t,n,r){if(ex(e)){let i=e,a=i.startsWith("//")?new URL(t.protocol+i):new URL(i);if(Cw.includes(a.protocol))throw new Error("Invalid redirect location");let o=Gr(a.pathname,n)!=null;if(a.origin===t.origin&&o)return nx(a.pathname)+a.search+a.hash}try{let i=r.createURL(e);if(Cw.includes(i.protocol))throw new Error("Invalid redirect location")}catch{}return e}function Es(e,t,n,r){let i=e.createURL(wP(t)).toString(),a={signal:n};if(r&&Fn(r.formMethod)){let{formMethod:o,formEncType:s}=r;a.method=o.toUpperCase(),s==="application/json"?(a.headers=new Headers({"Content-Type":s}),a.body=JSON.stringify(r.json)):s==="text/plain"?a.body=r.text:s==="application/x-www-form-urlencoded"&&r.formData?a.body=gy(r.formData):a.body=r.formData}return new Request(i,a)}function bP(e,t){let n=new URL(e.url),r=typeof t=="string"?Hi(t):t;if(n.pathname=r.pathname||"/",r.search){let i=new URLSearchParams(r.search),a=i.getAll("index");i.delete("index");for(let o of a.filter(Boolean))i.append("index",o);n.search=i.size?`?${i.toString()}`:""}else n.search="";return n.hash=r.hash||"",n}function gy(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function Nw(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function p$(e,t,n,r=!1,i=!1){let a={},o=null,s,l=!1,c={},f=n&&wr(n[1])?n[1].error:void 0;return e.forEach(d=>{if(!(d.route.id in t))return;let p=d.route.id,m=t[p];if(et(!No(m),"Cannot handle redirect results in processLoaderData"),wr(m)){let y=m.error;if(f!==void 0&&(y=f,f=void 0),o=o||{},i)o[p]=y;else{let g=La(e,p);o[g.route.id]==null&&(o[g.route.id]=y)}r||(a[p]=pP),l||(l=!0,s=pc(m.error)?m.error.status:500),m.headers&&(c[p]=m.headers)}else a[p]=m.data,m.statusCode&&m.statusCode!==200&&!l&&(s=m.statusCode),m.headers&&(c[p]=m.headers)}),f!==void 0&&n&&(o={[n[0]]:f},n[2]&&(a[n[2]]=void 0)),{loaderData:a,errors:o,statusCode:s||200,loaderHeaders:c}}function Tw(e,t,n,r,i,a){let{loaderData:o,errors:s}=p$(t,n,r);return i.filter(l=>!l.matches||l.matches.some(c=>c.shouldLoad)).forEach(l=>{let{key:c,match:f,controller:d}=l;if(d&&d.signal.aborted)return;let p=a[c];if(et(p,"Did not find corresponding fetcher result"),wr(p)){let m=La(e.matches,f?.route.id);s&&s[m.route.id]||(s={...s,[m.route.id]:p.error}),e.fetchers.delete(c)}else if(No(p))et(!1,"Unhandled fetcher revalidation redirect");else{let m=Yi(p.data);e.fetchers.set(c,m)}}),{loaderData:o,errors:s}}function Ow(e,t,n,r){let i=Object.entries(t).filter(([,a])=>a!==pP).reduce((a,[o,s])=>(a[o]=s,a),{});for(let a of n){let o=a.route.id;if(!t.hasOwnProperty(o)&&e.hasOwnProperty(o)&&a.route.loader&&(i[o]=e[o]),r&&r.hasOwnProperty(o))break}return i}function Rw(e){return e?wr(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function La(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function ku(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function $r(e,{pathname:t,routeId:n,method:r,type:i,message:a}={}){let o="Unknown Server Error",s="Unknown @remix-run/router error";return e===400?(o="Bad Request",r&&t&&n?s=`You made a ${r} request to "${t}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:i==="invalid-body"&&(s="Unable to encode submission body")):e===403?(o="Forbidden",s=`Route "${n}" does not match URL "${t}"`):e===404?(o="Not Found",s=`No route matches URL "${t}"`):e===405&&(o="Method Not Allowed",r&&t&&n?s=`You made a ${r.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:r&&(s=`Invalid request method "${r.toUpperCase()}"`)),new Hc(e||500,o,new Error(s),!0)}function Eu(e){let t=Object.entries(e);for(let n=t.length-1;n>=0;n--){let[r,i]=t[n];if(No(i))return{key:r,result:i}}}function wP(e){let t=typeof e=="string"?Hi(e):e;return Mi({...t,hash:""})}function h$(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function m$(e){return new Hc(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function g$(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([t,n])=>typeof t=="string"&&y$(n))}function y$(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function v$(e){return ix(e.result)&&dP.has(e.result.status)}function wr(e){return e.type==="error"}function No(e){return(e&&e.type)==="redirect"}function Aw(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function ix(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function x$(e){return dP.has(e)}function b$(e){return ix(e)&&x$(e.status)&&e.headers.has("Location")}function w$(e){return ZL.has(e.toUpperCase())}function Fn(e){return YL.has(e.toUpperCase())}function ax(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function bd(e,t){let n=typeof t=="string"?Hi(t).search:t.search;if(e[e.length-1].route.index&&ax(n||""))return e[e.length-1];let r=oP(e);return r[r.length-1]}function Mw(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:a,json:o}=e;if(!(!t||!n||!r)){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(a!=null)return{formMethod:t,formAction:n,formEncType:r,formData:a,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:o,text:void 0}}}function Dh(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function _$(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Sl(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function S$(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Yi(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function k$(e,t){try{let n=e.sessionStorage.getItem(fP);if(n){let r=JSON.parse(n);for(let[i,a]of Object.entries(r||{}))a&&Array.isArray(a)&&t.set(i,new Set(a||[]))}}catch{}}function E$(e,t){if(t.size>0){let n={};for(let[r,i]of t)n[r]=[...i];try{e.sessionStorage.setItem(fP,JSON.stringify(n))}catch(r){sn(!1,`Failed to save applied view transitions in sessionStorage (${r}).`)}}}function Iw(){let e,t,n=new Promise((r,i)=>{e=async a=>{r(a);try{await n}catch{}},t=async a=>{i(a);try{await n}catch{}}});return{promise:n,resolve:e,reject:t}}var ns=h.createContext(null);ns.displayName="DataRouter";var Kc=h.createContext(null);Kc.displayName="DataRouterState";var _P=h.createContext(!1);function SP(){return h.useContext(_P)}var ox=h.createContext({isTransitioning:!1});ox.displayName="ViewTransition";var kP=h.createContext(new Map);kP.displayName="Fetchers";var j$=h.createContext(null);j$.displayName="Await";var Qr=h.createContext(null);Qr.displayName="Navigation";var Sp=h.createContext(null);Sp.displayName="Location";var Ui=h.createContext({outlet:null,matches:[],isDataRoute:!1});Ui.displayName="Route";var sx=h.createContext(null);sx.displayName="RouteError";var EP="REACT_ROUTER_ERROR",C$="REDIRECT",P$="ROUTE_ERROR_RESPONSE";function N$(e){if(e.startsWith(`${EP}:${C$}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function T$(e){if(e.startsWith(`${EP}:${P$}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new Hc(t.status,t.statusText,t.data)}catch{}}function O$(e,{relative:t}={}){et(Vc(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=h.useContext(Qr),{hash:i,pathname:a,search:o}=qc(e,{relative:t}),s=a;return n!=="/"&&(s=a==="/"?n:Vr([n,a])),r.createHref({pathname:s,search:o,hash:i})}function Vc(){return h.useContext(Sp)!=null}function Ki(){return et(Vc(),"useLocation() may be used only in the context of a <Router> component."),h.useContext(Sp).location}var jP="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function CP(e){h.useContext(Qr).static||h.useLayoutEffect(e)}function kp(){let{isDataRoute:e}=h.useContext(Ui);return e?V$():R$()}function R$(){et(Vc(),"useNavigate() may be used only in the context of a <Router> component.");let e=h.useContext(ns),{basename:t,navigator:n}=h.useContext(Qr),{matches:r}=h.useContext(Ui),{pathname:i}=Ki(),a=JSON.stringify(tx(r)),o=h.useRef(!1);return CP(()=>{o.current=!0}),h.useCallback((l,c={})=>{if(sn(o.current,jP),!o.current)return;if(typeof l=="number"){n.go(l);return}let f=_p(l,JSON.parse(a),i,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Vr([t,f.pathname])),(c.replace?n.replace:n.push)(f,c.state,c)},[t,n,a,i,e])}var A$=h.createContext(null);function M$(e){let t=h.useContext(Ui).outlet;return h.useMemo(()=>t&&h.createElement(A$.Provider,{value:e},t),[t,e])}function qc(e,{relative:t}={}){let{matches:n}=h.useContext(Ui),{pathname:r}=Ki(),i=JSON.stringify(tx(n));return h.useMemo(()=>_p(e,JSON.parse(i),r,t==="path"),[e,i,r,t])}function I$(e,t,n){et(Vc(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=h.useContext(Qr),{matches:i}=h.useContext(Ui),a=i[i.length-1],o=a?a.params:{},s=a?a.pathname:"/",l=a?a.pathnameBase:"/",c=a&&a.route;{let x=c&&c.path||"";NP(s,!c||x.endsWith("*")||x.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${x}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
3
3
|
|
|
4
4
|
Please change the parent <Route path="${x}"> to <Route path="${x==="/"?"*":`${x}/*`}">.`)}let f=Ki(),d;d=f;let p=d.pathname||"/",m=p;if(l!=="/"){let x=l.replace(/^\//,"").split("/");m="/"+p.replace(/^\//,"").split("/").slice(x.length).join("/")}let y=Da(e,{pathname:m});return sn(c||y!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),sn(y==null||y[y.length-1].route.element!==void 0||y[y.length-1].route.Component!==void 0||y[y.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),F$(y&&y.map(x=>Object.assign({},x,{params:Object.assign({},o,x.params),pathname:Vr([l,r.encodeLocation?r.encodeLocation(x.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?l:Vr([l,r.encodeLocation?r.encodeLocation(x.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:x.pathnameBase])})),i,n)}function D$(){let e=K$(),t=pc(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},a={padding:"2px 4px",backgroundColor:r},o=null;return console.error("Error handled by React Router default ErrorBoundary:",e),o=h.createElement(h.Fragment,null,h.createElement("p",null,"💿 Hey developer 👋"),h.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",h.createElement("code",{style:a},"ErrorBoundary")," or"," ",h.createElement("code",{style:a},"errorElement")," prop on your route.")),h.createElement(h.Fragment,null,h.createElement("h2",null,"Unexpected Application Error!"),h.createElement("h3",{style:{fontStyle:"italic"}},t),n?h.createElement("pre",{style:i},n):null,o)}var L$=h.createElement(D$,null),PP=class extends h.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=T$(e.digest);n&&(e=n)}let t=e!==void 0?h.createElement(Ui.Provider,{value:this.props.routeContext},h.createElement(sx.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?h.createElement($$,{error:e},t):t}};PP.contextType=_P;var Lh=new WeakMap;function $$({children:e,error:t}){let{basename:n}=h.useContext(Qr);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=N$(t.digest);if(r){let i=Lh.get(t);if(i)throw i;let a=lP(r.location,n);if(sP&&!Lh.get(t))if(a.isExternal||r.reloadDocument)window.location.href=a.absoluteURL||a.to;else{const o=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:r.replace}));throw Lh.set(t,o),o}return h.createElement("meta",{httpEquiv:"refresh",content:`0;url=${a.absoluteURL||a.to}`})}}return e}function z$({routeContext:e,match:t,children:n}){let r=h.useContext(ns);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),h.createElement(Ui.Provider,{value:e},n)}function F$(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let f=i.findIndex(d=>d.route.id&&a?.[d.route.id]!==void 0);et(f>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(",")}`),i=i.slice(0,Math.min(i.length,f+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let f=0;f<i.length;f++){let d=i[f];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(s=f),d.route.id){let{loaderData:p,errors:m}=r,y=d.route.loader&&!p.hasOwnProperty(d.route.id)&&(!m||m[d.route.id]===void 0);if(d.route.lazy||y){n.isStatic&&(o=!0),s>=0?i=i.slice(0,s+1):i=[i[0]];break}}}}let l=n?.onError,c=r&&l?(f,d)=>{l(f,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:Uc(r.matches),errorInfo:d})}:void 0;return i.reduceRight((f,d,p)=>{let m,y=!1,g=null,x=null;r&&(m=a&&d.route.id?a[d.route.id]:void 0,g=d.route.errorElement||L$,o&&(s<0&&p===0?(NP("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),y=!0,x=null):s===p&&(y=!0,x=d.route.hydrateFallbackElement||null)));let v=t.concat(i.slice(0,p+1)),b=()=>{let w;return m?w=g:y?w=x:d.route.Component?w=h.createElement(d.route.Component,null):d.route.element?w=d.route.element:w=f,h.createElement(z$,{match:d,routeContext:{outlet:f,matches:v,isDataRoute:r!=null},children:w})};return r&&(d.route.ErrorBoundary||d.route.errorElement||p===0)?h.createElement(PP,{location:r.location,revalidation:r.revalidation,component:g,error:m,children:b(),routeContext:{outlet:null,matches:v,isDataRoute:!0},onError:c}):b()},null)}function lx(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function B$(e){let t=h.useContext(ns);return et(t,lx(e)),t}function W$(e){let t=h.useContext(Kc);return et(t,lx(e)),t}function H$(e){let t=h.useContext(Ui);return et(t,lx(e)),t}function cx(e){let t=H$(e),n=t.matches[t.matches.length-1];return et(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function U$(){return cx("useRouteId")}function K$(){let e=h.useContext(sx),t=W$("useRouteError"),n=cx("useRouteError");return e!==void 0?e:t.errors?.[n]}function V$(){let{router:e}=B$("useNavigate"),t=cx("useNavigate"),n=h.useRef(!1);return CP(()=>{n.current=!0}),h.useCallback(async(i,a={})=>{sn(n.current,jP),n.current&&(typeof i=="number"?await e.navigate(i):await e.navigate(i,{fromRouteId:t,...a}))},[e,t])}var Dw={};function NP(e,t,n){!t&&!Dw[e]&&(Dw[e]=!0,sn(!1,n))}var Lw={};function $w(e,t){!e&&!Lw[t]&&(Lw[t]=!0,console.warn(t))}var q$="useOptimistic",zw=xp[q$],G$=()=>{};function Y$(e){return zw?zw(e):[e,G$]}function X$(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&sn(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:h.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&sn(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:h.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&sn(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:h.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var Z$=["HydrateFallback","hydrateFallbackElement"],Q$=class{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",e(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",t(n))}})}};function J$({router:e,flushSync:t,onError:n,unstable_useTransitions:r}){r=SP()||r;let[a,o]=h.useState(e.state),[s,l]=Y$(a),[c,f]=h.useState(),[d,p]=h.useState({isTransitioning:!1}),[m,y]=h.useState(),[g,x]=h.useState(),[v,b]=h.useState(),w=h.useRef(new Map),k=h.useCallback((P,{deletedFetchers:C,newErrors:T,flushSync:O,viewTransitionOpts:M})=>{T&&n&&Object.values(T).forEach(N=>n(N,{location:P.location,params:P.matches[0]?.params??{},unstable_pattern:Uc(P.matches)})),P.fetchers.forEach((N,A)=>{N.data!==void 0&&w.current.set(A,N.data)}),C.forEach(N=>w.current.delete(N)),$w(O===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let R=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if($w(M==null||R,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!M||!R){t&&O?t(()=>o(P)):r===!1?o(P):h.startTransition(()=>{r===!0&&l(N=>Fw(N,P)),o(P)});return}if(t&&O){t(()=>{g&&(m?.resolve(),g.skipTransition()),p({isTransitioning:!0,flushSync:!0,currentLocation:M.currentLocation,nextLocation:M.nextLocation})});let N=e.window.document.startViewTransition(()=>{t(()=>o(P))});N.finished.finally(()=>{t(()=>{y(void 0),x(void 0),f(void 0),p({isTransitioning:!1})})}),t(()=>x(N));return}g?(m?.resolve(),g.skipTransition(),b({state:P,currentLocation:M.currentLocation,nextLocation:M.nextLocation})):(f(P),p({isTransitioning:!0,flushSync:!1,currentLocation:M.currentLocation,nextLocation:M.nextLocation}))},[e.window,t,g,m,r,l,n]);h.useLayoutEffect(()=>e.subscribe(k),[e,k]);let S=s.initialized;h.useLayoutEffect(()=>{!S&&e.state.initialized&&k(e.state,{deletedFetchers:[],flushSync:!1,newErrors:null})},[S,k,e.state]),h.useEffect(()=>{d.isTransitioning&&!d.flushSync&&y(new Q$)},[d]),h.useEffect(()=>{if(m&&c&&e.window){let P=c,C=m.promise,T=e.window.document.startViewTransition(async()=>{r===!1?o(P):h.startTransition(()=>{r===!0&&l(O=>Fw(O,P)),o(P)}),await C});T.finished.finally(()=>{y(void 0),x(void 0),f(void 0),p({isTransitioning:!1})}),x(T)}},[c,m,e.window,r,l]),h.useEffect(()=>{m&&c&&s.location.key===c.location.key&&m.resolve()},[m,g,s.location,c]),h.useEffect(()=>{!d.isTransitioning&&v&&(f(v.state),p({isTransitioning:!0,flushSync:!1,currentLocation:v.currentLocation,nextLocation:v.nextLocation}),b(void 0))},[d.isTransitioning,v]);let E=h.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:P=>e.navigate(P),push:(P,C,T)=>e.navigate(P,{state:C,preventScrollReset:T?.preventScrollReset}),replace:(P,C,T)=>e.navigate(P,{replace:!0,state:C,preventScrollReset:T?.preventScrollReset})}),[e]),j=e.basename||"/",_=h.useMemo(()=>({router:e,navigator:E,static:!1,basename:j,onError:n}),[e,E,j,n]);return h.createElement(h.Fragment,null,h.createElement(ns.Provider,{value:_},h.createElement(Kc.Provider,{value:s},h.createElement(kP.Provider,{value:w.current},h.createElement(ox.Provider,{value:d},h.createElement(r5,{basename:j,location:s.location,navigationType:s.historyAction,navigator:E,unstable_useTransitions:r},h.createElement(e5,{routes:e.routes,future:e.future,state:s,isStatic:!1,onError:n})))))),null)}function Fw(e,t){return{...e,navigation:t.navigation.state!=="idle"?t.navigation:e.navigation,revalidation:t.revalidation!=="idle"?t.revalidation:e.revalidation,actionData:t.navigation.state!=="submitting"?t.actionData:e.actionData,fetchers:t.fetchers}}var e5=h.memo(t5);function t5({routes:e,future:t,state:n,isStatic:r,onError:i}){return I$(e,void 0,{state:n,isStatic:r,onError:i})}function n5(e){return M$(e.context)}function r5({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:i,static:a=!1,unstable_useTransitions:o}){et(!Vc(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let s=e.replace(/^\/*/,"/"),l=h.useMemo(()=>({basename:s,navigator:i,static:a,unstable_useTransitions:o,future:{}}),[s,i,a,o]);typeof n=="string"&&(n=Hi(n));let{pathname:c="/",search:f="",hash:d="",state:p=null,key:m="default",unstable_mask:y}=n,g=h.useMemo(()=>{let x=Gr(c,s);return x==null?null:{location:{pathname:x,search:f,hash:d,state:p,key:m,unstable_mask:y},navigationType:r}},[s,c,f,d,p,m,r,y]);return sn(g!=null,`<Router basename="${s}"> is not able to match the URL "${c}${f}${d}" because it does not start with the basename, so the <Router> won't render anything.`),g==null?null:h.createElement(Qr.Provider,{value:l},h.createElement(Sp.Provider,{children:t,value:g}))}var wd="get",_d="application/x-www-form-urlencoded";function Ep(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function i5(e){return Ep(e)&&e.tagName.toLowerCase()==="button"}function a5(e){return Ep(e)&&e.tagName.toLowerCase()==="form"}function o5(e){return Ep(e)&&e.tagName.toLowerCase()==="input"}function s5(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function l5(e,t){return e.button===0&&(!t||t==="_self")&&!s5(e)}var ju=null;function c5(){if(ju===null)try{new FormData(document.createElement("form"),0),ju=!1}catch{ju=!0}return ju}var u5=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function $h(e){return e!=null&&!u5.has(e)?(sn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${_d}"`),null):e}function d5(e,t){let n,r,i,a,o;if(a5(e)){let s=e.getAttribute("action");r=s?Gr(s,t):null,n=e.getAttribute("method")||wd,i=$h(e.getAttribute("enctype"))||_d,a=new FormData(e)}else if(i5(e)||o5(e)&&(e.type==="submit"||e.type==="image")){let s=e.form;if(s==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||s.getAttribute("action");if(r=l?Gr(l,t):null,n=e.getAttribute("formmethod")||s.getAttribute("method")||wd,i=$h(e.getAttribute("formenctype"))||$h(s.getAttribute("enctype"))||_d,a=new FormData(s,e),!c5()){let{name:c,type:f,value:d}=e;if(f==="image"){let p=c?`${c}.`:"";a.append(`${p}x`,"0"),a.append(`${p}y`,"0")}else c&&a.append(c,d)}}else{if(Ep(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=wd,r=null,i=_d,o=e}return a&&i==="text/plain"&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function ux(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function TP(e,t,n,r){let i=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?i.pathname.endsWith("/")?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname==="/"?i.pathname=`_root.${r}`:t&&Gr(i.pathname,t)==="/"?i.pathname=`${Gd(t)}/_root.${r}`:i.pathname=`${Gd(i.pathname)}.${r}`,i}async function f5(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function p5(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function h5(e,t,n){let r=await Promise.all(e.map(async i=>{let a=t.routes[i.route.id];if(a){let o=await f5(a,n);return o.links?o.links():[]}return[]}));return v5(r.flat(1).filter(p5).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function Bw(e,t,n,r,i,a){let o=(l,c)=>n[c]?l.route.id!==n[c].route.id:!0,s=(l,c)=>n[c].pathname!==l.pathname||n[c].route.path?.endsWith("*")&&n[c].params["*"]!==l.params["*"];return a==="assets"?t.filter((l,c)=>o(l,c)||s(l,c)):a==="data"?t.filter((l,c)=>{let f=r.routes[l.route.id];if(!f||!f.hasLoader)return!1;if(o(l,c)||s(l,c))return!0;if(l.route.shouldRevalidate){let d=l.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof d=="boolean")return d}return!0}):[]}function m5(e,t,{includeHydrateFallback:n}={}){return g5(e.map(r=>{let i=t.routes[r.route.id];if(!i)return[];let a=[i.module];return i.clientActionModule&&(a=a.concat(i.clientActionModule)),i.clientLoaderModule&&(a=a.concat(i.clientLoaderModule)),n&&i.hydrateFallbackModule&&(a=a.concat(i.hydrateFallbackModule)),i.imports&&(a=a.concat(i.imports)),a}).flat(1))}function g5(e){return[...new Set(e)]}function y5(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function v5(e,t){let n=new Set;return new Set(t),e.reduce((r,i)=>{let a=JSON.stringify(y5(i));return n.has(a)||(n.add(a),r.push({key:a,link:i})),r},[])}function dx(){let e=h.useContext(ns);return ux(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function x5(){let e=h.useContext(Kc);return ux(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var fx=h.createContext(void 0);fx.displayName="FrameworkContext";function px(){let e=h.useContext(fx);return ux(e,"You must render this element inside a <HydratedRouter> element"),e}function b5(e,t){let n=h.useContext(fx),[r,i]=h.useState(!1),[a,o]=h.useState(!1),{onFocus:s,onBlur:l,onMouseEnter:c,onMouseLeave:f,onTouchStart:d}=t,p=h.useRef(null);h.useEffect(()=>{if(e==="render"&&o(!0),e==="viewport"){let g=v=>{v.forEach(b=>{o(b.isIntersecting)})},x=new IntersectionObserver(g,{threshold:.5});return p.current&&x.observe(p.current),()=>{x.disconnect()}}},[e]),h.useEffect(()=>{if(r){let g=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(g)}}},[r]);let m=()=>{i(!0)},y=()=>{i(!1),o(!1)};return n?e!=="intent"?[a,p,{}]:[a,p,{onFocus:kl(s,m),onBlur:kl(l,y),onMouseEnter:kl(c,m),onMouseLeave:kl(f,y),onTouchStart:kl(d,m)}]:[!1,p,{}]}function kl(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function w5({page:e,...t}){let n=SP(),{router:r}=dx(),i=h.useMemo(()=>Da(r.routes,e,r.basename),[r.routes,e,r.basename]);return i?n?h.createElement(S5,{page:e,matches:i,...t}):h.createElement(k5,{page:e,matches:i,...t}):null}function _5(e){let{manifest:t,routeModules:n}=px(),[r,i]=h.useState([]);return h.useEffect(()=>{let a=!1;return h5(e,t,n).then(o=>{a||i(o)}),()=>{a=!0}},[e,t,n]),r}function S5({page:e,matches:t,...n}){let r=Ki(),{future:i}=px(),{basename:a}=dx(),o=h.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let s=TP(e,a,i.unstable_trailingSlashAwareDataRequests,"rsc"),l=!1,c=[];for(let f of t)typeof f.route.shouldRevalidate=="function"?l=!0:c.push(f.route.id);return l&&c.length>0&&s.searchParams.set("_routes",c.join(",")),[s.pathname+s.search]},[a,i.unstable_trailingSlashAwareDataRequests,e,r,t]);return h.createElement(h.Fragment,null,o.map(s=>h.createElement("link",{key:s,rel:"prefetch",as:"fetch",href:s,...n})))}function k5({page:e,matches:t,...n}){let r=Ki(),{future:i,manifest:a,routeModules:o}=px(),{basename:s}=dx(),{loaderData:l,matches:c}=x5(),f=h.useMemo(()=>Bw(e,t,c,a,r,"data"),[e,t,c,a,r]),d=h.useMemo(()=>Bw(e,t,c,a,r,"assets"),[e,t,c,a,r]),p=h.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let g=new Set,x=!1;if(t.forEach(b=>{let w=a.routes[b.route.id];!w||!w.hasLoader||(!f.some(k=>k.route.id===b.route.id)&&b.route.id in l&&o[b.route.id]?.shouldRevalidate||w.hasClientLoader?x=!0:g.add(b.route.id))}),g.size===0)return[];let v=TP(e,s,i.unstable_trailingSlashAwareDataRequests,"data");return x&&g.size>0&&v.searchParams.set("_routes",t.filter(b=>g.has(b.route.id)).map(b=>b.route.id).join(",")),[v.pathname+v.search]},[s,i.unstable_trailingSlashAwareDataRequests,l,r,a,f,t,e,o]),m=h.useMemo(()=>m5(d,a),[d,a]),y=_5(d);return h.createElement(h.Fragment,null,p.map(g=>h.createElement("link",{key:g,rel:"prefetch",as:"fetch",href:g,...n})),m.map(g=>h.createElement("link",{key:g,rel:"modulepreload",href:g,...n})),y.map(({key:g,link:x})=>h.createElement("link",{key:g,nonce:n.nonce,...x,crossOrigin:x.crossOrigin??n.crossOrigin})))}function E5(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var j5=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{j5&&(window.__reactRouterVersion="7.14.2")}catch{}function C5(e,t){return t$({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:yL({window:t?.window}),hydrationData:P5(),routes:e,mapRouteProperties:X$,hydrationRouteProperties:Z$,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,unstable_instrumentations:t?.unstable_instrumentations}).initialize()}function P5(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:N5(e.errors)}),e}function N5(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,i]of t)if(i&&i.__type==="RouteErrorResponse")n[r]=new Hc(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type==="Error"){if(i.__subType){let a=window[i.__subType];if(typeof a=="function")try{let o=new a(i.message);o.stack="",n[r]=o}catch{}}if(n[r]==null){let a=new Error(i.message);a.stack="",n[r]=a}}else n[r]=i;return n}var OP=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,RP=h.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:i,reloadDocument:a,replace:o,unstable_mask:s,state:l,target:c,to:f,preventScrollReset:d,viewTransition:p,unstable_defaultShouldRevalidate:m,...y},g){let{basename:x,navigator:v,unstable_useTransitions:b}=h.useContext(Qr),w=typeof f=="string"&&OP.test(f),k=lP(f,x);f=k.to;let S=O$(f,{relative:i}),E=Ki(),j=null;if(s){let N=_p(s,[],E.unstable_mask?E.unstable_mask.pathname:"/",!0);x!=="/"&&(N.pathname=N.pathname==="/"?x:Vr([x,N.pathname])),j=v.createHref(N)}let[_,P,C]=b5(r,y),T=R5(f,{replace:o,unstable_mask:s,state:l,target:c,preventScrollReset:d,relative:i,viewTransition:p,unstable_defaultShouldRevalidate:m,unstable_useTransitions:b});function O(N){t&&t(N),N.defaultPrevented||T(N)}let M=!(k.isExternal||a),R=h.createElement("a",{...y,...C,href:(M?j:void 0)||k.absoluteURL||S,onClick:M?O:t,ref:E5(g,P),target:c,"data-discover":!w&&n==="render"?"true":void 0});return _&&!w?h.createElement(h.Fragment,null,R,h.createElement(w5,{page:S})):R});RP.displayName="Link";var AP=h.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:i=!1,style:a,to:o,viewTransition:s,children:l,...c},f){let d=qc(o,{relative:c.relative}),p=Ki(),m=h.useContext(Kc),{navigator:y,basename:g}=h.useContext(Qr),x=m!=null&&L5(d)&&s===!0,v=y.encodeLocation?y.encodeLocation(d).pathname:d.pathname,b=p.pathname,w=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;n||(b=b.toLowerCase(),w=w?w.toLowerCase():null,v=v.toLowerCase()),w&&g&&(w=Gr(w,g)||w);const k=v!=="/"&&v.endsWith("/")?v.length-1:v.length;let S=b===v||!i&&b.startsWith(v)&&b.charAt(k)==="/",E=w!=null&&(w===v||!i&&w.startsWith(v)&&w.charAt(v.length)==="/"),j={isActive:S,isPending:E,isTransitioning:x},_=S?t:void 0,P;typeof r=="function"?P=r(j):P=[r,S?"active":null,E?"pending":null,x?"transitioning":null].filter(Boolean).join(" ");let C=typeof a=="function"?a(j):a;return h.createElement(RP,{...c,"aria-current":_,className:P,ref:f,style:C,to:o,viewTransition:s},typeof l=="function"?l(j):l)});AP.displayName="NavLink";var T5=h.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=wd,action:s,onSubmit:l,relative:c,preventScrollReset:f,viewTransition:d,unstable_defaultShouldRevalidate:p,...m},y)=>{let{unstable_useTransitions:g}=h.useContext(Qr),x=I5(),v=D5(s,{relative:c}),b=o.toLowerCase()==="get"?"get":"post",w=typeof s=="string"&&OP.test(s),k=S=>{if(l&&l(S),S.defaultPrevented)return;S.preventDefault();let E=S.nativeEvent.submitter,j=E?.getAttribute("formmethod")||o,_=()=>x(E||S.currentTarget,{fetcherKey:t,method:j,navigate:n,replace:i,state:a,relative:c,preventScrollReset:f,viewTransition:d,unstable_defaultShouldRevalidate:p});g&&n!==!1?h.startTransition(()=>_()):_()};return h.createElement("form",{ref:y,method:b,action:v,onSubmit:r?l:k,...m,"data-discover":!w&&e==="render"?"true":void 0})});T5.displayName="Form";function O5(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function MP(e){let t=h.useContext(ns);return et(t,O5(e)),t}function R5(e,{target:t,replace:n,unstable_mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,unstable_defaultShouldRevalidate:l,unstable_useTransitions:c}={}){let f=kp(),d=Ki(),p=qc(e,{relative:o});return h.useCallback(m=>{if(l5(m,t)){m.preventDefault();let y=n!==void 0?n:Mi(d)===Mi(p),g=()=>f(e,{replace:y,unstable_mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,unstable_defaultShouldRevalidate:l});c?h.startTransition(()=>g()):g()}},[d,f,p,n,r,i,t,e,a,o,s,l,c])}var A5=0,M5=()=>`__${String(++A5)}__`;function I5(){let{router:e}=MP("useSubmit"),{basename:t}=h.useContext(Qr),n=U$(),r=e.fetch,i=e.navigate;return h.useCallback(async(a,o={})=>{let{action:s,method:l,encType:c,formData:f,body:d}=d5(a,t);if(o.navigate===!1){let p=o.fetcherKey||M5();await r(p,n,o.action||s,{unstable_defaultShouldRevalidate:o.unstable_defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:f,body:d,formMethod:o.method||l,formEncType:o.encType||c,flushSync:o.flushSync})}else await i(o.action||s,{unstable_defaultShouldRevalidate:o.unstable_defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:f,body:d,formMethod:o.method||l,formEncType:o.encType||c,replace:o.replace,state:o.state,fromRouteId:n,flushSync:o.flushSync,viewTransition:o.viewTransition})},[r,i,t,n])}function D5(e,{relative:t}={}){let{basename:n}=h.useContext(Qr),r=h.useContext(Ui);et(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),a={...qc(e||".",{relative:t})},o=Ki();if(e==null){a.search=o.search;let s=new URLSearchParams(a.search),l=s.getAll("index");if(l.some(f=>f==="")){s.delete("index"),l.filter(d=>d).forEach(d=>s.append("index",d));let f=s.toString();a.search=f?`?${f}`:""}}return(!e||e===".")&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(a.pathname=a.pathname==="/"?n:Vr([n,a.pathname])),Mi(a)}function L5(e,{relative:t}={}){let n=h.useContext(ox);et(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=MP("useViewTransitionState"),i=qc(e,{relative:t});if(!n.isTransitioning)return!1;let a=Gr(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Gr(n.nextLocation.pathname,r)||n.nextLocation.pathname;return qd(i.pathname,o)!=null||qd(i.pathname,a)!=null}var Yr=zD();const $5=ya(Yr);function z5(e){return h.createElement(J$,{flushSync:Yr.flushSync,...e})}function jn(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)}function js(e,t,n,r,i){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var mo,Mr,hs,Cu,Sd;const hr="__TAURI_TO_IPC_KEY__";function IP(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}class Ww{constructor(t){mo.set(this,void 0),Mr.set(this,0),hs.set(this,[]),Cu.set(this,void 0),js(this,mo,t||(()=>{})),this.id=IP(n=>{const r=n.index;if("end"in n){r==jn(this,Mr,"f")?this.cleanupCallback():js(this,Cu,r);return}const i=n.message;if(r==jn(this,Mr,"f")){for(jn(this,mo,"f").call(this,i),js(this,Mr,jn(this,Mr,"f")+1);jn(this,Mr,"f")in jn(this,hs,"f");){const a=jn(this,hs,"f")[jn(this,Mr,"f")];jn(this,mo,"f").call(this,a),delete jn(this,hs,"f")[jn(this,Mr,"f")],js(this,Mr,jn(this,Mr,"f")+1)}jn(this,Mr,"f")===jn(this,Cu,"f")&&this.cleanupCallback()}else jn(this,hs,"f")[r]=i})}cleanupCallback(){window.__TAURI_INTERNALS__.unregisterCallback(this.id)}set onmessage(t){js(this,mo,t)}get onmessage(){return jn(this,mo,"f")}[(mo=new WeakMap,Mr=new WeakMap,hs=new WeakMap,Cu=new WeakMap,hr)](){return`__CHANNEL__:${this.id}`}toJSON(){return this[hr]()}}async function B(e,t={},n){return window.__TAURI_INTERNALS__.invoke(e,t,n)}class Yd{get rid(){return jn(this,Sd,"f")}constructor(t){Sd.set(this,void 0),js(this,Sd,t)}async close(){return B("plugin:resources|close",{rid:this.rid})}}Sd=new WeakMap;var Pn;(function(e){e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WINDOW_CREATED="tauri://window-created",e.WEBVIEW_CREATED="tauri://webview-created",e.DRAG_ENTER="tauri://drag-enter",e.DRAG_OVER="tauri://drag-over",e.DRAG_DROP="tauri://drag-drop",e.DRAG_LEAVE="tauri://drag-leave"})(Pn||(Pn={}));async function DP(e,t){window.__TAURI_EVENT_PLUGIN_INTERNALS__.unregisterListener(e,t),await B("plugin:event|unlisten",{event:e,eventId:t})}async function Fe(e,t,n){var r;const i=typeof n?.target=="string"?{kind:"AnyLabel",label:n.target}:(r=n?.target)!==null&&r!==void 0?r:{kind:"Any"};return B("plugin:event|listen",{event:e,target:i,handler:IP(t)}).then(a=>async()=>DP(e,a))}async function hx(e,t,n){return Fe(e,r=>{DP(e,r.id),t(r)},n)}async function sa(e,t){await B("plugin:event|emit",{event:e,payload:t})}async function Qn(e,t,n){await B("plugin:event|emit_to",{target:typeof e=="string"?{kind:"AnyLabel",label:e}:e,event:t,payload:n})}class LP{constructor(...t){this.type="Logical",t.length===1?"Logical"in t[0]?(this.width=t[0].Logical.width,this.height=t[0].Logical.height):(this.width=t[0].width,this.height=t[0].height):(this.width=t[0],this.height=t[1])}toPhysical(t){return new Ms(this.width*t,this.height*t)}[hr](){return{width:this.width,height:this.height}}toJSON(){return this[hr]()}}class Ms{constructor(...t){this.type="Physical",t.length===1?"Physical"in t[0]?(this.width=t[0].Physical.width,this.height=t[0].Physical.height):(this.width=t[0].width,this.height=t[0].height):(this.width=t[0],this.height=t[1])}toLogical(t){return new LP(this.width/t,this.height/t)}[hr](){return{width:this.width,height:this.height}}toJSON(){return this[hr]()}}class Ra{constructor(t){this.size=t}toLogical(t){return this.size instanceof LP?this.size:this.size.toLogical(t)}toPhysical(t){return this.size instanceof Ms?this.size:this.size.toPhysical(t)}[hr](){return{[`${this.size.type}`]:{width:this.size.width,height:this.size.height}}}toJSON(){return this[hr]()}}class $P{constructor(...t){this.type="Logical",t.length===1?"Logical"in t[0]?(this.x=t[0].Logical.x,this.y=t[0].Logical.y):(this.x=t[0].x,this.y=t[0].y):(this.x=t[0],this.y=t[1])}toPhysical(t){return new zr(this.x*t,this.y*t)}[hr](){return{x:this.x,y:this.y}}toJSON(){return this[hr]()}}class zr{constructor(...t){this.type="Physical",t.length===1?"Physical"in t[0]?(this.x=t[0].Physical.x,this.y=t[0].Physical.y):(this.x=t[0].x,this.y=t[0].y):(this.x=t[0],this.y=t[1])}toLogical(t){return new $P(this.x/t,this.y/t)}[hr](){return{x:this.x,y:this.y}}toJSON(){return this[hr]()}}class Ns{constructor(t){this.position=t}toLogical(t){return this.position instanceof $P?this.position:this.position.toLogical(t)}toPhysical(t){return this.position instanceof zr?this.position:this.position.toPhysical(t)}[hr](){return{[`${this.position.type}`]:{x:this.position.x,y:this.position.y}}}toJSON(){return this[hr]()}}class Xl extends Yd{constructor(t){super(t)}static async new(t,n,r){return B("plugin:image|new",{rgba:Xd(t),width:n,height:r}).then(i=>new Xl(i))}static async fromBytes(t){return B("plugin:image|from_bytes",{bytes:Xd(t)}).then(n=>new Xl(n))}static async fromPath(t){return B("plugin:image|from_path",{path:t}).then(n=>new Xl(n))}async rgba(){return B("plugin:image|rgba",{rid:this.rid}).then(t=>new Uint8Array(t))}async size(){return B("plugin:image|size",{rid:this.rid})}}function Xd(e){return e==null?null:typeof e=="string"?e:e instanceof Xl?e.rid:e}var yy;(function(e){e[e.Critical=1]="Critical",e[e.Informational=2]="Informational"})(yy||(yy={}));class F5{constructor(t){this._preventDefault=!1,this.event=t.event,this.id=t.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}}var Hw;(function(e){e.None="none",e.Normal="normal",e.Indeterminate="indeterminate",e.Paused="paused",e.Error="error"})(Hw||(Hw={}));function mx(){return new jp(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}async function zh(){return B("plugin:window|get_all_windows").then(e=>e.map(t=>new jp(t,{skip:!0})))}const Fh=["tauri://created","tauri://error"];class jp{constructor(t,n={}){var r;this.label=t,this.listeners=Object.create(null),n?.skip||B("plugin:window|create",{options:{...n,parent:typeof n.parent=="string"?n.parent:(r=n.parent)===null||r===void 0?void 0:r.label,label:t}}).then(async()=>this.emit("tauri://created")).catch(async i=>this.emit("tauri://error",i))}static async getByLabel(t){var n;return(n=(await zh()).find(r=>r.label===t))!==null&&n!==void 0?n:null}static getCurrent(){return mx()}static async getAll(){return zh()}static async getFocusedWindow(){for(const t of await zh())if(await t.isFocused())return t;return null}async listen(t,n){return this._handleTauriEvent(t,n)?()=>{const r=this.listeners[t];r.splice(r.indexOf(n),1)}:Fe(t,n,{target:{kind:"Window",label:this.label}})}async once(t,n){return this._handleTauriEvent(t,n)?()=>{const r=this.listeners[t];r.splice(r.indexOf(n),1)}:hx(t,n,{target:{kind:"Window",label:this.label}})}async emit(t,n){if(Fh.includes(t)){for(const r of this.listeners[t]||[])r({event:t,id:-1,payload:n});return}return sa(t,n)}async emitTo(t,n,r){if(Fh.includes(n)){for(const i of this.listeners[n]||[])i({event:n,id:-1,payload:r});return}return Qn(t,n,r)}_handleTauriEvent(t,n){return Fh.includes(t)?(t in this.listeners?this.listeners[t].push(n):this.listeners[t]=[n],!0):!1}async scaleFactor(){return B("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return B("plugin:window|inner_position",{label:this.label}).then(t=>new zr(t))}async outerPosition(){return B("plugin:window|outer_position",{label:this.label}).then(t=>new zr(t))}async innerSize(){return B("plugin:window|inner_size",{label:this.label}).then(t=>new Ms(t))}async outerSize(){return B("plugin:window|outer_size",{label:this.label}).then(t=>new Ms(t))}async isFullscreen(){return B("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return B("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return B("plugin:window|is_maximized",{label:this.label})}async isFocused(){return B("plugin:window|is_focused",{label:this.label})}async isDecorated(){return B("plugin:window|is_decorated",{label:this.label})}async isResizable(){return B("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return B("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return B("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return B("plugin:window|is_closable",{label:this.label})}async isVisible(){return B("plugin:window|is_visible",{label:this.label})}async title(){return B("plugin:window|title",{label:this.label})}async theme(){return B("plugin:window|theme",{label:this.label})}async isAlwaysOnTop(){return B("plugin:window|is_always_on_top",{label:this.label})}async center(){return B("plugin:window|center",{label:this.label})}async requestUserAttention(t){let n=null;return t&&(t===yy.Critical?n={type:"Critical"}:n={type:"Informational"}),B("plugin:window|request_user_attention",{label:this.label,value:n})}async setResizable(t){return B("plugin:window|set_resizable",{label:this.label,value:t})}async setEnabled(t){return B("plugin:window|set_enabled",{label:this.label,value:t})}async isEnabled(){return B("plugin:window|is_enabled",{label:this.label})}async setMaximizable(t){return B("plugin:window|set_maximizable",{label:this.label,value:t})}async setMinimizable(t){return B("plugin:window|set_minimizable",{label:this.label,value:t})}async setClosable(t){return B("plugin:window|set_closable",{label:this.label,value:t})}async setTitle(t){return B("plugin:window|set_title",{label:this.label,value:t})}async maximize(){return B("plugin:window|maximize",{label:this.label})}async unmaximize(){return B("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return B("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return B("plugin:window|minimize",{label:this.label})}async unminimize(){return B("plugin:window|unminimize",{label:this.label})}async show(){return B("plugin:window|show",{label:this.label})}async hide(){return B("plugin:window|hide",{label:this.label})}async close(){return B("plugin:window|close",{label:this.label})}async destroy(){return B("plugin:window|destroy",{label:this.label})}async setDecorations(t){return B("plugin:window|set_decorations",{label:this.label,value:t})}async setShadow(t){return B("plugin:window|set_shadow",{label:this.label,value:t})}async setEffects(t){return B("plugin:window|set_effects",{label:this.label,value:t})}async clearEffects(){return B("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(t){return B("plugin:window|set_always_on_top",{label:this.label,value:t})}async setAlwaysOnBottom(t){return B("plugin:window|set_always_on_bottom",{label:this.label,value:t})}async setContentProtected(t){return B("plugin:window|set_content_protected",{label:this.label,value:t})}async setSize(t){return B("plugin:window|set_size",{label:this.label,value:t instanceof Ra?t:new Ra(t)})}async setMinSize(t){return B("plugin:window|set_min_size",{label:this.label,value:t instanceof Ra?t:t?new Ra(t):null})}async setMaxSize(t){return B("plugin:window|set_max_size",{label:this.label,value:t instanceof Ra?t:t?new Ra(t):null})}async setSizeConstraints(t){function n(r){return r?{Logical:r}:null}return B("plugin:window|set_size_constraints",{label:this.label,value:{minWidth:n(t?.minWidth),minHeight:n(t?.minHeight),maxWidth:n(t?.maxWidth),maxHeight:n(t?.maxHeight)}})}async setPosition(t){return B("plugin:window|set_position",{label:this.label,value:t instanceof Ns?t:new Ns(t)})}async setFullscreen(t){return B("plugin:window|set_fullscreen",{label:this.label,value:t})}async setSimpleFullscreen(t){return B("plugin:window|set_simple_fullscreen",{label:this.label,value:t})}async setFocus(){return B("plugin:window|set_focus",{label:this.label})}async setFocusable(t){return B("plugin:window|set_focusable",{label:this.label,value:t})}async setIcon(t){return B("plugin:window|set_icon",{label:this.label,value:Xd(t)})}async setSkipTaskbar(t){return B("plugin:window|set_skip_taskbar",{label:this.label,value:t})}async setCursorGrab(t){return B("plugin:window|set_cursor_grab",{label:this.label,value:t})}async setCursorVisible(t){return B("plugin:window|set_cursor_visible",{label:this.label,value:t})}async setCursorIcon(t){return B("plugin:window|set_cursor_icon",{label:this.label,value:t})}async setBackgroundColor(t){return B("plugin:window|set_background_color",{color:t})}async setCursorPosition(t){return B("plugin:window|set_cursor_position",{label:this.label,value:t instanceof Ns?t:new Ns(t)})}async setIgnoreCursorEvents(t){return B("plugin:window|set_ignore_cursor_events",{label:this.label,value:t})}async startDragging(){return B("plugin:window|start_dragging",{label:this.label})}async startResizeDragging(t){return B("plugin:window|start_resize_dragging",{label:this.label,value:t})}async setBadgeCount(t){return B("plugin:window|set_badge_count",{label:this.label,value:t})}async setBadgeLabel(t){return B("plugin:window|set_badge_label",{label:this.label,value:t})}async setOverlayIcon(t){return B("plugin:window|set_overlay_icon",{label:this.label,value:t?Xd(t):void 0})}async setProgressBar(t){return B("plugin:window|set_progress_bar",{label:this.label,value:t})}async setVisibleOnAllWorkspaces(t){return B("plugin:window|set_visible_on_all_workspaces",{label:this.label,value:t})}async setTitleBarStyle(t){return B("plugin:window|set_title_bar_style",{label:this.label,value:t})}async setTheme(t){return B("plugin:window|set_theme",{label:this.label,value:t})}async onResized(t){return this.listen(Pn.WINDOW_RESIZED,n=>{n.payload=new Ms(n.payload),t(n)})}async onMoved(t){return this.listen(Pn.WINDOW_MOVED,n=>{n.payload=new zr(n.payload),t(n)})}async onCloseRequested(t){return this.listen(Pn.WINDOW_CLOSE_REQUESTED,async n=>{const r=new F5(n);await t(r),r.isPreventDefault()||await this.destroy()})}async onDragDropEvent(t){const n=await this.listen(Pn.DRAG_ENTER,o=>{t({...o,payload:{type:"enter",paths:o.payload.paths,position:new zr(o.payload.position)}})}),r=await this.listen(Pn.DRAG_OVER,o=>{t({...o,payload:{type:"over",position:new zr(o.payload.position)}})}),i=await this.listen(Pn.DRAG_DROP,o=>{t({...o,payload:{type:"drop",paths:o.payload.paths,position:new zr(o.payload.position)}})}),a=await this.listen(Pn.DRAG_LEAVE,o=>{t({...o,payload:{type:"leave"}})});return()=>{n(),i(),r(),a()}}async onFocusChanged(t){const n=await this.listen(Pn.WINDOW_FOCUS,i=>{t({...i,payload:!0})}),r=await this.listen(Pn.WINDOW_BLUR,i=>{t({...i,payload:!1})});return()=>{n(),r()}}async onScaleChanged(t){return this.listen(Pn.WINDOW_SCALE_FACTOR_CHANGED,t)}async onThemeChanged(t){return this.listen(Pn.WINDOW_THEME_CHANGED,t)}}var Uw;(function(e){e.Disabled="disabled",e.Throttle="throttle",e.Suspend="suspend"})(Uw||(Uw={}));var Kw;(function(e){e.Default="default",e.FluentOverlay="fluentOverlay"})(Kw||(Kw={}));var Vw;(function(e){e.AppearanceBased="appearanceBased",e.Light="light",e.Dark="dark",e.MediumLight="mediumLight",e.UltraDark="ultraDark",e.Titlebar="titlebar",e.Selection="selection",e.Menu="menu",e.Popover="popover",e.Sidebar="sidebar",e.HeaderView="headerView",e.Sheet="sheet",e.WindowBackground="windowBackground",e.HudWindow="hudWindow",e.FullScreenUI="fullScreenUI",e.Tooltip="tooltip",e.ContentBackground="contentBackground",e.UnderWindowBackground="underWindowBackground",e.UnderPageBackground="underPageBackground",e.Mica="mica",e.Blur="blur",e.Acrylic="acrylic",e.Tabbed="tabbed",e.TabbedDark="tabbedDark",e.TabbedLight="tabbedLight"})(Vw||(Vw={}));var qw;(function(e){e.FollowsWindowActiveState="followsWindowActiveState",e.Active="active",e.Inactive="inactive"})(qw||(qw={}));function zP(){return new gx(mx(),window.__TAURI_INTERNALS__.metadata.currentWebview.label,{skip:!0})}async function Gw(){return B("plugin:webview|get_all_webviews").then(e=>e.map(t=>new gx(new jp(t.windowLabel,{skip:!0}),t.label,{skip:!0})))}const Bh=["tauri://created","tauri://error"];class gx{constructor(t,n,r){this.window=t,this.label=n,this.listeners=Object.create(null),r?.skip||B("plugin:webview|create_webview",{windowLabel:t.label,options:{...r,label:n}}).then(async()=>this.emit("tauri://created")).catch(async i=>this.emit("tauri://error",i))}static async getByLabel(t){var n;return(n=(await Gw()).find(r=>r.label===t))!==null&&n!==void 0?n:null}static getCurrent(){return zP()}static async getAll(){return Gw()}async listen(t,n){return this._handleTauriEvent(t,n)?()=>{const r=this.listeners[t];r.splice(r.indexOf(n),1)}:Fe(t,n,{target:{kind:"Webview",label:this.label}})}async once(t,n){return this._handleTauriEvent(t,n)?()=>{const r=this.listeners[t];r.splice(r.indexOf(n),1)}:hx(t,n,{target:{kind:"Webview",label:this.label}})}async emit(t,n){if(Bh.includes(t)){for(const r of this.listeners[t]||[])r({event:t,id:-1,payload:n});return}return sa(t,n)}async emitTo(t,n,r){if(Bh.includes(n)){for(const i of this.listeners[n]||[])i({event:n,id:-1,payload:r});return}return Qn(t,n,r)}_handleTauriEvent(t,n){return Bh.includes(t)?(t in this.listeners?this.listeners[t].push(n):this.listeners[t]=[n],!0):!1}async position(){return B("plugin:webview|webview_position",{label:this.label}).then(t=>new zr(t))}async size(){return B("plugin:webview|webview_size",{label:this.label}).then(t=>new Ms(t))}async close(){return B("plugin:webview|webview_close",{label:this.label})}async setSize(t){return B("plugin:webview|set_webview_size",{label:this.label,value:t instanceof Ra?t:new Ra(t)})}async setPosition(t){return B("plugin:webview|set_webview_position",{label:this.label,value:t instanceof Ns?t:new Ns(t)})}async setFocus(){return B("plugin:webview|set_webview_focus",{label:this.label})}async setAutoResize(t){return B("plugin:webview|set_webview_auto_resize",{label:this.label,value:t})}async hide(){return B("plugin:webview|webview_hide",{label:this.label})}async show(){return B("plugin:webview|webview_show",{label:this.label})}async setZoom(t){return B("plugin:webview|set_webview_zoom",{label:this.label,value:t})}async reparent(t){return B("plugin:webview|reparent",{label:this.label,window:typeof t=="string"?t:t.label})}async clearAllBrowsingData(){return B("plugin:webview|clear_all_browsing_data")}async setBackgroundColor(t){return B("plugin:webview|set_webview_background_color",{color:t})}async onDragDropEvent(t){const n=await this.listen(Pn.DRAG_ENTER,o=>{t({...o,payload:{type:"enter",paths:o.payload.paths,position:new zr(o.payload.position)}})}),r=await this.listen(Pn.DRAG_OVER,o=>{t({...o,payload:{type:"over",position:new zr(o.payload.position)}})}),i=await this.listen(Pn.DRAG_DROP,o=>{t({...o,payload:{type:"drop",paths:o.payload.paths,position:new zr(o.payload.position)}})}),a=await this.listen(Pn.DRAG_LEAVE,o=>{t({...o,payload:{type:"leave"}})});return()=>{n(),i(),r(),a()}}}function Xr(){const e=zP();return new Gc(e.label,{skip:!0})}async function Yw(){return B("plugin:window|get_all_windows").then(e=>e.map(t=>new Gc(t,{skip:!0})))}class Gc{constructor(t,n={}){var r;this.label=t,this.listeners=Object.create(null),n?.skip||B("plugin:webview|create_webview_window",{options:{...n,parent:typeof n.parent=="string"?n.parent:(r=n.parent)===null||r===void 0?void 0:r.label,label:t}}).then(async()=>this.emit("tauri://created")).catch(async i=>this.emit("tauri://error",i))}static async getByLabel(t){var n;const r=(n=(await Yw()).find(i=>i.label===t))!==null&&n!==void 0?n:null;return r?new Gc(r.label,{skip:!0}):null}static getCurrent(){return Xr()}static async getAll(){return Yw()}async listen(t,n){return this._handleTauriEvent(t,n)?()=>{const r=this.listeners[t];r.splice(r.indexOf(n),1)}:Fe(t,n,{target:{kind:"WebviewWindow",label:this.label}})}async once(t,n){return this._handleTauriEvent(t,n)?()=>{const r=this.listeners[t];r.splice(r.indexOf(n),1)}:hx(t,n,{target:{kind:"WebviewWindow",label:this.label}})}async setBackgroundColor(t){return B("plugin:window|set_background_color",{color:t}).then(()=>B("plugin:webview|set_webview_background_color",{color:t}))}}B5(Gc,[jp,gx]);function B5(e,t){(Array.isArray(t)?t:[t]).forEach(n=>{Object.getOwnPropertyNames(n.prototype).forEach(r=>{var i;typeof e.prototype=="object"&&e.prototype&&r in e.prototype||Object.defineProperty(e.prototype,r,(i=Object.getOwnPropertyDescriptor(n.prototype,r))!==null&&i!==void 0?i:Object.create(null))})})}function W5(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const H5=e=>{switch(e){case"success":return V5;case"info":return G5;case"warning":return q5;case"error":return Y5;default:return null}},U5=Array(12).fill(0),K5=({visible:e,className:t})=>he.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},he.createElement("div",{className:"sonner-spinner"},U5.map((n,r)=>he.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),V5=he.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},he.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),q5=he.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},he.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),G5=he.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},he.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Y5=he.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},he.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),X5=he.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},he.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),he.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Z5=()=>{const[e,t]=he.useState(document.hidden);return he.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let vy=1;class Q5{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...i}=t,a=typeof t?.id=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:vy++,o=this.toasts.find(l=>l.id===a),s=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),o?this.toasts=this.toasts.map(l=>l.id===a?(this.publish({...l,...t,id:a,title:r}),{...l,...t,id:a,dismissible:s,title:r}):l):this.addToast({title:r,...i,dismissible:s,id:a}),a},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const i=Promise.resolve(t instanceof Function?t():t);let a=r!==void 0,o;const s=i.then(async c=>{if(o=["resolve",c],he.isValidElement(c))a=!1,this.create({id:r,type:"default",message:c});else if(e4(c)&&!c.ok){a=!1;const d=typeof n.error=="function"?await n.error(`HTTP error! status: ${c.status}`):n.error,p=typeof n.description=="function"?await n.description(`HTTP error! status: ${c.status}`):n.description,y=typeof d=="object"&&!he.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:p,...y})}else if(c instanceof Error){a=!1;const d=typeof n.error=="function"?await n.error(c):n.error,p=typeof n.description=="function"?await n.description(c):n.description,y=typeof d=="object"&&!he.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:p,...y})}else if(n.success!==void 0){a=!1;const d=typeof n.success=="function"?await n.success(c):n.success,p=typeof n.description=="function"?await n.description(c):n.description,y=typeof d=="object"&&!he.isValidElement(d)?d:{message:d};this.create({id:r,type:"success",description:p,...y})}}).catch(async c=>{if(o=["reject",c],n.error!==void 0){a=!1;const f=typeof n.error=="function"?await n.error(c):n.error,d=typeof n.description=="function"?await n.description(c):n.description,m=typeof f=="object"&&!he.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:d,...m})}}).finally(()=>{a&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((c,f)=>s.then(()=>o[0]==="reject"?f(o[1]):c(o[1])).catch(f));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(t,n)=>{const r=n?.id||vy++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const ir=new Q5,J5=(e,t)=>{const n=t?.id||vy++;return ir.addToast({title:e,...t,id:n}),n},e4=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",t4=J5,n4=()=>ir.toasts,r4=()=>ir.getActiveToasts(),xe=Object.assign(t4,{success:ir.success,info:ir.info,warning:ir.warning,error:ir.error,custom:ir.custom,message:ir.message,promise:ir.promise,dismiss:ir.dismiss,loading:ir.loading},{getHistory:n4,getToasts:r4});W5("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Pu(e){return e.label!==void 0}const i4=3,a4="24px",o4="16px",Xw=4e3,s4=356,l4=14,c4=45,u4=200;function gi(...e){return e.filter(Boolean).join(" ")}function d4(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const f4=e=>{var t,n,r,i,a,o,s,l,c;const{invert:f,toast:d,unstyled:p,interacting:m,setHeights:y,visibleToasts:g,heights:x,index:v,toasts:b,expanded:w,removeToast:k,defaultRichColors:S,closeButton:E,style:j,cancelButtonStyle:_,actionButtonStyle:P,className:C="",descriptionClassName:T="",duration:O,position:M,gap:R,expandByDefault:N,classNames:A,icons:D,closeButtonAriaLabel:H="Close toast"}=e,[z,$]=he.useState(null),[re,Q]=he.useState(null),[V,I]=he.useState(!1),[L,W]=he.useState(!1),[te,U]=he.useState(!1),[q,ee]=he.useState(!1),[ue,Y]=he.useState(!1),[fe,me]=he.useState(0),[je,ye]=he.useState(0),ve=he.useRef(d.duration||O||Xw),Oe=he.useRef(null),ge=he.useRef(null),Re=v===0,oe=v+1<=g,de=d.type,K=d.dismissible!==!1,se=d.className||"",be=d.descriptionClassName||"",Pe=he.useMemo(()=>x.findIndex(We=>We.toastId===d.id)||0,[x,d.id]),ae=he.useMemo(()=>{var We;return(We=d.closeButton)!=null?We:E},[d.closeButton,E]),Ye=he.useMemo(()=>d.duration||O||Xw,[d.duration,O]),Ze=he.useRef(0),Qe=he.useRef(0),Ne=he.useRef(0),Le=he.useRef(null),[lt,In]=M.split("-"),nn=he.useMemo(()=>x.reduce((We,xt,Rt)=>Rt>=Pe?We:We+xt.height,0),[x,Pe]),Ar=Z5(),vr=d.invert||f,nt=de==="loading";Qe.current=he.useMemo(()=>Pe*R+nn,[Pe,nn]),he.useEffect(()=>{ve.current=Ye},[Ye]),he.useEffect(()=>{I(!0)},[]),he.useEffect(()=>{const We=ge.current;if(We){const xt=We.getBoundingClientRect().height;return ye(xt),y(Rt=>[{toastId:d.id,height:xt,position:d.position},...Rt]),()=>y(Rt=>Rt.filter(rn=>rn.toastId!==d.id))}},[y,d.id]),he.useLayoutEffect(()=>{if(!V)return;const We=ge.current,xt=We.style.height;We.style.height="auto";const Rt=We.getBoundingClientRect().height;We.style.height=xt,ye(Rt),y(rn=>rn.find(kt=>kt.toastId===d.id)?rn.map(kt=>kt.toastId===d.id?{...kt,height:Rt}:kt):[{toastId:d.id,height:Rt,position:d.position},...rn])},[V,d.title,d.description,y,d.id,d.jsx,d.action,d.cancel]);const vt=he.useCallback(()=>{W(!0),me(Qe.current),y(We=>We.filter(xt=>xt.toastId!==d.id)),setTimeout(()=>{k(d)},u4)},[d,k,y,Qe]);he.useEffect(()=>{if(d.promise&&de==="loading"||d.duration===1/0||d.type==="loading")return;let We;return w||m||Ar?(()=>{if(Ne.current<Ze.current){const rn=new Date().getTime()-Ze.current;ve.current=ve.current-rn}Ne.current=new Date().getTime()})():ve.current!==1/0&&(Ze.current=new Date().getTime(),We=setTimeout(()=>{d.onAutoClose==null||d.onAutoClose.call(d,d),vt()},ve.current)),()=>clearTimeout(We)},[w,m,d,de,Ar,vt]),he.useEffect(()=>{d.delete&&(vt(),d.onDismiss==null||d.onDismiss.call(d,d))},[vt,d.delete]);function Sn(){var We;if(D?.loading){var xt;return he.createElement("div",{className:gi(A?.loader,d==null||(xt=d.classNames)==null?void 0:xt.loader,"sonner-loader"),"data-visible":de==="loading"},D.loading)}return he.createElement(K5,{className:gi(A?.loader,d==null||(We=d.classNames)==null?void 0:We.loader),visible:de==="loading"})}const Wt=d.icon||D?.[de]||H5(de);var Kn,mn;return he.createElement("li",{tabIndex:0,ref:ge,className:gi(C,se,A?.toast,d==null||(t=d.classNames)==null?void 0:t.toast,A?.default,A?.[de],d==null||(n=d.classNames)==null?void 0:n[de]),"data-sonner-toast":"","data-rich-colors":(Kn=d.richColors)!=null?Kn:S,"data-styled":!(d.jsx||d.unstyled||p),"data-mounted":V,"data-promise":!!d.promise,"data-swiped":ue,"data-removed":L,"data-visible":oe,"data-y-position":lt,"data-x-position":In,"data-index":v,"data-front":Re,"data-swiping":te,"data-dismissible":K,"data-type":de,"data-invert":vr,"data-swipe-out":q,"data-swipe-direction":re,"data-expanded":!!(w||N&&V),"data-testid":d.testId,style:{"--index":v,"--toasts-before":v,"--z-index":b.length-v,"--offset":`${L?fe:Qe.current}px`,"--initial-height":N?"auto":`${je}px`,...j,...d.style},onDragEnd:()=>{U(!1),$(null),Le.current=null},onPointerDown:We=>{We.button!==2&&(nt||!K||(Oe.current=new Date,me(Qe.current),We.target.setPointerCapture(We.pointerId),We.target.tagName!=="BUTTON"&&(U(!0),Le.current={x:We.clientX,y:We.clientY})))},onPointerUp:()=>{var We,xt,Rt;if(q||!K)return;Le.current=null;const rn=Number(((We=ge.current)==null?void 0:We.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),xr=Number(((xt=ge.current)==null?void 0:xt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),kt=new Date().getTime()-((Rt=Oe.current)==null?void 0:Rt.getTime()),kn=z==="x"?rn:xr,hi=Math.abs(kn)/kt;if(Math.abs(kn)>=c4||hi>.11){me(Qe.current),d.onDismiss==null||d.onDismiss.call(d,d),Q(z==="x"?rn>0?"right":"left":xr>0?"down":"up"),vt(),ee(!0);return}else{var Dn,F;(Dn=ge.current)==null||Dn.style.setProperty("--swipe-amount-x","0px"),(F=ge.current)==null||F.style.setProperty("--swipe-amount-y","0px")}Y(!1),U(!1),$(null)},onPointerMove:We=>{var xt,Rt,rn;if(!Le.current||!K||((xt=window.getSelection())==null?void 0:xt.toString().length)>0)return;const kt=We.clientY-Le.current.y,kn=We.clientX-Le.current.x;var hi;const Dn=(hi=e.swipeDirections)!=null?hi:d4(M);!z&&(Math.abs(kn)>1||Math.abs(kt)>1)&&$(Math.abs(kn)>Math.abs(kt)?"x":"y");let F={x:0,y:0};const G=X=>1/(1.5+Math.abs(X)/20);if(z==="y"){if(Dn.includes("top")||Dn.includes("bottom"))if(Dn.includes("top")&&kt<0||Dn.includes("bottom")&&kt>0)F.y=kt;else{const X=kt*G(kt);F.y=Math.abs(X)<Math.abs(kt)?X:kt}}else if(z==="x"&&(Dn.includes("left")||Dn.includes("right")))if(Dn.includes("left")&&kn<0||Dn.includes("right")&&kn>0)F.x=kn;else{const X=kn*G(kn);F.x=Math.abs(X)<Math.abs(kn)?X:kn}(Math.abs(F.x)>0||Math.abs(F.y)>0)&&Y(!0),(Rt=ge.current)==null||Rt.style.setProperty("--swipe-amount-x",`${F.x}px`),(rn=ge.current)==null||rn.style.setProperty("--swipe-amount-y",`${F.y}px`)}},ae&&!d.jsx&&de!=="loading"?he.createElement("button",{"aria-label":H,"data-disabled":nt,"data-close-button":!0,onClick:nt||!K?()=>{}:()=>{vt(),d.onDismiss==null||d.onDismiss.call(d,d)},className:gi(A?.closeButton,d==null||(r=d.classNames)==null?void 0:r.closeButton)},(mn=D?.close)!=null?mn:X5):null,(de||d.icon||d.promise)&&d.icon!==null&&(D?.[de]!==null||d.icon)?he.createElement("div",{"data-icon":"",className:gi(A?.icon,d==null||(i=d.classNames)==null?void 0:i.icon)},d.promise||d.type==="loading"&&!d.icon?d.icon||Sn():null,d.type!=="loading"?Wt:null):null,he.createElement("div",{"data-content":"",className:gi(A?.content,d==null||(a=d.classNames)==null?void 0:a.content)},he.createElement("div",{"data-title":"",className:gi(A?.title,d==null||(o=d.classNames)==null?void 0:o.title)},d.jsx?d.jsx:typeof d.title=="function"?d.title():d.title),d.description?he.createElement("div",{"data-description":"",className:gi(T,be,A?.description,d==null||(s=d.classNames)==null?void 0:s.description)},typeof d.description=="function"?d.description():d.description):null),he.isValidElement(d.cancel)?d.cancel:d.cancel&&Pu(d.cancel)?he.createElement("button",{"data-button":!0,"data-cancel":!0,style:d.cancelButtonStyle||_,onClick:We=>{Pu(d.cancel)&&K&&(d.cancel.onClick==null||d.cancel.onClick.call(d.cancel,We),vt())},className:gi(A?.cancelButton,d==null||(l=d.classNames)==null?void 0:l.cancelButton)},d.cancel.label):null,he.isValidElement(d.action)?d.action:d.action&&Pu(d.action)?he.createElement("button",{"data-button":!0,"data-action":!0,style:d.actionButtonStyle||P,onClick:We=>{Pu(d.action)&&(d.action.onClick==null||d.action.onClick.call(d.action,We),!We.defaultPrevented&&vt())},className:gi(A?.actionButton,d==null||(c=d.classNames)==null?void 0:c.actionButton)},d.action.label):null)};function Zw(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function p4(e,t){const n={};return[e,t].forEach((r,i)=>{const a=i===1,o=a?"--mobile-offset":"--offset",s=a?o4:a4;function l(c){["top","right","bottom","left"].forEach(f=>{n[`${o}-${f}`]=typeof c=="number"?`${c}px`:c})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(c=>{r[c]===void 0?n[`${o}-${c}`]=s:n[`${o}-${c}`]=typeof r[c]=="number"?`${r[c]}px`:r[c]}):l(s)}),n}const h4=he.forwardRef(function(t,n){const{id:r,invert:i,position:a="bottom-right",hotkey:o=["altKey","KeyT"],expand:s,closeButton:l,className:c,offset:f,mobileOffset:d,theme:p="light",richColors:m,duration:y,style:g,visibleToasts:x=i4,toastOptions:v,dir:b=Zw(),gap:w=l4,icons:k,containerAriaLabel:S="Notifications"}=t,[E,j]=he.useState([]),_=he.useMemo(()=>r?E.filter(V=>V.toasterId===r):E.filter(V=>!V.toasterId),[E,r]),P=he.useMemo(()=>Array.from(new Set([a].concat(_.filter(V=>V.position).map(V=>V.position)))),[_,a]),[C,T]=he.useState([]),[O,M]=he.useState(!1),[R,N]=he.useState(!1),[A,D]=he.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),H=he.useRef(null),z=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),$=he.useRef(null),re=he.useRef(!1),Q=he.useCallback(V=>{j(I=>{var L;return(L=I.find(W=>W.id===V.id))!=null&&L.delete||ir.dismiss(V.id),I.filter(({id:W})=>W!==V.id)})},[]);return he.useEffect(()=>ir.subscribe(V=>{if(V.dismiss){requestAnimationFrame(()=>{j(I=>I.map(L=>L.id===V.id?{...L,delete:!0}:L))});return}setTimeout(()=>{$5.flushSync(()=>{j(I=>{const L=I.findIndex(W=>W.id===V.id);return L!==-1?[...I.slice(0,L),{...I[L],...V},...I.slice(L+1)]:[V,...I]})})})}),[E]),he.useEffect(()=>{if(p!=="system"){D(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?D("dark"):D("light")),typeof window>"u")return;const V=window.matchMedia("(prefers-color-scheme: dark)");try{V.addEventListener("change",({matches:I})=>{D(I?"dark":"light")})}catch{V.addListener(({matches:L})=>{try{D(L?"dark":"light")}catch(W){console.error(W)}})}},[p]),he.useEffect(()=>{E.length<=1&&M(!1)},[E]),he.useEffect(()=>{const V=I=>{var L;if(o.every(U=>I[U]||I.code===U)){var te;M(!0),(te=H.current)==null||te.focus()}I.code==="Escape"&&(document.activeElement===H.current||(L=H.current)!=null&&L.contains(document.activeElement))&&M(!1)};return document.addEventListener("keydown",V),()=>document.removeEventListener("keydown",V)},[o]),he.useEffect(()=>{if(H.current)return()=>{$.current&&($.current.focus({preventScroll:!0}),$.current=null,re.current=!1)}},[H.current]),he.createElement("section",{ref:n,"aria-label":`${S} ${z}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},P.map((V,I)=>{var L;const[W,te]=V.split("-");return _.length?he.createElement("ol",{key:V,dir:b==="auto"?Zw():b,tabIndex:-1,ref:H,className:c,"data-sonner-toaster":!0,"data-sonner-theme":A,"data-y-position":W,"data-x-position":te,style:{"--front-toast-height":`${((L=C[0])==null?void 0:L.height)||0}px`,"--width":`${s4}px`,"--gap":`${w}px`,...g,...p4(f,d)},onBlur:U=>{re.current&&!U.currentTarget.contains(U.relatedTarget)&&(re.current=!1,$.current&&($.current.focus({preventScroll:!0}),$.current=null))},onFocus:U=>{U.target instanceof HTMLElement&&U.target.dataset.dismissible==="false"||re.current||(re.current=!0,$.current=U.relatedTarget)},onMouseEnter:()=>M(!0),onMouseMove:()=>M(!0),onMouseLeave:()=>{R||M(!1)},onDragEnd:()=>M(!1),onPointerDown:U=>{U.target instanceof HTMLElement&&U.target.dataset.dismissible==="false"||N(!0)},onPointerUp:()=>N(!1)},_.filter(U=>!U.position&&I===0||U.position===V).map((U,q)=>{var ee,ue;return he.createElement(f4,{key:U.id,icons:k,index:q,toast:U,defaultRichColors:m,duration:(ee=v?.duration)!=null?ee:y,className:v?.className,descriptionClassName:v?.descriptionClassName,invert:i,visibleToasts:x,closeButton:(ue=v?.closeButton)!=null?ue:l,interacting:R,position:V,style:v?.style,unstyled:v?.unstyled,classNames:v?.classNames,cancelButtonStyle:v?.cancelButtonStyle,actionButtonStyle:v?.actionButtonStyle,closeButtonAriaLabel:v?.closeButtonAriaLabel,removeToast:Q,toasts:_.filter(Y=>Y.position==U.position),heights:C.filter(Y=>Y.position==U.position),setHeights:T,expandByDefault:s,gap:w,expanded:O,swipeDirections:t.swipeDirections})})):null}))});var Ei;(function(e){e[e.Trace=1]="Trace",e[e.Debug=2]="Debug",e[e.Info=3]="Info",e[e.Warn=4]="Warn",e[e.Error=5]="Error"})(Ei||(Ei={}));function m4(e){if(e)if(e.startsWith("Error")){const n=e.split(`
|