티스토리 수익 글 보기
“use strict”;(self.webpackChunksubstack=self.webpackChunksubstack||[]).push([[“9535”],{16069:function(e,t){let r;Object.prototype.toString,(r=function(){}).prototype=Object.create(null)},73970:function(e,t,r){r.d(t,{C5:()=>tl,FE:()=>e7,N_:()=>tA,OA:()=>tN,V2:()=>N,Ys:()=>tT,Zp:()=>eG,g:()=>eQ,k2:()=>tj,ok:()=>t_,p:()=>j,pg:()=>to,sv:()=>ts,ue:()=>w,zy:()=>eV});var n,a=r(17402);r(16069),r(65606);/**
* react-router v7.6.2
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/var o=e=>{throw TypeError(e)},i=(e,t,r)=>(t.has(e)||o(“Cannot read from private field”),r?r.call(e):t.get(e)),l=”popstate”;function s(e,t){if(!1===e||null==e)throw Error(t)}function u(e,t){if(!e){“undefined”!=typeof console&&console.warn(t);try{throw Error(t)}catch(e){}}}function c(e,t){return{usr:e.state,key:e.key,idx:t}}function d(e,t,r=null,n){return{pathname:”string”==typeof e?e:e.pathname,search:””,hash:””,…”string”==typeof t?f(t):t,state:r,key:t&&t.key||n||Math.random().toString(36).substring(2,10)}}function h({pathname:e=”/”,search:t=””,hash:r=””}){return t&&”?”!==t&&(e+=”?”===t.charAt(0)?t:”?”+t),r&&”#”!==r&&(e+=”#”===r.charAt(0)?r:”#”+r),e}function f(e){let t={};if(e){let r=e.indexOf(“#”);r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf(“?”);n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function p(e,t=!1){let r=”http://localhost”;”undefined”!=typeof window&&(r=”null”!==window.location.origin?window.location.origin:window.location.href),s(r,”No window.location.(origin|href) available to create URL”);let n=”string”==typeof e?e:h(e);return n=n.replace(/ $/,”%20″),!t&&n.startsWith(“//”)&&(n=r+n),new URL(n,r)}var m=class{constructor(e){if(((e,t,r)=>t.has(e)?o(“Cannot add the same private member more than once”):t instanceof WeakSet?t.add(e):t.set(e,r))(this,n,new Map),e)for(let[t,r]of e)this.set(t,r)}get(e){if(i(this,n).has(e))return i(this,n).get(e);if(void 0!==e.defaultValue)return e.defaultValue;throw Error(“No value found for context”)}set(e,t){i(this,n).set(e,t)}};n=new WeakMap;var y=new Set([“lazy”,”caseSensitive”,”path”,”id”,”index”,”children”]),v=new Set([“lazy”,”caseSensitive”,”path”,”id”,”index”,”unstable_middleware”,”children”]);function g(e,t,r=[],n={}){return e.map((e,a)=>{let o=[…r,String(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={…e,…t(e),id:i};return n[i]=r,r}{let r={…e,…t(e),id:i,children:void 0};return n[i]=r,e.children&&(r.children=g(e.children,t,o,n)),r}})}function w(e,t,r=”/”){return b(e,t,r,!1)}function b(e,t,r,n){let a=C((“string”==typeof t?f(t):t).pathname||”/”,r);if(null==a)return null;let o=function e(t,r=[],n=[],a=””){let o=(t,o,i)=>{var l,u;let c,d,h={relativePath:void 0===i?t.path||””:i,caseSensitive:!0===t.caseSensitive,childrenIndex:o,route:t};h.relativePath.startsWith(“/”)&&(s(h.relativePath.startsWith(a),`Absolute route path “${h.relativePath}” nested under path “${a}” is not valid. An absolute child route path must start with the combined path of all its parent routes.`),h.relativePath=h.relativePath.slice(a.length));let f=M([a,h.relativePath]),p=n.concat(h);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 “${f}”.`),e(t.children,r,p,f)),(null!=t.path||t.index)&&r.push({path:f,score:(l=f,u=t.index,d=(c=l.split(“/”)).length,c.some(x)&&(d+=-2),u&&(d+=2),c.filter(e=>!x(e)).reduce((e,t)=>e+(R.test(t)?3:””===t?1:10),d)),routesMeta:p})};return t.forEach((e,t)=>{if(“”!==e.path&&e.path?.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);o.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 i=null;for(let e=0;null==i&&edecodeURIComponent(e).replace(/\//g,”%2F”)).join(“/”)}catch(t){return u(!1,`The URL path “${e}” could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}(a);i=function(e,t,r=!1){let{routesMeta:n}=e,a={},o=”/”,i=[];for(let e=0;e“*”===e;function S(e,t){“string”==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=function(e,t=!1,r=!0){u(“*”===e||!e.endsWith(“*”)||e.endsWith(“/*”),`Route path “${e}” will be treated as if it were “${e.replace(/\*$/,”/*”)}” because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to “${e.replace(/\*$/,”/*”)}”.`);let n=[],a=”^”+e.replace(/\/*\*?$/,””).replace(/^\/*/,”/”).replace(/[\\.*+^${}|()[\]]/g,”\\$&”).replace(/\/:([\w-]+)(\?)?/g,(e,t,r)=>(n.push({paramName:t,isOptional:null!=r}),r?”/?([^\\/]+)?”:”/([^\\/]+)”));return e.endsWith(“*”)?(n.push({paramName:”*”}),a+=”*”===e||”/*”===e?”(.*)$”:”(?:\\/(.+)|\\/*)$”):r?a+=”\\/*$”:””!==e&&”/”!==e&&(a+=”(?:(?=\\/|$))”),[new RegExp(a,t?void 0:”i”),n]}(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let o=a[0],i=o.replace(/(.)\/+$/,”$1″),l=a.slice(1);return{params:n.reduce((e,{paramName:t,isOptional:r},n)=>{if(“*”===t){let e=l[n]||””;i=o.slice(0,o.length-e.length).replace(/(.)\/+$/,”$1″)}let a=l[n];return r&&!a?e[t]=void 0:e[t]=(a||””).replace(/%2F/g,”/”),e},{}),pathname:o,pathnameBase:i,pattern:e}}function C(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 L(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 and the router will parse it for you.`}function P(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}function k(e){let t=P(e);return t.map((e,r)=>r===t.length-1?e.pathname:e.pathnameBase)}function D(e,t,r,n=!1){let a,o;”string”==typeof e?a=f(e):(s(!(a={…e}).pathname||!a.pathname.includes(“?”),L(“?”,”pathname”,”search”,a)),s(!a.pathname||!a.pathname.includes(“#”),L(“#”,”pathname”,”hash”,a)),s(!a.search||!a.search.includes(“#”),L(“#”,”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 u=function(e,t=”/”){var r;let n,{pathname:a,search:o=””,hash:i=””}=”string”==typeof e?f(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:T(o),hash:O(i)}}(a,o),c=l&&”/”!==l&&l.endsWith(“/”),d=(i||”.”===l)&&r.endsWith(“/”);return!u.pathname.endsWith(“/”)&&(c||d)&&(u.pathname+=”/”),u}var M=e=>e.join(“/”).replace(/\/\/+/g,”/”),$=e=>e.replace(/\/+$/,””).replace(/^\/*/,”/”),T=e=>e&&”?”!==e?e.startsWith(“?”)?e:”?”+e:””,O=e=>e&&”#”!==e?e.startsWith(“#”)?e:”#”+e:””,A=class{constructor(e,t){this.type=”DataWithResponseInit”,this.data=e,this.init=t||null}};function j(e,t){return new A(e,”number”==typeof t?{status:t}:t)}var N=(e,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,{…r,headers:n})},z=class{constructor(e,t,r,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 U(e){return null!=e&&”number”==typeof e.status&&”string”==typeof e.statusText&&”boolean”==typeof e.internal&&”data”in e}var _=[“POST”,”PUT”,”PATCH”,”DELETE”],F=new Set(_),I=new Set([“GET”,…_]),H=new Set([301,302,303,307,308]),W=new Set([307,308]),B=887==r.j?{state:”idle”,location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}:null,Y=887==r.j?{state:”idle”,data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}:null,q=887==r.j?{state:”unblocked”,proceed:void 0,reset:void 0,location:void 0}:null,J=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,V=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),K=”remix-router-transitions”,X=Symbol(“ResetLoaderData”);function G(e,t,r,n,a,o){let i,l;if(a){for(let e of(i=[],t))if(i.push(e),e.route.id===a){l=e;break}}else i=t,l=t[t.length-1];let s=D(n||”.”,k(i),C(e.pathname,r)||e.pathname,”path”===o);if(null==n&&(s.search=e.search,s.hash=e.hash),(null==n||””===n||”.”===n)&&l){let e=eO(s.search);if(l.route.index&&!e)s.search=s.search?s.search.replace(/^\?/,”?index&”):”?index”;else if(!l.route.index&&e){let e=new URLSearchParams(s.search),t=e.getAll(“index”);e.delete(“index”),t.filter(e=>e).forEach(t=>e.append(“index”,t));let r=e.toString();s.search=r?`?${r}`:””}}return”/”!==r&&(s.pathname=”/”===s.pathname?r:M([r,s.pathname])),h(s)}function Z(e,t,r){var n;let a,o;if(!r||!(null!=r&&(“formData”in r&&null!=r.formData||”body”in r&&void 0!==r.body)))return{path:t};if(r.formMethod&&(n=r.formMethod,!I.has(n.toUpperCase())))return{path:t,error:eC(405,{method:r.formMethod})};let i=()=>({path:t,error:eC(400,{type:”invalid-body”})}),l=(r.formMethod||”get”).toUpperCase(),u=eP(t);if(void 0!==r.body){if(“text/plain”===r.formEncType){if(!eT(l))return i();let e=”string”==typeof r.body?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((e,[t,r])=>`${e}${t}=${r}
`,””):String(r.body);return{path:t,submission:{formMethod:l,formAction:u,formEncType:r.formEncType,formData:void 0,json:void 0,text:e}}}else if(“application/json”===r.formEncType){if(!eT(l))return i();try{let e=”string”==typeof r.body?JSON.parse(r.body):r.body;return{path:t,submission:{formMethod:l,formAction:u,formEncType:r.formEncType,formData:void 0,json:e,text:void 0}}}catch(e){return i()}}}if(s(“function”==typeof FormData,”FormData is not available in this environment”),r.formData)a=eg(r.formData),o=r.formData;else if(r.body instanceof FormData)a=eg(r.body),o=r.body;else if(r.body instanceof URLSearchParams)o=ew(a=r.body);else if(null==r.body)a=new URLSearchParams,o=new FormData;else try{a=new URLSearchParams(r.body),o=ew(a)}catch(e){return i()}let c={formMethod:l,formAction:u,formEncType:r&&r.formEncType||”application/x-www-form-urlencoded”,formData:o,json:void 0,text:void 0};if(eT(c.formMethod))return{path:t,submission:c};let d=f(t);return e&&d.search&&eO(d.search)&&a.append(“index”,””),d.search=`?${a}`,{path:h(d),submission:c}}function Q(e,t,r,n,a,o,i,l,s,u,c,d,h,f,p,m,y,v,g,b){let E,R=b?ek(b[1])?b[1].error:b[1].data:void 0,x=a.createURL(o.location),S=a.createURL(s);if(c&&o.errors){let e=Object.keys(o.errors)[0];E=i.findIndex(t=>t.route.id===e)}else if(b&&ek(b[1])){let e=b[0];E=i.findIndex(t=>t.route.id===e)-1}let C=b?b[1].statusCode:void 0,L=C&&C>=400,P={currentUrl:x,currentParams:o.matches[0]?.params||{},nextUrl:S,nextParams:i[0].params,…l,actionResult:R,actionStatus:C},k=i.map((a,i)=>{var l,s,h,f,p;let m,y,v,{route:g}=a,w=null;if(null!=E&&i>E?w=!1:g.lazy?w=!0:null==g.loader?w=!1:c?w=ee(g,o.loaderData,o.errors):(l=o.loaderData,s=o.matches[i],h=a,m=!s||h.route.id!==s.route.id,y=!l.hasOwnProperty(h.route.id),(m||y)&&(w=!0)),null!==w)return ed(r,n,e,a,u,t,w);let b=!L&&(d||x.pathname+x.search===S.pathname+S.search||x.search!==S.search||(f=o.matches[i],p=a,v=f.route.path,f.pathname!==p.pathname||null!=v&&v.endsWith(“*”)&&f.params[“*”]!==p.params[“*”])),R={…P,defaultShouldRevalidate:b},C=et(a,R);return ed(r,n,e,a,u,t,C,R)}),D=[];return p.forEach((e,l)=>{if(c||!i.some(t=>t.route.id===e.routeId)||f.has(l))return;let s=o.fetchers.get(l),p=s&&”idle”!==s.state&&void 0===s.data,b=w(y,e.path,v);if(!b){if(g&&p)return;D.push({key:l,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null});return}if(m.has(l))return;let E=eA(b,e.path),R=new AbortController,x=ev(a,e.path,R.signal),S=null;if(h.has(l))h.delete(l),S=eh(r,n,x,b,E,u,t);else if(p)d&&(S=eh(r,n,x,b,E,u,t));else{let e={…P,defaultShouldRevalidate:!L&&d};et(E,e)&&(S=eh(r,n,x,b,E,u,t,e))}S&&D.push({key:l,routeId:e.routeId,path:e.path,matches:S,match:E,request:x,controller:R})}),{dsMatches:k,revalidatingFetchers:D}}function ee(e,t,r){if(e.lazy)return!0;if(!e.loader)return!1;let n=null!=t&&e.id in t,a=null!=r&&void 0!==r[e.id];return(!!n||!a)&&(“function”==typeof e.loader&&!0===e.loader.hydrate||!n&&!a)}function et(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(“boolean”==typeof r)return r}return t.defaultShouldRevalidate}function er(e,t,r,n,a){let o;if(e){let t=n[e];s(t,`No route found to patch children into: routeId = ${e}`),t.children||(t.children=[]),o=t.children}else o=r;let i=g(t.filter(e=>!o.some(t=>(function e(t,r){return”id”in t&&”id”in r&&t.id===r.id||t.index===r.index&&t.path===r.path&&t.caseSensitive===r.caseSensitive&&((!t.children||0===t.children.length)&&(!r.children||0===r.children.length)||t.children.every((t,n)=>r.children?.some(r=>e(t,r))))})(e,t))),a,[e||”_”,”patch”,String(o?.length||”0″)],n);o.push(…i)}var en=new WeakMap,ea=({key:e,route:t,manifest:r,mapRouteProperties:n})=>{let a=r[t.id];if(s(a,”No route found in manifest”),!a.lazy||”object”!=typeof a.lazy)return;let o=a.lazy[e];if(!o)return;let i=en.get(a);i||(i={},en.set(a,i));let l=i[e];if(l)return l;let c=(async()=>{let t=y.has(e),r=void 0!==a[e]&&”hasErrorBoundary”!==e;if(t)u(!t,”Route property “+e+” is not a supported lazy route property. This property will be ignored.”),i[e]=Promise.resolve();else if(r)u(!1,`Route “${a.id}” has a static property “${e}” defined. The lazy property will be ignored.`);else{let t=await o();null!=t&&(Object.assign(a,{[e]:t}),Object.assign(a,n(a)))}”object”==typeof a.lazy&&(a.lazy[e]=void 0,Object.values(a.lazy).every(e=>void 0===e)&&(a.lazy=void 0))})();return i[e]=c,c},eo=new WeakMap;async function ei(e){let t=e.matches.filter(e=>e.shouldLoad),r={};return(await Promise.all(t.map(e=>e.resolve()))).forEach((e,n)=>{r[t[n].route.id]=e}),r}async function el(e){return e.matches.some(e=>e.route.unstable_middleware)?es(e,!1,()=>ei(e),(e,t)=>({[t]:{type:”error”,result:e}})):ei(e)}async function es(e,t,r,n){let{matches:a,request:o,params:i,context:l}=e,s={handlerResult:void 0};try{let e=a.flatMap(e=>e.route.unstable_middleware?e.route.unstable_middleware.map(t=>[e.route.id,t]):[]),n=await eu({request:o,params:i,context:l},e,t,s,r);return t?n:s.handlerResult}catch(r){if(!s.middlewareError)throw r;let e=await n(s.middlewareError.error,s.middlewareError.routeId);if(t||!s.handlerResult)return e;return Object.assign(s.handlerResult,e)}}async function eu(e,t,r,n,a,o=0){let i,{request:l}=e;if(l.signal.aborted){if(l.signal.reason)throw l.signal.reason;throw Error(`Request aborted without an \`AbortSignal.reason\`: ${l.method} ${l.url}`)}let s=t[o];if(!s)return n.handlerResult=await a(),n.handlerResult;let[u,c]=s,d=!1,h=async()=>{if(d)throw Error(“You may only call `next()` once per middleware”);d=!0;let l=await eu(e,t,r,n,a,o+1);if(r)return i=l};try{let t=await c({request:e.request,params:e.params,context:e.context},h);if(!d)return h();if(void 0===t)return i;return t}catch(e){throw n.middlewareError?n.middlewareError.error!==e&&(n.middlewareError={routeId:u,error:e}):n.middlewareError={routeId:u,error:e},e}}function ec(e,t,r,n,a){let o=ea({key:”unstable_middleware”,route:n.route,manifest:t,mapRouteProperties:e}),i=function(e,t,r,n,a){let o,i=r[e.id];if(s(i,”No route found in manifest”),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(“function”==typeof e.lazy){let t=eo.get(i);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let r=(async()=>{s(“function”==typeof e.lazy,”No lazy route function found”);let t=await e.lazy(),r={};for(let e in t){let n=t[e];if(void 0===n)continue;let a=v.has(e),o=void 0!==i[e]&&”hasErrorBoundary”!==e;a?u(!a,”Route property “+e+” is not a supported property to be returned from a lazy route function. This property will be ignored.”):o?u(!o,`Route “${i.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.`):r[e]=n}Object.assign(i,r),Object.assign(i,{…n(i),lazy:void 0})})();return eo.set(i,r),r.catch(()=>{}),{lazyRoutePromise:r,lazyHandlerPromise:r}}let l=Object.keys(e.lazy),c=[];for(let i of l){if(a&&a.includes(i))continue;let l=ea({key:i,route:e,manifest:r,mapRouteProperties:n});l&&(c.push(l),i===t&&(o=l))}let d=c.length>0?Promise.all(c).then(()=>{}):void 0;return d?.catch(()=>{}),o?.catch(()=>{}),{lazyRoutePromise:d,lazyHandlerPromise:o}}(n.route,eT(r.method)?”action”:”loader”,t,e,a);return{middleware:o,route:i.lazyRoutePromise,handler:i.lazyHandlerPromise}}function ed(e,t,r,n,a,o,i,l=null){let s=!1,u=ec(e,t,r,n,a);return{…n,_lazyPromises:u,shouldLoad:i,unstable_shouldRevalidateArgs:l,unstable_shouldCallHandler:e=>(s=!0,l)?”boolean”==typeof e?et(n,{…l,defaultShouldRevalidate:e}):et(n,l):i,resolve:e=>s||i||e&&”GET”===r.method&&(n.route.lazy||n.route.loader)?ep({request:r,match:n,lazyHandlerPromise:u?.handler,lazyRoutePromise:u?.route,handlerOverride:e,scopedContext:o}):Promise.resolve({type:”data”,result:void 0})}}function eh(e,t,r,n,a,o,i,l=null){return n.map(n=>n.route.id!==a.route.id?{…n,shouldLoad:!1,unstable_shouldRevalidateArgs:l,unstable_shouldCallHandler:()=>!1,_lazyPromises:ec(e,t,r,n,o),resolve:()=>Promise.resolve({type:”data”,result:void 0})}:ed(e,t,r,n,o,i,!0,l))}async function ef(e,t,r,n,a,o){r.some(e=>e._lazyPromises?.middleware)&&await Promise.all(r.map(e=>e._lazyPromises?.middleware));let i={request:t,params:r[0].params,context:a,matches:r},l=o?()=>{throw Error(“You cannot call `unstable_runClientMiddleware()` from a static handler `dataStrategy`. Middleware is run outside of `dataStrategy` during SSR in order to bubble up the Response. You can enable middleware via the `respond` API in `query`/`queryRoute`”)}:e=>es(i,!1,()=>e({…i,fetcherKey:n,unstable_runClientMiddleware:()=>{throw Error(“Cannot call `unstable_runClientMiddleware()` from within an `unstable_runClientMiddleware` handler”)}}),(e,t)=>({[t]:{type:”error”,result:e}})),s=await e({…i,fetcherKey:n,unstable_runClientMiddleware:l});try{await Promise.all(r.flatMap(e=>[e._lazyPromises?.handler,e._lazyPromises?.route]))}catch(e){}return s}async function ep({request:e,match:t,lazyHandlerPromise:r,lazyRoutePromise:n,handlerOverride:a,scopedContext:o}){let i,l,s=eT(e.method),u=s?”action”:”loader”,c=r=>{let n,i=new Promise((e,t)=>n=t);l=()=>n(),e.signal.addEventListener(“abort”,l);let s=n=>”function”!=typeof r?Promise.reject(Error(`You cannot call the handler for a route which defines a boolean “${u}” [routeId: ${t.route.id}]`)):r({request:e,params:t.params,context:o},…void 0!==n?[n]:[]);return Promise.race([(async()=>{try{let e=await (a?a(e=>s(e)):s());return{type:”data”,result:e}}catch(e){return{type:”error”,result:e}}})(),i])};try{let a=s?t.route.action:t.route.loader;if(r||n)if(a){let e,[t]=await Promise.all([c(a).catch(t=>{e=t}),r,n]);if(void 0!==e)throw e;i=t}else{await r;let a=s?t.route.action:t.route.loader;if(a)[i]=await Promise.all([c(a),n]);else{if(“action”!==u)return{type:”data”,result:void 0};let r=new URL(e.url),n=r.pathname+r.search;throw eC(405,{method:e.method,pathname:n,routeId:t.route.id})}}else if(a)i=await c(a);else{let t=new URL(e.url),r=t.pathname+t.search;throw eC(404,{pathname:r})}}catch(e){return{type:”error”,result:e}}finally{l&&e.signal.removeEventListener(“abort”,l)}return i}async function em(e){let{result:t,type:r}=e;if(e$(t)){let e;try{let r=t.headers.get(“Content-Type”);e=r&&/\bapplication\/json\b/.test(r)?null==t.body?null:await t.json():await t.text()}catch(e){return{type:”error”,error:e}}return”error”===r?{type:”error”,error:new z(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:”data”,data:e,statusCode:t.status,headers:t.headers}}if(“error”===r)return eM(t)?t.data instanceof Error?{type:”error”,error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:”error”,error:new z(t.init?.status||500,void 0,t.data),statusCode:U(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:”error”,error:t,statusCode:U(t)?t.status:void 0};return eM(t)?{type:”data”,data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:”data”,data:t}}function ey(e,t,r){if(J.test(e)){let n=new URL(e.startsWith(“//”)?t.protocol+e:e),a=null!=C(n.pathname,r);if(n.origin===t.origin&&a)return n.pathname+n.search+n.hash}return e}function ev(e,t,r,n){let a=e.createURL(eP(t)).toString(),o={signal:r};if(n&&eT(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=eg(n.formData):o.body=n.formData}return new Request(a,o)}function eg(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,”string”==typeof n?n:n.name);return t}function ew(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function eb(e,t,r,n,a,o){let{loaderData:i,errors:l}=function(e,t,r,n=!1,a=!1){let o,i={},l=null,u=!1,c={},d=r&&ek(r[1])?r[1].error:void 0;return e.forEach(r=>{if(!(r.route.id in t))return;let h=r.route.id,f=t[h];if(s(!eD(f),”Cannot handle redirect results in processLoaderData”),ek(f)){let t=f.error;if(void 0!==d&&(t=d,d=void 0),l=l||{},a)l[h]=t;else{let r=ex(e,h);null==l[r.route.id]&&(l[r.route.id]=t)}n||(i[h]=X),u||(u=!0,o=U(f.error)?f.error.status:500),f.headers&&(c[h]=f.headers)}else i[h]=f.data,f.statusCode&&200!==f.statusCode&&!u&&(o=f.statusCode),f.headers&&(c[h]=f.headers)}),void 0!==d&&r&&(l={[r[0]]:d},r[2]&&(i[r[2]]=void 0)),{loaderData:i,errors:l,statusCode:o||200,loaderHeaders:c}}(t,r,n);return a.filter(e=>!e.matches||e.matches.some(e=>e.shouldLoad)).forEach(t=>{let{key:r,match:n,controller:a}=t,i=o[r];if(s(i,”Did not find corresponding fetcher result”),!a||!a.signal.aborted)if(ek(i)){let t=ex(e.matches,n?.route.id);l&&l[t.route.id]||(l={…l,[t.route.id]:i.error}),e.fetchers.delete(r)}else if(eD(i))s(!1,”Unhandled fetcher revalidation redirect”);else{let t=eU(i.data);e.fetchers.set(r,t)}}),{loaderData:i,errors:l}}function eE(e,t,r,n){let a=Object.entries(t).filter(([,e])=>e!==X).reduce((e,[t,r])=>(e[t]=r,e),{});for(let o of r){let r=o.route.id;if(!t.hasOwnProperty(r)&&e.hasOwnProperty(r)&&o.route.loader&&(a[r]=e[r]),n&&n.hasOwnProperty(r))break}return a}function eR(e){return e?ek(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function ex(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 eS(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 eC(e,{pathname:t,routeId:r,method:n,type:a,message:o}={}){let i=”Unknown Server Error”,l=”Unknown @remix-run/router error”;return 400===e?(i=”Bad Request”,n&&t&&r?l=`You made a ${n} request to “${t}” but did not provide a \`loader\` for route “${r}”, so there is no way to handle the request.`:”invalid-body”===a&&(l=”Unable to encode submission body”)):403===e?(i=”Forbidden”,l=`Route “${r}” does not match URL “${t}”`):404===e?(i=”Not Found”,l=`No route matches URL “${t}”`):405===e&&(i=”Method Not Allowed”,n&&t&&r?l=`You made a ${n.toUpperCase()} request to “${t}” but did not provide an \`action\` for route “${r}”, so there is no way to handle the request.`:n&&(l=`Invalid request method “${n.toUpperCase()}”`)),new z(e||500,i,Error(l),!0)}function eL(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e–){let[r,n]=t[e];if(eD(n))return{key:r,result:n}}}function eP(e){return h({…”string”==typeof e?f(e):e,hash:””})}function ek(e){return”error”===e.type}function eD(e){return”redirect”===(e&&e.type)}function eM(e){return”object”==typeof e&&null!=e&&”type”in e&&”data”in e&&”init”in e&&”DataWithResponseInit”===e.type}function e$(e){return null!=e&&”number”==typeof e.status&&”string”==typeof e.statusText&&”object”==typeof e.headers&&void 0!==e.body}function eT(e){return F.has(e.toUpperCase())}function eO(e){return new URLSearchParams(e).getAll(“index”).some(e=>””===e)}function eA(e,t){let r=”string”==typeof t?f(t).search:t.search;if(e[e.length-1].route.index&&eO(r||””))return e[e.length-1];let n=P(e);return n[n.length-1]}function ej(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 eN(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 ez(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 eU(e){return{state:”idle”,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}var e_=a.createContext(null);e_.displayName=”DataRouter”;var eF=a.createContext(null);eF.displayName=”DataRouterState”;var eI=a.createContext({isTransitioning:!1});eI.displayName=”ViewTransition”;var eH=a.createContext(new Map);eH.displayName=”Fetchers”,a.createContext(null).displayName=”Await”;var eW=a.createContext(null);eW.displayName=”Navigation”;var eB=a.createContext(null);eB.displayName=”Location”;var eY=a.createContext({outlet:null,matches:[],isDataRoute:!1});eY.displayName=”Route”;var eq=a.createContext(null);function eJ(){return null!=a.useContext(eB)}function eV(){return s(eJ(),”useLocation() may be used only in the context of a component.”),a.useContext(eB).location}eq.displayName=”RouteError”;var eK=”You should call navigate() in a React.useEffect(), not when your component is first rendered.”;function eX(e){a.useContext(eW).static||a.useLayoutEffect(e)}function eG(){let{isDataRoute:e}=a.useContext(eY);return e?function(){let e,{router:t}=(s(e=a.useContext(e_),e3(“useNavigate”)),e),r=e8(“useNavigate”),n=a.useRef(!1);return eX(()=>{n.current=!0}),a.useCallback(async(e,a={})=>{u(n.current,eK),n.current&&(“number”==typeof e?t.navigate(e):await t.navigate(e,{fromRouteId:r,…a}))},[t,r])}():function(){s(eJ(),”useNavigate() may be used only in the context of a component.”);let e=a.useContext(e_),{basename:t,navigator:r}=a.useContext(eW),{matches:n}=a.useContext(eY),{pathname:o}=eV(),i=JSON.stringify(k(n)),l=a.useRef(!1);return eX(()=>{l.current=!0}),a.useCallback((n,a={})=>{if(u(l.current,eK),!l.current)return;if(“number”==typeof n)return void r.go(n);let s=D(n,JSON.parse(i),o,”path”===a.relative);null==e&&”/”!==t&&(s.pathname=”/”===s.pathname?t:M([t,s.pathname])),(a.replace?r.replace:r.push)(s,a.state,a)},[t,r,i,o,e])}()}var eZ=a.createContext(null);function eQ(){let{matches:e}=a.useContext(eY),t=e[e.length-1];return t?t.params:{}}function e0(e,{relative:t}={}){let{matches:r}=a.useContext(eY),{pathname:n}=eV(),o=JSON.stringify(k(r));return a.useMemo(()=>D(e,JSON.parse(o),n,”path”===t),[e,o,n,t])}var e1=a.createElement(function(){let e,t,r,n=(e=a.useContext(eq),t=e5(“useRouteError”),r=e8(“useRouteError”),void 0!==e?e:t.errors?.[r]),o=U(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),i=n instanceof Error?n.stack:null,l=”rgba(200,200,200, 0.5)”,s={padding:”2px 4px”,backgroundColor:l},u=null;return console.error(“Error handled by React Router default ErrorBoundary:”,n),u=a.createElement(a.Fragment,null,a.createElement(“p”,null,”\uD83D\uDCBF Hey developer \uD83D\uDC4B”),a.createElement(“p”,null,”You can provide a way better UX than this when your app throws errors by providing your own “,a.createElement(“code”,{style:s},”ErrorBoundary”),” or”,” “,a.createElement(“code”,{style:s},”errorElement”),” prop on your route.”)),a.createElement(a.Fragment,null,a.createElement(“h2″,null,”Unexpected Application Error!”),a.createElement(“h3″,{style:{fontStyle:”italic”}},o),i?a.createElement(“pre”,{style:{padding:”0.5rem”,backgroundColor:l}},i):null,u)},null),e4=class extends a.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?a.createElement(eY.Provider,{value:this.props.routeContext},a.createElement(eq.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function e2({routeContext:e,match:t,children:r}){let n=a.useContext(e_);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),a.createElement(eY.Provider,{value:e},r)}function e3(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function e5(e){let t=a.useContext(eF);return s(t,e3(e)),t}function e8(e){let t,r=(s(t=a.useContext(eY),e3(e)),t),n=r.matches[r.matches.length-1];return s(n.route.id,`${e} can only be used on routes that contain a unique “id”`),n.route.id}function e7(){let{matches:e,loaderData:t}=e5(“useMatches”);return a.useMemo(()=>e.map(e=>E(e,t)),[e,t])}var e6={};function e9(e,t,r){t||e6[e]||(e6[e]=!0,u(!1,r))}var te=887==r.j?{}:null;function tt(e,t){e||te[t]||(te[t]=!0,console.warn(t))}function tr(e){let t={hasErrorBoundary:e.hasErrorBoundary||null!=e.ErrorBoundary||null!=e.errorElement};return e.Component&&(e.element&&u(!1,”You should not include both `Component` and `element` on your route – `Component` will be used.”),Object.assign(t,{element:a.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&u(!1,”You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route – `HydrateFallback` will be used.”),Object.assign(t,{hydrateFallbackElement:a.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&u(!1,”You should not include both `ErrorBoundary` and `errorElement` on your route – `ErrorBoundary` will be used.”),Object.assign(t,{errorElement:a.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var tn=887==r.j?[“HydrateFallback”,”hydrateFallbackElement”]:null,ta=class{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 to({router:e,flushSync:t}){let[r,n]=a.useState(e.state),[o,i]=a.useState(),[l,s]=a.useState({isTransitioning:!1}),[u,c]=a.useState(),[d,h]=a.useState(),[f,p]=a.useState(),m=a.useRef(new Map),y=a.useCallback((r,{deletedFetchers:o,flushSync:l,viewTransitionOpts:f})=>{r.fetchers.forEach((e,t)=>{void 0!==e.data&&m.current.set(t,e.data)}),o.forEach(e=>m.current.delete(e)),tt(!1===l||null!=t,’You provided the `flushSync` option to a router update, but you are not using the `` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from “react-router/dom”` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.’);let y=null!=e.window&&null!=e.window.document&&”function”==typeof e.window.document.startViewTransition;if(tt(null==f||y,”You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available.”),!f||!y)return void(t&&l?t(()=>n(r)):a.startTransition(()=>n(r)));if(t&&l){t(()=>{d&&(u&&u.resolve(),d.skipTransition()),s({isTransitioning:!0,flushSync:!0,currentLocation:f.currentLocation,nextLocation:f.nextLocation})});let a=e.window.document.startViewTransition(()=>{t(()=>n(r))});a.finished.finally(()=>{t(()=>{c(void 0),h(void 0),i(void 0),s({isTransitioning:!1})})}),t(()=>h(a));return}d?(u&&u.resolve(),d.skipTransition(),p({state:r,currentLocation:f.currentLocation,nextLocation:f.nextLocation})):(i(r),s({isTransitioning:!0,flushSync:!1,currentLocation:f.currentLocation,nextLocation:f.nextLocation}))},[e.window,t,d,u]);a.useLayoutEffect(()=>e.subscribe(y),[e,y]),a.useEffect(()=>{l.isTransitioning&&!l.flushSync&&c(new ta)},[l]),a.useEffect(()=>{if(u&&o&&e.window){let t=u.promise,r=e.window.document.startViewTransition(async()=>{a.startTransition(()=>n(o)),await t});r.finished.finally(()=>{c(void 0),h(void 0),i(void 0),s({isTransitioning:!1})}),h(r)}},[o,u,e.window]),a.useEffect(()=>{u&&o&&r.location.key===o.location.key&&u.resolve()},[u,d,r.location,o]),a.useEffect(()=>{!l.isTransitioning&&f&&(i(f.state),s({isTransitioning:!0,flushSync:!1,currentLocation:f.currentLocation,nextLocation:f.nextLocation}),p(void 0))},[l.isTransitioning,f]);let v=a.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:t=>e.navigate(t),push:(t,r,n)=>e.navigate(t,{state:r,preventScrollReset:n?.preventScrollReset}),replace:(t,r,n)=>e.navigate(t,{replace:!0,state:r,preventScrollReset:n?.preventScrollReset})}),[e]),g=e.basename||”/”,w=a.useMemo(()=>({router:e,navigator:v,static:!1,basename:g}),[e,v,g]);return a.createElement(a.Fragment,null,a.createElement(e_.Provider,{value:w},a.createElement(eF.Provider,{value:r},a.createElement(eH.Provider,{value:m.current},a.createElement(eI.Provider,{value:l},a.createElement(tu,{basename:g,location:r.location,navigationType:r.historyAction,navigator:v},a.createElement(ti,{routes:e.routes,future:e.future,state:r})))))),null)}var ti=a.memo(function({routes:e,future:t,state:r}){return function(e,t,r,n){let o;s(eJ(),”useRoutes() may be used only in the context of a component.”);let{navigator:i}=a.useContext(eW),{matches:l}=a.useContext(eY),c=l[l.length-1],d=c?c.params:{},h=c?c.pathname:”/”,p=c?c.pathnameBase:”/”,m=c&&c.route;{let e=m&&m.path||””;e9(h,!m||e.endsWith(“*”)||e.endsWith(“*?”),`You rendered descendant (or called \`useRoutes()\`) at “${h}” (under ) but the parent route path has no trailing “*”. This means if you navigate deeper, the parent won’t match anymore and therefore the child routes will never render.
Please change the parent to .`)}let y=eV();if(t){let e=”string”==typeof t?f(t):t;s(“/”===p||e.pathname?.startsWith(p),`When overriding the location using \`\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is “${p}” but pathname “${e.pathname}” was given in the \`location\` prop.`),o=e}else o=y;let v=o.pathname||”/”,g=v;if(“/”!==p){let e=p.replace(/^\//,””).split(“/”);g=”/”+v.replace(/^\//,””).split(“/”).slice(e.length).join(“/”)}let b=w(e,{pathname:g});u(m||null!=b,`No routes matched location “${o.pathname}${o.search}${o.hash}” `),u(null==b||void 0!==b[b.length-1].route.element||void 0!==b[b.length-1].route.Component||void 0!==b[b.length-1].route.lazy,`Matched leaf route at location “${o.pathname}${o.search}${o.hash}” does not have an element or Component. This means it will render an with a null value by default resulting in an “empty” page.`);let E=function(e,t=[],r=null,n=null){if(null==e){if(!r)return null;if(r.errors)e=r.matches;else{if(0!==t.length||r.initialized||!(r.matches.length>0))return null;e=r.matches}}let o=e,i=r?.errors;if(null!=i){let e=o.findIndex(e=>e.route.id&&i?.[e.route.id]!==void 0);s(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(“,”)}`),o=o.slice(0,Math.min(o.length,e+1))}let l=!1,u=-1;if(r)for(let e=0;e=0?o.slice(0,u+1):[o[0]];break}}}return o.reduceRight((e,n,s)=>{let c,d=!1,h=null,f=null;r&&(c=i&&n.route.id?i[n.route.id]:void 0,h=n.route.errorElement||e1,l&&(u<0&&0===s?(e9("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,f=null):u===s&&(d=!0,f=n.route.hydrateFallbackElement||null)));let p=t.concat(o.slice(0,s+1)),m=()=>{let t;return t=c?h:d?f:n.route.Component?a.createElement(n.route.Component,null):n.route.element?n.route.element:e,a.createElement(e2,{match:n,routeContext:{outlet:e,matches:p,isDataRoute:null!=r},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||0===s)?a.createElement(e4,{location:r.location,revalidation:r.revalidation,component:h,error:c,children:m(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):m()},null)}(b&&b.map(e=>Object.assign({},e,{params:Object.assign({},d,e.params),pathname:M([p,i.encodeLocation?i.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:”/”===e.pathnameBase?p:M([p,i.encodeLocation?i.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})),l,r,n);return t&&E?a.createElement(eB.Provider,{value:{location:{pathname:”/”,search:””,hash:””,state:null,key:”default”,…o},navigationType:”POP”}},E):E}(e,void 0,r,t)});function tl({to:e,replace:t,state:r,relative:n}){s(eJ(),” may be used only in the context of a component.”);let{static:o}=a.useContext(eW);u(!o,” must not be used on the initial render in a . This is a no-op, but you should modify your code so the is only ever rendered in response to some user interaction or state change.”);let{matches:i}=a.useContext(eY),{pathname:l}=eV(),c=eG(),d=JSON.stringify(D(e,k(i),l,”path”===n));return a.useEffect(()=>{c(JSON.parse(d),{replace:t,state:r,relative:n})},[c,d,n,t,r]),null}function ts(e){var t;let r;return t=e.context,(r=a.useContext(eY).outlet)?a.createElement(eZ.Provider,{value:t},r):r}function tu({basename:e=”/”,children:t=null,location:r,navigationType:n=”POP”,navigator:o,static:i=!1}){s(!eJ(),”You cannot render a inside another . You should never have more than one in your app.”);let l=e.replace(/^\/*/,”/”),c=a.useMemo(()=>({basename:l,navigator:o,static:i,future:{}}),[l,o,i]);”string”==typeof r&&(r=f(r));let{pathname:d=”/”,search:h=””,hash:p=””,state:m=null,key:y=”default”}=r,v=a.useMemo(()=>{let e=C(d,l);return null==e?null:{location:{pathname:e,search:h,hash:p,state:m,key:y},navigationType:n}},[l,d,h,p,m,y,n]);return(u(null!=v,` is not able to match the URL “${d}${h}${p}” because it does not start with the basename, so the won’t render anything.`),null==v)?null:a.createElement(eW.Provider,{value:c},a.createElement(eB.Provider,{children:t,value:v}))}a.Component;var tc=”get”,td=”application/x-www-form-urlencoded”;function th(e){return null!=e&&”string”==typeof e.tagName}function tf(e=””){return 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]])},[]))}var tp=null,tm=new Set([“application/x-www-form-urlencoded”,”multipart/form-data”,”text/plain”]);function ty(e){return null==e||tm.has(e)?e:(u(!1,`”${e}” is not a valid \`encType\` for \`