import { S as M, b as m, k as y, i as l, M as E, a as S, c as x, d as L, e as p, s as w, f as N, g as T } from "./watch.BCJD77bD.js";
import { a as F } from "./isObjectLike.z36Fu426.js";
import { i as R } from "./isSymbol.L0C2ND_U.js";
import { t as D } from "./toString.CL_lYXbK.js";
var G = 1, $ = 2;
function z(n, r, e, t) {
  var i = e.length, f = i;
  if (n == null)
    return !f;
  for (n = Object(n); i--; ) {
    var u = e[i];
    if (u[2] ? u[1] !== n[u[0]] : !(u[0] in n))
      return !1;
  }
  for (; ++i < f; ) {
    u = e[i];
    var a = u[0], s = n[a], c = u[1];
    if (u[2]) {
      if (s === void 0 && !(a in n))
        return !1;
    } else {
      var h = new M(), o;
      if (!(o === void 0 ? m(c, s, G | $, t, h) : o))
        return !1;
    }
  }
  return !0;
}
function P(n) {
  return n === n && !F(n);
}
function U(n) {
  for (var r = y(n), e = r.length; e--; ) {
    var t = r[e], i = n[t];
    r[e] = [t, i, P(i)];
  }
  return r;
}
function C(n, r) {
  return function(e) {
    return e == null ? !1 : e[n] === r && (r !== void 0 || n in Object(e));
  };
}
function Z(n) {
  var r = U(n);
  return r.length == 1 && r[0][2] ? C(r[0][0], r[0][1]) : function(e) {
    return e === n || z(e, n, r);
  };
}
var q = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, v = /^\w*$/;
function d(n, r) {
  if (l(n))
    return !1;
  var e = typeof n;
  return e == "number" || e == "symbol" || e == "boolean" || n == null || R(n) ? !0 : v.test(n) || !q.test(n) || r != null && n in Object(r);
}
var H = "Expected a function";
function A(n, r) {
  if (typeof n != "function" || r != null && typeof r != "function")
    throw new TypeError(H);
  var e = function() {
    var t = arguments, i = r ? r.apply(this, t) : t[0], f = e.cache;
    if (f.has(i))
      return f.get(i);
    var u = n.apply(this, t);
    return e.cache = f.set(i, u) || f, u;
  };
  return e.cache = new (A.Cache || E)(), e;
}
A.Cache = E;
var K = 500;
function X(n) {
  var r = A(n, function(t) {
    return e.size === K && e.clear(), t;
  }), e = r.cache;
  return r;
}
var Y = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, b = /\\(\\)?/g, k = X(function(n) {
  var r = [];
  return n.charCodeAt(0) === 46 && r.push(""), n.replace(Y, function(e, t, i, f) {
    r.push(i ? f.replace(b, "$1") : t || e);
  }), r;
});
function O(n, r) {
  return l(n) ? n : d(n, r) ? [n] : k(D(n));
}
function g(n) {
  if (typeof n == "string" || R(n))
    return n;
  var r = n + "";
  return r == "0" && 1 / n == -1 / 0 ? "-0" : r;
}
function _(n, r) {
  r = O(r, n);
  for (var e = 0, t = r.length; n != null && e < t; )
    n = n[g(r[e++])];
  return e && e == t ? n : void 0;
}
function B(n, r, e) {
  var t = n == null ? void 0 : _(n, r);
  return t === void 0 ? e : t;
}
function J(n, r) {
  return n != null && r in Object(n);
}
function Q(n, r, e) {
  r = O(r, n);
  for (var t = -1, i = r.length, f = !1; ++t < i; ) {
    var u = g(r[t]);
    if (!(f = n != null && e(n, u)))
      break;
    n = n[u];
  }
  return f || ++t != i ? f : (i = n == null ? 0 : n.length, !!i && S(i) && x(u, i) && (l(n) || L(n)));
}
function W(n, r) {
  return n != null && Q(n, r, J);
}
var V = 1, j = 2;
function nn(n, r) {
  return d(n) && P(r) ? C(g(n), r) : function(e) {
    var t = B(e, n);
    return t === void 0 && t === r ? W(e, n) : m(r, t, V | j);
  };
}
function rn(n) {
  return n;
}
function en(n) {
  return function(r) {
    return r?.[n];
  };
}
function tn(n) {
  return function(r) {
    return _(r, n);
  };
}
function fn(n) {
  return d(n) ? en(g(n)) : tn(n);
}
function En(n) {
  return typeof n == "function" ? n : n == null ? rn : typeof n == "object" ? l(n) ? nn(n[0], n[1]) : Z(n) : fn(n);
}
function un(n, r, e, t) {
  for (var i = n.length, f = e + -1; ++f < i; )
    if (r(n[f], f, n))
      return f;
  return -1;
}
function sn(n) {
  return n !== n;
}
function an(n, r, e) {
  for (var t = e - 1, i = n.length; ++t < i; )
    if (n[t] === r)
      return t;
  return -1;
}
function hn(n, r, e) {
  return r === r ? an(n, r, e) : un(n, sn, e);
}
function on(n, r) {
  var e = n == null ? 0 : n.length;
  return !!e && hn(n, r, 0) > -1;
}
function cn() {
}
var ln = 1 / 0, gn = p && 1 / w(new p([, -0]))[1] == ln ? function(n) {
  return new p(n);
} : cn, pn = 200;
function wn(n, r, e) {
  var t = -1, i = on, f = n.length, u = !0, a = [], s = a;
  if (f >= pn) {
    var c = r ? null : gn(n);
    if (c)
      return w(c);
    u = !1, i = T, s = new N();
  } else
    s = r ? [] : a;
  n:
    for (; ++t < f; ) {
      var h = n[t], o = r ? r(h) : h;
      if (h = h !== 0 ? h : 0, u && o === o) {
        for (var I = s.length; I--; )
          if (s[I] === o)
            continue n;
        r && s.push(o), a.push(h);
      } else i(s, o, e) || (s !== a && s.push(o), a.push(h));
    }
  return a;
}
export {
  En as a,
  wn as b,
  on as c,
  _ as d,
  O as e,
  W as h,
  rn as i,
  g as t
};
