@openmrs/esm-laboratory-app 1.2.1-pre.937 → 1.2.1-pre.939

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 (134) hide show
  1. package/.eslintrc +1 -1
  2. package/.turbo/cache/a81131c603b82fc8-meta.json +1 -0
  3. package/.turbo/cache/a81131c603b82fc8.tar.zst +0 -0
  4. package/.turbo/turbo-build.log +24 -23
  5. package/dist/1026.js +1 -1
  6. package/dist/1026.js.LICENSE.txt +3 -3
  7. package/dist/1026.js.map +1 -1
  8. package/dist/1083.js +1 -1
  9. package/dist/1083.js.map +1 -1
  10. package/dist/1119.js +1 -1
  11. package/dist/1120.js +1 -1
  12. package/dist/1120.js.map +1 -1
  13. package/dist/1197.js +1 -1
  14. package/dist/1788.js +1 -1
  15. package/dist/1788.js.map +1 -1
  16. package/dist/2058.js +1 -1
  17. package/dist/2058.js.map +1 -1
  18. package/dist/2146.js +1 -1
  19. package/dist/2246.js +1 -1
  20. package/dist/2246.js.map +1 -1
  21. package/dist/2416.js +2 -0
  22. package/dist/2416.js.map +1 -0
  23. package/dist/2690.js +1 -1
  24. package/dist/2934.js +1 -1
  25. package/dist/2934.js.map +1 -1
  26. package/dist/3099.js +1 -1
  27. package/dist/3495.js +1 -1
  28. package/dist/3495.js.map +1 -1
  29. package/dist/3584.js +1 -1
  30. package/dist/3656.js +1 -1
  31. package/dist/3656.js.map +1 -1
  32. package/dist/4055.js +1 -1
  33. package/dist/4069.js +1 -1
  34. package/dist/4069.js.map +1 -1
  35. package/dist/4132.js +1 -1
  36. package/dist/4239.js +1 -1
  37. package/dist/4239.js.map +1 -1
  38. package/dist/4300.js +1 -1
  39. package/dist/4335.js +1 -1
  40. package/dist/4369.js +1 -1
  41. package/dist/4369.js.map +1 -1
  42. package/dist/4618.js +1 -1
  43. package/dist/4652.js +1 -1
  44. package/dist/4836.js +1 -0
  45. package/dist/4836.js.map +1 -0
  46. package/dist/4944.js +1 -1
  47. package/dist/5085.js +1 -1
  48. package/dist/5085.js.map +1 -1
  49. package/dist/5130.js +1 -0
  50. package/dist/5130.js.map +1 -0
  51. package/dist/5173.js +1 -1
  52. package/dist/5241.js +1 -1
  53. package/dist/5442.js +1 -1
  54. package/dist/5661.js +1 -1
  55. package/dist/6022.js +1 -1
  56. package/dist/6134.js +1 -1
  57. package/dist/6134.js.map +1 -1
  58. package/dist/6468.js +1 -1
  59. package/dist/6547.js +1 -1
  60. package/dist/6547.js.map +1 -1
  61. package/dist/6679.js +1 -1
  62. package/dist/6840.js +1 -1
  63. package/dist/6859.js +1 -1
  64. package/dist/6867.js +1 -0
  65. package/dist/6867.js.map +1 -0
  66. package/dist/7003.js +1 -1
  67. package/dist/7003.js.map +1 -1
  68. package/dist/7083.js +2 -0
  69. package/dist/7083.js.LICENSE.txt +9 -0
  70. package/dist/7083.js.map +1 -0
  71. package/dist/7097.js +1 -1
  72. package/dist/7159.js +1 -1
  73. package/dist/723.js +1 -1
  74. package/dist/7423.js +1 -1
  75. package/dist/7423.js.map +1 -1
  76. package/dist/7566.js +1 -0
  77. package/dist/7566.js.map +1 -0
  78. package/dist/7617.js +1 -1
  79. package/dist/795.js +1 -1
  80. package/dist/8163.js +1 -1
  81. package/dist/8349.js +1 -1
  82. package/dist/8554.js +1 -1
  83. package/dist/8554.js.map +1 -1
  84. package/dist/8618.js +1 -1
  85. package/dist/8667.js +1 -1
  86. package/dist/8667.js.map +1 -1
  87. package/dist/876.js +1 -1
  88. package/dist/876.js.map +1 -1
  89. package/dist/8828.js +1 -0
  90. package/dist/8828.js.map +1 -0
  91. package/dist/890.js +1 -1
  92. package/dist/8966.js +2 -0
  93. package/dist/{5283.js.LICENSE.txt → 8966.js.LICENSE.txt} +1 -1
  94. package/dist/8966.js.map +1 -0
  95. package/dist/9214.js +1 -1
  96. package/dist/9569.js +1 -1
  97. package/dist/986.js +1 -1
  98. package/dist/9879.js +1 -1
  99. package/dist/9892.js +1 -0
  100. package/dist/9892.js.map +1 -0
  101. package/dist/9900.js +1 -1
  102. package/dist/9913.js +1 -1
  103. package/dist/main.js +1 -1
  104. package/dist/main.js.map +1 -1
  105. package/dist/openmrs-esm-laboratory-app.js +1 -1
  106. package/dist/openmrs-esm-laboratory-app.js.buildmanifest.json +284 -137
  107. package/dist/openmrs-esm-laboratory-app.js.map +1 -1
  108. package/dist/routes.json +1 -1
  109. package/package.json +1 -1
  110. package/src/components/orders-table/list-order-details.component.tsx +16 -1
  111. package/src/components/orders-table/orders-data-table.component.tsx +1 -2
  112. package/src/config-schema.ts +7 -1
  113. package/src/index.ts +27 -0
  114. package/src/lab-tabs/actions/amend-lab-results-action.component.tsx +41 -0
  115. package/src/lab-tabs/actions/approve-lab-results-action.component.tsx +37 -0
  116. package/src/lab-tabs/actions/pickup-lab-request-action.component.tsx +1 -1
  117. package/src/lab-tabs/data-table-extensions/pending-review-lab-request-table.extension.tsx +16 -0
  118. package/src/lab-tabs/laboratory-tabs.component.tsx +47 -40
  119. package/src/lab-tabs/modals/approval-lab-results-modal.component.tsx +85 -0
  120. package/src/lab-tiles/laboratory-summary-tiles.component.tsx +30 -21
  121. package/src/lab-tiles/pending-review-lab-results-tile.component.tsx +22 -0
  122. package/src/laboratory-resource.ts +2 -2
  123. package/src/routes.json +38 -0
  124. package/src/types.ts +80 -1
  125. package/translations/en.json +11 -0
  126. package/.turbo/cache/8f0909ff0982f2c9-meta.json +0 -1
  127. package/.turbo/cache/8f0909ff0982f2c9.tar.zst +0 -0
  128. package/dist/5283.js +0 -2
  129. package/dist/5283.js.map +0 -1
  130. package/dist/5690.js +0 -1
  131. package/dist/5690.js.map +0 -1
  132. package/dist/9302.js +0 -2
  133. package/dist/9302.js.map +0 -1
  134. /package/dist/{9302.js.LICENSE.txt → 2416.js.LICENSE.txt} +0 -0
