import { reactive as ve, watch as mt, getCurrentInstance as we, inject as ht, ref as Me, defineComponent as O, useCssVars as bt, computed as E, createElementBlock as m, openBlock as p, createElementVNode as P, createCommentVNode as T, createBlock as W, resolveDynamicComponent as Yt, normalizeClass as S, withCtx as ae, renderSlot as x, createTextVNode as Z, toDisplayString as A, mergeModels as $e, useModel as yt, resolveDirective as z, withDirectives as V, vModelCheckbox as vt, mergeProps as se, withKeys as qt, vModelText as wt, withModifiers as Qt, Fragment as Q, onUnmounted as Jt, unref as me, vModelRadio as Zt, renderList as Te, vModelSelect as en } from "vue";
function tn() {
  return "devicePixelRatio" in window && window.devicePixelRatio > 1;
}
function nn() {
  return !!navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|IEMobile|Opera Mini/i);
}
function an() {
  return navigator.userAgent.indexOf("Topvisor_App") != -1;
}
function rn() {
  return navigator.userAgent.indexOf("Mac OS X") !== -1;
}
function es() {
  const e = /Chrome|Android/.test(navigator.userAgent);
  let t = /Safari/.test(navigator.userAgent);
  return e && t && (t = !1), t;
}
function ts() {
  return rn() ? "⌘" : "Ctrl";
}
const ns = () => $(document).scrollTop(), as = () => $(document), rs = () => [document], on = () => {
  const e = [
    ["iOS", /(iPhone|iPad)/i],
    ["Android", /(Android)/i],
    ["Windows Phone", /(IEMobile)/i],
    ["Windows 3.11", /Win16/i],
    ["Windows 95", /(Windows 95)|(Win95)|(Windows_95)/i],
    ["Windows 98", /(Windows 98)|(Win98)/i],
    ["Windows 2000", /(Windows NT 5.0)|(Windows 2000)/i],
    ["Windows XP", /(Windows NT 5.1)|(Windows XP)/i],
    ["Windows Server 2003", /(Windows NT 5.2)/i],
    ["Windows Vista", /(Windows NT 6.0)/i],
    ["Windows 7", /(Windows NT 6.1)/i],
    ["Windows 8", /(Windows NT 6.[23])|(Windows 8)/i],
    ["Windows 10", /(Windows NT 10)/i],
    ["Windows NT 4.0", /(Windows NT 4.0)|(WinNT4.0)|(WinNT)|(Windows NT)/i],
    ["Windows ME", /Windows ME/i],
    ["Windows", /Windows/i],
    ["Open BSD", /OpenBSD/i],
    ["Sun OS", /SunOS/i],
    ["Linux", /(Linux)|(X11)/i],
    ["Macintosh", /(Mac_PowerPC)|(Macintosh)|(Mac OS X 10.4)|(Mac OS X 10.5)|(Mac OS X 10.6)/i],
    ["QNX", /QNX/i],
    ["BeOS", /BeOS/i],
    ["OS/2", /OS\/2/i]
  ];
  let t = "";
  for (let n = 0; n < e.length; n++)
    if (e[n][1].test(navigator.userAgent)) {
      t = e[n][0];
      break;
    }
  return t;
}, is = async () => {
  let e = on();
  if (e === "Windows 10") {
    const t = await navigator?.userAgentData?.getHighEntropyValues(["platformVersion"]);
    t && t.platformVersion >= "13" && (e = "Windows 11");
  }
  return e;
};
function j(e) {
  var t = typeof e;
  return e != null && (t == "object" || t == "function");
}
var $t = typeof global == "object" && global && global.Object === Object && global, sn = typeof self == "object" && self && self.Object === Object && self, M = $t || sn || Function("return this")(), he = function() {
  return M.Date.now();
}, ln = /\s/;
function cn(e) {
  for (var t = e.length; t-- && ln.test(e.charAt(t)); )
    ;
  return t;
}
var un = /^\s+/;
function dn(e) {
  return e && e.slice(0, cn(e) + 1).replace(un, "");
}
var K = M.Symbol, Tt = Object.prototype, fn = Tt.hasOwnProperty, pn = Tt.toString, q = K ? K.toStringTag : void 0;
function gn(e) {
  var t = fn.call(e, q), n = e[q];
  try {
    e[q] = void 0;
    var a = !0;
  } catch {
  }
  var r = pn.call(e);
  return a && (t ? e[q] = n : delete e[q]), r;
}
var mn = Object.prototype, hn = mn.toString;
function bn(e) {
  return hn.call(e);
}
var yn = "[object Null]", vn = "[object Undefined]", Re = K ? K.toStringTag : void 0;
function R(e) {
  return e == null ? e === void 0 ? vn : yn : Re && Re in Object(e) ? gn(e) : bn(e);
}
function L(e) {
  return e != null && typeof e == "object";
}
var wn = "[object Symbol]";
function $n(e) {
  return typeof e == "symbol" || L(e) && R(e) == wn;
}
var Ue = NaN, Tn = /^[-+]0x[0-9a-f]+$/i, Sn = /^0b[01]+$/i, On = /^0o[0-7]+$/i, En = parseInt;
function He(e) {
  if (typeof e == "number")
    return e;
  if ($n(e))
    return Ue;
  if (j(e)) {
    var t = typeof e.valueOf == "function" ? e.valueOf() : e;
    e = j(t) ? t + "" : t;
  }
  if (typeof e != "string")
    return e === 0 ? e : +e;
  e = dn(e);
  var n = Sn.test(e);
  return n || On.test(e) ? En(e.slice(2), n ? 2 : 8) : Tn.test(e) ? Ue : +e;
}
var xn = "Expected a function", jn = Math.max, An = Math.min;
function St(e, t, n) {
  var a, r, i, o, s, l, c = 0, d = !1, u = !1, f = !0;
  if (typeof e != "function")
    throw new TypeError(xn);
  t = He(t) || 0, j(n) && (d = !!n.leading, u = "maxWait" in n, i = u ? jn(He(n.maxWait) || 0, t) : i, f = "trailing" in n ? !!n.trailing : f);
  function b(v) {
    var B = a, Y = r;
    return a = r = void 0, c = v, o = e.apply(Y, B), o;
  }
  function w(v) {
    return c = v, s = setTimeout(re, t), d ? b(v) : o;
  }
  function C(v) {
    var B = v - l, Y = v - c, Fe = t - B;
    return u ? An(Fe, i - Y) : Fe;
  }
  function Ve(v) {
    var B = v - l, Y = v - c;
    return l === void 0 || B >= t || B < 0 || u && Y >= i;
  }
  function re() {
    var v = he();
    if (Ve(v))
      return ke(v);
    s = setTimeout(re, C(v));
  }
  function ke(v) {
    return s = void 0, f && a ? b(v) : (a = r = void 0, o);
  }
  function Kt() {
    s !== void 0 && clearTimeout(s), c = 0, a = l = r = s = void 0;
  }
  function Xt() {
    return s === void 0 ? o : ke(he());
  }
  function ge() {
    var v = he(), B = Ve(v);
    if (a = arguments, r = this, l = v, B) {
      if (s === void 0)
        return w(l);
      if (u)
        return clearTimeout(s), s = setTimeout(re, t), b(l);
    }
    return s === void 0 && (s = setTimeout(re, t)), o;
  }
  return ge.cancel = Kt, ge.flush = Xt, ge;
}
function Pn() {
  this.__data__ = [], this.size = 0;
}
function ce(e, t) {
  return e === t || e !== e && t !== t;
}
function ue(e, t) {
  for (var n = e.length; n--; )
    if (ce(e[n][0], t))
      return n;
  return -1;
}
var Mn = Array.prototype, Cn = Mn.splice;
function Dn(e) {
  var t = this.__data__, n = ue(t, e);
  if (n < 0)
    return !1;
  var a = t.length - 1;
  return n == a ? t.pop() : Cn.call(t, n, 1), --this.size, !0;
}
function In(e) {
  var t = this.__data__, n = ue(t, e);
  return n < 0 ? void 0 : t[n][1];
}
function Bn(e) {
  return ue(this.__data__, e) > -1;
}
function Wn(e, t) {
  var n = this.__data__, a = ue(n, e);
  return a < 0 ? (++this.size, n.push([e, t])) : n[a][1] = t, this;
}
function I(e) {
  var t = -1, n = e == null ? 0 : e.length;
  for (this.clear(); ++t < n; ) {
    var a = e[t];
    this.set(a[0], a[1]);
  }
}
I.prototype.clear = Pn;
I.prototype.delete = Dn;
I.prototype.get = In;
I.prototype.has = Bn;
I.prototype.set = Wn;
function Ln() {
  this.__data__ = new I(), this.size = 0;
}
function Nn(e) {
  var t = this.__data__, n = t.delete(e);
  return this.size = t.size, n;
}
function zn(e) {
  return this.__data__.get(e);
}
function Vn(e) {
  return this.__data__.has(e);
}
var kn = "[object AsyncFunction]", Fn = "[object Function]", Rn = "[object GeneratorFunction]", Un = "[object Proxy]";
function Ce(e) {
  if (!j(e))
    return !1;
  var t = R(e);
  return t == Fn || t == Rn || t == kn || t == Un;
}
var be = M["__core-js_shared__"], _e = (function() {
  var e = /[^.]+$/.exec(be && be.keys && be.keys.IE_PROTO || "");
  return e ? "Symbol(src)_1." + e : "";
})();
function Hn(e) {
  return !!_e && _e in e;
}
var _n = Function.prototype, Gn = _n.toString;
function U(e) {
  if (e != null) {
    try {
      return Gn.call(e);
    } catch {
    }
    try {
      return e + "";
    } catch {
    }
  }
  return "";
}
var Kn = /[\\^$.*+?()[\]{}|]/g, Xn = /^\[object .+?Constructor\]$/, Yn = Function.prototype, qn = Object.prototype, Qn = Yn.toString, Jn = qn.hasOwnProperty, Zn = RegExp(
  "^" + Qn.call(Jn).replace(Kn, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
);
function ea(e) {
  if (!j(e) || Hn(e))
    return !1;
  var t = Ce(e) ? Zn : Xn;
  return t.test(U(e));
}
function ta(e, t) {
  return e?.[t];
}
function H(e, t) {
  var n = ta(e, t);
  return ea(n) ? n : void 0;
}
var ee = H(M, "Map"), te = H(Object, "create");
function na() {
  this.__data__ = te ? te(null) : {}, this.size = 0;
}
function aa(e) {
  var t = this.has(e) && delete this.__data__[e];
  return this.size -= t ? 1 : 0, t;
}
var ra = "__lodash_hash_undefined__", ia = Object.prototype, oa = ia.hasOwnProperty;
function sa(e) {
  var t = this.__data__;
  if (te) {
    var n = t[e];
    return n === ra ? void 0 : n;
  }
  return oa.call(t, e) ? t[e] : void 0;
}
var la = Object.prototype, ca = la.hasOwnProperty;
function ua(e) {
  var t = this.__data__;
  return te ? t[e] !== void 0 : ca.call(t, e);
}
var da = "__lodash_hash_undefined__";
function fa(e, t) {
  var n = this.__data__;
  return this.size += this.has(e) ? 0 : 1, n[e] = te && t === void 0 ? da : t, this;
}
function k(e) {
  var t = -1, n = e == null ? 0 : e.length;
  for (this.clear(); ++t < n; ) {
    var a = e[t];
    this.set(a[0], a[1]);
  }
}
k.prototype.clear = na;
k.prototype.delete = aa;
k.prototype.get = sa;
k.prototype.has = ua;
k.prototype.set = fa;
function pa() {
  this.size = 0, this.__data__ = {
    hash: new k(),
    map: new (ee || I)(),
    string: new k()
  };
}
function ga(e) {
  var t = typeof e;
  return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null;
}
function de(e, t) {
  var n = e.__data__;
  return ga(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map;
}
function ma(e) {
  var t = de(this, e).delete(e);
  return this.size -= t ? 1 : 0, t;
}
function ha(e) {
  return de(this, e).get(e);
}
function ba(e) {
  return de(this, e).has(e);
}
function ya(e, t) {
  var n = de(this, e), a = n.size;
  return n.set(e, t), this.size += n.size == a ? 0 : 1, this;
}
function N(e) {
  var t = -1, n = e == null ? 0 : e.length;
  for (this.clear(); ++t < n; ) {
    var a = e[t];
    this.set(a[0], a[1]);
  }
}
N.prototype.clear = pa;
N.prototype.delete = ma;
N.prototype.get = ha;
N.prototype.has = ba;
N.prototype.set = ya;
var va = 200;
function wa(e, t) {
  var n = this.__data__;
  if (n instanceof I) {
    var a = n.__data__;
    if (!ee || a.length < va - 1)
      return a.push([e, t]), this.size = ++n.size, this;
    n = this.__data__ = new N(a);
  }
  return n.set(e, t), this.size = n.size, this;
}
function _(e) {
  var t = this.__data__ = new I(e);
  this.size = t.size;
}
_.prototype.clear = Ln;
_.prototype.delete = Nn;
_.prototype.get = zn;
_.prototype.has = Vn;
_.prototype.set = wa;
function $a(e, t) {
  for (var n = -1, a = e == null ? 0 : e.length; ++n < a && t(e[n], n, e) !== !1; )
    ;
  return e;
}
var le = (function() {
  try {
    var e = H(Object, "defineProperty");
    return e({}, "", {}), e;
  } catch {
  }
})();
function De(e, t, n) {
  t == "__proto__" && le ? le(e, t, {
    configurable: !0,
    enumerable: !0,
    value: n,
    writable: !0
  }) : e[t] = n;
}
var Ta = Object.prototype, Sa = Ta.hasOwnProperty;
function Ot(e, t, n) {
  var a = e[t];
  (!(Sa.call(e, t) && ce(a, n)) || n === void 0 && !(t in e)) && De(e, t, n);
}
function Oa(e, t, n, a) {
  var r = !n;
  n || (n = {});
  for (var i = -1, o = t.length; ++i < o; ) {
    var s = t[i], l = void 0;
    l === void 0 && (l = e[s]), r ? De(n, s, l) : Ot(n, s, l);
  }
  return n;
}
function Ea(e, t) {
  for (var n = -1, a = Array(e); ++n < e; )
    a[n] = t(n);
  return a;
}
var xa = "[object Arguments]";
function Ge(e) {
  return L(e) && R(e) == xa;
}
var Et = Object.prototype, ja = Et.hasOwnProperty, Aa = Et.propertyIsEnumerable, Se = Ge(/* @__PURE__ */ (function() {
  return arguments;
})()) ? Ge : function(e) {
  return L(e) && ja.call(e, "callee") && !Aa.call(e, "callee");
}, ne = Array.isArray;
function Pa() {
  return !1;
}
var xt = typeof exports == "object" && exports && !exports.nodeType && exports, Ke = xt && typeof module == "object" && module && !module.nodeType && module, Ma = Ke && Ke.exports === xt, Xe = Ma ? M.Buffer : void 0, Ca = Xe ? Xe.isBuffer : void 0, Ie = Ca || Pa, Da = 9007199254740991, Ia = /^(?:0|[1-9]\d*)$/;
function jt(e, t) {
  var n = typeof e;
  return t = t ?? Da, !!t && (n == "number" || n != "symbol" && Ia.test(e)) && e > -1 && e % 1 == 0 && e < t;
}
var Ba = 9007199254740991;
function At(e) {
  return typeof e == "number" && e > -1 && e % 1 == 0 && e <= Ba;
}
var Wa = "[object Arguments]", La = "[object Array]", Na = "[object Boolean]", za = "[object Date]", Va = "[object Error]", ka = "[object Function]", Fa = "[object Map]", Ra = "[object Number]", Ua = "[object Object]", Ha = "[object RegExp]", _a = "[object Set]", Ga = "[object String]", Ka = "[object WeakMap]", Xa = "[object ArrayBuffer]", Ya = "[object DataView]", qa = "[object Float32Array]", Qa = "[object Float64Array]", Ja = "[object Int8Array]", Za = "[object Int16Array]", er = "[object Int32Array]", tr = "[object Uint8Array]", nr = "[object Uint8ClampedArray]", ar = "[object Uint16Array]", rr = "[object Uint32Array]", y = {};
y[qa] = y[Qa] = y[Ja] = y[Za] = y[er] = y[tr] = y[nr] = y[ar] = y[rr] = !0;
y[Wa] = y[La] = y[Xa] = y[Na] = y[Ya] = y[za] = y[Va] = y[ka] = y[Fa] = y[Ra] = y[Ua] = y[Ha] = y[_a] = y[Ga] = y[Ka] = !1;
function ir(e) {
  return L(e) && At(e.length) && !!y[R(e)];
}
function Be(e) {
  return function(t) {
    return e(t);
  };
}
var Pt = typeof exports == "object" && exports && !exports.nodeType && exports, J = Pt && typeof module == "object" && module && !module.nodeType && module, or = J && J.exports === Pt, ye = or && $t.process, X = (function() {
  try {
    var e = J && J.require && J.require("util").types;
    return e || ye && ye.binding && ye.binding("util");
  } catch {
  }
})(), Ye = X && X.isTypedArray, Mt = Ye ? Be(Ye) : ir, sr = Object.prototype, lr = sr.hasOwnProperty;
function Ct(e, t) {
  var n = ne(e), a = !n && Se(e), r = !n && !a && Ie(e), i = !n && !a && !r && Mt(e), o = n || a || r || i, s = o ? Ea(e.length, String) : [], l = s.length;
  for (var c in e)
    (t || lr.call(e, c)) && !(o && // Safari 9 has enumerable `arguments.length` in strict mode.
    (c == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
    r && (c == "offset" || c == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
    i && (c == "buffer" || c == "byteLength" || c == "byteOffset") || // Skip index properties.
    jt(c, l))) && s.push(c);
  return s;
}
var cr = Object.prototype;
function We(e) {
  var t = e && e.constructor, n = typeof t == "function" && t.prototype || cr;
  return e === n;
}
function Dt(e, t) {
  return function(n) {
    return e(t(n));
  };
}
var ur = Dt(Object.keys, Object), dr = Object.prototype, fr = dr.hasOwnProperty;
function pr(e) {
  if (!We(e))
    return ur(e);
  var t = [];
  for (var n in Object(e))
    fr.call(e, n) && n != "constructor" && t.push(n);
  return t;
}
function fe(e) {
  return e != null && At(e.length) && !Ce(e);
}
function gr(e) {
  return fe(e) ? Ct(e) : pr(e);
}
function mr(e) {
  var t = [];
  if (e != null)
    for (var n in Object(e))
      t.push(n);
  return t;
}
var hr = Object.prototype, br = hr.hasOwnProperty;
function yr(e) {
  if (!j(e))
    return mr(e);
  var t = We(e), n = [];
  for (var a in e)
    a == "constructor" && (t || !br.call(e, a)) || n.push(a);
  return n;
}
function It(e) {
  return fe(e) ? Ct(e, !0) : yr(e);
}
var Bt = typeof exports == "object" && exports && !exports.nodeType && exports, qe = Bt && typeof module == "object" && module && !module.nodeType && module, vr = qe && qe.exports === Bt, Qe = vr ? M.Buffer : void 0, Je = Qe ? Qe.allocUnsafe : void 0;
function Wt(e, t) {
  if (t)
    return e.slice();
  var n = e.length, a = Je ? Je(n) : new e.constructor(n);
  return e.copy(a), a;
}
function wr(e, t) {
  var n = -1, a = e.length;
  for (t || (t = Array(a)); ++n < a; )
    t[n] = e[n];
  return t;
}
function $r(e, t) {
  for (var n = -1, a = e == null ? 0 : e.length, r = 0, i = []; ++n < a; ) {
    var o = e[n];
    t(o, n, e) && (i[r++] = o);
  }
  return i;
}
function Tr() {
  return [];
}
var Sr = Object.prototype, Or = Sr.propertyIsEnumerable, Ze = Object.getOwnPropertySymbols, Er = Ze ? function(e) {
  return e == null ? [] : (e = Object(e), $r(Ze(e), function(t) {
    return Or.call(e, t);
  }));
} : Tr;
function xr(e, t) {
  for (var n = -1, a = t.length, r = e.length; ++n < a; )
    e[r + n] = t[n];
  return e;
}
var Lt = Dt(Object.getPrototypeOf, Object);
function jr(e, t, n) {
  var a = t(e);
  return ne(e) ? a : xr(a, n(e));
}
function Ar(e) {
  return jr(e, gr, Er);
}
var Oe = H(M, "DataView"), Ee = H(M, "Promise"), xe = H(M, "Set"), je = H(M, "WeakMap"), et = "[object Map]", Pr = "[object Object]", tt = "[object Promise]", nt = "[object Set]", at = "[object WeakMap]", rt = "[object DataView]", Mr = U(Oe), Cr = U(ee), Dr = U(Ee), Ir = U(xe), Br = U(je), D = R;
(Oe && D(new Oe(new ArrayBuffer(1))) != rt || ee && D(new ee()) != et || Ee && D(Ee.resolve()) != tt || xe && D(new xe()) != nt || je && D(new je()) != at) && (D = function(e) {
  var t = R(e), n = t == Pr ? e.constructor : void 0, a = n ? U(n) : "";
  if (a)
    switch (a) {
      case Mr:
        return rt;
      case Cr:
        return et;
      case Dr:
        return tt;
      case Ir:
        return nt;
      case Br:
        return at;
    }
  return t;
});
var Wr = Object.prototype, Lr = Wr.hasOwnProperty;
function Nr(e) {
  var t = e.length, n = new e.constructor(t);
  return t && typeof e[0] == "string" && Lr.call(e, "index") && (n.index = e.index, n.input = e.input), n;
}
var it = M.Uint8Array;
function Le(e) {
  var t = new e.constructor(e.byteLength);
  return new it(t).set(new it(e)), t;
}
function zr(e, t) {
  var n = Le(e.buffer);
  return new e.constructor(n, e.byteOffset, e.byteLength);
}
var Vr = /\w*$/;
function kr(e) {
  var t = new e.constructor(e.source, Vr.exec(e));
  return t.lastIndex = e.lastIndex, t;
}
var ot = K ? K.prototype : void 0, st = ot ? ot.valueOf : void 0;
function Fr(e) {
  return st ? Object(st.call(e)) : {};
}
function Nt(e, t) {
  var n = t ? Le(e.buffer) : e.buffer;
  return new e.constructor(n, e.byteOffset, e.length);
}
var Rr = "[object Boolean]", Ur = "[object Date]", Hr = "[object Map]", _r = "[object Number]", Gr = "[object RegExp]", Kr = "[object Set]", Xr = "[object String]", Yr = "[object Symbol]", qr = "[object ArrayBuffer]", Qr = "[object DataView]", Jr = "[object Float32Array]", Zr = "[object Float64Array]", ei = "[object Int8Array]", ti = "[object Int16Array]", ni = "[object Int32Array]", ai = "[object Uint8Array]", ri = "[object Uint8ClampedArray]", ii = "[object Uint16Array]", oi = "[object Uint32Array]";
function si(e, t, n) {
  var a = e.constructor;
  switch (t) {
    case qr:
      return Le(e);
    case Rr:
    case Ur:
      return new a(+e);
    case Qr:
      return zr(e);
    case Jr:
    case Zr:
    case ei:
    case ti:
    case ni:
    case ai:
    case ri:
    case ii:
    case oi:
      return Nt(e, n);
    case Hr:
      return new a();
    case _r:
    case Xr:
      return new a(e);
    case Gr:
      return kr(e);
    case Kr:
      return new a();
    case Yr:
      return Fr(e);
  }
}
var lt = Object.create, li = /* @__PURE__ */ (function() {
  function e() {
  }
  return function(t) {
    if (!j(t))
      return {};
    if (lt)
      return lt(t);
    e.prototype = t;
    var n = new e();
    return e.prototype = void 0, n;
  };
})();
function zt(e) {
  return typeof e.constructor == "function" && !We(e) ? li(Lt(e)) : {};
}
var ci = "[object Map]";
function ui(e) {
  return L(e) && D(e) == ci;
}
var ct = X && X.isMap, di = ct ? Be(ct) : ui, fi = "[object Set]";
function pi(e) {
  return L(e) && D(e) == fi;
}
var ut = X && X.isSet, gi = ut ? Be(ut) : pi, mi = 1, Vt = "[object Arguments]", hi = "[object Array]", bi = "[object Boolean]", yi = "[object Date]", vi = "[object Error]", kt = "[object Function]", wi = "[object GeneratorFunction]", $i = "[object Map]", Ti = "[object Number]", Ft = "[object Object]", Si = "[object RegExp]", Oi = "[object Set]", Ei = "[object String]", xi = "[object Symbol]", ji = "[object WeakMap]", Ai = "[object ArrayBuffer]", Pi = "[object DataView]", Mi = "[object Float32Array]", Ci = "[object Float64Array]", Di = "[object Int8Array]", Ii = "[object Int16Array]", Bi = "[object Int32Array]", Wi = "[object Uint8Array]", Li = "[object Uint8ClampedArray]", Ni = "[object Uint16Array]", zi = "[object Uint32Array]", h = {};
h[Vt] = h[hi] = h[Ai] = h[Pi] = h[bi] = h[yi] = h[Mi] = h[Ci] = h[Di] = h[Ii] = h[Bi] = h[$i] = h[Ti] = h[Ft] = h[Si] = h[Oi] = h[Ei] = h[xi] = h[Wi] = h[Li] = h[Ni] = h[zi] = !0;
h[vi] = h[kt] = h[ji] = !1;
function oe(e, t, n, a, r, i) {
  var o, s = t & mi;
  if (o !== void 0)
    return o;
  if (!j(e))
    return e;
  var l = ne(e);
  if (l)
    o = Nr(e);
  else {
    var c = D(e), d = c == kt || c == wi;
    if (Ie(e))
      return Wt(e, s);
    if (c == Ft || c == Vt || d && !r)
      o = d ? {} : zt(e);
    else {
      if (!h[c])
        return r ? e : {};
      o = si(e, c, s);
    }
  }
  i || (i = new _());
  var u = i.get(e);
  if (u)
    return u;
  i.set(e, o), gi(e) ? e.forEach(function(w) {
    o.add(oe(w, t, n, w, e, i));
  }) : di(e) && e.forEach(function(w, C) {
    o.set(C, oe(w, t, n, C, e, i));
  });
  var f = Ar, b = l ? void 0 : f(e);
  return $a(b || e, function(w, C) {
    b && (C = w, w = e[C]), Ot(o, C, oe(w, t, n, C, e, i));
  }), o;
}
var Vi = 1, ki = 4;
function os(e) {
  return oe(e, Vi | ki);
}
var Fi = "Expected a function";
function Rt(e, t) {
  if (typeof e != "function" || t != null && typeof t != "function")
    throw new TypeError(Fi);
  var n = function() {
    var a = arguments, r = t ? t.apply(this, a) : a[0], i = n.cache;
    if (i.has(r))
      return i.get(r);
    var o = e.apply(this, a);
    return n.cache = i.set(r, o) || i, o;
  };
  return n.cache = new (Rt.Cache || N)(), n;
}
Rt.Cache = N;
var Ri = "Expected a function";
function ss(e, t, n) {
  var a = !0, r = !0;
  if (typeof e != "function")
    throw new TypeError(Ri);
  return j(n) && (a = "leading" in n ? !!n.leading : a, r = "trailing" in n ? !!n.trailing : r), St(e, t, {
    leading: a,
    maxWait: t,
    trailing: r
  });
}
function Ae(e, t, n) {
  (n !== void 0 && !ce(e[t], n) || n === void 0 && !(t in e)) && De(e, t, n);
}
function Ui(e) {
  return function(t, n, a) {
    for (var r = -1, i = Object(t), o = a(t), s = o.length; s--; ) {
      var l = o[++r];
      if (n(i[l], l, i) === !1)
        break;
    }
    return t;
  };
}
var Hi = Ui();
function _i(e) {
  return L(e) && fe(e);
}
var Gi = "[object Object]", Ki = Function.prototype, Xi = Object.prototype, Ut = Ki.toString, Yi = Xi.hasOwnProperty, qi = Ut.call(Object);
function Qi(e) {
  if (!L(e) || R(e) != Gi)
    return !1;
  var t = Lt(e);
  if (t === null)
    return !0;
  var n = Yi.call(t, "constructor") && t.constructor;
  return typeof n == "function" && n instanceof n && Ut.call(n) == qi;
}
function Pe(e, t) {
  if (!(t === "constructor" && typeof e[t] == "function") && t != "__proto__")
    return e[t];
}
function Ji(e) {
  return Oa(e, It(e));
}
function Zi(e, t, n, a, r, i, o) {
  var s = Pe(e, n), l = Pe(t, n), c = o.get(l);
  if (c) {
    Ae(e, n, c);
    return;
  }
  var d = i ? i(s, l, n + "", e, t, o) : void 0, u = d === void 0;
  if (u) {
    var f = ne(l), b = !f && Ie(l), w = !f && !b && Mt(l);
    d = l, f || b || w ? ne(s) ? d = s : _i(s) ? d = wr(s) : b ? (u = !1, d = Wt(l, !0)) : w ? (u = !1, d = Nt(l, !0)) : d = [] : Qi(l) || Se(l) ? (d = s, Se(s) ? d = Ji(s) : (!j(s) || Ce(s)) && (d = zt(l))) : u = !1;
  }
  u && (o.set(l, d), r(d, l, a, i, o), o.delete(l)), Ae(e, n, d);
}
function Ht(e, t, n, a, r) {
  e !== t && Hi(t, function(i, o) {
    if (r || (r = new _()), j(i))
      Zi(e, t, o, n, Ht, a, r);
    else {
      var s = a ? a(Pe(e, o), i, o + "", e, t, r) : void 0;
      s === void 0 && (s = i), Ae(e, o, s);
    }
  }, It);
}
function _t(e) {
  return e;
}
function eo(e, t, n) {
  switch (n.length) {
    case 0:
      return e.call(t);
    case 1:
      return e.call(t, n[0]);
    case 2:
      return e.call(t, n[0], n[1]);
    case 3:
      return e.call(t, n[0], n[1], n[2]);
  }
  return e.apply(t, n);
}
var dt = Math.max;
function to(e, t, n) {
  return t = dt(t === void 0 ? e.length - 1 : t, 0), function() {
    for (var a = arguments, r = -1, i = dt(a.length - t, 0), o = Array(i); ++r < i; )
      o[r] = a[t + r];
    r = -1;
    for (var s = Array(t + 1); ++r < t; )
      s[r] = a[r];
    return s[t] = n(o), eo(e, this, s);
  };
}
function no(e) {
  return function() {
    return e;
  };
}
var ao = le ? function(e, t) {
  return le(e, "toString", {
    configurable: !0,
    enumerable: !1,
    value: no(t),
    writable: !0
  });
} : _t, ro = 800, io = 16, oo = Date.now;
function so(e) {
  var t = 0, n = 0;
  return function() {
    var a = oo(), r = io - (a - n);
    if (n = a, r > 0) {
      if (++t >= ro)
        return arguments[0];
    } else
      t = 0;
    return e.apply(void 0, arguments);
  };
}
var lo = so(ao);
function co(e, t) {
  return lo(to(e, t, _t), e + "");
}
function uo(e, t, n) {
  if (!j(n))
    return !1;
  var a = typeof t;
  return (a == "number" ? fe(n) && jt(t, n.length) : a == "string" && t in n) ? ce(n[t], e) : !1;
}
function fo(e) {
  return co(function(t, n) {
    var a = -1, r = n.length, i = r > 1 ? n[r - 1] : void 0, o = r > 2 ? n[2] : void 0;
    for (i = e.length > 3 && typeof i == "function" ? (r--, i) : void 0, o && uo(n[0], n[1], o) && (i = r < 3 ? void 0 : i, r = 1), t = Object(t); ++a < r; ) {
      var s = n[a];
      s && e(t, s, a, i);
    }
    return t;
  });
}
var ls = fo(function(e, t, n) {
  Ht(e, t, n);
});
const po = 100, Ne = /* @__PURE__ */ new Map(), ie = {
  width: window.innerWidth,
  height: window.innerHeight
}, go = (e) => {
  Ne.set(e, e);
}, ho = (e) => {
  Ne.delete(e);
}, bo = St((e) => {
  const t = e;
  t.topEvent = {
    widthDiff: ie.width - window.innerWidth,
    hightDiff: ie.height - window.innerHeight
  }, ie.width = window.innerWidth, ie.height = window.innerHeight, Ne.forEach((n) => n(t));
}, po);
window.addEventListener("resize", bo);
const yo = {
  addOnReize: go,
  removeOnResize: ho
}, G = {
  /**
   * Имя темы оформления
   *
   * В данный момент не используется для загрузки css
   *
   * @todo Реализовать загрузки и замену css темы на стороне UI
   *
   * @see https://ui.topvisor.com/?path=/docs/core-theme--docs
   */
  themeName: "light",
  /**
   * CSS-классы модификаторы для документа страницы
   *
   * Могут использоваться компонентами для включения необходимых режимов отображения страницы
   *
   * Разные компоненты могут добавлять один и тот же класс, чтобы не было конфликтов каждый компонент управляет только своим классом:
   * - Ключ - уникальное имя компонента, например в setup: `const uid = Math.random();`
   * - Значение - класс модификатора
   */
  documentClassModificators: /* @__PURE__ */ new Map(),
  /**
   * Базовая ширина страницы для отображения ПК / Мобильной версии сайта
   *
   * @see Core state isMobile
   */
  widthForMobile: 900,
  /**
   * Формат даты, который будет использоваться по умолчанию для вывода даты, как правило, зависит от текущего пользователя
   */
  dateFormat: "Y-m-d",
  /**
   * Валюта, которая будет использоваться по умолчанию, как правило, зависит от текущего пользователя
   */
  currency: "USD",
  /**
   * Смещение timezone относительно UTC в минутах
   * Для Москвы: -180
   */
  timezoneOffset: (/* @__PURE__ */ new Date()).getTimezoneOffset()
}, vo = {
  /**
   * CSS-классы модификаторы для документа страницы
   */
  documentClassModificators: G.documentClassModificators,
  dateFormat: G.dateFormat,
  currency: G.currency,
  timezoneOffset: G.timezoneOffset,
  /**
   * Device by size
   *
   * @see Core widthForMobile
   */
  isMobile: !1,
  /**
   * Device by user agent
   */
  isMobileUA: !1,
  /**
   * true, если плотность пикселей экрана больше 1
   */
  isRetina: !1,
  /**
   * true, елси это приложение
   */
  isApp: !1,
  /**
   * true при горизонтальном расположении устройства
   */
  isLandscape: !0,
  /**
   * true при вертикальном расположении устройства
   */
  isPortrait: !1,
  /**
   * Максимальная сторона страницы
   */
  size: 0,
  /**
   * true, если страница скрыта
   *
   * Не меняйте это значение вручную
   */
  isHidden: !1
};
class wo {
  /**
   * Загрузить в память полный функционал TopNotice
   */
  static async TopNotice() {
    await import("./notice-Ckc8r96E.es.js");
  }
  /**
   * Загрузить в память полный функционал TopPopup
   */
  static async TopPopup() {
    await import("./popup-DpyyE2Cs.es.js");
  }
  /**
   * Загрузить в память полный функционал TopDialog
   */
  static async TopDialog() {
    const { TopDialogWorker: t } = await import("../core/app.js");
    await t.getDialogsUtils();
  }
}
class g {
  static state = ve({ ...vo });
  static preloaders = wo;
  static widthForMobile = G.widthForMobile;
  static themeName = G.themeName;
  static matchMediaIsMobile;
  static $ = $;
  static Events = yo;
  /**
   * Различные флаги, необходимые для работы UI
   */
  static flags = ve({ needLoadNotice: !1 });
  static _setState() {
    this.$ = $, g.matchMediaIsMobile = window.matchMedia(`(max-width: ${g.widthForMobile}px)`), g.state.isMobileUA = nn(), g.state.isRetina = tn(), g.state.isApp = an(), g.useDocumentClassModificators(), g.useIsHidden(), g.setStateByWindowSize(), g.Events.addOnReize(g.onResize), g.onResize(), g.saveToCookie(), g.useCtrlClasses();
  }
  static useDocumentClassModificators() {
    mt(() => [...g.state.documentClassModificators], (t, n) => {
      let a = /* @__PURE__ */ new Set();
      n?.forEach(([r, i]) => a.add(i)), t.forEach(([r, i]) => a.delete(i)), a.forEach((r) => document.documentElement.classList.remove(r)), t.forEach(([r, i]) => document.documentElement.classList.add(i));
    }, { immediate: !0 });
  }
  static useIsHidden() {
    document.addEventListener("visibilitychange", () => {
      g.state.isHidden = document.hidden;
    }), g.state.isHidden = document.hidden;
  }
  static setStateByWindowSize() {
    g.state.isMobile = !!g.matchMediaIsMobile?.matches, g.state.isLandscape = window.innerWidth > window.innerHeight, g.state.isPortrait = !g.state.isLandscape, g.state.size = window.innerWidth > window.innerHeight ? window.innerWidth : window.innerHeight, g.saveToCookie();
  }
  static onResize() {
    g.setStateByWindowSize();
  }
  /**
   * Сохранить информацию об устройстве в cookie
   */
  static saveToCookie() {
    const t = [
      1,
      window.innerWidth,
      window.innerHeight,
      window.devicePixelRatio,
      Number(g.state.isMobile),
      Number(g.state.isRetina)
    ];
    document.cookie = "device=" + t.join(",") + "; path=/;";
  }
  /**
   * Добавить установку класса при нажатии ctrl (cmd) / alt
   */
  static useCtrlClasses() {
    const t = document.body.classList;
    document.addEventListener("keydown", (n) => {
      (n.ctrlKey || n.metaKey) && t.add("top-body-press_ctrl"), n.altKey && t.add("top-body-press_alt");
    }), document.addEventListener("keyup", () => t.remove("top-body-press_ctrl", "top-body-press_alt")), document.addEventListener("keypress", () => t.remove("top-body-press_ctrl", "top-body-press_alt")), window.addEventListener("blur", () => t.remove("top-body-press_ctrl", "top-body-press_alt"));
  }
  /**
   * Вывести на экране сообщение в стилизации под push уведомление
   *
   * Для удобства работы со словарем, принимает один парамтер `text` и первую строку из него использует как `title`.
   * Данное поведение можно изменить, передав в параметрах `options.title`
   *
   * Для вывода используется компонент TopNotice, требует его подклчючения
   *
   * @docs https://ui.topvisor.com/?path=/docs/components-core-notice--docs
   */
  static notice = async (t, n, a) => (g.flags.needLoadNotice = !0, (await import("./notice-Ckc8r96E.es.js")).show(t, n, a));
  /**
   * Вставить css стили на страницу по ссылке с автоматическим добавлением правил media
   *
   * Правила media:
   * - Файлы *.m.css будут грузиться, только на экранах с шириной менее, чем Core.widthForMobile
   * - Файлы *.pc.css будут грузиться, только на экранах с шириной более, чем Core.widthForMobile
   *
   * Настройкой Core.widthForMobile можно управлять через plugin: @topvisor/ui/plugin/core
   *
   * @param fileNames - список ссылок на css файлы
   * @param useSync - использовать синхронную загрузку css, только для css с того же домена. В синхронном режиме стили предзагружаются независимо от
   * media
   */
  static insertCSSLinkToPage = (t, n = !1) => {
    const a = /* @__PURE__ */ new Map();
    a.set("::", []), t.forEach((i) => {
      let o = !1, s = !1;
      i.match(/\.m\./) && (o = !0), i.match(/\.pc\./) && (s = !0);
      const l = `${o}:${s}`;
      a.has(l) || a.set(`${o}:${s}`, []), a.get(`${o}:${s}`).push(i);
    });
    const r = [];
    return a.forEach((i, o) => {
      if (!i.length)
        return;
      const [s, l] = o.split(":").map((u) => u === "true");
      let c = "all";
      s && (c = "(max-width: " + g.widthForMobile + "px)"), l && (c = "(min-width: " + g.widthForMobile + "px)"), g._insertToPage(i, c, n).forEach((u) => r.push(u));
    }), Promise.all(r);
  };
  static _insertToPage = (t, n, a) => {
    const r = [];
    return t.forEach((i) => {
      if (a) {
        const u = new XMLHttpRequest();
        u.open("GET", i, !1), u.send();
      }
      const o = "topCSSLink-" + i.replace(/\W/g, "-");
      if (window.hasOwnProperty(o)) return;
      let s, l;
      const c = new Promise((u, f) => {
        s = u, l = f;
      });
      r.push(c);
      const d = document.createElement("link");
      d.id = o, d.rel = "stylesheet", d.media = n, d.href = i, d.onload = () => s(), d.onerror = () => l(), document.head.append(d);
    }), r;
  };
  /**
   * Вставить css стили на страницу с автоматическим добавлением правил media
   *
   * Загрузка с Vite:
   *
   * ```js
   * import style from '/style.css?inline';
   *
   * insertToPageAsInine(style);
   * ```
   *
   * Загрузка с fetch:
   *
   * ```js
   * const style = await fetch('./style.css');
   *
   * insertToPageAsInine(style);
   * ```
   *
   * @param style - css стили в строке
   * @param type - если указать 'm' или 'pc', то стили будут применяться по условию в зависимости от настройки this.widthForMobile
   *
   * @see insertToPage
   */
  static insertStyleToPage = (t, n = "") => {
    let a = "all";
    n === "m" && (a = "(max-width: " + g.widthForMobile + "px)"), n === "pc" && (a = "(min-width: " + g.widthForMobile + "px)");
    const r = document.createElement("style");
    r.innerHTML = t, r.media = a, document.head.append(r);
  };
}
const cs = {
  install: (e, t) => {
    const n = (a, r, i) => {
      if (!e.config.globalProperties.$i18n[a][r]) return "";
      let o = e.config.globalProperties.$i18n[a][r] + "";
      for (const s in i)
        o = o.replaceAll(new RegExp(`{{ ${s} }}`, "g"), String(i[s]));
      return o;
    };
    Object.setPrototypeOf(n, ve(t.i18n)), e.config.globalProperties.$i18n = n, e.config.globalProperties.$i18nLang = Me(t.lang), e.config.globalProperties.i18n = e.config.globalProperties.$i18n, typeof window < "u" && !window.requirejs && (globalThis.$i18n = e.config.globalProperties.$i18n), e.provide("$i18n", e.config.globalProperties.$i18n), e.provide("$i18nLang", e.config.globalProperties.$i18nLang), e.provide("i18n", e.config.globalProperties.i18n);
  }
}, pe = () => !we() && window.mo?.user?.lang ? requirejs("i18n").categories[mo.user.lang] : !we() && globalThis.$i18n ? globalThis.$i18n : ht("$i18n"), us = () => !we() && window.mo?.user?.lang ? Me(mo.user.lang) : ht("$i18nLang"), ds = (e, t, n) => {
  const a = pe().Calendar;
  switch (new Date(e, --t, n).getDay()) {
    case 0:
      return a.Dw_1 + ".";
    case 1:
      return a.Dw_2 + ".";
    case 2:
      return a.Dw_3 + ".";
    case 3:
      return a.Dw_4 + ".";
    case 4:
      return a.Dw_5 + ".";
    case 5:
      return a.Dw_6 + ".";
    case 6:
      return a.Dw_7 + ".";
    default:
      return "";
  }
}, fs = (e, t = !0, n = 2) => {
  let a = String(e.getFullYear()), r = String(e.getDate()).padStart(2, "0"), i = String(e.getMonth() + 1).padStart(2, "0"), o = String(e.getHours()).padStart(2, "0"), s = String(e.getMinutes()).padStart(2, "0"), l = String(e.getSeconds()).padStart(2, "0"), c = a + "-" + i + "-" + r;
  return n >= 1 && (c += " " + o), n >= 2 && (c += ":" + s), n === 3 && (c += ":" + l), t && (c = F(c, n)), c;
};
function ps(e) {
  if (e.indexOf("T") === -1) {
    e.length == 10 && (e += " 00:00:00");
    const t = g.state.timezoneOffset >= 0 ? "-" : "+", n = Math.abs(g.state.timezoneOffset) / 60;
    let a;
    if (Number.isInteger(n))
      a = t + n.toString().padStart(2, "0") + ":00";
    else {
      const r = Math.floor(n), i = Math.round((n - r) * 60);
      a = t + r.toString().padStart(2, "0") + ":" + i.toString().padStart(2, "0");
    }
    e = e.replace(" ", "T") + a;
  }
  return new Date(e);
}
const gs = (e = (/* @__PURE__ */ new Date()).getTime(), t = !0, n = 0) => Gt(e, t, n, g.state.timezoneOffset);
function Gt(e = (/* @__PURE__ */ new Date()).getTime(), t = !0, n = 0, a) {
  const r = a ? e + (/* @__PURE__ */ new Date()).getTimezoneOffset() * 60 * 1e3 - a * 60 * 1e3 : e, i = new Date(r), o = i.getFullYear(), s = String(i.getMonth() + 1).padStart(2, "0"), l = i.getDate().toString().padStart(2, "0"), c = i.getHours().toString().padStart(2, "0"), d = i.getMinutes().toString().padStart(2, "0"), u = i.getSeconds().toString().padStart(2, "0");
  n === "auto" && (n = 0, i.getHours() && (n = 1), i.getMinutes() && (n = 2), i.getSeconds() && (n = 3));
  let f = o + "-" + s + "-" + l;
  return n && (f += " "), n >= 1 && (f += c), n >= 2 && (f += ":" + d), n >= 3 && (f += ":" + u), t && (a ? f = F(f, n) : f = F(i, n)), f;
}
function ms(e, t = !0) {
  const a = (/* @__PURE__ */ new Date()).getTimezoneOffset() / 60 * -1 * 60 * 60 * 1e3, r = 10800 * 1e3;
  let i;
  e !== void 0 ? i = new Date(e) : i = /* @__PURE__ */ new Date(), i.setTime(i.getTime() - a + r);
  let o = String(i.getFullYear()), s = String(i.getDate()).padStart(2, "0"), l = String(i.getMonth() + 1).padStart(2, "0"), c = String(i.getHours()).padStart(2, "0"), d = String(i.getMinutes()).padStart(2, "0"), u = String(i.getSeconds()).padStart(2, "0"), f = o + "-" + l + "-" + s + " " + c + ":" + d + ":" + u;
  return t && (f = F(f)), f;
}
function F(e, t = 2, n, a) {
  if (a || (a = pe().Common.Not_date), typeof e == "string" && (!e || e.substring(0, 10) === "0000-00-00") && a && a !== "0000-00-00" || !e) return a;
  n || (n = g.state.dateFormat), n = n.toLowerCase().replace("m", "mm").replace("y", "yy").replace("d", "dd");
  let r;
  if (e instanceof Date)
    r = e;
  else {
    let o = e.substring(0, 10);
    if (o.length === 7 && (o += "-01"), o += " 00:00", o = o.replace(/-/g, "/"), r = new Date(o), isNaN(Number(r))) return a;
  }
  let i = "";
  if (n) {
    const o = String(r.getDate()).padStart(2, "0"), s = String(r.getMonth() + 1).padStart(2, "0"), l = String(r.getFullYear());
    i = n.replace("dd", o).replace("mm", s).replace("yy", l);
  }
  if (t && typeof e == "string" && e.length > 10 || t && e instanceof Date) {
    let o = "";
    if (e instanceof Date)
      o = (/* @__PURE__ */ new Date()).toLocaleTimeString("en-US", {
        hour12: !1,
        hour: "numeric",
        minute: t >= 2 ? "numeric" : void 0,
        second: t >= 3 ? "numeric" : void 0
      });
    else
      switch (t) {
        // часы
        case 1:
          o = e.substring(11, 13);
          break;
        // часы и минуты
        case 2:
          o = e.substring(11, 16);
          break;
        // часы, минуты и секунды
        case 3:
          o = e.substring(11, 19);
          break;
      }
    i += " " + o;
  }
  return i = i.trim(), i;
}
function ft(e, t) {
  if (t || (t = pe().Common.Not_date), !e)
    return t;
  if (e.match(/\d\d\d\d-\d\d-\d\d/))
    return e;
  const n = g.state.dateFormat.toLowerCase(), a = e.split(/\W/), r = n.split(/\W/);
  let i = "", o = "", s = "";
  r.forEach((c, d) => {
    switch (c) {
      case "d":
        i = a[d];
        break;
      case "m":
        o = a[d];
        break;
      case "y":
        s = a[d];
        break;
    }
  });
  let l = s + "-" + o + "-" + i;
  return l.match(/\d\d\d\d-\d\d-\d\d/) || (console.info("Неверный формат даты, будет возращена текущая дата, " + l), l = Gt((/* @__PURE__ */ new Date()).getTime(), !1).substring(0, 10)), l;
}
const $o = { class: "top-avatar" }, To = ["src", "title"], So = ["title"], hs = /* @__PURE__ */ O({
  __name: "avatar",
  props: {
    size: { default: 64 },
    image: {},
    nickname: {},
    isOnline: { type: Boolean },
    lastActiveTime: {},
    i18n: { default: () => ({
      Online: "Online",
      LastSeen: "Last seen"
    }) }
  },
  setup(e) {
    bt((r) => ({
      v52a765e6: r.size + "px"
    }));
    const t = e, n = E(() => {
      if (t.isOnline)
        return t.i18n?.Online;
      if (t.lastActiveTime)
        return t.i18n?.LastSeen + ": " + F(t.lastActiveTime, 2);
    }), a = E(() => t.nickname ? t.nickname + (n.value ? `
${n.value}` : "") : n.value);
    return (r, i) => (p(), m("div", $o, [
      P("img", {
        class: "top-avatar_image",
        src: e.image,
        title: a.value,
        alt: ""
      }, null, 8, To),
      e.isOnline ? (p(), m("div", {
        key: 0,
        class: "top-avatar_status",
        title: n.value
      }, null, 8, So)) : T("", !0)
    ]));
  }
}), Oo = ["data-top-badge"], Eo = {
  key: 1,
  class: "top-ellipsis"
}, bs = /* @__PURE__ */ O({
  __name: "button",
  props: {
    color: { default: "blue" },
    styling: { default: "" },
    size: { default: "s" },
    name: {},
    title: {},
    icon: {},
    icon2: {},
    href: {},
    badgeNumber: {},
    badgePosAfterText: { type: Boolean },
    disabled: { type: Boolean },
    isSubmit: { type: Boolean },
    isActive: { type: Boolean },
    isProgress: { type: Boolean },
    autoWidth: { type: Boolean }
  },
  setup(e) {
    const t = e, n = E(() => t.href ? "a" : "button"), a = E(() => t.isSubmit ? "submit" : void 0);
    return (r, i) => (p(), W(Yt(n.value), {
      class: S({
        "top-active": e.isActive,
        "top-disabled": e.disabled,
        "top-forms-focusable": !e.disabled,
        "top-button": !0,
        "top-button-progress": e.isProgress,
        [`top-size_${e.size}`]: !!e.size,
        [`top-color_${e.color}`]: !0,
        [`top-style_${e.styling}`]: !!e.styling,
        "top-button-autoWidth": e.autoWidth,
        "top-button-withoutText": !r.$slots.default
      }),
      name: e.name,
      title: e.title,
      href: e.href,
      type: a.value,
      "data-top-icon": e.icon || void 0,
      "data-top-icon2": e.icon2 || void 0,
      disabled: e.disabled || void 0,
      inProgress: e.isProgress
    }, {
      default: ae(() => [
        e.badgeNumber ? (p(), m("span", {
          key: 0,
          "data-top-badge": e.badgeNumber,
          class: S(["top-button_badge", {
            "top-button_badge-afterText": e.badgePosAfterText
          }])
        }, null, 10, Oo)) : T("", !0),
        r.$slots.default ? (p(), m("span", Eo, [
          x(r.$slots, "default", {}, () => [
            Z(A(e.icon ? "" : "Button"), 1)
          ])
        ])) : T("", !0),
        x(r.$slots, "html")
      ]),
      _: 3
    }, 8, ["class", "name", "title", "href", "type", "data-top-icon", "data-top-icon2", "disabled", "inProgress"]));
  }
}), xo = { class: "top-caption" }, jo = { class: "top-caption_text" }, ys = /* @__PURE__ */ O({
  __name: "caption",
  props: {
    text: {}
  },
  setup(e) {
    return (t, n) => (p(), m("label", xo, [
      P("div", jo, [
        x(t.$slots, "text", {}, () => [
          Z(A(e.text ? e.text : " "), 1)
        ])
      ]),
      x(t.$slots, "default")
    ]));
  }
}), Ao = { class: "top-forms-optionLabel" }, ze = /* @__PURE__ */ O({
  __name: "controlLabel",
  props: {
    description: {},
    disabled: { type: Boolean }
  },
  setup(e) {
    return (t, n) => (p(), m("div", Ao, [
      P("div", {
        class: S({
          "top-forms-optionLabel_title": !0,
          "top-forms-optionLabel_title-disabled": e.disabled
        })
      }, [
        x(t.$slots, "default")
      ], 2),
      e.description ? (p(), m("div", {
        key: 0,
        class: S(["top-forms-optionLabel_description", { "top-forms-optionLabel_description-disabled": e.disabled }])
      }, A(e.description), 3)) : T("", !0)
    ]));
  }
}), Po = ["name", "value", "indeterminate", "disabled"], vs = /* @__PURE__ */ O({
  __name: "checkbox",
  props: /* @__PURE__ */ $e({
    modelValue: { type: [Boolean, Array, Set] },
    name: {},
    value: {},
    description: {},
    disabled: { type: Boolean },
    indeterminate: { type: Boolean },
    isError: { type: Boolean }
  }, {
    modelValue: { type: [Boolean, Array, Set] },
    modelModifiers: {}
  }),
  emits: ["update:modelValue"],
  setup(e) {
    const t = yt(e, "modelValue");
    return (n, a) => {
      const r = z("top-focus");
      return p(), m("label", {
        class: S({
          "top-forms-optionWrapper": !0,
          "top-checkbox": !0,
          ["top-checkbox_" + e.name]: !!e.name,
          "top-disabled": e.disabled,
          "top-error": e.isError && !e.disabled
        })
      }, [
        V(P("input", {
          type: "checkbox",
          class: S({
            "top-forms-focusable": !e.disabled,
            "top-forms-option": !0,
            "top-checkbox_input": !0,
            "top-error": e.isError && !e.disabled
          }),
          name: e.name,
          "onUpdate:modelValue": a[0] || (a[0] = (i) => t.value = i),
          value: e.value,
          indeterminate: e.indeterminate,
          disabled: e.disabled
        }, null, 10, Po), [
          [
            r,
            e.isError,
            void 0,
            { onupdate: !0 }
          ],
          [vt, t.value]
        ]),
        n.$slots.default ? (p(), W(ze, {
          key: 0,
          description: e.description,
          disabled: e.disabled
        }, {
          default: ae(() => [
            x(n.$slots, "default")
          ]),
          _: 3
        }, 8, ["description", "disabled"])) : T("", !0)
      ], 2);
    };
  }
}), Mo = ["title"], Co = /* @__PURE__ */ O({
  __name: "hint",
  props: {
    hint: {}
  },
  setup(e) {
    return (t, n) => (p(), m("span", {
      class: "top-hint",
      "data-top-icon": "",
      title: e.hint
    }, null, 8, Mo));
  }
}), Do = (e, t) => {
  const n = e.__vccOpts || e;
  for (const [a, r] of t)
    n[a] = r;
  return n;
}, Io = {}, Bo = { class: "top-loadbar" };
function Wo(e, t) {
  return p(), m("div", Bo);
}
const Lo = /* @__PURE__ */ Do(Io, [["render", Wo]]), No = ["data-top-icon", "data-top-icon2"], zo = ["name", "title", "placeholder", "disabled", "readonly", "data-1p-ignore"], Vo = {
  key: 2,
  class: "top-formsCaption"
}, pt = /* @__PURE__ */ O({
  inheritAttrs: !1,
  __name: "input",
  props: {
    modelValue: {},
    name: {},
    disabled: { type: Boolean },
    readonly: { type: Boolean },
    modificator: {},
    size: { default: "s" },
    styling: { default: "" },
    isError: { type: Boolean },
    isLoading: { type: Boolean },
    icon: {},
    icon2: {},
    addCleaner: { type: Boolean },
    title: {},
    captionType: { default: "" }
  },
  emits: ["update:modelValue"],
  setup(e, { emit: t }) {
    const n = e, a = t, r = E({
      get() {
        return n.modelValue;
      },
      set(s) {
        a("update:modelValue", s);
      }
    }), i = E(() => n.addCleaner && !n.title || n.captionType !== "" ? "" : n.title), o = (s) => {
      n.modelValue && s.stopPropagation(), a("update:modelValue", "");
    };
    return (s, l) => {
      const c = z("top-focus");
      return p(), m("label", {
        class: S({
          "top-input": !0,
          ["top-size_" + e.size]: !0,
          "top-disabled": e.disabled,
          ["top-input-" + e.modificator]: !!e.modificator,
          "top-input-withCleaner": e.addCleaner && r.value && r.value !== "0000-00-00",
          "top-formsCaptionWrapper": e.captionType !== "",
          "top-formsCaptionWrapper-always": e.captionType === "top"
        }),
        "data-top-icon": e.icon,
        "data-top-icon2": e.icon2
      }, [
        e.isLoading ? (p(), W(Lo, { key: 0 })) : T("", !0),
        V(P("input", se({
          type: "text",
          class: {
            "top-input_input": !0,
            ["top-input_input-" + e.modificator]: !!e.modificator,
            "top-forms-focusable": !e.disabled,
            "top-error": e.isError,
            [`top-style_${e.styling}`]: !!e.styling
          },
          autocomplete: "off_always",
          name: e.name,
          "onUpdate:modelValue": l[0] || (l[0] = (d) => r.value = d),
          title: e.title,
          placeholder: i.value,
          disabled: e.disabled,
          readonly: e.readonly,
          onKeydown: l[1] || (l[1] = qt((d) => e.addCleaner && o(d), ["esc"])),
          "data-1p-ignore": s.$attrs.type !== "email" && s.$attrs.type !== "password"
        }, s.$attrs), null, 16, zo), [
          [
            c,
            e.isError,
            void 0,
            { onupdate: !0 }
          ],
          [wt, r.value]
        ]),
        e.addCleaner && r.value && r.value !== "0000-00-00" ? (p(), m("span", {
          key: 1,
          class: "top-input_cleaner",
          "data-top-icon": "",
          onClick: Qt(o, ["prevent"])
        })) : T("", !0),
        e.captionType !== "" ? (p(), m("span", Vo, [
          e.captionType === "top" ? x(s.$slots, "caption", { key: 0 }, () => [
            Z(A(e.title), 1)
          ]) : (p(), m(Q, { key: 1 }, [
            Z(A(e.title), 1)
          ], 64))
        ])) : T("", !0),
        x(s.$slots, "default")
      ], 10, No);
    };
  }
}), ko = ["value"], Fo = !!document.documentElement.ontouchstart && !!document.createElement("input").showPicker;
let gt = (e) => {
};
const ws = /* @__PURE__ */ O({
  __name: "inputDate",
  props: {
    modelValue: {},
    name: {},
    disabled: { type: Boolean },
    readonly: { type: Boolean },
    modificator: {},
    size: {},
    styling: {},
    isError: { type: Boolean },
    isLoading: { type: Boolean },
    icon: {},
    icon2: { default: "" },
    addCleaner: { type: Boolean },
    title: {},
    captionType: {}
  },
  emits: ["update:modelValue"],
  setup(e, { emit: t }) {
    const n = pe(), a = e, r = t;
    Jt(() => {
      o && o.datepicker("destroy");
    });
    const i = Me();
    let o;
    const s = E({
      get() {
        return F(a.modelValue, 2, void 0, "0000-00-00");
      },
      set(u) {
        u = ft(u, "0000-00-00"), r("update:modelValue", u);
      }
    });
    let l = (u) => {
      gt(u);
    }, c = (u) => {
      const f = ft(u.target.value), b = F(f);
      if (!b || b === n.Common.Not_date || u.target.value !== b) {
        u.target.value = s.value;
        return;
      }
      s.value = u.target.value;
    };
    async function d(u) {
      const f = await import("./datepicker-DPgavbKe.es.js");
      gt = f.oninput, o = f.connectDatepicker(u.target, {
        onSelect: () => c(u)
      }), o && o.datepicker("show");
    }
    return (u, f) => me(Fo) ? (p(), W(pt, se({ key: 0 }, u.$props, {
      modelValue: s.value,
      readonly: "",
      onClick: f[1] || (f[1] = (b) => i.value.showPicker())
    }), {
      default: ae(() => [
        P("input", {
          ref_key: "el",
          ref: i,
          type: "date",
          class: "top-input_input-date",
          value: e.modelValue,
          onChange: f[0] || (f[0] = (b) => s.value = b.target.value),
          tabindex: "-1"
        }, null, 40, ko)
      ]),
      _: 1
    }, 16, ["modelValue"])) : (p(), W(pt, se({ key: 1 }, u.$props, {
      modelValue: s.value,
      "onUpdate:modelValue": f[2] || (f[2] = (b) => b === "" ? s.value = "" : ""),
      onInput: me(l),
      onFocusOnce: d,
      onChange: me(c),
      modificator: "datepicker"
    }), null, 16, ["modelValue", "onInput", "onChange"]));
  }
}), Ro = { class: "top-inputRange" }, $s = /* @__PURE__ */ O({
  __name: "inputRange",
  setup(e) {
    return (t, n) => (p(), m("div", Ro, [
      x(t.$slots, "from"),
      n[0] || (n[0] = P("span", { class: "top-inputRange_dash" }, " — ", -1)),
      x(t.$slots, "to")
    ]));
  }
}), Uo = ["name", "value", "disabled"], Ts = /* @__PURE__ */ O({
  __name: "radio",
  props: {
    modelValue: {},
    value: {},
    name: {},
    description: {},
    disabled: { type: Boolean },
    isError: { type: Boolean }
  },
  emits: ["update:modelValue"],
  setup(e, { emit: t }) {
    const n = e, a = t, r = E({
      get() {
        return n.modelValue;
      },
      set(i) {
        a("update:modelValue", i);
      }
    });
    return (i, o) => {
      const s = z("top-focus");
      return p(), m("label", {
        class: S({
          "top-forms-optionWrapper": !0,
          "top-radio": !0,
          ["top-radio_" + e.name]: e.name !== "",
          "top-disabled": e.disabled,
          "top-error": e.isError && !e.disabled
        })
      }, [
        V(P("input", {
          type: "radio",
          class: S({
            "top-forms-focusable": !e.disabled,
            "top-forms-option": !0,
            "top-radio_input": !0,
            "top-error": e.isError && !e.disabled
          }),
          "onUpdate:modelValue": o[0] || (o[0] = (l) => r.value = l),
          name: e.name,
          value: e.value,
          disabled: e.disabled
        }, null, 10, Uo), [
          [
            s,
            e.isError,
            void 0,
            { onupdate: !0 }
          ],
          [Zt, r.value]
        ]),
        i.$slots.default ? (p(), W(ze, {
          key: 0,
          description: e.description,
          disabled: e.disabled
        }, {
          default: ae(() => [
            x(i.$slots, "default")
          ]),
          _: 3
        }, 8, ["description", "disabled"])) : T("", !0)
      ], 2);
    };
  }
}), Ho = ["name", "value", "disabled"], Ss = /* @__PURE__ */ O({
  __name: "switcher",
  props: {
    modelValue: { type: [Boolean, Array, Set] },
    name: {},
    value: {},
    description: {},
    disabled: { type: Boolean },
    isError: { type: Boolean }
  },
  emits: ["update:modelValue"],
  setup(e, { emit: t }) {
    const n = e, a = t, r = E({
      get() {
        return n.modelValue;
      },
      set(i) {
        a("update:modelValue", i);
      }
    });
    return (i, o) => {
      const s = z("top-focus");
      return p(), m("label", {
        class: S({
          "top-forms-optionWrapper": !0,
          "top-checkboxSwitcher": !0,
          "top-disabled": e.disabled,
          "top-error": e.isError && !e.disabled
        })
      }, [
        V(P("input", {
          type: "checkbox",
          class: S({
            "top-forms-focusable": !e.disabled,
            "top-forms-option": !0,
            "top-checkboxSwitcher_input": !0,
            "top-error": e.isError && !e.disabled
          }),
          "onUpdate:modelValue": o[0] || (o[0] = (l) => r.value = l),
          name: e.name,
          value: e.value,
          disabled: e.disabled
        }, null, 10, Ho), [
          [
            s,
            e.isError,
            void 0,
            { onupdate: !0 }
          ],
          [vt, r.value]
        ]),
        i.$slots.default ? (p(), W(ze, {
          key: 0,
          description: e.description,
          disabled: e.disabled
        }, {
          default: ae(() => [
            x(i.$slots, "default")
          ]),
          _: 3
        }, 8, ["description", "disabled"])) : T("", !0)
      ], 2);
    };
  }
}), _o = ["name", "placeholder", "disabled", "readonly", "rows", "maxlength"], Go = {
  key: 0,
  class: "top-textarea_pseudoContent"
}, Os = /* @__PURE__ */ O({
  inheritAttrs: !1,
  __name: "textarea",
  props: {
    modelValue: {},
    name: {},
    placeholder: {},
    styling: { default: "" },
    rows: { default: 5 },
    minHeight: { default: 120 },
    expandable: { type: Boolean },
    disabled: { type: Boolean },
    readonly: { type: Boolean },
    isError: { type: Boolean },
    hint: {},
    maxLength: {}
  },
  emits: ["update:modelValue"],
  setup(e, { emit: t }) {
    bt((i) => ({
      v7e3a2156: i.minHeight + "px"
    }));
    const n = e, a = t, r = E({
      get() {
        return n.modelValue;
      },
      set(i) {
        a("update:modelValue", i);
      }
    });
    return (i, o) => {
      const s = z("top-focus"), l = z("top-tooltip");
      return p(), m("label", {
        class: S({
          "top-textarea": !0,
          ["top-textarea-" + e.name]: e.name,
          "top-disabled": e.disabled
        })
      }, [
        V(P("textarea", se({
          type: "text",
          class: {
            "top-forms-focusable": !e.disabled,
            "top-textarea_textarea": !0,
            "top-textarea_textarea-expandable": e.expandable,
            "top-error": e.isError,
            [`top-style_${e.styling}`]: !!e.styling
          },
          autocomplete: "off_always",
          name: e.name,
          placeholder: e.placeholder,
          disabled: e.disabled,
          readonly: e.readonly,
          rows: e.expandable ? void 0 : e.rows,
          maxlength: e.maxLength
        }, i.$attrs, {
          "onUpdate:modelValue": o[0] || (o[0] = (c) => r.value = c)
        }), null, 16, _o), [
          [
            s,
            e.isError,
            void 0,
            { onupdate: !0 }
          ],
          [wt, r.value]
        ]),
        e.expandable ? (p(), m("span", Go, A(r.value + " "), 1)) : T("", !0),
        e.hint ? V((p(), W(Co, {
          key: 1,
          class: "top-textarea_hint",
          hint: e.hint
        }, null, 8, ["hint"])), [
          [l]
        ]) : T("", !0),
        e.maxLength ? (p(), m("div", {
          key: 2,
          class: S(["top-textarea_counter", {
            "top-textarea_counter-max": r.value.length >= e.maxLength
          }])
        }, A(r.value.length) + "/" + A(e.maxLength), 3)) : T("", !0)
      ], 2);
    };
  }
}), Ko = ["data-value", "data-top-icon", "data-top-icon2"], Xo = ["name", "disabled"], Yo = ["label", "disabled"], qo = ["value", "selected", "disabled"], Qo = ["value", "selected", "disabled"], Jo = {
  key: 1,
  class: "top-formsCaption"
}, Es = /* @__PURE__ */ O({
  __name: "select",
  props: /* @__PURE__ */ $e({
    modelValue: { type: [String, Number, Boolean] },
    options: {},
    name: {},
    disabled: { type: Boolean },
    icon: {},
    size: { default: "s" },
    styling: { default: "" },
    addChanger: { type: Boolean },
    title: {},
    isError: { type: Boolean }
  }, {
    modelValue: { type: [String, Number, Boolean], required: !0 },
    modelModifiers: {}
  }),
  emits: /* @__PURE__ */ $e(["update:modelValue"], ["update:modelValue"]),
  setup(e) {
    const t = e, n = yt(e, "modelValue"), a = E(() => {
      const l = /* @__PURE__ */ new Map();
      return t.options.forEach((c, d) => {
        if (typeof c == "string" && (c = i(d, c)), c.children) {
          const u = /* @__PURE__ */ new Map();
          c.children.forEach((f, b) => {
            typeof f == "string" && (f = i(b, f)), u.set(f.value, f);
          }), c = { ...c }, c.children = u, l.set(c.value, c);
        } else
          l.set(c.value, c);
      }), l;
    }), r = E(() => {
      const l = /* @__PURE__ */ new Map();
      return a.value.forEach((c) => {
        if (!c.disabled) {
          if (c.children) {
            c.children.forEach((d) => {
              d.disabled || l.set(d.value, d);
            });
            return;
          }
          l.set(c.value, c);
        }
      }), l;
    }), i = (l, c) => ({
      value: l,
      title: c
    });
    mt([
      () => t.modelValue,
      r
    ], () => {
      (n.value === null || n.value === void 0) && r.value.size && (console.warn("Пожалуйста, не передавайте в компонент Select значения null и undefined"), n.value = r.value.keys().next().value);
    }, { immediate: !0 });
    const o = E(() => r.value.get(n.value)?.icon), s = () => {
      const l = [...r.value.keys()], d = (l.indexOf(n.value) + 1) % l.length;
      n.value = l[d];
    };
    return (l, c) => {
      const d = z("top-focus");
      return p(), m("label", {
        class: S({
          "top-select": !0,
          ["top-select-" + e.name]: e.name,
          ["top-size_" + e.size]: !0,
          "top-formsCaptionWrapper": !!(e.title || l.$slots.caption),
          "top-select-error": e.isError,
          "top-disabled": e.disabled
        }),
        "data-value": n.value,
        "data-top-icon": e.icon,
        "data-top-icon2": o.value
      }, [
        V((p(), m("select", {
          class: S({
            "top-forms-focusable": !e.disabled,
            "top-select_select": !0,
            "top-as-selector": !0,
            "top-error": e.isError,
            [`top-style_${e.styling}`]: !!e.styling
          }),
          name: e.name,
          disabled: e.disabled,
          "onUpdate:modelValue": c[0] || (c[0] = (u) => n.value = u)
        }, [
          (p(!0), m(Q, null, Te(a.value, ([u, f]) => (p(), m(Q, null, [
            f.children ? (p(), m("optgroup", {
              key: "group_" + u,
              label: f.title,
              disabled: f.disabled
            }, [
              (p(!0), m(Q, null, Te(f.children, ([b, w]) => (p(), m("option", {
                key: String(b),
                value: b,
                selected: b === n.value,
                disabled: w.disabled
              }, A(w.title), 9, qo))), 128))
            ], 8, Yo)) : (p(), m("option", {
              key: u ? String(u) : void 0,
              value: u,
              selected: u === n.value,
              disabled: f.disabled
            }, A(f.title), 9, Qo))
          ], 64))), 256))
        ], 10, Xo)), [
          [
            d,
            e.isError,
            void 0,
            { onupdate: !0 }
          ],
          [en, n.value]
        ]),
        e.addChanger && r.value.size && !e.disabled ? (p(), m("span", {
          key: 0,
          class: "top-changer",
          onClick: s
        })) : T("", !0),
        e.title || l.$slots.caption ? (p(), m("span", Jo, [
          x(l.$slots, "caption", {}, () => [
            Z(A(e.title), 1)
          ])
        ])) : T("", !0)
      ], 10, Ko);
    };
  }
}), xs = /* @__PURE__ */ O({
  __name: "preloader",
  props: {
    type: {}
  },
  setup(e) {
    return (t, n) => (p(), m("div", {
      class: S({
        ["top-preloader-" + e.type]: !0
      })
    }, [
      e.type === "circles" ? (p(), m(Q, { key: 0 }, Te([1, 2, 3], (a) => P("i")), 64)) : T("", !0)
    ], 2));
  }
});
export {
  rs as A,
  on as B,
  g as C,
  is as D,
  yo as E,
  os as F,
  Rt as G,
  ss as H,
  ls as I,
  ds as J,
  fs as K,
  ps as L,
  gs as M,
  Gt as N,
  ms as O,
  ft as P,
  ys as Q,
  Lo as T,
  pt as _,
  us as a,
  es as b,
  F as c,
  St as d,
  bs as e,
  Co as f,
  Os as g,
  vs as h,
  cs as i,
  Ts as j,
  Do as k,
  rn as l,
  hs as m,
  ze as n,
  ws as o,
  $s as p,
  Es as q,
  Ss as r,
  xs as s,
  tn as t,
  pe as u,
  nn as v,
  an as w,
  ts as x,
  ns as y,
  as as z
};
//# sourceMappingURL=forms-BpbQYyEQ.es.js.map
