import { __require as requireGetIntrinsic } from "../../get-intrinsic/index.js";
import { __require as requireCallBound } from "../../call-bound/index.js";
import { __require as requireType } from "../../es-errors/type.js";
import { __require as requireIsArray } from "./IsArray.js";
var Call;
var hasRequiredCall;
function requireCall() {
  if (hasRequiredCall) return Call;
  hasRequiredCall = 1;
  var GetIntrinsic = requireGetIntrinsic();
  var callBound = requireCallBound();
  var $TypeError = requireType();
  var IsArray = requireIsArray();
  var $apply = GetIntrinsic("%Reflect.apply%", true) || callBound("Function.prototype.apply");
  Call = function Call2(F, V) {
    var argumentsList = arguments.length > 2 ? arguments[2] : [];
    if (!IsArray(argumentsList)) {
      throw new $TypeError("Assertion failed: optional `argumentsList`, if provided, must be a List");
    }
    return $apply(F, V, argumentsList);
  };
  return Call;
}
export {
  requireCall as __require
};
