"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const index = require("../vscode-uri/lib-esm-index.cjs");
exports.UriUtils = void 0;
(function(UriUtils) {
  UriUtils.basename = index.Utils.basename;
  UriUtils.dirname = index.Utils.dirname;
  UriUtils.extname = index.Utils.extname;
  UriUtils.joinPath = index.Utils.joinPath;
  UriUtils.resolvePath = index.Utils.resolvePath;
  function equals(a, b) {
    return (a === null || a === void 0 ? void 0 : a.toString()) === (b === null || b === void 0 ? void 0 : b.toString());
  }
  UriUtils.equals = equals;
  function relative(from, to) {
    const fromPath = typeof from === "string" ? from : from.path;
    const toPath = typeof to === "string" ? to : to.path;
    const fromParts = fromPath.split("/").filter((e) => e.length > 0);
    const toParts = toPath.split("/").filter((e) => e.length > 0);
    let i = 0;
    for (; i < fromParts.length; i++) {
      if (fromParts[i] !== toParts[i]) {
        break;
      }
    }
    const backPart = "../".repeat(fromParts.length - i);
    const toPart = toParts.slice(i).join("/");
    return backPart + toPart;
  }
  UriUtils.relative = relative;
  function normalize(uri) {
    return index.URI.parse(uri.toString()).toString();
  }
  UriUtils.normalize = normalize;
})(exports.UriUtils || (exports.UriUtils = {}));
exports.URI = index.URI;
//# sourceMappingURL=lib-utils-uri-utils.cjs.map
