@techdocs/cli 1.6.0 → 1.6.1-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/embedded-app/.config-schema.json +52 -28
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/static/{1032.d8d4547a.chunk.js → 1032.88fa9fda.chunk.js} +2 -2
- package/dist/embedded-app/static/{1032.d8d4547a.chunk.js.map → 1032.88fa9fda.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{1105.250209d9.chunk.js → 1105.2ef0665c.chunk.js} +2 -2
- package/dist/embedded-app/static/{1105.250209d9.chunk.js.map → 1105.2ef0665c.chunk.js.map} +1 -1
- package/dist/embedded-app/static/1600.ef4a7196.chunk.js +3 -0
- package/dist/embedded-app/static/1600.ef4a7196.chunk.js.map +1 -0
- package/dist/embedded-app/static/{184.3d7fb6d2.chunk.js → 184.8fc549e9.chunk.js} +2 -2
- package/dist/embedded-app/static/{184.3d7fb6d2.chunk.js.map → 184.8fc549e9.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{2440.8c636d46.chunk.js → 2440.2451b337.chunk.js} +2 -2
- package/dist/embedded-app/static/{2440.8c636d46.chunk.js.map → 2440.2451b337.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{3487.ca0b20dd.chunk.js → 3487.1c93df49.chunk.js} +2 -2
- package/dist/embedded-app/static/{3487.ca0b20dd.chunk.js.map → 3487.1c93df49.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{3893.18294a43.chunk.js → 3893.118c937c.chunk.js} +1 -1
- package/dist/embedded-app/static/{3893.18294a43.chunk.js.map → 3893.118c937c.chunk.js.map} +1 -1
- package/dist/embedded-app/static/4109.6335d16f.chunk.js +3 -0
- package/dist/embedded-app/static/4109.6335d16f.chunk.js.map +1 -0
- package/dist/embedded-app/static/{4966.9cb67949.chunk.js → 4966.e30bae7f.chunk.js} +1 -1
- package/dist/embedded-app/static/{4966.9cb67949.chunk.js.map → 4966.e30bae7f.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{5458.e6517aa6.chunk.js → 5458.abed4572.chunk.js} +2 -2
- package/dist/embedded-app/static/{5458.e6517aa6.chunk.js.map → 5458.abed4572.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{5877.829aa767.chunk.js → 5877.c521a57f.chunk.js} +1 -1
- package/dist/embedded-app/static/{5877.829aa767.chunk.js.map → 5877.c521a57f.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{5914.92b59b3e.chunk.js → 5914.111b8c95.chunk.js} +2 -2
- package/dist/embedded-app/static/{5914.92b59b3e.chunk.js.map → 5914.111b8c95.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{6051.84051083.chunk.js → 6051.9eefea24.chunk.js} +1 -1
- package/dist/embedded-app/static/{6051.84051083.chunk.js.map → 6051.9eefea24.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{7670.4e34a90d.chunk.js → 7670.9faef6c0.chunk.js} +1 -1
- package/dist/embedded-app/static/{7670.4e34a90d.chunk.js.map → 7670.9faef6c0.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{7750.3b7f34f8.chunk.js → 7750.cb06dc85.chunk.js} +1 -1
- package/dist/embedded-app/static/{7750.3b7f34f8.chunk.js.map → 7750.cb06dc85.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{7893.8b70980c.chunk.js → 7893.e406114c.chunk.js} +2 -2
- package/dist/embedded-app/static/{7893.8b70980c.chunk.js.map → 7893.e406114c.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{8629.18b8b029.chunk.js → 8629.34b012ba.chunk.js} +1 -1
- package/dist/embedded-app/static/{8629.18b8b029.chunk.js.map → 8629.34b012ba.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{8662.e8af541f.chunk.js → 8662.7243a5c6.chunk.js} +1 -1
- package/dist/embedded-app/static/{8662.e8af541f.chunk.js.map → 8662.7243a5c6.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{8951.b8daca92.chunk.js → 8951.6ae94626.chunk.js} +1 -1
- package/dist/embedded-app/static/{8951.b8daca92.chunk.js.map → 8951.6ae94626.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{9545.1f2986d6.chunk.js → 9545.8e4a2868.chunk.js} +2 -2
- package/dist/embedded-app/static/{9545.1f2986d6.chunk.js.map → 9545.8e4a2868.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{967.00bc7a39.chunk.js → 967.dadcb6bd.chunk.js} +3 -3
- package/dist/embedded-app/static/{967.00bc7a39.chunk.js.map → 967.dadcb6bd.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{9770.5cb016d6.chunk.js → 9770.2d75fe33.chunk.js} +2 -2
- package/dist/embedded-app/static/{9770.5cb016d6.chunk.js.map → 9770.2d75fe33.chunk.js.map} +1 -1
- package/dist/embedded-app/static/main.167d1cf0.js +487 -0
- package/dist/embedded-app/static/main.167d1cf0.js.map +1 -0
- package/dist/embedded-app/static/module-lodash.fa492ce2.js +29 -0
- package/dist/embedded-app/static/module-lodash.fa492ce2.js.map +1 -0
- package/dist/embedded-app/static/{module-material-table.0f5635dd.js → module-material-table.3c68edc1.js} +1 -1
- package/dist/embedded-app/static/{module-material-table.0f5635dd.js.map → module-material-table.3c68edc1.js.map} +1 -1
- package/dist/embedded-app/static/{module-material-ui.bdbd8daa.js → module-material-ui.263ce9b5.js} +7 -7
- package/dist/embedded-app/static/module-material-ui.263ce9b5.js.map +1 -0
- package/dist/embedded-app/static/{module-react-beautiful-dnd.62627182.js → module-react-beautiful-dnd.0ca788d0.js} +1 -1
- package/dist/embedded-app/static/{module-react-beautiful-dnd.62627182.js.map → module-react-beautiful-dnd.0ca788d0.js.map} +1 -1
- package/dist/embedded-app/static/module-react-dom.f7ae1c8b.js +26 -0
- package/dist/embedded-app/static/module-react-dom.f7ae1c8b.js.map +1 -0
- package/dist/embedded-app/static/{module-react-router-dom.65ce4c09.js → module-react-router-dom.8eff32d7.js} +1 -1
- package/dist/embedded-app/static/{module-react-router-dom.65ce4c09.js.map → module-react-router-dom.8eff32d7.js.map} +1 -1
- package/dist/embedded-app/static/{module-react-router.652daaf3.js → module-react-router.05179f87.js} +1 -1
- package/dist/embedded-app/static/{module-react-router.652daaf3.js.map → module-react-router.05179f87.js.map} +1 -1
- package/dist/embedded-app/static/{runtime.02409009.js → runtime.167d1cf0.js} +2 -2
- package/dist/embedded-app/static/{runtime.02409009.js.map → runtime.167d1cf0.js.map} +1 -1
- package/dist/embedded-app/static/vendor.167d1cf0.js +167 -0
- package/dist/embedded-app/static/vendor.167d1cf0.js.map +1 -0
- package/dist/index.cjs.js +1 -1
- package/package.json +4 -4
- package/dist/embedded-app/static/1600.1ec85d5a.chunk.js +0 -3
- package/dist/embedded-app/static/1600.1ec85d5a.chunk.js.map +0 -1
- package/dist/embedded-app/static/2924.b96e10c0.chunk.js +0 -3
- package/dist/embedded-app/static/2924.b96e10c0.chunk.js.map +0 -1
- package/dist/embedded-app/static/main.02409009.js +0 -487
- package/dist/embedded-app/static/main.02409009.js.map +0 -1
- package/dist/embedded-app/static/module-lodash.adfd55fe.js +0 -29
- package/dist/embedded-app/static/module-lodash.adfd55fe.js.map +0 -1
- package/dist/embedded-app/static/module-material-ui.bdbd8daa.js.map +0 -1
- package/dist/embedded-app/static/module-react-dom.07625e59.js +0 -25
- package/dist/embedded-app/static/module-react-dom.07625e59.js.map +0 -1
- package/dist/embedded-app/static/vendor.02409009.js +0 -159
- package/dist/embedded-app/static/vendor.02409009.js.map +0 -1
package/dist/embedded-app/static/{module-react-router.652daaf3.js → module-react-router.05179f87.js}
RENAMED
|
@@ -19,4 +19,4 @@
|
|
|
19
19
|
*/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 y;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(y||(y={}));const k="popstate";function Pe(e){e===void 0&&(e={});let{initialEntries:t=["/"],initialIndex:r,v5Compat:n=!1}=e,a;a=t.map((w,x)=>E(w,typeof w=="string"?null:w.state,x===0?"default":void 0));let c=h(r==null?a.length-1:r),i=y.Pop,f=null;function h(w){return Math.min(Math.max(w,0),a.length-1)}function v(){return a[c]}function E(w,x,D){x===void 0&&(x=null);let m=ge(a?v().pathname:"/",w,x,D);return ue(m.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(w)),m}function b(w){return typeof w=="string"?w:ve(w)}return{get index(){return c},get action(){return i},get location(){return v()},createHref:b,createURL(w){return new URL(b(w),"http://localhost")},encodeLocation(w){let x=typeof w=="string"?te(w):w;return{pathname:x.pathname||"",search:x.search||"",hash:x.hash||""}},push(w,x){i=y.Push;let D=E(w,x);c+=1,a.splice(c,a.length,D),n&&f&&f({action:i,location:D,delta:1})},replace(w,x){i=y.Replace;let D=E(w,x);a[c]=D,n&&f&&f({action:i,location:D,delta:0})},go(w){i=y.Pop;let x=h(c+w),D=a[x];c=x,f&&f({action:i,location:D,delta:w})},listen(w){return f=w,()=>{f=null}}}}function tt(e){e===void 0&&(e={});function t(n,a){let{pathname:c,search:i,hash:f}=n.location;return ge("",{pathname:c,search:i,hash:f},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(n,a){return typeof a=="string"?a:ve(a)}return Ce(t,r,null,e)}function At(e){e===void 0&&(e={});function t(a,c){let{pathname:i="/",search:f="",hash:h=""}=te(a.location.hash.substr(1));return!i.startsWith("/")&&!i.startsWith(".")&&(i="/"+i),ge("",{pathname:i,search:f,hash:h},c.state&&c.state.usr||null,c.state&&c.state.key||"default")}function r(a,c){let i=a.document.querySelector("base"),f="";if(i&&i.getAttribute("href")){let h=a.location.href,v=h.indexOf("#");f=v===-1?h:h.slice(0,v)}return f+"#"+(typeof c=="string"?c:ve(c))}function n(a,c){ue(a.pathname.charAt(0)==="/","relative pathnames are not supported in hash history.push("+JSON.stringify(c)+")")}return Ce(t,r,n,e)}function z(e,t){if(e===!1||e===null||typeof e=="undefined")throw new Error(t)}function ue(e,t){if(!e){typeof console!="undefined"&&console.warn(t);try{throw new Error(t)}catch{}}}function _e(){return Math.random().toString(36).substr(2,8)}function he(e,t){return{usr:e.state,key:e.key,idx:t}}function ge(e,t,r,n){return r===void 0&&(r=null),H({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?te(t):t,{state:r,key:t&&t.key||n||_e()})}function ve(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 te(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 Ce(e,t,r,n){n===void 0&&(n={});let{window:a=document.defaultView,v5Compat:c=!1}=n,i=a.history,f=y.Pop,h=null,v=E();v==null&&(v=0,i.replaceState(H({},i.state,{idx:v}),""));function E(){return(i.state||{idx:null}).idx}function b(){f=y.Pop;let m=E(),j=m==null?null:m-v;v=m,h&&h({action:f,location:D.location,delta:j})}function C(m,j){f=y.Push;let J=ge(D.location,m,j);r&&r(J,m),v=E()+1;let B=he(J,v),l=D.createHref(J);try{i.pushState(B,"",l)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;a.location.assign(l)}c&&h&&h({action:f,location:D.location,delta:1})}function w(m,j){f=y.Replace;let J=ge(D.location,m,j);r&&r(J,m),v=E();let B=he(J,v),l=D.createHref(J);i.replaceState(B,"",l),c&&h&&h({action:f,location:D.location,delta:0})}function x(m){let j=a.location.origin!=="null"?a.location.origin:a.location.href,J=typeof m=="string"?m:ve(m);return z(j,"No window.location.(origin|href) available to create URL for href: "+J),new URL(J,j)}let D={get action(){return f},get location(){return e(a,i)},listen(m){if(h)throw new Error("A history only accepts one active listener");return a.addEventListener(k,b),h=m,()=>{a.removeEventListener(k,b),h=null}},createHref(m){return t(a,m)},createURL:x,encodeLocation(m){let j=x(m);return{pathname:j.pathname,search:j.search,hash:j.hash}},push:C,replace:w,go(m){return i.go(m)}};return D}var Z;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Z||(Z={}));const sr=new Set(["lazy","caseSensitive","path","id","index","children"]);function ur(e){return e.index===!0}function Te(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((a,c)=>{let i=[...r,c],f=typeof a.id=="string"?a.id:i.join("-");if(z(a.index!==!0||!a.children,"Cannot specify children on an index route"),z(!n[f],'Found a route id collision on id "'+f+`". Route id's must be globally unique within Data Router usages`),ur(a)){let h=H({},a,t(a),{id:f});return n[f]=h,h}else{let h=H({},a,t(a),{id:f,children:void 0});return n[f]=h,a.children&&(h.children=Te(a.children,t,i,n)),h}})}function be(e,t,r){r===void 0&&(r="/");let n=typeof t=="string"?te(t):t,a=xe(n.pathname||"/",r);if(a==null)return null;let c=rt(e);ht(c);let i=null;for(let f=0;i==null&&f<c.length;++f)i=Ve(c[f],we(a));return i}function _t(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 rt(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let a=(c,i,f)=>{let h={relativePath:f===void 0?c.path||"":f,caseSensitive:c.caseSensitive===!0,childrenIndex:i,route:c};h.relativePath.startsWith("/")&&(z(h.relativePath.startsWith(n),'Absolute route path "'+h.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),h.relativePath=h.relativePath.slice(n.length));let v=Ie([n,h.relativePath]),E=r.concat(h);c.children&&c.children.length>0&&(z(c.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+v+'".')),rt(c.children,t,E,v)),!(c.path==null&&!c.index)&&t.push({path:v,score:Nt(v,c.index),routesMeta:E})};return e.forEach((c,i)=>{var f;if(c.path===""||!((f=c.path)!=null&&f.includes("?")))a(c,i);else for(let h of Tt(c.path))a(c,i,h)}),t}function Tt(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),c=r.replace(/\?$/,"");if(n.length===0)return a?[c,""]:[c];let i=Tt(n.join("/")),f=[];return f.push(...i.map(h=>h===""?c:[c,h].join("/"))),a&&f.push(...i),f.map(h=>e.startsWith("/")&&h===""?"/":h)}function ht(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:yt(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const It=/^:\w+$/,pt=3,mt=2,gt=1,Ft=10,Bt=-2,vt=e=>e==="*";function Nt(e,t){let r=e.split("/"),n=r.length;return r.some(vt)&&(n+=Bt),t&&(n+=mt),r.filter(a=>!vt(a)).reduce((a,c)=>a+(It.test(c)?pt:c===""?gt:Ft),n)}function yt(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 Ve(e,t){let{routesMeta:r}=e,n={},a="/",c=[];for(let i=0;i<r.length;++i){let f=r[i],h=i===r.length-1,v=a==="/"?t:t.slice(a.length)||"/",E=cr({path:f.relativePath,caseSensitive:f.caseSensitive,end:h},v);if(!E)return null;Object.assign(n,E.params);let b=f.route;c.push({params:n,pathname:Ie([a,E.pathname]),pathnameBase:Wt(Ie([a,E.pathnameBase])),route:b}),E.pathnameBase!=="/"&&(a=Ie([a,E.pathnameBase]))}return c}function fe(e,t){t===void 0&&(t={});let r=e;r.endsWith("*")&&r!=="*"&&!r.endsWith("/*")&&(ue(!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),c=r.split(/\/+/).map((i,f,h)=>{if(f===h.length-1&&i==="*")return a(t["*"]);const E=i.match(/^:(\w+)(\??)$/);if(E){const[,b,C]=E;let w=t[b];return z(C==="?"||w!=null,'Missing ":'+b+'" param'),a(w)}return i.replace(/\?$/g,"")}).filter(i=>!!i);return n+c.join("/")}function cr(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=nt(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let c=a[0],i=c.replace(/(.)\/+$/,"$1"),f=a.slice(1);return{params:n.reduce((v,E,b)=>{if(E==="*"){let C=f[b]||"";i=c.slice(0,c.length-C.length).replace(/(.)\/+$/,"$1")}return v[E]=kt(f[b]||"",E),v},{}),pathname:c,pathnameBase:i,pattern:e}}function nt(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),ue(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,f)=>(n.push(f),"/([^\\/]+)"));return e.endsWith("*")?(n.push("*"),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function we(e){try{return decodeURI(e)}catch(t){return ue(!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 kt(e,t){try{return decodeURIComponent(e)}catch(r){return ue(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+r+").")),e}}function xe(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 zt(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?te(e):e;return{pathname:r?r.startsWith("/")?r:dr(r,t):t,search:Jt(n),hash:fr(a)}}function dr(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 bt(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Ht(e,t,r,n){n===void 0&&(n=!1);let a;typeof e=="string"?a=te(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 c=e===""||a.pathname==="",i=c?"/":a.pathname,f;if(n||i==null)f=r;else{let b=t.length-1;if(i.startsWith("..")){let C=i.split("/");for(;C[0]==="..";)C.shift(),b-=1;a.pathname=C.join("/")}f=b>=0?t[b]:"/"}let h=zt(a,f),v=i&&i!=="/"&&i.endsWith("/"),E=(c||i===".")&&r.endsWith("/");return!h.pathname.endsWith("/")&&(v||E)&&(h.pathname+="/"),h}function _r(e){return e===""||e.pathname===""?"/":typeof e=="string"?te(e).pathname:e.pathname}const Ie=e=>e.join("/").replace(/\/\/+/g,"/"),Wt=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Jt=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,fr=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,hr=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 Et extends Error{}class Kt{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((c,i)=>n=i),this.controller=new AbortController;let a=()=>n(new Et("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",a),this.controller.signal.addEventListener("abort",a),this.data=Object.entries(t).reduce((c,i)=>{let[f,h]=i;return Object.assign(c,{[f]:this.trackPromise(f,h)})},{}),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 Et)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 c=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:()=>c}),this.emit(!1,r),Promise.reject(c)}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(c=>{t.removeEventListener("abort",n),(c||this.done)&&a(c)})})}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]:pr(a)})},{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}}function wt(e){return e instanceof Promise&&e._tracked===!0}function pr(e){if(!wt(e))return e;if(e._error)throw e._error;return e._data}const mr=function(t,r){r===void 0&&(r={});let n=typeof r=="number"?{status:r}:r;return new Kt(t,n)},Ye=function(t,r){r===void 0&&(r=302);let n=r;typeof n=="number"?n={status:n}:typeof n.status=="undefined"&&(n.status=302);let a=new Headers(n.headers);return a.set("Location",t),new Response(null,H({},n,{headers:a}))},Tr=(e,t)=>{let r=Ye(e,t);return r.headers.set("X-Remix-Reload-Document","true"),r};class xt{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 at(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Dt=["post","put","patch","delete"],$t=new Set(Dt),Pt=["get",...Dt],ot=new Set(Pt),Vt=new Set([301,302,303,307,308]),gr=new Set([307,308]),ce={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Yt={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Fe={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Ct=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Be=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)});function Ir(e){const t=e.window?e.window:typeof window!="undefined"?window:void 0,r=typeof t!="undefined"&&typeof t.document!="undefined"&&typeof t.document.createElement!="undefined",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 u=e.detectErrorBoundary;a=d=>({hasErrorBoundary:u(d)})}else a=Be;let c={},i=Te(e.routes,a,void 0,c),f,h=e.basename||"/",v=H({v7_normalizeFormMethod:!1,v7_prependBasename:!1},e.future),E=null,b=new Set,C=null,w=null,x=null,D=e.hydrationData!=null,m=be(i,e.history.location,h),j=null;if(m==null){let u=q(404,{pathname:e.history.location.pathname}),{matches:d,route:g}=St(i);m=d,j={[g.id]:u}}let J=!m.some(u=>u.route.lazy)&&(!m.some(u=>u.route.loader)||e.hydrationData!=null),B,l={historyAction:e.history.action,location:e.history.location,matches:m,initialized:J,navigation:ce,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||j,fetchers:new Map,blockers:new Map},N=y.Pop,re=!1,F,me=!1,Re=!1,De=[],Ge=[],ne=new Map,Lt=0,st=-1,qe=new Map,Se=new Set,et=new Map,ze=new Map,He=new Map,qt=!1;function Jr(){return E=e.history.listen(u=>{let{action:d,location:g,delta:S}=u;if(qt){qt=!1;return}ue(He.size===0||S!=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 T=Mr({currentLocation:l.location,nextLocation:g,historyAction:d});if(T&&S!=null){qt=!0,e.history.go(S*-1),Ut(T,{state:"blocked",location:g,proceed(){Ut(T,{state:"proceeding",proceed:void 0,reset:void 0,location:g}),e.history.go(S)},reset(){let A=new Map(l.blockers);A.set(T,Fe),le({blockers:A})}});return}return We(d,g)}),l.initialized||We(y.Pop,l.location),B}function Kr(){E&&E(),b.clear(),F&&F.abort(),l.fetchers.forEach((u,d)=>tr(d)),l.blockers.forEach((u,d)=>Lr(d))}function $r(u){return b.add(u),()=>b.delete(u)}function le(u){l=H({},l,u),b.forEach(d=>d(l))}function ut(u,d){var g,S;let T=l.actionData!=null&&l.navigation.formMethod!=null&&ye(l.navigation.formMethod)&&l.navigation.state==="loading"&&((g=u.state)==null?void 0:g._isRedirect)!==!0,A;d.actionData?Object.keys(d.actionData).length>0?A=d.actionData:A=null:T?A=l.actionData:A=null;let I=d.loaderData?Qe(l.loaderData,d.loaderData,d.matches||[],d.errors):l.loaderData,U=l.blockers;U.size>0&&(U=new Map(U),U.forEach((G,de)=>U.set(de,Fe)));let M=re===!0||l.navigation.formMethod!=null&&ye(l.navigation.formMethod)&&((S=u.state)==null?void 0:S._isRedirect)!==!0;f&&(i=f,f=void 0),me||N===y.Pop||(N===y.Push?e.history.push(u,u.state):N===y.Replace&&e.history.replace(u,u.state)),le(H({},d,{actionData:A,loaderData:I,historyAction:N,location:u,initialized:!0,navigation:ce,revalidation:"idle",restoreScrollPosition:Or(u,d.matches||l.matches),preventScrollReset:M,blockers:U})),N=y.Pop,re=!1,me=!1,Re=!1,De=[],Ge=[]}async function wr(u,d){if(typeof u=="number"){e.history.go(u);return}let g=p(l.location,l.matches,h,v.v7_prependBasename,u,d==null?void 0:d.fromRouteId,d==null?void 0:d.relative),{path:S,submission:T,error:A}=R(v.v7_normalizeFormMethod,!1,g,d),I=l.location,U=ge(l.location,S,d&&d.state);U=H({},U,e.history.encodeLocation(U));let M=d&&d.replace!=null?d.replace:void 0,G=y.Push;M===!0?G=y.Replace:M===!1||T!=null&&ye(T.formMethod)&&T.formAction===l.location.pathname+l.location.search&&(G=y.Replace);let de=d&&"preventScrollReset"in d?d.preventScrollReset===!0:void 0,K=Mr({currentLocation:I,nextLocation:U,historyAction:G});if(K){Ut(K,{state:"blocked",location:U,proceed(){Ut(K,{state:"proceeding",proceed:void 0,reset:void 0,location:U}),wr(u,d)},reset(){let X=new Map(l.blockers);X.set(K,Fe),le({blockers:X})}});return}return await We(G,U,{submission:T,pendingError:A,preventScrollReset:de,replace:d&&d.replace})}function Vr(){if(er(),le({revalidation:"loading"}),l.navigation.state!=="submitting"){if(l.navigation.state==="idle"){We(l.historyAction,l.location,{startUninterruptedRevalidation:!0});return}We(N||l.historyAction,l.navigation.location,{overrideNavigation:l.navigation})}}async function We(u,d,g){F&&F.abort(),F=null,N=u,me=(g&&g.startUninterruptedRevalidation)===!0,tn(l.location,l.matches),re=(g&&g.preventScrollReset)===!0;let S=f||i,T=g&&g.overrideNavigation,A=be(S,d,h);if(!A){let X=q(404,{pathname:d.pathname}),{matches:ee,route:Je}=St(S);rr(),ut(d,{matches:ee,loaderData:{},errors:{[Je.id]:X}});return}if(l.initialized&&!Re&&Br(l.location,d)&&!(g&&g.submission&&ye(g.submission.formMethod))){ut(d,{matches:A});return}F=new AbortController;let I=Y(e.history,d,F.signal,g&&g.submission),U,M;if(g&&g.pendingError)M={[ie(A).route.id]:g.pendingError};else if(g&&g.submission&&ye(g.submission.formMethod)){let X=await Yr(I,d,g.submission,A,{replace:g.replace});if(X.shortCircuited)return;U=X.pendingActionData,M=X.pendingActionError,T=Gt(d,g.submission),I=new Request(I.url,{signal:I.signal})}let{shortCircuited:G,loaderData:de,errors:K}=await Qr(I,d,A,T,g&&g.submission,g&&g.fetcherSubmission,g&&g.replace,U,M);G||(F=null,ut(d,H({matches:A},U?{actionData:U}:{},{loaderData:de,errors:K})))}async function Yr(u,d,g,S,T){T===void 0&&(T={}),er();let A=Hr(d,g);le({navigation:A});let I,U=it(S,d);if(!U.route.action&&!U.route.lazy)I={type:Z.error,error:q(405,{method:u.method,pathname:d.pathname,routeId:U.route.id})};else if(I=await V("action",u,U,S,c,a,h),u.signal.aborted)return{shortCircuited:!0};if(ke(I)){let M;return T&&T.replace!=null?M=T.replace:M=I.location===l.location.pathname+l.location.search,await ct(l,I,{submission:g,replace:M}),{shortCircuited:!0}}if(Ne(I)){let M=ie(S,U.route.id);return(T&&T.replace)!==!0&&(N=y.Push),{pendingActionData:{},pendingActionError:{[M.route.id]:I.error}}}if(Oe(I))throw q(400,{type:"defer-action"});return{pendingActionData:{[U.route.id]:I.data}}}async function Qr(u,d,g,S,T,A,I,U,M){let G=S||Gt(d,T),de=T||A||Er(G),K=f||i,[X,ee]=L(e.history,l,g,de,d,Re,De,Ge,et,Se,K,h,U,M);if(rr(Q=>!(g&&g.some(Ee=>Ee.route.id===Q))||X&&X.some(Ee=>Ee.route.id===Q)),st=++Lt,X.length===0&&ee.length===0){let Q=Cr();return ut(d,H({matches:g,loaderData:{},errors:M||null},U?{actionData:U}:{},Q?{fetchers:new Map(l.fetchers)}:{})),{shortCircuited:!0}}if(!me){ee.forEach(Ee=>{let Ae=l.fetchers.get(Ee.key),lr=lt(void 0,Ae?Ae.data:void 0);l.fetchers.set(Ee.key,lr)});let Q=U||l.actionData;le(H({navigation:G},Q?Object.keys(Q).length===0?{actionData:null}:{actionData:Q}:{},ee.length>0?{fetchers:new Map(l.fetchers)}:{}))}ee.forEach(Q=>{ne.has(Q.key)&&je(Q.key),Q.controller&&ne.set(Q.key,Q.controller)});let Je=()=>ee.forEach(Q=>je(Q.key));F&&F.signal.addEventListener("abort",Je);let{results:Ke,loaderResults:dt,fetcherResults:nr}=await Dr(l.matches,g,X,ee,u);if(u.signal.aborted)return{shortCircuited:!0};F&&F.signal.removeEventListener("abort",Je),ee.forEach(Q=>ne.delete(Q.key));let Le=vr(Ke);if(Le){if(Le.idx>=X.length){let Q=ee[Le.idx-X.length].key;Se.add(Q)}return await ct(l,Le.result,{replace:I}),{shortCircuited:!0}}let{loaderData:Me,errors:Ot}=Ue(l,g,X,dt,M,ee,nr,ze);ze.forEach((Q,Ee)=>{Q.subscribe(Ae=>{(Ae||Q.done)&&ze.delete(Ee)})});let ar=Cr(),or=Sr(st),ir=ar||or||ee.length>0;return H({loaderData:Me,errors:Ot},ir?{fetchers:new Map(l.fetchers)}:{})}function xr(u){return l.fetchers.get(u)||Yt}function Zr(u,d,g,S){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.");ne.has(u)&&je(u);let T=f||i,A=p(l.location,l.matches,h,v.v7_prependBasename,g,d,S==null?void 0:S.relative),I=be(T,A,h);if(!I){Mt(u,d,q(404,{pathname:A}));return}let{path:U,submission:M,error:G}=R(v.v7_normalizeFormMethod,!0,A,S);if(G){Mt(u,d,G);return}let de=it(I,U);if(re=(S&&S.preventScrollReset)===!0,M&&ye(M.formMethod)){Xr(u,d,U,de,I,M);return}et.set(u,{routeId:d,path:U}),Gr(u,d,U,de,I,M)}async function Xr(u,d,g,S,T,A){if(er(),et.delete(u),!S.route.action&&!S.route.lazy){let oe=q(405,{method:A.formMethod,pathname:g,routeId:d});Mt(u,d,oe);return}let I=l.fetchers.get(u),U=Wr(A,I);l.fetchers.set(u,U),le({fetchers:new Map(l.fetchers)});let M=new AbortController,G=Y(e.history,g,M.signal,A);ne.set(u,M);let de=Lt,K=await V("action",G,S,T,c,a,h);if(G.signal.aborted){ne.get(u)===M&&ne.delete(u);return}if(ke(K))if(ne.delete(u),st>de){let oe=Xe(void 0);l.fetchers.set(u,oe),le({fetchers:new Map(l.fetchers)});return}else{Se.add(u);let oe=lt(A);return l.fetchers.set(u,oe),le({fetchers:new Map(l.fetchers)}),ct(l,K,{fetcherSubmission:A})}if(Ne(K)){Mt(u,d,K.error);return}if(Oe(K))throw q(400,{type:"defer-action"});let X=l.navigation.location||l.location,ee=Y(e.history,X,M.signal),Je=f||i,Ke=l.navigation.state!=="idle"?be(Je,l.navigation.location,h):l.matches;z(Ke,"Didn't find any matches after fetcher action");let dt=++Lt;qe.set(u,dt);let nr=lt(A,K.data);l.fetchers.set(u,nr);let[Le,Me]=L(e.history,l,Ke,A,X,Re,De,Ge,et,Se,Je,h,{[S.route.id]:K.data},void 0);Me.filter(oe=>oe.key!==u).forEach(oe=>{let ft=oe.key,jr=l.fetchers.get(ft),nn=lt(void 0,jr?jr.data:void 0);l.fetchers.set(ft,nn),ne.has(ft)&&je(ft),oe.controller&&ne.set(ft,oe.controller)}),le({fetchers:new Map(l.fetchers)});let Ot=()=>Me.forEach(oe=>je(oe.key));M.signal.addEventListener("abort",Ot);let{results:ar,loaderResults:or,fetcherResults:ir}=await Dr(l.matches,Ke,Le,Me,ee);if(M.signal.aborted)return;M.signal.removeEventListener("abort",Ot),qe.delete(u),ne.delete(u),Me.forEach(oe=>ne.delete(oe.key));let Q=vr(ar);if(Q){if(Q.idx>=Le.length){let oe=Me[Q.idx-Le.length].key;Se.add(oe)}return ct(l,Q.result)}let{loaderData:Ee,errors:Ae}=Ue(l,l.matches,Le,or,void 0,Me,ir,ze);if(l.fetchers.has(u)){let oe=Xe(K.data);l.fetchers.set(u,oe)}let lr=Sr(dt);l.navigation.state==="loading"&&dt>st?(z(N,"Expected pending action"),F&&F.abort(),ut(l.navigation.location,{matches:Ke,loaderData:Ee,errors:Ae,fetchers:new Map(l.fetchers)})):(le(H({errors:Ae,loaderData:Qe(l.loaderData,Ee,Ke,Ae)},lr||Me.length>0?{fetchers:new Map(l.fetchers)}:{})),Re=!1)}async function Gr(u,d,g,S,T,A){let I=l.fetchers.get(u),U=lt(A,I?I.data:void 0);l.fetchers.set(u,U),le({fetchers:new Map(l.fetchers)});let M=new AbortController,G=Y(e.history,g,M.signal);ne.set(u,M);let de=Lt,K=await V("loader",G,S,T,c,a,h);if(Oe(K)&&(K=await br(K,G.signal,!0)||K),ne.get(u)===M&&ne.delete(u),G.signal.aborted)return;if(ke(K))if(st>de){let ee=Xe(void 0);l.fetchers.set(u,ee),le({fetchers:new Map(l.fetchers)});return}else{Se.add(u),await ct(l,K);return}if(Ne(K)){let ee=ie(l.matches,d);l.fetchers.delete(u),le({fetchers:new Map(l.fetchers),errors:{[ee.route.id]:K.error}});return}z(!Oe(K),"Unhandled fetcher deferred data");let X=Xe(K.data);l.fetchers.set(u,X),le({fetchers:new Map(l.fetchers)})}async function ct(u,d,g){let{submission:S,fetcherSubmission:T,replace:A}=g===void 0?{}:g;d.revalidate&&(Re=!0);let I=ge(u.location,d.location,{_isRedirect:!0});if(z(I,"Expected a location on the redirect navigation"),r){let X=!1;if(d.reloadDocument)X=!0;else if(Ct.test(d.location)){const ee=e.history.createURL(d.location);X=ee.origin!==t.location.origin||xe(ee.pathname,h)==null}if(X){A?t.location.replace(d.location):t.location.assign(d.location);return}}F=null;let U=A===!0?y.Replace:y.Push,{formMethod:M,formAction:G,formEncType:de}=u.navigation;!S&&!T&&M&&G&&de&&(S=Er(u.navigation));let K=S||T;if(gr.has(d.status)&&K&&ye(K.formMethod))await We(U,I,{submission:H({},K,{formAction:d.location}),preventScrollReset:re});else{let X=Gt(I,S);await We(U,I,{overrideNavigation:X,fetcherSubmission:T,preventScrollReset:re})}}async function Dr(u,d,g,S,T){let A=await Promise.all([...g.map(M=>V("loader",T,M,d,c,a,h)),...S.map(M=>M.matches&&M.match&&M.controller?V("loader",Y(e.history,M.path,M.controller.signal),M.match,M.matches,c,a,h):{type:Z.error,error:q(404,{pathname:M.path})})]),I=A.slice(0,g.length),U=A.slice(g.length);return await Promise.all([Rr(u,g,I,I.map(()=>T.signal),!1,l.loaderData),Rr(u,S.map(M=>M.match),U,S.map(M=>M.controller?M.controller.signal:null),!0)]),{results:A,loaderResults:I,fetcherResults:U}}function er(){Re=!0,De.push(...rr()),et.forEach((u,d)=>{ne.has(d)&&(Ge.push(d),je(d))})}function Mt(u,d,g){let S=ie(l.matches,d);tr(u),le({errors:{[S.route.id]:g},fetchers:new Map(l.fetchers)})}function tr(u){let d=l.fetchers.get(u);ne.has(u)&&!(d&&d.state==="loading"&&qe.has(u))&&je(u),et.delete(u),qe.delete(u),Se.delete(u),l.fetchers.delete(u)}function je(u){let d=ne.get(u);z(d,"Expected fetch controller: "+u),d.abort(),ne.delete(u)}function Pr(u){for(let d of u){let g=xr(d),S=Xe(g.data);l.fetchers.set(d,S)}}function Cr(){let u=[],d=!1;for(let g of Se){let S=l.fetchers.get(g);z(S,"Expected fetcher: "+g),S.state==="loading"&&(Se.delete(g),u.push(g),d=!0)}return Pr(u),d}function Sr(u){let d=[];for(let[g,S]of qe)if(S<u){let T=l.fetchers.get(g);z(T,"Expected fetcher: "+g),T.state==="loading"&&(je(g),qe.delete(g),d.push(g))}return Pr(d),d.length>0}function qr(u,d){let g=l.blockers.get(u)||Fe;return He.get(u)!==d&&He.set(u,d),g}function Lr(u){l.blockers.delete(u),He.delete(u)}function Ut(u,d){let g=l.blockers.get(u)||Fe;z(g.state==="unblocked"&&d.state==="blocked"||g.state==="blocked"&&d.state==="blocked"||g.state==="blocked"&&d.state==="proceeding"||g.state==="blocked"&&d.state==="unblocked"||g.state==="proceeding"&&d.state==="unblocked","Invalid blocker state transition: "+g.state+" -> "+d.state);let S=new Map(l.blockers);S.set(u,d),le({blockers:S})}function Mr(u){let{currentLocation:d,nextLocation:g,historyAction:S}=u;if(He.size===0)return;He.size>1&&ue(!1,"A router only supports one blocker at a time");let T=Array.from(He.entries()),[A,I]=T[T.length-1],U=l.blockers.get(A);if(!(U&&U.state==="proceeding")&&I({currentLocation:d,nextLocation:g,historyAction:S}))return A}function rr(u){let d=[];return ze.forEach((g,S)=>{(!u||u(S))&&(g.cancel(),d.push(S),ze.delete(S))}),d}function en(u,d,g){if(C=u,x=d,w=g||null,!D&&l.navigation===ce){D=!0;let S=Or(l.location,l.matches);S!=null&&le({restoreScrollPosition:S})}return()=>{C=null,x=null,w=null}}function Ur(u,d){return w&&w(u,d.map(S=>_t(S,l.loaderData)))||u.key}function tn(u,d){if(C&&x){let g=Ur(u,d);C[g]=x()}}function Or(u,d){if(C){let g=Ur(u,d),S=C[g];if(typeof S=="number")return S}return null}function rn(u){c={},f=Te(u,a,void 0,c)}return B={get basename(){return h},get state(){return l},get routes(){return i},initialize:Jr,subscribe:$r,enableScrollRestoration:en,navigate:wr,fetch:Zr,revalidate:Vr,createHref:u=>e.history.createHref(u),encodeLocation:u=>e.history.encodeLocation(u),getFetcher:xr,deleteFetcher:tr,dispose:Kr,getBlocker:qr,deleteBlocker:Lr,_internalFetchControllers:ne,_internalActiveDeferreds:ze,_internalSetRoutes:rn},B}const Qt=Symbol("deferred");function Fr(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 b=t.detectErrorBoundary;a=C=>({hasErrorBoundary:b(C)})}else a=Be;let c=Te(e,a,void 0,r);async function i(b,C){let{requestContext:w}=C===void 0?{}:C,x=new URL(b.url),D=b.method,m=ge("",ve(x),null,"default"),j=be(c,m,n);if(!Zt(D)&&D!=="HEAD"){let B=q(405,{method:D}),{matches:l,route:N}=St(c);return{basename:n,location:m,matches:l,loaderData:{},actionData:null,errors:{[N.id]:B},statusCode:B.status,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}else if(!j){let B=q(404,{pathname:m.pathname}),{matches:l,route:N}=St(c);return{basename:n,location:m,matches:l,loaderData:{},actionData:null,errors:{[N.id]:B},statusCode:B.status,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}let J=await h(b,m,j,w);return Ze(J)?J:H({location:m,basename:n},J)}async function f(b,C){let{routeId:w,requestContext:x}=C===void 0?{}:C,D=new URL(b.url),m=b.method,j=ge("",ve(D),null,"default"),J=be(c,j,n);if(!Zt(m)&&m!=="HEAD"&&m!=="OPTIONS")throw q(405,{method:m});if(!J)throw q(404,{pathname:j.pathname});let B=w?J.find(F=>F.route.id===w):it(J,j);if(w&&!B)throw q(403,{pathname:j.pathname,routeId:w});if(!B)throw q(404,{pathname:j.pathname});let l=await h(b,j,J,x,B);if(Ze(l))return l;let N=l.errors?Object.values(l.errors)[0]:void 0;if(N!==void 0)throw N;if(l.actionData)return Object.values(l.actionData)[0];if(l.loaderData){var re;let F=Object.values(l.loaderData)[0];return(re=l.activeDeferreds)!=null&&re[B.route.id]&&(F[Qt]=l.activeDeferreds[B.route.id]),F}}async function h(b,C,w,x,D){z(b.signal,"query()/queryRoute() requests must contain an AbortController signal");try{if(ye(b.method.toLowerCase()))return await v(b,w,D||it(w,C),x,D!=null);let m=await E(b,w,x,D);return Ze(m)?m:H({},m,{actionData:null,actionHeaders:{}})}catch(m){if(zr(m)){if(m.type===Z.error)throw m.response;return m.response}if(kr(m))return m;throw m}}async function v(b,C,w,x,D){let m;if(!w.route.action&&!w.route.lazy){let B=q(405,{method:b.method,pathname:new URL(b.url).pathname,routeId:w.route.id});if(D)throw B;m={type:Z.error,error:B}}else if(m=await V("action",b,w,C,r,a,n,{isStaticRequest:!0,isRouteRequest:D,requestContext:x}),b.signal.aborted){let B=D?"queryRoute":"query";throw new Error(B+"() call aborted: "+b.method+" "+b.url)}if(ke(m))throw new Response(null,{status:m.status,headers:{Location:m.location}});if(Oe(m)){let B=q(400,{type:"defer-action"});if(D)throw B;m={type:Z.error,error:B}}if(D){if(Ne(m))throw m.error;return{matches:[w],loaderData:{},actionData:{[w.route.id]:m.data},errors:null,statusCode:200,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}if(Ne(m)){let B=ie(C,w.route.id),l=await E(b,C,x,void 0,{[B.route.id]:m.error});return H({},l,{statusCode:at(m.error)?m.error.status:500,actionData:null,actionHeaders:H({},m.headers?{[w.route.id]:m.headers}:{})})}let j=new Request(b.url,{headers:b.headers,redirect:b.redirect,signal:b.signal}),J=await E(j,C,x);return H({},J,m.statusCode?{statusCode:m.statusCode}:{},{actionData:{[w.route.id]:m.data},actionHeaders:H({},m.headers?{[w.route.id]:m.headers}:{})})}async function E(b,C,w,x,D){let m=x!=null;if(m&&!(x!=null&&x.route.loader)&&!(x!=null&&x.route.lazy))throw q(400,{method:b.method,pathname:new URL(b.url).pathname,routeId:x==null?void 0:x.route.id});let J=(x?[x]:P(C,Object.keys(D||{})[0])).filter(F=>F.route.loader||F.route.lazy);if(J.length===0)return{matches:C,loaderData:C.reduce((F,me)=>Object.assign(F,{[me.route.id]:null}),{}),errors:D||null,statusCode:200,loaderHeaders:{},activeDeferreds:null};let B=await Promise.all([...J.map(F=>V("loader",b,F,C,r,a,n,{isStaticRequest:!0,isRouteRequest:m,requestContext:w}))]);if(b.signal.aborted){let F=m?"queryRoute":"query";throw new Error(F+"() call aborted: "+b.method+" "+b.url)}let l=new Map,N=pe(C,J,B,D,l),re=new Set(J.map(F=>F.route.id));return C.forEach(F=>{re.has(F.route.id)||(N.loaderData[F.route.id]=null)}),H({},N,{matches:C,activeDeferreds:l.size>0?Object.fromEntries(l.entries()):null})}return{dataRoutes:c,query:i,queryRoute:f}}function o(e,t,r){return H({},t,{statusCode:500,errors:{[t._deepestRenderedBoundaryId||e[0].id]:r}})}function s(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function p(e,t,r,n,a,c,i){let f,h;if(c!=null&&i!=="path"){f=[];for(let E of t)if(f.push(E),E.route.id===c){h=E;break}}else f=t,h=t[t.length-1];let v=Ht(a||".",bt(f).map(E=>E.pathnameBase),xe(e.pathname,r)||e.pathname,i==="path");return a==null&&(v.search=e.search,v.hash=e.hash),(a==null||a===""||a===".")&&h&&h.route.index&&!Xt(v.search)&&(v.search=v.search?v.search.replace(/^\?/,"?index&"):"?index"),n&&r!=="/"&&(v.pathname=v.pathname==="/"?r:Ie([r,v.pathname])),ve(v)}function R(e,t,r,n){if(!n||!s(n))return{path:r};if(n.formMethod&&!Zt(n.formMethod))return{path:r,error:q(405,{method:n.formMethod})};let a=()=>({path:r,error:q(400,{type:"invalid-body"})}),c=n.formMethod||"get",i=e?c.toUpperCase():c.toLowerCase(),f=yr(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!ye(i))return a();let C=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((w,x)=>{let[D,m]=x;return""+w+D+"="+m+`
|
|
20
20
|
`},""):String(n.body);return{path:r,submission:{formMethod:i,formAction:f,formEncType:n.formEncType,formData:void 0,json:void 0,text:C}}}else if(n.formEncType==="application/json"){if(!ye(i))return a();try{let C=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:i,formAction:f,formEncType:n.formEncType,formData:void 0,json:C,text:void 0}}}catch{return a()}}}z(typeof FormData=="function","FormData is not available in this environment");let h,v;if(n.formData)h=ae(n.formData),v=n.formData;else if(n.body instanceof FormData)h=ae(n.body),v=n.body;else if(n.body instanceof URLSearchParams)h=n.body,v=se(h);else if(n.body==null)h=new URLSearchParams,v=new FormData;else try{h=new URLSearchParams(n.body),v=se(h)}catch{return a()}let E={formMethod:i,formAction:f,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:v,json:void 0,text:void 0};if(ye(E.formMethod))return{path:r,submission:E};let b=te(r);return t&&b.search&&Xt(b.search)&&h.append("index",""),b.search="?"+h,{path:ve(b),submission:E}}function P(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 L(e,t,r,n,a,c,i,f,h,v,E,b,C,w){let x=w?Object.values(w)[0]:C?Object.values(C)[0]:void 0,D=e.createURL(t.location),m=e.createURL(a),j=w?Object.keys(w)[0]:void 0,B=P(r,j).filter((N,re)=>{if(N.route.lazy)return!0;if(N.route.loader==null)return!1;if(_(t.loaderData,t.matches[re],N)||i.some(Re=>Re===N.route.id))return!0;let F=t.matches[re],me=N;return O(N,H({currentUrl:D,currentParams:F.params,nextUrl:m,nextParams:me.params},n,{actionResult:x,defaultShouldRevalidate:c||D.pathname+D.search===m.pathname+m.search||D.search!==m.search||W(F,me)}))}),l=[];return h.forEach((N,re)=>{if(!r.some(Ge=>Ge.route.id===N.routeId))return;let F=be(E,N.path,b);if(!F){l.push({key:re,routeId:N.routeId,path:N.path,matches:null,match:null,controller:null});return}let me=t.fetchers.get(re),Re=it(F,N.path),De=!1;v.has(re)?De=!1:f.includes(re)?De=!0:me&&me.state!=="idle"&&me.data===void 0?De=c:De=O(Re,H({currentUrl:D,currentParams:t.matches[t.matches.length-1].params,nextUrl:m,nextParams:r[r.length-1].params},n,{actionResult:x,defaultShouldRevalidate:c})),De&&l.push({key:re,routeId:N.routeId,path:N.path,matches:F,match:Re,controller:new AbortController})}),[B,l]}function _(e,t,r){let n=!t||r.route.id!==t.route.id,a=e[r.route.id]===void 0;return n||a}function W(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function O(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}async function $(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 c={};for(let i in n){let h=a[i]!==void 0&&i!=="hasErrorBoundary";ue(!h,'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.')),!h&&!sr.has(i)&&(c[i]=n[i])}Object.assign(a,c),Object.assign(a,H({},t(a),{lazy:void 0}))}async function V(e,t,r,n,a,c,i,f){f===void 0&&(f={});let h,v,E,b=x=>{let D,m=new Promise((j,J)=>D=J);return E=()=>D(),t.signal.addEventListener("abort",E),Promise.race([x({request:t,params:r.params,context:f.requestContext}),m])};try{let x=r.route[e];if(r.route.lazy)if(x){let D,m=await Promise.all([b(x).catch(j=>{D=j}),$(r.route,c,a)]);if(D)throw D;v=m[0]}else if(await $(r.route,c,a),x=r.route[e],x)v=await b(x);else if(e==="action"){let D=new URL(t.url),m=D.pathname+D.search;throw q(405,{method:t.method,pathname:m,routeId:r.route.id})}else return{type:Z.data,data:void 0};else if(x)v=await b(x);else{let D=new URL(t.url),m=D.pathname+D.search;throw q(404,{pathname:m})}z(v!==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(x){h=Z.error,v=x}finally{E&&t.signal.removeEventListener("abort",E)}if(Ze(v)){let x=v.status;if(Vt.has(x)){let j=v.headers.get("Location");if(z(j,"Redirects returned/thrown from loaders/actions must have a Location header"),!Ct.test(j))j=p(new URL(t.url),n.slice(0,n.indexOf(r)+1),i,!0,j);else if(!f.isStaticRequest){let J=new URL(t.url),B=j.startsWith("//")?new URL(J.protocol+j):new URL(j),l=xe(B.pathname,i)!=null;B.origin===J.origin&&l&&(j=B.pathname+B.search+B.hash)}if(f.isStaticRequest)throw v.headers.set("Location",j),v;return{type:Z.redirect,status:x,location:j,revalidate:v.headers.get("X-Remix-Revalidate")!==null,reloadDocument:v.headers.get("X-Remix-Reload-Document")!==null}}if(f.isRouteRequest)throw{type:h===Z.error?Z.error:Z.data,response:v};let D,m=v.headers.get("Content-Type");return m&&/\bapplication\/json\b/.test(m)?D=await v.json():D=await v.text(),h===Z.error?{type:h,error:new xt(x,v.statusText,D),headers:v.headers}:{type:Z.data,data:D,statusCode:v.status,headers:v.headers}}if(h===Z.error)return{type:h,error:v};if(Nr(v)){var C,w;return{type:Z.deferred,deferredData:v,statusCode:(C=v.init)==null?void 0:C.status,headers:((w=v.init)==null?void 0:w.headers)&&new Headers(v.init.headers)}}return{type:Z.data,data:v}}function Y(e,t,r,n){let a=e.createURL(yr(t)).toString(),c={signal:r};if(n&&ye(n.formMethod)){let{formMethod:i,formEncType:f}=n;c.method=i.toUpperCase(),f==="application/json"?(c.headers=new Headers({"Content-Type":f}),c.body=JSON.stringify(n.json)):f==="text/plain"?c.body=n.text:f==="application/x-www-form-urlencoded"&&n.formData?c.body=ae(n.formData):c.body=n.formData}return new Request(a,c)}function ae(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function se(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function pe(e,t,r,n,a){let c={},i=null,f,h=!1,v={};return r.forEach((E,b)=>{let C=t[b].route.id;if(z(!ke(E),"Cannot handle redirect results in processLoaderData"),Ne(E)){let w=ie(e,C),x=E.error;n&&(x=Object.values(n)[0],n=void 0),i=i||{},i[w.route.id]==null&&(i[w.route.id]=x),c[C]=void 0,h||(h=!0,f=at(E.error)?E.error.status:500),E.headers&&(v[C]=E.headers)}else Oe(E)?(a.set(C,E.deferredData),c[C]=E.deferredData.data):c[C]=E.data,E.statusCode!=null&&E.statusCode!==200&&!h&&(f=E.statusCode),E.headers&&(v[C]=E.headers)}),n&&(i=n,c[Object.keys(n)[0]]=void 0),{loaderData:c,errors:i,statusCode:f||200,loaderHeaders:v}}function Ue(e,t,r,n,a,c,i,f){let{loaderData:h,errors:v}=pe(t,r,n,a,f);for(let E=0;E<c.length;E++){let{key:b,match:C,controller:w}=c[E];z(i!==void 0&&i[E]!==void 0,"Did not find corresponding fetcher result");let x=i[E];if(!(w&&w.signal.aborted))if(Ne(x)){let D=ie(e.matches,C==null?void 0:C.route.id);v&&v[D.route.id]||(v=H({},v,{[D.route.id]:x.error})),e.fetchers.delete(b)}else if(ke(x))z(!1,"Unhandled fetcher revalidation redirect");else if(Oe(x))z(!1,"Unhandled fetcher deferred data");else{let D=Xe(x.data);e.fetchers.set(b,D)}}return{loaderData:h,errors:v}}function Qe(e,t,r,n){let a=H({},t);for(let c of r){let i=c.route.id;if(t.hasOwnProperty(i)?t[i]!==void 0&&(a[i]=t[i]):e[i]!==void 0&&c.route.loader&&(a[i]=e[i]),n&&n.hasOwnProperty(i))break}return a}function ie(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 St(e){let t=e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function q(e,t){let{pathname:r,routeId:n,method:a,type:c}=t===void 0?{}:t,i="Unknown Server Error",f="Unknown @remix-run/router error";return e===400?(i="Bad Request",a&&r&&n?f="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.":c==="defer-action"?f="defer() is not supported in actions":c==="invalid-body"&&(f="Unable to encode submission body")):e===403?(i="Forbidden",f='Route "'+n+'" does not match URL "'+r+'"'):e===404?(i="Not Found",f='No route matches URL "'+r+'"'):e===405&&(i="Method Not Allowed",a&&r&&n?f="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&&(f='Invalid request method "'+a.toUpperCase()+'"')),new xt(e||500,i,new Error(f),!0)}function vr(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(ke(r))return{result:r,idx:t}}}function yr(e){let t=typeof e=="string"?te(e):e;return ve(H({},t,{hash:""}))}function Br(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Oe(e){return e.type===Z.deferred}function Ne(e){return e.type===Z.error}function ke(e){return(e&&e.type)===Z.redirect}function Nr(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 Ze(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body!="undefined"}function kr(e){if(!Ze(e))return!1;let t=e.status,r=e.headers.get("Location");return t>=300&&t<=399&&r!=null}function zr(e){return e&&Ze(e.response)&&(e.type===Z.data||e.type===Z.error)}function Zt(e){return ot.has(e.toLowerCase())}function ye(e){return $t.has(e.toLowerCase())}async function Rr(e,t,r,n,a,c){for(let i=0;i<r.length;i++){let f=r[i],h=t[i];if(!h)continue;let v=e.find(b=>b.route.id===h.route.id),E=v!=null&&!W(v,h)&&(c&&c[h.route.id])!==void 0;if(Oe(f)&&(a||E)){let b=n[i];z(b,"Expected an AbortSignal for revalidating fetcher deferred result"),await br(f,b,a).then(C=>{C&&(r[i]=C||r[i])})}}}async function br(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:Z.data,data:e.deferredData.unwrappedData}}catch(a){return{type:Z.error,error:a}}return{type:Z.data,data:e.deferredData.data}}}function Xt(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function it(e,t){let r=typeof t=="string"?te(t).search:t.search;if(e[e.length-1].route.index&&Xt(r||""))return e[e.length-1];let n=bt(e);return n[n.length-1]}function Er(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:c,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(c!=null)return{formMethod:t,formAction:r,formEncType:n,formData:c,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 Gt(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 Hr(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 lt(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 Wr(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 Xe(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}}}]);})();
|
|
21
21
|
|
|
22
|
-
//# sourceMappingURL=module-react-router.
|
|
22
|
+
//# sourceMappingURL=module-react-router.05179f87.js.map
|