git-truck 0.0.0-e0af6ee → 0.0.0-e38ce35

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 (38) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +98 -98
  3. package/build/index.js +316 -389
  4. package/build/metafile.js.json +1 -1
  5. package/build/metafile.server.json +1 -1
  6. package/build/version.txt +1 -1
  7. package/cli.js +283 -82
  8. package/package.json +166 -152
  9. package/public/build/_assets/react-datepicker-SHOMGW4P.css +1 -0
  10. package/public/build/_assets/tailwind-IKQBW4EF.css +1 -0
  11. package/public/build/_shared/{buttons.esm-NERHWBM5.js → buttons.esm-D3QISUDE.js} +1 -1
  12. package/public/build/_shared/chunk-G5WX4PPA.js +1 -0
  13. package/public/build/_shared/chunk-KCW5MVVI.js +1 -0
  14. package/public/build/_shared/chunk-ND5WRITB.js +293 -0
  15. package/public/build/_shared/chunk-Q2NTJV6J.js +1 -0
  16. package/public/build/entry.client-RZUWA4GZ.js +1 -0
  17. package/public/build/manifest-EB9EF86E.js +1 -0
  18. package/public/build/root-2VGPJH5M.js +1 -0
  19. package/public/build/routes/$repo.$-27NBUN34.js +75 -0
  20. package/public/build/routes/_index-2SBFW3TI.js +1 -0
  21. package/public/build/routes/authordist-A7NSX5GE.js +1 -0
  22. package/public/build/routes/commitcount-KSNJOFTJ.js +1 -0
  23. package/public/build/routes/commits-6RXT3QOX.js +1 -0
  24. package/public/build/routes/progress-LUCNXSNL.js +1 -0
  25. package/public/build/_assets/commit_icon-JEPGHU5X.png +0 -0
  26. package/public/build/_assets/tailwind-72RAMDD2.css +0 -1
  27. package/public/build/_shared/chunk-2VJVTLMY.js +0 -32
  28. package/public/build/_shared/chunk-4SJHXJI7.js +0 -1
  29. package/public/build/_shared/chunk-AK3AD3DY.js +0 -264
  30. package/public/build/_shared/chunk-Q3IECNXJ.js +0 -1
  31. package/public/build/_shared/chunk-T4XCWYMZ.js +0 -1
  32. package/public/build/entry.client-BTXLKLEV.js +0 -1
  33. package/public/build/manifest-CC7CCBCD.js +0 -1
  34. package/public/build/root-NJBWNQGV.js +0 -1
  35. package/public/build/routes/$repo.$-4LRRFNNR.js +0 -27
  36. package/public/build/routes/_index-OCAMKNPN.js +0 -1
  37. package/public/build/routes/commits-GGDWDC7W.js +0 -1
  38. package/public/build/routes/progress-SNLO56GK.js +0 -1
