You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

@remix-run/router

Package Overview
Dependencies
Maintainers
2
Versions
196
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.15.3 to 1.16.0-pre.0

24

CHANGELOG.md
# `@remix-run/router`
## 1.16.0-pre.0
### Minor Changes
- Add a new `unstable_dataStrategy` configuration option ([#11098](https://github.com/remix-run/react-router/pull/11098))
- This option allows Data Router applications to take control over the approach for executing route loaders and actions
- The default implementation is today's behavior, to fetch all loaders in parallel, but this option allows users to implement more advanced data flows including Remix single-fetch, middleware/context APIs, automatic loader caching, and more
- Add a new `future.unstable_skipActionRevalidation` future flag ([#11098](https://github.com/remix-run/react-router/pull/11098))
- Currently, active loaders revalidate after any action, regardless of the result
- With this flag enabled, actions that return/throw a 4xx/5xx response status will no longer automatically revalidate
- This should reduce load on your server since it's rare that a 4xx/5xx should actually mutate any data
- If you need to revalidate after a 4xx/5xx result with this flag enabled, you can still do that via returning `true` from `shouldRevalidate`
- `shouldRevalidate` now also receives a new `unstable_actionStatus` argument alongside `actionResult` so you can make decision based on the status of the `action` response without having to encode it into the action data
- - Move `unstable_dataStrategy` from `createStaticHandler` to `staticHandler.query` so it can be request-specific for use with the `ResponseStub` approach in Remix. It's not really applicable to `queryRoute` for now since that's a singular handler call anyway so any pre-processing/post/processing could be done there manually. ([#11377](https://github.com/remix-run/react-router/pull/11377))
- Added a new `skipLoaders` flag to `staticHandler.query` for calling only the action in Remix Single Fetch
- Added 2 new options to the `staticHandler.query` method for use in Remix's Single Fetch implementation: ([#11098](https://github.com/remix-run/react-router/pull/11098))
- `loadRouteIds`: An optional array of route IDs to load if you wish to load a subset of the matched routes (useful for fine-grained revalidation)
- `skipLoaderErrorBubbling`: Disable error bubbling on loader executions for single-fetch scenarios where the client-side router will handle the bubbling
## 1.15.3

@@ -4,0 +28,0 @@

2

dist/index.d.ts

@@ -1,2 +0,2 @@

export type { ActionFunction, ActionFunctionArgs, AgnosticDataIndexRouteObject, AgnosticDataNonIndexRouteObject, AgnosticDataRouteMatch, AgnosticDataRouteObject, AgnosticIndexRouteObject, AgnosticNonIndexRouteObject, AgnosticRouteMatch, AgnosticRouteObject, ErrorResponse, FormEncType, FormMethod, HTMLFormMethod, JsonFunction, LazyRouteFunction, LoaderFunction, LoaderFunctionArgs, ParamParseKey, Params, PathMatch, PathParam, PathPattern, RedirectFunction, ShouldRevalidateFunction, ShouldRevalidateFunctionArgs, TrackedPromise, UIMatch, V7_FormMethod, } from "./utils";
export type { ActionFunction, ActionFunctionArgs, AgnosticDataIndexRouteObject, AgnosticDataNonIndexRouteObject, AgnosticDataRouteMatch, AgnosticDataRouteObject, AgnosticIndexRouteObject, AgnosticNonIndexRouteObject, AgnosticRouteMatch, AgnosticRouteObject, DataStrategyFunction as unstable_DataStrategyFunction, DataStrategyFunctionArgs as unstable_DataStrategyFunctionArgs, DataStrategyMatch as unstable_DataStrategyMatch, ErrorResponse, FormEncType, FormMethod, HandlerResult as unstable_HandlerResult, HTMLFormMethod, JsonFunction, LazyRouteFunction, LoaderFunction, LoaderFunctionArgs, ParamParseKey, Params, PathMatch, PathParam, PathPattern, RedirectFunction, ShouldRevalidateFunction, ShouldRevalidateFunctionArgs, TrackedPromise, UIMatch, V7_FormMethod, } from "./utils";
export { AbortedDeferredError, defer, generatePath, getToPathname, isRouteErrorResponse, joinPaths, json, matchPath, matchRoutes, normalizePathname, redirect, redirectDocument, resolvePath, resolveTo, stripBasename, } from "./utils";

@@ -3,0 +3,0 @@ export type { BrowserHistory, BrowserHistoryOptions, HashHistory, HashHistoryOptions, History, InitialEntry, Location, MemoryHistory, MemoryHistoryOptions, Path, To, } from "./history";

import type { History, Location, Path, To } from "./history";
import { Action as HistoryAction } from "./history";
import type { AgnosticDataRouteMatch, AgnosticDataRouteObject, AgnosticRouteObject, DeferredData, DetectErrorBoundaryFunction, FormEncType, HTMLFormMethod, MapRoutePropertiesFunction, RouteData, Submission, UIMatch } from "./utils";
import type { AgnosticDataRouteMatch, AgnosticDataRouteObject, AgnosticRouteObject, DataStrategyFunction, DeferredData, DetectErrorBoundaryFunction, FormEncType, HTMLFormMethod, MapRoutePropertiesFunction, RouteData, Submission, UIMatch } from "./utils";
/**

@@ -261,2 +261,3 @@ * A Router instance manages all navigation and data loading/mutations

v7_relativeSplatPath: boolean;
unstable_skipActionErrorRevalidation: boolean;
}

@@ -278,2 +279,3 @@ /**

window?: Window;
unstable_dataStrategy?: DataStrategyFunction;
}

@@ -302,3 +304,7 @@ /**

query(request: Request, opts?: {
loadRouteIds?: string[];
requestContext?: unknown;
skipLoaders?: boolean;
skipLoaderErrorBubbling?: boolean;
unstable_dataStrategy?: DataStrategyFunction;
}): Promise<StaticHandlerContext | Response>;

@@ -305,0 +311,0 @@ queryRoute(request: Request, opts?: {

/**
* @remix-run/router v1.15.3
* @remix-run/router v1.16.0-pre.0
*

@@ -11,3 +11,3 @@ * Copyright (c) Remix Software Inc.

*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).RemixRouter={})}(this,(function(e){"use strict";function t(){return t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},t.apply(this,arguments)}let r=function(e){return e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE",e}({});const a="popstate";function o(e,t){if(!1===e||null==e)throw new Error(t)}function n(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function i(e,t){return{usr:e.state,key:e.key,idx:t}}function s(e,r,a,o){return void 0===a&&(a=null),t({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof r?c(r):r,{state:a,key:r&&r.key||o||Math.random().toString(36).substr(2,8)})}function l(e){let{pathname:t="/",search:r="",hash:a=""}=e;return r&&"?"!==r&&(t+="?"===r.charAt(0)?r:"?"+r),a&&"#"!==a&&(t+="#"===a.charAt(0)?a:"#"+a),t}function c(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let a=e.indexOf("?");a>=0&&(t.search=e.substr(a),e=e.substr(0,a)),e&&(t.pathname=e)}return t}function d(e,n,c,d){void 0===d&&(d={});let{window:u=document.defaultView,v5Compat:h=!1}=d,f=u.history,p=r.Pop,m=null,y=v();function v(){return(f.state||{idx:null}).idx}function g(){p=r.Pop;let e=v(),t=null==e?null:e-y;y=e,m&&m({action:p,location:w.location,delta:t})}function b(e){let t="null"!==u.location.origin?u.location.origin:u.location.href,r="string"==typeof e?e:l(e);return r=r.replace(/ $/,"%20"),o(t,"No window.location.(origin|href) available to create URL for href: "+r),new URL(r,t)}null==y&&(y=0,f.replaceState(t({},f.state,{idx:y}),""));let w={get action(){return p},get location(){return e(u,f)},listen(e){if(m)throw new Error("A history only accepts one active listener");return u.addEventListener(a,g),m=e,()=>{u.removeEventListener(a,g),m=null}},createHref:e=>n(u,e),createURL:b,encodeLocation(e){let t=b(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){p=r.Push;let a=s(w.location,e,t);c&&c(a,e),y=v()+1;let o=i(a,y),n=w.createHref(a);try{f.pushState(o,"",n)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;u.location.assign(n)}h&&m&&m({action:p,location:w.location,delta:1})},replace:function(e,t){p=r.Replace;let a=s(w.location,e,t);c&&c(a,e),y=v();let o=i(a,y),n=w.createHref(a);f.replaceState(o,"",n),h&&m&&m({action:p,location:w.location,delta:0})},go:e=>f.go(e)};return w}let u=function(e){return e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error",e}({});const h=new Set(["lazy","caseSensitive","path","id","index","children"]);function f(e,r,a,n){return void 0===a&&(a=[]),void 0===n&&(n={}),e.map(((e,i)=>{let s=[...a,i],l="string"==typeof e.id?e.id:s.join("-");if(o(!0!==e.index||!e.children,"Cannot specify children on an index route"),o(!n[l],'Found a route id collision on id "'+l+"\". Route id's must be globally unique within Data Router usages"),function(e){return!0===e.index}(e)){let a=t({},e,r(e),{id:l});return n[l]=a,a}{let a=t({},e,r(e),{id:l,children:void 0});return n[l]=a,e.children&&(a.children=f(e.children,r,s,n)),a}}))}function p(e,t,r){void 0===r&&(r="/");let a=R(("string"==typeof t?c(t):t).pathname||"/",r);if(null==a)return null;let o=y(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every(((e,r)=>e===t[r]))?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(o);let n=null;for(let e=0;null==n&&e<o.length;++e){let t=E(a);n=D(o[e],t)}return n}function m(e,t){let{route:r,pathname:a,params:o}=e;return{id:r.id,pathname:a,params:o,data:t[r.id],handle:r.handle}}function y(e,t,r,a){void 0===t&&(t=[]),void 0===r&&(r=[]),void 0===a&&(a="");let n=(e,n,i)=>{let s={relativePath:void 0===i?e.path||"":i,caseSensitive:!0===e.caseSensitive,childrenIndex:n,route:e};s.relativePath.startsWith("/")&&(o(s.relativePath.startsWith(a),'Absolute route path "'+s.relativePath+'" nested under path "'+a+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),s.relativePath=s.relativePath.slice(a.length));let l=j([a,s.relativePath]),c=r.concat(s);e.children&&e.children.length>0&&(o(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+l+'".'),y(e.children,t,c,l)),(null!=e.path||e.index)&&t.push({path:l,score:w(l,e.index),routesMeta:c})};return e.forEach(((e,t)=>{var r;if(""!==e.path&&null!=(r=e.path)&&r.includes("?"))for(let r of v(e.path))n(e,t,r);else n(e,t)})),t}function v(e){let t=e.split("/");if(0===t.length)return[];let[r,...a]=t,o=r.endsWith("?"),n=r.replace(/\?$/,"");if(0===a.length)return o?[n,""]:[n];let i=v(a.join("/")),s=[];return s.push(...i.map((e=>""===e?n:[n,e].join("/")))),o&&s.push(...i),s.map((t=>e.startsWith("/")&&""===t?"/":t))}const g=/^:[\w-]+$/,b=e=>"*"===e;function w(e,t){let r=e.split("/"),a=r.length;return r.some(b)&&(a+=-2),t&&(a+=2),r.filter((e=>!b(e))).reduce(((e,t)=>e+(g.test(t)?3:""===t?1:10)),a)}function D(e,t){let{routesMeta:r}=e,a={},o="/",n=[];for(let e=0;e<r.length;++e){let i=r[e],s=e===r.length-1,l="/"===o?t:t.slice(o.length)||"/",c=S({path:i.relativePath,caseSensitive:i.caseSensitive,end:s},l);if(!c)return null;Object.assign(a,c.params);let d=i.route;n.push({params:a,pathname:j([o,c.pathname]),pathnameBase:k(j([o,c.pathnameBase])),route:d}),"/"!==c.pathnameBase&&(o=j([o,c.pathnameBase]))}return n}function S(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[r,a]=function(e,t,r){void 0===t&&(t=!1);void 0===r&&(r=!0);n("*"===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 a=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,r)=>(a.push({paramName:t,isOptional:null!=r}),r?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(a.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))");return[new RegExp(o,t?void 0:"i"),a]}(e.path,e.caseSensitive,e.end),o=t.match(r);if(!o)return null;let i=o[0],s=i.replace(/(.)\/+$/,"$1"),l=o.slice(1);return{params:a.reduce(((e,t,r)=>{let{paramName:a,isOptional:o}=t;if("*"===a){let e=l[r]||"";s=i.slice(0,i.length-e.length).replace(/(.)\/+$/,"$1")}const n=l[r];return e[a]=o&&!n?void 0:(n||"").replace(/%2F/g,"/"),e}),{}),pathname:i,pathnameBase:s,pattern:e}}function E(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return n(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function R(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,a=e.charAt(r);return a&&"/"!==a?null:e.slice(r)||"/"}function P(e,t){void 0===t&&(t="/");let{pathname:r,search:a="",hash:o=""}="string"==typeof e?c(e):e,n=r?r.startsWith("/")?r:function(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)})),r.length>1?r.join("/"):"/"}(r,t):t;return{pathname:n,search:_(a),hash:C(o)}}function x(e,t,r,a){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(a)+"]. Please separate it out to the `to."+r+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function A(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function L(e,t){let r=A(e);return t?r.map(((t,r)=>r===e.length-1?t.pathname:t.pathnameBase)):r.map((e=>e.pathnameBase))}function M(e,r,a,n){let i;void 0===n&&(n=!1),"string"==typeof e?i=c(e):(i=t({},e),o(!i.pathname||!i.pathname.includes("?"),x("?","pathname","search",i)),o(!i.pathname||!i.pathname.includes("#"),x("#","pathname","hash",i)),o(!i.search||!i.search.includes("#"),x("#","search","hash",i)));let s,l=""===e||""===i.pathname,d=l?"/":i.pathname;if(null==d)s=a;else{let e=r.length-1;if(!n&&d.startsWith("..")){let t=d.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}s=e>=0?r[e]:"/"}let u=P(i,s),h=d&&"/"!==d&&d.endsWith("/"),f=(l||"."===d)&&a.endsWith("/");return u.pathname.endsWith("/")||!h&&!f||(u.pathname+="/"),u}const j=e=>e.join("/").replace(/\/\/+/g,"/"),k=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),_=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",C=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";class O extends Error{}class T{constructor(e,t){let r;this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],o(e&&"object"==typeof e&&!Array.isArray(e),"defer() only accepts plain objects"),this.abortPromise=new Promise(((e,t)=>r=t)),this.controller=new AbortController;let a=()=>r(new O("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",a),this.controller.signal.addEventListener("abort",a),this.data=Object.entries(e).reduce(((e,t)=>{let[r,a]=t;return Object.assign(e,{[r]:this.trackPromise(r,a)})}),{}),this.done&&this.unlistenAbortSignal(),this.init=t}trackPromise(e,t){if(!(t instanceof Promise))return t;this.deferredKeys.push(e),this.pendingKeysSet.add(e);let r=Promise.race([t,this.abortPromise]).then((t=>this.onSettle(r,e,void 0,t)),(t=>this.onSettle(r,e,t)));return r.catch((()=>{})),Object.defineProperty(r,"_tracked",{get:()=>!0}),r}onSettle(e,t,r,a){if(this.controller.signal.aborted&&r instanceof O)return this.unlistenAbortSignal(),Object.defineProperty(e,"_error",{get:()=>r}),Promise.reject(r);if(this.pendingKeysSet.delete(t),this.done&&this.unlistenAbortSignal(),void 0===r&&void 0===a){let r=new Error('Deferred data for key "'+t+'" resolved/rejected with `undefined`, you must resolve/reject with a value or `null`.');return Object.defineProperty(e,"_error",{get:()=>r}),this.emit(!1,t),Promise.reject(r)}return void 0===a?(Object.defineProperty(e,"_error",{get:()=>r}),this.emit(!1,t),Promise.reject(r)):(Object.defineProperty(e,"_data",{get:()=>a}),this.emit(!1,t),a)}emit(e,t){this.subscribers.forEach((r=>r(e,t)))}subscribe(e){return this.subscribers.add(e),()=>this.subscribers.delete(e)}cancel(){this.controller.abort(),this.pendingKeysSet.forEach(((e,t)=>this.pendingKeysSet.delete(t))),this.emit(!0)}async resolveData(e){let t=!1;if(!this.done){let r=()=>this.cancel();e.addEventListener("abort",r),t=await new Promise((t=>{this.subscribe((a=>{e.removeEventListener("abort",r),(a||this.done)&&t(a)}))}))}return t}get done(){return 0===this.pendingKeysSet.size}get unwrappedData(){return o(null!==this.data&&this.done,"Can only unwrap data on initialized and settled deferreds"),Object.entries(this.data).reduce(((e,t)=>{let[r,a]=t;return Object.assign(e,{[r]:U(a)})}),{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}}function U(e){if(!function(e){return e instanceof Promise&&!0===e._tracked}(e))return e;if(e._error)throw e._error;return e._data}const H=function(e,r){void 0===r&&(r=302);let a=r;"number"==typeof a?a={status:a}:void 0===a.status&&(a.status=302);let o=new Headers(a.headers);return o.set("Location",e),new Response(null,t({},a,{headers:o}))};class I{constructor(e,t,r,a){void 0===a&&(a=!1),this.status=e,this.statusText=t||"",this.internal=a,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function z(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}const q=["post","put","patch","delete"],F=new Set(q),B=["get",...q],N=new Set(B),W=new Set([301,302,303,307,308]),$=new Set([307,308]),K={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},J={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Y={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},V=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,X=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)}),G="remix-router-transitions";const Q=Symbol("deferred");function Z(e,t,r){if(r.v7_throwAbortReason&&void 0!==e.signal.reason)throw e.signal.reason;throw new Error((t?"queryRoute":"query")+"() call aborted: "+e.method+" "+e.url)}function ee(e,t,r,a,o,n,i,s){let c,d;if(i){c=[];for(let e of t)if(c.push(e),e.route.id===i){d=e;break}}else c=t,d=t[t.length-1];let u=M(o||".",L(c,n),R(e.pathname,r)||e.pathname,"path"===s);return null==o&&(u.search=e.search,u.hash=e.hash),null!=o&&""!==o&&"."!==o||!d||!d.route.index||Le(u.search)||(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),a&&"/"!==r&&(u.pathname="/"===u.pathname?r:j([r,u.pathname])),l(u)}function te(e,t,r,a){if(!a||!function(e){return null!=e&&("formData"in e&&null!=e.formData||"body"in e&&void 0!==e.body)}(a))return{path:r};if(a.formMethod&&!Re(a.formMethod))return{path:r,error:ye(405,{method:a.formMethod})};let n,i,s=()=>({path:r,error:ye(400,{type:"invalid-body"})}),d=a.formMethod||"get",u=e?d.toUpperCase():d.toLowerCase(),h=ge(r);if(void 0!==a.body){if("text/plain"===a.formEncType){if(!Pe(u))return s();let e="string"==typeof a.body?a.body:a.body instanceof FormData||a.body instanceof URLSearchParams?Array.from(a.body.entries()).reduce(((e,t)=>{let[r,a]=t;return""+e+r+"="+a+"\n"}),""):String(a.body);return{path:r,submission:{formMethod:u,formAction:h,formEncType:a.formEncType,formData:void 0,json:void 0,text:e}}}if("application/json"===a.formEncType){if(!Pe(u))return s();try{let e="string"==typeof a.body?JSON.parse(a.body):a.body;return{path:r,submission:{formMethod:u,formAction:h,formEncType:a.formEncType,formData:void 0,json:e,text:void 0}}}catch(e){return s()}}}if(o("function"==typeof FormData,"FormData is not available in this environment"),a.formData)n=ce(a.formData),i=a.formData;else if(a.body instanceof FormData)n=ce(a.body),i=a.body;else if(a.body instanceof URLSearchParams)n=a.body,i=de(n);else if(null==a.body)n=new URLSearchParams,i=new FormData;else try{n=new URLSearchParams(a.body),i=de(n)}catch(e){return s()}let f={formMethod:u,formAction:h,formEncType:a&&a.formEncType||"application/x-www-form-urlencoded",formData:i,json:void 0,text:void 0};if(Pe(f.formMethod))return{path:r,submission:f};let p=c(r);return t&&p.search&&Le(p.search)&&n.append("index",""),p.search="?"+n,{path:l(p),submission:f}}function re(e,t){let r=e;if(t){let a=e.findIndex((e=>e.route.id===t));a>=0&&(r=e.slice(0,a))}return r}function ae(e,r,a,o,n,i,s,l,c,d,u,h,f,m,y,v){let g=v?Object.values(v)[0]:y?Object.values(y)[0]:void 0,b=e.createURL(r.location),w=e.createURL(n),D=v?Object.keys(v)[0]:void 0,S=re(a,D).filter(((e,a)=>{let{route:n}=e;if(n.lazy)return!0;if(null==n.loader)return!1;if(i)return!!n.loader.hydrate||void 0===r.loaderData[n.id]&&(!r.errors||void 0===r.errors[n.id]);if(function(e,t,r){let a=!t||r.route.id!==t.route.id,o=void 0===e[r.route.id];return a||o}(r.loaderData,r.matches[a],e)||l.some((t=>t===e.route.id)))return!0;let c=r.matches[a],d=e;return ne(e,t({currentUrl:b,currentParams:c.params,nextUrl:w,nextParams:d.params},o,{actionResult:g,defaultShouldRevalidate:s||b.pathname+b.search===w.pathname+w.search||b.search!==w.search||oe(c,d)}))})),E=[];return u.forEach(((e,n)=>{if(i||!a.some((t=>t.route.id===e.routeId))||d.has(n))return;let l=p(f,e.path,m);if(!l)return void E.push({key:n,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null});let u=r.fetchers.get(n),y=Me(l,e.path),v=!1;v=!h.has(n)&&(!!c.includes(n)||(u&&"idle"!==u.state&&void 0===u.data?s:ne(y,t({currentUrl:b,currentParams:r.matches[r.matches.length-1].params,nextUrl:w,nextParams:a[a.length-1].params},o,{actionResult:g,defaultShouldRevalidate:s})))),v&&E.push({key:n,routeId:e.routeId,path:e.path,matches:l,match:y,controller:new AbortController})})),[S,E]}function oe(e,t){let r=e.route.path;return e.pathname!==t.pathname||null!=r&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function ne(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if("boolean"==typeof r)return r}return t.defaultShouldRevalidate}async function ie(e,r,a){if(!e.lazy)return;let i=await e.lazy();if(!e.lazy)return;let s=a[e.id];o(s,"No route found in manifest");let l={};for(let e in i){let t=void 0!==s[e]&&"hasErrorBoundary"!==e;n(!t,'Route "'+s.id+'" has a static property "'+e+'" defined but its lazy function is also returning a value for this property. The lazy route property "'+e+'" will be ignored.'),t||h.has(e)||(l[e]=i[e])}Object.assign(s,l),Object.assign(s,t({},r(s),{lazy:void 0}))}async function se(e,t,r,a,n,i,s,l,c){let d,h,f;void 0===c&&(c={});let p=e=>{let a,o=new Promise(((e,t)=>a=t));return f=()=>a(),t.signal.addEventListener("abort",f),Promise.race([e({request:t,params:r.params,context:c.requestContext}),o])};try{let a=r.route[e];if(r.route.lazy)if(a){let e,t=await Promise.all([p(a).catch((t=>{e=t})),ie(r.route,i,n)]);if(e)throw e;h=t[0]}else{if(await ie(r.route,i,n),a=r.route[e],!a){if("action"===e){let e=new URL(t.url),a=e.pathname+e.search;throw ye(405,{method:t.method,pathname:a,routeId:r.route.id})}return{type:u.data,data:void 0}}h=await p(a)}else{if(!a){let e=new URL(t.url);throw ye(404,{pathname:e.pathname+e.search})}h=await p(a)}o(void 0!==h,"You defined "+("action"===e?"an action":"a loader")+' for route "'+r.route.id+"\" but didn't return anything from your `"+e+"` function. Please return a value or `null`.")}catch(e){d=u.error,h=e}finally{f&&t.signal.removeEventListener("abort",f)}if(Ee(h)){let e,n=h.status;if(W.has(n)){let e=h.headers.get("Location");if(o(e,"Redirects returned/thrown from loaders/actions must have a Location header"),V.test(e)){if(!c.isStaticRequest){let r=new URL(t.url),a=e.startsWith("//")?new URL(r.protocol+e):new URL(e),o=null!=R(a.pathname,s);a.origin===r.origin&&o&&(e=a.pathname+a.search+a.hash)}}else e=ee(new URL(t.url),a.slice(0,a.indexOf(r)+1),s,!0,e,l);if(c.isStaticRequest)throw h.headers.set("Location",e),h;return{type:u.redirect,status:n,location:e,revalidate:null!==h.headers.get("X-Remix-Revalidate"),reloadDocument:null!==h.headers.get("X-Remix-Reload-Document")}}if(c.isRouteRequest){throw{type:d===u.error?u.error:u.data,response:h}}try{let t=h.headers.get("Content-Type");e=t&&/\bapplication\/json\b/.test(t)?null==h.body?null:await h.json():await h.text()}catch(e){return{type:u.error,error:e}}return d===u.error?{type:d,error:new I(n,h.statusText,e),headers:h.headers}:{type:u.data,data:e,statusCode:h.status,headers:h.headers}}return d===u.error?{type:d,error:h}:Se(h)?{type:u.deferred,deferredData:h,statusCode:null==(m=h.init)?void 0:m.status,headers:(null==(y=h.init)?void 0:y.headers)&&new Headers(h.init.headers)}:{type:u.data,data:h};var m,y}function le(e,t,r,a){let o=e.createURL(ge(t)).toString(),n={signal:r};if(a&&Pe(a.formMethod)){let{formMethod:e,formEncType:t}=a;n.method=e.toUpperCase(),"application/json"===t?(n.headers=new Headers({"Content-Type":t}),n.body=JSON.stringify(a.json)):"text/plain"===t?n.body=a.text:"application/x-www-form-urlencoded"===t&&a.formData?n.body=ce(a.formData):n.body=a.formData}return new Request(o,n)}function ce(e){let t=new URLSearchParams;for(let[r,a]of e.entries())t.append(r,"string"==typeof a?a:a.name);return t}function de(e){let t=new FormData;for(let[r,a]of e.entries())t.append(r,a);return t}function ue(e,t,r,a,n){let i,s={},l=null,c=!1,d={};return r.forEach(((r,u)=>{let h=t[u].route.id;if(o(!De(r),"Cannot handle redirect results in processLoaderData"),we(r)){let t=pe(e,h),o=r.error;a&&(o=Object.values(a)[0],a=void 0),l=l||{},null==l[t.route.id]&&(l[t.route.id]=o),s[h]=void 0,c||(c=!0,i=z(r.error)?r.error.status:500),r.headers&&(d[h]=r.headers)}else be(r)?(n.set(h,r.deferredData),s[h]=r.deferredData.data):s[h]=r.data,null==r.statusCode||200===r.statusCode||c||(i=r.statusCode),r.headers&&(d[h]=r.headers)})),a&&(l=a,s[Object.keys(a)[0]]=void 0),{loaderData:s,errors:l,statusCode:i||200,loaderHeaders:d}}function he(e,r,a,n,i,s,l,c){let{loaderData:d,errors:u}=ue(r,a,n,i,c);for(let r=0;r<s.length;r++){let{key:a,match:n,controller:i}=s[r];o(void 0!==l&&void 0!==l[r],"Did not find corresponding fetcher result");let c=l[r];if(!i||!i.signal.aborted)if(we(c)){let r=pe(e.matches,null==n?void 0:n.route.id);u&&u[r.route.id]||(u=t({},u,{[r.route.id]:c.error})),e.fetchers.delete(a)}else if(De(c))o(!1,"Unhandled fetcher revalidation redirect");else if(be(c))o(!1,"Unhandled fetcher deferred data");else{let t=Oe(c.data);e.fetchers.set(a,t)}}return{loaderData:d,errors:u}}function fe(e,r,a,o){let n=t({},r);for(let t of a){let a=t.route.id;if(r.hasOwnProperty(a)?void 0!==r[a]&&(n[a]=r[a]):void 0!==e[a]&&t.route.loader&&(n[a]=e[a]),o&&o.hasOwnProperty(a))break}return n}function pe(e,t){return(t?e.slice(0,e.findIndex((e=>e.route.id===t))+1):[...e]).reverse().find((e=>!0===e.route.hasErrorBoundary))||e[0]}function me(e){let t=1===e.length?e[0]:e.find((e=>e.index||!e.path||"/"===e.path))||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function ye(e,t){let{pathname:r,routeId:a,method:o,type:n}=void 0===t?{}:t,i="Unknown Server Error",s="Unknown @remix-run/router error";return 400===e?(i="Bad Request",o&&r&&a?s="You made a "+o+' request to "'+r+'" but did not provide a `loader` for route "'+a+'", so there is no way to handle the request.':"defer-action"===n?s="defer() is not supported in actions":"invalid-body"===n&&(s="Unable to encode submission body")):403===e?(i="Forbidden",s='Route "'+a+'" does not match URL "'+r+'"'):404===e?(i="Not Found",s='No route matches URL "'+r+'"'):405===e&&(i="Method Not Allowed",o&&r&&a?s="You made a "+o.toUpperCase()+' request to "'+r+'" but did not provide an `action` for route "'+a+'", so there is no way to handle the request.':o&&(s='Invalid request method "'+o.toUpperCase()+'"')),new I(e||500,i,new Error(s),!0)}function ve(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(De(r))return{result:r,idx:t}}}function ge(e){return l(t({},"string"==typeof e?c(e):e,{hash:""}))}function be(e){return e.type===u.deferred}function we(e){return e.type===u.error}function De(e){return(e&&e.type)===u.redirect}function Se(e){let t=e;return t&&"object"==typeof t&&"object"==typeof t.data&&"function"==typeof t.subscribe&&"function"==typeof t.cancel&&"function"==typeof t.resolveData}function Ee(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"object"==typeof e.headers&&void 0!==e.body}function Re(e){return N.has(e.toLowerCase())}function Pe(e){return F.has(e.toLowerCase())}async function xe(e,t,r,a,n,i){for(let s=0;s<r.length;s++){let l=r[s],c=t[s];if(!c)continue;let d=e.find((e=>e.route.id===c.route.id)),u=null!=d&&!oe(d,c)&&void 0!==(i&&i[c.route.id]);if(be(l)&&(n||u)){let e=a[s];o(e,"Expected an AbortSignal for revalidating fetcher deferred result"),await Ae(l,e,n).then((e=>{e&&(r[s]=e||r[s])}))}}}async function Ae(e,t,r){if(void 0===r&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:u.data,data:e.deferredData.unwrappedData}}catch(e){return{type:u.error,error:e}}return{type:u.data,data:e.deferredData.data}}}function Le(e){return new URLSearchParams(e).getAll("index").some((e=>""===e))}function Me(e,t){let r="string"==typeof t?c(t).search:t.search;if(e[e.length-1].route.index&&Le(r||""))return e[e.length-1];let a=A(e);return a[a.length-1]}function je(e){let{formMethod:t,formAction:r,formEncType:a,text:o,formData:n,json:i}=e;if(t&&r&&a)return null!=o?{formMethod:t,formAction:r,formEncType:a,formData:void 0,json:void 0,text:o}:null!=n?{formMethod:t,formAction:r,formEncType:a,formData:n,json:void 0,text:void 0}:void 0!==i?{formMethod:t,formAction:r,formEncType:a,formData:void 0,json:i,text:void 0}:void 0}function ke(e,t){if(t){return{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}return{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function _e(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Ce(e,t){if(e){return{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}}return{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Oe(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}e.AbortedDeferredError=O,e.Action=r,e.IDLE_BLOCKER=Y,e.IDLE_FETCHER=J,e.IDLE_NAVIGATION=K,e.UNSAFE_DEFERRED_SYMBOL=Q,e.UNSAFE_DeferredData=T,e.UNSAFE_ErrorResponseImpl=I,e.UNSAFE_convertRouteMatchToUiMatch=m,e.UNSAFE_convertRoutesToDataRoutes=f,e.UNSAFE_getResolveToMatches=L,e.UNSAFE_invariant=o,e.UNSAFE_warning=n,e.createBrowserHistory=function(e){return void 0===e&&(e={}),d((function(e,t){let{pathname:r,search:a,hash:o}=e.location;return s("",{pathname:r,search:a,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){return"string"==typeof t?t:l(t)}),null,e)},e.createHashHistory=function(e){return void 0===e&&(e={}),d((function(e,t){let{pathname:r="/",search:a="",hash:o=""}=c(e.location.hash.substr(1));return r.startsWith("/")||r.startsWith(".")||(r="/"+r),s("",{pathname:r,search:a,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let r=e.document.querySelector("base"),a="";if(r&&r.getAttribute("href")){let t=e.location.href,r=t.indexOf("#");a=-1===r?t:t.slice(0,r)}return a+"#"+("string"==typeof t?t:l(t))}),(function(e,t){n("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)},e.createMemoryHistory=function(e){void 0===e&&(e={});let t,{initialEntries:a=["/"],initialIndex:o,v5Compat:i=!1}=e;t=a.map(((e,t)=>m(e,"string"==typeof e?null:e.state,0===t?"default":void 0)));let d=f(null==o?t.length-1:o),u=r.Pop,h=null;function f(e){return Math.min(Math.max(e,0),t.length-1)}function p(){return t[d]}function m(e,r,a){void 0===r&&(r=null);let o=s(t?p().pathname:"/",e,r,a);return n("/"===o.pathname.charAt(0),"relative pathnames are not supported in memory history: "+JSON.stringify(e)),o}function y(e){return"string"==typeof e?e:l(e)}return{get index(){return d},get action(){return u},get location(){return p()},createHref:y,createURL:e=>new URL(y(e),"http://localhost"),encodeLocation(e){let t="string"==typeof e?c(e):e;return{pathname:t.pathname||"",search:t.search||"",hash:t.hash||""}},push(e,a){u=r.Push;let o=m(e,a);d+=1,t.splice(d,t.length,o),i&&h&&h({action:u,location:o,delta:1})},replace(e,a){u=r.Replace;let o=m(e,a);t[d]=o,i&&h&&h({action:u,location:o,delta:0})},go(e){u=r.Pop;let a=f(d+e),o=t[a];d=a,h&&h({action:u,location:o,delta:e})},listen:e=>(h=e,()=>{h=null})}},e.createPath=l,e.createRouter=function(e){const a=e.window?e.window:"undefined"!=typeof window?window:void 0,i=void 0!==a&&void 0!==a.document&&void 0!==a.document.createElement,l=!i;let c;if(o(e.routes.length>0,"You must provide a non-empty routes array to createRouter"),e.mapRouteProperties)c=e.mapRouteProperties;else if(e.detectErrorBoundary){let t=e.detectErrorBoundary;c=e=>({hasErrorBoundary:t(e)})}else c=X;let d,h,y={},v=f(e.routes,c,void 0,y),g=e.basename||"/",b=t({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1},e.future),w=null,D=new Set,S=null,E=null,P=null,x=null!=e.hydrationData,A=p(v,e.history.location,g),L=null;if(null==A){let t=ye(404,{pathname:e.history.location.pathname}),{matches:r,route:a}=me(v);A=r,L={[a.id]:t}}let M,j=A.some((e=>e.route.lazy)),k=A.some((e=>e.route.loader));if(j)h=!1;else if(k)if(b.v7_partialHydration){let t=e.hydrationData?e.hydrationData.loaderData:null,r=e.hydrationData?e.hydrationData.errors:null,a=e=>!e.route.loader||!0!==e.route.loader.hydrate&&(t&&void 0!==t[e.route.id]||r&&void 0!==r[e.route.id]);if(r){let e=A.findIndex((e=>void 0!==r[e.route.id]));h=A.slice(0,e+1).every(a)}else h=A.every(a)}else h=null!=e.hydrationData;else h=!0;let _,C={historyAction:e.history.action,location:e.history.location,matches:A,initialized:h,navigation:K,restoreScrollPosition:null==e.hydrationData&&null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||L,fetchers:new Map,blockers:new Map},O=r.Pop,T=!1,U=!1,H=new Map,I=null,z=!1,q=!1,F=[],B=[],N=new Map,W=0,Q=-1,Z=new Map,re=new Set,oe=new Map,ne=new Map,ie=new Set,ce=new Map,de=new Map,ue=!1;function ge(e,r){void 0===r&&(r={}),C=t({},C,e);let a=[],o=[];b.v7_fetcherPersist&&C.fetchers.forEach(((e,t)=>{"idle"===e.state&&(ie.has(t)?o.push(t):a.push(t))})),[...D].forEach((e=>e(C,{deletedFetchers:o,unstable_viewTransitionOpts:r.viewTransitionOpts,unstable_flushSync:!0===r.flushSync}))),b.v7_fetcherPersist&&(a.forEach((e=>C.fetchers.delete(e))),o.forEach((e=>ze(e))))}function Se(a,o,n){var i,s;let l,{flushSync:c}=void 0===n?{}:n,u=null!=C.actionData&&null!=C.navigation.formMethod&&Pe(C.navigation.formMethod)&&"loading"===C.navigation.state&&!0!==(null==(i=a.state)?void 0:i._isRedirect);l=o.actionData?Object.keys(o.actionData).length>0?o.actionData:null:u?C.actionData:null;let h=o.loaderData?fe(C.loaderData,o.loaderData,o.matches||[],o.errors):C.loaderData,f=C.blockers;f.size>0&&(f=new Map(f),f.forEach(((e,t)=>f.set(t,Y))));let p,m=!0===T||null!=C.navigation.formMethod&&Pe(C.navigation.formMethod)&&!0!==(null==(s=a.state)?void 0:s._isRedirect);if(d&&(v=d,d=void 0),z||O===r.Pop||(O===r.Push?e.history.push(a,a.state):O===r.Replace&&e.history.replace(a,a.state)),O===r.Pop){let e=H.get(C.location.pathname);e&&e.has(a.pathname)?p={currentLocation:C.location,nextLocation:a}:H.has(a.pathname)&&(p={currentLocation:a,nextLocation:C.location})}else if(U){let e=H.get(C.location.pathname);e?e.add(a.pathname):(e=new Set([a.pathname]),H.set(C.location.pathname,e)),p={currentLocation:C.location,nextLocation:a}}ge(t({},o,{actionData:l,loaderData:h,historyAction:O,location:a,initialized:!0,navigation:K,revalidation:"idle",restoreScrollPosition:Ve(a,o.matches||C.matches),preventScrollReset:m,blockers:f}),{viewTransitionOpts:p,flushSync:!0===c}),O=r.Pop,T=!1,U=!1,z=!1,q=!1,F=[],B=[]}async function Ee(a,o,n){_&&_.abort(),_=null,O=a,z=!0===(n&&n.startUninterruptedRevalidation),function(e,t){if(S&&P){let r=Ye(e,t);S[r]=P()}}(C.location,C.matches),T=!0===(n&&n.preventScrollReset),U=!0===(n&&n.enableViewTransition);let i=d||v,s=n&&n.overrideNavigation,l=p(i,o,g),h=!0===(n&&n.flushSync);if(!l){let e=ye(404,{pathname:o.pathname}),{matches:t,route:r}=me(i);return Je(),void Se(o,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:h})}if(C.initialized&&!q&&function(e,t){if(e.pathname!==t.pathname||e.search!==t.search)return!1;if(""===e.hash)return""!==t.hash;if(e.hash===t.hash)return!0;if(""!==t.hash)return!0;return!1}(C.location,o)&&!(n&&n.submission&&Pe(n.submission.formMethod)))return void Se(o,{matches:l},{flushSync:h});_=new AbortController;let f,m,w=le(e.history,o,_.signal,n&&n.submission);if(n&&n.pendingError)m={[pe(l).route.id]:n.pendingError};else if(n&&n.submission&&Pe(n.submission.formMethod)){let e=await async function(e,t,a,o,n){void 0===n&&(n={});let i;Te(),ge({navigation:_e(t,a)},{flushSync:!0===n.flushSync});let s=Me(o,t);if(s.route.action||s.route.lazy){if(i=await se("action",e,s,o,y,c,g,b.v7_relativeSplatPath),e.signal.aborted)return{shortCircuited:!0}}else i={type:u.error,error:ye(405,{method:e.method,pathname:t.pathname,routeId:s.route.id})};if(De(i)){let e;return e=n&&null!=n.replace?n.replace:i.location===C.location.pathname+C.location.search,await Re(C,i,{submission:a,replace:e}),{shortCircuited:!0}}if(we(i)){let e=pe(o,s.route.id);return!0!==(n&&n.replace)&&(O=r.Push),{pendingActionData:{},pendingActionError:{[e.route.id]:i.error}}}if(be(i))throw ye(400,{type:"defer-action"});return{pendingActionData:{[s.route.id]:i.data}}}(w,o,n.submission,l,{replace:n.replace,flushSync:h});if(e.shortCircuited)return;f=e.pendingActionData,m=e.pendingActionError,s=ke(o,n.submission),h=!1,w=new Request(w.url,{signal:w.signal})}let{shortCircuited:D,loaderData:E,errors:R}=await async function(r,a,o,n,i,s,l,c,u,h,f){let p=n||ke(a,i),m=i||s||je(p),y=d||v,[w,D]=ae(e.history,C,o,m,a,b.v7_partialHydration&&!0===c,q,F,B,ie,oe,re,y,g,h,f);if(Je((e=>!(o&&o.some((t=>t.route.id===e)))||w&&w.some((t=>t.route.id===e)))),Q=++W,0===w.length&&0===D.length){let e=Be();return Se(a,t({matches:o,loaderData:{},errors:f||null},h?{actionData:h}:{},e?{fetchers:new Map(C.fetchers)}:{}),{flushSync:u}),{shortCircuited:!0}}if(!(z||b.v7_partialHydration&&c)){D.forEach((e=>{let t=C.fetchers.get(e.key),r=Ce(void 0,t?t.data:void 0);C.fetchers.set(e.key,r)}));let e=h||C.actionData;ge(t({navigation:p},e?0===Object.keys(e).length?{actionData:null}:{actionData:e}:{},D.length>0?{fetchers:new Map(C.fetchers)}:{}),{flushSync:u})}D.forEach((e=>{N.has(e.key)&&qe(e.key),e.controller&&N.set(e.key,e.controller)}));let S=()=>D.forEach((e=>qe(e.key)));_&&_.signal.addEventListener("abort",S);let{results:E,loaderResults:R,fetcherResults:P}=await Le(C.matches,o,w,D,r);if(r.signal.aborted)return{shortCircuited:!0};_&&_.signal.removeEventListener("abort",S);D.forEach((e=>N.delete(e.key)));let x=ve(E);if(x){if(x.idx>=w.length){let e=D[x.idx-w.length].key;re.add(e)}return await Re(C,x.result,{replace:l}),{shortCircuited:!0}}let{loaderData:A,errors:L}=he(C,o,w,R,f,D,P,ce);ce.forEach(((e,t)=>{e.subscribe((r=>{(r||e.done)&&ce.delete(t)}))})),b.v7_partialHydration&&c&&C.errors&&Object.entries(C.errors).filter((e=>{let[t]=e;return!w.some((e=>e.route.id===t))})).forEach((e=>{let[t,r]=e;L=Object.assign(L||{},{[t]:r})}));let M=Be(),j=Ne(Q),k=M||j||D.length>0;return t({loaderData:A,errors:L},k?{fetchers:new Map(C.fetchers)}:{})}(w,o,l,s,n&&n.submission,n&&n.fetcherSubmission,n&&n.replace,n&&!0===n.initialHydration,h,f,m);D||(_=null,Se(o,t({matches:l},f?{actionData:f}:{},{loaderData:E,errors:R})))}async function Re(n,l,c){let{submission:d,fetcherSubmission:u,replace:h}=void 0===c?{}:c;l.revalidate&&(q=!0);let f=s(n.location,l.location,{_isRedirect:!0});if(o(f,"Expected a location on the redirect navigation"),i){let t=!1;if(l.reloadDocument)t=!0;else if(V.test(l.location)){const r=e.history.createURL(l.location);t=r.origin!==a.location.origin||null==R(r.pathname,g)}if(t)return void(h?a.location.replace(l.location):a.location.assign(l.location))}_=null;let p=!0===h?r.Replace:r.Push,{formMethod:m,formAction:y,formEncType:v}=n.navigation;!d&&!u&&m&&y&&v&&(d=je(n.navigation));let b=d||u;if($.has(l.status)&&b&&Pe(b.formMethod))await Ee(p,f,{submission:t({},b,{formAction:l.location}),preventScrollReset:T});else{let e=ke(f,d);await Ee(p,f,{overrideNavigation:e,fetcherSubmission:u,preventScrollReset:T})}}async function Le(t,r,a,o,n){let i=await Promise.all([...a.map((e=>se("loader",n,e,r,y,c,g,b.v7_relativeSplatPath))),...o.map((t=>{if(t.matches&&t.match&&t.controller)return se("loader",le(e.history,t.path,t.controller.signal),t.match,t.matches,y,c,g,b.v7_relativeSplatPath);return{type:u.error,error:ye(404,{pathname:t.path})}}))]),s=i.slice(0,a.length),l=i.slice(a.length);return await Promise.all([xe(t,a,s,s.map((()=>n.signal)),!1,C.loaderData),xe(t,o.map((e=>e.match)),l,o.map((e=>e.controller?e.controller.signal:null)),!0)]),{results:i,loaderResults:s,fetcherResults:l}}function Te(){q=!0,F.push(...Je()),oe.forEach(((e,t)=>{N.has(t)&&(B.push(t),qe(t))}))}function Ue(e,t,r){void 0===r&&(r={}),C.fetchers.set(e,t),ge({fetchers:new Map(C.fetchers)},{flushSync:!0===(r&&r.flushSync)})}function He(e,t,r,a){void 0===a&&(a={});let o=pe(C.matches,t);ze(e),ge({errors:{[o.route.id]:r},fetchers:new Map(C.fetchers)},{flushSync:!0===(a&&a.flushSync)})}function Ie(e){return b.v7_fetcherPersist&&(ne.set(e,(ne.get(e)||0)+1),ie.has(e)&&ie.delete(e)),C.fetchers.get(e)||J}function ze(e){let t=C.fetchers.get(e);!N.has(e)||t&&"loading"===t.state&&Z.has(e)||qe(e),oe.delete(e),Z.delete(e),re.delete(e),ie.delete(e),C.fetchers.delete(e)}function qe(e){let t=N.get(e);o(t,"Expected fetch controller: "+e),t.abort(),N.delete(e)}function Fe(e){for(let t of e){let e=Oe(Ie(t).data);C.fetchers.set(t,e)}}function Be(){let e=[],t=!1;for(let r of re){let a=C.fetchers.get(r);o(a,"Expected fetcher: "+r),"loading"===a.state&&(re.delete(r),e.push(r),t=!0)}return Fe(e),t}function Ne(e){let t=[];for(let[r,a]of Z)if(a<e){let e=C.fetchers.get(r);o(e,"Expected fetcher: "+r),"loading"===e.state&&(qe(r),Z.delete(r),t.push(r))}return Fe(t),t.length>0}function We(e){C.blockers.delete(e),de.delete(e)}function $e(e,t){let r=C.blockers.get(e)||Y;o("unblocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"proceeding"===t.state||"blocked"===r.state&&"unblocked"===t.state||"proceeding"===r.state&&"unblocked"===t.state,"Invalid blocker state transition: "+r.state+" -> "+t.state);let a=new Map(C.blockers);a.set(e,t),ge({blockers:a})}function Ke(e){let{currentLocation:t,nextLocation:r,historyAction:a}=e;if(0===de.size)return;de.size>1&&n(!1,"A router only supports one blocker at a time");let o=Array.from(de.entries()),[i,s]=o[o.length-1],l=C.blockers.get(i);return l&&"proceeding"===l.state?void 0:s({currentLocation:t,nextLocation:r,historyAction:a})?i:void 0}function Je(e){let t=[];return ce.forEach(((r,a)=>{e&&!e(a)||(r.cancel(),t.push(a),ce.delete(a))})),t}function Ye(e,t){if(E){return E(e,t.map((e=>m(e,C.loaderData))))||e.key}return e.key}function Ve(e,t){if(S){let r=Ye(e,t),a=S[r];if("number"==typeof a)return a}return null}return M={get basename(){return g},get future(){return b},get state(){return C},get routes(){return v},get window(){return a},initialize:function(){if(w=e.history.listen((t=>{let{action:r,location:a,delta:o}=t;if(ue)return void(ue=!1);n(0===de.size||null!=o,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let i=Ke({currentLocation:C.location,nextLocation:a,historyAction:r});return i&&null!=o?(ue=!0,e.history.go(-1*o),void $e(i,{state:"blocked",location:a,proceed(){$e(i,{state:"proceeding",proceed:void 0,reset:void 0,location:a}),e.history.go(o)},reset(){let e=new Map(C.blockers);e.set(i,Y),ge({blockers:e})}})):Ee(r,a)})),i){!function(e,t){try{let r=e.sessionStorage.getItem(G);if(r){let e=JSON.parse(r);for(let[r,a]of Object.entries(e||{}))a&&Array.isArray(a)&&t.set(r,new Set(a||[]))}}catch(e){}}(a,H);let e=()=>function(e,t){if(t.size>0){let r={};for(let[e,a]of t)r[e]=[...a];try{e.sessionStorage.setItem(G,JSON.stringify(r))}catch(e){n(!1,"Failed to save applied view transitions in sessionStorage ("+e+").")}}}(a,H);a.addEventListener("pagehide",e),I=()=>a.removeEventListener("pagehide",e)}return C.initialized||Ee(r.Pop,C.location,{initialHydration:!0}),M},subscribe:function(e){return D.add(e),()=>D.delete(e)},enableScrollRestoration:function(e,t,r){if(S=e,P=t,E=r||null,!x&&C.navigation===K){x=!0;let e=Ve(C.location,C.matches);null!=e&&ge({restoreScrollPosition:e})}return()=>{S=null,P=null,E=null}},navigate:async function a(o,n){if("number"==typeof o)return void e.history.go(o);let i=ee(C.location,C.matches,g,b.v7_prependBasename,o,b.v7_relativeSplatPath,null==n?void 0:n.fromRouteId,null==n?void 0:n.relative),{path:l,submission:c,error:d}=te(b.v7_normalizeFormMethod,!1,i,n),u=C.location,h=s(C.location,l,n&&n.state);h=t({},h,e.history.encodeLocation(h));let f=n&&null!=n.replace?n.replace:void 0,p=r.Push;!0===f?p=r.Replace:!1===f||null!=c&&Pe(c.formMethod)&&c.formAction===C.location.pathname+C.location.search&&(p=r.Replace);let m=n&&"preventScrollReset"in n?!0===n.preventScrollReset:void 0,y=!0===(n&&n.unstable_flushSync),v=Ke({currentLocation:u,nextLocation:h,historyAction:p});if(!v)return await Ee(p,h,{submission:c,pendingError:d,preventScrollReset:m,replace:n&&n.replace,enableViewTransition:n&&n.unstable_viewTransition,flushSync:y});$e(v,{state:"blocked",location:h,proceed(){$e(v,{state:"proceeding",proceed:void 0,reset:void 0,location:h}),a(o,n)},reset(){let e=new Map(C.blockers);e.set(v,Y),ge({blockers:e})}})},fetch:function(t,r,a,n){if(l)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");N.has(t)&&qe(t);let i=!0===(n&&n.unstable_flushSync),s=d||v,u=ee(C.location,C.matches,g,b.v7_prependBasename,a,b.v7_relativeSplatPath,r,null==n?void 0:n.relative),h=p(s,u,g);if(!h)return void He(t,r,ye(404,{pathname:u}),{flushSync:i});let{path:f,submission:m,error:w}=te(b.v7_normalizeFormMethod,!0,u,n);if(w)return void He(t,r,w,{flushSync:i});let D=Me(h,f);T=!0===(n&&n.preventScrollReset),m&&Pe(m.formMethod)?async function(t,r,a,n,i,s,l){if(Te(),oe.delete(t),!n.route.action&&!n.route.lazy){let e=ye(405,{method:l.formMethod,pathname:a,routeId:r});return void He(t,r,e,{flushSync:s})}let u=C.fetchers.get(t);Ue(t,function(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}(l,u),{flushSync:s});let h=new AbortController,f=le(e.history,a,h.signal,l);N.set(t,h);let m=W,w=await se("action",f,n,i,y,c,g,b.v7_relativeSplatPath);if(f.signal.aborted)return void(N.get(t)===h&&N.delete(t));if(b.v7_fetcherPersist&&ie.has(t)){if(De(w)||we(w))return void Ue(t,Oe(void 0))}else{if(De(w))return N.delete(t),Q>m?void Ue(t,Oe(void 0)):(re.add(t),Ue(t,Ce(l)),Re(C,w,{fetcherSubmission:l}));if(we(w))return void He(t,r,w.error)}if(be(w))throw ye(400,{type:"defer-action"});let D=C.navigation.location||C.location,S=le(e.history,D,h.signal),E=d||v,R="idle"!==C.navigation.state?p(E,C.navigation.location,g):C.matches;o(R,"Didn't find any matches after fetcher action");let P=++W;Z.set(t,P);let x=Ce(l,w.data);C.fetchers.set(t,x);let[A,L]=ae(e.history,C,R,l,D,!1,q,F,B,ie,oe,re,E,g,{[n.route.id]:w.data},void 0);L.filter((e=>e.key!==t)).forEach((e=>{let t=e.key,r=C.fetchers.get(t),a=Ce(void 0,r?r.data:void 0);C.fetchers.set(t,a),N.has(t)&&qe(t),e.controller&&N.set(t,e.controller)})),ge({fetchers:new Map(C.fetchers)});let M=()=>L.forEach((e=>qe(e.key)));h.signal.addEventListener("abort",M);let{results:j,loaderResults:k,fetcherResults:T}=await Le(C.matches,R,A,L,S);if(h.signal.aborted)return;h.signal.removeEventListener("abort",M),Z.delete(t),N.delete(t),L.forEach((e=>N.delete(e.key)));let U=ve(j);if(U){if(U.idx>=A.length){let e=L[U.idx-A.length].key;re.add(e)}return Re(C,U.result)}let{loaderData:H,errors:I}=he(C,C.matches,A,k,void 0,L,T,ce);if(C.fetchers.has(t)){let e=Oe(w.data);C.fetchers.set(t,e)}Ne(P),"loading"===C.navigation.state&&P>Q?(o(O,"Expected pending action"),_&&_.abort(),Se(C.navigation.location,{matches:R,loaderData:H,errors:I,fetchers:new Map(C.fetchers)})):(ge({errors:I,loaderData:fe(C.loaderData,H,R,I),fetchers:new Map(C.fetchers)}),q=!1)}(t,r,f,D,h,i,m):(oe.set(t,{routeId:r,path:f}),async function(t,r,a,n,i,s,l){let d=C.fetchers.get(t);Ue(t,Ce(l,d?d.data:void 0),{flushSync:s});let u=new AbortController,h=le(e.history,a,u.signal);N.set(t,u);let f=W,p=await se("loader",h,n,i,y,c,g,b.v7_relativeSplatPath);be(p)&&(p=await Ae(p,h.signal,!0)||p);N.get(t)===u&&N.delete(t);if(h.signal.aborted)return;if(ie.has(t))return void Ue(t,Oe(void 0));if(De(p))return Q>f?void Ue(t,Oe(void 0)):(re.add(t),void await Re(C,p));if(we(p))return void He(t,r,p.error);o(!be(p),"Unhandled fetcher deferred data"),Ue(t,Oe(p.data))}(t,r,f,D,h,i,m))},revalidate:function(){Te(),ge({revalidation:"loading"}),"submitting"!==C.navigation.state&&("idle"!==C.navigation.state?Ee(O||C.historyAction,C.navigation.location,{overrideNavigation:C.navigation}):Ee(C.historyAction,C.location,{startUninterruptedRevalidation:!0}))},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:Ie,deleteFetcher:function(e){if(b.v7_fetcherPersist){let t=(ne.get(e)||0)-1;t<=0?(ne.delete(e),ie.add(e)):ne.set(e,t)}else ze(e);ge({fetchers:new Map(C.fetchers)})},dispose:function(){w&&w(),I&&I(),D.clear(),_&&_.abort(),C.fetchers.forEach(((e,t)=>ze(t))),C.blockers.forEach(((e,t)=>We(t)))},getBlocker:function(e,t){let r=C.blockers.get(e)||Y;return de.get(e)!==t&&de.set(e,t),r},deleteBlocker:We,_internalFetchControllers:N,_internalActiveDeferreds:ce,_internalSetRoutes:function(e){y={},d=f(e,c,void 0,y)}},M},e.createStaticHandler=function(e,r){o(e.length>0,"You must provide a non-empty routes array to createStaticHandler");let a,n={},i=(r?r.basename:null)||"/";if(null!=r&&r.mapRouteProperties)a=r.mapRouteProperties;else if(null!=r&&r.detectErrorBoundary){let e=r.detectErrorBoundary;a=t=>({hasErrorBoundary:e(t)})}else a=X;let c=t({v7_relativeSplatPath:!1,v7_throwAbortReason:!1},r?r.future:null),d=f(e,a,void 0,n);async function h(e,r,s,l,d){o(e.signal,"query()/queryRoute() requests must contain an AbortController signal");try{if(Pe(e.method.toLowerCase())){let o=await async function(e,r,o,s,l){let d;if(o.route.action||o.route.lazy)d=await se("action",e,o,r,n,a,i,c.v7_relativeSplatPath,{isStaticRequest:!0,isRouteRequest:l,requestContext:s}),e.signal.aborted&&Z(e,l,c);else{let t=ye(405,{method:e.method,pathname:new URL(e.url).pathname,routeId:o.route.id});if(l)throw t;d={type:u.error,error:t}}if(De(d))throw new Response(null,{status:d.status,headers:{Location:d.location}});if(be(d)){let e=ye(400,{type:"defer-action"});if(l)throw e;d={type:u.error,error:e}}if(l){if(we(d))throw d.error;return{matches:[o],loaderData:{},actionData:{[o.route.id]:d.data},errors:null,statusCode:200,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}if(we(d)){let a=pe(r,o.route.id);return t({},await m(e,r,s,void 0,{[a.route.id]:d.error}),{statusCode:z(d.error)?d.error.status:500,actionData:null,actionHeaders:t({},d.headers?{[o.route.id]:d.headers}:{})})}let h=new Request(e.url,{headers:e.headers,redirect:e.redirect,signal:e.signal});return t({},await m(h,r,s),d.statusCode?{statusCode:d.statusCode}:{},{actionData:{[o.route.id]:d.data},actionHeaders:t({},d.headers?{[o.route.id]:d.headers}:{})})}(e,s,d||Me(s,r),l,null!=d);return o}let o=await m(e,s,l,d);return Ee(o)?o:t({},o,{actionData:null,actionHeaders:{}})}catch(e){if((h=e)&&Ee(h.response)&&(h.type===u.data||h.type===u.error)){if(e.type===u.error)throw e.response;return e.response}if(function(e){if(!Ee(e))return!1;let t=e.status,r=e.headers.get("Location");return t>=300&&t<=399&&null!=r}(e))return e;throw e}var h}async function m(e,r,o,s,l){let d=null!=s;if(d&&(null==s||!s.route.loader)&&(null==s||!s.route.lazy))throw ye(400,{method:e.method,pathname:new URL(e.url).pathname,routeId:null==s?void 0:s.route.id});let u=(s?[s]:re(r,Object.keys(l||{})[0])).filter((e=>e.route.loader||e.route.lazy));if(0===u.length)return{matches:r,loaderData:r.reduce(((e,t)=>Object.assign(e,{[t.route.id]:null})),{}),errors:l||null,statusCode:200,loaderHeaders:{},activeDeferreds:null};let h=await Promise.all([...u.map((t=>se("loader",e,t,r,n,a,i,c.v7_relativeSplatPath,{isStaticRequest:!0,isRouteRequest:d,requestContext:o})))]);e.signal.aborted&&Z(e,d,c);let f=new Map,p=ue(r,u,h,l,f),m=new Set(u.map((e=>e.route.id)));return r.forEach((e=>{m.has(e.route.id)||(p.loaderData[e.route.id]=null)})),t({},p,{matches:r,activeDeferreds:f.size>0?Object.fromEntries(f.entries()):null})}return{dataRoutes:d,query:async function(e,r){let{requestContext:a}=void 0===r?{}:r,o=new URL(e.url),n=e.method,c=s("",l(o),null,"default"),u=p(d,c,i);if(!Re(n)&&"HEAD"!==n){let e=ye(405,{method:n}),{matches:t,route:r}=me(d);return{basename:i,location:c,matches:t,loaderData:{},actionData:null,errors:{[r.id]:e},statusCode:e.status,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}if(!u){let e=ye(404,{pathname:c.pathname}),{matches:t,route:r}=me(d);return{basename:i,location:c,matches:t,loaderData:{},actionData:null,errors:{[r.id]:e},statusCode:e.status,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}let f=await h(e,c,u,a);return Ee(f)?f:t({location:c,basename:i},f)},queryRoute:async function(e,t){let{routeId:r,requestContext:a}=void 0===t?{}:t,o=new URL(e.url),n=e.method,c=s("",l(o),null,"default"),u=p(d,c,i);if(!Re(n)&&"HEAD"!==n&&"OPTIONS"!==n)throw ye(405,{method:n});if(!u)throw ye(404,{pathname:c.pathname});let f=r?u.find((e=>e.route.id===r)):Me(u,c);if(r&&!f)throw ye(403,{pathname:c.pathname,routeId:r});if(!f)throw ye(404,{pathname:c.pathname});let m=await h(e,c,u,a,f);if(Ee(m))return m;let y=m.errors?Object.values(m.errors)[0]:void 0;if(void 0!==y)throw y;if(m.actionData)return Object.values(m.actionData)[0];if(m.loaderData){var v;let e=Object.values(m.loaderData)[0];return null!=(v=m.activeDeferreds)&&v[f.route.id]&&(e[Q]=m.activeDeferreds[f.route.id]),e}}}},e.defer=function(e,t){return void 0===t&&(t={}),new T(e,"number"==typeof t?{status:t}:t)},e.generatePath=function(e,t){void 0===t&&(t={});let r=e;r.endsWith("*")&&"*"!==r&&!r.endsWith("/*")&&(n(!1,'Route path "'+r+'" will be treated as if it were "'+r.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+r.replace(/\*$/,"/*")+'".'),r=r.replace(/\*$/,"/*"));const a=r.startsWith("/")?"/":"",i=e=>null==e?"":"string"==typeof e?e:String(e);return a+r.split(/\/+/).map(((e,r,a)=>{if(r===a.length-1&&"*"===e){return i(t["*"])}const n=e.match(/^:([\w-]+)(\??)$/);if(n){const[,e,r]=n;let a=t[e];return o("?"===r||null!=a,'Missing ":'+e+'" param'),i(a)}return e.replace(/\?$/g,"")})).filter((e=>!!e)).join("/")},e.getStaticContextFromError=function(e,r,a){return t({},r,{statusCode:z(a)?a.status:500,errors:{[r._deepestRenderedBoundaryId||e[0].id]:a}})},e.getToPathname=function(e){return""===e||""===e.pathname?"/":"string"==typeof e?c(e).pathname:e.pathname},e.isDeferredData=Se,e.isRouteErrorResponse=z,e.joinPaths=j,e.json=function(e,r){void 0===r&&(r={});let a="number"==typeof r?{status:r}:r,o=new Headers(a.headers);return o.has("Content-Type")||o.set("Content-Type","application/json; charset=utf-8"),new Response(JSON.stringify(e),t({},a,{headers:o}))},e.matchPath=S,e.matchRoutes=p,e.normalizePathname=k,e.parsePath=c,e.redirect=H,e.redirectDocument=(e,t)=>{let r=H(e,t);return r.headers.set("X-Remix-Reload-Document","true"),r},e.resolvePath=P,e.resolveTo=M,e.stripBasename=R,Object.defineProperty(e,"__esModule",{value:!0})}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).RemixRouter={})}(this,(function(e){"use strict";function t(){return t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},t.apply(this,arguments)}let r=function(e){return e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE",e}({});const a="popstate";function o(e,t){if(!1===e||null==e)throw new Error(t)}function n(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function i(e,t){return{usr:e.state,key:e.key,idx:t}}function s(e,r,a,o){return void 0===a&&(a=null),t({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof r?u(r):r,{state:a,key:r&&r.key||o||Math.random().toString(36).substr(2,8)})}function l(e){let{pathname:t="/",search:r="",hash:a=""}=e;return r&&"?"!==r&&(t+="?"===r.charAt(0)?r:"?"+r),a&&"#"!==a&&(t+="#"===a.charAt(0)?a:"#"+a),t}function u(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let a=e.indexOf("?");a>=0&&(t.search=e.substr(a),e=e.substr(0,a)),e&&(t.pathname=e)}return t}function d(e,n,u,d){void 0===d&&(d={});let{window:c=document.defaultView,v5Compat:h=!1}=d,f=c.history,p=r.Pop,m=null,y=v();function v(){return(f.state||{idx:null}).idx}function g(){p=r.Pop;let e=v(),t=null==e?null:e-y;y=e,m&&m({action:p,location:w.location,delta:t})}function b(e){let t="null"!==c.location.origin?c.location.origin:c.location.href,r="string"==typeof e?e:l(e);return r=r.replace(/ $/,"%20"),o(t,"No window.location.(origin|href) available to create URL for href: "+r),new URL(r,t)}null==y&&(y=0,f.replaceState(t({},f.state,{idx:y}),""));let w={get action(){return p},get location(){return e(c,f)},listen(e){if(m)throw new Error("A history only accepts one active listener");return c.addEventListener(a,g),m=e,()=>{c.removeEventListener(a,g),m=null}},createHref:e=>n(c,e),createURL:b,encodeLocation(e){let t=b(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){p=r.Push;let a=s(w.location,e,t);u&&u(a,e),y=v()+1;let o=i(a,y),n=w.createHref(a);try{f.pushState(o,"",n)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;c.location.assign(n)}h&&m&&m({action:p,location:w.location,delta:1})},replace:function(e,t){p=r.Replace;let a=s(w.location,e,t);u&&u(a,e),y=v();let o=i(a,y),n=w.createHref(a);f.replaceState(o,"",n),h&&m&&m({action:p,location:w.location,delta:0})},go:e=>f.go(e)};return w}let c=function(e){return e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error",e}({});const h=new Set(["lazy","caseSensitive","path","id","index","children"]);function f(e,r,a,n){return void 0===a&&(a=[]),void 0===n&&(n={}),e.map(((e,i)=>{let s=[...a,i],l="string"==typeof e.id?e.id:s.join("-");if(o(!0!==e.index||!e.children,"Cannot specify children on an index route"),o(!n[l],'Found a route id collision on id "'+l+"\". Route id's must be globally unique within Data Router usages"),function(e){return!0===e.index}(e)){let a=t({},e,r(e),{id:l});return n[l]=a,a}{let a=t({},e,r(e),{id:l,children:void 0});return n[l]=a,e.children&&(a.children=f(e.children,r,s,n)),a}}))}function p(e,t,r){void 0===r&&(r="/");let a=R(("string"==typeof t?u(t):t).pathname||"/",r);if(null==a)return null;let o=y(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every(((e,r)=>e===t[r]))?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(o);let n=null;for(let e=0;null==n&&e<o.length;++e){let t=E(a);n=D(o[e],t)}return n}function m(e,t){let{route:r,pathname:a,params:o}=e;return{id:r.id,pathname:a,params:o,data:t[r.id],handle:r.handle}}function y(e,t,r,a){void 0===t&&(t=[]),void 0===r&&(r=[]),void 0===a&&(a="");let n=(e,n,i)=>{let s={relativePath:void 0===i?e.path||"":i,caseSensitive:!0===e.caseSensitive,childrenIndex:n,route:e};s.relativePath.startsWith("/")&&(o(s.relativePath.startsWith(a),'Absolute route path "'+s.relativePath+'" nested under path "'+a+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),s.relativePath=s.relativePath.slice(a.length));let l=j([a,s.relativePath]),u=r.concat(s);e.children&&e.children.length>0&&(o(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+l+'".'),y(e.children,t,u,l)),(null!=e.path||e.index)&&t.push({path:l,score:w(l,e.index),routesMeta:u})};return e.forEach(((e,t)=>{var r;if(""!==e.path&&null!=(r=e.path)&&r.includes("?"))for(let r of v(e.path))n(e,t,r);else n(e,t)})),t}function v(e){let t=e.split("/");if(0===t.length)return[];let[r,...a]=t,o=r.endsWith("?"),n=r.replace(/\?$/,"");if(0===a.length)return o?[n,""]:[n];let i=v(a.join("/")),s=[];return s.push(...i.map((e=>""===e?n:[n,e].join("/")))),o&&s.push(...i),s.map((t=>e.startsWith("/")&&""===t?"/":t))}const g=/^:[\w-]+$/,b=e=>"*"===e;function w(e,t){let r=e.split("/"),a=r.length;return r.some(b)&&(a+=-2),t&&(a+=2),r.filter((e=>!b(e))).reduce(((e,t)=>e+(g.test(t)?3:""===t?1:10)),a)}function D(e,t){let{routesMeta:r}=e,a={},o="/",n=[];for(let e=0;e<r.length;++e){let i=r[e],s=e===r.length-1,l="/"===o?t:t.slice(o.length)||"/",u=S({path:i.relativePath,caseSensitive:i.caseSensitive,end:s},l);if(!u)return null;Object.assign(a,u.params);let d=i.route;n.push({params:a,pathname:j([o,u.pathname]),pathnameBase:k(j([o,u.pathnameBase])),route:d}),"/"!==u.pathnameBase&&(o=j([o,u.pathnameBase]))}return n}function S(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[r,a]=function(e,t,r){void 0===t&&(t=!1);void 0===r&&(r=!0);n("*"===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 a=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,r)=>(a.push({paramName:t,isOptional:null!=r}),r?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(a.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))");return[new RegExp(o,t?void 0:"i"),a]}(e.path,e.caseSensitive,e.end),o=t.match(r);if(!o)return null;let i=o[0],s=i.replace(/(.)\/+$/,"$1"),l=o.slice(1);return{params:a.reduce(((e,t,r)=>{let{paramName:a,isOptional:o}=t;if("*"===a){let e=l[r]||"";s=i.slice(0,i.length-e.length).replace(/(.)\/+$/,"$1")}const n=l[r];return e[a]=o&&!n?void 0:(n||"").replace(/%2F/g,"/"),e}),{}),pathname:i,pathnameBase:s,pattern:e}}function E(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return n(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function R(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,a=e.charAt(r);return a&&"/"!==a?null:e.slice(r)||"/"}function P(e,t){void 0===t&&(t="/");let{pathname:r,search:a="",hash:o=""}="string"==typeof e?u(e):e,n=r?r.startsWith("/")?r:function(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)})),r.length>1?r.join("/"):"/"}(r,t):t;return{pathname:n,search:_(a),hash:C(o)}}function x(e,t,r,a){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(a)+"]. Please separate it out to the `to."+r+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function L(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function A(e,t){let r=L(e);return t?r.map(((t,r)=>r===e.length-1?t.pathname:t.pathnameBase)):r.map((e=>e.pathnameBase))}function M(e,r,a,n){let i;void 0===n&&(n=!1),"string"==typeof e?i=u(e):(i=t({},e),o(!i.pathname||!i.pathname.includes("?"),x("?","pathname","search",i)),o(!i.pathname||!i.pathname.includes("#"),x("#","pathname","hash",i)),o(!i.search||!i.search.includes("#"),x("#","search","hash",i)));let s,l=""===e||""===i.pathname,d=l?"/":i.pathname;if(null==d)s=a;else{let e=r.length-1;if(!n&&d.startsWith("..")){let t=d.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}s=e>=0?r[e]:"/"}let c=P(i,s),h=d&&"/"!==d&&d.endsWith("/"),f=(l||"."===d)&&a.endsWith("/");return c.pathname.endsWith("/")||!h&&!f||(c.pathname+="/"),c}const j=e=>e.join("/").replace(/\/\/+/g,"/"),k=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),_=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",C=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";class T extends Error{}class U{constructor(e,t){let r;this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],o(e&&"object"==typeof e&&!Array.isArray(e),"defer() only accepts plain objects"),this.abortPromise=new Promise(((e,t)=>r=t)),this.controller=new AbortController;let a=()=>r(new T("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",a),this.controller.signal.addEventListener("abort",a),this.data=Object.entries(e).reduce(((e,t)=>{let[r,a]=t;return Object.assign(e,{[r]:this.trackPromise(r,a)})}),{}),this.done&&this.unlistenAbortSignal(),this.init=t}trackPromise(e,t){if(!(t instanceof Promise))return t;this.deferredKeys.push(e),this.pendingKeysSet.add(e);let r=Promise.race([t,this.abortPromise]).then((t=>this.onSettle(r,e,void 0,t)),(t=>this.onSettle(r,e,t)));return r.catch((()=>{})),Object.defineProperty(r,"_tracked",{get:()=>!0}),r}onSettle(e,t,r,a){if(this.controller.signal.aborted&&r instanceof T)return this.unlistenAbortSignal(),Object.defineProperty(e,"_error",{get:()=>r}),Promise.reject(r);if(this.pendingKeysSet.delete(t),this.done&&this.unlistenAbortSignal(),void 0===r&&void 0===a){let r=new Error('Deferred data for key "'+t+'" resolved/rejected with `undefined`, you must resolve/reject with a value or `null`.');return Object.defineProperty(e,"_error",{get:()=>r}),this.emit(!1,t),Promise.reject(r)}return void 0===a?(Object.defineProperty(e,"_error",{get:()=>r}),this.emit(!1,t),Promise.reject(r)):(Object.defineProperty(e,"_data",{get:()=>a}),this.emit(!1,t),a)}emit(e,t){this.subscribers.forEach((r=>r(e,t)))}subscribe(e){return this.subscribers.add(e),()=>this.subscribers.delete(e)}cancel(){this.controller.abort(),this.pendingKeysSet.forEach(((e,t)=>this.pendingKeysSet.delete(t))),this.emit(!0)}async resolveData(e){let t=!1;if(!this.done){let r=()=>this.cancel();e.addEventListener("abort",r),t=await new Promise((t=>{this.subscribe((a=>{e.removeEventListener("abort",r),(a||this.done)&&t(a)}))}))}return t}get done(){return 0===this.pendingKeysSet.size}get unwrappedData(){return o(null!==this.data&&this.done,"Can only unwrap data on initialized and settled deferreds"),Object.entries(this.data).reduce(((e,t)=>{let[r,a]=t;return Object.assign(e,{[r]:O(a)})}),{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}}function O(e){if(!function(e){return e instanceof Promise&&!0===e._tracked}(e))return e;if(e._error)throw e._error;return e._data}const H=function(e,r){void 0===r&&(r=302);let a=r;"number"==typeof a?a={status:a}:void 0===a.status&&(a.status=302);let o=new Headers(a.headers);return o.set("Location",e),new Response(null,t({},a,{headers:o}))};class I{constructor(e,t,r,a){void 0===a&&(a=!1),this.status=e,this.statusText=t||"",this.internal=a,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function z(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}const B=["post","put","patch","delete"],F=new Set(B),N=["get",...B],W=new Set(N),$=new Set([301,302,303,307,308]),q=new Set([307,308]),K={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Y={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},J={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},V=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,X=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)}),G="remix-router-transitions";const Q=Symbol("deferred");function Z(e,t,r){if(r.v7_throwAbortReason&&void 0!==e.signal.reason)throw e.signal.reason;throw new Error((t?"queryRoute":"query")+"() call aborted: "+e.method+" "+e.url)}function ee(e,t,r,a,o,n,i,s){let u,d;if(i){u=[];for(let e of t)if(u.push(e),e.route.id===i){d=e;break}}else u=t,d=t[t.length-1];let c=M(o||".",A(u,n),R(e.pathname,r)||e.pathname,"path"===s);return null==o&&(c.search=e.search,c.hash=e.hash),null!=o&&""!==o&&"."!==o||!d||!d.route.index||Te(c.search)||(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),a&&"/"!==r&&(c.pathname="/"===c.pathname?r:j([r,c.pathname])),l(c)}function te(e,t,r,a){if(!a||!function(e){return null!=e&&("formData"in e&&null!=e.formData||"body"in e&&void 0!==e.body)}(a))return{path:r};if(a.formMethod&&!je(a.formMethod))return{path:r,error:De(405,{method:a.formMethod})};let n,i,s=()=>({path:r,error:De(400,{type:"invalid-body"})}),d=a.formMethod||"get",c=e?d.toUpperCase():d.toLowerCase(),h=Ee(r);if(void 0!==a.body){if("text/plain"===a.formEncType){if(!ke(c))return s();let e="string"==typeof a.body?a.body:a.body instanceof FormData||a.body instanceof URLSearchParams?Array.from(a.body.entries()).reduce(((e,t)=>{let[r,a]=t;return""+e+r+"="+a+"\n"}),""):String(a.body);return{path:r,submission:{formMethod:c,formAction:h,formEncType:a.formEncType,formData:void 0,json:void 0,text:e}}}if("application/json"===a.formEncType){if(!ke(c))return s();try{let e="string"==typeof a.body?JSON.parse(a.body):a.body;return{path:r,submission:{formMethod:c,formAction:h,formEncType:a.formEncType,formData:void 0,json:e,text:void 0}}}catch(e){return s()}}}if(o("function"==typeof FormData,"FormData is not available in this environment"),a.formData)n=fe(a.formData),i=a.formData;else if(a.body instanceof FormData)n=fe(a.body),i=a.body;else if(a.body instanceof URLSearchParams)n=a.body,i=pe(n);else if(null==a.body)n=new URLSearchParams,i=new FormData;else try{n=new URLSearchParams(a.body),i=pe(n)}catch(e){return s()}let f={formMethod:c,formAction:h,formEncType:a&&a.formEncType||"application/x-www-form-urlencoded",formData:i,json:void 0,text:void 0};if(ke(f.formMethod))return{path:r,submission:f};let p=u(r);return t&&p.search&&Te(p.search)&&n.append("index",""),p.search="?"+n,{path:l(p),submission:f}}function re(e,t){let r=e;if(t){let a=e.findIndex((e=>e.route.id===t));a>=0&&(r=e.slice(0,a))}return r}function ae(e,r,a,o,n,i,s,l,u,d,c,h,f,m,y,v){let g=v?xe(v[1])?v[1].error:v[1].data:void 0,b=e.createURL(r.location),w=e.createURL(n),D=v&&xe(v[1])?v[0]:void 0,S=D?re(a,D):a,E=v?v[1].statusCode:void 0,R=s&&E&&E>=400,P=S.filter(((e,a)=>{let{route:n}=e;if(n.lazy)return!0;if(null==n.loader)return!1;if(i)return!("function"==typeof n.loader&&!n.loader.hydrate)||void 0===r.loaderData[n.id]&&(!r.errors||void 0===r.errors[n.id]);if(function(e,t,r){let a=!t||r.route.id!==t.route.id,o=void 0===e[r.route.id];return a||o}(r.loaderData,r.matches[a],e)||u.some((t=>t===e.route.id)))return!0;let s=r.matches[a],d=e;return ne(e,t({currentUrl:b,currentParams:s.params,nextUrl:w,nextParams:d.params},o,{actionResult:g,unstable_actionStatus:E,defaultShouldRevalidate:!R&&(l||b.pathname+b.search===w.pathname+w.search||b.search!==w.search||oe(s,d))}))})),x=[];return h.forEach(((e,n)=>{if(i||!a.some((t=>t.route.id===e.routeId))||c.has(n))return;let s=p(m,e.path,y);if(!s)return void x.push({key:n,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null});let u=r.fetchers.get(n),h=Ue(s,e.path),v=!1;v=!f.has(n)&&(!!d.includes(n)||(u&&"idle"!==u.state&&void 0===u.data?l:ne(h,t({currentUrl:b,currentParams:r.matches[r.matches.length-1].params,nextUrl:w,nextParams:a[a.length-1].params},o,{actionResult:g,unstable_actionStatus:E,defaultShouldRevalidate:!R&&l})))),v&&x.push({key:n,routeId:e.routeId,path:e.path,matches:s,match:h,controller:new AbortController})})),[P,x]}function oe(e,t){let r=e.route.path;return e.pathname!==t.pathname||null!=r&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function ne(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if("boolean"==typeof r)return r}return t.defaultShouldRevalidate}async function ie(e,r,a){if(!e.lazy)return;let i=await e.lazy();if(!e.lazy)return;let s=a[e.id];o(s,"No route found in manifest");let l={};for(let e in i){let t=void 0!==s[e]&&"hasErrorBoundary"!==e;n(!t,'Route "'+s.id+'" has a static property "'+e+'" defined but its lazy function is also returning a value for this property. The lazy route property "'+e+'" will be ignored.'),t||h.has(e)||(l[e]=i[e])}Object.assign(s,l),Object.assign(s,t({},r(s),{lazy:void 0}))}function se(e){return Promise.all(e.matches.map((e=>e.resolve())))}async function le(e,r,a,n,i,s,l,u){let d=n.reduce(((e,t)=>e.add(t.route.id)),new Set),h=new Set,f=await e({matches:i.map((e=>{let n=d.has(e.route.id);return t({},e,{shouldLoad:n,resolve:t=>(h.add(e.route.id),n?async function(e,t,r,a,n,i,s){let l,u,d=a=>{let o,n=new Promise(((e,t)=>o=t));u=()=>o(),t.signal.addEventListener("abort",u);let l,d=o=>"function"!=typeof a?Promise.reject(new Error('You cannot call the handler for a route which defines a boolean "'+e+'" [routeId: '+r.route.id+"]")):a({request:t,params:r.params,context:s},...void 0!==o?[o]:[]);return l=i?i((e=>d(e))):(async()=>{try{return{type:"data",result:await d()}}catch(e){return{type:"error",result:e}}})(),Promise.race([l,n])};try{let i=r.route[e];if(r.route.lazy)if(i){let e,[t]=await Promise.all([d(i).catch((t=>{e=t})),ie(r.route,n,a)]);if(void 0!==e)throw e;l=t}else{if(await ie(r.route,n,a),i=r.route[e],!i){if("action"===e){let e=new URL(t.url),a=e.pathname+e.search;throw De(405,{method:t.method,pathname:a,routeId:r.route.id})}return{type:c.data,result:void 0}}l=await d(i)}else{if(!i){let e=new URL(t.url);throw De(404,{pathname:e.pathname+e.search})}l=await d(i)}o(void 0!==l.result,"You defined "+("action"===e?"an action":"a loader")+' for route "'+r.route.id+"\" but didn't return anything from your `"+e+"` function. Please return a value or `null`.")}catch(e){return{type:c.error,result:e}}finally{u&&t.signal.removeEventListener("abort",u)}return l}(r,a,e,s,l,t,u):Promise.resolve({type:c.data,result:void 0}))})})),request:a,params:i[0].params,context:u});return i.forEach((e=>o(h.has(e.route.id),'`match.resolve()` was not called for route id "'+e.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.'))),f.filter(((e,t)=>d.has(i[t].route.id)))}async function ue(e){let{result:t,type:r,status:a}=e;if(Me(t)){let e;try{let r=t.headers.get("Content-Type");e=r&&/\bapplication\/json\b/.test(r)?null==t.body?null:await t.json():await t.text()}catch(e){return{type:c.error,error:e}}return r===c.error?{type:c.error,error:new I(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:c.data,data:e,statusCode:t.status,headers:t.headers}}return r===c.error?{type:c.error,error:t,statusCode:z(t)?t.status:a}:Ae(t)?{type:c.deferred,deferredData:t,statusCode:null==(o=t.init)?void 0:o.status,headers:(null==(n=t.init)?void 0:n.headers)&&new Headers(t.init.headers)}:{type:c.data,data:t,statusCode:a};var o,n}function de(e,t,r,a,n,i){let s=e.headers.get("Location");if(o(s,"Redirects returned/thrown from loaders/actions must have a Location header"),!V.test(s)){let o=a.slice(0,a.findIndex((e=>e.route.id===r))+1);s=ee(new URL(t.url),o,n,!0,s,i),e.headers.set("Location",s)}return e}function ce(e,t,r){if(V.test(e)){let a=e,o=a.startsWith("//")?new URL(t.protocol+a):new URL(a),n=null!=R(o.pathname,r);if(o.origin===t.origin&&n)return o.pathname+o.search+o.hash}return e}function he(e,t,r,a){let o=e.createURL(Ee(t)).toString(),n={signal:r};if(a&&ke(a.formMethod)){let{formMethod:e,formEncType:t}=a;n.method=e.toUpperCase(),"application/json"===t?(n.headers=new Headers({"Content-Type":t}),n.body=JSON.stringify(a.json)):"text/plain"===t?n.body=a.text:"application/x-www-form-urlencoded"===t&&a.formData?n.body=fe(a.formData):n.body=a.formData}return new Request(o,n)}function fe(e){let t=new URLSearchParams;for(let[r,a]of e.entries())t.append(r,"string"==typeof a?a:a.name);return t}function pe(e){let t=new FormData;for(let[r,a]of e.entries())t.append(r,a);return t}function me(e,t,r,a,n,i){let s,l={},u=null,d=!1,c={},h=a&&xe(a[1])?a[1].error:void 0;return r.forEach(((r,a)=>{let f=t[a].route.id;if(o(!Le(r),"Cannot handle redirect results in processLoaderData"),xe(r)){let t=r.error;if(void 0!==h&&(t=h,h=void 0),u=u||{},i)u[f]=t;else{let r=be(e,f);null==u[r.route.id]&&(u[r.route.id]=t)}l[f]=void 0,d||(d=!0,s=z(r.error)?r.error.status:500),r.headers&&(c[f]=r.headers)}else Pe(r)?(n.set(f,r.deferredData),l[f]=r.deferredData.data,null==r.statusCode||200===r.statusCode||d||(s=r.statusCode),r.headers&&(c[f]=r.headers)):(l[f]=r.data,r.statusCode&&200!==r.statusCode&&!d&&(s=r.statusCode),r.headers&&(c[f]=r.headers))})),void 0!==h&&a&&(u={[a[0]]:h},l[a[0]]=void 0),{loaderData:l,errors:u,statusCode:s||200,loaderHeaders:c}}function ye(e,r,a,n,i,s,l,u){let{loaderData:d,errors:c}=me(r,a,n,i,u,!1);for(let r=0;r<s.length;r++){let{key:a,match:n,controller:i}=s[r];o(void 0!==l&&void 0!==l[r],"Did not find corresponding fetcher result");let u=l[r];if(!i||!i.signal.aborted)if(xe(u)){let r=be(e.matches,null==n?void 0:n.route.id);c&&c[r.route.id]||(c=t({},c,{[r.route.id]:u.error})),e.fetchers.delete(a)}else if(Le(u))o(!1,"Unhandled fetcher revalidation redirect");else if(Pe(u))o(!1,"Unhandled fetcher deferred data");else{let t=Be(u.data);e.fetchers.set(a,t)}}return{loaderData:d,errors:c}}function ve(e,r,a,o){let n=t({},r);for(let t of a){let a=t.route.id;if(r.hasOwnProperty(a)?void 0!==r[a]&&(n[a]=r[a]):void 0!==e[a]&&t.route.loader&&(n[a]=e[a]),o&&o.hasOwnProperty(a))break}return n}function ge(e){return e?xe(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function be(e,t){return(t?e.slice(0,e.findIndex((e=>e.route.id===t))+1):[...e]).reverse().find((e=>!0===e.route.hasErrorBoundary))||e[0]}function we(e){let t=1===e.length?e[0]:e.find((e=>e.index||!e.path||"/"===e.path))||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function De(e,t){let{pathname:r,routeId:a,method:o,type:n}=void 0===t?{}:t,i="Unknown Server Error",s="Unknown @remix-run/router error";return 400===e?(i="Bad Request",o&&r&&a?s="You made a "+o+' request to "'+r+'" but did not provide a `loader` for route "'+a+'", so there is no way to handle the request.':"defer-action"===n?s="defer() is not supported in actions":"invalid-body"===n&&(s="Unable to encode submission body")):403===e?(i="Forbidden",s='Route "'+a+'" does not match URL "'+r+'"'):404===e?(i="Not Found",s='No route matches URL "'+r+'"'):405===e&&(i="Method Not Allowed",o&&r&&a?s="You made a "+o.toUpperCase()+' request to "'+r+'" but did not provide an `action` for route "'+a+'", so there is no way to handle the request.':o&&(s='Invalid request method "'+o.toUpperCase()+'"')),new I(e||500,i,new Error(s),!0)}function Se(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(Le(r))return{result:r,idx:t}}}function Ee(e){return l(t({},"string"==typeof e?u(e):e,{hash:""}))}function Re(e){return Me(e.result)&&$.has(e.result.status)}function Pe(e){return e.type===c.deferred}function xe(e){return e.type===c.error}function Le(e){return(e&&e.type)===c.redirect}function Ae(e){let t=e;return t&&"object"==typeof t&&"object"==typeof t.data&&"function"==typeof t.subscribe&&"function"==typeof t.cancel&&"function"==typeof t.resolveData}function Me(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"object"==typeof e.headers&&void 0!==e.body}function je(e){return W.has(e.toLowerCase())}function ke(e){return F.has(e.toLowerCase())}async function _e(e,t,r,a,n,i){for(let s=0;s<r.length;s++){let l=r[s],u=t[s];if(!u)continue;let d=e.find((e=>e.route.id===u.route.id)),c=null!=d&&!oe(d,u)&&void 0!==(i&&i[u.route.id]);if(Pe(l)&&(n||c)){let e=a[s];o(e,"Expected an AbortSignal for revalidating fetcher deferred result"),await Ce(l,e,n).then((e=>{e&&(r[s]=e||r[s])}))}}}async function Ce(e,t,r){if(void 0===r&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:c.data,data:e.deferredData.unwrappedData}}catch(e){return{type:c.error,error:e}}return{type:c.data,data:e.deferredData.data}}}function Te(e){return new URLSearchParams(e).getAll("index").some((e=>""===e))}function Ue(e,t){let r="string"==typeof t?u(t).search:t.search;if(e[e.length-1].route.index&&Te(r||""))return e[e.length-1];let a=L(e);return a[a.length-1]}function Oe(e){let{formMethod:t,formAction:r,formEncType:a,text:o,formData:n,json:i}=e;if(t&&r&&a)return null!=o?{formMethod:t,formAction:r,formEncType:a,formData:void 0,json:void 0,text:o}:null!=n?{formMethod:t,formAction:r,formEncType:a,formData:n,json:void 0,text:void 0}:void 0!==i?{formMethod:t,formAction:r,formEncType:a,formData:void 0,json:i,text:void 0}:void 0}function He(e,t){if(t){return{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}return{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Ie(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function ze(e,t){if(e){return{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}}return{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Be(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}e.AbortedDeferredError=T,e.Action=r,e.IDLE_BLOCKER=J,e.IDLE_FETCHER=Y,e.IDLE_NAVIGATION=K,e.UNSAFE_DEFERRED_SYMBOL=Q,e.UNSAFE_DeferredData=U,e.UNSAFE_ErrorResponseImpl=I,e.UNSAFE_convertRouteMatchToUiMatch=m,e.UNSAFE_convertRoutesToDataRoutes=f,e.UNSAFE_getResolveToMatches=A,e.UNSAFE_invariant=o,e.UNSAFE_warning=n,e.createBrowserHistory=function(e){return void 0===e&&(e={}),d((function(e,t){let{pathname:r,search:a,hash:o}=e.location;return s("",{pathname:r,search:a,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){return"string"==typeof t?t:l(t)}),null,e)},e.createHashHistory=function(e){return void 0===e&&(e={}),d((function(e,t){let{pathname:r="/",search:a="",hash:o=""}=u(e.location.hash.substr(1));return r.startsWith("/")||r.startsWith(".")||(r="/"+r),s("",{pathname:r,search:a,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let r=e.document.querySelector("base"),a="";if(r&&r.getAttribute("href")){let t=e.location.href,r=t.indexOf("#");a=-1===r?t:t.slice(0,r)}return a+"#"+("string"==typeof t?t:l(t))}),(function(e,t){n("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)},e.createMemoryHistory=function(e){void 0===e&&(e={});let t,{initialEntries:a=["/"],initialIndex:o,v5Compat:i=!1}=e;t=a.map(((e,t)=>m(e,"string"==typeof e?null:e.state,0===t?"default":void 0)));let d=f(null==o?t.length-1:o),c=r.Pop,h=null;function f(e){return Math.min(Math.max(e,0),t.length-1)}function p(){return t[d]}function m(e,r,a){void 0===r&&(r=null);let o=s(t?p().pathname:"/",e,r,a);return n("/"===o.pathname.charAt(0),"relative pathnames are not supported in memory history: "+JSON.stringify(e)),o}function y(e){return"string"==typeof e?e:l(e)}return{get index(){return d},get action(){return c},get location(){return p()},createHref:y,createURL:e=>new URL(y(e),"http://localhost"),encodeLocation(e){let t="string"==typeof e?u(e):e;return{pathname:t.pathname||"",search:t.search||"",hash:t.hash||""}},push(e,a){c=r.Push;let o=m(e,a);d+=1,t.splice(d,t.length,o),i&&h&&h({action:c,location:o,delta:1})},replace(e,a){c=r.Replace;let o=m(e,a);t[d]=o,i&&h&&h({action:c,location:o,delta:0})},go(e){c=r.Pop;let a=f(d+e),o=t[a];d=a,h&&h({action:c,location:o,delta:e})},listen:e=>(h=e,()=>{h=null})}},e.createPath=l,e.createRouter=function(e){const a=e.window?e.window:"undefined"!=typeof window?window:void 0,i=void 0!==a&&void 0!==a.document&&void 0!==a.document.createElement,l=!i;let u;if(o(e.routes.length>0,"You must provide a non-empty routes array to createRouter"),e.mapRouteProperties)u=e.mapRouteProperties;else if(e.detectErrorBoundary){let t=e.detectErrorBoundary;u=e=>({hasErrorBoundary:t(e)})}else u=X;let d,h,y={},v=f(e.routes,u,void 0,y),g=e.basename||"/",b=e.unstable_dataStrategy||se,w=t({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,unstable_skipActionErrorRevalidation:!1},e.future),D=null,S=new Set,E=null,P=null,x=null,L=null!=e.hydrationData,A=p(v,e.history.location,g),M=null;if(null==A){let t=De(404,{pathname:e.history.location.pathname}),{matches:r,route:a}=we(v);A=r,M={[a.id]:t}}let j,k=A.some((e=>e.route.lazy)),_=A.some((e=>e.route.loader));if(k)h=!1;else if(_)if(w.v7_partialHydration){let t=e.hydrationData?e.hydrationData.loaderData:null,r=e.hydrationData?e.hydrationData.errors:null,a=e=>!e.route.loader||("function"!=typeof e.route.loader||!0!==e.route.loader.hydrate)&&(t&&void 0!==t[e.route.id]||r&&void 0!==r[e.route.id]);if(r){let e=A.findIndex((e=>void 0!==r[e.route.id]));h=A.slice(0,e+1).every(a)}else h=A.every(a)}else h=null!=e.hydrationData;else h=!0;let C,T={historyAction:e.history.action,location:e.history.location,matches:A,initialized:h,navigation:K,restoreScrollPosition:null==e.hydrationData&&null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||M,fetchers:new Map,blockers:new Map},U=r.Pop,O=!1,H=!1,I=new Map,z=null,B=!1,F=!1,N=[],W=[],$=new Map,Q=0,Z=-1,re=new Map,oe=new Set,ne=new Map,ie=new Map,fe=new Set,pe=new Map,me=new Map,Ee=!1;function Ae(e,r){void 0===r&&(r={}),T=t({},T,e);let a=[],o=[];w.v7_fetcherPersist&&T.fetchers.forEach(((e,t)=>{"idle"===e.state&&(fe.has(t)?o.push(t):a.push(t))})),[...S].forEach((e=>e(T,{deletedFetchers:o,unstable_viewTransitionOpts:r.viewTransitionOpts,unstable_flushSync:!0===r.flushSync}))),w.v7_fetcherPersist&&(a.forEach((e=>T.fetchers.delete(e))),o.forEach((e=>Ye(e))))}function Me(a,o,n){var i,s;let l,{flushSync:u}=void 0===n?{}:n,c=null!=T.actionData&&null!=T.navigation.formMethod&&ke(T.navigation.formMethod)&&"loading"===T.navigation.state&&!0!==(null==(i=a.state)?void 0:i._isRedirect);l=o.actionData?Object.keys(o.actionData).length>0?o.actionData:null:c?T.actionData:null;let h=o.loaderData?ve(T.loaderData,o.loaderData,o.matches||[],o.errors):T.loaderData,f=T.blockers;f.size>0&&(f=new Map(f),f.forEach(((e,t)=>f.set(t,J))));let p,m=!0===O||null!=T.navigation.formMethod&&ke(T.navigation.formMethod)&&!0!==(null==(s=a.state)?void 0:s._isRedirect);if(d&&(v=d,d=void 0),B||U===r.Pop||(U===r.Push?e.history.push(a,a.state):U===r.Replace&&e.history.replace(a,a.state)),U===r.Pop){let e=I.get(T.location.pathname);e&&e.has(a.pathname)?p={currentLocation:T.location,nextLocation:a}:I.has(a.pathname)&&(p={currentLocation:a,nextLocation:T.location})}else if(H){let e=I.get(T.location.pathname);e?e.add(a.pathname):(e=new Set([a.pathname]),I.set(T.location.pathname,e)),p={currentLocation:T.location,nextLocation:a}}Ae(t({},o,{actionData:l,loaderData:h,historyAction:U,location:a,initialized:!0,navigation:K,revalidation:"idle",restoreScrollPosition:at(a,o.matches||T.matches),preventScrollReset:m,blockers:f}),{viewTransitionOpts:p,flushSync:!0===u}),U=r.Pop,O=!1,H=!1,B=!1,F=!1,N=[],W=[]}async function je(a,o,n){C&&C.abort(),C=null,U=a,B=!0===(n&&n.startUninterruptedRevalidation),function(e,t){if(E&&x){let r=rt(e,t);E[r]=x()}}(T.location,T.matches),O=!0===(n&&n.preventScrollReset),H=!0===(n&&n.enableViewTransition);let i=d||v,s=n&&n.overrideNavigation,l=p(i,o,g),u=!0===(n&&n.flushSync);if(!l){let e=De(404,{pathname:o.pathname}),{matches:t,route:r}=we(i);return tt(),void Me(o,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:u})}if(T.initialized&&!F&&function(e,t){if(e.pathname!==t.pathname||e.search!==t.search)return!1;if(""===e.hash)return""!==t.hash;if(e.hash===t.hash)return!0;if(""!==t.hash)return!0;return!1}(T.location,o)&&!(n&&n.submission&&ke(n.submission.formMethod)))return void Me(o,{matches:l},{flushSync:u});C=new AbortController;let h,f=he(e.history,o,C.signal,n&&n.submission);if(n&&n.pendingError)h=[be(l).route.id,{type:c.error,error:n.pendingError}];else if(n&&n.submission&&ke(n.submission.formMethod)){let t=await async function(e,t,a,o,n){void 0===n&&(n={});let i;We(),Ae({navigation:Ie(t,a)},{flushSync:!0===n.flushSync});let s=Ue(o,t);if(s.route.action||s.route.lazy){if(i=(await Fe("action",e,[s],o))[0],e.signal.aborted)return{shortCircuited:!0}}else i={type:c.error,error:De(405,{method:e.method,pathname:t.pathname,routeId:s.route.id})};if(Le(i)){let t;if(n&&null!=n.replace)t=n.replace;else{t=ce(i.response.headers.get("Location"),new URL(e.url),g)===T.location.pathname+T.location.search}return await Te(e,i,{submission:a,replace:t}),{shortCircuited:!0}}if(Pe(i))throw De(400,{type:"defer-action"});if(xe(i)){let e=be(o,s.route.id);return!0!==(n&&n.replace)&&(U=r.Push),{pendingActionResult:[e.route.id,i]}}return{pendingActionResult:[s.route.id,i]}}(f,o,n.submission,l,{replace:n.replace,flushSync:u});if(t.shortCircuited)return;h=t.pendingActionResult,s=He(o,n.submission),u=!1,f=he(e.history,f.url,f.signal)}let{shortCircuited:m,loaderData:y,errors:b}=await async function(r,a,o,n,i,s,l,u,c,h){let f=n||He(a,i),p=i||s||Oe(f),m=d||v,[y,b]=ae(e.history,T,o,p,a,w.v7_partialHydration&&!0===u,w.unstable_skipActionErrorRevalidation,F,N,W,fe,ne,oe,m,g,h);if(tt((e=>!(o&&o.some((t=>t.route.id===e)))||y&&y.some((t=>t.route.id===e)))),Z=++Q,0===y.length&&0===b.length){let e=Xe();return Me(a,t({matches:o,loaderData:{},errors:h&&xe(h[1])?{[h[0]]:h[1].error}:null},ge(h),e?{fetchers:new Map(T.fetchers)}:{}),{flushSync:c}),{shortCircuited:!0}}if(!(B||w.v7_partialHydration&&u)){let e;b.forEach((e=>{let t=T.fetchers.get(e.key),r=ze(void 0,t?t.data:void 0);T.fetchers.set(e.key,r)})),h&&!xe(h[1])?e={[h[0]]:h[1].data}:T.actionData&&(e=0===Object.keys(T.actionData).length?null:T.actionData),Ae(t({navigation:f},void 0!==e?{actionData:e}:{},b.length>0?{fetchers:new Map(T.fetchers)}:{}),{flushSync:c})}b.forEach((e=>{$.has(e.key)&&Je(e.key),e.controller&&$.set(e.key,e.controller)}));let D=()=>b.forEach((e=>Je(e.key)));C&&C.signal.addEventListener("abort",D);let{loaderResults:S,fetcherResults:E}=await Ne(T.matches,o,y,b,r);if(r.signal.aborted)return{shortCircuited:!0};C&&C.signal.removeEventListener("abort",D);b.forEach((e=>$.delete(e.key)));let R=Se([...S,...E]);if(R){if(R.idx>=y.length){let e=b[R.idx-y.length].key;oe.add(e)}return await Te(r,R.result,{replace:l}),{shortCircuited:!0}}let{loaderData:P,errors:x}=ye(T,o,y,S,h,b,E,pe);pe.forEach(((e,t)=>{e.subscribe((r=>{(r||e.done)&&pe.delete(t)}))})),w.v7_partialHydration&&u&&T.errors&&Object.entries(T.errors).filter((e=>{let[t]=e;return!y.some((e=>e.route.id===t))})).forEach((e=>{let[t,r]=e;x=Object.assign(x||{},{[t]:r})}));let L=Xe(),A=Ge(Z),M=L||A||b.length>0;return t({loaderData:P,errors:x},M?{fetchers:new Map(T.fetchers)}:{})}(f,o,l,s,n&&n.submission,n&&n.fetcherSubmission,n&&n.replace,n&&!0===n.initialHydration,u,h);m||(C=null,Me(o,t({matches:l},ge(h),{loaderData:y,errors:b})))}async function Te(n,l,u){let{submission:d,fetcherSubmission:c,replace:h}=void 0===u?{}:u;l.response.headers.has("X-Remix-Revalidate")&&(F=!0);let f=l.response.headers.get("Location");o(f,"Expected a Location header on the redirect Response"),f=ce(f,new URL(n.url),g);let p=s(T.location,f,{_isRedirect:!0});if(i){let t=!1;if(l.response.headers.has("X-Remix-Reload-Document"))t=!0;else if(V.test(f)){const r=e.history.createURL(f);t=r.origin!==a.location.origin||null==R(r.pathname,g)}if(t)return void(h?a.location.replace(f):a.location.assign(f))}C=null;let m=!0===h?r.Replace:r.Push,{formMethod:y,formAction:v,formEncType:b}=T.navigation;!d&&!c&&y&&v&&b&&(d=Oe(T.navigation));let w=d||c;if(q.has(l.response.status)&&w&&ke(w.formMethod))await je(m,p,{submission:t({},w,{formAction:f}),preventScrollReset:O});else{let e=He(p,d);await je(m,p,{overrideNavigation:e,fetcherSubmission:c,preventScrollReset:O})}}async function Fe(e,t,r,a){try{let o=await le(b,e,t,r,a,y,u);return await Promise.all(o.map(((e,o)=>{if(Re(e)){let n=e.result;return{type:c.redirect,response:de(n,t,r[o].route.id,a,g,w.v7_relativeSplatPath)}}return ue(e)})))}catch(e){return r.map((()=>({type:c.error,error:e})))}}async function Ne(t,r,a,o,n){let[i,...s]=await Promise.all([a.length?Fe("loader",n,a,r):[],...o.map((t=>{if(t.matches&&t.match&&t.controller){return Fe("loader",he(e.history,t.path,t.controller.signal),[t.match],t.matches).then((e=>e[0]))}return Promise.resolve({type:c.error,error:De(404,{pathname:t.path})})}))]);return await Promise.all([_e(t,a,i,i.map((()=>n.signal)),!1,T.loaderData),_e(t,o.map((e=>e.match)),s,o.map((e=>e.controller?e.controller.signal:null)),!0)]),{loaderResults:i,fetcherResults:s}}function We(){F=!0,N.push(...tt()),ne.forEach(((e,t)=>{$.has(t)&&(W.push(t),Je(t))}))}function $e(e,t,r){void 0===r&&(r={}),T.fetchers.set(e,t),Ae({fetchers:new Map(T.fetchers)},{flushSync:!0===(r&&r.flushSync)})}function qe(e,t,r,a){void 0===a&&(a={});let o=be(T.matches,t);Ye(e),Ae({errors:{[o.route.id]:r},fetchers:new Map(T.fetchers)},{flushSync:!0===(a&&a.flushSync)})}function Ke(e){return w.v7_fetcherPersist&&(ie.set(e,(ie.get(e)||0)+1),fe.has(e)&&fe.delete(e)),T.fetchers.get(e)||Y}function Ye(e){let t=T.fetchers.get(e);!$.has(e)||t&&"loading"===t.state&&re.has(e)||Je(e),ne.delete(e),re.delete(e),oe.delete(e),fe.delete(e),T.fetchers.delete(e)}function Je(e){let t=$.get(e);o(t,"Expected fetch controller: "+e),t.abort(),$.delete(e)}function Ve(e){for(let t of e){let e=Be(Ke(t).data);T.fetchers.set(t,e)}}function Xe(){let e=[],t=!1;for(let r of oe){let a=T.fetchers.get(r);o(a,"Expected fetcher: "+r),"loading"===a.state&&(oe.delete(r),e.push(r),t=!0)}return Ve(e),t}function Ge(e){let t=[];for(let[r,a]of re)if(a<e){let e=T.fetchers.get(r);o(e,"Expected fetcher: "+r),"loading"===e.state&&(Je(r),re.delete(r),t.push(r))}return Ve(t),t.length>0}function Qe(e){T.blockers.delete(e),me.delete(e)}function Ze(e,t){let r=T.blockers.get(e)||J;o("unblocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"proceeding"===t.state||"blocked"===r.state&&"unblocked"===t.state||"proceeding"===r.state&&"unblocked"===t.state,"Invalid blocker state transition: "+r.state+" -> "+t.state);let a=new Map(T.blockers);a.set(e,t),Ae({blockers:a})}function et(e){let{currentLocation:t,nextLocation:r,historyAction:a}=e;if(0===me.size)return;me.size>1&&n(!1,"A router only supports one blocker at a time");let o=Array.from(me.entries()),[i,s]=o[o.length-1],l=T.blockers.get(i);return l&&"proceeding"===l.state?void 0:s({currentLocation:t,nextLocation:r,historyAction:a})?i:void 0}function tt(e){let t=[];return pe.forEach(((r,a)=>{e&&!e(a)||(r.cancel(),t.push(a),pe.delete(a))})),t}function rt(e,t){if(P){return P(e,t.map((e=>m(e,T.loaderData))))||e.key}return e.key}function at(e,t){if(E){let r=rt(e,t),a=E[r];if("number"==typeof a)return a}return null}return j={get basename(){return g},get future(){return w},get state(){return T},get routes(){return v},get window(){return a},initialize:function(){if(D=e.history.listen((t=>{let{action:r,location:a,delta:o}=t;if(Ee)return void(Ee=!1);n(0===me.size||null!=o,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let i=et({currentLocation:T.location,nextLocation:a,historyAction:r});return i&&null!=o?(Ee=!0,e.history.go(-1*o),void Ze(i,{state:"blocked",location:a,proceed(){Ze(i,{state:"proceeding",proceed:void 0,reset:void 0,location:a}),e.history.go(o)},reset(){let e=new Map(T.blockers);e.set(i,J),Ae({blockers:e})}})):je(r,a)})),i){!function(e,t){try{let r=e.sessionStorage.getItem(G);if(r){let e=JSON.parse(r);for(let[r,a]of Object.entries(e||{}))a&&Array.isArray(a)&&t.set(r,new Set(a||[]))}}catch(e){}}(a,I);let e=()=>function(e,t){if(t.size>0){let r={};for(let[e,a]of t)r[e]=[...a];try{e.sessionStorage.setItem(G,JSON.stringify(r))}catch(e){n(!1,"Failed to save applied view transitions in sessionStorage ("+e+").")}}}(a,I);a.addEventListener("pagehide",e),z=()=>a.removeEventListener("pagehide",e)}return T.initialized||je(r.Pop,T.location,{initialHydration:!0}),j},subscribe:function(e){return S.add(e),()=>S.delete(e)},enableScrollRestoration:function(e,t,r){if(E=e,x=t,P=r||null,!L&&T.navigation===K){L=!0;let e=at(T.location,T.matches);null!=e&&Ae({restoreScrollPosition:e})}return()=>{E=null,x=null,P=null}},navigate:async function a(o,n){if("number"==typeof o)return void e.history.go(o);let i=ee(T.location,T.matches,g,w.v7_prependBasename,o,w.v7_relativeSplatPath,null==n?void 0:n.fromRouteId,null==n?void 0:n.relative),{path:l,submission:u,error:d}=te(w.v7_normalizeFormMethod,!1,i,n),c=T.location,h=s(T.location,l,n&&n.state);h=t({},h,e.history.encodeLocation(h));let f=n&&null!=n.replace?n.replace:void 0,p=r.Push;!0===f?p=r.Replace:!1===f||null!=u&&ke(u.formMethod)&&u.formAction===T.location.pathname+T.location.search&&(p=r.Replace);let m=n&&"preventScrollReset"in n?!0===n.preventScrollReset:void 0,y=!0===(n&&n.unstable_flushSync),v=et({currentLocation:c,nextLocation:h,historyAction:p});if(!v)return await je(p,h,{submission:u,pendingError:d,preventScrollReset:m,replace:n&&n.replace,enableViewTransition:n&&n.unstable_viewTransition,flushSync:y});Ze(v,{state:"blocked",location:h,proceed(){Ze(v,{state:"proceeding",proceed:void 0,reset:void 0,location:h}),a(o,n)},reset(){let e=new Map(T.blockers);e.set(v,J),Ae({blockers:e})}})},fetch:function(t,r,a,n){if(l)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");$.has(t)&&Je(t);let i=!0===(n&&n.unstable_flushSync),s=d||v,u=ee(T.location,T.matches,g,w.v7_prependBasename,a,w.v7_relativeSplatPath,r,null==n?void 0:n.relative),c=p(s,u,g);if(!c)return void qe(t,r,De(404,{pathname:u}),{flushSync:i});let{path:h,submission:f,error:m}=te(w.v7_normalizeFormMethod,!0,u,n);if(m)return void qe(t,r,m,{flushSync:i});let y=Ue(c,h);O=!0===(n&&n.preventScrollReset),f&&ke(f.formMethod)?async function(t,r,a,n,i,s,l){if(We(),ne.delete(t),!n.route.action&&!n.route.lazy){let e=De(405,{method:l.formMethod,pathname:a,routeId:r});return void qe(t,r,e,{flushSync:s})}let u=T.fetchers.get(t);$e(t,function(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}(l,u),{flushSync:s});let c=new AbortController,h=he(e.history,a,c.signal,l);$.set(t,c);let f=Q,m=(await Fe("action",h,[n],i))[0];if(h.signal.aborted)return void($.get(t)===c&&$.delete(t));if(w.v7_fetcherPersist&&fe.has(t)){if(Le(m)||xe(m))return void $e(t,Be(void 0))}else{if(Le(m))return $.delete(t),Z>f?void $e(t,Be(void 0)):(oe.add(t),$e(t,ze(l)),Te(h,m,{fetcherSubmission:l}));if(xe(m))return void qe(t,r,m.error)}if(Pe(m))throw De(400,{type:"defer-action"});let y=T.navigation.location||T.location,b=he(e.history,y,c.signal),D=d||v,S="idle"!==T.navigation.state?p(D,T.navigation.location,g):T.matches;o(S,"Didn't find any matches after fetcher action");let E=++Q;re.set(t,E);let R=ze(l,m.data);T.fetchers.set(t,R);let[P,x]=ae(e.history,T,S,l,y,!1,w.unstable_skipActionErrorRevalidation,F,N,W,fe,ne,oe,D,g,[n.route.id,m]);x.filter((e=>e.key!==t)).forEach((e=>{let t=e.key,r=T.fetchers.get(t),a=ze(void 0,r?r.data:void 0);T.fetchers.set(t,a),$.has(t)&&Je(t),e.controller&&$.set(t,e.controller)})),Ae({fetchers:new Map(T.fetchers)});let L=()=>x.forEach((e=>Je(e.key)));c.signal.addEventListener("abort",L);let{loaderResults:A,fetcherResults:M}=await Ne(T.matches,S,P,x,b);if(c.signal.aborted)return;c.signal.removeEventListener("abort",L),re.delete(t),$.delete(t),x.forEach((e=>$.delete(e.key)));let j=Se([...A,...M]);if(j){if(j.idx>=P.length){let e=x[j.idx-P.length].key;oe.add(e)}return Te(b,j.result)}let{loaderData:k,errors:_}=ye(T,T.matches,P,A,void 0,x,M,pe);if(T.fetchers.has(t)){let e=Be(m.data);T.fetchers.set(t,e)}Ge(E),"loading"===T.navigation.state&&E>Z?(o(U,"Expected pending action"),C&&C.abort(),Me(T.navigation.location,{matches:S,loaderData:k,errors:_,fetchers:new Map(T.fetchers)})):(Ae({errors:_,loaderData:ve(T.loaderData,k,S,_),fetchers:new Map(T.fetchers)}),F=!1)}(t,r,h,y,c,i,f):(ne.set(t,{routeId:r,path:h}),async function(t,r,a,n,i,s,l){let u=T.fetchers.get(t);$e(t,ze(l,u?u.data:void 0),{flushSync:s});let d=new AbortController,c=he(e.history,a,d.signal);$.set(t,d);let h=Q,f=(await Fe("loader",c,[n],i))[0];Pe(f)&&(f=await Ce(f,c.signal,!0)||f);$.get(t)===d&&$.delete(t);if(c.signal.aborted)return;if(fe.has(t))return void $e(t,Be(void 0));if(Le(f))return Z>h?void $e(t,Be(void 0)):(oe.add(t),void await Te(c,f));if(xe(f))return void qe(t,r,f.error);o(!Pe(f),"Unhandled fetcher deferred data"),$e(t,Be(f.data))}(t,r,h,y,c,i,f))},revalidate:function(){We(),Ae({revalidation:"loading"}),"submitting"!==T.navigation.state&&("idle"!==T.navigation.state?je(U||T.historyAction,T.navigation.location,{overrideNavigation:T.navigation}):je(T.historyAction,T.location,{startUninterruptedRevalidation:!0}))},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:Ke,deleteFetcher:function(e){if(w.v7_fetcherPersist){let t=(ie.get(e)||0)-1;t<=0?(ie.delete(e),fe.add(e)):ie.set(e,t)}else Ye(e);Ae({fetchers:new Map(T.fetchers)})},dispose:function(){D&&D(),z&&z(),S.clear(),C&&C.abort(),T.fetchers.forEach(((e,t)=>Ye(t))),T.blockers.forEach(((e,t)=>Qe(t)))},getBlocker:function(e,t){let r=T.blockers.get(e)||J;return me.get(e)!==t&&me.set(e,t),r},deleteBlocker:Qe,_internalFetchControllers:$,_internalActiveDeferreds:pe,_internalSetRoutes:function(e){y={},d=f(e,u,void 0,y)}},j},e.createStaticHandler=function(e,r){o(e.length>0,"You must provide a non-empty routes array to createStaticHandler");let a,n={},i=(r?r.basename:null)||"/";if(null!=r&&r.mapRouteProperties)a=r.mapRouteProperties;else if(null!=r&&r.detectErrorBoundary){let e=r.detectErrorBoundary;a=t=>({hasErrorBoundary:e(t)})}else a=X;let u=t({v7_relativeSplatPath:!1,v7_throwAbortReason:!1},r?r.future:null),d=f(e,a,void 0,n);async function h(e,r,a,n,i,s,l,d,h){o(e.signal,"query()/queryRoute() requests must contain an AbortController signal");try{if(ke(e.method.toLowerCase())){let o=await async function(e,r,a,o,n,i,s,l,d){let h;if(a.route.action||a.route.lazy){h=(await y("action",e,[a],r,d,o,n))[0],e.signal.aborted&&Z(e,d,u)}else{let t=De(405,{method:e.method,pathname:new URL(e.url).pathname,routeId:a.route.id});if(d)throw t;h={type:c.error,error:t}}if(Le(h))throw new Response(null,{status:h.response.status,headers:{Location:h.response.headers.get("Location")}});if(Pe(h)){let e=De(400,{type:"defer-action"});if(d)throw e;h={type:c.error,error:e}}if(d){if(xe(h))throw h.error;return{matches:[a],loaderData:{},actionData:{[a.route.id]:h.data},errors:null,statusCode:200,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}let f=new Request(e.url,{headers:e.headers,redirect:e.redirect,signal:e.signal});if(xe(h)){let e=s?a:be(r,a.route.id),u=z(h.error)?h.error.status:null!=h.statusCode?h.statusCode:500,d=t({},h.headers?{[a.route.id]:h.headers}:{});return l?{matches:r,loaderData:{},actionData:{},errors:{[e.route.id]:h.error},statusCode:u,loaderHeaders:{},actionHeaders:d,activeDeferreds:null}:t({},await m(f,r,o,n,i,s,null,[e.route.id,h]),{statusCode:u,actionData:null,actionHeaders:d})}let p=h.headers?{[a.route.id]:h.headers}:{};if(l)return{matches:r,loaderData:{},actionData:{[a.route.id]:h.data},errors:null,statusCode:h.statusCode||200,loaderHeaders:{},actionHeaders:p,activeDeferreds:null};return t({},await m(f,r,o,n,i,s,null),{actionData:{[a.route.id]:h.data}},h.statusCode?{statusCode:h.statusCode}:{},{actionHeaders:h.headers?{[a.route.id]:h.headers}:{}})}(e,a,h||Ue(a,r),n,i,s,l,d,null!=h);return o}let o=await m(e,a,n,i,s,l,h);return Me(o)?o:t({},o,{actionData:null,actionHeaders:{}})}catch(e){if(function(e){return null!=e&&"object"==typeof e&&"type"in e&&"result"in e&&(e.type===c.data||e.type===c.error)}(e)&&Me(e.result)){if(e.type===c.error)throw e.result;return e.result}if(function(e){if(!Me(e))return!1;let t=e.status,r=e.headers.get("Location");return t>=300&&t<=399&&null!=r}(e))return e;throw e}}async function m(e,r,a,o,n,i,s,l){let d=null!=s;if(d&&(null==s||!s.route.loader)&&(null==s||!s.route.lazy))throw De(400,{method:e.method,pathname:new URL(e.url).pathname,routeId:null==s?void 0:s.route.id});let c=(s?[s]:l&&xe(l[1])?re(r,l[0]):r).filter((e=>e.route.loader||e.route.lazy));if(n&&(c=c.filter((e=>n.includes(e.route.id)))),0===c.length)return{matches:r,loaderData:r.reduce(((e,t)=>Object.assign(e,{[t.route.id]:null})),{}),errors:l&&xe(l[1])?{[l[0]]:l[1].error}:null,statusCode:200,loaderHeaders:{},activeDeferreds:null};let h=await y("loader",e,c,r,d,a,o);e.signal.aborted&&Z(e,d,u);let f=new Map,p=me(r,c,h,l,f,i),m=new Set(c.map((e=>e.route.id)));return r.forEach((e=>{m.has(e.route.id)||(p.loaderData[e.route.id]=null)})),t({},p,{matches:r,activeDeferreds:f.size>0?Object.fromEntries(f.entries()):null})}async function y(e,t,r,o,s,l,d){let c=await le(d||se,e,t,r,o,n,a,l);return await Promise.all(c.map(((e,a)=>{if(Re(e)){throw de(e.result,t,r[a].route.id,o,i,u.v7_relativeSplatPath)}if(Me(e.result)&&s)throw e;return ue(e)})))}return{dataRoutes:d,query:async function(e,r){let{loadRouteIds:a,requestContext:o,skipLoaderErrorBubbling:n,skipLoaders:u,unstable_dataStrategy:c}=void 0===r?{}:r,f=new URL(e.url),m=e.method,y=s("",l(f),null,"default"),v=p(d,y,i);if(!je(m)&&"HEAD"!==m){let e=De(405,{method:m}),{matches:t,route:r}=we(d);return{basename:i,location:y,matches:t,loaderData:{},actionData:null,errors:{[r.id]:e},statusCode:e.status,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}if(!v){let e=De(404,{pathname:y.pathname}),{matches:t,route:r}=we(d);return{basename:i,location:y,matches:t,loaderData:{},actionData:null,errors:{[r.id]:e},statusCode:e.status,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}let g=await h(e,y,v,o,c||null,a||null,!0===n,!0===u,null);return Me(g)?g:t({location:y,basename:i},g)},queryRoute:async function(e,t){let{routeId:r,requestContext:a}=void 0===t?{}:t,o=new URL(e.url),n=e.method,u=s("",l(o),null,"default"),c=p(d,u,i);if(!je(n)&&"HEAD"!==n&&"OPTIONS"!==n)throw De(405,{method:n});if(!c)throw De(404,{pathname:u.pathname});let f=r?c.find((e=>e.route.id===r)):Ue(c,u);if(r&&!f)throw De(403,{pathname:u.pathname,routeId:r});if(!f)throw De(404,{pathname:u.pathname});let m=await h(e,u,c,a,null,null,!1,!1,f);if(Me(m))return m;let y=m.errors?Object.values(m.errors)[0]:void 0;if(void 0!==y)throw y;if(m.actionData)return Object.values(m.actionData)[0];if(m.loaderData){var v;let e=Object.values(m.loaderData)[0];return null!=(v=m.activeDeferreds)&&v[f.route.id]&&(e[Q]=m.activeDeferreds[f.route.id]),e}}}},e.defer=function(e,t){return void 0===t&&(t={}),new U(e,"number"==typeof t?{status:t}:t)},e.generatePath=function(e,t){void 0===t&&(t={});let r=e;r.endsWith("*")&&"*"!==r&&!r.endsWith("/*")&&(n(!1,'Route path "'+r+'" will be treated as if it were "'+r.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+r.replace(/\*$/,"/*")+'".'),r=r.replace(/\*$/,"/*"));const a=r.startsWith("/")?"/":"",i=e=>null==e?"":"string"==typeof e?e:String(e);return a+r.split(/\/+/).map(((e,r,a)=>{if(r===a.length-1&&"*"===e){return i(t["*"])}const n=e.match(/^:([\w-]+)(\??)$/);if(n){const[,e,r]=n;let a=t[e];return o("?"===r||null!=a,'Missing ":'+e+'" param'),i(a)}return e.replace(/\?$/g,"")})).filter((e=>!!e)).join("/")},e.getStaticContextFromError=function(e,r,a){return t({},r,{statusCode:z(a)?a.status:500,errors:{[r._deepestRenderedBoundaryId||e[0].id]:a}})},e.getToPathname=function(e){return""===e||""===e.pathname?"/":"string"==typeof e?u(e).pathname:e.pathname},e.isDeferredData=Ae,e.isRouteErrorResponse=z,e.joinPaths=j,e.json=function(e,r){void 0===r&&(r={});let a="number"==typeof r?{status:r}:r,o=new Headers(a.headers);return o.has("Content-Type")||o.set("Content-Type","application/json; charset=utf-8"),new Response(JSON.stringify(e),t({},a,{headers:o}))},e.matchPath=S,e.matchRoutes=p,e.normalizePathname=k,e.parsePath=u,e.redirect=H,e.redirectDocument=(e,t)=>{let r=H(e,t);return r.headers.set("X-Remix-Reload-Document","true"),r},e.resolvePath=P,e.resolveTo=M,e.stripBasename=R,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=router.umd.min.js.map

@@ -19,3 +19,3 @@ import type { Location, Path, To } from "./history";

type: ResultType.data;
data: any;
data: unknown;
statusCode?: number;

@@ -38,6 +38,3 @@ headers?: Headers;

type: ResultType.redirect;
status: number;
location: string;
revalidate: boolean;
reloadDocument?: boolean;
response: Response;
}

@@ -49,3 +46,4 @@ /**

type: ResultType.error;
error: any;
error: unknown;
statusCode?: number;
headers?: Headers;

@@ -57,2 +55,10 @@ }

export type DataResult = SuccessResult | DeferredResult | RedirectResult | ErrorResult;
/**
* Result from a loader or action called via dataStrategy
*/
export interface HandlerResult {
type: "data" | "error";
result: unknown;
status?: number;
}
type LowerCaseFormMethod = "get" | "post" | "put" | "patch" | "delete";

@@ -139,2 +145,3 @@ type UpperCaseFormMethod = Uppercase<LowerCaseFormMethod>;

type DataFunctionValue = Response | NonNullable<unknown> | null;
type DataFunctionReturnValue = Promise<DataFunctionValue> | DataFunctionValue;
/**

@@ -144,3 +151,3 @@ * Route loader function signature

export type LoaderFunction<Context = any> = {
(args: LoaderFunctionArgs<Context>): Promise<DataFunctionValue> | DataFunctionValue;
(args: LoaderFunctionArgs<Context>, handlerCtx?: unknown): DataFunctionReturnValue;
} & {

@@ -153,3 +160,3 @@ hydrate?: boolean;

export interface ActionFunction<Context = any> {
(args: ActionFunctionArgs<Context>): Promise<DataFunctionValue> | DataFunctionValue;
(args: ActionFunctionArgs<Context>, handlerCtx?: unknown): DataFunctionReturnValue;
}

@@ -170,2 +177,3 @@ /**

json?: Submission["json"];
unstable_actionStatus?: number;
actionResult?: any;

@@ -193,2 +201,12 @@ defaultShouldRevalidate: boolean;

}
export interface DataStrategyMatch extends AgnosticRouteMatch<string, AgnosticDataRouteObject> {
shouldLoad: boolean;
resolve: (handlerOverride?: (handler: (ctx?: unknown) => DataFunctionReturnValue) => Promise<HandlerResult>) => Promise<HandlerResult>;
}
export interface DataStrategyFunctionArgs<Context = any> extends DataFunctionArgs<Context> {
matches: DataStrategyMatch[];
}
export interface DataStrategyFunction {
(args: DataStrategyFunctionArgs): Promise<HandlerResult[]>;
}
/**

@@ -227,4 +245,4 @@ * Function provided by the framework-aware layers to set any framework-specific

id?: string;
loader?: LoaderFunction;
action?: ActionFunction;
loader?: LoaderFunction | boolean;
action?: ActionFunction | boolean;
hasErrorBoundary?: boolean;

@@ -231,0 +249,0 @@ shouldRevalidate?: ShouldRevalidateFunction;

@@ -12,5 +12,9 @@ export type {

AgnosticRouteObject,
DataStrategyFunction as unstable_DataStrategyFunction,
DataStrategyFunctionArgs as unstable_DataStrategyFunctionArgs,
DataStrategyMatch as unstable_DataStrategyMatch,
ErrorResponse,
FormEncType,
FormMethod,
HandlerResult as unstable_HandlerResult,
HTMLFormMethod,

@@ -17,0 +21,0 @@ JsonFunction,

{
"name": "@remix-run/router",
"version": "1.15.3",
"version": "1.16.0-pre.0",
"description": "Nested/Data-driven/Framework-agnostic Routing",

@@ -33,2 +33,2 @@ "keywords": [

}
}
}

@@ -23,3 +23,3 @@ import type { Location, Path, To } from "./history";

type: ResultType.data;
data: any;
data: unknown;
statusCode?: number;

@@ -44,6 +44,4 @@ headers?: Headers;

type: ResultType.redirect;
status: number;
location: string;
revalidate: boolean;
reloadDocument?: boolean;
// We keep the raw Response for redirects so we can return it verbatim
response: Response;
}

@@ -56,3 +54,4 @@

type: ResultType.error;
error: any;
error: unknown;
statusCode?: number;
headers?: Headers;

@@ -70,2 +69,11 @@ }

/**
* Result from a loader or action called via dataStrategy
*/
export interface HandlerResult {
type: "data" | "error";
result: unknown; // data, Error, Response, DeferredData
status?: number;
}
type LowerCaseFormMethod = "get" | "post" | "put" | "patch" | "delete";

@@ -173,2 +181,4 @@ type UpperCaseFormMethod = Uppercase<LowerCaseFormMethod>;

type DataFunctionReturnValue = Promise<DataFunctionValue> | DataFunctionValue;
/**

@@ -178,5 +188,6 @@ * Route loader function signature

export type LoaderFunction<Context = any> = {
(args: LoaderFunctionArgs<Context>):
| Promise<DataFunctionValue>
| DataFunctionValue;
(
args: LoaderFunctionArgs<Context>,
handlerCtx?: unknown
): DataFunctionReturnValue;
} & { hydrate?: boolean };

@@ -188,5 +199,6 @@

export interface ActionFunction<Context = any> {
(args: ActionFunctionArgs<Context>):
| Promise<DataFunctionValue>
| DataFunctionValue;
(
args: ActionFunctionArgs<Context>,
handlerCtx?: unknown
): DataFunctionReturnValue;
}

@@ -208,2 +220,3 @@

json?: Submission["json"];
unstable_actionStatus?: number;
actionResult?: any;

@@ -234,2 +247,21 @@ defaultShouldRevalidate: boolean;

export interface DataStrategyMatch
extends AgnosticRouteMatch<string, AgnosticDataRouteObject> {
shouldLoad: boolean;
resolve: (
handlerOverride?: (
handler: (ctx?: unknown) => DataFunctionReturnValue
) => Promise<HandlerResult>
) => Promise<HandlerResult>;
}
export interface DataStrategyFunctionArgs<Context = any>
extends DataFunctionArgs<Context> {
matches: DataStrategyMatch[];
}
export interface DataStrategyFunction {
(args: DataStrategyFunctionArgs): Promise<HandlerResult[]>;
}
/**

@@ -289,4 +321,4 @@ * Function provided by the framework-aware layers to set any framework-specific

id?: string;
loader?: LoaderFunction;
action?: ActionFunction;
loader?: LoaderFunction | boolean;
action?: ActionFunction | boolean;
hasErrorBoundary?: boolean;

@@ -293,0 +325,0 @@ shouldRevalidate?: ShouldRevalidateFunction;

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc