import d from "./_assignMergeValue.js";
import V from "./_cloneBuffer.js";
import j from "./_cloneTypedArray.js";
import y from "./_copyArray.js";
import c from "./_initCloneObject.js";
import g from "./isArguments.js";
import O from "./isArray.js";
import C from "./isArrayLikeObject.js";
import M from "./isBuffer.js";
import P from "./isFunction.js";
import w from "./isObject.js";
import x from "./isPlainObject.js";
import D from "./isTypedArray.js";
import b from "./_safeGet.js";
import F from "./toPlainObject.js";
function U(t, p, o, v, A, l, f) {
  var i = b(t, o), e = b(p, o), s = f.get(e);
  if (s) {
    d(t, o, s);
    return;
  }
  var r = l ? l(i, e, o + "", t, p, f) : void 0, m = r === void 0;
  if (m) {
    var a = O(e), n = !a && M(e), u = !a && !n && D(e);
    r = e, a || n || u ? O(i) ? r = i : C(i) ? r = y(i) : n ? (m = !1, r = V(e, !0)) : u ? (m = !1, r = j(e, !0)) : r = [] : x(e) || g(e) ? (r = i, g(i) ? r = F(i) : (!w(i) || P(i)) && (r = c(e))) : m = !1;
  }
  m && (f.set(e, r), A(r, e, v, l, f), f.delete(e)), d(t, o, r);
}
export {
  U as default
};
