{"ast":null,"code":"\"use strict\";\n\nvar _regeneratorRuntime = require(\"@babel/runtime/regenerator\");\n\nvar _slicedToArray = require(\"@babel/runtime/helpers/slicedToArray\");\n\nvar _classCallCheck = require(\"@babel/runtime/helpers/classCallCheck\");\n\nvar _createClass = require(\"@babel/runtime/helpers/createClass\");\n\nvar __importDefault = this && this.__importDefault || function (mod) {\n  return mod && mod.__esModule ? mod : {\n    \"default\": mod\n  };\n};\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar url_1 = require(\"url\");\n\nvar mitt_1 = __importDefault(require(\"../mitt\"));\n\nvar utils_1 = require(\"../utils\");\n\nvar is_dynamic_1 = require(\"./utils/is-dynamic\");\n\nvar route_matcher_1 = require(\"./utils/route-matcher\");\n\nvar route_regex_1 = require(\"./utils/route-regex\");\n\nfunction addBasePath(path) {\n  // variable is always a string\n  var p = process.env.__NEXT_ROUTER_BASEPATH;\n  return path.indexOf(p) !== 0 ? p + path : path;\n}\n\nfunction toRoute(path) {\n  return path.replace(/\\/$/, '') || '/';\n}\n\nvar prepareRoute = function prepareRoute(path) {\n  return toRoute(!path || path === '/' ? '/index' : path);\n};\n\nfunction fetchNextData(pathname, query, isServerRender, cb) {\n  var attempts = isServerRender ? 3 : 1;\n\n  function getResponse() {\n    return fetch(utils_1.formatWithValidation({\n      // @ts-ignore __NEXT_DATA__\n      pathname: \"/_next/data/\".concat(__NEXT_DATA__.buildId).concat(pathname, \".json\"),\n      query: query\n    }), {\n      // Cookies are required to be present for Next.js' SSG \"Preview Mode\".\n      // Cookies may also be required for `getServerSideProps`.\n      //\n      // > `fetch` won’t send cookies, unless you set the credentials init\n      // > option.\n      // https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch\n      //\n      // > For maximum browser compatibility when it comes to sending &\n      // > receiving cookies, always supply the `credentials: 'same-origin'`\n      // > option instead of relying on the default.\n      // https://github.com/github/fetch#caveats\n      credentials: 'same-origin'\n    }).then(function (res) {\n      if (!res.ok) {\n        if (--attempts > 0 && res.status >= 500) {\n          return getResponse();\n        }\n\n        throw new Error(\"Failed to load static props\");\n      }\n\n      return res.json();\n    });\n  }\n\n  return getResponse().then(function (data) {\n    return cb ? cb(data) : data;\n  })[\"catch\"](function (err) {\n    // We should only trigger a server-side transition if this was caused\n    // on a client-side transition. Otherwise, we'd get into an infinite\n    // loop.\n    if (!isServerRender) {\n      ;\n      err.code = 'PAGE_LOAD_ERROR';\n    }\n\n    throw err;\n  });\n}\n\nvar Router = /*#__PURE__*/function () {\n  function Router(pathname, query, as, _ref) {\n    var _this = this;\n\n    var initialProps = _ref.initialProps,\n        pageLoader = _ref.pageLoader,\n        App = _ref.App,\n        wrapApp = _ref.wrapApp,\n        Component = _ref.Component,\n        err = _ref.err,\n        subscription = _ref.subscription,\n        isFallback = _ref.isFallback;\n\n    _classCallCheck(this, Router);\n\n    // Static Data Cache\n    this.sdc = {};\n\n    this.onPopState = function (e) {\n      if (!e.state) {\n        // We get state as undefined for two reasons.\n        //  1. With older safari (< 8) and older chrome (< 34)\n        //  2. When the URL changed with #\n        //\n        // In the both cases, we don't need to proceed and change the route.\n        // (as it's already changed)\n        // But we can simply replace the state with the new changes.\n        // Actually, for (1) we don't need to nothing. But it's hard to detect that event.\n        // So, doing the following for (1) does no harm.\n        var _pathname = _this.pathname,\n            _query = _this.query;\n\n        _this.changeState('replaceState', utils_1.formatWithValidation({\n          pathname: _pathname,\n          query: _query\n        }), utils_1.getURL());\n\n        return;\n      } // Make sure we don't re-render on initial load,\n      // can be caused by navigating back from an external site\n\n\n      if (e.state && _this.isSsr && e.state.as === _this.asPath && url_1.parse(e.state.url).pathname === _this.pathname) {\n        return;\n      } // If the downstream application returns falsy, return.\n      // They will then be responsible for handling the event.\n\n\n      if (_this._bps && !_this._bps(e.state)) {\n        return;\n      }\n\n      var _e$state = e.state,\n          url = _e$state.url,\n          as = _e$state.as,\n          options = _e$state.options;\n\n      if (false) {\n        if (typeof url === 'undefined' || typeof as === 'undefined') {\n          console.warn('`popstate` event triggered but `event.state` did not have `url` or `as` https://err.sh/zeit/next.js/popstate-state-empty');\n        }\n      }\n\n      _this.replace(url, as, options);\n    };\n\n    this._getStaticData = function (asPath) {\n      var pathname = prepareRoute(url_1.parse(asPath).pathname);\n      return true && _this.sdc[pathname] ? Promise.resolve(_this.sdc[pathname]) : fetchNextData(pathname, null, _this.isSsr, function (data) {\n        return _this.sdc[pathname] = data;\n      });\n    };\n\n    this._getServerData = function (asPath) {\n      var _url_1$parse = url_1.parse(asPath, true),\n          pathname = _url_1$parse.pathname,\n          query = _url_1$parse.query;\n\n      pathname = prepareRoute(pathname);\n      return fetchNextData(pathname, query, _this.isSsr);\n    }; // represents the current component key\n\n\n    this.route = toRoute(pathname); // set up the component cache (by route keys)\n\n    this.components = {}; // We should not keep the cache, if there's an error\n    // Otherwise, this cause issues when when going back and\n    // come again to the errored page.\n\n    if (pathname !== '/_error') {\n      this.components[this.route] = {\n        Component: Component,\n        props: initialProps,\n        err: err,\n        __N_SSG: initialProps && initialProps.__N_SSG,\n        __N_SSP: initialProps && initialProps.__N_SSP\n      };\n    }\n\n    this.components['/_app'] = {\n      Component: App\n    }; // Backwards compat for Router.router.events\n    // TODO: Should be remove the following major version as it was never documented\n\n    this.events = Router.events;\n    this.pageLoader = pageLoader;\n    this.pathname = pathname;\n    this.query = query; // if auto prerendered and dynamic route wait to update asPath\n    // until after mount to prevent hydration mismatch\n\n    this.asPath = // @ts-ignore this is temporarily global (attached to window)\n    is_dynamic_1.isDynamicRoute(pathname) && __NEXT_DATA__.autoExport ? pathname : as;\n    this.sub = subscription;\n    this.clc = null;\n    this._wrapApp = wrapApp; // make sure to ignore extra popState in safari on navigating\n    // back from external site\n\n    this.isSsr = true;\n    this.isFallback = isFallback;\n\n    if (true) {\n      // in order for `e.state` to work on the `onpopstate` event\n      // we have to register the initial route upon initialization\n      this.changeState('replaceState', utils_1.formatWithValidation({\n        pathname: pathname,\n        query: query\n      }), as);\n      window.addEventListener('popstate', this.onPopState);\n    }\n  } // @deprecated backwards compatibility even though it's a private method.\n\n\n  _createClass(Router, [{\n    key: \"update\",\n    value: function update(route, mod) {\n      var Component = mod[\"default\"] || mod;\n      var data = this.components[route];\n\n      if (!data) {\n        throw new Error(\"Cannot update unavailable route: \".concat(route));\n      }\n\n      var newData = Object.assign(Object.assign({}, data), {\n        Component: Component,\n        __N_SSG: mod.__N_SSG,\n        __N_SSP: mod.__N_SSP\n      });\n      this.components[route] = newData; // pages/_app.js updated\n\n      if (route === '/_app') {\n        this.notify(this.components[this.route]);\n        return;\n      }\n\n      if (route === this.route) {\n        this.notify(newData);\n      }\n    }\n  }, {\n    key: \"reload\",\n    value: function reload() {\n      window.location.reload();\n    }\n    /**\n     * Go back in history\n     */\n\n  }, {\n    key: \"back\",\n    value: function back() {\n      window.history.back();\n    }\n    /**\n     * Performs a `pushState` with arguments\n     * @param url of the route\n     * @param as masks `url` for the browser\n     * @param options object you can define `shallow` and other options\n     */\n\n  }, {\n    key: \"push\",\n    value: function push(url) {\n      var as = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : url;\n      var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n      return this.change('pushState', url, as, options);\n    }\n    /**\n     * Performs a `replaceState` with arguments\n     * @param url of the route\n     * @param as masks `url` for the browser\n     * @param options object you can define `shallow` and other options\n     */\n\n  }, {\n    key: \"replace\",\n    value: function replace(url) {\n      var as = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : url;\n      var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n      return this.change('replaceState', url, as, options);\n    }\n  }, {\n    key: \"change\",\n    value: function change(method, _url, _as, options) {\n      var _this2 = this;\n\n      return new Promise(function (resolve, reject) {\n        if (!options._h) {\n          _this2.isSsr = false;\n        } // marking route changes as a navigation start entry\n\n\n        if (utils_1.ST) {\n          performance.mark('routeChange');\n        } // If url and as provided as an object representation,\n        // we'll format them into the string version here.\n\n\n        var url = typeof _url === 'object' ? utils_1.formatWithValidation(_url) : _url;\n        var as = typeof _as === 'object' ? utils_1.formatWithValidation(_as) : _as; // Add the ending slash to the paths. So, we can serve the\n        // \"<page>/index.html\" directly for the SSR page.\n\n        if (process.env.__NEXT_EXPORT_TRAILING_SLASH) {\n          var rewriteUrlForNextExport = require('./rewrite-url-for-export').rewriteUrlForNextExport; // @ts-ignore this is temporarily global (attached to window)\n\n\n          if (__NEXT_DATA__.nextExport) {\n            as = rewriteUrlForNextExport(as);\n          }\n        }\n\n        _this2.abortComponentLoad(as); // If the url change is only related to a hash change\n        // We should not proceed. We should only change the state.\n        // WARNING: `_h` is an internal option for handing Next.js client-side\n        // hydration. Your app should _never_ use this property. It may change at\n        // any time without notice.\n\n\n        if (!options._h && _this2.onlyAHashChange(as)) {\n          _this2.asPath = as;\n          Router.events.emit('hashChangeStart', as);\n\n          _this2.changeState(method, url, addBasePath(as), options);\n\n          _this2.scrollToHash(as);\n\n          Router.events.emit('hashChangeComplete', as);\n          return resolve(true);\n        }\n\n        var _url_1$parse2 = url_1.parse(url, true),\n            pathname = _url_1$parse2.pathname,\n            query = _url_1$parse2.query,\n            protocol = _url_1$parse2.protocol;\n\n        if (!pathname || protocol) {\n          if (false) {\n            throw new Error(\"Invalid href passed to router: \".concat(url, \" https://err.sh/zeit/next.js/invalid-href-passed\"));\n          }\n\n          return resolve(false);\n        } // If asked to change the current URL we should reload the current page\n        // (not location.reload() but reload getInitialProps and other Next.js stuffs)\n        // We also need to set the method = replaceState always\n        // as this should not go into the history (That's how browsers work)\n        // We should compare the new asPath to the current asPath, not the url\n\n\n        if (!_this2.urlIsNew(as)) {\n          method = 'replaceState';\n        }\n\n        var route = toRoute(pathname);\n        var _options$shallow = options.shallow,\n            shallow = _options$shallow === void 0 ? false : _options$shallow;\n\n        if (is_dynamic_1.isDynamicRoute(route)) {\n          var _url_1$parse3 = url_1.parse(as),\n              asPathname = _url_1$parse3.pathname;\n\n          var routeRegex = route_regex_1.getRouteRegex(route);\n          var routeMatch = route_matcher_1.getRouteMatcher(routeRegex)(asPathname);\n\n          if (!routeMatch) {\n            var missingParams = Object.keys(routeRegex.groups).filter(function (param) {\n              return !query[param];\n            });\n\n            if (missingParams.length > 0) {\n              if (false) {\n                console.warn(\"Mismatching `as` and `href` failed to manually provide \" + \"the params: \".concat(missingParams.join(', '), \" in the `href`'s `query`\"));\n              }\n\n              return reject(new Error(\"The provided `as` value (\".concat(asPathname, \") is incompatible with the `href` value (\").concat(route, \"). \") + \"Read more: https://err.sh/zeit/next.js/incompatible-href-as\"));\n            }\n          } else {\n            // Merge params into `query`, overwriting any specified in search\n            Object.assign(query, routeMatch);\n          }\n        }\n\n        Router.events.emit('routeChangeStart', as); // If shallow is true and the route exists in the router cache we reuse the previous result\n\n        _this2.getRouteInfo(route, pathname, query, as, shallow).then(function (routeInfo) {\n          var error = routeInfo.error;\n\n          if (error && error.cancelled) {\n            return resolve(false);\n          }\n\n          Router.events.emit('beforeHistoryChange', as);\n\n          _this2.changeState(method, url, addBasePath(as), options);\n\n          if (false) {\n            var appComp = _this2.components['/_app'].Component;\n            window.next.isPrerendered = appComp.getInitialProps === appComp.origGetInitialProps && !routeInfo.Component.getInitialProps;\n          }\n\n          _this2.set(route, pathname, query, as, routeInfo);\n\n          if (error) {\n            Router.events.emit('routeChangeError', error, as);\n            throw error;\n          }\n\n          Router.events.emit('routeChangeComplete', as);\n          return resolve(true);\n        }, reject);\n      });\n    }\n  }, {\n    key: \"changeState\",\n    value: function changeState(method, url, as) {\n      var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n\n      if (false) {\n        if (typeof window.history === 'undefined') {\n          console.error(\"Warning: window.history is not available.\");\n          return;\n        }\n\n        if (typeof window.history[method] === 'undefined') {\n          console.error(\"Warning: window.history.\".concat(method, \" is not available\"));\n          return;\n        }\n      }\n\n      if (method !== 'pushState' || utils_1.getURL() !== as) {\n        window.history[method]({\n          url: url,\n          as: as,\n          options: options\n        }, // Most browsers currently ignores this parameter, although they may use it in the future.\n        // Passing the empty string here should be safe against future changes to the method.\n        // https://developer.mozilla.org/en-US/docs/Web/API/History/replaceState\n        '', as);\n      }\n    }\n  }, {\n    key: \"getRouteInfo\",\n    value: function getRouteInfo(route, pathname, query, as) {\n      var _this3 = this;\n\n      var shallow = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;\n      var cachedRouteInfo = this.components[route]; // If there is a shallow route transition possible\n      // If the route is already rendered on the screen.\n\n      if (shallow && cachedRouteInfo && this.route === route) {\n        return Promise.resolve(cachedRouteInfo);\n      }\n\n      var handleError = function handleError(err, loadErrorFail) {\n        return new Promise(function (resolve) {\n          if (err.code === 'PAGE_LOAD_ERROR' || loadErrorFail) {\n            // If we can't load the page it could be one of following reasons\n            //  1. Page doesn't exists\n            //  2. Page does exist in a different zone\n            //  3. Internal error while loading the page\n            // So, doing a hard reload is the proper way to deal with this.\n            window.location.href = as; // Changing the URL doesn't block executing the current code path.\n            // So, we need to mark it as a cancelled error and stop the routing logic.\n\n            err.cancelled = true; // @ts-ignore TODO: fix the control flow here\n\n            return resolve({\n              error: err\n            });\n          }\n\n          if (err.cancelled) {\n            // @ts-ignore TODO: fix the control flow here\n            return resolve({\n              error: err\n            });\n          }\n\n          resolve(_this3.fetchComponent('/_error').then(function (res) {\n            var Component = res.page;\n            var routeInfo = {\n              Component: Component,\n              err: err\n            };\n            return new Promise(function (resolve) {\n              _this3.getInitialProps(Component, {\n                err: err,\n                pathname: pathname,\n                query: query\n              }).then(function (props) {\n                routeInfo.props = props;\n                routeInfo.error = err;\n                resolve(routeInfo);\n              }, function (gipErr) {\n                console.error('Error in error page `getInitialProps`: ', gipErr);\n                routeInfo.error = err;\n                routeInfo.props = {};\n                resolve(routeInfo);\n              });\n            });\n          })[\"catch\"](function (err) {\n            return handleError(err, true);\n          }));\n        });\n      };\n\n      return new Promise(function (resolve, reject) {\n        if (cachedRouteInfo) {\n          return resolve(cachedRouteInfo);\n        }\n\n        _this3.fetchComponent(route).then(function (res) {\n          return resolve({\n            Component: res.page,\n            __N_SSG: res.mod.__N_SSG,\n            __N_SSP: res.mod.__N_SSP\n          });\n        }, reject);\n      }).then(function (routeInfo) {\n        var Component = routeInfo.Component,\n            __N_SSG = routeInfo.__N_SSG,\n            __N_SSP = routeInfo.__N_SSP;\n\n        if (false) {\n          var _require = require('react-is'),\n              isValidElementType = _require.isValidElementType;\n\n          if (!isValidElementType(Component)) {\n            throw new Error(\"The default export is not a React Component in page: \\\"\".concat(pathname, \"\\\"\"));\n          }\n        }\n\n        return _this3._getData(function () {\n          return __N_SSG ? _this3._getStaticData(as) : __N_SSP ? _this3._getServerData(as) : _this3.getInitialProps(Component, // we provide AppTree later so this needs to be `any`\n          {\n            pathname: pathname,\n            query: query,\n            asPath: as\n          });\n        }).then(function (props) {\n          routeInfo.props = props;\n          _this3.components[route] = routeInfo;\n          return routeInfo;\n        });\n      })[\"catch\"](handleError);\n    }\n  }, {\n    key: \"set\",\n    value: function set(route, pathname, query, as, data) {\n      this.isFallback = false;\n      this.route = route;\n      this.pathname = pathname;\n      this.query = query;\n      this.asPath = as;\n      this.notify(data);\n    }\n    /**\n     * Callback to execute before replacing router state\n     * @param cb callback to be executed\n     */\n\n  }, {\n    key: \"beforePopState\",\n    value: function beforePopState(cb) {\n      this._bps = cb;\n    }\n  }, {\n    key: \"onlyAHashChange\",\n    value: function onlyAHashChange(as) {\n      if (!this.asPath) return false;\n\n      var _this$asPath$split = this.asPath.split('#'),\n          _this$asPath$split2 = _slicedToArray(_this$asPath$split, 2),\n          oldUrlNoHash = _this$asPath$split2[0],\n          oldHash = _this$asPath$split2[1];\n\n      var _as$split = as.split('#'),\n          _as$split2 = _slicedToArray(_as$split, 2),\n          newUrlNoHash = _as$split2[0],\n          newHash = _as$split2[1]; // Makes sure we scroll to the provided hash if the url/hash are the same\n\n\n      if (newHash && oldUrlNoHash === newUrlNoHash && oldHash === newHash) {\n        return true;\n      } // If the urls are change, there's more than a hash change\n\n\n      if (oldUrlNoHash !== newUrlNoHash) {\n        return false;\n      } // If the hash has changed, then it's a hash only change.\n      // This check is necessary to handle both the enter and\n      // leave hash === '' cases. The identity case falls through\n      // and is treated as a next reload.\n\n\n      return oldHash !== newHash;\n    }\n  }, {\n    key: \"scrollToHash\",\n    value: function scrollToHash(as) {\n      var _as$split3 = as.split('#'),\n          _as$split4 = _slicedToArray(_as$split3, 2),\n          hash = _as$split4[1]; // Scroll to top if the hash is just `#` with no value\n\n\n      if (hash === '') {\n        window.scrollTo(0, 0);\n        return;\n      } // First we check if the element by id is found\n\n\n      var idEl = document.getElementById(hash);\n\n      if (idEl) {\n        idEl.scrollIntoView();\n        return;\n      } // If there's no element with the id, we check the `name` property\n      // To mirror browsers\n\n\n      var nameEl = document.getElementsByName(hash)[0];\n\n      if (nameEl) {\n        nameEl.scrollIntoView();\n      }\n    }\n  }, {\n    key: \"urlIsNew\",\n    value: function urlIsNew(asPath) {\n      return this.asPath !== asPath;\n    }\n    /**\n     * Prefetch page code, you may wait for the data during page rendering.\n     * This feature only works in production!\n     * @param url the href of prefetched page\n     * @param asPath the as path of the prefetched page\n     */\n\n  }, {\n    key: \"prefetch\",\n    value: function prefetch(url) {\n      var _this4 = this;\n\n      var asPath = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : url;\n      var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n      return new Promise(function (resolve, reject) {\n        var _url_1$parse4 = url_1.parse(url),\n            pathname = _url_1$parse4.pathname,\n            protocol = _url_1$parse4.protocol;\n\n        if (!pathname || protocol) {\n          if (false) {\n            throw new Error(\"Invalid href passed to router: \".concat(url, \" https://err.sh/zeit/next.js/invalid-href-passed\"));\n          }\n\n          return;\n        } // Prefetch is not supported in development mode because it would trigger on-demand-entries\n\n\n        if (false) {\n          return;\n        }\n\n        Promise.all([_this4.pageLoader.prefetchData(url, asPath), _this4.pageLoader[options.priority ? 'loadPage' : 'prefetch'](toRoute(pathname))]).then(function () {\n          return resolve();\n        }, reject);\n      });\n    }\n  }, {\n    key: \"fetchComponent\",\n    value: function fetchComponent(route) {\n      var cancelled, cancel, componentResult, error;\n      return _regeneratorRuntime.async(function fetchComponent$(_context) {\n        while (1) {\n          switch (_context.prev = _context.next) {\n            case 0:\n              cancelled = false;\n\n              cancel = this.clc = function () {\n                cancelled = true;\n              };\n\n              _context.next = 4;\n              return _regeneratorRuntime.awrap(this.pageLoader.loadPage(route));\n\n            case 4:\n              componentResult = _context.sent;\n\n              if (!cancelled) {\n                _context.next = 9;\n                break;\n              }\n\n              error = new Error(\"Abort fetching component for route: \\\"\".concat(route, \"\\\"\"));\n              error.cancelled = true;\n              throw error;\n\n            case 9:\n              if (cancel === this.clc) {\n                this.clc = null;\n              }\n\n              return _context.abrupt(\"return\", componentResult);\n\n            case 11:\n            case \"end\":\n              return _context.stop();\n          }\n        }\n      }, null, this, null, Promise);\n    }\n  }, {\n    key: \"_getData\",\n    value: function _getData(fn) {\n      var _this5 = this;\n\n      var cancelled = false;\n\n      var cancel = function cancel() {\n        cancelled = true;\n      };\n\n      this.clc = cancel;\n      return fn().then(function (data) {\n        if (cancel === _this5.clc) {\n          _this5.clc = null;\n        }\n\n        if (cancelled) {\n          var err = new Error('Loading initial props cancelled');\n          err.cancelled = true;\n          throw err;\n        }\n\n        return data;\n      });\n    }\n  }, {\n    key: \"getInitialProps\",\n    value: function getInitialProps(Component, ctx) {\n      var App = this.components['/_app'].Component;\n\n      var AppTree = this._wrapApp(App);\n\n      ctx.AppTree = AppTree;\n      return utils_1.loadGetInitialProps(App, {\n        AppTree: AppTree,\n        Component: Component,\n        router: this,\n        ctx: ctx\n      });\n    }\n  }, {\n    key: \"abortComponentLoad\",\n    value: function abortComponentLoad(as) {\n      if (this.clc) {\n        var e = new Error('Route Cancelled');\n        e.cancelled = true;\n        Router.events.emit('routeChangeError', e, as);\n        this.clc();\n        this.clc = null;\n      }\n    }\n  }, {\n    key: \"notify\",\n    value: function notify(data) {\n      this.sub(data, this.components['/_app'].Component);\n    }\n  }], [{\n    key: \"_rewriteUrlForNextExport\",\n    value: function _rewriteUrlForNextExport(url) {\n      if (process.env.__NEXT_EXPORT_TRAILING_SLASH) {\n        var rewriteUrlForNextExport = require('./rewrite-url-for-export').rewriteUrlForNextExport;\n\n        return rewriteUrlForNextExport(url);\n      } else {\n        return url;\n      }\n    }\n  }]);\n\n  return Router;\n}();\n\nexports[\"default\"] = Router;\nRouter.events = mitt_1[\"default\"]();","map":null,"metadata":{},"sourceType":"script"}