var Ze = typeof global == "object" && global && global.Object === Object && global, pt = typeof self == "object" && self && self.Object === Object && self, w = Ze || pt || Function("return this")(), y = w.Symbol, We = Object.prototype, _t = We.hasOwnProperty, bt = We.toString, D = y ? y.toStringTag : void 0;
function yt(e) {
  var t = _t.call(e, D), r = e[D];
  try {
    e[D] = void 0;
    var n = !0;
  } catch {
  }
  var i = bt.call(e);
  return n && (t ? e[D] = r : delete e[D]), i;
}
var vt = Object.prototype, Ot = vt.toString;
function mt(e) {
  return Ot.call(e);
}
var wt = "[object Null]", Tt = "[object Undefined]", Oe = y ? y.toStringTag : void 0;
function M(e) {
  return e == null ? e === void 0 ? Tt : wt : Oe && Oe in Object(e) ? yt(e) : mt(e);
}
function j(e) {
  return e != null && typeof e == "object";
}
var At = "[object Symbol]";
function he(e) {
  return typeof e == "symbol" || j(e) && M(e) == At;
}
function Je(e, t) {
  for (var r = -1, n = e == null ? 0 : e.length, i = Array(n); ++r < n; )
    i[r] = t(e[r], r, e);
  return i;
}
var g = Array.isArray, Pt = 1 / 0, me = y ? y.prototype : void 0, we = me ? me.toString : void 0;
function Qe(e) {
  if (typeof e == "string")
    return e;
  if (g(e))
    return Je(e, Qe) + "";
  if (he(e))
    return we ? we.call(e) : "";
  var t = e + "";
  return t == "0" && 1 / e == -Pt ? "-0" : t;
}
function ce(e) {
  var t = typeof e;
  return e != null && (t == "object" || t == "function");
}
function J(e) {
  return e;
}
var Et = "[object AsyncFunction]", $t = "[object Function]", St = "[object GeneratorFunction]", Ct = "[object Proxy]";
function Z(e) {
  if (!ce(e))
    return !1;
  var t = M(e);
  return t == $t || t == St || t == Et || t == Ct;
}
var re = w["__core-js_shared__"], Te = function() {
  var e = /[^.]+$/.exec(re && re.keys && re.keys.IE_PROTO || "");
  return e ? "Symbol(src)_1." + e : "";
}();
function jt(e) {
  return !!Te && Te in e;
}
var xt = Function.prototype, It = xt.toString;
function I(e) {
  if (e != null) {
    try {
      return It.call(e);
    } catch {
    }
    try {
      return e + "";
    } catch {
    }
  }
  return "";
}
var Lt = /[\\^$.*+?()[\]{}|]/g, Nt = /^\[object .+?Constructor\]$/, Rt = Function.prototype, Mt = Object.prototype, Dt = Rt.toString, Ft = Mt.hasOwnProperty, Gt = RegExp(
  "^" + Dt.call(Ft).replace(Lt, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
);
function Ut(e) {
  if (!ce(e) || jt(e))
    return !1;
  var t = Z(e) ? Gt : Nt;
  return t.test(I(e));
}
function zt(e, t) {
  return e == null ? void 0 : e[t];
}
function L(e, t) {
  var r = zt(e, t);
  return Ut(r) ? r : void 0;
}
var oe = L(w, "WeakMap");
function Ht(e, t, r) {
  switch (r.length) {
    case 0:
      return e.call(t);
    case 1:
      return e.call(t, r[0]);
    case 2:
      return e.call(t, r[0], r[1]);
    case 3:
      return e.call(t, r[0], r[1], r[2]);
  }
  return e.apply(t, r);
}
function Bt() {
}
var Kt = 800, Yt = 16, qt = Date.now;
function Xt(e) {
  var t = 0, r = 0;
  return function() {
    var n = qt(), i = Yt - (n - r);
    if (r = n, i > 0) {
      if (++t >= Kt)
        return arguments[0];
    } else
      t = 0;
    return e.apply(void 0, arguments);
  };
}
function F(e) {
  return function() {
    return e;
  };
}
var Ae = function() {
  try {
    var e = L(Object, "defineProperty");
    return e({}, "", {}), e;
  } catch {
  }
}(), Zt = Ae ? function(e, t) {
  return Ae(e, "toString", {
    configurable: !0,
    enumerable: !1,
    value: F(t),
    writable: !0
  });
} : J, Wt = Xt(Zt);
function Jt(e, t) {
  for (var r = -1, n = e == null ? 0 : e.length; ++r < n && t(e[r], r, e) !== !1; )
    ;
  return e;
}
function Qt(e, t, r, n) {
  for (var i = e.length, s = r + -1; ++s < i; )
    if (t(e[s], s, e))
      return s;
  return -1;
}
function Vt(e) {
  return e !== e;
}
function kt(e, t, r) {
  for (var n = r - 1, i = e.length; ++n < i; )
    if (e[n] === t)
      return n;
  return -1;
}
function er(e, t, r) {
  return t === t ? kt(e, t, r) : Qt(e, Vt, r);
}
function tr(e, t) {
  var r = e == null ? 0 : e.length;
  return !!r && er(e, t, 0) > -1;
}
var rr = 9007199254740991, nr = /^(?:0|[1-9]\d*)$/;
function Ve(e, t) {
  var r = typeof e;
  return t = t ?? rr, !!t && (r == "number" || r != "symbol" && nr.test(e)) && e > -1 && e % 1 == 0 && e < t;
}
function ke(e, t) {
  return e === t || e !== e && t !== t;
}
var Pe = Math.max;
function ir(e, t, r) {
  return t = Pe(t === void 0 ? e.length - 1 : t, 0), function() {
    for (var n = arguments, i = -1, s = Pe(n.length - t, 0), a = Array(s); ++i < s; )
      a[i] = n[t + i];
    i = -1;
    for (var o = Array(t + 1); ++i < t; )
      o[i] = n[i];
    return o[t] = r(a), Ht(e, this, o);
  };
}
function sr(e, t) {
  return Wt(ir(e, t, J), e + "");
}
var ar = 9007199254740991;
function le(e) {
  return typeof e == "number" && e > -1 && e % 1 == 0 && e <= ar;
}
function Q(e) {
  return e != null && le(e.length) && !Z(e);
}
var or = Object.prototype;
function et(e) {
  var t = e && e.constructor, r = typeof t == "function" && t.prototype || or;
  return e === r;
}
function ur(e, t) {
  for (var r = -1, n = Array(e); ++r < e; )
    n[r] = t(r);
  return n;
}
var fr = "[object Arguments]";
function Ee(e) {
  return j(e) && M(e) == fr;
}
var tt = Object.prototype, hr = tt.hasOwnProperty, cr = tt.propertyIsEnumerable, V = Ee(/* @__PURE__ */ function() {
  return arguments;
}()) ? Ee : function(e) {
  return j(e) && hr.call(e, "callee") && !cr.call(e, "callee");
};
function lr() {
  return !1;
}
var rt = typeof exports == "object" && exports && !exports.nodeType && exports, $e = rt && typeof module == "object" && module && !module.nodeType && module, dr = $e && $e.exports === rt, Se = dr ? w.Buffer : void 0, gr = Se ? Se.isBuffer : void 0, W = gr || lr, pr = "[object Arguments]", _r = "[object Array]", br = "[object Boolean]", yr = "[object Date]", vr = "[object Error]", Or = "[object Function]", mr = "[object Map]", wr = "[object Number]", Tr = "[object Object]", Ar = "[object RegExp]", Pr = "[object Set]", Er = "[object String]", $r = "[object WeakMap]", Sr = "[object ArrayBuffer]", Cr = "[object DataView]", jr = "[object Float32Array]", xr = "[object Float64Array]", Ir = "[object Int8Array]", Lr = "[object Int16Array]", Nr = "[object Int32Array]", Rr = "[object Uint8Array]", Mr = "[object Uint8ClampedArray]", Dr = "[object Uint16Array]", Fr = "[object Uint32Array]", h = {};
h[jr] = h[xr] = h[Ir] = h[Lr] = h[Nr] = h[Rr] = h[Mr] = h[Dr] = h[Fr] = !0;
h[pr] = h[_r] = h[Sr] = h[br] = h[Cr] = h[yr] = h[vr] = h[Or] = h[mr] = h[wr] = h[Tr] = h[Ar] = h[Pr] = h[Er] = h[$r] = !1;
function Gr(e) {
  return j(e) && le(e.length) && !!h[M(e)];
}
function Ur(e) {
  return function(t) {
    return e(t);
  };
}
var nt = typeof exports == "object" && exports && !exports.nodeType && exports, U = nt && typeof module == "object" && module && !module.nodeType && module, zr = U && U.exports === nt, ne = zr && Ze.process, Ce = function() {
  try {
    var e = U && U.require && U.require("util").types;
    return e || ne && ne.binding && ne.binding("util");
  } catch {
  }
}(), je = Ce && Ce.isTypedArray, de = je ? Ur(je) : Gr, Hr = Object.prototype, Br = Hr.hasOwnProperty;
function Kr(e, t) {
  var r = g(e), n = !r && V(e), i = !r && !n && W(e), s = !r && !n && !i && de(e), a = r || n || i || s, o = a ? ur(e.length, String) : [], u = o.length;
  for (var f in e)
    (t || Br.call(e, f)) && !(a && // Safari 9 has enumerable `arguments.length` in strict mode.
    (f == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
    i && (f == "offset" || f == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
    s && (f == "buffer" || f == "byteLength" || f == "byteOffset") || // Skip index properties.
    Ve(f, u))) && o.push(f);
  return o;
}
function Yr(e, t) {
  return function(r) {
    return e(t(r));
  };
}
var qr = Yr(Object.keys, Object), Xr = Object.prototype, Zr = Xr.hasOwnProperty;
function it(e) {
  if (!et(e))
    return qr(e);
  var t = [];
  for (var r in Object(e))
    Zr.call(e, r) && r != "constructor" && t.push(r);
  return t;
}
function b(e) {
  return Q(e) ? Kr(e) : it(e);
}
var Wr = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Jr = /^\w*$/;
function ge(e, t) {
  if (g(e))
    return !1;
  var r = typeof e;
  return r == "number" || r == "symbol" || r == "boolean" || e == null || he(e) ? !0 : Jr.test(e) || !Wr.test(e) || t != null && e in Object(t);
}
var z = L(Object, "create");
function Qr() {
  this.__data__ = z ? z(null) : {}, this.size = 0;
}
function Vr(e) {
  var t = this.has(e) && delete this.__data__[e];
  return this.size -= t ? 1 : 0, t;
}
var kr = "__lodash_hash_undefined__", en = Object.prototype, tn = en.hasOwnProperty;
function rn(e) {
  var t = this.__data__;
  if (z) {
    var r = t[e];
    return r === kr ? void 0 : r;
  }
  return tn.call(t, e) ? t[e] : void 0;
}
var nn = Object.prototype, sn = nn.hasOwnProperty;
function an(e) {
  var t = this.__data__;
  return z ? t[e] !== void 0 : sn.call(t, e);
}
var on = "__lodash_hash_undefined__";
function un(e, t) {
  var r = this.__data__;
  return this.size += this.has(e) ? 0 : 1, r[e] = z && t === void 0 ? on : t, this;
}
function x(e) {
  var t = -1, r = e == null ? 0 : e.length;
  for (this.clear(); ++t < r; ) {
    var n = e[t];
    this.set(n[0], n[1]);
  }
}
x.prototype.clear = Qr;
x.prototype.delete = Vr;
x.prototype.get = rn;
x.prototype.has = an;
x.prototype.set = un;
function fn() {
  this.__data__ = [], this.size = 0;
}
function k(e, t) {
  for (var r = e.length; r--; )
    if (ke(e[r][0], t))
      return r;
  return -1;
}
var hn = Array.prototype, cn = hn.splice;
function ln(e) {
  var t = this.__data__, r = k(t, e);
  if (r < 0)
    return !1;
  var n = t.length - 1;
  return r == n ? t.pop() : cn.call(t, r, 1), --this.size, !0;
}
function dn(e) {
  var t = this.__data__, r = k(t, e);
  return r < 0 ? void 0 : t[r][1];
}
function gn(e) {
  return k(this.__data__, e) > -1;
}
function pn(e, t) {
  var r = this.__data__, n = k(r, e);
  return n < 0 ? (++this.size, r.push([e, t])) : r[n][1] = t, this;
}
function T(e) {
  var t = -1, r = e == null ? 0 : e.length;
  for (this.clear(); ++t < r; ) {
    var n = e[t];
    this.set(n[0], n[1]);
  }
}
T.prototype.clear = fn;
T.prototype.delete = ln;
T.prototype.get = dn;
T.prototype.has = gn;
T.prototype.set = pn;
var H = L(w, "Map");
function _n() {
  this.size = 0, this.__data__ = {
    hash: new x(),
    map: new (H || T)(),
    string: new x()
  };
}
function bn(e) {
  var t = typeof e;
  return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null;
}
function ee(e, t) {
  var r = e.__data__;
  return bn(t) ? r[typeof t == "string" ? "string" : "hash"] : r.map;
}
function yn(e) {
  var t = ee(this, e).delete(e);
  return this.size -= t ? 1 : 0, t;
}
function vn(e) {
  return ee(this, e).get(e);
}
function On(e) {
  return ee(this, e).has(e);
}
function mn(e, t) {
  var r = ee(this, e), n = r.size;
  return r.set(e, t), this.size += r.size == n ? 0 : 1, this;
}
function A(e) {
  var t = -1, r = e == null ? 0 : e.length;
  for (this.clear(); ++t < r; ) {
    var n = e[t];
    this.set(n[0], n[1]);
  }
}
A.prototype.clear = _n;
A.prototype.delete = yn;
A.prototype.get = vn;
A.prototype.has = On;
A.prototype.set = mn;
var wn = "Expected a function";
function pe(e, t) {
  if (typeof e != "function" || t != null && typeof t != "function")
    throw new TypeError(wn);
  var r = function() {
    var n = arguments, i = t ? t.apply(this, n) : n[0], s = r.cache;
    if (s.has(i))
      return s.get(i);
    var a = e.apply(this, n);
    return r.cache = s.set(i, a) || s, a;
  };
  return r.cache = new (pe.Cache || A)(), r;
}
pe.Cache = A;
var Tn = 500;
function An(e) {
  var t = pe(e, function(n) {
    return r.size === Tn && r.clear(), n;
  }), r = t.cache;
  return t;
}
var Pn = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, En = /\\(\\)?/g, $n = An(function(e) {
  var t = [];
  return e.charCodeAt(0) === 46 && t.push(""), e.replace(Pn, function(r, n, i, s) {
    t.push(i ? s.replace(En, "$1") : n || r);
  }), t;
});
function Sn(e) {
  return e == null ? "" : Qe(e);
}
function st(e, t) {
  return g(e) ? e : ge(e, t) ? [e] : $n(Sn(e));
}
var Cn = 1 / 0;
function te(e) {
  if (typeof e == "string" || he(e))
    return e;
  var t = e + "";
  return t == "0" && 1 / e == -Cn ? "-0" : t;
}
function at(e, t) {
  t = st(t, e);
  for (var r = 0, n = t.length; e != null && r < n; )
    e = e[te(t[r++])];
  return r && r == n ? e : void 0;
}
function jn(e, t, r) {
  var n = e == null ? void 0 : at(e, t);
  return n === void 0 ? r : n;
}
function ot(e, t) {
  for (var r = -1, n = t.length, i = e.length; ++r < n; )
    e[i + r] = t[r];
  return e;
}
var xe = y ? y.isConcatSpreadable : void 0;
function xn(e) {
  return g(e) || V(e) || !!(xe && e && e[xe]);
}
function In(e, t, r, n, i) {
  var s = -1, a = e.length;
  for (r || (r = xn), i || (i = []); ++s < a; ) {
    var o = e[s];
    r(o) ? ot(i, o) : n || (i[i.length] = o);
  }
  return i;
}
function Ln(e, t, r, n) {
  var i = -1, s = e == null ? 0 : e.length;
  for (n && s && (r = e[++i]); ++i < s; )
    r = t(r, e[i], i, e);
  return r;
}
function Nn() {
  this.__data__ = new T(), this.size = 0;
}
function Rn(e) {
  var t = this.__data__, r = t.delete(e);
  return this.size = t.size, r;
}
function Mn(e) {
  return this.__data__.get(e);
}
function Dn(e) {
  return this.__data__.has(e);
}
var Fn = 200;
function Gn(e, t) {
  var r = this.__data__;
  if (r instanceof T) {
    var n = r.__data__;
    if (!H || n.length < Fn - 1)
      return n.push([e, t]), this.size = ++r.size, this;
    r = this.__data__ = new A(n);
  }
  return r.set(e, t), this.size = r.size, this;
}
function m(e) {
  var t = this.__data__ = new T(e);
  this.size = t.size;
}
m.prototype.clear = Nn;
m.prototype.delete = Rn;
m.prototype.get = Mn;
m.prototype.has = Dn;
m.prototype.set = Gn;
function ut(e, t) {
  for (var r = -1, n = e == null ? 0 : e.length, i = 0, s = []; ++r < n; ) {
    var a = e[r];
    t(a, r, e) && (s[i++] = a);
  }
  return s;
}
function Un() {
  return [];
}
var zn = Object.prototype, Hn = zn.propertyIsEnumerable, Ie = Object.getOwnPropertySymbols, Bn = Ie ? function(e) {
  return e == null ? [] : (e = Object(e), ut(Ie(e), function(t) {
    return Hn.call(e, t);
  }));
} : Un;
function Kn(e, t, r) {
  var n = t(e);
  return g(e) ? n : ot(n, r(e));
}
function Le(e) {
  return Kn(e, b, Bn);
}
var ue = L(w, "DataView"), fe = L(w, "Promise"), R = L(w, "Set"), Ne = "[object Map]", Yn = "[object Object]", Re = "[object Promise]", Me = "[object Set]", De = "[object WeakMap]", Fe = "[object DataView]", qn = I(ue), Xn = I(H), Zn = I(fe), Wn = I(R), Jn = I(oe), O = M;
(ue && O(new ue(new ArrayBuffer(1))) != Fe || H && O(new H()) != Ne || fe && O(fe.resolve()) != Re || R && O(new R()) != Me || oe && O(new oe()) != De) && (O = function(e) {
  var t = M(e), r = t == Yn ? e.constructor : void 0, n = r ? I(r) : "";
  if (n)
    switch (n) {
      case qn:
        return Fe;
      case Xn:
        return Ne;
      case Zn:
        return Re;
      case Wn:
        return Me;
      case Jn:
        return De;
    }
  return t;
});
var Ge = w.Uint8Array, Qn = "__lodash_hash_undefined__";
function Vn(e) {
  return this.__data__.set(e, Qn), this;
}
function kn(e) {
  return this.__data__.has(e);
}
function B(e) {
  var t = -1, r = e == null ? 0 : e.length;
  for (this.__data__ = new A(); ++t < r; )
    this.add(e[t]);
}
B.prototype.add = B.prototype.push = Vn;
B.prototype.has = kn;
function ei(e, t) {
  for (var r = -1, n = e == null ? 0 : e.length; ++r < n; )
    if (t(e[r], r, e))
      return !0;
  return !1;
}
function ft(e, t) {
  return e.has(t);
}
var ti = 1, ri = 2;
function ht(e, t, r, n, i, s) {
  var a = r & ti, o = e.length, u = t.length;
  if (o != u && !(a && u > o))
    return !1;
  var f = s.get(e), d = s.get(t);
  if (f && d)
    return f == t && d == e;
  var c = -1, l = !0, v = r & ri ? new B() : void 0;
  for (s.set(e, t), s.set(t, e); ++c < o; ) {
    var p = e[c], _ = t[c];
    if (n)
      var P = a ? n(_, p, c, t, e, s) : n(p, _, c, e, t, s);
    if (P !== void 0) {
      if (P)
        continue;
      l = !1;
      break;
    }
    if (v) {
      if (!ei(t, function(E, $) {
        if (!ft(v, $) && (p === E || i(p, E, r, n, s)))
          return v.push($);
      })) {
        l = !1;
        break;
      }
    } else if (!(p === _ || i(p, _, r, n, s))) {
      l = !1;
      break;
    }
  }
  return s.delete(e), s.delete(t), l;
}
function ni(e) {
  var t = -1, r = Array(e.size);
  return e.forEach(function(n, i) {
    r[++t] = [i, n];
  }), r;
}
function _e(e) {
  var t = -1, r = Array(e.size);
  return e.forEach(function(n) {
    r[++t] = n;
  }), r;
}
var ii = 1, si = 2, ai = "[object Boolean]", oi = "[object Date]", ui = "[object Error]", fi = "[object Map]", hi = "[object Number]", ci = "[object RegExp]", li = "[object Set]", di = "[object String]", gi = "[object Symbol]", pi = "[object ArrayBuffer]", _i = "[object DataView]", Ue = y ? y.prototype : void 0, ie = Ue ? Ue.valueOf : void 0;
function bi(e, t, r, n, i, s, a) {
  switch (r) {
    case _i:
      if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset)
        return !1;
      e = e.buffer, t = t.buffer;
    case pi:
      return !(e.byteLength != t.byteLength || !s(new Ge(e), new Ge(t)));
    case ai:
    case oi:
    case hi:
      return ke(+e, +t);
    case ui:
      return e.name == t.name && e.message == t.message;
    case ci:
    case di:
      return e == t + "";
    case fi:
      var o = ni;
    case li:
      var u = n & ii;
      if (o || (o = _e), e.size != t.size && !u)
        return !1;
      var f = a.get(e);
      if (f)
        return f == t;
      n |= si, a.set(e, t);
      var d = ht(o(e), o(t), n, i, s, a);
      return a.delete(e), d;
    case gi:
      if (ie)
        return ie.call(e) == ie.call(t);
  }
  return !1;
}
var yi = 1, vi = Object.prototype, Oi = vi.hasOwnProperty;
function mi(e, t, r, n, i, s) {
  var a = r & yi, o = Le(e), u = o.length, f = Le(t), d = f.length;
  if (u != d && !a)
    return !1;
  for (var c = u; c--; ) {
    var l = o[c];
    if (!(a ? l in t : Oi.call(t, l)))
      return !1;
  }
  var v = s.get(e), p = s.get(t);
  if (v && p)
    return v == t && p == e;
  var _ = !0;
  s.set(e, t), s.set(t, e);
  for (var P = a; ++c < u; ) {
    l = o[c];
    var E = e[l], $ = t[l];
    if (n)
      var ve = a ? n($, E, l, t, e, s) : n(E, $, l, e, t, s);
    if (!(ve === void 0 ? E === $ || i(E, $, r, n, s) : ve)) {
      _ = !1;
      break;
    }
    P || (P = l == "constructor");
  }
  if (_ && !P) {
    var K = e.constructor, Y = t.constructor;
    K != Y && "constructor" in e && "constructor" in t && !(typeof K == "function" && K instanceof K && typeof Y == "function" && Y instanceof Y) && (_ = !1);
  }
  return s.delete(e), s.delete(t), _;
}
var wi = 1, ze = "[object Arguments]", He = "[object Array]", q = "[object Object]", Ti = Object.prototype, Be = Ti.hasOwnProperty;
function Ai(e, t, r, n, i, s) {
  var a = g(e), o = g(t), u = a ? He : O(e), f = o ? He : O(t);
  u = u == ze ? q : u, f = f == ze ? q : f;
  var d = u == q, c = f == q, l = u == f;
  if (l && W(e)) {
    if (!W(t))
      return !1;
    a = !0, d = !1;
  }
  if (l && !d)
    return s || (s = new m()), a || de(e) ? ht(e, t, r, n, i, s) : bi(e, t, u, r, n, i, s);
  if (!(r & wi)) {
    var v = d && Be.call(e, "__wrapped__"), p = c && Be.call(t, "__wrapped__");
    if (v || p) {
      var _ = v ? e.value() : e, P = p ? t.value() : t;
      return s || (s = new m()), i(_, P, r, n, s);
    }
  }
  return l ? (s || (s = new m()), mi(e, t, r, n, i, s)) : !1;
}
function be(e, t, r, n, i) {
  return e === t ? !0 : e == null || t == null || !j(e) && !j(t) ? e !== e && t !== t : Ai(e, t, r, n, be, i);
}
var Pi = 1, Ei = 2;
function $i(e, t, r, n) {
  var i = r.length, s = i;
  if (e == null)
    return !s;
  for (e = Object(e); i--; ) {
    var a = r[i];
    if (a[2] ? a[1] !== e[a[0]] : !(a[0] in e))
      return !1;
  }
  for (; ++i < s; ) {
    a = r[i];
    var o = a[0], u = e[o], f = a[1];
    if (a[2]) {
      if (u === void 0 && !(o in e))
        return !1;
    } else {
      var d = new m(), c;
      if (!(c === void 0 ? be(f, u, Pi | Ei, n, d) : c))
        return !1;
    }
  }
  return !0;
}
function ct(e) {
  return e === e && !ce(e);
}
function Si(e) {
  for (var t = b(e), r = t.length; r--; ) {
    var n = t[r], i = e[n];
    t[r] = [n, i, ct(i)];
  }
  return t;
}
function lt(e, t) {
  return function(r) {
    return r == null ? !1 : r[e] === t && (t !== void 0 || e in Object(r));
  };
}
function Ci(e) {
  var t = Si(e);
  return t.length == 1 && t[0][2] ? lt(t[0][0], t[0][1]) : function(r) {
    return r === e || $i(r, e, t);
  };
}
function ji(e, t) {
  return e != null && t in Object(e);
}
function xi(e, t, r) {
  t = st(t, e);
  for (var n = -1, i = t.length, s = !1; ++n < i; ) {
    var a = te(t[n]);
    if (!(s = e != null && r(e, a)))
      break;
    e = e[a];
  }
  return s || ++n != i ? s : (i = e == null ? 0 : e.length, !!i && le(i) && Ve(a, i) && (g(e) || V(e)));
}
function Ii(e, t) {
  return e != null && xi(e, t, ji);
}
var Li = 1, Ni = 2;
function Ri(e, t) {
  return ge(e) && ct(t) ? lt(te(e), t) : function(r) {
    var n = jn(r, e);
    return n === void 0 && n === t ? Ii(r, e) : be(t, n, Li | Ni);
  };
}
function Mi(e) {
  return function(t) {
    return t == null ? void 0 : t[e];
  };
}
function Di(e) {
  return function(t) {
    return at(t, e);
  };
}
function Fi(e) {
  return ge(e) ? Mi(te(e)) : Di(e);
}
function dt(e) {
  return typeof e == "function" ? e : e == null ? J : typeof e == "object" ? g(e) ? Ri(e[0], e[1]) : Ci(e) : Fi(e);
}
function Gi(e) {
  return function(t, r, n) {
    for (var i = -1, s = Object(t), a = n(t), o = a.length; o--; ) {
      var u = a[++i];
      if (r(s[u], u, s) === !1)
        break;
    }
    return t;
  };
}
var Ui = Gi();
function zi(e, t) {
  return e && Ui(e, t, b);
}
function Hi(e, t) {
  return function(r, n) {
    if (r == null)
      return r;
    if (!Q(r))
      return e(r, n);
    for (var i = r.length, s = -1, a = Object(r); ++s < i && n(a[s], s, a) !== !1; )
      ;
    return r;
  };
}
var ye = Hi(zi);
function Bi(e) {
  return j(e) && Q(e);
}
function Ki(e) {
  return typeof e == "function" ? e : J;
}
function S(e, t) {
  var r = g(e) ? Jt : ye;
  return r(e, Ki(t));
}
function Yi(e, t) {
  var r = [];
  return ye(e, function(n, i, s) {
    t(n, i, s) && r.push(n);
  }), r;
}
function X(e, t) {
  var r = g(e) ? ut : Yi;
  return r(e, dt(t));
}
function qi(e, t) {
  return Je(t, function(r) {
    return e[r];
  });
}
function se(e) {
  return e == null ? [] : qi(e, b(e));
}
var Xi = "[object Map]", Zi = "[object Set]", Wi = Object.prototype, Ji = Wi.hasOwnProperty;
function Ke(e) {
  if (e == null)
    return !0;
  if (Q(e) && (g(e) || typeof e == "string" || typeof e.splice == "function" || W(e) || de(e) || V(e)))
    return !e.length;
  var t = O(e);
  if (t == Xi || t == Zi)
    return !e.size;
  if (et(e))
    return !it(e).length;
  for (var r in e)
    if (Ji.call(e, r))
      return !1;
  return !0;
}
function N(e) {
  return e === void 0;
}
function Qi(e, t, r, n, i) {
  return i(e, function(s, a, o) {
    r = n ? (n = !1, s) : t(r, s, a, o);
  }), r;
}
function Vi(e, t, r) {
  var n = g(e) ? Ln : Qi, i = arguments.length < 3;
  return n(e, dt(t), r, i, ye);
}
var ki = 1 / 0, es = R && 1 / _e(new R([, -0]))[1] == ki ? function(e) {
  return new R(e);
} : Bt, ts = 200;
function rs(e, t, r) {
  var n = -1, i = tr, s = e.length, a = !0, o = [], u = o;
  if (s >= ts) {
    var f = es(e);
    if (f)
      return _e(f);
    a = !1, i = ft, u = new B();
  } else
    u = o;
  e:
    for (; ++n < s; ) {
      var d = e[n], c = d;
      if (d = d !== 0 ? d : 0, a && c === c) {
        for (var l = u.length; l--; )
          if (u[l] === c)
            continue e;
        o.push(d);
      } else
        i(u, c, r) || (u !== o && u.push(c), o.push(d));
    }
  return o;
}
var ns = sr(function(e) {
  return rs(In(e, 1, Bi, !0));
}), is = "\0", C = "\0", Ye = "";
class gt {
  constructor(t = {}) {
    this._isDirected = Object.prototype.hasOwnProperty.call(t, "directed") ? t.directed : !0, this._isMultigraph = Object.prototype.hasOwnProperty.call(t, "multigraph") ? t.multigraph : !1, this._isCompound = Object.prototype.hasOwnProperty.call(t, "compound") ? t.compound : !1, this._label = void 0, this._defaultNodeLabelFn = F(void 0), this._defaultEdgeLabelFn = F(void 0), this._nodes = {}, this._isCompound && (this._parent = {}, this._children = {}, this._children[C] = {}), this._in = {}, this._preds = {}, this._out = {}, this._sucs = {}, this._edgeObjs = {}, this._edgeLabels = {};
  }
  /* === Graph functions ========= */
  isDirected() {
    return this._isDirected;
  }
  isMultigraph() {
    return this._isMultigraph;
  }
  isCompound() {
    return this._isCompound;
  }
  setGraph(t) {
    return this._label = t, this;
  }
  graph() {
    return this._label;
  }
  /* === Node functions ========== */
  setDefaultNodeLabel(t) {
    return Z(t) || (t = F(t)), this._defaultNodeLabelFn = t, this;
  }
  nodeCount() {
    return this._nodeCount;
  }
  nodes() {
    return b(this._nodes);
  }
  sources() {
    var t = this;
    return X(this.nodes(), function(r) {
      return Ke(t._in[r]);
    });
  }
  sinks() {
    var t = this;
    return X(this.nodes(), function(r) {
      return Ke(t._out[r]);
    });
  }
  setNodes(t, r) {
    var n = arguments, i = this;
    return S(t, function(s) {
      n.length > 1 ? i.setNode(s, r) : i.setNode(s);
    }), this;
  }
  setNode(t, r) {
    return Object.prototype.hasOwnProperty.call(this._nodes, t) ? (arguments.length > 1 && (this._nodes[t] = r), this) : (this._nodes[t] = arguments.length > 1 ? r : this._defaultNodeLabelFn(t), this._isCompound && (this._parent[t] = C, this._children[t] = {}, this._children[C][t] = !0), this._in[t] = {}, this._preds[t] = {}, this._out[t] = {}, this._sucs[t] = {}, ++this._nodeCount, this);
  }
  node(t) {
    return this._nodes[t];
  }
  hasNode(t) {
    return Object.prototype.hasOwnProperty.call(this._nodes, t);
  }
  removeNode(t) {
    if (Object.prototype.hasOwnProperty.call(this._nodes, t)) {
      var r = (n) => this.removeEdge(this._edgeObjs[n]);
      delete this._nodes[t], this._isCompound && (this._removeFromParentsChildList(t), delete this._parent[t], S(this.children(t), (n) => {
        this.setParent(n);
      }), delete this._children[t]), S(b(this._in[t]), r), delete this._in[t], delete this._preds[t], S(b(this._out[t]), r), delete this._out[t], delete this._sucs[t], --this._nodeCount;
    }
    return this;
  }
  setParent(t, r) {
    if (!this._isCompound)
      throw new Error("Cannot set parent in a non-compound graph");
    if (N(r))
      r = C;
    else {
      r += "";
      for (var n = r; !N(n); n = this.parent(n))
        if (n === t)
          throw new Error("Setting " + r + " as parent of " + t + " would create a cycle");
      this.setNode(r);
    }
    return this.setNode(t), this._removeFromParentsChildList(t), this._parent[t] = r, this._children[r][t] = !0, this;
  }
  _removeFromParentsChildList(t) {
    delete this._children[this._parent[t]][t];
  }
  parent(t) {
    if (this._isCompound) {
      var r = this._parent[t];
      if (r !== C)
        return r;
    }
  }
  children(t) {
    if (N(t) && (t = C), this._isCompound) {
      var r = this._children[t];
      if (r)
        return b(r);
    } else {
      if (t === C)
        return this.nodes();
      if (this.hasNode(t))
        return [];
    }
  }
  predecessors(t) {
    var r = this._preds[t];
    if (r)
      return b(r);
  }
  successors(t) {
    var r = this._sucs[t];
    if (r)
      return b(r);
  }
  neighbors(t) {
    var r = this.predecessors(t);
    if (r)
      return ns(r, this.successors(t));
  }
  isLeaf(t) {
    var r;
    return this.isDirected() ? r = this.successors(t) : r = this.neighbors(t), r.length === 0;
  }
  filterNodes(t) {
    var r = new this.constructor({
      directed: this._isDirected,
      multigraph: this._isMultigraph,
      compound: this._isCompound
    });
    r.setGraph(this.graph());
    var n = this;
    S(this._nodes, function(a, o) {
      t(o) && r.setNode(o, a);
    }), S(this._edgeObjs, function(a) {
      r.hasNode(a.v) && r.hasNode(a.w) && r.setEdge(a, n.edge(a));
    });
    var i = {};
    function s(a) {
      var o = n.parent(a);
      return o === void 0 || r.hasNode(o) ? (i[a] = o, o) : o in i ? i[o] : s(o);
    }
    return this._isCompound && S(r.nodes(), function(a) {
      r.setParent(a, s(a));
    }), r;
  }
  /* === Edge functions ========== */
  setDefaultEdgeLabel(t) {
    return Z(t) || (t = F(t)), this._defaultEdgeLabelFn = t, this;
  }
  edgeCount() {
    return this._edgeCount;
  }
  edges() {
    return se(this._edgeObjs);
  }
  setPath(t, r) {
    var n = this, i = arguments;
    return Vi(t, function(s, a) {
      return i.length > 1 ? n.setEdge(s, a, r) : n.setEdge(s, a), a;
    }), this;
  }
  /*
   * setEdge(v, w, [value, [name]])
   * setEdge({ v, w, [name] }, [value])
   */
  setEdge() {
    var t, r, n, i, s = !1, a = arguments[0];
    typeof a == "object" && a !== null && "v" in a ? (t = a.v, r = a.w, n = a.name, arguments.length === 2 && (i = arguments[1], s = !0)) : (t = a, r = arguments[1], n = arguments[3], arguments.length > 2 && (i = arguments[2], s = !0)), t = "" + t, r = "" + r, N(n) || (n = "" + n);
    var o = G(this._isDirected, t, r, n);
    if (Object.prototype.hasOwnProperty.call(this._edgeLabels, o))
      return s && (this._edgeLabels[o] = i), this;
    if (!N(n) && !this._isMultigraph)
      throw new Error("Cannot set a named edge when isMultigraph = false");
    this.setNode(t), this.setNode(r), this._edgeLabels[o] = s ? i : this._defaultEdgeLabelFn(t, r, n);
    var u = ss(this._isDirected, t, r, n);
    return t = u.v, r = u.w, Object.freeze(u), this._edgeObjs[o] = u, qe(this._preds[r], t), qe(this._sucs[t], r), this._in[r][o] = u, this._out[t][o] = u, this._edgeCount++, this;
  }
  edge(t, r, n) {
    var i = arguments.length === 1 ? ae(this._isDirected, arguments[0]) : G(this._isDirected, t, r, n);
    return this._edgeLabels[i];
  }
  hasEdge(t, r, n) {
    var i = arguments.length === 1 ? ae(this._isDirected, arguments[0]) : G(this._isDirected, t, r, n);
    return Object.prototype.hasOwnProperty.call(this._edgeLabels, i);
  }
  removeEdge(t, r, n) {
    var i = arguments.length === 1 ? ae(this._isDirected, arguments[0]) : G(this._isDirected, t, r, n), s = this._edgeObjs[i];
    return s && (t = s.v, r = s.w, delete this._edgeLabels[i], delete this._edgeObjs[i], Xe(this._preds[r], t), Xe(this._sucs[t], r), delete this._in[r][i], delete this._out[t][i], this._edgeCount--), this;
  }
  inEdges(t, r) {
    var n = this._in[t];
    if (n) {
      var i = se(n);
      return r ? X(i, function(s) {
        return s.v === r;
      }) : i;
    }
  }
  outEdges(t, r) {
    var n = this._out[t];
    if (n) {
      var i = se(n);
      return r ? X(i, function(s) {
        return s.w === r;
      }) : i;
    }
  }
  nodeEdges(t, r) {
    var n = this.inEdges(t, r);
    if (n)
      return n.concat(this.outEdges(t, r));
  }
}
gt.prototype._nodeCount = 0;
gt.prototype._edgeCount = 0;
function qe(e, t) {
  e[t] ? e[t]++ : e[t] = 1;
}
function Xe(e, t) {
  --e[t] || delete e[t];
}
function G(e, t, r, n) {
  var i = "" + t, s = "" + r;
  if (!e && i > s) {
    var a = i;
    i = s, s = a;
  }
  return i + Ye + s + Ye + (N(n) ? is : n);
}
function ss(e, t, r, n) {
  var i = "" + t, s = "" + r;
  if (!e && i > s) {
    var a = i;
    i = s, s = a;
  }
  var o = { v: i, w: s };
  return n && (o.name = n), o;
}
function ae(e, t) {
  return G(e, t.v, t.w, t.name);
}
export {
  X as $,
  m as A,
  Jt as B,
  g as C,
  Le as D,
  de as E,
  Bi as F,
  gt as G,
  V as H,
  Z as I,
  Ui as J,
  dt as K,
  Qt as L,
  ye as M,
  Je as N,
  Ki as O,
  zi as P,
  xi as Q,
  J as R,
  y as S,
  st as T,
  Ge as U,
  te as V,
  at as W,
  Ii as X,
  Sn as Y,
  S as Z,
  F as _,
  he as a,
  se as a0,
  Vi as a1,
  ce as b,
  Q as c,
  Ae as d,
  ke as e,
  Ve as f,
  sr as g,
  et as h,
  N as i,
  Kr as j,
  In as k,
  Yr as l,
  j as m,
  M as n,
  ir as o,
  b as p,
  Bn as q,
  w as r,
  Wt as s,
  Un as t,
  ot as u,
  Kn as v,
  O as w,
  Ce as x,
  Ur as y,
  W as z
};
