@techdocs/cli 1.8.25 → 1.9.0-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 (71) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +2 -1
  3. package/dist/commands/index.cjs.js +13 -7
  4. package/dist/commands/index.cjs.js.map +1 -1
  5. package/dist/embedded-app/.config-schema.json +408 -0
  6. package/dist/embedded-app/index.html +1 -1
  7. package/dist/embedded-app/index.html.tmpl +1 -1
  8. package/dist/embedded-app/static/{124.f02a9318.chunk.js → 124.9c3315bf.chunk.js} +2 -2
  9. package/dist/embedded-app/static/{124.f02a9318.chunk.js.map → 124.9c3315bf.chunk.js.map} +1 -1
  10. package/dist/embedded-app/static/{2401.4d69c234.chunk.js → 2401.480d3231.chunk.js} +2 -2
  11. package/dist/embedded-app/static/{2401.4d69c234.chunk.js.map → 2401.480d3231.chunk.js.map} +1 -1
  12. package/dist/embedded-app/static/{2420.979e1d31.chunk.js → 2420.02740444.chunk.js} +2 -2
  13. package/dist/embedded-app/static/{2420.979e1d31.chunk.js.map → 2420.02740444.chunk.js.map} +1 -1
  14. package/dist/embedded-app/static/{287.e0b65890.chunk.js → 287.0a1ae361.chunk.js} +2 -2
  15. package/dist/embedded-app/static/{287.e0b65890.chunk.js.map → 287.0a1ae361.chunk.js.map} +1 -1
  16. package/dist/embedded-app/static/{3182.0ac241c5.chunk.js → 3182.8be35725.chunk.js} +2 -2
  17. package/dist/embedded-app/static/{3182.0ac241c5.chunk.js.map → 3182.8be35725.chunk.js.map} +1 -1
  18. package/dist/embedded-app/static/{3632.f343436e.chunk.js → 3632.75f621ce.chunk.js} +2 -2
  19. package/dist/embedded-app/static/{3632.f343436e.chunk.js.map → 3632.75f621ce.chunk.js.map} +1 -1
  20. package/dist/embedded-app/static/5470.1a28734c.chunk.js +3 -0
  21. package/dist/embedded-app/static/5470.1a28734c.chunk.js.map +1 -0
  22. package/dist/embedded-app/static/{5788.b8d84f8c.chunk.js → 5788.cd9a99f1.chunk.js} +1 -1
  23. package/dist/embedded-app/static/5788.cd9a99f1.chunk.js.map +1 -0
  24. package/dist/embedded-app/static/{6271.020ea145.chunk.js → 6271.1007bfa8.chunk.js} +2 -2
  25. package/dist/embedded-app/static/{6271.020ea145.chunk.js.map → 6271.1007bfa8.chunk.js.map} +1 -1
  26. package/dist/embedded-app/static/{6415.493349e2.chunk.js → 6415.8cce89fe.chunk.js} +2 -2
  27. package/dist/embedded-app/static/{6415.493349e2.chunk.js.map → 6415.8cce89fe.chunk.js.map} +1 -1
  28. package/dist/embedded-app/static/{8307.b0a2a85f.chunk.js → 8307.cf92a830.chunk.js} +2 -2
  29. package/dist/embedded-app/static/{8307.b0a2a85f.chunk.js.map → 8307.cf92a830.chunk.js.map} +1 -1
  30. package/dist/embedded-app/static/{8384.b9605cda.chunk.js → 8384.604de781.chunk.js} +2 -2
  31. package/dist/embedded-app/static/{8384.b9605cda.chunk.js.map → 8384.604de781.chunk.js.map} +1 -1
  32. package/dist/embedded-app/static/{8803.20e0d00b.chunk.js → 8803.511872f8.chunk.js} +1 -1
  33. package/dist/embedded-app/static/{8803.20e0d00b.chunk.js.map → 8803.511872f8.chunk.js.map} +1 -1
  34. package/dist/embedded-app/static/9234.26971228.chunk.js +4 -0
  35. package/dist/embedded-app/static/9234.26971228.chunk.js.map +1 -0
  36. package/dist/embedded-app/static/{9652.78fa0c73.chunk.js → 9652.be70f990.chunk.js} +2 -2
  37. package/dist/embedded-app/static/{9652.78fa0c73.chunk.js.map → 9652.be70f990.chunk.js.map} +1 -1
  38. package/dist/embedded-app/static/{main.01d08696.js → main.5b071983.js} +27 -27
  39. package/dist/embedded-app/static/main.5b071983.js.map +1 -0
  40. package/dist/embedded-app/static/{module-material-table.84f30b2f.js → module-material-table.d6e8d890.js} +2 -2
  41. package/dist/embedded-app/static/{module-material-table.84f30b2f.js.map → module-material-table.d6e8d890.js.map} +1 -1
  42. package/dist/embedded-app/static/module-material-ui.b24ef3a3.js +24 -0
  43. package/dist/embedded-app/static/module-material-ui.b24ef3a3.js.map +1 -0
  44. package/dist/embedded-app/static/module-remix-run.ae6d33c5.js +13 -0
  45. package/dist/embedded-app/static/module-remix-run.ae6d33c5.js.map +1 -0
  46. package/dist/embedded-app/static/{react-syntax-highlighter_languages_highlight_lisp.4f6018a3.chunk.js → react-syntax-highlighter_languages_highlight_lisp.75c1c83e.chunk.js} +2 -2
  47. package/dist/embedded-app/static/{react-syntax-highlighter_languages_highlight_lisp.4f6018a3.chunk.js.map → react-syntax-highlighter_languages_highlight_lisp.75c1c83e.chunk.js.map} +1 -1
  48. package/dist/embedded-app/static/{runtime.01d08696.js → runtime.5b071983.js} +2 -2
  49. package/dist/embedded-app/static/{runtime.01d08696.js.map → runtime.5b071983.js.map} +1 -1
  50. package/dist/embedded-app/static/{vendor.01d08696.js → vendor.5b071983.js} +45 -45
  51. package/dist/embedded-app/static/vendor.5b071983.js.map +1 -0
  52. package/dist/lib/PublisherConfig.cjs.js +4 -1
  53. package/dist/lib/PublisherConfig.cjs.js.map +1 -1
  54. package/dist/package.json.cjs.js +1 -1
  55. package/package.json +7 -7
  56. package/dist/embedded-app/static/4487.f04b8beb.chunk.js +0 -3
  57. package/dist/embedded-app/static/4487.f04b8beb.chunk.js.map +0 -1
  58. package/dist/embedded-app/static/5788.b8d84f8c.chunk.js.map +0 -1
  59. package/dist/embedded-app/static/9234.6839c56f.chunk.js +0 -4
  60. package/dist/embedded-app/static/9234.6839c56f.chunk.js.map +0 -1
  61. package/dist/embedded-app/static/main.01d08696.js.map +0 -1
  62. package/dist/embedded-app/static/module-material-ui.909829ed.js +0 -24
  63. package/dist/embedded-app/static/module-material-ui.909829ed.js.map +0 -1
  64. package/dist/embedded-app/static/module-remix-run.ba6397c2.js +0 -13
  65. package/dist/embedded-app/static/module-remix-run.ba6397c2.js.map +0 -1
  66. package/dist/embedded-app/static/vendor.01d08696.js.map +0 -1
  67. /package/dist/embedded-app/static/{createComponent.975d1e1e..svg → createComponent.975d1e1e.svg} +0 -0
  68. /package/dist/embedded-app/static/{mic-drop.fe3ef4d0..svg → mic-drop.fe3ef4d0.svg} +0 -0
  69. /package/dist/embedded-app/static/{missingAnnotation.67f79e98..svg → missingAnnotation.67f79e98.svg} +0 -0
  70. /package/dist/embedded-app/static/{noBuild.1715fa71..svg → noBuild.1715fa71.svg} +0 -0
  71. /package/dist/embedded-app/static/{noInformation.4b426325..svg → noInformation.4b426325.svg} +0 -0
