import isObject_default from "./isObject.js";
import isFunction_default from "./isFunction.js";
import _assignMergeValue_default from "./_assignMergeValue.js";
import _cloneBuffer_default from "./_cloneBuffer.js";
import _cloneTypedArray_default from "./_cloneTypedArray.js";
import _copyArray_default from "./_copyArray.js";
import _initCloneObject_default from "./_initCloneObject.js";
import isArguments_default from "./isArguments.js";
import isArray_default from "./isArray.js";
import isArrayLikeObject_default from "./isArrayLikeObject.js";
import isBuffer_default from "./isBuffer.js";
import isPlainObject_default from "./isPlainObject.js";
import isTypedArray_default from "./isTypedArray.js";
import _safeGet_default from "./_safeGet.js";
import toPlainObject_default from "./toPlainObject.js";
function baseMergeDeep(h, g, _, v, y, b, x) {
	var S = _safeGet_default(h, _), C = _safeGet_default(g, _), w = x.get(C);
	if (w) {
		_assignMergeValue_default(h, _, w);
		return;
	}
	var T = b ? b(S, C, _ + "", h, g, x) : void 0, E = T === void 0;
	if (E) {
		var D = isArray_default(C), O = !D && isBuffer_default(C), k = !D && !O && isTypedArray_default(C);
		T = C, D || O || k ? isArray_default(S) ? T = S : isArrayLikeObject_default(S) ? T = _copyArray_default(S) : O ? (E = !1, T = _cloneBuffer_default(C, !0)) : k ? (E = !1, T = _cloneTypedArray_default(C, !0)) : T = [] : isPlainObject_default(C) || isArguments_default(C) ? (T = S, isArguments_default(S) ? T = toPlainObject_default(S) : (!isObject_default(S) || isFunction_default(S)) && (T = _initCloneObject_default(C))) : E = !1;
	}
	E && (x.set(C, T), y(T, C, v, b, x), x.delete(C)), _assignMergeValue_default(h, _, T);
}
var _baseMergeDeep_default = baseMergeDeep;
export { _baseMergeDeep_default as default };
