const pc = window.pc;
import { Debugger as Vh, BaseSystem as Vv } from "./core.mjs";
import { SystemName as Rl, CompletionType as qv, HardwareType as ho, ModuleName as vu, ScreenOrientationType as Gv, OsType as Yv } from "./types.mjs";
import { resolveAssetPath as yo } from "./config.mjs";
function Qv(l, i) {
  for (var o = 0; o < i.length; o++) {
    const s = i[o];
    if (typeof s != "string" && !Array.isArray(s)) {
      for (const f in s)
        if (f !== "default" && !(f in l)) {
          const u = Object.getOwnPropertyDescriptor(s, f);
          u && Object.defineProperty(l, f, u.get ? u : {
            enumerable: !0,
            get: () => s[f]
          });
        }
    }
  }
  return Object.freeze(Object.defineProperty(l, Symbol.toStringTag, { value: "Module" }));
}
function qh(l) {
  return l && l.__esModule && Object.prototype.hasOwnProperty.call(l, "default") ? l.default : l;
}
var Xc = { exports: {} }, Di = {};
var k0;
function Xv() {
  if (k0) return Di;
  k0 = 1;
  var l = Symbol.for("react.transitional.element"), i = Symbol.for("react.fragment");
  function o(s, f, u) {
    var p = null;
    if (u !== void 0 && (p = "" + u), f.key !== void 0 && (p = "" + f.key), "key" in f) {
      u = {};
      for (var m in f)
        m !== "key" && (u[m] = f[m]);
    } else u = f;
    return f = u.ref, {
      $$typeof: l,
      type: s,
      key: p,
      ref: f !== void 0 ? f : null,
      props: u
    };
  }
  return Di.Fragment = i, Di.jsx = o, Di.jsxs = o, Di;
}
var N0;
function Zv() {
  return N0 || (N0 = 1, Xc.exports = Xv()), Xc.exports;
}
var S = Zv(), Zc = { exports: {} }, zi = {}, Kc = { exports: {} }, Jc = {};
var R0;
function Kv() {
  return R0 || (R0 = 1, function(l) {
    function i(R, Q) {
      var q = R.length;
      R.push(Q);
      e: for (; 0 < q; ) {
        var ye = q - 1 >>> 1, C = R[ye];
        if (0 < f(C, Q))
          R[ye] = Q, R[q] = C, q = ye;
        else break e;
      }
    }
    function o(R) {
      return R.length === 0 ? null : R[0];
    }
    function s(R) {
      if (R.length === 0) return null;
      var Q = R[0], q = R.pop();
      if (q !== Q) {
        R[0] = q;
        e: for (var ye = 0, C = R.length, $ = C >>> 1; ye < $; ) {
          var I = 2 * (ye + 1) - 1, L = R[I], X = I + 1, le = R[X];
          if (0 > f(L, q))
            X < C && 0 > f(le, L) ? (R[ye] = le, R[X] = q, ye = X) : (R[ye] = L, R[I] = q, ye = I);
          else if (X < C && 0 > f(le, q))
            R[ye] = le, R[X] = q, ye = X;
          else break e;
        }
      }
      return Q;
    }
    function f(R, Q) {
      var q = R.sortIndex - Q.sortIndex;
      return q !== 0 ? q : R.id - Q.id;
    }
    if (l.unstable_now = void 0, typeof performance == "object" && typeof performance.now == "function") {
      var u = performance;
      l.unstable_now = function() {
        return u.now();
      };
    } else {
      var p = Date, m = p.now();
      l.unstable_now = function() {
        return p.now() - m;
      };
    }
    var v = [], h = [], y = 1, g = null, _ = 3, M = !1, j = !1, A = !1, O = !1, U = typeof setTimeout == "function" ? setTimeout : null, F = typeof clearTimeout == "function" ? clearTimeout : null, P = typeof setImmediate < "u" ? setImmediate : null;
    function Y(R) {
      for (var Q = o(h); Q !== null; ) {
        if (Q.callback === null) s(h);
        else if (Q.startTime <= R)
          s(h), Q.sortIndex = Q.expirationTime, i(v, Q);
        else break;
        Q = o(h);
      }
    }
    function J(R) {
      if (A = !1, Y(R), !j)
        if (o(v) !== null)
          j = !0, W || (W = !0, De());
        else {
          var Q = o(h);
          Q !== null && Me(J, Q.startTime - R);
        }
    }
    var W = !1, ee = -1, K = 5, fe = -1;
    function Ze() {
      return O ? !0 : !(l.unstable_now() - fe < K);
    }
    function ht() {
      if (O = !1, W) {
        var R = l.unstable_now();
        fe = R;
        var Q = !0;
        try {
          e: {
            j = !1, A && (A = !1, F(ee), ee = -1), M = !0;
            var q = _;
            try {
              t: {
                for (Y(R), g = o(v); g !== null && !(g.expirationTime > R && Ze()); ) {
                  var ye = g.callback;
                  if (typeof ye == "function") {
                    g.callback = null, _ = g.priorityLevel;
                    var C = ye(
                      g.expirationTime <= R
                    );
                    if (R = l.unstable_now(), typeof C == "function") {
                      g.callback = C, Y(R), Q = !0;
                      break t;
                    }
                    g === o(v) && s(v), Y(R);
                  } else s(v);
                  g = o(v);
                }
                if (g !== null) Q = !0;
                else {
                  var $ = o(h);
                  $ !== null && Me(
                    J,
                    $.startTime - R
                  ), Q = !1;
                }
              }
              break e;
            } finally {
              g = null, _ = q, M = !1;
            }
            Q = void 0;
          }
        } finally {
          Q ? De() : W = !1;
        }
      }
    }
    var De;
    if (typeof P == "function")
      De = function() {
        P(ht);
      };
    else if (typeof MessageChannel < "u") {
      var Ve = new MessageChannel(), mt = Ve.port2;
      Ve.port1.onmessage = ht, De = function() {
        mt.postMessage(null);
      };
    } else
      De = function() {
        U(ht, 0);
      };
    function Me(R, Q) {
      ee = U(function() {
        R(l.unstable_now());
      }, Q);
    }
    l.unstable_IdlePriority = 5, l.unstable_ImmediatePriority = 1, l.unstable_LowPriority = 4, l.unstable_NormalPriority = 3, l.unstable_Profiling = null, l.unstable_UserBlockingPriority = 2, l.unstable_cancelCallback = function(R) {
      R.callback = null;
    }, l.unstable_forceFrameRate = function(R) {
      0 > R || 125 < R ? console.error(
        "forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"
      ) : K = 0 < R ? Math.floor(1e3 / R) : 5;
    }, l.unstable_getCurrentPriorityLevel = function() {
      return _;
    }, l.unstable_next = function(R) {
      switch (_) {
        case 1:
        case 2:
        case 3:
          var Q = 3;
          break;
        default:
          Q = _;
      }
      var q = _;
      _ = Q;
      try {
        return R();
      } finally {
        _ = q;
      }
    }, l.unstable_requestPaint = function() {
      O = !0;
    }, l.unstable_runWithPriority = function(R, Q) {
      switch (R) {
        case 1:
        case 2:
        case 3:
        case 4:
        case 5:
          break;
        default:
          R = 3;
      }
      var q = _;
      _ = R;
      try {
        return Q();
      } finally {
        _ = q;
      }
    }, l.unstable_scheduleCallback = function(R, Q, q) {
      var ye = l.unstable_now();
      switch (typeof q == "object" && q !== null ? (q = q.delay, q = typeof q == "number" && 0 < q ? ye + q : ye) : q = ye, R) {
        case 1:
          var C = -1;
          break;
        case 2:
          C = 250;
          break;
        case 5:
          C = 1073741823;
          break;
        case 4:
          C = 1e4;
          break;
        default:
          C = 5e3;
      }
      return C = q + C, R = {
        id: y++,
        callback: Q,
        priorityLevel: R,
        startTime: q,
        expirationTime: C,
        sortIndex: -1
      }, q > ye ? (R.sortIndex = q, i(h, R), o(v) === null && R === o(h) && (A ? (F(ee), ee = -1) : A = !0, Me(J, q - ye))) : (R.sortIndex = C, i(v, R), j || M || (j = !0, W || (W = !0, De()))), R;
    }, l.unstable_shouldYield = Ze, l.unstable_wrapCallback = function(R) {
      var Q = _;
      return function() {
        var q = _;
        _ = Q;
        try {
          return R.apply(this, arguments);
        } finally {
          _ = q;
        }
      };
    };
  }(Jc)), Jc;
}
var D0;
function Jv() {
  return D0 || (D0 = 1, Kc.exports = Kv()), Kc.exports;
}
var Pc = { exports: {} }, me = {};
var z0;
function Pv() {
  if (z0) return me;
  z0 = 1;
  var l = Symbol.for("react.transitional.element"), i = Symbol.for("react.portal"), o = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), f = Symbol.for("react.profiler"), u = Symbol.for("react.consumer"), p = Symbol.for("react.context"), m = Symbol.for("react.forward_ref"), v = Symbol.for("react.suspense"), h = Symbol.for("react.memo"), y = Symbol.for("react.lazy"), g = Symbol.iterator;
  function _(C) {
    return C === null || typeof C != "object" ? null : (C = g && C[g] || C["@@iterator"], typeof C == "function" ? C : null);
  }
  var M = {
    isMounted: function() {
      return !1;
    },
    enqueueForceUpdate: function() {
    },
    enqueueReplaceState: function() {
    },
    enqueueSetState: function() {
    }
  }, j = Object.assign, A = {};
  function O(C, $, I) {
    this.props = C, this.context = $, this.refs = A, this.updater = I || M;
  }
  O.prototype.isReactComponent = {}, O.prototype.setState = function(C, $) {
    if (typeof C != "object" && typeof C != "function" && C != null)
      throw Error(
        "takes an object of state variables to update or a function which returns an object of state variables."
      );
    this.updater.enqueueSetState(this, C, $, "setState");
  }, O.prototype.forceUpdate = function(C) {
    this.updater.enqueueForceUpdate(this, C, "forceUpdate");
  };
  function U() {
  }
  U.prototype = O.prototype;
  function F(C, $, I) {
    this.props = C, this.context = $, this.refs = A, this.updater = I || M;
  }
  var P = F.prototype = new U();
  P.constructor = F, j(P, O.prototype), P.isPureReactComponent = !0;
  var Y = Array.isArray, J = { H: null, A: null, T: null, S: null, V: null }, W = Object.prototype.hasOwnProperty;
  function ee(C, $, I, L, X, le) {
    return I = le.ref, {
      $$typeof: l,
      type: C,
      key: $,
      ref: I !== void 0 ? I : null,
      props: le
    };
  }
  function K(C, $) {
    return ee(
      C.type,
      $,
      void 0,
      void 0,
      void 0,
      C.props
    );
  }
  function fe(C) {
    return typeof C == "object" && C !== null && C.$$typeof === l;
  }
  function Ze(C) {
    var $ = { "=": "=0", ":": "=2" };
    return "$" + C.replace(/[=:]/g, function(I) {
      return $[I];
    });
  }
  var ht = /\/+/g;
  function De(C, $) {
    return typeof C == "object" && C !== null && C.key != null ? Ze("" + C.key) : $.toString(36);
  }
  function Ve() {
  }
  function mt(C) {
    switch (C.status) {
      case "fulfilled":
        return C.value;
      case "rejected":
        throw C.reason;
      default:
        switch (typeof C.status == "string" ? C.then(Ve, Ve) : (C.status = "pending", C.then(
          function($) {
            C.status === "pending" && (C.status = "fulfilled", C.value = $);
          },
          function($) {
            C.status === "pending" && (C.status = "rejected", C.reason = $);
          }
        )), C.status) {
          case "fulfilled":
            return C.value;
          case "rejected":
            throw C.reason;
        }
    }
    throw C;
  }
  function Me(C, $, I, L, X) {
    var le = typeof C;
    (le === "undefined" || le === "boolean") && (C = null);
    var ie = !1;
    if (C === null) ie = !0;
    else
      switch (le) {
        case "bigint":
        case "string":
        case "number":
          ie = !0;
          break;
        case "object":
          switch (C.$$typeof) {
            case l:
            case i:
              ie = !0;
              break;
            case y:
              return ie = C._init, Me(
                ie(C._payload),
                $,
                I,
                L,
                X
              );
          }
      }
    if (ie)
      return X = X(C), ie = L === "" ? "." + De(C, 0) : L, Y(X) ? (I = "", ie != null && (I = ie.replace(ht, "$&/") + "/"), Me(X, $, I, "", function(Ke) {
        return Ke;
      })) : X != null && (fe(X) && (X = K(
        X,
        I + (X.key == null || C && C.key === X.key ? "" : ("" + X.key).replace(
          ht,
          "$&/"
        ) + "/") + ie
      )), $.push(X)), 1;
    ie = 0;
    var ve = L === "" ? "." : L + ":";
    if (Y(C))
      for (var oe = 0; oe < C.length; oe++)
        L = C[oe], le = ve + De(L, oe), ie += Me(
          L,
          $,
          I,
          le,
          X
        );
    else if (oe = _(C), typeof oe == "function")
      for (C = oe.call(C), oe = 0; !(L = C.next()).done; )
        L = L.value, le = ve + De(L, oe++), ie += Me(
          L,
          $,
          I,
          le,
          X
        );
    else if (le === "object") {
      if (typeof C.then == "function")
        return Me(
          mt(C),
          $,
          I,
          L,
          X
        );
      throw $ = String(C), Error(
        "Objects are not valid as a React child (found: " + ($ === "[object Object]" ? "object with keys {" + Object.keys(C).join(", ") + "}" : $) + "). If you meant to render a collection of children, use an array instead."
      );
    }
    return ie;
  }
  function R(C, $, I) {
    if (C == null) return C;
    var L = [], X = 0;
    return Me(C, L, "", "", function(le) {
      return $.call(I, le, X++);
    }), L;
  }
  function Q(C) {
    if (C._status === -1) {
      var $ = C._result;
      $ = $(), $.then(
        function(I) {
          (C._status === 0 || C._status === -1) && (C._status = 1, C._result = I);
        },
        function(I) {
          (C._status === 0 || C._status === -1) && (C._status = 2, C._result = I);
        }
      ), C._status === -1 && (C._status = 0, C._result = $);
    }
    if (C._status === 1) return C._result.default;
    throw C._result;
  }
  var q = typeof reportError == "function" ? reportError : function(C) {
    if (typeof window == "object" && typeof window.ErrorEvent == "function") {
      var $ = new window.ErrorEvent("error", {
        bubbles: !0,
        cancelable: !0,
        message: typeof C == "object" && C !== null && typeof C.message == "string" ? String(C.message) : String(C),
        error: C
      });
      if (!window.dispatchEvent($)) return;
    } else if (typeof process == "object" && typeof process.emit == "function") {
      process.emit("uncaughtException", C);
      return;
    }
    console.error(C);
  };
  function ye() {
  }
  return me.Children = {
    map: R,
    forEach: function(C, $, I) {
      R(
        C,
        function() {
          $.apply(this, arguments);
        },
        I
      );
    },
    count: function(C) {
      var $ = 0;
      return R(C, function() {
        $++;
      }), $;
    },
    toArray: function(C) {
      return R(C, function($) {
        return $;
      }) || [];
    },
    only: function(C) {
      if (!fe(C))
        throw Error(
          "React.Children.only expected to receive a single React element child."
        );
      return C;
    }
  }, me.Component = O, me.Fragment = o, me.Profiler = f, me.PureComponent = F, me.StrictMode = s, me.Suspense = v, me.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = J, me.__COMPILER_RUNTIME = {
    __proto__: null,
    c: function(C) {
      return J.H.useMemoCache(C);
    }
  }, me.cache = function(C) {
    return function() {
      return C.apply(null, arguments);
    };
  }, me.cloneElement = function(C, $, I) {
    if (C == null)
      throw Error(
        "The argument must be a React element, but you passed " + C + "."
      );
    var L = j({}, C.props), X = C.key, le = void 0;
    if ($ != null)
      for (ie in $.ref !== void 0 && (le = void 0), $.key !== void 0 && (X = "" + $.key), $)
        !W.call($, ie) || ie === "key" || ie === "__self" || ie === "__source" || ie === "ref" && $.ref === void 0 || (L[ie] = $[ie]);
    var ie = arguments.length - 2;
    if (ie === 1) L.children = I;
    else if (1 < ie) {
      for (var ve = Array(ie), oe = 0; oe < ie; oe++)
        ve[oe] = arguments[oe + 2];
      L.children = ve;
    }
    return ee(C.type, X, void 0, void 0, le, L);
  }, me.createContext = function(C) {
    return C = {
      $$typeof: p,
      _currentValue: C,
      _currentValue2: C,
      _threadCount: 0,
      Provider: null,
      Consumer: null
    }, C.Provider = C, C.Consumer = {
      $$typeof: u,
      _context: C
    }, C;
  }, me.createElement = function(C, $, I) {
    var L, X = {}, le = null;
    if ($ != null)
      for (L in $.key !== void 0 && (le = "" + $.key), $)
        W.call($, L) && L !== "key" && L !== "__self" && L !== "__source" && (X[L] = $[L]);
    var ie = arguments.length - 2;
    if (ie === 1) X.children = I;
    else if (1 < ie) {
      for (var ve = Array(ie), oe = 0; oe < ie; oe++)
        ve[oe] = arguments[oe + 2];
      X.children = ve;
    }
    if (C && C.defaultProps)
      for (L in ie = C.defaultProps, ie)
        X[L] === void 0 && (X[L] = ie[L]);
    return ee(C, le, void 0, void 0, null, X);
  }, me.createRef = function() {
    return { current: null };
  }, me.forwardRef = function(C) {
    return { $$typeof: m, render: C };
  }, me.isValidElement = fe, me.lazy = function(C) {
    return {
      $$typeof: y,
      _payload: { _status: -1, _result: C },
      _init: Q
    };
  }, me.memo = function(C, $) {
    return {
      $$typeof: h,
      type: C,
      compare: $ === void 0 ? null : $
    };
  }, me.startTransition = function(C) {
    var $ = J.T, I = {};
    J.T = I;
    try {
      var L = C(), X = J.S;
      X !== null && X(I, L), typeof L == "object" && L !== null && typeof L.then == "function" && L.then(ye, q);
    } catch (le) {
      q(le);
    } finally {
      J.T = $;
    }
  }, me.unstable_useCacheRefresh = function() {
    return J.H.useCacheRefresh();
  }, me.use = function(C) {
    return J.H.use(C);
  }, me.useActionState = function(C, $, I) {
    return J.H.useActionState(C, $, I);
  }, me.useCallback = function(C, $) {
    return J.H.useCallback(C, $);
  }, me.useContext = function(C) {
    return J.H.useContext(C);
  }, me.useDebugValue = function() {
  }, me.useDeferredValue = function(C, $) {
    return J.H.useDeferredValue(C, $);
  }, me.useEffect = function(C, $, I) {
    var L = J.H;
    if (typeof I == "function")
      throw Error(
        "useEffect CRUD overload is not enabled in this build of React."
      );
    return L.useEffect(C, $);
  }, me.useId = function() {
    return J.H.useId();
  }, me.useImperativeHandle = function(C, $, I) {
    return J.H.useImperativeHandle(C, $, I);
  }, me.useInsertionEffect = function(C, $) {
    return J.H.useInsertionEffect(C, $);
  }, me.useLayoutEffect = function(C, $) {
    return J.H.useLayoutEffect(C, $);
  }, me.useMemo = function(C, $) {
    return J.H.useMemo(C, $);
  }, me.useOptimistic = function(C, $) {
    return J.H.useOptimistic(C, $);
  }, me.useReducer = function(C, $, I) {
    return J.H.useReducer(C, $, I);
  }, me.useRef = function(C) {
    return J.H.useRef(C);
  }, me.useState = function(C) {
    return J.H.useState(C);
  }, me.useSyncExternalStore = function(C, $, I) {
    return J.H.useSyncExternalStore(
      C,
      $,
      I
    );
  }, me.useTransition = function() {
    return J.H.useTransition();
  }, me.version = "19.1.1", me;
}
var O0;
function jo() {
  return O0 || (O0 = 1, Pc.exports = Pv()), Pc.exports;
}
var Wc = { exports: {} }, gt = {};
var U0;
function Wv() {
  if (U0) return gt;
  U0 = 1;
  var l = jo();
  function i(v) {
    var h = "https://react.dev/errors/" + v;
    if (1 < arguments.length) {
      h += "?args[]=" + encodeURIComponent(arguments[1]);
      for (var y = 2; y < arguments.length; y++)
        h += "&args[]=" + encodeURIComponent(arguments[y]);
    }
    return "Minified React error #" + v + "; visit " + h + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";
  }
  function o() {
  }
  var s = {
    d: {
      f: o,
      r: function() {
        throw Error(i(522));
      },
      D: o,
      C: o,
      L: o,
      m: o,
      X: o,
      S: o,
      M: o
    },
    p: 0,
    findDOMNode: null
  }, f = Symbol.for("react.portal");
  function u(v, h, y) {
    var g = 3 < arguments.length && arguments[3] !== void 0 ? arguments[3] : null;
    return {
      $$typeof: f,
      key: g == null ? null : "" + g,
      children: v,
      containerInfo: h,
      implementation: y
    };
  }
  var p = l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
  function m(v, h) {
    if (v === "font") return "";
    if (typeof h == "string")
      return h === "use-credentials" ? h : "";
  }
  return gt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = s, gt.createPortal = function(v, h) {
    var y = 2 < arguments.length && arguments[2] !== void 0 ? arguments[2] : null;
    if (!h || h.nodeType !== 1 && h.nodeType !== 9 && h.nodeType !== 11)
      throw Error(i(299));
    return u(v, h, null, y);
  }, gt.flushSync = function(v) {
    var h = p.T, y = s.p;
    try {
      if (p.T = null, s.p = 2, v) return v();
    } finally {
      p.T = h, s.p = y, s.d.f();
    }
  }, gt.preconnect = function(v, h) {
    typeof v == "string" && (h ? (h = h.crossOrigin, h = typeof h == "string" ? h === "use-credentials" ? h : "" : void 0) : h = null, s.d.C(v, h));
  }, gt.prefetchDNS = function(v) {
    typeof v == "string" && s.d.D(v);
  }, gt.preinit = function(v, h) {
    if (typeof v == "string" && h && typeof h.as == "string") {
      var y = h.as, g = m(y, h.crossOrigin), _ = typeof h.integrity == "string" ? h.integrity : void 0, M = typeof h.fetchPriority == "string" ? h.fetchPriority : void 0;
      y === "style" ? s.d.S(
        v,
        typeof h.precedence == "string" ? h.precedence : void 0,
        {
          crossOrigin: g,
          integrity: _,
          fetchPriority: M
        }
      ) : y === "script" && s.d.X(v, {
        crossOrigin: g,
        integrity: _,
        fetchPriority: M,
        nonce: typeof h.nonce == "string" ? h.nonce : void 0
      });
    }
  }, gt.preinitModule = function(v, h) {
    if (typeof v == "string")
      if (typeof h == "object" && h !== null) {
        if (h.as == null || h.as === "script") {
          var y = m(
            h.as,
            h.crossOrigin
          );
          s.d.M(v, {
            crossOrigin: y,
            integrity: typeof h.integrity == "string" ? h.integrity : void 0,
            nonce: typeof h.nonce == "string" ? h.nonce : void 0
          });
        }
      } else h == null && s.d.M(v);
  }, gt.preload = function(v, h) {
    if (typeof v == "string" && typeof h == "object" && h !== null && typeof h.as == "string") {
      var y = h.as, g = m(y, h.crossOrigin);
      s.d.L(v, y, {
        crossOrigin: g,
        integrity: typeof h.integrity == "string" ? h.integrity : void 0,
        nonce: typeof h.nonce == "string" ? h.nonce : void 0,
        type: typeof h.type == "string" ? h.type : void 0,
        fetchPriority: typeof h.fetchPriority == "string" ? h.fetchPriority : void 0,
        referrerPolicy: typeof h.referrerPolicy == "string" ? h.referrerPolicy : void 0,
        imageSrcSet: typeof h.imageSrcSet == "string" ? h.imageSrcSet : void 0,
        imageSizes: typeof h.imageSizes == "string" ? h.imageSizes : void 0,
        media: typeof h.media == "string" ? h.media : void 0
      });
    }
  }, gt.preloadModule = function(v, h) {
    if (typeof v == "string")
      if (h) {
        var y = m(h.as, h.crossOrigin);
        s.d.m(v, {
          as: typeof h.as == "string" && h.as !== "script" ? h.as : void 0,
          crossOrigin: y,
          integrity: typeof h.integrity == "string" ? h.integrity : void 0
        });
      } else s.d.m(v);
  }, gt.requestFormReset = function(v) {
    s.d.r(v);
  }, gt.unstable_batchedUpdates = function(v, h) {
    return v(h);
  }, gt.useFormState = function(v, h, y) {
    return p.H.useFormState(v, h, y);
  }, gt.useFormStatus = function() {
    return p.H.useHostTransitionStatus();
  }, gt.version = "19.1.1", gt;
}
var L0;
function Gh() {
  if (L0) return Wc.exports;
  L0 = 1;
  function l() {
    if (!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ > "u" || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE != "function"))
      try {
        __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l);
      } catch (i) {
        console.error(i);
      }
  }
  return l(), Wc.exports = Wv(), Wc.exports;
}
var B0;
function Iv() {
  if (B0) return zi;
  B0 = 1;
  var l = Jv(), i = jo(), o = Gh();
  function s(e) {
    var t = "https://react.dev/errors/" + e;
    if (1 < arguments.length) {
      t += "?args[]=" + encodeURIComponent(arguments[1]);
      for (var n = 2; n < arguments.length; n++)
        t += "&args[]=" + encodeURIComponent(arguments[n]);
    }
    return "Minified React error #" + e + "; visit " + t + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";
  }
  function f(e) {
    return !(!e || e.nodeType !== 1 && e.nodeType !== 9 && e.nodeType !== 11);
  }
  function u(e) {
    var t = e, n = e;
    if (e.alternate) for (; t.return; ) t = t.return;
    else {
      e = t;
      do
        t = e, (t.flags & 4098) !== 0 && (n = t.return), e = t.return;
      while (e);
    }
    return t.tag === 3 ? n : null;
  }
  function p(e) {
    if (e.tag === 13) {
      var t = e.memoizedState;
      if (t === null && (e = e.alternate, e !== null && (t = e.memoizedState)), t !== null) return t.dehydrated;
    }
    return null;
  }
  function m(e) {
    if (u(e) !== e)
      throw Error(s(188));
  }
  function v(e) {
    var t = e.alternate;
    if (!t) {
      if (t = u(e), t === null) throw Error(s(188));
      return t !== e ? null : e;
    }
    for (var n = e, a = t; ; ) {
      var r = n.return;
      if (r === null) break;
      var c = r.alternate;
      if (c === null) {
        if (a = r.return, a !== null) {
          n = a;
          continue;
        }
        break;
      }
      if (r.child === c.child) {
        for (c = r.child; c; ) {
          if (c === n) return m(r), e;
          if (c === a) return m(r), t;
          c = c.sibling;
        }
        throw Error(s(188));
      }
      if (n.return !== a.return) n = r, a = c;
      else {
        for (var d = !1, b = r.child; b; ) {
          if (b === n) {
            d = !0, n = r, a = c;
            break;
          }
          if (b === a) {
            d = !0, a = r, n = c;
            break;
          }
          b = b.sibling;
        }
        if (!d) {
          for (b = c.child; b; ) {
            if (b === n) {
              d = !0, n = c, a = r;
              break;
            }
            if (b === a) {
              d = !0, a = c, n = r;
              break;
            }
            b = b.sibling;
          }
          if (!d) throw Error(s(189));
        }
      }
      if (n.alternate !== a) throw Error(s(190));
    }
    if (n.tag !== 3) throw Error(s(188));
    return n.stateNode.current === n ? e : t;
  }
  function h(e) {
    var t = e.tag;
    if (t === 5 || t === 26 || t === 27 || t === 6) return e;
    for (e = e.child; e !== null; ) {
      if (t = h(e), t !== null) return t;
      e = e.sibling;
    }
    return null;
  }
  var y = Object.assign, g = Symbol.for("react.element"), _ = Symbol.for("react.transitional.element"), M = Symbol.for("react.portal"), j = Symbol.for("react.fragment"), A = Symbol.for("react.strict_mode"), O = Symbol.for("react.profiler"), U = Symbol.for("react.provider"), F = Symbol.for("react.consumer"), P = Symbol.for("react.context"), Y = Symbol.for("react.forward_ref"), J = Symbol.for("react.suspense"), W = Symbol.for("react.suspense_list"), ee = Symbol.for("react.memo"), K = Symbol.for("react.lazy"), fe = Symbol.for("react.activity"), Ze = Symbol.for("react.memo_cache_sentinel"), ht = Symbol.iterator;
  function De(e) {
    return e === null || typeof e != "object" ? null : (e = ht && e[ht] || e["@@iterator"], typeof e == "function" ? e : null);
  }
  var Ve = Symbol.for("react.client.reference");
  function mt(e) {
    if (e == null) return null;
    if (typeof e == "function")
      return e.$$typeof === Ve ? null : e.displayName || e.name || null;
    if (typeof e == "string") return e;
    switch (e) {
      case j:
        return "Fragment";
      case O:
        return "Profiler";
      case A:
        return "StrictMode";
      case J:
        return "Suspense";
      case W:
        return "SuspenseList";
      case fe:
        return "Activity";
    }
    if (typeof e == "object")
      switch (e.$$typeof) {
        case M:
          return "Portal";
        case P:
          return (e.displayName || "Context") + ".Provider";
        case F:
          return (e._context.displayName || "Context") + ".Consumer";
        case Y:
          var t = e.render;
          return e = e.displayName, e || (e = t.displayName || t.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
        case ee:
          return t = e.displayName || null, t !== null ? t : mt(e.type) || "Memo";
        case K:
          t = e._payload, e = e._init;
          try {
            return mt(e(t));
          } catch {
          }
      }
    return null;
  }
  var Me = Array.isArray, R = i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Q = o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, q = {
    pending: !1,
    data: null,
    method: null,
    action: null
  }, ye = [], C = -1;
  function $(e) {
    return { current: e };
  }
  function I(e) {
    0 > C || (e.current = ye[C], ye[C] = null, C--);
  }
  function L(e, t) {
    C++, ye[C] = e.current, e.current = t;
  }
  var X = $(null), le = $(null), ie = $(null), ve = $(null);
  function oe(e, t) {
    switch (L(ie, t), L(le, e), L(X, null), t.nodeType) {
      case 9:
      case 11:
        e = (e = t.documentElement) && (e = e.namespaceURI) ? l0(e) : 0;
        break;
      default:
        if (e = t.tagName, t = t.namespaceURI)
          t = l0(t), e = i0(t, e);
        else
          switch (e) {
            case "svg":
              e = 1;
              break;
            case "math":
              e = 2;
              break;
            default:
              e = 0;
          }
    }
    I(X), L(X, e);
  }
  function Ke() {
    I(X), I(le), I(ie);
  }
  function jt(e) {
    e.memoizedState !== null && L(ve, e);
    var t = X.current, n = i0(t, e.type);
    t !== n && (L(le, e), L(X, n));
  }
  function kt(e) {
    le.current === e && (I(X), I(le)), ve.current === e && (I(ve), Ai._currentValue = q);
  }
  var yt = Object.prototype.hasOwnProperty, Ul = l.unstable_scheduleCallback, fa = l.unstable_cancelCallback, Uo = l.unstable_shouldYield, Hi = l.unstable_requestPaint, pt = l.unstable_now, $i = l.unstable_getCurrentPriorityLevel, Bt = l.unstable_ImmediatePriority, Vi = l.unstable_UserBlockingPriority, Oa = l.unstable_NormalPriority, xt = l.unstable_LowPriority, mn = l.unstable_IdlePriority, Lo = l.log, Bo = l.unstable_setDisableYieldValue, nn = null, St = null;
  function Pt(e) {
    if (typeof Lo == "function" && Bo(e), St && typeof St.setStrictMode == "function")
      try {
        St.setStrictMode(nn, e);
      } catch {
      }
  }
  var ot = Math.clz32 ? Math.clz32 : On, zn = Math.log, qi = Math.LN2;
  function On(e) {
    return e >>>= 0, e === 0 ? 32 : 31 - (zn(e) / qi | 0) | 0;
  }
  var Ua = 256, La = 4194304;
  function an(e) {
    var t = e & 42;
    if (t !== 0) return t;
    switch (e & -e) {
      case 1:
        return 1;
      case 2:
        return 2;
      case 4:
        return 4;
      case 8:
        return 8;
      case 16:
        return 16;
      case 32:
        return 32;
      case 64:
        return 64;
      case 128:
        return 128;
      case 256:
      case 512:
      case 1024:
      case 2048:
      case 4096:
      case 8192:
      case 16384:
      case 32768:
      case 65536:
      case 131072:
      case 262144:
      case 524288:
      case 1048576:
      case 2097152:
        return e & 4194048;
      case 4194304:
      case 8388608:
      case 16777216:
      case 33554432:
        return e & 62914560;
      case 67108864:
        return 67108864;
      case 134217728:
        return 134217728;
      case 268435456:
        return 268435456;
      case 536870912:
        return 536870912;
      case 1073741824:
        return 0;
      default:
        return e;
    }
  }
  function da(e, t, n) {
    var a = e.pendingLanes;
    if (a === 0) return 0;
    var r = 0, c = e.suspendedLanes, d = e.pingedLanes;
    e = e.warmLanes;
    var b = a & 134217727;
    return b !== 0 ? (a = b & ~c, a !== 0 ? r = an(a) : (d &= b, d !== 0 ? r = an(d) : n || (n = b & ~e, n !== 0 && (r = an(n))))) : (b = a & ~c, b !== 0 ? r = an(b) : d !== 0 ? r = an(d) : n || (n = a & ~e, n !== 0 && (r = an(n)))), r === 0 ? 0 : t !== 0 && t !== r && (t & c) === 0 && (c = r & -r, n = t & -t, c >= n || c === 32 && (n & 4194048) !== 0) ? t : r;
  }
  function ha(e, t) {
    return (e.pendingLanes & ~(e.suspendedLanes & ~e.pingedLanes) & t) === 0;
  }
  function Ll(e, t) {
    switch (e) {
      case 1:
      case 2:
      case 4:
      case 8:
      case 64:
        return t + 250;
      case 16:
      case 32:
      case 128:
      case 256:
      case 512:
      case 1024:
      case 2048:
      case 4096:
      case 8192:
      case 16384:
      case 32768:
      case 65536:
      case 131072:
      case 262144:
      case 524288:
      case 1048576:
      case 2097152:
        return t + 5e3;
      case 4194304:
      case 8388608:
      case 16777216:
      case 33554432:
        return -1;
      case 67108864:
      case 134217728:
      case 268435456:
      case 536870912:
      case 1073741824:
        return -1;
      default:
        return -1;
    }
  }
  function Wt() {
    var e = Ua;
    return Ua <<= 1, (Ua & 4194048) === 0 && (Ua = 256), e;
  }
  function Gi() {
    var e = La;
    return La <<= 1, (La & 62914560) === 0 && (La = 4194304), e;
  }
  function Bl(e) {
    for (var t = [], n = 0; 31 > n; n++) t.push(e);
    return t;
  }
  function Un(e, t) {
    e.pendingLanes |= t, t !== 268435456 && (e.suspendedLanes = 0, e.pingedLanes = 0, e.warmLanes = 0);
  }
  function Yi(e, t, n, a, r, c) {
    var d = e.pendingLanes;
    e.pendingLanes = n, e.suspendedLanes = 0, e.pingedLanes = 0, e.warmLanes = 0, e.expiredLanes &= n, e.entangledLanes &= n, e.errorRecoveryDisabledLanes &= n, e.shellSuspendCounter = 0;
    var b = e.entanglements, w = e.expirationTimes, N = e.hiddenUpdates;
    for (n = d & ~n; 0 < n; ) {
      var B = 31 - ot(n), V = 1 << B;
      b[B] = 0, w[B] = -1;
      var D = N[B];
      if (D !== null)
        for (N[B] = null, B = 0; B < D.length; B++) {
          var z = D[B];
          z !== null && (z.lane &= -536870913);
        }
      n &= ~V;
    }
    a !== 0 && he(e, a, 0), c !== 0 && r === 0 && e.tag !== 0 && (e.suspendedLanes |= c & ~(d & ~t));
  }
  function he(e, t, n) {
    e.pendingLanes |= t, e.suspendedLanes &= ~t;
    var a = 31 - ot(t);
    e.entangledLanes |= t, e.entanglements[a] = e.entanglements[a] | 1073741824 | n & 4194090;
  }
  function qe(e, t) {
    var n = e.entangledLanes |= t;
    for (e = e.entanglements; n; ) {
      var a = 31 - ot(n), r = 1 << a;
      r & t | e[a] & t && (e[a] |= t), n &= ~r;
    }
  }
  function Je(e) {
    switch (e) {
      case 2:
        e = 1;
        break;
      case 8:
        e = 4;
        break;
      case 32:
        e = 16;
        break;
      case 256:
      case 512:
      case 1024:
      case 2048:
      case 4096:
      case 8192:
      case 16384:
      case 32768:
      case 65536:
      case 131072:
      case 262144:
      case 524288:
      case 1048576:
      case 2097152:
      case 4194304:
      case 8388608:
      case 16777216:
      case 33554432:
        e = 128;
        break;
      case 268435456:
        e = 134217728;
        break;
      default:
        e = 0;
    }
    return e;
  }
  function st(e) {
    return e &= -e, 2 < e ? 8 < e ? (e & 134217727) !== 0 ? 32 : 268435456 : 8 : 2;
  }
  function ma() {
    var e = Q.p;
    return e !== 0 ? e : (e = window.event, e === void 0 ? 32 : C0(e.type));
  }
  function Ie(e, t) {
    var n = Q.p;
    try {
      return Q.p = e, t();
    } finally {
      Q.p = n;
    }
  }
  var Ge = Math.random().toString(36).slice(2), Ye = "__reactFiber$" + Ge, Oe = "__reactProps$" + Ge, nt = "__reactContainer$" + Ge, Ba = "__reactEvents$" + Ge, pn = "__reactListeners$" + Ge, Yu = "__reactHandles$" + Ge, Qu = "__reactResources$" + Ge, Hl = "__reactMarker$" + Ge;
  function Ho(e) {
    delete e[Ye], delete e[Oe], delete e[Ba], delete e[pn], delete e[Yu];
  }
  function Ha(e) {
    var t = e[Ye];
    if (t) return t;
    for (var n = e.parentNode; n; ) {
      if (t = n[nt] || n[Ye]) {
        if (n = t.alternate, t.child !== null || n !== null && n.child !== null)
          for (e = c0(e); e !== null; ) {
            if (n = e[Ye]) return n;
            e = c0(e);
          }
        return t;
      }
      e = n, n = e.parentNode;
    }
    return null;
  }
  function $a(e) {
    if (e = e[Ye] || e[nt]) {
      var t = e.tag;
      if (t === 5 || t === 6 || t === 13 || t === 26 || t === 27 || t === 3)
        return e;
    }
    return null;
  }
  function $l(e) {
    var t = e.tag;
    if (t === 5 || t === 26 || t === 27 || t === 6) return e.stateNode;
    throw Error(s(33));
  }
  function Va(e) {
    var t = e[Qu];
    return t || (t = e[Qu] = { hoistableStyles: /* @__PURE__ */ new Map(), hoistableScripts: /* @__PURE__ */ new Map() }), t;
  }
  function at(e) {
    e[Hl] = !0;
  }
  var Xu = /* @__PURE__ */ new Set(), Zu = {};
  function pa(e, t) {
    qa(e, t), qa(e + "Capture", t);
  }
  function qa(e, t) {
    for (Zu[e] = t, e = 0; e < t.length; e++)
      Xu.add(t[e]);
  }
  var Dm = RegExp(
    "^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"
  ), Ku = {}, Ju = {};
  function zm(e) {
    return yt.call(Ju, e) ? !0 : yt.call(Ku, e) ? !1 : Dm.test(e) ? Ju[e] = !0 : (Ku[e] = !0, !1);
  }
  function Qi(e, t, n) {
    if (zm(t))
      if (n === null) e.removeAttribute(t);
      else {
        switch (typeof n) {
          case "undefined":
          case "function":
          case "symbol":
            e.removeAttribute(t);
            return;
          case "boolean":
            var a = t.toLowerCase().slice(0, 5);
            if (a !== "data-" && a !== "aria-") {
              e.removeAttribute(t);
              return;
            }
        }
        e.setAttribute(t, "" + n);
      }
  }
  function Xi(e, t, n) {
    if (n === null) e.removeAttribute(t);
    else {
      switch (typeof n) {
        case "undefined":
        case "function":
        case "symbol":
        case "boolean":
          e.removeAttribute(t);
          return;
      }
      e.setAttribute(t, "" + n);
    }
  }
  function vn(e, t, n, a) {
    if (a === null) e.removeAttribute(n);
    else {
      switch (typeof a) {
        case "undefined":
        case "function":
        case "symbol":
        case "boolean":
          e.removeAttribute(n);
          return;
      }
      e.setAttributeNS(t, n, "" + a);
    }
  }
  var $o, Pu;
  function Ga(e) {
    if ($o === void 0)
      try {
        throw Error();
      } catch (n) {
        var t = n.stack.trim().match(/\n( *(at )?)/);
        $o = t && t[1] || "", Pu = -1 < n.stack.indexOf(`
    at`) ? " (<anonymous>)" : -1 < n.stack.indexOf("@") ? "@unknown:0:0" : "";
      }
    return `
` + $o + e + Pu;
  }
  var Vo = !1;
  function qo(e, t) {
    if (!e || Vo) return "";
    Vo = !0;
    var n = Error.prepareStackTrace;
    Error.prepareStackTrace = void 0;
    try {
      var a = {
        DetermineComponentFrameRoot: function() {
          try {
            if (t) {
              var V = function() {
                throw Error();
              };
              if (Object.defineProperty(V.prototype, "props", {
                set: function() {
                  throw Error();
                }
              }), typeof Reflect == "object" && Reflect.construct) {
                try {
                  Reflect.construct(V, []);
                } catch (z) {
                  var D = z;
                }
                Reflect.construct(e, [], V);
              } else {
                try {
                  V.call();
                } catch (z) {
                  D = z;
                }
                e.call(V.prototype);
              }
            } else {
              try {
                throw Error();
              } catch (z) {
                D = z;
              }
              (V = e()) && typeof V.catch == "function" && V.catch(function() {
              });
            }
          } catch (z) {
            if (z && D && typeof z.stack == "string")
              return [z.stack, D.stack];
          }
          return [null, null];
        }
      };
      a.DetermineComponentFrameRoot.displayName = "DetermineComponentFrameRoot";
      var r = Object.getOwnPropertyDescriptor(
        a.DetermineComponentFrameRoot,
        "name"
      );
      r && r.configurable && Object.defineProperty(
        a.DetermineComponentFrameRoot,
        "name",
        { value: "DetermineComponentFrameRoot" }
      );
      var c = a.DetermineComponentFrameRoot(), d = c[0], b = c[1];
      if (d && b) {
        var w = d.split(`
`), N = b.split(`
`);
        for (r = a = 0; a < w.length && !w[a].includes("DetermineComponentFrameRoot"); )
          a++;
        for (; r < N.length && !N[r].includes(
          "DetermineComponentFrameRoot"
        ); )
          r++;
        if (a === w.length || r === N.length)
          for (a = w.length - 1, r = N.length - 1; 1 <= a && 0 <= r && w[a] !== N[r]; )
            r--;
        for (; 1 <= a && 0 <= r; a--, r--)
          if (w[a] !== N[r]) {
            if (a !== 1 || r !== 1)
              do
                if (a--, r--, 0 > r || w[a] !== N[r]) {
                  var B = `
` + w[a].replace(" at new ", " at ");
                  return e.displayName && B.includes("<anonymous>") && (B = B.replace("<anonymous>", e.displayName)), B;
                }
              while (1 <= a && 0 <= r);
            break;
          }
      }
    } finally {
      Vo = !1, Error.prepareStackTrace = n;
    }
    return (n = e ? e.displayName || e.name : "") ? Ga(n) : "";
  }
  function Om(e) {
    switch (e.tag) {
      case 26:
      case 27:
      case 5:
        return Ga(e.type);
      case 16:
        return Ga("Lazy");
      case 13:
        return Ga("Suspense");
      case 19:
        return Ga("SuspenseList");
      case 0:
      case 15:
        return qo(e.type, !1);
      case 11:
        return qo(e.type.render, !1);
      case 1:
        return qo(e.type, !0);
      case 31:
        return Ga("Activity");
      default:
        return "";
    }
  }
  function Wu(e) {
    try {
      var t = "";
      do
        t += Om(e), e = e.return;
      while (e);
      return t;
    } catch (n) {
      return `
Error generating stack: ` + n.message + `
` + n.stack;
    }
  }
  function Ht(e) {
    switch (typeof e) {
      case "bigint":
      case "boolean":
      case "number":
      case "string":
      case "undefined":
        return e;
      case "object":
        return e;
      default:
        return "";
    }
  }
  function Iu(e) {
    var t = e.type;
    return (e = e.nodeName) && e.toLowerCase() === "input" && (t === "checkbox" || t === "radio");
  }
  function Um(e) {
    var t = Iu(e) ? "checked" : "value", n = Object.getOwnPropertyDescriptor(
      e.constructor.prototype,
      t
    ), a = "" + e[t];
    if (!e.hasOwnProperty(t) && typeof n < "u" && typeof n.get == "function" && typeof n.set == "function") {
      var r = n.get, c = n.set;
      return Object.defineProperty(e, t, {
        configurable: !0,
        get: function() {
          return r.call(this);
        },
        set: function(d) {
          a = "" + d, c.call(this, d);
        }
      }), Object.defineProperty(e, t, {
        enumerable: n.enumerable
      }), {
        getValue: function() {
          return a;
        },
        setValue: function(d) {
          a = "" + d;
        },
        stopTracking: function() {
          e._valueTracker = null, delete e[t];
        }
      };
    }
  }
  function Zi(e) {
    e._valueTracker || (e._valueTracker = Um(e));
  }
  function Fu(e) {
    if (!e) return !1;
    var t = e._valueTracker;
    if (!t) return !0;
    var n = t.getValue(), a = "";
    return e && (a = Iu(e) ? e.checked ? "true" : "false" : e.value), e = a, e !== n ? (t.setValue(e), !0) : !1;
  }
  function Ki(e) {
    if (e = e || (typeof document < "u" ? document : void 0), typeof e > "u") return null;
    try {
      return e.activeElement || e.body;
    } catch {
      return e.body;
    }
  }
  var Lm = /[\n"\\]/g;
  function $t(e) {
    return e.replace(
      Lm,
      function(t) {
        return "\\" + t.charCodeAt(0).toString(16) + " ";
      }
    );
  }
  function Go(e, t, n, a, r, c, d, b) {
    e.name = "", d != null && typeof d != "function" && typeof d != "symbol" && typeof d != "boolean" ? e.type = d : e.removeAttribute("type"), t != null ? d === "number" ? (t === 0 && e.value === "" || e.value != t) && (e.value = "" + Ht(t)) : e.value !== "" + Ht(t) && (e.value = "" + Ht(t)) : d !== "submit" && d !== "reset" || e.removeAttribute("value"), t != null ? Yo(e, d, Ht(t)) : n != null ? Yo(e, d, Ht(n)) : a != null && e.removeAttribute("value"), r == null && c != null && (e.defaultChecked = !!c), r != null && (e.checked = r && typeof r != "function" && typeof r != "symbol"), b != null && typeof b != "function" && typeof b != "symbol" && typeof b != "boolean" ? e.name = "" + Ht(b) : e.removeAttribute("name");
  }
  function ef(e, t, n, a, r, c, d, b) {
    if (c != null && typeof c != "function" && typeof c != "symbol" && typeof c != "boolean" && (e.type = c), t != null || n != null) {
      if (!(c !== "submit" && c !== "reset" || t != null))
        return;
      n = n != null ? "" + Ht(n) : "", t = t != null ? "" + Ht(t) : n, b || t === e.value || (e.value = t), e.defaultValue = t;
    }
    a = a ?? r, a = typeof a != "function" && typeof a != "symbol" && !!a, e.checked = b ? e.checked : !!a, e.defaultChecked = !!a, d != null && typeof d != "function" && typeof d != "symbol" && typeof d != "boolean" && (e.name = d);
  }
  function Yo(e, t, n) {
    t === "number" && Ki(e.ownerDocument) === e || e.defaultValue === "" + n || (e.defaultValue = "" + n);
  }
  function Ya(e, t, n, a) {
    if (e = e.options, t) {
      t = {};
      for (var r = 0; r < n.length; r++)
        t["$" + n[r]] = !0;
      for (n = 0; n < e.length; n++)
        r = t.hasOwnProperty("$" + e[n].value), e[n].selected !== r && (e[n].selected = r), r && a && (e[n].defaultSelected = !0);
    } else {
      for (n = "" + Ht(n), t = null, r = 0; r < e.length; r++) {
        if (e[r].value === n) {
          e[r].selected = !0, a && (e[r].defaultSelected = !0);
          return;
        }
        t !== null || e[r].disabled || (t = e[r]);
      }
      t !== null && (t.selected = !0);
    }
  }
  function tf(e, t, n) {
    if (t != null && (t = "" + Ht(t), t !== e.value && (e.value = t), n == null)) {
      e.defaultValue !== t && (e.defaultValue = t);
      return;
    }
    e.defaultValue = n != null ? "" + Ht(n) : "";
  }
  function nf(e, t, n, a) {
    if (t == null) {
      if (a != null) {
        if (n != null) throw Error(s(92));
        if (Me(a)) {
          if (1 < a.length) throw Error(s(93));
          a = a[0];
        }
        n = a;
      }
      n == null && (n = ""), t = n;
    }
    n = Ht(t), e.defaultValue = n, a = e.textContent, a === n && a !== "" && a !== null && (e.value = a);
  }
  function Qa(e, t) {
    if (t) {
      var n = e.firstChild;
      if (n && n === e.lastChild && n.nodeType === 3) {
        n.nodeValue = t;
        return;
      }
    }
    e.textContent = t;
  }
  var Bm = new Set(
    "animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(
      " "
    )
  );
  function af(e, t, n) {
    var a = t.indexOf("--") === 0;
    n == null || typeof n == "boolean" || n === "" ? a ? e.setProperty(t, "") : t === "float" ? e.cssFloat = "" : e[t] = "" : a ? e.setProperty(t, n) : typeof n != "number" || n === 0 || Bm.has(t) ? t === "float" ? e.cssFloat = n : e[t] = ("" + n).trim() : e[t] = n + "px";
  }
  function lf(e, t, n) {
    if (t != null && typeof t != "object")
      throw Error(s(62));
    if (e = e.style, n != null) {
      for (var a in n)
        !n.hasOwnProperty(a) || t != null && t.hasOwnProperty(a) || (a.indexOf("--") === 0 ? e.setProperty(a, "") : a === "float" ? e.cssFloat = "" : e[a] = "");
      for (var r in t)
        a = t[r], t.hasOwnProperty(r) && n[r] !== a && af(e, r, a);
    } else
      for (var c in t)
        t.hasOwnProperty(c) && af(e, c, t[c]);
  }
  function Qo(e) {
    if (e.indexOf("-") === -1) return !1;
    switch (e) {
      case "annotation-xml":
      case "color-profile":
      case "font-face":
      case "font-face-src":
      case "font-face-uri":
      case "font-face-format":
      case "font-face-name":
      case "missing-glyph":
        return !1;
      default:
        return !0;
    }
  }
  var Hm = /* @__PURE__ */ new Map([
    ["acceptCharset", "accept-charset"],
    ["htmlFor", "for"],
    ["httpEquiv", "http-equiv"],
    ["crossOrigin", "crossorigin"],
    ["accentHeight", "accent-height"],
    ["alignmentBaseline", "alignment-baseline"],
    ["arabicForm", "arabic-form"],
    ["baselineShift", "baseline-shift"],
    ["capHeight", "cap-height"],
    ["clipPath", "clip-path"],
    ["clipRule", "clip-rule"],
    ["colorInterpolation", "color-interpolation"],
    ["colorInterpolationFilters", "color-interpolation-filters"],
    ["colorProfile", "color-profile"],
    ["colorRendering", "color-rendering"],
    ["dominantBaseline", "dominant-baseline"],
    ["enableBackground", "enable-background"],
    ["fillOpacity", "fill-opacity"],
    ["fillRule", "fill-rule"],
    ["floodColor", "flood-color"],
    ["floodOpacity", "flood-opacity"],
    ["fontFamily", "font-family"],
    ["fontSize", "font-size"],
    ["fontSizeAdjust", "font-size-adjust"],
    ["fontStretch", "font-stretch"],
    ["fontStyle", "font-style"],
    ["fontVariant", "font-variant"],
    ["fontWeight", "font-weight"],
    ["glyphName", "glyph-name"],
    ["glyphOrientationHorizontal", "glyph-orientation-horizontal"],
    ["glyphOrientationVertical", "glyph-orientation-vertical"],
    ["horizAdvX", "horiz-adv-x"],
    ["horizOriginX", "horiz-origin-x"],
    ["imageRendering", "image-rendering"],
    ["letterSpacing", "letter-spacing"],
    ["lightingColor", "lighting-color"],
    ["markerEnd", "marker-end"],
    ["markerMid", "marker-mid"],
    ["markerStart", "marker-start"],
    ["overlinePosition", "overline-position"],
    ["overlineThickness", "overline-thickness"],
    ["paintOrder", "paint-order"],
    ["panose-1", "panose-1"],
    ["pointerEvents", "pointer-events"],
    ["renderingIntent", "rendering-intent"],
    ["shapeRendering", "shape-rendering"],
    ["stopColor", "stop-color"],
    ["stopOpacity", "stop-opacity"],
    ["strikethroughPosition", "strikethrough-position"],
    ["strikethroughThickness", "strikethrough-thickness"],
    ["strokeDasharray", "stroke-dasharray"],
    ["strokeDashoffset", "stroke-dashoffset"],
    ["strokeLinecap", "stroke-linecap"],
    ["strokeLinejoin", "stroke-linejoin"],
    ["strokeMiterlimit", "stroke-miterlimit"],
    ["strokeOpacity", "stroke-opacity"],
    ["strokeWidth", "stroke-width"],
    ["textAnchor", "text-anchor"],
    ["textDecoration", "text-decoration"],
    ["textRendering", "text-rendering"],
    ["transformOrigin", "transform-origin"],
    ["underlinePosition", "underline-position"],
    ["underlineThickness", "underline-thickness"],
    ["unicodeBidi", "unicode-bidi"],
    ["unicodeRange", "unicode-range"],
    ["unitsPerEm", "units-per-em"],
    ["vAlphabetic", "v-alphabetic"],
    ["vHanging", "v-hanging"],
    ["vIdeographic", "v-ideographic"],
    ["vMathematical", "v-mathematical"],
    ["vectorEffect", "vector-effect"],
    ["vertAdvY", "vert-adv-y"],
    ["vertOriginX", "vert-origin-x"],
    ["vertOriginY", "vert-origin-y"],
    ["wordSpacing", "word-spacing"],
    ["writingMode", "writing-mode"],
    ["xmlnsXlink", "xmlns:xlink"],
    ["xHeight", "x-height"]
  ]), $m = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;
  function Ji(e) {
    return $m.test("" + e) ? "javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')" : e;
  }
  var Xo = null;
  function Zo(e) {
    return e = e.target || e.srcElement || window, e.correspondingUseElement && (e = e.correspondingUseElement), e.nodeType === 3 ? e.parentNode : e;
  }
  var Xa = null, Za = null;
  function rf(e) {
    var t = $a(e);
    if (t && (e = t.stateNode)) {
      var n = e[Oe] || null;
      e: switch (e = t.stateNode, t.type) {
        case "input":
          if (Go(
            e,
            n.value,
            n.defaultValue,
            n.defaultValue,
            n.checked,
            n.defaultChecked,
            n.type,
            n.name
          ), t = n.name, n.type === "radio" && t != null) {
            for (n = e; n.parentNode; ) n = n.parentNode;
            for (n = n.querySelectorAll(
              'input[name="' + $t(
                "" + t
              ) + '"][type="radio"]'
            ), t = 0; t < n.length; t++) {
              var a = n[t];
              if (a !== e && a.form === e.form) {
                var r = a[Oe] || null;
                if (!r) throw Error(s(90));
                Go(
                  a,
                  r.value,
                  r.defaultValue,
                  r.defaultValue,
                  r.checked,
                  r.defaultChecked,
                  r.type,
                  r.name
                );
              }
            }
            for (t = 0; t < n.length; t++)
              a = n[t], a.form === e.form && Fu(a);
          }
          break e;
        case "textarea":
          tf(e, n.value, n.defaultValue);
          break e;
        case "select":
          t = n.value, t != null && Ya(e, !!n.multiple, t, !1);
      }
    }
  }
  var Ko = !1;
  function of(e, t, n) {
    if (Ko) return e(t, n);
    Ko = !0;
    try {
      var a = e(t);
      return a;
    } finally {
      if (Ko = !1, (Xa !== null || Za !== null) && (zr(), Xa && (t = Xa, e = Za, Za = Xa = null, rf(t), e)))
        for (t = 0; t < e.length; t++) rf(e[t]);
    }
  }
  function Vl(e, t) {
    var n = e.stateNode;
    if (n === null) return null;
    var a = n[Oe] || null;
    if (a === null) return null;
    n = a[t];
    e: switch (t) {
      case "onClick":
      case "onClickCapture":
      case "onDoubleClick":
      case "onDoubleClickCapture":
      case "onMouseDown":
      case "onMouseDownCapture":
      case "onMouseMove":
      case "onMouseMoveCapture":
      case "onMouseUp":
      case "onMouseUpCapture":
      case "onMouseEnter":
        (a = !a.disabled) || (e = e.type, a = !(e === "button" || e === "input" || e === "select" || e === "textarea")), e = !a;
        break e;
      default:
        e = !1;
    }
    if (e) return null;
    if (n && typeof n != "function")
      throw Error(
        s(231, t, typeof n)
      );
    return n;
  }
  var gn = !(typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u"), Jo = !1;
  if (gn)
    try {
      var ql = {};
      Object.defineProperty(ql, "passive", {
        get: function() {
          Jo = !0;
        }
      }), window.addEventListener("test", ql, ql), window.removeEventListener("test", ql, ql);
    } catch {
      Jo = !1;
    }
  var Ln = null, Po = null, Pi = null;
  function sf() {
    if (Pi) return Pi;
    var e, t = Po, n = t.length, a, r = "value" in Ln ? Ln.value : Ln.textContent, c = r.length;
    for (e = 0; e < n && t[e] === r[e]; e++) ;
    var d = n - e;
    for (a = 1; a <= d && t[n - a] === r[c - a]; a++) ;
    return Pi = r.slice(e, 1 < a ? 1 - a : void 0);
  }
  function Wi(e) {
    var t = e.keyCode;
    return "charCode" in e ? (e = e.charCode, e === 0 && t === 13 && (e = 13)) : e = t, e === 10 && (e = 13), 32 <= e || e === 13 ? e : 0;
  }
  function Ii() {
    return !0;
  }
  function cf() {
    return !1;
  }
  function Ct(e) {
    function t(n, a, r, c, d) {
      this._reactName = n, this._targetInst = r, this.type = a, this.nativeEvent = c, this.target = d, this.currentTarget = null;
      for (var b in e)
        e.hasOwnProperty(b) && (n = e[b], this[b] = n ? n(c) : c[b]);
      return this.isDefaultPrevented = (c.defaultPrevented != null ? c.defaultPrevented : c.returnValue === !1) ? Ii : cf, this.isPropagationStopped = cf, this;
    }
    return y(t.prototype, {
      preventDefault: function() {
        this.defaultPrevented = !0;
        var n = this.nativeEvent;
        n && (n.preventDefault ? n.preventDefault() : typeof n.returnValue != "unknown" && (n.returnValue = !1), this.isDefaultPrevented = Ii);
      },
      stopPropagation: function() {
        var n = this.nativeEvent;
        n && (n.stopPropagation ? n.stopPropagation() : typeof n.cancelBubble != "unknown" && (n.cancelBubble = !0), this.isPropagationStopped = Ii);
      },
      persist: function() {
      },
      isPersistent: Ii
    }), t;
  }
  var va = {
    eventPhase: 0,
    bubbles: 0,
    cancelable: 0,
    timeStamp: function(e) {
      return e.timeStamp || Date.now();
    },
    defaultPrevented: 0,
    isTrusted: 0
  }, Fi = Ct(va), Gl = y({}, va, { view: 0, detail: 0 }), Vm = Ct(Gl), Wo, Io, Yl, er = y({}, Gl, {
    screenX: 0,
    screenY: 0,
    clientX: 0,
    clientY: 0,
    pageX: 0,
    pageY: 0,
    ctrlKey: 0,
    shiftKey: 0,
    altKey: 0,
    metaKey: 0,
    getModifierState: es,
    button: 0,
    buttons: 0,
    relatedTarget: function(e) {
      return e.relatedTarget === void 0 ? e.fromElement === e.srcElement ? e.toElement : e.fromElement : e.relatedTarget;
    },
    movementX: function(e) {
      return "movementX" in e ? e.movementX : (e !== Yl && (Yl && e.type === "mousemove" ? (Wo = e.screenX - Yl.screenX, Io = e.screenY - Yl.screenY) : Io = Wo = 0, Yl = e), Wo);
    },
    movementY: function(e) {
      return "movementY" in e ? e.movementY : Io;
    }
  }), uf = Ct(er), qm = y({}, er, { dataTransfer: 0 }), Gm = Ct(qm), Ym = y({}, Gl, { relatedTarget: 0 }), Fo = Ct(Ym), Qm = y({}, va, {
    animationName: 0,
    elapsedTime: 0,
    pseudoElement: 0
  }), Xm = Ct(Qm), Zm = y({}, va, {
    clipboardData: function(e) {
      return "clipboardData" in e ? e.clipboardData : window.clipboardData;
    }
  }), Km = Ct(Zm), Jm = y({}, va, { data: 0 }), ff = Ct(Jm), Pm = {
    Esc: "Escape",
    Spacebar: " ",
    Left: "ArrowLeft",
    Up: "ArrowUp",
    Right: "ArrowRight",
    Down: "ArrowDown",
    Del: "Delete",
    Win: "OS",
    Menu: "ContextMenu",
    Apps: "ContextMenu",
    Scroll: "ScrollLock",
    MozPrintableKey: "Unidentified"
  }, Wm = {
    8: "Backspace",
    9: "Tab",
    12: "Clear",
    13: "Enter",
    16: "Shift",
    17: "Control",
    18: "Alt",
    19: "Pause",
    20: "CapsLock",
    27: "Escape",
    32: " ",
    33: "PageUp",
    34: "PageDown",
    35: "End",
    36: "Home",
    37: "ArrowLeft",
    38: "ArrowUp",
    39: "ArrowRight",
    40: "ArrowDown",
    45: "Insert",
    46: "Delete",
    112: "F1",
    113: "F2",
    114: "F3",
    115: "F4",
    116: "F5",
    117: "F6",
    118: "F7",
    119: "F8",
    120: "F9",
    121: "F10",
    122: "F11",
    123: "F12",
    144: "NumLock",
    145: "ScrollLock",
    224: "Meta"
  }, Im = {
    Alt: "altKey",
    Control: "ctrlKey",
    Meta: "metaKey",
    Shift: "shiftKey"
  };
  function Fm(e) {
    var t = this.nativeEvent;
    return t.getModifierState ? t.getModifierState(e) : (e = Im[e]) ? !!t[e] : !1;
  }
  function es() {
    return Fm;
  }
  var ep = y({}, Gl, {
    key: function(e) {
      if (e.key) {
        var t = Pm[e.key] || e.key;
        if (t !== "Unidentified") return t;
      }
      return e.type === "keypress" ? (e = Wi(e), e === 13 ? "Enter" : String.fromCharCode(e)) : e.type === "keydown" || e.type === "keyup" ? Wm[e.keyCode] || "Unidentified" : "";
    },
    code: 0,
    location: 0,
    ctrlKey: 0,
    shiftKey: 0,
    altKey: 0,
    metaKey: 0,
    repeat: 0,
    locale: 0,
    getModifierState: es,
    charCode: function(e) {
      return e.type === "keypress" ? Wi(e) : 0;
    },
    keyCode: function(e) {
      return e.type === "keydown" || e.type === "keyup" ? e.keyCode : 0;
    },
    which: function(e) {
      return e.type === "keypress" ? Wi(e) : e.type === "keydown" || e.type === "keyup" ? e.keyCode : 0;
    }
  }), tp = Ct(ep), np = y({}, er, {
    pointerId: 0,
    width: 0,
    height: 0,
    pressure: 0,
    tangentialPressure: 0,
    tiltX: 0,
    tiltY: 0,
    twist: 0,
    pointerType: 0,
    isPrimary: 0
  }), df = Ct(np), ap = y({}, Gl, {
    touches: 0,
    targetTouches: 0,
    changedTouches: 0,
    altKey: 0,
    metaKey: 0,
    ctrlKey: 0,
    shiftKey: 0,
    getModifierState: es
  }), lp = Ct(ap), ip = y({}, va, {
    propertyName: 0,
    elapsedTime: 0,
    pseudoElement: 0
  }), rp = Ct(ip), op = y({}, er, {
    deltaX: function(e) {
      return "deltaX" in e ? e.deltaX : "wheelDeltaX" in e ? -e.wheelDeltaX : 0;
    },
    deltaY: function(e) {
      return "deltaY" in e ? e.deltaY : "wheelDeltaY" in e ? -e.wheelDeltaY : "wheelDelta" in e ? -e.wheelDelta : 0;
    },
    deltaZ: 0,
    deltaMode: 0
  }), sp = Ct(op), cp = y({}, va, {
    newState: 0,
    oldState: 0
  }), up = Ct(cp), fp = [9, 13, 27, 32], ts = gn && "CompositionEvent" in window, Ql = null;
  gn && "documentMode" in document && (Ql = document.documentMode);
  var dp = gn && "TextEvent" in window && !Ql, hf = gn && (!ts || Ql && 8 < Ql && 11 >= Ql), mf = " ", pf = !1;
  function vf(e, t) {
    switch (e) {
      case "keyup":
        return fp.indexOf(t.keyCode) !== -1;
      case "keydown":
        return t.keyCode !== 229;
      case "keypress":
      case "mousedown":
      case "focusout":
        return !0;
      default:
        return !1;
    }
  }
  function gf(e) {
    return e = e.detail, typeof e == "object" && "data" in e ? e.data : null;
  }
  var Ka = !1;
  function hp(e, t) {
    switch (e) {
      case "compositionend":
        return gf(t);
      case "keypress":
        return t.which !== 32 ? null : (pf = !0, mf);
      case "textInput":
        return e = t.data, e === mf && pf ? null : e;
      default:
        return null;
    }
  }
  function mp(e, t) {
    if (Ka)
      return e === "compositionend" || !ts && vf(e, t) ? (e = sf(), Pi = Po = Ln = null, Ka = !1, e) : null;
    switch (e) {
      case "paste":
        return null;
      case "keypress":
        if (!(t.ctrlKey || t.altKey || t.metaKey) || t.ctrlKey && t.altKey) {
          if (t.char && 1 < t.char.length)
            return t.char;
          if (t.which) return String.fromCharCode(t.which);
        }
        return null;
      case "compositionend":
        return hf && t.locale !== "ko" ? null : t.data;
      default:
        return null;
    }
  }
  var pp = {
    color: !0,
    date: !0,
    datetime: !0,
    "datetime-local": !0,
    email: !0,
    month: !0,
    number: !0,
    password: !0,
    range: !0,
    search: !0,
    tel: !0,
    text: !0,
    time: !0,
    url: !0,
    week: !0
  };
  function bf(e) {
    var t = e && e.nodeName && e.nodeName.toLowerCase();
    return t === "input" ? !!pp[e.type] : t === "textarea";
  }
  function yf(e, t, n, a) {
    Xa ? Za ? Za.push(a) : Za = [a] : Xa = a, t = $r(t, "onChange"), 0 < t.length && (n = new Fi(
      "onChange",
      "change",
      null,
      n,
      a
    ), e.push({ event: n, listeners: t }));
  }
  var Xl = null, Zl = null;
  function vp(e) {
    F1(e, 0);
  }
  function tr(e) {
    var t = $l(e);
    if (Fu(t)) return e;
  }
  function xf(e, t) {
    if (e === "change") return t;
  }
  var Sf = !1;
  if (gn) {
    var ns;
    if (gn) {
      var as = "oninput" in document;
      if (!as) {
        var _f = document.createElement("div");
        _f.setAttribute("oninput", "return;"), as = typeof _f.oninput == "function";
      }
      ns = as;
    } else ns = !1;
    Sf = ns && (!document.documentMode || 9 < document.documentMode);
  }
  function wf() {
    Xl && (Xl.detachEvent("onpropertychange", Cf), Zl = Xl = null);
  }
  function Cf(e) {
    if (e.propertyName === "value" && tr(Zl)) {
      var t = [];
      yf(
        t,
        Zl,
        e,
        Zo(e)
      ), of(vp, t);
    }
  }
  function gp(e, t, n) {
    e === "focusin" ? (wf(), Xl = t, Zl = n, Xl.attachEvent("onpropertychange", Cf)) : e === "focusout" && wf();
  }
  function bp(e) {
    if (e === "selectionchange" || e === "keyup" || e === "keydown")
      return tr(Zl);
  }
  function yp(e, t) {
    if (e === "click") return tr(t);
  }
  function xp(e, t) {
    if (e === "input" || e === "change")
      return tr(t);
  }
  function Sp(e, t) {
    return e === t && (e !== 0 || 1 / e === 1 / t) || e !== e && t !== t;
  }
  var Nt = typeof Object.is == "function" ? Object.is : Sp;
  function Kl(e, t) {
    if (Nt(e, t)) return !0;
    if (typeof e != "object" || e === null || typeof t != "object" || t === null)
      return !1;
    var n = Object.keys(e), a = Object.keys(t);
    if (n.length !== a.length) return !1;
    for (a = 0; a < n.length; a++) {
      var r = n[a];
      if (!yt.call(t, r) || !Nt(e[r], t[r]))
        return !1;
    }
    return !0;
  }
  function Ef(e) {
    for (; e && e.firstChild; ) e = e.firstChild;
    return e;
  }
  function Tf(e, t) {
    var n = Ef(e);
    e = 0;
    for (var a; n; ) {
      if (n.nodeType === 3) {
        if (a = e + n.textContent.length, e <= t && a >= t)
          return { node: n, offset: t - e };
        e = a;
      }
      e: {
        for (; n; ) {
          if (n.nextSibling) {
            n = n.nextSibling;
            break e;
          }
          n = n.parentNode;
        }
        n = void 0;
      }
      n = Ef(n);
    }
  }
  function Mf(e, t) {
    return e && t ? e === t ? !0 : e && e.nodeType === 3 ? !1 : t && t.nodeType === 3 ? Mf(e, t.parentNode) : "contains" in e ? e.contains(t) : e.compareDocumentPosition ? !!(e.compareDocumentPosition(t) & 16) : !1 : !1;
  }
  function Af(e) {
    e = e != null && e.ownerDocument != null && e.ownerDocument.defaultView != null ? e.ownerDocument.defaultView : window;
    for (var t = Ki(e.document); t instanceof e.HTMLIFrameElement; ) {
      try {
        var n = typeof t.contentWindow.location.href == "string";
      } catch {
        n = !1;
      }
      if (n) e = t.contentWindow;
      else break;
      t = Ki(e.document);
    }
    return t;
  }
  function ls(e) {
    var t = e && e.nodeName && e.nodeName.toLowerCase();
    return t && (t === "input" && (e.type === "text" || e.type === "search" || e.type === "tel" || e.type === "url" || e.type === "password") || t === "textarea" || e.contentEditable === "true");
  }
  var _p = gn && "documentMode" in document && 11 >= document.documentMode, Ja = null, is = null, Jl = null, rs = !1;
  function jf(e, t, n) {
    var a = n.window === n ? n.document : n.nodeType === 9 ? n : n.ownerDocument;
    rs || Ja == null || Ja !== Ki(a) || (a = Ja, "selectionStart" in a && ls(a) ? a = { start: a.selectionStart, end: a.selectionEnd } : (a = (a.ownerDocument && a.ownerDocument.defaultView || window).getSelection(), a = {
      anchorNode: a.anchorNode,
      anchorOffset: a.anchorOffset,
      focusNode: a.focusNode,
      focusOffset: a.focusOffset
    }), Jl && Kl(Jl, a) || (Jl = a, a = $r(is, "onSelect"), 0 < a.length && (t = new Fi(
      "onSelect",
      "select",
      null,
      t,
      n
    ), e.push({ event: t, listeners: a }), t.target = Ja)));
  }
  function ga(e, t) {
    var n = {};
    return n[e.toLowerCase()] = t.toLowerCase(), n["Webkit" + e] = "webkit" + t, n["Moz" + e] = "moz" + t, n;
  }
  var Pa = {
    animationend: ga("Animation", "AnimationEnd"),
    animationiteration: ga("Animation", "AnimationIteration"),
    animationstart: ga("Animation", "AnimationStart"),
    transitionrun: ga("Transition", "TransitionRun"),
    transitionstart: ga("Transition", "TransitionStart"),
    transitioncancel: ga("Transition", "TransitionCancel"),
    transitionend: ga("Transition", "TransitionEnd")
  }, os = {}, kf = {};
  gn && (kf = document.createElement("div").style, "AnimationEvent" in window || (delete Pa.animationend.animation, delete Pa.animationiteration.animation, delete Pa.animationstart.animation), "TransitionEvent" in window || delete Pa.transitionend.transition);
  function ba(e) {
    if (os[e]) return os[e];
    if (!Pa[e]) return e;
    var t = Pa[e], n;
    for (n in t)
      if (t.hasOwnProperty(n) && n in kf)
        return os[e] = t[n];
    return e;
  }
  var Nf = ba("animationend"), Rf = ba("animationiteration"), Df = ba("animationstart"), wp = ba("transitionrun"), Cp = ba("transitionstart"), Ep = ba("transitioncancel"), zf = ba("transitionend"), Of = /* @__PURE__ */ new Map(), ss = "abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(
    " "
  );
  ss.push("scrollEnd");
  function It(e, t) {
    Of.set(e, t), pa(t, [e]);
  }
  var Uf = /* @__PURE__ */ new WeakMap();
  function Vt(e, t) {
    if (typeof e == "object" && e !== null) {
      var n = Uf.get(e);
      return n !== void 0 ? n : (t = {
        value: e,
        source: t,
        stack: Wu(t)
      }, Uf.set(e, t), t);
    }
    return {
      value: e,
      source: t,
      stack: Wu(t)
    };
  }
  var qt = [], Wa = 0, cs = 0;
  function nr() {
    for (var e = Wa, t = cs = Wa = 0; t < e; ) {
      var n = qt[t];
      qt[t++] = null;
      var a = qt[t];
      qt[t++] = null;
      var r = qt[t];
      qt[t++] = null;
      var c = qt[t];
      if (qt[t++] = null, a !== null && r !== null) {
        var d = a.pending;
        d === null ? r.next = r : (r.next = d.next, d.next = r), a.pending = r;
      }
      c !== 0 && Lf(n, r, c);
    }
  }
  function ar(e, t, n, a) {
    qt[Wa++] = e, qt[Wa++] = t, qt[Wa++] = n, qt[Wa++] = a, cs |= a, e.lanes |= a, e = e.alternate, e !== null && (e.lanes |= a);
  }
  function us(e, t, n, a) {
    return ar(e, t, n, a), lr(e);
  }
  function Ia(e, t) {
    return ar(e, null, null, t), lr(e);
  }
  function Lf(e, t, n) {
    e.lanes |= n;
    var a = e.alternate;
    a !== null && (a.lanes |= n);
    for (var r = !1, c = e.return; c !== null; )
      c.childLanes |= n, a = c.alternate, a !== null && (a.childLanes |= n), c.tag === 22 && (e = c.stateNode, e === null || e._visibility & 1 || (r = !0)), e = c, c = c.return;
    return e.tag === 3 ? (c = e.stateNode, r && t !== null && (r = 31 - ot(n), e = c.hiddenUpdates, a = e[r], a === null ? e[r] = [t] : a.push(t), t.lane = n | 536870912), c) : null;
  }
  function lr(e) {
    if (50 < xi)
      throw xi = 0, vc = null, Error(s(185));
    for (var t = e.return; t !== null; )
      e = t, t = e.return;
    return e.tag === 3 ? e.stateNode : null;
  }
  var Fa = {};
  function Tp(e, t, n, a) {
    this.tag = e, this.key = n, this.sibling = this.child = this.return = this.stateNode = this.type = this.elementType = null, this.index = 0, this.refCleanup = this.ref = null, this.pendingProps = t, this.dependencies = this.memoizedState = this.updateQueue = this.memoizedProps = null, this.mode = a, this.subtreeFlags = this.flags = 0, this.deletions = null, this.childLanes = this.lanes = 0, this.alternate = null;
  }
  function Rt(e, t, n, a) {
    return new Tp(e, t, n, a);
  }
  function fs(e) {
    return e = e.prototype, !(!e || !e.isReactComponent);
  }
  function bn(e, t) {
    var n = e.alternate;
    return n === null ? (n = Rt(
      e.tag,
      t,
      e.key,
      e.mode
    ), n.elementType = e.elementType, n.type = e.type, n.stateNode = e.stateNode, n.alternate = e, e.alternate = n) : (n.pendingProps = t, n.type = e.type, n.flags = 0, n.subtreeFlags = 0, n.deletions = null), n.flags = e.flags & 65011712, n.childLanes = e.childLanes, n.lanes = e.lanes, n.child = e.child, n.memoizedProps = e.memoizedProps, n.memoizedState = e.memoizedState, n.updateQueue = e.updateQueue, t = e.dependencies, n.dependencies = t === null ? null : { lanes: t.lanes, firstContext: t.firstContext }, n.sibling = e.sibling, n.index = e.index, n.ref = e.ref, n.refCleanup = e.refCleanup, n;
  }
  function Bf(e, t) {
    e.flags &= 65011714;
    var n = e.alternate;
    return n === null ? (e.childLanes = 0, e.lanes = t, e.child = null, e.subtreeFlags = 0, e.memoizedProps = null, e.memoizedState = null, e.updateQueue = null, e.dependencies = null, e.stateNode = null) : (e.childLanes = n.childLanes, e.lanes = n.lanes, e.child = n.child, e.subtreeFlags = 0, e.deletions = null, e.memoizedProps = n.memoizedProps, e.memoizedState = n.memoizedState, e.updateQueue = n.updateQueue, e.type = n.type, t = n.dependencies, e.dependencies = t === null ? null : {
      lanes: t.lanes,
      firstContext: t.firstContext
    }), e;
  }
  function ir(e, t, n, a, r, c) {
    var d = 0;
    if (a = e, typeof e == "function") fs(e) && (d = 1);
    else if (typeof e == "string")
      d = Av(
        e,
        n,
        X.current
      ) ? 26 : e === "html" || e === "head" || e === "body" ? 27 : 5;
    else
      e: switch (e) {
        case fe:
          return e = Rt(31, n, t, r), e.elementType = fe, e.lanes = c, e;
        case j:
          return ya(n.children, r, c, t);
        case A:
          d = 8, r |= 24;
          break;
        case O:
          return e = Rt(12, n, t, r | 2), e.elementType = O, e.lanes = c, e;
        case J:
          return e = Rt(13, n, t, r), e.elementType = J, e.lanes = c, e;
        case W:
          return e = Rt(19, n, t, r), e.elementType = W, e.lanes = c, e;
        default:
          if (typeof e == "object" && e !== null)
            switch (e.$$typeof) {
              case U:
              case P:
                d = 10;
                break e;
              case F:
                d = 9;
                break e;
              case Y:
                d = 11;
                break e;
              case ee:
                d = 14;
                break e;
              case K:
                d = 16, a = null;
                break e;
            }
          d = 29, n = Error(
            s(130, e === null ? "null" : typeof e, "")
          ), a = null;
      }
    return t = Rt(d, n, t, r), t.elementType = e, t.type = a, t.lanes = c, t;
  }
  function ya(e, t, n, a) {
    return e = Rt(7, e, a, t), e.lanes = n, e;
  }
  function ds(e, t, n) {
    return e = Rt(6, e, null, t), e.lanes = n, e;
  }
  function hs(e, t, n) {
    return t = Rt(
      4,
      e.children !== null ? e.children : [],
      e.key,
      t
    ), t.lanes = n, t.stateNode = {
      containerInfo: e.containerInfo,
      pendingChildren: null,
      implementation: e.implementation
    }, t;
  }
  var el = [], tl = 0, rr = null, or = 0, Gt = [], Yt = 0, xa = null, yn = 1, xn = "";
  function Sa(e, t) {
    el[tl++] = or, el[tl++] = rr, rr = e, or = t;
  }
  function Hf(e, t, n) {
    Gt[Yt++] = yn, Gt[Yt++] = xn, Gt[Yt++] = xa, xa = e;
    var a = yn;
    e = xn;
    var r = 32 - ot(a) - 1;
    a &= ~(1 << r), n += 1;
    var c = 32 - ot(t) + r;
    if (30 < c) {
      var d = r - r % 5;
      c = (a & (1 << d) - 1).toString(32), a >>= d, r -= d, yn = 1 << 32 - ot(t) + r | n << r | a, xn = c + e;
    } else
      yn = 1 << c | n << r | a, xn = e;
  }
  function ms(e) {
    e.return !== null && (Sa(e, 1), Hf(e, 1, 0));
  }
  function ps(e) {
    for (; e === rr; )
      rr = el[--tl], el[tl] = null, or = el[--tl], el[tl] = null;
    for (; e === xa; )
      xa = Gt[--Yt], Gt[Yt] = null, xn = Gt[--Yt], Gt[Yt] = null, yn = Gt[--Yt], Gt[Yt] = null;
  }
  var _t = null, He = null, Te = !1, _a = null, ln = !1, vs = Error(s(519));
  function wa(e) {
    var t = Error(s(418, ""));
    throw Il(Vt(t, e)), vs;
  }
  function $f(e) {
    var t = e.stateNode, n = e.type, a = e.memoizedProps;
    switch (t[Ye] = e, t[Oe] = a, n) {
      case "dialog":
        _e("cancel", t), _e("close", t);
        break;
      case "iframe":
      case "object":
      case "embed":
        _e("load", t);
        break;
      case "video":
      case "audio":
        for (n = 0; n < _i.length; n++)
          _e(_i[n], t);
        break;
      case "source":
        _e("error", t);
        break;
      case "img":
      case "image":
      case "link":
        _e("error", t), _e("load", t);
        break;
      case "details":
        _e("toggle", t);
        break;
      case "input":
        _e("invalid", t), ef(
          t,
          a.value,
          a.defaultValue,
          a.checked,
          a.defaultChecked,
          a.type,
          a.name,
          !0
        ), Zi(t);
        break;
      case "select":
        _e("invalid", t);
        break;
      case "textarea":
        _e("invalid", t), nf(t, a.value, a.defaultValue, a.children), Zi(t);
    }
    n = a.children, typeof n != "string" && typeof n != "number" && typeof n != "bigint" || t.textContent === "" + n || a.suppressHydrationWarning === !0 || a0(t.textContent, n) ? (a.popover != null && (_e("beforetoggle", t), _e("toggle", t)), a.onScroll != null && _e("scroll", t), a.onScrollEnd != null && _e("scrollend", t), a.onClick != null && (t.onclick = Vr), t = !0) : t = !1, t || wa(e);
  }
  function Vf(e) {
    for (_t = e.return; _t; )
      switch (_t.tag) {
        case 5:
        case 13:
          ln = !1;
          return;
        case 27:
        case 3:
          ln = !0;
          return;
        default:
          _t = _t.return;
      }
  }
  function Pl(e) {
    if (e !== _t) return !1;
    if (!Te) return Vf(e), Te = !0, !1;
    var t = e.tag, n;
    if ((n = t !== 3 && t !== 27) && ((n = t === 5) && (n = e.type, n = !(n !== "form" && n !== "button") || Rc(e.type, e.memoizedProps)), n = !n), n && He && wa(e), Vf(e), t === 13) {
      if (e = e.memoizedState, e = e !== null ? e.dehydrated : null, !e) throw Error(s(317));
      e: {
        for (e = e.nextSibling, t = 0; e; ) {
          if (e.nodeType === 8)
            if (n = e.data, n === "/$") {
              if (t === 0) {
                He = en(e.nextSibling);
                break e;
              }
              t--;
            } else
              n !== "$" && n !== "$!" && n !== "$?" || t++;
          e = e.nextSibling;
        }
        He = null;
      }
    } else
      t === 27 ? (t = He, Fn(e.type) ? (e = Uc, Uc = null, He = e) : He = t) : He = _t ? en(e.stateNode.nextSibling) : null;
    return !0;
  }
  function Wl() {
    He = _t = null, Te = !1;
  }
  function qf() {
    var e = _a;
    return e !== null && (Mt === null ? Mt = e : Mt.push.apply(
      Mt,
      e
    ), _a = null), e;
  }
  function Il(e) {
    _a === null ? _a = [e] : _a.push(e);
  }
  var gs = $(null), Ca = null, Sn = null;
  function Bn(e, t, n) {
    L(gs, t._currentValue), t._currentValue = n;
  }
  function _n(e) {
    e._currentValue = gs.current, I(gs);
  }
  function bs(e, t, n) {
    for (; e !== null; ) {
      var a = e.alternate;
      if ((e.childLanes & t) !== t ? (e.childLanes |= t, a !== null && (a.childLanes |= t)) : a !== null && (a.childLanes & t) !== t && (a.childLanes |= t), e === n) break;
      e = e.return;
    }
  }
  function ys(e, t, n, a) {
    var r = e.child;
    for (r !== null && (r.return = e); r !== null; ) {
      var c = r.dependencies;
      if (c !== null) {
        var d = r.child;
        c = c.firstContext;
        e: for (; c !== null; ) {
          var b = c;
          c = r;
          for (var w = 0; w < t.length; w++)
            if (b.context === t[w]) {
              c.lanes |= n, b = c.alternate, b !== null && (b.lanes |= n), bs(
                c.return,
                n,
                e
              ), a || (d = null);
              break e;
            }
          c = b.next;
        }
      } else if (r.tag === 18) {
        if (d = r.return, d === null) throw Error(s(341));
        d.lanes |= n, c = d.alternate, c !== null && (c.lanes |= n), bs(d, n, e), d = null;
      } else d = r.child;
      if (d !== null) d.return = r;
      else
        for (d = r; d !== null; ) {
          if (d === e) {
            d = null;
            break;
          }
          if (r = d.sibling, r !== null) {
            r.return = d.return, d = r;
            break;
          }
          d = d.return;
        }
      r = d;
    }
  }
  function Fl(e, t, n, a) {
    e = null;
    for (var r = t, c = !1; r !== null; ) {
      if (!c) {
        if ((r.flags & 524288) !== 0) c = !0;
        else if ((r.flags & 262144) !== 0) break;
      }
      if (r.tag === 10) {
        var d = r.alternate;
        if (d === null) throw Error(s(387));
        if (d = d.memoizedProps, d !== null) {
          var b = r.type;
          Nt(r.pendingProps.value, d.value) || (e !== null ? e.push(b) : e = [b]);
        }
      } else if (r === ve.current) {
        if (d = r.alternate, d === null) throw Error(s(387));
        d.memoizedState.memoizedState !== r.memoizedState.memoizedState && (e !== null ? e.push(Ai) : e = [Ai]);
      }
      r = r.return;
    }
    e !== null && ys(
      t,
      e,
      n,
      a
    ), t.flags |= 262144;
  }
  function sr(e) {
    for (e = e.firstContext; e !== null; ) {
      if (!Nt(
        e.context._currentValue,
        e.memoizedValue
      ))
        return !0;
      e = e.next;
    }
    return !1;
  }
  function Ea(e) {
    Ca = e, Sn = null, e = e.dependencies, e !== null && (e.firstContext = null);
  }
  function vt(e) {
    return Gf(Ca, e);
  }
  function cr(e, t) {
    return Ca === null && Ea(e), Gf(e, t);
  }
  function Gf(e, t) {
    var n = t._currentValue;
    if (t = { context: t, memoizedValue: n, next: null }, Sn === null) {
      if (e === null) throw Error(s(308));
      Sn = t, e.dependencies = { lanes: 0, firstContext: t }, e.flags |= 524288;
    } else Sn = Sn.next = t;
    return n;
  }
  var Mp = typeof AbortController < "u" ? AbortController : function() {
    var e = [], t = this.signal = {
      aborted: !1,
      addEventListener: function(n, a) {
        e.push(a);
      }
    };
    this.abort = function() {
      t.aborted = !0, e.forEach(function(n) {
        return n();
      });
    };
  }, Ap = l.unstable_scheduleCallback, jp = l.unstable_NormalPriority, Fe = {
    $$typeof: P,
    Consumer: null,
    Provider: null,
    _currentValue: null,
    _currentValue2: null,
    _threadCount: 0
  };
  function xs() {
    return {
      controller: new Mp(),
      data: /* @__PURE__ */ new Map(),
      refCount: 0
    };
  }
  function ei(e) {
    e.refCount--, e.refCount === 0 && Ap(jp, function() {
      e.controller.abort();
    });
  }
  var ti = null, Ss = 0, nl = 0, al = null;
  function kp(e, t) {
    if (ti === null) {
      var n = ti = [];
      Ss = 0, nl = wc(), al = {
        status: "pending",
        value: void 0,
        then: function(a) {
          n.push(a);
        }
      };
    }
    return Ss++, t.then(Yf, Yf), t;
  }
  function Yf() {
    if (--Ss === 0 && ti !== null) {
      al !== null && (al.status = "fulfilled");
      var e = ti;
      ti = null, nl = 0, al = null;
      for (var t = 0; t < e.length; t++) (0, e[t])();
    }
  }
  function Np(e, t) {
    var n = [], a = {
      status: "pending",
      value: null,
      reason: null,
      then: function(r) {
        n.push(r);
      }
    };
    return e.then(
      function() {
        a.status = "fulfilled", a.value = t;
        for (var r = 0; r < n.length; r++) (0, n[r])(t);
      },
      function(r) {
        for (a.status = "rejected", a.reason = r, r = 0; r < n.length; r++)
          (0, n[r])(void 0);
      }
    ), a;
  }
  var Qf = R.S;
  R.S = function(e, t) {
    typeof t == "object" && t !== null && typeof t.then == "function" && kp(e, t), Qf !== null && Qf(e, t);
  };
  var Ta = $(null);
  function _s() {
    var e = Ta.current;
    return e !== null ? e : Ue.pooledCache;
  }
  function ur(e, t) {
    t === null ? L(Ta, Ta.current) : L(Ta, t.pool);
  }
  function Xf() {
    var e = _s();
    return e === null ? null : { parent: Fe._currentValue, pool: e };
  }
  var ni = Error(s(460)), Zf = Error(s(474)), fr = Error(s(542)), ws = { then: function() {
  } };
  function Kf(e) {
    return e = e.status, e === "fulfilled" || e === "rejected";
  }
  function dr() {
  }
  function Jf(e, t, n) {
    switch (n = e[n], n === void 0 ? e.push(t) : n !== t && (t.then(dr, dr), t = n), t.status) {
      case "fulfilled":
        return t.value;
      case "rejected":
        throw e = t.reason, Wf(e), e;
      default:
        if (typeof t.status == "string") t.then(dr, dr);
        else {
          if (e = Ue, e !== null && 100 < e.shellSuspendCounter)
            throw Error(s(482));
          e = t, e.status = "pending", e.then(
            function(a) {
              if (t.status === "pending") {
                var r = t;
                r.status = "fulfilled", r.value = a;
              }
            },
            function(a) {
              if (t.status === "pending") {
                var r = t;
                r.status = "rejected", r.reason = a;
              }
            }
          );
        }
        switch (t.status) {
          case "fulfilled":
            return t.value;
          case "rejected":
            throw e = t.reason, Wf(e), e;
        }
        throw ai = t, ni;
    }
  }
  var ai = null;
  function Pf() {
    if (ai === null) throw Error(s(459));
    var e = ai;
    return ai = null, e;
  }
  function Wf(e) {
    if (e === ni || e === fr)
      throw Error(s(483));
  }
  var Hn = !1;
  function Cs(e) {
    e.updateQueue = {
      baseState: e.memoizedState,
      firstBaseUpdate: null,
      lastBaseUpdate: null,
      shared: { pending: null, lanes: 0, hiddenCallbacks: null },
      callbacks: null
    };
  }
  function Es(e, t) {
    e = e.updateQueue, t.updateQueue === e && (t.updateQueue = {
      baseState: e.baseState,
      firstBaseUpdate: e.firstBaseUpdate,
      lastBaseUpdate: e.lastBaseUpdate,
      shared: e.shared,
      callbacks: null
    });
  }
  function $n(e) {
    return { lane: e, tag: 0, payload: null, callback: null, next: null };
  }
  function Vn(e, t, n) {
    var a = e.updateQueue;
    if (a === null) return null;
    if (a = a.shared, (Ae & 2) !== 0) {
      var r = a.pending;
      return r === null ? t.next = t : (t.next = r.next, r.next = t), a.pending = t, t = lr(e), Lf(e, null, n), t;
    }
    return ar(e, a, t, n), lr(e);
  }
  function li(e, t, n) {
    if (t = t.updateQueue, t !== null && (t = t.shared, (n & 4194048) !== 0)) {
      var a = t.lanes;
      a &= e.pendingLanes, n |= a, t.lanes = n, qe(e, n);
    }
  }
  function Ts(e, t) {
    var n = e.updateQueue, a = e.alternate;
    if (a !== null && (a = a.updateQueue, n === a)) {
      var r = null, c = null;
      if (n = n.firstBaseUpdate, n !== null) {
        do {
          var d = {
            lane: n.lane,
            tag: n.tag,
            payload: n.payload,
            callback: null,
            next: null
          };
          c === null ? r = c = d : c = c.next = d, n = n.next;
        } while (n !== null);
        c === null ? r = c = t : c = c.next = t;
      } else r = c = t;
      n = {
        baseState: a.baseState,
        firstBaseUpdate: r,
        lastBaseUpdate: c,
        shared: a.shared,
        callbacks: a.callbacks
      }, e.updateQueue = n;
      return;
    }
    e = n.lastBaseUpdate, e === null ? n.firstBaseUpdate = t : e.next = t, n.lastBaseUpdate = t;
  }
  var Ms = !1;
  function ii() {
    if (Ms) {
      var e = al;
      if (e !== null) throw e;
    }
  }
  function ri(e, t, n, a) {
    Ms = !1;
    var r = e.updateQueue;
    Hn = !1;
    var c = r.firstBaseUpdate, d = r.lastBaseUpdate, b = r.shared.pending;
    if (b !== null) {
      r.shared.pending = null;
      var w = b, N = w.next;
      w.next = null, d === null ? c = N : d.next = N, d = w;
      var B = e.alternate;
      B !== null && (B = B.updateQueue, b = B.lastBaseUpdate, b !== d && (b === null ? B.firstBaseUpdate = N : b.next = N, B.lastBaseUpdate = w));
    }
    if (c !== null) {
      var V = r.baseState;
      d = 0, B = N = w = null, b = c;
      do {
        var D = b.lane & -536870913, z = D !== b.lane;
        if (z ? (Ce & D) === D : (a & D) === D) {
          D !== 0 && D === nl && (Ms = !0), B !== null && (B = B.next = {
            lane: 0,
            tag: b.tag,
            payload: b.payload,
            callback: null,
            next: null
          });
          e: {
            var de = e, se = b;
            D = t;
            var Re = n;
            switch (se.tag) {
              case 1:
                if (de = se.payload, typeof de == "function") {
                  V = de.call(Re, V, D);
                  break e;
                }
                V = de;
                break e;
              case 3:
                de.flags = de.flags & -65537 | 128;
              case 0:
                if (de = se.payload, D = typeof de == "function" ? de.call(Re, V, D) : de, D == null) break e;
                V = y({}, V, D);
                break e;
              case 2:
                Hn = !0;
            }
          }
          D = b.callback, D !== null && (e.flags |= 64, z && (e.flags |= 8192), z = r.callbacks, z === null ? r.callbacks = [D] : z.push(D));
        } else
          z = {
            lane: D,
            tag: b.tag,
            payload: b.payload,
            callback: b.callback,
            next: null
          }, B === null ? (N = B = z, w = V) : B = B.next = z, d |= D;
        if (b = b.next, b === null) {
          if (b = r.shared.pending, b === null)
            break;
          z = b, b = z.next, z.next = null, r.lastBaseUpdate = z, r.shared.pending = null;
        }
      } while (!0);
      B === null && (w = V), r.baseState = w, r.firstBaseUpdate = N, r.lastBaseUpdate = B, c === null && (r.shared.lanes = 0), Jn |= d, e.lanes = d, e.memoizedState = V;
    }
  }
  function If(e, t) {
    if (typeof e != "function")
      throw Error(s(191, e));
    e.call(t);
  }
  function Ff(e, t) {
    var n = e.callbacks;
    if (n !== null)
      for (e.callbacks = null, e = 0; e < n.length; e++)
        If(n[e], t);
  }
  var ll = $(null), hr = $(0);
  function ed(e, t) {
    e = jn, L(hr, e), L(ll, t), jn = e | t.baseLanes;
  }
  function As() {
    L(hr, jn), L(ll, ll.current);
  }
  function js() {
    jn = hr.current, I(ll), I(hr);
  }
  var qn = 0, ge = null, ke = null, Pe = null, mr = !1, il = !1, Ma = !1, pr = 0, oi = 0, rl = null, Rp = 0;
  function Qe() {
    throw Error(s(321));
  }
  function ks(e, t) {
    if (t === null) return !1;
    for (var n = 0; n < t.length && n < e.length; n++)
      if (!Nt(e[n], t[n])) return !1;
    return !0;
  }
  function Ns(e, t, n, a, r, c) {
    return qn = c, ge = t, t.memoizedState = null, t.updateQueue = null, t.lanes = 0, R.H = e === null || e.memoizedState === null ? Ld : Bd, Ma = !1, c = n(a, r), Ma = !1, il && (c = nd(
      t,
      n,
      a,
      r
    )), td(e), c;
  }
  function td(e) {
    R.H = Sr;
    var t = ke !== null && ke.next !== null;
    if (qn = 0, Pe = ke = ge = null, mr = !1, oi = 0, rl = null, t) throw Error(s(300));
    e === null || lt || (e = e.dependencies, e !== null && sr(e) && (lt = !0));
  }
  function nd(e, t, n, a) {
    ge = e;
    var r = 0;
    do {
      if (il && (rl = null), oi = 0, il = !1, 25 <= r) throw Error(s(301));
      if (r += 1, Pe = ke = null, e.updateQueue != null) {
        var c = e.updateQueue;
        c.lastEffect = null, c.events = null, c.stores = null, c.memoCache != null && (c.memoCache.index = 0);
      }
      R.H = Hp, c = t(n, a);
    } while (il);
    return c;
  }
  function Dp() {
    var e = R.H, t = e.useState()[0];
    return t = typeof t.then == "function" ? si(t) : t, e = e.useState()[0], (ke !== null ? ke.memoizedState : null) !== e && (ge.flags |= 1024), t;
  }
  function Rs() {
    var e = pr !== 0;
    return pr = 0, e;
  }
  function Ds(e, t, n) {
    t.updateQueue = e.updateQueue, t.flags &= -2053, e.lanes &= ~n;
  }
  function zs(e) {
    if (mr) {
      for (e = e.memoizedState; e !== null; ) {
        var t = e.queue;
        t !== null && (t.pending = null), e = e.next;
      }
      mr = !1;
    }
    qn = 0, Pe = ke = ge = null, il = !1, oi = pr = 0, rl = null;
  }
  function Et() {
    var e = {
      memoizedState: null,
      baseState: null,
      baseQueue: null,
      queue: null,
      next: null
    };
    return Pe === null ? ge.memoizedState = Pe = e : Pe = Pe.next = e, Pe;
  }
  function We() {
    if (ke === null) {
      var e = ge.alternate;
      e = e !== null ? e.memoizedState : null;
    } else e = ke.next;
    var t = Pe === null ? ge.memoizedState : Pe.next;
    if (t !== null)
      Pe = t, ke = e;
    else {
      if (e === null)
        throw ge.alternate === null ? Error(s(467)) : Error(s(310));
      ke = e, e = {
        memoizedState: ke.memoizedState,
        baseState: ke.baseState,
        baseQueue: ke.baseQueue,
        queue: ke.queue,
        next: null
      }, Pe === null ? ge.memoizedState = Pe = e : Pe = Pe.next = e;
    }
    return Pe;
  }
  function Os() {
    return { lastEffect: null, events: null, stores: null, memoCache: null };
  }
  function si(e) {
    var t = oi;
    return oi += 1, rl === null && (rl = []), e = Jf(rl, e, t), t = ge, (Pe === null ? t.memoizedState : Pe.next) === null && (t = t.alternate, R.H = t === null || t.memoizedState === null ? Ld : Bd), e;
  }
  function vr(e) {
    if (e !== null && typeof e == "object") {
      if (typeof e.then == "function") return si(e);
      if (e.$$typeof === P) return vt(e);
    }
    throw Error(s(438, String(e)));
  }
  function Us(e) {
    var t = null, n = ge.updateQueue;
    if (n !== null && (t = n.memoCache), t == null) {
      var a = ge.alternate;
      a !== null && (a = a.updateQueue, a !== null && (a = a.memoCache, a != null && (t = {
        data: a.data.map(function(r) {
          return r.slice();
        }),
        index: 0
      })));
    }
    if (t == null && (t = { data: [], index: 0 }), n === null && (n = Os(), ge.updateQueue = n), n.memoCache = t, n = t.data[t.index], n === void 0)
      for (n = t.data[t.index] = Array(e), a = 0; a < e; a++)
        n[a] = Ze;
    return t.index++, n;
  }
  function wn(e, t) {
    return typeof t == "function" ? t(e) : t;
  }
  function gr(e) {
    var t = We();
    return Ls(t, ke, e);
  }
  function Ls(e, t, n) {
    var a = e.queue;
    if (a === null) throw Error(s(311));
    a.lastRenderedReducer = n;
    var r = e.baseQueue, c = a.pending;
    if (c !== null) {
      if (r !== null) {
        var d = r.next;
        r.next = c.next, c.next = d;
      }
      t.baseQueue = r = c, a.pending = null;
    }
    if (c = e.baseState, r === null) e.memoizedState = c;
    else {
      t = r.next;
      var b = d = null, w = null, N = t, B = !1;
      do {
        var V = N.lane & -536870913;
        if (V !== N.lane ? (Ce & V) === V : (qn & V) === V) {
          var D = N.revertLane;
          if (D === 0)
            w !== null && (w = w.next = {
              lane: 0,
              revertLane: 0,
              action: N.action,
              hasEagerState: N.hasEagerState,
              eagerState: N.eagerState,
              next: null
            }), V === nl && (B = !0);
          else if ((qn & D) === D) {
            N = N.next, D === nl && (B = !0);
            continue;
          } else
            V = {
              lane: 0,
              revertLane: N.revertLane,
              action: N.action,
              hasEagerState: N.hasEagerState,
              eagerState: N.eagerState,
              next: null
            }, w === null ? (b = w = V, d = c) : w = w.next = V, ge.lanes |= D, Jn |= D;
          V = N.action, Ma && n(c, V), c = N.hasEagerState ? N.eagerState : n(c, V);
        } else
          D = {
            lane: V,
            revertLane: N.revertLane,
            action: N.action,
            hasEagerState: N.hasEagerState,
            eagerState: N.eagerState,
            next: null
          }, w === null ? (b = w = D, d = c) : w = w.next = D, ge.lanes |= V, Jn |= V;
        N = N.next;
      } while (N !== null && N !== t);
      if (w === null ? d = c : w.next = b, !Nt(c, e.memoizedState) && (lt = !0, B && (n = al, n !== null)))
        throw n;
      e.memoizedState = c, e.baseState = d, e.baseQueue = w, a.lastRenderedState = c;
    }
    return r === null && (a.lanes = 0), [e.memoizedState, a.dispatch];
  }
  function Bs(e) {
    var t = We(), n = t.queue;
    if (n === null) throw Error(s(311));
    n.lastRenderedReducer = e;
    var a = n.dispatch, r = n.pending, c = t.memoizedState;
    if (r !== null) {
      n.pending = null;
      var d = r = r.next;
      do
        c = e(c, d.action), d = d.next;
      while (d !== r);
      Nt(c, t.memoizedState) || (lt = !0), t.memoizedState = c, t.baseQueue === null && (t.baseState = c), n.lastRenderedState = c;
    }
    return [c, a];
  }
  function ad(e, t, n) {
    var a = ge, r = We(), c = Te;
    if (c) {
      if (n === void 0) throw Error(s(407));
      n = n();
    } else n = t();
    var d = !Nt(
      (ke || r).memoizedState,
      n
    );
    d && (r.memoizedState = n, lt = !0), r = r.queue;
    var b = rd.bind(null, a, r, e);
    if (ci(2048, 8, b, [e]), r.getSnapshot !== t || d || Pe !== null && Pe.memoizedState.tag & 1) {
      if (a.flags |= 2048, ol(
        9,
        br(),
        id.bind(
          null,
          a,
          r,
          n,
          t
        ),
        null
      ), Ue === null) throw Error(s(349));
      c || (qn & 124) !== 0 || ld(a, t, n);
    }
    return n;
  }
  function ld(e, t, n) {
    e.flags |= 16384, e = { getSnapshot: t, value: n }, t = ge.updateQueue, t === null ? (t = Os(), ge.updateQueue = t, t.stores = [e]) : (n = t.stores, n === null ? t.stores = [e] : n.push(e));
  }
  function id(e, t, n, a) {
    t.value = n, t.getSnapshot = a, od(t) && sd(e);
  }
  function rd(e, t, n) {
    return n(function() {
      od(t) && sd(e);
    });
  }
  function od(e) {
    var t = e.getSnapshot;
    e = e.value;
    try {
      var n = t();
      return !Nt(e, n);
    } catch {
      return !0;
    }
  }
  function sd(e) {
    var t = Ia(e, 2);
    t !== null && Lt(t, e, 2);
  }
  function Hs(e) {
    var t = Et();
    if (typeof e == "function") {
      var n = e;
      if (e = n(), Ma) {
        Pt(!0);
        try {
          n();
        } finally {
          Pt(!1);
        }
      }
    }
    return t.memoizedState = t.baseState = e, t.queue = {
      pending: null,
      lanes: 0,
      dispatch: null,
      lastRenderedReducer: wn,
      lastRenderedState: e
    }, t;
  }
  function cd(e, t, n, a) {
    return e.baseState = n, Ls(
      e,
      ke,
      typeof a == "function" ? a : wn
    );
  }
  function zp(e, t, n, a, r) {
    if (xr(e)) throw Error(s(485));
    if (e = t.action, e !== null) {
      var c = {
        payload: r,
        action: e,
        next: null,
        isTransition: !0,
        status: "pending",
        value: null,
        reason: null,
        listeners: [],
        then: function(d) {
          c.listeners.push(d);
        }
      };
      R.T !== null ? n(!0) : c.isTransition = !1, a(c), n = t.pending, n === null ? (c.next = t.pending = c, ud(t, c)) : (c.next = n.next, t.pending = n.next = c);
    }
  }
  function ud(e, t) {
    var n = t.action, a = t.payload, r = e.state;
    if (t.isTransition) {
      var c = R.T, d = {};
      R.T = d;
      try {
        var b = n(r, a), w = R.S;
        w !== null && w(d, b), fd(e, t, b);
      } catch (N) {
        $s(e, t, N);
      } finally {
        R.T = c;
      }
    } else
      try {
        c = n(r, a), fd(e, t, c);
      } catch (N) {
        $s(e, t, N);
      }
  }
  function fd(e, t, n) {
    n !== null && typeof n == "object" && typeof n.then == "function" ? n.then(
      function(a) {
        dd(e, t, a);
      },
      function(a) {
        return $s(e, t, a);
      }
    ) : dd(e, t, n);
  }
  function dd(e, t, n) {
    t.status = "fulfilled", t.value = n, hd(t), e.state = n, t = e.pending, t !== null && (n = t.next, n === t ? e.pending = null : (n = n.next, t.next = n, ud(e, n)));
  }
  function $s(e, t, n) {
    var a = e.pending;
    if (e.pending = null, a !== null) {
      a = a.next;
      do
        t.status = "rejected", t.reason = n, hd(t), t = t.next;
      while (t !== a);
    }
    e.action = null;
  }
  function hd(e) {
    e = e.listeners;
    for (var t = 0; t < e.length; t++) (0, e[t])();
  }
  function md(e, t) {
    return t;
  }
  function pd(e, t) {
    if (Te) {
      var n = Ue.formState;
      if (n !== null) {
        e: {
          var a = ge;
          if (Te) {
            if (He) {
              t: {
                for (var r = He, c = ln; r.nodeType !== 8; ) {
                  if (!c) {
                    r = null;
                    break t;
                  }
                  if (r = en(
                    r.nextSibling
                  ), r === null) {
                    r = null;
                    break t;
                  }
                }
                c = r.data, r = c === "F!" || c === "F" ? r : null;
              }
              if (r) {
                He = en(
                  r.nextSibling
                ), a = r.data === "F!";
                break e;
              }
            }
            wa(a);
          }
          a = !1;
        }
        a && (t = n[0]);
      }
    }
    return n = Et(), n.memoizedState = n.baseState = t, a = {
      pending: null,
      lanes: 0,
      dispatch: null,
      lastRenderedReducer: md,
      lastRenderedState: t
    }, n.queue = a, n = zd.bind(
      null,
      ge,
      a
    ), a.dispatch = n, a = Hs(!1), c = Qs.bind(
      null,
      ge,
      !1,
      a.queue
    ), a = Et(), r = {
      state: t,
      dispatch: null,
      action: e,
      pending: null
    }, a.queue = r, n = zp.bind(
      null,
      ge,
      r,
      c,
      n
    ), r.dispatch = n, a.memoizedState = e, [t, n, !1];
  }
  function vd(e) {
    var t = We();
    return gd(t, ke, e);
  }
  function gd(e, t, n) {
    if (t = Ls(
      e,
      t,
      md
    )[0], e = gr(wn)[0], typeof t == "object" && t !== null && typeof t.then == "function")
      try {
        var a = si(t);
      } catch (d) {
        throw d === ni ? fr : d;
      }
    else a = t;
    t = We();
    var r = t.queue, c = r.dispatch;
    return n !== t.memoizedState && (ge.flags |= 2048, ol(
      9,
      br(),
      Op.bind(null, r, n),
      null
    )), [a, c, e];
  }
  function Op(e, t) {
    e.action = t;
  }
  function bd(e) {
    var t = We(), n = ke;
    if (n !== null)
      return gd(t, n, e);
    We(), t = t.memoizedState, n = We();
    var a = n.queue.dispatch;
    return n.memoizedState = e, [t, a, !1];
  }
  function ol(e, t, n, a) {
    return e = { tag: e, create: n, deps: a, inst: t, next: null }, t = ge.updateQueue, t === null && (t = Os(), ge.updateQueue = t), n = t.lastEffect, n === null ? t.lastEffect = e.next = e : (a = n.next, n.next = e, e.next = a, t.lastEffect = e), e;
  }
  function br() {
    return { destroy: void 0, resource: void 0 };
  }
  function yd() {
    return We().memoizedState;
  }
  function yr(e, t, n, a) {
    var r = Et();
    a = a === void 0 ? null : a, ge.flags |= e, r.memoizedState = ol(
      1 | t,
      br(),
      n,
      a
    );
  }
  function ci(e, t, n, a) {
    var r = We();
    a = a === void 0 ? null : a;
    var c = r.memoizedState.inst;
    ke !== null && a !== null && ks(a, ke.memoizedState.deps) ? r.memoizedState = ol(t, c, n, a) : (ge.flags |= e, r.memoizedState = ol(
      1 | t,
      c,
      n,
      a
    ));
  }
  function xd(e, t) {
    yr(8390656, 8, e, t);
  }
  function Sd(e, t) {
    ci(2048, 8, e, t);
  }
  function _d(e, t) {
    return ci(4, 2, e, t);
  }
  function wd(e, t) {
    return ci(4, 4, e, t);
  }
  function Cd(e, t) {
    if (typeof t == "function") {
      e = e();
      var n = t(e);
      return function() {
        typeof n == "function" ? n() : t(null);
      };
    }
    if (t != null)
      return e = e(), t.current = e, function() {
        t.current = null;
      };
  }
  function Ed(e, t, n) {
    n = n != null ? n.concat([e]) : null, ci(4, 4, Cd.bind(null, t, e), n);
  }
  function Vs() {
  }
  function Td(e, t) {
    var n = We();
    t = t === void 0 ? null : t;
    var a = n.memoizedState;
    return t !== null && ks(t, a[1]) ? a[0] : (n.memoizedState = [e, t], e);
  }
  function Md(e, t) {
    var n = We();
    t = t === void 0 ? null : t;
    var a = n.memoizedState;
    if (t !== null && ks(t, a[1]))
      return a[0];
    if (a = e(), Ma) {
      Pt(!0);
      try {
        e();
      } finally {
        Pt(!1);
      }
    }
    return n.memoizedState = [a, t], a;
  }
  function qs(e, t, n) {
    return n === void 0 || (qn & 1073741824) !== 0 ? e.memoizedState = t : (e.memoizedState = n, e = k1(), ge.lanes |= e, Jn |= e, n);
  }
  function Ad(e, t, n, a) {
    return Nt(n, t) ? n : ll.current !== null ? (e = qs(e, n, a), Nt(e, t) || (lt = !0), e) : (qn & 42) === 0 ? (lt = !0, e.memoizedState = n) : (e = k1(), ge.lanes |= e, Jn |= e, t);
  }
  function jd(e, t, n, a, r) {
    var c = Q.p;
    Q.p = c !== 0 && 8 > c ? c : 8;
    var d = R.T, b = {};
    R.T = b, Qs(e, !1, t, n);
    try {
      var w = r(), N = R.S;
      if (N !== null && N(b, w), w !== null && typeof w == "object" && typeof w.then == "function") {
        var B = Np(
          w,
          a
        );
        ui(
          e,
          t,
          B,
          Ut(e)
        );
      } else
        ui(
          e,
          t,
          a,
          Ut(e)
        );
    } catch (V) {
      ui(
        e,
        t,
        { then: function() {
        }, status: "rejected", reason: V },
        Ut()
      );
    } finally {
      Q.p = c, R.T = d;
    }
  }
  function Up() {
  }
  function Gs(e, t, n, a) {
    if (e.tag !== 5) throw Error(s(476));
    var r = kd(e).queue;
    jd(
      e,
      r,
      t,
      q,
      n === null ? Up : function() {
        return Nd(e), n(a);
      }
    );
  }
  function kd(e) {
    var t = e.memoizedState;
    if (t !== null) return t;
    t = {
      memoizedState: q,
      baseState: q,
      baseQueue: null,
      queue: {
        pending: null,
        lanes: 0,
        dispatch: null,
        lastRenderedReducer: wn,
        lastRenderedState: q
      },
      next: null
    };
    var n = {};
    return t.next = {
      memoizedState: n,
      baseState: n,
      baseQueue: null,
      queue: {
        pending: null,
        lanes: 0,
        dispatch: null,
        lastRenderedReducer: wn,
        lastRenderedState: n
      },
      next: null
    }, e.memoizedState = t, e = e.alternate, e !== null && (e.memoizedState = t), t;
  }
  function Nd(e) {
    var t = kd(e).next.queue;
    ui(e, t, {}, Ut());
  }
  function Ys() {
    return vt(Ai);
  }
  function Rd() {
    return We().memoizedState;
  }
  function Dd() {
    return We().memoizedState;
  }
  function Lp(e) {
    for (var t = e.return; t !== null; ) {
      switch (t.tag) {
        case 24:
        case 3:
          var n = Ut();
          e = $n(n);
          var a = Vn(t, e, n);
          a !== null && (Lt(a, t, n), li(a, t, n)), t = { cache: xs() }, e.payload = t;
          return;
      }
      t = t.return;
    }
  }
  function Bp(e, t, n) {
    var a = Ut();
    n = {
      lane: a,
      revertLane: 0,
      action: n,
      hasEagerState: !1,
      eagerState: null,
      next: null
    }, xr(e) ? Od(t, n) : (n = us(e, t, n, a), n !== null && (Lt(n, e, a), Ud(n, t, a)));
  }
  function zd(e, t, n) {
    var a = Ut();
    ui(e, t, n, a);
  }
  function ui(e, t, n, a) {
    var r = {
      lane: a,
      revertLane: 0,
      action: n,
      hasEagerState: !1,
      eagerState: null,
      next: null
    };
    if (xr(e)) Od(t, r);
    else {
      var c = e.alternate;
      if (e.lanes === 0 && (c === null || c.lanes === 0) && (c = t.lastRenderedReducer, c !== null))
        try {
          var d = t.lastRenderedState, b = c(d, n);
          if (r.hasEagerState = !0, r.eagerState = b, Nt(b, d))
            return ar(e, t, r, 0), Ue === null && nr(), !1;
        } catch {
        } finally {
        }
      if (n = us(e, t, r, a), n !== null)
        return Lt(n, e, a), Ud(n, t, a), !0;
    }
    return !1;
  }
  function Qs(e, t, n, a) {
    if (a = {
      lane: 2,
      revertLane: wc(),
      action: a,
      hasEagerState: !1,
      eagerState: null,
      next: null
    }, xr(e)) {
      if (t) throw Error(s(479));
    } else
      t = us(
        e,
        n,
        a,
        2
      ), t !== null && Lt(t, e, 2);
  }
  function xr(e) {
    var t = e.alternate;
    return e === ge || t !== null && t === ge;
  }
  function Od(e, t) {
    il = mr = !0;
    var n = e.pending;
    n === null ? t.next = t : (t.next = n.next, n.next = t), e.pending = t;
  }
  function Ud(e, t, n) {
    if ((n & 4194048) !== 0) {
      var a = t.lanes;
      a &= e.pendingLanes, n |= a, t.lanes = n, qe(e, n);
    }
  }
  var Sr = {
    readContext: vt,
    use: vr,
    useCallback: Qe,
    useContext: Qe,
    useEffect: Qe,
    useImperativeHandle: Qe,
    useLayoutEffect: Qe,
    useInsertionEffect: Qe,
    useMemo: Qe,
    useReducer: Qe,
    useRef: Qe,
    useState: Qe,
    useDebugValue: Qe,
    useDeferredValue: Qe,
    useTransition: Qe,
    useSyncExternalStore: Qe,
    useId: Qe,
    useHostTransitionStatus: Qe,
    useFormState: Qe,
    useActionState: Qe,
    useOptimistic: Qe,
    useMemoCache: Qe,
    useCacheRefresh: Qe
  }, Ld = {
    readContext: vt,
    use: vr,
    useCallback: function(e, t) {
      return Et().memoizedState = [
        e,
        t === void 0 ? null : t
      ], e;
    },
    useContext: vt,
    useEffect: xd,
    useImperativeHandle: function(e, t, n) {
      n = n != null ? n.concat([e]) : null, yr(
        4194308,
        4,
        Cd.bind(null, t, e),
        n
      );
    },
    useLayoutEffect: function(e, t) {
      return yr(4194308, 4, e, t);
    },
    useInsertionEffect: function(e, t) {
      yr(4, 2, e, t);
    },
    useMemo: function(e, t) {
      var n = Et();
      t = t === void 0 ? null : t;
      var a = e();
      if (Ma) {
        Pt(!0);
        try {
          e();
        } finally {
          Pt(!1);
        }
      }
      return n.memoizedState = [a, t], a;
    },
    useReducer: function(e, t, n) {
      var a = Et();
      if (n !== void 0) {
        var r = n(t);
        if (Ma) {
          Pt(!0);
          try {
            n(t);
          } finally {
            Pt(!1);
          }
        }
      } else r = t;
      return a.memoizedState = a.baseState = r, e = {
        pending: null,
        lanes: 0,
        dispatch: null,
        lastRenderedReducer: e,
        lastRenderedState: r
      }, a.queue = e, e = e.dispatch = Bp.bind(
        null,
        ge,
        e
      ), [a.memoizedState, e];
    },
    useRef: function(e) {
      var t = Et();
      return e = { current: e }, t.memoizedState = e;
    },
    useState: function(e) {
      e = Hs(e);
      var t = e.queue, n = zd.bind(null, ge, t);
      return t.dispatch = n, [e.memoizedState, n];
    },
    useDebugValue: Vs,
    useDeferredValue: function(e, t) {
      var n = Et();
      return qs(n, e, t);
    },
    useTransition: function() {
      var e = Hs(!1);
      return e = jd.bind(
        null,
        ge,
        e.queue,
        !0,
        !1
      ), Et().memoizedState = e, [!1, e];
    },
    useSyncExternalStore: function(e, t, n) {
      var a = ge, r = Et();
      if (Te) {
        if (n === void 0)
          throw Error(s(407));
        n = n();
      } else {
        if (n = t(), Ue === null)
          throw Error(s(349));
        (Ce & 124) !== 0 || ld(a, t, n);
      }
      r.memoizedState = n;
      var c = { value: n, getSnapshot: t };
      return r.queue = c, xd(rd.bind(null, a, c, e), [
        e
      ]), a.flags |= 2048, ol(
        9,
        br(),
        id.bind(
          null,
          a,
          c,
          n,
          t
        ),
        null
      ), n;
    },
    useId: function() {
      var e = Et(), t = Ue.identifierPrefix;
      if (Te) {
        var n = xn, a = yn;
        n = (a & ~(1 << 32 - ot(a) - 1)).toString(32) + n, t = "«" + t + "R" + n, n = pr++, 0 < n && (t += "H" + n.toString(32)), t += "»";
      } else
        n = Rp++, t = "«" + t + "r" + n.toString(32) + "»";
      return e.memoizedState = t;
    },
    useHostTransitionStatus: Ys,
    useFormState: pd,
    useActionState: pd,
    useOptimistic: function(e) {
      var t = Et();
      t.memoizedState = t.baseState = e;
      var n = {
        pending: null,
        lanes: 0,
        dispatch: null,
        lastRenderedReducer: null,
        lastRenderedState: null
      };
      return t.queue = n, t = Qs.bind(
        null,
        ge,
        !0,
        n
      ), n.dispatch = t, [e, t];
    },
    useMemoCache: Us,
    useCacheRefresh: function() {
      return Et().memoizedState = Lp.bind(
        null,
        ge
      );
    }
  }, Bd = {
    readContext: vt,
    use: vr,
    useCallback: Td,
    useContext: vt,
    useEffect: Sd,
    useImperativeHandle: Ed,
    useInsertionEffect: _d,
    useLayoutEffect: wd,
    useMemo: Md,
    useReducer: gr,
    useRef: yd,
    useState: function() {
      return gr(wn);
    },
    useDebugValue: Vs,
    useDeferredValue: function(e, t) {
      var n = We();
      return Ad(
        n,
        ke.memoizedState,
        e,
        t
      );
    },
    useTransition: function() {
      var e = gr(wn)[0], t = We().memoizedState;
      return [
        typeof e == "boolean" ? e : si(e),
        t
      ];
    },
    useSyncExternalStore: ad,
    useId: Rd,
    useHostTransitionStatus: Ys,
    useFormState: vd,
    useActionState: vd,
    useOptimistic: function(e, t) {
      var n = We();
      return cd(n, ke, e, t);
    },
    useMemoCache: Us,
    useCacheRefresh: Dd
  }, Hp = {
    readContext: vt,
    use: vr,
    useCallback: Td,
    useContext: vt,
    useEffect: Sd,
    useImperativeHandle: Ed,
    useInsertionEffect: _d,
    useLayoutEffect: wd,
    useMemo: Md,
    useReducer: Bs,
    useRef: yd,
    useState: function() {
      return Bs(wn);
    },
    useDebugValue: Vs,
    useDeferredValue: function(e, t) {
      var n = We();
      return ke === null ? qs(n, e, t) : Ad(
        n,
        ke.memoizedState,
        e,
        t
      );
    },
    useTransition: function() {
      var e = Bs(wn)[0], t = We().memoizedState;
      return [
        typeof e == "boolean" ? e : si(e),
        t
      ];
    },
    useSyncExternalStore: ad,
    useId: Rd,
    useHostTransitionStatus: Ys,
    useFormState: bd,
    useActionState: bd,
    useOptimistic: function(e, t) {
      var n = We();
      return ke !== null ? cd(n, ke, e, t) : (n.baseState = e, [e, n.queue.dispatch]);
    },
    useMemoCache: Us,
    useCacheRefresh: Dd
  }, sl = null, fi = 0;
  function _r(e) {
    var t = fi;
    return fi += 1, sl === null && (sl = []), Jf(sl, e, t);
  }
  function di(e, t) {
    t = t.props.ref, e.ref = t !== void 0 ? t : null;
  }
  function wr(e, t) {
    throw t.$$typeof === g ? Error(s(525)) : (e = Object.prototype.toString.call(t), Error(
      s(
        31,
        e === "[object Object]" ? "object with keys {" + Object.keys(t).join(", ") + "}" : e
      )
    ));
  }
  function Hd(e) {
    var t = e._init;
    return t(e._payload);
  }
  function $d(e) {
    function t(T, E) {
      if (e) {
        var k = T.deletions;
        k === null ? (T.deletions = [E], T.flags |= 16) : k.push(E);
      }
    }
    function n(T, E) {
      if (!e) return null;
      for (; E !== null; )
        t(T, E), E = E.sibling;
      return null;
    }
    function a(T) {
      for (var E = /* @__PURE__ */ new Map(); T !== null; )
        T.key !== null ? E.set(T.key, T) : E.set(T.index, T), T = T.sibling;
      return E;
    }
    function r(T, E) {
      return T = bn(T, E), T.index = 0, T.sibling = null, T;
    }
    function c(T, E, k) {
      return T.index = k, e ? (k = T.alternate, k !== null ? (k = k.index, k < E ? (T.flags |= 67108866, E) : k) : (T.flags |= 67108866, E)) : (T.flags |= 1048576, E);
    }
    function d(T) {
      return e && T.alternate === null && (T.flags |= 67108866), T;
    }
    function b(T, E, k, H) {
      return E === null || E.tag !== 6 ? (E = ds(k, T.mode, H), E.return = T, E) : (E = r(E, k), E.return = T, E);
    }
    function w(T, E, k, H) {
      var te = k.type;
      return te === j ? B(
        T,
        E,
        k.props.children,
        H,
        k.key
      ) : E !== null && (E.elementType === te || typeof te == "object" && te !== null && te.$$typeof === K && Hd(te) === E.type) ? (E = r(E, k.props), di(E, k), E.return = T, E) : (E = ir(
        k.type,
        k.key,
        k.props,
        null,
        T.mode,
        H
      ), di(E, k), E.return = T, E);
    }
    function N(T, E, k, H) {
      return E === null || E.tag !== 4 || E.stateNode.containerInfo !== k.containerInfo || E.stateNode.implementation !== k.implementation ? (E = hs(k, T.mode, H), E.return = T, E) : (E = r(E, k.children || []), E.return = T, E);
    }
    function B(T, E, k, H, te) {
      return E === null || E.tag !== 7 ? (E = ya(
        k,
        T.mode,
        H,
        te
      ), E.return = T, E) : (E = r(E, k), E.return = T, E);
    }
    function V(T, E, k) {
      if (typeof E == "string" && E !== "" || typeof E == "number" || typeof E == "bigint")
        return E = ds(
          "" + E,
          T.mode,
          k
        ), E.return = T, E;
      if (typeof E == "object" && E !== null) {
        switch (E.$$typeof) {
          case _:
            return k = ir(
              E.type,
              E.key,
              E.props,
              null,
              T.mode,
              k
            ), di(k, E), k.return = T, k;
          case M:
            return E = hs(
              E,
              T.mode,
              k
            ), E.return = T, E;
          case K:
            var H = E._init;
            return E = H(E._payload), V(T, E, k);
        }
        if (Me(E) || De(E))
          return E = ya(
            E,
            T.mode,
            k,
            null
          ), E.return = T, E;
        if (typeof E.then == "function")
          return V(T, _r(E), k);
        if (E.$$typeof === P)
          return V(
            T,
            cr(T, E),
            k
          );
        wr(T, E);
      }
      return null;
    }
    function D(T, E, k, H) {
      var te = E !== null ? E.key : null;
      if (typeof k == "string" && k !== "" || typeof k == "number" || typeof k == "bigint")
        return te !== null ? null : b(T, E, "" + k, H);
      if (typeof k == "object" && k !== null) {
        switch (k.$$typeof) {
          case _:
            return k.key === te ? w(T, E, k, H) : null;
          case M:
            return k.key === te ? N(T, E, k, H) : null;
          case K:
            return te = k._init, k = te(k._payload), D(T, E, k, H);
        }
        if (Me(k) || De(k))
          return te !== null ? null : B(T, E, k, H, null);
        if (typeof k.then == "function")
          return D(
            T,
            E,
            _r(k),
            H
          );
        if (k.$$typeof === P)
          return D(
            T,
            E,
            cr(T, k),
            H
          );
        wr(T, k);
      }
      return null;
    }
    function z(T, E, k, H, te) {
      if (typeof H == "string" && H !== "" || typeof H == "number" || typeof H == "bigint")
        return T = T.get(k) || null, b(E, T, "" + H, te);
      if (typeof H == "object" && H !== null) {
        switch (H.$$typeof) {
          case _:
            return T = T.get(
              H.key === null ? k : H.key
            ) || null, w(E, T, H, te);
          case M:
            return T = T.get(
              H.key === null ? k : H.key
            ) || null, N(E, T, H, te);
          case K:
            var xe = H._init;
            return H = xe(H._payload), z(
              T,
              E,
              k,
              H,
              te
            );
        }
        if (Me(H) || De(H))
          return T = T.get(k) || null, B(E, T, H, te, null);
        if (typeof H.then == "function")
          return z(
            T,
            E,
            k,
            _r(H),
            te
          );
        if (H.$$typeof === P)
          return z(
            T,
            E,
            k,
            cr(E, H),
            te
          );
        wr(E, H);
      }
      return null;
    }
    function de(T, E, k, H) {
      for (var te = null, xe = null, re = E, ue = E = 0, rt = null; re !== null && ue < k.length; ue++) {
        re.index > ue ? (rt = re, re = null) : rt = re.sibling;
        var Ee = D(
          T,
          re,
          k[ue],
          H
        );
        if (Ee === null) {
          re === null && (re = rt);
          break;
        }
        e && re && Ee.alternate === null && t(T, re), E = c(Ee, E, ue), xe === null ? te = Ee : xe.sibling = Ee, xe = Ee, re = rt;
      }
      if (ue === k.length)
        return n(T, re), Te && Sa(T, ue), te;
      if (re === null) {
        for (; ue < k.length; ue++)
          re = V(T, k[ue], H), re !== null && (E = c(
            re,
            E,
            ue
          ), xe === null ? te = re : xe.sibling = re, xe = re);
        return Te && Sa(T, ue), te;
      }
      for (re = a(re); ue < k.length; ue++)
        rt = z(
          re,
          T,
          ue,
          k[ue],
          H
        ), rt !== null && (e && rt.alternate !== null && re.delete(
          rt.key === null ? ue : rt.key
        ), E = c(
          rt,
          E,
          ue
        ), xe === null ? te = rt : xe.sibling = rt, xe = rt);
      return e && re.forEach(function(la) {
        return t(T, la);
      }), Te && Sa(T, ue), te;
    }
    function se(T, E, k, H) {
      if (k == null) throw Error(s(151));
      for (var te = null, xe = null, re = E, ue = E = 0, rt = null, Ee = k.next(); re !== null && !Ee.done; ue++, Ee = k.next()) {
        re.index > ue ? (rt = re, re = null) : rt = re.sibling;
        var la = D(T, re, Ee.value, H);
        if (la === null) {
          re === null && (re = rt);
          break;
        }
        e && re && la.alternate === null && t(T, re), E = c(la, E, ue), xe === null ? te = la : xe.sibling = la, xe = la, re = rt;
      }
      if (Ee.done)
        return n(T, re), Te && Sa(T, ue), te;
      if (re === null) {
        for (; !Ee.done; ue++, Ee = k.next())
          Ee = V(T, Ee.value, H), Ee !== null && (E = c(Ee, E, ue), xe === null ? te = Ee : xe.sibling = Ee, xe = Ee);
        return Te && Sa(T, ue), te;
      }
      for (re = a(re); !Ee.done; ue++, Ee = k.next())
        Ee = z(re, T, ue, Ee.value, H), Ee !== null && (e && Ee.alternate !== null && re.delete(Ee.key === null ? ue : Ee.key), E = c(Ee, E, ue), xe === null ? te = Ee : xe.sibling = Ee, xe = Ee);
      return e && re.forEach(function($v) {
        return t(T, $v);
      }), Te && Sa(T, ue), te;
    }
    function Re(T, E, k, H) {
      if (typeof k == "object" && k !== null && k.type === j && k.key === null && (k = k.props.children), typeof k == "object" && k !== null) {
        switch (k.$$typeof) {
          case _:
            e: {
              for (var te = k.key; E !== null; ) {
                if (E.key === te) {
                  if (te = k.type, te === j) {
                    if (E.tag === 7) {
                      n(
                        T,
                        E.sibling
                      ), H = r(
                        E,
                        k.props.children
                      ), H.return = T, T = H;
                      break e;
                    }
                  } else if (E.elementType === te || typeof te == "object" && te !== null && te.$$typeof === K && Hd(te) === E.type) {
                    n(
                      T,
                      E.sibling
                    ), H = r(E, k.props), di(H, k), H.return = T, T = H;
                    break e;
                  }
                  n(T, E);
                  break;
                } else t(T, E);
                E = E.sibling;
              }
              k.type === j ? (H = ya(
                k.props.children,
                T.mode,
                H,
                k.key
              ), H.return = T, T = H) : (H = ir(
                k.type,
                k.key,
                k.props,
                null,
                T.mode,
                H
              ), di(H, k), H.return = T, T = H);
            }
            return d(T);
          case M:
            e: {
              for (te = k.key; E !== null; ) {
                if (E.key === te)
                  if (E.tag === 4 && E.stateNode.containerInfo === k.containerInfo && E.stateNode.implementation === k.implementation) {
                    n(
                      T,
                      E.sibling
                    ), H = r(E, k.children || []), H.return = T, T = H;
                    break e;
                  } else {
                    n(T, E);
                    break;
                  }
                else t(T, E);
                E = E.sibling;
              }
              H = hs(k, T.mode, H), H.return = T, T = H;
            }
            return d(T);
          case K:
            return te = k._init, k = te(k._payload), Re(
              T,
              E,
              k,
              H
            );
        }
        if (Me(k))
          return de(
            T,
            E,
            k,
            H
          );
        if (De(k)) {
          if (te = De(k), typeof te != "function") throw Error(s(150));
          return k = te.call(k), se(
            T,
            E,
            k,
            H
          );
        }
        if (typeof k.then == "function")
          return Re(
            T,
            E,
            _r(k),
            H
          );
        if (k.$$typeof === P)
          return Re(
            T,
            E,
            cr(T, k),
            H
          );
        wr(T, k);
      }
      return typeof k == "string" && k !== "" || typeof k == "number" || typeof k == "bigint" ? (k = "" + k, E !== null && E.tag === 6 ? (n(T, E.sibling), H = r(E, k), H.return = T, T = H) : (n(T, E), H = ds(k, T.mode, H), H.return = T, T = H), d(T)) : n(T, E);
    }
    return function(T, E, k, H) {
      try {
        fi = 0;
        var te = Re(
          T,
          E,
          k,
          H
        );
        return sl = null, te;
      } catch (re) {
        if (re === ni || re === fr) throw re;
        var xe = Rt(29, re, null, T.mode);
        return xe.lanes = H, xe.return = T, xe;
      } finally {
      }
    };
  }
  var cl = $d(!0), Vd = $d(!1), Qt = $(null), rn = null;
  function Gn(e) {
    var t = e.alternate;
    L(et, et.current & 1), L(Qt, e), rn === null && (t === null || ll.current !== null || t.memoizedState !== null) && (rn = e);
  }
  function qd(e) {
    if (e.tag === 22) {
      if (L(et, et.current), L(Qt, e), rn === null) {
        var t = e.alternate;
        t !== null && t.memoizedState !== null && (rn = e);
      }
    } else Yn();
  }
  function Yn() {
    L(et, et.current), L(Qt, Qt.current);
  }
  function Cn(e) {
    I(Qt), rn === e && (rn = null), I(et);
  }
  var et = $(0);
  function Cr(e) {
    for (var t = e; t !== null; ) {
      if (t.tag === 13) {
        var n = t.memoizedState;
        if (n !== null && (n = n.dehydrated, n === null || n.data === "$?" || Oc(n)))
          return t;
      } else if (t.tag === 19 && t.memoizedProps.revealOrder !== void 0) {
        if ((t.flags & 128) !== 0) return t;
      } else if (t.child !== null) {
        t.child.return = t, t = t.child;
        continue;
      }
      if (t === e) break;
      for (; t.sibling === null; ) {
        if (t.return === null || t.return === e) return null;
        t = t.return;
      }
      t.sibling.return = t.return, t = t.sibling;
    }
    return null;
  }
  function Xs(e, t, n, a) {
    t = e.memoizedState, n = n(a, t), n = n == null ? t : y({}, t, n), e.memoizedState = n, e.lanes === 0 && (e.updateQueue.baseState = n);
  }
  var Zs = {
    enqueueSetState: function(e, t, n) {
      e = e._reactInternals;
      var a = Ut(), r = $n(a);
      r.payload = t, n != null && (r.callback = n), t = Vn(e, r, a), t !== null && (Lt(t, e, a), li(t, e, a));
    },
    enqueueReplaceState: function(e, t, n) {
      e = e._reactInternals;
      var a = Ut(), r = $n(a);
      r.tag = 1, r.payload = t, n != null && (r.callback = n), t = Vn(e, r, a), t !== null && (Lt(t, e, a), li(t, e, a));
    },
    enqueueForceUpdate: function(e, t) {
      e = e._reactInternals;
      var n = Ut(), a = $n(n);
      a.tag = 2, t != null && (a.callback = t), t = Vn(e, a, n), t !== null && (Lt(t, e, n), li(t, e, n));
    }
  };
  function Gd(e, t, n, a, r, c, d) {
    return e = e.stateNode, typeof e.shouldComponentUpdate == "function" ? e.shouldComponentUpdate(a, c, d) : t.prototype && t.prototype.isPureReactComponent ? !Kl(n, a) || !Kl(r, c) : !0;
  }
  function Yd(e, t, n, a) {
    e = t.state, typeof t.componentWillReceiveProps == "function" && t.componentWillReceiveProps(n, a), typeof t.UNSAFE_componentWillReceiveProps == "function" && t.UNSAFE_componentWillReceiveProps(n, a), t.state !== e && Zs.enqueueReplaceState(t, t.state, null);
  }
  function Aa(e, t) {
    var n = t;
    if ("ref" in t) {
      n = {};
      for (var a in t)
        a !== "ref" && (n[a] = t[a]);
    }
    if (e = e.defaultProps) {
      n === t && (n = y({}, n));
      for (var r in e)
        n[r] === void 0 && (n[r] = e[r]);
    }
    return n;
  }
  var Er = typeof reportError == "function" ? reportError : function(e) {
    if (typeof window == "object" && typeof window.ErrorEvent == "function") {
      var t = new window.ErrorEvent("error", {
        bubbles: !0,
        cancelable: !0,
        message: typeof e == "object" && e !== null && typeof e.message == "string" ? String(e.message) : String(e),
        error: e
      });
      if (!window.dispatchEvent(t)) return;
    } else if (typeof process == "object" && typeof process.emit == "function") {
      process.emit("uncaughtException", e);
      return;
    }
    console.error(e);
  };
  function Qd(e) {
    Er(e);
  }
  function Xd(e) {
    console.error(e);
  }
  function Zd(e) {
    Er(e);
  }
  function Tr(e, t) {
    try {
      var n = e.onUncaughtError;
      n(t.value, { componentStack: t.stack });
    } catch (a) {
      setTimeout(function() {
        throw a;
      });
    }
  }
  function Kd(e, t, n) {
    try {
      var a = e.onCaughtError;
      a(n.value, {
        componentStack: n.stack,
        errorBoundary: t.tag === 1 ? t.stateNode : null
      });
    } catch (r) {
      setTimeout(function() {
        throw r;
      });
    }
  }
  function Ks(e, t, n) {
    return n = $n(n), n.tag = 3, n.payload = { element: null }, n.callback = function() {
      Tr(e, t);
    }, n;
  }
  function Jd(e) {
    return e = $n(e), e.tag = 3, e;
  }
  function Pd(e, t, n, a) {
    var r = n.type.getDerivedStateFromError;
    if (typeof r == "function") {
      var c = a.value;
      e.payload = function() {
        return r(c);
      }, e.callback = function() {
        Kd(t, n, a);
      };
    }
    var d = n.stateNode;
    d !== null && typeof d.componentDidCatch == "function" && (e.callback = function() {
      Kd(t, n, a), typeof r != "function" && (Pn === null ? Pn = /* @__PURE__ */ new Set([this]) : Pn.add(this));
      var b = a.stack;
      this.componentDidCatch(a.value, {
        componentStack: b !== null ? b : ""
      });
    });
  }
  function $p(e, t, n, a, r) {
    if (n.flags |= 32768, a !== null && typeof a == "object" && typeof a.then == "function") {
      if (t = n.alternate, t !== null && Fl(
        t,
        n,
        r,
        !0
      ), n = Qt.current, n !== null) {
        switch (n.tag) {
          case 13:
            return rn === null ? bc() : n.alternate === null && $e === 0 && ($e = 3), n.flags &= -257, n.flags |= 65536, n.lanes = r, a === ws ? n.flags |= 16384 : (t = n.updateQueue, t === null ? n.updateQueue = /* @__PURE__ */ new Set([a]) : t.add(a), xc(e, a, r)), !1;
          case 22:
            return n.flags |= 65536, a === ws ? n.flags |= 16384 : (t = n.updateQueue, t === null ? (t = {
              transitions: null,
              markerInstances: null,
              retryQueue: /* @__PURE__ */ new Set([a])
            }, n.updateQueue = t) : (n = t.retryQueue, n === null ? t.retryQueue = /* @__PURE__ */ new Set([a]) : n.add(a)), xc(e, a, r)), !1;
        }
        throw Error(s(435, n.tag));
      }
      return xc(e, a, r), bc(), !1;
    }
    if (Te)
      return t = Qt.current, t !== null ? ((t.flags & 65536) === 0 && (t.flags |= 256), t.flags |= 65536, t.lanes = r, a !== vs && (e = Error(s(422), { cause: a }), Il(Vt(e, n)))) : (a !== vs && (t = Error(s(423), {
        cause: a
      }), Il(
        Vt(t, n)
      )), e = e.current.alternate, e.flags |= 65536, r &= -r, e.lanes |= r, a = Vt(a, n), r = Ks(
        e.stateNode,
        a,
        r
      ), Ts(e, r), $e !== 4 && ($e = 2)), !1;
    var c = Error(s(520), { cause: a });
    if (c = Vt(c, n), yi === null ? yi = [c] : yi.push(c), $e !== 4 && ($e = 2), t === null) return !0;
    a = Vt(a, n), n = t;
    do {
      switch (n.tag) {
        case 3:
          return n.flags |= 65536, e = r & -r, n.lanes |= e, e = Ks(n.stateNode, a, e), Ts(n, e), !1;
        case 1:
          if (t = n.type, c = n.stateNode, (n.flags & 128) === 0 && (typeof t.getDerivedStateFromError == "function" || c !== null && typeof c.componentDidCatch == "function" && (Pn === null || !Pn.has(c))))
            return n.flags |= 65536, r &= -r, n.lanes |= r, r = Jd(r), Pd(
              r,
              e,
              n,
              a
            ), Ts(n, r), !1;
      }
      n = n.return;
    } while (n !== null);
    return !1;
  }
  var Wd = Error(s(461)), lt = !1;
  function ct(e, t, n, a) {
    t.child = e === null ? Vd(t, null, n, a) : cl(
      t,
      e.child,
      n,
      a
    );
  }
  function Id(e, t, n, a, r) {
    n = n.render;
    var c = t.ref;
    if ("ref" in a) {
      var d = {};
      for (var b in a)
        b !== "ref" && (d[b] = a[b]);
    } else d = a;
    return Ea(t), a = Ns(
      e,
      t,
      n,
      d,
      c,
      r
    ), b = Rs(), e !== null && !lt ? (Ds(e, t, r), En(e, t, r)) : (Te && b && ms(t), t.flags |= 1, ct(e, t, a, r), t.child);
  }
  function Fd(e, t, n, a, r) {
    if (e === null) {
      var c = n.type;
      return typeof c == "function" && !fs(c) && c.defaultProps === void 0 && n.compare === null ? (t.tag = 15, t.type = c, e1(
        e,
        t,
        c,
        a,
        r
      )) : (e = ir(
        n.type,
        null,
        a,
        t,
        t.mode,
        r
      ), e.ref = t.ref, e.return = t, t.child = e);
    }
    if (c = e.child, !nc(e, r)) {
      var d = c.memoizedProps;
      if (n = n.compare, n = n !== null ? n : Kl, n(d, a) && e.ref === t.ref)
        return En(e, t, r);
    }
    return t.flags |= 1, e = bn(c, a), e.ref = t.ref, e.return = t, t.child = e;
  }
  function e1(e, t, n, a, r) {
    if (e !== null) {
      var c = e.memoizedProps;
      if (Kl(c, a) && e.ref === t.ref)
        if (lt = !1, t.pendingProps = a = c, nc(e, r))
          (e.flags & 131072) !== 0 && (lt = !0);
        else
          return t.lanes = e.lanes, En(e, t, r);
    }
    return Js(
      e,
      t,
      n,
      a,
      r
    );
  }
  function t1(e, t, n) {
    var a = t.pendingProps, r = a.children, c = e !== null ? e.memoizedState : null;
    if (a.mode === "hidden") {
      if ((t.flags & 128) !== 0) {
        if (a = c !== null ? c.baseLanes | n : n, e !== null) {
          for (r = t.child = e.child, c = 0; r !== null; )
            c = c | r.lanes | r.childLanes, r = r.sibling;
          t.childLanes = c & ~a;
        } else t.childLanes = 0, t.child = null;
        return n1(
          e,
          t,
          a,
          n
        );
      }
      if ((n & 536870912) !== 0)
        t.memoizedState = { baseLanes: 0, cachePool: null }, e !== null && ur(
          t,
          c !== null ? c.cachePool : null
        ), c !== null ? ed(t, c) : As(), qd(t);
      else
        return t.lanes = t.childLanes = 536870912, n1(
          e,
          t,
          c !== null ? c.baseLanes | n : n,
          n
        );
    } else
      c !== null ? (ur(t, c.cachePool), ed(t, c), Yn(), t.memoizedState = null) : (e !== null && ur(t, null), As(), Yn());
    return ct(e, t, r, n), t.child;
  }
  function n1(e, t, n, a) {
    var r = _s();
    return r = r === null ? null : { parent: Fe._currentValue, pool: r }, t.memoizedState = {
      baseLanes: n,
      cachePool: r
    }, e !== null && ur(t, null), As(), qd(t), e !== null && Fl(e, t, a, !0), null;
  }
  function Mr(e, t) {
    var n = t.ref;
    if (n === null)
      e !== null && e.ref !== null && (t.flags |= 4194816);
    else {
      if (typeof n != "function" && typeof n != "object")
        throw Error(s(284));
      (e === null || e.ref !== n) && (t.flags |= 4194816);
    }
  }
  function Js(e, t, n, a, r) {
    return Ea(t), n = Ns(
      e,
      t,
      n,
      a,
      void 0,
      r
    ), a = Rs(), e !== null && !lt ? (Ds(e, t, r), En(e, t, r)) : (Te && a && ms(t), t.flags |= 1, ct(e, t, n, r), t.child);
  }
  function a1(e, t, n, a, r, c) {
    return Ea(t), t.updateQueue = null, n = nd(
      t,
      a,
      n,
      r
    ), td(e), a = Rs(), e !== null && !lt ? (Ds(e, t, c), En(e, t, c)) : (Te && a && ms(t), t.flags |= 1, ct(e, t, n, c), t.child);
  }
  function l1(e, t, n, a, r) {
    if (Ea(t), t.stateNode === null) {
      var c = Fa, d = n.contextType;
      typeof d == "object" && d !== null && (c = vt(d)), c = new n(a, c), t.memoizedState = c.state !== null && c.state !== void 0 ? c.state : null, c.updater = Zs, t.stateNode = c, c._reactInternals = t, c = t.stateNode, c.props = a, c.state = t.memoizedState, c.refs = {}, Cs(t), d = n.contextType, c.context = typeof d == "object" && d !== null ? vt(d) : Fa, c.state = t.memoizedState, d = n.getDerivedStateFromProps, typeof d == "function" && (Xs(
        t,
        n,
        d,
        a
      ), c.state = t.memoizedState), typeof n.getDerivedStateFromProps == "function" || typeof c.getSnapshotBeforeUpdate == "function" || typeof c.UNSAFE_componentWillMount != "function" && typeof c.componentWillMount != "function" || (d = c.state, typeof c.componentWillMount == "function" && c.componentWillMount(), typeof c.UNSAFE_componentWillMount == "function" && c.UNSAFE_componentWillMount(), d !== c.state && Zs.enqueueReplaceState(c, c.state, null), ri(t, a, c, r), ii(), c.state = t.memoizedState), typeof c.componentDidMount == "function" && (t.flags |= 4194308), a = !0;
    } else if (e === null) {
      c = t.stateNode;
      var b = t.memoizedProps, w = Aa(n, b);
      c.props = w;
      var N = c.context, B = n.contextType;
      d = Fa, typeof B == "object" && B !== null && (d = vt(B));
      var V = n.getDerivedStateFromProps;
      B = typeof V == "function" || typeof c.getSnapshotBeforeUpdate == "function", b = t.pendingProps !== b, B || typeof c.UNSAFE_componentWillReceiveProps != "function" && typeof c.componentWillReceiveProps != "function" || (b || N !== d) && Yd(
        t,
        c,
        a,
        d
      ), Hn = !1;
      var D = t.memoizedState;
      c.state = D, ri(t, a, c, r), ii(), N = t.memoizedState, b || D !== N || Hn ? (typeof V == "function" && (Xs(
        t,
        n,
        V,
        a
      ), N = t.memoizedState), (w = Hn || Gd(
        t,
        n,
        w,
        a,
        D,
        N,
        d
      )) ? (B || typeof c.UNSAFE_componentWillMount != "function" && typeof c.componentWillMount != "function" || (typeof c.componentWillMount == "function" && c.componentWillMount(), typeof c.UNSAFE_componentWillMount == "function" && c.UNSAFE_componentWillMount()), typeof c.componentDidMount == "function" && (t.flags |= 4194308)) : (typeof c.componentDidMount == "function" && (t.flags |= 4194308), t.memoizedProps = a, t.memoizedState = N), c.props = a, c.state = N, c.context = d, a = w) : (typeof c.componentDidMount == "function" && (t.flags |= 4194308), a = !1);
    } else {
      c = t.stateNode, Es(e, t), d = t.memoizedProps, B = Aa(n, d), c.props = B, V = t.pendingProps, D = c.context, N = n.contextType, w = Fa, typeof N == "object" && N !== null && (w = vt(N)), b = n.getDerivedStateFromProps, (N = typeof b == "function" || typeof c.getSnapshotBeforeUpdate == "function") || typeof c.UNSAFE_componentWillReceiveProps != "function" && typeof c.componentWillReceiveProps != "function" || (d !== V || D !== w) && Yd(
        t,
        c,
        a,
        w
      ), Hn = !1, D = t.memoizedState, c.state = D, ri(t, a, c, r), ii();
      var z = t.memoizedState;
      d !== V || D !== z || Hn || e !== null && e.dependencies !== null && sr(e.dependencies) ? (typeof b == "function" && (Xs(
        t,
        n,
        b,
        a
      ), z = t.memoizedState), (B = Hn || Gd(
        t,
        n,
        B,
        a,
        D,
        z,
        w
      ) || e !== null && e.dependencies !== null && sr(e.dependencies)) ? (N || typeof c.UNSAFE_componentWillUpdate != "function" && typeof c.componentWillUpdate != "function" || (typeof c.componentWillUpdate == "function" && c.componentWillUpdate(a, z, w), typeof c.UNSAFE_componentWillUpdate == "function" && c.UNSAFE_componentWillUpdate(
        a,
        z,
        w
      )), typeof c.componentDidUpdate == "function" && (t.flags |= 4), typeof c.getSnapshotBeforeUpdate == "function" && (t.flags |= 1024)) : (typeof c.componentDidUpdate != "function" || d === e.memoizedProps && D === e.memoizedState || (t.flags |= 4), typeof c.getSnapshotBeforeUpdate != "function" || d === e.memoizedProps && D === e.memoizedState || (t.flags |= 1024), t.memoizedProps = a, t.memoizedState = z), c.props = a, c.state = z, c.context = w, a = B) : (typeof c.componentDidUpdate != "function" || d === e.memoizedProps && D === e.memoizedState || (t.flags |= 4), typeof c.getSnapshotBeforeUpdate != "function" || d === e.memoizedProps && D === e.memoizedState || (t.flags |= 1024), a = !1);
    }
    return c = a, Mr(e, t), a = (t.flags & 128) !== 0, c || a ? (c = t.stateNode, n = a && typeof n.getDerivedStateFromError != "function" ? null : c.render(), t.flags |= 1, e !== null && a ? (t.child = cl(
      t,
      e.child,
      null,
      r
    ), t.child = cl(
      t,
      null,
      n,
      r
    )) : ct(e, t, n, r), t.memoizedState = c.state, e = t.child) : e = En(
      e,
      t,
      r
    ), e;
  }
  function i1(e, t, n, a) {
    return Wl(), t.flags |= 256, ct(e, t, n, a), t.child;
  }
  var Ps = {
    dehydrated: null,
    treeContext: null,
    retryLane: 0,
    hydrationErrors: null
  };
  function Ws(e) {
    return { baseLanes: e, cachePool: Xf() };
  }
  function Is(e, t, n) {
    return e = e !== null ? e.childLanes & ~n : 0, t && (e |= Xt), e;
  }
  function r1(e, t, n) {
    var a = t.pendingProps, r = !1, c = (t.flags & 128) !== 0, d;
    if ((d = c) || (d = e !== null && e.memoizedState === null ? !1 : (et.current & 2) !== 0), d && (r = !0, t.flags &= -129), d = (t.flags & 32) !== 0, t.flags &= -33, e === null) {
      if (Te) {
        if (r ? Gn(t) : Yn(), Te) {
          var b = He, w;
          if (w = b) {
            e: {
              for (w = b, b = ln; w.nodeType !== 8; ) {
                if (!b) {
                  b = null;
                  break e;
                }
                if (w = en(
                  w.nextSibling
                ), w === null) {
                  b = null;
                  break e;
                }
              }
              b = w;
            }
            b !== null ? (t.memoizedState = {
              dehydrated: b,
              treeContext: xa !== null ? { id: yn, overflow: xn } : null,
              retryLane: 536870912,
              hydrationErrors: null
            }, w = Rt(
              18,
              null,
              null,
              0
            ), w.stateNode = b, w.return = t, t.child = w, _t = t, He = null, w = !0) : w = !1;
          }
          w || wa(t);
        }
        if (b = t.memoizedState, b !== null && (b = b.dehydrated, b !== null))
          return Oc(b) ? t.lanes = 32 : t.lanes = 536870912, null;
        Cn(t);
      }
      return b = a.children, a = a.fallback, r ? (Yn(), r = t.mode, b = Ar(
        { mode: "hidden", children: b },
        r
      ), a = ya(
        a,
        r,
        n,
        null
      ), b.return = t, a.return = t, b.sibling = a, t.child = b, r = t.child, r.memoizedState = Ws(n), r.childLanes = Is(
        e,
        d,
        n
      ), t.memoizedState = Ps, a) : (Gn(t), Fs(t, b));
    }
    if (w = e.memoizedState, w !== null && (b = w.dehydrated, b !== null)) {
      if (c)
        t.flags & 256 ? (Gn(t), t.flags &= -257, t = ec(
          e,
          t,
          n
        )) : t.memoizedState !== null ? (Yn(), t.child = e.child, t.flags |= 128, t = null) : (Yn(), r = a.fallback, b = t.mode, a = Ar(
          { mode: "visible", children: a.children },
          b
        ), r = ya(
          r,
          b,
          n,
          null
        ), r.flags |= 2, a.return = t, r.return = t, a.sibling = r, t.child = a, cl(
          t,
          e.child,
          null,
          n
        ), a = t.child, a.memoizedState = Ws(n), a.childLanes = Is(
          e,
          d,
          n
        ), t.memoizedState = Ps, t = r);
      else if (Gn(t), Oc(b)) {
        if (d = b.nextSibling && b.nextSibling.dataset, d) var N = d.dgst;
        d = N, a = Error(s(419)), a.stack = "", a.digest = d, Il({ value: a, source: null, stack: null }), t = ec(
          e,
          t,
          n
        );
      } else if (lt || Fl(e, t, n, !1), d = (n & e.childLanes) !== 0, lt || d) {
        if (d = Ue, d !== null && (a = n & -n, a = (a & 42) !== 0 ? 1 : Je(a), a = (a & (d.suspendedLanes | n)) !== 0 ? 0 : a, a !== 0 && a !== w.retryLane))
          throw w.retryLane = a, Ia(e, a), Lt(d, e, a), Wd;
        b.data === "$?" || bc(), t = ec(
          e,
          t,
          n
        );
      } else
        b.data === "$?" ? (t.flags |= 192, t.child = e.child, t = null) : (e = w.treeContext, He = en(
          b.nextSibling
        ), _t = t, Te = !0, _a = null, ln = !1, e !== null && (Gt[Yt++] = yn, Gt[Yt++] = xn, Gt[Yt++] = xa, yn = e.id, xn = e.overflow, xa = t), t = Fs(
          t,
          a.children
        ), t.flags |= 4096);
      return t;
    }
    return r ? (Yn(), r = a.fallback, b = t.mode, w = e.child, N = w.sibling, a = bn(w, {
      mode: "hidden",
      children: a.children
    }), a.subtreeFlags = w.subtreeFlags & 65011712, N !== null ? r = bn(N, r) : (r = ya(
      r,
      b,
      n,
      null
    ), r.flags |= 2), r.return = t, a.return = t, a.sibling = r, t.child = a, a = r, r = t.child, b = e.child.memoizedState, b === null ? b = Ws(n) : (w = b.cachePool, w !== null ? (N = Fe._currentValue, w = w.parent !== N ? { parent: N, pool: N } : w) : w = Xf(), b = {
      baseLanes: b.baseLanes | n,
      cachePool: w
    }), r.memoizedState = b, r.childLanes = Is(
      e,
      d,
      n
    ), t.memoizedState = Ps, a) : (Gn(t), n = e.child, e = n.sibling, n = bn(n, {
      mode: "visible",
      children: a.children
    }), n.return = t, n.sibling = null, e !== null && (d = t.deletions, d === null ? (t.deletions = [e], t.flags |= 16) : d.push(e)), t.child = n, t.memoizedState = null, n);
  }
  function Fs(e, t) {
    return t = Ar(
      { mode: "visible", children: t },
      e.mode
    ), t.return = e, e.child = t;
  }
  function Ar(e, t) {
    return e = Rt(22, e, null, t), e.lanes = 0, e.stateNode = {
      _visibility: 1,
      _pendingMarkers: null,
      _retryCache: null,
      _transitions: null
    }, e;
  }
  function ec(e, t, n) {
    return cl(t, e.child, null, n), e = Fs(
      t,
      t.pendingProps.children
    ), e.flags |= 2, t.memoizedState = null, e;
  }
  function o1(e, t, n) {
    e.lanes |= t;
    var a = e.alternate;
    a !== null && (a.lanes |= t), bs(e.return, t, n);
  }
  function tc(e, t, n, a, r) {
    var c = e.memoizedState;
    c === null ? e.memoizedState = {
      isBackwards: t,
      rendering: null,
      renderingStartTime: 0,
      last: a,
      tail: n,
      tailMode: r
    } : (c.isBackwards = t, c.rendering = null, c.renderingStartTime = 0, c.last = a, c.tail = n, c.tailMode = r);
  }
  function s1(e, t, n) {
    var a = t.pendingProps, r = a.revealOrder, c = a.tail;
    if (ct(e, t, a.children, n), a = et.current, (a & 2) !== 0)
      a = a & 1 | 2, t.flags |= 128;
    else {
      if (e !== null && (e.flags & 128) !== 0)
        e: for (e = t.child; e !== null; ) {
          if (e.tag === 13)
            e.memoizedState !== null && o1(e, n, t);
          else if (e.tag === 19)
            o1(e, n, t);
          else if (e.child !== null) {
            e.child.return = e, e = e.child;
            continue;
          }
          if (e === t) break e;
          for (; e.sibling === null; ) {
            if (e.return === null || e.return === t)
              break e;
            e = e.return;
          }
          e.sibling.return = e.return, e = e.sibling;
        }
      a &= 1;
    }
    switch (L(et, a), r) {
      case "forwards":
        for (n = t.child, r = null; n !== null; )
          e = n.alternate, e !== null && Cr(e) === null && (r = n), n = n.sibling;
        n = r, n === null ? (r = t.child, t.child = null) : (r = n.sibling, n.sibling = null), tc(
          t,
          !1,
          r,
          n,
          c
        );
        break;
      case "backwards":
        for (n = null, r = t.child, t.child = null; r !== null; ) {
          if (e = r.alternate, e !== null && Cr(e) === null) {
            t.child = r;
            break;
          }
          e = r.sibling, r.sibling = n, n = r, r = e;
        }
        tc(
          t,
          !0,
          n,
          null,
          c
        );
        break;
      case "together":
        tc(t, !1, null, null, void 0);
        break;
      default:
        t.memoizedState = null;
    }
    return t.child;
  }
  function En(e, t, n) {
    if (e !== null && (t.dependencies = e.dependencies), Jn |= t.lanes, (n & t.childLanes) === 0)
      if (e !== null) {
        if (Fl(
          e,
          t,
          n,
          !1
        ), (n & t.childLanes) === 0)
          return null;
      } else return null;
    if (e !== null && t.child !== e.child)
      throw Error(s(153));
    if (t.child !== null) {
      for (e = t.child, n = bn(e, e.pendingProps), t.child = n, n.return = t; e.sibling !== null; )
        e = e.sibling, n = n.sibling = bn(e, e.pendingProps), n.return = t;
      n.sibling = null;
    }
    return t.child;
  }
  function nc(e, t) {
    return (e.lanes & t) !== 0 ? !0 : (e = e.dependencies, !!(e !== null && sr(e)));
  }
  function Vp(e, t, n) {
    switch (t.tag) {
      case 3:
        oe(t, t.stateNode.containerInfo), Bn(t, Fe, e.memoizedState.cache), Wl();
        break;
      case 27:
      case 5:
        jt(t);
        break;
      case 4:
        oe(t, t.stateNode.containerInfo);
        break;
      case 10:
        Bn(
          t,
          t.type,
          t.memoizedProps.value
        );
        break;
      case 13:
        var a = t.memoizedState;
        if (a !== null)
          return a.dehydrated !== null ? (Gn(t), t.flags |= 128, null) : (n & t.child.childLanes) !== 0 ? r1(e, t, n) : (Gn(t), e = En(
            e,
            t,
            n
          ), e !== null ? e.sibling : null);
        Gn(t);
        break;
      case 19:
        var r = (e.flags & 128) !== 0;
        if (a = (n & t.childLanes) !== 0, a || (Fl(
          e,
          t,
          n,
          !1
        ), a = (n & t.childLanes) !== 0), r) {
          if (a)
            return s1(
              e,
              t,
              n
            );
          t.flags |= 128;
        }
        if (r = t.memoizedState, r !== null && (r.rendering = null, r.tail = null, r.lastEffect = null), L(et, et.current), a) break;
        return null;
      case 22:
      case 23:
        return t.lanes = 0, t1(e, t, n);
      case 24:
        Bn(t, Fe, e.memoizedState.cache);
    }
    return En(e, t, n);
  }
  function c1(e, t, n) {
    if (e !== null)
      if (e.memoizedProps !== t.pendingProps)
        lt = !0;
      else {
        if (!nc(e, n) && (t.flags & 128) === 0)
          return lt = !1, Vp(
            e,
            t,
            n
          );
        lt = (e.flags & 131072) !== 0;
      }
    else
      lt = !1, Te && (t.flags & 1048576) !== 0 && Hf(t, or, t.index);
    switch (t.lanes = 0, t.tag) {
      case 16:
        e: {
          e = t.pendingProps;
          var a = t.elementType, r = a._init;
          if (a = r(a._payload), t.type = a, typeof a == "function")
            fs(a) ? (e = Aa(a, e), t.tag = 1, t = l1(
              null,
              t,
              a,
              e,
              n
            )) : (t.tag = 0, t = Js(
              null,
              t,
              a,
              e,
              n
            ));
          else {
            if (a != null) {
              if (r = a.$$typeof, r === Y) {
                t.tag = 11, t = Id(
                  null,
                  t,
                  a,
                  e,
                  n
                );
                break e;
              } else if (r === ee) {
                t.tag = 14, t = Fd(
                  null,
                  t,
                  a,
                  e,
                  n
                );
                break e;
              }
            }
            throw t = mt(a) || a, Error(s(306, t, ""));
          }
        }
        return t;
      case 0:
        return Js(
          e,
          t,
          t.type,
          t.pendingProps,
          n
        );
      case 1:
        return a = t.type, r = Aa(
          a,
          t.pendingProps
        ), l1(
          e,
          t,
          a,
          r,
          n
        );
      case 3:
        e: {
          if (oe(
            t,
            t.stateNode.containerInfo
          ), e === null) throw Error(s(387));
          a = t.pendingProps;
          var c = t.memoizedState;
          r = c.element, Es(e, t), ri(t, a, null, n);
          var d = t.memoizedState;
          if (a = d.cache, Bn(t, Fe, a), a !== c.cache && ys(
            t,
            [Fe],
            n,
            !0
          ), ii(), a = d.element, c.isDehydrated)
            if (c = {
              element: a,
              isDehydrated: !1,
              cache: d.cache
            }, t.updateQueue.baseState = c, t.memoizedState = c, t.flags & 256) {
              t = i1(
                e,
                t,
                a,
                n
              );
              break e;
            } else if (a !== r) {
              r = Vt(
                Error(s(424)),
                t
              ), Il(r), t = i1(
                e,
                t,
                a,
                n
              );
              break e;
            } else {
              switch (e = t.stateNode.containerInfo, e.nodeType) {
                case 9:
                  e = e.body;
                  break;
                default:
                  e = e.nodeName === "HTML" ? e.ownerDocument.body : e;
              }
              for (He = en(e.firstChild), _t = t, Te = !0, _a = null, ln = !0, n = Vd(
                t,
                null,
                a,
                n
              ), t.child = n; n; )
                n.flags = n.flags & -3 | 4096, n = n.sibling;
            }
          else {
            if (Wl(), a === r) {
              t = En(
                e,
                t,
                n
              );
              break e;
            }
            ct(
              e,
              t,
              a,
              n
            );
          }
          t = t.child;
        }
        return t;
      case 26:
        return Mr(e, t), e === null ? (n = h0(
          t.type,
          null,
          t.pendingProps,
          null
        )) ? t.memoizedState = n : Te || (n = t.type, e = t.pendingProps, a = qr(
          ie.current
        ).createElement(n), a[Ye] = t, a[Oe] = e, ft(a, n, e), at(a), t.stateNode = a) : t.memoizedState = h0(
          t.type,
          e.memoizedProps,
          t.pendingProps,
          e.memoizedState
        ), null;
      case 27:
        return jt(t), e === null && Te && (a = t.stateNode = u0(
          t.type,
          t.pendingProps,
          ie.current
        ), _t = t, ln = !0, r = He, Fn(t.type) ? (Uc = r, He = en(
          a.firstChild
        )) : He = r), ct(
          e,
          t,
          t.pendingProps.children,
          n
        ), Mr(e, t), e === null && (t.flags |= 4194304), t.child;
      case 5:
        return e === null && Te && ((r = a = He) && (a = pv(
          a,
          t.type,
          t.pendingProps,
          ln
        ), a !== null ? (t.stateNode = a, _t = t, He = en(
          a.firstChild
        ), ln = !1, r = !0) : r = !1), r || wa(t)), jt(t), r = t.type, c = t.pendingProps, d = e !== null ? e.memoizedProps : null, a = c.children, Rc(r, c) ? a = null : d !== null && Rc(r, d) && (t.flags |= 32), t.memoizedState !== null && (r = Ns(
          e,
          t,
          Dp,
          null,
          null,
          n
        ), Ai._currentValue = r), Mr(e, t), ct(e, t, a, n), t.child;
      case 6:
        return e === null && Te && ((e = n = He) && (n = vv(
          n,
          t.pendingProps,
          ln
        ), n !== null ? (t.stateNode = n, _t = t, He = null, e = !0) : e = !1), e || wa(t)), null;
      case 13:
        return r1(e, t, n);
      case 4:
        return oe(
          t,
          t.stateNode.containerInfo
        ), a = t.pendingProps, e === null ? t.child = cl(
          t,
          null,
          a,
          n
        ) : ct(
          e,
          t,
          a,
          n
        ), t.child;
      case 11:
        return Id(
          e,
          t,
          t.type,
          t.pendingProps,
          n
        );
      case 7:
        return ct(
          e,
          t,
          t.pendingProps,
          n
        ), t.child;
      case 8:
        return ct(
          e,
          t,
          t.pendingProps.children,
          n
        ), t.child;
      case 12:
        return ct(
          e,
          t,
          t.pendingProps.children,
          n
        ), t.child;
      case 10:
        return a = t.pendingProps, Bn(t, t.type, a.value), ct(
          e,
          t,
          a.children,
          n
        ), t.child;
      case 9:
        return r = t.type._context, a = t.pendingProps.children, Ea(t), r = vt(r), a = a(r), t.flags |= 1, ct(e, t, a, n), t.child;
      case 14:
        return Fd(
          e,
          t,
          t.type,
          t.pendingProps,
          n
        );
      case 15:
        return e1(
          e,
          t,
          t.type,
          t.pendingProps,
          n
        );
      case 19:
        return s1(e, t, n);
      case 31:
        return a = t.pendingProps, n = t.mode, a = {
          mode: a.mode,
          children: a.children
        }, e === null ? (n = Ar(
          a,
          n
        ), n.ref = t.ref, t.child = n, n.return = t, t = n) : (n = bn(e.child, a), n.ref = t.ref, t.child = n, n.return = t, t = n), t;
      case 22:
        return t1(e, t, n);
      case 24:
        return Ea(t), a = vt(Fe), e === null ? (r = _s(), r === null && (r = Ue, c = xs(), r.pooledCache = c, c.refCount++, c !== null && (r.pooledCacheLanes |= n), r = c), t.memoizedState = {
          parent: a,
          cache: r
        }, Cs(t), Bn(t, Fe, r)) : ((e.lanes & n) !== 0 && (Es(e, t), ri(t, null, null, n), ii()), r = e.memoizedState, c = t.memoizedState, r.parent !== a ? (r = { parent: a, cache: a }, t.memoizedState = r, t.lanes === 0 && (t.memoizedState = t.updateQueue.baseState = r), Bn(t, Fe, a)) : (a = c.cache, Bn(t, Fe, a), a !== r.cache && ys(
          t,
          [Fe],
          n,
          !0
        ))), ct(
          e,
          t,
          t.pendingProps.children,
          n
        ), t.child;
      case 29:
        throw t.pendingProps;
    }
    throw Error(s(156, t.tag));
  }
  function Tn(e) {
    e.flags |= 4;
  }
  function u1(e, t) {
    if (t.type !== "stylesheet" || (t.state.loading & 4) !== 0)
      e.flags &= -16777217;
    else if (e.flags |= 16777216, !b0(t)) {
      if (t = Qt.current, t !== null && ((Ce & 4194048) === Ce ? rn !== null : (Ce & 62914560) !== Ce && (Ce & 536870912) === 0 || t !== rn))
        throw ai = ws, Zf;
      e.flags |= 8192;
    }
  }
  function jr(e, t) {
    t !== null && (e.flags |= 4), e.flags & 16384 && (t = e.tag !== 22 ? Gi() : 536870912, e.lanes |= t, hl |= t);
  }
  function hi(e, t) {
    if (!Te)
      switch (e.tailMode) {
        case "hidden":
          t = e.tail;
          for (var n = null; t !== null; )
            t.alternate !== null && (n = t), t = t.sibling;
          n === null ? e.tail = null : n.sibling = null;
          break;
        case "collapsed":
          n = e.tail;
          for (var a = null; n !== null; )
            n.alternate !== null && (a = n), n = n.sibling;
          a === null ? t || e.tail === null ? e.tail = null : e.tail.sibling = null : a.sibling = null;
      }
  }
  function Be(e) {
    var t = e.alternate !== null && e.alternate.child === e.child, n = 0, a = 0;
    if (t)
      for (var r = e.child; r !== null; )
        n |= r.lanes | r.childLanes, a |= r.subtreeFlags & 65011712, a |= r.flags & 65011712, r.return = e, r = r.sibling;
    else
      for (r = e.child; r !== null; )
        n |= r.lanes | r.childLanes, a |= r.subtreeFlags, a |= r.flags, r.return = e, r = r.sibling;
    return e.subtreeFlags |= a, e.childLanes = n, t;
  }
  function qp(e, t, n) {
    var a = t.pendingProps;
    switch (ps(t), t.tag) {
      case 31:
      case 16:
      case 15:
      case 0:
      case 11:
      case 7:
      case 8:
      case 12:
      case 9:
      case 14:
        return Be(t), null;
      case 1:
        return Be(t), null;
      case 3:
        return n = t.stateNode, a = null, e !== null && (a = e.memoizedState.cache), t.memoizedState.cache !== a && (t.flags |= 2048), _n(Fe), Ke(), n.pendingContext && (n.context = n.pendingContext, n.pendingContext = null), (e === null || e.child === null) && (Pl(t) ? Tn(t) : e === null || e.memoizedState.isDehydrated && (t.flags & 256) === 0 || (t.flags |= 1024, qf())), Be(t), null;
      case 26:
        return n = t.memoizedState, e === null ? (Tn(t), n !== null ? (Be(t), u1(t, n)) : (Be(t), t.flags &= -16777217)) : n ? n !== e.memoizedState ? (Tn(t), Be(t), u1(t, n)) : (Be(t), t.flags &= -16777217) : (e.memoizedProps !== a && Tn(t), Be(t), t.flags &= -16777217), null;
      case 27:
        kt(t), n = ie.current;
        var r = t.type;
        if (e !== null && t.stateNode != null)
          e.memoizedProps !== a && Tn(t);
        else {
          if (!a) {
            if (t.stateNode === null)
              throw Error(s(166));
            return Be(t), null;
          }
          e = X.current, Pl(t) ? $f(t) : (e = u0(r, a, n), t.stateNode = e, Tn(t));
        }
        return Be(t), null;
      case 5:
        if (kt(t), n = t.type, e !== null && t.stateNode != null)
          e.memoizedProps !== a && Tn(t);
        else {
          if (!a) {
            if (t.stateNode === null)
              throw Error(s(166));
            return Be(t), null;
          }
          if (e = X.current, Pl(t))
            $f(t);
          else {
            switch (r = qr(
              ie.current
            ), e) {
              case 1:
                e = r.createElementNS(
                  "http://www.w3.org/2000/svg",
                  n
                );
                break;
              case 2:
                e = r.createElementNS(
                  "http://www.w3.org/1998/Math/MathML",
                  n
                );
                break;
              default:
                switch (n) {
                  case "svg":
                    e = r.createElementNS(
                      "http://www.w3.org/2000/svg",
                      n
                    );
                    break;
                  case "math":
                    e = r.createElementNS(
                      "http://www.w3.org/1998/Math/MathML",
                      n
                    );
                    break;
                  case "script":
                    e = r.createElement("div"), e.innerHTML = "<script><\/script>", e = e.removeChild(e.firstChild);
                    break;
                  case "select":
                    e = typeof a.is == "string" ? r.createElement("select", { is: a.is }) : r.createElement("select"), a.multiple ? e.multiple = !0 : a.size && (e.size = a.size);
                    break;
                  default:
                    e = typeof a.is == "string" ? r.createElement(n, { is: a.is }) : r.createElement(n);
                }
            }
            e[Ye] = t, e[Oe] = a;
            e: for (r = t.child; r !== null; ) {
              if (r.tag === 5 || r.tag === 6)
                e.appendChild(r.stateNode);
              else if (r.tag !== 4 && r.tag !== 27 && r.child !== null) {
                r.child.return = r, r = r.child;
                continue;
              }
              if (r === t) break e;
              for (; r.sibling === null; ) {
                if (r.return === null || r.return === t)
                  break e;
                r = r.return;
              }
              r.sibling.return = r.return, r = r.sibling;
            }
            t.stateNode = e;
            e: switch (ft(e, n, a), n) {
              case "button":
              case "input":
              case "select":
              case "textarea":
                e = !!a.autoFocus;
                break e;
              case "img":
                e = !0;
                break e;
              default:
                e = !1;
            }
            e && Tn(t);
          }
        }
        return Be(t), t.flags &= -16777217, null;
      case 6:
        if (e && t.stateNode != null)
          e.memoizedProps !== a && Tn(t);
        else {
          if (typeof a != "string" && t.stateNode === null)
            throw Error(s(166));
          if (e = ie.current, Pl(t)) {
            if (e = t.stateNode, n = t.memoizedProps, a = null, r = _t, r !== null)
              switch (r.tag) {
                case 27:
                case 5:
                  a = r.memoizedProps;
              }
            e[Ye] = t, e = !!(e.nodeValue === n || a !== null && a.suppressHydrationWarning === !0 || a0(e.nodeValue, n)), e || wa(t);
          } else
            e = qr(e).createTextNode(
              a
            ), e[Ye] = t, t.stateNode = e;
        }
        return Be(t), null;
      case 13:
        if (a = t.memoizedState, e === null || e.memoizedState !== null && e.memoizedState.dehydrated !== null) {
          if (r = Pl(t), a !== null && a.dehydrated !== null) {
            if (e === null) {
              if (!r) throw Error(s(318));
              if (r = t.memoizedState, r = r !== null ? r.dehydrated : null, !r) throw Error(s(317));
              r[Ye] = t;
            } else
              Wl(), (t.flags & 128) === 0 && (t.memoizedState = null), t.flags |= 4;
            Be(t), r = !1;
          } else
            r = qf(), e !== null && e.memoizedState !== null && (e.memoizedState.hydrationErrors = r), r = !0;
          if (!r)
            return t.flags & 256 ? (Cn(t), t) : (Cn(t), null);
        }
        if (Cn(t), (t.flags & 128) !== 0)
          return t.lanes = n, t;
        if (n = a !== null, e = e !== null && e.memoizedState !== null, n) {
          a = t.child, r = null, a.alternate !== null && a.alternate.memoizedState !== null && a.alternate.memoizedState.cachePool !== null && (r = a.alternate.memoizedState.cachePool.pool);
          var c = null;
          a.memoizedState !== null && a.memoizedState.cachePool !== null && (c = a.memoizedState.cachePool.pool), c !== r && (a.flags |= 2048);
        }
        return n !== e && n && (t.child.flags |= 8192), jr(t, t.updateQueue), Be(t), null;
      case 4:
        return Ke(), e === null && Mc(t.stateNode.containerInfo), Be(t), null;
      case 10:
        return _n(t.type), Be(t), null;
      case 19:
        if (I(et), r = t.memoizedState, r === null) return Be(t), null;
        if (a = (t.flags & 128) !== 0, c = r.rendering, c === null)
          if (a) hi(r, !1);
          else {
            if ($e !== 0 || e !== null && (e.flags & 128) !== 0)
              for (e = t.child; e !== null; ) {
                if (c = Cr(e), c !== null) {
                  for (t.flags |= 128, hi(r, !1), e = c.updateQueue, t.updateQueue = e, jr(t, e), t.subtreeFlags = 0, e = n, n = t.child; n !== null; )
                    Bf(n, e), n = n.sibling;
                  return L(
                    et,
                    et.current & 1 | 2
                  ), t.child;
                }
                e = e.sibling;
              }
            r.tail !== null && pt() > Rr && (t.flags |= 128, a = !0, hi(r, !1), t.lanes = 4194304);
          }
        else {
          if (!a)
            if (e = Cr(c), e !== null) {
              if (t.flags |= 128, a = !0, e = e.updateQueue, t.updateQueue = e, jr(t, e), hi(r, !0), r.tail === null && r.tailMode === "hidden" && !c.alternate && !Te)
                return Be(t), null;
            } else
              2 * pt() - r.renderingStartTime > Rr && n !== 536870912 && (t.flags |= 128, a = !0, hi(r, !1), t.lanes = 4194304);
          r.isBackwards ? (c.sibling = t.child, t.child = c) : (e = r.last, e !== null ? e.sibling = c : t.child = c, r.last = c);
        }
        return r.tail !== null ? (t = r.tail, r.rendering = t, r.tail = t.sibling, r.renderingStartTime = pt(), t.sibling = null, e = et.current, L(et, a ? e & 1 | 2 : e & 1), t) : (Be(t), null);
      case 22:
      case 23:
        return Cn(t), js(), a = t.memoizedState !== null, e !== null ? e.memoizedState !== null !== a && (t.flags |= 8192) : a && (t.flags |= 8192), a ? (n & 536870912) !== 0 && (t.flags & 128) === 0 && (Be(t), t.subtreeFlags & 6 && (t.flags |= 8192)) : Be(t), n = t.updateQueue, n !== null && jr(t, n.retryQueue), n = null, e !== null && e.memoizedState !== null && e.memoizedState.cachePool !== null && (n = e.memoizedState.cachePool.pool), a = null, t.memoizedState !== null && t.memoizedState.cachePool !== null && (a = t.memoizedState.cachePool.pool), a !== n && (t.flags |= 2048), e !== null && I(Ta), null;
      case 24:
        return n = null, e !== null && (n = e.memoizedState.cache), t.memoizedState.cache !== n && (t.flags |= 2048), _n(Fe), Be(t), null;
      case 25:
        return null;
      case 30:
        return null;
    }
    throw Error(s(156, t.tag));
  }
  function Gp(e, t) {
    switch (ps(t), t.tag) {
      case 1:
        return e = t.flags, e & 65536 ? (t.flags = e & -65537 | 128, t) : null;
      case 3:
        return _n(Fe), Ke(), e = t.flags, (e & 65536) !== 0 && (e & 128) === 0 ? (t.flags = e & -65537 | 128, t) : null;
      case 26:
      case 27:
      case 5:
        return kt(t), null;
      case 13:
        if (Cn(t), e = t.memoizedState, e !== null && e.dehydrated !== null) {
          if (t.alternate === null)
            throw Error(s(340));
          Wl();
        }
        return e = t.flags, e & 65536 ? (t.flags = e & -65537 | 128, t) : null;
      case 19:
        return I(et), null;
      case 4:
        return Ke(), null;
      case 10:
        return _n(t.type), null;
      case 22:
      case 23:
        return Cn(t), js(), e !== null && I(Ta), e = t.flags, e & 65536 ? (t.flags = e & -65537 | 128, t) : null;
      case 24:
        return _n(Fe), null;
      case 25:
        return null;
      default:
        return null;
    }
  }
  function f1(e, t) {
    switch (ps(t), t.tag) {
      case 3:
        _n(Fe), Ke();
        break;
      case 26:
      case 27:
      case 5:
        kt(t);
        break;
      case 4:
        Ke();
        break;
      case 13:
        Cn(t);
        break;
      case 19:
        I(et);
        break;
      case 10:
        _n(t.type);
        break;
      case 22:
      case 23:
        Cn(t), js(), e !== null && I(Ta);
        break;
      case 24:
        _n(Fe);
    }
  }
  function mi(e, t) {
    try {
      var n = t.updateQueue, a = n !== null ? n.lastEffect : null;
      if (a !== null) {
        var r = a.next;
        n = r;
        do {
          if ((n.tag & e) === e) {
            a = void 0;
            var c = n.create, d = n.inst;
            a = c(), d.destroy = a;
          }
          n = n.next;
        } while (n !== r);
      }
    } catch (b) {
      ze(t, t.return, b);
    }
  }
  function Qn(e, t, n) {
    try {
      var a = t.updateQueue, r = a !== null ? a.lastEffect : null;
      if (r !== null) {
        var c = r.next;
        a = c;
        do {
          if ((a.tag & e) === e) {
            var d = a.inst, b = d.destroy;
            if (b !== void 0) {
              d.destroy = void 0, r = t;
              var w = n, N = b;
              try {
                N();
              } catch (B) {
                ze(
                  r,
                  w,
                  B
                );
              }
            }
          }
          a = a.next;
        } while (a !== c);
      }
    } catch (B) {
      ze(t, t.return, B);
    }
  }
  function d1(e) {
    var t = e.updateQueue;
    if (t !== null) {
      var n = e.stateNode;
      try {
        Ff(t, n);
      } catch (a) {
        ze(e, e.return, a);
      }
    }
  }
  function h1(e, t, n) {
    n.props = Aa(
      e.type,
      e.memoizedProps
    ), n.state = e.memoizedState;
    try {
      n.componentWillUnmount();
    } catch (a) {
      ze(e, t, a);
    }
  }
  function pi(e, t) {
    try {
      var n = e.ref;
      if (n !== null) {
        switch (e.tag) {
          case 26:
          case 27:
          case 5:
            var a = e.stateNode;
            break;
          case 30:
            a = e.stateNode;
            break;
          default:
            a = e.stateNode;
        }
        typeof n == "function" ? e.refCleanup = n(a) : n.current = a;
      }
    } catch (r) {
      ze(e, t, r);
    }
  }
  function on(e, t) {
    var n = e.ref, a = e.refCleanup;
    if (n !== null)
      if (typeof a == "function")
        try {
          a();
        } catch (r) {
          ze(e, t, r);
        } finally {
          e.refCleanup = null, e = e.alternate, e != null && (e.refCleanup = null);
        }
      else if (typeof n == "function")
        try {
          n(null);
        } catch (r) {
          ze(e, t, r);
        }
      else n.current = null;
  }
  function m1(e) {
    var t = e.type, n = e.memoizedProps, a = e.stateNode;
    try {
      e: switch (t) {
        case "button":
        case "input":
        case "select":
        case "textarea":
          n.autoFocus && a.focus();
          break e;
        case "img":
          n.src ? a.src = n.src : n.srcSet && (a.srcset = n.srcSet);
      }
    } catch (r) {
      ze(e, e.return, r);
    }
  }
  function ac(e, t, n) {
    try {
      var a = e.stateNode;
      uv(a, e.type, n, t), a[Oe] = t;
    } catch (r) {
      ze(e, e.return, r);
    }
  }
  function p1(e) {
    return e.tag === 5 || e.tag === 3 || e.tag === 26 || e.tag === 27 && Fn(e.type) || e.tag === 4;
  }
  function lc(e) {
    e: for (; ; ) {
      for (; e.sibling === null; ) {
        if (e.return === null || p1(e.return)) return null;
        e = e.return;
      }
      for (e.sibling.return = e.return, e = e.sibling; e.tag !== 5 && e.tag !== 6 && e.tag !== 18; ) {
        if (e.tag === 27 && Fn(e.type) || e.flags & 2 || e.child === null || e.tag === 4) continue e;
        e.child.return = e, e = e.child;
      }
      if (!(e.flags & 2)) return e.stateNode;
    }
  }
  function ic(e, t, n) {
    var a = e.tag;
    if (a === 5 || a === 6)
      e = e.stateNode, t ? (n.nodeType === 9 ? n.body : n.nodeName === "HTML" ? n.ownerDocument.body : n).insertBefore(e, t) : (t = n.nodeType === 9 ? n.body : n.nodeName === "HTML" ? n.ownerDocument.body : n, t.appendChild(e), n = n._reactRootContainer, n != null || t.onclick !== null || (t.onclick = Vr));
    else if (a !== 4 && (a === 27 && Fn(e.type) && (n = e.stateNode, t = null), e = e.child, e !== null))
      for (ic(e, t, n), e = e.sibling; e !== null; )
        ic(e, t, n), e = e.sibling;
  }
  function kr(e, t, n) {
    var a = e.tag;
    if (a === 5 || a === 6)
      e = e.stateNode, t ? n.insertBefore(e, t) : n.appendChild(e);
    else if (a !== 4 && (a === 27 && Fn(e.type) && (n = e.stateNode), e = e.child, e !== null))
      for (kr(e, t, n), e = e.sibling; e !== null; )
        kr(e, t, n), e = e.sibling;
  }
  function v1(e) {
    var t = e.stateNode, n = e.memoizedProps;
    try {
      for (var a = e.type, r = t.attributes; r.length; )
        t.removeAttributeNode(r[0]);
      ft(t, a, n), t[Ye] = e, t[Oe] = n;
    } catch (c) {
      ze(e, e.return, c);
    }
  }
  var Mn = !1, Xe = !1, rc = !1, g1 = typeof WeakSet == "function" ? WeakSet : Set, it = null;
  function Yp(e, t) {
    if (e = e.containerInfo, kc = Kr, e = Af(e), ls(e)) {
      if ("selectionStart" in e)
        var n = {
          start: e.selectionStart,
          end: e.selectionEnd
        };
      else
        e: {
          n = (n = e.ownerDocument) && n.defaultView || window;
          var a = n.getSelection && n.getSelection();
          if (a && a.rangeCount !== 0) {
            n = a.anchorNode;
            var r = a.anchorOffset, c = a.focusNode;
            a = a.focusOffset;
            try {
              n.nodeType, c.nodeType;
            } catch {
              n = null;
              break e;
            }
            var d = 0, b = -1, w = -1, N = 0, B = 0, V = e, D = null;
            t: for (; ; ) {
              for (var z; V !== n || r !== 0 && V.nodeType !== 3 || (b = d + r), V !== c || a !== 0 && V.nodeType !== 3 || (w = d + a), V.nodeType === 3 && (d += V.nodeValue.length), (z = V.firstChild) !== null; )
                D = V, V = z;
              for (; ; ) {
                if (V === e) break t;
                if (D === n && ++N === r && (b = d), D === c && ++B === a && (w = d), (z = V.nextSibling) !== null) break;
                V = D, D = V.parentNode;
              }
              V = z;
            }
            n = b === -1 || w === -1 ? null : { start: b, end: w };
          } else n = null;
        }
      n = n || { start: 0, end: 0 };
    } else n = null;
    for (Nc = { focusedElem: e, selectionRange: n }, Kr = !1, it = t; it !== null; )
      if (t = it, e = t.child, (t.subtreeFlags & 1024) !== 0 && e !== null)
        e.return = t, it = e;
      else
        for (; it !== null; ) {
          switch (t = it, c = t.alternate, e = t.flags, t.tag) {
            case 0:
              break;
            case 11:
            case 15:
              break;
            case 1:
              if ((e & 1024) !== 0 && c !== null) {
                e = void 0, n = t, r = c.memoizedProps, c = c.memoizedState, a = n.stateNode;
                try {
                  var de = Aa(
                    n.type,
                    r,
                    n.elementType === n.type
                  );
                  e = a.getSnapshotBeforeUpdate(
                    de,
                    c
                  ), a.__reactInternalSnapshotBeforeUpdate = e;
                } catch (se) {
                  ze(
                    n,
                    n.return,
                    se
                  );
                }
              }
              break;
            case 3:
              if ((e & 1024) !== 0) {
                if (e = t.stateNode.containerInfo, n = e.nodeType, n === 9)
                  zc(e);
                else if (n === 1)
                  switch (e.nodeName) {
                    case "HEAD":
                    case "HTML":
                    case "BODY":
                      zc(e);
                      break;
                    default:
                      e.textContent = "";
                  }
              }
              break;
            case 5:
            case 26:
            case 27:
            case 6:
            case 4:
            case 17:
              break;
            default:
              if ((e & 1024) !== 0) throw Error(s(163));
          }
          if (e = t.sibling, e !== null) {
            e.return = t.return, it = e;
            break;
          }
          it = t.return;
        }
  }
  function b1(e, t, n) {
    var a = n.flags;
    switch (n.tag) {
      case 0:
      case 11:
      case 15:
        Xn(e, n), a & 4 && mi(5, n);
        break;
      case 1:
        if (Xn(e, n), a & 4)
          if (e = n.stateNode, t === null)
            try {
              e.componentDidMount();
            } catch (d) {
              ze(n, n.return, d);
            }
          else {
            var r = Aa(
              n.type,
              t.memoizedProps
            );
            t = t.memoizedState;
            try {
              e.componentDidUpdate(
                r,
                t,
                e.__reactInternalSnapshotBeforeUpdate
              );
            } catch (d) {
              ze(
                n,
                n.return,
                d
              );
            }
          }
        a & 64 && d1(n), a & 512 && pi(n, n.return);
        break;
      case 3:
        if (Xn(e, n), a & 64 && (e = n.updateQueue, e !== null)) {
          if (t = null, n.child !== null)
            switch (n.child.tag) {
              case 27:
              case 5:
                t = n.child.stateNode;
                break;
              case 1:
                t = n.child.stateNode;
            }
          try {
            Ff(e, t);
          } catch (d) {
            ze(n, n.return, d);
          }
        }
        break;
      case 27:
        t === null && a & 4 && v1(n);
      case 26:
      case 5:
        Xn(e, n), t === null && a & 4 && m1(n), a & 512 && pi(n, n.return);
        break;
      case 12:
        Xn(e, n);
        break;
      case 13:
        Xn(e, n), a & 4 && S1(e, n), a & 64 && (e = n.memoizedState, e !== null && (e = e.dehydrated, e !== null && (n = Fp.bind(
          null,
          n
        ), gv(e, n))));
        break;
      case 22:
        if (a = n.memoizedState !== null || Mn, !a) {
          t = t !== null && t.memoizedState !== null || Xe, r = Mn;
          var c = Xe;
          Mn = a, (Xe = t) && !c ? Zn(
            e,
            n,
            (n.subtreeFlags & 8772) !== 0
          ) : Xn(e, n), Mn = r, Xe = c;
        }
        break;
      case 30:
        break;
      default:
        Xn(e, n);
    }
  }
  function y1(e) {
    var t = e.alternate;
    t !== null && (e.alternate = null, y1(t)), e.child = null, e.deletions = null, e.sibling = null, e.tag === 5 && (t = e.stateNode, t !== null && Ho(t)), e.stateNode = null, e.return = null, e.dependencies = null, e.memoizedProps = null, e.memoizedState = null, e.pendingProps = null, e.stateNode = null, e.updateQueue = null;
  }
  var Le = null, Tt = !1;
  function An(e, t, n) {
    for (n = n.child; n !== null; )
      x1(e, t, n), n = n.sibling;
  }
  function x1(e, t, n) {
    if (St && typeof St.onCommitFiberUnmount == "function")
      try {
        St.onCommitFiberUnmount(nn, n);
      } catch {
      }
    switch (n.tag) {
      case 26:
        Xe || on(n, t), An(
          e,
          t,
          n
        ), n.memoizedState ? n.memoizedState.count-- : n.stateNode && (n = n.stateNode, n.parentNode.removeChild(n));
        break;
      case 27:
        Xe || on(n, t);
        var a = Le, r = Tt;
        Fn(n.type) && (Le = n.stateNode, Tt = !1), An(
          e,
          t,
          n
        ), Ci(n.stateNode), Le = a, Tt = r;
        break;
      case 5:
        Xe || on(n, t);
      case 6:
        if (a = Le, r = Tt, Le = null, An(
          e,
          t,
          n
        ), Le = a, Tt = r, Le !== null)
          if (Tt)
            try {
              (Le.nodeType === 9 ? Le.body : Le.nodeName === "HTML" ? Le.ownerDocument.body : Le).removeChild(n.stateNode);
            } catch (c) {
              ze(
                n,
                t,
                c
              );
            }
          else
            try {
              Le.removeChild(n.stateNode);
            } catch (c) {
              ze(
                n,
                t,
                c
              );
            }
        break;
      case 18:
        Le !== null && (Tt ? (e = Le, s0(
          e.nodeType === 9 ? e.body : e.nodeName === "HTML" ? e.ownerDocument.body : e,
          n.stateNode
        ), Ri(e)) : s0(Le, n.stateNode));
        break;
      case 4:
        a = Le, r = Tt, Le = n.stateNode.containerInfo, Tt = !0, An(
          e,
          t,
          n
        ), Le = a, Tt = r;
        break;
      case 0:
      case 11:
      case 14:
      case 15:
        Xe || Qn(2, n, t), Xe || Qn(4, n, t), An(
          e,
          t,
          n
        );
        break;
      case 1:
        Xe || (on(n, t), a = n.stateNode, typeof a.componentWillUnmount == "function" && h1(
          n,
          t,
          a
        )), An(
          e,
          t,
          n
        );
        break;
      case 21:
        An(
          e,
          t,
          n
        );
        break;
      case 22:
        Xe = (a = Xe) || n.memoizedState !== null, An(
          e,
          t,
          n
        ), Xe = a;
        break;
      default:
        An(
          e,
          t,
          n
        );
    }
  }
  function S1(e, t) {
    if (t.memoizedState === null && (e = t.alternate, e !== null && (e = e.memoizedState, e !== null && (e = e.dehydrated, e !== null))))
      try {
        Ri(e);
      } catch (n) {
        ze(t, t.return, n);
      }
  }
  function Qp(e) {
    switch (e.tag) {
      case 13:
      case 19:
        var t = e.stateNode;
        return t === null && (t = e.stateNode = new g1()), t;
      case 22:
        return e = e.stateNode, t = e._retryCache, t === null && (t = e._retryCache = new g1()), t;
      default:
        throw Error(s(435, e.tag));
    }
  }
  function oc(e, t) {
    var n = Qp(e);
    t.forEach(function(a) {
      var r = ev.bind(null, e, a);
      n.has(a) || (n.add(a), a.then(r, r));
    });
  }
  function Dt(e, t) {
    var n = t.deletions;
    if (n !== null)
      for (var a = 0; a < n.length; a++) {
        var r = n[a], c = e, d = t, b = d;
        e: for (; b !== null; ) {
          switch (b.tag) {
            case 27:
              if (Fn(b.type)) {
                Le = b.stateNode, Tt = !1;
                break e;
              }
              break;
            case 5:
              Le = b.stateNode, Tt = !1;
              break e;
            case 3:
            case 4:
              Le = b.stateNode.containerInfo, Tt = !0;
              break e;
          }
          b = b.return;
        }
        if (Le === null) throw Error(s(160));
        x1(c, d, r), Le = null, Tt = !1, c = r.alternate, c !== null && (c.return = null), r.return = null;
      }
    if (t.subtreeFlags & 13878)
      for (t = t.child; t !== null; )
        _1(t, e), t = t.sibling;
  }
  var Ft = null;
  function _1(e, t) {
    var n = e.alternate, a = e.flags;
    switch (e.tag) {
      case 0:
      case 11:
      case 14:
      case 15:
        Dt(t, e), zt(e), a & 4 && (Qn(3, e, e.return), mi(3, e), Qn(5, e, e.return));
        break;
      case 1:
        Dt(t, e), zt(e), a & 512 && (Xe || n === null || on(n, n.return)), a & 64 && Mn && (e = e.updateQueue, e !== null && (a = e.callbacks, a !== null && (n = e.shared.hiddenCallbacks, e.shared.hiddenCallbacks = n === null ? a : n.concat(a))));
        break;
      case 26:
        var r = Ft;
        if (Dt(t, e), zt(e), a & 512 && (Xe || n === null || on(n, n.return)), a & 4) {
          var c = n !== null ? n.memoizedState : null;
          if (a = e.memoizedState, n === null)
            if (a === null)
              if (e.stateNode === null) {
                e: {
                  a = e.type, n = e.memoizedProps, r = r.ownerDocument || r;
                  t: switch (a) {
                    case "title":
                      c = r.getElementsByTagName("title")[0], (!c || c[Hl] || c[Ye] || c.namespaceURI === "http://www.w3.org/2000/svg" || c.hasAttribute("itemprop")) && (c = r.createElement(a), r.head.insertBefore(
                        c,
                        r.querySelector("head > title")
                      )), ft(c, a, n), c[Ye] = e, at(c), a = c;
                      break e;
                    case "link":
                      var d = v0(
                        "link",
                        "href",
                        r
                      ).get(a + (n.href || ""));
                      if (d) {
                        for (var b = 0; b < d.length; b++)
                          if (c = d[b], c.getAttribute("href") === (n.href == null || n.href === "" ? null : n.href) && c.getAttribute("rel") === (n.rel == null ? null : n.rel) && c.getAttribute("title") === (n.title == null ? null : n.title) && c.getAttribute("crossorigin") === (n.crossOrigin == null ? null : n.crossOrigin)) {
                            d.splice(b, 1);
                            break t;
                          }
                      }
                      c = r.createElement(a), ft(c, a, n), r.head.appendChild(c);
                      break;
                    case "meta":
                      if (d = v0(
                        "meta",
                        "content",
                        r
                      ).get(a + (n.content || ""))) {
                        for (b = 0; b < d.length; b++)
                          if (c = d[b], c.getAttribute("content") === (n.content == null ? null : "" + n.content) && c.getAttribute("name") === (n.name == null ? null : n.name) && c.getAttribute("property") === (n.property == null ? null : n.property) && c.getAttribute("http-equiv") === (n.httpEquiv == null ? null : n.httpEquiv) && c.getAttribute("charset") === (n.charSet == null ? null : n.charSet)) {
                            d.splice(b, 1);
                            break t;
                          }
                      }
                      c = r.createElement(a), ft(c, a, n), r.head.appendChild(c);
                      break;
                    default:
                      throw Error(s(468, a));
                  }
                  c[Ye] = e, at(c), a = c;
                }
                e.stateNode = a;
              } else
                g0(
                  r,
                  e.type,
                  e.stateNode
                );
            else
              e.stateNode = p0(
                r,
                a,
                e.memoizedProps
              );
          else
            c !== a ? (c === null ? n.stateNode !== null && (n = n.stateNode, n.parentNode.removeChild(n)) : c.count--, a === null ? g0(
              r,
              e.type,
              e.stateNode
            ) : p0(
              r,
              a,
              e.memoizedProps
            )) : a === null && e.stateNode !== null && ac(
              e,
              e.memoizedProps,
              n.memoizedProps
            );
        }
        break;
      case 27:
        Dt(t, e), zt(e), a & 512 && (Xe || n === null || on(n, n.return)), n !== null && a & 4 && ac(
          e,
          e.memoizedProps,
          n.memoizedProps
        );
        break;
      case 5:
        if (Dt(t, e), zt(e), a & 512 && (Xe || n === null || on(n, n.return)), e.flags & 32) {
          r = e.stateNode;
          try {
            Qa(r, "");
          } catch (z) {
            ze(e, e.return, z);
          }
        }
        a & 4 && e.stateNode != null && (r = e.memoizedProps, ac(
          e,
          r,
          n !== null ? n.memoizedProps : r
        )), a & 1024 && (rc = !0);
        break;
      case 6:
        if (Dt(t, e), zt(e), a & 4) {
          if (e.stateNode === null)
            throw Error(s(162));
          a = e.memoizedProps, n = e.stateNode;
          try {
            n.nodeValue = a;
          } catch (z) {
            ze(e, e.return, z);
          }
        }
        break;
      case 3:
        if (Qr = null, r = Ft, Ft = Gr(t.containerInfo), Dt(t, e), Ft = r, zt(e), a & 4 && n !== null && n.memoizedState.isDehydrated)
          try {
            Ri(t.containerInfo);
          } catch (z) {
            ze(e, e.return, z);
          }
        rc && (rc = !1, w1(e));
        break;
      case 4:
        a = Ft, Ft = Gr(
          e.stateNode.containerInfo
        ), Dt(t, e), zt(e), Ft = a;
        break;
      case 12:
        Dt(t, e), zt(e);
        break;
      case 13:
        Dt(t, e), zt(e), e.child.flags & 8192 && e.memoizedState !== null != (n !== null && n.memoizedState !== null) && (hc = pt()), a & 4 && (a = e.updateQueue, a !== null && (e.updateQueue = null, oc(e, a)));
        break;
      case 22:
        r = e.memoizedState !== null;
        var w = n !== null && n.memoizedState !== null, N = Mn, B = Xe;
        if (Mn = N || r, Xe = B || w, Dt(t, e), Xe = B, Mn = N, zt(e), a & 8192)
          e: for (t = e.stateNode, t._visibility = r ? t._visibility & -2 : t._visibility | 1, r && (n === null || w || Mn || Xe || ja(e)), n = null, t = e; ; ) {
            if (t.tag === 5 || t.tag === 26) {
              if (n === null) {
                w = n = t;
                try {
                  if (c = w.stateNode, r)
                    d = c.style, typeof d.setProperty == "function" ? d.setProperty("display", "none", "important") : d.display = "none";
                  else {
                    b = w.stateNode;
                    var V = w.memoizedProps.style, D = V != null && V.hasOwnProperty("display") ? V.display : null;
                    b.style.display = D == null || typeof D == "boolean" ? "" : ("" + D).trim();
                  }
                } catch (z) {
                  ze(w, w.return, z);
                }
              }
            } else if (t.tag === 6) {
              if (n === null) {
                w = t;
                try {
                  w.stateNode.nodeValue = r ? "" : w.memoizedProps;
                } catch (z) {
                  ze(w, w.return, z);
                }
              }
            } else if ((t.tag !== 22 && t.tag !== 23 || t.memoizedState === null || t === e) && t.child !== null) {
              t.child.return = t, t = t.child;
              continue;
            }
            if (t === e) break e;
            for (; t.sibling === null; ) {
              if (t.return === null || t.return === e) break e;
              n === t && (n = null), t = t.return;
            }
            n === t && (n = null), t.sibling.return = t.return, t = t.sibling;
          }
        a & 4 && (a = e.updateQueue, a !== null && (n = a.retryQueue, n !== null && (a.retryQueue = null, oc(e, n))));
        break;
      case 19:
        Dt(t, e), zt(e), a & 4 && (a = e.updateQueue, a !== null && (e.updateQueue = null, oc(e, a)));
        break;
      case 30:
        break;
      case 21:
        break;
      default:
        Dt(t, e), zt(e);
    }
  }
  function zt(e) {
    var t = e.flags;
    if (t & 2) {
      try {
        for (var n, a = e.return; a !== null; ) {
          if (p1(a)) {
            n = a;
            break;
          }
          a = a.return;
        }
        if (n == null) throw Error(s(160));
        switch (n.tag) {
          case 27:
            var r = n.stateNode, c = lc(e);
            kr(e, c, r);
            break;
          case 5:
            var d = n.stateNode;
            n.flags & 32 && (Qa(d, ""), n.flags &= -33);
            var b = lc(e);
            kr(e, b, d);
            break;
          case 3:
          case 4:
            var w = n.stateNode.containerInfo, N = lc(e);
            ic(
              e,
              N,
              w
            );
            break;
          default:
            throw Error(s(161));
        }
      } catch (B) {
        ze(e, e.return, B);
      }
      e.flags &= -3;
    }
    t & 4096 && (e.flags &= -4097);
  }
  function w1(e) {
    if (e.subtreeFlags & 1024)
      for (e = e.child; e !== null; ) {
        var t = e;
        w1(t), t.tag === 5 && t.flags & 1024 && t.stateNode.reset(), e = e.sibling;
      }
  }
  function Xn(e, t) {
    if (t.subtreeFlags & 8772)
      for (t = t.child; t !== null; )
        b1(e, t.alternate, t), t = t.sibling;
  }
  function ja(e) {
    for (e = e.child; e !== null; ) {
      var t = e;
      switch (t.tag) {
        case 0:
        case 11:
        case 14:
        case 15:
          Qn(4, t, t.return), ja(t);
          break;
        case 1:
          on(t, t.return);
          var n = t.stateNode;
          typeof n.componentWillUnmount == "function" && h1(
            t,
            t.return,
            n
          ), ja(t);
          break;
        case 27:
          Ci(t.stateNode);
        case 26:
        case 5:
          on(t, t.return), ja(t);
          break;
        case 22:
          t.memoizedState === null && ja(t);
          break;
        case 30:
          ja(t);
          break;
        default:
          ja(t);
      }
      e = e.sibling;
    }
  }
  function Zn(e, t, n) {
    for (n = n && (t.subtreeFlags & 8772) !== 0, t = t.child; t !== null; ) {
      var a = t.alternate, r = e, c = t, d = c.flags;
      switch (c.tag) {
        case 0:
        case 11:
        case 15:
          Zn(
            r,
            c,
            n
          ), mi(4, c);
          break;
        case 1:
          if (Zn(
            r,
            c,
            n
          ), a = c, r = a.stateNode, typeof r.componentDidMount == "function")
            try {
              r.componentDidMount();
            } catch (N) {
              ze(a, a.return, N);
            }
          if (a = c, r = a.updateQueue, r !== null) {
            var b = a.stateNode;
            try {
              var w = r.shared.hiddenCallbacks;
              if (w !== null)
                for (r.shared.hiddenCallbacks = null, r = 0; r < w.length; r++)
                  If(w[r], b);
            } catch (N) {
              ze(a, a.return, N);
            }
          }
          n && d & 64 && d1(c), pi(c, c.return);
          break;
        case 27:
          v1(c);
        case 26:
        case 5:
          Zn(
            r,
            c,
            n
          ), n && a === null && d & 4 && m1(c), pi(c, c.return);
          break;
        case 12:
          Zn(
            r,
            c,
            n
          );
          break;
        case 13:
          Zn(
            r,
            c,
            n
          ), n && d & 4 && S1(r, c);
          break;
        case 22:
          c.memoizedState === null && Zn(
            r,
            c,
            n
          ), pi(c, c.return);
          break;
        case 30:
          break;
        default:
          Zn(
            r,
            c,
            n
          );
      }
      t = t.sibling;
    }
  }
  function sc(e, t) {
    var n = null;
    e !== null && e.memoizedState !== null && e.memoizedState.cachePool !== null && (n = e.memoizedState.cachePool.pool), e = null, t.memoizedState !== null && t.memoizedState.cachePool !== null && (e = t.memoizedState.cachePool.pool), e !== n && (e != null && e.refCount++, n != null && ei(n));
  }
  function cc(e, t) {
    e = null, t.alternate !== null && (e = t.alternate.memoizedState.cache), t = t.memoizedState.cache, t !== e && (t.refCount++, e != null && ei(e));
  }
  function sn(e, t, n, a) {
    if (t.subtreeFlags & 10256)
      for (t = t.child; t !== null; )
        C1(
          e,
          t,
          n,
          a
        ), t = t.sibling;
  }
  function C1(e, t, n, a) {
    var r = t.flags;
    switch (t.tag) {
      case 0:
      case 11:
      case 15:
        sn(
          e,
          t,
          n,
          a
        ), r & 2048 && mi(9, t);
        break;
      case 1:
        sn(
          e,
          t,
          n,
          a
        );
        break;
      case 3:
        sn(
          e,
          t,
          n,
          a
        ), r & 2048 && (e = null, t.alternate !== null && (e = t.alternate.memoizedState.cache), t = t.memoizedState.cache, t !== e && (t.refCount++, e != null && ei(e)));
        break;
      case 12:
        if (r & 2048) {
          sn(
            e,
            t,
            n,
            a
          ), e = t.stateNode;
          try {
            var c = t.memoizedProps, d = c.id, b = c.onPostCommit;
            typeof b == "function" && b(
              d,
              t.alternate === null ? "mount" : "update",
              e.passiveEffectDuration,
              -0
            );
          } catch (w) {
            ze(t, t.return, w);
          }
        } else
          sn(
            e,
            t,
            n,
            a
          );
        break;
      case 13:
        sn(
          e,
          t,
          n,
          a
        );
        break;
      case 23:
        break;
      case 22:
        c = t.stateNode, d = t.alternate, t.memoizedState !== null ? c._visibility & 2 ? sn(
          e,
          t,
          n,
          a
        ) : vi(e, t) : c._visibility & 2 ? sn(
          e,
          t,
          n,
          a
        ) : (c._visibility |= 2, ul(
          e,
          t,
          n,
          a,
          (t.subtreeFlags & 10256) !== 0
        )), r & 2048 && sc(d, t);
        break;
      case 24:
        sn(
          e,
          t,
          n,
          a
        ), r & 2048 && cc(t.alternate, t);
        break;
      default:
        sn(
          e,
          t,
          n,
          a
        );
    }
  }
  function ul(e, t, n, a, r) {
    for (r = r && (t.subtreeFlags & 10256) !== 0, t = t.child; t !== null; ) {
      var c = e, d = t, b = n, w = a, N = d.flags;
      switch (d.tag) {
        case 0:
        case 11:
        case 15:
          ul(
            c,
            d,
            b,
            w,
            r
          ), mi(8, d);
          break;
        case 23:
          break;
        case 22:
          var B = d.stateNode;
          d.memoizedState !== null ? B._visibility & 2 ? ul(
            c,
            d,
            b,
            w,
            r
          ) : vi(
            c,
            d
          ) : (B._visibility |= 2, ul(
            c,
            d,
            b,
            w,
            r
          )), r && N & 2048 && sc(
            d.alternate,
            d
          );
          break;
        case 24:
          ul(
            c,
            d,
            b,
            w,
            r
          ), r && N & 2048 && cc(d.alternate, d);
          break;
        default:
          ul(
            c,
            d,
            b,
            w,
            r
          );
      }
      t = t.sibling;
    }
  }
  function vi(e, t) {
    if (t.subtreeFlags & 10256)
      for (t = t.child; t !== null; ) {
        var n = e, a = t, r = a.flags;
        switch (a.tag) {
          case 22:
            vi(n, a), r & 2048 && sc(
              a.alternate,
              a
            );
            break;
          case 24:
            vi(n, a), r & 2048 && cc(a.alternate, a);
            break;
          default:
            vi(n, a);
        }
        t = t.sibling;
      }
  }
  var gi = 8192;
  function fl(e) {
    if (e.subtreeFlags & gi)
      for (e = e.child; e !== null; )
        E1(e), e = e.sibling;
  }
  function E1(e) {
    switch (e.tag) {
      case 26:
        fl(e), e.flags & gi && e.memoizedState !== null && kv(
          Ft,
          e.memoizedState,
          e.memoizedProps
        );
        break;
      case 5:
        fl(e);
        break;
      case 3:
      case 4:
        var t = Ft;
        Ft = Gr(e.stateNode.containerInfo), fl(e), Ft = t;
        break;
      case 22:
        e.memoizedState === null && (t = e.alternate, t !== null && t.memoizedState !== null ? (t = gi, gi = 16777216, fl(e), gi = t) : fl(e));
        break;
      default:
        fl(e);
    }
  }
  function T1(e) {
    var t = e.alternate;
    if (t !== null && (e = t.child, e !== null)) {
      t.child = null;
      do
        t = e.sibling, e.sibling = null, e = t;
      while (e !== null);
    }
  }
  function bi(e) {
    var t = e.deletions;
    if ((e.flags & 16) !== 0) {
      if (t !== null)
        for (var n = 0; n < t.length; n++) {
          var a = t[n];
          it = a, A1(
            a,
            e
          );
        }
      T1(e);
    }
    if (e.subtreeFlags & 10256)
      for (e = e.child; e !== null; )
        M1(e), e = e.sibling;
  }
  function M1(e) {
    switch (e.tag) {
      case 0:
      case 11:
      case 15:
        bi(e), e.flags & 2048 && Qn(9, e, e.return);
        break;
      case 3:
        bi(e);
        break;
      case 12:
        bi(e);
        break;
      case 22:
        var t = e.stateNode;
        e.memoizedState !== null && t._visibility & 2 && (e.return === null || e.return.tag !== 13) ? (t._visibility &= -3, Nr(e)) : bi(e);
        break;
      default:
        bi(e);
    }
  }
  function Nr(e) {
    var t = e.deletions;
    if ((e.flags & 16) !== 0) {
      if (t !== null)
        for (var n = 0; n < t.length; n++) {
          var a = t[n];
          it = a, A1(
            a,
            e
          );
        }
      T1(e);
    }
    for (e = e.child; e !== null; ) {
      switch (t = e, t.tag) {
        case 0:
        case 11:
        case 15:
          Qn(8, t, t.return), Nr(t);
          break;
        case 22:
          n = t.stateNode, n._visibility & 2 && (n._visibility &= -3, Nr(t));
          break;
        default:
          Nr(t);
      }
      e = e.sibling;
    }
  }
  function A1(e, t) {
    for (; it !== null; ) {
      var n = it;
      switch (n.tag) {
        case 0:
        case 11:
        case 15:
          Qn(8, n, t);
          break;
        case 23:
        case 22:
          if (n.memoizedState !== null && n.memoizedState.cachePool !== null) {
            var a = n.memoizedState.cachePool.pool;
            a != null && a.refCount++;
          }
          break;
        case 24:
          ei(n.memoizedState.cache);
      }
      if (a = n.child, a !== null) a.return = n, it = a;
      else
        e: for (n = e; it !== null; ) {
          a = it;
          var r = a.sibling, c = a.return;
          if (y1(a), a === n) {
            it = null;
            break e;
          }
          if (r !== null) {
            r.return = c, it = r;
            break e;
          }
          it = c;
        }
    }
  }
  var Xp = {
    getCacheForType: function(e) {
      var t = vt(Fe), n = t.data.get(e);
      return n === void 0 && (n = e(), t.data.set(e, n)), n;
    }
  }, Zp = typeof WeakMap == "function" ? WeakMap : Map, Ae = 0, Ue = null, Se = null, Ce = 0, je = 0, Ot = null, Kn = !1, dl = !1, uc = !1, jn = 0, $e = 0, Jn = 0, ka = 0, fc = 0, Xt = 0, hl = 0, yi = null, Mt = null, dc = !1, hc = 0, Rr = 1 / 0, Dr = null, Pn = null, ut = 0, Wn = null, ml = null, pl = 0, mc = 0, pc = null, j1 = null, xi = 0, vc = null;
  function Ut() {
    if ((Ae & 2) !== 0 && Ce !== 0)
      return Ce & -Ce;
    if (R.T !== null) {
      var e = nl;
      return e !== 0 ? e : wc();
    }
    return ma();
  }
  function k1() {
    Xt === 0 && (Xt = (Ce & 536870912) === 0 || Te ? Wt() : 536870912);
    var e = Qt.current;
    return e !== null && (e.flags |= 32), Xt;
  }
  function Lt(e, t, n) {
    (e === Ue && (je === 2 || je === 9) || e.cancelPendingCommit !== null) && (vl(e, 0), In(
      e,
      Ce,
      Xt,
      !1
    )), Un(e, n), ((Ae & 2) === 0 || e !== Ue) && (e === Ue && ((Ae & 2) === 0 && (ka |= n), $e === 4 && In(
      e,
      Ce,
      Xt,
      !1
    )), cn(e));
  }
  function N1(e, t, n) {
    if ((Ae & 6) !== 0) throw Error(s(327));
    var a = !n && (t & 124) === 0 && (t & e.expiredLanes) === 0 || ha(e, t), r = a ? Pp(e, t) : yc(e, t, !0), c = a;
    do {
      if (r === 0) {
        dl && !a && In(e, t, 0, !1);
        break;
      } else {
        if (n = e.current.alternate, c && !Kp(n)) {
          r = yc(e, t, !1), c = !1;
          continue;
        }
        if (r === 2) {
          if (c = t, e.errorRecoveryDisabledLanes & c)
            var d = 0;
          else
            d = e.pendingLanes & -536870913, d = d !== 0 ? d : d & 536870912 ? 536870912 : 0;
          if (d !== 0) {
            t = d;
            e: {
              var b = e;
              r = yi;
              var w = b.current.memoizedState.isDehydrated;
              if (w && (vl(b, d).flags |= 256), d = yc(
                b,
                d,
                !1
              ), d !== 2) {
                if (uc && !w) {
                  b.errorRecoveryDisabledLanes |= c, ka |= c, r = 4;
                  break e;
                }
                c = Mt, Mt = r, c !== null && (Mt === null ? Mt = c : Mt.push.apply(
                  Mt,
                  c
                ));
              }
              r = d;
            }
            if (c = !1, r !== 2) continue;
          }
        }
        if (r === 1) {
          vl(e, 0), In(e, t, 0, !0);
          break;
        }
        e: {
          switch (a = e, c = r, c) {
            case 0:
            case 1:
              throw Error(s(345));
            case 4:
              if ((t & 4194048) !== t) break;
            case 6:
              In(
                a,
                t,
                Xt,
                !Kn
              );
              break e;
            case 2:
              Mt = null;
              break;
            case 3:
            case 5:
              break;
            default:
              throw Error(s(329));
          }
          if ((t & 62914560) === t && (r = hc + 300 - pt(), 10 < r)) {
            if (In(
              a,
              t,
              Xt,
              !Kn
            ), da(a, 0, !0) !== 0) break e;
            a.timeoutHandle = r0(
              R1.bind(
                null,
                a,
                n,
                Mt,
                Dr,
                dc,
                t,
                Xt,
                ka,
                hl,
                Kn,
                c,
                2,
                -0,
                0
              ),
              r
            );
            break e;
          }
          R1(
            a,
            n,
            Mt,
            Dr,
            dc,
            t,
            Xt,
            ka,
            hl,
            Kn,
            c,
            0,
            -0,
            0
          );
        }
      }
      break;
    } while (!0);
    cn(e);
  }
  function R1(e, t, n, a, r, c, d, b, w, N, B, V, D, z) {
    if (e.timeoutHandle = -1, V = t.subtreeFlags, (V & 8192 || (V & 16785408) === 16785408) && (Mi = { stylesheets: null, count: 0, unsuspend: jv }, E1(t), V = Nv(), V !== null)) {
      e.cancelPendingCommit = V(
        H1.bind(
          null,
          e,
          t,
          c,
          n,
          a,
          r,
          d,
          b,
          w,
          B,
          1,
          D,
          z
        )
      ), In(e, c, d, !N);
      return;
    }
    H1(
      e,
      t,
      c,
      n,
      a,
      r,
      d,
      b,
      w
    );
  }
  function Kp(e) {
    for (var t = e; ; ) {
      var n = t.tag;
      if ((n === 0 || n === 11 || n === 15) && t.flags & 16384 && (n = t.updateQueue, n !== null && (n = n.stores, n !== null)))
        for (var a = 0; a < n.length; a++) {
          var r = n[a], c = r.getSnapshot;
          r = r.value;
          try {
            if (!Nt(c(), r)) return !1;
          } catch {
            return !1;
          }
        }
      if (n = t.child, t.subtreeFlags & 16384 && n !== null)
        n.return = t, t = n;
      else {
        if (t === e) break;
        for (; t.sibling === null; ) {
          if (t.return === null || t.return === e) return !0;
          t = t.return;
        }
        t.sibling.return = t.return, t = t.sibling;
      }
    }
    return !0;
  }
  function In(e, t, n, a) {
    t &= ~fc, t &= ~ka, e.suspendedLanes |= t, e.pingedLanes &= ~t, a && (e.warmLanes |= t), a = e.expirationTimes;
    for (var r = t; 0 < r; ) {
      var c = 31 - ot(r), d = 1 << c;
      a[c] = -1, r &= ~d;
    }
    n !== 0 && he(e, n, t);
  }
  function zr() {
    return (Ae & 6) === 0 ? (Si(0), !1) : !0;
  }
  function gc() {
    if (Se !== null) {
      if (je === 0)
        var e = Se.return;
      else
        e = Se, Sn = Ca = null, zs(e), sl = null, fi = 0, e = Se;
      for (; e !== null; )
        f1(e.alternate, e), e = e.return;
      Se = null;
    }
  }
  function vl(e, t) {
    var n = e.timeoutHandle;
    n !== -1 && (e.timeoutHandle = -1, dv(n)), n = e.cancelPendingCommit, n !== null && (e.cancelPendingCommit = null, n()), gc(), Ue = e, Se = n = bn(e.current, null), Ce = t, je = 0, Ot = null, Kn = !1, dl = ha(e, t), uc = !1, hl = Xt = fc = ka = Jn = $e = 0, Mt = yi = null, dc = !1, (t & 8) !== 0 && (t |= t & 32);
    var a = e.entangledLanes;
    if (a !== 0)
      for (e = e.entanglements, a &= t; 0 < a; ) {
        var r = 31 - ot(a), c = 1 << r;
        t |= e[r], a &= ~c;
      }
    return jn = t, nr(), n;
  }
  function D1(e, t) {
    ge = null, R.H = Sr, t === ni || t === fr ? (t = Pf(), je = 3) : t === Zf ? (t = Pf(), je = 4) : je = t === Wd ? 8 : t !== null && typeof t == "object" && typeof t.then == "function" ? 6 : 1, Ot = t, Se === null && ($e = 1, Tr(
      e,
      Vt(t, e.current)
    ));
  }
  function z1() {
    var e = R.H;
    return R.H = Sr, e === null ? Sr : e;
  }
  function O1() {
    var e = R.A;
    return R.A = Xp, e;
  }
  function bc() {
    $e = 4, Kn || (Ce & 4194048) !== Ce && Qt.current !== null || (dl = !0), (Jn & 134217727) === 0 && (ka & 134217727) === 0 || Ue === null || In(
      Ue,
      Ce,
      Xt,
      !1
    );
  }
  function yc(e, t, n) {
    var a = Ae;
    Ae |= 2;
    var r = z1(), c = O1();
    (Ue !== e || Ce !== t) && (Dr = null, vl(e, t)), t = !1;
    var d = $e;
    e: do
      try {
        if (je !== 0 && Se !== null) {
          var b = Se, w = Ot;
          switch (je) {
            case 8:
              gc(), d = 6;
              break e;
            case 3:
            case 2:
            case 9:
            case 6:
              Qt.current === null && (t = !0);
              var N = je;
              if (je = 0, Ot = null, gl(e, b, w, N), n && dl) {
                d = 0;
                break e;
              }
              break;
            default:
              N = je, je = 0, Ot = null, gl(e, b, w, N);
          }
        }
        Jp(), d = $e;
        break;
      } catch (B) {
        D1(e, B);
      }
    while (!0);
    return t && e.shellSuspendCounter++, Sn = Ca = null, Ae = a, R.H = r, R.A = c, Se === null && (Ue = null, Ce = 0, nr()), d;
  }
  function Jp() {
    for (; Se !== null; ) U1(Se);
  }
  function Pp(e, t) {
    var n = Ae;
    Ae |= 2;
    var a = z1(), r = O1();
    Ue !== e || Ce !== t ? (Dr = null, Rr = pt() + 500, vl(e, t)) : dl = ha(
      e,
      t
    );
    e: do
      try {
        if (je !== 0 && Se !== null) {
          t = Se;
          var c = Ot;
          t: switch (je) {
            case 1:
              je = 0, Ot = null, gl(e, t, c, 1);
              break;
            case 2:
            case 9:
              if (Kf(c)) {
                je = 0, Ot = null, L1(t);
                break;
              }
              t = function() {
                je !== 2 && je !== 9 || Ue !== e || (je = 7), cn(e);
              }, c.then(t, t);
              break e;
            case 3:
              je = 7;
              break e;
            case 4:
              je = 5;
              break e;
            case 7:
              Kf(c) ? (je = 0, Ot = null, L1(t)) : (je = 0, Ot = null, gl(e, t, c, 7));
              break;
            case 5:
              var d = null;
              switch (Se.tag) {
                case 26:
                  d = Se.memoizedState;
                case 5:
                case 27:
                  var b = Se;
                  if (!d || b0(d)) {
                    je = 0, Ot = null;
                    var w = b.sibling;
                    if (w !== null) Se = w;
                    else {
                      var N = b.return;
                      N !== null ? (Se = N, Or(N)) : Se = null;
                    }
                    break t;
                  }
              }
              je = 0, Ot = null, gl(e, t, c, 5);
              break;
            case 6:
              je = 0, Ot = null, gl(e, t, c, 6);
              break;
            case 8:
              gc(), $e = 6;
              break e;
            default:
              throw Error(s(462));
          }
        }
        Wp();
        break;
      } catch (B) {
        D1(e, B);
      }
    while (!0);
    return Sn = Ca = null, R.H = a, R.A = r, Ae = n, Se !== null ? 0 : (Ue = null, Ce = 0, nr(), $e);
  }
  function Wp() {
    for (; Se !== null && !Uo(); )
      U1(Se);
  }
  function U1(e) {
    var t = c1(e.alternate, e, jn);
    e.memoizedProps = e.pendingProps, t === null ? Or(e) : Se = t;
  }
  function L1(e) {
    var t = e, n = t.alternate;
    switch (t.tag) {
      case 15:
      case 0:
        t = a1(
          n,
          t,
          t.pendingProps,
          t.type,
          void 0,
          Ce
        );
        break;
      case 11:
        t = a1(
          n,
          t,
          t.pendingProps,
          t.type.render,
          t.ref,
          Ce
        );
        break;
      case 5:
        zs(t);
      default:
        f1(n, t), t = Se = Bf(t, jn), t = c1(n, t, jn);
    }
    e.memoizedProps = e.pendingProps, t === null ? Or(e) : Se = t;
  }
  function gl(e, t, n, a) {
    Sn = Ca = null, zs(t), sl = null, fi = 0;
    var r = t.return;
    try {
      if ($p(
        e,
        r,
        t,
        n,
        Ce
      )) {
        $e = 1, Tr(
          e,
          Vt(n, e.current)
        ), Se = null;
        return;
      }
    } catch (c) {
      if (r !== null) throw Se = r, c;
      $e = 1, Tr(
        e,
        Vt(n, e.current)
      ), Se = null;
      return;
    }
    t.flags & 32768 ? (Te || a === 1 ? e = !0 : dl || (Ce & 536870912) !== 0 ? e = !1 : (Kn = e = !0, (a === 2 || a === 9 || a === 3 || a === 6) && (a = Qt.current, a !== null && a.tag === 13 && (a.flags |= 16384))), B1(t, e)) : Or(t);
  }
  function Or(e) {
    var t = e;
    do {
      if ((t.flags & 32768) !== 0) {
        B1(
          t,
          Kn
        );
        return;
      }
      e = t.return;
      var n = qp(
        t.alternate,
        t,
        jn
      );
      if (n !== null) {
        Se = n;
        return;
      }
      if (t = t.sibling, t !== null) {
        Se = t;
        return;
      }
      Se = t = e;
    } while (t !== null);
    $e === 0 && ($e = 5);
  }
  function B1(e, t) {
    do {
      var n = Gp(e.alternate, e);
      if (n !== null) {
        n.flags &= 32767, Se = n;
        return;
      }
      if (n = e.return, n !== null && (n.flags |= 32768, n.subtreeFlags = 0, n.deletions = null), !t && (e = e.sibling, e !== null)) {
        Se = e;
        return;
      }
      Se = e = n;
    } while (e !== null);
    $e = 6, Se = null;
  }
  function H1(e, t, n, a, r, c, d, b, w) {
    e.cancelPendingCommit = null;
    do
      Ur();
    while (ut !== 0);
    if ((Ae & 6) !== 0) throw Error(s(327));
    if (t !== null) {
      if (t === e.current) throw Error(s(177));
      if (c = t.lanes | t.childLanes, c |= cs, Yi(
        e,
        n,
        c,
        d,
        b,
        w
      ), e === Ue && (Se = Ue = null, Ce = 0), ml = t, Wn = e, pl = n, mc = c, pc = r, j1 = a, (t.subtreeFlags & 10256) !== 0 || (t.flags & 10256) !== 0 ? (e.callbackNode = null, e.callbackPriority = 0, tv(Oa, function() {
        return Y1(), null;
      })) : (e.callbackNode = null, e.callbackPriority = 0), a = (t.flags & 13878) !== 0, (t.subtreeFlags & 13878) !== 0 || a) {
        a = R.T, R.T = null, r = Q.p, Q.p = 2, d = Ae, Ae |= 4;
        try {
          Yp(e, t, n);
        } finally {
          Ae = d, Q.p = r, R.T = a;
        }
      }
      ut = 1, $1(), V1(), q1();
    }
  }
  function $1() {
    if (ut === 1) {
      ut = 0;
      var e = Wn, t = ml, n = (t.flags & 13878) !== 0;
      if ((t.subtreeFlags & 13878) !== 0 || n) {
        n = R.T, R.T = null;
        var a = Q.p;
        Q.p = 2;
        var r = Ae;
        Ae |= 4;
        try {
          _1(t, e);
          var c = Nc, d = Af(e.containerInfo), b = c.focusedElem, w = c.selectionRange;
          if (d !== b && b && b.ownerDocument && Mf(
            b.ownerDocument.documentElement,
            b
          )) {
            if (w !== null && ls(b)) {
              var N = w.start, B = w.end;
              if (B === void 0 && (B = N), "selectionStart" in b)
                b.selectionStart = N, b.selectionEnd = Math.min(
                  B,
                  b.value.length
                );
              else {
                var V = b.ownerDocument || document, D = V && V.defaultView || window;
                if (D.getSelection) {
                  var z = D.getSelection(), de = b.textContent.length, se = Math.min(w.start, de), Re = w.end === void 0 ? se : Math.min(w.end, de);
                  !z.extend && se > Re && (d = Re, Re = se, se = d);
                  var T = Tf(
                    b,
                    se
                  ), E = Tf(
                    b,
                    Re
                  );
                  if (T && E && (z.rangeCount !== 1 || z.anchorNode !== T.node || z.anchorOffset !== T.offset || z.focusNode !== E.node || z.focusOffset !== E.offset)) {
                    var k = V.createRange();
                    k.setStart(T.node, T.offset), z.removeAllRanges(), se > Re ? (z.addRange(k), z.extend(E.node, E.offset)) : (k.setEnd(E.node, E.offset), z.addRange(k));
                  }
                }
              }
            }
            for (V = [], z = b; z = z.parentNode; )
              z.nodeType === 1 && V.push({
                element: z,
                left: z.scrollLeft,
                top: z.scrollTop
              });
            for (typeof b.focus == "function" && b.focus(), b = 0; b < V.length; b++) {
              var H = V[b];
              H.element.scrollLeft = H.left, H.element.scrollTop = H.top;
            }
          }
          Kr = !!kc, Nc = kc = null;
        } finally {
          Ae = r, Q.p = a, R.T = n;
        }
      }
      e.current = t, ut = 2;
    }
  }
  function V1() {
    if (ut === 2) {
      ut = 0;
      var e = Wn, t = ml, n = (t.flags & 8772) !== 0;
      if ((t.subtreeFlags & 8772) !== 0 || n) {
        n = R.T, R.T = null;
        var a = Q.p;
        Q.p = 2;
        var r = Ae;
        Ae |= 4;
        try {
          b1(e, t.alternate, t);
        } finally {
          Ae = r, Q.p = a, R.T = n;
        }
      }
      ut = 3;
    }
  }
  function q1() {
    if (ut === 4 || ut === 3) {
      ut = 0, Hi();
      var e = Wn, t = ml, n = pl, a = j1;
      (t.subtreeFlags & 10256) !== 0 || (t.flags & 10256) !== 0 ? ut = 5 : (ut = 0, ml = Wn = null, G1(e, e.pendingLanes));
      var r = e.pendingLanes;
      if (r === 0 && (Pn = null), st(n), t = t.stateNode, St && typeof St.onCommitFiberRoot == "function")
        try {
          St.onCommitFiberRoot(
            nn,
            t,
            void 0,
            (t.current.flags & 128) === 128
          );
        } catch {
        }
      if (a !== null) {
        t = R.T, r = Q.p, Q.p = 2, R.T = null;
        try {
          for (var c = e.onRecoverableError, d = 0; d < a.length; d++) {
            var b = a[d];
            c(b.value, {
              componentStack: b.stack
            });
          }
        } finally {
          R.T = t, Q.p = r;
        }
      }
      (pl & 3) !== 0 && Ur(), cn(e), r = e.pendingLanes, (n & 4194090) !== 0 && (r & 42) !== 0 ? e === vc ? xi++ : (xi = 0, vc = e) : xi = 0, Si(0);
    }
  }
  function G1(e, t) {
    (e.pooledCacheLanes &= t) === 0 && (t = e.pooledCache, t != null && (e.pooledCache = null, ei(t)));
  }
  function Ur(e) {
    return $1(), V1(), q1(), Y1();
  }
  function Y1() {
    if (ut !== 5) return !1;
    var e = Wn, t = mc;
    mc = 0;
    var n = st(pl), a = R.T, r = Q.p;
    try {
      Q.p = 32 > n ? 32 : n, R.T = null, n = pc, pc = null;
      var c = Wn, d = pl;
      if (ut = 0, ml = Wn = null, pl = 0, (Ae & 6) !== 0) throw Error(s(331));
      var b = Ae;
      if (Ae |= 4, M1(c.current), C1(
        c,
        c.current,
        d,
        n
      ), Ae = b, Si(0, !1), St && typeof St.onPostCommitFiberRoot == "function")
        try {
          St.onPostCommitFiberRoot(nn, c);
        } catch {
        }
      return !0;
    } finally {
      Q.p = r, R.T = a, G1(e, t);
    }
  }
  function Q1(e, t, n) {
    t = Vt(n, t), t = Ks(e.stateNode, t, 2), e = Vn(e, t, 2), e !== null && (Un(e, 2), cn(e));
  }
  function ze(e, t, n) {
    if (e.tag === 3)
      Q1(e, e, n);
    else
      for (; t !== null; ) {
        if (t.tag === 3) {
          Q1(
            t,
            e,
            n
          );
          break;
        } else if (t.tag === 1) {
          var a = t.stateNode;
          if (typeof t.type.getDerivedStateFromError == "function" || typeof a.componentDidCatch == "function" && (Pn === null || !Pn.has(a))) {
            e = Vt(n, e), n = Jd(2), a = Vn(t, n, 2), a !== null && (Pd(
              n,
              a,
              t,
              e
            ), Un(a, 2), cn(a));
            break;
          }
        }
        t = t.return;
      }
  }
  function xc(e, t, n) {
    var a = e.pingCache;
    if (a === null) {
      a = e.pingCache = new Zp();
      var r = /* @__PURE__ */ new Set();
      a.set(t, r);
    } else
      r = a.get(t), r === void 0 && (r = /* @__PURE__ */ new Set(), a.set(t, r));
    r.has(n) || (uc = !0, r.add(n), e = Ip.bind(null, e, t, n), t.then(e, e));
  }
  function Ip(e, t, n) {
    var a = e.pingCache;
    a !== null && a.delete(t), e.pingedLanes |= e.suspendedLanes & n, e.warmLanes &= ~n, Ue === e && (Ce & n) === n && ($e === 4 || $e === 3 && (Ce & 62914560) === Ce && 300 > pt() - hc ? (Ae & 2) === 0 && vl(e, 0) : fc |= n, hl === Ce && (hl = 0)), cn(e);
  }
  function X1(e, t) {
    t === 0 && (t = Gi()), e = Ia(e, t), e !== null && (Un(e, t), cn(e));
  }
  function Fp(e) {
    var t = e.memoizedState, n = 0;
    t !== null && (n = t.retryLane), X1(e, n);
  }
  function ev(e, t) {
    var n = 0;
    switch (e.tag) {
      case 13:
        var a = e.stateNode, r = e.memoizedState;
        r !== null && (n = r.retryLane);
        break;
      case 19:
        a = e.stateNode;
        break;
      case 22:
        a = e.stateNode._retryCache;
        break;
      default:
        throw Error(s(314));
    }
    a !== null && a.delete(t), X1(e, n);
  }
  function tv(e, t) {
    return Ul(e, t);
  }
  var Lr = null, bl = null, Sc = !1, Br = !1, _c = !1, Na = 0;
  function cn(e) {
    e !== bl && e.next === null && (bl === null ? Lr = bl = e : bl = bl.next = e), Br = !0, Sc || (Sc = !0, av());
  }
  function Si(e, t) {
    if (!_c && Br) {
      _c = !0;
      do
        for (var n = !1, a = Lr; a !== null; ) {
          if (e !== 0) {
            var r = a.pendingLanes;
            if (r === 0) var c = 0;
            else {
              var d = a.suspendedLanes, b = a.pingedLanes;
              c = (1 << 31 - ot(42 | e) + 1) - 1, c &= r & ~(d & ~b), c = c & 201326741 ? c & 201326741 | 1 : c ? c | 2 : 0;
            }
            c !== 0 && (n = !0, P1(a, c));
          } else
            c = Ce, c = da(
              a,
              a === Ue ? c : 0,
              a.cancelPendingCommit !== null || a.timeoutHandle !== -1
            ), (c & 3) === 0 || ha(a, c) || (n = !0, P1(a, c));
          a = a.next;
        }
      while (n);
      _c = !1;
    }
  }
  function nv() {
    Z1();
  }
  function Z1() {
    Br = Sc = !1;
    var e = 0;
    Na !== 0 && (fv() && (e = Na), Na = 0);
    for (var t = pt(), n = null, a = Lr; a !== null; ) {
      var r = a.next, c = K1(a, t);
      c === 0 ? (a.next = null, n === null ? Lr = r : n.next = r, r === null && (bl = n)) : (n = a, (e !== 0 || (c & 3) !== 0) && (Br = !0)), a = r;
    }
    Si(e);
  }
  function K1(e, t) {
    for (var n = e.suspendedLanes, a = e.pingedLanes, r = e.expirationTimes, c = e.pendingLanes & -62914561; 0 < c; ) {
      var d = 31 - ot(c), b = 1 << d, w = r[d];
      w === -1 ? ((b & n) === 0 || (b & a) !== 0) && (r[d] = Ll(b, t)) : w <= t && (e.expiredLanes |= b), c &= ~b;
    }
    if (t = Ue, n = Ce, n = da(
      e,
      e === t ? n : 0,
      e.cancelPendingCommit !== null || e.timeoutHandle !== -1
    ), a = e.callbackNode, n === 0 || e === t && (je === 2 || je === 9) || e.cancelPendingCommit !== null)
      return a !== null && a !== null && fa(a), e.callbackNode = null, e.callbackPriority = 0;
    if ((n & 3) === 0 || ha(e, n)) {
      if (t = n & -n, t === e.callbackPriority) return t;
      switch (a !== null && fa(a), st(n)) {
        case 2:
        case 8:
          n = Vi;
          break;
        case 32:
          n = Oa;
          break;
        case 268435456:
          n = mn;
          break;
        default:
          n = Oa;
      }
      return a = J1.bind(null, e), n = Ul(n, a), e.callbackPriority = t, e.callbackNode = n, t;
    }
    return a !== null && a !== null && fa(a), e.callbackPriority = 2, e.callbackNode = null, 2;
  }
  function J1(e, t) {
    if (ut !== 0 && ut !== 5)
      return e.callbackNode = null, e.callbackPriority = 0, null;
    var n = e.callbackNode;
    if (Ur() && e.callbackNode !== n)
      return null;
    var a = Ce;
    return a = da(
      e,
      e === Ue ? a : 0,
      e.cancelPendingCommit !== null || e.timeoutHandle !== -1
    ), a === 0 ? null : (N1(e, a, t), K1(e, pt()), e.callbackNode != null && e.callbackNode === n ? J1.bind(null, e) : null);
  }
  function P1(e, t) {
    if (Ur()) return null;
    N1(e, t, !0);
  }
  function av() {
    hv(function() {
      (Ae & 6) !== 0 ? Ul(
        Bt,
        nv
      ) : Z1();
    });
  }
  function wc() {
    return Na === 0 && (Na = Wt()), Na;
  }
  function W1(e) {
    return e == null || typeof e == "symbol" || typeof e == "boolean" ? null : typeof e == "function" ? e : Ji("" + e);
  }
  function I1(e, t) {
    var n = t.ownerDocument.createElement("input");
    return n.name = t.name, n.value = t.value, e.id && n.setAttribute("form", e.id), t.parentNode.insertBefore(n, t), e = new FormData(e), n.parentNode.removeChild(n), e;
  }
  function lv(e, t, n, a, r) {
    if (t === "submit" && n && n.stateNode === r) {
      var c = W1(
        (r[Oe] || null).action
      ), d = a.submitter;
      d && (t = (t = d[Oe] || null) ? W1(t.formAction) : d.getAttribute("formAction"), t !== null && (c = t, d = null));
      var b = new Fi(
        "action",
        "action",
        null,
        a,
        r
      );
      e.push({
        event: b,
        listeners: [
          {
            instance: null,
            listener: function() {
              if (a.defaultPrevented) {
                if (Na !== 0) {
                  var w = d ? I1(r, d) : new FormData(r);
                  Gs(
                    n,
                    {
                      pending: !0,
                      data: w,
                      method: r.method,
                      action: c
                    },
                    null,
                    w
                  );
                }
              } else
                typeof c == "function" && (b.preventDefault(), w = d ? I1(r, d) : new FormData(r), Gs(
                  n,
                  {
                    pending: !0,
                    data: w,
                    method: r.method,
                    action: c
                  },
                  c,
                  w
                ));
            },
            currentTarget: r
          }
        ]
      });
    }
  }
  for (var Cc = 0; Cc < ss.length; Cc++) {
    var Ec = ss[Cc], iv = Ec.toLowerCase(), rv = Ec[0].toUpperCase() + Ec.slice(1);
    It(
      iv,
      "on" + rv
    );
  }
  It(Nf, "onAnimationEnd"), It(Rf, "onAnimationIteration"), It(Df, "onAnimationStart"), It("dblclick", "onDoubleClick"), It("focusin", "onFocus"), It("focusout", "onBlur"), It(wp, "onTransitionRun"), It(Cp, "onTransitionStart"), It(Ep, "onTransitionCancel"), It(zf, "onTransitionEnd"), qa("onMouseEnter", ["mouseout", "mouseover"]), qa("onMouseLeave", ["mouseout", "mouseover"]), qa("onPointerEnter", ["pointerout", "pointerover"]), qa("onPointerLeave", ["pointerout", "pointerover"]), pa(
    "onChange",
    "change click focusin focusout input keydown keyup selectionchange".split(" ")
  ), pa(
    "onSelect",
    "focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(
      " "
    )
  ), pa("onBeforeInput", [
    "compositionend",
    "keypress",
    "textInput",
    "paste"
  ]), pa(
    "onCompositionEnd",
    "compositionend focusout keydown keypress keyup mousedown".split(" ")
  ), pa(
    "onCompositionStart",
    "compositionstart focusout keydown keypress keyup mousedown".split(" ")
  ), pa(
    "onCompositionUpdate",
    "compositionupdate focusout keydown keypress keyup mousedown".split(" ")
  );
  var _i = "abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(
    " "
  ), ov = new Set(
    "beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(_i)
  );
  function F1(e, t) {
    t = (t & 4) !== 0;
    for (var n = 0; n < e.length; n++) {
      var a = e[n], r = a.event;
      a = a.listeners;
      e: {
        var c = void 0;
        if (t)
          for (var d = a.length - 1; 0 <= d; d--) {
            var b = a[d], w = b.instance, N = b.currentTarget;
            if (b = b.listener, w !== c && r.isPropagationStopped())
              break e;
            c = b, r.currentTarget = N;
            try {
              c(r);
            } catch (B) {
              Er(B);
            }
            r.currentTarget = null, c = w;
          }
        else
          for (d = 0; d < a.length; d++) {
            if (b = a[d], w = b.instance, N = b.currentTarget, b = b.listener, w !== c && r.isPropagationStopped())
              break e;
            c = b, r.currentTarget = N;
            try {
              c(r);
            } catch (B) {
              Er(B);
            }
            r.currentTarget = null, c = w;
          }
      }
    }
  }
  function _e(e, t) {
    var n = t[Ba];
    n === void 0 && (n = t[Ba] = /* @__PURE__ */ new Set());
    var a = e + "__bubble";
    n.has(a) || (e0(t, e, 2, !1), n.add(a));
  }
  function Tc(e, t, n) {
    var a = 0;
    t && (a |= 4), e0(
      n,
      e,
      a,
      t
    );
  }
  var Hr = "_reactListening" + Math.random().toString(36).slice(2);
  function Mc(e) {
    if (!e[Hr]) {
      e[Hr] = !0, Xu.forEach(function(n) {
        n !== "selectionchange" && (ov.has(n) || Tc(n, !1, e), Tc(n, !0, e));
      });
      var t = e.nodeType === 9 ? e : e.ownerDocument;
      t === null || t[Hr] || (t[Hr] = !0, Tc("selectionchange", !1, t));
    }
  }
  function e0(e, t, n, a) {
    switch (C0(t)) {
      case 2:
        var r = zv;
        break;
      case 8:
        r = Ov;
        break;
      default:
        r = Vc;
    }
    n = r.bind(
      null,
      t,
      n,
      e
    ), r = void 0, !Jo || t !== "touchstart" && t !== "touchmove" && t !== "wheel" || (r = !0), a ? r !== void 0 ? e.addEventListener(t, n, {
      capture: !0,
      passive: r
    }) : e.addEventListener(t, n, !0) : r !== void 0 ? e.addEventListener(t, n, {
      passive: r
    }) : e.addEventListener(t, n, !1);
  }
  function Ac(e, t, n, a, r) {
    var c = a;
    if ((t & 1) === 0 && (t & 2) === 0 && a !== null)
      e: for (; ; ) {
        if (a === null) return;
        var d = a.tag;
        if (d === 3 || d === 4) {
          var b = a.stateNode.containerInfo;
          if (b === r) break;
          if (d === 4)
            for (d = a.return; d !== null; ) {
              var w = d.tag;
              if ((w === 3 || w === 4) && d.stateNode.containerInfo === r)
                return;
              d = d.return;
            }
          for (; b !== null; ) {
            if (d = Ha(b), d === null) return;
            if (w = d.tag, w === 5 || w === 6 || w === 26 || w === 27) {
              a = c = d;
              continue e;
            }
            b = b.parentNode;
          }
        }
        a = a.return;
      }
    of(function() {
      var N = c, B = Zo(n), V = [];
      e: {
        var D = Of.get(e);
        if (D !== void 0) {
          var z = Fi, de = e;
          switch (e) {
            case "keypress":
              if (Wi(n) === 0) break e;
            case "keydown":
            case "keyup":
              z = tp;
              break;
            case "focusin":
              de = "focus", z = Fo;
              break;
            case "focusout":
              de = "blur", z = Fo;
              break;
            case "beforeblur":
            case "afterblur":
              z = Fo;
              break;
            case "click":
              if (n.button === 2) break e;
            case "auxclick":
            case "dblclick":
            case "mousedown":
            case "mousemove":
            case "mouseup":
            case "mouseout":
            case "mouseover":
            case "contextmenu":
              z = uf;
              break;
            case "drag":
            case "dragend":
            case "dragenter":
            case "dragexit":
            case "dragleave":
            case "dragover":
            case "dragstart":
            case "drop":
              z = Gm;
              break;
            case "touchcancel":
            case "touchend":
            case "touchmove":
            case "touchstart":
              z = lp;
              break;
            case Nf:
            case Rf:
            case Df:
              z = Xm;
              break;
            case zf:
              z = rp;
              break;
            case "scroll":
            case "scrollend":
              z = Vm;
              break;
            case "wheel":
              z = sp;
              break;
            case "copy":
            case "cut":
            case "paste":
              z = Km;
              break;
            case "gotpointercapture":
            case "lostpointercapture":
            case "pointercancel":
            case "pointerdown":
            case "pointermove":
            case "pointerout":
            case "pointerover":
            case "pointerup":
              z = df;
              break;
            case "toggle":
            case "beforetoggle":
              z = up;
          }
          var se = (t & 4) !== 0, Re = !se && (e === "scroll" || e === "scrollend"), T = se ? D !== null ? D + "Capture" : null : D;
          se = [];
          for (var E = N, k; E !== null; ) {
            var H = E;
            if (k = H.stateNode, H = H.tag, H !== 5 && H !== 26 && H !== 27 || k === null || T === null || (H = Vl(E, T), H != null && se.push(
              wi(E, H, k)
            )), Re) break;
            E = E.return;
          }
          0 < se.length && (D = new z(
            D,
            de,
            null,
            n,
            B
          ), V.push({ event: D, listeners: se }));
        }
      }
      if ((t & 7) === 0) {
        e: {
          if (D = e === "mouseover" || e === "pointerover", z = e === "mouseout" || e === "pointerout", D && n !== Xo && (de = n.relatedTarget || n.fromElement) && (Ha(de) || de[nt]))
            break e;
          if ((z || D) && (D = B.window === B ? B : (D = B.ownerDocument) ? D.defaultView || D.parentWindow : window, z ? (de = n.relatedTarget || n.toElement, z = N, de = de ? Ha(de) : null, de !== null && (Re = u(de), se = de.tag, de !== Re || se !== 5 && se !== 27 && se !== 6) && (de = null)) : (z = null, de = N), z !== de)) {
            if (se = uf, H = "onMouseLeave", T = "onMouseEnter", E = "mouse", (e === "pointerout" || e === "pointerover") && (se = df, H = "onPointerLeave", T = "onPointerEnter", E = "pointer"), Re = z == null ? D : $l(z), k = de == null ? D : $l(de), D = new se(
              H,
              E + "leave",
              z,
              n,
              B
            ), D.target = Re, D.relatedTarget = k, H = null, Ha(B) === N && (se = new se(
              T,
              E + "enter",
              de,
              n,
              B
            ), se.target = k, se.relatedTarget = Re, H = se), Re = H, z && de)
              t: {
                for (se = z, T = de, E = 0, k = se; k; k = yl(k))
                  E++;
                for (k = 0, H = T; H; H = yl(H))
                  k++;
                for (; 0 < E - k; )
                  se = yl(se), E--;
                for (; 0 < k - E; )
                  T = yl(T), k--;
                for (; E--; ) {
                  if (se === T || T !== null && se === T.alternate)
                    break t;
                  se = yl(se), T = yl(T);
                }
                se = null;
              }
            else se = null;
            z !== null && t0(
              V,
              D,
              z,
              se,
              !1
            ), de !== null && Re !== null && t0(
              V,
              Re,
              de,
              se,
              !0
            );
          }
        }
        e: {
          if (D = N ? $l(N) : window, z = D.nodeName && D.nodeName.toLowerCase(), z === "select" || z === "input" && D.type === "file")
            var te = xf;
          else if (bf(D))
            if (Sf)
              te = xp;
            else {
              te = bp;
              var xe = gp;
            }
          else
            z = D.nodeName, !z || z.toLowerCase() !== "input" || D.type !== "checkbox" && D.type !== "radio" ? N && Qo(N.elementType) && (te = xf) : te = yp;
          if (te && (te = te(e, N))) {
            yf(
              V,
              te,
              n,
              B
            );
            break e;
          }
          xe && xe(e, D, N), e === "focusout" && N && D.type === "number" && N.memoizedProps.value != null && Yo(D, "number", D.value);
        }
        switch (xe = N ? $l(N) : window, e) {
          case "focusin":
            (bf(xe) || xe.contentEditable === "true") && (Ja = xe, is = N, Jl = null);
            break;
          case "focusout":
            Jl = is = Ja = null;
            break;
          case "mousedown":
            rs = !0;
            break;
          case "contextmenu":
          case "mouseup":
          case "dragend":
            rs = !1, jf(V, n, B);
            break;
          case "selectionchange":
            if (_p) break;
          case "keydown":
          case "keyup":
            jf(V, n, B);
        }
        var re;
        if (ts)
          e: {
            switch (e) {
              case "compositionstart":
                var ue = "onCompositionStart";
                break e;
              case "compositionend":
                ue = "onCompositionEnd";
                break e;
              case "compositionupdate":
                ue = "onCompositionUpdate";
                break e;
            }
            ue = void 0;
          }
        else
          Ka ? vf(e, n) && (ue = "onCompositionEnd") : e === "keydown" && n.keyCode === 229 && (ue = "onCompositionStart");
        ue && (hf && n.locale !== "ko" && (Ka || ue !== "onCompositionStart" ? ue === "onCompositionEnd" && Ka && (re = sf()) : (Ln = B, Po = "value" in Ln ? Ln.value : Ln.textContent, Ka = !0)), xe = $r(N, ue), 0 < xe.length && (ue = new ff(
          ue,
          e,
          null,
          n,
          B
        ), V.push({ event: ue, listeners: xe }), re ? ue.data = re : (re = gf(n), re !== null && (ue.data = re)))), (re = dp ? hp(e, n) : mp(e, n)) && (ue = $r(N, "onBeforeInput"), 0 < ue.length && (xe = new ff(
          "onBeforeInput",
          "beforeinput",
          null,
          n,
          B
        ), V.push({
          event: xe,
          listeners: ue
        }), xe.data = re)), lv(
          V,
          e,
          N,
          n,
          B
        );
      }
      F1(V, t);
    });
  }
  function wi(e, t, n) {
    return {
      instance: e,
      listener: t,
      currentTarget: n
    };
  }
  function $r(e, t) {
    for (var n = t + "Capture", a = []; e !== null; ) {
      var r = e, c = r.stateNode;
      if (r = r.tag, r !== 5 && r !== 26 && r !== 27 || c === null || (r = Vl(e, n), r != null && a.unshift(
        wi(e, r, c)
      ), r = Vl(e, t), r != null && a.push(
        wi(e, r, c)
      )), e.tag === 3) return a;
      e = e.return;
    }
    return [];
  }
  function yl(e) {
    if (e === null) return null;
    do
      e = e.return;
    while (e && e.tag !== 5 && e.tag !== 27);
    return e || null;
  }
  function t0(e, t, n, a, r) {
    for (var c = t._reactName, d = []; n !== null && n !== a; ) {
      var b = n, w = b.alternate, N = b.stateNode;
      if (b = b.tag, w !== null && w === a) break;
      b !== 5 && b !== 26 && b !== 27 || N === null || (w = N, r ? (N = Vl(n, c), N != null && d.unshift(
        wi(n, N, w)
      )) : r || (N = Vl(n, c), N != null && d.push(
        wi(n, N, w)
      ))), n = n.return;
    }
    d.length !== 0 && e.push({ event: t, listeners: d });
  }
  var sv = /\r\n?/g, cv = /\u0000|\uFFFD/g;
  function n0(e) {
    return (typeof e == "string" ? e : "" + e).replace(sv, `
`).replace(cv, "");
  }
  function a0(e, t) {
    return t = n0(t), n0(e) === t;
  }
  function Vr() {
  }
  function Ne(e, t, n, a, r, c) {
    switch (n) {
      case "children":
        typeof a == "string" ? t === "body" || t === "textarea" && a === "" || Qa(e, a) : (typeof a == "number" || typeof a == "bigint") && t !== "body" && Qa(e, "" + a);
        break;
      case "className":
        Xi(e, "class", a);
        break;
      case "tabIndex":
        Xi(e, "tabindex", a);
        break;
      case "dir":
      case "role":
      case "viewBox":
      case "width":
      case "height":
        Xi(e, n, a);
        break;
      case "style":
        lf(e, a, c);
        break;
      case "data":
        if (t !== "object") {
          Xi(e, "data", a);
          break;
        }
      case "src":
      case "href":
        if (a === "" && (t !== "a" || n !== "href")) {
          e.removeAttribute(n);
          break;
        }
        if (a == null || typeof a == "function" || typeof a == "symbol" || typeof a == "boolean") {
          e.removeAttribute(n);
          break;
        }
        a = Ji("" + a), e.setAttribute(n, a);
        break;
      case "action":
      case "formAction":
        if (typeof a == "function") {
          e.setAttribute(
            n,
            "javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')"
          );
          break;
        } else
          typeof c == "function" && (n === "formAction" ? (t !== "input" && Ne(e, t, "name", r.name, r, null), Ne(
            e,
            t,
            "formEncType",
            r.formEncType,
            r,
            null
          ), Ne(
            e,
            t,
            "formMethod",
            r.formMethod,
            r,
            null
          ), Ne(
            e,
            t,
            "formTarget",
            r.formTarget,
            r,
            null
          )) : (Ne(e, t, "encType", r.encType, r, null), Ne(e, t, "method", r.method, r, null), Ne(e, t, "target", r.target, r, null)));
        if (a == null || typeof a == "symbol" || typeof a == "boolean") {
          e.removeAttribute(n);
          break;
        }
        a = Ji("" + a), e.setAttribute(n, a);
        break;
      case "onClick":
        a != null && (e.onclick = Vr);
        break;
      case "onScroll":
        a != null && _e("scroll", e);
        break;
      case "onScrollEnd":
        a != null && _e("scrollend", e);
        break;
      case "dangerouslySetInnerHTML":
        if (a != null) {
          if (typeof a != "object" || !("__html" in a))
            throw Error(s(61));
          if (n = a.__html, n != null) {
            if (r.children != null) throw Error(s(60));
            e.innerHTML = n;
          }
        }
        break;
      case "multiple":
        e.multiple = a && typeof a != "function" && typeof a != "symbol";
        break;
      case "muted":
        e.muted = a && typeof a != "function" && typeof a != "symbol";
        break;
      case "suppressContentEditableWarning":
      case "suppressHydrationWarning":
      case "defaultValue":
      case "defaultChecked":
      case "innerHTML":
      case "ref":
        break;
      case "autoFocus":
        break;
      case "xlinkHref":
        if (a == null || typeof a == "function" || typeof a == "boolean" || typeof a == "symbol") {
          e.removeAttribute("xlink:href");
          break;
        }
        n = Ji("" + a), e.setAttributeNS(
          "http://www.w3.org/1999/xlink",
          "xlink:href",
          n
        );
        break;
      case "contentEditable":
      case "spellCheck":
      case "draggable":
      case "value":
      case "autoReverse":
      case "externalResourcesRequired":
      case "focusable":
      case "preserveAlpha":
        a != null && typeof a != "function" && typeof a != "symbol" ? e.setAttribute(n, "" + a) : e.removeAttribute(n);
        break;
      case "inert":
      case "allowFullScreen":
      case "async":
      case "autoPlay":
      case "controls":
      case "default":
      case "defer":
      case "disabled":
      case "disablePictureInPicture":
      case "disableRemotePlayback":
      case "formNoValidate":
      case "hidden":
      case "loop":
      case "noModule":
      case "noValidate":
      case "open":
      case "playsInline":
      case "readOnly":
      case "required":
      case "reversed":
      case "scoped":
      case "seamless":
      case "itemScope":
        a && typeof a != "function" && typeof a != "symbol" ? e.setAttribute(n, "") : e.removeAttribute(n);
        break;
      case "capture":
      case "download":
        a === !0 ? e.setAttribute(n, "") : a !== !1 && a != null && typeof a != "function" && typeof a != "symbol" ? e.setAttribute(n, a) : e.removeAttribute(n);
        break;
      case "cols":
      case "rows":
      case "size":
      case "span":
        a != null && typeof a != "function" && typeof a != "symbol" && !isNaN(a) && 1 <= a ? e.setAttribute(n, a) : e.removeAttribute(n);
        break;
      case "rowSpan":
      case "start":
        a == null || typeof a == "function" || typeof a == "symbol" || isNaN(a) ? e.removeAttribute(n) : e.setAttribute(n, a);
        break;
      case "popover":
        _e("beforetoggle", e), _e("toggle", e), Qi(e, "popover", a);
        break;
      case "xlinkActuate":
        vn(
          e,
          "http://www.w3.org/1999/xlink",
          "xlink:actuate",
          a
        );
        break;
      case "xlinkArcrole":
        vn(
          e,
          "http://www.w3.org/1999/xlink",
          "xlink:arcrole",
          a
        );
        break;
      case "xlinkRole":
        vn(
          e,
          "http://www.w3.org/1999/xlink",
          "xlink:role",
          a
        );
        break;
      case "xlinkShow":
        vn(
          e,
          "http://www.w3.org/1999/xlink",
          "xlink:show",
          a
        );
        break;
      case "xlinkTitle":
        vn(
          e,
          "http://www.w3.org/1999/xlink",
          "xlink:title",
          a
        );
        break;
      case "xlinkType":
        vn(
          e,
          "http://www.w3.org/1999/xlink",
          "xlink:type",
          a
        );
        break;
      case "xmlBase":
        vn(
          e,
          "http://www.w3.org/XML/1998/namespace",
          "xml:base",
          a
        );
        break;
      case "xmlLang":
        vn(
          e,
          "http://www.w3.org/XML/1998/namespace",
          "xml:lang",
          a
        );
        break;
      case "xmlSpace":
        vn(
          e,
          "http://www.w3.org/XML/1998/namespace",
          "xml:space",
          a
        );
        break;
      case "is":
        Qi(e, "is", a);
        break;
      case "innerText":
      case "textContent":
        break;
      default:
        (!(2 < n.length) || n[0] !== "o" && n[0] !== "O" || n[1] !== "n" && n[1] !== "N") && (n = Hm.get(n) || n, Qi(e, n, a));
    }
  }
  function jc(e, t, n, a, r, c) {
    switch (n) {
      case "style":
        lf(e, a, c);
        break;
      case "dangerouslySetInnerHTML":
        if (a != null) {
          if (typeof a != "object" || !("__html" in a))
            throw Error(s(61));
          if (n = a.__html, n != null) {
            if (r.children != null) throw Error(s(60));
            e.innerHTML = n;
          }
        }
        break;
      case "children":
        typeof a == "string" ? Qa(e, a) : (typeof a == "number" || typeof a == "bigint") && Qa(e, "" + a);
        break;
      case "onScroll":
        a != null && _e("scroll", e);
        break;
      case "onScrollEnd":
        a != null && _e("scrollend", e);
        break;
      case "onClick":
        a != null && (e.onclick = Vr);
        break;
      case "suppressContentEditableWarning":
      case "suppressHydrationWarning":
      case "innerHTML":
      case "ref":
        break;
      case "innerText":
      case "textContent":
        break;
      default:
        if (!Zu.hasOwnProperty(n))
          e: {
            if (n[0] === "o" && n[1] === "n" && (r = n.endsWith("Capture"), t = n.slice(2, r ? n.length - 7 : void 0), c = e[Oe] || null, c = c != null ? c[n] : null, typeof c == "function" && e.removeEventListener(t, c, r), typeof a == "function")) {
              typeof c != "function" && c !== null && (n in e ? e[n] = null : e.hasAttribute(n) && e.removeAttribute(n)), e.addEventListener(t, a, r);
              break e;
            }
            n in e ? e[n] = a : a === !0 ? e.setAttribute(n, "") : Qi(e, n, a);
          }
    }
  }
  function ft(e, t, n) {
    switch (t) {
      case "div":
      case "span":
      case "svg":
      case "path":
      case "a":
      case "g":
      case "p":
      case "li":
        break;
      case "img":
        _e("error", e), _e("load", e);
        var a = !1, r = !1, c;
        for (c in n)
          if (n.hasOwnProperty(c)) {
            var d = n[c];
            if (d != null)
              switch (c) {
                case "src":
                  a = !0;
                  break;
                case "srcSet":
                  r = !0;
                  break;
                case "children":
                case "dangerouslySetInnerHTML":
                  throw Error(s(137, t));
                default:
                  Ne(e, t, c, d, n, null);
              }
          }
        r && Ne(e, t, "srcSet", n.srcSet, n, null), a && Ne(e, t, "src", n.src, n, null);
        return;
      case "input":
        _e("invalid", e);
        var b = c = d = r = null, w = null, N = null;
        for (a in n)
          if (n.hasOwnProperty(a)) {
            var B = n[a];
            if (B != null)
              switch (a) {
                case "name":
                  r = B;
                  break;
                case "type":
                  d = B;
                  break;
                case "checked":
                  w = B;
                  break;
                case "defaultChecked":
                  N = B;
                  break;
                case "value":
                  c = B;
                  break;
                case "defaultValue":
                  b = B;
                  break;
                case "children":
                case "dangerouslySetInnerHTML":
                  if (B != null)
                    throw Error(s(137, t));
                  break;
                default:
                  Ne(e, t, a, B, n, null);
              }
          }
        ef(
          e,
          c,
          b,
          w,
          N,
          d,
          r,
          !1
        ), Zi(e);
        return;
      case "select":
        _e("invalid", e), a = d = c = null;
        for (r in n)
          if (n.hasOwnProperty(r) && (b = n[r], b != null))
            switch (r) {
              case "value":
                c = b;
                break;
              case "defaultValue":
                d = b;
                break;
              case "multiple":
                a = b;
              default:
                Ne(e, t, r, b, n, null);
            }
        t = c, n = d, e.multiple = !!a, t != null ? Ya(e, !!a, t, !1) : n != null && Ya(e, !!a, n, !0);
        return;
      case "textarea":
        _e("invalid", e), c = r = a = null;
        for (d in n)
          if (n.hasOwnProperty(d) && (b = n[d], b != null))
            switch (d) {
              case "value":
                a = b;
                break;
              case "defaultValue":
                r = b;
                break;
              case "children":
                c = b;
                break;
              case "dangerouslySetInnerHTML":
                if (b != null) throw Error(s(91));
                break;
              default:
                Ne(e, t, d, b, n, null);
            }
        nf(e, a, r, c), Zi(e);
        return;
      case "option":
        for (w in n)
          if (n.hasOwnProperty(w) && (a = n[w], a != null))
            switch (w) {
              case "selected":
                e.selected = a && typeof a != "function" && typeof a != "symbol";
                break;
              default:
                Ne(e, t, w, a, n, null);
            }
        return;
      case "dialog":
        _e("beforetoggle", e), _e("toggle", e), _e("cancel", e), _e("close", e);
        break;
      case "iframe":
      case "object":
        _e("load", e);
        break;
      case "video":
      case "audio":
        for (a = 0; a < _i.length; a++)
          _e(_i[a], e);
        break;
      case "image":
        _e("error", e), _e("load", e);
        break;
      case "details":
        _e("toggle", e);
        break;
      case "embed":
      case "source":
      case "link":
        _e("error", e), _e("load", e);
      case "area":
      case "base":
      case "br":
      case "col":
      case "hr":
      case "keygen":
      case "meta":
      case "param":
      case "track":
      case "wbr":
      case "menuitem":
        for (N in n)
          if (n.hasOwnProperty(N) && (a = n[N], a != null))
            switch (N) {
              case "children":
              case "dangerouslySetInnerHTML":
                throw Error(s(137, t));
              default:
                Ne(e, t, N, a, n, null);
            }
        return;
      default:
        if (Qo(t)) {
          for (B in n)
            n.hasOwnProperty(B) && (a = n[B], a !== void 0 && jc(
              e,
              t,
              B,
              a,
              n,
              void 0
            ));
          return;
        }
    }
    for (b in n)
      n.hasOwnProperty(b) && (a = n[b], a != null && Ne(e, t, b, a, n, null));
  }
  function uv(e, t, n, a) {
    switch (t) {
      case "div":
      case "span":
      case "svg":
      case "path":
      case "a":
      case "g":
      case "p":
      case "li":
        break;
      case "input":
        var r = null, c = null, d = null, b = null, w = null, N = null, B = null;
        for (z in n) {
          var V = n[z];
          if (n.hasOwnProperty(z) && V != null)
            switch (z) {
              case "checked":
                break;
              case "value":
                break;
              case "defaultValue":
                w = V;
              default:
                a.hasOwnProperty(z) || Ne(e, t, z, null, a, V);
            }
        }
        for (var D in a) {
          var z = a[D];
          if (V = n[D], a.hasOwnProperty(D) && (z != null || V != null))
            switch (D) {
              case "type":
                c = z;
                break;
              case "name":
                r = z;
                break;
              case "checked":
                N = z;
                break;
              case "defaultChecked":
                B = z;
                break;
              case "value":
                d = z;
                break;
              case "defaultValue":
                b = z;
                break;
              case "children":
              case "dangerouslySetInnerHTML":
                if (z != null)
                  throw Error(s(137, t));
                break;
              default:
                z !== V && Ne(
                  e,
                  t,
                  D,
                  z,
                  a,
                  V
                );
            }
        }
        Go(
          e,
          d,
          b,
          w,
          N,
          B,
          c,
          r
        );
        return;
      case "select":
        z = d = b = D = null;
        for (c in n)
          if (w = n[c], n.hasOwnProperty(c) && w != null)
            switch (c) {
              case "value":
                break;
              case "multiple":
                z = w;
              default:
                a.hasOwnProperty(c) || Ne(
                  e,
                  t,
                  c,
                  null,
                  a,
                  w
                );
            }
        for (r in a)
          if (c = a[r], w = n[r], a.hasOwnProperty(r) && (c != null || w != null))
            switch (r) {
              case "value":
                D = c;
                break;
              case "defaultValue":
                b = c;
                break;
              case "multiple":
                d = c;
              default:
                c !== w && Ne(
                  e,
                  t,
                  r,
                  c,
                  a,
                  w
                );
            }
        t = b, n = d, a = z, D != null ? Ya(e, !!n, D, !1) : !!a != !!n && (t != null ? Ya(e, !!n, t, !0) : Ya(e, !!n, n ? [] : "", !1));
        return;
      case "textarea":
        z = D = null;
        for (b in n)
          if (r = n[b], n.hasOwnProperty(b) && r != null && !a.hasOwnProperty(b))
            switch (b) {
              case "value":
                break;
              case "children":
                break;
              default:
                Ne(e, t, b, null, a, r);
            }
        for (d in a)
          if (r = a[d], c = n[d], a.hasOwnProperty(d) && (r != null || c != null))
            switch (d) {
              case "value":
                D = r;
                break;
              case "defaultValue":
                z = r;
                break;
              case "children":
                break;
              case "dangerouslySetInnerHTML":
                if (r != null) throw Error(s(91));
                break;
              default:
                r !== c && Ne(e, t, d, r, a, c);
            }
        tf(e, D, z);
        return;
      case "option":
        for (var de in n)
          if (D = n[de], n.hasOwnProperty(de) && D != null && !a.hasOwnProperty(de))
            switch (de) {
              case "selected":
                e.selected = !1;
                break;
              default:
                Ne(
                  e,
                  t,
                  de,
                  null,
                  a,
                  D
                );
            }
        for (w in a)
          if (D = a[w], z = n[w], a.hasOwnProperty(w) && D !== z && (D != null || z != null))
            switch (w) {
              case "selected":
                e.selected = D && typeof D != "function" && typeof D != "symbol";
                break;
              default:
                Ne(
                  e,
                  t,
                  w,
                  D,
                  a,
                  z
                );
            }
        return;
      case "img":
      case "link":
      case "area":
      case "base":
      case "br":
      case "col":
      case "embed":
      case "hr":
      case "keygen":
      case "meta":
      case "param":
      case "source":
      case "track":
      case "wbr":
      case "menuitem":
        for (var se in n)
          D = n[se], n.hasOwnProperty(se) && D != null && !a.hasOwnProperty(se) && Ne(e, t, se, null, a, D);
        for (N in a)
          if (D = a[N], z = n[N], a.hasOwnProperty(N) && D !== z && (D != null || z != null))
            switch (N) {
              case "children":
              case "dangerouslySetInnerHTML":
                if (D != null)
                  throw Error(s(137, t));
                break;
              default:
                Ne(
                  e,
                  t,
                  N,
                  D,
                  a,
                  z
                );
            }
        return;
      default:
        if (Qo(t)) {
          for (var Re in n)
            D = n[Re], n.hasOwnProperty(Re) && D !== void 0 && !a.hasOwnProperty(Re) && jc(
              e,
              t,
              Re,
              void 0,
              a,
              D
            );
          for (B in a)
            D = a[B], z = n[B], !a.hasOwnProperty(B) || D === z || D === void 0 && z === void 0 || jc(
              e,
              t,
              B,
              D,
              a,
              z
            );
          return;
        }
    }
    for (var T in n)
      D = n[T], n.hasOwnProperty(T) && D != null && !a.hasOwnProperty(T) && Ne(e, t, T, null, a, D);
    for (V in a)
      D = a[V], z = n[V], !a.hasOwnProperty(V) || D === z || D == null && z == null || Ne(e, t, V, D, a, z);
  }
  var kc = null, Nc = null;
  function qr(e) {
    return e.nodeType === 9 ? e : e.ownerDocument;
  }
  function l0(e) {
    switch (e) {
      case "http://www.w3.org/2000/svg":
        return 1;
      case "http://www.w3.org/1998/Math/MathML":
        return 2;
      default:
        return 0;
    }
  }
  function i0(e, t) {
    if (e === 0)
      switch (t) {
        case "svg":
          return 1;
        case "math":
          return 2;
        default:
          return 0;
      }
    return e === 1 && t === "foreignObject" ? 0 : e;
  }
  function Rc(e, t) {
    return e === "textarea" || e === "noscript" || typeof t.children == "string" || typeof t.children == "number" || typeof t.children == "bigint" || typeof t.dangerouslySetInnerHTML == "object" && t.dangerouslySetInnerHTML !== null && t.dangerouslySetInnerHTML.__html != null;
  }
  var Dc = null;
  function fv() {
    var e = window.event;
    return e && e.type === "popstate" ? e === Dc ? !1 : (Dc = e, !0) : (Dc = null, !1);
  }
  var r0 = typeof setTimeout == "function" ? setTimeout : void 0, dv = typeof clearTimeout == "function" ? clearTimeout : void 0, o0 = typeof Promise == "function" ? Promise : void 0, hv = typeof queueMicrotask == "function" ? queueMicrotask : typeof o0 < "u" ? function(e) {
    return o0.resolve(null).then(e).catch(mv);
  } : r0;
  function mv(e) {
    setTimeout(function() {
      throw e;
    });
  }
  function Fn(e) {
    return e === "head";
  }
  function s0(e, t) {
    var n = t, a = 0, r = 0;
    do {
      var c = n.nextSibling;
      if (e.removeChild(n), c && c.nodeType === 8)
        if (n = c.data, n === "/$") {
          if (0 < a && 8 > a) {
            n = a;
            var d = e.ownerDocument;
            if (n & 1 && Ci(d.documentElement), n & 2 && Ci(d.body), n & 4)
              for (n = d.head, Ci(n), d = n.firstChild; d; ) {
                var b = d.nextSibling, w = d.nodeName;
                d[Hl] || w === "SCRIPT" || w === "STYLE" || w === "LINK" && d.rel.toLowerCase() === "stylesheet" || n.removeChild(d), d = b;
              }
          }
          if (r === 0) {
            e.removeChild(c), Ri(t);
            return;
          }
          r--;
        } else
          n === "$" || n === "$?" || n === "$!" ? r++ : a = n.charCodeAt(0) - 48;
      else a = 0;
      n = c;
    } while (n);
    Ri(t);
  }
  function zc(e) {
    var t = e.firstChild;
    for (t && t.nodeType === 10 && (t = t.nextSibling); t; ) {
      var n = t;
      switch (t = t.nextSibling, n.nodeName) {
        case "HTML":
        case "HEAD":
        case "BODY":
          zc(n), Ho(n);
          continue;
        case "SCRIPT":
        case "STYLE":
          continue;
        case "LINK":
          if (n.rel.toLowerCase() === "stylesheet") continue;
      }
      e.removeChild(n);
    }
  }
  function pv(e, t, n, a) {
    for (; e.nodeType === 1; ) {
      var r = n;
      if (e.nodeName.toLowerCase() !== t.toLowerCase()) {
        if (!a && (e.nodeName !== "INPUT" || e.type !== "hidden"))
          break;
      } else if (a) {
        if (!e[Hl])
          switch (t) {
            case "meta":
              if (!e.hasAttribute("itemprop")) break;
              return e;
            case "link":
              if (c = e.getAttribute("rel"), c === "stylesheet" && e.hasAttribute("data-precedence"))
                break;
              if (c !== r.rel || e.getAttribute("href") !== (r.href == null || r.href === "" ? null : r.href) || e.getAttribute("crossorigin") !== (r.crossOrigin == null ? null : r.crossOrigin) || e.getAttribute("title") !== (r.title == null ? null : r.title))
                break;
              return e;
            case "style":
              if (e.hasAttribute("data-precedence")) break;
              return e;
            case "script":
              if (c = e.getAttribute("src"), (c !== (r.src == null ? null : r.src) || e.getAttribute("type") !== (r.type == null ? null : r.type) || e.getAttribute("crossorigin") !== (r.crossOrigin == null ? null : r.crossOrigin)) && c && e.hasAttribute("async") && !e.hasAttribute("itemprop"))
                break;
              return e;
            default:
              return e;
          }
      } else if (t === "input" && e.type === "hidden") {
        var c = r.name == null ? null : "" + r.name;
        if (r.type === "hidden" && e.getAttribute("name") === c)
          return e;
      } else return e;
      if (e = en(e.nextSibling), e === null) break;
    }
    return null;
  }
  function vv(e, t, n) {
    if (t === "") return null;
    for (; e.nodeType !== 3; )
      if ((e.nodeType !== 1 || e.nodeName !== "INPUT" || e.type !== "hidden") && !n || (e = en(e.nextSibling), e === null)) return null;
    return e;
  }
  function Oc(e) {
    return e.data === "$!" || e.data === "$?" && e.ownerDocument.readyState === "complete";
  }
  function gv(e, t) {
    var n = e.ownerDocument;
    if (e.data !== "$?" || n.readyState === "complete")
      t();
    else {
      var a = function() {
        t(), n.removeEventListener("DOMContentLoaded", a);
      };
      n.addEventListener("DOMContentLoaded", a), e._reactRetry = a;
    }
  }
  function en(e) {
    for (; e != null; e = e.nextSibling) {
      var t = e.nodeType;
      if (t === 1 || t === 3) break;
      if (t === 8) {
        if (t = e.data, t === "$" || t === "$!" || t === "$?" || t === "F!" || t === "F")
          break;
        if (t === "/$") return null;
      }
    }
    return e;
  }
  var Uc = null;
  function c0(e) {
    e = e.previousSibling;
    for (var t = 0; e; ) {
      if (e.nodeType === 8) {
        var n = e.data;
        if (n === "$" || n === "$!" || n === "$?") {
          if (t === 0) return e;
          t--;
        } else n === "/$" && t++;
      }
      e = e.previousSibling;
    }
    return null;
  }
  function u0(e, t, n) {
    switch (t = qr(n), e) {
      case "html":
        if (e = t.documentElement, !e) throw Error(s(452));
        return e;
      case "head":
        if (e = t.head, !e) throw Error(s(453));
        return e;
      case "body":
        if (e = t.body, !e) throw Error(s(454));
        return e;
      default:
        throw Error(s(451));
    }
  }
  function Ci(e) {
    for (var t = e.attributes; t.length; )
      e.removeAttributeNode(t[0]);
    Ho(e);
  }
  var Zt = /* @__PURE__ */ new Map(), f0 = /* @__PURE__ */ new Set();
  function Gr(e) {
    return typeof e.getRootNode == "function" ? e.getRootNode() : e.nodeType === 9 ? e : e.ownerDocument;
  }
  var kn = Q.d;
  Q.d = {
    f: bv,
    r: yv,
    D: xv,
    C: Sv,
    L: _v,
    m: wv,
    X: Ev,
    S: Cv,
    M: Tv
  };
  function bv() {
    var e = kn.f(), t = zr();
    return e || t;
  }
  function yv(e) {
    var t = $a(e);
    t !== null && t.tag === 5 && t.type === "form" ? Nd(t) : kn.r(e);
  }
  var xl = typeof document > "u" ? null : document;
  function d0(e, t, n) {
    var a = xl;
    if (a && typeof t == "string" && t) {
      var r = $t(t);
      r = 'link[rel="' + e + '"][href="' + r + '"]', typeof n == "string" && (r += '[crossorigin="' + n + '"]'), f0.has(r) || (f0.add(r), e = { rel: e, crossOrigin: n, href: t }, a.querySelector(r) === null && (t = a.createElement("link"), ft(t, "link", e), at(t), a.head.appendChild(t)));
    }
  }
  function xv(e) {
    kn.D(e), d0("dns-prefetch", e, null);
  }
  function Sv(e, t) {
    kn.C(e, t), d0("preconnect", e, t);
  }
  function _v(e, t, n) {
    kn.L(e, t, n);
    var a = xl;
    if (a && e && t) {
      var r = 'link[rel="preload"][as="' + $t(t) + '"]';
      t === "image" && n && n.imageSrcSet ? (r += '[imagesrcset="' + $t(
        n.imageSrcSet
      ) + '"]', typeof n.imageSizes == "string" && (r += '[imagesizes="' + $t(
        n.imageSizes
      ) + '"]')) : r += '[href="' + $t(e) + '"]';
      var c = r;
      switch (t) {
        case "style":
          c = Sl(e);
          break;
        case "script":
          c = _l(e);
      }
      Zt.has(c) || (e = y(
        {
          rel: "preload",
          href: t === "image" && n && n.imageSrcSet ? void 0 : e,
          as: t
        },
        n
      ), Zt.set(c, e), a.querySelector(r) !== null || t === "style" && a.querySelector(Ei(c)) || t === "script" && a.querySelector(Ti(c)) || (t = a.createElement("link"), ft(t, "link", e), at(t), a.head.appendChild(t)));
    }
  }
  function wv(e, t) {
    kn.m(e, t);
    var n = xl;
    if (n && e) {
      var a = t && typeof t.as == "string" ? t.as : "script", r = 'link[rel="modulepreload"][as="' + $t(a) + '"][href="' + $t(e) + '"]', c = r;
      switch (a) {
        case "audioworklet":
        case "paintworklet":
        case "serviceworker":
        case "sharedworker":
        case "worker":
        case "script":
          c = _l(e);
      }
      if (!Zt.has(c) && (e = y({ rel: "modulepreload", href: e }, t), Zt.set(c, e), n.querySelector(r) === null)) {
        switch (a) {
          case "audioworklet":
          case "paintworklet":
          case "serviceworker":
          case "sharedworker":
          case "worker":
          case "script":
            if (n.querySelector(Ti(c)))
              return;
        }
        a = n.createElement("link"), ft(a, "link", e), at(a), n.head.appendChild(a);
      }
    }
  }
  function Cv(e, t, n) {
    kn.S(e, t, n);
    var a = xl;
    if (a && e) {
      var r = Va(a).hoistableStyles, c = Sl(e);
      t = t || "default";
      var d = r.get(c);
      if (!d) {
        var b = { loading: 0, preload: null };
        if (d = a.querySelector(
          Ei(c)
        ))
          b.loading = 5;
        else {
          e = y(
            { rel: "stylesheet", href: e, "data-precedence": t },
            n
          ), (n = Zt.get(c)) && Lc(e, n);
          var w = d = a.createElement("link");
          at(w), ft(w, "link", e), w._p = new Promise(function(N, B) {
            w.onload = N, w.onerror = B;
          }), w.addEventListener("load", function() {
            b.loading |= 1;
          }), w.addEventListener("error", function() {
            b.loading |= 2;
          }), b.loading |= 4, Yr(d, t, a);
        }
        d = {
          type: "stylesheet",
          instance: d,
          count: 1,
          state: b
        }, r.set(c, d);
      }
    }
  }
  function Ev(e, t) {
    kn.X(e, t);
    var n = xl;
    if (n && e) {
      var a = Va(n).hoistableScripts, r = _l(e), c = a.get(r);
      c || (c = n.querySelector(Ti(r)), c || (e = y({ src: e, async: !0 }, t), (t = Zt.get(r)) && Bc(e, t), c = n.createElement("script"), at(c), ft(c, "link", e), n.head.appendChild(c)), c = {
        type: "script",
        instance: c,
        count: 1,
        state: null
      }, a.set(r, c));
    }
  }
  function Tv(e, t) {
    kn.M(e, t);
    var n = xl;
    if (n && e) {
      var a = Va(n).hoistableScripts, r = _l(e), c = a.get(r);
      c || (c = n.querySelector(Ti(r)), c || (e = y({ src: e, async: !0, type: "module" }, t), (t = Zt.get(r)) && Bc(e, t), c = n.createElement("script"), at(c), ft(c, "link", e), n.head.appendChild(c)), c = {
        type: "script",
        instance: c,
        count: 1,
        state: null
      }, a.set(r, c));
    }
  }
  function h0(e, t, n, a) {
    var r = (r = ie.current) ? Gr(r) : null;
    if (!r) throw Error(s(446));
    switch (e) {
      case "meta":
      case "title":
        return null;
      case "style":
        return typeof n.precedence == "string" && typeof n.href == "string" ? (t = Sl(n.href), n = Va(
          r
        ).hoistableStyles, a = n.get(t), a || (a = {
          type: "style",
          instance: null,
          count: 0,
          state: null
        }, n.set(t, a)), a) : { type: "void", instance: null, count: 0, state: null };
      case "link":
        if (n.rel === "stylesheet" && typeof n.href == "string" && typeof n.precedence == "string") {
          e = Sl(n.href);
          var c = Va(
            r
          ).hoistableStyles, d = c.get(e);
          if (d || (r = r.ownerDocument || r, d = {
            type: "stylesheet",
            instance: null,
            count: 0,
            state: { loading: 0, preload: null }
          }, c.set(e, d), (c = r.querySelector(
            Ei(e)
          )) && !c._p && (d.instance = c, d.state.loading = 5), Zt.has(e) || (n = {
            rel: "preload",
            as: "style",
            href: n.href,
            crossOrigin: n.crossOrigin,
            integrity: n.integrity,
            media: n.media,
            hrefLang: n.hrefLang,
            referrerPolicy: n.referrerPolicy
          }, Zt.set(e, n), c || Mv(
            r,
            e,
            n,
            d.state
          ))), t && a === null)
            throw Error(s(528, ""));
          return d;
        }
        if (t && a !== null)
          throw Error(s(529, ""));
        return null;
      case "script":
        return t = n.async, n = n.src, typeof n == "string" && t && typeof t != "function" && typeof t != "symbol" ? (t = _l(n), n = Va(
          r
        ).hoistableScripts, a = n.get(t), a || (a = {
          type: "script",
          instance: null,
          count: 0,
          state: null
        }, n.set(t, a)), a) : { type: "void", instance: null, count: 0, state: null };
      default:
        throw Error(s(444, e));
    }
  }
  function Sl(e) {
    return 'href="' + $t(e) + '"';
  }
  function Ei(e) {
    return 'link[rel="stylesheet"][' + e + "]";
  }
  function m0(e) {
    return y({}, e, {
      "data-precedence": e.precedence,
      precedence: null
    });
  }
  function Mv(e, t, n, a) {
    e.querySelector('link[rel="preload"][as="style"][' + t + "]") ? a.loading = 1 : (t = e.createElement("link"), a.preload = t, t.addEventListener("load", function() {
      return a.loading |= 1;
    }), t.addEventListener("error", function() {
      return a.loading |= 2;
    }), ft(t, "link", n), at(t), e.head.appendChild(t));
  }
  function _l(e) {
    return '[src="' + $t(e) + '"]';
  }
  function Ti(e) {
    return "script[async]" + e;
  }
  function p0(e, t, n) {
    if (t.count++, t.instance === null)
      switch (t.type) {
        case "style":
          var a = e.querySelector(
            'style[data-href~="' + $t(n.href) + '"]'
          );
          if (a)
            return t.instance = a, at(a), a;
          var r = y({}, n, {
            "data-href": n.href,
            "data-precedence": n.precedence,
            href: null,
            precedence: null
          });
          return a = (e.ownerDocument || e).createElement(
            "style"
          ), at(a), ft(a, "style", r), Yr(a, n.precedence, e), t.instance = a;
        case "stylesheet":
          r = Sl(n.href);
          var c = e.querySelector(
            Ei(r)
          );
          if (c)
            return t.state.loading |= 4, t.instance = c, at(c), c;
          a = m0(n), (r = Zt.get(r)) && Lc(a, r), c = (e.ownerDocument || e).createElement("link"), at(c);
          var d = c;
          return d._p = new Promise(function(b, w) {
            d.onload = b, d.onerror = w;
          }), ft(c, "link", a), t.state.loading |= 4, Yr(c, n.precedence, e), t.instance = c;
        case "script":
          return c = _l(n.src), (r = e.querySelector(
            Ti(c)
          )) ? (t.instance = r, at(r), r) : (a = n, (r = Zt.get(c)) && (a = y({}, n), Bc(a, r)), e = e.ownerDocument || e, r = e.createElement("script"), at(r), ft(r, "link", a), e.head.appendChild(r), t.instance = r);
        case "void":
          return null;
        default:
          throw Error(s(443, t.type));
      }
    else
      t.type === "stylesheet" && (t.state.loading & 4) === 0 && (a = t.instance, t.state.loading |= 4, Yr(a, n.precedence, e));
    return t.instance;
  }
  function Yr(e, t, n) {
    for (var a = n.querySelectorAll(
      'link[rel="stylesheet"][data-precedence],style[data-precedence]'
    ), r = a.length ? a[a.length - 1] : null, c = r, d = 0; d < a.length; d++) {
      var b = a[d];
      if (b.dataset.precedence === t) c = b;
      else if (c !== r) break;
    }
    c ? c.parentNode.insertBefore(e, c.nextSibling) : (t = n.nodeType === 9 ? n.head : n, t.insertBefore(e, t.firstChild));
  }
  function Lc(e, t) {
    e.crossOrigin == null && (e.crossOrigin = t.crossOrigin), e.referrerPolicy == null && (e.referrerPolicy = t.referrerPolicy), e.title == null && (e.title = t.title);
  }
  function Bc(e, t) {
    e.crossOrigin == null && (e.crossOrigin = t.crossOrigin), e.referrerPolicy == null && (e.referrerPolicy = t.referrerPolicy), e.integrity == null && (e.integrity = t.integrity);
  }
  var Qr = null;
  function v0(e, t, n) {
    if (Qr === null) {
      var a = /* @__PURE__ */ new Map(), r = Qr = /* @__PURE__ */ new Map();
      r.set(n, a);
    } else
      r = Qr, a = r.get(n), a || (a = /* @__PURE__ */ new Map(), r.set(n, a));
    if (a.has(e)) return a;
    for (a.set(e, null), n = n.getElementsByTagName(e), r = 0; r < n.length; r++) {
      var c = n[r];
      if (!(c[Hl] || c[Ye] || e === "link" && c.getAttribute("rel") === "stylesheet") && c.namespaceURI !== "http://www.w3.org/2000/svg") {
        var d = c.getAttribute(t) || "";
        d = e + d;
        var b = a.get(d);
        b ? b.push(c) : a.set(d, [c]);
      }
    }
    return a;
  }
  function g0(e, t, n) {
    e = e.ownerDocument || e, e.head.insertBefore(
      n,
      t === "title" ? e.querySelector("head > title") : null
    );
  }
  function Av(e, t, n) {
    if (n === 1 || t.itemProp != null) return !1;
    switch (e) {
      case "meta":
      case "title":
        return !0;
      case "style":
        if (typeof t.precedence != "string" || typeof t.href != "string" || t.href === "")
          break;
        return !0;
      case "link":
        if (typeof t.rel != "string" || typeof t.href != "string" || t.href === "" || t.onLoad || t.onError)
          break;
        switch (t.rel) {
          case "stylesheet":
            return e = t.disabled, typeof t.precedence == "string" && e == null;
          default:
            return !0;
        }
      case "script":
        if (t.async && typeof t.async != "function" && typeof t.async != "symbol" && !t.onLoad && !t.onError && t.src && typeof t.src == "string")
          return !0;
    }
    return !1;
  }
  function b0(e) {
    return !(e.type === "stylesheet" && (e.state.loading & 3) === 0);
  }
  var Mi = null;
  function jv() {
  }
  function kv(e, t, n) {
    if (Mi === null) throw Error(s(475));
    var a = Mi;
    if (t.type === "stylesheet" && (typeof n.media != "string" || matchMedia(n.media).matches !== !1) && (t.state.loading & 4) === 0) {
      if (t.instance === null) {
        var r = Sl(n.href), c = e.querySelector(
          Ei(r)
        );
        if (c) {
          e = c._p, e !== null && typeof e == "object" && typeof e.then == "function" && (a.count++, a = Xr.bind(a), e.then(a, a)), t.state.loading |= 4, t.instance = c, at(c);
          return;
        }
        c = e.ownerDocument || e, n = m0(n), (r = Zt.get(r)) && Lc(n, r), c = c.createElement("link"), at(c);
        var d = c;
        d._p = new Promise(function(b, w) {
          d.onload = b, d.onerror = w;
        }), ft(c, "link", n), t.instance = c;
      }
      a.stylesheets === null && (a.stylesheets = /* @__PURE__ */ new Map()), a.stylesheets.set(t, e), (e = t.state.preload) && (t.state.loading & 3) === 0 && (a.count++, t = Xr.bind(a), e.addEventListener("load", t), e.addEventListener("error", t));
    }
  }
  function Nv() {
    if (Mi === null) throw Error(s(475));
    var e = Mi;
    return e.stylesheets && e.count === 0 && Hc(e, e.stylesheets), 0 < e.count ? function(t) {
      var n = setTimeout(function() {
        if (e.stylesheets && Hc(e, e.stylesheets), e.unsuspend) {
          var a = e.unsuspend;
          e.unsuspend = null, a();
        }
      }, 6e4);
      return e.unsuspend = t, function() {
        e.unsuspend = null, clearTimeout(n);
      };
    } : null;
  }
  function Xr() {
    if (this.count--, this.count === 0) {
      if (this.stylesheets) Hc(this, this.stylesheets);
      else if (this.unsuspend) {
        var e = this.unsuspend;
        this.unsuspend = null, e();
      }
    }
  }
  var Zr = null;
  function Hc(e, t) {
    e.stylesheets = null, e.unsuspend !== null && (e.count++, Zr = /* @__PURE__ */ new Map(), t.forEach(Rv, e), Zr = null, Xr.call(e));
  }
  function Rv(e, t) {
    if (!(t.state.loading & 4)) {
      var n = Zr.get(e);
      if (n) var a = n.get(null);
      else {
        n = /* @__PURE__ */ new Map(), Zr.set(e, n);
        for (var r = e.querySelectorAll(
          "link[data-precedence],style[data-precedence]"
        ), c = 0; c < r.length; c++) {
          var d = r[c];
          (d.nodeName === "LINK" || d.getAttribute("media") !== "not all") && (n.set(d.dataset.precedence, d), a = d);
        }
        a && n.set(null, a);
      }
      r = t.instance, d = r.getAttribute("data-precedence"), c = n.get(d) || a, c === a && n.set(null, r), n.set(d, r), this.count++, a = Xr.bind(this), r.addEventListener("load", a), r.addEventListener("error", a), c ? c.parentNode.insertBefore(r, c.nextSibling) : (e = e.nodeType === 9 ? e.head : e, e.insertBefore(r, e.firstChild)), t.state.loading |= 4;
    }
  }
  var Ai = {
    $$typeof: P,
    Provider: null,
    Consumer: null,
    _currentValue: q,
    _currentValue2: q,
    _threadCount: 0
  };
  function Dv(e, t, n, a, r, c, d, b) {
    this.tag = 1, this.containerInfo = e, this.pingCache = this.current = this.pendingChildren = null, this.timeoutHandle = -1, this.callbackNode = this.next = this.pendingContext = this.context = this.cancelPendingCommit = null, this.callbackPriority = 0, this.expirationTimes = Bl(-1), this.entangledLanes = this.shellSuspendCounter = this.errorRecoveryDisabledLanes = this.expiredLanes = this.warmLanes = this.pingedLanes = this.suspendedLanes = this.pendingLanes = 0, this.entanglements = Bl(0), this.hiddenUpdates = Bl(null), this.identifierPrefix = a, this.onUncaughtError = r, this.onCaughtError = c, this.onRecoverableError = d, this.pooledCache = null, this.pooledCacheLanes = 0, this.formState = b, this.incompleteTransitions = /* @__PURE__ */ new Map();
  }
  function y0(e, t, n, a, r, c, d, b, w, N, B, V) {
    return e = new Dv(
      e,
      t,
      n,
      d,
      b,
      w,
      N,
      V
    ), t = 1, c === !0 && (t |= 24), c = Rt(3, null, null, t), e.current = c, c.stateNode = e, t = xs(), t.refCount++, e.pooledCache = t, t.refCount++, c.memoizedState = {
      element: a,
      isDehydrated: n,
      cache: t
    }, Cs(c), e;
  }
  function x0(e) {
    return e ? (e = Fa, e) : Fa;
  }
  function S0(e, t, n, a, r, c) {
    r = x0(r), a.context === null ? a.context = r : a.pendingContext = r, a = $n(t), a.payload = { element: n }, c = c === void 0 ? null : c, c !== null && (a.callback = c), n = Vn(e, a, t), n !== null && (Lt(n, e, t), li(n, e, t));
  }
  function _0(e, t) {
    if (e = e.memoizedState, e !== null && e.dehydrated !== null) {
      var n = e.retryLane;
      e.retryLane = n !== 0 && n < t ? n : t;
    }
  }
  function $c(e, t) {
    _0(e, t), (e = e.alternate) && _0(e, t);
  }
  function w0(e) {
    if (e.tag === 13) {
      var t = Ia(e, 67108864);
      t !== null && Lt(t, e, 67108864), $c(e, 67108864);
    }
  }
  var Kr = !0;
  function zv(e, t, n, a) {
    var r = R.T;
    R.T = null;
    var c = Q.p;
    try {
      Q.p = 2, Vc(e, t, n, a);
    } finally {
      Q.p = c, R.T = r;
    }
  }
  function Ov(e, t, n, a) {
    var r = R.T;
    R.T = null;
    var c = Q.p;
    try {
      Q.p = 8, Vc(e, t, n, a);
    } finally {
      Q.p = c, R.T = r;
    }
  }
  function Vc(e, t, n, a) {
    if (Kr) {
      var r = qc(a);
      if (r === null)
        Ac(
          e,
          t,
          a,
          Jr,
          n
        ), E0(e, a);
      else if (Lv(
        r,
        e,
        t,
        n,
        a
      ))
        a.stopPropagation();
      else if (E0(e, a), t & 4 && -1 < Uv.indexOf(e)) {
        for (; r !== null; ) {
          var c = $a(r);
          if (c !== null)
            switch (c.tag) {
              case 3:
                if (c = c.stateNode, c.current.memoizedState.isDehydrated) {
                  var d = an(c.pendingLanes);
                  if (d !== 0) {
                    var b = c;
                    for (b.pendingLanes |= 2, b.entangledLanes |= 2; d; ) {
                      var w = 1 << 31 - ot(d);
                      b.entanglements[1] |= w, d &= ~w;
                    }
                    cn(c), (Ae & 6) === 0 && (Rr = pt() + 500, Si(0));
                  }
                }
                break;
              case 13:
                b = Ia(c, 2), b !== null && Lt(b, c, 2), zr(), $c(c, 2);
            }
          if (c = qc(a), c === null && Ac(
            e,
            t,
            a,
            Jr,
            n
          ), c === r) break;
          r = c;
        }
        r !== null && a.stopPropagation();
      } else
        Ac(
          e,
          t,
          a,
          null,
          n
        );
    }
  }
  function qc(e) {
    return e = Zo(e), Gc(e);
  }
  var Jr = null;
  function Gc(e) {
    if (Jr = null, e = Ha(e), e !== null) {
      var t = u(e);
      if (t === null) e = null;
      else {
        var n = t.tag;
        if (n === 13) {
          if (e = p(t), e !== null) return e;
          e = null;
        } else if (n === 3) {
          if (t.stateNode.current.memoizedState.isDehydrated)
            return t.tag === 3 ? t.stateNode.containerInfo : null;
          e = null;
        } else t !== e && (e = null);
      }
    }
    return Jr = e, null;
  }
  function C0(e) {
    switch (e) {
      case "beforetoggle":
      case "cancel":
      case "click":
      case "close":
      case "contextmenu":
      case "copy":
      case "cut":
      case "auxclick":
      case "dblclick":
      case "dragend":
      case "dragstart":
      case "drop":
      case "focusin":
      case "focusout":
      case "input":
      case "invalid":
      case "keydown":
      case "keypress":
      case "keyup":
      case "mousedown":
      case "mouseup":
      case "paste":
      case "pause":
      case "play":
      case "pointercancel":
      case "pointerdown":
      case "pointerup":
      case "ratechange":
      case "reset":
      case "resize":
      case "seeked":
      case "submit":
      case "toggle":
      case "touchcancel":
      case "touchend":
      case "touchstart":
      case "volumechange":
      case "change":
      case "selectionchange":
      case "textInput":
      case "compositionstart":
      case "compositionend":
      case "compositionupdate":
      case "beforeblur":
      case "afterblur":
      case "beforeinput":
      case "blur":
      case "fullscreenchange":
      case "focus":
      case "hashchange":
      case "popstate":
      case "select":
      case "selectstart":
        return 2;
      case "drag":
      case "dragenter":
      case "dragexit":
      case "dragleave":
      case "dragover":
      case "mousemove":
      case "mouseout":
      case "mouseover":
      case "pointermove":
      case "pointerout":
      case "pointerover":
      case "scroll":
      case "touchmove":
      case "wheel":
      case "mouseenter":
      case "mouseleave":
      case "pointerenter":
      case "pointerleave":
        return 8;
      case "message":
        switch ($i()) {
          case Bt:
            return 2;
          case Vi:
            return 8;
          case Oa:
          case xt:
            return 32;
          case mn:
            return 268435456;
          default:
            return 32;
        }
      default:
        return 32;
    }
  }
  var Yc = !1, ea = null, ta = null, na = null, ji = /* @__PURE__ */ new Map(), ki = /* @__PURE__ */ new Map(), aa = [], Uv = "mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(
    " "
  );
  function E0(e, t) {
    switch (e) {
      case "focusin":
      case "focusout":
        ea = null;
        break;
      case "dragenter":
      case "dragleave":
        ta = null;
        break;
      case "mouseover":
      case "mouseout":
        na = null;
        break;
      case "pointerover":
      case "pointerout":
        ji.delete(t.pointerId);
        break;
      case "gotpointercapture":
      case "lostpointercapture":
        ki.delete(t.pointerId);
    }
  }
  function Ni(e, t, n, a, r, c) {
    return e === null || e.nativeEvent !== c ? (e = {
      blockedOn: t,
      domEventName: n,
      eventSystemFlags: a,
      nativeEvent: c,
      targetContainers: [r]
    }, t !== null && (t = $a(t), t !== null && w0(t)), e) : (e.eventSystemFlags |= a, t = e.targetContainers, r !== null && t.indexOf(r) === -1 && t.push(r), e);
  }
  function Lv(e, t, n, a, r) {
    switch (t) {
      case "focusin":
        return ea = Ni(
          ea,
          e,
          t,
          n,
          a,
          r
        ), !0;
      case "dragenter":
        return ta = Ni(
          ta,
          e,
          t,
          n,
          a,
          r
        ), !0;
      case "mouseover":
        return na = Ni(
          na,
          e,
          t,
          n,
          a,
          r
        ), !0;
      case "pointerover":
        var c = r.pointerId;
        return ji.set(
          c,
          Ni(
            ji.get(c) || null,
            e,
            t,
            n,
            a,
            r
          )
        ), !0;
      case "gotpointercapture":
        return c = r.pointerId, ki.set(
          c,
          Ni(
            ki.get(c) || null,
            e,
            t,
            n,
            a,
            r
          )
        ), !0;
    }
    return !1;
  }
  function T0(e) {
    var t = Ha(e.target);
    if (t !== null) {
      var n = u(t);
      if (n !== null) {
        if (t = n.tag, t === 13) {
          if (t = p(n), t !== null) {
            e.blockedOn = t, Ie(e.priority, function() {
              if (n.tag === 13) {
                var a = Ut();
                a = Je(a);
                var r = Ia(n, a);
                r !== null && Lt(r, n, a), $c(n, a);
              }
            });
            return;
          }
        } else if (t === 3 && n.stateNode.current.memoizedState.isDehydrated) {
          e.blockedOn = n.tag === 3 ? n.stateNode.containerInfo : null;
          return;
        }
      }
    }
    e.blockedOn = null;
  }
  function Pr(e) {
    if (e.blockedOn !== null) return !1;
    for (var t = e.targetContainers; 0 < t.length; ) {
      var n = qc(e.nativeEvent);
      if (n === null) {
        n = e.nativeEvent;
        var a = new n.constructor(
          n.type,
          n
        );
        Xo = a, n.target.dispatchEvent(a), Xo = null;
      } else
        return t = $a(n), t !== null && w0(t), e.blockedOn = n, !1;
      t.shift();
    }
    return !0;
  }
  function M0(e, t, n) {
    Pr(e) && n.delete(t);
  }
  function Bv() {
    Yc = !1, ea !== null && Pr(ea) && (ea = null), ta !== null && Pr(ta) && (ta = null), na !== null && Pr(na) && (na = null), ji.forEach(M0), ki.forEach(M0);
  }
  function Wr(e, t) {
    e.blockedOn === t && (e.blockedOn = null, Yc || (Yc = !0, l.unstable_scheduleCallback(
      l.unstable_NormalPriority,
      Bv
    )));
  }
  var Ir = null;
  function A0(e) {
    Ir !== e && (Ir = e, l.unstable_scheduleCallback(
      l.unstable_NormalPriority,
      function() {
        Ir === e && (Ir = null);
        for (var t = 0; t < e.length; t += 3) {
          var n = e[t], a = e[t + 1], r = e[t + 2];
          if (typeof a != "function") {
            if (Gc(a || n) === null)
              continue;
            break;
          }
          var c = $a(n);
          c !== null && (e.splice(t, 3), t -= 3, Gs(
            c,
            {
              pending: !0,
              data: r,
              method: n.method,
              action: a
            },
            a,
            r
          ));
        }
      }
    ));
  }
  function Ri(e) {
    function t(w) {
      return Wr(w, e);
    }
    ea !== null && Wr(ea, e), ta !== null && Wr(ta, e), na !== null && Wr(na, e), ji.forEach(t), ki.forEach(t);
    for (var n = 0; n < aa.length; n++) {
      var a = aa[n];
      a.blockedOn === e && (a.blockedOn = null);
    }
    for (; 0 < aa.length && (n = aa[0], n.blockedOn === null); )
      T0(n), n.blockedOn === null && aa.shift();
    if (n = (e.ownerDocument || e).$$reactFormReplay, n != null)
      for (a = 0; a < n.length; a += 3) {
        var r = n[a], c = n[a + 1], d = r[Oe] || null;
        if (typeof c == "function")
          d || A0(n);
        else if (d) {
          var b = null;
          if (c && c.hasAttribute("formAction")) {
            if (r = c, d = c[Oe] || null)
              b = d.formAction;
            else if (Gc(r) !== null) continue;
          } else b = d.action;
          typeof b == "function" ? n[a + 1] = b : (n.splice(a, 3), a -= 3), A0(n);
        }
      }
  }
  function Qc(e) {
    this._internalRoot = e;
  }
  Fr.prototype.render = Qc.prototype.render = function(e) {
    var t = this._internalRoot;
    if (t === null) throw Error(s(409));
    var n = t.current, a = Ut();
    S0(n, a, e, t, null, null);
  }, Fr.prototype.unmount = Qc.prototype.unmount = function() {
    var e = this._internalRoot;
    if (e !== null) {
      this._internalRoot = null;
      var t = e.containerInfo;
      S0(e.current, 2, null, e, null, null), zr(), t[nt] = null;
    }
  };
  function Fr(e) {
    this._internalRoot = e;
  }
  Fr.prototype.unstable_scheduleHydration = function(e) {
    if (e) {
      var t = ma();
      e = { blockedOn: null, target: e, priority: t };
      for (var n = 0; n < aa.length && t !== 0 && t < aa[n].priority; n++) ;
      aa.splice(n, 0, e), n === 0 && T0(e);
    }
  };
  var j0 = i.version;
  if (j0 !== "19.1.1")
    throw Error(
      s(
        527,
        j0,
        "19.1.1"
      )
    );
  Q.findDOMNode = function(e) {
    var t = e._reactInternals;
    if (t === void 0)
      throw typeof e.render == "function" ? Error(s(188)) : (e = Object.keys(e).join(","), Error(s(268, e)));
    return e = v(t), e = e !== null ? h(e) : null, e = e === null ? null : e.stateNode, e;
  };
  var Hv = {
    bundleType: 0,
    version: "19.1.1",
    rendererPackageName: "react-dom",
    currentDispatcherRef: R,
    reconcilerVersion: "19.1.1"
  };
  if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u") {
    var eo = __REACT_DEVTOOLS_GLOBAL_HOOK__;
    if (!eo.isDisabled && eo.supportsFiber)
      try {
        nn = eo.inject(
          Hv
        ), St = eo;
      } catch {
      }
  }
  return zi.createRoot = function(e, t) {
    if (!f(e)) throw Error(s(299));
    var n = !1, a = "", r = Qd, c = Xd, d = Zd, b = null;
    return t != null && (t.unstable_strictMode === !0 && (n = !0), t.identifierPrefix !== void 0 && (a = t.identifierPrefix), t.onUncaughtError !== void 0 && (r = t.onUncaughtError), t.onCaughtError !== void 0 && (c = t.onCaughtError), t.onRecoverableError !== void 0 && (d = t.onRecoverableError), t.unstable_transitionCallbacks !== void 0 && (b = t.unstable_transitionCallbacks)), t = y0(
      e,
      1,
      !1,
      null,
      null,
      n,
      a,
      r,
      c,
      d,
      b,
      null
    ), e[nt] = t.current, Mc(e), new Qc(t);
  }, zi.hydrateRoot = function(e, t, n) {
    if (!f(e)) throw Error(s(299));
    var a = !1, r = "", c = Qd, d = Xd, b = Zd, w = null, N = null;
    return n != null && (n.unstable_strictMode === !0 && (a = !0), n.identifierPrefix !== void 0 && (r = n.identifierPrefix), n.onUncaughtError !== void 0 && (c = n.onUncaughtError), n.onCaughtError !== void 0 && (d = n.onCaughtError), n.onRecoverableError !== void 0 && (b = n.onRecoverableError), n.unstable_transitionCallbacks !== void 0 && (w = n.unstable_transitionCallbacks), n.formState !== void 0 && (N = n.formState)), t = y0(
      e,
      1,
      !0,
      t,
      n ?? null,
      a,
      r,
      c,
      d,
      b,
      w,
      N
    ), t.context = x0(null), n = t.current, a = Ut(), a = Je(a), r = $n(a), r.callback = null, Vn(n, r, a), n = a, t.current.lanes = n, Un(t, n), cn(t), e[nt] = t.current, Mc(e), new Fr(t);
  }, zi.version = "19.1.1", zi;
}
var H0;
function Fv() {
  if (H0) return Zc.exports;
  H0 = 1;
  function l() {
    if (!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ > "u" || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE != "function"))
      try {
        __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l);
      } catch (i) {
        console.error(i);
      }
  }
  return l(), Zc.exports = Iv(), Zc.exports;
}
var eg = Fv(), x = jo();
const Z = /* @__PURE__ */ qh(x), Yh = /* @__PURE__ */ Qv({
  __proto__: null,
  default: Z
}, [x]), ju = x.createContext({
  viverseApp: null,
  enabledConfig: {
    questUi: !0,
    enterVrButton: !0,
    chatUi: !0,
    audioChatUi: !0
  },
  autoOpenQuestPanel: !0
});
function tg({
  children: l,
  viverseApp: i,
  enabledConfig: o,
  autoOpenQuestPanel: s
}) {
  return /* @__PURE__ */ S.jsx(ju.Provider, { value: { viverseApp: i, enabledConfig: o, autoOpenQuestPanel: s }, children: l });
}
function sa(l, i, { checkForDefaultPrevented: o = !0 } = {}) {
  return function(f) {
    if (l?.(f), o === !1 || !f.defaultPrevented)
      return i?.(f);
  };
}
function $0(l, i) {
  if (typeof l == "function")
    return l(i);
  l != null && (l.current = i);
}
function Qh(...l) {
  return (i) => {
    let o = !1;
    const s = l.map((f) => {
      const u = $0(f, i);
      return !o && typeof u == "function" && (o = !0), u;
    });
    if (o)
      return () => {
        for (let f = 0; f < s.length; f++) {
          const u = s[f];
          typeof u == "function" ? u() : $0(l[f], null);
        }
      };
  };
}
function za(...l) {
  return x.useCallback(Qh(...l), l);
}
function ng(l, i) {
  const o = x.createContext(i), s = (u) => {
    const { children: p, ...m } = u, v = x.useMemo(() => m, Object.values(m));
    return /* @__PURE__ */ S.jsx(o.Provider, { value: v, children: p });
  };
  s.displayName = l + "Provider";
  function f(u) {
    const p = x.useContext(o);
    if (p) return p;
    if (i !== void 0) return i;
    throw new Error(`\`${u}\` must be used within \`${l}\``);
  }
  return [s, f];
}
function Xh(l, i = []) {
  let o = [];
  function s(u, p) {
    const m = x.createContext(p), v = o.length;
    o = [...o, p];
    const h = (g) => {
      const { scope: _, children: M, ...j } = g, A = _?.[l]?.[v] || m, O = x.useMemo(() => j, Object.values(j));
      return /* @__PURE__ */ S.jsx(A.Provider, { value: O, children: M });
    };
    h.displayName = u + "Provider";
    function y(g, _) {
      const M = _?.[l]?.[v] || m, j = x.useContext(M);
      if (j) return j;
      if (p !== void 0) return p;
      throw new Error(`\`${g}\` must be used within \`${u}\``);
    }
    return [h, y];
  }
  const f = () => {
    const u = o.map((p) => x.createContext(p));
    return function(m) {
      const v = m?.[l] || u;
      return x.useMemo(
        () => ({ [`__scope${l}`]: { ...m, [l]: v } }),
        [m, v]
      );
    };
  };
  return f.scopeName = l, [s, ag(f, ...i)];
}
function ag(...l) {
  const i = l[0];
  if (l.length === 1) return i;
  const o = () => {
    const s = l.map((f) => ({
      useScope: f(),
      scopeName: f.scopeName
    }));
    return function(u) {
      const p = s.reduce((m, { useScope: v, scopeName: h }) => {
        const g = v(u)[`__scope${h}`];
        return { ...m, ...g };
      }, {});
      return x.useMemo(() => ({ [`__scope${i.scopeName}`]: p }), [p]);
    };
  };
  return o.scopeName = i.scopeName, o;
}
var ua = globalThis?.document ? x.useLayoutEffect : () => {
}, lg = Yh[" useId ".trim().toString()] || (() => {
}), ig = 0;
function Ic(l) {
  const [i, o] = x.useState(lg());
  return ua(() => {
    o((s) => s ?? String(ig++));
  }, [l]), l || (i ? `radix-${i}` : "");
}
var rg = Yh[" useInsertionEffect ".trim().toString()] || ua;
function og({
  prop: l,
  defaultProp: i,
  onChange: o = () => {
  },
  caller: s
}) {
  const [f, u, p] = sg({
    defaultProp: i,
    onChange: o
  }), m = l !== void 0, v = m ? l : f;
  {
    const y = x.useRef(l !== void 0);
    x.useEffect(() => {
      const g = y.current;
      g !== m && console.warn(
        `${s} is changing from ${g ? "controlled" : "uncontrolled"} to ${m ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
      ), y.current = m;
    }, [m, s]);
  }
  const h = x.useCallback(
    (y) => {
      if (m) {
        const g = cg(y) ? y(l) : y;
        g !== l && p.current?.(g);
      } else
        u(y);
    },
    [m, l, u, p]
  );
  return [v, h];
}
function sg({
  defaultProp: l,
  onChange: i
}) {
  const [o, s] = x.useState(l), f = x.useRef(o), u = x.useRef(i);
  return rg(() => {
    u.current = i;
  }, [i]), x.useEffect(() => {
    f.current !== o && (u.current?.(o), f.current = o);
  }, [o, f]), [o, s, u];
}
function cg(l) {
  return typeof l == "function";
}
var Zh = Gh();
const Kh = /* @__PURE__ */ qh(Zh);
// @__NO_SIDE_EFFECTS__
function Jh(l) {
  const i = /* @__PURE__ */ ug(l), o = x.forwardRef((s, f) => {
    const { children: u, ...p } = s, m = x.Children.toArray(u), v = m.find(dg);
    if (v) {
      const h = v.props.children, y = m.map((g) => g === v ? x.Children.count(h) > 1 ? x.Children.only(null) : x.isValidElement(h) ? h.props.children : null : g);
      return /* @__PURE__ */ S.jsx(i, { ...p, ref: f, children: x.isValidElement(h) ? x.cloneElement(h, void 0, y) : null });
    }
    return /* @__PURE__ */ S.jsx(i, { ...p, ref: f, children: u });
  });
  return o.displayName = `${l}.Slot`, o;
}
// @__NO_SIDE_EFFECTS__
function ug(l) {
  const i = x.forwardRef((o, s) => {
    const { children: f, ...u } = o;
    if (x.isValidElement(f)) {
      const p = mg(f), m = hg(u, f.props);
      return f.type !== x.Fragment && (m.ref = s ? Qh(s, p) : p), x.cloneElement(f, m);
    }
    return x.Children.count(f) > 1 ? x.Children.only(null) : null;
  });
  return i.displayName = `${l}.SlotClone`, i;
}
var fg = Symbol("radix.slottable");
function dg(l) {
  return x.isValidElement(l) && typeof l.type == "function" && "__radixId" in l.type && l.type.__radixId === fg;
}
function hg(l, i) {
  const o = { ...i };
  for (const s in i) {
    const f = l[s], u = i[s];
    /^on[A-Z]/.test(s) ? f && u ? o[s] = (...m) => {
      const v = u(...m);
      return f(...m), v;
    } : f && (o[s] = f) : s === "style" ? o[s] = { ...f, ...u } : s === "className" && (o[s] = [f, u].filter(Boolean).join(" "));
  }
  return { ...l, ...o };
}
function mg(l) {
  let i = Object.getOwnPropertyDescriptor(l.props, "ref")?.get, o = i && "isReactWarning" in i && i.isReactWarning;
  return o ? l.ref : (i = Object.getOwnPropertyDescriptor(l, "ref")?.get, o = i && "isReactWarning" in i && i.isReactWarning, o ? l.props.ref : l.props.ref || l.ref);
}
var pg = [
  "a",
  "button",
  "div",
  "form",
  "h2",
  "h3",
  "img",
  "input",
  "label",
  "li",
  "nav",
  "ol",
  "p",
  "select",
  "span",
  "svg",
  "ul"
], Jt = pg.reduce((l, i) => {
  const o = /* @__PURE__ */ Jh(`Primitive.${i}`), s = x.forwardRef((f, u) => {
    const { asChild: p, ...m } = f, v = p ? o : i;
    return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ S.jsx(v, { ...m, ref: u });
  });
  return s.displayName = `Primitive.${i}`, { ...l, [i]: s };
}, {});
function vg(l, i) {
  l && Zh.flushSync(() => l.dispatchEvent(i));
}
function jl(l) {
  const i = x.useRef(l);
  return x.useEffect(() => {
    i.current = l;
  }), x.useMemo(() => (...o) => i.current?.(...o), []);
}
function gg(l, i = globalThis?.document) {
  const o = jl(l);
  x.useEffect(() => {
    const s = (f) => {
      f.key === "Escape" && o(f);
    };
    return i.addEventListener("keydown", s, { capture: !0 }), () => i.removeEventListener("keydown", s, { capture: !0 });
  }, [o, i]);
}
var bg = "DismissableLayer", gu = "dismissableLayer.update", yg = "dismissableLayer.pointerDownOutside", xg = "dismissableLayer.focusOutside", V0, Ph = x.createContext({
  layers: /* @__PURE__ */ new Set(),
  layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
  branches: /* @__PURE__ */ new Set()
}), Wh = x.forwardRef(
  (l, i) => {
    const {
      disableOutsidePointerEvents: o = !1,
      onEscapeKeyDown: s,
      onPointerDownOutside: f,
      onFocusOutside: u,
      onInteractOutside: p,
      onDismiss: m,
      ...v
    } = l, h = x.useContext(Ph), [y, g] = x.useState(null), _ = y?.ownerDocument ?? globalThis?.document, [, M] = x.useState({}), j = za(i, (ee) => g(ee)), A = Array.from(h.layers), [O] = [...h.layersWithOutsidePointerEventsDisabled].slice(-1), U = A.indexOf(O), F = y ? A.indexOf(y) : -1, P = h.layersWithOutsidePointerEventsDisabled.size > 0, Y = F >= U, J = wg((ee) => {
      const K = ee.target, fe = [...h.branches].some((Ze) => Ze.contains(K));
      !Y || fe || (f?.(ee), p?.(ee), ee.defaultPrevented || m?.());
    }, _), W = Cg((ee) => {
      const K = ee.target;
      [...h.branches].some((Ze) => Ze.contains(K)) || (u?.(ee), p?.(ee), ee.defaultPrevented || m?.());
    }, _);
    return gg((ee) => {
      F === h.layers.size - 1 && (s?.(ee), !ee.defaultPrevented && m && (ee.preventDefault(), m()));
    }, _), x.useEffect(() => {
      if (y)
        return o && (h.layersWithOutsidePointerEventsDisabled.size === 0 && (V0 = _.body.style.pointerEvents, _.body.style.pointerEvents = "none"), h.layersWithOutsidePointerEventsDisabled.add(y)), h.layers.add(y), q0(), () => {
          o && h.layersWithOutsidePointerEventsDisabled.size === 1 && (_.body.style.pointerEvents = V0);
        };
    }, [y, _, o, h]), x.useEffect(() => () => {
      y && (h.layers.delete(y), h.layersWithOutsidePointerEventsDisabled.delete(y), q0());
    }, [y, h]), x.useEffect(() => {
      const ee = () => M({});
      return document.addEventListener(gu, ee), () => document.removeEventListener(gu, ee);
    }, []), /* @__PURE__ */ S.jsx(
      Jt.div,
      {
        ...v,
        ref: j,
        style: {
          pointerEvents: P ? Y ? "auto" : "none" : void 0,
          ...l.style
        },
        onFocusCapture: sa(l.onFocusCapture, W.onFocusCapture),
        onBlurCapture: sa(l.onBlurCapture, W.onBlurCapture),
        onPointerDownCapture: sa(
          l.onPointerDownCapture,
          J.onPointerDownCapture
        )
      }
    );
  }
);
Wh.displayName = bg;
var Sg = "DismissableLayerBranch", _g = x.forwardRef((l, i) => {
  const o = x.useContext(Ph), s = x.useRef(null), f = za(i, s);
  return x.useEffect(() => {
    const u = s.current;
    if (u)
      return o.branches.add(u), () => {
        o.branches.delete(u);
      };
  }, [o.branches]), /* @__PURE__ */ S.jsx(Jt.div, { ...l, ref: f });
});
_g.displayName = Sg;
function wg(l, i = globalThis?.document) {
  const o = jl(l), s = x.useRef(!1), f = x.useRef(() => {
  });
  return x.useEffect(() => {
    const u = (m) => {
      if (m.target && !s.current) {
        let v = function() {
          Ih(
            yg,
            o,
            h,
            { discrete: !0 }
          );
        };
        const h = { originalEvent: m };
        m.pointerType === "touch" ? (i.removeEventListener("click", f.current), f.current = v, i.addEventListener("click", f.current, { once: !0 })) : v();
      } else
        i.removeEventListener("click", f.current);
      s.current = !1;
    }, p = window.setTimeout(() => {
      i.addEventListener("pointerdown", u);
    }, 0);
    return () => {
      window.clearTimeout(p), i.removeEventListener("pointerdown", u), i.removeEventListener("click", f.current);
    };
  }, [i, o]), {
    // ensures we check React component tree (not just DOM tree)
    onPointerDownCapture: () => s.current = !0
  };
}
function Cg(l, i = globalThis?.document) {
  const o = jl(l), s = x.useRef(!1);
  return x.useEffect(() => {
    const f = (u) => {
      u.target && !s.current && Ih(xg, o, { originalEvent: u }, {
        discrete: !1
      });
    };
    return i.addEventListener("focusin", f), () => i.removeEventListener("focusin", f);
  }, [i, o]), {
    onFocusCapture: () => s.current = !0,
    onBlurCapture: () => s.current = !1
  };
}
function q0() {
  const l = new CustomEvent(gu);
  document.dispatchEvent(l);
}
function Ih(l, i, o, { discrete: s }) {
  const f = o.originalEvent.target, u = new CustomEvent(l, { bubbles: !1, cancelable: !0, detail: o });
  i && f.addEventListener(l, i, { once: !0 }), s ? vg(f, u) : f.dispatchEvent(u);
}
var Fc = "focusScope.autoFocusOnMount", eu = "focusScope.autoFocusOnUnmount", G0 = { bubbles: !1, cancelable: !0 }, Eg = "FocusScope", Fh = x.forwardRef((l, i) => {
  const {
    loop: o = !1,
    trapped: s = !1,
    onMountAutoFocus: f,
    onUnmountAutoFocus: u,
    ...p
  } = l, [m, v] = x.useState(null), h = jl(f), y = jl(u), g = x.useRef(null), _ = za(i, (A) => v(A)), M = x.useRef({
    paused: !1,
    pause() {
      this.paused = !0;
    },
    resume() {
      this.paused = !1;
    }
  }).current;
  x.useEffect(() => {
    if (s) {
      let A = function(P) {
        if (M.paused || !m) return;
        const Y = P.target;
        m.contains(Y) ? g.current = Y : ra(g.current, { select: !0 });
      }, O = function(P) {
        if (M.paused || !m) return;
        const Y = P.relatedTarget;
        Y !== null && (m.contains(Y) || ra(g.current, { select: !0 }));
      }, U = function(P) {
        if (document.activeElement === document.body)
          for (const J of P)
            J.removedNodes.length > 0 && ra(m);
      };
      document.addEventListener("focusin", A), document.addEventListener("focusout", O);
      const F = new MutationObserver(U);
      return m && F.observe(m, { childList: !0, subtree: !0 }), () => {
        document.removeEventListener("focusin", A), document.removeEventListener("focusout", O), F.disconnect();
      };
    }
  }, [s, m, M.paused]), x.useEffect(() => {
    if (m) {
      Q0.add(M);
      const A = document.activeElement;
      if (!m.contains(A)) {
        const U = new CustomEvent(Fc, G0);
        m.addEventListener(Fc, h), m.dispatchEvent(U), U.defaultPrevented || (Tg(Ng(e2(m)), { select: !0 }), document.activeElement === A && ra(m));
      }
      return () => {
        m.removeEventListener(Fc, h), setTimeout(() => {
          const U = new CustomEvent(eu, G0);
          m.addEventListener(eu, y), m.dispatchEvent(U), U.defaultPrevented || ra(A ?? document.body, { select: !0 }), m.removeEventListener(eu, y), Q0.remove(M);
        }, 0);
      };
    }
  }, [m, h, y, M]);
  const j = x.useCallback(
    (A) => {
      if (!o && !s || M.paused) return;
      const O = A.key === "Tab" && !A.altKey && !A.ctrlKey && !A.metaKey, U = document.activeElement;
      if (O && U) {
        const F = A.currentTarget, [P, Y] = Mg(F);
        P && Y ? !A.shiftKey && U === Y ? (A.preventDefault(), o && ra(P, { select: !0 })) : A.shiftKey && U === P && (A.preventDefault(), o && ra(Y, { select: !0 })) : U === F && A.preventDefault();
      }
    },
    [o, s, M.paused]
  );
  return /* @__PURE__ */ S.jsx(Jt.div, { tabIndex: -1, ...p, ref: _, onKeyDown: j });
});
Fh.displayName = Eg;
function Tg(l, { select: i = !1 } = {}) {
  const o = document.activeElement;
  for (const s of l)
    if (ra(s, { select: i }), document.activeElement !== o) return;
}
function Mg(l) {
  const i = e2(l), o = Y0(i, l), s = Y0(i.reverse(), l);
  return [o, s];
}
function e2(l) {
  const i = [], o = document.createTreeWalker(l, NodeFilter.SHOW_ELEMENT, {
    acceptNode: (s) => {
      const f = s.tagName === "INPUT" && s.type === "hidden";
      return s.disabled || s.hidden || f ? NodeFilter.FILTER_SKIP : s.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
    }
  });
  for (; o.nextNode(); ) i.push(o.currentNode);
  return i;
}
function Y0(l, i) {
  for (const o of l)
    if (!Ag(o, { upTo: i })) return o;
}
function Ag(l, { upTo: i }) {
  if (getComputedStyle(l).visibility === "hidden") return !0;
  for (; l; ) {
    if (i !== void 0 && l === i) return !1;
    if (getComputedStyle(l).display === "none") return !0;
    l = l.parentElement;
  }
  return !1;
}
function jg(l) {
  return l instanceof HTMLInputElement && "select" in l;
}
function ra(l, { select: i = !1 } = {}) {
  if (l && l.focus) {
    const o = document.activeElement;
    l.focus({ preventScroll: !0 }), l !== o && jg(l) && i && l.select();
  }
}
var Q0 = kg();
function kg() {
  let l = [];
  return {
    add(i) {
      const o = l[0];
      i !== o && o?.pause(), l = X0(l, i), l.unshift(i);
    },
    remove(i) {
      l = X0(l, i), l[0]?.resume();
    }
  };
}
function X0(l, i) {
  const o = [...l], s = o.indexOf(i);
  return s !== -1 && o.splice(s, 1), o;
}
function Ng(l) {
  return l.filter((i) => i.tagName !== "A");
}
var Rg = "Portal", t2 = x.forwardRef((l, i) => {
  const { container: o, ...s } = l, [f, u] = x.useState(!1);
  ua(() => u(!0), []);
  const p = o || f && globalThis?.document?.body;
  return p ? Kh.createPortal(/* @__PURE__ */ S.jsx(Jt.div, { ...s, ref: i }), p) : null;
});
t2.displayName = Rg;
function Dg(l, i) {
  return x.useReducer((o, s) => i[o][s] ?? o, l);
}
var ko = (l) => {
  const { present: i, children: o } = l, s = zg(i), f = typeof o == "function" ? o({ present: s.isPresent }) : x.Children.only(o), u = za(s.ref, Og(f));
  return typeof o == "function" || s.isPresent ? x.cloneElement(f, { ref: u }) : null;
};
ko.displayName = "Presence";
function zg(l) {
  const [i, o] = x.useState(), s = x.useRef(null), f = x.useRef(l), u = x.useRef("none"), p = l ? "mounted" : "unmounted", [m, v] = Dg(p, {
    mounted: {
      UNMOUNT: "unmounted",
      ANIMATION_OUT: "unmountSuspended"
    },
    unmountSuspended: {
      MOUNT: "mounted",
      ANIMATION_END: "unmounted"
    },
    unmounted: {
      MOUNT: "mounted"
    }
  });
  return x.useEffect(() => {
    const h = to(s.current);
    u.current = m === "mounted" ? h : "none";
  }, [m]), ua(() => {
    const h = s.current, y = f.current;
    if (y !== l) {
      const _ = u.current, M = to(h);
      l ? v("MOUNT") : M === "none" || h?.display === "none" ? v("UNMOUNT") : v(y && _ !== M ? "ANIMATION_OUT" : "UNMOUNT"), f.current = l;
    }
  }, [l, v]), ua(() => {
    if (i) {
      let h;
      const y = i.ownerDocument.defaultView ?? window, g = (M) => {
        const A = to(s.current).includes(CSS.escape(M.animationName));
        if (M.target === i && A && (v("ANIMATION_END"), !f.current)) {
          const O = i.style.animationFillMode;
          i.style.animationFillMode = "forwards", h = y.setTimeout(() => {
            i.style.animationFillMode === "forwards" && (i.style.animationFillMode = O);
          });
        }
      }, _ = (M) => {
        M.target === i && (u.current = to(s.current));
      };
      return i.addEventListener("animationstart", _), i.addEventListener("animationcancel", g), i.addEventListener("animationend", g), () => {
        y.clearTimeout(h), i.removeEventListener("animationstart", _), i.removeEventListener("animationcancel", g), i.removeEventListener("animationend", g);
      };
    } else
      v("ANIMATION_END");
  }, [i, v]), {
    isPresent: ["mounted", "unmountSuspended"].includes(m),
    ref: x.useCallback((h) => {
      s.current = h ? getComputedStyle(h) : null, o(h);
    }, [])
  };
}
function to(l) {
  return l?.animationName || "none";
}
function Og(l) {
  let i = Object.getOwnPropertyDescriptor(l.props, "ref")?.get, o = i && "isReactWarning" in i && i.isReactWarning;
  return o ? l.ref : (i = Object.getOwnPropertyDescriptor(l, "ref")?.get, o = i && "isReactWarning" in i && i.isReactWarning, o ? l.props.ref : l.props.ref || l.ref);
}
var tu = 0;
function Ug() {
  x.useEffect(() => {
    const l = document.querySelectorAll("[data-radix-focus-guard]");
    return document.body.insertAdjacentElement("afterbegin", l[0] ?? Z0()), document.body.insertAdjacentElement("beforeend", l[1] ?? Z0()), tu++, () => {
      tu === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((i) => i.remove()), tu--;
    };
  }, []);
}
function Z0() {
  const l = document.createElement("span");
  return l.setAttribute("data-radix-focus-guard", ""), l.tabIndex = 0, l.style.outline = "none", l.style.opacity = "0", l.style.position = "fixed", l.style.pointerEvents = "none", l;
}
var dn = function() {
  return dn = Object.assign || function(i) {
    for (var o, s = 1, f = arguments.length; s < f; s++) {
      o = arguments[s];
      for (var u in o) Object.prototype.hasOwnProperty.call(o, u) && (i[u] = o[u]);
    }
    return i;
  }, dn.apply(this, arguments);
};
function n2(l, i) {
  var o = {};
  for (var s in l) Object.prototype.hasOwnProperty.call(l, s) && i.indexOf(s) < 0 && (o[s] = l[s]);
  if (l != null && typeof Object.getOwnPropertySymbols == "function")
    for (var f = 0, s = Object.getOwnPropertySymbols(l); f < s.length; f++)
      i.indexOf(s[f]) < 0 && Object.prototype.propertyIsEnumerable.call(l, s[f]) && (o[s[f]] = l[s[f]]);
  return o;
}
function Lg(l, i, o) {
  if (o || arguments.length === 2) for (var s = 0, f = i.length, u; s < f; s++)
    (u || !(s in i)) && (u || (u = Array.prototype.slice.call(i, 0, s)), u[s] = i[s]);
  return l.concat(u || Array.prototype.slice.call(i));
}
var mo = "right-scroll-bar-position", po = "width-before-scroll-bar", Bg = "with-scroll-bars-hidden", Hg = "--removed-body-scroll-bar-size";
function nu(l, i) {
  return typeof l == "function" ? l(i) : l && (l.current = i), l;
}
function $g(l, i) {
  var o = x.useState(function() {
    return {
      // value
      value: l,
      // last callback
      callback: i,
      // "memoized" public interface
      facade: {
        get current() {
          return o.value;
        },
        set current(s) {
          var f = o.value;
          f !== s && (o.value = s, o.callback(s, f));
        }
      }
    };
  })[0];
  return o.callback = i, o.facade;
}
var Vg = typeof window < "u" ? x.useLayoutEffect : x.useEffect, K0 = /* @__PURE__ */ new WeakMap();
function qg(l, i) {
  var o = $g(null, function(s) {
    return l.forEach(function(f) {
      return nu(f, s);
    });
  });
  return Vg(function() {
    var s = K0.get(o);
    if (s) {
      var f = new Set(s), u = new Set(l), p = o.current;
      f.forEach(function(m) {
        u.has(m) || nu(m, null);
      }), u.forEach(function(m) {
        f.has(m) || nu(m, p);
      });
    }
    K0.set(o, l);
  }, [l]), o;
}
function Gg(l) {
  return l;
}
function Yg(l, i) {
  i === void 0 && (i = Gg);
  var o = [], s = !1, f = {
    read: function() {
      if (s)
        throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
      return o.length ? o[o.length - 1] : l;
    },
    useMedium: function(u) {
      var p = i(u, s);
      return o.push(p), function() {
        o = o.filter(function(m) {
          return m !== p;
        });
      };
    },
    assignSyncMedium: function(u) {
      for (s = !0; o.length; ) {
        var p = o;
        o = [], p.forEach(u);
      }
      o = {
        push: function(m) {
          return u(m);
        },
        filter: function() {
          return o;
        }
      };
    },
    assignMedium: function(u) {
      s = !0;
      var p = [];
      if (o.length) {
        var m = o;
        o = [], m.forEach(u), p = o;
      }
      var v = function() {
        var y = p;
        p = [], y.forEach(u);
      }, h = function() {
        return Promise.resolve().then(v);
      };
      h(), o = {
        push: function(y) {
          p.push(y), h();
        },
        filter: function(y) {
          return p = p.filter(y), o;
        }
      };
    }
  };
  return f;
}
function Qg(l) {
  l === void 0 && (l = {});
  var i = Yg(null);
  return i.options = dn({ async: !0, ssr: !1 }, l), i;
}
var a2 = function(l) {
  var i = l.sideCar, o = n2(l, ["sideCar"]);
  if (!i)
    throw new Error("Sidecar: please provide `sideCar` property to import the right car");
  var s = i.read();
  if (!s)
    throw new Error("Sidecar medium not found");
  return x.createElement(s, dn({}, o));
};
a2.isSideCarExport = !0;
function Xg(l, i) {
  return l.useMedium(i), a2;
}
var l2 = Qg(), au = function() {
}, No = x.forwardRef(function(l, i) {
  var o = x.useRef(null), s = x.useState({
    onScrollCapture: au,
    onWheelCapture: au,
    onTouchMoveCapture: au
  }), f = s[0], u = s[1], p = l.forwardProps, m = l.children, v = l.className, h = l.removeScrollBar, y = l.enabled, g = l.shards, _ = l.sideCar, M = l.noRelative, j = l.noIsolation, A = l.inert, O = l.allowPinchZoom, U = l.as, F = U === void 0 ? "div" : U, P = l.gapMode, Y = n2(l, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), J = _, W = qg([o, i]), ee = dn(dn({}, Y), f);
  return x.createElement(
    x.Fragment,
    null,
    y && x.createElement(J, { sideCar: l2, removeScrollBar: h, shards: g, noRelative: M, noIsolation: j, inert: A, setCallbacks: u, allowPinchZoom: !!O, lockRef: o, gapMode: P }),
    p ? x.cloneElement(x.Children.only(m), dn(dn({}, ee), { ref: W })) : x.createElement(F, dn({}, ee, { className: v, ref: W }), m)
  );
});
No.defaultProps = {
  enabled: !0,
  removeScrollBar: !0,
  inert: !1
};
No.classNames = {
  fullWidth: po,
  zeroRight: mo
};
var Zg = function() {
  if (typeof __webpack_nonce__ < "u")
    return __webpack_nonce__;
};
function Kg() {
  if (!document)
    return null;
  var l = document.createElement("style");
  l.type = "text/css";
  var i = Zg();
  return i && l.setAttribute("nonce", i), l;
}
function Jg(l, i) {
  l.styleSheet ? l.styleSheet.cssText = i : l.appendChild(document.createTextNode(i));
}
function Pg(l) {
  var i = document.head || document.getElementsByTagName("head")[0];
  i.appendChild(l);
}
var Wg = function() {
  var l = 0, i = null;
  return {
    add: function(o) {
      l == 0 && (i = Kg()) && (Jg(i, o), Pg(i)), l++;
    },
    remove: function() {
      l--, !l && i && (i.parentNode && i.parentNode.removeChild(i), i = null);
    }
  };
}, Ig = function() {
  var l = Wg();
  return function(i, o) {
    x.useEffect(function() {
      return l.add(i), function() {
        l.remove();
      };
    }, [i && o]);
  };
}, i2 = function() {
  var l = Ig(), i = function(o) {
    var s = o.styles, f = o.dynamic;
    return l(s, f), null;
  };
  return i;
}, Fg = {
  left: 0,
  top: 0,
  right: 0,
  gap: 0
}, lu = function(l) {
  return parseInt(l || "", 10) || 0;
}, e3 = function(l) {
  var i = window.getComputedStyle(document.body), o = i[l === "padding" ? "paddingLeft" : "marginLeft"], s = i[l === "padding" ? "paddingTop" : "marginTop"], f = i[l === "padding" ? "paddingRight" : "marginRight"];
  return [lu(o), lu(s), lu(f)];
}, t3 = function(l) {
  if (l === void 0 && (l = "margin"), typeof window > "u")
    return Fg;
  var i = e3(l), o = document.documentElement.clientWidth, s = window.innerWidth;
  return {
    left: i[0],
    top: i[1],
    right: i[2],
    gap: Math.max(0, s - o + i[2] - i[0])
  };
}, n3 = i2(), Ml = "data-scroll-locked", a3 = function(l, i, o, s) {
  var f = l.left, u = l.top, p = l.right, m = l.gap;
  return o === void 0 && (o = "margin"), `
  .`.concat(Bg, ` {
   overflow: hidden `).concat(s, `;
   padding-right: `).concat(m, "px ").concat(s, `;
  }
  body[`).concat(Ml, `] {
    overflow: hidden `).concat(s, `;
    overscroll-behavior: contain;
    `).concat([
    i && "position: relative ".concat(s, ";"),
    o === "margin" && `
    padding-left: `.concat(f, `px;
    padding-top: `).concat(u, `px;
    padding-right: `).concat(p, `px;
    margin-left:0;
    margin-top:0;
    margin-right: `).concat(m, "px ").concat(s, `;
    `),
    o === "padding" && "padding-right: ".concat(m, "px ").concat(s, ";")
  ].filter(Boolean).join(""), `
  }
  
  .`).concat(mo, ` {
    right: `).concat(m, "px ").concat(s, `;
  }
  
  .`).concat(po, ` {
    margin-right: `).concat(m, "px ").concat(s, `;
  }
  
  .`).concat(mo, " .").concat(mo, ` {
    right: 0 `).concat(s, `;
  }
  
  .`).concat(po, " .").concat(po, ` {
    margin-right: 0 `).concat(s, `;
  }
  
  body[`).concat(Ml, `] {
    `).concat(Hg, ": ").concat(m, `px;
  }
`);
}, J0 = function() {
  var l = parseInt(document.body.getAttribute(Ml) || "0", 10);
  return isFinite(l) ? l : 0;
}, l3 = function() {
  x.useEffect(function() {
    return document.body.setAttribute(Ml, (J0() + 1).toString()), function() {
      var l = J0() - 1;
      l <= 0 ? document.body.removeAttribute(Ml) : document.body.setAttribute(Ml, l.toString());
    };
  }, []);
}, i3 = function(l) {
  var i = l.noRelative, o = l.noImportant, s = l.gapMode, f = s === void 0 ? "margin" : s;
  l3();
  var u = x.useMemo(function() {
    return t3(f);
  }, [f]);
  return x.createElement(n3, { styles: a3(u, !i, f, o ? "" : "!important") });
}, bu = !1;
if (typeof window < "u")
  try {
    var no = Object.defineProperty({}, "passive", {
      get: function() {
        return bu = !0, !0;
      }
    });
    window.addEventListener("test", no, no), window.removeEventListener("test", no, no);
  } catch {
    bu = !1;
  }
var wl = bu ? { passive: !1 } : !1, r3 = function(l) {
  return l.tagName === "TEXTAREA";
}, r2 = function(l, i) {
  if (!(l instanceof Element))
    return !1;
  var o = window.getComputedStyle(l);
  return (
    // not-not-scrollable
    o[i] !== "hidden" && // contains scroll inside self
    !(o.overflowY === o.overflowX && !r3(l) && o[i] === "visible")
  );
}, o3 = function(l) {
  return r2(l, "overflowY");
}, s3 = function(l) {
  return r2(l, "overflowX");
}, P0 = function(l, i) {
  var o = i.ownerDocument, s = i;
  do {
    typeof ShadowRoot < "u" && s instanceof ShadowRoot && (s = s.host);
    var f = o2(l, s);
    if (f) {
      var u = s2(l, s), p = u[1], m = u[2];
      if (p > m)
        return !0;
    }
    s = s.parentNode;
  } while (s && s !== o.body);
  return !1;
}, c3 = function(l) {
  var i = l.scrollTop, o = l.scrollHeight, s = l.clientHeight;
  return [
    i,
    o,
    s
  ];
}, u3 = function(l) {
  var i = l.scrollLeft, o = l.scrollWidth, s = l.clientWidth;
  return [
    i,
    o,
    s
  ];
}, o2 = function(l, i) {
  return l === "v" ? o3(i) : s3(i);
}, s2 = function(l, i) {
  return l === "v" ? c3(i) : u3(i);
}, f3 = function(l, i) {
  return l === "h" && i === "rtl" ? -1 : 1;
}, d3 = function(l, i, o, s, f) {
  var u = f3(l, window.getComputedStyle(i).direction), p = u * s, m = o.target, v = i.contains(m), h = !1, y = p > 0, g = 0, _ = 0;
  do {
    if (!m)
      break;
    var M = s2(l, m), j = M[0], A = M[1], O = M[2], U = A - O - u * j;
    (j || U) && o2(l, m) && (g += U, _ += j);
    var F = m.parentNode;
    m = F && F.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? F.host : F;
  } while (
    // portaled content
    !v && m !== document.body || // self content
    v && (i.contains(m) || i === m)
  );
  return (y && Math.abs(g) < 1 || !y && Math.abs(_) < 1) && (h = !0), h;
}, ao = function(l) {
  return "changedTouches" in l ? [l.changedTouches[0].clientX, l.changedTouches[0].clientY] : [0, 0];
}, W0 = function(l) {
  return [l.deltaX, l.deltaY];
}, I0 = function(l) {
  return l && "current" in l ? l.current : l;
}, h3 = function(l, i) {
  return l[0] === i[0] && l[1] === i[1];
}, m3 = function(l) {
  return `
  .block-interactivity-`.concat(l, ` {pointer-events: none;}
  .allow-interactivity-`).concat(l, ` {pointer-events: all;}
`);
}, p3 = 0, Cl = [];
function v3(l) {
  var i = x.useRef([]), o = x.useRef([0, 0]), s = x.useRef(), f = x.useState(p3++)[0], u = x.useState(i2)[0], p = x.useRef(l);
  x.useEffect(function() {
    p.current = l;
  }, [l]), x.useEffect(function() {
    if (l.inert) {
      document.body.classList.add("block-interactivity-".concat(f));
      var A = Lg([l.lockRef.current], (l.shards || []).map(I0), !0).filter(Boolean);
      return A.forEach(function(O) {
        return O.classList.add("allow-interactivity-".concat(f));
      }), function() {
        document.body.classList.remove("block-interactivity-".concat(f)), A.forEach(function(O) {
          return O.classList.remove("allow-interactivity-".concat(f));
        });
      };
    }
  }, [l.inert, l.lockRef.current, l.shards]);
  var m = x.useCallback(function(A, O) {
    if ("touches" in A && A.touches.length === 2 || A.type === "wheel" && A.ctrlKey)
      return !p.current.allowPinchZoom;
    var U = ao(A), F = o.current, P = "deltaX" in A ? A.deltaX : F[0] - U[0], Y = "deltaY" in A ? A.deltaY : F[1] - U[1], J, W = A.target, ee = Math.abs(P) > Math.abs(Y) ? "h" : "v";
    if ("touches" in A && ee === "h" && W.type === "range")
      return !1;
    var K = P0(ee, W);
    if (!K)
      return !0;
    if (K ? J = ee : (J = ee === "v" ? "h" : "v", K = P0(ee, W)), !K)
      return !1;
    if (!s.current && "changedTouches" in A && (P || Y) && (s.current = J), !J)
      return !0;
    var fe = s.current || J;
    return d3(fe, O, A, fe === "h" ? P : Y);
  }, []), v = x.useCallback(function(A) {
    var O = A;
    if (!(!Cl.length || Cl[Cl.length - 1] !== u)) {
      var U = "deltaY" in O ? W0(O) : ao(O), F = i.current.filter(function(J) {
        return J.name === O.type && (J.target === O.target || O.target === J.shadowParent) && h3(J.delta, U);
      })[0];
      if (F && F.should) {
        O.cancelable && O.preventDefault();
        return;
      }
      if (!F) {
        var P = (p.current.shards || []).map(I0).filter(Boolean).filter(function(J) {
          return J.contains(O.target);
        }), Y = P.length > 0 ? m(O, P[0]) : !p.current.noIsolation;
        Y && O.cancelable && O.preventDefault();
      }
    }
  }, []), h = x.useCallback(function(A, O, U, F) {
    var P = { name: A, delta: O, target: U, should: F, shadowParent: g3(U) };
    i.current.push(P), setTimeout(function() {
      i.current = i.current.filter(function(Y) {
        return Y !== P;
      });
    }, 1);
  }, []), y = x.useCallback(function(A) {
    o.current = ao(A), s.current = void 0;
  }, []), g = x.useCallback(function(A) {
    h(A.type, W0(A), A.target, m(A, l.lockRef.current));
  }, []), _ = x.useCallback(function(A) {
    h(A.type, ao(A), A.target, m(A, l.lockRef.current));
  }, []);
  x.useEffect(function() {
    return Cl.push(u), l.setCallbacks({
      onScrollCapture: g,
      onWheelCapture: g,
      onTouchMoveCapture: _
    }), document.addEventListener("wheel", v, wl), document.addEventListener("touchmove", v, wl), document.addEventListener("touchstart", y, wl), function() {
      Cl = Cl.filter(function(A) {
        return A !== u;
      }), document.removeEventListener("wheel", v, wl), document.removeEventListener("touchmove", v, wl), document.removeEventListener("touchstart", y, wl);
    };
  }, []);
  var M = l.removeScrollBar, j = l.inert;
  return x.createElement(
    x.Fragment,
    null,
    j ? x.createElement(u, { styles: m3(f) }) : null,
    M ? x.createElement(i3, { noRelative: l.noRelative, gapMode: l.gapMode }) : null
  );
}
function g3(l) {
  for (var i = null; l !== null; )
    l instanceof ShadowRoot && (i = l.host, l = l.host), l = l.parentNode;
  return i;
}
const b3 = Xg(l2, v3);
var c2 = x.forwardRef(function(l, i) {
  return x.createElement(No, dn({}, l, { ref: i, sideCar: b3 }));
});
c2.classNames = No.classNames;
var y3 = function(l) {
  if (typeof document > "u")
    return null;
  var i = Array.isArray(l) ? l[0] : l;
  return i.ownerDocument.body;
}, El = /* @__PURE__ */ new WeakMap(), lo = /* @__PURE__ */ new WeakMap(), io = {}, iu = 0, u2 = function(l) {
  return l && (l.host || u2(l.parentNode));
}, x3 = function(l, i) {
  return i.map(function(o) {
    if (l.contains(o))
      return o;
    var s = u2(o);
    return s && l.contains(s) ? s : (console.error("aria-hidden", o, "in not contained inside", l, ". Doing nothing"), null);
  }).filter(function(o) {
    return !!o;
  });
}, S3 = function(l, i, o, s) {
  var f = x3(i, Array.isArray(l) ? l : [l]);
  io[o] || (io[o] = /* @__PURE__ */ new WeakMap());
  var u = io[o], p = [], m = /* @__PURE__ */ new Set(), v = new Set(f), h = function(g) {
    !g || m.has(g) || (m.add(g), h(g.parentNode));
  };
  f.forEach(h);
  var y = function(g) {
    !g || v.has(g) || Array.prototype.forEach.call(g.children, function(_) {
      if (m.has(_))
        y(_);
      else
        try {
          var M = _.getAttribute(s), j = M !== null && M !== "false", A = (El.get(_) || 0) + 1, O = (u.get(_) || 0) + 1;
          El.set(_, A), u.set(_, O), p.push(_), A === 1 && j && lo.set(_, !0), O === 1 && _.setAttribute(o, "true"), j || _.setAttribute(s, "true");
        } catch (U) {
          console.error("aria-hidden: cannot operate on ", _, U);
        }
    });
  };
  return y(i), m.clear(), iu++, function() {
    p.forEach(function(g) {
      var _ = El.get(g) - 1, M = u.get(g) - 1;
      El.set(g, _), u.set(g, M), _ || (lo.has(g) || g.removeAttribute(s), lo.delete(g)), M || g.removeAttribute(o);
    }), iu--, iu || (El = /* @__PURE__ */ new WeakMap(), El = /* @__PURE__ */ new WeakMap(), lo = /* @__PURE__ */ new WeakMap(), io = {});
  };
}, _3 = function(l, i, o) {
  o === void 0 && (o = "data-aria-hidden");
  var s = Array.from(Array.isArray(l) ? l : [l]), f = y3(l);
  return f ? (s.push.apply(s, Array.from(f.querySelectorAll("[aria-live], script"))), S3(s, f, o, "aria-hidden")) : function() {
    return null;
  };
}, Ro = "Dialog", [f2, ry] = Xh(Ro), [w3, tn] = f2(Ro), d2 = (l) => {
  const {
    __scopeDialog: i,
    children: o,
    open: s,
    defaultOpen: f,
    onOpenChange: u,
    modal: p = !0
  } = l, m = x.useRef(null), v = x.useRef(null), [h, y] = og({
    prop: s,
    defaultProp: f ?? !1,
    onChange: u,
    caller: Ro
  });
  return /* @__PURE__ */ S.jsx(
    w3,
    {
      scope: i,
      triggerRef: m,
      contentRef: v,
      contentId: Ic(),
      titleId: Ic(),
      descriptionId: Ic(),
      open: h,
      onOpenChange: y,
      onOpenToggle: x.useCallback(() => y((g) => !g), [y]),
      modal: p,
      children: o
    }
  );
};
d2.displayName = Ro;
var h2 = "DialogTrigger", C3 = x.forwardRef(
  (l, i) => {
    const { __scopeDialog: o, ...s } = l, f = tn(h2, o), u = za(i, f.triggerRef);
    return /* @__PURE__ */ S.jsx(
      Jt.button,
      {
        type: "button",
        "aria-haspopup": "dialog",
        "aria-expanded": f.open,
        "aria-controls": f.contentId,
        "data-state": Ru(f.open),
        ...s,
        ref: u,
        onClick: sa(l.onClick, f.onOpenToggle)
      }
    );
  }
);
C3.displayName = h2;
var ku = "DialogPortal", [E3, m2] = f2(ku, {
  forceMount: void 0
}), p2 = (l) => {
  const { __scopeDialog: i, forceMount: o, children: s, container: f } = l, u = tn(ku, i);
  return /* @__PURE__ */ S.jsx(E3, { scope: i, forceMount: o, children: x.Children.map(s, (p) => /* @__PURE__ */ S.jsx(ko, { present: o || u.open, children: /* @__PURE__ */ S.jsx(t2, { asChild: !0, container: f, children: p }) })) });
};
p2.displayName = ku;
var xo = "DialogOverlay", v2 = x.forwardRef(
  (l, i) => {
    const o = m2(xo, l.__scopeDialog), { forceMount: s = o.forceMount, ...f } = l, u = tn(xo, l.__scopeDialog);
    return u.modal ? /* @__PURE__ */ S.jsx(ko, { present: s || u.open, children: /* @__PURE__ */ S.jsx(M3, { ...f, ref: i }) }) : null;
  }
);
v2.displayName = xo;
var T3 = /* @__PURE__ */ Jh("DialogOverlay.RemoveScroll"), M3 = x.forwardRef(
  (l, i) => {
    const { __scopeDialog: o, ...s } = l, f = tn(xo, o);
    return (
      // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
      // ie. when `Overlay` and `Content` are siblings
      /* @__PURE__ */ S.jsx(c2, { as: T3, allowPinchZoom: !0, shards: [f.contentRef], children: /* @__PURE__ */ S.jsx(
        Jt.div,
        {
          "data-state": Ru(f.open),
          ...s,
          ref: i,
          style: { pointerEvents: "auto", ...s.style }
        }
      ) })
    );
  }
), Da = "DialogContent", g2 = x.forwardRef(
  (l, i) => {
    const o = m2(Da, l.__scopeDialog), { forceMount: s = o.forceMount, ...f } = l, u = tn(Da, l.__scopeDialog);
    return /* @__PURE__ */ S.jsx(ko, { present: s || u.open, children: u.modal ? /* @__PURE__ */ S.jsx(A3, { ...f, ref: i }) : /* @__PURE__ */ S.jsx(j3, { ...f, ref: i }) });
  }
);
g2.displayName = Da;
var A3 = x.forwardRef(
  (l, i) => {
    const o = tn(Da, l.__scopeDialog), s = x.useRef(null), f = za(i, o.contentRef, s);
    return x.useEffect(() => {
      const u = s.current;
      if (u) return _3(u);
    }, []), /* @__PURE__ */ S.jsx(
      b2,
      {
        ...l,
        ref: f,
        trapFocus: o.open,
        disableOutsidePointerEvents: !0,
        onCloseAutoFocus: sa(l.onCloseAutoFocus, (u) => {
          u.preventDefault(), o.triggerRef.current?.focus();
        }),
        onPointerDownOutside: sa(l.onPointerDownOutside, (u) => {
          const p = u.detail.originalEvent, m = p.button === 0 && p.ctrlKey === !0;
          (p.button === 2 || m) && u.preventDefault();
        }),
        onFocusOutside: sa(
          l.onFocusOutside,
          (u) => u.preventDefault()
        )
      }
    );
  }
), j3 = x.forwardRef(
  (l, i) => {
    const o = tn(Da, l.__scopeDialog), s = x.useRef(!1), f = x.useRef(!1);
    return /* @__PURE__ */ S.jsx(
      b2,
      {
        ...l,
        ref: i,
        trapFocus: !1,
        disableOutsidePointerEvents: !1,
        onCloseAutoFocus: (u) => {
          l.onCloseAutoFocus?.(u), u.defaultPrevented || (s.current || o.triggerRef.current?.focus(), u.preventDefault()), s.current = !1, f.current = !1;
        },
        onInteractOutside: (u) => {
          l.onInteractOutside?.(u), u.defaultPrevented || (s.current = !0, u.detail.originalEvent.type === "pointerdown" && (f.current = !0));
          const p = u.target;
          o.triggerRef.current?.contains(p) && u.preventDefault(), u.detail.originalEvent.type === "focusin" && f.current && u.preventDefault();
        }
      }
    );
  }
), b2 = x.forwardRef(
  (l, i) => {
    const { __scopeDialog: o, trapFocus: s, onOpenAutoFocus: f, onCloseAutoFocus: u, ...p } = l, m = tn(Da, o), v = x.useRef(null), h = za(i, v);
    return Ug(), /* @__PURE__ */ S.jsxs(S.Fragment, { children: [
      /* @__PURE__ */ S.jsx(
        Fh,
        {
          asChild: !0,
          loop: !0,
          trapped: s,
          onMountAutoFocus: f,
          onUnmountAutoFocus: u,
          children: /* @__PURE__ */ S.jsx(
            Wh,
            {
              role: "dialog",
              id: m.contentId,
              "aria-describedby": m.descriptionId,
              "aria-labelledby": m.titleId,
              "data-state": Ru(m.open),
              ...p,
              ref: h,
              onDismiss: () => m.onOpenChange(!1)
            }
          )
        }
      ),
      /* @__PURE__ */ S.jsxs(S.Fragment, { children: [
        /* @__PURE__ */ S.jsx(k3, { titleId: m.titleId }),
        /* @__PURE__ */ S.jsx(R3, { contentRef: v, descriptionId: m.descriptionId })
      ] })
    ] });
  }
), Nu = "DialogTitle", y2 = x.forwardRef(
  (l, i) => {
    const { __scopeDialog: o, ...s } = l, f = tn(Nu, o);
    return /* @__PURE__ */ S.jsx(Jt.h2, { id: f.titleId, ...s, ref: i });
  }
);
y2.displayName = Nu;
var x2 = "DialogDescription", S2 = x.forwardRef(
  (l, i) => {
    const { __scopeDialog: o, ...s } = l, f = tn(x2, o);
    return /* @__PURE__ */ S.jsx(Jt.p, { id: f.descriptionId, ...s, ref: i });
  }
);
S2.displayName = x2;
var _2 = "DialogClose", w2 = x.forwardRef(
  (l, i) => {
    const { __scopeDialog: o, ...s } = l, f = tn(_2, o);
    return /* @__PURE__ */ S.jsx(
      Jt.button,
      {
        type: "button",
        ...s,
        ref: i,
        onClick: sa(l.onClick, () => f.onOpenChange(!1))
      }
    );
  }
);
w2.displayName = _2;
function Ru(l) {
  return l ? "open" : "closed";
}
var C2 = "DialogTitleWarning", [oy, E2] = ng(C2, {
  contentName: Da,
  titleName: Nu,
  docsSlug: "dialog"
}), k3 = ({ titleId: l }) => {
  const i = E2(C2), o = `\`${i.contentName}\` requires a \`${i.titleName}\` for the component to be accessible for screen reader users.

If you want to hide the \`${i.titleName}\`, you can wrap it with our VisuallyHidden component.

For more information, see https://radix-ui.com/primitives/docs/components/${i.docsSlug}`;
  return x.useEffect(() => {
    l && (document.getElementById(l) || console.error(o));
  }, [o, l]), null;
}, N3 = "DialogDescriptionWarning", R3 = ({ contentRef: l, descriptionId: i }) => {
  const s = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${E2(N3).contentName}}.`;
  return x.useEffect(() => {
    const f = l.current?.getAttribute("aria-describedby");
    i && f && (document.getElementById(i) || console.warn(s));
  }, [s, l, i]), null;
}, D3 = d2, z3 = p2, O3 = v2, U3 = g2, L3 = y2, B3 = S2, T2 = w2;
const H3 = (l) => l.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), $3 = (l) => l.replace(
  /^([A-Z])|[\s-_]+(\w)/g,
  (i, o, s) => s ? s.toUpperCase() : o.toLowerCase()
), F0 = (l) => {
  const i = $3(l);
  return i.charAt(0).toUpperCase() + i.slice(1);
}, M2 = (...l) => l.filter((i, o, s) => !!i && i.trim() !== "" && s.indexOf(i) === o).join(" ").trim(), V3 = (l) => {
  for (const i in l)
    if (i.startsWith("aria-") || i === "role" || i === "title")
      return !0;
};
var q3 = {
  xmlns: "http://www.w3.org/2000/svg",
  width: 24,
  height: 24,
  viewBox: "0 0 24 24",
  fill: "none",
  stroke: "currentColor",
  strokeWidth: 2,
  strokeLinecap: "round",
  strokeLinejoin: "round"
};
const G3 = x.forwardRef(
  ({
    color: l = "currentColor",
    size: i = 24,
    strokeWidth: o = 2,
    absoluteStrokeWidth: s,
    className: f = "",
    children: u,
    iconNode: p,
    ...m
  }, v) => x.createElement(
    "svg",
    {
      ref: v,
      ...q3,
      width: i,
      height: i,
      stroke: l,
      strokeWidth: s ? Number(o) * 24 / Number(i) : o,
      className: M2("lucide", f),
      ...!u && !V3(m) && { "aria-hidden": "true" },
      ...m
    },
    [
      ...p.map(([h, y]) => x.createElement(h, y)),
      ...Array.isArray(u) ? u : [u]
    ]
  )
);
const Dl = (l, i) => {
  const o = x.forwardRef(
    ({ className: s, ...f }, u) => x.createElement(G3, {
      ref: u,
      iconNode: i,
      className: M2(
        `lucide-${H3(F0(l))}`,
        `lucide-${l}`,
        s
      ),
      ...f
    })
  );
  return o.displayName = F0(l), o;
};
const Y3 = [
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
  ["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
], Q3 = Dl("circle-check", Y3);
const X3 = [
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
  ["path", { d: "M12 16v-4", key: "1dtifu" }],
  ["path", { d: "M12 8h.01", key: "e9boi3" }]
], Z3 = Dl("info", X3);
const K3 = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], J3 = Dl("loader-circle", K3);
const P3 = [
  ["path", { d: "m15 9-6 6", key: "1uzhvr" }],
  [
    "path",
    {
      d: "M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",
      key: "2d38gg"
    }
  ],
  ["path", { d: "m9 9 6 6", key: "z0biqf" }]
], W3 = Dl("octagon-x", P3);
const I3 = [
  [
    "path",
    {
      d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
      key: "wmoenq"
    }
  ],
  ["path", { d: "M12 9v4", key: "juzpu7" }],
  ["path", { d: "M12 17h.01", key: "p32p05" }]
], F3 = Dl("triangle-alert", I3);
const e4 = [
  ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
  ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
], Du = Dl("x", e4);
function A2(l) {
  var i, o, s = "";
  if (typeof l == "string" || typeof l == "number") s += l;
  else if (typeof l == "object") if (Array.isArray(l)) {
    var f = l.length;
    for (i = 0; i < f; i++) l[i] && (o = A2(l[i])) && (s && (s += " "), s += o);
  } else for (o in l) l[o] && (s && (s += " "), s += o);
  return s;
}
function j2() {
  for (var l, i, o = 0, s = "", f = arguments.length; o < f; o++) (l = arguments[o]) && (i = A2(l)) && (s && (s += " "), s += i);
  return s;
}
const zu = "-", t4 = (l) => {
  const i = a4(l), {
    conflictingClassGroups: o,
    conflictingClassGroupModifiers: s
  } = l;
  return {
    getClassGroupId: (p) => {
      const m = p.split(zu);
      return m[0] === "" && m.length !== 1 && m.shift(), k2(m, i) || n4(p);
    },
    getConflictingClassGroupIds: (p, m) => {
      const v = o[p] || [];
      return m && s[p] ? [...v, ...s[p]] : v;
    }
  };
}, k2 = (l, i) => {
  if (l.length === 0)
    return i.classGroupId;
  const o = l[0], s = i.nextPart.get(o), f = s ? k2(l.slice(1), s) : void 0;
  if (f)
    return f;
  if (i.validators.length === 0)
    return;
  const u = l.join(zu);
  return i.validators.find(({
    validator: p
  }) => p(u))?.classGroupId;
}, eh = /^\[(.+)\]$/, n4 = (l) => {
  if (eh.test(l)) {
    const i = eh.exec(l)[1], o = i?.substring(0, i.indexOf(":"));
    if (o)
      return "arbitrary.." + o;
  }
}, a4 = (l) => {
  const {
    theme: i,
    classGroups: o
  } = l, s = {
    nextPart: /* @__PURE__ */ new Map(),
    validators: []
  };
  for (const f in o)
    yu(o[f], s, f, i);
  return s;
}, yu = (l, i, o, s) => {
  l.forEach((f) => {
    if (typeof f == "string") {
      const u = f === "" ? i : th(i, f);
      u.classGroupId = o;
      return;
    }
    if (typeof f == "function") {
      if (l4(f)) {
        yu(f(s), i, o, s);
        return;
      }
      i.validators.push({
        validator: f,
        classGroupId: o
      });
      return;
    }
    Object.entries(f).forEach(([u, p]) => {
      yu(p, th(i, u), o, s);
    });
  });
}, th = (l, i) => {
  let o = l;
  return i.split(zu).forEach((s) => {
    o.nextPart.has(s) || o.nextPart.set(s, {
      nextPart: /* @__PURE__ */ new Map(),
      validators: []
    }), o = o.nextPart.get(s);
  }), o;
}, l4 = (l) => l.isThemeGetter, i4 = (l) => {
  if (l < 1)
    return {
      get: () => {
      },
      set: () => {
      }
    };
  let i = 0, o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map();
  const f = (u, p) => {
    o.set(u, p), i++, i > l && (i = 0, s = o, o = /* @__PURE__ */ new Map());
  };
  return {
    get(u) {
      let p = o.get(u);
      if (p !== void 0)
        return p;
      if ((p = s.get(u)) !== void 0)
        return f(u, p), p;
    },
    set(u, p) {
      o.has(u) ? o.set(u, p) : f(u, p);
    }
  };
}, xu = "!", Su = ":", r4 = Su.length, o4 = (l) => {
  const {
    prefix: i,
    experimentalParseClassName: o
  } = l;
  let s = (f) => {
    const u = [];
    let p = 0, m = 0, v = 0, h;
    for (let j = 0; j < f.length; j++) {
      let A = f[j];
      if (p === 0 && m === 0) {
        if (A === Su) {
          u.push(f.slice(v, j)), v = j + r4;
          continue;
        }
        if (A === "/") {
          h = j;
          continue;
        }
      }
      A === "[" ? p++ : A === "]" ? p-- : A === "(" ? m++ : A === ")" && m--;
    }
    const y = u.length === 0 ? f : f.substring(v), g = s4(y), _ = g !== y, M = h && h > v ? h - v : void 0;
    return {
      modifiers: u,
      hasImportantModifier: _,
      baseClassName: g,
      maybePostfixModifierPosition: M
    };
  };
  if (i) {
    const f = i + Su, u = s;
    s = (p) => p.startsWith(f) ? u(p.substring(f.length)) : {
      isExternal: !0,
      modifiers: [],
      hasImportantModifier: !1,
      baseClassName: p,
      maybePostfixModifierPosition: void 0
    };
  }
  if (o) {
    const f = s;
    s = (u) => o({
      className: u,
      parseClassName: f
    });
  }
  return s;
}, s4 = (l) => l.endsWith(xu) ? l.substring(0, l.length - 1) : l.startsWith(xu) ? l.substring(1) : l, c4 = (l) => {
  const i = Object.fromEntries(l.orderSensitiveModifiers.map((s) => [s, !0]));
  return (s) => {
    if (s.length <= 1)
      return s;
    const f = [];
    let u = [];
    return s.forEach((p) => {
      p[0] === "[" || i[p] ? (f.push(...u.sort(), p), u = []) : u.push(p);
    }), f.push(...u.sort()), f;
  };
}, u4 = (l) => ({
  cache: i4(l.cacheSize),
  parseClassName: o4(l),
  sortModifiers: c4(l),
  ...t4(l)
}), f4 = /\s+/, d4 = (l, i) => {
  const {
    parseClassName: o,
    getClassGroupId: s,
    getConflictingClassGroupIds: f,
    sortModifiers: u
  } = i, p = [], m = l.trim().split(f4);
  let v = "";
  for (let h = m.length - 1; h >= 0; h -= 1) {
    const y = m[h], {
      isExternal: g,
      modifiers: _,
      hasImportantModifier: M,
      baseClassName: j,
      maybePostfixModifierPosition: A
    } = o(y);
    if (g) {
      v = y + (v.length > 0 ? " " + v : v);
      continue;
    }
    let O = !!A, U = s(O ? j.substring(0, A) : j);
    if (!U) {
      if (!O) {
        v = y + (v.length > 0 ? " " + v : v);
        continue;
      }
      if (U = s(j), !U) {
        v = y + (v.length > 0 ? " " + v : v);
        continue;
      }
      O = !1;
    }
    const F = u(_).join(":"), P = M ? F + xu : F, Y = P + U;
    if (p.includes(Y))
      continue;
    p.push(Y);
    const J = f(U, O);
    for (let W = 0; W < J.length; ++W) {
      const ee = J[W];
      p.push(P + ee);
    }
    v = y + (v.length > 0 ? " " + v : v);
  }
  return v;
};
function h4() {
  let l = 0, i, o, s = "";
  for (; l < arguments.length; )
    (i = arguments[l++]) && (o = N2(i)) && (s && (s += " "), s += o);
  return s;
}
const N2 = (l) => {
  if (typeof l == "string")
    return l;
  let i, o = "";
  for (let s = 0; s < l.length; s++)
    l[s] && (i = N2(l[s])) && (o && (o += " "), o += i);
  return o;
};
function m4(l, ...i) {
  let o, s, f, u = p;
  function p(v) {
    const h = i.reduce((y, g) => g(y), l());
    return o = u4(h), s = o.cache.get, f = o.cache.set, u = m, m(v);
  }
  function m(v) {
    const h = s(v);
    if (h)
      return h;
    const y = d4(v, o);
    return f(v, y), y;
  }
  return function() {
    return u(h4.apply(null, arguments));
  };
}
const tt = (l) => {
  const i = (o) => o[l] || [];
  return i.isThemeGetter = !0, i;
}, R2 = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, D2 = /^\((?:(\w[\w-]*):)?(.+)\)$/i, p4 = /^\d+\/\d+$/, v4 = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, g4 = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, b4 = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, y4 = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, x4 = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, Tl = (l) => p4.test(l), be = (l) => !!l && !Number.isNaN(Number(l)), ia = (l) => !!l && Number.isInteger(Number(l)), ru = (l) => l.endsWith("%") && be(l.slice(0, -1)), Nn = (l) => v4.test(l), S4 = () => !0, _4 = (l) => (
  // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
  // For example, `hsl(0 0% 0%)` would be classified as a length without this check.
  // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
  g4.test(l) && !b4.test(l)
), z2 = () => !1, w4 = (l) => y4.test(l), C4 = (l) => x4.test(l), E4 = (l) => !ne(l) && !ae(l), T4 = (l) => zl(l, L2, z2), ne = (l) => R2.test(l), Ra = (l) => zl(l, B2, _4), ou = (l) => zl(l, N4, be), nh = (l) => zl(l, O2, z2), M4 = (l) => zl(l, U2, C4), ro = (l) => zl(l, H2, w4), ae = (l) => D2.test(l), Oi = (l) => Ol(l, B2), A4 = (l) => Ol(l, R4), ah = (l) => Ol(l, O2), j4 = (l) => Ol(l, L2), k4 = (l) => Ol(l, U2), oo = (l) => Ol(l, H2, !0), zl = (l, i, o) => {
  const s = R2.exec(l);
  return s ? s[1] ? i(s[1]) : o(s[2]) : !1;
}, Ol = (l, i, o = !1) => {
  const s = D2.exec(l);
  return s ? s[1] ? i(s[1]) : o : !1;
}, O2 = (l) => l === "position" || l === "percentage", U2 = (l) => l === "image" || l === "url", L2 = (l) => l === "length" || l === "size" || l === "bg-size", B2 = (l) => l === "length", N4 = (l) => l === "number", R4 = (l) => l === "family-name", H2 = (l) => l === "shadow", D4 = () => {
  const l = tt("color"), i = tt("font"), o = tt("text"), s = tt("font-weight"), f = tt("tracking"), u = tt("leading"), p = tt("breakpoint"), m = tt("container"), v = tt("spacing"), h = tt("radius"), y = tt("shadow"), g = tt("inset-shadow"), _ = tt("text-shadow"), M = tt("drop-shadow"), j = tt("blur"), A = tt("perspective"), O = tt("aspect"), U = tt("ease"), F = tt("animate"), P = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], Y = () => [
    "center",
    "top",
    "bottom",
    "left",
    "right",
    "top-left",
    // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
    "left-top",
    "top-right",
    // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
    "right-top",
    "bottom-right",
    // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
    "right-bottom",
    "bottom-left",
    // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
    "left-bottom"
  ], J = () => [...Y(), ae, ne], W = () => ["auto", "hidden", "clip", "visible", "scroll"], ee = () => ["auto", "contain", "none"], K = () => [ae, ne, v], fe = () => [Tl, "full", "auto", ...K()], Ze = () => [ia, "none", "subgrid", ae, ne], ht = () => ["auto", {
    span: ["full", ia, ae, ne]
  }, ia, ae, ne], De = () => [ia, "auto", ae, ne], Ve = () => ["auto", "min", "max", "fr", ae, ne], mt = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], Me = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], R = () => ["auto", ...K()], Q = () => [Tl, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...K()], q = () => [l, ae, ne], ye = () => [...Y(), ah, nh, {
    position: [ae, ne]
  }], C = () => ["no-repeat", {
    repeat: ["", "x", "y", "space", "round"]
  }], $ = () => ["auto", "cover", "contain", j4, T4, {
    size: [ae, ne]
  }], I = () => [ru, Oi, Ra], L = () => [
    // Deprecated since Tailwind CSS v4.0.0
    "",
    "none",
    "full",
    h,
    ae,
    ne
  ], X = () => ["", be, Oi, Ra], le = () => ["solid", "dashed", "dotted", "double"], ie = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], ve = () => [be, ru, ah, nh], oe = () => [
    // Deprecated since Tailwind CSS v4.0.0
    "",
    "none",
    j,
    ae,
    ne
  ], Ke = () => ["none", be, ae, ne], jt = () => ["none", be, ae, ne], kt = () => [be, ae, ne], yt = () => [Tl, "full", ...K()];
  return {
    cacheSize: 500,
    theme: {
      animate: ["spin", "ping", "pulse", "bounce"],
      aspect: ["video"],
      blur: [Nn],
      breakpoint: [Nn],
      color: [S4],
      container: [Nn],
      "drop-shadow": [Nn],
      ease: ["in", "out", "in-out"],
      font: [E4],
      "font-weight": ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black"],
      "inset-shadow": [Nn],
      leading: ["none", "tight", "snug", "normal", "relaxed", "loose"],
      perspective: ["dramatic", "near", "normal", "midrange", "distant", "none"],
      radius: [Nn],
      shadow: [Nn],
      spacing: ["px", be],
      text: [Nn],
      "text-shadow": [Nn],
      tracking: ["tighter", "tight", "normal", "wide", "wider", "widest"]
    },
    classGroups: {
      // --------------
      // --- Layout ---
      // --------------
      /**
       * Aspect Ratio
       * @see https://tailwindcss.com/docs/aspect-ratio
       */
      aspect: [{
        aspect: ["auto", "square", Tl, ne, ae, O]
      }],
      /**
       * Container
       * @see https://tailwindcss.com/docs/container
       * @deprecated since Tailwind CSS v4.0.0
       */
      container: ["container"],
      /**
       * Columns
       * @see https://tailwindcss.com/docs/columns
       */
      columns: [{
        columns: [be, ne, ae, m]
      }],
      /**
       * Break After
       * @see https://tailwindcss.com/docs/break-after
       */
      "break-after": [{
        "break-after": P()
      }],
      /**
       * Break Before
       * @see https://tailwindcss.com/docs/break-before
       */
      "break-before": [{
        "break-before": P()
      }],
      /**
       * Break Inside
       * @see https://tailwindcss.com/docs/break-inside
       */
      "break-inside": [{
        "break-inside": ["auto", "avoid", "avoid-page", "avoid-column"]
      }],
      /**
       * Box Decoration Break
       * @see https://tailwindcss.com/docs/box-decoration-break
       */
      "box-decoration": [{
        "box-decoration": ["slice", "clone"]
      }],
      /**
       * Box Sizing
       * @see https://tailwindcss.com/docs/box-sizing
       */
      box: [{
        box: ["border", "content"]
      }],
      /**
       * Display
       * @see https://tailwindcss.com/docs/display
       */
      display: ["block", "inline-block", "inline", "flex", "inline-flex", "table", "inline-table", "table-caption", "table-cell", "table-column", "table-column-group", "table-footer-group", "table-header-group", "table-row-group", "table-row", "flow-root", "grid", "inline-grid", "contents", "list-item", "hidden"],
      /**
       * Screen Reader Only
       * @see https://tailwindcss.com/docs/display#screen-reader-only
       */
      sr: ["sr-only", "not-sr-only"],
      /**
       * Floats
       * @see https://tailwindcss.com/docs/float
       */
      float: [{
        float: ["right", "left", "none", "start", "end"]
      }],
      /**
       * Clear
       * @see https://tailwindcss.com/docs/clear
       */
      clear: [{
        clear: ["left", "right", "both", "none", "start", "end"]
      }],
      /**
       * Isolation
       * @see https://tailwindcss.com/docs/isolation
       */
      isolation: ["isolate", "isolation-auto"],
      /**
       * Object Fit
       * @see https://tailwindcss.com/docs/object-fit
       */
      "object-fit": [{
        object: ["contain", "cover", "fill", "none", "scale-down"]
      }],
      /**
       * Object Position
       * @see https://tailwindcss.com/docs/object-position
       */
      "object-position": [{
        object: J()
      }],
      /**
       * Overflow
       * @see https://tailwindcss.com/docs/overflow
       */
      overflow: [{
        overflow: W()
      }],
      /**
       * Overflow X
       * @see https://tailwindcss.com/docs/overflow
       */
      "overflow-x": [{
        "overflow-x": W()
      }],
      /**
       * Overflow Y
       * @see https://tailwindcss.com/docs/overflow
       */
      "overflow-y": [{
        "overflow-y": W()
      }],
      /**
       * Overscroll Behavior
       * @see https://tailwindcss.com/docs/overscroll-behavior
       */
      overscroll: [{
        overscroll: ee()
      }],
      /**
       * Overscroll Behavior X
       * @see https://tailwindcss.com/docs/overscroll-behavior
       */
      "overscroll-x": [{
        "overscroll-x": ee()
      }],
      /**
       * Overscroll Behavior Y
       * @see https://tailwindcss.com/docs/overscroll-behavior
       */
      "overscroll-y": [{
        "overscroll-y": ee()
      }],
      /**
       * Position
       * @see https://tailwindcss.com/docs/position
       */
      position: ["static", "fixed", "absolute", "relative", "sticky"],
      /**
       * Top / Right / Bottom / Left
       * @see https://tailwindcss.com/docs/top-right-bottom-left
       */
      inset: [{
        inset: fe()
      }],
      /**
       * Right / Left
       * @see https://tailwindcss.com/docs/top-right-bottom-left
       */
      "inset-x": [{
        "inset-x": fe()
      }],
      /**
       * Top / Bottom
       * @see https://tailwindcss.com/docs/top-right-bottom-left
       */
      "inset-y": [{
        "inset-y": fe()
      }],
      /**
       * Start
       * @see https://tailwindcss.com/docs/top-right-bottom-left
       */
      start: [{
        start: fe()
      }],
      /**
       * End
       * @see https://tailwindcss.com/docs/top-right-bottom-left
       */
      end: [{
        end: fe()
      }],
      /**
       * Top
       * @see https://tailwindcss.com/docs/top-right-bottom-left
       */
      top: [{
        top: fe()
      }],
      /**
       * Right
       * @see https://tailwindcss.com/docs/top-right-bottom-left
       */
      right: [{
        right: fe()
      }],
      /**
       * Bottom
       * @see https://tailwindcss.com/docs/top-right-bottom-left
       */
      bottom: [{
        bottom: fe()
      }],
      /**
       * Left
       * @see https://tailwindcss.com/docs/top-right-bottom-left
       */
      left: [{
        left: fe()
      }],
      /**
       * Visibility
       * @see https://tailwindcss.com/docs/visibility
       */
      visibility: ["visible", "invisible", "collapse"],
      /**
       * Z-Index
       * @see https://tailwindcss.com/docs/z-index
       */
      z: [{
        z: [ia, "auto", ae, ne]
      }],
      // ------------------------
      // --- Flexbox and Grid ---
      // ------------------------
      /**
       * Flex Basis
       * @see https://tailwindcss.com/docs/flex-basis
       */
      basis: [{
        basis: [Tl, "full", "auto", m, ...K()]
      }],
      /**
       * Flex Direction
       * @see https://tailwindcss.com/docs/flex-direction
       */
      "flex-direction": [{
        flex: ["row", "row-reverse", "col", "col-reverse"]
      }],
      /**
       * Flex Wrap
       * @see https://tailwindcss.com/docs/flex-wrap
       */
      "flex-wrap": [{
        flex: ["nowrap", "wrap", "wrap-reverse"]
      }],
      /**
       * Flex
       * @see https://tailwindcss.com/docs/flex
       */
      flex: [{
        flex: [be, Tl, "auto", "initial", "none", ne]
      }],
      /**
       * Flex Grow
       * @see https://tailwindcss.com/docs/flex-grow
       */
      grow: [{
        grow: ["", be, ae, ne]
      }],
      /**
       * Flex Shrink
       * @see https://tailwindcss.com/docs/flex-shrink
       */
      shrink: [{
        shrink: ["", be, ae, ne]
      }],
      /**
       * Order
       * @see https://tailwindcss.com/docs/order
       */
      order: [{
        order: [ia, "first", "last", "none", ae, ne]
      }],
      /**
       * Grid Template Columns
       * @see https://tailwindcss.com/docs/grid-template-columns
       */
      "grid-cols": [{
        "grid-cols": Ze()
      }],
      /**
       * Grid Column Start / End
       * @see https://tailwindcss.com/docs/grid-column
       */
      "col-start-end": [{
        col: ht()
      }],
      /**
       * Grid Column Start
       * @see https://tailwindcss.com/docs/grid-column
       */
      "col-start": [{
        "col-start": De()
      }],
      /**
       * Grid Column End
       * @see https://tailwindcss.com/docs/grid-column
       */
      "col-end": [{
        "col-end": De()
      }],
      /**
       * Grid Template Rows
       * @see https://tailwindcss.com/docs/grid-template-rows
       */
      "grid-rows": [{
        "grid-rows": Ze()
      }],
      /**
       * Grid Row Start / End
       * @see https://tailwindcss.com/docs/grid-row
       */
      "row-start-end": [{
        row: ht()
      }],
      /**
       * Grid Row Start
       * @see https://tailwindcss.com/docs/grid-row
       */
      "row-start": [{
        "row-start": De()
      }],
      /**
       * Grid Row End
       * @see https://tailwindcss.com/docs/grid-row
       */
      "row-end": [{
        "row-end": De()
      }],
      /**
       * Grid Auto Flow
       * @see https://tailwindcss.com/docs/grid-auto-flow
       */
      "grid-flow": [{
        "grid-flow": ["row", "col", "dense", "row-dense", "col-dense"]
      }],
      /**
       * Grid Auto Columns
       * @see https://tailwindcss.com/docs/grid-auto-columns
       */
      "auto-cols": [{
        "auto-cols": Ve()
      }],
      /**
       * Grid Auto Rows
       * @see https://tailwindcss.com/docs/grid-auto-rows
       */
      "auto-rows": [{
        "auto-rows": Ve()
      }],
      /**
       * Gap
       * @see https://tailwindcss.com/docs/gap
       */
      gap: [{
        gap: K()
      }],
      /**
       * Gap X
       * @see https://tailwindcss.com/docs/gap
       */
      "gap-x": [{
        "gap-x": K()
      }],
      /**
       * Gap Y
       * @see https://tailwindcss.com/docs/gap
       */
      "gap-y": [{
        "gap-y": K()
      }],
      /**
       * Justify Content
       * @see https://tailwindcss.com/docs/justify-content
       */
      "justify-content": [{
        justify: [...mt(), "normal"]
      }],
      /**
       * Justify Items
       * @see https://tailwindcss.com/docs/justify-items
       */
      "justify-items": [{
        "justify-items": [...Me(), "normal"]
      }],
      /**
       * Justify Self
       * @see https://tailwindcss.com/docs/justify-self
       */
      "justify-self": [{
        "justify-self": ["auto", ...Me()]
      }],
      /**
       * Align Content
       * @see https://tailwindcss.com/docs/align-content
       */
      "align-content": [{
        content: ["normal", ...mt()]
      }],
      /**
       * Align Items
       * @see https://tailwindcss.com/docs/align-items
       */
      "align-items": [{
        items: [...Me(), {
          baseline: ["", "last"]
        }]
      }],
      /**
       * Align Self
       * @see https://tailwindcss.com/docs/align-self
       */
      "align-self": [{
        self: ["auto", ...Me(), {
          baseline: ["", "last"]
        }]
      }],
      /**
       * Place Content
       * @see https://tailwindcss.com/docs/place-content
       */
      "place-content": [{
        "place-content": mt()
      }],
      /**
       * Place Items
       * @see https://tailwindcss.com/docs/place-items
       */
      "place-items": [{
        "place-items": [...Me(), "baseline"]
      }],
      /**
       * Place Self
       * @see https://tailwindcss.com/docs/place-self
       */
      "place-self": [{
        "place-self": ["auto", ...Me()]
      }],
      // Spacing
      /**
       * Padding
       * @see https://tailwindcss.com/docs/padding
       */
      p: [{
        p: K()
      }],
      /**
       * Padding X
       * @see https://tailwindcss.com/docs/padding
       */
      px: [{
        px: K()
      }],
      /**
       * Padding Y
       * @see https://tailwindcss.com/docs/padding
       */
      py: [{
        py: K()
      }],
      /**
       * Padding Start
       * @see https://tailwindcss.com/docs/padding
       */
      ps: [{
        ps: K()
      }],
      /**
       * Padding End
       * @see https://tailwindcss.com/docs/padding
       */
      pe: [{
        pe: K()
      }],
      /**
       * Padding Top
       * @see https://tailwindcss.com/docs/padding
       */
      pt: [{
        pt: K()
      }],
      /**
       * Padding Right
       * @see https://tailwindcss.com/docs/padding
       */
      pr: [{
        pr: K()
      }],
      /**
       * Padding Bottom
       * @see https://tailwindcss.com/docs/padding
       */
      pb: [{
        pb: K()
      }],
      /**
       * Padding Left
       * @see https://tailwindcss.com/docs/padding
       */
      pl: [{
        pl: K()
      }],
      /**
       * Margin
       * @see https://tailwindcss.com/docs/margin
       */
      m: [{
        m: R()
      }],
      /**
       * Margin X
       * @see https://tailwindcss.com/docs/margin
       */
      mx: [{
        mx: R()
      }],
      /**
       * Margin Y
       * @see https://tailwindcss.com/docs/margin
       */
      my: [{
        my: R()
      }],
      /**
       * Margin Start
       * @see https://tailwindcss.com/docs/margin
       */
      ms: [{
        ms: R()
      }],
      /**
       * Margin End
       * @see https://tailwindcss.com/docs/margin
       */
      me: [{
        me: R()
      }],
      /**
       * Margin Top
       * @see https://tailwindcss.com/docs/margin
       */
      mt: [{
        mt: R()
      }],
      /**
       * Margin Right
       * @see https://tailwindcss.com/docs/margin
       */
      mr: [{
        mr: R()
      }],
      /**
       * Margin Bottom
       * @see https://tailwindcss.com/docs/margin
       */
      mb: [{
        mb: R()
      }],
      /**
       * Margin Left
       * @see https://tailwindcss.com/docs/margin
       */
      ml: [{
        ml: R()
      }],
      /**
       * Space Between X
       * @see https://tailwindcss.com/docs/margin#adding-space-between-children
       */
      "space-x": [{
        "space-x": K()
      }],
      /**
       * Space Between X Reverse
       * @see https://tailwindcss.com/docs/margin#adding-space-between-children
       */
      "space-x-reverse": ["space-x-reverse"],
      /**
       * Space Between Y
       * @see https://tailwindcss.com/docs/margin#adding-space-between-children
       */
      "space-y": [{
        "space-y": K()
      }],
      /**
       * Space Between Y Reverse
       * @see https://tailwindcss.com/docs/margin#adding-space-between-children
       */
      "space-y-reverse": ["space-y-reverse"],
      // --------------
      // --- Sizing ---
      // --------------
      /**
       * Size
       * @see https://tailwindcss.com/docs/width#setting-both-width-and-height
       */
      size: [{
        size: Q()
      }],
      /**
       * Width
       * @see https://tailwindcss.com/docs/width
       */
      w: [{
        w: [m, "screen", ...Q()]
      }],
      /**
       * Min-Width
       * @see https://tailwindcss.com/docs/min-width
       */
      "min-w": [{
        "min-w": [
          m,
          "screen",
          /** Deprecated. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
          "none",
          ...Q()
        ]
      }],
      /**
       * Max-Width
       * @see https://tailwindcss.com/docs/max-width
       */
      "max-w": [{
        "max-w": [
          m,
          "screen",
          "none",
          /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
          "prose",
          /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
          {
            screen: [p]
          },
          ...Q()
        ]
      }],
      /**
       * Height
       * @see https://tailwindcss.com/docs/height
       */
      h: [{
        h: ["screen", "lh", ...Q()]
      }],
      /**
       * Min-Height
       * @see https://tailwindcss.com/docs/min-height
       */
      "min-h": [{
        "min-h": ["screen", "lh", "none", ...Q()]
      }],
      /**
       * Max-Height
       * @see https://tailwindcss.com/docs/max-height
       */
      "max-h": [{
        "max-h": ["screen", "lh", ...Q()]
      }],
      // ------------------
      // --- Typography ---
      // ------------------
      /**
       * Font Size
       * @see https://tailwindcss.com/docs/font-size
       */
      "font-size": [{
        text: ["base", o, Oi, Ra]
      }],
      /**
       * Font Smoothing
       * @see https://tailwindcss.com/docs/font-smoothing
       */
      "font-smoothing": ["antialiased", "subpixel-antialiased"],
      /**
       * Font Style
       * @see https://tailwindcss.com/docs/font-style
       */
      "font-style": ["italic", "not-italic"],
      /**
       * Font Weight
       * @see https://tailwindcss.com/docs/font-weight
       */
      "font-weight": [{
        font: [s, ae, ou]
      }],
      /**
       * Font Stretch
       * @see https://tailwindcss.com/docs/font-stretch
       */
      "font-stretch": [{
        "font-stretch": ["ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "normal", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded", ru, ne]
      }],
      /**
       * Font Family
       * @see https://tailwindcss.com/docs/font-family
       */
      "font-family": [{
        font: [A4, ne, i]
      }],
      /**
       * Font Variant Numeric
       * @see https://tailwindcss.com/docs/font-variant-numeric
       */
      "fvn-normal": ["normal-nums"],
      /**
       * Font Variant Numeric
       * @see https://tailwindcss.com/docs/font-variant-numeric
       */
      "fvn-ordinal": ["ordinal"],
      /**
       * Font Variant Numeric
       * @see https://tailwindcss.com/docs/font-variant-numeric
       */
      "fvn-slashed-zero": ["slashed-zero"],
      /**
       * Font Variant Numeric
       * @see https://tailwindcss.com/docs/font-variant-numeric
       */
      "fvn-figure": ["lining-nums", "oldstyle-nums"],
      /**
       * Font Variant Numeric
       * @see https://tailwindcss.com/docs/font-variant-numeric
       */
      "fvn-spacing": ["proportional-nums", "tabular-nums"],
      /**
       * Font Variant Numeric
       * @see https://tailwindcss.com/docs/font-variant-numeric
       */
      "fvn-fraction": ["diagonal-fractions", "stacked-fractions"],
      /**
       * Letter Spacing
       * @see https://tailwindcss.com/docs/letter-spacing
       */
      tracking: [{
        tracking: [f, ae, ne]
      }],
      /**
       * Line Clamp
       * @see https://tailwindcss.com/docs/line-clamp
       */
      "line-clamp": [{
        "line-clamp": [be, "none", ae, ou]
      }],
      /**
       * Line Height
       * @see https://tailwindcss.com/docs/line-height
       */
      leading: [{
        leading: [
          /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
          u,
          ...K()
        ]
      }],
      /**
       * List Style Image
       * @see https://tailwindcss.com/docs/list-style-image
       */
      "list-image": [{
        "list-image": ["none", ae, ne]
      }],
      /**
       * List Style Position
       * @see https://tailwindcss.com/docs/list-style-position
       */
      "list-style-position": [{
        list: ["inside", "outside"]
      }],
      /**
       * List Style Type
       * @see https://tailwindcss.com/docs/list-style-type
       */
      "list-style-type": [{
        list: ["disc", "decimal", "none", ae, ne]
      }],
      /**
       * Text Alignment
       * @see https://tailwindcss.com/docs/text-align
       */
      "text-alignment": [{
        text: ["left", "center", "right", "justify", "start", "end"]
      }],
      /**
       * Placeholder Color
       * @deprecated since Tailwind CSS v3.0.0
       * @see https://v3.tailwindcss.com/docs/placeholder-color
       */
      "placeholder-color": [{
        placeholder: q()
      }],
      /**
       * Text Color
       * @see https://tailwindcss.com/docs/text-color
       */
      "text-color": [{
        text: q()
      }],
      /**
       * Text Decoration
       * @see https://tailwindcss.com/docs/text-decoration
       */
      "text-decoration": ["underline", "overline", "line-through", "no-underline"],
      /**
       * Text Decoration Style
       * @see https://tailwindcss.com/docs/text-decoration-style
       */
      "text-decoration-style": [{
        decoration: [...le(), "wavy"]
      }],
      /**
       * Text Decoration Thickness
       * @see https://tailwindcss.com/docs/text-decoration-thickness
       */
      "text-decoration-thickness": [{
        decoration: [be, "from-font", "auto", ae, Ra]
      }],
      /**
       * Text Decoration Color
       * @see https://tailwindcss.com/docs/text-decoration-color
       */
      "text-decoration-color": [{
        decoration: q()
      }],
      /**
       * Text Underline Offset
       * @see https://tailwindcss.com/docs/text-underline-offset
       */
      "underline-offset": [{
        "underline-offset": [be, "auto", ae, ne]
      }],
      /**
       * Text Transform
       * @see https://tailwindcss.com/docs/text-transform
       */
      "text-transform": ["uppercase", "lowercase", "capitalize", "normal-case"],
      /**
       * Text Overflow
       * @see https://tailwindcss.com/docs/text-overflow
       */
      "text-overflow": ["truncate", "text-ellipsis", "text-clip"],
      /**
       * Text Wrap
       * @see https://tailwindcss.com/docs/text-wrap
       */
      "text-wrap": [{
        text: ["wrap", "nowrap", "balance", "pretty"]
      }],
      /**
       * Text Indent
       * @see https://tailwindcss.com/docs/text-indent
       */
      indent: [{
        indent: K()
      }],
      /**
       * Vertical Alignment
       * @see https://tailwindcss.com/docs/vertical-align
       */
      "vertical-align": [{
        align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", ae, ne]
      }],
      /**
       * Whitespace
       * @see https://tailwindcss.com/docs/whitespace
       */
      whitespace: [{
        whitespace: ["normal", "nowrap", "pre", "pre-line", "pre-wrap", "break-spaces"]
      }],
      /**
       * Word Break
       * @see https://tailwindcss.com/docs/word-break
       */
      break: [{
        break: ["normal", "words", "all", "keep"]
      }],
      /**
       * Overflow Wrap
       * @see https://tailwindcss.com/docs/overflow-wrap
       */
      wrap: [{
        wrap: ["break-word", "anywhere", "normal"]
      }],
      /**
       * Hyphens
       * @see https://tailwindcss.com/docs/hyphens
       */
      hyphens: [{
        hyphens: ["none", "manual", "auto"]
      }],
      /**
       * Content
       * @see https://tailwindcss.com/docs/content
       */
      content: [{
        content: ["none", ae, ne]
      }],
      // -------------------
      // --- Backgrounds ---
      // -------------------
      /**
       * Background Attachment
       * @see https://tailwindcss.com/docs/background-attachment
       */
      "bg-attachment": [{
        bg: ["fixed", "local", "scroll"]
      }],
      /**
       * Background Clip
       * @see https://tailwindcss.com/docs/background-clip
       */
      "bg-clip": [{
        "bg-clip": ["border", "padding", "content", "text"]
      }],
      /**
       * Background Origin
       * @see https://tailwindcss.com/docs/background-origin
       */
      "bg-origin": [{
        "bg-origin": ["border", "padding", "content"]
      }],
      /**
       * Background Position
       * @see https://tailwindcss.com/docs/background-position
       */
      "bg-position": [{
        bg: ye()
      }],
      /**
       * Background Repeat
       * @see https://tailwindcss.com/docs/background-repeat
       */
      "bg-repeat": [{
        bg: C()
      }],
      /**
       * Background Size
       * @see https://tailwindcss.com/docs/background-size
       */
      "bg-size": [{
        bg: $()
      }],
      /**
       * Background Image
       * @see https://tailwindcss.com/docs/background-image
       */
      "bg-image": [{
        bg: ["none", {
          linear: [{
            to: ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
          }, ia, ae, ne],
          radial: ["", ae, ne],
          conic: [ia, ae, ne]
        }, k4, M4]
      }],
      /**
       * Background Color
       * @see https://tailwindcss.com/docs/background-color
       */
      "bg-color": [{
        bg: q()
      }],
      /**
       * Gradient Color Stops From Position
       * @see https://tailwindcss.com/docs/gradient-color-stops
       */
      "gradient-from-pos": [{
        from: I()
      }],
      /**
       * Gradient Color Stops Via Position
       * @see https://tailwindcss.com/docs/gradient-color-stops
       */
      "gradient-via-pos": [{
        via: I()
      }],
      /**
       * Gradient Color Stops To Position
       * @see https://tailwindcss.com/docs/gradient-color-stops
       */
      "gradient-to-pos": [{
        to: I()
      }],
      /**
       * Gradient Color Stops From
       * @see https://tailwindcss.com/docs/gradient-color-stops
       */
      "gradient-from": [{
        from: q()
      }],
      /**
       * Gradient Color Stops Via
       * @see https://tailwindcss.com/docs/gradient-color-stops
       */
      "gradient-via": [{
        via: q()
      }],
      /**
       * Gradient Color Stops To
       * @see https://tailwindcss.com/docs/gradient-color-stops
       */
      "gradient-to": [{
        to: q()
      }],
      // ---------------
      // --- Borders ---
      // ---------------
      /**
       * Border Radius
       * @see https://tailwindcss.com/docs/border-radius
       */
      rounded: [{
        rounded: L()
      }],
      /**
       * Border Radius Start
       * @see https://tailwindcss.com/docs/border-radius
       */
      "rounded-s": [{
        "rounded-s": L()
      }],
      /**
       * Border Radius End
       * @see https://tailwindcss.com/docs/border-radius
       */
      "rounded-e": [{
        "rounded-e": L()
      }],
      /**
       * Border Radius Top
       * @see https://tailwindcss.com/docs/border-radius
       */
      "rounded-t": [{
        "rounded-t": L()
      }],
      /**
       * Border Radius Right
       * @see https://tailwindcss.com/docs/border-radius
       */
      "rounded-r": [{
        "rounded-r": L()
      }],
      /**
       * Border Radius Bottom
       * @see https://tailwindcss.com/docs/border-radius
       */
      "rounded-b": [{
        "rounded-b": L()
      }],
      /**
       * Border Radius Left
       * @see https://tailwindcss.com/docs/border-radius
       */
      "rounded-l": [{
        "rounded-l": L()
      }],
      /**
       * Border Radius Start Start
       * @see https://tailwindcss.com/docs/border-radius
       */
      "rounded-ss": [{
        "rounded-ss": L()
      }],
      /**
       * Border Radius Start End
       * @see https://tailwindcss.com/docs/border-radius
       */
      "rounded-se": [{
        "rounded-se": L()
      }],
      /**
       * Border Radius End End
       * @see https://tailwindcss.com/docs/border-radius
       */
      "rounded-ee": [{
        "rounded-ee": L()
      }],
      /**
       * Border Radius End Start
       * @see https://tailwindcss.com/docs/border-radius
       */
      "rounded-es": [{
        "rounded-es": L()
      }],
      /**
       * Border Radius Top Left
       * @see https://tailwindcss.com/docs/border-radius
       */
      "rounded-tl": [{
        "rounded-tl": L()
      }],
      /**
       * Border Radius Top Right
       * @see https://tailwindcss.com/docs/border-radius
       */
      "rounded-tr": [{
        "rounded-tr": L()
      }],
      /**
       * Border Radius Bottom Right
       * @see https://tailwindcss.com/docs/border-radius
       */
      "rounded-br": [{
        "rounded-br": L()
      }],
      /**
       * Border Radius Bottom Left
       * @see https://tailwindcss.com/docs/border-radius
       */
      "rounded-bl": [{
        "rounded-bl": L()
      }],
      /**
       * Border Width
       * @see https://tailwindcss.com/docs/border-width
       */
      "border-w": [{
        border: X()
      }],
      /**
       * Border Width X
       * @see https://tailwindcss.com/docs/border-width
       */
      "border-w-x": [{
        "border-x": X()
      }],
      /**
       * Border Width Y
       * @see https://tailwindcss.com/docs/border-width
       */
      "border-w-y": [{
        "border-y": X()
      }],
      /**
       * Border Width Start
       * @see https://tailwindcss.com/docs/border-width
       */
      "border-w-s": [{
        "border-s": X()
      }],
      /**
       * Border Width End
       * @see https://tailwindcss.com/docs/border-width
       */
      "border-w-e": [{
        "border-e": X()
      }],
      /**
       * Border Width Top
       * @see https://tailwindcss.com/docs/border-width
       */
      "border-w-t": [{
        "border-t": X()
      }],
      /**
       * Border Width Right
       * @see https://tailwindcss.com/docs/border-width
       */
      "border-w-r": [{
        "border-r": X()
      }],
      /**
       * Border Width Bottom
       * @see https://tailwindcss.com/docs/border-width
       */
      "border-w-b": [{
        "border-b": X()
      }],
      /**
       * Border Width Left
       * @see https://tailwindcss.com/docs/border-width
       */
      "border-w-l": [{
        "border-l": X()
      }],
      /**
       * Divide Width X
       * @see https://tailwindcss.com/docs/border-width#between-children
       */
      "divide-x": [{
        "divide-x": X()
      }],
      /**
       * Divide Width X Reverse
       * @see https://tailwindcss.com/docs/border-width#between-children
       */
      "divide-x-reverse": ["divide-x-reverse"],
      /**
       * Divide Width Y
       * @see https://tailwindcss.com/docs/border-width#between-children
       */
      "divide-y": [{
        "divide-y": X()
      }],
      /**
       * Divide Width Y Reverse
       * @see https://tailwindcss.com/docs/border-width#between-children
       */
      "divide-y-reverse": ["divide-y-reverse"],
      /**
       * Border Style
       * @see https://tailwindcss.com/docs/border-style
       */
      "border-style": [{
        border: [...le(), "hidden", "none"]
      }],
      /**
       * Divide Style
       * @see https://tailwindcss.com/docs/border-style#setting-the-divider-style
       */
      "divide-style": [{
        divide: [...le(), "hidden", "none"]
      }],
      /**
       * Border Color
       * @see https://tailwindcss.com/docs/border-color
       */
      "border-color": [{
        border: q()
      }],
      /**
       * Border Color X
       * @see https://tailwindcss.com/docs/border-color
       */
      "border-color-x": [{
        "border-x": q()
      }],
      /**
       * Border Color Y
       * @see https://tailwindcss.com/docs/border-color
       */
      "border-color-y": [{
        "border-y": q()
      }],
      /**
       * Border Color S
       * @see https://tailwindcss.com/docs/border-color
       */
      "border-color-s": [{
        "border-s": q()
      }],
      /**
       * Border Color E
       * @see https://tailwindcss.com/docs/border-color
       */
      "border-color-e": [{
        "border-e": q()
      }],
      /**
       * Border Color Top
       * @see https://tailwindcss.com/docs/border-color
       */
      "border-color-t": [{
        "border-t": q()
      }],
      /**
       * Border Color Right
       * @see https://tailwindcss.com/docs/border-color
       */
      "border-color-r": [{
        "border-r": q()
      }],
      /**
       * Border Color Bottom
       * @see https://tailwindcss.com/docs/border-color
       */
      "border-color-b": [{
        "border-b": q()
      }],
      /**
       * Border Color Left
       * @see https://tailwindcss.com/docs/border-color
       */
      "border-color-l": [{
        "border-l": q()
      }],
      /**
       * Divide Color
       * @see https://tailwindcss.com/docs/divide-color
       */
      "divide-color": [{
        divide: q()
      }],
      /**
       * Outline Style
       * @see https://tailwindcss.com/docs/outline-style
       */
      "outline-style": [{
        outline: [...le(), "none", "hidden"]
      }],
      /**
       * Outline Offset
       * @see https://tailwindcss.com/docs/outline-offset
       */
      "outline-offset": [{
        "outline-offset": [be, ae, ne]
      }],
      /**
       * Outline Width
       * @see https://tailwindcss.com/docs/outline-width
       */
      "outline-w": [{
        outline: ["", be, Oi, Ra]
      }],
      /**
       * Outline Color
       * @see https://tailwindcss.com/docs/outline-color
       */
      "outline-color": [{
        outline: q()
      }],
      // ---------------
      // --- Effects ---
      // ---------------
      /**
       * Box Shadow
       * @see https://tailwindcss.com/docs/box-shadow
       */
      shadow: [{
        shadow: [
          // Deprecated since Tailwind CSS v4.0.0
          "",
          "none",
          y,
          oo,
          ro
        ]
      }],
      /**
       * Box Shadow Color
       * @see https://tailwindcss.com/docs/box-shadow#setting-the-shadow-color
       */
      "shadow-color": [{
        shadow: q()
      }],
      /**
       * Inset Box Shadow
       * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-shadow
       */
      "inset-shadow": [{
        "inset-shadow": ["none", g, oo, ro]
      }],
      /**
       * Inset Box Shadow Color
       * @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-shadow-color
       */
      "inset-shadow-color": [{
        "inset-shadow": q()
      }],
      /**
       * Ring Width
       * @see https://tailwindcss.com/docs/box-shadow#adding-a-ring
       */
      "ring-w": [{
        ring: X()
      }],
      /**
       * Ring Width Inset
       * @see https://v3.tailwindcss.com/docs/ring-width#inset-rings
       * @deprecated since Tailwind CSS v4.0.0
       * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
       */
      "ring-w-inset": ["ring-inset"],
      /**
       * Ring Color
       * @see https://tailwindcss.com/docs/box-shadow#setting-the-ring-color
       */
      "ring-color": [{
        ring: q()
      }],
      /**
       * Ring Offset Width
       * @see https://v3.tailwindcss.com/docs/ring-offset-width
       * @deprecated since Tailwind CSS v4.0.0
       * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
       */
      "ring-offset-w": [{
        "ring-offset": [be, Ra]
      }],
      /**
       * Ring Offset Color
       * @see https://v3.tailwindcss.com/docs/ring-offset-color
       * @deprecated since Tailwind CSS v4.0.0
       * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
       */
      "ring-offset-color": [{
        "ring-offset": q()
      }],
      /**
       * Inset Ring Width
       * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-ring
       */
      "inset-ring-w": [{
        "inset-ring": X()
      }],
      /**
       * Inset Ring Color
       * @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-ring-color
       */
      "inset-ring-color": [{
        "inset-ring": q()
      }],
      /**
       * Text Shadow
       * @see https://tailwindcss.com/docs/text-shadow
       */
      "text-shadow": [{
        "text-shadow": ["none", _, oo, ro]
      }],
      /**
       * Text Shadow Color
       * @see https://tailwindcss.com/docs/text-shadow#setting-the-shadow-color
       */
      "text-shadow-color": [{
        "text-shadow": q()
      }],
      /**
       * Opacity
       * @see https://tailwindcss.com/docs/opacity
       */
      opacity: [{
        opacity: [be, ae, ne]
      }],
      /**
       * Mix Blend Mode
       * @see https://tailwindcss.com/docs/mix-blend-mode
       */
      "mix-blend": [{
        "mix-blend": [...ie(), "plus-darker", "plus-lighter"]
      }],
      /**
       * Background Blend Mode
       * @see https://tailwindcss.com/docs/background-blend-mode
       */
      "bg-blend": [{
        "bg-blend": ie()
      }],
      /**
       * Mask Clip
       * @see https://tailwindcss.com/docs/mask-clip
       */
      "mask-clip": [{
        "mask-clip": ["border", "padding", "content", "fill", "stroke", "view"]
      }, "mask-no-clip"],
      /**
       * Mask Composite
       * @see https://tailwindcss.com/docs/mask-composite
       */
      "mask-composite": [{
        mask: ["add", "subtract", "intersect", "exclude"]
      }],
      /**
       * Mask Image
       * @see https://tailwindcss.com/docs/mask-image
       */
      "mask-image-linear-pos": [{
        "mask-linear": [be]
      }],
      "mask-image-linear-from-pos": [{
        "mask-linear-from": ve()
      }],
      "mask-image-linear-to-pos": [{
        "mask-linear-to": ve()
      }],
      "mask-image-linear-from-color": [{
        "mask-linear-from": q()
      }],
      "mask-image-linear-to-color": [{
        "mask-linear-to": q()
      }],
      "mask-image-t-from-pos": [{
        "mask-t-from": ve()
      }],
      "mask-image-t-to-pos": [{
        "mask-t-to": ve()
      }],
      "mask-image-t-from-color": [{
        "mask-t-from": q()
      }],
      "mask-image-t-to-color": [{
        "mask-t-to": q()
      }],
      "mask-image-r-from-pos": [{
        "mask-r-from": ve()
      }],
      "mask-image-r-to-pos": [{
        "mask-r-to": ve()
      }],
      "mask-image-r-from-color": [{
        "mask-r-from": q()
      }],
      "mask-image-r-to-color": [{
        "mask-r-to": q()
      }],
      "mask-image-b-from-pos": [{
        "mask-b-from": ve()
      }],
      "mask-image-b-to-pos": [{
        "mask-b-to": ve()
      }],
      "mask-image-b-from-color": [{
        "mask-b-from": q()
      }],
      "mask-image-b-to-color": [{
        "mask-b-to": q()
      }],
      "mask-image-l-from-pos": [{
        "mask-l-from": ve()
      }],
      "mask-image-l-to-pos": [{
        "mask-l-to": ve()
      }],
      "mask-image-l-from-color": [{
        "mask-l-from": q()
      }],
      "mask-image-l-to-color": [{
        "mask-l-to": q()
      }],
      "mask-image-x-from-pos": [{
        "mask-x-from": ve()
      }],
      "mask-image-x-to-pos": [{
        "mask-x-to": ve()
      }],
      "mask-image-x-from-color": [{
        "mask-x-from": q()
      }],
      "mask-image-x-to-color": [{
        "mask-x-to": q()
      }],
      "mask-image-y-from-pos": [{
        "mask-y-from": ve()
      }],
      "mask-image-y-to-pos": [{
        "mask-y-to": ve()
      }],
      "mask-image-y-from-color": [{
        "mask-y-from": q()
      }],
      "mask-image-y-to-color": [{
        "mask-y-to": q()
      }],
      "mask-image-radial": [{
        "mask-radial": [ae, ne]
      }],
      "mask-image-radial-from-pos": [{
        "mask-radial-from": ve()
      }],
      "mask-image-radial-to-pos": [{
        "mask-radial-to": ve()
      }],
      "mask-image-radial-from-color": [{
        "mask-radial-from": q()
      }],
      "mask-image-radial-to-color": [{
        "mask-radial-to": q()
      }],
      "mask-image-radial-shape": [{
        "mask-radial": ["circle", "ellipse"]
      }],
      "mask-image-radial-size": [{
        "mask-radial": [{
          closest: ["side", "corner"],
          farthest: ["side", "corner"]
        }]
      }],
      "mask-image-radial-pos": [{
        "mask-radial-at": Y()
      }],
      "mask-image-conic-pos": [{
        "mask-conic": [be]
      }],
      "mask-image-conic-from-pos": [{
        "mask-conic-from": ve()
      }],
      "mask-image-conic-to-pos": [{
        "mask-conic-to": ve()
      }],
      "mask-image-conic-from-color": [{
        "mask-conic-from": q()
      }],
      "mask-image-conic-to-color": [{
        "mask-conic-to": q()
      }],
      /**
       * Mask Mode
       * @see https://tailwindcss.com/docs/mask-mode
       */
      "mask-mode": [{
        mask: ["alpha", "luminance", "match"]
      }],
      /**
       * Mask Origin
       * @see https://tailwindcss.com/docs/mask-origin
       */
      "mask-origin": [{
        "mask-origin": ["border", "padding", "content", "fill", "stroke", "view"]
      }],
      /**
       * Mask Position
       * @see https://tailwindcss.com/docs/mask-position
       */
      "mask-position": [{
        mask: ye()
      }],
      /**
       * Mask Repeat
       * @see https://tailwindcss.com/docs/mask-repeat
       */
      "mask-repeat": [{
        mask: C()
      }],
      /**
       * Mask Size
       * @see https://tailwindcss.com/docs/mask-size
       */
      "mask-size": [{
        mask: $()
      }],
      /**
       * Mask Type
       * @see https://tailwindcss.com/docs/mask-type
       */
      "mask-type": [{
        "mask-type": ["alpha", "luminance"]
      }],
      /**
       * Mask Image
       * @see https://tailwindcss.com/docs/mask-image
       */
      "mask-image": [{
        mask: ["none", ae, ne]
      }],
      // ---------------
      // --- Filters ---
      // ---------------
      /**
       * Filter
       * @see https://tailwindcss.com/docs/filter
       */
      filter: [{
        filter: [
          // Deprecated since Tailwind CSS v3.0.0
          "",
          "none",
          ae,
          ne
        ]
      }],
      /**
       * Blur
       * @see https://tailwindcss.com/docs/blur
       */
      blur: [{
        blur: oe()
      }],
      /**
       * Brightness
       * @see https://tailwindcss.com/docs/brightness
       */
      brightness: [{
        brightness: [be, ae, ne]
      }],
      /**
       * Contrast
       * @see https://tailwindcss.com/docs/contrast
       */
      contrast: [{
        contrast: [be, ae, ne]
      }],
      /**
       * Drop Shadow
       * @see https://tailwindcss.com/docs/drop-shadow
       */
      "drop-shadow": [{
        "drop-shadow": [
          // Deprecated since Tailwind CSS v4.0.0
          "",
          "none",
          M,
          oo,
          ro
        ]
      }],
      /**
       * Drop Shadow Color
       * @see https://tailwindcss.com/docs/filter-drop-shadow#setting-the-shadow-color
       */
      "drop-shadow-color": [{
        "drop-shadow": q()
      }],
      /**
       * Grayscale
       * @see https://tailwindcss.com/docs/grayscale
       */
      grayscale: [{
        grayscale: ["", be, ae, ne]
      }],
      /**
       * Hue Rotate
       * @see https://tailwindcss.com/docs/hue-rotate
       */
      "hue-rotate": [{
        "hue-rotate": [be, ae, ne]
      }],
      /**
       * Invert
       * @see https://tailwindcss.com/docs/invert
       */
      invert: [{
        invert: ["", be, ae, ne]
      }],
      /**
       * Saturate
       * @see https://tailwindcss.com/docs/saturate
       */
      saturate: [{
        saturate: [be, ae, ne]
      }],
      /**
       * Sepia
       * @see https://tailwindcss.com/docs/sepia
       */
      sepia: [{
        sepia: ["", be, ae, ne]
      }],
      /**
       * Backdrop Filter
       * @see https://tailwindcss.com/docs/backdrop-filter
       */
      "backdrop-filter": [{
        "backdrop-filter": [
          // Deprecated since Tailwind CSS v3.0.0
          "",
          "none",
          ae,
          ne
        ]
      }],
      /**
       * Backdrop Blur
       * @see https://tailwindcss.com/docs/backdrop-blur
       */
      "backdrop-blur": [{
        "backdrop-blur": oe()
      }],
      /**
       * Backdrop Brightness
       * @see https://tailwindcss.com/docs/backdrop-brightness
       */
      "backdrop-brightness": [{
        "backdrop-brightness": [be, ae, ne]
      }],
      /**
       * Backdrop Contrast
       * @see https://tailwindcss.com/docs/backdrop-contrast
       */
      "backdrop-contrast": [{
        "backdrop-contrast": [be, ae, ne]
      }],
      /**
       * Backdrop Grayscale
       * @see https://tailwindcss.com/docs/backdrop-grayscale
       */
      "backdrop-grayscale": [{
        "backdrop-grayscale": ["", be, ae, ne]
      }],
      /**
       * Backdrop Hue Rotate
       * @see https://tailwindcss.com/docs/backdrop-hue-rotate
       */
      "backdrop-hue-rotate": [{
        "backdrop-hue-rotate": [be, ae, ne]
      }],
      /**
       * Backdrop Invert
       * @see https://tailwindcss.com/docs/backdrop-invert
       */
      "backdrop-invert": [{
        "backdrop-invert": ["", be, ae, ne]
      }],
      /**
       * Backdrop Opacity
       * @see https://tailwindcss.com/docs/backdrop-opacity
       */
      "backdrop-opacity": [{
        "backdrop-opacity": [be, ae, ne]
      }],
      /**
       * Backdrop Saturate
       * @see https://tailwindcss.com/docs/backdrop-saturate
       */
      "backdrop-saturate": [{
        "backdrop-saturate": [be, ae, ne]
      }],
      /**
       * Backdrop Sepia
       * @see https://tailwindcss.com/docs/backdrop-sepia
       */
      "backdrop-sepia": [{
        "backdrop-sepia": ["", be, ae, ne]
      }],
      // --------------
      // --- Tables ---
      // --------------
      /**
       * Border Collapse
       * @see https://tailwindcss.com/docs/border-collapse
       */
      "border-collapse": [{
        border: ["collapse", "separate"]
      }],
      /**
       * Border Spacing
       * @see https://tailwindcss.com/docs/border-spacing
       */
      "border-spacing": [{
        "border-spacing": K()
      }],
      /**
       * Border Spacing X
       * @see https://tailwindcss.com/docs/border-spacing
       */
      "border-spacing-x": [{
        "border-spacing-x": K()
      }],
      /**
       * Border Spacing Y
       * @see https://tailwindcss.com/docs/border-spacing
       */
      "border-spacing-y": [{
        "border-spacing-y": K()
      }],
      /**
       * Table Layout
       * @see https://tailwindcss.com/docs/table-layout
       */
      "table-layout": [{
        table: ["auto", "fixed"]
      }],
      /**
       * Caption Side
       * @see https://tailwindcss.com/docs/caption-side
       */
      caption: [{
        caption: ["top", "bottom"]
      }],
      // ---------------------------------
      // --- Transitions and Animation ---
      // ---------------------------------
      /**
       * Transition Property
       * @see https://tailwindcss.com/docs/transition-property
       */
      transition: [{
        transition: ["", "all", "colors", "opacity", "shadow", "transform", "none", ae, ne]
      }],
      /**
       * Transition Behavior
       * @see https://tailwindcss.com/docs/transition-behavior
       */
      "transition-behavior": [{
        transition: ["normal", "discrete"]
      }],
      /**
       * Transition Duration
       * @see https://tailwindcss.com/docs/transition-duration
       */
      duration: [{
        duration: [be, "initial", ae, ne]
      }],
      /**
       * Transition Timing Function
       * @see https://tailwindcss.com/docs/transition-timing-function
       */
      ease: [{
        ease: ["linear", "initial", U, ae, ne]
      }],
      /**
       * Transition Delay
       * @see https://tailwindcss.com/docs/transition-delay
       */
      delay: [{
        delay: [be, ae, ne]
      }],
      /**
       * Animation
       * @see https://tailwindcss.com/docs/animation
       */
      animate: [{
        animate: ["none", F, ae, ne]
      }],
      // ------------------
      // --- Transforms ---
      // ------------------
      /**
       * Backface Visibility
       * @see https://tailwindcss.com/docs/backface-visibility
       */
      backface: [{
        backface: ["hidden", "visible"]
      }],
      /**
       * Perspective
       * @see https://tailwindcss.com/docs/perspective
       */
      perspective: [{
        perspective: [A, ae, ne]
      }],
      /**
       * Perspective Origin
       * @see https://tailwindcss.com/docs/perspective-origin
       */
      "perspective-origin": [{
        "perspective-origin": J()
      }],
      /**
       * Rotate
       * @see https://tailwindcss.com/docs/rotate
       */
      rotate: [{
        rotate: Ke()
      }],
      /**
       * Rotate X
       * @see https://tailwindcss.com/docs/rotate
       */
      "rotate-x": [{
        "rotate-x": Ke()
      }],
      /**
       * Rotate Y
       * @see https://tailwindcss.com/docs/rotate
       */
      "rotate-y": [{
        "rotate-y": Ke()
      }],
      /**
       * Rotate Z
       * @see https://tailwindcss.com/docs/rotate
       */
      "rotate-z": [{
        "rotate-z": Ke()
      }],
      /**
       * Scale
       * @see https://tailwindcss.com/docs/scale
       */
      scale: [{
        scale: jt()
      }],
      /**
       * Scale X
       * @see https://tailwindcss.com/docs/scale
       */
      "scale-x": [{
        "scale-x": jt()
      }],
      /**
       * Scale Y
       * @see https://tailwindcss.com/docs/scale
       */
      "scale-y": [{
        "scale-y": jt()
      }],
      /**
       * Scale Z
       * @see https://tailwindcss.com/docs/scale
       */
      "scale-z": [{
        "scale-z": jt()
      }],
      /**
       * Scale 3D
       * @see https://tailwindcss.com/docs/scale
       */
      "scale-3d": ["scale-3d"],
      /**
       * Skew
       * @see https://tailwindcss.com/docs/skew
       */
      skew: [{
        skew: kt()
      }],
      /**
       * Skew X
       * @see https://tailwindcss.com/docs/skew
       */
      "skew-x": [{
        "skew-x": kt()
      }],
      /**
       * Skew Y
       * @see https://tailwindcss.com/docs/skew
       */
      "skew-y": [{
        "skew-y": kt()
      }],
      /**
       * Transform
       * @see https://tailwindcss.com/docs/transform
       */
      transform: [{
        transform: [ae, ne, "", "none", "gpu", "cpu"]
      }],
      /**
       * Transform Origin
       * @see https://tailwindcss.com/docs/transform-origin
       */
      "transform-origin": [{
        origin: J()
      }],
      /**
       * Transform Style
       * @see https://tailwindcss.com/docs/transform-style
       */
      "transform-style": [{
        transform: ["3d", "flat"]
      }],
      /**
       * Translate
       * @see https://tailwindcss.com/docs/translate
       */
      translate: [{
        translate: yt()
      }],
      /**
       * Translate X
       * @see https://tailwindcss.com/docs/translate
       */
      "translate-x": [{
        "translate-x": yt()
      }],
      /**
       * Translate Y
       * @see https://tailwindcss.com/docs/translate
       */
      "translate-y": [{
        "translate-y": yt()
      }],
      /**
       * Translate Z
       * @see https://tailwindcss.com/docs/translate
       */
      "translate-z": [{
        "translate-z": yt()
      }],
      /**
       * Translate None
       * @see https://tailwindcss.com/docs/translate
       */
      "translate-none": ["translate-none"],
      // ---------------------
      // --- Interactivity ---
      // ---------------------
      /**
       * Accent Color
       * @see https://tailwindcss.com/docs/accent-color
       */
      accent: [{
        accent: q()
      }],
      /**
       * Appearance
       * @see https://tailwindcss.com/docs/appearance
       */
      appearance: [{
        appearance: ["none", "auto"]
      }],
      /**
       * Caret Color
       * @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities
       */
      "caret-color": [{
        caret: q()
      }],
      /**
       * Color Scheme
       * @see https://tailwindcss.com/docs/color-scheme
       */
      "color-scheme": [{
        scheme: ["normal", "dark", "light", "light-dark", "only-dark", "only-light"]
      }],
      /**
       * Cursor
       * @see https://tailwindcss.com/docs/cursor
       */
      cursor: [{
        cursor: ["auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out", ae, ne]
      }],
      /**
       * Field Sizing
       * @see https://tailwindcss.com/docs/field-sizing
       */
      "field-sizing": [{
        "field-sizing": ["fixed", "content"]
      }],
      /**
       * Pointer Events
       * @see https://tailwindcss.com/docs/pointer-events
       */
      "pointer-events": [{
        "pointer-events": ["auto", "none"]
      }],
      /**
       * Resize
       * @see https://tailwindcss.com/docs/resize
       */
      resize: [{
        resize: ["none", "", "y", "x"]
      }],
      /**
       * Scroll Behavior
       * @see https://tailwindcss.com/docs/scroll-behavior
       */
      "scroll-behavior": [{
        scroll: ["auto", "smooth"]
      }],
      /**
       * Scroll Margin
       * @see https://tailwindcss.com/docs/scroll-margin
       */
      "scroll-m": [{
        "scroll-m": K()
      }],
      /**
       * Scroll Margin X
       * @see https://tailwindcss.com/docs/scroll-margin
       */
      "scroll-mx": [{
        "scroll-mx": K()
      }],
      /**
       * Scroll Margin Y
       * @see https://tailwindcss.com/docs/scroll-margin
       */
      "scroll-my": [{
        "scroll-my": K()
      }],
      /**
       * Scroll Margin Start
       * @see https://tailwindcss.com/docs/scroll-margin
       */
      "scroll-ms": [{
        "scroll-ms": K()
      }],
      /**
       * Scroll Margin End
       * @see https://tailwindcss.com/docs/scroll-margin
       */
      "scroll-me": [{
        "scroll-me": K()
      }],
      /**
       * Scroll Margin Top
       * @see https://tailwindcss.com/docs/scroll-margin
       */
      "scroll-mt": [{
        "scroll-mt": K()
      }],
      /**
       * Scroll Margin Right
       * @see https://tailwindcss.com/docs/scroll-margin
       */
      "scroll-mr": [{
        "scroll-mr": K()
      }],
      /**
       * Scroll Margin Bottom
       * @see https://tailwindcss.com/docs/scroll-margin
       */
      "scroll-mb": [{
        "scroll-mb": K()
      }],
      /**
       * Scroll Margin Left
       * @see https://tailwindcss.com/docs/scroll-margin
       */
      "scroll-ml": [{
        "scroll-ml": K()
      }],
      /**
       * Scroll Padding
       * @see https://tailwindcss.com/docs/scroll-padding
       */
      "scroll-p": [{
        "scroll-p": K()
      }],
      /**
       * Scroll Padding X
       * @see https://tailwindcss.com/docs/scroll-padding
       */
      "scroll-px": [{
        "scroll-px": K()
      }],
      /**
       * Scroll Padding Y
       * @see https://tailwindcss.com/docs/scroll-padding
       */
      "scroll-py": [{
        "scroll-py": K()
      }],
      /**
       * Scroll Padding Start
       * @see https://tailwindcss.com/docs/scroll-padding
       */
      "scroll-ps": [{
        "scroll-ps": K()
      }],
      /**
       * Scroll Padding End
       * @see https://tailwindcss.com/docs/scroll-padding
       */
      "scroll-pe": [{
        "scroll-pe": K()
      }],
      /**
       * Scroll Padding Top
       * @see https://tailwindcss.com/docs/scroll-padding
       */
      "scroll-pt": [{
        "scroll-pt": K()
      }],
      /**
       * Scroll Padding Right
       * @see https://tailwindcss.com/docs/scroll-padding
       */
      "scroll-pr": [{
        "scroll-pr": K()
      }],
      /**
       * Scroll Padding Bottom
       * @see https://tailwindcss.com/docs/scroll-padding
       */
      "scroll-pb": [{
        "scroll-pb": K()
      }],
      /**
       * Scroll Padding Left
       * @see https://tailwindcss.com/docs/scroll-padding
       */
      "scroll-pl": [{
        "scroll-pl": K()
      }],
      /**
       * Scroll Snap Align
       * @see https://tailwindcss.com/docs/scroll-snap-align
       */
      "snap-align": [{
        snap: ["start", "end", "center", "align-none"]
      }],
      /**
       * Scroll Snap Stop
       * @see https://tailwindcss.com/docs/scroll-snap-stop
       */
      "snap-stop": [{
        snap: ["normal", "always"]
      }],
      /**
       * Scroll Snap Type
       * @see https://tailwindcss.com/docs/scroll-snap-type
       */
      "snap-type": [{
        snap: ["none", "x", "y", "both"]
      }],
      /**
       * Scroll Snap Type Strictness
       * @see https://tailwindcss.com/docs/scroll-snap-type
       */
      "snap-strictness": [{
        snap: ["mandatory", "proximity"]
      }],
      /**
       * Touch Action
       * @see https://tailwindcss.com/docs/touch-action
       */
      touch: [{
        touch: ["auto", "none", "manipulation"]
      }],
      /**
       * Touch Action X
       * @see https://tailwindcss.com/docs/touch-action
       */
      "touch-x": [{
        "touch-pan": ["x", "left", "right"]
      }],
      /**
       * Touch Action Y
       * @see https://tailwindcss.com/docs/touch-action
       */
      "touch-y": [{
        "touch-pan": ["y", "up", "down"]
      }],
      /**
       * Touch Action Pinch Zoom
       * @see https://tailwindcss.com/docs/touch-action
       */
      "touch-pz": ["touch-pinch-zoom"],
      /**
       * User Select
       * @see https://tailwindcss.com/docs/user-select
       */
      select: [{
        select: ["none", "text", "all", "auto"]
      }],
      /**
       * Will Change
       * @see https://tailwindcss.com/docs/will-change
       */
      "will-change": [{
        "will-change": ["auto", "scroll", "contents", "transform", ae, ne]
      }],
      // -----------
      // --- SVG ---
      // -----------
      /**
       * Fill
       * @see https://tailwindcss.com/docs/fill
       */
      fill: [{
        fill: ["none", ...q()]
      }],
      /**
       * Stroke Width
       * @see https://tailwindcss.com/docs/stroke-width
       */
      "stroke-w": [{
        stroke: [be, Oi, Ra, ou]
      }],
      /**
       * Stroke
       * @see https://tailwindcss.com/docs/stroke
       */
      stroke: [{
        stroke: ["none", ...q()]
      }],
      // ---------------------
      // --- Accessibility ---
      // ---------------------
      /**
       * Forced Color Adjust
       * @see https://tailwindcss.com/docs/forced-color-adjust
       */
      "forced-color-adjust": [{
        "forced-color-adjust": ["auto", "none"]
      }]
    },
    conflictingClassGroups: {
      overflow: ["overflow-x", "overflow-y"],
      overscroll: ["overscroll-x", "overscroll-y"],
      inset: ["inset-x", "inset-y", "start", "end", "top", "right", "bottom", "left"],
      "inset-x": ["right", "left"],
      "inset-y": ["top", "bottom"],
      flex: ["basis", "grow", "shrink"],
      gap: ["gap-x", "gap-y"],
      p: ["px", "py", "ps", "pe", "pt", "pr", "pb", "pl"],
      px: ["pr", "pl"],
      py: ["pt", "pb"],
      m: ["mx", "my", "ms", "me", "mt", "mr", "mb", "ml"],
      mx: ["mr", "ml"],
      my: ["mt", "mb"],
      size: ["w", "h"],
      "font-size": ["leading"],
      "fvn-normal": ["fvn-ordinal", "fvn-slashed-zero", "fvn-figure", "fvn-spacing", "fvn-fraction"],
      "fvn-ordinal": ["fvn-normal"],
      "fvn-slashed-zero": ["fvn-normal"],
      "fvn-figure": ["fvn-normal"],
      "fvn-spacing": ["fvn-normal"],
      "fvn-fraction": ["fvn-normal"],
      "line-clamp": ["display", "overflow"],
      rounded: ["rounded-s", "rounded-e", "rounded-t", "rounded-r", "rounded-b", "rounded-l", "rounded-ss", "rounded-se", "rounded-ee", "rounded-es", "rounded-tl", "rounded-tr", "rounded-br", "rounded-bl"],
      "rounded-s": ["rounded-ss", "rounded-es"],
      "rounded-e": ["rounded-se", "rounded-ee"],
      "rounded-t": ["rounded-tl", "rounded-tr"],
      "rounded-r": ["rounded-tr", "rounded-br"],
      "rounded-b": ["rounded-br", "rounded-bl"],
      "rounded-l": ["rounded-tl", "rounded-bl"],
      "border-spacing": ["border-spacing-x", "border-spacing-y"],
      "border-w": ["border-w-x", "border-w-y", "border-w-s", "border-w-e", "border-w-t", "border-w-r", "border-w-b", "border-w-l"],
      "border-w-x": ["border-w-r", "border-w-l"],
      "border-w-y": ["border-w-t", "border-w-b"],
      "border-color": ["border-color-x", "border-color-y", "border-color-s", "border-color-e", "border-color-t", "border-color-r", "border-color-b", "border-color-l"],
      "border-color-x": ["border-color-r", "border-color-l"],
      "border-color-y": ["border-color-t", "border-color-b"],
      translate: ["translate-x", "translate-y", "translate-none"],
      "translate-none": ["translate", "translate-x", "translate-y", "translate-z"],
      "scroll-m": ["scroll-mx", "scroll-my", "scroll-ms", "scroll-me", "scroll-mt", "scroll-mr", "scroll-mb", "scroll-ml"],
      "scroll-mx": ["scroll-mr", "scroll-ml"],
      "scroll-my": ["scroll-mt", "scroll-mb"],
      "scroll-p": ["scroll-px", "scroll-py", "scroll-ps", "scroll-pe", "scroll-pt", "scroll-pr", "scroll-pb", "scroll-pl"],
      "scroll-px": ["scroll-pr", "scroll-pl"],
      "scroll-py": ["scroll-pt", "scroll-pb"],
      touch: ["touch-x", "touch-y", "touch-pz"],
      "touch-x": ["touch"],
      "touch-y": ["touch"],
      "touch-pz": ["touch"]
    },
    conflictingClassGroupModifiers: {
      "font-size": ["leading"]
    },
    orderSensitiveModifiers: ["*", "**", "after", "backdrop", "before", "details-content", "file", "first-letter", "first-line", "marker", "placeholder", "selection"]
  };
}, z4 = /* @__PURE__ */ m4(D4);
function pe(...l) {
  return z4(j2(l));
}
function O4({ ...l }) {
  return /* @__PURE__ */ S.jsx(D3, { "data-slot": "dialog", ...l });
}
function U4({ ...l }) {
  return /* @__PURE__ */ S.jsx(z3, { "data-slot": "dialog-portal", ...l });
}
function L4({ ...l }) {
  return /* @__PURE__ */ S.jsx(T2, { "data-slot": "dialog-close", ...l });
}
function B4({
  className: l,
  ...i
}) {
  return /* @__PURE__ */ S.jsx(
    O3,
    {
      "data-slot": "dialog-overlay",
      className: pe(
        "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
        l
      ),
      ...i
    }
  );
}
function H4({
  className: l,
  children: i,
  showCloseButton: o = !0,
  ...s
}) {
  return /* @__PURE__ */ S.jsxs(U4, { "data-slot": "dialog-portal", children: [
    /* @__PURE__ */ S.jsx(B4, {}),
    /* @__PURE__ */ S.jsxs(
      U3,
      {
        "data-slot": "dialog-content",
        className: pe(
          "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed left-[50%] top-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
          l
        ),
        ...s,
        children: [
          i,
          o && /* @__PURE__ */ S.jsxs(
            T2,
            {
              "data-slot": "dialog-close",
              className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground rounded-xs focus:outline-hidden absolute right-4 top-4 opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
              children: [
                /* @__PURE__ */ S.jsx(Du, {}),
                /* @__PURE__ */ S.jsx("span", { className: "sr-only", children: "Close" })
              ]
            }
          )
        ]
      }
    )
  ] });
}
function $4({ className: l, ...i }) {
  return /* @__PURE__ */ S.jsx(
    L3,
    {
      "data-slot": "dialog-title",
      className: pe("text-lg font-semibold leading-none", l),
      ...i
    }
  );
}
function V4({
  className: l,
  ...i
}) {
  return /* @__PURE__ */ S.jsx(
    B3,
    {
      "data-slot": "dialog-description",
      className: pe("text-muted-foreground text-sm", l),
      ...i
    }
  );
}
var su = { exports: {} }, cu = {};
var lh;
function q4() {
  if (lh) return cu;
  lh = 1;
  var l = jo();
  function i(g, _) {
    return g === _ && (g !== 0 || 1 / g === 1 / _) || g !== g && _ !== _;
  }
  var o = typeof Object.is == "function" ? Object.is : i, s = l.useState, f = l.useEffect, u = l.useLayoutEffect, p = l.useDebugValue;
  function m(g, _) {
    var M = _(), j = s({ inst: { value: M, getSnapshot: _ } }), A = j[0].inst, O = j[1];
    return u(
      function() {
        A.value = M, A.getSnapshot = _, v(A) && O({ inst: A });
      },
      [g, M, _]
    ), f(
      function() {
        return v(A) && O({ inst: A }), g(function() {
          v(A) && O({ inst: A });
        });
      },
      [g]
    ), p(M), M;
  }
  function v(g) {
    var _ = g.getSnapshot;
    g = g.value;
    try {
      var M = _();
      return !o(g, M);
    } catch {
      return !0;
    }
  }
  function h(g, _) {
    return _();
  }
  var y = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? h : m;
  return cu.useSyncExternalStore = l.useSyncExternalStore !== void 0 ? l.useSyncExternalStore : y, cu;
}
var ih;
function G4() {
  return ih || (ih = 1, su.exports = q4()), su.exports;
}
var Y4 = G4();
function Q4() {
  return Y4.useSyncExternalStore(
    X4,
    () => !0,
    () => !1
  );
}
function X4() {
  return () => {
  };
}
var Ou = "Avatar", [Z4, sy] = Xh(Ou), [K4, $2] = Z4(Ou), V2 = x.forwardRef(
  (l, i) => {
    const { __scopeAvatar: o, ...s } = l, [f, u] = x.useState("idle");
    return /* @__PURE__ */ S.jsx(
      K4,
      {
        scope: o,
        imageLoadingStatus: f,
        onImageLoadingStatusChange: u,
        children: /* @__PURE__ */ S.jsx(Jt.span, { ...s, ref: i })
      }
    );
  }
);
V2.displayName = Ou;
var q2 = "AvatarImage", G2 = x.forwardRef(
  (l, i) => {
    const { __scopeAvatar: o, src: s, onLoadingStatusChange: f = () => {
    }, ...u } = l, p = $2(q2, o), m = J4(s, u), v = jl((h) => {
      f(h), p.onImageLoadingStatusChange(h);
    });
    return ua(() => {
      m !== "idle" && v(m);
    }, [m, v]), m === "loaded" ? /* @__PURE__ */ S.jsx(Jt.img, { ...u, ref: i, src: s }) : null;
  }
);
G2.displayName = q2;
var Y2 = "AvatarFallback", Q2 = x.forwardRef(
  (l, i) => {
    const { __scopeAvatar: o, delayMs: s, ...f } = l, u = $2(Y2, o), [p, m] = x.useState(s === void 0);
    return x.useEffect(() => {
      if (s !== void 0) {
        const v = window.setTimeout(() => m(!0), s);
        return () => window.clearTimeout(v);
      }
    }, [s]), p && u.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ S.jsx(Jt.span, { ...f, ref: i }) : null;
  }
);
Q2.displayName = Y2;
function rh(l, i) {
  return l ? i ? (l.src !== i && (l.src = i), l.complete && l.naturalWidth > 0 ? "loaded" : "loading") : "error" : "idle";
}
function J4(l, { referrerPolicy: i, crossOrigin: o }) {
  const s = Q4(), f = x.useRef(null), u = s ? (f.current || (f.current = new window.Image()), f.current) : null, [p, m] = x.useState(
    () => rh(u, l)
  );
  return ua(() => {
    m(rh(u, l));
  }, [u, l]), ua(() => {
    const v = (g) => () => {
      m(g);
    };
    if (!u) return;
    const h = v("loaded"), y = v("error");
    return u.addEventListener("load", h), u.addEventListener("error", y), i && (u.referrerPolicy = i), typeof o == "string" && (u.crossOrigin = o), () => {
      u.removeEventListener("load", h), u.removeEventListener("error", y);
    };
  }, [u, o, i]), p;
}
var P4 = V2, W4 = G2, I4 = Q2;
function Uu({ className: l, ...i }) {
  return /* @__PURE__ */ S.jsx(
    P4,
    {
      "data-slot": "avatar",
      className: pe("relative flex size-8 shrink-0 overflow-hidden rounded-full", l),
      ...i
    }
  );
}
function Lu({ className: l, ...i }) {
  return /* @__PURE__ */ S.jsx(
    W4,
    {
      "data-slot": "avatar-image",
      className: pe("aspect-square size-full", l),
      ...i
    }
  );
}
function Bu({
  className: l,
  ...i
}) {
  return /* @__PURE__ */ S.jsx(
    I4,
    {
      "data-slot": "avatar-fallback",
      className: pe("bg-muted flex size-full items-center justify-center rounded-full", l),
      ...i
    }
  );
}
function F4({ displayName: l, snapshot: i }) {
  return /* @__PURE__ */ S.jsxs("div", { className: "flex items-center gap-4", children: [
    /* @__PURE__ */ S.jsxs(Uu, { className: "size-10 landscape:lg:size-16", children: [
      /* @__PURE__ */ S.jsx(Lu, { className: "bg-viverse-primary-40 object-cover", src: i }),
      /* @__PURE__ */ S.jsx(Bu, { className: "bg-viverse-primary-40" })
    ] }),
    /* @__PURE__ */ S.jsx("h1", { className: "text-lg font-bold landscape:lg:text-2xl", children: l })
  ] });
}
const eb = (l) => /* @__PURE__ */ x.createElement("svg", { width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...l }, /* @__PURE__ */ x.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M17.5082 3.95077C17.0405 3.48305 16.2821 3.48305 15.8144 3.95077L3.775 15.9902C3.65967 16.1055 3.59638 16.2629 3.59974 16.4259L3.66814 19.7451C3.67476 20.0661 3.93345 20.3248 4.25451 20.3314L7.57364 20.3998C7.7367 20.4032 7.89409 20.3399 8.00942 20.2246L20.0488 8.18518C20.5165 7.71746 20.5165 6.95913 20.0488 6.49141L17.5082 3.95077ZM5.40639 16.8994L5.44059 18.559L7.10015 18.5932L8.54325 17.1501L6.84949 15.4563L5.40639 16.8994Z", fill: "white" })), tb = (l) => /* @__PURE__ */ x.createElement("svg", { width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...l }, /* @__PURE__ */ x.createElement("path", { d: "M21.2489 5.75824C20.7803 5.28062 20.0205 5.28062 19.5519 5.75824L9.60039 15.9007L4.44892 10.6503C3.98029 10.1727 3.22049 10.1727 2.75186 10.6503C2.28323 11.128 2.28323 11.9023 2.75186 12.38L8.3276 18.0627C9.03054 18.7791 10.1702 18.7791 10.8732 18.0627L21.2489 7.48786C21.7175 7.01024 21.7175 6.23586 21.2489 5.75824Z", fill: "currentColor" })), nb = (l) => /* @__PURE__ */ x.createElement("svg", { width: 20, height: 20, viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...l }, /* @__PURE__ */ x.createElement("path", { d: "M17 17L3 3", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ x.createElement("path", { d: "M17 3L3 17", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" })), oh = (l) => {
  let i;
  const o = /* @__PURE__ */ new Set(), s = (h, y) => {
    const g = typeof h == "function" ? h(i) : h;
    if (!Object.is(g, i)) {
      const _ = i;
      i = y ?? (typeof g != "object" || g === null) ? g : Object.assign({}, i, g), o.forEach((M) => M(i, _));
    }
  }, f = () => i, m = { setState: s, getState: f, getInitialState: () => v, subscribe: (h) => (o.add(h), () => o.delete(h)) }, v = i = l(s, f, m);
  return m;
}, X2 = (l) => l ? oh(l) : oh, ab = (l) => l;
function Do(l, i = ab) {
  const o = Z.useSyncExternalStore(
    l.subscribe,
    () => i(l.getState()),
    () => i(l.getInitialState())
  );
  return Z.useDebugValue(o), o;
}
const lb = (l) => {
  const i = X2(l), o = (s) => Do(i, s);
  return Object.assign(o, i), o;
}, Z2 = (l) => lb, wt = () => x.useContext(ju), Hu = () => {
  const { viverseApp: l } = wt();
  if (!l)
    throw new Error("useProfile must be used within a ViverseAppContext provider.");
  const i = l.context.profile;
  return {
    ...Do(i)
  };
};
function ib({ className: l, type: i, ...o }) {
  return /* @__PURE__ */ S.jsx(
    "input",
    {
      type: i,
      "data-slot": "input",
      className: pe(
        "file:text-foreground placeholder:text-muted-foreground dark:bg-input/30 border-input shadow-xs h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base outline-none transition-[color,box-shadow] file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
        "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
        "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
        l
      ),
      ...o
    }
  );
}
function rb({
  className: l,
  containerClassName: i,
  maxLength: o,
  value: s,
  ...f
}) {
  const u = s ? String(s).length : 0;
  return /* @__PURE__ */ S.jsx("div", { className: "box-border flex w-full items-center", children: /* @__PURE__ */ S.jsxs(
    "div",
    {
      className: pe(
        "border-viverse-primary-70 focus-within:border-viverse-brand-4 flex flex-1 items-center gap-x-4 rounded-md border-2 px-3 py-2 transition-all duration-300 landscape:lg:px-4 landscape:lg:py-3",
        i
      ),
      children: [
        /* @__PURE__ */ S.jsx(
          ib,
          {
            className: pe("ring-0! border-none! outline-none! rounded-none", l),
            maxLength: o,
            value: s,
            ...f
          }
        ),
        o && /* @__PURE__ */ S.jsx("div", { className: "h-full w-max text-nowrap", children: /* @__PURE__ */ S.jsxs("span", { className: "text-viverse-primary-40 text-xs landscape:lg:text-sm", children: [
          u,
          " / ",
          o
        ] }) })
      ]
    }
  ) });
}
const Bi = (l) => {
  const [i, o] = x.useState(null), { viverseApp: s } = wt();
  if (!s)
    throw new Error("useSystem must be used within a ViverseAppContext provider.");
  return x.useEffect(() => {
    const f = () => {
      const p = s.systems[l];
      p && o(p);
    }, u = s.systems[l];
    return u ? o(u) : s.once("start", f), () => {
      s.off("start", f);
    };
  }, [s, l]), i;
}, sh = pe(
  "size-11 cursor-pointer rounded-full border-2 transition landscape:lg:size-12",
  "group cursor-pointer",
  "flex items-center justify-center"
), ob = X2(() => ({ isLoggedIn: !1 }));
function sb({ displayName: l }) {
  const [i, o] = x.useState(l), [s, f] = x.useState(!1), { setProfile: u } = Hu(), p = Bi(Rl.Account), m = Do(p?.store ?? ob, (_) => _.isLoggedIn), v = () => {
    o(l), f(!0);
  }, h = () => {
    f(!1);
  }, y = async () => {
    const _ = i.trim();
    _ !== l && u({ displayName: _ }), f(!1);
  }, g = (_) => {
    o(_.target.value);
  };
  return s ? /* @__PURE__ */ S.jsxs("div", { className: "flex items-center gap-x-4", children: [
    /* @__PURE__ */ S.jsx("div", { className: "flex-1", children: /* @__PURE__ */ S.jsx(
      rb,
      {
        maxLength: 30,
        value: i,
        onChange: g,
        name: "displayName",
        className: "h-auto p-0",
        onKeyDown: (_) => _.stopPropagation()
      }
    ) }),
    /* @__PURE__ */ S.jsxs("div", { className: "flex items-center justify-center gap-x-2 landscape:lg:gap-x-3", children: [
      /* @__PURE__ */ S.jsx("div", { className: sh, onClick: h, children: /* @__PURE__ */ S.jsx(nb, { className: "text-viverse-primary-20 group-hover:text-viverse-white size-6 landscape:lg:size-[26px]" }) }),
      /* @__PURE__ */ S.jsx(
        "div",
        {
          className: pe(
            sh,
            "border-viverse-brand-4 active:border-viverse-brand-6 hover:border-viverse-brand-5"
          ),
          onClick: y,
          children: /* @__PURE__ */ S.jsx(tb, { className: "text-viverse-primary-20 group-hover:text-viverse-white size-6 landscape:lg:size-[26px]" })
        }
      )
    ] })
  ] }) : /* @__PURE__ */ S.jsxs("div", { className: "flex items-center justify-between", children: [
    /* @__PURE__ */ S.jsx("h1", { className: "overflow-hidden text-ellipsis text-lg font-bold landscape:lg:text-2xl", children: l }),
    !m && /* @__PURE__ */ S.jsx(eb, { className: "size-5 cursor-pointer landscape:lg:size-7", onClick: v })
  ] });
}
const cb = ({
  title: l,
  hint: i,
  children: o
}) => /* @__PURE__ */ S.jsxs("div", { className: "bg-viverse-popup flex flex-col gap-y-2 rounded-2xl px-6 py-4 landscape:lg:gap-y-6 landscape:lg:px-10 landscape:lg:py-8", children: [
  /* @__PURE__ */ S.jsx("h3", { className: "text-md text-viverse-primary-20 font-bold landscape:lg:text-lg", children: l }),
  /* @__PURE__ */ S.jsxs("div", { className: "flex flex-col gap-y-2", children: [
    o,
    i && /* @__PURE__ */ S.jsx("p", { className: "text-viverse-primary-30 text-xs", children: i })
  ] })
] });
function ub({ displayName: l }) {
  return /* @__PURE__ */ S.jsxs("div", { className: "flex flex-col gap-y-3 landscape:lg:gap-y-5", children: [
    /* @__PURE__ */ S.jsx(
      cb,
      {
        title: "Display Name",
        hint: "This is how other people will see and recognize you in VIVERSE.",
        children: /* @__PURE__ */ S.jsx(sb, { displayName: l })
      }
    ),
    ""
  ] });
}
function fb() {
  const [l, i] = x.useState(!1), { viverseApp: o } = wt(), s = Hu(), { displayName: f = "", fullBodySnapshot: u, snapshot: p } = s;
  return x.useEffect(() => {
    if (!o) return;
    const m = () => i(!0);
    return o.on("ui:open-my-profile", m), () => {
      o.off("ui:open-my-profile", m);
    };
  }, [o]), /* @__PURE__ */ S.jsx(O4, { modal: !0, onOpenChange: i, open: l, "aria-describedby": void 0, children: /* @__PURE__ */ S.jsxs(
    H4,
    {
      showCloseButton: !1,
      onMouseDown: (m) => m.stopPropagation(),
      className: "h-full w-full max-w-full grid-rows-[auto_1fr] rounded-none border-0 p-6 outline-none sm:max-w-full landscape:lg:p-8",
      children: [
        /* @__PURE__ */ S.jsx($4, { asChild: !0, children: /* @__PURE__ */ S.jsx("div", { className: "flex h-10 justify-end", children: /* @__PURE__ */ S.jsx(L4, { className: "cursor-pointer outline-none", children: /* @__PURE__ */ S.jsx(Du, { className: "text-viverse-primary-10 hover:text-viverse-white h-8 w-8 landscape:lg:h-10 landscape:lg:w-10" }) }) }) }),
        /* @__PURE__ */ S.jsx(V4, { className: "sr-only" }),
        /* @__PURE__ */ S.jsx("div", { className: "dialog-scrollbar grid h-full w-full place-items-center overflow-auto p-4", children: /* @__PURE__ */ S.jsx("div", { className: "w-[600px] rounded-2xl landscape:lg:w-[1076px]", children: /* @__PURE__ */ S.jsxs("div", { className: "flex flex-row items-start justify-between gap-8", children: [
          /* @__PURE__ */ S.jsxs("div", { className: "h-full w-full landscape:lg:max-w-[550px]", children: [
            /* @__PURE__ */ S.jsx("div", { className: "mb-4 landscape:lg:mb-8", children: /* @__PURE__ */ S.jsx(F4, { displayName: f, snapshot: p }) }),
            /* @__PURE__ */ S.jsx(ub, { displayName: f })
          ] }),
          /* @__PURE__ */ S.jsx(
            "div",
            {
              className: "aspect-2/3 h-[302px] w-[180px] min-w-[180px] overflow-hidden rounded-2xl bg-cover landscape:lg:h-[694px] landscape:lg:w-[416px]",
              style: {
                backgroundImage: `url(${yo("ui", "/images/profile-background.png")})`
              },
              children: u && /* @__PURE__ */ S.jsx(
                "img",
                {
                  className: "h-full w-full object-cover",
                  src: u,
                  alt: "Full Body Snapshot"
                }
              )
            }
          )
        ] }) }) })
      ]
    }
  ) });
}
function db({ children: l }) {
  return /* @__PURE__ */ S.jsx("div", { className: "relative flex h-dvh w-dvw flex-col justify-between", children: l });
}
function hb(l) {
  if (typeof document > "u") return;
  let i = document.head || document.getElementsByTagName("head")[0], o = document.createElement("style");
  o.type = "text/css", i.appendChild(o), o.styleSheet ? o.styleSheet.cssText = l : o.appendChild(document.createTextNode(l));
}
const mb = (l) => {
  switch (l) {
    case "success":
      return gb;
    case "info":
      return yb;
    case "warning":
      return bb;
    case "error":
      return xb;
    default:
      return null;
  }
}, pb = Array(12).fill(0), vb = ({ visible: l, className: i }) => /* @__PURE__ */ Z.createElement("div", {
  className: [
    "sonner-loading-wrapper",
    i
  ].filter(Boolean).join(" "),
  "data-visible": l
}, /* @__PURE__ */ Z.createElement("div", {
  className: "sonner-spinner"
}, pb.map((o, s) => /* @__PURE__ */ Z.createElement("div", {
  className: "sonner-loading-bar",
  key: `spinner-bar-${s}`
})))), gb = /* @__PURE__ */ Z.createElement("svg", {
  xmlns: "http://www.w3.org/2000/svg",
  viewBox: "0 0 20 20",
  fill: "currentColor",
  height: "20",
  width: "20"
}, /* @__PURE__ */ Z.createElement("path", {
  fillRule: "evenodd",
  d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",
  clipRule: "evenodd"
})), bb = /* @__PURE__ */ Z.createElement("svg", {
  xmlns: "http://www.w3.org/2000/svg",
  viewBox: "0 0 24 24",
  fill: "currentColor",
  height: "20",
  width: "20"
}, /* @__PURE__ */ Z.createElement("path", {
  fillRule: "evenodd",
  d: "M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",
  clipRule: "evenodd"
})), yb = /* @__PURE__ */ Z.createElement("svg", {
  xmlns: "http://www.w3.org/2000/svg",
  viewBox: "0 0 20 20",
  fill: "currentColor",
  height: "20",
  width: "20"
}, /* @__PURE__ */ Z.createElement("path", {
  fillRule: "evenodd",
  d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",
  clipRule: "evenodd"
})), xb = /* @__PURE__ */ Z.createElement("svg", {
  xmlns: "http://www.w3.org/2000/svg",
  viewBox: "0 0 20 20",
  fill: "currentColor",
  height: "20",
  width: "20"
}, /* @__PURE__ */ Z.createElement("path", {
  fillRule: "evenodd",
  d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",
  clipRule: "evenodd"
})), Sb = /* @__PURE__ */ Z.createElement("svg", {
  xmlns: "http://www.w3.org/2000/svg",
  width: "12",
  height: "12",
  viewBox: "0 0 24 24",
  fill: "none",
  stroke: "currentColor",
  strokeWidth: "1.5",
  strokeLinecap: "round",
  strokeLinejoin: "round"
}, /* @__PURE__ */ Z.createElement("line", {
  x1: "18",
  y1: "6",
  x2: "6",
  y2: "18"
}), /* @__PURE__ */ Z.createElement("line", {
  x1: "6",
  y1: "6",
  x2: "18",
  y2: "18"
})), _b = () => {
  const [l, i] = Z.useState(document.hidden);
  return Z.useEffect(() => {
    const o = () => {
      i(document.hidden);
    };
    return document.addEventListener("visibilitychange", o), () => window.removeEventListener("visibilitychange", o);
  }, []), l;
};
let _u = 1;
class wb {
  constructor() {
    this.subscribe = (i) => (this.subscribers.push(i), () => {
      const o = this.subscribers.indexOf(i);
      this.subscribers.splice(o, 1);
    }), this.publish = (i) => {
      this.subscribers.forEach((o) => o(i));
    }, this.addToast = (i) => {
      this.publish(i), this.toasts = [
        ...this.toasts,
        i
      ];
    }, this.create = (i) => {
      var o;
      const { message: s, ...f } = i, u = typeof i?.id == "number" || ((o = i.id) == null ? void 0 : o.length) > 0 ? i.id : _u++, p = this.toasts.find((v) => v.id === u), m = i.dismissible === void 0 ? !0 : i.dismissible;
      return this.dismissedToasts.has(u) && this.dismissedToasts.delete(u), p ? this.toasts = this.toasts.map((v) => v.id === u ? (this.publish({
        ...v,
        ...i,
        id: u,
        title: s
      }), {
        ...v,
        ...i,
        id: u,
        dismissible: m,
        title: s
      }) : v) : this.addToast({
        title: s,
        ...f,
        dismissible: m,
        id: u
      }), u;
    }, this.dismiss = (i) => (i ? (this.dismissedToasts.add(i), requestAnimationFrame(() => this.subscribers.forEach((o) => o({
      id: i,
      dismiss: !0
    })))) : this.toasts.forEach((o) => {
      this.subscribers.forEach((s) => s({
        id: o.id,
        dismiss: !0
      }));
    }), i), this.message = (i, o) => this.create({
      ...o,
      message: i
    }), this.error = (i, o) => this.create({
      ...o,
      message: i,
      type: "error"
    }), this.success = (i, o) => this.create({
      ...o,
      type: "success",
      message: i
    }), this.info = (i, o) => this.create({
      ...o,
      type: "info",
      message: i
    }), this.warning = (i, o) => this.create({
      ...o,
      type: "warning",
      message: i
    }), this.loading = (i, o) => this.create({
      ...o,
      type: "loading",
      message: i
    }), this.promise = (i, o) => {
      if (!o)
        return;
      let s;
      o.loading !== void 0 && (s = this.create({
        ...o,
        promise: i,
        type: "loading",
        message: o.loading,
        description: typeof o.description != "function" ? o.description : void 0
      }));
      const f = Promise.resolve(i instanceof Function ? i() : i);
      let u = s !== void 0, p;
      const m = f.then(async (h) => {
        if (p = [
          "resolve",
          h
        ], Z.isValidElement(h))
          u = !1, this.create({
            id: s,
            type: "default",
            message: h
          });
        else if (Eb(h) && !h.ok) {
          u = !1;
          const g = typeof o.error == "function" ? await o.error(`HTTP error! status: ${h.status}`) : o.error, _ = typeof o.description == "function" ? await o.description(`HTTP error! status: ${h.status}`) : o.description, j = typeof g == "object" && !Z.isValidElement(g) ? g : {
            message: g
          };
          this.create({
            id: s,
            type: "error",
            description: _,
            ...j
          });
        } else if (h instanceof Error) {
          u = !1;
          const g = typeof o.error == "function" ? await o.error(h) : o.error, _ = typeof o.description == "function" ? await o.description(h) : o.description, j = typeof g == "object" && !Z.isValidElement(g) ? g : {
            message: g
          };
          this.create({
            id: s,
            type: "error",
            description: _,
            ...j
          });
        } else if (o.success !== void 0) {
          u = !1;
          const g = typeof o.success == "function" ? await o.success(h) : o.success, _ = typeof o.description == "function" ? await o.description(h) : o.description, j = typeof g == "object" && !Z.isValidElement(g) ? g : {
            message: g
          };
          this.create({
            id: s,
            type: "success",
            description: _,
            ...j
          });
        }
      }).catch(async (h) => {
        if (p = [
          "reject",
          h
        ], o.error !== void 0) {
          u = !1;
          const y = typeof o.error == "function" ? await o.error(h) : o.error, g = typeof o.description == "function" ? await o.description(h) : o.description, M = typeof y == "object" && !Z.isValidElement(y) ? y : {
            message: y
          };
          this.create({
            id: s,
            type: "error",
            description: g,
            ...M
          });
        }
      }).finally(() => {
        u && (this.dismiss(s), s = void 0), o.finally == null || o.finally.call(o);
      }), v = () => new Promise((h, y) => m.then(() => p[0] === "reject" ? y(p[1]) : h(p[1])).catch(y));
      return typeof s != "string" && typeof s != "number" ? {
        unwrap: v
      } : Object.assign(s, {
        unwrap: v
      });
    }, this.custom = (i, o) => {
      const s = o?.id || _u++;
      return this.create({
        jsx: i(s),
        id: s,
        ...o
      }), s;
    }, this.getActiveToasts = () => this.toasts.filter((i) => !this.dismissedToasts.has(i.id)), this.subscribers = [], this.toasts = [], this.dismissedToasts = /* @__PURE__ */ new Set();
  }
}
const At = new wb(), Cb = (l, i) => {
  const o = i?.id || _u++;
  return At.addToast({
    title: l,
    ...i,
    id: o
  }), o;
}, Eb = (l) => l && typeof l == "object" && "ok" in l && typeof l.ok == "boolean" && "status" in l && typeof l.status == "number", Tb = Cb, Mb = () => At.toasts, Ab = () => At.getActiveToasts(), jb = Object.assign(Tb, {
  success: At.success,
  info: At.info,
  warning: At.warning,
  error: At.error,
  custom: At.custom,
  message: At.message,
  promise: At.promise,
  dismiss: At.dismiss,
  loading: At.loading
}, {
  getHistory: Mb,
  getToasts: Ab
});
hb("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");
function so(l) {
  return l.label !== void 0;
}
const kb = 3, Nb = "24px", Rb = "16px", ch = 4e3, Db = 356, zb = 14, Ob = 45, Ub = 200;
function un(...l) {
  return l.filter(Boolean).join(" ");
}
function Lb(l) {
  const [i, o] = l.split("-"), s = [];
  return i && s.push(i), o && s.push(o), s;
}
const Bb = (l) => {
  var i, o, s, f, u, p, m, v, h;
  const { invert: y, toast: g, unstyled: _, interacting: M, setHeights: j, visibleToasts: A, heights: O, index: U, toasts: F, expanded: P, removeToast: Y, defaultRichColors: J, closeButton: W, style: ee, cancelButtonStyle: K, actionButtonStyle: fe, className: Ze = "", descriptionClassName: ht = "", duration: De, position: Ve, gap: mt, expandByDefault: Me, classNames: R, icons: Q, closeButtonAriaLabel: q = "Close toast" } = l, [ye, C] = Z.useState(null), [$, I] = Z.useState(null), [L, X] = Z.useState(!1), [le, ie] = Z.useState(!1), [ve, oe] = Z.useState(!1), [Ke, jt] = Z.useState(!1), [kt, yt] = Z.useState(!1), [Ul, fa] = Z.useState(0), [Uo, Hi] = Z.useState(0), pt = Z.useRef(g.duration || De || ch), $i = Z.useRef(null), Bt = Z.useRef(null), Vi = U === 0, Oa = U + 1 <= A, xt = g.type, mn = g.dismissible !== !1, Lo = g.className || "", Bo = g.descriptionClassName || "", nn = Z.useMemo(() => O.findIndex((he) => he.toastId === g.id) || 0, [
    O,
    g.id
  ]), St = Z.useMemo(() => {
    var he;
    return (he = g.closeButton) != null ? he : W;
  }, [
    g.closeButton,
    W
  ]), Pt = Z.useMemo(() => g.duration || De || ch, [
    g.duration,
    De
  ]), ot = Z.useRef(0), zn = Z.useRef(0), qi = Z.useRef(0), On = Z.useRef(null), [Ua, La] = Ve.split("-"), an = Z.useMemo(() => O.reduce((he, qe, Je) => Je >= nn ? he : he + qe.height, 0), [
    O,
    nn
  ]), da = _b(), ha = g.invert || y, Ll = xt === "loading";
  zn.current = Z.useMemo(() => nn * mt + an, [
    nn,
    an
  ]), Z.useEffect(() => {
    pt.current = Pt;
  }, [
    Pt
  ]), Z.useEffect(() => {
    X(!0);
  }, []), Z.useEffect(() => {
    const he = Bt.current;
    if (he) {
      const qe = he.getBoundingClientRect().height;
      return Hi(qe), j((Je) => [
        {
          toastId: g.id,
          height: qe,
          position: g.position
        },
        ...Je
      ]), () => j((Je) => Je.filter((st) => st.toastId !== g.id));
    }
  }, [
    j,
    g.id
  ]), Z.useLayoutEffect(() => {
    if (!L) return;
    const he = Bt.current, qe = he.style.height;
    he.style.height = "auto";
    const Je = he.getBoundingClientRect().height;
    he.style.height = qe, Hi(Je), j((st) => st.find((Ie) => Ie.toastId === g.id) ? st.map((Ie) => Ie.toastId === g.id ? {
      ...Ie,
      height: Je
    } : Ie) : [
      {
        toastId: g.id,
        height: Je,
        position: g.position
      },
      ...st
    ]);
  }, [
    L,
    g.title,
    g.description,
    j,
    g.id,
    g.jsx,
    g.action,
    g.cancel
  ]);
  const Wt = Z.useCallback(() => {
    ie(!0), fa(zn.current), j((he) => he.filter((qe) => qe.toastId !== g.id)), setTimeout(() => {
      Y(g);
    }, Ub);
  }, [
    g,
    Y,
    j,
    zn
  ]);
  Z.useEffect(() => {
    if (g.promise && xt === "loading" || g.duration === 1 / 0 || g.type === "loading") return;
    let he;
    return P || M || da ? (() => {
      if (qi.current < ot.current) {
        const st = (/* @__PURE__ */ new Date()).getTime() - ot.current;
        pt.current = pt.current - st;
      }
      qi.current = (/* @__PURE__ */ new Date()).getTime();
    })() : (() => {
      pt.current !== 1 / 0 && (ot.current = (/* @__PURE__ */ new Date()).getTime(), he = setTimeout(() => {
        g.onAutoClose == null || g.onAutoClose.call(g, g), Wt();
      }, pt.current));
    })(), () => clearTimeout(he);
  }, [
    P,
    M,
    g,
    xt,
    da,
    Wt
  ]), Z.useEffect(() => {
    g.delete && (Wt(), g.onDismiss == null || g.onDismiss.call(g, g));
  }, [
    Wt,
    g.delete
  ]);
  function Gi() {
    var he;
    if (Q?.loading) {
      var qe;
      return /* @__PURE__ */ Z.createElement("div", {
        className: un(R?.loader, g == null || (qe = g.classNames) == null ? void 0 : qe.loader, "sonner-loader"),
        "data-visible": xt === "loading"
      }, Q.loading);
    }
    return /* @__PURE__ */ Z.createElement(vb, {
      className: un(R?.loader, g == null || (he = g.classNames) == null ? void 0 : he.loader),
      visible: xt === "loading"
    });
  }
  const Bl = g.icon || Q?.[xt] || mb(xt);
  var Un, Yi;
  return /* @__PURE__ */ Z.createElement("li", {
    tabIndex: 0,
    ref: Bt,
    className: un(Ze, Lo, R?.toast, g == null || (i = g.classNames) == null ? void 0 : i.toast, R?.default, R?.[xt], g == null || (o = g.classNames) == null ? void 0 : o[xt]),
    "data-sonner-toast": "",
    "data-rich-colors": (Un = g.richColors) != null ? Un : J,
    "data-styled": !(g.jsx || g.unstyled || _),
    "data-mounted": L,
    "data-promise": !!g.promise,
    "data-swiped": kt,
    "data-removed": le,
    "data-visible": Oa,
    "data-y-position": Ua,
    "data-x-position": La,
    "data-index": U,
    "data-front": Vi,
    "data-swiping": ve,
    "data-dismissible": mn,
    "data-type": xt,
    "data-invert": ha,
    "data-swipe-out": Ke,
    "data-swipe-direction": $,
    "data-expanded": !!(P || Me && L),
    "data-testid": g.testId,
    style: {
      "--index": U,
      "--toasts-before": U,
      "--z-index": F.length - U,
      "--offset": `${le ? Ul : zn.current}px`,
      "--initial-height": Me ? "auto" : `${Uo}px`,
      ...ee,
      ...g.style
    },
    onDragEnd: () => {
      oe(!1), C(null), On.current = null;
    },
    onPointerDown: (he) => {
      he.button !== 2 && (Ll || !mn || ($i.current = /* @__PURE__ */ new Date(), fa(zn.current), he.target.setPointerCapture(he.pointerId), he.target.tagName !== "BUTTON" && (oe(!0), On.current = {
        x: he.clientX,
        y: he.clientY
      })));
    },
    onPointerUp: () => {
      var he, qe, Je;
      if (Ke || !mn) return;
      On.current = null;
      const st = Number(((he = Bt.current) == null ? void 0 : he.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), ma = Number(((qe = Bt.current) == null ? void 0 : qe.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), Ie = (/* @__PURE__ */ new Date()).getTime() - ((Je = $i.current) == null ? void 0 : Je.getTime()), Ge = ye === "x" ? st : ma, Ye = Math.abs(Ge) / Ie;
      if (Math.abs(Ge) >= Ob || Ye > 0.11) {
        fa(zn.current), g.onDismiss == null || g.onDismiss.call(g, g), I(ye === "x" ? st > 0 ? "right" : "left" : ma > 0 ? "down" : "up"), Wt(), jt(!0);
        return;
      } else {
        var Oe, nt;
        (Oe = Bt.current) == null || Oe.style.setProperty("--swipe-amount-x", "0px"), (nt = Bt.current) == null || nt.style.setProperty("--swipe-amount-y", "0px");
      }
      yt(!1), oe(!1), C(null);
    },
    onPointerMove: (he) => {
      var qe, Je, st;
      if (!On.current || !mn || ((qe = window.getSelection()) == null ? void 0 : qe.toString().length) > 0) return;
      const Ie = he.clientY - On.current.y, Ge = he.clientX - On.current.x;
      var Ye;
      const Oe = (Ye = l.swipeDirections) != null ? Ye : Lb(Ve);
      !ye && (Math.abs(Ge) > 1 || Math.abs(Ie) > 1) && C(Math.abs(Ge) > Math.abs(Ie) ? "x" : "y");
      let nt = {
        x: 0,
        y: 0
      };
      const Ba = (pn) => 1 / (1.5 + Math.abs(pn) / 20);
      if (ye === "y") {
        if (Oe.includes("top") || Oe.includes("bottom"))
          if (Oe.includes("top") && Ie < 0 || Oe.includes("bottom") && Ie > 0)
            nt.y = Ie;
          else {
            const pn = Ie * Ba(Ie);
            nt.y = Math.abs(pn) < Math.abs(Ie) ? pn : Ie;
          }
      } else if (ye === "x" && (Oe.includes("left") || Oe.includes("right")))
        if (Oe.includes("left") && Ge < 0 || Oe.includes("right") && Ge > 0)
          nt.x = Ge;
        else {
          const pn = Ge * Ba(Ge);
          nt.x = Math.abs(pn) < Math.abs(Ge) ? pn : Ge;
        }
      (Math.abs(nt.x) > 0 || Math.abs(nt.y) > 0) && yt(!0), (Je = Bt.current) == null || Je.style.setProperty("--swipe-amount-x", `${nt.x}px`), (st = Bt.current) == null || st.style.setProperty("--swipe-amount-y", `${nt.y}px`);
    }
  }, St && !g.jsx && xt !== "loading" ? /* @__PURE__ */ Z.createElement("button", {
    "aria-label": q,
    "data-disabled": Ll,
    "data-close-button": !0,
    onClick: Ll || !mn ? () => {
    } : () => {
      Wt(), g.onDismiss == null || g.onDismiss.call(g, g);
    },
    className: un(R?.closeButton, g == null || (s = g.classNames) == null ? void 0 : s.closeButton)
  }, (Yi = Q?.close) != null ? Yi : Sb) : null, (xt || g.icon || g.promise) && g.icon !== null && (Q?.[xt] !== null || g.icon) ? /* @__PURE__ */ Z.createElement("div", {
    "data-icon": "",
    className: un(R?.icon, g == null || (f = g.classNames) == null ? void 0 : f.icon)
  }, g.promise || g.type === "loading" && !g.icon ? g.icon || Gi() : null, g.type !== "loading" ? Bl : null) : null, /* @__PURE__ */ Z.createElement("div", {
    "data-content": "",
    className: un(R?.content, g == null || (u = g.classNames) == null ? void 0 : u.content)
  }, /* @__PURE__ */ Z.createElement("div", {
    "data-title": "",
    className: un(R?.title, g == null || (p = g.classNames) == null ? void 0 : p.title)
  }, g.jsx ? g.jsx : typeof g.title == "function" ? g.title() : g.title), g.description ? /* @__PURE__ */ Z.createElement("div", {
    "data-description": "",
    className: un(ht, Bo, R?.description, g == null || (m = g.classNames) == null ? void 0 : m.description)
  }, typeof g.description == "function" ? g.description() : g.description) : null), /* @__PURE__ */ Z.isValidElement(g.cancel) ? g.cancel : g.cancel && so(g.cancel) ? /* @__PURE__ */ Z.createElement("button", {
    "data-button": !0,
    "data-cancel": !0,
    style: g.cancelButtonStyle || K,
    onClick: (he) => {
      so(g.cancel) && mn && (g.cancel.onClick == null || g.cancel.onClick.call(g.cancel, he), Wt());
    },
    className: un(R?.cancelButton, g == null || (v = g.classNames) == null ? void 0 : v.cancelButton)
  }, g.cancel.label) : null, /* @__PURE__ */ Z.isValidElement(g.action) ? g.action : g.action && so(g.action) ? /* @__PURE__ */ Z.createElement("button", {
    "data-button": !0,
    "data-action": !0,
    style: g.actionButtonStyle || fe,
    onClick: (he) => {
      so(g.action) && (g.action.onClick == null || g.action.onClick.call(g.action, he), !he.defaultPrevented && Wt());
    },
    className: un(R?.actionButton, g == null || (h = g.classNames) == null ? void 0 : h.actionButton)
  }, g.action.label) : null);
};
function uh() {
  if (typeof window > "u" || typeof document > "u") return "ltr";
  const l = document.documentElement.getAttribute("dir");
  return l === "auto" || !l ? window.getComputedStyle(document.documentElement).direction : l;
}
function Hb(l, i) {
  const o = {};
  return [
    l,
    i
  ].forEach((s, f) => {
    const u = f === 1, p = u ? "--mobile-offset" : "--offset", m = u ? Rb : Nb;
    function v(h) {
      [
        "top",
        "right",
        "bottom",
        "left"
      ].forEach((y) => {
        o[`${p}-${y}`] = typeof h == "number" ? `${h}px` : h;
      });
    }
    typeof s == "number" || typeof s == "string" ? v(s) : typeof s == "object" ? [
      "top",
      "right",
      "bottom",
      "left"
    ].forEach((h) => {
      s[h] === void 0 ? o[`${p}-${h}`] = m : o[`${p}-${h}`] = typeof s[h] == "number" ? `${s[h]}px` : s[h];
    }) : v(m);
  }), o;
}
const $b = /* @__PURE__ */ Z.forwardRef(function(i, o) {
  const { id: s, invert: f, position: u = "bottom-right", hotkey: p = [
    "altKey",
    "KeyT"
  ], expand: m, closeButton: v, className: h, offset: y, mobileOffset: g, theme: _ = "light", richColors: M, duration: j, style: A, visibleToasts: O = kb, toastOptions: U, dir: F = uh(), gap: P = zb, icons: Y, containerAriaLabel: J = "Notifications" } = i, [W, ee] = Z.useState([]), K = Z.useMemo(() => s ? W.filter((L) => L.toasterId === s) : W.filter((L) => !L.toasterId), [
    W,
    s
  ]), fe = Z.useMemo(() => Array.from(new Set([
    u
  ].concat(K.filter((L) => L.position).map((L) => L.position)))), [
    K,
    u
  ]), [Ze, ht] = Z.useState([]), [De, Ve] = Z.useState(!1), [mt, Me] = Z.useState(!1), [R, Q] = Z.useState(_ !== "system" ? _ : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), q = Z.useRef(null), ye = p.join("+").replace(/Key/g, "").replace(/Digit/g, ""), C = Z.useRef(null), $ = Z.useRef(!1), I = Z.useCallback((L) => {
    ee((X) => {
      var le;
      return (le = X.find((ie) => ie.id === L.id)) != null && le.delete || At.dismiss(L.id), X.filter(({ id: ie }) => ie !== L.id);
    });
  }, []);
  return Z.useEffect(() => At.subscribe((L) => {
    if (L.dismiss) {
      requestAnimationFrame(() => {
        ee((X) => X.map((le) => le.id === L.id ? {
          ...le,
          delete: !0
        } : le));
      });
      return;
    }
    setTimeout(() => {
      Kh.flushSync(() => {
        ee((X) => {
          const le = X.findIndex((ie) => ie.id === L.id);
          return le !== -1 ? [
            ...X.slice(0, le),
            {
              ...X[le],
              ...L
            },
            ...X.slice(le + 1)
          ] : [
            L,
            ...X
          ];
        });
      });
    });
  }), [
    W
  ]), Z.useEffect(() => {
    if (_ !== "system") {
      Q(_);
      return;
    }
    if (_ === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? Q("dark") : Q("light")), typeof window > "u") return;
    const L = window.matchMedia("(prefers-color-scheme: dark)");
    try {
      L.addEventListener("change", ({ matches: X }) => {
        Q(X ? "dark" : "light");
      });
    } catch {
      L.addListener(({ matches: le }) => {
        try {
          Q(le ? "dark" : "light");
        } catch (ie) {
          console.error(ie);
        }
      });
    }
  }, [
    _
  ]), Z.useEffect(() => {
    W.length <= 1 && Ve(!1);
  }, [
    W
  ]), Z.useEffect(() => {
    const L = (X) => {
      var le;
      if (p.every((oe) => X[oe] || X.code === oe)) {
        var ve;
        Ve(!0), (ve = q.current) == null || ve.focus();
      }
      X.code === "Escape" && (document.activeElement === q.current || (le = q.current) != null && le.contains(document.activeElement)) && Ve(!1);
    };
    return document.addEventListener("keydown", L), () => document.removeEventListener("keydown", L);
  }, [
    p
  ]), Z.useEffect(() => {
    if (q.current)
      return () => {
        C.current && (C.current.focus({
          preventScroll: !0
        }), C.current = null, $.current = !1);
      };
  }, [
    q.current
  ]), // Remove item from normal navigation flow, only available via hotkey
  /* @__PURE__ */ Z.createElement("section", {
    ref: o,
    "aria-label": `${J} ${ye}`,
    tabIndex: -1,
    "aria-live": "polite",
    "aria-relevant": "additions text",
    "aria-atomic": "false",
    suppressHydrationWarning: !0
  }, fe.map((L, X) => {
    var le;
    const [ie, ve] = L.split("-");
    return K.length ? /* @__PURE__ */ Z.createElement("ol", {
      key: L,
      dir: F === "auto" ? uh() : F,
      tabIndex: -1,
      ref: q,
      className: h,
      "data-sonner-toaster": !0,
      "data-sonner-theme": R,
      "data-y-position": ie,
      "data-x-position": ve,
      style: {
        "--front-toast-height": `${((le = Ze[0]) == null ? void 0 : le.height) || 0}px`,
        "--width": `${Db}px`,
        "--gap": `${P}px`,
        ...A,
        ...Hb(y, g)
      },
      onBlur: (oe) => {
        $.current && !oe.currentTarget.contains(oe.relatedTarget) && ($.current = !1, C.current && (C.current.focus({
          preventScroll: !0
        }), C.current = null));
      },
      onFocus: (oe) => {
        oe.target instanceof HTMLElement && oe.target.dataset.dismissible === "false" || $.current || ($.current = !0, C.current = oe.relatedTarget);
      },
      onMouseEnter: () => Ve(!0),
      onMouseMove: () => Ve(!0),
      onMouseLeave: () => {
        mt || Ve(!1);
      },
      onDragEnd: () => Ve(!1),
      onPointerDown: (oe) => {
        oe.target instanceof HTMLElement && oe.target.dataset.dismissible === "false" || Me(!0);
      },
      onPointerUp: () => Me(!1)
    }, K.filter((oe) => !oe.position && X === 0 || oe.position === L).map((oe, Ke) => {
      var jt, kt;
      return /* @__PURE__ */ Z.createElement(Bb, {
        key: oe.id,
        icons: Y,
        index: Ke,
        toast: oe,
        defaultRichColors: M,
        duration: (jt = U?.duration) != null ? jt : j,
        className: U?.className,
        descriptionClassName: U?.descriptionClassName,
        invert: f,
        visibleToasts: O,
        closeButton: (kt = U?.closeButton) != null ? kt : v,
        interacting: mt,
        position: L,
        style: U?.style,
        unstyled: U?.unstyled,
        classNames: U?.classNames,
        cancelButtonStyle: U?.cancelButtonStyle,
        actionButtonStyle: U?.actionButtonStyle,
        closeButtonAriaLabel: U?.closeButtonAriaLabel,
        removeToast: I,
        toasts: K.filter((yt) => yt.position == oe.position),
        heights: Ze.filter((yt) => yt.position == oe.position),
        setHeights: ht,
        expandByDefault: m,
        gap: P,
        expanded: De,
        swipeDirections: i.swipeDirections
      });
    })) : null;
  }));
});
var Vb = (l, i, o, s, f, u, p, m) => {
  let v = document.documentElement, h = ["light", "dark"];
  function y(M) {
    (Array.isArray(l) ? l : [l]).forEach((j) => {
      let A = j === "class", O = A && u ? f.map((U) => u[U] || U) : f;
      A ? (v.classList.remove(...O), v.classList.add(u && u[M] ? u[M] : M)) : v.setAttribute(j, M);
    }), g(M);
  }
  function g(M) {
    m && h.includes(M) && (v.style.colorScheme = M);
  }
  function _() {
    return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
  }
  if (s) y(s);
  else try {
    let M = localStorage.getItem(i) || o, j = p && M === "system" ? _() : M;
    y(j);
  } catch {
  }
}, qb = x.createContext(void 0), Gb = { setTheme: (l) => {
}, themes: [] }, Yb = () => {
  var l;
  return (l = x.useContext(qb)) != null ? l : Gb;
};
x.memo(({ forcedTheme: l, storageKey: i, attribute: o, enableSystem: s, enableColorScheme: f, defaultTheme: u, value: p, themes: m, nonce: v, scriptProps: h }) => {
  let y = JSON.stringify([o, i, u, l, m, p, s, f]).slice(1, -1);
  return x.createElement("script", { ...h, suppressHydrationWarning: !0, nonce: typeof window > "u" ? v : "", dangerouslySetInnerHTML: { __html: `(${Vb.toString()})(${y})` } });
});
const Qb = ({ ...l }) => {
  const { theme: i = "system" } = Yb();
  return /* @__PURE__ */ S.jsx(
    $b,
    {
      theme: i,
      className: "toaster group",
      icons: {
        success: /* @__PURE__ */ S.jsx(Q3, { className: "size-4" }),
        info: /* @__PURE__ */ S.jsx(Z3, { className: "size-4" }),
        warning: /* @__PURE__ */ S.jsx(F3, { className: "size-4" }),
        error: /* @__PURE__ */ S.jsx(W3, { className: "size-4" }),
        loading: /* @__PURE__ */ S.jsx(J3, { className: "size-4 animate-spin" })
      },
      style: {
        "--normal-bg": "var(--popover)",
        "--normal-text": "var(--popover-foreground)",
        "--normal-border": "var(--border)",
        "--border-radius": "var(--radius)"
      },
      ...l
    }
  );
};
function Xb() {
  const { viverseApp: l } = wt();
  return x.useEffect(() => {
    if (!l) return;
    const i = ({
      title: o,
      description: s,
      duration: f
    }) => jb.message(
      /* @__PURE__ */ S.jsx(
        "div",
        {
          "data-title": !0,
          style: {
            background: "var(--viverse-popup)",
            color: "var(--viverse-neutral-20)",
            border: "var(--viverse-neutral-70)",
            borderRadius: "var(--radius-md)"
          },
          children: o
        }
      ),
      {
        description: /* @__PURE__ */ S.jsx(
          "div",
          {
            "data-description": !0,
            style: {
              background: "var(--viverse-popup)",
              color: "var(--viverse-neutral-20)",
              border: "var(--viverse-neutral-70)",
              borderRadius: "var(--radius-md)"
            },
            children: s
          }
        ),
        duration: f * 1e3
      }
    );
    return l.on("ui:open-toast-message", i), () => {
      l.off("ui:open-toast-message", i);
    };
  }, [l]), /* @__PURE__ */ S.jsx(
    Qb,
    {
      position: "bottom-center",
      expand: !0,
      closeButton: !0,
      toastOptions: {
        className: "pointer-events-auto",
        classNames: {
          closeButton: "!text-viverse-primary-20 !border-viverse-primary-70 !bg-viverse-popup"
        },
        style: {
          "--normal-bg": "var(--viverse-popup)",
          "--normal-text": "var(--viverse-neutral-20)",
          "--normal-border": "var(--viverse-neutral-70)",
          "--border-radius": "var(--radius-md)"
        }
      }
    }
  );
}
const K2 = () => {
  const l = Bi(Rl.Quest), [i, o] = x.useState(() => []);
  return x.useEffect(() => {
    if (!l) return;
    const s = () => {
      o(l.quests);
    };
    return s(), l.on("quest-list-update", s), () => {
      l.off("quest-list-update", s);
    };
  }, [l]), { quests: i, questSystem: l };
}, Zb = (l) => {
  const [i, o] = x.useState(l.title || ""), [s, f] = x.useState(l.description || ""), [u, p] = x.useState(l.isActive || !1), [m, v] = x.useState(l.isCompleted || !1), [h, y] = x.useState(l.tasks || []);
  return x.useEffect(() => {
    const g = () => p(l.isActive), _ = () => v(l.isCompleted), M = () => {
      p(l.isActive), v(l.isCompleted);
    };
    return l.on("start", g), l.on("complete", _), l.on("reset", M), () => {
      l.off("start", g), l.off("complete", _), l.off("reset", M);
    };
  }, [l]), x.useEffect(() => {
    const g = () => {
      o(l.title), f(l.description);
    };
    return l.on("content-update", g), () => {
      l.off("content-update", g);
    };
  }, [l]), x.useEffect(() => {
    const g = () => y(l.tasks);
    return l.on("task-list-update", g), () => {
      l.off("task-list-update", g);
    };
  }, [l]), { quest: l, title: i, description: s, isActive: u, isCompleted: m, tasks: h };
}, Kb = (l) => {
  const i = l.totalProgress || 0, [o, s] = x.useState(0);
  return x.useEffect(() => {
    const f = (u) => {
      s(u);
    };
    return l.on("progress-update", f), () => {
      l.off("progress-update", f);
    };
  }, [l]), { currentProgress: o, totalProgress: i };
};
function Jb({ task: l, isCompleted: i }) {
  const { currentProgress: o, totalProgress: s } = Kb(l), [f, u] = x.useState(0), p = x.useRef(o);
  return x.useEffect(() => {
    o > p.current && u((m) => m + 1), p.current = o;
  }, [o]), /* @__PURE__ */ S.jsxs(
    "p",
    {
      className: pe("text-[10px] font-normal transition-colors delay-1000 duration-150", {
        "text-viverse-yellow": o > 0,
        "text-viverse-primary-40": i
      }),
      children: [
        /* @__PURE__ */ S.jsx(
          "span",
          {
            className: pe({
              "progress-keyframe": f > 0
            }),
            children: o
          },
          f
        ),
        /* @__PURE__ */ S.jsxs("span", { children: [
          " of ",
          s,
          " completed"
        ] })
      ]
    }
  );
}
const Pb = (l) => /* @__PURE__ */ x.createElement("svg", { width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...l }, /* @__PURE__ */ x.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12 21.5994C17.3019 21.5994 21.6 17.3018 21.6 11.9994C21.6 6.69757 17.3019 2.39999 12 2.39999C6.6982 2.39999 2.40002 6.69757 2.40002 11.9994C2.40002 17.3018 6.6982 21.5994 12 21.5994ZM17.8348 8.87267C17.4867 8.52453 16.9222 8.52453 16.5741 8.87267L10.6481 14.7987L7.636 11.7866C7.28787 11.4385 6.72342 11.4385 6.37528 11.7866C6.02715 12.1348 6.02715 12.6992 6.37528 13.0473L9.76015 16.4322C10.2505 16.9226 11.0456 16.9226 11.536 16.4322L17.8348 10.1334C18.1829 9.78525 18.1829 9.22081 17.8348 8.87267Z", fill: "#009DE7" })), Wb = (l) => {
  const [i, o] = x.useState(l.description), [s, f] = x.useState(l.isCompleted);
  return x.useEffect(() => {
    const u = () => f(l.isCompleted), p = () => o(l.description);
    return l.on("complete", u), l.on("reset", u), l.on("content-update", p), () => {
      l.off("complete", u), l.off("reset", u), l.off("content-update", p);
    };
  }, [l]), { description: i, isCompleted: s };
};
function Ib({ task: l }) {
  const { isCompleted: i } = Wb(l);
  return /* @__PURE__ */ S.jsxs(
    "div",
    {
      className: pe(
        "flex items-center gap-x-1 border-b border-white/20 bg-black/15 p-2 last:border-b-0 md:px-4 md:py-3",
        "task-sweep-effect",
        {
          completed: i
        }
      ),
      children: [
        /* @__PURE__ */ S.jsxs("div", { className: "flex flex-1 flex-col gap-y-1", children: [
          /* @__PURE__ */ S.jsx(
            "p",
            {
              className: pe(
                "text-[10px] font-medium transition-colors delay-1000 duration-150 md:text-base",
                {
                  "text-viverse-primary-40": i
                }
              ),
              children: l.description
            }
          ),
          l.type === qv.Progress && /* @__PURE__ */ S.jsx(Jb, { task: l, isCompleted: i })
        ] }),
        /* @__PURE__ */ S.jsx(
          Pb,
          {
            className: pe(
              "text-viverse-yellow size-6 shrink-0 opacity-0 transition-opacity delay-1000 duration-150 md:size-8",
              {
                "opacity-100": i
              }
            )
          }
        )
      ]
    },
    l.name
  );
}
function Fb({ questInstance: l }) {
  const { isActive: i, isCompleted: o, tasks: s, title: f, description: u } = Zb(l), [p, m] = x.useState(o), [v, h] = x.useState(!1), y = x.useRef(null), g = s.length > 0;
  return x.useEffect(() => {
    !v && o && h(!0);
  }, [o, v]), x.useEffect(() => {
    if (!v) return;
    const _ = y.current, M = (j) => {
      j.animationName === "quest-height-collapse" && m(!0);
    };
    return _ && _.addEventListener("animationend", M), () => {
      _ && _.removeEventListener("animationend", M);
    };
  }, [v]), x.useEffect(() => {
    i && !o && (m(!1), h(!1));
  }, [i, o]), !i || p ? null : /* @__PURE__ */ S.jsx(
    "div",
    {
      ref: y,
      className: pe("quest-container entering", {
        exiting: v
      }),
      children: /* @__PURE__ */ S.jsxs("div", { className: "text-viverse-primary-20 rounded-sm border-2 border-white/20 bg-black/40 px-3 py-2 backdrop-blur-[32px] md:rounded-2xl md:px-6 md:py-4", children: [
        /* @__PURE__ */ S.jsx("h3", { className: "text-xs font-bold tracking-wide md:text-xl", children: f }),
        /* @__PURE__ */ S.jsx("p", { className: "text-[10px] font-normal tracking-wide md:text-sm", children: u }),
        g && /* @__PURE__ */ S.jsx("div", { className: "mt-2 flex flex-col overflow-hidden rounded-sm md:mt-3 md:rounded-lg", children: s.map((_) => /* @__PURE__ */ S.jsx(Ib, { task: _ }, _.name)) })
      ] })
    }
  );
}
const vo = Z2()((l) => ({
  isQuestPanelOpen: !1,
  toggleQuestPanel: () => {
    l((i) => ({ isQuestPanelOpen: !i.isQuestPanelOpen }));
  },
  openQuestPanel: () => {
    l({ isQuestPanelOpen: !0 });
  },
  closeQuestPanel: () => {
    l({ isQuestPanelOpen: !1 });
  }
}));
function e5() {
  const { quests: l } = K2();
  return vo((o) => o.isQuestPanelOpen) ? /* @__PURE__ */ S.jsx(
    "div",
    {
      onWheel: (o) => o.stopPropagation(),
      onMouseDown: (o) => o.stopPropagation(),
      className: "dialog-scrollbar pointer-events-auto max-h-full w-full max-w-[336px] overflow-y-auto md:max-w-[400px]",
      children: /* @__PURE__ */ S.jsx("div", { className: "flex h-fit flex-col gap-y-1", children: l.map((o) => /* @__PURE__ */ S.jsx(Fb, { questInstance: o }, o.name)) })
    }
  ) : null;
}
function J2({ className: l, children: i }) {
  return /* @__PURE__ */ S.jsx(
    "div",
    {
      className: pe(
        "flex max-h-full w-full shrink-0 justify-between overflow-x-auto py-2 lg:py-3",
        l
      ),
      children: i
    }
  );
}
const fh = (l) => typeof l == "boolean" ? `${l}` : l === 0 ? "0" : l, dh = j2, t5 = (l, i) => (o) => {
  var s;
  if (i?.variants == null) return dh(l, o?.class, o?.className);
  const { variants: f, defaultVariants: u } = i, p = Object.keys(f).map((h) => {
    const y = o?.[h], g = u?.[h];
    if (y === null) return null;
    const _ = fh(y) || fh(g);
    return f[h][_];
  }), m = o && Object.entries(o).reduce((h, y) => {
    let [g, _] = y;
    return _ === void 0 || (h[g] = _), h;
  }, {}), v = i == null || (s = i.compoundVariants) === null || s === void 0 ? void 0 : s.reduce((h, y) => {
    let { class: g, className: _, ...M } = y;
    return Object.entries(M).every((j) => {
      let [A, O] = j;
      return Array.isArray(O) ? O.includes({
        ...u,
        ...m
      }[A]) : {
        ...u,
        ...m
      }[A] === O;
    }) ? [
      ...h,
      g,
      _
    ] : h;
  }, []);
  return dh(l, p, v, o?.class, o?.className);
}, n5 = t5(
  [
    "cursor-pointer [&_svg_path]:fill-current transition-colors rounded-full p-[6.5px] border-[1.5px] border-white/20 bg-black/40 backdrop-blur-[48px]",
    "disabled:cursor-not-allowed disabled:opacity-40",
    "disabled:hover:text-viverse-primary-20 disabled:active:text-viverse-primary-20"
  ],
  {
    variants: {
      variant: {
        default: [
          "text-viverse-primary-20",
          "hover:text-viverse-white",
          "active:text-viverse-primary-40"
        ],
        active: [
          "text-viverse-brand-70",
          "hover:text-viverse-brand-40",
          "active:text-viverse-brand-70"
        ]
      }
    },
    defaultVariants: {
      variant: "default"
    }
  }
);
function $u({ children: l, className: i, disabled: o, active: s, ...f }) {
  return /* @__PURE__ */ S.jsx(
    "button",
    {
      className: pe(
        n5({
          variant: s ? "active" : "default"
        }),
        i
      ),
      disabled: o,
      ...f,
      children: l
    }
  );
}
const a5 = (l) => /* @__PURE__ */ x.createElement("svg", { width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...l }, /* @__PURE__ */ x.createElement("path", { d: "M21.2571 4.80005H2.4391C1.75878 4.80005 1.19995 5.35888 1.19995 6.03919V17.4466C1.19995 18.1269 1.75878 18.6857 2.4391 18.6857H7.79658C8.46474 18.6857 9.04787 18.2606 9.2544 17.6289L10.53 13.8142C11.0038 12.405 12.984 12.405 13.4578 13.8142L14.7333 17.6289C14.9398 18.2606 15.5352 18.6857 16.2033 18.6857H21.5608C22.2411 18.6857 22.7999 18.1269 22.7999 17.4466V6.34291C22.7999 5.49251 22.1074 4.80005 21.2571 4.80005ZM7.77228 13.7656C5.63414 14.8347 3.50816 12.7209 4.57723 10.5706C4.75945 10.194 5.06317 9.89026 5.43977 9.70804C7.5779 8.63897 9.70389 10.7528 8.63483 12.903C8.44045 13.2797 8.13673 13.5834 7.77228 13.7656ZM18.5722 13.7656C16.4342 14.8347 14.3082 12.7209 15.3772 10.5706C15.5595 10.194 15.8631 9.89026 16.2398 9.70804C18.378 8.63897 20.5039 10.7528 19.4348 12.903C19.2404 13.2797 18.9368 13.5834 18.5722 13.7656Z", fill: "white" })), l5 = () => {
  const { viverseApp: l } = wt();
  if (!l)
    throw new Error("useCapability must be used within a ViverseAppContext provider.");
  const i = l.context.capability;
  return {
    ...Do(i)
  };
};
function i5() {
  const [l, i] = x.useState(!1), o = !l, { isVrSupported: s } = l5(), { viverseApp: f } = wt(), u = () => {
    f && f.emit("xr:start-vr");
  };
  return x.useEffect(() => {
    if (!f || l) return;
    const p = () => i(!0);
    return f.once("player:ready", p), () => {
      f.off("player:ready", p);
    };
  }, [f, l]), s && /* @__PURE__ */ S.jsx($u, { onClick: u, disabled: o, children: /* @__PURE__ */ S.jsx(a5, { className: "size-5" }) });
}
const r5 = (l) => /* @__PURE__ */ x.createElement("svg", { width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...l }, /* @__PURE__ */ x.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M13.1998 2.66016C13.1998 2.20943 12.8623 1.82587 12.4119 1.80798C12.2752 1.80255 12.1378 1.7998 11.9998 1.7998C6.3665 1.7998 1.7998 6.3665 1.7998 11.9998C1.7998 17.6331 6.3665 22.1998 11.9998 22.1998C17.6331 22.1998 22.1998 17.6331 22.1998 11.9998C22.1998 11.639 22.1811 11.2827 22.1445 10.9316C22.1003 10.5062 21.73 10.1998 21.3023 10.1998C20.7392 10.1998 20.3222 10.7215 20.3696 11.2826C20.3896 11.519 20.3998 11.7582 20.3998 11.9998C20.3998 16.639 16.639 20.3998 11.9998 20.3998C7.36061 20.3998 3.5998 16.639 3.5998 11.9998C3.5998 7.36061 7.36061 3.5998 11.9998 3.5998C12.0597 3.5998 12.1195 3.60043 12.1791 3.60168C12.7198 3.613 13.1998 3.20096 13.1998 2.66016Z", fill: "white" }), /* @__PURE__ */ x.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11.9998 6.89983C11.9998 6.40278 11.5945 5.99274 11.1029 6.06641C8.21465 6.49932 5.9998 8.99092 5.9998 11.9998C5.9998 15.3135 8.6861 17.9998 11.9998 17.9998C15.0087 17.9998 17.5003 15.785 17.9332 12.8967C18.0069 12.4051 17.5969 11.9998 17.0998 11.9998C16.6027 11.9998 16.2098 12.4075 16.1046 12.8933C15.695 14.7837 14.0128 16.1998 11.9998 16.1998C9.68021 16.1998 7.7998 14.3194 7.7998 11.9998C7.7998 9.98684 9.21596 8.30461 11.1063 7.89506C11.5921 7.78982 11.9998 7.39689 11.9998 6.89983Z", fill: "white" }), /* @__PURE__ */ x.createElement("path", { d: "M20.1558 7.23048C20.9741 7.50322 21.3832 7.6396 21.496 7.84891C21.5894 8.02217 21.5919 8.23022 21.5026 8.40565C21.3948 8.6176 20.9891 8.76367 20.1776 9.05581L13.9312 11.3045C13.3081 11.5288 12.9966 11.641 12.7937 11.5682C12.6248 11.5076 12.492 11.3748 12.4314 11.2059C12.3587 11.003 12.4708 10.6915 12.6951 10.0684L14.9438 3.82204C15.2359 3.01054 15.382 2.60479 15.594 2.49697C15.7694 2.40773 15.9774 2.4102 16.1507 2.5036C16.36 2.61643 16.4964 3.02554 16.7691 3.84377L17.4631 5.92559C17.5197 6.09535 17.5479 6.18023 17.5965 6.25051C17.6377 6.31018 17.6894 6.36188 17.7491 6.40311C17.8194 6.45166 17.9043 6.47995 18.074 6.53654L20.1558 7.23048Z", fill: "white" }));
function o5() {
  const { autoOpenQuestPanel: l } = wt(), { quests: i } = K2(), o = i.length > 0, s = vo((v) => v.isQuestPanelOpen), f = vo((v) => v.toggleQuestPanel), u = vo((v) => v.openQuestPanel), p = x.useRef(!1), m = () => {
    f();
  };
  return x.useEffect(() => {
    if (!l) {
      p.current = !0;
      return;
    }
    i.length > 0 && !p.current && (u(), p.current = !0);
  }, [i, u, l]), o && /* @__PURE__ */ S.jsx($u, { active: s, onClick: m, children: /* @__PURE__ */ S.jsx(r5, { className: "size-5" }) });
}
const s5 = (l) => /* @__PURE__ */ x.createElement("svg", { width: 20, height: 20, viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...l }, /* @__PURE__ */ x.createElement("path", { d: "M6.50012 4.5493C6.50012 2.58907 8.06712 1 10.0001 1C11.9331 1 13.5001 2.58907 13.5001 4.5493V10.1268C13.5001 12.087 11.9331 13.6761 10.0001 13.6761C8.06712 13.6761 6.50012 12.087 6.50012 10.1268V4.5493Z", fill: "#D5E2F2" }), /* @__PURE__ */ x.createElement("path", { d: "M10.7501 16.6697C12.5075 16.4406 14.084 15.4138 15.1225 13.8468C15.3536 13.4982 15.2622 13.0257 14.9184 12.7913C14.5747 12.557 14.1087 12.6497 13.8776 12.9983C12.9639 14.3769 11.5389 15.1972 10.0001 15.1972C8.46126 15.1972 7.03625 14.3769 6.12254 12.9983C5.89148 12.6497 5.42548 12.557 5.08171 12.7913C4.73793 13.0257 4.64655 13.4982 4.87761 13.8468C5.91619 15.4138 7.49265 16.4407 9.25012 16.6697V18.2394C9.25012 18.6595 9.5859 19 10.0001 19C10.4143 19 10.7501 18.6595 10.7501 18.2394V16.6697Z", fill: "#D5E2F2" })), c5 = (l) => /* @__PURE__ */ x.createElement("svg", { width: 16, height: 22, viewBox: "0 0 16 22", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...l }, /* @__PURE__ */ x.createElement("path", { d: "M3.75365 4.25915C3.75365 1.90689 5.63405 0 7.95365 0C9.95777 0 11.634 1.42347 12.0529 3.3278L3.79919 11.5815C3.76919 11.3761 3.75365 11.166 3.75365 10.9521V4.25915Z", fill: "#D5E2F2" }), /* @__PURE__ */ x.createElement("path", { d: "M12.1537 8.29844L15.5371 4.91499C15.8886 4.56351 15.8886 3.99366 15.5371 3.64219C15.1856 3.29072 14.6158 3.29072 14.2643 3.64219L0.263604 17.6429C-0.0878678 17.9944 -0.0878681 18.5642 0.263604 18.9157C0.615076 19.2672 1.18492 19.2672 1.5364 18.9157L3.32263 17.1295C4.39463 18.0377 5.67793 18.6244 7.05365 18.8037V20.6873C7.05365 21.1914 7.45659 21.6 7.95365 21.6C8.45071 21.6 8.85365 21.1914 8.85365 20.6873V18.8037C10.9626 18.5288 12.8543 17.2966 14.1006 15.4162C14.3778 14.9979 14.2682 14.4308 13.8557 14.1496C13.4431 13.8684 12.8839 13.9796 12.6066 14.398C11.5102 16.0523 9.80019 17.0367 7.9536 17.0367C6.73449 17.0367 5.57491 16.6076 4.61211 15.84L5.82662 14.6255C6.45045 14.9978 7.17746 15.2113 7.95365 15.2113C10.2732 15.2113 12.1537 13.3044 12.1537 10.9521V8.29844Z", fill: "#D5E2F2" }));
var P2 = /* @__PURE__ */ ((l) => (l.Unknown = "unknown", l.Granted = "granted", l.Denied = "denied", l.Prompt = "prompt", l))(P2 || {});
const u5 = () => {
  const { viverseApp: l } = wt(), [i, o] = x.useState(!1), [s, f] = x.useState(!1), [u, p] = x.useState(
    "unknown"
    /* Unknown */
  ), [m, v] = x.useState(!1), h = l?.systems.network, y = h?.modules.multiplayer?.audio;
  x.useEffect(() => {
    y && (o(y.isEnabled), f(y.isMuted));
  }, [y]);
  const g = x.useCallback(async () => {
    try {
      const O = (await navigator.mediaDevices.enumerateDevices()).some((U) => U.kind === "audioinput" && U.label !== "");
      p(
        O ? "granted" : "prompt"
        /* Granted */
      );
    } catch {
      p(
        "denied"
        /* Denied */
      );
    }
    v(!0);
  }, []);
  x.useEffect(() => {
    g();
  }, [g]), x.useEffect(() => {
    if (!h) return;
    const A = () => o(!0), O = () => o(!1), U = () => {
      g();
    };
    return h.on("multiplayer:audio-enabled", A), h.on("multiplayer:audio-disabled", O), h.on("multiplayer:audio-input-changed", U), () => {
      h.off("multiplayer:audio-enabled", A), h.off("multiplayer:audio-disabled", O), h.off("multiplayer:audio-input-changed", U);
    };
  }, [h, g]);
  const _ = x.useCallback(async () => {
    if (y)
      try {
        u !== "granted" && (await y.requestPermission(), p(
          "granted"
          /* Granted */
        )), await y.enable();
      } catch (A) {
        Vh.error("Failed to enable audio", A), A instanceof Error && (A.name === "NotAllowedError" || A.name === "PermissionDeniedError") && p(
          "denied"
          /* Denied */
        );
      }
  }, [y, u]), M = x.useCallback(async () => {
    y && await y.disable();
  }, [y]), j = x.useCallback(async () => {
    y && (s ? (await y.unmute(), f(!1)) : (await y.mute(), f(!0)));
  }, [y, s]);
  return {
    isSupported: !!y,
    isEnabled: i,
    isMuted: s,
    permissionState: u,
    enable: _,
    disable: M,
    toggleMute: j,
    hasCheckedPermission: m
  };
};
function f5() {
  const { enabledConfig: l } = wt(), { isSupported: i, isEnabled: o, isMuted: s, permissionState: f, enable: u, toggleMute: p } = u5();
  if (!l.audioChatUi || !i)
    return null;
  const m = f === P2.Denied, v = o && !s, h = m, y = () => {
    h || (o ? p() : u());
  };
  return /* @__PURE__ */ S.jsx(
    $u,
    {
      active: v,
      disabled: h,
      onClick: y,
      title: m ? "Microphone access denied" : o ? s ? "Unmute" : "Mute" : "Enable Audio",
      children: v ? /* @__PURE__ */ S.jsx(s5, { className: "size-5" }) : /* @__PURE__ */ S.jsx(c5, { className: "size-5" })
    }
  );
}
function d5({
  questUi: l,
  audioChatUi: i,
  enterVrButton: o
}) {
  return /* @__PURE__ */ S.jsxs(J2, { children: [
    /* @__PURE__ */ S.jsxs("div", { className: "pointer-events-auto flex items-center gap-x-2", children: [
      l && /* @__PURE__ */ S.jsx(o5, {}),
      i && /* @__PURE__ */ S.jsx(f5, {})
    ] }),
    /* @__PURE__ */ S.jsx("div", { className: "pointer-events-auto", children: o && /* @__PURE__ */ S.jsx(i5, {}) })
  ] });
}
const h5 = "px-12 portrait:px-4 landscape:lg:px-4";
function W2({
  className: l,
  children: i
}) {
  return /* @__PURE__ */ S.jsx("div", { className: pe("relative flex flex-col", "min-h-0", h5, l), children: i });
}
function m5() {
  const { enabledConfig: l } = wt(), { questUi: i, audioChatUi: o, enterVrButton: s } = l;
  return /* @__PURE__ */ S.jsxs(W2, { children: [
    /* @__PURE__ */ S.jsx(d5, { questUi: i, audioChatUi: o, enterVrButton: s }),
    i && /* @__PURE__ */ S.jsx(e5, {})
  ] });
}
const p5 = () => {
  const { viverseApp: l } = wt(), [i, o] = x.useState(!1), [s, f] = x.useState(!1), [u, p] = x.useState(!1);
  return x.useEffect(() => {
    if (!l) return;
    const m = (y) => o(!!y), v = (y, g) => p(!!g), h = (y) => f(!!y);
    return l.on("interaction:holding", m), l.on("interaction:pick-action-executing", v), l.on("interaction:sitting", h), () => {
      l.off("interaction:holding", m), l.off("interaction:pick-action-executing", v), l.off("interaction:sitting", h);
    };
  }, [l]), { isHolding: i, isActing: u, isSitting: s };
}, v5 = (l) => /* @__PURE__ */ x.createElement("svg", { width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...l }, /* @__PURE__ */ x.createElement("path", { d: "M16.7523 27.5238C17.405 26.8332 18.4631 26.8331 19.1157 27.5238L21.6938 30.252C22.3464 30.9427 22.3464 32.0631 21.6938 32.7539L19.1157 35.482C18.4631 36.1726 17.405 36.1726 16.7523 35.482L14.1743 32.7539C13.5216 32.0631 13.5216 30.9427 14.1743 30.252L16.7523 27.5238ZM27.2309 4.09549C28.0557 3.79696 28.9589 4.21973 29.3054 5.0662L31.7937 11.1452C32.1274 11.9608 32.0528 12.8992 31.5953 13.6445L24.2914 25.5426C23.6929 26.5172 22.4947 26.8548 21.5175 26.3242C20.4614 25.7507 20.0474 24.3774 20.5945 23.2627L22.9179 18.5326C23.1157 18.1295 23.093 17.6449 22.8591 17.264L22.4495 16.5964C21.841 15.6056 20.6832 15.1664 19.6454 15.6024C17.8166 16.3706 15.0478 17.7272 13.6937 19.3617C12.056 21.3387 11.5899 25.228 11.4625 27.6395C11.4049 28.7274 10.4859 29.5818 9.46713 29.4237C8.7396 29.3107 8.17166 28.7053 8.11161 27.9297C7.93725 25.6723 7.78562 20.9793 9.14804 17.8806C10.4135 15.0028 14.2228 10.9974 16.3345 8.90845C17.2806 7.97263 18.4144 7.2871 19.6397 6.84353L27.2309 4.09549ZM17.3293 17.8806C17.3252 17.9015 16.9215 19.9402 16.8748 21.3351C16.8564 21.8839 16.8552 22.6769 16.8593 23.3646C16.8642 24.206 16.3458 24.9535 15.5829 25.1903C14.5748 25.5029 13.5316 24.8171 13.4831 23.7066C13.4467 22.8703 13.4766 21.9575 13.6937 21.3351C14.3585 19.4292 17.2987 17.8965 17.3293 17.8806Z", fill: "white" })), g5 = (l) => /* @__PURE__ */ x.createElement("svg", { width: 34, height: 28, viewBox: "0 0 34 28", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...l }, /* @__PURE__ */ x.createElement("path", { opacity: 0.6, d: "M0.368805 5.78107C0.0870823 5.8824 -0.14409 5.52202 0.108252 5.36202C0.117848 5.35593 0.127452 5.34986 0.137062 5.34379C0.699529 4.98945 1.2932 4.66968 1.89559 4.3801C2.71032 3.98905 3.56267 3.65682 4.42343 3.34304C10.9713 0.979767 19.6399 0.984188 27.5999 6.86068C28.1171 7.2506 28.6028 7.6491 29.104 8.11118C31.7797 10.4311 34.8206 15.3323 33.7966 20.081C32.7368 25.3331 27.1931 26.3433 23.9181 24.0235C23.2782 23.6162 22.6946 23.1242 22.1757 22.5718C21.714 22.0803 21.9678 21.3838 22.6419 21.3082C23.3122 21.2331 24.0303 21.1326 24.6511 20.6729C25.9438 19.7155 26.5114 18.1508 26.5114 18.1508C26.5114 18.1508 26.8426 16.7172 26.6655 15.831C26.4917 14.9615 26.228 14.5672 25.664 13.7951C25.4585 13.5131 25.2385 13.2368 24.9795 12.9466C20.3868 7.76697 11.8757 4.45576 4.92341 4.85912C4.02198 4.90905 3.13244 5.04503 2.26486 5.23746C1.62307 5.37959 0.984944 5.56027 0.368805 5.78107Z", fill: "white" }), /* @__PURE__ */ x.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M29.6462 0.609213C30.1236 0.665438 30.498 1.03752 30.5543 1.51234L31.1597 6.625C31.1995 6.96249 31.0707 7.3003 30.8156 7.53029L14.713 22.0489L17.1194 24.4421C17.4773 24.798 17.4771 25.3754 17.1194 25.7314C15.6873 27.1553 13.3655 27.1555 11.9336 25.7314L10.5246 24.3302L7.66312 27.176C6.55809 28.2745 4.76682 28.2748 3.66197 27.176C2.55724 26.0772 2.55744 24.2957 3.66197 23.1968L6.52346 20.3509L5.11522 18.9504C3.68333 17.5263 3.68353 15.2172 5.11522 13.793C5.47324 13.4373 6.05377 13.4371 6.41167 13.793L8.99587 16.363L23.5944 0.348599C23.8257 0.0948796 24.166 -0.0325255 24.5054 0.00712923L29.6462 0.609213ZM23.1857 6.16658L11.1198 18.1664L12.7204 19.7582L24.7863 7.75842L23.1857 6.16658Z", fill: "white" })), b5 = (l) => /* @__PURE__ */ x.createElement("svg", { width: 28, height: 36, viewBox: "0 0 28 36", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...l }, /* @__PURE__ */ x.createElement("path", { opacity: 0.6, d: "M0.402905 18.3409C2.21052 12.0854 6.86864 5.89364 17.5417 5.86513C17.8537 5.89233 18.1712 5.9299 18.4922 5.97935C18.9978 6.0573 18.2997 6.56787 18.1579 7.05853C17.3624 9.80977 17.5679 12.5613 16.7724 15.3126C16.7035 15.5507 16.3008 15.7556 16.2839 16.0028C16.2646 16.2848 16.2455 16.5668 16.2262 16.8489C16.2167 16.9879 16.0578 17.0678 15.9307 17.0104C13.9237 16.1383 10.1554 17.5627 7.54862 19.6348C7.42724 19.7331 7.25225 19.6145 7.3114 19.4703C7.31219 19.4684 7.31348 19.4664 7.31426 19.4645C7.8201 18.4102 8.37203 17.3195 9.07211 16.2882C9.56961 15.5553 9.02526 14.477 8.16127 14.6776C5.45536 15.3057 2.73975 16.6201 0.920595 18.5839C0.736844 18.8077 0.355299 18.6996 0.393019 18.4133C0.396205 18.3895 0.399457 18.3647 0.402905 18.3409Z", fill: "white" }), /* @__PURE__ */ x.createElement("path", { d: "M19.0953 0.173381C19.4017 -0.0577926 19.831 -0.0577947 20.1374 0.173381L24.4148 3.40227C24.6325 3.56663 24.7542 3.82403 24.7406 4.09104L23.6685 25.0113H27.149C27.6187 25.0115 27.9998 25.3779 28 25.8295V26.1339C27.9999 27.9413 26.4757 29.4066 24.596 29.4068H22.3264V33.2733C22.3262 34.7795 21.0557 36.0004 19.4892 36.0004C17.9227 36.0003 16.653 34.7794 16.6528 33.2733V29.4068H14.3832C12.5035 29.4066 10.9793 27.9413 10.9792 26.1339V25.8295C10.9794 25.3779 11.3605 25.0115 11.8302 25.0113H15.5641L14.4921 4.09104C14.4785 3.82403 14.5993 3.56663 14.817 3.40227L19.0953 0.173381ZM18.3548 8.43617V24.8004H20.6236V8.43617H18.3548Z", fill: "white" }));
function y5() {
  const { viverseApp: l } = wt(), i = Bi(Rl.LocalPlayer), { isHolding: o, isActing: s, isSitting: f } = p5(), u = l?.deviceInfo.hardware === ho.Mobile, p = s || f, m = (v) => {
    if (!(!l || p))
      switch (v) {
        case "pick":
          i?.emit("input:pick-nearest-item");
          break;
        case "actionA":
          i?.emit("input:action-a");
          break;
        case "actionB":
          i?.emit("input:action-b");
          break;
      }
  };
  return o && !u && /* @__PURE__ */ S.jsxs("div", { className: "flex items-center justify-center gap-4", children: [
    /* @__PURE__ */ S.jsx(
      uu,
      {
        icon: /* @__PURE__ */ S.jsx(g5, { className: "size-6" }),
        clickEvent: () => m("actionA"),
        hotkey: "F",
        disabled: p
      }
    ),
    /* @__PURE__ */ S.jsx(
      uu,
      {
        icon: /* @__PURE__ */ S.jsx(b5, { className: "size-6" }),
        clickEvent: () => m("actionB"),
        hotkey: "G",
        disabled: p
      }
    ),
    /* @__PURE__ */ S.jsx(
      uu,
      {
        icon: /* @__PURE__ */ S.jsx(v5, { className: "size-6" }),
        clickEvent: () => m("pick"),
        hotkey: "R",
        disabled: p
      }
    )
  ] });
}
function uu({
  icon: l,
  clickEvent: i,
  hotkey: o,
  disabled: s
}) {
  return /* @__PURE__ */ S.jsxs(
    "div",
    {
      onClick: i,
      className: pe("flex flex-col items-center justify-center gap-1.5 hover:cursor-pointer", {
        "opacity-50 hover:cursor-not-allowed": s
      }),
      children: [
        /* @__PURE__ */ S.jsx(
          "div",
          {
            className: pe(
              "flex h-12 w-12 items-center justify-center rounded-full border-2 border-white/90 bg-black/20 p-2 hover:bg-black/40",
              {
                "hover:bg-black/20": s
              }
            ),
            children: l
          }
        ),
        /* @__PURE__ */ S.jsx("div", { className: "flex h-[22px] w-[22px] items-center justify-center rounded-md bg-black/20", children: /* @__PURE__ */ S.jsx("p", { className: "text-ml font-bold", children: o }) })
      ]
    }
  );
}
const x5 = 60 * 1e3, S5 = (l, i, o) => {
  if (l.length === 0) return !0;
  const s = l[l.length - 1];
  return s.userSessionId !== i.userSessionId || o - s.timestamp > x5;
}, fn = Z2()((l) => ({
  // State
  isChatPanelOpen: !1,
  messageGroups: [],
  systemMessages: [],
  unreadCount: 0,
  typingUsers: /* @__PURE__ */ new Map(),
  // Actions
  toggleChatPanel: () => l((i) => ({
    isChatPanelOpen: !i.isChatPanelOpen,
    // Reset unread count when opening the panel
    unreadCount: i.isChatPanelOpen ? i.unreadCount : 0
  })),
  openChatPanel: () => l({
    isChatPanelOpen: !0,
    unreadCount: 0
  }),
  closeChatPanel: () => l({
    isChatPanelOpen: !1
  }),
  addMessage: (i) => l((o) => {
    const { messageGroups: s, isChatPanelOpen: f } = o, u = Date.now();
    if (S5(s, i, u)) {
      const v = {
        id: crypto.randomUUID(),
        userSessionId: i.userSessionId,
        senderName: i.senderName,
        avatarSnapshot: i.avatarSnapshot,
        messages: [i],
        timestamp: u,
        isSent: i.isSent
      };
      return {
        messageGroups: [...s, v],
        // Only increment unread if panel is closed and message is not from self
        unreadCount: !f && !i.isSent ? o.unreadCount + 1 : o.unreadCount
      };
    }
    const p = [...s], m = p[p.length - 1];
    return p[p.length - 1] = {
      ...m,
      messages: [...m.messages, i]
    }, {
      messageGroups: p,
      unreadCount: !f && !i.isSent ? o.unreadCount + 1 : o.unreadCount
    };
  }),
  addSystemMessage: (i) => l((o) => ({
    systemMessages: [...o.systemMessages, i]
  })),
  setTypingUser: (i, o, s) => l((f) => {
    const u = new Map(f.typingUsers);
    return s ? u.set(i, o) : u.delete(i), { typingUsers: u };
  }),
  markAsRead: () => l({
    unreadCount: 0
  }),
  clearMessages: () => l({
    messageGroups: [],
    systemMessages: [],
    unreadCount: 0
  })
})), _5 = (l) => l ? l.modules[vu.Multiplayer] ?? null : null, w5 = (l, i) => {
  const { viverseApp: o } = wt(), s = Bi(Rl.Network), f = fn((j) => j.addMessage), u = fn((j) => j.addSystemMessage), p = fn((j) => j.setTypingUser), m = _5(s), v = m?.sessionId ?? "", h = m?.adapter.connected ?? !1, y = x.useRef(l), g = x.useRef(i);
  y.current = l, g.current = i, x.useEffect(() => {
    if (!s || !o) return;
    const j = (O) => {
      const { userSessionId: U } = O;
      if (U === v) return;
      const F = {
        id: O.id,
        userSessionId: U,
        senderName: O.senderName,
        avatarSnapshot: O.avatarSnapshot,
        contentType: O.contentType,
        body: O.body,
        timestamp: O.timestamp,
        isSent: !1
      };
      f(F);
    }, A = (O) => {
      const { userSessionId: U } = O;
      U !== v && p(U, O.senderName, O.isTyping);
    };
    return s.on("chat:message-received", j), s.on("chat:typing", A), () => {
      s.off("chat:message-received", j), s.off("chat:typing", A);
    };
  }, [s, o, v, f, p]), x.useEffect(() => {
    if (!s) return;
    const j = (O) => {
      const U = {
        id: crypto.randomUUID(),
        type: "join",
        name: O,
        timestamp: Date.now()
      };
      u(U);
    }, A = (O) => {
      const U = {
        id: crypto.randomUUID(),
        type: "leave",
        name: O,
        timestamp: Date.now()
      };
      u(U), p(O, "", !1);
    };
    return s.on("multiplayer:client-connected", j), s.on("multiplayer:client-disconnected", A), () => {
      s.off("multiplayer:client-connected", j), s.off("multiplayer:client-disconnected", A);
    };
  }, [s, u, p]);
  const _ = x.useCallback(
    (j) => {
      if (!m || !j) return;
      const A = Date.now(), O = {
        type: "chat",
        data: {
          message: {
            contentType: "chat",
            body: j,
            senderName: y.current,
            avatarSnapshot: g.current || "",
            timestamp: A
          }
        }
      };
      m.sendSystemMessage(O);
      const U = {
        id: crypto.randomUUID(),
        userSessionId: v,
        senderName: y.current,
        avatarSnapshot: g.current,
        contentType: "chat",
        body: j,
        timestamp: A,
        isSent: !0
      };
      f(U);
    },
    [m, v, f]
  ), M = x.useCallback(
    (j) => {
      if (!m) return;
      const A = {
        type: "chat",
        data: {
          typing: {
            isTyping: j,
            senderName: y.current
          }
        }
      };
      m.sendSystemMessage(A);
    },
    [m]
  );
  return {
    sendMessage: _,
    sendTypingStatus: M,
    isConnected: h,
    localSessionId: v
  };
};
function C5() {
  const { viverseApp: l } = x.useContext(ju), [i, o] = x.useState({
    hardware: ho.Unknown,
    os: Yv.Unknown,
    screenOrientation: Gv.Portrait
  }), [s, f] = x.useState(!1);
  x.useEffect(() => {
    if (!l) return;
    const m = () => {
      o({
        hardware: l.deviceInfo.hardware,
        os: l.deviceInfo.os,
        screenOrientation: l.deviceInfo.screenOrientation
      });
    };
    m();
    const v = () => m();
    return l.on("device-info:orientation-changed", v), () => {
      l.off("device-info:orientation-changed", v);
    };
  }, [l]), x.useEffect(() => {
    const m = () => {
      f(window.innerWidth < 768);
    };
    return m(), window.addEventListener("resize", m), () => window.removeEventListener("resize", m);
  }, []);
  const u = i.hardware === ho.Mobile || i.hardware === ho.Headset;
  return {
    ...i,
    isMobileDevice: u,
    isMobileUI: s || u
  };
}
function hh({
  message: l,
  isSent: i,
  variant: o = "desktop"
}) {
  const s = l.isSent || i, f = pe(
    "rounded-[12px] px-3 py-2 text-sm break-words leading-[24px] tracking-[0.22px] whitespace-pre-wrap",
    s ? "bg-viveport-blue-1/70 text-viverse-white" : "bg-viveport-primary-70/70 text-viverse-white"
    // viveport-border-color-1 is primary-70 equivalent (#364356)
  ), u = pe(
    "rounded-[19px] px-4 py-2.5 text-sm break-words leading-[1.25] whitespace-pre-wrap",
    s ? "bg-viveport-blue-1 text-viverse-white" : "bg-viveport-gray-2 text-viverse-white"
  );
  return /* @__PURE__ */ S.jsx(
    "div",
    {
      className: pe(
        "mb-[2px]",
        // layout common
        o === "mobile" ? pe("w-max max-w-[80%]", u) : pe("w-fit max-w-[272px]", f)
      ),
      children: l.body
    }
  );
}
function I2(l, i = 1e4) {
  const [o, s] = x.useState("");
  return x.useEffect(() => {
    const f = () => {
      const p = typeof l == "number" ? l : new Date(l).getTime(), m = Date.now(), v = Math.max(0, Math.floor((m - p) / 1e3));
      if (v < 60)
        s(`${v} seconds ago`);
      else if (v < 3600) {
        const h = Math.floor(v / 60);
        s(`${h} minute${h !== 1 ? "s" : ""} ago`);
      } else if (v < 86400) {
        const h = Math.floor(v / 3600);
        s(`${h} hour${h !== 1 ? "s" : ""} ago`);
      } else {
        const h = Math.floor(v / 86400);
        s(`${h} day${h !== 1 ? "s" : ""} ago`);
      }
    };
    f();
    const u = setInterval(f, i);
    return () => clearInterval(u);
  }, [l, i]), o;
}
function F2({ group: l, variant: i = "desktop" }) {
  const { senderName: o, avatarSnapshot: s, messages: f, isSent: u } = l, p = f[0]?.timestamp || Date.now(), m = new Date(p).toLocaleString("en-US", {
    hour: "numeric",
    minute: "numeric",
    hour12: !0
  }), v = I2(p);
  return i === "desktop" ? /* @__PURE__ */ S.jsxs("div", { className: "flex w-full flex-row items-start gap-x-2", children: [
    /* @__PURE__ */ S.jsxs(Uu, { className: "h-8 w-8 shrink-0", children: [
      /* @__PURE__ */ S.jsx(Lu, { className: "bg-viverse-primary-40 object-cover", src: s }),
      /* @__PURE__ */ S.jsx(Bu, { children: o?.[0] })
    ] }),
    /* @__PURE__ */ S.jsxs("div", { className: "flex flex-1 flex-col items-start gap-y-1 overflow-hidden", children: [
      /* @__PURE__ */ S.jsxs("div", { className: "flex w-full flex-row items-center gap-x-2", children: [
        /* @__PURE__ */ S.jsxs("span", { className: "text-viverse-primary-20 truncate text-xs font-medium drop-shadow-[0_1px_2px_rgba(0,0,0,0.45)]", children: [
          o,
          " ",
          u && "(You)"
        ] }),
        /* @__PURE__ */ S.jsx("span", { className: "text-viverse-primary-20 text-[10px] opacity-80 drop-shadow-[0_1px_2px_rgba(0,0,0,0.45)]", children: m })
      ] }),
      /* @__PURE__ */ S.jsx("div", { className: "flex w-full flex-col items-start gap-y-1", children: f.map((h) => /* @__PURE__ */ S.jsx(hh, { message: h, isSent: u, variant: i }, h.id)) })
    ] })
  ] }) : /* @__PURE__ */ S.jsxs("div", { className: pe("flex w-full flex-col", u ? "items-end text-right" : "items-start"), children: [
    /* @__PURE__ */ S.jsxs("div", { className: "mb-1 flex flex-row items-center space-x-1", children: [
      /* @__PURE__ */ S.jsx("span", { className: "text-viverse-primary-40 max-w-[120px] truncate text-xs", children: o }),
      /* @__PURE__ */ S.jsx("span", { className: "text-viverse-primary-40/70 mx-1", children: "|" }),
      /* @__PURE__ */ S.jsx("span", { className: "text-viverse-primary-40/70 text-[10px]", children: v })
    ] }),
    /* @__PURE__ */ S.jsx("div", { className: pe("flex w-full flex-col gap-y-1", u ? "items-end" : "items-start"), children: f.map((h) => /* @__PURE__ */ S.jsx(hh, { message: h, isSent: u, variant: i }, h.id)) })
  ] });
}
function em({
  messageGroups: l,
  variant: i = "desktop",
  scrollContainerRef: o,
  maskClass: s = ""
}) {
  return x.useEffect(() => {
    o.current && (o.current.scrollTop = o.current.scrollHeight);
  }, [l, o]), /* @__PURE__ */ S.jsx(
    "div",
    {
      className: pe("flex w-full flex-col px-2 pb-2 pt-4 transition-all duration-300", s),
      children: /* @__PURE__ */ S.jsx("div", { className: "mt-auto flex flex-col gap-y-4", children: l.length === 0 ? null : l.map((f) => /* @__PURE__ */ S.jsx(F2, { group: f, variant: i }, f.id)) })
    }
  );
}
const Vu = x.forwardRef(
  ({
    disabled: l,
    maxLength: i = 500,
    placeholder: o = "Send message",
    inputEffect: s,
    onFocus: f,
    onBlur: u,
    onSend: p,
    onTyping: m,
    beforeInput: v,
    afterInput: h
  }, y) => {
    const [g, _] = x.useState(""), M = x.useRef(null);
    x.useImperativeHandle(y, () => ({
      addEmoji: (P) => {
        _((Y) => Y + P), setTimeout(() => M.current?.focus(), 0);
      },
      focus: () => {
        M.current?.focus();
      },
      submit: () => {
        A();
      }
    }));
    const j = x.useRef(void 0);
    s && s(M.current);
    const A = () => {
      g.trim().length !== 0 && g.length <= i && (p(g), _(""), j.current && clearTimeout(j.current), m(!1));
    }, O = (P) => {
      const Y = P.target.value;
      _(Y), Y.length > 0 ? (m(!0), j.current && clearTimeout(j.current), j.current = setTimeout(() => {
        m(!1);
      }, 2e3)) : m(!1);
    }, U = (P) => {
      P.stopPropagation(), P.key === "Enter" && !P.shiftKey && !P.nativeEvent.isComposing && (P.preventDefault(), A());
    }, F = g.length > i;
    return /* @__PURE__ */ S.jsx("div", { className: "pointer-events-auto w-full flex-1", onWheel: (P) => P.stopPropagation(), children: /* @__PURE__ */ S.jsxs(
      "div",
      {
        className: pe(
          "relative flex items-end px-0 py-0 transition-colors",
          // Zero padding as per source
          F && "border-viverse-red"
        ),
        children: [
          v,
          /* @__PURE__ */ S.jsx(
            "textarea",
            {
              name: "chat-input",
              ref: M,
              value: g,
              onChange: O,
              onKeyDown: U,
              disabled: l,
              placeholder: o,
              onFocus: f,
              onBlur: u,
              rows: 1,
              className: "text-viverse-primary-20 placeholder:text-viverse-primary-20/60 mx-0 my-auto max-h-32 min-w-0 flex-1 resize-none overflow-y-auto bg-transparent text-sm [field-sizing:content] focus:outline-none",
              maxLength: i
            }
          ),
          h,
          g.length > i * 0.8 && /* @__PURE__ */ S.jsxs(
            "div",
            {
              className: pe(
                "absolute inset-x-0 -bottom-5 text-right text-[10px]",
                F ? "text-viverse-red" : "text-viverse-primary-40"
              ),
              children: [
                "Max characters(",
                g.length,
                "/",
                i,
                ")"
              ]
            }
          )
        ]
      }
    ) });
  }
);
Vu.displayName = "ChatInput";
function tm(l) {
  return l && l.__esModule ? l.default : l;
}
function Kt(l, i, o) {
  return i in l ? Object.defineProperty(l, i, {
    value: o,
    enumerable: !0,
    configurable: !0,
    writable: !0
  }) : l[i] = o, l;
}
var zo, ce, nm, Li, am, mh, So = {}, lm = [], E5 = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;
function oa(l, i) {
  for (var o in i) l[o] = i[o];
  return l;
}
function im(l) {
  var i = l.parentNode;
  i && i.removeChild(l);
}
function wu(l, i, o) {
  var s, f, u, p = {};
  for (u in i) u == "key" ? s = i[u] : u == "ref" ? f = i[u] : p[u] = i[u];
  if (arguments.length > 2 && (p.children = arguments.length > 3 ? zo.call(arguments, 2) : o), typeof l == "function" && l.defaultProps != null) for (u in l.defaultProps) p[u] === void 0 && (p[u] = l.defaultProps[u]);
  return go(l, p, s, f, null);
}
function go(l, i, o, s, f) {
  var u = {
    type: l,
    props: i,
    key: o,
    ref: s,
    __k: null,
    __: null,
    __b: 0,
    __e: null,
    __d: void 0,
    __c: null,
    __h: null,
    constructor: void 0,
    __v: f ?? ++nm
  };
  return f == null && ce.vnode != null && ce.vnode(u), u;
}
function Rn() {
  return {
    current: null
  };
}
function kl(l) {
  return l.children;
}
function hn(l, i) {
  this.props = l, this.context = i;
}
function Nl(l, i) {
  if (i == null) return l.__ ? Nl(l.__, l.__.__k.indexOf(l) + 1) : null;
  for (var o; i < l.__k.length; i++) if ((o = l.__k[i]) != null && o.__e != null) return o.__e;
  return typeof l.type == "function" ? Nl(l) : null;
}
function rm(l) {
  var i, o;
  if ((l = l.__) != null && l.__c != null) {
    for (l.__e = l.__c.base = null, i = 0; i < l.__k.length; i++) if ((o = l.__k[i]) != null && o.__e != null) {
      l.__e = l.__c.base = o.__e;
      break;
    }
    return rm(l);
  }
}
function ph(l) {
  (!l.__d && (l.__d = !0) && Li.push(l) && !_o.__r++ || mh !== ce.debounceRendering) && ((mh = ce.debounceRendering) || am)(_o);
}
function _o() {
  for (var l; _o.__r = Li.length; ) l = Li.sort(function(i, o) {
    return i.__v.__b - o.__v.__b;
  }), Li = [], l.some(function(i) {
    var o, s, f, u, p, m;
    i.__d && (p = (u = (o = i).__v).__e, (m = o.__P) && (s = [], (f = oa({}, u)).__v = u.__v + 1, qu(m, u, f, o.__n, m.ownerSVGElement !== void 0, u.__h != null ? [
      p
    ] : null, s, p ?? Nl(u), u.__h), um(s, u), u.__e != p && rm(u)));
  });
}
function om(l, i, o, s, f, u, p, m, v, h) {
  var y, g, _, M, j, A, O, U = s && s.__k || lm, F = U.length;
  for (o.__k = [], y = 0; y < i.length; y++) if ((M = o.__k[y] = (M = i[y]) == null || typeof M == "boolean" ? null : typeof M == "string" || typeof M == "number" || typeof M == "bigint" ? go(null, M, null, null, M) : Array.isArray(M) ? go(kl, {
    children: M
  }, null, null, null) : M.__b > 0 ? go(M.type, M.props, M.key, null, M.__v) : M) != null) {
    if (M.__ = o, M.__b = o.__b + 1, (_ = U[y]) === null || _ && M.key == _.key && M.type === _.type) U[y] = void 0;
    else for (g = 0; g < F; g++) {
      if ((_ = U[g]) && M.key == _.key && M.type === _.type) {
        U[g] = void 0;
        break;
      }
      _ = null;
    }
    qu(l, M, _ = _ || So, f, u, p, m, v, h), j = M.__e, (g = M.ref) && _.ref != g && (O || (O = []), _.ref && O.push(_.ref, null, M), O.push(g, M.__c || j, M)), j != null ? (A == null && (A = j), typeof M.type == "function" && M.__k === _.__k ? M.__d = v = sm(M, v, l) : v = cm(l, M, _, U, j, v), typeof o.type == "function" && (o.__d = v)) : v && _.__e == v && v.parentNode != l && (v = Nl(_));
  }
  for (o.__e = A, y = F; y--; ) U[y] != null && (typeof o.type == "function" && U[y].__e != null && U[y].__e == o.__d && (o.__d = Nl(s, y + 1)), dm(U[y], U[y]));
  if (O) for (y = 0; y < O.length; y++) fm(O[y], O[++y], O[++y]);
}
function sm(l, i, o) {
  for (var s, f = l.__k, u = 0; f && u < f.length; u++) (s = f[u]) && (s.__ = l, i = typeof s.type == "function" ? sm(s, i, o) : cm(o, s, s, f, s.__e, i));
  return i;
}
function wo(l, i) {
  return i = i || [], l == null || typeof l == "boolean" || (Array.isArray(l) ? l.some(function(o) {
    wo(o, i);
  }) : i.push(l)), i;
}
function cm(l, i, o, s, f, u) {
  var p, m, v;
  if (i.__d !== void 0) p = i.__d, i.__d = void 0;
  else if (o == null || f != u || f.parentNode == null) e: if (u == null || u.parentNode !== l) l.appendChild(f), p = null;
  else {
    for (m = u, v = 0; (m = m.nextSibling) && v < s.length; v += 2) if (m == f) break e;
    l.insertBefore(f, u), p = u;
  }
  return p !== void 0 ? p : f.nextSibling;
}
function T5(l, i, o, s, f) {
  var u;
  for (u in o) u === "children" || u === "key" || u in i || Co(l, u, null, o[u], s);
  for (u in i) f && typeof i[u] != "function" || u === "children" || u === "key" || u === "value" || u === "checked" || o[u] === i[u] || Co(l, u, i[u], o[u], s);
}
function vh(l, i, o) {
  i[0] === "-" ? l.setProperty(i, o) : l[i] = o == null ? "" : typeof o != "number" || E5.test(i) ? o : o + "px";
}
function Co(l, i, o, s, f) {
  var u;
  e: if (i === "style")
    if (typeof o == "string") l.style.cssText = o;
    else {
      if (typeof s == "string" && (l.style.cssText = s = ""), s) for (i in s) o && i in o || vh(l.style, i, "");
      if (o) for (i in o) s && o[i] === s[i] || vh(l.style, i, o[i]);
    }
  else if (i[0] === "o" && i[1] === "n") u = i !== (i = i.replace(/Capture$/, "")), i = i.toLowerCase() in l ? i.toLowerCase().slice(2) : i.slice(2), l.l || (l.l = {}), l.l[i + u] = o, o ? s || l.addEventListener(i, u ? bh : gh, u) : l.removeEventListener(i, u ? bh : gh, u);
  else if (i !== "dangerouslySetInnerHTML") {
    if (f) i = i.replace(/xlink[H:h]/, "h").replace(/sName$/, "s");
    else if (i !== "href" && i !== "list" && i !== "form" && i !== "tabIndex" && i !== "download" && i in l) try {
      l[i] = o ?? "";
      break e;
    } catch {
    }
    typeof o == "function" || (o != null && (o !== !1 || i[0] === "a" && i[1] === "r") ? l.setAttribute(i, o) : l.removeAttribute(i));
  }
}
function gh(l) {
  this.l[l.type + !1](ce.event ? ce.event(l) : l);
}
function bh(l) {
  this.l[l.type + !0](ce.event ? ce.event(l) : l);
}
function qu(l, i, o, s, f, u, p, m, v) {
  var h, y, g, _, M, j, A, O, U, F, P, Y = i.type;
  if (i.constructor !== void 0) return null;
  o.__h != null && (v = o.__h, m = i.__e = o.__e, i.__h = null, u = [
    m
  ]), (h = ce.__b) && h(i);
  try {
    e: if (typeof Y == "function") {
      if (O = i.props, U = (h = Y.contextType) && s[h.__c], F = h ? U ? U.props.value : h.__ : s, o.__c ? A = (y = i.__c = o.__c).__ = y.__E : ("prototype" in Y && Y.prototype.render ? i.__c = y = new Y(O, F) : (i.__c = y = new hn(O, F), y.constructor = Y, y.render = A5), U && U.sub(y), y.props = O, y.state || (y.state = {}), y.context = F, y.__n = s, g = y.__d = !0, y.__h = []), y.__s == null && (y.__s = y.state), Y.getDerivedStateFromProps != null && (y.__s == y.state && (y.__s = oa({}, y.__s)), oa(y.__s, Y.getDerivedStateFromProps(O, y.__s))), _ = y.props, M = y.state, g) Y.getDerivedStateFromProps == null && y.componentWillMount != null && y.componentWillMount(), y.componentDidMount != null && y.__h.push(y.componentDidMount);
      else {
        if (Y.getDerivedStateFromProps == null && O !== _ && y.componentWillReceiveProps != null && y.componentWillReceiveProps(O, F), !y.__e && y.shouldComponentUpdate != null && y.shouldComponentUpdate(O, y.__s, F) === !1 || i.__v === o.__v) {
          y.props = O, y.state = y.__s, i.__v !== o.__v && (y.__d = !1), y.__v = i, i.__e = o.__e, i.__k = o.__k, i.__k.forEach(function(J) {
            J && (J.__ = i);
          }), y.__h.length && p.push(y);
          break e;
        }
        y.componentWillUpdate != null && y.componentWillUpdate(O, y.__s, F), y.componentDidUpdate != null && y.__h.push(function() {
          y.componentDidUpdate(_, M, j);
        });
      }
      y.context = F, y.props = O, y.state = y.__s, (h = ce.__r) && h(i), y.__d = !1, y.__v = i, y.__P = l, h = y.render(y.props, y.state, y.context), y.state = y.__s, y.getChildContext != null && (s = oa(oa({}, s), y.getChildContext())), g || y.getSnapshotBeforeUpdate == null || (j = y.getSnapshotBeforeUpdate(_, M)), P = h != null && h.type === kl && h.key == null ? h.props.children : h, om(l, Array.isArray(P) ? P : [
        P
      ], i, o, s, f, u, p, m, v), y.base = i.__e, i.__h = null, y.__h.length && p.push(y), A && (y.__E = y.__ = null), y.__e = !1;
    } else u == null && i.__v === o.__v ? (i.__k = o.__k, i.__e = o.__e) : i.__e = M5(o.__e, i, o, s, f, u, p, v);
    (h = ce.diffed) && h(i);
  } catch (J) {
    i.__v = null, (v || u != null) && (i.__e = m, i.__h = !!v, u[u.indexOf(m)] = null), ce.__e(J, i, o);
  }
}
function um(l, i) {
  ce.__c && ce.__c(i, l), l.some(function(o) {
    try {
      l = o.__h, o.__h = [], l.some(function(s) {
        s.call(o);
      });
    } catch (s) {
      ce.__e(s, o.__v);
    }
  });
}
function M5(l, i, o, s, f, u, p, m) {
  var v, h, y, g = o.props, _ = i.props, M = i.type, j = 0;
  if (M === "svg" && (f = !0), u != null) {
    for (; j < u.length; j++) if ((v = u[j]) && "setAttribute" in v == !!M && (M ? v.localName === M : v.nodeType === 3)) {
      l = v, u[j] = null;
      break;
    }
  }
  if (l == null) {
    if (M === null) return document.createTextNode(_);
    l = f ? document.createElementNS("http://www.w3.org/2000/svg", M) : document.createElement(M, _.is && _), u = null, m = !1;
  }
  if (M === null) g === _ || m && l.data === _ || (l.data = _);
  else {
    if (u = u && zo.call(l.childNodes), h = (g = o.props || So).dangerouslySetInnerHTML, y = _.dangerouslySetInnerHTML, !m) {
      if (u != null) for (g = {}, j = 0; j < l.attributes.length; j++) g[l.attributes[j].name] = l.attributes[j].value;
      (y || h) && (y && (h && y.__html == h.__html || y.__html === l.innerHTML) || (l.innerHTML = y && y.__html || ""));
    }
    if (T5(l, _, g, f, m), y) i.__k = [];
    else if (j = i.props.children, om(l, Array.isArray(j) ? j : [
      j
    ], i, o, s, f && M !== "foreignObject", u, p, u ? u[0] : o.__k && Nl(o, 0), m), u != null) for (j = u.length; j--; ) u[j] != null && im(u[j]);
    m || ("value" in _ && (j = _.value) !== void 0 && (j !== g.value || j !== l.value || M === "progress" && !j) && Co(l, "value", j, g.value, !1), "checked" in _ && (j = _.checked) !== void 0 && j !== l.checked && Co(l, "checked", j, g.checked, !1));
  }
  return l;
}
function fm(l, i, o) {
  try {
    typeof l == "function" ? l(i) : l.current = i;
  } catch (s) {
    ce.__e(s, o);
  }
}
function dm(l, i, o) {
  var s, f;
  if (ce.unmount && ce.unmount(l), (s = l.ref) && (s.current && s.current !== l.__e || fm(s, null, i)), (s = l.__c) != null) {
    if (s.componentWillUnmount) try {
      s.componentWillUnmount();
    } catch (u) {
      ce.__e(u, i);
    }
    s.base = s.__P = null;
  }
  if (s = l.__k) for (f = 0; f < s.length; f++) s[f] && dm(s[f], i, typeof l.type != "function");
  o || l.__e == null || im(l.__e), l.__e = l.__d = void 0;
}
function A5(l, i, o) {
  return this.constructor(l, o);
}
function hm(l, i, o) {
  var s, f, u;
  ce.__ && ce.__(l, i), f = (s = typeof o == "function") ? null : o && o.__k || i.__k, u = [], qu(i, l = (!s && o || i).__k = wu(kl, null, [
    l
  ]), f || So, So, i.ownerSVGElement !== void 0, !s && o ? [
    o
  ] : f ? null : i.firstChild ? zo.call(i.childNodes) : null, u, !s && o ? o : f ? f.__e : i.firstChild, s), um(u, l);
}
zo = lm.slice, ce = {
  __e: function(l, i) {
    for (var o, s, f; i = i.__; ) if ((o = i.__c) && !o.__) try {
      if ((s = o.constructor) && s.getDerivedStateFromError != null && (o.setState(s.getDerivedStateFromError(l)), f = o.__d), o.componentDidCatch != null && (o.componentDidCatch(l), f = o.__d), f) return o.__E = o;
    } catch (u) {
      l = u;
    }
    throw l;
  }
}, nm = 0, hn.prototype.setState = function(l, i) {
  var o;
  o = this.__s != null && this.__s !== this.state ? this.__s : this.__s = oa({}, this.state), typeof l == "function" && (l = l(oa({}, o), this.props)), l && oa(o, l), l != null && this.__v && (i && this.__h.push(i), ph(this));
}, hn.prototype.forceUpdate = function(l) {
  this.__v && (this.__e = !0, l && this.__h.push(l), ph(this));
}, hn.prototype.render = kl, Li = [], am = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, _o.__r = 0;
var j5 = 0;
function G(l, i, o, s, f) {
  var u, p, m = {};
  for (p in i) p == "ref" ? u = i[p] : m[p] = i[p];
  var v = {
    type: l,
    props: m,
    key: o,
    ref: u,
    __k: null,
    __: null,
    __b: 0,
    __e: null,
    __d: void 0,
    __c: null,
    __h: null,
    constructor: void 0,
    __v: --j5,
    __source: s,
    __self: f
  };
  if (typeof l == "function" && (u = l.defaultProps)) for (p in u) m[p] === void 0 && (m[p] = u[p]);
  return ce.vnode && ce.vnode(v), v;
}
function k5(l, i) {
  try {
    window.localStorage[`emoji-mart.${l}`] = JSON.stringify(i);
  } catch {
  }
}
function N5(l) {
  try {
    const i = window.localStorage[`emoji-mart.${l}`];
    if (i) return JSON.parse(i);
  } catch {
  }
}
var ca = {
  set: k5,
  get: N5
};
const fu = /* @__PURE__ */ new Map(), R5 = [
  {
    v: 15,
    emoji: "🫨"
  },
  {
    v: 14,
    emoji: "🫠"
  },
  {
    v: 13.1,
    emoji: "😶‍🌫️"
  },
  {
    v: 13,
    emoji: "🥸"
  },
  {
    v: 12.1,
    emoji: "🧑‍🦰"
  },
  {
    v: 12,
    emoji: "🥱"
  },
  {
    v: 11,
    emoji: "🥰"
  },
  {
    v: 5,
    emoji: "🤩"
  },
  {
    v: 4,
    emoji: "👱‍♀️"
  },
  {
    v: 3,
    emoji: "🤣"
  },
  {
    v: 2,
    emoji: "👋🏻"
  },
  {
    v: 1,
    emoji: "🙃"
  }
];
function D5() {
  for (const { v: l, emoji: i } of R5)
    if (mm(i)) return l;
}
function z5() {
  return !mm("🇨🇦");
}
function mm(l) {
  if (fu.has(l)) return fu.get(l);
  const i = O5(l);
  return fu.set(l, i), i;
}
const O5 = (() => {
  let l = null;
  try {
    navigator.userAgent.includes("jsdom") || (l = document.createElement("canvas").getContext("2d", {
      willReadFrequently: !0
    }));
  } catch {
  }
  if (!l) return () => !1;
  const i = 25, o = 20, s = Math.floor(i / 2);
  return l.font = s + "px Arial, Sans-Serif", l.textBaseline = "top", l.canvas.width = o * 2, l.canvas.height = i, (f) => {
    l.clearRect(0, 0, o * 2, i), l.fillStyle = "#FF0000", l.fillText(f, 0, 22), l.fillStyle = "#0000FF", l.fillText(f, o, 22);
    const u = l.getImageData(0, 0, o, i).data, p = u.length;
    let m = 0;
    for (; m < p && !u[m + 3]; m += 4) ;
    if (m >= p) return !1;
    const v = o + m / 4 % o, h = Math.floor(m / 4 / o), y = l.getImageData(v, h, 1, 1).data;
    return !(u[m] !== y[0] || u[m + 2] !== y[2] || l.measureText(f).width >= o);
  };
})();
var yh = {
  latestVersion: D5,
  noCountryFlags: z5
};
const Cu = [
  "+1",
  "grinning",
  "kissing_heart",
  "heart_eyes",
  "laughing",
  "stuck_out_tongue_winking_eye",
  "sweat_smile",
  "joy",
  "scream",
  "disappointed",
  "unamused",
  "weary",
  "sob",
  "sunglasses",
  "heart"
];
let dt = null;
function U5(l) {
  dt || (dt = ca.get("frequently") || {});
  const i = l.id || l;
  i && (dt[i] || (dt[i] = 0), dt[i] += 1, ca.set("last", i), ca.set("frequently", dt));
}
function L5({ maxFrequentRows: l, perLine: i }) {
  if (!l) return [];
  dt || (dt = ca.get("frequently"));
  let o = [];
  if (!dt) {
    dt = {};
    for (let u in Cu.slice(0, i)) {
      const p = Cu[u];
      dt[p] = i - u, o.push(p);
    }
    return o;
  }
  const s = l * i, f = ca.get("last");
  for (let u in dt) o.push(u);
  if (o.sort((u, p) => {
    const m = dt[p], v = dt[u];
    return m == v ? u.localeCompare(p) : m - v;
  }), o.length > s) {
    const u = o.slice(s);
    o = o.slice(0, s);
    for (let p of u)
      p != f && delete dt[p];
    f && o.indexOf(f) == -1 && (delete dt[o[o.length - 1]], o.splice(-1, 1, f)), ca.set("frequently", dt);
  }
  return o;
}
var pm = {
  add: U5,
  get: L5,
  DEFAULTS: Cu
}, vm = {};
vm = JSON.parse('{"search":"Search","search_no_results_1":"Oh no!","search_no_results_2":"That emoji couldn’t be found","pick":"Pick an emoji…","add_custom":"Add custom emoji","categories":{"activity":"Activity","custom":"Custom","flags":"Flags","foods":"Food & Drink","frequent":"Frequently used","nature":"Animals & Nature","objects":"Objects","people":"Smileys & People","places":"Travel & Places","search":"Search Results","symbols":"Symbols"},"skins":{"1":"Default","2":"Light","3":"Medium-Light","4":"Medium","5":"Medium-Dark","6":"Dark","choose":"Choose default skin tone"}}');
var Dn = {
  autoFocus: {
    value: !1
  },
  dynamicWidth: {
    value: !1
  },
  emojiButtonColors: {
    value: null
  },
  emojiButtonRadius: {
    value: "100%"
  },
  emojiButtonSize: {
    value: 36
  },
  emojiSize: {
    value: 24
  },
  emojiVersion: {
    value: 15,
    choices: [
      1,
      2,
      3,
      4,
      5,
      11,
      12,
      12.1,
      13,
      13.1,
      14,
      15
    ]
  },
  exceptEmojis: {
    value: []
  },
  icons: {
    value: "auto",
    choices: [
      "auto",
      "outline",
      "solid"
    ]
  },
  locale: {
    value: "en",
    choices: [
      "en",
      "ar",
      "be",
      "cs",
      "de",
      "es",
      "fa",
      "fi",
      "fr",
      "hi",
      "it",
      "ja",
      "ko",
      "nl",
      "pl",
      "pt",
      "ru",
      "sa",
      "tr",
      "uk",
      "vi",
      "zh"
    ]
  },
  maxFrequentRows: {
    value: 4
  },
  navPosition: {
    value: "top",
    choices: [
      "top",
      "bottom",
      "none"
    ]
  },
  noCountryFlags: {
    value: !1
  },
  noResultsEmoji: {
    value: null
  },
  perLine: {
    value: 9
  },
  previewEmoji: {
    value: null
  },
  previewPosition: {
    value: "bottom",
    choices: [
      "top",
      "bottom",
      "none"
    ]
  },
  searchPosition: {
    value: "sticky",
    choices: [
      "sticky",
      "static",
      "none"
    ]
  },
  set: {
    value: "native",
    choices: [
      "native",
      "apple",
      "facebook",
      "google",
      "twitter"
    ]
  },
  skin: {
    value: 1,
    choices: [
      1,
      2,
      3,
      4,
      5,
      6
    ]
  },
  skinTonePosition: {
    value: "preview",
    choices: [
      "preview",
      "search",
      "none"
    ]
  },
  theme: {
    value: "auto",
    choices: [
      "auto",
      "light",
      "dark"
    ]
  },
  // Data
  categories: null,
  categoryIcons: null,
  custom: null,
  data: null,
  i18n: null,
  // Callbacks
  getImageURL: null,
  getSpritesheetURL: null,
  onAddCustomEmoji: null,
  onClickOutside: null,
  onEmojiSelect: null,
  // Deprecated
  stickySearch: {
    deprecated: !0,
    value: !0
  }
};
let bt = null, we = null;
const du = {};
async function xh(l) {
  if (du[l]) return du[l];
  const o = await (await fetch(l)).json();
  return du[l] = o, o;
}
let hu = null, gm = null, bm = !1;
function Oo(l, { caller: i } = {}) {
  return hu || (hu = new Promise((o) => {
    gm = o;
  })), l ? B5(l) : i && !bm && console.warn(`\`${i}\` requires data to be initialized first. Promise will be pending until \`init\` is called.`), hu;
}
async function B5(l) {
  bm = !0;
  let { emojiVersion: i, set: o, locale: s } = l;
  if (i || (i = Dn.emojiVersion.value), o || (o = Dn.set.value), s || (s = Dn.locale.value), we)
    we.categories = we.categories.filter((v) => !v.name);
  else {
    we = (typeof l.data == "function" ? await l.data() : l.data) || await xh(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/sets/${i}/${o}.json`), we.emoticons = {}, we.natives = {}, we.categories.unshift({
      id: "frequent",
      emojis: []
    });
    for (const v in we.aliases) {
      const h = we.aliases[v], y = we.emojis[h];
      y && (y.aliases || (y.aliases = []), y.aliases.push(v));
    }
    we.originalCategories = we.categories;
  }
  if (bt = (typeof l.i18n == "function" ? await l.i18n() : l.i18n) || (s == "en" ? /* @__PURE__ */ tm(vm) : await xh(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/i18n/${s}.json`)), l.custom) for (let v in l.custom) {
    v = parseInt(v);
    const h = l.custom[v], y = l.custom[v - 1];
    if (!(!h.emojis || !h.emojis.length)) {
      h.id || (h.id = `custom_${v + 1}`), h.name || (h.name = bt.categories.custom), y && !h.icon && (h.target = y.target || y), we.categories.push(h);
      for (const g of h.emojis) we.emojis[g.id] = g;
    }
  }
  l.categories && (we.categories = we.originalCategories.filter((v) => l.categories.indexOf(v.id) != -1).sort((v, h) => {
    const y = l.categories.indexOf(v.id), g = l.categories.indexOf(h.id);
    return y - g;
  }));
  let f = null, u = null;
  o == "native" && (f = yh.latestVersion(), u = l.noCountryFlags || yh.noCountryFlags());
  let p = we.categories.length, m = !1;
  for (; p--; ) {
    const v = we.categories[p];
    if (v.id == "frequent") {
      let { maxFrequentRows: g, perLine: _ } = l;
      g = g >= 0 ? g : Dn.maxFrequentRows.value, _ || (_ = Dn.perLine.value), v.emojis = pm.get({
        maxFrequentRows: g,
        perLine: _
      });
    }
    if (!v.emojis || !v.emojis.length) {
      we.categories.splice(p, 1);
      continue;
    }
    const { categoryIcons: h } = l;
    if (h) {
      const g = h[v.id];
      g && !v.icon && (v.icon = g);
    }
    let y = v.emojis.length;
    for (; y--; ) {
      const g = v.emojis[y], _ = g.id ? g : we.emojis[g], M = () => {
        v.emojis.splice(y, 1);
      };
      if (!_ || l.exceptEmojis && l.exceptEmojis.includes(_.id)) {
        M();
        continue;
      }
      if (f && _.version > f) {
        M();
        continue;
      }
      if (u && v.id == "flags" && !G5.includes(_.id)) {
        M();
        continue;
      }
      if (!_.search) {
        if (m = !0, _.search = "," + [
          [
            _.id,
            !1
          ],
          [
            _.name,
            !0
          ],
          [
            _.keywords,
            !1
          ],
          [
            _.emoticons,
            !1
          ]
        ].map(([A, O]) => {
          if (A)
            return (Array.isArray(A) ? A : [
              A
            ]).map((U) => (O ? U.split(/[-|_|\s]+/) : [
              U
            ]).map((F) => F.toLowerCase())).flat();
        }).flat().filter((A) => A && A.trim()).join(","), _.emoticons) for (const A of _.emoticons)
          we.emoticons[A] || (we.emoticons[A] = _.id);
        let j = 0;
        for (const A of _.skins) {
          if (!A) continue;
          j++;
          const { native: O } = A;
          O && (we.natives[O] = _.id, _.search += `,${O}`);
          const U = j == 1 ? "" : `:skin-tone-${j}:`;
          A.shortcodes = `:${_.id}:${U}`;
        }
      }
    }
  }
  m && Al.reset(), gm();
}
function ym(l, i, o) {
  l || (l = {});
  const s = {};
  for (let f in i) s[f] = xm(f, l, i, o);
  return s;
}
function xm(l, i, o, s) {
  const f = o[l];
  let u = s && s.getAttribute(l) || (i[l] != null && i[l] != null ? i[l] : null);
  return f && (u != null && f.value && typeof f.value != typeof u && (typeof f.value == "boolean" ? u = u != "false" : u = f.value.constructor(u)), f.transform && u && (u = f.transform(u)), (u == null || f.choices && f.choices.indexOf(u) == -1) && (u = f.value)), u;
}
const H5 = /^(?:\:([^\:]+)\:)(?:\:skin-tone-(\d)\:)?$/;
let Eu = null;
function $5(l) {
  return l.id ? l : we.emojis[l] || we.emojis[we.aliases[l]] || we.emojis[we.natives[l]];
}
function V5() {
  Eu = null;
}
async function q5(l, { maxResults: i, caller: o } = {}) {
  if (!l || !l.trim().length) return null;
  i || (i = 90), await Oo(null, {
    caller: o || "SearchIndex.search"
  });
  const s = l.toLowerCase().replace(/(\w)-/, "$1 ").split(/[\s|,]+/).filter((m, v, h) => m.trim() && h.indexOf(m) == v);
  if (!s.length) return;
  let f = Eu || (Eu = Object.values(we.emojis)), u, p;
  for (const m of s) {
    if (!f.length) break;
    u = [], p = {};
    for (const v of f) {
      if (!v.search) continue;
      const h = v.search.indexOf(`,${m}`);
      h != -1 && (u.push(v), p[v.id] || (p[v.id] = 0), p[v.id] += v.id == m ? 0 : h + 1);
    }
    f = u;
  }
  return u.length < 2 || (u.sort((m, v) => {
    const h = p[m.id], y = p[v.id];
    return h == y ? m.id.localeCompare(v.id) : h - y;
  }), u.length > i && (u = u.slice(0, i))), u;
}
var Al = {
  search: q5,
  get: $5,
  reset: V5,
  SHORTCODES_REGEX: H5
};
const G5 = [
  "checkered_flag",
  "crossed_flags",
  "pirate_flag",
  "rainbow-flag",
  "transgender_flag",
  "triangular_flag_on_post",
  "waving_black_flag",
  "waving_white_flag"
];
function Y5(l, i) {
  return Array.isArray(l) && Array.isArray(i) && l.length === i.length && l.every((o, s) => o == i[s]);
}
async function Q5(l = 1) {
  for (let i in [
    ...Array(l).keys()
  ]) await new Promise(requestAnimationFrame);
}
function X5(l, { skinIndex: i = 0 } = {}) {
  const o = l.skins[i] || (i = 0, l.skins[i]), s = {
    id: l.id,
    name: l.name,
    native: o.native,
    unified: o.unified,
    keywords: l.keywords,
    shortcodes: o.shortcodes || l.shortcodes
  };
  return l.skins.length > 1 && (s.skin = i + 1), o.src && (s.src = o.src), l.aliases && l.aliases.length && (s.aliases = l.aliases), l.emoticons && l.emoticons.length && (s.emoticons = l.emoticons), s;
}
const Z5 = {
  activity: {
    outline: /* @__PURE__ */ G("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 24 24",
      children: /* @__PURE__ */ G("path", {
        d: "M12 0C5.373 0 0 5.372 0 12c0 6.627 5.373 12 12 12 6.628 0 12-5.373 12-12 0-6.628-5.372-12-12-12m9.949 11H17.05c.224-2.527 1.232-4.773 1.968-6.113A9.966 9.966 0 0 1 21.949 11M13 11V2.051a9.945 9.945 0 0 1 4.432 1.564c-.858 1.491-2.156 4.22-2.392 7.385H13zm-2 0H8.961c-.238-3.165-1.536-5.894-2.393-7.385A9.95 9.95 0 0 1 11 2.051V11zm0 2v8.949a9.937 9.937 0 0 1-4.432-1.564c.857-1.492 2.155-4.221 2.393-7.385H11zm4.04 0c.236 3.164 1.534 5.893 2.392 7.385A9.92 9.92 0 0 1 13 21.949V13h2.04zM4.982 4.887C5.718 6.227 6.726 8.473 6.951 11h-4.9a9.977 9.977 0 0 1 2.931-6.113M2.051 13h4.9c-.226 2.527-1.233 4.771-1.969 6.113A9.972 9.972 0 0 1 2.051 13m16.967 6.113c-.735-1.342-1.744-3.586-1.968-6.113h4.899a9.961 9.961 0 0 1-2.931 6.113"
      })
    }),
    solid: /* @__PURE__ */ G("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 512 512",
      children: /* @__PURE__ */ G("path", {
        d: "M16.17 337.5c0 44.98 7.565 83.54 13.98 107.9C35.22 464.3 50.46 496 174.9 496c9.566 0 19.59-.4707 29.84-1.271L17.33 307.3C16.53 317.6 16.17 327.7 16.17 337.5zM495.8 174.5c0-44.98-7.565-83.53-13.98-107.9c-4.688-17.54-18.34-31.23-36.04-35.95C435.5 27.91 392.9 16 337 16c-9.564 0-19.59 .4707-29.84 1.271l187.5 187.5C495.5 194.4 495.8 184.3 495.8 174.5zM26.77 248.8l236.3 236.3c142-36.1 203.9-150.4 222.2-221.1L248.9 26.87C106.9 62.96 45.07 177.2 26.77 248.8zM256 335.1c0 9.141-7.474 16-16 16c-4.094 0-8.188-1.564-11.31-4.689L164.7 283.3C161.6 280.2 160 276.1 160 271.1c0-8.529 6.865-16 16-16c4.095 0 8.189 1.562 11.31 4.688l64.01 64C254.4 327.8 256 331.9 256 335.1zM304 287.1c0 9.141-7.474 16-16 16c-4.094 0-8.188-1.564-11.31-4.689L212.7 235.3C209.6 232.2 208 228.1 208 223.1c0-9.141 7.473-16 16-16c4.094 0 8.188 1.562 11.31 4.688l64.01 64.01C302.5 279.8 304 283.9 304 287.1zM256 175.1c0-9.141 7.473-16 16-16c4.094 0 8.188 1.562 11.31 4.688l64.01 64.01c3.125 3.125 4.688 7.219 4.688 11.31c0 9.133-7.468 16-16 16c-4.094 0-8.189-1.562-11.31-4.688l-64.01-64.01C257.6 184.2 256 180.1 256 175.1z"
      })
    })
  },
  custom: /* @__PURE__ */ G("svg", {
    xmlns: "http://www.w3.org/2000/svg",
    viewBox: "0 0 448 512",
    children: /* @__PURE__ */ G("path", {
      d: "M417.1 368c-5.937 10.27-16.69 16-27.75 16c-5.422 0-10.92-1.375-15.97-4.281L256 311.4V448c0 17.67-14.33 32-31.1 32S192 465.7 192 448V311.4l-118.3 68.29C68.67 382.6 63.17 384 57.75 384c-11.06 0-21.81-5.734-27.75-16c-8.828-15.31-3.594-34.88 11.72-43.72L159.1 256L41.72 187.7C26.41 178.9 21.17 159.3 29.1 144C36.63 132.5 49.26 126.7 61.65 128.2C65.78 128.7 69.88 130.1 73.72 132.3L192 200.6V64c0-17.67 14.33-32 32-32S256 46.33 256 64v136.6l118.3-68.29c3.838-2.213 7.939-3.539 12.07-4.051C398.7 126.7 411.4 132.5 417.1 144c8.828 15.31 3.594 34.88-11.72 43.72L288 256l118.3 68.28C421.6 333.1 426.8 352.7 417.1 368z"
    })
  }),
  flags: {
    outline: /* @__PURE__ */ G("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 24 24",
      children: /* @__PURE__ */ G("path", {
        d: "M0 0l6.084 24H8L1.916 0zM21 5h-4l-1-4H4l3 12h3l1 4h13L21 5zM6.563 3h7.875l2 8H8.563l-2-8zm8.832 10l-2.856 1.904L12.063 13h3.332zM19 13l-1.5-6h1.938l2 8H16l3-2z"
      })
    }),
    solid: /* @__PURE__ */ G("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 512 512",
      children: /* @__PURE__ */ G("path", {
        d: "M64 496C64 504.8 56.75 512 48 512h-32C7.25 512 0 504.8 0 496V32c0-17.75 14.25-32 32-32s32 14.25 32 32V496zM476.3 0c-6.365 0-13.01 1.35-19.34 4.233c-45.69 20.86-79.56 27.94-107.8 27.94c-59.96 0-94.81-31.86-163.9-31.87C160.9 .3055 131.6 4.867 96 15.75v350.5c32-9.984 59.87-14.1 84.85-14.1c73.63 0 124.9 31.78 198.6 31.78c31.91 0 68.02-5.971 111.1-23.09C504.1 355.9 512 344.4 512 332.1V30.73C512 11.1 495.3 0 476.3 0z"
      })
    })
  },
  foods: {
    outline: /* @__PURE__ */ G("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 24 24",
      children: /* @__PURE__ */ G("path", {
        d: "M17 4.978c-1.838 0-2.876.396-3.68.934.513-1.172 1.768-2.934 4.68-2.934a1 1 0 0 0 0-2c-2.921 0-4.629 1.365-5.547 2.512-.064.078-.119.162-.18.244C11.73 1.838 10.798.023 9.207.023 8.579.022 7.85.306 7 .978 5.027 2.54 5.329 3.902 6.492 4.999 3.609 5.222 0 7.352 0 12.969c0 4.582 4.961 11.009 9 11.009 1.975 0 2.371-.486 3-1 .629.514 1.025 1 3 1 4.039 0 9-6.418 9-11 0-5.953-4.055-8-7-8M8.242 2.546c.641-.508.943-.523.965-.523.426.169.975 1.405 1.357 3.055-1.527-.629-2.741-1.352-2.98-1.846.059-.112.241-.356.658-.686M15 21.978c-1.08 0-1.21-.109-1.559-.402l-.176-.146c-.367-.302-.816-.452-1.266-.452s-.898.15-1.266.452l-.176.146c-.347.292-.477.402-1.557.402-2.813 0-7-5.389-7-9.009 0-5.823 4.488-5.991 5-5.991 1.939 0 2.484.471 3.387 1.251l.323.276a1.995 1.995 0 0 0 2.58 0l.323-.276c.902-.78 1.447-1.251 3.387-1.251.512 0 5 .168 5 6 0 3.617-4.187 9-7 9"
      })
    }),
    solid: /* @__PURE__ */ G("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 512 512",
      children: /* @__PURE__ */ G("path", {
        d: "M481.9 270.1C490.9 279.1 496 291.3 496 304C496 316.7 490.9 328.9 481.9 337.9C472.9 346.9 460.7 352 448 352H64C51.27 352 39.06 346.9 30.06 337.9C21.06 328.9 16 316.7 16 304C16 291.3 21.06 279.1 30.06 270.1C39.06 261.1 51.27 256 64 256H448C460.7 256 472.9 261.1 481.9 270.1zM475.3 388.7C478.3 391.7 480 395.8 480 400V416C480 432.1 473.3 449.3 461.3 461.3C449.3 473.3 432.1 480 416 480H96C79.03 480 62.75 473.3 50.75 461.3C38.74 449.3 32 432.1 32 416V400C32 395.8 33.69 391.7 36.69 388.7C39.69 385.7 43.76 384 48 384H464C468.2 384 472.3 385.7 475.3 388.7zM50.39 220.8C45.93 218.6 42.03 215.5 38.97 211.6C35.91 207.7 33.79 203.2 32.75 198.4C31.71 193.5 31.8 188.5 32.99 183.7C54.98 97.02 146.5 32 256 32C365.5 32 457 97.02 479 183.7C480.2 188.5 480.3 193.5 479.2 198.4C478.2 203.2 476.1 207.7 473 211.6C469.1 215.5 466.1 218.6 461.6 220.8C457.2 222.9 452.3 224 447.3 224H64.67C59.73 224 54.84 222.9 50.39 220.8zM372.7 116.7C369.7 119.7 368 123.8 368 128C368 131.2 368.9 134.3 370.7 136.9C372.5 139.5 374.1 141.6 377.9 142.8C380.8 143.1 384 144.3 387.1 143.7C390.2 143.1 393.1 141.6 395.3 139.3C397.6 137.1 399.1 134.2 399.7 131.1C400.3 128 399.1 124.8 398.8 121.9C397.6 118.1 395.5 116.5 392.9 114.7C390.3 112.9 387.2 111.1 384 111.1C379.8 111.1 375.7 113.7 372.7 116.7V116.7zM244.7 84.69C241.7 87.69 240 91.76 240 96C240 99.16 240.9 102.3 242.7 104.9C244.5 107.5 246.1 109.6 249.9 110.8C252.8 111.1 256 112.3 259.1 111.7C262.2 111.1 265.1 109.6 267.3 107.3C269.6 105.1 271.1 102.2 271.7 99.12C272.3 96.02 271.1 92.8 270.8 89.88C269.6 86.95 267.5 84.45 264.9 82.7C262.3 80.94 259.2 79.1 256 79.1C251.8 79.1 247.7 81.69 244.7 84.69V84.69zM116.7 116.7C113.7 119.7 112 123.8 112 128C112 131.2 112.9 134.3 114.7 136.9C116.5 139.5 118.1 141.6 121.9 142.8C124.8 143.1 128 144.3 131.1 143.7C134.2 143.1 137.1 141.6 139.3 139.3C141.6 137.1 143.1 134.2 143.7 131.1C144.3 128 143.1 124.8 142.8 121.9C141.6 118.1 139.5 116.5 136.9 114.7C134.3 112.9 131.2 111.1 128 111.1C123.8 111.1 119.7 113.7 116.7 116.7L116.7 116.7z"
      })
    })
  },
  frequent: {
    outline: /* @__PURE__ */ G("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 24 24",
      children: [
        /* @__PURE__ */ G("path", {
          d: "M13 4h-2l-.001 7H9v2h2v2h2v-2h4v-2h-4z"
        }),
        /* @__PURE__ */ G("path", {
          d: "M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"
        })
      ]
    }),
    solid: /* @__PURE__ */ G("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 512 512",
      children: /* @__PURE__ */ G("path", {
        d: "M256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512zM232 256C232 264 236 271.5 242.7 275.1L338.7 339.1C349.7 347.3 364.6 344.3 371.1 333.3C379.3 322.3 376.3 307.4 365.3 300L280 243.2V120C280 106.7 269.3 96 255.1 96C242.7 96 231.1 106.7 231.1 120L232 256z"
      })
    })
  },
  nature: {
    outline: /* @__PURE__ */ G("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 24 24",
      children: [
        /* @__PURE__ */ G("path", {
          d: "M15.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 15.5 8M8.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 8.5 8"
        }),
        /* @__PURE__ */ G("path", {
          d: "M18.933 0h-.027c-.97 0-2.138.787-3.018 1.497-1.274-.374-2.612-.51-3.887-.51-1.285 0-2.616.133-3.874.517C7.245.79 6.069 0 5.093 0h-.027C3.352 0 .07 2.67.002 7.026c-.039 2.479.276 4.238 1.04 5.013.254.258.882.677 1.295.882.191 3.177.922 5.238 2.536 6.38.897.637 2.187.949 3.2 1.102C8.04 20.6 8 20.795 8 21c0 1.773 2.35 3 4 3 1.648 0 4-1.227 4-3 0-.201-.038-.393-.072-.586 2.573-.385 5.435-1.877 5.925-7.587.396-.22.887-.568 1.104-.788.763-.774 1.079-2.534 1.04-5.013C23.929 2.67 20.646 0 18.933 0M3.223 9.135c-.237.281-.837 1.155-.884 1.238-.15-.41-.368-1.349-.337-3.291.051-3.281 2.478-4.972 3.091-5.031.256.015.731.27 1.265.646-1.11 1.171-2.275 2.915-2.352 5.125-.133.546-.398.858-.783 1.313M12 22c-.901 0-1.954-.693-2-1 0-.654.475-1.236 1-1.602V20a1 1 0 1 0 2 0v-.602c.524.365 1 .947 1 1.602-.046.307-1.099 1-2 1m3-3.48v.02a4.752 4.752 0 0 0-1.262-1.02c1.092-.516 2.239-1.334 2.239-2.217 0-1.842-1.781-2.195-3.977-2.195-2.196 0-3.978.354-3.978 2.195 0 .883 1.148 1.701 2.238 2.217A4.8 4.8 0 0 0 9 18.539v-.025c-1-.076-2.182-.281-2.973-.842-1.301-.92-1.838-3.045-1.853-6.478l.023-.041c.496-.826 1.49-1.45 1.804-3.102 0-2.047 1.357-3.631 2.362-4.522C9.37 3.178 10.555 3 11.948 3c1.447 0 2.685.192 3.733.57 1 .9 2.316 2.465 2.316 4.48.313 1.651 1.307 2.275 1.803 3.102.035.058.068.117.102.178-.059 5.967-1.949 7.01-4.902 7.19m6.628-8.202c-.037-.065-.074-.13-.113-.195a7.587 7.587 0 0 0-.739-.987c-.385-.455-.648-.768-.782-1.313-.076-2.209-1.241-3.954-2.353-5.124.531-.376 1.004-.63 1.261-.647.636.071 3.044 1.764 3.096 5.031.027 1.81-.347 3.218-.37 3.235"
        })
      ]
    }),
    solid: /* @__PURE__ */ G("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 576 512",
      children: /* @__PURE__ */ G("path", {
        d: "M332.7 19.85C334.6 8.395 344.5 0 356.1 0C363.6 0 370.6 3.52 375.1 9.502L392 32H444.1C456.8 32 469.1 37.06 478.1 46.06L496 64H552C565.3 64 576 74.75 576 88V112C576 156.2 540.2 192 496 192H426.7L421.6 222.5L309.6 158.5L332.7 19.85zM448 64C439.2 64 432 71.16 432 80C432 88.84 439.2 96 448 96C456.8 96 464 88.84 464 80C464 71.16 456.8 64 448 64zM416 256.1V480C416 497.7 401.7 512 384 512H352C334.3 512 320 497.7 320 480V364.8C295.1 377.1 268.8 384 240 384C211.2 384 184 377.1 160 364.8V480C160 497.7 145.7 512 128 512H96C78.33 512 64 497.7 64 480V249.8C35.23 238.9 12.64 214.5 4.836 183.3L.9558 167.8C-3.331 150.6 7.094 133.2 24.24 128.1C41.38 124.7 58.76 135.1 63.05 152.2L66.93 167.8C70.49 182 83.29 191.1 97.97 191.1H303.8L416 256.1z"
      })
    })
  },
  objects: {
    outline: /* @__PURE__ */ G("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 24 24",
      children: [
        /* @__PURE__ */ G("path", {
          d: "M12 0a9 9 0 0 0-5 16.482V21s2.035 3 5 3 5-3 5-3v-4.518A9 9 0 0 0 12 0zm0 2c3.86 0 7 3.141 7 7s-3.14 7-7 7-7-3.141-7-7 3.14-7 7-7zM9 17.477c.94.332 1.946.523 3 .523s2.06-.19 3-.523v.834c-.91.436-1.925.689-3 .689a6.924 6.924 0 0 1-3-.69v-.833zm.236 3.07A8.854 8.854 0 0 0 12 21c.965 0 1.888-.167 2.758-.451C14.155 21.173 13.153 22 12 22c-1.102 0-2.117-.789-2.764-1.453z"
        }),
        /* @__PURE__ */ G("path", {
          d: "M14.745 12.449h-.004c-.852-.024-1.188-.858-1.577-1.824-.421-1.061-.703-1.561-1.182-1.566h-.009c-.481 0-.783.497-1.235 1.537-.436.982-.801 1.811-1.636 1.791l-.276-.043c-.565-.171-.853-.691-1.284-1.794-.125-.313-.202-.632-.27-.913-.051-.213-.127-.53-.195-.634C7.067 9.004 7.039 9 6.99 9A1 1 0 0 1 7 7h.01c1.662.017 2.015 1.373 2.198 2.134.486-.981 1.304-2.058 2.797-2.075 1.531.018 2.28 1.153 2.731 2.141l.002-.008C14.944 8.424 15.327 7 16.979 7h.032A1 1 0 1 1 17 9h-.011c-.149.076-.256.474-.319.709a6.484 6.484 0 0 1-.311.951c-.429.973-.79 1.789-1.614 1.789"
        })
      ]
    }),
    solid: /* @__PURE__ */ G("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 384 512",
      children: /* @__PURE__ */ G("path", {
        d: "M112.1 454.3c0 6.297 1.816 12.44 5.284 17.69l17.14 25.69c5.25 7.875 17.17 14.28 26.64 14.28h61.67c9.438 0 21.36-6.401 26.61-14.28l17.08-25.68c2.938-4.438 5.348-12.37 5.348-17.7L272 415.1h-160L112.1 454.3zM191.4 .0132C89.44 .3257 16 82.97 16 175.1c0 44.38 16.44 84.84 43.56 115.8c16.53 18.84 42.34 58.23 52.22 91.45c.0313 .25 .0938 .5166 .125 .7823h160.2c.0313-.2656 .0938-.5166 .125-.7823c9.875-33.22 35.69-72.61 52.22-91.45C351.6 260.8 368 220.4 368 175.1C368 78.61 288.9-.2837 191.4 .0132zM192 96.01c-44.13 0-80 35.89-80 79.1C112 184.8 104.8 192 96 192S80 184.8 80 176c0-61.76 50.25-111.1 112-111.1c8.844 0 16 7.159 16 16S200.8 96.01 192 96.01z"
      })
    })
  },
  people: {
    outline: /* @__PURE__ */ G("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 24 24",
      children: [
        /* @__PURE__ */ G("path", {
          d: "M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"
        }),
        /* @__PURE__ */ G("path", {
          d: "M8 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 8 7M16 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 16 7M15.232 15c-.693 1.195-1.87 2-3.349 2-1.477 0-2.655-.805-3.347-2H15m3-2H6a6 6 0 1 0 12 0"
        })
      ]
    }),
    solid: /* @__PURE__ */ G("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 512 512",
      children: /* @__PURE__ */ G("path", {
        d: "M0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256zM256 432C332.1 432 396.2 382 415.2 314.1C419.1 300.4 407.8 288 393.6 288H118.4C104.2 288 92.92 300.4 96.76 314.1C115.8 382 179.9 432 256 432V432zM176.4 160C158.7 160 144.4 174.3 144.4 192C144.4 209.7 158.7 224 176.4 224C194 224 208.4 209.7 208.4 192C208.4 174.3 194 160 176.4 160zM336.4 224C354 224 368.4 209.7 368.4 192C368.4 174.3 354 160 336.4 160C318.7 160 304.4 174.3 304.4 192C304.4 209.7 318.7 224 336.4 224z"
      })
    })
  },
  places: {
    outline: /* @__PURE__ */ G("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 24 24",
      children: [
        /* @__PURE__ */ G("path", {
          d: "M6.5 12C5.122 12 4 13.121 4 14.5S5.122 17 6.5 17 9 15.879 9 14.5 7.878 12 6.5 12m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5M17.5 12c-1.378 0-2.5 1.121-2.5 2.5s1.122 2.5 2.5 2.5 2.5-1.121 2.5-2.5-1.122-2.5-2.5-2.5m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5"
        }),
        /* @__PURE__ */ G("path", {
          d: "M22.482 9.494l-1.039-.346L21.4 9h.6c.552 0 1-.439 1-.992 0-.006-.003-.008-.003-.008H23c0-1-.889-2-1.984-2h-.642l-.731-1.717C19.262 3.012 18.091 2 16.764 2H7.236C5.909 2 4.738 3.012 4.357 4.283L3.626 6h-.642C1.889 6 1 7 1 8h.003S1 8.002 1 8.008C1 8.561 1.448 9 2 9h.6l-.043.148-1.039.346a2.001 2.001 0 0 0-1.359 2.097l.751 7.508a1 1 0 0 0 .994.901H3v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h6v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h1.096a.999.999 0 0 0 .994-.901l.751-7.508a2.001 2.001 0 0 0-1.359-2.097M6.273 4.857C6.402 4.43 6.788 4 7.236 4h9.527c.448 0 .834.43.963.857L19.313 9H4.688l1.585-4.143zM7 21H5v-1h2v1zm12 0h-2v-1h2v1zm2.189-3H2.811l-.662-6.607L3 11h18l.852.393L21.189 18z"
        })
      ]
    }),
    solid: /* @__PURE__ */ G("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 512 512",
      children: /* @__PURE__ */ G("path", {
        d: "M39.61 196.8L74.8 96.29C88.27 57.78 124.6 32 165.4 32H346.6C387.4 32 423.7 57.78 437.2 96.29L472.4 196.8C495.6 206.4 512 229.3 512 256V448C512 465.7 497.7 480 480 480H448C430.3 480 416 465.7 416 448V400H96V448C96 465.7 81.67 480 64 480H32C14.33 480 0 465.7 0 448V256C0 229.3 16.36 206.4 39.61 196.8V196.8zM109.1 192H402.9L376.8 117.4C372.3 104.6 360.2 96 346.6 96H165.4C151.8 96 139.7 104.6 135.2 117.4L109.1 192zM96 256C78.33 256 64 270.3 64 288C64 305.7 78.33 320 96 320C113.7 320 128 305.7 128 288C128 270.3 113.7 256 96 256zM416 320C433.7 320 448 305.7 448 288C448 270.3 433.7 256 416 256C398.3 256 384 270.3 384 288C384 305.7 398.3 320 416 320z"
      })
    })
  },
  symbols: {
    outline: /* @__PURE__ */ G("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 24 24",
      children: /* @__PURE__ */ G("path", {
        d: "M0 0h11v2H0zM4 11h3V6h4V4H0v2h4zM15.5 17c1.381 0 2.5-1.116 2.5-2.493s-1.119-2.493-2.5-2.493S13 13.13 13 14.507 14.119 17 15.5 17m0-2.986c.276 0 .5.222.5.493 0 .272-.224.493-.5.493s-.5-.221-.5-.493.224-.493.5-.493M21.5 19.014c-1.381 0-2.5 1.116-2.5 2.493S20.119 24 21.5 24s2.5-1.116 2.5-2.493-1.119-2.493-2.5-2.493m0 2.986a.497.497 0 0 1-.5-.493c0-.271.224-.493.5-.493s.5.222.5.493a.497.497 0 0 1-.5.493M22 13l-9 9 1.513 1.5 8.99-9.009zM17 11c2.209 0 4-1.119 4-2.5V2s.985-.161 1.498.949C23.01 4.055 23 6 23 6s1-1.119 1-3.135C24-.02 21 0 21 0h-2v6.347A5.853 5.853 0 0 0 17 6c-2.209 0-4 1.119-4 2.5s1.791 2.5 4 2.5M10.297 20.482l-1.475-1.585a47.54 47.54 0 0 1-1.442 1.129c-.307-.288-.989-1.016-2.045-2.183.902-.836 1.479-1.466 1.729-1.892s.376-.871.376-1.336c0-.592-.273-1.178-.818-1.759-.546-.581-1.329-.871-2.349-.871-1.008 0-1.79.293-2.344.879-.556.587-.832 1.181-.832 1.784 0 .813.419 1.748 1.256 2.805-.847.614-1.444 1.208-1.794 1.784a3.465 3.465 0 0 0-.523 1.833c0 .857.308 1.56.924 2.107.616.549 1.423.823 2.42.823 1.173 0 2.444-.379 3.813-1.137L8.235 24h2.819l-2.09-2.383 1.333-1.135zm-6.736-6.389a1.02 1.02 0 0 1 .73-.286c.31 0 .559.085.747.254a.849.849 0 0 1 .283.659c0 .518-.419 1.112-1.257 1.784-.536-.651-.805-1.231-.805-1.742a.901.901 0 0 1 .302-.669M3.74 22c-.427 0-.778-.116-1.057-.349-.279-.232-.418-.487-.418-.766 0-.594.509-1.288 1.527-2.083.968 1.134 1.717 1.946 2.248 2.438-.921.507-1.686.76-2.3.76"
      })
    }),
    solid: /* @__PURE__ */ G("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 512 512",
      children: /* @__PURE__ */ G("path", {
        d: "M500.3 7.251C507.7 13.33 512 22.41 512 31.1V175.1C512 202.5 483.3 223.1 447.1 223.1C412.7 223.1 383.1 202.5 383.1 175.1C383.1 149.5 412.7 127.1 447.1 127.1V71.03L351.1 90.23V207.1C351.1 234.5 323.3 255.1 287.1 255.1C252.7 255.1 223.1 234.5 223.1 207.1C223.1 181.5 252.7 159.1 287.1 159.1V63.1C287.1 48.74 298.8 35.61 313.7 32.62L473.7 .6198C483.1-1.261 492.9 1.173 500.3 7.251H500.3zM74.66 303.1L86.5 286.2C92.43 277.3 102.4 271.1 113.1 271.1H174.9C185.6 271.1 195.6 277.3 201.5 286.2L213.3 303.1H239.1C266.5 303.1 287.1 325.5 287.1 351.1V463.1C287.1 490.5 266.5 511.1 239.1 511.1H47.1C21.49 511.1-.0019 490.5-.0019 463.1V351.1C-.0019 325.5 21.49 303.1 47.1 303.1H74.66zM143.1 359.1C117.5 359.1 95.1 381.5 95.1 407.1C95.1 434.5 117.5 455.1 143.1 455.1C170.5 455.1 191.1 434.5 191.1 407.1C191.1 381.5 170.5 359.1 143.1 359.1zM440.3 367.1H496C502.7 367.1 508.6 372.1 510.1 378.4C513.3 384.6 511.6 391.7 506.5 396L378.5 508C372.9 512.1 364.6 513.3 358.6 508.9C352.6 504.6 350.3 496.6 353.3 489.7L391.7 399.1H336C329.3 399.1 323.4 395.9 321 389.6C318.7 383.4 320.4 376.3 325.5 371.1L453.5 259.1C459.1 255 467.4 254.7 473.4 259.1C479.4 263.4 481.6 271.4 478.7 278.3L440.3 367.1zM116.7 219.1L19.85 119.2C-8.112 90.26-6.614 42.31 24.85 15.34C51.82-8.137 93.26-3.642 118.2 21.83L128.2 32.32L137.7 21.83C162.7-3.642 203.6-8.137 231.6 15.34C262.6 42.31 264.1 90.26 236.1 119.2L139.7 219.1C133.2 225.6 122.7 225.6 116.7 219.1H116.7z"
      })
    })
  }
}, K5 = {
  loupe: /* @__PURE__ */ G("svg", {
    xmlns: "http://www.w3.org/2000/svg",
    viewBox: "0 0 20 20",
    children: /* @__PURE__ */ G("path", {
      d: "M12.9 14.32a8 8 0 1 1 1.41-1.41l5.35 5.33-1.42 1.42-5.33-5.34zM8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12z"
    })
  }),
  delete: /* @__PURE__ */ G("svg", {
    xmlns: "http://www.w3.org/2000/svg",
    viewBox: "0 0 20 20",
    children: /* @__PURE__ */ G("path", {
      d: "M10 8.586L2.929 1.515 1.515 2.929 8.586 10l-7.071 7.071 1.414 1.414L10 11.414l7.071 7.071 1.414-1.414L11.414 10l7.071-7.071-1.414-1.414L10 8.586z"
    })
  })
};
var Eo = {
  categories: Z5,
  search: K5
};
function Tu(l) {
  let { id: i, skin: o, emoji: s } = l;
  if (l.shortcodes) {
    const m = l.shortcodes.match(Al.SHORTCODES_REGEX);
    m && (i = m[1], m[2] && (o = m[2]));
  }
  if (s || (s = Al.get(i || l.native)), !s) return l.fallback;
  const f = s.skins[o - 1] || s.skins[0], u = f.src || (l.set != "native" && !l.spritesheet ? typeof l.getImageURL == "function" ? l.getImageURL(l.set, f.unified) : `https://cdn.jsdelivr.net/npm/emoji-datasource-${l.set}@15.0.1/img/${l.set}/64/${f.unified}.png` : void 0), p = typeof l.getSpritesheetURL == "function" ? l.getSpritesheetURL(l.set) : `https://cdn.jsdelivr.net/npm/emoji-datasource-${l.set}@15.0.1/img/${l.set}/sheets-256/64.png`;
  return /* @__PURE__ */ G("span", {
    class: "emoji-mart-emoji",
    "data-emoji-set": l.set,
    children: u ? /* @__PURE__ */ G("img", {
      style: {
        maxWidth: l.size || "1em",
        maxHeight: l.size || "1em",
        display: "inline-block"
      },
      alt: f.native || f.shortcodes,
      src: u
    }) : l.set == "native" ? /* @__PURE__ */ G("span", {
      style: {
        fontSize: l.size,
        fontFamily: '"EmojiMart", "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "Apple Color Emoji", "Twemoji Mozilla", "Noto Color Emoji", "Android Emoji"'
      },
      children: f.native
    }) : /* @__PURE__ */ G("span", {
      style: {
        display: "block",
        width: l.size,
        height: l.size,
        backgroundImage: `url(${p})`,
        backgroundSize: `${100 * we.sheet.cols}% ${100 * we.sheet.rows}%`,
        backgroundPosition: `${100 / (we.sheet.cols - 1) * f.x}% ${100 / (we.sheet.rows - 1) * f.y}%`
      }
    })
  });
}
const J5 = typeof window < "u" && window.HTMLElement ? window.HTMLElement : Object;
class Sm extends J5 {
  static get observedAttributes() {
    return Object.keys(this.Props);
  }
  update(i = {}) {
    for (let o in i) this.attributeChangedCallback(o, null, i[o]);
  }
  attributeChangedCallback(i, o, s) {
    if (!this.component) return;
    const f = xm(i, {
      [i]: s
    }, this.constructor.Props, this);
    this.component.componentWillReceiveProps ? this.component.componentWillReceiveProps({
      [i]: f
    }) : (this.component.props[i] = f, this.component.forceUpdate());
  }
  disconnectedCallback() {
    this.disconnected = !0, this.component && this.component.unregister && this.component.unregister();
  }
  constructor(i = {}) {
    if (super(), this.props = i, i.parent || i.ref) {
      let o = null;
      const s = i.parent || (o = i.ref && i.ref.current);
      o && (o.innerHTML = ""), s && s.appendChild(this);
    }
  }
}
class P5 extends Sm {
  setShadow() {
    this.attachShadow({
      mode: "open"
    });
  }
  injectStyles(i) {
    if (!i) return;
    const o = document.createElement("style");
    o.textContent = i, this.shadowRoot.insertBefore(o, this.shadowRoot.firstChild);
  }
  constructor(i, { styles: o } = {}) {
    super(i), this.setShadow(), this.injectStyles(o);
  }
}
var _m = {
  fallback: "",
  id: "",
  native: "",
  shortcodes: "",
  size: {
    value: "",
    transform: (l) => /\D/.test(l) ? l : `${l}px`
  },
  // Shared
  set: Dn.set,
  skin: Dn.skin
};
class wm extends Sm {
  async connectedCallback() {
    const i = ym(this.props, _m, this);
    i.element = this, i.ref = (o) => {
      this.component = o;
    }, await Oo(), !this.disconnected && hm(/* @__PURE__ */ G(Tu, {
      ...i
    }), this);
  }
  constructor(i) {
    super(i);
  }
}
Kt(wm, "Props", _m);
typeof customElements < "u" && !customElements.get("em-emoji") && customElements.define("em-emoji", wm);
var Sh, Mu = [], _h = ce.__b, wh = ce.__r, Ch = ce.diffed, Eh = ce.__c, Th = ce.unmount;
function W5() {
  var l;
  for (Mu.sort(function(i, o) {
    return i.__v.__b - o.__v.__b;
  }); l = Mu.pop(); ) if (l.__P) try {
    l.__H.__h.forEach(bo), l.__H.__h.forEach(Au), l.__H.__h = [];
  } catch (i) {
    l.__H.__h = [], ce.__e(i, l.__v);
  }
}
ce.__b = function(l) {
  _h && _h(l);
}, ce.__r = function(l) {
  wh && wh(l);
  var i = l.__c.__H;
  i && (i.__h.forEach(bo), i.__h.forEach(Au), i.__h = []);
}, ce.diffed = function(l) {
  Ch && Ch(l);
  var i = l.__c;
  i && i.__H && i.__H.__h.length && (Mu.push(i) !== 1 && Sh === ce.requestAnimationFrame || ((Sh = ce.requestAnimationFrame) || function(o) {
    var s, f = function() {
      clearTimeout(u), Mh && cancelAnimationFrame(s), setTimeout(o);
    }, u = setTimeout(f, 100);
    Mh && (s = requestAnimationFrame(f));
  })(W5));
}, ce.__c = function(l, i) {
  i.some(function(o) {
    try {
      o.__h.forEach(bo), o.__h = o.__h.filter(function(s) {
        return !s.__ || Au(s);
      });
    } catch (s) {
      i.some(function(f) {
        f.__h && (f.__h = []);
      }), i = [], ce.__e(s, o.__v);
    }
  }), Eh && Eh(l, i);
}, ce.unmount = function(l) {
  Th && Th(l);
  var i, o = l.__c;
  o && o.__H && (o.__H.__.forEach(function(s) {
    try {
      bo(s);
    } catch (f) {
      i = f;
    }
  }), i && ce.__e(i, o.__v));
};
var Mh = typeof requestAnimationFrame == "function";
function bo(l) {
  var i = l.__c;
  typeof i == "function" && (l.__c = void 0, i());
}
function Au(l) {
  l.__c = l.__();
}
function I5(l, i) {
  for (var o in i) l[o] = i[o];
  return l;
}
function Ah(l, i) {
  for (var o in l) if (o !== "__source" && !(o in i)) return !0;
  for (var s in i) if (s !== "__source" && l[s] !== i[s]) return !0;
  return !1;
}
function To(l) {
  this.props = l;
}
(To.prototype = new hn()).isPureReactComponent = !0, To.prototype.shouldComponentUpdate = function(l, i) {
  return Ah(this.props, l) || Ah(this.state, i);
};
var jh = ce.__b;
ce.__b = function(l) {
  l.type && l.type.__f && l.ref && (l.props.ref = l.ref, l.ref = null), jh && jh(l);
};
var F5 = ce.__e;
ce.__e = function(l, i, o) {
  if (l.then) {
    for (var s, f = i; f = f.__; ) if ((s = f.__c) && s.__c) return i.__e == null && (i.__e = o.__e, i.__k = o.__k), s.__c(l, i);
  }
  F5(l, i, o);
};
var kh = ce.unmount;
function mu() {
  this.__u = 0, this.t = null, this.__b = null;
}
function Cm(l) {
  var i = l.__.__c;
  return i && i.__e && i.__e(l);
}
function co() {
  this.u = null, this.o = null;
}
ce.unmount = function(l) {
  var i = l.__c;
  i && i.__R && i.__R(), i && l.__h === !0 && (l.type = null), kh && kh(l);
}, (mu.prototype = new hn()).__c = function(l, i) {
  var o = i.__c, s = this;
  s.t == null && (s.t = []), s.t.push(o);
  var f = Cm(s.__v), u = !1, p = function() {
    u || (u = !0, o.__R = null, f ? f(m) : m());
  };
  o.__R = p;
  var m = function() {
    if (!--s.__u) {
      if (s.state.__e) {
        var h = s.state.__e;
        s.__v.__k[0] = function g(_, M, j) {
          return _ && (_.__v = null, _.__k = _.__k && _.__k.map(function(A) {
            return g(A, M, j);
          }), _.__c && _.__c.__P === M && (_.__e && j.insertBefore(_.__e, _.__d), _.__c.__e = !0, _.__c.__P = j)), _;
        }(h, h.__c.__P, h.__c.__O);
      }
      var y;
      for (s.setState({
        __e: s.__b = null
      }); y = s.t.pop(); ) y.forceUpdate();
    }
  }, v = i.__h === !0;
  s.__u++ || v || s.setState({
    __e: s.__b = s.__v.__k[0]
  }), l.then(p, p);
}, mu.prototype.componentWillUnmount = function() {
  this.t = [];
}, mu.prototype.render = function(l, i) {
  if (this.__b) {
    if (this.__v.__k) {
      var o = document.createElement("div"), s = this.__v.__k[0].__c;
      this.__v.__k[0] = function u(p, m, v) {
        return p && (p.__c && p.__c.__H && (p.__c.__H.__.forEach(function(h) {
          typeof h.__c == "function" && h.__c();
        }), p.__c.__H = null), (p = I5({}, p)).__c != null && (p.__c.__P === v && (p.__c.__P = m), p.__c = null), p.__k = p.__k && p.__k.map(function(h) {
          return u(h, m, v);
        })), p;
      }(this.__b, o, s.__O = s.__P);
    }
    this.__b = null;
  }
  var f = i.__e && wu(kl, null, l.fallback);
  return f && (f.__h = null), [
    wu(kl, null, i.__e ? null : l.children),
    f
  ];
};
var Nh = function(l, i, o) {
  if (++o[1] === o[0] && l.o.delete(i), l.props.revealOrder && (l.props.revealOrder[0] !== "t" || !l.o.size)) for (o = l.u; o; ) {
    for (; o.length > 3; ) o.pop()();
    if (o[1] < o[0]) break;
    l.u = o = o[2];
  }
};
(co.prototype = new hn()).__e = function(l) {
  var i = this, o = Cm(i.__v), s = i.o.get(l);
  return s[0]++, function(f) {
    var u = function() {
      i.props.revealOrder ? (s.push(f), Nh(i, l, s)) : f();
    };
    o ? o(u) : u();
  };
}, co.prototype.render = function(l) {
  this.u = null, this.o = /* @__PURE__ */ new Map();
  var i = wo(l.children);
  l.revealOrder && l.revealOrder[0] === "b" && i.reverse();
  for (var o = i.length; o--; ) this.o.set(i[o], this.u = [
    1,
    0,
    this.u
  ]);
  return l.children;
}, co.prototype.componentDidUpdate = co.prototype.componentDidMount = function() {
  var l = this;
  this.o.forEach(function(i, o) {
    Nh(l, o, i);
  });
};
var e6 = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, t6 = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, n6 = typeof document < "u", a6 = function(l) {
  return (typeof Symbol < "u" && typeof Symbol() == "symbol" ? /fil|che|rad/i : /fil|che|ra/i).test(l);
};
hn.prototype.isReactComponent = {}, [
  "componentWillMount",
  "componentWillReceiveProps",
  "componentWillUpdate"
].forEach(function(l) {
  Object.defineProperty(hn.prototype, l, {
    configurable: !0,
    get: function() {
      return this["UNSAFE_" + l];
    },
    set: function(i) {
      Object.defineProperty(this, l, {
        configurable: !0,
        writable: !0,
        value: i
      });
    }
  });
});
var Rh = ce.event;
function l6() {
}
function i6() {
  return this.cancelBubble;
}
function r6() {
  return this.defaultPrevented;
}
ce.event = function(l) {
  return Rh && (l = Rh(l)), l.persist = l6, l.isPropagationStopped = i6, l.isDefaultPrevented = r6, l.nativeEvent = l;
};
var Dh = {
  configurable: !0,
  get: function() {
    return this.class;
  }
}, zh = ce.vnode;
ce.vnode = function(l) {
  var i = l.type, o = l.props, s = o;
  if (typeof i == "string") {
    var f = i.indexOf("-") === -1;
    for (var u in s = {}, o) {
      var p = o[u];
      n6 && u === "children" && i === "noscript" || u === "value" && "defaultValue" in o && p == null || (u === "defaultValue" && "value" in o && o.value == null ? u = "value" : u === "download" && p === !0 ? p = "" : /ondoubleclick/i.test(u) ? u = "ondblclick" : /^onchange(textarea|input)/i.test(u + i) && !a6(o.type) ? u = "oninput" : /^onfocus$/i.test(u) ? u = "onfocusin" : /^onblur$/i.test(u) ? u = "onfocusout" : /^on(Ani|Tra|Tou|BeforeInp)/.test(u) ? u = u.toLowerCase() : f && t6.test(u) ? u = u.replace(/[A-Z0-9]/, "-$&").toLowerCase() : p === null && (p = void 0), s[u] = p);
    }
    i == "select" && s.multiple && Array.isArray(s.value) && (s.value = wo(o.children).forEach(function(m) {
      m.props.selected = s.value.indexOf(m.props.value) != -1;
    })), i == "select" && s.defaultValue != null && (s.value = wo(o.children).forEach(function(m) {
      m.props.selected = s.multiple ? s.defaultValue.indexOf(m.props.value) != -1 : s.defaultValue == m.props.value;
    })), l.props = s, o.class != o.className && (Dh.enumerable = "className" in o, o.className != null && (s.class = o.className), Object.defineProperty(s, "className", Dh));
  }
  l.$$typeof = e6, zh && zh(l);
};
var Oh = ce.__r;
ce.__r = function(l) {
  Oh && Oh(l), l.__c;
};
const o6 = {
  light: "outline",
  dark: "solid"
};
class s6 extends To {
  renderIcon(i) {
    const { icon: o } = i;
    if (o) {
      if (o.svg) return /* @__PURE__ */ G("span", {
        class: "flex",
        dangerouslySetInnerHTML: {
          __html: o.svg
        }
      });
      if (o.src) return /* @__PURE__ */ G("img", {
        src: o.src
      });
    }
    const s = Eo.categories[i.id] || Eo.categories.custom, f = this.props.icons == "auto" ? o6[this.props.theme] : this.props.icons;
    return s[f] || s;
  }
  render() {
    let i = null;
    return /* @__PURE__ */ G("nav", {
      id: "nav",
      class: "padding",
      "data-position": this.props.position,
      dir: this.props.dir,
      children: /* @__PURE__ */ G("div", {
        class: "flex relative",
        children: [
          this.categories.map((o, s) => {
            const f = o.name || bt.categories[o.id], u = !this.props.unfocused && o.id == this.state.categoryId;
            return u && (i = s), /* @__PURE__ */ G("button", {
              "aria-label": f,
              "aria-selected": u || void 0,
              title: f,
              type: "button",
              class: "flex flex-grow flex-center",
              onMouseDown: (p) => p.preventDefault(),
              onClick: () => {
                this.props.onClick({
                  category: o,
                  i: s
                });
              },
              children: this.renderIcon(o)
            });
          }),
          /* @__PURE__ */ G("div", {
            class: "bar",
            style: {
              width: `${100 / this.categories.length}%`,
              opacity: i == null ? 0 : 1,
              transform: this.props.dir === "rtl" ? `scaleX(-1) translateX(${i * 100}%)` : `translateX(${i * 100}%)`
            }
          })
        ]
      })
    });
  }
  constructor() {
    super(), this.categories = we.categories.filter((i) => !i.target), this.state = {
      categoryId: this.categories[0].id
    };
  }
}
class c6 extends To {
  shouldComponentUpdate(i) {
    for (let o in i)
      if (o != "children" && i[o] != this.props[o])
        return !0;
    return !1;
  }
  render() {
    return this.props.children;
  }
}
const uo = {
  rowsPerRender: 10
};
class u6 extends hn {
  getInitialState(i = this.props) {
    return {
      skin: ca.get("skin") || i.skin,
      theme: this.initTheme(i.theme)
    };
  }
  componentWillMount() {
    this.dir = bt.rtl ? "rtl" : "ltr", this.refs = {
      menu: Rn(),
      navigation: Rn(),
      scroll: Rn(),
      search: Rn(),
      searchInput: Rn(),
      skinToneButton: Rn(),
      skinToneRadio: Rn()
    }, this.initGrid(), this.props.stickySearch == !1 && this.props.searchPosition == "sticky" && (console.warn("[EmojiMart] Deprecation warning: `stickySearch` has been renamed `searchPosition`."), this.props.searchPosition = "static");
  }
  componentDidMount() {
    if (this.register(), this.shadowRoot = this.base.parentNode, this.props.autoFocus) {
      const { searchInput: i } = this.refs;
      i.current && i.current.focus();
    }
  }
  componentWillReceiveProps(i) {
    this.nextState || (this.nextState = {});
    for (const o in i) this.nextState[o] = i[o];
    clearTimeout(this.nextStateTimer), this.nextStateTimer = setTimeout(() => {
      let o = !1;
      for (const f in this.nextState)
        this.props[f] = this.nextState[f], (f === "custom" || f === "categories") && (o = !0);
      delete this.nextState;
      const s = this.getInitialState();
      if (o) return this.reset(s);
      this.setState(s);
    });
  }
  componentWillUnmount() {
    this.unregister();
  }
  async reset(i = {}) {
    await Oo(this.props), this.initGrid(), this.unobserve(), this.setState(i, () => {
      this.observeCategories(), this.observeRows();
    });
  }
  register() {
    document.addEventListener("click", this.handleClickOutside), this.observe();
  }
  unregister() {
    document.removeEventListener("click", this.handleClickOutside), this.darkMedia?.removeEventListener("change", this.darkMediaCallback), this.unobserve();
  }
  observe() {
    this.observeCategories(), this.observeRows();
  }
  unobserve({ except: i = [] } = {}) {
    Array.isArray(i) || (i = [
      i
    ]);
    for (const o of this.observers)
      i.includes(o) || o.disconnect();
    this.observers = [].concat(i);
  }
  initGrid() {
    const { categories: i } = we;
    this.refs.categories = /* @__PURE__ */ new Map();
    const o = we.categories.map((f) => f.id).join(",");
    this.navKey && this.navKey != o && this.refs.scroll.current && (this.refs.scroll.current.scrollTop = 0), this.navKey = o, this.grid = [], this.grid.setsize = 0;
    const s = (f, u) => {
      const p = [];
      p.__categoryId = u.id, p.__index = f.length, this.grid.push(p);
      const m = this.grid.length - 1, v = m % uo.rowsPerRender ? {} : Rn();
      return v.index = m, v.posinset = this.grid.setsize + 1, f.push(v), p;
    };
    for (let f of i) {
      const u = [];
      let p = s(u, f);
      for (let m of f.emojis)
        p.length == this.getPerLine() && (p = s(u, f)), this.grid.setsize += 1, p.push(m);
      this.refs.categories.set(f.id, {
        root: Rn(),
        rows: u
      });
    }
  }
  initTheme(i) {
    if (i != "auto") return i;
    if (!this.darkMedia) {
      if (this.darkMedia = matchMedia("(prefers-color-scheme: dark)"), this.darkMedia.media.match(/^not/)) return "light";
      this.darkMedia.addEventListener("change", this.darkMediaCallback);
    }
    return this.darkMedia.matches ? "dark" : "light";
  }
  initDynamicPerLine(i = this.props) {
    if (!i.dynamicWidth) return;
    const { element: o, emojiButtonSize: s } = i, f = () => {
      const { width: p } = o.getBoundingClientRect();
      return Math.floor(p / s);
    }, u = new ResizeObserver(() => {
      this.unobserve({
        except: u
      }), this.setState({
        perLine: f()
      }, () => {
        this.initGrid(), this.forceUpdate(() => {
          this.observeCategories(), this.observeRows();
        });
      });
    });
    return u.observe(o), this.observers.push(u), f();
  }
  getPerLine() {
    return this.state.perLine || this.props.perLine;
  }
  getEmojiByPos([i, o]) {
    const s = this.state.searchResults || this.grid, f = s[i] && s[i][o];
    if (f)
      return Al.get(f);
  }
  observeCategories() {
    const i = this.refs.navigation.current;
    if (!i) return;
    const o = /* @__PURE__ */ new Map(), s = (p) => {
      p != i.state.categoryId && i.setState({
        categoryId: p
      });
    }, f = {
      root: this.refs.scroll.current,
      threshold: [
        0,
        1
      ]
    }, u = new IntersectionObserver((p) => {
      for (const v of p) {
        const h = v.target.dataset.id;
        o.set(h, v.intersectionRatio);
      }
      const m = [
        ...o
      ];
      for (const [v, h] of m) if (h) {
        s(v);
        break;
      }
    }, f);
    for (const { root: p } of this.refs.categories.values()) u.observe(p.current);
    this.observers.push(u);
  }
  observeRows() {
    const i = {
      ...this.state.visibleRows
    }, o = new IntersectionObserver((s) => {
      for (const f of s) {
        const u = parseInt(f.target.dataset.index);
        f.isIntersecting ? i[u] = !0 : delete i[u];
      }
      this.setState({
        visibleRows: i
      });
    }, {
      root: this.refs.scroll.current,
      rootMargin: `${this.props.emojiButtonSize * (uo.rowsPerRender + 5)}px 0px ${this.props.emojiButtonSize * uo.rowsPerRender}px`
    });
    for (const { rows: s } of this.refs.categories.values())
      for (const f of s) f.current && o.observe(f.current);
    this.observers.push(o);
  }
  preventDefault(i) {
    i.preventDefault();
  }
  unfocusSearch() {
    const i = this.refs.searchInput.current;
    i && i.blur();
  }
  navigate({ e: i, input: o, left: s, right: f, up: u, down: p }) {
    const m = this.state.searchResults || this.grid;
    if (!m.length) return;
    let [v, h] = this.state.pos;
    const y = (() => {
      if (v == 0 && h == 0 && !i.repeat && (s || u))
        return null;
      if (v == -1)
        return !i.repeat && (f || p) && o.selectionStart == o.value.length ? [
          0,
          0
        ] : null;
      if (s || f) {
        let g = m[v];
        const _ = s ? -1 : 1;
        if (h += _, !g[h]) {
          if (v += _, g = m[v], !g)
            return v = s ? 0 : m.length - 1, h = s ? 0 : m[v].length - 1, [
              v,
              h
            ];
          h = s ? g.length - 1 : 0;
        }
        return [
          v,
          h
        ];
      }
      if (u || p) {
        v += u ? -1 : 1;
        const g = m[v];
        return g ? (g[h] || (h = g.length - 1), [
          v,
          h
        ]) : (v = u ? 0 : m.length - 1, h = u ? 0 : m[v].length - 1, [
          v,
          h
        ]);
      }
    })();
    if (y) i.preventDefault();
    else {
      this.state.pos[0] > -1 && this.setState({
        pos: [
          -1,
          -1
        ]
      });
      return;
    }
    this.setState({
      pos: y,
      keyboard: !0
    }, () => {
      this.scrollTo({
        row: y[0]
      });
    });
  }
  scrollTo({ categoryId: i, row: o }) {
    const s = this.state.searchResults || this.grid;
    if (!s.length) return;
    const f = this.refs.scroll.current, u = f.getBoundingClientRect();
    let p = 0;
    if (o >= 0 && (i = s[o].__categoryId), i && (p = (this.refs[i] || this.refs.categories.get(i).root).current.getBoundingClientRect().top - (u.top - f.scrollTop) + 1), o >= 0)
      if (!o) p = 0;
      else {
        const m = s[o].__index, v = p + m * this.props.emojiButtonSize, h = v + this.props.emojiButtonSize + this.props.emojiButtonSize * 0.88;
        if (v < f.scrollTop) p = v;
        else if (h > f.scrollTop + u.height) p = h - u.height;
        else return;
      }
    this.ignoreMouse(), f.scrollTop = p;
  }
  ignoreMouse() {
    this.mouseIsIgnored = !0, clearTimeout(this.ignoreMouseTimer), this.ignoreMouseTimer = setTimeout(() => {
      delete this.mouseIsIgnored;
    }, 100);
  }
  handleEmojiOver(i) {
    this.mouseIsIgnored || this.state.showSkins || this.setState({
      pos: i || [
        -1,
        -1
      ],
      keyboard: !1
    });
  }
  handleEmojiClick({ e: i, emoji: o, pos: s }) {
    if (this.props.onEmojiSelect && (!o && s && (o = this.getEmojiByPos(s)), o)) {
      const f = X5(o, {
        skinIndex: this.state.skin - 1
      });
      this.props.maxFrequentRows && pm.add(f, this.props), this.props.onEmojiSelect(f, i);
    }
  }
  closeSkins() {
    this.state.showSkins && (this.setState({
      showSkins: null,
      tempSkin: null
    }), this.base.removeEventListener("click", this.handleBaseClick), this.base.removeEventListener("keydown", this.handleBaseKeydown));
  }
  handleSkinMouseOver(i) {
    this.setState({
      tempSkin: i
    });
  }
  handleSkinClick(i) {
    this.ignoreMouse(), this.closeSkins(), this.setState({
      skin: i,
      tempSkin: null
    }), ca.set("skin", i);
  }
  renderNav() {
    return /* @__PURE__ */ G(s6, {
      ref: this.refs.navigation,
      icons: this.props.icons,
      theme: this.state.theme,
      dir: this.dir,
      unfocused: !!this.state.searchResults,
      position: this.props.navPosition,
      onClick: this.handleCategoryClick
    }, this.navKey);
  }
  renderPreview() {
    const i = this.getEmojiByPos(this.state.pos), o = this.state.searchResults && !this.state.searchResults.length;
    return /* @__PURE__ */ G("div", {
      id: "preview",
      class: "flex flex-middle",
      dir: this.dir,
      "data-position": this.props.previewPosition,
      children: [
        /* @__PURE__ */ G("div", {
          class: "flex flex-middle flex-grow",
          children: [
            /* @__PURE__ */ G("div", {
              class: "flex flex-auto flex-middle flex-center",
              style: {
                height: this.props.emojiButtonSize,
                fontSize: this.props.emojiButtonSize
              },
              children: /* @__PURE__ */ G(Tu, {
                emoji: i,
                id: o ? this.props.noResultsEmoji || "cry" : this.props.previewEmoji || (this.props.previewPosition == "top" ? "point_down" : "point_up"),
                set: this.props.set,
                size: this.props.emojiButtonSize,
                skin: this.state.tempSkin || this.state.skin,
                spritesheet: !0,
                getSpritesheetURL: this.props.getSpritesheetURL
              })
            }),
            /* @__PURE__ */ G("div", {
              class: `margin-${this.dir[0]}`,
              children: i || o ? /* @__PURE__ */ G("div", {
                class: `padding-${this.dir[2]} align-${this.dir[0]}`,
                children: [
                  /* @__PURE__ */ G("div", {
                    class: "preview-title ellipsis",
                    children: i ? i.name : bt.search_no_results_1
                  }),
                  /* @__PURE__ */ G("div", {
                    class: "preview-subtitle ellipsis color-c",
                    children: i ? i.skins[0].shortcodes : bt.search_no_results_2
                  })
                ]
              }) : /* @__PURE__ */ G("div", {
                class: "preview-placeholder color-c",
                children: bt.pick
              })
            })
          ]
        }),
        !i && this.props.skinTonePosition == "preview" && this.renderSkinToneButton()
      ]
    });
  }
  renderEmojiButton(i, { pos: o, posinset: s, grid: f }) {
    const u = this.props.emojiButtonSize, p = this.state.tempSkin || this.state.skin, v = (i.skins[p - 1] || i.skins[0]).native, h = Y5(this.state.pos, o), y = o.concat(i.id).join("");
    return /* @__PURE__ */ G(c6, {
      selected: h,
      skin: p,
      size: u,
      children: /* @__PURE__ */ G("button", {
        "aria-label": v,
        "aria-selected": h || void 0,
        "aria-posinset": s,
        "aria-setsize": f.setsize,
        "data-keyboard": this.state.keyboard,
        title: this.props.previewPosition == "none" ? i.name : void 0,
        type: "button",
        class: "flex flex-center flex-middle",
        tabindex: "-1",
        onClick: (g) => this.handleEmojiClick({
          e: g,
          emoji: i
        }),
        onMouseEnter: () => this.handleEmojiOver(o),
        onMouseLeave: () => this.handleEmojiOver(),
        style: {
          width: this.props.emojiButtonSize,
          height: this.props.emojiButtonSize,
          fontSize: this.props.emojiSize,
          lineHeight: 0
        },
        children: [
          /* @__PURE__ */ G("div", {
            "aria-hidden": "true",
            class: "background",
            style: {
              borderRadius: this.props.emojiButtonRadius,
              backgroundColor: this.props.emojiButtonColors ? this.props.emojiButtonColors[(s - 1) % this.props.emojiButtonColors.length] : void 0
            }
          }),
          /* @__PURE__ */ G(Tu, {
            emoji: i,
            set: this.props.set,
            size: this.props.emojiSize,
            skin: p,
            spritesheet: !0,
            getSpritesheetURL: this.props.getSpritesheetURL
          })
        ]
      })
    }, y);
  }
  renderSearch() {
    const i = this.props.previewPosition == "none" || this.props.skinTonePosition == "search";
    return /* @__PURE__ */ G("div", {
      children: [
        /* @__PURE__ */ G("div", {
          class: "spacer"
        }),
        /* @__PURE__ */ G("div", {
          class: "flex flex-middle",
          children: [
            /* @__PURE__ */ G("div", {
              class: "search relative flex-grow",
              children: [
                /* @__PURE__ */ G("input", {
                  type: "search",
                  ref: this.refs.searchInput,
                  placeholder: bt.search,
                  onClick: this.handleSearchClick,
                  onInput: this.handleSearchInput,
                  onKeyDown: this.handleSearchKeyDown,
                  autoComplete: "off"
                }),
                /* @__PURE__ */ G("span", {
                  class: "icon loupe flex",
                  children: Eo.search.loupe
                }),
                this.state.searchResults && /* @__PURE__ */ G("button", {
                  title: "Clear",
                  "aria-label": "Clear",
                  type: "button",
                  class: "icon delete flex",
                  onClick: this.clearSearch,
                  onMouseDown: this.preventDefault,
                  children: Eo.search.delete
                })
              ]
            }),
            i && this.renderSkinToneButton()
          ]
        })
      ]
    });
  }
  renderSearchResults() {
    const { searchResults: i } = this.state;
    return i ? /* @__PURE__ */ G("div", {
      class: "category",
      ref: this.refs.search,
      children: [
        /* @__PURE__ */ G("div", {
          class: `sticky padding-small align-${this.dir[0]}`,
          children: bt.categories.search
        }),
        /* @__PURE__ */ G("div", {
          children: i.length ? i.map((o, s) => /* @__PURE__ */ G("div", {
            class: "flex",
            children: o.map((f, u) => this.renderEmojiButton(f, {
              pos: [
                s,
                u
              ],
              posinset: s * this.props.perLine + u + 1,
              grid: i
            }))
          })) : /* @__PURE__ */ G("div", {
            class: `padding-small align-${this.dir[0]}`,
            children: this.props.onAddCustomEmoji && /* @__PURE__ */ G("a", {
              onClick: this.props.onAddCustomEmoji,
              children: bt.add_custom
            })
          })
        })
      ]
    }) : null;
  }
  renderCategories() {
    const { categories: i } = we, o = !!this.state.searchResults, s = this.getPerLine();
    return /* @__PURE__ */ G("div", {
      style: {
        visibility: o ? "hidden" : void 0,
        display: o ? "none" : void 0,
        height: "100%"
      },
      children: i.map((f) => {
        const { root: u, rows: p } = this.refs.categories.get(f.id);
        return /* @__PURE__ */ G("div", {
          "data-id": f.target ? f.target.id : f.id,
          class: "category",
          ref: u,
          children: [
            /* @__PURE__ */ G("div", {
              class: `sticky padding-small align-${this.dir[0]}`,
              children: f.name || bt.categories[f.id]
            }),
            /* @__PURE__ */ G("div", {
              class: "relative",
              style: {
                height: p.length * this.props.emojiButtonSize
              },
              children: p.map((m, v) => {
                const h = m.index - m.index % uo.rowsPerRender, y = this.state.visibleRows[h], g = "current" in m ? m : void 0;
                if (!y && !g) return null;
                const _ = v * s, M = _ + s, j = f.emojis.slice(_, M);
                return j.length < s && j.push(...new Array(s - j.length)), /* @__PURE__ */ G("div", {
                  "data-index": m.index,
                  ref: g,
                  class: "flex row",
                  style: {
                    top: v * this.props.emojiButtonSize
                  },
                  children: y && j.map((A, O) => {
                    if (!A) return /* @__PURE__ */ G("div", {
                      style: {
                        width: this.props.emojiButtonSize,
                        height: this.props.emojiButtonSize
                      }
                    });
                    const U = Al.get(A);
                    return this.renderEmojiButton(U, {
                      pos: [
                        m.index,
                        O
                      ],
                      posinset: m.posinset + O,
                      grid: this.grid
                    });
                  })
                }, m.index);
              })
            })
          ]
        });
      })
    });
  }
  renderSkinToneButton() {
    return this.props.skinTonePosition == "none" ? null : /* @__PURE__ */ G("div", {
      class: "flex flex-auto flex-center flex-middle",
      style: {
        position: "relative",
        width: this.props.emojiButtonSize,
        height: this.props.emojiButtonSize
      },
      children: /* @__PURE__ */ G("button", {
        type: "button",
        ref: this.refs.skinToneButton,
        class: "skin-tone-button flex flex-auto flex-center flex-middle",
        "aria-selected": this.state.showSkins ? "" : void 0,
        "aria-label": bt.skins.choose,
        title: bt.skins.choose,
        onClick: this.openSkins,
        style: {
          width: this.props.emojiSize,
          height: this.props.emojiSize
        },
        children: /* @__PURE__ */ G("span", {
          class: `skin-tone skin-tone-${this.state.skin}`
        })
      })
    });
  }
  renderLiveRegion() {
    const i = this.getEmojiByPos(this.state.pos), o = i ? i.name : "";
    return /* @__PURE__ */ G("div", {
      "aria-live": "polite",
      class: "sr-only",
      children: o
    });
  }
  renderSkins() {
    const o = this.refs.skinToneButton.current.getBoundingClientRect(), s = this.base.getBoundingClientRect(), f = {};
    return this.dir == "ltr" ? f.right = s.right - o.right - 3 : f.left = o.left - s.left - 3, this.props.previewPosition == "bottom" && this.props.skinTonePosition == "preview" ? f.bottom = s.bottom - o.top + 6 : (f.top = o.bottom - s.top + 3, f.bottom = "auto"), /* @__PURE__ */ G("div", {
      ref: this.refs.menu,
      role: "radiogroup",
      dir: this.dir,
      "aria-label": bt.skins.choose,
      class: "menu hidden",
      "data-position": f.top ? "top" : "bottom",
      style: f,
      children: [
        ...Array(6).keys()
      ].map((u) => {
        const p = u + 1, m = this.state.skin == p;
        return /* @__PURE__ */ G("div", {
          children: [
            /* @__PURE__ */ G("input", {
              type: "radio",
              name: "skin-tone",
              value: p,
              "aria-label": bt.skins[p],
              ref: m ? this.refs.skinToneRadio : null,
              defaultChecked: m,
              onChange: () => this.handleSkinMouseOver(p),
              onKeyDown: (v) => {
                (v.code == "Enter" || v.code == "Space" || v.code == "Tab") && (v.preventDefault(), this.handleSkinClick(p));
              }
            }),
            /* @__PURE__ */ G("button", {
              "aria-hidden": "true",
              tabindex: "-1",
              onClick: () => this.handleSkinClick(p),
              onMouseEnter: () => this.handleSkinMouseOver(p),
              onMouseLeave: () => this.handleSkinMouseOver(),
              class: "option flex flex-grow flex-middle",
              children: [
                /* @__PURE__ */ G("span", {
                  class: `skin-tone skin-tone-${p}`
                }),
                /* @__PURE__ */ G("span", {
                  class: "margin-small-lr",
                  children: bt.skins[p]
                })
              ]
            })
          ]
        });
      })
    });
  }
  render() {
    const i = this.props.perLine * this.props.emojiButtonSize;
    return /* @__PURE__ */ G("section", {
      id: "root",
      class: "flex flex-column",
      dir: this.dir,
      style: {
        width: this.props.dynamicWidth ? "100%" : `calc(${i}px + (var(--padding) + var(--sidebar-width)))`
      },
      "data-emoji-set": this.props.set,
      "data-theme": this.state.theme,
      "data-menu": this.state.showSkins ? "" : void 0,
      children: [
        this.props.previewPosition == "top" && this.renderPreview(),
        this.props.navPosition == "top" && this.renderNav(),
        this.props.searchPosition == "sticky" && /* @__PURE__ */ G("div", {
          class: "padding-lr",
          children: this.renderSearch()
        }),
        /* @__PURE__ */ G("div", {
          ref: this.refs.scroll,
          class: "scroll flex-grow padding-lr",
          children: /* @__PURE__ */ G("div", {
            style: {
              width: this.props.dynamicWidth ? "100%" : i,
              height: "100%"
            },
            children: [
              this.props.searchPosition == "static" && this.renderSearch(),
              this.renderSearchResults(),
              this.renderCategories()
            ]
          })
        }),
        this.props.navPosition == "bottom" && this.renderNav(),
        this.props.previewPosition == "bottom" && this.renderPreview(),
        this.state.showSkins && this.renderSkins(),
        this.renderLiveRegion()
      ]
    });
  }
  constructor(i) {
    super(), Kt(this, "darkMediaCallback", () => {
      this.props.theme == "auto" && this.setState({
        theme: this.darkMedia.matches ? "dark" : "light"
      });
    }), Kt(this, "handleClickOutside", (o) => {
      const { element: s } = this.props;
      o.target != s && (this.state.showSkins && this.closeSkins(), this.props.onClickOutside && this.props.onClickOutside(o));
    }), Kt(this, "handleBaseClick", (o) => {
      this.state.showSkins && (o.target.closest(".menu") || (o.preventDefault(), o.stopImmediatePropagation(), this.closeSkins()));
    }), Kt(this, "handleBaseKeydown", (o) => {
      this.state.showSkins && o.key == "Escape" && (o.preventDefault(), o.stopImmediatePropagation(), this.closeSkins());
    }), Kt(this, "handleSearchClick", () => {
      this.getEmojiByPos(this.state.pos) && this.setState({
        pos: [
          -1,
          -1
        ]
      });
    }), Kt(this, "handleSearchInput", async () => {
      const o = this.refs.searchInput.current;
      if (!o) return;
      const { value: s } = o, f = await Al.search(s), u = () => {
        this.refs.scroll.current && (this.refs.scroll.current.scrollTop = 0);
      };
      if (!f) return this.setState({
        searchResults: f,
        pos: [
          -1,
          -1
        ]
      }, u);
      const p = o.selectionStart == o.value.length ? [
        0,
        0
      ] : [
        -1,
        -1
      ], m = [];
      m.setsize = f.length;
      let v = null;
      for (let h of f)
        (!m.length || v.length == this.getPerLine()) && (v = [], v.__categoryId = "search", v.__index = m.length, m.push(v)), v.push(h);
      this.ignoreMouse(), this.setState({
        searchResults: m,
        pos: p
      }, u);
    }), Kt(this, "handleSearchKeyDown", (o) => {
      const s = o.currentTarget;
      switch (o.stopImmediatePropagation(), o.key) {
        case "ArrowLeft":
          this.navigate({
            e: o,
            input: s,
            left: !0
          });
          break;
        case "ArrowRight":
          this.navigate({
            e: o,
            input: s,
            right: !0
          });
          break;
        case "ArrowUp":
          this.navigate({
            e: o,
            input: s,
            up: !0
          });
          break;
        case "ArrowDown":
          this.navigate({
            e: o,
            input: s,
            down: !0
          });
          break;
        case "Enter":
          o.preventDefault(), this.handleEmojiClick({
            e: o,
            pos: this.state.pos
          });
          break;
        case "Escape":
          o.preventDefault(), this.state.searchResults ? this.clearSearch() : this.unfocusSearch();
          break;
      }
    }), Kt(this, "clearSearch", () => {
      const o = this.refs.searchInput.current;
      o && (o.value = "", o.focus(), this.handleSearchInput());
    }), Kt(this, "handleCategoryClick", ({ category: o, i: s }) => {
      this.scrollTo(s == 0 ? {
        row: -1
      } : {
        categoryId: o.id
      });
    }), Kt(this, "openSkins", (o) => {
      const { currentTarget: s } = o, f = s.getBoundingClientRect();
      this.setState({
        showSkins: f
      }, async () => {
        await Q5(2);
        const u = this.refs.menu.current;
        u && (u.classList.remove("hidden"), this.refs.skinToneRadio.current.focus(), this.base.addEventListener("click", this.handleBaseClick, !0), this.base.addEventListener("keydown", this.handleBaseKeydown, !0));
      });
    }), this.observers = [], this.state = {
      pos: [
        -1,
        -1
      ],
      perLine: this.initDynamicPerLine(i),
      visibleRows: {
        0: !0
      },
      ...this.getInitialState(i)
    };
  }
}
class Gu extends P5 {
  async connectedCallback() {
    const i = ym(this.props, Dn, this);
    i.element = this, i.ref = (o) => {
      this.component = o;
    }, await Oo(i), !this.disconnected && hm(/* @__PURE__ */ G(u6, {
      ...i
    }), this.shadowRoot);
  }
  constructor(i) {
    super(i, {
      styles: /* @__PURE__ */ tm(Em)
    });
  }
}
Kt(Gu, "Props", Dn);
typeof customElements < "u" && !customElements.get("em-emoji-picker") && customElements.define("em-emoji-picker", Gu);
var Em = {};
Em = `:host {
  width: min-content;
  height: 435px;
  min-height: 230px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  --border-radius: 10px;
  --category-icon-size: 18px;
  --font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --font-size: 15px;
  --preview-placeholder-size: 21px;
  --preview-title-size: 1.1em;
  --preview-subtitle-size: .9em;
  --shadow-color: 0deg 0% 0%;
  --shadow: .3px .5px 2.7px hsl(var(--shadow-color) / .14), .4px .8px 1px -3.2px hsl(var(--shadow-color) / .14), 1px 2px 2.5px -4.5px hsl(var(--shadow-color) / .14);
  display: flex;
}

[data-theme="light"] {
  --em-rgb-color: var(--rgb-color, 34, 36, 39);
  --em-rgb-accent: var(--rgb-accent, 34, 102, 237);
  --em-rgb-background: var(--rgb-background, 255, 255, 255);
  --em-rgb-input: var(--rgb-input, 255, 255, 255);
  --em-color-border: var(--color-border, rgba(0, 0, 0, .05));
  --em-color-border-over: var(--color-border-over, rgba(0, 0, 0, .1));
}

[data-theme="dark"] {
  --em-rgb-color: var(--rgb-color, 222, 222, 221);
  --em-rgb-accent: var(--rgb-accent, 58, 130, 247);
  --em-rgb-background: var(--rgb-background, 21, 22, 23);
  --em-rgb-input: var(--rgb-input, 0, 0, 0);
  --em-color-border: var(--color-border, rgba(255, 255, 255, .1));
  --em-color-border-over: var(--color-border-over, rgba(255, 255, 255, .2));
}

#root {
  --color-a: rgb(var(--em-rgb-color));
  --color-b: rgba(var(--em-rgb-color), .65);
  --color-c: rgba(var(--em-rgb-color), .45);
  --padding: 12px;
  --padding-small: calc(var(--padding) / 2);
  --sidebar-width: 16px;
  --duration: 225ms;
  --duration-fast: 125ms;
  --duration-instant: 50ms;
  --easing: cubic-bezier(.4, 0, .2, 1);
  width: 100%;
  text-align: left;
  border-radius: var(--border-radius);
  background-color: rgb(var(--em-rgb-background));
  position: relative;
}

@media (prefers-reduced-motion) {
  #root {
    --duration: 0;
    --duration-fast: 0;
    --duration-instant: 0;
  }
}

#root[data-menu] button {
  cursor: auto;
}

#root[data-menu] .menu button {
  cursor: pointer;
}

:host, #root, input, button {
  color: rgb(var(--em-rgb-color));
  font-family: var(--font-family);
  font-size: var(--font-size);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: normal;
}

*, :before, :after {
  box-sizing: border-box;
  min-width: 0;
  margin: 0;
  padding: 0;
}

.relative {
  position: relative;
}

.flex {
  display: flex;
}

.flex-auto {
  flex: none;
}

.flex-center {
  justify-content: center;
}

.flex-column {
  flex-direction: column;
}

.flex-grow {
  flex: auto;
}

.flex-middle {
  align-items: center;
}

.flex-wrap {
  flex-wrap: wrap;
}

.padding {
  padding: var(--padding);
}

.padding-t {
  padding-top: var(--padding);
}

.padding-lr {
  padding-left: var(--padding);
  padding-right: var(--padding);
}

.padding-r {
  padding-right: var(--padding);
}

.padding-small {
  padding: var(--padding-small);
}

.padding-small-b {
  padding-bottom: var(--padding-small);
}

.padding-small-lr {
  padding-left: var(--padding-small);
  padding-right: var(--padding-small);
}

.margin {
  margin: var(--padding);
}

.margin-r {
  margin-right: var(--padding);
}

.margin-l {
  margin-left: var(--padding);
}

.margin-small-l {
  margin-left: var(--padding-small);
}

.margin-small-lr {
  margin-left: var(--padding-small);
  margin-right: var(--padding-small);
}

.align-l {
  text-align: left;
}

.align-r {
  text-align: right;
}

.color-a {
  color: var(--color-a);
}

.color-b {
  color: var(--color-b);
}

.color-c {
  color: var(--color-c);
}

.ellipsis {
  white-space: nowrap;
  max-width: 100%;
  width: auto;
  text-overflow: ellipsis;
  overflow: hidden;
}

.sr-only {
  width: 1px;
  height: 1px;
  position: absolute;
  top: auto;
  left: -10000px;
  overflow: hidden;
}

a {
  cursor: pointer;
  color: rgb(var(--em-rgb-accent));
}

a:hover {
  text-decoration: underline;
}

.spacer {
  height: 10px;
}

[dir="rtl"] .scroll {
  padding-left: 0;
  padding-right: var(--padding);
}

.scroll {
  padding-right: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.scroll::-webkit-scrollbar {
  width: var(--sidebar-width);
  height: var(--sidebar-width);
}

.scroll::-webkit-scrollbar-track {
  border: 0;
}

.scroll::-webkit-scrollbar-button {
  width: 0;
  height: 0;
  display: none;
}

.scroll::-webkit-scrollbar-corner {
  background-color: rgba(0, 0, 0, 0);
}

.scroll::-webkit-scrollbar-thumb {
  min-height: 20%;
  min-height: 65px;
  border: 4px solid rgb(var(--em-rgb-background));
  border-radius: 8px;
}

.scroll::-webkit-scrollbar-thumb:hover {
  background-color: var(--em-color-border-over) !important;
}

.scroll:hover::-webkit-scrollbar-thumb {
  background-color: var(--em-color-border);
}

.sticky {
  z-index: 1;
  background-color: rgba(var(--em-rgb-background), .9);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  font-weight: 500;
  position: sticky;
  top: -1px;
}

[dir="rtl"] .search input[type="search"] {
  padding: 10px 2.2em 10px 2em;
}

[dir="rtl"] .search .loupe {
  left: auto;
  right: .7em;
}

[dir="rtl"] .search .delete {
  left: .7em;
  right: auto;
}

.search {
  z-index: 2;
  position: relative;
}

.search input, .search button {
  font-size: calc(var(--font-size)  - 1px);
}

.search input[type="search"] {
  width: 100%;
  background-color: var(--em-color-border);
  transition-duration: var(--duration);
  transition-property: background-color, box-shadow;
  transition-timing-function: var(--easing);
  border: 0;
  border-radius: 10px;
  outline: 0;
  padding: 10px 2em 10px 2.2em;
  display: block;
}

.search input[type="search"]::-ms-input-placeholder {
  color: inherit;
  opacity: .6;
}

.search input[type="search"]::placeholder {
  color: inherit;
  opacity: .6;
}

.search input[type="search"], .search input[type="search"]::-webkit-search-decoration, .search input[type="search"]::-webkit-search-cancel-button, .search input[type="search"]::-webkit-search-results-button, .search input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none;
  -ms-appearance: none;
  appearance: none;
}

.search input[type="search"]:focus {
  background-color: rgb(var(--em-rgb-input));
  box-shadow: inset 0 0 0 1px rgb(var(--em-rgb-accent)), 0 1px 3px rgba(65, 69, 73, .2);
}

.search .icon {
  z-index: 1;
  color: rgba(var(--em-rgb-color), .7);
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.search .loupe {
  pointer-events: none;
  left: .7em;
}

.search .delete {
  right: .7em;
}

svg {
  fill: currentColor;
  width: 1em;
  height: 1em;
}

button {
  -webkit-appearance: none;
  -ms-appearance: none;
  appearance: none;
  cursor: pointer;
  color: currentColor;
  background-color: rgba(0, 0, 0, 0);
  border: 0;
}

#nav {
  z-index: 2;
  padding-top: 12px;
  padding-bottom: 12px;
  padding-right: var(--sidebar-width);
  position: relative;
}

#nav button {
  color: var(--color-b);
  transition: color var(--duration) var(--easing);
}

#nav button:hover {
  color: var(--color-a);
}

#nav svg, #nav img {
  width: var(--category-icon-size);
  height: var(--category-icon-size);
}

#nav[dir="rtl"] .bar {
  left: auto;
  right: 0;
}

#nav .bar {
  width: 100%;
  height: 3px;
  background-color: rgb(var(--em-rgb-accent));
  transition: transform var(--duration) var(--easing);
  border-radius: 3px 3px 0 0;
  position: absolute;
  bottom: -12px;
  left: 0;
}

#nav button[aria-selected] {
  color: rgb(var(--em-rgb-accent));
}

#preview {
  z-index: 2;
  padding: calc(var(--padding)  + 4px) var(--padding);
  padding-right: var(--sidebar-width);
  position: relative;
}

#preview .preview-placeholder {
  font-size: var(--preview-placeholder-size);
}

#preview .preview-title {
  font-size: var(--preview-title-size);
}

#preview .preview-subtitle {
  font-size: var(--preview-subtitle-size);
}

#nav:before, #preview:before {
  content: "";
  height: 2px;
  position: absolute;
  left: 0;
  right: 0;
}

#nav[data-position="top"]:before, #preview[data-position="top"]:before {
  background: linear-gradient(to bottom, var(--em-color-border), transparent);
  top: 100%;
}

#nav[data-position="bottom"]:before, #preview[data-position="bottom"]:before {
  background: linear-gradient(to top, var(--em-color-border), transparent);
  bottom: 100%;
}

.category:last-child {
  min-height: calc(100% + 1px);
}

.category button {
  font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, sans-serif;
  position: relative;
}

.category button > * {
  position: relative;
}

.category button .background {
  opacity: 0;
  background-color: var(--em-color-border);
  transition: opacity var(--duration-fast) var(--easing) var(--duration-instant);
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

.category button:hover .background {
  transition-duration: var(--duration-instant);
  transition-delay: 0s;
}

.category button[aria-selected] .background {
  opacity: 1;
}

.category button[data-keyboard] .background {
  transition: none;
}

.row {
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

.skin-tone-button {
  border: 1px solid rgba(0, 0, 0, 0);
  border-radius: 100%;
}

.skin-tone-button:hover {
  border-color: var(--em-color-border);
}

.skin-tone-button:active .skin-tone {
  transform: scale(.85) !important;
}

.skin-tone-button .skin-tone {
  transition: transform var(--duration) var(--easing);
}

.skin-tone-button[aria-selected] {
  background-color: var(--em-color-border);
  border-top-color: rgba(0, 0, 0, .05);
  border-bottom-color: rgba(0, 0, 0, 0);
  border-left-width: 0;
  border-right-width: 0;
}

.skin-tone-button[aria-selected] .skin-tone {
  transform: scale(.9);
}

.menu {
  z-index: 2;
  white-space: nowrap;
  border: 1px solid var(--em-color-border);
  background-color: rgba(var(--em-rgb-background), .9);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition-property: opacity, transform;
  transition-duration: var(--duration);
  transition-timing-function: var(--easing);
  border-radius: 10px;
  padding: 4px;
  position: absolute;
  box-shadow: 1px 1px 5px rgba(0, 0, 0, .05);
}

.menu.hidden {
  opacity: 0;
}

.menu[data-position="bottom"] {
  transform-origin: 100% 100%;
}

.menu[data-position="bottom"].hidden {
  transform: scale(.9)rotate(-3deg)translateY(5%);
}

.menu[data-position="top"] {
  transform-origin: 100% 0;
}

.menu[data-position="top"].hidden {
  transform: scale(.9)rotate(3deg)translateY(-5%);
}

.menu input[type="radio"] {
  clip: rect(0 0 0 0);
  width: 1px;
  height: 1px;
  border: 0;
  margin: 0;
  padding: 0;
  position: absolute;
  overflow: hidden;
}

.menu input[type="radio"]:checked + .option {
  box-shadow: 0 0 0 2px rgb(var(--em-rgb-accent));
}

.option {
  width: 100%;
  border-radius: 6px;
  padding: 4px 6px;
}

.option:hover {
  color: #fff;
  background-color: rgb(var(--em-rgb-accent));
}

.skin-tone {
  width: 16px;
  height: 16px;
  border-radius: 100%;
  display: inline-block;
  position: relative;
  overflow: hidden;
}

.skin-tone:after {
  content: "";
  mix-blend-mode: overlay;
  background: linear-gradient(rgba(255, 255, 255, .2), rgba(0, 0, 0, 0));
  border: 1px solid rgba(0, 0, 0, .8);
  border-radius: 100%;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  box-shadow: inset 0 -2px 3px #000, inset 0 1px 2px #fff;
}

.skin-tone-1 {
  background-color: #ffc93a;
}

.skin-tone-2 {
  background-color: #ffdab7;
}

.skin-tone-3 {
  background-color: #e7b98f;
}

.skin-tone-4 {
  background-color: #c88c61;
}

.skin-tone-5 {
  background-color: #a46134;
}

.skin-tone-6 {
  background-color: #5d4437;
}

[data-index] {
  justify-content: space-between;
}

[data-emoji-set="twitter"] .skin-tone:after {
  box-shadow: none;
  border-color: rgba(0, 0, 0, .5);
}

[data-emoji-set="twitter"] .skin-tone-1 {
  background-color: #fade72;
}

[data-emoji-set="twitter"] .skin-tone-2 {
  background-color: #f3dfd0;
}

[data-emoji-set="twitter"] .skin-tone-3 {
  background-color: #eed3a8;
}

[data-emoji-set="twitter"] .skin-tone-4 {
  background-color: #cfad8d;
}

[data-emoji-set="twitter"] .skin-tone-5 {
  background-color: #a8805d;
}

[data-emoji-set="twitter"] .skin-tone-6 {
  background-color: #765542;
}

[data-emoji-set="google"] .skin-tone:after {
  box-shadow: inset 0 0 2px 2px rgba(0, 0, 0, .4);
}

[data-emoji-set="google"] .skin-tone-1 {
  background-color: #f5c748;
}

[data-emoji-set="google"] .skin-tone-2 {
  background-color: #f1d5aa;
}

[data-emoji-set="google"] .skin-tone-3 {
  background-color: #d4b48d;
}

[data-emoji-set="google"] .skin-tone-4 {
  background-color: #aa876b;
}

[data-emoji-set="google"] .skin-tone-5 {
  background-color: #916544;
}

[data-emoji-set="google"] .skin-tone-6 {
  background-color: #61493f;
}

[data-emoji-set="facebook"] .skin-tone:after {
  border-color: rgba(0, 0, 0, .4);
  box-shadow: inset 0 -2px 3px #000, inset 0 1px 4px #fff;
}

[data-emoji-set="facebook"] .skin-tone-1 {
  background-color: #f5c748;
}

[data-emoji-set="facebook"] .skin-tone-2 {
  background-color: #f1d5aa;
}

[data-emoji-set="facebook"] .skin-tone-3 {
  background-color: #d4b48d;
}

[data-emoji-set="facebook"] .skin-tone-4 {
  background-color: #aa876b;
}

[data-emoji-set="facebook"] .skin-tone-5 {
  background-color: #916544;
}

[data-emoji-set="facebook"] .skin-tone-6 {
  background-color: #61493f;
}

`;
function f6(l) {
  const i = x.useRef(null), o = x.useRef(null);
  return o.current && o.current.update(l), x.useEffect(() => (o.current = new Gu({
    ...l,
    ref: i
  }), () => {
    o.current = null;
  }), []), /* @__PURE__ */ Z.createElement("div", {
    ref: i
  });
}
var d6 = typeof global == "object" && global && global.Object === Object && global, h6 = typeof self == "object" && self && self.Object === Object && self, Tm = d6 || h6 || Function("return this")(), Mo = Tm.Symbol, Mm = Object.prototype, m6 = Mm.hasOwnProperty, p6 = Mm.toString, Ui = Mo ? Mo.toStringTag : void 0;
function v6(l) {
  var i = m6.call(l, Ui), o = l[Ui];
  try {
    l[Ui] = void 0;
    var s = !0;
  } catch {
  }
  var f = p6.call(l);
  return s && (i ? l[Ui] = o : delete l[Ui]), f;
}
var g6 = Object.prototype, b6 = g6.toString;
function y6(l) {
  return b6.call(l);
}
var x6 = "[object Null]", S6 = "[object Undefined]", Uh = Mo ? Mo.toStringTag : void 0;
function _6(l) {
  return l == null ? l === void 0 ? S6 : x6 : Uh && Uh in Object(l) ? v6(l) : y6(l);
}
function w6(l) {
  return l != null && typeof l == "object";
}
var C6 = "[object Symbol]";
function E6(l) {
  return typeof l == "symbol" || w6(l) && _6(l) == C6;
}
var T6 = /\s/;
function M6(l) {
  for (var i = l.length; i-- && T6.test(l.charAt(i)); )
    ;
  return i;
}
var A6 = /^\s+/;
function j6(l) {
  return l && l.slice(0, M6(l) + 1).replace(A6, "");
}
function Ao(l) {
  var i = typeof l;
  return l != null && (i == "object" || i == "function");
}
var Lh = NaN, k6 = /^[-+]0x[0-9a-f]+$/i, N6 = /^0b[01]+$/i, R6 = /^0o[0-7]+$/i, D6 = parseInt;
function Bh(l) {
  if (typeof l == "number")
    return l;
  if (E6(l))
    return Lh;
  if (Ao(l)) {
    var i = typeof l.valueOf == "function" ? l.valueOf() : l;
    l = Ao(i) ? i + "" : i;
  }
  if (typeof l != "string")
    return l === 0 ? l : +l;
  l = j6(l);
  var o = N6.test(l);
  return o || R6.test(l) ? D6(l.slice(2), o ? 2 : 8) : k6.test(l) ? Lh : +l;
}
var pu = function() {
  return Tm.Date.now();
}, z6 = "Expected a function", O6 = Math.max, U6 = Math.min;
function L6(l, i, o) {
  var s, f, u, p, m, v, h = 0, y = !1, g = !1, _ = !0;
  if (typeof l != "function")
    throw new TypeError(z6);
  i = Bh(i) || 0, Ao(o) && (y = !!o.leading, g = "maxWait" in o, u = g ? O6(Bh(o.maxWait) || 0, i) : u, _ = "trailing" in o ? !!o.trailing : _);
  function M(W) {
    var ee = s, K = f;
    return s = f = void 0, h = W, p = l.apply(K, ee), p;
  }
  function j(W) {
    return h = W, m = setTimeout(U, i), y ? M(W) : p;
  }
  function A(W) {
    var ee = W - v, K = W - h, fe = i - ee;
    return g ? U6(fe, u - K) : fe;
  }
  function O(W) {
    var ee = W - v, K = W - h;
    return v === void 0 || ee >= i || ee < 0 || g && K >= u;
  }
  function U() {
    var W = pu();
    if (O(W))
      return F(W);
    m = setTimeout(U, A(W));
  }
  function F(W) {
    return m = void 0, _ && s ? M(W) : (s = f = void 0, p);
  }
  function P() {
    m !== void 0 && clearTimeout(m), h = 0, s = v = f = m = void 0;
  }
  function Y() {
    return m === void 0 ? p : F(pu());
  }
  function J() {
    var W = pu(), ee = O(W);
    if (s = arguments, f = this, v = W, ee) {
      if (m === void 0)
        return j(v);
      if (g)
        return clearTimeout(m), m = setTimeout(U, i), M(v);
    }
    return m === void 0 && (m = setTimeout(U, i)), p;
  }
  return J.cancel = P, J.flush = Y, J;
}
var B6 = "Expected a function";
function H6(l, i, o) {
  var s = !0, f = !0;
  if (typeof l != "function")
    throw new TypeError(B6);
  return Ao(o) && (s = "leading" in o ? !!o.leading : s, f = "trailing" in o ? !!o.trailing : f), L6(l, i, {
    leading: s,
    maxWait: i,
    trailing: f
  });
}
const $6 = `
em-emoji-picker {
  --background-rgb: 0, 0, 0;
  --color-border-over: rgba(0, 0, 0, 0.1);
  --color-border: rgba(255, 255, 255, 0.05);
  --rgb-background: 0, 0, 0, 0.4;
  --border-radius: 12px;
  --rgb-color: 213, 226, 242;
  --rgb-input: 213, 226, 242;

  height: var(--emoji-panel-height);
  max-height: var(--emoji-panel-max-height);
  position: absolute;
  bottom: var(--emoji-panel-bottom);
  left: var(--emoji-panel-left);
  width: var(--emoji-panel-width, auto);
  z-index: 50;
  pointer-events: auto;
}

.emoji-picker__blur-background {
  position: absolute;
  border-radius: 12px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  height: var(--emoji-panel-height);
  width: var(--emoji-panel-width);
  max-height: var(--emoji-panel-max-height);
  bottom: var(--emoji-panel-bottom);
  left: var(--emoji-panel-left);
  pointer-events: none;
  z-index: -1;
}
`;
let fo = null;
const V6 = () => (fo || (fo = new CSSStyleSheet(), fo.replaceSync(`
*::-webkit-scrollbar {
  display: none
}
* {
  --em-rgb-input: rgba(0, 0, 0, 0.4) !important;
}
`)), fo);
function q6(l) {
  l.style.setProperty("--emoji-panel-height", "384px"), l.style.setProperty("--emoji-panel-width", "308px"), l.style.setProperty("--emoji-panel-bottom", "0px"), l.style.setProperty("--emoji-panel-left", "0px"), l.style.setProperty("--emoji-panel-max-height", "none");
}
function Hh(l) {
  if (!l) return 7;
  const i = window.innerWidth >= 844 ? 48 : 16, o = window.innerWidth - 2 * i;
  return Math.floor((o - 28) / 40) || 7;
}
function Am({ onSelectEmoji: l, toggleOpen: i, isMobileView: o = !1 }) {
  const [s, f] = x.useState(Hh(o)), u = x.useRef(null), p = (h) => {
    h && (l(h), i());
  }, m = x.useCallback(
    H6(() => {
      if (!u.current) return;
      const h = Hh(o);
      f(h), o && (u.current.style.setProperty("--emoji-panel-width", "100%"), u.current.style.setProperty("--emoji-panel-height", "auto"));
    }, 500),
    [o]
  ), v = x.useCallback(() => {
    const h = u.current;
    h && (h.style.setProperty("--emoji-panel-bottom", "0px"), h.style.setProperty("--emoji-panel-left", "0px"), h.style.setProperty("--emoji-panel-max-height", "243px"), m());
  }, [m]);
  return x.useEffect(() => {
    if (!u.current) return;
    const h = u.current.querySelector("em-emoji-picker");
    h && h.shadowRoot && (h.shadowRoot.adoptedStyleSheets = [V6()]), o ? v() : q6(u.current);
  }, [v, o]), x.useEffect(() => {
    if (o)
      return window.addEventListener("resize", m), () => {
        window.removeEventListener("resize", m);
      };
  }, [m, o]), /* @__PURE__ */ S.jsxs("div", { ref: u, className: "relative z-50", children: [
    /* @__PURE__ */ S.jsx("style", { children: $6 }),
    /* @__PURE__ */ S.jsx("div", { className: "emoji-picker__blur-background" }),
    /* @__PURE__ */ S.jsx(
      f6,
      {
        set: "apple",
        onEmojiSelect: p,
        emojiButtonColors: ["rgba(0, 157, 231, 0.5)"],
        emojiButtonRadius: "8px",
        emojiButtonSize: 40,
        emojiSize: 32,
        maxFrequentRows: 1,
        navPosition: "bottom",
        perLine: s,
        previewPosition: "none",
        skinTonePosition: "none",
        theme: "dark",
        onClickOutside: i
      }
    )
  ] });
}
const jm = (l) => /* @__PURE__ */ x.createElement("svg", { width: 22, height: 22, viewBox: "0 0 22 22", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...l }, /* @__PURE__ */ x.createElement("path", { d: "M6.88417 13.2638C6.47714 13.5491 6.37846 14.1104 6.66376 14.5174C7.59014 15.839 9.30712 16.7008 10.994 16.7008C12.6795 16.7008 14.3926 15.8409 15.3331 14.5239C15.622 14.1194 15.5283 13.5573 15.1238 13.2684C14.7193 12.9795 14.1572 13.0733 13.8683 13.4778C13.2696 14.3161 12.1048 14.9008 10.994 14.9008C9.8846 14.9008 8.72145 14.317 8.13773 13.4842C7.85243 13.0772 7.29119 12.9785 6.88417 13.2638Z", fill: "currentColor" }), /* @__PURE__ */ x.createElement("path", { d: "M7.40078 8.30078C7.40078 7.80373 7.80373 7.40078 8.30078 7.40078C8.79784 7.40078 9.20078 7.80373 9.20078 8.30078V10.1008C9.20078 10.5978 8.79784 11.0008 8.30078 11.0008C7.80373 11.0008 7.40078 10.5978 7.40078 10.1008V8.30078Z", fill: "currentColor" }), /* @__PURE__ */ x.createElement("path", { d: "M13.7008 7.40078C13.2037 7.40078 12.8008 7.80373 12.8008 8.30078V10.1008C12.8008 10.5978 13.2037 11.0008 13.7008 11.0008C14.1978 11.0008 14.6008 10.5978 14.6008 10.1008V8.30078C14.6008 7.80373 14.1978 7.40078 13.7008 7.40078Z", fill: "currentColor" }), /* @__PURE__ */ x.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11.0008 21.2008C5.36748 21.2008 0.800781 16.6341 0.800781 11.0008C0.800781 5.36748 5.36748 0.800781 11.0008 0.800781C16.6341 0.800781 21.2008 5.36748 21.2008 11.0008C21.2008 16.6341 16.6341 21.2008 11.0008 21.2008ZM11.0008 19.4008C15.64 19.4008 19.4008 15.64 19.4008 11.0008C19.4008 6.36159 15.64 2.60078 11.0008 2.60078C6.36159 2.60078 2.60078 6.36159 2.60078 11.0008C2.60078 15.64 6.36159 19.4008 11.0008 19.4008Z", fill: "currentColor" })), km = (l) => /* @__PURE__ */ x.createElement("svg", { width: 20, height: 20, viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...l }, /* @__PURE__ */ x.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M3.5 3.5C2.94772 3.5 2.5 3.9544 2.5 4.51494V16.9915C2.5 17.4436 3.03857 17.67 3.35355 17.3503L5 15.6793H17C17.5523 15.6793 18 15.2249 18 14.6644V4.51494C18 3.9544 17.5523 3.5 17 3.5H3.5ZM15.5 9.84339C15.5 10.5441 14.9404 11.1121 14.25 11.1121C13.5596 11.1121 13 10.5441 13 9.84339C13 9.14272 13.5596 8.57471 14.25 8.57471C14.9404 8.57471 15.5 9.14272 15.5 9.84339ZM10.25 11.1121C10.9404 11.1121 11.5 10.5441 11.5 9.84339C11.5 9.14272 10.9404 8.57471 10.25 8.57471C9.55965 8.57471 9 9.14272 9 9.84339C9 10.5441 9.55965 11.1121 10.25 11.1121ZM7.5 9.84339C7.5 10.5441 6.94036 11.1121 6.25 11.1121C5.55964 11.1121 5 10.5441 5 9.84339C5 9.14272 5.55964 8.57471 6.25 8.57471C6.94036 8.57471 7.5 9.14272 7.5 9.84339Z", fill: "currentColor" })), Nm = (l) => /* @__PURE__ */ x.createElement("svg", { width: 20, height: 20, viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...l }, /* @__PURE__ */ x.createElement("path", { d: "M10 12.2409L16.2929 5.79979C16.6834 5.40007 17.3166 5.40007 17.7071 5.79979C18.0976 6.19951 18.0976 6.84759 17.7071 7.24732L11.0607 14.0503C10.4749 14.6499 9.52513 14.6499 8.93934 14.0503L2.29289 7.24732C1.90237 6.84759 1.90237 6.19951 2.29289 5.79979C2.68342 5.40007 3.31658 5.40007 3.70711 5.79979L10 12.2409Z", fill: "currentColor" })), Rm = (l) => {
  const i = Bi(Rl.LocalPlayer), o = x.useCallback(
    (u) => {
      if (!i) return;
      i.store.getState().setCanInputRotateYawPitch(!u);
      const m = i.modules[vu.Locomotion];
      m && (m.canMove = !u);
      const v = i.modules[vu.Camera];
      v && (v.canZoom = !u);
    },
    [i]
  );
  x.useEffect(() => (l !== void 0 && o(l), () => {
    l !== void 0 && o(!1);
  }), [l, o]);
  const s = x.useCallback(() => {
    o(!0);
  }, [o]), f = x.useCallback(() => {
    o(!1);
  }, [o]);
  return { onFocus: s, onBlur: f };
}, G6 = 5e3, $h = 50;
function Y6({
  messageGroups: l,
  typingText: i,
  sendMessage: o,
  sendTypingStatus: s
  // isConnected, // Unused for now as we enforce input enablement for UI testing
}) {
  const [f, u] = x.useState(!1), [p, m] = x.useState(!1), v = x.useRef(null), h = x.useRef(null), [y, g] = x.useState("fade-mask-bottom"), { onFocus: _, onBlur: M } = Rm(!1), [j, A] = x.useState([]), [O, U] = x.useState(Date.now()), F = x.useCallback(() => {
    u((Y) => !Y);
  }, []);
  x.useEffect(() => {
    f && (A([]), U(Date.now()));
  }, [f, l]), x.useEffect(() => {
    if (f) return;
    const J = l.flatMap(
      (W) => W.messages.map((ee) => ({
        ...ee,
        senderName: W.senderName,
        // Carry over sender info needed for display
        avatarSnapshot: W.avatarSnapshot,
        isSent: W.isSent
      }))
    ).filter((W) => W.timestamp > O);
    if (J.length > 0) {
      const W = Date.now(), ee = J.map((fe) => {
        const Ze = {
          ...fe,
          body: fe.body.length > $h ? `${fe.body.substring(0, $h)}...` : fe.body
        };
        return {
          id: `notify-${fe.id}-${W}`,
          userSessionId: fe.userSessionId,
          senderName: fe.senderName,
          avatarSnapshot: fe.avatarSnapshot,
          isSent: fe.isSent,
          messages: [Ze],
          // Single message per notification with trimmed content
          timestamp: fe.timestamp,
          expiry: W + G6
        };
      });
      A((fe) => [...fe, ...ee]);
      const K = Math.max(...J.map((fe) => fe.timestamp));
      U(K);
    }
  }, [l, f, O]), x.useEffect(() => {
    if (j.length === 0) return;
    const Y = setInterval(() => {
      const J = Date.now();
      A((W) => W.filter((ee) => ee.expiry > J));
    }, 1e3);
    return () => clearInterval(Y);
  }, [j]);
  const P = x.useCallback(() => {
    const Y = h.current;
    if (!Y) return;
    const J = Y.scrollTop <= 1, W = Y.scrollTop + Y.clientHeight >= Y.scrollHeight - 1;
    g(J && W ? "" : J ? "fade-mask-bottom" : W ? "fade-mask-top" : "fade-mask-both");
  }, []);
  return x.useEffect(() => {
    P();
  }, [P, f]), /* @__PURE__ */ S.jsxs("div", { className: "pointer-events-none flex h-full w-[332px] flex-col justify-end", children: [
    f ? /* @__PURE__ */ S.jsx(
      "div",
      {
        ref: h,
        className: pe(
          "scrollbar-none pointer-events-auto relative mb-3 max-h-[calc(100vh-150px)] min-h-0 flex-1 overflow-y-auto overflow-x-hidden",
          "animate-in slide-in-from-bottom-2 fade-in duration-200",
          y
        ),
        onMouseDown: (Y) => Y.stopPropagation(),
        onMouseUp: (Y) => Y.stopPropagation(),
        onClick: (Y) => Y.stopPropagation(),
        onWheel: (Y) => Y.stopPropagation(),
        onScroll: P,
        children: /* @__PURE__ */ S.jsx(
          em,
          {
            messageGroups: l,
            variant: "desktop",
            scrollContainerRef: h
          }
        )
      }
    ) : (
      /* Notification View - Bounded Height to prevent infinite growth */
      j.length > 0 && /* @__PURE__ */ S.jsx("div", { className: "pointer-events-none mb-3 flex max-h-[calc(100vh-150px)] flex-col justify-end space-y-2 overflow-hidden", children: j.map((Y) => /* @__PURE__ */ S.jsx(
        "div",
        {
          className: "animate-in slide-in-from-bottom-2 fade-in pointer-events-auto duration-300",
          children: /* @__PURE__ */ S.jsx(F2, { group: Y, variant: "desktop" })
        },
        Y.id
      )) })
    ),
    !f && i && /* @__PURE__ */ S.jsx("div", { className: "pointer-events-none mb-2 px-4", children: /* @__PURE__ */ S.jsx("p", { className: "text-viverse-primary-40 text-xs shadow-black drop-shadow-md", children: i }) }),
    /* @__PURE__ */ S.jsx("div", { className: "pointer-events-auto relative z-10", children: /* @__PURE__ */ S.jsx(
      "div",
      {
        className: pe(
          "flex w-full items-center p-2",
          "text-viverse-primary-20 rounded-[20px] border-[1.5px] border-white/20 bg-black/40 shadow-2xl backdrop-blur-[32px]",
          "focus-within:ring-viverse-brand-3/50 transition-all focus-within:ring-1 hover:border-white/30"
        ),
        onMouseDown: (Y) => Y.stopPropagation(),
        onMouseUp: (Y) => Y.stopPropagation(),
        onClick: (Y) => Y.stopPropagation(),
        children: /* @__PURE__ */ S.jsx(
          Vu,
          {
            ref: v,
            onSend: o,
            onTyping: s,
            disabled: !1,
            placeholder: "Send message",
            onFocus: _,
            onBlur: M,
            beforeInput: /* @__PURE__ */ S.jsx(
              "button",
              {
                onClick: (Y) => {
                  Y.stopPropagation(), m(!p);
                },
                className: pe(
                  "mr-2 flex h-6 w-6 cursor-pointer items-center justify-center transition-colors",
                  // removed ml-2 as parent has px-2
                  p ? "text-viverse-brand-1" : "text-viverse-primary-20 hover:text-viverse-white"
                ),
                children: /* @__PURE__ */ S.jsx(jm, { width: 24, height: 24 })
              }
            ),
            afterInput: /* @__PURE__ */ S.jsxs("div", { className: "flex items-center", children: [
              /* @__PURE__ */ S.jsx("div", { className: "mr-2 h-5 w-[1px] bg-white/20" }),
              /* @__PURE__ */ S.jsx(
                "button",
                {
                  onClick: F,
                  className: pe(
                    "text-viverse-primary-20 hover:text-viverse-white mr-1 flex h-6 w-6 cursor-pointer items-center justify-center transition-colors"
                  ),
                  children: f ? /* @__PURE__ */ S.jsx(Nm, { width: 24, height: 24 }) : /* @__PURE__ */ S.jsx(km, { width: 24, height: 24 })
                }
              )
            ] })
          }
        )
      }
    ) }),
    p && /* @__PURE__ */ S.jsx("div", { className: "pointer-events-none absolute bottom-[59px]", children: /* @__PURE__ */ S.jsx(
      Am,
      {
        onSelectEmoji: (Y) => v.current?.addEmoji(Y.native),
        toggleOpen: () => m(!1)
      }
    ) })
  ] });
}
const Q6 = (l) => /* @__PURE__ */ x.createElement("svg", { width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...l }, /* @__PURE__ */ x.createElement("path", { d: "M2.01 21L23 12L2.01 3L2 10L17 12L2 14L2.01 21Z", fill: "currentColor" }));
function X6({
  messageGroups: l,
  typingText: i,
  sendMessage: o,
  sendTypingStatus: s,
  isConnected: f,
  onClose: u
}) {
  const [p, m] = x.useState(!1), v = x.useRef(null), h = x.useRef(null), { onFocus: y, onBlur: g } = Rm(!0);
  return x.useEffect(() => {
    const _ = setTimeout(() => {
      v.current?.focus();
    }, 100);
    return () => clearTimeout(_);
  }, [f]), /* @__PURE__ */ S.jsx(
    "div",
    {
      className: pe(
        "pointer-events-auto fixed inset-0 z-50 flex flex-col items-center justify-center",
        "bg-viveport-black-mask-3 transition-all duration-300"
      ),
      onWheel: (_) => _.stopPropagation(),
      onClick: () => {
        p && m(!1);
      },
      children: /* @__PURE__ */ S.jsxs(
        "div",
        {
          className: "relative mx-auto flex h-full w-full flex-col",
          onClick: (_) => _.stopPropagation(),
          onMouseDown: (_) => _.stopPropagation(),
          onMouseUp: (_) => _.stopPropagation(),
          onWheel: (_) => _.stopPropagation(),
          children: [
            /* @__PURE__ */ S.jsxs("div", { className: "relative z-30 flex h-16 shrink-0 items-center justify-center", children: [
              /* @__PURE__ */ S.jsx("h3", { className: "text-viverse-white text-2xl font-bold", children: "Chat" }),
              /* @__PURE__ */ S.jsx(
                "button",
                {
                  onClick: (_) => {
                    _.stopPropagation(), u();
                  },
                  className: "text-viverse-white pointer-events-auto absolute right-4 rounded-full p-2 transition-colors hover:bg-white/10",
                  children: /* @__PURE__ */ S.jsx(Du, { size: 24 })
                }
              ),
              /* @__PURE__ */ S.jsx("div", { className: "bg-viverse-primary-60 absolute bottom-0 left-0 right-0 mx-6 h-[2px]" })
            ] }),
            /* @__PURE__ */ S.jsx(
              "div",
              {
                className: "scrollbar-none relative w-full flex-1 overflow-y-auto px-4 min-[844px]:px-12",
                ref: h,
                children: /* @__PURE__ */ S.jsx("div", { className: "flex min-h-full flex-col justify-end", children: /* @__PURE__ */ S.jsx(
                  em,
                  {
                    messageGroups: l,
                    variant: "mobile",
                    scrollContainerRef: h
                  }
                ) })
              }
            ),
            /* @__PURE__ */ S.jsxs(
              "div",
              {
                className: pe(
                  "pointer-events-auto relative z-20 w-full shrink-0 px-4 pb-[14px] pt-2 transition-colors min-[844px]:px-12"
                ),
                children: [
                  p && /* @__PURE__ */ S.jsx("div", { className: "absolute bottom-[calc(100%-8px)] left-4 right-4 z-50 min-[844px]:left-12 min-[844px]:right-12", children: /* @__PURE__ */ S.jsx(
                    Am,
                    {
                      isMobileView: !0,
                      onSelectEmoji: (_) => v.current?.addEmoji(_.native),
                      toggleOpen: () => m(!1)
                    }
                  ) }),
                  /* @__PURE__ */ S.jsx("div", { className: "bg-viverse-primary-60 mb-[14px] h-[2px] w-full" }),
                  i && /* @__PURE__ */ S.jsx("div", { className: "mb-2 px-4 py-1", children: /* @__PURE__ */ S.jsx("p", { className: "text-viverse-white/70 animate-pulse text-[10px] italic", children: i }) }),
                  /* @__PURE__ */ S.jsx("div", { className: "bg-viveport-background-db border-viverse-primary-60 focus-within:border-viverse-brand-4 flex w-full items-center rounded-[20px] border-2 px-4 shadow-lg transition-colors", children: /* @__PURE__ */ S.jsx(
                    Vu,
                    {
                      ref: v,
                      onSend: o,
                      onTyping: s,
                      onFocus: y,
                      onBlur: g,
                      placeholder: "Send message",
                      beforeInput: /* @__PURE__ */ S.jsx(
                        "button",
                        {
                          onClick: (_) => {
                            _.stopPropagation(), m(!p);
                          },
                          className: pe(
                            "-ml-2 p-2 transition-colors",
                            p ? "text-viverse-brand-4" : "text-viverse-white/80 hover:text-viverse-white"
                          ),
                          children: /* @__PURE__ */ S.jsx(jm, { width: 24, height: 24 })
                        }
                      ),
                      afterInput: /* @__PURE__ */ S.jsx(
                        "button",
                        {
                          onClick: (_) => {
                            _.stopPropagation(), v.current?.submit();
                          },
                          className: "text-viverse-white/80 hover:text-viverse-brand-4 -mr-2 p-2 transition-colors",
                          children: /* @__PURE__ */ S.jsx(Q6, { width: 24, height: 24 })
                        }
                      )
                    }
                  ) })
                ]
              }
            )
          ]
        }
      )
    }
  );
}
const Z6 = (l) => /* @__PURE__ */ x.createElement("svg", { width: 20, height: 20, viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...l }, /* @__PURE__ */ x.createElement("path", { d: "M10 7.7591L3.70711 14.2002C3.31658 14.5999 2.68342 14.5999 2.29289 14.2002C1.90237 13.8005 1.90237 13.1524 2.29289 12.7527L8.93934 5.94968C9.52513 5.35012 10.4749 5.35012 11.0607 5.94968L17.7071 12.7527C18.0976 13.1524 18.0976 13.8005 17.7071 14.2002C17.3166 14.5999 16.6834 14.5999 16.2929 14.2002L10 7.7591Z", fill: "currentColor" }));
function K6({ onOpenChat: l, unreadCount: i = 0 }) {
  const [o, s] = x.useState(!1), f = fn((m) => m.messageGroups), u = x.useMemo(() => {
    if (f.length === 0) return null;
    const m = f[f.length - 1];
    return m.messages.length === 0 ? null : {
      senderName: m.senderName,
      text: m.messages[m.messages.length - 1].body,
      avatarSnapshot: m.avatarSnapshot,
      timestamp: m.messages[m.messages.length - 1].timestamp || Date.now()
    };
  }, [f]), p = I2(u?.timestamp || 0);
  return /* @__PURE__ */ S.jsx("div", { className: "pointer-events-none fixed bottom-2 left-1/2 z-40 -translate-x-1/2", children: /* @__PURE__ */ S.jsxs(
    "div",
    {
      className: pe(
        "pointer-events-auto w-[208px] transition-all duration-300",
        "rounded-[4px] border border-white/20 bg-black/40 backdrop-blur-md",
        "flex flex-col overflow-hidden",
        o ? "h-[94px]" : "h-[36px]"
      ),
      children: [
        /* @__PURE__ */ S.jsxs("div", { className: "flex h-[36px] flex-shrink-0 items-center justify-between px-3", children: [
          /* @__PURE__ */ S.jsxs("button", { onClick: l, className: "relative transition-opacity hover:opacity-80", children: [
            /* @__PURE__ */ S.jsx(km, { width: 20, height: 20, className: "text-viverse-white" }),
            i > 0 && /* @__PURE__ */ S.jsx("span", { className: "bg-viverse-red text-viverse-white absolute -right-1 -top-1 flex h-3 w-3 items-center justify-center rounded-full text-[8px] font-bold shadow-sm ring-1 ring-white/20", children: i > 9 ? "9+" : i })
          ] }),
          /* @__PURE__ */ S.jsx(
            "button",
            {
              onClick: () => s(!o),
              className: "outline-none transition-opacity hover:opacity-80",
              children: o ? /* @__PURE__ */ S.jsx(Nm, { width: 14, height: 14, className: "text-viverse-white" }) : /* @__PURE__ */ S.jsx(Z6, { width: 14, height: 14, className: "text-viverse-white" })
            }
          )
        ] }),
        o && /* @__PURE__ */ S.jsxs(S.Fragment, { children: [
          /* @__PURE__ */ S.jsx("div", { className: "mx-3 border-t border-white/10" }),
          /* @__PURE__ */ S.jsx("div", { className: "animate-in fade-in flex flex-col justify-start px-3 pb-2 pt-2 duration-300", children: u ? /* @__PURE__ */ S.jsxs(S.Fragment, { children: [
            /* @__PURE__ */ S.jsxs("div", { className: "mb-1 flex items-center gap-1", children: [
              /* @__PURE__ */ S.jsxs(Uu, { className: "h-3.5 w-3.5 rounded-full", children: [
                /* @__PURE__ */ S.jsx(
                  Lu,
                  {
                    className: "bg-viverse-primary-40 object-cover",
                    src: u.avatarSnapshot
                  }
                ),
                /* @__PURE__ */ S.jsx(Bu, { className: "text-[6px]", children: u.senderName?.[0] })
              ] }),
              /* @__PURE__ */ S.jsxs("div", { className: "flex flex-1 items-center justify-between overflow-hidden", children: [
                /* @__PURE__ */ S.jsx("span", { className: "text-viverse-white/60 truncate text-[10px] font-medium", children: u.senderName }),
                /* @__PURE__ */ S.jsx("span", { className: "text-viverse-white/40 ml-1 shrink-0 text-[8px]", children: p })
              ] })
            ] }),
            /* @__PURE__ */ S.jsx("p", { className: "text-viverse-white line-clamp-2 text-[10px] leading-tight", children: u.text })
          ] }) : null })
        ] })
      ]
    }
  ) });
}
function J6() {
  const l = fn((U) => U.isChatPanelOpen), i = fn((U) => U.messageGroups), o = fn((U) => U.typingUsers), s = fn((U) => U.unreadCount), f = fn((U) => U.openChatPanel), u = fn((U) => U.closeChatPanel), { enabledConfig: p } = wt(), m = Hu(), v = m.displayName || "Guest", h = m.snapshot, { sendMessage: y, sendTypingStatus: g, isConnected: _ } = w5(
    v,
    h
  ), { isMobileUI: M } = C5();
  if (!p.chatUi) return null;
  const j = Array.from(o.values()), A = j.length > 0 ? `${j.join(", ")} ${j.length > 1 ? "are" : "is"} typing...` : null, O = {
    messageGroups: i,
    typingText: A,
    sendMessage: y,
    sendTypingStatus: g,
    isConnected: _
  };
  return /* @__PURE__ */ S.jsxs(S.Fragment, { children: [
    !M && /* @__PURE__ */ S.jsx(Y6, { ...O }),
    M && /* @__PURE__ */ S.jsx("div", { className: "pointer-events-auto", children: l ? /* @__PURE__ */ S.jsx(X6, { ...O, onClose: u }) : /* @__PURE__ */ S.jsx(K6, { onOpenChat: f, unreadCount: s }) })
  ] });
}
function P6({ chatUi: l }) {
  return /* @__PURE__ */ S.jsxs(J2, { className: "items-end", children: [
    /* @__PURE__ */ S.jsx("div", { className: "h-full", children: l && /* @__PURE__ */ S.jsx(J6, {}) }),
    /* @__PURE__ */ S.jsx("div", { className: "pointer-events-auto", children: /* @__PURE__ */ S.jsx(y5, {}) })
  ] });
}
function W6() {
  const { enabledConfig: l } = wt();
  return /* @__PURE__ */ S.jsx(W2, { className: "justify-end", children: /* @__PURE__ */ S.jsx(P6, { chatUi: l.chatUi }) });
}
function I6({
  viverseApp: l,
  ...i
}) {
  return /* @__PURE__ */ S.jsxs(tg, { viverseApp: l, ...i, children: [
    /* @__PURE__ */ S.jsxs(db, { children: [
      /* @__PURE__ */ S.jsx(m5, {}),
      /* @__PURE__ */ S.jsx(W6, {})
    ] }),
    /* @__PURE__ */ S.jsx(fb, {}),
    /* @__PURE__ */ S.jsx(Xb, {})
  ] });
}
function F6() {
  const l = yo("ui", "/ui.css");
  return new Promise((i) => {
    if (typeof document > "u") {
      i();
      return;
    }
    if (document.getElementById("viverse-ui-css")) {
      i();
      return;
    }
    const o = document.createElement("link");
    o.id = "viverse-ui-css", o.rel = "stylesheet", o.href = l, o.onload = () => i(), o.onerror = () => {
      Vh.error("[Toolkit UI] Failed to load UI CSS"), i();
    }, document.head.appendChild(o);
  });
}
const ey = () => {
  const l = `
    @font-face {
      font-family: 'Roboto';
      src: local('Roboto'), url('${yo("ui", "/fonts/roboto-regular.woff2")}') format('woff2');
      font-weight: normal;
    }
    
    @font-face {
      font-family: 'Roboto';
      src: local('Roboto'), url('${yo("ui", "/fonts/roboto-bold.woff2")}') format('woff2');
      font-weight: bold;
    }
  `, i = document.createElement("style");
  i.textContent = l, document.head.appendChild(i);
};
function ty() {
  const l = document.createElement("div");
  return l.id = "viverse-ui-root", l.style.inset = "0", l.style.pointerEvents = "auto", l.style.zIndex = "10", l.style.position = "fixed", l.style.pointerEvents = "none", document.body.appendChild(l), l;
}
const ny = async ({
  viverseApp: l,
  rootElement: i,
  ...o
}) => {
  await F6(), ey();
  const s = i;
  eg.createRoot(s).render(/* @__PURE__ */ S.jsx(I6, { viverseApp: l, ...o }));
};
class cy extends Vv {
  static systemName = Rl.Ui;
  uiRootElement;
  enabledConfig;
  _autoOpenQuestPanel;
  constructor(i, o) {
    super(i), this.uiRootElement = o?.rootElement || ty(), this.enabledConfig = this._getDefaultEnabledUi(o?.enabledConfig), this._autoOpenQuestPanel = o?.autoOpenQuestPanel ?? !0;
  }
  _getDefaultEnabledUi(i) {
    return {
      questUi: !0,
      enterVrButton: !0,
      chatUi: !0,
      audioChatUi: !0,
      ...i
    };
  }
  start() {
    ny({
      viverseApp: this.viverseApp,
      rootElement: this.uiRootElement,
      enabledConfig: this.enabledConfig,
      autoOpenQuestPanel: this._autoOpenQuestPanel
    });
  }
}
export {
  cy as UiSystem
};
