import { b, L as c, Y as m, O as d, t as $, U as y, y as j, A as g, M as A, $ as I, X as x } from "./_baseUniq-SAfYgIkf-buEvGj9H.js";
import { y as L, H as h, o as _, t as k, E as C, a2 as U, I as l, $ as X, C as Y, z as q } from "./index-CMZig9xg.js";
var w = /\s/;
function z(r) {
  for (var t = r.length; t-- && w.test(r.charAt(t)); )
    ;
  return t;
}
var H = /^\s+/;
function M(r) {
  return r && r.slice(0, z(r) + 1).replace(H, "");
}
var p = NaN, N = /^[-+]0x[0-9a-f]+$/i, P = /^0b[01]+$/i, R = /^0o[0-7]+$/i, V = parseInt;
function D(r) {
  if (typeof r == "number")
    return r;
  if (y(r))
    return p;
  if (l(r)) {
    var t = typeof r.valueOf == "function" ? r.valueOf() : r;
    r = l(t) ? t + "" : t;
  }
  if (typeof r != "string")
    return r === 0 ? r : +r;
  r = M(r);
  var a = P.test(r);
  return a || R.test(r) ? V(r.slice(2), a ? 2 : 8) : N.test(r) ? p : +r;
}
var E = 1 / 0, G = 17976931348623157e292;
function J(r) {
  if (!r)
    return r === 0 ? r : 0;
  if (r = D(r), r === E || r === -1 / 0) {
    var t = r < 0 ? -1 : 1;
    return t * G;
  }
  return r === r ? r : 0;
}
function K(r) {
  var t = J(r), a = t % 1;
  return t === t ? a ? t - a : t : 0;
}
function ur(r) {
  var t = r == null ? 0 : r.length;
  return t ? d(r) : [];
}
var O = Object.prototype, Q = O.hasOwnProperty, ir = _(function(r, t) {
  r = Object(r);
  var a = -1, o = t.length, e = o > 2 ? t[2] : void 0;
  for (e && k(t[0], t[1], e) && (o = 1); ++a < o; )
    for (var i = t[a], n = C(i), u = -1, f = n.length; ++u < f; ) {
      var v = n[u], s = r[v];
      (s === void 0 || U(s, O[v]) && !Q.call(r, v)) && (r[v] = i[v]);
    }
  return r;
});
function fr(r) {
  var t = r == null ? 0 : r.length;
  return t ? r[t - 1] : void 0;
}
function T(r) {
  return function(t, a, o) {
    var e = Object(t);
    if (!h(t)) {
      var i = c(a);
      t = I(t), a = function(u) {
        return i(e[u], u, e);
      };
    }
    var n = r(t, a, o);
    return n > -1 ? e[i ? t[n] : n] : void 0;
  };
}
var W = Math.max;
function Z(r, t, a) {
  var o = r == null ? 0 : r.length;
  if (!o)
    return -1;
  var e = a == null ? 0 : K(a);
  return e < 0 && (e = W(o + e, 0)), x(r, c(t), e);
}
var vr = T(Z);
function B(r, t) {
  var a = -1, o = h(r) ? Array(r.length) : [];
  return m(r, function(e, i, n) {
    o[++a] = t(e, i, n);
  }), o;
}
function sr(r, t) {
  var a = L(r) ? b : B;
  return a(r, c(t));
}
var F = Object.prototype, S = F.hasOwnProperty;
function rr(r, t) {
  return r != null && S.call(r, t);
}
function lr(r, t) {
  return r != null && $(r, t, rr);
}
function tr(r, t) {
  return r < t;
}
function ar(r, t, a) {
  for (var o = -1, e = r.length; ++o < e; ) {
    var i = r[o], n = t(i);
    if (n != null && (u === void 0 ? n === n && !y(n) : a(n, u)))
      var u = n, f = i;
  }
  return f;
}
function cr(r) {
  return r && r.length ? ar(r, q, tr) : void 0;
}
function er(r, t, a, o) {
  if (!l(r))
    return r;
  t = g(t, r);
  for (var e = -1, i = t.length, n = i - 1, u = r; u != null && ++e < i; ) {
    var f = A(t[e]), v = a;
    if (f === "__proto__" || f === "constructor" || f === "prototype")
      return r;
    if (e != n) {
      var s = u[f];
      v = void 0, v === void 0 && (v = l(s) ? s : X(t[e + 1]) ? [] : {});
    }
    Y(u, f, v), u = u[f];
  }
  return r;
}
function pr(r, t, a) {
  for (var o = -1, e = t.length, i = {}; ++o < e; ) {
    var n = t[o], u = j(r, n);
    a(u, n) && er(i, g(n, r), u);
  }
  return i;
}
export {
  B as V,
  J as X,
  K as Y,
  ir as d,
  ur as f,
  sr as g,
  vr as h,
  lr as m,
  cr as o,
  tr as r,
  ar as t,
  fr as u,
  pr as v
};
