"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }


var _chunkDFJNOFN2cjs = require('./chunk-DFJNOFN2.cjs');

// src/utilities/file-path-utils.ts
_chunkDFJNOFN2cjs.init_cjs_shims.call(void 0, );
var _path = require('path');
var removeExtension = /* @__PURE__ */ _chunkDFJNOFN2cjs.__name.call(void 0, (filePath) => {
  const result = !filePath || (filePath.match(/./g) || []).length <= 1 ? "." : filePath.lastIndexOf(".") ? filePath.substring(0, filePath.lastIndexOf(".")) : filePath;
  if (result.startsWith("./")) {
    return result.substring(2);
  }
  if (result.startsWith(".") || result.startsWith("/")) {
    return result.substring(1);
  }
  return result;
}, "removeExtension");
function findFileName(filePath) {
  return _nullishCoalesce(_optionalChain([filePath, 'optionalAccess', _ => _.split, 'call', _2 => _2(_optionalChain([filePath, 'optionalAccess', _3 => _3.includes, 'call', _4 => _4(_path.sep)]) ? _path.sep : _optionalChain([filePath, 'optionalAccess', _5 => _5.includes, 'call', _6 => _6("/")]) ? "/" : "\\"), 'optionalAccess', _7 => _7.pop, 'call', _8 => _8()]), () => ( ""));
}
_chunkDFJNOFN2cjs.__name.call(void 0, findFileName, "findFileName");




exports.removeExtension = removeExtension; exports.findFileName = findFileName;
