function isLocalURL(url) {
  // prevent a hydration mismatch on href for url with anchor refs
  if (url.startsWith('/') || url.startsWith('#') || url.startsWith('?')) return true;

  try {
    // absolute urls can be local if they are on the same origin
    var locationOrigin = (0, _utils.getLocationOrigin)();
    var resolved = new URL(url, locationOrigin);
    return resolved.origin === locationOrigin && hasBasePath(resolved.pathname);
  } catch (_) {
    return false;
  }
}
/**
* Detects whether a given url is routable by the Next.js router (browser only).
*/
Detects whether a given url is routable by the Next.js router (browser only).
Detects whether a given url is routable by the Next . js router ( browser only ) .
function isLocalURL(url) {
  if (url.startsWith('/') || url.startsWith('#') || url.startsWith('?')) return true;
  try {
    var locationOrigin = (0, _utils.getLocationOrigin)();
    var resolved = new URL(url, locationOrigin);
    return resolved.origin === locationOrigin && hasBasePath(resolved.pathname);
  } catch (_) {
    return false;
  }
}
function isLocalURL ( url ) { if ( url . startsWith ( '/' ) || url . startsWith ( '#' ) || url . startsWith ( '?' ) ) return true ; try { var locationOrigin = ( 0 , _utils . getLocationOrigin ) ( ) ; var resolved = new URL ( url , locationOrigin ) ; return resolved . origin === locationOrigin && hasBasePath ( resolved . pathname ) ; } catch ( _ ) { return false ; } }
Detects whether a given url is routable by the Next.js router (browser only).
Detects whether a given url is routable by the Next . js router ( browser only ) .
// prevent a hydration mismatch on href for url with anchor refs // absolute urls can be local if they are on the same origin