@pih/esm-audit-app 2.1.0 → 2.1.1-pre.140
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +6 -0
- package/dist/115.js +1 -1
- package/dist/115.js.map +1 -1
- package/dist/117.js.map +1 -1
- package/dist/240.js +1 -1
- package/dist/349.js +1 -1
- package/dist/446.js +1 -1
- package/dist/446.js.map +1 -1
- package/dist/455.js +1 -1
- package/dist/508.js.map +1 -1
- package/dist/61.js +1 -1
- package/dist/689.js +1 -1
- package/dist/711.js +1 -1
- package/dist/712.js +1 -1
- package/dist/771.js +1 -1
- package/dist/859.js +1 -1
- package/dist/912.js.map +1 -1
- package/dist/94.js +3 -3
- package/dist/94.js.map +1 -1
- package/dist/989.js +1 -1
- package/dist/main.js +2 -2
- package/dist/main.js.map +1 -1
- package/dist/pih-esm-audit-app.js +2 -2
- package/dist/pih-esm-audit-app.js.buildmanifest.json +116 -116
- package/dist/pih-esm-audit-app.js.map +1 -1
- package/dist/routes.json +1 -1
- package/package.json +3 -2
- package/.turbo/turbo-lint.log +0 -14
- package/.turbo/turbo-test.log +0 -12735
- package/.turbo/turbo-typescript.log +0 -1
package/dist/712.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_pih_esm_audit_app=globalThis.webpackChunk_pih_esm_audit_app||[]).push([["712"],{7059(e,t,r){r.r(t),r.d(t,{useFetchers:()=>rm,unstable_HistoryRouter:()=>t6,useLoaderData:()=>tf,ScrollRestoration:()=>ro,Route:()=>tP,MemoryRouter:()=>tx,useMatches:()=>th,redirect:()=>G,useOutletContext:()=>e2,createRoutesFromElements:()=>tj,useLinkClickHandler:()=>rs,useRouteError:()=>tv,generatePath:()=>M,useHref:()=>eX,useParams:()=>e5,useRoutes:()=>e9,UNSAFE_ViewTransitionContext:()=>tQ,useSubmit:()=>rh,Navigate:()=>tR,UNSAFE_NavigationContext:()=>eK,useAsyncError:()=>tg,UNSAFE_FetchersContext:()=>tZ,createRoutesFromChildren:()=>tj,unstable_usePrompt:()=>rw,useFetcher:()=>rp,useBlocker:()=>tw,createHashRouter:()=>tX,UNSAFE_useRouteId:()=>tu,useMatch:()=>e0,useNavigation:()=>tc,HashRouter:()=>t9,useFormAction:()=>rf,useResolvedPath:()=>e8,defer:()=>X,Router:()=>tD,Routes:()=>tL,useActionData:()=>tm,useRouteLoaderData:()=>tp,Await:()=>tk,matchPath:()=>O,UNSAFE_DataRouterContext:()=>eW,BrowserRouter:()=>t8,NavigationType:()=>c,Form:()=>ra,UNSAFE_RouteContext:()=>eq,createSearchParams:()=>tH,RouterProvider:()=>t3,UNSAFE_LocationContext:()=>eV,parsePath:()=>D,Outlet:()=>tC,createMemoryRouter:()=>tF,UNSAFE_useScrollRestoration:()=>rg,useNavigate:()=>e7,matchRoutes:()=>T,createPath:()=>P,resolvePath:()=>N,useInRouterContext:()=>eG,useOutlet:()=>e3,useAsyncValue:()=>ty,Link:()=>rr,AbortedDeferredError:()=>q,renderMatches:()=>tM,NavLink:()=>rn,UNSAFE_DataRouterStateContext:()=>e$,json:()=>V,useSearchParams:()=>ru,redirectDocument:()=>Q,useBeforeUnload:()=>rb,unstable_useViewTransitionState:()=>rE,createBrowserRouter:()=>tY,isRouteErrorResponse:()=>ee,useLocation:()=>eQ,useNavigationType:()=>eZ,useRevalidator:()=>td});var n,a,o,i,l,s,u,c,d,h,f,p=r(8297),m=r(3144),v=r.t(m,2);function y(){return(y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}(n=c||(c={})).Pop="POP",n.Push="PUSH",n.Replace="REPLACE";let g="popstate";function b(e){let t;void 0===e&&(e={});let{initialEntries:r=["/"],initialIndex:n,v5Compat:a=!1}=e;t=r.map((e,t)=>u(e,"string"==typeof e?null:e.state,0===t?"default":void 0));let o=s(null==n?t.length-1:n),i=c.Pop,l=null;function s(e){return Math.min(Math.max(e,0),t.length-1)}function u(e,r,n){void 0===r&&(r=null);let a=C(t?t[o].pathname:"/",e,r,n);return x("/"===a.pathname.charAt(0),"relative pathnames are not supported in memory history: "+JSON.stringify(e)),a}function d(e){return"string"==typeof e?e:P(e)}return{get index(){return o},get action(){return i},get location(){return t[o]},createHref:d,createURL:e=>new URL(d(e),"http://localhost"),encodeLocation(e){let t="string"==typeof e?D(e):e;return{pathname:t.pathname||"",search:t.search||"",hash:t.hash||""}},push(e,r){i=c.Push;let n=u(e,r);o+=1,t.splice(o,t.length,n),a&&l&&l({action:i,location:n,delta:1})},replace(e,r){i=c.Replace;let n=u(e,r);t[o]=n,a&&l&&l({action:i,location:n,delta:0})},go(e){i=c.Pop;let r=s(o+e),n=t[r];o=r,l&&l({action:i,location:n,delta:e})},listen:e=>(l=e,()=>{l=null})}}function w(e){return void 0===e&&(e={}),L(function(e,t){let{pathname:r,search:n,hash:a}=e.location;return C("",{pathname:r,search:n,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){return"string"==typeof t?t:P(t)},null,e)}function E(e){return void 0===e&&(e={}),L(function(e,t){let{pathname:r="/",search:n="",hash:a=""}=D(e.location.hash.substr(1));return r.startsWith("/")||r.startsWith(".")||(r="/"+r),C("",{pathname:r,search:n,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){let r=e.document.querySelector("base"),n="";if(r&&r.getAttribute("href")){let t=e.location.href,r=t.indexOf("#");n=-1===r?t:t.slice(0,r)}return n+"#"+("string"==typeof t?t:P(t))},function(e,t){x("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")},e)}function S(e,t){if(!1===e||null==e)throw Error(t)}function x(e,t){if(!e){"u">typeof console&&console.warn(t);try{throw Error(t)}catch(e){}}}function R(e,t){return{usr:e.state,key:e.key,idx:t}}function C(e,t,r,n){return void 0===r&&(r=null),y({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?D(t):t,{state:r,key:t&&t.key||n||Math.random().toString(36).substr(2,8)})}function P(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&"?"!==r&&(t+="?"===r.charAt(0)?r:"?"+r),n&&"#"!==n&&(t+="#"===n.charAt(0)?n:"#"+n),t}function D(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function L(e,t,r,n){void 0===n&&(n={});let{window:a=document.defaultView,v5Compat:o=!1}=n,i=a.history,l=c.Pop,s=null,u=d();function d(){return(i.state||{idx:null}).idx}function h(){l=c.Pop;let e=d(),t=null==e?null:e-u;u=e,s&&s({action:l,location:p.location,delta:t})}function f(e){let t="null"!==a.location.origin?a.location.origin:a.location.href,r="string"==typeof e?e:P(e);return S(t,"No window.location.(origin|href) available to create URL for href: "+(r=r.replace(/ $/,"%20"))),new URL(r,t)}null==u&&(u=0,i.replaceState(y({},i.state,{idx:u}),""));let p={get action(){return l},get location(){return e(a,i)},listen(e){if(s)throw Error("A history only accepts one active listener");return a.addEventListener(g,h),s=e,()=>{a.removeEventListener(g,h),s=null}},createHref:e=>t(a,e),createURL:f,encodeLocation(e){let t=f(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){l=c.Push;let n=C(p.location,e,t);r&&r(n,e);let h=R(n,u=d()+1),f=p.createHref(n);try{i.pushState(h,"",f)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;a.location.assign(f)}o&&s&&s({action:l,location:p.location,delta:1})},replace:function(e,t){l=c.Replace;let n=C(p.location,e,t);r&&r(n,e);let a=R(n,u=d()),h=p.createHref(n);i.replaceState(a,"",h),o&&s&&s({action:l,location:p.location,delta:0})},go:e=>i.go(e)};return p}(a=d||(d={})).data="data",a.deferred="deferred",a.redirect="redirect",a.error="error";let k=new Set(["lazy","caseSensitive","path","id","index","children"]);function _(e,t,r,n){return void 0===r&&(r=[]),void 0===n&&(n={}),e.map((e,a)=>{let o=[...r,a],i="string"==typeof e.id?e.id:o.join("-");if(S(!0!==e.index||!e.children,"Cannot specify children on an index route"),S(!n[i],'Found a route id collision on id "'+i+"\". Route id's must be globally unique within Data Router usages"),!0===e.index){let r=y({},e,t(e),{id:i});return n[i]=r,r}{let r=y({},e,t(e),{id:i,children:void 0});return n[i]=r,e.children&&(r.children=_(e.children,t,o,n)),r}})}function T(e,t,r){void 0===r&&(r="/");let n=F(("string"==typeof t?D(t):t).pathname||"/",r);if(null==n)return null;let a=function e(t,r,n,a){void 0===r&&(r=[]),void 0===n&&(n=[]),void 0===a&&(a="");let o=(t,o,i)=>{var l,s;let u,c,d={relativePath:void 0===i?t.path||"":i,caseSensitive:!0===t.caseSensitive,childrenIndex:o,route:t};d.relativePath.startsWith("/")&&(S(d.relativePath.startsWith(a),'Absolute route path "'+d.relativePath+'" nested under path "'+a+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),d.relativePath=d.relativePath.slice(a.length));let h=W([a,d.relativePath]),f=n.concat(d);t.children&&t.children.length>0&&(S(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+h+'".'),e(t.children,r,f,h)),(null!=t.path||t.index)&&r.push({path:h,score:(l=h,s=t.index,c=(u=l.split("/")).length,u.some(j)&&(c+=-2),s&&(c+=2),u.filter(e=>!j(e)).reduce((e,t)=>e+(A.test(t)?3:""===t?1:10),c)),routesMeta:f})};return t.forEach((e,t)=>{var r;if(""!==e.path&&null!=(r=e.path)&&r.includes("?"))for(let r of function e(t){let r=t.split("/");if(0===r.length)return[];let[n,...a]=r,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(0===a.length)return o?[i,""]:[i];let l=e(a.join("/")),s=[];return s.push(...l.map(e=>""===e?i:[i,e].join("/"))),o&&s.push(...l),s.map(e=>t.startsWith("/")&&""===e?"/":e)}(e.path))o(e,t,r);else o(e,t)}),r}(e);a.sort((e,t)=>{var r,n;return e.score!==t.score?t.score-e.score:(r=e.routesMeta.map(e=>e.childrenIndex),n=t.routesMeta.map(e=>e.childrenIndex),r.length===n.length&&r.slice(0,-1).every((e,t)=>e===n[t])?r[r.length-1]-n[n.length-1]:0)});let o=null;for(let e=0;null==o&&e<a.length;++e){let t=function(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return x(!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}}(n);o=function(e,t){let{routesMeta:r}=e,n={},a="/",o=[];for(let e=0;e<r.length;++e){let i=r[e],l=e===r.length-1,s="/"===a?t:t.slice(a.length)||"/",u=O({path:i.relativePath,caseSensitive:i.caseSensitive,end:l},s);if(!u)return null;Object.assign(n,u.params);let c=i.route;o.push({params:n,pathname:W([a,u.pathname]),pathnameBase:$(W([a,u.pathnameBase])),route:c}),"/"!==u.pathnameBase&&(a=W([a,u.pathnameBase]))}return o}(a[e],t)}return o}function U(e,t){let{route:r,pathname:n,params:a}=e;return{id:r.id,pathname:n,params:a,data:t[r.id],handle:r.handle}}let A=/^:[\w-]+$/,j=e=>"*"===e;function M(e,t){void 0===t&&(t={});let r=e;r.endsWith("*")&&"*"!==r&&!r.endsWith("/*")&&(x(!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(/\*$/,"/*"));let n=r.startsWith("/")?"/":"",a=e=>null==e?"":"string"==typeof e?e:String(e);return n+r.split(/\/+/).map((e,r,n)=>{if(r===n.length-1&&"*"===e)return a(t["*"]);let o=e.match(/^:([\w-]+)(\??)$/);if(o){let[,e,r]=o,n=t[e];return S("?"===r||null!=n,'Missing ":'+e+'" param'),a(n)}return e.replace(/\?$/g,"")}).filter(e=>!!e).join("/")}function O(e,t){var r,n,a;let o,i;"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[l,s]=(r=e.path,n=e.caseSensitive,a=e.end,void 0===n&&(n=!1),void 0===a&&(a=!0),x("*"===r||!r.endsWith("*")||r.endsWith("/*"),'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(/\*$/,"/*")+'".'),o=[],i="^"+r.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,r)=>(o.push({paramName:t,isOptional:null!=r}),r?"/?([^\\/]+)?":"/([^\\/]+)")),r.endsWith("*")?(o.push({paramName:"*"}),i+="*"===r||"/*"===r?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?i+="\\/*$":""!==r&&"/"!==r&&(i+="(?:(?=\\/|$))"),[new RegExp(i,n?void 0:"i"),o]),u=t.match(l);if(!u)return null;let c=u[0],d=c.replace(/(.)\/+$/,"$1"),h=u.slice(1);return{params:s.reduce((e,t,r)=>{let{paramName:n,isOptional:a}=t;if("*"===n){let e=h[r]||"";d=c.slice(0,c.length-e.length).replace(/(.)\/+$/,"$1")}let o=h[r];return a&&!o?e[n]=void 0:e[n]=(o||"").replace(/%2F/g,"/"),e},{}),pathname:c,pathnameBase:d,pattern:e}}function F(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&"/"!==n?null:e.slice(r)||"/"}function N(e,t){var r;let n;void 0===t&&(t="/");let{pathname:a,search:o="",hash:i=""}="string"==typeof e?D(e):e;return{pathname:a?a.startsWith("/")?a:(r=a,n=t.replace(/\/+$/,"").split("/"),r.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"):t,search:J(o),hash:K(i)}}function B(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field [")+JSON.stringify(n)+"]. 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 I(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}function z(e,t){let r=I(e);return t?r.map((t,r)=>r===e.length-1?t.pathname:t.pathnameBase):r.map(e=>e.pathnameBase)}function H(e,t,r,n){let a,o;void 0===n&&(n=!1),"string"==typeof e?a=D(e):(S(!(a=y({},e)).pathname||!a.pathname.includes("?"),B("?","pathname","search",a)),S(!a.pathname||!a.pathname.includes("#"),B("#","pathname","hash",a)),S(!a.search||!a.search.includes("#"),B("#","search","hash",a)));let i=""===e||""===a.pathname,l=i?"/":a.pathname;if(null==l)o=r;else{let e=t.length-1;if(!n&&l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;a.pathname=t.join("/")}o=e>=0?t[e]:"/"}let s=N(a,o),u=l&&"/"!==l&&l.endsWith("/"),c=(i||"."===l)&&r.endsWith("/");return!s.pathname.endsWith("/")&&(u||c)&&(s.pathname+="/"),s}let W=e=>e.join("/").replace(/\/\/+/g,"/"),$=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),J=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",K=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",V=function(e,t){void 0===t&&(t={});let r="number"==typeof t?{status:t}:t,n=new Headers(r.headers);return n.has("Content-Type")||n.set("Content-Type","application/json; charset=utf-8"),new Response(JSON.stringify(e),y({},r,{headers:n}))};class q extends Error{}class Y{constructor(e,t){let r;this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],S(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 n=()=>r(new q("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",n),this.controller.signal.addEventListener("abort",n),this.data=Object.entries(e).reduce((e,t)=>{let[r,n]=t;return Object.assign(e,{[r]:this.trackPromise(r,n)})},{}),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,n){if(this.controller.signal.aborted&&r instanceof q)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===n){let r=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===n?(Object.defineProperty(e,"_error",{get:()=>r}),this.emit(!1,t),Promise.reject(r)):(Object.defineProperty(e,"_data",{get:()=>n}),this.emit(!1,t),n)}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(n=>{e.removeEventListener("abort",r),(n||this.done)&&t(n)})})}return t}get done(){return 0===this.pendingKeysSet.size}get unwrappedData(){return S(null!==this.data&&this.done,"Can only unwrap data on initialized and settled deferreds"),Object.entries(this.data).reduce((e,t)=>{let[r,n]=t;return Object.assign(e,{[r]:function(e){if(!(e instanceof Promise&&!0===e._tracked))return e;if(e._error)throw e._error;return e._data}(n)})},{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}}let X=function(e,t){return void 0===t&&(t={}),new Y(e,"number"==typeof t?{status:t}:t)},G=function(e,t){void 0===t&&(t=302);let r=t;"number"==typeof r?r={status:r}:void 0===r.status&&(r.status=302);let n=new Headers(r.headers);return n.set("Location",e),new Response(null,y({},r,{headers:n}))},Q=(e,t)=>{let r=G(e,t);return r.headers.set("X-Remix-Reload-Document","true"),r};class Z{constructor(e,t,r,n){void 0===n&&(n=!1),this.status=e,this.statusText=t||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function ee(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}let et=["post","put","patch","delete"],er=new Set(et),en=new Set(["get",...et]),ea=new Set([301,302,303,307,308]),eo=new Set([307,308]),ei={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},el={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},es={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},eu=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ec=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),ed="remix-router-transitions";function eh(e){let t,r,n,a,o,i=e.window?e.window:"u">typeof window?window:void 0,l=void 0!==i&&void 0!==i.document&&void 0!==i.document.createElement,s=!l;if(S(e.routes.length>0,"You must provide a non-empty routes array to createRouter"),e.mapRouteProperties)t=e.mapRouteProperties;else if(e.detectErrorBoundary){let r=e.detectErrorBoundary;t=e=>({hasErrorBoundary:r(e)})}else t=ec;let u={},h=_(e.routes,t,void 0,u),f=e.basename||"/",p=y({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1},e.future),m=null,v=new Set,g=null,b=null,w=null,E=null!=e.hydrationData,R=T(h,e.history.location,f),P=null;if(null==R){let t=eD(404,{pathname:e.history.location.pathname}),{matches:r,route:n}=eP(h);R=r,P={[n.id]:t}}let D=R.some(e=>e.route.lazy),L=R.some(e=>e.route.loader);if(D)n=!1;else if(L)if(p.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=R.findIndex(e=>void 0!==r[e.route.id]);n=R.slice(0,e+1).every(a)}else n=R.every(a)}else n=null!=e.hydrationData;else n=!0;let k={historyAction:e.history.action,location:e.history.location,matches:R,initialized:n,navigation:ei,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||P,fetchers:new Map,blockers:new Map},A=c.Pop,j=!1,M=!1,O=new Map,N=null,B=!1,I=!1,z=[],H=[],W=new Map,$=0,J=-1,K=new Map,V=new Set,q=new Map,Y=new Map,X=new Set,G=new Map,Q=new Map,Z=!1;function ee(e,t){void 0===t&&(t={}),k=y({},k,e);let r=[],n=[];p.v7_fetcherPersist&&k.fetchers.forEach((e,t)=>{"idle"===e.state&&(X.has(t)?n.push(t):r.push(t))}),[...v].forEach(e=>e(k,{deletedFetchers:n,unstable_viewTransitionOpts:t.viewTransitionOpts,unstable_flushSync:!0===t.flushSync})),p.v7_fetcherPersist&&(r.forEach(e=>k.fetchers.delete(e)),n.forEach(e=>eW(e)))}function et(t,n,a){var o,i;let l,s,{flushSync:u}=void 0===a?{}:a,d=null!=k.actionData&&null!=k.navigation.formMethod&&eA(k.navigation.formMethod)&&"loading"===k.navigation.state&&(null==(o=t.state)?void 0:o._isRedirect)!==!0;l=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:d?k.actionData:null;let f=n.loaderData?eR(k.loaderData,n.loaderData,n.matches||[],n.errors):k.loaderData,p=k.blockers;p.size>0&&(p=new Map(p)).forEach((e,t)=>p.set(t,es));let m=!0===j||null!=k.navigation.formMethod&&eA(k.navigation.formMethod)&&(null==(i=t.state)?void 0:i._isRedirect)!==!0;if(r&&(h=r,r=void 0),B||A===c.Pop||(A===c.Push?e.history.push(t,t.state):A===c.Replace&&e.history.replace(t,t.state)),A===c.Pop){let e=O.get(k.location.pathname);e&&e.has(t.pathname)?s={currentLocation:k.location,nextLocation:t}:O.has(t.pathname)&&(s={currentLocation:t,nextLocation:k.location})}else if(M){let e=O.get(k.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),O.set(k.location.pathname,e)),s={currentLocation:k.location,nextLocation:t}}ee(y({},n,{actionData:l,loaderData:f,historyAction:A,location:t,initialized:!0,navigation:ei,revalidation:"idle",restoreScrollPosition:eZ(t,n.matches||k.matches),preventScrollReset:m,blockers:p}),{viewTransitionOpts:s,flushSync:!0===u}),A=c.Pop,j=!1,M=!1,B=!1,I=!1,z=[],H=[]}async function er(t,r){if("number"==typeof t)return void e.history.go(t);let n=ef(k.location,k.matches,f,p.v7_prependBasename,t,p.v7_relativeSplatPath,null==r?void 0:r.fromRouteId,null==r?void 0:r.relative),{path:a,submission:o,error:i}=ep(p.v7_normalizeFormMethod,!1,n,r),l=k.location,s=C(k.location,a,r&&r.state);s=y({},s,e.history.encodeLocation(s));let u=r&&null!=r.replace?r.replace:void 0,d=c.Push;!0===u?d=c.Replace:!1===u||null!=o&&eA(o.formMethod)&&o.formAction===k.location.pathname+k.location.search&&(d=c.Replace);let h=r&&"preventScrollReset"in r?!0===r.preventScrollReset:void 0,m=!0===(r&&r.unstable_flushSync),v=eX({currentLocation:l,nextLocation:s,historyAction:d});return v?void eY(v,{state:"blocked",location:s,proceed(){eY(v,{state:"proceeding",proceed:void 0,reset:void 0,location:s}),er(t,r)},reset(){let e=new Map(k.blockers);e.set(v,es),ee({blockers:e})}}):await en(d,s,{submission:o,pendingError:i,preventScrollReset:h,replace:r&&r.replace,enableViewTransition:r&&r.unstable_viewTransition,flushSync:m})}async function en(t,n,a){var i,l,s,u;let c,d;o&&o.abort(),o=null,A=t,B=!0===(a&&a.startUninterruptedRevalidation),i=k.location,l=k.matches,g&&w&&(g[eQ(i,l)]=w()),j=!0===(a&&a.preventScrollReset),M=!0===(a&&a.enableViewTransition);let p=r||h,m=a&&a.overrideNavigation,v=T(p,n,f),b=!0===(a&&a.flushSync);if(!v){let e=eD(404,{pathname:n.pathname}),{matches:t,route:r}=eP(p);eG(),et(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:b});return}if(k.initialized&&!I&&(s=k.location,u=n,s.pathname===u.pathname&&s.search===u.search&&(""===s.hash?""!==u.hash:s.hash===u.hash||""!==u.hash||!1))&&!(a&&a.submission&&eA(a.submission.formMethod)))return void et(n,{matches:v},{flushSync:b});o=new AbortController;let E=ew(e.history,n,o.signal,a&&a.submission);if(a&&a.pendingError)d={[eC(v).route.id]:a.pendingError};else if(a&&a.submission&&eA(a.submission.formMethod)){let e=await ea(E,n,a.submission,v,{replace:a.replace,flushSync:b});if(e.shortCircuited)return;c=e.pendingActionData,d=e.pendingActionError,m=eB(n,a.submission),b=!1,E=new Request(E.url,{signal:E.signal})}let{shortCircuited:S,loaderData:x,errors:R}=await eh(E,n,v,m,a&&a.submission,a&&a.fetcherSubmission,a&&a.replace,a&&!0===a.initialHydration,b,c,d);S||(o=null,et(n,y({matches:v},c?{actionData:c}:{},{loaderData:x,errors:R})))}async function ea(e,r,n,a,o){var i;let l;void 0===o&&(o={}),eS(),ee({navigation:{state:"submitting",location:r,formMethod:(i=n).formMethod,formAction:i.formAction,formEncType:i.formEncType,formData:i.formData,json:i.json,text:i.text}},{flushSync:!0===o.flushSync});let s=eF(a,r);if(s.route.action||s.route.lazy){if(l=await eb("action",e,s,a,u,t,f,p.v7_relativeSplatPath),e.signal.aborted)return{shortCircuited:!0}}else l={type:d.error,error:eD(405,{method:e.method,pathname:r.pathname,routeId:s.route.id})};if(eU(l)){let e;return e=o&&null!=o.replace?o.replace:l.location===k.location.pathname+k.location.search,await eg(k,l,{submission:n,replace:e}),{shortCircuited:!0}}if(eT(l)){let e=eC(a,s.route.id);return!0!==(o&&o.replace)&&(A=c.Push),{pendingActionData:{},pendingActionError:{[e.route.id]:l.error}}}if(e_(l))throw eD(400,{type:"defer-action"});return{pendingActionData:{[s.route.id]:l.data}}}async function eh(t,n,a,i,l,s,u,c,d,m,v){let g=i||eB(n,l),b=l||s||eN(g),w=r||h,[E,S]=em(e.history,k,a,b,n,p.v7_partialHydration&&!0===c,I,z,H,X,q,V,w,f,m,v);if(eG(e=>!(a&&a.some(t=>t.route.id===e))||E&&E.some(t=>t.route.id===e)),J=++$,0===E.length&&0===S.length){let e=eK();return et(n,y({matches:a,loaderData:{},errors:v||null},m?{actionData:m}:{},e?{fetchers:new Map(k.fetchers)}:{}),{flushSync:d}),{shortCircuited:!0}}if(!B&&(!p.v7_partialHydration||!c)){S.forEach(e=>{let t=k.fetchers.get(e.key),r=eI(void 0,t?t.data:void 0);k.fetchers.set(e.key,r)});let e=m||k.actionData;ee(y({navigation:g},e?0===Object.keys(e).length?{actionData:null}:{actionData:e}:{},S.length>0?{fetchers:new Map(k.fetchers)}:{}),{flushSync:d})}S.forEach(e=>{W.has(e.key)&&e$(e.key),e.controller&&W.set(e.key,e.controller)});let x=()=>S.forEach(e=>e$(e.key));o&&o.signal.addEventListener("abort",x);let{results:R,loaderResults:C,fetcherResults:P}=await eE(k.matches,a,E,S,t);if(t.signal.aborted)return{shortCircuited:!0};o&&o.signal.removeEventListener("abort",x),S.forEach(e=>W.delete(e.key));let D=eL(R);if(D){if(D.idx>=E.length){let e=S[D.idx-E.length].key;V.add(e)}return await eg(k,D.result,{replace:u}),{shortCircuited:!0}}let{loaderData:L,errors:_}=ex(k,a,E,C,v,S,P,G);G.forEach((e,t)=>{e.subscribe(r=>{(r||e.done)&&G.delete(t)})}),p.v7_partialHydration&&c&&k.errors&&Object.entries(k.errors).filter(e=>{let[t]=e;return!E.some(e=>e.route.id===t)}).forEach(e=>{let[t,r]=e;_=Object.assign(_||{},{[t]:r})});let T=eK(),U=eV(J),A=T||U||S.length>0;return y({loaderData:L,errors:_},A?{fetchers:new Map(k.fetchers)}:{})}async function ev(n,a,i,l,s,c,d){var m,v;if(eS(),q.delete(n),!l.route.action&&!l.route.lazy){let e=eD(405,{method:d.formMethod,pathname:i,routeId:a});eO(n,a,e,{flushSync:c});return}let y=k.fetchers.get(n);ek(n,(m=d,v=y,{state:"submitting",formMethod:m.formMethod,formAction:m.formAction,formEncType:m.formEncType,formData:m.formData,json:m.json,text:m.text,data:v?v.data:void 0}),{flushSync:c});let g=new AbortController,b=ew(e.history,i,g.signal,d);W.set(n,g);let w=$,E=await eb("action",b,l,s,u,t,f,p.v7_relativeSplatPath);if(b.signal.aborted){W.get(n)===g&&W.delete(n);return}if(p.v7_fetcherPersist&&X.has(n)){if(eU(E)||eT(E))return void ek(n,ez(void 0))}else{if(eU(E))return(W.delete(n),J>w)?void ek(n,ez(void 0)):(V.add(n),ek(n,eI(d)),eg(k,E,{fetcherSubmission:d}));if(eT(E))return void eO(n,a,E.error)}if(e_(E))throw eD(400,{type:"defer-action"});let x=k.navigation.location||k.location,R=ew(e.history,x,g.signal),C=r||h,P="idle"!==k.navigation.state?T(C,k.navigation.location,f):k.matches;S(P,"Didn't find any matches after fetcher action");let D=++$;K.set(n,D);let L=eI(d,E.data);k.fetchers.set(n,L);let[_,U]=em(e.history,k,P,d,x,!1,I,z,H,X,q,V,C,f,{[l.route.id]:E.data},void 0);U.filter(e=>e.key!==n).forEach(e=>{let t=e.key,r=k.fetchers.get(t),n=eI(void 0,r?r.data:void 0);k.fetchers.set(t,n),W.has(t)&&e$(t),e.controller&&W.set(t,e.controller)}),ee({fetchers:new Map(k.fetchers)});let j=()=>U.forEach(e=>e$(e.key));g.signal.addEventListener("abort",j);let{results:M,loaderResults:O,fetcherResults:F}=await eE(k.matches,P,_,U,R);if(g.signal.aborted)return;g.signal.removeEventListener("abort",j),K.delete(n),W.delete(n),U.forEach(e=>W.delete(e.key));let N=eL(M);if(N){if(N.idx>=_.length){let e=U[N.idx-_.length].key;V.add(e)}return eg(k,N.result)}let{loaderData:B,errors:Y}=ex(k,k.matches,_,O,void 0,U,F,G);if(k.fetchers.has(n)){let e=ez(E.data);k.fetchers.set(n,e)}eV(D),"loading"===k.navigation.state&&D>J?(S(A,"Expected pending action"),o&&o.abort(),et(k.navigation.location,{matches:P,loaderData:B,errors:Y,fetchers:new Map(k.fetchers)})):(ee({errors:Y,loaderData:eR(k.loaderData,B,P,Y),fetchers:new Map(k.fetchers)}),I=!1)}async function ey(r,n,a,o,i,l,s){let c=k.fetchers.get(r);ek(r,eI(s,c?c.data:void 0),{flushSync:l});let d=new AbortController,h=ew(e.history,a,d.signal);W.set(r,d);let m=$,v=await eb("loader",h,o,i,u,t,f,p.v7_relativeSplatPath);if(e_(v)&&(v=await eM(v,h.signal,!0)||v),W.get(r)===d&&W.delete(r),!h.signal.aborted){if(X.has(r))return void ek(r,ez(void 0));if(eU(v))if(J>m)return void ek(r,ez(void 0));else{V.add(r),await eg(k,v);return}if(eT(v))return void eO(r,n,v.error);S(!e_(v),"Unhandled fetcher deferred data"),ek(r,ez(v.data))}}async function eg(t,r,n){let{submission:a,fetcherSubmission:s,replace:u}=void 0===n?{}:n;r.revalidate&&(I=!0);let d=C(t.location,r.location,{_isRedirect:!0});if(S(d,"Expected a location on the redirect navigation"),l){let t=!1;if(r.reloadDocument)t=!0;else if(eu.test(r.location)){let n=e.history.createURL(r.location);t=n.origin!==i.location.origin||null==F(n.pathname,f)}if(t)return void(u?i.location.replace(r.location):i.location.assign(r.location))}o=null;let h=!0===u?c.Replace:c.Push,{formMethod:p,formAction:m,formEncType:v}=t.navigation;!a&&!s&&p&&m&&v&&(a=eN(t.navigation));let g=a||s;if(eo.has(r.status)&&g&&eA(g.formMethod))await en(h,d,{submission:y({},g,{formAction:r.location}),preventScrollReset:j});else{let e=eB(d,a);await en(h,d,{overrideNavigation:e,fetcherSubmission:s,preventScrollReset:j})}}async function eE(r,n,a,o,i){let l=await Promise.all([...a.map(e=>eb("loader",i,e,n,u,t,f,p.v7_relativeSplatPath)),...o.map(r=>r.matches&&r.match&&r.controller?eb("loader",ew(e.history,r.path,r.controller.signal),r.match,r.matches,u,t,f,p.v7_relativeSplatPath):{type:d.error,error:eD(404,{pathname:r.path})})]),s=l.slice(0,a.length),c=l.slice(a.length);return await Promise.all([ej(r,a,s,s.map(()=>i.signal),!1,k.loaderData),ej(r,o.map(e=>e.match),c,o.map(e=>e.controller?e.controller.signal:null),!0)]),{results:l,loaderResults:s,fetcherResults:c}}function eS(){I=!0,z.push(...eG()),q.forEach((e,t)=>{W.has(t)&&(H.push(t),e$(t))})}function ek(e,t,r){void 0===r&&(r={}),k.fetchers.set(e,t),ee({fetchers:new Map(k.fetchers)},{flushSync:!0===(r&&r.flushSync)})}function eO(e,t,r,n){void 0===n&&(n={});let a=eC(k.matches,t);eW(e),ee({errors:{[a.route.id]:r},fetchers:new Map(k.fetchers)},{flushSync:!0===(n&&n.flushSync)})}function eH(e){return p.v7_fetcherPersist&&(Y.set(e,(Y.get(e)||0)+1),X.has(e)&&X.delete(e)),k.fetchers.get(e)||el}function eW(e){let t=k.fetchers.get(e);W.has(e)&&!(t&&"loading"===t.state&&K.has(e))&&e$(e),q.delete(e),K.delete(e),V.delete(e),X.delete(e),k.fetchers.delete(e)}function e$(e){let t=W.get(e);S(t,"Expected fetch controller: "+e),t.abort(),W.delete(e)}function eJ(e){for(let t of e){let e=ez(eH(t).data);k.fetchers.set(t,e)}}function eK(){let e=[],t=!1;for(let r of V){let n=k.fetchers.get(r);S(n,"Expected fetcher: "+r),"loading"===n.state&&(V.delete(r),e.push(r),t=!0)}return eJ(e),t}function eV(e){let t=[];for(let[r,n]of K)if(n<e){let e=k.fetchers.get(r);S(e,"Expected fetcher: "+r),"loading"===e.state&&(e$(r),K.delete(r),t.push(r))}return eJ(t),t.length>0}function eq(e){k.blockers.delete(e),Q.delete(e)}function eY(e,t){let r=k.blockers.get(e)||es;S("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 n=new Map(k.blockers);n.set(e,t),ee({blockers:n})}function eX(e){let{currentLocation:t,nextLocation:r,historyAction:n}=e;if(0===Q.size)return;Q.size>1&&x(!1,"A router only supports one blocker at a time");let a=Array.from(Q.entries()),[o,i]=a[a.length-1],l=k.blockers.get(o);if((!l||"proceeding"!==l.state)&&i({currentLocation:t,nextLocation:r,historyAction:n}))return o}function eG(e){let t=[];return G.forEach((r,n)=>{(!e||e(n))&&(r.cancel(),t.push(n),G.delete(n))}),t}function eQ(e,t){return b&&b(e,t.map(e=>U(e,k.loaderData)))||e.key}function eZ(e,t){if(g){let r=g[eQ(e,t)];if("number"==typeof r)return r}return null}return a={get basename(){return f},get future(){return p},get state(){return k},get routes(){return h},get window(){return i},initialize:function(){if(m=e.history.listen(t=>{let{action:r,location:n,delta:a}=t;if(Z){Z=!1;return}x(0===Q.size||null!=a,"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 o=eX({currentLocation:k.location,nextLocation:n,historyAction:r});if(o&&null!=a){Z=!0,e.history.go(-1*a),eY(o,{state:"blocked",location:n,proceed(){eY(o,{state:"proceeding",proceed:void 0,reset:void 0,location:n}),e.history.go(a)},reset(){let e=new Map(k.blockers);e.set(o,es),ee({blockers:e})}});return}return en(r,n)}),l){var t=i,r=O;try{let e=t.sessionStorage.getItem(ed);if(e){let t=JSON.parse(e);for(let[e,n]of Object.entries(t||{}))n&&Array.isArray(n)&&r.set(e,new Set(n||[]))}}catch(e){}let e=()=>(function(e,t){if(t.size>0){let r={};for(let[e,n]of t)r[e]=[...n];try{e.sessionStorage.setItem(ed,JSON.stringify(r))}catch(e){x(!1,"Failed to save applied view transitions in sessionStorage ("+e+").")}}})(i,O);i.addEventListener("pagehide",e),N=()=>i.removeEventListener("pagehide",e)}return k.initialized||en(c.Pop,k.location,{initialHydration:!0}),a},subscribe:function(e){return v.add(e),()=>v.delete(e)},enableScrollRestoration:function(e,t,r){if(g=e,w=t,b=r||null,!E&&k.navigation===ei){E=!0;let e=eZ(k.location,k.matches);null!=e&&ee({restoreScrollPosition:e})}return()=>{g=null,w=null,b=null}},navigate:er,fetch:function(e,t,n,a){if(s)throw 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.");W.has(e)&&e$(e);let o=!0===(a&&a.unstable_flushSync),i=r||h,l=ef(k.location,k.matches,f,p.v7_prependBasename,n,p.v7_relativeSplatPath,t,null==a?void 0:a.relative),u=T(i,l,f);if(!u)return void eO(e,t,eD(404,{pathname:l}),{flushSync:o});let{path:c,submission:d,error:m}=ep(p.v7_normalizeFormMethod,!0,l,a);if(m)return void eO(e,t,m,{flushSync:o});let v=eF(u,c);(j=!0===(a&&a.preventScrollReset),d&&eA(d.formMethod))?ev(e,t,c,v,u,o,d):(q.set(e,{routeId:t,path:c}),ey(e,t,c,v,u,o,d))},revalidate:function(){if(eS(),ee({revalidation:"loading"}),"submitting"!==k.navigation.state){if("idle"===k.navigation.state)return void en(k.historyAction,k.location,{startUninterruptedRevalidation:!0});en(A||k.historyAction,k.navigation.location,{overrideNavigation:k.navigation})}},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:eH,deleteFetcher:function(e){if(p.v7_fetcherPersist){let t=(Y.get(e)||0)-1;t<=0?(Y.delete(e),X.add(e)):Y.set(e,t)}else eW(e);ee({fetchers:new Map(k.fetchers)})},dispose:function(){m&&m(),N&&N(),v.clear(),o&&o.abort(),k.fetchers.forEach((e,t)=>eW(t)),k.blockers.forEach((e,t)=>eq(t))},getBlocker:function(e,t){let r=k.blockers.get(e)||es;return Q.get(e)!==t&&Q.set(e,t),r},deleteBlocker:eq,_internalFetchControllers:W,_internalActiveDeferreds:G,_internalSetRoutes:function(e){r=_(e,t,void 0,u={})}}}function ef(e,t,r,n,a,o,i,l){let s,u;if(i){for(let e of(s=[],t))if(s.push(e),e.route.id===i){u=e;break}}else s=t,u=t[t.length-1];let c=H(a||".",z(s,o),F(e.pathname,r)||e.pathname,"path"===l);return null==a&&(c.search=e.search,c.hash=e.hash),(null==a||""===a||"."===a)&&u&&u.route.index&&!eO(c.search)&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),n&&"/"!==r&&(c.pathname="/"===c.pathname?r:W([r,c.pathname])),P(c)}function ep(e,t,r,n){var a;let o,i;if(!n||!(null!=n&&("formData"in n&&null!=n.formData||"body"in n&&void 0!==n.body)))return{path:r};if(n.formMethod&&(a=n.formMethod,!en.has(a.toLowerCase())))return{path:r,error:eD(405,{method:n.formMethod})};let l=()=>({path:r,error:eD(400,{type:"invalid-body"})}),s=n.formMethod||"get",u=e?s.toUpperCase():s.toLowerCase(),c=ek(r);if(void 0!==n.body){if("text/plain"===n.formEncType){if(!eA(u))return l();let e="string"==typeof n.body?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((e,t)=>{let[r,n]=t;return""+e+r+"="+n+"\n"},""):String(n.body);return{path:r,submission:{formMethod:u,formAction:c,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}else if("application/json"===n.formEncType){if(!eA(u))return l();try{let e="string"==typeof n.body?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:u,formAction:c,formEncType:n.formEncType,formData:void 0,json:e,text:void 0}}}catch(e){return l()}}}if(S("function"==typeof FormData,"FormData is not available in this environment"),n.formData)o=eE(n.formData),i=n.formData;else if(n.body instanceof FormData)o=eE(n.body),i=n.body;else if(n.body instanceof URLSearchParams)i=eS(o=n.body);else if(null==n.body)o=new URLSearchParams,i=new FormData;else try{o=new URLSearchParams(n.body),i=eS(o)}catch(e){return l()}let d={formMethod:u,formAction:c,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:i,json:void 0,text:void 0};if(eA(d.formMethod))return{path:r,submission:d};let h=D(r);return t&&h.search&&eO(h.search)&&o.append("index",""),h.search="?"+o,{path:P(h),submission:d}}function em(e,t,r,n,a,o,i,l,s,u,c,d,h,f,p,m){let v=m?Object.values(m)[0]:p?Object.values(p)[0]:void 0,g=e.createURL(t.location),b=e.createURL(a),w=(function(e,t){let r=e;if(t){let n=e.findIndex(e=>e.route.id===t);n>=0&&(r=e.slice(0,n))}return r})(r,m?Object.keys(m)[0]:void 0).filter((e,r)=>{var a,s,u;let c,d,{route:h}=e;if(h.lazy)return!0;if(null==h.loader)return!1;if(o)return!!h.loader.hydrate||void 0===t.loaderData[h.id]&&(!t.errors||void 0===t.errors[h.id]);if(a=t.loaderData,s=t.matches[r],u=e,c=!s||u.route.id!==s.route.id,d=void 0===a[u.route.id],c||d||l.some(t=>t===e.route.id))return!0;let f=t.matches[r];return ey(e,y({currentUrl:g,currentParams:f.params,nextUrl:b,nextParams:e.params},n,{actionResult:v,defaultShouldRevalidate:i||g.pathname+g.search===b.pathname+b.search||g.search!==b.search||ev(f,e)}))}),E=[];return c.forEach((e,a)=>{if(o||!r.some(t=>t.route.id===e.routeId)||u.has(a))return;let l=T(h,e.path,f);if(!l)return void E.push({key:a,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null});let c=t.fetchers.get(a),p=eF(l,e.path);!d.has(a)&&(s.includes(a)||(c&&"idle"!==c.state&&void 0===c.data?i:ey(p,y({currentUrl:g,currentParams:t.matches[t.matches.length-1].params,nextUrl:b,nextParams:r[r.length-1].params},n,{actionResult:v,defaultShouldRevalidate:i}))))&&E.push({key:a,routeId:e.routeId,path:e.path,matches:l,match:p,controller:new AbortController})}),[w,E]}function ev(e,t){let r=e.route.path;return e.pathname!==t.pathname||null!=r&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function ey(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if("boolean"==typeof r)return r}return t.defaultShouldRevalidate}async function eg(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let a=r[e.id];S(a,"No route found in manifest");let o={};for(let e in n){let t=void 0!==a[e]&&"hasErrorBoundary"!==e;x(!t,'Route "'+a.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||k.has(e)||(o[e]=n[e])}Object.assign(a,o),Object.assign(a,y({},t(a),{lazy:void 0}))}async function eb(e,t,r,n,a,o,i,l,s){var u,c,h,f;let p,m,v;void 0===s&&(s={});let y=e=>{let n,a=new Promise((e,t)=>n=t);return v=()=>n(),t.signal.addEventListener("abort",v),Promise.race([e({request:t,params:r.params,context:s.requestContext}),a])};try{let n=r.route[e];if(r.route.lazy)if(n){let e,t=await Promise.all([y(n).catch(t=>{e=t}),eg(r.route,o,a)]);if(e)throw e;m=t[0]}else if(await eg(r.route,o,a),n=r.route[e])m=await y(n);else{if("action"!==e)return{type:d.data,data:void 0};let n=new URL(t.url),a=n.pathname+n.search;throw eD(405,{method:t.method,pathname:a,routeId:r.route.id})}else if(n)m=await y(n);else{let e=new URL(t.url),r=e.pathname+e.search;throw eD(404,{pathname:r})}S(void 0!==m,"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){p=d.error,m=e}finally{v&&t.signal.removeEventListener("abort",v)}if(null!=(u=m)&&"number"==typeof u.status&&"string"==typeof u.statusText&&"object"==typeof u.headers&&void 0!==u.body){let e,a=m.status;if(ea.has(a)){let e=m.headers.get("Location");if(S(e,"Redirects returned/thrown from loaders/actions must have a Location header"),eu.test(e)){if(!s.isStaticRequest){let r=new URL(t.url),n=new URL(e.startsWith("//")?r.protocol+e:e),a=null!=F(n.pathname,i);n.origin===r.origin&&a&&(e=n.pathname+n.search+n.hash)}}else e=ef(new URL(t.url),n.slice(0,n.indexOf(r)+1),i,!0,e,l);if(s.isStaticRequest)throw m.headers.set("Location",e),m;return{type:d.redirect,status:a,location:e,revalidate:null!==m.headers.get("X-Remix-Revalidate"),reloadDocument:null!==m.headers.get("X-Remix-Reload-Document")}}if(s.isRouteRequest)throw{type:p===d.error?d.error:d.data,response:m};try{let t=m.headers.get("Content-Type");e=t&&/\bapplication\/json\b/.test(t)?null==m.body?null:await m.json():await m.text()}catch(e){return{type:d.error,error:e}}return p===d.error?{type:p,error:new Z(a,m.statusText,e),headers:m.headers}:{type:d.data,data:e,statusCode:m.status,headers:m.headers}}if(p===d.error)return{type:p,error:m};if((c=m)&&"object"==typeof c&&"object"==typeof c.data&&"function"==typeof c.subscribe&&"function"==typeof c.cancel&&"function"==typeof c.resolveData){return{type:d.deferred,deferredData:m,statusCode:null==(h=m.init)?void 0:h.status,headers:(null==(f=m.init)?void 0:f.headers)&&new Headers(m.init.headers)}}return{type:d.data,data:m}}function ew(e,t,r,n){let a=e.createURL(ek(t)).toString(),o={signal:r};if(n&&eA(n.formMethod)){let{formMethod:e,formEncType:t}=n;o.method=e.toUpperCase(),"application/json"===t?(o.headers=new Headers({"Content-Type":t}),o.body=JSON.stringify(n.json)):"text/plain"===t?o.body=n.text:"application/x-www-form-urlencoded"===t&&n.formData?o.body=eE(n.formData):o.body=n.formData}return new Request(a,o)}function eE(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,"string"==typeof n?n:n.name);return t}function eS(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function ex(e,t,r,n,a,o,i,l){var s;let u,c,d,h,f,{loaderData:p,errors:m}=(s=a,c={},d=null,h=!1,f={},n.forEach((e,n)=>{let a=r[n].route.id;if(S(!eU(e),"Cannot handle redirect results in processLoaderData"),eT(e)){let r=eC(t,a),n=e.error;s&&(n=Object.values(s)[0],s=void 0),null==(d=d||{})[r.route.id]&&(d[r.route.id]=n),c[a]=void 0,h||(h=!0,u=ee(e.error)?e.error.status:500),e.headers&&(f[a]=e.headers)}else e_(e)?(l.set(a,e.deferredData),c[a]=e.deferredData.data):c[a]=e.data,null==e.statusCode||200===e.statusCode||h||(u=e.statusCode),e.headers&&(f[a]=e.headers)}),s&&(d=s,c[Object.keys(s)[0]]=void 0),{loaderData:c,errors:d,statusCode:u||200,loaderHeaders:f});for(let t=0;t<o.length;t++){let{key:r,match:n,controller:a}=o[t];S(void 0!==i&&void 0!==i[t],"Did not find corresponding fetcher result");let l=i[t];if(!a||!a.signal.aborted)if(eT(l)){let t=eC(e.matches,null==n?void 0:n.route.id);m&&m[t.route.id]||(m=y({},m,{[t.route.id]:l.error})),e.fetchers.delete(r)}else if(eU(l))S(!1,"Unhandled fetcher revalidation redirect");else if(e_(l))S(!1,"Unhandled fetcher deferred data");else{let t=ez(l.data);e.fetchers.set(r,t)}}return{loaderData:p,errors:m}}function eR(e,t,r,n){let a=y({},t);for(let o of r){let r=o.route.id;if(t.hasOwnProperty(r)?void 0!==t[r]&&(a[r]=t[r]):void 0!==e[r]&&o.route.loader&&(a[r]=e[r]),n&&n.hasOwnProperty(r))break}return a}function eC(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 eP(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 eD(e,t){let{pathname:r,routeId:n,method:a,type:o}=void 0===t?{}:t,i="Unknown Server Error",l="Unknown @remix-run/router error";return 400===e?(i="Bad Request",a&&r&&n?l="You made a "+a+' request to "'+r+'" but did not provide a `loader` for route "'+n+'", so there is no way to handle the request.':"defer-action"===o?l="defer() is not supported in actions":"invalid-body"===o&&(l="Unable to encode submission body")):403===e?(i="Forbidden",l='Route "'+n+'" does not match URL "'+r+'"'):404===e?(i="Not Found",l='No route matches URL "'+r+'"'):405===e&&(i="Method Not Allowed",a&&r&&n?l="You made a "+a.toUpperCase()+' request to "'+r+'" but did not provide an `action` for route "'+n+'", so there is no way to handle the request.':a&&(l='Invalid request method "'+a.toUpperCase()+'"')),new Z(e||500,i,Error(l),!0)}function eL(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(eU(r))return{result:r,idx:t}}}function ek(e){let t="string"==typeof e?D(e):e;return P(y({},t,{hash:""}))}function e_(e){return e.type===d.deferred}function eT(e){return e.type===d.error}function eU(e){return(e&&e.type)===d.redirect}function eA(e){return er.has(e.toLowerCase())}async function ej(e,t,r,n,a,o){for(let i=0;i<r.length;i++){let l=r[i],s=t[i];if(!s)continue;let u=e.find(e=>e.route.id===s.route.id),c=null!=u&&!ev(u,s)&&(o&&o[s.route.id])!==void 0;if(e_(l)&&(a||c)){let e=n[i];S(e,"Expected an AbortSignal for revalidating fetcher deferred result"),await eM(l,e,a).then(e=>{e&&(r[i]=e||r[i])})}}}async function eM(e,t,r){if(void 0===r&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:d.data,data:e.deferredData.unwrappedData}}catch(e){return{type:d.error,error:e}}return{type:d.data,data:e.deferredData.data}}}function eO(e){return new URLSearchParams(e).getAll("index").some(e=>""===e)}function eF(e,t){let r="string"==typeof t?D(t).search:t.search;if(e[e.length-1].route.index&&eO(r||""))return e[e.length-1];let n=I(e);return n[n.length-1]}function eN(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:o,json:i}=e;if(t&&r&&n){if(null!=a)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a};else if(null!=o)return{formMethod:t,formAction:r,formEncType:n,formData:o,json:void 0,text:void 0};else if(void 0!==i)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:i,text:void 0}}}function eB(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function eI(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function ez(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function eH(){return(eH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}Symbol("deferred");let eW=p.createContext(null),e$=p.createContext(null),eJ=p.createContext(null),eK=p.createContext(null),eV=p.createContext(null),eq=p.createContext({outlet:null,matches:[],isDataRoute:!1}),eY=p.createContext(null);function eX(e,t){let{relative:r}=void 0===t?{}:t;eG()||S(!1);let{basename:n,navigator:a}=p.useContext(eK),{hash:o,pathname:i,search:l}=e8(e,{relative:r}),s=i;return"/"!==n&&(s="/"===i?n:W([n,i])),a.createHref({pathname:s,search:l,hash:o})}function eG(){return null!=p.useContext(eV)}function eQ(){return eG()||S(!1),p.useContext(eV).location}function eZ(){return p.useContext(eV).navigationType}function e0(e){eG()||S(!1);let{pathname:t}=eQ();return p.useMemo(()=>O(e,t),[t,e])}function e1(e){p.useContext(eK).static||p.useLayoutEffect(e)}function e7(){let{isDataRoute:e}=p.useContext(eq);return e?function(){let{router:e}=ti(ta.UseNavigateStable),t=ts(to.UseNavigateStable),r=p.useRef(!1);return e1(()=>{r.current=!0}),p.useCallback(function(n,a){void 0===a&&(a={}),r.current&&("number"==typeof n?e.navigate(n):e.navigate(n,eH({fromRouteId:t},a)))},[e,t])}():function(){eG()||S(!1);let e=p.useContext(eW),{basename:t,future:r,navigator:n}=p.useContext(eK),{matches:a}=p.useContext(eq),{pathname:o}=eQ(),i=JSON.stringify(z(a,r.v7_relativeSplatPath)),l=p.useRef(!1);return e1(()=>{l.current=!0}),p.useCallback(function(r,a){if(void 0===a&&(a={}),!l.current)return;if("number"==typeof r)return void n.go(r);let s=H(r,JSON.parse(i),o,"path"===a.relative);null==e&&"/"!==t&&(s.pathname="/"===s.pathname?t:W([t,s.pathname])),(a.replace?n.replace:n.push)(s,a.state,a)},[t,n,i,o,e])}()}let e4=p.createContext(null);function e2(){return p.useContext(e4)}function e3(e){let t=p.useContext(eq).outlet;return t?p.createElement(e4.Provider,{value:e},t):t}function e5(){let{matches:e}=p.useContext(eq),t=e[e.length-1];return t?t.params:{}}function e8(e,t){let{relative:r}=void 0===t?{}:t,{future:n}=p.useContext(eK),{matches:a}=p.useContext(eq),{pathname:o}=eQ(),i=JSON.stringify(z(a,n.v7_relativeSplatPath));return p.useMemo(()=>H(e,JSON.parse(i),o,"path"===r),[e,i,o,r])}function e9(e,t){return e6(e,t)}function e6(e,t,r,n){let a;eG()||S(!1);let{navigator:o}=p.useContext(eK),{matches:i}=p.useContext(eq),l=i[i.length-1],s=l?l.params:{};l&&l.pathname;let u=l?l.pathnameBase:"/";l&&l.route;let d=eQ();if(t){var h;let e="string"==typeof t?D(t):t;"/"===u||(null==(h=e.pathname)?void 0:h.startsWith(u))||S(!1),a=e}else a=d;let f=a.pathname||"/",m=f;if("/"!==u){let e=u.replace(/^\//,"").split("/");m="/"+f.replace(/^\//,"").split("/").slice(e.length).join("/")}let v=T(e,{pathname:m}),y=tn(v&&v.map(e=>Object.assign({},e,{params:Object.assign({},s,e.params),pathname:W([u,o.encodeLocation?o.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?u:W([u,o.encodeLocation?o.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})),i,r,n);return t&&y?p.createElement(eV.Provider,{value:{location:eH({pathname:"/",search:"",hash:"",state:null,key:"default"},a),navigationType:c.Pop}},y):y}let te=p.createElement(function(){let e=tv(),t=ee(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null;return p.createElement(p.Fragment,null,p.createElement("h2",null,"Unexpected Application Error!"),p.createElement("h3",{style:{fontStyle:"italic"}},t),r?p.createElement("pre",{style:{padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"}},r):null,null)},null);class tt extends p.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?p.createElement(eq.Provider,{value:this.props.routeContext},p.createElement(eY.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function tr(e){let{routeContext:t,match:r,children:n}=e,a=p.useContext(eW);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),p.createElement(eq.Provider,{value:t},n)}function tn(e,t,r,n){var a,o;if(void 0===t&&(t=[]),void 0===r&&(r=null),void 0===n&&(n=null),null==e){if(null==(o=r)||!o.errors)return null;e=r.matches}let i=e,l=null==(a=r)?void 0:a.errors;if(null!=l){let e=i.findIndex(e=>e.route.id&&(null==l?void 0:l[e.route.id]));e>=0||S(!1),i=i.slice(0,Math.min(i.length,e+1))}let s=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(u=e),t.route.id){let{loaderData:e,errors:n}=r,a=t.route.loader&&void 0===e[t.route.id]&&(!n||void 0===n[t.route.id]);if(t.route.lazy||a){s=!0,i=u>=0?i.slice(0,u+1):[i[0]];break}}}return i.reduceRight((e,n,a)=>{var o;let c,d=!1,h=null,f=null;r&&(c=l&&n.route.id?l[n.route.id]:void 0,h=n.route.errorElement||te,s&&(u<0&&0===a?(o="route-fallback",tE[o]||(tE[o]=!0),d=!0,f=null):u===a&&(d=!0,f=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,a+1)),v=()=>{let t;return t=c?h:d?f:n.route.Component?p.createElement(n.route.Component,null):n.route.element?n.route.element:e,p.createElement(tr,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:null!=r},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||0===a)?p.createElement(tt,{location:r.location,revalidation:r.revalidation,component:h,error:c,children:v(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):v()},null)}var ta=((o=ta||{}).UseBlocker="useBlocker",o.UseRevalidator="useRevalidator",o.UseNavigateStable="useNavigate",o),to=((i=to||{}).UseBlocker="useBlocker",i.UseLoaderData="useLoaderData",i.UseActionData="useActionData",i.UseRouteError="useRouteError",i.UseNavigation="useNavigation",i.UseRouteLoaderData="useRouteLoaderData",i.UseMatches="useMatches",i.UseRevalidator="useRevalidator",i.UseNavigateStable="useNavigate",i.UseRouteId="useRouteId",i);function ti(e){let t=p.useContext(eW);return t||S(!1),t}function tl(e){let t=p.useContext(e$);return t||S(!1),t}function ts(e){let t,r=((t=p.useContext(eq))||S(!1),t),n=r.matches[r.matches.length-1];return n.route.id||S(!1),n.route.id}function tu(){return ts(to.UseRouteId)}function tc(){return tl(to.UseNavigation).navigation}function td(){let e=ti(ta.UseRevalidator),t=tl(to.UseRevalidator);return p.useMemo(()=>({revalidate:e.router.revalidate,state:t.revalidation}),[e.router.revalidate,t.revalidation])}function th(){let{matches:e,loaderData:t}=tl(to.UseMatches);return p.useMemo(()=>e.map(e=>U(e,t)),[e,t])}function tf(){let e=tl(to.UseLoaderData),t=ts(to.UseLoaderData);return e.errors&&null!=e.errors[t]?void console.error("You cannot `useLoaderData` in an errorElement (routeId: "+t+")"):e.loaderData[t]}function tp(e){return tl(to.UseRouteLoaderData).loaderData[e]}function tm(){let e=tl(to.UseActionData),t=ts(to.UseLoaderData);return e.actionData?e.actionData[t]:void 0}function tv(){var e;let t=p.useContext(eY),r=tl(to.UseRouteError),n=ts(to.UseRouteError);return void 0!==t?t:null==(e=r.errors)?void 0:e[n]}function ty(){let e=p.useContext(eJ);return null==e?void 0:e._data}function tg(){let e=p.useContext(eJ);return null==e?void 0:e._error}let tb=0;function tw(e){let{router:t,basename:r}=ti(ta.UseBlocker),n=tl(to.UseBlocker),[a,o]=p.useState(""),i=p.useCallback(t=>{if("function"!=typeof e)return!!e;if("/"===r)return e(t);let{currentLocation:n,nextLocation:a,historyAction:o}=t;return e({currentLocation:eH({},n,{pathname:F(n.pathname,r)||n.pathname}),nextLocation:eH({},a,{pathname:F(a.pathname,r)||a.pathname}),historyAction:o})},[r,e]);return p.useEffect(()=>{let e=String(++tb);return o(e),()=>t.deleteBlocker(e)},[t]),p.useEffect(()=>{""!==a&&t.getBlocker(a,i)},[t,a,i]),a&&n.blockers.has(a)?n.blockers.get(a):es}let tE={},tS=p.startTransition;function tx(e){let{basename:t,children:r,initialEntries:n,initialIndex:a,future:o}=e,i=p.useRef();null==i.current&&(i.current=b({initialEntries:n,initialIndex:a,v5Compat:!0}));let l=i.current,[s,u]=p.useState({action:l.action,location:l.location}),{v7_startTransition:c}=o||{},d=p.useCallback(e=>{c&&tS?tS(()=>u(e)):u(e)},[u,c]);return p.useLayoutEffect(()=>l.listen(d),[l,d]),p.createElement(tD,{basename:t,children:r,location:s.location,navigationType:s.action,navigator:l,future:o})}function tR(e){let{to:t,replace:r,state:n,relative:a}=e;eG()||S(!1);let{future:o,static:i}=p.useContext(eK),{matches:l}=p.useContext(eq),{pathname:s}=eQ(),u=e7(),c=JSON.stringify(H(t,z(l,o.v7_relativeSplatPath),s,"path"===a));return p.useEffect(()=>u(JSON.parse(c),{replace:r,state:n,relative:a}),[u,c,a,r,n]),null}function tC(e){return e3(e.context)}function tP(e){S(!1)}function tD(e){let{basename:t="/",children:r=null,location:n,navigationType:a=c.Pop,navigator:o,static:i=!1,future:l}=e;eG()&&S(!1);let s=t.replace(/^\/*/,"/"),u=p.useMemo(()=>({basename:s,navigator:o,static:i,future:eH({v7_relativeSplatPath:!1},l)}),[s,l,o,i]);"string"==typeof n&&(n=D(n));let{pathname:d="/",search:h="",hash:f="",state:m=null,key:v="default"}=n,y=p.useMemo(()=>{let e=F(d,s);return null==e?null:{location:{pathname:e,search:h,hash:f,state:m,key:v},navigationType:a}},[s,d,h,f,m,v,a]);return null==y?null:p.createElement(eK.Provider,{value:u},p.createElement(eV.Provider,{children:r,value:y}))}function tL(e){let{children:t,location:r}=e;return e6(tj(t),r)}function tk(e){let{children:t,errorElement:r,resolve:n}=e;return p.createElement(tU,{resolve:n,errorElement:r},p.createElement(tA,null,t))}var t_=((l=t_||{})[l.pending=0]="pending",l[l.success=1]="success",l[l.error=2]="error",l);let tT=new Promise(()=>{});class tU extends p.Component{constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error("<Await> caught the following error during render",e,t)}render(){let{children:e,errorElement:t,resolve:r}=this.props,n=null,a=t_.pending;if(r instanceof Promise)if(this.state.error){a=t_.error;let e=this.state.error;Object.defineProperty(n=Promise.reject().catch(()=>{}),"_tracked",{get:()=>!0}),Object.defineProperty(n,"_error",{get:()=>e})}else r._tracked?a=void 0!==(n=r)._error?t_.error:void 0!==n._data?t_.success:t_.pending:(a=t_.pending,Object.defineProperty(r,"_tracked",{get:()=>!0}),n=r.then(e=>Object.defineProperty(r,"_data",{get:()=>e}),e=>Object.defineProperty(r,"_error",{get:()=>e})));else a=t_.success,Object.defineProperty(n=Promise.resolve(),"_tracked",{get:()=>!0}),Object.defineProperty(n,"_data",{get:()=>r});if(a===t_.error&&n._error instanceof q)throw tT;if(a===t_.error&&!t)throw n._error;if(a===t_.error)return p.createElement(eJ.Provider,{value:n,children:t});if(a===t_.success)return p.createElement(eJ.Provider,{value:n,children:e});throw n}}function tA(e){let{children:t}=e,r=ty(),n="function"==typeof t?t(r):t;return p.createElement(p.Fragment,null,n)}function tj(e,t){void 0===t&&(t=[]);let r=[];return p.Children.forEach(e,(e,n)=>{if(!p.isValidElement(e))return;let a=[...t,n];if(e.type===p.Fragment)return void r.push.apply(r,tj(e.props.children,a));e.type!==tP&&S(!1),e.props.index&&e.props.children&&S(!1);let o={id:e.props.id||a.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(o.children=tj(e.props.children,a)),r.push(o)}),r}function tM(e){return tn(e)}function tO(e){let t={hasErrorBoundary:null!=e.ErrorBoundary||null!=e.errorElement};return e.Component&&Object.assign(t,{element:p.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:p.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:p.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}function tF(e,t){return eh({basename:null==t?void 0:t.basename,future:eH({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:b({initialEntries:null==t?void 0:t.initialEntries,initialIndex:null==t?void 0:t.initialIndex}),hydrationData:null==t?void 0:t.hydrationData,routes:e,mapRouteProperties:tO}).initialize()}function tN(){return(tN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function tB(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}let tI="application/x-www-form-urlencoded";function tz(e){return null!=e&&"string"==typeof e.tagName}function tH(e){return void 0===e&&(e=""),new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(e=>[r,e]):[[r,n]])},[]))}let tW=null,t$=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function tJ(e){return null==e||t$.has(e)?e:null}let tK=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],tV=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],tq=["fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","unstable_viewTransition"];try{window.__reactRouterVersion="6"}catch(e){}function tY(e,t){return eh({basename:null==t?void 0:t.basename,future:tN({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:w({window:null==t?void 0:t.window}),hydrationData:(null==t?void 0:t.hydrationData)||tG(),routes:e,mapRouteProperties:tO,window:null==t?void 0:t.window}).initialize()}function tX(e,t){return eh({basename:null==t?void 0:t.basename,future:tN({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:E({window:null==t?void 0:t.window}),hydrationData:(null==t?void 0:t.hydrationData)||tG(),routes:e,mapRouteProperties:tO,window:null==t?void 0:t.window}).initialize()}function tG(){var e;let t=null==(e=window)?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=tN({},t,{errors:function(e){if(!e)return null;let t=Object.entries(e),r={};for(let[e,n]of t)if(n&&"RouteErrorResponse"===n.__type)r[e]=new Z(n.status,n.statusText,n.data,!0===n.internal);else if(n&&"Error"===n.__type){if(n.__subType){let t=window[n.__subType];if("function"==typeof t)try{let a=new t(n.message);a.stack="",r[e]=a}catch(e){}}if(null==r[e]){let t=Error(n.message);t.stack="",r[e]=t}}else r[e]=n;return r}(t.errors)})),t}let tQ=p.createContext({isTransitioning:!1}),tZ=p.createContext(new Map),t0=p.startTransition,t1=v.flushSync,t7=p.useId;function t4(e){t1?t1(e):e()}class t2{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=t=>{"pending"===this.status&&(this.status="resolved",e(t))},this.reject=e=>{"pending"===this.status&&(this.status="rejected",t(e))}})}}function t3(e){let{fallbackElement:t,router:r,future:n}=e,[a,o]=p.useState(r.state),[i,l]=p.useState(),[s,u]=p.useState({isTransitioning:!1}),[c,d]=p.useState(),[h,f]=p.useState(),[m,v]=p.useState(),y=p.useRef(new Map),{v7_startTransition:g}=n||{},b=p.useCallback(e=>{if(g)t0?t0(e):e();else e()},[g]),w=p.useCallback((e,t)=>{let{deletedFetchers:n,unstable_flushSync:a,unstable_viewTransitionOpts:i}=t;n.forEach(e=>y.current.delete(e)),e.fetchers.forEach((e,t)=>{void 0!==e.data&&y.current.set(t,e.data)});let s=null==r.window||"function"!=typeof r.window.document.startViewTransition;if(!i||s)return void(a?t4(()=>o(e)):b(()=>o(e)));if(a){t4(()=>{h&&(c&&c.resolve(),h.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:i.currentLocation,nextLocation:i.nextLocation})});let t=r.window.document.startViewTransition(()=>{t4(()=>o(e))});t.finished.finally(()=>{t4(()=>{d(void 0),f(void 0),l(void 0),u({isTransitioning:!1})})}),t4(()=>f(t));return}h?(c&&c.resolve(),h.skipTransition(),v({state:e,currentLocation:i.currentLocation,nextLocation:i.nextLocation})):(l(e),u({isTransitioning:!0,flushSync:!1,currentLocation:i.currentLocation,nextLocation:i.nextLocation}))},[r.window,h,c,y,b]);p.useLayoutEffect(()=>r.subscribe(w),[r,w]),p.useEffect(()=>{s.isTransitioning&&!s.flushSync&&d(new t2)},[s]),p.useEffect(()=>{if(c&&i&&r.window){let e=c.promise,t=r.window.document.startViewTransition(async()=>{b(()=>o(i)),await e});t.finished.finally(()=>{d(void 0),f(void 0),l(void 0),u({isTransitioning:!1})}),f(t)}},[b,i,c,r.window]),p.useEffect(()=>{c&&i&&a.location.key===i.location.key&&c.resolve()},[c,h,a.location,i]),p.useEffect(()=>{!s.isTransitioning&&m&&(l(m.state),u({isTransitioning:!0,flushSync:!1,currentLocation:m.currentLocation,nextLocation:m.nextLocation}),v(void 0))},[s.isTransitioning,m]),p.useEffect(()=>{},[]);let E=p.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:e=>r.navigate(e),push:(e,t,n)=>r.navigate(e,{state:t,preventScrollReset:null==n?void 0:n.preventScrollReset}),replace:(e,t,n)=>r.navigate(e,{replace:!0,state:t,preventScrollReset:null==n?void 0:n.preventScrollReset})}),[r]),S=r.basename||"/",x=p.useMemo(()=>({router:r,navigator:E,static:!1,basename:S}),[r,E,S]);return p.createElement(p.Fragment,null,p.createElement(eW.Provider,{value:x},p.createElement(e$.Provider,{value:a},p.createElement(tZ.Provider,{value:y.current},p.createElement(tQ.Provider,{value:s},p.createElement(tD,{basename:S,location:a.location,navigationType:a.historyAction,navigator:E,future:{v7_relativeSplatPath:r.future.v7_relativeSplatPath}},a.initialized||r.future.v7_partialHydration?p.createElement(t5,{routes:r.routes,future:r.future,state:a}):t))))),null)}function t5(e){let{routes:t,future:r,state:n}=e;return e6(t,void 0,n,r)}function t8(e){let{basename:t,children:r,future:n,window:a}=e,o=p.useRef();null==o.current&&(o.current=w({window:a,v5Compat:!0}));let i=o.current,[l,s]=p.useState({action:i.action,location:i.location}),{v7_startTransition:u}=n||{},c=p.useCallback(e=>{u&&t0?t0(()=>s(e)):s(e)},[s,u]);return p.useLayoutEffect(()=>i.listen(c),[i,c]),p.createElement(tD,{basename:t,children:r,location:l.location,navigationType:l.action,navigator:i,future:n})}function t9(e){let{basename:t,children:r,future:n,window:a}=e,o=p.useRef();null==o.current&&(o.current=E({window:a,v5Compat:!0}));let i=o.current,[l,s]=p.useState({action:i.action,location:i.location}),{v7_startTransition:u}=n||{},c=p.useCallback(e=>{u&&t0?t0(()=>s(e)):s(e)},[s,u]);return p.useLayoutEffect(()=>i.listen(c),[i,c]),p.createElement(tD,{basename:t,children:r,location:l.location,navigationType:l.action,navigator:i,future:n})}function t6(e){let{basename:t,children:r,future:n,history:a}=e,[o,i]=p.useState({action:a.action,location:a.location}),{v7_startTransition:l}=n||{},s=p.useCallback(e=>{l&&t0?t0(()=>i(e)):i(e)},[i,l]);return p.useLayoutEffect(()=>a.listen(s),[a,s]),p.createElement(tD,{basename:t,children:r,location:o.location,navigationType:o.action,navigator:a,future:n})}let re="u">typeof window&&void 0!==window.document&&void 0!==window.document.createElement,rt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,rr=p.forwardRef(function(e,t){let r,{onClick:n,relative:a,reloadDocument:o,replace:i,state:l,target:s,to:u,preventScrollReset:c,unstable_viewTransition:d}=e,h=tB(e,tK),{basename:f}=p.useContext(eK),m=!1;if("string"==typeof u&&rt.test(u)&&(r=u,re))try{let e=new URL(window.location.href),t=new URL(u.startsWith("//")?e.protocol+u:u),r=F(t.pathname,f);t.origin===e.origin&&null!=r?u=r+t.search+t.hash:m=!0}catch(e){}let v=eX(u,{relative:a}),y=rs(u,{replace:i,state:l,target:s,preventScrollReset:c,relative:a,unstable_viewTransition:d});return p.createElement("a",tN({},h,{href:r||v,onClick:m||o?n:function(e){n&&n(e),e.defaultPrevented||y(e)},ref:t,target:s}))}),rn=p.forwardRef(function(e,t){let r,{"aria-current":n="page",caseSensitive:a=!1,className:o="",end:i=!1,style:l,to:s,unstable_viewTransition:u,children:c}=e,d=tB(e,tV),h=e8(s,{relative:d.relative}),f=eQ(),m=p.useContext(e$),{navigator:v,basename:y}=p.useContext(eK),g=null!=m&&rE(h)&&!0===u,b=v.encodeLocation?v.encodeLocation(h).pathname:h.pathname,w=f.pathname,E=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;a||(w=w.toLowerCase(),E=E?E.toLowerCase():null,b=b.toLowerCase()),E&&y&&(E=F(E,y)||E);let S="/"!==b&&b.endsWith("/")?b.length-1:b.length,x=w===b||!i&&w.startsWith(b)&&"/"===w.charAt(S),R=null!=E&&(E===b||!i&&E.startsWith(b)&&"/"===E.charAt(b.length)),C={isActive:x,isPending:R,isTransitioning:g},P=x?n:void 0;r="function"==typeof o?o(C):[o,x?"active":null,R?"pending":null,g?"transitioning":null].filter(Boolean).join(" ");let D="function"==typeof l?l(C):l;return p.createElement(rr,tN({},d,{"aria-current":P,className:r,ref:t,style:D,to:s,unstable_viewTransition:u}),"function"==typeof c?c(C):c)}),ra=p.forwardRef((e,t)=>{let{fetcherKey:r,navigate:n,reloadDocument:a,replace:o,state:i,method:l="get",action:s,onSubmit:u,relative:c,preventScrollReset:d,unstable_viewTransition:h}=e,f=tB(e,tq),m=rh(),v=rf(s,{relative:c}),y="get"===l.toLowerCase()?"get":"post";return p.createElement("form",tN({ref:t,method:y,action:v,onSubmit:a?u:e=>{if(u&&u(e),e.defaultPrevented)return;e.preventDefault();let t=e.nativeEvent.submitter,a=(null==t?void 0:t.getAttribute("formmethod"))||l;m(t||e.currentTarget,{fetcherKey:r,method:a,navigate:n,replace:o,state:i,relative:c,preventScrollReset:d,unstable_viewTransition:h})}},f))});function ro(e){let{getKey:t,storageKey:r}=e;return rg({getKey:t,storageKey:r}),null}function ri(e){let t=p.useContext(eW);return t||S(!1),t}function rl(e){let t=p.useContext(e$);return t||S(!1),t}function rs(e,t){let{target:r,replace:n,state:a,preventScrollReset:o,relative:i,unstable_viewTransition:l}=void 0===t?{}:t,s=e7(),u=eQ(),c=e8(e,{relative:i});return p.useCallback(t=>{0!==t.button||r&&"_self"!==r||t.metaKey||t.altKey||t.ctrlKey||t.shiftKey||(t.preventDefault(),s(e,{replace:void 0!==n?n:P(u)===P(c),state:a,preventScrollReset:o,relative:i,unstable_viewTransition:l}))},[u,s,c,n,a,r,e,o,i,l])}function ru(e){let t=p.useRef(tH(e)),r=p.useRef(!1),n=eQ(),a=p.useMemo(()=>{var e,a;let o;return e=n.search,a=r.current?null:t.current,o=tH(e),a&&a.forEach((e,t)=>{o.has(t)||a.getAll(t).forEach(e=>{o.append(t,e)})}),o},[n.search]),o=e7(),i=p.useCallback((e,t)=>{let n=tH("function"==typeof e?e(a):e);r.current=!0,o("?"+n,t)},[o,a]);return[a,i]}(s=h||(h={})).UseScrollRestoration="useScrollRestoration",s.UseSubmit="useSubmit",s.UseSubmitFetcher="useSubmitFetcher",s.UseFetcher="useFetcher",s.useViewTransitionState="useViewTransitionState",(u=f||(f={})).UseFetcher="useFetcher",u.UseFetchers="useFetchers",u.UseScrollRestoration="useScrollRestoration";let rc=0,rd=()=>"__"+String(++rc)+"__";function rh(){let{router:e}=ri(h.UseSubmit),{basename:t}=p.useContext(eK),r=tu();return p.useCallback(function(n,a){if(void 0===a&&(a={}),"u"<typeof document)throw Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.");let{action:o,method:i,encType:l,formData:s,body:u}=function(e,t){let r,n,a,o,i;if(tz(e)&&"form"===e.tagName.toLowerCase()){let i=e.getAttribute("action");n=i?F(i,t):null,r=e.getAttribute("method")||"get",a=tJ(e.getAttribute("enctype"))||tI,o=new FormData(e)}else if(tz(e)&&"button"===e.tagName.toLowerCase()||tz(e)&&"input"===e.tagName.toLowerCase()&&("submit"===e.type||"image"===e.type)){let i=e.form;if(null==i)throw Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||i.getAttribute("action");if(n=l?F(l,t):null,r=e.getAttribute("formmethod")||i.getAttribute("method")||"get",a=tJ(e.getAttribute("formenctype"))||tJ(i.getAttribute("enctype"))||tI,o=new FormData(i,e),!function(){if(null===tW)try{new FormData(document.createElement("form"),0),tW=!1}catch(e){tW=!0}return tW}()){let{name:t,type:r,value:n}=e;if("image"===r){let e=t?t+".":"";o.append(e+"x","0"),o.append(e+"y","0")}else t&&o.append(t,n)}}else if(tz(e))throw Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');else r="get",n=null,a=tI,i=e;return o&&"text/plain"===a&&(i=o,o=void 0),{action:n,method:r.toLowerCase(),encType:a,formData:o,body:i}}(n,t);if(!1===a.navigate){let t=a.fetcherKey||rd();e.fetch(t,r,a.action||o,{preventScrollReset:a.preventScrollReset,formData:s,body:u,formMethod:a.method||i,formEncType:a.encType||l,unstable_flushSync:a.unstable_flushSync})}else e.navigate(a.action||o,{preventScrollReset:a.preventScrollReset,formData:s,body:u,formMethod:a.method||i,formEncType:a.encType||l,replace:a.replace,state:a.state,fromRouteId:r,unstable_flushSync:a.unstable_flushSync,unstable_viewTransition:a.unstable_viewTransition})},[e,t,r])}function rf(e,t){let{relative:r}=void 0===t?{}:t,{basename:n}=p.useContext(eK),a=p.useContext(eq);a||S(!1);let[o]=a.matches.slice(-1),i=tN({},e8(e||".",{relative:r})),l=eQ();if(null==e){i.search=l.search;let e=new URLSearchParams(i.search);e.has("index")&&""===e.get("index")&&(e.delete("index"),i.search=e.toString()?"?"+e.toString():"")}return(!e||"."===e)&&o.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),"/"!==n&&(i.pathname="/"===i.pathname?n:W([n,i.pathname])),P(i)}function rp(e){var t;let{key:r}=void 0===e?{}:e,{router:n}=ri(h.UseFetcher),a=rl(f.UseFetcher),o=p.useContext(tZ),i=p.useContext(eq),l=null==(t=i.matches[i.matches.length-1])?void 0:t.route.id;o||S(!1),i||S(!1),null==l&&S(!1);let s=t7?t7():"",[u,c]=p.useState(r||s);r&&r!==u?c(r):u||c(rd()),p.useEffect(()=>(n.getFetcher(u),()=>{n.deleteFetcher(u)}),[n,u]);let d=p.useCallback((e,t)=>{l||S(!1),n.fetch(u,l,e,t)},[u,l,n]),m=rh(),v=p.useCallback((e,t)=>{m(e,tN({},t,{navigate:!1,fetcherKey:u}))},[u,m]),y=p.useMemo(()=>p.forwardRef((e,t)=>p.createElement(ra,tN({},e,{navigate:!1,fetcherKey:u,ref:t}))),[u]),g=a.fetchers.get(u)||el,b=o.get(u);return p.useMemo(()=>tN({Form:y,submit:v,load:d},g,{data:b}),[y,v,d,g,b])}function rm(){return Array.from(rl(f.UseFetchers).fetchers.entries()).map(e=>{let[t,r]=e;return tN({},r,{key:t})})}let rv="react-router-scroll-positions",ry={};function rg(e){let{getKey:t,storageKey:r}=void 0===e?{}:e,{router:n}=ri(h.UseScrollRestoration),{restoreScrollPosition:a,preventScrollReset:o}=rl(f.UseScrollRestoration),{basename:i}=p.useContext(eK),l=eQ(),s=th(),u=tc();p.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),function(e){let{capture:t}={};p.useEffect(()=>{let r=null!=t?{capture:t}:void 0;return window.addEventListener("pagehide",e,r),()=>{window.removeEventListener("pagehide",e,r)}},[e,t])}(p.useCallback(()=>{"idle"===u.state&&(ry[(t?t(l,s):null)||l.key]=window.scrollY);try{sessionStorage.setItem(r||rv,JSON.stringify(ry))}catch(e){}window.history.scrollRestoration="auto"},[r,t,u.state,l,s])),"u">typeof document&&(p.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(r||rv);e&&(ry=JSON.parse(e))}catch(e){}},[r]),p.useLayoutEffect(()=>{let e=t&&"/"!==i?(e,r)=>t(tN({},e,{pathname:F(e.pathname,i)||e.pathname}),r):t,r=null==n?void 0:n.enableScrollRestoration(ry,()=>window.scrollY,e);return()=>r&&r()},[n,i,t]),p.useLayoutEffect(()=>{if(!1!==a){if("number"==typeof a)return void window.scrollTo(0,a);if(l.hash){let e=document.getElementById(decodeURIComponent(l.hash.slice(1)));if(e)return void e.scrollIntoView()}!0!==o&&window.scrollTo(0,0)}},[l,a,o]))}function rb(e,t){let{capture:r}=t||{};p.useEffect(()=>{let t=null!=r?{capture:r}:void 0;return window.addEventListener("beforeunload",e,t),()=>{window.removeEventListener("beforeunload",e,t)}},[e,r])}function rw(e){let{when:t,message:r}=e,n=tw(t);p.useEffect(()=>{"blocked"===n.state&&(window.confirm(r)?setTimeout(n.proceed,0):n.reset())},[n,r]),p.useEffect(()=>{"blocked"!==n.state||t||n.reset()},[n,t])}function rE(e,t){void 0===t&&(t={});let r=p.useContext(tQ);null==r&&S(!1);let{basename:n}=ri(h.useViewTransitionState),a=e8(e,{relative:t.relative});if(!r.isTransitioning)return!1;let o=F(r.currentLocation.pathname,n)||r.currentLocation.pathname,i=F(r.nextLocation.pathname,n)||r.nextLocation.pathname;return null!=O(a.pathname,i)||null!=O(a.pathname,o)}}}]);
|
|
1
|
+
"use strict";(globalThis.webpackChunk_pih_esm_audit_app=globalThis.webpackChunk_pih_esm_audit_app||[]).push([["712"],{7059(e,t,r){r.r(t),r.d(t,{useFetchers:()=>rm,unstable_HistoryRouter:()=>t6,useLoaderData:()=>tf,ScrollRestoration:()=>ro,Route:()=>tP,MemoryRouter:()=>tx,useMatches:()=>th,redirect:()=>G,useOutletContext:()=>e2,createRoutesFromElements:()=>tj,useLinkClickHandler:()=>rs,useRouteError:()=>tv,generatePath:()=>M,useHref:()=>eX,useParams:()=>e5,useRoutes:()=>e9,UNSAFE_ViewTransitionContext:()=>tQ,useSubmit:()=>rh,Navigate:()=>tR,UNSAFE_NavigationContext:()=>eK,useAsyncError:()=>tg,UNSAFE_FetchersContext:()=>tZ,createRoutesFromChildren:()=>tj,unstable_usePrompt:()=>rw,useFetcher:()=>rp,useBlocker:()=>tw,createHashRouter:()=>tX,UNSAFE_useRouteId:()=>tu,useMatch:()=>e0,useNavigation:()=>tc,HashRouter:()=>t9,useFormAction:()=>rf,useResolvedPath:()=>e8,defer:()=>X,Router:()=>tD,Routes:()=>tL,useActionData:()=>tm,useRouteLoaderData:()=>tp,Await:()=>tk,matchPath:()=>O,UNSAFE_DataRouterContext:()=>eW,BrowserRouter:()=>t8,NavigationType:()=>c,Form:()=>ra,UNSAFE_RouteContext:()=>eq,createSearchParams:()=>tH,RouterProvider:()=>t3,UNSAFE_LocationContext:()=>eV,parsePath:()=>D,Outlet:()=>tC,createMemoryRouter:()=>tF,UNSAFE_useScrollRestoration:()=>rg,useNavigate:()=>e7,matchRoutes:()=>T,createPath:()=>P,resolvePath:()=>N,useInRouterContext:()=>eG,useOutlet:()=>e3,useAsyncValue:()=>ty,Link:()=>rr,AbortedDeferredError:()=>q,renderMatches:()=>tM,NavLink:()=>rn,UNSAFE_DataRouterStateContext:()=>e$,json:()=>V,useSearchParams:()=>ru,redirectDocument:()=>Q,useBeforeUnload:()=>rb,unstable_useViewTransitionState:()=>rE,createBrowserRouter:()=>tY,isRouteErrorResponse:()=>ee,useLocation:()=>eQ,useNavigationType:()=>eZ,useRevalidator:()=>td});var n,a,o,i,l,s,u,c,d,h,f,p=r(9485),m=r(3144),v=r.t(m,2);function y(){return(y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}(n=c||(c={})).Pop="POP",n.Push="PUSH",n.Replace="REPLACE";let g="popstate";function b(e){let t;void 0===e&&(e={});let{initialEntries:r=["/"],initialIndex:n,v5Compat:a=!1}=e;t=r.map((e,t)=>u(e,"string"==typeof e?null:e.state,0===t?"default":void 0));let o=s(null==n?t.length-1:n),i=c.Pop,l=null;function s(e){return Math.min(Math.max(e,0),t.length-1)}function u(e,r,n){void 0===r&&(r=null);let a=C(t?t[o].pathname:"/",e,r,n);return x("/"===a.pathname.charAt(0),"relative pathnames are not supported in memory history: "+JSON.stringify(e)),a}function d(e){return"string"==typeof e?e:P(e)}return{get index(){return o},get action(){return i},get location(){return t[o]},createHref:d,createURL:e=>new URL(d(e),"http://localhost"),encodeLocation(e){let t="string"==typeof e?D(e):e;return{pathname:t.pathname||"",search:t.search||"",hash:t.hash||""}},push(e,r){i=c.Push;let n=u(e,r);o+=1,t.splice(o,t.length,n),a&&l&&l({action:i,location:n,delta:1})},replace(e,r){i=c.Replace;let n=u(e,r);t[o]=n,a&&l&&l({action:i,location:n,delta:0})},go(e){i=c.Pop;let r=s(o+e),n=t[r];o=r,l&&l({action:i,location:n,delta:e})},listen:e=>(l=e,()=>{l=null})}}function w(e){return void 0===e&&(e={}),L(function(e,t){let{pathname:r,search:n,hash:a}=e.location;return C("",{pathname:r,search:n,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){return"string"==typeof t?t:P(t)},null,e)}function E(e){return void 0===e&&(e={}),L(function(e,t){let{pathname:r="/",search:n="",hash:a=""}=D(e.location.hash.substr(1));return r.startsWith("/")||r.startsWith(".")||(r="/"+r),C("",{pathname:r,search:n,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){let r=e.document.querySelector("base"),n="";if(r&&r.getAttribute("href")){let t=e.location.href,r=t.indexOf("#");n=-1===r?t:t.slice(0,r)}return n+"#"+("string"==typeof t?t:P(t))},function(e,t){x("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")},e)}function S(e,t){if(!1===e||null==e)throw Error(t)}function x(e,t){if(!e){"u">typeof console&&console.warn(t);try{throw Error(t)}catch(e){}}}function R(e,t){return{usr:e.state,key:e.key,idx:t}}function C(e,t,r,n){return void 0===r&&(r=null),y({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?D(t):t,{state:r,key:t&&t.key||n||Math.random().toString(36).substr(2,8)})}function P(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&"?"!==r&&(t+="?"===r.charAt(0)?r:"?"+r),n&&"#"!==n&&(t+="#"===n.charAt(0)?n:"#"+n),t}function D(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function L(e,t,r,n){void 0===n&&(n={});let{window:a=document.defaultView,v5Compat:o=!1}=n,i=a.history,l=c.Pop,s=null,u=d();function d(){return(i.state||{idx:null}).idx}function h(){l=c.Pop;let e=d(),t=null==e?null:e-u;u=e,s&&s({action:l,location:p.location,delta:t})}function f(e){let t="null"!==a.location.origin?a.location.origin:a.location.href,r="string"==typeof e?e:P(e);return S(t,"No window.location.(origin|href) available to create URL for href: "+(r=r.replace(/ $/,"%20"))),new URL(r,t)}null==u&&(u=0,i.replaceState(y({},i.state,{idx:u}),""));let p={get action(){return l},get location(){return e(a,i)},listen(e){if(s)throw Error("A history only accepts one active listener");return a.addEventListener(g,h),s=e,()=>{a.removeEventListener(g,h),s=null}},createHref:e=>t(a,e),createURL:f,encodeLocation(e){let t=f(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){l=c.Push;let n=C(p.location,e,t);r&&r(n,e);let h=R(n,u=d()+1),f=p.createHref(n);try{i.pushState(h,"",f)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;a.location.assign(f)}o&&s&&s({action:l,location:p.location,delta:1})},replace:function(e,t){l=c.Replace;let n=C(p.location,e,t);r&&r(n,e);let a=R(n,u=d()),h=p.createHref(n);i.replaceState(a,"",h),o&&s&&s({action:l,location:p.location,delta:0})},go:e=>i.go(e)};return p}(a=d||(d={})).data="data",a.deferred="deferred",a.redirect="redirect",a.error="error";let k=new Set(["lazy","caseSensitive","path","id","index","children"]);function _(e,t,r,n){return void 0===r&&(r=[]),void 0===n&&(n={}),e.map((e,a)=>{let o=[...r,a],i="string"==typeof e.id?e.id:o.join("-");if(S(!0!==e.index||!e.children,"Cannot specify children on an index route"),S(!n[i],'Found a route id collision on id "'+i+"\". Route id's must be globally unique within Data Router usages"),!0===e.index){let r=y({},e,t(e),{id:i});return n[i]=r,r}{let r=y({},e,t(e),{id:i,children:void 0});return n[i]=r,e.children&&(r.children=_(e.children,t,o,n)),r}})}function T(e,t,r){void 0===r&&(r="/");let n=F(("string"==typeof t?D(t):t).pathname||"/",r);if(null==n)return null;let a=function e(t,r,n,a){void 0===r&&(r=[]),void 0===n&&(n=[]),void 0===a&&(a="");let o=(t,o,i)=>{var l,s;let u,c,d={relativePath:void 0===i?t.path||"":i,caseSensitive:!0===t.caseSensitive,childrenIndex:o,route:t};d.relativePath.startsWith("/")&&(S(d.relativePath.startsWith(a),'Absolute route path "'+d.relativePath+'" nested under path "'+a+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),d.relativePath=d.relativePath.slice(a.length));let h=W([a,d.relativePath]),f=n.concat(d);t.children&&t.children.length>0&&(S(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+h+'".'),e(t.children,r,f,h)),(null!=t.path||t.index)&&r.push({path:h,score:(l=h,s=t.index,c=(u=l.split("/")).length,u.some(j)&&(c+=-2),s&&(c+=2),u.filter(e=>!j(e)).reduce((e,t)=>e+(A.test(t)?3:""===t?1:10),c)),routesMeta:f})};return t.forEach((e,t)=>{var r;if(""!==e.path&&null!=(r=e.path)&&r.includes("?"))for(let r of function e(t){let r=t.split("/");if(0===r.length)return[];let[n,...a]=r,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(0===a.length)return o?[i,""]:[i];let l=e(a.join("/")),s=[];return s.push(...l.map(e=>""===e?i:[i,e].join("/"))),o&&s.push(...l),s.map(e=>t.startsWith("/")&&""===e?"/":e)}(e.path))o(e,t,r);else o(e,t)}),r}(e);a.sort((e,t)=>{var r,n;return e.score!==t.score?t.score-e.score:(r=e.routesMeta.map(e=>e.childrenIndex),n=t.routesMeta.map(e=>e.childrenIndex),r.length===n.length&&r.slice(0,-1).every((e,t)=>e===n[t])?r[r.length-1]-n[n.length-1]:0)});let o=null;for(let e=0;null==o&&e<a.length;++e){let t=function(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return x(!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}}(n);o=function(e,t){let{routesMeta:r}=e,n={},a="/",o=[];for(let e=0;e<r.length;++e){let i=r[e],l=e===r.length-1,s="/"===a?t:t.slice(a.length)||"/",u=O({path:i.relativePath,caseSensitive:i.caseSensitive,end:l},s);if(!u)return null;Object.assign(n,u.params);let c=i.route;o.push({params:n,pathname:W([a,u.pathname]),pathnameBase:$(W([a,u.pathnameBase])),route:c}),"/"!==u.pathnameBase&&(a=W([a,u.pathnameBase]))}return o}(a[e],t)}return o}function U(e,t){let{route:r,pathname:n,params:a}=e;return{id:r.id,pathname:n,params:a,data:t[r.id],handle:r.handle}}let A=/^:[\w-]+$/,j=e=>"*"===e;function M(e,t){void 0===t&&(t={});let r=e;r.endsWith("*")&&"*"!==r&&!r.endsWith("/*")&&(x(!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(/\*$/,"/*"));let n=r.startsWith("/")?"/":"",a=e=>null==e?"":"string"==typeof e?e:String(e);return n+r.split(/\/+/).map((e,r,n)=>{if(r===n.length-1&&"*"===e)return a(t["*"]);let o=e.match(/^:([\w-]+)(\??)$/);if(o){let[,e,r]=o,n=t[e];return S("?"===r||null!=n,'Missing ":'+e+'" param'),a(n)}return e.replace(/\?$/g,"")}).filter(e=>!!e).join("/")}function O(e,t){var r,n,a;let o,i;"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[l,s]=(r=e.path,n=e.caseSensitive,a=e.end,void 0===n&&(n=!1),void 0===a&&(a=!0),x("*"===r||!r.endsWith("*")||r.endsWith("/*"),'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(/\*$/,"/*")+'".'),o=[],i="^"+r.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,r)=>(o.push({paramName:t,isOptional:null!=r}),r?"/?([^\\/]+)?":"/([^\\/]+)")),r.endsWith("*")?(o.push({paramName:"*"}),i+="*"===r||"/*"===r?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?i+="\\/*$":""!==r&&"/"!==r&&(i+="(?:(?=\\/|$))"),[new RegExp(i,n?void 0:"i"),o]),u=t.match(l);if(!u)return null;let c=u[0],d=c.replace(/(.)\/+$/,"$1"),h=u.slice(1);return{params:s.reduce((e,t,r)=>{let{paramName:n,isOptional:a}=t;if("*"===n){let e=h[r]||"";d=c.slice(0,c.length-e.length).replace(/(.)\/+$/,"$1")}let o=h[r];return a&&!o?e[n]=void 0:e[n]=(o||"").replace(/%2F/g,"/"),e},{}),pathname:c,pathnameBase:d,pattern:e}}function F(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&"/"!==n?null:e.slice(r)||"/"}function N(e,t){var r;let n;void 0===t&&(t="/");let{pathname:a,search:o="",hash:i=""}="string"==typeof e?D(e):e;return{pathname:a?a.startsWith("/")?a:(r=a,n=t.replace(/\/+$/,"").split("/"),r.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"):t,search:J(o),hash:K(i)}}function B(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field [")+JSON.stringify(n)+"]. 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 I(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}function z(e,t){let r=I(e);return t?r.map((t,r)=>r===e.length-1?t.pathname:t.pathnameBase):r.map(e=>e.pathnameBase)}function H(e,t,r,n){let a,o;void 0===n&&(n=!1),"string"==typeof e?a=D(e):(S(!(a=y({},e)).pathname||!a.pathname.includes("?"),B("?","pathname","search",a)),S(!a.pathname||!a.pathname.includes("#"),B("#","pathname","hash",a)),S(!a.search||!a.search.includes("#"),B("#","search","hash",a)));let i=""===e||""===a.pathname,l=i?"/":a.pathname;if(null==l)o=r;else{let e=t.length-1;if(!n&&l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;a.pathname=t.join("/")}o=e>=0?t[e]:"/"}let s=N(a,o),u=l&&"/"!==l&&l.endsWith("/"),c=(i||"."===l)&&r.endsWith("/");return!s.pathname.endsWith("/")&&(u||c)&&(s.pathname+="/"),s}let W=e=>e.join("/").replace(/\/\/+/g,"/"),$=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),J=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",K=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",V=function(e,t){void 0===t&&(t={});let r="number"==typeof t?{status:t}:t,n=new Headers(r.headers);return n.has("Content-Type")||n.set("Content-Type","application/json; charset=utf-8"),new Response(JSON.stringify(e),y({},r,{headers:n}))};class q extends Error{}class Y{constructor(e,t){let r;this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],S(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 n=()=>r(new q("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",n),this.controller.signal.addEventListener("abort",n),this.data=Object.entries(e).reduce((e,t)=>{let[r,n]=t;return Object.assign(e,{[r]:this.trackPromise(r,n)})},{}),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,n){if(this.controller.signal.aborted&&r instanceof q)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===n){let r=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===n?(Object.defineProperty(e,"_error",{get:()=>r}),this.emit(!1,t),Promise.reject(r)):(Object.defineProperty(e,"_data",{get:()=>n}),this.emit(!1,t),n)}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(n=>{e.removeEventListener("abort",r),(n||this.done)&&t(n)})})}return t}get done(){return 0===this.pendingKeysSet.size}get unwrappedData(){return S(null!==this.data&&this.done,"Can only unwrap data on initialized and settled deferreds"),Object.entries(this.data).reduce((e,t)=>{let[r,n]=t;return Object.assign(e,{[r]:function(e){if(!(e instanceof Promise&&!0===e._tracked))return e;if(e._error)throw e._error;return e._data}(n)})},{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}}let X=function(e,t){return void 0===t&&(t={}),new Y(e,"number"==typeof t?{status:t}:t)},G=function(e,t){void 0===t&&(t=302);let r=t;"number"==typeof r?r={status:r}:void 0===r.status&&(r.status=302);let n=new Headers(r.headers);return n.set("Location",e),new Response(null,y({},r,{headers:n}))},Q=(e,t)=>{let r=G(e,t);return r.headers.set("X-Remix-Reload-Document","true"),r};class Z{constructor(e,t,r,n){void 0===n&&(n=!1),this.status=e,this.statusText=t||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function ee(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}let et=["post","put","patch","delete"],er=new Set(et),en=new Set(["get",...et]),ea=new Set([301,302,303,307,308]),eo=new Set([307,308]),ei={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},el={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},es={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},eu=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ec=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),ed="remix-router-transitions";function eh(e){let t,r,n,a,o,i=e.window?e.window:"u">typeof window?window:void 0,l=void 0!==i&&void 0!==i.document&&void 0!==i.document.createElement,s=!l;if(S(e.routes.length>0,"You must provide a non-empty routes array to createRouter"),e.mapRouteProperties)t=e.mapRouteProperties;else if(e.detectErrorBoundary){let r=e.detectErrorBoundary;t=e=>({hasErrorBoundary:r(e)})}else t=ec;let u={},h=_(e.routes,t,void 0,u),f=e.basename||"/",p=y({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1},e.future),m=null,v=new Set,g=null,b=null,w=null,E=null!=e.hydrationData,R=T(h,e.history.location,f),P=null;if(null==R){let t=eD(404,{pathname:e.history.location.pathname}),{matches:r,route:n}=eP(h);R=r,P={[n.id]:t}}let D=R.some(e=>e.route.lazy),L=R.some(e=>e.route.loader);if(D)n=!1;else if(L)if(p.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=R.findIndex(e=>void 0!==r[e.route.id]);n=R.slice(0,e+1).every(a)}else n=R.every(a)}else n=null!=e.hydrationData;else n=!0;let k={historyAction:e.history.action,location:e.history.location,matches:R,initialized:n,navigation:ei,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||P,fetchers:new Map,blockers:new Map},A=c.Pop,j=!1,M=!1,O=new Map,N=null,B=!1,I=!1,z=[],H=[],W=new Map,$=0,J=-1,K=new Map,V=new Set,q=new Map,Y=new Map,X=new Set,G=new Map,Q=new Map,Z=!1;function ee(e,t){void 0===t&&(t={}),k=y({},k,e);let r=[],n=[];p.v7_fetcherPersist&&k.fetchers.forEach((e,t)=>{"idle"===e.state&&(X.has(t)?n.push(t):r.push(t))}),[...v].forEach(e=>e(k,{deletedFetchers:n,unstable_viewTransitionOpts:t.viewTransitionOpts,unstable_flushSync:!0===t.flushSync})),p.v7_fetcherPersist&&(r.forEach(e=>k.fetchers.delete(e)),n.forEach(e=>eW(e)))}function et(t,n,a){var o,i;let l,s,{flushSync:u}=void 0===a?{}:a,d=null!=k.actionData&&null!=k.navigation.formMethod&&eA(k.navigation.formMethod)&&"loading"===k.navigation.state&&(null==(o=t.state)?void 0:o._isRedirect)!==!0;l=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:d?k.actionData:null;let f=n.loaderData?eR(k.loaderData,n.loaderData,n.matches||[],n.errors):k.loaderData,p=k.blockers;p.size>0&&(p=new Map(p)).forEach((e,t)=>p.set(t,es));let m=!0===j||null!=k.navigation.formMethod&&eA(k.navigation.formMethod)&&(null==(i=t.state)?void 0:i._isRedirect)!==!0;if(r&&(h=r,r=void 0),B||A===c.Pop||(A===c.Push?e.history.push(t,t.state):A===c.Replace&&e.history.replace(t,t.state)),A===c.Pop){let e=O.get(k.location.pathname);e&&e.has(t.pathname)?s={currentLocation:k.location,nextLocation:t}:O.has(t.pathname)&&(s={currentLocation:t,nextLocation:k.location})}else if(M){let e=O.get(k.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),O.set(k.location.pathname,e)),s={currentLocation:k.location,nextLocation:t}}ee(y({},n,{actionData:l,loaderData:f,historyAction:A,location:t,initialized:!0,navigation:ei,revalidation:"idle",restoreScrollPosition:eZ(t,n.matches||k.matches),preventScrollReset:m,blockers:p}),{viewTransitionOpts:s,flushSync:!0===u}),A=c.Pop,j=!1,M=!1,B=!1,I=!1,z=[],H=[]}async function er(t,r){if("number"==typeof t)return void e.history.go(t);let n=ef(k.location,k.matches,f,p.v7_prependBasename,t,p.v7_relativeSplatPath,null==r?void 0:r.fromRouteId,null==r?void 0:r.relative),{path:a,submission:o,error:i}=ep(p.v7_normalizeFormMethod,!1,n,r),l=k.location,s=C(k.location,a,r&&r.state);s=y({},s,e.history.encodeLocation(s));let u=r&&null!=r.replace?r.replace:void 0,d=c.Push;!0===u?d=c.Replace:!1===u||null!=o&&eA(o.formMethod)&&o.formAction===k.location.pathname+k.location.search&&(d=c.Replace);let h=r&&"preventScrollReset"in r?!0===r.preventScrollReset:void 0,m=!0===(r&&r.unstable_flushSync),v=eX({currentLocation:l,nextLocation:s,historyAction:d});return v?void eY(v,{state:"blocked",location:s,proceed(){eY(v,{state:"proceeding",proceed:void 0,reset:void 0,location:s}),er(t,r)},reset(){let e=new Map(k.blockers);e.set(v,es),ee({blockers:e})}}):await en(d,s,{submission:o,pendingError:i,preventScrollReset:h,replace:r&&r.replace,enableViewTransition:r&&r.unstable_viewTransition,flushSync:m})}async function en(t,n,a){var i,l,s,u;let c,d;o&&o.abort(),o=null,A=t,B=!0===(a&&a.startUninterruptedRevalidation),i=k.location,l=k.matches,g&&w&&(g[eQ(i,l)]=w()),j=!0===(a&&a.preventScrollReset),M=!0===(a&&a.enableViewTransition);let p=r||h,m=a&&a.overrideNavigation,v=T(p,n,f),b=!0===(a&&a.flushSync);if(!v){let e=eD(404,{pathname:n.pathname}),{matches:t,route:r}=eP(p);eG(),et(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:b});return}if(k.initialized&&!I&&(s=k.location,u=n,s.pathname===u.pathname&&s.search===u.search&&(""===s.hash?""!==u.hash:s.hash===u.hash||""!==u.hash||!1))&&!(a&&a.submission&&eA(a.submission.formMethod)))return void et(n,{matches:v},{flushSync:b});o=new AbortController;let E=ew(e.history,n,o.signal,a&&a.submission);if(a&&a.pendingError)d={[eC(v).route.id]:a.pendingError};else if(a&&a.submission&&eA(a.submission.formMethod)){let e=await ea(E,n,a.submission,v,{replace:a.replace,flushSync:b});if(e.shortCircuited)return;c=e.pendingActionData,d=e.pendingActionError,m=eB(n,a.submission),b=!1,E=new Request(E.url,{signal:E.signal})}let{shortCircuited:S,loaderData:x,errors:R}=await eh(E,n,v,m,a&&a.submission,a&&a.fetcherSubmission,a&&a.replace,a&&!0===a.initialHydration,b,c,d);S||(o=null,et(n,y({matches:v},c?{actionData:c}:{},{loaderData:x,errors:R})))}async function ea(e,r,n,a,o){var i;let l;void 0===o&&(o={}),eS(),ee({navigation:{state:"submitting",location:r,formMethod:(i=n).formMethod,formAction:i.formAction,formEncType:i.formEncType,formData:i.formData,json:i.json,text:i.text}},{flushSync:!0===o.flushSync});let s=eF(a,r);if(s.route.action||s.route.lazy){if(l=await eb("action",e,s,a,u,t,f,p.v7_relativeSplatPath),e.signal.aborted)return{shortCircuited:!0}}else l={type:d.error,error:eD(405,{method:e.method,pathname:r.pathname,routeId:s.route.id})};if(eU(l)){let e;return e=o&&null!=o.replace?o.replace:l.location===k.location.pathname+k.location.search,await eg(k,l,{submission:n,replace:e}),{shortCircuited:!0}}if(eT(l)){let e=eC(a,s.route.id);return!0!==(o&&o.replace)&&(A=c.Push),{pendingActionData:{},pendingActionError:{[e.route.id]:l.error}}}if(e_(l))throw eD(400,{type:"defer-action"});return{pendingActionData:{[s.route.id]:l.data}}}async function eh(t,n,a,i,l,s,u,c,d,m,v){let g=i||eB(n,l),b=l||s||eN(g),w=r||h,[E,S]=em(e.history,k,a,b,n,p.v7_partialHydration&&!0===c,I,z,H,X,q,V,w,f,m,v);if(eG(e=>!(a&&a.some(t=>t.route.id===e))||E&&E.some(t=>t.route.id===e)),J=++$,0===E.length&&0===S.length){let e=eK();return et(n,y({matches:a,loaderData:{},errors:v||null},m?{actionData:m}:{},e?{fetchers:new Map(k.fetchers)}:{}),{flushSync:d}),{shortCircuited:!0}}if(!B&&(!p.v7_partialHydration||!c)){S.forEach(e=>{let t=k.fetchers.get(e.key),r=eI(void 0,t?t.data:void 0);k.fetchers.set(e.key,r)});let e=m||k.actionData;ee(y({navigation:g},e?0===Object.keys(e).length?{actionData:null}:{actionData:e}:{},S.length>0?{fetchers:new Map(k.fetchers)}:{}),{flushSync:d})}S.forEach(e=>{W.has(e.key)&&e$(e.key),e.controller&&W.set(e.key,e.controller)});let x=()=>S.forEach(e=>e$(e.key));o&&o.signal.addEventListener("abort",x);let{results:R,loaderResults:C,fetcherResults:P}=await eE(k.matches,a,E,S,t);if(t.signal.aborted)return{shortCircuited:!0};o&&o.signal.removeEventListener("abort",x),S.forEach(e=>W.delete(e.key));let D=eL(R);if(D){if(D.idx>=E.length){let e=S[D.idx-E.length].key;V.add(e)}return await eg(k,D.result,{replace:u}),{shortCircuited:!0}}let{loaderData:L,errors:_}=ex(k,a,E,C,v,S,P,G);G.forEach((e,t)=>{e.subscribe(r=>{(r||e.done)&&G.delete(t)})}),p.v7_partialHydration&&c&&k.errors&&Object.entries(k.errors).filter(e=>{let[t]=e;return!E.some(e=>e.route.id===t)}).forEach(e=>{let[t,r]=e;_=Object.assign(_||{},{[t]:r})});let T=eK(),U=eV(J),A=T||U||S.length>0;return y({loaderData:L,errors:_},A?{fetchers:new Map(k.fetchers)}:{})}async function ev(n,a,i,l,s,c,d){var m,v;if(eS(),q.delete(n),!l.route.action&&!l.route.lazy){let e=eD(405,{method:d.formMethod,pathname:i,routeId:a});eO(n,a,e,{flushSync:c});return}let y=k.fetchers.get(n);ek(n,(m=d,v=y,{state:"submitting",formMethod:m.formMethod,formAction:m.formAction,formEncType:m.formEncType,formData:m.formData,json:m.json,text:m.text,data:v?v.data:void 0}),{flushSync:c});let g=new AbortController,b=ew(e.history,i,g.signal,d);W.set(n,g);let w=$,E=await eb("action",b,l,s,u,t,f,p.v7_relativeSplatPath);if(b.signal.aborted){W.get(n)===g&&W.delete(n);return}if(p.v7_fetcherPersist&&X.has(n)){if(eU(E)||eT(E))return void ek(n,ez(void 0))}else{if(eU(E))return(W.delete(n),J>w)?void ek(n,ez(void 0)):(V.add(n),ek(n,eI(d)),eg(k,E,{fetcherSubmission:d}));if(eT(E))return void eO(n,a,E.error)}if(e_(E))throw eD(400,{type:"defer-action"});let x=k.navigation.location||k.location,R=ew(e.history,x,g.signal),C=r||h,P="idle"!==k.navigation.state?T(C,k.navigation.location,f):k.matches;S(P,"Didn't find any matches after fetcher action");let D=++$;K.set(n,D);let L=eI(d,E.data);k.fetchers.set(n,L);let[_,U]=em(e.history,k,P,d,x,!1,I,z,H,X,q,V,C,f,{[l.route.id]:E.data},void 0);U.filter(e=>e.key!==n).forEach(e=>{let t=e.key,r=k.fetchers.get(t),n=eI(void 0,r?r.data:void 0);k.fetchers.set(t,n),W.has(t)&&e$(t),e.controller&&W.set(t,e.controller)}),ee({fetchers:new Map(k.fetchers)});let j=()=>U.forEach(e=>e$(e.key));g.signal.addEventListener("abort",j);let{results:M,loaderResults:O,fetcherResults:F}=await eE(k.matches,P,_,U,R);if(g.signal.aborted)return;g.signal.removeEventListener("abort",j),K.delete(n),W.delete(n),U.forEach(e=>W.delete(e.key));let N=eL(M);if(N){if(N.idx>=_.length){let e=U[N.idx-_.length].key;V.add(e)}return eg(k,N.result)}let{loaderData:B,errors:Y}=ex(k,k.matches,_,O,void 0,U,F,G);if(k.fetchers.has(n)){let e=ez(E.data);k.fetchers.set(n,e)}eV(D),"loading"===k.navigation.state&&D>J?(S(A,"Expected pending action"),o&&o.abort(),et(k.navigation.location,{matches:P,loaderData:B,errors:Y,fetchers:new Map(k.fetchers)})):(ee({errors:Y,loaderData:eR(k.loaderData,B,P,Y),fetchers:new Map(k.fetchers)}),I=!1)}async function ey(r,n,a,o,i,l,s){let c=k.fetchers.get(r);ek(r,eI(s,c?c.data:void 0),{flushSync:l});let d=new AbortController,h=ew(e.history,a,d.signal);W.set(r,d);let m=$,v=await eb("loader",h,o,i,u,t,f,p.v7_relativeSplatPath);if(e_(v)&&(v=await eM(v,h.signal,!0)||v),W.get(r)===d&&W.delete(r),!h.signal.aborted){if(X.has(r))return void ek(r,ez(void 0));if(eU(v))if(J>m)return void ek(r,ez(void 0));else{V.add(r),await eg(k,v);return}if(eT(v))return void eO(r,n,v.error);S(!e_(v),"Unhandled fetcher deferred data"),ek(r,ez(v.data))}}async function eg(t,r,n){let{submission:a,fetcherSubmission:s,replace:u}=void 0===n?{}:n;r.revalidate&&(I=!0);let d=C(t.location,r.location,{_isRedirect:!0});if(S(d,"Expected a location on the redirect navigation"),l){let t=!1;if(r.reloadDocument)t=!0;else if(eu.test(r.location)){let n=e.history.createURL(r.location);t=n.origin!==i.location.origin||null==F(n.pathname,f)}if(t)return void(u?i.location.replace(r.location):i.location.assign(r.location))}o=null;let h=!0===u?c.Replace:c.Push,{formMethod:p,formAction:m,formEncType:v}=t.navigation;!a&&!s&&p&&m&&v&&(a=eN(t.navigation));let g=a||s;if(eo.has(r.status)&&g&&eA(g.formMethod))await en(h,d,{submission:y({},g,{formAction:r.location}),preventScrollReset:j});else{let e=eB(d,a);await en(h,d,{overrideNavigation:e,fetcherSubmission:s,preventScrollReset:j})}}async function eE(r,n,a,o,i){let l=await Promise.all([...a.map(e=>eb("loader",i,e,n,u,t,f,p.v7_relativeSplatPath)),...o.map(r=>r.matches&&r.match&&r.controller?eb("loader",ew(e.history,r.path,r.controller.signal),r.match,r.matches,u,t,f,p.v7_relativeSplatPath):{type:d.error,error:eD(404,{pathname:r.path})})]),s=l.slice(0,a.length),c=l.slice(a.length);return await Promise.all([ej(r,a,s,s.map(()=>i.signal),!1,k.loaderData),ej(r,o.map(e=>e.match),c,o.map(e=>e.controller?e.controller.signal:null),!0)]),{results:l,loaderResults:s,fetcherResults:c}}function eS(){I=!0,z.push(...eG()),q.forEach((e,t)=>{W.has(t)&&(H.push(t),e$(t))})}function ek(e,t,r){void 0===r&&(r={}),k.fetchers.set(e,t),ee({fetchers:new Map(k.fetchers)},{flushSync:!0===(r&&r.flushSync)})}function eO(e,t,r,n){void 0===n&&(n={});let a=eC(k.matches,t);eW(e),ee({errors:{[a.route.id]:r},fetchers:new Map(k.fetchers)},{flushSync:!0===(n&&n.flushSync)})}function eH(e){return p.v7_fetcherPersist&&(Y.set(e,(Y.get(e)||0)+1),X.has(e)&&X.delete(e)),k.fetchers.get(e)||el}function eW(e){let t=k.fetchers.get(e);W.has(e)&&!(t&&"loading"===t.state&&K.has(e))&&e$(e),q.delete(e),K.delete(e),V.delete(e),X.delete(e),k.fetchers.delete(e)}function e$(e){let t=W.get(e);S(t,"Expected fetch controller: "+e),t.abort(),W.delete(e)}function eJ(e){for(let t of e){let e=ez(eH(t).data);k.fetchers.set(t,e)}}function eK(){let e=[],t=!1;for(let r of V){let n=k.fetchers.get(r);S(n,"Expected fetcher: "+r),"loading"===n.state&&(V.delete(r),e.push(r),t=!0)}return eJ(e),t}function eV(e){let t=[];for(let[r,n]of K)if(n<e){let e=k.fetchers.get(r);S(e,"Expected fetcher: "+r),"loading"===e.state&&(e$(r),K.delete(r),t.push(r))}return eJ(t),t.length>0}function eq(e){k.blockers.delete(e),Q.delete(e)}function eY(e,t){let r=k.blockers.get(e)||es;S("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 n=new Map(k.blockers);n.set(e,t),ee({blockers:n})}function eX(e){let{currentLocation:t,nextLocation:r,historyAction:n}=e;if(0===Q.size)return;Q.size>1&&x(!1,"A router only supports one blocker at a time");let a=Array.from(Q.entries()),[o,i]=a[a.length-1],l=k.blockers.get(o);if((!l||"proceeding"!==l.state)&&i({currentLocation:t,nextLocation:r,historyAction:n}))return o}function eG(e){let t=[];return G.forEach((r,n)=>{(!e||e(n))&&(r.cancel(),t.push(n),G.delete(n))}),t}function eQ(e,t){return b&&b(e,t.map(e=>U(e,k.loaderData)))||e.key}function eZ(e,t){if(g){let r=g[eQ(e,t)];if("number"==typeof r)return r}return null}return a={get basename(){return f},get future(){return p},get state(){return k},get routes(){return h},get window(){return i},initialize:function(){if(m=e.history.listen(t=>{let{action:r,location:n,delta:a}=t;if(Z){Z=!1;return}x(0===Q.size||null!=a,"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 o=eX({currentLocation:k.location,nextLocation:n,historyAction:r});if(o&&null!=a){Z=!0,e.history.go(-1*a),eY(o,{state:"blocked",location:n,proceed(){eY(o,{state:"proceeding",proceed:void 0,reset:void 0,location:n}),e.history.go(a)},reset(){let e=new Map(k.blockers);e.set(o,es),ee({blockers:e})}});return}return en(r,n)}),l){var t=i,r=O;try{let e=t.sessionStorage.getItem(ed);if(e){let t=JSON.parse(e);for(let[e,n]of Object.entries(t||{}))n&&Array.isArray(n)&&r.set(e,new Set(n||[]))}}catch(e){}let e=()=>(function(e,t){if(t.size>0){let r={};for(let[e,n]of t)r[e]=[...n];try{e.sessionStorage.setItem(ed,JSON.stringify(r))}catch(e){x(!1,"Failed to save applied view transitions in sessionStorage ("+e+").")}}})(i,O);i.addEventListener("pagehide",e),N=()=>i.removeEventListener("pagehide",e)}return k.initialized||en(c.Pop,k.location,{initialHydration:!0}),a},subscribe:function(e){return v.add(e),()=>v.delete(e)},enableScrollRestoration:function(e,t,r){if(g=e,w=t,b=r||null,!E&&k.navigation===ei){E=!0;let e=eZ(k.location,k.matches);null!=e&&ee({restoreScrollPosition:e})}return()=>{g=null,w=null,b=null}},navigate:er,fetch:function(e,t,n,a){if(s)throw 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.");W.has(e)&&e$(e);let o=!0===(a&&a.unstable_flushSync),i=r||h,l=ef(k.location,k.matches,f,p.v7_prependBasename,n,p.v7_relativeSplatPath,t,null==a?void 0:a.relative),u=T(i,l,f);if(!u)return void eO(e,t,eD(404,{pathname:l}),{flushSync:o});let{path:c,submission:d,error:m}=ep(p.v7_normalizeFormMethod,!0,l,a);if(m)return void eO(e,t,m,{flushSync:o});let v=eF(u,c);(j=!0===(a&&a.preventScrollReset),d&&eA(d.formMethod))?ev(e,t,c,v,u,o,d):(q.set(e,{routeId:t,path:c}),ey(e,t,c,v,u,o,d))},revalidate:function(){if(eS(),ee({revalidation:"loading"}),"submitting"!==k.navigation.state){if("idle"===k.navigation.state)return void en(k.historyAction,k.location,{startUninterruptedRevalidation:!0});en(A||k.historyAction,k.navigation.location,{overrideNavigation:k.navigation})}},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:eH,deleteFetcher:function(e){if(p.v7_fetcherPersist){let t=(Y.get(e)||0)-1;t<=0?(Y.delete(e),X.add(e)):Y.set(e,t)}else eW(e);ee({fetchers:new Map(k.fetchers)})},dispose:function(){m&&m(),N&&N(),v.clear(),o&&o.abort(),k.fetchers.forEach((e,t)=>eW(t)),k.blockers.forEach((e,t)=>eq(t))},getBlocker:function(e,t){let r=k.blockers.get(e)||es;return Q.get(e)!==t&&Q.set(e,t),r},deleteBlocker:eq,_internalFetchControllers:W,_internalActiveDeferreds:G,_internalSetRoutes:function(e){r=_(e,t,void 0,u={})}}}function ef(e,t,r,n,a,o,i,l){let s,u;if(i){for(let e of(s=[],t))if(s.push(e),e.route.id===i){u=e;break}}else s=t,u=t[t.length-1];let c=H(a||".",z(s,o),F(e.pathname,r)||e.pathname,"path"===l);return null==a&&(c.search=e.search,c.hash=e.hash),(null==a||""===a||"."===a)&&u&&u.route.index&&!eO(c.search)&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),n&&"/"!==r&&(c.pathname="/"===c.pathname?r:W([r,c.pathname])),P(c)}function ep(e,t,r,n){var a;let o,i;if(!n||!(null!=n&&("formData"in n&&null!=n.formData||"body"in n&&void 0!==n.body)))return{path:r};if(n.formMethod&&(a=n.formMethod,!en.has(a.toLowerCase())))return{path:r,error:eD(405,{method:n.formMethod})};let l=()=>({path:r,error:eD(400,{type:"invalid-body"})}),s=n.formMethod||"get",u=e?s.toUpperCase():s.toLowerCase(),c=ek(r);if(void 0!==n.body){if("text/plain"===n.formEncType){if(!eA(u))return l();let e="string"==typeof n.body?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((e,t)=>{let[r,n]=t;return""+e+r+"="+n+"\n"},""):String(n.body);return{path:r,submission:{formMethod:u,formAction:c,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}else if("application/json"===n.formEncType){if(!eA(u))return l();try{let e="string"==typeof n.body?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:u,formAction:c,formEncType:n.formEncType,formData:void 0,json:e,text:void 0}}}catch(e){return l()}}}if(S("function"==typeof FormData,"FormData is not available in this environment"),n.formData)o=eE(n.formData),i=n.formData;else if(n.body instanceof FormData)o=eE(n.body),i=n.body;else if(n.body instanceof URLSearchParams)i=eS(o=n.body);else if(null==n.body)o=new URLSearchParams,i=new FormData;else try{o=new URLSearchParams(n.body),i=eS(o)}catch(e){return l()}let d={formMethod:u,formAction:c,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:i,json:void 0,text:void 0};if(eA(d.formMethod))return{path:r,submission:d};let h=D(r);return t&&h.search&&eO(h.search)&&o.append("index",""),h.search="?"+o,{path:P(h),submission:d}}function em(e,t,r,n,a,o,i,l,s,u,c,d,h,f,p,m){let v=m?Object.values(m)[0]:p?Object.values(p)[0]:void 0,g=e.createURL(t.location),b=e.createURL(a),w=(function(e,t){let r=e;if(t){let n=e.findIndex(e=>e.route.id===t);n>=0&&(r=e.slice(0,n))}return r})(r,m?Object.keys(m)[0]:void 0).filter((e,r)=>{var a,s,u;let c,d,{route:h}=e;if(h.lazy)return!0;if(null==h.loader)return!1;if(o)return!!h.loader.hydrate||void 0===t.loaderData[h.id]&&(!t.errors||void 0===t.errors[h.id]);if(a=t.loaderData,s=t.matches[r],u=e,c=!s||u.route.id!==s.route.id,d=void 0===a[u.route.id],c||d||l.some(t=>t===e.route.id))return!0;let f=t.matches[r];return ey(e,y({currentUrl:g,currentParams:f.params,nextUrl:b,nextParams:e.params},n,{actionResult:v,defaultShouldRevalidate:i||g.pathname+g.search===b.pathname+b.search||g.search!==b.search||ev(f,e)}))}),E=[];return c.forEach((e,a)=>{if(o||!r.some(t=>t.route.id===e.routeId)||u.has(a))return;let l=T(h,e.path,f);if(!l)return void E.push({key:a,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null});let c=t.fetchers.get(a),p=eF(l,e.path);!d.has(a)&&(s.includes(a)||(c&&"idle"!==c.state&&void 0===c.data?i:ey(p,y({currentUrl:g,currentParams:t.matches[t.matches.length-1].params,nextUrl:b,nextParams:r[r.length-1].params},n,{actionResult:v,defaultShouldRevalidate:i}))))&&E.push({key:a,routeId:e.routeId,path:e.path,matches:l,match:p,controller:new AbortController})}),[w,E]}function ev(e,t){let r=e.route.path;return e.pathname!==t.pathname||null!=r&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function ey(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if("boolean"==typeof r)return r}return t.defaultShouldRevalidate}async function eg(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let a=r[e.id];S(a,"No route found in manifest");let o={};for(let e in n){let t=void 0!==a[e]&&"hasErrorBoundary"!==e;x(!t,'Route "'+a.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||k.has(e)||(o[e]=n[e])}Object.assign(a,o),Object.assign(a,y({},t(a),{lazy:void 0}))}async function eb(e,t,r,n,a,o,i,l,s){var u,c,h,f;let p,m,v;void 0===s&&(s={});let y=e=>{let n,a=new Promise((e,t)=>n=t);return v=()=>n(),t.signal.addEventListener("abort",v),Promise.race([e({request:t,params:r.params,context:s.requestContext}),a])};try{let n=r.route[e];if(r.route.lazy)if(n){let e,t=await Promise.all([y(n).catch(t=>{e=t}),eg(r.route,o,a)]);if(e)throw e;m=t[0]}else if(await eg(r.route,o,a),n=r.route[e])m=await y(n);else{if("action"!==e)return{type:d.data,data:void 0};let n=new URL(t.url),a=n.pathname+n.search;throw eD(405,{method:t.method,pathname:a,routeId:r.route.id})}else if(n)m=await y(n);else{let e=new URL(t.url),r=e.pathname+e.search;throw eD(404,{pathname:r})}S(void 0!==m,"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){p=d.error,m=e}finally{v&&t.signal.removeEventListener("abort",v)}if(null!=(u=m)&&"number"==typeof u.status&&"string"==typeof u.statusText&&"object"==typeof u.headers&&void 0!==u.body){let e,a=m.status;if(ea.has(a)){let e=m.headers.get("Location");if(S(e,"Redirects returned/thrown from loaders/actions must have a Location header"),eu.test(e)){if(!s.isStaticRequest){let r=new URL(t.url),n=new URL(e.startsWith("//")?r.protocol+e:e),a=null!=F(n.pathname,i);n.origin===r.origin&&a&&(e=n.pathname+n.search+n.hash)}}else e=ef(new URL(t.url),n.slice(0,n.indexOf(r)+1),i,!0,e,l);if(s.isStaticRequest)throw m.headers.set("Location",e),m;return{type:d.redirect,status:a,location:e,revalidate:null!==m.headers.get("X-Remix-Revalidate"),reloadDocument:null!==m.headers.get("X-Remix-Reload-Document")}}if(s.isRouteRequest)throw{type:p===d.error?d.error:d.data,response:m};try{let t=m.headers.get("Content-Type");e=t&&/\bapplication\/json\b/.test(t)?null==m.body?null:await m.json():await m.text()}catch(e){return{type:d.error,error:e}}return p===d.error?{type:p,error:new Z(a,m.statusText,e),headers:m.headers}:{type:d.data,data:e,statusCode:m.status,headers:m.headers}}if(p===d.error)return{type:p,error:m};if((c=m)&&"object"==typeof c&&"object"==typeof c.data&&"function"==typeof c.subscribe&&"function"==typeof c.cancel&&"function"==typeof c.resolveData){return{type:d.deferred,deferredData:m,statusCode:null==(h=m.init)?void 0:h.status,headers:(null==(f=m.init)?void 0:f.headers)&&new Headers(m.init.headers)}}return{type:d.data,data:m}}function ew(e,t,r,n){let a=e.createURL(ek(t)).toString(),o={signal:r};if(n&&eA(n.formMethod)){let{formMethod:e,formEncType:t}=n;o.method=e.toUpperCase(),"application/json"===t?(o.headers=new Headers({"Content-Type":t}),o.body=JSON.stringify(n.json)):"text/plain"===t?o.body=n.text:"application/x-www-form-urlencoded"===t&&n.formData?o.body=eE(n.formData):o.body=n.formData}return new Request(a,o)}function eE(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,"string"==typeof n?n:n.name);return t}function eS(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function ex(e,t,r,n,a,o,i,l){var s;let u,c,d,h,f,{loaderData:p,errors:m}=(s=a,c={},d=null,h=!1,f={},n.forEach((e,n)=>{let a=r[n].route.id;if(S(!eU(e),"Cannot handle redirect results in processLoaderData"),eT(e)){let r=eC(t,a),n=e.error;s&&(n=Object.values(s)[0],s=void 0),null==(d=d||{})[r.route.id]&&(d[r.route.id]=n),c[a]=void 0,h||(h=!0,u=ee(e.error)?e.error.status:500),e.headers&&(f[a]=e.headers)}else e_(e)?(l.set(a,e.deferredData),c[a]=e.deferredData.data):c[a]=e.data,null==e.statusCode||200===e.statusCode||h||(u=e.statusCode),e.headers&&(f[a]=e.headers)}),s&&(d=s,c[Object.keys(s)[0]]=void 0),{loaderData:c,errors:d,statusCode:u||200,loaderHeaders:f});for(let t=0;t<o.length;t++){let{key:r,match:n,controller:a}=o[t];S(void 0!==i&&void 0!==i[t],"Did not find corresponding fetcher result");let l=i[t];if(!a||!a.signal.aborted)if(eT(l)){let t=eC(e.matches,null==n?void 0:n.route.id);m&&m[t.route.id]||(m=y({},m,{[t.route.id]:l.error})),e.fetchers.delete(r)}else if(eU(l))S(!1,"Unhandled fetcher revalidation redirect");else if(e_(l))S(!1,"Unhandled fetcher deferred data");else{let t=ez(l.data);e.fetchers.set(r,t)}}return{loaderData:p,errors:m}}function eR(e,t,r,n){let a=y({},t);for(let o of r){let r=o.route.id;if(t.hasOwnProperty(r)?void 0!==t[r]&&(a[r]=t[r]):void 0!==e[r]&&o.route.loader&&(a[r]=e[r]),n&&n.hasOwnProperty(r))break}return a}function eC(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 eP(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 eD(e,t){let{pathname:r,routeId:n,method:a,type:o}=void 0===t?{}:t,i="Unknown Server Error",l="Unknown @remix-run/router error";return 400===e?(i="Bad Request",a&&r&&n?l="You made a "+a+' request to "'+r+'" but did not provide a `loader` for route "'+n+'", so there is no way to handle the request.':"defer-action"===o?l="defer() is not supported in actions":"invalid-body"===o&&(l="Unable to encode submission body")):403===e?(i="Forbidden",l='Route "'+n+'" does not match URL "'+r+'"'):404===e?(i="Not Found",l='No route matches URL "'+r+'"'):405===e&&(i="Method Not Allowed",a&&r&&n?l="You made a "+a.toUpperCase()+' request to "'+r+'" but did not provide an `action` for route "'+n+'", so there is no way to handle the request.':a&&(l='Invalid request method "'+a.toUpperCase()+'"')),new Z(e||500,i,Error(l),!0)}function eL(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(eU(r))return{result:r,idx:t}}}function ek(e){let t="string"==typeof e?D(e):e;return P(y({},t,{hash:""}))}function e_(e){return e.type===d.deferred}function eT(e){return e.type===d.error}function eU(e){return(e&&e.type)===d.redirect}function eA(e){return er.has(e.toLowerCase())}async function ej(e,t,r,n,a,o){for(let i=0;i<r.length;i++){let l=r[i],s=t[i];if(!s)continue;let u=e.find(e=>e.route.id===s.route.id),c=null!=u&&!ev(u,s)&&(o&&o[s.route.id])!==void 0;if(e_(l)&&(a||c)){let e=n[i];S(e,"Expected an AbortSignal for revalidating fetcher deferred result"),await eM(l,e,a).then(e=>{e&&(r[i]=e||r[i])})}}}async function eM(e,t,r){if(void 0===r&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:d.data,data:e.deferredData.unwrappedData}}catch(e){return{type:d.error,error:e}}return{type:d.data,data:e.deferredData.data}}}function eO(e){return new URLSearchParams(e).getAll("index").some(e=>""===e)}function eF(e,t){let r="string"==typeof t?D(t).search:t.search;if(e[e.length-1].route.index&&eO(r||""))return e[e.length-1];let n=I(e);return n[n.length-1]}function eN(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:o,json:i}=e;if(t&&r&&n){if(null!=a)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a};else if(null!=o)return{formMethod:t,formAction:r,formEncType:n,formData:o,json:void 0,text:void 0};else if(void 0!==i)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:i,text:void 0}}}function eB(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function eI(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function ez(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function eH(){return(eH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}Symbol("deferred");let eW=p.createContext(null),e$=p.createContext(null),eJ=p.createContext(null),eK=p.createContext(null),eV=p.createContext(null),eq=p.createContext({outlet:null,matches:[],isDataRoute:!1}),eY=p.createContext(null);function eX(e,t){let{relative:r}=void 0===t?{}:t;eG()||S(!1);let{basename:n,navigator:a}=p.useContext(eK),{hash:o,pathname:i,search:l}=e8(e,{relative:r}),s=i;return"/"!==n&&(s="/"===i?n:W([n,i])),a.createHref({pathname:s,search:l,hash:o})}function eG(){return null!=p.useContext(eV)}function eQ(){return eG()||S(!1),p.useContext(eV).location}function eZ(){return p.useContext(eV).navigationType}function e0(e){eG()||S(!1);let{pathname:t}=eQ();return p.useMemo(()=>O(e,t),[t,e])}function e1(e){p.useContext(eK).static||p.useLayoutEffect(e)}function e7(){let{isDataRoute:e}=p.useContext(eq);return e?function(){let{router:e}=ti(ta.UseNavigateStable),t=ts(to.UseNavigateStable),r=p.useRef(!1);return e1(()=>{r.current=!0}),p.useCallback(function(n,a){void 0===a&&(a={}),r.current&&("number"==typeof n?e.navigate(n):e.navigate(n,eH({fromRouteId:t},a)))},[e,t])}():function(){eG()||S(!1);let e=p.useContext(eW),{basename:t,future:r,navigator:n}=p.useContext(eK),{matches:a}=p.useContext(eq),{pathname:o}=eQ(),i=JSON.stringify(z(a,r.v7_relativeSplatPath)),l=p.useRef(!1);return e1(()=>{l.current=!0}),p.useCallback(function(r,a){if(void 0===a&&(a={}),!l.current)return;if("number"==typeof r)return void n.go(r);let s=H(r,JSON.parse(i),o,"path"===a.relative);null==e&&"/"!==t&&(s.pathname="/"===s.pathname?t:W([t,s.pathname])),(a.replace?n.replace:n.push)(s,a.state,a)},[t,n,i,o,e])}()}let e4=p.createContext(null);function e2(){return p.useContext(e4)}function e3(e){let t=p.useContext(eq).outlet;return t?p.createElement(e4.Provider,{value:e},t):t}function e5(){let{matches:e}=p.useContext(eq),t=e[e.length-1];return t?t.params:{}}function e8(e,t){let{relative:r}=void 0===t?{}:t,{future:n}=p.useContext(eK),{matches:a}=p.useContext(eq),{pathname:o}=eQ(),i=JSON.stringify(z(a,n.v7_relativeSplatPath));return p.useMemo(()=>H(e,JSON.parse(i),o,"path"===r),[e,i,o,r])}function e9(e,t){return e6(e,t)}function e6(e,t,r,n){let a;eG()||S(!1);let{navigator:o}=p.useContext(eK),{matches:i}=p.useContext(eq),l=i[i.length-1],s=l?l.params:{};l&&l.pathname;let u=l?l.pathnameBase:"/";l&&l.route;let d=eQ();if(t){var h;let e="string"==typeof t?D(t):t;"/"===u||(null==(h=e.pathname)?void 0:h.startsWith(u))||S(!1),a=e}else a=d;let f=a.pathname||"/",m=f;if("/"!==u){let e=u.replace(/^\//,"").split("/");m="/"+f.replace(/^\//,"").split("/").slice(e.length).join("/")}let v=T(e,{pathname:m}),y=tn(v&&v.map(e=>Object.assign({},e,{params:Object.assign({},s,e.params),pathname:W([u,o.encodeLocation?o.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?u:W([u,o.encodeLocation?o.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})),i,r,n);return t&&y?p.createElement(eV.Provider,{value:{location:eH({pathname:"/",search:"",hash:"",state:null,key:"default"},a),navigationType:c.Pop}},y):y}let te=p.createElement(function(){let e=tv(),t=ee(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null;return p.createElement(p.Fragment,null,p.createElement("h2",null,"Unexpected Application Error!"),p.createElement("h3",{style:{fontStyle:"italic"}},t),r?p.createElement("pre",{style:{padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"}},r):null,null)},null);class tt extends p.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?p.createElement(eq.Provider,{value:this.props.routeContext},p.createElement(eY.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function tr(e){let{routeContext:t,match:r,children:n}=e,a=p.useContext(eW);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),p.createElement(eq.Provider,{value:t},n)}function tn(e,t,r,n){var a,o;if(void 0===t&&(t=[]),void 0===r&&(r=null),void 0===n&&(n=null),null==e){if(null==(o=r)||!o.errors)return null;e=r.matches}let i=e,l=null==(a=r)?void 0:a.errors;if(null!=l){let e=i.findIndex(e=>e.route.id&&(null==l?void 0:l[e.route.id]));e>=0||S(!1),i=i.slice(0,Math.min(i.length,e+1))}let s=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(u=e),t.route.id){let{loaderData:e,errors:n}=r,a=t.route.loader&&void 0===e[t.route.id]&&(!n||void 0===n[t.route.id]);if(t.route.lazy||a){s=!0,i=u>=0?i.slice(0,u+1):[i[0]];break}}}return i.reduceRight((e,n,a)=>{var o;let c,d=!1,h=null,f=null;r&&(c=l&&n.route.id?l[n.route.id]:void 0,h=n.route.errorElement||te,s&&(u<0&&0===a?(o="route-fallback",tE[o]||(tE[o]=!0),d=!0,f=null):u===a&&(d=!0,f=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,a+1)),v=()=>{let t;return t=c?h:d?f:n.route.Component?p.createElement(n.route.Component,null):n.route.element?n.route.element:e,p.createElement(tr,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:null!=r},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||0===a)?p.createElement(tt,{location:r.location,revalidation:r.revalidation,component:h,error:c,children:v(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):v()},null)}var ta=((o=ta||{}).UseBlocker="useBlocker",o.UseRevalidator="useRevalidator",o.UseNavigateStable="useNavigate",o),to=((i=to||{}).UseBlocker="useBlocker",i.UseLoaderData="useLoaderData",i.UseActionData="useActionData",i.UseRouteError="useRouteError",i.UseNavigation="useNavigation",i.UseRouteLoaderData="useRouteLoaderData",i.UseMatches="useMatches",i.UseRevalidator="useRevalidator",i.UseNavigateStable="useNavigate",i.UseRouteId="useRouteId",i);function ti(e){let t=p.useContext(eW);return t||S(!1),t}function tl(e){let t=p.useContext(e$);return t||S(!1),t}function ts(e){let t,r=((t=p.useContext(eq))||S(!1),t),n=r.matches[r.matches.length-1];return n.route.id||S(!1),n.route.id}function tu(){return ts(to.UseRouteId)}function tc(){return tl(to.UseNavigation).navigation}function td(){let e=ti(ta.UseRevalidator),t=tl(to.UseRevalidator);return p.useMemo(()=>({revalidate:e.router.revalidate,state:t.revalidation}),[e.router.revalidate,t.revalidation])}function th(){let{matches:e,loaderData:t}=tl(to.UseMatches);return p.useMemo(()=>e.map(e=>U(e,t)),[e,t])}function tf(){let e=tl(to.UseLoaderData),t=ts(to.UseLoaderData);return e.errors&&null!=e.errors[t]?void console.error("You cannot `useLoaderData` in an errorElement (routeId: "+t+")"):e.loaderData[t]}function tp(e){return tl(to.UseRouteLoaderData).loaderData[e]}function tm(){let e=tl(to.UseActionData),t=ts(to.UseLoaderData);return e.actionData?e.actionData[t]:void 0}function tv(){var e;let t=p.useContext(eY),r=tl(to.UseRouteError),n=ts(to.UseRouteError);return void 0!==t?t:null==(e=r.errors)?void 0:e[n]}function ty(){let e=p.useContext(eJ);return null==e?void 0:e._data}function tg(){let e=p.useContext(eJ);return null==e?void 0:e._error}let tb=0;function tw(e){let{router:t,basename:r}=ti(ta.UseBlocker),n=tl(to.UseBlocker),[a,o]=p.useState(""),i=p.useCallback(t=>{if("function"!=typeof e)return!!e;if("/"===r)return e(t);let{currentLocation:n,nextLocation:a,historyAction:o}=t;return e({currentLocation:eH({},n,{pathname:F(n.pathname,r)||n.pathname}),nextLocation:eH({},a,{pathname:F(a.pathname,r)||a.pathname}),historyAction:o})},[r,e]);return p.useEffect(()=>{let e=String(++tb);return o(e),()=>t.deleteBlocker(e)},[t]),p.useEffect(()=>{""!==a&&t.getBlocker(a,i)},[t,a,i]),a&&n.blockers.has(a)?n.blockers.get(a):es}let tE={},tS=p.startTransition;function tx(e){let{basename:t,children:r,initialEntries:n,initialIndex:a,future:o}=e,i=p.useRef();null==i.current&&(i.current=b({initialEntries:n,initialIndex:a,v5Compat:!0}));let l=i.current,[s,u]=p.useState({action:l.action,location:l.location}),{v7_startTransition:c}=o||{},d=p.useCallback(e=>{c&&tS?tS(()=>u(e)):u(e)},[u,c]);return p.useLayoutEffect(()=>l.listen(d),[l,d]),p.createElement(tD,{basename:t,children:r,location:s.location,navigationType:s.action,navigator:l,future:o})}function tR(e){let{to:t,replace:r,state:n,relative:a}=e;eG()||S(!1);let{future:o,static:i}=p.useContext(eK),{matches:l}=p.useContext(eq),{pathname:s}=eQ(),u=e7(),c=JSON.stringify(H(t,z(l,o.v7_relativeSplatPath),s,"path"===a));return p.useEffect(()=>u(JSON.parse(c),{replace:r,state:n,relative:a}),[u,c,a,r,n]),null}function tC(e){return e3(e.context)}function tP(e){S(!1)}function tD(e){let{basename:t="/",children:r=null,location:n,navigationType:a=c.Pop,navigator:o,static:i=!1,future:l}=e;eG()&&S(!1);let s=t.replace(/^\/*/,"/"),u=p.useMemo(()=>({basename:s,navigator:o,static:i,future:eH({v7_relativeSplatPath:!1},l)}),[s,l,o,i]);"string"==typeof n&&(n=D(n));let{pathname:d="/",search:h="",hash:f="",state:m=null,key:v="default"}=n,y=p.useMemo(()=>{let e=F(d,s);return null==e?null:{location:{pathname:e,search:h,hash:f,state:m,key:v},navigationType:a}},[s,d,h,f,m,v,a]);return null==y?null:p.createElement(eK.Provider,{value:u},p.createElement(eV.Provider,{children:r,value:y}))}function tL(e){let{children:t,location:r}=e;return e6(tj(t),r)}function tk(e){let{children:t,errorElement:r,resolve:n}=e;return p.createElement(tU,{resolve:n,errorElement:r},p.createElement(tA,null,t))}var t_=((l=t_||{})[l.pending=0]="pending",l[l.success=1]="success",l[l.error=2]="error",l);let tT=new Promise(()=>{});class tU extends p.Component{constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error("<Await> caught the following error during render",e,t)}render(){let{children:e,errorElement:t,resolve:r}=this.props,n=null,a=t_.pending;if(r instanceof Promise)if(this.state.error){a=t_.error;let e=this.state.error;Object.defineProperty(n=Promise.reject().catch(()=>{}),"_tracked",{get:()=>!0}),Object.defineProperty(n,"_error",{get:()=>e})}else r._tracked?a=void 0!==(n=r)._error?t_.error:void 0!==n._data?t_.success:t_.pending:(a=t_.pending,Object.defineProperty(r,"_tracked",{get:()=>!0}),n=r.then(e=>Object.defineProperty(r,"_data",{get:()=>e}),e=>Object.defineProperty(r,"_error",{get:()=>e})));else a=t_.success,Object.defineProperty(n=Promise.resolve(),"_tracked",{get:()=>!0}),Object.defineProperty(n,"_data",{get:()=>r});if(a===t_.error&&n._error instanceof q)throw tT;if(a===t_.error&&!t)throw n._error;if(a===t_.error)return p.createElement(eJ.Provider,{value:n,children:t});if(a===t_.success)return p.createElement(eJ.Provider,{value:n,children:e});throw n}}function tA(e){let{children:t}=e,r=ty(),n="function"==typeof t?t(r):t;return p.createElement(p.Fragment,null,n)}function tj(e,t){void 0===t&&(t=[]);let r=[];return p.Children.forEach(e,(e,n)=>{if(!p.isValidElement(e))return;let a=[...t,n];if(e.type===p.Fragment)return void r.push.apply(r,tj(e.props.children,a));e.type!==tP&&S(!1),e.props.index&&e.props.children&&S(!1);let o={id:e.props.id||a.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(o.children=tj(e.props.children,a)),r.push(o)}),r}function tM(e){return tn(e)}function tO(e){let t={hasErrorBoundary:null!=e.ErrorBoundary||null!=e.errorElement};return e.Component&&Object.assign(t,{element:p.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:p.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:p.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}function tF(e,t){return eh({basename:null==t?void 0:t.basename,future:eH({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:b({initialEntries:null==t?void 0:t.initialEntries,initialIndex:null==t?void 0:t.initialIndex}),hydrationData:null==t?void 0:t.hydrationData,routes:e,mapRouteProperties:tO}).initialize()}function tN(){return(tN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function tB(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}let tI="application/x-www-form-urlencoded";function tz(e){return null!=e&&"string"==typeof e.tagName}function tH(e){return void 0===e&&(e=""),new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(e=>[r,e]):[[r,n]])},[]))}let tW=null,t$=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function tJ(e){return null==e||t$.has(e)?e:null}let tK=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],tV=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],tq=["fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","unstable_viewTransition"];try{window.__reactRouterVersion="6"}catch(e){}function tY(e,t){return eh({basename:null==t?void 0:t.basename,future:tN({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:w({window:null==t?void 0:t.window}),hydrationData:(null==t?void 0:t.hydrationData)||tG(),routes:e,mapRouteProperties:tO,window:null==t?void 0:t.window}).initialize()}function tX(e,t){return eh({basename:null==t?void 0:t.basename,future:tN({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:E({window:null==t?void 0:t.window}),hydrationData:(null==t?void 0:t.hydrationData)||tG(),routes:e,mapRouteProperties:tO,window:null==t?void 0:t.window}).initialize()}function tG(){var e;let t=null==(e=window)?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=tN({},t,{errors:function(e){if(!e)return null;let t=Object.entries(e),r={};for(let[e,n]of t)if(n&&"RouteErrorResponse"===n.__type)r[e]=new Z(n.status,n.statusText,n.data,!0===n.internal);else if(n&&"Error"===n.__type){if(n.__subType){let t=window[n.__subType];if("function"==typeof t)try{let a=new t(n.message);a.stack="",r[e]=a}catch(e){}}if(null==r[e]){let t=Error(n.message);t.stack="",r[e]=t}}else r[e]=n;return r}(t.errors)})),t}let tQ=p.createContext({isTransitioning:!1}),tZ=p.createContext(new Map),t0=p.startTransition,t1=v.flushSync,t7=p.useId;function t4(e){t1?t1(e):e()}class t2{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=t=>{"pending"===this.status&&(this.status="resolved",e(t))},this.reject=e=>{"pending"===this.status&&(this.status="rejected",t(e))}})}}function t3(e){let{fallbackElement:t,router:r,future:n}=e,[a,o]=p.useState(r.state),[i,l]=p.useState(),[s,u]=p.useState({isTransitioning:!1}),[c,d]=p.useState(),[h,f]=p.useState(),[m,v]=p.useState(),y=p.useRef(new Map),{v7_startTransition:g}=n||{},b=p.useCallback(e=>{if(g)t0?t0(e):e();else e()},[g]),w=p.useCallback((e,t)=>{let{deletedFetchers:n,unstable_flushSync:a,unstable_viewTransitionOpts:i}=t;n.forEach(e=>y.current.delete(e)),e.fetchers.forEach((e,t)=>{void 0!==e.data&&y.current.set(t,e.data)});let s=null==r.window||"function"!=typeof r.window.document.startViewTransition;if(!i||s)return void(a?t4(()=>o(e)):b(()=>o(e)));if(a){t4(()=>{h&&(c&&c.resolve(),h.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:i.currentLocation,nextLocation:i.nextLocation})});let t=r.window.document.startViewTransition(()=>{t4(()=>o(e))});t.finished.finally(()=>{t4(()=>{d(void 0),f(void 0),l(void 0),u({isTransitioning:!1})})}),t4(()=>f(t));return}h?(c&&c.resolve(),h.skipTransition(),v({state:e,currentLocation:i.currentLocation,nextLocation:i.nextLocation})):(l(e),u({isTransitioning:!0,flushSync:!1,currentLocation:i.currentLocation,nextLocation:i.nextLocation}))},[r.window,h,c,y,b]);p.useLayoutEffect(()=>r.subscribe(w),[r,w]),p.useEffect(()=>{s.isTransitioning&&!s.flushSync&&d(new t2)},[s]),p.useEffect(()=>{if(c&&i&&r.window){let e=c.promise,t=r.window.document.startViewTransition(async()=>{b(()=>o(i)),await e});t.finished.finally(()=>{d(void 0),f(void 0),l(void 0),u({isTransitioning:!1})}),f(t)}},[b,i,c,r.window]),p.useEffect(()=>{c&&i&&a.location.key===i.location.key&&c.resolve()},[c,h,a.location,i]),p.useEffect(()=>{!s.isTransitioning&&m&&(l(m.state),u({isTransitioning:!0,flushSync:!1,currentLocation:m.currentLocation,nextLocation:m.nextLocation}),v(void 0))},[s.isTransitioning,m]),p.useEffect(()=>{},[]);let E=p.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:e=>r.navigate(e),push:(e,t,n)=>r.navigate(e,{state:t,preventScrollReset:null==n?void 0:n.preventScrollReset}),replace:(e,t,n)=>r.navigate(e,{replace:!0,state:t,preventScrollReset:null==n?void 0:n.preventScrollReset})}),[r]),S=r.basename||"/",x=p.useMemo(()=>({router:r,navigator:E,static:!1,basename:S}),[r,E,S]);return p.createElement(p.Fragment,null,p.createElement(eW.Provider,{value:x},p.createElement(e$.Provider,{value:a},p.createElement(tZ.Provider,{value:y.current},p.createElement(tQ.Provider,{value:s},p.createElement(tD,{basename:S,location:a.location,navigationType:a.historyAction,navigator:E,future:{v7_relativeSplatPath:r.future.v7_relativeSplatPath}},a.initialized||r.future.v7_partialHydration?p.createElement(t5,{routes:r.routes,future:r.future,state:a}):t))))),null)}function t5(e){let{routes:t,future:r,state:n}=e;return e6(t,void 0,n,r)}function t8(e){let{basename:t,children:r,future:n,window:a}=e,o=p.useRef();null==o.current&&(o.current=w({window:a,v5Compat:!0}));let i=o.current,[l,s]=p.useState({action:i.action,location:i.location}),{v7_startTransition:u}=n||{},c=p.useCallback(e=>{u&&t0?t0(()=>s(e)):s(e)},[s,u]);return p.useLayoutEffect(()=>i.listen(c),[i,c]),p.createElement(tD,{basename:t,children:r,location:l.location,navigationType:l.action,navigator:i,future:n})}function t9(e){let{basename:t,children:r,future:n,window:a}=e,o=p.useRef();null==o.current&&(o.current=E({window:a,v5Compat:!0}));let i=o.current,[l,s]=p.useState({action:i.action,location:i.location}),{v7_startTransition:u}=n||{},c=p.useCallback(e=>{u&&t0?t0(()=>s(e)):s(e)},[s,u]);return p.useLayoutEffect(()=>i.listen(c),[i,c]),p.createElement(tD,{basename:t,children:r,location:l.location,navigationType:l.action,navigator:i,future:n})}function t6(e){let{basename:t,children:r,future:n,history:a}=e,[o,i]=p.useState({action:a.action,location:a.location}),{v7_startTransition:l}=n||{},s=p.useCallback(e=>{l&&t0?t0(()=>i(e)):i(e)},[i,l]);return p.useLayoutEffect(()=>a.listen(s),[a,s]),p.createElement(tD,{basename:t,children:r,location:o.location,navigationType:o.action,navigator:a,future:n})}let re="u">typeof window&&void 0!==window.document&&void 0!==window.document.createElement,rt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,rr=p.forwardRef(function(e,t){let r,{onClick:n,relative:a,reloadDocument:o,replace:i,state:l,target:s,to:u,preventScrollReset:c,unstable_viewTransition:d}=e,h=tB(e,tK),{basename:f}=p.useContext(eK),m=!1;if("string"==typeof u&&rt.test(u)&&(r=u,re))try{let e=new URL(window.location.href),t=new URL(u.startsWith("//")?e.protocol+u:u),r=F(t.pathname,f);t.origin===e.origin&&null!=r?u=r+t.search+t.hash:m=!0}catch(e){}let v=eX(u,{relative:a}),y=rs(u,{replace:i,state:l,target:s,preventScrollReset:c,relative:a,unstable_viewTransition:d});return p.createElement("a",tN({},h,{href:r||v,onClick:m||o?n:function(e){n&&n(e),e.defaultPrevented||y(e)},ref:t,target:s}))}),rn=p.forwardRef(function(e,t){let r,{"aria-current":n="page",caseSensitive:a=!1,className:o="",end:i=!1,style:l,to:s,unstable_viewTransition:u,children:c}=e,d=tB(e,tV),h=e8(s,{relative:d.relative}),f=eQ(),m=p.useContext(e$),{navigator:v,basename:y}=p.useContext(eK),g=null!=m&&rE(h)&&!0===u,b=v.encodeLocation?v.encodeLocation(h).pathname:h.pathname,w=f.pathname,E=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;a||(w=w.toLowerCase(),E=E?E.toLowerCase():null,b=b.toLowerCase()),E&&y&&(E=F(E,y)||E);let S="/"!==b&&b.endsWith("/")?b.length-1:b.length,x=w===b||!i&&w.startsWith(b)&&"/"===w.charAt(S),R=null!=E&&(E===b||!i&&E.startsWith(b)&&"/"===E.charAt(b.length)),C={isActive:x,isPending:R,isTransitioning:g},P=x?n:void 0;r="function"==typeof o?o(C):[o,x?"active":null,R?"pending":null,g?"transitioning":null].filter(Boolean).join(" ");let D="function"==typeof l?l(C):l;return p.createElement(rr,tN({},d,{"aria-current":P,className:r,ref:t,style:D,to:s,unstable_viewTransition:u}),"function"==typeof c?c(C):c)}),ra=p.forwardRef((e,t)=>{let{fetcherKey:r,navigate:n,reloadDocument:a,replace:o,state:i,method:l="get",action:s,onSubmit:u,relative:c,preventScrollReset:d,unstable_viewTransition:h}=e,f=tB(e,tq),m=rh(),v=rf(s,{relative:c}),y="get"===l.toLowerCase()?"get":"post";return p.createElement("form",tN({ref:t,method:y,action:v,onSubmit:a?u:e=>{if(u&&u(e),e.defaultPrevented)return;e.preventDefault();let t=e.nativeEvent.submitter,a=(null==t?void 0:t.getAttribute("formmethod"))||l;m(t||e.currentTarget,{fetcherKey:r,method:a,navigate:n,replace:o,state:i,relative:c,preventScrollReset:d,unstable_viewTransition:h})}},f))});function ro(e){let{getKey:t,storageKey:r}=e;return rg({getKey:t,storageKey:r}),null}function ri(e){let t=p.useContext(eW);return t||S(!1),t}function rl(e){let t=p.useContext(e$);return t||S(!1),t}function rs(e,t){let{target:r,replace:n,state:a,preventScrollReset:o,relative:i,unstable_viewTransition:l}=void 0===t?{}:t,s=e7(),u=eQ(),c=e8(e,{relative:i});return p.useCallback(t=>{0!==t.button||r&&"_self"!==r||t.metaKey||t.altKey||t.ctrlKey||t.shiftKey||(t.preventDefault(),s(e,{replace:void 0!==n?n:P(u)===P(c),state:a,preventScrollReset:o,relative:i,unstable_viewTransition:l}))},[u,s,c,n,a,r,e,o,i,l])}function ru(e){let t=p.useRef(tH(e)),r=p.useRef(!1),n=eQ(),a=p.useMemo(()=>{var e,a;let o;return e=n.search,a=r.current?null:t.current,o=tH(e),a&&a.forEach((e,t)=>{o.has(t)||a.getAll(t).forEach(e=>{o.append(t,e)})}),o},[n.search]),o=e7(),i=p.useCallback((e,t)=>{let n=tH("function"==typeof e?e(a):e);r.current=!0,o("?"+n,t)},[o,a]);return[a,i]}(s=h||(h={})).UseScrollRestoration="useScrollRestoration",s.UseSubmit="useSubmit",s.UseSubmitFetcher="useSubmitFetcher",s.UseFetcher="useFetcher",s.useViewTransitionState="useViewTransitionState",(u=f||(f={})).UseFetcher="useFetcher",u.UseFetchers="useFetchers",u.UseScrollRestoration="useScrollRestoration";let rc=0,rd=()=>"__"+String(++rc)+"__";function rh(){let{router:e}=ri(h.UseSubmit),{basename:t}=p.useContext(eK),r=tu();return p.useCallback(function(n,a){if(void 0===a&&(a={}),"u"<typeof document)throw Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.");let{action:o,method:i,encType:l,formData:s,body:u}=function(e,t){let r,n,a,o,i;if(tz(e)&&"form"===e.tagName.toLowerCase()){let i=e.getAttribute("action");n=i?F(i,t):null,r=e.getAttribute("method")||"get",a=tJ(e.getAttribute("enctype"))||tI,o=new FormData(e)}else if(tz(e)&&"button"===e.tagName.toLowerCase()||tz(e)&&"input"===e.tagName.toLowerCase()&&("submit"===e.type||"image"===e.type)){let i=e.form;if(null==i)throw Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||i.getAttribute("action");if(n=l?F(l,t):null,r=e.getAttribute("formmethod")||i.getAttribute("method")||"get",a=tJ(e.getAttribute("formenctype"))||tJ(i.getAttribute("enctype"))||tI,o=new FormData(i,e),!function(){if(null===tW)try{new FormData(document.createElement("form"),0),tW=!1}catch(e){tW=!0}return tW}()){let{name:t,type:r,value:n}=e;if("image"===r){let e=t?t+".":"";o.append(e+"x","0"),o.append(e+"y","0")}else t&&o.append(t,n)}}else if(tz(e))throw Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');else r="get",n=null,a=tI,i=e;return o&&"text/plain"===a&&(i=o,o=void 0),{action:n,method:r.toLowerCase(),encType:a,formData:o,body:i}}(n,t);if(!1===a.navigate){let t=a.fetcherKey||rd();e.fetch(t,r,a.action||o,{preventScrollReset:a.preventScrollReset,formData:s,body:u,formMethod:a.method||i,formEncType:a.encType||l,unstable_flushSync:a.unstable_flushSync})}else e.navigate(a.action||o,{preventScrollReset:a.preventScrollReset,formData:s,body:u,formMethod:a.method||i,formEncType:a.encType||l,replace:a.replace,state:a.state,fromRouteId:r,unstable_flushSync:a.unstable_flushSync,unstable_viewTransition:a.unstable_viewTransition})},[e,t,r])}function rf(e,t){let{relative:r}=void 0===t?{}:t,{basename:n}=p.useContext(eK),a=p.useContext(eq);a||S(!1);let[o]=a.matches.slice(-1),i=tN({},e8(e||".",{relative:r})),l=eQ();if(null==e){i.search=l.search;let e=new URLSearchParams(i.search);e.has("index")&&""===e.get("index")&&(e.delete("index"),i.search=e.toString()?"?"+e.toString():"")}return(!e||"."===e)&&o.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),"/"!==n&&(i.pathname="/"===i.pathname?n:W([n,i.pathname])),P(i)}function rp(e){var t;let{key:r}=void 0===e?{}:e,{router:n}=ri(h.UseFetcher),a=rl(f.UseFetcher),o=p.useContext(tZ),i=p.useContext(eq),l=null==(t=i.matches[i.matches.length-1])?void 0:t.route.id;o||S(!1),i||S(!1),null==l&&S(!1);let s=t7?t7():"",[u,c]=p.useState(r||s);r&&r!==u?c(r):u||c(rd()),p.useEffect(()=>(n.getFetcher(u),()=>{n.deleteFetcher(u)}),[n,u]);let d=p.useCallback((e,t)=>{l||S(!1),n.fetch(u,l,e,t)},[u,l,n]),m=rh(),v=p.useCallback((e,t)=>{m(e,tN({},t,{navigate:!1,fetcherKey:u}))},[u,m]),y=p.useMemo(()=>p.forwardRef((e,t)=>p.createElement(ra,tN({},e,{navigate:!1,fetcherKey:u,ref:t}))),[u]),g=a.fetchers.get(u)||el,b=o.get(u);return p.useMemo(()=>tN({Form:y,submit:v,load:d},g,{data:b}),[y,v,d,g,b])}function rm(){return Array.from(rl(f.UseFetchers).fetchers.entries()).map(e=>{let[t,r]=e;return tN({},r,{key:t})})}let rv="react-router-scroll-positions",ry={};function rg(e){let{getKey:t,storageKey:r}=void 0===e?{}:e,{router:n}=ri(h.UseScrollRestoration),{restoreScrollPosition:a,preventScrollReset:o}=rl(f.UseScrollRestoration),{basename:i}=p.useContext(eK),l=eQ(),s=th(),u=tc();p.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),function(e){let{capture:t}={};p.useEffect(()=>{let r=null!=t?{capture:t}:void 0;return window.addEventListener("pagehide",e,r),()=>{window.removeEventListener("pagehide",e,r)}},[e,t])}(p.useCallback(()=>{"idle"===u.state&&(ry[(t?t(l,s):null)||l.key]=window.scrollY);try{sessionStorage.setItem(r||rv,JSON.stringify(ry))}catch(e){}window.history.scrollRestoration="auto"},[r,t,u.state,l,s])),"u">typeof document&&(p.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(r||rv);e&&(ry=JSON.parse(e))}catch(e){}},[r]),p.useLayoutEffect(()=>{let e=t&&"/"!==i?(e,r)=>t(tN({},e,{pathname:F(e.pathname,i)||e.pathname}),r):t,r=null==n?void 0:n.enableScrollRestoration(ry,()=>window.scrollY,e);return()=>r&&r()},[n,i,t]),p.useLayoutEffect(()=>{if(!1!==a){if("number"==typeof a)return void window.scrollTo(0,a);if(l.hash){let e=document.getElementById(decodeURIComponent(l.hash.slice(1)));if(e)return void e.scrollIntoView()}!0!==o&&window.scrollTo(0,0)}},[l,a,o]))}function rb(e,t){let{capture:r}=t||{};p.useEffect(()=>{let t=null!=r?{capture:r}:void 0;return window.addEventListener("beforeunload",e,t),()=>{window.removeEventListener("beforeunload",e,t)}},[e,r])}function rw(e){let{when:t,message:r}=e,n=tw(t);p.useEffect(()=>{"blocked"===n.state&&(window.confirm(r)?setTimeout(n.proceed,0):n.reset())},[n,r]),p.useEffect(()=>{"blocked"!==n.state||t||n.reset()},[n,t])}function rE(e,t){void 0===t&&(t={});let r=p.useContext(tQ);null==r&&S(!1);let{basename:n}=ri(h.useViewTransitionState),a=e8(e,{relative:t.relative});if(!r.isTransitioning)return!1;let o=F(r.currentLocation.pathname,n)||r.currentLocation.pathname,i=F(r.nextLocation.pathname,n)||r.nextLocation.pathname;return null!=O(a.pathname,i)||null!=O(a.pathname,o)}}}]);
|
package/dist/771.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_pih_esm_audit_app=globalThis.webpackChunk_pih_esm_audit_app||[]).push([["771"],{2470(e,t,r){r.r(t),r.d(t,{default:()=>g,infinite:()=>E,unstable_serialize:()=>o});var n=r(
|
|
1
|
+
"use strict";(globalThis.webpackChunk_pih_esm_audit_app=globalThis.webpackChunk_pih_esm_audit_app||[]).push([["771"],{2470(e,t,r){r.r(t),r.d(t,{default:()=>g,infinite:()=>E,unstable_serialize:()=>o});var n=r(9485),i=r.n(n),a=r(9523),u=r(9966);let l=i().use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;if("rejected"===e.status)throw e.reason;throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}),s={dedupe:!0};u.OBJECT.defineProperty(u.SWRConfig,"defaultValue",{value:u.defaultConfig});let d=(0,u.withArgs)((e,t,r)=>{let{cache:i,compare:d,suspense:c,fallbackData:o,revalidateOnMount:f,revalidateIfStale:E,refreshInterval:g,refreshWhenHidden:_,refreshWhenOffline:h,keepPreviousData:p}=r,[U,R,C,b]=u.SWRGlobalState.get(i),[v,m]=(0,u.serialize)(e),I=(0,n.useRef)(!1),T=(0,n.useRef)(!1),V=(0,n.useRef)(v),N=(0,n.useRef)(t),L=(0,n.useRef)(r),S=()=>L.current.isVisible()&&L.current.isOnline(),[k,y,w,F]=(0,u.createCacheHelper)(i,v),D=(0,n.useRef)({}).current,O=(0,u.isUndefined)(o)?r.fallback[v]:o,A=(e,t)=>{for(let r in D)if("data"===r){if(!d(e[r],t[r])&&(!(0,u.isUndefined)(e[r])||!d(X,t[r])))return!1}else if(t[r]!==e[r])return!1;return!0},P=(0,n.useMemo)(()=>{let e=!!v&&!!t&&((0,u.isUndefined)(f)?!L.current.isPaused()&&!c&&(!!(0,u.isUndefined)(E)||E):f),r=t=>{let r=(0,u.mergeObjects)(t);return(delete r._k,e)?{isValidating:!0,isLoading:!0,...r}:r},n=k(),i=F(),a=r(n),l=n===i?a:r(i),s=a;return[()=>{let e=r(k());return A(e,s)?(s.data=e.data,s.isLoading=e.isLoading,s.isValidating=e.isValidating,s.error=e.error,s):(s=e,e)},()=>l]},[i,v]),H=(0,a.useSyncExternalStore)((0,n.useCallback)(e=>w(v,(t,r)=>{A(r,t)||e()}),[i,v]),P[0],P[1]),z=!I.current,G=U[v]&&U[v].length>0,M=H.data,j=(0,u.isUndefined)(M)?O:M,W=H.error,x=(0,n.useRef)(j),X=p?(0,u.isUndefined)(M)?x.current:M:j,Y=(!G||!!(0,u.isUndefined)(W))&&(z&&!(0,u.isUndefined)(f)?f:!L.current.isPaused()&&(c?!(0,u.isUndefined)(j)&&E:(0,u.isUndefined)(j)||E)),q=!!(v&&t&&z&&Y),B=(0,u.isUndefined)(H.isValidating)?q:H.isValidating,J=(0,u.isUndefined)(H.isLoading)?q:H.isLoading,K=(0,n.useCallback)(async e=>{let t,n,i=N.current;if(!v||!i||T.current||L.current.isPaused())return!1;let a=!0,l=e||{},s=!C[v]||!l.dedupe,c=()=>u.IS_REACT_LEGACY?!T.current&&v===V.current&&I.current:v===V.current,o={isValidating:!1,isLoading:!1},f=()=>{y(o)},E=()=>{let e=C[v];e&&e[1]===n&&delete C[v]},g={isValidating:!0};(0,u.isUndefined)(k().data)&&(g.isLoading=!0);try{if(s&&(y(g),r.loadingTimeout&&(0,u.isUndefined)(k().data)&&setTimeout(()=>{a&&c()&&L.current.onLoadingSlow(v,r)},r.loadingTimeout),C[v]=[i(m),(0,u.getTimestamp)()]),[t,n]=C[v],t=await t,s&&setTimeout(E,r.dedupingInterval),!C[v]||C[v][1]!==n)return s&&c()&&L.current.onDiscarded(v),!1;o.error=u.UNDEFINED;let e=R[v];if(!(0,u.isUndefined)(e)&&(n<=e[0]||n<=e[1]||0===e[1]))return f(),s&&c()&&L.current.onDiscarded(v),!1;let l=k().data;o.data=d(l,t)?l:t,s&&c()&&L.current.onSuccess(t,v,r)}catch(r){E();let e=L.current,{shouldRetryOnError:t}=e;!e.isPaused()&&(o.error=r,s&&c()&&(e.onError(r,v,e),(!0===t||(0,u.isFunction)(t)&&t(r))&&(!L.current.revalidateOnFocus||!L.current.revalidateOnReconnect||S())&&e.onErrorRetry(r,v,e,e=>{let t=U[v];t&&t[0]&&t[0](u.revalidateEvents.ERROR_REVALIDATE_EVENT,e)},{retryCount:(l.retryCount||0)+1,dedupe:!0})))}return a=!1,f(),!0},[v,i]),Q=(0,n.useCallback)((...e)=>(0,u.internalMutate)(i,V.current,...e),[]);if((0,u.useIsomorphicLayoutEffect)(()=>{N.current=t,L.current=r,(0,u.isUndefined)(M)||(x.current=M)}),(0,u.useIsomorphicLayoutEffect)(()=>{if(!v)return;let e=K.bind(u.UNDEFINED,s),t=0,r=(0,u.subscribeCallback)(v,U,(r,n={})=>{if(r==u.revalidateEvents.FOCUS_EVENT){let r=Date.now();L.current.revalidateOnFocus&&r>t&&S()&&(t=r+L.current.focusThrottleInterval,e())}else if(r==u.revalidateEvents.RECONNECT_EVENT)L.current.revalidateOnReconnect&&S()&&e();else if(r==u.revalidateEvents.MUTATE_EVENT)return K();else if(r==u.revalidateEvents.ERROR_REVALIDATE_EVENT)return K(n)});return T.current=!1,V.current=v,I.current=!0,y({_k:m}),Y&&((0,u.isUndefined)(j)||u.IS_SERVER?e():(0,u.rAF)(e)),()=>{T.current=!0,r()}},[v]),(0,u.useIsomorphicLayoutEffect)(()=>{let e;function t(){let t=(0,u.isFunction)(g)?g(k().data):g;t&&-1!==e&&(e=setTimeout(r,t))}function r(){!k().error&&(_||L.current.isVisible())&&(h||L.current.isOnline())?K(s).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[g,_,h,v]),(0,n.useDebugValue)(X),c&&(0,u.isUndefined)(j)&&v){if(!u.IS_REACT_LEGACY&&u.IS_SERVER)throw Error("Fallback data is required when using suspense in SSR.");N.current=t,L.current=r,T.current=!1;let e=b[v];if((0,u.isUndefined)(e)||l(Q(e)),(0,u.isUndefined)(W)){let e=K(s);(0,u.isUndefined)(X)||(e.status="fulfilled",e.value=!0),l(e)}else throw W}return{mutate:Q,get data(){return D.data=!0,X},get error(){return D.error=!0,W},get isValidating(){return D.isValidating=!0,B},get isLoading(){return D.isLoading=!0,J}}}),c=e=>(0,u.serialize)(e?e(0,null):null)[0],o=e=>u.INFINITE_PREFIX+c(e),f=Promise.resolve(),E=e=>(t,r,i)=>{let l,s=(0,n.useRef)(!1),{cache:d,initialSize:o=1,revalidateAll:E=!1,persistSize:g=!1,revalidateFirstPage:_=!0,revalidateOnMount:h=!1,parallel:p=!1}=i,[,,,U]=u.SWRGlobalState.get(u.cache);try{(l=c(t))&&(l=u.INFINITE_PREFIX+l)}catch(e){}let[R,C,b]=(0,u.createCacheHelper)(d,l),v=(0,n.useCallback)(()=>(0,u.isUndefined)(R()._l)?o:R()._l,[d,l,o]);(0,a.useSyncExternalStore)((0,n.useCallback)(e=>l?b(l,()=>{e()}):()=>{},[d,l]),v,v);let m=(0,n.useCallback)(()=>{let e=R()._l;return(0,u.isUndefined)(e)?o:e},[l,o]),I=(0,n.useRef)(m());(0,u.useIsomorphicLayoutEffect)(()=>{if(!s.current){s.current=!0;return}l&&C({_l:g?I.current:m()})},[l,d]);let T=h&&!s.current,V=e(l,async e=>{let n=R()._i,a=R()._r;C({_r:u.UNDEFINED});let l=[],s=m(),[c]=(0,u.createCacheHelper)(d,e),o=c().data,f=[],g=null;for(let e=0;e<s;++e){let[s,c]=(0,u.serialize)(t(e,p?null:g));if(!s)break;let[h,R]=(0,u.createCacheHelper)(d,s),C=h().data,b=E||n||(0,u.isUndefined)(C)||_&&!e&&!(0,u.isUndefined)(o)||T||o&&!(0,u.isUndefined)(o[e])&&!i.compare(o[e],C);if(r&&("function"==typeof a?a(C,c):b)){let t=async()=>{if(s in U){let e=U[s];delete U[s],C=await e}else C=await r(c);R({data:C,_k:c}),l[e]=C};p?f.push(t):await t()}else l[e]=C;p||(g=C)}return p&&await Promise.all(f.map(e=>e())),C({_i:u.UNDEFINED}),l},i),N=(0,n.useCallback)(function(e,t){let r="boolean"==typeof t?{revalidate:t}:t||{},n=!1!==r.revalidate;return l?(n&&((0,u.isUndefined)(e)?C({_i:!0,_r:r.revalidate}):C({_i:!1,_r:r.revalidate})),arguments.length?V.mutate(e,{...r,revalidate:n}):V.mutate()):f},[l,d]),L=(0,n.useCallback)(e=>{let r;if(!l)return f;let[,n]=(0,u.createCacheHelper)(d,l);if((0,u.isFunction)(e)?r=e(m()):"number"==typeof e&&(r=e),"number"!=typeof r)return f;n({_l:r}),I.current=r;let i=[],[a]=(0,u.createCacheHelper)(d,l),s=null;for(let e=0;e<r;++e){let[r]=(0,u.serialize)(t(e,s)),[n]=(0,u.createCacheHelper)(d,r),l=r?n().data:u.UNDEFINED;if((0,u.isUndefined)(l))return N(a().data);i.push(l),s=l}return N(i)},[l,d,N,m]);return{size:m(),setSize:L,mutate:N,get data(){return V.data},get error(){return V.error},get isValidating(){return V.isValidating},get isLoading(){return V.isLoading}}},g=(0,u.withMiddleware)(d,E)}}]);
|
package/dist/859.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_pih_esm_audit_app=globalThis.webpackChunk_pih_esm_audit_app||[]).push([["859"],{4914(t,e,n){var u=n(
|
|
1
|
+
"use strict";(globalThis.webpackChunk_pih_esm_audit_app=globalThis.webpackChunk_pih_esm_audit_app||[]).push([["859"],{4914(t,e,n){var u=n(9485),i="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},o=u.useState,a=u.useEffect,r=u.useLayoutEffect,s=u.useDebugValue;function c(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!i(t,n)}catch(t){return!0}}var f="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(t,e){return e()}:function(t,e){var n=e(),u=o({inst:{value:n,getSnapshot:e}}),i=u[0].inst,f=u[1];return r(function(){i.value=n,i.getSnapshot=e,c(i)&&f({inst:i})},[t,n,e]),a(function(){return c(i)&&f({inst:i}),t(function(){c(i)&&f({inst:i})})},[t]),s(n),n};e.useSyncExternalStore=void 0!==u.useSyncExternalStore?u.useSyncExternalStore:f},9523(t,e,n){t.exports=n(4914)}}]);
|
package/dist/912.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"912.js","sources":["webpack://@pih/esm-audit-app/json|/home/
|
|
1
|
+
{"version":3,"file":"912.js","sources":["webpack://@pih/esm-audit-app/json|/home/runner/work/openmrs-esm-pihemr/openmrs-esm-pihemr/packages/esm-audit-app/translations/es.json"],"names":["JSON"],"mappings":"8HAAA,EAAO,OAAO,CAAGA,KAAK,KAAK,CAAC,8uH"}
|