@techdocs/cli 1.8.1 → 1.8.2-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/embedded-app/.config-schema.json +22 -22
  3. package/dist/embedded-app/index.html +1 -1
  4. package/dist/embedded-app/static/{1032.962f0dc0.chunk.js → 1032.140ea063.chunk.js} +2 -2
  5. package/dist/embedded-app/static/{1032.962f0dc0.chunk.js.map → 1032.140ea063.chunk.js.map} +1 -1
  6. package/dist/embedded-app/static/{1105.b895d544.chunk.js → 1105.d3f18e31.chunk.js} +2 -2
  7. package/dist/embedded-app/static/{1105.b895d544.chunk.js.map → 1105.d3f18e31.chunk.js.map} +1 -1
  8. package/dist/embedded-app/static/{184.1dc24a02.chunk.js → 184.fb5a152a.chunk.js} +2 -2
  9. package/dist/embedded-app/static/{184.1dc24a02.chunk.js.map → 184.fb5a152a.chunk.js.map} +1 -1
  10. package/dist/embedded-app/static/{2440.c190961f.chunk.js → 2440.7a3710e0.chunk.js} +2 -2
  11. package/dist/embedded-app/static/{2440.c190961f.chunk.js.map → 2440.7a3710e0.chunk.js.map} +1 -1
  12. package/dist/embedded-app/static/{3487.033f70d1.chunk.js → 3487.00057c69.chunk.js} +2 -2
  13. package/dist/embedded-app/static/{3487.033f70d1.chunk.js.map → 3487.00057c69.chunk.js.map} +1 -1
  14. package/dist/embedded-app/static/{4917.4ecb223f.chunk.js → 4917.5d4a6c52.chunk.js} +2 -2
  15. package/dist/embedded-app/static/{4917.4ecb223f.chunk.js.map → 4917.5d4a6c52.chunk.js.map} +1 -1
  16. package/dist/embedded-app/static/{5458.ee26d731.chunk.js → 5458.7bf88cf3.chunk.js} +2 -2
  17. package/dist/embedded-app/static/{5458.ee26d731.chunk.js.map → 5458.7bf88cf3.chunk.js.map} +1 -1
  18. package/dist/embedded-app/static/{5877.917fd5e0.chunk.js → 5877.fce91b72.chunk.js} +2 -2
  19. package/dist/embedded-app/static/{5877.917fd5e0.chunk.js.map → 5877.fce91b72.chunk.js.map} +1 -1
  20. package/dist/embedded-app/static/{6051.4b8c1634.chunk.js → 6051.71a9b063.chunk.js} +2 -2
  21. package/dist/embedded-app/static/{6051.4b8c1634.chunk.js.map → 6051.71a9b063.chunk.js.map} +1 -1
  22. package/dist/embedded-app/static/{7750.259f7924.chunk.js → 7750.a9abe428.chunk.js} +2 -2
  23. package/dist/embedded-app/static/{7750.259f7924.chunk.js.map → 7750.a9abe428.chunk.js.map} +1 -1
  24. package/dist/embedded-app/static/87.06c3bfc1.chunk.js +3 -0
  25. package/dist/embedded-app/static/87.06c3bfc1.chunk.js.map +1 -0
  26. package/dist/embedded-app/static/{9545.21600bcf.chunk.js → 9545.264135de.chunk.js} +2 -2
  27. package/dist/embedded-app/static/{9545.21600bcf.chunk.js.map → 9545.264135de.chunk.js.map} +1 -1
  28. package/dist/embedded-app/static/{9770.69fa838c.chunk.js → 9770.cfa9f314.chunk.js} +2 -2
  29. package/dist/embedded-app/static/{9770.69fa838c.chunk.js.map → 9770.cfa9f314.chunk.js.map} +1 -1
  30. package/dist/embedded-app/static/main.5a486dfb.js +491 -0
  31. package/dist/embedded-app/static/main.5a486dfb.js.map +1 -0
  32. package/dist/embedded-app/static/{module-material-table.b510f85c.js → module-material-table.dc2e7a78.js} +2 -2
  33. package/dist/embedded-app/static/{module-material-table.b510f85c.js.map → module-material-table.dc2e7a78.js.map} +1 -1
  34. package/dist/embedded-app/static/{module-material-ui.c8f92ef8.js → module-material-ui.e26d0f76.js} +7 -7
  35. package/dist/embedded-app/static/module-material-ui.e26d0f76.js.map +1 -0
  36. package/dist/embedded-app/static/module-react-beautiful-dnd.d66821d2.js +67 -0
  37. package/dist/embedded-app/static/module-react-beautiful-dnd.d66821d2.js.map +1 -0
  38. package/dist/embedded-app/static/module-react-router-dom.6a4a6115.js +22 -0
  39. package/dist/embedded-app/static/module-react-router-dom.6a4a6115.js.map +1 -0
  40. package/dist/embedded-app/static/module-react-router.fc2430de.js +22 -0
  41. package/dist/embedded-app/static/module-react-router.fc2430de.js.map +1 -0
  42. package/dist/embedded-app/static/{runtime.0c2b0715.js → runtime.5a486dfb.js} +3 -3
  43. package/dist/embedded-app/static/runtime.5a486dfb.js.map +1 -0
  44. package/dist/embedded-app/static/vendor.5a486dfb.js +164 -0
  45. package/dist/embedded-app/static/vendor.5a486dfb.js.map +1 -0
  46. package/dist/index.cjs.js +1 -1
  47. package/package.json +4 -4
  48. package/dist/embedded-app/static/9814.cc1c4811.chunk.js +0 -3
  49. package/dist/embedded-app/static/9814.cc1c4811.chunk.js.map +0 -1
  50. package/dist/embedded-app/static/main.0c2b0715.js +0 -491
  51. package/dist/embedded-app/static/main.0c2b0715.js.map +0 -1
  52. package/dist/embedded-app/static/module-material-ui.c8f92ef8.js.map +0 -1
  53. package/dist/embedded-app/static/module-react-beautiful-dnd.1f1d9332.js +0 -67
  54. package/dist/embedded-app/static/module-react-beautiful-dnd.1f1d9332.js.map +0 -1
  55. package/dist/embedded-app/static/module-react-router-dom.81a9f610.js +0 -22
  56. package/dist/embedded-app/static/module-react-router-dom.81a9f610.js.map +0 -1
  57. package/dist/embedded-app/static/module-react-router.e7f42b6c.js +0 -22
  58. package/dist/embedded-app/static/module-react-router.e7f42b6c.js.map +0 -1
  59. package/dist/embedded-app/static/runtime.0c2b0715.js.map +0 -1
  60. package/dist/embedded-app/static/vendor.0c2b0715.js +0 -164
  61. package/dist/embedded-app/static/vendor.0c2b0715.js.map +0 -1
