import c from "../../../../escape-string-regexp@5.0.0/node_modules/escape-string-regexp/index.js";
import p from "./replacements.js";
const m = (e, o) => {
  for (const [a, t] of o)
    e = e.replace(new RegExp(c(a), "g"), t);
  return e;
};
function n(e, o) {
  if (typeof e != "string")
    throw new TypeError(`Expected a string, got \`${typeof e}\``);
  o = {
    customReplacements: [],
    ...o
  };
  const a = new Map([
    ...p,
    ...o.customReplacements
  ]);
  return e = e.normalize(), e = m(e, a), e = e.normalize("NFD").replace(new RegExp("\\p{Diacritic}", "gu"), "").normalize(), e;
}
export {
  n as default
};
