import u from "./getPrototypeOf.js";
import i from "./setPrototypeOf.js";
import p from "./isNativeFunction.js";
import f from "./construct.js";
function o(n) {
  var e = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
  return o = function(t) {
    if (t === null || !p(t)) return t;
    if (typeof t != "function")
      throw new TypeError("Super expression must either be null or a function");
    if (typeof e < "u") {
      if (e.has(t)) return e.get(t);
      e.set(t, r);
    }
    function r() {
      return f(t, arguments, u(this).constructor);
    }
    return r.prototype = Object.create(t.prototype, {
      constructor: {
        value: r,
        enumerable: !1,
        writable: !0,
        configurable: !0
      }
    }), i(r, t);
  }, o(n);
}
export {
  o as default
};
