@leatcom/portal-sessions 0.0.34 → 0.0.35

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.
@@ -14547,7 +14547,7 @@ function My(e, t) {
14547
14547
  }
14548
14548
  }
14549
14549
  /**
14550
- * React Router v6.23.1
14550
+ * React ProfileRouter v6.23.1
14551
14551
  *
14552
14552
  * Copyright (c) Remix Software Inc.
14553
14553
  *
@@ -14592,7 +14592,7 @@ function $y(e, t) {
14592
14592
  !1,
14593
14593
  // TODO: This error is probably because they somehow have 2 versions of the
14594
14594
  // router loaded. We can help them understand how to avoid that.
14595
- "useHref() may be used only in the context of a <Router> component."
14595
+ "useHref() may be used only in the context of a <ProfileRouter> component."
14596
14596
  ) : Ee(!1));
14597
14597
  let {
14598
14598
  basename: r,
@@ -14618,7 +14618,7 @@ function wn() {
14618
14618
  !1,
14619
14619
  // TODO: This error is probably because they somehow have 2 versions of the
14620
14620
  // router loaded. We can help them understand how to avoid that.
14621
- "useLocation() may be used only in the context of a <Router> component."
14621
+ "useLocation() may be used only in the context of a <ProfileRouter> component."
14622
14622
  ) : Ee(!1)), se.useContext(Xi).location;
14623
14623
  }
14624
14624
  const kc = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
@@ -14636,7 +14636,7 @@ function Uy() {
14636
14636
  !1,
14637
14637
  // TODO: This error is probably because they somehow have 2 versions of the
14638
14638
  // router loaded. We can help them understand how to avoid that.
14639
- "useNavigate() may be used only in the context of a <Router> component."
14639
+ "useNavigate() may be used only in the context of a <ProfileRouter> component."
14640
14640
  ) : Ee(!1));
14641
14641
  let e = se.useContext(Yn), {
14642
14642
  basename: t,
@@ -14690,7 +14690,7 @@ function Hy(e, t, n, r) {
14690
14690
  !1,
14691
14691
  // TODO: This error is probably because they somehow have 2 versions of the
14692
14692
  // router loaded. We can help them understand how to avoid that.
14693
- "useRoutes() may be used only in the context of a <Router> component."
14693
+ "useRoutes() may be used only in the context of a <ProfileRouter> component."
14694
14694
  ) : Ee(!1));
14695
14695
  let {
14696
14696
  navigator: i
@@ -14735,7 +14735,7 @@ function Ky() {
14735
14735
  padding: "2px 4px",
14736
14736
  backgroundColor: r
14737
14737
  }, s = null;
14738
- return process.env.NODE_ENV !== "production" && (console.error("Error handled by React Router default ErrorBoundary:", e), s = /* @__PURE__ */ se.createElement(se.Fragment, null, /* @__PURE__ */ se.createElement("p", null, "💿 Hey developer 👋"), /* @__PURE__ */ se.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /* @__PURE__ */ se.createElement("code", {
14738
+ return process.env.NODE_ENV !== "production" && (console.error("Error handled by React ProfileRouter default ErrorBoundary:", e), s = /* @__PURE__ */ se.createElement(se.Fragment, null, /* @__PURE__ */ se.createElement("p", null, "💿 Hey developer 👋"), /* @__PURE__ */ se.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /* @__PURE__ */ se.createElement("code", {
14739
14739
  style: a
14740
14740
  }, "ErrorBoundary"), " or", " ", /* @__PURE__ */ se.createElement("code", {
14741
14741
  style: a
@@ -14773,7 +14773,7 @@ class qy extends se.Component {
14773
14773
  };
14774
14774
  }
14775
14775
  componentDidCatch(t, n) {
14776
- console.error("React Router caught the following error during render", t, n);
14776
+ console.error("React ProfileRouter caught the following error during render", t, n);
14777
14777
  }
14778
14778
  render() {
14779
14779
  return this.state.error !== void 0 ? /* @__PURE__ */ se.createElement(Gt.Provider, {
@@ -14913,7 +14913,7 @@ function tv(e) {
14913
14913
  static: s = !1,
14914
14914
  future: c
14915
14915
  } = e;
14916
- Gr() && (process.env.NODE_ENV !== "production" ? Ee(!1, "You cannot render a <Router> inside another <Router>. You should never have more than one in your app.") : Ee(!1));
14916
+ Gr() && (process.env.NODE_ENV !== "production" ? Ee(!1, "You cannot render a <ProfileRouter> inside another <ProfileRouter>. You should never have more than one in your app.") : Ee(!1));
14917
14917
  let f = t.replace(/^\/*/, "/"), g = se.useMemo(() => ({
14918
14918
  basename: f,
14919
14919
  navigator: a,
@@ -14942,7 +14942,7 @@ function tv(e) {
14942
14942
  navigationType: i
14943
14943
  };
14944
14944
  }, [f, h, x, l, v, o, i]);
14945
- return process.env.NODE_ENV !== "production" && pt(u != null, '<Router basename="' + f + '"> is not able to match the URL ' + ('"' + h + x + l + '" because it does not start with the ') + "basename, so the <Router> won't render anything."), u == null ? null : /* @__PURE__ */ se.createElement(Wt.Provider, {
14945
+ return process.env.NODE_ENV !== "production" && pt(u != null, '<ProfileRouter basename="' + f + '"> is not able to match the URL ' + ('"' + h + x + l + '" because it does not start with the ') + "basename, so the <ProfileRouter> won't render anything."), u == null ? null : /* @__PURE__ */ se.createElement(Wt.Provider, {
14946
14946
  value: g
14947
14947
  }, /* @__PURE__ */ se.createElement(Xi.Provider, {
14948
14948
  children: n,
@@ -14985,7 +14985,7 @@ function Qn(e, t) {
14985
14985
  }).initialize();
14986
14986
  }
14987
14987
  /**
14988
- * React Router DOM v6.23.1
14988
+ * React ProfileRouter DOM v6.23.1
14989
14989
  *
14990
14990
  * Copyright (c) Remix Software Inc.
14991
14991
  *
@@ -81,7 +81,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
81
81
  * @license MIT
82
82
  */function nt(){return nt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nt.apply(this,arguments)}var at;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(at||(at={}));function xg(e){e===void 0&&(e={});let{initialEntries:t=["/"],initialIndex:n,v5Compat:r=!1}=e,o;o=t.map((v,i)=>h(v,typeof v=="string"?null:v.state,i===0?"default":void 0));let a=f(n??o.length-1),s=at.Pop,u=null;function f(v){return Math.min(Math.max(v,0),o.length-1)}function g(){return o[a]}function h(v,i,c){i===void 0&&(i=null);let p=Sa(o?g().pathname:"/",v,i,c);return ct(p.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(v)),p}function x(v){return typeof v=="string"?v:Pn(v)}return{get index(){return a},get action(){return s},get location(){return g()},createHref:x,createURL(v){return new URL(x(v),"http://localhost")},encodeLocation(v){let i=typeof v=="string"?rn(v):v;return{pathname:i.pathname||"",search:i.search||"",hash:i.hash||""}},push(v,i){s=at.Push;let c=h(v,i);a+=1,o.splice(a,o.length,c),r&&u&&u({action:s,location:c,delta:1})},replace(v,i){s=at.Replace;let c=h(v,i);o[a]=c,r&&u&&u({action:s,location:c,delta:0})},go(v){s=at.Pop;let i=f(a+v),c=o[i];a=i,u&&u({action:s,location:c,delta:v})},listen(v){return u=v,()=>{u=null}}}}function ke(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ct(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function kg(){return Math.random().toString(36).substr(2,8)}function Sa(e,t,n,r){return n===void 0&&(n=null),nt({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?rn(t):t,{state:n,key:t&&t.key||r||kg()})}function Pn(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function rn(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}var Ze;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Ze||(Ze={}));const Cg=new Set(["lazy","caseSensitive","path","id","index","children"]);function Eg(e){return e.index===!0}function Pa(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((o,a)=>{let s=[...n,a],u=typeof o.id=="string"?o.id:s.join("-");if(ke(o.index!==!0||!o.children,"Cannot specify children on an index route"),ke(!r[u],'Found a route id collision on id "'+u+`". Route id's must be globally unique within Data Router usages`),Eg(o)){let f=nt({},o,t(o),{id:u});return r[u]=f,f}else{let f=nt({},o,t(o),{id:u,children:void 0});return r[u]=f,o.children&&(f.children=Pa(o.children,t,s,r)),f}})}function qn(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?rn(t):t,o=Vt(r.pathname||"/",n);if(o==null)return null;let a=eu(e);Pg(a);let s=null;for(let u=0;s==null&&u<a.length;++u){let f=Dg(o);s=Lg(a[u],f)}return s}function Sg(e,t){let{route:n,pathname:r,params:o}=e;return{id:n.id,pathname:r,params:o,data:t[n.id],handle:n.handle}}function eu(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let o=(a,s,u)=>{let f={relativePath:u===void 0?a.path||"":u,caseSensitive:a.caseSensitive===!0,childrenIndex:s,route:a};f.relativePath.startsWith("/")&&(ke(f.relativePath.startsWith(r),'Absolute route path "'+f.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),f.relativePath=f.relativePath.slice(r.length));let g=Qt([r,f.relativePath]),h=n.concat(f);a.children&&a.children.length>0&&(ke(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+g+'".')),eu(a.children,t,h,g)),!(a.path==null&&!a.index)&&t.push({path:g,score:jg(g,a.index),routesMeta:h})};return e.forEach((a,s)=>{var u;if(a.path===""||!((u=a.path)!=null&&u.includes("?")))o(a,s);else for(let f of tu(a.path))o(a,s,f)}),t}function tu(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),a=n.replace(/\?$/,"");if(r.length===0)return o?[a,""]:[a];let s=tu(r.join("/")),u=[];return u.push(...s.map(f=>f===""?a:[a,f].join("/"))),o&&u.push(...s),u.map(f=>e.startsWith("/")&&f===""?"/":f)}function Pg(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Ag(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Bg=/^:[\w-]+$/,Og=3,_g=2,Rg=1,Tg=10,Ng=-2,nu=e=>e==="*";function jg(e,t){let n=e.split("/"),r=n.length;return n.some(nu)&&(r+=Ng),t&&(r+=_g),n.filter(o=>!nu(o)).reduce((o,a)=>o+(Bg.test(a)?Og:a===""?Rg:Tg),r)}function Ag(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function Lg(e,t){let{routesMeta:n}=e,r={},o="/",a=[];for(let s=0;s<n.length;++s){let u=n[s],f=s===n.length-1,g=o==="/"?t:t.slice(o.length)||"/",h=Ba({path:u.relativePath,caseSensitive:u.caseSensitive,end:f},g);if(!h)return null;Object.assign(r,h.params);let x=u.route;a.push({params:r,pathname:Qt([o,h.pathname]),pathnameBase:Ug(Qt([o,h.pathnameBase])),route:x}),h.pathnameBase!=="/"&&(o=Qt([o,h.pathnameBase]))}return a}function Ba(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Ig(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let a=o[0],s=a.replace(/(.)\/+$/,"$1"),u=o.slice(1);return{params:r.reduce((g,h,x)=>{let{paramName:l,isOptional:v}=h;if(l==="*"){let c=u[x]||"";s=a.slice(0,a.length-c.length).replace(/(.)\/+$/,"$1")}const i=u[x];return v&&!i?g[l]=void 0:g[l]=(i||"").replace(/%2F/g,"/"),g},{}),pathname:a,pathnameBase:s,pattern:e}}function Ig(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),ct(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,u,f)=>(r.push({paramName:u,isOptional:f!=null}),f?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function Dg(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ct(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Vt(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function Mg(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?rn(e):e;return{pathname:n?n.startsWith("/")?n:Fg(n,t):t,search:$g(r),hash:Vg(o)}}function Fg(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function Oa(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function ru(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function _a(e,t){let n=ru(e);return t?n.map((r,o)=>o===e.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Ra(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=rn(e):(o=nt({},e),ke(!o.pathname||!o.pathname.includes("?"),Oa("?","pathname","search",o)),ke(!o.pathname||!o.pathname.includes("#"),Oa("#","pathname","hash",o)),ke(!o.search||!o.search.includes("#"),Oa("#","search","hash",o)));let a=e===""||o.pathname==="",s=a?"/":o.pathname,u;if(s==null)u=n;else{let x=t.length-1;if(!r&&s.startsWith("..")){let l=s.split("/");for(;l[0]==="..";)l.shift(),x-=1;o.pathname=l.join("/")}u=x>=0?t[x]:"/"}let f=Mg(o,u),g=s&&s!=="/"&&s.endsWith("/"),h=(a||s===".")&&n.endsWith("/");return!f.pathname.endsWith("/")&&(g||h)&&(f.pathname+="/"),f}const Qt=e=>e.join("/").replace(/\/\/+/g,"/"),Ug=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),$g=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Vg=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class ou{constructor(t,n,r,o){o===void 0&&(o=!1),this.status=t,this.statusText=n||"",this.internal=o,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function Ta(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const iu=["post","put","patch","delete"],Hg=new Set(iu),zg=["get",...iu],qg=new Set(zg),Kg=new Set([301,302,303,307,308]),Wg=new Set([307,308]),Na={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Gg={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Mr={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},ja=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Xg=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),au="remix-router-transitions";function Jg(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;ke(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let o;if(e.mapRouteProperties)o=e.mapRouteProperties;else if(e.detectErrorBoundary){let A=e.detectErrorBoundary;o=z=>({hasErrorBoundary:A(z)})}else o=Xg;let a={},s=Pa(e.routes,o,void 0,a),u,f=e.basename||"/",g=e.unstable_dataStrategy||ey,h=nt({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,unstable_skipActionErrorRevalidation:!1},e.future),x=null,l=new Set,v=null,i=null,c=null,p=e.hydrationData!=null,d=qn(s,e.history.location,f),m=null;if(d==null){let A=Nt(404,{pathname:e.history.location.pathname}),{matches:z,route:Y}=yu(s);d=z,m={[Y.id]:A}}let y,b=d.some(A=>A.route.lazy),C=d.some(A=>A.route.loader);if(b)y=!1;else if(!C)y=!0;else if(h.v7_partialHydration){let A=e.hydrationData?e.hydrationData.loaderData:null,z=e.hydrationData?e.hydrationData.errors:null,Y=ie=>ie.route.loader?typeof ie.route.loader=="function"&&ie.route.loader.hydrate===!0?!1:A&&A[ie.route.id]!==void 0||z&&z[ie.route.id]!==void 0:!0;if(z){let ie=d.findIndex(he=>z[he.route.id]!==void 0);y=d.slice(0,ie+1).every(Y)}else y=d.every(Y)}else y=e.hydrationData!=null;let S,k={historyAction:e.history.action,location:e.history.location,matches:d,initialized:y,navigation:Na,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||m,fetchers:new Map,blockers:new Map},B=at.Pop,O=!1,j,I=!1,D=new Map,M=null,$=!1,P=!1,L=[],q=[],K=new Map,Q=0,Z=-1,ee=new Map,ue=new Set,ne=new Map,me=new Map,de=new Set,V=new Map,U=new Map,J=!1;function w(){if(x=e.history.listen(A=>{let{action:z,location:Y,delta:ie}=A;if(J){J=!1;return}ct(U.size===0||ie!=null,"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 he=Wt({currentLocation:k.location,nextLocation:Y,historyAction:z});if(he&&ie!=null){J=!0,e.history.go(ie*-1),ht(he,{state:"blocked",location:Y,proceed(){ht(he,{state:"proceeding",proceed:void 0,reset:void 0,location:Y}),e.history.go(ie)},reset(){let Pe=new Map(k.blockers);Pe.set(he,Mr),R({blockers:Pe})}});return}return F(z,Y)}),n){fy(t,D);let A=()=>hy(t,D);t.addEventListener("pagehide",A),M=()=>t.removeEventListener("pagehide",A)}return k.initialized||F(at.Pop,k.location,{initialHydration:!0}),S}function _(){x&&x(),M&&M(),l.clear(),j&&j.abort(),k.fetchers.forEach((A,z)=>wt(z)),k.blockers.forEach((A,z)=>mt(z))}function N(A){return l.add(A),()=>l.delete(A)}function R(A,z){z===void 0&&(z={}),k=nt({},k,A);let Y=[],ie=[];h.v7_fetcherPersist&&k.fetchers.forEach((he,Pe)=>{he.state==="idle"&&(de.has(Pe)?ie.push(Pe):Y.push(Pe))}),[...l].forEach(he=>he(k,{deletedFetchers:ie,unstable_viewTransitionOpts:z.viewTransitionOpts,unstable_flushSync:z.flushSync===!0})),h.v7_fetcherPersist&&(Y.forEach(he=>k.fetchers.delete(he)),ie.forEach(he=>wt(he)))}function W(A,z,Y){var ie,he;let{flushSync:Pe}=Y===void 0?{}:Y,we=k.actionData!=null&&k.navigation.formMethod!=null&&Ht(k.navigation.formMethod)&&k.navigation.state==="loading"&&((ie=A.state)==null?void 0:ie._isRedirect)!==!0,ve;z.actionData?Object.keys(z.actionData).length>0?ve=z.actionData:ve=null:we?ve=k.actionData:ve=null;let Re=z.loaderData?mu(k.loaderData,z.loaderData,z.matches||[],z.errors):k.loaderData,_e=k.blockers;_e.size>0&&(_e=new Map(_e),_e.forEach((Se,T)=>_e.set(T,Mr)));let dt=O===!0||k.navigation.formMethod!=null&&Ht(k.navigation.formMethod)&&((he=A.state)==null?void 0:he._isRedirect)!==!0;u&&(s=u,u=void 0),$||B===at.Pop||(B===at.Push?e.history.push(A,A.state):B===at.Replace&&e.history.replace(A,A.state));let ft;if(B===at.Pop){let Se=D.get(k.location.pathname);Se&&Se.has(A.pathname)?ft={currentLocation:k.location,nextLocation:A}:D.has(A.pathname)&&(ft={currentLocation:A,nextLocation:k.location})}else if(I){let Se=D.get(k.location.pathname);Se?Se.add(A.pathname):(Se=new Set([A.pathname]),D.set(k.location.pathname,Se)),ft={currentLocation:k.location,nextLocation:A}}R(nt({},z,{actionData:ve,loaderData:Re,historyAction:B,location:A,initialized:!0,navigation:Na,revalidation:"idle",restoreScrollPosition:on(A,z.matches||k.matches),preventScrollReset:dt,blockers:_e}),{viewTransitionOpts:ft,flushSync:Pe===!0}),B=at.Pop,O=!1,I=!1,$=!1,P=!1,L=[],q=[]}async function G(A,z){if(typeof A=="number"){e.history.go(A);return}let Y=Aa(k.location,k.matches,f,h.v7_prependBasename,A,h.v7_relativeSplatPath,z==null?void 0:z.fromRouteId,z==null?void 0:z.relative),{path:ie,submission:he,error:Pe}=su(h.v7_normalizeFormMethod,!1,Y,z),we=k.location,ve=Sa(k.location,ie,z&&z.state);ve=nt({},ve,e.history.encodeLocation(ve));let Re=z&&z.replace!=null?z.replace:void 0,_e=at.Push;Re===!0?_e=at.Replace:Re===!1||he!=null&&Ht(he.formMethod)&&he.formAction===k.location.pathname+k.location.search&&(_e=at.Replace);let dt=z&&"preventScrollReset"in z?z.preventScrollReset===!0:void 0,ft=(z&&z.unstable_flushSync)===!0,Se=Wt({currentLocation:we,nextLocation:ve,historyAction:_e});if(Se){ht(Se,{state:"blocked",location:ve,proceed(){ht(Se,{state:"proceeding",proceed:void 0,reset:void 0,location:ve}),G(A,z)},reset(){let T=new Map(k.blockers);T.set(Se,Mr),R({blockers:T})}});return}return await F(_e,ve,{submission:he,pendingError:Pe,preventScrollReset:dt,replace:z&&z.replace,enableViewTransition:z&&z.unstable_viewTransition,flushSync:ft})}function X(){if(Fe(),R({revalidation:"loading"}),k.navigation.state!=="submitting"){if(k.navigation.state==="idle"){F(k.historyAction,k.location,{startUninterruptedRevalidation:!0});return}F(B||k.historyAction,k.navigation.location,{overrideNavigation:k.navigation})}}async function F(A,z,Y){j&&j.abort(),j=null,B=A,$=(Y&&Y.startUninterruptedRevalidation)===!0,xt(k.location,k.matches),O=(Y&&Y.preventScrollReset)===!0,I=(Y&&Y.enableViewTransition)===!0;let ie=u||s,he=Y&&Y.overrideNavigation,Pe=qn(ie,z,f),we=(Y&&Y.flushSync)===!0;if(!Pe){let Se=Nt(404,{pathname:z.pathname}),{matches:T,route:se}=yu(ie);gt(),W(z,{matches:T,loaderData:{},errors:{[se.id]:Se}},{flushSync:we});return}if(k.initialized&&!P&&ay(k.location,z)&&!(Y&&Y.submission&&Ht(Y.submission.formMethod))){W(z,{matches:Pe},{flushSync:we});return}j=new AbortController;let ve=Kn(e.history,z,j.signal,Y&&Y.submission),Re;if(Y&&Y.pendingError)Re=[Fr(Pe).route.id,{type:Ze.error,error:Y.pendingError}];else if(Y&&Y.submission&&Ht(Y.submission.formMethod)){let Se=await ce(ve,z,Y.submission,Pe,{replace:Y.replace,flushSync:we});if(Se.shortCircuited)return;Re=Se.pendingActionResult,he=Ma(z,Y.submission),we=!1,ve=Kn(e.history,ve.url,ve.signal)}let{shortCircuited:_e,loaderData:dt,errors:ft}=await fe(ve,z,Pe,he,Y&&Y.submission,Y&&Y.fetcherSubmission,Y&&Y.replace,Y&&Y.initialHydration===!0,we,Re);_e||(j=null,W(z,nt({matches:Pe},gu(Re),{loaderData:dt,errors:ft})))}async function ce(A,z,Y,ie,he){he===void 0&&(he={}),Fe();let Pe=uy(z,Y);R({navigation:Pe},{flushSync:he.flushSync===!0});let we,ve=Da(ie,z);if(!ve.route.action&&!ve.route.lazy)we={type:Ze.error,error:Nt(405,{method:A.method,pathname:z.pathname,routeId:ve.route.id})};else if(we=(await be("action",A,[ve],ie))[0],A.signal.aborted)return{shortCircuited:!0};if(On(we)){let Re;return he&&he.replace!=null?Re=he.replace:Re=fu(we.response.headers.get("Location"),new URL(A.url),f)===k.location.pathname+k.location.search,await ae(A,we,{submission:Y,replace:Re}),{shortCircuited:!0}}if(Bn(we))throw Nt(400,{type:"defer-action"});if(jt(we)){let Re=Fr(ie,ve.route.id);return(he&&he.replace)!==!0&&(B=at.Push),{pendingActionResult:[Re.route.id,we]}}return{pendingActionResult:[ve.route.id,we]}}async function fe(A,z,Y,ie,he,Pe,we,ve,Re,_e){let dt=ie||Ma(z,he),ft=he||Pe||Cu(dt),Se=u||s,[T,se]=lu(e.history,k,Y,ft,z,h.v7_partialHydration&&ve===!0,h.unstable_skipActionErrorRevalidation,P,L,q,de,ne,ue,Se,f,_e);if(gt(Oe=>!(Y&&Y.some(rt=>rt.route.id===Oe))||T&&T.some(rt=>rt.route.id===Oe)),Z=++Q,T.length===0&&se.length===0){let Oe=Ee();return W(z,nt({matches:Y,loaderData:{},errors:_e&&jt(_e[1])?{[_e[0]]:_e[1].error}:null},gu(_e),Oe?{fetchers:new Map(k.fetchers)}:{}),{flushSync:Re}),{shortCircuited:!0}}if(!$&&(!h.v7_partialHydration||!ve)){se.forEach(rt=>{let lt=k.fetchers.get(rt.key),He=Ur(void 0,lt?lt.data:void 0);k.fetchers.set(rt.key,He)});let Oe;_e&&!jt(_e[1])?Oe={[_e[0]]:_e[1].data}:k.actionData&&(Object.keys(k.actionData).length===0?Oe=null:Oe=k.actionData),R(nt({navigation:dt},Oe!==void 0?{actionData:Oe}:{},se.length>0?{fetchers:new Map(k.fetchers)}:{}),{flushSync:Re})}se.forEach(Oe=>{K.has(Oe.key)&&et(Oe.key),Oe.controller&&K.set(Oe.key,Oe.controller)});let ye=()=>se.forEach(Oe=>et(Oe.key));j&&j.signal.addEventListener("abort",ye);let{loaderResults:xe,fetcherResults:Ie}=await Ce(k.matches,Y,T,se,A);if(A.signal.aborted)return{shortCircuited:!0};j&&j.signal.removeEventListener("abort",ye),se.forEach(Oe=>K.delete(Oe.key));let Ue=vu([...xe,...Ie]);if(Ue){if(Ue.idx>=T.length){let Oe=se[Ue.idx-T.length].key;ue.add(Oe)}return await ae(A,Ue.result,{replace:we}),{shortCircuited:!0}}let{loaderData:je,errors:Be}=pu(k,Y,T,xe,_e,se,Ie,V);V.forEach((Oe,rt)=>{Oe.subscribe(lt=>{(lt||Oe.done)&&V.delete(rt)})}),h.v7_partialHydration&&ve&&k.errors&&Object.entries(k.errors).filter(Oe=>{let[rt]=Oe;return!T.some(lt=>lt.route.id===rt)}).forEach(Oe=>{let[rt,lt]=Oe;Be=Object.assign(Be||{},{[rt]:lt})});let st=Ee(),Ge=Lt(Z),Xe=st||Ge||se.length>0;return nt({loaderData:je,errors:Be},Xe?{fetchers:new Map(k.fetchers)}:{})}function re(A,z,Y,ie){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");K.has(A)&&et(A);let he=(ie&&ie.unstable_flushSync)===!0,Pe=u||s,we=Aa(k.location,k.matches,f,h.v7_prependBasename,Y,h.v7_relativeSplatPath,z,ie==null?void 0:ie.relative),ve=qn(Pe,we,f);if(!ve){Ve(A,z,Nt(404,{pathname:we}),{flushSync:he});return}let{path:Re,submission:_e,error:dt}=su(h.v7_normalizeFormMethod,!0,we,ie);if(dt){Ve(A,z,dt,{flushSync:he});return}let ft=Da(ve,Re);if(O=(ie&&ie.preventScrollReset)===!0,_e&&Ht(_e.formMethod)){oe(A,z,Re,ft,ve,he,_e);return}ne.set(A,{routeId:z,path:Re}),ge(A,z,Re,ft,ve,he,_e)}async function oe(A,z,Y,ie,he,Pe,we){if(Fe(),ne.delete(A),!ie.route.action&&!ie.route.lazy){let He=Nt(405,{method:we.formMethod,pathname:Y,routeId:z});Ve(A,z,He,{flushSync:Pe});return}let ve=k.fetchers.get(A);Ae(A,dy(we,ve),{flushSync:Pe});let Re=new AbortController,_e=Kn(e.history,Y,Re.signal,we);K.set(A,Re);let dt=Q,Se=(await be("action",_e,[ie],he))[0];if(_e.signal.aborted){K.get(A)===Re&&K.delete(A);return}if(h.v7_fetcherPersist&&de.has(A)){if(On(Se)||jt(Se)){Ae(A,yn(void 0));return}}else{if(On(Se))if(K.delete(A),Z>dt){Ae(A,yn(void 0));return}else return ue.add(A),Ae(A,Ur(we)),ae(_e,Se,{fetcherSubmission:we});if(jt(Se)){Ve(A,z,Se.error);return}}if(Bn(Se))throw Nt(400,{type:"defer-action"});let T=k.navigation.location||k.location,se=Kn(e.history,T,Re.signal),ye=u||s,xe=k.navigation.state!=="idle"?qn(ye,k.navigation.location,f):k.matches;ke(xe,"Didn't find any matches after fetcher action");let Ie=++Q;ee.set(A,Ie);let Ue=Ur(we,Se.data);k.fetchers.set(A,Ue);let[je,Be]=lu(e.history,k,xe,we,T,!1,h.unstable_skipActionErrorRevalidation,P,L,q,de,ne,ue,ye,f,[ie.route.id,Se]);Be.filter(He=>He.key!==A).forEach(He=>{let an=He.key,Go=k.fetchers.get(an),Wa=Ur(void 0,Go?Go.data:void 0);k.fetchers.set(an,Wa),K.has(an)&&et(an),He.controller&&K.set(an,He.controller)}),R({fetchers:new Map(k.fetchers)});let st=()=>Be.forEach(He=>et(He.key));Re.signal.addEventListener("abort",st);let{loaderResults:Ge,fetcherResults:Xe}=await Ce(k.matches,xe,je,Be,se);if(Re.signal.aborted)return;Re.signal.removeEventListener("abort",st),ee.delete(A),K.delete(A),Be.forEach(He=>K.delete(He.key));let Oe=vu([...Ge,...Xe]);if(Oe){if(Oe.idx>=je.length){let He=Be[Oe.idx-je.length].key;ue.add(He)}return ae(se,Oe.result)}let{loaderData:rt,errors:lt}=pu(k,k.matches,je,Ge,void 0,Be,Xe,V);if(k.fetchers.has(A)){let He=yn(Se.data);k.fetchers.set(A,He)}Lt(Ie),k.navigation.state==="loading"&&Ie>Z?(ke(B,"Expected pending action"),j&&j.abort(),W(k.navigation.location,{matches:xe,loaderData:rt,errors:lt,fetchers:new Map(k.fetchers)})):(R({errors:lt,loaderData:mu(k.loaderData,rt,xe,lt),fetchers:new Map(k.fetchers)}),P=!1)}async function ge(A,z,Y,ie,he,Pe,we){let ve=k.fetchers.get(A);Ae(A,Ur(we,ve?ve.data:void 0),{flushSync:Pe});let Re=new AbortController,_e=Kn(e.history,Y,Re.signal);K.set(A,Re);let dt=Q,Se=(await be("loader",_e,[ie],he))[0];if(Bn(Se)&&(Se=await ku(Se,_e.signal,!0)||Se),K.get(A)===Re&&K.delete(A),!_e.signal.aborted){if(de.has(A)){Ae(A,yn(void 0));return}if(On(Se))if(Z>dt){Ae(A,yn(void 0));return}else{ue.add(A),await ae(_e,Se);return}if(jt(Se)){Ve(A,z,Se.error);return}ke(!Bn(Se),"Unhandled fetcher deferred data"),Ae(A,yn(Se.data))}}async function ae(A,z,Y){let{submission:ie,fetcherSubmission:he,replace:Pe}=Y===void 0?{}:Y;z.response.headers.has("X-Remix-Revalidate")&&(P=!0);let we=z.response.headers.get("Location");ke(we,"Expected a Location header on the redirect Response"),we=fu(we,new URL(A.url),f);let ve=Sa(k.location,we,{_isRedirect:!0});if(n){let T=!1;if(z.response.headers.has("X-Remix-Reload-Document"))T=!0;else if(ja.test(we)){const se=e.history.createURL(we);T=se.origin!==t.location.origin||Vt(se.pathname,f)==null}if(T){Pe?t.location.replace(we):t.location.assign(we);return}}j=null;let Re=Pe===!0?at.Replace:at.Push,{formMethod:_e,formAction:dt,formEncType:ft}=k.navigation;!ie&&!he&&_e&&dt&&ft&&(ie=Cu(k.navigation));let Se=ie||he;if(Wg.has(z.response.status)&&Se&&Ht(Se.formMethod))await F(Re,ve,{submission:nt({},Se,{formAction:we}),preventScrollReset:O});else{let T=Ma(ve,ie);await F(Re,ve,{overrideNavigation:T,fetcherSubmission:he,preventScrollReset:O})}}async function be(A,z,Y,ie){try{let he=await ty(g,A,z,Y,ie,a,o);return await Promise.all(he.map((Pe,we)=>{if(sy(Pe)){let ve=Pe.result;return{type:Ze.redirect,response:oy(ve,z,Y[we].route.id,ie,f,h.v7_relativeSplatPath)}}return ry(Pe)}))}catch(he){return Y.map(()=>({type:Ze.error,error:he}))}}async function Ce(A,z,Y,ie,he){let[Pe,...we]=await Promise.all([Y.length?be("loader",he,Y,z):[],...ie.map(ve=>{if(ve.matches&&ve.match&&ve.controller){let Re=Kn(e.history,ve.path,ve.controller.signal);return be("loader",Re,[ve.match],ve.matches).then(_e=>_e[0])}else return Promise.resolve({type:Ze.error,error:Nt(404,{pathname:ve.path})})})]);return await Promise.all([xu(A,Y,Pe,Pe.map(()=>he.signal),!1,k.loaderData),xu(A,ie.map(ve=>ve.match),we,ie.map(ve=>ve.controller?ve.controller.signal:null),!0)]),{loaderResults:Pe,fetcherResults:we}}function Fe(){P=!0,L.push(...gt()),ne.forEach((A,z)=>{K.has(z)&&(q.push(z),et(z))})}function Ae(A,z,Y){Y===void 0&&(Y={}),k.fetchers.set(A,z),R({fetchers:new Map(k.fetchers)},{flushSync:(Y&&Y.flushSync)===!0})}function Ve(A,z,Y,ie){ie===void 0&&(ie={});let he=Fr(k.matches,z);wt(A),R({errors:{[he.route.id]:Y},fetchers:new Map(k.fetchers)},{flushSync:(ie&&ie.flushSync)===!0})}function ze(A){return h.v7_fetcherPersist&&(me.set(A,(me.get(A)||0)+1),de.has(A)&&de.delete(A)),k.fetchers.get(A)||Gg}function wt(A){let z=k.fetchers.get(A);K.has(A)&&!(z&&z.state==="loading"&&ee.has(A))&&et(A),ne.delete(A),ee.delete(A),ue.delete(A),de.delete(A),k.fetchers.delete(A)}function Ke(A){if(h.v7_fetcherPersist){let z=(me.get(A)||0)-1;z<=0?(me.delete(A),de.add(A)):me.set(A,z)}else wt(A);R({fetchers:new Map(k.fetchers)})}function et(A){let z=K.get(A);ke(z,"Expected fetch controller: "+A),z.abort(),K.delete(A)}function We(A){for(let z of A){let Y=ze(z),ie=yn(Y.data);k.fetchers.set(z,ie)}}function Ee(){let A=[],z=!1;for(let Y of ue){let ie=k.fetchers.get(Y);ke(ie,"Expected fetcher: "+Y),ie.state==="loading"&&(ue.delete(Y),A.push(Y),z=!0)}return We(A),z}function Lt(A){let z=[];for(let[Y,ie]of ee)if(ie<A){let he=k.fetchers.get(Y);ke(he,"Expected fetcher: "+Y),he.state==="loading"&&(et(Y),ee.delete(Y),z.push(Y))}return We(z),z.length>0}function ut(A,z){let Y=k.blockers.get(A)||Mr;return U.get(A)!==z&&U.set(A,z),Y}function mt(A){k.blockers.delete(A),U.delete(A)}function ht(A,z){let Y=k.blockers.get(A)||Mr;ke(Y.state==="unblocked"&&z.state==="blocked"||Y.state==="blocked"&&z.state==="blocked"||Y.state==="blocked"&&z.state==="proceeding"||Y.state==="blocked"&&z.state==="unblocked"||Y.state==="proceeding"&&z.state==="unblocked","Invalid blocker state transition: "+Y.state+" -> "+z.state);let ie=new Map(k.blockers);ie.set(A,z),R({blockers:ie})}function Wt(A){let{currentLocation:z,nextLocation:Y,historyAction:ie}=A;if(U.size===0)return;U.size>1&&ct(!1,"A router only supports one blocker at a time");let he=Array.from(U.entries()),[Pe,we]=he[he.length-1],ve=k.blockers.get(Pe);if(!(ve&&ve.state==="proceeding")&&we({currentLocation:z,nextLocation:Y,historyAction:ie}))return Pe}function gt(A){let z=[];return V.forEach((Y,ie)=>{(!A||A(ie))&&(Y.cancel(),z.push(ie),V.delete(ie))}),z}function Bt(A,z,Y){if(v=A,c=z,i=Y||null,!p&&k.navigation===Na){p=!0;let ie=on(k.location,k.matches);ie!=null&&R({restoreScrollPosition:ie})}return()=>{v=null,c=null,i=null}}function yt(A,z){return i&&i(A,z.map(ie=>Sg(ie,k.loaderData)))||A.key}function xt(A,z){if(v&&c){let Y=yt(A,z);v[Y]=c()}}function on(A,z){if(v){let Y=yt(A,z),ie=v[Y];if(typeof ie=="number")return ie}return null}function _n(A){a={},u=Pa(A,o,void 0,a)}return S={get basename(){return f},get future(){return h},get state(){return k},get routes(){return s},get window(){return t},initialize:w,subscribe:N,enableScrollRestoration:Bt,navigate:G,fetch:re,revalidate:X,createHref:A=>e.history.createHref(A),encodeLocation:A=>e.history.encodeLocation(A),getFetcher:ze,deleteFetcher:Ke,dispose:_,getBlocker:ut,deleteBlocker:mt,_internalFetchControllers:K,_internalActiveDeferreds:V,_internalSetRoutes:_n},S}function Yg(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Aa(e,t,n,r,o,a,s,u){let f,g;if(s){f=[];for(let x of t)if(f.push(x),x.route.id===s){g=x;break}}else f=t,g=t[t.length-1];let h=Ra(o||".",_a(f,a),Vt(e.pathname,n)||e.pathname,u==="path");return o==null&&(h.search=e.search,h.hash=e.hash),(o==null||o===""||o===".")&&g&&g.route.index&&!Ia(h.search)&&(h.search=h.search?h.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(h.pathname=h.pathname==="/"?n:Qt([n,h.pathname])),Pn(h)}function su(e,t,n,r){if(!r||!Yg(r))return{path:n};if(r.formMethod&&!cy(r.formMethod))return{path:n,error:Nt(405,{method:r.formMethod})};let o=()=>({path:n,error:Nt(400,{type:"invalid-body"})}),a=r.formMethod||"get",s=e?a.toUpperCase():a.toLowerCase(),u=bu(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Ht(s))return o();let l=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((v,i)=>{let[c,p]=i;return""+v+c+"="+p+`
83
83
  `},""):String(r.body);return{path:n,submission:{formMethod:s,formAction:u,formEncType:r.formEncType,formData:void 0,json:void 0,text:l}}}else if(r.formEncType==="application/json"){if(!Ht(s))return o();try{let l=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:s,formAction:u,formEncType:r.formEncType,formData:void 0,json:l,text:void 0}}}catch{return o()}}}ke(typeof FormData=="function","FormData is not available in this environment");let f,g;if(r.formData)f=La(r.formData),g=r.formData;else if(r.body instanceof FormData)f=La(r.body),g=r.body;else if(r.body instanceof URLSearchParams)f=r.body,g=hu(f);else if(r.body==null)f=new URLSearchParams,g=new FormData;else try{f=new URLSearchParams(r.body),g=hu(f)}catch{return o()}let h={formMethod:s,formAction:u,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:g,json:void 0,text:void 0};if(Ht(h.formMethod))return{path:n,submission:h};let x=rn(n);return t&&x.search&&Ia(x.search)&&f.append("index",""),x.search="?"+f,{path:Pn(x),submission:h}}function Qg(e,t){let n=e;if(t){let r=e.findIndex(o=>o.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function lu(e,t,n,r,o,a,s,u,f,g,h,x,l,v,i,c){let p=c?jt(c[1])?c[1].error:c[1].data:void 0,d=e.createURL(t.location),m=e.createURL(o),y=c&&jt(c[1])?c[0]:void 0,b=y?Qg(n,y):n,C=c?c[1].statusCode:void 0,S=s&&C&&C>=400,k=b.filter((O,j)=>{let{route:I}=O;if(I.lazy)return!0;if(I.loader==null)return!1;if(a)return typeof I.loader!="function"||I.loader.hydrate?!0:t.loaderData[I.id]===void 0&&(!t.errors||t.errors[I.id]===void 0);if(Zg(t.loaderData,t.matches[j],O)||f.some($=>$===O.route.id))return!0;let D=t.matches[j],M=O;return uu(O,nt({currentUrl:d,currentParams:D.params,nextUrl:m,nextParams:M.params},r,{actionResult:p,unstable_actionStatus:C,defaultShouldRevalidate:S?!1:u||d.pathname+d.search===m.pathname+m.search||d.search!==m.search||cu(D,M)}))}),B=[];return x.forEach((O,j)=>{if(a||!n.some(P=>P.route.id===O.routeId)||h.has(j))return;let I=qn(v,O.path,i);if(!I){B.push({key:j,routeId:O.routeId,path:O.path,matches:null,match:null,controller:null});return}let D=t.fetchers.get(j),M=Da(I,O.path),$=!1;l.has(j)?$=!1:g.includes(j)?$=!0:D&&D.state!=="idle"&&D.data===void 0?$=u:$=uu(M,nt({currentUrl:d,currentParams:t.matches[t.matches.length-1].params,nextUrl:m,nextParams:n[n.length-1].params},r,{actionResult:p,unstable_actionStatus:C,defaultShouldRevalidate:S?!1:u})),$&&B.push({key:j,routeId:O.routeId,path:O.path,matches:I,match:M,controller:new AbortController})}),[k,B]}function Zg(e,t,n){let r=!t||n.route.id!==t.route.id,o=e[n.route.id]===void 0;return r||o}function cu(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function uu(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function du(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let o=n[e.id];ke(o,"No route found in manifest");let a={};for(let s in r){let f=o[s]!==void 0&&s!=="hasErrorBoundary";ct(!f,'Route "'+o.id+'" has a static property "'+s+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+s+'" will be ignored.')),!f&&!Cg.has(s)&&(a[s]=r[s])}Object.assign(o,a),Object.assign(o,nt({},t(o),{lazy:void 0}))}function ey(e){return Promise.all(e.matches.map(t=>t.resolve()))}async function ty(e,t,n,r,o,a,s,u){let f=r.reduce((x,l)=>x.add(l.route.id),new Set),g=new Set,h=await e({matches:o.map(x=>{let l=f.has(x.route.id);return nt({},x,{shouldLoad:l,resolve:i=>(g.add(x.route.id),l?ny(t,n,x,a,s,i,u):Promise.resolve({type:Ze.data,result:void 0}))})}),request:n,params:o[0].params,context:u});return o.forEach(x=>ke(g.has(x.route.id),'`match.resolve()` was not called for route id "'+x.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),h.filter((x,l)=>f.has(o[l].route.id))}async function ny(e,t,n,r,o,a,s){let u,f,g=h=>{let x,l=new Promise((c,p)=>x=p);f=()=>x(),t.signal.addEventListener("abort",f);let v=c=>typeof h!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):h({request:t,params:n.params,context:s},...c!==void 0?[c]:[]),i;return a?i=a(c=>v(c)):i=(async()=>{try{return{type:"data",result:await v()}}catch(c){return{type:"error",result:c}}})(),Promise.race([i,l])};try{let h=n.route[e];if(n.route.lazy)if(h){let x,[l]=await Promise.all([g(h).catch(v=>{x=v}),du(n.route,o,r)]);if(x!==void 0)throw x;u=l}else if(await du(n.route,o,r),h=n.route[e],h)u=await g(h);else if(e==="action"){let x=new URL(t.url),l=x.pathname+x.search;throw Nt(405,{method:t.method,pathname:l,routeId:n.route.id})}else return{type:Ze.data,result:void 0};else if(h)u=await g(h);else{let x=new URL(t.url),l=x.pathname+x.search;throw Nt(404,{pathname:l})}ke(u.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(h){return{type:Ze.error,result:h}}finally{f&&t.signal.removeEventListener("abort",f)}return u}async function ry(e){let{result:t,type:n,status:r}=e;if(wu(t)){let s;try{let u=t.headers.get("Content-Type");u&&/\bapplication\/json\b/.test(u)?t.body==null?s=null:s=await t.json():s=await t.text()}catch(u){return{type:Ze.error,error:u}}return n===Ze.error?{type:Ze.error,error:new ou(t.status,t.statusText,s),statusCode:t.status,headers:t.headers}:{type:Ze.data,data:s,statusCode:t.status,headers:t.headers}}if(n===Ze.error)return{type:Ze.error,error:t,statusCode:Ta(t)?t.status:r};if(ly(t)){var o,a;return{type:Ze.deferred,deferredData:t,statusCode:(o=t.init)==null?void 0:o.status,headers:((a=t.init)==null?void 0:a.headers)&&new Headers(t.init.headers)}}return{type:Ze.data,data:t,statusCode:r}}function oy(e,t,n,r,o,a){let s=e.headers.get("Location");if(ke(s,"Redirects returned/thrown from loaders/actions must have a Location header"),!ja.test(s)){let u=r.slice(0,r.findIndex(f=>f.route.id===n)+1);s=Aa(new URL(t.url),u,o,!0,s,a),e.headers.set("Location",s)}return e}function fu(e,t,n){if(ja.test(e)){let r=e,o=r.startsWith("//")?new URL(t.protocol+r):new URL(r),a=Vt(o.pathname,n)!=null;if(o.origin===t.origin&&a)return o.pathname+o.search+o.hash}return e}function Kn(e,t,n,r){let o=e.createURL(bu(t)).toString(),a={signal:n};if(r&&Ht(r.formMethod)){let{formMethod:s,formEncType:u}=r;a.method=s.toUpperCase(),u==="application/json"?(a.headers=new Headers({"Content-Type":u}),a.body=JSON.stringify(r.json)):u==="text/plain"?a.body=r.text:u==="application/x-www-form-urlencoded"&&r.formData?a.body=La(r.formData):a.body=r.formData}return new Request(o,a)}function La(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function hu(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function iy(e,t,n,r,o,a){let s={},u=null,f,g=!1,h={},x=r&&jt(r[1])?r[1].error:void 0;return n.forEach((l,v)=>{let i=t[v].route.id;if(ke(!On(l),"Cannot handle redirect results in processLoaderData"),jt(l)){let c=l.error;x!==void 0&&(c=x,x=void 0),u=u||{};{let p=Fr(e,i);u[p.route.id]==null&&(u[p.route.id]=c)}s[i]=void 0,g||(g=!0,f=Ta(l.error)?l.error.status:500),l.headers&&(h[i]=l.headers)}else Bn(l)?(o.set(i,l.deferredData),s[i]=l.deferredData.data,l.statusCode!=null&&l.statusCode!==200&&!g&&(f=l.statusCode),l.headers&&(h[i]=l.headers)):(s[i]=l.data,l.statusCode&&l.statusCode!==200&&!g&&(f=l.statusCode),l.headers&&(h[i]=l.headers))}),x!==void 0&&r&&(u={[r[0]]:x},s[r[0]]=void 0),{loaderData:s,errors:u,statusCode:f||200,loaderHeaders:h}}function pu(e,t,n,r,o,a,s,u){let{loaderData:f,errors:g}=iy(t,n,r,o,u);for(let h=0;h<a.length;h++){let{key:x,match:l,controller:v}=a[h];ke(s!==void 0&&s[h]!==void 0,"Did not find corresponding fetcher result");let i=s[h];if(!(v&&v.signal.aborted))if(jt(i)){let c=Fr(e.matches,l==null?void 0:l.route.id);g&&g[c.route.id]||(g=nt({},g,{[c.route.id]:i.error})),e.fetchers.delete(x)}else if(On(i))ke(!1,"Unhandled fetcher revalidation redirect");else if(Bn(i))ke(!1,"Unhandled fetcher deferred data");else{let c=yn(i.data);e.fetchers.set(x,c)}}return{loaderData:f,errors:g}}function mu(e,t,n,r){let o=nt({},t);for(let a of n){let s=a.route.id;if(t.hasOwnProperty(s)?t[s]!==void 0&&(o[s]=t[s]):e[s]!==void 0&&a.route.loader&&(o[s]=e[s]),r&&r.hasOwnProperty(s))break}return o}function gu(e){return e?jt(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Fr(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function yu(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Nt(e,t){let{pathname:n,routeId:r,method:o,type:a}=t===void 0?{}:t,s="Unknown Server Error",u="Unknown @remix-run/router error";return e===400?(s="Bad Request",o&&n&&r?u="You made a "+o+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":a==="defer-action"?u="defer() is not supported in actions":a==="invalid-body"&&(u="Unable to encode submission body")):e===403?(s="Forbidden",u='Route "'+r+'" does not match URL "'+n+'"'):e===404?(s="Not Found",u='No route matches URL "'+n+'"'):e===405&&(s="Method Not Allowed",o&&n&&r?u="You made a "+o.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":o&&(u='Invalid request method "'+o.toUpperCase()+'"')),new ou(e||500,s,new Error(u),!0)}function vu(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(On(n))return{result:n,idx:t}}}function bu(e){let t=typeof e=="string"?rn(e):e;return Pn(nt({},t,{hash:""}))}function ay(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function sy(e){return wu(e.result)&&Kg.has(e.result.status)}function Bn(e){return e.type===Ze.deferred}function jt(e){return e.type===Ze.error}function On(e){return(e&&e.type)===Ze.redirect}function ly(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function wu(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function cy(e){return qg.has(e.toLowerCase())}function Ht(e){return Hg.has(e.toLowerCase())}async function xu(e,t,n,r,o,a){for(let s=0;s<n.length;s++){let u=n[s],f=t[s];if(!f)continue;let g=e.find(x=>x.route.id===f.route.id),h=g!=null&&!cu(g,f)&&(a&&a[f.route.id])!==void 0;if(Bn(u)&&(o||h)){let x=r[s];ke(x,"Expected an AbortSignal for revalidating fetcher deferred result"),await ku(u,x,o).then(l=>{l&&(n[s]=l||n[s])})}}}async function ku(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:Ze.data,data:e.deferredData.unwrappedData}}catch(o){return{type:Ze.error,error:o}}return{type:Ze.data,data:e.deferredData.data}}}function Ia(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Da(e,t){let n=typeof t=="string"?rn(t).search:t.search;if(e[e.length-1].route.index&&Ia(n||""))return e[e.length-1];let r=ru(e);return r[r.length-1]}function Cu(e){let{formMethod:t,formAction:n,formEncType:r,text:o,formData:a,json:s}=e;if(!(!t||!n||!r)){if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:o};if(a!=null)return{formMethod:t,formAction:n,formEncType:r,formData:a,json:void 0,text:void 0};if(s!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:s,text:void 0}}}function Ma(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 uy(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Ur(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 dy(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function yn(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 fy(e,t){try{let n=e.sessionStorage.getItem(au);if(n){let r=JSON.parse(n);for(let[o,a]of Object.entries(r||{}))a&&Array.isArray(a)&&t.set(o,new Set(a||[]))}}catch{}}function hy(e,t){if(t.size>0){let n={};for(let[r,o]of t)n[r]=[...o];try{e.sessionStorage.setItem(au,JSON.stringify(n))}catch(r){ct(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/**
84
- * React Router v6.23.1
84
+ * React ProfileRouter v6.23.1
85
85
  *
86
86
  * Copyright (c) Remix Software Inc.
87
87
  *
@@ -89,10 +89,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
89
89
  * LICENSE.md file in the root directory of this source tree.
90
90
  *
91
91
  * @license MIT
92
- */function $r(){return $r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$r.apply(this,arguments)}const Wn=le.createContext(null);process.env.NODE_ENV!=="production"&&(Wn.displayName="DataRouter");const $o=le.createContext(null);process.env.NODE_ENV!=="production"&&($o.displayName="DataRouterState");const py=le.createContext(null);process.env.NODE_ENV!=="production"&&(py.displayName="Await");const zt=le.createContext(null);process.env.NODE_ENV!=="production"&&(zt.displayName="Navigation");const Vo=le.createContext(null);process.env.NODE_ENV!=="production"&&(Vo.displayName="Location");const qt=le.createContext({outlet:null,matches:[],isDataRoute:!1});process.env.NODE_ENV!=="production"&&(qt.displayName="Route");const Fa=le.createContext(null);process.env.NODE_ENV!=="production"&&(Fa.displayName="RouteError");function my(e,t){let{relative:n}=t===void 0?{}:t;Vr()||(process.env.NODE_ENV!=="production"?ke(!1,"useHref() may be used only in the context of a <Router> component."):ke(!1));let{basename:r,navigator:o}=le.useContext(zt),{hash:a,pathname:s,search:u}=Hr(e,{relative:n}),f=s;return r!=="/"&&(f=s==="/"?r:Qt([r,s])),o.createHref({pathname:f,search:u,hash:a})}function Vr(){return le.useContext(Vo)!=null}function vn(){return Vr()||(process.env.NODE_ENV!=="production"?ke(!1,"useLocation() may be used only in the context of a <Router> component."):ke(!1)),le.useContext(Vo).location}const Eu="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Su(e){le.useContext(zt).static||le.useLayoutEffect(e)}function At(){let{isDataRoute:e}=le.useContext(qt);return e?Ry():gy()}function gy(){Vr()||(process.env.NODE_ENV!=="production"?ke(!1,"useNavigate() may be used only in the context of a <Router> component."):ke(!1));let e=le.useContext(Wn),{basename:t,future:n,navigator:r}=le.useContext(zt),{matches:o}=le.useContext(qt),{pathname:a}=vn(),s=JSON.stringify(_a(o,n.v7_relativeSplatPath)),u=le.useRef(!1);return Su(()=>{u.current=!0}),le.useCallback(function(g,h){if(h===void 0&&(h={}),process.env.NODE_ENV!=="production"&&ct(u.current,Eu),!u.current)return;if(typeof g=="number"){r.go(g);return}let x=Ra(g,JSON.parse(s),a,h.relative==="path");e==null&&t!=="/"&&(x.pathname=x.pathname==="/"?t:Qt([t,x.pathname])),(h.replace?r.replace:r.push)(x,h.state,h)},[t,r,s,a,e])}const yy=le.createContext(null);function vy(e){let t=le.useContext(qt).outlet;return t&&le.createElement(yy.Provider,{value:e},t)}function Pu(){let{matches:e}=le.useContext(qt),t=e[e.length-1];return t?t.params:{}}function Hr(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=le.useContext(zt),{matches:o}=le.useContext(qt),{pathname:a}=vn(),s=JSON.stringify(_a(o,r.v7_relativeSplatPath));return le.useMemo(()=>Ra(e,JSON.parse(s),a,n==="path"),[e,s,a,n])}function by(e,t,n,r){Vr()||(process.env.NODE_ENV!=="production"?ke(!1,"useRoutes() may be used only in the context of a <Router> component."):ke(!1));let{navigator:o}=le.useContext(zt),{matches:a}=le.useContext(qt),s=a[a.length-1],u=s?s.params:{},f=s?s.pathname:"/",g=s?s.pathnameBase:"/",h=s&&s.route;if(process.env.NODE_ENV!=="production"){let d=h&&h.path||"";_u(f,!h||d.endsWith("*"),"You rendered descendant <Routes> (or called `useRoutes()`) at "+('"'+f+'" (under <Route path="'+d+'">) 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.
92
+ */function $r(){return $r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$r.apply(this,arguments)}const Wn=le.createContext(null);process.env.NODE_ENV!=="production"&&(Wn.displayName="DataRouter");const $o=le.createContext(null);process.env.NODE_ENV!=="production"&&($o.displayName="DataRouterState");const py=le.createContext(null);process.env.NODE_ENV!=="production"&&(py.displayName="Await");const zt=le.createContext(null);process.env.NODE_ENV!=="production"&&(zt.displayName="Navigation");const Vo=le.createContext(null);process.env.NODE_ENV!=="production"&&(Vo.displayName="Location");const qt=le.createContext({outlet:null,matches:[],isDataRoute:!1});process.env.NODE_ENV!=="production"&&(qt.displayName="Route");const Fa=le.createContext(null);process.env.NODE_ENV!=="production"&&(Fa.displayName="RouteError");function my(e,t){let{relative:n}=t===void 0?{}:t;Vr()||(process.env.NODE_ENV!=="production"?ke(!1,"useHref() may be used only in the context of a <ProfileRouter> component."):ke(!1));let{basename:r,navigator:o}=le.useContext(zt),{hash:a,pathname:s,search:u}=Hr(e,{relative:n}),f=s;return r!=="/"&&(f=s==="/"?r:Qt([r,s])),o.createHref({pathname:f,search:u,hash:a})}function Vr(){return le.useContext(Vo)!=null}function vn(){return Vr()||(process.env.NODE_ENV!=="production"?ke(!1,"useLocation() may be used only in the context of a <ProfileRouter> component."):ke(!1)),le.useContext(Vo).location}const Eu="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Su(e){le.useContext(zt).static||le.useLayoutEffect(e)}function At(){let{isDataRoute:e}=le.useContext(qt);return e?Ry():gy()}function gy(){Vr()||(process.env.NODE_ENV!=="production"?ke(!1,"useNavigate() may be used only in the context of a <ProfileRouter> component."):ke(!1));let e=le.useContext(Wn),{basename:t,future:n,navigator:r}=le.useContext(zt),{matches:o}=le.useContext(qt),{pathname:a}=vn(),s=JSON.stringify(_a(o,n.v7_relativeSplatPath)),u=le.useRef(!1);return Su(()=>{u.current=!0}),le.useCallback(function(g,h){if(h===void 0&&(h={}),process.env.NODE_ENV!=="production"&&ct(u.current,Eu),!u.current)return;if(typeof g=="number"){r.go(g);return}let x=Ra(g,JSON.parse(s),a,h.relative==="path");e==null&&t!=="/"&&(x.pathname=x.pathname==="/"?t:Qt([t,x.pathname])),(h.replace?r.replace:r.push)(x,h.state,h)},[t,r,s,a,e])}const yy=le.createContext(null);function vy(e){let t=le.useContext(qt).outlet;return t&&le.createElement(yy.Provider,{value:e},t)}function Pu(){let{matches:e}=le.useContext(qt),t=e[e.length-1];return t?t.params:{}}function Hr(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=le.useContext(zt),{matches:o}=le.useContext(qt),{pathname:a}=vn(),s=JSON.stringify(_a(o,r.v7_relativeSplatPath));return le.useMemo(()=>Ra(e,JSON.parse(s),a,n==="path"),[e,s,a,n])}function by(e,t,n,r){Vr()||(process.env.NODE_ENV!=="production"?ke(!1,"useRoutes() may be used only in the context of a <ProfileRouter> component."):ke(!1));let{navigator:o}=le.useContext(zt),{matches:a}=le.useContext(qt),s=a[a.length-1],u=s?s.params:{},f=s?s.pathname:"/",g=s?s.pathnameBase:"/",h=s&&s.route;if(process.env.NODE_ENV!=="production"){let d=h&&h.path||"";_u(f,!h||d.endsWith("*"),"You rendered descendant <Routes> (or called `useRoutes()`) at "+('"'+f+'" (under <Route path="'+d+'">) 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.
93
93
 
94
- `+('Please change the parent <Route path="'+d+'"> to <Route ')+('path="'+(d==="/"?"*":d+"/*")+'">.'))}let x=vn(),l;l=x;let v=l.pathname||"/",i=v;if(g!=="/"){let d=g.replace(/^\//,"").split("/");i="/"+v.replace(/^\//,"").split("/").slice(d.length).join("/")}let c=qn(e,{pathname:i});return process.env.NODE_ENV!=="production"&&(process.env.NODE_ENV!=="production"&&ct(h||c!=null,'No routes matched location "'+l.pathname+l.search+l.hash+'" '),process.env.NODE_ENV!=="production"&&ct(c==null||c[c.length-1].route.element!==void 0||c[c.length-1].route.Component!==void 0||c[c.length-1].route.lazy!==void 0,'Matched leaf route at location "'+l.pathname+l.search+l.hash+'" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.')),Ey(c&&c.map(d=>Object.assign({},d,{params:Object.assign({},u,d.params),pathname:Qt([g,o.encodeLocation?o.encodeLocation(d.pathname).pathname:d.pathname]),pathnameBase:d.pathnameBase==="/"?g:Qt([g,o.encodeLocation?o.encodeLocation(d.pathnameBase).pathname:d.pathnameBase])})),a,n,r)}function wy(){let e=_y(),t=Ta(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},a={padding:"2px 4px",backgroundColor:r},s=null;return process.env.NODE_ENV!=="production"&&(console.error("Error handled by React Router default ErrorBoundary:",e),s=le.createElement(le.Fragment,null,le.createElement("p",null,"💿 Hey developer 👋"),le.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",le.createElement("code",{style:a},"ErrorBoundary")," or"," ",le.createElement("code",{style:a},"errorElement")," prop on your route."))),le.createElement(le.Fragment,null,le.createElement("h2",null,"Unexpected Application Error!"),le.createElement("h3",{style:{fontStyle:"italic"}},t),n?le.createElement("pre",{style:o},n):null,s)}const xy=le.createElement(wy,null);class ky extends le.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?le.createElement(qt.Provider,{value:this.props.routeContext},le.createElement(Fa.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Cy(e){let{routeContext:t,match:n,children:r}=e,o=le.useContext(Wn);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),le.createElement(qt.Provider,{value:t},r)}function Ey(e,t,n,r){var o;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var a;if((a=n)!=null&&a.errors)e=n.matches;else return null}let s=e,u=(o=n)==null?void 0:o.errors;if(u!=null){let h=s.findIndex(x=>x.route.id&&(u==null?void 0:u[x.route.id])!==void 0);h>=0||(process.env.NODE_ENV!=="production"?ke(!1,"Could not find a matching route for errors on route IDs: "+Object.keys(u).join(",")):ke(!1)),s=s.slice(0,Math.min(s.length,h+1))}let f=!1,g=-1;if(n&&r&&r.v7_partialHydration)for(let h=0;h<s.length;h++){let x=s[h];if((x.route.HydrateFallback||x.route.hydrateFallbackElement)&&(g=h),x.route.id){let{loaderData:l,errors:v}=n,i=x.route.loader&&l[x.route.id]===void 0&&(!v||v[x.route.id]===void 0);if(x.route.lazy||i){f=!0,g>=0?s=s.slice(0,g+1):s=[s[0]];break}}}return s.reduceRight((h,x,l)=>{let v,i=!1,c=null,p=null;n&&(v=u&&x.route.id?u[x.route.id]:void 0,c=x.route.errorElement||xy,f&&(g<0&&l===0?(_u("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),i=!0,p=null):g===l&&(i=!0,p=x.route.hydrateFallbackElement||null)));let d=t.concat(s.slice(0,l+1)),m=()=>{let y;return v?y=c:i?y=p:x.route.Component?y=le.createElement(x.route.Component,null):x.route.element?y=x.route.element:y=h,le.createElement(Cy,{match:x,routeContext:{outlet:h,matches:d,isDataRoute:n!=null},children:y})};return n&&(x.route.ErrorBoundary||x.route.errorElement||l===0)?le.createElement(ky,{location:n.location,revalidation:n.revalidation,component:c,error:v,children:m(),routeContext:{outlet:null,matches:d,isDataRoute:!0}}):m()},null)}var Bu=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Bu||{}),zr=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(zr||{});function Ua(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function Sy(e){let t=le.useContext(Wn);return t||(process.env.NODE_ENV!=="production"?ke(!1,Ua(e)):ke(!1)),t}function Py(e){let t=le.useContext($o);return t||(process.env.NODE_ENV!=="production"?ke(!1,Ua(e)):ke(!1)),t}function By(e){let t=le.useContext(qt);return t||(process.env.NODE_ENV!=="production"?ke(!1,Ua(e)):ke(!1)),t}function $a(e){let t=By(e),n=t.matches[t.matches.length-1];return n.route.id||(process.env.NODE_ENV!=="production"?ke(!1,e+' can only be used on routes that contain a unique "id"'):ke(!1)),n.route.id}function Oy(){return $a(zr.UseRouteId)}function _y(){var e;let t=le.useContext(Fa),n=Py(zr.UseRouteError),r=$a(zr.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Ry(){let{router:e}=Sy(Bu.UseNavigateStable),t=$a(zr.UseNavigateStable),n=le.useRef(!1);return Su(()=>{n.current=!0}),le.useCallback(function(o,a){a===void 0&&(a={}),process.env.NODE_ENV!=="production"&&ct(n.current,Eu),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,$r({fromRouteId:t},a)))},[e,t])}const Ou={};function _u(e,t,n){!t&&!Ou[e]&&(Ou[e]=!0,process.env.NODE_ENV!=="production"&&ct(!1,n))}function Kt(e){return vy(e.context)}function Ty(e){let{basename:t="/",children:n=null,location:r,navigationType:o=at.Pop,navigator:a,static:s=!1,future:u}=e;Vr()&&(process.env.NODE_ENV!=="production"?ke(!1,"You cannot render a <Router> inside another <Router>. You should never have more than one in your app."):ke(!1));let f=t.replace(/^\/*/,"/"),g=le.useMemo(()=>({basename:f,navigator:a,static:s,future:$r({v7_relativeSplatPath:!1},u)}),[f,u,a,s]);typeof r=="string"&&(r=rn(r));let{pathname:h="/",search:x="",hash:l="",state:v=null,key:i="default"}=r,c=le.useMemo(()=>{let p=Vt(h,f);return p==null?null:{location:{pathname:p,search:x,hash:l,state:v,key:i},navigationType:o}},[f,h,x,l,v,i,o]);return process.env.NODE_ENV!=="production"&&ct(c!=null,'<Router basename="'+f+'"> is not able to match the URL '+('"'+h+x+l+'" because it does not start with the ')+"basename, so the <Router> won't render anything."),c==null?null:le.createElement(zt.Provider,{value:g},le.createElement(Vo.Provider,{children:n,value:c}))}new Promise(()=>{});function Ny(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(process.env.NODE_ENV!=="production"&&e.element&&process.env.NODE_ENV!=="production"&&ct(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:le.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(process.env.NODE_ENV!=="production"&&e.hydrateFallbackElement&&process.env.NODE_ENV!=="production"&&ct(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:le.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(process.env.NODE_ENV!=="production"&&e.errorElement&&process.env.NODE_ENV!=="production"&&ct(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:le.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}function Gn(e,t){return Jg({basename:void 0,future:$r({},void 0,{v7_prependBasename:!0}),history:xg({initialEntries:void 0,initialIndex:void 0}),hydrationData:void 0,routes:e,mapRouteProperties:Ny,unstable_dataStrategy:void 0}).initialize()}/**
95
- * React Router DOM v6.23.1
94
+ `+('Please change the parent <Route path="'+d+'"> to <Route ')+('path="'+(d==="/"?"*":d+"/*")+'">.'))}let x=vn(),l;l=x;let v=l.pathname||"/",i=v;if(g!=="/"){let d=g.replace(/^\//,"").split("/");i="/"+v.replace(/^\//,"").split("/").slice(d.length).join("/")}let c=qn(e,{pathname:i});return process.env.NODE_ENV!=="production"&&(process.env.NODE_ENV!=="production"&&ct(h||c!=null,'No routes matched location "'+l.pathname+l.search+l.hash+'" '),process.env.NODE_ENV!=="production"&&ct(c==null||c[c.length-1].route.element!==void 0||c[c.length-1].route.Component!==void 0||c[c.length-1].route.lazy!==void 0,'Matched leaf route at location "'+l.pathname+l.search+l.hash+'" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.')),Ey(c&&c.map(d=>Object.assign({},d,{params:Object.assign({},u,d.params),pathname:Qt([g,o.encodeLocation?o.encodeLocation(d.pathname).pathname:d.pathname]),pathnameBase:d.pathnameBase==="/"?g:Qt([g,o.encodeLocation?o.encodeLocation(d.pathnameBase).pathname:d.pathnameBase])})),a,n,r)}function wy(){let e=_y(),t=Ta(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},a={padding:"2px 4px",backgroundColor:r},s=null;return process.env.NODE_ENV!=="production"&&(console.error("Error handled by React ProfileRouter default ErrorBoundary:",e),s=le.createElement(le.Fragment,null,le.createElement("p",null,"💿 Hey developer 👋"),le.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",le.createElement("code",{style:a},"ErrorBoundary")," or"," ",le.createElement("code",{style:a},"errorElement")," prop on your route."))),le.createElement(le.Fragment,null,le.createElement("h2",null,"Unexpected Application Error!"),le.createElement("h3",{style:{fontStyle:"italic"}},t),n?le.createElement("pre",{style:o},n):null,s)}const xy=le.createElement(wy,null);class ky extends le.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React ProfileRouter caught the following error during render",t,n)}render(){return this.state.error!==void 0?le.createElement(qt.Provider,{value:this.props.routeContext},le.createElement(Fa.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Cy(e){let{routeContext:t,match:n,children:r}=e,o=le.useContext(Wn);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),le.createElement(qt.Provider,{value:t},r)}function Ey(e,t,n,r){var o;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var a;if((a=n)!=null&&a.errors)e=n.matches;else return null}let s=e,u=(o=n)==null?void 0:o.errors;if(u!=null){let h=s.findIndex(x=>x.route.id&&(u==null?void 0:u[x.route.id])!==void 0);h>=0||(process.env.NODE_ENV!=="production"?ke(!1,"Could not find a matching route for errors on route IDs: "+Object.keys(u).join(",")):ke(!1)),s=s.slice(0,Math.min(s.length,h+1))}let f=!1,g=-1;if(n&&r&&r.v7_partialHydration)for(let h=0;h<s.length;h++){let x=s[h];if((x.route.HydrateFallback||x.route.hydrateFallbackElement)&&(g=h),x.route.id){let{loaderData:l,errors:v}=n,i=x.route.loader&&l[x.route.id]===void 0&&(!v||v[x.route.id]===void 0);if(x.route.lazy||i){f=!0,g>=0?s=s.slice(0,g+1):s=[s[0]];break}}}return s.reduceRight((h,x,l)=>{let v,i=!1,c=null,p=null;n&&(v=u&&x.route.id?u[x.route.id]:void 0,c=x.route.errorElement||xy,f&&(g<0&&l===0?(_u("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),i=!0,p=null):g===l&&(i=!0,p=x.route.hydrateFallbackElement||null)));let d=t.concat(s.slice(0,l+1)),m=()=>{let y;return v?y=c:i?y=p:x.route.Component?y=le.createElement(x.route.Component,null):x.route.element?y=x.route.element:y=h,le.createElement(Cy,{match:x,routeContext:{outlet:h,matches:d,isDataRoute:n!=null},children:y})};return n&&(x.route.ErrorBoundary||x.route.errorElement||l===0)?le.createElement(ky,{location:n.location,revalidation:n.revalidation,component:c,error:v,children:m(),routeContext:{outlet:null,matches:d,isDataRoute:!0}}):m()},null)}var Bu=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Bu||{}),zr=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(zr||{});function Ua(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function Sy(e){let t=le.useContext(Wn);return t||(process.env.NODE_ENV!=="production"?ke(!1,Ua(e)):ke(!1)),t}function Py(e){let t=le.useContext($o);return t||(process.env.NODE_ENV!=="production"?ke(!1,Ua(e)):ke(!1)),t}function By(e){let t=le.useContext(qt);return t||(process.env.NODE_ENV!=="production"?ke(!1,Ua(e)):ke(!1)),t}function $a(e){let t=By(e),n=t.matches[t.matches.length-1];return n.route.id||(process.env.NODE_ENV!=="production"?ke(!1,e+' can only be used on routes that contain a unique "id"'):ke(!1)),n.route.id}function Oy(){return $a(zr.UseRouteId)}function _y(){var e;let t=le.useContext(Fa),n=Py(zr.UseRouteError),r=$a(zr.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Ry(){let{router:e}=Sy(Bu.UseNavigateStable),t=$a(zr.UseNavigateStable),n=le.useRef(!1);return Su(()=>{n.current=!0}),le.useCallback(function(o,a){a===void 0&&(a={}),process.env.NODE_ENV!=="production"&&ct(n.current,Eu),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,$r({fromRouteId:t},a)))},[e,t])}const Ou={};function _u(e,t,n){!t&&!Ou[e]&&(Ou[e]=!0,process.env.NODE_ENV!=="production"&&ct(!1,n))}function Kt(e){return vy(e.context)}function Ty(e){let{basename:t="/",children:n=null,location:r,navigationType:o=at.Pop,navigator:a,static:s=!1,future:u}=e;Vr()&&(process.env.NODE_ENV!=="production"?ke(!1,"You cannot render a <ProfileRouter> inside another <ProfileRouter>. You should never have more than one in your app."):ke(!1));let f=t.replace(/^\/*/,"/"),g=le.useMemo(()=>({basename:f,navigator:a,static:s,future:$r({v7_relativeSplatPath:!1},u)}),[f,u,a,s]);typeof r=="string"&&(r=rn(r));let{pathname:h="/",search:x="",hash:l="",state:v=null,key:i="default"}=r,c=le.useMemo(()=>{let p=Vt(h,f);return p==null?null:{location:{pathname:p,search:x,hash:l,state:v,key:i},navigationType:o}},[f,h,x,l,v,i,o]);return process.env.NODE_ENV!=="production"&&ct(c!=null,'<ProfileRouter basename="'+f+'"> is not able to match the URL '+('"'+h+x+l+'" because it does not start with the ')+"basename, so the <ProfileRouter> won't render anything."),c==null?null:le.createElement(zt.Provider,{value:g},le.createElement(Vo.Provider,{children:n,value:c}))}new Promise(()=>{});function Ny(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(process.env.NODE_ENV!=="production"&&e.element&&process.env.NODE_ENV!=="production"&&ct(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:le.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(process.env.NODE_ENV!=="production"&&e.hydrateFallbackElement&&process.env.NODE_ENV!=="production"&&ct(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:le.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(process.env.NODE_ENV!=="production"&&e.errorElement&&process.env.NODE_ENV!=="production"&&ct(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:le.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}function Gn(e,t){return Jg({basename:void 0,future:$r({},void 0,{v7_prependBasename:!0}),history:xg({initialEntries:void 0,initialIndex:void 0}),hydrationData:void 0,routes:e,mapRouteProperties:Ny,unstable_dataStrategy:void 0}).initialize()}/**
95
+ * React ProfileRouter DOM v6.23.1
96
96
  *
97
97
  * Copyright (c) Remix Software Inc.
98
98
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leatcom/portal-sessions",
3
- "version": "0.0.34",
3
+ "version": "0.0.35",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"