@@ -1,13 +0,0 @@
1
- "use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[4538],{21613:(Fn,vr,wr)=>{wr.d(vr,{AO:()=>oe,Gh:()=>_t,HS:()=>Te,Oi:()=>z,Rr:()=>ae,o1:()=>jt,pX:()=>Ce,pb:()=>Ne,rc:()=>$,sC:()=>br,tH:()=>st,tW:()=>Ar,ue:()=>ue,yD:()=>Ot,zR:()=>Dr});/**
2
- * @remix-run/router v1.21.0
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 A(){return A=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},A.apply(this,arguments)}var $;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})($||($={}));const Et="popstate";function br(e){e===void 0&&(e={});let{initialEntries:t=["/"],initialIndex:r,v5Compat:n=!1}=e,a;a=t.map((h,v)=>y(h,typeof h=="string"?null:h.state,v===0?"default":void 0));let s=d(r??a.length-1),o=$.Pop,c=null;function d(h){return Math.min(Math.max(h,0),a.length-1)}function m(){return a[s]}function y(h,v,w){v===void 0&&(v=null);let L=de(a?m().pathname:"/",h,v,w);return se(L.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(h)),L}function g(h){return typeof h=="string"?h:oe(h)}return{get index(){return s},get action(){return o},get location(){return m()},createHref:g,createURL(h){return new URL(g(h),"http://localhost")},encodeLocation(h){let v=typeof h=="string"?ae(h):h;return{pathname:v.pathname||"",search:v.search||"",hash:v.hash||""}},push(h,v){o=$.Push;let w=y(h,v);s+=1,a.splice(s,a.length,w),n&&c&&c({action:o,location:w,delta:1})},replace(h,v){o=$.Replace;let w=y(h,v);a[s]=w,n&&c&&c({action:o,location:w,delta:0})},go(h){o=$.Pop;let v=d(s+h),w=a[v];s=v,c&&c({action:o,location:w,delta:h})},listen(h){return c=h,()=>{c=null}}}}function Dr(e){e===void 0&&(e={});function t(n,a){let{pathname:s,search:o,hash:c}=n.location;return de("",{pathname:s,search:o,hash:c},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(n,a){return typeof a=="string"?a:oe(a)}return xt(t,r,null,e)}function On(e){e===void 0&&(e={});function t(a,s){let{pathname:o="/",search:c="",hash:d=""}=ae(a.location.hash.substr(1));return!o.startsWith("/")&&!o.startsWith(".")&&(o="/"+o),de("",{pathname:o,search:c,hash:d},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function r(a,s){let o=a.document.querySelector("base"),c="";if(o&&o.getAttribute("href")){let d=a.location.href,m=d.indexOf("#");c=m===-1?d:d.slice(0,m)}return c+"#"+(typeof s=="string"?s:oe(s))}function n(a,s){se(a.pathname.charAt(0)==="/","relative pathnames are not supported in hash history.push("+JSON.stringify(s)+")")}return xt(t,r,n,e)}function z(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function se(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Rr(){return Math.random().toString(36).substr(2,8)}function Pt(e,t){return{usr:e.state,key:e.key,idx:t}}function de(e,t,r,n){return r===void 0&&(r=null),A({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ae(t):t,{state:r,key:t&&t.key||n||Rr()})}function oe(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 ae(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 xt(e,t,r,n){n===void 0&&(n={});let{window:a=document.defaultView,v5Compat:s=!1}=n,o=a.history,c=$.Pop,d=null,m=y();m==null&&(m=0,o.replaceState(A({},o.state,{idx:m}),""));function y(){return(o.state||{idx:null}).idx}function g(){c=$.Pop;let L=y(),O=L==null?null:L-m;m=L,d&&d({action:c,location:w.location,delta:O})}function S(L,O){c=$.Push;let x=de(w.location,L,O);r&&r(x,L),m=y()+1;let F=Pt(x,m),b=w.createHref(x);try{o.pushState(F,"",b)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;a.location.assign(b)}s&&d&&d({action:c,location:w.location,delta:1})}function h(L,O){c=$.Replace;let x=de(w.location,L,O);r&&r(x,L),m=y();let F=Pt(x,m),b=w.createHref(x);o.replaceState(F,"",b),s&&d&&d({action:c,location:w.location,delta:0})}function v(L){let O=a.location.origin!=="null"?a.location.origin:a.location.href,x=typeof L=="string"?L:oe(L);return x=x.replace(/ $/,"%20"),z(O,"No window.location.(origin|href) available to create URL for href: "+x),new URL(x,O)}let w={get action(){return c},get location(){return e(a,o)},listen(L){if(d)throw new Error("A history only accepts one active listener");return a.addEventListener(Et,g),d=L,()=>{a.removeEventListener(Et,g),d=null}},createHref(L){return t(a,L)},createURL:v,encodeLocation(L){let O=v(L);return{pathname:O.pathname,search:O.search,hash:O.hash}},push:S,replace:h,go(L){return o.go(L)}};return w}var H;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(H||(H={}));const Sr=new Set(["lazy","caseSensitive","path","id","index","children"]);function Er(e){return e.index===!0}function He(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((a,s)=>{let o=[...r,String(s)],c=typeof a.id=="string"?a.id:o.join("-");if(z(a.index!==!0||!a.children,"Cannot specify children on an index route"),z(!n[c],'Found a route id collision on id "'+c+`". Route id's must be globally unique within Data Router usages`),Er(a)){let d=A({},a,t(a),{id:c});return n[c]=d,d}else{let d=A({},a,t(a),{id:c,children:void 0});return n[c]=d,a.children&&(d.children=He(a.children,t,o,n)),d}})}function ue(e,t,r){return r===void 0&&(r="/"),Je(e,t,r,!1)}function Je(e,t,r,n){let a=typeof t=="string"?ae(t):t,s=Ne(a.pathname||"/",r);if(s==null)return null;let o=Lt(e);xr(o);let c=null;for(let d=0;c==null&&d<o.length;++d){let m=Hr(s);c=Ur(o[d],m,n)}return c}function Pr(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 Lt(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let a=(s,o,c)=>{let d={relativePath:c===void 0?s.path||"":c,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};d.relativePath.startsWith("/")&&(z(d.relativePath.startsWith(n),'Absolute route path "'+d.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),d.relativePath=d.relativePath.slice(n.length));let m=Te([n,d.relativePath]),y=r.concat(d);s.children&&s.children.length>0&&(z(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+m+'".')),Lt(s.children,t,y,m)),!(s.path==null&&!s.index)&&t.push({path:m,score:Or(m,s.index),routesMeta:y})};return e.forEach((s,o)=>{var c;if(s.path===""||!((c=s.path)!=null&&c.includes("?")))a(s,o);else for(let d of Mt(s.path))a(s,o,d)}),t}function Mt(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),s=r.replace(/\?$/,"");if(n.length===0)return a?[s,""]:[s];let o=Mt(n.join("/")),c=[];return c.push(...o.map(d=>d===""?s:[s,d].join("/"))),a&&c.push(...o),c.map(d=>e.startsWith("/")&&d===""?"/":d)}function xr(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:_r(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const Lr=/^:[\w-]+$/,Mr=3,Tr=2,Cr=1,jr=10,Fr=-2,Tt=e=>e==="*";function Or(e,t){let r=e.split("/"),n=r.length;return r.some(Tt)&&(n+=Fr),t&&(n+=Tr),r.filter(a=>!Tt(a)).reduce((a,s)=>a+(Lr.test(s)?Mr:s===""?Cr:jr),n)}function _r(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 Ur(e,t,r){r===void 0&&(r=!1);let{routesMeta:n}=e,a={},s="/",o=[];for(let c=0;c<n.length;++c){let d=n[c],m=c===n.length-1,y=s==="/"?t:t.slice(s.length)||"/",g=Ct({path:d.relativePath,caseSensitive:d.caseSensitive,end:m},y),S=d.route;if(!g&&m&&r&&!n[n.length-1].route.index&&(g=Ct({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},y)),!g)return null;Object.assign(a,g.params),o.push({params:a,pathname:Te([s,g.pathname]),pathnameBase:zr(Te([s,g.pathnameBase])),route:S}),g.pathnameBase!=="/"&&(s=Te([s,g.pathnameBase]))}return o}function Ar(e,t){t===void 0&&(t={});let r=e;r.endsWith("*")&&r!=="*"&&!r.endsWith("/*")&&(se(!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=o=>o==null?"":typeof o=="string"?o:String(o),s=r.split(/\/+/).map((o,c,d)=>{if(c===d.length-1&&o==="*")return a(t["*"]);const y=o.match(/^:([\w-]+)(\??)$/);if(y){const[,g,S]=y;let h=t[g];return z(S==="?"||h!=null,'Missing ":'+g+'" param'),a(h)}return o.replace(/\?$/g,"")}).filter(o=>!!o);return n+s.join("/")}function Ct(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=Ir(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let s=a[0],o=s.replace(/(.)\/+$/,"$1"),c=a.slice(1);return{params:n.reduce((m,y,g)=>{let{paramName:S,isOptional:h}=y;if(S==="*"){let w=c[g]||"";o=s.slice(0,s.length-w.length).replace(/(.)\/+$/,"$1")}const v=c[g];return h&&!v?m[S]=void 0:m[S]=(v||"").replace(/%2F/g,"/"),m},{}),pathname:s,pathnameBase:o,pattern:e}}function Ir(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),se(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,(o,c,d)=>(n.push({paramName:c,isOptional:d!=null}),d?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function Hr(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return se(!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 Ne(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 jt(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?ae(e):e;return{pathname:r?r.startsWith("/")?r:Nr(r,t):t,search:Br(n),hash:Wr(a)}}function Nr(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 lt(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 Ft(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Ot(e,t){let r=Ft(e);return t?r.map((n,a)=>a===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function _t(e,t,r,n){n===void 0&&(n=!1);let a;typeof e=="string"?a=ae(e):(a=A({},e),z(!a.pathname||!a.pathname.includes("?"),lt("?","pathname","search",a)),z(!a.pathname||!a.pathname.includes("#"),lt("#","pathname","hash",a)),z(!a.search||!a.search.includes("#"),lt("#","search","hash",a)));let s=e===""||a.pathname==="",o=s?"/":a.pathname,c;if(o==null)c=r;else{let g=t.length-1;if(!n&&o.startsWith("..")){let S=o.split("/");for(;S[0]==="..";)S.shift(),g-=1;a.pathname=S.join("/")}c=g>=0?t[g]:"/"}let d=jt(a,c),m=o&&o!=="/"&&o.endsWith("/"),y=(s||o===".")&&r.endsWith("/");return!d.pathname.endsWith("/")&&(m||y)&&(d.pathname+="/"),d}function _n(e){return e===""||e.pathname===""?"/":typeof e=="string"?ae(e).pathname:e.pathname}const Te=e=>e.join("/").replace(/\/\/+/g,"/"),zr=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Br=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Wr=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,Un=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),A({},n,{headers:a}))};class kr{constructor(t,r){this.type="DataWithResponseInit",this.data=t,this.init=r||null}}function An(e,t){return new kr(e,typeof t=="number"?{status:t}:t)}class st extends Error{}class Kr{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((s,o)=>n=o),this.controller=new AbortController;let a=()=>n(new st("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",a),this.controller.signal.addEventListener("abort",a),this.data=Object.entries(t).reduce((s,o)=>{let[c,d]=o;return Object.assign(s,{[c]:this.trackPromise(c,d)})},{}),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 st)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 s=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:()=>s}),this.emit(!1,r),Promise.reject(s)}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(s=>{t.removeEventListener("abort",n),(s||this.done)&&a(s)})})}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]:Vr(a)})},{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}}function $r(e){return e instanceof Promise&&e._tracked===!0}function Vr(e){if(!$r(e))return e;if(e._error)throw e._error;return e._data}const In=function(t,r){r===void 0&&(r={});let n=typeof r=="number"?{status:r}:r;return new Kr(t,n)},Ut=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,A({},n,{headers:a}))},Hn=(e,t)=>{let r=Ut(e,t);return r.headers.set("X-Remix-Reload-Document","true"),r},Nn=(e,t)=>{let r=Ut(e,t);return r.headers.set("X-Remix-Replace","true"),r};class dt{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 Ce(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const At=["post","put","patch","delete"],Yr=new Set(At),Jr=["get",...At],Xr=new Set(Jr),Gr=new Set([301,302,303,307,308]),Qr=new Set([307,308]),ut={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Zr={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ze={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},ft=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,It=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Ht="remix-router-transitions";function zn(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 i=e.detectErrorBoundary;a=l=>({hasErrorBoundary:i(l)})}else a=It;let s={},o=He(e.routes,a,void 0,s),c,d=e.basename||"/",m=e.dataStrategy||Vt,y=e.patchRoutesOnNavigation,g=A({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),S=null,h=new Set,v=null,w=null,L=null,O=e.hydrationData!=null,x=ue(o,e.history.location,d),F=null;if(x==null&&!y){let i=V(404,{pathname:e.history.location.pathname}),{matches:l,route:u}=Xe(o);x=l,F={[u.id]:i}}x&&!e.hydrationData&&nt(x,o,e.history.location.pathname).active&&(x=null);let b;if(x)if(x.some(i=>i.route.lazy))b=!1;else if(!x.some(i=>i.route.loader))b=!0;else if(g.v7_partialHydration){let i=e.hydrationData?e.hydrationData.loaderData:null,l=e.hydrationData?e.hydrationData.errors:null;if(l){let u=x.findIndex(p=>l[p.route.id]!==void 0);b=x.slice(0,u+1).every(p=>!pt(p.route,i,l))}else b=x.every(u=>!pt(u.route,i,l))}else b=e.hydrationData!=null;else if(b=!1,x=[],g.v7_partialHydration){let i=nt(null,o,e.history.location.pathname);i.active&&i.matches&&(x=i.matches)}let k,f={historyAction:e.history.action,location:e.history.location,matches:x,initialized:b,navigation:ut,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||F,fetchers:new Map,blockers:new Map},C=$.Pop,I=!1,_,G=!1,Y=new Map,ie=null,ne=!1,ce=!1,Qe=[],Ze=new Set,q=new Map,qe=0,We=-1,Fe=new Map,he=new Set,Oe=new Map,ke=new Map,pe=new Set,Ee=new Map,Pe=new Map,et;function mn(){if(S=e.history.listen(i=>{let{action:l,location:u,delta:p}=i;if(et){et(),et=void 0;return}se(Pe.size===0||p!=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 D=pr({currentLocation:f.location,nextLocation:u,historyAction:l});if(D&&p!=null){let M=new Promise(j=>{et=j});e.history.go(p*-1),rt(D,{state:"blocked",location:u,proceed(){rt(D,{state:"proceeding",proceed:void 0,reset:void 0,location:u}),M.then(()=>e.history.go(p))},reset(){let j=new Map(f.blockers);j.set(D,ze),te({blockers:j})}});return}return xe(l,u)}),r){hn(t,Y);let i=()=>pn(t,Y);t.addEventListener("pagehide",i),ie=()=>t.removeEventListener("pagehide",i)}return f.initialized||xe($.Pop,f.location,{initialHydration:!0}),k}function yn(){S&&S(),ie&&ie(),h.clear(),_&&_.abort(),f.fetchers.forEach((i,l)=>tt(l)),f.blockers.forEach((i,l)=>hr(l))}function gn(i){return h.add(i),()=>h.delete(i)}function te(i,l){l===void 0&&(l={}),f=A({},f,i);let u=[],p=[];g.v7_fetcherPersist&&f.fetchers.forEach((D,M)=>{D.state==="idle"&&(pe.has(M)?p.push(M):u.push(M))}),[...h].forEach(D=>D(f,{deletedFetchers:p,viewTransitionOpts:l.viewTransitionOpts,flushSync:l.flushSync===!0})),g.v7_fetcherPersist&&(u.forEach(D=>f.fetchers.delete(D)),p.forEach(D=>tt(D)))}function _e(i,l,u){var p,D;let{flushSync:M}=u===void 0?{}:u,j=f.actionData!=null&&f.navigation.formMethod!=null&&re(f.navigation.formMethod)&&f.navigation.state==="loading"&&((p=i.state)==null?void 0:p._isRedirect)!==!0,E;l.actionData?Object.keys(l.actionData).length>0?E=l.actionData:E=null:j?E=f.actionData:E=null;let P=l.loaderData?er(f.loaderData,l.loaderData,l.matches||[],l.errors):f.loaderData,R=f.blockers;R.size>0&&(R=new Map(R),R.forEach((N,ee)=>R.set(ee,ze)));let T=I===!0||f.navigation.formMethod!=null&&re(f.navigation.formMethod)&&((D=i.state)==null?void 0:D._isRedirect)!==!0;c&&(o=c,c=void 0),ne||C===$.Pop||(C===$.Push?e.history.push(i,i.state):C===$.Replace&&e.history.replace(i,i.state));let U;if(C===$.Pop){let N=Y.get(f.location.pathname);N&&N.has(i.pathname)?U={currentLocation:f.location,nextLocation:i}:Y.has(i.pathname)&&(U={currentLocation:i,nextLocation:f.location})}else if(G){let N=Y.get(f.location.pathname);N?N.add(i.pathname):(N=new Set([i.pathname]),Y.set(f.location.pathname,N)),U={currentLocation:f.location,nextLocation:i}}te(A({},l,{actionData:E,loaderData:P,historyAction:C,location:i,initialized:!0,navigation:ut,revalidation:"idle",restoreScrollPosition:yr(i,l.matches||f.matches),preventScrollReset:T,blockers:R}),{viewTransitionOpts:U,flushSync:M===!0}),C=$.Pop,I=!1,G=!1,ne=!1,ce=!1,Qe=[]}async function or(i,l){if(typeof i=="number"){e.history.go(i);return}let u=ct(f.location,f.matches,d,g.v7_prependBasename,i,g.v7_relativeSplatPath,l?.fromRouteId,l?.relative),{path:p,submission:D,error:M}=zt(g.v7_normalizeFormMethod,!1,u,l),j=f.location,E=de(f.location,p,l&&l.state);E=A({},E,e.history.encodeLocation(E));let P=l&&l.replace!=null?l.replace:void 0,R=$.Push;P===!0?R=$.Replace:P===!1||D!=null&&re(D.formMethod)&&D.formAction===f.location.pathname+f.location.search&&(R=$.Replace);let T=l&&"preventScrollReset"in l?l.preventScrollReset===!0:void 0,U=(l&&l.flushSync)===!0,N=pr({currentLocation:j,nextLocation:E,historyAction:R});if(N){rt(N,{state:"blocked",location:E,proceed(){rt(N,{state:"proceeding",proceed:void 0,reset:void 0,location:E}),or(i,l)},reset(){let ee=new Map(f.blockers);ee.set(N,ze),te({blockers:ee})}});return}return await xe(R,E,{submission:D,pendingError:M,preventScrollReset:T,replace:l&&l.replace,enableViewTransition:l&&l.viewTransition,flushSync:U})}function vn(){if(bt(),te({revalidation:"loading"}),f.navigation.state!=="submitting"){if(f.navigation.state==="idle"){xe(f.historyAction,f.location,{startUninterruptedRevalidation:!0});return}xe(C||f.historyAction,f.navigation.location,{overrideNavigation:f.navigation,enableViewTransition:G===!0})}}async function xe(i,l,u){_&&_.abort(),_=null,C=i,ne=(u&&u.startUninterruptedRevalidation)===!0,Mn(f.location,f.matches),I=(u&&u.preventScrollReset)===!0,G=(u&&u.enableViewTransition)===!0;let p=c||o,D=u&&u.overrideNavigation,M=ue(p,l,d),j=(u&&u.flushSync)===!0,E=nt(M,p,l.pathname);if(E.active&&E.matches&&(M=E.matches),!M){let{error:K,notFoundMatches:W,route:J}=Dt(l.pathname);_e(l,{matches:W,loaderData:{},errors:{[J.id]:K}},{flushSync:j});return}if(f.initialized&&!ce&&an(f.location,l)&&!(u&&u.submission&&re(u.submission.formMethod))){_e(l,{matches:M},{flushSync:j});return}_=new AbortController;let P=je(e.history,l,_.signal,u&&u.submission),R;if(u&&u.pendingError)R=[ge(M).route.id,{type:H.error,error:u.pendingError}];else if(u&&u.submission&&re(u.submission.formMethod)){let K=await wn(P,l,u.submission,M,E.active,{replace:u.replace,flushSync:j});if(K.shortCircuited)return;if(K.pendingActionResult){let[W,J]=K.pendingActionResult;if(Z(J)&&Ce(J.error)&&J.error.status===404){_=null,_e(l,{matches:K.matches,loaderData:{},errors:{[W]:J.error}});return}}M=K.matches||M,R=K.pendingActionResult,D=wt(l,u.submission),j=!1,E.active=!1,P=je(e.history,P.url,P.signal)}let{shortCircuited:T,matches:U,loaderData:N,errors:ee}=await bn(P,l,M,E.active,D,u&&u.submission,u&&u.fetcherSubmission,u&&u.replace,u&&u.initialHydration===!0,j,R);T||(_=null,_e(l,A({matches:U||M},tr(R),{loaderData:N,errors:ee})))}async function wn(i,l,u,p,D,M){M===void 0&&(M={}),bt();let j=fn(l,u);if(te({navigation:j},{flushSync:M.flushSync===!0}),D){let R=await at(p,l.pathname,i.signal);if(R.type==="aborted")return{shortCircuited:!0};if(R.type==="error"){let T=ge(R.partialMatches).route.id;return{matches:R.partialMatches,pendingActionResult:[T,{type:H.error,error:R.error}]}}else if(R.matches)p=R.matches;else{let{notFoundMatches:T,error:U,route:N}=Dt(l.pathname);return{matches:T,pendingActionResult:[N.id,{type:H.error,error:U}]}}}let E,P=Se(p,l);if(!P.route.action&&!P.route.lazy)E={type:H.error,error:V(405,{method:i.method,pathname:l.pathname,routeId:P.route.id})};else if(E=(await Ke("action",f,i,[P],p,null))[P.route.id],i.signal.aborted)return{shortCircuited:!0};if(ve(E)){let R;return M&&M.replace!=null?R=M.replace:R=Gt(E.response.headers.get("Location"),new URL(i.url),d)===f.location.pathname+f.location.search,await Le(i,E,!0,{submission:u,replace:R}),{shortCircuited:!0}}if(fe(E))throw V(400,{type:"defer-action"});if(Z(E)){let R=ge(p,P.route.id);return(M&&M.replace)!==!0&&(C=$.Push),{matches:p,pendingActionResult:[R.route.id,E]}}return{matches:p,pendingActionResult:[P.route.id,E]}}async function bn(i,l,u,p,D,M,j,E,P,R,T){let U=D||wt(l,M),N=M||j||ir(U),ee=!ne&&(!g.v7_partialHydration||!P);if(p){if(ee){let X=lr(T);te(A({navigation:U},X!==void 0?{actionData:X}:{}),{flushSync:R})}let B=await at(u,l.pathname,i.signal);if(B.type==="aborted")return{shortCircuited:!0};if(B.type==="error"){let X=ge(B.partialMatches).route.id;return{matches:B.partialMatches,loaderData:{},errors:{[X]:B.error}}}else if(B.matches)u=B.matches;else{let{error:X,notFoundMatches:Ae,route:Ye}=Dt(l.pathname);return{matches:Ae,loaderData:{},errors:{[Ye.id]:X}}}}let K=c||o,[W,J]=Bt(e.history,f,u,N,l,g.v7_partialHydration&&P===!0,g.v7_skipActionErrorRevalidation,ce,Qe,Ze,pe,Oe,he,K,d,T);if(Rt(B=>!(u&&u.some(X=>X.route.id===B))||W&&W.some(X=>X.route.id===B)),We=++qe,W.length===0&&J.length===0){let B=fr();return _e(l,A({matches:u,loaderData:{},errors:T&&Z(T[1])?{[T[0]]:T[1].error}:null},tr(T),B?{fetchers:new Map(f.fetchers)}:{}),{flushSync:R}),{shortCircuited:!0}}if(ee){let B={};if(!p){B.navigation=U;let X=lr(T);X!==void 0&&(B.actionData=X)}J.length>0&&(B.fetchers=Dn(J)),te(B,{flushSync:R})}J.forEach(B=>{Re(B.key),B.controller&&q.set(B.key,B.controller)});let Ue=()=>J.forEach(B=>Re(B.key));_&&_.signal.addEventListener("abort",Ue);let{loaderResults:$e,fetcherResults:ye}=await sr(f,u,W,J,i);if(i.signal.aborted)return{shortCircuited:!0};_&&_.signal.removeEventListener("abort",Ue),J.forEach(B=>q.delete(B.key));let le=Ge($e);if(le)return await Le(i,le.result,!0,{replace:E}),{shortCircuited:!0};if(le=Ge(ye),le)return he.add(le.key),await Le(i,le.result,!0,{replace:E}),{shortCircuited:!0};let{loaderData:St,errors:Ve}=qt(f,u,$e,T,J,ye,Ee);Ee.forEach((B,X)=>{B.subscribe(Ae=>{(Ae||B.done)&&Ee.delete(X)})}),g.v7_partialHydration&&P&&f.errors&&(Ve=A({},f.errors,Ve));let Me=fr(),it=cr(We),ot=Me||it||J.length>0;return A({matches:u,loaderData:St,errors:Ve},ot?{fetchers:new Map(f.fetchers)}:{})}function lr(i){if(i&&!Z(i[1]))return{[i[0]]:i[1].data};if(f.actionData)return Object.keys(f.actionData).length===0?null:f.actionData}function Dn(i){return i.forEach(l=>{let u=f.fetchers.get(l.key),p=Be(void 0,u?u.data:void 0);f.fetchers.set(l.key,p)}),new Map(f.fetchers)}function Rn(i,l,u,p){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.");Re(i);let D=(p&&p.flushSync)===!0,M=c||o,j=ct(f.location,f.matches,d,g.v7_prependBasename,u,g.v7_relativeSplatPath,l,p?.relative),E=ue(M,j,d),P=nt(E,M,j);if(P.active&&P.matches&&(E=P.matches),!E){me(i,l,V(404,{pathname:j}),{flushSync:D});return}let{path:R,submission:T,error:U}=zt(g.v7_normalizeFormMethod,!0,j,p);if(U){me(i,l,U,{flushSync:D});return}let N=Se(E,R),ee=(p&&p.preventScrollReset)===!0;if(T&&re(T.formMethod)){Sn(i,l,R,N,E,P.active,D,ee,T);return}Oe.set(i,{routeId:l,path:R}),En(i,l,R,N,E,P.active,D,ee,T)}async function Sn(i,l,u,p,D,M,j,E,P){bt(),Oe.delete(i);function R(Q){if(!Q.route.action&&!Q.route.lazy){let Ie=V(405,{method:P.formMethod,pathname:u,routeId:l});return me(i,l,Ie,{flushSync:j}),!0}return!1}if(!M&&R(p))return;let T=f.fetchers.get(i);De(i,cn(P,T),{flushSync:j});let U=new AbortController,N=je(e.history,u,U.signal,P);if(M){let Q=await at(D,u,N.signal);if(Q.type==="aborted")return;if(Q.type==="error"){me(i,l,Q.error,{flushSync:j});return}else if(Q.matches){if(D=Q.matches,p=Se(D,u),R(p))return}else{me(i,l,V(404,{pathname:u}),{flushSync:j});return}}q.set(i,U);let ee=qe,W=(await Ke("action",f,N,[p],D,i))[p.route.id];if(N.signal.aborted){q.get(i)===U&&q.delete(i);return}if(g.v7_fetcherPersist&&pe.has(i)){if(ve(W)||Z(W)){De(i,be(void 0));return}}else{if(ve(W))if(q.delete(i),We>ee){De(i,be(void 0));return}else return he.add(i),De(i,Be(P)),Le(N,W,!1,{fetcherSubmission:P,preventScrollReset:E});if(Z(W)){me(i,l,W.error);return}}if(fe(W))throw V(400,{type:"defer-action"});let J=f.navigation.location||f.location,Ue=je(e.history,J,U.signal),$e=c||o,ye=f.navigation.state!=="idle"?ue($e,f.navigation.location,d):f.matches;z(ye,"Didn't find any matches after fetcher action");let le=++qe;Fe.set(i,le);let St=Be(P,W.data);f.fetchers.set(i,St);let[Ve,Me]=Bt(e.history,f,ye,P,J,!1,g.v7_skipActionErrorRevalidation,ce,Qe,Ze,pe,Oe,he,$e,d,[p.route.id,W]);Me.filter(Q=>Q.key!==i).forEach(Q=>{let Ie=Q.key,gr=f.fetchers.get(Ie),jn=Be(void 0,gr?gr.data:void 0);f.fetchers.set(Ie,jn),Re(Ie),Q.controller&&q.set(Ie,Q.controller)}),te({fetchers:new Map(f.fetchers)});let it=()=>Me.forEach(Q=>Re(Q.key));U.signal.addEventListener("abort",it);let{loaderResults:ot,fetcherResults:B}=await sr(f,ye,Ve,Me,Ue);if(U.signal.aborted)return;U.signal.removeEventListener("abort",it),Fe.delete(i),q.delete(i),Me.forEach(Q=>q.delete(Q.key));let X=Ge(ot);if(X)return Le(Ue,X.result,!1,{preventScrollReset:E});if(X=Ge(B),X)return he.add(X.key),Le(Ue,X.result,!1,{preventScrollReset:E});let{loaderData:Ae,errors:Ye}=qt(f,ye,ot,void 0,Me,B,Ee);if(f.fetchers.has(i)){let Q=be(W.data);f.fetchers.set(i,Q)}cr(le),f.navigation.state==="loading"&&le>We?(z(C,"Expected pending action"),_&&_.abort(),_e(f.navigation.location,{matches:ye,loaderData:Ae,errors:Ye,fetchers:new Map(f.fetchers)})):(te({errors:Ye,loaderData:er(f.loaderData,Ae,ye,Ye),fetchers:new Map(f.fetchers)}),ce=!1)}async function En(i,l,u,p,D,M,j,E,P){let R=f.fetchers.get(i);De(i,Be(P,R?R.data:void 0),{flushSync:j});let T=new AbortController,U=je(e.history,u,T.signal);if(M){let W=await at(D,u,U.signal);if(W.type==="aborted")return;if(W.type==="error"){me(i,l,W.error,{flushSync:j});return}else if(W.matches)D=W.matches,p=Se(D,u);else{me(i,l,V(404,{pathname:u}),{flushSync:j});return}}q.set(i,T);let N=qe,K=(await Ke("loader",f,U,[p],D,i))[p.route.id];if(fe(K)&&(K=await gt(K,U.signal,!0)||K),q.get(i)===T&&q.delete(i),!U.signal.aborted){if(pe.has(i)){De(i,be(void 0));return}if(ve(K))if(We>N){De(i,be(void 0));return}else{he.add(i),await Le(U,K,!1,{preventScrollReset:E});return}if(Z(K)){me(i,l,K.error);return}z(!fe(K),"Unhandled fetcher deferred data"),De(i,be(K.data))}}async function Le(i,l,u,p){let{submission:D,fetcherSubmission:M,preventScrollReset:j,replace:E}=p===void 0?{}:p;l.response.headers.has("X-Remix-Revalidate")&&(ce=!0);let P=l.response.headers.get("Location");z(P,"Expected a Location header on the redirect Response"),P=Gt(P,new URL(i.url),d);let R=de(f.location,P,{_isRedirect:!0});if(r){let W=!1;if(l.response.headers.has("X-Remix-Reload-Document"))W=!0;else if(ft.test(P)){const J=e.history.createURL(P);W=J.origin!==t.location.origin||Ne(J.pathname,d)==null}if(W){E?t.location.replace(P):t.location.assign(P);return}}_=null;let T=E===!0||l.response.headers.has("X-Remix-Replace")?$.Replace:$.Push,{formMethod:U,formAction:N,formEncType:ee}=f.navigation;!D&&!M&&U&&N&&ee&&(D=ir(f.navigation));let K=D||M;if(Qr.has(l.response.status)&&K&&re(K.formMethod))await xe(T,R,{submission:A({},K,{formAction:P}),preventScrollReset:j||I,enableViewTransition:u?G:void 0});else{let W=wt(R,D);await xe(T,R,{overrideNavigation:W,fetcherSubmission:M,preventScrollReset:j||I,enableViewTransition:u?G:void 0})}}async function Ke(i,l,u,p,D,M){let j,E={};try{j=await Yt(m,i,l,u,p,D,M,s,a)}catch(P){return p.forEach(R=>{E[R.route.id]={type:H.error,error:P}}),E}for(let[P,R]of Object.entries(j))if(nr(R)){let T=R.result;E[P]={type:H.redirect,response:Xt(T,u,P,D,d,g.v7_relativeSplatPath)}}else E[P]=await Jt(R);return E}async function sr(i,l,u,p,D){let M=i.matches,j=Ke("loader",i,D,u,l,null),E=Promise.all(p.map(async T=>{if(T.matches&&T.match&&T.controller){let N=(await Ke("loader",i,je(e.history,T.path,T.controller.signal),[T.match],T.matches,T.key))[T.match.route.id];return{[T.key]:N}}else return Promise.resolve({[T.key]:{type:H.error,error:V(404,{pathname:T.path})}})})),P=await j,R=(await E).reduce((T,U)=>Object.assign(T,U),{});return await Promise.all([dn(l,P,D.signal,M,i.loaderData),un(l,R,p)]),{loaderResults:P,fetcherResults:R}}function bt(){ce=!0,Qe.push(...Rt()),Oe.forEach((i,l)=>{q.has(l)&&Ze.add(l),Re(l)})}function De(i,l,u){u===void 0&&(u={}),f.fetchers.set(i,l),te({fetchers:new Map(f.fetchers)},{flushSync:(u&&u.flushSync)===!0})}function me(i,l,u,p){p===void 0&&(p={});let D=ge(f.matches,l);tt(i),te({errors:{[D.route.id]:u},fetchers:new Map(f.fetchers)},{flushSync:(p&&p.flushSync)===!0})}function dr(i){return g.v7_fetcherPersist&&(ke.set(i,(ke.get(i)||0)+1),pe.has(i)&&pe.delete(i)),f.fetchers.get(i)||Zr}function tt(i){let l=f.fetchers.get(i);q.has(i)&&!(l&&l.state==="loading"&&Fe.has(i))&&Re(i),Oe.delete(i),Fe.delete(i),he.delete(i),pe.delete(i),Ze.delete(i),f.fetchers.delete(i)}function Pn(i){if(g.v7_fetcherPersist){let l=(ke.get(i)||0)-1;l<=0?(ke.delete(i),pe.add(i)):ke.set(i,l)}else tt(i);te({fetchers:new Map(f.fetchers)})}function Re(i){let l=q.get(i);l&&(l.abort(),q.delete(i))}function ur(i){for(let l of i){let u=dr(l),p=be(u.data);f.fetchers.set(l,p)}}function fr(){let i=[],l=!1;for(let u of he){let p=f.fetchers.get(u);z(p,"Expected fetcher: "+u),p.state==="loading"&&(he.delete(u),i.push(u),l=!0)}return ur(i),l}function cr(i){let l=[];for(let[u,p]of Fe)if(p<i){let D=f.fetchers.get(u);z(D,"Expected fetcher: "+u),D.state==="loading"&&(Re(u),Fe.delete(u),l.push(u))}return ur(l),l.length>0}function xn(i,l){let u=f.blockers.get(i)||ze;return Pe.get(i)!==l&&Pe.set(i,l),u}function hr(i){f.blockers.delete(i),Pe.delete(i)}function rt(i,l){let u=f.blockers.get(i)||ze;z(u.state==="unblocked"&&l.state==="blocked"||u.state==="blocked"&&l.state==="blocked"||u.state==="blocked"&&l.state==="proceeding"||u.state==="blocked"&&l.state==="unblocked"||u.state==="proceeding"&&l.state==="unblocked","Invalid blocker state transition: "+u.state+" -> "+l.state);let p=new Map(f.blockers);p.set(i,l),te({blockers:p})}function pr(i){let{currentLocation:l,nextLocation:u,historyAction:p}=i;if(Pe.size===0)return;Pe.size>1&&se(!1,"A router only supports one blocker at a time");let D=Array.from(Pe.entries()),[M,j]=D[D.length-1],E=f.blockers.get(M);if(!(E&&E.state==="proceeding")&&j({currentLocation:l,nextLocation:u,historyAction:p}))return M}function Dt(i){let l=V(404,{pathname:i}),u=c||o,{matches:p,route:D}=Xe(u);return Rt(),{notFoundMatches:p,route:D,error:l}}function Rt(i){let l=[];return Ee.forEach((u,p)=>{(!i||i(p))&&(u.cancel(),l.push(p),Ee.delete(p))}),l}function Ln(i,l,u){if(v=i,L=l,w=u||null,!O&&f.navigation===ut){O=!0;let p=yr(f.location,f.matches);p!=null&&te({restoreScrollPosition:p})}return()=>{v=null,L=null,w=null}}function mr(i,l){return w&&w(i,l.map(p=>Pr(p,f.loaderData)))||i.key}function Mn(i,l){if(v&&L){let u=mr(i,l);v[u]=L()}}function yr(i,l){if(v){let u=mr(i,l),p=v[u];if(typeof p=="number")return p}return null}function nt(i,l,u){if(y)if(i){if(Object.keys(i[0].params).length>0)return{active:!0,matches:Je(l,u,d,!0)}}else return{active:!0,matches:Je(l,u,d,!0)||[]};return{active:!1,matches:null}}async function at(i,l,u){if(!y)return{type:"success",matches:i};let p=i;for(;;){let D=c==null,M=c||o,j=s;try{await y({path:l,matches:p,patch:(R,T)=>{u.aborted||Kt(R,T,M,j,a)}})}catch(R){return{type:"error",error:R,partialMatches:p}}finally{D&&!u.aborted&&(o=[...o])}if(u.aborted)return{type:"aborted"};let E=ue(M,l,d);if(E)return{type:"success",matches:E};let P=Je(M,l,d,!0);if(!P||p.length===P.length&&p.every((R,T)=>R.route.id===P[T].route.id))return{type:"success",matches:null};p=P}}function Tn(i){s={},c=He(i,a,void 0,s)}function Cn(i,l){let u=c==null;Kt(i,l,c||o,s,a),u&&(o=[...o],te({}))}return k={get basename(){return d},get future(){return g},get state(){return f},get routes(){return o},get window(){return t},initialize:mn,subscribe:gn,enableScrollRestoration:Ln,navigate:or,fetch:Rn,revalidate:vn,createHref:i=>e.history.createHref(i),encodeLocation:i=>e.history.encodeLocation(i),getFetcher:dr,deleteFetcher:Pn,dispose:yn,getBlocker:xn,deleteBlocker:hr,patchRoutes:Cn,_internalFetchControllers:q,_internalActiveDeferreds:Ee,_internalSetRoutes:Tn},k}const qr=Symbol("deferred");function Bn(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 h=t.detectErrorBoundary;a=v=>({hasErrorBoundary:h(v)})}else a=It;let s=A({v7_relativeSplatPath:!1,v7_throwAbortReason:!1},t?t.future:null),o=He(e,a,void 0,r);async function c(h,v){let{requestContext:w,skipLoaderErrorBubbling:L,dataStrategy:O}=v===void 0?{}:v,x=new URL(h.url),F=h.method,b=de("",oe(x),null,"default"),k=ue(o,b,n);if(!yt(F)&&F!=="HEAD"){let C=V(405,{method:F}),{matches:I,route:_}=Xe(o);return{basename:n,location:b,matches:I,loaderData:{},actionData:null,errors:{[_.id]:C},statusCode:C.status,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}else if(!k){let C=V(404,{pathname:b.pathname}),{matches:I,route:_}=Xe(o);return{basename:n,location:b,matches:I,loaderData:{},actionData:null,errors:{[_.id]:C},statusCode:C.status,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}let f=await m(h,b,k,w,O||null,L===!0,null);return we(f)?f:A({location:b,basename:n},f)}async function d(h,v){let{routeId:w,requestContext:L,dataStrategy:O}=v===void 0?{}:v,x=new URL(h.url),F=h.method,b=de("",oe(x),null,"default"),k=ue(o,b,n);if(!yt(F)&&F!=="HEAD"&&F!=="OPTIONS")throw V(405,{method:F});if(!k)throw V(404,{pathname:b.pathname});let f=w?k.find(G=>G.route.id===w):Se(k,b);if(w&&!f)throw V(403,{pathname:b.pathname,routeId:w});if(!f)throw V(404,{pathname:b.pathname});let C=await m(h,b,k,L,O||null,!1,f);if(we(C))return C;let I=C.errors?Object.values(C.errors)[0]:void 0;if(I!==void 0)throw I;if(C.actionData)return Object.values(C.actionData)[0];if(C.loaderData){var _;let G=Object.values(C.loaderData)[0];return(_=C.activeDeferreds)!=null&&_[f.route.id]&&(G[qr]=C.activeDeferreds[f.route.id]),G}}async function m(h,v,w,L,O,x,F){z(h.signal,"query()/queryRoute() requests must contain an AbortController signal");try{if(re(h.method.toLowerCase()))return await y(h,w,F||Se(w,v),L,O,x,F!=null);let b=await g(h,w,L,O,x,F);return we(b)?b:A({},b,{actionData:null,actionHeaders:{}})}catch(b){if(on(b)&&we(b.result)){if(b.type===H.error)throw b.result;return b.result}if(sn(b))return b;throw b}}async function y(h,v,w,L,O,x,F){let b;if(!w.route.action&&!w.route.lazy){let C=V(405,{method:h.method,pathname:new URL(h.url).pathname,routeId:w.route.id});if(F)throw C;b={type:H.error,error:C}}else b=(await S("action",h,[w],v,F,L,O))[w.route.id],h.signal.aborted&&Nt(h,F,s);if(ve(b))throw new Response(null,{status:b.response.status,headers:{Location:b.response.headers.get("Location")}});if(fe(b)){let C=V(400,{type:"defer-action"});if(F)throw C;b={type:H.error,error:C}}if(F){if(Z(b))throw b.error;return{matches:[w],loaderData:{},actionData:{[w.route.id]:b.data},errors:null,statusCode:200,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}let k=new Request(h.url,{headers:h.headers,redirect:h.redirect,signal:h.signal});if(Z(b)){let C=x?w:ge(v,w.route.id),I=await g(k,v,L,O,x,null,[C.route.id,b]);return A({},I,{statusCode:Ce(b.error)?b.error.status:b.statusCode!=null?b.statusCode:500,actionData:null,actionHeaders:A({},b.headers?{[w.route.id]:b.headers}:{})})}let f=await g(k,v,L,O,x,null);return A({},f,{actionData:{[w.route.id]:b.data}},b.statusCode?{statusCode:b.statusCode}:{},{actionHeaders:b.headers?{[w.route.id]:b.headers}:{}})}async function g(h,v,w,L,O,x,F){let b=x!=null;if(b&&!(x!=null&&x.route.loader)&&!(x!=null&&x.route.lazy))throw V(400,{method:h.method,pathname:new URL(h.url).pathname,routeId:x?.route.id});let f=(x?[x]:F&&Z(F[1])?ht(v,F[0]):v).filter(Y=>Y.route.loader||Y.route.lazy);if(f.length===0)return{matches:v,loaderData:v.reduce((Y,ie)=>Object.assign(Y,{[ie.route.id]:null}),{}),errors:F&&Z(F[1])?{[F[0]]:F[1].error}:null,statusCode:200,loaderHeaders:{},activeDeferreds:null};let C=await S("loader",h,f,v,b,w,L);h.signal.aborted&&Nt(h,b,s);let I=new Map,_=Zt(v,C,F,I,O),G=new Set(f.map(Y=>Y.route.id));return v.forEach(Y=>{G.has(Y.route.id)||(_.loaderData[Y.route.id]=null)}),A({},_,{matches:v,activeDeferreds:I.size>0?Object.fromEntries(I.entries()):null})}async function S(h,v,w,L,O,x,F){let b=await Yt(F||Vt,h,null,v,w,L,null,r,a,x),k={};return await Promise.all(L.map(async f=>{if(!(f.route.id in b))return;let C=b[f.route.id];if(nr(C)){let I=C.result;throw Xt(I,v,f.route.id,L,n,s.v7_relativeSplatPath)}if(we(C.result)&&O)throw C;k[f.route.id]=await Jt(C)})),k}return{dataRoutes:o,query:c,queryRoute:d}}function Wn(e,t,r){return A({},t,{statusCode:Ce(r)?r.status:500,errors:{[t._deepestRenderedBoundaryId||e[0].id]:r}})}function Nt(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 en(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function ct(e,t,r,n,a,s,o,c){let d,m;if(o){d=[];for(let g of t)if(d.push(g),g.route.id===o){m=g;break}}else d=t,m=t[t.length-1];let y=_t(a||".",Ot(d,s),Ne(e.pathname,r)||e.pathname,c==="path");if(a==null&&(y.search=e.search,y.hash=e.hash),(a==null||a===""||a===".")&&m){let g=vt(y.search);if(m.route.index&&!g)y.search=y.search?y.search.replace(/^\?/,"?index&"):"?index";else if(!m.route.index&&g){let S=new URLSearchParams(y.search),h=S.getAll("index");S.delete("index"),h.filter(w=>w).forEach(w=>S.append("index",w));let v=S.toString();y.search=v?"?"+v:""}}return n&&r!=="/"&&(y.pathname=y.pathname==="/"?r:Te([r,y.pathname])),oe(y)}function zt(e,t,r,n){if(!n||!en(n))return{path:r};if(n.formMethod&&!yt(n.formMethod))return{path:r,error:V(405,{method:n.formMethod})};let a=()=>({path:r,error:V(400,{type:"invalid-body"})}),s=n.formMethod||"get",o=e?s.toUpperCase():s.toLowerCase(),c=rr(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!re(o))return a();let S=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((h,v)=>{let[w,L]=v;return""+h+w+"="+L+`
11
- `},""):String(n.body);return{path:r,submission:{formMethod:o,formAction:c,formEncType:n.formEncType,formData:void 0,json:void 0,text:S}}}else if(n.formEncType==="application/json"){if(!re(o))return a();try{let S=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:o,formAction:c,formEncType:n.formEncType,formData:void 0,json:S,text:void 0}}}catch{return a()}}}z(typeof FormData=="function","FormData is not available in this environment");let d,m;if(n.formData)d=mt(n.formData),m=n.formData;else if(n.body instanceof FormData)d=mt(n.body),m=n.body;else if(n.body instanceof URLSearchParams)d=n.body,m=Qt(d);else if(n.body==null)d=new URLSearchParams,m=new FormData;else try{d=new URLSearchParams(n.body),m=Qt(d)}catch{return a()}let y={formMethod:o,formAction:c,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:m,json:void 0,text:void 0};if(re(y.formMethod))return{path:r,submission:y};let g=ae(r);return t&&g.search&&vt(g.search)&&d.append("index",""),g.search="?"+d,{path:oe(g),submission:y}}function ht(e,t,r){r===void 0&&(r=!1);let n=e.findIndex(a=>a.route.id===t);return n>=0?e.slice(0,r?n+1:n):e}function Bt(e,t,r,n,a,s,o,c,d,m,y,g,S,h,v,w){let L=w?Z(w[1])?w[1].error:w[1].data:void 0,O=e.createURL(t.location),x=e.createURL(a),F=r;s&&t.errors?F=ht(r,Object.keys(t.errors)[0],!0):w&&Z(w[1])&&(F=ht(r,w[0]));let b=w?w[1].statusCode:void 0,k=o&&b&&b>=400,f=F.filter((I,_)=>{let{route:G}=I;if(G.lazy)return!0;if(G.loader==null)return!1;if(s)return pt(G,t.loaderData,t.errors);if(tn(t.loaderData,t.matches[_],I)||d.some(ne=>ne===I.route.id))return!0;let Y=t.matches[_],ie=I;return kt(I,A({currentUrl:O,currentParams:Y.params,nextUrl:x,nextParams:ie.params},n,{actionResult:L,actionStatus:b,defaultShouldRevalidate:k?!1:c||O.pathname+O.search===x.pathname+x.search||O.search!==x.search||Wt(Y,ie)}))}),C=[];return g.forEach((I,_)=>{if(s||!r.some(ce=>ce.route.id===I.routeId)||y.has(_))return;let G=ue(h,I.path,v);if(!G){C.push({key:_,routeId:I.routeId,path:I.path,matches:null,match:null,controller:null});return}let Y=t.fetchers.get(_),ie=Se(G,I.path),ne=!1;S.has(_)?ne=!1:m.has(_)?(m.delete(_),ne=!0):Y&&Y.state!=="idle"&&Y.data===void 0?ne=c:ne=kt(ie,A({currentUrl:O,currentParams:t.matches[t.matches.length-1].params,nextUrl:x,nextParams:r[r.length-1].params},n,{actionResult:L,actionStatus:b,defaultShouldRevalidate:k?!1:c})),ne&&C.push({key:_,routeId:I.routeId,path:I.path,matches:G,match:ie,controller:new AbortController})}),[f,C]}function pt(e,t,r){if(e.lazy)return!0;if(!e.loader)return!1;let n=t!=null&&t[e.id]!==void 0,a=r!=null&&r[e.id]!==void 0;return!n&&a?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!n&&!a}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 Wt(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function kt(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}function Kt(e,t,r,n,a){var s;let o;if(e){let m=n[e];z(m,"No route found to patch children into: routeId = "+e),m.children||(m.children=[]),o=m.children}else o=r;let c=t.filter(m=>!o.some(y=>$t(m,y))),d=He(c,a,[e||"_","patch",String(((s=o)==null?void 0:s.length)||"0")],n);o.push(...d)}function $t(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((r,n)=>{var a;return(a=t.children)==null?void 0:a.some(s=>$t(r,s))}):!1}async function rn(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 s={};for(let o in n){let d=a[o]!==void 0&&o!=="hasErrorBoundary";se(!d,'Route "'+a.id+'" has a static property "'+o+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+o+'" will be ignored.')),!d&&!Sr.has(o)&&(s[o]=n[o])}Object.assign(a,s),Object.assign(a,A({},t(a),{lazy:void 0}))}async function Vt(e){let{matches:t}=e,r=t.filter(a=>a.shouldLoad);return(await Promise.all(r.map(a=>a.resolve()))).reduce((a,s,o)=>Object.assign(a,{[r[o].route.id]:s}),{})}async function Yt(e,t,r,n,a,s,o,c,d,m){let y=s.map(h=>h.route.lazy?rn(h.route,d,c):void 0),g=s.map((h,v)=>{let w=y[v],L=a.some(x=>x.route.id===h.route.id);return A({},h,{shouldLoad:L,resolve:async x=>(x&&n.method==="GET"&&(h.route.lazy||h.route.loader)&&(L=!0),L?nn(t,n,h,w,x,m):Promise.resolve({type:H.data,result:void 0}))})}),S=await e({matches:g,request:n,params:s[0].params,fetcherKey:o,context:m});try{await Promise.all(y)}catch{}return S}async function nn(e,t,r,n,a,s){let o,c,d=m=>{let y,g=new Promise((v,w)=>y=w);c=()=>y(),t.signal.addEventListener("abort",c);let S=v=>typeof m!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+r.route.id+"]"))):m({request:t,params:r.params,context:s},...v!==void 0?[v]:[]),h=(async()=>{try{return{type:"data",result:await(a?a(w=>S(w)):S())}}catch(v){return{type:"error",result:v}}})();return Promise.race([h,g])};try{let m=r.route[e];if(n)if(m){let y,[g]=await Promise.all([d(m).catch(S=>{y=S}),n]);if(y!==void 0)throw y;o=g}else if(await n,m=r.route[e],m)o=await d(m);else if(e==="action"){let y=new URL(t.url),g=y.pathname+y.search;throw V(405,{method:t.method,pathname:g,routeId:r.route.id})}else return{type:H.data,result:void 0};else if(m)o=await d(m);else{let y=new URL(t.url),g=y.pathname+y.search;throw V(404,{pathname:g})}z(o.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(m){return{type:H.error,result:m}}finally{c&&t.signal.removeEventListener("abort",c)}return o}async function Jt(e){let{result:t,type:r}=e;if(we(t)){let m;try{let y=t.headers.get("Content-Type");y&&/\bapplication\/json\b/.test(y)?t.body==null?m=null:m=await t.json():m=await t.text()}catch(y){return{type:H.error,error:y}}return r===H.error?{type:H.error,error:new dt(t.status,t.statusText,m),statusCode:t.status,headers:t.headers}:{type:H.data,data:m,statusCode:t.status,headers:t.headers}}if(r===H.error){if(ar(t)){var n;if(t.data instanceof Error){var a;return{type:H.error,error:t.data,statusCode:(a=t.init)==null?void 0:a.status}}t=new dt(((n=t.init)==null?void 0:n.status)||500,void 0,t.data)}return{type:H.error,error:t,statusCode:Ce(t)?t.status:void 0}}if(ln(t)){var s,o;return{type:H.deferred,deferredData:t,statusCode:(s=t.init)==null?void 0:s.status,headers:((o=t.init)==null?void 0:o.headers)&&new Headers(t.init.headers)}}if(ar(t)){var c,d;return{type:H.data,data:t.data,statusCode:(c=t.init)==null?void 0:c.status,headers:(d=t.init)!=null&&d.headers?new Headers(t.init.headers):void 0}}return{type:H.data,data:t}}function Xt(e,t,r,n,a,s){let o=e.headers.get("Location");if(z(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!ft.test(o)){let c=n.slice(0,n.findIndex(d=>d.route.id===r)+1);o=ct(new URL(t.url),c,a,!0,o,s),e.headers.set("Location",o)}return e}function Gt(e,t,r){if(ft.test(e)){let n=e,a=n.startsWith("//")?new URL(t.protocol+n):new URL(n),s=Ne(a.pathname,r)!=null;if(a.origin===t.origin&&s)return a.pathname+a.search+a.hash}return e}function je(e,t,r,n){let a=e.createURL(rr(t)).toString(),s={signal:r};if(n&&re(n.formMethod)){let{formMethod:o,formEncType:c}=n;s.method=o.toUpperCase(),c==="application/json"?(s.headers=new Headers({"Content-Type":c}),s.body=JSON.stringify(n.json)):c==="text/plain"?s.body=n.text:c==="application/x-www-form-urlencoded"&&n.formData?s.body=mt(n.formData):s.body=n.formData}return new Request(a,s)}function mt(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function Qt(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function Zt(e,t,r,n,a){let s={},o=null,c,d=!1,m={},y=r&&Z(r[1])?r[1].error:void 0;return e.forEach(g=>{if(!(g.route.id in t))return;let S=g.route.id,h=t[S];if(z(!ve(h),"Cannot handle redirect results in processLoaderData"),Z(h)){let v=h.error;if(y!==void 0&&(v=y,y=void 0),o=o||{},a)o[S]=v;else{let w=ge(e,S);o[w.route.id]==null&&(o[w.route.id]=v)}s[S]=void 0,d||(d=!0,c=Ce(h.error)?h.error.status:500),h.headers&&(m[S]=h.headers)}else fe(h)?(n.set(S,h.deferredData),s[S]=h.deferredData.data,h.statusCode!=null&&h.statusCode!==200&&!d&&(c=h.statusCode),h.headers&&(m[S]=h.headers)):(s[S]=h.data,h.statusCode&&h.statusCode!==200&&!d&&(c=h.statusCode),h.headers&&(m[S]=h.headers))}),y!==void 0&&r&&(o={[r[0]]:y},s[r[0]]=void 0),{loaderData:s,errors:o,statusCode:c||200,loaderHeaders:m}}function qt(e,t,r,n,a,s,o){let{loaderData:c,errors:d}=Zt(t,r,n,o,!1);return a.forEach(m=>{let{key:y,match:g,controller:S}=m,h=s[y];if(z(h,"Did not find corresponding fetcher result"),!(S&&S.signal.aborted))if(Z(h)){let v=ge(e.matches,g?.route.id);d&&d[v.route.id]||(d=A({},d,{[v.route.id]:h.error})),e.fetchers.delete(y)}else if(ve(h))z(!1,"Unhandled fetcher revalidation redirect");else if(fe(h))z(!1,"Unhandled fetcher deferred data");else{let v=be(h.data);e.fetchers.set(y,v)}}),{loaderData:c,errors:d}}function er(e,t,r,n){let a=A({},t);for(let s of r){let o=s.route.id;if(t.hasOwnProperty(o)?t[o]!==void 0&&(a[o]=t[o]):e[o]!==void 0&&s.route.loader&&(a[o]=e[o]),n&&n.hasOwnProperty(o))break}return a}function tr(e){return e?Z(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function ge(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 Xe(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 V(e,t){let{pathname:r,routeId:n,method:a,type:s,message:o}=t===void 0?{}:t,c="Unknown Server Error",d="Unknown @remix-run/router error";return e===400?(c="Bad Request",a&&r&&n?d="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.":s==="defer-action"?d="defer() is not supported in actions":s==="invalid-body"&&(d="Unable to encode submission body")):e===403?(c="Forbidden",d='Route "'+n+'" does not match URL "'+r+'"'):e===404?(c="Not Found",d='No route matches URL "'+r+'"'):e===405&&(c="Method Not Allowed",a&&r&&n?d="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&&(d='Invalid request method "'+a.toUpperCase()+'"')),new dt(e||500,c,new Error(d),!0)}function Ge(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[n,a]=t[r];if(ve(a))return{key:n,result:a}}}function rr(e){let t=typeof e=="string"?ae(e):e;return oe(A({},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 on(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type===H.data||e.type===H.error)}function nr(e){return we(e.result)&&Gr.has(e.result.status)}function fe(e){return e.type===H.deferred}function Z(e){return e.type===H.error}function ve(e){return(e&&e.type)===H.redirect}function ar(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function ln(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 we(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function sn(e){if(!we(e))return!1;let t=e.status,r=e.headers.get("Location");return t>=300&&t<=399&&r!=null}function yt(e){return Xr.has(e.toLowerCase())}function re(e){return Yr.has(e.toLowerCase())}async function dn(e,t,r,n,a){let s=Object.entries(t);for(let o=0;o<s.length;o++){let[c,d]=s[o],m=e.find(S=>S?.route.id===c);if(!m)continue;let y=n.find(S=>S.route.id===m.route.id),g=y!=null&&!Wt(y,m)&&(a&&a[m.route.id])!==void 0;fe(d)&&g&&await gt(d,r,!1).then(S=>{S&&(t[c]=S)})}}async function un(e,t,r){for(let n=0;n<r.length;n++){let{key:a,routeId:s,controller:o}=r[n],c=t[a];e.find(m=>m?.route.id===s)&&fe(c)&&(z(o,"Expected an AbortController for revalidating fetcher deferred result"),await gt(c,o.signal,!0).then(m=>{m&&(t[a]=m)}))}}async function gt(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:H.data,data:e.deferredData.unwrappedData}}catch(a){return{type:H.error,error:a}}return{type:H.data,data:e.deferredData.data}}}function vt(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Se(e,t){let r=typeof t=="string"?ae(t).search:t.search;if(e[e.length-1].route.index&&vt(r||""))return e[e.length-1];let n=Ft(e);return n[n.length-1]}function ir(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:s,json:o}=e;if(!(!t||!r||!n)){if(a!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a};if(s!=null)return{formMethod:t,formAction:r,formEncType:n,formData:s,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:o,text:void 0}}}function wt(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 fn(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 Be(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 cn(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 be(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function hn(e,t){try{let r=e.sessionStorage.getItem(Ht);if(r){let n=JSON.parse(r);for(let[a,s]of Object.entries(n||{}))s&&Array.isArray(s)&&t.set(a,new Set(s||[]))}}catch{}}function pn(e,t){if(t.size>0){let r={};for(let[n,a]of t)r[n]=[...a];try{e.sessionStorage.setItem(Ht,JSON.stringify(r))}catch(n){se(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}}}]);})();
12
-
13
- //# sourceMappingURL=module-remix-run.ba6397c2.js.map