package/dist/1026.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see 1026.js.LICENSE.txt */
2
- "use strict";(globalThis.webpackChunk_openmrs_esm_laboratory_app=globalThis.webpackChunk_openmrs_esm_laboratory_app||[]).push([[1026],{91026:(e,t,r)=>{r.r(t),r.d(t,{AbortedDeferredError:()=>me,Await:()=>Sr,BrowserRouter:()=>an,Form:()=>vn,HashRouter:()=>on,Link:()=>dn,MemoryRouter:()=>pr,NavLink:()=>hn,Navigate:()=>mr,NavigationType:()=>n,Outlet:()=>yr,Route:()=>br,Router:()=>gr,RouterProvider:()=>rn,Routes:()=>wr,ScrollRestoration:()=>pn,UNSAFE_DataRouterContext:()=>Rt,UNSAFE_DataRouterStateContext:()=>Dt,UNSAFE_FetchersContext:()=>Xr,UNSAFE_LocationContext:()=>Ct,UNSAFE_NavigationContext:()=>Pt,UNSAFE_RouteContext:()=>_t,UNSAFE_ViewTransitionContext:()=>Yr,UNSAFE_useRouteId:()=>tr,UNSAFE_useScrollRestoration:()=>Cn,createBrowserRouter:()=>$r,createHashRouter:()=>Jr,createMemoryRouter:()=>_r,createPath:()=>I,createRoutesFromChildren:()=>kr,createRoutesFromElements:()=>kr,createSearchParams:()=>Ir,defer:()=>be,generatePath:()=>re,isRouteErrorResponse:()=>Ee,json:()=>pe,matchPath:()=>ne,matchRoutes:()=>W,parsePath:()=>B,redirect:()=>ge,redirectDocument:()=>we,renderMatches:()=>Pr,resolvePath:()=>ie,unstable_HistoryRouter:()=>un,unstable_usePrompt:()=>Ln,unstable_useViewTransitionState:()=>Tn,useActionData:()=>ur,useAsyncError:()=>lr,useAsyncValue:()=>cr,useBeforeUnload:()=>_n,useBlocker:()=>dr,useFetcher:()=>Rn,useFetchers:()=>Dn,useFormAction:()=>xn,useHref:()=>Tt,useInRouterContext:()=>At,useLinkClickHandler:()=>bn,useLoaderData:()=>or,useLocation:()=>jt,useMatch:()=>Ut,useMatches:()=>ar,useNavigate:()=>Ft,useNavigation:()=>rr,useNavigationType:()=>Ot,useOutlet:()=>Nt,useOutletContext:()=>Bt,useParams:()=>zt,useResolvedPath:()=>Ht,useRevalidator:()=>nr,useRouteError:()=>sr,useRouteLoaderData:()=>ir,useRoutes:()=>Wt,useSearchParams:()=>gn,useSubmit:()=>En});var n,a=r(16072),o=r(32934),i=r.t(o,2);function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function s(e){if(Array.isArray(e))return e}function c(e,t,r,n,a,o,i){try{var u=e[o](i),s=u.value}catch(e){return void r(e)}u.done?t(s):Promise.resolve(s).then(n,a)}function l(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){c(o,n,a,i,u,"next",e)}function u(e){c(o,n,a,i,u,"throw",e)}i(void 0)}))}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t,r){return d=D()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var a=new(Function.bind.apply(e,n));return r&&g(a,r.prototype),a},d.apply(null,arguments)}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function v(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function m(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function y(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function b(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function g(e,t){return g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},g(e,t)}function w(e,t){return s(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,u=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){u=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(u)throw a}}return o}}(e,t)||x(e,t)||b()}function S(e){return function(e){if(Array.isArray(e))return u(e)}(e)||y(e)||x(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function x(e,t){if(e){if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function R(e){var t="function"==typeof Map?new Map:void 0;return R=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return d(e,arguments,p(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),g(n,e)},R(e)}function D(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(D=function(){return!!e})()}function k(e,t){var r,n,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=u(0),i.throw=u(1),i.return=u(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(s){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(o=0)),o;)try{if(r=1,n&&(a=2&u[0]?n.return:u[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,u[1])).done)return a;switch(n=0,a&&(u=[2&u[0],a.value]),u[0]){case 0:case 1:a=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,n=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==u[0]&&2!==u[0])){o=0;continue}if(3===u[0]&&(!a||u[1]>a[0]&&u[1]<a[3])){o.label=u[1];break}if(6===u[0]&&o.label<a[1]){o.label=a[1],a=u;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(u);break}a[2]&&o.ops.pop(),o.trys.pop();continue}u=t.call(e,o)}catch(e){u=[6,e],n=0}finally{r=a=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}}function P(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function C(){return C=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},C.apply(this,arguments)}!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(n||(n={}));var _,L="popstate";function T(e){void 0===e&&(e={});var t,r=e.initialEntries,a=void 0===r?["/"]:r,o=e.initialIndex,i=e.v5Compat,u=void 0!==i&&i;t=a.map((function(e,t){return h(e,"string"==typeof e?null:e.state,0===t?"default":void 0)}));var s=f(null==o?t.length-1:o),c=n.Pop,l=null;function f(e){return Math.min(Math.max(e,0),t.length-1)}function d(){return t[s]}function h(e,r,n){void 0===r&&(r=null);var a=F(t?d().pathname:"/",e,r,n);return U("/"===a.pathname.charAt(0),"relative pathnames are not supported in memory history: "+JSON.stringify(e)),a}function v(e){return"string"==typeof e?e:I(e)}return{get index(){return s},get action(){return c},get location(){return d()},createHref:v,createURL:function(e){return new URL(v(e),"http://localhost")},encodeLocation:function(e){var t="string"==typeof e?B(e):e;return{pathname:t.pathname||"",search:t.search||"",hash:t.hash||""}},push:function(e,r){c=n.Push;var a=h(e,r);s+=1,t.splice(s,t.length,a),u&&l&&l({action:c,location:a,delta:1})},replace:function(e,r){c=n.Replace;var a=h(e,r);t[s]=a,u&&l&&l({action:c,location:a,delta:0})},go:function(e){c=n.Pop;var r=f(s+e),a=t[r];s=r,l&&l({action:c,location:a,delta:e})},listen:function(e){return l=e,function(){l=null}}}}function A(e){return void 0===e&&(e={}),N((function(e,t){var r=e.location;return F("",{pathname:r.pathname,search:r.search,hash:r.hash},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){return"string"==typeof t?t:I(t)}),null,e)}function j(e){return void 0===e&&(e={}),N((function(e,t){var r=B(e.location.hash.substr(1)),n=r.pathname,a=void 0===n?"/":n,o=r.search,i=void 0===o?"":o,u=r.hash,s=void 0===u?"":u;return a.startsWith("/")||a.startsWith(".")||(a="/"+a),F("",{pathname:a,search:i,hash:s},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){var r=e.document.querySelector("base"),n="";if(r&&r.getAttribute("href")){var a=e.location.href,o=a.indexOf("#");n=-1===o?a:a.slice(0,o)}return n+"#"+("string"==typeof t?t:I(t))}),(function(e,t){U("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}function O(e,t){if(!1===e||null==e)throw new Error(t)}function U(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function M(e,t){return{usr:e.state,key:e.key,idx:t}}function F(e,t,r,n){return void 0===r&&(r=null),C({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?B(t):t,{state:r,key:t&&t.key||n||Math.random().toString(36).substr(2,8)})}function I(e){var t=e.pathname,r=void 0===t?"/":t,n=e.search,a=void 0===n?"":n,o=e.hash,i=void 0===o?"":o;return a&&"?"!==a&&(r+="?"===a.charAt(0)?a:"?"+a),i&&"#"!==i&&(r+="#"===i.charAt(0)?i:"#"+i),r}function B(e){var t={};if(e){var r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));var n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function N(e,t,r,a){void 0===a&&(a={});var o=a.window,i=void 0===o?document.defaultView:o,u=a.v5Compat,s=void 0!==u&&u,c=i.history,l=n.Pop,f=null,d=h();function h(){return(c.state||{idx:null}).idx}function v(){l=n.Pop;var e=h(),t=null==e?null:e-d;d=e,f&&f({action:l,location:y.location,delta:t})}function p(e){var t="null"!==i.location.origin?i.location.origin:i.location.href,r="string"==typeof e?e:I(e);return O(t,"No window.location.(origin|href) available to create URL for href: "+r),new URL(r,t)}null==d&&(d=0,c.replaceState(C({},c.state,{idx:d}),""));var y={get action(){return l},get location(){return e(i,c)},listen:function(e){if(f)throw new Error("A history only accepts one active listener");return i.addEventListener(L,v),f=e,function(){i.removeEventListener(L,v),f=null}},createHref:function(e){return t(i,e)},createURL:p,encodeLocation:function(e){var t=p(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){l=n.Push;var a=F(y.location,e,t);r&&r(a,e);var o=M(a,d=h()+1),u=y.createHref(a);try{c.pushState(o,"",u)}catch(e){if(m(e,DOMException)&&"DataCloneError"===e.name)throw e;i.location.assign(u)}s&&f&&f({action:l,location:y.location,delta:1})},replace:function(e,t){l=n.Replace;var a=F(y.location,e,t);r&&r(a,e);var o=M(a,d=h()),i=y.createHref(a);c.replaceState(o,"",i),s&&f&&f({action:l,location:y.location,delta:0})},go:function(e){return c.go(e)}};return y}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(_||(_={}));var z=new Set(["lazy","caseSensitive","path","id","index","children"]);function H(e,t,r,n){return void 0===r&&(r=[]),void 0===n&&(n={}),e.map((function(e,a){var o=S(r).concat([a]),i="string"==typeof e.id?e.id:o.join("-");if(O(!0!==e.index||!e.children,"Cannot specify children on an index route"),O(!n[i],'Found a route id collision on id "'+i+"\". Route id's must be globally unique within Data Router usages"),function(e){return!0===e.index}(e)){var u=C({},e,t(e),{id:i});return n[i]=u,u}var s=C({},e,t(e),{id:i,children:void 0});return n[i]=s,e.children&&(s.children=H(e.children,t,o,n)),s}))}function W(e,t,r){void 0===r&&(r="/");var n=oe(("string"==typeof t?B(t):t).pathname||"/",r);if(null==n)return null;var a=$(e);!function(e){e.sort((function(e,t){return e.score!==t.score?t.score-e.score:function(e,t){var r=e.length===t.length&&e.slice(0,-1).every((function(e,r){return e===t[r]}));return r?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((function(e){return e.childrenIndex})),t.routesMeta.map((function(e){return e.childrenIndex})))}))}(a);for(var o=null,i=0;null==o&&i<a.length;++i)o=te(a[i],ae(n));return o}function K(e,t){var r=e.route,n=e.pathname,a=e.params;return{id:r.id,pathname:n,params:a,data:t[r.id],handle:r.handle}}function $(e,t,r,n){void 0===t&&(t=[]),void 0===r&&(r=[]),void 0===n&&(n="");var a=function(e,a,o){var i={relativePath:void 0===o?e.path||"":o,caseSensitive:!0===e.caseSensitive,childrenIndex:a,route:e};i.relativePath.startsWith("/")&&(O(i.relativePath.startsWith(n),'Absolute route path "'+i.relativePath+'" nested under path "'+n+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),i.relativePath=i.relativePath.slice(n.length));var u=fe([n,i.relativePath]),s=r.concat(i);e.children&&e.children.length>0&&(O(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+u+'".'),$(e.children,t,s,u)),(null!=e.path||e.index)&&t.push({path:u,score:ee(u,e.index),routesMeta:s})};return e.forEach((function(e,t){var r;if(""!==e.path&&null!=(r=e.path)&&r.includes("?")){var n=!0,o=!1,i=void 0;try{for(var u,s=J(e.path)[Symbol.iterator]();!(n=(u=s.next()).done);n=!0){var c=u.value;a(e,t,c)}}catch(e){o=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(o)throw i}}}else a(e,t)})),t}function J(e){var t,r=e.split("/");if(0===r.length)return[];var n,a=s(n=r)||y(n)||x(n)||b(),o=a[0],i=a.slice(1),u=o.endsWith("?"),c=o.replace(/\?$/,"");if(0===i.length)return u?[c,""]:[c];var l,f=J(i.join("/")),d=[];return(t=d).push.apply(t,S(f.map((function(e){return""===e?c:[c,e].join("/")})))),u&&(l=d).push.apply(l,S(f)),d.map((function(t){return e.startsWith("/")&&""===t?"/":t}))}var q=/^:[\w-]+$/,V=3,Y=2,X=1,G=10,Q=-2,Z=function(e){return"*"===e};function ee(e,t){var r=e.split("/"),n=r.length;return r.some(Z)&&(n+=Q),t&&(n+=Y),r.filter((function(e){return!Z(e)})).reduce((function(e,t){return e+(q.test(t)?V:""===t?X:G)}),n)}function te(e,t){for(var r=e.routesMeta,n={},a="/",o=[],i=0;i<r.length;++i){var u=r[i],s=i===r.length-1,c="/"===a?t:t.slice(a.length)||"/",l=ne({path:u.relativePath,caseSensitive:u.caseSensitive,end:s},c);if(!l)return null;Object.assign(n,l.params);var f=u.route;o.push({params:n,pathname:fe([a,l.pathname]),pathnameBase:de(fe([a,l.pathnameBase])),route:f}),"/"!==l.pathnameBase&&(a=fe([a,l.pathnameBase]))}return o}function re(e,t){void 0===t&&(t={});var r=e;r.endsWith("*")&&"*"!==r&&!r.endsWith("/*")&&(U(!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(/\*$/,"/*"));var n=r.startsWith("/")?"/":"",a=function(e){return null==e?"":"string"==typeof e?e:String(e)};return n+r.split(/\/+/).map((function(e,r,n){if(r===n.length-1&&"*"===e)return a(t["*"]);var o=e.match(/^:([\w-]+)(\??)$/);if(o){var i=w(o,3),u=i[1],s=i[2],c=t[u];return O("?"===s||null!=c,'Missing ":'+u+'" param'),a(c)}return e.replace(/\?$/g,"")})).filter((function(e){return!!e})).join("/")}function ne(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});var r=w(function(e,t,r){void 0===t&&(t=!1),void 0===r&&(r=!0),U("*"===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(/\*$/,"/*")+'".');var n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(function(e,t,r){return n.push({paramName:t,isOptional:null!=r}),r?"/?([^\\/]+)?":"/([^\\/]+)"}));return e.endsWith("*")?(n.push({paramName:"*"}),a+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":""!==e&&"/"!==e&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}(e.path,e.caseSensitive,e.end),2),n=r[0],a=r[1],o=t.match(n);if(!o)return null;var i=o[0],u=i.replace(/(.)\/+$/,"$1"),s=o.slice(1);return{params:a.reduce((function(e,t,r){var n=t.paramName,a=t.isOptional;if("*"===n){var o=s[r]||"";u=i.slice(0,i.length-o.length).replace(/(.)\/+$/,"$1")}var c=s[r];return e[n]=a&&!c?void 0:function(e,t){try{return decodeURIComponent(e)}catch(r){return U(!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}}(c||"",n),e}),{}),pathname:i,pathnameBase:u,pattern:e}}function ae(e){try{return decodeURI(e)}catch(t){return U(!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 oe(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;var r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&"/"!==n?null:e.slice(r)||"/"}function ie(e,t){void 0===t&&(t="/");var r="string"==typeof e?B(e):e,n=r.pathname,a=r.search,o=void 0===a?"":a,i=r.hash,u=void 0===i?"":i,s=n?n.startsWith("/")?n:function(e,t){var r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((function(e){".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)})),r.length>1?r.join("/"):"/"}(n,t):t;return{pathname:s,search:he(o),hash:ve(u)}}function ue(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 se(e){return e.filter((function(e,t){return 0===t||e.route.path&&e.route.path.length>0}))}function ce(e,t){var r=se(e);return t?r.map((function(t,r){return r===e.length-1?t.pathname:t.pathnameBase})):r.map((function(e){return e.pathnameBase}))}function le(e,t,r,n){var a;void 0===n&&(n=!1),"string"==typeof e?a=B(e):(O(!(a=C({},e)).pathname||!a.pathname.includes("?"),ue("?","pathname","search",a)),O(!a.pathname||!a.pathname.includes("#"),ue("#","pathname","hash",a)),O(!a.search||!a.search.includes("#"),ue("#","search","hash",a)));var o,i=""===e||""===a.pathname,u=i?"/":a.pathname;if(null==u)o=r;else{var s=t.length-1;if(!n&&u.startsWith("..")){for(var c=u.split("/");".."===c[0];)c.shift(),s-=1;a.pathname=c.join("/")}o=s>=0?t[s]:"/"}var l=ie(a,o),f=u&&"/"!==u&&u.endsWith("/"),d=(i||"."===u)&&r.endsWith("/");return l.pathname.endsWith("/")||!f&&!d||(l.pathname+="/"),l}var fe=function(e){return e.join("/").replace(/\/\/+/g,"/")},de=function(e){return e.replace(/\/+$/,"").replace(/^\/*/,"/")},he=function(e){return e&&"?"!==e?e.startsWith("?")?e:"?"+e:""},ve=function(e){return e&&"#"!==e?e.startsWith("#")?e:"#"+e:""},pe=function(e,t){void 0===t&&(t={});var r="number"==typeof t?{status:t}:t,n=new Headers(r.headers);return n.has("Content-Type")||n.set("Content-Type","application/json; charset=utf-8"),new Response(JSON.stringify(e),C({},r,{headers:n}))},me=function(e){function t(){return f(this,t),e=this,n=arguments,r=p(r=t),a=e,!(o=D()?Reflect.construct(r,n||[],p(e).constructor):r.apply(e,n))||"object"!==E(o)&&"function"!=typeof o?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(a):o;var e,r,n,a,o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&g(e,t)}(t,e),t}(R(Error)),ye=function(){function e(t,r){var n,a=this;f(this,e),this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],O(t&&"object"===(void 0===t?"undefined":E(t))&&!Array.isArray(t),"defer() only accepts plain objects"),this.abortPromise=new Promise((function(e,t){return n=t})),this.controller=new AbortController;var o=function(){return n(new me("Deferred data aborted"))};this.unlistenAbortSignal=function(){return a.controller.signal.removeEventListener("abort",o)},this.controller.signal.addEventListener("abort",o),this.data=Object.entries(t).reduce((function(e,t){var r=w(t,2),n=r[0],o=r[1];return Object.assign(e,v({},n,a.trackPromise(n,o)))}),{}),this.done&&this.unlistenAbortSignal(),this.init=r}var t,r;return t=e,(r=[{key:"trackPromise",value:function(e,t){var r=this;if(!m(t,Promise))return t;this.deferredKeys.push(e),this.pendingKeysSet.add(e);var n=Promise.race([t,this.abortPromise]).then((function(t){return r.onSettle(n,e,void 0,t)}),(function(t){return r.onSettle(n,e,t)}));return n.catch((function(){})),Object.defineProperty(n,"_tracked",{get:function(){return!0}}),n}},{key:"onSettle",value:function(e,t,r,n){if(this.controller.signal.aborted&&m(r,me))return this.unlistenAbortSignal(),Object.defineProperty(e,"_error",{get:function(){return r}}),Promise.reject(r);if(this.pendingKeysSet.delete(t),this.done&&this.unlistenAbortSignal(),void 0===r&&void 0===n){var a=new Error('Deferred data for key "'+t+'" resolved/rejected with `undefined`, you must resolve/reject with a value or `null`.');return Object.defineProperty(e,"_error",{get:function(){return a}}),this.emit(!1,t),Promise.reject(a)}return void 0===n?(Object.defineProperty(e,"_error",{get:function(){return r}}),this.emit(!1,t),Promise.reject(r)):(Object.defineProperty(e,"_data",{get:function(){return n}}),this.emit(!1,t),n)}},{key:"emit",value:function(e,t){this.subscribers.forEach((function(r){return r(e,t)}))}},{key:"subscribe",value:function(e){var t=this;return this.subscribers.add(e),function(){return t.subscribers.delete(e)}}},{key:"cancel",value:function(){var e=this;this.controller.abort(),this.pendingKeysSet.forEach((function(t,r){return e.pendingKeysSet.delete(r)})),this.emit(!0)}},{key:"resolveData",value:function(e){return l((function(){var t,r,n;return k(this,(function(a){switch(a.label){case 0:return t=this,r=!1,this.done?[3,2]:(n=function(){return t.cancel()},e.addEventListener("abort",n),[4,new Promise((function(r){t.subscribe((function(a){e.removeEventListener("abort",n),(a||t.done)&&r(a)}))}))]);case 1:r=a.sent(),a.label=2;case 2:return[2,r]}}))})).call(this)}},{key:"done",get:function(){return 0===this.pendingKeysSet.size}},{key:"unwrappedData",get:function(){return O(null!==this.data&&this.done,"Can only unwrap data on initialized and settled deferreds"),Object.entries(this.data).reduce((function(e,t){var r=w(t,2),n=r[0],a=r[1];return Object.assign(e,v({},n,function(e){if(!function(e){return m(e,Promise)&&!0===e._tracked}(e))return e;if(e._error)throw e._error;return e._data}(a)))}),{})}},{key:"pendingKeys",get:function(){return Array.from(this.pendingKeysSet)}}])&&h(t.prototype,r),e}(),be=function(e,t){return void 0===t&&(t={}),new ye(e,"number"==typeof t?{status:t}:t)},ge=function(e,t){void 0===t&&(t=302);var r=t;"number"==typeof r?r={status:r}:void 0===r.status&&(r.status=302);var n=new Headers(r.headers);return n.set("Location",e),new Response(null,C({},r,{headers:n}))},we=function(e,t){var r=ge(e,t);return r.headers.set("X-Remix-Reload-Document","true"),r},Se=function e(t,r,n,a){f(this,e),void 0===a&&(a=!1),this.status=t,this.statusText=r||"",this.internal=a,m(n,Error)?(this.data=n.toString(),this.error=n):this.data=n};function Ee(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}var xe=["post","put","patch","delete"],Re=new Set(xe),De=["get"].concat(S(xe)),ke=new Set(De),Pe=new Set([301,302,303,307,308]),Ce=new Set([307,308]),_e={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Le={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Te={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Ae=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,je=function(e){return{hasErrorBoundary:Boolean(e.hasErrorBoundary)}},Oe="remix-router-transitions";function Ue(e){var t,r=e.window?e.window:"undefined"!=typeof window?window:void 0,a=void 0!==r&&void 0!==r.document&&void 0!==r.document.createElement,o=!a;if(O(e.routes.length>0,"You must provide a non-empty routes array to createRouter"),e.mapRouteProperties)t=e.mapRouteProperties;else if(e.detectErrorBoundary){var i=e.detectErrorBoundary;t=function(e){return{hasErrorBoundary:i(e)}}}else t=je;var u,s,c={},f=H(e.routes,t,void 0,c),d=e.basename||"/",h=C({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1},e.future),p=null,m=new Set,y=null,b=null,g=null,E=null!=e.hydrationData,x=W(f,e.history.location,d),R=null;if(null==x){var D=Xe(404,{pathname:e.history.location.pathname}),P=Ye(f);x=P.matches,R=v({},P.route.id,D)}var L,T=x.some((function(e){return e.route.lazy})),A=x.some((function(e){return e.route.loader}));if(T)s=!1;else if(A)if(h.v7_partialHydration){var j=e.hydrationData?e.hydrationData.loaderData:null,M=e.hydrationData?e.hydrationData.errors:null;s=x.every((function(e){return e.route.loader&&!0!==e.route.loader.hydrate&&(j&&void 0!==j[e.route.id]||M&&void 0!==M[e.route.id])}))}else s=null!=e.hydrationData;else s=!0;var I,B={historyAction:e.history.action,location:e.history.location,matches:x,initialized:s,navigation:_e,restoreScrollPosition:null==e.hydrationData&&null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||R,fetchers:new Map,blockers:new Map},N=n.Pop,z=!1,$=!1,J=new Map,q=null,V=!1,Y=!1,X=[],G=[],Q=new Map,Z=0,ee=-1,te=new Map,re=new Set,ne=new Map,ae=new Map,ie=new Set,ue=new Map,se=new Map,ce=!1;function le(e,t){void 0===t&&(t={}),B=C({},B,e);var r=[],n=[];h.v7_fetcherPersist&&B.fetchers.forEach((function(e,t){"idle"===e.state&&(ie.has(t)?n.push(t):r.push(t))})),S(m).forEach((function(e){return e(B,{deletedFetchers:n,unstable_viewTransitionOpts:t.viewTransitionOpts,unstable_flushSync:!0===t.flushSync})})),h.v7_fetcherPersist&&(r.forEach((function(e){return B.fetchers.delete(e)})),n.forEach((function(e){return Se(e)})))}function fe(t,r,a){var o,i,s,c=(void 0===a?{}:a).flushSync,l=null!=B.actionData&&null!=B.navigation.formMethod&&rt(B.navigation.formMethod)&&"loading"===B.navigation.state&&!0!==(null==(o=t.state)?void 0:o._isRedirect);s=r.actionData?Object.keys(r.actionData).length>0?r.actionData:null:l?B.actionData:null;var d=r.loaderData?qe(B.loaderData,r.loaderData,r.matches||[],r.errors):B.loaderData,h=B.blockers;h.size>0&&(h=new Map(h)).forEach((function(e,t){return h.set(t,Te)}));var v,p=!0===z||null!=B.navigation.formMethod&&rt(B.navigation.formMethod)&&!0!==(null==(i=t.state)?void 0:i._isRedirect);if(u&&(f=u,u=void 0),V||N===n.Pop||(N===n.Push?e.history.push(t,t.state):N===n.Replace&&e.history.replace(t,t.state)),N===n.Pop){var m=J.get(B.location.pathname);m&&m.has(t.pathname)?v={currentLocation:B.location,nextLocation:t}:J.has(t.pathname)&&(v={currentLocation:t,nextLocation:B.location})}else if($){var y=J.get(B.location.pathname);y?y.add(t.pathname):(y=new Set([t.pathname]),J.set(B.location.pathname,y)),v={currentLocation:B.location,nextLocation:t}}le(C({},r,{actionData:s,loaderData:d,historyAction:N,location:t,initialized:!0,navigation:_e,revalidation:"idle",restoreScrollPosition:ze(t,r.matches||B.matches),preventScrollReset:p,blockers:h}),{viewTransitionOpts:v,flushSync:!0===c}),N=n.Pop,z=!1,$=!1,V=!1,Y=!1,X=[],G=[]}function de(t,r,n){return l((function(){var a,o,i,s,c,l,h,p,m,b,w,S,E,x,R,D;return k(this,(function(k){switch(k.label){case 0:return I&&I.abort(),I=null,N=t,V=!0===(n&&n.startUninterruptedRevalidation),function(e,t){if(y&&g){var r=Ne(e,t);y[r]=g()}}(B.location,B.matches),z=!0===(n&&n.preventScrollReset),$=!0===(n&&n.enableViewTransition),a=u||f,o=n&&n.overrideNavigation,i=W(a,r,d),s=!0===(n&&n.flushSync),i?!B.initialized||Y||(P=B.location,_=r,P.pathname!==_.pathname||P.search!==_.search||(""===P.hash||P.hash!==_.hash)&&""===_.hash)||n&&n.submission&&rt(n.submission.formMethod)?(I=new AbortController,m=We(e.history,r,I.signal,n&&n.submission),n&&n.pendingError?(w=v({},Ve(i).route.id,n.pendingError),[3,3]):[3,1]):(fe(r,{matches:i},{flushSync:s}),[2]):(c=Xe(404,{pathname:r.pathname}),l=Ye(a),h=l.matches,p=l.route,Be(),fe(r,{matches:h,loaderData:{},errors:v({},p.id,c)},{flushSync:s}),[2]);case 1:return n&&n.submission&&rt(n.submission.formMethod)?[4,he(m,r,n.submission,i,{replace:n.replace,flushSync:s})]:[3,3];case 2:if((S=k.sent()).shortCircuited)return[2];b=S.pendingActionData,w=S.pendingActionError,o=st(r,n.submission),s=!1,m=new Request(m.url,{signal:m.signal}),k.label=3;case 3:return[4,ve(m,r,i,o,n&&n.submission,n&&n.fetcherSubmission,n&&n.replace,n&&!0===n.initialHydration,s,b,w)];case 4:return E=k.sent(),x=E.shortCircuited,R=E.loaderData,D=E.errors,x||(I=null,fe(r,C({matches:i},b?{actionData:b}:{},{loaderData:R,errors:D}))),[2]}var P,_}))}))()}function he(e,r,a,o,i){return l((function(){var u,s,l,f,p;return k(this,(function(m){switch(m.label){case 0:return void 0===i&&(i={}),ye(),u=function(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}}(r,a),le({navigation:u},{flushSync:!0===i.flushSync}),(l=it(o,r)).route.action||l.route.lazy?[3,1]:(s={type:_.error,error:Xe(405,{method:e.method,pathname:r.pathname,routeId:l.route.id})},[3,3]);case 1:return[4,He("action",e,l,o,c,t,d,h.v7_relativeSplatPath)];case 2:if(s=m.sent(),e.signal.aborted)return[2,{shortCircuited:!0}];m.label=3;case 3:return tt(s)?(f=i&&null!=i.replace?i.replace:s.location===B.location.pathname+B.location.search,[4,pe(B,s,{submission:a,replace:f})]):[3,5];case 4:return m.sent(),[2,{shortCircuited:!0}];case 5:if(et(s))return p=Ve(o,l.route.id),!0!==(i&&i.replace)&&(N=n.Push),[2,{pendingActionData:{},pendingActionError:v({},p.route.id,s.error)}];if(Ze(s))throw Xe(400,{type:"defer-action"});return[2,{pendingActionData:v({},l.route.id,s.data)}]}}))}))()}function ve(t,r,n,a,o,i,s,c,v,p,m){return l((function(){var l,y,b,g,S,E,x,R,D,P,_,L,T,A,j,O,U,M,F,N,z;return k(this,(function(k){switch(k.label){case 0:return l=a||st(r,o),y=o||i||ut(l),b=u||f,g=w(Ie(e.history,B,n,y,r,h.v7_partialHydration&&!0===c,Y,X,G,ie,ne,re,b,d,p,m),2),S=g[0],E=g[1],Be((function(e){return!(n&&n.some((function(t){return t.route.id===e})))||S&&S.some((function(t){return t.route.id===e}))})),ee=++Z,0===S.length&&0===E.length?(x=Re(),fe(r,C({matches:n,loaderData:{},errors:m||null},p?{actionData:p}:{},x?{fetchers:new Map(B.fetchers)}:{}),{flushSync:v}),[2,{shortCircuited:!0}]):(V||h.v7_partialHydration&&c||(E.forEach((function(e){var t=B.fetchers.get(e.key),r=ct(void 0,t?t.data:void 0);B.fetchers.set(e.key,r)})),R=p||B.actionData,le(C({navigation:l},R?0===Object.keys(R).length?{actionData:null}:{actionData:R}:{},E.length>0?{fetchers:new Map(B.fetchers)}:{}),{flushSync:v})),E.forEach((function(e){Q.has(e.key)&&Ee(e.key),e.controller&&Q.set(e.key,e.controller)})),D=function(){return E.forEach((function(e){return Ee(e.key)}))},I&&I.signal.addEventListener("abort",D),[4,me(B.matches,n,S,E,t)]);case 1:return P=k.sent(),_=P.results,L=P.loaderResults,T=P.fetcherResults,t.signal.aborted?[2,{shortCircuited:!0}]:(I&&I.signal.removeEventListener("abort",D),E.forEach((function(e){return Q.delete(e.key)})),(A=Ge(_))?(A.idx>=S.length&&(j=E[A.idx-S.length].key,re.add(j)),[4,pe(B,A.result,{replace:s})]):[3,3]);case 2:return k.sent(),[2,{shortCircuited:!0}];case 3:return O=Je(B,n,S,L,m,E,T,ue),U=O.loaderData,M=O.errors,ue.forEach((function(e,t){e.subscribe((function(r){(r||e.done)&&ue.delete(t)}))})),F=Re(),N=De(ee),z=F||N||E.length>0,[2,C({loaderData:U,errors:M},z?{fetchers:new Map(B.fetchers)}:{})]}}))}))()}function pe(t,o,i){return l((function(){var u,s,c,l,f,h,v,p,m,y,b,g,w,S;return k(this,(function(E){switch(E.label){case 0:return s=(u=void 0===i?{}:i).submission,c=u.fetcherSubmission,l=u.replace,o.revalidate&&(Y=!0),O(f=F(t.location,o.location,{_isRedirect:!0}),"Expected a location on the redirect navigation"),a&&(h=!1,o.reloadDocument?h=!0:Ae.test(o.location)&&(v=e.history.createURL(o.location),h=v.origin!==r.location.origin||null==oe(v.pathname,d)),h)?(l?r.location.replace(o.location):r.location.assign(o.location),[2]):(I=null,p=!0===l?n.Replace:n.Push,m=t.navigation,y=m.formMethod,b=m.formAction,g=m.formEncType,!s&&!c&&y&&b&&g&&(s=ut(t.navigation)),w=s||c,Ce.has(o.status)&&w&&rt(w.formMethod)?[4,de(p,f,{submission:C({},w,{formAction:o.location}),preventScrollReset:z})]:[3,2]);case 1:return E.sent(),[3,4];case 2:return S=st(f,s),[4,de(p,f,{overrideNavigation:S,fetcherSubmission:c,preventScrollReset:z})];case 3:E.sent(),E.label=4;case 4:return[2]}}))}))()}function me(r,n,a,o,i){return l((function(){var u,s,l;return k(this,(function(f){switch(f.label){case 0:return[4,Promise.all(S(a.map((function(e){return He("loader",i,e,n,c,t,d,h.v7_relativeSplatPath)}))).concat(S(o.map((function(r){return r.matches&&r.match&&r.controller?He("loader",We(e.history,r.path,r.controller.signal),r.match,r.matches,c,t,d,h.v7_relativeSplatPath):{type:_.error,error:Xe(404,{pathname:r.path})}})))))];case 1:return u=f.sent(),s=u.slice(0,a.length),l=u.slice(a.length),[4,Promise.all([nt(r,a,s,s.map((function(){return i.signal})),!1,B.loaderData),nt(r,o.map((function(e){return e.match})),l,o.map((function(e){return e.controller?e.controller.signal:null})),!0)])];case 2:return f.sent(),[2,{results:u,loaderResults:s,fetcherResults:l}]}}))}))()}function ye(){var e;Y=!0,(e=X).push.apply(e,S(Be())),ne.forEach((function(e,t){Q.has(t)&&(G.push(t),Ee(t))}))}function be(e,t,r){void 0===r&&(r={}),B.fetchers.set(e,t),le({fetchers:new Map(B.fetchers)},{flushSync:!0===(r&&r.flushSync)})}function ge(e,t,r,n){void 0===n&&(n={});var a=Ve(B.matches,t);Se(e),le({errors:v({},a.route.id,r),fetchers:new Map(B.fetchers)},{flushSync:!0===(n&&n.flushSync)})}function we(e){return h.v7_fetcherPersist&&(ae.set(e,(ae.get(e)||0)+1),ie.has(e)&&ie.delete(e)),B.fetchers.get(e)||Le}function Se(e){var t=B.fetchers.get(e);!Q.has(e)||t&&"loading"===t.state&&te.has(e)||Ee(e),ne.delete(e),te.delete(e),re.delete(e),ie.delete(e),B.fetchers.delete(e)}function Ee(e){var t=Q.get(e);O(t,"Expected fetch controller: "+e),t.abort(),Q.delete(e)}function xe(e){var t=!0,r=!1,n=void 0;try{for(var a,o=e[Symbol.iterator]();!(t=(a=o.next()).done);t=!0){var i=a.value,u=lt(we(i).data);B.fetchers.set(i,u)}}catch(e){r=!0,n=e}finally{try{t||null==o.return||o.return()}finally{if(r)throw n}}}function Re(){var e=[],t=!1,r=!0,n=!1,a=void 0;try{for(var o,i=re[Symbol.iterator]();!(r=(o=i.next()).done);r=!0){var u=o.value,s=B.fetchers.get(u);O(s,"Expected fetcher: "+u),"loading"===s.state&&(re.delete(u),e.push(u),t=!0)}}catch(e){n=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(n)throw a}}return xe(e),t}function De(e){var t=[],r=!0,n=!1,a=void 0;try{for(var o,i=te[Symbol.iterator]();!(r=(o=i.next()).done);r=!0){var u=w(o.value,2),s=u[0];if(u[1]<e){var c=B.fetchers.get(s);O(c,"Expected fetcher: "+s),"loading"===c.state&&(Ee(s),te.delete(s),t.push(s))}}}catch(e){n=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(n)throw a}}return xe(t),t.length>0}function ke(e){B.blockers.delete(e),se.delete(e)}function Pe(e,t){var r=B.blockers.get(e)||Te;O("unblocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"proceeding"===t.state||"blocked"===r.state&&"unblocked"===t.state||"proceeding"===r.state&&"unblocked"===t.state,"Invalid blocker state transition: "+r.state+" -> "+t.state);var n=new Map(B.blockers);n.set(e,t),le({blockers:n})}function Ue(e){var t=e.currentLocation,r=e.nextLocation,n=e.historyAction;if(0!==se.size){se.size>1&&U(!1,"A router only supports one blocker at a time");var a=Array.from(se.entries()),o=w(a[a.length-1],2),i=o[0],u=o[1],s=B.blockers.get(i);if(!s||"proceeding"!==s.state)return u({currentLocation:t,nextLocation:r,historyAction:n})?i:void 0}}function Be(e){var t=[];return ue.forEach((function(r,n){e&&!e(n)||(r.cancel(),t.push(n),ue.delete(n))})),t}function Ne(e,t){return b&&b(e,t.map((function(e){return K(e,B.loaderData)})))||e.key}function ze(e,t){if(y){var r=Ne(e,t),n=y[r];if("number"==typeof n)return n}return null}return L={get basename(){return d},get future(){return h},get state(){return B},get routes(){return f},get window(){return r},initialize:function(){if(p=e.history.listen((function(t){var r=t.action,n=t.location,a=t.delta;if(!ce){U(0===se.size||null!=a,"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.");var o=Ue({currentLocation:B.location,nextLocation:n,historyAction:r});return o&&null!=a?(ce=!0,e.history.go(-1*a),void Pe(o,{state:"blocked",location:n,proceed:function(){Pe(o,{state:"proceeding",proceed:void 0,reset:void 0,location:n}),e.history.go(a)},reset:function(){var e=new Map(B.blockers);e.set(o,Te),le({blockers:e})}})):de(r,n)}ce=!1})),a){!function(e,t){try{var r=e.sessionStorage.getItem(Oe);if(r){var n=JSON.parse(r),a=!0,o=!1,i=void 0;try{for(var u,s=Object.entries(n||{})[Symbol.iterator]();!(a=(u=s.next()).done);a=!0){var c=w(u.value,2),l=c[0],f=c[1];f&&Array.isArray(f)&&t.set(l,new Set(f||[]))}}catch(e){o=!0,i=e}finally{try{a||null==s.return||s.return()}finally{if(o)throw i}}}}catch(e){}}(r,J);var t=function(){return function(e,t){if(t.size>0){var r={},n=!0,a=!1,o=void 0;try{for(var i,u=t[Symbol.iterator]();!(n=(i=u.next()).done);n=!0){var s=w(i.value,2),c=s[0],l=s[1];r[c]=S(l)}}catch(e){a=!0,o=e}finally{try{n||null==u.return||u.return()}finally{if(a)throw o}}try{e.sessionStorage.setItem(Oe,JSON.stringify(r))}catch(e){U(!1,"Failed to save applied view transitions in sessionStorage ("+e+").")}}}(r,J)};r.addEventListener("pagehide",t),q=function(){return r.removeEventListener("pagehide",t)}}return B.initialized||de(n.Pop,B.location,{initialHydration:!0}),L},subscribe:function(e){return m.add(e),function(){return m.delete(e)}},enableScrollRestoration:function(e,t,r){if(y=e,g=t,b=r||null,!E&&B.navigation===_e){E=!0;var n=ze(B.location,B.matches);null!=n&&le({restoreScrollPosition:n})}return function(){y=null,g=null,b=null}},navigate:function t(r,a){return l((function(){var o,i,u,s,c,l,f,v,p,m,y,b;return k(this,(function(g){switch(g.label){case 0:return"number"==typeof r?(e.history.go(r),[2]):(o=Me(B.location,B.matches,d,h.v7_prependBasename,r,h.v7_relativeSplatPath,null==a?void 0:a.fromRouteId,null==a?void 0:a.relative),i=Fe(h.v7_normalizeFormMethod,!1,o,a),u=i.path,s=i.submission,c=i.error,l=B.location,f=C({},f=F(B.location,u,a&&a.state),e.history.encodeLocation(f)),v=a&&null!=a.replace?a.replace:void 0,p=n.Push,!0===v?p=n.Replace:!1===v||null!=s&&rt(s.formMethod)&&s.formAction===B.location.pathname+B.location.search&&(p=n.Replace),m=a&&"preventScrollReset"in a?!0===a.preventScrollReset:void 0,y=!0===(a&&a.unstable_flushSync),(b=Ue({currentLocation:l,nextLocation:f,historyAction:p}))?(Pe(b,{state:"blocked",location:f,proceed:function(){Pe(b,{state:"proceeding",proceed:void 0,reset:void 0,location:f}),t(r,a)},reset:function(){var e=new Map(B.blockers);e.set(b,Te),le({blockers:e})}}),[2]):[4,de(p,f,{submission:s,pendingError:c,preventScrollReset:m,replace:a&&a.replace,enableViewTransition:a&&a.unstable_viewTransition,flushSync:y})]);case 1:return[2,g.sent()]}}))}))()},fetch:function(r,n,a,i){if(o)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.");Q.has(r)&&Ee(r);var s=!0===(i&&i.unstable_flushSync),p=u||f,m=Me(B.location,B.matches,d,h.v7_prependBasename,a,h.v7_relativeSplatPath,n,null==i?void 0:i.relative),y=W(p,m,d);if(y){var b=Fe(h.v7_normalizeFormMethod,!0,m,i),g=b.path,S=b.submission,E=b.error;if(E)ge(r,n,E,{flushSync:s});else{var x=it(y,g);z=!0===(i&&i.preventScrollReset),S&&rt(S.formMethod)?function(r,n,a,o,i,s,p){l((function(){var l,m,y,b,g,S,E,x,R,D,P,C,_,L,T,A,j,U,M,F,z,H,K,$,J,q;return k(this,(function(k){switch(k.label){case 0:return ye(),ne.delete(r),o.route.action||o.route.lazy?(m=B.fetchers.get(r),be(r,function(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}}(p,m),{flushSync:s}),y=new AbortController,b=We(e.history,a,y.signal,p),Q.set(r,y),g=Z,[4,He("action",b,o,i,c,t,d,h.v7_relativeSplatPath)]):(l=Xe(405,{method:p.formMethod,pathname:a,routeId:n}),ge(r,n,l,{flushSync:s}),[2]);case 1:if(S=k.sent(),b.signal.aborted)return Q.get(r)===y&&Q.delete(r),[2];if(h.v7_fetcherPersist&&ie.has(r)){if(tt(S)||et(S))return be(r,lt(void 0)),[2]}else{if(tt(S))return Q.delete(r),ee>g?(be(r,lt(void 0)),[2]):(re.add(r),be(r,ct(p)),[2,pe(B,S,{fetcherSubmission:p})]);if(et(S))return ge(r,n,S.error),[2]}if(Ze(S))throw Xe(400,{type:"defer-action"});return E=B.navigation.location||B.location,x=We(e.history,E,y.signal),R=u||f,O(D="idle"!==B.navigation.state?W(R,B.navigation.location,d):B.matches,"Didn't find any matches after fetcher action"),P=++Z,te.set(r,P),C=ct(p,S.data),B.fetchers.set(r,C),_=w(Ie(e.history,B,D,p,E,!1,Y,X,G,ie,ne,re,R,d,v({},o.route.id,S.data),void 0),2),L=_[0],(T=_[1]).filter((function(e){return e.key!==r})).forEach((function(e){var t=e.key,r=B.fetchers.get(t),n=ct(void 0,r?r.data:void 0);B.fetchers.set(t,n),Q.has(t)&&Ee(t),e.controller&&Q.set(t,e.controller)})),le({fetchers:new Map(B.fetchers)}),A=function(){return T.forEach((function(e){return Ee(e.key)}))},y.signal.addEventListener("abort",A),[4,me(B.matches,D,L,T,x)];case 2:return j=k.sent(),U=j.results,M=j.loaderResults,F=j.fetcherResults,y.signal.aborted?[2]:(y.signal.removeEventListener("abort",A),te.delete(r),Q.delete(r),T.forEach((function(e){return Q.delete(e.key)})),(z=Ge(U))?(z.idx>=L.length&&(H=T[z.idx-L.length].key,re.add(H)),[2,pe(B,z.result)]):(K=Je(B,B.matches,L,M,void 0,T,F,ue),$=K.loaderData,J=K.errors,B.fetchers.has(r)&&(q=lt(S.data),B.fetchers.set(r,q)),De(P),"loading"===B.navigation.state&&P>ee?(O(N,"Expected pending action"),I&&I.abort(),fe(B.navigation.location,{matches:D,loaderData:$,errors:J,fetchers:new Map(B.fetchers)})):(le({errors:J,loaderData:qe(B.loaderData,$,D,J),fetchers:new Map(B.fetchers)}),Y=!1),[2]))}}))}))()}(r,n,g,x,y,s,S):(ne.set(r,{routeId:n,path:g}),function(r,n,a,o,i,u,s){l((function(){var l,f,v,p,m;return k(this,(function(y){switch(y.label){case 0:return l=B.fetchers.get(r),be(r,ct(s,l?l.data:void 0),{flushSync:u}),f=new AbortController,v=We(e.history,a,f.signal),Q.set(r,f),p=Z,[4,He("loader",v,o,i,c,t,d,h.v7_relativeSplatPath)];case 1:return Ze(m=y.sent())?[4,at(m,v.signal,!0)]:[3,3];case 2:m=y.sent()||m,y.label=3;case 3:return Q.get(r)===f&&Q.delete(r),v.signal.aborted?[2]:ie.has(r)?(be(r,lt(void 0)),[2]):tt(m)?ee>p?(be(r,lt(void 0)),[2]):[3,4]:[3,6];case 4:return re.add(r),[4,pe(B,m)];case 5:return y.sent(),[2];case 6:return et(m)?(ge(r,n,m.error),[2]):(O(!Ze(m),"Unhandled fetcher deferred data"),be(r,lt(m.data)),[2])}}))}))()}(r,n,g,x,y,s,S))}}else ge(r,n,Xe(404,{pathname:m}),{flushSync:s})},revalidate:function(){ye(),le({revalidation:"loading"}),"submitting"!==B.navigation.state&&("idle"!==B.navigation.state?de(N||B.historyAction,B.navigation.location,{overrideNavigation:B.navigation}):de(B.historyAction,B.location,{startUninterruptedRevalidation:!0}))},createHref:function(t){return e.history.createHref(t)},encodeLocation:function(t){return e.history.encodeLocation(t)},getFetcher:we,deleteFetcher:function(e){if(h.v7_fetcherPersist){var t=(ae.get(e)||0)-1;t<=0?(ae.delete(e),ie.add(e)):ae.set(e,t)}else Se(e);le({fetchers:new Map(B.fetchers)})},dispose:function(){p&&p(),q&&q(),m.clear(),I&&I.abort(),B.fetchers.forEach((function(e,t){return Se(t)})),B.blockers.forEach((function(e,t){return ke(t)}))},getBlocker:function(e,t){var r=B.blockers.get(e)||Te;return se.get(e)!==t&&se.set(e,t),r},deleteBlocker:ke,_internalFetchControllers:Q,_internalActiveDeferreds:ue,_internalSetRoutes:function(e){u=H(e,t,void 0,c={})}},L}function Me(e,t,r,n,a,o,i,u){var s,c;if(i){s=[];var l=!0,f=!1,d=void 0;try{for(var h,v=t[Symbol.iterator]();!(l=(h=v.next()).done);l=!0){var p=h.value;if(s.push(p),p.route.id===i){c=p;break}}}catch(e){f=!0,d=e}finally{try{l||null==v.return||v.return()}finally{if(f)throw d}}}else s=t,c=t[t.length-1];var m=le(a||".",ce(s,o),oe(e.pathname,r)||e.pathname,"path"===u);return null==a&&(m.search=e.search,m.hash=e.hash),null!=a&&""!==a&&"."!==a||!c||!c.route.index||ot(m.search)||(m.search=m.search?m.search.replace(/^\?/,"?index&"):"?index"),n&&"/"!==r&&(m.pathname="/"===m.pathname?r:fe([r,m.pathname])),I(m)}function Fe(e,t,r,n){if(!n||!function(e){return null!=e&&("formData"in e&&null!=e.formData||"body"in e&&void 0!==e.body)}(n))return{path:r};if(n.formMethod&&(a=n.formMethod,!ke.has(a.toLowerCase())))return{path:r,error:Xe(405,{method:n.formMethod})};var a,o,i,u=function(){return{path:r,error:Xe(400,{type:"invalid-body"})}},s=n.formMethod||"get",c=e?s.toUpperCase():s.toLowerCase(),l=Qe(r);if(void 0!==n.body){if("text/plain"===n.formEncType){if(!rt(c))return u();var f="string"==typeof n.body?n.body:m(n.body,FormData)||m(n.body,URLSearchParams)?Array.from(n.body.entries()).reduce((function(e,t){var r=w(t,2);return""+e+r[0]+"="+r[1]+"\n"}),""):String(n.body);return{path:r,submission:{formMethod:c,formAction:l,formEncType:n.formEncType,formData:void 0,json:void 0,text:f}}}if("application/json"===n.formEncType){if(!rt(c))return u();try{var d="string"==typeof n.body?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:c,formAction:l,formEncType:n.formEncType,formData:void 0,json:d,text:void 0}}}catch(e){return u()}}}if(O("function"==typeof FormData,"FormData is not available in this environment"),n.formData)o=Ke(n.formData),i=n.formData;else if(m(n.body,FormData))o=Ke(n.body),i=n.body;else if(m(n.body,URLSearchParams))i=$e(o=n.body);else if(null==n.body)o=new URLSearchParams,i=new FormData;else try{i=$e(o=new URLSearchParams(n.body))}catch(e){return u()}var h={formMethod:c,formAction:l,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:i,json:void 0,text:void 0};if(rt(h.formMethod))return{path:r,submission:h};var v=B(r);return t&&v.search&&ot(v.search)&&o.append("index",""),v.search="?"+o,{path:I(v),submission:h}}function Ie(e,t,r,n,a,o,i,u,s,c,l,f,d,h,v,p){var m=p?Object.values(p)[0]:v?Object.values(v)[0]:void 0,y=e.createURL(t.location),b=e.createURL(a),g=p?Object.keys(p)[0]:void 0,w=function(e,t){var r=e;if(t){var n=e.findIndex((function(e){return e.route.id===t}));n>=0&&(r=e.slice(0,n))}return r}(r,g).filter((function(e,r){var a=e.route;if(a.lazy)return!0;if(null==a.loader)return!1;if(o)return!!a.loader.hydrate||void 0===t.loaderData[a.id]&&(!t.errors||void 0===t.errors[a.id]);if(function(e,t,r){var n=!t||r.route.id!==t.route.id,a=void 0===e[r.route.id];return n||a}(t.loaderData,t.matches[r],e)||u.some((function(t){return t===e.route.id})))return!0;var s=t.matches[r],c=e;return Ne(e,C({currentUrl:y,currentParams:s.params,nextUrl:b,nextParams:c.params},n,{actionResult:m,defaultShouldRevalidate:i||y.pathname+y.search===b.pathname+b.search||y.search!==b.search||Be(s,c)}))})),S=[];return l.forEach((function(e,a){if(!o&&r.some((function(t){return t.route.id===e.routeId}))&&!c.has(a)){var u=W(d,e.path,h);if(u){var l=t.fetchers.get(a),v=it(u,e.path);!f.has(a)&&(s.includes(a)||(l&&"idle"!==l.state&&void 0===l.data?i:Ne(v,C({currentUrl:y,currentParams:t.matches[t.matches.length-1].params,nextUrl:b,nextParams:r[r.length-1].params},n,{actionResult:m,defaultShouldRevalidate:i}))))&&S.push({key:a,routeId:e.routeId,path:e.path,matches:u,match:v,controller:new AbortController})}else S.push({key:a,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null})}})),[w,S]}function Be(e,t){var r=e.route.path;return e.pathname!==t.pathname||null!=r&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function Ne(e,t){if(e.route.shouldRevalidate){var r=e.route.shouldRevalidate(t);if("boolean"==typeof r)return r}return t.defaultShouldRevalidate}function ze(e,t,r){return l((function(){var n,a,o,i,u;return k(this,(function(s){switch(s.label){case 0:return e.lazy?[4,e.lazy()]:[2];case 1:if(n=s.sent(),!e.lazy)return[2];for(var c in O(a=r[e.id],"No route found in manifest"),o={},n)i=a[c],U(!(u=void 0!==i&&"hasErrorBoundary"!==c),'Route "'+a.id+'" has a static property "'+c+'" defined but its lazy function is also returning a value for this property. The lazy route property "'+c+'" will be ignored.'),u||z.has(c)||(o[c]=n[c]);return Object.assign(a,o),Object.assign(a,C({},t(a),{lazy:void 0})),[2]}}))}))()}function He(e,t,r,n,a,o,i,u,s){return l((function(){var c,l,f,d,h,v,p,m,y,b,g,w,S,x,R,D,P,C,L,T,A;return k(this,(function(k){switch(k.label){case 0:void 0===s&&(s={}),d=function(e){var n,a=new Promise((function(e,t){return n=t}));return f=function(){return n()},t.signal.addEventListener("abort",f),Promise.race([e({request:t,params:r.params,context:s.requestContext}),a])},k.label=1;case 1:return k.trys.push([1,12,13,14]),h=r.route[e],r.route.lazy?h?[4,Promise.all([d(h).catch((function(e){v=e})),ze(r.route,o,a)])]:[3,3]:[3,8];case 2:if(p=k.sent(),v)throw v;return l=p[0],[3,7];case 3:return[4,ze(r.route,o,a)];case 4:return k.sent(),(h=r.route[e])?[4,d(h)]:[3,6];case 5:return l=k.sent(),[3,7];case 6:if("action"===e)throw m=new URL(t.url),y=m.pathname+m.search,Xe(405,{method:t.method,pathname:y,routeId:r.route.id});return[2,{type:_.data,data:void 0}];case 7:return[3,11];case 8:if(h)return[3,9];throw Xe(404,{pathname:(b=new URL(t.url)).pathname+b.search});case 9:return[4,d(h)];case 10:l=k.sent(),k.label=11;case 11:return O(void 0!==l,"You defined "+("action"===e?"an action":"a loader")+' for route "'+r.route.id+"\" but didn't return anything from your `"+e+"` function. Please return a value or `null`."),[3,14];case 12:return g=k.sent(),c=_.error,l=g,[3,14];case 13:return f&&t.signal.removeEventListener("abort",f),[7];case 14:if(null==(j=l)||"number"!=typeof j.status||"string"!=typeof j.statusText||"object"!==E(j.headers)||void 0===j.body)return[3,24];if(w=l.status,Pe.has(w)){if(O(S=l.headers.get("Location"),"Redirects returned/thrown from loaders/actions must have a Location header"),Ae.test(S)?s.isStaticRequest||(x=new URL(t.url),R=S.startsWith("//")?new URL(x.protocol+S):new URL(S),D=null!=oe(R.pathname,i),R.origin===x.origin&&D&&(S=R.pathname+R.search+R.hash)):S=Me(new URL(t.url),n.slice(0,n.indexOf(r)+1),i,!0,S,u),s.isStaticRequest)throw l.headers.set("Location",S),l;return[2,{type:_.redirect,status:w,location:S,revalidate:null!==l.headers.get("X-Remix-Revalidate"),reloadDocument:null!==l.headers.get("X-Remix-Reload-Document")}]}if(s.isRouteRequest)throw{type:c===_.error?_.error:_.data,response:l};k.label=15;case 15:return k.trys.push([15,22,,23]),(C=l.headers.get("Content-Type"))&&/\bapplication\/json\b/.test(C)?null!=l.body?[3,16]:(P=null,[3,18]):[3,19];case 16:return[4,l.json()];case 17:P=k.sent(),k.label=18;case 18:return[3,21];case 19:return[4,l.text()];case 20:P=k.sent(),k.label=21;case 21:return[3,23];case 22:return L=k.sent(),[2,{type:_.error,error:L}];case 23:return c===_.error?[2,{type:c,error:new Se(w,l.statusText,P),headers:l.headers}]:[2,{type:_.data,data:P,statusCode:l.status,headers:l.headers}];case 24:return c===_.error?[2,{type:c,error:l}]:(U=l)&&"object"===(void 0===U?"undefined":E(U))&&"object"===E(U.data)&&"function"==typeof U.subscribe&&"function"==typeof U.cancel&&"function"==typeof U.resolveData?[2,{type:_.deferred,deferredData:l,statusCode:null==(T=l.init)?void 0:T.status,headers:(null==(A=l.init)?void 0:A.headers)&&new Headers(l.init.headers)}]:[2,{type:_.data,data:l}]}var j,U}))}))()}function We(e,t,r,n){var a=e.createURL(Qe(t)).toString(),o={signal:r};if(n&&rt(n.formMethod)){var i=n.formMethod,u=n.formEncType;o.method=i.toUpperCase(),"application/json"===u?(o.headers=new Headers({"Content-Type":u}),o.body=JSON.stringify(n.json)):"text/plain"===u?o.body=n.text:"application/x-www-form-urlencoded"===u&&n.formData?o.body=Ke(n.formData):o.body=n.formData}return new Request(a,o)}function Ke(e){var t=new URLSearchParams,r=!0,n=!1,a=void 0;try{for(var o,i=e.entries()[Symbol.iterator]();!(r=(o=i.next()).done);r=!0){var u=w(o.value,2),s=u[0],c=u[1];t.append(s,"string"==typeof c?c:c.name)}}catch(e){n=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(n)throw a}}return t}function $e(e){var t=new FormData,r=!0,n=!1,a=void 0;try{for(var o,i=e.entries()[Symbol.iterator]();!(r=(o=i.next()).done);r=!0){var u=w(o.value,2),s=u[0],c=u[1];t.append(s,c)}}catch(e){n=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(n)throw a}}return t}function Je(e,t,r,n,a,o,i,u){for(var s=function(e,t,r,n,a){var o,i={},u=null,s=!1,c={};return r.forEach((function(r,l){var f=t[l].route.id;if(O(!tt(r),"Cannot handle redirect results in processLoaderData"),et(r)){var d=Ve(e,f),h=r.error;n&&(h=Object.values(n)[0],n=void 0),null==(u=u||{})[d.route.id]&&(u[d.route.id]=h),i[f]=void 0,s||(s=!0,o=Ee(r.error)?r.error.status:500),r.headers&&(c[f]=r.headers)}else Ze(r)?(a.set(f,r.deferredData),i[f]=r.deferredData.data):i[f]=r.data,null==r.statusCode||200===r.statusCode||s||(o=r.statusCode),r.headers&&(c[f]=r.headers)})),n&&(u=n,i[Object.keys(n)[0]]=void 0),{loaderData:i,errors:u,statusCode:o||200,loaderHeaders:c}}(t,r,n,a,u),c=s.loaderData,l=s.errors,f=0;f<o.length;f++){var d=o[f],h=d.key,p=d.match,m=d.controller;O(void 0!==i&&void 0!==i[f],"Did not find corresponding fetcher result");var y=i[f];if(!m||!m.signal.aborted)if(et(y)){var b=Ve(e.matches,null==p?void 0:p.route.id);l&&l[b.route.id]||(l=C({},l,v({},b.route.id,y.error))),e.fetchers.delete(h)}else if(tt(y))O(!1,"Unhandled fetcher revalidation redirect");else if(Ze(y))O(!1,"Unhandled fetcher deferred data");else{var g=lt(y.data);e.fetchers.set(h,g)}}return{loaderData:c,errors:l}}function qe(e,t,r,n){var a=C({},t),o=!0,i=!1,u=void 0;try{for(var s,c=r[Symbol.iterator]();!(o=(s=c.next()).done);o=!0){var l=s.value,f=l.route.id;if(t.hasOwnProperty(f)?void 0!==t[f]&&(a[f]=t[f]):void 0!==e[f]&&l.route.loader&&(a[f]=e[f]),n&&n.hasOwnProperty(f))break}}catch(e){i=!0,u=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw u}}return a}function Ve(e,t){return(t?e.slice(0,e.findIndex((function(e){return e.route.id===t}))+1):S(e)).reverse().find((function(e){return!0===e.route.hasErrorBoundary}))||e[0]}function Ye(e){var t=1===e.length?e[0]:e.find((function(e){return e.index||!e.path||"/"===e.path}))||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Xe(e,t){var r=void 0===t?{}:t,n=r.pathname,a=r.routeId,o=r.method,i=r.type,u="Unknown Server Error",s="Unknown @remix-run/router error";return 400===e?(u="Bad Request",o&&n&&a?s="You made a "+o+' request to "'+n+'" but did not provide a `loader` for route "'+a+'", so there is no way to handle the request.':"defer-action"===i?s="defer() is not supported in actions":"invalid-body"===i&&(s="Unable to encode submission body")):403===e?(u="Forbidden",s='Route "'+a+'" does not match URL "'+n+'"'):404===e?(u="Not Found",s='No route matches URL "'+n+'"'):405===e&&(u="Method Not Allowed",o&&n&&a?s="You made a "+o.toUpperCase()+' request to "'+n+'" but did not provide an `action` for route "'+a+'", so there is no way to handle the request.':o&&(s='Invalid request method "'+o.toUpperCase()+'"')),new Se(e||500,u,new Error(s),!0)}function Ge(e){for(var t=e.length-1;t>=0;t--){var r=e[t];if(tt(r))return{result:r,idx:t}}}function Qe(e){return I(C({},"string"==typeof e?B(e):e,{hash:""}))}function Ze(e){return e.type===_.deferred}function et(e){return e.type===_.error}function tt(e){return(e&&e.type)===_.redirect}function rt(e){return Re.has(e.toLowerCase())}function nt(e,t,r,n,a,o){return l((function(){var i,u;return k(this,(function(s){switch(s.label){case 0:i=function(i){var u,s,c,l,f;return k(this,(function(d){switch(d.label){case 0:return u=r[i],(s=t[i])?(c=e.find((function(e){return e.route.id===s.route.id})),l=null!=c&&!Be(c,s)&&void 0!==(o&&o[s.route.id]),Ze(u)&&(a||l)?(O(f=n[i],"Expected an AbortSignal for revalidating fetcher deferred result"),[4,at(u,f,a).then((function(e){e&&(r[i]=e||r[i])}))]):[3,2]):[2,"continue"];case 1:d.sent(),d.label=2;case 2:return[2]}}))},u=0,s.label=1;case 1:return u<r.length?[5,P(i(u))]:[3,4];case 2:s.sent(),s.label=3;case 3:return u++,[3,1];case 4:return[2]}}))}))()}function at(e,t,r){return l((function(){return k(this,(function(n){switch(n.label){case 0:return void 0===r&&(r=!1),[4,e.deferredData.resolveData(t)];case 1:if(n.sent())return[2];if(r)try{return[2,{type:_.data,data:e.deferredData.unwrappedData}]}catch(e){return[2,{type:_.error,error:e}]}return[2,{type:_.data,data:e.deferredData.data}]}}))}))()}function ot(e){return new URLSearchParams(e).getAll("index").some((function(e){return""===e}))}function it(e,t){var r="string"==typeof t?B(t).search:t.search;if(e[e.length-1].route.index&&ot(r||""))return e[e.length-1];var n=se(e);return n[n.length-1]}function ut(e){var t=e.formMethod,r=e.formAction,n=e.formEncType,a=e.text,o=e.formData,i=e.json;if(t&&r&&n)return null!=a?{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a}:null!=o?{formMethod:t,formAction:r,formEncType:n,formData:o,json:void 0,text:void 0}:void 0!==i?{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:i,text:void 0}:void 0}function st(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 ct(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 lt(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 ft(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function dt(e,t,r){return t=mt(t),n=e,!(a=Et()?Reflect.construct(t,r||[],mt(e).constructor):t.apply(e,r))||"object"!=((o=a)&&"undefined"!=typeof Symbol&&o.constructor===Symbol?"symbol":typeof o)&&"function"!=typeof a?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n):a;var n,a,o}function ht(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function pt(e,t,r){return t&&vt(e.prototype,t),r&&vt(e,r),e}function mt(e){return mt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},mt(e)}function yt(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&gt(e,t)}function bt(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function gt(e,t){return gt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},gt(e,t)}function wt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,u=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){u=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(u)throw a}}return o}}(e,t)||St(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function St(e,t){if(e){if("string"==typeof e)return ft(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ft(e,t):void 0}}function Et(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Et=function(){return!!e})()}function xt(){return xt=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},xt.apply(this,arguments)}Symbol("deferred");var Rt=a.createContext(null),Dt=a.createContext(null),kt=a.createContext(null),Pt=a.createContext(null),Ct=a.createContext(null),_t=a.createContext({outlet:null,matches:[],isDataRoute:!1}),Lt=a.createContext(null);function Tt(e,t){var r=(void 0===t?{}:t).relative;At()||O(!1);var n=a.useContext(Pt),o=n.basename,i=n.navigator,u=Ht(e,{relative:r}),s=u.hash,c=u.pathname,l=u.search,f=c;return"/"!==o&&(f="/"===c?o:fe([o,c])),i.createHref({pathname:f,search:l,hash:s})}function At(){return null!=a.useContext(Ct)}function jt(){return At()||O(!1),a.useContext(Ct).location}function Ot(){return a.useContext(Ct).navigationType}function Ut(e){At()||O(!1);var t=jt().pathname;return a.useMemo((function(){return ne(e,t)}),[t,e])}function Mt(e){a.useContext(Pt).static||a.useLayoutEffect(e)}function Ft(){var e,t,r;return a.useContext(_t).isDataRoute?(e=Qt(Xt.UseNavigateStable).router,t=er(Gt.UseNavigateStable),r=a.useRef(!1),Mt((function(){r.current=!0})),a.useCallback((function(n,a){void 0===a&&(a={}),r.current&&("number"==typeof n?e.navigate(n):e.navigate(n,xt({fromRouteId:t},a)))}),[e,t])):function(){At()||O(!1);var e=a.useContext(Rt),t=a.useContext(Pt),r=t.basename,n=t.future,o=t.navigator,i=a.useContext(_t).matches,u=jt().pathname,s=JSON.stringify(ce(i,n.v7_relativeSplatPath)),c=a.useRef(!1);return Mt((function(){c.current=!0})),a.useCallback((function(t,n){if(void 0===n&&(n={}),c.current)if("number"!=typeof t){var a=le(t,JSON.parse(s),u,"path"===n.relative);null==e&&"/"!==r&&(a.pathname="/"===a.pathname?r:fe([r,a.pathname])),(n.replace?o.replace:o.push)(a,n.state,n)}else o.go(t)}),[r,o,s,u,e])}()}var It=a.createContext(null);function Bt(){return a.useContext(It)}function Nt(e){var t=a.useContext(_t).outlet;return t?a.createElement(It.Provider,{value:e},t):t}function zt(){var e=a.useContext(_t).matches,t=e[e.length-1];return t?t.params:{}}function Ht(e,t){var r=(void 0===t?{}:t).relative,n=a.useContext(Pt).future,o=a.useContext(_t).matches,i=jt().pathname,u=JSON.stringify(ce(o,n.v7_relativeSplatPath));return a.useMemo((function(){return le(e,JSON.parse(u),i,"path"===r)}),[e,u,i,r])}function Wt(e,t){return Kt(e,t)}function Kt(e,t,r,o){At()||O(!1);var i,u=a.useContext(Pt).navigator,s=a.useContext(_t).matches,c=s[s.length-1],l=c?c.params:{},f=(c&&c.pathname,c?c.pathnameBase:"/"),d=(c&&c.route,jt());if(t){var h,v="string"==typeof t?B(t):t;"/"===f||(null==(h=v.pathname)?void 0:h.startsWith(f))||O(!1),i=v}else i=d;var p=i.pathname||"/",m=W(e,{pathname:"/"===f?p:p.slice(f.length)||"/"}),y=Yt(m&&m.map((function(e){return Object.assign({},e,{params:Object.assign({},l,e.params),pathname:fe([f,u.encodeLocation?u.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?f:fe([f,u.encodeLocation?u.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})})),s,r,o);return t&&y?a.createElement(Ct.Provider,{value:{location:xt({pathname:"/",search:"",hash:"",state:null,key:"default"},i),navigationType:n.Pop}},y):y}function $t(){var e=sr(),t=Ee(e)?e.status+" "+e.statusText:bt(e,Error)?e.message:JSON.stringify(e),r=bt(e,Error)?e.stack:null,n={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return a.createElement(a.Fragment,null,a.createElement("h2",null,"Unexpected Application Error!"),a.createElement("h3",{style:{fontStyle:"italic"}},t),r?a.createElement("pre",{style:n},r):null,null)}var Jt=a.createElement($t,null),qt=function(e){function t(e){var r;return ht(this,t),(r=dt(this,t,[e])).state={location:e.location,revalidation:e.revalidation,error:e.error},r}return yt(t,e),pt(t,[{key:"componentDidCatch",value:function(e,t){console.error("React Router caught the following error during render",e,t)}},{key:"render",value:function(){return void 0!==this.state.error?a.createElement(_t.Provider,{value:this.props.routeContext},a.createElement(Lt.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return{error:e}}},{key:"getDerivedStateFromProps",value:function(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}}]),t}(a.Component);function Vt(e){var t=e.routeContext,r=e.match,n=e.children,o=a.useContext(Rt);return o&&o.static&&o.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=r.route.id),a.createElement(_t.Provider,{value:t},n)}function Yt(e,t,r,n){var o;if(void 0===t&&(t=[]),void 0===r&&(r=null),void 0===n&&(n=null),null==e){var i;if(null==(i=r)||!i.errors)return null;e=r.matches}var u=e,s=null==(o=r)?void 0:o.errors;if(null!=s){var c=u.findIndex((function(e){return e.route.id&&(null==s?void 0:s[e.route.id])}));c>=0||O(!1),u=u.slice(0,Math.min(u.length,c+1))}var l=!1,f=-1;if(r&&n&&n.v7_partialHydration)for(var d=0;d<u.length;d++){var h=u[d];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(f=d),h.route.id){var v=r.loaderData,p=r.errors,m=h.route.loader&&void 0===v[h.route.id]&&(!p||void 0===p[h.route.id]);if(h.route.lazy||m){l=!0,u=f>=0?u.slice(0,f+1):[u[0]];break}}}return u.reduceRight((function(e,n,o){var i,c,d=!1,h=null,v=null;r&&(i=s&&n.route.id?s[n.route.id]:void 0,h=n.route.errorElement||Jt,l&&(f<0&&0===o?(hr[c="route-fallback"]||(hr[c]=!0),d=!0,v=null):f===o&&(d=!0,v=n.route.hydrateFallbackElement||null)));var p=t.concat(u.slice(0,o+1)),m=function(){var t;return t=i?h:d?v:n.route.Component?a.createElement(n.route.Component,null):n.route.element?n.route.element:e,a.createElement(Vt,{match:n,routeContext:{outlet:e,matches:p,isDataRoute:null!=r},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||0===o)?a.createElement(qt,{location:r.location,revalidation:r.revalidation,component:h,error:i,children:m(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):m()}),null)}var Xt=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Xt||{}),Gt=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}(Gt||{});function Qt(e){var t=a.useContext(Rt);return t||O(!1),t}function Zt(e){var t=a.useContext(Dt);return t||O(!1),t}function er(e){var t=function(){var e=a.useContext(_t);return e||O(!1),e}(),r=t.matches[t.matches.length-1];return r.route.id||O(!1),r.route.id}function tr(){return er(Gt.UseRouteId)}function rr(){return Zt(Gt.UseNavigation).navigation}function nr(){var e=Qt(Xt.UseRevalidator),t=Zt(Gt.UseRevalidator);return a.useMemo((function(){return{revalidate:e.router.revalidate,state:t.revalidation}}),[e.router.revalidate,t.revalidation])}function ar(){var e=Zt(Gt.UseMatches),t=e.matches,r=e.loaderData;return a.useMemo((function(){return t.map((function(e){return K(e,r)}))}),[t,r])}function or(){var e=Zt(Gt.UseLoaderData),t=er(Gt.UseLoaderData);if(!e.errors||null==e.errors[t])return e.loaderData[t];console.error("You cannot `useLoaderData` in an errorElement (routeId: "+t+")")}function ir(e){return Zt(Gt.UseRouteLoaderData).loaderData[e]}function ur(){var e=Zt(Gt.UseActionData),t=er(Gt.UseLoaderData);return e.actionData?e.actionData[t]:void 0}function sr(){var e,t=a.useContext(Lt),r=Zt(Gt.UseRouteError),n=er(Gt.UseRouteError);return void 0!==t?t:null==(e=r.errors)?void 0:e[n]}function cr(){var e=a.useContext(kt);return null==e?void 0:e._data}function lr(){var e=a.useContext(kt);return null==e?void 0:e._error}var fr=0;function dr(e){var t=Qt(Xt.UseBlocker),r=t.router,n=t.basename,o=Zt(Gt.UseBlocker),i=wt(a.useState(""),2),u=i[0],s=i[1],c=a.useCallback((function(t){if("function"!=typeof e)return!!e;if("/"===n)return e(t);var r=t.currentLocation,a=t.nextLocation,o=t.historyAction;return e({currentLocation:xt({},r,{pathname:oe(r.pathname,n)||r.pathname}),nextLocation:xt({},a,{pathname:oe(a.pathname,n)||a.pathname}),historyAction:o})}),[n,e]);return a.useEffect((function(){var e=String(++fr);return s(e),function(){return r.deleteBlocker(e)}}),[r]),a.useEffect((function(){""!==u&&r.getBlocker(u,c)}),[r,u,c]),u&&o.blockers.has(u)?o.blockers.get(u):Te}var hr={},vr=a.startTransition;function pr(e){var t=e.basename,r=e.children,n=e.initialEntries,o=e.initialIndex,i=e.future,u=a.useRef();null==u.current&&(u.current=T({initialEntries:n,initialIndex:o,v5Compat:!0}));var s=u.current,c=wt(a.useState({action:s.action,location:s.location}),2),l=c[0],f=c[1],d=(i||{}).v7_startTransition,h=a.useCallback((function(e){d&&vr?vr((function(){return f(e)})):f(e)}),[f,d]);return a.useLayoutEffect((function(){return s.listen(h)}),[s,h]),a.createElement(gr,{basename:t,children:r,location:l.location,navigationType:l.action,navigator:s,future:i})}function mr(e){var t=e.to,r=e.replace,n=e.state,o=e.relative;At()||O(!1);var i=a.useContext(Pt),u=i.future,s=(i.static,a.useContext(_t).matches),c=jt().pathname,l=Ft(),f=le(t,ce(s,u.v7_relativeSplatPath),c,"path"===o),d=JSON.stringify(f);return a.useEffect((function(){return l(JSON.parse(d),{replace:r,state:n,relative:o})}),[l,d,o,r,n]),null}function yr(e){return Nt(e.context)}function br(e){O(!1)}function gr(e){var t=e.basename,r=void 0===t?"/":t,o=e.children,i=void 0===o?null:o,u=e.location,s=e.navigationType,c=void 0===s?n.Pop:s,l=e.navigator,f=e.static,d=void 0!==f&&f,h=e.future;At()&&O(!1);var v=r.replace(/^\/*/,"/"),p=a.useMemo((function(){return{basename:v,navigator:l,static:d,future:xt({v7_relativeSplatPath:!1},h)}}),[v,h,l,d]);"string"==typeof u&&(u=B(u));var m=u.pathname,y=void 0===m?"/":m,b=u.search,g=void 0===b?"":b,w=u.hash,S=void 0===w?"":w,E=u.state,x=void 0===E?null:E,R=u.key,D=void 0===R?"default":R,k=a.useMemo((function(){var e=oe(y,v);return null==e?null:{location:{pathname:e,search:g,hash:S,state:x,key:D},navigationType:c}}),[v,y,g,S,x,D,c]);return null==k?null:a.createElement(Pt.Provider,{value:p},a.createElement(Ct.Provider,{children:i,value:k}))}function wr(e){var t=e.children,r=e.location;return Wt(kr(t),r)}function Sr(e){var t=e.children,r=e.errorElement,n=e.resolve;return a.createElement(Rr,{resolve:n,errorElement:r},a.createElement(Dr,null,t))}var Er=function(e){return e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error",e}(Er||{}),xr=new Promise((function(){})),Rr=function(e){function t(e){var r;return ht(this,t),(r=dt(this,t,[e])).state={error:null},r}return yt(t,e),pt(t,[{key:"componentDidCatch",value:function(e,t){console.error("<Await> caught the following error during render",e,t)}},{key:"render",value:function(){var e=this.props,t=e.children,r=e.errorElement,n=e.resolve,o=null,i=Er.pending;if(bt(n,Promise))if(this.state.error){i=Er.error;var u=this.state.error;o=Promise.reject().catch((function(){})),Object.defineProperty(o,"_tracked",{get:function(){return!0}}),Object.defineProperty(o,"_error",{get:function(){return u}})}else n._tracked?i=void 0!==(o=n)._error?Er.error:void 0!==o._data?Er.success:Er.pending:(i=Er.pending,Object.defineProperty(n,"_tracked",{get:function(){return!0}}),o=n.then((function(e){return Object.defineProperty(n,"_data",{get:function(){return e}})}),(function(e){return Object.defineProperty(n,"_error",{get:function(){return e}})})));else i=Er.success,o=Promise.resolve(),Object.defineProperty(o,"_tracked",{get:function(){return!0}}),Object.defineProperty(o,"_data",{get:function(){return n}});if(i===Er.error&&bt(o._error,me))throw xr;if(i===Er.error&&!r)throw o._error;if(i===Er.error)return a.createElement(kt.Provider,{value:o,children:r});if(i===Er.success)return a.createElement(kt.Provider,{value:o,children:t});throw o}}],[{key:"getDerivedStateFromError",value:function(e){return{error:e}}}]),t}(a.Component);function Dr(e){var t=e.children,r=cr(),n="function"==typeof t?t(r):t;return a.createElement(a.Fragment,null,n)}function kr(e,t){void 0===t&&(t=[]);var r=[];return a.Children.forEach(e,(function(e,n){if(a.isValidElement(e)){var o=(u=t,function(e){if(Array.isArray(e))return ft(e)}(u)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(u)||St(u)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([n]);if(e.type!==a.Fragment){e.type!==br&&O(!1),e.props.index&&e.props.children&&O(!1);var i={id:e.props.id||o.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(i.children=kr(e.props.children,o)),r.push(i)}else r.push.apply(r,kr(e.props.children,o))}var u})),r}function Pr(e){return Yt(e)}function Cr(e){var t={hasErrorBoundary:null!=e.ErrorBoundary||null!=e.errorElement};return e.Component&&Object.assign(t,{element:a.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:a.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:a.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}function _r(e,t){return Ue({basename:null==t?void 0:t.basename,future:xt({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:T({initialEntries:null==t?void 0:t.initialEntries,initialIndex:null==t?void 0:t.initialIndex}),hydrationData:null==t?void 0:t.hydrationData,routes:e,mapRouteProperties:Cr}).initialize()}function Lr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Tr(e,t,r,n,a,o,i){try{var u=e[o](i),s=u.value}catch(e){return void r(e)}u.done?t(s):Promise.resolve(s).then(n,a)}function Ar(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,u=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){u=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(u)throw a}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Lr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Lr(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function jr(){return jr=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},jr.apply(this,arguments)}function Or(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}var Ur="get",Mr="application/x-www-form-urlencoded";function Fr(e){return null!=e&&"string"==typeof e.tagName}function Ir(e){return void 0===e&&(e=""),new URLSearchParams("string"==typeof e||Array.isArray(e)||(t=e,null!=(r=URLSearchParams)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](t):t instanceof r)?e:Object.keys(e).reduce((function(t,r){var n=e[r];return t.concat(Array.isArray(n)?n.map((function(e){return[r,e]})):[[r,n]])}),[]));var t,r}var Br=null,Nr=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function zr(e){return null==e||Nr.has(e)?e:null}var Hr=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],Wr=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],Kr=["fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","unstable_viewTransition"];try{window.__reactRouterVersion="6"}catch(e){}function $r(e,t){return Ue({basename:null==t?void 0:t.basename,future:jr({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:A({window:null==t?void 0:t.window}),hydrationData:(null==t?void 0:t.hydrationData)||qr(),routes:e,mapRouteProperties:Cr,window:null==t?void 0:t.window}).initialize()}function Jr(e,t){return Ue({basename:null==t?void 0:t.basename,future:jr({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:j({window:null==t?void 0:t.window}),hydrationData:(null==t?void 0:t.hydrationData)||qr(),routes:e,mapRouteProperties:Cr,window:null==t?void 0:t.window}).initialize()}function qr(){var e,t=null==(e=window)?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=jr({},t,{errors:Vr(t.errors)})),t}function Vr(e){if(!e)return null;var t=Object.entries(e),r={},n=!0,a=!1,o=void 0;try{for(var i,u=t[Symbol.iterator]();!(n=(i=u.next()).done);n=!0){var s=Ar(i.value,2),c=s[0],l=s[1];if(l&&"RouteErrorResponse"===l.__type)r[c]=new Se(l.status,l.statusText,l.data,!0===l.internal);else if(l&&"Error"===l.__type){if(l.__subType){var f=window[l.__subType];if("function"==typeof f)try{var d=new f(l.message);d.stack="",r[c]=d}catch(e){}}if(null==r[c]){var h=new Error(l.message);h.stack="",r[c]=h}}else r[c]=l}}catch(e){a=!0,o=e}finally{try{n||null==u.return||u.return()}finally{if(a)throw o}}return r}var Yr=a.createContext({isTransitioning:!1}),Xr=a.createContext(new Map),Gr=a.startTransition,Qr=i.flushSync,Zr=a.useId;function en(e){Qr?Qr(e):e()}var tn=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.status="pending",this.promise=new Promise((function(e,r){t.resolve=function(r){"pending"===t.status&&(t.status="resolved",e(r))},t.reject=function(e){"pending"===t.status&&(t.status="rejected",r(e))}}))};function rn(e){var t=e.fallbackElement,r=e.router,n=e.future,o=Ar(a.useState(r.state),2),i=o[0],u=o[1],s=Ar(a.useState(),2),c=s[0],l=s[1],f=Ar(a.useState({isTransitioning:!1}),2),d=f[0],h=f[1],v=Ar(a.useState(),2),p=v[0],m=v[1],y=Ar(a.useState(),2),b=y[0],g=y[1],w=Ar(a.useState(),2),S=w[0],E=w[1],x=a.useRef(new Map),R=(n||{}).v7_startTransition,D=a.useCallback((function(e){R?function(e){Gr?Gr(e):e()}(e):e()}),[R]),k=a.useCallback((function(e,t){var n=t.deletedFetchers,a=t.unstable_flushSync,o=t.unstable_viewTransitionOpts;n.forEach((function(e){return x.current.delete(e)})),e.fetchers.forEach((function(e,t){void 0!==e.data&&x.current.set(t,e.data)}));var i=null==r.window||"function"!=typeof r.window.document.startViewTransition;if(o&&!i){if(a){en((function(){b&&(p&&p.resolve(),b.skipTransition()),h({isTransitioning:!0,flushSync:!0,currentLocation:o.currentLocation,nextLocation:o.nextLocation})}));var s=r.window.document.startViewTransition((function(){en((function(){return u(e)}))}));return s.finished.finally((function(){en((function(){m(void 0),g(void 0),l(void 0),h({isTransitioning:!1})}))})),void en((function(){return g(s)}))}b?(p&&p.resolve(),b.skipTransition(),E({state:e,currentLocation:o.currentLocation,nextLocation:o.nextLocation})):(l(e),h({isTransitioning:!0,flushSync:!1,currentLocation:o.currentLocation,nextLocation:o.nextLocation}))}else a?en((function(){return u(e)})):D((function(){return u(e)}))}),[r.window,b,p,x,D]);a.useLayoutEffect((function(){return r.subscribe(k)}),[r,k]),a.useEffect((function(){d.isTransitioning&&!d.flushSync&&m(new tn)}),[d]),a.useEffect((function(){if(p&&c&&r.window){var e=c,t=p.promise,n=r.window.document.startViewTransition((function(){return(r=function(){return function(e,t){var r,n,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=u(0),i.throw=u(1),i.return=u(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(s){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(o=0)),o;)try{if(r=1,n&&(a=2&u[0]?n.return:u[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,u[1])).done)return a;switch(n=0,a&&(u=[2&u[0],a.value]),u[0]){case 0:case 1:a=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,n=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==u[0]&&2!==u[0])){o=0;continue}if(3===u[0]&&(!a||u[1]>a[0]&&u[1]<a[3])){o.label=u[1];break}if(6===u[0]&&o.label<a[1]){o.label=a[1],a=u;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(u);break}a[2]&&o.ops.pop(),o.trys.pop();continue}u=t.call(e,o)}catch(e){u=[6,e],n=0}finally{r=a=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}}(this,(function(r){switch(r.label){case 0:return D((function(){return u(e)})),[4,t];case 1:return r.sent(),[2]}}))},function(){var e=this,t=arguments;return new Promise((function(n,a){var o=r.apply(e,t);function i(e){Tr(o,n,a,i,u,"next",e)}function u(e){Tr(o,n,a,i,u,"throw",e)}i(void 0)}))})();var r}));n.finished.finally((function(){m(void 0),g(void 0),l(void 0),h({isTransitioning:!1})})),g(n)}}),[D,c,p,r.window]),a.useEffect((function(){p&&c&&i.location.key===c.location.key&&p.resolve()}),[p,b,i.location,c]),a.useEffect((function(){!d.isTransitioning&&S&&(l(S.state),h({isTransitioning:!0,flushSync:!1,currentLocation:S.currentLocation,nextLocation:S.nextLocation}),E(void 0))}),[d.isTransitioning,S]),a.useEffect((function(){}),[]);var P=a.useMemo((function(){return{createHref:r.createHref,encodeLocation:r.encodeLocation,go:function(e){return r.navigate(e)},push:function(e,t,n){return r.navigate(e,{state:t,preventScrollReset:null==n?void 0:n.preventScrollReset})},replace:function(e,t,n){return r.navigate(e,{replace:!0,state:t,preventScrollReset:null==n?void 0:n.preventScrollReset})}}}),[r]),C=r.basename||"/",_=a.useMemo((function(){return{router:r,navigator:P,static:!1,basename:C}}),[r,P,C]);return a.createElement(a.Fragment,null,a.createElement(Rt.Provider,{value:_},a.createElement(Dt.Provider,{value:i},a.createElement(Xr.Provider,{value:x.current},a.createElement(Yr.Provider,{value:d},a.createElement(gr,{basename:C,location:i.location,navigationType:i.historyAction,navigator:P,future:{v7_relativeSplatPath:r.future.v7_relativeSplatPath}},i.initialized||r.future.v7_partialHydration?a.createElement(nn,{routes:r.routes,future:r.future,state:i}):t))))),null)}function nn(e){var t=e.routes,r=e.future;return Kt(t,void 0,e.state,r)}function an(e){var t=e.basename,r=e.children,n=e.future,o=e.window,i=a.useRef();null==i.current&&(i.current=A({window:o,v5Compat:!0}));var u=i.current,s=Ar(a.useState({action:u.action,location:u.location}),2),c=s[0],l=s[1],f=(n||{}).v7_startTransition,d=a.useCallback((function(e){f&&Gr?Gr((function(){return l(e)})):l(e)}),[l,f]);return a.useLayoutEffect((function(){return u.listen(d)}),[u,d]),a.createElement(gr,{basename:t,children:r,location:c.location,navigationType:c.action,navigator:u,future:n})}function on(e){var t=e.basename,r=e.children,n=e.future,o=e.window,i=a.useRef();null==i.current&&(i.current=j({window:o,v5Compat:!0}));var u=i.current,s=Ar(a.useState({action:u.action,location:u.location}),2),c=s[0],l=s[1],f=(n||{}).v7_startTransition,d=a.useCallback((function(e){f&&Gr?Gr((function(){return l(e)})):l(e)}),[l,f]);return a.useLayoutEffect((function(){return u.listen(d)}),[u,d]),a.createElement(gr,{basename:t,children:r,location:c.location,navigationType:c.action,navigator:u,future:n})}function un(e){var t=e.basename,r=e.children,n=e.future,o=e.history,i=Ar(a.useState({action:o.action,location:o.location}),2),u=i[0],s=i[1],c=(n||{}).v7_startTransition,l=a.useCallback((function(e){c&&Gr?Gr((function(){return s(e)})):s(e)}),[s,c]);return a.useLayoutEffect((function(){return o.listen(l)}),[o,l]),a.createElement(gr,{basename:t,children:r,location:u.location,navigationType:u.action,navigator:o,future:n})}var sn,cn,ln="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,fn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,dn=a.forwardRef((function(e,t){var r,n=e.onClick,o=e.relative,i=e.reloadDocument,u=e.replace,s=e.state,c=e.target,l=e.to,f=e.preventScrollReset,d=e.unstable_viewTransition,h=Or(e,Hr),v=a.useContext(Pt).basename,p=!1;if("string"==typeof l&&fn.test(l)&&(r=l,ln))try{var m=new URL(window.location.href),y=l.startsWith("//")?new URL(m.protocol+l):new URL(l),b=oe(y.pathname,v);y.origin===m.origin&&null!=b?l=b+y.search+y.hash:p=!0}catch(e){}var g=Tt(l,{relative:o}),w=bn(l,{replace:u,state:s,target:c,preventScrollReset:f,relative:o,unstable_viewTransition:d});return a.createElement("a",jr({},h,{href:r||g,onClick:p||i?n:function(e){n&&n(e),e.defaultPrevented||w(e)},ref:t,target:c}))})),hn=a.forwardRef((function(e,t){var r=e["aria-current"],n=void 0===r?"page":r,o=e.caseSensitive,i=void 0!==o&&o,u=e.className,s=void 0===u?"":u,c=e.end,l=void 0!==c&&c,f=e.style,d=e.to,h=e.unstable_viewTransition,v=e.children,p=Or(e,Wr),m=Ht(d,{relative:p.relative}),y=jt(),b=a.useContext(Dt),g=a.useContext(Pt),w=g.navigator,S=g.basename,E=null!=b&&Tn(m)&&!0===h,x=w.encodeLocation?w.encodeLocation(m).pathname:m.pathname,R=y.pathname,D=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;i||(R=R.toLowerCase(),D=D?D.toLowerCase():null,x=x.toLowerCase()),D&&S&&(D=oe(D,S)||D);var k,P="/"!==x&&x.endsWith("/")?x.length-1:x.length,C=R===x||!l&&R.startsWith(x)&&"/"===R.charAt(P),_=null!=D&&(D===x||!l&&D.startsWith(x)&&"/"===D.charAt(x.length)),L={isActive:C,isPending:_,isTransitioning:E},T=C?n:void 0;k="function"==typeof s?s(L):[s,C?"active":null,_?"pending":null,E?"transitioning":null].filter(Boolean).join(" ");var A="function"==typeof f?f(L):f;return a.createElement(dn,jr({},p,{"aria-current":T,className:k,ref:t,style:A,to:d,unstable_viewTransition:h}),"function"==typeof v?v(L):v)})),vn=a.forwardRef((function(e,t){var r=e.fetcherKey,n=e.navigate,o=e.reloadDocument,i=e.replace,u=e.state,s=e.method,c=void 0===s?Ur:s,l=e.action,f=e.onSubmit,d=e.relative,h=e.preventScrollReset,v=e.unstable_viewTransition,p=Or(e,Kr),m=En(),y=xn(l,{relative:d}),b="get"===c.toLowerCase()?"get":"post";return a.createElement("form",jr({ref:t,method:b,action:y,onSubmit:o?f:function(e){if(f&&f(e),!e.defaultPrevented){e.preventDefault();var t=e.nativeEvent.submitter,a=(null==t?void 0:t.getAttribute("formmethod"))||c;m(t||e.currentTarget,{fetcherKey:r,method:a,navigate:n,replace:i,state:u,relative:d,preventScrollReset:h,unstable_viewTransition:v})}}},p))}));function pn(e){return Cn({getKey:e.getKey,storageKey:e.storageKey}),null}function mn(e){var t=a.useContext(Rt);return t||O(!1),t}function yn(e){var t=a.useContext(Dt);return t||O(!1),t}function bn(e,t){var r=void 0===t?{}:t,n=r.target,o=r.replace,i=r.state,u=r.preventScrollReset,s=r.relative,c=r.unstable_viewTransition,l=Ft(),f=jt(),d=Ht(e,{relative:s});return a.useCallback((function(t){if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(t,n)){t.preventDefault();var r=void 0!==o?o:I(f)===I(d);l(e,{replace:r,state:i,preventScrollReset:u,relative:s,unstable_viewTransition:c})}}),[f,l,d,o,i,n,e,u,s,c])}function gn(e){var t=a.useRef(Ir(e)),r=a.useRef(!1),n=jt(),o=a.useMemo((function(){return function(e,t){var r=Ir(e);return t&&t.forEach((function(e,n){r.has(n)||t.getAll(n).forEach((function(e){r.append(n,e)}))})),r}(n.search,r.current?null:t.current)}),[n.search]),i=Ft(),u=a.useCallback((function(e,t){var n=Ir("function"==typeof e?e(o):e);r.current=!0,i("?"+n,t)}),[i,o]);return[o,u]}(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(sn||(sn={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(cn||(cn={}));var wn=0,Sn=function(){return"__"+String(++wn)+"__"};function En(){var e=mn(sn.UseSubmit).router,t=a.useContext(Pt).basename,r=tr();return a.useCallback((function(n,a){void 0===a&&(a={}),function(){if("undefined"==typeof document)throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.")}();var o=function(e,t){var r,n,a,o,i,u;if(Fr(u=e)&&"form"===u.tagName.toLowerCase()){var s=e.getAttribute("action");n=s?oe(s,t):null,r=e.getAttribute("method")||Ur,a=zr(e.getAttribute("enctype"))||Mr,o=new FormData(e)}else if(function(e){return Fr(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return Fr(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){var c=e.form;if(null==c)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');var l=e.getAttribute("formaction")||c.getAttribute("action");if(n=l?oe(l,t):null,r=e.getAttribute("formmethod")||c.getAttribute("method")||Ur,a=zr(e.getAttribute("formenctype"))||zr(c.getAttribute("enctype"))||Mr,o=new FormData(c,e),!function(){if(null===Br)try{new FormData(document.createElement("form"),0),Br=!1}catch(e){Br=!0}return Br}()){var f=e.name,d=e.type,h=e.value;if("image"===d){var v=f?f+".":"";o.append(v+"x","0"),o.append(v+"y","0")}else f&&o.append(f,h)}}else{if(Fr(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Ur,n=null,a=Mr,i=e}return o&&"text/plain"===a&&(i=o,o=void 0),{action:n,method:r.toLowerCase(),encType:a,formData:o,body:i}}(n,t),i=o.action,u=o.method,s=o.encType,c=o.formData,l=o.body;if(!1===a.navigate){var f=a.fetcherKey||Sn();e.fetch(f,r,a.action||i,{preventScrollReset:a.preventScrollReset,formData:c,body:l,formMethod:a.method||u,formEncType:a.encType||s,unstable_flushSync:a.unstable_flushSync})}else e.navigate(a.action||i,{preventScrollReset:a.preventScrollReset,formData:c,body:l,formMethod:a.method||u,formEncType:a.encType||s,replace:a.replace,state:a.state,fromRouteId:r,unstable_flushSync:a.unstable_flushSync,unstable_viewTransition:a.unstable_viewTransition})}),[e,t,r])}function xn(e,t){var r=(void 0===t?{}:t).relative,n=a.useContext(Pt).basename,o=a.useContext(_t);o||O(!1);var i=Ar(o.matches.slice(-1),1)[0],u=jr({},Ht(e||".",{relative:r})),s=jt();if(null==e){u.search=s.search;var c=new URLSearchParams(u.search);c.has("index")&&""===c.get("index")&&(c.delete("index"),u.search=c.toString()?"?"+c.toString():"")}return e&&"."!==e||!i.route.index||(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),"/"!==n&&(u.pathname="/"===u.pathname?n:fe([n,u.pathname])),I(u)}function Rn(e){var t,r=(void 0===e?{}:e).key,n=mn(sn.UseFetcher).router,o=yn(cn.UseFetcher),i=a.useContext(Xr),u=a.useContext(_t),s=null==(t=u.matches[u.matches.length-1])?void 0:t.route.id;i||O(!1),u||O(!1),null==s&&O(!1);var c=Zr?Zr():"",l=Ar(a.useState(r||c),2),f=l[0],d=l[1];r&&r!==f?d(r):f||d(Sn()),a.useEffect((function(){return n.getFetcher(f),function(){n.deleteFetcher(f)}}),[n,f]);var h=a.useCallback((function(e,t){s||O(!1),n.fetch(f,s,e,t)}),[f,s,n]),v=En(),p=a.useCallback((function(e,t){v(e,jr({},t,{navigate:!1,fetcherKey:f}))}),[f,v]),m=a.useMemo((function(){return a.forwardRef((function(e,t){return a.createElement(vn,jr({},e,{navigate:!1,fetcherKey:f,ref:t}))}))}),[f]),y=o.fetchers.get(f)||Le,b=i.get(f);return a.useMemo((function(){return jr({Form:m,submit:p,load:h},y,{data:b})}),[m,p,h,y,b])}function Dn(){var e=yn(cn.UseFetchers);return Array.from(e.fetchers.entries()).map((function(e){var t=Ar(e,2),r=t[0];return jr({},t[1],{key:r})}))}var kn="react-router-scroll-positions",Pn={};function Cn(e){var t,r,n=void 0===e?{}:e,o=n.getKey,i=n.storageKey,u=mn(sn.UseScrollRestoration).router,s=yn(cn.UseScrollRestoration),c=s.restoreScrollPosition,l=s.preventScrollReset,f=a.useContext(Pt).basename,d=jt(),h=ar(),v=rr();a.useEffect((function(){return window.history.scrollRestoration="manual",function(){window.history.scrollRestoration="auto"}}),[]),t=a.useCallback((function(){if("idle"===v.state){var e=(o?o(d,h):null)||d.key;Pn[e]=window.scrollY}try{sessionStorage.setItem(i||kn,JSON.stringify(Pn))}catch(e){}window.history.scrollRestoration="auto"}),[i,o,v.state,d,h]),r={}.capture,a.useEffect((function(){var e=null!=r?{capture:r}:void 0;return window.addEventListener("pagehide",t,e),function(){window.removeEventListener("pagehide",t,e)}}),[t,r]),"undefined"!=typeof document&&(a.useLayoutEffect((function(){try{var e=sessionStorage.getItem(i||kn);e&&(Pn=JSON.parse(e))}catch(e){}}),[i]),a.useLayoutEffect((function(){var e=o&&"/"!==f?function(e,t){return o(jr({},e,{pathname:oe(e.pathname,f)||e.pathname}),t)}:o,t=null==u?void 0:u.enableScrollRestoration(Pn,(function(){return window.scrollY}),e);return function(){return t&&t()}}),[u,f,o]),a.useLayoutEffect((function(){if(!1!==c)if("number"!=typeof c){if(d.hash){var e=document.getElementById(decodeURIComponent(d.hash.slice(1)));if(e)return void e.scrollIntoView()}!0!==l&&window.scrollTo(0,0)}else window.scrollTo(0,c)}),[d,c,l]))}function _n(e,t){var r=(t||{}).capture;a.useEffect((function(){var t=null!=r?{capture:r}:void 0;return window.addEventListener("beforeunload",e,t),function(){window.removeEventListener("beforeunload",e,t)}}),[e,r])}function Ln(e){var t=e.when,r=e.message,n=dr(t);a.useEffect((function(){"blocked"===n.state&&(window.confirm(r)?setTimeout(n.proceed,0):n.reset())}),[n,r]),a.useEffect((function(){"blocked"!==n.state||t||n.reset()}),[n,t])}function Tn(e,t){void 0===t&&(t={});var r=a.useContext(Yr);null==r&&O(!1);var n=mn(sn.useViewTransitionState).basename,o=Ht(e,{relative:t.relative});if(!r.isTransitioning)return!1;var i=oe(r.currentLocation.pathname,n)||r.currentLocation.pathname,u=oe(r.nextLocation.pathname,n)||r.nextLocation.pathname;return null!=ne(o.pathname,u)||null!=ne(o.pathname,i)}}}]);
2
+ "use strict";(globalThis.webpackChunk_openmrs_esm_laboratory_app=globalThis.webpackChunk_openmrs_esm_laboratory_app||[]).push([[1026],{1026:(e,t,r)=>{r.r(t),r.d(t,{AbortedDeferredError:()=>ye,Await:()=>Ur,BrowserRouter:()=>Sn,Form:()=>_n,HashRouter:()=>En,Link:()=>Dn,MemoryRouter:()=>_r,NavLink:()=>Ln,Navigate:()=>Ar,NavigationType:()=>n,Outlet:()=>Tr,Route:()=>jr,Router:()=>Or,RouterProvider:()=>bn,Routes:()=>Mr,ScrollRestoration:()=>An,UNSAFE_DataRouterContext:()=>Ft,UNSAFE_DataRouterStateContext:()=>It,UNSAFE_ErrorResponseImpl:()=>Re,UNSAFE_FetchersContext:()=>dn,UNSAFE_LocationContext:()=>zt,UNSAFE_NavigationContext:()=>Bt,UNSAFE_RouteContext:()=>Ht,UNSAFE_ViewTransitionContext:()=>fn,UNSAFE_useRouteId:()=>vr,UNSAFE_useScrollRestoration:()=>Kn,createBrowserRouter:()=>un,createHashRouter:()=>sn,createMemoryRouter:()=>Kr,createPath:()=>I,createRoutesFromChildren:()=>zr,createRoutesFromElements:()=>zr,createSearchParams:()=>Zr,defer:()=>ge,generatePath:()=>ne,isRouteErrorResponse:()=>xe,json:()=>me,matchPath:()=>ae,matchRoutes:()=>W,parsePath:()=>N,redirect:()=>we,redirectDocument:()=>Se,renderMatches:()=>Hr,replace:()=>Ee,resolvePath:()=>ue,unstable_HistoryRouter:()=>Rn,unstable_usePrompt:()=>Vn,useActionData:()=>wr,useAsyncError:()=>Rr,useAsyncValue:()=>Er,useBeforeUnload:()=>$n,useBlocker:()=>kr,useFetcher:()=>Bn,useFetchers:()=>zn,useFormAction:()=>Nn,useHref:()=>Kt,useInRouterContext:()=>$t,useLinkClickHandler:()=>On,useLoaderData:()=>br,useLocation:()=>Vt,useMatch:()=>qt,useMatches:()=>yr,useNavigate:()=>Xt,useNavigation:()=>pr,useNavigationType:()=>Jt,useOutlet:()=>Zt,useOutletContext:()=>Qt,useParams:()=>er,useResolvedPath:()=>tr,useRevalidator:()=>mr,useRouteError:()=>Sr,useRouteLoaderData:()=>gr,useRoutes:()=>rr,useSearchParams:()=>Mn,useSubmit:()=>In,useViewTransitionState:()=>Jn});var n,a=r(6072),o=r(2934),i=r.t(o,2);function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function s(e){if(Array.isArray(e))return e}function c(e,t,r,n,a,o,i){try{var u=e[o](i),s=u.value}catch(e){return void r(e)}u.done?t(s):Promise.resolve(s).then(n,a)}function l(e){return function(){var t=this,r=arguments;return new Promise(function(n,a){var o=e.apply(t,r);function i(e){c(o,n,a,i,u,"next",e)}function u(e){c(o,n,a,i,u,"throw",e)}i(void 0)})}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t,r){return d=k()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var a=new(Function.bind.apply(e,n));return r&&g(a,r.prototype),a},d.apply(null,arguments)}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function v(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function m(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function y(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function b(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function g(e,t){return g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},g(e,t)}function w(e,t){return s(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,u=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){u=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(u)throw a}}return o}}(e,t)||R(e,t)||b()}function S(e){return function(e){if(Array.isArray(e))return u(e)}(e)||y(e)||R(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function R(e,t){if(e){if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function x(e){var t="function"==typeof Map?new Map:void 0;return x=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return d(e,arguments,p(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),g(n,e)},x(e)}function k(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(k=function(){return!!e})()}function C(e,t){var r,n,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=u(0),i.throw=u(1),i.return=u(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(s){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(o=0)),o;)try{if(r=1,n&&(a=2&u[0]?n.return:u[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,u[1])).done)return a;switch(n=0,a&&(u=[2&u[0],a.value]),u[0]){case 0:case 1:a=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,n=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==u[0]&&2!==u[0])){o=0;continue}if(3===u[0]&&(!a||u[1]>a[0]&&u[1]<a[3])){o.label=u[1];break}if(6===u[0]&&o.label<a[1]){o.label=a[1],a=u;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(u);break}a[2]&&o.ops.pop(),o.trys.pop();continue}u=t.call(e,o)}catch(e){u=[6,e],n=0}finally{r=a=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}}function P(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function D(){return D=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},D.apply(this,arguments)}!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(n||(n={}));var L,_="popstate";function A(e){void 0===e&&(e={});var t,r=e.initialEntries,a=void 0===r?["/"]:r,o=e.initialIndex,i=e.v5Compat,u=void 0!==i&&i;t=a.map(function(e,t){return h(e,"string"==typeof e?null:e.state,0===t?"default":void 0)});var s=f(null==o?t.length-1:o),c=n.Pop,l=null;function f(e){return Math.min(Math.max(e,0),t.length-1)}function d(){return t[s]}function h(e,r,n){void 0===r&&(r=null);var a=F(t?d().pathname:"/",e,r,n);return M("/"===a.pathname.charAt(0),"relative pathnames are not supported in memory history: "+JSON.stringify(e)),a}function v(e){return"string"==typeof e?e:I(e)}return{get index(){return s},get action(){return c},get location(){return d()},createHref:v,createURL:function(e){return new URL(v(e),"http://localhost")},encodeLocation:function(e){var t="string"==typeof e?N(e):e;return{pathname:t.pathname||"",search:t.search||"",hash:t.hash||""}},push:function(e,r){c=n.Push;var a=h(e,r);s+=1,t.splice(s,t.length,a),u&&l&&l({action:c,location:a,delta:1})},replace:function(e,r){c=n.Replace;var a=h(e,r);t[s]=a,u&&l&&l({action:c,location:a,delta:0})},go:function(e){c=n.Pop;var r=f(s+e),a=t[r];s=r,l&&l({action:c,location:a,delta:e})},listen:function(e){return l=e,function(){l=null}}}}function T(e){return void 0===e&&(e={}),B(function(e,t){var r=e.location;return F("",{pathname:r.pathname,search:r.search,hash:r.hash},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){return"string"==typeof t?t:I(t)},null,e)}function j(e){return void 0===e&&(e={}),B(function(e,t){var r=N(e.location.hash.substr(1)),n=r.pathname,a=void 0===n?"/":n,o=r.search,i=void 0===o?"":o,u=r.hash,s=void 0===u?"":u;return a.startsWith("/")||a.startsWith(".")||(a="/"+a),F("",{pathname:a,search:i,hash:s},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){var r=e.document.querySelector("base"),n="";if(r&&r.getAttribute("href")){var a=e.location.href,o=a.indexOf("#");n=-1===o?a:a.slice(0,o)}return n+"#"+("string"==typeof t?t:I(t))},function(e,t){M("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")},e)}function O(e,t){if(!1===e||null==e)throw new Error(t)}function M(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function U(e,t){return{usr:e.state,key:e.key,idx:t}}function F(e,t,r,n){return void 0===r&&(r=null),D({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?N(t):t,{state:r,key:t&&t.key||n||Math.random().toString(36).substr(2,8)})}function I(e){var t=e.pathname,r=void 0===t?"/":t,n=e.search,a=void 0===n?"":n,o=e.hash,i=void 0===o?"":o;return a&&"?"!==a&&(r+="?"===a.charAt(0)?a:"?"+a),i&&"#"!==i&&(r+="#"===i.charAt(0)?i:"#"+i),r}function N(e){var t={};if(e){var r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));var n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function B(e,t,r,a){void 0===a&&(a={});var o=a.window,i=void 0===o?document.defaultView:o,u=a.v5Compat,s=void 0!==u&&u,c=i.history,l=n.Pop,f=null,d=h();function h(){return(c.state||{idx:null}).idx}function v(){l=n.Pop;var e=h(),t=null==e?null:e-d;d=e,f&&f({action:l,location:y.location,delta:t})}function p(e){var t="null"!==i.location.origin?i.location.origin:i.location.href,r="string"==typeof e?e:I(e);return O(t,"No window.location.(origin|href) available to create URL for href: "+(r=r.replace(/ $/,"%20"))),new URL(r,t)}null==d&&(d=0,c.replaceState(D({},c.state,{idx:d}),""));var y={get action(){return l},get location(){return e(i,c)},listen:function(e){if(f)throw new Error("A history only accepts one active listener");return i.addEventListener(_,v),f=e,function(){i.removeEventListener(_,v),f=null}},createHref:function(e){return t(i,e)},createURL:p,encodeLocation:function(e){var t=p(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){l=n.Push;var a=F(y.location,e,t);r&&r(a,e);var o=U(a,d=h()+1),u=y.createHref(a);try{c.pushState(o,"",u)}catch(e){if(m(e,DOMException)&&"DataCloneError"===e.name)throw e;i.location.assign(u)}s&&f&&f({action:l,location:y.location,delta:1})},replace:function(e,t){l=n.Replace;var a=F(y.location,e,t);r&&r(a,e);var o=U(a,d=h()),i=y.createHref(a);c.replaceState(o,"",i),s&&f&&f({action:l,location:y.location,delta:0})},go:function(e){return c.go(e)}};return y}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(L||(L={}));var z=new Set(["lazy","caseSensitive","path","id","index","children"]);function H(e,t,r,n){return void 0===r&&(r=[]),void 0===n&&(n={}),e.map(function(e,a){var o=S(r).concat([String(a)]),i="string"==typeof e.id?e.id:o.join("-");if(O(!0!==e.index||!e.children,"Cannot specify children on an index route"),O(!n[i],'Found a route id collision on id "'+i+"\". Route id's must be globally unique within Data Router usages"),function(e){return!0===e.index}(e)){var u=D({},e,t(e),{id:i});return n[i]=u,u}var s=D({},e,t(e),{id:i,children:void 0});return n[i]=s,e.children&&(s.children=H(e.children,t,o,n)),s})}function W(e,t,r){return void 0===r&&(r="/"),K(e,t,r,!1)}function K(e,t,r,n){var a=ie(("string"==typeof t?N(t):t).pathname||"/",r);if(null==a)return null;var o=V(e);!function(e){e.sort(function(e,t){return e.score!==t.score?t.score-e.score:function(e,t){var r=e.length===t.length&&e.slice(0,-1).every(function(e,r){return e===t[r]});return r?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(function(e){return e.childrenIndex}),t.routesMeta.map(function(e){return e.childrenIndex}))})}(o);for(var i=null,u=0;null==i&&u<o.length;++u){var s=oe(a);i=re(o[u],s,n)}return i}function $(e,t){var r=e.route,n=e.pathname,a=e.params;return{id:r.id,pathname:n,params:a,data:t[r.id],handle:r.handle}}function V(e,t,r,n){void 0===t&&(t=[]),void 0===r&&(r=[]),void 0===n&&(n="");var a=function(e,a,o){var i={relativePath:void 0===o?e.path||"":o,caseSensitive:!0===e.caseSensitive,childrenIndex:a,route:e};i.relativePath.startsWith("/")&&(O(i.relativePath.startsWith(n),'Absolute route path "'+i.relativePath+'" nested under path "'+n+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),i.relativePath=i.relativePath.slice(n.length));var u=de([n,i.relativePath]),s=r.concat(i);e.children&&e.children.length>0&&(O(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+u+'".'),V(e.children,t,s,u)),(null!=e.path||e.index)&&t.push({path:u,score:te(u,e.index),routesMeta:s})};return e.forEach(function(e,t){var r;if(""!==e.path&&null!=(r=e.path)&&r.includes("?")){var n=!0,o=!1,i=void 0;try{for(var u,s=J(e.path)[Symbol.iterator]();!(n=(u=s.next()).done);n=!0){var c=u.value;a(e,t,c)}}catch(e){o=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(o)throw i}}}else a(e,t)}),t}function J(e){var t,r=e.split("/");if(0===r.length)return[];var n,a=s(n=r)||y(n)||R(n)||b(),o=a[0],i=a.slice(1),u=o.endsWith("?"),c=o.replace(/\?$/,"");if(0===i.length)return u?[c,""]:[c];var l,f=J(i.join("/")),d=[];return(t=d).push.apply(t,S(f.map(function(e){return""===e?c:[c,e].join("/")}))),u&&(l=d).push.apply(l,S(f)),d.map(function(t){return e.startsWith("/")&&""===t?"/":t})}var q=/^:[\w-]+$/,Y=3,X=2,G=1,Q=10,Z=-2,ee=function(e){return"*"===e};function te(e,t){var r=e.split("/"),n=r.length;return r.some(ee)&&(n+=Z),t&&(n+=X),r.filter(function(e){return!ee(e)}).reduce(function(e,t){return e+(q.test(t)?Y:""===t?G:Q)},n)}function re(e,t,r){void 0===r&&(r=!1);for(var n=e.routesMeta,a={},o="/",i=[],u=0;u<n.length;++u){var s=n[u],c=u===n.length-1,l="/"===o?t:t.slice(o.length)||"/",f=ae({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l),d=s.route;if(!f&&c&&r&&!n[n.length-1].route.index&&(f=ae({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!f)return null;Object.assign(a,f.params),i.push({params:a,pathname:de([o,f.pathname]),pathnameBase:he(de([o,f.pathnameBase])),route:d}),"/"!==f.pathnameBase&&(o=de([o,f.pathnameBase]))}return i}function ne(e,t){void 0===t&&(t={});var r=e;r.endsWith("*")&&"*"!==r&&!r.endsWith("/*")&&(M(!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(/\*$/,"/*"));var n=r.startsWith("/")?"/":"",a=function(e){return null==e?"":"string"==typeof e?e:String(e)};return n+r.split(/\/+/).map(function(e,r,n){if(r===n.length-1&&"*"===e)return a(t["*"]);var o=e.match(/^:([\w-]+)(\??)$/);if(o){var i=w(o,3),u=i[1],s=i[2],c=t[u];return O("?"===s||null!=c,'Missing ":'+u+'" param'),a(c)}return e.replace(/\?$/g,"")}).filter(function(e){return!!e}).join("/")}function ae(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});var r=w(function(e,t,r){void 0===t&&(t=!1),void 0===r&&(r=!0),M("*"===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(/\*$/,"/*")+'".');var n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,function(e,t,r){return n.push({paramName:t,isOptional:null!=r}),r?"/?([^\\/]+)?":"/([^\\/]+)"});return e.endsWith("*")?(n.push({paramName:"*"}),a+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":""!==e&&"/"!==e&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}(e.path,e.caseSensitive,e.end),2),n=r[0],a=r[1],o=t.match(n);if(!o)return null;var i=o[0],u=i.replace(/(.)\/+$/,"$1"),s=o.slice(1);return{params:a.reduce(function(e,t,r){var n=t.paramName,a=t.isOptional;if("*"===n){var o=s[r]||"";u=i.slice(0,i.length-o.length).replace(/(.)\/+$/,"$1")}var c=s[r];return e[n]=a&&!c?void 0:(c||"").replace(/%2F/g,"/"),e},{}),pathname:i,pathnameBase:u,pattern:e}}function oe(e){try{return e.split("/").map(function(e){return decodeURIComponent(e).replace(/\//g,"%2F")}).join("/")}catch(t){return M(!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 ie(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;var r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&"/"!==n?null:e.slice(r)||"/"}function ue(e,t){void 0===t&&(t="/");var r="string"==typeof e?N(e):e,n=r.pathname,a=r.search,o=void 0===a?"":a,i=r.hash,u=void 0===i?"":i,s=n?n.startsWith("/")?n:function(e,t){var r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(function(e){".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)}),r.length>1?r.join("/"):"/"}(n,t):t;return{pathname:s,search:ve(o),hash:pe(u)}}function se(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 ce(e){return e.filter(function(e,t){return 0===t||e.route.path&&e.route.path.length>0})}function le(e,t){var r=ce(e);return t?r.map(function(e,t){return t===r.length-1?e.pathname:e.pathnameBase}):r.map(function(e){return e.pathnameBase})}function fe(e,t,r,n){var a;void 0===n&&(n=!1),"string"==typeof e?a=N(e):(O(!(a=D({},e)).pathname||!a.pathname.includes("?"),se("?","pathname","search",a)),O(!a.pathname||!a.pathname.includes("#"),se("#","pathname","hash",a)),O(!a.search||!a.search.includes("#"),se("#","search","hash",a)));var o,i=""===e||""===a.pathname,u=i?"/":a.pathname;if(null==u)o=r;else{var s=t.length-1;if(!n&&u.startsWith("..")){for(var c=u.split("/");".."===c[0];)c.shift(),s-=1;a.pathname=c.join("/")}o=s>=0?t[s]:"/"}var l=ue(a,o),f=u&&"/"!==u&&u.endsWith("/"),d=(i||"."===u)&&r.endsWith("/");return l.pathname.endsWith("/")||!f&&!d||(l.pathname+="/"),l}var de=function(e){return e.join("/").replace(/\/\/+/g,"/")},he=function(e){return e.replace(/\/+$/,"").replace(/^\/*/,"/")},ve=function(e){return e&&"?"!==e?e.startsWith("?")?e:"?"+e:""},pe=function(e){return e&&"#"!==e?e.startsWith("#")?e:"#"+e:""},me=function(e,t){void 0===t&&(t={});var r="number"==typeof t?{status:t}:t,n=new Headers(r.headers);return n.has("Content-Type")||n.set("Content-Type","application/json; charset=utf-8"),new Response(JSON.stringify(e),D({},r,{headers:n}))},ye=function(e){function t(){return f(this,t),e=this,n=arguments,r=p(r=t),a=e,!(o=k()?Reflect.construct(r,n||[],p(e).constructor):r.apply(e,n))||"object"!==E(o)&&"function"!=typeof o?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(a):o;var e,r,n,a,o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&g(e,t)}(t,e),t}(x(Error)),be=function(){function e(t,r){var n,a=this;f(this,e),this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],O(t&&"object"===(void 0===t?"undefined":E(t))&&!Array.isArray(t),"defer() only accepts plain objects"),this.abortPromise=new Promise(function(e,t){return n=t}),this.controller=new AbortController;var o=function(){return n(new ye("Deferred data aborted"))};this.unlistenAbortSignal=function(){return a.controller.signal.removeEventListener("abort",o)},this.controller.signal.addEventListener("abort",o),this.data=Object.entries(t).reduce(function(e,t){var r=w(t,2),n=r[0],o=r[1];return Object.assign(e,v({},n,a.trackPromise(n,o)))},{}),this.done&&this.unlistenAbortSignal(),this.init=r}var t,r;return t=e,(r=[{key:"trackPromise",value:function(e,t){var r=this;if(!m(t,Promise))return t;this.deferredKeys.push(e),this.pendingKeysSet.add(e);var n=Promise.race([t,this.abortPromise]).then(function(t){return r.onSettle(n,e,void 0,t)},function(t){return r.onSettle(n,e,t)});return n.catch(function(){}),Object.defineProperty(n,"_tracked",{get:function(){return!0}}),n}},{key:"onSettle",value:function(e,t,r,n){if(this.controller.signal.aborted&&m(r,ye))return this.unlistenAbortSignal(),Object.defineProperty(e,"_error",{get:function(){return r}}),Promise.reject(r);if(this.pendingKeysSet.delete(t),this.done&&this.unlistenAbortSignal(),void 0===r&&void 0===n){var a=new Error('Deferred data for key "'+t+'" resolved/rejected with `undefined`, you must resolve/reject with a value or `null`.');return Object.defineProperty(e,"_error",{get:function(){return a}}),this.emit(!1,t),Promise.reject(a)}return void 0===n?(Object.defineProperty(e,"_error",{get:function(){return r}}),this.emit(!1,t),Promise.reject(r)):(Object.defineProperty(e,"_data",{get:function(){return n}}),this.emit(!1,t),n)}},{key:"emit",value:function(e,t){this.subscribers.forEach(function(r){return r(e,t)})}},{key:"subscribe",value:function(e){var t=this;return this.subscribers.add(e),function(){return t.subscribers.delete(e)}}},{key:"cancel",value:function(){var e=this;this.controller.abort(),this.pendingKeysSet.forEach(function(t,r){return e.pendingKeysSet.delete(r)}),this.emit(!0)}},{key:"resolveData",value:function(e){return l(function(){var t,r,n;return C(this,function(a){switch(a.label){case 0:return t=this,r=!1,this.done?[3,2]:(n=function(){return t.cancel()},e.addEventListener("abort",n),[4,new Promise(function(r){t.subscribe(function(a){e.removeEventListener("abort",n),(a||t.done)&&r(a)})})]);case 1:r=a.sent(),a.label=2;case 2:return[2,r]}})}).call(this)}},{key:"done",get:function(){return 0===this.pendingKeysSet.size}},{key:"unwrappedData",get:function(){return O(null!==this.data&&this.done,"Can only unwrap data on initialized and settled deferreds"),Object.entries(this.data).reduce(function(e,t){var r=w(t,2),n=r[0],a=r[1];return Object.assign(e,v({},n,function(e){if(!function(e){return m(e,Promise)&&!0===e._tracked}(e))return e;if(e._error)throw e._error;return e._data}(a)))},{})}},{key:"pendingKeys",get:function(){return Array.from(this.pendingKeysSet)}}])&&h(t.prototype,r),e}(),ge=function(e,t){return void 0===t&&(t={}),new be(e,"number"==typeof t?{status:t}:t)},we=function(e,t){void 0===t&&(t=302);var r=t;"number"==typeof r?r={status:r}:void 0===r.status&&(r.status=302);var n=new Headers(r.headers);return n.set("Location",e),new Response(null,D({},r,{headers:n}))},Se=function(e,t){var r=we(e,t);return r.headers.set("X-Remix-Reload-Document","true"),r},Ee=function(e,t){var r=we(e,t);return r.headers.set("X-Remix-Replace","true"),r},Re=function e(t,r,n,a){f(this,e),void 0===a&&(a=!1),this.status=t,this.statusText=r||"",this.internal=a,m(n,Error)?(this.data=n.toString(),this.error=n):this.data=n};function xe(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}var ke=["post","put","patch","delete"],Ce=new Set(ke),Pe=["get"].concat(S(ke)),De=new Set(Pe),Le=new Set([301,302,303,307,308]),_e=new Set([307,308]),Ae={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Te={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},je={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Oe=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Me=function(e){return{hasErrorBoundary:Boolean(e.hasErrorBoundary)}},Ue="remix-router-transitions";function Fe(e){var t,r=e.window?e.window:"undefined"!=typeof window?window:void 0,a=void 0!==r&&void 0!==r.document&&void 0!==r.document.createElement,o=!a;if(O(e.routes.length>0,"You must provide a non-empty routes array to createRouter"),e.mapRouteProperties)t=e.mapRouteProperties;else if(e.detectErrorBoundary){var i=e.detectErrorBoundary;t=function(e){return{hasErrorBoundary:i(e)}}}else t=Me;var u,s,c,f={},d=H(e.routes,t,void 0,f),h=e.basename||"/",p=e.dataStrategy||Je,y=e.patchRoutesOnNavigation,b=D({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),g=null,R=new Set,x=null,k=null,_=null,A=null!=e.hydrationData,T=W(d,e.history.location,h),j=!1,U=null;if(null==T&&!y){var I=it(404,{pathname:e.history.location.pathname}),N=ot(d);T=N.matches,U=v({},N.route.id,I)}if(T&&!e.hydrationData&&Lt(T,d,e.history.location.pathname).active&&(T=null),T)if(T.some(function(e){return e.route.lazy}))s=!1;else if(T.some(function(e){return e.route.loader}))if(b.v7_partialHydration){var B=e.hydrationData?e.hydrationData.loaderData:null,z=e.hydrationData?e.hydrationData.errors:null;if(z){var V=T.findIndex(function(e){return void 0!==z[e.route.id]});s=T.slice(0,V+1).every(function(e){return!He(e.route,B,z)})}else s=T.every(function(e){return!He(e.route,B,z)})}else s=null!=e.hydrationData;else s=!0;else if(s=!1,T=[],b.v7_partialHydration){var J=Lt(null,d,e.history.location.pathname);J.active&&J.matches&&(j=!0,T=J.matches)}var q,Y={historyAction:e.history.action,location:e.history.location,matches:T,initialized:s,navigation:Ae,restoreScrollPosition:null==e.hydrationData&&null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||U,fetchers:new Map,blockers:new Map},X=n.Pop,G=!1,Q=!1,Z=new Map,ee=null,te=!1,re=!1,ne=[],ae=new Set,oe=new Map,ue=0,se=-1,ce=new Map,le=new Set,fe=new Map,de=new Map,he=new Set,ve=new Map,pe=new Map,me=void 0;function ye(e,t){void 0===t&&(t={}),Y=D({},Y,e);var r=[],n=[];b.v7_fetcherPersist&&Y.fetchers.forEach(function(e,t){"idle"===e.state&&(he.has(t)?n.push(t):r.push(t))}),he.forEach(function(e){Y.fetchers.has(e)||oe.has(e)||n.push(e)}),S(R).forEach(function(e){return e(Y,{deletedFetchers:n,viewTransitionOpts:t.viewTransitionOpts,flushSync:!0===t.flushSync})}),b.v7_fetcherPersist?(r.forEach(function(e){return Y.fetchers.delete(e)}),n.forEach(function(e){return Ke(e)})):n.forEach(function(e){return he.delete(e)})}function be(t,r,a){var o,i,s,c=(void 0===a?{}:a).flushSync,l=null!=Y.actionData&&null!=Y.navigation.formMethod&&vt(Y.navigation.formMethod)&&"loading"===Y.navigation.state&&!0!==(null==(o=t.state)?void 0:o._isRedirect);s=r.actionData?Object.keys(r.actionData).length>0?r.actionData:null:l?Y.actionData:null;var f=r.loaderData?rt(Y.loaderData,r.loaderData,r.matches||[],r.errors):Y.loaderData,h=Y.blockers;h.size>0&&(h=new Map(h)).forEach(function(e,t){return h.set(t,je)});var v,p=!0===G||null!=Y.navigation.formMethod&&vt(Y.navigation.formMethod)&&!0!==(null==(i=t.state)?void 0:i._isRedirect);if(u&&(d=u,u=void 0),te||X===n.Pop||(X===n.Push?e.history.push(t,t.state):X===n.Replace&&e.history.replace(t,t.state)),X===n.Pop){var m=Z.get(Y.location.pathname);m&&m.has(t.pathname)?v={currentLocation:Y.location,nextLocation:t}:Z.has(t.pathname)&&(v={currentLocation:t,nextLocation:Y.location})}else if(Q){var y=Z.get(Y.location.pathname);y?y.add(t.pathname):(y=new Set([t.pathname]),Z.set(Y.location.pathname,y)),v={currentLocation:Y.location,nextLocation:t}}ye(D({},r,{actionData:s,loaderData:f,historyAction:X,location:t,initialized:!0,navigation:Ae,revalidation:"idle",restoreScrollPosition:Dt(t,r.matches||Y.matches),preventScrollReset:p,blockers:h}),{viewTransitionOpts:v,flushSync:!0===c}),X=n.Pop,G=!1,Q=!1,te=!1,re=!1,ne=[]}function ge(t,r,n){return l(function(){var a,o,i,s,c,l,f,p,m,y,b,g,S,E,R,k,P,A,T,O;return C(this,function(C){switch(C.label){case 0:return q&&q.abort(),q=null,X=t,te=!0===(n&&n.startUninterruptedRevalidation),function(e,t){if(x&&_){var r=Pt(e,t);x[r]=_()}}(Y.location,Y.matches),G=!0===(n&&n.preventScrollReset),Q=!0===(n&&n.enableViewTransition),a=u||d,o=n&&n.overrideNavigation,i=null!=n&&n.initialHydration&&Y.matches&&Y.matches.length>0&&!j?Y.matches:W(a,r,h),s=!0===(n&&n.flushSync),!i||!Y.initialized||re||(M=Y.location,U=r,M.pathname!==U.pathname||M.search!==U.search||(""===M.hash||M.hash!==U.hash)&&""===U.hash)||n&&n.submission&&vt(n.submission.formMethod)?((c=Lt(i,a,r.pathname)).active&&c.matches&&(i=c.matches),i?(q=new AbortController,y=Qe(e.history,r,q.signal,n&&n.submission),n&&n.pendingError?(b=[at(i).route.id,{type:L.error,error:n.pendingError}],[3,3]):[3,1]):(l=kt(r.pathname),f=l.error,p=l.notFoundMatches,m=l.route,be(r,{matches:p,loaderData:{},errors:v({},m.id,f)},{flushSync:s}),[2])):(be(r,{matches:i},{flushSync:s}),[2]);case 1:return n&&n.submission&&vt(n.submission.formMethod)?[4,we(y,r,n.submission,i,c.active,{replace:n.replace,flushSync:s})]:[3,3];case 2:if((g=C.sent()).shortCircuited)return[2];if(g.pendingActionResult&&(S=w(g.pendingActionResult,2),E=S[0],lt(R=S[1])&&xe(R.error)&&404===R.error.status))return q=null,be(r,{matches:g.matches,loaderData:{},errors:v({},E,R.error)}),[2];i=g.matches||i,b=g.pendingActionResult,o=St(r,n.submission),s=!1,c.active=!1,y=Qe(e.history,y.url,y.signal),C.label=3;case 3:return[4,Se(y,r,i,c.active,o,n&&n.submission,n&&n.fetcherSubmission,n&&n.replace,n&&!0===n.initialHydration,s,b)];case 4:return k=C.sent(),P=k.shortCircuited,A=k.matches,T=k.loaderData,O=k.errors,P||(q=null,be(r,D({matches:A||i},nt(b),{loaderData:T,errors:O}))),[2]}var M,U})})()}function we(e,t,r,a,o,i){return l(function(){var u,s,c,l,f,d,v,p,m,y,b,g,w;return C(this,function(S){switch(S.label){case 0:return void 0===i&&(i={}),De(),u=function(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}}(t,r),ye({navigation:u},{flushSync:!0===i.flushSync}),o?[4,_t(a,t.pathname,e.signal)]:[3,2];case 1:if("aborted"===(s=S.sent()).type)return[2,{shortCircuited:!0}];if("error"===s.type)return c=at(s.partialMatches).route.id,[2,{matches:s.partialMatches,pendingActionResult:[c,{type:L.error,error:s.error}]}];if(!s.matches)return l=kt(t.pathname),f=l.notFoundMatches,d=l.error,v=l.route,[2,{matches:f,pendingActionResult:[v.id,{type:L.error,error:d}]}];a=s.matches,S.label=2;case 2:return(m=gt(a,t)).route.action||m.route.lazy?[3,3]:(p={type:L.error,error:it(405,{method:e.method,pathname:t.pathname,routeId:m.route.id})},[3,5]);case 3:return[4,Ce("action",Y,e,[m],a,null)];case 4:if(y=S.sent(),p=y[m.route.id],e.signal.aborted)return[2,{shortCircuited:!0}];S.label=5;case 5:return ft(p)?(i&&null!=i.replace?b=i.replace:(g=Ge(p.response.headers.get("Location"),new URL(e.url),h),b=g===Y.location.pathname+Y.location.search),[4,ke(e,p,!0,{submission:r,replace:b})]):[3,7];case 6:return S.sent(),[2,{shortCircuited:!0}];case 7:if(ct(p))throw it(400,{type:"defer-action"});return lt(p)?(w=at(a,m.route.id),!0!==(i&&i.replace)&&(X=n.Push),[2,{matches:a,pendingActionResult:[w.route.id,p]}]):[2,{matches:a,pendingActionResult:[m.route.id,p]}]}})})()}function Se(t,r,n,a,o,i,s,c,f,p,m){return l(function(){var l,y,g,S,E,R,x,k,P,L,_,A,T,j,O,M,U,F,I,N,B,z,H,W,K,$,V,J;return C(this,function(C){switch(C.label){case 0:return l=o||St(r,i),y=i||s||wt(l),g=!(te||b.v7_partialHydration&&f),a?(g&&(S=Ee(m),ye(D({navigation:l},void 0!==S?{actionData:S}:{}),{flushSync:p})),[4,_t(n,r.pathname,t.signal)]):[3,2];case 1:if("aborted"===(E=C.sent()).type)return[2,{shortCircuited:!0}];if("error"===E.type)return R=at(E.partialMatches).route.id,[2,{matches:E.partialMatches,loaderData:{},errors:v({},R,E.error)}];if(!E.matches)return x=kt(r.pathname),k=x.error,P=x.notFoundMatches,L=x.route,[2,{matches:P,loaderData:{},errors:v({},L.id,k)}];n=E.matches,C.label=2;case 2:return _=u||d,A=w(ze(e.history,Y,n,y,r,b.v7_partialHydration&&!0===f,b.v7_skipActionErrorRevalidation,re,ne,ae,he,fe,le,_,h,m),2),T=A[0],j=A[1],Ct(function(e){return!(n&&n.some(function(t){return t.route.id===e}))||T&&T.some(function(t){return t.route.id===e})}),se=++ue,0===T.length&&0===j.length?(O=Ze(),be(r,D({matches:n,loaderData:{},errors:m&&lt(m[1])?v({},m[0],m[1].error):null},nt(m),O?{fetchers:new Map(Y.fetchers)}:{}),{flushSync:p}),[2,{shortCircuited:!0}]):(g&&(M={},a||(M.navigation=l,void 0!==(U=Ee(m))&&(M.actionData=U)),j.length>0&&(M.fetchers=function(e){return e.forEach(function(e){var t=Y.fetchers.get(e.key),r=Et(void 0,t?t.data:void 0);Y.fetchers.set(e.key,r)}),new Map(Y.fetchers)}(j)),ye(M,{flushSync:p})),j.forEach(function(e){Ve(e.key),e.controller&&oe.set(e.key,e.controller)}),F=function(){return j.forEach(function(e){return Ve(e.key)})},q&&q.signal.addEventListener("abort",F),[4,Pe(Y,n,T,j,t)]);case 3:return I=C.sent(),N=I.loaderResults,B=I.fetcherResults,t.signal.aborted?[2,{shortCircuited:!0}]:(q&&q.signal.removeEventListener("abort",F),j.forEach(function(e){return oe.delete(e.key)}),(z=ut(N))?[4,ke(t,z.result,!0,{replace:c})]:[3,5]);case 4:return C.sent(),[2,{shortCircuited:!0}];case 5:return(z=ut(B))?(le.add(z.key),[4,ke(t,z.result,!0,{replace:c})]):[3,7];case 6:return C.sent(),[2,{shortCircuited:!0}];case 7:return H=tt(Y,n,N,m,j,B,ve),W=H.loaderData,K=H.errors,ve.forEach(function(e,t){e.subscribe(function(r){(r||e.done)&&ve.delete(t)})}),b.v7_partialHydration&&f&&Y.errors&&(K=D({},Y.errors,K)),$=Ze(),V=et(se),J=$||V||j.length>0,[2,D({matches:n,loaderData:W,errors:K},J?{fetchers:new Map(Y.fetchers)}:{})]}})})()}function Ee(e){return e&&!lt(e[1])?v({},e[0],e[1].data):Y.actionData?0===Object.keys(Y.actionData).length?null:Y.actionData:void 0}function ke(t,o,i,u){return l(function(){var s,c,l,f,d,v,p,m,y,b,g,w,S,E,R,x;return C(this,function(k){switch(k.label){case 0:return c=(s=void 0===u?{}:u).submission,l=s.fetcherSubmission,f=s.preventScrollReset,d=s.replace,o.response.headers.has("X-Remix-Revalidate")&&(re=!0),O(v=o.response.headers.get("Location"),"Expected a Location header on the redirect Response"),v=Ge(v,new URL(t.url),h),p=F(Y.location,v,{_isRedirect:!0}),a&&(m=!1,o.response.headers.has("X-Remix-Reload-Document")?m=!0:Oe.test(v)&&(y=e.history.createURL(v),m=y.origin!==r.location.origin||null==ie(y.pathname,h)),m)?(d?r.location.replace(v):r.location.assign(v),[2]):(q=null,b=!0===d||o.response.headers.has("X-Remix-Replace")?n.Replace:n.Push,g=Y.navigation,w=g.formMethod,S=g.formAction,E=g.formEncType,!c&&!l&&w&&S&&E&&(c=wt(Y.navigation)),R=c||l,_e.has(o.response.status)&&R&&vt(R.formMethod)?[4,ge(b,p,{submission:D({},R,{formAction:v}),preventScrollReset:f||G,enableViewTransition:i?Q:void 0})]:[3,2]);case 1:return k.sent(),[3,4];case 2:return x=St(p,c),[4,ge(b,p,{overrideNavigation:x,fetcherSubmission:l,preventScrollReset:f||G,enableViewTransition:i?Q:void 0})];case 3:k.sent(),k.label=4;case 4:return[2]}})})()}function Ce(e,r,n,a,o,i){return l(function(){var r,u,s,c,d,v,y,g,S,R,x,k,P;return C(this,function(D){switch(D.label){case 0:u={},D.label=1;case 1:return D.trys.push([1,3,,4]),[4,qe(p,e,0,n,a,o,i,f,t)];case 2:return r=D.sent(),[3,4];case 3:return s=D.sent(),a.forEach(function(e){u[e.route.id]={type:L.error,error:s}}),[2,u];case 4:c=!0,d=!1,v=void 0,D.label=5;case 5:D.trys.push([5,11,12,13]),y=Object.entries(r)[Symbol.iterator](),D.label=6;case 6:return(c=(g=y.next()).done)?[3,10]:(S=w(g.value,2),R=S[0],function(e){return ht(e.result)&&Le.has(e.result.status)}(x=S[1])?(k=x.result,u[R]={type:L.redirect,response:Xe(k,n,R,o,h,b.v7_relativeSplatPath)},[3,9]):[3,7]);case 7:return[4,(_=x,l(function(){var e,t,r,n,a,o,i,u,s,c,l,f,d;return C(this,function(h){switch(h.label){case 0:if(e=_.result,t=_.type,!ht(e))return[3,10];h.label=1;case 1:return h.trys.push([1,8,,9]),(n=e.headers.get("Content-Type"))&&/\bapplication\/json\b/.test(n)?null!=e.body?[3,2]:(r=null,[3,4]):[3,5];case 2:return[4,e.json()];case 3:r=h.sent(),h.label=4;case 4:return[3,7];case 5:return[4,e.text()];case 6:r=h.sent(),h.label=7;case 7:return[3,9];case 8:return a=h.sent(),[2,{type:L.error,error:a}];case 9:return t===L.error?[2,{type:L.error,error:new Re(e.status,e.statusText,r),statusCode:e.status,headers:e.headers}]:[2,{type:L.data,data:r,statusCode:e.status,headers:e.headers}];case 10:return t===L.error?dt(e)?m(e.data,Error)?[2,{type:L.error,error:e.data,statusCode:null==(u=e.init)?void 0:u.status,headers:null!=(s=e.init)&&s.headers?new Headers(e.init.headers):void 0}]:[2,{type:L.error,error:new Re((null==(o=e.init)?void 0:o.status)||500,void 0,e.data),statusCode:xe(e)?e.status:void 0,headers:null!=(i=e.init)&&i.headers?new Headers(e.init.headers):void 0}]:[2,{type:L.error,error:e,statusCode:xe(e)?e.status:void 0}]:(v=e)&&"object"===(void 0===v?"undefined":E(v))&&"object"===E(v.data)&&"function"==typeof v.subscribe&&"function"==typeof v.cancel&&"function"==typeof v.resolveData?[2,{type:L.deferred,deferredData:e,statusCode:null==(c=e.init)?void 0:c.status,headers:(null==(l=e.init)?void 0:l.headers)&&new Headers(e.init.headers)}]:dt(e)?[2,{type:L.data,data:e.data,statusCode:null==(f=e.init)?void 0:f.status,headers:null!=(d=e.init)&&d.headers?new Headers(e.init.headers):void 0}]:[2,{type:L.data,data:e}]}var v})})())];case 8:u[R]=D.sent(),D.label=9;case 9:return c=!0,[3,6];case 10:return[3,13];case 11:return P=D.sent(),d=!0,v=P,[3,13];case 12:try{c||null==y.return||y.return()}finally{if(d)throw v}return[7];case 13:return[2,u]}var _})})()}function Pe(t,r,n,a,o){return l(function(){var i,u,s,c,f;return C(this,function(d){switch(d.label){case 0:return i=t.matches,u=Ce("loader",0,o,n,r,null),s=Promise.all(a.map(function(t){return l(function(){var r,n;return C(this,function(a){switch(a.label){case 0:return t.matches&&t.match&&t.controller?[4,Ce("loader",0,Qe(e.history,t.path,t.controller.signal),[t.match],t.matches,t.key)]:[3,2];case 1:return r=a.sent(),n=r[t.match.route.id],[2,v({},t.key,n)];case 2:return[2,Promise.resolve(v({},t.key,{type:L.error,error:it(404,{pathname:t.path})}))];case 3:return[2]}})})()})),[4,u];case 1:return c=d.sent(),[4,s];case 2:return f=d.sent().reduce(function(e,t){return Object.assign(e,t)},{}),[4,Promise.all([pt(r,c,o.signal,i,t.loaderData),mt(r,f,a)])];case 3:return d.sent(),[2,{loaderResults:c,fetcherResults:f}]}})})()}function De(){var e;re=!0,(e=ne).push.apply(e,S(Ct())),fe.forEach(function(e,t){oe.has(t)&&ae.add(t),Ve(t)})}function Fe(e,t,r){void 0===r&&(r={}),Y.fetchers.set(e,t),ye({fetchers:new Map(Y.fetchers)},{flushSync:!0===(r&&r.flushSync)})}function Be(e,t,r,n){void 0===n&&(n={});var a=at(Y.matches,t);Ke(e),ye({errors:v({},a.route.id,r),fetchers:new Map(Y.fetchers)},{flushSync:!0===(n&&n.flushSync)})}function We(e){return de.set(e,(de.get(e)||0)+1),he.has(e)&&he.delete(e),Y.fetchers.get(e)||Te}function Ke(e){var t=Y.fetchers.get(e);!oe.has(e)||t&&"loading"===t.state&&ce.has(e)||Ve(e),fe.delete(e),ce.delete(e),le.delete(e),b.v7_fetcherPersist&&he.delete(e),ae.delete(e),Y.fetchers.delete(e)}function Ve(e){var t=oe.get(e);t&&(t.abort(),oe.delete(e))}function Ye(e){var t=!0,r=!1,n=void 0;try{for(var a,o=e[Symbol.iterator]();!(t=(a=o.next()).done);t=!0){var i=a.value,u=Rt(We(i).data);Y.fetchers.set(i,u)}}catch(e){r=!0,n=e}finally{try{t||null==o.return||o.return()}finally{if(r)throw n}}}function Ze(){var e=[],t=!1,r=!0,n=!1,a=void 0;try{for(var o,i=le[Symbol.iterator]();!(r=(o=i.next()).done);r=!0){var u=o.value,s=Y.fetchers.get(u);O(s,"Expected fetcher: "+u),"loading"===s.state&&(le.delete(u),e.push(u),t=!0)}}catch(e){n=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(n)throw a}}return Ye(e),t}function et(e){var t=[],r=!0,n=!1,a=void 0;try{for(var o,i=ce[Symbol.iterator]();!(r=(o=i.next()).done);r=!0){var u=w(o.value,2),s=u[0];if(u[1]<e){var c=Y.fetchers.get(s);O(c,"Expected fetcher: "+s),"loading"===c.state&&(Ve(s),ce.delete(s),t.push(s))}}}catch(e){n=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(n)throw a}}return Ye(t),t.length>0}function st(e){Y.blockers.delete(e),pe.delete(e)}function bt(e,t){var r=Y.blockers.get(e)||je;O("unblocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"proceeding"===t.state||"blocked"===r.state&&"unblocked"===t.state||"proceeding"===r.state&&"unblocked"===t.state,"Invalid blocker state transition: "+r.state+" -> "+t.state);var n=new Map(Y.blockers);n.set(e,t),ye({blockers:n})}function xt(e){var t=e.currentLocation,r=e.nextLocation,n=e.historyAction;if(0!==pe.size){pe.size>1&&M(!1,"A router only supports one blocker at a time");var a=Array.from(pe.entries()),o=w(a[a.length-1],2),i=o[0],u=o[1],s=Y.blockers.get(i);if(!s||"proceeding"!==s.state)return u({currentLocation:t,nextLocation:r,historyAction:n})?i:void 0}}function kt(e){var t=it(404,{pathname:e}),r=ot(u||d),n=r.matches,a=r.route;return Ct(),{notFoundMatches:n,route:a,error:t}}function Ct(e){var t=[];return ve.forEach(function(r,n){e&&!e(n)||(r.cancel(),t.push(n),ve.delete(n))}),t}function Pt(e,t){return k&&k(e,t.map(function(e){return $(e,Y.loaderData)}))||e.key}function Dt(e,t){if(x){var r=Pt(e,t),n=x[r];if("number"==typeof n)return n}return null}function Lt(e,t,r){if(y){if(!e)return{active:!0,matches:K(t,r,h,!0)||[]};if(Object.keys(e[0].params).length>0)return{active:!0,matches:K(t,r,h,!0)}}return{active:!1,matches:null}}function _t(e,r,n,a){return l(function(){var o,i,s;return C(this,function(c){switch(c.label){case 0:if(o=function(){var e,o,s,c,l;return C(this,function(v){switch(v.label){case 0:e=null==u,o=u||d,s=f,v.label=1;case 1:return v.trys.push([1,3,4,5]),[4,y({signal:n,path:r,matches:i,fetcherKey:a,patch:function(e,r){n.aborted||$e(e,r,o,s,t)}})];case 2:return v.sent(),[3,5];case 3:return[2,{v:{type:"error",error:v.sent(),partialMatches:i}}];case 4:return e&&!n.aborted&&(d=S(d)),[7];case 5:return n.aborted?[2,{v:{type:"aborted"}}]:(c=W(o,r,h))?[2,{v:{type:"success",matches:c}}]:!(l=K(o,r,h,!0))||i.length===l.length&&i.every(function(e,t){return e.route.id===l[t].route.id})?[2,{v:{type:"success",matches:null}}]:(i=l,[2])}})},!y)return[2,{type:"success",matches:e}];i=e,c.label=1;case 1:return[5,P(o())];case 2:return"object"===E(s=c.sent())?[2,s.v]:[3,1];case 3:return[2]}})})()}return c={get basename(){return h},get future(){return b},get state(){return Y},get routes(){return d},get window(){return r},initialize:function(){if(g=e.history.listen(function(t){var r=t.action,n=t.location,a=t.delta;if(me)return me(),void(me=void 0);M(0===pe.size||null!=a,"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.");var o=xt({currentLocation:Y.location,nextLocation:n,historyAction:r});if(o&&null!=a){var i=new Promise(function(e){me=e});return e.history.go(-1*a),void bt(o,{state:"blocked",location:n,proceed:function(){bt(o,{state:"proceeding",proceed:void 0,reset:void 0,location:n}),i.then(function(){return e.history.go(a)})},reset:function(){var e=new Map(Y.blockers);e.set(o,je),ye({blockers:e})}})}return ge(r,n)}),a){!function(e,t){try{var r=e.sessionStorage.getItem(Ue);if(r){var n=JSON.parse(r),a=!0,o=!1,i=void 0;try{for(var u,s=Object.entries(n||{})[Symbol.iterator]();!(a=(u=s.next()).done);a=!0){var c=w(u.value,2),l=c[0],f=c[1];f&&Array.isArray(f)&&t.set(l,new Set(f||[]))}}catch(e){o=!0,i=e}finally{try{a||null==s.return||s.return()}finally{if(o)throw i}}}}catch(e){}}(r,Z);var t=function(){return function(e,t){if(t.size>0){var r={},n=!0,a=!1,o=void 0;try{for(var i,u=t[Symbol.iterator]();!(n=(i=u.next()).done);n=!0){var s=w(i.value,2),c=s[0],l=s[1];r[c]=S(l)}}catch(e){a=!0,o=e}finally{try{n||null==u.return||u.return()}finally{if(a)throw o}}try{e.sessionStorage.setItem(Ue,JSON.stringify(r))}catch(e){M(!1,"Failed to save applied view transitions in sessionStorage ("+e+").")}}}(r,Z)};r.addEventListener("pagehide",t),ee=function(){return r.removeEventListener("pagehide",t)}}return Y.initialized||ge(n.Pop,Y.location,{initialHydration:!0}),c},subscribe:function(e){return R.add(e),function(){return R.delete(e)}},enableScrollRestoration:function(e,t,r){if(x=e,_=t,k=r||null,!A&&Y.navigation===Ae){A=!0;var n=Dt(Y.location,Y.matches);null!=n&&ye({restoreScrollPosition:n})}return function(){x=null,_=null,k=null}},navigate:function t(r,a){return l(function(){var o,i,u,s,c,l,f,d,v,p,m,y;return C(this,function(g){switch(g.label){case 0:return"number"==typeof r?(e.history.go(r),[2]):(o=Ie(Y.location,Y.matches,h,b.v7_prependBasename,r,b.v7_relativeSplatPath,null==a?void 0:a.fromRouteId,null==a?void 0:a.relative),i=Ne(b.v7_normalizeFormMethod,!1,o,a),u=i.path,s=i.submission,c=i.error,l=Y.location,f=D({},f=F(Y.location,u,a&&a.state),e.history.encodeLocation(f)),d=a&&null!=a.replace?a.replace:void 0,v=n.Push,!0===d?v=n.Replace:!1===d||null!=s&&vt(s.formMethod)&&s.formAction===Y.location.pathname+Y.location.search&&(v=n.Replace),p=a&&"preventScrollReset"in a?!0===a.preventScrollReset:void 0,m=!0===(a&&a.flushSync),(y=xt({currentLocation:l,nextLocation:f,historyAction:v}))?(bt(y,{state:"blocked",location:f,proceed:function(){bt(y,{state:"proceeding",proceed:void 0,reset:void 0,location:f}),t(r,a)},reset:function(){var e=new Map(Y.blockers);e.set(y,je),ye({blockers:e})}}),[2]):[4,ge(v,f,{submission:s,pendingError:c,preventScrollReset:p,replace:a&&a.replace,enableViewTransition:a&&a.viewTransition,flushSync:m})]);case 1:return[2,g.sent()]}})})()},fetch:function(t,r,n,a){if(o)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.");Ve(t);var i=!0===(a&&a.flushSync),s=u||d,c=Ie(Y.location,Y.matches,h,b.v7_prependBasename,n,b.v7_relativeSplatPath,r,null==a?void 0:a.relative),f=W(s,c,h),v=Lt(f,s,c);if(v.active&&v.matches&&(f=v.matches),f){var p=Ne(b.v7_normalizeFormMethod,!0,c,a),m=p.path,y=p.submission,g=p.error;if(g)Be(t,r,g,{flushSync:i});else{var S=gt(f,m),E=!0===(a&&a.preventScrollReset);y&&vt(y.formMethod)?function(t,r,n,a,o,i,s,c,f){l(function(){var l,v,p,m,y,g,S,E,R,x,k,P,D,L,_,A,T,j,M,U,F,I,N,B,z;function H(e){if(!e.route.action&&!e.route.lazy){var a=it(405,{method:f.formMethod,pathname:n,routeId:r});return Be(t,r,a,{flushSync:s}),!0}return!1}return C(this,function(C){switch(C.label){case 0:return De(),fe.delete(t),!i&&H(a)?[2]:(l=Y.fetchers.get(t),Fe(t,function(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}}(f,l),{flushSync:s}),v=new AbortController,p=Qe(e.history,n,v.signal,f),i?[4,_t(o,new URL(p.url).pathname,p.signal,t)]:[3,2]);case 1:if("aborted"===(m=C.sent()).type)return[2];if("error"===m.type)return Be(t,r,m.error,{flushSync:s}),[2];if(!m.matches)return Be(t,r,it(404,{pathname:n}),{flushSync:s}),[2];if(o=m.matches,H(a=gt(o,n)))return[2];C.label=2;case 2:return oe.set(t,v),y=ue,[4,Ce("action",0,p,[a],o,t)];case 3:if(g=C.sent(),S=g[a.route.id],p.signal.aborted)return oe.get(t)===v&&oe.delete(t),[2];if(b.v7_fetcherPersist&&he.has(t)){if(ft(S)||lt(S))return Fe(t,Rt(void 0)),[2]}else{if(ft(S))return oe.delete(t),se>y?(Fe(t,Rt(void 0)),[2]):(le.add(t),Fe(t,Et(f)),[2,ke(p,S,!1,{fetcherSubmission:f,preventScrollReset:c})]);if(lt(S))return Be(t,r,S.error),[2]}if(ct(S))throw it(400,{type:"defer-action"});return E=Y.navigation.location||Y.location,R=Qe(e.history,E,v.signal),x=u||d,O(k="idle"!==Y.navigation.state?W(x,Y.navigation.location,h):Y.matches,"Didn't find any matches after fetcher action"),P=++ue,ce.set(t,P),D=Et(f,S.data),Y.fetchers.set(t,D),L=w(ze(e.history,Y,k,f,E,!1,b.v7_skipActionErrorRevalidation,re,ne,ae,he,fe,le,x,h,[a.route.id,S]),2),_=L[0],(A=L[1]).filter(function(e){return e.key!==t}).forEach(function(e){var t=e.key,r=Y.fetchers.get(t),n=Et(void 0,r?r.data:void 0);Y.fetchers.set(t,n),Ve(t),e.controller&&oe.set(t,e.controller)}),ye({fetchers:new Map(Y.fetchers)}),T=function(){return A.forEach(function(e){return Ve(e.key)})},v.signal.addEventListener("abort",T),[4,Pe(Y,k,_,A,R)];case 4:return j=C.sent(),M=j.loaderResults,U=j.fetcherResults,v.signal.aborted?[2]:(v.signal.removeEventListener("abort",T),ce.delete(t),oe.delete(t),A.forEach(function(e){return oe.delete(e.key)}),(F=ut(M))?[2,ke(R,F.result,!1,{preventScrollReset:c})]:(F=ut(U))?(le.add(F.key),[2,ke(R,F.result,!1,{preventScrollReset:c})]):(I=tt(Y,k,M,void 0,A,U,ve),N=I.loaderData,B=I.errors,Y.fetchers.has(t)&&(z=Rt(S.data),Y.fetchers.set(t,z)),et(P),"loading"===Y.navigation.state&&P>se?(O(X,"Expected pending action"),q&&q.abort(),be(Y.navigation.location,{matches:k,loaderData:N,errors:B,fetchers:new Map(Y.fetchers)})):(ye({errors:B,loaderData:rt(Y.loaderData,N,k,B),fetchers:new Map(Y.fetchers)}),re=!1),[2]))}})})()}(t,r,m,S,f,v.active,i,E,y):(fe.set(t,{routeId:r,path:m}),function(t,r,n,a,o,i,u,s,c){l(function(){var l,f,d,h,v,p,m;return C(this,function(y){switch(y.label){case 0:return l=Y.fetchers.get(t),Fe(t,Et(c,l?l.data:void 0),{flushSync:u}),f=new AbortController,d=Qe(e.history,n,f.signal),i?[4,_t(o,new URL(d.url).pathname,d.signal,t)]:[3,2];case 1:if("aborted"===(h=y.sent()).type)return[2];if("error"===h.type)return Be(t,r,h.error,{flushSync:u}),[2];if(!h.matches)return Be(t,r,it(404,{pathname:n}),{flushSync:u}),[2];o=h.matches,a=gt(o,n),y.label=2;case 2:return oe.set(t,f),v=ue,[4,Ce("loader",0,d,[a],o,t)];case 3:return p=y.sent(),ct(m=p[a.route.id])?[4,yt(m,d.signal,!0)]:[3,5];case 4:m=y.sent()||m,y.label=5;case 5:return oe.get(t)===f&&oe.delete(t),d.signal.aborted?[2]:he.has(t)?(Fe(t,Rt(void 0)),[2]):ft(m)?se>v?(Fe(t,Rt(void 0)),[2]):[3,6]:[3,8];case 6:return le.add(t),[4,ke(d,m,!1,{preventScrollReset:s})];case 7:return y.sent(),[2];case 8:return lt(m)?(Be(t,r,m.error),[2]):(O(!ct(m),"Unhandled fetcher deferred data"),Fe(t,Rt(m.data)),[2])}})})()}(t,r,m,S,f,v.active,i,E,y))}}else Be(t,r,it(404,{pathname:c}),{flushSync:i})},revalidate:function(){De(),ye({revalidation:"loading"}),"submitting"!==Y.navigation.state&&("idle"!==Y.navigation.state?ge(X||Y.historyAction,Y.navigation.location,{overrideNavigation:Y.navigation,enableViewTransition:!0===Q}):ge(Y.historyAction,Y.location,{startUninterruptedRevalidation:!0}))},createHref:function(t){return e.history.createHref(t)},encodeLocation:function(t){return e.history.encodeLocation(t)},getFetcher:We,deleteFetcher:function(e){var t=(de.get(e)||0)-1;t<=0?(de.delete(e),he.add(e),b.v7_fetcherPersist||Ke(e)):de.set(e,t),ye({fetchers:new Map(Y.fetchers)})},dispose:function(){g&&g(),ee&&ee(),R.clear(),q&&q.abort(),Y.fetchers.forEach(function(e,t){return Ke(t)}),Y.blockers.forEach(function(e,t){return st(t)})},getBlocker:function(e,t){var r=Y.blockers.get(e)||je;return pe.get(e)!==t&&pe.set(e,t),r},deleteBlocker:st,patchRoutes:function(e,r){var n=null==u;$e(e,r,u||d,f,t),n&&(d=S(d),ye({}))},_internalFetchControllers:oe,_internalActiveDeferreds:ve,_internalSetRoutes:function(e){u=H(e,t,void 0,f={})}},c}function Ie(e,t,r,n,a,o,i,u){var s,c;if(i){s=[];var l=!0,f=!1,d=void 0;try{for(var h,v=t[Symbol.iterator]();!(l=(h=v.next()).done);l=!0){var p=h.value;if(s.push(p),p.route.id===i){c=p;break}}}catch(e){f=!0,d=e}finally{try{l||null==v.return||v.return()}finally{if(f)throw d}}}else s=t,c=t[t.length-1];var m=fe(a||".",le(s,o),ie(e.pathname,r)||e.pathname,"path"===u);if(null==a&&(m.search=e.search,m.hash=e.hash),(null==a||""===a||"."===a)&&c){var y=bt(m.search);if(c.route.index&&!y)m.search=m.search?m.search.replace(/^\?/,"?index&"):"?index";else if(!c.route.index&&y){var b=new URLSearchParams(m.search),g=b.getAll("index");b.delete("index"),g.filter(function(e){return e}).forEach(function(e){return b.append("index",e)});var w=b.toString();m.search=w?"?"+w:""}}return n&&"/"!==r&&(m.pathname="/"===m.pathname?r:de([r,m.pathname])),I(m)}function Ne(e,t,r,n){if(!n||!function(e){return null!=e&&("formData"in e&&null!=e.formData||"body"in e&&void 0!==e.body)}(n))return{path:r};if(n.formMethod&&(a=n.formMethod,!De.has(a.toLowerCase())))return{path:r,error:it(405,{method:n.formMethod})};var a,o,i,u=function(){return{path:r,error:it(400,{type:"invalid-body"})}},s=n.formMethod||"get",c=e?s.toUpperCase():s.toLowerCase(),l=st(r);if(void 0!==n.body){if("text/plain"===n.formEncType){if(!vt(c))return u();var f="string"==typeof n.body?n.body:m(n.body,FormData)||m(n.body,URLSearchParams)?Array.from(n.body.entries()).reduce(function(e,t){var r=w(t,2);return""+e+r[0]+"="+r[1]+"\n"},""):String(n.body);return{path:r,submission:{formMethod:c,formAction:l,formEncType:n.formEncType,formData:void 0,json:void 0,text:f}}}if("application/json"===n.formEncType){if(!vt(c))return u();try{var d="string"==typeof n.body?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:c,formAction:l,formEncType:n.formEncType,formData:void 0,json:d,text:void 0}}}catch(e){return u()}}}if(O("function"==typeof FormData,"FormData is not available in this environment"),n.formData)o=Ze(n.formData),i=n.formData;else if(m(n.body,FormData))o=Ze(n.body),i=n.body;else if(m(n.body,URLSearchParams))i=et(o=n.body);else if(null==n.body)o=new URLSearchParams,i=new FormData;else try{i=et(o=new URLSearchParams(n.body))}catch(e){return u()}var h={formMethod:c,formAction:l,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:i,json:void 0,text:void 0};if(vt(h.formMethod))return{path:r,submission:h};var v=N(r);return t&&v.search&&bt(v.search)&&o.append("index",""),v.search="?"+o,{path:I(v),submission:h}}function Be(e,t,r){void 0===r&&(r=!1);var n=e.findIndex(function(e){return e.route.id===t});return n>=0?e.slice(0,r?n+1:n):e}function ze(e,t,r,n,a,o,i,u,s,c,l,f,d,h,v,p){var m=p?lt(p[1])?p[1].error:p[1].data:void 0,y=e.createURL(t.location),b=e.createURL(a),g=r;o&&t.errors?g=Be(r,Object.keys(t.errors)[0],!0):p&&lt(p[1])&&(g=Be(r,p[0]));var w=p?p[1].statusCode:void 0,S=i&&w&&w>=400,E=g.filter(function(e,r){var a=e.route;if(a.lazy)return!0;if(null==a.loader)return!1;if(o)return He(a,t.loaderData,t.errors);if(function(e,t,r){var n=!t||r.route.id!==t.route.id,a=void 0===e[r.route.id];return n||a}(t.loaderData,t.matches[r],e)||s.some(function(t){return t===e.route.id}))return!0;var i=t.matches[r],c=e;return Ke(e,D({currentUrl:y,currentParams:i.params,nextUrl:b,nextParams:c.params},n,{actionResult:m,actionStatus:w,defaultShouldRevalidate:!S&&(u||y.pathname+y.search===b.pathname+b.search||y.search!==b.search||We(i,c))}))}),R=[];return f.forEach(function(e,a){if(!o&&r.some(function(t){return t.route.id===e.routeId})&&!l.has(a)){var i=W(h,e.path,v);if(i){var s=t.fetchers.get(a),f=gt(i,e.path),p=!1;d.has(a)?p=!1:c.has(a)?(c.delete(a),p=!0):p=s&&"idle"!==s.state&&void 0===s.data?u:Ke(f,D({currentUrl:y,currentParams:t.matches[t.matches.length-1].params,nextUrl:b,nextParams:r[r.length-1].params},n,{actionResult:m,actionStatus:w,defaultShouldRevalidate:!S&&u})),p&&R.push({key:a,routeId:e.routeId,path:e.path,matches:i,match:f,controller:new AbortController})}else R.push({key:a,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null})}}),[E,R]}function He(e,t,r){if(e.lazy)return!0;if(!e.loader)return!1;var n=null!=t&&void 0!==t[e.id],a=null!=r&&void 0!==r[e.id];return!(!n&&a)&&("function"==typeof e.loader&&!0===e.loader.hydrate||!n&&!a)}function We(e,t){var r=e.route.path;return e.pathname!==t.pathname||null!=r&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function Ke(e,t){if(e.route.shouldRevalidate){var r=e.route.shouldRevalidate(t);if("boolean"==typeof r)return r}return t.defaultShouldRevalidate}function $e(e,t,r,n,a){var o,i,u;if(e){var s=n[e];O(s,"No route found to patch children into: routeId = "+e),s.children||(s.children=[]),u=s.children}else u=r;var c=H(t.filter(function(e){return!u.some(function(t){return Ve(e,t)})}),a,[e||"_","patch",String((null==(i=u)?void 0:i.length)||"0")],n);(o=u).push.apply(o,S(c))}function Ve(e,t){return"id"in e&&"id"in t&&e.id===t.id||e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive&&(!(e.children&&0!==e.children.length||t.children&&0!==t.children.length)||e.children.every(function(e,r){var n;return null==(n=t.children)?void 0:n.some(function(t){return Ve(e,t)})}))}function Je(e){return l(function(){var t,r;return C(this,function(n){switch(n.label){case 0:return t=e.matches,r=t.filter(function(e){return e.shouldLoad}),[4,Promise.all(r.map(function(e){return e.resolve()}))];case 1:return[2,n.sent().reduce(function(e,t,n){return Object.assign(e,v({},r[n].route.id,t))},{})]}})})()}function qe(e,t,r,n,a,o,i,u,s,c){return l(function(){var r,f,d;return C(this,function(h){switch(h.label){case 0:return r=o.map(function(e){return e.route.lazy?function(e,t,r){return l(function(){var n,a,o,i,u;return C(this,function(s){switch(s.label){case 0:return e.lazy?[4,e.lazy()]:[2];case 1:if(n=s.sent(),!e.lazy)return[2];for(var c in O(a=r[e.id],"No route found in manifest"),o={},n)i=a[c],M(!(u=void 0!==i&&"hasErrorBoundary"!==c),'Route "'+a.id+'" has a static property "'+c+'" defined but its lazy function is also returning a value for this property. The lazy route property "'+c+'" will be ignored.'),u||z.has(c)||(o[c]=n[c]);return Object.assign(a,o),Object.assign(a,D({},t(a),{lazy:void 0})),[2]}})})()}(e.route,s,u):void 0}),f=o.map(function(e,o){var i=r[o],u=a.some(function(t){return t.route.id===e.route.id});return D({},e,{shouldLoad:u,resolve:function(r){return l(function(){return C(this,function(a){return r&&"GET"===n.method&&(e.route.lazy||e.route.loader)&&(u=!0),[2,u?Ye(t,n,e,i,r,c):Promise.resolve({type:L.data,result:void 0})]})})()}})}),[4,e({matches:f,request:n,params:o[0].params,fetcherKey:i,context:c})];case 1:d=h.sent(),h.label=2;case 2:return h.trys.push([2,4,,5]),[4,Promise.all(r)];case 3:case 4:return h.sent(),[3,5];case 5:return[2,d]}})})()}function Ye(e,t,r,n,a,o){return l(function(){var i,u,s,c,f,d,h,v,p,m,y;return C(this,function(b){switch(b.label){case 0:s=function(n){var i,s=new Promise(function(e,t){return i=t});u=function(){return i()},t.signal.addEventListener("abort",u);var c=function(a){return"function"!=typeof n?Promise.reject(new Error('You cannot call the handler for a route which defines a boolean "'+e+'" [routeId: '+r.route.id+"]")):n.apply(void 0,[{request:t,params:r.params,context:o}].concat(S(void 0!==a?[a]:[])))},f=l(function(){return C(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,a?a(function(e){return c(e)}):c()];case 1:return[2,{type:"data",result:e.sent()}];case 2:return[2,{type:"error",result:e.sent()}];case 3:return[2]}})})();return Promise.race([f,s])},b.label=1;case 1:return b.trys.push([1,12,13,14]),c=r.route[e],n?c?[4,Promise.all([s(c).catch(function(e){f=e}),n])]:[3,3]:[3,8];case 2:if(d=w.apply(void 0,[b.sent(),1]),h=d[0],void 0!==f)throw f;return i=h,[3,7];case 3:return[4,n];case 4:return b.sent(),(c=r.route[e])?[4,s(c)]:[3,6];case 5:return i=b.sent(),[3,7];case 6:if("action"===e)throw v=new URL(t.url),p=v.pathname+v.search,it(405,{method:t.method,pathname:p,routeId:r.route.id});return[2,{type:L.data,result:void 0}];case 7:return[3,11];case 8:if(c)return[3,9];throw it(404,{pathname:(m=new URL(t.url)).pathname+m.search});case 9:return[4,s(c)];case 10:i=b.sent(),b.label=11;case 11:return O(void 0!==i.result,"You defined "+("action"===e?"an action":"a loader")+' for route "'+r.route.id+"\" but didn't return anything from your `"+e+"` function. Please return a value or `null`."),[3,14];case 12:return y=b.sent(),[2,{type:L.error,result:y}];case 13:return u&&t.signal.removeEventListener("abort",u),[7];case 14:return[2,i]}})})()}function Xe(e,t,r,n,a,o){var i=e.headers.get("Location");if(O(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!Oe.test(i)){var u=n.slice(0,n.findIndex(function(e){return e.route.id===r})+1);i=Ie(new URL(t.url),u,a,!0,i,o),e.headers.set("Location",i)}return e}function Ge(e,t,r){if(Oe.test(e)){var n=e,a=n.startsWith("//")?new URL(t.protocol+n):new URL(n),o=null!=ie(a.pathname,r);if(a.origin===t.origin&&o)return a.pathname+a.search+a.hash}return e}function Qe(e,t,r,n){var a=e.createURL(st(t)).toString(),o={signal:r};if(n&&vt(n.formMethod)){var i=n.formMethod,u=n.formEncType;o.method=i.toUpperCase(),"application/json"===u?(o.headers=new Headers({"Content-Type":u}),o.body=JSON.stringify(n.json)):"text/plain"===u?o.body=n.text:"application/x-www-form-urlencoded"===u&&n.formData?o.body=Ze(n.formData):o.body=n.formData}return new Request(a,o)}function Ze(e){var t=new URLSearchParams,r=!0,n=!1,a=void 0;try{for(var o,i=e.entries()[Symbol.iterator]();!(r=(o=i.next()).done);r=!0){var u=w(o.value,2),s=u[0],c=u[1];t.append(s,"string"==typeof c?c:c.name)}}catch(e){n=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(n)throw a}}return t}function et(e){var t=new FormData,r=!0,n=!1,a=void 0;try{for(var o,i=e.entries()[Symbol.iterator]();!(r=(o=i.next()).done);r=!0){var u=w(o.value,2),s=u[0],c=u[1];t.append(s,c)}}catch(e){n=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(n)throw a}}return t}function tt(e,t,r,n,a,o,i){var u=function(e,t,r,n,a){var o,i={},u=null,s=!1,c={},l=r&&lt(r[1])?r[1].error:void 0;return e.forEach(function(r){if(r.route.id in t){var f=r.route.id,d=t[f];if(O(!ft(d),"Cannot handle redirect results in processLoaderData"),lt(d)){var h=d.error;if(void 0!==l&&(h=l,l=void 0),u=u||{},a)u[f]=h;else{var v=at(e,f);null==u[v.route.id]&&(u[v.route.id]=h)}i[f]=void 0,s||(s=!0,o=xe(d.error)?d.error.status:500),d.headers&&(c[f]=d.headers)}else ct(d)?(n.set(f,d.deferredData),i[f]=d.deferredData.data,null==d.statusCode||200===d.statusCode||s||(o=d.statusCode),d.headers&&(c[f]=d.headers)):(i[f]=d.data,d.statusCode&&200!==d.statusCode&&!s&&(o=d.statusCode),d.headers&&(c[f]=d.headers))}}),void 0!==l&&r&&(u=v({},r[0],l),i[r[0]]=void 0),{loaderData:i,errors:u,statusCode:o||200,loaderHeaders:c}}(t,r,n,i,!1),s=u.loaderData,c=u.errors;return a.forEach(function(t){var r=t.key,n=t.match,a=t.controller,i=o[r];if(O(i,"Did not find corresponding fetcher result"),!a||!a.signal.aborted)if(lt(i)){var u=at(e.matches,null==n?void 0:n.route.id);c&&c[u.route.id]||(c=D({},c,v({},u.route.id,i.error))),e.fetchers.delete(r)}else if(ft(i))O(!1,"Unhandled fetcher revalidation redirect");else if(ct(i))O(!1,"Unhandled fetcher deferred data");else{var s=Rt(i.data);e.fetchers.set(r,s)}}),{loaderData:s,errors:c}}function rt(e,t,r,n){var a=D({},t),o=!0,i=!1,u=void 0;try{for(var s,c=r[Symbol.iterator]();!(o=(s=c.next()).done);o=!0){var l=s.value,f=l.route.id;if(t.hasOwnProperty(f)?void 0!==t[f]&&(a[f]=t[f]):void 0!==e[f]&&l.route.loader&&(a[f]=e[f]),n&&n.hasOwnProperty(f))break}}catch(e){i=!0,u=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw u}}return a}function nt(e){return e?lt(e[1])?{actionData:{}}:{actionData:v({},e[0],e[1].data)}:{}}function at(e,t){return(t?e.slice(0,e.findIndex(function(e){return e.route.id===t})+1):S(e)).reverse().find(function(e){return!0===e.route.hasErrorBoundary})||e[0]}function ot(e){var t=1===e.length?e[0]:e.find(function(e){return e.index||!e.path||"/"===e.path})||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function it(e,t){var r=void 0===t?{}:t,n=r.pathname,a=r.routeId,o=r.method,i=r.type,u=(r.message,"Unknown Server Error"),s="Unknown @remix-run/router error";return 400===e?(u="Bad Request",o&&n&&a?s="You made a "+o+' request to "'+n+'" but did not provide a `loader` for route "'+a+'", so there is no way to handle the request.':"defer-action"===i?s="defer() is not supported in actions":"invalid-body"===i&&(s="Unable to encode submission body")):403===e?(u="Forbidden",s='Route "'+a+'" does not match URL "'+n+'"'):404===e?(u="Not Found",s='No route matches URL "'+n+'"'):405===e&&(u="Method Not Allowed",o&&n&&a?s="You made a "+o.toUpperCase()+' request to "'+n+'" but did not provide an `action` for route "'+a+'", so there is no way to handle the request.':o&&(s='Invalid request method "'+o.toUpperCase()+'"')),new Re(e||500,u,new Error(s),!0)}function ut(e){for(var t=Object.entries(e),r=t.length-1;r>=0;r--){var n=w(t[r],2),a=n[0],o=n[1];if(ft(o))return{key:a,result:o}}}function st(e){return I(D({},"string"==typeof e?N(e):e,{hash:""}))}function ct(e){return e.type===L.deferred}function lt(e){return e.type===L.error}function ft(e){return(e&&e.type)===L.redirect}function dt(e){return"object"===(void 0===e?"undefined":E(e))&&null!=e&&"type"in e&&"data"in e&&"init"in e&&"DataWithResponseInit"===e.type}function ht(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"object"===E(e.headers)&&void 0!==e.body}function vt(e){return Ce.has(e.toLowerCase())}function pt(e,t,r,n,a){return l(function(){var o,i,u;return C(this,function(s){switch(s.label){case 0:o=function(o){var u,s,c,l,f,d;return C(this,function(h){switch(h.label){case 0:return u=w(i[o],2),s=u[0],c=u[1],(l=e.find(function(e){return(null==e?void 0:e.route.id)===s}))?(f=n.find(function(e){return e.route.id===l.route.id}),d=null!=f&&!We(f,l)&&void 0!==(a&&a[l.route.id]),ct(c)&&d?[4,yt(c,r,!1).then(function(e){e&&(t[s]=e)})]:[3,2]):[2,"continue"];case 1:h.sent(),h.label=2;case 2:return[2]}})},i=Object.entries(t),u=0,s.label=1;case 1:return u<i.length?[5,P(o(u))]:[3,4];case 2:s.sent(),s.label=3;case 3:return u++,[3,1];case 4:return[2]}})})()}function mt(e,t,r){return l(function(){var n,a;return C(this,function(o){switch(o.label){case 0:n=function(n){var a,o,i,u,s;return C(this,function(c){switch(c.label){case 0:return a=r[n],o=a.key,i=a.routeId,u=a.controller,s=t[o],e.find(function(e){return(null==e?void 0:e.route.id)===i})?ct(s)?(O(u,"Expected an AbortController for revalidating fetcher deferred result"),[4,yt(s,u.signal,!0).then(function(e){e&&(t[o]=e)})]):[3,2]:[2,"continue"];case 1:c.sent(),c.label=2;case 2:return[2]}})},a=0,o.label=1;case 1:return a<r.length?[5,P(n(a))]:[3,4];case 2:o.sent(),o.label=3;case 3:return a++,[3,1];case 4:return[2]}})})()}function yt(e,t,r){return l(function(){return C(this,function(n){switch(n.label){case 0:return void 0===r&&(r=!1),[4,e.deferredData.resolveData(t)];case 1:if(n.sent())return[2];if(r)try{return[2,{type:L.data,data:e.deferredData.unwrappedData}]}catch(e){return[2,{type:L.error,error:e}]}return[2,{type:L.data,data:e.deferredData.data}]}})})()}function bt(e){return new URLSearchParams(e).getAll("index").some(function(e){return""===e})}function gt(e,t){var r="string"==typeof t?N(t).search:t.search;if(e[e.length-1].route.index&&bt(r||""))return e[e.length-1];var n=ce(e);return n[n.length-1]}function wt(e){var t=e.formMethod,r=e.formAction,n=e.formEncType,a=e.text,o=e.formData,i=e.json;if(t&&r&&n)return null!=a?{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a}:null!=o?{formMethod:t,formAction:r,formEncType:n,formData:o,json:void 0,text:void 0}:void 0!==i?{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:i,text:void 0}:void 0}function St(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 Et(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 Rt(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 xt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function kt(e,t,r){return t=Lt(t),n=e,!(a=Mt()?Reflect.construct(t,r||[],Lt(e).constructor):t.apply(e,r))||"object"!=((o=a)&&"undefined"!=typeof Symbol&&o.constructor===Symbol?"symbol":typeof o)&&"function"!=typeof a?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n):a;var n,a,o}function Ct(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Dt(e,t,r){return t&&Pt(e.prototype,t),r&&Pt(e,r),e}function Lt(e){return Lt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Lt(e)}function _t(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Tt(e,t)}function At(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function Tt(e,t){return Tt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Tt(e,t)}function jt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,u=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){u=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(u)throw a}}return o}}(e,t)||Ot(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ot(e,t){if(e){if("string"==typeof e)return xt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?xt(e,t):void 0}}function Mt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Mt=function(){return!!e})()}function Ut(){return Ut=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},Ut.apply(this,arguments)}Symbol("deferred");var Ft=a.createContext(null),It=a.createContext(null),Nt=a.createContext(null),Bt=a.createContext(null),zt=a.createContext(null),Ht=a.createContext({outlet:null,matches:[],isDataRoute:!1}),Wt=a.createContext(null);function Kt(e,t){var r=(void 0===t?{}:t).relative;$t()||O(!1);var n=a.useContext(Bt),o=n.basename,i=n.navigator,u=tr(e,{relative:r}),s=u.hash,c=u.pathname,l=u.search,f=c;return"/"!==o&&(f="/"===c?o:de([o,c])),i.createHref({pathname:f,search:l,hash:s})}function $t(){return null!=a.useContext(zt)}function Vt(){return $t()||O(!1),a.useContext(zt).location}function Jt(){return a.useContext(zt).navigationType}function qt(e){$t()||O(!1);var t=Vt().pathname;return a.useMemo(function(){return ae(e,oe(t))},[t,e])}function Yt(e){a.useContext(Bt).static||a.useLayoutEffect(e)}function Xt(){var e,t,r;return a.useContext(Ht).isDataRoute?(e=fr(cr.UseNavigateStable).router,t=hr(lr.UseNavigateStable),r=a.useRef(!1),Yt(function(){r.current=!0}),a.useCallback(function(n,a){void 0===a&&(a={}),r.current&&("number"==typeof n?e.navigate(n):e.navigate(n,Ut({fromRouteId:t},a)))},[e,t])):function(){$t()||O(!1);var e=a.useContext(Ft),t=a.useContext(Bt),r=t.basename,n=t.future,o=t.navigator,i=a.useContext(Ht).matches,u=Vt().pathname,s=JSON.stringify(le(i,n.v7_relativeSplatPath)),c=a.useRef(!1);return Yt(function(){c.current=!0}),a.useCallback(function(t,n){if(void 0===n&&(n={}),c.current)if("number"!=typeof t){var a=fe(t,JSON.parse(s),u,"path"===n.relative);null==e&&"/"!==r&&(a.pathname="/"===a.pathname?r:de([r,a.pathname])),(n.replace?o.replace:o.push)(a,n.state,n)}else o.go(t)},[r,o,s,u,e])}()}var Gt=a.createContext(null);function Qt(){return a.useContext(Gt)}function Zt(e){var t=a.useContext(Ht).outlet;return t?a.createElement(Gt.Provider,{value:e},t):t}function er(){var e=a.useContext(Ht).matches,t=e[e.length-1];return t?t.params:{}}function tr(e,t){var r=(void 0===t?{}:t).relative,n=a.useContext(Bt).future,o=a.useContext(Ht).matches,i=Vt().pathname,u=JSON.stringify(le(o,n.v7_relativeSplatPath));return a.useMemo(function(){return fe(e,JSON.parse(u),i,"path"===r)},[e,u,i,r])}function rr(e,t){return nr(e,t)}function nr(e,t,r,o){$t()||O(!1);var i,u=a.useContext(Bt).navigator,s=a.useContext(Ht).matches,c=s[s.length-1],l=c?c.params:{},f=(c&&c.pathname,c?c.pathnameBase:"/"),d=(c&&c.route,Vt());if(t){var h,v="string"==typeof t?N(t):t;"/"===f||(null==(h=v.pathname)?void 0:h.startsWith(f))||O(!1),i=v}else i=d;var p=i.pathname||"/",m=p;if("/"!==f){var y=f.replace(/^\//,"").split("/");m="/"+p.replace(/^\//,"").split("/").slice(y.length).join("/")}var b=W(e,{pathname:m}),g=sr(b&&b.map(function(e){return Object.assign({},e,{params:Object.assign({},l,e.params),pathname:de([f,u.encodeLocation?u.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?f:de([f,u.encodeLocation?u.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})}),s,r,o);return t&&g?a.createElement(zt.Provider,{value:{location:Ut({pathname:"/",search:"",hash:"",state:null,key:"default"},i),navigationType:n.Pop}},g):g}function ar(){var e=Sr(),t=xe(e)?e.status+" "+e.statusText:At(e,Error)?e.message:JSON.stringify(e),r=At(e,Error)?e.stack:null,n={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return a.createElement(a.Fragment,null,a.createElement("h2",null,"Unexpected Application Error!"),a.createElement("h3",{style:{fontStyle:"italic"}},t),r?a.createElement("pre",{style:n},r):null,null)}var or=a.createElement(ar,null),ir=function(e){function t(e){var r;return Ct(this,t),(r=kt(this,t,[e])).state={location:e.location,revalidation:e.revalidation,error:e.error},r}return _t(t,e),Dt(t,[{key:"componentDidCatch",value:function(e,t){console.error("React Router caught the following error during render",e,t)}},{key:"render",value:function(){return void 0!==this.state.error?a.createElement(Ht.Provider,{value:this.props.routeContext},a.createElement(Wt.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return{error:e}}},{key:"getDerivedStateFromProps",value:function(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}}]),t}(a.Component);function ur(e){var t=e.routeContext,r=e.match,n=e.children,o=a.useContext(Ft);return o&&o.static&&o.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=r.route.id),a.createElement(Ht.Provider,{value:t},n)}function sr(e,t,r,n){var o;if(void 0===t&&(t=[]),void 0===r&&(r=null),void 0===n&&(n=null),null==e){var i;if(!r)return null;if(r.errors)e=r.matches;else{if(!(null!=(i=n)&&i.v7_partialHydration&&0===t.length&&!r.initialized&&r.matches.length>0))return null;e=r.matches}}var u=e,s=null==(o=r)?void 0:o.errors;if(null!=s){var c=u.findIndex(function(e){return e.route.id&&void 0!==(null==s?void 0:s[e.route.id])});c>=0||O(!1),u=u.slice(0,Math.min(u.length,c+1))}var l=!1,f=-1;if(r&&n&&n.v7_partialHydration)for(var d=0;d<u.length;d++){var h=u[d];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(f=d),h.route.id){var v=r.loaderData,p=r.errors,m=h.route.loader&&void 0===v[h.route.id]&&(!p||void 0===p[h.route.id]);if(h.route.lazy||m){l=!0,u=f>=0?u.slice(0,f+1):[u[0]];break}}}return u.reduceRight(function(e,n,o){var i,c,d=!1,h=null,v=null;r&&(i=s&&n.route.id?s[n.route.id]:void 0,h=n.route.errorElement||or,l&&(f<0&&0===o?(Cr[c="route-fallback"]||(Cr[c]=!0),d=!0,v=null):f===o&&(d=!0,v=n.route.hydrateFallbackElement||null)));var p=t.concat(u.slice(0,o+1)),m=function(){var t;return t=i?h:d?v:n.route.Component?a.createElement(n.route.Component,null):n.route.element?n.route.element:e,a.createElement(ur,{match:n,routeContext:{outlet:e,matches:p,isDataRoute:null!=r},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||0===o)?a.createElement(ir,{location:r.location,revalidation:r.revalidation,component:h,error:i,children:m(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):m()},null)}var cr=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(cr||{}),lr=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}(lr||{});function fr(e){var t=a.useContext(Ft);return t||O(!1),t}function dr(e){var t=a.useContext(It);return t||O(!1),t}function hr(e){var t=function(){var e=a.useContext(Ht);return e||O(!1),e}(),r=t.matches[t.matches.length-1];return r.route.id||O(!1),r.route.id}function vr(){return hr(lr.UseRouteId)}function pr(){return dr(lr.UseNavigation).navigation}function mr(){var e=fr(cr.UseRevalidator),t=dr(lr.UseRevalidator);return a.useMemo(function(){return{revalidate:e.router.revalidate,state:t.revalidation}},[e.router.revalidate,t.revalidation])}function yr(){var e=dr(lr.UseMatches),t=e.matches,r=e.loaderData;return a.useMemo(function(){return t.map(function(e){return $(e,r)})},[t,r])}function br(){var e=dr(lr.UseLoaderData),t=hr(lr.UseLoaderData);if(!e.errors||null==e.errors[t])return e.loaderData[t];console.error("You cannot `useLoaderData` in an errorElement (routeId: "+t+")")}function gr(e){return dr(lr.UseRouteLoaderData).loaderData[e]}function wr(){var e=dr(lr.UseActionData),t=hr(lr.UseLoaderData);return e.actionData?e.actionData[t]:void 0}function Sr(){var e,t=a.useContext(Wt),r=dr(lr.UseRouteError),n=hr(lr.UseRouteError);return void 0!==t?t:null==(e=r.errors)?void 0:e[n]}function Er(){var e=a.useContext(Nt);return null==e?void 0:e._data}function Rr(){var e=a.useContext(Nt);return null==e?void 0:e._error}var xr=0;function kr(e){var t=fr(cr.UseBlocker),r=t.router,n=t.basename,o=dr(lr.UseBlocker),i=jt(a.useState(""),2),u=i[0],s=i[1],c=a.useCallback(function(t){if("function"!=typeof e)return!!e;if("/"===n)return e(t);var r=t.currentLocation,a=t.nextLocation,o=t.historyAction;return e({currentLocation:Ut({},r,{pathname:ie(r.pathname,n)||r.pathname}),nextLocation:Ut({},a,{pathname:ie(a.pathname,n)||a.pathname}),historyAction:o})},[n,e]);return a.useEffect(function(){var e=String(++xr);return s(e),function(){return r.deleteBlocker(e)}},[r]),a.useEffect(function(){""!==u&&r.getBlocker(u,c)},[r,u,c]),u&&o.blockers.has(u)?o.blockers.get(u):je}var Cr={},Pr=function(e,t,r){};function Dr(e,t){void 0===(null==e?void 0:e.v7_startTransition)&&Pr("v7_startTransition","React Router will begin wrapping state updates in `React.startTransition` in v7","https://reactrouter.com/v6/upgrading/future#v7_starttransition"),void 0!==(null==e?void 0:e.v7_relativeSplatPath)||t&&void 0!==t.v7_relativeSplatPath||Pr("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath"),t&&(void 0===t.v7_fetcherPersist&&Pr("v7_fetcherPersist","The persistence behavior of fetchers is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_fetcherpersist"),void 0===t.v7_normalizeFormMethod&&Pr("v7_normalizeFormMethod","Casing of `formMethod` fields is being normalized to uppercase in v7","https://reactrouter.com/v6/upgrading/future#v7_normalizeformmethod"),void 0===t.v7_partialHydration&&Pr("v7_partialHydration","`RouterProvider` hydration behavior is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_partialhydration"),void 0===t.v7_skipActionErrorRevalidation&&Pr("v7_skipActionErrorRevalidation","The revalidation behavior after 4xx/5xx `action` responses is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_skipactionerrorrevalidation"))}var Lr=a.startTransition;function _r(e){var t=e.basename,r=e.children,n=e.initialEntries,o=e.initialIndex,i=e.future,u=a.useRef();null==u.current&&(u.current=A({initialEntries:n,initialIndex:o,v5Compat:!0}));var s=u.current,c=jt(a.useState({action:s.action,location:s.location}),2),l=c[0],f=c[1],d=(i||{}).v7_startTransition,h=a.useCallback(function(e){d&&Lr?Lr(function(){return f(e)}):f(e)},[f,d]);return a.useLayoutEffect(function(){return s.listen(h)},[s,h]),a.useEffect(function(){return Dr(i)},[i]),a.createElement(Or,{basename:t,children:r,location:l.location,navigationType:l.action,navigator:s,future:i})}function Ar(e){var t=e.to,r=e.replace,n=e.state,o=e.relative;$t()||O(!1);var i=a.useContext(Bt),u=i.future,s=(i.static,a.useContext(Ht).matches),c=Vt().pathname,l=Xt(),f=fe(t,le(s,u.v7_relativeSplatPath),c,"path"===o),d=JSON.stringify(f);return a.useEffect(function(){return l(JSON.parse(d),{replace:r,state:n,relative:o})},[l,d,o,r,n]),null}function Tr(e){return Zt(e.context)}function jr(e){O(!1)}function Or(e){var t=e.basename,r=void 0===t?"/":t,o=e.children,i=void 0===o?null:o,u=e.location,s=e.navigationType,c=void 0===s?n.Pop:s,l=e.navigator,f=e.static,d=void 0!==f&&f,h=e.future;$t()&&O(!1);var v=r.replace(/^\/*/,"/"),p=a.useMemo(function(){return{basename:v,navigator:l,static:d,future:Ut({v7_relativeSplatPath:!1},h)}},[v,h,l,d]);"string"==typeof u&&(u=N(u));var m=u.pathname,y=void 0===m?"/":m,b=u.search,g=void 0===b?"":b,w=u.hash,S=void 0===w?"":w,E=u.state,R=void 0===E?null:E,x=u.key,k=void 0===x?"default":x,C=a.useMemo(function(){var e=ie(y,v);return null==e?null:{location:{pathname:e,search:g,hash:S,state:R,key:k},navigationType:c}},[v,y,g,S,R,k,c]);return null==C?null:a.createElement(Bt.Provider,{value:p},a.createElement(zt.Provider,{children:i,value:C}))}function Mr(e){var t=e.children,r=e.location;return rr(zr(t),r)}function Ur(e){var t=e.children,r=e.errorElement,n=e.resolve;return a.createElement(Nr,{resolve:n,errorElement:r},a.createElement(Br,null,t))}var Fr=function(e){return e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error",e}(Fr||{}),Ir=new Promise(function(){}),Nr=function(e){function t(e){var r;return Ct(this,t),(r=kt(this,t,[e])).state={error:null},r}return _t(t,e),Dt(t,[{key:"componentDidCatch",value:function(e,t){console.error("<Await> caught the following error during render",e,t)}},{key:"render",value:function(){var e=this.props,t=e.children,r=e.errorElement,n=e.resolve,o=null,i=Fr.pending;if(At(n,Promise))if(this.state.error){i=Fr.error;var u=this.state.error;o=Promise.reject().catch(function(){}),Object.defineProperty(o,"_tracked",{get:function(){return!0}}),Object.defineProperty(o,"_error",{get:function(){return u}})}else n._tracked?i="_error"in(o=n)?Fr.error:"_data"in o?Fr.success:Fr.pending:(i=Fr.pending,Object.defineProperty(n,"_tracked",{get:function(){return!0}}),o=n.then(function(e){return Object.defineProperty(n,"_data",{get:function(){return e}})},function(e){return Object.defineProperty(n,"_error",{get:function(){return e}})}));else i=Fr.success,o=Promise.resolve(),Object.defineProperty(o,"_tracked",{get:function(){return!0}}),Object.defineProperty(o,"_data",{get:function(){return n}});if(i===Fr.error&&At(o._error,ye))throw Ir;if(i===Fr.error&&!r)throw o._error;if(i===Fr.error)return a.createElement(Nt.Provider,{value:o,children:r});if(i===Fr.success)return a.createElement(Nt.Provider,{value:o,children:t});throw o}}],[{key:"getDerivedStateFromError",value:function(e){return{error:e}}}]),t}(a.Component);function Br(e){var t=e.children,r=Er(),n="function"==typeof t?t(r):t;return a.createElement(a.Fragment,null,n)}function zr(e,t){void 0===t&&(t=[]);var r=[];return a.Children.forEach(e,function(e,n){if(a.isValidElement(e)){var o=(u=t,function(e){if(Array.isArray(e))return xt(e)}(u)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(u)||Ot(u)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([n]);if(e.type!==a.Fragment){e.type!==jr&&O(!1),e.props.index&&e.props.children&&O(!1);var i={id:e.props.id||o.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(i.children=zr(e.props.children,o)),r.push(i)}else r.push.apply(r,zr(e.props.children,o))}var u}),r}function Hr(e){return sr(e)}function Wr(e){var t={hasErrorBoundary:null!=e.ErrorBoundary||null!=e.errorElement};return e.Component&&Object.assign(t,{element:a.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:a.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:a.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}function Kr(e,t){return Fe({basename:null==t?void 0:t.basename,future:Ut({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:A({initialEntries:null==t?void 0:t.initialEntries,initialIndex:null==t?void 0:t.initialIndex}),hydrationData:null==t?void 0:t.hydrationData,routes:e,mapRouteProperties:Wr,dataStrategy:null==t?void 0:t.dataStrategy,patchRoutesOnNavigation:null==t?void 0:t.patchRoutesOnNavigation}).initialize()}function $r(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Vr(e,t,r,n,a,o,i){try{var u=e[o](i),s=u.value}catch(e){return void r(e)}u.done?t(s):Promise.resolve(s).then(n,a)}function Jr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,u=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){u=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(u)throw a}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return $r(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?$r(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qr(){return qr=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},qr.apply(this,arguments)}function Yr(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}var Xr="get",Gr="application/x-www-form-urlencoded";function Qr(e){return null!=e&&"string"==typeof e.tagName}function Zr(e){return void 0===e&&(e=""),new URLSearchParams("string"==typeof e||Array.isArray(e)||(t=e,null!=(r=URLSearchParams)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](t):t instanceof r)?e:Object.keys(e).reduce(function(t,r){var n=e[r];return t.concat(Array.isArray(n)?n.map(function(e){return[r,e]}):[[r,n]])},[]));var t,r}var en=null,tn=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function rn(e){return null==e||tn.has(e)?e:null}var nn=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],an=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],on=["fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","viewTransition"];try{window.__reactRouterVersion="6"}catch(e){}function un(e,t){return Fe({basename:null==t?void 0:t.basename,future:qr({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:T({window:null==t?void 0:t.window}),hydrationData:(null==t?void 0:t.hydrationData)||cn(),routes:e,mapRouteProperties:Wr,dataStrategy:null==t?void 0:t.dataStrategy,patchRoutesOnNavigation:null==t?void 0:t.patchRoutesOnNavigation,window:null==t?void 0:t.window}).initialize()}function sn(e,t){return Fe({basename:null==t?void 0:t.basename,future:qr({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:j({window:null==t?void 0:t.window}),hydrationData:(null==t?void 0:t.hydrationData)||cn(),routes:e,mapRouteProperties:Wr,dataStrategy:null==t?void 0:t.dataStrategy,patchRoutesOnNavigation:null==t?void 0:t.patchRoutesOnNavigation,window:null==t?void 0:t.window}).initialize()}function cn(){var e,t=null==(e=window)?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=qr({},t,{errors:ln(t.errors)})),t}function ln(e){if(!e)return null;var t=Object.entries(e),r={},n=!0,a=!1,o=void 0;try{for(var i,u=t[Symbol.iterator]();!(n=(i=u.next()).done);n=!0){var s=Jr(i.value,2),c=s[0],l=s[1];if(l&&"RouteErrorResponse"===l.__type)r[c]=new Re(l.status,l.statusText,l.data,!0===l.internal);else if(l&&"Error"===l.__type){if(l.__subType){var f=window[l.__subType];if("function"==typeof f)try{var d=new f(l.message);d.stack="",r[c]=d}catch(e){}}if(null==r[c]){var h=new Error(l.message);h.stack="",r[c]=h}}else r[c]=l}}catch(e){a=!0,o=e}finally{try{n||null==u.return||u.return()}finally{if(a)throw o}}return r}var fn=a.createContext({isTransitioning:!1}),dn=a.createContext(new Map),hn=a.startTransition,vn=i.flushSync,pn=a.useId;function mn(e){vn?vn(e):e()}var yn=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.status="pending",this.promise=new Promise(function(e,r){t.resolve=function(r){"pending"===t.status&&(t.status="resolved",e(r))},t.reject=function(e){"pending"===t.status&&(t.status="rejected",r(e))}})};function bn(e){var t=e.fallbackElement,r=e.router,n=e.future,o=Jr(a.useState(r.state),2),i=o[0],u=o[1],s=Jr(a.useState(),2),c=s[0],l=s[1],f=Jr(a.useState({isTransitioning:!1}),2),d=f[0],h=f[1],v=Jr(a.useState(),2),p=v[0],m=v[1],y=Jr(a.useState(),2),b=y[0],g=y[1],w=Jr(a.useState(),2),S=w[0],E=w[1],R=a.useRef(new Map),x=(n||{}).v7_startTransition,k=a.useCallback(function(e){x?function(e){hn?hn(e):e()}(e):e()},[x]),C=a.useCallback(function(e,t){var n=t.deletedFetchers,a=t.flushSync,o=t.viewTransitionOpts;e.fetchers.forEach(function(e,t){void 0!==e.data&&R.current.set(t,e.data)}),n.forEach(function(e){return R.current.delete(e)});var i=null==r.window||null==r.window.document||"function"!=typeof r.window.document.startViewTransition;if(o&&!i){if(a){mn(function(){b&&(p&&p.resolve(),b.skipTransition()),h({isTransitioning:!0,flushSync:!0,currentLocation:o.currentLocation,nextLocation:o.nextLocation})});var s=r.window.document.startViewTransition(function(){mn(function(){return u(e)})});return s.finished.finally(function(){mn(function(){m(void 0),g(void 0),l(void 0),h({isTransitioning:!1})})}),void mn(function(){return g(s)})}b?(p&&p.resolve(),b.skipTransition(),E({state:e,currentLocation:o.currentLocation,nextLocation:o.nextLocation})):(l(e),h({isTransitioning:!0,flushSync:!1,currentLocation:o.currentLocation,nextLocation:o.nextLocation}))}else a?mn(function(){return u(e)}):k(function(){return u(e)})},[r.window,b,p,R,k]);a.useLayoutEffect(function(){return r.subscribe(C)},[r,C]),a.useEffect(function(){d.isTransitioning&&!d.flushSync&&m(new yn)},[d]),a.useEffect(function(){if(p&&c&&r.window){var e=c,t=p.promise,n=r.window.document.startViewTransition(function(){return(r=function(){return function(e,t){var r,n,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=u(0),i.throw=u(1),i.return=u(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(s){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(o=0)),o;)try{if(r=1,n&&(a=2&u[0]?n.return:u[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,u[1])).done)return a;switch(n=0,a&&(u=[2&u[0],a.value]),u[0]){case 0:case 1:a=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,n=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==u[0]&&2!==u[0])){o=0;continue}if(3===u[0]&&(!a||u[1]>a[0]&&u[1]<a[3])){o.label=u[1];break}if(6===u[0]&&o.label<a[1]){o.label=a[1],a=u;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(u);break}a[2]&&o.ops.pop(),o.trys.pop();continue}u=t.call(e,o)}catch(e){u=[6,e],n=0}finally{r=a=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}}(this,function(r){switch(r.label){case 0:return k(function(){return u(e)}),[4,t];case 1:return r.sent(),[2]}})},function(){var e=this,t=arguments;return new Promise(function(n,a){var o=r.apply(e,t);function i(e){Vr(o,n,a,i,u,"next",e)}function u(e){Vr(o,n,a,i,u,"throw",e)}i(void 0)})})();var r});n.finished.finally(function(){m(void 0),g(void 0),l(void 0),h({isTransitioning:!1})}),g(n)}},[k,c,p,r.window]),a.useEffect(function(){p&&c&&i.location.key===c.location.key&&p.resolve()},[p,b,i.location,c]),a.useEffect(function(){!d.isTransitioning&&S&&(l(S.state),h({isTransitioning:!0,flushSync:!1,currentLocation:S.currentLocation,nextLocation:S.nextLocation}),E(void 0))},[d.isTransitioning,S]),a.useEffect(function(){},[]);var P=a.useMemo(function(){return{createHref:r.createHref,encodeLocation:r.encodeLocation,go:function(e){return r.navigate(e)},push:function(e,t,n){return r.navigate(e,{state:t,preventScrollReset:null==n?void 0:n.preventScrollReset})},replace:function(e,t,n){return r.navigate(e,{replace:!0,state:t,preventScrollReset:null==n?void 0:n.preventScrollReset})}}},[r]),D=r.basename||"/",L=a.useMemo(function(){return{router:r,navigator:P,static:!1,basename:D}},[r,P,D]),_=a.useMemo(function(){return{v7_relativeSplatPath:r.future.v7_relativeSplatPath}},[r.future.v7_relativeSplatPath]);return a.useEffect(function(){return Dr(n,r.future)},[n,r.future]),a.createElement(a.Fragment,null,a.createElement(Ft.Provider,{value:L},a.createElement(It.Provider,{value:i},a.createElement(dn.Provider,{value:R.current},a.createElement(fn.Provider,{value:d},a.createElement(Or,{basename:D,location:i.location,navigationType:i.historyAction,navigator:P,future:_},i.initialized||r.future.v7_partialHydration?a.createElement(gn,{routes:r.routes,future:r.future,state:i}):t))))),null)}var gn=a.memo(wn);function wn(e){var t=e.routes,r=e.future;return nr(t,void 0,e.state,r)}function Sn(e){var t=e.basename,r=e.children,n=e.future,o=e.window,i=a.useRef();null==i.current&&(i.current=T({window:o,v5Compat:!0}));var u=i.current,s=Jr(a.useState({action:u.action,location:u.location}),2),c=s[0],l=s[1],f=(n||{}).v7_startTransition,d=a.useCallback(function(e){f&&hn?hn(function(){return l(e)}):l(e)},[l,f]);return a.useLayoutEffect(function(){return u.listen(d)},[u,d]),a.useEffect(function(){return Dr(n)},[n]),a.createElement(Or,{basename:t,children:r,location:c.location,navigationType:c.action,navigator:u,future:n})}function En(e){var t=e.basename,r=e.children,n=e.future,o=e.window,i=a.useRef();null==i.current&&(i.current=j({window:o,v5Compat:!0}));var u=i.current,s=Jr(a.useState({action:u.action,location:u.location}),2),c=s[0],l=s[1],f=(n||{}).v7_startTransition,d=a.useCallback(function(e){f&&hn?hn(function(){return l(e)}):l(e)},[l,f]);return a.useLayoutEffect(function(){return u.listen(d)},[u,d]),a.useEffect(function(){return Dr(n)},[n]),a.createElement(Or,{basename:t,children:r,location:c.location,navigationType:c.action,navigator:u,future:n})}function Rn(e){var t=e.basename,r=e.children,n=e.future,o=e.history,i=Jr(a.useState({action:o.action,location:o.location}),2),u=i[0],s=i[1],c=(n||{}).v7_startTransition,l=a.useCallback(function(e){c&&hn?hn(function(){return s(e)}):s(e)},[s,c]);return a.useLayoutEffect(function(){return o.listen(l)},[o,l]),a.useEffect(function(){return Dr(n)},[n]),a.createElement(Or,{basename:t,children:r,location:u.location,navigationType:u.action,navigator:o,future:n})}var xn,kn,Cn="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,Pn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Dn=a.forwardRef(function(e,t){var r,n=e.onClick,o=e.relative,i=e.reloadDocument,u=e.replace,s=e.state,c=e.target,l=e.to,f=e.preventScrollReset,d=e.viewTransition,h=Yr(e,nn),v=a.useContext(Bt).basename,p=!1;if("string"==typeof l&&Pn.test(l)&&(r=l,Cn))try{var m=new URL(window.location.href),y=l.startsWith("//")?new URL(m.protocol+l):new URL(l),b=ie(y.pathname,v);y.origin===m.origin&&null!=b?l=b+y.search+y.hash:p=!0}catch(e){}var g=Kt(l,{relative:o}),w=On(l,{replace:u,state:s,target:c,preventScrollReset:f,relative:o,viewTransition:d});return a.createElement("a",qr({},h,{href:r||g,onClick:p||i?n:function(e){n&&n(e),e.defaultPrevented||w(e)},ref:t,target:c}))}),Ln=a.forwardRef(function(e,t){var r=e["aria-current"],n=void 0===r?"page":r,o=e.caseSensitive,i=void 0!==o&&o,u=e.className,s=void 0===u?"":u,c=e.end,l=void 0!==c&&c,f=e.style,d=e.to,h=e.viewTransition,v=e.children,p=Yr(e,an),m=tr(d,{relative:p.relative}),y=Vt(),b=a.useContext(It),g=a.useContext(Bt),w=g.navigator,S=g.basename,E=null!=b&&Jn(m)&&!0===h,R=w.encodeLocation?w.encodeLocation(m).pathname:m.pathname,x=y.pathname,k=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;i||(x=x.toLowerCase(),k=k?k.toLowerCase():null,R=R.toLowerCase()),k&&S&&(k=ie(k,S)||k);var C,P="/"!==R&&R.endsWith("/")?R.length-1:R.length,D=x===R||!l&&x.startsWith(R)&&"/"===x.charAt(P),L=null!=k&&(k===R||!l&&k.startsWith(R)&&"/"===k.charAt(R.length)),_={isActive:D,isPending:L,isTransitioning:E},A=D?n:void 0;C="function"==typeof s?s(_):[s,D?"active":null,L?"pending":null,E?"transitioning":null].filter(Boolean).join(" ");var T="function"==typeof f?f(_):f;return a.createElement(Dn,qr({},p,{"aria-current":A,className:C,ref:t,style:T,to:d,viewTransition:h}),"function"==typeof v?v(_):v)}),_n=a.forwardRef(function(e,t){var r=e.fetcherKey,n=e.navigate,o=e.reloadDocument,i=e.replace,u=e.state,s=e.method,c=void 0===s?Xr:s,l=e.action,f=e.onSubmit,d=e.relative,h=e.preventScrollReset,v=e.viewTransition,p=Yr(e,on),m=In(),y=Nn(l,{relative:d}),b="get"===c.toLowerCase()?"get":"post";return a.createElement("form",qr({ref:t,method:b,action:y,onSubmit:o?f:function(e){if(f&&f(e),!e.defaultPrevented){e.preventDefault();var t=e.nativeEvent.submitter,a=(null==t?void 0:t.getAttribute("formmethod"))||c;m(t||e.currentTarget,{fetcherKey:r,method:a,navigate:n,replace:i,state:u,relative:d,preventScrollReset:h,viewTransition:v})}}},p))});function An(e){return Kn({getKey:e.getKey,storageKey:e.storageKey}),null}function Tn(e){var t=a.useContext(Ft);return t||O(!1),t}function jn(e){var t=a.useContext(It);return t||O(!1),t}function On(e,t){var r=void 0===t?{}:t,n=r.target,o=r.replace,i=r.state,u=r.preventScrollReset,s=r.relative,c=r.viewTransition,l=Xt(),f=Vt(),d=tr(e,{relative:s});return a.useCallback(function(t){if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(t,n)){t.preventDefault();var r=void 0!==o?o:I(f)===I(d);l(e,{replace:r,state:i,preventScrollReset:u,relative:s,viewTransition:c})}},[f,l,d,o,i,n,e,u,s,c])}function Mn(e){var t=a.useRef(Zr(e)),r=a.useRef(!1),n=Vt(),o=a.useMemo(function(){return function(e,t){var r=Zr(e);return t&&t.forEach(function(e,n){r.has(n)||t.getAll(n).forEach(function(e){r.append(n,e)})}),r}(n.search,r.current?null:t.current)},[n.search]),i=Xt(),u=a.useCallback(function(e,t){var n=Zr("function"==typeof e?e(o):e);r.current=!0,i("?"+n,t)},[i,o]);return[o,u]}(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(xn||(xn={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(kn||(kn={}));var Un=0,Fn=function(){return"__"+String(++Un)+"__"};function In(){var e=Tn(xn.UseSubmit).router,t=a.useContext(Bt).basename,r=vr();return a.useCallback(function(n,a){void 0===a&&(a={}),function(){if("undefined"==typeof document)throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.")}();var o=function(e,t){var r,n,a,o,i,u;if(Qr(u=e)&&"form"===u.tagName.toLowerCase()){var s=e.getAttribute("action");n=s?ie(s,t):null,r=e.getAttribute("method")||Xr,a=rn(e.getAttribute("enctype"))||Gr,o=new FormData(e)}else if(function(e){return Qr(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return Qr(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){var c=e.form;if(null==c)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');var l=e.getAttribute("formaction")||c.getAttribute("action");if(n=l?ie(l,t):null,r=e.getAttribute("formmethod")||c.getAttribute("method")||Xr,a=rn(e.getAttribute("formenctype"))||rn(c.getAttribute("enctype"))||Gr,o=new FormData(c,e),!function(){if(null===en)try{new FormData(document.createElement("form"),0),en=!1}catch(e){en=!0}return en}()){var f=e.name,d=e.type,h=e.value;if("image"===d){var v=f?f+".":"";o.append(v+"x","0"),o.append(v+"y","0")}else f&&o.append(f,h)}}else{if(Qr(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Xr,n=null,a=Gr,i=e}return o&&"text/plain"===a&&(i=o,o=void 0),{action:n,method:r.toLowerCase(),encType:a,formData:o,body:i}}(n,t),i=o.action,u=o.method,s=o.encType,c=o.formData,l=o.body;if(!1===a.navigate){var f=a.fetcherKey||Fn();e.fetch(f,r,a.action||i,{preventScrollReset:a.preventScrollReset,formData:c,body:l,formMethod:a.method||u,formEncType:a.encType||s,flushSync:a.flushSync})}else e.navigate(a.action||i,{preventScrollReset:a.preventScrollReset,formData:c,body:l,formMethod:a.method||u,formEncType:a.encType||s,replace:a.replace,state:a.state,fromRouteId:r,flushSync:a.flushSync,viewTransition:a.viewTransition})},[e,t,r])}function Nn(e,t){var r=(void 0===t?{}:t).relative,n=a.useContext(Bt).basename,o=a.useContext(Ht);o||O(!1);var i=Jr(o.matches.slice(-1),1)[0],u=qr({},tr(e||".",{relative:r})),s=Vt();if(null==e){u.search=s.search;var c=new URLSearchParams(u.search),l=c.getAll("index");if(l.some(function(e){return""===e})){c.delete("index"),l.filter(function(e){return e}).forEach(function(e){return c.append("index",e)});var f=c.toString();u.search=f?"?"+f:""}}return e&&"."!==e||!i.route.index||(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),"/"!==n&&(u.pathname="/"===u.pathname?n:de([n,u.pathname])),I(u)}function Bn(e){var t,r=(void 0===e?{}:e).key,n=Tn(xn.UseFetcher).router,o=jn(kn.UseFetcher),i=a.useContext(dn),u=a.useContext(Ht),s=null==(t=u.matches[u.matches.length-1])?void 0:t.route.id;i||O(!1),u||O(!1),null==s&&O(!1);var c=pn?pn():"",l=Jr(a.useState(r||c),2),f=l[0],d=l[1];r&&r!==f?d(r):f||d(Fn()),a.useEffect(function(){return n.getFetcher(f),function(){n.deleteFetcher(f)}},[n,f]);var h=a.useCallback(function(e,t){s||O(!1),n.fetch(f,s,e,t)},[f,s,n]),v=In(),p=a.useCallback(function(e,t){v(e,qr({},t,{navigate:!1,fetcherKey:f}))},[f,v]),m=a.useMemo(function(){return a.forwardRef(function(e,t){return a.createElement(_n,qr({},e,{navigate:!1,fetcherKey:f,ref:t}))})},[f]),y=o.fetchers.get(f)||Te,b=i.get(f);return a.useMemo(function(){return qr({Form:m,submit:p,load:h},y,{data:b})},[m,p,h,y,b])}function zn(){var e=jn(kn.UseFetchers);return Array.from(e.fetchers.entries()).map(function(e){var t=Jr(e,2),r=t[0];return qr({},t[1],{key:r})})}var Hn="react-router-scroll-positions",Wn={};function Kn(e){var t,r,n=void 0===e?{}:e,o=n.getKey,i=n.storageKey,u=Tn(xn.UseScrollRestoration).router,s=jn(kn.UseScrollRestoration),c=s.restoreScrollPosition,l=s.preventScrollReset,f=a.useContext(Bt).basename,d=Vt(),h=yr(),v=pr();a.useEffect(function(){return window.history.scrollRestoration="manual",function(){window.history.scrollRestoration="auto"}},[]),t=a.useCallback(function(){if("idle"===v.state){var e=(o?o(d,h):null)||d.key;Wn[e]=window.scrollY}try{sessionStorage.setItem(i||Hn,JSON.stringify(Wn))}catch(e){}window.history.scrollRestoration="auto"},[i,o,v.state,d,h]),r={}.capture,a.useEffect(function(){var e=null!=r?{capture:r}:void 0;return window.addEventListener("pagehide",t,e),function(){window.removeEventListener("pagehide",t,e)}},[t,r]),"undefined"!=typeof document&&(a.useLayoutEffect(function(){try{var e=sessionStorage.getItem(i||Hn);e&&(Wn=JSON.parse(e))}catch(e){}},[i]),a.useLayoutEffect(function(){var e=o&&"/"!==f?function(e,t){return o(qr({},e,{pathname:ie(e.pathname,f)||e.pathname}),t)}:o,t=null==u?void 0:u.enableScrollRestoration(Wn,function(){return window.scrollY},e);return function(){return t&&t()}},[u,f,o]),a.useLayoutEffect(function(){if(!1!==c)if("number"!=typeof c){if(d.hash){var e=document.getElementById(decodeURIComponent(d.hash.slice(1)));if(e)return void e.scrollIntoView()}!0!==l&&window.scrollTo(0,0)}else window.scrollTo(0,c)},[d,c,l]))}function $n(e,t){var r=(t||{}).capture;a.useEffect(function(){var t=null!=r?{capture:r}:void 0;return window.addEventListener("beforeunload",e,t),function(){window.removeEventListener("beforeunload",e,t)}},[e,r])}function Vn(e){var t=e.when,r=e.message,n=kr(t);a.useEffect(function(){"blocked"===n.state&&(window.confirm(r)?setTimeout(n.proceed,0):n.reset())},[n,r]),a.useEffect(function(){"blocked"!==n.state||t||n.reset()},[n,t])}function Jn(e,t){void 0===t&&(t={});var r=a.useContext(fn);null==r&&O(!1);var n=Tn(xn.useViewTransitionState).basename,o=tr(e,{relative:t.relative});if(!r.isTransitioning)return!1;var i=ie(r.currentLocation.pathname,n)||r.currentLocation.pathname,u=ie(r.nextLocation.pathname,n)||r.nextLocation.pathname;return null!=ae(o.pathname,u)||null!=ae(o.pathname,i)}}}]);
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @remix-run/router v1.15.0
2
+ * @remix-run/router v1.23.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -10,7 +10,7 @@
10
10
  */
11
11
 
12
12
  /**
13
- * React Router DOM v6.22.0
13
+ * React Router DOM v6.30.1
14
14
  *
15
15
  * Copyright (c) Remix Software Inc.
16
16
  *
@@ -21,7 +21,7 @@
21
21
  */
22
22
 
23
23
  /**
24
- * React Router v6.22.0
24
+ * React Router v6.30.1
25
25
  *
26
26
  * Copyright (c) Remix Software Inc.
27
27
  *