xmirror-components 1.0.36 → 1.0.37

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.
@@ -360,4 +360,4 @@ Valid keys: `+JSON.stringify(Object.keys(N),null," "));var C=Ae(H,se,W,ee,te+".
360
360
  * @license MIT
361
361
  */function ht(){return ht=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ht.apply(this,arguments)}const Yt=D.createContext(null);process.env.NODE_ENV!=="production"&&(Yt.displayName="DataRouter");const gn=D.createContext(null);process.env.NODE_ENV!=="production"&&(gn.displayName="DataRouterState");const yr=D.createContext(null);process.env.NODE_ENV!=="production"&&(yr.displayName="Await");const it=D.createContext(null);process.env.NODE_ENV!=="production"&&(it.displayName="Navigation");const Tt=D.createContext(null);process.env.NODE_ENV!=="production"&&(Tt.displayName="Location");const Ye=D.createContext({outlet:null,matches:[],isDataRoute:!1});process.env.NODE_ENV!=="production"&&(Ye.displayName="Route");const za=D.createContext(null);process.env.NODE_ENV!=="production"&&(za.displayName="RouteError");function qd(e,t){let{relative:r}=t===void 0?{}:t;mt()||(process.env.NODE_ENV!=="production"?K(!1,"useHref() may be used only in the context of a <Router> component."):K(!1));let{basename:n,navigator:a}=D.useContext(it),{hash:o,pathname:i,search:s}=Ws(e,{relative:r}),l=i;return n!=="/"&&(l=i==="/"?n:ot([n,i])),a.createHref({pathname:l,search:s,hash:o})}function mt(){return D.useContext(Tt)!=null}function Ct(){return mt()||(process.env.NODE_ENV!=="production"?K(!1,"useLocation() may be used only in the context of a <Router> component."):K(!1)),D.useContext(Tt).location}function Bd(){return D.useContext(Tt).navigationType}function Hd(e){mt()||(process.env.NODE_ENV!=="production"?K(!1,"useMatch() may be used only in the context of a <Router> component."):K(!1));let{pathname:t}=Ct();return D.useMemo(()=>en(e,Cs(t)),[t,e])}const Ls="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function zs(e){D.useContext(it).static||D.useLayoutEffect(e)}function $a(){let{isDataRoute:e}=D.useContext(Ye);return e?up():Yd()}function Yd(){mt()||(process.env.NODE_ENV!=="production"?K(!1,"useNavigate() may be used only in the context of a <Router> component."):K(!1));let e=D.useContext(Yt),{basename:t,future:r,navigator:n}=D.useContext(it),{matches:a}=D.useContext(Ye),{pathname:o}=Ct(),i=JSON.stringify(hn(a,r.v7_relativeSplatPath)),s=D.useRef(!1);return zs(()=>{s.current=!0}),D.useCallback(function(u,m){if(m===void 0&&(m={}),process.env.NODE_ENV!=="production"&&je(s.current,Ls),!s.current)return;if(typeof u=="number"){n.go(u);return}let d=mn(u,JSON.parse(i),o,m.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:ot([t,d.pathname])),(m.replace?n.replace:n.push)(d,m.state,m)},[t,n,i,o,e])}const $s=D.createContext(null);function Vd(){return D.useContext($s)}function Us(e){let t=D.useContext(Ye).outlet;return t&&D.createElement($s.Provider,{value:e},t)}function Xd(){let{matches:e}=D.useContext(Ye),t=e[e.length-1];return t?t.params:{}}function Ws(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=D.useContext(it),{matches:a}=D.useContext(Ye),{pathname:o}=Ct(),i=JSON.stringify(hn(a,n.v7_relativeSplatPath));return D.useMemo(()=>mn(e,JSON.parse(i),o,r==="path"),[e,i,o,r])}function qs(e,t){return Ua(e,t)}function Ua(e,t,r,n){mt()||(process.env.NODE_ENV!=="production"?K(!1,"useRoutes() may be used only in the context of a <Router> component."):K(!1));let{navigator:a}=D.useContext(it),{matches:o}=D.useContext(Ye),i=o[o.length-1],s=i?i.params:{},l=i?i.pathname:"/",u=i?i.pathnameBase:"/",m=i&&i.route;if(process.env.NODE_ENV!=="production"){let c=m&&m.path||"";Xs(l,!m||c.endsWith("*"),"You rendered descendant <Routes> (or called `useRoutes()`) at "+('"'+l+'" (under <Route path="'+c+'">) 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.
362
362
 
363
- `+('Please change the parent <Route path="'+c+'"> to <Route ')+('path="'+(c==="/"?"*":c+"/*")+'">.'))}let d=Ct(),b;if(t){var y;let c=typeof t=="string"?Ge(t):t;u==="/"||(y=c.pathname)!=null&&y.startsWith(u)||(process.env.NODE_ENV!=="production"?K(!1,"When overriding the location using `<Routes location>` 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 "'+u+'" ')+('but pathname "'+c.pathname+'" was given in the `location` prop.')):K(!1)),b=c}else b=d;let w=b.pathname||"/",E=w;if(u!=="/"){let c=u.replace(/^\//,"").split("/");E="/"+w.replace(/^\//,"").split("/").slice(c.length).join("/")}let S=dt(e,{pathname:E});process.env.NODE_ENV!=="production"&&(process.env.NODE_ENV!=="production"&&je(m||S!=null,'No routes matched location "'+b.pathname+b.search+b.hash+'" '),process.env.NODE_ENV!=="production"&&je(S==null||S[S.length-1].route.element!==void 0||S[S.length-1].route.Component!==void 0||S[S.length-1].route.lazy!==void 0,'Matched leaf route at location "'+b.pathname+b.search+b.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.'));let h=Bs(S&&S.map(c=>Object.assign({},c,{params:Object.assign({},s,c.params),pathname:ot([u,a.encodeLocation?a.encodeLocation(c.pathname).pathname:c.pathname]),pathnameBase:c.pathnameBase==="/"?u:ot([u,a.encodeLocation?a.encodeLocation(c.pathnameBase).pathname:c.pathnameBase])})),o,r,n);return t&&h?D.createElement(Tt.Provider,{value:{location:ht({pathname:"/",search:"",hash:"",state:null,key:"default"},b),navigationType:Oe.Pop}},h):h}function Gd(){let e=Hs(),t=Wt(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:n},o={padding:"2px 4px",backgroundColor:n},i=null;return process.env.NODE_ENV!=="production"&&(console.error("Error handled by React Router default ErrorBoundary:",e),i=D.createElement(D.Fragment,null,D.createElement("p",null,"💿 Hey developer 👋"),D.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",D.createElement("code",{style:o},"ErrorBoundary")," or"," ",D.createElement("code",{style:o},"errorElement")," prop on your route."))),D.createElement(D.Fragment,null,D.createElement("h2",null,"Unexpected Application Error!"),D.createElement("h3",{style:{fontStyle:"italic"}},t),r?D.createElement("pre",{style:a},r):null,i)}const Kd=D.createElement(Gd,null);class Jd extends D.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?D.createElement(Ye.Provider,{value:this.props.routeContext},D.createElement(za.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Zd(e){let{routeContext:t,match:r,children:n}=e,a=D.useContext(Yt);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),D.createElement(Ye.Provider,{value:t},n)}function Bs(e,t,r,n){var a;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var o;if(!r)return null;if(r.errors)e=r.matches;else if((o=n)!=null&&o.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,s=(a=r)==null?void 0:a.errors;if(s!=null){let m=i.findIndex(d=>d.route.id&&(s==null?void 0:s[d.route.id])!==void 0);m>=0||(process.env.NODE_ENV!=="production"?K(!1,"Could not find a matching route for errors on route IDs: "+Object.keys(s).join(",")):K(!1)),i=i.slice(0,Math.min(i.length,m+1))}let l=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let m=0;m<i.length;m++){let d=i[m];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(u=m),d.route.id){let{loaderData:b,errors:y}=r,w=d.route.loader&&b[d.route.id]===void 0&&(!y||y[d.route.id]===void 0);if(d.route.lazy||w){l=!0,u>=0?i=i.slice(0,u+1):i=[i[0]];break}}}return i.reduceRight((m,d,b)=>{let y,w=!1,E=null,S=null;r&&(y=s&&d.route.id?s[d.route.id]:void 0,E=d.route.errorElement||Kd,l&&(u<0&&b===0?(Xs("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,S=null):u===b&&(w=!0,S=d.route.hydrateFallbackElement||null)));let h=t.concat(i.slice(0,b+1)),c=()=>{let g;return y?g=E:w?g=S:d.route.Component?g=D.createElement(d.route.Component,null):d.route.element?g=d.route.element:g=m,D.createElement(Zd,{match:d,routeContext:{outlet:m,matches:h,isDataRoute:r!=null},children:g})};return r&&(d.route.ErrorBoundary||d.route.errorElement||b===0)?D.createElement(Jd,{location:r.location,revalidation:r.revalidation,component:E,error:y,children:c(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):c()},null)}var vn=(function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e})(vn||{}),Ue=(function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e})(Ue||{});function Wa(e){return e+" must be used within a data router. See https://reactrouter.com/v6/routers/picking-a-router."}function qa(e){let t=D.useContext(Yt);return t||(process.env.NODE_ENV!=="production"?K(!1,Wa(e)):K(!1)),t}function gt(e){let t=D.useContext(gn);return t||(process.env.NODE_ENV!=="production"?K(!1,Wa(e)):K(!1)),t}function Qd(e){let t=D.useContext(Ye);return t||(process.env.NODE_ENV!=="production"?K(!1,Wa(e)):K(!1)),t}function Rr(e){let t=Qd(e),r=t.matches[t.matches.length-1];return r.route.id||(process.env.NODE_ENV!=="production"?K(!1,e+' can only be used on routes that contain a unique "id"'):K(!1)),r.route.id}function ep(){return Rr(Ue.UseRouteId)}function tp(){return gt(Ue.UseNavigation).navigation}function rp(){let e=qa(vn.UseRevalidator),t=gt(Ue.UseRevalidator);return D.useMemo(()=>({revalidate:e.router.revalidate,state:t.revalidation}),[e.router.revalidate,t.revalidation])}function np(){let{matches:e,loaderData:t}=gt(Ue.UseMatches);return D.useMemo(()=>e.map(r=>Os(r,t)),[e,t])}function ap(){let e=gt(Ue.UseLoaderData),t=Rr(Ue.UseLoaderData);if(e.errors&&e.errors[t]!=null){console.error("You cannot `useLoaderData` in an errorElement (routeId: "+t+")");return}return e.loaderData[t]}function op(e){return gt(Ue.UseRouteLoaderData).loaderData[e]}function ip(){let e=gt(Ue.UseActionData),t=Rr(Ue.UseLoaderData);return e.actionData?e.actionData[t]:void 0}function Hs(){var e;let t=D.useContext(za),r=gt(Ue.UseRouteError),n=Rr(Ue.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function Ys(){let e=D.useContext(yr);return e==null?void 0:e._data}function sp(){let e=D.useContext(yr);return e==null?void 0:e._error}let lp=0;function Vs(e){let{router:t,basename:r}=qa(vn.UseBlocker),n=gt(Ue.UseBlocker),[a,o]=D.useState(""),i=D.useCallback(s=>{if(typeof e!="function")return!!e;if(r==="/")return e(s);let{currentLocation:l,nextLocation:u,historyAction:m}=s;return e({currentLocation:ht({},l,{pathname:_t(l.pathname,r)||l.pathname}),nextLocation:ht({},u,{pathname:_t(u.pathname,r)||u.pathname}),historyAction:m})},[r,e]);return D.useEffect(()=>{let s=String(++lp);return o(s),()=>t.deleteBlocker(s)},[t]),D.useEffect(()=>{a!==""&&t.getBlocker(a,i)},[t,a,i]),a&&n.blockers.has(a)?n.blockers.get(a):Ft}function up(){let{router:e}=qa(vn.UseNavigateStable),t=Rr(Ue.UseNavigateStable),r=D.useRef(!1);return zs(()=>{r.current=!0}),D.useCallback(function(a,o){o===void 0&&(o={}),process.env.NODE_ENV!=="production"&&je(r.current,Ls),r.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,ht({fromRouteId:t},o)))},[e,t])}const ji={};function Xs(e,t,r){!t&&!ji[e]&&(ji[e]=!0,process.env.NODE_ENV!=="production"&&je(!1,r))}const Ni={};function cp(e,t){process.env.NODE_ENV!=="production"&&!Ni[t]&&(Ni[t]=!0,console.warn(t))}const It=(e,t,r)=>cp(e,"⚠️ React Router Future Flag Warning: "+t+". "+("You can use the `"+e+"` future flag to opt-in early. ")+("For more information, see "+r+"."));function Ba(e,t){(e==null?void 0:e.v7_startTransition)===void 0&&It("v7_startTransition","React Router will begin wrapping state updates in `React.startTransition` in v7","https://reactrouter.com/v6/upgrading/future#v7_starttransition"),(e==null?void 0:e.v7_relativeSplatPath)===void 0&&(!t||t.v7_relativeSplatPath===void 0)&&It("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath"),t&&(t.v7_fetcherPersist===void 0&&It("v7_fetcherPersist","The persistence behavior of fetchers is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_fetcherpersist"),t.v7_normalizeFormMethod===void 0&&It("v7_normalizeFormMethod","Casing of `formMethod` fields is being normalized to uppercase in v7","https://reactrouter.com/v6/upgrading/future#v7_normalizeformmethod"),t.v7_partialHydration===void 0&&It("v7_partialHydration","`RouterProvider` hydration behavior is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_partialhydration"),t.v7_skipActionErrorRevalidation===void 0&&It("v7_skipActionErrorRevalidation","The revalidation behavior after 4xx/5xx `action` responses is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_skipactionerrorrevalidation"))}const fp="startTransition",rn=D[fp];function dp(e){let{fallbackElement:t,router:r,future:n}=e,[a,o]=D.useState(r.state),{v7_startTransition:i}=n||{},s=D.useCallback(d=>{i&&rn?rn(()=>o(d)):o(d)},[o,i]);D.useLayoutEffect(()=>r.subscribe(s),[r,s]),D.useEffect(()=>{process.env.NODE_ENV!=="production"&&je(t==null||!r.future.v7_partialHydration,"`<RouterProvider fallbackElement>` is deprecated when using `v7_partialHydration`, use a `HydrateFallback` component instead")},[]);let l=D.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:d=>r.navigate(d),push:(d,b,y)=>r.navigate(d,{state:b,preventScrollReset:y==null?void 0:y.preventScrollReset}),replace:(d,b,y)=>r.navigate(d,{replace:!0,state:b,preventScrollReset:y==null?void 0:y.preventScrollReset})}),[r]),u=r.basename||"/",m=D.useMemo(()=>({router:r,navigator:l,static:!1,basename:u}),[r,l,u]);return D.useEffect(()=>Ba(n,r.future),[r,n]),D.createElement(D.Fragment,null,D.createElement(Yt.Provider,{value:m},D.createElement(gn.Provider,{value:a},D.createElement(Ha,{basename:u,location:a.location,navigationType:a.historyAction,navigator:l,future:{v7_relativeSplatPath:r.future.v7_relativeSplatPath}},a.initialized||r.future.v7_partialHydration?D.createElement(pp,{routes:r.routes,future:r.future,state:a}):t))),null)}function pp(e){let{routes:t,future:r,state:n}=e;return Ua(t,void 0,n,r)}function hp(e){let{basename:t,children:r,initialEntries:n,initialIndex:a,future:o}=e,i=D.useRef();i.current==null&&(i.current=Ps({initialEntries:n,initialIndex:a,v5Compat:!0}));let s=i.current,[l,u]=D.useState({action:s.action,location:s.location}),{v7_startTransition:m}=o||{},d=D.useCallback(b=>{m&&rn?rn(()=>u(b)):u(b)},[u,m]);return D.useLayoutEffect(()=>s.listen(d),[s,d]),D.useEffect(()=>Ba(o),[o]),D.createElement(Ha,{basename:t,children:r,location:l.location,navigationType:l.action,navigator:s,future:o})}function mp(e){let{to:t,replace:r,state:n,relative:a}=e;mt()||(process.env.NODE_ENV!=="production"?K(!1,"<Navigate> may be used only in the context of a <Router> component."):K(!1));let{future:o,static:i}=D.useContext(it);process.env.NODE_ENV!=="production"&&je(!i,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:s}=D.useContext(Ye),{pathname:l}=Ct(),u=$a(),m=mn(t,hn(s,o.v7_relativeSplatPath),l,a==="path"),d=JSON.stringify(m);return D.useEffect(()=>u(JSON.parse(d),{replace:r,state:n,relative:a}),[u,d,a,r,n]),null}function gp(e){return Us(e.context)}function Gs(e){process.env.NODE_ENV!=="production"?K(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>."):K(!1)}function Ha(e){let{basename:t="/",children:r=null,location:n,navigationType:a=Oe.Pop,navigator:o,static:i=!1,future:s}=e;mt()&&(process.env.NODE_ENV!=="production"?K(!1,"You cannot render a <Router> inside another <Router>. You should never have more than one in your app."):K(!1));let l=t.replace(/^\/*/,"/"),u=D.useMemo(()=>({basename:l,navigator:o,static:i,future:ht({v7_relativeSplatPath:!1},s)}),[l,s,o,i]);typeof n=="string"&&(n=Ge(n));let{pathname:m="/",search:d="",hash:b="",state:y=null,key:w="default"}=n,E=D.useMemo(()=>{let S=_t(m,l);return S==null?null:{location:{pathname:S,search:d,hash:b,state:y,key:w},navigationType:a}},[l,m,d,b,y,w,a]);return process.env.NODE_ENV!=="production"&&je(E!=null,'<Router basename="'+l+'"> is not able to match the URL '+('"'+m+d+b+'" because it does not start with the ')+"basename, so the <Router> won't render anything."),E==null?null:D.createElement(it.Provider,{value:u},D.createElement(Tt.Provider,{children:r,value:E}))}function vp(e){let{children:t,location:r}=e;return qs(br(t),r)}function yp(e){let{children:t,errorElement:r,resolve:n}=e;return D.createElement(Ep,{resolve:n,errorElement:r},D.createElement(xp,null,t))}var He=(function(e){return e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error",e})(He||{});const bp=new Promise(()=>{});class Ep extends D.Component{constructor(t){super(t),this.state={error:null}}static getDerivedStateFromError(t){return{error:t}}componentDidCatch(t,r){console.error("<Await> caught the following error during render",t,r)}render(){let{children:t,errorElement:r,resolve:n}=this.props,a=null,o=He.pending;if(!(n instanceof Promise))o=He.success,a=Promise.resolve(),Object.defineProperty(a,"_tracked",{get:()=>!0}),Object.defineProperty(a,"_data",{get:()=>n});else if(this.state.error){o=He.error;let i=this.state.error;a=Promise.reject().catch(()=>{}),Object.defineProperty(a,"_tracked",{get:()=>!0}),Object.defineProperty(a,"_error",{get:()=>i})}else n._tracked?(a=n,o="_error"in a?He.error:"_data"in a?He.success:He.pending):(o=He.pending,Object.defineProperty(n,"_tracked",{get:()=>!0}),a=n.then(i=>Object.defineProperty(n,"_data",{get:()=>i}),i=>Object.defineProperty(n,"_error",{get:()=>i})));if(o===He.error&&a._error instanceof tn)throw bp;if(o===He.error&&!r)throw a._error;if(o===He.error)return D.createElement(yr.Provider,{value:a,children:r});if(o===He.success)return D.createElement(yr.Provider,{value:a,children:t});throw a}}function xp(e){let{children:t}=e,r=Ys(),n=typeof t=="function"?t(r):t;return D.createElement(D.Fragment,null,n)}function br(e,t){t===void 0&&(t=[]);let r=[];return D.Children.forEach(e,(n,a)=>{if(!D.isValidElement(n))return;let o=[...t,a];if(n.type===D.Fragment){r.push.apply(r,br(n.props.children,o));return}n.type!==Gs&&(process.env.NODE_ENV!=="production"?K(!1,"["+(typeof n.type=="string"?n.type:n.type.name)+"] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>"):K(!1)),!n.props.index||!n.props.children||(process.env.NODE_ENV!=="production"?K(!1,"An index route cannot have child routes."):K(!1));let i={id:n.props.id||o.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(i.children=br(n.props.children,o)),r.push(i)}),r}function Sp(e){return Bs(e)}function Ks(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(process.env.NODE_ENV!=="production"&&e.element&&process.env.NODE_ENV!=="production"&&je(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:D.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(process.env.NODE_ENV!=="production"&&e.hydrateFallbackElement&&process.env.NODE_ENV!=="production"&&je(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:D.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(process.env.NODE_ENV!=="production"&&e.errorElement&&process.env.NODE_ENV!=="production"&&je(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:D.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}function wp(e,t){return wd({basename:t==null?void 0:t.basename,future:ht({},t==null?void 0:t.future,{v7_prependBasename:!0}),history:Ps({initialEntries:t==null?void 0:t.initialEntries,initialIndex:t==null?void 0:t.initialIndex}),hydrationData:t==null?void 0:t.hydrationData,routes:e,mapRouteProperties:Ks,dataStrategy:t==null?void 0:t.dataStrategy,patchRoutesOnNavigation:t==null?void 0:t.patchRoutesOnNavigation}).initialize()}const Rp=Object.freeze(Object.defineProperty({__proto__:null,AbortedDeferredError:tn,Await:yp,MemoryRouter:hp,Navigate:mp,get NavigationType(){return Oe},Outlet:gp,Route:Gs,Router:Ha,RouterProvider:dp,Routes:vp,UNSAFE_DataRouterContext:Yt,UNSAFE_DataRouterStateContext:gn,UNSAFE_LocationContext:Tt,UNSAFE_NavigationContext:it,UNSAFE_RouteContext:Ye,UNSAFE_logV6DeprecationWarnings:Ba,UNSAFE_mapRouteProperties:Ks,UNSAFE_useRouteId:ep,UNSAFE_useRoutesImpl:Ua,createMemoryRouter:wp,createPath:wr,createRoutesFromChildren:br,createRoutesFromElements:br,defer:pd,generatePath:rd,isRouteErrorResponse:Wt,json:ud,matchPath:en,matchRoutes:dt,parsePath:Ge,redirect:Ia,redirectDocument:hd,renderMatches:Sp,replace:md,resolvePath:Ds,useActionData:ip,useAsyncError:sp,useAsyncValue:Ys,useBlocker:Vs,useHref:qd,useInRouterContext:mt,useLoaderData:ap,useLocation:Ct,useMatch:Hd,useMatches:np,useNavigate:$a,useNavigation:tp,useNavigationType:Bd,useOutlet:Us,useOutletContext:Vd,useParams:Xd,useResolvedPath:Ws,useRevalidator:rp,useRouteError:Hs,useRouteLoaderData:op,useRoutes:qs},Symbol.toStringTag,{value:"Module"}));var Zn={},Qn,Ai;function Pp(){return Ai||(Ai=1,Qn=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)),Qn}var ea,Mi;function Op(){if(Mi)return ea;Mi=1;var e="%[a-f0-9]{2}",t=new RegExp("("+e+")|([^%]+?)","gi"),r=new RegExp("("+e+")+","gi");function n(i,s){try{return[decodeURIComponent(i.join(""))]}catch{}if(i.length===1)return i;s=s||1;var l=i.slice(0,s),u=i.slice(s);return Array.prototype.concat.call([],n(l),n(u))}function a(i){try{return decodeURIComponent(i)}catch{for(var s=i.match(t)||[],l=1;l<s.length;l++)i=n(s,l).join(""),s=i.match(t)||[];return i}}function o(i){for(var s={"%FE%FF":"��","%FF%FE":"��"},l=r.exec(i);l;){try{s[l[0]]=decodeURIComponent(l[0])}catch{var u=a(l[0]);u!==l[0]&&(s[l[0]]=u)}l=r.exec(i)}s["%C2"]="�";for(var m=Object.keys(s),d=0;d<m.length;d++){var b=m[d];i=i.replace(new RegExp(b,"g"),s[b])}return i}return ea=function(i){if(typeof i!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof i+"`");try{return i=i.replace(/\+/g," "),decodeURIComponent(i)}catch{return o(i)}},ea}var ta,Ii;function _p(){return Ii||(Ii=1,ta=(e,t)=>{if(!(typeof e=="string"&&typeof t=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(t==="")return[e];const r=e.indexOf(t);return r===-1?[e]:[e.slice(0,r),e.slice(r+t.length)]}),ta}var ra,ki;function Tp(){return ki||(ki=1,ra=function(e,t){for(var r={},n=Object.keys(e),a=Array.isArray(t),o=0;o<n.length;o++){var i=n[o],s=e[i];(a?t.indexOf(i)!==-1:t(i,s,e))&&(r[i]=s)}return r}),ra}var Fi;function Cp(){return Fi||(Fi=1,(function(e){const t=Pp(),r=Op(),n=_p(),a=Tp(),o=h=>h==null;function i(h){switch(h.arrayFormat){case"index":return c=>(g,v)=>{const p=g.length;return v===void 0||h.skipNull&&v===null||h.skipEmptyString&&v===""?g:v===null?[...g,[u(c,h),"[",p,"]"].join("")]:[...g,[u(c,h),"[",u(p,h),"]=",u(v,h)].join("")]};case"bracket":return c=>(g,v)=>v===void 0||h.skipNull&&v===null||h.skipEmptyString&&v===""?g:v===null?[...g,[u(c,h),"[]"].join("")]:[...g,[u(c,h),"[]=",u(v,h)].join("")];case"comma":case"separator":return c=>(g,v)=>v==null||v.length===0?g:g.length===0?[[u(c,h),"=",u(v,h)].join("")]:[[g,u(v,h)].join(h.arrayFormatSeparator)];default:return c=>(g,v)=>v===void 0||h.skipNull&&v===null||h.skipEmptyString&&v===""?g:v===null?[...g,u(c,h)]:[...g,[u(c,h),"=",u(v,h)].join("")]}}function s(h){let c;switch(h.arrayFormat){case"index":return(g,v,p)=>{if(c=/\[(\d*)\]$/.exec(g),g=g.replace(/\[\d*\]$/,""),!c){p[g]=v;return}p[g]===void 0&&(p[g]={}),p[g][c[1]]=v};case"bracket":return(g,v,p)=>{if(c=/(\[\])$/.exec(g),g=g.replace(/\[\]$/,""),!c){p[g]=v;return}if(p[g]===void 0){p[g]=[v];return}p[g]=[].concat(p[g],v)};case"comma":case"separator":return(g,v,p)=>{const x=typeof v=="string"&&v.includes(h.arrayFormatSeparator),f=typeof v=="string"&&!x&&m(v,h).includes(h.arrayFormatSeparator);v=f?m(v,h):v;const P=x||f?v.split(h.arrayFormatSeparator).map(j=>m(j,h)):v===null?v:m(v,h);p[g]=P};default:return(g,v,p)=>{if(p[g]===void 0){p[g]=v;return}p[g]=[].concat(p[g],v)}}}function l(h){if(typeof h!="string"||h.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function u(h,c){return c.encode?c.strict?t(h):encodeURIComponent(h):h}function m(h,c){return c.decode?r(h):h}function d(h){return Array.isArray(h)?h.sort():typeof h=="object"?d(Object.keys(h)).sort((c,g)=>Number(c)-Number(g)).map(c=>h[c]):h}function b(h){const c=h.indexOf("#");return c!==-1&&(h=h.slice(0,c)),h}function y(h){let c="";const g=h.indexOf("#");return g!==-1&&(c=h.slice(g)),c}function w(h){h=b(h);const c=h.indexOf("?");return c===-1?"":h.slice(c+1)}function E(h,c){return c.parseNumbers&&!Number.isNaN(Number(h))&&typeof h=="string"&&h.trim()!==""?h=Number(h):c.parseBooleans&&h!==null&&(h.toLowerCase()==="true"||h.toLowerCase()==="false")&&(h=h.toLowerCase()==="true"),h}function S(h,c){c=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},c),l(c.arrayFormatSeparator);const g=s(c),v=Object.create(null);if(typeof h!="string"||(h=h.trim().replace(/^[?#&]/,""),!h))return v;for(const p of h.split("&")){if(p==="")continue;let[x,f]=n(c.decode?p.replace(/\+/g," "):p,"=");f=f===void 0?null:["comma","separator"].includes(c.arrayFormat)?f:m(f,c),g(m(x,c),f,v)}for(const p of Object.keys(v)){const x=v[p];if(typeof x=="object"&&x!==null)for(const f of Object.keys(x))x[f]=E(x[f],c);else v[p]=E(x,c)}return c.sort===!1?v:(c.sort===!0?Object.keys(v).sort():Object.keys(v).sort(c.sort)).reduce((p,x)=>{const f=v[x];return f&&typeof f=="object"&&!Array.isArray(f)?p[x]=d(f):p[x]=f,p},Object.create(null))}e.extract=w,e.parse=S,e.stringify=(h,c)=>{if(!h)return"";c=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},c),l(c.arrayFormatSeparator);const g=f=>c.skipNull&&o(h[f])||c.skipEmptyString&&h[f]==="",v=i(c),p={};for(const f of Object.keys(h))g(f)||(p[f]=h[f]);const x=Object.keys(p);return c.sort!==!1&&x.sort(c.sort),x.map(f=>{const P=h[f];return P===void 0?"":P===null?u(f,c):Array.isArray(P)?P.reduce(v(f),[]).join("&"):u(f,c)+"="+u(P,c)}).filter(f=>f.length>0).join("&")},e.parseUrl=(h,c)=>{c=Object.assign({decode:!0},c);const[g,v]=n(h,"#");return Object.assign({url:g.split("?")[0]||"",query:S(w(h),c)},c&&c.parseFragmentIdentifier&&v?{fragmentIdentifier:m(v,c)}:{})},e.stringifyUrl=(h,c)=>{c=Object.assign({encode:!0,strict:!0},c);const g=b(h.url).split("?")[0]||"",v=e.extract(h.url),p=e.parse(v,{sort:!1}),x=Object.assign(p,h.query);let f=e.stringify(x,c);f&&(f=`?${f}`);let P=y(h.url);return h.fragmentIdentifier&&(P=`#${u(h.fragmentIdentifier,c)}`),`${g}${f}${P}`},e.pick=(h,c,g)=>{g=Object.assign({parseFragmentIdentifier:!0},g);const{url:v,query:p,fragmentIdentifier:x}=e.parseUrl(h,g);return e.stringifyUrl({url:v,query:a(p,c),fragmentIdentifier:x},g)},e.exclude=(h,c,g)=>{const v=Array.isArray(c)?p=>!c.includes(p):(p,x)=>!c(p,x);return e.pick(h,v,g)}})(Zn)),Zn}var na=Cp();const ur=Rp,Dp={parseNumbers:!1,parseBooleans:!1},jp={skipNull:!1,skipEmptyString:!1},Np=(e,t)=>{var r,n;const{navigateMode:a="push",parseOptions:o,stringifyOptions:i}=t||{},s=Object.assign(Object.assign({},Dp),o),l=Object.assign(Object.assign({},jp),i),u=ur.useLocation(),m=(r=ur.useHistory)===null||r===void 0?void 0:r.call(ur),d=(n=ur.useNavigate)===null||n===void 0?void 0:n.call(ur),b=Aa(),y=M.useRef(typeof e=="function"?e():e||{}),w=M.useMemo(()=>na.parse(u.search,s),[u.search]),E=M.useMemo(()=>Object.assign(Object.assign({},y.current),w),[w]);return[E,et(h=>{const c=typeof h=="function"?h(E):h;b(),m&&m[a]({hash:u.hash,search:na.stringify(Object.assign(Object.assign({},w),c),l)||"?"},u.state),d&&d({hash:u.hash,search:na.stringify(Object.assign(Object.assign({},w),c),l)||"?"},{replace:a==="replace",state:u.state})})]},cr={Array:"a",Boolean:"b",Number:"n",String:"s",Undefined:"u",Null:"N"},Js=(e,t)=>{const r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Array")return e.length?`${cr[r]}${Js(e[0],e)}`:"u_u";const n=t||[e];return r==="Boolean"?`${cr[r]}_${n.map(a=>a?1:0).join()}`:r==="String"?`${cr[r]}_${n.join()}`:r==="Null"?`${cr[r]}_${n.map(()=>"n").join()}`:r==="Number"?`${cr[r]}_${n.join()}`:`u_${n.map(()=>"u").join()}`},Ap=e=>{e=decodeURIComponent(e);const t=e.slice(0,1)==="a",r=t?e.slice(1,2):e.slice(0,1),n=t?e.slice(3).split(","):e.slice(2);return r==="b"?dr(n)?n.map(a=>a==="1"):n==="1":r==="s"?n:r==="n"?dr(n)?n.map(a=>Fo(a)):Fo(n):r==="u"?dr(n)?n.map(()=>{}):void 0:r==="N"?dr(n)?n.map(()=>null):null:n},Li=e=>Object.entries({...e}).reduce((t,[r,n])=>(t[r]=Js(n),t),{}),zi=e=>Object.entries({...e}).reduce((t,[r,n])=>(t[r]=Ap(n),t),{}),Mp={y:void 0},Ip=(e,t)=>{var h;const{useSearchParams:r}=M.useContext(Sr),{storage:n=(r==null?void 0:r.storage)||"state",stateKey:a=(r==null?void 0:r.stateKey)||"__searchParams__"}=t||r||{},o=Aa(),i=$a(),s=Ct(),[l,u]=Np(Li({...Mp,...e}),{navigateMode:"replace"}),m=n==="url"?zi(l):((h=s.state)==null?void 0:h[a])||{},{current:d}=M.useRef({...e,...m}),b=c=>{typeof c=="function"?Object.assign(d,c(d)):Object.assign(d,c),o()},y=async c=>{const g={...c,y:window.scrollY};if(n==="url"){u(Li(g));return}i(s.pathname,{replace:!0,state:{...s.state,[a]:g}})},w=()=>{if(n!=="url")return;const c=zi(l);Object.keys(c).forEach(g=>{c[g]=void 0}),u(c)};M.useEffect(()=>{n==="url"&&l?w():n==="state"&&y({}).catch(Br)},[]);const E=M.useRef(null),S=M.useRef(!1);return Vs(({currentLocation:c,nextLocation:g,historyAction:v})=>v==="POP"?!1:c.pathname!==g.pathname?n==="url"?c.search?!1:(E.current={...g,historyAction:v},y(d).catch(Br),!0):S.current?!1:(E.current={...g,historyAction:v},y(d).catch(Br),!0):(g.pathname===c.pathname&&E.current!==null&&(n==="url"&&g.search!==c.search||n==="state"&&!S.current)&&(setTimeout(()=>{const p=E.current,x=`${p.pathname}${p.search}`;i(x,{replace:p.historyAction!=="PUSH",state:p.state}),S.current=!1,E.current=null},0),S.current=!0),!1)),{searchParams:d,setSearchParams:b}};exports.App=ku;exports.CheckboxValue=zu;exports.ConfigContext=Sr;exports.ConfigProvider=ls;exports.GlobalLoading=os;exports.IconButton=pc;exports.IconFont=Ca;exports.SearchArea=pn;exports.SwitchValue=$u;exports.Table=Cf;exports.useRequest=zf;exports.useSearchParams=Ip;exports.useTable=Wf;
363
+ `+('Please change the parent <Route path="'+c+'"> to <Route ')+('path="'+(c==="/"?"*":c+"/*")+'">.'))}let d=Ct(),b;if(t){var y;let c=typeof t=="string"?Ge(t):t;u==="/"||(y=c.pathname)!=null&&y.startsWith(u)||(process.env.NODE_ENV!=="production"?K(!1,"When overriding the location using `<Routes location>` 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 "'+u+'" ')+('but pathname "'+c.pathname+'" was given in the `location` prop.')):K(!1)),b=c}else b=d;let w=b.pathname||"/",E=w;if(u!=="/"){let c=u.replace(/^\//,"").split("/");E="/"+w.replace(/^\//,"").split("/").slice(c.length).join("/")}let S=dt(e,{pathname:E});process.env.NODE_ENV!=="production"&&(process.env.NODE_ENV!=="production"&&je(m||S!=null,'No routes matched location "'+b.pathname+b.search+b.hash+'" '),process.env.NODE_ENV!=="production"&&je(S==null||S[S.length-1].route.element!==void 0||S[S.length-1].route.Component!==void 0||S[S.length-1].route.lazy!==void 0,'Matched leaf route at location "'+b.pathname+b.search+b.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.'));let h=Bs(S&&S.map(c=>Object.assign({},c,{params:Object.assign({},s,c.params),pathname:ot([u,a.encodeLocation?a.encodeLocation(c.pathname).pathname:c.pathname]),pathnameBase:c.pathnameBase==="/"?u:ot([u,a.encodeLocation?a.encodeLocation(c.pathnameBase).pathname:c.pathnameBase])})),o,r,n);return t&&h?D.createElement(Tt.Provider,{value:{location:ht({pathname:"/",search:"",hash:"",state:null,key:"default"},b),navigationType:Oe.Pop}},h):h}function Gd(){let e=Hs(),t=Wt(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:n},o={padding:"2px 4px",backgroundColor:n},i=null;return process.env.NODE_ENV!=="production"&&(console.error("Error handled by React Router default ErrorBoundary:",e),i=D.createElement(D.Fragment,null,D.createElement("p",null,"💿 Hey developer 👋"),D.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",D.createElement("code",{style:o},"ErrorBoundary")," or"," ",D.createElement("code",{style:o},"errorElement")," prop on your route."))),D.createElement(D.Fragment,null,D.createElement("h2",null,"Unexpected Application Error!"),D.createElement("h3",{style:{fontStyle:"italic"}},t),r?D.createElement("pre",{style:a},r):null,i)}const Kd=D.createElement(Gd,null);class Jd extends D.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?D.createElement(Ye.Provider,{value:this.props.routeContext},D.createElement(za.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Zd(e){let{routeContext:t,match:r,children:n}=e,a=D.useContext(Yt);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),D.createElement(Ye.Provider,{value:t},n)}function Bs(e,t,r,n){var a;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var o;if(!r)return null;if(r.errors)e=r.matches;else if((o=n)!=null&&o.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,s=(a=r)==null?void 0:a.errors;if(s!=null){let m=i.findIndex(d=>d.route.id&&(s==null?void 0:s[d.route.id])!==void 0);m>=0||(process.env.NODE_ENV!=="production"?K(!1,"Could not find a matching route for errors on route IDs: "+Object.keys(s).join(",")):K(!1)),i=i.slice(0,Math.min(i.length,m+1))}let l=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let m=0;m<i.length;m++){let d=i[m];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(u=m),d.route.id){let{loaderData:b,errors:y}=r,w=d.route.loader&&b[d.route.id]===void 0&&(!y||y[d.route.id]===void 0);if(d.route.lazy||w){l=!0,u>=0?i=i.slice(0,u+1):i=[i[0]];break}}}return i.reduceRight((m,d,b)=>{let y,w=!1,E=null,S=null;r&&(y=s&&d.route.id?s[d.route.id]:void 0,E=d.route.errorElement||Kd,l&&(u<0&&b===0?(Xs("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,S=null):u===b&&(w=!0,S=d.route.hydrateFallbackElement||null)));let h=t.concat(i.slice(0,b+1)),c=()=>{let g;return y?g=E:w?g=S:d.route.Component?g=D.createElement(d.route.Component,null):d.route.element?g=d.route.element:g=m,D.createElement(Zd,{match:d,routeContext:{outlet:m,matches:h,isDataRoute:r!=null},children:g})};return r&&(d.route.ErrorBoundary||d.route.errorElement||b===0)?D.createElement(Jd,{location:r.location,revalidation:r.revalidation,component:E,error:y,children:c(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):c()},null)}var vn=(function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e})(vn||{}),Ue=(function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e})(Ue||{});function Wa(e){return e+" must be used within a data router. See https://reactrouter.com/v6/routers/picking-a-router."}function qa(e){let t=D.useContext(Yt);return t||(process.env.NODE_ENV!=="production"?K(!1,Wa(e)):K(!1)),t}function gt(e){let t=D.useContext(gn);return t||(process.env.NODE_ENV!=="production"?K(!1,Wa(e)):K(!1)),t}function Qd(e){let t=D.useContext(Ye);return t||(process.env.NODE_ENV!=="production"?K(!1,Wa(e)):K(!1)),t}function Rr(e){let t=Qd(e),r=t.matches[t.matches.length-1];return r.route.id||(process.env.NODE_ENV!=="production"?K(!1,e+' can only be used on routes that contain a unique "id"'):K(!1)),r.route.id}function ep(){return Rr(Ue.UseRouteId)}function tp(){return gt(Ue.UseNavigation).navigation}function rp(){let e=qa(vn.UseRevalidator),t=gt(Ue.UseRevalidator);return D.useMemo(()=>({revalidate:e.router.revalidate,state:t.revalidation}),[e.router.revalidate,t.revalidation])}function np(){let{matches:e,loaderData:t}=gt(Ue.UseMatches);return D.useMemo(()=>e.map(r=>Os(r,t)),[e,t])}function ap(){let e=gt(Ue.UseLoaderData),t=Rr(Ue.UseLoaderData);if(e.errors&&e.errors[t]!=null){console.error("You cannot `useLoaderData` in an errorElement (routeId: "+t+")");return}return e.loaderData[t]}function op(e){return gt(Ue.UseRouteLoaderData).loaderData[e]}function ip(){let e=gt(Ue.UseActionData),t=Rr(Ue.UseLoaderData);return e.actionData?e.actionData[t]:void 0}function Hs(){var e;let t=D.useContext(za),r=gt(Ue.UseRouteError),n=Rr(Ue.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function Ys(){let e=D.useContext(yr);return e==null?void 0:e._data}function sp(){let e=D.useContext(yr);return e==null?void 0:e._error}let lp=0;function Vs(e){let{router:t,basename:r}=qa(vn.UseBlocker),n=gt(Ue.UseBlocker),[a,o]=D.useState(""),i=D.useCallback(s=>{if(typeof e!="function")return!!e;if(r==="/")return e(s);let{currentLocation:l,nextLocation:u,historyAction:m}=s;return e({currentLocation:ht({},l,{pathname:_t(l.pathname,r)||l.pathname}),nextLocation:ht({},u,{pathname:_t(u.pathname,r)||u.pathname}),historyAction:m})},[r,e]);return D.useEffect(()=>{let s=String(++lp);return o(s),()=>t.deleteBlocker(s)},[t]),D.useEffect(()=>{a!==""&&t.getBlocker(a,i)},[t,a,i]),a&&n.blockers.has(a)?n.blockers.get(a):Ft}function up(){let{router:e}=qa(vn.UseNavigateStable),t=Rr(Ue.UseNavigateStable),r=D.useRef(!1);return zs(()=>{r.current=!0}),D.useCallback(function(a,o){o===void 0&&(o={}),process.env.NODE_ENV!=="production"&&je(r.current,Ls),r.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,ht({fromRouteId:t},o)))},[e,t])}const ji={};function Xs(e,t,r){!t&&!ji[e]&&(ji[e]=!0,process.env.NODE_ENV!=="production"&&je(!1,r))}const Ni={};function cp(e,t){process.env.NODE_ENV!=="production"&&!Ni[t]&&(Ni[t]=!0,console.warn(t))}const It=(e,t,r)=>cp(e,"⚠️ React Router Future Flag Warning: "+t+". "+("You can use the `"+e+"` future flag to opt-in early. ")+("For more information, see "+r+"."));function Ba(e,t){(e==null?void 0:e.v7_startTransition)===void 0&&It("v7_startTransition","React Router will begin wrapping state updates in `React.startTransition` in v7","https://reactrouter.com/v6/upgrading/future#v7_starttransition"),(e==null?void 0:e.v7_relativeSplatPath)===void 0&&(!t||t.v7_relativeSplatPath===void 0)&&It("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath"),t&&(t.v7_fetcherPersist===void 0&&It("v7_fetcherPersist","The persistence behavior of fetchers is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_fetcherpersist"),t.v7_normalizeFormMethod===void 0&&It("v7_normalizeFormMethod","Casing of `formMethod` fields is being normalized to uppercase in v7","https://reactrouter.com/v6/upgrading/future#v7_normalizeformmethod"),t.v7_partialHydration===void 0&&It("v7_partialHydration","`RouterProvider` hydration behavior is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_partialhydration"),t.v7_skipActionErrorRevalidation===void 0&&It("v7_skipActionErrorRevalidation","The revalidation behavior after 4xx/5xx `action` responses is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_skipactionerrorrevalidation"))}const fp="startTransition",rn=D[fp];function dp(e){let{fallbackElement:t,router:r,future:n}=e,[a,o]=D.useState(r.state),{v7_startTransition:i}=n||{},s=D.useCallback(d=>{i&&rn?rn(()=>o(d)):o(d)},[o,i]);D.useLayoutEffect(()=>r.subscribe(s),[r,s]),D.useEffect(()=>{process.env.NODE_ENV!=="production"&&je(t==null||!r.future.v7_partialHydration,"`<RouterProvider fallbackElement>` is deprecated when using `v7_partialHydration`, use a `HydrateFallback` component instead")},[]);let l=D.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:d=>r.navigate(d),push:(d,b,y)=>r.navigate(d,{state:b,preventScrollReset:y==null?void 0:y.preventScrollReset}),replace:(d,b,y)=>r.navigate(d,{replace:!0,state:b,preventScrollReset:y==null?void 0:y.preventScrollReset})}),[r]),u=r.basename||"/",m=D.useMemo(()=>({router:r,navigator:l,static:!1,basename:u}),[r,l,u]);return D.useEffect(()=>Ba(n,r.future),[r,n]),D.createElement(D.Fragment,null,D.createElement(Yt.Provider,{value:m},D.createElement(gn.Provider,{value:a},D.createElement(Ha,{basename:u,location:a.location,navigationType:a.historyAction,navigator:l,future:{v7_relativeSplatPath:r.future.v7_relativeSplatPath}},a.initialized||r.future.v7_partialHydration?D.createElement(pp,{routes:r.routes,future:r.future,state:a}):t))),null)}function pp(e){let{routes:t,future:r,state:n}=e;return Ua(t,void 0,n,r)}function hp(e){let{basename:t,children:r,initialEntries:n,initialIndex:a,future:o}=e,i=D.useRef();i.current==null&&(i.current=Ps({initialEntries:n,initialIndex:a,v5Compat:!0}));let s=i.current,[l,u]=D.useState({action:s.action,location:s.location}),{v7_startTransition:m}=o||{},d=D.useCallback(b=>{m&&rn?rn(()=>u(b)):u(b)},[u,m]);return D.useLayoutEffect(()=>s.listen(d),[s,d]),D.useEffect(()=>Ba(o),[o]),D.createElement(Ha,{basename:t,children:r,location:l.location,navigationType:l.action,navigator:s,future:o})}function mp(e){let{to:t,replace:r,state:n,relative:a}=e;mt()||(process.env.NODE_ENV!=="production"?K(!1,"<Navigate> may be used only in the context of a <Router> component."):K(!1));let{future:o,static:i}=D.useContext(it);process.env.NODE_ENV!=="production"&&je(!i,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:s}=D.useContext(Ye),{pathname:l}=Ct(),u=$a(),m=mn(t,hn(s,o.v7_relativeSplatPath),l,a==="path"),d=JSON.stringify(m);return D.useEffect(()=>u(JSON.parse(d),{replace:r,state:n,relative:a}),[u,d,a,r,n]),null}function gp(e){return Us(e.context)}function Gs(e){process.env.NODE_ENV!=="production"?K(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>."):K(!1)}function Ha(e){let{basename:t="/",children:r=null,location:n,navigationType:a=Oe.Pop,navigator:o,static:i=!1,future:s}=e;mt()&&(process.env.NODE_ENV!=="production"?K(!1,"You cannot render a <Router> inside another <Router>. You should never have more than one in your app."):K(!1));let l=t.replace(/^\/*/,"/"),u=D.useMemo(()=>({basename:l,navigator:o,static:i,future:ht({v7_relativeSplatPath:!1},s)}),[l,s,o,i]);typeof n=="string"&&(n=Ge(n));let{pathname:m="/",search:d="",hash:b="",state:y=null,key:w="default"}=n,E=D.useMemo(()=>{let S=_t(m,l);return S==null?null:{location:{pathname:S,search:d,hash:b,state:y,key:w},navigationType:a}},[l,m,d,b,y,w,a]);return process.env.NODE_ENV!=="production"&&je(E!=null,'<Router basename="'+l+'"> is not able to match the URL '+('"'+m+d+b+'" because it does not start with the ')+"basename, so the <Router> won't render anything."),E==null?null:D.createElement(it.Provider,{value:u},D.createElement(Tt.Provider,{children:r,value:E}))}function vp(e){let{children:t,location:r}=e;return qs(br(t),r)}function yp(e){let{children:t,errorElement:r,resolve:n}=e;return D.createElement(Ep,{resolve:n,errorElement:r},D.createElement(xp,null,t))}var He=(function(e){return e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error",e})(He||{});const bp=new Promise(()=>{});class Ep extends D.Component{constructor(t){super(t),this.state={error:null}}static getDerivedStateFromError(t){return{error:t}}componentDidCatch(t,r){console.error("<Await> caught the following error during render",t,r)}render(){let{children:t,errorElement:r,resolve:n}=this.props,a=null,o=He.pending;if(!(n instanceof Promise))o=He.success,a=Promise.resolve(),Object.defineProperty(a,"_tracked",{get:()=>!0}),Object.defineProperty(a,"_data",{get:()=>n});else if(this.state.error){o=He.error;let i=this.state.error;a=Promise.reject().catch(()=>{}),Object.defineProperty(a,"_tracked",{get:()=>!0}),Object.defineProperty(a,"_error",{get:()=>i})}else n._tracked?(a=n,o="_error"in a?He.error:"_data"in a?He.success:He.pending):(o=He.pending,Object.defineProperty(n,"_tracked",{get:()=>!0}),a=n.then(i=>Object.defineProperty(n,"_data",{get:()=>i}),i=>Object.defineProperty(n,"_error",{get:()=>i})));if(o===He.error&&a._error instanceof tn)throw bp;if(o===He.error&&!r)throw a._error;if(o===He.error)return D.createElement(yr.Provider,{value:a,children:r});if(o===He.success)return D.createElement(yr.Provider,{value:a,children:t});throw a}}function xp(e){let{children:t}=e,r=Ys(),n=typeof t=="function"?t(r):t;return D.createElement(D.Fragment,null,n)}function br(e,t){t===void 0&&(t=[]);let r=[];return D.Children.forEach(e,(n,a)=>{if(!D.isValidElement(n))return;let o=[...t,a];if(n.type===D.Fragment){r.push.apply(r,br(n.props.children,o));return}n.type!==Gs&&(process.env.NODE_ENV!=="production"?K(!1,"["+(typeof n.type=="string"?n.type:n.type.name)+"] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>"):K(!1)),!n.props.index||!n.props.children||(process.env.NODE_ENV!=="production"?K(!1,"An index route cannot have child routes."):K(!1));let i={id:n.props.id||o.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(i.children=br(n.props.children,o)),r.push(i)}),r}function Sp(e){return Bs(e)}function Ks(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(process.env.NODE_ENV!=="production"&&e.element&&process.env.NODE_ENV!=="production"&&je(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:D.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(process.env.NODE_ENV!=="production"&&e.hydrateFallbackElement&&process.env.NODE_ENV!=="production"&&je(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:D.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(process.env.NODE_ENV!=="production"&&e.errorElement&&process.env.NODE_ENV!=="production"&&je(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:D.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}function wp(e,t){return wd({basename:t==null?void 0:t.basename,future:ht({},t==null?void 0:t.future,{v7_prependBasename:!0}),history:Ps({initialEntries:t==null?void 0:t.initialEntries,initialIndex:t==null?void 0:t.initialIndex}),hydrationData:t==null?void 0:t.hydrationData,routes:e,mapRouteProperties:Ks,dataStrategy:t==null?void 0:t.dataStrategy,patchRoutesOnNavigation:t==null?void 0:t.patchRoutesOnNavigation}).initialize()}const Rp=Object.freeze(Object.defineProperty({__proto__:null,AbortedDeferredError:tn,Await:yp,MemoryRouter:hp,Navigate:mp,get NavigationType(){return Oe},Outlet:gp,Route:Gs,Router:Ha,RouterProvider:dp,Routes:vp,UNSAFE_DataRouterContext:Yt,UNSAFE_DataRouterStateContext:gn,UNSAFE_LocationContext:Tt,UNSAFE_NavigationContext:it,UNSAFE_RouteContext:Ye,UNSAFE_logV6DeprecationWarnings:Ba,UNSAFE_mapRouteProperties:Ks,UNSAFE_useRouteId:ep,UNSAFE_useRoutesImpl:Ua,createMemoryRouter:wp,createPath:wr,createRoutesFromChildren:br,createRoutesFromElements:br,defer:pd,generatePath:rd,isRouteErrorResponse:Wt,json:ud,matchPath:en,matchRoutes:dt,parsePath:Ge,redirect:Ia,redirectDocument:hd,renderMatches:Sp,replace:md,resolvePath:Ds,useActionData:ip,useAsyncError:sp,useAsyncValue:Ys,useBlocker:Vs,useHref:qd,useInRouterContext:mt,useLoaderData:ap,useLocation:Ct,useMatch:Hd,useMatches:np,useNavigate:$a,useNavigation:tp,useNavigationType:Bd,useOutlet:Us,useOutletContext:Vd,useParams:Xd,useResolvedPath:Ws,useRevalidator:rp,useRouteError:Hs,useRouteLoaderData:op,useRoutes:qs},Symbol.toStringTag,{value:"Module"}));var Zn={},Qn,Ai;function Pp(){return Ai||(Ai=1,Qn=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)),Qn}var ea,Mi;function Op(){if(Mi)return ea;Mi=1;var e="%[a-f0-9]{2}",t=new RegExp("("+e+")|([^%]+?)","gi"),r=new RegExp("("+e+")+","gi");function n(i,s){try{return[decodeURIComponent(i.join(""))]}catch{}if(i.length===1)return i;s=s||1;var l=i.slice(0,s),u=i.slice(s);return Array.prototype.concat.call([],n(l),n(u))}function a(i){try{return decodeURIComponent(i)}catch{for(var s=i.match(t)||[],l=1;l<s.length;l++)i=n(s,l).join(""),s=i.match(t)||[];return i}}function o(i){for(var s={"%FE%FF":"��","%FF%FE":"��"},l=r.exec(i);l;){try{s[l[0]]=decodeURIComponent(l[0])}catch{var u=a(l[0]);u!==l[0]&&(s[l[0]]=u)}l=r.exec(i)}s["%C2"]="�";for(var m=Object.keys(s),d=0;d<m.length;d++){var b=m[d];i=i.replace(new RegExp(b,"g"),s[b])}return i}return ea=function(i){if(typeof i!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof i+"`");try{return i=i.replace(/\+/g," "),decodeURIComponent(i)}catch{return o(i)}},ea}var ta,Ii;function _p(){return Ii||(Ii=1,ta=(e,t)=>{if(!(typeof e=="string"&&typeof t=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(t==="")return[e];const r=e.indexOf(t);return r===-1?[e]:[e.slice(0,r),e.slice(r+t.length)]}),ta}var ra,ki;function Tp(){return ki||(ki=1,ra=function(e,t){for(var r={},n=Object.keys(e),a=Array.isArray(t),o=0;o<n.length;o++){var i=n[o],s=e[i];(a?t.indexOf(i)!==-1:t(i,s,e))&&(r[i]=s)}return r}),ra}var Fi;function Cp(){return Fi||(Fi=1,(function(e){const t=Pp(),r=Op(),n=_p(),a=Tp(),o=h=>h==null;function i(h){switch(h.arrayFormat){case"index":return c=>(g,v)=>{const p=g.length;return v===void 0||h.skipNull&&v===null||h.skipEmptyString&&v===""?g:v===null?[...g,[u(c,h),"[",p,"]"].join("")]:[...g,[u(c,h),"[",u(p,h),"]=",u(v,h)].join("")]};case"bracket":return c=>(g,v)=>v===void 0||h.skipNull&&v===null||h.skipEmptyString&&v===""?g:v===null?[...g,[u(c,h),"[]"].join("")]:[...g,[u(c,h),"[]=",u(v,h)].join("")];case"comma":case"separator":return c=>(g,v)=>v==null||v.length===0?g:g.length===0?[[u(c,h),"=",u(v,h)].join("")]:[[g,u(v,h)].join(h.arrayFormatSeparator)];default:return c=>(g,v)=>v===void 0||h.skipNull&&v===null||h.skipEmptyString&&v===""?g:v===null?[...g,u(c,h)]:[...g,[u(c,h),"=",u(v,h)].join("")]}}function s(h){let c;switch(h.arrayFormat){case"index":return(g,v,p)=>{if(c=/\[(\d*)\]$/.exec(g),g=g.replace(/\[\d*\]$/,""),!c){p[g]=v;return}p[g]===void 0&&(p[g]={}),p[g][c[1]]=v};case"bracket":return(g,v,p)=>{if(c=/(\[\])$/.exec(g),g=g.replace(/\[\]$/,""),!c){p[g]=v;return}if(p[g]===void 0){p[g]=[v];return}p[g]=[].concat(p[g],v)};case"comma":case"separator":return(g,v,p)=>{const x=typeof v=="string"&&v.includes(h.arrayFormatSeparator),f=typeof v=="string"&&!x&&m(v,h).includes(h.arrayFormatSeparator);v=f?m(v,h):v;const P=x||f?v.split(h.arrayFormatSeparator).map(j=>m(j,h)):v===null?v:m(v,h);p[g]=P};default:return(g,v,p)=>{if(p[g]===void 0){p[g]=v;return}p[g]=[].concat(p[g],v)}}}function l(h){if(typeof h!="string"||h.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function u(h,c){return c.encode?c.strict?t(h):encodeURIComponent(h):h}function m(h,c){return c.decode?r(h):h}function d(h){return Array.isArray(h)?h.sort():typeof h=="object"?d(Object.keys(h)).sort((c,g)=>Number(c)-Number(g)).map(c=>h[c]):h}function b(h){const c=h.indexOf("#");return c!==-1&&(h=h.slice(0,c)),h}function y(h){let c="";const g=h.indexOf("#");return g!==-1&&(c=h.slice(g)),c}function w(h){h=b(h);const c=h.indexOf("?");return c===-1?"":h.slice(c+1)}function E(h,c){return c.parseNumbers&&!Number.isNaN(Number(h))&&typeof h=="string"&&h.trim()!==""?h=Number(h):c.parseBooleans&&h!==null&&(h.toLowerCase()==="true"||h.toLowerCase()==="false")&&(h=h.toLowerCase()==="true"),h}function S(h,c){c=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},c),l(c.arrayFormatSeparator);const g=s(c),v=Object.create(null);if(typeof h!="string"||(h=h.trim().replace(/^[?#&]/,""),!h))return v;for(const p of h.split("&")){if(p==="")continue;let[x,f]=n(c.decode?p.replace(/\+/g," "):p,"=");f=f===void 0?null:["comma","separator"].includes(c.arrayFormat)?f:m(f,c),g(m(x,c),f,v)}for(const p of Object.keys(v)){const x=v[p];if(typeof x=="object"&&x!==null)for(const f of Object.keys(x))x[f]=E(x[f],c);else v[p]=E(x,c)}return c.sort===!1?v:(c.sort===!0?Object.keys(v).sort():Object.keys(v).sort(c.sort)).reduce((p,x)=>{const f=v[x];return f&&typeof f=="object"&&!Array.isArray(f)?p[x]=d(f):p[x]=f,p},Object.create(null))}e.extract=w,e.parse=S,e.stringify=(h,c)=>{if(!h)return"";c=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},c),l(c.arrayFormatSeparator);const g=f=>c.skipNull&&o(h[f])||c.skipEmptyString&&h[f]==="",v=i(c),p={};for(const f of Object.keys(h))g(f)||(p[f]=h[f]);const x=Object.keys(p);return c.sort!==!1&&x.sort(c.sort),x.map(f=>{const P=h[f];return P===void 0?"":P===null?u(f,c):Array.isArray(P)?P.reduce(v(f),[]).join("&"):u(f,c)+"="+u(P,c)}).filter(f=>f.length>0).join("&")},e.parseUrl=(h,c)=>{c=Object.assign({decode:!0},c);const[g,v]=n(h,"#");return Object.assign({url:g.split("?")[0]||"",query:S(w(h),c)},c&&c.parseFragmentIdentifier&&v?{fragmentIdentifier:m(v,c)}:{})},e.stringifyUrl=(h,c)=>{c=Object.assign({encode:!0,strict:!0},c);const g=b(h.url).split("?")[0]||"",v=e.extract(h.url),p=e.parse(v,{sort:!1}),x=Object.assign(p,h.query);let f=e.stringify(x,c);f&&(f=`?${f}`);let P=y(h.url);return h.fragmentIdentifier&&(P=`#${u(h.fragmentIdentifier,c)}`),`${g}${f}${P}`},e.pick=(h,c,g)=>{g=Object.assign({parseFragmentIdentifier:!0},g);const{url:v,query:p,fragmentIdentifier:x}=e.parseUrl(h,g);return e.stringifyUrl({url:v,query:a(p,c),fragmentIdentifier:x},g)},e.exclude=(h,c,g)=>{const v=Array.isArray(c)?p=>!c.includes(p):(p,x)=>!c(p,x);return e.pick(h,v,g)}})(Zn)),Zn}var na=Cp();const ur=Rp,Dp={parseNumbers:!1,parseBooleans:!1},jp={skipNull:!1,skipEmptyString:!1},Np=(e,t)=>{var r,n;const{navigateMode:a="push",parseOptions:o,stringifyOptions:i}=t||{},s=Object.assign(Object.assign({},Dp),o),l=Object.assign(Object.assign({},jp),i),u=ur.useLocation(),m=(r=ur.useHistory)===null||r===void 0?void 0:r.call(ur),d=(n=ur.useNavigate)===null||n===void 0?void 0:n.call(ur),b=Aa(),y=M.useRef(typeof e=="function"?e():e||{}),w=M.useMemo(()=>na.parse(u.search,s),[u.search]),E=M.useMemo(()=>Object.assign(Object.assign({},y.current),w),[w]);return[E,et(h=>{const c=typeof h=="function"?h(E):h;b(),m&&m[a]({hash:u.hash,search:na.stringify(Object.assign(Object.assign({},w),c),l)||"?"},u.state),d&&d({hash:u.hash,search:na.stringify(Object.assign(Object.assign({},w),c),l)||"?"},{replace:a==="replace",state:u.state})})]},cr={Array:"a",Boolean:"b",Number:"n",String:"s",Undefined:"u",Null:"N"},Js=(e,t)=>{const r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Array")return e.length?`${cr[r]}${Js(e[0],e)}`:"u_u";const n=t||[e];return r==="Boolean"?`${cr[r]}_${n.map(a=>a?1:0).join()}`:r==="String"?`${cr[r]}_${n.join()}`:r==="Null"?`${cr[r]}_${n.map(()=>"n").join()}`:r==="Number"?`${cr[r]}_${n.join()}`:`u_${n.map(()=>"u").join()}`},Ap=e=>{e=decodeURIComponent(e);const t=e.slice(0,1)==="a",r=t?e.slice(1,2):e.slice(0,1),n=t?e.slice(3).split(","):e.slice(2);return r==="b"?dr(n)?n.map(a=>a==="1"):n==="1":r==="s"?n:r==="n"?dr(n)?n.map(a=>Fo(a)):Fo(n):r==="u"?dr(n)?n.map(()=>{}):void 0:r==="N"?dr(n)?n.map(()=>null):null:n},Li=e=>Object.entries({...e}).reduce((t,[r,n])=>(t[r]=Js(n),t),{}),zi=e=>Object.entries({...e}).reduce((t,[r,n])=>(t[r]=Ap(n),t),{}),Mp={y:void 0};window.routerHistory=window.routerHistory||new Map;const Ip=(e,t)=>{var h;const{useSearchParams:r}=M.useContext(Sr),{storage:n=(r==null?void 0:r.storage)||"state",stateKey:a=(r==null?void 0:r.stateKey)||"__searchParams__"}=t||r||{},o=Aa(),i=$a(),s=Ct(),[l,u]=Np(Li({...Mp,...e}),{navigateMode:"replace"}),m=n==="url"?zi(l):((h=s.state)==null?void 0:h[a])||{},{current:d}=M.useRef({...e,...m}),b=c=>{typeof c=="function"?Object.assign(d,c(d)):Object.assign(d,c),o()},y=async c=>{const g={...c,y:window.scrollY};if(n==="url"){const v=Li(g);u(v);let p="";for(const x in v){const f=v[x];p+=`${x}=${f}&`}p=p.slice(0,-1),window.routerHistory.set(s.pathname,{path:`${s.pathname}?${p}`,replace:!0});return}window.routerHistory.set(s.pathname,{path:s.pathname,replace:!0,state:{...s.state||{},[a]:g}}),i(s.pathname,{replace:!0,state:{...s.state,[a]:g}})},w=()=>{if(n!=="url")return;const c=zi(l);Object.keys(c).forEach(g=>{c[g]=void 0}),u(c)};M.useEffect(()=>{n==="url"&&l?w():n==="state"&&y({}).catch(Br)},[]);const E=M.useRef(null),S=M.useRef(!1);return Vs(({currentLocation:c,nextLocation:g,historyAction:v})=>v==="POP"?!1:c.pathname!==g.pathname?n==="url"?c.search?!1:(E.current={...g,historyAction:v},y(d).catch(Br),!0):S.current?!1:(E.current={...g,historyAction:v},y(d).catch(Br),!0):(g.pathname===c.pathname&&E.current!==null&&(n==="url"&&g.search!==c.search||n==="state"&&!S.current)&&(setTimeout(()=>{const p=E.current;if(!p)return;const x=`${p.pathname}${p.search}`;i(x,{replace:p.historyAction!=="PUSH",state:p.state}),S.current=!1,E.current=null},0),S.current=!0),!1)),{searchParams:d,setSearchParams:b}};exports.App=ku;exports.CheckboxValue=zu;exports.ConfigContext=Sr;exports.ConfigProvider=ls;exports.GlobalLoading=os;exports.IconButton=pc;exports.IconFont=Ca;exports.SearchArea=pn;exports.SwitchValue=$u;exports.Table=Cf;exports.useRequest=zf;exports.useSearchParams=Ip;exports.useTable=Wf;