import{b as Wi,r as E,a as gu,R as he,d as Oa,e as x5,f as t1,j as it}from"./react-5ymxe2zI.js";import{a as Tn,w as n1,g as w5}from"./lodash-DjnzTbaI.js";var Ic={exports:{}},Oc={};/** * @license React * use-sync-external-store-shim.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var qm;function $5(){if(qm)return Oc;qm=1;var e=Wi();function t(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,o=e.useLayoutEffect,a=e.useDebugValue;function u(d,f){var p=f(),h=r({inst:{value:p,getSnapshot:f}}),m=h[0].inst,g=h[1];return o(function(){m.value=p,m.getSnapshot=f,s(m)&&g({inst:m})},[d,p,f]),i(function(){return s(m)&&g({inst:m}),d(function(){s(m)&&g({inst:m})})},[d]),a(p),p}function s(d){var f=d.getSnapshot;d=d.value;try{var p=f();return!n(d,p)}catch{return!0}}function l(d,f){return f()}var c=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?l:u;return Oc.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:c,Oc}var Gm;function r1(){return Gm||(Gm=1,Ic.exports=$5()),Ic.exports}var D5=r1(),kc={exports:{}},_c={};/** * @license React * use-sync-external-store-shim/with-selector.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Ym;function C5(){if(Ym)return _c;Ym=1;var e=Wi(),t=r1();function n(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,a=e.useEffect,u=e.useMemo,s=e.useDebugValue;return _c.useSyncExternalStoreWithSelector=function(l,c,d,f,p){var h=o(null);if(h.current===null){var m={hasValue:!1,value:null};h.current=m}else m=h.current;h=u(function(){function v(O){if(!b){if(b=!0,R=O,O=f(O),p!==void 0&&m.hasValue){var M=m.value;if(p(M,O))return S=M}return S=O}if(M=S,r(R,O))return M;var x=f(O);return p!==void 0&&p(M,x)?(R=O,M):(R=O,S=x)}var b=!1,R,S,w=d===void 0?null:d;return[function(){return v(c())},w===null?void 0:function(){return v(w())}]},[c,d,f,p]);var g=i(l,h[0],h[1]);return a(function(){m.hasValue=!0,m.value=g},[g]),s(g),g},_c}var Zm;function S5(){return Zm||(Zm=1,kc.exports=C5()),kc.exports}var T5=S5();function R5(e){e()}let i1=R5;const A5=e=>i1=e,P5=()=>i1,Xm=Symbol.for("react-redux-context"),Qm=typeof globalThis<"u"?globalThis:{};function I5(){var e;if(!E.createContext)return{};const t=(e=Qm[Xm])!=null?e:Qm[Xm]=new Map;let n=t.get(E.createContext);return n||(n=E.createContext(null),t.set(E.createContext,n)),n}const Dr=I5();function nh(e=Dr){return function(){return E.useContext(e)}}const o1=nh(),a1=()=>{throw new Error("uSES not initialized!")};let u1=a1;const O5=e=>{u1=e},k5=(e,t)=>e===t;function _5(e=Dr){const t=e===Dr?o1:nh(e);return function(r,i={}){const{equalityFn:o=k5,stabilityCheck:a=void 0,noopCheck:u=void 0}=typeof i=="function"?{equalityFn:i}:i,{store:s,subscription:l,getServerState:c,stabilityCheck:d,noopCheck:f}=t();E.useRef(!0);const p=E.useCallback({[r.name](m){return r(m)}}[r.name],[r,d,a]),h=u1(l.addNestedSub,s.getState,c||s.getState,p,o);return E.useDebugValue(h),h}}const M5=_5();function we(){return we=Object.assign?Object.assign.bind():function(e){for(var t=1;tt(i(...o)))}return n}function Mf(e){return function(n){const r=e(n);function i(){return r}return i.dependsOnOwnProps=!1,i}}function ig(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function s1(e,t){return function(r,{displayName:i}){const o=function(u,s){return o.dependsOnOwnProps?o.mapToProps(u,s):o.mapToProps(u,void 0)};return o.dependsOnOwnProps=!0,o.mapToProps=function(u,s){o.mapToProps=e,o.dependsOnOwnProps=ig(e);let l=o(u,s);return typeof l=="function"&&(o.mapToProps=l,o.dependsOnOwnProps=ig(l),l=o(u,s)),l},o}}function l1(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function q5(e){return e&&typeof e=="object"?Mf(t=>W5(e,t)):e?typeof e=="function"?s1(e):l1(e,"mapDispatchToProps"):Mf(t=>({dispatch:t}))}function G5(e){return e?typeof e=="function"?s1(e):l1(e,"mapStateToProps"):Mf(()=>({}))}function Y5(e,t,n){return we({},n,e,t)}function Z5(e){return()=>Y5}function X5(){const e=P5();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const og={notify(){},get:()=>[]};function c1(e,t){let n,r=og,i=0,o=!1;function a(m){c();const g=r.subscribe(m);let v=!1;return()=>{v||(v=!0,g(),d())}}function u(){r.notify()}function s(){h.onStateChange&&h.onStateChange()}function l(){return o}function c(){i++,n||(n=t?t.addNestedSub(s):e.subscribe(s),r=X5())}function d(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=og)}function f(){o||(o=!0,c())}function p(){o&&(o=!1,d())}const h={addNestedSub:a,notifyNestedSubs:u,handleChangeWrapper:s,isSubscribed:l,trySubscribe:f,tryUnsubscribe:p,getListeners:()=>r};return h}const Q5=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",qs=Q5?E.useLayoutEffect:E.useEffect;function ag(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function Qr(e,t){if(ag(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i=0;i{d1=e},t2=[null,null];function n2(e,t,n){qs(()=>e(...t),n)}function r2(e,t,n,r,i,o){e.current=r,n.current=!1,i.current&&(i.current=null,o())}function i2(e,t,n,r,i,o,a,u,s,l,c){if(!e)return()=>{};let d=!1,f=null;const p=()=>{if(d||!u.current)return;const m=t.getState();let g,v;try{g=r(m,i.current)}catch(b){v=b,f=b}v||(f=null),g===o.current?a.current||l():(o.current=g,s.current=g,a.current=!0,c())};return n.onStateChange=p,n.trySubscribe(),p(),()=>{if(d=!0,n.tryUnsubscribe(),n.onStateChange=null,f)throw f}}function o2(e,t){return e===t}function uU(e,t,n,{pure:r,areStatesEqual:i=o2,areOwnPropsEqual:o=Qr,areStatePropsEqual:a=Qr,areMergedPropsEqual:u=Qr,forwardRef:s=!1,context:l=Dr}={}){const c=l,d=G5(e),f=q5(t),p=Z5(),h=!!e;return g=>{const v=g.displayName||g.name||"Component",b=`Connect(${v})`,R={shouldHandleStateChanges:h,displayName:b,wrappedComponentName:v,WrappedComponent:g,initMapStateToProps:d,initMapDispatchToProps:f,initMergeProps:p,areStatesEqual:i,areStatePropsEqual:a,areOwnPropsEqual:o,areMergedPropsEqual:u};function S(M){const[x,I,$]=E.useMemo(()=>{const{reactReduxForwardedRef:z}=M,ee=yn(M,J5);return[M.context,z,ee]},[M]),y=E.useMemo(()=>x&&x.Consumer&&j5.isContextConsumer(E.createElement(x.Consumer,null))?x:c,[x,c]),P=E.useContext(y),D=!!M.store&&!!M.store.getState&&!!M.store.dispatch,C=!!P&&!!P.store,k=D?M.store:P.store,_=C?P.getServerState:k.getState,T=E.useMemo(()=>z5(k.dispatch,R),[k]),[A,F]=E.useMemo(()=>{if(!h)return t2;const z=c1(k,D?void 0:P.subscription),ee=z.notifyNestedSubs.bind(z);return[z,ee]},[k,D,P]),L=E.useMemo(()=>D?P:we({},P,{subscription:A}),[D,P,A]),N=E.useRef(),B=E.useRef($),H=E.useRef(),W=E.useRef(!1);E.useRef(!1);const V=E.useRef(!1),q=E.useRef();qs(()=>(V.current=!0,()=>{V.current=!1}),[]);const Z=E.useMemo(()=>()=>H.current&&$===B.current?H.current:T(k.getState(),$),[k,$]),j=E.useMemo(()=>ee=>A?i2(h,k,A,T,B,N,W,V,H,F,ee):()=>{},[A]);n2(r2,[B,N,W,$,H,F]);let Q;try{Q=d1(j,Z,_?()=>T(_(),$):Z)}catch(z){throw q.current&&(z.message+=` The error may be correlated with this previous error: ${q.current.stack} `),z}qs(()=>{q.current=void 0,H.current=void 0,N.current=Q});const ne=E.useMemo(()=>E.createElement(g,we({},Q,{ref:I})),[I,g,Q]);return E.useMemo(()=>h?E.createElement(y.Provider,{value:L},ne):ne,[y,ne,L])}const O=E.memo(S);if(O.WrappedComponent=g,O.displayName=S.displayName=b,s){const x=E.forwardRef(function($,y){return E.createElement(O,we({},$,{reactReduxForwardedRef:y}))});return x.displayName=b,x.WrappedComponent=g,_f(x,g)}return _f(O,g)}}function sU({store:e,context:t,children:n,serverState:r,stabilityCheck:i="once",noopCheck:o="once"}){const a=E.useMemo(()=>{const l=c1(e);return{store:e,subscription:l,getServerState:r?()=>r:void 0,stabilityCheck:i,noopCheck:o}},[e,r,i,o]),u=E.useMemo(()=>e.getState(),[e]);qs(()=>{const{subscription:l}=a;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),u!==e.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[a,u]);const s=t||Dr;return E.createElement(s.Provider,{value:a},n)}function f1(e=Dr){const t=e===Dr?o1:nh(e);return function(){const{store:r}=t();return r}}const p1=f1();function a2(e=Dr){const t=e===Dr?p1:f1(e);return function(){return t().dispatch}}const u2=a2();O5(T5.useSyncExternalStoreWithSelector);e2(D5.useSyncExternalStore);A5(gu.unstable_batchedUpdates);var Zo={},ug;function s2(){if(ug)return Zo;ug=1,Object.defineProperty(Zo,"__esModule",{value:!0}),Zo.parse=a,Zo.serialize=l;const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,n=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,r=/^[\u0020-\u003A\u003D-\u007E]*$/,i=Object.prototype.toString,o=(()=>{const f=function(){};return f.prototype=Object.create(null),f})();function a(f,p){const h=new o,m=f.length;if(m<2)return h;const g=p?.decode||c;let v=0;do{const b=f.indexOf("=",v);if(b===-1)break;const R=f.indexOf(";",v),S=R===-1?m:R;if(b>S){v=f.lastIndexOf(";",b-1)+1;continue}const w=u(f,v,b),O=s(f,b,w),M=f.slice(w,O);if(h[M]===void 0){let x=u(f,b+1,S),I=s(f,S,x);const $=g(f.slice(x,I));h[M]=$}v=S+1}while(vh;){const m=f.charCodeAt(--p);if(m!==32&&m!==9)return p+1}return h}function l(f,p,h){const m=h?.encode||encodeURIComponent;if(!e.test(f))throw new TypeError(`argument name is invalid: ${f}`);const g=m(p);if(!t.test(g))throw new TypeError(`argument val is invalid: ${p}`);let v=f+"="+g;if(!h)return v;if(h.maxAge!==void 0){if(!Number.isInteger(h.maxAge))throw new TypeError(`option maxAge is invalid: ${h.maxAge}`);v+="; Max-Age="+h.maxAge}if(h.domain){if(!n.test(h.domain))throw new TypeError(`option domain is invalid: ${h.domain}`);v+="; Domain="+h.domain}if(h.path){if(!r.test(h.path))throw new TypeError(`option path is invalid: ${h.path}`);v+="; Path="+h.path}if(h.expires){if(!d(h.expires)||!Number.isFinite(h.expires.valueOf()))throw new TypeError(`option expires is invalid: ${h.expires}`);v+="; Expires="+h.expires.toUTCString()}if(h.httpOnly&&(v+="; HttpOnly"),h.secure&&(v+="; Secure"),h.partitioned&&(v+="; Partitioned"),h.priority)switch(typeof h.priority=="string"?h.priority.toLowerCase():void 0){case"low":v+="; Priority=Low";break;case"medium":v+="; Priority=Medium";break;case"high":v+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${h.priority}`)}if(h.sameSite)switch(typeof h.sameSite=="string"?h.sameSite.toLowerCase():h.sameSite){case!0:case"strict":v+="; SameSite=Strict";break;case"lax":v+="; SameSite=Lax";break;case"none":v+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${h.sameSite}`)}return v}function c(f){if(f.indexOf("%")===-1)return f;try{return decodeURIComponent(f)}catch{return f}}function d(f){return i.call(f)==="[object Date]"}return Zo}s2();var sg="popstate";function l2(e={}){function t(r,i){let{pathname:o,search:a,hash:u}=r.location;return Ff("",{pathname:o,search:a,hash:u},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:Ga(i)}return d2(t,n,null,e)}function Ke(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function wn(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function c2(){return Math.random().toString(36).substring(2,10)}function lg(e,t){return{usr:e.state,key:e.key,idx:t}}function Ff(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?No(t):t,state:n,key:t&&t.key||r||c2()}}function Ga({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 No(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 d2(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:o=!1}=r,a=i.history,u="POP",s=null,l=c();l==null&&(l=0,a.replaceState({...a.state,idx:l},""));function c(){return(a.state||{idx:null}).idx}function d(){u="POP";let g=c(),v=g==null?null:g-l;l=g,s&&s({action:u,location:m.location,delta:v})}function f(g,v){u="PUSH";let b=Ff(m.location,g,v);l=c()+1;let R=lg(b,l),S=m.createHref(b);try{a.pushState(R,"",S)}catch(w){if(w instanceof DOMException&&w.name==="DataCloneError")throw w;i.location.assign(S)}o&&s&&s({action:u,location:m.location,delta:1})}function p(g,v){u="REPLACE";let b=Ff(m.location,g,v);l=c();let R=lg(b,l),S=m.createHref(b);a.replaceState(R,"",S),o&&s&&s({action:u,location:m.location,delta:0})}function h(g){return f2(g)}let m={get action(){return u},get location(){return e(i,a)},listen(g){if(s)throw new Error("A history only accepts one active listener");return i.addEventListener(sg,d),s=g,()=>{i.removeEventListener(sg,d),s=null}},createHref(g){return t(i,g)},createURL:h,encodeLocation(g){let v=h(g);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:f,replace:p,go(g){return a.go(g)}};return m}function f2(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Ke(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:Ga(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function h1(e,t,n="/"){return p2(e,t,n,!1)}function p2(e,t,n,r){let i=typeof t=="string"?No(t):t,o=Cr(i.pathname||"/",n);if(o==null)return null;let a=m1(e);h2(a);let u=null;for(let s=0;u==null&&s{let s={relativePath:u===void 0?o.path||"":u,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};s.relativePath.startsWith("/")&&(Ke(s.relativePath.startsWith(r),`Absolute route path "${s.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),s.relativePath=s.relativePath.slice(r.length));let l=Er([r,s.relativePath]),c=n.concat(s);o.children&&o.children.length>0&&(Ke(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),m1(o.children,t,c,l)),!(o.path==null&&!o.index)&&t.push({path:l,score:x2(l,o.index),routesMeta:c})};return e.forEach((o,a)=>{if(o.path===""||!o.path?.includes("?"))i(o,a);else for(let u of g1(o.path))i(o,a,u)}),t}function g1(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let a=g1(r.join("/")),u=[];return u.push(...a.map(s=>s===""?o:[o,s].join("/"))),i&&u.push(...a),u.map(s=>e.startsWith("/")&&s===""?"/":s)}function h2(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:w2(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var m2=/^:[\w-]+$/,g2=3,v2=2,y2=1,b2=10,E2=-2,cg=e=>e==="*";function x2(e,t){let n=e.split("/"),r=n.length;return n.some(cg)&&(r+=E2),t&&(r+=v2),n.filter(i=>!cg(i)).reduce((i,o)=>i+(m2.test(o)?g2:o===""?y2:b2),r)}function w2(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 $2(e,t,n=!1){let{routesMeta:r}=e,i={},o="/",a=[];for(let u=0;u{if(c==="*"){let h=u[f]||"";a=o.slice(0,o.length-h.length).replace(/(.)\/+$/,"$1")}const p=u[f];return d&&!p?l[c]=void 0:l[c]=(p||"").replace(/%2F/g,"/"),l},{}),pathname:o,pathnameBase:a,pattern:e}}function D2(e,t=!1,n=!0){wn(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,(a,u,s)=>(r.push({paramName:u,isOptional:s!=null}),s?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function C2(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return wn(!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 Cr(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 S2(e,t="/"){let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?No(e):e;return{pathname:n?n.startsWith("/")?n:T2(n,t):t,search:P2(r),hash:I2(i)}}function T2(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Nc(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 and the router will parse it for you.`}function R2(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function rh(e){let t=R2(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function ih(e,t,n,r=!1){let i;typeof e=="string"?i=No(e):(i={...e},Ke(!i.pathname||!i.pathname.includes("?"),Nc("?","pathname","search",i)),Ke(!i.pathname||!i.pathname.includes("#"),Nc("#","pathname","hash",i)),Ke(!i.search||!i.search.includes("#"),Nc("#","search","hash",i)));let o=e===""||i.pathname==="",a=o?"/":i.pathname,u;if(a==null)u=n;else{let d=t.length-1;if(!r&&a.startsWith("..")){let f=a.split("/");for(;f[0]==="..";)f.shift(),d-=1;i.pathname=f.join("/")}u=d>=0?t[d]:"/"}let s=S2(i,u),l=a&&a!=="/"&&a.endsWith("/"),c=(o||a===".")&&n.endsWith("/");return!s.pathname.endsWith("/")&&(l||c)&&(s.pathname+="/"),s}var Er=e=>e.join("/").replace(/\/\/+/g,"/"),A2=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),P2=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,I2=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function O2(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var v1=["POST","PUT","PATCH","DELETE"];new Set(v1);var k2=["GET",...v1];new Set(k2);var Bo=E.createContext(null);Bo.displayName="DataRouter";var Bl=E.createContext(null);Bl.displayName="DataRouterState";var y1=E.createContext({isTransitioning:!1});y1.displayName="ViewTransition";var _2=E.createContext(new Map);_2.displayName="Fetchers";var M2=E.createContext(null);M2.displayName="Await";var Un=E.createContext(null);Un.displayName="Navigation";var Vo=E.createContext(null);Vo.displayName="Location";var jn=E.createContext({outlet:null,matches:[],isDataRoute:!1});jn.displayName="Route";var oh=E.createContext(null);oh.displayName="RouteError";function F2(e,{relative:t}={}){Ke(Uo(),"useHref() may be used only in the context of a component.");let{basename:n,navigator:r}=E.useContext(Un),{hash:i,pathname:o,search:a}=vu(e,{relative:t}),u=o;return n!=="/"&&(u=o==="/"?n:Er([n,o])),r.createHref({pathname:u,search:a,hash:i})}function Uo(){return E.useContext(Vo)!=null}function Pr(){return Ke(Uo(),"useLocation() may be used only in the context of a component."),E.useContext(Vo).location}function lU(){return E.useContext(Vo).navigationType}var b1="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function E1(e){E.useContext(Un).static||E.useLayoutEffect(e)}function ah(){let{isDataRoute:e}=E.useContext(jn);return e?Y2():L2()}function L2(){Ke(Uo(),"useNavigate() may be used only in the context of a component.");let e=E.useContext(Bo),{basename:t,navigator:n}=E.useContext(Un),{matches:r}=E.useContext(jn),{pathname:i}=Pr(),o=JSON.stringify(rh(r)),a=E.useRef(!1);return E1(()=>{a.current=!0}),E.useCallback((s,l={})=>{if(wn(a.current,b1),!a.current)return;if(typeof s=="number"){n.go(s);return}let c=ih(s,JSON.parse(o),i,l.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:Er([t,c.pathname])),(l.replace?n.replace:n.push)(c,l.state,l)},[t,n,o,i,e])}E.createContext(null);function cU(){let{matches:e}=E.useContext(jn),t=e[e.length-1];return t?t.params:{}}function vu(e,{relative:t}={}){let{matches:n}=E.useContext(jn),{pathname:r}=Pr(),i=JSON.stringify(rh(n));return E.useMemo(()=>ih(e,JSON.parse(i),r,t==="path"),[e,i,r,t])}function N2(e,t){return x1(e,t)}function x1(e,t,n,r){Ke(Uo(),"useRoutes() may be used only in the context of a component.");let{navigator:i}=E.useContext(Un),{matches:o}=E.useContext(jn),a=o[o.length-1],u=a?a.params:{},s=a?a.pathname:"/",l=a?a.pathnameBase:"/",c=a&&a.route;{let v=c&&c.path||"";w1(s,!c||v.endsWith("*")||v.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${s}" (under ) 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. Please change the parent to .`)}let d=Pr(),f;if(t){let v=typeof t=="string"?No(t):t;Ke(l==="/"||v.pathname?.startsWith(l),`When overriding the location using \`\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${l}" but pathname "${v.pathname}" was given in the \`location\` prop.`),f=v}else f=d;let p=f.pathname||"/",h=p;if(l!=="/"){let v=l.replace(/^\//,"").split("/");h="/"+p.replace(/^\//,"").split("/").slice(v.length).join("/")}let m=h1(e,{pathname:h});wn(c||m!=null,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),wn(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${f.pathname}${f.search}${f.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`);let g=K2(m&&m.map(v=>Object.assign({},v,{params:Object.assign({},u,v.params),pathname:Er([l,i.encodeLocation?i.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?l:Er([l,i.encodeLocation?i.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),o,n,r);return t&&g?E.createElement(Vo.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...f},navigationType:"POP"}},g):g}function B2(){let e=G2(),t=O2(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},o={padding:"2px 4px",backgroundColor:r},a=null;return console.error("Error handled by React Router default ErrorBoundary:",e),a=E.createElement(E.Fragment,null,E.createElement("p",null,"💿 Hey developer 👋"),E.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",E.createElement("code",{style:o},"ErrorBoundary")," or"," ",E.createElement("code",{style:o},"errorElement")," prop on your route.")),E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},t),n?E.createElement("pre",{style:i},n):null,a)}var V2=E.createElement(B2,null),U2=class extends E.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){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?E.createElement(jn.Provider,{value:this.props.routeContext},E.createElement(oh.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function j2({routeContext:e,match:t,children:n}){let r=E.useContext(Bo);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),E.createElement(jn.Provider,{value:e},n)}function K2(e,t=[],n=null,r=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let i=e,o=n?.errors;if(o!=null){let s=i.findIndex(l=>l.route.id&&o?.[l.route.id]!==void 0);Ke(s>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),i=i.slice(0,Math.min(i.length,s+1))}let a=!1,u=-1;if(n)for(let s=0;s=0?i=i.slice(0,u+1):i=[i[0]];break}}}return i.reduceRight((s,l,c)=>{let d,f=!1,p=null,h=null;n&&(d=o&&l.route.id?o[l.route.id]:void 0,p=l.route.errorElement||V2,a&&(u<0&&c===0?(w1("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),f=!0,h=null):u===c&&(f=!0,h=l.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),g=()=>{let v;return d?v=p:f?v=h:l.route.Component?v=E.createElement(l.route.Component,null):l.route.element?v=l.route.element:v=s,E.createElement(j2,{match:l,routeContext:{outlet:s,matches:m,isDataRoute:n!=null},children:v})};return n&&(l.route.ErrorBoundary||l.route.errorElement||c===0)?E.createElement(U2,{location:n.location,revalidation:n.revalidation,component:p,error:d,children:g(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):g()},null)}function uh(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function H2(e){let t=E.useContext(Bo);return Ke(t,uh(e)),t}function z2(e){let t=E.useContext(Bl);return Ke(t,uh(e)),t}function W2(e){let t=E.useContext(jn);return Ke(t,uh(e)),t}function sh(e){let t=W2(e),n=t.matches[t.matches.length-1];return Ke(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function q2(){return sh("useRouteId")}function G2(){let e=E.useContext(oh),t=z2("useRouteError"),n=sh("useRouteError");return e!==void 0?e:t.errors?.[n]}function Y2(){let{router:e}=H2("useNavigate"),t=sh("useNavigate"),n=E.useRef(!1);return E1(()=>{n.current=!0}),E.useCallback(async(i,o={})=>{wn(n.current,b1),n.current&&(typeof i=="number"?e.navigate(i):await e.navigate(i,{fromRouteId:t,...o}))},[e,t])}var dg={};function w1(e,t,n){!t&&!dg[e]&&(dg[e]=!0,wn(!1,n))}E.memo(Z2);function Z2({routes:e,future:t,state:n}){return x1(e,void 0,n,t)}function dU({to:e,replace:t,state:n,relative:r}){Ke(Uo()," may be used only in the context of a component.");let{static:i}=E.useContext(Un);wn(!i," must not be used on the initial render in a . This is a no-op, but you should modify your code so the is only ever rendered in response to some user interaction or state change.");let{matches:o}=E.useContext(jn),{pathname:a}=Pr(),u=ah(),s=ih(e,rh(o),a,r==="path"),l=JSON.stringify(s);return E.useEffect(()=>{u(JSON.parse(l),{replace:t,state:n,relative:r})},[u,l,r,t,n]),null}function X2(e){Ke(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function Q2({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:i,static:o=!1}){Ke(!Uo(),"You cannot render a inside another . You should never have more than one in your app.");let a=e.replace(/^\/*/,"/"),u=E.useMemo(()=>({basename:a,navigator:i,static:o,future:{}}),[a,i,o]);typeof n=="string"&&(n=No(n));let{pathname:s="/",search:l="",hash:c="",state:d=null,key:f="default"}=n,p=E.useMemo(()=>{let h=Cr(s,a);return h==null?null:{location:{pathname:h,search:l,hash:c,state:d,key:f},navigationType:r}},[a,s,l,c,d,f,r]);return wn(p!=null,` is not able to match the URL "${s}${l}${c}" because it does not start with the basename, so the won't render anything.`),p==null?null:E.createElement(Un.Provider,{value:u},E.createElement(Vo.Provider,{children:t,value:p}))}function fU({children:e,location:t}){return N2(Lf(e),t)}function Lf(e,t=[]){let n=[];return E.Children.forEach(e,(r,i)=>{if(!E.isValidElement(r))return;let o=[...t,i];if(r.type===E.Fragment){n.push.apply(n,Lf(r.props.children,o));return}Ke(r.type===X2,`[${typeof r.type=="string"?r.type:r.type.name}] is not a component. All component children of must be a or `),Ke(!r.props.index||!r.props.children,"An index route cannot have child routes.");let a={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=Lf(r.props.children,o)),n.push(a)}),n}var Ts="get",Rs="application/x-www-form-urlencoded";function Vl(e){return e!=null&&typeof e.tagName=="string"}function J2(e){return Vl(e)&&e.tagName.toLowerCase()==="button"}function eT(e){return Vl(e)&&e.tagName.toLowerCase()==="form"}function tT(e){return Vl(e)&&e.tagName.toLowerCase()==="input"}function nT(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function rT(e,t){return e.button===0&&(!t||t==="_self")&&!nT(e)}function Nf(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function iT(e,t){let n=Nf(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(o=>{n.append(i,o)})}),n}var ju=null;function oT(){if(ju===null)try{new FormData(document.createElement("form"),0),ju=!1}catch{ju=!0}return ju}var aT=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Bc(e){return e!=null&&!aT.has(e)?(wn(!1,`"${e}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${Rs}"`),null):e}function uT(e,t){let n,r,i,o,a;if(eT(e)){let u=e.getAttribute("action");r=u?Cr(u,t):null,n=e.getAttribute("method")||Ts,i=Bc(e.getAttribute("enctype"))||Rs,o=new FormData(e)}else if(J2(e)||tT(e)&&(e.type==="submit"||e.type==="image")){let u=e.form;if(u==null)throw new Error('Cannot submit a