import o from "./_baseRest.js";
import p from "./eq.js";
import g from "./_isIterateeCall.js";
import w from "./keysIn.js";
var d = Object.prototype, O = d.hasOwnProperty, C = o(function(r, a) {
  r = Object(r);
  var n = -1, i = a.length, e = i > 2 ? a[2] : void 0;
  for (e && g(a[0], a[1], e) && (i = 1); ++n < i; )
    for (var f = a[n], v = w(f), l = -1, h = v.length; ++l < h; ) {
      var t = v[l], m = r[t];
      (m === void 0 || p(m, d[t]) && !O.call(r, t)) && (r[t] = f[t]);
    }
  return r;
});
export {
  C as default
};