@@ -1,264 +0,0 @@
1
- import{a as Ut,b as Tt,c as je}from"/build/_shared/chunk-Q3IECNXJ.js";var Nn=Tt(U=>{"use strict";var ft=Symbol.for("react.element"),Co=Symbol.for("react.portal"),No=Symbol.for("react.fragment"),Mo=Symbol.for("react.strict_mode"),Ao=Symbol.for("react.profiler"),Oo=Symbol.for("react.provider"),Fo=Symbol.for("react.context"),Uo=Symbol.for("react.forward_ref"),To=Symbol.for("react.suspense"),jo=Symbol.for("react.memo"),Io=Symbol.for("react.lazy"),wn=Symbol.iterator;function ko(e){return e===null||typeof e!="object"?null:(e=wn&&e[wn]||e["@@iterator"],typeof e=="function"?e:null)}var Sn={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},xn=Object.assign,Dn={};function Ye(e,t,r){this.props=e,this.context=t,this.refs=Dn,this.updater=r||Sn}Ye.prototype.isReactComponent={};Ye.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ye.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function _n(){}_n.prototype=Ye.prototype;function Er(e,t,r){this.props=e,this.context=t,this.refs=Dn,this.updater=r||Sn}var br=Er.prototype=new _n;br.constructor=Er;xn(br,Ye.prototype);br.isPureReactComponent=!0;var En=Array.isArray,Pn=Object.prototype.hasOwnProperty,Sr={current:null},Ln={key:!0,ref:!0,__self:!0,__source:!0};function Cn(e,t,r){var n,a={},o=null,i=null;if(t!=null)for(n in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)Pn.call(t,n)&&!Ln.hasOwnProperty(n)&&(a[n]=t[n]);var l=arguments.length-2;if(l===1)a.children=r;else if(1<l){for(var s=Array(l),u=0;u<l;u++)s[u]=arguments[u+2];a.children=s}if(e&&e.defaultProps)for(n in l=e.defaultProps,l)a[n]===void 0&&(a[n]=l[n]);return{$$typeof:ft,type:e,key:o,ref:i,props:a,_owner:Sr.current}}function Ho(e,t){return{$$typeof:ft,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function xr(e){return typeof e=="object"&&e!==null&&e.$$typeof===ft}function Bo(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var bn=/\/+/g;function wr(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Bo(""+e.key):t.toString(36)}function It(e,t,r,n,a){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(o){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case ft:case Co:i=!0}}if(i)return i=e,a=a(i),e=n===""?"."+wr(i,0):n,En(a)?(r="",e!=null&&(r=e.replace(bn,"$&/")+"/"),It(a,t,r,"",function(u){return u})):a!=null&&(xr(a)&&(a=Ho(a,r+(!a.key||i&&i.key===a.key?"":(""+a.key).replace(bn,"$&/")+"/")+e)),t.push(a)),1;if(i=0,n=n===""?".":n+":",En(e))for(var l=0;l<e.length;l++){o=e[l];var s=n+wr(o,l);i+=It(o,t,r,s,a)}else if(s=ko(e),typeof s=="function")for(e=s.call(e),l=0;!(o=e.next()).done;)o=o.value,s=n+wr(o,l++),i+=It(o,t,r,s,a);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function jt(e,t,r){if(e==null)return e;var n=[],a=0;return It(e,n,"","",function(o){return t.call(r,o,a++)}),n}function $o(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var ne={current:null},kt={transition:null},zo={ReactCurrentDispatcher:ne,ReactCurrentBatchConfig:kt,ReactCurrentOwner:Sr};U.Children={map:jt,forEach:function(e,t,r){jt(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return jt(e,function(){t++}),t},toArray:function(e){return jt(e,function(t){return t})||[]},only:function(e){if(!xr(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};U.Component=Ye;U.Fragment=No;U.Profiler=Ao;U.PureComponent=Er;U.StrictMode=Mo;U.Suspense=To;U.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=zo;U.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=xn({},e.props),a=e.key,o=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,i=Sr.current),t.key!==void 0&&(a=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(s in t)Pn.call(t,s)&&!Ln.hasOwnProperty(s)&&(n[s]=t[s]===void 0&&l!==void 0?l[s]:t[s])}var s=arguments.length-2;if(s===1)n.children=r;else if(1<s){l=Array(s);for(var u=0;u<s;u++)l[u]=arguments[u+2];n.children=l}return{$$typeof:ft,type:e.type,key:a,ref:o,props:n,_owner:i}};U.createContext=function(e){return e={$$typeof:Fo,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Oo,_context:e},e.Consumer=e};U.createElement=Cn;U.createFactory=function(e){var t=Cn.bind(null,e);return t.type=e,t};U.createRef=function(){return{current:null}};U.forwardRef=function(e){return{$$typeof:Uo,render:e}};U.isValidElement=xr;U.lazy=function(e){return{$$typeof:Io,_payload:{_status:-1,_result:e},_init:$o}};U.memo=function(e,t){return{$$typeof:jo,type:e,compare:t===void 0?null:t}};U.startTransition=function(e){var t=kt.transition;kt.transition={};try{e()}finally{kt.transition=t}};U.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};U.useCallback=function(e,t){return ne.current.useCallback(e,t)};U.useContext=function(e){return ne.current.useContext(e)};U.useDebugValue=function(){};U.useDeferredValue=function(e){return ne.current.useDeferredValue(e)};U.useEffect=function(e,t){return ne.current.useEffect(e,t)};U.useId=function(){return ne.current.useId()};U.useImperativeHandle=function(e,t,r){return ne.current.useImperativeHandle(e,t,r)};U.useInsertionEffect=function(e,t){return ne.current.useInsertionEffect(e,t)};U.useLayoutEffect=function(e,t){return ne.current.useLayoutEffect(e,t)};U.useMemo=function(e,t){return ne.current.useMemo(e,t)};U.useReducer=function(e,t,r){return ne.current.useReducer(e,t,r)};U.useRef=function(e){return ne.current.useRef(e)};U.useState=function(e){return ne.current.useState(e)};U.useSyncExternalStore=function(e,t,r){return ne.current.useSyncExternalStore(e,t,r)};U.useTransition=function(){return ne.current.useTransition()};U.version="18.2.0"});var ve=Tt((Ps,Mn)=>{"use strict";Mn.exports=Nn()});function Ht(){return Ht=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},Ht.apply(this,arguments)}function te(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function _r(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function ke(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 he(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 De(e,t,r){r===void 0&&(r="/");let n=typeof t=="string"?he(t):t,a=Pr(n.pathname||"/",r);if(a==null)return null;let o=Un(e);Vo(o);let i=null;for(let l=0;i==null&&l<o.length;++l)i=Zo(o[l],ti(a));return i}function Fn(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 Un(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let a=(o,i,l)=>{let s={relativePath:l===void 0?o.path||"":l,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};s.relativePath.startsWith("/")&&(te(s.relativePath.startsWith(n),'Absolute route path "'+s.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),s.relativePath=s.relativePath.slice(n.length));let u=Re([n,s.relativePath]),c=r.concat(s);o.children&&o.children.length>0&&(te(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Un(o.children,t,c,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:qo(u,o.index),routesMeta:c})};return e.forEach((o,i)=>{var l;if(o.path===""||!((l=o.path)!=null&&l.includes("?")))a(o,i);else for(let s of Tn(o.path))a(o,i,s)}),t}function Tn(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return a?[o,""]:[o];let i=Tn(n.join("/")),l=[];return l.push(...i.map(s=>s===""?o:[o,s].join("/"))),a&&l.push(...i),l.map(s=>e.startsWith("/")&&s===""?"/":s)}function Vo(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Qo(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}function qo(e,t){let r=e.split("/"),n=r.length;return r.some(On)&&(n+=Go),t&&(n+=Jo),r.filter(a=>!On(a)).reduce((a,o)=>a+(Wo.test(o)?Ko:o===""?Yo:Xo),n)}function Qo(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 Zo(e,t){let{routesMeta:r}=e,n={},a="/",o=[];for(let i=0;i<r.length;++i){let l=r[i],s=i===r.length-1,u=a==="/"?t:t.slice(a.length)||"/",c=ht({path:l.relativePath,caseSensitive:l.caseSensitive,end:s},u);if(!c)return null;Object.assign(n,c.params);let h=l.route;o.push({params:n,pathname:Re([a,c.pathname]),pathnameBase:ai(Re([a,c.pathnameBase])),route:h}),c.pathnameBase!=="/"&&(a=Re([a,c.pathnameBase]))}return o}function ht(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=ei(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let o=a[0],i=o.replace(/(.)\/+$/,"$1"),l=a.slice(1);return{params:n.reduce((u,c,h)=>{let{paramName:p,isOptional:D}=c;if(p==="*"){let v=l[h]||"";i=o.slice(0,o.length-v.length).replace(/(.)\/+$/,"$1")}let y=l[h];return D&&!y?u[p]=void 0:u[p]=ri(y||"",p),u},{}),pathname:o,pathnameBase:i,pattern:e}}function ei(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),_r(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,l,s)=>(n.push({paramName:l,isOptional:s!=null}),s?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function ti(e){try{return decodeURI(e)}catch(t){return _r(!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 ri(e,t){try{return decodeURIComponent(e)}catch(r){return _r(!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 Pr(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 Bt(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?he(e):e;return{pathname:r?r.startsWith("/")?r:ni(r,t):t,search:oi(n),hash:ii(a)}}function ni(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 Dr(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 Lr(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Cr(e,t,r,n){n===void 0&&(n=!1);let a;typeof e=="string"?a=he(e):(a=Ht({},e),te(!a.pathname||!a.pathname.includes("?"),Dr("?","pathname","search",a)),te(!a.pathname||!a.pathname.includes("#"),Dr("#","pathname","hash",a)),te(!a.search||!a.search.includes("#"),Dr("#","search","hash",a)));let o=e===""||a.pathname==="",i=o?"/":a.pathname,l;if(n||i==null)l=r;else{let h=t.length-1;if(i.startsWith("..")){let p=i.split("/");for(;p[0]==="..";)p.shift(),h-=1;a.pathname=p.join("/")}l=h>=0?t[h]:"/"}let s=Bt(a,l),u=i&&i!=="/"&&i.endsWith("/"),c=(o||i===".")&&r.endsWith("/");return!s.pathname.endsWith("/")&&(u||c)&&(s.pathname+="/"),s}function He(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var Ie,An,Wo,Ko,Jo,Yo,Xo,Go,On,Re,ai,oi,ii,Xe,$t,jn,Ls,li,Cs,Ns,Nr=Ut(()=>{(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Ie||(Ie={}));(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(An||(An={}));Wo=/^:\w+$/,Ko=3,Jo=2,Yo=1,Xo=10,Go=-2,On=e=>e==="*";Re=e=>e.join("/").replace(/\/\/+/g,"/"),ai=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),oi=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,ii=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,Xe=class extends Error{},$t=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,Ht({},n,{headers:a}))};jn=["post","put","patch","delete"],Ls=new Set(jn),li=["get",...jn],Cs=new Set(li),Ns=Symbol("deferred")});function zt(){return zt=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},zt.apply(this,arguments)}function Be(e,t){let{relative:r}=t===void 0?{}:t;Ge()||te(!1);let{basename:n,navigator:a}=E.useContext(se),{hash:o,pathname:i,search:l}=Pe(e,{relative:r}),s=i;return n!=="/"&&(s=i==="/"?n:Re([n,i])),a.createHref({pathname:s,search:l,hash:o})}function Ge(){return E.useContext(mt)!=null}function ae(){return Ge()||te(!1),E.useContext(mt).location}function Hn(e){E.useContext(se).static||E.useLayoutEffect(e)}function Wt(){let{isDataRoute:e}=E.useContext(ue);return e?Ri():di()}function di(){Ge()||te(!1);let e=E.useContext(Ee),{basename:t,navigator:r}=E.useContext(se),{matches:n}=E.useContext(ue),{pathname:a}=ae(),o=JSON.stringify(Lr(n).map(s=>s.pathnameBase)),i=E.useRef(!1);return Hn(()=>{i.current=!0}),E.useCallback(function(s,u){if(u===void 0&&(u={}),!i.current)return;if(typeof s=="number"){r.go(s);return}let c=Cr(s,JSON.parse(o),a,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:Re([t,c.pathname])),(u.replace?r.replace:r.push)(c,u.state,u)},[t,r,o,a,e])}function Or(e){let t=E.useContext(ue).outlet;return t&&E.createElement(fi.Provider,{value:e},t)}function Pe(e,t){let{relative:r}=t===void 0?{}:t,{matches:n}=E.useContext(ue),{pathname:a}=ae(),o=JSON.stringify(Lr(n).map(i=>i.pathnameBase));return E.useMemo(()=>Cr(e,JSON.parse(o),a,r==="path"),[e,o,a,r])}function Bn(e,t,r){Ge()||te(!1);let{navigator:n}=E.useContext(se),{matches:a}=E.useContext(ue),o=a[a.length-1],i=o?o.params:{},l=o?o.pathname:"/",s=o?o.pathnameBase:"/",u=o&&o.route,c=ae(),h;if(t){var p;let b=typeof t=="string"?he(t):t;s==="/"||(p=b.pathname)!=null&&p.startsWith(s)||te(!1),h=b}else h=c;let D=h.pathname||"/",y=s==="/"?D:D.slice(s.length)||"/",v=De(e,{pathname:y}),w=gi(v&&v.map(b=>Object.assign({},b,{params:Object.assign({},i,b.params),pathname:Re([s,n.encodeLocation?n.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?s:Re([s,n.encodeLocation?n.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),a,r);return t&&w?E.createElement(mt.Provider,{value:{location:zt({pathname:"/",search:"",hash:"",state:null,key:"default"},h),navigationType:Ie.Pop}},w):w}function hi(){let e=pt(),t=He(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:n},o={padding:"2px 4px",backgroundColor:n};return E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},t),r?E.createElement("pre",{style:a},r):null,null)}function pi(e){let{routeContext:t,match:r,children:n}=e,a=E.useContext(Ee);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),E.createElement(ue.Provider,{value:t},n)}function gi(e,t,r){var n;if(t===void 0&&(t=[]),r===void 0&&(r=null),e==null){var a;if((a=r)!=null&&a.errors)e=r.matches;else return null}let o=e,i=(n=r)==null?void 0:n.errors;if(i!=null){let l=o.findIndex(s=>s.route.id&&i?.[s.route.id]);l>=0||te(!1),o=o.slice(0,Math.min(o.length,l+1))}return o.reduceRight((l,s,u)=>{let c=s.route.id?i?.[s.route.id]:null,h=null;r&&(h=s.route.errorElement||mi);let p=t.concat(o.slice(0,u+1)),D=()=>{let y;return c?y=h:s.route.Component?y=E.createElement(s.route.Component,null):s.route.element?y=s.route.element:y=l,E.createElement(pi,{match:s,routeContext:{outlet:l,matches:p,isDataRoute:r!=null},children:y})};return r&&(s.route.ErrorBoundary||s.route.errorElement||u===0)?E.createElement(Mr,{location:r.location,revalidation:r.revalidation,component:h,error:c,children:D(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):D()},null)}function yi(e){let t=E.useContext(Ee);return t||te(!1),t}function Kt(e){let t=E.useContext(_e);return t||te(!1),t}function vi(e){let t=E.useContext(ue);return t||te(!1),t}function Jt(e){let t=vi(e),r=t.matches[t.matches.length-1];return r.route.id||te(!1),r.route.id}function Fr(){return Jt(we.UseRouteId)}function qe(){return Kt(we.UseNavigation).navigation}function Qe(){let{matches:e,loaderData:t}=Kt(we.UseMatches);return E.useMemo(()=>e.map(r=>Fn(r,t)),[e,t])}function Ur(){let e=Kt(we.UseLoaderData),t=Jt(we.UseLoaderData);if(e.errors&&e.errors[t]!=null){console.error("You cannot `useLoaderData` in an errorElement (routeId: "+t+")");return}return e.loaderData[t]}function pt(){var e;let t=E.useContext(kn),r=Kt(we.UseRouteError),n=Jt(we.UseRouteError);return t||((e=r.errors)==null?void 0:e[n])}function Tr(){let e=E.useContext(Vt);return e?._data}function Yt(){let e=E.useContext(Vt);return e?._error}function Ri(){let{router:e}=yi($n.UseNavigateStable),t=Jt(we.UseNavigateStable),r=E.useRef(!1);return Hn(()=>{r.current=!0}),E.useCallback(function(a,o){o===void 0&&(o={}),r.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,zt({fromRouteId:t},o)))},[e,t])}function zn(e){return Or(e.context)}function jr(e){let{basename:t="/",children:r=null,location:n,navigationType:a=Ie.Pop,navigator:o,static:i=!1}=e;Ge()&&te(!1);let l=t.replace(/^\/*/,"/"),s=E.useMemo(()=>({basename:l,navigator:o,static:i}),[l,o,i]);typeof n=="string"&&(n=he(n));let{pathname:u="/",search:c="",hash:h="",state:p=null,key:D="default"}=n,y=E.useMemo(()=>{let v=Pr(u,l);return v==null?null:{location:{pathname:v,search:c,hash:h,state:p,key:D},navigationType:a}},[l,u,c,h,p,D,a]);return y==null?null:E.createElement(se.Provider,{value:s},E.createElement(mt.Provider,{children:r,value:y}))}function Ir(e){let{children:t,errorElement:r,resolve:n}=e;return E.createElement(Ar,{resolve:n,errorElement:r},E.createElement(bi,null,t))}function bi(e){let{children:t}=e,r=Tr(),n=typeof t=="function"?t(r):t;return E.createElement(E.Fragment,null,n)}function Vn(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:E.createElement(e.Component),Component:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:E.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}var E,Ee,_e,Vt,se,mt,ue,kn,fi,mi,Mr,$n,we,wi,js,le,Ei,Ar,kr=Ut(()=>{E=je(ve());Nr();Nr();Ee=E.createContext(null),_e=E.createContext(null),Vt=E.createContext(null),se=E.createContext(null),mt=E.createContext(null),ue=E.createContext({outlet:null,matches:[],isDataRoute:!1}),kn=E.createContext(null);fi=E.createContext(null);mi=E.createElement(hi,null),Mr=class extends E.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error?E.createElement(ue.Provider,{value:this.props.routeContext},E.createElement(kn.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};$n=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}($n||{}),we=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(we||{});wi="startTransition",js=E[wi];le=function(e){return e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error",e}(le||{}),Ei=new Promise(()=>{}),Ar=class extends E.Component{constructor(t){super(t),this.state={error:null}}static getDerivedStateFromError(t){return{error:t}}componentDidCatch(t,r){console.error("<Await> caught the following error during render",t,r)}render(){let{children:t,errorElement:r,resolve:n}=this.props,a=null,o=le.pending;if(!(n instanceof Promise))o=le.success,a=Promise.resolve(),Object.defineProperty(a,"_tracked",{get:()=>!0}),Object.defineProperty(a,"_data",{get:()=>n});else if(this.state.error){o=le.error;let i=this.state.error;a=Promise.reject().catch(()=>{}),Object.defineProperty(a,"_tracked",{get:()=>!0}),Object.defineProperty(a,"_error",{get:()=>i})}else n._tracked?(a=n,o=a._error!==void 0?le.error:a._data!==void 0?le.success:le.pending):(o=le.pending,Object.defineProperty(n,"_tracked",{get:()=>!0}),a=n.then(i=>Object.defineProperty(n,"_data",{get:()=>i}),i=>Object.defineProperty(n,"_error",{get:()=>i})));if(o===le.error&&a._error instanceof Xe)throw Ei;if(o===le.error&&!r)throw a._error;if(o===le.error)return E.createElement(Vt.Provider,{value:a,children:r});if(o===le.success)return E.createElement(Vt.Provider,{value:a,children:t});throw a}}});function W(){return W=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},W.apply(this,arguments)}function oa(e){e===void 0&&(e={});function t(n,a){let{pathname:o,search:i,hash:l}=n.location;return St("",{pathname:o,search:i,hash:l},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(n,a){return typeof a=="string"?a:xt(a)}return xi(t,r,null,e)}function T(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ve(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Si(){return Math.random().toString(36).substr(2,8)}function Kn(e,t){return{usr:e.state,key:e.key,idx:t}}function St(e,t,r,n){return r===void 0&&(r=null),W({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?We(t):t,{state:r,key:t&&t.key||n||Si()})}function xt(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 We(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 xi(e,t,r,n){n===void 0&&(n={});let{window:a=document.defaultView,v5Compat:o=!1}=n,i=a.history,l=Z.Pop,s=null,u=c();u==null&&(u=0,i.replaceState(W({},i.state,{idx:u}),""));function c(){return(i.state||{idx:null}).idx}function h(){l=Z.Pop;let w=c(),b=w==null?null:w-u;u=w,s&&s({action:l,location:v.location,delta:b})}function p(w,b){l=Z.Push;let O=St(v.location,w,b);r&&r(O,w),u=c()+1;let _=Kn(O,u),d=v.createHref(O);try{i.pushState(_,"",d)}catch(P){if(P instanceof DOMException&&P.name==="DataCloneError")throw P;a.location.assign(d)}o&&s&&s({action:l,location:v.location,delta:1})}function D(w,b){l=Z.Replace;let O=St(v.location,w,b);r&&r(O,w),u=c();let _=Kn(O,u),d=v.createHref(O);i.replaceState(_,"",d),o&&s&&s({action:l,location:v.location,delta:0})}function y(w){let b=a.location.origin!=="null"?a.location.origin:a.location.href,O=typeof w=="string"?w:xt(w);return T(b,"No window.location.(origin|href) available to create URL for href: "+O),new URL(O,b)}let v={get action(){return l},get location(){return e(a,i)},listen(w){if(s)throw new Error("A history only accepts one active listener");return a.addEventListener(Wn,h),s=w,()=>{a.removeEventListener(Wn,h),s=null}},createHref(w){return t(a,w)},createURL:y,encodeLocation(w){let b=y(w);return{pathname:b.pathname,search:b.search,hash:b.hash}},push:p,replace:D,go(w){return i.go(w)}};return v}function _i(e){return e.index===!0}function zr(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((a,o)=>{let i=[...r,o],l=typeof a.id=="string"?a.id:i.join("-");if(T(a.index!==!0||!a.children,"Cannot specify children on an index route"),T(!n[l],'Found a route id collision on id "'+l+`". Route id's must be globally unique within Data Router usages`),_i(a)){let s=W({},a,t(a),{id:l});return n[l]=s,s}else{let s=W({},a,t(a),{id:l,children:void 0});return n[l]=s,a.children&&(s.children=zr(a.children,t,i,n)),s}})}function wt(e,t,r){r===void 0&&(r="/");let n=typeof t=="string"?We(t):t,a=pe(n.pathname||"/",r);if(a==null)return null;let o=ia(e);Li(o);let i=null;for(let l=0;i==null&&l<o.length;++l)i=ji(o[l],ki(a));return i}function Pi(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 ia(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let a=(o,i,l)=>{let s={relativePath:l===void 0?o.path||"":l,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};s.relativePath.startsWith("/")&&(T(s.relativePath.startsWith(n),'Absolute route path "'+s.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),s.relativePath=s.relativePath.slice(n.length));let u=ze([n,s.relativePath]),c=r.concat(s);o.children&&o.children.length>0&&(T(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),ia(o.children,t,c,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:Ui(u,o.index),routesMeta:c})};return e.forEach((o,i)=>{var l;if(o.path===""||!((l=o.path)!=null&&l.includes("?")))a(o,i);else for(let s of la(o.path))a(o,i,s)}),t}function la(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return a?[o,""]:[o];let i=la(n.join("/")),l=[];return l.push(...i.map(s=>s===""?o:[o,s].join("/"))),a&&l.push(...i),l.map(s=>e.startsWith("/")&&s===""?"/":s)}function Li(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Ti(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}function Ui(e,t){let r=e.split("/"),n=r.length;return r.some(Jn)&&(n+=Fi),t&&(n+=Mi),r.filter(a=>!Jn(a)).reduce((a,o)=>a+(Ci.test(o)?Ni:o===""?Ai:Oi),n)}function Ti(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 ji(e,t){let{routesMeta:r}=e,n={},a="/",o=[];for(let i=0;i<r.length;++i){let l=r[i],s=i===r.length-1,u=a==="/"?t:t.slice(a.length)||"/",c=Xt({path:l.relativePath,caseSensitive:l.caseSensitive,end:s},u);if(!c)return null;Object.assign(n,c.params);let h=l.route;o.push({params:n,pathname:ze([a,c.pathname]),pathnameBase:Vi(ze([a,c.pathnameBase])),route:h}),c.pathnameBase!=="/"&&(a=ze([a,c.pathnameBase]))}return o}function Xt(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=Ii(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let o=a[0],i=o.replace(/(.)\/+$/,"$1"),l=a.slice(1);return{params:n.reduce((u,c,h)=>{let{paramName:p,isOptional:D}=c;if(p==="*"){let v=l[h]||"";i=o.slice(0,o.length-v.length).replace(/(.)\/+$/,"$1")}let y=l[h];return D&&!y?u[p]=void 0:u[p]=Hi(y||"",p),u},{}),pathname:o,pathnameBase:i,pattern:e}}function Ii(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),Ve(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,l,s)=>(n.push({paramName:l,isOptional:s!=null}),s?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function ki(e){try{return decodeURI(e)}catch(t){return Ve(!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 Hi(e,t){try{return decodeURIComponent(e)}catch(r){return Ve(!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 pe(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 Bi(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?We(e):e;return{pathname:r?r.startsWith("/")?r:$i(r,t):t,search:Wi(n),hash:Ki(a)}}function $i(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 Hr(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 sa(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function zi(e,t,r,n){n===void 0&&(n=!1);let a;typeof e=="string"?a=We(e):(a=W({},e),T(!a.pathname||!a.pathname.includes("?"),Hr("?","pathname","search",a)),T(!a.pathname||!a.pathname.includes("#"),Hr("#","pathname","hash",a)),T(!a.search||!a.search.includes("#"),Hr("#","search","hash",a)));let o=e===""||a.pathname==="",i=o?"/":a.pathname,l;if(n||i==null)l=r;else{let h=t.length-1;if(i.startsWith("..")){let p=i.split("/");for(;p[0]==="..";)p.shift(),h-=1;a.pathname=p.join("/")}l=h>=0?t[h]:"/"}let s=Bi(a,l),u=i&&i!=="/"&&i.endsWith("/"),c=(o||i===".")&&r.endsWith("/");return!s.pathname.endsWith("/")&&(u||c)&&(s.pathname+="/"),s}function Ji(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function fa(e){let 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;T(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 f=e.detectErrorBoundary;a=m=>({hasErrorBoundary:f(m)})}else a=Zi;let o={},i=zr(e.routes,a,void 0,o),l,s=e.basename||"/",u=W({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_prependBasename:!1},e.future),c=null,h=new Set,p=null,D=null,y=null,v=e.hydrationData!=null,w=wt(i,e.history.location,s),b=null;if(w==null){let f=ce(404,{pathname:e.history.location.pathname}),{matches:m,route:g}=ta(i);w=m,b={[g.id]:f}}let O=!w.some(f=>f.route.lazy)&&(!w.some(f=>f.route.loader)||e.hydrationData!=null),_,d={historyAction:e.history.action,location:e.history.location,matches:w,initialized:O,navigation:Br,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||b,fetchers:new Map,blockers:new Map},P=Z.Pop,I=!1,L,k=!1,z=new Map,ee=null,X=!1,oe=!1,Ct=[],Nt=[],G=new Map,Mt=0,ot=-1,Ke=new Map,ge=new Set,Je=new Map,it=new Map,Me=new Set,Ae=new Map,Oe=new Map,hr=!1;function mo(){if(c=e.history.listen(f=>{let{action:m,location:g,delta:x}=f;if(hr){hr=!1;return}Ve(Oe.size===0||x!=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 N=gn({currentLocation:d.location,nextLocation:g,historyAction:m});if(N&&x!=null){hr=!0,e.history.go(x*-1),Ot(N,{state:"blocked",location:g,proceed(){Ot(N,{state:"proceeding",proceed:void 0,reset:void 0,location:g}),e.history.go(x)},reset(){let M=new Map(d.blockers);M.set(N,gt),q({blockers:M})}});return}return Fe(m,g)}),r){cl(t,z);let f=()=>dl(t,z);t.addEventListener("pagehide",f),ee=()=>t.removeEventListener("pagehide",f)}return d.initialized||Fe(Z.Pop,d.location),_}function po(){c&&c(),ee&&ee(),h.clear(),L&&L.abort(),d.fetchers.forEach((f,m)=>At(m)),d.blockers.forEach((f,m)=>pn(m))}function go(f){return h.add(f),()=>h.delete(f)}function q(f,m){d=W({},d,f);let g=[],x=[];u.v7_fetcherPersist&&d.fetchers.forEach((N,M)=>{N.state==="idle"&&(Me.has(M)?x.push(M):g.push(M))}),h.forEach(N=>N(d,{deletedFetchers:x,unstable_viewTransitionOpts:m})),u.v7_fetcherPersist&&(g.forEach(N=>d.fetchers.delete(N)),x.forEach(N=>At(N)))}function lt(f,m){var g,x;let N=d.actionData!=null&&d.navigation.formMethod!=null&&me(d.navigation.formMethod)&&d.navigation.state==="loading"&&((g=f.state)==null?void 0:g._isRedirect)!==!0,M;m.actionData?Object.keys(m.actionData).length>0?M=m.actionData:M=null:N?M=d.actionData:M=null;let F=m.loaderData?ea(d.loaderData,m.loaderData,m.matches||[],m.errors):d.loaderData,A=d.blockers;A.size>0&&(A=new Map(A),A.forEach((V,j)=>A.set(j,gt)));let C=I===!0||d.navigation.formMethod!=null&&me(d.navigation.formMethod)&&((x=f.state)==null?void 0:x._isRedirect)!==!0;l&&(i=l,l=void 0),X||P===Z.Pop||(P===Z.Push?e.history.push(f,f.state):P===Z.Replace&&e.history.replace(f,f.state));let B;if(P===Z.Pop){let V=z.get(d.location.pathname);V&&V.has(f.pathname)?B={currentLocation:d.location,nextLocation:f}:z.has(f.pathname)&&(B={currentLocation:f,nextLocation:d.location})}else if(k){let V=z.get(d.location.pathname);V?V.add(f.pathname):(V=new Set([f.pathname]),z.set(d.location.pathname,V)),B={currentLocation:d.location,nextLocation:f}}q(W({},m,{actionData:M,loaderData:F,historyAction:P,location:f,initialized:!0,navigation:Br,revalidation:"idle",restoreScrollPosition:vn(f,m.matches||d.matches),preventScrollReset:C,blockers:A}),B),P=Z.Pop,I=!1,k=!1,X=!1,oe=!1,Ct=[],Nt=[]}async function un(f,m){if(typeof f=="number"){e.history.go(f);return}let g=Vr(d.location,d.matches,s,u.v7_prependBasename,f,m?.fromRouteId,m?.relative),{path:x,submission:N,error:M}=Yn(u.v7_normalizeFormMethod,!1,g,m),F=d.location,A=St(d.location,x,m&&m.state);A=W({},A,e.history.encodeLocation(A));let C=m&&m.replace!=null?m.replace:void 0,B=Z.Push;C===!0?B=Z.Replace:C===!1||N!=null&&me(N.formMethod)&&N.formAction===d.location.pathname+d.location.search&&(B=Z.Replace);let V=m&&"preventScrollReset"in m?m.preventScrollReset===!0:void 0,j=gn({currentLocation:F,nextLocation:A,historyAction:B});if(j){Ot(j,{state:"blocked",location:A,proceed(){Ot(j,{state:"proceeding",proceed:void 0,reset:void 0,location:A}),un(f,m)},reset(){let $=new Map(d.blockers);$.set(j,gt),q({blockers:$})}});return}return await Fe(B,A,{submission:N,pendingError:M,preventScrollReset:V,replace:m&&m.replace,enableViewTransition:m&&m.unstable_viewTransition})}function yo(){if(mr(),q({revalidation:"loading"}),d.navigation.state!=="submitting"){if(d.navigation.state==="idle"){Fe(d.historyAction,d.location,{startUninterruptedRevalidation:!0});return}Fe(P||d.historyAction,d.navigation.location,{overrideNavigation:d.navigation})}}async function Fe(f,m,g){L&&L.abort(),L=null,P=f,X=(g&&g.startUninterruptedRevalidation)===!0,_o(d.location,d.matches),I=(g&&g.preventScrollReset)===!0,k=(g&&g.enableViewTransition)===!0;let x=l||i,N=g&&g.overrideNavigation,M=wt(x,m,s);if(!M){let $=ce(404,{pathname:m.pathname}),{matches:Q,route:Ue}=ta(x);pr(),lt(m,{matches:Q,loaderData:{},errors:{[Ue.id]:$}});return}if(d.initialized&&!oe&&al(d.location,m)&&!(g&&g.submission&&me(g.submission.formMethod))){lt(m,{matches:M});return}L=new AbortController;let F=vt(e.history,m,L.signal,g&&g.submission),A,C;if(g&&g.pendingError)C={[Et(M).route.id]:g.pendingError};else if(g&&g.submission&&me(g.submission.formMethod)){let $=await vo(F,m,g.submission,M,{replace:g.replace});if($.shortCircuited)return;A=$.pendingActionData,C=$.pendingActionError,N=$r(m,g.submission),F=new Request(F.url,{signal:F.signal})}let{shortCircuited:B,loaderData:V,errors:j}=await Ro(F,m,M,N,g&&g.submission,g&&g.fetcherSubmission,g&&g.replace,A,C);B||(L=null,lt(m,W({matches:M},A?{actionData:A}:{},{loaderData:V,errors:j})))}async function vo(f,m,g,x,N){N===void 0&&(N={}),mr();let M=sl(m,g);q({navigation:M});let F,A=Kr(x,m);if(!A.route.action&&!A.route.lazy)F={type:J.error,error:ce(405,{method:f.method,pathname:m.pathname,routeId:A.route.id})};else if(F=await yt("action",f,A,x,o,a,s),f.signal.aborted)return{shortCircuited:!0};if(Ze(F)){let C;return N&&N.replace!=null?C=N.replace:C=F.location===d.location.pathname+d.location.search,await st(d,F,{submission:g,replace:C}),{shortCircuited:!0}}if(bt(F)){let C=Et(x,A.route.id);return(N&&N.replace)!==!0&&(P=Z.Push),{pendingActionData:{},pendingActionError:{[C.route.id]:F.error}}}if($e(F))throw ce(400,{type:"defer-action"});return{pendingActionData:{[A.route.id]:F.data}}}async function Ro(f,m,g,x,N,M,F,A,C){let B=x||$r(m,N),V=N||M||aa(B),j=l||i,[$,Q]=Xn(e.history,d,g,V,m,oe,Ct,Nt,Je,ge,j,s,A,C);if(pr(H=>!(g&&g.some(fe=>fe.route.id===H))||$&&$.some(fe=>fe.route.id===H)),ot=++Mt,$.length===0&&Q.length===0){let H=hn();return lt(m,W({matches:g,loaderData:{},errors:C||null},A?{actionData:A}:{},H?{fetchers:new Map(d.fetchers)}:{})),{shortCircuited:!0}}if(!X){Q.forEach(fe=>{let xe=d.fetchers.get(fe.key),K=Rt(void 0,xe?xe.data:void 0);d.fetchers.set(fe.key,K)});let H=A||d.actionData;q(W({navigation:B},H?Object.keys(H).length===0?{actionData:null}:{actionData:H}:{},Q.length>0?{fetchers:new Map(d.fetchers)}:{}))}Q.forEach(H=>{G.has(H.key)&&be(H.key),H.controller&&G.set(H.key,H.controller)});let Ue=()=>Q.forEach(H=>be(H.key));L&&L.signal.addEventListener("abort",Ue);let{results:Te,loaderResults:ct,fetcherResults:gr}=await dn(d.matches,g,$,Q,f);if(f.signal.aborted)return{shortCircuited:!0};L&&L.signal.removeEventListener("abort",Ue),Q.forEach(H=>G.delete(H.key));let ye=ra(Te);if(ye){if(ye.idx>=$.length){let H=Q[ye.idx-$.length].key;ge.add(H)}return await st(d,ye.result,{replace:F}),{shortCircuited:!0}}let{loaderData:Se,errors:Ft}=Zn(d,g,$,ct,C,Q,gr,Ae);Ae.forEach((H,fe)=>{H.subscribe(xe=>{(xe||H.done)&&Ae.delete(fe)})});let yr=hn(),vr=mn(ot),Rr=yr||vr||Q.length>0;return W({loaderData:Se,errors:Ft},Rr?{fetchers:new Map(d.fetchers)}:{})}function cn(f){return u.v7_fetcherPersist&&(it.set(f,(it.get(f)||0)+1),Me.has(f)&&Me.delete(f)),d.fetchers.get(f)||Jr}function wo(f,m,g,x){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.");G.has(f)&&be(f);let N=l||i,M=Vr(d.location,d.matches,s,u.v7_prependBasename,g,m,x?.relative),F=wt(N,M,s);if(!F){ut(f,m,ce(404,{pathname:M}));return}let{path:A,submission:C,error:B}=Yn(u.v7_normalizeFormMethod,!0,M,x);if(B){ut(f,m,B);return}let V=Kr(F,A);if(I=(x&&x.preventScrollReset)===!0,C&&me(C.formMethod)){Eo(f,m,A,V,F,C);return}Je.set(f,{routeId:m,path:A}),bo(f,m,A,V,F,C)}async function Eo(f,m,g,x,N,M){if(mr(),Je.delete(f),!x.route.action&&!x.route.lazy){let K=ce(405,{method:M.formMethod,pathname:g,routeId:m});ut(f,m,K);return}let F=d.fetchers.get(f),A=ul(M,F);d.fetchers.set(f,A),q({fetchers:new Map(d.fetchers)});let C=new AbortController,B=vt(e.history,g,C.signal,M);G.set(f,C);let V=Mt,j=await yt("action",B,x,N,o,a,s);if(B.signal.aborted){G.get(f)===C&&G.delete(f);return}if(Me.has(f)){d.fetchers.set(f,Le(void 0)),q({fetchers:new Map(d.fetchers)});return}if(Ze(j))if(G.delete(f),ot>V){let K=Le(void 0);d.fetchers.set(f,K),q({fetchers:new Map(d.fetchers)});return}else{ge.add(f);let K=Rt(M);return d.fetchers.set(f,K),q({fetchers:new Map(d.fetchers)}),st(d,j,{fetcherSubmission:M})}if(bt(j)){ut(f,m,j.error);return}if($e(j))throw ce(400,{type:"defer-action"});let $=d.navigation.location||d.location,Q=vt(e.history,$,C.signal),Ue=l||i,Te=d.navigation.state!=="idle"?wt(Ue,d.navigation.location,s):d.matches;T(Te,"Didn't find any matches after fetcher action");let ct=++Mt;Ke.set(f,ct);let gr=Rt(M,j.data);d.fetchers.set(f,gr);let[ye,Se]=Xn(e.history,d,Te,M,$,oe,Ct,Nt,Je,ge,Ue,s,{[x.route.id]:j.data},void 0);Se.filter(K=>K.key!==f).forEach(K=>{let dt=K.key,Rn=d.fetchers.get(dt),Lo=Rt(void 0,Rn?Rn.data:void 0);d.fetchers.set(dt,Lo),G.has(dt)&&be(dt),K.controller&&G.set(dt,K.controller)}),q({fetchers:new Map(d.fetchers)});let Ft=()=>Se.forEach(K=>be(K.key));C.signal.addEventListener("abort",Ft);let{results:yr,loaderResults:vr,fetcherResults:Rr}=await dn(d.matches,Te,ye,Se,Q);if(C.signal.aborted)return;C.signal.removeEventListener("abort",Ft),Ke.delete(f),G.delete(f),Se.forEach(K=>G.delete(K.key));let H=ra(yr);if(H){if(H.idx>=ye.length){let K=Se[H.idx-ye.length].key;ge.add(K)}return st(d,H.result)}let{loaderData:fe,errors:xe}=Zn(d,d.matches,ye,vr,void 0,Se,Rr,Ae);if(d.fetchers.has(f)){let K=Le(j.data);d.fetchers.set(f,K)}mn(ct),d.navigation.state==="loading"&&ct>ot?(T(P,"Expected pending action"),L&&L.abort(),lt(d.navigation.location,{matches:Te,loaderData:fe,errors:xe,fetchers:new Map(d.fetchers)})):(q({errors:xe,loaderData:ea(d.loaderData,fe,Te,xe),fetchers:new Map(d.fetchers)}),oe=!1)}async function bo(f,m,g,x,N,M){let F=d.fetchers.get(f),A=Rt(M,F?F.data:void 0);d.fetchers.set(f,A),q({fetchers:new Map(d.fetchers)});let C=new AbortController,B=vt(e.history,g,C.signal);G.set(f,C);let V=Mt,j=await yt("loader",B,x,N,o,a,s);if($e(j)&&(j=await pa(j,B.signal,!0)||j),G.get(f)===C&&G.delete(f),B.signal.aborted)return;if(Me.has(f)){d.fetchers.set(f,Le(void 0)),q({fetchers:new Map(d.fetchers)});return}if(Ze(j))if(ot>V){let Q=Le(void 0);d.fetchers.set(f,Q),q({fetchers:new Map(d.fetchers)});return}else{ge.add(f),await st(d,j);return}if(bt(j)){ut(f,m,j.error);return}T(!$e(j),"Unhandled fetcher deferred data");let $=Le(j.data);d.fetchers.set(f,$),q({fetchers:new Map(d.fetchers)})}async function st(f,m,g){let{submission:x,fetcherSubmission:N,replace:M}=g===void 0?{}:g;m.revalidate&&(oe=!0);let F=St(f.location,m.location,{_isRedirect:!0});if(T(F,"Expected a location on the redirect navigation"),r){let $=!1;if(m.reloadDocument)$=!0;else if(ca.test(m.location)){let Q=e.history.createURL(m.location);$=Q.origin!==t.location.origin||pe(Q.pathname,s)==null}if($){M?t.location.replace(m.location):t.location.assign(m.location);return}}L=null;let A=M===!0?Z.Replace:Z.Push,{formMethod:C,formAction:B,formEncType:V}=f.navigation;!x&&!N&&C&&B&&V&&(x=aa(f.navigation));let j=x||N;if(Qi.has(m.status)&&j&&me(j.formMethod))await Fe(A,F,{submission:W({},j,{formAction:m.location}),preventScrollReset:I});else{let $=$r(F,x);await Fe(A,F,{overrideNavigation:$,fetcherSubmission:N,preventScrollReset:I})}}async function dn(f,m,g,x,N){let M=await Promise.all([...g.map(C=>yt("loader",N,C,m,o,a,s)),...x.map(C=>C.matches&&C.match&&C.controller?yt("loader",vt(e.history,C.path,C.controller.signal),C.match,C.matches,o,a,s):{type:J.error,error:ce(404,{pathname:C.path})})]),F=M.slice(0,g.length),A=M.slice(g.length);return await Promise.all([na(f,g,F,F.map(()=>N.signal),!1,d.loaderData),na(f,x.map(C=>C.match),A,x.map(C=>C.controller?C.controller.signal:null),!0)]),{results:M,loaderResults:F,fetcherResults:A}}function mr(){oe=!0,Ct.push(...pr()),Je.forEach((f,m)=>{G.has(m)&&(Nt.push(m),be(m))})}function ut(f,m,g){let x=Et(d.matches,m);At(f),q({errors:{[x.route.id]:g},fetchers:new Map(d.fetchers)})}function At(f){let m=d.fetchers.get(f);G.has(f)&&!(m&&m.state==="loading"&&Ke.has(f))&&be(f),Je.delete(f),Ke.delete(f),ge.delete(f),Me.delete(f),d.fetchers.delete(f)}function So(f){if(u.v7_fetcherPersist){let m=(it.get(f)||0)-1;m<=0?(it.delete(f),Me.add(f)):it.set(f,m)}else At(f);q({fetchers:new Map(d.fetchers)})}function be(f){let m=G.get(f);T(m,"Expected fetch controller: "+f),m.abort(),G.delete(f)}function fn(f){for(let m of f){let g=cn(m),x=Le(g.data);d.fetchers.set(m,x)}}function hn(){let f=[],m=!1;for(let g of ge){let x=d.fetchers.get(g);T(x,"Expected fetcher: "+g),x.state==="loading"&&(ge.delete(g),f.push(g),m=!0)}return fn(f),m}function mn(f){let m=[];for(let[g,x]of Ke)if(x<f){let N=d.fetchers.get(g);T(N,"Expected fetcher: "+g),N.state==="loading"&&(be(g),Ke.delete(g),m.push(g))}return fn(m),m.length>0}function xo(f,m){let g=d.blockers.get(f)||gt;return Oe.get(f)!==m&&Oe.set(f,m),g}function pn(f){d.blockers.delete(f),Oe.delete(f)}function Ot(f,m){let g=d.blockers.get(f)||gt;T(g.state==="unblocked"&&m.state==="blocked"||g.state==="blocked"&&m.state==="blocked"||g.state==="blocked"&&m.state==="proceeding"||g.state==="blocked"&&m.state==="unblocked"||g.state==="proceeding"&&m.state==="unblocked","Invalid blocker state transition: "+g.state+" -> "+m.state);let x=new Map(d.blockers);x.set(f,m),q({blockers:x})}function gn(f){let{currentLocation:m,nextLocation:g,historyAction:x}=f;if(Oe.size===0)return;Oe.size>1&&Ve(!1,"A router only supports one blocker at a time");let N=Array.from(Oe.entries()),[M,F]=N[N.length-1],A=d.blockers.get(M);if(!(A&&A.state==="proceeding")&&F({currentLocation:m,nextLocation:g,historyAction:x}))return M}function pr(f){let m=[];return Ae.forEach((g,x)=>{(!f||f(x))&&(g.cancel(),m.push(x),Ae.delete(x))}),m}function Do(f,m,g){if(p=f,y=m,D=g||null,!v&&d.navigation===Br){v=!0;let x=vn(d.location,d.matches);x!=null&&q({restoreScrollPosition:x})}return()=>{p=null,y=null,D=null}}function yn(f,m){return D&&D(f,m.map(x=>Pi(x,d.loaderData)))||f.key}function _o(f,m){if(p&&y){let g=yn(f,m);p[g]=y()}}function vn(f,m){if(p){let g=yn(f,m),x=p[g];if(typeof x=="number")return x}return null}function Po(f){o={},l=zr(f,a,void 0,o)}return _={get basename(){return s},get state(){return d},get routes(){return i},get window(){return t},initialize:mo,subscribe:go,enableScrollRestoration:Do,navigate:un,fetch:wo,revalidate:yo,createHref:f=>e.history.createHref(f),encodeLocation:f=>e.history.encodeLocation(f),getFetcher:cn,deleteFetcher:So,dispose:po,getBlocker:xo,deleteBlocker:pn,_internalFetchControllers:G,_internalActiveDeferreds:Ae,_internalSetRoutes:Po},_}function el(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Vr(e,t,r,n,a,o,i){let l,s;if(o!=null&&i!=="path"){l=[];for(let c of t)if(l.push(c),c.route.id===o){s=c;break}}else l=t,s=t[t.length-1];let u=zi(a||".",sa(l).map(c=>c.pathnameBase),pe(e.pathname,r)||e.pathname,i==="path");return a==null&&(u.search=e.search,u.hash=e.hash),(a==null||a===""||a===".")&&s&&s.route.index&&!Yr(u.search)&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),n&&r!=="/"&&(u.pathname=u.pathname==="/"?r:ze([r,u.pathname])),xt(u)}function Yn(e,t,r,n){if(!n||!el(n))return{path:r};if(n.formMethod&&!ll(n.formMethod))return{path:r,error:ce(405,{method:n.formMethod})};let a=()=>({path:r,error:ce(400,{type:"invalid-body"})}),o=n.formMethod||"get",i=e?o.toUpperCase():o.toLowerCase(),l=ma(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!me(i))return a();let p=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((D,y)=>{let[v,w]=y;return""+D+v+"="+w+`
2
- `},""):String(n.body);return{path:r,submission:{formMethod:i,formAction:l,formEncType:n.formEncType,formData:void 0,json:void 0,text:p}}}else if(n.formEncType==="application/json"){if(!me(i))return a();try{let p=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:i,formAction:l,formEncType:n.formEncType,formData:void 0,json:p,text:void 0}}}catch{return a()}}}T(typeof FormData=="function","FormData is not available in this environment");let s,u;if(n.formData)s=Wr(n.formData),u=n.formData;else if(n.body instanceof FormData)s=Wr(n.body),u=n.body;else if(n.body instanceof URLSearchParams)s=n.body,u=Qn(s);else if(n.body==null)s=new URLSearchParams,u=new FormData;else try{s=new URLSearchParams(n.body),u=Qn(s)}catch{return a()}let c={formMethod:i,formAction:l,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(me(c.formMethod))return{path:r,submission:c};let h=We(r);return t&&h.search&&Yr(h.search)&&s.append("index",""),h.search="?"+s,{path:xt(h),submission:c}}function tl(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 Xn(e,t,r,n,a,o,i,l,s,u,c,h,p,D){let y=D?Object.values(D)[0]:p?Object.values(p)[0]:void 0,v=e.createURL(t.location),w=e.createURL(a),b=D?Object.keys(D)[0]:void 0,_=tl(r,b).filter((P,I)=>{if(P.route.lazy)return!0;if(P.route.loader==null)return!1;if(rl(t.loaderData,t.matches[I],P)||i.some(z=>z===P.route.id))return!0;let L=t.matches[I],k=P;return Gn(P,W({currentUrl:v,currentParams:L.params,nextUrl:w,nextParams:k.params},n,{actionResult:y,defaultShouldRevalidate:o||v.pathname+v.search===w.pathname+w.search||v.search!==w.search||ha(L,k)}))}),d=[];return s.forEach((P,I)=>{if(!r.some(X=>X.route.id===P.routeId))return;let L=wt(c,P.path,h);if(!L){d.push({key:I,routeId:P.routeId,path:P.path,matches:null,match:null,controller:null});return}let k=t.fetchers.get(I),z=Kr(L,P.path),ee=!1;u.has(I)?ee=!1:l.includes(I)?ee=!0:k&&k.state!=="idle"&&k.data===void 0?ee=o:ee=Gn(z,W({currentUrl:v,currentParams:t.matches[t.matches.length-1].params,nextUrl:w,nextParams:r[r.length-1].params},n,{actionResult:y,defaultShouldRevalidate:o})),ee&&d.push({key:I,routeId:P.routeId,path:P.path,matches:L,match:z,controller:new AbortController})}),[_,d]}function rl(e,t,r){let n=!t||r.route.id!==t.route.id,a=e[r.route.id]===void 0;return n||a}function ha(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function Gn(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}async function qn(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let a=r[e.id];T(a,"No route found in manifest");let o={};for(let i in n){let s=a[i]!==void 0&&i!=="hasErrorBoundary";Ve(!s,'Route "'+a.id+'" has a static property "'+i+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+i+'" will be ignored.')),!s&&!Di.has(i)&&(o[i]=n[i])}Object.assign(a,o),Object.assign(a,W({},t(a),{lazy:void 0}))}async function yt(e,t,r,n,a,o,i,l){l===void 0&&(l={});let s,u,c,h=y=>{let v,w=new Promise((b,O)=>v=O);return c=()=>v(),t.signal.addEventListener("abort",c),Promise.race([y({request:t,params:r.params,context:l.requestContext}),w])};try{let y=r.route[e];if(r.route.lazy)if(y){let v,w=await Promise.all([h(y).catch(b=>{v=b}),qn(r.route,o,a)]);if(v)throw v;u=w[0]}else if(await qn(r.route,o,a),y=r.route[e],y)u=await h(y);else if(e==="action"){let v=new URL(t.url),w=v.pathname+v.search;throw ce(405,{method:t.method,pathname:w,routeId:r.route.id})}else return{type:J.data,data:void 0};else if(y)u=await h(y);else{let v=new URL(t.url),w=v.pathname+v.search;throw ce(404,{pathname:w})}T(u!==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(y){s=J.error,u=y}finally{c&&t.signal.removeEventListener("abort",c)}if(il(u)){let y=u.status;if(qi.has(y)){let b=u.headers.get("Location");if(T(b,"Redirects returned/thrown from loaders/actions must have a Location header"),!ca.test(b))b=Vr(new URL(t.url),n.slice(0,n.indexOf(r)+1),i,!0,b);else if(!l.isStaticRequest){let O=new URL(t.url),_=b.startsWith("//")?new URL(O.protocol+b):new URL(b),d=pe(_.pathname,i)!=null;_.origin===O.origin&&d&&(b=_.pathname+_.search+_.hash)}if(l.isStaticRequest)throw u.headers.set("Location",b),u;return{type:J.redirect,status:y,location:b,revalidate:u.headers.get("X-Remix-Revalidate")!==null,reloadDocument:u.headers.get("X-Remix-Reload-Document")!==null}}if(l.isRouteRequest)throw{type:s===J.error?J.error:J.data,response:u};let v,w=u.headers.get("Content-Type");return w&&/\bapplication\/json\b/.test(w)?v=await u.json():v=await u.text(),s===J.error?{type:s,error:new et(y,u.statusText,v),headers:u.headers}:{type:J.data,data:v,statusCode:u.status,headers:u.headers}}if(s===J.error)return{type:s,error:u};if(ol(u)){var p,D;return{type:J.deferred,deferredData:u,statusCode:(p=u.init)==null?void 0:p.status,headers:((D=u.init)==null?void 0:D.headers)&&new Headers(u.init.headers)}}return{type:J.data,data:u}}function vt(e,t,r,n){let a=e.createURL(ma(t)).toString(),o={signal:r};if(n&&me(n.formMethod)){let{formMethod:i,formEncType:l}=n;o.method=i.toUpperCase(),l==="application/json"?(o.headers=new Headers({"Content-Type":l}),o.body=JSON.stringify(n.json)):l==="text/plain"?o.body=n.text:l==="application/x-www-form-urlencoded"&&n.formData?o.body=Wr(n.formData):o.body=n.formData}return new Request(a,o)}function Wr(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function Qn(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function nl(e,t,r,n,a){let o={},i=null,l,s=!1,u={};return r.forEach((c,h)=>{let p=t[h].route.id;if(T(!Ze(c),"Cannot handle redirect results in processLoaderData"),bt(c)){let D=Et(e,p),y=c.error;n&&(y=Object.values(n)[0],n=void 0),i=i||{},i[D.route.id]==null&&(i[D.route.id]=y),o[p]=void 0,s||(s=!0,l=Ji(c.error)?c.error.status:500),c.headers&&(u[p]=c.headers)}else $e(c)?(a.set(p,c.deferredData),o[p]=c.deferredData.data):o[p]=c.data,c.statusCode!=null&&c.statusCode!==200&&!s&&(l=c.statusCode),c.headers&&(u[p]=c.headers)}),n&&(i=n,o[Object.keys(n)[0]]=void 0),{loaderData:o,errors:i,statusCode:l||200,loaderHeaders:u}}function Zn(e,t,r,n,a,o,i,l){let{loaderData:s,errors:u}=nl(t,r,n,a,l);for(let c=0;c<o.length;c++){let{key:h,match:p,controller:D}=o[c];T(i!==void 0&&i[c]!==void 0,"Did not find corresponding fetcher result");let y=i[c];if(!(D&&D.signal.aborted))if(bt(y)){let v=Et(e.matches,p?.route.id);u&&u[v.route.id]||(u=W({},u,{[v.route.id]:y.error})),e.fetchers.delete(h)}else if(Ze(y))T(!1,"Unhandled fetcher revalidation redirect");else if($e(y))T(!1,"Unhandled fetcher deferred data");else{let v=Le(y.data);e.fetchers.set(h,v)}}return{loaderData:s,errors:u}}function ea(e,t,r,n){let a=W({},t);for(let o of r){let i=o.route.id;if(t.hasOwnProperty(i)?t[i]!==void 0&&(a[i]=t[i]):e[i]!==void 0&&o.route.loader&&(a[i]=e[i]),n&&n.hasOwnProperty(i))break}return a}function Et(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 ta(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 ce(e,t){let{pathname:r,routeId:n,method:a,type:o}=t===void 0?{}:t,i="Unknown Server Error",l="Unknown @remix-run/router error";return e===400?(i="Bad Request",a&&r&&n?l="You made a "+a+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":o==="defer-action"?l="defer() is not supported in actions":o==="invalid-body"&&(l="Unable to encode submission body")):e===403?(i="Forbidden",l='Route "'+n+'" does not match URL "'+r+'"'):e===404?(i="Not Found",l='No route matches URL "'+r+'"'):e===405&&(i="Method Not Allowed",a&&r&&n?l="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&&(l='Invalid request method "'+a.toUpperCase()+'"')),new et(e||500,i,new Error(l),!0)}function ra(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(Ze(r))return{result:r,idx:t}}}function ma(e){let t=typeof e=="string"?We(e):e;return xt(W({},t,{hash:""}))}function al(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function $e(e){return e.type===J.deferred}function bt(e){return e.type===J.error}function Ze(e){return(e&&e.type)===J.redirect}function ol(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 il(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function ll(e){return Gi.has(e.toLowerCase())}function me(e){return Yi.has(e.toLowerCase())}async function na(e,t,r,n,a,o){for(let i=0;i<r.length;i++){let l=r[i],s=t[i];if(!s)continue;let u=e.find(h=>h.route.id===s.route.id),c=u!=null&&!ha(u,s)&&(o&&o[s.route.id])!==void 0;if($e(l)&&(a||c)){let h=n[i];T(h,"Expected an AbortSignal for revalidating fetcher deferred result"),await pa(l,h,a).then(p=>{p&&(r[i]=p||r[i])})}}}async function pa(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:J.data,data:e.deferredData.unwrappedData}}catch(a){return{type:J.error,error:a}}return{type:J.data,data:e.deferredData.data}}}function Yr(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Kr(e,t){let r=typeof t=="string"?We(t).search:t.search;if(e[e.length-1].route.index&&Yr(r||""))return e[e.length-1];let n=sa(e);return n[n.length-1]}function aa(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:o,json:i}=e;if(!(!t||!r||!n)){if(a!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a};if(o!=null)return{formMethod:t,formAction:r,formEncType:n,formData:o,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:i,text:void 0}}}function $r(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 sl(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 Rt(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 ul(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 Le(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 cl(e,t){try{let r=e.sessionStorage.getItem(da);if(r){let n=JSON.parse(r);for(let[a,o]of Object.entries(n||{}))o&&Array.isArray(o)&&t.set(a,new Set(o||[]))}}catch{}}function dl(e,t){if(t.size>0){let r={};for(let[n,a]of t)r[n]=[...a];try{e.sessionStorage.setItem(da,JSON.stringify(r))}catch(n){Ve(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}var Z,Wn,J,Di,Ci,Ni,Mi,Ai,Oi,Fi,Jn,ze,Vi,Wi,Ki,et,ua,Yi,Xi,Gi,qi,Qi,Br,Jr,gt,ca,Zi,da,Hs,ga=Ut(()=>{(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Z||(Z={}));Wn="popstate";(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(J||(J={}));Di=new Set(["lazy","caseSensitive","path","id","index","children"]);Ci=/^:\w+$/,Ni=3,Mi=2,Ai=1,Oi=10,Fi=-2,Jn=e=>e==="*";ze=e=>e.join("/").replace(/\/\/+/g,"/"),Vi=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Wi=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Ki=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,et=class{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}};ua=["post","put","patch","delete"],Yi=new Set(ua),Xi=["get",...ua],Gi=new Set(Xi),qi=new Set([301,302,303,307,308]),Qi=new Set([307,308]),Br={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Jr={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},gt={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},ca=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Zi=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)}),da="remix-router-transitions";Hs=Symbol("deferred")});function de(){return de=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},de.apply(this,arguments)}function Qr(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,o;for(o=0;o<n.length;o++)a=n[o],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function er(e){return e!=null&&typeof e.tagName=="string"}function wl(e){return er(e)&&e.tagName.toLowerCase()==="button"}function El(e){return er(e)&&e.tagName.toLowerCase()==="form"}function bl(e){return er(e)&&e.tagName.toLowerCase()==="input"}function Sl(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function xl(e,t){return e.button===0&&(!t||t==="_self")&&!Sl(e)}function Dl(){if(Gt===null)try{new FormData(document.createElement("form"),0),Gt=!1}catch{Gt=!0}return Gt}function Gr(e){return e!=null&&!_l.has(e)?null:e}function Pl(e,t){let r,n,a,o,i;if(El(e)){let l=e.getAttribute("action");n=l?pe(l,t):null,r=e.getAttribute("method")||Qt,a=Gr(e.getAttribute("enctype"))||Xr,o=new FormData(e)}else if(wl(e)||bl(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||l.getAttribute("action");if(n=s?pe(s,t):null,r=e.getAttribute("formmethod")||l.getAttribute("method")||Qt,a=Gr(e.getAttribute("formenctype"))||Gr(l.getAttribute("enctype"))||Xr,o=new FormData(l,e),!Dl()){let{name:u,type:c,value:h}=e;if(c==="image"){let p=u?u+".":"";o.append(p+"x","0"),o.append(p+"y","0")}else u&&o.append(u,h)}}else{if(er(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Qt,n=null,a=Xr,i=e}return o&&a==="text/plain"&&(i=o,o=void 0),{action:n,method:r.toLowerCase(),encType:a,formData:o,body:i}}function wa(e,t){return fa({basename:t?.basename,future:de({},t?.future,{v7_prependBasename:!0}),history:oa({window:t?.window}),hydrationData:t?.hydrationData||Ml(),routes:e,mapRouteProperties:Vn,window:t?.window}).initialize()}function Ml(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=de({},t,{errors:Al(t.errors)})),t}function Al(e){if(!e)return null;let t=Object.entries(e),r={};for(let[n,a]of t)if(a&&a.__type==="RouteErrorResponse")r[n]=new et(a.status,a.statusText,a.data,a.internal===!0);else if(a&&a.__type==="Error"){if(a.__subType){let o=window[a.__subType];if(typeof o=="function")try{let i=new o(a.message);i.stack="",r[n]=i}catch{}}if(r[n]==null){let o=new Error(a.message);o.stack="",r[n]=o}}else r[n]=a;return r}function Fl(e){ya?ya(e):e()}function Sa(e){let{fallbackElement:t,router:r,future:n}=e,[a,o]=S.useState(r.state),[i,l]=S.useState(),[s,u]=S.useState({isTransitioning:!1}),[c,h]=S.useState(),[p,D]=S.useState(),[y,v]=S.useState(),w=S.useRef(new Map),{v7_startTransition:b}=n||{},O=S.useCallback(L=>{b?Fl(L):L()},[b]),_=S.useCallback((L,k)=>{let{deletedFetchers:z,unstable_viewTransitionOpts:ee}=k;z.forEach(X=>w.current.delete(X)),L.fetchers.forEach((X,oe)=>{X.data!==void 0&&w.current.set(oe,X.data)}),!ee||r.window==null||typeof r.window.document.startViewTransition!="function"?O(()=>o(L)):p&&c?(c.resolve(),p.skipTransition(),v({state:L,currentLocation:ee.currentLocation,nextLocation:ee.nextLocation})):(l(L),u({isTransitioning:!0,currentLocation:ee.currentLocation,nextLocation:ee.nextLocation}))},[r.window,p,c,w,O]);S.useLayoutEffect(()=>r.subscribe(_),[r,_]),S.useEffect(()=>{s.isTransitioning&&h(new qr)},[s.isTransitioning]),S.useEffect(()=>{if(c&&i&&r.window){let L=i,k=c.promise,z=r.window.document.startViewTransition(async()=>{O(()=>o(L)),await k});z.finished.finally(()=>{h(void 0),D(void 0),l(void 0),u({isTransitioning:!1})}),D(z)}},[O,i,c,r.window]),S.useEffect(()=>{c&&i&&a.location.key===i.location.key&&c.resolve()},[c,p,a.location,i]),S.useEffect(()=>{!s.isTransitioning&&y&&(l(y.state),u({isTransitioning:!0,currentLocation:y.currentLocation,nextLocation:y.nextLocation}),v(void 0))},[s.isTransitioning,y]);let d=S.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:L=>r.navigate(L),push:(L,k,z)=>r.navigate(L,{state:k,preventScrollReset:z?.preventScrollReset}),replace:(L,k,z)=>r.navigate(L,{replace:!0,state:k,preventScrollReset:z?.preventScrollReset})}),[r]),P=r.basename||"/",I=S.useMemo(()=>({router:r,navigator:d,static:!1,basename:P}),[r,d,P]);return S.createElement(S.Fragment,null,S.createElement(Ee.Provider,{value:I},S.createElement(_e.Provider,{value:a},S.createElement(ba.Provider,{value:w.current},S.createElement(Ea.Provider,{value:s},S.createElement(jr,{basename:P,location:a.location,navigationType:a.historyAction,navigator:d},a.initialized?S.createElement(Ul,{routes:r.routes,state:a}):t))))),null)}function Ul(e){let{routes:t,state:r}=e;return Bn(t,void 0,r)}function tr(e){let t=S.useContext(Ee);return t||T(!1),t}function _a(e){let t=S.useContext(_e);return t||T(!1),t}function Il(e,t){let{target:r,replace:n,state:a,preventScrollReset:o,relative:i,unstable_viewTransition:l}=t===void 0?{}:t,s=Wt(),u=ae(),c=Pe(e,{relative:i});return S.useCallback(h=>{if(xl(h,r)){h.preventDefault();let p=n!==void 0?n:ke(u)===ke(c);s(e,{replace:p,state:a,preventScrollReset:o,relative:i,unstable_viewTransition:l})}},[u,s,c,n,a,r,e,o,i,l])}function kl(){if(typeof document>"u")throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.")}function en(){let{router:e}=tr(tt.UseSubmit),{basename:t}=S.useContext(se),r=Fr();return S.useCallback(function(n,a){a===void 0&&(a={}),kl();let{action:o,method:i,encType:l,formData:s,body:u}=Pl(n,t);if(a.navigate===!1){let c=a.fetcherKey||Pa();e.fetch(c,r,a.action||o,{preventScrollReset:a.preventScrollReset,formData:s,body:u,formMethod:a.method||i,formEncType:a.encType||l})}else e.navigate(a.action||o,{preventScrollReset:a.preventScrollReset,formData:s,body:u,formMethod:a.method||i,formEncType:a.encType||l,replace:a.replace,state:a.state,fromRouteId:r,unstable_viewTransition:a.unstable_viewTransition})},[e,t,r])}function La(e,t){let{relative:r}=t===void 0?{}:t,{basename:n}=S.useContext(se),a=S.useContext(ue);a||T(!1);let[o]=a.matches.slice(-1),i=de({},Pe(e||".",{relative:r})),l=ae();if(e==null&&(i.search=l.search,o.route.index)){let s=new URLSearchParams(i.search);s.delete("index"),i.search=s.toString()?"?"+s.toString():""}return(!e||e===".")&&o.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(i.pathname=i.pathname==="/"?n:ze([n,i.pathname])),ke(i)}function Ca(e){var t;let{key:r}=e===void 0?{}:e,{router:n}=tr(tt.UseFetcher),a=_a(Zt.UseFetcher),o=S.useContext(ba),i=S.useContext(ue),l=(t=i.matches[i.matches.length-1])==null?void 0:t.route.id;o||T(!1),i||T(!1),l==null&&T(!1);let[s,u]=S.useState(r||"");s||u(Pa()),S.useEffect(()=>(n.getFetcher(s),()=>{n.deleteFetcher(s)}),[n,s]);let c=S.useCallback(b=>{l||T(!1),n.fetch(s,l,b)},[s,l,n]),h=en(),p=S.useCallback((b,O)=>{h(b,de({},O,{navigate:!1,fetcherKey:s}))},[s,h]),D=S.useMemo(()=>S.forwardRef((O,_)=>S.createElement(Da,de({},O,{navigate:!1,fetcherKey:s,ref:_}))),[s]),y=a.fetchers.get(s)||Jr,v=o.get(s);return S.useMemo(()=>de({Form:D,submit:p,load:c},y,{data:v}),[D,p,c,y,v])}function Na(e){let{getKey:t,storageKey:r}=e===void 0?{}:e,{router:n}=tr(tt.UseScrollRestoration),{restoreScrollPosition:a,preventScrollReset:o}=_a(Zt.UseScrollRestoration),{basename:i}=S.useContext(se),l=ae(),s=Qe(),u=qe();S.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),Bl(S.useCallback(()=>{if(u.state==="idle"){let c=(t?t(l,s):null)||l.key;qt[c]=window.scrollY}try{sessionStorage.setItem(r||va,JSON.stringify(qt))}catch{}window.history.scrollRestoration="auto"},[r,t,u.state,l,s])),typeof document<"u"&&(S.useLayoutEffect(()=>{try{let c=sessionStorage.getItem(r||va);c&&(qt=JSON.parse(c))}catch{}},[r]),S.useLayoutEffect(()=>{let c=t&&i!=="/"?(p,D)=>t(de({},p,{pathname:pe(p.pathname,i)||p.pathname}),D):t,h=n?.enableScrollRestoration(qt,()=>window.scrollY,c);return()=>h&&h()},[n,i,t]),S.useLayoutEffect(()=>{if(a!==!1){if(typeof a=="number"){window.scrollTo(0,a);return}if(l.hash){let c=document.getElementById(decodeURIComponent(l.hash.slice(1)));if(c){c.scrollIntoView();return}}o!==!0&&window.scrollTo(0,0)}},[l,a,o]))}function Bl(e,t){let{capture:r}=t||{};S.useEffect(()=>{let n=r!=null?{capture:r}:void 0;return window.addEventListener("pagehide",e,n),()=>{window.removeEventListener("pagehide",e,n)}},[e,r])}function Ma(e,t){t===void 0&&(t={});let r=S.useContext(Ea);r==null&&T(!1);let{basename:n}=tr(tt.useViewTransitionState),a=Pe(e,{relative:t.relative});if(!r.isTransitioning)return!1;let o=pe(r.currentLocation.pathname,n)||r.currentLocation.pathname,i=pe(r.nextLocation.pathname,n)||r.nextLocation.pathname;return Xt(a.pathname,i)!=null||Xt(a.pathname,o)!=null}var S,Qt,Xr,Gt,_l,Ll,Cl,Nl,Ea,ba,Ol,ya,qr,Tl,jl,Zr,xa,Da,tt,Zt,Hl,Pa,va,qt,Ce=Ut(()=>{S=je(ve());kr();kr();ga();Qt="get",Xr="application/x-www-form-urlencoded";Gt=null;_l=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);Ll=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],Cl=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],Nl=["fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","unstable_viewTransition"];Ea=S.createContext({isTransitioning:!1}),ba=S.createContext(new Map),Ol="startTransition",ya=S[Ol];qr=class{constructor(){this.status="pending",this.promise=new Promise((t,r)=>{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",t(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",r(n))}})}};Tl=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",jl=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Zr=S.forwardRef(function(t,r){let{onClick:n,relative:a,reloadDocument:o,replace:i,state:l,target:s,to:u,preventScrollReset:c,unstable_viewTransition:h}=t,p=Qr(t,Ll),{basename:D}=S.useContext(se),y,v=!1;if(typeof u=="string"&&jl.test(u)&&(y=u,Tl))try{let _=new URL(window.location.href),d=u.startsWith("//")?new URL(_.protocol+u):new URL(u),P=pe(d.pathname,D);d.origin===_.origin&&P!=null?u=P+d.search+d.hash:v=!0}catch{}let w=Be(u,{relative:a}),b=Il(u,{replace:i,state:l,target:s,preventScrollReset:c,relative:a,unstable_viewTransition:h});function O(_){n&&n(_),_.defaultPrevented||b(_)}return S.createElement("a",de({},p,{href:y||w,onClick:v||o?n:O,ref:r,target:s}))}),xa=S.forwardRef(function(t,r){let{"aria-current":n="page",caseSensitive:a=!1,className:o="",end:i=!1,style:l,to:s,unstable_viewTransition:u,children:c}=t,h=Qr(t,Cl),p=Pe(s,{relative:h.relative}),D=ae(),y=S.useContext(_e),{navigator:v}=S.useContext(se),w=y!=null&&Ma(p)&&u===!0,b=v.encodeLocation?v.encodeLocation(p).pathname:p.pathname,O=D.pathname,_=y&&y.navigation&&y.navigation.location?y.navigation.location.pathname:null;a||(O=O.toLowerCase(),_=_?_.toLowerCase():null,b=b.toLowerCase());let d=O===b||!i&&O.startsWith(b)&&O.charAt(b.length)==="/",P=_!=null&&(_===b||!i&&_.startsWith(b)&&_.charAt(b.length)==="/"),I={isActive:d,isPending:P,isTransitioning:w},L=d?n:void 0,k;typeof o=="function"?k=o(I):k=[o,d?"active":null,P?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let z=typeof l=="function"?l(I):l;return S.createElement(Zr,de({},h,{"aria-current":L,className:k,ref:r,style:z,to:s,unstable_viewTransition:u}),typeof c=="function"?c(I):c)}),Da=S.forwardRef((e,t)=>{let{fetcherKey:r,navigate:n,reloadDocument:a,replace:o,state:i,method:l=Qt,action:s,onSubmit:u,relative:c,preventScrollReset:h,unstable_viewTransition:p}=e,D=Qr(e,Nl),y=en(),v=La(s,{relative:c}),w=l.toLowerCase()==="get"?"get":"post";return S.createElement("form",de({ref:t,method:w,action:v,onSubmit:a?u:O=>{if(u&&u(O),O.defaultPrevented)return;O.preventDefault();let _=O.nativeEvent.submitter,d=_?.getAttribute("formmethod")||l;y(_||O.currentTarget,{fetcherKey:r,method:d,navigate:n,replace:o,state:i,relative:c,preventScrollReset:h,unstable_viewTransition:p})}},D))});(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(tt||(tt={}));(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Zt||(Zt={}));Hl=0,Pa=()=>"__"+String(++Hl)+"__";va="react-router-scroll-positions",qt={}});var fo=Tt(fr=>{"use strict";var Rs=ve(),ws=Symbol.for("react.element"),Es=Symbol.for("react.fragment"),bs=Object.prototype.hasOwnProperty,Ss=Rs.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,xs={key:!0,ref:!0,__self:!0,__source:!0};function co(e,t,r){var n,a={},o=null,i=null;r!==void 0&&(o=""+r),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(i=t.ref);for(n in t)bs.call(t,n)&&!xs.hasOwnProperty(n)&&(a[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)a[n]===void 0&&(a[n]=t[n]);return{$$typeof:ws,type:e,key:o,ref:i,props:a,_owner:Ss.current}}fr.Fragment=Es;fr.jsx=co;fr.jsxs=co});var Ds=Tt((ec,ho)=>{"use strict";ho.exports=fo()});var ie=je(ve());Ce();function Y(){return Y=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},Y.apply(this,arguments)}var R=je(ve());Ce();function rt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}Ce();async function rr(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch{return window.location.reload(),new Promise(()=>{})}}function Aa(e,t,r){let n=e.map(o=>{var i;let l=t[o.route.id],s=r.routes[o.route.id];return[s.css?s.css.map(u=>({rel:"stylesheet",href:u})):[],((i=l.links)===null||i===void 0?void 0:i.call(l))||[]]}).flat(2),a=Vl(e,r);return Ta(n,a)}async function ar(e,t){var r,n;if(!e.css&&!t.links||!Kl())return;let a=[((r=e.css)===null||r===void 0?void 0:r.map(l=>({rel:"stylesheet",href:l})))??[],((n=t.links)===null||n===void 0?void 0:n.call(t))??[]].flat(1);if(a.length===0)return;let o=[];for(let l of a)!or(l)&&l.rel==="stylesheet"&&o.push({...l,rel:"preload",as:"style"});let i=o.filter(l=>(!l.media||window.matchMedia(l.media).matches)&&!document.querySelector(`link[rel="stylesheet"][href="${l.href}"]`));await Promise.all(i.map($l))}async function $l(e){return new Promise(t=>{let r=document.createElement("link");Object.assign(r,e);function n(){document.head.contains(r)&&document.head.removeChild(r)}r.onload=()=>{n(),t()},r.onerror=()=>{n(),t()},document.head.appendChild(r)})}function or(e){return e!=null&&typeof e.page=="string"}function zl(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function Oa(e,t,r){let n=await Promise.all(e.map(async a=>{let o=await rr(t.routes[a.route.id],r);return o.links?o.links():[]}));return Ta(n.flat(1).filter(zl).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function tn(e,t,r,n,a,o){let i=ja(e),l=(c,h)=>r[h]?c.route.id!==r[h].route.id:!0,s=(c,h)=>{var p;return r[h].pathname!==c.pathname||((p=r[h].route.path)===null||p===void 0?void 0:p.endsWith("*"))&&r[h].params["*"]!==c.params["*"]};return o==="data"&&a.search!==i.search?t.filter((c,h)=>{if(!n.routes[c.route.id].hasLoader)return!1;if(l(c,h)||s(c,h))return!0;if(c.route.shouldRevalidate){var D;let y=c.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:((D=r[0])===null||D===void 0?void 0:D.params)||{},nextUrl:new URL(e,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):t.filter((c,h)=>{let p=n.routes[c.route.id];return(o==="assets"||p.hasLoader)&&(l(c,h)||s(c,h))})}function Fa(e,t,r){let n=ja(e);return rn(t.filter(a=>r.routes[a.route.id].hasLoader).map(a=>{let{pathname:o,search:i}=n,l=new URLSearchParams(i);return l.set("_data",a.route.id),`${o}?${l}`}))}function Ua(e,t){return rn(e.map(r=>{let n=t.routes[r.route.id],a=[n.module];return n.imports&&(a=a.concat(n.imports)),a}).flat(1))}function Vl(e,t){return rn(e.map(r=>{let n=t.routes[r.route.id],a=[n.module];return n.imports&&(a=a.concat(n.imports)),a}).flat(1))}function rn(e){return[...new Set(e)]}function Wl(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}function Ta(e,t){let r=new Set,n=new Set(t);return e.reduce((a,o)=>{if(t&&!or(o)&&o.as==="script"&&o.href&&n.has(o.href))return a;let l=JSON.stringify(Wl(o));return r.has(l)||(r.add(l),a.push({key:l,link:o})),a},[])}function ja(e){let t=he(e);return t.search===void 0&&(t.search=""),t}var nr;function Kl(){if(nr!==void 0)return nr;let e=document.createElement("link");return nr=e.relList.supports("preload"),e=null,nr}var Jl={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},Yl=/[&><\u2028\u2029]/g;function Dt(e){return e.replace(Yl,t=>Jl[t])}function nn(e){return{__html:e}}function ka(){let e=R.useContext(Ee);return rt(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function ir(){let e=R.useContext(_e);return rt(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Pt=R.createContext(void 0);Pt.displayName="Remix";function Lt(){let e=R.useContext(Pt);return rt(e,"You must render this element inside a <Remix> element"),e}function Ha(e,t){let[r,n]=R.useState(!1),[a,o]=R.useState(!1),{onFocus:i,onBlur:l,onMouseEnter:s,onMouseLeave:u,onTouchStart:c}=t,h=R.useRef(null);R.useEffect(()=>{if(e==="render"&&o(!0),e==="viewport"){let y=w=>{w.forEach(b=>{o(b.isIntersecting)})},v=new IntersectionObserver(y,{threshold:.5});return h.current&&v.observe(h.current),()=>{v.disconnect()}}},[e]);let p=()=>{e==="intent"&&n(!0)},D=()=>{e==="intent"&&(n(!1),o(!1))};return R.useEffect(()=>{if(r){let y=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(y)}}},[r]),[a,h,{onFocus:_t(i,p),onBlur:_t(l,D),onMouseEnter:_t(s,p),onMouseLeave:_t(u,D),onTouchStart:_t(c,p)}]}var Ba=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,$a=R.forwardRef(({to:e,prefetch:t="none",...r},n)=>{let a=typeof e=="string"&&Ba.test(e),o=Be(e),[i,l,s]=Ha(t,r);return R.createElement(R.Fragment,null,R.createElement(xa,Y({},r,s,{ref:Wa(n,l),to:e})),i&&!a?R.createElement(lr,{page:o}):null)});$a.displayName="NavLink";var za=R.forwardRef(({to:e,prefetch:t="none",...r},n)=>{let a=typeof e=="string"&&Ba.test(e),o=Be(e),[i,l,s]=Ha(t,r);return R.createElement(R.Fragment,null,R.createElement(Zr,Y({},r,s,{ref:Wa(n,l),to:e})),i&&!a?R.createElement(lr,{page:o}):null)});za.displayName="Link";function _t(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function Xl(){let{manifest:e,routeModules:t,criticalCss:r}=Lt(),{errors:n,matches:a}=ir(),o=n?a.slice(0,a.findIndex(l=>n[l.route.id])+1):a,i=R.useMemo(()=>Aa(o,t,e),[o,t,e]);return R.createElement(R.Fragment,null,r?R.createElement("style",{dangerouslySetInnerHTML:{__html:r}}):null,i.map(({key:l,link:s})=>or(s)?R.createElement(lr,Y({key:l},s)):R.createElement("link",Y({key:l},s))))}function lr({page:e,...t}){let{router:r}=ka(),n=R.useMemo(()=>De(r.routes,e),[r.routes,e]);return n?R.createElement(ql,Y({page:e,matches:n},t)):(console.warn(`Tried to prefetch ${e} but no routes matched.`),null)}function Gl(e){let{manifest:t,routeModules:r}=Lt(),[n,a]=R.useState([]);return R.useEffect(()=>{let o=!1;return Oa(e,t,r).then(i=>{o||a(i)}),()=>{o=!0}},[e,t,r]),n}function ql({page:e,matches:t,...r}){let n=ae(),{manifest:a}=Lt(),{matches:o}=ir(),i=R.useMemo(()=>tn(e,t,o,a,n,"data"),[e,t,o,a,n]),l=R.useMemo(()=>tn(e,t,o,a,n,"assets"),[e,t,o,a,n]),s=R.useMemo(()=>Fa(e,i,a),[i,e,a]),u=R.useMemo(()=>Ua(l,a),[l,a]),c=Gl(l);return R.createElement(R.Fragment,null,s.map(h=>R.createElement("link",Y({key:h,rel:"prefetch",as:"fetch",href:h},r))),u.map(h=>R.createElement("link",Y({key:h,rel:"modulepreload",href:h},r))),c.map(({key:h,link:p})=>R.createElement("link",Y({key:h},p))))}function Ql(){let{routeModules:e}=Lt(),{errors:t,matches:r,loaderData:n}=ir(),a=ae(),o=r,i=null;if(t){let c=r.findIndex(h=>t[h.route.id]);o=r.slice(0,c+1),i=t[r[c].route.id]}let l=[],s=null,u=[];for(let c=0;c<o.length;c++){let h=o[c],p=h.route.id,D=n[p],y=h.params,v=e[p],w=[],b={id:p,data:D,meta:[],params:h.params,pathname:h.pathname,handle:h.route.handle,error:i};if(u[c]=b,v!=null&&v.meta?w=typeof v.meta=="function"?v.meta({data:D,params:y,location:a,matches:u,error:i}):Array.isArray(v.meta)?[...v.meta]:v.meta:s&&(w=[...s]),w=w||[],!Array.isArray(w))throw new Error("The route at "+h.route.path+` returns an invalid value. All route meta functions must return an array of meta objects.
3
-
4
- To reference the meta function API, see https://remix.run/route/meta`);b.meta=w,u[c]=b,l=[...w],s=l}return R.createElement(R.Fragment,null,l.flat().map(c=>{if(!c)return null;if("tagName"in c){let{tagName:h,...p}=c;return Zl(h)?R.createElement(h,Y({key:JSON.stringify(p)},p)):(console.warn(`A meta object uses an invalid tagName: ${h}. Expected either 'link' or 'meta'`),null)}if("title"in c)return R.createElement("title",{key:"title"},String(c.title));if("charset"in c&&(c.charSet??=c.charset,delete c.charset),"charSet"in c&&c.charSet!=null)return typeof c.charSet=="string"?R.createElement("meta",{key:"charSet",charSet:c.charSet}):null;if("script:ld+json"in c)try{let h=JSON.stringify(c["script:ld+json"]);return R.createElement("script",{key:`script:ld+json:${h}`,type:"application/ld+json",dangerouslySetInnerHTML:{__html:h}})}catch{return null}return R.createElement("meta",Y({key:JSON.stringify(c)},c))}))}function Zl(e){return typeof e=="string"&&/^(meta|link)$/.test(e)}function Va(e){return R.createElement(Ir,e)}var an=!1;function es(e){let{manifest:t,serverHandoffString:r,abortDelay:n,serializeError:a}=Lt(),{router:o,static:i,staticContext:l}=ka(),{matches:s}=ir(),u=qe();R.useEffect(()=>{an=!0},[]);let c=(_,d)=>{let P;return a&&d instanceof Error?P=a(d):P=d,`${JSON.stringify(_)}:__remixContext.p(!1, ${Dt(JSON.stringify(P))})`},h=(_,d,P)=>{let I;try{I=JSON.stringify(P)}catch(L){return c(d,L)}return`${JSON.stringify(d)}:__remixContext.p(${Dt(I)})`},p=(_,d,P)=>{let I;return a&&P instanceof Error?I=a(P):I=P,`__remixContext.r(${JSON.stringify(_)}, ${JSON.stringify(d)}, !1, ${Dt(JSON.stringify(I))})`},D=(_,d,P)=>{let I;try{I=JSON.stringify(P)}catch(L){return p(_,d,L)}return`__remixContext.r(${JSON.stringify(_)}, ${JSON.stringify(d)}, ${Dt(I)})`},y=[],v=R.useMemo(()=>{var _;let d=l?`window.__remixContext = ${r};`:" ",P=l?.activeDeferreds;d+=P?["__remixContext.p = function(v,e,p,x) {"," if (typeof e !== 'undefined') {",` x=new Error("Unexpected Server Error");
5
- x.stack=undefined;`," p=Promise.reject(x);"," } else {"," p=Promise.resolve(v);"," }"," return p;","};","__remixContext.n = function(i,k) {"," __remixContext.t = __remixContext.t || {};"," __remixContext.t[i] = __remixContext.t[i] || {};"," let p = new Promise((r, e) => {__remixContext.t[i][k] = {r:(v)=>{r(v);},e:(v)=>{e(v);}};});",typeof n=="number"?`setTimeout(() => {if(typeof p._error !== "undefined" || typeof p._data !== "undefined"){return;} __remixContext.t[i][k].e(new Error("Server timeout."))}, ${n});`:""," return p;","};","__remixContext.r = function(i,k,v,e,p,x) {"," p = __remixContext.t[i][k];"," if (typeof e !== 'undefined') {",` x=new Error("Unexpected Server Error");
6
- x.stack=undefined;`," p.e(x);"," } else {"," p.r(v);"," }","};"].join(`
7
- `)+Object.entries(P).map(([L,k])=>{let z=new Set(k.pendingKeys),ee=k.deferredKeys.map(X=>{if(z.has(X))return y.push(R.createElement(Ia,{key:`${L} | ${X}`,deferredData:k,routeId:L,dataKey:X,scriptProps:e,serializeData:D,serializeError:p})),`${JSON.stringify(X)}:__remixContext.n(${JSON.stringify(L)}, ${JSON.stringify(X)})`;{let oe=k.data[X];return typeof oe._error<"u"?c(X,oe._error):h(L,X,oe._data)}}).join(`,
8
- `);return`Object.assign(__remixContext.state.loaderData[${JSON.stringify(L)}], {${ee}});`}).join(`
9
- `)+(y.length>0?`__remixContext.a=${y.length};`:""):"";let I=i?`${(_=t.hmr)!==null&&_!==void 0&&_.runtime?`import ${JSON.stringify(t.hmr.runtime)};`:""}import ${JSON.stringify(t.url)};
10
- ${s.map((L,k)=>`import * as route${k} from ${JSON.stringify(t.routes[L.route.id].module)};`).join(`
11
- `)}
12
- window.__remixRouteModules = {${s.map((L,k)=>`${JSON.stringify(L.route.id)}:route${k}`).join(",")}};
13
-
14
- import(${JSON.stringify(t.entry.module)});`:" ";return R.createElement(R.Fragment,null,R.createElement("script",Y({},e,{suppressHydrationWarning:!0,dangerouslySetInnerHTML:nn(d),type:void 0})),R.createElement("script",Y({},e,{suppressHydrationWarning:!0,dangerouslySetInnerHTML:nn(I),type:"module",async:!0})))},[]);if(!i&&typeof __remixContext=="object"&&__remixContext.a)for(let _=0;_<__remixContext.a;_++)y.push(R.createElement(Ia,{key:_,scriptProps:e,serializeData:D,serializeError:p}));let w=R.useMemo(()=>{if(u.location){let _=De(o.routes,u.location);return rt(_,`No routes match path "${u.location.pathname}"`),_}return[]},[u.location,o.routes]),b=s.concat(w).map(_=>{let d=t.routes[_.route.id];return(d.imports||[]).concat([d.module])}).flat(1),O=an?[]:t.entry.imports.concat(b);return an?null:R.createElement(R.Fragment,null,R.createElement("link",{rel:"modulepreload",href:t.entry.module,crossOrigin:e.crossOrigin}),rs(O).map(_=>R.createElement("link",{key:_,rel:"modulepreload",href:_,crossOrigin:e.crossOrigin})),v,y)}function Ia({dataKey:e,deferredData:t,routeId:r,scriptProps:n,serializeData:a,serializeError:o}){return typeof document>"u"&&t&&e&&r&&rt(t.pendingKeys.includes(e),`Deferred data for route ${r} with key ${e} was not pending but tried to render a script for it.`),R.createElement(R.Suspense,{fallback:typeof document>"u"&&t&&e&&r?null:R.createElement("script",Y({},n,{async:!0,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:" "}}))},typeof document>"u"&&t&&e&&r?R.createElement(Va,{resolve:t.data[e],errorElement:R.createElement(ts,{dataKey:e,routeId:r,scriptProps:n,serializeError:o}),children:i=>R.createElement("script",Y({},n,{async:!0,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:a(r,e,i)}}))}):R.createElement("script",Y({},n,{async:!0,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:" "}})))}function ts({dataKey:e,routeId:t,scriptProps:r,serializeError:n}){let a=Yt();return R.createElement("script",Y({},r,{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:n(t,e,a)}}))}function rs(e){return[...new Set(e)]}function ns(){return Ur()}function as(e={}){return Ca(e)}var os=()=>null;function Wa(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var re=je(ve());Ce();var sr=class extends re.Component{constructor(t){super(t),this.state={error:t.error||null,location:t.location}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location?{error:t.error||null,location:t.location}:{error:t.error||r.error,location:r.location}}render(){return this.state.error?re.createElement(on,{error:this.state.error}):this.props.children}};function on({error:e}){if(console.error(e),He(e))return re.createElement(Ka,{title:"Unhandled Thrown Response!"},re.createElement("h1",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem"}},e.status," ",e.statusText));let t;if(e instanceof Error)t=e;else{let r=e==null?"Unknown Error":typeof e=="object"&&"toString"in e?e.toString():JSON.stringify(e);t=new Error(r)}return re.createElement(Ka,{title:"Application Error!"},re.createElement("main",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem"}},re.createElement("h1",{style:{fontSize:"24px"}},"Application Error"),re.createElement("pre",{style:{padding:"2rem",background:"hsla(10, 50%, 50%, 0.1)",color:"red",overflow:"auto"}},t.stack)))}function Ka({title:e,children:t}){return re.createElement("html",{lang:"en"},re.createElement("head",null,re.createElement("meta",{charSet:"utf-8"}),re.createElement("meta",{name:"viewport",content:"width=device-width,initial-scale=1,viewport-fit=cover"}),re.createElement("title",null,e)),re.createElement("body",null,t,re.createElement("script",{dangerouslySetInnerHTML:{__html:`
15
- console.log(
16
- "\u{1F4BF} Hey developer\u{1F44B}. You can provide a way better UX than this when your app throws errors. Check out https://remix.run/guides/errors for more information."
17
- );
18
- `}})))}var Ja;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Ja||(Ja={}));function Ya(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}var Xa;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Xa||(Xa={}));var nt=class extends Error{},ur=class{constructor(t,r){this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],Ya(t&&typeof t=="object"&&!Array.isArray(t),"defer() only accepts plain objects");let n;this.abortPromise=new Promise((o,i)=>n=i),this.controller=new AbortController;let a=()=>n(new nt("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",a),this.controller.signal.addEventListener("abort",a),this.data=Object.entries(t).reduce((o,i)=>{let[l,s]=i;return Object.assign(o,{[l]:this.trackPromise(l,s)})},{}),this.done&&this.unlistenAbortSignal(),this.init=r}trackPromise(t,r){if(!(r instanceof Promise))return r;this.deferredKeys.push(t),this.pendingKeysSet.add(t);let n=Promise.race([r,this.abortPromise]).then(a=>this.onSettle(n,t,void 0,a),a=>this.onSettle(n,t,a));return n.catch(()=>{}),Object.defineProperty(n,"_tracked",{get:()=>!0}),n}onSettle(t,r,n,a){if(this.controller.signal.aborted&&n instanceof nt)return this.unlistenAbortSignal(),Object.defineProperty(t,"_error",{get:()=>n}),Promise.reject(n);if(this.pendingKeysSet.delete(r),this.done&&this.unlistenAbortSignal(),n===void 0&&a===void 0){let o=new Error('Deferred data for key "'+r+'" resolved/rejected with `undefined`, you must resolve/reject with a value or `null`.');return Object.defineProperty(t,"_error",{get:()=>o}),this.emit(!1,r),Promise.reject(o)}return a===void 0?(Object.defineProperty(t,"_error",{get:()=>n}),this.emit(!1,r),Promise.reject(n)):(Object.defineProperty(t,"_data",{get:()=>a}),this.emit(!1,r),a)}emit(t,r){this.subscribers.forEach(n=>n(t,r))}subscribe(t){return this.subscribers.add(t),()=>this.subscribers.delete(t)}cancel(){this.controller.abort(),this.pendingKeysSet.forEach((t,r)=>this.pendingKeysSet.delete(r)),this.emit(!0)}async resolveData(t){let r=!1;if(!this.done){let n=()=>this.cancel();t.addEventListener("abort",n),r=await new Promise(a=>{this.subscribe(o=>{t.removeEventListener("abort",n),(o||this.done)&&a(o)})})}return r}get done(){return this.pendingKeysSet.size===0}get unwrappedData(){return Ya(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]:ls(a)})},{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}};function is(e){return e instanceof Promise&&e._tracked===!0}function ls(e){if(!is(e))return e;if(e._error)throw e._error;return e._data}var at=class{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}};var Ga=["post","put","patch","delete"],gu=new Set(Ga),ss=["get",...Ga],yu=new Set(ss);var vu=Symbol("deferred");function qa(e){if(!e)return null;let t=Object.entries(e),r={};for(let[n,a]of t)if(a&&a.__type==="RouteErrorResponse")r[n]=new at(a.status,a.statusText,a.data,a.internal===!0);else if(a&&a.__type==="Error"){if(a.__subType){let o=window[a.__subType];if(typeof o=="function")try{let i=new o(a.message);i.stack=a.stack,r[n]=i}catch{}}if(r[n]==null){let o=new Error(a.message);o.stack=a.stack,r[n]=o}}else r[n]=a;return r}var oo=je(ve());Ce();function Za(e){return e.headers.get("X-Remix-Catch")!=null}function us(e){return e.headers.get("X-Remix-Error")!=null}function cs(e){return ds(e)&&e.status>=400&&e.headers.get("X-Remix-Error")==null&&e.headers.get("X-Remix-Catch")==null&&e.headers.get("X-Remix-Response")==null}function eo(e){return e.headers.get("X-Remix-Redirect")!=null}function to(e){var t;return!!((t=e.headers.get("Content-Type"))!==null&&t!==void 0&&t.match(/text\/remix-deferred/))}function ds(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}async function ln(e,t,r=0){let n=new URL(e.url);n.searchParams.set("_data",t);let a={signal:e.signal};if(e.method!=="GET"){a.method=e.method;let l=e.headers.get("Content-Type");l&&/\bapplication\/json\b/.test(l)?(a.headers={"Content-Type":l},a.body=JSON.stringify(await e.json())):l&&/\btext\/plain\b/.test(l)?(a.headers={"Content-Type":l},a.body=await e.text()):l&&/\bapplication\/x-www-form-urlencoded\b/.test(l)?a.body=new URLSearchParams(await e.text()):a.body=await e.formData()}r>0&&await new Promise(l=>setTimeout(l,5**r*10));let o=window.__remixRevalidation,i=await fetch(n.href,a).catch(l=>{if(typeof o=="number"&&o===window.__remixRevalidation&&l?.name==="TypeError"&&r<3)return ln(e,t,r+1);throw l});if(us(i)){let l=await i.json(),s=new Error(l.message);return s.stack=l.stack,s}if(cs(i)){let l=await i.text(),s=new Error(l);return s.stack=void 0,s}return i}var fs="__deferred_promise:";async function ro(e){if(!e)throw new Error("parseDeferredReadableStream requires stream argument");let t,r={};try{let n=hs(e),o=(await n.next()).value;if(!o)throw new Error("no critical data");let i=JSON.parse(o);if(typeof i=="object"&&i!==null)for(let[l,s]of Object.entries(i))typeof s!="string"||!s.startsWith(fs)||(t=t||{},t[l]=new Promise((u,c)=>{r[l]={resolve:h=>{u(h),delete r[l]},reject:h=>{c(h),delete r[l]}}}));return(async()=>{try{for await(let l of n){let[s,...u]=l.split(":"),c=u.join(":"),h=JSON.parse(c);if(s==="data")for(let[p,D]of Object.entries(h))r[p]&&r[p].resolve(D);else if(s==="error")for(let[p,D]of Object.entries(h)){let y=new Error(D.message);y.stack=D.stack,r[p]&&r[p].reject(y)}}for(let[l,s]of Object.entries(r))s.reject(new nt(`Deferred ${l} will never be resolved`))}catch(l){for(let s of Object.values(r))s.reject(l)}})(),new ur({...i,...t})}catch(n){for(let a of Object.values(r))a.reject(n);throw n}}async function*hs(e){let t=e.getReader(),r=[],n=[],a=!1,o=new TextEncoder,i=new TextDecoder,l=async()=>{if(n.length>0)return n.shift();for(;!a&&n.length===0;){let u=await t.read();if(u.done){a=!0;break}r.push(u.value);try{let h=i.decode(Qa(...r)).split(`
19
-
20
- `);if(h.length>=2&&(n.push(...h.slice(0,-1)),r=[o.encode(h.slice(-1).join(`
21
-
22
- `))]),n.length>0)break}catch{continue}}return n.length>0||r.length>0&&(n=i.decode(Qa(...r)).split(`
23
-
24
- `).filter(c=>c),r=[]),n.shift()},s=await l();for(;s;)yield s,s=await l()}function Qa(...e){let t=new Uint8Array(e.reduce((n,a)=>n+a.length,0)),r=0;for(let n of e)t.set(n,r),r+=n.length;return t}function io(e){let t={};return Object.values(e).forEach(r=>{let n=r.parentId||"";t[n]||(t[n]=[]),t[n].push(r)}),t}function lo(e,t,r,n){return cr(t,r,n,"",io(t),e)}function cr(e,t,r,n="",a=io(e),o){return(a[n]||[]).map(i=>{let l=t?.[i.id],s={id:i.id,index:i.index,path:i.path,async loader({request:c}){let h=t[i.id]?ar(i,t[i.id]):Promise.resolve();try{return i.hasLoader?ao(c,i):null}finally{await h}},async action({request:c}){let h=t[i.id]?ar(i,t[i.id]):Promise.resolve();try{if(!i.hasAction){let p=`Route "${i.id}" does not have an action, but you are trying to submit to it. To fix this, please add an \`action\` function to the route`;return console.error(p),Promise.reject(new at(405,"Method Not Allowed",new Error(p),!0))}return ao(c,i)}finally{await h}},...l?{Component:so(l),ErrorBoundary:l.ErrorBoundary?l.ErrorBoundary:i.id==="root"?()=>oo.createElement(on,{error:pt()}):void 0,handle:l.handle,shouldRevalidate:o?no(i.id,l.shouldRevalidate,o):l.shouldRevalidate}:{lazy:async()=>{let c=await ms(i,t);return o&&(c.shouldRevalidate=no(i.id,c.shouldRevalidate,o)),c}}},u=cr(e,t,r,i.id,a,o);return u.length>0&&(s.children=u),s})}function no(e,t,r){let n=!1;return a=>n?t?t(a):a.defaultShouldRevalidate:(n=!0,r.has(e))}async function ms(e,t){let r=await rr(e,t);return await ar(e,r),{Component:so(r),ErrorBoundary:r.ErrorBoundary,handle:r.handle,links:r.links,meta:r.meta,shouldRevalidate:r.shouldRevalidate}}async function ao(e,t){let r=await ln(e,t.id);if(r instanceof Error)throw r;if(eo(r))throw ps(r);if(Za(r))throw r;return to(r)&&r.body?await ro(r.body):r}function ps(e){let t=parseInt(e.headers.get("X-Remix-Status"),10)||302,r=e.headers.get("X-Remix-Redirect"),n={},a=e.headers.get("X-Remix-Revalidate");a&&(n["X-Remix-Revalidate"]=a);let o=e.headers.get("X-Remix-Reload-Document");return o&&(n["X-Remix-Reload-Document"]=o),$t(r,{status:t,headers:n})}function so(e){if(e.default==null)return;if(!(typeof e.default=="object"&&Object.keys(e.default).length===0))return e.default}var Ne;var sn,Tu=new Promise(e=>{sn=e}).catch(()=>{}),gs=()=>{};function ys(e){if(!Ne){let o=window.__remixContext.url,i=window.location.pathname;if(o!==i){let u=`Initial URL (${o}) does not match URL at time of hydration (${i}), reloading page...`;return console.error(u),window.location.reload(),ie.createElement(ie.Fragment,null)}let l=cr(window.__remixManifest.routes,window.__remixRouteModules,window.__remixContext.future),s=window.__remixContext.state;s&&s.errors&&(s={...s,errors:qa(s.errors)}),Ne=wa(l,{hydrationData:s,future:{v7_normalizeFormMethod:!0,v7_fetcherPersist:window.__remixContext.future.v3_fetcherPersist}}),Ne.createRoutesForHMR=lo,window.__remixRouter=Ne,sn&&sn(Ne)}let[t,r]=ie.useReducer(gs,window.__remixContext.criticalCss);window.__remixClearCriticalCss=r;let[n,a]=ie.useState(Ne.state.location);return ie.useLayoutEffect(()=>Ne.subscribe(o=>{o.location!==n&&a(o.location)}),[n]),ie.createElement(Pt.Provider,{value:{manifest:window.__remixManifest,routeModules:window.__remixRouteModules,future:window.__remixContext.future,criticalCss:t}},ie.createElement(sr,{location:n},ie.createElement(Sa,{router:Ne,fallbackElement:null,future:{v7_startTransition:!0}})))}Ce();var dr=je(ve());Ce();var uo="positions";function vs({getKey:e,...t}){let r=ae(),n=Qe();Na({getKey:e,storageKey:uo});let a=dr.useMemo(()=>{if(!e)return null;let i=e(r,n);return i!==r.key?i:null},[]),o=((i,l)=>{if(!window.history.state||!window.history.state.key){let s=Math.random().toString(32).slice(2);window.history.replaceState({key:s},"")}try{let u=JSON.parse(sessionStorage.getItem(i)||"{}")[l||window.history.state.key];typeof u=="number"&&window.scrollTo(0,u)}catch(s){console.error(s),sessionStorage.removeItem(i)}}).toString();return dr.createElement("script",Y({},t,{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${o})(${JSON.stringify(uo)}, ${JSON.stringify(a)})`}}))}export{ve as a,He as b,ae as c,Wt as d,qe as e,pt as f,zn as g,Da as h,en as i,za as j,Xl as k,Ql as l,Va as m,es as n,ns as o,as as p,os as q,ys as r,vs as s,Ds as t};
25
- /*! Bundled license information:
26
-
27
- react/cjs/react.production.min.js:
28
- (**
29
- * @license React
30
- * react.production.min.js
31
- *
32
- * Copyright (c) Facebook, Inc. and its affiliates.
33
- *
34
- * This source code is licensed under the MIT license found in the
35
- * LICENSE file in the root directory of this source tree.
36
- *)
37
-
38
- @remix-run/router/dist/router.js:
39
- (**
40
- * @remix-run/router v1.11.0
41
- *
42
- * Copyright (c) Remix Software Inc.
43
- *
44
- * This source code is licensed under the MIT license found in the
45
- * LICENSE.md file in the root directory of this source tree.
46
- *
47
- * @license MIT
48
- *)
49
-
50
- react-router/dist/index.js:
51
- (**
52
- * React Router v6.18.0
53
- *
54
- * Copyright (c) Remix Software Inc.
55
- *
56
- * This source code is licensed under the MIT license found in the
57
- * LICENSE.md file in the root directory of this source tree.
58
- *
59
- * @license MIT
60
- *)
61
-
62
- @remix-run/router/dist/router.js:
63
- (**
64
- * @remix-run/router v1.11.0
65
- *
66
- * Copyright (c) Remix Software Inc.
67
- *
68
- * This source code is licensed under the MIT license found in the
69
- * LICENSE.md file in the root directory of this source tree.
70
- *
71
- * @license MIT
72
- *)
73
-
74
- react-router-dom/dist/index.js:
75
- (**
76
- * React Router DOM v6.18.0
77
- *
78
- * Copyright (c) Remix Software Inc.
79
- *
80
- * This source code is licensed under the MIT license found in the
81
- * LICENSE.md file in the root directory of this source tree.
82
- *
83
- * @license MIT
84
- *)
85
-
86
- react/cjs/react-jsx-runtime.production.min.js:
87
- (**
88
- * @license React
89
- * react-jsx-runtime.production.min.js
90
- *
91
- * Copyright (c) Facebook, Inc. and its affiliates.
92
- *
93
- * This source code is licensed under the MIT license found in the
94
- * LICENSE file in the root directory of this source tree.
95
- *)
96
-
97
- @remix-run/react/dist/esm/_virtual/_rollupPluginBabelHelpers.js:
98
- (**
99
- * @remix-run/react v2.2.0
100
- *
101
- * Copyright (c) Remix Software Inc.
102
- *
103
- * This source code is licensed under the MIT license found in the
104
- * LICENSE.md file in the root directory of this source tree.
105
- *
106
- * @license MIT
107
- *)
108
-
109
- @remix-run/react/dist/esm/invariant.js:
110
- (**
111
- * @remix-run/react v2.2.0
112
- *
113
- * Copyright (c) Remix Software Inc.
114
- *
115
- * This source code is licensed under the MIT license found in the
116
- * LICENSE.md file in the root directory of this source tree.
117
- *
118
- * @license MIT
119
- *)
120
-
121
- @remix-run/react/dist/esm/routeModules.js:
122
- (**
123
- * @remix-run/react v2.2.0
124
- *
125
- * Copyright (c) Remix Software Inc.
126
- *
127
- * This source code is licensed under the MIT license found in the
128
- * LICENSE.md file in the root directory of this source tree.
129
- *
130
- * @license MIT
131
- *)
132
-
133
- @remix-run/react/dist/esm/links.js:
134
- (**
135
- * @remix-run/react v2.2.0
136
- *
137
- * Copyright (c) Remix Software Inc.
138
- *
139
- * This source code is licensed under the MIT license found in the
140
- * LICENSE.md file in the root directory of this source tree.
141
- *
142
- * @license MIT
143
- *)
144
-
145
- @remix-run/react/dist/esm/markup.js:
146
- (**
147
- * @remix-run/react v2.2.0
148
- *
149
- * Copyright (c) Remix Software Inc.
150
- *
151
- * This source code is licensed under the MIT license found in the
152
- * LICENSE.md file in the root directory of this source tree.
153
- *
154
- * @license MIT
155
- *)
156
-
157
- @remix-run/react/dist/esm/components.js:
158
- (**
159
- * @remix-run/react v2.2.0
160
- *
161
- * Copyright (c) Remix Software Inc.
162
- *
163
- * This source code is licensed under the MIT license found in the
164
- * LICENSE.md file in the root directory of this source tree.
165
- *
166
- * @license MIT
167
- *)
168
-
169
- @remix-run/react/dist/esm/errorBoundaries.js:
170
- (**
171
- * @remix-run/react v2.2.0
172
- *
173
- * Copyright (c) Remix Software Inc.
174
- *
175
- * This source code is licensed under the MIT license found in the
176
- * LICENSE.md file in the root directory of this source tree.
177
- *
178
- * @license MIT
179
- *)
180
-
181
- @remix-run/router/dist/router.js:
182
- (**
183
- * @remix-run/router v1.11.0
184
- *
185
- * Copyright (c) Remix Software Inc.
186
- *
187
- * This source code is licensed under the MIT license found in the
188
- * LICENSE.md file in the root directory of this source tree.
189
- *
190
- * @license MIT
191
- *)
192
-
193
- @remix-run/react/dist/esm/errors.js:
194
- (**
195
- * @remix-run/react v2.2.0
196
- *
197
- * Copyright (c) Remix Software Inc.
198
- *
199
- * This source code is licensed under the MIT license found in the
200
- * LICENSE.md file in the root directory of this source tree.
201
- *
202
- * @license MIT
203
- *)
204
-
205
- @remix-run/react/dist/esm/data.js:
206
- (**
207
- * @remix-run/react v2.2.0
208
- *
209
- * Copyright (c) Remix Software Inc.
210
- *
211
- * This source code is licensed under the MIT license found in the
212
- * LICENSE.md file in the root directory of this source tree.
213
- *
214
- * @license MIT
215
- *)
216
-
217
- @remix-run/react/dist/esm/routes.js:
218
- (**
219
- * @remix-run/react v2.2.0
220
- *
221
- * Copyright (c) Remix Software Inc.
222
- *
223
- * This source code is licensed under the MIT license found in the
224
- * LICENSE.md file in the root directory of this source tree.
225
- *
226
- * @license MIT
227
- *)
228
-
229
- @remix-run/react/dist/esm/browser.js:
230
- (**
231
- * @remix-run/react v2.2.0
232
- *
233
- * Copyright (c) Remix Software Inc.
234
- *
235
- * This source code is licensed under the MIT license found in the
236
- * LICENSE.md file in the root directory of this source tree.
237
- *
238
- * @license MIT
239
- *)
240
-
241
- @remix-run/react/dist/esm/scroll-restoration.js:
242
- (**
243
- * @remix-run/react v2.2.0
244
- *
245
- * Copyright (c) Remix Software Inc.
246
- *
247
- * This source code is licensed under the MIT license found in the
248
- * LICENSE.md file in the root directory of this source tree.
249
- *
250
- * @license MIT
251
- *)
252
-
253
- @remix-run/react/dist/esm/index.js:
254
- (**
255
- * @remix-run/react v2.2.0
256
- *
257
- * Copyright (c) Remix Software Inc.
258
- *
259
- * This source code is licensed under the MIT license found in the
260
- * LICENSE.md file in the root directory of this source tree.
261
- *
262
- * @license MIT
263
- *)
264
- */
@@ -1 +0,0 @@
1
- var g=Object.create;var f=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var m=(a,b)=>()=>(a&&(b=a(a=0)),b);var n=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports);var l=(a,b,c,e)=>{if(b&&typeof b=="object"||typeof b=="function")for(let d of i(b))!k.call(a,d)&&d!==c&&f(a,d,{get:()=>b[d],enumerable:!(e=h(b,d))||e.enumerable});return a};var o=(a,b,c)=>(c=a!=null?g(j(a)):{},l(b||!a||!a.__esModule?f(c,"default",{value:a,enumerable:!0}):c,a));export{m as a,n as b,o as c};