@techdocs/cli 1.8.18 → 1.8.19-next.1

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.
Files changed (91) hide show
  1. package/CHANGELOG.md +17 -3
  2. package/dist/embedded-app/.config-schema.json +514 -435
  3. package/dist/embedded-app/index.html +1 -1
  4. package/dist/embedded-app/static/{124.159a325a.chunk.js → 124.1db148ab.chunk.js} +1 -1
  5. package/dist/embedded-app/static/{124.159a325a.chunk.js.map → 124.1db148ab.chunk.js.map} +1 -1
  6. package/dist/embedded-app/static/{1297.bbeaddd0.chunk.js → 1297.0e20ec6b.chunk.js} +1 -1
  7. package/dist/embedded-app/static/{1297.bbeaddd0.chunk.js.map → 1297.0e20ec6b.chunk.js.map} +1 -1
  8. package/dist/embedded-app/static/1902.44584bca.chunk.js +10 -0
  9. package/dist/embedded-app/static/1902.44584bca.chunk.js.map +1 -0
  10. package/dist/embedded-app/static/{2401.ba11bac5.chunk.js → 2401.ca97a22a.chunk.js} +1 -1
  11. package/dist/embedded-app/static/{2401.ba11bac5.chunk.js.map → 2401.ca97a22a.chunk.js.map} +1 -1
  12. package/dist/embedded-app/static/{2420.9986a695.chunk.js → 2420.2b6286b5.chunk.js} +1 -1
  13. package/dist/embedded-app/static/{2420.9986a695.chunk.js.map → 2420.2b6286b5.chunk.js.map} +1 -1
  14. package/dist/embedded-app/static/{287.57153ff3.chunk.js → 287.8842f1ab.chunk.js} +1 -1
  15. package/dist/embedded-app/static/{287.57153ff3.chunk.js.map → 287.8842f1ab.chunk.js.map} +1 -1
  16. package/dist/embedded-app/static/{3182.98982985.chunk.js → 3182.9657b1ff.chunk.js} +1 -1
  17. package/dist/embedded-app/static/{3182.98982985.chunk.js.map → 3182.9657b1ff.chunk.js.map} +1 -1
  18. package/dist/embedded-app/static/{3308.b3458818.chunk.js → 3308.c146ba21.chunk.js} +1 -1
  19. package/dist/embedded-app/static/{3308.b3458818.chunk.js.map → 3308.c146ba21.chunk.js.map} +1 -1
  20. package/dist/embedded-app/static/{3632.2a549b64.chunk.js → 3632.f5bd752c.chunk.js} +1 -1
  21. package/dist/embedded-app/static/{3632.2a549b64.chunk.js.map → 3632.f5bd752c.chunk.js.map} +1 -1
  22. package/dist/embedded-app/static/{3720.1978cecb.chunk.js → 3720.98f39354.chunk.js} +1 -1
  23. package/dist/embedded-app/static/{3720.1978cecb.chunk.js.map → 3720.98f39354.chunk.js.map} +1 -1
  24. package/dist/embedded-app/static/{4036.36665783.chunk.js → 4036.fef63266.chunk.js} +1 -1
  25. package/dist/embedded-app/static/{4036.36665783.chunk.js.map → 4036.fef63266.chunk.js.map} +1 -1
  26. package/dist/embedded-app/static/{4487.f9cc6633.chunk.js → 4487.fba50d66.chunk.js} +1 -1
  27. package/dist/embedded-app/static/{4487.f9cc6633.chunk.js.map → 4487.fba50d66.chunk.js.map} +1 -1
  28. package/dist/embedded-app/static/{4516.b1a92d53.chunk.js → 4516.cd8a0387.chunk.js} +1 -1
  29. package/dist/embedded-app/static/{4516.b1a92d53.chunk.js.map → 4516.cd8a0387.chunk.js.map} +1 -1
  30. package/dist/embedded-app/static/{5724.d2755c89.chunk.js → 5724.0fd2d023.chunk.js} +1 -1
  31. package/dist/embedded-app/static/{5724.d2755c89.chunk.js.map → 5724.0fd2d023.chunk.js.map} +1 -1
  32. package/dist/embedded-app/static/{5788.9c942dee.chunk.js → 5788.ede5f049.chunk.js} +1 -1
  33. package/dist/embedded-app/static/{5788.9c942dee.chunk.js.map → 5788.ede5f049.chunk.js.map} +1 -1
  34. package/dist/embedded-app/static/{6271.0b57a0cf.chunk.js → 6271.1f27aefc.chunk.js} +1 -1
  35. package/dist/embedded-app/static/{6271.0b57a0cf.chunk.js.map → 6271.1f27aefc.chunk.js.map} +1 -1
  36. package/dist/embedded-app/static/{6415.6b71f4b9.chunk.js → 6415.ca28e59e.chunk.js} +1 -1
  37. package/dist/embedded-app/static/{6415.6b71f4b9.chunk.js.map → 6415.ca28e59e.chunk.js.map} +1 -1
  38. package/dist/embedded-app/static/8115.60e192eb.chunk.js +3 -0
  39. package/dist/embedded-app/static/8115.60e192eb.chunk.js.map +1 -0
  40. package/dist/embedded-app/static/{8307.637eb9f7.chunk.js → 8307.48c99c9a.chunk.js} +1 -1
  41. package/dist/embedded-app/static/{8307.637eb9f7.chunk.js.map → 8307.48c99c9a.chunk.js.map} +1 -1
  42. package/dist/embedded-app/static/{8384.0c6da92e.chunk.js → 8384.c87298a7.chunk.js} +1 -1
  43. package/dist/embedded-app/static/{8384.0c6da92e.chunk.js.map → 8384.c87298a7.chunk.js.map} +1 -1
  44. package/dist/embedded-app/static/898.6dc29f65.chunk.js +4 -0
  45. package/dist/embedded-app/static/{898.c75e7113.chunk.js.map → 898.6dc29f65.chunk.js.map} +1 -1
  46. package/dist/embedded-app/static/{9234.ad94610e.chunk.js → 9234.d73cb688.chunk.js} +1 -1
  47. package/dist/embedded-app/static/{9234.ad94610e.chunk.js.map → 9234.d73cb688.chunk.js.map} +1 -1
  48. package/dist/embedded-app/static/{9605.2c26c71d.chunk.js → 9605.9dfa2d00.chunk.js} +1 -1
  49. package/dist/embedded-app/static/{9605.2c26c71d.chunk.js.map → 9605.9dfa2d00.chunk.js.map} +1 -1
  50. package/dist/embedded-app/static/{9652.5fd19eb0.chunk.js → 9652.4c4ba768.chunk.js} +1 -1
  51. package/dist/embedded-app/static/{9652.5fd19eb0.chunk.js.map → 9652.4c4ba768.chunk.js.map} +1 -1
  52. package/dist/embedded-app/static/main.304a0771.js +509 -0
  53. package/dist/embedded-app/static/main.304a0771.js.map +1 -0
  54. package/dist/embedded-app/static/{module-date-fns.9ba6144d.js → module-date-fns.2e1096cc.js} +1 -1
  55. package/dist/embedded-app/static/{module-date-fns.9ba6144d.js.map → module-date-fns.2e1096cc.js.map} +1 -1
  56. package/dist/embedded-app/static/{module-material-table.e3f26578.js → module-material-table.02244708.js} +1 -1
  57. package/dist/embedded-app/static/{module-material-table.e3f26578.js.map → module-material-table.02244708.js.map} +1 -1
  58. package/dist/embedded-app/static/{module-material-ui.2c452b58.js → module-material-ui.9dcefdc1.js} +1 -1
  59. package/dist/embedded-app/static/{module-material-ui.2c452b58.js.map → module-material-ui.9dcefdc1.js.map} +1 -1
  60. package/dist/embedded-app/static/module-mui.05cfef7f.js +3 -0
  61. package/dist/embedded-app/static/module-mui.05cfef7f.js.map +1 -0
  62. package/dist/embedded-app/static/{module-react-beautiful-dnd.ea59573c.js → module-react-beautiful-dnd.996c3b37.js} +1 -1
  63. package/dist/embedded-app/static/{module-react-beautiful-dnd.ea59573c.js.map → module-react-beautiful-dnd.996c3b37.js.map} +1 -1
  64. package/dist/embedded-app/static/{module-react-dom.1f38e13a.js → module-react-dom.3d6c828c.js} +6 -6
  65. package/dist/embedded-app/static/module-react-dom.3d6c828c.js.map +1 -0
  66. package/dist/embedded-app/static/module-react-router-dom.54955edf.js +23 -0
  67. package/dist/embedded-app/static/module-react-router-dom.54955edf.js.map +1 -0
  68. package/dist/embedded-app/static/module-react-router.0dc172f6.js +23 -0
  69. package/dist/embedded-app/static/module-react-router.0dc172f6.js.map +1 -0
  70. package/dist/embedded-app/static/{runtime.87e083f2.js → runtime.304a0771.js} +2 -2
  71. package/dist/embedded-app/static/{runtime.87e083f2.js.map → runtime.304a0771.js.map} +1 -1
  72. package/dist/embedded-app/static/vendor.304a0771.js +151 -0
  73. package/dist/embedded-app/static/vendor.304a0771.js.map +1 -0
  74. package/dist/index.cjs.js +1 -1
  75. package/package.json +4 -4
  76. package/dist/embedded-app/static/1902.6f404f8c.chunk.js +0 -10
  77. package/dist/embedded-app/static/1902.6f404f8c.chunk.js.map +0 -1
  78. package/dist/embedded-app/static/4919.e2124196.chunk.js +0 -3
  79. package/dist/embedded-app/static/4919.e2124196.chunk.js.map +0 -1
  80. package/dist/embedded-app/static/898.c75e7113.chunk.js +0 -4
  81. package/dist/embedded-app/static/main.87e083f2.js +0 -509
  82. package/dist/embedded-app/static/main.87e083f2.js.map +0 -1
  83. package/dist/embedded-app/static/module-mui.e17dd999.js +0 -3
  84. package/dist/embedded-app/static/module-mui.e17dd999.js.map +0 -1
  85. package/dist/embedded-app/static/module-react-dom.1f38e13a.js.map +0 -1
  86. package/dist/embedded-app/static/module-react-router-dom.0c2bb614.js +0 -23
  87. package/dist/embedded-app/static/module-react-router-dom.0c2bb614.js.map +0 -1
  88. package/dist/embedded-app/static/module-react-router.dac764ce.js +0 -23
  89. package/dist/embedded-app/static/module-react-router.dac764ce.js.map +0 -1
  90. package/dist/embedded-app/static/vendor.87e083f2.js +0 -155
  91. package/dist/embedded-app/static/vendor.87e083f2.js.map +0 -1
