import { __require as requireCallBound } from "../call-bound/index.js";
import { __require as requireIsRegex } from "../is-regex/index.js";
import { __require as requireType } from "../es-errors/type.js";
var safeRegexTest;
var hasRequiredSafeRegexTest;
function requireSafeRegexTest() {
  if (hasRequiredSafeRegexTest) return safeRegexTest;
  hasRequiredSafeRegexTest = 1;
  var callBound = requireCallBound();
  var isRegex = requireIsRegex();
  var $exec = callBound("RegExp.prototype.exec");
  var $TypeError = requireType();
  safeRegexTest = function regexTester(regex) {
    if (!isRegex(regex)) {
      throw new $TypeError("`regex` must be a RegExp");
    }
    return function test(s) {
      return $exec(regex, s) !== null;
    };
  };
  return safeRegexTest;
}
export {
  requireSafeRegexTest as __require
};
