"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const _SetCache = require("./_SetCache2.cjs");
const _arrayIncludes = require("./_arrayIncludes2.cjs");
const _cacheHas = require("./_cacheHas2.cjs");
const _createSet = require("./_createSet2.cjs");
const _setToArray = require("./_setToArray2.cjs");
var LARGE_ARRAY_SIZE = 200;
function baseUniq(array, iteratee, comparator) {
  var index = -1, includes = _arrayIncludes.default, length = array.length, isCommon = true, result = [], seen = result;
  if (length >= LARGE_ARRAY_SIZE) {
    var set = _createSet.default(array);
    if (set) {
      return _setToArray.default(set);
    }
    isCommon = false;
    includes = _cacheHas.default;
    seen = new _SetCache.default();
  } else {
    seen = result;
  }
  outer:
    while (++index < length) {
      var value = array[index], computed = value;
      value = value !== 0 ? value : 0;
      if (isCommon && computed === computed) {
        var seenIndex = seen.length;
        while (seenIndex--) {
          if (seen[seenIndex] === computed) {
            continue outer;
          }
        }
        result.push(value);
      } else if (!includes(seen, computed, comparator)) {
        if (seen !== result) {
          seen.push(computed);
        }
        result.push(value);
      }
    }
  return result;
}
exports.default = baseUniq;
//# sourceMappingURL=_baseUniq2.cjs.map
