"use strict";exports.__esModule=true;exports.removePathTrailingSlash=removePathTrailingSlash;exports.normalizeTrailingSlash=normalizeTrailingSlash;function removePathTrailingSlash(path){return path.endsWith('/')&&path!=='/'?path.slice(0,-1):path;}const normalizePathTrailingSlash=process.env.__NEXT_TRAILING_SLASH?path=>{if(/\.[^/]+\/?$/.test(path)){return removePathTrailingSlash(path);}else if(path.endsWith('/')){return path;}else{return path+'/';}}:removePathTrailingSlash;function normalizeTrailingSlash(url){const normalizedPath=url.pathname&&normalizePathTrailingSlash(url.pathname);return url.pathname===normalizedPath?url:Object.assign({},url,{pathname:normalizedPath});}
//# sourceMappingURL=normalize-trailing-slash.js.map