import o from "./_cloneArrayBuffer.mjs";
import n from "./_cloneDataView.mjs";
import c from "./_cloneRegExp.mjs";
import g from "./_cloneSymbol.mjs";
import i from "./_cloneTypedArray.mjs";
var s = "[object Boolean]", u = "[object Date]", T = "[object Map]", b = "[object Number]", l = "[object RegExp]", m = "[object Set]", y = "[object String]", f = "[object Symbol]", p = "[object ArrayBuffer]", j = "[object DataView]", A = "[object Float32Array]", w = "[object Float64Array]", d = "[object Int8Array]", B = "[object Int16Array]", x = "[object Int32Array]", C = "[object Uint8Array]", S = "[object Uint8ClampedArray]", U = "[object Uint16Array]", v = "[object Uint32Array]";
function R(a, t, r) {
  var e = a.constructor;
  switch (t) {
    case p:
      return o(a);
    case s:
    case u:
      return new e(+a);
    case j:
      return n(a, r);
    case A:
    case w:
    case d:
    case B:
    case x:
    case C:
    case S:
    case U:
    case v:
      return i(a, r);
    case T:
      return new e();
    case b:
    case y:
      return new e(a);
    case l:
      return c(a);
    case m:
      return new e();
    case f:
      return g(a);
  }
}
export {
  R as default
};
