import c from "./_SetCache.js";
import g from "./_arrayIncludes.js";
import u from "./_cacheHas.js";
import w from "./_createSet.js";
import R from "./_setToArray.js";
var S = 200;
function q(h, s, A) {
  var o = -1, l = g, m = h.length, t = !0, f = [], r = f;
  if (m >= S) {
    var p = s ? null : w(h);
    if (p)
      return R(p);
    t = !1, l = u, r = new c();
  } else
    r = s ? [] : f;
  r:
    for (; ++o < m; ) {
      var i = h[o], n = s ? s(i) : i;
      if (i = i !== 0 ? i : 0, t && n === n) {
        for (var e = r.length; e--; )
          if (r[e] === n)
            continue r;
        s && r.push(n), f.push(i);
      } else l(r, n, A) || (r !== f && r.push(n), f.push(i));
    }
  return f;
}
export {
  q as default
};
