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pH,MAAMsI,gBAAgBlB,KAAKpH,MAAMkI,QAAQ,EAAEjE,CAAC,CAA9Y,CAAgZL,GAAG,IAAItE,EAAE,CAAC8gB,UAAUxZ,EAAEyM,KAAK,KAAKzP,GAAGyc,MAAMthB,EAAEsU,KAAK,KAAKzP,GAAG6D,QAAQjJ,EAAE6U,KAAK,KAAKzP,IAAI,OAAOA,EAAE0C,kBAAkBhH,EAAEghB,OAAOtiB,EAAEqV,KAAK,KAAKzP,IAAItE,CAAC,CiDK9wHihB,CAAe,CAChCxa,MAAAA,EAAAA,QACAE,eAAAA,EACAC,cAAe,WAAF,OAAQ,IAAI,EACzBE,cAAa,SAACjE,EAAKqe,EAAMxgB,GAEvB,OAAO,IACT,IAGaogB,GAA8BJ,GAA9BI,UAAWC,GAAmBL,GAAnBK,MAAO5Y,GAAYuY,GAAZvY","sources":["webpack://client-routes/./node_modules/react-dom/client.js","webpack://client-routes/./node_modules/react/cjs/react-jsx-runtime.production.min.js","webpack://client-routes/./node_modules/react/jsx-runtime.js","webpack://client-routes/./node_modules/systemjs-webpack-interop/auto-public-path/auto-public-path.js","webpack://client-routes/./node_modules/systemjs-webpack-interop/public-path.js","webpack://client-routes/external system \"@ecosystem/newron-client-lib\"","webpack://client-routes/external system \"@ecosystem/newron-design-system\"","webpack://client-routes/external system \"react\"","webpack://client-routes/external system \"react-dom\"","webpack://client-routes/webpack/bootstrap","webpack://client-routes/webpack/runtime/__system_context__","webpack://client-routes/webpack/runtime/define property getters","webpack://client-routes/webpack/runtime/hasOwnProperty shorthand","webpack://client-routes/webpack/runtime/make namespace object","webpack://client-routes/webpack/runtime/publicPath","webpack://client-routes/./node_modules/systemjs-webpack-interop/auto-public-path/1.js","webpack://client-routes/./src/set-public-path.ts","webpack://client-routes/./node_modules/single-spa-react/lib/esm/single-spa-react.js","webpack://client-routes/./node_modules/@remix-run/router/dist/router.js","webpack://client-routes/./node_modules/@babel/runtime/helpers/esm/classCallCheck.js","webpack://client-routes/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://client-routes/./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://client-routes/./node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://client-routes/./node_modules/@babel/runtime/helpers/esm/createClass.js","webpack://client-routes/./node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://client-routes/./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","webpack://client-routes/./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","webpack://client-routes/./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","webpack://client-routes/./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","webpack://client-routes/./node_modules/@babel/runtime/helpers/esm/iterableToArray.js","webpack://client-routes/./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","webpack://client-routes/./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://client-routes/./src/tools/deferred.ts","webpack://client-routes/./src/tools/authorisationCache.ts","webpack://client-routes/./node_modules/@babel/runtime/helpers/esm/slicedToArray.js","webpack://client-routes/./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","webpack://client-routes/./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","webpack://client-routes/./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","webpack://client-routes/./src/configs/utils/personaProducts.ts","webpack://client-routes/./src/configs/utils/query.ts","webpack://client-routes/./src/configs/consumer/index.tsx","webpack://client-routes/./src/configs/utils/accessChecker.ts","webpack://client-routes/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://client-routes/./node_modules/@babel/runtime/helpers/esm/inherits.js","webpack://client-routes/./src/configs/distribution/index.tsx","webpack://client-routes/./src/configs/market/utils.ts","webpack://client-routes/./src/configs/market/globalSummary.tsx","webpack://client-routes/./src/configs/marketPredictHelpers/types.ts","webpack://client-routes/./src/configs/utils/startrack.ts","webpack://client-routes/./src/configs/market/market.tsx","webpack://client-routes/./src/configs/market/index.ts","webpack://client-routes/./src/configs/mi2/index.tsx","webpack://client-routes/./src/configs/platform/collections.tsx","webpack://client-routes/./src/configs/platform/dataForge.tsx","webpack://client-routes/./src/configs/platform/index.ts","webpack://client-routes/./src/configs/predict/recommendations.tsx","webpack://client-routes/./src/configs/predict/promoPlanning.tsx","webpack://client-routes/./src/configs/predict/forecasting.tsx","webpack://client-routes/./src/configs/predict/revenuePremium.tsx","webpack://client-routes/./src/configs/predict/performanceDrivers.tsx","webpack://client-routes/./src/configs/predict/index.tsx","webpack://client-routes/./src/configs/retail/insights.tsx","webpack://client-routes/./src/configs/retail/index.ts","webpack://client-routes/./src/configs/registry.ts","webpack://client-routes/./src/manager/manager.ts","webpack://client-routes/./src/tools/useRoute.tsx","webpack://client-routes/./src/newron-client-routes.ts"],"sourcesContent":["'use strict';\n\nvar m = require('react-dom');\nif (process.env.NODE_ENV === 'production') {\n  exports.createRoot = m.createRoot;\n  exports.hydrateRoot = m.hydrateRoot;\n} else {\n  var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n  exports.createRoot = function(c, o) {\n    i.usingClientEntryPoint = true;\n    try {\n      return m.createRoot(c, o);\n    } finally {\n      i.usingClientEntryPoint = false;\n    }\n  };\n  exports.hydrateRoot = function(c, h, o) {\n    i.usingClientEntryPoint = true;\n    try {\n      return m.hydrateRoot(c, h, o);\n    } finally {\n      i.usingClientEntryPoint = false;\n    }\n  };\n}\n","/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n  module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","const resolveDirectory = require(\"../public-path\").resolveDirectory;\n\nexports.autoPublicPath = function autoPublicPath(rootDirLevel) {\n  if (!rootDirLevel) {\n    rootDirLevel = 1;\n  }\n\n  if (typeof __webpack_public_path__ !== \"undefined\") {\n    if (typeof __system_context__ === \"undefined\") {\n      throw Error(\n        \"systemjs-webpack-interop requires webpack@>=5.0.0-beta.15 and output.libraryTarget set to 'system'\"\n      );\n    }\n\n    if (!__system_context__.meta || !__system_context__.meta.url) {\n      console.error(\"__system_context__\", __system_context__);\n      throw Error(\n        \"systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided\"\n      );\n    }\n\n    __webpack_public_path__ = resolveDirectory(\n      __system_context__.meta.url,\n      rootDirLevel\n    );\n  }\n};\n","exports.setPublicPath = function setPublicPath(\n  systemjsModuleName,\n  rootDirectoryLevel\n) {\n  if (!rootDirectoryLevel) {\n    rootDirectoryLevel = 1;\n  }\n  if (\n    typeof systemjsModuleName !== \"string\" ||\n    systemjsModuleName.trim().length === 0\n  ) {\n    throw Error(\n      \"systemjs-webpack-interop: setPublicPath(systemjsModuleName) must be called with a non-empty string 'systemjsModuleName'\"\n    );\n  }\n\n  if (\n    typeof rootDirectoryLevel !== \"number\" ||\n    rootDirectoryLevel <= 0 ||\n    isNaN(rootDirectoryLevel) ||\n    !isInteger(rootDirectoryLevel)\n  ) {\n    throw Error(\n      \"systemjs-webpack-interop: setPublicPath(systemjsModuleName, rootDirectoryLevel) must be called with a positive integer 'rootDirectoryLevel'\"\n    );\n  }\n\n  var moduleUrl;\n  try {\n    moduleUrl = window.System.resolve(systemjsModuleName);\n    if (!moduleUrl) {\n      throw Error();\n    }\n  } catch (err) {\n    throw Error(\n      \"systemjs-webpack-interop: There is no such module '\" +\n        systemjsModuleName +\n        \"' in the SystemJS registry. Did you misspell the name of your module?\"\n    );\n  }\n\n  __webpack_public_path__ = resolveDirectory(moduleUrl, rootDirectoryLevel);\n};\n\nfunction resolveDirectory(urlString, rootDirectoryLevel) {\n  // Our friend IE11 doesn't support new URL()\n  // https://github.com/single-spa/single-spa/issues/612\n  // https://gist.github.com/jlong/2428561\n\n  var a = document.createElement(\"a\");\n  a.href = urlString;\n\n  var pathname = a.pathname[0] === \"/\" ? a.pathname : \"/\" + a.pathname;\n  var numDirsProcessed = 0,\n    index = pathname.length;\n  while (numDirsProcessed !== rootDirectoryLevel && index >= 0) {\n    var char = pathname[--index];\n    if (char === \"/\") {\n      numDirsProcessed++;\n    }\n  }\n\n  if (numDirsProcessed !== rootDirectoryLevel) {\n    throw Error(\n      \"systemjs-webpack-interop: rootDirectoryLevel (\" +\n        rootDirectoryLevel +\n        \") is greater than the number of directories (\" +\n        numDirsProcessed +\n        \") in the URL path \" +\n        urlString\n    );\n  }\n\n  var finalPath = pathname.slice(0, index + 1);\n\n  return a.protocol + \"//\" + a.host + finalPath;\n}\n\nexports.resolveDirectory = resolveDirectory;\n\n// borrowed from https://github.com/parshap/js-is-integer/blob/master/index.js\nvar isInteger =\n  Number.isInteger ||\n  function isInteger(val) {\n    return typeof val === \"number\" && isFinite(val) && Math.floor(val) === val;\n  };\n","module.exports = __WEBPACK_EXTERNAL_MODULE__425__;","module.exports = __WEBPACK_EXTERNAL_MODULE__936__;","module.exports = __WEBPACK_EXTERNAL_MODULE__726__;","module.exports = __WEBPACK_EXTERNAL_MODULE__867__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","__webpack_require__.y = __system_context__;","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.p = \"\";","const autoPublicPath = require(\"./auto-public-path\").autoPublicPath;\n\nautoPublicPath(1);\n","import { setPublicPath } from 'systemjs-webpack-interop';\nsetPublicPath('@ecosystem/newron-client-routes');\n","function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function t(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?e(Object(r),!0).forEach((function(e){o(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):e(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function n(e){return(n=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e})(e)}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e){return(r=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e})(e)}function a(e,t){var n;if(\"function\"!=typeof(n=t.domElement?function(){return t.domElement}:t.domElementGetter?t.domElementGetter:e.domElementGetter?e.domElementGetter:function(e){var t=e.appName||e.name;if(!t)throw Error(\"single-spa's dom-element-getter-helpers was not given an application name as a prop, so it can't make a unique dom element container for the react application\");var n=\"single-spa-application:\".concat(t);return function(){var e=document.getElementById(n);return e||((e=document.createElement(\"div\")).id=n,document.body.appendChild(e)),e}}(t)))throw Error(\"single-spa's dom-element-getter-helpers was given an invalid domElementGetter for application or parcel '\".concat(t.name,\"'. Expected a function, received \").concat(r(n)));return function(){var e=n(t);if(!(e instanceof HTMLElement))throw Error(\"single-spa's dom-element-getter-helpers: domElementGetter returned an invalid dom element for application or parcel '\".concat(t.name,\"'. Expected HTMLElement, received \").concat(r(e)));return e}}var c=null;try{c=require(\"react\").createContext()}catch(e){}var u={React:null,ReactDOM:null,ReactDOMClient:null,rootComponent:null,loadRootComponent:null,errorBoundary:null,errorBoundaryClass:null,domElementGetter:null,parcelCanUpdate:!0,suppressComponentDidCatchWarning:!1,domElements:{},renderResults:{},updateResolves:{},unmountResolves:{}};function i(e){if(\"object\"!==n(e))throw new Error(\"single-spa-react requires a configuration object\");var o,r=t(t({},u),e);if(!r.React)throw new Error(\"single-spa-react must be passed opts.React\");if(!r.ReactDOM&&!r.ReactDOMClient)throw new Error(\"single-spa-react must be passed opts.ReactDOM or opts.ReactDOMClient\");r.renderType||(null!==(o=r.ReactDOMClient)&&void 0!==o&&o.createRoot?r.renderType=\"createRoot\":r.renderType=\"render\");if(!r.rootComponent&&!r.loadRootComponent)throw new Error(\"single-spa-react must be passed opts.rootComponent or opts.loadRootComponent\");if(r.errorBoundary&&\"function\"!=typeof r.errorBoundary)throw Error(\"The errorBoundary opt for single-spa-react must either be omitted or be a function that returns React elements\");!c&&r.React.createContext&&(c=r.React.createContext()),r.SingleSpaRoot=function(e){function t(e){t.displayName=\"SingleSpaRoot(\".concat(e.name,\")\")}return t.prototype=Object.create(e.React.Component.prototype),t.prototype.componentDidMount=function(){setTimeout(this.props.mountFinished)},t.prototype.componentWillUnmount=function(){setTimeout(this.props.unmountFinished)},t.prototype.render=function(){return setTimeout(this.props.updateFinished),this.props.children},t}(r);var a={bootstrap:s.bind(null,r),mount:p.bind(null,r),unmount:l.bind(null,r)};return r.parcelCanUpdate&&(a.update=m.bind(null,r)),a}function s(e,t){return e.rootComponent?Promise.resolve():e.loadRootComponent(t).then((function(t){e.rootComponent=t}))}function p(e,t){return new Promise((function(n,o){e.suppressComponentDidCatchWarning||!function(e){if(!(e&&\"string\"==typeof e.version&&e.version.indexOf(\".\")>=0))return!1;var t=e.version.slice(0,e.version.indexOf(\".\"));try{return Number(t)>=16}catch(e){return!1}}(e.React)||e.errorBoundary||e.errorBoundaryClass||(e.rootComponent.prototype?e.rootComponent.prototype.componentDidCatch||console.warn(\"single-spa-react: \".concat(t.name||t.appName||t.childAppName,\"'s rootComponent should implement componentDidCatch to avoid accidentally unmounting the entire single-spa application.\")):console.warn(\"single-spa-react: \".concat(t.name||t.appName||t.childAppName,\"'s rootComponent does not implement an error boundary.  If using a functional component, consider providing an opts.errorBoundary to singleSpaReact(opts).\")));var r=y(e,t,(function(){n(this)})),c=a(e,t)(),u=function(e){var t=e.reactDom,n=e.renderType,o=e.elementToRender,r=e.domElement,a=t[n];if(\"function\"!=typeof a)throw new Error('renderType \"'.concat(n,'\" did not return a function.'));switch(n){case\"createRoot\":case\"unstable_createRoot\":case\"createBlockingRoot\":case\"unstable_createBlockingRoot\":var c=a(r);return c.render(o),c;case\"hydrateRoot\":return a(r,o);case\"hydrate\":default:return a(o,r),null}}({elementToRender:r,domElement:c,reactDom:d(e),renderType:f(e)});e.domElements[t.name]=c,e.renderResults[t.name]=u}))}function l(e,t){return new Promise((function(n){e.unmountResolves[t.name]=n;var o=e.renderResults[t.name];o&&o.unmount?o.unmount():d(e).unmountComponentAtNode(e.domElements[t.name]),delete e.domElements[t.name],delete e.renderResults[t.name]}))}function m(e,t){return new Promise((function(n){e.updateResolves[t.name]||(e.updateResolves[t.name]=[]),e.updateResolves[t.name].push(n);var o=y(e,t,null),r=e.renderResults[t.name];if(r&&r.render)r.render(o);else{var c=a(e,t)();d(e).render(o,c)}}))}function d(e){return e.ReactDOMClient||e.ReactDOM}function f(e){return\"function\"==typeof e.renderType?e.renderType():e.renderType}function y(e,n,o){var r=e.React.createElement(e.rootComponent,n),a=c?e.React.createElement(c.Provider,{value:n},r):r;return(e.errorBoundary||n.errorBoundary||e.errorBoundaryClass||n.errorBoundaryClass)&&(e.errorBoundaryClass=e.errorBoundaryClass||n.errorBoundaryClass||function(e,t){function n(t){e.React.Component.apply(this,arguments),this.state={caughtError:null,caughtErrorInfo:null},n.displayName=\"SingleSpaReactErrorBoundary(\".concat(t.name,\")\")}return n.prototype=Object.create(e.React.Component.prototype),n.prototype.render=function(){return this.state.caughtError?(e.errorBoundary||t.errorBoundary)(this.state.caughtError,this.state.caughtErrorInfo,this.props):this.props.children},n.prototype.componentDidCatch=function(e,t){this.setState({caughtError:e,caughtErrorInfo:t})},n}(e,n),a=e.React.createElement(e.errorBoundaryClass,n,a)),a=e.React.createElement(e.SingleSpaRoot,t(t({},n),{},{mountFinished:o,updateFinished:function(){e.updateResolves[n.name]&&(e.updateResolves[n.name].forEach((function(e){return e()})),delete e.updateResolves[n.name])},unmountFinished:function(){e.unmountResolves[n.name]&&(e.unmountResolves[n.name](),delete e.unmountResolves[n.name])}}),a)}export{c as SingleSpaContext,i as default};\n//# sourceMappingURL=single-spa-react.js.map\n","/**\n * @remix-run/router v1.17.1\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\nfunction _extends() {\n  _extends = Object.assign ? Object.assign.bind() : function (target) {\n    for (var i = 1; i < arguments.length; i++) {\n      var source = arguments[i];\n      for (var key in source) {\n        if (Object.prototype.hasOwnProperty.call(source, key)) {\n          target[key] = source[key];\n        }\n      }\n    }\n    return target;\n  };\n  return _extends.apply(this, arguments);\n}\n\n////////////////////////////////////////////////////////////////////////////////\n//#region Types and Constants\n////////////////////////////////////////////////////////////////////////////////\n/**\n * Actions represent the type of change to a location value.\n */\nvar Action;\n(function (Action) {\n  /**\n   * A POP indicates a change to an arbitrary index in the history stack, such\n   * as a back or forward navigation. It does not describe the direction of the\n   * navigation, only that the current index changed.\n   *\n   * Note: This is the default action for newly created history objects.\n   */\n  Action[\"Pop\"] = \"POP\";\n  /**\n   * A PUSH indicates a new entry being added to the history stack, such as when\n   * a link is clicked and a new page loads. When this happens, all subsequent\n   * entries in the stack are lost.\n   */\n  Action[\"Push\"] = \"PUSH\";\n  /**\n   * A REPLACE indicates the entry at the current index in the history stack\n   * being replaced by a new one.\n   */\n  Action[\"Replace\"] = \"REPLACE\";\n})(Action || (Action = {}));\nconst PopStateEventType = \"popstate\";\n/**\n * Memory history stores the current location in memory. It is designed for use\n * in stateful non-browser environments like tests and React Native.\n */\nfunction createMemoryHistory(options) {\n  if (options === void 0) {\n    options = {};\n  }\n  let {\n    initialEntries = [\"/\"],\n    initialIndex,\n    v5Compat = false\n  } = options;\n  let entries; // Declare so we can access from createMemoryLocation\n  entries = initialEntries.map((entry, index) => createMemoryLocation(entry, typeof entry === \"string\" ? null : entry.state, index === 0 ? \"default\" : undefined));\n  let index = clampIndex(initialIndex == null ? entries.length - 1 : initialIndex);\n  let action = Action.Pop;\n  let listener = null;\n  function clampIndex(n) {\n    return Math.min(Math.max(n, 0), entries.length - 1);\n  }\n  function getCurrentLocation() {\n    return entries[index];\n  }\n  function createMemoryLocation(to, state, key) {\n    if (state === void 0) {\n      state = null;\n    }\n    let location = createLocation(entries ? getCurrentLocation().pathname : \"/\", to, state, key);\n    warning(location.pathname.charAt(0) === \"/\", \"relative pathnames are not supported in memory history: \" + JSON.stringify(to));\n    return location;\n  }\n  function createHref(to) {\n    return typeof to === \"string\" ? to : createPath(to);\n  }\n  let history = {\n    get index() {\n      return index;\n    },\n    get action() {\n      return action;\n    },\n    get location() {\n      return getCurrentLocation();\n    },\n    createHref,\n    createURL(to) {\n      return new URL(createHref(to), \"http://localhost\");\n    },\n    encodeLocation(to) {\n      let path = typeof to === \"string\" ? parsePath(to) : to;\n      return {\n        pathname: path.pathname || \"\",\n        search: path.search || \"\",\n        hash: path.hash || \"\"\n      };\n    },\n    push(to, state) {\n      action = Action.Push;\n      let nextLocation = createMemoryLocation(to, state);\n      index += 1;\n      entries.splice(index, entries.length, nextLocation);\n      if (v5Compat && listener) {\n        listener({\n          action,\n          location: nextLocation,\n          delta: 1\n        });\n      }\n    },\n    replace(to, state) {\n      action = Action.Replace;\n      let nextLocation = createMemoryLocation(to, state);\n      entries[index] = nextLocation;\n      if (v5Compat && listener) {\n        listener({\n          action,\n          location: nextLocation,\n          delta: 0\n        });\n      }\n    },\n    go(delta) {\n      action = Action.Pop;\n      let nextIndex = clampIndex(index + delta);\n      let nextLocation = entries[nextIndex];\n      index = nextIndex;\n      if (listener) {\n        listener({\n          action,\n          location: nextLocation,\n          delta\n        });\n      }\n    },\n    listen(fn) {\n      listener = fn;\n      return () => {\n        listener = null;\n      };\n    }\n  };\n  return history;\n}\n/**\n * Browser history stores the location in regular URLs. This is the standard for\n * most web apps, but it requires some configuration on the server to ensure you\n * serve the same app at multiple URLs.\n *\n * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createbrowserhistory\n */\nfunction createBrowserHistory(options) {\n  if (options === void 0) {\n    options = {};\n  }\n  function createBrowserLocation(window, globalHistory) {\n    let {\n      pathname,\n      search,\n      hash\n    } = window.location;\n    return createLocation(\"\", {\n      pathname,\n      search,\n      hash\n    },\n    // state defaults to `null` because `window.history.state` does\n    globalHistory.state && globalHistory.state.usr || null, globalHistory.state && globalHistory.state.key || \"default\");\n  }\n  function createBrowserHref(window, to) {\n    return typeof to === \"string\" ? to : createPath(to);\n  }\n  return getUrlBasedHistory(createBrowserLocation, createBrowserHref, null, options);\n}\n/**\n * Hash history stores the location in window.location.hash. This makes it ideal\n * for situations where you don't want to send the location to the server for\n * some reason, either because you do cannot configure it or the URL space is\n * reserved for something else.\n *\n * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createhashhistory\n */\nfunction createHashHistory(options) {\n  if (options === void 0) {\n    options = {};\n  }\n  function createHashLocation(window, globalHistory) {\n    let {\n      pathname = \"/\",\n      search = \"\",\n      hash = \"\"\n    } = parsePath(window.location.hash.substr(1));\n    // Hash URL should always have a leading / just like window.location.pathname\n    // does, so if an app ends up at a route like /#something then we add a\n    // leading slash so all of our path-matching behaves the same as if it would\n    // in a browser router.  This is particularly important when there exists a\n    // root splat route (<Route path=\"*\">) since that matches internally against\n    // \"/*\" and we'd expect /#something to 404 in a hash router app.\n    if (!pathname.startsWith(\"/\") && !pathname.startsWith(\".\")) {\n      pathname = \"/\" + pathname;\n    }\n    return createLocation(\"\", {\n      pathname,\n      search,\n      hash\n    },\n    // state defaults to `null` because `window.history.state` does\n    globalHistory.state && globalHistory.state.usr || null, globalHistory.state && globalHistory.state.key || \"default\");\n  }\n  function createHashHref(window, to) {\n    let base = window.document.querySelector(\"base\");\n    let href = \"\";\n    if (base && base.getAttribute(\"href\")) {\n      let url = window.location.href;\n      let hashIndex = url.indexOf(\"#\");\n      href = hashIndex === -1 ? url : url.slice(0, hashIndex);\n    }\n    return href + \"#\" + (typeof to === \"string\" ? to : createPath(to));\n  }\n  function validateHashLocation(location, to) {\n    warning(location.pathname.charAt(0) === \"/\", \"relative pathnames are not supported in hash history.push(\" + JSON.stringify(to) + \")\");\n  }\n  return getUrlBasedHistory(createHashLocation, createHashHref, validateHashLocation, options);\n}\nfunction invariant(value, message) {\n  if (value === false || value === null || typeof value === \"undefined\") {\n    throw new Error(message);\n  }\n}\nfunction warning(cond, message) {\n  if (!cond) {\n    // eslint-disable-next-line no-console\n    if (typeof console !== \"undefined\") console.warn(message);\n    try {\n      // Welcome to debugging history!\n      //\n      // This error is thrown as a convenience, so you can more easily\n      // find the source for a warning that appears in the console by\n      // enabling \"pause on exceptions\" in your JavaScript debugger.\n      throw new Error(message);\n      // eslint-disable-next-line no-empty\n    } catch (e) {}\n  }\n}\nfunction createKey() {\n  return Math.random().toString(36).substr(2, 8);\n}\n/**\n * For browser-based histories, we combine the state and key into an object\n */\nfunction getHistoryState(location, index) {\n  return {\n    usr: location.state,\n    key: location.key,\n    idx: index\n  };\n}\n/**\n * Creates a Location object with a unique key from the given Path\n */\nfunction createLocation(current, to, state, key) {\n  if (state === void 0) {\n    state = null;\n  }\n  let location = _extends({\n    pathname: typeof current === \"string\" ? current : current.pathname,\n    search: \"\",\n    hash: \"\"\n  }, typeof to === \"string\" ? parsePath(to) : to, {\n    state,\n    // TODO: This could be cleaned up.  push/replace should probably just take\n    // full Locations now and avoid the need to run through this flow at all\n    // But that's a pretty big refactor to the current test suite so going to\n    // keep as is for the time being and just let any incoming keys take precedence\n    key: to && to.key || key || createKey()\n  });\n  return location;\n}\n/**\n * Creates a string URL path from the given pathname, search, and hash components.\n */\nfunction createPath(_ref) {\n  let {\n    pathname = \"/\",\n    search = \"\",\n    hash = \"\"\n  } = _ref;\n  if (search && search !== \"?\") pathname += search.charAt(0) === \"?\" ? search : \"?\" + search;\n  if (hash && hash !== \"#\") pathname += hash.charAt(0) === \"#\" ? hash : \"#\" + hash;\n  return pathname;\n}\n/**\n * Parses a string URL path into its separate pathname, search, and hash components.\n */\nfunction parsePath(path) {\n  let parsedPath = {};\n  if (path) {\n    let hashIndex = path.indexOf(\"#\");\n    if (hashIndex >= 0) {\n      parsedPath.hash = path.substr(hashIndex);\n      path = path.substr(0, hashIndex);\n    }\n    let searchIndex = path.indexOf(\"?\");\n    if (searchIndex >= 0) {\n      parsedPath.search = path.substr(searchIndex);\n      path = path.substr(0, searchIndex);\n    }\n    if (path) {\n      parsedPath.pathname = path;\n    }\n  }\n  return parsedPath;\n}\nfunction getUrlBasedHistory(getLocation, createHref, validateLocation, options) {\n  if (options === void 0) {\n    options = {};\n  }\n  let {\n    window = document.defaultView,\n    v5Compat = false\n  } = options;\n  let globalHistory = window.history;\n  let action = Action.Pop;\n  let listener = null;\n  let index = getIndex();\n  // Index should only be null when we initialize. If not, it's because the\n  // user called history.pushState or history.replaceState directly, in which\n  // case we should log a warning as it will result in bugs.\n  if (index == null) {\n    index = 0;\n    globalHistory.replaceState(_extends({}, globalHistory.state, {\n      idx: index\n    }), \"\");\n  }\n  function getIndex() {\n    let state = globalHistory.state || {\n      idx: null\n    };\n    return state.idx;\n  }\n  function handlePop() {\n    action = Action.Pop;\n    let nextIndex = getIndex();\n    let delta = nextIndex == null ? null : nextIndex - index;\n    index = nextIndex;\n    if (listener) {\n      listener({\n        action,\n        location: history.location,\n        delta\n      });\n    }\n  }\n  function push(to, state) {\n    action = Action.Push;\n    let location = createLocation(history.location, to, state);\n    if (validateLocation) validateLocation(location, to);\n    index = getIndex() + 1;\n    let historyState = getHistoryState(location, index);\n    let url = history.createHref(location);\n    // try...catch because iOS limits us to 100 pushState calls :/\n    try {\n      globalHistory.pushState(historyState, \"\", url);\n    } catch (error) {\n      // If the exception is because `state` can't be serialized, let that throw\n      // outwards just like a replace call would so the dev knows the cause\n      // https://html.spec.whatwg.org/multipage/nav-history-apis.html#shared-history-push/replace-state-steps\n      // https://html.spec.whatwg.org/multipage/structured-data.html#structuredserializeinternal\n      if (error instanceof DOMException && error.name === \"DataCloneError\") {\n        throw error;\n      }\n      // They are going to lose state here, but there is no real\n      // way to warn them about it since the page will refresh...\n      window.location.assign(url);\n    }\n    if (v5Compat && listener) {\n      listener({\n        action,\n        location: history.location,\n        delta: 1\n      });\n    }\n  }\n  function replace(to, state) {\n    action = Action.Replace;\n    let location = createLocation(history.location, to, state);\n    if (validateLocation) validateLocation(location, to);\n    index = getIndex();\n    let historyState = getHistoryState(location, index);\n    let url = history.createHref(location);\n    globalHistory.replaceState(historyState, \"\", url);\n    if (v5Compat && listener) {\n      listener({\n        action,\n        location: history.location,\n        delta: 0\n      });\n    }\n  }\n  function createURL(to) {\n    // window.location.origin is \"null\" (the literal string value) in Firefox\n    // under certain conditions, notably when serving from a local HTML file\n    // See https://bugzilla.mozilla.org/show_bug.cgi?id=878297\n    let base = window.location.origin !== \"null\" ? window.location.origin : window.location.href;\n    let href = typeof to === \"string\" ? to : createPath(to);\n    // Treating this as a full URL will strip any trailing spaces so we need to\n    // pre-encode them since they might be part of a matching splat param from\n    // an ancestor route\n    href = href.replace(/ $/, \"%20\");\n    invariant(base, \"No window.location.(origin|href) available to create URL for href: \" + href);\n    return new URL(href, base);\n  }\n  let history = {\n    get action() {\n      return action;\n    },\n    get location() {\n      return getLocation(window, globalHistory);\n    },\n    listen(fn) {\n      if (listener) {\n        throw new Error(\"A history only accepts one active listener\");\n      }\n      window.addEventListener(PopStateEventType, handlePop);\n      listener = fn;\n      return () => {\n        window.removeEventListener(PopStateEventType, handlePop);\n        listener = null;\n      };\n    },\n    createHref(to) {\n      return createHref(window, to);\n    },\n    createURL,\n    encodeLocation(to) {\n      // Encode a Location the same way window.location would\n      let url = createURL(to);\n      return {\n        pathname: url.pathname,\n        search: url.search,\n        hash: url.hash\n      };\n    },\n    push,\n    replace,\n    go(n) {\n      return globalHistory.go(n);\n    }\n  };\n  return history;\n}\n//#endregion\n\nvar ResultType;\n(function (ResultType) {\n  ResultType[\"data\"] = \"data\";\n  ResultType[\"deferred\"] = \"deferred\";\n  ResultType[\"redirect\"] = \"redirect\";\n  ResultType[\"error\"] = \"error\";\n})(ResultType || (ResultType = {}));\nconst immutableRouteKeys = new Set([\"lazy\", \"caseSensitive\", \"path\", \"id\", \"index\", \"children\"]);\nfunction isIndexRoute(route) {\n  return route.index === true;\n}\n// Walk the route tree generating unique IDs where necessary, so we are working\n// solely with AgnosticDataRouteObject's within the Router\nfunction convertRoutesToDataRoutes(routes, mapRouteProperties, parentPath, manifest) {\n  if (parentPath === void 0) {\n    parentPath = [];\n  }\n  if (manifest === void 0) {\n    manifest = {};\n  }\n  return routes.map((route, index) => {\n    let treePath = [...parentPath, String(index)];\n    let id = typeof route.id === \"string\" ? route.id : treePath.join(\"-\");\n    invariant(route.index !== true || !route.children, \"Cannot specify children on an index route\");\n    invariant(!manifest[id], \"Found a route id collision on id \\\"\" + id + \"\\\".  Route \" + \"id's must be globally unique within Data Router usages\");\n    if (isIndexRoute(route)) {\n      let indexRoute = _extends({}, route, mapRouteProperties(route), {\n        id\n      });\n      manifest[id] = indexRoute;\n      return indexRoute;\n    } else {\n      let pathOrLayoutRoute = _extends({}, route, mapRouteProperties(route), {\n        id,\n        children: undefined\n      });\n      manifest[id] = pathOrLayoutRoute;\n      if (route.children) {\n        pathOrLayoutRoute.children = convertRoutesToDataRoutes(route.children, mapRouteProperties, treePath, manifest);\n      }\n      return pathOrLayoutRoute;\n    }\n  });\n}\n/**\n * Matches the given routes to a location and returns the match data.\n *\n * @see https://reactrouter.com/utils/match-routes\n */\nfunction matchRoutes(routes, locationArg, basename) {\n  if (basename === void 0) {\n    basename = \"/\";\n  }\n  return matchRoutesImpl(routes, locationArg, basename, false);\n}\nfunction matchRoutesImpl(routes, locationArg, basename, allowPartial) {\n  let location = typeof locationArg === \"string\" ? parsePath(locationArg) : locationArg;\n  let pathname = stripBasename(location.pathname || \"/\", basename);\n  if (pathname == null) {\n    return null;\n  }\n  let branches = flattenRoutes(routes);\n  rankRouteBranches(branches);\n  let matches = null;\n  for (let i = 0; matches == null && i < branches.length; ++i) {\n    // Incoming pathnames are generally encoded from either window.location\n    // or from router.navigate, but we want to match against the unencoded\n    // paths in the route definitions.  Memory router locations won't be\n    // encoded here but there also shouldn't be anything to decode so this\n    // should be a safe operation.  This avoids needing matchRoutes to be\n    // history-aware.\n    let decoded = decodePath(pathname);\n    matches = matchRouteBranch(branches[i], decoded, allowPartial);\n  }\n  return matches;\n}\nfunction convertRouteMatchToUiMatch(match, loaderData) {\n  let {\n    route,\n    pathname,\n    params\n  } = match;\n  return {\n    id: route.id,\n    pathname,\n    params,\n    data: loaderData[route.id],\n    handle: route.handle\n  };\n}\nfunction flattenRoutes(routes, branches, parentsMeta, parentPath) {\n  if (branches === void 0) {\n    branches = [];\n  }\n  if (parentsMeta === void 0) {\n    parentsMeta = [];\n  }\n  if (parentPath === void 0) {\n    parentPath = \"\";\n  }\n  let flattenRoute = (route, index, relativePath) => {\n    let meta = {\n      relativePath: relativePath === undefined ? route.path || \"\" : relativePath,\n      caseSensitive: route.caseSensitive === true,\n      childrenIndex: index,\n      route\n    };\n    if (meta.relativePath.startsWith(\"/\")) {\n      invariant(meta.relativePath.startsWith(parentPath), \"Absolute route path \\\"\" + meta.relativePath + \"\\\" nested under path \" + (\"\\\"\" + parentPath + \"\\\" is not valid. An absolute child route path \") + \"must start with the combined path of all its parent routes.\");\n      meta.relativePath = meta.relativePath.slice(parentPath.length);\n    }\n    let path = joinPaths([parentPath, meta.relativePath]);\n    let routesMeta = parentsMeta.concat(meta);\n    // Add the children before adding this route to the array, so we traverse the\n    // route tree depth-first and child routes appear before their parents in\n    // the \"flattened\" version.\n    if (route.children && route.children.length > 0) {\n      invariant(\n      // Our types know better, but runtime JS may not!\n      // @ts-expect-error\n      route.index !== true, \"Index routes must not have child routes. Please remove \" + (\"all child routes from route path \\\"\" + path + \"\\\".\"));\n      flattenRoutes(route.children, branches, routesMeta, path);\n    }\n    // Routes without a path shouldn't ever match by themselves unless they are\n    // index routes, so don't add them to the list of possible branches.\n    if (route.path == null && !route.index) {\n      return;\n    }\n    branches.push({\n      path,\n      score: computeScore(path, route.index),\n      routesMeta\n    });\n  };\n  routes.forEach((route, index) => {\n    var _route$path;\n    // coarse-grain check for optional params\n    if (route.path === \"\" || !((_route$path = route.path) != null && _route$path.includes(\"?\"))) {\n      flattenRoute(route, index);\n    } else {\n      for (let exploded of explodeOptionalSegments(route.path)) {\n        flattenRoute(route, index, exploded);\n      }\n    }\n  });\n  return branches;\n}\n/**\n * Computes all combinations of optional path segments for a given path,\n * excluding combinations that are ambiguous and of lower priority.\n *\n * For example, `/one/:two?/three/:four?/:five?` explodes to:\n * - `/one/three`\n * - `/one/:two/three`\n * - `/one/three/:four`\n * - `/one/three/:five`\n * - `/one/:two/three/:four`\n * - `/one/:two/three/:five`\n * - `/one/three/:four/:five`\n * - `/one/:two/three/:four/:five`\n */\nfunction explodeOptionalSegments(path) {\n  let segments = path.split(\"/\");\n  if (segments.length === 0) return [];\n  let [first, ...rest] = segments;\n  // Optional path segments are denoted by a trailing `?`\n  let isOptional = first.endsWith(\"?\");\n  // Compute the corresponding required segment: `foo?` -> `foo`\n  let required = first.replace(/\\?$/, \"\");\n  if (rest.length === 0) {\n    // Intepret empty string as omitting an optional segment\n    // `[\"one\", \"\", \"three\"]` corresponds to omitting `:two` from `/one/:two?/three` -> `/one/three`\n    return isOptional ? [required, \"\"] : [required];\n  }\n  let restExploded = explodeOptionalSegments(rest.join(\"/\"));\n  let result = [];\n  // All child paths with the prefix.  Do this for all children before the\n  // optional version for all children, so we get consistent ordering where the\n  // parent optional aspect is preferred as required.  Otherwise, we can get\n  // child sections interspersed where deeper optional segments are higher than\n  // parent optional segments, where for example, /:two would explode _earlier_\n  // then /:one.  By always including the parent as required _for all children_\n  // first, we avoid this issue\n  result.push(...restExploded.map(subpath => subpath === \"\" ? required : [required, subpath].join(\"/\")));\n  // Then, if this is an optional value, add all child versions without\n  if (isOptional) {\n    result.push(...restExploded);\n  }\n  // for absolute paths, ensure `/` instead of empty segment\n  return result.map(exploded => path.startsWith(\"/\") && exploded === \"\" ? \"/\" : exploded);\n}\nfunction rankRouteBranches(branches) {\n  branches.sort((a, b) => a.score !== b.score ? b.score - a.score // Higher score first\n  : compareIndexes(a.routesMeta.map(meta => meta.childrenIndex), b.routesMeta.map(meta => meta.childrenIndex)));\n}\nconst paramRe = /^:[\\w-]+$/;\nconst dynamicSegmentValue = 3;\nconst indexRouteValue = 2;\nconst emptySegmentValue = 1;\nconst staticSegmentValue = 10;\nconst splatPenalty = -2;\nconst isSplat = s => s === \"*\";\nfunction computeScore(path, index) {\n  let segments = path.split(\"/\");\n  let initialScore = segments.length;\n  if (segments.some(isSplat)) {\n    initialScore += splatPenalty;\n  }\n  if (index) {\n    initialScore += indexRouteValue;\n  }\n  return segments.filter(s => !isSplat(s)).reduce((score, segment) => score + (paramRe.test(segment) ? dynamicSegmentValue : segment === \"\" ? emptySegmentValue : staticSegmentValue), initialScore);\n}\nfunction compareIndexes(a, b) {\n  let siblings = a.length === b.length && a.slice(0, -1).every((n, i) => n === b[i]);\n  return siblings ?\n  // If two routes are siblings, we should try to match the earlier sibling\n  // first. This allows people to have fine-grained control over the matching\n  // behavior by simply putting routes with identical paths in the order they\n  // want them tried.\n  a[a.length - 1] - b[b.length - 1] :\n  // Otherwise, it doesn't really make sense to rank non-siblings by index,\n  // so they sort equally.\n  0;\n}\nfunction matchRouteBranch(branch, pathname, allowPartial) {\n  if (allowPartial === void 0) {\n    allowPartial = false;\n  }\n  let {\n    routesMeta\n  } = branch;\n  let matchedParams = {};\n  let matchedPathname = \"/\";\n  let matches = [];\n  for (let i = 0; i < routesMeta.length; ++i) {\n    let meta = routesMeta[i];\n    let end = i === routesMeta.length - 1;\n    let remainingPathname = matchedPathname === \"/\" ? pathname : pathname.slice(matchedPathname.length) || \"/\";\n    let match = matchPath({\n      path: meta.relativePath,\n      caseSensitive: meta.caseSensitive,\n      end\n    }, remainingPathname);\n    let route = meta.route;\n    if (!match && end && allowPartial && !routesMeta[routesMeta.length - 1].route.index) {\n      match = matchPath({\n        path: meta.relativePath,\n        caseSensitive: meta.caseSensitive,\n        end: false\n      }, remainingPathname);\n    }\n    if (!match) {\n      return null;\n    }\n    Object.assign(matchedParams, match.params);\n    matches.push({\n      // TODO: Can this as be avoided?\n      params: matchedParams,\n      pathname: joinPaths([matchedPathname, match.pathname]),\n      pathnameBase: normalizePathname(joinPaths([matchedPathname, match.pathnameBase])),\n      route\n    });\n    if (match.pathnameBase !== \"/\") {\n      matchedPathname = joinPaths([matchedPathname, match.pathnameBase]);\n    }\n  }\n  return matches;\n}\n/**\n * Returns a path with params interpolated.\n *\n * @see https://reactrouter.com/utils/generate-path\n */\nfunction generatePath(originalPath, params) {\n  if (params === void 0) {\n    params = {};\n  }\n  let path = originalPath;\n  if (path.endsWith(\"*\") && path !== \"*\" && !path.endsWith(\"/*\")) {\n    warning(false, \"Route path \\\"\" + path + \"\\\" will be treated as if it were \" + (\"\\\"\" + path.replace(/\\*$/, \"/*\") + \"\\\" because the `*` character must \") + \"always follow a `/` in the pattern. To get rid of this warning, \" + (\"please change the route path to \\\"\" + path.replace(/\\*$/, \"/*\") + \"\\\".\"));\n    path = path.replace(/\\*$/, \"/*\");\n  }\n  // ensure `/` is added at the beginning if the path is absolute\n  const prefix = path.startsWith(\"/\") ? \"/\" : \"\";\n  const stringify = p => p == null ? \"\" : typeof p === \"string\" ? p : String(p);\n  const segments = path.split(/\\/+/).map((segment, index, array) => {\n    const isLastSegment = index === array.length - 1;\n    // only apply the splat if it's the last segment\n    if (isLastSegment && segment === \"*\") {\n      const star = \"*\";\n      // Apply the splat\n      return stringify(params[star]);\n    }\n    const keyMatch = segment.match(/^:([\\w-]+)(\\??)$/);\n    if (keyMatch) {\n      const [, key, optional] = keyMatch;\n      let param = params[key];\n      invariant(optional === \"?\" || param != null, \"Missing \\\":\" + key + \"\\\" param\");\n      return stringify(param);\n    }\n    // Remove any optional markers from optional static segments\n    return segment.replace(/\\?$/g, \"\");\n  })\n  // Remove empty segments\n  .filter(segment => !!segment);\n  return prefix + segments.join(\"/\");\n}\n/**\n * Performs pattern matching on a URL pathname and returns information about\n * the match.\n *\n * @see https://reactrouter.com/utils/match-path\n */\nfunction matchPath(pattern, pathname) {\n  if (typeof pattern === \"string\") {\n    pattern = {\n      path: pattern,\n      caseSensitive: false,\n      end: true\n    };\n  }\n  let [matcher, compiledParams] = compilePath(pattern.path, pattern.caseSensitive, pattern.end);\n  let match = pathname.match(matcher);\n  if (!match) return null;\n  let matchedPathname = match[0];\n  let pathnameBase = matchedPathname.replace(/(.)\\/+$/, \"$1\");\n  let captureGroups = match.slice(1);\n  let params = compiledParams.reduce((memo, _ref, index) => {\n    let {\n      paramName,\n      isOptional\n    } = _ref;\n    // We need to compute the pathnameBase here using the raw splat value\n    // instead of using params[\"*\"] later because it will be decoded then\n    if (paramName === \"*\") {\n      let splatValue = captureGroups[index] || \"\";\n      pathnameBase = matchedPathname.slice(0, matchedPathname.length - splatValue.length).replace(/(.)\\/+$/, \"$1\");\n    }\n    const value = captureGroups[index];\n    if (isOptional && !value) {\n      memo[paramName] = undefined;\n    } else {\n      memo[paramName] = (value || \"\").replace(/%2F/g, \"/\");\n    }\n    return memo;\n  }, {});\n  return {\n    params,\n    pathname: matchedPathname,\n    pathnameBase,\n    pattern\n  };\n}\nfunction compilePath(path, caseSensitive, end) {\n  if (caseSensitive === void 0) {\n    caseSensitive = false;\n  }\n  if (end === void 0) {\n    end = true;\n  }\n  warning(path === \"*\" || !path.endsWith(\"*\") || path.endsWith(\"/*\"), \"Route path \\\"\" + path + \"\\\" will be treated as if it were \" + (\"\\\"\" + path.replace(/\\*$/, \"/*\") + \"\\\" because the `*` character must \") + \"always follow a `/` in the pattern. To get rid of this warning, \" + (\"please change the route path to \\\"\" + path.replace(/\\*$/, \"/*\") + \"\\\".\"));\n  let params = [];\n  let regexpSource = \"^\" + path.replace(/\\/*\\*?$/, \"\") // Ignore trailing / and /*, we'll handle it below\n  .replace(/^\\/*/, \"/\") // Make sure it has a leading /\n  .replace(/[\\\\.*+^${}|()[\\]]/g, \"\\\\$&\") // Escape special regex chars\n  .replace(/\\/:([\\w-]+)(\\?)?/g, (_, paramName, isOptional) => {\n    params.push({\n      paramName,\n      isOptional: isOptional != null\n    });\n    return isOptional ? \"/?([^\\\\/]+)?\" : \"/([^\\\\/]+)\";\n  });\n  if (path.endsWith(\"*\")) {\n    params.push({\n      paramName: \"*\"\n    });\n    regexpSource += path === \"*\" || path === \"/*\" ? \"(.*)$\" // Already matched the initial /, just match the rest\n    : \"(?:\\\\/(.+)|\\\\/*)$\"; // Don't include the / in params[\"*\"]\n  } else if (end) {\n    // When matching to the end, ignore trailing slashes\n    regexpSource += \"\\\\/*$\";\n  } else if (path !== \"\" && path !== \"/\") {\n    // If our path is non-empty and contains anything beyond an initial slash,\n    // then we have _some_ form of path in our regex, so we should expect to\n    // match only if we find the end of this path segment.  Look for an optional\n    // non-captured trailing slash (to match a portion of the URL) or the end\n    // of the path (if we've matched to the end).  We used to do this with a\n    // word boundary but that gives false positives on routes like\n    // /user-preferences since `-` counts as a word boundary.\n    regexpSource += \"(?:(?=\\\\/|$))\";\n  } else ;\n  let matcher = new RegExp(regexpSource, caseSensitive ? undefined : \"i\");\n  return [matcher, params];\n}\nfunction decodePath(value) {\n  try {\n    return value.split(\"/\").map(v => decodeURIComponent(v).replace(/\\//g, \"%2F\")).join(\"/\");\n  } catch (error) {\n    warning(false, \"The URL path \\\"\" + value + \"\\\" could not be decoded because it is is a \" + \"malformed URL segment. This is probably due to a bad percent \" + (\"encoding (\" + error + \").\"));\n    return value;\n  }\n}\n/**\n * @private\n */\nfunction stripBasename(pathname, basename) {\n  if (basename === \"/\") return pathname;\n  if (!pathname.toLowerCase().startsWith(basename.toLowerCase())) {\n    return null;\n  }\n  // We want to leave trailing slash behavior in the user's control, so if they\n  // specify a basename with a trailing slash, we should support it\n  let startIndex = basename.endsWith(\"/\") ? basename.length - 1 : basename.length;\n  let nextChar = pathname.charAt(startIndex);\n  if (nextChar && nextChar !== \"/\") {\n    // pathname does not start with basename/\n    return null;\n  }\n  return pathname.slice(startIndex) || \"/\";\n}\n/**\n * Returns a resolved path object relative to the given pathname.\n *\n * @see https://reactrouter.com/utils/resolve-path\n */\nfunction resolvePath(to, fromPathname) {\n  if (fromPathname === void 0) {\n    fromPathname = \"/\";\n  }\n  let {\n    pathname: toPathname,\n    search = \"\",\n    hash = \"\"\n  } = typeof to === \"string\" ? parsePath(to) : to;\n  let pathname = toPathname ? toPathname.startsWith(\"/\") ? toPathname : resolvePathname(toPathname, fromPathname) : fromPathname;\n  return {\n    pathname,\n    search: normalizeSearch(search),\n    hash: normalizeHash(hash)\n  };\n}\nfunction resolvePathname(relativePath, fromPathname) {\n  let segments = fromPathname.replace(/\\/+$/, \"\").split(\"/\");\n  let relativeSegments = relativePath.split(\"/\");\n  relativeSegments.forEach(segment => {\n    if (segment === \"..\") {\n      // Keep the root \"\" segment so the pathname starts at /\n      if (segments.length > 1) segments.pop();\n    } else if (segment !== \".\") {\n      segments.push(segment);\n    }\n  });\n  return segments.length > 1 ? segments.join(\"/\") : \"/\";\n}\nfunction getInvalidPathError(char, field, dest, path) {\n  return \"Cannot include a '\" + char + \"' character in a manually specified \" + (\"`to.\" + field + \"` field [\" + JSON.stringify(path) + \"].  Please separate it out to the \") + (\"`to.\" + dest + \"` field. Alternatively you may provide the full path as \") + \"a string in <Link to=\\\"...\\\"> and the router will parse it for you.\";\n}\n/**\n * @private\n *\n * When processing relative navigation we want to ignore ancestor routes that\n * do not contribute to the path, such that index/pathless layout routes don't\n * interfere.\n *\n * For example, when moving a route element into an index route and/or a\n * pathless layout route, relative link behavior contained within should stay\n * the same.  Both of the following examples should link back to the root:\n *\n *   <Route path=\"/\">\n *     <Route path=\"accounts\" element={<Link to=\"..\"}>\n *   </Route>\n *\n *   <Route path=\"/\">\n *     <Route path=\"accounts\">\n *       <Route element={<AccountsLayout />}>       // <-- Does not contribute\n *         <Route index element={<Link to=\"..\"} />  // <-- Does not contribute\n *       </Route\n *     </Route>\n *   </Route>\n */\nfunction getPathContributingMatches(matches) {\n  return matches.filter((match, index) => index === 0 || match.route.path && match.route.path.length > 0);\n}\n// Return the array of pathnames for the current route matches - used to\n// generate the routePathnames input for resolveTo()\nfunction getResolveToMatches(matches, v7_relativeSplatPath) {\n  let pathMatches = getPathContributingMatches(matches);\n  // When v7_relativeSplatPath is enabled, use the full pathname for the leaf\n  // match so we include splat values for \".\" links.  See:\n  // https://github.com/remix-run/react-router/issues/11052#issuecomment-1836589329\n  if (v7_relativeSplatPath) {\n    return pathMatches.map((match, idx) => idx === pathMatches.length - 1 ? match.pathname : match.pathnameBase);\n  }\n  return pathMatches.map(match => match.pathnameBase);\n}\n/**\n * @private\n */\nfunction resolveTo(toArg, routePathnames, locationPathname, isPathRelative) {\n  if (isPathRelative === void 0) {\n    isPathRelative = false;\n  }\n  let to;\n  if (typeof toArg === \"string\") {\n    to = parsePath(toArg);\n  } else {\n    to = _extends({}, toArg);\n    invariant(!to.pathname || !to.pathname.includes(\"?\"), getInvalidPathError(\"?\", \"pathname\", \"search\", to));\n    invariant(!to.pathname || !to.pathname.includes(\"#\"), getInvalidPathError(\"#\", \"pathname\", \"hash\", to));\n    invariant(!to.search || !to.search.includes(\"#\"), getInvalidPathError(\"#\", \"search\", \"hash\", to));\n  }\n  let isEmptyPath = toArg === \"\" || to.pathname === \"\";\n  let toPathname = isEmptyPath ? \"/\" : to.pathname;\n  let from;\n  // Routing is relative to the current pathname if explicitly requested.\n  //\n  // If a pathname is explicitly provided in `to`, it should be relative to the\n  // route context. This is explained in `Note on `<Link to>` values` in our\n  // migration guide from v5 as a means of disambiguation between `to` values\n  // that begin with `/` and those that do not. However, this is problematic for\n  // `to` values that do not provide a pathname. `to` can simply be a search or\n  // hash string, in which case we should assume that the navigation is relative\n  // to the current location's pathname and *not* the route pathname.\n  if (toPathname == null) {\n    from = locationPathname;\n  } else {\n    let routePathnameIndex = routePathnames.length - 1;\n    // With relative=\"route\" (the default), each leading .. segment means\n    // \"go up one route\" instead of \"go up one URL segment\".  This is a key\n    // difference from how <a href> works and a major reason we call this a\n    // \"to\" value instead of a \"href\".\n    if (!isPathRelative && toPathname.startsWith(\"..\")) {\n      let toSegments = toPathname.split(\"/\");\n      while (toSegments[0] === \"..\") {\n        toSegments.shift();\n        routePathnameIndex -= 1;\n      }\n      to.pathname = toSegments.join(\"/\");\n    }\n    from = routePathnameIndex >= 0 ? routePathnames[routePathnameIndex] : \"/\";\n  }\n  let path = resolvePath(to, from);\n  // Ensure the pathname has a trailing slash if the original \"to\" had one\n  let hasExplicitTrailingSlash = toPathname && toPathname !== \"/\" && toPathname.endsWith(\"/\");\n  // Or if this was a link to the current path which has a trailing slash\n  let hasCurrentTrailingSlash = (isEmptyPath || toPathname === \".\") && locationPathname.endsWith(\"/\");\n  if (!path.pathname.endsWith(\"/\") && (hasExplicitTrailingSlash || hasCurrentTrailingSlash)) {\n    path.pathname += \"/\";\n  }\n  return path;\n}\n/**\n * @private\n */\nfunction getToPathname(to) {\n  // Empty strings should be treated the same as / paths\n  return to === \"\" || to.pathname === \"\" ? \"/\" : typeof to === \"string\" ? parsePath(to).pathname : to.pathname;\n}\n/**\n * @private\n */\nconst joinPaths = paths => paths.join(\"/\").replace(/\\/\\/+/g, \"/\");\n/**\n * @private\n */\nconst normalizePathname = pathname => pathname.replace(/\\/+$/, \"\").replace(/^\\/*/, \"/\");\n/**\n * @private\n */\nconst normalizeSearch = search => !search || search === \"?\" ? \"\" : search.startsWith(\"?\") ? search : \"?\" + search;\n/**\n * @private\n */\nconst normalizeHash = hash => !hash || hash === \"#\" ? \"\" : hash.startsWith(\"#\") ? hash : \"#\" + hash;\n/**\n * This is a shortcut for creating `application/json` responses. Converts `data`\n * to JSON and sets the `Content-Type` header.\n */\nconst json = function json(data, init) {\n  if (init === void 0) {\n    init = {};\n  }\n  let responseInit = typeof init === \"number\" ? {\n    status: init\n  } : init;\n  let headers = new Headers(responseInit.headers);\n  if (!headers.has(\"Content-Type\")) {\n    headers.set(\"Content-Type\", \"application/json; charset=utf-8\");\n  }\n  return new Response(JSON.stringify(data), _extends({}, responseInit, {\n    headers\n  }));\n};\nclass AbortedDeferredError extends Error {}\nclass DeferredData {\n  constructor(data, responseInit) {\n    this.pendingKeysSet = new Set();\n    this.subscribers = new Set();\n    this.deferredKeys = [];\n    invariant(data && typeof data === \"object\" && !Array.isArray(data), \"defer() only accepts plain objects\");\n    // Set up an AbortController + Promise we can race against to exit early\n    // cancellation\n    let reject;\n    this.abortPromise = new Promise((_, r) => reject = r);\n    this.controller = new AbortController();\n    let onAbort = () => reject(new AbortedDeferredError(\"Deferred data aborted\"));\n    this.unlistenAbortSignal = () => this.controller.signal.removeEventListener(\"abort\", onAbort);\n    this.controller.signal.addEventListener(\"abort\", onAbort);\n    this.data = Object.entries(data).reduce((acc, _ref2) => {\n      let [key, value] = _ref2;\n      return Object.assign(acc, {\n        [key]: this.trackPromise(key, value)\n      });\n    }, {});\n    if (this.done) {\n      // All incoming values were resolved\n      this.unlistenAbortSignal();\n    }\n    this.init = responseInit;\n  }\n  trackPromise(key, value) {\n    if (!(value instanceof Promise)) {\n      return value;\n    }\n    this.deferredKeys.push(key);\n    this.pendingKeysSet.add(key);\n    // We store a little wrapper promise that will be extended with\n    // _data/_error props upon resolve/reject\n    let promise = Promise.race([value, this.abortPromise]).then(data => this.onSettle(promise, key, undefined, data), error => this.onSettle(promise, key, error));\n    // Register rejection listeners to avoid uncaught promise rejections on\n    // errors or aborted deferred values\n    promise.catch(() => {});\n    Object.defineProperty(promise, \"_tracked\", {\n      get: () => true\n    });\n    return promise;\n  }\n  onSettle(promise, key, error, data) {\n    if (this.controller.signal.aborted && error instanceof AbortedDeferredError) {\n      this.unlistenAbortSignal();\n      Object.defineProperty(promise, \"_error\", {\n        get: () => error\n      });\n      return Promise.reject(error);\n    }\n    this.pendingKeysSet.delete(key);\n    if (this.done) {\n      // Nothing left to abort!\n      this.unlistenAbortSignal();\n    }\n    // If the promise was resolved/rejected with undefined, we'll throw an error as you\n    // should always resolve with a value or null\n    if (error === undefined && data === undefined) {\n      let undefinedError = new Error(\"Deferred data for key \\\"\" + key + \"\\\" resolved/rejected with `undefined`, \" + \"you must resolve/reject with a value or `null`.\");\n      Object.defineProperty(promise, \"_error\", {\n        get: () => undefinedError\n      });\n      this.emit(false, key);\n      return Promise.reject(undefinedError);\n    }\n    if (data === undefined) {\n      Object.defineProperty(promise, \"_error\", {\n        get: () => error\n      });\n      this.emit(false, key);\n      return Promise.reject(error);\n    }\n    Object.defineProperty(promise, \"_data\", {\n      get: () => data\n    });\n    this.emit(false, key);\n    return data;\n  }\n  emit(aborted, settledKey) {\n    this.subscribers.forEach(subscriber => subscriber(aborted, settledKey));\n  }\n  subscribe(fn) {\n    this.subscribers.add(fn);\n    return () => this.subscribers.delete(fn);\n  }\n  cancel() {\n    this.controller.abort();\n    this.pendingKeysSet.forEach((v, k) => this.pendingKeysSet.delete(k));\n    this.emit(true);\n  }\n  async resolveData(signal) {\n    let aborted = false;\n    if (!this.done) {\n      let onAbort = () => this.cancel();\n      signal.addEventListener(\"abort\", onAbort);\n      aborted = await new Promise(resolve => {\n        this.subscribe(aborted => {\n          signal.removeEventListener(\"abort\", onAbort);\n          if (aborted || this.done) {\n            resolve(aborted);\n          }\n        });\n      });\n    }\n    return aborted;\n  }\n  get done() {\n    return this.pendingKeysSet.size === 0;\n  }\n  get unwrappedData() {\n    invariant(this.data !== null && this.done, \"Can only unwrap data on initialized and settled deferreds\");\n    return Object.entries(this.data).reduce((acc, _ref3) => {\n      let [key, value] = _ref3;\n      return Object.assign(acc, {\n        [key]: unwrapTrackedPromise(value)\n      });\n    }, {});\n  }\n  get pendingKeys() {\n    return Array.from(this.pendingKeysSet);\n  }\n}\nfunction isTrackedPromise(value) {\n  return value instanceof Promise && value._tracked === true;\n}\nfunction unwrapTrackedPromise(value) {\n  if (!isTrackedPromise(value)) {\n    return value;\n  }\n  if (value._error) {\n    throw value._error;\n  }\n  return value._data;\n}\nconst defer = function defer(data, init) {\n  if (init === void 0) {\n    init = {};\n  }\n  let responseInit = typeof init === \"number\" ? {\n    status: init\n  } : init;\n  return new DeferredData(data, responseInit);\n};\n/**\n * A redirect response. Sets the status code and the `Location` header.\n * Defaults to \"302 Found\".\n */\nconst redirect = function redirect(url, init) {\n  if (init === void 0) {\n    init = 302;\n  }\n  let responseInit = init;\n  if (typeof responseInit === \"number\") {\n    responseInit = {\n      status: responseInit\n    };\n  } else if (typeof responseInit.status === \"undefined\") {\n    responseInit.status = 302;\n  }\n  let headers = new Headers(responseInit.headers);\n  headers.set(\"Location\", url);\n  return new Response(null, _extends({}, responseInit, {\n    headers\n  }));\n};\n/**\n * A redirect response that will force a document reload to the new location.\n * Sets the status code and the `Location` header.\n * Defaults to \"302 Found\".\n */\nconst redirectDocument = (url, init) => {\n  let response = redirect(url, init);\n  response.headers.set(\"X-Remix-Reload-Document\", \"true\");\n  return response;\n};\n/**\n * @private\n * Utility class we use to hold auto-unwrapped 4xx/5xx Response bodies\n *\n * We don't export the class for public use since it's an implementation\n * detail, but we export the interface above so folks can build their own\n * abstractions around instances via isRouteErrorResponse()\n */\nclass ErrorResponseImpl {\n  constructor(status, statusText, data, internal) {\n    if (internal === void 0) {\n      internal = false;\n    }\n    this.status = status;\n    this.statusText = statusText || \"\";\n    this.internal = internal;\n    if (data instanceof Error) {\n      this.data = data.toString();\n      this.error = data;\n    } else {\n      this.data = data;\n    }\n  }\n}\n/**\n * Check if the given error is an ErrorResponse generated from a 4xx/5xx\n * Response thrown from an action/loader\n */\nfunction isRouteErrorResponse(error) {\n  return error != null && typeof error.status === \"number\" && typeof error.statusText === \"string\" && typeof error.internal === \"boolean\" && \"data\" in error;\n}\n\nconst validMutationMethodsArr = [\"post\", \"put\", \"patch\", \"delete\"];\nconst validMutationMethods = new Set(validMutationMethodsArr);\nconst validRequestMethodsArr = [\"get\", ...validMutationMethodsArr];\nconst validRequestMethods = new Set(validRequestMethodsArr);\nconst redirectStatusCodes = new Set([301, 302, 303, 307, 308]);\nconst redirectPreserveMethodStatusCodes = new Set([307, 308]);\nconst IDLE_NAVIGATION = {\n  state: \"idle\",\n  location: undefined,\n  formMethod: undefined,\n  formAction: undefined,\n  formEncType: undefined,\n  formData: undefined,\n  json: undefined,\n  text: undefined\n};\nconst IDLE_FETCHER = {\n  state: \"idle\",\n  data: undefined,\n  formMethod: undefined,\n  formAction: undefined,\n  formEncType: undefined,\n  formData: undefined,\n  json: undefined,\n  text: undefined\n};\nconst IDLE_BLOCKER = {\n  state: \"unblocked\",\n  proceed: undefined,\n  reset: undefined,\n  location: undefined\n};\nconst ABSOLUTE_URL_REGEX = /^(?:[a-z][a-z0-9+.-]*:|\\/\\/)/i;\nconst defaultMapRouteProperties = route => ({\n  hasErrorBoundary: Boolean(route.hasErrorBoundary)\n});\nconst TRANSITIONS_STORAGE_KEY = \"remix-router-transitions\";\n//#endregion\n////////////////////////////////////////////////////////////////////////////////\n//#region createRouter\n////////////////////////////////////////////////////////////////////////////////\n/**\n * Create a router and listen to history POP navigations\n */\nfunction createRouter(init) {\n  const routerWindow = init.window ? init.window : typeof window !== \"undefined\" ? window : undefined;\n  const isBrowser = typeof routerWindow !== \"undefined\" && typeof routerWindow.document !== \"undefined\" && typeof routerWindow.document.createElement !== \"undefined\";\n  const isServer = !isBrowser;\n  invariant(init.routes.length > 0, \"You must provide a non-empty routes array to createRouter\");\n  let mapRouteProperties;\n  if (init.mapRouteProperties) {\n    mapRouteProperties = init.mapRouteProperties;\n  } else if (init.detectErrorBoundary) {\n    // If they are still using the deprecated version, wrap it with the new API\n    let detectErrorBoundary = init.detectErrorBoundary;\n    mapRouteProperties = route => ({\n      hasErrorBoundary: detectErrorBoundary(route)\n    });\n  } else {\n    mapRouteProperties = defaultMapRouteProperties;\n  }\n  // Routes keyed by ID\n  let manifest = {};\n  // Routes in tree format for matching\n  let dataRoutes = convertRoutesToDataRoutes(init.routes, mapRouteProperties, undefined, manifest);\n  let inFlightDataRoutes;\n  let basename = init.basename || \"/\";\n  let dataStrategyImpl = init.unstable_dataStrategy || defaultDataStrategy;\n  let patchRoutesOnMissImpl = init.unstable_patchRoutesOnMiss;\n  // Config driven behavior flags\n  let future = _extends({\n    v7_fetcherPersist: false,\n    v7_normalizeFormMethod: false,\n    v7_partialHydration: false,\n    v7_prependBasename: false,\n    v7_relativeSplatPath: false,\n    unstable_skipActionErrorRevalidation: false\n  }, init.future);\n  // Cleanup function for history\n  let unlistenHistory = null;\n  // Externally-provided functions to call on all state changes\n  let subscribers = new Set();\n  // Externally-provided object to hold scroll restoration locations during routing\n  let savedScrollPositions = null;\n  // Externally-provided function to get scroll restoration keys\n  let getScrollRestorationKey = null;\n  // Externally-provided function to get current scroll position\n  let getScrollPosition = null;\n  // One-time flag to control the initial hydration scroll restoration.  Because\n  // we don't get the saved positions from <ScrollRestoration /> until _after_\n  // the initial render, we need to manually trigger a separate updateState to\n  // send along the restoreScrollPosition\n  // Set to true if we have `hydrationData` since we assume we were SSR'd and that\n  // SSR did the initial scroll restoration.\n  let initialScrollRestored = init.hydrationData != null;\n  let initialMatches = matchRoutes(dataRoutes, init.history.location, basename);\n  let initialErrors = null;\n  if (initialMatches == null && !patchRoutesOnMissImpl) {\n    // If we do not match a user-provided-route, fall back to the root\n    // to allow the error boundary to take over\n    let error = getInternalRouterError(404, {\n      pathname: init.history.location.pathname\n    });\n    let {\n      matches,\n      route\n    } = getShortCircuitMatches(dataRoutes);\n    initialMatches = matches;\n    initialErrors = {\n      [route.id]: error\n    };\n  }\n  // If the user provided a patchRoutesOnMiss implementation and our initial\n  // match is a splat route, clear them out so we run through lazy discovery\n  // on hydration in case there's a more accurate lazy route match\n  if (initialMatches && patchRoutesOnMissImpl) {\n    let fogOfWar = checkFogOfWar(initialMatches, dataRoutes, init.history.location.pathname);\n    if (fogOfWar.active) {\n      initialMatches = null;\n    }\n  }\n  let initialized;\n  if (!initialMatches) {\n    // We need to run patchRoutesOnMiss in initialize()\n    initialized = false;\n    initialMatches = [];\n  } else if (initialMatches.some(m => m.route.lazy)) {\n    // All initialMatches need to be loaded before we're ready.  If we have lazy\n    // functions around still then we'll need to run them in initialize()\n    initialized = false;\n  } else if (!initialMatches.some(m => m.route.loader)) {\n    // If we've got no loaders to run, then we're good to go\n    initialized = true;\n  } else if (future.v7_partialHydration) {\n    // If partial hydration is enabled, we're initialized so long as we were\n    // provided with hydrationData for every route with a loader, and no loaders\n    // were marked for explicit hydration\n    let loaderData = init.hydrationData ? init.hydrationData.loaderData : null;\n    let errors = init.hydrationData ? init.hydrationData.errors : null;\n    let isRouteInitialized = m => {\n      // No loader, nothing to initialize\n      if (!m.route.loader) {\n        return true;\n      }\n      // Explicitly opting-in to running on hydration\n      if (typeof m.route.loader === \"function\" && m.route.loader.hydrate === true) {\n        return false;\n      }\n      // Otherwise, initialized if hydrated with data or an error\n      return loaderData && loaderData[m.route.id] !== undefined || errors && errors[m.route.id] !== undefined;\n    };\n    // If errors exist, don't consider routes below the boundary\n    if (errors) {\n      let idx = initialMatches.findIndex(m => errors[m.route.id] !== undefined);\n      initialized = initialMatches.slice(0, idx + 1).every(isRouteInitialized);\n    } else {\n      initialized = initialMatches.every(isRouteInitialized);\n    }\n  } else {\n    // Without partial hydration - we're initialized if we were provided any\n    // hydrationData - which is expected to be complete\n    initialized = init.hydrationData != null;\n  }\n  let router;\n  let state = {\n    historyAction: init.history.action,\n    location: init.history.location,\n    matches: initialMatches,\n    initialized,\n    navigation: IDLE_NAVIGATION,\n    // Don't restore on initial updateState() if we were SSR'd\n    restoreScrollPosition: init.hydrationData != null ? false : null,\n    preventScrollReset: false,\n    revalidation: \"idle\",\n    loaderData: init.hydrationData && init.hydrationData.loaderData || {},\n    actionData: init.hydrationData && init.hydrationData.actionData || null,\n    errors: init.hydrationData && init.hydrationData.errors || initialErrors,\n    fetchers: new Map(),\n    blockers: new Map()\n  };\n  // -- Stateful internal variables to manage navigations --\n  // Current navigation in progress (to be committed in completeNavigation)\n  let pendingAction = Action.Pop;\n  // Should the current navigation prevent the scroll reset if scroll cannot\n  // be restored?\n  let pendingPreventScrollReset = false;\n  // AbortController for the active navigation\n  let pendingNavigationController;\n  // Should the current navigation enable document.startViewTransition?\n  let pendingViewTransitionEnabled = false;\n  // Store applied view transitions so we can apply them on POP\n  let appliedViewTransitions = new Map();\n  // Cleanup function for persisting applied transitions to sessionStorage\n  let removePageHideEventListener = null;\n  // We use this to avoid touching history in completeNavigation if a\n  // revalidation is entirely uninterrupted\n  let isUninterruptedRevalidation = false;\n  // Use this internal flag to force revalidation of all loaders:\n  //  - submissions (completed or interrupted)\n  //  - useRevalidator()\n  //  - X-Remix-Revalidate (from redirect)\n  let isRevalidationRequired = false;\n  // Use this internal array to capture routes that require revalidation due\n  // to a cancelled deferred on action submission\n  let cancelledDeferredRoutes = [];\n  // Use this internal array to capture fetcher loads that were cancelled by an\n  // action navigation and require revalidation\n  let cancelledFetcherLoads = [];\n  // AbortControllers for any in-flight fetchers\n  let fetchControllers = new Map();\n  // Track loads based on the order in which they started\n  let incrementingLoadId = 0;\n  // Track the outstanding pending navigation data load to be compared against\n  // the globally incrementing load when a fetcher load lands after a completed\n  // navigation\n  let pendingNavigationLoadId = -1;\n  // Fetchers that triggered data reloads as a result of their actions\n  let fetchReloadIds = new Map();\n  // Fetchers that triggered redirect navigations\n  let fetchRedirectIds = new Set();\n  // Most recent href/match for fetcher.load calls for fetchers\n  let fetchLoadMatches = new Map();\n  // Ref-count mounted fetchers so we know when it's ok to clean them up\n  let activeFetchers = new Map();\n  // Fetchers that have requested a delete when using v7_fetcherPersist,\n  // they'll be officially removed after they return to idle\n  let deletedFetchers = new Set();\n  // Store DeferredData instances for active route matches.  When a\n  // route loader returns defer() we stick one in here.  Then, when a nested\n  // promise resolves we update loaderData.  If a new navigation starts we\n  // cancel active deferreds for eliminated routes.\n  let activeDeferreds = new Map();\n  // Store blocker functions in a separate Map outside of router state since\n  // we don't need to update UI state if they change\n  let blockerFunctions = new Map();\n  // Map of pending patchRoutesOnMiss() promises (keyed by path/matches) so\n  // that we only kick them off once for a given combo\n  let pendingPatchRoutes = new Map();\n  // Flag to ignore the next history update, so we can revert the URL change on\n  // a POP navigation that was blocked by the user without touching router state\n  let ignoreNextHistoryUpdate = false;\n  // Initialize the router, all side effects should be kicked off from here.\n  // Implemented as a Fluent API for ease of:\n  //   let router = createRouter(init).initialize();\n  function initialize() {\n    // If history informs us of a POP navigation, start the navigation but do not update\n    // state.  We'll update our own state once the navigation completes\n    unlistenHistory = init.history.listen(_ref => {\n      let {\n        action: historyAction,\n        location,\n        delta\n      } = _ref;\n      // Ignore this event if it was just us resetting the URL from a\n      // blocked POP navigation\n      if (ignoreNextHistoryUpdate) {\n        ignoreNextHistoryUpdate = false;\n        return;\n      }\n      warning(blockerFunctions.size === 0 || delta != null, \"You are trying to use a blocker on a POP navigation to a location \" + \"that was not created by @remix-run/router. This will fail silently in \" + \"production. This can happen if you are navigating outside the router \" + \"via `window.history.pushState`/`window.location.hash` instead of using \" + \"router navigation APIs.  This can also happen if you are using \" + \"createHashRouter and the user manually changes the URL.\");\n      let blockerKey = shouldBlockNavigation({\n        currentLocation: state.location,\n        nextLocation: location,\n        historyAction\n      });\n      if (blockerKey && delta != null) {\n        // Restore the URL to match the current UI, but don't update router state\n        ignoreNextHistoryUpdate = true;\n        init.history.go(delta * -1);\n        // Put the blocker into a blocked state\n        updateBlocker(blockerKey, {\n          state: \"blocked\",\n          location,\n          proceed() {\n            updateBlocker(blockerKey, {\n              state: \"proceeding\",\n              proceed: undefined,\n              reset: undefined,\n              location\n            });\n            // Re-do the same POP navigation we just blocked\n            init.history.go(delta);\n          },\n          reset() {\n            let blockers = new Map(state.blockers);\n            blockers.set(blockerKey, IDLE_BLOCKER);\n            updateState({\n              blockers\n            });\n          }\n        });\n        return;\n      }\n      return startNavigation(historyAction, location);\n    });\n    if (isBrowser) {\n      // FIXME: This feels gross.  How can we cleanup the lines between\n      // scrollRestoration/appliedTransitions persistance?\n      restoreAppliedTransitions(routerWindow, appliedViewTransitions);\n      let _saveAppliedTransitions = () => persistAppliedTransitions(routerWindow, appliedViewTransitions);\n      routerWindow.addEventListener(\"pagehide\", _saveAppliedTransitions);\n      removePageHideEventListener = () => routerWindow.removeEventListener(\"pagehide\", _saveAppliedTransitions);\n    }\n    // Kick off initial data load if needed.  Use Pop to avoid modifying history\n    // Note we don't do any handling of lazy here.  For SPA's it'll get handled\n    // in the normal navigation flow.  For SSR it's expected that lazy modules are\n    // resolved prior to router creation since we can't go into a fallbackElement\n    // UI for SSR'd apps\n    if (!state.initialized) {\n      startNavigation(Action.Pop, state.location, {\n        initialHydration: true\n      });\n    }\n    return router;\n  }\n  // Clean up a router and it's side effects\n  function dispose() {\n    if (unlistenHistory) {\n      unlistenHistory();\n    }\n    if (removePageHideEventListener) {\n      removePageHideEventListener();\n    }\n    subscribers.clear();\n    pendingNavigationController && pendingNavigationController.abort();\n    state.fetchers.forEach((_, key) => deleteFetcher(key));\n    state.blockers.forEach((_, key) => deleteBlocker(key));\n  }\n  // Subscribe to state updates for the router\n  function subscribe(fn) {\n    subscribers.add(fn);\n    return () => subscribers.delete(fn);\n  }\n  // Update our state and notify the calling context of the change\n  function updateState(newState, opts) {\n    if (opts === void 0) {\n      opts = {};\n    }\n    state = _extends({}, state, newState);\n    // Prep fetcher cleanup so we can tell the UI which fetcher data entries\n    // can be removed\n    let completedFetchers = [];\n    let deletedFetchersKeys = [];\n    if (future.v7_fetcherPersist) {\n      state.fetchers.forEach((fetcher, key) => {\n        if (fetcher.state === \"idle\") {\n          if (deletedFetchers.has(key)) {\n            // Unmounted from the UI and can be totally removed\n            deletedFetchersKeys.push(key);\n          } else {\n            // Returned to idle but still mounted in the UI, so semi-remains for\n            // revalidations and such\n            completedFetchers.push(key);\n          }\n        }\n      });\n    }\n    // Iterate over a local copy so that if flushSync is used and we end up\n    // removing and adding a new subscriber due to the useCallback dependencies,\n    // we don't get ourselves into a loop calling the new subscriber immediately\n    [...subscribers].forEach(subscriber => subscriber(state, {\n      deletedFetchers: deletedFetchersKeys,\n      unstable_viewTransitionOpts: opts.viewTransitionOpts,\n      unstable_flushSync: opts.flushSync === true\n    }));\n    // Remove idle fetchers from state since we only care about in-flight fetchers.\n    if (future.v7_fetcherPersist) {\n      completedFetchers.forEach(key => state.fetchers.delete(key));\n      deletedFetchersKeys.forEach(key => deleteFetcher(key));\n    }\n  }\n  // Complete a navigation returning the state.navigation back to the IDLE_NAVIGATION\n  // and setting state.[historyAction/location/matches] to the new route.\n  // - Location is a required param\n  // - Navigation will always be set to IDLE_NAVIGATION\n  // - Can pass any other state in newState\n  function completeNavigation(location, newState, _temp) {\n    var _location$state, _location$state2;\n    let {\n      flushSync\n    } = _temp === void 0 ? {} : _temp;\n    // Deduce if we're in a loading/actionReload state:\n    // - We have committed actionData in the store\n    // - The current navigation was a mutation submission\n    // - We're past the submitting state and into the loading state\n    // - The location being loaded is not the result of a redirect\n    let isActionReload = state.actionData != null && state.navigation.formMethod != null && isMutationMethod(state.navigation.formMethod) && state.navigation.state === \"loading\" && ((_location$state = location.state) == null ? void 0 : _location$state._isRedirect) !== true;\n    let actionData;\n    if (newState.actionData) {\n      if (Object.keys(newState.actionData).length > 0) {\n        actionData = newState.actionData;\n      } else {\n        // Empty actionData -> clear prior actionData due to an action error\n        actionData = null;\n      }\n    } else if (isActionReload) {\n      // Keep the current data if we're wrapping up the action reload\n      actionData = state.actionData;\n    } else {\n      // Clear actionData on any other completed navigations\n      actionData = null;\n    }\n    // Always preserve any existing loaderData from re-used routes\n    let loaderData = newState.loaderData ? mergeLoaderData(state.loaderData, newState.loaderData, newState.matches || [], newState.errors) : state.loaderData;\n    // On a successful navigation we can assume we got through all blockers\n    // so we can start fresh\n    let blockers = state.blockers;\n    if (blockers.size > 0) {\n      blockers = new Map(blockers);\n      blockers.forEach((_, k) => blockers.set(k, IDLE_BLOCKER));\n    }\n    // Always respect the user flag.  Otherwise don't reset on mutation\n    // submission navigations unless they redirect\n    let preventScrollReset = pendingPreventScrollReset === true || state.navigation.formMethod != null && isMutationMethod(state.navigation.formMethod) && ((_location$state2 = location.state) == null ? void 0 : _location$state2._isRedirect) !== true;\n    // Commit any in-flight routes at the end of the HMR revalidation \"navigation\"\n    if (inFlightDataRoutes) {\n      dataRoutes = inFlightDataRoutes;\n      inFlightDataRoutes = undefined;\n    }\n    if (isUninterruptedRevalidation) ; else if (pendingAction === Action.Pop) ; else if (pendingAction === Action.Push) {\n      init.history.push(location, location.state);\n    } else if (pendingAction === Action.Replace) {\n      init.history.replace(location, location.state);\n    }\n    let viewTransitionOpts;\n    // On POP, enable transitions if they were enabled on the original navigation\n    if (pendingAction === Action.Pop) {\n      // Forward takes precedence so they behave like the original navigation\n      let priorPaths = appliedViewTransitions.get(state.location.pathname);\n      if (priorPaths && priorPaths.has(location.pathname)) {\n        viewTransitionOpts = {\n          currentLocation: state.location,\n          nextLocation: location\n        };\n      } else if (appliedViewTransitions.has(location.pathname)) {\n        // If we don't have a previous forward nav, assume we're popping back to\n        // the new location and enable if that location previously enabled\n        viewTransitionOpts = {\n          currentLocation: location,\n          nextLocation: state.location\n        };\n      }\n    } else if (pendingViewTransitionEnabled) {\n      // Store the applied transition on PUSH/REPLACE\n      let toPaths = appliedViewTransitions.get(state.location.pathname);\n      if (toPaths) {\n        toPaths.add(location.pathname);\n      } else {\n        toPaths = new Set([location.pathname]);\n        appliedViewTransitions.set(state.location.pathname, toPaths);\n      }\n      viewTransitionOpts = {\n        currentLocation: state.location,\n        nextLocation: location\n      };\n    }\n    updateState(_extends({}, newState, {\n      actionData,\n      loaderData,\n      historyAction: pendingAction,\n      location,\n      initialized: true,\n      navigation: IDLE_NAVIGATION,\n      revalidation: \"idle\",\n      restoreScrollPosition: getSavedScrollPosition(location, newState.matches || state.matches),\n      preventScrollReset,\n      blockers\n    }), {\n      viewTransitionOpts,\n      flushSync: flushSync === true\n    });\n    // Reset stateful navigation vars\n    pendingAction = Action.Pop;\n    pendingPreventScrollReset = false;\n    pendingViewTransitionEnabled = false;\n    isUninterruptedRevalidation = false;\n    isRevalidationRequired = false;\n    cancelledDeferredRoutes = [];\n    cancelledFetcherLoads = [];\n  }\n  // Trigger a navigation event, which can either be a numerical POP or a PUSH\n  // replace with an optional submission\n  async function navigate(to, opts) {\n    if (typeof to === \"number\") {\n      init.history.go(to);\n      return;\n    }\n    let normalizedPath = normalizeTo(state.location, state.matches, basename, future.v7_prependBasename, to, future.v7_relativeSplatPath, opts == null ? void 0 : opts.fromRouteId, opts == null ? void 0 : opts.relative);\n    let {\n      path,\n      submission,\n      error\n    } = normalizeNavigateOptions(future.v7_normalizeFormMethod, false, normalizedPath, opts);\n    let currentLocation = state.location;\n    let nextLocation = createLocation(state.location, path, opts && opts.state);\n    // When using navigate as a PUSH/REPLACE we aren't reading an already-encoded\n    // URL from window.location, so we need to encode it here so the behavior\n    // remains the same as POP and non-data-router usages.  new URL() does all\n    // the same encoding we'd get from a history.pushState/window.location read\n    // without having to touch history\n    nextLocation = _extends({}, nextLocation, init.history.encodeLocation(nextLocation));\n    let userReplace = opts && opts.replace != null ? opts.replace : undefined;\n    let historyAction = Action.Push;\n    if (userReplace === true) {\n      historyAction = Action.Replace;\n    } else if (userReplace === false) ; else if (submission != null && isMutationMethod(submission.formMethod) && submission.formAction === state.location.pathname + state.location.search) {\n      // By default on submissions to the current location we REPLACE so that\n      // users don't have to double-click the back button to get to the prior\n      // location.  If the user redirects to a different location from the\n      // action/loader this will be ignored and the redirect will be a PUSH\n      historyAction = Action.Replace;\n    }\n    let preventScrollReset = opts && \"preventScrollReset\" in opts ? opts.preventScrollReset === true : undefined;\n    let flushSync = (opts && opts.unstable_flushSync) === true;\n    let blockerKey = shouldBlockNavigation({\n      currentLocation,\n      nextLocation,\n      historyAction\n    });\n    if (blockerKey) {\n      // Put the blocker into a blocked state\n      updateBlocker(blockerKey, {\n        state: \"blocked\",\n        location: nextLocation,\n        proceed() {\n          updateBlocker(blockerKey, {\n            state: \"proceeding\",\n            proceed: undefined,\n            reset: undefined,\n            location: nextLocation\n          });\n          // Send the same navigation through\n          navigate(to, opts);\n        },\n        reset() {\n          let blockers = new Map(state.blockers);\n          blockers.set(blockerKey, IDLE_BLOCKER);\n          updateState({\n            blockers\n          });\n        }\n      });\n      return;\n    }\n    return await startNavigation(historyAction, nextLocation, {\n      submission,\n      // Send through the formData serialization error if we have one so we can\n      // render at the right error boundary after we match routes\n      pendingError: error,\n      preventScrollReset,\n      replace: opts && opts.replace,\n      enableViewTransition: opts && opts.unstable_viewTransition,\n      flushSync\n    });\n  }\n  // Revalidate all current loaders.  If a navigation is in progress or if this\n  // is interrupted by a navigation, allow this to \"succeed\" by calling all\n  // loaders during the next loader round\n  function revalidate() {\n    interruptActiveLoads();\n    updateState({\n      revalidation: \"loading\"\n    });\n    // If we're currently submitting an action, we don't need to start a new\n    // navigation, we'll just let the follow up loader execution call all loaders\n    if (state.navigation.state === \"submitting\") {\n      return;\n    }\n    // If we're currently in an idle state, start a new navigation for the current\n    // action/location and mark it as uninterrupted, which will skip the history\n    // update in completeNavigation\n    if (state.navigation.state === \"idle\") {\n      startNavigation(state.historyAction, state.location, {\n        startUninterruptedRevalidation: true\n      });\n      return;\n    }\n    // Otherwise, if we're currently in a loading state, just start a new\n    // navigation to the navigation.location but do not trigger an uninterrupted\n    // revalidation so that history correctly updates once the navigation completes\n    startNavigation(pendingAction || state.historyAction, state.navigation.location, {\n      overrideNavigation: state.navigation\n    });\n  }\n  // Start a navigation to the given action/location.  Can optionally provide a\n  // overrideNavigation which will override the normalLoad in the case of a redirect\n  // navigation\n  async function startNavigation(historyAction, location, opts) {\n    // Abort any in-progress navigations and start a new one. Unset any ongoing\n    // uninterrupted revalidations unless told otherwise, since we want this\n    // new navigation to update history normally\n    pendingNavigationController && pendingNavigationController.abort();\n    pendingNavigationController = null;\n    pendingAction = historyAction;\n    isUninterruptedRevalidation = (opts && opts.startUninterruptedRevalidation) === true;\n    // Save the current scroll position every time we start a new navigation,\n    // and track whether we should reset scroll on completion\n    saveScrollPosition(state.location, state.matches);\n    pendingPreventScrollReset = (opts && opts.preventScrollReset) === true;\n    pendingViewTransitionEnabled = (opts && opts.enableViewTransition) === true;\n    let routesToUse = inFlightDataRoutes || dataRoutes;\n    let loadingNavigation = opts && opts.overrideNavigation;\n    let matches = matchRoutes(routesToUse, location, basename);\n    let flushSync = (opts && opts.flushSync) === true;\n    let fogOfWar = checkFogOfWar(matches, routesToUse, location.pathname);\n    if (fogOfWar.active && fogOfWar.matches) {\n      matches = fogOfWar.matches;\n    }\n    // Short circuit with a 404 on the root error boundary if we match nothing\n    if (!matches) {\n      let {\n        error,\n        notFoundMatches,\n        route\n      } = handleNavigational404(location.pathname);\n      completeNavigation(location, {\n        matches: notFoundMatches,\n        loaderData: {},\n        errors: {\n          [route.id]: error\n        }\n      }, {\n        flushSync\n      });\n      return;\n    }\n    // Short circuit if it's only a hash change and not a revalidation or\n    // mutation submission.\n    //\n    // Ignore on initial page loads because since the initial load will always\n    // be \"same hash\".  For example, on /page#hash and submit a <Form method=\"post\">\n    // which will default to a navigation to /page\n    if (state.initialized && !isRevalidationRequired && isHashChangeOnly(state.location, location) && !(opts && opts.submission && isMutationMethod(opts.submission.formMethod))) {\n      completeNavigation(location, {\n        matches\n      }, {\n        flushSync\n      });\n      return;\n    }\n    // Create a controller/Request for this navigation\n    pendingNavigationController = new AbortController();\n    let request = createClientSideRequest(init.history, location, pendingNavigationController.signal, opts && opts.submission);\n    let pendingActionResult;\n    if (opts && opts.pendingError) {\n      // If we have a pendingError, it means the user attempted a GET submission\n      // with binary FormData so assign here and skip to handleLoaders.  That\n      // way we handle calling loaders above the boundary etc.  It's not really\n      // different from an actionError in that sense.\n      pendingActionResult = [findNearestBoundary(matches).route.id, {\n        type: ResultType.error,\n        error: opts.pendingError\n      }];\n    } else if (opts && opts.submission && isMutationMethod(opts.submission.formMethod)) {\n      // Call action if we received an action submission\n      let actionResult = await handleAction(request, location, opts.submission, matches, fogOfWar.active, {\n        replace: opts.replace,\n        flushSync\n      });\n      if (actionResult.shortCircuited) {\n        return;\n      }\n      // If we received a 404 from handleAction, it's because we couldn't lazily\n      // discover the destination route so we don't want to call loaders\n      if (actionResult.pendingActionResult) {\n        let [routeId, result] = actionResult.pendingActionResult;\n        if (isErrorResult(result) && isRouteErrorResponse(result.error) && result.error.status === 404) {\n          pendingNavigationController = null;\n          completeNavigation(location, {\n            matches: actionResult.matches,\n            loaderData: {},\n            errors: {\n              [routeId]: result.error\n            }\n          });\n          return;\n        }\n      }\n      matches = actionResult.matches || matches;\n      pendingActionResult = actionResult.pendingActionResult;\n      loadingNavigation = getLoadingNavigation(location, opts.submission);\n      flushSync = false;\n      // No need to do fog of war matching again on loader execution\n      fogOfWar.active = false;\n      // Create a GET request for the loaders\n      request = createClientSideRequest(init.history, request.url, request.signal);\n    }\n    // Call loaders\n    let {\n      shortCircuited,\n      matches: updatedMatches,\n      loaderData,\n      errors\n    } = await handleLoaders(request, location, matches, fogOfWar.active, loadingNavigation, opts && opts.submission, opts && opts.fetcherSubmission, opts && opts.replace, opts && opts.initialHydration === true, flushSync, pendingActionResult);\n    if (shortCircuited) {\n      return;\n    }\n    // Clean up now that the action/loaders have completed.  Don't clean up if\n    // we short circuited because pendingNavigationController will have already\n    // been assigned to a new controller for the next navigation\n    pendingNavigationController = null;\n    completeNavigation(location, _extends({\n      matches: updatedMatches || matches\n    }, getActionDataForCommit(pendingActionResult), {\n      loaderData,\n      errors\n    }));\n  }\n  // Call the action matched by the leaf route for this navigation and handle\n  // redirects/errors\n  async function handleAction(request, location, submission, matches, isFogOfWar, opts) {\n    if (opts === void 0) {\n      opts = {};\n    }\n    interruptActiveLoads();\n    // Put us in a submitting state\n    let navigation = getSubmittingNavigation(location, submission);\n    updateState({\n      navigation\n    }, {\n      flushSync: opts.flushSync === true\n    });\n    if (isFogOfWar) {\n      let discoverResult = await discoverRoutes(matches, location.pathname, request.signal);\n      if (discoverResult.type === \"aborted\") {\n        return {\n          shortCircuited: true\n        };\n      } else if (discoverResult.type === \"error\") {\n        let {\n          error,\n          notFoundMatches,\n          route\n        } = handleDiscoverRouteError(location.pathname, discoverResult);\n        return {\n          matches: notFoundMatches,\n          pendingActionResult: [route.id, {\n            type: ResultType.error,\n            error\n          }]\n        };\n      } else if (!discoverResult.matches) {\n        let {\n          notFoundMatches,\n          error,\n          route\n        } = handleNavigational404(location.pathname);\n        return {\n          matches: notFoundMatches,\n          pendingActionResult: [route.id, {\n            type: ResultType.error,\n            error\n          }]\n        };\n      } else {\n        matches = discoverResult.matches;\n      }\n    }\n    // Call our action and get the result\n    let result;\n    let actionMatch = getTargetMatch(matches, location);\n    if (!actionMatch.route.action && !actionMatch.route.lazy) {\n      result = {\n        type: ResultType.error,\n        error: getInternalRouterError(405, {\n          method: request.method,\n          pathname: location.pathname,\n          routeId: actionMatch.route.id\n        })\n      };\n    } else {\n      let results = await callDataStrategy(\"action\", request, [actionMatch], matches);\n      result = results[0];\n      if (request.signal.aborted) {\n        return {\n          shortCircuited: true\n        };\n      }\n    }\n    if (isRedirectResult(result)) {\n      let replace;\n      if (opts && opts.replace != null) {\n        replace = opts.replace;\n      } else {\n        // If the user didn't explicity indicate replace behavior, replace if\n        // we redirected to the exact same location we're currently at to avoid\n        // double back-buttons\n        let location = normalizeRedirectLocation(result.response.headers.get(\"Location\"), new URL(request.url), basename);\n        replace = location === state.location.pathname + state.location.search;\n      }\n      await startRedirectNavigation(request, result, {\n        submission,\n        replace\n      });\n      return {\n        shortCircuited: true\n      };\n    }\n    if (isDeferredResult(result)) {\n      throw getInternalRouterError(400, {\n        type: \"defer-action\"\n      });\n    }\n    if (isErrorResult(result)) {\n      // Store off the pending error - we use it to determine which loaders\n      // to call and will commit it when we complete the navigation\n      let boundaryMatch = findNearestBoundary(matches, actionMatch.route.id);\n      // By default, all submissions to the current location are REPLACE\n      // navigations, but if the action threw an error that'll be rendered in\n      // an errorElement, we fall back to PUSH so that the user can use the\n      // back button to get back to the pre-submission form location to try\n      // again\n      if ((opts && opts.replace) !== true) {\n        pendingAction = Action.Push;\n      }\n      return {\n        matches,\n        pendingActionResult: [boundaryMatch.route.id, result]\n      };\n    }\n    return {\n      matches,\n      pendingActionResult: [actionMatch.route.id, result]\n    };\n  }\n  // Call all applicable loaders for the given matches, handling redirects,\n  // errors, etc.\n  async function handleLoaders(request, location, matches, isFogOfWar, overrideNavigation, submission, fetcherSubmission, replace, initialHydration, flushSync, pendingActionResult) {\n    // Figure out the right navigation we want to use for data loading\n    let loadingNavigation = overrideNavigation || getLoadingNavigation(location, submission);\n    // If this was a redirect from an action we don't have a \"submission\" but\n    // we have it on the loading navigation so use that if available\n    let activeSubmission = submission || fetcherSubmission || getSubmissionFromNavigation(loadingNavigation);\n    // If this is an uninterrupted revalidation, we remain in our current idle\n    // state.  If not, we need to switch to our loading state and load data,\n    // preserving any new action data or existing action data (in the case of\n    // a revalidation interrupting an actionReload)\n    // If we have partialHydration enabled, then don't update the state for the\n    // initial data load since it's not a \"navigation\"\n    let shouldUpdateNavigationState = !isUninterruptedRevalidation && (!future.v7_partialHydration || !initialHydration);\n    // When fog of war is enabled, we enter our `loading` state earlier so we\n    // can discover new routes during the `loading` state.  We skip this if\n    // we've already run actions since we would have done our matching already.\n    // If the children() function threw then, we want to proceed with the\n    // partial matches it discovered.\n    if (isFogOfWar) {\n      if (shouldUpdateNavigationState) {\n        let actionData = getUpdatedActionData(pendingActionResult);\n        updateState(_extends({\n          navigation: loadingNavigation\n        }, actionData !== undefined ? {\n          actionData\n        } : {}), {\n          flushSync\n        });\n      }\n      let discoverResult = await discoverRoutes(matches, location.pathname, request.signal);\n      if (discoverResult.type === \"aborted\") {\n        return {\n          shortCircuited: true\n        };\n      } else if (discoverResult.type === \"error\") {\n        let {\n          error,\n          notFoundMatches,\n          route\n        } = handleDiscoverRouteError(location.pathname, discoverResult);\n        return {\n          matches: notFoundMatches,\n          loaderData: {},\n          errors: {\n            [route.id]: error\n          }\n        };\n      } else if (!discoverResult.matches) {\n        let {\n          error,\n          notFoundMatches,\n          route\n        } = handleNavigational404(location.pathname);\n        return {\n          matches: notFoundMatches,\n          loaderData: {},\n          errors: {\n            [route.id]: error\n          }\n        };\n      } else {\n        matches = discoverResult.matches;\n      }\n    }\n    let routesToUse = inFlightDataRoutes || dataRoutes;\n    let [matchesToLoad, revalidatingFetchers] = getMatchesToLoad(init.history, state, matches, activeSubmission, location, future.v7_partialHydration && initialHydration === true, future.unstable_skipActionErrorRevalidation, isRevalidationRequired, cancelledDeferredRoutes, cancelledFetcherLoads, deletedFetchers, fetchLoadMatches, fetchRedirectIds, routesToUse, basename, pendingActionResult);\n    // Cancel pending deferreds for no-longer-matched routes or routes we're\n    // about to reload.  Note that if this is an action reload we would have\n    // already cancelled all pending deferreds so this would be a no-op\n    cancelActiveDeferreds(routeId => !(matches && matches.some(m => m.route.id === routeId)) || matchesToLoad && matchesToLoad.some(m => m.route.id === routeId));\n    pendingNavigationLoadId = ++incrementingLoadId;\n    // Short circuit if we have no loaders to run\n    if (matchesToLoad.length === 0 && revalidatingFetchers.length === 0) {\n      let updatedFetchers = markFetchRedirectsDone();\n      completeNavigation(location, _extends({\n        matches,\n        loaderData: {},\n        // Commit pending error if we're short circuiting\n        errors: pendingActionResult && isErrorResult(pendingActionResult[1]) ? {\n          [pendingActionResult[0]]: pendingActionResult[1].error\n        } : null\n      }, getActionDataForCommit(pendingActionResult), updatedFetchers ? {\n        fetchers: new Map(state.fetchers)\n      } : {}), {\n        flushSync\n      });\n      return {\n        shortCircuited: true\n      };\n    }\n    if (shouldUpdateNavigationState) {\n      let updates = {};\n      if (!isFogOfWar) {\n        // Only update navigation/actionNData if we didn't already do it above\n        updates.navigation = loadingNavigation;\n        let actionData = getUpdatedActionData(pendingActionResult);\n        if (actionData !== undefined) {\n          updates.actionData = actionData;\n        }\n      }\n      if (revalidatingFetchers.length > 0) {\n        updates.fetchers = getUpdatedRevalidatingFetchers(revalidatingFetchers);\n      }\n      updateState(updates, {\n        flushSync\n      });\n    }\n    revalidatingFetchers.forEach(rf => {\n      if (fetchControllers.has(rf.key)) {\n        abortFetcher(rf.key);\n      }\n      if (rf.controller) {\n        // Fetchers use an independent AbortController so that aborting a fetcher\n        // (via deleteFetcher) does not abort the triggering navigation that\n        // triggered the revalidation\n        fetchControllers.set(rf.key, rf.controller);\n      }\n    });\n    // Proxy navigation abort through to revalidation fetchers\n    let abortPendingFetchRevalidations = () => revalidatingFetchers.forEach(f => abortFetcher(f.key));\n    if (pendingNavigationController) {\n      pendingNavigationController.signal.addEventListener(\"abort\", abortPendingFetchRevalidations);\n    }\n    let {\n      loaderResults,\n      fetcherResults\n    } = await callLoadersAndMaybeResolveData(state.matches, matches, matchesToLoad, revalidatingFetchers, request);\n    if (request.signal.aborted) {\n      return {\n        shortCircuited: true\n      };\n    }\n    // Clean up _after_ loaders have completed.  Don't clean up if we short\n    // circuited because fetchControllers would have been aborted and\n    // reassigned to new controllers for the next navigation\n    if (pendingNavigationController) {\n      pendingNavigationController.signal.removeEventListener(\"abort\", abortPendingFetchRevalidations);\n    }\n    revalidatingFetchers.forEach(rf => fetchControllers.delete(rf.key));\n    // If any loaders returned a redirect Response, start a new REPLACE navigation\n    let redirect = findRedirect([...loaderResults, ...fetcherResults]);\n    if (redirect) {\n      if (redirect.idx >= matchesToLoad.length) {\n        // If this redirect came from a fetcher make sure we mark it in\n        // fetchRedirectIds so it doesn't get revalidated on the next set of\n        // loader executions\n        let fetcherKey = revalidatingFetchers[redirect.idx - matchesToLoad.length].key;\n        fetchRedirectIds.add(fetcherKey);\n      }\n      await startRedirectNavigation(request, redirect.result, {\n        replace\n      });\n      return {\n        shortCircuited: true\n      };\n    }\n    // Process and commit output from loaders\n    let {\n      loaderData,\n      errors\n    } = processLoaderData(state, matches, matchesToLoad, loaderResults, pendingActionResult, revalidatingFetchers, fetcherResults, activeDeferreds);\n    // Wire up subscribers to update loaderData as promises settle\n    activeDeferreds.forEach((deferredData, routeId) => {\n      deferredData.subscribe(aborted => {\n        // Note: No need to updateState here since the TrackedPromise on\n        // loaderData is stable across resolve/reject\n        // Remove this instance if we were aborted or if promises have settled\n        if (aborted || deferredData.done) {\n          activeDeferreds.delete(routeId);\n        }\n      });\n    });\n    // During partial hydration, preserve SSR errors for routes that don't re-run\n    if (future.v7_partialHydration && initialHydration && state.errors) {\n      Object.entries(state.errors).filter(_ref2 => {\n        let [id] = _ref2;\n        return !matchesToLoad.some(m => m.route.id === id);\n      }).forEach(_ref3 => {\n        let [routeId, error] = _ref3;\n        errors = Object.assign(errors || {}, {\n          [routeId]: error\n        });\n      });\n    }\n    let updatedFetchers = markFetchRedirectsDone();\n    let didAbortFetchLoads = abortStaleFetchLoads(pendingNavigationLoadId);\n    let shouldUpdateFetchers = updatedFetchers || didAbortFetchLoads || revalidatingFetchers.length > 0;\n    return _extends({\n      matches,\n      loaderData,\n      errors\n    }, shouldUpdateFetchers ? {\n      fetchers: new Map(state.fetchers)\n    } : {});\n  }\n  function getUpdatedActionData(pendingActionResult) {\n    if (pendingActionResult && !isErrorResult(pendingActionResult[1])) {\n      // This is cast to `any` currently because `RouteData`uses any and it\n      // would be a breaking change to use any.\n      // TODO: v7 - change `RouteData` to use `unknown` instead of `any`\n      return {\n        [pendingActionResult[0]]: pendingActionResult[1].data\n      };\n    } else if (state.actionData) {\n      if (Object.keys(state.actionData).length === 0) {\n        return null;\n      } else {\n        return state.actionData;\n      }\n    }\n  }\n  function getUpdatedRevalidatingFetchers(revalidatingFetchers) {\n    revalidatingFetchers.forEach(rf => {\n      let fetcher = state.fetchers.get(rf.key);\n      let revalidatingFetcher = getLoadingFetcher(undefined, fetcher ? fetcher.data : undefined);\n      state.fetchers.set(rf.key, revalidatingFetcher);\n    });\n    return new Map(state.fetchers);\n  }\n  // Trigger a fetcher load/submit for the given fetcher key\n  function fetch(key, routeId, href, opts) {\n    if (isServer) {\n      throw new Error(\"router.fetch() was called during the server render, but it shouldn't be. \" + \"You are likely calling a useFetcher() method in the body of your component. \" + \"Try moving it to a useEffect or a callback.\");\n    }\n    if (fetchControllers.has(key)) abortFetcher(key);\n    let flushSync = (opts && opts.unstable_flushSync) === true;\n    let routesToUse = inFlightDataRoutes || dataRoutes;\n    let normalizedPath = normalizeTo(state.location, state.matches, basename, future.v7_prependBasename, href, future.v7_relativeSplatPath, routeId, opts == null ? void 0 : opts.relative);\n    let matches = matchRoutes(routesToUse, normalizedPath, basename);\n    let fogOfWar = checkFogOfWar(matches, routesToUse, normalizedPath);\n    if (fogOfWar.active && fogOfWar.matches) {\n      matches = fogOfWar.matches;\n    }\n    if (!matches) {\n      setFetcherError(key, routeId, getInternalRouterError(404, {\n        pathname: normalizedPath\n      }), {\n        flushSync\n      });\n      return;\n    }\n    let {\n      path,\n      submission,\n      error\n    } = normalizeNavigateOptions(future.v7_normalizeFormMethod, true, normalizedPath, opts);\n    if (error) {\n      setFetcherError(key, routeId, error, {\n        flushSync\n      });\n      return;\n    }\n    let match = getTargetMatch(matches, path);\n    pendingPreventScrollReset = (opts && opts.preventScrollReset) === true;\n    if (submission && isMutationMethod(submission.formMethod)) {\n      handleFetcherAction(key, routeId, path, match, matches, fogOfWar.active, flushSync, submission);\n      return;\n    }\n    // Store off the match so we can call it's shouldRevalidate on subsequent\n    // revalidations\n    fetchLoadMatches.set(key, {\n      routeId,\n      path\n    });\n    handleFetcherLoader(key, routeId, path, match, matches, fogOfWar.active, flushSync, submission);\n  }\n  // Call the action for the matched fetcher.submit(), and then handle redirects,\n  // errors, and revalidation\n  async function handleFetcherAction(key, routeId, path, match, requestMatches, isFogOfWar, flushSync, submission) {\n    interruptActiveLoads();\n    fetchLoadMatches.delete(key);\n    function detectAndHandle405Error(m) {\n      if (!m.route.action && !m.route.lazy) {\n        let error = getInternalRouterError(405, {\n          method: submission.formMethod,\n          pathname: path,\n          routeId: routeId\n        });\n        setFetcherError(key, routeId, error, {\n          flushSync\n        });\n        return true;\n      }\n      return false;\n    }\n    if (!isFogOfWar && detectAndHandle405Error(match)) {\n      return;\n    }\n    // Put this fetcher into it's submitting state\n    let existingFetcher = state.fetchers.get(key);\n    updateFetcherState(key, getSubmittingFetcher(submission, existingFetcher), {\n      flushSync\n    });\n    let abortController = new AbortController();\n    let fetchRequest = createClientSideRequest(init.history, path, abortController.signal, submission);\n    if (isFogOfWar) {\n      let discoverResult = await discoverRoutes(requestMatches, path, fetchRequest.signal);\n      if (discoverResult.type === \"aborted\") {\n        return;\n      } else if (discoverResult.type === \"error\") {\n        let {\n          error\n        } = handleDiscoverRouteError(path, discoverResult);\n        setFetcherError(key, routeId, error, {\n          flushSync\n        });\n        return;\n      } else if (!discoverResult.matches) {\n        setFetcherError(key, routeId, getInternalRouterError(404, {\n          pathname: path\n        }), {\n          flushSync\n        });\n        return;\n      } else {\n        requestMatches = discoverResult.matches;\n        match = getTargetMatch(requestMatches, path);\n        if (detectAndHandle405Error(match)) {\n          return;\n        }\n      }\n    }\n    // Call the action for the fetcher\n    fetchControllers.set(key, abortController);\n    let originatingLoadId = incrementingLoadId;\n    let actionResults = await callDataStrategy(\"action\", fetchRequest, [match], requestMatches);\n    let actionResult = actionResults[0];\n    if (fetchRequest.signal.aborted) {\n      // We can delete this so long as we weren't aborted by our own fetcher\n      // re-submit which would have put _new_ controller is in fetchControllers\n      if (fetchControllers.get(key) === abortController) {\n        fetchControllers.delete(key);\n      }\n      return;\n    }\n    // When using v7_fetcherPersist, we don't want errors bubbling up to the UI\n    // or redirects processed for unmounted fetchers so we just revert them to\n    // idle\n    if (future.v7_fetcherPersist && deletedFetchers.has(key)) {\n      if (isRedirectResult(actionResult) || isErrorResult(actionResult)) {\n        updateFetcherState(key, getDoneFetcher(undefined));\n        return;\n      }\n      // Let SuccessResult's fall through for revalidation\n    } else {\n      if (isRedirectResult(actionResult)) {\n        fetchControllers.delete(key);\n        if (pendingNavigationLoadId > originatingLoadId) {\n          // A new navigation was kicked off after our action started, so that\n          // should take precedence over this redirect navigation.  We already\n          // set isRevalidationRequired so all loaders for the new route should\n          // fire unless opted out via shouldRevalidate\n          updateFetcherState(key, getDoneFetcher(undefined));\n          return;\n        } else {\n          fetchRedirectIds.add(key);\n          updateFetcherState(key, getLoadingFetcher(submission));\n          return startRedirectNavigation(fetchRequest, actionResult, {\n            fetcherSubmission: submission\n          });\n        }\n      }\n      // Process any non-redirect errors thrown\n      if (isErrorResult(actionResult)) {\n        setFetcherError(key, routeId, actionResult.error);\n        return;\n      }\n    }\n    if (isDeferredResult(actionResult)) {\n      throw getInternalRouterError(400, {\n        type: \"defer-action\"\n      });\n    }\n    // Start the data load for current matches, or the next location if we're\n    // in the middle of a navigation\n    let nextLocation = state.navigation.location || state.location;\n    let revalidationRequest = createClientSideRequest(init.history, nextLocation, abortController.signal);\n    let routesToUse = inFlightDataRoutes || dataRoutes;\n    let matches = state.navigation.state !== \"idle\" ? matchRoutes(routesToUse, state.navigation.location, basename) : state.matches;\n    invariant(matches, \"Didn't find any matches after fetcher action\");\n    let loadId = ++incrementingLoadId;\n    fetchReloadIds.set(key, loadId);\n    let loadFetcher = getLoadingFetcher(submission, actionResult.data);\n    state.fetchers.set(key, loadFetcher);\n    let [matchesToLoad, revalidatingFetchers] = getMatchesToLoad(init.history, state, matches, submission, nextLocation, false, future.unstable_skipActionErrorRevalidation, isRevalidationRequired, cancelledDeferredRoutes, cancelledFetcherLoads, deletedFetchers, fetchLoadMatches, fetchRedirectIds, routesToUse, basename, [match.route.id, actionResult]);\n    // Put all revalidating fetchers into the loading state, except for the\n    // current fetcher which we want to keep in it's current loading state which\n    // contains it's action submission info + action data\n    revalidatingFetchers.filter(rf => rf.key !== key).forEach(rf => {\n      let staleKey = rf.key;\n      let existingFetcher = state.fetchers.get(staleKey);\n      let revalidatingFetcher = getLoadingFetcher(undefined, existingFetcher ? existingFetcher.data : undefined);\n      state.fetchers.set(staleKey, revalidatingFetcher);\n      if (fetchControllers.has(staleKey)) {\n        abortFetcher(staleKey);\n      }\n      if (rf.controller) {\n        fetchControllers.set(staleKey, rf.controller);\n      }\n    });\n    updateState({\n      fetchers: new Map(state.fetchers)\n    });\n    let abortPendingFetchRevalidations = () => revalidatingFetchers.forEach(rf => abortFetcher(rf.key));\n    abortController.signal.addEventListener(\"abort\", abortPendingFetchRevalidations);\n    let {\n      loaderResults,\n      fetcherResults\n    } = await callLoadersAndMaybeResolveData(state.matches, matches, matchesToLoad, revalidatingFetchers, revalidationRequest);\n    if (abortController.signal.aborted) {\n      return;\n    }\n    abortController.signal.removeEventListener(\"abort\", abortPendingFetchRevalidations);\n    fetchReloadIds.delete(key);\n    fetchControllers.delete(key);\n    revalidatingFetchers.forEach(r => fetchControllers.delete(r.key));\n    let redirect = findRedirect([...loaderResults, ...fetcherResults]);\n    if (redirect) {\n      if (redirect.idx >= matchesToLoad.length) {\n        // If this redirect came from a fetcher make sure we mark it in\n        // fetchRedirectIds so it doesn't get revalidated on the next set of\n        // loader executions\n        let fetcherKey = revalidatingFetchers[redirect.idx - matchesToLoad.length].key;\n        fetchRedirectIds.add(fetcherKey);\n      }\n      return startRedirectNavigation(revalidationRequest, redirect.result);\n    }\n    // Process and commit output from loaders\n    let {\n      loaderData,\n      errors\n    } = processLoaderData(state, state.matches, matchesToLoad, loaderResults, undefined, revalidatingFetchers, fetcherResults, activeDeferreds);\n    // Since we let revalidations complete even if the submitting fetcher was\n    // deleted, only put it back to idle if it hasn't been deleted\n    if (state.fetchers.has(key)) {\n      let doneFetcher = getDoneFetcher(actionResult.data);\n      state.fetchers.set(key, doneFetcher);\n    }\n    abortStaleFetchLoads(loadId);\n    // If we are currently in a navigation loading state and this fetcher is\n    // more recent than the navigation, we want the newer data so abort the\n    // navigation and complete it with the fetcher data\n    if (state.navigation.state === \"loading\" && loadId > pendingNavigationLoadId) {\n      invariant(pendingAction, \"Expected pending action\");\n      pendingNavigationController && pendingNavigationController.abort();\n      completeNavigation(state.navigation.location, {\n        matches,\n        loaderData,\n        errors,\n        fetchers: new Map(state.fetchers)\n      });\n    } else {\n      // otherwise just update with the fetcher data, preserving any existing\n      // loaderData for loaders that did not need to reload.  We have to\n      // manually merge here since we aren't going through completeNavigation\n      updateState({\n        errors,\n        loaderData: mergeLoaderData(state.loaderData, loaderData, matches, errors),\n        fetchers: new Map(state.fetchers)\n      });\n      isRevalidationRequired = false;\n    }\n  }\n  // Call the matched loader for fetcher.load(), handling redirects, errors, etc.\n  async function handleFetcherLoader(key, routeId, path, match, matches, isFogOfWar, flushSync, submission) {\n    let existingFetcher = state.fetchers.get(key);\n    updateFetcherState(key, getLoadingFetcher(submission, existingFetcher ? existingFetcher.data : undefined), {\n      flushSync\n    });\n    let abortController = new AbortController();\n    let fetchRequest = createClientSideRequest(init.history, path, abortController.signal);\n    if (isFogOfWar) {\n      let discoverResult = await discoverRoutes(matches, path, fetchRequest.signal);\n      if (discoverResult.type === \"aborted\") {\n        return;\n      } else if (discoverResult.type === \"error\") {\n        let {\n          error\n        } = handleDiscoverRouteError(path, discoverResult);\n        setFetcherError(key, routeId, error, {\n          flushSync\n        });\n        return;\n      } else if (!discoverResult.matches) {\n        setFetcherError(key, routeId, getInternalRouterError(404, {\n          pathname: path\n        }), {\n          flushSync\n        });\n        return;\n      } else {\n        matches = discoverResult.matches;\n        match = getTargetMatch(matches, path);\n      }\n    }\n    // Call the loader for this fetcher route match\n    fetchControllers.set(key, abortController);\n    let originatingLoadId = incrementingLoadId;\n    let results = await callDataStrategy(\"loader\", fetchRequest, [match], matches);\n    let result = results[0];\n    // Deferred isn't supported for fetcher loads, await everything and treat it\n    // as a normal load.  resolveDeferredData will return undefined if this\n    // fetcher gets aborted, so we just leave result untouched and short circuit\n    // below if that happens\n    if (isDeferredResult(result)) {\n      result = (await resolveDeferredData(result, fetchRequest.signal, true)) || result;\n    }\n    // We can delete this so long as we weren't aborted by our our own fetcher\n    // re-load which would have put _new_ controller is in fetchControllers\n    if (fetchControllers.get(key) === abortController) {\n      fetchControllers.delete(key);\n    }\n    if (fetchRequest.signal.aborted) {\n      return;\n    }\n    // We don't want errors bubbling up or redirects followed for unmounted\n    // fetchers, so short circuit here if it was removed from the UI\n    if (deletedFetchers.has(key)) {\n      updateFetcherState(key, getDoneFetcher(undefined));\n      return;\n    }\n    // If the loader threw a redirect Response, start a new REPLACE navigation\n    if (isRedirectResult(result)) {\n      if (pendingNavigationLoadId > originatingLoadId) {\n        // A new navigation was kicked off after our loader started, so that\n        // should take precedence over this redirect navigation\n        updateFetcherState(key, getDoneFetcher(undefined));\n        return;\n      } else {\n        fetchRedirectIds.add(key);\n        await startRedirectNavigation(fetchRequest, result);\n        return;\n      }\n    }\n    // Process any non-redirect errors thrown\n    if (isErrorResult(result)) {\n      setFetcherError(key, routeId, result.error);\n      return;\n    }\n    invariant(!isDeferredResult(result), \"Unhandled fetcher deferred data\");\n    // Put the fetcher back into an idle state\n    updateFetcherState(key, getDoneFetcher(result.data));\n  }\n  /**\n   * Utility function to handle redirects returned from an action or loader.\n   * Normally, a redirect \"replaces\" the navigation that triggered it.  So, for\n   * example:\n   *\n   *  - user is on /a\n   *  - user clicks a link to /b\n   *  - loader for /b redirects to /c\n   *\n   * In a non-JS app the browser would track the in-flight navigation to /b and\n   * then replace it with /c when it encountered the redirect response.  In\n   * the end it would only ever update the URL bar with /c.\n   *\n   * In client-side routing using pushState/replaceState, we aim to emulate\n   * this behavior and we also do not update history until the end of the\n   * navigation (including processed redirects).  This means that we never\n   * actually touch history until we've processed redirects, so we just use\n   * the history action from the original navigation (PUSH or REPLACE).\n   */\n  async function startRedirectNavigation(request, redirect, _temp2) {\n    let {\n      submission,\n      fetcherSubmission,\n      replace\n    } = _temp2 === void 0 ? {} : _temp2;\n    if (redirect.response.headers.has(\"X-Remix-Revalidate\")) {\n      isRevalidationRequired = true;\n    }\n    let location = redirect.response.headers.get(\"Location\");\n    invariant(location, \"Expected a Location header on the redirect Response\");\n    location = normalizeRedirectLocation(location, new URL(request.url), basename);\n    let redirectLocation = createLocation(state.location, location, {\n      _isRedirect: true\n    });\n    if (isBrowser) {\n      let isDocumentReload = false;\n      if (redirect.response.headers.has(\"X-Remix-Reload-Document\")) {\n        // Hard reload if the response contained X-Remix-Reload-Document\n        isDocumentReload = true;\n      } else if (ABSOLUTE_URL_REGEX.test(location)) {\n        const url = init.history.createURL(location);\n        isDocumentReload =\n        // Hard reload if it's an absolute URL to a new origin\n        url.origin !== routerWindow.location.origin ||\n        // Hard reload if it's an absolute URL that does not match our basename\n        stripBasename(url.pathname, basename) == null;\n      }\n      if (isDocumentReload) {\n        if (replace) {\n          routerWindow.location.replace(location);\n        } else {\n          routerWindow.location.assign(location);\n        }\n        return;\n      }\n    }\n    // There's no need to abort on redirects, since we don't detect the\n    // redirect until the action/loaders have settled\n    pendingNavigationController = null;\n    let redirectHistoryAction = replace === true ? Action.Replace : Action.Push;\n    // Use the incoming submission if provided, fallback on the active one in\n    // state.navigation\n    let {\n      formMethod,\n      formAction,\n      formEncType\n    } = state.navigation;\n    if (!submission && !fetcherSubmission && formMethod && formAction && formEncType) {\n      submission = getSubmissionFromNavigation(state.navigation);\n    }\n    // If this was a 307/308 submission we want to preserve the HTTP method and\n    // re-submit the GET/POST/PUT/PATCH/DELETE as a submission navigation to the\n    // redirected location\n    let activeSubmission = submission || fetcherSubmission;\n    if (redirectPreserveMethodStatusCodes.has(redirect.response.status) && activeSubmission && isMutationMethod(activeSubmission.formMethod)) {\n      await startNavigation(redirectHistoryAction, redirectLocation, {\n        submission: _extends({}, activeSubmission, {\n          formAction: location\n        }),\n        // Preserve this flag across redirects\n        preventScrollReset: pendingPreventScrollReset\n      });\n    } else {\n      // If we have a navigation submission, we will preserve it through the\n      // redirect navigation\n      let overrideNavigation = getLoadingNavigation(redirectLocation, submission);\n      await startNavigation(redirectHistoryAction, redirectLocation, {\n        overrideNavigation,\n        // Send fetcher submissions through for shouldRevalidate\n        fetcherSubmission,\n        // Preserve this flag across redirects\n        preventScrollReset: pendingPreventScrollReset\n      });\n    }\n  }\n  // Utility wrapper for calling dataStrategy client-side without having to\n  // pass around the manifest, mapRouteProperties, etc.\n  async function callDataStrategy(type, request, matchesToLoad, matches) {\n    try {\n      let results = await callDataStrategyImpl(dataStrategyImpl, type, request, matchesToLoad, matches, manifest, mapRouteProperties);\n      return await Promise.all(results.map((result, i) => {\n        if (isRedirectHandlerResult(result)) {\n          let response = result.result;\n          return {\n            type: ResultType.redirect,\n            response: normalizeRelativeRoutingRedirectResponse(response, request, matchesToLoad[i].route.id, matches, basename, future.v7_relativeSplatPath)\n          };\n        }\n        return convertHandlerResultToDataResult(result);\n      }));\n    } catch (e) {\n      // If the outer dataStrategy method throws, just return the error for all\n      // matches - and it'll naturally bubble to the root\n      return matchesToLoad.map(() => ({\n        type: ResultType.error,\n        error: e\n      }));\n    }\n  }\n  async function callLoadersAndMaybeResolveData(currentMatches, matches, matchesToLoad, fetchersToLoad, request) {\n    let [loaderResults, ...fetcherResults] = await Promise.all([matchesToLoad.length ? callDataStrategy(\"loader\", request, matchesToLoad, matches) : [], ...fetchersToLoad.map(f => {\n      if (f.matches && f.match && f.controller) {\n        let fetcherRequest = createClientSideRequest(init.history, f.path, f.controller.signal);\n        return callDataStrategy(\"loader\", fetcherRequest, [f.match], f.matches).then(r => r[0]);\n      } else {\n        return Promise.resolve({\n          type: ResultType.error,\n          error: getInternalRouterError(404, {\n            pathname: f.path\n          })\n        });\n      }\n    })]);\n    await Promise.all([resolveDeferredResults(currentMatches, matchesToLoad, loaderResults, loaderResults.map(() => request.signal), false, state.loaderData), resolveDeferredResults(currentMatches, fetchersToLoad.map(f => f.match), fetcherResults, fetchersToLoad.map(f => f.controller ? f.controller.signal : null), true)]);\n    return {\n      loaderResults,\n      fetcherResults\n    };\n  }\n  function interruptActiveLoads() {\n    // Every interruption triggers a revalidation\n    isRevalidationRequired = true;\n    // Cancel pending route-level deferreds and mark cancelled routes for\n    // revalidation\n    cancelledDeferredRoutes.push(...cancelActiveDeferreds());\n    // Abort in-flight fetcher loads\n    fetchLoadMatches.forEach((_, key) => {\n      if (fetchControllers.has(key)) {\n        cancelledFetcherLoads.push(key);\n        abortFetcher(key);\n      }\n    });\n  }\n  function updateFetcherState(key, fetcher, opts) {\n    if (opts === void 0) {\n      opts = {};\n    }\n    state.fetchers.set(key, fetcher);\n    updateState({\n      fetchers: new Map(state.fetchers)\n    }, {\n      flushSync: (opts && opts.flushSync) === true\n    });\n  }\n  function setFetcherError(key, routeId, error, opts) {\n    if (opts === void 0) {\n      opts = {};\n    }\n    let boundaryMatch = findNearestBoundary(state.matches, routeId);\n    deleteFetcher(key);\n    updateState({\n      errors: {\n        [boundaryMatch.route.id]: error\n      },\n      fetchers: new Map(state.fetchers)\n    }, {\n      flushSync: (opts && opts.flushSync) === true\n    });\n  }\n  function getFetcher(key) {\n    if (future.v7_fetcherPersist) {\n      activeFetchers.set(key, (activeFetchers.get(key) || 0) + 1);\n      // If this fetcher was previously marked for deletion, unmark it since we\n      // have a new instance\n      if (deletedFetchers.has(key)) {\n        deletedFetchers.delete(key);\n      }\n    }\n    return state.fetchers.get(key) || IDLE_FETCHER;\n  }\n  function deleteFetcher(key) {\n    let fetcher = state.fetchers.get(key);\n    // Don't abort the controller if this is a deletion of a fetcher.submit()\n    // in it's loading phase since - we don't want to abort the corresponding\n    // revalidation and want them to complete and land\n    if (fetchControllers.has(key) && !(fetcher && fetcher.state === \"loading\" && fetchReloadIds.has(key))) {\n      abortFetcher(key);\n    }\n    fetchLoadMatches.delete(key);\n    fetchReloadIds.delete(key);\n    fetchRedirectIds.delete(key);\n    deletedFetchers.delete(key);\n    state.fetchers.delete(key);\n  }\n  function deleteFetcherAndUpdateState(key) {\n    if (future.v7_fetcherPersist) {\n      let count = (activeFetchers.get(key) || 0) - 1;\n      if (count <= 0) {\n        activeFetchers.delete(key);\n        deletedFetchers.add(key);\n      } else {\n        activeFetchers.set(key, count);\n      }\n    } else {\n      deleteFetcher(key);\n    }\n    updateState({\n      fetchers: new Map(state.fetchers)\n    });\n  }\n  function abortFetcher(key) {\n    let controller = fetchControllers.get(key);\n    invariant(controller, \"Expected fetch controller: \" + key);\n    controller.abort();\n    fetchControllers.delete(key);\n  }\n  function markFetchersDone(keys) {\n    for (let key of keys) {\n      let fetcher = getFetcher(key);\n      let doneFetcher = getDoneFetcher(fetcher.data);\n      state.fetchers.set(key, doneFetcher);\n    }\n  }\n  function markFetchRedirectsDone() {\n    let doneKeys = [];\n    let updatedFetchers = false;\n    for (let key of fetchRedirectIds) {\n      let fetcher = state.fetchers.get(key);\n      invariant(fetcher, \"Expected fetcher: \" + key);\n      if (fetcher.state === \"loading\") {\n        fetchRedirectIds.delete(key);\n        doneKeys.push(key);\n        updatedFetchers = true;\n      }\n    }\n    markFetchersDone(doneKeys);\n    return updatedFetchers;\n  }\n  function abortStaleFetchLoads(landedId) {\n    let yeetedKeys = [];\n    for (let [key, id] of fetchReloadIds) {\n      if (id < landedId) {\n        let fetcher = state.fetchers.get(key);\n        invariant(fetcher, \"Expected fetcher: \" + key);\n        if (fetcher.state === \"loading\") {\n          abortFetcher(key);\n          fetchReloadIds.delete(key);\n          yeetedKeys.push(key);\n        }\n      }\n    }\n    markFetchersDone(yeetedKeys);\n    return yeetedKeys.length > 0;\n  }\n  function getBlocker(key, fn) {\n    let blocker = state.blockers.get(key) || IDLE_BLOCKER;\n    if (blockerFunctions.get(key) !== fn) {\n      blockerFunctions.set(key, fn);\n    }\n    return blocker;\n  }\n  function deleteBlocker(key) {\n    state.blockers.delete(key);\n    blockerFunctions.delete(key);\n  }\n  // Utility function to update blockers, ensuring valid state transitions\n  function updateBlocker(key, newBlocker) {\n    let blocker = state.blockers.get(key) || IDLE_BLOCKER;\n    // Poor mans state machine :)\n    // https://mermaid.live/edit#pako:eNqVkc9OwzAMxl8l8nnjAYrEtDIOHEBIgwvKJTReGy3_lDpIqO27k6awMG0XcrLlnz87nwdonESogKXXBuE79rq75XZO3-yHds0RJVuv70YrPlUrCEe2HfrORS3rubqZfuhtpg5C9wk5tZ4VKcRUq88q9Z8RS0-48cE1iHJkL0ugbHuFLus9L6spZy8nX9MP2CNdomVaposqu3fGayT8T8-jJQwhepo_UtpgBQaDEUom04dZhAN1aJBDlUKJBxE1ceB2Smj0Mln-IBW5AFU2dwUiktt_2Qaq2dBfaKdEup85UV7Yd-dKjlnkabl2Pvr0DTkTreM\n    invariant(blocker.state === \"unblocked\" && newBlocker.state === \"blocked\" || blocker.state === \"blocked\" && newBlocker.state === \"blocked\" || blocker.state === \"blocked\" && newBlocker.state === \"proceeding\" || blocker.state === \"blocked\" && newBlocker.state === \"unblocked\" || blocker.state === \"proceeding\" && newBlocker.state === \"unblocked\", \"Invalid blocker state transition: \" + blocker.state + \" -> \" + newBlocker.state);\n    let blockers = new Map(state.blockers);\n    blockers.set(key, newBlocker);\n    updateState({\n      blockers\n    });\n  }\n  function shouldBlockNavigation(_ref4) {\n    let {\n      currentLocation,\n      nextLocation,\n      historyAction\n    } = _ref4;\n    if (blockerFunctions.size === 0) {\n      return;\n    }\n    // We ony support a single active blocker at the moment since we don't have\n    // any compelling use cases for multi-blocker yet\n    if (blockerFunctions.size > 1) {\n      warning(false, \"A router only supports one blocker at a time\");\n    }\n    let entries = Array.from(blockerFunctions.entries());\n    let [blockerKey, blockerFunction] = entries[entries.length - 1];\n    let blocker = state.blockers.get(blockerKey);\n    if (blocker && blocker.state === \"proceeding\") {\n      // If the blocker is currently proceeding, we don't need to re-check\n      // it and can let this navigation continue\n      return;\n    }\n    // At this point, we know we're unblocked/blocked so we need to check the\n    // user-provided blocker function\n    if (blockerFunction({\n      currentLocation,\n      nextLocation,\n      historyAction\n    })) {\n      return blockerKey;\n    }\n  }\n  function handleNavigational404(pathname) {\n    let error = getInternalRouterError(404, {\n      pathname\n    });\n    let routesToUse = inFlightDataRoutes || dataRoutes;\n    let {\n      matches,\n      route\n    } = getShortCircuitMatches(routesToUse);\n    // Cancel all pending deferred on 404s since we don't keep any routes\n    cancelActiveDeferreds();\n    return {\n      notFoundMatches: matches,\n      route,\n      error\n    };\n  }\n  function handleDiscoverRouteError(pathname, discoverResult) {\n    let matches = discoverResult.partialMatches;\n    let route = matches[matches.length - 1].route;\n    let error = getInternalRouterError(400, {\n      type: \"route-discovery\",\n      routeId: route.id,\n      pathname,\n      message: discoverResult.error != null && \"message\" in discoverResult.error ? discoverResult.error : String(discoverResult.error)\n    });\n    return {\n      notFoundMatches: matches,\n      route,\n      error\n    };\n  }\n  function cancelActiveDeferreds(predicate) {\n    let cancelledRouteIds = [];\n    activeDeferreds.forEach((dfd, routeId) => {\n      if (!predicate || predicate(routeId)) {\n        // Cancel the deferred - but do not remove from activeDeferreds here -\n        // we rely on the subscribers to do that so our tests can assert proper\n        // cleanup via _internalActiveDeferreds\n        dfd.cancel();\n        cancelledRouteIds.push(routeId);\n        activeDeferreds.delete(routeId);\n      }\n    });\n    return cancelledRouteIds;\n  }\n  // Opt in to capturing and reporting scroll positions during navigations,\n  // used by the <ScrollRestoration> component\n  function enableScrollRestoration(positions, getPosition, getKey) {\n    savedScrollPositions = positions;\n    getScrollPosition = getPosition;\n    getScrollRestorationKey = getKey || null;\n    // Perform initial hydration scroll restoration, since we miss the boat on\n    // the initial updateState() because we've not yet rendered <ScrollRestoration/>\n    // and therefore have no savedScrollPositions available\n    if (!initialScrollRestored && state.navigation === IDLE_NAVIGATION) {\n      initialScrollRestored = true;\n      let y = getSavedScrollPosition(state.location, state.matches);\n      if (y != null) {\n        updateState({\n          restoreScrollPosition: y\n        });\n      }\n    }\n    return () => {\n      savedScrollPositions = null;\n      getScrollPosition = null;\n      getScrollRestorationKey = null;\n    };\n  }\n  function getScrollKey(location, matches) {\n    if (getScrollRestorationKey) {\n      let key = getScrollRestorationKey(location, matches.map(m => convertRouteMatchToUiMatch(m, state.loaderData)));\n      return key || location.key;\n    }\n    return location.key;\n  }\n  function saveScrollPosition(location, matches) {\n    if (savedScrollPositions && getScrollPosition) {\n      let key = getScrollKey(location, matches);\n      savedScrollPositions[key] = getScrollPosition();\n    }\n  }\n  function getSavedScrollPosition(location, matches) {\n    if (savedScrollPositions) {\n      let key = getScrollKey(location, matches);\n      let y = savedScrollPositions[key];\n      if (typeof y === \"number\") {\n        return y;\n      }\n    }\n    return null;\n  }\n  function checkFogOfWar(matches, routesToUse, pathname) {\n    if (patchRoutesOnMissImpl) {\n      if (!matches) {\n        let fogMatches = matchRoutesImpl(routesToUse, pathname, basename, true);\n        return {\n          active: true,\n          matches: fogMatches || []\n        };\n      } else {\n        let leafRoute = matches[matches.length - 1].route;\n        if (leafRoute.path && (leafRoute.path === \"*\" || leafRoute.path.endsWith(\"/*\"))) {\n          // If we matched a splat, it might only be because we haven't yet fetched\n          // the children that would match with a higher score, so let's fetch\n          // around and find out\n          let partialMatches = matchRoutesImpl(routesToUse, pathname, basename, true);\n          return {\n            active: true,\n            matches: partialMatches\n          };\n        }\n      }\n    }\n    return {\n      active: false,\n      matches: null\n    };\n  }\n  async function discoverRoutes(matches, pathname, signal) {\n    let partialMatches = matches;\n    let route = partialMatches.length > 0 ? partialMatches[partialMatches.length - 1].route : null;\n    while (true) {\n      let isNonHMR = inFlightDataRoutes == null;\n      let routesToUse = inFlightDataRoutes || dataRoutes;\n      try {\n        await loadLazyRouteChildren(patchRoutesOnMissImpl, pathname, partialMatches, routesToUse, manifest, mapRouteProperties, pendingPatchRoutes, signal);\n      } catch (e) {\n        return {\n          type: \"error\",\n          error: e,\n          partialMatches\n        };\n      } finally {\n        // If we are not in the middle of an HMR revalidation and we changed the\n        // routes, provide a new identity so when we `updateState` at the end of\n        // this navigation/fetch `router.routes` will be a new identity and\n        // trigger a re-run of memoized `router.routes` dependencies.\n        // HMR will already update the identity and reflow when it lands\n        // `inFlightDataRoutes` in `completeNavigation`\n        if (isNonHMR) {\n          dataRoutes = [...dataRoutes];\n        }\n      }\n      if (signal.aborted) {\n        return {\n          type: \"aborted\"\n        };\n      }\n      let newMatches = matchRoutes(routesToUse, pathname, basename);\n      let matchedSplat = false;\n      if (newMatches) {\n        let leafRoute = newMatches[newMatches.length - 1].route;\n        if (leafRoute.index) {\n          // If we found an index route, we can stop\n          return {\n            type: \"success\",\n            matches: newMatches\n          };\n        }\n        if (leafRoute.path && leafRoute.path.length > 0) {\n          if (leafRoute.path === \"*\") {\n            // If we found a splat route, we can't be sure there's not a\n            // higher-scoring route down some partial matches trail so we need\n            // to check that out\n            matchedSplat = true;\n          } else {\n            // If we found a non-splat route, we can stop\n            return {\n              type: \"success\",\n              matches: newMatches\n            };\n          }\n        }\n      }\n      let newPartialMatches = matchRoutesImpl(routesToUse, pathname, basename, true);\n      // If we are no longer partially matching anything, this was either a\n      // legit splat match above, or it's a 404.  Also avoid loops if the\n      // second pass results in the same partial matches\n      if (!newPartialMatches || partialMatches.map(m => m.route.id).join(\"-\") === newPartialMatches.map(m => m.route.id).join(\"-\")) {\n        return {\n          type: \"success\",\n          matches: matchedSplat ? newMatches : null\n        };\n      }\n      partialMatches = newPartialMatches;\n      route = partialMatches[partialMatches.length - 1].route;\n      if (route.path === \"*\") {\n        // The splat is still our most accurate partial, so run with it\n        return {\n          type: \"success\",\n          matches: partialMatches\n        };\n      }\n    }\n  }\n  function _internalSetRoutes(newRoutes) {\n    manifest = {};\n    inFlightDataRoutes = convertRoutesToDataRoutes(newRoutes, mapRouteProperties, undefined, manifest);\n  }\n  function patchRoutes(routeId, children) {\n    let isNonHMR = inFlightDataRoutes == null;\n    let routesToUse = inFlightDataRoutes || dataRoutes;\n    patchRoutesImpl(routeId, children, routesToUse, manifest, mapRouteProperties);\n    // If we are not in the middle of an HMR revalidation and we changed the\n    // routes, provide a new identity and trigger a reflow via `updateState`\n    // to re-run memoized `router.routes` dependencies.\n    // HMR will already update the identity and reflow when it lands\n    // `inFlightDataRoutes` in `completeNavigation`\n    if (isNonHMR) {\n      dataRoutes = [...dataRoutes];\n      updateState({});\n    }\n  }\n  router = {\n    get basename() {\n      return basename;\n    },\n    get future() {\n      return future;\n    },\n    get state() {\n      return state;\n    },\n    get routes() {\n      return dataRoutes;\n    },\n    get window() {\n      return routerWindow;\n    },\n    initialize,\n    subscribe,\n    enableScrollRestoration,\n    navigate,\n    fetch,\n    revalidate,\n    // Passthrough to history-aware createHref used by useHref so we get proper\n    // hash-aware URLs in DOM paths\n    createHref: to => init.history.createHref(to),\n    encodeLocation: to => init.history.encodeLocation(to),\n    getFetcher,\n    deleteFetcher: deleteFetcherAndUpdateState,\n    dispose,\n    getBlocker,\n    deleteBlocker,\n    patchRoutes,\n    _internalFetchControllers: fetchControllers,\n    _internalActiveDeferreds: activeDeferreds,\n    // TODO: Remove setRoutes, it's temporary to avoid dealing with\n    // updating the tree while validating the update algorithm.\n    _internalSetRoutes\n  };\n  return router;\n}\n//#endregion\n////////////////////////////////////////////////////////////////////////////////\n//#region createStaticHandler\n////////////////////////////////////////////////////////////////////////////////\nconst UNSAFE_DEFERRED_SYMBOL = Symbol(\"deferred\");\nfunction createStaticHandler(routes, opts) {\n  invariant(routes.length > 0, \"You must provide a non-empty routes array to createStaticHandler\");\n  let manifest = {};\n  let basename = (opts ? opts.basename : null) || \"/\";\n  let mapRouteProperties;\n  if (opts != null && opts.mapRouteProperties) {\n    mapRouteProperties = opts.mapRouteProperties;\n  } else if (opts != null && opts.detectErrorBoundary) {\n    // If they are still using the deprecated version, wrap it with the new API\n    let detectErrorBoundary = opts.detectErrorBoundary;\n    mapRouteProperties = route => ({\n      hasErrorBoundary: detectErrorBoundary(route)\n    });\n  } else {\n    mapRouteProperties = defaultMapRouteProperties;\n  }\n  // Config driven behavior flags\n  let future = _extends({\n    v7_relativeSplatPath: false,\n    v7_throwAbortReason: false\n  }, opts ? opts.future : null);\n  let dataRoutes = convertRoutesToDataRoutes(routes, mapRouteProperties, undefined, manifest);\n  /**\n   * The query() method is intended for document requests, in which we want to\n   * call an optional action and potentially multiple loaders for all nested\n   * routes.  It returns a StaticHandlerContext object, which is very similar\n   * to the router state (location, loaderData, actionData, errors, etc.) and\n   * also adds SSR-specific information such as the statusCode and headers\n   * from action/loaders Responses.\n   *\n   * It _should_ never throw and should report all errors through the\n   * returned context.errors object, properly associating errors to their error\n   * boundary.  Additionally, it tracks _deepestRenderedBoundaryId which can be\n   * used to emulate React error boundaries during SSr by performing a second\n   * pass only down to the boundaryId.\n   *\n   * The one exception where we do not return a StaticHandlerContext is when a\n   * redirect response is returned or thrown from any action/loader.  We\n   * propagate that out and return the raw Response so the HTTP server can\n   * return it directly.\n   *\n   * - `opts.requestContext` is an optional server context that will be passed\n   *   to actions/loaders in the `context` parameter\n   * - `opts.skipLoaderErrorBubbling` is an optional parameter that will prevent\n   *   the bubbling of errors which allows single-fetch-type implementations\n   *   where the client will handle the bubbling and we may need to return data\n   *   for the handling route\n   */\n  async function query(request, _temp3) {\n    let {\n      requestContext,\n      skipLoaderErrorBubbling,\n      unstable_dataStrategy\n    } = _temp3 === void 0 ? {} : _temp3;\n    let url = new URL(request.url);\n    let method = request.method;\n    let location = createLocation(\"\", createPath(url), null, \"default\");\n    let matches = matchRoutes(dataRoutes, location, basename);\n    // SSR supports HEAD requests while SPA doesn't\n    if (!isValidMethod(method) && method !== \"HEAD\") {\n      let error = getInternalRouterError(405, {\n        method\n      });\n      let {\n        matches: methodNotAllowedMatches,\n        route\n      } = getShortCircuitMatches(dataRoutes);\n      return {\n        basename,\n        location,\n        matches: methodNotAllowedMatches,\n        loaderData: {},\n        actionData: null,\n        errors: {\n          [route.id]: error\n        },\n        statusCode: error.status,\n        loaderHeaders: {},\n        actionHeaders: {},\n        activeDeferreds: null\n      };\n    } else if (!matches) {\n      let error = getInternalRouterError(404, {\n        pathname: location.pathname\n      });\n      let {\n        matches: notFoundMatches,\n        route\n      } = getShortCircuitMatches(dataRoutes);\n      return {\n        basename,\n        location,\n        matches: notFoundMatches,\n        loaderData: {},\n        actionData: null,\n        errors: {\n          [route.id]: error\n        },\n        statusCode: error.status,\n        loaderHeaders: {},\n        actionHeaders: {},\n        activeDeferreds: null\n      };\n    }\n    let result = await queryImpl(request, location, matches, requestContext, unstable_dataStrategy || null, skipLoaderErrorBubbling === true, null);\n    if (isResponse(result)) {\n      return result;\n    }\n    // When returning StaticHandlerContext, we patch back in the location here\n    // since we need it for React Context.  But this helps keep our submit and\n    // loadRouteData operating on a Request instead of a Location\n    return _extends({\n      location,\n      basename\n    }, result);\n  }\n  /**\n   * The queryRoute() method is intended for targeted route requests, either\n   * for fetch ?_data requests or resource route requests.  In this case, we\n   * are only ever calling a single action or loader, and we are returning the\n   * returned value directly.  In most cases, this will be a Response returned\n   * from the action/loader, but it may be a primitive or other value as well -\n   * and in such cases the calling context should handle that accordingly.\n   *\n   * We do respect the throw/return differentiation, so if an action/loader\n   * throws, then this method will throw the value.  This is important so we\n   * can do proper boundary identification in Remix where a thrown Response\n   * must go to the Catch Boundary but a returned Response is happy-path.\n   *\n   * One thing to note is that any Router-initiated Errors that make sense\n   * to associate with a status code will be thrown as an ErrorResponse\n   * instance which include the raw Error, such that the calling context can\n   * serialize the error as they see fit while including the proper response\n   * code.  Examples here are 404 and 405 errors that occur prior to reaching\n   * any user-defined loaders.\n   *\n   * - `opts.routeId` allows you to specify the specific route handler to call.\n   *   If not provided the handler will determine the proper route by matching\n   *   against `request.url`\n   * - `opts.requestContext` is an optional server context that will be passed\n   *    to actions/loaders in the `context` parameter\n   */\n  async function queryRoute(request, _temp4) {\n    let {\n      routeId,\n      requestContext,\n      unstable_dataStrategy\n    } = _temp4 === void 0 ? {} : _temp4;\n    let url = new URL(request.url);\n    let method = request.method;\n    let location = createLocation(\"\", createPath(url), null, \"default\");\n    let matches = matchRoutes(dataRoutes, location, basename);\n    // SSR supports HEAD requests while SPA doesn't\n    if (!isValidMethod(method) && method !== \"HEAD\" && method !== \"OPTIONS\") {\n      throw getInternalRouterError(405, {\n        method\n      });\n    } else if (!matches) {\n      throw getInternalRouterError(404, {\n        pathname: location.pathname\n      });\n    }\n    let match = routeId ? matches.find(m => m.route.id === routeId) : getTargetMatch(matches, location);\n    if (routeId && !match) {\n      throw getInternalRouterError(403, {\n        pathname: location.pathname,\n        routeId\n      });\n    } else if (!match) {\n      // This should never hit I don't think?\n      throw getInternalRouterError(404, {\n        pathname: location.pathname\n      });\n    }\n    let result = await queryImpl(request, location, matches, requestContext, unstable_dataStrategy || null, false, match);\n    if (isResponse(result)) {\n      return result;\n    }\n    let error = result.errors ? Object.values(result.errors)[0] : undefined;\n    if (error !== undefined) {\n      // If we got back result.errors, that means the loader/action threw\n      // _something_ that wasn't a Response, but it's not guaranteed/required\n      // to be an `instanceof Error` either, so we have to use throw here to\n      // preserve the \"error\" state outside of queryImpl.\n      throw error;\n    }\n    // Pick off the right state value to return\n    if (result.actionData) {\n      return Object.values(result.actionData)[0];\n    }\n    if (result.loaderData) {\n      var _result$activeDeferre;\n      let data = Object.values(result.loaderData)[0];\n      if ((_result$activeDeferre = result.activeDeferreds) != null && _result$activeDeferre[match.route.id]) {\n        data[UNSAFE_DEFERRED_SYMBOL] = result.activeDeferreds[match.route.id];\n      }\n      return data;\n    }\n    return undefined;\n  }\n  async function queryImpl(request, location, matches, requestContext, unstable_dataStrategy, skipLoaderErrorBubbling, routeMatch) {\n    invariant(request.signal, \"query()/queryRoute() requests must contain an AbortController signal\");\n    try {\n      if (isMutationMethod(request.method.toLowerCase())) {\n        let result = await submit(request, matches, routeMatch || getTargetMatch(matches, location), requestContext, unstable_dataStrategy, skipLoaderErrorBubbling, routeMatch != null);\n        return result;\n      }\n      let result = await loadRouteData(request, matches, requestContext, unstable_dataStrategy, skipLoaderErrorBubbling, routeMatch);\n      return isResponse(result) ? result : _extends({}, result, {\n        actionData: null,\n        actionHeaders: {}\n      });\n    } catch (e) {\n      // If the user threw/returned a Response in callLoaderOrAction for a\n      // `queryRoute` call, we throw the `HandlerResult` to bail out early\n      // and then return or throw the raw Response here accordingly\n      if (isHandlerResult(e) && isResponse(e.result)) {\n        if (e.type === ResultType.error) {\n          throw e.result;\n        }\n        return e.result;\n      }\n      // Redirects are always returned since they don't propagate to catch\n      // boundaries\n      if (isRedirectResponse(e)) {\n        return e;\n      }\n      throw e;\n    }\n  }\n  async function submit(request, matches, actionMatch, requestContext, unstable_dataStrategy, skipLoaderErrorBubbling, isRouteRequest) {\n    let result;\n    if (!actionMatch.route.action && !actionMatch.route.lazy) {\n      let error = getInternalRouterError(405, {\n        method: request.method,\n        pathname: new URL(request.url).pathname,\n        routeId: actionMatch.route.id\n      });\n      if (isRouteRequest) {\n        throw error;\n      }\n      result = {\n        type: ResultType.error,\n        error\n      };\n    } else {\n      let results = await callDataStrategy(\"action\", request, [actionMatch], matches, isRouteRequest, requestContext, unstable_dataStrategy);\n      result = results[0];\n      if (request.signal.aborted) {\n        throwStaticHandlerAbortedError(request, isRouteRequest, future);\n      }\n    }\n    if (isRedirectResult(result)) {\n      // Uhhhh - this should never happen, we should always throw these from\n      // callLoaderOrAction, but the type narrowing here keeps TS happy and we\n      // can get back on the \"throw all redirect responses\" train here should\n      // this ever happen :/\n      throw new Response(null, {\n        status: result.response.status,\n        headers: {\n          Location: result.response.headers.get(\"Location\")\n        }\n      });\n    }\n    if (isDeferredResult(result)) {\n      let error = getInternalRouterError(400, {\n        type: \"defer-action\"\n      });\n      if (isRouteRequest) {\n        throw error;\n      }\n      result = {\n        type: ResultType.error,\n        error\n      };\n    }\n    if (isRouteRequest) {\n      // Note: This should only be non-Response values if we get here, since\n      // isRouteRequest should throw any Response received in callLoaderOrAction\n      if (isErrorResult(result)) {\n        throw result.error;\n      }\n      return {\n        matches: [actionMatch],\n        loaderData: {},\n        actionData: {\n          [actionMatch.route.id]: result.data\n        },\n        errors: null,\n        // Note: statusCode + headers are unused here since queryRoute will\n        // return the raw Response or value\n        statusCode: 200,\n        loaderHeaders: {},\n        actionHeaders: {},\n        activeDeferreds: null\n      };\n    }\n    // Create a GET request for the loaders\n    let loaderRequest = new Request(request.url, {\n      headers: request.headers,\n      redirect: request.redirect,\n      signal: request.signal\n    });\n    if (isErrorResult(result)) {\n      // Store off the pending error - we use it to determine which loaders\n      // to call and will commit it when we complete the navigation\n      let boundaryMatch = skipLoaderErrorBubbling ? actionMatch : findNearestBoundary(matches, actionMatch.route.id);\n      let context = await loadRouteData(loaderRequest, matches, requestContext, unstable_dataStrategy, skipLoaderErrorBubbling, null, [boundaryMatch.route.id, result]);\n      // action status codes take precedence over loader status codes\n      return _extends({}, context, {\n        statusCode: isRouteErrorResponse(result.error) ? result.error.status : result.statusCode != null ? result.statusCode : 500,\n        actionData: null,\n        actionHeaders: _extends({}, result.headers ? {\n          [actionMatch.route.id]: result.headers\n        } : {})\n      });\n    }\n    let context = await loadRouteData(loaderRequest, matches, requestContext, unstable_dataStrategy, skipLoaderErrorBubbling, null);\n    return _extends({}, context, {\n      actionData: {\n        [actionMatch.route.id]: result.data\n      }\n    }, result.statusCode ? {\n      statusCode: result.statusCode\n    } : {}, {\n      actionHeaders: result.headers ? {\n        [actionMatch.route.id]: result.headers\n      } : {}\n    });\n  }\n  async function loadRouteData(request, matches, requestContext, unstable_dataStrategy, skipLoaderErrorBubbling, routeMatch, pendingActionResult) {\n    let isRouteRequest = routeMatch != null;\n    // Short circuit if we have no loaders to run (queryRoute())\n    if (isRouteRequest && !(routeMatch != null && routeMatch.route.loader) && !(routeMatch != null && routeMatch.route.lazy)) {\n      throw getInternalRouterError(400, {\n        method: request.method,\n        pathname: new URL(request.url).pathname,\n        routeId: routeMatch == null ? void 0 : routeMatch.route.id\n      });\n    }\n    let requestMatches = routeMatch ? [routeMatch] : pendingActionResult && isErrorResult(pendingActionResult[1]) ? getLoaderMatchesUntilBoundary(matches, pendingActionResult[0]) : matches;\n    let matchesToLoad = requestMatches.filter(m => m.route.loader || m.route.lazy);\n    // Short circuit if we have no loaders to run (query())\n    if (matchesToLoad.length === 0) {\n      return {\n        matches,\n        // Add a null for all matched routes for proper revalidation on the client\n        loaderData: matches.reduce((acc, m) => Object.assign(acc, {\n          [m.route.id]: null\n        }), {}),\n        errors: pendingActionResult && isErrorResult(pendingActionResult[1]) ? {\n          [pendingActionResult[0]]: pendingActionResult[1].error\n        } : null,\n        statusCode: 200,\n        loaderHeaders: {},\n        activeDeferreds: null\n      };\n    }\n    let results = await callDataStrategy(\"loader\", request, matchesToLoad, matches, isRouteRequest, requestContext, unstable_dataStrategy);\n    if (request.signal.aborted) {\n      throwStaticHandlerAbortedError(request, isRouteRequest, future);\n    }\n    // Process and commit output from loaders\n    let activeDeferreds = new Map();\n    let context = processRouteLoaderData(matches, matchesToLoad, results, pendingActionResult, activeDeferreds, skipLoaderErrorBubbling);\n    // Add a null for any non-loader matches for proper revalidation on the client\n    let executedLoaders = new Set(matchesToLoad.map(match => match.route.id));\n    matches.forEach(match => {\n      if (!executedLoaders.has(match.route.id)) {\n        context.loaderData[match.route.id] = null;\n      }\n    });\n    return _extends({}, context, {\n      matches,\n      activeDeferreds: activeDeferreds.size > 0 ? Object.fromEntries(activeDeferreds.entries()) : null\n    });\n  }\n  // Utility wrapper for calling dataStrategy server-side without having to\n  // pass around the manifest, mapRouteProperties, etc.\n  async function callDataStrategy(type, request, matchesToLoad, matches, isRouteRequest, requestContext, unstable_dataStrategy) {\n    let results = await callDataStrategyImpl(unstable_dataStrategy || defaultDataStrategy, type, request, matchesToLoad, matches, manifest, mapRouteProperties, requestContext);\n    return await Promise.all(results.map((result, i) => {\n      if (isRedirectHandlerResult(result)) {\n        let response = result.result;\n        // Throw redirects and let the server handle them with an HTTP redirect\n        throw normalizeRelativeRoutingRedirectResponse(response, request, matchesToLoad[i].route.id, matches, basename, future.v7_relativeSplatPath);\n      }\n      if (isResponse(result.result) && isRouteRequest) {\n        // For SSR single-route requests, we want to hand Responses back\n        // directly without unwrapping\n        throw result;\n      }\n      return convertHandlerResultToDataResult(result);\n    }));\n  }\n  return {\n    dataRoutes,\n    query,\n    queryRoute\n  };\n}\n//#endregion\n////////////////////////////////////////////////////////////////////////////////\n//#region Helpers\n////////////////////////////////////////////////////////////////////////////////\n/**\n * Given an existing StaticHandlerContext and an error thrown at render time,\n * provide an updated StaticHandlerContext suitable for a second SSR render\n */\nfunction getStaticContextFromError(routes, context, error) {\n  let newContext = _extends({}, context, {\n    statusCode: isRouteErrorResponse(error) ? error.status : 500,\n    errors: {\n      [context._deepestRenderedBoundaryId || routes[0].id]: error\n    }\n  });\n  return newContext;\n}\nfunction throwStaticHandlerAbortedError(request, isRouteRequest, future) {\n  if (future.v7_throwAbortReason && request.signal.reason !== undefined) {\n    throw request.signal.reason;\n  }\n  let method = isRouteRequest ? \"queryRoute\" : \"query\";\n  throw new Error(method + \"() call aborted: \" + request.method + \" \" + request.url);\n}\nfunction isSubmissionNavigation(opts) {\n  return opts != null && (\"formData\" in opts && opts.formData != null || \"body\" in opts && opts.body !== undefined);\n}\nfunction normalizeTo(location, matches, basename, prependBasename, to, v7_relativeSplatPath, fromRouteId, relative) {\n  let contextualMatches;\n  let activeRouteMatch;\n  if (fromRouteId) {\n    // Grab matches up to the calling route so our route-relative logic is\n    // relative to the correct source route\n    contextualMatches = [];\n    for (let match of matches) {\n      contextualMatches.push(match);\n      if (match.route.id === fromRouteId) {\n        activeRouteMatch = match;\n        break;\n      }\n    }\n  } else {\n    contextualMatches = matches;\n    activeRouteMatch = matches[matches.length - 1];\n  }\n  // Resolve the relative path\n  let path = resolveTo(to ? to : \".\", getResolveToMatches(contextualMatches, v7_relativeSplatPath), stripBasename(location.pathname, basename) || location.pathname, relative === \"path\");\n  // When `to` is not specified we inherit search/hash from the current\n  // location, unlike when to=\".\" and we just inherit the path.\n  // See https://github.com/remix-run/remix/issues/927\n  if (to == null) {\n    path.search = location.search;\n    path.hash = location.hash;\n  }\n  // Add an ?index param for matched index routes if we don't already have one\n  if ((to == null || to === \"\" || to === \".\") && activeRouteMatch && activeRouteMatch.route.index && !hasNakedIndexQuery(path.search)) {\n    path.search = path.search ? path.search.replace(/^\\?/, \"?index&\") : \"?index\";\n  }\n  // If we're operating within a basename, prepend it to the pathname.  If\n  // this is a root navigation, then just use the raw basename which allows\n  // the basename to have full control over the presence of a trailing slash\n  // on root actions\n  if (prependBasename && basename !== \"/\") {\n    path.pathname = path.pathname === \"/\" ? basename : joinPaths([basename, path.pathname]);\n  }\n  return createPath(path);\n}\n// Normalize navigation options by converting formMethod=GET formData objects to\n// URLSearchParams so they behave identically to links with query params\nfunction normalizeNavigateOptions(normalizeFormMethod, isFetcher, path, opts) {\n  // Return location verbatim on non-submission navigations\n  if (!opts || !isSubmissionNavigation(opts)) {\n    return {\n      path\n    };\n  }\n  if (opts.formMethod && !isValidMethod(opts.formMethod)) {\n    return {\n      path,\n      error: getInternalRouterError(405, {\n        method: opts.formMethod\n      })\n    };\n  }\n  let getInvalidBodyError = () => ({\n    path,\n    error: getInternalRouterError(400, {\n      type: \"invalid-body\"\n    })\n  });\n  // Create a Submission on non-GET navigations\n  let rawFormMethod = opts.formMethod || \"get\";\n  let formMethod = normalizeFormMethod ? rawFormMethod.toUpperCase() : rawFormMethod.toLowerCase();\n  let formAction = stripHashFromPath(path);\n  if (opts.body !== undefined) {\n    if (opts.formEncType === \"text/plain\") {\n      // text only support POST/PUT/PATCH/DELETE submissions\n      if (!isMutationMethod(formMethod)) {\n        return getInvalidBodyError();\n      }\n      let text = typeof opts.body === \"string\" ? opts.body : opts.body instanceof FormData || opts.body instanceof URLSearchParams ?\n      // https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#plain-text-form-data\n      Array.from(opts.body.entries()).reduce((acc, _ref5) => {\n        let [name, value] = _ref5;\n        return \"\" + acc + name + \"=\" + value + \"\\n\";\n      }, \"\") : String(opts.body);\n      return {\n        path,\n        submission: {\n          formMethod,\n          formAction,\n          formEncType: opts.formEncType,\n          formData: undefined,\n          json: undefined,\n          text\n        }\n      };\n    } else if (opts.formEncType === \"application/json\") {\n      // json only supports POST/PUT/PATCH/DELETE submissions\n      if (!isMutationMethod(formMethod)) {\n        return getInvalidBodyError();\n      }\n      try {\n        let json = typeof opts.body === \"string\" ? JSON.parse(opts.body) : opts.body;\n        return {\n          path,\n          submission: {\n            formMethod,\n            formAction,\n            formEncType: opts.formEncType,\n            formData: undefined,\n            json,\n            text: undefined\n          }\n        };\n      } catch (e) {\n        return getInvalidBodyError();\n      }\n    }\n  }\n  invariant(typeof FormData === \"function\", \"FormData is not available in this environment\");\n  let searchParams;\n  let formData;\n  if (opts.formData) {\n    searchParams = convertFormDataToSearchParams(opts.formData);\n    formData = opts.formData;\n  } else if (opts.body instanceof FormData) {\n    searchParams = convertFormDataToSearchParams(opts.body);\n    formData = opts.body;\n  } else if (opts.body instanceof URLSearchParams) {\n    searchParams = opts.body;\n    formData = convertSearchParamsToFormData(searchParams);\n  } else if (opts.body == null) {\n    searchParams = new URLSearchParams();\n    formData = new FormData();\n  } else {\n    try {\n      searchParams = new URLSearchParams(opts.body);\n      formData = convertSearchParamsToFormData(searchParams);\n    } catch (e) {\n      return getInvalidBodyError();\n    }\n  }\n  let submission = {\n    formMethod,\n    formAction,\n    formEncType: opts && opts.formEncType || \"application/x-www-form-urlencoded\",\n    formData,\n    json: undefined,\n    text: undefined\n  };\n  if (isMutationMethod(submission.formMethod)) {\n    return {\n      path,\n      submission\n    };\n  }\n  // Flatten submission onto URLSearchParams for GET submissions\n  let parsedPath = parsePath(path);\n  // On GET navigation submissions we can drop the ?index param from the\n  // resulting location since all loaders will run.  But fetcher GET submissions\n  // only run a single loader so we need to preserve any incoming ?index params\n  if (isFetcher && parsedPath.search && hasNakedIndexQuery(parsedPath.search)) {\n    searchParams.append(\"index\", \"\");\n  }\n  parsedPath.search = \"?\" + searchParams;\n  return {\n    path: createPath(parsedPath),\n    submission\n  };\n}\n// Filter out all routes below any caught error as they aren't going to\n// render so we don't need to load them\nfunction getLoaderMatchesUntilBoundary(matches, boundaryId) {\n  let boundaryMatches = matches;\n  if (boundaryId) {\n    let index = matches.findIndex(m => m.route.id === boundaryId);\n    if (index >= 0) {\n      boundaryMatches = matches.slice(0, index);\n    }\n  }\n  return boundaryMatches;\n}\nfunction getMatchesToLoad(history, state, matches, submission, location, isInitialLoad, skipActionErrorRevalidation, isRevalidationRequired, cancelledDeferredRoutes, cancelledFetcherLoads, deletedFetchers, fetchLoadMatches, fetchRedirectIds, routesToUse, basename, pendingActionResult) {\n  let actionResult = pendingActionResult ? isErrorResult(pendingActionResult[1]) ? pendingActionResult[1].error : pendingActionResult[1].data : undefined;\n  let currentUrl = history.createURL(state.location);\n  let nextUrl = history.createURL(location);\n  // Pick navigation matches that are net-new or qualify for revalidation\n  let boundaryId = pendingActionResult && isErrorResult(pendingActionResult[1]) ? pendingActionResult[0] : undefined;\n  let boundaryMatches = boundaryId ? getLoaderMatchesUntilBoundary(matches, boundaryId) : matches;\n  // Don't revalidate loaders by default after action 4xx/5xx responses\n  // when the flag is enabled.  They can still opt-into revalidation via\n  // `shouldRevalidate` via `actionResult`\n  let actionStatus = pendingActionResult ? pendingActionResult[1].statusCode : undefined;\n  let shouldSkipRevalidation = skipActionErrorRevalidation && actionStatus && actionStatus >= 400;\n  let navigationMatches = boundaryMatches.filter((match, index) => {\n    let {\n      route\n    } = match;\n    if (route.lazy) {\n      // We haven't loaded this route yet so we don't know if it's got a loader!\n      return true;\n    }\n    if (route.loader == null) {\n      return false;\n    }\n    if (isInitialLoad) {\n      if (typeof route.loader !== \"function\" || route.loader.hydrate) {\n        return true;\n      }\n      return state.loaderData[route.id] === undefined && (\n      // Don't re-run if the loader ran and threw an error\n      !state.errors || state.errors[route.id] === undefined);\n    }\n    // Always call the loader on new route instances and pending defer cancellations\n    if (isNewLoader(state.loaderData, state.matches[index], match) || cancelledDeferredRoutes.some(id => id === match.route.id)) {\n      return true;\n    }\n    // This is the default implementation for when we revalidate.  If the route\n    // provides it's own implementation, then we give them full control but\n    // provide this value so they can leverage it if needed after they check\n    // their own specific use cases\n    let currentRouteMatch = state.matches[index];\n    let nextRouteMatch = match;\n    return shouldRevalidateLoader(match, _extends({\n      currentUrl,\n      currentParams: currentRouteMatch.params,\n      nextUrl,\n      nextParams: nextRouteMatch.params\n    }, submission, {\n      actionResult,\n      unstable_actionStatus: actionStatus,\n      defaultShouldRevalidate: shouldSkipRevalidation ? false :\n      // Forced revalidation due to submission, useRevalidator, or X-Remix-Revalidate\n      isRevalidationRequired || currentUrl.pathname + currentUrl.search === nextUrl.pathname + nextUrl.search ||\n      // Search params affect all loaders\n      currentUrl.search !== nextUrl.search || isNewRouteInstance(currentRouteMatch, nextRouteMatch)\n    }));\n  });\n  // Pick fetcher.loads that need to be revalidated\n  let revalidatingFetchers = [];\n  fetchLoadMatches.forEach((f, key) => {\n    // Don't revalidate:\n    //  - on initial load (shouldn't be any fetchers then anyway)\n    //  - if fetcher won't be present in the subsequent render\n    //    - no longer matches the URL (v7_fetcherPersist=false)\n    //    - was unmounted but persisted due to v7_fetcherPersist=true\n    if (isInitialLoad || !matches.some(m => m.route.id === f.routeId) || deletedFetchers.has(key)) {\n      return;\n    }\n    let fetcherMatches = matchRoutes(routesToUse, f.path, basename);\n    // If the fetcher path no longer matches, push it in with null matches so\n    // we can trigger a 404 in callLoadersAndMaybeResolveData.  Note this is\n    // currently only a use-case for Remix HMR where the route tree can change\n    // at runtime and remove a route previously loaded via a fetcher\n    if (!fetcherMatches) {\n      revalidatingFetchers.push({\n        key,\n        routeId: f.routeId,\n        path: f.path,\n        matches: null,\n        match: null,\n        controller: null\n      });\n      return;\n    }\n    // Revalidating fetchers are decoupled from the route matches since they\n    // load from a static href.  They revalidate based on explicit revalidation\n    // (submission, useRevalidator, or X-Remix-Revalidate)\n    let fetcher = state.fetchers.get(key);\n    let fetcherMatch = getTargetMatch(fetcherMatches, f.path);\n    let shouldRevalidate = false;\n    if (fetchRedirectIds.has(key)) {\n      // Never trigger a revalidation of an actively redirecting fetcher\n      shouldRevalidate = false;\n    } else if (cancelledFetcherLoads.includes(key)) {\n      // Always revalidate if the fetcher was cancelled\n      shouldRevalidate = true;\n    } else if (fetcher && fetcher.state !== \"idle\" && fetcher.data === undefined) {\n      // If the fetcher hasn't ever completed loading yet, then this isn't a\n      // revalidation, it would just be a brand new load if an explicit\n      // revalidation is required\n      shouldRevalidate = isRevalidationRequired;\n    } else {\n      // Otherwise fall back on any user-defined shouldRevalidate, defaulting\n      // to explicit revalidations only\n      shouldRevalidate = shouldRevalidateLoader(fetcherMatch, _extends({\n        currentUrl,\n        currentParams: state.matches[state.matches.length - 1].params,\n        nextUrl,\n        nextParams: matches[matches.length - 1].params\n      }, submission, {\n        actionResult,\n        unstable_actionStatus: actionStatus,\n        defaultShouldRevalidate: shouldSkipRevalidation ? false : isRevalidationRequired\n      }));\n    }\n    if (shouldRevalidate) {\n      revalidatingFetchers.push({\n        key,\n        routeId: f.routeId,\n        path: f.path,\n        matches: fetcherMatches,\n        match: fetcherMatch,\n        controller: new AbortController()\n      });\n    }\n  });\n  return [navigationMatches, revalidatingFetchers];\n}\nfunction isNewLoader(currentLoaderData, currentMatch, match) {\n  let isNew =\n  // [a] -> [a, b]\n  !currentMatch ||\n  // [a, b] -> [a, c]\n  match.route.id !== currentMatch.route.id;\n  // Handle the case that we don't have data for a re-used route, potentially\n  // from a prior error or from a cancelled pending deferred\n  let isMissingData = currentLoaderData[match.route.id] === undefined;\n  // Always load if this is a net-new route or we don't yet have data\n  return isNew || isMissingData;\n}\nfunction isNewRouteInstance(currentMatch, match) {\n  let currentPath = currentMatch.route.path;\n  return (\n    // param change for this match, /users/123 -> /users/456\n    currentMatch.pathname !== match.pathname ||\n    // splat param changed, which is not present in match.path\n    // e.g. /files/images/avatar.jpg -> files/finances.xls\n    currentPath != null && currentPath.endsWith(\"*\") && currentMatch.params[\"*\"] !== match.params[\"*\"]\n  );\n}\nfunction shouldRevalidateLoader(loaderMatch, arg) {\n  if (loaderMatch.route.shouldRevalidate) {\n    let routeChoice = loaderMatch.route.shouldRevalidate(arg);\n    if (typeof routeChoice === \"boolean\") {\n      return routeChoice;\n    }\n  }\n  return arg.defaultShouldRevalidate;\n}\n/**\n * Idempotent utility to execute patchRoutesOnMiss() to lazily load route\n * definitions and update the routes/routeManifest\n */\nasync function loadLazyRouteChildren(patchRoutesOnMissImpl, path, matches, routes, manifest, mapRouteProperties, pendingRouteChildren, signal) {\n  let key = [path, ...matches.map(m => m.route.id)].join(\"-\");\n  try {\n    let pending = pendingRouteChildren.get(key);\n    if (!pending) {\n      pending = patchRoutesOnMissImpl({\n        path,\n        matches,\n        patch: (routeId, children) => {\n          if (!signal.aborted) {\n            patchRoutesImpl(routeId, children, routes, manifest, mapRouteProperties);\n          }\n        }\n      });\n      pendingRouteChildren.set(key, pending);\n    }\n    if (pending && isPromise(pending)) {\n      await pending;\n    }\n  } finally {\n    pendingRouteChildren.delete(key);\n  }\n}\nfunction patchRoutesImpl(routeId, children, routesToUse, manifest, mapRouteProperties) {\n  if (routeId) {\n    var _route$children;\n    let route = manifest[routeId];\n    invariant(route, \"No route found to patch children into: routeId = \" + routeId);\n    let dataChildren = convertRoutesToDataRoutes(children, mapRouteProperties, [routeId, \"patch\", String(((_route$children = route.children) == null ? void 0 : _route$children.length) || \"0\")], manifest);\n    if (route.children) {\n      route.children.push(...dataChildren);\n    } else {\n      route.children = dataChildren;\n    }\n  } else {\n    let dataChildren = convertRoutesToDataRoutes(children, mapRouteProperties, [\"patch\", String(routesToUse.length || \"0\")], manifest);\n    routesToUse.push(...dataChildren);\n  }\n}\n/**\n * Execute route.lazy() methods to lazily load route modules (loader, action,\n * shouldRevalidate) and update the routeManifest in place which shares objects\n * with dataRoutes so those get updated as well.\n */\nasync function loadLazyRouteModule(route, mapRouteProperties, manifest) {\n  if (!route.lazy) {\n    return;\n  }\n  let lazyRoute = await route.lazy();\n  // If the lazy route function was executed and removed by another parallel\n  // call then we can return - first lazy() to finish wins because the return\n  // value of lazy is expected to be static\n  if (!route.lazy) {\n    return;\n  }\n  let routeToUpdate = manifest[route.id];\n  invariant(routeToUpdate, \"No route found in manifest\");\n  // Update the route in place.  This should be safe because there's no way\n  // we could yet be sitting on this route as we can't get there without\n  // resolving lazy() first.\n  //\n  // This is different than the HMR \"update\" use-case where we may actively be\n  // on the route being updated.  The main concern boils down to \"does this\n  // mutation affect any ongoing navigations or any current state.matches\n  // values?\".  If not, it should be safe to update in place.\n  let routeUpdates = {};\n  for (let lazyRouteProperty in lazyRoute) {\n    let staticRouteValue = routeToUpdate[lazyRouteProperty];\n    let isPropertyStaticallyDefined = staticRouteValue !== undefined &&\n    // This property isn't static since it should always be updated based\n    // on the route updates\n    lazyRouteProperty !== \"hasErrorBoundary\";\n    warning(!isPropertyStaticallyDefined, \"Route \\\"\" + routeToUpdate.id + \"\\\" has a static property \\\"\" + lazyRouteProperty + \"\\\" \" + \"defined but its lazy function is also returning a value for this property. \" + (\"The lazy route property \\\"\" + lazyRouteProperty + \"\\\" will be ignored.\"));\n    if (!isPropertyStaticallyDefined && !immutableRouteKeys.has(lazyRouteProperty)) {\n      routeUpdates[lazyRouteProperty] = lazyRoute[lazyRouteProperty];\n    }\n  }\n  // Mutate the route with the provided updates.  Do this first so we pass\n  // the updated version to mapRouteProperties\n  Object.assign(routeToUpdate, routeUpdates);\n  // Mutate the `hasErrorBoundary` property on the route based on the route\n  // updates and remove the `lazy` function so we don't resolve the lazy\n  // route again.\n  Object.assign(routeToUpdate, _extends({}, mapRouteProperties(routeToUpdate), {\n    lazy: undefined\n  }));\n}\n// Default implementation of `dataStrategy` which fetches all loaders in parallel\nfunction defaultDataStrategy(opts) {\n  return Promise.all(opts.matches.map(m => m.resolve()));\n}\nasync function callDataStrategyImpl(dataStrategyImpl, type, request, matchesToLoad, matches, manifest, mapRouteProperties, requestContext) {\n  let routeIdsToLoad = matchesToLoad.reduce((acc, m) => acc.add(m.route.id), new Set());\n  let loadedMatches = new Set();\n  // Send all matches here to allow for a middleware-type implementation.\n  // handler will be a no-op for unneeded routes and we filter those results\n  // back out below.\n  let results = await dataStrategyImpl({\n    matches: matches.map(match => {\n      let shouldLoad = routeIdsToLoad.has(match.route.id);\n      // `resolve` encapsulates the route.lazy, executing the\n      // loader/action, and mapping return values/thrown errors to a\n      // HandlerResult.  Users can pass a callback to take fine-grained control\n      // over the execution of the loader/action\n      let resolve = handlerOverride => {\n        loadedMatches.add(match.route.id);\n        return shouldLoad ? callLoaderOrAction(type, request, match, manifest, mapRouteProperties, handlerOverride, requestContext) : Promise.resolve({\n          type: ResultType.data,\n          result: undefined\n        });\n      };\n      return _extends({}, match, {\n        shouldLoad,\n        resolve\n      });\n    }),\n    request,\n    params: matches[0].params,\n    context: requestContext\n  });\n  // Throw if any loadRoute implementations not called since they are what\n  // ensures a route is fully loaded\n  matches.forEach(m => invariant(loadedMatches.has(m.route.id), \"`match.resolve()` was not called for route id \\\"\" + m.route.id + \"\\\". \" + \"You must call `match.resolve()` on every match passed to \" + \"`dataStrategy` to ensure all routes are properly loaded.\"));\n  // Filter out any middleware-only matches for which we didn't need to run handlers\n  return results.filter((_, i) => routeIdsToLoad.has(matches[i].route.id));\n}\n// Default logic for calling a loader/action is the user has no specified a dataStrategy\nasync function callLoaderOrAction(type, request, match, manifest, mapRouteProperties, handlerOverride, staticContext) {\n  let result;\n  let onReject;\n  let runHandler = handler => {\n    // Setup a promise we can race against so that abort signals short circuit\n    let reject;\n    // This will never resolve so safe to type it as Promise<HandlerResult> to\n    // satisfy the function return value\n    let abortPromise = new Promise((_, r) => reject = r);\n    onReject = () => reject();\n    request.signal.addEventListener(\"abort\", onReject);\n    let actualHandler = ctx => {\n      if (typeof handler !== \"function\") {\n        return Promise.reject(new Error(\"You cannot call the handler for a route which defines a boolean \" + (\"\\\"\" + type + \"\\\" [routeId: \" + match.route.id + \"]\")));\n      }\n      return handler({\n        request,\n        params: match.params,\n        context: staticContext\n      }, ...(ctx !== undefined ? [ctx] : []));\n    };\n    let handlerPromise;\n    if (handlerOverride) {\n      handlerPromise = handlerOverride(ctx => actualHandler(ctx));\n    } else {\n      handlerPromise = (async () => {\n        try {\n          let val = await actualHandler();\n          return {\n            type: \"data\",\n            result: val\n          };\n        } catch (e) {\n          return {\n            type: \"error\",\n            result: e\n          };\n        }\n      })();\n    }\n    return Promise.race([handlerPromise, abortPromise]);\n  };\n  try {\n    let handler = match.route[type];\n    if (match.route.lazy) {\n      if (handler) {\n        // Run statically defined handler in parallel with lazy()\n        let handlerError;\n        let [value] = await Promise.all([\n        // If the handler throws, don't let it immediately bubble out,\n        // since we need to let the lazy() execution finish so we know if this\n        // route has a boundary that can handle the error\n        runHandler(handler).catch(e => {\n          handlerError = e;\n        }), loadLazyRouteModule(match.route, mapRouteProperties, manifest)]);\n        if (handlerError !== undefined) {\n          throw handlerError;\n        }\n        result = value;\n      } else {\n        // Load lazy route module, then run any returned handler\n        await loadLazyRouteModule(match.route, mapRouteProperties, manifest);\n        handler = match.route[type];\n        if (handler) {\n          // Handler still runs even if we got interrupted to maintain consistency\n          // with un-abortable behavior of handler execution on non-lazy or\n          // previously-lazy-loaded routes\n          result = await runHandler(handler);\n        } else if (type === \"action\") {\n          let url = new URL(request.url);\n          let pathname = url.pathname + url.search;\n          throw getInternalRouterError(405, {\n            method: request.method,\n            pathname,\n            routeId: match.route.id\n          });\n        } else {\n          // lazy() route has no loader to run.  Short circuit here so we don't\n          // hit the invariant below that errors on returning undefined.\n          return {\n            type: ResultType.data,\n            result: undefined\n          };\n        }\n      }\n    } else if (!handler) {\n      let url = new URL(request.url);\n      let pathname = url.pathname + url.search;\n      throw getInternalRouterError(404, {\n        pathname\n      });\n    } else {\n      result = await runHandler(handler);\n    }\n    invariant(result.result !== undefined, \"You defined \" + (type === \"action\" ? \"an action\" : \"a loader\") + \" for route \" + (\"\\\"\" + match.route.id + \"\\\" but didn't return anything from your `\" + type + \"` \") + \"function. Please return a value or `null`.\");\n  } catch (e) {\n    // We should already be catching and converting normal handler executions to\n    // HandlerResults and returning them, so anything that throws here is an\n    // unexpected error we still need to wrap\n    return {\n      type: ResultType.error,\n      result: e\n    };\n  } finally {\n    if (onReject) {\n      request.signal.removeEventListener(\"abort\", onReject);\n    }\n  }\n  return result;\n}\nasync function convertHandlerResultToDataResult(handlerResult) {\n  let {\n    result,\n    type,\n    status\n  } = handlerResult;\n  if (isResponse(result)) {\n    let data;\n    try {\n      let contentType = result.headers.get(\"Content-Type\");\n      // Check between word boundaries instead of startsWith() due to the last\n      // paragraph of https://httpwg.org/specs/rfc9110.html#field.content-type\n      if (contentType && /\\bapplication\\/json\\b/.test(contentType)) {\n        if (result.body == null) {\n          data = null;\n        } else {\n          data = await result.json();\n        }\n      } else {\n        data = await result.text();\n      }\n    } catch (e) {\n      return {\n        type: ResultType.error,\n        error: e\n      };\n    }\n    if (type === ResultType.error) {\n      return {\n        type: ResultType.error,\n        error: new ErrorResponseImpl(result.status, result.statusText, data),\n        statusCode: result.status,\n        headers: result.headers\n      };\n    }\n    return {\n      type: ResultType.data,\n      data,\n      statusCode: result.status,\n      headers: result.headers\n    };\n  }\n  if (type === ResultType.error) {\n    return {\n      type: ResultType.error,\n      error: result,\n      statusCode: isRouteErrorResponse(result) ? result.status : status\n    };\n  }\n  if (isDeferredData(result)) {\n    var _result$init, _result$init2;\n    return {\n      type: ResultType.deferred,\n      deferredData: result,\n      statusCode: (_result$init = result.init) == null ? void 0 : _result$init.status,\n      headers: ((_result$init2 = result.init) == null ? void 0 : _result$init2.headers) && new Headers(result.init.headers)\n    };\n  }\n  return {\n    type: ResultType.data,\n    data: result,\n    statusCode: status\n  };\n}\n// Support relative routing in internal redirects\nfunction normalizeRelativeRoutingRedirectResponse(response, request, routeId, matches, basename, v7_relativeSplatPath) {\n  let location = response.headers.get(\"Location\");\n  invariant(location, \"Redirects returned/thrown from loaders/actions must have a Location header\");\n  if (!ABSOLUTE_URL_REGEX.test(location)) {\n    let trimmedMatches = matches.slice(0, matches.findIndex(m => m.route.id === routeId) + 1);\n    location = normalizeTo(new URL(request.url), trimmedMatches, basename, true, location, v7_relativeSplatPath);\n    response.headers.set(\"Location\", location);\n  }\n  return response;\n}\nfunction normalizeRedirectLocation(location, currentUrl, basename) {\n  if (ABSOLUTE_URL_REGEX.test(location)) {\n    // Strip off the protocol+origin for same-origin + same-basename absolute redirects\n    let normalizedLocation = location;\n    let url = normalizedLocation.startsWith(\"//\") ? new URL(currentUrl.protocol + normalizedLocation) : new URL(normalizedLocation);\n    let isSameBasename = stripBasename(url.pathname, basename) != null;\n    if (url.origin === currentUrl.origin && isSameBasename) {\n      return url.pathname + url.search + url.hash;\n    }\n  }\n  return location;\n}\n// Utility method for creating the Request instances for loaders/actions during\n// client-side navigations and fetches.  During SSR we will always have a\n// Request instance from the static handler (query/queryRoute)\nfunction createClientSideRequest(history, location, signal, submission) {\n  let url = history.createURL(stripHashFromPath(location)).toString();\n  let init = {\n    signal\n  };\n  if (submission && isMutationMethod(submission.formMethod)) {\n    let {\n      formMethod,\n      formEncType\n    } = submission;\n    // Didn't think we needed this but it turns out unlike other methods, patch\n    // won't be properly normalized to uppercase and results in a 405 error.\n    // See: https://fetch.spec.whatwg.org/#concept-method\n    init.method = formMethod.toUpperCase();\n    if (formEncType === \"application/json\") {\n      init.headers = new Headers({\n        \"Content-Type\": formEncType\n      });\n      init.body = JSON.stringify(submission.json);\n    } else if (formEncType === \"text/plain\") {\n      // Content-Type is inferred (https://fetch.spec.whatwg.org/#dom-request)\n      init.body = submission.text;\n    } else if (formEncType === \"application/x-www-form-urlencoded\" && submission.formData) {\n      // Content-Type is inferred (https://fetch.spec.whatwg.org/#dom-request)\n      init.body = convertFormDataToSearchParams(submission.formData);\n    } else {\n      // Content-Type is inferred (https://fetch.spec.whatwg.org/#dom-request)\n      init.body = submission.formData;\n    }\n  }\n  return new Request(url, init);\n}\nfunction convertFormDataToSearchParams(formData) {\n  let searchParams = new URLSearchParams();\n  for (let [key, value] of formData.entries()) {\n    // https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#converting-an-entry-list-to-a-list-of-name-value-pairs\n    searchParams.append(key, typeof value === \"string\" ? value : value.name);\n  }\n  return searchParams;\n}\nfunction convertSearchParamsToFormData(searchParams) {\n  let formData = new FormData();\n  for (let [key, value] of searchParams.entries()) {\n    formData.append(key, value);\n  }\n  return formData;\n}\nfunction processRouteLoaderData(matches, matchesToLoad, results, pendingActionResult, activeDeferreds, skipLoaderErrorBubbling) {\n  // Fill in loaderData/errors from our loaders\n  let loaderData = {};\n  let errors = null;\n  let statusCode;\n  let foundError = false;\n  let loaderHeaders = {};\n  let pendingError = pendingActionResult && isErrorResult(pendingActionResult[1]) ? pendingActionResult[1].error : undefined;\n  // Process loader results into state.loaderData/state.errors\n  results.forEach((result, index) => {\n    let id = matchesToLoad[index].route.id;\n    invariant(!isRedirectResult(result), \"Cannot handle redirect results in processLoaderData\");\n    if (isErrorResult(result)) {\n      let error = result.error;\n      // If we have a pending action error, we report it at the highest-route\n      // that throws a loader error, and then clear it out to indicate that\n      // it was consumed\n      if (pendingError !== undefined) {\n        error = pendingError;\n        pendingError = undefined;\n      }\n      errors = errors || {};\n      if (skipLoaderErrorBubbling) {\n        errors[id] = error;\n      } else {\n        // Look upwards from the matched route for the closest ancestor error\n        // boundary, defaulting to the root match.  Prefer higher error values\n        // if lower errors bubble to the same boundary\n        let boundaryMatch = findNearestBoundary(matches, id);\n        if (errors[boundaryMatch.route.id] == null) {\n          errors[boundaryMatch.route.id] = error;\n        }\n      }\n      // Clear our any prior loaderData for the throwing route\n      loaderData[id] = undefined;\n      // Once we find our first (highest) error, we set the status code and\n      // prevent deeper status codes from overriding\n      if (!foundError) {\n        foundError = true;\n        statusCode = isRouteErrorResponse(result.error) ? result.error.status : 500;\n      }\n      if (result.headers) {\n        loaderHeaders[id] = result.headers;\n      }\n    } else {\n      if (isDeferredResult(result)) {\n        activeDeferreds.set(id, result.deferredData);\n        loaderData[id] = result.deferredData.data;\n        // Error status codes always override success status codes, but if all\n        // loaders are successful we take the deepest status code.\n        if (result.statusCode != null && result.statusCode !== 200 && !foundError) {\n          statusCode = result.statusCode;\n        }\n        if (result.headers) {\n          loaderHeaders[id] = result.headers;\n        }\n      } else {\n        loaderData[id] = result.data;\n        // Error status codes always override success status codes, but if all\n        // loaders are successful we take the deepest status code.\n        if (result.statusCode && result.statusCode !== 200 && !foundError) {\n          statusCode = result.statusCode;\n        }\n        if (result.headers) {\n          loaderHeaders[id] = result.headers;\n        }\n      }\n    }\n  });\n  // If we didn't consume the pending action error (i.e., all loaders\n  // resolved), then consume it here.  Also clear out any loaderData for the\n  // throwing route\n  if (pendingError !== undefined && pendingActionResult) {\n    errors = {\n      [pendingActionResult[0]]: pendingError\n    };\n    loaderData[pendingActionResult[0]] = undefined;\n  }\n  return {\n    loaderData,\n    errors,\n    statusCode: statusCode || 200,\n    loaderHeaders\n  };\n}\nfunction processLoaderData(state, matches, matchesToLoad, results, pendingActionResult, revalidatingFetchers, fetcherResults, activeDeferreds) {\n  let {\n    loaderData,\n    errors\n  } = processRouteLoaderData(matches, matchesToLoad, results, pendingActionResult, activeDeferreds, false // This method is only called client side so we always want to bubble\n  );\n  // Process results from our revalidating fetchers\n  for (let index = 0; index < revalidatingFetchers.length; index++) {\n    let {\n      key,\n      match,\n      controller\n    } = revalidatingFetchers[index];\n    invariant(fetcherResults !== undefined && fetcherResults[index] !== undefined, \"Did not find corresponding fetcher result\");\n    let result = fetcherResults[index];\n    // Process fetcher non-redirect errors\n    if (controller && controller.signal.aborted) {\n      // Nothing to do for aborted fetchers\n      continue;\n    } else if (isErrorResult(result)) {\n      let boundaryMatch = findNearestBoundary(state.matches, match == null ? void 0 : match.route.id);\n      if (!(errors && errors[boundaryMatch.route.id])) {\n        errors = _extends({}, errors, {\n          [boundaryMatch.route.id]: result.error\n        });\n      }\n      state.fetchers.delete(key);\n    } else if (isRedirectResult(result)) {\n      // Should never get here, redirects should get processed above, but we\n      // keep this to type narrow to a success result in the else\n      invariant(false, \"Unhandled fetcher revalidation redirect\");\n    } else if (isDeferredResult(result)) {\n      // Should never get here, deferred data should be awaited for fetchers\n      // in resolveDeferredResults\n      invariant(false, \"Unhandled fetcher deferred data\");\n    } else {\n      let doneFetcher = getDoneFetcher(result.data);\n      state.fetchers.set(key, doneFetcher);\n    }\n  }\n  return {\n    loaderData,\n    errors\n  };\n}\nfunction mergeLoaderData(loaderData, newLoaderData, matches, errors) {\n  let mergedLoaderData = _extends({}, newLoaderData);\n  for (let match of matches) {\n    let id = match.route.id;\n    if (newLoaderData.hasOwnProperty(id)) {\n      if (newLoaderData[id] !== undefined) {\n        mergedLoaderData[id] = newLoaderData[id];\n      }\n    } else if (loaderData[id] !== undefined && match.route.loader) {\n      // Preserve existing keys not included in newLoaderData and where a loader\n      // wasn't removed by HMR\n      mergedLoaderData[id] = loaderData[id];\n    }\n    if (errors && errors.hasOwnProperty(id)) {\n      // Don't keep any loader data below the boundary\n      break;\n    }\n  }\n  return mergedLoaderData;\n}\nfunction getActionDataForCommit(pendingActionResult) {\n  if (!pendingActionResult) {\n    return {};\n  }\n  return isErrorResult(pendingActionResult[1]) ? {\n    // Clear out prior actionData on errors\n    actionData: {}\n  } : {\n    actionData: {\n      [pendingActionResult[0]]: pendingActionResult[1].data\n    }\n  };\n}\n// Find the nearest error boundary, looking upwards from the leaf route (or the\n// route specified by routeId) for the closest ancestor error boundary,\n// defaulting to the root match\nfunction findNearestBoundary(matches, routeId) {\n  let eligibleMatches = routeId ? matches.slice(0, matches.findIndex(m => m.route.id === routeId) + 1) : [...matches];\n  return eligibleMatches.reverse().find(m => m.route.hasErrorBoundary === true) || matches[0];\n}\nfunction getShortCircuitMatches(routes) {\n  // Prefer a root layout route if present, otherwise shim in a route object\n  let route = routes.length === 1 ? routes[0] : routes.find(r => r.index || !r.path || r.path === \"/\") || {\n    id: \"__shim-error-route__\"\n  };\n  return {\n    matches: [{\n      params: {},\n      pathname: \"\",\n      pathnameBase: \"\",\n      route\n    }],\n    route\n  };\n}\nfunction getInternalRouterError(status, _temp5) {\n  let {\n    pathname,\n    routeId,\n    method,\n    type,\n    message\n  } = _temp5 === void 0 ? {} : _temp5;\n  let statusText = \"Unknown Server Error\";\n  let errorMessage = \"Unknown @remix-run/router error\";\n  if (status === 400) {\n    statusText = \"Bad Request\";\n    if (type === \"route-discovery\") {\n      errorMessage = \"Unable to match URL \\\"\" + pathname + \"\\\" - the `children()` function for \" + (\"route `\" + routeId + \"` threw the following error:\\n\" + message);\n    } else if (method && pathname && routeId) {\n      errorMessage = \"You made a \" + method + \" request to \\\"\" + pathname + \"\\\" but \" + (\"did not provide a `loader` for route \\\"\" + routeId + \"\\\", \") + \"so there is no way to handle the request.\";\n    } else if (type === \"defer-action\") {\n      errorMessage = \"defer() is not supported in actions\";\n    } else if (type === \"invalid-body\") {\n      errorMessage = \"Unable to encode submission body\";\n    }\n  } else if (status === 403) {\n    statusText = \"Forbidden\";\n    errorMessage = \"Route \\\"\" + routeId + \"\\\" does not match URL \\\"\" + pathname + \"\\\"\";\n  } else if (status === 404) {\n    statusText = \"Not Found\";\n    errorMessage = \"No route matches URL \\\"\" + pathname + \"\\\"\";\n  } else if (status === 405) {\n    statusText = \"Method Not Allowed\";\n    if (method && pathname && routeId) {\n      errorMessage = \"You made a \" + method.toUpperCase() + \" request to \\\"\" + pathname + \"\\\" but \" + (\"did not provide an `action` for route \\\"\" + routeId + \"\\\", \") + \"so there is no way to handle the request.\";\n    } else if (method) {\n      errorMessage = \"Invalid request method \\\"\" + method.toUpperCase() + \"\\\"\";\n    }\n  }\n  return new ErrorResponseImpl(status || 500, statusText, new Error(errorMessage), true);\n}\n// Find any returned redirect errors, starting from the lowest match\nfunction findRedirect(results) {\n  for (let i = results.length - 1; i >= 0; i--) {\n    let result = results[i];\n    if (isRedirectResult(result)) {\n      return {\n        result,\n        idx: i\n      };\n    }\n  }\n}\nfunction stripHashFromPath(path) {\n  let parsedPath = typeof path === \"string\" ? parsePath(path) : path;\n  return createPath(_extends({}, parsedPath, {\n    hash: \"\"\n  }));\n}\nfunction isHashChangeOnly(a, b) {\n  if (a.pathname !== b.pathname || a.search !== b.search) {\n    return false;\n  }\n  if (a.hash === \"\") {\n    // /page -> /page#hash\n    return b.hash !== \"\";\n  } else if (a.hash === b.hash) {\n    // /page#hash -> /page#hash\n    return true;\n  } else if (b.hash !== \"\") {\n    // /page#hash -> /page#other\n    return true;\n  }\n  // If the hash is removed the browser will re-perform a request to the server\n  // /page#hash -> /page\n  return false;\n}\nfunction isPromise(val) {\n  return typeof val === \"object\" && val != null && \"then\" in val;\n}\nfunction isHandlerResult(result) {\n  return result != null && typeof result === \"object\" && \"type\" in result && \"result\" in result && (result.type === ResultType.data || result.type === ResultType.error);\n}\nfunction isRedirectHandlerResult(result) {\n  return isResponse(result.result) && redirectStatusCodes.has(result.result.status);\n}\nfunction isDeferredResult(result) {\n  return result.type === ResultType.deferred;\n}\nfunction isErrorResult(result) {\n  return result.type === ResultType.error;\n}\nfunction isRedirectResult(result) {\n  return (result && result.type) === ResultType.redirect;\n}\nfunction isDeferredData(value) {\n  let deferred = value;\n  return deferred && typeof deferred === \"object\" && typeof deferred.data === \"object\" && typeof deferred.subscribe === \"function\" && typeof deferred.cancel === \"function\" && typeof deferred.resolveData === \"function\";\n}\nfunction isResponse(value) {\n  return value != null && typeof value.status === \"number\" && typeof value.statusText === \"string\" && typeof value.headers === \"object\" && typeof value.body !== \"undefined\";\n}\nfunction isRedirectResponse(result) {\n  if (!isResponse(result)) {\n    return false;\n  }\n  let status = result.status;\n  let location = result.headers.get(\"Location\");\n  return status >= 300 && status <= 399 && location != null;\n}\nfunction isValidMethod(method) {\n  return validRequestMethods.has(method.toLowerCase());\n}\nfunction isMutationMethod(method) {\n  return validMutationMethods.has(method.toLowerCase());\n}\nasync function resolveDeferredResults(currentMatches, matchesToLoad, results, signals, isFetcher, currentLoaderData) {\n  for (let index = 0; index < results.length; index++) {\n    let result = results[index];\n    let match = matchesToLoad[index];\n    // If we don't have a match, then we can have a deferred result to do\n    // anything with.  This is for revalidating fetchers where the route was\n    // removed during HMR\n    if (!match) {\n      continue;\n    }\n    let currentMatch = currentMatches.find(m => m.route.id === match.route.id);\n    let isRevalidatingLoader = currentMatch != null && !isNewRouteInstance(currentMatch, match) && (currentLoaderData && currentLoaderData[match.route.id]) !== undefined;\n    if (isDeferredResult(result) && (isFetcher || isRevalidatingLoader)) {\n      // Note: we do not have to touch activeDeferreds here since we race them\n      // against the signal in resolveDeferredData and they'll get aborted\n      // there if needed\n      let signal = signals[index];\n      invariant(signal, \"Expected an AbortSignal for revalidating fetcher deferred result\");\n      await resolveDeferredData(result, signal, isFetcher).then(result => {\n        if (result) {\n          results[index] = result || results[index];\n        }\n      });\n    }\n  }\n}\nasync function resolveDeferredData(result, signal, unwrap) {\n  if (unwrap === void 0) {\n    unwrap = false;\n  }\n  let aborted = await result.deferredData.resolveData(signal);\n  if (aborted) {\n    return;\n  }\n  if (unwrap) {\n    try {\n      return {\n        type: ResultType.data,\n        data: result.deferredData.unwrappedData\n      };\n    } catch (e) {\n      // Handle any TrackedPromise._error values encountered while unwrapping\n      return {\n        type: ResultType.error,\n        error: e\n      };\n    }\n  }\n  return {\n    type: ResultType.data,\n    data: result.deferredData.data\n  };\n}\nfunction hasNakedIndexQuery(search) {\n  return new URLSearchParams(search).getAll(\"index\").some(v => v === \"\");\n}\nfunction getTargetMatch(matches, location) {\n  let search = typeof location === \"string\" ? parsePath(location).search : location.search;\n  if (matches[matches.length - 1].route.index && hasNakedIndexQuery(search || \"\")) {\n    // Return the leaf index route when index is present\n    return matches[matches.length - 1];\n  }\n  // Otherwise grab the deepest \"path contributing\" match (ignoring index and\n  // pathless layout routes)\n  let pathMatches = getPathContributingMatches(matches);\n  return pathMatches[pathMatches.length - 1];\n}\nfunction getSubmissionFromNavigation(navigation) {\n  let {\n    formMethod,\n    formAction,\n    formEncType,\n    text,\n    formData,\n    json\n  } = navigation;\n  if (!formMethod || !formAction || !formEncType) {\n    return;\n  }\n  if (text != null) {\n    return {\n      formMethod,\n      formAction,\n      formEncType,\n      formData: undefined,\n      json: undefined,\n      text\n    };\n  } else if (formData != null) {\n    return {\n      formMethod,\n      formAction,\n      formEncType,\n      formData,\n      json: undefined,\n      text: undefined\n    };\n  } else if (json !== undefined) {\n    return {\n      formMethod,\n      formAction,\n      formEncType,\n      formData: undefined,\n      json,\n      text: undefined\n    };\n  }\n}\nfunction getLoadingNavigation(location, submission) {\n  if (submission) {\n    let navigation = {\n      state: \"loading\",\n      location,\n      formMethod: submission.formMethod,\n      formAction: submission.formAction,\n      formEncType: submission.formEncType,\n      formData: submission.formData,\n      json: submission.json,\n      text: submission.text\n    };\n    return navigation;\n  } else {\n    let navigation = {\n      state: \"loading\",\n      location,\n      formMethod: undefined,\n      formAction: undefined,\n      formEncType: undefined,\n      formData: undefined,\n      json: undefined,\n      text: undefined\n    };\n    return navigation;\n  }\n}\nfunction getSubmittingNavigation(location, submission) {\n  let navigation = {\n    state: \"submitting\",\n    location,\n    formMethod: submission.formMethod,\n    formAction: submission.formAction,\n    formEncType: submission.formEncType,\n    formData: submission.formData,\n    json: submission.json,\n    text: submission.text\n  };\n  return navigation;\n}\nfunction getLoadingFetcher(submission, data) {\n  if (submission) {\n    let fetcher = {\n      state: \"loading\",\n      formMethod: submission.formMethod,\n      formAction: submission.formAction,\n      formEncType: submission.formEncType,\n      formData: submission.formData,\n      json: submission.json,\n      text: submission.text,\n      data\n    };\n    return fetcher;\n  } else {\n    let fetcher = {\n      state: \"loading\",\n      formMethod: undefined,\n      formAction: undefined,\n      formEncType: undefined,\n      formData: undefined,\n      json: undefined,\n      text: undefined,\n      data\n    };\n    return fetcher;\n  }\n}\nfunction getSubmittingFetcher(submission, existingFetcher) {\n  let fetcher = {\n    state: \"submitting\",\n    formMethod: submission.formMethod,\n    formAction: submission.formAction,\n    formEncType: submission.formEncType,\n    formData: submission.formData,\n    json: submission.json,\n    text: submission.text,\n    data: existingFetcher ? existingFetcher.data : undefined\n  };\n  return fetcher;\n}\nfunction getDoneFetcher(data) {\n  let fetcher = {\n    state: \"idle\",\n    formMethod: undefined,\n    formAction: undefined,\n    formEncType: undefined,\n    formData: undefined,\n    json: undefined,\n    text: undefined,\n    data\n  };\n  return fetcher;\n}\nfunction restoreAppliedTransitions(_window, transitions) {\n  try {\n    let sessionPositions = _window.sessionStorage.getItem(TRANSITIONS_STORAGE_KEY);\n    if (sessionPositions) {\n      let json = JSON.parse(sessionPositions);\n      for (let [k, v] of Object.entries(json || {})) {\n        if (v && Array.isArray(v)) {\n          transitions.set(k, new Set(v || []));\n        }\n      }\n    }\n  } catch (e) {\n    // no-op, use default empty object\n  }\n}\nfunction persistAppliedTransitions(_window, transitions) {\n  if (transitions.size > 0) {\n    let json = {};\n    for (let [k, v] of transitions) {\n      json[k] = [...v];\n    }\n    try {\n      _window.sessionStorage.setItem(TRANSITIONS_STORAGE_KEY, JSON.stringify(json));\n    } catch (error) {\n      warning(false, \"Failed to save applied view transitions in sessionStorage (\" + error + \").\");\n    }\n  }\n}\n//#endregion\n\nexport { AbortedDeferredError, Action, IDLE_BLOCKER, IDLE_FETCHER, IDLE_NAVIGATION, UNSAFE_DEFERRED_SYMBOL, DeferredData as UNSAFE_DeferredData, ErrorResponseImpl as UNSAFE_ErrorResponseImpl, convertRouteMatchToUiMatch as UNSAFE_convertRouteMatchToUiMatch, convertRoutesToDataRoutes as UNSAFE_convertRoutesToDataRoutes, getResolveToMatches as UNSAFE_getResolveToMatches, invariant as UNSAFE_invariant, warning as UNSAFE_warning, createBrowserHistory, createHashHistory, createMemoryHistory, createPath, createRouter, createStaticHandler, defer, generatePath, getStaticContextFromError, getToPathname, isDeferredData, isRouteErrorResponse, joinPaths, json, matchPath, matchRoutes, normalizePathname, parsePath, redirect, redirectDocument, resolvePath, resolveTo, stripBasename };\n//# sourceMappingURL=router.js.map\n","function _classCallCheck(a, n) {\n  if (!(a instanceof n)) throw new TypeError(\"Cannot call a class as a function\");\n}\nexport { _classCallCheck as default };","function _typeof(o) {\n  \"@babel/helpers - typeof\";\n\n  return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n    return typeof o;\n  } : function (o) {\n    return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n  }, _typeof(o);\n}\nexport { _typeof as default };","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nfunction toPropertyKey(t) {\n  var i = toPrimitive(t, \"string\");\n  return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nexport { toPropertyKey as default };","import _typeof from \"./typeof.js\";\nfunction toPrimitive(t, r) {\n  if (\"object\" != _typeof(t) || !t) return t;\n  var e = t[Symbol.toPrimitive];\n  if (void 0 !== e) {\n    var i = e.call(t, r || \"default\");\n    if (\"object\" != _typeof(i)) return i;\n    throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n  }\n  return (\"string\" === r ? String : Number)(t);\n}\nexport { toPrimitive as default };","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperties(e, r) {\n  for (var t = 0; t < r.length; t++) {\n    var o = r[t];\n    o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o);\n  }\n}\nfunction _createClass(e, r, t) {\n  return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, \"prototype\", {\n    writable: !1\n  }), e;\n}\nexport { _createClass as default };","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperty(e, r, t) {\n  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n    value: t,\n    enumerable: !0,\n    configurable: !0,\n    writable: !0\n  }) : e[r] = t, e;\n}\nexport { _defineProperty as default };","function _arrayLikeToArray(r, a) {\n  (null == a || a > r.length) && (a = r.length);\n  for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];\n  return n;\n}\nexport { _arrayLikeToArray as default };","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nfunction _unsupportedIterableToArray(r, a) {\n  if (r) {\n    if (\"string\" == typeof r) return arrayLikeToArray(r, a);\n    var t = {}.toString.call(r).slice(8, -1);\n    return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? arrayLikeToArray(r, a) : void 0;\n  }\n}\nexport { _unsupportedIterableToArray as default };","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nfunction _toConsumableArray(r) {\n  return arrayWithoutHoles(r) || iterableToArray(r) || unsupportedIterableToArray(r) || nonIterableSpread();\n}\nexport { _toConsumableArray as default };","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nfunction _arrayWithoutHoles(r) {\n  if (Array.isArray(r)) return arrayLikeToArray(r);\n}\nexport { _arrayWithoutHoles as default };","function _iterableToArray(r) {\n  if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r);\n}\nexport { _iterableToArray as default };","function _nonIterableSpread() {\n  throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nexport { _nonIterableSpread as default };","function asyncGeneratorStep(n, t, e, r, o, a, c) {\n  try {\n    var i = n[a](c),\n      u = i.value;\n  } catch (n) {\n    return void e(n);\n  }\n  i.done ? t(u) : Promise.resolve(u).then(r, o);\n}\nfunction _asyncToGenerator(n) {\n  return function () {\n    var t = this,\n      e = arguments;\n    return new Promise(function (r, o) {\n      var a = n.apply(t, e);\n      function _next(n) {\n        asyncGeneratorStep(a, r, o, _next, _throw, \"next\", n);\n      }\n      function _throw(n) {\n        asyncGeneratorStep(a, r, o, _next, _throw, \"throw\", n);\n      }\n      _next(void 0);\n    });\n  };\n}\nexport { _asyncToGenerator as default };","class Deferred {\n  public promise: Promise<boolean>;\n  public resolve: (result: boolean) => void;\n  public reject: (reason: Error | string) => void;\n  constructor() {\n    this.promise = new Promise<boolean>((resolve, reject) => {\n      this.resolve = resolve;\n      this.reject = reject;\n    });\n  }\n}\n\nexport { Deferred };\n","import { Deferred } from './deferred';\n\ntype Pending<R> = {\n  required: R[];\n  deferred: Deferred;\n};\n\ntype CacheEntry<R, A> = {\n  id: string;\n  state: 'pending' | 'fetched' | 'errored';\n  pending: Pending<R>[];\n  access: A[];\n  /**\n   * Runs the accessChecker using the required <R[]> against this entries list of capabilities <A[]>\n   */\n  hasCapabilities: (required: R[]) => Promise<boolean>;\n};\n\ninterface AccessChecker<R, A> {\n  (required: R[], has: A[]): boolean;\n}\n\ninterface AccessFetcher<A> {\n  (id: string): Promise<A[]>;\n}\n\n/**\n * A cache that gets populated with entr\n *\n *\n */\nclass AuthorisationCache<R, A> {\n  private cache: Record<string, CacheEntry<R, A>> = {};\n  accessChecker: AccessChecker<R, A>;\n  accessFetcher: AccessFetcher<A>;\n\n  /**\n   *\n   * @param accessFetcher resolves with a list of capabilities <A> that relate to a given entry\n   * @param accessChecker checks a list of required capabilities <R> against a list of capabilities <A>\n   *  for an entry and decides if authorisation should be given `true` or not `false`\n   */\n  constructor(accessFetcher: AccessFetcher<A>, accessChecker: AccessChecker<R, A>) {\n    this.accessFetcher = accessFetcher;\n    this.accessChecker = accessChecker;\n  }\n\n  /**\n   *\n   * @param id the id for the entry in the cache\n   * @returns a cache entry object. If freshly created then it will be in \"pending\" state\n   */\n  public getEntry(id: string): CacheEntry<R, A> {\n    let entry = this.cache[id];\n    if (!entry) {\n      entry = {\n        id,\n        state: 'pending',\n        access: [],\n        pending: [],\n        hasCapabilities: (required: R[]) => {\n          return this.checkCapabilitiesExist(id, required);\n        },\n      };\n      this.cache[id] = entry;\n\n      this.accessFetcher(id)\n        .then((access: A[]) => {\n          const entry = this.cache[id];\n          entry.access = access;\n          entry.state = 'fetched';\n          entry.pending.forEach(pending => {\n            pending.deferred.resolve(this.accessChecker(pending.required, entry.access));\n          });\n          entry.pending = [];\n        })\n        .catch(reason => {\n          console.error('Error fetching capabilities for routes ', reason);\n          entry.state = 'errored';\n          entry.pending.forEach(pending => {\n            pending.deferred.reject(reason);\n          });\n          entry.pending = [];\n        });\n    }\n\n    return entry;\n  }\n\n  private checkCapabilitiesExist(id: string, required: R[]): Promise<boolean> {\n    const entry = this.cache[id];\n    if (entry.state === 'pending') {\n      const deferred = new Deferred();\n      entry.pending.push({\n        required,\n        deferred,\n      });\n      return deferred.promise;\n    } else if (entry.state === 'errored') {\n      return Promise.reject(`Capabilities for entry ${id} could not be fetched`);\n    } else {\n      return Promise.resolve(this.accessChecker(required, entry.access));\n    }\n  }\n}\n\nexport { AuthorisationCache, AccessChecker, AccessFetcher };\n","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nfunction _slicedToArray(r, e) {\n  return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest();\n}\nexport { _slicedToArray as default };","function _arrayWithHoles(r) {\n  if (Array.isArray(r)) return r;\n}\nexport { _arrayWithHoles as default };","function _iterableToArrayLimit(r, l) {\n  var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n  if (null != t) {\n    var e,\n      n,\n      i,\n      u,\n      a = [],\n      f = !0,\n      o = !1;\n    try {\n      if (i = (t = t.call(r)).next, 0 === l) {\n        if (Object(t) !== t) return;\n        f = !1;\n      } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n    } catch (r) {\n      o = !0, n = r;\n    } finally {\n      try {\n        if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return;\n      } finally {\n        if (o) throw n;\n      }\n    }\n    return a;\n  }\n}\nexport { _iterableToArrayLimit as default };","function _nonIterableRest() {\n  throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nexport { _nonIterableRest as default };","import { Module, PackageCodes } from './accessChecker';\n\nasync function getUserPropositions(token: string) {\n  try {\n    const url = `/api/persona/v2/proposition`;\n    const result = await fetch(url, {\n      headers: {\n        Authorization: `Bearer ${token}`,\n      },\n    });\n    const response = (await result.json()).proposition_code as string[];\n    return response;\n  } catch {\n    return [];\n  }\n}\n\nasync function getUserPackages(token: string) {\n  try {\n    const url = `/api/persona/v2/package`;\n    const result = await fetch(url, {\n      headers: {\n        Authorization: `Bearer ${token}`,\n      },\n    });\n    const response = (await result.json())?.package_code as string[];\n    return mapPackagesToModules(response);\n  } catch {\n    return [];\n  }\n}\n\n/**\n * This function is used to map package code to modules.\n */\nfunction mapPackagesToModules(package_codes: string[]) {\n  const packageCodeToModuleMap = {\n    [PackageCodes.MarketStandard]: Module.BasicPosMarket,\n    [PackageCodes.Consumer]: Module.Cie,\n    [PackageCodes.RetailInsights]: Module.RetailInsights,\n    [PackageCodes.PredictPlus]: Module.Newron,\n    [PackageCodes.PredictForecast]: Module.Forecasting,\n    [PackageCodes.RetailHitlistsStandard]: Module.RetailHitlistsStandard,\n    [PackageCodes.SellerInsights]: Module.RetailSellerInsights,\n    [PackageCodes.RetailMarketPremium]: Module.RetailMarketPremium,\n    [PackageCodes.RetailKeyAccountData]: Module.RetailKeyAccountData,\n    [PackageCodes.DistributorPanelStandard]: Module.DistributorPanel,\n  };\n\n  return package_codes?.map(code => packageCodeToModuleMap[code]).filter(module => module !== undefined) || [];\n}\n\nexport { getUserPropositions, getUserPackages };\n","import { authorisation } from '@ecosystem/newron-client-lib';\nimport { getUserPackages } from './personaProducts';\n\nexport const getAccessModules = async (token: string) => {\n  const [modules, products, packages] = await Promise.all([\n    authorisation.getAuthorisedModuleValues(),\n    authorisation.getAuthorisedProductValues(),\n    getUserPackages(token),\n  ]);\n\n  return [...modules, ...products, ...packages];\n};\n","import { useAnalytics, isFeatureFlagEnabled } from '@ecosystem/newron-client-lib';\nimport { RouteEntryConfig } from '../../manager/types';\nimport { hasAccessTo, Module } from '../utils/accessChecker';\nimport { elements } from '@ecosystem/newron-design-system';\n\nconst { Icon } = elements;\n\nconst entry: RouteEntryConfig = {\n  order: 900,\n  label: 'Consumer Intelligence',\n  slug: 'consumerIntelligence',\n  graphic: <Icon.icons.NewronConsumerIntelligence title=\"Consumer Intelligence\" />,\n  state: async () => {\n    try {\n      const hasAccess = await hasAccessTo([Module.Cie]);\n\n      // Retail Seller Insights subscription should have no upselling of any other pages except Retail Intelligence\n      const hasRetailSellerInsightsAccess = await hasAccessTo([Module.RetailSellerInsights]);\n      if (hasRetailSellerInsightsAccess) {\n        return 'hidden';\n      }\n\n      return hasAccess ? 'available' : 'restricted';\n    } catch (e) {\n      return 'hidden';\n    }\n  },\n  access: [Module.Cie],\n  getUrl: () => '/cie/',\n  pathMatch: /\\/cie/,\n  isExternalUrlFn: async () => {\n    const isEnabled = await isFeatureFlagEnabled({\n      featureName: 'CIE_MFE',\n      domainName: 'consumer',\n    });\n    return !isEnabled;\n  },\n  isExternalUrl: true,\n  restrictedTooltipContent: (\n    <p>\n      Deep dive into consumer purchase behaviour. Find out who they are and why they buy with &nbsp;\n      <b>\n        <a\n          href=\"https://www.gfk.com/products/gfknewronconsumer\"\n          target=\"_blank\"\n          rel=\"noreferrer\"\n          onClick={() => {\n            useAnalytics().track('gfknewron Consumer link clicked');\n          }}\n          data-test-id=\"gfknewron-consumer-tooltip-link\"\n        >\n          gfknewron Consumer\n        </a>\n      </b>\n    </p>\n  ),\n};\n\nexport default [entry];\n","import { authentication } from '@ecosystem/newron-client-lib';\nimport { AuthorisationCache } from '../../tools/authorisationCache';\nimport { getAccessModules } from './query';\n\nexport enum Module {\n  BasicPosMarket = 'basic_pos_market',\n  BasicPosProduct = 'basic_pos_product',\n  BrandInsightCie = 'brand_insights_cie',\n  BrandInsightPos = 'brand_insights_pos',\n  Cie = 'cie',\n  ExecutiveView = 'exec_view',\n  Forecasting = 'forecasting',\n  Metadata = 'metadata',\n  Newron = 'newron',\n  NewronInsights = 'newron_insights',\n  Platform = 'platform',\n  PosTest = 'pos_test',\n  Pos = 'pos',\n  PosDistributionMarket = 'pos_distribution_market',\n  PosDistributionProduct = 'pos_distribution_product',\n  PriceElasticity = 'price_elasticity',\n  Recommendations = 'recommendations',\n  RetailInsights = 'retail_insights',\n  RetailHitlistsStandard = 'retail_hitlists_standard',\n  RetailMarketPremium = 'retail_market_premium',\n  RetailSellerInsights = 'seller_insights',\n  RetailKeyAccountData = 'retail_key_account_data',\n  TprInsights = 'tpr_insights',\n  TprPlanning = 'tpr_planning',\n  Tracking = 'tracking',\n  MarketBasic4x = 'market_basic_4x',\n  MarketBasic6x = 'market_basic_6x',\n  DistributorPanel = 'distributor_full',\n}\n\nexport enum PackageCodes {\n  MarketStandard = 'mkt_std',\n  Consumer = 'standard',\n  RetailInsights = 'retail_insights',\n  PredictPlus = 'plus',\n  PredictForecast = 'forecast',\n  RetailHitlistsStandard = 'retail_hitlists_standard',\n  SellerInsights = 'seller_insights',\n  RetailMarketPremium = 'retail_market_premium',\n  RetailKeyAccountData = 'retail_key_account_data',\n  DistributorPanelStandard = 'dist_std',\n}\n\nconst accessChecker = (required: Module[], has: Module[]): boolean => {\n  return required.every(m => has.includes(m));\n};\n\nconst accessFetcher = async (id: string): Promise<Module[]> => {\n  const token = await authentication.getAccessToken();\n  if (!token) {\n    throw new Error('Call to fetch access before authentication');\n  }\n\n  try {\n    return await getAccessModules(token);\n  } catch (err) {\n    throw err;\n  }\n};\n\nconst authorisationState = new AuthorisationCache<Module, Module>(accessFetcher, accessChecker);\n\nconst hasAccessTo = (modules: Module[]): Promise<boolean> => {\n  if (!authentication.isAuthenticated()) {\n    return Promise.resolve(false);\n  }\n\n  return authorisationState.getEntry(authentication.getUser().userId).hasCapabilities(modules);\n};\n\nexport { hasAccessTo };\n","function _setPrototypeOf(t, e) {\n  return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {\n    return t.__proto__ = e, t;\n  }, _setPrototypeOf(t, e);\n}\nexport { _setPrototypeOf as default };","import setPrototypeOf from \"./setPrototypeOf.js\";\nfunction _inherits(t, e) {\n  if (\"function\" != typeof e && null !== e) throw new TypeError(\"Super expression must either be null or a function\");\n  t.prototype = Object.create(e && e.prototype, {\n    constructor: {\n      value: t,\n      writable: !0,\n      configurable: !0\n    }\n  }), Object.defineProperty(t, \"prototype\", {\n    writable: !1\n  }), e && setPrototypeOf(t, e);\n}\nexport { _inherits as default };","import { authentication, isFeatureFlagEnabled } from '@ecosystem/newron-client-lib';\nimport { elements } from '@ecosystem/newron-design-system';\n\nimport { RouteEntryConfig, RouteState } from '../../newron-client-routes';\nimport { Module } from '../utils/accessChecker';\nimport { getUserPackages } from '../utils/personaProducts';\n\nconst { Icon } = elements;\nconst tabs = ['scorecard', 'time', 'segments'];\n\nfunction getDpPath(): string {\n  //allows /dp/page and /dp/tab/page too\n  const { tab, page } = window.location.pathname.match(/\\/dp\\/(?<tab>[^/]+)?\\/?(?<page>[^/]+)?/)?.groups || {};\n  return page && tabs.includes(tab) ? tab : 'scorecard';\n}\n\nconst accessModules = [Module.DistributorPanel];\n\nasync function getDpEnabledState(): Promise<RouteState> {\n  try {\n    if (Boolean(authentication.getUser()?.isInternalUser)) {\n      return 'new';\n    }\n    const token = await authentication.getAccessToken();\n    const userPackages = await getUserPackages(token);\n    const hasAccess = userPackages.includes(Module.DistributorPanel);\n    return hasAccess ? 'new' : 'hidden';\n  } catch {\n    return 'hidden';\n  }\n}\n\nconst distributionPanel: RouteEntryConfig[] = [\n  {\n    label: 'Supply Chain',\n    graphic: <Icon.icons.NewronSupplyChain />,\n    order: 375,\n    state: getDpEnabledState,\n    access: accessModules,\n    slug: 'dpi',\n    routePath: '/dpi/*',\n    subRoutes: [\n      {\n        label: 'Overview',\n        state: async () => Promise.resolve('available'),\n        slug: 'overview',\n        getUrl: () => {\n          return `/dpo`;\n        },\n        pathMatch: /\\/dpo/,\n      },\n      {\n        label: 'Brands',\n        state: async () => Promise.resolve('available'),\n        slug: 'brands',\n        getUrl: () => {\n          return `/dpi/${getDpPath()}/brands`;\n        },\n        pathMatch: /\\/dpi\\/.*\\/brands/,\n        routePath: '/dpi/:tab/:page',\n      },\n      {\n        label: 'Countries',\n        state: async () => Promise.resolve('available'),\n        slug: 'countries',\n        getUrl: () => {\n          return `/dpi/${getDpPath()}/countries`;\n        },\n        pathMatch: /\\/dpi\\/.*\\/countries/,\n        routePath: '/dpi/:tab/:page',\n      },\n      {\n        label: 'Product groups',\n        state: async () => Promise.resolve('available'),\n        slug: 'product-groups',\n        getUrl: () => {\n          return `/dpi/${getDpPath()}/product-groups`;\n        },\n        pathMatch: /\\/dpi\\/.*\\/product-groups/,\n        routePath: '/dpi/:tab/:page',\n      },\n      {\n        label: 'Features',\n        state: async () => Promise.resolve('available'),\n        slug: 'features',\n        getUrl: () => {\n          return `/dpi/${getDpPath()}/features`;\n        },\n        pathMatch: /\\/dpi\\/.*\\/features/,\n        routePath: '/dpi/:tab/:page',\n      },\n      {\n        label: 'Channels',\n        slug: 'channels',\n        state: async () => 'available',\n        getUrl: () => {\n          return `/dpi/${getDpPath()}/channels`;\n        },\n        pathMatch: /\\/dpi\\/.*\\/channels/,\n        routePath: '/dpi/:tab/:page',\n      },\n      {\n        label: 'Price classes',\n        state: async () => Promise.resolve('available'),\n        slug: 'prices',\n        getUrl: () => {\n          return `/dpi/${getDpPath()}/prices`;\n        },\n        pathMatch: /\\/dpi\\/.*\\/prices/,\n        routePath: '/dpi/:tab/:page',\n      },\n      {\n        label: 'Products',\n        state: async () => 'available',\n        slug: 'products',\n        getUrl: () => {\n          return `/dpl/products`;\n        },\n        pathMatch: /\\/dpl\\/products/,\n        routePath: '/dpl/:page',\n      },\n    ],\n  },\n];\n\nexport default distributionPanel;\n","import { Module, hasAccessTo } from '../utils/accessChecker';\n\nexport const pageState = async (modules: Module[], stateWithoutAccess: 'restricted' | 'hidden' = 'restricted') => {\n  const isMarketEnabled = localStorage\n    .getItem('gfknewron-feature-toggle')\n    ?.split(',')\n    .map(tag => tag.trim())\n    .includes('m1-enabled');\n\n  if (!isMarketEnabled) {\n    return 'hidden';\n  }\n  try {\n    const hasAccess = await hasAccessTo(modules);\n    return hasAccess ? 'available' : stateWithoutAccess;\n  } catch (e) {\n    return 'hidden';\n  }\n};\n\nexport const createSubRoute = (\n  label: string,\n  slug: string,\n  routePath: string,\n  queryParams: string[],\n  module: Module,\n  hideFromNav: boolean = false\n) => ({\n  label,\n  slug,\n  hideFromNav,\n  routePath,\n  queryParams,\n  access: [module],\n  state: async () => pageState([module]),\n  getUrl: (id = '') => `${routePath}${id ? `/${id}` : ''}`,\n});\n","import { RouteEntryConfig } from '../../manager/types';\nimport { hasAccessTo, Module } from '../utils/accessChecker';\nimport { elements } from '@ecosystem/newron-design-system';\nimport { pageState } from './utils';\n\nconst { Icon } = elements;\n\nconst entry: RouteEntryConfig = {\n  label: 'Global Summary',\n  graphic: <Icon.icons.NewronGlobalSummary title=\"Global Summary\" />,\n  order: 80,\n  state: () => pageState([Module.BasicPosMarket], 'hidden'),\n  access: [Module.BasicPosMarket],\n  slug: 'globalSummary',\n  getUrl: () => '/global-summary',\n  pathMatch: '/global-summary',\n  routePath: '/global-summary',\n};\n\nexport default entry;\n","export enum QueryParams {\n  Country = 'country',\n  ItemGroup = 'itemGroup',\n  Brand = 'brand',\n}\n","import { authentication, isSTPUser } from '@ecosystem/newron-client-lib';\nimport { AuthorisationCache } from '../../tools/authorisationCache';\nimport { Module } from './accessChecker';\nimport { getAccessModules } from './query';\n\nconst accessChecker = (required: Module[], has: Module[]): boolean => {\n  return has.length === 0;\n};\n\nconst accessFetcher = async (id: string): Promise<Module[]> => {\n  const token = await authentication.getAccessToken();\n  if (!token) {\n    throw new Error('Call to fetch access before authentication');\n  }\n\n  return await getAccessModules(token);\n};\n\nconst authorisationState = new AuthorisationCache<Module, Module>(accessFetcher, accessChecker);\n\nexport async function isSTPUserWithoutAccess() {\n  if (!authentication.isAuthenticated() || !isSTPUser(authentication.getUser()?.userId)) {\n    return Promise.resolve(false);\n  }\n\n  return authorisationState.getEntry(authentication.getUser()?.userId).hasCapabilities([]);\n}\n","import { RouteEntryConfig } from '../../manager/types';\nimport { Module } from '../utils/accessChecker';\nimport { QueryParams } from '../marketPredictHelpers/types';\nimport { elements } from '@ecosystem/newron-design-system';\nimport { isSTPUserWithoutAccess } from '../utils/startrack';\nimport { createSubRoute, pageState } from './utils';\n\nconst { Icon } = elements;\n\nconst entry: RouteEntryConfig = {\n  label: 'Market Intelligence',\n  graphic: <Icon.icons.NewronMarketIntelligence title=\"Market Intelligence\" />,\n  order: 300,\n  state: async () => {\n    if (await isSTPUserWithoutAccess()) {\n      return 'restricted';\n    }\n    return pageState([Module.BasicPosMarket], 'hidden');\n  },\n  slug: 'market',\n  subRoutes: [\n    {\n      label: 'Overview',\n      state: () => pageState([Module.BasicPosMarket]),\n      access: [Module.BasicPosMarket],\n      slug: 'overview',\n      getUrl: () => '/newron/overview',\n      pathMatch: /(^\\/newron$)|(\\/newron\\/overview)/,\n      routePath: '/newron/overview',\n      queryParams: [QueryParams.Country, QueryParams.ItemGroup],\n    },\n    {\n      label: 'Segmentation',\n      state: () => pageState([Module.BasicPosMarket]),\n      access: [Module.BasicPosMarket],\n      slug: 'segmentation',\n      getUrl: () => '/newron/segmentation',\n      pathMatch: /\\/newron\\/segmentation/,\n      routePath: '/newron/segmentation',\n      queryParams: [QueryParams.Country, QueryParams.ItemGroup],\n      subRoutes: [\n        createSubRoute(\n          'Brands',\n          'brands',\n          '/newron/segmentation/brands',\n          [QueryParams.Country, QueryParams.ItemGroup],\n          Module.BasicPosMarket,\n          true\n        ),\n        createSubRoute(\n          'Channels',\n          'channels',\n          '/newron/segmentation/channels',\n          [QueryParams.Country, QueryParams.ItemGroup],\n          Module.BasicPosMarket,\n          true\n        ),\n        createSubRoute(\n          'Price segments',\n          'priceSegments',\n          '/newron/segmentation/prices',\n          [QueryParams.Country, QueryParams.ItemGroup],\n          Module.BasicPosMarket,\n          true\n        ),\n        createSubRoute(\n          'Feature segments',\n          'featureSegments',\n          '/newron/segmentation/features',\n          [QueryParams.Country, QueryParams.ItemGroup],\n          Module.BasicPosMarket,\n          true\n        ),\n      ],\n    },\n    createSubRoute(\n      'Brands',\n      'brands',\n      '/newron/brands',\n      [QueryParams.Country, QueryParams.ItemGroup, QueryParams.Brand],\n      Module.BasicPosMarket\n    ),\n    createSubRoute(\n      'Products',\n      'products',\n      '/newron/products',\n      [QueryParams.Country, QueryParams.ItemGroup],\n      Module.BasicPosMarket\n    ),\n    {\n      label: 'Product',\n      state: () => pageState([Module.BasicPosMarket]),\n      access: [Module.BasicPosMarket],\n      slug: 'product',\n      getUrl: (id: string) => `/newron/products/${id}`,\n      pathMatch: /\\/newron\\/product/,\n      routePath: '/newron/products/:id',\n      hideFromNav: true,\n      queryParams: [QueryParams.Country, QueryParams.ItemGroup],\n      subRoutes: [\n        createSubRoute(\n          'Overview',\n          'overview',\n          '/newron/products/:id/overview',\n          [QueryParams.Country, QueryParams.ItemGroup],\n          Module.BasicPosMarket\n        ),\n        createSubRoute(\n          'Trends',\n          'trends',\n          '/newron/products/:id/trends',\n          [QueryParams.Country, QueryParams.ItemGroup],\n          Module.BasicPosMarket\n        ),\n        createSubRoute(\n          'Distribution',\n          'distribution',\n          '/newron/products/:id/distribution',\n          [QueryParams.Country, QueryParams.ItemGroup],\n          Module.PosDistributionProduct\n        ),\n        createSubRoute(\n          'Price & Promotion',\n          'price',\n          '/newron/products/:id/price',\n          [QueryParams.Country, QueryParams.ItemGroup],\n          Module.TprInsights\n        ),\n        createSubRoute(\n          'Competitors',\n          'competitors',\n          '/newron/products/:id/competitors',\n          [QueryParams.Country, QueryParams.ItemGroup],\n          Module.TprInsights\n        ),\n        createSubRoute(\n          'Recommendations',\n          'recommendations',\n          '/newron/products/:id/recommendations',\n          [QueryParams.Country, QueryParams.ItemGroup],\n          Module.Recommendations\n        ),\n      ],\n    },\n  ],\n};\n\nexport default entry;\n","import globalSummary from './globalSummary';\nimport market from './market';\n\nexport default [globalSummary, market];\n","import { RouteEntryConfig, RouteState } from '../../newron-client-routes';\nimport { elements } from '@ecosystem/newron-design-system';\nimport { hasAccessTo, Module } from '../utils/accessChecker';\nimport { isSTPUserWithoutAccess } from '../utils/startrack';\n\nconst { Icon } = elements;\n\nconst getMIPath = (): string => {\n  const path = window.location.pathname.split('/');\n  const miPos = path.findIndex(p => p === 'mi');\n  return path[miPos + 1] || 'scorecard';\n};\n\nconst accessModules = [Module.BasicPosMarket];\n\nconst stateFunction = async (): Promise<RouteState> => {\n  try {\n    if (await isSTPUserWithoutAccess()) {\n      return 'restricted';\n    }\n    const hasAccess = await hasAccessTo([Module.BasicPosMarket]);\n    return hasAccess ? 'available' : 'hidden';\n  } catch (e) {\n    return 'hidden';\n  }\n};\n\nconst mi2: RouteEntryConfig[] = [\n  {\n    label: 'Market Intelligence',\n    graphic: <Icon.icons.NewronMarketIntelligence />,\n    order: 79,\n    state: stateFunction,\n    access: accessModules,\n    slug: 'mi',\n    routePath: '/mi/*',\n    subRoutes: [\n      {\n        label: 'Overview',\n        slug: 'overview',\n        pathMatch: /\\/mo/,\n        state: async () => 'available',\n        getUrl: () => {\n          return `/mo`;\n        },\n      },\n      {\n        label: 'Brands',\n        slug: 'brands',\n        pathMatch: /\\/mi\\/.*\\/brands/,\n        state: async () => 'available',\n        getUrl: () => {\n          return `/mi/${getMIPath()}/brands`;\n        },\n      },\n      {\n        label: 'Countries',\n        slug: 'countries',\n        pathMatch: /\\/mi\\/.*\\/countries/,\n        state: async () => 'available',\n        getUrl: () => {\n          return `/mi/${getMIPath()}/countries`;\n        },\n      },\n      {\n        label: 'Regions',\n        slug: 'regions',\n        pathMatch: /\\/mi\\/.*\\/regions/,\n        state: async () => 'available',\n        getUrl: () => {\n          return `/mi/${getMIPath()}/regions`;\n        },\n      },\n      {\n        label: 'Product groups',\n        slug: 'product-groups',\n        pathMatch: /\\/mi\\/.*\\/product-groups/,\n        state: async () => 'available',\n        getUrl: () => {\n          return `/mi/${getMIPath()}/product-groups`;\n        },\n      },\n      {\n        label: 'Features',\n        slug: 'features',\n        pathMatch: /\\/mi\\/.*\\/features/,\n        state: async () => 'available',\n        getUrl: () => {\n          return `/mi/${getMIPath()}/features`;\n        },\n      },\n      {\n        label: 'Price classes',\n        slug: 'prices',\n        pathMatch: /\\/mi\\/.*\\/prices/,\n        state: async () => 'available',\n        getUrl: () => {\n          return `/mi/${getMIPath()}/prices`;\n        },\n      },\n      {\n        label: 'Channels',\n        slug: 'channels',\n        pathMatch: /\\/mi\\/.*\\/channels/,\n        state: async () => 'available',\n        getUrl: () => {\n          return `/mi/${getMIPath()}/channels`;\n        },\n      },\n      {\n        label: 'First activity',\n        slug: 'first-activity',\n        pathMatch: /\\/mi\\/.*\\/first-activity/,\n        state: async () => 'available',\n        getUrl: () => {\n          return `/mi/${getMIPath()}/first-activity`;\n        },\n      },\n      {\n        label: 'Products',\n        slug: 'products',\n        pathMatch: /\\/ml\\/products/,\n        state: async () => 'available',\n        getUrl: () => {\n          return `/ml/products`;\n        },\n      },\n    ],\n  },\n];\n\nexport default mi2;\n","import { isFeatureFlagEnabled } from '@ecosystem/newron-client-lib';\nimport { RouteEntryConfig } from '../../manager/types';\nimport { elements } from '@ecosystem/newron-design-system';\nimport { hasAccessTo, Module } from '../utils/accessChecker';\n\nconst { Icon } = elements;\nconst retailAccessModulesArray = [\n  Module.RetailInsights,\n  Module.RetailHitlistsStandard,\n  Module.RetailSellerInsights,\n  Module.RetailKeyAccountData,\n  Module.RetailMarketPremium,\n];\nconst marketAccessModulesArray = [\n  Module.PosTest,\n  Module.BasicPosMarket,\n  Module.BasicPosProduct,\n  Module.Pos,\n  Module.PosDistributionMarket,\n  Module.PosDistributionProduct,\n];\n\nconst distributorPanelAccessModulesArray = [Module.DistributorPanel];\n\nconst entry: RouteEntryConfig = {\n  order: 50,\n  label: 'Collections',\n  slug: 'collections',\n  graphic: <Icon.icons.NewronCollection title=\"Collections\" />,\n  state: async () => {\n    const retailAccessCheck = await Promise.all(\n      retailAccessModulesArray.map(async module => await hasAccessTo([module]))\n    );\n    const hasRetailAccess = retailAccessCheck.some(access => access);\n\n    const marketAccessCheck = await Promise.all(\n      marketAccessModulesArray.map(async module => await hasAccessTo([module]))\n    );\n    const hasMarketAccess = marketAccessCheck.some(access => access);\n\n    const distributorPanelAccessCheck = await Promise.all(\n      distributorPanelAccessModulesArray.map(module => hasAccessTo([module]))\n    );\n\n    const hasDistributorPanelAccess = distributorPanelAccessCheck.some(access => access);\n\n    const hasCieAccess = await hasAccessTo([Module.Cie]);\n\n    try {\n      const isRetailCollectionsEnabled = await isFeatureFlagEnabled({\n        featureName: 'COLLECTIONS',\n        domainName: 'retail',\n      });\n\n      return hasCieAccess ||\n        hasMarketAccess ||\n        (hasRetailAccess && isRetailCollectionsEnabled) ||\n        hasDistributorPanelAccess\n        ? 'available'\n        : 'hidden';\n    } catch (e) {\n      return 'hidden';\n    }\n  },\n  access: [\n    Module.Cie,\n    Module.RetailInsights,\n    Module.RetailHitlistsStandard,\n    Module.RetailSellerInsights,\n    Module.RetailKeyAccountData,\n    Module.RetailMarketPremium,\n  ],\n  getUrl: () => '/collections',\n  pathMatch: /\\/collections/,\n};\n\nexport default entry;\n","import { RouteEntryConfig, RouteState } from '../../newron-client-routes';\nimport { elements } from '@ecosystem/newron-design-system';\nimport { hasAccessTo, Module } from '../utils/accessChecker';\nimport { isFeatureFlagEnabled } from '@ecosystem/newron-client-lib';\nimport { isSTPUserWithoutAccess } from '../utils/startrack';\n\nconst {\n  Icon: { icons: Icons },\n} = elements;\nconst accessModules = [Module.BasicPosMarket];\n\nconst stateFunction = async (): Promise<RouteState> => {\n  try {\n    if (await isSTPUserWithoutAccess()) {\n      return 'restricted';\n    }\n    const isDataForgeEnabled = await isFeatureFlagEnabled({\n      featureName: 'DATA_FORGE_MFE',\n      domainName: 'platform',\n    });\n    const hasMarketAccess = await hasAccessTo([Module.BasicPosMarket]);\n\n    return hasMarketAccess && isDataForgeEnabled ? 'available' : 'hidden';\n  } catch (e) {\n    return 'hidden';\n  }\n};\n\nconst entry: RouteEntryConfig = {\n  order: 1001,\n  label: 'Data Forge',\n  slug: 'dataForge',\n  graphic: <Icons.TableEdit title=\"Data Forge\" />,\n  state: stateFunction,\n  access: accessModules,\n  getUrl: () => '/data-forge',\n  pathMatch: /\\/data-forge/,\n};\n\nexport default entry;\n","import collections from './collections';\nimport dataForge from './dataForge';\n\nexport default [collections, dataForge];\n","import { RouteEntryConfig } from '../../manager/types';\nimport { hasAccessTo, Module } from '../utils/accessChecker';\nimport { QueryParams } from '../marketPredictHelpers/types';\nimport { elements } from '@ecosystem/newron-design-system';\n\nconst { Icon } = elements;\n\nconst entry: RouteEntryConfig = {\n  label: 'Recommendations',\n  order: 200,\n  slug: 'recommendations',\n  pathMatch: '/newron/recommendations',\n  routePath: '/newron/recommendations',\n  getUrl: () => '/newron/recommendations',\n  queryParams: [QueryParams.Country, QueryParams.ItemGroup],\n  state: async () => {\n    try {\n      const hasAccess = await hasAccessTo([Module.Recommendations]);\n      return hasAccess ? 'available' : 'hidden';\n    } catch (e) {\n      return 'hidden';\n    }\n  },\n  access: [Module.Recommendations],\n  graphic: <Icon.icons.NewronRecommendations title=\"Recommendations\" />,\n};\n\nexport default entry;\n","import { isFeatureFlagEnabled } from '@ecosystem/newron-client-lib';\nimport { RouteEntryConfig } from '../../manager/types';\nimport { hasAccessTo, Module } from '../utils/accessChecker';\nimport { QueryParams } from '../marketPredictHelpers/types';\nimport { elements } from '@ecosystem/newron-design-system';\n\nconst { Icon } = elements;\n\nconst entry: RouteEntryConfig = {\n  order: 400,\n  label: 'Pricing & Promotions',\n  slug: 'pricingAndPromotions',\n  graphic: <Icon.icons.NewronPromotionPlanning title=\"Pricing & Promotions\" />,\n  state: async () => {\n    try {\n      const [hasAccessToTprPlanning, hasAccessToNewronInsights] = await Promise.all([\n        hasAccessTo([Module.TprPlanning]),\n        hasAccessTo([Module.NewronInsights]),\n      ]);\n      return hasAccessToTprPlanning || hasAccessToNewronInsights ? 'available' : 'hidden';\n    } catch (e) {\n      return 'hidden';\n    }\n  },\n  access: [Module.TprPlanning, Module.NewronInsights],\n  subRoutes: [\n    {\n      label: 'Promotion Monitor',\n      slug: 'promotion-monitor',\n      state: async () => {\n        try {\n          const hasAccess = await hasAccessTo([Module.TprPlanning]);\n          return hasAccess ? 'available' : 'hidden';\n        } catch (e) {\n          return 'hidden';\n        }\n      },\n      access: [Module.TprPlanning],\n      getUrl: () => `/newron/pricing-promotions/promotion-monitor`,\n      pathMatch: /\\/newron\\/pricing-promotions\\/promotion-monitor/,\n      routePath: '/newron/pricing-promotions/promotion-monitor',\n      queryParams: [QueryParams.Country, QueryParams.ItemGroup],\n    },\n    {\n      label: 'Price Monitor',\n      slug: 'price-monitor',\n      state: async () => {\n        try {\n          const hasAccess = await hasAccessTo([Module.NewronInsights]);\n          return hasAccess ? 'available' : 'hidden';\n        } catch (e) {\n          return 'hidden';\n        }\n      },\n      access: [Module.NewronInsights],\n      getUrl: () => `/newron/pricing-promotions/price-monitor`,\n      pathMatch: /\\/newron\\/pricing-promotions\\/price-monitor/,\n      routePath: '/newron/pricing-promotions/price-monitor',\n      queryParams: [QueryParams.Country, QueryParams.ItemGroup],\n    },\n    {\n      label: 'Promotion Planner',\n      slug: 'promotion-planner',\n      state: async () => {\n        try {\n          const hasAccess = await hasAccessTo([Module.TprPlanning]);\n          return hasAccess ? 'available' : 'hidden';\n        } catch (e) {\n          return 'hidden';\n        }\n      },\n      access: [Module.TprPlanning],\n      getUrl: () => `/newron/pricing-promotions/promotion-planner`,\n      pathMatch: /\\/newron\\/pricing-promotions\\/promotion-planner/,\n      routePath: '/newron/pricing-promotions/promotion-planner',\n      queryParams: [QueryParams.Country, QueryParams.ItemGroup],\n    },\n    {\n      label: 'Price Planner',\n      slug: 'price-planner',\n      state: async () => {\n        try {\n          const hasAccess = await hasAccessTo([Module.TprPlanning]);\n          return hasAccess ? 'available' : 'hidden';\n        } catch (e) {\n          return 'hidden';\n        }\n      },\n      access: [Module.TprPlanning],\n      getUrl: () => `/newron/pricing-promotions/price-planner`,\n      pathMatch: /\\/newron\\/pricing-promotions\\/price-planner/,\n      routePath: '/newron/pricing-promotions/price-planner',\n      queryParams: [QueryParams.Country, QueryParams.ItemGroup],\n    },\n    {\n      label: 'Promotion Plan',\n      slug: 'promotion-plan',\n      state: async () => {\n        try {\n          const hasAccess = await hasAccessTo([Module.TprPlanning]);\n          return hasAccess ? 'available' : 'hidden';\n        } catch (e) {\n          return 'hidden';\n        }\n      },\n      access: [Module.TprPlanning],\n      getUrl: (id: string) => `/newron/pricing-promotions/promotion-planner/${id}`,\n      routePath: '/newron/pricing-promotions/promotion-planner/:id',\n      hideFromNav: true,\n      queryParams: [QueryParams.Country, QueryParams.ItemGroup],\n    },\n    {\n      label: 'Pricing Products',\n      slug: 'pricingProducts',\n      state: async () => {\n        try {\n          const isPriceMonitorFeatureFlag = await isFeatureFlagEnabled({\n            featureName: 'PRICING_PROMOTE_PRODUCTS',\n            domainName: 'predict',\n          });\n\n          const hasAccess = await hasAccessTo([Module.TprPlanning]);\n          return hasAccess && isPriceMonitorFeatureFlag ? 'new' : 'hidden';\n        } catch (e) {\n          return 'hidden';\n        }\n      },\n      access: [Module.TprPlanning],\n      getUrl: () => `/predict/pricing-promotions/pricing-products`,\n      pathMatch: /\\/predict\\/pricing-promotions\\/pricing-products/,\n      routePath: '/predict/pricing-promotions/pricing-products',\n      queryParams: [QueryParams.Country, QueryParams.ItemGroup],\n    },\n    {\n      label: 'Promote Products',\n      slug: 'promoteProducts',\n      state: async () => {\n        try {\n          const isPriceMonitorFeatureFlag = await isFeatureFlagEnabled({\n            featureName: 'PRICING_PROMOTE_PRODUCTS',\n            domainName: 'predict',\n          });\n\n          const hasAccess = await hasAccessTo([Module.TprPlanning]);\n          return hasAccess && isPriceMonitorFeatureFlag ? 'new' : 'hidden';\n        } catch (e) {\n          return 'hidden';\n        }\n      },\n      access: [Module.TprPlanning],\n      getUrl: () => `/predict/pricing-promotions/promote-products`,\n      pathMatch: /^\\/predict\\/pricing-promotions\\/promote-products/,\n      routePath: '/predict/pricing-promotions/promote-products',\n      queryParams: [QueryParams.Country, QueryParams.ItemGroup],\n    },\n  ],\n};\n\nexport default entry;\n","import { RouteEntryConfig } from '../../manager/types';\nimport { hasAccessTo, Module } from '../utils/accessChecker';\nimport { QueryParams } from '../marketPredictHelpers/types';\nimport { elements } from '@ecosystem/newron-design-system';\n\nconst { Icon } = elements;\n\nconst entry: RouteEntryConfig = {\n  order: 500,\n  label: 'Forecasting',\n  slug: 'forecasting-mfe',\n  graphic: <Icon.icons.NewronForcasting title=\"Forecasting\" />,\n  state: async () => {\n    try {\n      const access = {\n        forecasting: await hasAccessTo([Module.Forecasting]),\n        retailerInsight: await hasAccessTo([Module.RetailInsights]),\n        retailerHitlist: await hasAccessTo([Module.RetailHitlistsStandard]),\n        sellerInsights: await hasAccessTo([Module.RetailSellerInsights]),\n      };\n\n      // Retail Seller Insights subscription should have no upselling of any other pages except Retail Intelligence\n      if (access.sellerInsights) {\n        return 'hidden';\n      } else if (access.forecasting) {\n        return 'available';\n      } else if (access.retailerInsight || access.retailerHitlist) {\n        return 'restricted';\n      } else {\n        return 'hidden';\n      }\n    } catch (error) {\n      return 'hidden';\n    }\n  },\n  access: [Module.Forecasting],\n  pathMatch: /\\/newron\\/forecasting/,\n  routePath: '/newron/forecasting',\n  getUrl: () => '/newron/forecasting',\n  queryParams: [QueryParams.Country, QueryParams.ItemGroup],\n  restrictedTooltipContent: (\n    <p>\n      Forecast the future with confidence. See ahead with our market forecasts so you can plan for tomorrow's success\n      today.\n    </p>\n  ),\n};\n\nexport default entry;\n","import { RouteEntryConfig } from '../../manager/types';\nimport { hasAccessTo, Module } from '../utils/accessChecker';\nimport { QueryParams } from '../marketPredictHelpers/types';\nimport { elements } from '@ecosystem/newron-design-system';\n\nconst { Icon } = elements;\n\nconst entry: RouteEntryConfig = {\n  order: 600,\n  label: 'Revenue Premium',\n  slug: 'revenuePremium',\n  graphic: <Icon.icons.NewronRevenuePremium title=\"Revenue Premium\" />,\n  queryParams: [QueryParams.Country, QueryParams.ItemGroup],\n  state: async () => {\n    try {\n      const hasAccess = await hasAccessTo([Module.BrandInsightPos]);\n      return hasAccess ? 'available' : 'hidden';\n    } catch (e) {\n      return 'hidden';\n    }\n  },\n  access: [Module.BrandInsightPos],\n  getUrl: () => '/newron/revenue-premium',\n  pathMatch: /\\/newron\\/revenue-premium/,\n  routePath: '/newron/revenue-premium',\n};\n\nexport default entry;\n","import { RouteEntryConfig } from '../../manager/types';\nimport { hasAccessTo, Module } from '../utils/accessChecker';\n\nimport { QueryParams } from '../marketPredictHelpers/types';\nimport { elements } from '@ecosystem/newron-design-system';\n\nconst { Icon } = elements;\n\nconst entry: RouteEntryConfig = {\n  order: 700,\n  label: 'Performance Drivers',\n  slug: 'performanceDrivers',\n  graphic: <Icon.icons.NewronPerformanceDrivers title=\"Performance Drivers\" />,\n  queryParams: [QueryParams.Country, QueryParams.ItemGroup],\n  state: async () => {\n    try {\n      const hasAccess = await hasAccessTo([Module.BrandInsightPos]);\n      return hasAccess ? 'available' : 'hidden';\n    } catch (e) {\n      return 'hidden';\n    }\n  },\n  access: [Module.BrandInsightPos],\n  getUrl: () => '/newron/performance-drivers',\n  pathMatch: '/newron/performance-drivers',\n  routePath: '/newron/performance-drivers',\n};\n\nexport default entry;\n","import recommendations from './recommendations';\nimport promoPlanning from './promoPlanning';\nimport forecasting from './forecasting';\nimport revenuePremium from './revenuePremium';\nimport performanceDrivers from './performanceDrivers';\nimport { RouteEntryConfig } from '../../manager/types';\nimport { hasAccessTo, Module } from '../utils/accessChecker';\nimport { useAnalytics } from '@ecosystem/newron-client-lib';\nimport { elements } from '@ecosystem/newron-design-system';\nimport { isSTPUserWithoutAccess } from '../utils/startrack';\n\nconst { Icon } = elements;\n\nconst entries: RouteEntryConfig[] = [\n  recommendations,\n  promoPlanning,\n  forecasting,\n  revenuePremium,\n  performanceDrivers,\n  {\n    label: 'Newron Predict',\n    slug: 'predict',\n    order: 350,\n    graphic: <Icon.icons.NewronPredict title=\"Newron Predict\" />,\n\n    state: async () => {\n      try {\n        const hasNewronInsightsAccess = await hasAccessTo([Module.NewronInsights]);\n        const hasRetailAccess = await hasAccessTo([Module.RetailInsights]);\n\n        // Retail Seller Insights subscription should have no upselling of any other pages except Retail Intelligence\n        const hasRetailSellerInsightsAccess = await hasAccessTo([Module.RetailSellerInsights]);\n        const stpUserWithoutAccess = await isSTPUserWithoutAccess();\n\n        return hasNewronInsightsAccess || hasRetailAccess || hasRetailSellerInsightsAccess || stpUserWithoutAccess\n          ? 'hidden'\n          : 'restricted';\n      } catch (e) {\n        return 'hidden';\n      }\n    },\n    getUrl: () => '#',\n    restrictedTooltipContent: (\n      <>\n        <h4>Smarter insights into future performance</h4>\n        <p>\n          Go further with &nbsp;\n          <b>\n            <a\n              href=\"https://www.gfk.com/products/gfknewronpredict\"\n              target=\"_blank\"\n              rel=\"noreferrer\"\n              onClick={() => {\n                useAnalytics().track('gfknewron Predict link clicked');\n              }}\n              data-test-id=\"gfknewron-predict-tooltip-link\"\n            >\n              gfknewron Predict\n            </a>\n          </b>\n        </p>\n      </>\n    ),\n  },\n];\n\nexport default entries;\n","import { RouteConfig, RouteEntryConfig, RouteState } from '../../manager/types';\nimport { hasAccessTo, Module } from '../utils/accessChecker';\nimport { useAnalytics } from '@ecosystem/newron-client-lib';\nimport { elements } from '@ecosystem/newron-design-system';\nimport { isSTPUserWithoutAccess } from '../utils/startrack';\n\nconst { Icon } = elements;\n\nconst generateSubRoutes: (\n  state: () => Promise<RouteState>\n) => (\n  routeConfig: Pick<RouteConfig, 'label' | 'slug' | 'hideFromNav' | 'access' | 'getUrl' | 'pathMatch' | 'routePath'>\n) => RouteConfig = state => {\n  return routeConfig => {\n    return {\n      ...routeConfig,\n      state,\n    };\n  };\n};\n\nconst generateProductSubRoutes = generateSubRoutes(async () => {\n  try {\n    return await isRetailProductsPageAllowed();\n  } catch (e) {\n    return 'hidden';\n  }\n});\n\nconst generateExploreSubRoutes = generateSubRoutes(async () => {\n  try {\n    return await isExplorePageAllowed();\n  } catch (e) {\n    return 'hidden';\n  }\n});\n\nconst displayRestrictedTooltipForRI = () => {\n  return (\n    <p>\n      Drive your analysis with &nbsp;\n      <b>\n        <a\n          href=\"https://www.gfk.com/products/gfknewron-retail\"\n          target=\"_blank\"\n          rel=\"noreferrer\"\n          onClick={() => {\n            useAnalytics().track('gfknewron Retail link clicked');\n          }}\n          data-test-id=\"gfknewron-retail-tooltip-link\"\n        >\n          Retail Intelligence\n        </a>\n      </b>\n      &nbsp; - review and benchmark top level sector and category performance to uncover trends and opportunities to\n      drive your business forward\n    </p>\n  );\n};\n\nconst entry: RouteEntryConfig = {\n  order: 1000,\n  label: 'Retail Intelligence',\n  slug: 'retailIntelligence',\n  graphic: <Icon.icons.NewronRetailInsights title=\"Retail Intelligence\" />,\n  state: async () => {\n    try {\n      if (await isSTPUserWithoutAccess()) {\n        return 'restricted';\n      }\n\n      const hasAccessRetailInsights = await hasAccessTo([Module.RetailInsights]);\n      const hasAccessRetailHitlistsStandard = await hasAccessTo([Module.RetailHitlistsStandard]);\n      const hasAccessRetailMarketPremium = await hasAccessTo([Module.RetailMarketPremium]);\n      const hasAccessRetailSellerInsights = await hasAccessTo([Module.RetailSellerInsights]);\n      const hasAccessRetailKad = await hasAccessTo([Module.RetailKeyAccountData]);\n\n      return hasAccessRetailInsights ||\n        hasAccessRetailHitlistsStandard ||\n        hasAccessRetailMarketPremium ||\n        hasAccessRetailSellerInsights ||\n        hasAccessRetailKad\n        ? 'available'\n        : 'hidden';\n    } catch (e) {\n      return 'hidden';\n    }\n  },\n  subRoutes: [\n    {\n      label: 'Retailer Overview',\n      slug: 'retailerOverview',\n      state: async () => {\n        try {\n          return await isRetailerOverviewPageAllowed();\n        } catch (e) {\n          return 'hidden';\n        }\n      },\n      access: [Module.RetailInsights],\n      getUrl: () => '/newron-retail/overview',\n      pathMatch: '/newron-retail/overview',\n      routePath: '/newron-retail/overview',\n      restrictedTooltipContent: displayRestrictedTooltipForRI(),\n    },\n    {\n      label: 'Explore',\n      slug: 'explore',\n      state: async () => {\n        try {\n          return await isExplorePageAllowed();\n        } catch (e) {\n          return 'hidden';\n        }\n      },\n      access: [Module.RetailInsights, Module.RetailKeyAccountData],\n      getUrl: () => '/newron-retail/explore',\n      pathMatch: /\\/newron-retail\\/explore/,\n      routePath: '/newron-retail/explore',\n      subRoutes: [\n        generateExploreSubRoutes({\n          label: 'Leaderboard',\n          hideFromNav: true,\n          slug: 'leaderboard',\n          pathMatch: '/newron-retail/explore/leaderboard',\n          routePath: '/newron-retail/explore/leaderboard',\n          access: [Module.RetailInsights, Module.RetailKeyAccountData],\n          getUrl: () => '/newron-retail/explore/leaderboard',\n        }),\n        generateExploreSubRoutes({\n          label: 'Trends',\n          hideFromNav: true,\n          slug: 'trends',\n          pathMatch: '/newron-retail/explore/trends',\n          routePath: '/newron-retail/explore/trends',\n          access: [Module.RetailInsights, Module.RetailKeyAccountData],\n          getUrl: () => '/newron-retail/explore/trends',\n        }),\n        generateExploreSubRoutes({\n          label: 'Segments',\n          hideFromNav: true,\n          slug: 'segments',\n          pathMatch: '/newron-retail/explore/segments',\n          routePath: '/newron-retail/explore/segments',\n          access: [Module.RetailInsights, Module.RetailKeyAccountData],\n          getUrl: () => '/newron-retail/explore/segments',\n        }),\n      ],\n      restrictedTooltipContent: displayRestrictedTooltipForRI(),\n    },\n    {\n      label: 'Opportunity Review',\n      slug: 'opportunityReview',\n      state: async () => {\n        try {\n          return await isOpportunityReviewPageAllowed();\n        } catch (e) {\n          return 'hidden';\n        }\n      },\n      access: [Module.RetailInsights],\n      getUrl: () => '/newron-retail/opportunity-review',\n      pathMatch: '/newron-retail/opportunity-review',\n      routePath: '/newron-retail/opportunity-review',\n      restrictedTooltipContent: displayRestrictedTooltipForRI(),\n    },\n    {\n      label: 'Trading Assistant',\n      slug: 'tradingAssistant',\n      state: async () => {\n        try {\n          return await isTradingAssistantPageAllowed();\n        } catch (e) {\n          return 'hidden';\n        }\n      },\n      access: [Module.RetailMarketPremium, Module.RetailKeyAccountData],\n      getUrl: () => '/newron-retail/trading-assistant',\n      pathMatch: /\\/newron-retail\\/trading-assistant/,\n      routePath: '/newron-retail/trading-assistant',\n      subRoutes: [\n        {\n          label: 'Supplier Review',\n          slug: 'supplierReview',\n          hideFromNav: true,\n          state: async () => {\n            try {\n              return await isTradingAssistantPageAllowed();\n            } catch (e) {\n              return 'hidden';\n            }\n          },\n          access: [Module.RetailMarketPremium],\n          getUrl: () => '/newron-retail/trading-assistant/supplier-review',\n          pathMatch: '/newron-retail/trading-assistant/supplier-review',\n          routePath: '/newron-retail/trading-assistant/supplier-review',\n        },\n      ],\n      restrictedTooltipContent: (\n        <p>\n          Dive deeper into analysis to understand who and what is driving the market and uncover as yet untapped\n          opportunity - to understand more contact your Account Manager\n        </p>\n      ),\n    },\n    {\n      label: 'Products',\n      slug: 'products',\n      state: async () => {\n        try {\n          return await isRetailProductsPageAllowed();\n        } catch (e) {\n          return 'hidden';\n        }\n      },\n      access: [Module.RetailHitlistsStandard, Module.RetailSellerInsights, Module.RetailKeyAccountData],\n      getUrl: () => '/newron-retail/products',\n      pathMatch: /\\/newron-retail\\/products/,\n      routePath: '/newron-retail/products',\n      subRoutes: [\n        generateProductSubRoutes({\n          label: 'Overview',\n          slug: 'overview',\n          hideFromNav: true,\n          access: [Module.RetailHitlistsStandard, Module.RetailSellerInsights, Module.RetailKeyAccountData],\n          getUrl: () => '/newron-retail/products/overview',\n          pathMatch: '/newron-retail/products/overview',\n          routePath: '/newron-retail/products/overview',\n        }),\n        generateProductSubRoutes({\n          label: 'Trends',\n          slug: 'trends',\n          hideFromNav: true,\n          access: [Module.RetailHitlistsStandard, Module.RetailSellerInsights, Module.RetailKeyAccountData],\n          getUrl: () => '/newron-retail/products/trends',\n          pathMatch: '/newron-retail/products/trends',\n          routePath: '/newron-retail/products/trends',\n        }),\n        generateProductSubRoutes({\n          label: 'Leaderboard',\n          slug: 'leaderboard',\n          hideFromNav: true,\n          access: [Module.RetailHitlistsStandard, Module.RetailSellerInsights, Module.RetailKeyAccountData],\n          getUrl: () => '/newron-retail/products/leaderboard',\n          pathMatch: '/newron-retail/products/leaderboard',\n          routePath: '/newron-retail/products/leaderboard',\n        }),\n      ],\n      restrictedTooltipContent: (\n        <p>\n          Discover which products are driving the market. Ask your Account manager for access to our most detailed data\n          sets.\n        </p>\n      ),\n    },\n  ],\n};\n\nconst isRetailerOverviewPageAllowed = async () => {\n  const hasAccessRetailInsights = await hasAccessTo([Module.RetailInsights]);\n  const hasAccessRetailHitlistsStandard = await hasAccessTo([Module.RetailHitlistsStandard]);\n\n  if (hasAccessRetailInsights) {\n    return 'available';\n  }\n\n  if (!hasAccessRetailInsights && hasAccessRetailHitlistsStandard) {\n    return 'restricted';\n  }\n\n  return 'hidden';\n};\n\nconst isOpportunityReviewPageAllowed = isRetailerOverviewPageAllowed;\n\nconst isTradingAssistantPageAllowed = async () => {\n  const hasAccessRetailInsights = await hasAccessTo([Module.RetailInsights]);\n  const hasAccessRetailHitlistsStandard = await hasAccessTo([Module.RetailHitlistsStandard]);\n  const hasAccessRetailMarketPremium = await hasAccessTo([Module.RetailMarketPremium]);\n  const hasAccessRetailKeyAccountData = await hasAccessTo([Module.RetailKeyAccountData]);\n\n  if (hasAccessRetailMarketPremium || hasAccessRetailKeyAccountData) {\n    return 'available';\n  }\n\n  if ((hasAccessRetailInsights || hasAccessRetailHitlistsStandard) && !hasAccessRetailMarketPremium) {\n    return 'restricted';\n  }\n\n  return 'hidden';\n};\n\nconst isExplorePageAllowed = async () => {\n  const hasAccessRetailInsights = await hasAccessTo([Module.RetailInsights]);\n  const hasAccessRetailHitlistsStandard = await hasAccessTo([Module.RetailHitlistsStandard]);\n  const hasAccessRetailKeyAccountData = await hasAccessTo([Module.RetailKeyAccountData]);\n\n  if (hasAccessRetailInsights || hasAccessRetailKeyAccountData) {\n    return 'available';\n  }\n\n  if (!hasAccessRetailInsights && hasAccessRetailHitlistsStandard) {\n    return 'restricted';\n  }\n\n  return 'hidden';\n};\n\nconst isRetailProductsPageAllowed = async () => {\n  const hasAccessRetailInsights = await hasAccessTo([Module.RetailInsights]);\n  const hasAccessRetailHitlistsStandard = await hasAccessTo([Module.RetailHitlistsStandard]);\n  const hasAccessRetailSellerInsights = await hasAccessTo([Module.RetailSellerInsights]);\n  const hasAccessRetailKeyAccountData = await hasAccessTo([Module.RetailKeyAccountData]);\n\n  if (hasAccessRetailHitlistsStandard || hasAccessRetailSellerInsights || hasAccessRetailKeyAccountData) {\n    return 'available';\n  }\n\n  if (hasAccessRetailInsights && !hasAccessRetailHitlistsStandard) {\n    return 'restricted';\n  }\n\n  return 'hidden';\n};\n\nexport default entry;\n","import insights from './insights';\n\nexport default insights;\n","import { RouteEntryConfig } from '../manager/types';\nimport consumer from './consumer';\nimport distribution from './distribution';\nimport market from './market';\nimport mi2 from './mi2';\nimport platform from './platform';\nimport predict from './predict';\nimport retail from './retail';\n\nconst registry: Array<RouteEntryConfig> = [\n  ...platform,\n  ...market,\n  ...predict,\n  retail,\n  ...consumer,\n  ...mi2,\n  ...distribution,\n];\n\nexport { registry };\n","import { NavRouteConfig, RouteConfig, RouteEntryConfig } from './types';\nimport { matchPath } from 'react-router-dom';\nimport { registry } from '../configs/registry';\n\nexport class RouteManager {\n  private static instance: RouteManager;\n  private routes: Array<RouteConfig | NavRouteConfig> = [];\n\n  private constructor(routes: RouteEntryConfig[]) {\n    routes.forEach(route => this.addRoute(route));\n  }\n\n  public addRoute(route: RouteConfig | NavRouteConfig) {\n    if (!route.getUrl && !route.subRoutes) {\n      throw new Error('A route config must have a getUrl function or a list of subRoutes');\n    }\n    this.parseRoute(route);\n    this.routes.push(route);\n  }\n\n  public getNavRoutes(): NavRouteConfig[] {\n    const filteredList = this.routes.filter(r => r.hasOwnProperty('order'));\n    const navRoutes = filteredList as NavRouteConfig[];\n    return navRoutes.sort((a, b) => a.order - b.order);\n  }\n\n  public getRoute(slug: string): RouteConfig | null {\n    const slugParts = slug.split('.');\n    let index = 1;\n\n    const findInList = (list: RouteConfig[], slugIndex: number): RouteConfig | null => {\n      const slugPath = slugParts.slice(0, slugIndex).join('.');\n      const candidates = list.filter(route => route.slug === slugPath);\n\n      if (!candidates[0]) {\n        return null;\n      }\n\n      if (candidates[0].slug === slug) {\n        return candidates[0];\n      }\n\n      if (!candidates[0].subRoutes) {\n        return null;\n      }\n\n      index++;\n      return findInList(candidates[0].subRoutes, index);\n    };\n\n    return findInList(this.routes, index);\n  }\n\n  public findMatchingRoute(pathToMatch: string): RouteConfig | null {\n    const doesRouteMatchPath = (path: string, route: RouteConfig): boolean => {\n      if (!route.pathMatch) {\n        return false;\n      } else if (typeof route.pathMatch === 'string') {\n        return matchPath(path, route.pathMatch) !== null;\n      } else {\n        return route.pathMatch.test(path);\n      }\n    };\n\n    const findMatchWithinRoute = (path: string, route: RouteConfig): RouteConfig | null => {\n      if (doesRouteMatchPath(path, route)) {\n        return route;\n      }\n\n      if (route.subRoutes) {\n        let matched: RouteConfig | null = null;\n        for (let subRoute of route.subRoutes) {\n          const matchedSubRoute = findMatchWithinRoute(path, subRoute);\n          if (matchedSubRoute) {\n            matched = matchedSubRoute;\n            break;\n          }\n        }\n\n        return matched;\n      }\n\n      return null;\n    };\n\n    let matchingRoute: RouteConfig | null = null;\n    for (let route of this.routes) {\n      const match = findMatchWithinRoute(pathToMatch, route);\n      if (match) {\n        matchingRoute = match;\n        break;\n      }\n    }\n\n    return matchingRoute;\n  }\n\n  public clear(): void {\n    this.routes = [];\n  }\n\n  public static getInstance(): RouteManager {\n    if (!RouteManager.instance) {\n      RouteManager.instance = new RouteManager(registry);\n    }\n    return RouteManager.instance;\n  }\n\n  private parseRoute(route: RouteConfig | NavRouteConfig) {\n    if (!route.subRoutes) {\n      return route;\n    }\n    const parent = route.slug;\n    route.subRoutes.forEach(subRoute => {\n      subRoute.slug = `${parent}.${subRoute.slug}`;\n      this.parseRoute(subRoute);\n    });\n  }\n}\n","import React from 'react';\nimport { RouteManager } from '../manager/manager';\nimport { RouteState, RouteConfig } from '../manager/types';\n\ntype RouteContext = {\n  isLoading: boolean;\n  isAvailable: boolean;\n  isBeta: boolean;\n  isNew: boolean;\n  isRestricted: boolean;\n  isHidden: boolean;\n  error: Error | string | null;\n  getUrl?: <T = undefined>(arg?: T) => string;\n  pathMatch?: string | RegExp;\n  label?: string;\n};\n\nfunction useRoute(routeSlug: string): RouteContext {\n  const ref = React.useRef(false);\n  const routeRef = React.useRef<RouteConfig>(null);\n\n  const [routeState, setRouteState] = React.useState<RouteState | null>(null);\n  const [error, setError] = React.useState<Error | string | null>(null);\n\n  React.useEffect(() => {\n    ref.current = true;\n    return () => {\n      ref.current = false;\n    };\n  }, []);\n\n  const getRoute = React.useCallback(async () => {\n    if (!ref.current) {\n      return;\n    }\n    const route = RouteManager.getInstance().getRoute(routeSlug);\n    if (!route) {\n      setError(`Route cannot be located with slug '${routeSlug}'`);\n      return;\n    }\n\n    routeRef.current = route;\n\n    try {\n      const state = await route.state();\n      setRouteState(state);\n    } catch (err) {\n      setError(err);\n    }\n  }, [routeSlug]);\n\n  React.useEffect(() => {\n    getRoute();\n  }, [getRoute]);\n\n  const value: RouteContext = {\n    isLoading: routeState === null && !error,\n    isAvailable: routeState === 'available' || routeState === 'beta' || routeState === 'new',\n    isBeta: routeState === 'beta',\n    isNew: routeState === 'new',\n    isHidden: routeState === 'hidden',\n    isRestricted: routeState === 'restricted',\n    error,\n  };\n\n  if (routeRef.current) {\n    value.getUrl = routeRef.current.getUrl;\n    value.label = routeRef.current.label;\n    value.pathMatch = routeRef.current.pathMatch;\n  }\n\n  return value;\n}\n\nexport { useRoute };\n","import './set-public-path';\nimport React from 'react';\nimport ReactDOMClient from 'react-dom/client';\nimport singleSpaReact from 'single-spa-react';\n\nconst lifecycles = singleSpaReact({\n  React,\n  ReactDOMClient,\n  rootComponent: () => null,\n  errorBoundary(err, info, props) {\n    // Customize the root error boundary for your microfrontend here.\n    return null;\n  },\n});\n\nexport const { bootstrap, mount, unmount } = lifecycles;\n\nexport { RouteManager } from './manager/manager';\nexport * from './manager/types';\nexport { useRoute } from './tools/useRoute';\n"],"names":["m","exports","createRoot","hydrateRoot","f","k","Symbol","for","l","Object","prototype","hasOwnProperty","n","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","ReactCurrentOwner","p","key","ref","__self","__source","q","c","a","g","b","d","e","h","call","defaultProps","$$typeof","type","props","_owner","current","Fragment","jsx","jsxs","module","resolveDirectory","rootDirLevel","meta","url","console","error","Error","urlString","rootDirectoryLevel","document","createElement","href","pathname","numDirsProcessed","index","length","finalPath","slice","protocol","host","systemjsModuleName","trim","isNaN","isInteger","moduleUrl","window","System","resolve","err","Number","val","isFinite","Math","floor","__WEBPACK_EXTERNAL_MODULE__425__","__WEBPACK_EXTERNAL_MODULE__936__","__WEBPACK_EXTERNAL_MODULE__726__","__WEBPACK_EXTERNAL_MODULE__867__","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","y","__system_context__","definition","o","defineProperty","enumerable","get","obj","prop","r","toStringTag","value","autoPublicPath","setPublicPath","t","keys","getOwnPropertySymbols","filter","getOwnPropertyDescriptor","push","apply","arguments","forEach","getOwnPropertyDescriptors","defineProperties","iterator","constructor","configurable","writable","domElement","domElementGetter","appName","name","concat","getElementById","id","body","appendChild","HTMLElement","require","createContext","Action","ResultType","u","React","ReactDOM","ReactDOMClient","rootComponent","loadRootComponent","errorBoundary","errorBoundaryClass","parcelCanUpdate","suppressComponentDidCatchWarning","domElements","renderResults","updateResolves","unmountResolves","s","Promise","then","version","indexOf","componentDidCatch","warn","childAppName","this","renderType","elementToRender","reactDom","render","unmount","unmountComponentAtNode","Provider","Component","state","caughtError","caughtErrorInfo","displayName","create","children","setState","SingleSpaRoot","mountFinished","updateFinished","unmountFinished","_classCallCheck","TypeError","_typeof","toPropertyKey","i","toPrimitive","String","_defineProperties","_createClass","_defineProperty","matchPath","pattern","path","caseSensitive","end","matcher","compiledParams","cond","message","warning","endsWith","replace","params","regexpSource","_","paramName","isOptional","RegExp","compilePath","match","matchedPathname","pathnameBase","captureGroups","reduce","memo","_ref","splatValue","Set","validMutationMethodsArr","validRequestMethodsArr","_arrayLikeToArray","Array","_unsupportedIterableToArray","toString","from","test","_toConsumableArray","isArray","asyncGeneratorStep","done","_next","_throw","Deferred","_this","promise","reject","AuthorisationCache","accessFetcher","accessChecker","entry","cache","access","pending","hasCapabilities","required","checkCapabilitiesExist","deferred","reason","_slicedToArray","next","getUserPackages","_x2","_getUserPackages","_asyncToGenerator","regeneratorRuntime","mark","_callee2","token","_yield$result$json","result","response","wrap","_context2","prev","fetch","headers","Authorization","sent","json","t1","t0","t2","package_code","abrupt","mapPackagesToModules","t3","stop","package_codes","packageCodeToModuleMap","PackageCodes","MarketStandard","Module","BasicPosMarket","Consumer","Cie","RetailInsights","PredictPlus","Newron","PredictForecast","Forecasting","RetailHitlistsStandard","SellerInsights","RetailSellerInsights","RetailMarketPremium","RetailKeyAccountData","DistributorPanelStandard","DistributorPanel","map","code","_isExternalUrlFn","_state","getAccessModules","_callee","_yield$Promise$all","_yield$Promise$all2","modules","products","packages","_context","all","authorisation","getAuthorisedModuleValues","getAuthorisedProductValues","_x","authentication","getAccessToken","authorisationState","has","every","includes","hasAccessTo","isAuthenticated","getEntry","getUser","userId","Icon","elements","order","label","slug","graphic","_jsx","icons","NewronConsumerIntelligence","title","hasAccess","getUrl","pathMatch","isExternalUrlFn","isEnabled","isFeatureFlagEnabled","featureName","domainName","isExternalUrl","restrictedTooltipContent","_jsxs","target","rel","onClick","useAnalytics","track","_setPrototypeOf","setPrototypeOf","bind","__proto__","tabs","getDpPath","_window$location$path","location","_wrapRegExp","tab","page","groups","accessModules","_getDpEnabledState","_callee9","_authentication$getUs","userPackages","_context9","Boolean","isInternalUser","_state8","_state7","_state6","_state5","_state4","_state3","_state2","distributionPanel","NewronSupplyChain","routePath","subRoutes","_callee3","_context3","_callee4","_context4","_callee5","_context5","_callee6","_context6","_callee7","_context7","_callee8","_context8","pageState","_localStorage$getItem","stateWithoutAccess","_args","localStorage","getItem","split","tag","createSubRoute","queryParams","hideFromNav","NewronGlobalSummary","QueryParams","isSTPUserWithoutAccess","_isSTPUserWithoutAccess","_authentication$getUs2","isSTPUser","NewronMarketIntelligence","Country","ItemGroup","Brand","PosDistributionProduct","TprInsights","Recommendations","globalSummary","_state10","_state9","getMIPath","miPos","findIndex","stateFunction","mi2","_callee10","_context10","_callee11","_context11","retailAccessModulesArray","marketAccessModulesArray","PosTest","BasicPosProduct","Pos","PosDistributionMarket","distributorPanelAccessModulesArray","NewronCollection","retailAccessCheck","hasRetailAccess","marketAccessCheck","hasMarketAccess","distributorPanelAccessCheck","hasDistributorPanelAccess","hasCieAccess","isRetailCollectionsEnabled","some","_ref2","Icons","isDataForgeEnabled","collections","TableEdit","NewronRecommendations","NewronPromotionPlanning","hasAccessToTprPlanning","hasAccessToNewronInsights","TprPlanning","NewronInsights","isPriceMonitorFeatureFlag","NewronForcasting","forecasting","retailerInsight","retailerHitlist","sellerInsights","t4","NewronRevenuePremium","BrandInsightPos","NewronPerformanceDrivers","entries","recommendations","promoPlanning","revenuePremium","performanceDrivers","NewronPredict","hasNewronInsightsAccess","hasRetailSellerInsightsAccess","stpUserWithoutAccess","_Fragment","generateSubRoutes","routeConfig","_objectSpread","generateProductSubRoutes","isRetailProductsPageAllowed","generateExploreSubRoutes","isExplorePageAllowed","displayRestrictedTooltipForRI","NewronRetailInsights","hasAccessRetailInsights","hasAccessRetailHitlistsStandard","hasAccessRetailMarketPremium","hasAccessRetailSellerInsights","hasAccessRetailKad","isRetailerOverviewPageAllowed","isOpportunityReviewPageAllowed","isTradingAssistantPageAllowed","_ref3","_ref4","hasAccessRetailKeyAccountData","_ref5","_callee12","_context12","_ref6","_callee13","_context13","registry","platform","market","predict","retail","consumer","distribution","RouteManager","routes","route","addRoute","parseRoute","filteredList","sort","slugParts","findInList","list","slugIndex","slugPath","join","candidates","pathToMatch","_step2","findMatchWithinRoute","doesRouteMatchPath","_step","matched","_iterator","_createForOfIteratorHelper","subRoute","matchedSubRoute","matchingRoute","_iterator2","_this2","parent","instance","useRoute","routeSlug","routeRef","_React$useState2","routeState","setRouteState","_React$useState4","setError","getRoute","getInstance","isLoading","isAvailable","isBeta","isNew","isHidden","isRestricted","lifecycles","componentDidMount","setTimeout","componentWillUnmount","bootstrap","mount","update","singleSpaReact","info"],"sourceRoot":""}