import _arrayIncludes_default from "./_arrayIncludes.js";
import _SetCache_default from "./_SetCache.js";
import _cacheHas_default from "./_cacheHas.js";
import _setToArray_default from "./_setToArray.js";
import _arrayIncludesWith_default from "./_arrayIncludesWith.js";
import _createSet_default from "./_createSet.js";
var LARGE_ARRAY_SIZE = 200;
function baseUniq(s, c, l) {
	var u = -1, d = _arrayIncludes_default, f = s.length, p = !0, m = [], h = m;
	if (l) p = !1, d = _arrayIncludesWith_default;
	else if (f >= LARGE_ARRAY_SIZE) {
		var g = c ? null : _createSet_default(s);
		if (g) return _setToArray_default(g);
		p = !1, d = _cacheHas_default, h = new _SetCache_default();
	} else h = c ? [] : m;
	outer: for (; ++u < f;) {
		var _ = s[u], v = c ? c(_) : _;
		if (_ = l || _ !== 0 ? _ : 0, p && v === v) {
			for (var y = h.length; y--;) if (h[y] === v) continue outer;
			c && h.push(v), m.push(_);
		} else d(h, v, l) || (h !== m && h.push(v), m.push(_));
	}
	return m;
}
var _baseUniq_default = baseUniq;
export { _baseUniq_default as default };
