function prependForwardSlash(path) { return path[0] === "/" ? path : "/" + path; } function removeTrailingForwardSlash(path) { return path.endsWith("/") ? path.slice(0, path.length - 1) : path; } function isRemotePath(src) { return /^(?:http|ftp|https|ws):?\/\//.test(src) || src.startsWith("data:"); } function removeBase(path, base) { if (path.startsWith(base)) { return path.slice(removeTrailingForwardSlash(base).length); } return path; } const VALID_INPUT_FORMATS = [ "jpeg", "jpg", "png", "tiff", "webp", "gif", "svg", "avif" ]; const DEFAULT_HASH_PROPS = [ "src", "width", "height", "format", "quality", "fit", "position" ]; export { DEFAULT_HASH_PROPS as D, VALID_INPUT_FORMATS as V, isRemotePath as i, prependForwardSlash as p, removeBase as r };