@@ -0,0 +1,22 @@
1
+ "use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[242],{73557:function(Wr,Jt,et){var z;et.d(Jt,{AW:function(){return jt},F0:function(){return mt},Fg:function(){return pt},GV:function(){return ie},TH:function(){return Te},UO:function(){return Yt},Us:function(){return se},V$:function(){return St},VA:function(){return Ot},WU:function(){return Dt},Z5:function(){return lr},is:function(){return Ye},j3:function(){return Tt},oQ:function(){return Re},pC:function(){return Pt},s0:function(){return De}});var y=et(2784),B=et(84800);/**
2
+ * React Router v6.21.3
3
+ *
4
+ * Copyright (c) Remix Software Inc.
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE.md file in the root directory of this source tree.
8
+ *
9
+ * @license MIT
10
+ */function Me(){return Me=Object.assign?Object.assign.bind():function(l){for(var s=1;s<arguments.length;s++){var v=arguments[s];for(var R in v)Object.prototype.hasOwnProperty.call(v,R)&&(l[R]=v[R])}return l},Me.apply(this,arguments)}const ut=y.createContext(null),Kt=y.createContext(null),k=y.createContext(null),se=y.createContext(null),Ke=y.createContext(null),ve=y.createContext({outlet:null,matches:[],isDataRoute:!1}),be=y.createContext(null);function Re(l,s){let{relative:v}=s===void 0?{}:s;ie()||(0,B.J0)(!1);let{basename:R,navigator:S}=y.useContext(se),{hash:T,pathname:L,search:W}=Dt(l,{relative:v}),q=L;return R!=="/"&&(q=L==="/"?R:(0,B.RQ)([R,L])),S.createHref({pathname:q,search:W,hash:T})}function ie(){return y.useContext(Ke)!=null}function Te(){return ie()||(0,B.J0)(!1),y.useContext(Ke).location}function Z(){return React.useContext(Ke).navigationType}function Rr(l){ie()||UNSAFE_invariant(!1);let{pathname:s}=Te();return React.useMemo(()=>matchPath(l,s),[s,l])}const Er=null;function $e(l){y.useContext(se).static||y.useLayoutEffect(l)}function De(){let{isDataRoute:l}=y.useContext(ve);return l?ft():$t()}function $t(){ie()||(0,B.J0)(!1);let l=y.useContext(ut),{basename:s,future:v,navigator:R}=y.useContext(se),{matches:S}=y.useContext(ve),{pathname:T}=Te(),L=JSON.stringify((0,B.cm)(S,v.v7_relativeSplatPath)),W=y.useRef(!1);return $e(()=>{W.current=!0}),y.useCallback(function(H,$){if($===void 0&&($={}),!W.current)return;if(typeof H=="number"){R.go(H);return}let O=(0,B.pC)(H,JSON.parse(L),T,$.relative==="path");l==null&&s!=="/"&&(O.pathname=O.pathname==="/"?s:(0,B.RQ)([s,O.pathname])),($.replace?R.replace:R.push)(O,$.state,$)},[s,R,L,T,l])}const dt=y.createContext(null);function Vt(){return React.useContext(dt)}function Pt(l){let s=y.useContext(ve).outlet;return s&&y.createElement(dt.Provider,{value:l},s)}function Yt(){let{matches:l}=y.useContext(ve),s=l[l.length-1];return s?s.params:{}}function Dt(l,s){let{relative:v}=s===void 0?{}:s,{future:R}=y.useContext(se),{matches:S}=y.useContext(ve),{pathname:T}=Te(),L=JSON.stringify((0,B.cm)(S,R.v7_relativeSplatPath));return y.useMemo(()=>(0,B.pC)(l,JSON.parse(L),T,v==="path"),[l,L,T,v])}function St(l,s){return Ct(l,s)}function Ct(l,s,v,R){ie()||(0,B.J0)(!1);let{navigator:S}=y.useContext(se),{matches:T}=y.useContext(ve),L=T[T.length-1],W=L?L.params:{},q=L?L.pathname:"/",H=L?L.pathnameBase:"/",$=L&&L.route,O=Te(),G;if(s){var ne;let he=typeof s=="string"?(0,B.cP)(s):s;H==="/"||(ne=he.pathname)!=null&&ne.startsWith(H)||(0,B.J0)(!1),G=he}else G=O;let pe=G.pathname||"/",Ce=H==="/"?pe:pe.slice(H.length)||"/",Ee=(0,B.fp)(l,{pathname:Ce}),je=Mt(Ee&&Ee.map(he=>Object.assign({},he,{params:Object.assign({},W,he.params),pathname:(0,B.RQ)([H,S.encodeLocation?S.encodeLocation(he.pathname).pathname:he.pathname]),pathnameBase:he.pathnameBase==="/"?H:(0,B.RQ)([H,S.encodeLocation?S.encodeLocation(he.pathnameBase).pathname:he.pathnameBase])})),T,v,R);return s&&je?y.createElement(Ke.Provider,{value:{location:Me({pathname:"/",search:"",hash:"",state:null,key:"default"},G),navigationType:B.aU.Pop}},je):je}function Qt(){let l=Ie(),s=(0,B.WK)(l)?l.status+" "+l.statusText:l instanceof Error?l.message:JSON.stringify(l),v=l instanceof Error?l.stack:null,R="rgba(200,200,200, 0.5)",S={padding:"0.5rem",backgroundColor:R},T={padding:"2px 4px",backgroundColor:R},L=null;return y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},s),v?y.createElement("pre",{style:S},v):null,L)}const Gt=y.createElement(Qt,null);class Lt extends y.Component{constructor(s){super(s),this.state={location:s.location,revalidation:s.revalidation,error:s.error}}static getDerivedStateFromError(s){return{error:s}}static getDerivedStateFromProps(s,v){return v.location!==s.location||v.revalidation!=="idle"&&s.revalidation==="idle"?{error:s.error,location:s.location,revalidation:s.revalidation}:{error:s.error!==void 0?s.error:v.error,location:v.location,revalidation:s.revalidation||v.revalidation}}componentDidCatch(s,v){console.error("React Router caught the following error during render",s,v)}render(){return this.state.error!==void 0?y.createElement(ve.Provider,{value:this.props.routeContext},y.createElement(be.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Xt(l){let{routeContext:s,match:v,children:R}=l,S=y.useContext(ut);return S&&S.static&&S.staticContext&&(v.route.errorElement||v.route.ErrorBoundary)&&(S.staticContext._deepestRenderedBoundaryId=v.route.id),y.createElement(ve.Provider,{value:s},R)}function Mt(l,s,v,R){var S;if(s===void 0&&(s=[]),v===void 0&&(v=null),R===void 0&&(R=null),l==null){var T;if((T=v)!=null&&T.errors)l=v.matches;else return null}let L=l,W=(S=v)==null?void 0:S.errors;if(W!=null){let $=L.findIndex(O=>O.route.id&&(W==null?void 0:W[O.route.id]));$>=0||(0,B.J0)(!1),L=L.slice(0,Math.min(L.length,$+1))}let q=!1,H=-1;if(v&&R&&R.v7_partialHydration)for(let $=0;$<L.length;$++){let O=L[$];if((O.route.HydrateFallback||O.route.hydrateFallbackElement)&&(H=$),O.route.id){let{loaderData:G,errors:ne}=v,pe=O.route.loader&&G[O.route.id]===void 0&&(!ne||ne[O.route.id]===void 0);if(O.route.lazy||pe){q=!0,H>=0?L=L.slice(0,H+1):L=[L[0]];break}}}return L.reduceRight(($,O,G)=>{let ne,pe=!1,Ce=null,Ee=null;v&&(ne=W&&O.route.id?W[O.route.id]:void 0,Ce=O.route.errorElement||Gt,q&&(H<0&&G===0?(or("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),pe=!0,Ee=null):H===G&&(pe=!0,Ee=O.route.hydrateFallbackElement||null)));let je=s.concat(L.slice(0,G+1)),he=()=>{let ge;return ne?ge=Ce:pe?ge=Ee:O.route.Component?ge=y.createElement(O.route.Component,null):O.route.element?ge=O.route.element:ge=$,y.createElement(Xt,{match:O,routeContext:{outlet:$,matches:je,isDataRoute:v!=null},children:ge})};return v&&(O.route.ErrorBoundary||O.route.errorElement||G===0)?y.createElement(Lt,{location:v.location,revalidation:v.revalidation,component:Ce,error:ne,children:he(),routeContext:{outlet:null,matches:je,isDataRoute:!0}}):he()},null)}var tt=function(l){return l.UseBlocker="useBlocker",l.UseRevalidator="useRevalidator",l.UseNavigateStable="useNavigate",l}(tt||{}),fe=function(l){return l.UseBlocker="useBlocker",l.UseLoaderData="useLoaderData",l.UseActionData="useActionData",l.UseRouteError="useRouteError",l.UseNavigation="useNavigation",l.UseRouteLoaderData="useRouteLoaderData",l.UseMatches="useMatches",l.UseRevalidator="useRevalidator",l.UseNavigateStable="useNavigate",l.UseRouteId="useRouteId",l}(fe||{});function wr(l){return l+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function ct(l){let s=y.useContext(ut);return s||(0,B.J0)(!1),s}function _e(l){let s=y.useContext(Kt);return s||(0,B.J0)(!1),s}function Zt(l){let s=y.useContext(ve);return s||(0,B.J0)(!1),s}function Se(l){let s=Zt(l),v=s.matches[s.matches.length-1];return v.route.id||(0,B.J0)(!1),v.route.id}function qt(){return Se(fe.UseRouteId)}function xr(){return _e(fe.UseNavigation).navigation}function _t(){let l=ct(tt.UseRevalidator),s=_e(fe.UseRevalidator);return React.useMemo(()=>({revalidate:l.router.revalidate,state:s.revalidation}),[l.router.revalidate,s.revalidation])}function er(){let{matches:l,loaderData:s}=_e(fe.UseMatches);return React.useMemo(()=>l.map(v=>UNSAFE_convertRouteMatchToUiMatch(v,s)),[l,s])}function tr(){let l=_e(fe.UseLoaderData),s=Se(fe.UseLoaderData);if(l.errors&&l.errors[s]!=null){console.error("You cannot `useLoaderData` in an errorElement (routeId: "+s+")");return}return l.loaderData[s]}function rr(l){return _e(fe.UseRouteLoaderData).loaderData[l]}function Jr(){let l=_e(fe.UseActionData),s=Se(fe.UseLoaderData);return l.actionData?l.actionData[s]:void 0}function Ie(){var l;let s=y.useContext(be),v=_e(fe.UseRouteError),R=Se(fe.UseRouteError);return s!==void 0?s:(l=v.errors)==null?void 0:l[R]}function nr(){let l=React.useContext(k);return l==null?void 0:l._data}function Pr(){let l=React.useContext(k);return l==null?void 0:l._error}let ar=0;function Kr(l){let{router:s,basename:v}=ct(tt.UseBlocker),R=_e(fe.UseBlocker),[S,T]=React.useState(""),L=React.useCallback(W=>{if(typeof l!="function")return!!l;if(v==="/")return l(W);let{currentLocation:q,nextLocation:H,historyAction:$}=W;return l({currentLocation:Me({},q,{pathname:stripBasename(q.pathname,v)||q.pathname}),nextLocation:Me({},H,{pathname:stripBasename(H.pathname,v)||H.pathname}),historyAction:$})},[v,l]);return React.useEffect(()=>{let W=String(++ar);return T(W),()=>s.deleteBlocker(W)},[s]),React.useEffect(()=>{S!==""&&s.getBlocker(S,L)},[s,S,L]),S&&R.blockers.has(S)?R.blockers.get(S):IDLE_BLOCKER}function ft(){let{router:l}=ct(tt.UseNavigateStable),s=Se(fe.UseNavigateStable),v=y.useRef(!1);return $e(()=>{v.current=!0}),y.useCallback(function(S,T){T===void 0&&(T={}),v.current&&(typeof S=="number"?l.navigate(S):l.navigate(S,Me({fromRouteId:s},T)))},[l,s])}const Ut={};function or(l,s,v){!s&&!Ut[l]&&(Ut[l]=!0)}const ir="startTransition",ht=(z||(z=et.t(y,2)))[ir];function Dr(l){let{fallbackElement:s,router:v,future:R}=l,[S,T]=React.useState(v.state),{v7_startTransition:L}=R||{},W=React.useCallback(O=>{L&&ht?ht(()=>T(O)):T(O)},[T,L]);React.useLayoutEffect(()=>v.subscribe(W),[v,W]),React.useEffect(()=>{},[]);let q=React.useMemo(()=>({createHref:v.createHref,encodeLocation:v.encodeLocation,go:O=>v.navigate(O),push:(O,G,ne)=>v.navigate(O,{state:G,preventScrollReset:ne==null?void 0:ne.preventScrollReset}),replace:(O,G,ne)=>v.navigate(O,{replace:!0,state:G,preventScrollReset:ne==null?void 0:ne.preventScrollReset})}),[v]),H=v.basename||"/",$=React.useMemo(()=>({router:v,navigator:q,static:!1,basename:H}),[v,q,H]);return React.createElement(React.Fragment,null,React.createElement(ut.Provider,{value:$},React.createElement(Kt.Provider,{value:S},React.createElement(mt,{basename:H,location:S.location,navigationType:S.historyAction,navigator:q,future:{v7_relativeSplatPath:v.future.v7_relativeSplatPath}},S.initialized||v.future.v7_partialHydration?React.createElement(Sr,{routes:v.routes,future:v.future,state:S}):s))),null)}function Sr(l){let{routes:s,future:v,state:R}=l;return Ct(s,void 0,R,v)}function Ot(l){let{basename:s,children:v,initialEntries:R,initialIndex:S,future:T}=l,L=y.useRef();L.current==null&&(L.current=(0,B.PP)({initialEntries:R,initialIndex:S,v5Compat:!0}));let W=L.current,[q,H]=y.useState({action:W.action,location:W.location}),{v7_startTransition:$}=T||{},O=y.useCallback(G=>{$&&ht?ht(()=>H(G)):H(G)},[H,$]);return y.useLayoutEffect(()=>W.listen(O),[W,O]),y.createElement(mt,{basename:s,children:v,location:q.location,navigationType:q.action,navigator:W,future:T})}function pt(l){let{to:s,replace:v,state:R,relative:S}=l;ie()||(0,B.J0)(!1);let{future:T,static:L}=y.useContext(se),{matches:W}=y.useContext(ve),{pathname:q}=Te(),H=De(),$=(0,B.pC)(s,(0,B.cm)(W,T.v7_relativeSplatPath),q,S==="path"),O=JSON.stringify($);return y.useEffect(()=>H(JSON.parse(O),{replace:v,state:R,relative:S}),[H,O,S,v,R]),null}function Tt(l){return Pt(l.context)}function jt(l){(0,B.J0)(!1)}function mt(l){let{basename:s="/",children:v=null,location:R,navigationType:S=B.aU.Pop,navigator:T,static:L=!1,future:W}=l;ie()&&(0,B.J0)(!1);let q=s.replace(/^\/*/,"/"),H=y.useMemo(()=>({basename:q,navigator:T,static:L,future:Me({v7_relativeSplatPath:!1},W)}),[q,W,T,L]);typeof R=="string"&&(R=(0,B.cP)(R));let{pathname:$="/",search:O="",hash:G="",state:ne=null,key:pe="default"}=R,Ce=y.useMemo(()=>{let Ee=(0,B.Zn)($,q);return Ee==null?null:{location:{pathname:Ee,search:O,hash:G,state:ne,key:pe},navigationType:S}},[q,$,O,G,ne,pe,S]);return Ce==null?null:y.createElement(se.Provider,{value:H},y.createElement(Ke.Provider,{children:v,value:Ce}))}function lr(l){let{children:s,location:v}=l;return St(Ye(s),v)}function Cr(l){let{children:s,errorElement:v,resolve:R}=l;return React.createElement(sr,{resolve:R,errorElement:v},React.createElement(Ve,null,s))}var me=function(l){return l[l.pending=0]="pending",l[l.success=1]="success",l[l.error=2]="error",l}(me||{});const vt=new Promise(()=>{});class sr extends y.Component{constructor(s){super(s),this.state={error:null}}static getDerivedStateFromError(s){return{error:s}}componentDidCatch(s,v){console.error("<Await> caught the following error during render",s,v)}render(){let{children:s,errorElement:v,resolve:R}=this.props,S=null,T=me.pending;if(!(R instanceof Promise))T=me.success,S=Promise.resolve(),Object.defineProperty(S,"_tracked",{get:()=>!0}),Object.defineProperty(S,"_data",{get:()=>R});else if(this.state.error){T=me.error;let L=this.state.error;S=Promise.reject().catch(()=>{}),Object.defineProperty(S,"_tracked",{get:()=>!0}),Object.defineProperty(S,"_error",{get:()=>L})}else R._tracked?(S=R,T=S._error!==void 0?me.error:S._data!==void 0?me.success:me.pending):(T=me.pending,Object.defineProperty(R,"_tracked",{get:()=>!0}),S=R.then(L=>Object.defineProperty(R,"_data",{get:()=>L}),L=>Object.defineProperty(R,"_error",{get:()=>L})));if(T===me.error&&S._error instanceof B.X3)throw vt;if(T===me.error&&!v)throw S._error;if(T===me.error)return y.createElement(k.Provider,{value:S,children:v});if(T===me.success)return y.createElement(k.Provider,{value:S,children:s});throw S}}function Ve(l){let{children:s}=l,v=nr(),R=typeof s=="function"?s(v):s;return React.createElement(React.Fragment,null,R)}function Ye(l,s){s===void 0&&(s=[]);let v=[];return y.Children.forEach(l,(R,S)=>{if(!y.isValidElement(R))return;let T=[...s,S];if(R.type===y.Fragment){v.push.apply(v,Ye(R.props.children,T));return}R.type!==jt&&(0,B.J0)(!1),!R.props.index||!R.props.children||(0,B.J0)(!1);let L={id:R.props.id||T.join("-"),caseSensitive:R.props.caseSensitive,element:R.props.element,Component:R.props.Component,index:R.props.index,path:R.props.path,loader:R.props.loader,action:R.props.action,errorElement:R.props.errorElement,ErrorBoundary:R.props.ErrorBoundary,hasErrorBoundary:R.props.ErrorBoundary!=null||R.props.errorElement!=null,shouldRevalidate:R.props.shouldRevalidate,handle:R.props.handle,lazy:R.props.lazy};R.props.children&&(L.children=Ye(R.props.children,T)),v.push(L)}),v}function ur(l){return Mt(l)}function At(l){let s={hasErrorBoundary:l.ErrorBoundary!=null||l.errorElement!=null};return l.Component&&Object.assign(s,{element:React.createElement(l.Component),Component:void 0}),l.HydrateFallback&&Object.assign(s,{hydrateFallbackElement:React.createElement(l.HydrateFallback),HydrateFallback:void 0}),l.ErrorBoundary&&Object.assign(s,{errorElement:React.createElement(l.ErrorBoundary),ErrorBoundary:void 0}),s}function $r(l,s){return createRouter({basename:s==null?void 0:s.basename,future:Me({},s==null?void 0:s.future,{v7_prependBasename:!0}),history:createMemoryHistory({initialEntries:s==null?void 0:s.initialEntries,initialIndex:s==null?void 0:s.initialIndex}),hydrationData:s==null?void 0:s.hydrationData,routes:l,mapRouteProperties:At}).initialize()}},84800:function(Wr,Jt,et){et.d(Jt,{Ep:function(){return Re},Gn:function(){return fe},J0:function(){return k},PP:function(){return Me},RQ:function(){return Ie},WK:function(){return pt},X3:function(){return ft},Zn:function(){return Se},aU:function(){return y},cP:function(){return ie},cm:function(){return tr},fp:function(){return De},i3:function(){return qt},pC:function(){return rr}});/**
11
+ * @remix-run/router v1.14.2
12
+ *
13
+ * Copyright (c) Remix Software Inc.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE.md file in the root directory of this source tree.
17
+ *
18
+ * @license MIT
19
+ */function z(){return z=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},z.apply(this,arguments)}var y;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(y||(y={}));const B="popstate";function Me(e){e===void 0&&(e={});let{initialEntries:t=["/"],initialIndex:r,v5Compat:n=!1}=e,a;a=t.map((x,C)=>m(x,typeof x=="string"?null:x.state,C===0?"default":void 0));let d=h(r==null?a.length-1:r),i=y.Pop,p=null;function h(x){return Math.min(Math.max(x,0),a.length-1)}function b(){return a[d]}function m(x,C,D){C===void 0&&(C=null);let w=be(a?b().pathname:"/",x,C,D);return se(w.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(x)),w}function _(x){return typeof x=="string"?x:Re(x)}return{get index(){return d},get action(){return i},get location(){return b()},createHref:_,createURL(x){return new URL(_(x),"http://localhost")},encodeLocation(x){let C=typeof x=="string"?ie(x):x;return{pathname:C.pathname||"",search:C.search||"",hash:C.hash||""}},push(x,C){i=y.Push;let D=m(x,C);d+=1,a.splice(d,a.length,D),n&&p&&p({action:i,location:D,delta:1})},replace(x,C){i=y.Replace;let D=m(x,C);a[d]=D,n&&p&&p({action:i,location:D,delta:0})},go(x){i=y.Pop;let C=h(d+x),D=a[C];d=C,p&&p({action:i,location:D,delta:x})},listen(x){return p=x,()=>{p=null}}}}function ut(e){e===void 0&&(e={});function t(n,a){let{pathname:d,search:i,hash:p}=n.location;return be("",{pathname:d,search:i,hash:p},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(n,a){return typeof a=="string"?a:Re(a)}return Te(t,r,null,e)}function Kt(e){e===void 0&&(e={});function t(a,d){let{pathname:i="/",search:p="",hash:h=""}=ie(a.location.hash.substr(1));return!i.startsWith("/")&&!i.startsWith(".")&&(i="/"+i),be("",{pathname:i,search:p,hash:h},d.state&&d.state.usr||null,d.state&&d.state.key||"default")}function r(a,d){let i=a.document.querySelector("base"),p="";if(i&&i.getAttribute("href")){let h=a.location.href,b=h.indexOf("#");p=b===-1?h:h.slice(0,b)}return p+"#"+(typeof d=="string"?d:Re(d))}function n(a,d){se(a.pathname.charAt(0)==="/","relative pathnames are not supported in hash history.push("+JSON.stringify(d)+")")}return Te(t,r,n,e)}function k(e,t){if(e===!1||e===null||typeof e=="undefined")throw new Error(t)}function se(e,t){if(!e){typeof console!="undefined"&&console.warn(t);try{throw new Error(t)}catch{}}}function Ke(){return Math.random().toString(36).substr(2,8)}function ve(e,t){return{usr:e.state,key:e.key,idx:t}}function be(e,t,r,n){return r===void 0&&(r=null),z({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ie(t):t,{state:r,key:t&&t.key||n||Ke()})}function Re(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 ie(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 Te(e,t,r,n){n===void 0&&(n={});let{window:a=document.defaultView,v5Compat:d=!1}=n,i=a.history,p=y.Pop,h=null,b=m();b==null&&(b=0,i.replaceState(z({},i.state,{idx:b}),""));function m(){return(i.state||{idx:null}).idx}function _(){p=y.Pop;let w=m(),g=w==null?null:w-b;b=w,h&&h({action:p,location:D.location,delta:g})}function E(w,g){p=y.Push;let F=be(D.location,w,g);r&&r(F,w),b=m()+1;let Y=ve(F,b),V=D.createHref(F);try{i.pushState(Y,"",V)}catch(Q){if(Q instanceof DOMException&&Q.name==="DataCloneError")throw Q;a.location.assign(V)}d&&h&&h({action:p,location:D.location,delta:1})}function x(w,g){p=y.Replace;let F=be(D.location,w,g);r&&r(F,w),b=m();let Y=ve(F,b),V=D.createHref(F);i.replaceState(Y,"",V),d&&h&&h({action:p,location:D.location,delta:0})}function C(w){let g=a.location.origin!=="null"?a.location.origin:a.location.href,F=typeof w=="string"?w:Re(w);return k(g,"No window.location.(origin|href) available to create URL for href: "+F),new URL(F,g)}let D={get action(){return p},get location(){return e(a,i)},listen(w){if(h)throw new Error("A history only accepts one active listener");return a.addEventListener(B,_),h=w,()=>{a.removeEventListener(B,_),h=null}},createHref(w){return t(a,w)},createURL:C,encodeLocation(w){let g=C(w);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:E,replace:x,go(w){return i.go(w)}};return D}var Z;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Z||(Z={}));const Rr=new Set(["lazy","caseSensitive","path","id","index","children"]);function Er(e){return e.index===!0}function $e(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((a,d)=>{let i=[...r,d],p=typeof a.id=="string"?a.id:i.join("-");if(k(a.index!==!0||!a.children,"Cannot specify children on an index route"),k(!n[p],'Found a route id collision on id "'+p+`". Route id's must be globally unique within Data Router usages`),Er(a)){let h=z({},a,t(a),{id:p});return n[p]=h,h}else{let h=z({},a,t(a),{id:p,children:void 0});return n[p]=h,a.children&&(h.children=$e(a.children,t,i,n)),h}})}function De(e,t,r){r===void 0&&(r="/");let n=typeof t=="string"?ie(t):t,a=Se(n.pathname||"/",r);if(a==null)return null;let d=dt(e);Pt(d);let i=null;for(let p=0;i==null&&p<d.length;++p)i=tt(d[p],_e(a));return i}function $t(e,t){let{route:r,pathname:n,params:a}=e;return{id:r.id,pathname:n,params:a,data:t[r.id],handle:r.handle}}function dt(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let a=(d,i,p)=>{let h={relativePath:p===void 0?d.path||"":p,caseSensitive:d.caseSensitive===!0,childrenIndex:i,route:d};h.relativePath.startsWith("/")&&(k(h.relativePath.startsWith(n),'Absolute route path "'+h.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),h.relativePath=h.relativePath.slice(n.length));let b=Ie([n,h.relativePath]),m=r.concat(h);d.children&&d.children.length>0&&(k(d.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+b+'".')),dt(d.children,t,m,b)),!(d.path==null&&!d.index)&&t.push({path:b,score:Xt(b,d.index),routesMeta:m})};return e.forEach((d,i)=>{var p;if(d.path===""||!((p=d.path)!=null&&p.includes("?")))a(d,i);else for(let h of Vt(d.path))a(d,i,h)}),t}function Vt(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),d=r.replace(/\?$/,"");if(n.length===0)return a?[d,""]:[d];let i=Vt(n.join("/")),p=[];return p.push(...i.map(h=>h===""?d:[d,h].join("/"))),a&&p.push(...i),p.map(h=>e.startsWith("/")&&h===""?"/":h)}function Pt(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Mt(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const Yt=/^:[\w-]+$/,Dt=3,St=2,Ct=1,Qt=10,Gt=-2,Lt=e=>e==="*";function Xt(e,t){let r=e.split("/"),n=r.length;return r.some(Lt)&&(n+=Gt),t&&(n+=St),r.filter(a=>!Lt(a)).reduce((a,d)=>a+(Yt.test(d)?Dt:d===""?Ct:Qt),n)}function Mt(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 tt(e,t){let{routesMeta:r}=e,n={},a="/",d=[];for(let i=0;i<r.length;++i){let p=r[i],h=i===r.length-1,b=a==="/"?t:t.slice(a.length)||"/",m=wr({path:p.relativePath,caseSensitive:p.caseSensitive,end:h},b);if(!m)return null;Object.assign(n,m.params);let _=p.route;d.push({params:n,pathname:Ie([a,m.pathname]),pathnameBase:nr(Ie([a,m.pathnameBase])),route:_}),m.pathnameBase!=="/"&&(a=Ie([a,m.pathnameBase]))}return d}function fe(e,t){t===void 0&&(t={});let r=e;r.endsWith("*")&&r!=="*"&&!r.endsWith("/*")&&(se(!1,'Route path "'+r+'" will be treated as if it were '+('"'+r.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+r.replace(/\*$/,"/*")+'".')),r=r.replace(/\*$/,"/*"));const n=r.startsWith("/")?"/":"",a=i=>i==null?"":typeof i=="string"?i:String(i),d=r.split(/\/+/).map((i,p,h)=>{if(p===h.length-1&&i==="*")return a(t["*"]);const m=i.match(/^:([\w-]+)(\??)$/);if(m){const[,_,E]=m;let x=t[_];return k(E==="?"||x!=null,'Missing ":'+_+'" param'),a(x)}return i.replace(/\?$/g,"")}).filter(i=>!!i);return n+d.join("/")}function wr(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=ct(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let d=a[0],i=d.replace(/(.)\/+$/,"$1"),p=a.slice(1);return{params:n.reduce((b,m,_)=>{let{paramName:E,isOptional:x}=m;if(E==="*"){let D=p[_]||"";i=d.slice(0,d.length-D.length).replace(/(.)\/+$/,"$1")}const C=p[_];return x&&!C?b[E]=void 0:b[E]=Zt(C||"",E),b},{}),pathname:d,pathnameBase:i,pattern:e}}function ct(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),se(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,p,h)=>(n.push({paramName:p,isOptional:h!=null}),h?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function _e(e){try{return decodeURI(e)}catch(t){return se(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Zt(e,t){try{return decodeURIComponent(e)}catch(r){return se(!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 Se(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 qt(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?ie(e):e;return{pathname:r?r.startsWith("/")?r:xr(r,t):t,search:Pr(n),hash:ar(a)}}function xr(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 _t(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 er(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function tr(e,t){let r=er(e);return t?r.map((n,a)=>a===e.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function rr(e,t,r,n){n===void 0&&(n=!1);let a;typeof e=="string"?a=ie(e):(a=z({},e),k(!a.pathname||!a.pathname.includes("?"),_t("?","pathname","search",a)),k(!a.pathname||!a.pathname.includes("#"),_t("#","pathname","hash",a)),k(!a.search||!a.search.includes("#"),_t("#","search","hash",a)));let d=e===""||a.pathname==="",i=d?"/":a.pathname,p;if(i==null)p=r;else{let _=t.length-1;if(!n&&i.startsWith("..")){let E=i.split("/");for(;E[0]==="..";)E.shift(),_-=1;a.pathname=E.join("/")}p=_>=0?t[_]:"/"}let h=qt(a,p),b=i&&i!=="/"&&i.endsWith("/"),m=(d||i===".")&&r.endsWith("/");return!h.pathname.endsWith("/")&&(b||m)&&(h.pathname+="/"),h}function Jr(e){return e===""||e.pathname===""?"/":typeof e=="string"?ie(e).pathname:e.pathname}const Ie=e=>e.join("/").replace(/\/\/+/g,"/"),nr=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Pr=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,ar=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,Kr=function(t,r){r===void 0&&(r={});let n=typeof r=="number"?{status:r}:r,a=new Headers(n.headers);return a.has("Content-Type")||a.set("Content-Type","application/json; charset=utf-8"),new Response(JSON.stringify(t),z({},n,{headers:a}))};class ft extends Error{}class Ut{constructor(t,r){this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],k(t&&typeof t=="object"&&!Array.isArray(t),"defer() only accepts plain objects");let n;this.abortPromise=new Promise((d,i)=>n=i),this.controller=new AbortController;let a=()=>n(new ft("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",a),this.controller.signal.addEventListener("abort",a),this.data=Object.entries(t).reduce((d,i)=>{let[p,h]=i;return Object.assign(d,{[p]:this.trackPromise(p,h)})},{}),this.done&&this.unlistenAbortSignal(),this.init=r}trackPromise(t,r){if(!(r instanceof Promise))return r;this.deferredKeys.push(t),this.pendingKeysSet.add(t);let n=Promise.race([r,this.abortPromise]).then(a=>this.onSettle(n,t,void 0,a),a=>this.onSettle(n,t,a));return n.catch(()=>{}),Object.defineProperty(n,"_tracked",{get:()=>!0}),n}onSettle(t,r,n,a){if(this.controller.signal.aborted&&n instanceof ft)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 d=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:()=>d}),this.emit(!1,r),Promise.reject(d)}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(d=>{t.removeEventListener("abort",n),(d||this.done)&&a(d)})})}return r}get done(){return this.pendingKeysSet.size===0}get unwrappedData(){return k(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]:ir(a)})},{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}}function or(e){return e instanceof Promise&&e._tracked===!0}function ir(e){if(!or(e))return e;if(e._error)throw e._error;return e._data}const ht=function(t,r){r===void 0&&(r={});let n=typeof r=="number"?{status:r}:r;return new Ut(t,n)},Dr=function(t,r){r===void 0&&(r=302);let n=r;typeof n=="number"?n={status:n}:typeof n.status=="undefined"&&(n.status=302);let a=new Headers(n.headers);return a.set("Location",t),new Response(null,z({},n,{headers:a}))},Sr=(e,t)=>{let r=Dr(e,t);return r.headers.set("X-Remix-Reload-Document","true"),r};class Ot{constructor(t,r,n,a){a===void 0&&(a=!1),this.status=t,this.statusText=r||"",this.internal=a,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function pt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Tt=["post","put","patch","delete"],jt=new Set(Tt),mt=["get",...Tt],lr=new Set(mt),Cr=new Set([301,302,303,307,308]),me=new Set([307,308]),vt={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},sr={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ve={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Ye=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ur=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)}),At="remix-router-transitions";function $r(e){const t=e.window?e.window:typeof window!="undefined"?window:void 0,r=typeof t!="undefined"&&typeof t.document!="undefined"&&typeof t.document.createElement!="undefined",n=!r;k(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 o=e.detectErrorBoundary;a=u=>({hasErrorBoundary:o(u)})}else a=ur;let d={},i=$e(e.routes,a,void 0,d),p,h=e.basename||"/",b=z({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1},e.future),m=null,_=new Set,E=null,x=null,C=null,D=e.hydrationData!=null,w=De(i,e.history.location,h),g=null;if(w==null){let o=oe(404,{pathname:e.history.location.pathname}),{matches:u,route:f}=Ft(i);w=u,g={[f.id]:o}}let F,Y=w.some(o=>o.route.lazy),V=w.some(o=>o.route.loader);if(Y)F=!1;else if(!V)F=!0;else if(b.v7_partialHydration){let o=e.hydrationData?e.hydrationData.loaderData:null,u=e.hydrationData?e.hydrationData.errors:null;F=w.every(f=>f.route.loader&&f.route.loader.hydrate!==!0&&(o&&o[f.route.id]!==void 0||u&&u[f.route.id]!==void 0))}else F=e.hydrationData!=null;let Q,c={historyAction:e.history.action,location:e.history.location,matches:w,initialized:F,navigation:vt,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||g,fetchers:new Map,blockers:new Map},X=y.Pop,J=!1,ee,Ue=!1,xe=new Map,Le=null,nt=!1,Qe=!1,It=[],Nt=[],le=new Map,Bt=0,bt=-1,at=new Map,Ae=new Set,ot=new Map,Rt=new Map,Fe=new Set,Ge=new Map,Xe=new Map,hr=!1;function tn(){if(m=e.history.listen(o=>{let{action:u,location:f,delta:P}=o;if(hr){hr=!1;return}se(Xe.size===0||P!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let M=kr({currentLocation:c.location,nextLocation:f,historyAction:u});if(M&&P!=null){hr=!0,e.history.go(P*-1),Ht(M,{state:"blocked",location:f,proceed(){Ht(M,{state:"proceeding",proceed:void 0,reset:void 0,location:f}),e.history.go(P)},reset(){let N=new Map(c.blockers);N.set(M,Ve),ye({blockers:N})}});return}return Ze(u,f)}),r){qr(t,xe);let o=()=>en(t,xe);t.addEventListener("pagehide",o),Le=()=>t.removeEventListener("pagehide",o)}return c.initialized||Ze(y.Pop,c.location,{initialHydration:!0}),Q}function rn(){m&&m(),Le&&Le(),_.clear(),ee&&ee.abort(),c.fetchers.forEach((o,u)=>kt(u)),c.blockers.forEach((o,u)=>Br(u))}function nn(o){return _.add(o),()=>_.delete(o)}function ye(o,u){u===void 0&&(u={}),c=z({},c,o);let f=[],P=[];b.v7_fetcherPersist&&c.fetchers.forEach((M,N)=>{M.state==="idle"&&(Fe.has(N)?P.push(N):f.push(N))}),[..._].forEach(M=>M(c,{deletedFetchers:P,unstable_viewTransitionOpts:u.viewTransitionOpts,unstable_flushSync:u.flushSync===!0})),b.v7_fetcherPersist&&(f.forEach(M=>c.fetchers.delete(M)),P.forEach(M=>kt(M)))}function Et(o,u,f){var P,M;let{flushSync:N}=f===void 0?{}:f,A=c.actionData!=null&&c.navigation.formMethod!=null&&we(c.navigation.formMethod)&&c.navigation.state==="loading"&&((P=o.state)==null?void 0:P._isRedirect)!==!0,j;u.actionData?Object.keys(u.actionData).length>0?j=u.actionData:j=null:A?j=c.actionData:j=null;let U=u.loaderData?he(c.loaderData,u.loaderData,u.matches||[],u.errors):c.loaderData,K=c.blockers;K.size>0&&(K=new Map(K),K.forEach((re,ce)=>K.set(ce,Ve)));let ue=J===!0||c.navigation.formMethod!=null&&we(c.navigation.formMethod)&&((M=o.state)==null?void 0:M._isRedirect)!==!0;p&&(i=p,p=void 0),nt||X===y.Pop||(X===y.Push?e.history.push(o,o.state):X===y.Replace&&e.history.replace(o,o.state));let I;if(X===y.Pop){let re=xe.get(c.location.pathname);re&&re.has(o.pathname)?I={currentLocation:c.location,nextLocation:o}:xe.has(o.pathname)&&(I={currentLocation:o,nextLocation:c.location})}else if(Ue){let re=xe.get(c.location.pathname);re?re.add(o.pathname):(re=new Set([o.pathname]),xe.set(c.location.pathname,re)),I={currentLocation:c.location,nextLocation:o}}ye(z({},u,{actionData:j,loaderData:U,historyAction:X,location:o,initialized:!0,navigation:vt,revalidation:"idle",restoreScrollPosition:zr(o,u.matches||c.matches),preventScrollReset:ue,blockers:K}),{viewTransitionOpts:I,flushSync:N===!0}),X=y.Pop,J=!1,Ue=!1,nt=!1,Qe=!1,It=[],Nt=[]}async function Tr(o,u){if(typeof o=="number"){e.history.go(o);return}let f=S(c.location,c.matches,h,b.v7_prependBasename,o,b.v7_relativeSplatPath,u==null?void 0:u.fromRouteId,u==null?void 0:u.relative),{path:P,submission:M,error:N}=T(b.v7_normalizeFormMethod,!1,f,u),A=c.location,j=be(c.location,P,u&&u.state);j=z({},j,e.history.encodeLocation(j));let U=u&&u.replace!=null?u.replace:void 0,K=y.Push;U===!0?K=y.Replace:U===!1||M!=null&&we(M.formMethod)&&M.formAction===c.location.pathname+c.location.search&&(K=y.Replace);let ue=u&&"preventScrollReset"in u?u.preventScrollReset===!0:void 0,I=(u&&u.unstable_flushSync)===!0,re=kr({currentLocation:A,nextLocation:j,historyAction:K});if(re){Ht(re,{state:"blocked",location:j,proceed(){Ht(re,{state:"proceeding",proceed:void 0,reset:void 0,location:j}),Tr(o,u)},reset(){let ce=new Map(c.blockers);ce.set(re,Ve),ye({blockers:ce})}});return}return await Ze(K,j,{submission:M,pendingError:N,preventScrollReset:ue,replace:u&&u.replace,enableViewTransition:u&&u.unstable_viewTransition,flushSync:I})}function an(){if(pr(),ye({revalidation:"loading"}),c.navigation.state!=="submitting"){if(c.navigation.state==="idle"){Ze(c.historyAction,c.location,{startUninterruptedRevalidation:!0});return}Ze(X||c.historyAction,c.navigation.location,{overrideNavigation:c.navigation})}}async function Ze(o,u,f){ee&&ee.abort(),ee=null,X=o,nt=(f&&f.startUninterruptedRevalidation)===!0,pn(c.location,c.matches),J=(f&&f.preventScrollReset)===!0,Ue=(f&&f.enableViewTransition)===!0;let P=p||i,M=f&&f.overrideNavigation,N=De(P,u,h),A=(f&&f.flushSync)===!0;if(!N){let ce=oe(404,{pathname:u.pathname}),{matches:Pe,route:de}=Ft(P);mr(),Et(u,{matches:Pe,loaderData:{},errors:{[de.id]:ce}},{flushSync:A});return}if(c.initialized&&!Qe&&Vr(c.location,u)&&!(f&&f.submission&&we(f.submission.formMethod))){Et(u,{matches:N},{flushSync:A});return}ee=new AbortController;let j=ne(e.history,u,ee.signal,f&&f.submission),U,K;if(f&&f.pendingError)K={[ge(N).route.id]:f.pendingError};else if(f&&f.submission&&we(f.submission.formMethod)){let ce=await on(j,u,f.submission,N,{replace:f.replace,flushSync:A});if(ce.shortCircuited)return;U=ce.pendingActionData,K=ce.pendingActionError,M=fr(u,f.submission),A=!1,j=new Request(j.url,{signal:j.signal})}let{shortCircuited:ue,loaderData:I,errors:re}=await ln(j,u,N,M,f&&f.submission,f&&f.fetcherSubmission,f&&f.replace,f&&f.initialHydration===!0,A,U,K);ue||(ee=null,Et(u,z({matches:N},U?{actionData:U}:{},{loaderData:I,errors:re})))}async function on(o,u,f,P,M){M===void 0&&(M={}),pr();let N=Xr(u,f);ye({navigation:N},{flushSync:M.flushSync===!0});let A,j=gt(P,u);if(!j.route.action&&!j.route.lazy)A={type:Z.error,error:oe(405,{method:o.method,pathname:u.pathname,routeId:j.route.id})};else if(A=await G("action",o,j,P,d,a,h,b.v7_relativeSplatPath),o.signal.aborted)return{shortCircuited:!0};if(ke(A)){let U;return M&&M.replace!=null?U=M.replace:U=A.location===c.location.pathname+c.location.search,await wt(c,A,{submission:f,replace:U}),{shortCircuited:!0}}if(Be(A)){let U=ge(P,j.route.id);return(M&&M.replace)!==!0&&(X=y.Push),{pendingActionData:{},pendingActionError:{[U.route.id]:A.error}}}if(Ne(A))throw oe(400,{type:"defer-action"});return{pendingActionData:{[j.route.id]:A.data}}}async function ln(o,u,f,P,M,N,A,j,U,K,ue){let I=P||fr(u,M),re=M||N||Or(I),ce=p||i,[Pe,de]=W(e.history,c,f,re,u,b.v7_partialHydration&&j===!0,Qe,It,Nt,Fe,ot,Ae,ce,h,K,ue);if(mr(te=>!(f&&f.some(ae=>ae.route.id===te))||Pe&&Pe.some(ae=>ae.route.id===te)),bt=++Bt,Pe.length===0&&de.length===0){let te=Ir();return Et(u,z({matches:f,loaderData:{},errors:ue||null},K?{actionData:K}:{},te?{fetchers:new Map(c.fetchers)}:{}),{flushSync:U}),{shortCircuited:!0}}if(!nt&&(!b.v7_partialHydration||!j)){de.forEach(ae=>{let Oe=c.fetchers.get(ae.key),Wt=yt(void 0,Oe?Oe.data:void 0);c.fetchers.set(ae.key,Wt)});let te=K||c.actionData;ye(z({navigation:I},te?Object.keys(te).length===0?{actionData:null}:{actionData:te}:{},de.length>0?{fetchers:new Map(c.fetchers)}:{}),{flushSync:U})}de.forEach(te=>{le.has(te.key)&&We(te.key),te.controller&&le.set(te.key,te.controller)});let it=()=>de.forEach(te=>We(te.key));ee&&ee.signal.addEventListener("abort",it);let{results:vr,loaderResults:lt,fetcherResults:Je}=await jr(c.matches,f,Pe,de,o);if(o.signal.aborted)return{shortCircuited:!0};ee&&ee.signal.removeEventListener("abort",it),de.forEach(te=>le.delete(te.key));let qe=Lr(vr);if(qe){if(qe.idx>=Pe.length){let te=de[qe.idx-Pe.length].key;Ae.add(te)}return await wt(c,qe.result,{replace:A}),{shortCircuited:!0}}let{loaderData:gr,errors:yr}=je(c,f,Pe,lt,ue,de,Je,Ge);Ge.forEach((te,ae)=>{te.subscribe(Oe=>{(Oe||te.done)&&Ge.delete(ae)})});let br=Ir(),st=Nr(bt),zt=br||st||de.length>0;return z({loaderData:gr,errors:yr},zt?{fetchers:new Map(c.fetchers)}:{})}function sn(o,u,f,P){if(n)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");le.has(o)&&We(o);let M=(P&&P.unstable_flushSync)===!0,N=p||i,A=S(c.location,c.matches,h,b.v7_prependBasename,f,b.v7_relativeSplatPath,u,P==null?void 0:P.relative),j=De(N,A,h);if(!j){xt(o,u,oe(404,{pathname:A}),{flushSync:M});return}let{path:U,submission:K,error:ue}=T(b.v7_normalizeFormMethod,!0,A,P);if(ue){xt(o,u,ue,{flushSync:M});return}let I=gt(j,U);if(J=(P&&P.preventScrollReset)===!0,K&&we(K.formMethod)){un(o,u,U,I,j,M,K);return}ot.set(o,{routeId:u,path:U}),dn(o,u,U,I,j,M,K)}async function un(o,u,f,P,M,N,A){if(pr(),ot.delete(o),!P.route.action&&!P.route.lazy){let ae=oe(405,{method:A.formMethod,pathname:f,routeId:u});xt(o,u,ae,{flushSync:N});return}let j=c.fetchers.get(o);ze(o,Zr(A,j),{flushSync:N});let U=new AbortController,K=ne(e.history,f,U.signal,A);le.set(o,U);let ue=Bt,I=await G("action",K,P,M,d,a,h,b.v7_relativeSplatPath);if(K.signal.aborted){le.get(o)===U&&le.delete(o);return}if(b.v7_fetcherPersist&&Fe.has(o)){if(ke(I)||Be(I)){ze(o,He(void 0));return}}else{if(ke(I))if(le.delete(o),bt>ue){ze(o,He(void 0));return}else return Ae.add(o),ze(o,yt(A)),wt(c,I,{fetcherSubmission:A});if(Be(I)){xt(o,u,I.error);return}}if(Ne(I))throw oe(400,{type:"defer-action"});let re=c.navigation.location||c.location,ce=ne(e.history,re,U.signal),Pe=p||i,de=c.navigation.state!=="idle"?De(Pe,c.navigation.location,h):c.matches;k(de,"Didn't find any matches after fetcher action");let it=++Bt;at.set(o,it);let vr=yt(A,I.data);c.fetchers.set(o,vr);let[lt,Je]=W(e.history,c,de,A,re,!1,Qe,It,Nt,Fe,ot,Ae,Pe,h,{[P.route.id]:I.data},void 0);Je.filter(ae=>ae.key!==o).forEach(ae=>{let Oe=ae.key,Wt=c.fetchers.get(Oe),vn=yt(void 0,Wt?Wt.data:void 0);c.fetchers.set(Oe,vn),le.has(Oe)&&We(Oe),ae.controller&&le.set(Oe,ae.controller)}),ye({fetchers:new Map(c.fetchers)});let qe=()=>Je.forEach(ae=>We(ae.key));U.signal.addEventListener("abort",qe);let{results:gr,loaderResults:yr,fetcherResults:br}=await jr(c.matches,de,lt,Je,ce);if(U.signal.aborted)return;U.signal.removeEventListener("abort",qe),at.delete(o),le.delete(o),Je.forEach(ae=>le.delete(ae.key));let st=Lr(gr);if(st){if(st.idx>=lt.length){let ae=Je[st.idx-lt.length].key;Ae.add(ae)}return wt(c,st.result)}let{loaderData:zt,errors:te}=je(c,c.matches,lt,yr,void 0,Je,br,Ge);if(c.fetchers.has(o)){let ae=He(I.data);c.fetchers.set(o,ae)}Nr(it),c.navigation.state==="loading"&&it>bt?(k(X,"Expected pending action"),ee&&ee.abort(),Et(c.navigation.location,{matches:de,loaderData:zt,errors:te,fetchers:new Map(c.fetchers)})):(ye({errors:te,loaderData:he(c.loaderData,zt,de,te),fetchers:new Map(c.fetchers)}),Qe=!1)}async function dn(o,u,f,P,M,N,A){let j=c.fetchers.get(o);ze(o,yt(A,j?j.data:void 0),{flushSync:N});let U=new AbortController,K=ne(e.history,f,U.signal);le.set(o,U);let ue=Bt,I=await G("loader",K,P,M,d,a,h,b.v7_relativeSplatPath);if(Ne(I)&&(I=await Ur(I,K.signal,!0)||I),le.get(o)===U&&le.delete(o),!K.signal.aborted){if(Fe.has(o)){ze(o,He(void 0));return}if(ke(I))if(bt>ue){ze(o,He(void 0));return}else{Ae.add(o),await wt(c,I);return}if(Be(I)){xt(o,u,I.error);return}k(!Ne(I),"Unhandled fetcher deferred data"),ze(o,He(I.data))}}async function wt(o,u,f){let{submission:P,fetcherSubmission:M,replace:N}=f===void 0?{}:f;u.revalidate&&(Qe=!0);let A=be(o.location,u.location,{_isRedirect:!0});if(k(A,"Expected a location on the redirect navigation"),r){let re=!1;if(u.reloadDocument)re=!0;else if(Ye.test(u.location)){const ce=e.history.createURL(u.location);re=ce.origin!==t.location.origin||Se(ce.pathname,h)==null}if(re){N?t.location.replace(u.location):t.location.assign(u.location);return}}ee=null;let j=N===!0?y.Replace:y.Push,{formMethod:U,formAction:K,formEncType:ue}=o.navigation;!P&&!M&&U&&K&&ue&&(P=Or(o.navigation));let I=P||M;if(me.has(u.status)&&I&&we(I.formMethod))await Ze(j,A,{submission:z({},I,{formAction:u.location}),preventScrollReset:J});else{let re=fr(A,P);await Ze(j,A,{overrideNavigation:re,fetcherSubmission:M,preventScrollReset:J})}}async function jr(o,u,f,P,M){let N=await Promise.all([...f.map(U=>G("loader",M,U,u,d,a,h,b.v7_relativeSplatPath)),...P.map(U=>U.matches&&U.match&&U.controller?G("loader",ne(e.history,U.path,U.controller.signal),U.match,U.matches,d,a,h,b.v7_relativeSplatPath):{type:Z.error,error:oe(404,{pathname:U.path})})]),A=N.slice(0,f.length),j=N.slice(f.length);return await Promise.all([_r(o,f,A,A.map(()=>M.signal),!1,c.loaderData),_r(o,P.map(U=>U.match),j,P.map(U=>U.controller?U.controller.signal:null),!0)]),{results:N,loaderResults:A,fetcherResults:j}}function pr(){Qe=!0,It.push(...mr()),ot.forEach((o,u)=>{le.has(u)&&(Nt.push(u),We(u))})}function ze(o,u,f){f===void 0&&(f={}),c.fetchers.set(o,u),ye({fetchers:new Map(c.fetchers)},{flushSync:(f&&f.flushSync)===!0})}function xt(o,u,f,P){P===void 0&&(P={});let M=ge(c.matches,u);kt(o),ye({errors:{[M.route.id]:f},fetchers:new Map(c.fetchers)},{flushSync:(P&&P.flushSync)===!0})}function Ar(o){return b.v7_fetcherPersist&&(Rt.set(o,(Rt.get(o)||0)+1),Fe.has(o)&&Fe.delete(o)),c.fetchers.get(o)||sr}function kt(o){let u=c.fetchers.get(o);le.has(o)&&!(u&&u.state==="loading"&&at.has(o))&&We(o),ot.delete(o),at.delete(o),Ae.delete(o),Fe.delete(o),c.fetchers.delete(o)}function cn(o){if(b.v7_fetcherPersist){let u=(Rt.get(o)||0)-1;u<=0?(Rt.delete(o),Fe.add(o)):Rt.set(o,u)}else kt(o);ye({fetchers:new Map(c.fetchers)})}function We(o){let u=le.get(o);k(u,"Expected fetch controller: "+o),u.abort(),le.delete(o)}function Fr(o){for(let u of o){let f=Ar(u),P=He(f.data);c.fetchers.set(u,P)}}function Ir(){let o=[],u=!1;for(let f of Ae){let P=c.fetchers.get(f);k(P,"Expected fetcher: "+f),P.state==="loading"&&(Ae.delete(f),o.push(f),u=!0)}return Fr(o),u}function Nr(o){let u=[];for(let[f,P]of at)if(P<o){let M=c.fetchers.get(f);k(M,"Expected fetcher: "+f),M.state==="loading"&&(We(f),at.delete(f),u.push(f))}return Fr(u),u.length>0}function fn(o,u){let f=c.blockers.get(o)||Ve;return Xe.get(o)!==u&&Xe.set(o,u),f}function Br(o){c.blockers.delete(o),Xe.delete(o)}function Ht(o,u){let f=c.blockers.get(o)||Ve;k(f.state==="unblocked"&&u.state==="blocked"||f.state==="blocked"&&u.state==="blocked"||f.state==="blocked"&&u.state==="proceeding"||f.state==="blocked"&&u.state==="unblocked"||f.state==="proceeding"&&u.state==="unblocked","Invalid blocker state transition: "+f.state+" -> "+u.state);let P=new Map(c.blockers);P.set(o,u),ye({blockers:P})}function kr(o){let{currentLocation:u,nextLocation:f,historyAction:P}=o;if(Xe.size===0)return;Xe.size>1&&se(!1,"A router only supports one blocker at a time");let M=Array.from(Xe.entries()),[N,A]=M[M.length-1],j=c.blockers.get(N);if(!(j&&j.state==="proceeding")&&A({currentLocation:u,nextLocation:f,historyAction:P}))return N}function mr(o){let u=[];return Ge.forEach((f,P)=>{(!o||o(P))&&(f.cancel(),u.push(P),Ge.delete(P))}),u}function hn(o,u,f){if(E=o,C=u,x=f||null,!D&&c.navigation===vt){D=!0;let P=zr(c.location,c.matches);P!=null&&ye({restoreScrollPosition:P})}return()=>{E=null,C=null,x=null}}function Hr(o,u){return x&&x(o,u.map(P=>$t(P,c.loaderData)))||o.key}function pn(o,u){if(E&&C){let f=Hr(o,u);E[f]=C()}}function zr(o,u){if(E){let f=Hr(o,u),P=E[f];if(typeof P=="number")return P}return null}function mn(o){d={},p=$e(o,a,void 0,d)}return Q={get basename(){return h},get future(){return b},get state(){return c},get routes(){return i},get window(){return t},initialize:tn,subscribe:nn,enableScrollRestoration:hn,navigate:Tr,fetch:sn,revalidate:an,createHref:o=>e.history.createHref(o),encodeLocation:o=>e.history.encodeLocation(o),getFetcher:Ar,deleteFetcher:cn,dispose:rn,getBlocker:fn,deleteBlocker:Br,_internalFetchControllers:le,_internalActiveDeferreds:Ge,_internalSetRoutes:mn},Q}const l=Symbol("deferred");function s(e,t){k(e.length>0,"You must provide a non-empty routes array to createStaticHandler");let r={},n=(t?t.basename:null)||"/",a;if(t!=null&&t.mapRouteProperties)a=t.mapRouteProperties;else if(t!=null&&t.detectErrorBoundary){let E=t.detectErrorBoundary;a=x=>({hasErrorBoundary:E(x)})}else a=ur;let d=z({v7_relativeSplatPath:!1},t?t.future:null),i=$e(e,a,void 0,r);async function p(E,x){let{requestContext:C}=x===void 0?{}:x,D=new URL(E.url),w=E.method,g=be("",Re(D),null,"default"),F=De(i,g,n);if(!dr(w)&&w!=="HEAD"){let V=oe(405,{method:w}),{matches:Q,route:c}=Ft(i);return{basename:n,location:g,matches:Q,loaderData:{},actionData:null,errors:{[c.id]:V},statusCode:V.status,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}else if(!F){let V=oe(404,{pathname:g.pathname}),{matches:Q,route:c}=Ft(i);return{basename:n,location:g,matches:Q,loaderData:{},actionData:null,errors:{[c.id]:V},statusCode:V.status,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}let Y=await b(E,g,F,C);return rt(Y)?Y:z({location:g,basename:n},Y)}async function h(E,x){let{routeId:C,requestContext:D}=x===void 0?{}:x,w=new URL(E.url),g=E.method,F=be("",Re(w),null,"default"),Y=De(i,F,n);if(!dr(g)&&g!=="HEAD"&&g!=="OPTIONS")throw oe(405,{method:g});if(!Y)throw oe(404,{pathname:F.pathname});let V=C?Y.find(J=>J.route.id===C):gt(Y,F);if(C&&!V)throw oe(403,{pathname:F.pathname,routeId:C});if(!V)throw oe(404,{pathname:F.pathname});let Q=await b(E,F,Y,D,V);if(rt(Q))return Q;let c=Q.errors?Object.values(Q.errors)[0]:void 0;if(c!==void 0)throw c;if(Q.actionData)return Object.values(Q.actionData)[0];if(Q.loaderData){var X;let J=Object.values(Q.loaderData)[0];return(X=Q.activeDeferreds)!=null&&X[V.route.id]&&(J[l]=Q.activeDeferreds[V.route.id]),J}}async function b(E,x,C,D,w){k(E.signal,"query()/queryRoute() requests must contain an AbortController signal");try{if(we(E.method.toLowerCase()))return await m(E,C,w||gt(C,x),D,w!=null);let g=await _(E,C,D,w);return rt(g)?g:z({},g,{actionData:null,actionHeaders:{}})}catch(g){if(Gr(g)){if(g.type===Z.error)throw g.response;return g.response}if(Qr(g))return g;throw g}}async function m(E,x,C,D,w){let g;if(!C.route.action&&!C.route.lazy){let V=oe(405,{method:E.method,pathname:new URL(E.url).pathname,routeId:C.route.id});if(w)throw V;g={type:Z.error,error:V}}else if(g=await G("action",E,C,x,r,a,n,d.v7_relativeSplatPath,{isStaticRequest:!0,isRouteRequest:w,requestContext:D}),E.signal.aborted){let V=w?"queryRoute":"query";throw new Error(V+"() call aborted: "+E.method+" "+E.url)}if(ke(g))throw new Response(null,{status:g.status,headers:{Location:g.location}});if(Ne(g)){let V=oe(400,{type:"defer-action"});if(w)throw V;g={type:Z.error,error:V}}if(w){if(Be(g))throw g.error;return{matches:[C],loaderData:{},actionData:{[C.route.id]:g.data},errors:null,statusCode:200,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}if(Be(g)){let V=ge(x,C.route.id),Q=await _(E,x,D,void 0,{[V.route.id]:g.error});return z({},Q,{statusCode:pt(g.error)?g.error.status:500,actionData:null,actionHeaders:z({},g.headers?{[C.route.id]:g.headers}:{})})}let F=new Request(E.url,{headers:E.headers,redirect:E.redirect,signal:E.signal}),Y=await _(F,x,D);return z({},Y,g.statusCode?{statusCode:g.statusCode}:{},{actionData:{[C.route.id]:g.data},actionHeaders:z({},g.headers?{[C.route.id]:g.headers}:{})})}async function _(E,x,C,D,w){let g=D!=null;if(g&&!(D!=null&&D.route.loader)&&!(D!=null&&D.route.lazy))throw oe(400,{method:E.method,pathname:new URL(E.url).pathname,routeId:D==null?void 0:D.route.id});let Y=(D?[D]:L(x,Object.keys(w||{})[0])).filter(J=>J.route.loader||J.route.lazy);if(Y.length===0)return{matches:x,loaderData:x.reduce((J,ee)=>Object.assign(J,{[ee.route.id]:null}),{}),errors:w||null,statusCode:200,loaderHeaders:{},activeDeferreds:null};let V=await Promise.all([...Y.map(J=>G("loader",E,J,x,r,a,n,d.v7_relativeSplatPath,{isStaticRequest:!0,isRouteRequest:g,requestContext:C}))]);if(E.signal.aborted){let J=g?"queryRoute":"query";throw new Error(J+"() call aborted: "+E.method+" "+E.url)}let Q=new Map,c=Ee(x,Y,V,w,Q),X=new Set(Y.map(J=>J.route.id));return x.forEach(J=>{X.has(J.route.id)||(c.loaderData[J.route.id]=null)}),z({},c,{matches:x,activeDeferreds:Q.size>0?Object.fromEntries(Q.entries()):null})}return{dataRoutes:i,query:p,queryRoute:h}}function v(e,t,r){return z({},t,{statusCode:500,errors:{[t._deepestRenderedBoundaryId||e[0].id]:r}})}function R(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function S(e,t,r,n,a,d,i,p){let h,b;if(i){h=[];for(let _ of t)if(h.push(_),_.route.id===i){b=_;break}}else h=t,b=t[t.length-1];let m=rr(a||".",tr(h,d),Se(e.pathname,r)||e.pathname,p==="path");return a==null&&(m.search=e.search,m.hash=e.hash),(a==null||a===""||a===".")&&b&&b.route.index&&!cr(m.search)&&(m.search=m.search?m.search.replace(/^\?/,"?index&"):"?index"),n&&r!=="/"&&(m.pathname=m.pathname==="/"?r:Ie([r,m.pathname])),Re(m)}function T(e,t,r,n){if(!n||!R(n))return{path:r};if(n.formMethod&&!dr(n.formMethod))return{path:r,error:oe(405,{method:n.formMethod})};let a=()=>({path:r,error:oe(400,{type:"invalid-body"})}),d=n.formMethod||"get",i=e?d.toUpperCase():d.toLowerCase(),p=Mr(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!we(i))return a();let E=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((x,C)=>{let[D,w]=C;return""+x+D+"="+w+`
20
+ `},""):String(n.body);return{path:r,submission:{formMethod:i,formAction:p,formEncType:n.formEncType,formData:void 0,json:void 0,text:E}}}else if(n.formEncType==="application/json"){if(!we(i))return a();try{let E=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:i,formAction:p,formEncType:n.formEncType,formData:void 0,json:E,text:void 0}}}catch{return a()}}}k(typeof FormData=="function","FormData is not available in this environment");let h,b;if(n.formData)h=pe(n.formData),b=n.formData;else if(n.body instanceof FormData)h=pe(n.body),b=n.body;else if(n.body instanceof URLSearchParams)h=n.body,b=Ce(h);else if(n.body==null)h=new URLSearchParams,b=new FormData;else try{h=new URLSearchParams(n.body),b=Ce(h)}catch{return a()}let m={formMethod:i,formAction:p,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:b,json:void 0,text:void 0};if(we(m.formMethod))return{path:r,submission:m};let _=ie(r);return t&&_.search&&cr(_.search)&&h.append("index",""),_.search="?"+h,{path:Re(_),submission:m}}function L(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 W(e,t,r,n,a,d,i,p,h,b,m,_,E,x,C,D){let w=D?Object.values(D)[0]:C?Object.values(C)[0]:void 0,g=e.createURL(t.location),F=e.createURL(a),Y=D?Object.keys(D)[0]:void 0,Q=L(r,Y).filter((X,J)=>{let{route:ee}=X;if(ee.lazy)return!0;if(ee.loader==null)return!1;if(d)return ee.loader.hydrate?!0:t.loaderData[ee.id]===void 0&&(!t.errors||t.errors[ee.id]===void 0);if(q(t.loaderData,t.matches[J],X)||p.some(Le=>Le===X.route.id))return!0;let Ue=t.matches[J],xe=X;return $(X,z({currentUrl:g,currentParams:Ue.params,nextUrl:F,nextParams:xe.params},n,{actionResult:w,defaultShouldRevalidate:i||g.pathname+g.search===F.pathname+F.search||g.search!==F.search||H(Ue,xe)}))}),c=[];return m.forEach((X,J)=>{if(d||!r.some(nt=>nt.route.id===X.routeId)||b.has(J))return;let ee=De(E,X.path,x);if(!ee){c.push({key:J,routeId:X.routeId,path:X.path,matches:null,match:null,controller:null});return}let Ue=t.fetchers.get(J),xe=gt(ee,X.path),Le=!1;_.has(J)?Le=!1:h.includes(J)?Le=!0:Ue&&Ue.state!=="idle"&&Ue.data===void 0?Le=i:Le=$(xe,z({currentUrl:g,currentParams:t.matches[t.matches.length-1].params,nextUrl:F,nextParams:r[r.length-1].params},n,{actionResult:w,defaultShouldRevalidate:i})),Le&&c.push({key:J,routeId:X.routeId,path:X.path,matches:ee,match:xe,controller:new AbortController})}),[Q,c]}function q(e,t,r){let n=!t||r.route.id!==t.route.id,a=e[r.route.id]===void 0;return n||a}function H(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function $(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}async function O(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let a=r[e.id];k(a,"No route found in manifest");let d={};for(let i in n){let h=a[i]!==void 0&&i!=="hasErrorBoundary";se(!h,'Route "'+a.id+'" has a static property "'+i+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+i+'" will be ignored.')),!h&&!Rr.has(i)&&(d[i]=n[i])}Object.assign(a,d),Object.assign(a,z({},t(a),{lazy:void 0}))}async function G(e,t,r,n,a,d,i,p,h){h===void 0&&(h={});let b,m,_,E=D=>{let w,g=new Promise((F,Y)=>w=Y);return _=()=>w(),t.signal.addEventListener("abort",_),Promise.race([D({request:t,params:r.params,context:h.requestContext}),g])};try{let D=r.route[e];if(r.route.lazy)if(D){let w,g=await Promise.all([E(D).catch(F=>{w=F}),O(r.route,d,a)]);if(w)throw w;m=g[0]}else if(await O(r.route,d,a),D=r.route[e],D)m=await E(D);else if(e==="action"){let w=new URL(t.url),g=w.pathname+w.search;throw oe(405,{method:t.method,pathname:g,routeId:r.route.id})}else return{type:Z.data,data:void 0};else if(D)m=await E(D);else{let w=new URL(t.url),g=w.pathname+w.search;throw oe(404,{pathname:g})}k(m!==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(D){b=Z.error,m=D}finally{_&&t.signal.removeEventListener("abort",_)}if(rt(m)){let D=m.status;if(Cr.has(D)){let g=m.headers.get("Location");if(k(g,"Redirects returned/thrown from loaders/actions must have a Location header"),!Ye.test(g))g=S(new URL(t.url),n.slice(0,n.indexOf(r)+1),i,!0,g,p);else if(!h.isStaticRequest){let F=new URL(t.url),Y=g.startsWith("//")?new URL(F.protocol+g):new URL(g),V=Se(Y.pathname,i)!=null;Y.origin===F.origin&&V&&(g=Y.pathname+Y.search+Y.hash)}if(h.isStaticRequest)throw m.headers.set("Location",g),m;return{type:Z.redirect,status:D,location:g,revalidate:m.headers.get("X-Remix-Revalidate")!==null,reloadDocument:m.headers.get("X-Remix-Reload-Document")!==null}}if(h.isRouteRequest)throw{type:b===Z.error?Z.error:Z.data,response:m};let w;try{let g=m.headers.get("Content-Type");g&&/\bapplication\/json\b/.test(g)?m.body==null?w=null:w=await m.json():w=await m.text()}catch(g){return{type:Z.error,error:g}}return b===Z.error?{type:b,error:new Ot(D,m.statusText,w),headers:m.headers}:{type:Z.data,data:w,statusCode:m.status,headers:m.headers}}if(b===Z.error)return{type:b,error:m};if(Yr(m)){var x,C;return{type:Z.deferred,deferredData:m,statusCode:(x=m.init)==null?void 0:x.status,headers:((C=m.init)==null?void 0:C.headers)&&new Headers(m.init.headers)}}return{type:Z.data,data:m}}function ne(e,t,r,n){let a=e.createURL(Mr(t)).toString(),d={signal:r};if(n&&we(n.formMethod)){let{formMethod:i,formEncType:p}=n;d.method=i.toUpperCase(),p==="application/json"?(d.headers=new Headers({"Content-Type":p}),d.body=JSON.stringify(n.json)):p==="text/plain"?d.body=n.text:p==="application/x-www-form-urlencoded"&&n.formData?d.body=pe(n.formData):d.body=n.formData}return new Request(a,d)}function pe(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function Ce(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function Ee(e,t,r,n,a){let d={},i=null,p,h=!1,b={};return r.forEach((m,_)=>{let E=t[_].route.id;if(k(!ke(m),"Cannot handle redirect results in processLoaderData"),Be(m)){let x=ge(e,E),C=m.error;n&&(C=Object.values(n)[0],n=void 0),i=i||{},i[x.route.id]==null&&(i[x.route.id]=C),d[E]=void 0,h||(h=!0,p=pt(m.error)?m.error.status:500),m.headers&&(b[E]=m.headers)}else Ne(m)?(a.set(E,m.deferredData),d[E]=m.deferredData.data):d[E]=m.data,m.statusCode!=null&&m.statusCode!==200&&!h&&(p=m.statusCode),m.headers&&(b[E]=m.headers)}),n&&(i=n,d[Object.keys(n)[0]]=void 0),{loaderData:d,errors:i,statusCode:p||200,loaderHeaders:b}}function je(e,t,r,n,a,d,i,p){let{loaderData:h,errors:b}=Ee(t,r,n,a,p);for(let m=0;m<d.length;m++){let{key:_,match:E,controller:x}=d[m];k(i!==void 0&&i[m]!==void 0,"Did not find corresponding fetcher result");let C=i[m];if(!(x&&x.signal.aborted))if(Be(C)){let D=ge(e.matches,E==null?void 0:E.route.id);b&&b[D.route.id]||(b=z({},b,{[D.route.id]:C.error})),e.fetchers.delete(_)}else if(ke(C))k(!1,"Unhandled fetcher revalidation redirect");else if(Ne(C))k(!1,"Unhandled fetcher deferred data");else{let D=He(C.data);e.fetchers.set(_,D)}}return{loaderData:h,errors:b}}function he(e,t,r,n){let a=z({},t);for(let d of r){let i=d.route.id;if(t.hasOwnProperty(i)?t[i]!==void 0&&(a[i]=t[i]):e[i]!==void 0&&d.route.loader&&(a[i]=e[i]),n&&n.hasOwnProperty(i))break}return a}function ge(e,t){return(t?e.slice(0,e.findIndex(n=>n.route.id===t)+1):[...e]).reverse().find(n=>n.route.hasErrorBoundary===!0)||e[0]}function Ft(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 oe(e,t){let{pathname:r,routeId:n,method:a,type:d}=t===void 0?{}:t,i="Unknown Server Error",p="Unknown @remix-run/router error";return e===400?(i="Bad Request",a&&r&&n?p="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.":d==="defer-action"?p="defer() is not supported in actions":d==="invalid-body"&&(p="Unable to encode submission body")):e===403?(i="Forbidden",p='Route "'+n+'" does not match URL "'+r+'"'):e===404?(i="Not Found",p='No route matches URL "'+r+'"'):e===405&&(i="Method Not Allowed",a&&r&&n?p="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&&(p='Invalid request method "'+a.toUpperCase()+'"')),new Ot(e||500,i,new Error(p),!0)}function Lr(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(ke(r))return{result:r,idx:t}}}function Mr(e){let t=typeof e=="string"?ie(e):e;return Re(z({},t,{hash:""}))}function Vr(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Ne(e){return e.type===Z.deferred}function Be(e){return e.type===Z.error}function ke(e){return(e&&e.type)===Z.redirect}function Yr(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 rt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body!="undefined"}function Qr(e){if(!rt(e))return!1;let t=e.status,r=e.headers.get("Location");return t>=300&&t<=399&&r!=null}function Gr(e){return e&&rt(e.response)&&(e.type===Z.data||e.type===Z.error)}function dr(e){return lr.has(e.toLowerCase())}function we(e){return jt.has(e.toLowerCase())}async function _r(e,t,r,n,a,d){for(let i=0;i<r.length;i++){let p=r[i],h=t[i];if(!h)continue;let b=e.find(_=>_.route.id===h.route.id),m=b!=null&&!H(b,h)&&(d&&d[h.route.id])!==void 0;if(Ne(p)&&(a||m)){let _=n[i];k(_,"Expected an AbortSignal for revalidating fetcher deferred result"),await Ur(p,_,a).then(E=>{E&&(r[i]=E||r[i])})}}}async function Ur(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:Z.data,data:e.deferredData.unwrappedData}}catch(a){return{type:Z.error,error:a}}return{type:Z.data,data:e.deferredData.data}}}function cr(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function gt(e,t){let r=typeof t=="string"?ie(t).search:t.search;if(e[e.length-1].route.index&&cr(r||""))return e[e.length-1];let n=er(e);return n[n.length-1]}function Or(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:d,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(d!=null)return{formMethod:t,formAction:r,formEncType:n,formData:d,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 fr(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 Xr(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 yt(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 Zr(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 He(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 qr(e,t){try{let r=e.sessionStorage.getItem(At);if(r){let n=JSON.parse(r);for(let[a,d]of Object.entries(n||{}))d&&Array.isArray(d)&&t.set(a,new Set(d||[]))}}catch{}}function en(e,t){if(t.size>0){let r={};for(let[n,a]of t)r[n]=[...a];try{e.sessionStorage.setItem(At,JSON.stringify(r))}catch(n){se(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}}}]);})();
21
+
22
+ //# sourceMappingURL=module-react-router.fc2430de.js.map