@@ -0,0 +1,23 @@
1
+ "use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[9669],{73970:(Aa,Wr,_e)=>{_e.d(Wr,{Kd:()=>aa,N_:()=>la});var oe=_e(14041),jt=_e.t(oe,2),Vr=_e(43144),$r=_e.t(Vr,2),Ne=_e(18690),Ht=_e(74808);/**
2
+ * @remix-run/router v1.19.1
3
+ *
4
+ * Copyright (c) Remix Software Inc.
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE.md file in the root directory of this source tree.
8
+ *
9
+ * @license MIT
10
+ */function H(){return H=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},H.apply(this,arguments)}var X;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(X||(X={}));const zt="popstate";function Ua(e){e===void 0&&(e={});let{initialEntries:t=["/"],initialIndex:r,v5Compat:n=!1}=e,a;a=t.map((y,R)=>p(y,typeof y=="string"?null:y.state,R===0?"default":void 0));let o=s(r??a.length-1),i=X.Pop,u=null;function s(y){return Math.min(Math.max(y,0),a.length-1)}function f(){return a[o]}function p(y,R,w){R===void 0&&(R=null);let E=fe(a?f().pathname:"/",y,R,w);return de(E.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(y)),E}function m(y){return typeof y=="string"?y:he(y)}return{get index(){return o},get action(){return i},get location(){return f()},createHref:m,createURL(y){return new URL(m(y),"http://localhost")},encodeLocation(y){let R=typeof y=="string"?ue(y):y;return{pathname:R.pathname||"",search:R.search||"",hash:R.hash||""}},push(y,R){i=X.Push;let w=p(y,R);o+=1,a.splice(o,a.length,w),n&&u&&u({action:i,location:w,delta:1})},replace(y,R){i=X.Replace;let w=p(y,R);a[o]=w,n&&u&&u({action:i,location:w,delta:0})},go(y){i=X.Pop;let R=s(o+y),w=a[R];o=R,u&&u({action:i,location:w,delta:y})},listen(y){return u=y,()=>{u=null}}}}function Yr(e){e===void 0&&(e={});function t(n,a){let{pathname:o,search:i,hash:u}=n.location;return fe("",{pathname:o,search:i,hash:u},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(n,a){return typeof a=="string"?a:he(a)}return kt(t,r,null,e)}function Na(e){e===void 0&&(e={});function t(a,o){let{pathname:i="/",search:u="",hash:s=""}=ue(a.location.hash.substr(1));return!i.startsWith("/")&&!i.startsWith(".")&&(i="/"+i),fe("",{pathname:i,search:u,hash:s},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function r(a,o){let i=a.document.querySelector("base"),u="";if(i&&i.getAttribute("href")){let s=a.location.href,f=s.indexOf("#");u=f===-1?s:s.slice(0,f)}return u+"#"+(typeof o=="string"?o:he(o))}function n(a,o){de(a.pathname.charAt(0)==="/","relative pathnames are not supported in hash history.push("+JSON.stringify(o)+")")}return kt(t,r,n,e)}function z(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function de(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Jr(){return Math.random().toString(36).substr(2,8)}function Bt(e,t){return{usr:e.state,key:e.key,idx:t}}function fe(e,t,r,n){return r===void 0&&(r=null),H({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ue(t):t,{state:r,key:t&&t.key||n||Jr()})}function he(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function ue(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function kt(e,t,r,n){n===void 0&&(n={});let{window:a=document.defaultView,v5Compat:o=!1}=n,i=a.history,u=X.Pop,s=null,f=p();f==null&&(f=0,i.replaceState(H({},i.state,{idx:f}),""));function p(){return(i.state||{idx:null}).idx}function m(){u=X.Pop;let E=p(),T=E==null?null:E-f;f=E,s&&s({action:u,location:w.location,delta:T})}function g(E,T){u=X.Push;let x=fe(w.location,E,T);r&&r(x,E),f=p()+1;let L=Bt(x,f),b=w.createHref(x);try{i.pushState(L,"",b)}catch(I){if(I instanceof DOMException&&I.name==="DataCloneError")throw I;a.location.assign(b)}o&&s&&s({action:u,location:w.location,delta:1})}function y(E,T){u=X.Replace;let x=fe(w.location,E,T);r&&r(x,E),f=p();let L=Bt(x,f),b=w.createHref(x);i.replaceState(L,"",b),o&&s&&s({action:u,location:w.location,delta:0})}function R(E){let T=a.location.origin!=="null"?a.location.origin:a.location.href,x=typeof E=="string"?E:he(E);return x=x.replace(/ $/,"%20"),z(T,"No window.location.(origin|href) available to create URL for href: "+x),new URL(x,T)}let w={get action(){return u},get location(){return e(a,i)},listen(E){if(s)throw new Error("A history only accepts one active listener");return a.addEventListener(zt,m),s=E,()=>{a.removeEventListener(zt,m),s=null}},createHref(E){return t(a,E)},createURL:R,encodeLocation(E){let T=R(E);return{pathname:T.pathname,search:T.search,hash:T.hash}},push:g,replace:y,go(E){return i.go(E)}};return w}var B;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(B||(B={}));const Xr=new Set(["lazy","caseSensitive","path","id","index","children"]);function Gr(e){return e.index===!0}function Ie(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((a,o)=>{let i=[...r,String(o)],u=typeof a.id=="string"?a.id:i.join("-");if(z(a.index!==!0||!a.children,"Cannot specify children on an index route"),z(!n[u],'Found a route id collision on id "'+u+`". Route id's must be globally unique within Data Router usages`),Gr(a)){let s=H({},a,t(a),{id:u});return n[u]=s,s}else{let s=H({},a,t(a),{id:u,children:void 0});return n[u]=s,a.children&&(s.children=Ie(a.children,t,i,n)),s}})}function ge(e,t,r){return r===void 0&&(r="/"),nt(e,t,r,!1)}function nt(e,t,r,n){let a=typeof t=="string"?ue(t):t,o=Ve(a.pathname||"/",r);if(o==null)return null;let i=Kt(e);Zr(i);let u=null;for(let s=0;u==null&&s<i.length;++s){let f=cn(o);u=sn(i[s],f,n)}return u}function Qr(e,t){let{route:r,pathname:n,params:a}=e;return{id:r.id,pathname:n,params:a,data:t[r.id],handle:r.handle}}function Kt(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let a=(o,i,u)=>{let s={relativePath:u===void 0?o.path||"":u,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};s.relativePath.startsWith("/")&&(z(s.relativePath.startsWith(n),'Absolute route path "'+s.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),s.relativePath=s.relativePath.slice(n.length));let f=$e([n,s.relativePath]),p=r.concat(s);o.children&&o.children.length>0&&(z(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+f+'".')),Kt(o.children,t,p,f)),!(o.path==null&&!o.index)&&t.push({path:f,score:on(f,o.index),routesMeta:p})};return e.forEach((o,i)=>{var u;if(o.path===""||!((u=o.path)!=null&&u.includes("?")))a(o,i);else for(let s of Wt(o.path))a(o,i,s)}),t}function Wt(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return a?[o,""]:[o];let i=Wt(n.join("/")),u=[];return u.push(...i.map(s=>s===""?o:[o,s].join("/"))),a&&u.push(...i),u.map(s=>e.startsWith("/")&&s===""?"/":s)}function Zr(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:ln(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const qr=/^:[\w-]+$/,en=3,tn=2,rn=1,nn=10,an=null,Vt=e=>e==="*";function on(e,t){let r=e.split("/"),n=r.length;return r.some(Vt)&&(n+=an),t&&(n+=tn),r.filter(a=>!Vt(a)).reduce((a,o)=>a+(qr.test(o)?en:o===""?rn:nn),n)}function ln(e,t){return e.length===t.length&&e.slice(0,-1).every((n,a)=>n===t[a])?e[e.length-1]-t[t.length-1]:0}function sn(e,t,r){r===void 0&&(r=!1);let{routesMeta:n}=e,a={},o="/",i=[];for(let u=0;u<n.length;++u){let s=n[u],f=u===n.length-1,p=o==="/"?t:t.slice(o.length)||"/",m=$t({path:s.relativePath,caseSensitive:s.caseSensitive,end:f},p),g=s.route;if(!m&&f&&r&&!n[n.length-1].route.index&&(m=$t({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},p)),!m)return null;Object.assign(a,m.params),i.push({params:a,pathname:$e([o,m.pathname]),pathnameBase:pn($e([o,m.pathnameBase])),route:g}),m.pathnameBase!=="/"&&(o=$e([o,m.pathnameBase]))}return i}function Ia(e,t){t===void 0&&(t={});let r=e;r.endsWith("*")&&r!=="*"&&!r.endsWith("/*")&&(de(!1,'Route path "'+r+'" will be treated as if it were '+('"'+r.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+r.replace(/\*$/,"/*")+'".')),r=r.replace(/\*$/,"/*"));const n=r.startsWith("/")?"/":"",a=i=>i==null?"":typeof i=="string"?i:String(i),o=r.split(/\/+/).map((i,u,s)=>{if(u===s.length-1&&i==="*")return a(t["*"]);const p=i.match(/^:([\w-]+)(\??)$/);if(p){const[,m,g]=p;let y=t[m];return z(g==="?"||y!=null,'Missing ":'+m+'" param'),a(y)}return i.replace(/\?$/g,"")}).filter(i=>!!i);return n+o.join("/")}function $t(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=un(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let o=a[0],i=o.replace(/(.)\/+$/,"$1"),u=a.slice(1);return{params:n.reduce((f,p,m)=>{let{paramName:g,isOptional:y}=p;if(g==="*"){let w=u[m]||"";i=o.slice(0,o.length-w.length).replace(/(.)\/+$/,"$1")}const R=u[m];return y&&!R?f[g]=void 0:f[g]=(R||"").replace(/%2F/g,"/"),f},{}),pathname:o,pathnameBase:i,pattern:e}}function un(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),de(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,(i,u,s)=>(n.push({paramName:u,isOptional:s!=null}),s?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function cn(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return de(!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 Ve(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 dn(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?ue(e):e;return{pathname:r?r.startsWith("/")?r:fn(r,t):t,search:vn(n),hash:yn(a)}}function fn(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function Rt(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Yt(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function hn(e,t){let r=Yt(e);return t?r.map((n,a)=>a===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function mn(e,t,r,n){n===void 0&&(n=!1);let a;typeof e=="string"?a=ue(e):(a=H({},e),z(!a.pathname||!a.pathname.includes("?"),Rt("?","pathname","search",a)),z(!a.pathname||!a.pathname.includes("#"),Rt("#","pathname","hash",a)),z(!a.search||!a.search.includes("#"),Rt("#","search","hash",a)));let o=e===""||a.pathname==="",i=o?"/":a.pathname,u;if(i==null)u=r;else{let m=t.length-1;if(!n&&i.startsWith("..")){let g=i.split("/");for(;g[0]==="..";)g.shift(),m-=1;a.pathname=g.join("/")}u=m>=0?t[m]:"/"}let s=dn(a,u),f=i&&i!=="/"&&i.endsWith("/"),p=(o||i===".")&&r.endsWith("/");return!s.pathname.endsWith("/")&&(f||p)&&(s.pathname+="/"),s}function Oa(e){return e===""||e.pathname===""?"/":typeof e=="string"?ue(e).pathname:e.pathname}const $e=e=>e.join("/").replace(/\/\/+/g,"/"),pn=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),vn=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,yn=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,ja=function(t,r){r===void 0&&(r={});let n=typeof r=="number"?{status:r}:r,a=new Headers(n.headers);return a.has("Content-Type")||a.set("Content-Type","application/json; charset=utf-8"),new Response(JSON.stringify(t),H({},n,{headers:a}))};class gn{constructor(t,r){this.type="DataWithResponseInit",this.data=t,this.init=r||null}}function Ha(e,t){return new gn(e,typeof t=="number"?{status:t}:t)}class Jt extends null{}class wn{constructor(t,r){this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],z(t&&typeof t=="object"&&!Array.isArray(t),"defer() only accepts plain objects");let n;this.abortPromise=new Promise((o,i)=>n=i),this.controller=new AbortController;let a=()=>n(new Jt("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",a),this.controller.signal.addEventListener("abort",a),this.data=Object.entries(t).reduce((o,i)=>{let[u,s]=i;return Object.assign(o,{[u]:this.trackPromise(u,s)})},{}),this.done&&this.unlistenAbortSignal(),this.init=r}trackPromise(t,r){if(!(r instanceof Promise))return r;this.deferredKeys.push(t),this.pendingKeysSet.add(t);let n=Promise.race([r,this.abortPromise]).then(a=>this.onSettle(n,t,void 0,a),a=>this.onSettle(n,t,a));return n.catch(()=>{}),Object.defineProperty(n,"_tracked",{get:()=>!0}),n}onSettle(t,r,n,a){if(this.controller.signal.aborted&&n instanceof Jt)return this.unlistenAbortSignal(),Object.defineProperty(t,"_error",{get:()=>n}),Promise.reject(n);if(this.pendingKeysSet.delete(r),this.done&&this.unlistenAbortSignal(),n===void 0&&a===void 0){let o=new Error('Deferred data for key "'+r+'" resolved/rejected with `undefined`, you must resolve/reject with a value or `null`.');return Object.defineProperty(t,"_error",{get:()=>o}),this.emit(!1,r),Promise.reject(o)}return a===void 0?(Object.defineProperty(t,"_error",{get:()=>n}),this.emit(!1,r),Promise.reject(n)):(Object.defineProperty(t,"_data",{get:()=>a}),this.emit(!1,r),a)}emit(t,r){this.subscribers.forEach(n=>n(t,r))}subscribe(t){return this.subscribers.add(t),()=>this.subscribers.delete(t)}cancel(){this.controller.abort(),this.pendingKeysSet.forEach((t,r)=>this.pendingKeysSet.delete(r)),this.emit(!0)}async resolveData(t){let r=!1;if(!this.done){let n=()=>this.cancel();t.addEventListener("abort",n),r=await new Promise(a=>{this.subscribe(o=>{t.removeEventListener("abort",n),(o||this.done)&&a(o)})})}return r}get done(){return this.pendingKeysSet.size===0}get unwrappedData(){return z(this.data!==null&&this.done,"Can only unwrap data on initialized and settled deferreds"),Object.entries(this.data).reduce((t,r)=>{let[n,a]=r;return Object.assign(t,{[n]:bn(a)})},{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}}function Rn(e){return e instanceof Promise&&e._tracked===!0}function bn(e){if(!Rn(e))return e;if(e._error)throw e._error;return e._data}const za=function(t,r){r===void 0&&(r={});let n=typeof r=="number"?{status:r}:r;return new wn(t,n)},Xt=function(t,r){r===void 0&&(r=302);let n=r;typeof n=="number"?n={status:n}:typeof n.status>"u"&&(n.status=302);let a=new Headers(n.headers);return a.set("Location",t),new Response(null,H({},n,{headers:a}))},Ba=(e,t)=>{let r=Xt(e,t);return r.headers.set("X-Remix-Reload-Document","true"),r},ka=(e,t)=>{let r=Xt(e,t);return r.headers.set("X-Remix-Replace","true"),r};class bt{constructor(t,r,n,a){a===void 0&&(a=!1),this.status=t,this.statusText=r||"",this.internal=a,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function Ye(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Gt=["post","put","patch","delete"],Sn=new Set(Gt),En=["get",...Gt],Pn=new Set(En),xn=new Set([301,302,303,307,308]),Dn=new Set([307,308]),St={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ln={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Je={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Et=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Qt=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Zt="remix-router-transitions";function Ka(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",n=!r;z(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a;if(e.mapRouteProperties)a=e.mapRouteProperties;else if(e.detectErrorBoundary){let l=e.detectErrorBoundary;a=c=>({hasErrorBoundary:l(c)})}else a=Qt;let o={},i=Ie(e.routes,a,void 0,o),u,s=e.basename||"/",f=e.unstable_dataStrategy||lr,p=e.unstable_patchRoutesOnNavigation,m=H({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),g=null,y=new Set,R=1e3,w=new Set,E=null,T=null,x=null,L=e.hydrationData!=null,b=ge(i,e.history.location,s),I=null;if(b==null&&!p){let l=Y(404,{pathname:e.history.location.pathname}),{matches:c,route:h}=at(i);b=c,I={[h.id]:l}}b&&!e.hydrationData&&pt(b,i,e.history.location.pathname).active&&(b=null);let k;if(b)if(b.some(l=>l.route.lazy))k=!1;else if(!b.some(l=>l.route.loader))k=!0;else if(m.v7_partialHydration){let l=e.hydrationData?e.hydrationData.loaderData:null,c=e.hydrationData?e.hydrationData.errors:null,h=v=>v.route.loader?typeof v.route.loader=="function"&&v.route.loader.hydrate===!0?!1:l&&l[v.route.id]!==void 0||c&&c[v.route.id]!==void 0:!0;if(c){let v=b.findIndex(P=>c[P.route.id]!==void 0);k=b.slice(0,v+1).every(h)}else k=b.every(h)}else k=e.hydrationData!=null;else if(k=!1,b=[],m.v7_partialHydration){let l=pt(null,i,e.history.location.pathname);l.active&&l.matches&&(b=l.matches)}let O,d={historyAction:e.history.action,location:e.history.location,matches:b,initialized:k,navigation:St,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||I,fetchers:new Map,blockers:new Map},F=X.Pop,j=!1,A,Q=!1,ae=new Map,ee=null,Pe=!1,Fe=!1,ut=[],ct=new Set,Z=new Map,dt=0,Ze=-1,He=new Map,me=new Set,ze=new Map,qe=new Map,pe=new Set,Me=new Map,Ae=new Map,pa=new Map,Ut=!1;function va(){if(g=e.history.listen(l=>{let{action:c,location:h,delta:v}=l;if(Ut){Ut=!1;return}de(Ae.size===0||v!=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 P=Hr({currentLocation:d.location,nextLocation:h,historyAction:c});if(P&&v!=null){Ut=!0,e.history.go(v*-1),ht(P,{state:"blocked",location:h,proceed(){ht(P,{state:"proceeding",proceed:void 0,reset:void 0,location:h}),e.history.go(v)},reset(){let D=new Map(d.blockers);D.set(P,Je),ne({blockers:D})}});return}return Ue(c,h)}),r){zn(t,ae);let l=()=>Bn(t,ae);t.addEventListener("pagehide",l),ee=()=>t.removeEventListener("pagehide",l)}return d.initialized||Ue(X.Pop,d.location,{initialHydration:!0}),O}function ya(){g&&g(),ee&&ee(),y.clear(),A&&A.abort(),d.fetchers.forEach((l,c)=>ft(c)),d.blockers.forEach((l,c)=>jr(c))}function ga(l){return y.add(l),()=>y.delete(l)}function ne(l,c){c===void 0&&(c={}),d=H({},d,l);let h=[],v=[];m.v7_fetcherPersist&&d.fetchers.forEach((P,D)=>{P.state==="idle"&&(pe.has(D)?v.push(D):h.push(D))}),[...y].forEach(P=>P(d,{deletedFetchers:v,unstable_viewTransitionOpts:c.viewTransitionOpts,unstable_flushSync:c.flushSync===!0})),m.v7_fetcherPersist&&(h.forEach(P=>d.fetchers.delete(P)),v.forEach(P=>ft(P)))}function Be(l,c,h){var v,P;let{flushSync:D}=h===void 0?{}:h,C=d.actionData!=null&&d.navigation.formMethod!=null&&le(d.navigation.formMethod)&&d.navigation.state==="loading"&&((v=l.state)==null?void 0:v._isRedirect)!==!0,S;c.actionData?Object.keys(c.actionData).length>0?S=c.actionData:S=null:C?S=d.actionData:S=null;let M=c.loaderData?pr(d.loaderData,c.loaderData,c.matches||[],c.errors):d.loaderData,_=d.blockers;_.size>0&&(_=new Map(_),_.forEach((W,$)=>_.set($,Je)));let U=j===!0||d.navigation.formMethod!=null&&le(d.navigation.formMethod)&&((P=l.state)==null?void 0:P._isRedirect)!==!0;u&&(i=u,u=void 0),Pe||F===X.Pop||(F===X.Push?e.history.push(l,l.state):F===X.Replace&&e.history.replace(l,l.state));let V;if(F===X.Pop){let W=ae.get(d.location.pathname);W&&W.has(l.pathname)?V={currentLocation:d.location,nextLocation:l}:ae.has(l.pathname)&&(V={currentLocation:l,nextLocation:d.location})}else if(Q){let W=ae.get(d.location.pathname);W?W.add(l.pathname):(W=new Set([l.pathname]),ae.set(d.location.pathname,W)),V={currentLocation:d.location,nextLocation:l}}ne(H({},c,{actionData:S,loaderData:M,historyAction:F,location:l,initialized:!0,navigation:St,revalidation:"idle",restoreScrollPosition:Br(l,c.matches||d.matches),preventScrollReset:U,blockers:_}),{viewTransitionOpts:V,flushSync:D===!0}),F=X.Pop,j=!1,Q=!1,Pe=!1,Fe=!1,ut=[]}async function Fr(l,c){if(typeof l=="number"){e.history.go(l);return}let h=Pt(d.location,d.matches,s,m.v7_prependBasename,l,m.v7_relativeSplatPath,c?.fromRouteId,c?.relative),{path:v,submission:P,error:D}=er(m.v7_normalizeFormMethod,!1,h,c),C=d.location,S=fe(d.location,v,c&&c.state);S=H({},S,e.history.encodeLocation(S));let M=c&&c.replace!=null?c.replace:void 0,_=X.Push;M===!0?_=X.Replace:M===!1||P!=null&&le(P.formMethod)&&P.formAction===d.location.pathname+d.location.search&&(_=X.Replace);let U=c&&"preventScrollReset"in c?c.preventScrollReset===!0:void 0,V=(c&&c.unstable_flushSync)===!0,W=Hr({currentLocation:C,nextLocation:S,historyAction:_});if(W){ht(W,{state:"blocked",location:S,proceed(){ht(W,{state:"proceeding",proceed:void 0,reset:void 0,location:S}),Fr(l,c)},reset(){let $=new Map(d.blockers);$.set(W,Je),ne({blockers:$})}});return}return await Ue(_,S,{submission:P,pendingError:D,preventScrollReset:U,replace:c&&c.replace,enableViewTransition:c&&c.unstable_viewTransition,flushSync:V})}function wa(){if(Nt(),ne({revalidation:"loading"}),d.navigation.state!=="submitting"){if(d.navigation.state==="idle"){Ue(d.historyAction,d.location,{startUninterruptedRevalidation:!0});return}Ue(F||d.historyAction,d.navigation.location,{overrideNavigation:d.navigation})}}async function Ue(l,c,h){A&&A.abort(),A=null,F=l,Pe=(h&&h.startUninterruptedRevalidation)===!0,Ca(d.location,d.matches),j=(h&&h.preventScrollReset)===!0,Q=(h&&h.enableViewTransition)===!0;let v=u||i,P=h&&h.overrideNavigation,D=ge(v,c,s),C=(h&&h.flushSync)===!0,S=pt(D,v,c.pathname);if(S.active&&S.matches&&(D=S.matches),!D){let{error:K,notFoundMatches:re,route:q}=It(c.pathname);Be(c,{matches:re,loaderData:{},errors:{[q.id]:K}},{flushSync:C});return}if(d.initialized&&!Fe&&An(d.location,c)&&!(h&&h.submission&&le(h.submission.formMethod))){Be(c,{matches:D},{flushSync:C});return}A=new AbortController;let M=Oe(e.history,c,A.signal,h&&h.submission),_;if(h&&h.pendingError)_=[Ce(D).route.id,{type:B.error,error:h.pendingError}];else if(h&&h.submission&&le(h.submission.formMethod)){let K=await Ra(M,c,h.submission,D,S.active,{replace:h.replace,flushSync:C});if(K.shortCircuited)return;if(K.pendingActionResult){let[re,q]=K.pendingActionResult;if(te(q)&&Ye(q.error)&&q.error.status===404){A=null,Be(c,{matches:K.matches,loaderData:{},errors:{[re]:q.error}});return}}D=K.matches||D,_=K.pendingActionResult,P=_t(c,h.submission),C=!1,S.active=!1,M=Oe(e.history,M.url,M.signal)}let{shortCircuited:U,matches:V,loaderData:W,errors:$}=await ba(M,c,D,S.active,P,h&&h.submission,h&&h.fetcherSubmission,h&&h.replace,h&&h.initialHydration===!0,C,_);U||(A=null,Be(c,H({matches:V||D},vr(_),{loaderData:W,errors:$})))}async function Ra(l,c,h,v,P,D){D===void 0&&(D={}),Nt();let C=jn(c,h);if(ne({navigation:C},{flushSync:D.flushSync===!0}),P){let _=await vt(v,c.pathname,l.signal);if(_.type==="aborted")return{shortCircuited:!0};if(_.type==="error"){let{boundaryId:U,error:V}=mt(c.pathname,_);return{matches:_.partialMatches,pendingActionResult:[U,{type:B.error,error:V}]}}else if(_.matches)v=_.matches;else{let{notFoundMatches:U,error:V,route:W}=It(c.pathname);return{matches:U,pendingActionResult:[W.id,{type:B.error,error:V}]}}}let S,M=Te(v,c);if(!M.route.action&&!M.route.lazy)S={type:B.error,error:Y(405,{method:l.method,pathname:c.pathname,routeId:M.route.id})};else if(S=(await tt("action",l,[M],v))[0],l.signal.aborted)return{shortCircuited:!0};if(Re(S)){let _;return D&&D.replace!=null?_=D.replace:_=dr(S.response.headers.get("Location"),new URL(l.url),s)===d.location.pathname+d.location.search,await et(l,S,{submission:h,replace:_}),{shortCircuited:!0}}if(we(S))throw Y(400,{type:"defer-action"});if(te(S)){let _=Ce(v,M.route.id);return(D&&D.replace)!==!0&&(F=X.Push),{matches:v,pendingActionResult:[_.route.id,S]}}return{matches:v,pendingActionResult:[M.route.id,S]}}async function ba(l,c,h,v,P,D,C,S,M,_,U){let V=P||_t(c,D),W=D||C||Er(V),$=!Pe&&(!m.v7_partialHydration||!M);if(v){if($){let G=Mr(U);ne(H({navigation:V},G!==void 0?{actionData:G}:{}),{flushSync:_})}let N=await vt(h,c.pathname,l.signal);if(N.type==="aborted")return{shortCircuited:!0};if(N.type==="error"){let{boundaryId:G,error:ie}=mt(c.pathname,N);return{matches:N.partialMatches,loaderData:{},errors:{[G]:ie}}}else if(N.matches)h=N.matches;else{let{error:G,notFoundMatches:ie,route:J}=It(c.pathname);return{matches:ie,loaderData:{},errors:{[J.id]:G}}}}let K=u||i,[re,q]=rr(e.history,d,h,W,c,m.v7_partialHydration&&M===!0,m.v7_skipActionErrorRevalidation,Fe,ut,ct,pe,ze,me,K,s,U);if(Ot(N=>!(h&&h.some(G=>G.route.id===N))||re&&re.some(G=>G.route.id===N)),Ze=++dt,re.length===0&&q.length===0){let N=Ir();return Be(c,H({matches:h,loaderData:{},errors:U&&te(U[1])?{[U[0]]:U[1].error}:null},vr(U),N?{fetchers:new Map(d.fetchers)}:{}),{flushSync:_}),{shortCircuited:!0}}if($){let N={};if(!v){N.navigation=V;let G=Mr(U);G!==void 0&&(N.actionData=G)}q.length>0&&(N.fetchers=Sa(q)),ne(N,{flushSync:_})}q.forEach(N=>{Z.has(N.key)&&De(N.key),N.controller&&Z.set(N.key,N.controller)});let rt=()=>q.forEach(N=>De(N.key));A&&A.signal.addEventListener("abort",rt);let{loaderResults:Le,fetcherResults:ke}=await Ar(d.matches,h,re,q,l);if(l.signal.aborted)return{shortCircuited:!0};A&&A.signal.removeEventListener("abort",rt),q.forEach(N=>Z.delete(N.key));let Ke=yr([...Le,...ke]);if(Ke){if(Ke.idx>=re.length){let N=q[Ke.idx-re.length].key;me.add(N)}return await et(l,Ke.result,{replace:S}),{shortCircuited:!0}}let{loaderData:We,errors:ce}=mr(d,h,re,Le,U,q,ke,Me);Me.forEach((N,G)=>{N.subscribe(ie=>{(ie||N.done)&&Me.delete(G)})}),m.v7_partialHydration&&M&&d.errors&&Object.entries(d.errors).filter(N=>{let[G]=N;return!re.some(ie=>ie.route.id===G)}).forEach(N=>{let[G,ie]=N;ce=Object.assign(ce||{},{[G]:ie})});let yt=Ir(),gt=Or(Ze),wt=yt||gt||q.length>0;return H({matches:h,loaderData:We,errors:ce},wt?{fetchers:new Map(d.fetchers)}:{})}function Mr(l){if(l&&!te(l[1]))return{[l[0]]:l[1].data};if(d.actionData)return Object.keys(d.actionData).length===0?null:d.actionData}function Sa(l){return l.forEach(c=>{let h=d.fetchers.get(c.key),v=Xe(void 0,h?h.data:void 0);d.fetchers.set(c.key,v)}),new Map(d.fetchers)}function Ea(l,c,h,v){if(n)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.");Z.has(l)&&De(l);let P=(v&&v.unstable_flushSync)===!0,D=u||i,C=Pt(d.location,d.matches,s,m.v7_prependBasename,h,m.v7_relativeSplatPath,c,v?.relative),S=ge(D,C,s),M=pt(S,D,C);if(M.active&&M.matches&&(S=M.matches),!S){ve(l,c,Y(404,{pathname:C}),{flushSync:P});return}let{path:_,submission:U,error:V}=er(m.v7_normalizeFormMethod,!0,C,v);if(V){ve(l,c,V,{flushSync:P});return}let W=Te(S,_);if(j=(v&&v.preventScrollReset)===!0,U&&le(U.formMethod)){Pa(l,c,_,W,S,M.active,P,U);return}ze.set(l,{routeId:c,path:_}),xa(l,c,_,W,S,M.active,P,U)}async function Pa(l,c,h,v,P,D,C,S){Nt(),ze.delete(l);function M(J){if(!J.route.action&&!J.route.lazy){let ye=Y(405,{method:S.formMethod,pathname:h,routeId:c});return ve(l,c,ye,{flushSync:C}),!0}return!1}if(!D&&M(v))return;let _=d.fetchers.get(l);xe(l,Hn(S,_),{flushSync:C});let U=new AbortController,V=Oe(e.history,h,U.signal,S);if(D){let J=await vt(P,h,V.signal);if(J.type==="aborted")return;if(J.type==="error"){let{error:ye}=mt(h,J);ve(l,c,ye,{flushSync:C});return}else if(J.matches){if(P=J.matches,v=Te(P,h),M(v))return}else{ve(l,c,Y(404,{pathname:h}),{flushSync:C});return}}Z.set(l,U);let W=dt,K=(await tt("action",V,[v],P))[0];if(V.signal.aborted){Z.get(l)===U&&Z.delete(l);return}if(m.v7_fetcherPersist&&pe.has(l)){if(Re(K)||te(K)){xe(l,Se(void 0));return}}else{if(Re(K))if(Z.delete(l),Ze>W){xe(l,Se(void 0));return}else return me.add(l),xe(l,Xe(S)),et(V,K,{fetcherSubmission:S});if(te(K)){ve(l,c,K.error);return}}if(we(K))throw Y(400,{type:"defer-action"});let re=d.navigation.location||d.location,q=Oe(e.history,re,U.signal),rt=u||i,Le=d.navigation.state!=="idle"?ge(rt,d.navigation.location,s):d.matches;z(Le,"Didn't find any matches after fetcher action");let ke=++dt;He.set(l,ke);let Ke=Xe(S,K.data);d.fetchers.set(l,Ke);let[We,ce]=rr(e.history,d,Le,S,re,!1,m.v7_skipActionErrorRevalidation,Fe,ut,ct,pe,ze,me,rt,s,[v.route.id,K]);ce.filter(J=>J.key!==l).forEach(J=>{let ye=J.key,Kr=d.fetchers.get(ye),Ma=Xe(void 0,Kr?Kr.data:void 0);d.fetchers.set(ye,Ma),Z.has(ye)&&De(ye),J.controller&&Z.set(ye,J.controller)}),ne({fetchers:new Map(d.fetchers)});let yt=()=>ce.forEach(J=>De(J.key));U.signal.addEventListener("abort",yt);let{loaderResults:gt,fetcherResults:wt}=await Ar(d.matches,Le,We,ce,q);if(U.signal.aborted)return;U.signal.removeEventListener("abort",yt),He.delete(l),Z.delete(l),ce.forEach(J=>Z.delete(J.key));let N=yr([...gt,...wt]);if(N){if(N.idx>=We.length){let J=ce[N.idx-We.length].key;me.add(J)}return et(q,N.result)}let{loaderData:G,errors:ie}=mr(d,d.matches,We,gt,void 0,ce,wt,Me);if(d.fetchers.has(l)){let J=Se(K.data);d.fetchers.set(l,J)}Or(ke),d.navigation.state==="loading"&&ke>Ze?(z(F,"Expected pending action"),A&&A.abort(),Be(d.navigation.location,{matches:Le,loaderData:G,errors:ie,fetchers:new Map(d.fetchers)})):(ne({errors:ie,loaderData:pr(d.loaderData,G,Le,ie),fetchers:new Map(d.fetchers)}),Fe=!1)}async function xa(l,c,h,v,P,D,C,S){let M=d.fetchers.get(l);xe(l,Xe(S,M?M.data:void 0),{flushSync:C});let _=new AbortController,U=Oe(e.history,h,_.signal);if(D){let K=await vt(P,h,U.signal);if(K.type==="aborted")return;if(K.type==="error"){let{error:re}=mt(h,K);ve(l,c,re,{flushSync:C});return}else if(K.matches)P=K.matches,v=Te(P,h);else{ve(l,c,Y(404,{pathname:h}),{flushSync:C});return}}Z.set(l,_);let V=dt,$=(await tt("loader",U,[v],P))[0];if(we($)&&($=await Sr($,U.signal,!0)||$),Z.get(l)===_&&Z.delete(l),!U.signal.aborted){if(pe.has(l)){xe(l,Se(void 0));return}if(Re($))if(Ze>V){xe(l,Se(void 0));return}else{me.add(l),await et(U,$);return}if(te($)){ve(l,c,$.error);return}z(!we($),"Unhandled fetcher deferred data"),xe(l,Se($.data))}}async function et(l,c,h){let{submission:v,fetcherSubmission:P,replace:D}=h===void 0?{}:h;c.response.headers.has("X-Remix-Revalidate")&&(Fe=!0);let C=c.response.headers.get("Location");z(C,"Expected a Location header on the redirect Response"),C=dr(C,new URL(l.url),s);let S=fe(d.location,C,{_isRedirect:!0});if(r){let $=!1;if(c.response.headers.has("X-Remix-Reload-Document"))$=!0;else if(Et.test(C)){const K=e.history.createURL(C);$=K.origin!==t.location.origin||Ve(K.pathname,s)==null}if($){D?t.location.replace(C):t.location.assign(C);return}}A=null;let M=D===!0||c.response.headers.has("X-Remix-Replace")?X.Replace:X.Push,{formMethod:_,formAction:U,formEncType:V}=d.navigation;!v&&!P&&_&&U&&V&&(v=Er(d.navigation));let W=v||P;if(Dn.has(c.response.status)&&W&&le(W.formMethod))await Ue(M,S,{submission:H({},W,{formAction:C}),preventScrollReset:j});else{let $=_t(S,v);await Ue(M,S,{overrideNavigation:$,fetcherSubmission:P,preventScrollReset:j})}}async function tt(l,c,h,v){try{let P=await sr(f,l,c,h,v,o,a);return await Promise.all(P.map((D,C)=>{if(wr(D)){let S=D.result;return{type:B.redirect,response:cr(S,c,h[C].route.id,v,s,m.v7_relativeSplatPath)}}return ur(D)}))}catch(P){return h.map(()=>({type:B.error,error:P}))}}async function Ar(l,c,h,v,P){let[D,...C]=await Promise.all([h.length?tt("loader",P,h,c):[],...v.map(S=>{if(S.matches&&S.match&&S.controller){let M=Oe(e.history,S.path,S.controller.signal);return tt("loader",M,[S.match],S.matches).then(_=>_[0])}else return Promise.resolve({type:B.error,error:Y(404,{pathname:S.path})})})]);return await Promise.all([br(l,h,D,D.map(()=>P.signal),!1,d.loaderData),br(l,v.map(S=>S.match),C,v.map(S=>S.controller?S.controller.signal:null),!0)]),{loaderResults:D,fetcherResults:C}}function Nt(){Fe=!0,ut.push(...Ot()),ze.forEach((l,c)=>{Z.has(c)&&(ct.add(c),De(c))})}function xe(l,c,h){h===void 0&&(h={}),d.fetchers.set(l,c),ne({fetchers:new Map(d.fetchers)},{flushSync:(h&&h.flushSync)===!0})}function ve(l,c,h,v){v===void 0&&(v={});let P=Ce(d.matches,c);ft(l),ne({errors:{[P.route.id]:h},fetchers:new Map(d.fetchers)},{flushSync:(v&&v.flushSync)===!0})}function Ur(l){return m.v7_fetcherPersist&&(qe.set(l,(qe.get(l)||0)+1),pe.has(l)&&pe.delete(l)),d.fetchers.get(l)||Ln}function ft(l){let c=d.fetchers.get(l);Z.has(l)&&!(c&&c.state==="loading"&&He.has(l))&&De(l),ze.delete(l),He.delete(l),me.delete(l),pe.delete(l),ct.delete(l),d.fetchers.delete(l)}function Da(l){if(m.v7_fetcherPersist){let c=(qe.get(l)||0)-1;c<=0?(qe.delete(l),pe.add(l)):qe.set(l,c)}else ft(l);ne({fetchers:new Map(d.fetchers)})}function De(l){let c=Z.get(l);z(c,"Expected fetch controller: "+l),c.abort(),Z.delete(l)}function Nr(l){for(let c of l){let h=Ur(c),v=Se(h.data);d.fetchers.set(c,v)}}function Ir(){let l=[],c=!1;for(let h of me){let v=d.fetchers.get(h);z(v,"Expected fetcher: "+h),v.state==="loading"&&(me.delete(h),l.push(h),c=!0)}return Nr(l),c}function Or(l){let c=[];for(let[h,v]of He)if(v<l){let P=d.fetchers.get(h);z(P,"Expected fetcher: "+h),P.state==="loading"&&(De(h),He.delete(h),c.push(h))}return Nr(c),c.length>0}function La(l,c){let h=d.blockers.get(l)||Je;return Ae.get(l)!==c&&Ae.set(l,c),h}function jr(l){d.blockers.delete(l),Ae.delete(l)}function ht(l,c){let h=d.blockers.get(l)||Je;z(h.state==="unblocked"&&c.state==="blocked"||h.state==="blocked"&&c.state==="blocked"||h.state==="blocked"&&c.state==="proceeding"||h.state==="blocked"&&c.state==="unblocked"||h.state==="proceeding"&&c.state==="unblocked","Invalid blocker state transition: "+h.state+" -> "+c.state);let v=new Map(d.blockers);v.set(l,c),ne({blockers:v})}function Hr(l){let{currentLocation:c,nextLocation:h,historyAction:v}=l;if(Ae.size===0)return;Ae.size>1&&de(!1,"A router only supports one blocker at a time");let P=Array.from(Ae.entries()),[D,C]=P[P.length-1],S=d.blockers.get(D);if(!(S&&S.state==="proceeding")&&C({currentLocation:c,nextLocation:h,historyAction:v}))return D}function It(l){let c=Y(404,{pathname:l}),h=u||i,{matches:v,route:P}=at(h);return Ot(),{notFoundMatches:v,route:P,error:c}}function mt(l,c){return{boundaryId:Ce(c.partialMatches).route.id,error:Y(400,{type:"route-discovery",pathname:l,message:c.error!=null&&"message"in c.error?c.error:String(c.error)})}}function Ot(l){let c=[];return Me.forEach((h,v)=>{(!l||l(v))&&(h.cancel(),c.push(v),Me.delete(v))}),c}function _a(l,c,h){if(E=l,x=c,T=h||null,!L&&d.navigation===St){L=!0;let v=Br(d.location,d.matches);v!=null&&ne({restoreScrollPosition:v})}return()=>{E=null,x=null,T=null}}function zr(l,c){return T&&T(l,c.map(v=>Qr(v,d.loaderData)))||l.key}function Ca(l,c){if(E&&x){let h=zr(l,c);E[h]=x()}}function Br(l,c){if(E){let h=zr(l,c),v=E[h];if(typeof v=="number")return v}return null}function pt(l,c,h){if(p){if(w.has(h))return{active:!1,matches:l};if(l){if(Object.keys(l[0].params).length>0)return{active:!0,matches:nt(c,h,s,!0)}}else return{active:!0,matches:nt(c,h,s,!0)||[]}}return{active:!1,matches:null}}async function vt(l,c,h){let v=l;for(;;){let P=u==null,D=u||i;try{await Fn(p,c,v,D,o,a,pa,h)}catch(M){return{type:"error",error:M,partialMatches:v}}finally{P&&(i=[...i])}if(h.aborted)return{type:"aborted"};let C=ge(D,c,s);if(C)return kr(c,w),{type:"success",matches:C};let S=nt(D,c,s,!0);if(!S||v.length===S.length&&v.every((M,_)=>M.route.id===S[_].route.id))return kr(c,w),{type:"success",matches:null};v=S}}function kr(l,c){if(c.size>=R){let h=c.values().next().value;c.delete(h)}c.add(l)}function Ta(l){o={},u=Ie(l,a,void 0,o)}function Fa(l,c){let h=u==null;ir(l,c,u||i,o,a),h&&(i=[...i],ne({}))}return O={get basename(){return s},get future(){return m},get state(){return d},get routes(){return i},get window(){return t},initialize:va,subscribe:ga,enableScrollRestoration:_a,navigate:Fr,fetch:Ea,revalidate:wa,createHref:l=>e.history.createHref(l),encodeLocation:l=>e.history.encodeLocation(l),getFetcher:Ur,deleteFetcher:Da,dispose:ya,getBlocker:La,deleteBlocker:jr,patchRoutes:Fa,_internalFetchControllers:Z,_internalActiveDeferreds:Me,_internalSetRoutes:Ta},O}const _n=Symbol("deferred");function Wa(e,t){z(e.length>0,"You must provide a non-empty routes array to createStaticHandler");let r={},n=(t?t.basename:null)||"/",a;if(t!=null&&t.mapRouteProperties)a=t.mapRouteProperties;else if(t!=null&&t.detectErrorBoundary){let y=t.detectErrorBoundary;a=R=>({hasErrorBoundary:y(R)})}else a=Qt;let o=H({v7_relativeSplatPath:!1,v7_throwAbortReason:!1},t?t.future:null),i=Ie(e,a,void 0,r);async function u(y,R){let{requestContext:w,skipLoaderErrorBubbling:E,unstable_dataStrategy:T}=R===void 0?{}:R,x=new URL(y.url),L=y.method,b=fe("",he(x),null,"default"),I=ge(i,b,n);if(!Dt(L)&&L!=="HEAD"){let O=Y(405,{method:L}),{matches:d,route:F}=at(i);return{basename:n,location:b,matches:d,loaderData:{},actionData:null,errors:{[F.id]:O},statusCode:O.status,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}else if(!I){let O=Y(404,{pathname:b.pathname}),{matches:d,route:F}=at(i);return{basename:n,location:b,matches:d,loaderData:{},actionData:null,errors:{[F.id]:O},statusCode:O.status,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}let k=await f(y,b,I,w,T||null,E===!0,null);return be(k)?k:H({location:b,basename:n},k)}async function s(y,R){let{routeId:w,requestContext:E,unstable_dataStrategy:T}=R===void 0?{}:R,x=new URL(y.url),L=y.method,b=fe("",he(x),null,"default"),I=ge(i,b,n);if(!Dt(L)&&L!=="HEAD"&&L!=="OPTIONS")throw Y(405,{method:L});if(!I)throw Y(404,{pathname:b.pathname});let k=w?I.find(j=>j.route.id===w):Te(I,b);if(w&&!k)throw Y(403,{pathname:b.pathname,routeId:w});if(!k)throw Y(404,{pathname:b.pathname});let O=await f(y,b,I,E,T||null,!1,k);if(be(O))return O;let d=O.errors?Object.values(O.errors)[0]:void 0;if(d!==void 0)throw d;if(O.actionData)return Object.values(O.actionData)[0];if(O.loaderData){var F;let j=Object.values(O.loaderData)[0];return(F=O.activeDeferreds)!=null&&F[k.route.id]&&(j[_n]=O.activeDeferreds[k.route.id]),j}}async function f(y,R,w,E,T,x,L){z(y.signal,"query()/queryRoute() requests must contain an AbortController signal");try{if(le(y.method.toLowerCase()))return await p(y,w,L||Te(w,R),E,T,x,L!=null);let b=await m(y,w,E,T,x,L);return be(b)?b:H({},b,{actionData:null,actionHeaders:{}})}catch(b){if(Nn(b)&&be(b.result)){if(b.type===B.error)throw b.result;return b.result}if(On(b))return b;throw b}}async function p(y,R,w,E,T,x,L){let b;if(!w.route.action&&!w.route.lazy){let O=Y(405,{method:y.method,pathname:new URL(y.url).pathname,routeId:w.route.id});if(L)throw O;b={type:B.error,error:O}}else b=(await g("action",y,[w],R,L,E,T))[0],y.signal.aborted&&qt(y,L,o);if(Re(b))throw new Response(null,{status:b.response.status,headers:{Location:b.response.headers.get("Location")}});if(we(b)){let O=Y(400,{type:"defer-action"});if(L)throw O;b={type:B.error,error:O}}if(L){if(te(b))throw b.error;return{matches:[w],loaderData:{},actionData:{[w.route.id]:b.data},errors:null,statusCode:200,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}let I=new Request(y.url,{headers:y.headers,redirect:y.redirect,signal:y.signal});if(te(b)){let O=x?w:Ce(R,w.route.id),d=await m(I,R,E,T,x,null,[O.route.id,b]);return H({},d,{statusCode:Ye(b.error)?b.error.status:b.statusCode!=null?b.statusCode:500,actionData:null,actionHeaders:H({},b.headers?{[w.route.id]:b.headers}:{})})}let k=await m(I,R,E,T,x,null);return H({},k,{actionData:{[w.route.id]:b.data}},b.statusCode?{statusCode:b.statusCode}:{},{actionHeaders:b.headers?{[w.route.id]:b.headers}:{}})}async function m(y,R,w,E,T,x,L){let b=x!=null;if(b&&!(x!=null&&x.route.loader)&&!(x!=null&&x.route.lazy))throw Y(400,{method:y.method,pathname:new URL(y.url).pathname,routeId:x?.route.id});let k=(x?[x]:L&&te(L[1])?tr(R,L[0]):R).filter(A=>A.route.loader||A.route.lazy);if(k.length===0)return{matches:R,loaderData:R.reduce((A,Q)=>Object.assign(A,{[Q.route.id]:null}),{}),errors:L&&te(L[1])?{[L[0]]:L[1].error}:null,statusCode:200,loaderHeaders:{},activeDeferreds:null};let O=await g("loader",y,k,R,b,w,E);y.signal.aborted&&qt(y,b,o);let d=new Map,F=hr(R,k,O,L,d,T),j=new Set(k.map(A=>A.route.id));return R.forEach(A=>{j.has(A.route.id)||(F.loaderData[A.route.id]=null)}),H({},F,{matches:R,activeDeferreds:d.size>0?Object.fromEntries(d.entries()):null})}async function g(y,R,w,E,T,x,L){let b=await sr(L||lr,y,R,w,E,r,a,x);return await Promise.all(b.map((I,k)=>{if(wr(I)){let O=I.result;throw cr(O,R,w[k].route.id,E,n,o.v7_relativeSplatPath)}if(be(I.result)&&T)throw I;return ur(I)}))}return{dataRoutes:i,query:u,queryRoute:s}}function Va(e,t,r){return H({},t,{statusCode:Ye(r)?r.status:500,errors:{[t._deepestRenderedBoundaryId||e[0].id]:r}})}function qt(e,t,r){if(r.v7_throwAbortReason&&e.signal.reason!==void 0)throw e.signal.reason;let n=t?"queryRoute":"query";throw new Error(n+"() call aborted: "+e.method+" "+e.url)}function Cn(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Pt(e,t,r,n,a,o,i,u){let s,f;if(i){s=[];for(let m of t)if(s.push(m),m.route.id===i){f=m;break}}else s=t,f=t[t.length-1];let p=mn(a||".",hn(s,o),Ve(e.pathname,r)||e.pathname,u==="path");return a==null&&(p.search=e.search,p.hash=e.hash),(a==null||a===""||a===".")&&f&&f.route.index&&!Lt(p.search)&&(p.search=p.search?p.search.replace(/^\?/,"?index&"):"?index"),n&&r!=="/"&&(p.pathname=p.pathname==="/"?r:$e([r,p.pathname])),he(p)}function er(e,t,r,n){if(!n||!Cn(n))return{path:r};if(n.formMethod&&!Dt(n.formMethod))return{path:r,error:Y(405,{method:n.formMethod})};let a=()=>({path:r,error:Y(400,{type:"invalid-body"})}),o=n.formMethod||"get",i=e?o.toUpperCase():o.toLowerCase(),u=gr(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!le(i))return a();let g=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((y,R)=>{let[w,E]=R;return""+y+w+"="+E+`
11
+ `},""):String(n.body);return{path:r,submission:{formMethod:i,formAction:u,formEncType:n.formEncType,formData:void 0,json:void 0,text:g}}}else if(n.formEncType==="application/json"){if(!le(i))return a();try{let g=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:i,formAction:u,formEncType:n.formEncType,formData:void 0,json:g,text:void 0}}}catch{return a()}}}z(typeof FormData=="function","FormData is not available in this environment");let s,f;if(n.formData)s=xt(n.formData),f=n.formData;else if(n.body instanceof FormData)s=xt(n.body),f=n.body;else if(n.body instanceof URLSearchParams)s=n.body,f=fr(s);else if(n.body==null)s=new URLSearchParams,f=new FormData;else try{s=new URLSearchParams(n.body),f=fr(s)}catch{return a()}let p={formMethod:i,formAction:u,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:f,json:void 0,text:void 0};if(le(p.formMethod))return{path:r,submission:p};let m=ue(r);return t&&m.search&&Lt(m.search)&&s.append("index",""),m.search="?"+s,{path:he(m),submission:p}}function tr(e,t){let r=e;if(t){let n=e.findIndex(a=>a.route.id===t);n>=0&&(r=e.slice(0,n))}return r}function rr(e,t,r,n,a,o,i,u,s,f,p,m,g,y,R,w){let E=w?te(w[1])?w[1].error:w[1].data:void 0,T=e.createURL(t.location),x=e.createURL(a),L=w&&te(w[1])?w[0]:void 0,b=L?tr(r,L):r,I=w?w[1].statusCode:void 0,k=i&&I&&I>=400,O=b.filter((F,j)=>{let{route:A}=F;if(A.lazy)return!0;if(A.loader==null)return!1;if(o)return typeof A.loader!="function"||A.loader.hydrate?!0:t.loaderData[A.id]===void 0&&(!t.errors||t.errors[A.id]===void 0);if(Tn(t.loaderData,t.matches[j],F)||s.some(ee=>ee===F.route.id))return!0;let Q=t.matches[j],ae=F;return ar(F,H({currentUrl:T,currentParams:Q.params,nextUrl:x,nextParams:ae.params},n,{actionResult:E,actionStatus:I,defaultShouldRevalidate:k?!1:u||T.pathname+T.search===x.pathname+x.search||T.search!==x.search||nr(Q,ae)}))}),d=[];return m.forEach((F,j)=>{if(o||!r.some(Pe=>Pe.route.id===F.routeId)||p.has(j))return;let A=ge(y,F.path,R);if(!A){d.push({key:j,routeId:F.routeId,path:F.path,matches:null,match:null,controller:null});return}let Q=t.fetchers.get(j),ae=Te(A,F.path),ee=!1;g.has(j)?ee=!1:f.has(j)?(f.delete(j),ee=!0):Q&&Q.state!=="idle"&&Q.data===void 0?ee=u:ee=ar(ae,H({currentUrl:T,currentParams:t.matches[t.matches.length-1].params,nextUrl:x,nextParams:r[r.length-1].params},n,{actionResult:E,actionStatus:I,defaultShouldRevalidate:k?!1:u})),ee&&d.push({key:j,routeId:F.routeId,path:F.path,matches:A,match:ae,controller:new AbortController})}),[O,d]}function Tn(e,t,r){let n=!t||r.route.id!==t.route.id,a=e[r.route.id]===void 0;return n||a}function nr(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function ar(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}async function Fn(e,t,r,n,a,o,i,u){let s=[t,...r.map(f=>f.route.id)].join("-");try{let f=i.get(s);f||(f=e({path:t,matches:r,patch:(p,m)=>{u.aborted||ir(p,m,n,a,o)}}),i.set(s,f)),f&&Un(f)&&await f}finally{i.delete(s)}}function ir(e,t,r,n,a){if(e){var o;let i=n[e];z(i,"No route found to patch children into: routeId = "+e);let u=Ie(t,a,[e,"patch",String(((o=i.children)==null?void 0:o.length)||"0")],n);i.children?i.children.push(...u):i.children=u}else{let i=Ie(t,a,["patch",String(r.length||"0")],n);r.push(...i)}}async function or(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let a=r[e.id];z(a,"No route found in manifest");let o={};for(let i in n){let s=a[i]!==void 0&&i!=="hasErrorBoundary";de(!s,'Route "'+a.id+'" has a static property "'+i+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+i+'" will be ignored.')),!s&&!Xr.has(i)&&(o[i]=n[i])}Object.assign(a,o),Object.assign(a,H({},t(a),{lazy:void 0}))}function lr(e){return Promise.all(e.matches.map(t=>t.resolve()))}async function sr(e,t,r,n,a,o,i,u){let s=n.reduce((m,g)=>m.add(g.route.id),new Set),f=new Set,p=await e({matches:a.map(m=>{let g=s.has(m.route.id);return H({},m,{shouldLoad:g,resolve:R=>(f.add(m.route.id),g?Mn(t,r,m,o,i,R,u):Promise.resolve({type:B.data,result:void 0}))})}),request:r,params:a[0].params,context:u});return a.forEach(m=>z(f.has(m.route.id),'`match.resolve()` was not called for route id "'+m.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),p.filter((m,g)=>s.has(a[g].route.id))}async function Mn(e,t,r,n,a,o,i){let u,s,f=p=>{let m,g=new Promise((w,E)=>m=E);s=()=>m(),t.signal.addEventListener("abort",s);let y=w=>typeof p!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+r.route.id+"]"))):p({request:t,params:r.params,context:i},...w!==void 0?[w]:[]),R;return o?R=o(w=>y(w)):R=(async()=>{try{return{type:"data",result:await y()}}catch(w){return{type:"error",result:w}}})(),Promise.race([R,g])};try{let p=r.route[e];if(r.route.lazy)if(p){let m,[g]=await Promise.all([f(p).catch(y=>{m=y}),or(r.route,a,n)]);if(m!==void 0)throw m;u=g}else if(await or(r.route,a,n),p=r.route[e],p)u=await f(p);else if(e==="action"){let m=new URL(t.url),g=m.pathname+m.search;throw Y(405,{method:t.method,pathname:g,routeId:r.route.id})}else return{type:B.data,result:void 0};else if(p)u=await f(p);else{let m=new URL(t.url),g=m.pathname+m.search;throw Y(404,{pathname:g})}z(u.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(p){return{type:B.error,result:p}}finally{s&&t.signal.removeEventListener("abort",s)}return u}async function ur(e){let{result:t,type:r}=e;if(be(t)){let f;try{let p=t.headers.get("Content-Type");p&&/\bapplication\/json\b/.test(p)?t.body==null?f=null:f=await t.json():f=await t.text()}catch(p){return{type:B.error,error:p}}return r===B.error?{type:B.error,error:new bt(t.status,t.statusText,f),statusCode:t.status,headers:t.headers}:{type:B.data,data:f,statusCode:t.status,headers:t.headers}}if(r===B.error){if(Rr(t)){var n;if(t.data instanceof Error){var a;return{type:B.error,error:t.data,statusCode:(a=t.init)==null?void 0:a.status}}t=new bt(((n=t.init)==null?void 0:n.status)||500,void 0,t.data)}return{type:B.error,error:t,statusCode:Ye(t)?t.status:void 0}}if(In(t)){var o,i;return{type:B.deferred,deferredData:t,statusCode:(o=t.init)==null?void 0:o.status,headers:((i=t.init)==null?void 0:i.headers)&&new Headers(t.init.headers)}}if(Rr(t)){var u,s;return{type:B.data,data:t.data,statusCode:(u=t.init)==null?void 0:u.status,headers:(s=t.init)!=null&&s.headers?new Headers(t.init.headers):void 0}}return{type:B.data,data:t}}function cr(e,t,r,n,a,o){let i=e.headers.get("Location");if(z(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!Et.test(i)){let u=n.slice(0,n.findIndex(s=>s.route.id===r)+1);i=Pt(new URL(t.url),u,a,!0,i,o),e.headers.set("Location",i)}return e}function dr(e,t,r){if(Et.test(e)){let n=e,a=n.startsWith("//")?new URL(t.protocol+n):new URL(n),o=Ve(a.pathname,r)!=null;if(a.origin===t.origin&&o)return a.pathname+a.search+a.hash}return e}function Oe(e,t,r,n){let a=e.createURL(gr(t)).toString(),o={signal:r};if(n&&le(n.formMethod)){let{formMethod:i,formEncType:u}=n;o.method=i.toUpperCase(),u==="application/json"?(o.headers=new Headers({"Content-Type":u}),o.body=JSON.stringify(n.json)):u==="text/plain"?o.body=n.text:u==="application/x-www-form-urlencoded"&&n.formData?o.body=xt(n.formData):o.body=n.formData}return new Request(a,o)}function xt(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function fr(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function hr(e,t,r,n,a,o){let i={},u=null,s,f=!1,p={},m=n&&te(n[1])?n[1].error:void 0;return r.forEach((g,y)=>{let R=t[y].route.id;if(z(!Re(g),"Cannot handle redirect results in processLoaderData"),te(g)){let w=g.error;if(m!==void 0&&(w=m,m=void 0),u=u||{},o)u[R]=w;else{let E=Ce(e,R);u[E.route.id]==null&&(u[E.route.id]=w)}i[R]=void 0,f||(f=!0,s=Ye(g.error)?g.error.status:500),g.headers&&(p[R]=g.headers)}else we(g)?(a.set(R,g.deferredData),i[R]=g.deferredData.data,g.statusCode!=null&&g.statusCode!==200&&!f&&(s=g.statusCode),g.headers&&(p[R]=g.headers)):(i[R]=g.data,g.statusCode&&g.statusCode!==200&&!f&&(s=g.statusCode),g.headers&&(p[R]=g.headers))}),m!==void 0&&n&&(u={[n[0]]:m},i[n[0]]=void 0),{loaderData:i,errors:u,statusCode:s||200,loaderHeaders:p}}function mr(e,t,r,n,a,o,i,u){let{loaderData:s,errors:f}=hr(t,r,n,a,u,!1);for(let p=0;p<o.length;p++){let{key:m,match:g,controller:y}=o[p];z(i!==void 0&&i[p]!==void 0,"Did not find corresponding fetcher result");let R=i[p];if(!(y&&y.signal.aborted))if(te(R)){let w=Ce(e.matches,g?.route.id);f&&f[w.route.id]||(f=H({},f,{[w.route.id]:R.error})),e.fetchers.delete(m)}else if(Re(R))z(!1,"Unhandled fetcher revalidation redirect");else if(we(R))z(!1,"Unhandled fetcher deferred data");else{let w=Se(R.data);e.fetchers.set(m,w)}}return{loaderData:s,errors:f}}function pr(e,t,r,n){let a=H({},t);for(let o of r){let i=o.route.id;if(t.hasOwnProperty(i)?t[i]!==void 0&&(a[i]=t[i]):e[i]!==void 0&&o.route.loader&&(a[i]=e[i]),n&&n.hasOwnProperty(i))break}return a}function vr(e){return e?te(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Ce(e,t){return(t?e.slice(0,e.findIndex(n=>n.route.id===t)+1):[...e]).reverse().find(n=>n.route.hasErrorBoundary===!0)||e[0]}function at(e){let t=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Y(e,t){let{pathname:r,routeId:n,method:a,type:o,message:i}=t===void 0?{}:t,u="Unknown Server Error",s="Unknown @remix-run/router error";return e===400?(u="Bad Request",o==="route-discovery"?s='Unable to match URL "'+r+'" - the `unstable_patchRoutesOnNavigation()` '+(`function threw the following error:
12
+ `+i):a&&r&&n?s="You made a "+a+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":o==="defer-action"?s="defer() is not supported in actions":o==="invalid-body"&&(s="Unable to encode submission body")):e===403?(u="Forbidden",s='Route "'+n+'" does not match URL "'+r+'"'):e===404?(u="Not Found",s='No route matches URL "'+r+'"'):e===405&&(u="Method Not Allowed",a&&r&&n?s="You made a "+a.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":a&&(s='Invalid request method "'+a.toUpperCase()+'"')),new bt(e||500,u,new Error(s),!0)}function yr(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(Re(r))return{result:r,idx:t}}}function gr(e){let t=typeof e=="string"?ue(e):e;return he(H({},t,{hash:""}))}function An(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Un(e){return typeof e=="object"&&e!=null&&"then"in e}function Nn(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type===B.data||e.type===B.error)}function wr(e){return be(e.result)&&xn.has(e.result.status)}function we(e){return e.type===B.deferred}function te(e){return e.type===B.error}function Re(e){return(e&&e.type)===B.redirect}function Rr(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function In(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 be(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function On(e){if(!be(e))return!1;let t=e.status,r=e.headers.get("Location");return t>=300&&t<=399&&r!=null}function Dt(e){return Pn.has(e.toLowerCase())}function le(e){return Sn.has(e.toLowerCase())}async function br(e,t,r,n,a,o){for(let i=0;i<r.length;i++){let u=r[i],s=t[i];if(!s)continue;let f=e.find(m=>m.route.id===s.route.id),p=f!=null&&!nr(f,s)&&(o&&o[s.route.id])!==void 0;if(we(u)&&(a||p)){let m=n[i];z(m,"Expected an AbortSignal for revalidating fetcher deferred result"),await Sr(u,m,a).then(g=>{g&&(r[i]=g||r[i])})}}}async function Sr(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:B.data,data:e.deferredData.unwrappedData}}catch(a){return{type:B.error,error:a}}return{type:B.data,data:e.deferredData.data}}}function Lt(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Te(e,t){let r=typeof t=="string"?ue(t).search:t.search;if(e[e.length-1].route.index&&Lt(r||""))return e[e.length-1];let n=Yt(e);return n[n.length-1]}function Er(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:o,json:i}=e;if(!(!t||!r||!n)){if(a!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a};if(o!=null)return{formMethod:t,formAction:r,formEncType:n,formData:o,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:i,text:void 0}}}function _t(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 jn(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 Xe(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 Hn(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 Se(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 zn(e,t){try{let r=e.sessionStorage.getItem(Zt);if(r){let n=JSON.parse(r);for(let[a,o]of Object.entries(n||{}))o&&Array.isArray(o)&&t.set(a,new Set(o||[]))}}catch{}}function Bn(e,t){if(t.size>0){let r={};for(let[n,a]of t)r[n]=[...a];try{e.sessionStorage.setItem(Zt,JSON.stringify(r))}catch(n){de(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}/**
13
+ * React Router DOM v6.26.1
14
+ *
15
+ * Copyright (c) Remix Software Inc.
16
+ *
17
+ * This source code is licensed under the MIT license found in the
18
+ * LICENSE.md file in the root directory of this source tree.
19
+ *
20
+ * @license MIT
21
+ */function se(){return se=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},se.apply(this,arguments)}function kn(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,o;for(o=0;o<n.length;o++)a=n[o],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}const Ct="get",Tt="application/x-www-form-urlencoded";function it(e){return e!=null&&typeof e.tagName=="string"}function Kn(e){return it(e)&&e.tagName.toLowerCase()==="button"}function Wn(e){return it(e)&&e.tagName.toLowerCase()==="form"}function Vn(e){return it(e)&&e.tagName.toLowerCase()==="input"}function $n(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Yn(e,t){return e.button===0&&(!t||t==="_self")&&!$n(e)}function Ft(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||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(a=>[r,a]):[[r,n]])},[]))}function Jn(e,t){let r=Ft(e);return t&&t.forEach((n,a)=>{r.has(a)||t.getAll(a).forEach(o=>{r.append(a,o)})}),r}let ot=null;function Xn(){if(ot===null)try{new FormData(document.createElement("form"),0),ot=!1}catch{ot=!0}return ot}const Gn=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Mt(e){return e!=null&&!Gn.has(e)?null:e}function Qn(e,t){let r,n,a,o,i;if(Wn(e)){let u=e.getAttribute("action");n=u?stripBasename(u,t):null,r=e.getAttribute("method")||Ct,a=Mt(e.getAttribute("enctype"))||Tt,o=new FormData(e)}else if(Kn(e)||Vn(e)&&(e.type==="submit"||e.type==="image")){let u=e.form;if(u==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||u.getAttribute("action");if(n=s?stripBasename(s,t):null,r=e.getAttribute("formmethod")||u.getAttribute("method")||Ct,a=Mt(e.getAttribute("formenctype"))||Mt(u.getAttribute("enctype"))||Tt,o=new FormData(u,e),!Xn()){let{name:f,type:p,value:m}=e;if(p==="image"){let g=f?f+".":"";o.append(g+"x","0"),o.append(g+"y","0")}else f&&o.append(f,m)}}else{if(it(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Ct,n=null,a=Tt,i=e}return o&&a==="text/plain"&&(i=o,o=void 0),{action:n,method:r.toLowerCase(),encType:a,formData:o,body:i}}const Zn=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],$a=null,Ya=null,qn="6";try{window.__reactRouterVersion=qn}catch{}function Ja(e,t){return createRouter({basename:t?.basename,future:se({},t?.future,{v7_prependBasename:!0}),history:createBrowserHistory({window:t?.window}),hydrationData:t?.hydrationData||Pr(),routes:e,mapRouteProperties:UNSAFE_mapRouteProperties,unstable_dataStrategy:t?.unstable_dataStrategy,unstable_patchRoutesOnNavigation:t?.unstable_patchRoutesOnNavigation,window:t?.window}).initialize()}function Xa(e,t){return createRouter({basename:t?.basename,future:se({},t?.future,{v7_prependBasename:!0}),history:createHashHistory({window:t?.window}),hydrationData:t?.hydrationData||Pr(),routes:e,mapRouteProperties:UNSAFE_mapRouteProperties,unstable_dataStrategy:t?.unstable_dataStrategy,unstable_patchRoutesOnNavigation:t?.unstable_patchRoutesOnNavigation,window:t?.window}).initialize()}function Pr(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=se({},t,{errors:ea(t.errors)})),t}function ea(e){if(!e)return null;let t=Object.entries(e),r={};for(let[n,a]of t)if(a&&a.__type==="RouteErrorResponse")r[n]=new UNSAFE_ErrorResponseImpl(a.status,a.statusText,a.data,a.internal===!0);else if(a&&a.__type==="Error"){if(a.__subType){let o=window[a.__subType];if(typeof o=="function")try{let i=new o(a.message);i.stack="",r[n]=i}catch{}}if(r[n]==null){let o=new Error(a.message);o.stack="",r[n]=o}}else r[n]=a;return r}const xr=oe.createContext({isTransitioning:!1}),Dr=oe.createContext(new Map),Ee=jt["startTransition"],Lr=$r["flushSync"],_r=jt["useId"];function ta(e){Ee?Ee(e):e()}function Ge(e){Lr?Lr(e):e()}class ra{constructor(){this.status="pending",this.promise=new Promise((t,r)=>{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",t(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",r(n))}})}}function qa(e){let{fallbackElement:t,router:r,future:n}=e,[a,o]=React.useState(r.state),[i,u]=React.useState(),[s,f]=React.useState({isTransitioning:!1}),[p,m]=React.useState(),[g,y]=React.useState(),[R,w]=React.useState(),E=React.useRef(new Map),{v7_startTransition:T}=n||{},x=React.useCallback(d=>{T?ta(d):d()},[T]),L=React.useCallback((d,F)=>{let{deletedFetchers:j,unstable_flushSync:A,unstable_viewTransitionOpts:Q}=F;j.forEach(ee=>E.current.delete(ee)),d.fetchers.forEach((ee,Pe)=>{ee.data!==void 0&&E.current.set(Pe,ee.data)});let ae=r.window==null||r.window.document==null||typeof r.window.document.startViewTransition!="function";if(!Q||ae){A?Ge(()=>o(d)):x(()=>o(d));return}if(A){Ge(()=>{g&&(p&&p.resolve(),g.skipTransition()),f({isTransitioning:!0,flushSync:!0,currentLocation:Q.currentLocation,nextLocation:Q.nextLocation})});let ee=r.window.document.startViewTransition(()=>{Ge(()=>o(d))});ee.finished.finally(()=>{Ge(()=>{m(void 0),y(void 0),u(void 0),f({isTransitioning:!1})})}),Ge(()=>y(ee));return}g?(p&&p.resolve(),g.skipTransition(),w({state:d,currentLocation:Q.currentLocation,nextLocation:Q.nextLocation})):(u(d),f({isTransitioning:!0,flushSync:!1,currentLocation:Q.currentLocation,nextLocation:Q.nextLocation}))},[r.window,g,p,E,x]);React.useLayoutEffect(()=>r.subscribe(L),[r,L]),React.useEffect(()=>{s.isTransitioning&&!s.flushSync&&m(new ra)},[s]),React.useEffect(()=>{if(p&&i&&r.window){let d=i,F=p.promise,j=r.window.document.startViewTransition(async()=>{x(()=>o(d)),await F});j.finished.finally(()=>{m(void 0),y(void 0),u(void 0),f({isTransitioning:!1})}),y(j)}},[x,i,p,r.window]),React.useEffect(()=>{p&&i&&a.location.key===i.location.key&&p.resolve()},[p,g,a.location,i]),React.useEffect(()=>{!s.isTransitioning&&R&&(u(R.state),f({isTransitioning:!0,flushSync:!1,currentLocation:R.currentLocation,nextLocation:R.nextLocation}),w(void 0))},[s.isTransitioning,R]),React.useEffect(()=>{},[]);let b=React.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:d=>r.navigate(d),push:(d,F,j)=>r.navigate(d,{state:F,preventScrollReset:j?.preventScrollReset}),replace:(d,F,j)=>r.navigate(d,{replace:!0,state:F,preventScrollReset:j?.preventScrollReset})}),[r]),I=r.basename||"/",k=React.useMemo(()=>({router:r,navigator:b,static:!1,basename:I}),[r,b,I]),O=React.useMemo(()=>({v7_relativeSplatPath:r.future.v7_relativeSplatPath}),[r.future.v7_relativeSplatPath]);return React.createElement(React.Fragment,null,React.createElement(UNSAFE_DataRouterContext.Provider,{value:k},React.createElement(UNSAFE_DataRouterStateContext.Provider,{value:a},React.createElement(Dr.Provider,{value:E.current},React.createElement(xr.Provider,{value:s},React.createElement(Router,{basename:I,location:a.location,navigationType:a.historyAction,navigator:b,future:O},a.initialized||r.future.v7_partialHydration?React.createElement(na,{routes:r.routes,future:r.future,state:a}):t))))),null)}const na=null;function ei(e){let{routes:t,future:r,state:n}=e;return UNSAFE_useRoutesImpl(t,void 0,n,r)}function aa(e){let{basename:t,children:r,future:n,window:a}=e,o=oe.useRef();o.current==null&&(o.current=Yr({window:a,v5Compat:!0}));let i=o.current,[u,s]=oe.useState({action:i.action,location:i.location}),{v7_startTransition:f}=n||{},p=oe.useCallback(m=>{f&&Ee?Ee(()=>s(m)):s(m)},[s,f]);return oe.useLayoutEffect(()=>i.listen(p),[i,p]),oe.createElement(Ne.Ix,{basename:t,children:r,location:u.location,navigationType:u.action,navigator:i,future:n})}function ti(e){let{basename:t,children:r,future:n,window:a}=e,o=React.useRef();o.current==null&&(o.current=createHashHistory({window:a,v5Compat:!0}));let i=o.current,[u,s]=React.useState({action:i.action,location:i.location}),{v7_startTransition:f}=n||{},p=React.useCallback(m=>{f&&Ee?Ee(()=>s(m)):s(m)},[s,f]);return React.useLayoutEffect(()=>i.listen(p),[i,p]),React.createElement(Router,{basename:t,children:r,location:u.location,navigationType:u.action,navigator:i,future:n})}function ri(e){let{basename:t,children:r,future:n,history:a}=e,[o,i]=React.useState({action:a.action,location:a.location}),{v7_startTransition:u}=n||{},s=React.useCallback(f=>{u&&Ee?Ee(()=>i(f)):i(f)},[i,u]);return React.useLayoutEffect(()=>a.listen(s),[a,s]),React.createElement(Router,{basename:t,children:r,location:o.location,navigationType:o.action,navigator:a,future:n})}const ia=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",oa=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,la=oe.forwardRef(function(t,r){let{onClick:n,relative:a,reloadDocument:o,replace:i,state:u,target:s,to:f,preventScrollReset:p,unstable_viewTransition:m}=t,g=kn(t,Zn),{basename:y}=oe.useContext(Ne.jb),R,w=!1;if(typeof f=="string"&&oa.test(f)&&(R=f,ia))try{let L=new URL(window.location.href),b=f.startsWith("//")?new URL(L.protocol+f):new URL(f),I=Ve(b.pathname,y);b.origin===L.origin&&I!=null?f=I+b.search+b.hash:w=!0}catch{}let E=(0,Ne.$P)(f,{relative:a}),T=ua(f,{replace:i,state:u,target:s,preventScrollReset:p,relative:a,unstable_viewTransition:m});function x(L){n&&n(L),L.defaultPrevented||T(L)}return oe.createElement("a",se({},g,{href:R||E,onClick:w||o?n:x,ref:r,target:s}))}),ni=null,sa=null;function ai(e){let{getKey:t,storageKey:r}=e;return ha({getKey:t,storageKey:r}),null}var je;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(je||(je={}));var Qe;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Qe||(Qe={}));function ii(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function lt(e){let t=React.useContext(UNSAFE_DataRouterContext);return t||UNSAFE_invariant(!1),t}function At(e){let t=React.useContext(UNSAFE_DataRouterStateContext);return t||UNSAFE_invariant(!1),t}function ua(e,t){let{target:r,replace:n,state:a,preventScrollReset:o,relative:i,unstable_viewTransition:u}=t===void 0?{}:t,s=(0,Ne.Zp)(),f=(0,Ne.zy)(),p=(0,Ne.x$)(e,{relative:i});return oe.useCallback(m=>{if(Yn(m,r)){m.preventDefault();let g=n!==void 0?n:(0,Ht.AO)(f)===(0,Ht.AO)(p);s(e,{replace:g,state:a,preventScrollReset:o,relative:i,unstable_viewTransition:u})}},[f,s,p,n,a,r,e,o,i,u])}function oi(e){let t=React.useRef(Ft(e)),r=React.useRef(!1),n=useLocation(),a=React.useMemo(()=>Jn(n.search,r.current?null:t.current),[n.search]),o=useNavigate(),i=React.useCallback((u,s)=>{const f=Ft(typeof u=="function"?u(a):u);r.current=!0,o("?"+f,s)},[o,a]);return[a,i]}function ca(){if(typeof document>"u")throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.")}let da=0,Cr=()=>"__"+String(++da)+"__";function fa(){let{router:e}=lt(je.UseSubmit),{basename:t}=React.useContext(UNSAFE_NavigationContext),r=UNSAFE_useRouteId();return React.useCallback(function(n,a){a===void 0&&(a={}),ca();let{action:o,method:i,encType:u,formData:s,body:f}=Qn(n,t);if(a.navigate===!1){let p=a.fetcherKey||Cr();e.fetch(p,r,a.action||o,{preventScrollReset:a.preventScrollReset,formData:s,body:f,formMethod:a.method||i,formEncType:a.encType||u,unstable_flushSync:a.unstable_flushSync})}else e.navigate(a.action||o,{preventScrollReset:a.preventScrollReset,formData:s,body:f,formMethod:a.method||i,formEncType:a.encType||u,replace:a.replace,state:a.state,fromRouteId:r,unstable_flushSync:a.unstable_flushSync,unstable_viewTransition:a.unstable_viewTransition})},[e,t,r])}function li(e,t){let{relative:r}=t===void 0?{}:t,{basename:n}=React.useContext(UNSAFE_NavigationContext),a=React.useContext(UNSAFE_RouteContext);a||UNSAFE_invariant(!1);let[o]=a.matches.slice(-1),i=se({},useResolvedPath(e||".",{relative:r})),u=useLocation();if(e==null){i.search=u.search;let s=new URLSearchParams(i.search);s.has("index")&&s.get("index")===""&&(s.delete("index"),i.search=s.toString()?"?"+s.toString():"")}return(!e||e===".")&&o.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(i.pathname=i.pathname==="/"?n:joinPaths([n,i.pathname])),createPath(i)}function si(e){var t;let{key:r}=e===void 0?{}:e,{router:n}=lt(je.UseFetcher),a=At(Qe.UseFetcher),o=React.useContext(Dr),i=React.useContext(UNSAFE_RouteContext),u=(t=i.matches[i.matches.length-1])==null?void 0:t.route.id;o||UNSAFE_invariant(!1),i||UNSAFE_invariant(!1),u==null&&UNSAFE_invariant(!1);let s=_r?_r():"",[f,p]=React.useState(r||s);r&&r!==f?p(r):f||p(Cr()),React.useEffect(()=>(n.getFetcher(f),()=>{n.deleteFetcher(f)}),[n,f]);let m=React.useCallback((x,L)=>{u||UNSAFE_invariant(!1),n.fetch(f,u,x,L)},[f,u,n]),g=fa(),y=React.useCallback((x,L)=>{g(x,se({},L,{navigate:!1,fetcherKey:f}))},[f,g]),R=React.useMemo(()=>React.forwardRef((L,b)=>React.createElement(sa,se({},L,{navigate:!1,fetcherKey:f,ref:b}))),[f]),w=a.fetchers.get(f)||IDLE_FETCHER,E=o.get(f);return React.useMemo(()=>se({Form:R,submit:y,load:m},w,{data:E}),[R,y,m,w,E])}function ui(){let e=At(Qe.UseFetchers);return Array.from(e.fetchers.entries()).map(t=>{let[r,n]=t;return se({},n,{key:r})})}const Tr="react-router-scroll-positions";let st={};function ha(e){let{getKey:t,storageKey:r}=e===void 0?{}:e,{router:n}=lt(je.UseScrollRestoration),{restoreScrollPosition:a,preventScrollReset:o}=At(Qe.UseScrollRestoration),{basename:i}=React.useContext(UNSAFE_NavigationContext),u=useLocation(),s=useMatches(),f=useNavigation();React.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),ma(React.useCallback(()=>{if(f.state==="idle"){let p=(t?t(u,s):null)||u.key;st[p]=window.scrollY}try{sessionStorage.setItem(r||Tr,JSON.stringify(st))}catch{}window.history.scrollRestoration="auto"},[r,t,f.state,u,s])),typeof document<"u"&&(React.useLayoutEffect(()=>{try{let p=sessionStorage.getItem(r||Tr);p&&(st=JSON.parse(p))}catch{}},[r]),React.useLayoutEffect(()=>{let p=t&&i!=="/"?(g,y)=>t(se({},g,{pathname:stripBasename(g.pathname,i)||g.pathname}),y):t,m=n?.enableScrollRestoration(st,()=>window.scrollY,p);return()=>m&&m()},[n,i,t]),React.useLayoutEffect(()=>{if(a!==!1){if(typeof a=="number"){window.scrollTo(0,a);return}if(u.hash){let p=document.getElementById(decodeURIComponent(u.hash.slice(1)));if(p){p.scrollIntoView();return}}o!==!0&&window.scrollTo(0,0)}},[u,a,o]))}function ci(e,t){let{capture:r}=t||{};React.useEffect(()=>{let n=r!=null?{capture:r}:void 0;return window.addEventListener("beforeunload",e,n),()=>{window.removeEventListener("beforeunload",e,n)}},[e,r])}function ma(e,t){let{capture:r}=t||{};React.useEffect(()=>{let n=r!=null?{capture:r}:void 0;return window.addEventListener("pagehide",e,n),()=>{window.removeEventListener("pagehide",e,n)}},[e,r])}function di(e){let{when:t,message:r}=e,n=useBlocker(t);React.useEffect(()=>{n.state==="blocked"&&(window.confirm(r)?setTimeout(n.proceed,0):n.reset())},[n,r]),React.useEffect(()=>{n.state==="blocked"&&!t&&n.reset()},[n,t])}function fi(e,t){t===void 0&&(t={});let r=React.useContext(xr);r==null&&UNSAFE_invariant(!1);let{basename:n}=lt(je.useViewTransitionState),a=useResolvedPath(e,{relative:t.relative});if(!r.isTransitioning)return!1;let o=stripBasename(r.currentLocation.pathname,n)||r.currentLocation.pathname,i=stripBasename(r.nextLocation.pathname,n)||r.nextLocation.pathname;return matchPath(a.pathname,i)!=null||matchPath(a.pathname,o)!=null}}}]);})();
22
+
23
+ //# sourceMappingURL=module-react-router-dom.54955edf.js.map