module.exports = (function (e) {
  var t = {};
  function n(r) {
    if (t[r]) return t[r].exports;
    var i = (t[r] = { i: r, l: !1, exports: {} });
    return e[r].call(i.exports, i, i.exports, n), (i.l = !0), i.exports;
  }
  return (
    (n.m = e),
    (n.c = t),
    (n.d = function (e, t, r) {
      n.o(e, t) || Object.defineProperty(e, t, { enumerable: !0, get: r });
    }),
    (n.r = function (e) {
      "undefined" != typeof Symbol &&
        Symbol.toStringTag &&
        Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }),
        Object.defineProperty(e, "__esModule", { value: !0 });
    }),
    (n.t = function (e, t) {
      if ((1 & t && (e = n(e)), 8 & t)) return e;
      if (4 & t && "object" == typeof e && e && e.__esModule) return e;
      var r = Object.create(null);
      if (
        (n.r(r),
        Object.defineProperty(r, "default", { enumerable: !0, value: e }),
        2 & t && "string" != typeof e)
      )
        for (var i in e)
          n.d(
            r,
            i,
            function (t) {
              return e[t];
            }.bind(null, i)
          );
      return r;
    }),
    (n.n = function (e) {
      var t =
        e && e.__esModule
          ? function () {
              return e.default;
            }
          : function () {
              return e;
            };
      return n.d(t, "a", t), t;
    }),
    (n.o = function (e, t) {
      return Object.prototype.hasOwnProperty.call(e, t);
    }),
    (n.p = ""),
    n((n.s = 314))
  );
})([
  function (e, t, n) {
    "use strict";
    e.exports = n(154);
  },
  function (e, t) {
    e.exports = require("path");
  },
  function (e, t, n) {
    "use strict";
    Object.defineProperty(t, "__esModule", { value: !0 });
    var r = n(224);
    t.GitProcess = r.GitProcess;
    var i = n(108);
    (t.GitError = i.GitError),
      (t.RepositoryDoesNotExistErrorCode = i.RepositoryDoesNotExistErrorCode),
      (t.GitNotFoundErrorCode = i.GitNotFoundErrorCode);
  },
  function (e, t, n) {
    var r;
    /*!
  Copyright (c) 2016 Jed Watson.
  Licensed under the MIT License (MIT), see
  http://jedwatson.github.io/classnames
*/ !(function () {
      "use strict";
      var n = {}.hasOwnProperty;
      function i() {
        for (var e = [], t = 0; t < arguments.length; t++) {
          var r = arguments[t];
          if (r) {
            var o = typeof r;
            if ("string" === o || "number" === o) e.push(r);
            else if (Array.isArray(r)) e.push(i.apply(null, r));
            else if ("object" === o)
              for (var s in r) n.call(r, s) && r[s] && e.push(s);
          }
        }
        return e.join(" ");
      }
      e.exports
        ? (e.exports = i)
        : void 0 ===
            (r = function () {
              return i;
            }.apply(t, [])) || (e.exports = r);
    })();
  },
  function (e, t, n) {
    "use strict";
    e.exports = Object.assign(
      {},
      n(99),
      n(101),
      n(105),
      n(179),
      n(181),
      n(187),
      n(21),
      n(194),
      n(195),
      n(196),
      n(24),
      n(49)
    );
    const r = n(8);
    Object.getOwnPropertyDescriptor(r, "promises") &&
      Object.defineProperty(e.exports, "promises", { get: () => r.promises });
  },
  function (e, t) {
    e.exports = require("electron");
  },
  function (e, t, n) {
    "use strict";
    var r =
        (this && this.__createBinding) ||
        (Object.create
          ? function (e, t, n, r) {
              void 0 === r && (r = n),
                Object.defineProperty(e, r, {
                  enumerable: !0,
                  get: function () {
                    return t[n];
                  },
                });
            }
          : function (e, t, n, r) {
              void 0 === r && (r = n), (e[r] = t[n]);
            }),
      i =
        (this && this.__exportStar) ||
        function (e, t) {
          for (var n in e) "default" === n || t.hasOwnProperty(n) || r(t, e, n);
        };
    Object.defineProperty(t, "__esModule", { value: !0 }), i(n(222), t);
  },
  function (e, t) {
    e.exports = require("child_process");
  },
  function (e, t) {
    e.exports = require("fs");
  },
  function (e, t) {
    e.exports = require("url");
  },
  ,
  function (e, t, n) {
    (function () {
      (t.Emitter = n(158)),
        (t.Disposable = n(63)),
        (t.CompositeDisposable = n(159));
    }.call(this));
  },
  function (e, t, n) {
    (function (e) {
      e.exports = (function () {
        "use strict";
        var t, n;
        function r() {
          return t.apply(null, arguments);
        }
        function i(e) {
          return (
            e instanceof Array ||
            "[object Array]" === Object.prototype.toString.call(e)
          );
        }
        function o(e) {
          return (
            null != e && "[object Object]" === Object.prototype.toString.call(e)
          );
        }
        function s(e) {
          return void 0 === e;
        }
        function a(e) {
          return (
            "number" == typeof e ||
            "[object Number]" === Object.prototype.toString.call(e)
          );
        }
        function l(e) {
          return (
            e instanceof Date ||
            "[object Date]" === Object.prototype.toString.call(e)
          );
        }
        function c(e, t) {
          var n,
            r = [];
          for (n = 0; n < e.length; ++n) r.push(t(e[n], n));
          return r;
        }
        function u(e, t) {
          return Object.prototype.hasOwnProperty.call(e, t);
        }
        function h(e, t) {
          for (var n in t) u(t, n) && (e[n] = t[n]);
          return (
            u(t, "toString") && (e.toString = t.toString),
            u(t, "valueOf") && (e.valueOf = t.valueOf),
            e
          );
        }
        function d(e, t, n, r) {
          return Et(e, t, n, r, !0).utc();
        }
        function p(e) {
          return (
            null == e._pf &&
              (e._pf = {
                empty: !1,
                unusedTokens: [],
                unusedInput: [],
                overflow: -2,
                charsLeftOver: 0,
                nullInput: !1,
                invalidMonth: null,
                invalidFormat: !1,
                userInvalidated: !1,
                iso: !1,
                parsedDateParts: [],
                meridiem: null,
                rfc2822: !1,
                weekdayMismatch: !1,
              }),
            e._pf
          );
        }
        function f(e) {
          if (null == e._isValid) {
            var t = p(e),
              r = n.call(t.parsedDateParts, function (e) {
                return null != e;
              }),
              i =
                !isNaN(e._d.getTime()) &&
                t.overflow < 0 &&
                !t.empty &&
                !t.invalidMonth &&
                !t.invalidWeekday &&
                !t.weekdayMismatch &&
                !t.nullInput &&
                !t.invalidFormat &&
                !t.userInvalidated &&
                (!t.meridiem || (t.meridiem && r));
            if (
              (e._strict &&
                (i =
                  i &&
                  0 === t.charsLeftOver &&
                  0 === t.unusedTokens.length &&
                  void 0 === t.bigHour),
              null != Object.isFrozen && Object.isFrozen(e))
            )
              return i;
            e._isValid = i;
          }
          return e._isValid;
        }
        function m(e) {
          var t = d(NaN);
          return null != e ? h(p(t), e) : (p(t).userInvalidated = !0), t;
        }
        n = Array.prototype.some
          ? Array.prototype.some
          : function (e) {
              for (var t = Object(this), n = t.length >>> 0, r = 0; r < n; r++)
                if (r in t && e.call(this, t[r], r, t)) return !0;
              return !1;
            };
        var g = (r.momentProperties = []);
        function y(e, t) {
          var n, r, i;
          if (
            (s(t._isAMomentObject) || (e._isAMomentObject = t._isAMomentObject),
            s(t._i) || (e._i = t._i),
            s(t._f) || (e._f = t._f),
            s(t._l) || (e._l = t._l),
            s(t._strict) || (e._strict = t._strict),
            s(t._tzm) || (e._tzm = t._tzm),
            s(t._isUTC) || (e._isUTC = t._isUTC),
            s(t._offset) || (e._offset = t._offset),
            s(t._pf) || (e._pf = p(t)),
            s(t._locale) || (e._locale = t._locale),
            g.length > 0)
          )
            for (n = 0; n < g.length; n++) s((i = t[(r = g[n])])) || (e[r] = i);
          return e;
        }
        var v = !1;
        function w(e) {
          y(this, e),
            (this._d = new Date(null != e._d ? e._d.getTime() : NaN)),
            this.isValid() || (this._d = new Date(NaN)),
            !1 === v && ((v = !0), r.updateOffset(this), (v = !1));
        }
        function b(e) {
          return e instanceof w || (null != e && null != e._isAMomentObject);
        }
        function S(e) {
          return e < 0 ? Math.ceil(e) || 0 : Math.floor(e);
        }
        function C(e) {
          var t = +e,
            n = 0;
          return 0 !== t && isFinite(t) && (n = S(t)), n;
        }
        function E(e, t, n) {
          var r,
            i = Math.min(e.length, t.length),
            o = Math.abs(e.length - t.length),
            s = 0;
          for (r = 0; r < i; r++)
            ((n && e[r] !== t[r]) || (!n && C(e[r]) !== C(t[r]))) && s++;
          return s + o;
        }
        function k(e) {
          !1 === r.suppressDeprecationWarnings &&
            "undefined" != typeof console &&
            console.warn &&
            console.warn("Deprecation warning: " + e);
        }
        function x(e, t) {
          var n = !0;
          return h(function () {
            if (
              (null != r.deprecationHandler && r.deprecationHandler(null, e), n)
            ) {
              for (var i, o = [], s = 0; s < arguments.length; s++) {
                if (((i = ""), "object" == typeof arguments[s])) {
                  for (var a in ((i += "\n[" + s + "] "), arguments[0]))
                    i += a + ": " + arguments[0][a] + ", ";
                  i = i.slice(0, -2);
                } else i = arguments[s];
                o.push(i);
              }
              k(
                e +
                  "\nArguments: " +
                  Array.prototype.slice.call(o).join("") +
                  "\n" +
                  new Error().stack
              ),
                (n = !1);
            }
            return t.apply(this, arguments);
          }, t);
        }
        var R,
          T = {};
        function D(e, t) {
          null != r.deprecationHandler && r.deprecationHandler(e, t),
            T[e] || (k(t), (T[e] = !0));
        }
        function A(e) {
          return (
            e instanceof Function ||
            "[object Function]" === Object.prototype.toString.call(e)
          );
        }
        function _(e, t) {
          var n,
            r = h({}, e);
          for (n in t)
            u(t, n) &&
              (o(e[n]) && o(t[n])
                ? ((r[n] = {}), h(r[n], e[n]), h(r[n], t[n]))
                : null != t[n]
                ? (r[n] = t[n])
                : delete r[n]);
          for (n in e) u(e, n) && !u(t, n) && o(e[n]) && (r[n] = h({}, r[n]));
          return r;
        }
        function M(e) {
          null != e && this.set(e);
        }
        (r.suppressDeprecationWarnings = !1),
          (r.deprecationHandler = null),
          (R = Object.keys
            ? Object.keys
            : function (e) {
                var t,
                  n = [];
                for (t in e) u(e, t) && n.push(t);
                return n;
              });
        var P = {};
        function I(e, t) {
          var n = e.toLowerCase();
          P[n] = P[n + "s"] = P[t] = e;
        }
        function O(e) {
          return "string" == typeof e ? P[e] || P[e.toLowerCase()] : void 0;
        }
        function L(e) {
          var t,
            n,
            r = {};
          for (n in e) u(e, n) && (t = O(n)) && (r[t] = e[n]);
          return r;
        }
        var F = {};
        function N(e, t) {
          F[e] = t;
        }
        function B(e, t, n) {
          var r = "" + Math.abs(e),
            i = t - r.length;
          return (
            (e >= 0 ? (n ? "+" : "") : "-") +
            Math.pow(10, Math.max(0, i)).toString().substr(1) +
            r
          );
        }
        var H = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,
          z = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,
          U = {},
          W = {};
        function j(e, t, n, r) {
          var i = r;
          "string" == typeof r &&
            (i = function () {
              return this[r]();
            }),
            e && (W[e] = i),
            t &&
              (W[t[0]] = function () {
                return B(i.apply(this, arguments), t[1], t[2]);
              }),
            n &&
              (W[n] = function () {
                return this.localeData().ordinal(i.apply(this, arguments), e);
              });
        }
        function V(e, t) {
          return e.isValid()
            ? ((t = G(t, e.localeData())),
              (U[t] =
                U[t] ||
                (function (e) {
                  var t,
                    n,
                    r,
                    i = e.match(H);
                  for (t = 0, n = i.length; t < n; t++)
                    W[i[t]]
                      ? (i[t] = W[i[t]])
                      : (i[t] = (r = i[t]).match(/\[[\s\S]/)
                          ? r.replace(/^\[|\]$/g, "")
                          : r.replace(/\\/g, ""));
                  return function (t) {
                    var r,
                      o = "";
                    for (r = 0; r < n; r++)
                      o += A(i[r]) ? i[r].call(t, e) : i[r];
                    return o;
                  };
                })(t)),
              U[t](e))
            : e.localeData().invalidDate();
        }
        function G(e, t) {
          var n = 5;
          function r(e) {
            return t.longDateFormat(e) || e;
          }
          for (z.lastIndex = 0; n >= 0 && z.test(e); )
            (e = e.replace(z, r)), (z.lastIndex = 0), (n -= 1);
          return e;
        }
        var $ = /\d/,
          q = /\d\d/,
          K = /\d{3}/,
          Y = /\d{4}/,
          Q = /[+-]?\d{6}/,
          Z = /\d\d?/,
          X = /\d\d\d\d?/,
          J = /\d\d\d\d\d\d?/,
          ee = /\d{1,3}/,
          te = /\d{1,4}/,
          ne = /[+-]?\d{1,6}/,
          re = /\d+/,
          ie = /[+-]?\d+/,
          oe = /Z|[+-]\d\d:?\d\d/gi,
          se = /Z|[+-]\d\d(?::?\d\d)?/gi,
          ae = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,
          le = {};
        function ce(e, t, n) {
          le[e] = A(t)
            ? t
            : function (e, r) {
                return e && n ? n : t;
              };
        }
        function ue(e, t) {
          return u(le, e)
            ? le[e](t._strict, t._locale)
            : new RegExp(
                he(
                  e
                    .replace("\\", "")
                    .replace(
                      /\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,
                      function (e, t, n, r, i) {
                        return t || n || r || i;
                      }
                    )
                )
              );
        }
        function he(e) {
          return e.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&");
        }
        var de = {};
        function pe(e, t) {
          var n,
            r = t;
          for (
            "string" == typeof e && (e = [e]),
              a(t) &&
                (r = function (e, n) {
                  n[t] = C(e);
                }),
              n = 0;
            n < e.length;
            n++
          )
            de[e[n]] = r;
        }
        function fe(e, t) {
          pe(e, function (e, n, r, i) {
            (r._w = r._w || {}), t(e, r._w, r, i);
          });
        }
        function me(e, t, n) {
          null != t && u(de, e) && de[e](t, n._a, n, e);
        }
        function ge(e) {
          return ye(e) ? 366 : 365;
        }
        function ye(e) {
          return (e % 4 == 0 && e % 100 != 0) || e % 400 == 0;
        }
        j("Y", 0, 0, function () {
          var e = this.year();
          return e <= 9999 ? "" + e : "+" + e;
        }),
          j(0, ["YY", 2], 0, function () {
            return this.year() % 100;
          }),
          j(0, ["YYYY", 4], 0, "year"),
          j(0, ["YYYYY", 5], 0, "year"),
          j(0, ["YYYYYY", 6, !0], 0, "year"),
          I("year", "y"),
          N("year", 1),
          ce("Y", ie),
          ce("YY", Z, q),
          ce("YYYY", te, Y),
          ce("YYYYY", ne, Q),
          ce("YYYYYY", ne, Q),
          pe(["YYYYY", "YYYYYY"], 0),
          pe("YYYY", function (e, t) {
            t[0] = 2 === e.length ? r.parseTwoDigitYear(e) : C(e);
          }),
          pe("YY", function (e, t) {
            t[0] = r.parseTwoDigitYear(e);
          }),
          pe("Y", function (e, t) {
            t[0] = parseInt(e, 10);
          }),
          (r.parseTwoDigitYear = function (e) {
            return C(e) + (C(e) > 68 ? 1900 : 2e3);
          });
        var ve,
          we = be("FullYear", !0);
        function be(e, t) {
          return function (n) {
            return null != n
              ? (Ce(this, e, n), r.updateOffset(this, t), this)
              : Se(this, e);
          };
        }
        function Se(e, t) {
          return e.isValid()
            ? e._d["get" + (e._isUTC ? "UTC" : "") + t]()
            : NaN;
        }
        function Ce(e, t, n) {
          e.isValid() &&
            !isNaN(n) &&
            ("FullYear" === t &&
            ye(e.year()) &&
            1 === e.month() &&
            29 === e.date()
              ? e._d["set" + (e._isUTC ? "UTC" : "") + t](
                  n,
                  e.month(),
                  Ee(n, e.month())
                )
              : e._d["set" + (e._isUTC ? "UTC" : "") + t](n));
        }
        function Ee(e, t) {
          if (isNaN(e) || isNaN(t)) return NaN;
          var n,
            r = ((t % (n = 12)) + n) % n;
          return (
            (e += (t - r) / 12),
            1 === r ? (ye(e) ? 29 : 28) : 31 - ((r % 7) % 2)
          );
        }
        (ve = Array.prototype.indexOf
          ? Array.prototype.indexOf
          : function (e) {
              var t;
              for (t = 0; t < this.length; ++t) if (this[t] === e) return t;
              return -1;
            }),
          j("M", ["MM", 2], "Mo", function () {
            return this.month() + 1;
          }),
          j("MMM", 0, 0, function (e) {
            return this.localeData().monthsShort(this, e);
          }),
          j("MMMM", 0, 0, function (e) {
            return this.localeData().months(this, e);
          }),
          I("month", "M"),
          N("month", 8),
          ce("M", Z),
          ce("MM", Z, q),
          ce("MMM", function (e, t) {
            return t.monthsShortRegex(e);
          }),
          ce("MMMM", function (e, t) {
            return t.monthsRegex(e);
          }),
          pe(["M", "MM"], function (e, t) {
            t[1] = C(e) - 1;
          }),
          pe(["MMM", "MMMM"], function (e, t, n, r) {
            var i = n._locale.monthsParse(e, r, n._strict);
            null != i ? (t[1] = i) : (p(n).invalidMonth = e);
          });
        var ke = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,
          xe = "January_February_March_April_May_June_July_August_September_October_November_December".split(
            "_"
          ),
          Re = "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");
        function Te(e, t, n) {
          var r,
            i,
            o,
            s = e.toLocaleLowerCase();
          if (!this._monthsParse)
            for (
              this._monthsParse = [],
                this._longMonthsParse = [],
                this._shortMonthsParse = [],
                r = 0;
              r < 12;
              ++r
            )
              (o = d([2e3, r])),
                (this._shortMonthsParse[r] = this.monthsShort(
                  o,
                  ""
                ).toLocaleLowerCase()),
                (this._longMonthsParse[r] = this.months(
                  o,
                  ""
                ).toLocaleLowerCase());
          return n
            ? "MMM" === t
              ? -1 !== (i = ve.call(this._shortMonthsParse, s))
                ? i
                : null
              : -1 !== (i = ve.call(this._longMonthsParse, s))
              ? i
              : null
            : "MMM" === t
            ? -1 !== (i = ve.call(this._shortMonthsParse, s)) ||
              -1 !== (i = ve.call(this._longMonthsParse, s))
              ? i
              : null
            : -1 !== (i = ve.call(this._longMonthsParse, s)) ||
              -1 !== (i = ve.call(this._shortMonthsParse, s))
            ? i
            : null;
        }
        function De(e, t) {
          var n;
          if (!e.isValid()) return e;
          if ("string" == typeof t)
            if (/^\d+$/.test(t)) t = C(t);
            else if (!a((t = e.localeData().monthsParse(t)))) return e;
          return (
            (n = Math.min(e.date(), Ee(e.year(), t))),
            e._d["set" + (e._isUTC ? "UTC" : "") + "Month"](t, n),
            e
          );
        }
        function Ae(e) {
          return null != e
            ? (De(this, e), r.updateOffset(this, !0), this)
            : Se(this, "Month");
        }
        var _e = ae,
          Me = ae;
        function Pe() {
          function e(e, t) {
            return t.length - e.length;
          }
          var t,
            n,
            r = [],
            i = [],
            o = [];
          for (t = 0; t < 12; t++)
            (n = d([2e3, t])),
              r.push(this.monthsShort(n, "")),
              i.push(this.months(n, "")),
              o.push(this.months(n, "")),
              o.push(this.monthsShort(n, ""));
          for (r.sort(e), i.sort(e), o.sort(e), t = 0; t < 12; t++)
            (r[t] = he(r[t])), (i[t] = he(i[t]));
          for (t = 0; t < 24; t++) o[t] = he(o[t]);
          (this._monthsRegex = new RegExp("^(" + o.join("|") + ")", "i")),
            (this._monthsShortRegex = this._monthsRegex),
            (this._monthsStrictRegex = new RegExp(
              "^(" + i.join("|") + ")",
              "i"
            )),
            (this._monthsShortStrictRegex = new RegExp(
              "^(" + r.join("|") + ")",
              "i"
            ));
        }
        function Ie(e, t, n, r, i, o, s) {
          var a;
          return (
            e < 100 && e >= 0
              ? ((a = new Date(e + 400, t, n, r, i, o, s)),
                isFinite(a.getFullYear()) && a.setFullYear(e))
              : (a = new Date(e, t, n, r, i, o, s)),
            a
          );
        }
        function Oe(e) {
          var t;
          if (e < 100 && e >= 0) {
            var n = Array.prototype.slice.call(arguments);
            (n[0] = e + 400),
              (t = new Date(Date.UTC.apply(null, n))),
              isFinite(t.getUTCFullYear()) && t.setUTCFullYear(e);
          } else t = new Date(Date.UTC.apply(null, arguments));
          return t;
        }
        function Le(e, t, n) {
          var r = 7 + t - n;
          return (-(7 + Oe(e, 0, r).getUTCDay() - t) % 7) + r - 1;
        }
        function Fe(e, t, n, r, i) {
          var o,
            s,
            a = 1 + 7 * (t - 1) + ((7 + n - r) % 7) + Le(e, r, i);
          return (
            a <= 0
              ? (s = ge((o = e - 1)) + a)
              : a > ge(e)
              ? ((o = e + 1), (s = a - ge(e)))
              : ((o = e), (s = a)),
            { year: o, dayOfYear: s }
          );
        }
        function Ne(e, t, n) {
          var r,
            i,
            o = Le(e.year(), t, n),
            s = Math.floor((e.dayOfYear() - o - 1) / 7) + 1;
          return (
            s < 1
              ? (r = s + Be((i = e.year() - 1), t, n))
              : s > Be(e.year(), t, n)
              ? ((r = s - Be(e.year(), t, n)), (i = e.year() + 1))
              : ((i = e.year()), (r = s)),
            { week: r, year: i }
          );
        }
        function Be(e, t, n) {
          var r = Le(e, t, n),
            i = Le(e + 1, t, n);
          return (ge(e) - r + i) / 7;
        }
        function He(e, t) {
          return e.slice(t, 7).concat(e.slice(0, t));
        }
        j("w", ["ww", 2], "wo", "week"),
          j("W", ["WW", 2], "Wo", "isoWeek"),
          I("week", "w"),
          I("isoWeek", "W"),
          N("week", 5),
          N("isoWeek", 5),
          ce("w", Z),
          ce("ww", Z, q),
          ce("W", Z),
          ce("WW", Z, q),
          fe(["w", "ww", "W", "WW"], function (e, t, n, r) {
            t[r.substr(0, 1)] = C(e);
          }),
          j("d", 0, "do", "day"),
          j("dd", 0, 0, function (e) {
            return this.localeData().weekdaysMin(this, e);
          }),
          j("ddd", 0, 0, function (e) {
            return this.localeData().weekdaysShort(this, e);
          }),
          j("dddd", 0, 0, function (e) {
            return this.localeData().weekdays(this, e);
          }),
          j("e", 0, 0, "weekday"),
          j("E", 0, 0, "isoWeekday"),
          I("day", "d"),
          I("weekday", "e"),
          I("isoWeekday", "E"),
          N("day", 11),
          N("weekday", 11),
          N("isoWeekday", 11),
          ce("d", Z),
          ce("e", Z),
          ce("E", Z),
          ce("dd", function (e, t) {
            return t.weekdaysMinRegex(e);
          }),
          ce("ddd", function (e, t) {
            return t.weekdaysShortRegex(e);
          }),
          ce("dddd", function (e, t) {
            return t.weekdaysRegex(e);
          }),
          fe(["dd", "ddd", "dddd"], function (e, t, n, r) {
            var i = n._locale.weekdaysParse(e, r, n._strict);
            null != i ? (t.d = i) : (p(n).invalidWeekday = e);
          }),
          fe(["d", "e", "E"], function (e, t, n, r) {
            t[r] = C(e);
          });
        var ze = "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split(
            "_"
          ),
          Ue = "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),
          We = "Su_Mo_Tu_We_Th_Fr_Sa".split("_");
        function je(e, t, n) {
          var r,
            i,
            o,
            s = e.toLocaleLowerCase();
          if (!this._weekdaysParse)
            for (
              this._weekdaysParse = [],
                this._shortWeekdaysParse = [],
                this._minWeekdaysParse = [],
                r = 0;
              r < 7;
              ++r
            )
              (o = d([2e3, 1]).day(r)),
                (this._minWeekdaysParse[r] = this.weekdaysMin(
                  o,
                  ""
                ).toLocaleLowerCase()),
                (this._shortWeekdaysParse[r] = this.weekdaysShort(
                  o,
                  ""
                ).toLocaleLowerCase()),
                (this._weekdaysParse[r] = this.weekdays(
                  o,
                  ""
                ).toLocaleLowerCase());
          return n
            ? "dddd" === t
              ? -1 !== (i = ve.call(this._weekdaysParse, s))
                ? i
                : null
              : "ddd" === t
              ? -1 !== (i = ve.call(this._shortWeekdaysParse, s))
                ? i
                : null
              : -1 !== (i = ve.call(this._minWeekdaysParse, s))
              ? i
              : null
            : "dddd" === t
            ? -1 !== (i = ve.call(this._weekdaysParse, s)) ||
              -1 !== (i = ve.call(this._shortWeekdaysParse, s)) ||
              -1 !== (i = ve.call(this._minWeekdaysParse, s))
              ? i
              : null
            : "ddd" === t
            ? -1 !== (i = ve.call(this._shortWeekdaysParse, s)) ||
              -1 !== (i = ve.call(this._weekdaysParse, s)) ||
              -1 !== (i = ve.call(this._minWeekdaysParse, s))
              ? i
              : null
            : -1 !== (i = ve.call(this._minWeekdaysParse, s)) ||
              -1 !== (i = ve.call(this._weekdaysParse, s)) ||
              -1 !== (i = ve.call(this._shortWeekdaysParse, s))
            ? i
            : null;
        }
        var Ve = ae,
          Ge = ae,
          $e = ae;
        function qe() {
          function e(e, t) {
            return t.length - e.length;
          }
          var t,
            n,
            r,
            i,
            o,
            s = [],
            a = [],
            l = [],
            c = [];
          for (t = 0; t < 7; t++)
            (n = d([2e3, 1]).day(t)),
              (r = this.weekdaysMin(n, "")),
              (i = this.weekdaysShort(n, "")),
              (o = this.weekdays(n, "")),
              s.push(r),
              a.push(i),
              l.push(o),
              c.push(r),
              c.push(i),
              c.push(o);
          for (s.sort(e), a.sort(e), l.sort(e), c.sort(e), t = 0; t < 7; t++)
            (a[t] = he(a[t])), (l[t] = he(l[t])), (c[t] = he(c[t]));
          (this._weekdaysRegex = new RegExp("^(" + c.join("|") + ")", "i")),
            (this._weekdaysShortRegex = this._weekdaysRegex),
            (this._weekdaysMinRegex = this._weekdaysRegex),
            (this._weekdaysStrictRegex = new RegExp(
              "^(" + l.join("|") + ")",
              "i"
            )),
            (this._weekdaysShortStrictRegex = new RegExp(
              "^(" + a.join("|") + ")",
              "i"
            )),
            (this._weekdaysMinStrictRegex = new RegExp(
              "^(" + s.join("|") + ")",
              "i"
            ));
        }
        function Ke() {
          return this.hours() % 12 || 12;
        }
        function Ye(e, t) {
          j(e, 0, 0, function () {
            return this.localeData().meridiem(this.hours(), this.minutes(), t);
          });
        }
        function Qe(e, t) {
          return t._meridiemParse;
        }
        j("H", ["HH", 2], 0, "hour"),
          j("h", ["hh", 2], 0, Ke),
          j("k", ["kk", 2], 0, function () {
            return this.hours() || 24;
          }),
          j("hmm", 0, 0, function () {
            return "" + Ke.apply(this) + B(this.minutes(), 2);
          }),
          j("hmmss", 0, 0, function () {
            return (
              "" + Ke.apply(this) + B(this.minutes(), 2) + B(this.seconds(), 2)
            );
          }),
          j("Hmm", 0, 0, function () {
            return "" + this.hours() + B(this.minutes(), 2);
          }),
          j("Hmmss", 0, 0, function () {
            return (
              "" + this.hours() + B(this.minutes(), 2) + B(this.seconds(), 2)
            );
          }),
          Ye("a", !0),
          Ye("A", !1),
          I("hour", "h"),
          N("hour", 13),
          ce("a", Qe),
          ce("A", Qe),
          ce("H", Z),
          ce("h", Z),
          ce("k", Z),
          ce("HH", Z, q),
          ce("hh", Z, q),
          ce("kk", Z, q),
          ce("hmm", X),
          ce("hmmss", J),
          ce("Hmm", X),
          ce("Hmmss", J),
          pe(["H", "HH"], 3),
          pe(["k", "kk"], function (e, t, n) {
            var r = C(e);
            t[3] = 24 === r ? 0 : r;
          }),
          pe(["a", "A"], function (e, t, n) {
            (n._isPm = n._locale.isPM(e)), (n._meridiem = e);
          }),
          pe(["h", "hh"], function (e, t, n) {
            (t[3] = C(e)), (p(n).bigHour = !0);
          }),
          pe("hmm", function (e, t, n) {
            var r = e.length - 2;
            (t[3] = C(e.substr(0, r))),
              (t[4] = C(e.substr(r))),
              (p(n).bigHour = !0);
          }),
          pe("hmmss", function (e, t, n) {
            var r = e.length - 4,
              i = e.length - 2;
            (t[3] = C(e.substr(0, r))),
              (t[4] = C(e.substr(r, 2))),
              (t[5] = C(e.substr(i))),
              (p(n).bigHour = !0);
          }),
          pe("Hmm", function (e, t, n) {
            var r = e.length - 2;
            (t[3] = C(e.substr(0, r))), (t[4] = C(e.substr(r)));
          }),
          pe("Hmmss", function (e, t, n) {
            var r = e.length - 4,
              i = e.length - 2;
            (t[3] = C(e.substr(0, r))),
              (t[4] = C(e.substr(r, 2))),
              (t[5] = C(e.substr(i)));
          });
        var Ze,
          Xe = be("Hours", !0),
          Je = {
            calendar: {
              sameDay: "[Today at] LT",
              nextDay: "[Tomorrow at] LT",
              nextWeek: "dddd [at] LT",
              lastDay: "[Yesterday at] LT",
              lastWeek: "[Last] dddd [at] LT",
              sameElse: "L",
            },
            longDateFormat: {
              LTS: "h:mm:ss A",
              LT: "h:mm A",
              L: "MM/DD/YYYY",
              LL: "MMMM D, YYYY",
              LLL: "MMMM D, YYYY h:mm A",
              LLLL: "dddd, MMMM D, YYYY h:mm A",
            },
            invalidDate: "Invalid date",
            ordinal: "%d",
            dayOfMonthOrdinalParse: /\d{1,2}/,
            relativeTime: {
              future: "in %s",
              past: "%s 之前",
              s: "几秒钟",
              ss: "%d 秒",
              m: "一分钟",
              mm: "%d 分钟",
              h: "一小时",
              hh: "%d 小时",
              d: "一天",
              dd: "%d 天",
              M: "一个月",
              MM: "%d 月",
              y: "一年",
              yy: "%d 年",
            },
            months: xe,
            monthsShort: Re,
            week: { dow: 0, doy: 6 },
            weekdays: ze,
            weekdaysMin: We,
            weekdaysShort: Ue,
            meridiemParse: /[ap]\.?m?\.?/i,
          },
          et = {},
          tt = {};
        function nt(e) {
          return e ? e.toLowerCase().replace("_", "-") : e;
        }
        function rt(t) {
          var n = null;
          if (!et[t] && void 0 !== e && e && e.exports)
            try {
              (n = Ze._abbr),
                !(function () {
                  var e = new Error("Cannot find module 'undefined'");
                  throw ((e.code = "MODULE_NOT_FOUND"), e);
                })(),
                it(n);
            } catch (e) {}
          return et[t];
        }
        function it(e, t) {
          var n;
          return (
            e &&
              ((n = s(t) ? st(e) : ot(e, t))
                ? (Ze = n)
                : "undefined" != typeof console &&
                  console.warn &&
                  console.warn(
                    "Locale " + e + " not found. Did you forget to load it?"
                  )),
            Ze._abbr
          );
        }
        function ot(e, t) {
          if (null !== t) {
            var n,
              r = Je;
            if (((t.abbr = e), null != et[e]))
              D(
                "defineLocaleOverride",
                "use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."
              ),
                (r = et[e]._config);
            else if (null != t.parentLocale)
              if (null != et[t.parentLocale]) r = et[t.parentLocale]._config;
              else {
                if (null == (n = rt(t.parentLocale)))
                  return (
                    tt[t.parentLocale] || (tt[t.parentLocale] = []),
                    tt[t.parentLocale].push({ name: e, config: t }),
                    null
                  );
                r = n._config;
              }
            return (
              (et[e] = new M(_(r, t))),
              tt[e] &&
                tt[e].forEach(function (e) {
                  ot(e.name, e.config);
                }),
              it(e),
              et[e]
            );
          }
          return delete et[e], null;
        }
        function st(e) {
          var t;
          if ((e && e._locale && e._locale._abbr && (e = e._locale._abbr), !e))
            return Ze;
          if (!i(e)) {
            if ((t = rt(e))) return t;
            e = [e];
          }
          return (function (e) {
            for (var t, n, r, i, o = 0; o < e.length; ) {
              for (
                t = (i = nt(e[o]).split("-")).length,
                  n = (n = nt(e[o + 1])) ? n.split("-") : null;
                t > 0;

              ) {
                if ((r = rt(i.slice(0, t).join("-")))) return r;
                if (n && n.length >= t && E(i, n, !0) >= t - 1) break;
                t--;
              }
              o++;
            }
            return Ze;
          })(e);
        }
        function at(e) {
          var t,
            n = e._a;
          return (
            n &&
              -2 === p(e).overflow &&
              ((t =
                n[1] < 0 || n[1] > 11
                  ? 1
                  : n[2] < 1 || n[2] > Ee(n[0], n[1])
                  ? 2
                  : n[3] < 0 ||
                    n[3] > 24 ||
                    (24 === n[3] && (0 !== n[4] || 0 !== n[5] || 0 !== n[6]))
                  ? 3
                  : n[4] < 0 || n[4] > 59
                  ? 4
                  : n[5] < 0 || n[5] > 59
                  ? 5
                  : n[6] < 0 || n[6] > 999
                  ? 6
                  : -1),
              p(e)._overflowDayOfYear && (t < 0 || t > 2) && (t = 2),
              p(e)._overflowWeeks && -1 === t && (t = 7),
              p(e)._overflowWeekday && -1 === t && (t = 8),
              (p(e).overflow = t)),
            e
          );
        }
        function lt(e, t, n) {
          return null != e ? e : null != t ? t : n;
        }
        function ct(e) {
          var t,
            n,
            i,
            o,
            s,
            a = [];
          if (!e._d) {
            for (
              i = (function (e) {
                var t = new Date(r.now());
                return e._useUTC
                  ? [t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate()]
                  : [t.getFullYear(), t.getMonth(), t.getDate()];
              })(e),
                e._w &&
                  null == e._a[2] &&
                  null == e._a[1] &&
                  (function (e) {
                    var t, n, r, i, o, s, a, l;
                    if (null != (t = e._w).GG || null != t.W || null != t.E)
                      (o = 1),
                        (s = 4),
                        (n = lt(t.GG, e._a[0], Ne(kt(), 1, 4).year)),
                        (r = lt(t.W, 1)),
                        ((i = lt(t.E, 1)) < 1 || i > 7) && (l = !0);
                    else {
                      (o = e._locale._week.dow), (s = e._locale._week.doy);
                      var c = Ne(kt(), o, s);
                      (n = lt(t.gg, e._a[0], c.year)),
                        (r = lt(t.w, c.week)),
                        null != t.d
                          ? ((i = t.d) < 0 || i > 6) && (l = !0)
                          : null != t.e
                          ? ((i = t.e + o), (t.e < 0 || t.e > 6) && (l = !0))
                          : (i = o);
                    }
                    r < 1 || r > Be(n, o, s)
                      ? (p(e)._overflowWeeks = !0)
                      : null != l
                      ? (p(e)._overflowWeekday = !0)
                      : ((a = Fe(n, r, i, o, s)),
                        (e._a[0] = a.year),
                        (e._dayOfYear = a.dayOfYear));
                  })(e),
                null != e._dayOfYear &&
                  ((s = lt(e._a[0], i[0])),
                  (e._dayOfYear > ge(s) || 0 === e._dayOfYear) &&
                    (p(e)._overflowDayOfYear = !0),
                  (n = Oe(s, 0, e._dayOfYear)),
                  (e._a[1] = n.getUTCMonth()),
                  (e._a[2] = n.getUTCDate())),
                t = 0;
              t < 3 && null == e._a[t];
              ++t
            )
              e._a[t] = a[t] = i[t];
            for (; t < 7; t++)
              e._a[t] = a[t] = null == e._a[t] ? (2 === t ? 1 : 0) : e._a[t];
            24 === e._a[3] &&
              0 === e._a[4] &&
              0 === e._a[5] &&
              0 === e._a[6] &&
              ((e._nextDay = !0), (e._a[3] = 0)),
              (e._d = (e._useUTC ? Oe : Ie).apply(null, a)),
              (o = e._useUTC ? e._d.getUTCDay() : e._d.getDay()),
              null != e._tzm &&
                e._d.setUTCMinutes(e._d.getUTCMinutes() - e._tzm),
              e._nextDay && (e._a[3] = 24),
              e._w &&
                void 0 !== e._w.d &&
                e._w.d !== o &&
                (p(e).weekdayMismatch = !0);
          }
        }
        var ut = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
          ht = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
          dt = /Z|[+-]\d\d(?::?\d\d)?/,
          pt = [
            ["YYYYYY-MM-DD", /[+-]\d{6}-\d\d-\d\d/],
            ["YYYY-MM-DD", /\d{4}-\d\d-\d\d/],
            ["GGGG-[W]WW-E", /\d{4}-W\d\d-\d/],
            ["GGGG-[W]WW", /\d{4}-W\d\d/, !1],
            ["YYYY-DDD", /\d{4}-\d{3}/],
            ["YYYY-MM", /\d{4}-\d\d/, !1],
            ["YYYYYYMMDD", /[+-]\d{10}/],
            ["YYYYMMDD", /\d{8}/],
            ["GGGG[W]WWE", /\d{4}W\d{3}/],
            ["GGGG[W]WW", /\d{4}W\d{2}/, !1],
            ["YYYYDDD", /\d{7}/],
          ],
          ft = [
            ["HH:mm:ss.SSSS", /\d\d:\d\d:\d\d\.\d+/],
            ["HH:mm:ss,SSSS", /\d\d:\d\d:\d\d,\d+/],
            ["HH:mm:ss", /\d\d:\d\d:\d\d/],
            ["HH:mm", /\d\d:\d\d/],
            ["HHmmss.SSSS", /\d\d\d\d\d\d\.\d+/],
            ["HHmmss,SSSS", /\d\d\d\d\d\d,\d+/],
            ["HHmmss", /\d\d\d\d\d\d/],
            ["HHmm", /\d\d\d\d/],
            ["HH", /\d\d/],
          ],
          mt = /^\/?Date\((\-?\d+)/i;
        function gt(e) {
          var t,
            n,
            r,
            i,
            o,
            s,
            a = e._i,
            l = ut.exec(a) || ht.exec(a);
          if (l) {
            for (p(e).iso = !0, t = 0, n = pt.length; t < n; t++)
              if (pt[t][1].exec(l[1])) {
                (i = pt[t][0]), (r = !1 !== pt[t][2]);
                break;
              }
            if (null == i) return void (e._isValid = !1);
            if (l[3]) {
              for (t = 0, n = ft.length; t < n; t++)
                if (ft[t][1].exec(l[3])) {
                  o = (l[2] || " ") + ft[t][0];
                  break;
                }
              if (null == o) return void (e._isValid = !1);
            }
            if (!r && null != o) return void (e._isValid = !1);
            if (l[4]) {
              if (!dt.exec(l[4])) return void (e._isValid = !1);
              s = "Z";
            }
            (e._f = i + (o || "") + (s || "")), St(e);
          } else e._isValid = !1;
        }
        var yt = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;
        function vt(e) {
          var t = parseInt(e, 10);
          return t <= 49 ? 2e3 + t : t <= 999 ? 1900 + t : t;
        }
        var wt = {
          UT: 0,
          GMT: 0,
          EDT: -240,
          EST: -300,
          CDT: -300,
          CST: -360,
          MDT: -360,
          MST: -420,
          PDT: -420,
          PST: -480,
        };
        function bt(e) {
          var t,
            n,
            r,
            i,
            o,
            s,
            a,
            l = yt.exec(
              e._i
                .replace(/\([^)]*\)|[\n\t]/g, " ")
                .replace(/(\s\s+)/g, " ")
                .replace(/^\s\s*/, "")
                .replace(/\s\s*$/, "")
            );
          if (l) {
            var c =
              ((t = l[4]),
              (n = l[3]),
              (r = l[2]),
              (i = l[5]),
              (o = l[6]),
              (s = l[7]),
              (a = [
                vt(t),
                Re.indexOf(n),
                parseInt(r, 10),
                parseInt(i, 10),
                parseInt(o, 10),
              ]),
              s && a.push(parseInt(s, 10)),
              a);
            if (
              !(function (e, t, n) {
                return (
                  !e ||
                  Ue.indexOf(e) === new Date(t[0], t[1], t[2]).getDay() ||
                  ((p(n).weekdayMismatch = !0), (n._isValid = !1), !1)
                );
              })(l[1], c, e)
            )
              return;
            (e._a = c),
              (e._tzm = (function (e, t, n) {
                if (e) return wt[e];
                if (t) return 0;
                var r = parseInt(n, 10),
                  i = r % 100;
                return ((r - i) / 100) * 60 + i;
              })(l[8], l[9], l[10])),
              (e._d = Oe.apply(null, e._a)),
              e._d.setUTCMinutes(e._d.getUTCMinutes() - e._tzm),
              (p(e).rfc2822 = !0);
          } else e._isValid = !1;
        }
        function St(e) {
          if (e._f !== r.ISO_8601)
            if (e._f !== r.RFC_2822) {
              (e._a = []), (p(e).empty = !0);
              var t,
                n,
                i,
                o,
                s,
                a = "" + e._i,
                l = a.length,
                c = 0;
              for (
                i = G(e._f, e._locale).match(H) || [], t = 0;
                t < i.length;
                t++
              )
                (o = i[t]),
                  (n = (a.match(ue(o, e)) || [])[0]) &&
                    ((s = a.substr(0, a.indexOf(n))).length > 0 &&
                      p(e).unusedInput.push(s),
                    (a = a.slice(a.indexOf(n) + n.length)),
                    (c += n.length)),
                  W[o]
                    ? (n ? (p(e).empty = !1) : p(e).unusedTokens.push(o),
                      me(o, n, e))
                    : e._strict && !n && p(e).unusedTokens.push(o);
              (p(e).charsLeftOver = l - c),
                a.length > 0 && p(e).unusedInput.push(a),
                e._a[3] <= 12 &&
                  !0 === p(e).bigHour &&
                  e._a[3] > 0 &&
                  (p(e).bigHour = void 0),
                (p(e).parsedDateParts = e._a.slice(0)),
                (p(e).meridiem = e._meridiem),
                (e._a[3] = (function (e, t, n) {
                  var r;
                  return null == n
                    ? t
                    : null != e.meridiemHour
                    ? e.meridiemHour(t, n)
                    : null != e.isPM
                    ? ((r = e.isPM(n)) && t < 12 && (t += 12),
                      r || 12 !== t || (t = 0),
                      t)
                    : t;
                })(e._locale, e._a[3], e._meridiem)),
                ct(e),
                at(e);
            } else bt(e);
          else gt(e);
        }
        function Ct(e) {
          var t = e._i,
            n = e._f;
          return (
            (e._locale = e._locale || st(e._l)),
            null === t || (void 0 === n && "" === t)
              ? m({ nullInput: !0 })
              : ("string" == typeof t && (e._i = t = e._locale.preparse(t)),
                b(t)
                  ? new w(at(t))
                  : (l(t)
                      ? (e._d = t)
                      : i(n)
                      ? (function (e) {
                          var t, n, r, i, o;
                          if (0 === e._f.length)
                            return (
                              (p(e).invalidFormat = !0),
                              void (e._d = new Date(NaN))
                            );
                          for (i = 0; i < e._f.length; i++)
                            (o = 0),
                              (t = y({}, e)),
                              null != e._useUTC && (t._useUTC = e._useUTC),
                              (t._f = e._f[i]),
                              St(t),
                              f(t) &&
                                ((o += p(t).charsLeftOver),
                                (o += 10 * p(t).unusedTokens.length),
                                (p(t).score = o),
                                (null == r || o < r) && ((r = o), (n = t)));
                          h(e, n || t);
                        })(e)
                      : n
                      ? St(e)
                      : (function (e) {
                          var t = e._i;
                          s(t)
                            ? (e._d = new Date(r.now()))
                            : l(t)
                            ? (e._d = new Date(t.valueOf()))
                            : "string" == typeof t
                            ? (function (e) {
                                var t = mt.exec(e._i);
                                null === t
                                  ? (gt(e),
                                    !1 === e._isValid &&
                                      (delete e._isValid,
                                      bt(e),
                                      !1 === e._isValid &&
                                        (delete e._isValid,
                                        r.createFromInputFallback(e))))
                                  : (e._d = new Date(+t[1]));
                              })(e)
                            : i(t)
                            ? ((e._a = c(t.slice(0), function (e) {
                                return parseInt(e, 10);
                              })),
                              ct(e))
                            : o(t)
                            ? (function (e) {
                                if (!e._d) {
                                  var t = L(e._i);
                                  (e._a = c(
                                    [
                                      t.year,
                                      t.month,
                                      t.day || t.date,
                                      t.hour,
                                      t.minute,
                                      t.second,
                                      t.millisecond,
                                    ],
                                    function (e) {
                                      return e && parseInt(e, 10);
                                    }
                                  )),
                                    ct(e);
                                }
                              })(e)
                            : a(t)
                            ? (e._d = new Date(t))
                            : r.createFromInputFallback(e);
                        })(e),
                    f(e) || (e._d = null),
                    e))
          );
        }
        function Et(e, t, n, r, s) {
          var a,
            l = {};
          return (
            (!0 !== n && !1 !== n) || ((r = n), (n = void 0)),
            ((o(e) &&
              (function (e) {
                if (Object.getOwnPropertyNames)
                  return 0 === Object.getOwnPropertyNames(e).length;
                var t;
                for (t in e) if (e.hasOwnProperty(t)) return !1;
                return !0;
              })(e)) ||
              (i(e) && 0 === e.length)) &&
              (e = void 0),
            (l._isAMomentObject = !0),
            (l._useUTC = l._isUTC = s),
            (l._l = n),
            (l._i = e),
            (l._f = t),
            (l._strict = r),
            (a = new w(at(Ct(l))))._nextDay &&
              (a.add(1, "d"), (a._nextDay = void 0)),
            a
          );
        }
        function kt(e, t, n, r) {
          return Et(e, t, n, r, !1);
        }
        (r.createFromInputFallback = x(
          "value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",
          function (e) {
            e._d = new Date(e._i + (e._useUTC ? " UTC" : ""));
          }
        )),
          (r.ISO_8601 = function () {}),
          (r.RFC_2822 = function () {});
        var xt = x(
            "moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",
            function () {
              var e = kt.apply(null, arguments);
              return this.isValid() && e.isValid()
                ? e < this
                  ? this
                  : e
                : m();
            }
          ),
          Rt = x(
            "moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",
            function () {
              var e = kt.apply(null, arguments);
              return this.isValid() && e.isValid()
                ? e > this
                  ? this
                  : e
                : m();
            }
          );
        function Tt(e, t) {
          var n, r;
          if ((1 === t.length && i(t[0]) && (t = t[0]), !t.length)) return kt();
          for (n = t[0], r = 1; r < t.length; ++r)
            (t[r].isValid() && !t[r][e](n)) || (n = t[r]);
          return n;
        }
        var Dt = [
          "year",
          "quarter",
          "month",
          "week",
          "day",
          "hour",
          "minute",
          "second",
          "millisecond",
        ];
        function At(e) {
          var t = L(e),
            n = t.year || 0,
            r = t.quarter || 0,
            i = t.month || 0,
            o = t.week || t.isoWeek || 0,
            s = t.day || 0,
            a = t.hour || 0,
            l = t.minute || 0,
            c = t.second || 0,
            u = t.millisecond || 0;
          (this._isValid = (function (e) {
            for (var t in e)
              if (-1 === ve.call(Dt, t) || (null != e[t] && isNaN(e[t])))
                return !1;
            for (var n = !1, r = 0; r < Dt.length; ++r)
              if (e[Dt[r]]) {
                if (n) return !1;
                parseFloat(e[Dt[r]]) !== C(e[Dt[r]]) && (n = !0);
              }
            return !0;
          })(t)),
            (this._milliseconds = +u + 1e3 * c + 6e4 * l + 1e3 * a * 60 * 60),
            (this._days = +s + 7 * o),
            (this._months = +i + 3 * r + 12 * n),
            (this._data = {}),
            (this._locale = st()),
            this._bubble();
        }
        function _t(e) {
          return e instanceof At;
        }
        function Mt(e) {
          return e < 0 ? -1 * Math.round(-1 * e) : Math.round(e);
        }
        function Pt(e, t) {
          j(e, 0, 0, function () {
            var e = this.utcOffset(),
              n = "+";
            return (
              e < 0 && ((e = -e), (n = "-")),
              n + B(~~(e / 60), 2) + t + B(~~e % 60, 2)
            );
          });
        }
        Pt("Z", ":"),
          Pt("ZZ", ""),
          ce("Z", se),
          ce("ZZ", se),
          pe(["Z", "ZZ"], function (e, t, n) {
            (n._useUTC = !0), (n._tzm = Ot(se, e));
          });
        var It = /([\+\-]|\d\d)/gi;
        function Ot(e, t) {
          var n = (t || "").match(e);
          if (null === n) return null;
          var r = ((n[n.length - 1] || []) + "").match(It) || ["-", 0, 0],
            i = 60 * r[1] + C(r[2]);
          return 0 === i ? 0 : "+" === r[0] ? i : -i;
        }
        function Lt(e, t) {
          var n, i;
          return t._isUTC
            ? ((n = t.clone()),
              (i =
                (b(e) || l(e) ? e.valueOf() : kt(e).valueOf()) - n.valueOf()),
              n._d.setTime(n._d.valueOf() + i),
              r.updateOffset(n, !1),
              n)
            : kt(e).local();
        }
        function Ft(e) {
          return 15 * -Math.round(e._d.getTimezoneOffset() / 15);
        }
        function Nt() {
          return !!this.isValid() && this._isUTC && 0 === this._offset;
        }
        r.updateOffset = function () {};
        var Bt = /^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,
          Ht = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
        function zt(e, t) {
          var n,
            r,
            i,
            o,
            s,
            l,
            c = e,
            h = null;
          return (
            _t(e)
              ? (c = { ms: e._milliseconds, d: e._days, M: e._months })
              : a(e)
              ? ((c = {}), t ? (c[t] = e) : (c.milliseconds = e))
              : (h = Bt.exec(e))
              ? ((n = "-" === h[1] ? -1 : 1),
                (c = {
                  y: 0,
                  d: C(h[2]) * n,
                  h: C(h[3]) * n,
                  m: C(h[4]) * n,
                  s: C(h[5]) * n,
                  ms: C(Mt(1e3 * h[6])) * n,
                }))
              : (h = Ht.exec(e))
              ? ((n = "-" === h[1] ? -1 : 1),
                (c = {
                  y: Ut(h[2], n),
                  M: Ut(h[3], n),
                  w: Ut(h[4], n),
                  d: Ut(h[5], n),
                  h: Ut(h[6], n),
                  m: Ut(h[7], n),
                  s: Ut(h[8], n),
                }))
              : null == c
              ? (c = {})
              : "object" == typeof c &&
                ("from" in c || "to" in c) &&
                ((o = kt(c.from)),
                (s = kt(c.to)),
                (i =
                  o.isValid() && s.isValid()
                    ? ((s = Lt(s, o)),
                      o.isBefore(s)
                        ? (l = Wt(o, s))
                        : (((l = Wt(s, o)).milliseconds = -l.milliseconds),
                          (l.months = -l.months)),
                      l)
                    : { milliseconds: 0, months: 0 }),
                ((c = {}).ms = i.milliseconds),
                (c.M = i.months)),
            (r = new At(c)),
            _t(e) && u(e, "_locale") && (r._locale = e._locale),
            r
          );
        }
        function Ut(e, t) {
          var n = e && parseFloat(e.replace(",", "."));
          return (isNaN(n) ? 0 : n) * t;
        }
        function Wt(e, t) {
          var n = {};
          return (
            (n.months = t.month() - e.month() + 12 * (t.year() - e.year())),
            e.clone().add(n.months, "M").isAfter(t) && --n.months,
            (n.milliseconds = +t - +e.clone().add(n.months, "M")),
            n
          );
        }
        function jt(e, t) {
          return function (n, r) {
            var i;
            return (
              null === r ||
                isNaN(+r) ||
                (D(
                  t,
                  "moment()." +
                    t +
                    "(period, number) is deprecated. Please use moment()." +
                    t +
                    "(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."
                ),
                (i = n),
                (n = r),
                (r = i)),
              Vt(this, zt((n = "string" == typeof n ? +n : n), r), e),
              this
            );
          };
        }
        function Vt(e, t, n, i) {
          var o = t._milliseconds,
            s = Mt(t._days),
            a = Mt(t._months);
          e.isValid() &&
            ((i = null == i || i),
            a && De(e, Se(e, "Month") + a * n),
            s && Ce(e, "Date", Se(e, "Date") + s * n),
            o && e._d.setTime(e._d.valueOf() + o * n),
            i && r.updateOffset(e, s || a));
        }
        (zt.fn = At.prototype),
          (zt.invalid = function () {
            return zt(NaN);
          });
        var Gt = jt(1, "add"),
          $t = jt(-1, "subtract");
        function qt(e, t) {
          var n = 12 * (t.year() - e.year()) + (t.month() - e.month()),
            r = e.clone().add(n, "months");
          return (
            -(
              n +
              (t - r < 0
                ? (t - r) / (r - e.clone().add(n - 1, "months"))
                : (t - r) / (e.clone().add(n + 1, "months") - r))
            ) || 0
          );
        }
        function Kt(e) {
          var t;
          return void 0 === e
            ? this._locale._abbr
            : (null != (t = st(e)) && (this._locale = t), this);
        }
        (r.defaultFormat = "YYYY-MM-DDTHH:mm:ssZ"),
          (r.defaultFormatUtc = "YYYY-MM-DDTHH:mm:ss[Z]");
        var Yt = x(
          "moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",
          function (e) {
            return void 0 === e ? this.localeData() : this.locale(e);
          }
        );
        function Qt() {
          return this._locale;
        }
        function Zt(e, t) {
          return ((e % t) + t) % t;
        }
        function Xt(e, t, n) {
          return e < 100 && e >= 0
            ? new Date(e + 400, t, n) - 126227808e5
            : new Date(e, t, n).valueOf();
        }
        function Jt(e, t, n) {
          return e < 100 && e >= 0
            ? Date.UTC(e + 400, t, n) - 126227808e5
            : Date.UTC(e, t, n);
        }
        function en(e, t) {
          j(0, [e, e.length], 0, t);
        }
        function tn(e, t, n, r, i) {
          var o;
          return null == e
            ? Ne(this, r, i).year
            : (t > (o = Be(e, r, i)) && (t = o), nn.call(this, e, t, n, r, i));
        }
        function nn(e, t, n, r, i) {
          var o = Fe(e, t, n, r, i),
            s = Oe(o.year, 0, o.dayOfYear);
          return (
            this.year(s.getUTCFullYear()),
            this.month(s.getUTCMonth()),
            this.date(s.getUTCDate()),
            this
          );
        }
        j(0, ["gg", 2], 0, function () {
          return this.weekYear() % 100;
        }),
          j(0, ["GG", 2], 0, function () {
            return this.isoWeekYear() % 100;
          }),
          en("gggg", "weekYear"),
          en("ggggg", "weekYear"),
          en("GGGG", "isoWeekYear"),
          en("GGGGG", "isoWeekYear"),
          I("weekYear", "gg"),
          I("isoWeekYear", "GG"),
          N("weekYear", 1),
          N("isoWeekYear", 1),
          ce("G", ie),
          ce("g", ie),
          ce("GG", Z, q),
          ce("gg", Z, q),
          ce("GGGG", te, Y),
          ce("gggg", te, Y),
          ce("GGGGG", ne, Q),
          ce("ggggg", ne, Q),
          fe(["gggg", "ggggg", "GGGG", "GGGGG"], function (e, t, n, r) {
            t[r.substr(0, 2)] = C(e);
          }),
          fe(["gg", "GG"], function (e, t, n, i) {
            t[i] = r.parseTwoDigitYear(e);
          }),
          j("Q", 0, "Qo", "quarter"),
          I("quarter", "Q"),
          N("quarter", 7),
          ce("Q", $),
          pe("Q", function (e, t) {
            t[1] = 3 * (C(e) - 1);
          }),
          j("D", ["DD", 2], "Do", "date"),
          I("date", "D"),
          N("date", 9),
          ce("D", Z),
          ce("DD", Z, q),
          ce("Do", function (e, t) {
            return e
              ? t._dayOfMonthOrdinalParse || t._ordinalParse
              : t._dayOfMonthOrdinalParseLenient;
          }),
          pe(["D", "DD"], 2),
          pe("Do", function (e, t) {
            t[2] = C(e.match(Z)[0]);
          });
        var rn = be("Date", !0);
        j("DDD", ["DDDD", 3], "DDDo", "dayOfYear"),
          I("dayOfYear", "DDD"),
          N("dayOfYear", 4),
          ce("DDD", ee),
          ce("DDDD", K),
          pe(["DDD", "DDDD"], function (e, t, n) {
            n._dayOfYear = C(e);
          }),
          j("m", ["mm", 2], 0, "minute"),
          I("minute", "m"),
          N("minute", 14),
          ce("m", Z),
          ce("mm", Z, q),
          pe(["m", "mm"], 4);
        var on = be("Minutes", !1);
        j("s", ["ss", 2], 0, "second"),
          I("second", "s"),
          N("second", 15),
          ce("s", Z),
          ce("ss", Z, q),
          pe(["s", "ss"], 5);
        var sn,
          an = be("Seconds", !1);
        for (
          j("S", 0, 0, function () {
            return ~~(this.millisecond() / 100);
          }),
            j(0, ["SS", 2], 0, function () {
              return ~~(this.millisecond() / 10);
            }),
            j(0, ["SSS", 3], 0, "millisecond"),
            j(0, ["SSSS", 4], 0, function () {
              return 10 * this.millisecond();
            }),
            j(0, ["SSSSS", 5], 0, function () {
              return 100 * this.millisecond();
            }),
            j(0, ["SSSSSS", 6], 0, function () {
              return 1e3 * this.millisecond();
            }),
            j(0, ["SSSSSSS", 7], 0, function () {
              return 1e4 * this.millisecond();
            }),
            j(0, ["SSSSSSSS", 8], 0, function () {
              return 1e5 * this.millisecond();
            }),
            j(0, ["SSSSSSSSS", 9], 0, function () {
              return 1e6 * this.millisecond();
            }),
            I("millisecond", "ms"),
            N("millisecond", 16),
            ce("S", ee, $),
            ce("SS", ee, q),
            ce("SSS", ee, K),
            sn = "SSSS";
          sn.length <= 9;
          sn += "S"
        )
          ce(sn, re);
        function ln(e, t) {
          t[6] = C(1e3 * ("0." + e));
        }
        for (sn = "S"; sn.length <= 9; sn += "S") pe(sn, ln);
        var cn = be("Milliseconds", !1);
        j("z", 0, 0, "zoneAbbr"), j("zz", 0, 0, "zoneName");
        var un = w.prototype;
        function hn(e) {
          return e;
        }
        (un.add = Gt),
          (un.calendar = function (e, t) {
            var n = e || kt(),
              i = Lt(n, this).startOf("day"),
              o = r.calendarFormat(this, i) || "sameElse",
              s = t && (A(t[o]) ? t[o].call(this, n) : t[o]);
            return this.format(s || this.localeData().calendar(o, this, kt(n)));
          }),
          (un.clone = function () {
            return new w(this);
          }),
          (un.diff = function (e, t, n) {
            var r, i, o;
            if (!this.isValid()) return NaN;
            if (!(r = Lt(e, this)).isValid()) return NaN;
            switch (
              ((i = 6e4 * (r.utcOffset() - this.utcOffset())), (t = O(t)))
            ) {
              case "year":
                o = qt(this, r) / 12;
                break;
              case "month":
                o = qt(this, r);
                break;
              case "quarter":
                o = qt(this, r) / 3;
                break;
              case "second":
                o = (this - r) / 1e3;
                break;
              case "minute":
                o = (this - r) / 6e4;
                break;
              case "hour":
                o = (this - r) / 36e5;
                break;
              case "day":
                o = (this - r - i) / 864e5;
                break;
              case "week":
                o = (this - r - i) / 6048e5;
                break;
              default:
                o = this - r;
            }
            return n ? o : S(o);
          }),
          (un.endOf = function (e) {
            var t;
            if (void 0 === (e = O(e)) || "millisecond" === e || !this.isValid())
              return this;
            var n = this._isUTC ? Jt : Xt;
            switch (e) {
              case "year":
                t = n(this.year() + 1, 0, 1) - 1;
                break;
              case "quarter":
                t =
                  n(this.year(), this.month() - (this.month() % 3) + 3, 1) - 1;
                break;
              case "month":
                t = n(this.year(), this.month() + 1, 1) - 1;
                break;
              case "week":
                t =
                  n(
                    this.year(),
                    this.month(),
                    this.date() - this.weekday() + 7
                  ) - 1;
                break;
              case "isoWeek":
                t =
                  n(
                    this.year(),
                    this.month(),
                    this.date() - (this.isoWeekday() - 1) + 7
                  ) - 1;
                break;
              case "day":
              case "date":
                t = n(this.year(), this.month(), this.date() + 1) - 1;
                break;
              case "hour":
                (t = this._d.valueOf()),
                  (t +=
                    36e5 -
                    Zt(t + (this._isUTC ? 0 : 6e4 * this.utcOffset()), 36e5) -
                    1);
                break;
              case "minute":
                (t = this._d.valueOf()), (t += 6e4 - Zt(t, 6e4) - 1);
                break;
              case "second":
                (t = this._d.valueOf()), (t += 1e3 - Zt(t, 1e3) - 1);
            }
            return this._d.setTime(t), r.updateOffset(this, !0), this;
          }),
          (un.format = function (e) {
            e || (e = this.isUtc() ? r.defaultFormatUtc : r.defaultFormat);
            var t = V(this, e);
            return this.localeData().postformat(t);
          }),
          (un.from = function (e, t) {
            return this.isValid() && ((b(e) && e.isValid()) || kt(e).isValid())
              ? zt({ to: this, from: e }).locale(this.locale()).humanize(!t)
              : this.localeData().invalidDate();
          }),
          (un.fromNow = function (e) {
            return this.from(kt(), e);
          }),
          (un.to = function (e, t) {
            return this.isValid() && ((b(e) && e.isValid()) || kt(e).isValid())
              ? zt({ from: this, to: e }).locale(this.locale()).humanize(!t)
              : this.localeData().invalidDate();
          }),
          (un.toNow = function (e) {
            return this.to(kt(), e);
          }),
          (un.get = function (e) {
            return A(this[(e = O(e))]) ? this[e]() : this;
          }),
          (un.invalidAt = function () {
            return p(this).overflow;
          }),
          (un.isAfter = function (e, t) {
            var n = b(e) ? e : kt(e);
            return (
              !(!this.isValid() || !n.isValid()) &&
              ("millisecond" === (t = O(t) || "millisecond")
                ? this.valueOf() > n.valueOf()
                : n.valueOf() < this.clone().startOf(t).valueOf())
            );
          }),
          (un.isBefore = function (e, t) {
            var n = b(e) ? e : kt(e);
            return (
              !(!this.isValid() || !n.isValid()) &&
              ("millisecond" === (t = O(t) || "millisecond")
                ? this.valueOf() < n.valueOf()
                : this.clone().endOf(t).valueOf() < n.valueOf())
            );
          }),
          (un.isBetween = function (e, t, n, r) {
            var i = b(e) ? e : kt(e),
              o = b(t) ? t : kt(t);
            return (
              !!(this.isValid() && i.isValid() && o.isValid()) &&
              ("(" === (r = r || "()")[0]
                ? this.isAfter(i, n)
                : !this.isBefore(i, n)) &&
              (")" === r[1] ? this.isBefore(o, n) : !this.isAfter(o, n))
            );
          }),
          (un.isSame = function (e, t) {
            var n,
              r = b(e) ? e : kt(e);
            return (
              !(!this.isValid() || !r.isValid()) &&
              ("millisecond" === (t = O(t) || "millisecond")
                ? this.valueOf() === r.valueOf()
                : ((n = r.valueOf()),
                  this.clone().startOf(t).valueOf() <= n &&
                    n <= this.clone().endOf(t).valueOf()))
            );
          }),
          (un.isSameOrAfter = function (e, t) {
            return this.isSame(e, t) || this.isAfter(e, t);
          }),
          (un.isSameOrBefore = function (e, t) {
            return this.isSame(e, t) || this.isBefore(e, t);
          }),
          (un.isValid = function () {
            return f(this);
          }),
          (un.lang = Yt),
          (un.locale = Kt),
          (un.localeData = Qt),
          (un.max = Rt),
          (un.min = xt),
          (un.parsingFlags = function () {
            return h({}, p(this));
          }),
          (un.set = function (e, t) {
            if ("object" == typeof e)
              for (
                var n = (function (e) {
                    var t = [];
                    for (var n in e) t.push({ unit: n, priority: F[n] });
                    return (
                      t.sort(function (e, t) {
                        return e.priority - t.priority;
                      }),
                      t
                    );
                  })((e = L(e))),
                  r = 0;
                r < n.length;
                r++
              )
                this[n[r].unit](e[n[r].unit]);
            else if (A(this[(e = O(e))])) return this[e](t);
            return this;
          }),
          (un.startOf = function (e) {
            var t;
            if (void 0 === (e = O(e)) || "millisecond" === e || !this.isValid())
              return this;
            var n = this._isUTC ? Jt : Xt;
            switch (e) {
              case "year":
                t = n(this.year(), 0, 1);
                break;
              case "quarter":
                t = n(this.year(), this.month() - (this.month() % 3), 1);
                break;
              case "month":
                t = n(this.year(), this.month(), 1);
                break;
              case "week":
                t = n(this.year(), this.month(), this.date() - this.weekday());
                break;
              case "isoWeek":
                t = n(
                  this.year(),
                  this.month(),
                  this.date() - (this.isoWeekday() - 1)
                );
                break;
              case "day":
              case "date":
                t = n(this.year(), this.month(), this.date());
                break;
              case "hour":
                (t = this._d.valueOf()),
                  (t -= Zt(
                    t + (this._isUTC ? 0 : 6e4 * this.utcOffset()),
                    36e5
                  ));
                break;
              case "minute":
                (t = this._d.valueOf()), (t -= Zt(t, 6e4));
                break;
              case "second":
                (t = this._d.valueOf()), (t -= Zt(t, 1e3));
            }
            return this._d.setTime(t), r.updateOffset(this, !0), this;
          }),
          (un.subtract = $t),
          (un.toArray = function () {
            var e = this;
            return [
              e.year(),
              e.month(),
              e.date(),
              e.hour(),
              e.minute(),
              e.second(),
              e.millisecond(),
            ];
          }),
          (un.toObject = function () {
            var e = this;
            return {
              years: e.year(),
              months: e.month(),
              date: e.date(),
              hours: e.hours(),
              minutes: e.minutes(),
              seconds: e.seconds(),
              milliseconds: e.milliseconds(),
            };
          }),
          (un.toDate = function () {
            return new Date(this.valueOf());
          }),
          (un.toISOString = function (e) {
            if (!this.isValid()) return null;
            var t = !0 !== e,
              n = t ? this.clone().utc() : this;
            return n.year() < 0 || n.year() > 9999
              ? V(
                  n,
                  t
                    ? "YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]"
                    : "YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"
                )
              : A(Date.prototype.toISOString)
              ? t
                ? this.toDate().toISOString()
                : new Date(this.valueOf() + 60 * this.utcOffset() * 1e3)
                    .toISOString()
                    .replace("Z", V(n, "Z"))
              : V(
                  n,
                  t
                    ? "YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"
                    : "YYYY-MM-DD[T]HH:mm:ss.SSSZ"
                );
          }),
          (un.inspect = function () {
            if (!this.isValid()) return "moment.invalid(/* " + this._i + " */)";
            var e = "moment",
              t = "";
            this.isLocal() ||
              ((e = 0 === this.utcOffset() ? "moment.utc" : "moment.parseZone"),
              (t = "Z"));
            var n = "[" + e + '("]',
              r = 0 <= this.year() && this.year() <= 9999 ? "YYYY" : "YYYYYY",
              i = t + '[")]';
            return this.format(n + r + "-MM-DD[T]HH:mm:ss.SSS" + i);
          }),
          (un.toJSON = function () {
            return this.isValid() ? this.toISOString() : null;
          }),
          (un.toString = function () {
            return this.clone()
              .locale("en")
              .format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ");
          }),
          (un.unix = function () {
            return Math.floor(this.valueOf() / 1e3);
          }),
          (un.valueOf = function () {
            return this._d.valueOf() - 6e4 * (this._offset || 0);
          }),
          (un.creationData = function () {
            return {
              input: this._i,
              format: this._f,
              locale: this._locale,
              isUTC: this._isUTC,
              strict: this._strict,
            };
          }),
          (un.year = we),
          (un.isLeapYear = function () {
            return ye(this.year());
          }),
          (un.weekYear = function (e) {
            return tn.call(
              this,
              e,
              this.week(),
              this.weekday(),
              this.localeData()._week.dow,
              this.localeData()._week.doy
            );
          }),
          (un.isoWeekYear = function (e) {
            return tn.call(this, e, this.isoWeek(), this.isoWeekday(), 1, 4);
          }),
          (un.quarter = un.quarters = function (e) {
            return null == e
              ? Math.ceil((this.month() + 1) / 3)
              : this.month(3 * (e - 1) + (this.month() % 3));
          }),
          (un.month = Ae),
          (un.daysInMonth = function () {
            return Ee(this.year(), this.month());
          }),
          (un.week = un.weeks = function (e) {
            var t = this.localeData().week(this);
            return null == e ? t : this.add(7 * (e - t), "d");
          }),
          (un.isoWeek = un.isoWeeks = function (e) {
            var t = Ne(this, 1, 4).week;
            return null == e ? t : this.add(7 * (e - t), "d");
          }),
          (un.weeksInYear = function () {
            var e = this.localeData()._week;
            return Be(this.year(), e.dow, e.doy);
          }),
          (un.isoWeeksInYear = function () {
            return Be(this.year(), 1, 4);
          }),
          (un.date = rn),
          (un.day = un.days = function (e) {
            if (!this.isValid()) return null != e ? this : NaN;
            var t = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
            return null != e
              ? ((e = (function (e, t) {
                  return "string" != typeof e
                    ? e
                    : isNaN(e)
                    ? "number" == typeof (e = t.weekdaysParse(e))
                      ? e
                      : null
                    : parseInt(e, 10);
                })(e, this.localeData())),
                this.add(e - t, "d"))
              : t;
          }),
          (un.weekday = function (e) {
            if (!this.isValid()) return null != e ? this : NaN;
            var t = (this.day() + 7 - this.localeData()._week.dow) % 7;
            return null == e ? t : this.add(e - t, "d");
          }),
          (un.isoWeekday = function (e) {
            if (!this.isValid()) return null != e ? this : NaN;
            if (null != e) {
              var t = (function (e, t) {
                return "string" == typeof e
                  ? t.weekdaysParse(e) % 7 || 7
                  : isNaN(e)
                  ? null
                  : e;
              })(e, this.localeData());
              return this.day(this.day() % 7 ? t : t - 7);
            }
            return this.day() || 7;
          }),
          (un.dayOfYear = function (e) {
            var t =
              Math.round(
                (this.clone().startOf("day") - this.clone().startOf("year")) /
                  864e5
              ) + 1;
            return null == e ? t : this.add(e - t, "d");
          }),
          (un.hour = un.hours = Xe),
          (un.minute = un.minutes = on),
          (un.second = un.seconds = an),
          (un.millisecond = un.milliseconds = cn),
          (un.utcOffset = function (e, t, n) {
            var i,
              o = this._offset || 0;
            if (!this.isValid()) return null != e ? this : NaN;
            if (null != e) {
              if ("string" == typeof e) {
                if (null === (e = Ot(se, e))) return this;
              } else Math.abs(e) < 16 && !n && (e *= 60);
              return (
                !this._isUTC && t && (i = Ft(this)),
                (this._offset = e),
                (this._isUTC = !0),
                null != i && this.add(i, "m"),
                o !== e &&
                  (!t || this._changeInProgress
                    ? Vt(this, zt(e - o, "m"), 1, !1)
                    : this._changeInProgress ||
                      ((this._changeInProgress = !0),
                      r.updateOffset(this, !0),
                      (this._changeInProgress = null))),
                this
              );
            }
            return this._isUTC ? o : Ft(this);
          }),
          (un.utc = function (e) {
            return this.utcOffset(0, e);
          }),
          (un.local = function (e) {
            return (
              this._isUTC &&
                (this.utcOffset(0, e),
                (this._isUTC = !1),
                e && this.subtract(Ft(this), "m")),
              this
            );
          }),
          (un.parseZone = function () {
            if (null != this._tzm) this.utcOffset(this._tzm, !1, !0);
            else if ("string" == typeof this._i) {
              var e = Ot(oe, this._i);
              null != e ? this.utcOffset(e) : this.utcOffset(0, !0);
            }
            return this;
          }),
          (un.hasAlignedHourOffset = function (e) {
            return (
              !!this.isValid() &&
              ((e = e ? kt(e).utcOffset() : 0),
              (this.utcOffset() - e) % 60 == 0)
            );
          }),
          (un.isDST = function () {
            return (
              this.utcOffset() > this.clone().month(0).utcOffset() ||
              this.utcOffset() > this.clone().month(5).utcOffset()
            );
          }),
          (un.isLocal = function () {
            return !!this.isValid() && !this._isUTC;
          }),
          (un.isUtcOffset = function () {
            return !!this.isValid() && this._isUTC;
          }),
          (un.isUtc = Nt),
          (un.isUTC = Nt),
          (un.zoneAbbr = function () {
            return this._isUTC ? "UTC" : "";
          }),
          (un.zoneName = function () {
            return this._isUTC ? "Coordinated Universal Time" : "";
          }),
          (un.dates = x("dates accessor is deprecated. Use date instead.", rn)),
          (un.months = x(
            "months accessor is deprecated. Use month instead",
            Ae
          )),
          (un.years = x("years accessor is deprecated. Use year instead", we)),
          (un.zone = x(
            "moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",
            function (e, t) {
              return null != e
                ? ("string" != typeof e && (e = -e), this.utcOffset(e, t), this)
                : -this.utcOffset();
            }
          )),
          (un.isDSTShifted = x(
            "isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",
            function () {
              if (!s(this._isDSTShifted)) return this._isDSTShifted;
              var e = {};
              if ((y(e, this), (e = Ct(e))._a)) {
                var t = e._isUTC ? d(e._a) : kt(e._a);
                this._isDSTShifted = this.isValid() && E(e._a, t.toArray()) > 0;
              } else this._isDSTShifted = !1;
              return this._isDSTShifted;
            }
          ));
        var dn = M.prototype;
        function pn(e, t, n, r) {
          var i = st(),
            o = d().set(r, t);
          return i[n](o, e);
        }
        function fn(e, t, n) {
          if ((a(e) && ((t = e), (e = void 0)), (e = e || ""), null != t))
            return pn(e, t, n, "month");
          var r,
            i = [];
          for (r = 0; r < 12; r++) i[r] = pn(e, r, n, "month");
          return i;
        }
        function mn(e, t, n, r) {
          "boolean" == typeof e
            ? (a(t) && ((n = t), (t = void 0)), (t = t || ""))
            : ((n = t = e),
              (e = !1),
              a(t) && ((n = t), (t = void 0)),
              (t = t || ""));
          var i,
            o = st(),
            s = e ? o._week.dow : 0;
          if (null != n) return pn(t, (n + s) % 7, r, "day");
          var l = [];
          for (i = 0; i < 7; i++) l[i] = pn(t, (i + s) % 7, r, "day");
          return l;
        }
        (dn.calendar = function (e, t, n) {
          var r = this._calendar[e] || this._calendar.sameElse;
          return A(r) ? r.call(t, n) : r;
        }),
          (dn.longDateFormat = function (e) {
            var t = this._longDateFormat[e],
              n = this._longDateFormat[e.toUpperCase()];
            return t || !n
              ? t
              : ((this._longDateFormat[e] = n.replace(
                  /MMMM|MM|DD|dddd/g,
                  function (e) {
                    return e.slice(1);
                  }
                )),
                this._longDateFormat[e]);
          }),
          (dn.invalidDate = function () {
            return this._invalidDate;
          }),
          (dn.ordinal = function (e) {
            return this._ordinal.replace("%d", e);
          }),
          (dn.preparse = hn),
          (dn.postformat = hn),
          (dn.relativeTime = function (e, t, n, r) {
            var i = this._relativeTime[n];
            return A(i) ? i(e, t, n, r) : i.replace(/%d/i, e);
          }),
          (dn.pastFuture = function (e, t) {
            var n = this._relativeTime[e > 0 ? "future" : "past"];
            return A(n) ? n(t) : n.replace(/%s/i, t);
          }),
          (dn.set = function (e) {
            var t, n;
            for (n in e) A((t = e[n])) ? (this[n] = t) : (this["_" + n] = t);
            (this._config = e),
              (this._dayOfMonthOrdinalParseLenient = new RegExp(
                (this._dayOfMonthOrdinalParse.source ||
                  this._ordinalParse.source) +
                  "|" +
                  /\d{1,2}/.source
              ));
          }),
          (dn.months = function (e, t) {
            return e
              ? i(this._months)
                ? this._months[e.month()]
                : this._months[
                    (this._months.isFormat || ke).test(t)
                      ? "format"
                      : "standalone"
                  ][e.month()]
              : i(this._months)
              ? this._months
              : this._months.standalone;
          }),
          (dn.monthsShort = function (e, t) {
            return e
              ? i(this._monthsShort)
                ? this._monthsShort[e.month()]
                : this._monthsShort[ke.test(t) ? "format" : "standalone"][
                    e.month()
                  ]
              : i(this._monthsShort)
              ? this._monthsShort
              : this._monthsShort.standalone;
          }),
          (dn.monthsParse = function (e, t, n) {
            var r, i, o;
            if (this._monthsParseExact) return Te.call(this, e, t, n);
            for (
              this._monthsParse ||
                ((this._monthsParse = []),
                (this._longMonthsParse = []),
                (this._shortMonthsParse = [])),
                r = 0;
              r < 12;
              r++
            ) {
              if (
                ((i = d([2e3, r])),
                n &&
                  !this._longMonthsParse[r] &&
                  ((this._longMonthsParse[r] = new RegExp(
                    "^" + this.months(i, "").replace(".", "") + "$",
                    "i"
                  )),
                  (this._shortMonthsParse[r] = new RegExp(
                    "^" + this.monthsShort(i, "").replace(".", "") + "$",
                    "i"
                  ))),
                n ||
                  this._monthsParse[r] ||
                  ((o =
                    "^" + this.months(i, "") + "|^" + this.monthsShort(i, "")),
                  (this._monthsParse[r] = new RegExp(o.replace(".", ""), "i"))),
                n && "MMMM" === t && this._longMonthsParse[r].test(e))
              )
                return r;
              if (n && "MMM" === t && this._shortMonthsParse[r].test(e))
                return r;
              if (!n && this._monthsParse[r].test(e)) return r;
            }
          }),
          (dn.monthsRegex = function (e) {
            return this._monthsParseExact
              ? (u(this, "_monthsRegex") || Pe.call(this),
                e ? this._monthsStrictRegex : this._monthsRegex)
              : (u(this, "_monthsRegex") || (this._monthsRegex = Me),
                this._monthsStrictRegex && e
                  ? this._monthsStrictRegex
                  : this._monthsRegex);
          }),
          (dn.monthsShortRegex = function (e) {
            return this._monthsParseExact
              ? (u(this, "_monthsRegex") || Pe.call(this),
                e ? this._monthsShortStrictRegex : this._monthsShortRegex)
              : (u(this, "_monthsShortRegex") || (this._monthsShortRegex = _e),
                this._monthsShortStrictRegex && e
                  ? this._monthsShortStrictRegex
                  : this._monthsShortRegex);
          }),
          (dn.week = function (e) {
            return Ne(e, this._week.dow, this._week.doy).week;
          }),
          (dn.firstDayOfYear = function () {
            return this._week.doy;
          }),
          (dn.firstDayOfWeek = function () {
            return this._week.dow;
          }),
          (dn.weekdays = function (e, t) {
            var n = i(this._weekdays)
              ? this._weekdays
              : this._weekdays[
                  e && !0 !== e && this._weekdays.isFormat.test(t)
                    ? "format"
                    : "standalone"
                ];
            return !0 === e ? He(n, this._week.dow) : e ? n[e.day()] : n;
          }),
          (dn.weekdaysMin = function (e) {
            return !0 === e
              ? He(this._weekdaysMin, this._week.dow)
              : e
              ? this._weekdaysMin[e.day()]
              : this._weekdaysMin;
          }),
          (dn.weekdaysShort = function (e) {
            return !0 === e
              ? He(this._weekdaysShort, this._week.dow)
              : e
              ? this._weekdaysShort[e.day()]
              : this._weekdaysShort;
          }),
          (dn.weekdaysParse = function (e, t, n) {
            var r, i, o;
            if (this._weekdaysParseExact) return je.call(this, e, t, n);
            for (
              this._weekdaysParse ||
                ((this._weekdaysParse = []),
                (this._minWeekdaysParse = []),
                (this._shortWeekdaysParse = []),
                (this._fullWeekdaysParse = [])),
                r = 0;
              r < 7;
              r++
            ) {
              if (
                ((i = d([2e3, 1]).day(r)),
                n &&
                  !this._fullWeekdaysParse[r] &&
                  ((this._fullWeekdaysParse[r] = new RegExp(
                    "^" + this.weekdays(i, "").replace(".", "\\.?") + "$",
                    "i"
                  )),
                  (this._shortWeekdaysParse[r] = new RegExp(
                    "^" + this.weekdaysShort(i, "").replace(".", "\\.?") + "$",
                    "i"
                  )),
                  (this._minWeekdaysParse[r] = new RegExp(
                    "^" + this.weekdaysMin(i, "").replace(".", "\\.?") + "$",
                    "i"
                  ))),
                this._weekdaysParse[r] ||
                  ((o =
                    "^" +
                    this.weekdays(i, "") +
                    "|^" +
                    this.weekdaysShort(i, "") +
                    "|^" +
                    this.weekdaysMin(i, "")),
                  (this._weekdaysParse[r] = new RegExp(
                    o.replace(".", ""),
                    "i"
                  ))),
                n && "dddd" === t && this._fullWeekdaysParse[r].test(e))
              )
                return r;
              if (n && "ddd" === t && this._shortWeekdaysParse[r].test(e))
                return r;
              if (n && "dd" === t && this._minWeekdaysParse[r].test(e))
                return r;
              if (!n && this._weekdaysParse[r].test(e)) return r;
            }
          }),
          (dn.weekdaysRegex = function (e) {
            return this._weekdaysParseExact
              ? (u(this, "_weekdaysRegex") || qe.call(this),
                e ? this._weekdaysStrictRegex : this._weekdaysRegex)
              : (u(this, "_weekdaysRegex") || (this._weekdaysRegex = Ve),
                this._weekdaysStrictRegex && e
                  ? this._weekdaysStrictRegex
                  : this._weekdaysRegex);
          }),
          (dn.weekdaysShortRegex = function (e) {
            return this._weekdaysParseExact
              ? (u(this, "_weekdaysRegex") || qe.call(this),
                e ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex)
              : (u(this, "_weekdaysShortRegex") ||
                  (this._weekdaysShortRegex = Ge),
                this._weekdaysShortStrictRegex && e
                  ? this._weekdaysShortStrictRegex
                  : this._weekdaysShortRegex);
          }),
          (dn.weekdaysMinRegex = function (e) {
            return this._weekdaysParseExact
              ? (u(this, "_weekdaysRegex") || qe.call(this),
                e ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex)
              : (u(this, "_weekdaysMinRegex") || (this._weekdaysMinRegex = $e),
                this._weekdaysMinStrictRegex && e
                  ? this._weekdaysMinStrictRegex
                  : this._weekdaysMinRegex);
          }),
          (dn.isPM = function (e) {
            return "p" === (e + "").toLowerCase().charAt(0);
          }),
          (dn.meridiem = function (e, t, n) {
            return e > 11 ? (n ? "pm" : "PM") : n ? "am" : "AM";
          }),
          it("en", {
            dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
            ordinal: function (e) {
              var t = e % 10;
              return (
                e +
                (1 === C((e % 100) / 10)
                  ? "th"
                  : 1 === t
                  ? "st"
                  : 2 === t
                  ? "nd"
                  : 3 === t
                  ? "rd"
                  : "th")
              );
            },
          }),
          (r.lang = x(
            "moment.lang is deprecated. Use moment.locale instead.",
            it
          )),
          (r.langData = x(
            "moment.langData is deprecated. Use moment.localeData instead.",
            st
          ));
        var gn = Math.abs;
        function yn(e, t, n, r) {
          var i = zt(t, n);
          return (
            (e._milliseconds += r * i._milliseconds),
            (e._days += r * i._days),
            (e._months += r * i._months),
            e._bubble()
          );
        }
        function vn(e) {
          return e < 0 ? Math.floor(e) : Math.ceil(e);
        }
        function wn(e) {
          return (4800 * e) / 146097;
        }
        function bn(e) {
          return (146097 * e) / 4800;
        }
        function Sn(e) {
          return function () {
            return this.as(e);
          };
        }
        var Cn = Sn("ms"),
          En = Sn("s"),
          kn = Sn("m"),
          xn = Sn("h"),
          Rn = Sn("d"),
          Tn = Sn("w"),
          Dn = Sn("M"),
          An = Sn("Q"),
          _n = Sn("y");
        function Mn(e) {
          return function () {
            return this.isValid() ? this._data[e] : NaN;
          };
        }
        var Pn = Mn("milliseconds"),
          In = Mn("seconds"),
          On = Mn("minutes"),
          Ln = Mn("hours"),
          Fn = Mn("days"),
          Nn = Mn("months"),
          Bn = Mn("years"),
          Hn = Math.round,
          zn = { ss: 44, s: 45, m: 45, h: 22, d: 26, M: 11 };
        function Un(e, t, n, r, i) {
          return i.relativeTime(t || 1, !!n, e, r);
        }
        var Wn = Math.abs;
        function jn(e) {
          return (e > 0) - (e < 0) || +e;
        }
        function Vn() {
          if (!this.isValid()) return this.localeData().invalidDate();
          var e,
            t,
            n = Wn(this._milliseconds) / 1e3,
            r = Wn(this._days),
            i = Wn(this._months);
          (e = S(n / 60)), (t = S(e / 60)), (n %= 60), (e %= 60);
          var o = S(i / 12),
            s = (i %= 12),
            a = r,
            l = t,
            c = e,
            u = n ? n.toFixed(3).replace(/\.?0+$/, "") : "",
            h = this.asSeconds();
          if (!h) return "P0D";
          var d = h < 0 ? "-" : "",
            p = jn(this._months) !== jn(h) ? "-" : "",
            f = jn(this._days) !== jn(h) ? "-" : "",
            m = jn(this._milliseconds) !== jn(h) ? "-" : "";
          return (
            d +
            "P" +
            (o ? p + o + "Y" : "") +
            (s ? p + s + "M" : "") +
            (a ? f + a + "D" : "") +
            (l || c || u ? "T" : "") +
            (l ? m + l + "H" : "") +
            (c ? m + c + "M" : "") +
            (u ? m + u + "S" : "")
          );
        }
        var Gn = At.prototype;
        return (
          (Gn.isValid = function () {
            return this._isValid;
          }),
          (Gn.abs = function () {
            var e = this._data;
            return (
              (this._milliseconds = gn(this._milliseconds)),
              (this._days = gn(this._days)),
              (this._months = gn(this._months)),
              (e.milliseconds = gn(e.milliseconds)),
              (e.seconds = gn(e.seconds)),
              (e.minutes = gn(e.minutes)),
              (e.hours = gn(e.hours)),
              (e.months = gn(e.months)),
              (e.years = gn(e.years)),
              this
            );
          }),
          (Gn.add = function (e, t) {
            return yn(this, e, t, 1);
          }),
          (Gn.subtract = function (e, t) {
            return yn(this, e, t, -1);
          }),
          (Gn.as = function (e) {
            if (!this.isValid()) return NaN;
            var t,
              n,
              r = this._milliseconds;
            if ("month" === (e = O(e)) || "quarter" === e || "year" === e)
              switch (
                ((t = this._days + r / 864e5), (n = this._months + wn(t)), e)
              ) {
                case "month":
                  return n;
                case "quarter":
                  return n / 3;
                case "year":
                  return n / 12;
              }
            else
              switch (((t = this._days + Math.round(bn(this._months))), e)) {
                case "week":
                  return t / 7 + r / 6048e5;
                case "day":
                  return t + r / 864e5;
                case "hour":
                  return 24 * t + r / 36e5;
                case "minute":
                  return 1440 * t + r / 6e4;
                case "second":
                  return 86400 * t + r / 1e3;
                case "millisecond":
                  return Math.floor(864e5 * t) + r;
                default:
                  throw new Error("Unknown unit " + e);
              }
          }),
          (Gn.asMilliseconds = Cn),
          (Gn.asSeconds = En),
          (Gn.asMinutes = kn),
          (Gn.asHours = xn),
          (Gn.asDays = Rn),
          (Gn.asWeeks = Tn),
          (Gn.asMonths = Dn),
          (Gn.asQuarters = An),
          (Gn.asYears = _n),
          (Gn.valueOf = function () {
            return this.isValid()
              ? this._milliseconds +
                  864e5 * this._days +
                  (this._months % 12) * 2592e6 +
                  31536e6 * C(this._months / 12)
              : NaN;
          }),
          (Gn._bubble = function () {
            var e,
              t,
              n,
              r,
              i,
              o = this._milliseconds,
              s = this._days,
              a = this._months,
              l = this._data;
            return (
              (o >= 0 && s >= 0 && a >= 0) ||
                (o <= 0 && s <= 0 && a <= 0) ||
                ((o += 864e5 * vn(bn(a) + s)), (s = 0), (a = 0)),
              (l.milliseconds = o % 1e3),
              (e = S(o / 1e3)),
              (l.seconds = e % 60),
              (t = S(e / 60)),
              (l.minutes = t % 60),
              (n = S(t / 60)),
              (l.hours = n % 24),
              (s += S(n / 24)),
              (i = S(wn(s))),
              (a += i),
              (s -= vn(bn(i))),
              (r = S(a / 12)),
              (a %= 12),
              (l.days = s),
              (l.months = a),
              (l.years = r),
              this
            );
          }),
          (Gn.clone = function () {
            return zt(this);
          }),
          (Gn.get = function (e) {
            return (e = O(e)), this.isValid() ? this[e + "s"]() : NaN;
          }),
          (Gn.milliseconds = Pn),
          (Gn.seconds = In),
          (Gn.minutes = On),
          (Gn.hours = Ln),
          (Gn.days = Fn),
          (Gn.weeks = function () {
            return S(this.days() / 7);
          }),
          (Gn.months = Nn),
          (Gn.years = Bn),
          (Gn.humanize = function (e) {
            if (!this.isValid()) return this.localeData().invalidDate();
            var t = this.localeData(),
              n = (function (e, t, n) {
                var r = zt(e).abs(),
                  i = Hn(r.as("s")),
                  o = Hn(r.as("m")),
                  s = Hn(r.as("h")),
                  a = Hn(r.as("d")),
                  l = Hn(r.as("M")),
                  c = Hn(r.as("y")),
                  u = (i <= zn.ss && ["s", i]) ||
                    (i < zn.s && ["ss", i]) ||
                    (o <= 1 && ["m"]) ||
                    (o < zn.m && ["mm", o]) ||
                    (s <= 1 && ["h"]) ||
                    (s < zn.h && ["hh", s]) ||
                    (a <= 1 && ["d"]) ||
                    (a < zn.d && ["dd", a]) ||
                    (l <= 1 && ["M"]) ||
                    (l < zn.M && ["MM", l]) ||
                    (c <= 1 && ["y"]) || ["yy", c];
                return (
                  (u[2] = t), (u[3] = +e > 0), (u[4] = n), Un.apply(null, u)
                );
              })(this, !e, t);
            return e && (n = t.pastFuture(+this, n)), t.postformat(n);
          }),
          (Gn.toISOString = Vn),
          (Gn.toString = Vn),
          (Gn.toJSON = Vn),
          (Gn.locale = Kt),
          (Gn.localeData = Qt),
          (Gn.toIsoString = x(
            "toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",
            Vn
          )),
          (Gn.lang = Yt),
          j("X", 0, 0, "unix"),
          j("x", 0, 0, "valueOf"),
          ce("x", ie),
          ce("X", /[+-]?\d+(\.\d{1,3})?/),
          pe("X", function (e, t, n) {
            n._d = new Date(1e3 * parseFloat(e, 10));
          }),
          pe("x", function (e, t, n) {
            n._d = new Date(C(e));
          }),
          (r.version = "2.24.0"),
          (t = kt),
          (r.fn = un),
          (r.min = function () {
            var e = [].slice.call(arguments, 0);
            return Tt("isBefore", e);
          }),
          (r.max = function () {
            var e = [].slice.call(arguments, 0);
            return Tt("isAfter", e);
          }),
          (r.now = function () {
            return Date.now ? Date.now() : +new Date();
          }),
          (r.utc = d),
          (r.unix = function (e) {
            return kt(1e3 * e);
          }),
          (r.months = function (e, t) {
            return fn(e, t, "months");
          }),
          (r.isDate = l),
          (r.locale = it),
          (r.invalid = m),
          (r.duration = zt),
          (r.isMoment = b),
          (r.weekdays = function (e, t, n) {
            return mn(e, t, n, "weekdays");
          }),
          (r.parseZone = function () {
            return kt.apply(null, arguments).parseZone();
          }),
          (r.localeData = st),
          (r.isDuration = _t),
          (r.monthsShort = function (e, t) {
            return fn(e, t, "monthsShort");
          }),
          (r.weekdaysMin = function (e, t, n) {
            return mn(e, t, n, "weekdaysMin");
          }),
          (r.defineLocale = ot),
          (r.updateLocale = function (e, t) {
            if (null != t) {
              var n,
                r,
                i = Je;
              null != (r = rt(e)) && (i = r._config),
                (t = _(i, t)),
                ((n = new M(t)).parentLocale = et[e]),
                (et[e] = n),
                it(e);
            } else
              null != et[e] &&
                (null != et[e].parentLocale
                  ? (et[e] = et[e].parentLocale)
                  : null != et[e] && delete et[e]);
            return et[e];
          }),
          (r.locales = function () {
            return R(et);
          }),
          (r.weekdaysShort = function (e, t, n) {
            return mn(e, t, n, "weekdaysShort");
          }),
          (r.normalizeUnits = O),
          (r.relativeTimeRounding = function (e) {
            return void 0 === e ? Hn : "function" == typeof e && ((Hn = e), !0);
          }),
          (r.relativeTimeThreshold = function (e, t) {
            return (
              void 0 !== zn[e] &&
              (void 0 === t
                ? zn[e]
                : ((zn[e] = t), "s" === e && (zn.ss = t - 1), !0))
            );
          }),
          (r.calendarFormat = function (e, t) {
            var n = e.diff(t, "days", !0);
            return n < -6
              ? "sameElse"
              : n < -1
              ? "lastWeek"
              : n < 0
              ? "lastDay"
              : n < 1
              ? "sameDay"
              : n < 2
              ? "nextDay"
              : n < 7
              ? "nextWeek"
              : "sameElse";
          }),
          (r.prototype = un),
          (r.HTML5_FMT = {
            DATETIME_LOCAL: "YYYY-MM-DDTHH:mm",
            DATETIME_LOCAL_SECONDS: "YYYY-MM-DDTHH:mm:ss",
            DATETIME_LOCAL_MS: "YYYY-MM-DDTHH:mm:ss.SSS",
            DATE: "YYYY-MM-DD",
            TIME: "HH:mm",
            TIME_SECONDS: "HH:mm:ss",
            TIME_MS: "HH:mm:ss.SSS",
            WEEK: "GGGG-[W]WW",
            MONTH: "YYYY-MM",
          }),
          r
        );
      })();
    }.call(this, n(46)(e)));
  },
  function (e, t, n) {
    var r,
      i,
      o = n(8),
      s = n(172),
      a = n(173),
      l = n(174),
      c = n(39);
    "function" == typeof Symbol && "function" == typeof Symbol.for
      ? ((r = Symbol.for("graceful-fs.queue")),
        (i = Symbol.for("graceful-fs.previous")))
      : ((r = "___graceful-fs.queue"), (i = "___graceful-fs.previous"));
    var u = function () {};
    if (
      (c.debuglog
        ? (u = c.debuglog("gfs4"))
        : /\bgfs4\b/i.test(process.env.NODE_DEBUG || "") &&
          (u = function () {
            var e = c.format.apply(c, arguments);
            (e = "GFS4: " + e.split(/\n/).join("\nGFS4: ")), console.error(e);
          }),
      !global[r])
    ) {
      var h = [];
      Object.defineProperty(global, r, {
        get: function () {
          return h;
        },
      }),
        (o.close = (function (e) {
          function t(t, n) {
            return e.call(o, t, function (e) {
              e || f(), "function" == typeof n && n.apply(this, arguments);
            });
          }
          return Object.defineProperty(t, i, { value: e }), t;
        })(o.close)),
        (o.closeSync = (function (e) {
          function t(t) {
            e.apply(o, arguments), f();
          }
          return Object.defineProperty(t, i, { value: e }), t;
        })(o.closeSync)),
        /\bgfs4\b/i.test(process.env.NODE_DEBUG || "") &&
          process.on("exit", function () {
            u(global[r]), n(48).equal(global[r].length, 0);
          });
    }
    function d(e) {
      s(e),
        (e.gracefulify = d),
        (e.createReadStream = function (t, n) {
          return new e.ReadStream(t, n);
        }),
        (e.createWriteStream = function (t, n) {
          return new e.WriteStream(t, n);
        });
      var t = e.readFile;
      e.readFile = function (e, n, r) {
        "function" == typeof n && ((r = n), (n = null));
        return (function e(n, r, i) {
          return t(n, r, function (t) {
            !t || ("EMFILE" !== t.code && "ENFILE" !== t.code)
              ? ("function" == typeof i && i.apply(this, arguments), f())
              : p([e, [n, r, i]]);
          });
        })(e, n, r);
      };
      var n = e.writeFile;
      e.writeFile = function (e, t, r, i) {
        "function" == typeof r && ((i = r), (r = null));
        return (function e(t, r, i, o) {
          return n(t, r, i, function (n) {
            !n || ("EMFILE" !== n.code && "ENFILE" !== n.code)
              ? ("function" == typeof o && o.apply(this, arguments), f())
              : p([e, [t, r, i, o]]);
          });
        })(e, t, r, i);
      };
      var r = e.appendFile;
      r &&
        (e.appendFile = function (e, t, n, i) {
          "function" == typeof n && ((i = n), (n = null));
          return (function e(t, n, i, o) {
            return r(t, n, i, function (r) {
              !r || ("EMFILE" !== r.code && "ENFILE" !== r.code)
                ? ("function" == typeof o && o.apply(this, arguments), f())
                : p([e, [t, n, i, o]]);
            });
          })(e, t, n, i);
        });
      var i = e.readdir;
      function o(t) {
        return i.apply(e, t);
      }
      if (
        ((e.readdir = function (e, t, n) {
          var r = [e];
          "function" != typeof t ? r.push(t) : (n = t);
          return (
            r.push(function (e, t) {
              t && t.sort && t.sort();
              !e || ("EMFILE" !== e.code && "ENFILE" !== e.code)
                ? ("function" == typeof n && n.apply(this, arguments), f())
                : p([o, [r]]);
            }),
            o(r)
          );
        }),
        "v0.8" === process.version.substr(0, 4))
      ) {
        var l = a(e);
        (g = l.ReadStream), (y = l.WriteStream);
      }
      var c = e.ReadStream;
      c &&
        ((g.prototype = Object.create(c.prototype)),
        (g.prototype.open = function () {
          var e = this;
          w(e.path, e.flags, e.mode, function (t, n) {
            t
              ? (e.autoClose && e.destroy(), e.emit("error", t))
              : ((e.fd = n), e.emit("open", n), e.read());
          });
        }));
      var u = e.WriteStream;
      u &&
        ((y.prototype = Object.create(u.prototype)),
        (y.prototype.open = function () {
          var e = this;
          w(e.path, e.flags, e.mode, function (t, n) {
            t
              ? (e.destroy(), e.emit("error", t))
              : ((e.fd = n), e.emit("open", n));
          });
        })),
        Object.defineProperty(e, "ReadStream", {
          get: function () {
            return g;
          },
          set: function (e) {
            g = e;
          },
          enumerable: !0,
          configurable: !0,
        }),
        Object.defineProperty(e, "WriteStream", {
          get: function () {
            return y;
          },
          set: function (e) {
            y = e;
          },
          enumerable: !0,
          configurable: !0,
        });
      var h = g;
      Object.defineProperty(e, "FileReadStream", {
        get: function () {
          return h;
        },
        set: function (e) {
          h = e;
        },
        enumerable: !0,
        configurable: !0,
      });
      var m = y;
      function g(e, t) {
        return this instanceof g
          ? (c.apply(this, arguments), this)
          : g.apply(Object.create(g.prototype), arguments);
      }
      function y(e, t) {
        return this instanceof y
          ? (u.apply(this, arguments), this)
          : y.apply(Object.create(y.prototype), arguments);
      }
      Object.defineProperty(e, "FileWriteStream", {
        get: function () {
          return m;
        },
        set: function (e) {
          m = e;
        },
        enumerable: !0,
        configurable: !0,
      });
      var v = e.open;
      function w(e, t, n, r) {
        return (
          "function" == typeof n && ((r = n), (n = null)),
          (function e(t, n, r, i) {
            return v(t, n, r, function (o, s) {
              !o || ("EMFILE" !== o.code && "ENFILE" !== o.code)
                ? ("function" == typeof i && i.apply(this, arguments), f())
                : p([e, [t, n, r, i]]);
            });
          })(e, t, n, r)
        );
      }
      return (e.open = w), e;
    }
    function p(e) {
      u("ENQUEUE", e[0].name, e[1]), global[r].push(e);
    }
    function f() {
      var e = global[r].shift();
      e && (u("RETRY", e[0].name, e[1]), e[0].apply(null, e[1]));
    }
    (e.exports = d(l(o))),
      process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH &&
        !o.__patched &&
        ((e.exports = d(o)), (o.__patched = !0));
  },
  function (e, t, n) {
    e.exports = (function () {
      "use strict";
      var e = navigator.userAgent,
        t = navigator.platform,
        n = /gecko\/\d/i.test(e),
        r = /MSIE \d/.test(e),
        i = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),
        o = /Edge\/(\d+)/.exec(e),
        s = r || i || o,
        a = s && (r ? document.documentMode || 6 : +(o || i)[1]),
        l = !o && /WebKit\//.test(e),
        c = l && /Qt\/\d+\.\d+/.test(e),
        u = !o && /Chrome\//.test(e),
        h = /Opera\//.test(e),
        d = /Apple Computer/.test(navigator.vendor),
        p = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),
        f = /PhantomJS/.test(e),
        m = !o && /AppleWebKit/.test(e) && /Mobile\/\w+/.test(e),
        g = /Android/.test(e),
        y =
          m || g || /webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),
        v = m || /Mac/.test(t),
        w = /\bCrOS\b/.test(e),
        b = /win/i.test(t),
        S = h && e.match(/Version\/(\d*\.\d*)/);
      S && (S = Number(S[1])), S && S >= 15 && ((h = !1), (l = !0));
      var C = v && (c || (h && (null == S || S < 12.11))),
        E = n || (s && a >= 9);
      function k(e) {
        return new RegExp("(^|\\s)" + e + "(?:$|\\s)\\s*");
      }
      var x,
        R = function (e, t) {
          var n = e.className,
            r = k(t).exec(n);
          if (r) {
            var i = n.slice(r.index + r[0].length);
            e.className = n.slice(0, r.index) + (i ? r[1] + i : "");
          }
        };
      function T(e) {
        for (var t = e.childNodes.length; t > 0; --t)
          e.removeChild(e.firstChild);
        return e;
      }
      function D(e, t) {
        return T(e).appendChild(t);
      }
      function A(e, t, n, r) {
        var i = document.createElement(e);
        if (
          (n && (i.className = n),
          r && (i.style.cssText = r),
          "string" == typeof t)
        )
          i.appendChild(document.createTextNode(t));
        else if (t) for (var o = 0; o < t.length; ++o) i.appendChild(t[o]);
        return i;
      }
      function _(e, t, n, r) {
        var i = A(e, t, n, r);
        return i.setAttribute("role", "presentation"), i;
      }
      function M(e, t) {
        if ((3 == t.nodeType && (t = t.parentNode), e.contains))
          return e.contains(t);
        do {
          if ((11 == t.nodeType && (t = t.host), t == e)) return !0;
        } while ((t = t.parentNode));
      }
      function P() {
        var e;
        try {
          e = document.activeElement;
        } catch (t) {
          e = document.body || null;
        }
        for (; e && e.shadowRoot && e.shadowRoot.activeElement; )
          e = e.shadowRoot.activeElement;
        return e;
      }
      function I(e, t) {
        var n = e.className;
        k(t).test(n) || (e.className += (n ? " " : "") + t);
      }
      function O(e, t) {
        for (var n = e.split(" "), r = 0; r < n.length; r++)
          n[r] && !k(n[r]).test(t) && (t += " " + n[r]);
        return t;
      }
      x = document.createRange
        ? function (e, t, n, r) {
            var i = document.createRange();
            return i.setEnd(r || e, n), i.setStart(e, t), i;
          }
        : function (e, t, n) {
            var r = document.body.createTextRange();
            try {
              r.moveToElementText(e.parentNode);
            } catch (e) {
              return r;
            }
            return (
              r.collapse(!0),
              r.moveEnd("character", n),
              r.moveStart("character", t),
              r
            );
          };
      var L = function (e) {
        e.select();
      };
      function F(e) {
        var t = Array.prototype.slice.call(arguments, 1);
        return function () {
          return e.apply(null, t);
        };
      }
      function N(e, t, n) {
        for (var r in (t || (t = {}), e))
          !e.hasOwnProperty(r) ||
            (!1 === n && t.hasOwnProperty(r)) ||
            (t[r] = e[r]);
        return t;
      }
      function B(e, t, n, r, i) {
        null == t && -1 == (t = e.search(/[^\s\u00a0]/)) && (t = e.length);
        for (var o = r || 0, s = i || 0; ; ) {
          var a = e.indexOf("\t", o);
          if (a < 0 || a >= t) return s + (t - o);
          (s += a - o), (s += n - (s % n)), (o = a + 1);
        }
      }
      m
        ? (L = function (e) {
            (e.selectionStart = 0), (e.selectionEnd = e.value.length);
          })
        : s &&
          (L = function (e) {
            try {
              e.select();
            } catch (e) {}
          });
      var H = function () {
        (this.id = null),
          (this.f = null),
          (this.time = 0),
          (this.handler = F(this.onTimeout, this));
      };
      function z(e, t) {
        for (var n = 0; n < e.length; ++n) if (e[n] == t) return n;
        return -1;
      }
      (H.prototype.onTimeout = function (e) {
        (e.id = 0),
          e.time <= +new Date()
            ? e.f()
            : setTimeout(e.handler, e.time - +new Date());
      }),
        (H.prototype.set = function (e, t) {
          this.f = t;
          var n = +new Date() + e;
          (!this.id || n < this.time) &&
            (clearTimeout(this.id),
            (this.id = setTimeout(this.handler, e)),
            (this.time = n));
        });
      var U = {
          toString: function () {
            return "CodeMirror.Pass";
          },
        },
        W = { scroll: !1 },
        j = { origin: "*mouse" },
        V = { origin: "+move" };
      function G(e, t, n) {
        for (var r = 0, i = 0; ; ) {
          var o = e.indexOf("\t", r);
          -1 == o && (o = e.length);
          var s = o - r;
          if (o == e.length || i + s >= t) return r + Math.min(s, t - i);
          if (((i += o - r), (r = o + 1), (i += n - (i % n)) >= t)) return r;
        }
      }
      var $ = [""];
      function q(e) {
        for (; $.length <= e; ) $.push(K($) + " ");
        return $[e];
      }
      function K(e) {
        return e[e.length - 1];
      }
      function Y(e, t) {
        for (var n = [], r = 0; r < e.length; r++) n[r] = t(e[r], r);
        return n;
      }
      function Q() {}
      function Z(e, t) {
        var n;
        return (
          Object.create
            ? (n = Object.create(e))
            : ((Q.prototype = e), (n = new Q())),
          t && N(t, n),
          n
        );
      }
      var X = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;
      function J(e) {
        return (
          /\w/.test(e) ||
          (e > "" && (e.toUpperCase() != e.toLowerCase() || X.test(e)))
        );
      }
      function ee(e, t) {
        return t ? !!(t.source.indexOf("\\w") > -1 && J(e)) || t.test(e) : J(e);
      }
      function te(e) {
        for (var t in e) if (e.hasOwnProperty(t) && e[t]) return !1;
        return !0;
      }
      var ne = /[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;
      function re(e) {
        return e.charCodeAt(0) >= 768 && ne.test(e);
      }
      function ie(e, t, n) {
        for (; (n < 0 ? t > 0 : t < e.length) && re(e.charAt(t)); ) t += n;
        return t;
      }
      function oe(e, t, n) {
        for (var r = t > n ? -1 : 1; ; ) {
          if (t == n) return t;
          var i = (t + n) / 2,
            o = r < 0 ? Math.ceil(i) : Math.floor(i);
          if (o == t) return e(o) ? t : n;
          e(o) ? (n = o) : (t = o + r);
        }
      }
      var se = null;
      function ae(e, t, n) {
        var r;
        se = null;
        for (var i = 0; i < e.length; ++i) {
          var o = e[i];
          if (o.from < t && o.to > t) return i;
          o.to == t && (o.from != o.to && "before" == n ? (r = i) : (se = i)),
            o.from == t &&
              (o.from != o.to && "before" != n ? (r = i) : (se = i));
        }
        return null != r ? r : se;
      }
      var le = (function () {
        var e = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,
          t = /[stwN]/,
          n = /[LRr]/,
          r = /[Lb1n]/,
          i = /[1n]/;
        function o(e, t, n) {
          (this.level = e), (this.from = t), (this.to = n);
        }
        return function (s, a) {
          var l = "ltr" == a ? "L" : "R";
          if (0 == s.length || ("ltr" == a && !e.test(s))) return !1;
          for (var c, u = s.length, h = [], d = 0; d < u; ++d)
            h.push(
              (c = s.charCodeAt(d)) <= 247
                ? "bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN".charAt(
                    c
                  )
                : 1424 <= c && c <= 1524
                ? "R"
                : 1536 <= c && c <= 1785
                ? "nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111".charAt(
                    c - 1536
                  )
                : 1774 <= c && c <= 2220
                ? "r"
                : 8192 <= c && c <= 8203
                ? "w"
                : 8204 == c
                ? "b"
                : "L"
            );
          for (var p = 0, f = l; p < u; ++p) {
            var m = h[p];
            "m" == m ? (h[p] = f) : (f = m);
          }
          for (var g = 0, y = l; g < u; ++g) {
            var v = h[g];
            "1" == v && "r" == y
              ? (h[g] = "n")
              : n.test(v) && ((y = v), "r" == v && (h[g] = "R"));
          }
          for (var w = 1, b = h[0]; w < u - 1; ++w) {
            var S = h[w];
            "+" == S && "1" == b && "1" == h[w + 1]
              ? (h[w] = "1")
              : "," != S ||
                b != h[w + 1] ||
                ("1" != b && "n" != b) ||
                (h[w] = b),
              (b = S);
          }
          for (var C = 0; C < u; ++C) {
            var E = h[C];
            if ("," == E) h[C] = "N";
            else if ("%" == E) {
              var k = void 0;
              for (k = C + 1; k < u && "%" == h[k]; ++k);
              for (
                var x =
                    (C && "!" == h[C - 1]) || (k < u && "1" == h[k])
                      ? "1"
                      : "N",
                  R = C;
                R < k;
                ++R
              )
                h[R] = x;
              C = k - 1;
            }
          }
          for (var T = 0, D = l; T < u; ++T) {
            var A = h[T];
            "L" == D && "1" == A ? (h[T] = "L") : n.test(A) && (D = A);
          }
          for (var _ = 0; _ < u; ++_)
            if (t.test(h[_])) {
              var M = void 0;
              for (M = _ + 1; M < u && t.test(h[M]); ++M);
              for (
                var P = "L" == (_ ? h[_ - 1] : l),
                  I = P == ("L" == (M < u ? h[M] : l)) ? (P ? "L" : "R") : l,
                  O = _;
                O < M;
                ++O
              )
                h[O] = I;
              _ = M - 1;
            }
          for (var L, F = [], N = 0; N < u; )
            if (r.test(h[N])) {
              var B = N;
              for (++N; N < u && r.test(h[N]); ++N);
              F.push(new o(0, B, N));
            } else {
              var H = N,
                z = F.length;
              for (++N; N < u && "L" != h[N]; ++N);
              for (var U = H; U < N; )
                if (i.test(h[U])) {
                  H < U && F.splice(z, 0, new o(1, H, U));
                  var W = U;
                  for (++U; U < N && i.test(h[U]); ++U);
                  F.splice(z, 0, new o(2, W, U)), (H = U);
                } else ++U;
              H < N && F.splice(z, 0, new o(1, H, N));
            }
          return (
            "ltr" == a &&
              (1 == F[0].level &&
                (L = s.match(/^\s+/)) &&
                ((F[0].from = L[0].length),
                F.unshift(new o(0, 0, L[0].length))),
              1 == K(F).level &&
                (L = s.match(/\s+$/)) &&
                ((K(F).to -= L[0].length),
                F.push(new o(0, u - L[0].length, u)))),
            "rtl" == a ? F.reverse() : F
          );
        };
      })();
      function ce(e, t) {
        var n = e.order;
        return null == n && (n = e.order = le(e.text, t)), n;
      }
      var ue = [],
        he = function (e, t, n) {
          if (e.addEventListener) e.addEventListener(t, n, !1);
          else if (e.attachEvent) e.attachEvent("on" + t, n);
          else {
            var r = e._handlers || (e._handlers = {});
            r[t] = (r[t] || ue).concat(n);
          }
        };
      function de(e, t) {
        return (e._handlers && e._handlers[t]) || ue;
      }
      function pe(e, t, n) {
        if (e.removeEventListener) e.removeEventListener(t, n, !1);
        else if (e.detachEvent) e.detachEvent("on" + t, n);
        else {
          var r = e._handlers,
            i = r && r[t];
          if (i) {
            var o = z(i, n);
            o > -1 && (r[t] = i.slice(0, o).concat(i.slice(o + 1)));
          }
        }
      }
      function fe(e, t) {
        var n = de(e, t);
        if (n.length)
          for (
            var r = Array.prototype.slice.call(arguments, 2), i = 0;
            i < n.length;
            ++i
          )
            n[i].apply(null, r);
      }
      function me(e, t, n) {
        return (
          "string" == typeof t &&
            (t = {
              type: t,
              preventDefault: function () {
                this.defaultPrevented = !0;
              },
            }),
          fe(e, n || t.type, e, t),
          Se(t) || t.codemirrorIgnore
        );
      }
      function ge(e) {
        var t = e._handlers && e._handlers.cursorActivity;
        if (t)
          for (
            var n =
                e.curOp.cursorActivityHandlers ||
                (e.curOp.cursorActivityHandlers = []),
              r = 0;
            r < t.length;
            ++r
          )
            -1 == z(n, t[r]) && n.push(t[r]);
      }
      function ye(e, t) {
        return de(e, t).length > 0;
      }
      function ve(e) {
        (e.prototype.on = function (e, t) {
          he(this, e, t);
        }),
          (e.prototype.off = function (e, t) {
            pe(this, e, t);
          });
      }
      function we(e) {
        e.preventDefault ? e.preventDefault() : (e.returnValue = !1);
      }
      function be(e) {
        e.stopPropagation ? e.stopPropagation() : (e.cancelBubble = !0);
      }
      function Se(e) {
        return null != e.defaultPrevented
          ? e.defaultPrevented
          : 0 == e.returnValue;
      }
      function Ce(e) {
        we(e), be(e);
      }
      function Ee(e) {
        return e.target || e.srcElement;
      }
      function ke(e) {
        var t = e.which;
        return (
          null == t &&
            (1 & e.button
              ? (t = 1)
              : 2 & e.button
              ? (t = 3)
              : 4 & e.button && (t = 2)),
          v && e.ctrlKey && 1 == t && (t = 3),
          t
        );
      }
      var xe,
        Re,
        Te = (function () {
          if (s && a < 9) return !1;
          var e = A("div");
          return "draggable" in e || "dragDrop" in e;
        })();
      function De(e) {
        if (null == xe) {
          var t = A("span", "​");
          D(e, A("span", [t, document.createTextNode("x")])),
            0 != e.firstChild.offsetHeight &&
              (xe = t.offsetWidth <= 1 && t.offsetHeight > 2 && !(s && a < 8));
        }
        var n = xe
          ? A("span", "​")
          : A(
              "span",
              " ",
              null,
              "display: inline-block; width: 1px; margin-right: -1px"
            );
        return n.setAttribute("cm-text", ""), n;
      }
      function Ae(e) {
        if (null != Re) return Re;
        var t = D(e, document.createTextNode("AخA")),
          n = x(t, 0, 1).getBoundingClientRect(),
          r = x(t, 1, 2).getBoundingClientRect();
        return T(e), !(!n || n.left == n.right) && (Re = r.right - n.right < 3);
      }
      var _e,
        Me =
          3 != "\n\nb".split(/\n/).length
            ? function (e) {
                for (var t = 0, n = [], r = e.length; t <= r; ) {
                  var i = e.indexOf("\n", t);
                  -1 == i && (i = e.length);
                  var o = e.slice(t, "\r" == e.charAt(i - 1) ? i - 1 : i),
                    s = o.indexOf("\r");
                  -1 != s
                    ? (n.push(o.slice(0, s)), (t += s + 1))
                    : (n.push(o), (t = i + 1));
                }
                return n;
              }
            : function (e) {
                return e.split(/\r\n?|\n/);
              },
        Pe = window.getSelection
          ? function (e) {
              try {
                return e.selectionStart != e.selectionEnd;
              } catch (e) {
                return !1;
              }
            }
          : function (e) {
              var t;
              try {
                t = e.ownerDocument.selection.createRange();
              } catch (e) {}
              return (
                !(!t || t.parentElement() != e) &&
                0 != t.compareEndPoints("StartToEnd", t)
              );
            },
        Ie =
          "oncopy" in (_e = A("div")) ||
          (_e.setAttribute("oncopy", "return;"),
          "function" == typeof _e.oncopy),
        Oe = null,
        Le = {},
        Fe = {};
      function Ne(e, t) {
        arguments.length > 2 &&
          (t.dependencies = Array.prototype.slice.call(arguments, 2)),
          (Le[e] = t);
      }
      function Be(e) {
        if ("string" == typeof e && Fe.hasOwnProperty(e)) e = Fe[e];
        else if (e && "string" == typeof e.name && Fe.hasOwnProperty(e.name)) {
          var t = Fe[e.name];
          "string" == typeof t && (t = { name: t }),
            ((e = Z(t, e)).name = t.name);
        } else {
          if ("string" == typeof e && /^[\w\-]+\/[\w\-]+\+xml$/.test(e))
            return Be("application/xml");
          if ("string" == typeof e && /^[\w\-]+\/[\w\-]+\+json$/.test(e))
            return Be("application/json");
        }
        return "string" == typeof e ? { name: e } : e || { name: "null" };
      }
      function He(e, t) {
        t = Be(t);
        var n = Le[t.name];
        if (!n) return He(e, "text/plain");
        var r = n(e, t);
        if (ze.hasOwnProperty(t.name)) {
          var i = ze[t.name];
          for (var o in i)
            i.hasOwnProperty(o) &&
              (r.hasOwnProperty(o) && (r["_" + o] = r[o]), (r[o] = i[o]));
        }
        if (
          ((r.name = t.name),
          t.helperType && (r.helperType = t.helperType),
          t.modeProps)
        )
          for (var s in t.modeProps) r[s] = t.modeProps[s];
        return r;
      }
      var ze = {};
      function Ue(e, t) {
        N(t, ze.hasOwnProperty(e) ? ze[e] : (ze[e] = {}));
      }
      function We(e, t) {
        if (!0 === t) return t;
        if (e.copyState) return e.copyState(t);
        var n = {};
        for (var r in t) {
          var i = t[r];
          i instanceof Array && (i = i.concat([])), (n[r] = i);
        }
        return n;
      }
      function je(e, t) {
        for (var n; e.innerMode && (n = e.innerMode(t)) && n.mode != e; )
          (t = n.state), (e = n.mode);
        return n || { mode: e, state: t };
      }
      function Ve(e, t, n) {
        return !e.startState || e.startState(t, n);
      }
      var Ge = function (e, t, n) {
        (this.pos = this.start = 0),
          (this.string = e),
          (this.tabSize = t || 8),
          (this.lastColumnPos = this.lastColumnValue = 0),
          (this.lineStart = 0),
          (this.lineOracle = n);
      };
      function $e(e, t) {
        if ((t -= e.first) < 0 || t >= e.size)
          throw new Error(
            "There is no line " + (t + e.first) + " in the document."
          );
        for (var n = e; !n.lines; )
          for (var r = 0; ; ++r) {
            var i = n.children[r],
              o = i.chunkSize();
            if (t < o) {
              n = i;
              break;
            }
            t -= o;
          }
        return n.lines[t];
      }
      function qe(e, t, n) {
        var r = [],
          i = t.line;
        return (
          e.iter(t.line, n.line + 1, function (e) {
            var o = e.text;
            i == n.line && (o = o.slice(0, n.ch)),
              i == t.line && (o = o.slice(t.ch)),
              r.push(o),
              ++i;
          }),
          r
        );
      }
      function Ke(e, t, n) {
        var r = [];
        return (
          e.iter(t, n, function (e) {
            r.push(e.text);
          }),
          r
        );
      }
      function Ye(e, t) {
        var n = t - e.height;
        if (n) for (var r = e; r; r = r.parent) r.height += n;
      }
      function Qe(e) {
        if (null == e.parent) return null;
        for (
          var t = e.parent, n = z(t.lines, e), r = t.parent;
          r;
          t = r, r = r.parent
        )
          for (var i = 0; r.children[i] != t; ++i)
            n += r.children[i].chunkSize();
        return n + t.first;
      }
      function Ze(e, t) {
        var n = e.first;
        e: do {
          for (var r = 0; r < e.children.length; ++r) {
            var i = e.children[r],
              o = i.height;
            if (t < o) {
              e = i;
              continue e;
            }
            (t -= o), (n += i.chunkSize());
          }
          return n;
        } while (!e.lines);
        for (var s = 0; s < e.lines.length; ++s) {
          var a = e.lines[s].height;
          if (t < a) break;
          t -= a;
        }
        return n + s;
      }
      function Xe(e, t) {
        return t >= e.first && t < e.first + e.size;
      }
      function Je(e, t) {
        return String(e.lineNumberFormatter(t + e.firstLineNumber));
      }
      function et(e, t, n) {
        if ((void 0 === n && (n = null), !(this instanceof et)))
          return new et(e, t, n);
        (this.line = e), (this.ch = t), (this.sticky = n);
      }
      function tt(e, t) {
        return e.line - t.line || e.ch - t.ch;
      }
      function nt(e, t) {
        return e.sticky == t.sticky && 0 == tt(e, t);
      }
      function rt(e) {
        return et(e.line, e.ch);
      }
      function it(e, t) {
        return tt(e, t) < 0 ? t : e;
      }
      function ot(e, t) {
        return tt(e, t) < 0 ? e : t;
      }
      function st(e, t) {
        return Math.max(e.first, Math.min(t, e.first + e.size - 1));
      }
      function at(e, t) {
        if (t.line < e.first) return et(e.first, 0);
        var n = e.first + e.size - 1;
        return t.line > n
          ? et(n, $e(e, n).text.length)
          : (function (e, t) {
              var n = e.ch;
              return null == n || n > t
                ? et(e.line, t)
                : n < 0
                ? et(e.line, 0)
                : e;
            })(t, $e(e, t.line).text.length);
      }
      function lt(e, t) {
        for (var n = [], r = 0; r < t.length; r++) n[r] = at(e, t[r]);
        return n;
      }
      (Ge.prototype.eol = function () {
        return this.pos >= this.string.length;
      }),
        (Ge.prototype.sol = function () {
          return this.pos == this.lineStart;
        }),
        (Ge.prototype.peek = function () {
          return this.string.charAt(this.pos) || void 0;
        }),
        (Ge.prototype.next = function () {
          if (this.pos < this.string.length)
            return this.string.charAt(this.pos++);
        }),
        (Ge.prototype.eat = function (e) {
          var t = this.string.charAt(this.pos);
          if ("string" == typeof e ? t == e : t && (e.test ? e.test(t) : e(t)))
            return ++this.pos, t;
        }),
        (Ge.prototype.eatWhile = function (e) {
          for (var t = this.pos; this.eat(e); );
          return this.pos > t;
        }),
        (Ge.prototype.eatSpace = function () {
          for (
            var e = this.pos;
            /[\s\u00a0]/.test(this.string.charAt(this.pos));

          )
            ++this.pos;
          return this.pos > e;
        }),
        (Ge.prototype.skipToEnd = function () {
          this.pos = this.string.length;
        }),
        (Ge.prototype.skipTo = function (e) {
          var t = this.string.indexOf(e, this.pos);
          if (t > -1) return (this.pos = t), !0;
        }),
        (Ge.prototype.backUp = function (e) {
          this.pos -= e;
        }),
        (Ge.prototype.column = function () {
          return (
            this.lastColumnPos < this.start &&
              ((this.lastColumnValue = B(
                this.string,
                this.start,
                this.tabSize,
                this.lastColumnPos,
                this.lastColumnValue
              )),
              (this.lastColumnPos = this.start)),
            this.lastColumnValue -
              (this.lineStart
                ? B(this.string, this.lineStart, this.tabSize)
                : 0)
          );
        }),
        (Ge.prototype.indentation = function () {
          return (
            B(this.string, null, this.tabSize) -
            (this.lineStart ? B(this.string, this.lineStart, this.tabSize) : 0)
          );
        }),
        (Ge.prototype.match = function (e, t, n) {
          if ("string" != typeof e) {
            var r = this.string.slice(this.pos).match(e);
            return r && r.index > 0
              ? null
              : (r && !1 !== t && (this.pos += r[0].length), r);
          }
          var i = function (e) {
            return n ? e.toLowerCase() : e;
          };
          if (i(this.string.substr(this.pos, e.length)) == i(e))
            return !1 !== t && (this.pos += e.length), !0;
        }),
        (Ge.prototype.current = function () {
          return this.string.slice(this.start, this.pos);
        }),
        (Ge.prototype.hideFirstChars = function (e, t) {
          this.lineStart += e;
          try {
            return t();
          } finally {
            this.lineStart -= e;
          }
        }),
        (Ge.prototype.lookAhead = function (e) {
          var t = this.lineOracle;
          return t && t.lookAhead(e);
        }),
        (Ge.prototype.baseToken = function () {
          var e = this.lineOracle;
          return e && e.baseToken(this.pos);
        });
      var ct = function (e, t) {
          (this.state = e), (this.lookAhead = t);
        },
        ut = function (e, t, n, r) {
          (this.state = t),
            (this.doc = e),
            (this.line = n),
            (this.maxLookAhead = r || 0),
            (this.baseTokens = null),
            (this.baseTokenPos = 1);
        };
      function ht(e, t, n, r) {
        var i = [e.state.modeGen],
          o = {};
        bt(
          e,
          t.text,
          e.doc.mode,
          n,
          function (e, t) {
            return i.push(e, t);
          },
          o,
          r
        );
        for (
          var s = n.state,
            a = function (r) {
              n.baseTokens = i;
              var a = e.state.overlays[r],
                l = 1,
                c = 0;
              (n.state = !0),
                bt(
                  e,
                  t.text,
                  a.mode,
                  n,
                  function (e, t) {
                    for (var n = l; c < e; ) {
                      var r = i[l];
                      r > e && i.splice(l, 1, e, i[l + 1], r),
                        (l += 2),
                        (c = Math.min(e, r));
                    }
                    if (t)
                      if (a.opaque)
                        i.splice(n, l - n, e, "overlay " + t), (l = n + 2);
                      else
                        for (; n < l; n += 2) {
                          var o = i[n + 1];
                          i[n + 1] = (o ? o + " " : "") + "overlay " + t;
                        }
                  },
                  o
                ),
                (n.state = s),
                (n.baseTokens = null),
                (n.baseTokenPos = 1);
            },
            l = 0;
          l < e.state.overlays.length;
          ++l
        )
          a(l);
        return { styles: i, classes: o.bgClass || o.textClass ? o : null };
      }
      function dt(e, t, n) {
        if (!t.styles || t.styles[0] != e.state.modeGen) {
          var r = pt(e, Qe(t)),
            i =
              t.text.length > e.options.maxHighlightLength &&
              We(e.doc.mode, r.state),
            o = ht(e, t, r);
          i && (r.state = i),
            (t.stateAfter = r.save(!i)),
            (t.styles = o.styles),
            o.classes
              ? (t.styleClasses = o.classes)
              : t.styleClasses && (t.styleClasses = null),
            n === e.doc.highlightFrontier &&
              (e.doc.modeFrontier = Math.max(
                e.doc.modeFrontier,
                ++e.doc.highlightFrontier
              ));
        }
        return t.styles;
      }
      function pt(e, t, n) {
        var r = e.doc,
          i = e.display;
        if (!r.mode.startState) return new ut(r, !0, t);
        var o = (function (e, t, n) {
            for (
              var r,
                i,
                o = e.doc,
                s = n ? -1 : t - (e.doc.mode.innerMode ? 1e3 : 100),
                a = t;
              a > s;
              --a
            ) {
              if (a <= o.first) return o.first;
              var l = $e(o, a - 1),
                c = l.stateAfter;
              if (
                c &&
                (!n ||
                  a + (c instanceof ct ? c.lookAhead : 0) <= o.modeFrontier)
              )
                return a;
              var u = B(l.text, null, e.options.tabSize);
              (null == i || r > u) && ((i = a - 1), (r = u));
            }
            return i;
          })(e, t, n),
          s = o > r.first && $e(r, o - 1).stateAfter,
          a = s ? ut.fromSaved(r, s, o) : new ut(r, Ve(r.mode), o);
        return (
          r.iter(o, t, function (n) {
            ft(e, n.text, a);
            var r = a.line;
            (n.stateAfter =
              r == t - 1 || r % 5 == 0 || (r >= i.viewFrom && r < i.viewTo)
                ? a.save()
                : null),
              a.nextLine();
          }),
          n && (r.modeFrontier = a.line),
          a
        );
      }
      function ft(e, t, n, r) {
        var i = e.doc.mode,
          o = new Ge(t, e.options.tabSize, n);
        for (o.start = o.pos = r || 0, "" == t && mt(i, n.state); !o.eol(); )
          gt(i, o, n.state), (o.start = o.pos);
      }
      function mt(e, t) {
        if (e.blankLine) return e.blankLine(t);
        if (e.innerMode) {
          var n = je(e, t);
          return n.mode.blankLine ? n.mode.blankLine(n.state) : void 0;
        }
      }
      function gt(e, t, n, r) {
        for (var i = 0; i < 10; i++) {
          r && (r[0] = je(e, n).mode);
          var o = e.token(t, n);
          if (t.pos > t.start) return o;
        }
        throw new Error("Mode " + e.name + " failed to advance stream.");
      }
      (ut.prototype.lookAhead = function (e) {
        var t = this.doc.getLine(this.line + e);
        return null != t && e > this.maxLookAhead && (this.maxLookAhead = e), t;
      }),
        (ut.prototype.baseToken = function (e) {
          if (!this.baseTokens) return null;
          for (; this.baseTokens[this.baseTokenPos] <= e; )
            this.baseTokenPos += 2;
          var t = this.baseTokens[this.baseTokenPos + 1];
          return {
            type: t && t.replace(/( |^)overlay .*/, ""),
            size: this.baseTokens[this.baseTokenPos] - e,
          };
        }),
        (ut.prototype.nextLine = function () {
          this.line++, this.maxLookAhead > 0 && this.maxLookAhead--;
        }),
        (ut.fromSaved = function (e, t, n) {
          return t instanceof ct
            ? new ut(e, We(e.mode, t.state), n, t.lookAhead)
            : new ut(e, We(e.mode, t), n);
        }),
        (ut.prototype.save = function (e) {
          var t = !1 !== e ? We(this.doc.mode, this.state) : this.state;
          return this.maxLookAhead > 0 ? new ct(t, this.maxLookAhead) : t;
        });
      var yt = function (e, t, n) {
        (this.start = e.start),
          (this.end = e.pos),
          (this.string = e.current()),
          (this.type = t || null),
          (this.state = n);
      };
      function vt(e, t, n, r) {
        var i,
          o,
          s = e.doc,
          a = s.mode,
          l = $e(s, (t = at(s, t)).line),
          c = pt(e, t.line, n),
          u = new Ge(l.text, e.options.tabSize, c);
        for (r && (o = []); (r || u.pos < t.ch) && !u.eol(); )
          (u.start = u.pos),
            (i = gt(a, u, c.state)),
            r && o.push(new yt(u, i, We(s.mode, c.state)));
        return r ? o : new yt(u, i, c.state);
      }
      function wt(e, t) {
        if (e)
          for (;;) {
            var n = e.match(/(?:^|\s+)line-(background-)?(\S+)/);
            if (!n) break;
            e = e.slice(0, n.index) + e.slice(n.index + n[0].length);
            var r = n[1] ? "bgClass" : "textClass";
            null == t[r]
              ? (t[r] = n[2])
              : new RegExp("(?:^|s)" + n[2] + "(?:$|s)").test(t[r]) ||
                (t[r] += " " + n[2]);
          }
        return e;
      }
      function bt(e, t, n, r, i, o, s) {
        var a = n.flattenSpans;
        null == a && (a = e.options.flattenSpans);
        var l,
          c = 0,
          u = null,
          h = new Ge(t, e.options.tabSize, r),
          d = e.options.addModeClass && [null];
        for ("" == t && wt(mt(n, r.state), o); !h.eol(); ) {
          if (
            (h.pos > e.options.maxHighlightLength
              ? ((a = !1),
                s && ft(e, t, r, h.pos),
                (h.pos = t.length),
                (l = null))
              : (l = wt(gt(n, h, r.state, d), o)),
            d)
          ) {
            var p = d[0].name;
            p && (l = "m-" + (l ? p + " " + l : p));
          }
          if (!a || u != l) {
            for (; c < h.start; ) i((c = Math.min(h.start, c + 5e3)), u);
            u = l;
          }
          h.start = h.pos;
        }
        for (; c < h.pos; ) {
          var f = Math.min(h.pos, c + 5e3);
          i(f, u), (c = f);
        }
      }
      var St = !1,
        Ct = !1;
      function Et(e, t, n) {
        (this.marker = e), (this.from = t), (this.to = n);
      }
      function kt(e, t) {
        if (e)
          for (var n = 0; n < e.length; ++n) {
            var r = e[n];
            if (r.marker == t) return r;
          }
      }
      function xt(e, t) {
        for (var n, r = 0; r < e.length; ++r)
          e[r] != t && (n || (n = [])).push(e[r]);
        return n;
      }
      function Rt(e, t) {
        if (t.full) return null;
        var n = Xe(e, t.from.line) && $e(e, t.from.line).markedSpans,
          r = Xe(e, t.to.line) && $e(e, t.to.line).markedSpans;
        if (!n && !r) return null;
        var i = t.from.ch,
          o = t.to.ch,
          s = 0 == tt(t.from, t.to),
          a = (function (e, t, n) {
            var r;
            if (e)
              for (var i = 0; i < e.length; ++i) {
                var o = e[i],
                  s = o.marker;
                if (
                  null == o.from ||
                  (s.inclusiveLeft ? o.from <= t : o.from < t) ||
                  (o.from == t &&
                    "bookmark" == s.type &&
                    (!n || !o.marker.insertLeft))
                ) {
                  var a =
                    null == o.to || (s.inclusiveRight ? o.to >= t : o.to > t);
                  (r || (r = [])).push(new Et(s, o.from, a ? null : o.to));
                }
              }
            return r;
          })(n, i, s),
          l = (function (e, t, n) {
            var r;
            if (e)
              for (var i = 0; i < e.length; ++i) {
                var o = e[i],
                  s = o.marker;
                if (
                  null == o.to ||
                  (s.inclusiveRight ? o.to >= t : o.to > t) ||
                  (o.from == t &&
                    "bookmark" == s.type &&
                    (!n || o.marker.insertLeft))
                ) {
                  var a =
                    null == o.from ||
                    (s.inclusiveLeft ? o.from <= t : o.from < t);
                  (r || (r = [])).push(
                    new Et(
                      s,
                      a ? null : o.from - t,
                      null == o.to ? null : o.to - t
                    )
                  );
                }
              }
            return r;
          })(r, o, s),
          c = 1 == t.text.length,
          u = K(t.text).length + (c ? i : 0);
        if (a)
          for (var h = 0; h < a.length; ++h) {
            var d = a[h];
            if (null == d.to) {
              var p = kt(l, d.marker);
              p ? c && (d.to = null == p.to ? null : p.to + u) : (d.to = i);
            }
          }
        if (l)
          for (var f = 0; f < l.length; ++f) {
            var m = l[f];
            null != m.to && (m.to += u),
              null == m.from
                ? kt(a, m.marker) ||
                  ((m.from = u), c && (a || (a = [])).push(m))
                : ((m.from += u), c && (a || (a = [])).push(m));
          }
        a && (a = Tt(a)), l && l != a && (l = Tt(l));
        var g = [a];
        if (!c) {
          var y,
            v = t.text.length - 2;
          if (v > 0 && a)
            for (var w = 0; w < a.length; ++w)
              null == a[w].to &&
                (y || (y = [])).push(new Et(a[w].marker, null, null));
          for (var b = 0; b < v; ++b) g.push(y);
          g.push(l);
        }
        return g;
      }
      function Tt(e) {
        for (var t = 0; t < e.length; ++t) {
          var n = e[t];
          null != n.from &&
            n.from == n.to &&
            !1 !== n.marker.clearWhenEmpty &&
            e.splice(t--, 1);
        }
        return e.length ? e : null;
      }
      function Dt(e) {
        var t = e.markedSpans;
        if (t) {
          for (var n = 0; n < t.length; ++n) t[n].marker.detachLine(e);
          e.markedSpans = null;
        }
      }
      function At(e, t) {
        if (t) {
          for (var n = 0; n < t.length; ++n) t[n].marker.attachLine(e);
          e.markedSpans = t;
        }
      }
      function _t(e) {
        return e.inclusiveLeft ? -1 : 0;
      }
      function Mt(e) {
        return e.inclusiveRight ? 1 : 0;
      }
      function Pt(e, t) {
        var n = e.lines.length - t.lines.length;
        if (0 != n) return n;
        var r = e.find(),
          i = t.find(),
          o = tt(r.from, i.from) || _t(e) - _t(t);
        if (o) return -o;
        var s = tt(r.to, i.to) || Mt(e) - Mt(t);
        return s || t.id - e.id;
      }
      function It(e, t) {
        var n,
          r = Ct && e.markedSpans;
        if (r)
          for (var i = void 0, o = 0; o < r.length; ++o)
            (i = r[o]).marker.collapsed &&
              null == (t ? i.from : i.to) &&
              (!n || Pt(n, i.marker) < 0) &&
              (n = i.marker);
        return n;
      }
      function Ot(e) {
        return It(e, !0);
      }
      function Lt(e) {
        return It(e, !1);
      }
      function Ft(e, t) {
        var n,
          r = Ct && e.markedSpans;
        if (r)
          for (var i = 0; i < r.length; ++i) {
            var o = r[i];
            o.marker.collapsed &&
              (null == o.from || o.from < t) &&
              (null == o.to || o.to > t) &&
              (!n || Pt(n, o.marker) < 0) &&
              (n = o.marker);
          }
        return n;
      }
      function Nt(e, t, n, r, i) {
        var o = $e(e, t),
          s = Ct && o.markedSpans;
        if (s)
          for (var a = 0; a < s.length; ++a) {
            var l = s[a];
            if (l.marker.collapsed) {
              var c = l.marker.find(0),
                u = tt(c.from, n) || _t(l.marker) - _t(i),
                h = tt(c.to, r) || Mt(l.marker) - Mt(i);
              if (
                !((u >= 0 && h <= 0) || (u <= 0 && h >= 0)) &&
                ((u <= 0 &&
                  (l.marker.inclusiveRight && i.inclusiveLeft
                    ? tt(c.to, n) >= 0
                    : tt(c.to, n) > 0)) ||
                  (u >= 0 &&
                    (l.marker.inclusiveRight && i.inclusiveLeft
                      ? tt(c.from, r) <= 0
                      : tt(c.from, r) < 0)))
              )
                return !0;
            }
          }
      }
      function Bt(e) {
        for (var t; (t = Ot(e)); ) e = t.find(-1, !0).line;
        return e;
      }
      function Ht(e, t) {
        var n = $e(e, t),
          r = Bt(n);
        return n == r ? t : Qe(r);
      }
      function zt(e, t) {
        if (t > e.lastLine()) return t;
        var n,
          r = $e(e, t);
        if (!Ut(e, r)) return t;
        for (; (n = Lt(r)); ) r = n.find(1, !0).line;
        return Qe(r) + 1;
      }
      function Ut(e, t) {
        var n = Ct && t.markedSpans;
        if (n)
          for (var r = void 0, i = 0; i < n.length; ++i)
            if ((r = n[i]).marker.collapsed) {
              if (null == r.from) return !0;
              if (
                !r.marker.widgetNode &&
                0 == r.from &&
                r.marker.inclusiveLeft &&
                Wt(e, t, r)
              )
                return !0;
            }
      }
      function Wt(e, t, n) {
        if (null == n.to) {
          var r = n.marker.find(1, !0);
          return Wt(e, r.line, kt(r.line.markedSpans, n.marker));
        }
        if (n.marker.inclusiveRight && n.to == t.text.length) return !0;
        for (var i = void 0, o = 0; o < t.markedSpans.length; ++o)
          if (
            (i = t.markedSpans[o]).marker.collapsed &&
            !i.marker.widgetNode &&
            i.from == n.to &&
            (null == i.to || i.to != n.from) &&
            (i.marker.inclusiveLeft || n.marker.inclusiveRight) &&
            Wt(e, t, i)
          )
            return !0;
      }
      function jt(e) {
        for (
          var t = 0, n = (e = Bt(e)).parent, r = 0;
          r < n.lines.length;
          ++r
        ) {
          var i = n.lines[r];
          if (i == e) break;
          t += i.height;
        }
        for (var o = n.parent; o; o = (n = o).parent)
          for (var s = 0; s < o.children.length; ++s) {
            var a = o.children[s];
            if (a == n) break;
            t += a.height;
          }
        return t;
      }
      function Vt(e) {
        if (0 == e.height) return 0;
        for (var t, n = e.text.length, r = e; (t = Ot(r)); ) {
          var i = t.find(0, !0);
          (r = i.from.line), (n += i.from.ch - i.to.ch);
        }
        for (r = e; (t = Lt(r)); ) {
          var o = t.find(0, !0);
          (n -= r.text.length - o.from.ch),
            (n += (r = o.to.line).text.length - o.to.ch);
        }
        return n;
      }
      function Gt(e) {
        var t = e.display,
          n = e.doc;
        (t.maxLine = $e(n, n.first)),
          (t.maxLineLength = Vt(t.maxLine)),
          (t.maxLineChanged = !0),
          n.iter(function (e) {
            var n = Vt(e);
            n > t.maxLineLength && ((t.maxLineLength = n), (t.maxLine = e));
          });
      }
      var $t = function (e, t, n) {
        (this.text = e), At(this, t), (this.height = n ? n(this) : 1);
      };
      function qt(e) {
        (e.parent = null), Dt(e);
      }
      ($t.prototype.lineNo = function () {
        return Qe(this);
      }),
        ve($t);
      var Kt = {},
        Yt = {};
      function Qt(e, t) {
        if (!e || /^\s*$/.test(e)) return null;
        var n = t.addModeClass ? Yt : Kt;
        return n[e] || (n[e] = e.replace(/\S+/g, "cm-$&"));
      }
      function Zt(e, t) {
        var n = _("span", null, null, l ? "padding-right: .1px" : null),
          r = {
            pre: _("pre", [n], "CodeMirror-line"),
            content: n,
            col: 0,
            pos: 0,
            cm: e,
            trailingSpace: !1,
            splitSpaces: e.getOption("lineWrapping"),
          };
        t.measure = {};
        for (var i = 0; i <= (t.rest ? t.rest.length : 0); i++) {
          var o = i ? t.rest[i - 1] : t.line,
            s = void 0;
          (r.pos = 0),
            (r.addToken = Jt),
            Ae(e.display.measure) &&
              (s = ce(o, e.doc.direction)) &&
              (r.addToken = en(r.addToken, s)),
            (r.map = []),
            nn(o, r, dt(e, o, t != e.display.externalMeasured && Qe(o))),
            o.styleClasses &&
              (o.styleClasses.bgClass &&
                (r.bgClass = O(o.styleClasses.bgClass, r.bgClass || "")),
              o.styleClasses.textClass &&
                (r.textClass = O(o.styleClasses.textClass, r.textClass || ""))),
            0 == r.map.length &&
              r.map.push(0, 0, r.content.appendChild(De(e.display.measure))),
            0 == i
              ? ((t.measure.map = r.map), (t.measure.cache = {}))
              : ((t.measure.maps || (t.measure.maps = [])).push(r.map),
                (t.measure.caches || (t.measure.caches = [])).push({}));
        }
        if (l) {
          var a = r.content.lastChild;
          (/\bcm-tab\b/.test(a.className) ||
            (a.querySelector && a.querySelector(".cm-tab"))) &&
            (r.content.className = "cm-tab-wrap-hack");
        }
        return (
          fe(e, "renderLine", e, t.line, r.pre),
          r.pre.className &&
            (r.textClass = O(r.pre.className, r.textClass || "")),
          r
        );
      }
      function Xt(e) {
        var t = A("span", "•", "cm-invalidchar");
        return (
          (t.title = "\\u" + e.charCodeAt(0).toString(16)),
          t.setAttribute("aria-label", t.title),
          t
        );
      }
      function Jt(e, t, n, r, i, o, l) {
        if (t) {
          var c,
            u = e.splitSpaces
              ? (function (e, t) {
                  if (e.length > 1 && !/  /.test(e)) return e;
                  for (var n = t, r = "", i = 0; i < e.length; i++) {
                    var o = e.charAt(i);
                    " " != o ||
                      !n ||
                      (i != e.length - 1 && 32 != e.charCodeAt(i + 1)) ||
                      (o = " "),
                      (r += o),
                      (n = " " == o);
                  }
                  return r;
                })(t, e.trailingSpace)
              : t,
            h = e.cm.state.specialChars,
            d = !1;
          if (h.test(t)) {
            c = document.createDocumentFragment();
            for (var p = 0; ; ) {
              h.lastIndex = p;
              var f = h.exec(t),
                m = f ? f.index - p : t.length - p;
              if (m) {
                var g = document.createTextNode(u.slice(p, p + m));
                s && a < 9 ? c.appendChild(A("span", [g])) : c.appendChild(g),
                  e.map.push(e.pos, e.pos + m, g),
                  (e.col += m),
                  (e.pos += m);
              }
              if (!f) break;
              p += m + 1;
              var y = void 0;
              if ("\t" == f[0]) {
                var v = e.cm.options.tabSize,
                  w = v - (e.col % v);
                (y = c.appendChild(A("span", q(w), "cm-tab"))).setAttribute(
                  "role",
                  "presentation"
                ),
                  y.setAttribute("cm-text", "\t"),
                  (e.col += w);
              } else
                "\r" == f[0] || "\n" == f[0]
                  ? ((y = c.appendChild(
                      A("span", "\r" == f[0] ? "␍" : "␤", "cm-invalidchar")
                    )).setAttribute("cm-text", f[0]),
                    (e.col += 1))
                  : ((y = e.cm.options.specialCharPlaceholder(
                      f[0]
                    )).setAttribute("cm-text", f[0]),
                    s && a < 9
                      ? c.appendChild(A("span", [y]))
                      : c.appendChild(y),
                    (e.col += 1));
              e.map.push(e.pos, e.pos + 1, y), e.pos++;
            }
          } else
            (e.col += t.length),
              (c = document.createTextNode(u)),
              e.map.push(e.pos, e.pos + t.length, c),
              s && a < 9 && (d = !0),
              (e.pos += t.length);
          if (
            ((e.trailingSpace = 32 == u.charCodeAt(t.length - 1)),
            n || r || i || d || o)
          ) {
            var b = n || "";
            r && (b += r), i && (b += i);
            var S = A("span", [c], b, o);
            if (l)
              for (var C in l)
                l.hasOwnProperty(C) &&
                  "style" != C &&
                  "class" != C &&
                  S.setAttribute(C, l[C]);
            return e.content.appendChild(S);
          }
          e.content.appendChild(c);
        }
      }
      function en(e, t) {
        return function (n, r, i, o, s, a, l) {
          i = i ? i + " cm-force-border" : "cm-force-border";
          for (var c = n.pos, u = c + r.length; ; ) {
            for (
              var h = void 0, d = 0;
              d < t.length && !((h = t[d]).to > c && h.from <= c);
              d++
            );
            if (h.to >= u) return e(n, r, i, o, s, a, l);
            e(n, r.slice(0, h.to - c), i, o, null, a, l),
              (o = null),
              (r = r.slice(h.to - c)),
              (c = h.to);
          }
        };
      }
      function tn(e, t, n, r) {
        var i = !r && n.widgetNode;
        i && e.map.push(e.pos, e.pos + t, i),
          !r &&
            e.cm.display.input.needsContentAttribute &&
            (i || (i = e.content.appendChild(document.createElement("span"))),
            i.setAttribute("cm-marker", n.id)),
          i && (e.cm.display.input.setUneditable(i), e.content.appendChild(i)),
          (e.pos += t),
          (e.trailingSpace = !1);
      }
      function nn(e, t, n) {
        var r = e.markedSpans,
          i = e.text,
          o = 0;
        if (r)
          for (
            var s, a, l, c, u, h, d, p = i.length, f = 0, m = 1, g = "", y = 0;
            ;

          ) {
            if (y == f) {
              (l = c = u = a = ""), (d = null), (h = null), (y = 1 / 0);
              for (var v = [], w = void 0, b = 0; b < r.length; ++b) {
                var S = r[b],
                  C = S.marker;
                if ("bookmark" == C.type && S.from == f && C.widgetNode)
                  v.push(C);
                else if (
                  S.from <= f &&
                  (null == S.to ||
                    S.to > f ||
                    (C.collapsed && S.to == f && S.from == f))
                ) {
                  if (
                    (null != S.to &&
                      S.to != f &&
                      y > S.to &&
                      ((y = S.to), (c = "")),
                    C.className && (l += " " + C.className),
                    C.css && (a = (a ? a + ";" : "") + C.css),
                    C.startStyle && S.from == f && (u += " " + C.startStyle),
                    C.endStyle &&
                      S.to == y &&
                      (w || (w = [])).push(C.endStyle, S.to),
                    C.title && ((d || (d = {})).title = C.title),
                    C.attributes)
                  )
                    for (var E in C.attributes)
                      (d || (d = {}))[E] = C.attributes[E];
                  C.collapsed && (!h || Pt(h.marker, C) < 0) && (h = S);
                } else S.from > f && y > S.from && (y = S.from);
              }
              if (w)
                for (var k = 0; k < w.length; k += 2)
                  w[k + 1] == y && (c += " " + w[k]);
              if (!h || h.from == f)
                for (var x = 0; x < v.length; ++x) tn(t, 0, v[x]);
              if (h && (h.from || 0) == f) {
                if (
                  (tn(
                    t,
                    (null == h.to ? p + 1 : h.to) - f,
                    h.marker,
                    null == h.from
                  ),
                  null == h.to)
                )
                  return;
                h.to == f && (h = !1);
              }
            }
            if (f >= p) break;
            for (var R = Math.min(p, y); ; ) {
              if (g) {
                var T = f + g.length;
                if (!h) {
                  var D = T > R ? g.slice(0, R - f) : g;
                  t.addToken(
                    t,
                    D,
                    s ? s + l : l,
                    u,
                    f + D.length == y ? c : "",
                    a,
                    d
                  );
                }
                if (T >= R) {
                  (g = g.slice(R - f)), (f = R);
                  break;
                }
                (f = T), (u = "");
              }
              (g = i.slice(o, (o = n[m++]))), (s = Qt(n[m++], t.cm.options));
            }
          }
        else
          for (var A = 1; A < n.length; A += 2)
            t.addToken(t, i.slice(o, (o = n[A])), Qt(n[A + 1], t.cm.options));
      }
      function rn(e, t, n) {
        (this.line = t),
          (this.rest = (function (e) {
            for (var t, n; (t = Lt(e)); )
              (e = t.find(1, !0).line), (n || (n = [])).push(e);
            return n;
          })(t)),
          (this.size = this.rest ? Qe(K(this.rest)) - n + 1 : 1),
          (this.node = this.text = null),
          (this.hidden = Ut(e, t));
      }
      function on(e, t, n) {
        for (var r, i = [], o = t; o < n; o = r) {
          var s = new rn(e.doc, $e(e.doc, o), o);
          (r = o + s.size), i.push(s);
        }
        return i;
      }
      var sn = null,
        an = null;
      function ln(e, t) {
        var n = de(e, t);
        if (n.length) {
          var r,
            i = Array.prototype.slice.call(arguments, 2);
          sn
            ? (r = sn.delayedCallbacks)
            : an
            ? (r = an)
            : ((r = an = []), setTimeout(cn, 0));
          for (
            var o = function (e) {
                r.push(function () {
                  return n[e].apply(null, i);
                });
              },
              s = 0;
            s < n.length;
            ++s
          )
            o(s);
        }
      }
      function cn() {
        var e = an;
        an = null;
        for (var t = 0; t < e.length; ++t) e[t]();
      }
      function un(e, t, n, r) {
        for (var i = 0; i < t.changes.length; i++) {
          var o = t.changes[i];
          "text" == o
            ? pn(e, t)
            : "gutter" == o
            ? mn(e, t, n, r)
            : "class" == o
            ? fn(e, t)
            : "widget" == o && gn(e, t, r);
        }
        t.changes = null;
      }
      function hn(e) {
        return (
          e.node == e.text &&
            ((e.node = A("div", null, null, "position: relative")),
            e.text.parentNode && e.text.parentNode.replaceChild(e.node, e.text),
            e.node.appendChild(e.text),
            s && a < 8 && (e.node.style.zIndex = 2)),
          e.node
        );
      }
      function dn(e, t) {
        var n = e.display.externalMeasured;
        return n && n.line == t.line
          ? ((e.display.externalMeasured = null),
            (t.measure = n.measure),
            n.built)
          : Zt(e, t);
      }
      function pn(e, t) {
        var n = t.text.className,
          r = dn(e, t);
        t.text == t.node && (t.node = r.pre),
          t.text.parentNode.replaceChild(r.pre, t.text),
          (t.text = r.pre),
          r.bgClass != t.bgClass || r.textClass != t.textClass
            ? ((t.bgClass = r.bgClass), (t.textClass = r.textClass), fn(e, t))
            : n && (t.text.className = n);
      }
      function fn(e, t) {
        !(function (e, t) {
          var n = t.bgClass
            ? t.bgClass + " " + (t.line.bgClass || "")
            : t.line.bgClass;
          if ((n && (n += " CodeMirror-linebackground"), t.background))
            n
              ? (t.background.className = n)
              : (t.background.parentNode.removeChild(t.background),
                (t.background = null));
          else if (n) {
            var r = hn(t);
            (t.background = r.insertBefore(A("div", null, n), r.firstChild)),
              e.display.input.setUneditable(t.background);
          }
        })(e, t),
          t.line.wrapClass
            ? (hn(t).className = t.line.wrapClass)
            : t.node != t.text && (t.node.className = "");
        var n = t.textClass
          ? t.textClass + " " + (t.line.textClass || "")
          : t.line.textClass;
        t.text.className = n || "";
      }
      function mn(e, t, n, r) {
        if (
          (t.gutter && (t.node.removeChild(t.gutter), (t.gutter = null)),
          t.gutterBackground &&
            (t.node.removeChild(t.gutterBackground),
            (t.gutterBackground = null)),
          t.line.gutterClass)
        ) {
          var i = hn(t);
          (t.gutterBackground = A(
            "div",
            null,
            "CodeMirror-gutter-background " + t.line.gutterClass,
            "left: " +
              (e.options.fixedGutter ? r.fixedPos : -r.gutterTotalWidth) +
              "px; width: " +
              r.gutterTotalWidth +
              "px"
          )),
            e.display.input.setUneditable(t.gutterBackground),
            i.insertBefore(t.gutterBackground, t.text);
        }
        var o = t.line.gutterMarkers;
        if (e.options.lineNumbers || o) {
          var s = hn(t),
            a = (t.gutter = A(
              "div",
              null,
              "CodeMirror-gutter-wrapper",
              "left: " +
                (e.options.fixedGutter ? r.fixedPos : -r.gutterTotalWidth) +
                "px"
            ));
          if (
            (e.display.input.setUneditable(a),
            s.insertBefore(a, t.text),
            t.line.gutterClass && (a.className += " " + t.line.gutterClass),
            !e.options.lineNumbers ||
              (o && o["CodeMirror-linenumbers"]) ||
              (t.lineNumber = a.appendChild(
                A(
                  "div",
                  Je(e.options, n),
                  "CodeMirror-linenumber CodeMirror-gutter-elt",
                  "left: " +
                    r.gutterLeft["CodeMirror-linenumbers"] +
                    "px; width: " +
                    e.display.lineNumInnerWidth +
                    "px"
                )
              )),
            o)
          )
            for (var l = 0; l < e.display.gutterSpecs.length; ++l) {
              var c = e.display.gutterSpecs[l].className,
                u = o.hasOwnProperty(c) && o[c];
              u &&
                a.appendChild(
                  A(
                    "div",
                    [u],
                    "CodeMirror-gutter-elt",
                    "left: " +
                      r.gutterLeft[c] +
                      "px; width: " +
                      r.gutterWidth[c] +
                      "px"
                  )
                );
            }
        }
      }
      function gn(e, t, n) {
        t.alignable && (t.alignable = null);
        for (var r = t.node.firstChild, i = void 0; r; r = i)
          (i = r.nextSibling),
            "CodeMirror-linewidget" == r.className && t.node.removeChild(r);
        vn(e, t, n);
      }
      function yn(e, t, n, r) {
        var i = dn(e, t);
        return (
          (t.text = t.node = i.pre),
          i.bgClass && (t.bgClass = i.bgClass),
          i.textClass && (t.textClass = i.textClass),
          fn(e, t),
          mn(e, t, n, r),
          vn(e, t, r),
          t.node
        );
      }
      function vn(e, t, n) {
        if ((wn(e, t.line, t, n, !0), t.rest))
          for (var r = 0; r < t.rest.length; r++) wn(e, t.rest[r], t, n, !1);
      }
      function wn(e, t, n, r, i) {
        if (t.widgets)
          for (var o = hn(n), s = 0, a = t.widgets; s < a.length; ++s) {
            var l = a[s],
              c = A("div", [l.node], "CodeMirror-linewidget");
            l.handleMouseEvents || c.setAttribute("cm-ignore-events", "true"),
              bn(l, c, n, r),
              e.display.input.setUneditable(c),
              i && l.above
                ? o.insertBefore(c, n.gutter || n.text)
                : o.appendChild(c),
              ln(l, "redraw");
          }
      }
      function bn(e, t, n, r) {
        if (e.noHScroll) {
          (n.alignable || (n.alignable = [])).push(t);
          var i = r.wrapperWidth;
          (t.style.left = r.fixedPos + "px"),
            e.coverGutter ||
              ((i -= r.gutterTotalWidth),
              (t.style.paddingLeft = r.gutterTotalWidth + "px")),
            (t.style.width = i + "px");
        }
        e.coverGutter &&
          ((t.style.zIndex = 5),
          (t.style.position = "relative"),
          e.noHScroll || (t.style.marginLeft = -r.gutterTotalWidth + "px"));
      }
      function Sn(e) {
        if (null != e.height) return e.height;
        var t = e.doc.cm;
        if (!t) return 0;
        if (!M(document.body, e.node)) {
          var n = "position: relative;";
          e.coverGutter &&
            (n += "margin-left: -" + t.display.gutters.offsetWidth + "px;"),
            e.noHScroll &&
              (n += "width: " + t.display.wrapper.clientWidth + "px;"),
            D(t.display.measure, A("div", [e.node], null, n));
        }
        return (e.height = e.node.parentNode.offsetHeight);
      }
      function Cn(e, t) {
        for (var n = Ee(t); n != e.wrapper; n = n.parentNode)
          if (
            !n ||
            (1 == n.nodeType && "true" == n.getAttribute("cm-ignore-events")) ||
            (n.parentNode == e.sizer && n != e.mover)
          )
            return !0;
      }
      function En(e) {
        return e.lineSpace.offsetTop;
      }
      function kn(e) {
        return e.mover.offsetHeight - e.lineSpace.offsetHeight;
      }
      function xn(e) {
        if (e.cachedPaddingH) return e.cachedPaddingH;
        var t = D(e.measure, A("pre", "x", "CodeMirror-line-like")),
          n = window.getComputedStyle
            ? window.getComputedStyle(t)
            : t.currentStyle,
          r = {
            left: parseInt(n.paddingLeft),
            right: parseInt(n.paddingRight),
          };
        return isNaN(r.left) || isNaN(r.right) || (e.cachedPaddingH = r), r;
      }
      function Rn(e) {
        return 30 - e.display.nativeBarWidth;
      }
      function Tn(e) {
        return e.display.scroller.clientWidth - Rn(e) - e.display.barWidth;
      }
      function Dn(e) {
        return e.display.scroller.clientHeight - Rn(e) - e.display.barHeight;
      }
      function An(e, t, n) {
        if (e.line == t) return { map: e.measure.map, cache: e.measure.cache };
        for (var r = 0; r < e.rest.length; r++)
          if (e.rest[r] == t)
            return { map: e.measure.maps[r], cache: e.measure.caches[r] };
        for (var i = 0; i < e.rest.length; i++)
          if (Qe(e.rest[i]) > n)
            return {
              map: e.measure.maps[i],
              cache: e.measure.caches[i],
              before: !0,
            };
      }
      function _n(e, t, n, r) {
        return In(e, Pn(e, t), n, r);
      }
      function Mn(e, t) {
        if (t >= e.display.viewFrom && t < e.display.viewTo)
          return e.display.view[ur(e, t)];
        var n = e.display.externalMeasured;
        return n && t >= n.lineN && t < n.lineN + n.size ? n : void 0;
      }
      function Pn(e, t) {
        var n = Qe(t),
          r = Mn(e, n);
        r && !r.text
          ? (r = null)
          : r && r.changes && (un(e, r, n, or(e)), (e.curOp.forceUpdate = !0)),
          r ||
            (r = (function (e, t) {
              var n = Qe((t = Bt(t))),
                r = (e.display.externalMeasured = new rn(e.doc, t, n));
              r.lineN = n;
              var i = (r.built = Zt(e, r));
              return (r.text = i.pre), D(e.display.lineMeasure, i.pre), r;
            })(e, t));
        var i = An(r, t, n);
        return {
          line: t,
          view: r,
          rect: null,
          map: i.map,
          cache: i.cache,
          before: i.before,
          hasHeights: !1,
        };
      }
      function In(e, t, n, r, i) {
        t.before && (n = -1);
        var o,
          l = n + (r || "");
        return (
          t.cache.hasOwnProperty(l)
            ? (o = t.cache[l])
            : (t.rect || (t.rect = t.view.text.getBoundingClientRect()),
              t.hasHeights ||
                ((function (e, t, n) {
                  var r = e.options.lineWrapping,
                    i = r && Tn(e);
                  if (!t.measure.heights || (r && t.measure.width != i)) {
                    var o = (t.measure.heights = []);
                    if (r) {
                      t.measure.width = i;
                      for (
                        var s = t.text.firstChild.getClientRects(), a = 0;
                        a < s.length - 1;
                        a++
                      ) {
                        var l = s[a],
                          c = s[a + 1];
                        Math.abs(l.bottom - c.bottom) > 2 &&
                          o.push((l.bottom + c.top) / 2 - n.top);
                      }
                    }
                    o.push(n.bottom - n.top);
                  }
                })(e, t.view, t.rect),
                (t.hasHeights = !0)),
              (o = (function (e, t, n, r) {
                var i,
                  o = Fn(t.map, n, r),
                  l = o.node,
                  c = o.start,
                  u = o.end,
                  h = o.collapse;
                if (3 == l.nodeType) {
                  for (var d = 0; d < 4; d++) {
                    for (; c && re(t.line.text.charAt(o.coverStart + c)); ) --c;
                    for (
                      ;
                      o.coverStart + u < o.coverEnd &&
                      re(t.line.text.charAt(o.coverStart + u));

                    )
                      ++u;
                    if (
                      (i =
                        s && a < 9 && 0 == c && u == o.coverEnd - o.coverStart
                          ? l.parentNode.getBoundingClientRect()
                          : Nn(x(l, c, u).getClientRects(), r)).left ||
                      i.right ||
                      0 == c
                    )
                      break;
                    (u = c), (c -= 1), (h = "right");
                  }
                  s &&
                    a < 11 &&
                    (i = (function (e, t) {
                      if (
                        !window.screen ||
                        null == screen.logicalXDPI ||
                        screen.logicalXDPI == screen.deviceXDPI ||
                        !(function (e) {
                          if (null != Oe) return Oe;
                          var t = D(e, A("span", "x")),
                            n = t.getBoundingClientRect(),
                            r = x(t, 0, 1).getBoundingClientRect();
                          return (Oe = Math.abs(n.left - r.left) > 1);
                        })(e)
                      )
                        return t;
                      var n = screen.logicalXDPI / screen.deviceXDPI,
                        r = screen.logicalYDPI / screen.deviceYDPI;
                      return {
                        left: t.left * n,
                        right: t.right * n,
                        top: t.top * r,
                        bottom: t.bottom * r,
                      };
                    })(e.display.measure, i));
                } else {
                  var p;
                  c > 0 && (h = r = "right"),
                    (i =
                      e.options.lineWrapping &&
                      (p = l.getClientRects()).length > 1
                        ? p["right" == r ? p.length - 1 : 0]
                        : l.getBoundingClientRect());
                }
                if (s && a < 9 && !c && (!i || (!i.left && !i.right))) {
                  var f = l.parentNode.getClientRects()[0];
                  i = f
                    ? {
                        left: f.left,
                        right: f.left + ir(e.display),
                        top: f.top,
                        bottom: f.bottom,
                      }
                    : Ln;
                }
                for (
                  var m = i.top - t.rect.top,
                    g = i.bottom - t.rect.top,
                    y = (m + g) / 2,
                    v = t.view.measure.heights,
                    w = 0;
                  w < v.length - 1 && !(y < v[w]);
                  w++
                );
                var b = w ? v[w - 1] : 0,
                  S = v[w],
                  C = {
                    left: ("right" == h ? i.right : i.left) - t.rect.left,
                    right: ("left" == h ? i.left : i.right) - t.rect.left,
                    top: b,
                    bottom: S,
                  };
                return (
                  i.left || i.right || (C.bogus = !0),
                  e.options.singleCursorHeightPerLine ||
                    ((C.rtop = m), (C.rbottom = g)),
                  C
                );
              })(e, t, n, r)).bogus || (t.cache[l] = o)),
          {
            left: o.left,
            right: o.right,
            top: i ? o.rtop : o.top,
            bottom: i ? o.rbottom : o.bottom,
          }
        );
      }
      var On,
        Ln = { left: 0, right: 0, top: 0, bottom: 0 };
      function Fn(e, t, n) {
        for (var r, i, o, s, a, l, c = 0; c < e.length; c += 3)
          if (
            ((a = e[c]),
            (l = e[c + 1]),
            t < a
              ? ((i = 0), (o = 1), (s = "left"))
              : t < l
              ? (o = 1 + (i = t - a))
              : (c == e.length - 3 || (t == l && e[c + 3] > t)) &&
                ((i = (o = l - a) - 1), t >= l && (s = "right")),
            null != i)
          ) {
            if (
              ((r = e[c + 2]),
              a == l && n == (r.insertLeft ? "left" : "right") && (s = n),
              "left" == n && 0 == i)
            )
              for (; c && e[c - 2] == e[c - 3] && e[c - 1].insertLeft; )
                (r = e[2 + (c -= 3)]), (s = "left");
            if ("right" == n && i == l - a)
              for (
                ;
                c < e.length - 3 &&
                e[c + 3] == e[c + 4] &&
                !e[c + 5].insertLeft;

              )
                (r = e[(c += 3) + 2]), (s = "right");
            break;
          }
        return {
          node: r,
          start: i,
          end: o,
          collapse: s,
          coverStart: a,
          coverEnd: l,
        };
      }
      function Nn(e, t) {
        var n = Ln;
        if ("left" == t)
          for (var r = 0; r < e.length && (n = e[r]).left == n.right; r++);
        else
          for (var i = e.length - 1; i >= 0 && (n = e[i]).left == n.right; i--);
        return n;
      }
      function Bn(e) {
        if (
          e.measure &&
          ((e.measure.cache = {}), (e.measure.heights = null), e.rest)
        )
          for (var t = 0; t < e.rest.length; t++) e.measure.caches[t] = {};
      }
      function Hn(e) {
        (e.display.externalMeasure = null), T(e.display.lineMeasure);
        for (var t = 0; t < e.display.view.length; t++) Bn(e.display.view[t]);
      }
      function zn(e) {
        Hn(e),
          (e.display.cachedCharWidth = e.display.cachedTextHeight = e.display.cachedPaddingH = null),
          e.options.lineWrapping || (e.display.maxLineChanged = !0),
          (e.display.lineNumChars = null);
      }
      function Un() {
        return u && g
          ? -(
              document.body.getBoundingClientRect().left -
              parseInt(getComputedStyle(document.body).marginLeft)
            )
          : window.pageXOffset ||
              (document.documentElement || document.body).scrollLeft;
      }
      function Wn() {
        return u && g
          ? -(
              document.body.getBoundingClientRect().top -
              parseInt(getComputedStyle(document.body).marginTop)
            )
          : window.pageYOffset ||
              (document.documentElement || document.body).scrollTop;
      }
      function jn(e) {
        var t = 0;
        if (e.widgets)
          for (var n = 0; n < e.widgets.length; ++n)
            e.widgets[n].above && (t += Sn(e.widgets[n]));
        return t;
      }
      function Vn(e, t, n, r, i) {
        if (!i) {
          var o = jn(t);
          (n.top += o), (n.bottom += o);
        }
        if ("line" == r) return n;
        r || (r = "local");
        var s = jt(t);
        if (
          ("local" == r ? (s += En(e.display)) : (s -= e.display.viewOffset),
          "page" == r || "window" == r)
        ) {
          var a = e.display.lineSpace.getBoundingClientRect();
          s += a.top + ("window" == r ? 0 : Wn());
          var l = a.left + ("window" == r ? 0 : Un());
          (n.left += l), (n.right += l);
        }
        return (n.top += s), (n.bottom += s), n;
      }
      function Gn(e, t, n) {
        if ("div" == n) return t;
        var r = t.left,
          i = t.top;
        if ("page" == n) (r -= Un()), (i -= Wn());
        else if ("local" == n || !n) {
          var o = e.display.sizer.getBoundingClientRect();
          (r += o.left), (i += o.top);
        }
        var s = e.display.lineSpace.getBoundingClientRect();
        return { left: r - s.left, top: i - s.top };
      }
      function $n(e, t, n, r, i) {
        return r || (r = $e(e.doc, t.line)), Vn(e, r, _n(e, r, t.ch, i), n);
      }
      function qn(e, t, n, r, i, o) {
        function s(t, s) {
          var a = In(e, i, t, s ? "right" : "left", o);
          return s ? (a.left = a.right) : (a.right = a.left), Vn(e, r, a, n);
        }
        (r = r || $e(e.doc, t.line)), i || (i = Pn(e, r));
        var a = ce(r, e.doc.direction),
          l = t.ch,
          c = t.sticky;
        if (
          (l >= r.text.length
            ? ((l = r.text.length), (c = "before"))
            : l <= 0 && ((l = 0), (c = "after")),
          !a)
        )
          return s("before" == c ? l - 1 : l, "before" == c);
        function u(e, t, n) {
          return s(n ? e - 1 : e, (1 == a[t].level) != n);
        }
        var h = ae(a, l, c),
          d = se,
          p = u(l, h, "before" == c);
        return null != d && (p.other = u(l, d, "before" != c)), p;
      }
      function Kn(e, t) {
        var n = 0;
        (t = at(e.doc, t)),
          e.options.lineWrapping || (n = ir(e.display) * t.ch);
        var r = $e(e.doc, t.line),
          i = jt(r) + En(e.display);
        return { left: n, right: n, top: i, bottom: i + r.height };
      }
      function Yn(e, t, n, r, i) {
        var o = et(e, t, n);
        return (o.xRel = i), r && (o.outside = r), o;
      }
      function Qn(e, t, n) {
        var r = e.doc;
        if ((n += e.display.viewOffset) < 0)
          return Yn(r.first, 0, null, -1, -1);
        var i = Ze(r, n),
          o = r.first + r.size - 1;
        if (i > o)
          return Yn(r.first + r.size - 1, $e(r, o).text.length, null, 1, 1);
        t < 0 && (t = 0);
        for (var s = $e(r, i); ; ) {
          var a = er(e, s, i, t, n),
            l = Ft(s, a.ch + (a.xRel > 0 || a.outside > 0 ? 1 : 0));
          if (!l) return a;
          var c = l.find(1);
          if (c.line == i) return c;
          s = $e(r, (i = c.line));
        }
      }
      function Zn(e, t, n, r) {
        r -= jn(t);
        var i = t.text.length,
          o = oe(
            function (t) {
              return In(e, n, t - 1).bottom <= r;
            },
            i,
            0
          );
        return {
          begin: o,
          end: (i = oe(
            function (t) {
              return In(e, n, t).top > r;
            },
            o,
            i
          )),
        };
      }
      function Xn(e, t, n, r) {
        return (
          n || (n = Pn(e, t)), Zn(e, t, n, Vn(e, t, In(e, n, r), "line").top)
        );
      }
      function Jn(e, t, n, r) {
        return !(e.bottom <= n) && (e.top > n || (r ? e.left : e.right) > t);
      }
      function er(e, t, n, r, i) {
        i -= jt(t);
        var o = Pn(e, t),
          s = jn(t),
          a = 0,
          l = t.text.length,
          c = !0,
          u = ce(t, e.doc.direction);
        if (u) {
          var h = (e.options.lineWrapping ? nr : tr)(e, t, n, o, u, r, i);
          (a = (c = 1 != h.level) ? h.from : h.to - 1),
            (l = c ? h.to : h.from - 1);
        }
        var d,
          p,
          f = null,
          m = null,
          g = oe(
            function (t) {
              var n = In(e, o, t);
              return (
                (n.top += s),
                (n.bottom += s),
                !!Jn(n, r, i, !1) &&
                  (n.top <= i && n.left <= r && ((f = t), (m = n)), !0)
              );
            },
            a,
            l
          ),
          y = !1;
        if (m) {
          var v = r - m.left < m.right - r,
            w = v == c;
          (g = f + (w ? 0 : 1)),
            (p = w ? "after" : "before"),
            (d = v ? m.left : m.right);
        } else {
          c || (g != l && g != a) || g++,
            (p =
              0 == g
                ? "after"
                : g == t.text.length
                ? "before"
                : In(e, o, g - (c ? 1 : 0)).bottom + s <= i == c
                ? "after"
                : "before");
          var b = qn(e, et(n, g, p), "line", t, o);
          (d = b.left), (y = i < b.top ? -1 : i >= b.bottom ? 1 : 0);
        }
        return Yn(n, (g = ie(t.text, g, 1)), p, y, r - d);
      }
      function tr(e, t, n, r, i, o, s) {
        var a = oe(
            function (a) {
              var l = i[a],
                c = 1 != l.level;
              return Jn(
                qn(
                  e,
                  et(n, c ? l.to : l.from, c ? "before" : "after"),
                  "line",
                  t,
                  r
                ),
                o,
                s,
                !0
              );
            },
            0,
            i.length - 1
          ),
          l = i[a];
        if (a > 0) {
          var c = 1 != l.level,
            u = qn(
              e,
              et(n, c ? l.from : l.to, c ? "after" : "before"),
              "line",
              t,
              r
            );
          Jn(u, o, s, !0) && u.top > s && (l = i[a - 1]);
        }
        return l;
      }
      function nr(e, t, n, r, i, o, s) {
        var a = Zn(e, t, r, s),
          l = a.begin,
          c = a.end;
        /\s/.test(t.text.charAt(c - 1)) && c--;
        for (var u = null, h = null, d = 0; d < i.length; d++) {
          var p = i[d];
          if (!(p.from >= c || p.to <= l)) {
            var f = In(
                e,
                r,
                1 != p.level ? Math.min(c, p.to) - 1 : Math.max(l, p.from)
              ).right,
              m = f < o ? o - f + 1e9 : f - o;
            (!u || h > m) && ((u = p), (h = m));
          }
        }
        return (
          u || (u = i[i.length - 1]),
          u.from < l && (u = { from: l, to: u.to, level: u.level }),
          u.to > c && (u = { from: u.from, to: c, level: u.level }),
          u
        );
      }
      function rr(e) {
        if (null != e.cachedTextHeight) return e.cachedTextHeight;
        if (null == On) {
          On = A("pre", null, "CodeMirror-line-like");
          for (var t = 0; t < 49; ++t)
            On.appendChild(document.createTextNode("x")),
              On.appendChild(A("br"));
          On.appendChild(document.createTextNode("x"));
        }
        D(e.measure, On);
        var n = On.offsetHeight / 50;
        return n > 3 && (e.cachedTextHeight = n), T(e.measure), n || 1;
      }
      function ir(e) {
        if (null != e.cachedCharWidth) return e.cachedCharWidth;
        var t = A("span", "xxxxxxxxxx"),
          n = A("pre", [t], "CodeMirror-line-like");
        D(e.measure, n);
        var r = t.getBoundingClientRect(),
          i = (r.right - r.left) / 10;
        return i > 2 && (e.cachedCharWidth = i), i || 10;
      }
      function or(e) {
        for (
          var t = e.display,
            n = {},
            r = {},
            i = t.gutters.clientLeft,
            o = t.gutters.firstChild,
            s = 0;
          o;
          o = o.nextSibling, ++s
        ) {
          var a = e.display.gutterSpecs[s].className;
          (n[a] = o.offsetLeft + o.clientLeft + i), (r[a] = o.clientWidth);
        }
        return {
          fixedPos: sr(t),
          gutterTotalWidth: t.gutters.offsetWidth,
          gutterLeft: n,
          gutterWidth: r,
          wrapperWidth: t.wrapper.clientWidth,
        };
      }
      function sr(e) {
        return (
          e.scroller.getBoundingClientRect().left -
          e.sizer.getBoundingClientRect().left
        );
      }
      function ar(e) {
        var t = rr(e.display),
          n = e.options.lineWrapping,
          r =
            n &&
            Math.max(5, e.display.scroller.clientWidth / ir(e.display) - 3);
        return function (i) {
          if (Ut(e.doc, i)) return 0;
          var o = 0;
          if (i.widgets)
            for (var s = 0; s < i.widgets.length; s++)
              i.widgets[s].height && (o += i.widgets[s].height);
          return n ? o + (Math.ceil(i.text.length / r) || 1) * t : o + t;
        };
      }
      function lr(e) {
        var t = e.doc,
          n = ar(e);
        t.iter(function (e) {
          var t = n(e);
          t != e.height && Ye(e, t);
        });
      }
      function cr(e, t, n, r) {
        var i = e.display;
        if (!n && "true" == Ee(t).getAttribute("cm-not-content")) return null;
        var o,
          s,
          a = i.lineSpace.getBoundingClientRect();
        try {
          (o = t.clientX - a.left), (s = t.clientY - a.top);
        } catch (t) {
          return null;
        }
        var l,
          c = Qn(e, o, s);
        if (r && 1 == c.xRel && (l = $e(e.doc, c.line).text).length == c.ch) {
          var u = B(l, l.length, e.options.tabSize) - l.length;
          c = et(
            c.line,
            Math.max(
              0,
              Math.round((o - xn(e.display).left) / ir(e.display)) - u
            )
          );
        }
        return c;
      }
      function ur(e, t) {
        if (t >= e.display.viewTo) return null;
        if ((t -= e.display.viewFrom) < 0) return null;
        for (var n = e.display.view, r = 0; r < n.length; r++)
          if ((t -= n[r].size) < 0) return r;
      }
      function hr(e, t, n, r) {
        null == t && (t = e.doc.first),
          null == n && (n = e.doc.first + e.doc.size),
          r || (r = 0);
        var i = e.display;
        if (
          (r &&
            n < i.viewTo &&
            (null == i.updateLineNumbers || i.updateLineNumbers > t) &&
            (i.updateLineNumbers = t),
          (e.curOp.viewChanged = !0),
          t >= i.viewTo)
        )
          Ct && Ht(e.doc, t) < i.viewTo && pr(e);
        else if (n <= i.viewFrom)
          Ct && zt(e.doc, n + r) > i.viewFrom
            ? pr(e)
            : ((i.viewFrom += r), (i.viewTo += r));
        else if (t <= i.viewFrom && n >= i.viewTo) pr(e);
        else if (t <= i.viewFrom) {
          var o = fr(e, n, n + r, 1);
          o
            ? ((i.view = i.view.slice(o.index)),
              (i.viewFrom = o.lineN),
              (i.viewTo += r))
            : pr(e);
        } else if (n >= i.viewTo) {
          var s = fr(e, t, t, -1);
          s
            ? ((i.view = i.view.slice(0, s.index)), (i.viewTo = s.lineN))
            : pr(e);
        } else {
          var a = fr(e, t, t, -1),
            l = fr(e, n, n + r, 1);
          a && l
            ? ((i.view = i.view
                .slice(0, a.index)
                .concat(on(e, a.lineN, l.lineN))
                .concat(i.view.slice(l.index))),
              (i.viewTo += r))
            : pr(e);
        }
        var c = i.externalMeasured;
        c &&
          (n < c.lineN
            ? (c.lineN += r)
            : t < c.lineN + c.size && (i.externalMeasured = null));
      }
      function dr(e, t, n) {
        e.curOp.viewChanged = !0;
        var r = e.display,
          i = e.display.externalMeasured;
        if (
          (i &&
            t >= i.lineN &&
            t < i.lineN + i.size &&
            (r.externalMeasured = null),
          !(t < r.viewFrom || t >= r.viewTo))
        ) {
          var o = r.view[ur(e, t)];
          if (null != o.node) {
            var s = o.changes || (o.changes = []);
            -1 == z(s, n) && s.push(n);
          }
        }
      }
      function pr(e) {
        (e.display.viewFrom = e.display.viewTo = e.doc.first),
          (e.display.view = []),
          (e.display.viewOffset = 0);
      }
      function fr(e, t, n, r) {
        var i,
          o = ur(e, t),
          s = e.display.view;
        if (!Ct || n == e.doc.first + e.doc.size) return { index: o, lineN: n };
        for (var a = e.display.viewFrom, l = 0; l < o; l++) a += s[l].size;
        if (a != t) {
          if (r > 0) {
            if (o == s.length - 1) return null;
            (i = a + s[o].size - t), o++;
          } else i = a - t;
          (t += i), (n += i);
        }
        for (; Ht(e.doc, n) != n; ) {
          if (o == (r < 0 ? 0 : s.length - 1)) return null;
          (n += r * s[o - (r < 0 ? 1 : 0)].size), (o += r);
        }
        return { index: o, lineN: n };
      }
      function mr(e) {
        for (var t = e.display.view, n = 0, r = 0; r < t.length; r++) {
          var i = t[r];
          i.hidden || (i.node && !i.changes) || ++n;
        }
        return n;
      }
      function gr(e) {
        e.display.input.showSelection(e.display.input.prepareSelection());
      }
      function yr(e, t) {
        void 0 === t && (t = !0);
        for (
          var n = e.doc,
            r = {},
            i = (r.cursors = document.createDocumentFragment()),
            o = (r.selection = document.createDocumentFragment()),
            s = 0;
          s < n.sel.ranges.length;
          s++
        )
          if (t || s != n.sel.primIndex) {
            var a = n.sel.ranges[s];
            if (
              !(
                a.from().line >= e.display.viewTo ||
                a.to().line < e.display.viewFrom
              )
            ) {
              var l = a.empty();
              (l || e.options.showCursorWhenSelecting) && vr(e, a.head, i),
                l || br(e, a, o);
            }
          }
        return r;
      }
      function vr(e, t, n) {
        var r = qn(
            e,
            t,
            "div",
            null,
            null,
            !e.options.singleCursorHeightPerLine
          ),
          i = n.appendChild(A("div", " ", "CodeMirror-cursor"));
        if (
          ((i.style.left = r.left + "px"),
          (i.style.top = r.top + "px"),
          (i.style.height =
            Math.max(0, r.bottom - r.top) * e.options.cursorHeight + "px"),
          r.other)
        ) {
          var o = n.appendChild(
            A("div", " ", "CodeMirror-cursor CodeMirror-secondarycursor")
          );
          (o.style.display = ""),
            (o.style.left = r.other.left + "px"),
            (o.style.top = r.other.top + "px"),
            (o.style.height = 0.85 * (r.other.bottom - r.other.top) + "px");
        }
      }
      function wr(e, t) {
        return e.top - t.top || e.left - t.left;
      }
      function br(e, t, n) {
        var r = e.display,
          i = e.doc,
          o = document.createDocumentFragment(),
          s = xn(e.display),
          a = s.left,
          l = Math.max(r.sizerWidth, Tn(e) - r.sizer.offsetLeft) - s.right,
          c = "ltr" == i.direction;
        function u(e, t, n, r) {
          t < 0 && (t = 0),
            (t = Math.round(t)),
            (r = Math.round(r)),
            o.appendChild(
              A(
                "div",
                null,
                "CodeMirror-selected",
                "position: absolute; left: " +
                  e +
                  "px;\n                             top: " +
                  t +
                  "px; width: " +
                  (null == n ? l - e : n) +
                  "px;\n                             height: " +
                  (r - t) +
                  "px"
              )
            );
        }
        function h(t, n, r) {
          var o,
            s,
            h = $e(i, t),
            d = h.text.length;
          function p(n, r) {
            return $n(e, et(t, n), "div", h, r);
          }
          function f(t, n, r) {
            var i = Xn(e, h, null, t),
              o = ("ltr" == n) == ("after" == r) ? "left" : "right";
            return p(
              "after" == r
                ? i.begin
                : i.end - (/\s/.test(h.text.charAt(i.end - 1)) ? 2 : 1),
              o
            )[o];
          }
          var m = ce(h, i.direction);
          return (
            (function (e, t, n, r) {
              if (!e) return r(t, n, "ltr", 0);
              for (var i = !1, o = 0; o < e.length; ++o) {
                var s = e[o];
                ((s.from < n && s.to > t) || (t == n && s.to == t)) &&
                  (r(
                    Math.max(s.from, t),
                    Math.min(s.to, n),
                    1 == s.level ? "rtl" : "ltr",
                    o
                  ),
                  (i = !0));
              }
              i || r(t, n, "ltr");
            })(m, n || 0, null == r ? d : r, function (e, t, i, h) {
              var g = "ltr" == i,
                y = p(e, g ? "left" : "right"),
                v = p(t - 1, g ? "right" : "left"),
                w = null == n && 0 == e,
                b = null == r && t == d,
                S = 0 == h,
                C = !m || h == m.length - 1;
              if (v.top - y.top <= 3) {
                var E = (c ? b : w) && C,
                  k = (c ? w : b) && S ? a : (g ? y : v).left,
                  x = E ? l : (g ? v : y).right;
                u(k, y.top, x - k, y.bottom);
              } else {
                var R, T, D, A;
                g
                  ? ((R = c && w && S ? a : y.left),
                    (T = c ? l : f(e, i, "before")),
                    (D = c ? a : f(t, i, "after")),
                    (A = c && b && C ? l : v.right))
                  : ((R = c ? f(e, i, "before") : a),
                    (T = !c && w && S ? l : y.right),
                    (D = !c && b && C ? a : v.left),
                    (A = c ? f(t, i, "after") : l)),
                  u(R, y.top, T - R, y.bottom),
                  y.bottom < v.top && u(a, y.bottom, null, v.top),
                  u(D, v.top, A - D, v.bottom);
              }
              (!o || wr(y, o) < 0) && (o = y),
                wr(v, o) < 0 && (o = v),
                (!s || wr(y, s) < 0) && (s = y),
                wr(v, s) < 0 && (s = v);
            }),
            { start: o, end: s }
          );
        }
        var d = t.from(),
          p = t.to();
        if (d.line == p.line) h(d.line, d.ch, p.ch);
        else {
          var f = $e(i, d.line),
            m = $e(i, p.line),
            g = Bt(f) == Bt(m),
            y = h(d.line, d.ch, g ? f.text.length + 1 : null).end,
            v = h(p.line, g ? 0 : null, p.ch).start;
          g &&
            (y.top < v.top - 2
              ? (u(y.right, y.top, null, y.bottom),
                u(a, v.top, v.left, v.bottom))
              : u(y.right, y.top, v.left - y.right, y.bottom)),
            y.bottom < v.top && u(a, y.bottom, null, v.top);
        }
        n.appendChild(o);
      }
      function Sr(e) {
        if (e.state.focused) {
          var t = e.display;
          clearInterval(t.blinker);
          var n = !0;
          (t.cursorDiv.style.visibility = ""),
            e.options.cursorBlinkRate > 0
              ? (t.blinker = setInterval(function () {
                  return (t.cursorDiv.style.visibility = (n = !n)
                    ? ""
                    : "hidden");
                }, e.options.cursorBlinkRate))
              : e.options.cursorBlinkRate < 0 &&
                (t.cursorDiv.style.visibility = "hidden");
        }
      }
      function Cr(e) {
        e.state.focused || (e.display.input.focus(), kr(e));
      }
      function Er(e) {
        (e.state.delayingBlurEvent = !0),
          setTimeout(function () {
            e.state.delayingBlurEvent &&
              ((e.state.delayingBlurEvent = !1), xr(e));
          }, 100);
      }
      function kr(e, t) {
        e.state.delayingBlurEvent && (e.state.delayingBlurEvent = !1),
          "nocursor" != e.options.readOnly &&
            (e.state.focused ||
              (fe(e, "focus", e, t),
              (e.state.focused = !0),
              I(e.display.wrapper, "CodeMirror-focused"),
              e.curOp ||
                e.display.selForContextMenu == e.doc.sel ||
                (e.display.input.reset(),
                l &&
                  setTimeout(function () {
                    return e.display.input.reset(!0);
                  }, 20)),
              e.display.input.receivedFocus()),
            Sr(e));
      }
      function xr(e, t) {
        e.state.delayingBlurEvent ||
          (e.state.focused &&
            (fe(e, "blur", e, t),
            (e.state.focused = !1),
            R(e.display.wrapper, "CodeMirror-focused")),
          clearInterval(e.display.blinker),
          setTimeout(function () {
            e.state.focused || (e.display.shift = !1);
          }, 150));
      }
      function Rr(e) {
        for (
          var t = e.display, n = t.lineDiv.offsetTop, r = 0;
          r < t.view.length;
          r++
        ) {
          var i = t.view[r],
            o = e.options.lineWrapping,
            l = void 0,
            c = 0;
          if (!i.hidden) {
            if (s && a < 8) {
              var u = i.node.offsetTop + i.node.offsetHeight;
              (l = u - n), (n = u);
            } else {
              var h = i.node.getBoundingClientRect();
              (l = h.bottom - h.top),
                !o &&
                  i.text.firstChild &&
                  (c =
                    i.text.firstChild.getBoundingClientRect().right -
                    h.left -
                    1);
            }
            var d = i.line.height - l;
            if (
              (d > 0.005 || d < -0.005) &&
              (Ye(i.line, l), Tr(i.line), i.rest)
            )
              for (var p = 0; p < i.rest.length; p++) Tr(i.rest[p]);
            if (c > e.display.sizerWidth) {
              var f = Math.ceil(c / ir(e.display));
              f > e.display.maxLineLength &&
                ((e.display.maxLineLength = f),
                (e.display.maxLine = i.line),
                (e.display.maxLineChanged = !0));
            }
          }
        }
      }
      function Tr(e) {
        if (e.widgets)
          for (var t = 0; t < e.widgets.length; ++t) {
            var n = e.widgets[t],
              r = n.node.parentNode;
            r && (n.height = r.offsetHeight);
          }
      }
      function Dr(e, t, n) {
        var r = n && null != n.top ? Math.max(0, n.top) : e.scroller.scrollTop;
        r = Math.floor(r - En(e));
        var i = n && null != n.bottom ? n.bottom : r + e.wrapper.clientHeight,
          o = Ze(t, r),
          s = Ze(t, i);
        if (n && n.ensure) {
          var a = n.ensure.from.line,
            l = n.ensure.to.line;
          a < o
            ? ((o = a), (s = Ze(t, jt($e(t, a)) + e.wrapper.clientHeight)))
            : Math.min(l, t.lastLine()) >= s &&
              ((o = Ze(t, jt($e(t, l)) - e.wrapper.clientHeight)), (s = l));
        }
        return { from: o, to: Math.max(s, o + 1) };
      }
      function Ar(e, t) {
        var n = e.display,
          r = rr(e.display);
        t.top < 0 && (t.top = 0);
        var i =
            e.curOp && null != e.curOp.scrollTop
              ? e.curOp.scrollTop
              : n.scroller.scrollTop,
          o = Dn(e),
          s = {};
        t.bottom - t.top > o && (t.bottom = t.top + o);
        var a = e.doc.height + kn(n),
          l = t.top < r,
          c = t.bottom > a - r;
        if (t.top < i) s.scrollTop = l ? 0 : t.top;
        else if (t.bottom > i + o) {
          var u = Math.min(t.top, (c ? a : t.bottom) - o);
          u != i && (s.scrollTop = u);
        }
        var h =
            e.curOp && null != e.curOp.scrollLeft
              ? e.curOp.scrollLeft
              : n.scroller.scrollLeft,
          d = Tn(e) - (e.options.fixedGutter ? n.gutters.offsetWidth : 0),
          p = t.right - t.left > d;
        return (
          p && (t.right = t.left + d),
          t.left < 10
            ? (s.scrollLeft = 0)
            : t.left < h
            ? (s.scrollLeft = Math.max(0, t.left - (p ? 0 : 10)))
            : t.right > d + h - 3 &&
              (s.scrollLeft = t.right + (p ? 0 : 10) - d),
          s
        );
      }
      function _r(e, t) {
        null != t &&
          (Ir(e),
          (e.curOp.scrollTop =
            (null == e.curOp.scrollTop ? e.doc.scrollTop : e.curOp.scrollTop) +
            t));
      }
      function Mr(e) {
        Ir(e);
        var t = e.getCursor();
        e.curOp.scrollToPos = {
          from: t,
          to: t,
          margin: e.options.cursorScrollMargin,
        };
      }
      function Pr(e, t, n) {
        (null == t && null == n) || Ir(e),
          null != t && (e.curOp.scrollLeft = t),
          null != n && (e.curOp.scrollTop = n);
      }
      function Ir(e) {
        var t = e.curOp.scrollToPos;
        t &&
          ((e.curOp.scrollToPos = null),
          Or(e, Kn(e, t.from), Kn(e, t.to), t.margin));
      }
      function Or(e, t, n, r) {
        var i = Ar(e, {
          left: Math.min(t.left, n.left),
          top: Math.min(t.top, n.top) - r,
          right: Math.max(t.right, n.right),
          bottom: Math.max(t.bottom, n.bottom) + r,
        });
        Pr(e, i.scrollLeft, i.scrollTop);
      }
      function Lr(e, t) {
        Math.abs(e.doc.scrollTop - t) < 2 ||
          (n || li(e, { top: t }), Fr(e, t, !0), n && li(e), ri(e, 100));
      }
      function Fr(e, t, n) {
        (t = Math.min(
          e.display.scroller.scrollHeight - e.display.scroller.clientHeight,
          t
        )),
          (e.display.scroller.scrollTop != t || n) &&
            ((e.doc.scrollTop = t),
            e.display.scrollbars.setScrollTop(t),
            e.display.scroller.scrollTop != t &&
              (e.display.scroller.scrollTop = t));
      }
      function Nr(e, t, n, r) {
        (t = Math.min(
          t,
          e.display.scroller.scrollWidth - e.display.scroller.clientWidth
        )),
          ((n ? t == e.doc.scrollLeft : Math.abs(e.doc.scrollLeft - t) < 2) &&
            !r) ||
            ((e.doc.scrollLeft = t),
            hi(e),
            e.display.scroller.scrollLeft != t &&
              (e.display.scroller.scrollLeft = t),
            e.display.scrollbars.setScrollLeft(t));
      }
      function Br(e) {
        var t = e.display,
          n = t.gutters.offsetWidth,
          r = Math.round(e.doc.height + kn(e.display));
        return {
          clientHeight: t.scroller.clientHeight,
          viewHeight: t.wrapper.clientHeight,
          scrollWidth: t.scroller.scrollWidth,
          clientWidth: t.scroller.clientWidth,
          viewWidth: t.wrapper.clientWidth,
          barLeft: e.options.fixedGutter ? n : 0,
          docHeight: r,
          scrollHeight: r + Rn(e) + t.barHeight,
          nativeBarWidth: t.nativeBarWidth,
          gutterWidth: n,
        };
      }
      var Hr = function (e, t, n) {
        this.cm = n;
        var r = (this.vert = A(
            "div",
            [A("div", null, null, "min-width: 1px")],
            "CodeMirror-vscrollbar"
          )),
          i = (this.horiz = A(
            "div",
            [A("div", null, null, "height: 100%; min-height: 1px")],
            "CodeMirror-hscrollbar"
          ));
        (r.tabIndex = i.tabIndex = -1),
          e(r),
          e(i),
          he(r, "scroll", function () {
            r.clientHeight && t(r.scrollTop, "vertical");
          }),
          he(i, "scroll", function () {
            i.clientWidth && t(i.scrollLeft, "horizontal");
          }),
          (this.checkedZeroWidth = !1),
          s &&
            a < 8 &&
            (this.horiz.style.minHeight = this.vert.style.minWidth = "18px");
      };
      (Hr.prototype.update = function (e) {
        var t = e.scrollWidth > e.clientWidth + 1,
          n = e.scrollHeight > e.clientHeight + 1,
          r = e.nativeBarWidth;
        if (n) {
          (this.vert.style.display = "block"),
            (this.vert.style.bottom = t ? r + "px" : "0");
          var i = e.viewHeight - (t ? r : 0);
          this.vert.firstChild.style.height =
            Math.max(0, e.scrollHeight - e.clientHeight + i) + "px";
        } else
          (this.vert.style.display = ""),
            (this.vert.firstChild.style.height = "0");
        if (t) {
          (this.horiz.style.display = "block"),
            (this.horiz.style.right = n ? r + "px" : "0"),
            (this.horiz.style.left = e.barLeft + "px");
          var o = e.viewWidth - e.barLeft - (n ? r : 0);
          this.horiz.firstChild.style.width =
            Math.max(0, e.scrollWidth - e.clientWidth + o) + "px";
        } else
          (this.horiz.style.display = ""),
            (this.horiz.firstChild.style.width = "0");
        return (
          !this.checkedZeroWidth &&
            e.clientHeight > 0 &&
            (0 == r && this.zeroWidthHack(), (this.checkedZeroWidth = !0)),
          { right: n ? r : 0, bottom: t ? r : 0 }
        );
      }),
        (Hr.prototype.setScrollLeft = function (e) {
          this.horiz.scrollLeft != e && (this.horiz.scrollLeft = e),
            this.disableHoriz &&
              this.enableZeroWidthBar(this.horiz, this.disableHoriz, "horiz");
        }),
        (Hr.prototype.setScrollTop = function (e) {
          this.vert.scrollTop != e && (this.vert.scrollTop = e),
            this.disableVert &&
              this.enableZeroWidthBar(this.vert, this.disableVert, "vert");
        }),
        (Hr.prototype.zeroWidthHack = function () {
          var e = v && !p ? "12px" : "18px";
          (this.horiz.style.height = this.vert.style.width = e),
            (this.horiz.style.pointerEvents = this.vert.style.pointerEvents =
              "none"),
            (this.disableHoriz = new H()),
            (this.disableVert = new H());
        }),
        (Hr.prototype.enableZeroWidthBar = function (e, t, n) {
          (e.style.pointerEvents = "auto"),
            t.set(1e3, function r() {
              var i = e.getBoundingClientRect();
              ("vert" == n
                ? document.elementFromPoint(i.right - 1, (i.top + i.bottom) / 2)
                : document.elementFromPoint(
                    (i.right + i.left) / 2,
                    i.bottom - 1
                  )) != e
                ? (e.style.pointerEvents = "none")
                : t.set(1e3, r);
            });
        }),
        (Hr.prototype.clear = function () {
          var e = this.horiz.parentNode;
          e.removeChild(this.horiz), e.removeChild(this.vert);
        });
      var zr = function () {};
      function Ur(e, t) {
        t || (t = Br(e));
        var n = e.display.barWidth,
          r = e.display.barHeight;
        Wr(e, t);
        for (
          var i = 0;
          (i < 4 && n != e.display.barWidth) || r != e.display.barHeight;
          i++
        )
          n != e.display.barWidth && e.options.lineWrapping && Rr(e),
            Wr(e, Br(e)),
            (n = e.display.barWidth),
            (r = e.display.barHeight);
      }
      function Wr(e, t) {
        var n = e.display,
          r = n.scrollbars.update(t);
        (n.sizer.style.paddingRight = (n.barWidth = r.right) + "px"),
          (n.sizer.style.paddingBottom = (n.barHeight = r.bottom) + "px"),
          (n.heightForcer.style.borderBottom =
            r.bottom + "px solid transparent"),
          r.right && r.bottom
            ? ((n.scrollbarFiller.style.display = "block"),
              (n.scrollbarFiller.style.height = r.bottom + "px"),
              (n.scrollbarFiller.style.width = r.right + "px"))
            : (n.scrollbarFiller.style.display = ""),
          r.bottom &&
          e.options.coverGutterNextToScrollbar &&
          e.options.fixedGutter
            ? ((n.gutterFiller.style.display = "block"),
              (n.gutterFiller.style.height = r.bottom + "px"),
              (n.gutterFiller.style.width = t.gutterWidth + "px"))
            : (n.gutterFiller.style.display = "");
      }
      (zr.prototype.update = function () {
        return { bottom: 0, right: 0 };
      }),
        (zr.prototype.setScrollLeft = function () {}),
        (zr.prototype.setScrollTop = function () {}),
        (zr.prototype.clear = function () {});
      var jr = { native: Hr, null: zr };
      function Vr(e) {
        e.display.scrollbars &&
          (e.display.scrollbars.clear(),
          e.display.scrollbars.addClass &&
            R(e.display.wrapper, e.display.scrollbars.addClass)),
          (e.display.scrollbars = new jr[e.options.scrollbarStyle](
            function (t) {
              e.display.wrapper.insertBefore(t, e.display.scrollbarFiller),
                he(t, "mousedown", function () {
                  e.state.focused &&
                    setTimeout(function () {
                      return e.display.input.focus();
                    }, 0);
                }),
                t.setAttribute("cm-not-content", "true");
            },
            function (t, n) {
              "horizontal" == n ? Nr(e, t) : Lr(e, t);
            },
            e
          )),
          e.display.scrollbars.addClass &&
            I(e.display.wrapper, e.display.scrollbars.addClass);
      }
      var Gr = 0;
      function $r(e) {
        var t;
        (e.curOp = {
          cm: e,
          viewChanged: !1,
          startHeight: e.doc.height,
          forceUpdate: !1,
          updateInput: 0,
          typing: !1,
          changeObjs: null,
          cursorActivityHandlers: null,
          cursorActivityCalled: 0,
          selectionChanged: !1,
          updateMaxLine: !1,
          scrollLeft: null,
          scrollTop: null,
          scrollToPos: null,
          focus: !1,
          id: ++Gr,
        }),
          (t = e.curOp),
          sn
            ? sn.ops.push(t)
            : (t.ownsGroup = sn = { ops: [t], delayedCallbacks: [] });
      }
      function qr(e) {
        var t = e.curOp;
        t &&
          (function (e, t) {
            var n = e.ownsGroup;
            if (n)
              try {
                !(function (e) {
                  var t = e.delayedCallbacks,
                    n = 0;
                  do {
                    for (; n < t.length; n++) t[n].call(null);
                    for (var r = 0; r < e.ops.length; r++) {
                      var i = e.ops[r];
                      if (i.cursorActivityHandlers)
                        for (
                          ;
                          i.cursorActivityCalled <
                          i.cursorActivityHandlers.length;

                        )
                          i.cursorActivityHandlers[
                            i.cursorActivityCalled++
                          ].call(null, i.cm);
                    }
                  } while (n < t.length);
                })(n);
              } finally {
                (sn = null), t(n);
              }
          })(t, function (e) {
            for (var t = 0; t < e.ops.length; t++) e.ops[t].cm.curOp = null;
            !(function (e) {
              for (var t = e.ops, n = 0; n < t.length; n++) Kr(t[n]);
              for (var r = 0; r < t.length; r++) Yr(t[r]);
              for (var i = 0; i < t.length; i++) Qr(t[i]);
              for (var o = 0; o < t.length; o++) Zr(t[o]);
              for (var s = 0; s < t.length; s++) Xr(t[s]);
            })(e);
          });
      }
      function Kr(e) {
        var t = e.cm,
          n = t.display;
        !(function (e) {
          var t = e.display;
          !t.scrollbarsClipped &&
            t.scroller.offsetWidth &&
            ((t.nativeBarWidth =
              t.scroller.offsetWidth - t.scroller.clientWidth),
            (t.heightForcer.style.height = Rn(e) + "px"),
            (t.sizer.style.marginBottom = -t.nativeBarWidth + "px"),
            (t.sizer.style.borderRightWidth = Rn(e) + "px"),
            (t.scrollbarsClipped = !0));
        })(t),
          e.updateMaxLine && Gt(t),
          (e.mustUpdate =
            e.viewChanged ||
            e.forceUpdate ||
            null != e.scrollTop ||
            (e.scrollToPos &&
              (e.scrollToPos.from.line < n.viewFrom ||
                e.scrollToPos.to.line >= n.viewTo)) ||
            (n.maxLineChanged && t.options.lineWrapping)),
          (e.update =
            e.mustUpdate &&
            new oi(
              t,
              e.mustUpdate && { top: e.scrollTop, ensure: e.scrollToPos },
              e.forceUpdate
            ));
      }
      function Yr(e) {
        e.updatedDisplay = e.mustUpdate && si(e.cm, e.update);
      }
      function Qr(e) {
        var t = e.cm,
          n = t.display;
        e.updatedDisplay && Rr(t),
          (e.barMeasure = Br(t)),
          n.maxLineChanged &&
            !t.options.lineWrapping &&
            ((e.adjustWidthTo =
              _n(t, n.maxLine, n.maxLine.text.length).left + 3),
            (t.display.sizerWidth = e.adjustWidthTo),
            (e.barMeasure.scrollWidth = Math.max(
              n.scroller.clientWidth,
              n.sizer.offsetLeft + e.adjustWidthTo + Rn(t) + t.display.barWidth
            )),
            (e.maxScrollLeft = Math.max(
              0,
              n.sizer.offsetLeft + e.adjustWidthTo - Tn(t)
            ))),
          (e.updatedDisplay || e.selectionChanged) &&
            (e.preparedSelection = n.input.prepareSelection());
      }
      function Zr(e) {
        var t = e.cm;
        null != e.adjustWidthTo &&
          ((t.display.sizer.style.minWidth = e.adjustWidthTo + "px"),
          e.maxScrollLeft < t.doc.scrollLeft &&
            Nr(t, Math.min(t.display.scroller.scrollLeft, e.maxScrollLeft), !0),
          (t.display.maxLineChanged = !1));
        var n = e.focus && e.focus == P();
        e.preparedSelection &&
          t.display.input.showSelection(e.preparedSelection, n),
          (e.updatedDisplay || e.startHeight != t.doc.height) &&
            Ur(t, e.barMeasure),
          e.updatedDisplay && ui(t, e.barMeasure),
          e.selectionChanged && Sr(t),
          t.state.focused && e.updateInput && t.display.input.reset(e.typing),
          n && Cr(e.cm);
      }
      function Xr(e) {
        var t = e.cm,
          n = t.display,
          r = t.doc;
        e.updatedDisplay && ai(t, e.update),
          null == n.wheelStartX ||
            (null == e.scrollTop && null == e.scrollLeft && !e.scrollToPos) ||
            (n.wheelStartX = n.wheelStartY = null),
          null != e.scrollTop && Fr(t, e.scrollTop, e.forceScroll),
          null != e.scrollLeft && Nr(t, e.scrollLeft, !0, !0),
          e.scrollToPos &&
            (function (e, t) {
              if (!me(e, "scrollCursorIntoView")) {
                var n = e.display,
                  r = n.sizer.getBoundingClientRect(),
                  i = null;
                if (
                  (t.top + r.top < 0
                    ? (i = !0)
                    : t.bottom + r.top >
                        (window.innerHeight ||
                          document.documentElement.clientHeight) && (i = !1),
                  null != i && !f)
                ) {
                  var o = A(
                    "div",
                    "​",
                    null,
                    "position: absolute;\n                         top: " +
                      (t.top - n.viewOffset - En(e.display)) +
                      "px;\n                         height: " +
                      (t.bottom - t.top + Rn(e) + n.barHeight) +
                      "px;\n                         left: " +
                      t.left +
                      "px; width: " +
                      Math.max(2, t.right - t.left) +
                      "px;"
                  );
                  e.display.lineSpace.appendChild(o),
                    o.scrollIntoView(i),
                    e.display.lineSpace.removeChild(o);
                }
              }
            })(
              t,
              (function (e, t, n, r) {
                var i;
                null == r && (r = 0),
                  e.options.lineWrapping ||
                    t != n ||
                    (n =
                      "before" ==
                      (t = t.ch
                        ? et(
                            t.line,
                            "before" == t.sticky ? t.ch - 1 : t.ch,
                            "after"
                          )
                        : t).sticky
                        ? et(t.line, t.ch + 1, "before")
                        : t);
                for (var o = 0; o < 5; o++) {
                  var s = !1,
                    a = qn(e, t),
                    l = n && n != t ? qn(e, n) : a,
                    c = Ar(
                      e,
                      (i = {
                        left: Math.min(a.left, l.left),
                        top: Math.min(a.top, l.top) - r,
                        right: Math.max(a.left, l.left),
                        bottom: Math.max(a.bottom, l.bottom) + r,
                      })
                    ),
                    u = e.doc.scrollTop,
                    h = e.doc.scrollLeft;
                  if (
                    (null != c.scrollTop &&
                      (Lr(e, c.scrollTop),
                      Math.abs(e.doc.scrollTop - u) > 1 && (s = !0)),
                    null != c.scrollLeft &&
                      (Nr(e, c.scrollLeft),
                      Math.abs(e.doc.scrollLeft - h) > 1 && (s = !0)),
                    !s)
                  )
                    break;
                }
                return i;
              })(
                t,
                at(r, e.scrollToPos.from),
                at(r, e.scrollToPos.to),
                e.scrollToPos.margin
              )
            );
        var i = e.maybeHiddenMarkers,
          o = e.maybeUnhiddenMarkers;
        if (i)
          for (var s = 0; s < i.length; ++s)
            i[s].lines.length || fe(i[s], "hide");
        if (o)
          for (var a = 0; a < o.length; ++a)
            o[a].lines.length && fe(o[a], "unhide");
        n.wrapper.offsetHeight && (r.scrollTop = t.display.scroller.scrollTop),
          e.changeObjs && fe(t, "changes", t, e.changeObjs),
          e.update && e.update.finish();
      }
      function Jr(e, t) {
        if (e.curOp) return t();
        $r(e);
        try {
          return t();
        } finally {
          qr(e);
        }
      }
      function ei(e, t) {
        return function () {
          if (e.curOp) return t.apply(e, arguments);
          $r(e);
          try {
            return t.apply(e, arguments);
          } finally {
            qr(e);
          }
        };
      }
      function ti(e) {
        return function () {
          if (this.curOp) return e.apply(this, arguments);
          $r(this);
          try {
            return e.apply(this, arguments);
          } finally {
            qr(this);
          }
        };
      }
      function ni(e) {
        return function () {
          var t = this.cm;
          if (!t || t.curOp) return e.apply(this, arguments);
          $r(t);
          try {
            return e.apply(this, arguments);
          } finally {
            qr(t);
          }
        };
      }
      function ri(e, t) {
        e.doc.highlightFrontier < e.display.viewTo &&
          e.state.highlight.set(t, F(ii, e));
      }
      function ii(e) {
        var t = e.doc;
        if (!(t.highlightFrontier >= e.display.viewTo)) {
          var n = +new Date() + e.options.workTime,
            r = pt(e, t.highlightFrontier),
            i = [];
          t.iter(
            r.line,
            Math.min(t.first + t.size, e.display.viewTo + 500),
            function (o) {
              if (r.line >= e.display.viewFrom) {
                var s = o.styles,
                  a =
                    o.text.length > e.options.maxHighlightLength
                      ? We(t.mode, r.state)
                      : null,
                  l = ht(e, o, r, !0);
                a && (r.state = a), (o.styles = l.styles);
                var c = o.styleClasses,
                  u = l.classes;
                u ? (o.styleClasses = u) : c && (o.styleClasses = null);
                for (
                  var h =
                      !s ||
                      s.length != o.styles.length ||
                      (c != u &&
                        (!c ||
                          !u ||
                          c.bgClass != u.bgClass ||
                          c.textClass != u.textClass)),
                    d = 0;
                  !h && d < s.length;
                  ++d
                )
                  h = s[d] != o.styles[d];
                h && i.push(r.line), (o.stateAfter = r.save()), r.nextLine();
              } else
                o.text.length <= e.options.maxHighlightLength &&
                  ft(e, o.text, r),
                  (o.stateAfter = r.line % 5 == 0 ? r.save() : null),
                  r.nextLine();
              if (+new Date() > n) return ri(e, e.options.workDelay), !0;
            }
          ),
            (t.highlightFrontier = r.line),
            (t.modeFrontier = Math.max(t.modeFrontier, r.line)),
            i.length &&
              Jr(e, function () {
                for (var t = 0; t < i.length; t++) dr(e, i[t], "text");
              });
        }
      }
      var oi = function (e, t, n) {
        var r = e.display;
        (this.viewport = t),
          (this.visible = Dr(r, e.doc, t)),
          (this.editorIsHidden = !r.wrapper.offsetWidth),
          (this.wrapperHeight = r.wrapper.clientHeight),
          (this.wrapperWidth = r.wrapper.clientWidth),
          (this.oldDisplayWidth = Tn(e)),
          (this.force = n),
          (this.dims = or(e)),
          (this.events = []);
      };
      function si(e, t) {
        var n = e.display,
          r = e.doc;
        if (t.editorIsHidden) return pr(e), !1;
        if (
          !t.force &&
          t.visible.from >= n.viewFrom &&
          t.visible.to <= n.viewTo &&
          (null == n.updateLineNumbers || n.updateLineNumbers >= n.viewTo) &&
          n.renderedView == n.view &&
          0 == mr(e)
        )
          return !1;
        di(e) && (pr(e), (t.dims = or(e)));
        var i = r.first + r.size,
          o = Math.max(t.visible.from - e.options.viewportMargin, r.first),
          s = Math.min(i, t.visible.to + e.options.viewportMargin);
        n.viewFrom < o &&
          o - n.viewFrom < 20 &&
          (o = Math.max(r.first, n.viewFrom)),
          n.viewTo > s && n.viewTo - s < 20 && (s = Math.min(i, n.viewTo)),
          Ct && ((o = Ht(e.doc, o)), (s = zt(e.doc, s)));
        var a =
          o != n.viewFrom ||
          s != n.viewTo ||
          n.lastWrapHeight != t.wrapperHeight ||
          n.lastWrapWidth != t.wrapperWidth;
        !(function (e, t, n) {
          var r = e.display;
          0 == r.view.length || t >= r.viewTo || n <= r.viewFrom
            ? ((r.view = on(e, t, n)), (r.viewFrom = t))
            : (r.viewFrom > t
                ? (r.view = on(e, t, r.viewFrom).concat(r.view))
                : r.viewFrom < t && (r.view = r.view.slice(ur(e, t))),
              (r.viewFrom = t),
              r.viewTo < n
                ? (r.view = r.view.concat(on(e, r.viewTo, n)))
                : r.viewTo > n && (r.view = r.view.slice(0, ur(e, n)))),
            (r.viewTo = n);
        })(e, o, s),
          (n.viewOffset = jt($e(e.doc, n.viewFrom))),
          (e.display.mover.style.top = n.viewOffset + "px");
        var c = mr(e);
        if (
          !a &&
          0 == c &&
          !t.force &&
          n.renderedView == n.view &&
          (null == n.updateLineNumbers || n.updateLineNumbers >= n.viewTo)
        )
          return !1;
        var u = (function (e) {
          if (e.hasFocus()) return null;
          var t = P();
          if (!t || !M(e.display.lineDiv, t)) return null;
          var n = { activeElt: t };
          if (window.getSelection) {
            var r = window.getSelection();
            r.anchorNode &&
              r.extend &&
              M(e.display.lineDiv, r.anchorNode) &&
              ((n.anchorNode = r.anchorNode),
              (n.anchorOffset = r.anchorOffset),
              (n.focusNode = r.focusNode),
              (n.focusOffset = r.focusOffset));
          }
          return n;
        })(e);
        return (
          c > 4 && (n.lineDiv.style.display = "none"),
          (function (e, t, n) {
            var r = e.display,
              i = e.options.lineNumbers,
              o = r.lineDiv,
              s = o.firstChild;
            function a(t) {
              var n = t.nextSibling;
              return (
                l && v && e.display.currentWheelTarget == t
                  ? (t.style.display = "none")
                  : t.parentNode.removeChild(t),
                n
              );
            }
            for (var c = r.view, u = r.viewFrom, h = 0; h < c.length; h++) {
              var d = c[h];
              if (d.hidden);
              else if (d.node && d.node.parentNode == o) {
                for (; s != d.node; ) s = a(s);
                var p = i && null != t && t <= u && d.lineNumber;
                d.changes &&
                  (z(d.changes, "gutter") > -1 && (p = !1), un(e, d, u, n)),
                  p &&
                    (T(d.lineNumber),
                    d.lineNumber.appendChild(
                      document.createTextNode(Je(e.options, u))
                    )),
                  (s = d.node.nextSibling);
              } else {
                var f = yn(e, d, u, n);
                o.insertBefore(f, s);
              }
              u += d.size;
            }
            for (; s; ) s = a(s);
          })(e, n.updateLineNumbers, t.dims),
          c > 4 && (n.lineDiv.style.display = ""),
          (n.renderedView = n.view),
          (function (e) {
            if (
              e &&
              e.activeElt &&
              e.activeElt != P() &&
              (e.activeElt.focus(),
              e.anchorNode &&
                M(document.body, e.anchorNode) &&
                M(document.body, e.focusNode))
            ) {
              var t = window.getSelection(),
                n = document.createRange();
              n.setEnd(e.anchorNode, e.anchorOffset),
                n.collapse(!1),
                t.removeAllRanges(),
                t.addRange(n),
                t.extend(e.focusNode, e.focusOffset);
            }
          })(u),
          T(n.cursorDiv),
          T(n.selectionDiv),
          (n.gutters.style.height = n.sizer.style.minHeight = 0),
          a &&
            ((n.lastWrapHeight = t.wrapperHeight),
            (n.lastWrapWidth = t.wrapperWidth),
            ri(e, 400)),
          (n.updateLineNumbers = null),
          !0
        );
      }
      function ai(e, t) {
        for (
          var n = t.viewport, r = !0;
          ((r && e.options.lineWrapping && t.oldDisplayWidth != Tn(e)) ||
            (n &&
              null != n.top &&
              (n = {
                top: Math.min(e.doc.height + kn(e.display) - Dn(e), n.top),
              }),
            (t.visible = Dr(e.display, e.doc, n)),
            !(
              t.visible.from >= e.display.viewFrom &&
              t.visible.to <= e.display.viewTo
            ))) &&
          si(e, t);
          r = !1
        ) {
          Rr(e);
          var i = Br(e);
          gr(e), Ur(e, i), ui(e, i), (t.force = !1);
        }
        t.signal(e, "update", e),
          (e.display.viewFrom == e.display.reportedViewFrom &&
            e.display.viewTo == e.display.reportedViewTo) ||
            (t.signal(
              e,
              "viewportChange",
              e,
              e.display.viewFrom,
              e.display.viewTo
            ),
            (e.display.reportedViewFrom = e.display.viewFrom),
            (e.display.reportedViewTo = e.display.viewTo));
      }
      function li(e, t) {
        var n = new oi(e, t);
        if (si(e, n)) {
          Rr(e), ai(e, n);
          var r = Br(e);
          gr(e), Ur(e, r), ui(e, r), n.finish();
        }
      }
      function ci(e) {
        var t = e.gutters.offsetWidth;
        e.sizer.style.marginLeft = t + "px";
      }
      function ui(e, t) {
        (e.display.sizer.style.minHeight = t.docHeight + "px"),
          (e.display.heightForcer.style.top = t.docHeight + "px"),
          (e.display.gutters.style.height =
            t.docHeight + e.display.barHeight + Rn(e) + "px");
      }
      function hi(e) {
        var t = e.display,
          n = t.view;
        if (t.alignWidgets || (t.gutters.firstChild && e.options.fixedGutter)) {
          for (
            var r = sr(t) - t.scroller.scrollLeft + e.doc.scrollLeft,
              i = t.gutters.offsetWidth,
              o = r + "px",
              s = 0;
            s < n.length;
            s++
          )
            if (!n[s].hidden) {
              e.options.fixedGutter &&
                (n[s].gutter && (n[s].gutter.style.left = o),
                n[s].gutterBackground &&
                  (n[s].gutterBackground.style.left = o));
              var a = n[s].alignable;
              if (a) for (var l = 0; l < a.length; l++) a[l].style.left = o;
            }
          e.options.fixedGutter && (t.gutters.style.left = r + i + "px");
        }
      }
      function di(e) {
        if (!e.options.lineNumbers) return !1;
        var t = e.doc,
          n = Je(e.options, t.first + t.size - 1),
          r = e.display;
        if (n.length != r.lineNumChars) {
          var i = r.measure.appendChild(
              A(
                "div",
                [A("div", n)],
                "CodeMirror-linenumber CodeMirror-gutter-elt"
              )
            ),
            o = i.firstChild.offsetWidth,
            s = i.offsetWidth - o;
          return (
            (r.lineGutter.style.width = ""),
            (r.lineNumInnerWidth =
              Math.max(o, r.lineGutter.offsetWidth - s) + 1),
            (r.lineNumWidth = r.lineNumInnerWidth + s),
            (r.lineNumChars = r.lineNumInnerWidth ? n.length : -1),
            (r.lineGutter.style.width = r.lineNumWidth + "px"),
            ci(e.display),
            !0
          );
        }
        return !1;
      }
      function pi(e, t) {
        for (var n = [], r = !1, i = 0; i < e.length; i++) {
          var o = e[i],
            s = null;
          if (
            ("string" != typeof o && ((s = o.style), (o = o.className)),
            "CodeMirror-linenumbers" == o)
          ) {
            if (!t) continue;
            r = !0;
          }
          n.push({ className: o, style: s });
        }
        return (
          t &&
            !r &&
            n.push({ className: "CodeMirror-linenumbers", style: null }),
          n
        );
      }
      function fi(e) {
        var t = e.gutters,
          n = e.gutterSpecs;
        T(t), (e.lineGutter = null);
        for (var r = 0; r < n.length; ++r) {
          var i = n[r],
            o = i.className,
            s = i.style,
            a = t.appendChild(A("div", null, "CodeMirror-gutter " + o));
          s && (a.style.cssText = s),
            "CodeMirror-linenumbers" == o &&
              ((e.lineGutter = a),
              (a.style.width = (e.lineNumWidth || 1) + "px"));
        }
        (t.style.display = n.length ? "" : "none"), ci(e);
      }
      function mi(e) {
        fi(e.display), hr(e), hi(e);
      }
      function gi(e, t, r, i) {
        var o = this;
        (this.input = r),
          (o.scrollbarFiller = A("div", null, "CodeMirror-scrollbar-filler")),
          o.scrollbarFiller.setAttribute("cm-not-content", "true"),
          (o.gutterFiller = A("div", null, "CodeMirror-gutter-filler")),
          o.gutterFiller.setAttribute("cm-not-content", "true"),
          (o.lineDiv = _("div", null, "CodeMirror-code")),
          (o.selectionDiv = A(
            "div",
            null,
            null,
            "position: relative; z-index: 1"
          )),
          (o.cursorDiv = A("div", null, "CodeMirror-cursors")),
          (o.measure = A("div", null, "CodeMirror-measure")),
          (o.lineMeasure = A("div", null, "CodeMirror-measure")),
          (o.lineSpace = _(
            "div",
            [o.measure, o.lineMeasure, o.selectionDiv, o.cursorDiv, o.lineDiv],
            null,
            "position: relative; outline: none"
          ));
        var c = _("div", [o.lineSpace], "CodeMirror-lines");
        (o.mover = A("div", [c], null, "position: relative")),
          (o.sizer = A("div", [o.mover], "CodeMirror-sizer")),
          (o.sizerWidth = null),
          (o.heightForcer = A(
            "div",
            null,
            null,
            "position: absolute; height: 30px; width: 1px;"
          )),
          (o.gutters = A("div", null, "CodeMirror-gutters")),
          (o.lineGutter = null),
          (o.scroller = A(
            "div",
            [o.sizer, o.heightForcer, o.gutters],
            "CodeMirror-scroll"
          )),
          o.scroller.setAttribute("tabIndex", "-1"),
          (o.wrapper = A(
            "div",
            [o.scrollbarFiller, o.gutterFiller, o.scroller],
            "CodeMirror"
          )),
          s &&
            a < 8 &&
            ((o.gutters.style.zIndex = -1),
            (o.scroller.style.paddingRight = 0)),
          l || (n && y) || (o.scroller.draggable = !0),
          e && (e.appendChild ? e.appendChild(o.wrapper) : e(o.wrapper)),
          (o.viewFrom = o.viewTo = t.first),
          (o.reportedViewFrom = o.reportedViewTo = t.first),
          (o.view = []),
          (o.renderedView = null),
          (o.externalMeasured = null),
          (o.viewOffset = 0),
          (o.lastWrapHeight = o.lastWrapWidth = 0),
          (o.updateLineNumbers = null),
          (o.nativeBarWidth = o.barHeight = o.barWidth = 0),
          (o.scrollbarsClipped = !1),
          (o.lineNumWidth = o.lineNumInnerWidth = o.lineNumChars = null),
          (o.alignWidgets = !1),
          (o.cachedCharWidth = o.cachedTextHeight = o.cachedPaddingH = null),
          (o.maxLine = null),
          (o.maxLineLength = 0),
          (o.maxLineChanged = !1),
          (o.wheelDX = o.wheelDY = o.wheelStartX = o.wheelStartY = null),
          (o.shift = !1),
          (o.selForContextMenu = null),
          (o.activeTouch = null),
          (o.gutterSpecs = pi(i.gutters, i.lineNumbers)),
          fi(o),
          r.init(o);
      }
      (oi.prototype.signal = function (e, t) {
        ye(e, t) && this.events.push(arguments);
      }),
        (oi.prototype.finish = function () {
          for (var e = 0; e < this.events.length; e++)
            fe.apply(null, this.events[e]);
        });
      var yi = 0,
        vi = null;
      function wi(e) {
        var t = e.wheelDeltaX,
          n = e.wheelDeltaY;
        return (
          null == t &&
            e.detail &&
            e.axis == e.HORIZONTAL_AXIS &&
            (t = e.detail),
          null == n && e.detail && e.axis == e.VERTICAL_AXIS
            ? (n = e.detail)
            : null == n && (n = e.wheelDelta),
          { x: t, y: n }
        );
      }
      function bi(e) {
        var t = wi(e);
        return (t.x *= vi), (t.y *= vi), t;
      }
      function Si(e, t) {
        var r = wi(t),
          i = r.x,
          o = r.y,
          s = e.display,
          a = s.scroller,
          c = a.scrollWidth > a.clientWidth,
          u = a.scrollHeight > a.clientHeight;
        if ((i && c) || (o && u)) {
          if (o && v && l)
            e: for (var d = t.target, p = s.view; d != a; d = d.parentNode)
              for (var f = 0; f < p.length; f++)
                if (p[f].node == d) {
                  e.display.currentWheelTarget = d;
                  break e;
                }
          if (i && !n && !h && null != vi)
            return (
              o && u && Lr(e, Math.max(0, a.scrollTop + o * vi)),
              Nr(e, Math.max(0, a.scrollLeft + i * vi)),
              (!o || (o && u)) && we(t),
              void (s.wheelStartX = null)
            );
          if (o && null != vi) {
            var m = o * vi,
              g = e.doc.scrollTop,
              y = g + s.wrapper.clientHeight;
            m < 0
              ? (g = Math.max(0, g + m - 50))
              : (y = Math.min(e.doc.height, y + m + 50)),
              li(e, { top: g, bottom: y });
          }
          yi < 20 &&
            (null == s.wheelStartX
              ? ((s.wheelStartX = a.scrollLeft),
                (s.wheelStartY = a.scrollTop),
                (s.wheelDX = i),
                (s.wheelDY = o),
                setTimeout(function () {
                  if (null != s.wheelStartX) {
                    var e = a.scrollLeft - s.wheelStartX,
                      t = a.scrollTop - s.wheelStartY,
                      n =
                        (t && s.wheelDY && t / s.wheelDY) ||
                        (e && s.wheelDX && e / s.wheelDX);
                    (s.wheelStartX = s.wheelStartY = null),
                      n && ((vi = (vi * yi + n) / (yi + 1)), ++yi);
                  }
                }, 200))
              : ((s.wheelDX += i), (s.wheelDY += o)));
        }
      }
      s ? (vi = -0.53) : n ? (vi = 15) : u ? (vi = -0.7) : d && (vi = -1 / 3);
      var Ci = function (e, t) {
        (this.ranges = e), (this.primIndex = t);
      };
      (Ci.prototype.primary = function () {
        return this.ranges[this.primIndex];
      }),
        (Ci.prototype.equals = function (e) {
          if (e == this) return !0;
          if (
            e.primIndex != this.primIndex ||
            e.ranges.length != this.ranges.length
          )
            return !1;
          for (var t = 0; t < this.ranges.length; t++) {
            var n = this.ranges[t],
              r = e.ranges[t];
            if (!nt(n.anchor, r.anchor) || !nt(n.head, r.head)) return !1;
          }
          return !0;
        }),
        (Ci.prototype.deepCopy = function () {
          for (var e = [], t = 0; t < this.ranges.length; t++)
            e[t] = new Ei(rt(this.ranges[t].anchor), rt(this.ranges[t].head));
          return new Ci(e, this.primIndex);
        }),
        (Ci.prototype.somethingSelected = function () {
          for (var e = 0; e < this.ranges.length; e++)
            if (!this.ranges[e].empty()) return !0;
          return !1;
        }),
        (Ci.prototype.contains = function (e, t) {
          t || (t = e);
          for (var n = 0; n < this.ranges.length; n++) {
            var r = this.ranges[n];
            if (tt(t, r.from()) >= 0 && tt(e, r.to()) <= 0) return n;
          }
          return -1;
        });
      var Ei = function (e, t) {
        (this.anchor = e), (this.head = t);
      };
      function ki(e, t, n) {
        var r = e && e.options.selectionsMayTouch,
          i = t[n];
        t.sort(function (e, t) {
          return tt(e.from(), t.from());
        }),
          (n = z(t, i));
        for (var o = 1; o < t.length; o++) {
          var s = t[o],
            a = t[o - 1],
            l = tt(a.to(), s.from());
          if (r && !s.empty() ? l > 0 : l >= 0) {
            var c = ot(a.from(), s.from()),
              u = it(a.to(), s.to()),
              h = a.empty() ? s.from() == s.head : a.from() == a.head;
            o <= n && --n, t.splice(--o, 2, new Ei(h ? u : c, h ? c : u));
          }
        }
        return new Ci(t, n);
      }
      function xi(e, t) {
        return new Ci([new Ei(e, t || e)], 0);
      }
      function Ri(e) {
        return e.text
          ? et(
              e.from.line + e.text.length - 1,
              K(e.text).length + (1 == e.text.length ? e.from.ch : 0)
            )
          : e.to;
      }
      function Ti(e, t) {
        if (tt(e, t.from) < 0) return e;
        if (tt(e, t.to) <= 0) return Ri(t);
        var n = e.line + t.text.length - (t.to.line - t.from.line) - 1,
          r = e.ch;
        return e.line == t.to.line && (r += Ri(t).ch - t.to.ch), et(n, r);
      }
      function Di(e, t) {
        for (var n = [], r = 0; r < e.sel.ranges.length; r++) {
          var i = e.sel.ranges[r];
          n.push(new Ei(Ti(i.anchor, t), Ti(i.head, t)));
        }
        return ki(e.cm, n, e.sel.primIndex);
      }
      function Ai(e, t, n) {
        return e.line == t.line
          ? et(n.line, e.ch - t.ch + n.ch)
          : et(n.line + (e.line - t.line), e.ch);
      }
      function _i(e) {
        (e.doc.mode = He(e.options, e.doc.modeOption)), Mi(e);
      }
      function Mi(e) {
        e.doc.iter(function (e) {
          e.stateAfter && (e.stateAfter = null), e.styles && (e.styles = null);
        }),
          (e.doc.modeFrontier = e.doc.highlightFrontier = e.doc.first),
          ri(e, 100),
          e.state.modeGen++,
          e.curOp && hr(e);
      }
      function Pi(e, t) {
        return (
          0 == t.from.ch &&
          0 == t.to.ch &&
          "" == K(t.text) &&
          (!e.cm || e.cm.options.wholeLineUpdateBefore)
        );
      }
      function Ii(e, t, n, r) {
        function i(e) {
          return n ? n[e] : null;
        }
        function o(e, n, i) {
          !(function (e, t, n, r) {
            (e.text = t),
              e.stateAfter && (e.stateAfter = null),
              e.styles && (e.styles = null),
              null != e.order && (e.order = null),
              Dt(e),
              At(e, n);
            var i = r ? r(e) : 1;
            i != e.height && Ye(e, i);
          })(e, n, i, r),
            ln(e, "change", e, t);
        }
        function s(e, t) {
          for (var n = [], o = e; o < t; ++o) n.push(new $t(c[o], i(o), r));
          return n;
        }
        var a = t.from,
          l = t.to,
          c = t.text,
          u = $e(e, a.line),
          h = $e(e, l.line),
          d = K(c),
          p = i(c.length - 1),
          f = l.line - a.line;
        if (t.full)
          e.insert(0, s(0, c.length)), e.remove(c.length, e.size - c.length);
        else if (Pi(e, t)) {
          var m = s(0, c.length - 1);
          o(h, h.text, p),
            f && e.remove(a.line, f),
            m.length && e.insert(a.line, m);
        } else if (u == h)
          if (1 == c.length)
            o(u, u.text.slice(0, a.ch) + d + u.text.slice(l.ch), p);
          else {
            var g = s(1, c.length - 1);
            g.push(new $t(d + u.text.slice(l.ch), p, r)),
              o(u, u.text.slice(0, a.ch) + c[0], i(0)),
              e.insert(a.line + 1, g);
          }
        else if (1 == c.length)
          o(u, u.text.slice(0, a.ch) + c[0] + h.text.slice(l.ch), i(0)),
            e.remove(a.line + 1, f);
        else {
          o(u, u.text.slice(0, a.ch) + c[0], i(0)),
            o(h, d + h.text.slice(l.ch), p);
          var y = s(1, c.length - 1);
          f > 1 && e.remove(a.line + 1, f - 1), e.insert(a.line + 1, y);
        }
        ln(e, "change", e, t);
      }
      function Oi(e, t, n) {
        !(function e(r, i, o) {
          if (r.linked)
            for (var s = 0; s < r.linked.length; ++s) {
              var a = r.linked[s];
              if (a.doc != i) {
                var l = o && a.sharedHist;
                (n && !l) || (t(a.doc, l), e(a.doc, r, l));
              }
            }
        })(e, null, !0);
      }
      function Li(e, t) {
        if (t.cm) throw new Error("This document is already in use.");
        (e.doc = t),
          (t.cm = e),
          lr(e),
          _i(e),
          Fi(e),
          e.options.lineWrapping || Gt(e),
          (e.options.mode = t.modeOption),
          hr(e);
      }
      function Fi(e) {
        ("rtl" == e.doc.direction ? I : R)(e.display.lineDiv, "CodeMirror-rtl");
      }
      function Ni(e) {
        (this.done = []),
          (this.undone = []),
          (this.undoDepth = 1 / 0),
          (this.lastModTime = this.lastSelTime = 0),
          (this.lastOp = this.lastSelOp = null),
          (this.lastOrigin = this.lastSelOrigin = null),
          (this.generation = this.maxGeneration = e || 1);
      }
      function Bi(e, t) {
        var n = { from: rt(t.from), to: Ri(t), text: qe(e, t.from, t.to) };
        return (
          ji(e, n, t.from.line, t.to.line + 1),
          Oi(
            e,
            function (e) {
              return ji(e, n, t.from.line, t.to.line + 1);
            },
            !0
          ),
          n
        );
      }
      function Hi(e) {
        for (; e.length && K(e).ranges; ) e.pop();
      }
      function zi(e, t, n, r) {
        var i = e.history;
        i.undone.length = 0;
        var o,
          s,
          a = +new Date();
        if (
          (i.lastOp == r ||
            (i.lastOrigin == t.origin &&
              t.origin &&
              (("+" == t.origin.charAt(0) &&
                i.lastModTime >
                  a - (e.cm ? e.cm.options.historyEventDelay : 500)) ||
                "*" == t.origin.charAt(0)))) &&
          (o = (function (e, t) {
            return t
              ? (Hi(e.done), K(e.done))
              : e.done.length && !K(e.done).ranges
              ? K(e.done)
              : e.done.length > 1 && !e.done[e.done.length - 2].ranges
              ? (e.done.pop(), K(e.done))
              : void 0;
          })(i, i.lastOp == r))
        )
          (s = K(o.changes)),
            0 == tt(t.from, t.to) && 0 == tt(t.from, s.to)
              ? (s.to = Ri(t))
              : o.changes.push(Bi(e, t));
        else {
          var l = K(i.done);
          for (
            (l && l.ranges) || Wi(e.sel, i.done),
              o = { changes: [Bi(e, t)], generation: i.generation },
              i.done.push(o);
            i.done.length > i.undoDepth;

          )
            i.done.shift(), i.done[0].ranges || i.done.shift();
        }
        i.done.push(n),
          (i.generation = ++i.maxGeneration),
          (i.lastModTime = i.lastSelTime = a),
          (i.lastOp = i.lastSelOp = r),
          (i.lastOrigin = i.lastSelOrigin = t.origin),
          s || fe(e, "historyAdded");
      }
      function Ui(e, t, n, r) {
        var i = e.history,
          o = r && r.origin;
        n == i.lastSelOp ||
        (o &&
          i.lastSelOrigin == o &&
          ((i.lastModTime == i.lastSelTime && i.lastOrigin == o) ||
            (function (e, t, n, r) {
              var i = t.charAt(0);
              return (
                "*" == i ||
                ("+" == i &&
                  n.ranges.length == r.ranges.length &&
                  n.somethingSelected() == r.somethingSelected() &&
                  new Date() - e.history.lastSelTime <=
                    (e.cm ? e.cm.options.historyEventDelay : 500))
              );
            })(e, o, K(i.done), t)))
          ? (i.done[i.done.length - 1] = t)
          : Wi(t, i.done),
          (i.lastSelTime = +new Date()),
          (i.lastSelOrigin = o),
          (i.lastSelOp = n),
          r && !1 !== r.clearRedo && Hi(i.undone);
      }
      function Wi(e, t) {
        var n = K(t);
        (n && n.ranges && n.equals(e)) || t.push(e);
      }
      function ji(e, t, n, r) {
        var i = t["spans_" + e.id],
          o = 0;
        e.iter(
          Math.max(e.first, n),
          Math.min(e.first + e.size, r),
          function (n) {
            n.markedSpans &&
              ((i || (i = t["spans_" + e.id] = {}))[o] = n.markedSpans),
              ++o;
          }
        );
      }
      function Vi(e) {
        if (!e) return null;
        for (var t, n = 0; n < e.length; ++n)
          e[n].marker.explicitlyCleared
            ? t || (t = e.slice(0, n))
            : t && t.push(e[n]);
        return t ? (t.length ? t : null) : e;
      }
      function Gi(e, t) {
        var n = (function (e, t) {
            var n = t["spans_" + e.id];
            if (!n) return null;
            for (var r = [], i = 0; i < t.text.length; ++i) r.push(Vi(n[i]));
            return r;
          })(e, t),
          r = Rt(e, t);
        if (!n) return r;
        if (!r) return n;
        for (var i = 0; i < n.length; ++i) {
          var o = n[i],
            s = r[i];
          if (o && s)
            e: for (var a = 0; a < s.length; ++a) {
              for (var l = s[a], c = 0; c < o.length; ++c)
                if (o[c].marker == l.marker) continue e;
              o.push(l);
            }
          else s && (n[i] = s);
        }
        return n;
      }
      function $i(e, t, n) {
        for (var r = [], i = 0; i < e.length; ++i) {
          var o = e[i];
          if (o.ranges) r.push(n ? Ci.prototype.deepCopy.call(o) : o);
          else {
            var s = o.changes,
              a = [];
            r.push({ changes: a });
            for (var l = 0; l < s.length; ++l) {
              var c = s[l],
                u = void 0;
              if ((a.push({ from: c.from, to: c.to, text: c.text }), t))
                for (var h in c)
                  (u = h.match(/^spans_(\d+)$/)) &&
                    z(t, Number(u[1])) > -1 &&
                    ((K(a)[h] = c[h]), delete c[h]);
            }
          }
        }
        return r;
      }
      function qi(e, t, n, r) {
        if (r) {
          var i = e.anchor;
          if (n) {
            var o = tt(t, i) < 0;
            o != tt(n, i) < 0
              ? ((i = t), (t = n))
              : o != tt(t, n) < 0 && (t = n);
          }
          return new Ei(i, t);
        }
        return new Ei(n || t, t);
      }
      function Ki(e, t, n, r, i) {
        null == i && (i = e.cm && (e.cm.display.shift || e.extend)),
          Ji(e, new Ci([qi(e.sel.primary(), t, n, i)], 0), r);
      }
      function Yi(e, t, n) {
        for (
          var r = [], i = e.cm && (e.cm.display.shift || e.extend), o = 0;
          o < e.sel.ranges.length;
          o++
        )
          r[o] = qi(e.sel.ranges[o], t[o], null, i);
        Ji(e, ki(e.cm, r, e.sel.primIndex), n);
      }
      function Qi(e, t, n, r) {
        var i = e.sel.ranges.slice(0);
        (i[t] = n), Ji(e, ki(e.cm, i, e.sel.primIndex), r);
      }
      function Zi(e, t, n, r) {
        Ji(e, xi(t, n), r);
      }
      function Xi(e, t, n) {
        var r = e.history.done,
          i = K(r);
        i && i.ranges ? ((r[r.length - 1] = t), eo(e, t, n)) : Ji(e, t, n);
      }
      function Ji(e, t, n) {
        eo(e, t, n), Ui(e, e.sel, e.cm ? e.cm.curOp.id : NaN, n);
      }
      function eo(e, t, n) {
        (ye(e, "beforeSelectionChange") ||
          (e.cm && ye(e.cm, "beforeSelectionChange"))) &&
          (t = (function (e, t, n) {
            var r = {
              ranges: t.ranges,
              update: function (t) {
                this.ranges = [];
                for (var n = 0; n < t.length; n++)
                  this.ranges[n] = new Ei(at(e, t[n].anchor), at(e, t[n].head));
              },
              origin: n && n.origin,
            };
            return (
              fe(e, "beforeSelectionChange", e, r),
              e.cm && fe(e.cm, "beforeSelectionChange", e.cm, r),
              r.ranges != t.ranges ? ki(e.cm, r.ranges, r.ranges.length - 1) : t
            );
          })(e, t, n));
        var r =
          (n && n.bias) ||
          (tt(t.primary().head, e.sel.primary().head) < 0 ? -1 : 1);
        to(e, ro(e, t, r, !0)), (n && !1 === n.scroll) || !e.cm || Mr(e.cm);
      }
      function to(e, t) {
        t.equals(e.sel) ||
          ((e.sel = t),
          e.cm &&
            ((e.cm.curOp.updateInput = 1),
            (e.cm.curOp.selectionChanged = !0),
            ge(e.cm)),
          ln(e, "cursorActivity", e));
      }
      function no(e) {
        to(e, ro(e, e.sel, null, !1));
      }
      function ro(e, t, n, r) {
        for (var i, o = 0; o < t.ranges.length; o++) {
          var s = t.ranges[o],
            a = t.ranges.length == e.sel.ranges.length && e.sel.ranges[o],
            l = oo(e, s.anchor, a && a.anchor, n, r),
            c = oo(e, s.head, a && a.head, n, r);
          (i || l != s.anchor || c != s.head) &&
            (i || (i = t.ranges.slice(0, o)), (i[o] = new Ei(l, c)));
        }
        return i ? ki(e.cm, i, t.primIndex) : t;
      }
      function io(e, t, n, r, i) {
        var o = $e(e, t.line);
        if (o.markedSpans)
          for (var s = 0; s < o.markedSpans.length; ++s) {
            var a = o.markedSpans[s],
              l = a.marker,
              c = "selectLeft" in l ? !l.selectLeft : l.inclusiveLeft,
              u = "selectRight" in l ? !l.selectRight : l.inclusiveRight;
            if (
              (null == a.from || (c ? a.from <= t.ch : a.from < t.ch)) &&
              (null == a.to || (u ? a.to >= t.ch : a.to > t.ch))
            ) {
              if (i && (fe(l, "beforeCursorEnter"), l.explicitlyCleared)) {
                if (o.markedSpans) {
                  --s;
                  continue;
                }
                break;
              }
              if (!l.atomic) continue;
              if (n) {
                var h = l.find(r < 0 ? 1 : -1),
                  d = void 0;
                if (
                  ((r < 0 ? u : c) &&
                    (h = so(e, h, -r, h && h.line == t.line ? o : null)),
                  h &&
                    h.line == t.line &&
                    (d = tt(h, n)) &&
                    (r < 0 ? d < 0 : d > 0))
                )
                  return io(e, h, t, r, i);
              }
              var p = l.find(r < 0 ? -1 : 1);
              return (
                (r < 0 ? c : u) &&
                  (p = so(e, p, r, p.line == t.line ? o : null)),
                p ? io(e, p, t, r, i) : null
              );
            }
          }
        return t;
      }
      function oo(e, t, n, r, i) {
        var o = r || 1,
          s =
            io(e, t, n, o, i) ||
            (!i && io(e, t, n, o, !0)) ||
            io(e, t, n, -o, i) ||
            (!i && io(e, t, n, -o, !0));
        return s || ((e.cantEdit = !0), et(e.first, 0));
      }
      function so(e, t, n, r) {
        return n < 0 && 0 == t.ch
          ? t.line > e.first
            ? at(e, et(t.line - 1))
            : null
          : n > 0 && t.ch == (r || $e(e, t.line)).text.length
          ? t.line < e.first + e.size - 1
            ? et(t.line + 1, 0)
            : null
          : new et(t.line, t.ch + n);
      }
      function ao(e) {
        e.setSelection(et(e.firstLine(), 0), et(e.lastLine()), W);
      }
      function lo(e, t, n) {
        var r = {
          canceled: !1,
          from: t.from,
          to: t.to,
          text: t.text,
          origin: t.origin,
          cancel: function () {
            return (r.canceled = !0);
          },
        };
        return (
          n &&
            (r.update = function (t, n, i, o) {
              t && (r.from = at(e, t)),
                n && (r.to = at(e, n)),
                i && (r.text = i),
                void 0 !== o && (r.origin = o);
            }),
          fe(e, "beforeChange", e, r),
          e.cm && fe(e.cm, "beforeChange", e.cm, r),
          r.canceled
            ? (e.cm && (e.cm.curOp.updateInput = 2), null)
            : { from: r.from, to: r.to, text: r.text, origin: r.origin }
        );
      }
      function co(e, t, n) {
        if (e.cm) {
          if (!e.cm.curOp) return ei(e.cm, co)(e, t, n);
          if (e.cm.state.suppressEdits) return;
        }
        if (
          !(ye(e, "beforeChange") || (e.cm && ye(e.cm, "beforeChange"))) ||
          (t = lo(e, t, !0))
        ) {
          var r =
            St &&
            !n &&
            (function (e, t, n) {
              var r = null;
              if (
                (e.iter(t.line, n.line + 1, function (e) {
                  if (e.markedSpans)
                    for (var t = 0; t < e.markedSpans.length; ++t) {
                      var n = e.markedSpans[t].marker;
                      !n.readOnly ||
                        (r && -1 != z(r, n)) ||
                        (r || (r = [])).push(n);
                    }
                }),
                !r)
              )
                return null;
              for (var i = [{ from: t, to: n }], o = 0; o < r.length; ++o)
                for (var s = r[o], a = s.find(0), l = 0; l < i.length; ++l) {
                  var c = i[l];
                  if (!(tt(c.to, a.from) < 0 || tt(c.from, a.to) > 0)) {
                    var u = [l, 1],
                      h = tt(c.from, a.from),
                      d = tt(c.to, a.to);
                    (h < 0 || (!s.inclusiveLeft && !h)) &&
                      u.push({ from: c.from, to: a.from }),
                      (d > 0 || (!s.inclusiveRight && !d)) &&
                        u.push({ from: a.to, to: c.to }),
                      i.splice.apply(i, u),
                      (l += u.length - 3);
                  }
                }
              return i;
            })(e, t.from, t.to);
          if (r)
            for (var i = r.length - 1; i >= 0; --i)
              uo(e, {
                from: r[i].from,
                to: r[i].to,
                text: i ? [""] : t.text,
                origin: t.origin,
              });
          else uo(e, t);
        }
      }
      function uo(e, t) {
        if (1 != t.text.length || "" != t.text[0] || 0 != tt(t.from, t.to)) {
          var n = Di(e, t);
          zi(e, t, n, e.cm ? e.cm.curOp.id : NaN), fo(e, t, n, Rt(e, t));
          var r = [];
          Oi(e, function (e, n) {
            n || -1 != z(r, e.history) || (vo(e.history, t), r.push(e.history)),
              fo(e, t, null, Rt(e, t));
          });
        }
      }
      function ho(e, t, n) {
        var r = e.cm && e.cm.state.suppressEdits;
        if (!r || n) {
          for (
            var i,
              o = e.history,
              s = e.sel,
              a = "undo" == t ? o.done : o.undone,
              l = "undo" == t ? o.undone : o.done,
              c = 0;
            c < a.length &&
            ((i = a[c]), n ? !i.ranges || i.equals(e.sel) : i.ranges);
            c++
          );
          if (c != a.length) {
            for (o.lastOrigin = o.lastSelOrigin = null; ; ) {
              if (!(i = a.pop()).ranges) {
                if (r) return void a.push(i);
                break;
              }
              if ((Wi(i, l), n && !i.equals(e.sel)))
                return void Ji(e, i, { clearRedo: !1 });
              s = i;
            }
            var u = [];
            Wi(s, l),
              l.push({ changes: u, generation: o.generation }),
              (o.generation = i.generation || ++o.maxGeneration);
            for (
              var h =
                  ye(e, "beforeChange") || (e.cm && ye(e.cm, "beforeChange")),
                d = function (n) {
                  var r = i.changes[n];
                  if (((r.origin = t), h && !lo(e, r, !1)))
                    return (a.length = 0), {};
                  u.push(Bi(e, r));
                  var o = n ? Di(e, r) : K(a);
                  fo(e, r, o, Gi(e, r)),
                    !n &&
                      e.cm &&
                      e.cm.scrollIntoView({ from: r.from, to: Ri(r) });
                  var s = [];
                  Oi(e, function (e, t) {
                    t ||
                      -1 != z(s, e.history) ||
                      (vo(e.history, r), s.push(e.history)),
                      fo(e, r, null, Gi(e, r));
                  });
                },
                p = i.changes.length - 1;
              p >= 0;
              --p
            ) {
              var f = d(p);
              if (f) return f.v;
            }
          }
        }
      }
      function po(e, t) {
        if (
          0 != t &&
          ((e.first += t),
          (e.sel = new Ci(
            Y(e.sel.ranges, function (e) {
              return new Ei(
                et(e.anchor.line + t, e.anchor.ch),
                et(e.head.line + t, e.head.ch)
              );
            }),
            e.sel.primIndex
          )),
          e.cm)
        ) {
          hr(e.cm, e.first, e.first - t, t);
          for (var n = e.cm.display, r = n.viewFrom; r < n.viewTo; r++)
            dr(e.cm, r, "gutter");
        }
      }
      function fo(e, t, n, r) {
        if (e.cm && !e.cm.curOp) return ei(e.cm, fo)(e, t, n, r);
        if (t.to.line < e.first)
          po(e, t.text.length - 1 - (t.to.line - t.from.line));
        else if (!(t.from.line > e.lastLine())) {
          if (t.from.line < e.first) {
            var i = t.text.length - 1 - (e.first - t.from.line);
            po(e, i),
              (t = {
                from: et(e.first, 0),
                to: et(t.to.line + i, t.to.ch),
                text: [K(t.text)],
                origin: t.origin,
              });
          }
          var o = e.lastLine();
          t.to.line > o &&
            (t = {
              from: t.from,
              to: et(o, $e(e, o).text.length),
              text: [t.text[0]],
              origin: t.origin,
            }),
            (t.removed = qe(e, t.from, t.to)),
            n || (n = Di(e, t)),
            e.cm
              ? (function (e, t, n) {
                  var r = e.doc,
                    i = e.display,
                    o = t.from,
                    s = t.to,
                    a = !1,
                    l = o.line;
                  e.options.lineWrapping ||
                    ((l = Qe(Bt($e(r, o.line)))),
                    r.iter(l, s.line + 1, function (e) {
                      if (e == i.maxLine) return (a = !0), !0;
                    })),
                    r.sel.contains(t.from, t.to) > -1 && ge(e),
                    Ii(r, t, n, ar(e)),
                    e.options.lineWrapping ||
                      (r.iter(l, o.line + t.text.length, function (e) {
                        var t = Vt(e);
                        t > i.maxLineLength &&
                          ((i.maxLine = e),
                          (i.maxLineLength = t),
                          (i.maxLineChanged = !0),
                          (a = !1));
                      }),
                      a && (e.curOp.updateMaxLine = !0)),
                    (function (e, t) {
                      if (
                        ((e.modeFrontier = Math.min(e.modeFrontier, t)),
                        !(e.highlightFrontier < t - 10))
                      ) {
                        for (var n = e.first, r = t - 1; r > n; r--) {
                          var i = $e(e, r).stateAfter;
                          if (
                            i &&
                            (!(i instanceof ct) || r + i.lookAhead < t)
                          ) {
                            n = r + 1;
                            break;
                          }
                        }
                        e.highlightFrontier = Math.min(e.highlightFrontier, n);
                      }
                    })(r, o.line),
                    ri(e, 400);
                  var c = t.text.length - (s.line - o.line) - 1;
                  t.full
                    ? hr(e)
                    : o.line != s.line || 1 != t.text.length || Pi(e.doc, t)
                    ? hr(e, o.line, s.line + 1, c)
                    : dr(e, o.line, "text");
                  var u = ye(e, "changes"),
                    h = ye(e, "change");
                  if (h || u) {
                    var d = {
                      from: o,
                      to: s,
                      text: t.text,
                      removed: t.removed,
                      origin: t.origin,
                    };
                    h && ln(e, "change", e, d),
                      u &&
                        (e.curOp.changeObjs || (e.curOp.changeObjs = [])).push(
                          d
                        );
                  }
                  e.display.selForContextMenu = null;
                })(e.cm, t, r)
              : Ii(e, t, r),
            eo(e, n, W),
            e.cantEdit && oo(e, et(e.firstLine(), 0)) && (e.cantEdit = !1);
        }
      }
      function mo(e, t, n, r, i) {
        var o;
        r || (r = n),
          tt(r, n) < 0 && ((n = (o = [r, n])[0]), (r = o[1])),
          "string" == typeof t && (t = e.splitLines(t)),
          co(e, { from: n, to: r, text: t, origin: i });
      }
      function go(e, t, n, r) {
        n < e.line ? (e.line += r) : t < e.line && ((e.line = t), (e.ch = 0));
      }
      function yo(e, t, n, r) {
        for (var i = 0; i < e.length; ++i) {
          var o = e[i],
            s = !0;
          if (o.ranges) {
            o.copied || ((o = e[i] = o.deepCopy()).copied = !0);
            for (var a = 0; a < o.ranges.length; a++)
              go(o.ranges[a].anchor, t, n, r), go(o.ranges[a].head, t, n, r);
          } else {
            for (var l = 0; l < o.changes.length; ++l) {
              var c = o.changes[l];
              if (n < c.from.line)
                (c.from = et(c.from.line + r, c.from.ch)),
                  (c.to = et(c.to.line + r, c.to.ch));
              else if (t <= c.to.line) {
                s = !1;
                break;
              }
            }
            s || (e.splice(0, i + 1), (i = 0));
          }
        }
      }
      function vo(e, t) {
        var n = t.from.line,
          r = t.to.line,
          i = t.text.length - (r - n) - 1;
        yo(e.done, n, r, i), yo(e.undone, n, r, i);
      }
      function wo(e, t, n, r) {
        var i = t,
          o = t;
        return (
          "number" == typeof t ? (o = $e(e, st(e, t))) : (i = Qe(t)),
          null == i ? null : (r(o, i) && e.cm && dr(e.cm, i, n), o)
        );
      }
      function bo(e) {
        (this.lines = e), (this.parent = null);
        for (var t = 0, n = 0; n < e.length; ++n)
          (e[n].parent = this), (t += e[n].height);
        this.height = t;
      }
      function So(e) {
        this.children = e;
        for (var t = 0, n = 0, r = 0; r < e.length; ++r) {
          var i = e[r];
          (t += i.chunkSize()), (n += i.height), (i.parent = this);
        }
        (this.size = t), (this.height = n), (this.parent = null);
      }
      (Ei.prototype.from = function () {
        return ot(this.anchor, this.head);
      }),
        (Ei.prototype.to = function () {
          return it(this.anchor, this.head);
        }),
        (Ei.prototype.empty = function () {
          return (
            this.head.line == this.anchor.line && this.head.ch == this.anchor.ch
          );
        }),
        (bo.prototype = {
          chunkSize: function () {
            return this.lines.length;
          },
          removeInner: function (e, t) {
            for (var n = e, r = e + t; n < r; ++n) {
              var i = this.lines[n];
              (this.height -= i.height), qt(i), ln(i, "delete");
            }
            this.lines.splice(e, t);
          },
          collapse: function (e) {
            e.push.apply(e, this.lines);
          },
          insertInner: function (e, t, n) {
            (this.height += n),
              (this.lines = this.lines
                .slice(0, e)
                .concat(t)
                .concat(this.lines.slice(e)));
            for (var r = 0; r < t.length; ++r) t[r].parent = this;
          },
          iterN: function (e, t, n) {
            for (var r = e + t; e < r; ++e) if (n(this.lines[e])) return !0;
          },
        }),
        (So.prototype = {
          chunkSize: function () {
            return this.size;
          },
          removeInner: function (e, t) {
            this.size -= t;
            for (var n = 0; n < this.children.length; ++n) {
              var r = this.children[n],
                i = r.chunkSize();
              if (e < i) {
                var o = Math.min(t, i - e),
                  s = r.height;
                if (
                  (r.removeInner(e, o),
                  (this.height -= s - r.height),
                  i == o && (this.children.splice(n--, 1), (r.parent = null)),
                  0 == (t -= o))
                )
                  break;
                e = 0;
              } else e -= i;
            }
            if (
              this.size - t < 25 &&
              (this.children.length > 1 || !(this.children[0] instanceof bo))
            ) {
              var a = [];
              this.collapse(a),
                (this.children = [new bo(a)]),
                (this.children[0].parent = this);
            }
          },
          collapse: function (e) {
            for (var t = 0; t < this.children.length; ++t)
              this.children[t].collapse(e);
          },
          insertInner: function (e, t, n) {
            (this.size += t.length), (this.height += n);
            for (var r = 0; r < this.children.length; ++r) {
              var i = this.children[r],
                o = i.chunkSize();
              if (e <= o) {
                if ((i.insertInner(e, t, n), i.lines && i.lines.length > 50)) {
                  for (
                    var s = (i.lines.length % 25) + 25, a = s;
                    a < i.lines.length;

                  ) {
                    var l = new bo(i.lines.slice(a, (a += 25)));
                    (i.height -= l.height),
                      this.children.splice(++r, 0, l),
                      (l.parent = this);
                  }
                  (i.lines = i.lines.slice(0, s)), this.maybeSpill();
                }
                break;
              }
              e -= o;
            }
          },
          maybeSpill: function () {
            if (!(this.children.length <= 10)) {
              var e = this;
              do {
                var t = new So(e.children.splice(e.children.length - 5, 5));
                if (e.parent) {
                  (e.size -= t.size), (e.height -= t.height);
                  var n = z(e.parent.children, e);
                  e.parent.children.splice(n + 1, 0, t);
                } else {
                  var r = new So(e.children);
                  (r.parent = e), (e.children = [r, t]), (e = r);
                }
                t.parent = e.parent;
              } while (e.children.length > 10);
              e.parent.maybeSpill();
            }
          },
          iterN: function (e, t, n) {
            for (var r = 0; r < this.children.length; ++r) {
              var i = this.children[r],
                o = i.chunkSize();
              if (e < o) {
                var s = Math.min(t, o - e);
                if (i.iterN(e, s, n)) return !0;
                if (0 == (t -= s)) break;
                e = 0;
              } else e -= o;
            }
          },
        });
      var Co = function (e, t, n) {
        if (n) for (var r in n) n.hasOwnProperty(r) && (this[r] = n[r]);
        (this.doc = e), (this.node = t);
      };
      function Eo(e, t, n) {
        jt(t) < ((e.curOp && e.curOp.scrollTop) || e.doc.scrollTop) && _r(e, n);
      }
      (Co.prototype.clear = function () {
        var e = this.doc.cm,
          t = this.line.widgets,
          n = this.line,
          r = Qe(n);
        if (null != r && t) {
          for (var i = 0; i < t.length; ++i) t[i] == this && t.splice(i--, 1);
          t.length || (n.widgets = null);
          var o = Sn(this);
          Ye(n, Math.max(0, n.height - o)),
            e &&
              (Jr(e, function () {
                Eo(e, n, -o), dr(e, r, "widget");
              }),
              ln(e, "lineWidgetCleared", e, this, r));
        }
      }),
        (Co.prototype.changed = function () {
          var e = this,
            t = this.height,
            n = this.doc.cm,
            r = this.line;
          this.height = null;
          var i = Sn(this) - t;
          i &&
            (Ut(this.doc, r) || Ye(r, r.height + i),
            n &&
              Jr(n, function () {
                (n.curOp.forceUpdate = !0),
                  Eo(n, r, i),
                  ln(n, "lineWidgetChanged", n, e, Qe(r));
              }));
        }),
        ve(Co);
      var ko = 0,
        xo = function (e, t) {
          (this.lines = []), (this.type = t), (this.doc = e), (this.id = ++ko);
        };
      function Ro(e, t, n, r, i) {
        if (r && r.shared)
          return (function (e, t, n, r, i) {
            (r = N(r)).shared = !1;
            var o = [Ro(e, t, n, r, i)],
              s = o[0],
              a = r.widgetNode;
            return (
              Oi(e, function (e) {
                a && (r.widgetNode = a.cloneNode(!0)),
                  o.push(Ro(e, at(e, t), at(e, n), r, i));
                for (var l = 0; l < e.linked.length; ++l)
                  if (e.linked[l].isParent) return;
                s = K(o);
              }),
              new To(o, s)
            );
          })(e, t, n, r, i);
        if (e.cm && !e.cm.curOp) return ei(e.cm, Ro)(e, t, n, r, i);
        var o = new xo(e, i),
          s = tt(t, n);
        if ((r && N(r, o, !1), s > 0 || (0 == s && !1 !== o.clearWhenEmpty)))
          return o;
        if (
          (o.replacedWith &&
            ((o.collapsed = !0),
            (o.widgetNode = _("span", [o.replacedWith], "CodeMirror-widget")),
            r.handleMouseEvents ||
              o.widgetNode.setAttribute("cm-ignore-events", "true"),
            r.insertLeft && (o.widgetNode.insertLeft = !0)),
          o.collapsed)
        ) {
          if (
            Nt(e, t.line, t, n, o) ||
            (t.line != n.line && Nt(e, n.line, t, n, o))
          )
            throw new Error(
              "Inserting collapsed marker partially overlapping an existing one"
            );
          Ct = !0;
        }
        o.addToHistory &&
          zi(e, { from: t, to: n, origin: "markText" }, e.sel, NaN);
        var a,
          l = t.line,
          c = e.cm;
        if (
          (e.iter(l, n.line + 1, function (e) {
            c &&
              o.collapsed &&
              !c.options.lineWrapping &&
              Bt(e) == c.display.maxLine &&
              (a = !0),
              o.collapsed && l != t.line && Ye(e, 0),
              (function (e, t) {
                (e.markedSpans = e.markedSpans
                  ? e.markedSpans.concat([t])
                  : [t]),
                  t.marker.attachLine(e);
              })(
                e,
                new Et(o, l == t.line ? t.ch : null, l == n.line ? n.ch : null)
              ),
              ++l;
          }),
          o.collapsed &&
            e.iter(t.line, n.line + 1, function (t) {
              Ut(e, t) && Ye(t, 0);
            }),
          o.clearOnEnter &&
            he(o, "beforeCursorEnter", function () {
              return o.clear();
            }),
          o.readOnly &&
            ((St = !0),
            (e.history.done.length || e.history.undone.length) &&
              e.clearHistory()),
          o.collapsed && ((o.id = ++ko), (o.atomic = !0)),
          c)
        ) {
          if ((a && (c.curOp.updateMaxLine = !0), o.collapsed))
            hr(c, t.line, n.line + 1);
          else if (
            o.className ||
            o.startStyle ||
            o.endStyle ||
            o.css ||
            o.attributes ||
            o.title
          )
            for (var u = t.line; u <= n.line; u++) dr(c, u, "text");
          o.atomic && no(c.doc), ln(c, "markerAdded", c, o);
        }
        return o;
      }
      (xo.prototype.clear = function () {
        if (!this.explicitlyCleared) {
          var e = this.doc.cm,
            t = e && !e.curOp;
          if ((t && $r(e), ye(this, "clear"))) {
            var n = this.find();
            n && ln(this, "clear", n.from, n.to);
          }
          for (var r = null, i = null, o = 0; o < this.lines.length; ++o) {
            var s = this.lines[o],
              a = kt(s.markedSpans, this);
            e && !this.collapsed
              ? dr(e, Qe(s), "text")
              : e &&
                (null != a.to && (i = Qe(s)), null != a.from && (r = Qe(s))),
              (s.markedSpans = xt(s.markedSpans, a)),
              null == a.from &&
                this.collapsed &&
                !Ut(this.doc, s) &&
                e &&
                Ye(s, rr(e.display));
          }
          if (e && this.collapsed && !e.options.lineWrapping)
            for (var l = 0; l < this.lines.length; ++l) {
              var c = Bt(this.lines[l]),
                u = Vt(c);
              u > e.display.maxLineLength &&
                ((e.display.maxLine = c),
                (e.display.maxLineLength = u),
                (e.display.maxLineChanged = !0));
            }
          null != r && e && this.collapsed && hr(e, r, i + 1),
            (this.lines.length = 0),
            (this.explicitlyCleared = !0),
            this.atomic &&
              this.doc.cantEdit &&
              ((this.doc.cantEdit = !1), e && no(e.doc)),
            e && ln(e, "markerCleared", e, this, r, i),
            t && qr(e),
            this.parent && this.parent.clear();
        }
      }),
        (xo.prototype.find = function (e, t) {
          var n, r;
          null == e && "bookmark" == this.type && (e = 1);
          for (var i = 0; i < this.lines.length; ++i) {
            var o = this.lines[i],
              s = kt(o.markedSpans, this);
            if (null != s.from && ((n = et(t ? o : Qe(o), s.from)), -1 == e))
              return n;
            if (null != s.to && ((r = et(t ? o : Qe(o), s.to)), 1 == e))
              return r;
          }
          return n && { from: n, to: r };
        }),
        (xo.prototype.changed = function () {
          var e = this,
            t = this.find(-1, !0),
            n = this,
            r = this.doc.cm;
          t &&
            r &&
            Jr(r, function () {
              var i = t.line,
                o = Qe(t.line),
                s = Mn(r, o);
              if (
                (s &&
                  (Bn(s),
                  (r.curOp.selectionChanged = r.curOp.forceUpdate = !0)),
                (r.curOp.updateMaxLine = !0),
                !Ut(n.doc, i) && null != n.height)
              ) {
                var a = n.height;
                n.height = null;
                var l = Sn(n) - a;
                l && Ye(i, i.height + l);
              }
              ln(r, "markerChanged", r, e);
            });
        }),
        (xo.prototype.attachLine = function (e) {
          if (!this.lines.length && this.doc.cm) {
            var t = this.doc.cm.curOp;
            (t.maybeHiddenMarkers && -1 != z(t.maybeHiddenMarkers, this)) ||
              (t.maybeUnhiddenMarkers || (t.maybeUnhiddenMarkers = [])).push(
                this
              );
          }
          this.lines.push(e);
        }),
        (xo.prototype.detachLine = function (e) {
          if (
            (this.lines.splice(z(this.lines, e), 1),
            !this.lines.length && this.doc.cm)
          ) {
            var t = this.doc.cm.curOp;
            (t.maybeHiddenMarkers || (t.maybeHiddenMarkers = [])).push(this);
          }
        }),
        ve(xo);
      var To = function (e, t) {
        (this.markers = e), (this.primary = t);
        for (var n = 0; n < e.length; ++n) e[n].parent = this;
      };
      function Do(e) {
        return e.findMarks(
          et(e.first, 0),
          e.clipPos(et(e.lastLine())),
          function (e) {
            return e.parent;
          }
        );
      }
      function Ao(e) {
        for (
          var t = function (t) {
              var n = e[t],
                r = [n.primary.doc];
              Oi(n.primary.doc, function (e) {
                return r.push(e);
              });
              for (var i = 0; i < n.markers.length; i++) {
                var o = n.markers[i];
                -1 == z(r, o.doc) &&
                  ((o.parent = null), n.markers.splice(i--, 1));
              }
            },
            n = 0;
          n < e.length;
          n++
        )
          t(n);
      }
      (To.prototype.clear = function () {
        if (!this.explicitlyCleared) {
          this.explicitlyCleared = !0;
          for (var e = 0; e < this.markers.length; ++e) this.markers[e].clear();
          ln(this, "clear");
        }
      }),
        (To.prototype.find = function (e, t) {
          return this.primary.find(e, t);
        }),
        ve(To);
      var _o = 0,
        Mo = function (e, t, n, r, i) {
          if (!(this instanceof Mo)) return new Mo(e, t, n, r, i);
          null == n && (n = 0),
            So.call(this, [new bo([new $t("", null)])]),
            (this.first = n),
            (this.scrollTop = this.scrollLeft = 0),
            (this.cantEdit = !1),
            (this.cleanGeneration = 1),
            (this.modeFrontier = this.highlightFrontier = n);
          var o = et(n, 0);
          (this.sel = xi(o)),
            (this.history = new Ni(null)),
            (this.id = ++_o),
            (this.modeOption = t),
            (this.lineSep = r),
            (this.direction = "rtl" == i ? "rtl" : "ltr"),
            (this.extend = !1),
            "string" == typeof e && (e = this.splitLines(e)),
            Ii(this, { from: o, to: o, text: e }),
            Ji(this, xi(o), W);
        };
      (Mo.prototype = Z(So.prototype, {
        constructor: Mo,
        iter: function (e, t, n) {
          n
            ? this.iterN(e - this.first, t - e, n)
            : this.iterN(this.first, this.first + this.size, e);
        },
        insert: function (e, t) {
          for (var n = 0, r = 0; r < t.length; ++r) n += t[r].height;
          this.insertInner(e - this.first, t, n);
        },
        remove: function (e, t) {
          this.removeInner(e - this.first, t);
        },
        getValue: function (e) {
          var t = Ke(this, this.first, this.first + this.size);
          return !1 === e ? t : t.join(e || this.lineSeparator());
        },
        setValue: ni(function (e) {
          var t = et(this.first, 0),
            n = this.first + this.size - 1;
          co(
            this,
            {
              from: t,
              to: et(n, $e(this, n).text.length),
              text: this.splitLines(e),
              origin: "setValue",
              full: !0,
            },
            !0
          ),
            this.cm && Pr(this.cm, 0, 0),
            Ji(this, xi(t), W);
        }),
        replaceRange: function (e, t, n, r) {
          mo(this, e, (t = at(this, t)), (n = n ? at(this, n) : t), r);
        },
        getRange: function (e, t, n) {
          var r = qe(this, at(this, e), at(this, t));
          return !1 === n ? r : r.join(n || this.lineSeparator());
        },
        getLine: function (e) {
          var t = this.getLineHandle(e);
          return t && t.text;
        },
        getLineHandle: function (e) {
          if (Xe(this, e)) return $e(this, e);
        },
        getLineNumber: function (e) {
          return Qe(e);
        },
        getLineHandleVisualStart: function (e) {
          return "number" == typeof e && (e = $e(this, e)), Bt(e);
        },
        lineCount: function () {
          return this.size;
        },
        firstLine: function () {
          return this.first;
        },
        lastLine: function () {
          return this.first + this.size - 1;
        },
        clipPos: function (e) {
          return at(this, e);
        },
        getCursor: function (e) {
          var t = this.sel.primary();
          return null == e || "head" == e
            ? t.head
            : "anchor" == e
            ? t.anchor
            : "end" == e || "to" == e || !1 === e
            ? t.to()
            : t.from();
        },
        listSelections: function () {
          return this.sel.ranges;
        },
        somethingSelected: function () {
          return this.sel.somethingSelected();
        },
        setCursor: ni(function (e, t, n) {
          Zi(this, at(this, "number" == typeof e ? et(e, t || 0) : e), null, n);
        }),
        setSelection: ni(function (e, t, n) {
          Zi(this, at(this, e), at(this, t || e), n);
        }),
        extendSelection: ni(function (e, t, n) {
          Ki(this, at(this, e), t && at(this, t), n);
        }),
        extendSelections: ni(function (e, t) {
          Yi(this, lt(this, e), t);
        }),
        extendSelectionsBy: ni(function (e, t) {
          Yi(this, lt(this, Y(this.sel.ranges, e)), t);
        }),
        setSelections: ni(function (e, t, n) {
          if (e.length) {
            for (var r = [], i = 0; i < e.length; i++)
              r[i] = new Ei(at(this, e[i].anchor), at(this, e[i].head));
            null == t && (t = Math.min(e.length - 1, this.sel.primIndex)),
              Ji(this, ki(this.cm, r, t), n);
          }
        }),
        addSelection: ni(function (e, t, n) {
          var r = this.sel.ranges.slice(0);
          r.push(new Ei(at(this, e), at(this, t || e))),
            Ji(this, ki(this.cm, r, r.length - 1), n);
        }),
        getSelection: function (e) {
          for (var t, n = this.sel.ranges, r = 0; r < n.length; r++) {
            var i = qe(this, n[r].from(), n[r].to());
            t = t ? t.concat(i) : i;
          }
          return !1 === e ? t : t.join(e || this.lineSeparator());
        },
        getSelections: function (e) {
          for (var t = [], n = this.sel.ranges, r = 0; r < n.length; r++) {
            var i = qe(this, n[r].from(), n[r].to());
            !1 !== e && (i = i.join(e || this.lineSeparator())), (t[r] = i);
          }
          return t;
        },
        replaceSelection: function (e, t, n) {
          for (var r = [], i = 0; i < this.sel.ranges.length; i++) r[i] = e;
          this.replaceSelections(r, t, n || "+input");
        },
        replaceSelections: ni(function (e, t, n) {
          for (var r = [], i = this.sel, o = 0; o < i.ranges.length; o++) {
            var s = i.ranges[o];
            r[o] = {
              from: s.from(),
              to: s.to(),
              text: this.splitLines(e[o]),
              origin: n,
            };
          }
          for (
            var a =
                t &&
                "end" != t &&
                (function (e, t, n) {
                  for (
                    var r = [], i = et(e.first, 0), o = i, s = 0;
                    s < t.length;
                    s++
                  ) {
                    var a = t[s],
                      l = Ai(a.from, i, o),
                      c = Ai(Ri(a), i, o);
                    if (((i = a.to), (o = c), "around" == n)) {
                      var u = e.sel.ranges[s],
                        h = tt(u.head, u.anchor) < 0;
                      r[s] = new Ei(h ? c : l, h ? l : c);
                    } else r[s] = new Ei(l, l);
                  }
                  return new Ci(r, e.sel.primIndex);
                })(this, r, t),
              l = r.length - 1;
            l >= 0;
            l--
          )
            co(this, r[l]);
          a ? Xi(this, a) : this.cm && Mr(this.cm);
        }),
        undo: ni(function () {
          ho(this, "undo");
        }),
        redo: ni(function () {
          ho(this, "redo");
        }),
        undoSelection: ni(function () {
          ho(this, "undo", !0);
        }),
        redoSelection: ni(function () {
          ho(this, "redo", !0);
        }),
        setExtending: function (e) {
          this.extend = e;
        },
        getExtending: function () {
          return this.extend;
        },
        historySize: function () {
          for (
            var e = this.history, t = 0, n = 0, r = 0;
            r < e.done.length;
            r++
          )
            e.done[r].ranges || ++t;
          for (var i = 0; i < e.undone.length; i++) e.undone[i].ranges || ++n;
          return { undo: t, redo: n };
        },
        clearHistory: function () {
          this.history = new Ni(this.history.maxGeneration);
        },
        markClean: function () {
          this.cleanGeneration = this.changeGeneration(!0);
        },
        changeGeneration: function (e) {
          return (
            e &&
              (this.history.lastOp = this.history.lastSelOp = this.history.lastOrigin = null),
            this.history.generation
          );
        },
        isClean: function (e) {
          return this.history.generation == (e || this.cleanGeneration);
        },
        getHistory: function () {
          return {
            done: $i(this.history.done),
            undone: $i(this.history.undone),
          };
        },
        setHistory: function (e) {
          var t = (this.history = new Ni(this.history.maxGeneration));
          (t.done = $i(e.done.slice(0), null, !0)),
            (t.undone = $i(e.undone.slice(0), null, !0));
        },
        setGutterMarker: ni(function (e, t, n) {
          return wo(this, e, "gutter", function (e) {
            var r = e.gutterMarkers || (e.gutterMarkers = {});
            return (r[t] = n), !n && te(r) && (e.gutterMarkers = null), !0;
          });
        }),
        clearGutter: ni(function (e) {
          var t = this;
          this.iter(function (n) {
            n.gutterMarkers &&
              n.gutterMarkers[e] &&
              wo(t, n, "gutter", function () {
                return (
                  (n.gutterMarkers[e] = null),
                  te(n.gutterMarkers) && (n.gutterMarkers = null),
                  !0
                );
              });
          });
        }),
        lineInfo: function (e) {
          var t;
          if ("number" == typeof e) {
            if (!Xe(this, e)) return null;
            if (((t = e), !(e = $e(this, e)))) return null;
          } else if (null == (t = Qe(e))) return null;
          return {
            line: t,
            handle: e,
            text: e.text,
            gutterMarkers: e.gutterMarkers,
            textClass: e.textClass,
            bgClass: e.bgClass,
            wrapClass: e.wrapClass,
            widgets: e.widgets,
          };
        },
        addLineClass: ni(function (e, t, n) {
          return wo(this, e, "gutter" == t ? "gutter" : "class", function (e) {
            var r =
              "text" == t
                ? "textClass"
                : "background" == t
                ? "bgClass"
                : "gutter" == t
                ? "gutterClass"
                : "wrapClass";
            if (e[r]) {
              if (k(n).test(e[r])) return !1;
              e[r] += " " + n;
            } else e[r] = n;
            return !0;
          });
        }),
        removeLineClass: ni(function (e, t, n) {
          return wo(this, e, "gutter" == t ? "gutter" : "class", function (e) {
            var r =
                "text" == t
                  ? "textClass"
                  : "background" == t
                  ? "bgClass"
                  : "gutter" == t
                  ? "gutterClass"
                  : "wrapClass",
              i = e[r];
            if (!i) return !1;
            if (null == n) e[r] = null;
            else {
              var o = i.match(k(n));
              if (!o) return !1;
              var s = o.index + o[0].length;
              e[r] =
                i.slice(0, o.index) +
                  (o.index && s != i.length ? " " : "") +
                  i.slice(s) || null;
            }
            return !0;
          });
        }),
        addLineWidget: ni(function (e, t, n) {
          return (function (e, t, n, r) {
            var i = new Co(e, n, r),
              o = e.cm;
            return (
              o && i.noHScroll && (o.display.alignWidgets = !0),
              wo(e, t, "widget", function (t) {
                var n = t.widgets || (t.widgets = []);
                if (
                  (null == i.insertAt
                    ? n.push(i)
                    : n.splice(
                        Math.min(n.length - 1, Math.max(0, i.insertAt)),
                        0,
                        i
                      ),
                  (i.line = t),
                  o && !Ut(e, t))
                ) {
                  var r = jt(t) < e.scrollTop;
                  Ye(t, t.height + Sn(i)),
                    r && _r(o, i.height),
                    (o.curOp.forceUpdate = !0);
                }
                return !0;
              }),
              o &&
                ln(
                  o,
                  "lineWidgetAdded",
                  o,
                  i,
                  "number" == typeof t ? t : Qe(t)
                ),
              i
            );
          })(this, e, t, n);
        }),
        removeLineWidget: function (e) {
          e.clear();
        },
        markText: function (e, t, n) {
          return Ro(
            this,
            at(this, e),
            at(this, t),
            n,
            (n && n.type) || "range"
          );
        },
        setBookmark: function (e, t) {
          var n = {
            replacedWith: t && (null == t.nodeType ? t.widget : t),
            insertLeft: t && t.insertLeft,
            clearWhenEmpty: !1,
            shared: t && t.shared,
            handleMouseEvents: t && t.handleMouseEvents,
          };
          return Ro(this, (e = at(this, e)), e, n, "bookmark");
        },
        findMarksAt: function (e) {
          var t = [],
            n = $e(this, (e = at(this, e)).line).markedSpans;
          if (n)
            for (var r = 0; r < n.length; ++r) {
              var i = n[r];
              (null == i.from || i.from <= e.ch) &&
                (null == i.to || i.to >= e.ch) &&
                t.push(i.marker.parent || i.marker);
            }
          return t;
        },
        findMarks: function (e, t, n) {
          (e = at(this, e)), (t = at(this, t));
          var r = [],
            i = e.line;
          return (
            this.iter(e.line, t.line + 1, function (o) {
              var s = o.markedSpans;
              if (s)
                for (var a = 0; a < s.length; a++) {
                  var l = s[a];
                  (null != l.to && i == e.line && e.ch >= l.to) ||
                    (null == l.from && i != e.line) ||
                    (null != l.from && i == t.line && l.from >= t.ch) ||
                    (n && !n(l.marker)) ||
                    r.push(l.marker.parent || l.marker);
                }
              ++i;
            }),
            r
          );
        },
        getAllMarks: function () {
          var e = [];
          return (
            this.iter(function (t) {
              var n = t.markedSpans;
              if (n)
                for (var r = 0; r < n.length; ++r)
                  null != n[r].from && e.push(n[r].marker);
            }),
            e
          );
        },
        posFromIndex: function (e) {
          var t,
            n = this.first,
            r = this.lineSeparator().length;
          return (
            this.iter(function (i) {
              var o = i.text.length + r;
              if (o > e) return (t = e), !0;
              (e -= o), ++n;
            }),
            at(this, et(n, t))
          );
        },
        indexFromPos: function (e) {
          var t = (e = at(this, e)).ch;
          if (e.line < this.first || e.ch < 0) return 0;
          var n = this.lineSeparator().length;
          return (
            this.iter(this.first, e.line, function (e) {
              t += e.text.length + n;
            }),
            t
          );
        },
        copy: function (e) {
          var t = new Mo(
            Ke(this, this.first, this.first + this.size),
            this.modeOption,
            this.first,
            this.lineSep,
            this.direction
          );
          return (
            (t.scrollTop = this.scrollTop),
            (t.scrollLeft = this.scrollLeft),
            (t.sel = this.sel),
            (t.extend = !1),
            e &&
              ((t.history.undoDepth = this.history.undoDepth),
              t.setHistory(this.getHistory())),
            t
          );
        },
        linkedDoc: function (e) {
          e || (e = {});
          var t = this.first,
            n = this.first + this.size;
          null != e.from && e.from > t && (t = e.from),
            null != e.to && e.to < n && (n = e.to);
          var r = new Mo(
            Ke(this, t, n),
            e.mode || this.modeOption,
            t,
            this.lineSep,
            this.direction
          );
          return (
            e.sharedHist && (r.history = this.history),
            (this.linked || (this.linked = [])).push({
              doc: r,
              sharedHist: e.sharedHist,
            }),
            (r.linked = [
              { doc: this, isParent: !0, sharedHist: e.sharedHist },
            ]),
            (function (e, t) {
              for (var n = 0; n < t.length; n++) {
                var r = t[n],
                  i = r.find(),
                  o = e.clipPos(i.from),
                  s = e.clipPos(i.to);
                if (tt(o, s)) {
                  var a = Ro(e, o, s, r.primary, r.primary.type);
                  r.markers.push(a), (a.parent = r);
                }
              }
            })(r, Do(this)),
            r
          );
        },
        unlinkDoc: function (e) {
          if ((e instanceof Ts && (e = e.doc), this.linked))
            for (var t = 0; t < this.linked.length; ++t)
              if (this.linked[t].doc == e) {
                this.linked.splice(t, 1), e.unlinkDoc(this), Ao(Do(this));
                break;
              }
          if (e.history == this.history) {
            var n = [e.id];
            Oi(
              e,
              function (e) {
                return n.push(e.id);
              },
              !0
            ),
              (e.history = new Ni(null)),
              (e.history.done = $i(this.history.done, n)),
              (e.history.undone = $i(this.history.undone, n));
          }
        },
        iterLinkedDocs: function (e) {
          Oi(this, e);
        },
        getMode: function () {
          return this.mode;
        },
        getEditor: function () {
          return this.cm;
        },
        splitLines: function (e) {
          return this.lineSep ? e.split(this.lineSep) : Me(e);
        },
        lineSeparator: function () {
          return this.lineSep || "\n";
        },
        setDirection: ni(function (e) {
          var t;
          "rtl" != e && (e = "ltr"),
            e != this.direction &&
              ((this.direction = e),
              this.iter(function (e) {
                return (e.order = null);
              }),
              this.cm &&
                Jr((t = this.cm), function () {
                  Fi(t), hr(t);
                }));
        }),
      })),
        (Mo.prototype.eachLine = Mo.prototype.iter);
      var Po = 0;
      function Io(e) {
        var t = this;
        if ((Oo(t), !me(t, e) && !Cn(t.display, e))) {
          we(e), s && (Po = +new Date());
          var n = cr(t, e, !0),
            r = e.dataTransfer.files;
          if (n && !t.isReadOnly())
            if (r && r.length && window.FileReader && window.File)
              for (
                var i = r.length,
                  o = Array(i),
                  a = 0,
                  l = function (e, r) {
                    if (
                      !t.options.allowDropFileTypes ||
                      -1 != z(t.options.allowDropFileTypes, e.type)
                    ) {
                      var s = new FileReader();
                      (s.onload = ei(t, function () {
                        var e = s.result;
                        if (
                          (/[\x00-\x08\x0e-\x1f]{2}/.test(e) && (e = ""),
                          (o[r] = e),
                          ++a == i)
                        ) {
                          var l = {
                            from: (n = at(t.doc, n)),
                            to: n,
                            text: t.doc.splitLines(
                              o.join(t.doc.lineSeparator())
                            ),
                            origin: "paste",
                          };
                          co(t.doc, l), Xi(t.doc, xi(n, Ri(l)));
                        }
                      })),
                        s.readAsText(e);
                    }
                  },
                  c = 0;
                c < i;
                ++c
              )
                l(r[c], c);
            else {
              if (t.state.draggingText && t.doc.sel.contains(n) > -1)
                return (
                  t.state.draggingText(e),
                  void setTimeout(function () {
                    return t.display.input.focus();
                  }, 20)
                );
              try {
                var u = e.dataTransfer.getData("Text");
                if (u) {
                  var h;
                  if (
                    (t.state.draggingText &&
                      !t.state.draggingText.copy &&
                      (h = t.listSelections()),
                    eo(t.doc, xi(n, n)),
                    h)
                  )
                    for (var d = 0; d < h.length; ++d)
                      mo(t.doc, "", h[d].anchor, h[d].head, "drag");
                  t.replaceSelection(u, "around", "paste"),
                    t.display.input.focus();
                }
              } catch (e) {}
            }
        }
      }
      function Oo(e) {
        e.display.dragCursor &&
          (e.display.lineSpace.removeChild(e.display.dragCursor),
          (e.display.dragCursor = null));
      }
      function Lo(e) {
        if (document.getElementsByClassName) {
          for (
            var t = document.getElementsByClassName("CodeMirror"),
              n = [],
              r = 0;
            r < t.length;
            r++
          ) {
            var i = t[r].CodeMirror;
            i && n.push(i);
          }
          n.length &&
            n[0].operation(function () {
              for (var t = 0; t < n.length; t++) e(n[t]);
            });
        }
      }
      var Fo = !1;
      function No() {
        var e;
        Fo ||
          (he(window, "resize", function () {
            null == e &&
              (e = setTimeout(function () {
                (e = null), Lo(Bo);
              }, 100));
          }),
          he(window, "blur", function () {
            return Lo(xr);
          }),
          (Fo = !0));
      }
      function Bo(e) {
        var t = e.display;
        (t.cachedCharWidth = t.cachedTextHeight = t.cachedPaddingH = null),
          (t.scrollbarsClipped = !1),
          e.setSize();
      }
      for (
        var Ho = {
            3: "Pause",
            8: "Backspace",
            9: "Tab",
            13: "Enter",
            16: "Shift",
            17: "Ctrl",
            18: "Alt",
            19: "Pause",
            20: "CapsLock",
            27: "Esc",
            32: "Space",
            33: "PageUp",
            34: "PageDown",
            35: "End",
            36: "Home",
            37: "Left",
            38: "Up",
            39: "Right",
            40: "Down",
            44: "PrintScrn",
            45: "Insert",
            46: "Delete",
            59: ";",
            61: "=",
            91: "Mod",
            92: "Mod",
            93: "Mod",
            106: "*",
            107: "=",
            109: "-",
            110: ".",
            111: "/",
            145: "ScrollLock",
            173: "-",
            186: ";",
            187: "=",
            188: ",",
            189: "-",
            190: ".",
            191: "/",
            192: "`",
            219: "[",
            220: "\\",
            221: "]",
            222: "'",
            63232: "Up",
            63233: "Down",
            63234: "Left",
            63235: "Right",
            63272: "Delete",
            63273: "Home",
            63275: "End",
            63276: "PageUp",
            63277: "PageDown",
            63302: "Insert",
          },
          zo = 0;
        zo < 10;
        zo++
      )
        Ho[zo + 48] = Ho[zo + 96] = String(zo);
      for (var Uo = 65; Uo <= 90; Uo++) Ho[Uo] = String.fromCharCode(Uo);
      for (var Wo = 1; Wo <= 12; Wo++) Ho[Wo + 111] = Ho[Wo + 63235] = "F" + Wo;
      var jo = {};
      function Vo(e) {
        var t,
          n,
          r,
          i,
          o = e.split(/-(?!$)/);
        e = o[o.length - 1];
        for (var s = 0; s < o.length - 1; s++) {
          var a = o[s];
          if (/^(cmd|meta|m)$/i.test(a)) i = !0;
          else if (/^a(lt)?$/i.test(a)) t = !0;
          else if (/^(c|ctrl|control)$/i.test(a)) n = !0;
          else {
            if (!/^s(hift)?$/i.test(a))
              throw new Error("Unrecognized modifier name: " + a);
            r = !0;
          }
        }
        return (
          t && (e = "Alt-" + e),
          n && (e = "Ctrl-" + e),
          i && (e = "Cmd-" + e),
          r && (e = "Shift-" + e),
          e
        );
      }
      function Go(e) {
        var t = {};
        for (var n in e)
          if (e.hasOwnProperty(n)) {
            var r = e[n];
            if (/^(name|fallthrough|(de|at)tach)$/.test(n)) continue;
            if ("..." == r) {
              delete e[n];
              continue;
            }
            for (var i = Y(n.split(" "), Vo), o = 0; o < i.length; o++) {
              var s = void 0,
                a = void 0;
              o == i.length - 1
                ? ((a = i.join(" ")), (s = r))
                : ((a = i.slice(0, o + 1).join(" ")), (s = "..."));
              var l = t[a];
              if (l) {
                if (l != s) throw new Error("Inconsistent bindings for " + a);
              } else t[a] = s;
            }
            delete e[n];
          }
        for (var c in t) e[c] = t[c];
        return e;
      }
      function $o(e, t, n, r) {
        var i = (t = Qo(t)).call ? t.call(e, r) : t[e];
        if (!1 === i) return "nothing";
        if ("..." === i) return "multi";
        if (null != i && n(i)) return "handled";
        if (t.fallthrough) {
          if ("[object Array]" != Object.prototype.toString.call(t.fallthrough))
            return $o(e, t.fallthrough, n, r);
          for (var o = 0; o < t.fallthrough.length; o++) {
            var s = $o(e, t.fallthrough[o], n, r);
            if (s) return s;
          }
        }
      }
      function qo(e) {
        var t = "string" == typeof e ? e : Ho[e.keyCode];
        return "Ctrl" == t || "Alt" == t || "Shift" == t || "Mod" == t;
      }
      function Ko(e, t, n) {
        var r = e;
        return (
          t.altKey && "Alt" != r && (e = "Alt-" + e),
          (C ? t.metaKey : t.ctrlKey) && "Ctrl" != r && (e = "Ctrl-" + e),
          (C ? t.ctrlKey : t.metaKey) && "Cmd" != r && (e = "Cmd-" + e),
          !n && t.shiftKey && "Shift" != r && (e = "Shift-" + e),
          e
        );
      }
      function Yo(e, t) {
        if (h && 34 == e.keyCode && e.char) return !1;
        var n = Ho[e.keyCode];
        return (
          null != n &&
          !e.altGraphKey &&
          (3 == e.keyCode && e.code && (n = e.code), Ko(n, e, t))
        );
      }
      function Qo(e) {
        return "string" == typeof e ? jo[e] : e;
      }
      function Zo(e, t) {
        for (var n = e.doc.sel.ranges, r = [], i = 0; i < n.length; i++) {
          for (var o = t(n[i]); r.length && tt(o.from, K(r).to) <= 0; ) {
            var s = r.pop();
            if (tt(s.from, o.from) < 0) {
              o.from = s.from;
              break;
            }
          }
          r.push(o);
        }
        Jr(e, function () {
          for (var t = r.length - 1; t >= 0; t--)
            mo(e.doc, "", r[t].from, r[t].to, "+delete");
          Mr(e);
        });
      }
      function Xo(e, t, n) {
        var r = ie(e.text, t + n, n);
        return r < 0 || r > e.text.length ? null : r;
      }
      function Jo(e, t, n) {
        var r = Xo(e, t.ch, n);
        return null == r ? null : new et(t.line, r, n < 0 ? "after" : "before");
      }
      function es(e, t, n, r, i) {
        if (e) {
          var o = ce(n, t.doc.direction);
          if (o) {
            var s,
              a = i < 0 ? K(o) : o[0],
              l = i < 0 == (1 == a.level) ? "after" : "before";
            if (a.level > 0 || "rtl" == t.doc.direction) {
              var c = Pn(t, n);
              s = i < 0 ? n.text.length - 1 : 0;
              var u = In(t, c, s).top;
              (s = oe(
                function (e) {
                  return In(t, c, e).top == u;
                },
                i < 0 == (1 == a.level) ? a.from : a.to - 1,
                s
              )),
                "before" == l && (s = Xo(n, s, 1));
            } else s = i < 0 ? a.to : a.from;
            return new et(r, s, l);
          }
        }
        return new et(r, i < 0 ? n.text.length : 0, i < 0 ? "before" : "after");
      }
      (jo.basic = {
        Left: "goCharLeft",
        Right: "goCharRight",
        Up: "goLineUp",
        Down: "goLineDown",
        End: "goLineEnd",
        Home: "goLineStartSmart",
        PageUp: "goPageUp",
        PageDown: "goPageDown",
        Delete: "delCharAfter",
        Backspace: "delCharBefore",
        "Shift-Backspace": "delCharBefore",
        Tab: "defaultTab",
        "Shift-Tab": "indentAuto",
        Enter: "newlineAndIndent",
        Insert: "toggleOverwrite",
        Esc: "singleSelection",
      }),
        (jo.pcDefault = {
          "Ctrl-A": "selectAll",
          "Ctrl-D": "deleteLine",
          "Ctrl-Z": "undo",
          "Shift-Ctrl-Z": "redo",
          "Ctrl-Y": "redo",
          "Ctrl-Home": "goDocStart",
          "Ctrl-End": "goDocEnd",
          "Ctrl-Up": "goLineUp",
          "Ctrl-Down": "goLineDown",
          "Ctrl-Left": "goGroupLeft",
          "Ctrl-Right": "goGroupRight",
          "Alt-Left": "goLineStart",
          "Alt-Right": "goLineEnd",
          "Ctrl-Backspace": "delGroupBefore",
          "Ctrl-Delete": "delGroupAfter",
          "Ctrl-S": "save",
          "Ctrl-F": "find",
          "Ctrl-G": "findNext",
          "Shift-Ctrl-G": "findPrev",
          "Shift-Ctrl-F": "replace",
          "Shift-Ctrl-R": "replaceAll",
          "Ctrl-[": "indentLess",
          "Ctrl-]": "indentMore",
          "Ctrl-U": "undoSelection",
          "Shift-Ctrl-U": "redoSelection",
          "Alt-U": "redoSelection",
          fallthrough: "basic",
        }),
        (jo.emacsy = {
          "Ctrl-F": "goCharRight",
          "Ctrl-B": "goCharLeft",
          "Ctrl-P": "goLineUp",
          "Ctrl-N": "goLineDown",
          "Alt-F": "goWordRight",
          "Alt-B": "goWordLeft",
          "Ctrl-A": "goLineStart",
          "Ctrl-E": "goLineEnd",
          "Ctrl-V": "goPageDown",
          "Shift-Ctrl-V": "goPageUp",
          "Ctrl-D": "delCharAfter",
          "Ctrl-H": "delCharBefore",
          "Alt-D": "delWordAfter",
          "Alt-Backspace": "delWordBefore",
          "Ctrl-K": "killLine",
          "Ctrl-T": "transposeChars",
          "Ctrl-O": "openLine",
        }),
        (jo.macDefault = {
          "Cmd-A": "selectAll",
          "Cmd-D": "deleteLine",
          "Cmd-Z": "undo",
          "Shift-Cmd-Z": "redo",
          "Cmd-Y": "redo",
          "Cmd-Home": "goDocStart",
          "Cmd-Up": "goDocStart",
          "Cmd-End": "goDocEnd",
          "Cmd-Down": "goDocEnd",
          "Alt-Left": "goGroupLeft",
          "Alt-Right": "goGroupRight",
          "Cmd-Left": "goLineLeft",
          "Cmd-Right": "goLineRight",
          "Alt-Backspace": "delGroupBefore",
          "Ctrl-Alt-Backspace": "delGroupAfter",
          "Alt-Delete": "delGroupAfter",
          "Cmd-S": "save",
          "Cmd-F": "find",
          "Cmd-G": "findNext",
          "Shift-Cmd-G": "findPrev",
          "Cmd-Alt-F": "replace",
          "Shift-Cmd-Alt-F": "replaceAll",
          "Cmd-[": "indentLess",
          "Cmd-]": "indentMore",
          "Cmd-Backspace": "delWrappedLineLeft",
          "Cmd-Delete": "delWrappedLineRight",
          "Cmd-U": "undoSelection",
          "Shift-Cmd-U": "redoSelection",
          "Ctrl-Up": "goDocStart",
          "Ctrl-Down": "goDocEnd",
          fallthrough: ["basic", "emacsy"],
        }),
        (jo.default = v ? jo.macDefault : jo.pcDefault);
      var ts = {
        selectAll: ao,
        singleSelection: function (e) {
          return e.setSelection(e.getCursor("anchor"), e.getCursor("head"), W);
        },
        killLine: function (e) {
          return Zo(e, function (t) {
            if (t.empty()) {
              var n = $e(e.doc, t.head.line).text.length;
              return t.head.ch == n && t.head.line < e.lastLine()
                ? { from: t.head, to: et(t.head.line + 1, 0) }
                : { from: t.head, to: et(t.head.line, n) };
            }
            return { from: t.from(), to: t.to() };
          });
        },
        deleteLine: function (e) {
          return Zo(e, function (t) {
            return {
              from: et(t.from().line, 0),
              to: at(e.doc, et(t.to().line + 1, 0)),
            };
          });
        },
        delLineLeft: function (e) {
          return Zo(e, function (e) {
            return { from: et(e.from().line, 0), to: e.from() };
          });
        },
        delWrappedLineLeft: function (e) {
          return Zo(e, function (t) {
            var n = e.charCoords(t.head, "div").top + 5;
            return {
              from: e.coordsChar({ left: 0, top: n }, "div"),
              to: t.from(),
            };
          });
        },
        delWrappedLineRight: function (e) {
          return Zo(e, function (t) {
            var n = e.charCoords(t.head, "div").top + 5,
              r = e.coordsChar(
                { left: e.display.lineDiv.offsetWidth + 100, top: n },
                "div"
              );
            return { from: t.from(), to: r };
          });
        },
        undo: function (e) {
          return e.undo();
        },
        redo: function (e) {
          return e.redo();
        },
        undoSelection: function (e) {
          return e.undoSelection();
        },
        redoSelection: function (e) {
          return e.redoSelection();
        },
        goDocStart: function (e) {
          return e.extendSelection(et(e.firstLine(), 0));
        },
        goDocEnd: function (e) {
          return e.extendSelection(et(e.lastLine()));
        },
        goLineStart: function (e) {
          return e.extendSelectionsBy(
            function (t) {
              return ns(e, t.head.line);
            },
            { origin: "+move", bias: 1 }
          );
        },
        goLineStartSmart: function (e) {
          return e.extendSelectionsBy(
            function (t) {
              return rs(e, t.head);
            },
            { origin: "+move", bias: 1 }
          );
        },
        goLineEnd: function (e) {
          return e.extendSelectionsBy(
            function (t) {
              return (function (e, t) {
                var n = $e(e.doc, t),
                  r = (function (e) {
                    for (var t; (t = Lt(e)); ) e = t.find(1, !0).line;
                    return e;
                  })(n);
                return r != n && (t = Qe(r)), es(!0, e, n, t, -1);
              })(e, t.head.line);
            },
            { origin: "+move", bias: -1 }
          );
        },
        goLineRight: function (e) {
          return e.extendSelectionsBy(function (t) {
            var n = e.cursorCoords(t.head, "div").top + 5;
            return e.coordsChar(
              { left: e.display.lineDiv.offsetWidth + 100, top: n },
              "div"
            );
          }, V);
        },
        goLineLeft: function (e) {
          return e.extendSelectionsBy(function (t) {
            var n = e.cursorCoords(t.head, "div").top + 5;
            return e.coordsChar({ left: 0, top: n }, "div");
          }, V);
        },
        goLineLeftSmart: function (e) {
          return e.extendSelectionsBy(function (t) {
            var n = e.cursorCoords(t.head, "div").top + 5,
              r = e.coordsChar({ left: 0, top: n }, "div");
            return r.ch < e.getLine(r.line).search(/\S/) ? rs(e, t.head) : r;
          }, V);
        },
        goLineUp: function (e) {
          return e.moveV(-1, "line");
        },
        goLineDown: function (e) {
          return e.moveV(1, "line");
        },
        goPageUp: function (e) {
          return e.moveV(-1, "page");
        },
        goPageDown: function (e) {
          return e.moveV(1, "page");
        },
        goCharLeft: function (e) {
          return e.moveH(-1, "char");
        },
        goCharRight: function (e) {
          return e.moveH(1, "char");
        },
        goColumnLeft: function (e) {
          return e.moveH(-1, "column");
        },
        goColumnRight: function (e) {
          return e.moveH(1, "column");
        },
        goWordLeft: function (e) {
          return e.moveH(-1, "word");
        },
        goGroupRight: function (e) {
          return e.moveH(1, "group");
        },
        goGroupLeft: function (e) {
          return e.moveH(-1, "group");
        },
        goWordRight: function (e) {
          return e.moveH(1, "word");
        },
        delCharBefore: function (e) {
          return e.deleteH(-1, "char");
        },
        delCharAfter: function (e) {
          return e.deleteH(1, "char");
        },
        delWordBefore: function (e) {
          return e.deleteH(-1, "word");
        },
        delWordAfter: function (e) {
          return e.deleteH(1, "word");
        },
        delGroupBefore: function (e) {
          return e.deleteH(-1, "group");
        },
        delGroupAfter: function (e) {
          return e.deleteH(1, "group");
        },
        indentAuto: function (e) {
          return e.indentSelection("smart");
        },
        indentMore: function (e) {
          return e.indentSelection("add");
        },
        indentLess: function (e) {
          return e.indentSelection("subtract");
        },
        insertTab: function (e) {
          return e.replaceSelection("\t");
        },
        insertSoftTab: function (e) {
          for (
            var t = [], n = e.listSelections(), r = e.options.tabSize, i = 0;
            i < n.length;
            i++
          ) {
            var o = n[i].from(),
              s = B(e.getLine(o.line), o.ch, r);
            t.push(q(r - (s % r)));
          }
          e.replaceSelections(t);
        },
        defaultTab: function (e) {
          e.somethingSelected()
            ? e.indentSelection("add")
            : e.execCommand("insertTab");
        },
        transposeChars: function (e) {
          return Jr(e, function () {
            for (var t = e.listSelections(), n = [], r = 0; r < t.length; r++)
              if (t[r].empty()) {
                var i = t[r].head,
                  o = $e(e.doc, i.line).text;
                if (o)
                  if (
                    (i.ch == o.length && (i = new et(i.line, i.ch - 1)),
                    i.ch > 0)
                  )
                    (i = new et(i.line, i.ch + 1)),
                      e.replaceRange(
                        o.charAt(i.ch - 1) + o.charAt(i.ch - 2),
                        et(i.line, i.ch - 2),
                        i,
                        "+transpose"
                      );
                  else if (i.line > e.doc.first) {
                    var s = $e(e.doc, i.line - 1).text;
                    s &&
                      ((i = new et(i.line, 1)),
                      e.replaceRange(
                        o.charAt(0) +
                          e.doc.lineSeparator() +
                          s.charAt(s.length - 1),
                        et(i.line - 1, s.length - 1),
                        i,
                        "+transpose"
                      ));
                  }
                n.push(new Ei(i, i));
              }
            e.setSelections(n);
          });
        },
        newlineAndIndent: function (e) {
          return Jr(e, function () {
            for (var t = e.listSelections(), n = t.length - 1; n >= 0; n--)
              e.replaceRange(
                e.doc.lineSeparator(),
                t[n].anchor,
                t[n].head,
                "+input"
              );
            t = e.listSelections();
            for (var r = 0; r < t.length; r++)
              e.indentLine(t[r].from().line, null, !0);
            Mr(e);
          });
        },
        openLine: function (e) {
          return e.replaceSelection("\n", "start");
        },
        toggleOverwrite: function (e) {
          return e.toggleOverwrite();
        },
      };
      function ns(e, t) {
        var n = $e(e.doc, t),
          r = Bt(n);
        return r != n && (t = Qe(r)), es(!0, e, r, t, 1);
      }
      function rs(e, t) {
        var n = ns(e, t.line),
          r = $e(e.doc, n.line),
          i = ce(r, e.doc.direction);
        if (!i || 0 == i[0].level) {
          var o = Math.max(0, r.text.search(/\S/)),
            s = t.line == n.line && t.ch <= o && t.ch;
          return et(n.line, s ? 0 : o, n.sticky);
        }
        return n;
      }
      function is(e, t, n) {
        if ("string" == typeof t && !(t = ts[t])) return !1;
        e.display.input.ensurePolled();
        var r = e.display.shift,
          i = !1;
        try {
          e.isReadOnly() && (e.state.suppressEdits = !0),
            n && (e.display.shift = !1),
            (i = t(e) != U);
        } finally {
          (e.display.shift = r), (e.state.suppressEdits = !1);
        }
        return i;
      }
      var os = new H();
      function ss(e, t, n, r) {
        var i = e.state.keySeq;
        if (i) {
          if (qo(t)) return "handled";
          if (
            (/\'$/.test(t)
              ? (e.state.keySeq = null)
              : os.set(50, function () {
                  e.state.keySeq == i &&
                    ((e.state.keySeq = null), e.display.input.reset());
                }),
            as(e, i + " " + t, n, r))
          )
            return !0;
        }
        return as(e, t, n, r);
      }
      function as(e, t, n, r) {
        var i = (function (e, t, n) {
          for (var r = 0; r < e.state.keyMaps.length; r++) {
            var i = $o(t, e.state.keyMaps[r], n, e);
            if (i) return i;
          }
          return (
            (e.options.extraKeys && $o(t, e.options.extraKeys, n, e)) ||
            $o(t, e.options.keyMap, n, e)
          );
        })(e, t, r);
        return (
          "multi" == i && (e.state.keySeq = t),
          "handled" == i && ln(e, "keyHandled", e, t, n),
          ("handled" != i && "multi" != i) || (we(n), Sr(e)),
          !!i
        );
      }
      function ls(e, t) {
        var n = Yo(t, !0);
        return (
          !!n &&
          (t.shiftKey && !e.state.keySeq
            ? ss(e, "Shift-" + n, t, function (t) {
                return is(e, t, !0);
              }) ||
              ss(e, n, t, function (t) {
                if ("string" == typeof t ? /^go[A-Z]/.test(t) : t.motion)
                  return is(e, t);
              })
            : ss(e, n, t, function (t) {
                return is(e, t);
              }))
        );
      }
      var cs = null;
      function us(e) {
        var t = this;
        if (((t.curOp.focus = P()), !me(t, e))) {
          s && a < 11 && 27 == e.keyCode && (e.returnValue = !1);
          var n = e.keyCode;
          t.display.shift = 16 == n || e.shiftKey;
          var r = ls(t, e);
          h &&
            ((cs = r ? n : null),
            r ||
              88 != n ||
              Ie ||
              !(v ? e.metaKey : e.ctrlKey) ||
              t.replaceSelection("", null, "cut")),
            18 != n ||
              /\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className) ||
              (function (e) {
                var t = e.display.lineDiv;
                function n(e) {
                  (18 != e.keyCode && e.altKey) ||
                    (R(t, "CodeMirror-crosshair"),
                    pe(document, "keyup", n),
                    pe(document, "mouseover", n));
                }
                I(t, "CodeMirror-crosshair"),
                  he(document, "keyup", n),
                  he(document, "mouseover", n);
              })(t);
        }
      }
      function hs(e) {
        16 == e.keyCode && (this.doc.sel.shift = !1), me(this, e);
      }
      function ds(e) {
        var t = this;
        if (
          !(
            Cn(t.display, e) ||
            me(t, e) ||
            (e.ctrlKey && !e.altKey) ||
            (v && e.metaKey)
          )
        ) {
          var n = e.keyCode,
            r = e.charCode;
          if (h && n == cs) return (cs = null), void we(e);
          if (!h || (e.which && !(e.which < 10)) || !ls(t, e)) {
            var i = String.fromCharCode(null == r ? n : r);
            "\b" != i &&
              ((function (e, t, n) {
                return ss(e, "'" + n + "'", t, function (t) {
                  return is(e, t, !0);
                });
              })(t, e, i) ||
                t.display.input.onKeyPress(e));
          }
        }
      }
      var ps,
        fs,
        ms = function (e, t, n) {
          (this.time = e), (this.pos = t), (this.button = n);
        };
      function gs(e) {
        var t = this,
          n = t.display;
        if (!(me(t, e) || (n.activeTouch && n.input.supportsTouch())))
          if ((n.input.ensurePolled(), (n.shift = e.shiftKey), Cn(n, e)))
            l ||
              ((n.scroller.draggable = !1),
              setTimeout(function () {
                return (n.scroller.draggable = !0);
              }, 100));
          else if (!ws(t, e)) {
            var r = cr(t, e),
              i = ke(e),
              o = r
                ? (function (e, t) {
                    var n = +new Date();
                    return fs && fs.compare(n, e, t)
                      ? ((ps = fs = null), "triple")
                      : ps && ps.compare(n, e, t)
                      ? ((fs = new ms(n, e, t)), (ps = null), "double")
                      : ((ps = new ms(n, e, t)), (fs = null), "single");
                  })(r, i)
                : "single";
            window.focus(),
              1 == i && t.state.selectingText && t.state.selectingText(e),
              (r &&
                (function (e, t, n, r, i) {
                  var o = "Click";
                  return (
                    "double" == r
                      ? (o = "Double" + o)
                      : "triple" == r && (o = "Triple" + o),
                    ss(
                      e,
                      Ko(
                        (o =
                          (1 == t ? "Left" : 2 == t ? "Middle" : "Right") + o),
                        i
                      ),
                      i,
                      function (t) {
                        if (("string" == typeof t && (t = ts[t]), !t))
                          return !1;
                        var r = !1;
                        try {
                          e.isReadOnly() && (e.state.suppressEdits = !0),
                            (r = t(e, n) != U);
                        } finally {
                          e.state.suppressEdits = !1;
                        }
                        return r;
                      }
                    )
                  );
                })(t, i, r, o, e)) ||
                (1 == i
                  ? r
                    ? (function (e, t, n, r) {
                        s ? setTimeout(F(Cr, e), 0) : (e.curOp.focus = P());
                        var i,
                          o = (function (e, t, n) {
                            var r = e.getOption("configureMouse"),
                              i = r ? r(e, t, n) : {};
                            if (null == i.unit) {
                              var o = w ? n.shiftKey && n.metaKey : n.altKey;
                              i.unit = o
                                ? "rectangle"
                                : "single" == t
                                ? "char"
                                : "double" == t
                                ? "word"
                                : "line";
                            }
                            return (
                              (null == i.extend || e.doc.extend) &&
                                (i.extend = e.doc.extend || n.shiftKey),
                              null == i.addNew &&
                                (i.addNew = v ? n.metaKey : n.ctrlKey),
                              null == i.moveOnDrag &&
                                (i.moveOnDrag = !(v ? n.altKey : n.ctrlKey)),
                              i
                            );
                          })(e, n, r),
                          c = e.doc.sel;
                        e.options.dragDrop &&
                        Te &&
                        !e.isReadOnly() &&
                        "single" == n &&
                        (i = c.contains(t)) > -1 &&
                        (tt((i = c.ranges[i]).from(), t) < 0 || t.xRel > 0) &&
                        (tt(i.to(), t) > 0 || t.xRel < 0)
                          ? (function (e, t, n, r) {
                              var i = e.display,
                                o = !1,
                                c = ei(e, function (t) {
                                  l && (i.scroller.draggable = !1),
                                    (e.state.draggingText = !1),
                                    pe(i.wrapper.ownerDocument, "mouseup", c),
                                    pe(i.wrapper.ownerDocument, "mousemove", u),
                                    pe(i.scroller, "dragstart", h),
                                    pe(i.scroller, "drop", c),
                                    o ||
                                      (we(t),
                                      r.addNew ||
                                        Ki(e.doc, n, null, null, r.extend),
                                      l || (s && 9 == a)
                                        ? setTimeout(function () {
                                            i.wrapper.ownerDocument.body.focus(),
                                              i.input.focus();
                                          }, 20)
                                        : i.input.focus());
                                }),
                                u = function (e) {
                                  o =
                                    o ||
                                    Math.abs(t.clientX - e.clientX) +
                                      Math.abs(t.clientY - e.clientY) >=
                                      10;
                                },
                                h = function () {
                                  return (o = !0);
                                };
                              l && (i.scroller.draggable = !0),
                                (e.state.draggingText = c),
                                (c.copy = !r.moveOnDrag),
                                i.scroller.dragDrop && i.scroller.dragDrop(),
                                he(i.wrapper.ownerDocument, "mouseup", c),
                                he(i.wrapper.ownerDocument, "mousemove", u),
                                he(i.scroller, "dragstart", h),
                                he(i.scroller, "drop", c),
                                Er(e),
                                setTimeout(function () {
                                  return i.input.focus();
                                }, 20);
                            })(e, r, t, o)
                          : (function (e, t, n, r) {
                              var i = e.display,
                                o = e.doc;
                              we(t);
                              var s,
                                a,
                                l = o.sel,
                                c = l.ranges;
                              if (
                                (r.addNew && !r.extend
                                  ? ((a = o.sel.contains(n)),
                                    (s = a > -1 ? c[a] : new Ei(n, n)))
                                  : ((s = o.sel.primary()),
                                    (a = o.sel.primIndex)),
                                "rectangle" == r.unit)
                              )
                                r.addNew || (s = new Ei(n, n)),
                                  (n = cr(e, t, !0, !0)),
                                  (a = -1);
                              else {
                                var u = ys(e, n, r.unit);
                                s = r.extend
                                  ? qi(s, u.anchor, u.head, r.extend)
                                  : u;
                              }
                              r.addNew
                                ? -1 == a
                                  ? ((a = c.length),
                                    Ji(o, ki(e, c.concat([s]), a), {
                                      scroll: !1,
                                      origin: "*mouse",
                                    }))
                                  : c.length > 1 &&
                                    c[a].empty() &&
                                    "char" == r.unit &&
                                    !r.extend
                                  ? (Ji(
                                      o,
                                      ki(
                                        e,
                                        c.slice(0, a).concat(c.slice(a + 1)),
                                        0
                                      ),
                                      { scroll: !1, origin: "*mouse" }
                                    ),
                                    (l = o.sel))
                                  : Qi(o, a, s, j)
                                : ((a = 0),
                                  Ji(o, new Ci([s], 0), j),
                                  (l = o.sel));
                              var h = n;
                              function d(t) {
                                if (0 != tt(h, t))
                                  if (((h = t), "rectangle" == r.unit)) {
                                    for (
                                      var i = [],
                                        c = e.options.tabSize,
                                        u = B($e(o, n.line).text, n.ch, c),
                                        d = B($e(o, t.line).text, t.ch, c),
                                        p = Math.min(u, d),
                                        f = Math.max(u, d),
                                        m = Math.min(n.line, t.line),
                                        g = Math.min(
                                          e.lastLine(),
                                          Math.max(n.line, t.line)
                                        );
                                      m <= g;
                                      m++
                                    ) {
                                      var y = $e(o, m).text,
                                        v = G(y, p, c);
                                      p == f
                                        ? i.push(new Ei(et(m, v), et(m, v)))
                                        : y.length > v &&
                                          i.push(
                                            new Ei(et(m, v), et(m, G(y, f, c)))
                                          );
                                    }
                                    i.length || i.push(new Ei(n, n)),
                                      Ji(
                                        o,
                                        ki(
                                          e,
                                          l.ranges.slice(0, a).concat(i),
                                          a
                                        ),
                                        { origin: "*mouse", scroll: !1 }
                                      ),
                                      e.scrollIntoView(t);
                                  } else {
                                    var w,
                                      b = s,
                                      S = ys(e, t, r.unit),
                                      C = b.anchor;
                                    tt(S.anchor, C) > 0
                                      ? ((w = S.head),
                                        (C = ot(b.from(), S.anchor)))
                                      : ((w = S.anchor),
                                        (C = it(b.to(), S.head)));
                                    var E = l.ranges.slice(0);
                                    (E[a] = (function (e, t) {
                                      var n = t.anchor,
                                        r = t.head,
                                        i = $e(e.doc, n.line);
                                      if (0 == tt(n, r) && n.sticky == r.sticky)
                                        return t;
                                      var o = ce(i);
                                      if (!o) return t;
                                      var s = ae(o, n.ch, n.sticky),
                                        a = o[s];
                                      if (a.from != n.ch && a.to != n.ch)
                                        return t;
                                      var l,
                                        c =
                                          s +
                                          ((a.from == n.ch) == (1 != a.level)
                                            ? 0
                                            : 1);
                                      if (0 == c || c == o.length) return t;
                                      if (r.line != n.line)
                                        l =
                                          (r.line - n.line) *
                                            ("ltr" == e.doc.direction
                                              ? 1
                                              : -1) >
                                          0;
                                      else {
                                        var u = ae(o, r.ch, r.sticky),
                                          h =
                                            u - s ||
                                            (r.ch - n.ch) *
                                              (1 == a.level ? -1 : 1);
                                        l =
                                          u == c - 1 || u == c ? h < 0 : h > 0;
                                      }
                                      var d = o[c + (l ? -1 : 0)],
                                        p = l == (1 == d.level),
                                        f = p ? d.from : d.to,
                                        m = p ? "after" : "before";
                                      return n.ch == f && n.sticky == m
                                        ? t
                                        : new Ei(new et(n.line, f, m), r);
                                    })(e, new Ei(at(o, C), w))),
                                      Ji(o, ki(e, E, a), j);
                                  }
                              }
                              var p = i.wrapper.getBoundingClientRect(),
                                f = 0;
                              function m(t) {
                                (e.state.selectingText = !1),
                                  (f = 1 / 0),
                                  t && (we(t), i.input.focus()),
                                  pe(i.wrapper.ownerDocument, "mousemove", g),
                                  pe(i.wrapper.ownerDocument, "mouseup", y),
                                  (o.history.lastSelOrigin = null);
                              }
                              var g = ei(e, function (t) {
                                  0 !== t.buttons && ke(t)
                                    ? (function t(n) {
                                        var s = ++f,
                                          a = cr(
                                            e,
                                            n,
                                            !0,
                                            "rectangle" == r.unit
                                          );
                                        if (a)
                                          if (0 != tt(a, h)) {
                                            (e.curOp.focus = P()), d(a);
                                            var l = Dr(i, o);
                                            (a.line >= l.to ||
                                              a.line < l.from) &&
                                              setTimeout(
                                                ei(e, function () {
                                                  f == s && t(n);
                                                }),
                                                150
                                              );
                                          } else {
                                            var c =
                                              n.clientY < p.top
                                                ? -20
                                                : n.clientY > p.bottom
                                                ? 20
                                                : 0;
                                            c &&
                                              setTimeout(
                                                ei(e, function () {
                                                  f == s &&
                                                    ((i.scroller.scrollTop += c),
                                                    t(n));
                                                }),
                                                50
                                              );
                                          }
                                      })(t)
                                    : m(t);
                                }),
                                y = ei(e, m);
                              (e.state.selectingText = y),
                                he(i.wrapper.ownerDocument, "mousemove", g),
                                he(i.wrapper.ownerDocument, "mouseup", y);
                            })(e, r, t, o);
                      })(t, r, o, e)
                    : Ee(e) == n.scroller && we(e)
                  : 2 == i
                  ? (r && Ki(t.doc, r),
                    setTimeout(function () {
                      return n.input.focus();
                    }, 20))
                  : 3 == i && (E ? t.display.input.onContextMenu(e) : Er(t)));
          }
      }
      function ys(e, t, n) {
        if ("char" == n) return new Ei(t, t);
        if ("word" == n) return e.findWordAt(t);
        if ("line" == n)
          return new Ei(et(t.line, 0), at(e.doc, et(t.line + 1, 0)));
        var r = n(e, t);
        return new Ei(r.from, r.to);
      }
      function vs(e, t, n, r) {
        var i, o;
        if (t.touches) (i = t.touches[0].clientX), (o = t.touches[0].clientY);
        else
          try {
            (i = t.clientX), (o = t.clientY);
          } catch (t) {
            return !1;
          }
        if (i >= Math.floor(e.display.gutters.getBoundingClientRect().right))
          return !1;
        r && we(t);
        var s = e.display,
          a = s.lineDiv.getBoundingClientRect();
        if (o > a.bottom || !ye(e, n)) return Se(t);
        o -= a.top - s.viewOffset;
        for (var l = 0; l < e.display.gutterSpecs.length; ++l) {
          var c = s.gutters.childNodes[l];
          if (c && c.getBoundingClientRect().right >= i)
            return (
              fe(e, n, e, Ze(e.doc, o), e.display.gutterSpecs[l].className, t),
              Se(t)
            );
        }
      }
      function ws(e, t) {
        return vs(e, t, "gutterClick", !0);
      }
      function bs(e, t) {
        Cn(e.display, t) ||
          (function (e, t) {
            return (
              !!ye(e, "gutterContextMenu") && vs(e, t, "gutterContextMenu", !1)
            );
          })(e, t) ||
          me(e, t, "contextmenu") ||
          E ||
          e.display.input.onContextMenu(t);
      }
      function Ss(e) {
        (e.display.wrapper.className =
          e.display.wrapper.className.replace(/\s*cm-s-\S+/g, "") +
          e.options.theme.replace(/(^|\s)\s*/g, " cm-s-")),
          zn(e);
      }
      ms.prototype.compare = function (e, t, n) {
        return this.time + 400 > e && 0 == tt(t, this.pos) && n == this.button;
      };
      var Cs = {
          toString: function () {
            return "CodeMirror.Init";
          },
        },
        Es = {},
        ks = {};
      function xs(e, t, n) {
        if (!t != !(n && n != Cs)) {
          var r = e.display.dragFunctions,
            i = t ? he : pe;
          i(e.display.scroller, "dragstart", r.start),
            i(e.display.scroller, "dragenter", r.enter),
            i(e.display.scroller, "dragover", r.over),
            i(e.display.scroller, "dragleave", r.leave),
            i(e.display.scroller, "drop", r.drop);
        }
      }
      function Rs(e) {
        e.options.lineWrapping
          ? (I(e.display.wrapper, "CodeMirror-wrap"),
            (e.display.sizer.style.minWidth = ""),
            (e.display.sizerWidth = null))
          : (R(e.display.wrapper, "CodeMirror-wrap"), Gt(e)),
          lr(e),
          hr(e),
          zn(e),
          setTimeout(function () {
            return Ur(e);
          }, 100);
      }
      function Ts(e, t) {
        var n = this;
        if (!(this instanceof Ts)) return new Ts(e, t);
        (this.options = t = t ? N(t) : {}), N(Es, t, !1);
        var r = t.value;
        "string" == typeof r
          ? (r = new Mo(r, t.mode, null, t.lineSeparator, t.direction))
          : t.mode && (r.modeOption = t.mode),
          (this.doc = r);
        var i = new Ts.inputStyles[t.inputStyle](this),
          o = (this.display = new gi(e, r, i, t));
        for (var c in ((o.wrapper.CodeMirror = this),
        Ss(this),
        t.lineWrapping &&
          (this.display.wrapper.className += " CodeMirror-wrap"),
        Vr(this),
        (this.state = {
          keyMaps: [],
          overlays: [],
          modeGen: 0,
          overwrite: !1,
          delayingBlurEvent: !1,
          focused: !1,
          suppressEdits: !1,
          pasteIncoming: -1,
          cutIncoming: -1,
          selectingText: !1,
          draggingText: !1,
          highlight: new H(),
          keySeq: null,
          specialChars: null,
        }),
        t.autofocus && !y && o.input.focus(),
        s &&
          a < 11 &&
          setTimeout(function () {
            return n.display.input.reset(!0);
          }, 20),
        (function (e) {
          var t = e.display;
          he(t.scroller, "mousedown", ei(e, gs)),
            he(
              t.scroller,
              "dblclick",
              s && a < 11
                ? ei(e, function (t) {
                    if (!me(e, t)) {
                      var n = cr(e, t);
                      if (n && !ws(e, t) && !Cn(e.display, t)) {
                        we(t);
                        var r = e.findWordAt(n);
                        Ki(e.doc, r.anchor, r.head);
                      }
                    }
                  })
                : function (t) {
                    return me(e, t) || we(t);
                  }
            ),
            he(t.scroller, "contextmenu", function (t) {
              return bs(e, t);
            });
          var n,
            r = { end: 0 };
          function i() {
            t.activeTouch &&
              ((n = setTimeout(function () {
                return (t.activeTouch = null);
              }, 1e3)),
              ((r = t.activeTouch).end = +new Date()));
          }
          function o(e, t) {
            if (null == t.left) return !0;
            var n = t.left - e.left,
              r = t.top - e.top;
            return n * n + r * r > 400;
          }
          he(t.scroller, "touchstart", function (i) {
            if (
              !me(e, i) &&
              !(function (e) {
                if (1 != e.touches.length) return !1;
                var t = e.touches[0];
                return t.radiusX <= 1 && t.radiusY <= 1;
              })(i) &&
              !ws(e, i)
            ) {
              t.input.ensurePolled(), clearTimeout(n);
              var o = +new Date();
              (t.activeTouch = {
                start: o,
                moved: !1,
                prev: o - r.end <= 300 ? r : null,
              }),
                1 == i.touches.length &&
                  ((t.activeTouch.left = i.touches[0].pageX),
                  (t.activeTouch.top = i.touches[0].pageY));
            }
          }),
            he(t.scroller, "touchmove", function () {
              t.activeTouch && (t.activeTouch.moved = !0);
            }),
            he(t.scroller, "touchend", function (n) {
              var r = t.activeTouch;
              if (
                r &&
                !Cn(t, n) &&
                null != r.left &&
                !r.moved &&
                new Date() - r.start < 300
              ) {
                var s,
                  a = e.coordsChar(t.activeTouch, "page");
                (s =
                  !r.prev || o(r, r.prev)
                    ? new Ei(a, a)
                    : !r.prev.prev || o(r, r.prev.prev)
                    ? e.findWordAt(a)
                    : new Ei(et(a.line, 0), at(e.doc, et(a.line + 1, 0)))),
                  e.setSelection(s.anchor, s.head),
                  e.focus(),
                  we(n);
              }
              i();
            }),
            he(t.scroller, "touchcancel", i),
            he(t.scroller, "scroll", function () {
              t.scroller.clientHeight &&
                (Lr(e, t.scroller.scrollTop),
                Nr(e, t.scroller.scrollLeft, !0),
                fe(e, "scroll", e));
            }),
            he(t.scroller, "mousewheel", function (t) {
              return Si(e, t);
            }),
            he(t.scroller, "DOMMouseScroll", function (t) {
              return Si(e, t);
            }),
            he(t.wrapper, "scroll", function () {
              return (t.wrapper.scrollTop = t.wrapper.scrollLeft = 0);
            }),
            (t.dragFunctions = {
              enter: function (t) {
                me(e, t) || Ce(t);
              },
              over: function (t) {
                me(e, t) ||
                  ((function (e, t) {
                    var n = cr(e, t);
                    if (n) {
                      var r = document.createDocumentFragment();
                      vr(e, n, r),
                        e.display.dragCursor ||
                          ((e.display.dragCursor = A(
                            "div",
                            null,
                            "CodeMirror-cursors CodeMirror-dragcursors"
                          )),
                          e.display.lineSpace.insertBefore(
                            e.display.dragCursor,
                            e.display.cursorDiv
                          )),
                        D(e.display.dragCursor, r);
                    }
                  })(e, t),
                  Ce(t));
              },
              start: function (t) {
                return (function (e, t) {
                  if (s && (!e.state.draggingText || +new Date() - Po < 100))
                    Ce(t);
                  else if (
                    !me(e, t) &&
                    !Cn(e.display, t) &&
                    (t.dataTransfer.setData("Text", e.getSelection()),
                    (t.dataTransfer.effectAllowed = "copyMove"),
                    t.dataTransfer.setDragImage && !d)
                  ) {
                    var n = A(
                      "img",
                      null,
                      null,
                      "position: fixed; left: 0; top: 0;"
                    );
                    (n.src =
                      "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),
                      h &&
                        ((n.width = n.height = 1),
                        e.display.wrapper.appendChild(n),
                        (n._top = n.offsetTop)),
                      t.dataTransfer.setDragImage(n, 0, 0),
                      h && n.parentNode.removeChild(n);
                  }
                })(e, t);
              },
              drop: ei(e, Io),
              leave: function (t) {
                me(e, t) || Oo(e);
              },
            });
          var l = t.input.getField();
          he(l, "keyup", function (t) {
            return hs.call(e, t);
          }),
            he(l, "keydown", ei(e, us)),
            he(l, "keypress", ei(e, ds)),
            he(l, "focus", function (t) {
              return kr(e, t);
            }),
            he(l, "blur", function (t) {
              return xr(e, t);
            });
        })(this),
        No(),
        $r(this),
        (this.curOp.forceUpdate = !0),
        Li(this, r),
        (t.autofocus && !y) || this.hasFocus()
          ? setTimeout(F(kr, this), 20)
          : xr(this),
        ks))
          ks.hasOwnProperty(c) && ks[c](n, t[c], Cs);
        di(this), t.finishInit && t.finishInit(this);
        for (var u = 0; u < Ds.length; ++u) Ds[u](n);
        qr(this),
          l &&
            t.lineWrapping &&
            "optimizelegibility" == getComputedStyle(o.lineDiv).textRendering &&
            (o.lineDiv.style.textRendering = "auto");
      }
      (Ts.defaults = Es), (Ts.optionHandlers = ks);
      var Ds = [];
      function As(e, t, n, r) {
        var i,
          o = e.doc;
        null == n && (n = "add"),
          "smart" == n && (o.mode.indent ? (i = pt(e, t).state) : (n = "prev"));
        var s = e.options.tabSize,
          a = $e(o, t),
          l = B(a.text, null, s);
        a.stateAfter && (a.stateAfter = null);
        var c,
          u = a.text.match(/^\s*/)[0];
        if (r || /\S/.test(a.text)) {
          if (
            "smart" == n &&
            ((c = o.mode.indent(i, a.text.slice(u.length), a.text)) == U ||
              c > 150)
          ) {
            if (!r) return;
            n = "prev";
          }
        } else (c = 0), (n = "not");
        "prev" == n
          ? (c = t > o.first ? B($e(o, t - 1).text, null, s) : 0)
          : "add" == n
          ? (c = l + e.options.indentUnit)
          : "subtract" == n
          ? (c = l - e.options.indentUnit)
          : "number" == typeof n && (c = l + n),
          (c = Math.max(0, c));
        var h = "",
          d = 0;
        if (e.options.indentWithTabs)
          for (var p = Math.floor(c / s); p; --p) (d += s), (h += "\t");
        if ((d < c && (h += q(c - d)), h != u))
          return (
            mo(o, h, et(t, 0), et(t, u.length), "+input"),
            (a.stateAfter = null),
            !0
          );
        for (var f = 0; f < o.sel.ranges.length; f++) {
          var m = o.sel.ranges[f];
          if (m.head.line == t && m.head.ch < u.length) {
            var g = et(t, u.length);
            Qi(o, f, new Ei(g, g));
            break;
          }
        }
      }
      Ts.defineInitHook = function (e) {
        return Ds.push(e);
      };
      var _s = null;
      function Ms(e) {
        _s = e;
      }
      function Ps(e, t, n, r, i) {
        var o = e.doc;
        (e.display.shift = !1), r || (r = o.sel);
        var s = +new Date() - 200,
          a = "paste" == i || e.state.pasteIncoming > s,
          l = Me(t),
          c = null;
        if (a && r.ranges.length > 1)
          if (_s && _s.text.join("\n") == t) {
            if (r.ranges.length % _s.text.length == 0) {
              c = [];
              for (var u = 0; u < _s.text.length; u++)
                c.push(o.splitLines(_s.text[u]));
            }
          } else
            l.length == r.ranges.length &&
              e.options.pasteLinesPerSelection &&
              (c = Y(l, function (e) {
                return [e];
              }));
        for (
          var h = e.curOp.updateInput, d = r.ranges.length - 1;
          d >= 0;
          d--
        ) {
          var p = r.ranges[d],
            f = p.from(),
            m = p.to();
          p.empty() &&
            (n && n > 0
              ? (f = et(f.line, f.ch - n))
              : e.state.overwrite && !a
              ? (m = et(
                  m.line,
                  Math.min($e(o, m.line).text.length, m.ch + K(l).length)
                ))
              : a &&
                _s &&
                _s.lineWise &&
                _s.text.join("\n") == t &&
                (f = m = et(f.line, 0)));
          var g = {
            from: f,
            to: m,
            text: c ? c[d % c.length] : l,
            origin:
              i || (a ? "paste" : e.state.cutIncoming > s ? "cut" : "+input"),
          };
          co(e.doc, g), ln(e, "inputRead", e, g);
        }
        t && !a && Os(e, t),
          Mr(e),
          e.curOp.updateInput < 2 && (e.curOp.updateInput = h),
          (e.curOp.typing = !0),
          (e.state.pasteIncoming = e.state.cutIncoming = -1);
      }
      function Is(e, t) {
        var n = e.clipboardData && e.clipboardData.getData("Text");
        if (n)
          return (
            e.preventDefault(),
            t.isReadOnly() ||
              t.options.disableInput ||
              Jr(t, function () {
                return Ps(t, n, 0, null, "paste");
              }),
            !0
          );
      }
      function Os(e, t) {
        if (e.options.electricChars && e.options.smartIndent)
          for (var n = e.doc.sel, r = n.ranges.length - 1; r >= 0; r--) {
            var i = n.ranges[r];
            if (
              !(
                i.head.ch > 100 ||
                (r && n.ranges[r - 1].head.line == i.head.line)
              )
            ) {
              var o = e.getModeAt(i.head),
                s = !1;
              if (o.electricChars) {
                for (var a = 0; a < o.electricChars.length; a++)
                  if (t.indexOf(o.electricChars.charAt(a)) > -1) {
                    s = As(e, i.head.line, "smart");
                    break;
                  }
              } else
                o.electricInput &&
                  o.electricInput.test(
                    $e(e.doc, i.head.line).text.slice(0, i.head.ch)
                  ) &&
                  (s = As(e, i.head.line, "smart"));
              s && ln(e, "electricInput", e, i.head.line);
            }
          }
      }
      function Ls(e) {
        for (var t = [], n = [], r = 0; r < e.doc.sel.ranges.length; r++) {
          var i = e.doc.sel.ranges[r].head.line,
            o = { anchor: et(i, 0), head: et(i + 1, 0) };
          n.push(o), t.push(e.getRange(o.anchor, o.head));
        }
        return { text: t, ranges: n };
      }
      function Fs(e, t, n, r) {
        e.setAttribute("autocorrect", n ? "" : "off"),
          e.setAttribute("autocapitalize", r ? "" : "off"),
          e.setAttribute("spellcheck", !!t);
      }
      function Ns() {
        var e = A(
            "textarea",
            null,
            null,
            "position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"
          ),
          t = A(
            "div",
            [e],
            null,
            "overflow: hidden; position: relative; width: 3px; height: 0px;"
          );
        return (
          l ? (e.style.width = "1000px") : e.setAttribute("wrap", "off"),
          m && (e.style.border = "1px solid black"),
          Fs(e),
          t
        );
      }
      function Bs(e, t, n, r, i) {
        var o = t,
          s = n,
          a = $e(e, t.line);
        function l(r) {
          var o, s;
          if (
            null ==
            (o = i
              ? (function (e, t, n, r) {
                  var i = ce(t, e.doc.direction);
                  if (!i) return Jo(t, n, r);
                  n.ch >= t.text.length
                    ? ((n.ch = t.text.length), (n.sticky = "before"))
                    : n.ch <= 0 && ((n.ch = 0), (n.sticky = "after"));
                  var o = ae(i, n.ch, n.sticky),
                    s = i[o];
                  if (
                    "ltr" == e.doc.direction &&
                    s.level % 2 == 0 &&
                    (r > 0 ? s.to > n.ch : s.from < n.ch)
                  )
                    return Jo(t, n, r);
                  var a,
                    l = function (e, n) {
                      return Xo(t, e instanceof et ? e.ch : e, n);
                    },
                    c = function (n) {
                      return e.options.lineWrapping
                        ? ((a = a || Pn(e, t)), Xn(e, t, a, n))
                        : { begin: 0, end: t.text.length };
                    },
                    u = c("before" == n.sticky ? l(n, -1) : n.ch);
                  if ("rtl" == e.doc.direction || 1 == s.level) {
                    var h = (1 == s.level) == r < 0,
                      d = l(n, h ? 1 : -1);
                    if (
                      null != d &&
                      (h
                        ? d <= s.to && d <= u.end
                        : d >= s.from && d >= u.begin)
                    ) {
                      var p = h ? "before" : "after";
                      return new et(n.line, d, p);
                    }
                  }
                  var f = function (e, t, r) {
                      for (
                        var o = function (e, t) {
                          return t
                            ? new et(n.line, l(e, 1), "before")
                            : new et(n.line, e, "after");
                        };
                        e >= 0 && e < i.length;
                        e += t
                      ) {
                        var s = i[e],
                          a = t > 0 == (1 != s.level),
                          c = a ? r.begin : l(r.end, -1);
                        if (s.from <= c && c < s.to) return o(c, a);
                        if (
                          ((c = a ? s.from : l(s.to, -1)),
                          r.begin <= c && c < r.end)
                        )
                          return o(c, a);
                      }
                    },
                    m = f(o + r, r, u);
                  if (m) return m;
                  var g = r > 0 ? u.end : l(u.begin, -1);
                  return null == g ||
                    (r > 0 && g == t.text.length) ||
                    !(m = f(r > 0 ? 0 : i.length - 1, r, c(g)))
                    ? null
                    : m;
                })(e.cm, a, t, n)
              : Jo(a, t, n))
          ) {
            if (
              r ||
              (s = t.line + n) < e.first ||
              s >= e.first + e.size ||
              ((t = new et(s, t.ch, t.sticky)), !(a = $e(e, s)))
            )
              return !1;
            t = es(i, e.cm, a, t.line, n);
          } else t = o;
          return !0;
        }
        if ("char" == r) l();
        else if ("column" == r) l(!0);
        else if ("word" == r || "group" == r)
          for (
            var c = null,
              u = "group" == r,
              h = e.cm && e.cm.getHelper(t, "wordChars"),
              d = !0;
            !(n < 0) || l(!d);
            d = !1
          ) {
            var p = a.text.charAt(t.ch) || "\n",
              f = ee(p, h)
                ? "w"
                : u && "\n" == p
                ? "n"
                : !u || /\s/.test(p)
                ? null
                : "p";
            if ((!u || d || f || (f = "s"), c && c != f)) {
              n < 0 && ((n = 1), l(), (t.sticky = "after"));
              break;
            }
            if ((f && (c = f), n > 0 && !l(!d))) break;
          }
        var m = oo(e, t, o, s, !0);
        return nt(o, m) && (m.hitSide = !0), m;
      }
      function Hs(e, t, n, r) {
        var i,
          o,
          s = e.doc,
          a = t.left;
        if ("page" == r) {
          var l = Math.min(
              e.display.wrapper.clientHeight,
              window.innerHeight || document.documentElement.clientHeight
            ),
            c = Math.max(l - 0.5 * rr(e.display), 3);
          i = (n > 0 ? t.bottom : t.top) + n * c;
        } else "line" == r && (i = n > 0 ? t.bottom + 3 : t.top - 3);
        for (; (o = Qn(e, a, i)).outside; ) {
          if (n < 0 ? i <= 0 : i >= s.height) {
            o.hitSide = !0;
            break;
          }
          i += 5 * n;
        }
        return o;
      }
      var zs = function (e) {
        (this.cm = e),
          (this.lastAnchorNode = this.lastAnchorOffset = this.lastFocusNode = this.lastFocusOffset = null),
          (this.polling = new H()),
          (this.composing = null),
          (this.gracePeriod = !1),
          (this.readDOMTimeout = null);
      };
      function Us(e, t) {
        var n = Mn(e, t.line);
        if (!n || n.hidden) return null;
        var r = $e(e.doc, t.line),
          i = An(n, r, t.line),
          o = ce(r, e.doc.direction),
          s = "left";
        o && (s = ae(o, t.ch) % 2 ? "right" : "left");
        var a = Fn(i.map, t.ch, s);
        return (a.offset = "right" == a.collapse ? a.end : a.start), a;
      }
      function Ws(e, t) {
        return t && (e.bad = !0), e;
      }
      function js(e, t, n) {
        var r;
        if (t == e.display.lineDiv) {
          if (!(r = e.display.lineDiv.childNodes[n]))
            return Ws(e.clipPos(et(e.display.viewTo - 1)), !0);
          (t = null), (n = 0);
        } else
          for (r = t; ; r = r.parentNode) {
            if (!r || r == e.display.lineDiv) return null;
            if (r.parentNode && r.parentNode == e.display.lineDiv) break;
          }
        for (var i = 0; i < e.display.view.length; i++) {
          var o = e.display.view[i];
          if (o.node == r) return Vs(o, t, n);
        }
      }
      function Vs(e, t, n) {
        var r = e.text.firstChild,
          i = !1;
        if (!t || !M(r, t)) return Ws(et(Qe(e.line), 0), !0);
        if (t == r && ((i = !0), (t = r.childNodes[n]), (n = 0), !t)) {
          var o = e.rest ? K(e.rest) : e.line;
          return Ws(et(Qe(o), o.text.length), i);
        }
        var s = 3 == t.nodeType ? t : null,
          a = t;
        for (
          s ||
          1 != t.childNodes.length ||
          3 != t.firstChild.nodeType ||
          ((s = t.firstChild), n && (n = s.nodeValue.length));
          a.parentNode != r;

        )
          a = a.parentNode;
        var l = e.measure,
          c = l.maps;
        function u(t, n, r) {
          for (var i = -1; i < (c ? c.length : 0); i++)
            for (var o = i < 0 ? l.map : c[i], s = 0; s < o.length; s += 3) {
              var a = o[s + 2];
              if (a == t || a == n) {
                var u = Qe(i < 0 ? e.line : e.rest[i]),
                  h = o[s] + r;
                return (r < 0 || a != t) && (h = o[s + (r ? 1 : 0)]), et(u, h);
              }
            }
        }
        var h = u(s, a, n);
        if (h) return Ws(h, i);
        for (
          var d = a.nextSibling, p = s ? s.nodeValue.length - n : 0;
          d;
          d = d.nextSibling
        ) {
          if ((h = u(d, d.firstChild, 0))) return Ws(et(h.line, h.ch - p), i);
          p += d.textContent.length;
        }
        for (var f = a.previousSibling, m = n; f; f = f.previousSibling) {
          if ((h = u(f, f.firstChild, -1))) return Ws(et(h.line, h.ch + m), i);
          m += f.textContent.length;
        }
      }
      (zs.prototype.init = function (e) {
        var t = this,
          n = this,
          r = n.cm,
          i = (n.div = e.lineDiv);
        function o(e) {
          if (!me(r, e)) {
            if (r.somethingSelected())
              Ms({ lineWise: !1, text: r.getSelections() }),
                "cut" == e.type && r.replaceSelection("", null, "cut");
            else {
              if (!r.options.lineWiseCopyCut) return;
              var t = Ls(r);
              Ms({ lineWise: !0, text: t.text }),
                "cut" == e.type &&
                  r.operation(function () {
                    r.setSelections(t.ranges, 0, W),
                      r.replaceSelection("", null, "cut");
                  });
            }
            if (e.clipboardData) {
              e.clipboardData.clearData();
              var o = _s.text.join("\n");
              if (
                (e.clipboardData.setData("Text", o),
                e.clipboardData.getData("Text") == o)
              )
                return void e.preventDefault();
            }
            var s = Ns(),
              a = s.firstChild;
            r.display.lineSpace.insertBefore(s, r.display.lineSpace.firstChild),
              (a.value = _s.text.join("\n"));
            var l = document.activeElement;
            L(a),
              setTimeout(function () {
                r.display.lineSpace.removeChild(s),
                  l.focus(),
                  l == i && n.showPrimarySelection();
              }, 50);
          }
        }
        Fs(
          i,
          r.options.spellcheck,
          r.options.autocorrect,
          r.options.autocapitalize
        ),
          he(i, "paste", function (e) {
            me(r, e) ||
              Is(e, r) ||
              (a <= 11 &&
                setTimeout(
                  ei(r, function () {
                    return t.updateFromDOM();
                  }),
                  20
                ));
          }),
          he(i, "compositionstart", function (e) {
            t.composing = { data: e.data, done: !1 };
          }),
          he(i, "compositionupdate", function (e) {
            t.composing || (t.composing = { data: e.data, done: !1 });
          }),
          he(i, "compositionend", function (e) {
            t.composing &&
              (e.data != t.composing.data && t.readFromDOMSoon(),
              (t.composing.done = !0));
          }),
          he(i, "touchstart", function () {
            return n.forceCompositionEnd();
          }),
          he(i, "input", function () {
            t.composing || t.readFromDOMSoon();
          }),
          he(i, "copy", o),
          he(i, "cut", o);
      }),
        (zs.prototype.prepareSelection = function () {
          var e = yr(this.cm, !1);
          return (e.focus = this.cm.state.focused), e;
        }),
        (zs.prototype.showSelection = function (e, t) {
          e &&
            this.cm.display.view.length &&
            ((e.focus || t) && this.showPrimarySelection(),
            this.showMultipleSelections(e));
        }),
        (zs.prototype.getSelection = function () {
          return this.cm.display.wrapper.ownerDocument.getSelection();
        }),
        (zs.prototype.showPrimarySelection = function () {
          var e = this.getSelection(),
            t = this.cm,
            r = t.doc.sel.primary(),
            i = r.from(),
            o = r.to();
          if (
            t.display.viewTo == t.display.viewFrom ||
            i.line >= t.display.viewTo ||
            o.line < t.display.viewFrom
          )
            e.removeAllRanges();
          else {
            var s = js(t, e.anchorNode, e.anchorOffset),
              a = js(t, e.focusNode, e.focusOffset);
            if (
              !s ||
              s.bad ||
              !a ||
              a.bad ||
              0 != tt(ot(s, a), i) ||
              0 != tt(it(s, a), o)
            ) {
              var l = t.display.view,
                c = (i.line >= t.display.viewFrom && Us(t, i)) || {
                  node: l[0].measure.map[2],
                  offset: 0,
                },
                u = o.line < t.display.viewTo && Us(t, o);
              if (!u) {
                var h = l[l.length - 1].measure,
                  d = h.maps ? h.maps[h.maps.length - 1] : h.map;
                u = {
                  node: d[d.length - 1],
                  offset: d[d.length - 2] - d[d.length - 3],
                };
              }
              if (c && u) {
                var p,
                  f = e.rangeCount && e.getRangeAt(0);
                try {
                  p = x(c.node, c.offset, u.offset, u.node);
                } catch (e) {}
                p &&
                  (!n && t.state.focused
                    ? (e.collapse(c.node, c.offset),
                      p.collapsed || (e.removeAllRanges(), e.addRange(p)))
                    : (e.removeAllRanges(), e.addRange(p)),
                  f && null == e.anchorNode
                    ? e.addRange(f)
                    : n && this.startGracePeriod()),
                  this.rememberSelection();
              } else e.removeAllRanges();
            }
          }
        }),
        (zs.prototype.startGracePeriod = function () {
          var e = this;
          clearTimeout(this.gracePeriod),
            (this.gracePeriod = setTimeout(function () {
              (e.gracePeriod = !1),
                e.selectionChanged() &&
                  e.cm.operation(function () {
                    return (e.cm.curOp.selectionChanged = !0);
                  });
            }, 20));
        }),
        (zs.prototype.showMultipleSelections = function (e) {
          D(this.cm.display.cursorDiv, e.cursors),
            D(this.cm.display.selectionDiv, e.selection);
        }),
        (zs.prototype.rememberSelection = function () {
          var e = this.getSelection();
          (this.lastAnchorNode = e.anchorNode),
            (this.lastAnchorOffset = e.anchorOffset),
            (this.lastFocusNode = e.focusNode),
            (this.lastFocusOffset = e.focusOffset);
        }),
        (zs.prototype.selectionInEditor = function () {
          var e = this.getSelection();
          if (!e.rangeCount) return !1;
          var t = e.getRangeAt(0).commonAncestorContainer;
          return M(this.div, t);
        }),
        (zs.prototype.focus = function () {
          "nocursor" != this.cm.options.readOnly &&
            (this.selectionInEditor() ||
              this.showSelection(this.prepareSelection(), !0),
            this.div.focus());
        }),
        (zs.prototype.blur = function () {
          this.div.blur();
        }),
        (zs.prototype.getField = function () {
          return this.div;
        }),
        (zs.prototype.supportsTouch = function () {
          return !0;
        }),
        (zs.prototype.receivedFocus = function () {
          var e = this;
          this.selectionInEditor()
            ? this.pollSelection()
            : Jr(this.cm, function () {
                return (e.cm.curOp.selectionChanged = !0);
              }),
            this.polling.set(this.cm.options.pollInterval, function t() {
              e.cm.state.focused &&
                (e.pollSelection(),
                e.polling.set(e.cm.options.pollInterval, t));
            });
        }),
        (zs.prototype.selectionChanged = function () {
          var e = this.getSelection();
          return (
            e.anchorNode != this.lastAnchorNode ||
            e.anchorOffset != this.lastAnchorOffset ||
            e.focusNode != this.lastFocusNode ||
            e.focusOffset != this.lastFocusOffset
          );
        }),
        (zs.prototype.pollSelection = function () {
          if (
            null == this.readDOMTimeout &&
            !this.gracePeriod &&
            this.selectionChanged()
          ) {
            var e = this.getSelection(),
              t = this.cm;
            if (
              g &&
              u &&
              this.cm.display.gutterSpecs.length &&
              (function (e) {
                for (var t = e; t; t = t.parentNode)
                  if (/CodeMirror-gutter-wrapper/.test(t.className)) return !0;
                return !1;
              })(e.anchorNode)
            )
              return (
                this.cm.triggerOnKeyDown({
                  type: "keydown",
                  keyCode: 8,
                  preventDefault: Math.abs,
                }),
                this.blur(),
                void this.focus()
              );
            if (!this.composing) {
              this.rememberSelection();
              var n = js(t, e.anchorNode, e.anchorOffset),
                r = js(t, e.focusNode, e.focusOffset);
              n &&
                r &&
                Jr(t, function () {
                  Ji(t.doc, xi(n, r), W),
                    (n.bad || r.bad) && (t.curOp.selectionChanged = !0);
                });
            }
          }
        }),
        (zs.prototype.pollContent = function () {
          null != this.readDOMTimeout &&
            (clearTimeout(this.readDOMTimeout), (this.readDOMTimeout = null));
          var e,
            t,
            n,
            r = this.cm,
            i = r.display,
            o = r.doc.sel.primary(),
            s = o.from(),
            a = o.to();
          if (
            (0 == s.ch &&
              s.line > r.firstLine() &&
              (s = et(s.line - 1, $e(r.doc, s.line - 1).length)),
            a.ch == $e(r.doc, a.line).text.length &&
              a.line < r.lastLine() &&
              (a = et(a.line + 1, 0)),
            s.line < i.viewFrom || a.line > i.viewTo - 1)
          )
            return !1;
          s.line == i.viewFrom || 0 == (e = ur(r, s.line))
            ? ((t = Qe(i.view[0].line)), (n = i.view[0].node))
            : ((t = Qe(i.view[e].line)), (n = i.view[e - 1].node.nextSibling));
          var l,
            c,
            u = ur(r, a.line);
          if (
            (u == i.view.length - 1
              ? ((l = i.viewTo - 1), (c = i.lineDiv.lastChild))
              : ((l = Qe(i.view[u + 1].line) - 1),
                (c = i.view[u + 1].node.previousSibling)),
            !n)
          )
            return !1;
          for (
            var h = r.doc.splitLines(
                (function (e, t, n, r, i) {
                  var o = "",
                    s = !1,
                    a = e.doc.lineSeparator(),
                    l = !1;
                  function c() {
                    s && ((o += a), l && (o += a), (s = l = !1));
                  }
                  function u(e) {
                    e && (c(), (o += e));
                  }
                  function h(t) {
                    if (1 == t.nodeType) {
                      var n = t.getAttribute("cm-text");
                      if (n) return void u(n);
                      var o,
                        d = t.getAttribute("cm-marker");
                      if (d) {
                        var p = e.findMarks(
                          et(r, 0),
                          et(i + 1, 0),
                          ((g = +d),
                          function (e) {
                            return e.id == g;
                          })
                        );
                        return void (
                          p.length &&
                          (o = p[0].find(0)) &&
                          u(qe(e.doc, o.from, o.to).join(a))
                        );
                      }
                      if ("false" == t.getAttribute("contenteditable")) return;
                      var f = /^(pre|div|p|li|table|br)$/i.test(t.nodeName);
                      if (
                        !/^br$/i.test(t.nodeName) &&
                        0 == t.textContent.length
                      )
                        return;
                      f && c();
                      for (var m = 0; m < t.childNodes.length; m++)
                        h(t.childNodes[m]);
                      /^(pre|p)$/i.test(t.nodeName) && (l = !0), f && (s = !0);
                    } else
                      3 == t.nodeType &&
                        u(
                          t.nodeValue
                            .replace(/\u200b/g, "")
                            .replace(/\u00a0/g, " ")
                        );
                    var g;
                  }
                  for (; h(t), t != n; ) (t = t.nextSibling), (l = !1);
                  return o;
                })(r, n, c, t, l)
              ),
              d = qe(r.doc, et(t, 0), et(l, $e(r.doc, l).text.length));
            h.length > 1 && d.length > 1;

          )
            if (K(h) == K(d)) h.pop(), d.pop(), l--;
            else {
              if (h[0] != d[0]) break;
              h.shift(), d.shift(), t++;
            }
          for (
            var p = 0,
              f = 0,
              m = h[0],
              g = d[0],
              y = Math.min(m.length, g.length);
            p < y && m.charCodeAt(p) == g.charCodeAt(p);

          )
            ++p;
          for (
            var v = K(h),
              w = K(d),
              b = Math.min(
                v.length - (1 == h.length ? p : 0),
                w.length - (1 == d.length ? p : 0)
              );
            f < b &&
            v.charCodeAt(v.length - f - 1) == w.charCodeAt(w.length - f - 1);

          )
            ++f;
          if (1 == h.length && 1 == d.length && t == s.line)
            for (
              ;
              p &&
              p > s.ch &&
              v.charCodeAt(v.length - f - 1) == w.charCodeAt(w.length - f - 1);

            )
              p--, f++;
          (h[h.length - 1] = v.slice(0, v.length - f).replace(/^\u200b+/, "")),
            (h[0] = h[0].slice(p).replace(/\u200b+$/, ""));
          var S = et(t, p),
            C = et(l, d.length ? K(d).length - f : 0);
          return h.length > 1 || h[0] || tt(S, C)
            ? (mo(r.doc, h, S, C, "+input"), !0)
            : void 0;
        }),
        (zs.prototype.ensurePolled = function () {
          this.forceCompositionEnd();
        }),
        (zs.prototype.reset = function () {
          this.forceCompositionEnd();
        }),
        (zs.prototype.forceCompositionEnd = function () {
          this.composing &&
            (clearTimeout(this.readDOMTimeout),
            (this.composing = null),
            this.updateFromDOM(),
            this.div.blur(),
            this.div.focus());
        }),
        (zs.prototype.readFromDOMSoon = function () {
          var e = this;
          null == this.readDOMTimeout &&
            (this.readDOMTimeout = setTimeout(function () {
              if (((e.readDOMTimeout = null), e.composing)) {
                if (!e.composing.done) return;
                e.composing = null;
              }
              e.updateFromDOM();
            }, 80));
        }),
        (zs.prototype.updateFromDOM = function () {
          var e = this;
          (!this.cm.isReadOnly() && this.pollContent()) ||
            Jr(this.cm, function () {
              return hr(e.cm);
            });
        }),
        (zs.prototype.setUneditable = function (e) {
          e.contentEditable = "false";
        }),
        (zs.prototype.onKeyPress = function (e) {
          0 == e.charCode ||
            this.composing ||
            (e.preventDefault(),
            this.cm.isReadOnly() ||
              ei(this.cm, Ps)(
                this.cm,
                String.fromCharCode(
                  null == e.charCode ? e.keyCode : e.charCode
                ),
                0
              ));
        }),
        (zs.prototype.readOnlyChanged = function (e) {
          this.div.contentEditable = String("nocursor" != e);
        }),
        (zs.prototype.onContextMenu = function () {}),
        (zs.prototype.resetPosition = function () {}),
        (zs.prototype.needsContentAttribute = !0);
      var Gs = function (e) {
        (this.cm = e),
          (this.prevInput = ""),
          (this.pollingFast = !1),
          (this.polling = new H()),
          (this.hasSelection = !1),
          (this.composing = null);
      };
      (Gs.prototype.init = function (e) {
        var t = this,
          n = this,
          r = this.cm;
        this.createField(e);
        var i = this.textarea;
        function o(e) {
          if (!me(r, e)) {
            if (r.somethingSelected())
              Ms({ lineWise: !1, text: r.getSelections() });
            else {
              if (!r.options.lineWiseCopyCut) return;
              var t = Ls(r);
              Ms({ lineWise: !0, text: t.text }),
                "cut" == e.type
                  ? r.setSelections(t.ranges, null, W)
                  : ((n.prevInput = ""), (i.value = t.text.join("\n")), L(i));
            }
            "cut" == e.type && (r.state.cutIncoming = +new Date());
          }
        }
        e.wrapper.insertBefore(this.wrapper, e.wrapper.firstChild),
          m && (i.style.width = "0px"),
          he(i, "input", function () {
            s && a >= 9 && t.hasSelection && (t.hasSelection = null), n.poll();
          }),
          he(i, "paste", function (e) {
            me(r, e) ||
              Is(e, r) ||
              ((r.state.pasteIncoming = +new Date()), n.fastPoll());
          }),
          he(i, "cut", o),
          he(i, "copy", o),
          he(e.scroller, "paste", function (t) {
            if (!Cn(e, t) && !me(r, t)) {
              if (!i.dispatchEvent)
                return (r.state.pasteIncoming = +new Date()), void n.focus();
              var o = new Event("paste");
              (o.clipboardData = t.clipboardData), i.dispatchEvent(o);
            }
          }),
          he(e.lineSpace, "selectstart", function (t) {
            Cn(e, t) || we(t);
          }),
          he(i, "compositionstart", function () {
            var e = r.getCursor("from");
            n.composing && n.composing.range.clear(),
              (n.composing = {
                start: e,
                range: r.markText(e, r.getCursor("to"), {
                  className: "CodeMirror-composing",
                }),
              });
          }),
          he(i, "compositionend", function () {
            n.composing &&
              (n.poll(), n.composing.range.clear(), (n.composing = null));
          });
      }),
        (Gs.prototype.createField = function (e) {
          (this.wrapper = Ns()), (this.textarea = this.wrapper.firstChild);
        }),
        (Gs.prototype.prepareSelection = function () {
          var e = this.cm,
            t = e.display,
            n = e.doc,
            r = yr(e);
          if (e.options.moveInputWithCursor) {
            var i = qn(e, n.sel.primary().head, "div"),
              o = t.wrapper.getBoundingClientRect(),
              s = t.lineDiv.getBoundingClientRect();
            (r.teTop = Math.max(
              0,
              Math.min(t.wrapper.clientHeight - 10, i.top + s.top - o.top)
            )),
              (r.teLeft = Math.max(
                0,
                Math.min(t.wrapper.clientWidth - 10, i.left + s.left - o.left)
              ));
          }
          return r;
        }),
        (Gs.prototype.showSelection = function (e) {
          var t = this.cm.display;
          D(t.cursorDiv, e.cursors),
            D(t.selectionDiv, e.selection),
            null != e.teTop &&
              ((this.wrapper.style.top = e.teTop + "px"),
              (this.wrapper.style.left = e.teLeft + "px"));
        }),
        (Gs.prototype.reset = function (e) {
          if (!this.contextMenuPending && !this.composing) {
            var t = this.cm;
            if (t.somethingSelected()) {
              this.prevInput = "";
              var n = t.getSelection();
              (this.textarea.value = n),
                t.state.focused && L(this.textarea),
                s && a >= 9 && (this.hasSelection = n);
            } else
              e ||
                ((this.prevInput = this.textarea.value = ""),
                s && a >= 9 && (this.hasSelection = null));
          }
        }),
        (Gs.prototype.getField = function () {
          return this.textarea;
        }),
        (Gs.prototype.supportsTouch = function () {
          return !1;
        }),
        (Gs.prototype.focus = function () {
          if (
            "nocursor" != this.cm.options.readOnly &&
            (!y || P() != this.textarea)
          )
            try {
              this.textarea.focus();
            } catch (e) {}
        }),
        (Gs.prototype.blur = function () {
          this.textarea.blur();
        }),
        (Gs.prototype.resetPosition = function () {
          this.wrapper.style.top = this.wrapper.style.left = 0;
        }),
        (Gs.prototype.receivedFocus = function () {
          this.slowPoll();
        }),
        (Gs.prototype.slowPoll = function () {
          var e = this;
          this.pollingFast ||
            this.polling.set(this.cm.options.pollInterval, function () {
              e.poll(), e.cm.state.focused && e.slowPoll();
            });
        }),
        (Gs.prototype.fastPoll = function () {
          var e = !1,
            t = this;
          (t.pollingFast = !0),
            t.polling.set(20, function n() {
              t.poll() || e
                ? ((t.pollingFast = !1), t.slowPoll())
                : ((e = !0), t.polling.set(60, n));
            });
        }),
        (Gs.prototype.poll = function () {
          var e = this,
            t = this.cm,
            n = this.textarea,
            r = this.prevInput;
          if (
            this.contextMenuPending ||
            !t.state.focused ||
            (Pe(n) && !r && !this.composing) ||
            t.isReadOnly() ||
            t.options.disableInput ||
            t.state.keySeq
          )
            return !1;
          var i = n.value;
          if (i == r && !t.somethingSelected()) return !1;
          if (
            (s && a >= 9 && this.hasSelection === i) ||
            (v && /[\uf700-\uf7ff]/.test(i))
          )
            return t.display.input.reset(), !1;
          if (t.doc.sel == t.display.selForContextMenu) {
            var o = i.charCodeAt(0);
            if ((8203 != o || r || (r = "​"), 8666 == o))
              return this.reset(), this.cm.execCommand("undo");
          }
          for (
            var l = 0, c = Math.min(r.length, i.length);
            l < c && r.charCodeAt(l) == i.charCodeAt(l);

          )
            ++l;
          return (
            Jr(t, function () {
              Ps(
                t,
                i.slice(l),
                r.length - l,
                null,
                e.composing ? "*compose" : null
              ),
                i.length > 1e3 || i.indexOf("\n") > -1
                  ? (n.value = e.prevInput = "")
                  : (e.prevInput = i),
                e.composing &&
                  (e.composing.range.clear(),
                  (e.composing.range = t.markText(
                    e.composing.start,
                    t.getCursor("to"),
                    { className: "CodeMirror-composing" }
                  )));
            }),
            !0
          );
        }),
        (Gs.prototype.ensurePolled = function () {
          this.pollingFast && this.poll() && (this.pollingFast = !1);
        }),
        (Gs.prototype.onKeyPress = function () {
          s && a >= 9 && (this.hasSelection = null), this.fastPoll();
        }),
        (Gs.prototype.onContextMenu = function (e) {
          var t = this,
            n = t.cm,
            r = n.display,
            i = t.textarea;
          t.contextMenuPending && t.contextMenuPending();
          var o = cr(n, e),
            c = r.scroller.scrollTop;
          if (o && !h) {
            n.options.resetSelectionOnContextMenu &&
              -1 == n.doc.sel.contains(o) &&
              ei(n, Ji)(n.doc, xi(o), W);
            var u,
              d = i.style.cssText,
              p = t.wrapper.style.cssText,
              f = t.wrapper.offsetParent.getBoundingClientRect();
            if (
              ((t.wrapper.style.cssText = "position: static"),
              (i.style.cssText =
                "position: absolute; width: 30px; height: 30px;\n      top: " +
                (e.clientY - f.top - 5) +
                "px; left: " +
                (e.clientX - f.left - 5) +
                "px;\n      z-index: 1000; background: " +
                (s ? "rgba(255, 255, 255, .05)" : "transparent") +
                ";\n      outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);"),
              l && (u = window.scrollY),
              r.input.focus(),
              l && window.scrollTo(null, u),
              r.input.reset(),
              n.somethingSelected() || (i.value = t.prevInput = " "),
              (t.contextMenuPending = y),
              (r.selForContextMenu = n.doc.sel),
              clearTimeout(r.detectingSelectAll),
              s && a >= 9 && g(),
              E)
            ) {
              Ce(e);
              var m = function () {
                pe(window, "mouseup", m), setTimeout(y, 20);
              };
              he(window, "mouseup", m);
            } else setTimeout(y, 50);
          }
          function g() {
            if (null != i.selectionStart) {
              var e = n.somethingSelected(),
                o = "​" + (e ? i.value : "");
              (i.value = "⇚"),
                (i.value = o),
                (t.prevInput = e ? "" : "​"),
                (i.selectionStart = 1),
                (i.selectionEnd = o.length),
                (r.selForContextMenu = n.doc.sel);
            }
          }
          function y() {
            if (
              t.contextMenuPending == y &&
              ((t.contextMenuPending = !1),
              (t.wrapper.style.cssText = p),
              (i.style.cssText = d),
              s &&
                a < 9 &&
                r.scrollbars.setScrollTop((r.scroller.scrollTop = c)),
              null != i.selectionStart)
            ) {
              (!s || (s && a < 9)) && g();
              var e = 0,
                o = function () {
                  r.selForContextMenu == n.doc.sel &&
                  0 == i.selectionStart &&
                  i.selectionEnd > 0 &&
                  "​" == t.prevInput
                    ? ei(n, ao)(n)
                    : e++ < 10
                    ? (r.detectingSelectAll = setTimeout(o, 500))
                    : ((r.selForContextMenu = null), r.input.reset());
                };
              r.detectingSelectAll = setTimeout(o, 200);
            }
          }
        }),
        (Gs.prototype.readOnlyChanged = function (e) {
          e || this.reset(), (this.textarea.disabled = "nocursor" == e);
        }),
        (Gs.prototype.setUneditable = function () {}),
        (Gs.prototype.needsContentAttribute = !1),
        (function (e) {
          var t = e.optionHandlers;
          function n(n, r, i, o) {
            (e.defaults[n] = r),
              i &&
                (t[n] = o
                  ? function (e, t, n) {
                      n != Cs && i(e, t, n);
                    }
                  : i);
          }
          (e.defineOption = n),
            (e.Init = Cs),
            n(
              "value",
              "",
              function (e, t) {
                return e.setValue(t);
              },
              !0
            ),
            n(
              "mode",
              null,
              function (e, t) {
                (e.doc.modeOption = t), _i(e);
              },
              !0
            ),
            n("indentUnit", 2, _i, !0),
            n("indentWithTabs", !1),
            n("smartIndent", !0),
            n(
              "tabSize",
              4,
              function (e) {
                Mi(e), zn(e), hr(e);
              },
              !0
            ),
            n("lineSeparator", null, function (e, t) {
              if (((e.doc.lineSep = t), t)) {
                var n = [],
                  r = e.doc.first;
                e.doc.iter(function (e) {
                  for (var i = 0; ; ) {
                    var o = e.text.indexOf(t, i);
                    if (-1 == o) break;
                    (i = o + t.length), n.push(et(r, o));
                  }
                  r++;
                });
                for (var i = n.length - 1; i >= 0; i--)
                  mo(e.doc, t, n[i], et(n[i].line, n[i].ch + t.length));
              }
            }),
            n(
              "specialChars",
              /[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,
              function (e, t, n) {
                (e.state.specialChars = new RegExp(
                  t.source + (t.test("\t") ? "" : "|\t"),
                  "g"
                )),
                  n != Cs && e.refresh();
              }
            ),
            n(
              "specialCharPlaceholder",
              Xt,
              function (e) {
                return e.refresh();
              },
              !0
            ),
            n("electricChars", !0),
            n(
              "inputStyle",
              y ? "contenteditable" : "textarea",
              function () {
                throw new Error(
                  "inputStyle can not (yet) be changed in a running editor"
                );
              },
              !0
            ),
            n(
              "spellcheck",
              !1,
              function (e, t) {
                return (e.getInputField().spellcheck = t);
              },
              !0
            ),
            n(
              "autocorrect",
              !1,
              function (e, t) {
                return (e.getInputField().autocorrect = t);
              },
              !0
            ),
            n(
              "autocapitalize",
              !1,
              function (e, t) {
                return (e.getInputField().autocapitalize = t);
              },
              !0
            ),
            n("rtlMoveVisually", !b),
            n("wholeLineUpdateBefore", !0),
            n(
              "theme",
              "default",
              function (e) {
                Ss(e), mi(e);
              },
              !0
            ),
            n("keyMap", "default", function (e, t, n) {
              var r = Qo(t),
                i = n != Cs && Qo(n);
              i && i.detach && i.detach(e, r),
                r.attach && r.attach(e, i || null);
            }),
            n("extraKeys", null),
            n("configureMouse", null),
            n("lineWrapping", !1, Rs, !0),
            n(
              "gutters",
              [],
              function (e, t) {
                (e.display.gutterSpecs = pi(t, e.options.lineNumbers)), mi(e);
              },
              !0
            ),
            n(
              "fixedGutter",
              !0,
              function (e, t) {
                (e.display.gutters.style.left = t ? sr(e.display) + "px" : "0"),
                  e.refresh();
              },
              !0
            ),
            n(
              "coverGutterNextToScrollbar",
              !1,
              function (e) {
                return Ur(e);
              },
              !0
            ),
            n(
              "scrollbarStyle",
              "native",
              function (e) {
                Vr(e),
                  Ur(e),
                  e.display.scrollbars.setScrollTop(e.doc.scrollTop),
                  e.display.scrollbars.setScrollLeft(e.doc.scrollLeft);
              },
              !0
            ),
            n(
              "lineNumbers",
              !1,
              function (e, t) {
                (e.display.gutterSpecs = pi(e.options.gutters, t)), mi(e);
              },
              !0
            ),
            n("firstLineNumber", 1, mi, !0),
            n(
              "lineNumberFormatter",
              function (e) {
                return e;
              },
              mi,
              !0
            ),
            n("showCursorWhenSelecting", !1, gr, !0),
            n("resetSelectionOnContextMenu", !0),
            n("lineWiseCopyCut", !0),
            n("pasteLinesPerSelection", !0),
            n("selectionsMayTouch", !1),
            n("readOnly", !1, function (e, t) {
              "nocursor" == t && (xr(e), e.display.input.blur()),
                e.display.input.readOnlyChanged(t);
            }),
            n(
              "disableInput",
              !1,
              function (e, t) {
                t || e.display.input.reset();
              },
              !0
            ),
            n("dragDrop", !0, xs),
            n("allowDropFileTypes", null),
            n("cursorBlinkRate", 530),
            n("cursorScrollMargin", 0),
            n("cursorHeight", 1, gr, !0),
            n("singleCursorHeightPerLine", !0, gr, !0),
            n("workTime", 100),
            n("workDelay", 100),
            n("flattenSpans", !0, Mi, !0),
            n("addModeClass", !1, Mi, !0),
            n("pollInterval", 100),
            n("undoDepth", 200, function (e, t) {
              return (e.doc.history.undoDepth = t);
            }),
            n("historyEventDelay", 1250),
            n(
              "viewportMargin",
              10,
              function (e) {
                return e.refresh();
              },
              !0
            ),
            n("maxHighlightLength", 1e4, Mi, !0),
            n("moveInputWithCursor", !0, function (e, t) {
              t || e.display.input.resetPosition();
            }),
            n("tabindex", null, function (e, t) {
              return (e.display.input.getField().tabIndex = t || "");
            }),
            n("autofocus", null),
            n(
              "direction",
              "ltr",
              function (e, t) {
                return e.doc.setDirection(t);
              },
              !0
            ),
            n("phrases", null);
        })(Ts),
        (function (e) {
          var t = e.optionHandlers,
            n = (e.helpers = {});
          (e.prototype = {
            constructor: e,
            focus: function () {
              window.focus(), this.display.input.focus();
            },
            setOption: function (e, n) {
              var r = this.options,
                i = r[e];
              (r[e] == n && "mode" != e) ||
                ((r[e] = n),
                t.hasOwnProperty(e) && ei(this, t[e])(this, n, i),
                fe(this, "optionChange", this, e));
            },
            getOption: function (e) {
              return this.options[e];
            },
            getDoc: function () {
              return this.doc;
            },
            addKeyMap: function (e, t) {
              this.state.keyMaps[t ? "push" : "unshift"](Qo(e));
            },
            removeKeyMap: function (e) {
              for (var t = this.state.keyMaps, n = 0; n < t.length; ++n)
                if (t[n] == e || t[n].name == e) return t.splice(n, 1), !0;
            },
            addOverlay: ti(function (t, n) {
              var r = t.token ? t : e.getMode(this.options, t);
              if (r.startState)
                throw new Error("Overlays may not be stateful.");
              !(function (e, t, n) {
                for (var r = 0, i = n(t); r < e.length && n(e[r]) <= i; ) r++;
                e.splice(r, 0, t);
              })(
                this.state.overlays,
                {
                  mode: r,
                  modeSpec: t,
                  opaque: n && n.opaque,
                  priority: (n && n.priority) || 0,
                },
                function (e) {
                  return e.priority;
                }
              ),
                this.state.modeGen++,
                hr(this);
            }),
            removeOverlay: ti(function (e) {
              for (var t = this.state.overlays, n = 0; n < t.length; ++n) {
                var r = t[n].modeSpec;
                if (r == e || ("string" == typeof e && r.name == e))
                  return t.splice(n, 1), this.state.modeGen++, void hr(this);
              }
            }),
            indentLine: ti(function (e, t, n) {
              "string" != typeof t &&
                "number" != typeof t &&
                (t =
                  null == t
                    ? this.options.smartIndent
                      ? "smart"
                      : "prev"
                    : t
                    ? "add"
                    : "subtract"),
                Xe(this.doc, e) && As(this, e, t, n);
            }),
            indentSelection: ti(function (e) {
              for (
                var t = this.doc.sel.ranges, n = -1, r = 0;
                r < t.length;
                r++
              ) {
                var i = t[r];
                if (i.empty())
                  i.head.line > n &&
                    (As(this, i.head.line, e, !0),
                    (n = i.head.line),
                    r == this.doc.sel.primIndex && Mr(this));
                else {
                  var o = i.from(),
                    s = i.to(),
                    a = Math.max(n, o.line);
                  n = Math.min(this.lastLine(), s.line - (s.ch ? 0 : 1)) + 1;
                  for (var l = a; l < n; ++l) As(this, l, e);
                  var c = this.doc.sel.ranges;
                  0 == o.ch &&
                    t.length == c.length &&
                    c[r].from().ch > 0 &&
                    Qi(this.doc, r, new Ei(o, c[r].to()), W);
                }
              }
            }),
            getTokenAt: function (e, t) {
              return vt(this, e, t);
            },
            getLineTokens: function (e, t) {
              return vt(this, et(e), t, !0);
            },
            getTokenTypeAt: function (e) {
              e = at(this.doc, e);
              var t,
                n = dt(this, $e(this.doc, e.line)),
                r = 0,
                i = (n.length - 1) / 2,
                o = e.ch;
              if (0 == o) t = n[2];
              else
                for (;;) {
                  var s = (r + i) >> 1;
                  if ((s ? n[2 * s - 1] : 0) >= o) i = s;
                  else {
                    if (!(n[2 * s + 1] < o)) {
                      t = n[2 * s + 2];
                      break;
                    }
                    r = s + 1;
                  }
                }
              var a = t ? t.indexOf("overlay ") : -1;
              return a < 0 ? t : 0 == a ? null : t.slice(0, a - 1);
            },
            getModeAt: function (t) {
              var n = this.doc.mode;
              return n.innerMode
                ? e.innerMode(n, this.getTokenAt(t).state).mode
                : n;
            },
            getHelper: function (e, t) {
              return this.getHelpers(e, t)[0];
            },
            getHelpers: function (e, t) {
              var r = [];
              if (!n.hasOwnProperty(t)) return r;
              var i = n[t],
                o = this.getModeAt(e);
              if ("string" == typeof o[t]) i[o[t]] && r.push(i[o[t]]);
              else if (o[t])
                for (var s = 0; s < o[t].length; s++) {
                  var a = i[o[t][s]];
                  a && r.push(a);
                }
              else
                o.helperType && i[o.helperType]
                  ? r.push(i[o.helperType])
                  : i[o.name] && r.push(i[o.name]);
              for (var l = 0; l < i._global.length; l++) {
                var c = i._global[l];
                c.pred(o, this) && -1 == z(r, c.val) && r.push(c.val);
              }
              return r;
            },
            getStateAfter: function (e, t) {
              var n = this.doc;
              return pt(
                this,
                (e = st(n, null == e ? n.first + n.size - 1 : e)) + 1,
                t
              ).state;
            },
            cursorCoords: function (e, t) {
              var n = this.doc.sel.primary();
              return qn(
                this,
                null == e
                  ? n.head
                  : "object" == typeof e
                  ? at(this.doc, e)
                  : e
                  ? n.from()
                  : n.to(),
                t || "page"
              );
            },
            charCoords: function (e, t) {
              return $n(this, at(this.doc, e), t || "page");
            },
            coordsChar: function (e, t) {
              return Qn(this, (e = Gn(this, e, t || "page")).left, e.top);
            },
            lineAtHeight: function (e, t) {
              return (
                (e = Gn(this, { top: e, left: 0 }, t || "page").top),
                Ze(this.doc, e + this.display.viewOffset)
              );
            },
            heightAtLine: function (e, t, n) {
              var r,
                i = !1;
              if ("number" == typeof e) {
                var o = this.doc.first + this.doc.size - 1;
                e < this.doc.first
                  ? (e = this.doc.first)
                  : e > o && ((e = o), (i = !0)),
                  (r = $e(this.doc, e));
              } else r = e;
              return (
                Vn(this, r, { top: 0, left: 0 }, t || "page", n || i).top +
                (i ? this.doc.height - jt(r) : 0)
              );
            },
            defaultTextHeight: function () {
              return rr(this.display);
            },
            defaultCharWidth: function () {
              return ir(this.display);
            },
            getViewport: function () {
              return { from: this.display.viewFrom, to: this.display.viewTo };
            },
            addWidget: function (e, t, n, r, i) {
              var o,
                s,
                a,
                l = this.display,
                c = (e = qn(this, at(this.doc, e))).bottom,
                u = e.left;
              if (
                ((t.style.position = "absolute"),
                t.setAttribute("cm-ignore-events", "true"),
                this.display.input.setUneditable(t),
                l.sizer.appendChild(t),
                "over" == r)
              )
                c = e.top;
              else if ("above" == r || "near" == r) {
                var h = Math.max(l.wrapper.clientHeight, this.doc.height),
                  d = Math.max(l.sizer.clientWidth, l.lineSpace.clientWidth);
                ("above" == r || e.bottom + t.offsetHeight > h) &&
                e.top > t.offsetHeight
                  ? (c = e.top - t.offsetHeight)
                  : e.bottom + t.offsetHeight <= h && (c = e.bottom),
                  u + t.offsetWidth > d && (u = d - t.offsetWidth);
              }
              (t.style.top = c + "px"),
                (t.style.left = t.style.right = ""),
                "right" == i
                  ? ((u = l.sizer.clientWidth - t.offsetWidth),
                    (t.style.right = "0px"))
                  : ("left" == i
                      ? (u = 0)
                      : "middle" == i &&
                        (u = (l.sizer.clientWidth - t.offsetWidth) / 2),
                    (t.style.left = u + "px")),
                n &&
                  ((o = this),
                  (s = {
                    left: u,
                    top: c,
                    right: u + t.offsetWidth,
                    bottom: c + t.offsetHeight,
                  }),
                  null != (a = Ar(o, s)).scrollTop && Lr(o, a.scrollTop),
                  null != a.scrollLeft && Nr(o, a.scrollLeft));
            },
            triggerOnKeyDown: ti(us),
            triggerOnKeyPress: ti(ds),
            triggerOnKeyUp: hs,
            triggerOnMouseDown: ti(gs),
            execCommand: function (e) {
              if (ts.hasOwnProperty(e)) return ts[e].call(null, this);
            },
            triggerElectric: ti(function (e) {
              Os(this, e);
            }),
            findPosH: function (e, t, n, r) {
              var i = 1;
              t < 0 && ((i = -1), (t = -t));
              for (
                var o = at(this.doc, e), s = 0;
                s < t && !(o = Bs(this.doc, o, i, n, r)).hitSide;
                ++s
              );
              return o;
            },
            moveH: ti(function (e, t) {
              var n = this;
              this.extendSelectionsBy(function (r) {
                return n.display.shift || n.doc.extend || r.empty()
                  ? Bs(n.doc, r.head, e, t, n.options.rtlMoveVisually)
                  : e < 0
                  ? r.from()
                  : r.to();
              }, V);
            }),
            deleteH: ti(function (e, t) {
              var n = this.doc.sel,
                r = this.doc;
              n.somethingSelected()
                ? r.replaceSelection("", null, "+delete")
                : Zo(this, function (n) {
                    var i = Bs(r, n.head, e, t, !1);
                    return e < 0
                      ? { from: i, to: n.head }
                      : { from: n.head, to: i };
                  });
            }),
            findPosV: function (e, t, n, r) {
              var i = 1,
                o = r;
              t < 0 && ((i = -1), (t = -t));
              for (var s = at(this.doc, e), a = 0; a < t; ++a) {
                var l = qn(this, s, "div");
                if (
                  (null == o ? (o = l.left) : (l.left = o),
                  (s = Hs(this, l, i, n)).hitSide)
                )
                  break;
              }
              return s;
            },
            moveV: ti(function (e, t) {
              var n = this,
                r = this.doc,
                i = [],
                o =
                  !this.display.shift && !r.extend && r.sel.somethingSelected();
              if (
                (r.extendSelectionsBy(function (s) {
                  if (o) return e < 0 ? s.from() : s.to();
                  var a = qn(n, s.head, "div");
                  null != s.goalColumn && (a.left = s.goalColumn),
                    i.push(a.left);
                  var l = Hs(n, a, e, t);
                  return (
                    "page" == t &&
                      s == r.sel.primary() &&
                      _r(n, $n(n, l, "div").top - a.top),
                    l
                  );
                }, V),
                i.length)
              )
                for (var s = 0; s < r.sel.ranges.length; s++)
                  r.sel.ranges[s].goalColumn = i[s];
            }),
            findWordAt: function (e) {
              var t = $e(this.doc, e.line).text,
                n = e.ch,
                r = e.ch;
              if (t) {
                var i = this.getHelper(e, "wordChars");
                ("before" != e.sticky && r != t.length) || !n ? ++r : --n;
                for (
                  var o = t.charAt(n),
                    s = ee(o, i)
                      ? function (e) {
                          return ee(e, i);
                        }
                      : /\s/.test(o)
                      ? function (e) {
                          return /\s/.test(e);
                        }
                      : function (e) {
                          return !/\s/.test(e) && !ee(e);
                        };
                  n > 0 && s(t.charAt(n - 1));

                )
                  --n;
                for (; r < t.length && s(t.charAt(r)); ) ++r;
              }
              return new Ei(et(e.line, n), et(e.line, r));
            },
            toggleOverwrite: function (e) {
              (null != e && e == this.state.overwrite) ||
                ((this.state.overwrite = !this.state.overwrite)
                  ? I(this.display.cursorDiv, "CodeMirror-overwrite")
                  : R(this.display.cursorDiv, "CodeMirror-overwrite"),
                fe(this, "overwriteToggle", this, this.state.overwrite));
            },
            hasFocus: function () {
              return this.display.input.getField() == P();
            },
            isReadOnly: function () {
              return !(!this.options.readOnly && !this.doc.cantEdit);
            },
            scrollTo: ti(function (e, t) {
              Pr(this, e, t);
            }),
            getScrollInfo: function () {
              var e = this.display.scroller;
              return {
                left: e.scrollLeft,
                top: e.scrollTop,
                height: e.scrollHeight - Rn(this) - this.display.barHeight,
                width: e.scrollWidth - Rn(this) - this.display.barWidth,
                clientHeight: Dn(this),
                clientWidth: Tn(this),
              };
            },
            scrollIntoView: ti(function (e, t) {
              null == e
                ? ((e = { from: this.doc.sel.primary().head, to: null }),
                  null == t && (t = this.options.cursorScrollMargin))
                : "number" == typeof e
                ? (e = { from: et(e, 0), to: null })
                : null == e.from && (e = { from: e, to: null }),
                e.to || (e.to = e.from),
                (e.margin = t || 0),
                null != e.from.line
                  ? (function (e, t) {
                      Ir(e), (e.curOp.scrollToPos = t);
                    })(this, e)
                  : Or(this, e.from, e.to, e.margin);
            }),
            setSize: ti(function (e, t) {
              var n = this,
                r = function (e) {
                  return "number" == typeof e || /^\d+$/.test(String(e))
                    ? e + "px"
                    : e;
                };
              null != e && (this.display.wrapper.style.width = r(e)),
                null != t && (this.display.wrapper.style.height = r(t)),
                this.options.lineWrapping && Hn(this);
              var i = this.display.viewFrom;
              this.doc.iter(i, this.display.viewTo, function (e) {
                if (e.widgets)
                  for (var t = 0; t < e.widgets.length; t++)
                    if (e.widgets[t].noHScroll) {
                      dr(n, i, "widget");
                      break;
                    }
                ++i;
              }),
                (this.curOp.forceUpdate = !0),
                fe(this, "refresh", this);
            }),
            operation: function (e) {
              return Jr(this, e);
            },
            startOperation: function () {
              return $r(this);
            },
            endOperation: function () {
              return qr(this);
            },
            refresh: ti(function () {
              var e = this.display.cachedTextHeight;
              hr(this),
                (this.curOp.forceUpdate = !0),
                zn(this),
                Pr(this, this.doc.scrollLeft, this.doc.scrollTop),
                ci(this.display),
                (null == e || Math.abs(e - rr(this.display)) > 0.5) && lr(this),
                fe(this, "refresh", this);
            }),
            swapDoc: ti(function (e) {
              var t = this.doc;
              return (
                (t.cm = null),
                this.state.selectingText && this.state.selectingText(),
                Li(this, e),
                zn(this),
                this.display.input.reset(),
                Pr(this, e.scrollLeft, e.scrollTop),
                (this.curOp.forceScroll = !0),
                ln(this, "swapDoc", this, t),
                t
              );
            }),
            phrase: function (e) {
              var t = this.options.phrases;
              return t && Object.prototype.hasOwnProperty.call(t, e) ? t[e] : e;
            },
            getInputField: function () {
              return this.display.input.getField();
            },
            getWrapperElement: function () {
              return this.display.wrapper;
            },
            getScrollerElement: function () {
              return this.display.scroller;
            },
            getGutterElement: function () {
              return this.display.gutters;
            },
          }),
            ve(e),
            (e.registerHelper = function (t, r, i) {
              n.hasOwnProperty(t) || (n[t] = e[t] = { _global: [] }),
                (n[t][r] = i);
            }),
            (e.registerGlobalHelper = function (t, r, i, o) {
              e.registerHelper(t, r, o), n[t]._global.push({ pred: i, val: o });
            });
        })(Ts);
      var $s = "iter insert remove copy getEditor constructor".split(" ");
      for (var qs in Mo.prototype)
        Mo.prototype.hasOwnProperty(qs) &&
          z($s, qs) < 0 &&
          (Ts.prototype[qs] = (function (e) {
            return function () {
              return e.apply(this.doc, arguments);
            };
          })(Mo.prototype[qs]));
      return (
        ve(Mo),
        (Ts.inputStyles = { textarea: Gs, contenteditable: zs }),
        (Ts.defineMode = function (e) {
          Ts.defaults.mode || "null" == e || (Ts.defaults.mode = e),
            Ne.apply(this, arguments);
        }),
        (Ts.defineMIME = function (e, t) {
          Fe[e] = t;
        }),
        Ts.defineMode("null", function () {
          return {
            token: function (e) {
              return e.skipToEnd();
            },
          };
        }),
        Ts.defineMIME("text/plain", "null"),
        (Ts.defineExtension = function (e, t) {
          Ts.prototype[e] = t;
        }),
        (Ts.defineDocExtension = function (e, t) {
          Mo.prototype[e] = t;
        }),
        (Ts.fromTextArea = function (e, t) {
          if (
            (((t = t ? N(t) : {}).value = e.value),
            !t.tabindex && e.tabIndex && (t.tabindex = e.tabIndex),
            !t.placeholder && e.placeholder && (t.placeholder = e.placeholder),
            null == t.autofocus)
          ) {
            var n = P();
            t.autofocus =
              n == e ||
              (null != e.getAttribute("autofocus") && n == document.body);
          }
          function r() {
            e.value = a.getValue();
          }
          var i;
          if (e.form && (he(e.form, "submit", r), !t.leaveSubmitMethodAlone)) {
            var o = e.form;
            i = o.submit;
            try {
              var s = (o.submit = function () {
                r(), (o.submit = i), o.submit(), (o.submit = s);
              });
            } catch (e) {}
          }
          (t.finishInit = function (n) {
            (n.save = r),
              (n.getTextArea = function () {
                return e;
              }),
              (n.toTextArea = function () {
                (n.toTextArea = isNaN),
                  r(),
                  e.parentNode.removeChild(n.getWrapperElement()),
                  (e.style.display = ""),
                  e.form &&
                    (pe(e.form, "submit", r),
                    t.leaveSubmitMethodAlone ||
                      "function" != typeof e.form.submit ||
                      (e.form.submit = i));
              });
          }),
            (e.style.display = "none");
          var a = Ts(function (t) {
            return e.parentNode.insertBefore(t, e.nextSibling);
          }, t);
          return a;
        }),
        (function (e) {
          (e.off = pe),
            (e.on = he),
            (e.wheelEventPixels = bi),
            (e.Doc = Mo),
            (e.splitLines = Me),
            (e.countColumn = B),
            (e.findColumn = G),
            (e.isWordChar = J),
            (e.Pass = U),
            (e.signal = fe),
            (e.Line = $t),
            (e.changeEnd = Ri),
            (e.scrollbarModel = jr),
            (e.Pos = et),
            (e.cmpPos = tt),
            (e.modes = Le),
            (e.mimeModes = Fe),
            (e.resolveMode = Be),
            (e.getMode = He),
            (e.modeExtensions = ze),
            (e.extendMode = Ue),
            (e.copyState = We),
            (e.startState = Ve),
            (e.innerMode = je),
            (e.commands = ts),
            (e.keyMap = jo),
            (e.keyName = Yo),
            (e.isModifierKey = qo),
            (e.lookupKey = $o),
            (e.normalizeKeyMap = Go),
            (e.StringStream = Ge),
            (e.SharedTextMarker = To),
            (e.TextMarker = xo),
            (e.LineWidget = Co),
            (e.e_preventDefault = we),
            (e.e_stopPropagation = be),
            (e.e_stop = Ce),
            (e.addClass = I),
            (e.contains = M),
            (e.rmClass = R),
            (e.keyNames = Ho);
        })(Ts),
        (Ts.version = "5.49.2"),
        Ts
      );
    })();
  },
  function (e, t, n) {
    "use strict";
    !(function e() {
      if (
        "undefined" != typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
        "function" == typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE
      ) {
        0;
        try {
          __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e);
        } catch (e) {
          console.error(e);
        }
      }
    })(),
      (e.exports = n(155));
  },
  function (e, t, n) {
    "use strict";
    (t.__esModule = !0),
      (t.default = function (e, t) {
        if (!(e instanceof t))
          throw new TypeError("Cannot call a class as a function");
      });
  },
  function (e, t, n) {
    "use strict";
    t.__esModule = !0;
    var r,
      i = n(247),
      o = (r = i) && r.__esModule ? r : { default: r };
    t.default = (function () {
      function e(e, t) {
        for (var n = 0; n < t.length; n++) {
          var r = t[n];
          (r.enumerable = r.enumerable || !1),
            (r.configurable = !0),
            "value" in r && (r.writable = !0),
            (0, o.default)(e, r.key, r);
        }
      }
      return function (t, n, r) {
        return n && e(t.prototype, n), r && e(t, r), t;
      };
    })();
  },
  function (e, t, n) {
    "use strict";
    (t.fromCallback = function (e) {
      return Object.defineProperty(
        function () {
          if ("function" != typeof arguments[arguments.length - 1])
            return new Promise((t, n) => {
              (arguments[arguments.length] = (e, r) => {
                if (e) return n(e);
                t(r);
              }),
                arguments.length++,
                e.apply(this, arguments);
            });
          e.apply(this, arguments);
        },
        "name",
        { value: e.name }
      );
    }),
      (t.fromPromise = function (e) {
        return Object.defineProperty(
          function () {
            const t = arguments[arguments.length - 1];
            if ("function" != typeof t) return e.apply(this, arguments);
            e.apply(this, arguments).then((e) => t(null, e), t);
          },
          "name",
          { value: e.name }
        );
      });
  },
  function (e, t) {
    e.exports = require("os");
  },
  function (e, t, n) {
    "use strict";
    t.__esModule = !0;
    var r,
      i = n(59),
      o = (r = i) && r.__esModule ? r : { default: r };
    t.default =
      o.default ||
      function (e) {
        for (var t = 1; t < arguments.length; t++) {
          var n = arguments[t];
          for (var r in n)
            Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
        }
        return e;
      };
  },
  function (e, t, n) {
    "use strict";
    const r = (0, n(18).fromCallback)(n(176)),
      i = n(177);
    e.exports = {
      mkdirs: r,
      mkdirsSync: i,
      mkdirp: r,
      mkdirpSync: i,
      ensureDir: r,
      ensureDirSync: i,
    };
  },
  function (e, t) {
    var n = (e.exports = { version: "2.5.1" });
    "number" == typeof __e && (__e = n);
  },
  function (e, t, n) {
    "use strict";
    t.__esModule = !0;
    var r,
      i = n(116),
      o = (r = i) && r.__esModule ? r : { default: r };
    t.default = function (e, t) {
      if (!e)
        throw new ReferenceError(
          "this hasn't been initialised - super() hasn't been called"
        );
      return !t ||
        ("object" !== (void 0 === t ? "undefined" : (0, o.default)(t)) &&
          "function" != typeof t)
        ? e
        : t;
    };
  },
  function (e, t, n) {
    "use strict";
    const r = n(18).fromPromise,
      i = n(99);
    e.exports = {
      pathExists: r(function (e) {
        return i
          .access(e)
          .then(() => !0)
          .catch(() => !1);
      }),
      pathExistsSync: i.existsSync,
    };
  },
  ,
  function (e, t) {
    var n = (e.exports =
      "undefined" != typeof window && window.Math == Math
        ? window
        : "undefined" != typeof self && self.Math == Math
        ? self
        : Function("return this")());
    "number" == typeof __g && (__g = n);
  },
  function (e, t, n) {
    e.exports = { default: n(245), __esModule: !0 };
  },
  function (e, t, n) {
    "use strict";
    t.__esModule = !0;
    var r = s(n(271)),
      i = s(n(275)),
      o = s(n(116));
    function s(e) {
      return e && e.__esModule ? e : { default: e };
    }
    t.default = function (e, t) {
      if ("function" != typeof t && null !== t)
        throw new TypeError(
          "Super expression must either be null or a function, not " +
            (void 0 === t ? "undefined" : (0, o.default)(t))
        );
      (e.prototype = (0, i.default)(t && t.prototype, {
        constructor: {
          value: e,
          enumerable: !1,
          writable: !0,
          configurable: !0,
        },
      })),
        t && (r.default ? (0, r.default)(e, t) : (e.__proto__ = t));
    };
  },
  function (e, t, n) {
    var r = n(26),
      i = n(22),
      o = n(109),
      s = n(34),
      a = function (e, t, n) {
        var l,
          c,
          u,
          h = e & a.F,
          d = e & a.G,
          p = e & a.S,
          f = e & a.P,
          m = e & a.B,
          g = e & a.W,
          y = d ? i : i[t] || (i[t] = {}),
          v = y.prototype,
          w = d ? r : p ? r[t] : (r[t] || {}).prototype;
        for (l in (d && (n = t), n))
          ((c = !h && w && void 0 !== w[l]) && l in y) ||
            ((u = c ? w[l] : n[l]),
            (y[l] =
              d && "function" != typeof w[l]
                ? n[l]
                : m && c
                ? o(u, r)
                : g && w[l] == u
                ? (function (e) {
                    var t = function (t, n, r) {
                      if (this instanceof e) {
                        switch (arguments.length) {
                          case 0:
                            return new e();
                          case 1:
                            return new e(t);
                          case 2:
                            return new e(t, n);
                        }
                        return new e(t, n, r);
                      }
                      return e.apply(this, arguments);
                    };
                    return (t.prototype = e.prototype), t;
                  })(u)
                : f && "function" == typeof u
                ? o(Function.call, u)
                : u),
            f &&
              (((y.virtual || (y.virtual = {}))[l] = u),
              e & a.R && v && !v[l] && s(v, l, u)));
      };
    (a.F = 1),
      (a.G = 2),
      (a.S = 4),
      (a.P = 8),
      (a.B = 16),
      (a.W = 32),
      (a.U = 64),
      (a.R = 128),
      (e.exports = a);
  },
  function (e, t, n) {
    var r = n(40),
      i = n(110),
      o = n(66),
      s = Object.defineProperty;
    t.f = n(31)
      ? Object.defineProperty
      : function (e, t, n) {
          if ((r(e), (t = o(t, !0)), r(n), i))
            try {
              return s(e, t, n);
            } catch (e) {}
          if ("get" in n || "set" in n)
            throw TypeError("Accessors not supported!");
          return "value" in n && (e[t] = n.value), e;
        };
  },
  function (e, t, n) {
    e.exports = !n(35)(function () {
      return (
        7 !=
        Object.defineProperty({}, "a", {
          get: function () {
            return 7;
          },
        }).a
      );
    });
  },
  function (e, t) {
    var n = {}.hasOwnProperty;
    e.exports = function (e, t) {
      return n.call(e, t);
    };
  },
  function (e, t, n) {
    var r = n(113),
      i = n(67);
    e.exports = function (e) {
      return r(i(e));
    };
  },
  function (e, t, n) {
    var r = n(30),
      i = n(51);
    e.exports = n(31)
      ? function (e, t, n) {
          return r.f(e, t, i(1, n));
        }
      : function (e, t, n) {
          return (e[t] = n), e;
        };
  },
  function (e, t) {
    e.exports = function (e) {
      try {
        return !!e();
      } catch (e) {
        return !0;
      }
    };
  },
  function (e, t, n) {
    var r = n(70)("wks"),
      i = n(52),
      o = n(26).Symbol,
      s = "function" == typeof o;
    (e.exports = function (e) {
      return r[e] || (r[e] = (s && o[e]) || (s ? o : i)("Symbol." + e));
    }).store = r;
  },
  function (e, t, n) {
    var r = n(47),
      i = n(39),
      o = n(227);
    function s(e, t) {
      if (!e) throw new Error("expected readStream");
      if (!e.readable) throw new Error("readStream must be readable");
      var n = new a(t);
      return e.pipe(n), n;
    }
    function a(e) {
      r.Transform.call(this, e),
        (e = e || {}),
        (this._readableState.objectMode = !0),
        (this._lineBuffer = []),
        (this._keepEmptyLines = e.keepEmptyLines || !1),
        (this._lastChunkEndedWithCR = !1);
      var t = this;
      this.on("pipe", function (e) {
        t.encoding ||
          (e instanceof r.Readable && (t.encoding = e._readableState.encoding));
      });
    }
    (e.exports = function (t, n) {
      return e.exports.createStream(t, n);
    }),
      (e.exports.createStream = function (e, t) {
        return e ? s(e, t) : new a(t);
      }),
      (e.exports.createLineStream = function (e) {
        return (
          console.log(
            "WARNING: byline#createLineStream is deprecated and will be removed soon"
          ),
          s(e)
        );
      }),
      (e.exports.LineStream = a),
      i.inherits(a, r.Transform),
      (a.prototype._transform = function (e, t, n) {
        (t = t || "utf8"),
          Buffer.isBuffer(e) &&
            ("buffer" == t
              ? ((e = e.toString()), (t = "utf8"))
              : (e = e.toString(t))),
          (this._chunkEncoding = t);
        var r = e.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/g);
        this._lastChunkEndedWithCR && "\n" == e[0] && r.shift(),
          this._lineBuffer.length > 0 &&
            ((this._lineBuffer[this._lineBuffer.length - 1] += r[0]),
            r.shift()),
          (this._lastChunkEndedWithCR = "\r" == e[e.length - 1]),
          (this._lineBuffer = this._lineBuffer.concat(r)),
          this._pushBuffer(t, 1, n);
      }),
      (a.prototype._pushBuffer = function (e, t, n) {
        for (; this._lineBuffer.length > t; ) {
          var r = this._lineBuffer.shift();
          if (
            (this._keepEmptyLines || r.length > 0) &&
            !this.push(this._reencode(r, e))
          ) {
            var i = this;
            return void o.setImmediate(function () {
              i._pushBuffer(e, t, n);
            });
          }
        }
        n();
      }),
      (a.prototype._flush = function (e) {
        this._pushBuffer(this._chunkEncoding, 0, e);
      }),
      (a.prototype._reencode = function (e, t) {
        return this.encoding && this.encoding != t
          ? new Buffer(e, t).toString(this.encoding)
          : this.encoding
          ? e
          : new Buffer(e, t);
      });
  },
  function (e, t) {
    t.getArg = function (e, t, n) {
      if (t in e) return e[t];
      if (3 === arguments.length) return n;
      throw new Error('"' + t + '" is a required argument.');
    };
    var n = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,
      r = /^data:.+\,.+$/;
    function i(e) {
      var t = e.match(n);
      return t
        ? { scheme: t[1], auth: t[2], host: t[3], port: t[4], path: t[5] }
        : null;
    }
    function o(e) {
      var t = "";
      return (
        e.scheme && (t += e.scheme + ":"),
        (t += "//"),
        e.auth && (t += e.auth + "@"),
        e.host && (t += e.host),
        e.port && (t += ":" + e.port),
        e.path && (t += e.path),
        t
      );
    }
    function s(e) {
      var n = e,
        r = i(e);
      if (r) {
        if (!r.path) return e;
        n = r.path;
      }
      for (
        var s, a = t.isAbsolute(n), l = n.split(/\/+/), c = 0, u = l.length - 1;
        u >= 0;
        u--
      )
        "." === (s = l[u])
          ? l.splice(u, 1)
          : ".." === s
          ? c++
          : c > 0 &&
            ("" === s ? (l.splice(u + 1, c), (c = 0)) : (l.splice(u, 2), c--));
      return (
        "" === (n = l.join("/")) && (n = a ? "/" : "."),
        r ? ((r.path = n), o(r)) : n
      );
    }
    (t.urlParse = i),
      (t.urlGenerate = o),
      (t.normalize = s),
      (t.join = function (e, t) {
        "" === e && (e = "."), "" === t && (t = ".");
        var n = i(t),
          a = i(e);
        if ((a && (e = a.path || "/"), n && !n.scheme))
          return a && (n.scheme = a.scheme), o(n);
        if (n || t.match(r)) return t;
        if (a && !a.host && !a.path) return (a.host = t), o(a);
        var l = "/" === t.charAt(0) ? t : s(e.replace(/\/+$/, "") + "/" + t);
        return a ? ((a.path = l), o(a)) : l;
      }),
      (t.isAbsolute = function (e) {
        return "/" === e.charAt(0) || !!e.match(n);
      }),
      (t.relative = function (e, t) {
        "" === e && (e = "."), (e = e.replace(/\/$/, ""));
        for (var n = 0; 0 !== t.indexOf(e + "/"); ) {
          var r = e.lastIndexOf("/");
          if (r < 0) return t;
          if ((e = e.slice(0, r)).match(/^([^\/]+:\/)?\/*$/)) return t;
          ++n;
        }
        return Array(n + 1).join("../") + t.substr(e.length + 1);
      });
    var a = !("__proto__" in Object.create(null));
    function l(e) {
      return e;
    }
    function c(e) {
      if (!e) return !1;
      var t = e.length;
      if (t < 9) return !1;
      if (
        95 !== e.charCodeAt(t - 1) ||
        95 !== e.charCodeAt(t - 2) ||
        111 !== e.charCodeAt(t - 3) ||
        116 !== e.charCodeAt(t - 4) ||
        111 !== e.charCodeAt(t - 5) ||
        114 !== e.charCodeAt(t - 6) ||
        112 !== e.charCodeAt(t - 7) ||
        95 !== e.charCodeAt(t - 8) ||
        95 !== e.charCodeAt(t - 9)
      )
        return !1;
      for (var n = t - 10; n >= 0; n--) if (36 !== e.charCodeAt(n)) return !1;
      return !0;
    }
    function u(e, t) {
      return e === t ? 0 : e > t ? 1 : -1;
    }
    (t.toSetString = a
      ? l
      : function (e) {
          return c(e) ? "$" + e : e;
        }),
      (t.fromSetString = a
        ? l
        : function (e) {
            return c(e) ? e.slice(1) : e;
          }),
      (t.compareByOriginalPositions = function (e, t, n) {
        var r = e.source - t.source;
        return 0 !== r ||
          0 !== (r = e.originalLine - t.originalLine) ||
          0 !== (r = e.originalColumn - t.originalColumn) ||
          n ||
          0 !== (r = e.generatedColumn - t.generatedColumn) ||
          0 !== (r = e.generatedLine - t.generatedLine)
          ? r
          : e.name - t.name;
      }),
      (t.compareByGeneratedPositionsDeflated = function (e, t, n) {
        var r = e.generatedLine - t.generatedLine;
        return 0 !== r ||
          0 !== (r = e.generatedColumn - t.generatedColumn) ||
          n ||
          0 !== (r = e.source - t.source) ||
          0 !== (r = e.originalLine - t.originalLine) ||
          0 !== (r = e.originalColumn - t.originalColumn)
          ? r
          : e.name - t.name;
      }),
      (t.compareByGeneratedPositionsInflated = function (e, t) {
        var n = e.generatedLine - t.generatedLine;
        return 0 !== n ||
          0 !== (n = e.generatedColumn - t.generatedColumn) ||
          0 !== (n = u(e.source, t.source)) ||
          0 !== (n = e.originalLine - t.originalLine) ||
          0 !== (n = e.originalColumn - t.originalColumn)
          ? n
          : u(e.name, t.name);
      });
  },
  function (e, t) {
    e.exports = require("util");
  },
  function (e, t, n) {
    var r = n(41);
    e.exports = function (e) {
      if (!r(e)) throw TypeError(e + " is not an object!");
      return e;
    };
  },
  function (e, t) {
    e.exports = function (e) {
      return "object" == typeof e ? null !== e : "function" == typeof e;
    };
  },
  function (e, t, n) {
    var r = n(112),
      i = n(71);
    e.exports =
      Object.keys ||
      function (e) {
        return r(e, i);
      };
  },
  function (e, t, n) {
    e.exports = n(278)();
  },
  function (e, t, n) {
    "use strict";
    n.r(t),
      n.d(t, "start", function () {
        return o;
      }),
      n.d(t, "stop", function () {
        return s;
      }),
      n.d(t, "measure", function () {
        return a;
      });
    let r = !1,
      i = 0;
    function o() {
      r = !0;
    }
    function s() {
      r = !1;
    }
    async function a(e, t) {
      const n = ++i,
        o = performance && performance.now ? performance.now() : null;
      !(function (e, t) {
        if (!r) return;
        const n = `${e}::${t}`;
        performance.mark(n);
      })(n, e);
      try {
        return await t();
      } finally {
        if (o) {
          const t = performance.now() - o;
          if (t > 1e3) {
            const n = (t / 1e3).toFixed(3);
            log.info(`Executing ${e} (took ${n}s)`);
          }
        }
        !(function (e, t) {
          if (!r) return;
          const n = `${e}::${t}`,
            i = t;
          performance.measure(i, n),
            performance.clearMarks(n),
            performance.clearMeasures(i);
        })(n, e);
      }
    }
  },
  ,
  function (e, t) {
    e.exports = function (e) {
      return (
        e.webpackPolyfill ||
          ((e.deprecate = function () {}),
          (e.paths = []),
          e.children || (e.children = []),
          Object.defineProperty(e, "loaded", {
            enumerable: !0,
            get: function () {
              return e.l;
            },
          }),
          Object.defineProperty(e, "id", {
            enumerable: !0,
            get: function () {
              return e.i;
            },
          }),
          (e.webpackPolyfill = 1)),
        e
      );
    };
  },
  function (e, t) {
    e.exports = require("stream");
  },
  function (e, t) {
    e.exports = require("assert");
  },
  function (e, t, n) {
    "use strict";
    const r = n(18).fromCallback,
      i = n(180);
    e.exports = { remove: r(i), removeSync: i.sync };
  },
  function (e, t, n) {
    e.exports = n(236)();
  },
  function (e, t) {
    e.exports = function (e, t) {
      return {
        enumerable: !(1 & e),
        configurable: !(2 & e),
        writable: !(4 & e),
        value: t,
      };
    };
  },
  function (e, t) {
    var n = 0,
      r = Math.random();
    e.exports = function (e) {
      return "Symbol(".concat(
        void 0 === e ? "" : e,
        ")_",
        (++n + r).toString(36)
      );
    };
  },
  function (e, t) {
    t.f = {}.propertyIsEnumerable;
  },
  function (e, t, n) {
    var r = n(67);
    e.exports = function (e) {
      return Object(r(e));
    };
  },
  function (e, t) {
    e.exports = function (e) {
      return e && e.__esModule ? e : { default: e };
    };
  },
  function (e, t) {
    (function () {
      var e, n, r, i, o, s, a, l, c, u, h, d, p, f, m, g;
      (t.score = function (e, t, r) {
        var i, s, a;
        return (
          (i = r.preparedQuery),
          r.allowErrors || o(e, i.core_lw, i.core_up)
            ? ((a = e.toLowerCase()), (s = n(e, a, i)), Math.ceil(s))
            : 0
        );
      }),
        (t.isMatch = o = function (e, t, n) {
          var r, i, o, s, a, l, c;
          if (((o = e.length), (s = t.length), !o || s > o)) return !1;
          for (r = -1, i = -1; ++i < s; ) {
            for (
              a = t.charCodeAt(i), l = n.charCodeAt(i);
              ++r < o && (c = e.charCodeAt(r)) !== a && c !== l;

            );
            if (r === o) return !1;
          }
          return !0;
        }),
        (t.computeScore = n = function (e, t, n) {
          var r,
            i,
            o,
            s,
            a,
            f,
            m,
            y,
            v,
            w,
            b,
            S,
            C,
            E,
            k,
            x,
            R,
            T,
            D,
            A,
            _,
            M,
            P,
            I;
          if (
            ((k = n.query),
            (x = n.query_lw),
            (w = e.length),
            (C = k.length),
            (i = (r = c(e, t, k, x)).score),
            r.count === C)
          )
            return d(C, w, i, r.pos);
          if ((E = t.indexOf(x)) > -1) return p(e, t, k, x, E, C, w);
          for (
            A = new Array(C),
              a = new Array(C),
              I = g(C, w),
              S = b = Math.ceil(0.75 * C) + 5,
              m = !0,
              v = -1;
            ++v < C;

          )
            (A[v] = 0), (a[v] = 0);
          for (y = -1; ++y < w; )
            if (!(M = t[y]).charCodeAt(0) in n.charCodes) {
              if (m) {
                for (v = -1; ++v < C; ) a[v] = 0;
                m = !1;
              }
            } else
              for (T = 0, D = 0, s = 0, R = !0, m = !0, v = -1; ++v < C; ) {
                if (((_ = A[v]) > T && (T = _), (f = 0), x[v] === M))
                  if (
                    ((P = l(y, e, t)),
                    (f = s > 0 ? s : h(e, t, k, x, y, v, P)),
                    (o = D + u(y, v, P, i, f)) > T)
                  )
                    (T = o), (S = b);
                  else {
                    if (R && --S <= 0) return Math.max(T, A[C - 1]) * I;
                    R = !1;
                  }
                (D = _), (s = a[v]), (a[v] = f), (A[v] = T);
              }
          return (T = A[C - 1]) * I;
        }),
        (t.isWordStart = l = function (e, t, n) {
          var r, i;
          return (
            0 === e ||
            ((r = t[e]), (i = t[e - 1]), s(i) || (r !== n[e] && i === n[e - 1]))
          );
        }),
        (t.isWordEnd = a = function (e, t, n, r) {
          var i, o;
          return (
            e === r - 1 ||
            ((i = t[e]), (o = t[e + 1]), s(o) || (i === n[e] && o !== n[e + 1]))
          );
        }),
        (s = function (e) {
          return (
            " " === e ||
            "." === e ||
            "-" === e ||
            "_" === e ||
            "/" === e ||
            "\\" === e
          );
        }),
        (m = function (e) {
          var t;
          return e < 20 ? 100 + (t = 20 - e) * t : Math.max(120 - e, 0);
        }),
        (t.scoreSize = g = function (e, t) {
          return 150 / (150 + Math.abs(t - e));
        }),
        (d = function (e, t, n, r) {
          return 2 * e * (150 * n + m(r)) * g(e, t);
        }),
        (t.scorePattern = f = function (e, t, n, r, i) {
          var o, s;
          return (
            (s = e),
            (o = 6),
            n === e && (o += 2),
            r && (o += 3),
            i && (o += 1),
            e === t && (r && (s += n === t ? 2 : 1), i && (o += 1)),
            n + s * (s + o)
          );
        }),
        (t.scoreCharacter = u = function (e, t, n, r, i) {
          var o;
          return (o = m(e)), n ? o + 150 * ((r > i ? r : i) + 10) : o + 150 * i;
        }),
        (t.scoreConsecutives = h = function (e, t, n, r, i, o, s) {
          var l, c, u, h, d, p, m;
          for (
            l = (u = (c = e.length) - i) < (d = (h = n.length) - o) ? u : d,
              p = 0,
              m = 0,
              n[o] === e[i] && p++;
            ++m < l && r[++o] === t[++i];

          )
            n[o] === e[i] && p++;
          return (
            m < l && i--, 1 === m ? 1 + 2 * p : f(m, h, p, s, a(i, e, t, c))
          );
        }),
        (t.scoreExactMatch = p = function (e, t, n, r, i, o, s) {
          var c, u, h, p, m;
          for (
            (m = l(i, e, t)) ||
              ((h = t.indexOf(r, i + 1)) > -1 && (m = l(h, e, t)) && (i = h)),
              u = -1,
              p = 0;
            ++u < o;

          )
            n[i + u] === e[u] && p++;
          return (c = a(i + o - 1, e, t, s)), d(o, s, f(o, o, p, m, c), i);
        }),
        (r = new (e = function (e, t, n) {
          (this.score = e), (this.pos = t), (this.count = n);
        })(0, 0.1, 0)),
        (t.scoreAcronyms = c = function (t, n, o, a) {
          var c, u, h, d, p, m, g, y, v, w, b;
          if (((p = t.length), (m = o.length), !(p > 1 && m > 1))) return r;
          for (c = 0, w = 0, b = 0, y = 0, h = -1, d = -1; ++d < m; ) {
            if (((g = a[d]), s(g))) {
              if ((h = n.indexOf(g, h + 1)) > -1) {
                w++;
                continue;
              }
              break;
            }
            for (; ++h < p; )
              if (g === n[h] && l(h, t, n)) {
                o[d] === t[h] && y++, (b += h), c++;
                break;
              }
            if (h === p) break;
          }
          return c < 2
            ? r
            : ((u = c === m && i(t, n, o, c)),
              (v = f(c, m, y, !0, u)),
              new e(v, b / c, c + w));
        }),
        (i = function (e, t, n, r) {
          var i, o, s;
          if (((i = 0), (s = e.length) > 12 * n.length)) return !1;
          for (o = -1; ++o < s; ) if (l(o, e, t) && ++i > r) return !1;
          return !0;
        });
    }.call(this));
  },
  function (e, t) {
    e.exports = require("crypto");
  },
  function (e, t, n) {
    "use strict";
    n(197);
    const r = async (e) => {
      throw new Error("macOS only");
    };
    (e.exports = r),
      (e.exports.default = r),
      (e.exports.sync = (e) => {
        throw new Error("macOS only");
      });
  },
  function (e, t, n) {
    e.exports = { default: n(238), __esModule: !0 };
  },
  function (e, t, n) {
    var r = n(226);
    function i(e, t) {
      if (!e || e.length <= 0) throw new Error(t + " is required.");
    }
    e.exports = {
      getPassword: function (e, t) {
        return i(e, "Service"), i(t, "Account"), r.getPassword(e, t);
      },
      setPassword: function (e, t, n) {
        return (
          i(e, "Service"),
          i(t, "Account"),
          i(n, "Password"),
          r.setPassword(e, t, n)
        );
      },
      deletePassword: function (e, t) {
        return i(e, "Service"), i(t, "Account"), r.deletePassword(e, t);
      },
      findPassword: function (e) {
        return i(e, "Service"), r.findPassword(e);
      },
      findCredentials: function (e) {
        return i(e, "Service"), r.findCredentials(e);
      },
    };
  },
  function (e, t, n) {
    const r = n(8),
      { spawn: i, spawnSync: o } = n(7),
      s = (n(65), n(304)),
      a = e.exports;
    function l(e, t) {
      return (n) =>
        t(0 === n ? null : new Error(e + " failed with exit status " + n));
    }
    (a.testMode = !1),
      Object.assign(a, {
        symlink(e, t, n) {
          s.spawnAsAdmin(
            "cmd",
            ["/c", "mklink", "/j", t, e],
            a.testMode,
            l("mklink", n)
          );
        },
        unlink(e, t) {
          r.stat(e, (n, r) => {
            if (n) return t(n);
            r.isDirectory()
              ? s.spawnAsAdmin(
                  "cmd",
                  ["/c", "rmdir", "/s", "/q", e],
                  a.testMode,
                  l("rmdir", t)
                )
              : s.spawnAsAdmin(
                  "cmd",
                  ["/c", "del", "/f", "/q", e],
                  a.testMode,
                  l("del", t)
                );
          });
        },
        makeTree(e, t) {
          s.spawnAsAdmin("cmd", ["/c", "mkdir", e], a.testMode, l("mkdir", t));
        },
        recursiveCopy(e, t, n) {
          s.spawnAsAdmin(
            "cmd",
            ["/c", 305, e, t],
            a.testMode,
            l("robocopy", n)
          );
        },
      });
  },
  function (e, t, n) {
    "use strict";
    /*
object-assign
(c) Sindre Sorhus
@license MIT
*/ var r =
        Object.getOwnPropertySymbols,
      i = Object.prototype.hasOwnProperty,
      o = Object.prototype.propertyIsEnumerable;
    function s(e) {
      if (null == e)
        throw new TypeError(
          "Object.assign cannot be called with null or undefined"
        );
      return Object(e);
    }
    e.exports = (function () {
      try {
        if (!Object.assign) return !1;
        var e = new String("abc");
        if (((e[5] = "de"), "5" === Object.getOwnPropertyNames(e)[0]))
          return !1;
        for (var t = {}, n = 0; n < 10; n++)
          t["_" + String.fromCharCode(n)] = n;
        if (
          "0123456789" !==
          Object.getOwnPropertyNames(t)
            .map(function (e) {
              return t[e];
            })
            .join("")
        )
          return !1;
        var r = {};
        return (
          "abcdefghijklmnopqrst".split("").forEach(function (e) {
            r[e] = e;
          }),
          "abcdefghijklmnopqrst" === Object.keys(Object.assign({}, r)).join("")
        );
      } catch (e) {
        return !1;
      }
    })()
      ? Object.assign
      : function (e, t) {
          for (var n, a, l = s(e), c = 1; c < arguments.length; c++) {
            for (var u in (n = Object(arguments[c])))
              i.call(n, u) && (l[u] = n[u]);
            if (r) {
              a = r(n);
              for (var h = 0; h < a.length; h++)
                o.call(n, a[h]) && (l[a[h]] = n[a[h]]);
            }
          }
          return l;
        };
  },
  function (e, t) {
    (function () {
      e.exports = (function () {
        function e(e) {
          this.disposalAction = e;
        }
        return (
          (e.prototype.disposed = !1),
          (e.isDisposable = function (e) {
            return "function" == typeof (null != e ? e.dispose : void 0);
          }),
          (e.prototype.dispose = function () {
            this.disposed ||
              ((this.disposed = !0),
              "function" == typeof this.disposalAction && this.disposalAction(),
              (this.disposalAction = null));
          }),
          e
        );
      })();
    }.call(this));
  },
  function (e, t, n) {
    "use strict";
    const r = n(18).fromCallback,
      i = n(188);
    e.exports = {
      readJson: r(i.readFile),
      readJsonSync: i.readFileSync,
      writeJson: r(i.writeFile),
      writeJsonSync: i.writeFileSync,
    };
  },
  function (e, t) {
    e.exports = require("events");
  },
  function (e, t, n) {
    var r = n(41);
    e.exports = function (e, t) {
      if (!r(e)) return e;
      var n, i;
      if (t && "function" == typeof (n = e.toString) && !r((i = n.call(e))))
        return i;
      if ("function" == typeof (n = e.valueOf) && !r((i = n.call(e)))) return i;
      if (!t && "function" == typeof (n = e.toString) && !r((i = n.call(e))))
        return i;
      throw TypeError("Can't convert object to primitive value");
    };
  },
  function (e, t) {
    e.exports = function (e) {
      if (null == e) throw TypeError("Can't call method on  " + e);
      return e;
    };
  },
  function (e, t) {
    var n = Math.ceil,
      r = Math.floor;
    e.exports = function (e) {
      return isNaN((e = +e)) ? 0 : (e > 0 ? r : n)(e);
    };
  },
  function (e, t, n) {
    var r = n(70)("keys"),
      i = n(52);
    e.exports = function (e) {
      return r[e] || (r[e] = i(e));
    };
  },
  function (e, t, n) {
    var r = n(26),
      i = r["__core-js_shared__"] || (r["__core-js_shared__"] = {});
    e.exports = function (e) {
      return i[e] || (i[e] = {});
    };
  },
  function (e, t) {
    e.exports = "constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(
      ","
    );
  },
  function (e, t) {
    t.f = Object.getOwnPropertySymbols;
  },
  function (e, t, n) {
    var r = n(29),
      i = n(22),
      o = n(35);
    e.exports = function (e, t) {
      var n = (i.Object || {})[e] || Object[e],
        s = {};
      (s[e] = t(n)),
        r(
          r.S +
            r.F *
              o(function () {
                n(1);
              }),
          "Object",
          s
        );
    };
  },
  function (e, t) {
    e.exports = !0;
  },
  function (e, t) {
    e.exports = {};
  },
  function (e, t, n) {
    var r = n(40),
      i = n(255),
      o = n(71),
      s = n(69)("IE_PROTO"),
      a = function () {},
      l = function () {
        var e,
          t = n(111)("iframe"),
          r = o.length;
        for (
          t.style.display = "none",
            n(256).appendChild(t),
            t.src = "javascript:",
            (e = t.contentWindow.document).open(),
            e.write("<script>document.F=Object</script>"),
            e.close(),
            l = e.F;
          r--;

        )
          delete l.prototype[o[r]];
        return l();
      };
    e.exports =
      Object.create ||
      function (e, t) {
        var n;
        return (
          null !== e
            ? ((a.prototype = r(e)),
              (n = new a()),
              (a.prototype = null),
              (n[s] = e))
            : (n = l()),
          void 0 === t ? n : i(n, t)
        );
      };
  },
  function (e, t, n) {
    var r = n(30).f,
      i = n(32),
      o = n(36)("toStringTag");
    e.exports = function (e, t, n) {
      e &&
        !i((e = n ? e : e.prototype), o) &&
        r(e, o, { configurable: !0, value: t });
    };
  },
  function (e, t, n) {
    t.f = n(36);
  },
  function (e, t, n) {
    var r = n(26),
      i = n(22),
      o = n(74),
      s = n(78),
      a = n(30).f;
    e.exports = function (e) {
      var t = i.Symbol || (i.Symbol = o ? {} : r.Symbol || {});
      "_" == e.charAt(0) || e in t || a(t, e, { value: s.f(e) });
    };
  },
  function (e, t, n) {
    var r = n(53),
      i = n(51),
      o = n(33),
      s = n(66),
      a = n(32),
      l = n(110),
      c = Object.getOwnPropertyDescriptor;
    t.f = n(31)
      ? c
      : function (e, t) {
          if (((e = o(e)), (t = s(t, !0)), l))
            try {
              return c(e, t);
            } catch (e) {}
          if (a(e, t)) return i(!r.f.call(e, t), e[t]);
        };
  },
  function (e, t, n) {
    "use strict";
    (t.__esModule = !0), (t.default = void 0);
    var r = !(
      "undefined" == typeof window ||
      !window.document ||
      !window.document.createElement
    );
    (t.default = r), (e.exports = t.default);
  },
  function (e, t, n) {
    (function () {
      var e, r, i, o, s, a, l;
      (l = n(56)),
        (o = l.isMatch),
        (e = l.computeScore),
        (a = l.scoreSize),
        (t.score = function (t, n, r) {
          var i, a, l;
          return (
            (i = r.preparedQuery),
            r.allowErrors || o(t, i.core_lw, i.core_up)
              ? ((l = t.toLowerCase()),
                (a = e(t, l, i)),
                (a = s(t, l, a, r)),
                Math.ceil(a))
              : 0
          );
        }),
        (s = function (t, n, o, s) {
          var l, c, u, h, d, p, f, m, g, y;
          if (0 === o) return 0;
          for (
            g = s.preparedQuery,
              y = s.useExtensionBonus,
              m = s.pathSeparator,
              d = t.length - 1;
            t[d] === m;

          )
            d--;
          if (
            ((f = d - (u = t.lastIndexOf(m, d))),
            (p = 1),
            y && (o *= p += i(n, g.ext, u, d, 2)),
            -1 === u)
          )
            return o;
          for (h = g.depth; u > -1 && h-- > 0; ) u = t.lastIndexOf(m, u - 1);
          return (
            (c =
              -1 === u
                ? o
                : p * e(t.slice(u + 1, d + 1), n.slice(u + 1, d + 1), g)),
            (l = 10 / (20 + r(t, d + 1, m))) * c + (1 - l) * o * a(0, 2.5 * f)
          );
        }),
        (t.countDir = r = function (e, t, n) {
          var r, i;
          if (t < 1) return 0;
          for (r = 0, i = -1; ++i < t && e[i] === n; );
          for (; ++i < t; ) if (e[i] === n) for (r++; ++i < t && e[i] === n; );
          return r;
        }),
        (t.getExtension = function (e) {
          var t;
          return (t = e.lastIndexOf(".")) < 0 ? "" : e.substr(t + 1);
        }),
        (i = function (e, t, n, r, o) {
          var s, a, l, c;
          if (!t.length) return 0;
          if (!((c = e.lastIndexOf(".", r)) > n)) return 0;
          for (
            (s = r - c) < (l = t.length) && ((l = s), (s = t.length)),
              c++,
              a = -1;
            ++a < l && e[c + a] === t[a];

          );
          return 0 === a && o > 0 ? 0.9 * i(e, t, n, c - 2, o - 1) : a / s;
        });
    }.call(this));
  },
  function (e, t, n) {
    e.exports = n(294)();
  },
  function (e, t, n) {
    var r = n(92),
      i = n(93);
    e.exports = function (e, t, n) {
      var o = (t && n) || 0;
      "string" == typeof e &&
        ((t = "binary" == e ? new Array(16) : null), (e = null));
      var s = (e = e || {}).random || (e.rng || r)();
      if (((s[6] = (15 & s[6]) | 64), (s[8] = (63 & s[8]) | 128), t))
        for (var a = 0; a < 16; ++a) t[o + a] = s[a];
      return t || i(s);
    };
  },
  function (e, t, n) {
    "use strict";
    const r = n(232),
      i = n(233),
      o = n(234),
      s = new WeakMap(),
      a = (...e) => {
        if (0 === e.length) return "__defaultKey";
        if (1 === e.length) {
          const [t] = e;
          if (null == t || ("function" != typeof t && "object" != typeof t))
            return t;
        }
        return JSON.stringify(e);
      },
      l = (e, t) => {
        "number" ==
          typeof (t = Object.assign(
            { cacheKey: a, cache: new Map(), cachePromiseRejection: !1 },
            t
          )).maxAge && o(t.cache);
        const { cache: n } = t;
        t.maxAge = t.maxAge || 0;
        const l = function (...r) {
          const o = t.cacheKey(...r);
          if (n.has(o)) return n.get(o).data;
          const s = e.call(this, ...r);
          return (
            ((e, r) => {
              n.set(e, { data: r, maxAge: Date.now() + t.maxAge });
            })(o, s),
            i(s) &&
              !1 === t.cachePromiseRejection &&
              s.catch(() => n.delete(o)),
            s
          );
        };
        try {
          r(l, e);
        } catch (e) {}
        return s.set(l, t.cache), l;
      };
    (e.exports = l),
      (e.exports.default = l),
      (e.exports.clear = (e) => {
        const t = s.get(e);
        t && "function" == typeof t.clear && t.clear();
      });
  },
  function (e, t, n) {
    e.exports = { default: n(282), __esModule: !0 };
  },
  function (e, t, n) {
    (function () {
      var t, r, i, o, s, a, l, c;
      (i = n(284)),
        (o = n(285)),
        (c = n(56)),
        (a = n(82)),
        (t = n(120)),
        (l = null),
        (r =
          "win32" ===
          ("undefined" != typeof process && null !== process ? "win32" : void 0)
            ? "\\"
            : "/"),
        (e.exports = {
          filter: function (e, t, n) {
            return (
              null == n && (n = {}),
              (null != t ? t.length : void 0) && (null != e ? e.length : void 0)
                ? ((n = s(n, t)), i(e, t, n))
                : []
            );
          },
          score: function (e, t, n) {
            return (
              null == n && (n = {}),
              (null != e ? e.length : void 0) && (null != t ? t.length : void 0)
                ? (n = s(n, t)).usePathScoring
                  ? a.score(e, t, n)
                  : c.score(e, t, n)
                : 0
            );
          },
          match: function (e, t, n) {
            var r;
            return (
              null == n && (n = {}),
              e && t
                ? e === t
                  ? function () {
                      r = [];
                      for (
                        var t = 0, n = e.length;
                        0 <= n ? t < n : t > n;
                        0 <= n ? t++ : t--
                      )
                        r.push(t);
                      return r;
                    }.apply(this)
                  : ((n = s(n, t)), o.match(e, t, n))
                : []
            );
          },
          wrap: function (e, t, n) {
            return (
              null == n && (n = {}),
              e && t ? ((n = s(n, t)), o.wrap(e, t, n)) : []
            );
          },
          prepareQuery: function (e, t) {
            return null == t && (t = {}), (t = s(t, e)).preparedQuery;
          },
        }),
        (s = function (e, n) {
          return (
            null == e.allowErrors && (e.allowErrors = !1),
            null == e.usePathScoring && (e.usePathScoring = !0),
            null == e.useExtensionBonus && (e.useExtensionBonus = !1),
            null == e.pathSeparator && (e.pathSeparator = r),
            null == e.optCharRegEx && (e.optCharRegEx = null),
            null == e.wrap && (e.wrap = null),
            null == e.preparedQuery &&
              (e.preparedQuery = l && l.query === n ? l : (l = new t(n, e))),
            e
          );
        });
    }.call(this));
  },
  ,
  function (e, t, n) {
    var r = n(90),
      i = n(38),
      o = n(91).ArraySet,
      s = n(148).MappingList;
    function a(e) {
      e || (e = {}),
        (this._file = i.getArg(e, "file", null)),
        (this._sourceRoot = i.getArg(e, "sourceRoot", null)),
        (this._skipValidation = i.getArg(e, "skipValidation", !1)),
        (this._sources = new o()),
        (this._names = new o()),
        (this._mappings = new s()),
        (this._sourcesContents = null);
    }
    (a.prototype._version = 3),
      (a.fromSourceMap = function (e) {
        var t = e.sourceRoot,
          n = new a({ file: e.file, sourceRoot: t });
        return (
          e.eachMapping(function (e) {
            var r = {
              generated: { line: e.generatedLine, column: e.generatedColumn },
            };
            null != e.source &&
              ((r.source = e.source),
              null != t && (r.source = i.relative(t, r.source)),
              (r.original = { line: e.originalLine, column: e.originalColumn }),
              null != e.name && (r.name = e.name)),
              n.addMapping(r);
          }),
          e.sources.forEach(function (t) {
            var r = e.sourceContentFor(t);
            null != r && n.setSourceContent(t, r);
          }),
          n
        );
      }),
      (a.prototype.addMapping = function (e) {
        var t = i.getArg(e, "generated"),
          n = i.getArg(e, "original", null),
          r = i.getArg(e, "source", null),
          o = i.getArg(e, "name", null);
        this._skipValidation || this._validateMapping(t, n, r, o),
          null != r &&
            ((r = String(r)), this._sources.has(r) || this._sources.add(r)),
          null != o &&
            ((o = String(o)), this._names.has(o) || this._names.add(o)),
          this._mappings.add({
            generatedLine: t.line,
            generatedColumn: t.column,
            originalLine: null != n && n.line,
            originalColumn: null != n && n.column,
            source: r,
            name: o,
          });
      }),
      (a.prototype.setSourceContent = function (e, t) {
        var n = e;
        null != this._sourceRoot && (n = i.relative(this._sourceRoot, n)),
          null != t
            ? (this._sourcesContents ||
                (this._sourcesContents = Object.create(null)),
              (this._sourcesContents[i.toSetString(n)] = t))
            : this._sourcesContents &&
              (delete this._sourcesContents[i.toSetString(n)],
              0 === Object.keys(this._sourcesContents).length &&
                (this._sourcesContents = null));
      }),
      (a.prototype.applySourceMap = function (e, t, n) {
        var r = t;
        if (null == t) {
          if (null == e.file)
            throw new Error(
              'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.'
            );
          r = e.file;
        }
        var s = this._sourceRoot;
        null != s && (r = i.relative(s, r));
        var a = new o(),
          l = new o();
        this._mappings.unsortedForEach(function (t) {
          if (t.source === r && null != t.originalLine) {
            var o = e.originalPositionFor({
              line: t.originalLine,
              column: t.originalColumn,
            });
            null != o.source &&
              ((t.source = o.source),
              null != n && (t.source = i.join(n, t.source)),
              null != s && (t.source = i.relative(s, t.source)),
              (t.originalLine = o.line),
              (t.originalColumn = o.column),
              null != o.name && (t.name = o.name));
          }
          var c = t.source;
          null == c || a.has(c) || a.add(c);
          var u = t.name;
          null == u || l.has(u) || l.add(u);
        }, this),
          (this._sources = a),
          (this._names = l),
          e.sources.forEach(function (t) {
            var r = e.sourceContentFor(t);
            null != r &&
              (null != n && (t = i.join(n, t)),
              null != s && (t = i.relative(s, t)),
              this.setSourceContent(t, r));
          }, this);
      }),
      (a.prototype._validateMapping = function (e, t, n, r) {
        if (t && "number" != typeof t.line && "number" != typeof t.column)
          throw new Error(
            "original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values."
          );
        if (
          (!(
            e &&
            "line" in e &&
            "column" in e &&
            e.line > 0 &&
            e.column >= 0
          ) ||
            t ||
            n ||
            r) &&
          !(
            e &&
            "line" in e &&
            "column" in e &&
            t &&
            "line" in t &&
            "column" in t &&
            e.line > 0 &&
            e.column >= 0 &&
            t.line > 0 &&
            t.column >= 0 &&
            n
          )
        )
          throw new Error(
            "Invalid mapping: " +
              JSON.stringify({ generated: e, source: n, original: t, name: r })
          );
      }),
      (a.prototype._serializeMappings = function () {
        for (
          var e,
            t,
            n,
            o,
            s = 0,
            a = 1,
            l = 0,
            c = 0,
            u = 0,
            h = 0,
            d = "",
            p = this._mappings.toArray(),
            f = 0,
            m = p.length;
          f < m;
          f++
        ) {
          if (((e = ""), (t = p[f]).generatedLine !== a))
            for (s = 0; t.generatedLine !== a; ) (e += ";"), a++;
          else if (f > 0) {
            if (!i.compareByGeneratedPositionsInflated(t, p[f - 1])) continue;
            e += ",";
          }
          (e += r.encode(t.generatedColumn - s)),
            (s = t.generatedColumn),
            null != t.source &&
              ((o = this._sources.indexOf(t.source)),
              (e += r.encode(o - h)),
              (h = o),
              (e += r.encode(t.originalLine - 1 - c)),
              (c = t.originalLine - 1),
              (e += r.encode(t.originalColumn - l)),
              (l = t.originalColumn),
              null != t.name &&
                ((n = this._names.indexOf(t.name)),
                (e += r.encode(n - u)),
                (u = n))),
            (d += e);
        }
        return d;
      }),
      (a.prototype._generateSourcesContent = function (e, t) {
        return e.map(function (e) {
          if (!this._sourcesContents) return null;
          null != t && (e = i.relative(t, e));
          var n = i.toSetString(e);
          return Object.prototype.hasOwnProperty.call(this._sourcesContents, n)
            ? this._sourcesContents[n]
            : null;
        }, this);
      }),
      (a.prototype.toJSON = function () {
        var e = {
          version: this._version,
          sources: this._sources.toArray(),
          names: this._names.toArray(),
          mappings: this._serializeMappings(),
        };
        return (
          null != this._file && (e.file = this._file),
          null != this._sourceRoot && (e.sourceRoot = this._sourceRoot),
          this._sourcesContents &&
            (e.sourcesContent = this._generateSourcesContent(
              e.sources,
              e.sourceRoot
            )),
          e
        );
      }),
      (a.prototype.toString = function () {
        return JSON.stringify(this.toJSON());
      }),
      (t.SourceMapGenerator = a);
  },
  function (e, t, n) {
    var r = n(147);
    (t.encode = function (e) {
      var t,
        n = "",
        i = (function (e) {
          return e < 0 ? 1 + (-e << 1) : 0 + (e << 1);
        })(e);
      do {
        (t = 31 & i), (i >>>= 5) > 0 && (t |= 32), (n += r.encode(t));
      } while (i > 0);
      return n;
    }),
      (t.decode = function (e, t, n) {
        var i,
          o,
          s,
          a,
          l = e.length,
          c = 0,
          u = 0;
        do {
          if (t >= l)
            throw new Error("Expected more digits in base 64 VLQ value.");
          if (-1 === (o = r.decode(e.charCodeAt(t++))))
            throw new Error("Invalid base64 digit: " + e.charAt(t - 1));
          (i = !!(32 & o)), (c += (o &= 31) << u), (u += 5);
        } while (i);
        (n.value = ((a = (s = c) >> 1), 1 == (1 & s) ? -a : a)), (n.rest = t);
      });
  },
  function (e, t, n) {
    var r = n(38),
      i = Object.prototype.hasOwnProperty,
      o = "undefined" != typeof Map;
    function s() {
      (this._array = []), (this._set = o ? new Map() : Object.create(null));
    }
    (s.fromArray = function (e, t) {
      for (var n = new s(), r = 0, i = e.length; r < i; r++) n.add(e[r], t);
      return n;
    }),
      (s.prototype.size = function () {
        return o
          ? this._set.size
          : Object.getOwnPropertyNames(this._set).length;
      }),
      (s.prototype.add = function (e, t) {
        var n = o ? e : r.toSetString(e),
          s = o ? this.has(e) : i.call(this._set, n),
          a = this._array.length;
        (s && !t) || this._array.push(e),
          s || (o ? this._set.set(e, a) : (this._set[n] = a));
      }),
      (s.prototype.has = function (e) {
        if (o) return this._set.has(e);
        var t = r.toSetString(e);
        return i.call(this._set, t);
      }),
      (s.prototype.indexOf = function (e) {
        if (o) {
          var t = this._set.get(e);
          if (t >= 0) return t;
        } else {
          var n = r.toSetString(e);
          if (i.call(this._set, n)) return this._set[n];
        }
        throw new Error('"' + e + '" is not in the set.');
      }),
      (s.prototype.at = function (e) {
        if (e >= 0 && e < this._array.length) return this._array[e];
        throw new Error("No element indexed by " + e);
      }),
      (s.prototype.toArray = function () {
        return this._array.slice();
      }),
      (t.ArraySet = s);
  },
  function (e, t) {
    var n,
      r = global.crypto || global.msCrypto;
    if (r && r.getRandomValues) {
      var i = new Uint8Array(16);
      n = function () {
        return r.getRandomValues(i), i;
      };
    }
    if (!n) {
      var o = new Array(16);
      n = function () {
        for (var e, t = 0; t < 16; t++)
          0 == (3 & t) && (e = 4294967296 * Math.random()),
            (o[t] = (e >>> ((3 & t) << 3)) & 255);
        return o;
      };
    }
    e.exports = n;
  },
  function (e, t) {
    for (var n = [], r = 0; r < 256; ++r)
      n[r] = (r + 256).toString(16).substr(1);
    e.exports = function (e, t) {
      var r = t || 0,
        i = n;
      return (
        i[e[r++]] +
        i[e[r++]] +
        i[e[r++]] +
        i[e[r++]] +
        "-" +
        i[e[r++]] +
        i[e[r++]] +
        "-" +
        i[e[r++]] +
        i[e[r++]] +
        "-" +
        i[e[r++]] +
        i[e[r++]] +
        "-" +
        i[e[r++]] +
        i[e[r++]] +
        i[e[r++]] +
        i[e[r++]] +
        i[e[r++]] +
        i[e[r++]]
      );
    };
  },
  function (e, t, n) {
    "use strict";
    e.exports = y;
    var r,
      i = n(163),
      o = n(39),
      s = n(165),
      a = (r =
        "function" == typeof Symbol
          ? function (e) {
              return Symbol.for(e);
            }
          : function (e) {
              return "_" + e;
            })("max"),
      l = r("length"),
      c = r("lengthCalculator"),
      u = r("allowStale"),
      h = r("maxAge"),
      d = r("dispose"),
      p = r("noDisposeOnSet"),
      f = r("lruList"),
      m = r("cache");
    function g() {
      return 1;
    }
    function y(e) {
      if (!(this instanceof y)) return new y(e);
      "number" == typeof e && (e = { max: e }), e || (e = {});
      var t = (this[a] = e.max);
      (!t || "number" != typeof t || t <= 0) && (this[a] = 1 / 0);
      var n = e.length || g;
      "function" != typeof n && (n = g),
        (this[c] = n),
        (this[u] = e.stale || !1),
        (this[h] = e.maxAge || 0),
        (this[d] = e.dispose),
        (this[p] = e.noDisposeOnSet || !1),
        this.reset();
    }
    function v(e, t, n, r) {
      var i = n.value;
      b(e, i) && (C(e, n), e[u] || (i = void 0)),
        i && t.call(r, i.value, i.key, e);
    }
    function w(e, t, n) {
      var r = e[m].get(t);
      if (r) {
        var i = r.value;
        b(e, i) ? (C(e, r), e[u] || (i = void 0)) : n && e[f].unshiftNode(r),
          i && (i = i.value);
      }
      return i;
    }
    function b(e, t) {
      if (!t || (!t.maxAge && !e[h])) return !1;
      var n = Date.now() - t.now;
      return t.maxAge ? n > t.maxAge : e[h] && n > e[h];
    }
    function S(e) {
      if (e[l] > e[a])
        for (var t = e[f].tail; e[l] > e[a] && null !== t; ) {
          var n = t.prev;
          C(e, t), (t = n);
        }
    }
    function C(e, t) {
      if (t) {
        var n = t.value;
        e[d] && e[d](n.key, n.value),
          (e[l] -= n.length),
          e[m].delete(n.key),
          e[f].removeNode(t);
      }
    }
    function E(e, t, n, r, i) {
      (this.key = e),
        (this.value = t),
        (this.length = n),
        (this.now = r),
        (this.maxAge = i || 0);
    }
    Object.defineProperty(y.prototype, "max", {
      set: function (e) {
        (!e || "number" != typeof e || e <= 0) && (e = 1 / 0),
          (this[a] = e),
          S(this);
      },
      get: function () {
        return this[a];
      },
      enumerable: !0,
    }),
      Object.defineProperty(y.prototype, "allowStale", {
        set: function (e) {
          this[u] = !!e;
        },
        get: function () {
          return this[u];
        },
        enumerable: !0,
      }),
      Object.defineProperty(y.prototype, "maxAge", {
        set: function (e) {
          (!e || "number" != typeof e || e < 0) && (e = 0),
            (this[h] = e),
            S(this);
        },
        get: function () {
          return this[h];
        },
        enumerable: !0,
      }),
      Object.defineProperty(y.prototype, "lengthCalculator", {
        set: function (e) {
          "function" != typeof e && (e = g),
            e !== this[c] &&
              ((this[c] = e),
              (this[l] = 0),
              this[f].forEach(function (e) {
                (e.length = this[c](e.value, e.key)), (this[l] += e.length);
              }, this)),
            S(this);
        },
        get: function () {
          return this[c];
        },
        enumerable: !0,
      }),
      Object.defineProperty(y.prototype, "length", {
        get: function () {
          return this[l];
        },
        enumerable: !0,
      }),
      Object.defineProperty(y.prototype, "itemCount", {
        get: function () {
          return this[f].length;
        },
        enumerable: !0,
      }),
      (y.prototype.rforEach = function (e, t) {
        t = t || this;
        for (var n = this[f].tail; null !== n; ) {
          var r = n.prev;
          v(this, e, n, t), (n = r);
        }
      }),
      (y.prototype.forEach = function (e, t) {
        t = t || this;
        for (var n = this[f].head; null !== n; ) {
          var r = n.next;
          v(this, e, n, t), (n = r);
        }
      }),
      (y.prototype.keys = function () {
        return this[f].toArray().map(function (e) {
          return e.key;
        }, this);
      }),
      (y.prototype.values = function () {
        return this[f].toArray().map(function (e) {
          return e.value;
        }, this);
      }),
      (y.prototype.reset = function () {
        this[d] &&
          this[f] &&
          this[f].length &&
          this[f].forEach(function (e) {
            this[d](e.key, e.value);
          }, this),
          (this[m] = new i()),
          (this[f] = new s()),
          (this[l] = 0);
      }),
      (y.prototype.dump = function () {
        return this[f]
          .map(function (e) {
            if (!b(this, e))
              return { k: e.key, v: e.value, e: e.now + (e.maxAge || 0) };
          }, this)
          .toArray()
          .filter(function (e) {
            return e;
          });
      }),
      (y.prototype.dumpLru = function () {
        return this[f];
      }),
      (y.prototype.inspect = function (e, t) {
        var n = "LRUCache {",
          r = !1;
        this[u] && ((n += "\n  allowStale: true"), (r = !0));
        var i = this[a];
        i &&
          i !== 1 / 0 &&
          (r && (n += ","), (n += "\n  max: " + o.inspect(i, t)), (r = !0));
        var s = this[h];
        s &&
          (r && (n += ","), (n += "\n  maxAge: " + o.inspect(s, t)), (r = !0));
        var d = this[c];
        d &&
          d !== g &&
          (r && (n += ","),
          (n += "\n  length: " + o.inspect(this[l], t)),
          (r = !0));
        var p = !1;
        return (
          this[f].forEach(function (e) {
            p ? (n += ",\n  ") : (r && (n += ",\n"), (p = !0), (n += "\n  "));
            var i = o.inspect(e.key).split("\n").join("\n  "),
              a = { value: e.value };
            e.maxAge !== s && (a.maxAge = e.maxAge),
              d !== g && (a.length = e.length),
              b(this, e) && (a.stale = !0),
              (a = o.inspect(a, t).split("\n").join("\n  ")),
              (n += i + " => " + a);
          }),
          (p || r) && (n += "\n"),
          (n += "}")
        );
      }),
      (y.prototype.set = function (e, t, n) {
        var r = (n = n || this[h]) ? Date.now() : 0,
          i = this[c](t, e);
        if (this[m].has(e)) {
          if (i > this[a]) return C(this, this[m].get(e)), !1;
          var o = this[m].get(e).value;
          return (
            this[d] && (this[p] || this[d](e, o.value)),
            (o.now = r),
            (o.maxAge = n),
            (o.value = t),
            (this[l] += i - o.length),
            (o.length = i),
            this.get(e),
            S(this),
            !0
          );
        }
        var s = new E(e, t, i, r, n);
        return s.length > this[a]
          ? (this[d] && this[d](e, t), !1)
          : ((this[l] += s.length),
            this[f].unshift(s),
            this[m].set(e, this[f].head),
            S(this),
            !0);
      }),
      (y.prototype.has = function (e) {
        return !!this[m].has(e) && !b(this, this[m].get(e).value);
      }),
      (y.prototype.get = function (e) {
        return w(this, e, !0);
      }),
      (y.prototype.peek = function (e) {
        return w(this, e, !1);
      }),
      (y.prototype.pop = function () {
        var e = this[f].tail;
        return e ? (C(this, e), e.value) : null;
      }),
      (y.prototype.del = function (e) {
        C(this, this[m].get(e));
      }),
      (y.prototype.load = function (e) {
        this.reset();
        for (var t = Date.now(), n = e.length - 1; n >= 0; n--) {
          var r = e[n],
            i = r.e || 0;
          if (0 === i) this.set(r.k, r.v);
          else {
            var o = i - t;
            o > 0 && this.set(r.k, r.v, o);
          }
        }
      }),
      (y.prototype.prune = function () {
        var e = this;
        this[m].forEach(function (t, n) {
          w(e, n, !1);
        });
      });
  },
  function (e, t, n) {
    var r;
    n(8);
    function i(e, t, n) {
      if (("function" == typeof t && ((n = t), (t = {})), !n)) {
        if ("function" != typeof Promise)
          throw new TypeError("callback not provided");
        return new Promise(function (n, r) {
          i(e, t || {}, function (e, t) {
            e ? r(e) : n(t);
          });
        });
      }
      r(e, t || {}, function (e, r) {
        e &&
          ("EACCES" === e.code || (t && t.ignoreErrors)) &&
          ((e = null), (r = !1)),
          n(e, r);
      });
    }
    (r = n(168)),
      (e.exports = i),
      (i.sync = function (e, t) {
        try {
          return r.sync(e, t || {});
        } catch (e) {
          if ((t && t.ignoreErrors) || "EACCES" === e.code) return !1;
          throw e;
        }
      });
  },
  function (e, t, n) {
    "use strict";
    e.exports = function (e) {
      var t = "string" == typeof e ? "\n" : "\n".charCodeAt(),
        n = "string" == typeof e ? "\r" : "\r".charCodeAt();
      return (
        e[e.length - 1] === t && (e = e.slice(0, e.length - 1)),
        e[e.length - 1] === n && (e = e.slice(0, e.length - 1)),
        e
      );
    };
  },
  function (e, t, n) {
    "use strict";
    e.exports = function (e) {
      var t = (e = e || {}).env || process.env;
      return "win32" !== (e.platform || "win32")
        ? "PATH"
        : Object.keys(t).filter(function (e) {
            return "PATH" === e.toUpperCase();
          })[0] || "Path";
    };
  },
  function (e, t, n) {
    "use strict";
    var r = (e.exports = function (e) {
      return null !== e && "object" == typeof e && "function" == typeof e.pipe;
    });
    (r.writable = function (e) {
      return (
        r(e) &&
        !1 !== e.writable &&
        "function" == typeof e._write &&
        "object" == typeof e._writableState
      );
    }),
      (r.readable = function (e) {
        return (
          r(e) &&
          !1 !== e.readable &&
          "function" == typeof e._read &&
          "object" == typeof e._readableState
        );
      }),
      (r.duplex = function (e) {
        return r.writable(e) && r.readable(e);
      }),
      (r.transform = function (e) {
        return (
          r.duplex(e) &&
          "function" == typeof e._transform &&
          "object" == typeof e._transformState
        );
      });
  },
  function (e, t, n) {
    "use strict";
    const r = n(18).fromCallback,
      i = n(13),
      o = [
        "access",
        "appendFile",
        "chmod",
        "chown",
        "close",
        "copyFile",
        "fchmod",
        "fchown",
        "fdatasync",
        "fstat",
        "fsync",
        "ftruncate",
        "futimes",
        "lchown",
        "lchmod",
        "link",
        "lstat",
        "mkdir",
        "mkdtemp",
        "open",
        "readFile",
        "readdir",
        "readlink",
        "realpath",
        "rename",
        "rmdir",
        "stat",
        "symlink",
        "truncate",
        "unlink",
        "utimes",
        "writeFile",
      ].filter((e) => "function" == typeof i[e]);
    Object.keys(i).forEach((e) => {
      "promises" !== e && (t[e] = i[e]);
    }),
      o.forEach((e) => {
        t[e] = r(i[e]);
      }),
      (t.exists = function (e, t) {
        return "function" == typeof t
          ? i.exists(e, t)
          : new Promise((t) => i.exists(e, t));
      }),
      (t.read = function (e, t, n, r, o, s) {
        return "function" == typeof s
          ? i.read(e, t, n, r, o, s)
          : new Promise((s, a) => {
              i.read(e, t, n, r, o, (e, t, n) => {
                if (e) return a(e);
                s({ bytesRead: t, buffer: n });
              });
            });
      }),
      (t.write = function (e, t, ...n) {
        return "function" == typeof n[n.length - 1]
          ? i.write(e, t, ...n)
          : new Promise((r, o) => {
              i.write(e, t, ...n, (e, t, n) => {
                if (e) return o(e);
                r({ bytesWritten: t, buffer: n });
              });
            });
      });
  },
  function (e, t) {
    e.exports = require("constants");
  },
  function (e, t, n) {
    "use strict";
    e.exports = { copySync: n(175) };
  },
  function (e, t, n) {
    "use strict";
    const r = n(1);
    function i(e) {
      return (e = r.normalize(r.resolve(e)).split(r.sep)).length > 0
        ? e[0]
        : null;
    }
    const o = /[<>:"|?*]/;
    e.exports = {
      getRootPath: i,
      invalidWin32Path: function (e) {
        const t = i(e);
        return (e = e.replace(t, "")), o.test(e);
      },
    };
  },
  function (e, t, n) {
    "use strict";
    const r = n(13),
      i = n(19),
      o = n(1);
    e.exports = {
      hasMillisRes: function (e) {
        let t = o.join(
          "millis-test" +
            Date.now().toString() +
            Math.random().toString().slice(2)
        );
        t = o.join(i.tmpdir(), t);
        const n = new Date(1435410243862);
        r.writeFile(
          t,
          "https://github.com/jprichardson/node-fs-extra/pull/141",
          (i) => {
            if (i) return e(i);
            r.open(t, "r+", (i, o) => {
              if (i) return e(i);
              r.futimes(o, n, n, (n) => {
                if (n) return e(n);
                r.close(o, (n) => {
                  if (n) return e(n);
                  r.stat(t, (t, n) => {
                    if (t) return e(t);
                    e(null, n.mtime > 1435410243e3);
                  });
                });
              });
            });
          }
        );
      },
      hasMillisResSync: function () {
        let e = o.join(
          "millis-test-sync" +
            Date.now().toString() +
            Math.random().toString().slice(2)
        );
        e = o.join(i.tmpdir(), e);
        const t = new Date(1435410243862);
        r.writeFileSync(
          e,
          "https://github.com/jprichardson/node-fs-extra/pull/141"
        );
        const n = r.openSync(e, "r+");
        return (
          r.futimesSync(n, t, t),
          r.closeSync(n),
          r.statSync(e).mtime > 1435410243e3
        );
      },
      timeRemoveMillis: function (e) {
        if ("number" == typeof e) return 1e3 * Math.floor(e / 1e3);
        if (e instanceof Date)
          return new Date(1e3 * Math.floor(e.getTime() / 1e3));
        throw new Error("fs-extra: timeRemoveMillis() unknown parameter type");
      },
      utimesMillis: function (e, t, n, i) {
        r.open(e, "r+", (e, o) => {
          if (e) return i(e);
          r.futimes(o, t, n, (e) => {
            r.close(o, (t) => {
              i && i(e || t);
            });
          });
        });
      },
      utimesMillisSync: function (e, t, n) {
        const i = r.openSync(e, "r+");
        return r.futimesSync(i, t, n), r.closeSync(i);
      },
    };
  },
  function (e, t, n) {
    "use strict";
    e.exports = function (e) {
      if ("function" == typeof Buffer.allocUnsafe)
        try {
          return Buffer.allocUnsafe(e);
        } catch (t) {
          return new Buffer(e);
        }
      return new Buffer(e);
    };
  },
  function (e, t, n) {
    "use strict";
    const r = n(18).fromCallback;
    e.exports = { copy: r(n(178)) };
  },
  function (e, t, n) {
    "use strict";
    var r = n(8);
    e.exports = (function (e) {
      if (null === e || "object" != typeof e) return e;
      if (e instanceof Object) var t = { __proto__: e.__proto__ };
      else t = Object.create(null);
      return (
        Object.getOwnPropertyNames(e).forEach(function (n) {
          Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(e, n));
        }),
        t
      );
    })(r);
  },
  function (e, t, n) {
    var r = n(214);
    function i(e) {
      var t = function () {
        return t.called
          ? t.value
          : ((t.called = !0), (t.value = e.apply(this, arguments)));
      };
      return (t.called = !1), t;
    }
    function o(e) {
      var t = function () {
          if (t.called) throw new Error(t.onceError);
          return (t.called = !0), (t.value = e.apply(this, arguments));
        },
        n = e.name || "Function wrapped with `once`";
      return (
        (t.onceError = n + " shouldn't be called more than once"),
        (t.called = !1),
        t
      );
    }
    (e.exports = r(i)),
      (e.exports.strict = r(o)),
      (i.proto = i(function () {
        Object.defineProperty(Function.prototype, "once", {
          value: function () {
            return i(this);
          },
          configurable: !0,
        }),
          Object.defineProperty(Function.prototype, "onceStrict", {
            value: function () {
              return o(this);
            },
            configurable: !0,
          });
      }));
  },
  function (e, t, n) {
    "use strict";
    var r;
    Object.defineProperty(t, "__esModule", { value: !0 }),
      (function (e) {
        (e[(e.SSHKeyAuditUnverified = 0)] = "SSHKeyAuditUnverified"),
          (e[(e.SSHAuthenticationFailed = 1)] = "SSHAuthenticationFailed"),
          (e[(e.SSHPermissionDenied = 2)] = "SSHPermissionDenied"),
          (e[(e.HTTPSAuthenticationFailed = 3)] = "HTTPSAuthenticationFailed"),
          (e[(e.RemoteDisconnection = 4)] = "RemoteDisconnection"),
          (e[(e.HostDown = 5)] = "HostDown"),
          (e[(e.RebaseConflicts = 6)] = "RebaseConflicts"),
          (e[(e.MergeConflicts = 7)] = "MergeConflicts"),
          (e[(e.HTTPSRepositoryNotFound = 8)] = "HTTPSRepositoryNotFound"),
          (e[(e.SSHRepositoryNotFound = 9)] = "SSHRepositoryNotFound"),
          (e[(e.PushNotFastForward = 10)] = "PushNotFastForward"),
          (e[(e.BranchDeletionFailed = 11)] = "BranchDeletionFailed"),
          (e[(e.DefaultBranchDeletionFailed = 12)] =
            "DefaultBranchDeletionFailed"),
          (e[(e.RevertConflicts = 13)] = "RevertConflicts"),
          (e[(e.EmptyRebasePatch = 14)] = "EmptyRebasePatch"),
          (e[(e.NoMatchingRemoteBranch = 15)] = "NoMatchingRemoteBranch"),
          (e[(e.NoExistingRemoteBranch = 16)] = "NoExistingRemoteBranch"),
          (e[(e.NothingToCommit = 17)] = "NothingToCommit"),
          (e[(e.NoSubmoduleMapping = 18)] = "NoSubmoduleMapping"),
          (e[(e.SubmoduleRepositoryDoesNotExist = 19)] =
            "SubmoduleRepositoryDoesNotExist"),
          (e[(e.InvalidSubmoduleSHA = 20)] = "InvalidSubmoduleSHA"),
          (e[(e.LocalPermissionDenied = 21)] = "LocalPermissionDenied"),
          (e[(e.InvalidMerge = 22)] = "InvalidMerge"),
          (e[(e.InvalidRebase = 23)] = "InvalidRebase"),
          (e[(e.NonFastForwardMergeIntoEmptyHead = 24)] =
            "NonFastForwardMergeIntoEmptyHead"),
          (e[(e.PatchDoesNotApply = 25)] = "PatchDoesNotApply"),
          (e[(e.BranchAlreadyExists = 26)] = "BranchAlreadyExists"),
          (e[(e.BadRevision = 27)] = "BadRevision"),
          (e[(e.NotAGitRepository = 28)] = "NotAGitRepository"),
          (e[(e.CannotMergeUnrelatedHistories = 29)] =
            "CannotMergeUnrelatedHistories"),
          (e[(e.LFSAttributeDoesNotMatch = 30)] = "LFSAttributeDoesNotMatch"),
          (e[(e.BranchRenameFailed = 31)] = "BranchRenameFailed"),
          (e[(e.PathDoesNotExist = 32)] = "PathDoesNotExist"),
          (e[(e.InvalidObjectName = 33)] = "InvalidObjectName"),
          (e[(e.OutsideRepository = 34)] = "OutsideRepository"),
          (e[(e.LockFileAlreadyExists = 35)] = "LockFileAlreadyExists"),
          (e[(e.NoMergeToAbort = 36)] = "NoMergeToAbort"),
          (e[(e.LocalChangesOverwritten = 37)] = "LocalChangesOverwritten"),
          (e[(e.UnresolvedConflicts = 38)] = "UnresolvedConflicts"),
          (e[(e.PushWithFileSizeExceedingLimit = 39)] =
            "PushWithFileSizeExceedingLimit"),
          (e[(e.HexBranchNameRejected = 40)] = "HexBranchNameRejected"),
          (e[(e.ForcePushRejected = 41)] = "ForcePushRejected"),
          (e[(e.InvalidRefLength = 42)] = "InvalidRefLength"),
          (e[(e.ProtectedBranchRequiresReview = 43)] =
            "ProtectedBranchRequiresReview"),
          (e[(e.ProtectedBranchForcePush = 44)] = "ProtectedBranchForcePush"),
          (e[(e.ProtectedBranchDeleteRejected = 45)] =
            "ProtectedBranchDeleteRejected"),
          (e[(e.ProtectedBranchRequiredStatus = 46)] =
            "ProtectedBranchRequiredStatus"),
          (e[(e.PushWithPrivateEmail = 47)] = "PushWithPrivateEmail"),
          (e[(e.ConfigLockFileAlreadyExists = 48)] =
            "ConfigLockFileAlreadyExists"),
          (e[(e.RemoteAlreadyExists = 49)] = "RemoteAlreadyExists"),
          (e[(e.TagAlreadyExists = 50)] = "TagAlreadyExists"),
          (e[(e.MergeWithLocalChanges = 51)] = "MergeWithLocalChanges"),
          (e[(e.RebaseWithLocalChanges = 52)] = "RebaseWithLocalChanges");
      })((r = t.GitError || (t.GitError = {}))),
      (t.GitErrorRegexes = {
        "ERROR: ([\\s\\S]+?)\\n+\\[EPOLICYKEYAGE\\]\\n+fatal: Could not read from remote repository.":
          r.SSHKeyAuditUnverified,
        "fatal: Authentication failed for 'https://":
          r.HTTPSAuthenticationFailed,
        "fatal: Authentication failed": r.SSHAuthenticationFailed,
        "fatal: Could not read from remote repository.": r.SSHPermissionDenied,
        "The requested URL returned error: 403": r.HTTPSAuthenticationFailed,
        "fatal: The remote end hung up unexpectedly": r.RemoteDisconnection,
        "fatal: unable to access '(.+)': Failed to connect to (.+): Host is down":
          r.HostDown,
        "Cloning into '(.+)'...\nfatal: unable to access '(.+)': Could not resolve host: (.+)":
          r.HostDown,
        "Resolve all conflicts manually, mark them as resolved with":
          r.RebaseConflicts,
        "(Merge conflict|Automatic merge failed; fix conflicts and then commit the result)":
          r.MergeConflicts,
        "fatal: repository '(.+)' not found": r.HTTPSRepositoryNotFound,
        "ERROR: Repository not found": r.SSHRepositoryNotFound,
        "\\((non-fast-forward|fetch first)\\)\nerror: failed to push some refs to '.*'":
          r.PushNotFastForward,
        "error: unable to delete '(.+)': remote ref does not exist":
          r.BranchDeletionFailed,
        "\\[remote rejected\\] (.+) \\(deletion of the current branch prohibited\\)":
          r.DefaultBranchDeletionFailed,
        "error: could not revert .*\nhint: after resolving the conflicts, mark the corrected paths\nhint: with 'git add <paths>' or 'git rm <paths>'\nhint: and commit the result with 'git commit'":
          r.RevertConflicts,
        "Applying: .*\nNo changes - did you forget to use 'git add'\\?\nIf there is nothing left to stage, chances are that something else\n.*":
          r.EmptyRebasePatch,
        "There are no candidates for (rebasing|merging) among the refs that you just fetched.\nGenerally this means that you provided a wildcard refspec which had no\nmatches on the remote end.":
          r.NoMatchingRemoteBranch,
        "Your configuration specifies to merge with the ref '(.+)'\nfrom the remote, but no such ref was fetched.":
          r.NoExistingRemoteBranch,
        "nothing to commit": r.NothingToCommit,
        "No submodule mapping found in .gitmodules for path '(.+)'":
          r.NoSubmoduleMapping,
        "fatal: repository '(.+)' does not exist\nfatal: clone of '.+' into submodule path '(.+)' failed":
          r.SubmoduleRepositoryDoesNotExist,
        "Fetched in submodule path '(.+)', but it did not contain (.+). Direct fetching of that commit failed.":
          r.InvalidSubmoduleSHA,
        "fatal: could not create work tree dir '(.+)'.*: Permission denied":
          r.LocalPermissionDenied,
        "merge: (.+) - not something we can merge": r.InvalidMerge,
        "invalid upstream (.+)": r.InvalidRebase,
        "fatal: Non-fast-forward commit does not make sense into an empty head":
          r.NonFastForwardMergeIntoEmptyHead,
        "error: (.+): (patch does not apply|already exists in working directory)":
          r.PatchDoesNotApply,
        "fatal: A branch named '(.+)' already exists.": r.BranchAlreadyExists,
        "fatal: bad revision '(.*)'": r.BadRevision,
        "fatal: [Nn]ot a git repository \\(or any of the parent directories\\): (.*)":
          r.NotAGitRepository,
        "fatal: refusing to merge unrelated histories":
          r.CannotMergeUnrelatedHistories,
        "The .+ attribute should be .+ but is .+": r.LFSAttributeDoesNotMatch,
        "fatal: Branch rename failed": r.BranchRenameFailed,
        "fatal: path '(.+)' does not exist .+": r.PathDoesNotExist,
        "fatal: invalid object name '(.+)'.": r.InvalidObjectName,
        "fatal: .+: '(.+)' is outside repository": r.OutsideRepository,
        "Another git process seems to be running in this repository, e.g.":
          r.LockFileAlreadyExists,
        "fatal: There is no merge to abort": r.NoMergeToAbort,
        "error: (?:Your local changes to the following|The following untracked working tree) files would be overwritten by checkout:":
          r.LocalChangesOverwritten,
        "You must edit all merge conflicts and then\nmark them as resolved using git add":
          r.UnresolvedConflicts,
        "error: GH001: ": r.PushWithFileSizeExceedingLimit,
        "error: GH002: ": r.HexBranchNameRejected,
        "error: GH003: Sorry, force-pushing to (.+) is not allowed.":
          r.ForcePushRejected,
        "error: GH005: Sorry, refs longer than (.+) bytes are not allowed":
          r.InvalidRefLength,
        "error: GH006: Protected branch update failed for (.+)\nremote: error: At least one approved review is required":
          r.ProtectedBranchRequiresReview,
        "error: GH006: Protected branch update failed for (.+)\nremote: error: Cannot force-push to a protected branch":
          r.ProtectedBranchForcePush,
        "error: GH006: Protected branch update failed for (.+)\nremote: error: Cannot delete a protected branch":
          r.ProtectedBranchDeleteRejected,
        'error: GH006: Protected branch update failed for (.+).\nremote: error: Required status check "(.+)" is expected':
          r.ProtectedBranchRequiredStatus,
        "error: GH007: Your push would publish a private email address.":
          r.PushWithPrivateEmail,
        "error: could not lock config file (.+): File exists":
          r.ConfigLockFileAlreadyExists,
        "fatal: remote (.+) already exists.": r.RemoteAlreadyExists,
        "fatal: tag '(.+)' already exists": r.TagAlreadyExists,
        "error: Your local changes to the following files would be overwritten by merge:\n":
          r.MergeWithLocalChanges,
        "error: cannot (pull with rebase|rebase): You have unstaged changes\\.\n\\s*error: [Pp]lease commit or stash them\\.":
          r.RebaseWithLocalChanges,
      }),
      (t.GitNotFoundErrorCode = "git-not-found-error"),
      (t.RepositoryDoesNotExistErrorCode = "repository-does-not-exist-error");
  },
  function (e, t, n) {
    var r = n(240);
    e.exports = function (e, t, n) {
      if ((r(e), void 0 === t)) return e;
      switch (n) {
        case 1:
          return function (n) {
            return e.call(t, n);
          };
        case 2:
          return function (n, r) {
            return e.call(t, n, r);
          };
        case 3:
          return function (n, r, i) {
            return e.call(t, n, r, i);
          };
      }
      return function () {
        return e.apply(t, arguments);
      };
    };
  },
  function (e, t, n) {
    e.exports =
      !n(31) &&
      !n(35)(function () {
        return (
          7 !=
          Object.defineProperty(n(111)("div"), "a", {
            get: function () {
              return 7;
            },
          }).a
        );
      });
  },
  function (e, t, n) {
    var r = n(41),
      i = n(26).document,
      o = r(i) && r(i.createElement);
    e.exports = function (e) {
      return o ? i.createElement(e) : {};
    };
  },
  function (e, t, n) {
    var r = n(32),
      i = n(33),
      o = n(242)(!1),
      s = n(69)("IE_PROTO");
    e.exports = function (e, t) {
      var n,
        a = i(e),
        l = 0,
        c = [];
      for (n in a) n != s && r(a, n) && c.push(n);
      for (; t.length > l; ) r(a, (n = t[l++])) && (~o(c, n) || c.push(n));
      return c;
    };
  },
  function (e, t, n) {
    var r = n(114);
    e.exports = Object("z").propertyIsEnumerable(0)
      ? Object
      : function (e) {
          return "String" == r(e) ? e.split("") : Object(e);
        };
  },
  function (e, t) {
    var n = {}.toString;
    e.exports = function (e) {
      return n.call(e).slice(8, -1);
    };
  },
  function (e, t, n) {
    var r = n(32),
      i = n(54),
      o = n(69)("IE_PROTO"),
      s = Object.prototype;
    e.exports =
      Object.getPrototypeOf ||
      function (e) {
        return (
          (e = i(e)),
          r(e, o)
            ? e[o]
            : "function" == typeof e.constructor && e instanceof e.constructor
            ? e.constructor.prototype
            : e instanceof Object
            ? s
            : null
        );
      };
  },
  function (e, t, n) {
    "use strict";
    t.__esModule = !0;
    var r = s(n(250)),
      i = s(n(261)),
      o =
        "function" == typeof i.default && "symbol" == typeof r.default
          ? function (e) {
              return typeof e;
            }
          : function (e) {
              return e &&
                "function" == typeof i.default &&
                e.constructor === i.default &&
                e !== i.default.prototype
                ? "symbol"
                : typeof e;
            };
    function s(e) {
      return e && e.__esModule ? e : { default: e };
    }
    t.default =
      "function" == typeof i.default && "symbol" === o(r.default)
        ? function (e) {
            return void 0 === e ? "undefined" : o(e);
          }
        : function (e) {
            return e &&
              "function" == typeof i.default &&
              e.constructor === i.default &&
              e !== i.default.prototype
              ? "symbol"
              : void 0 === e
              ? "undefined"
              : o(e);
          };
  },
  function (e, t, n) {
    "use strict";
    var r = n(74),
      i = n(29),
      o = n(118),
      s = n(34),
      a = n(32),
      l = n(75),
      c = n(254),
      u = n(77),
      h = n(115),
      d = n(36)("iterator"),
      p = !([].keys && "next" in [].keys()),
      f = function () {
        return this;
      };
    e.exports = function (e, t, n, m, g, y, v) {
      c(n, t, m);
      var w,
        b,
        S,
        C = function (e) {
          if (!p && e in R) return R[e];
          switch (e) {
            case "keys":
            case "values":
              return function () {
                return new n(this, e);
              };
          }
          return function () {
            return new n(this, e);
          };
        },
        E = t + " Iterator",
        k = "values" == g,
        x = !1,
        R = e.prototype,
        T = R[d] || R["@@iterator"] || (g && R[g]),
        D = T || C(g),
        A = g ? (k ? C("entries") : D) : void 0,
        _ = ("Array" == t && R.entries) || T;
      if (
        (_ &&
          (S = h(_.call(new e()))) !== Object.prototype &&
          S.next &&
          (u(S, E, !0), r || a(S, d) || s(S, d, f)),
        k &&
          T &&
          "values" !== T.name &&
          ((x = !0),
          (D = function () {
            return T.call(this);
          })),
        (r && !v) || (!p && !x && R[d]) || s(R, d, D),
        (l[t] = D),
        (l[E] = f),
        g)
      )
        if (
          ((w = {
            values: k ? D : C("values"),
            keys: y ? D : C("keys"),
            entries: A,
          }),
          v)
        )
          for (b in w) b in R || o(R, b, w[b]);
        else i(i.P + i.F * (p || x), t, w);
      return w;
    };
  },
  function (e, t, n) {
    e.exports = n(34);
  },
  function (e, t, n) {
    var r = n(112),
      i = n(71).concat("length", "prototype");
    t.f =
      Object.getOwnPropertyNames ||
      function (e) {
        return r(e, i);
      };
  },
  function (e, t, n) {
    (function () {
      var t, r, i, o, s, a, l;
      (l = n(82)),
        (r = l.countDir),
        (o = l.getExtension),
        (e.exports = function (e, n) {
          var s, l, c;
          if (
            ((s = (c = null != n ? n : {}).optCharRegEx),
            (l = c.pathSeparator),
            !e || !e.length)
          )
            return null;
          (this.query = e),
            (this.query_lw = e.toLowerCase()),
            (this.core = t(e, s)),
            (this.core_lw = this.core.toLowerCase()),
            (this.core_up = a(this.core)),
            (this.depth = r(e, e.length, l)),
            (this.ext = o(this.query_lw)),
            (this.charCodes = i(this.query_lw));
        }),
        (s = /[ _\-:\/\\]/g),
        (t = function (e, t) {
          return null == t && (t = s), e.replace(t, "");
        }),
        (a = function (e) {
          var t, n, r;
          for (t = "", n = 0, r = e.length; n < r; n++)
            t += e[n].toUpperCase()[0];
          return t;
        }),
        (i = function (e) {
          var t, n, r;
          for (r = e.length, n = -1, t = []; ++n < r; ) t[e.charCodeAt(n)] = !0;
          return t;
        });
    }.call(this));
  },
  function (e, t, n) {
    "use strict";
    var r = n(55);
    (t.__esModule = !0), (t.default = void 0);
    var i,
      o = r(n(81)),
      s = "clearTimeout",
      a = function (e) {
        var t = new Date().getTime(),
          n = Math.max(0, 16 - (t - c)),
          r = setTimeout(e, n);
        return (c = t), r;
      },
      l = function (e, t) {
        return (
          e + (e ? t[0].toUpperCase() + t.substr(1) : t) + "AnimationFrame"
        );
      };
    o.default &&
      ["", "webkit", "moz", "o", "ms"].some(function (e) {
        var t = l(e, "request");
        if (t in window)
          return (
            (s = l(e, "cancel")),
            (a = function (e) {
              return window[t](e);
            })
          );
      });
    var c = new Date().getTime();
    (i = function (e) {
      return a(e);
    }).cancel = function (e) {
      window[s] && "function" == typeof window[s] && window[s](e);
    };
    var u = i;
    (t.default = u), (e.exports = t.default);
  },
  function (e, t, n) {
    "use strict";
    Object.defineProperty(t, "__esModule", { value: !0 }),
      (t.nameShape = void 0),
      (t.transitionTimeout = function (e) {
        var t = "transition" + e + "Timeout",
          n = "transition" + e;
        return function (e) {
          if (e[n]) {
            if (null == e[t])
              return new Error(
                t +
                  " wasn't supplied to CSSTransitionGroup: this can cause unreliable animations and won't be supported in a future version of React. See https://fb.me/react-animation-transition-group-timeout for more information."
              );
            if ("number" != typeof e[t])
              return new Error(t + " must be a number (in milliseconds)");
          }
          return null;
        };
      });
    var r,
      i = n(83),
      o = (r = i) && r.__esModule ? r : { default: r };
    t.nameShape = o.default.oneOfType([
      o.default.string,
      o.default.shape({
        enter: o.default.string,
        leave: o.default.string,
        active: o.default.string,
        height: o.default.string,
      }),
      o.default.shape({
        enter: o.default.string,
        enterActive: o.default.string,
        leave: o.default.string,
        leaveActive: o.default.string,
        appear: o.default.string,
        appearActive: o.default.string,
        height: o.default.string,
        heightActive: o.default.string,
      }),
    ]);
  },
  function (e, t, n) {
    "use strict";
    const r = n(1);
    e.exports = function (e) {
      if (
        "string" != typeof e ||
        e.length <= 7 ||
        "file://" !== e.substring(0, 7)
      )
        throw new TypeError(
          "must pass in a file:// URI to convert to a file path"
        );
      const t = decodeURI(e.substring(7)),
        n = t.indexOf("/");
      let i = t.substring(0, n),
        o = t.substring(n + 1);
      return (
        "localhost" === i && (i = ""),
        i && (i = r.sep + r.sep + i),
        (o = o.replace(/^(.+)\|/, "$1:")),
        "\\" === r.sep && (o = o.replace(/\//g, "\\")),
        /^.+:/.test(o) || (o = r.sep + o),
        i + o
      );
    };
  },
  function (e, t, n) {
    var r,
      i = n(146).SourceMapConsumer,
      o = n(1);
    try {
      ((r = n(8)).existsSync && r.readFileSync) || (r = null);
    } catch (e) {}
    var s = !1,
      a = !1,
      l = !1,
      c = "auto",
      u = {},
      h = {},
      d = /^data:application\/json[^,]+base64,/,
      p = [],
      f = [];
    function m() {
      return (
        "browser" === c ||
        ("node" !== c &&
          "undefined" != typeof window &&
          "function" == typeof XMLHttpRequest &&
          !(
            window.require &&
            window.module &&
            window.process &&
            "renderer" === window.process.type
          ))
      );
    }
    function g(e) {
      return function (t) {
        for (var n = 0; n < e.length; n++) {
          var r = e[n](t);
          if (r) return r;
        }
        return null;
      };
    }
    var y = g(p);
    function v(e, t) {
      if (!e) return t;
      var n = o.dirname(e),
        r = /^\w+:\/\/[^\/]*/.exec(n),
        i = r ? r[0] : "";
      return i + o.resolve(n.slice(i.length), t);
    }
    p.push(function (e) {
      if ((e = e.trim()) in u) return u[e];
      var t = null;
      if (r) {
        if (r.existsSync(e))
          try {
            t = r.readFileSync(e, "utf8");
          } catch (e) {
            t = "";
          }
      } else {
        var n = new XMLHttpRequest();
        n.open("GET", e, !1), n.send(null);
        t = null;
        4 === n.readyState && 200 === n.status && (t = n.responseText);
      }
      return (u[e] = t);
    });
    var w = g(f);
    function b(e) {
      var t = h[e.source];
      if (!t) {
        var n = w(e.source);
        n
          ? (t = h[e.source] = { url: n.url, map: new i(n.map) }).map
              .sourcesContent &&
            t.map.sources.forEach(function (e, n) {
              var r = t.map.sourcesContent[n];
              if (r) {
                var i = v(t.url, e);
                u[i] = r;
              }
            })
          : (t = h[e.source] = { url: null, map: null });
      }
      if (t && t.map) {
        var r = t.map.originalPositionFor(e);
        if (null !== r.source) return (r.source = v(t.url, r.source)), r;
      }
      return e;
    }
    function S() {
      var e,
        t = "";
      if (this.isNative()) t = "native";
      else {
        !(e = this.getScriptNameOrSourceURL()) &&
          this.isEval() &&
          ((t = this.getEvalOrigin()), (t += ", ")),
          (t += e || "<anonymous>");
        var n = this.getLineNumber();
        if (null != n) {
          t += ":" + n;
          var r = this.getColumnNumber();
          r && (t += ":" + r);
        }
      }
      var i = "",
        o = this.getFunctionName(),
        s = !0,
        a = this.isConstructor();
      if (!(this.isToplevel() || a)) {
        var l = this.getTypeName();
        "[object Object]" === l && (l = "null");
        var c = this.getMethodName();
        o
          ? (l && 0 != o.indexOf(l) && (i += l + "."),
            (i += o),
            c &&
              o.indexOf("." + c) != o.length - c.length - 1 &&
              (i += " [as " + c + "]"))
          : (i += l + "." + (c || "<anonymous>"));
      } else
        a
          ? (i += "new " + (o || "<anonymous>"))
          : o
          ? (i += o)
          : ((i += t), (s = !1));
      return s && (i += " (" + t + ")"), i;
    }
    function C(e) {
      var t = {};
      return (
        Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(function (
          n
        ) {
          t[n] = /^(?:is|get)/.test(n)
            ? function () {
                return e[n].call(e);
              }
            : e[n];
        }),
        (t.toString = S),
        t
      );
    }
    function E(e) {
      if (e.isNative()) return e;
      var t = e.getFileName() || e.getScriptNameOrSourceURL();
      if (t) {
        var n = e.getLineNumber(),
          r = e.getColumnNumber() - 1;
        1 === n && r > 62 && !m() && !e.isEval() && (r -= 62);
        var i = b({ source: t, line: n, column: r });
        return (
          ((e = C(e)).getFileName = function () {
            return i.source;
          }),
          (e.getLineNumber = function () {
            return i.line;
          }),
          (e.getColumnNumber = function () {
            return i.column + 1;
          }),
          (e.getScriptNameOrSourceURL = function () {
            return i.source;
          }),
          e
        );
      }
      var o = e.isEval() && e.getEvalOrigin();
      return o
        ? ((o = (function e(t) {
            var n = /^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(t);
            if (n) {
              var r = b({ source: n[2], line: +n[3], column: n[4] - 1 });
              return (
                "eval at " +
                n[1] +
                " (" +
                r.source +
                ":" +
                r.line +
                ":" +
                (r.column + 1) +
                ")"
              );
            }
            return (n = /^eval at ([^(]+) \((.+)\)$/.exec(t))
              ? "eval at " + n[1] + " (" + e(n[2]) + ")"
              : t;
          })(o)),
          ((e = C(e)).getEvalOrigin = function () {
            return o;
          }),
          e)
        : e;
    }
    function k(e, t) {
      return (
        l && ((u = {}), (h = {})),
        e +
          t
            .map(function (e) {
              return "\n    at " + E(e);
            })
            .join("")
      );
    }
    function x(e) {
      var t = /\n    at [^(]+ \((.*):(\d+):(\d+)\)/.exec(e.stack);
      if (t) {
        var n = t[1],
          i = +t[2],
          o = +t[3],
          s = u[n];
        if (!s && r && r.existsSync(n))
          try {
            s = r.readFileSync(n, "utf8");
          } catch (e) {
            s = "";
          }
        if (s) {
          var a = s.split(/(?:\r\n|\r|\n)/)[i - 1];
          if (a)
            return n + ":" + i + "\n" + a + "\n" + new Array(o).join(" ") + "^";
        }
      }
      return null;
    }
    function R(e) {
      var t = x(e);
      t && (console.error(), console.error(t)),
        console.error(e.stack),
        process.exit(1);
    }
    f.push(function (e) {
      var t,
        n = (function (e) {
          var t;
          if (m())
            try {
              var n = new XMLHttpRequest();
              n.open("GET", e, !1),
                n.send(null),
                (t = 4 === n.readyState ? n.responseText : null);
              var r =
                n.getResponseHeader("SourceMap") ||
                n.getResponseHeader("X-SourceMap");
              if (r) return r;
            } catch (e) {}
          t = y(e);
          for (
            var i,
              o,
              s = /(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/)[ \t]*$)/gm;
            (o = s.exec(t));

          )
            i = o;
          return i ? i[1] : null;
        })(e);
      if (!n) return null;
      if (d.test(n)) {
        var r = n.slice(n.indexOf(",") + 1);
        (t = new Buffer(r, "base64").toString()), (n = e);
      } else (n = v(e, n)), (t = y(n));
      return t ? { url: n, map: t } : null;
    }),
      (t.wrapCallSite = E),
      (t.getErrorSource = x),
      (t.mapSourcePosition = b),
      (t.retrieveSourceMap = w),
      (t.install = function (e) {
        if (
          (e = e || {}).environment &&
          ((c = e.environment), -1 === ["node", "browser", "auto"].indexOf(c))
        )
          throw new Error(
            "environment " +
              c +
              " was unknown. Available options are {auto, browser, node}"
          );
        if (
          (e.retrieveFile &&
            (e.overrideRetrieveFile && (p.length = 0),
            p.unshift(e.retrieveFile)),
          e.retrieveSourceMap &&
            (e.overrideRetrieveSourceMap && (f.length = 0),
            f.unshift(e.retrieveSourceMap)),
          e.hookRequire && !m())
        ) {
          var t;
          try {
            t = n(153);
          } catch (e) {}
          var r = t.prototype._compile;
          r.__sourceMapSupport ||
            ((t.prototype._compile = function (e, t) {
              return (u[t] = e), (h[t] = void 0), r.call(this, e, t);
            }),
            (t.prototype._compile.__sourceMapSupport = !0));
        }
        var i;
        (l ||
          (l =
            "emptyCacheBetweenOperations" in e &&
            e.emptyCacheBetweenOperations),
        s || ((s = !0), (Error.prepareStackTrace = k)),
        a) ||
          ((!("handleUncaughtExceptions" in e) || e.handleUncaughtExceptions) &&
            "object" == typeof process &&
            null !== process &&
            "function" == typeof process.on &&
            ((a = !0),
            (i = process.emit),
            (process.emit = function (e) {
              if ("uncaughtException" === e) {
                var t = arguments[1] && arguments[1].stack,
                  n = this.listeners(e).length > 0;
                if (t && !n) return R(arguments[1]);
              }
              return i.apply(this, arguments);
            })));
      });
  },
  function (e, t, n) {
    "use strict";
    const r = n(19),
      i = n(160),
      o = n(171);
    function s() {
      const e = process.env;
      return (
        e.SUDO_USER || e.C9_USER || e.LOGNAME || e.USER || e.LNAME || e.USERNAME
      );
    }
    function a(e) {
      return e.replace(/^.*\\/, "");
    }
    function l() {}
    (e.exports = o(() => {
      if (r.userInfo) return Promise.resolve(r.userInfo().username);
      const e = s();
      return e
        ? Promise.resolve(e)
        : i("whoami")
            .then((e) => a(e.stdout))
            .catch(l);
    })),
      (e.exports.sync = o(() => {
        if (r.userInfo) return r.userInfo().username;
        const e = s();
        if (e) return e;
        try {
          return a(i.sync("whoami").stdout);
        } catch (e) {}
      }));
  },
  function (e, t, n) {
    var r, i, o;
    (i = []),
      void 0 ===
        (o =
          "function" ==
          typeof (r = function () {
            var e = /^v?(?:\d+)(\.(?:[x*]|\d+)(\.(?:[x*]|\d+)(\.(?:[x*]|\d+))?(?:-[\da-z\-]+(?:\.[\da-z\-]+)*)?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i;
            function t(e) {
              var t,
                n,
                r = e.replace(/^v/, "").replace(/\+.*$/, ""),
                i =
                  ((n = "-"),
                  -1 === (t = r).indexOf(n) ? t.length : t.indexOf(n)),
                o = r.substring(0, i).split(".");
              return o.push(r.substring(i + 1)), o;
            }
            function n(e) {
              return isNaN(Number(e)) ? e : Number(e);
            }
            function r(t) {
              if ("string" != typeof t)
                throw new TypeError("Invalid argument expected string");
              if (!e.test(t))
                throw new Error(
                  "Invalid argument not valid semver ('" + t + "' received)"
                );
            }
            function i(e, i) {
              [e, i].forEach(r);
              for (
                var o = t(e), s = t(i), a = 0;
                a < Math.max(o.length - 1, s.length - 1);
                a++
              ) {
                var l = parseInt(o[a] || 0, 10),
                  c = parseInt(s[a] || 0, 10);
                if (l > c) return 1;
                if (c > l) return -1;
              }
              var u = o[o.length - 1],
                h = s[s.length - 1];
              if (u && h) {
                var d = u.split(".").map(n),
                  p = h.split(".").map(n);
                for (a = 0; a < Math.max(d.length, p.length); a++) {
                  if (
                    void 0 === d[a] ||
                    ("string" == typeof p[a] && "number" == typeof d[a])
                  )
                    return -1;
                  if (
                    void 0 === p[a] ||
                    ("string" == typeof d[a] && "number" == typeof p[a])
                  )
                    return 1;
                  if (d[a] > p[a]) return 1;
                  if (p[a] > d[a]) return -1;
                }
              } else if (u || h) return u ? -1 : 1;
              return 0;
            }
            var o = [">", ">=", "=", "<", "<="],
              s = {
                ">": [1],
                ">=": [0, 1],
                "=": [0],
                "<=": [-1, 0],
                "<": [-1],
              };
            return (
              (i.validate = function (t) {
                return "string" == typeof t && e.test(t);
              }),
              (i.compare = function (e, t, n) {
                !(function (e) {
                  if ("string" != typeof e)
                    throw new TypeError(
                      "Invalid operator type, expected string but got " +
                        typeof e
                    );
                  if (-1 === o.indexOf(e))
                    throw new TypeError(
                      "Invalid operator, expected one of " + o.join("|")
                    );
                })(n);
                var r = i(e, t);
                return s[n].indexOf(r) > -1;
              }),
              i
            );
          })
            ? r.apply(t, i)
            : r) || (e.exports = o);
  },
  function (e, t) {
    e.exports = require("querystring");
  },
  function (e, t, n) {
    "use strict";
    function r(e) {
      if (
        ((this._capacity = o(e)), (this._length = 0), (this._front = 0), i(e))
      ) {
        for (var t = e.length, n = 0; n < t; ++n) this[n] = e[n];
        this._length = t;
      }
    }
    (r.prototype.toArray = function () {
      for (
        var e = this._length,
          t = new Array(e),
          n = this._front,
          r = this._capacity,
          i = 0;
        i < e;
        ++i
      )
        t[i] = this[(n + i) & (r - 1)];
      return t;
    }),
      (r.prototype.push = function (e) {
        var t = arguments.length,
          n = this._length;
        if (t > 1) {
          var r = this._capacity;
          if (n + t > r) {
            for (var i = 0; i < t; ++i) {
              this._checkCapacity(n + 1),
                (this[(o = (this._front + n) & (this._capacity - 1))] =
                  arguments[i]),
                n++,
                (this._length = n);
            }
            return n;
          }
          for (var o = this._front, i = 0; i < t; ++i)
            (this[(o + n) & (r - 1)] = arguments[i]), o++;
          return (this._length = n + t), n + t;
        }
        return 0 === t
          ? n
          : (this._checkCapacity(n + 1),
            (this[(i = (this._front + n) & (this._capacity - 1))] = e),
            (this._length = n + 1),
            n + 1);
      }),
      (r.prototype.pop = function () {
        var e = this._length;
        if (0 !== e) {
          var t = (this._front + e - 1) & (this._capacity - 1),
            n = this[t];
          return (this[t] = void 0), (this._length = e - 1), n;
        }
      }),
      (r.prototype.shift = function () {
        var e = this._length;
        if (0 !== e) {
          var t = this._front,
            n = this[t];
          return (
            (this[t] = void 0),
            (this._front = (t + 1) & (this._capacity - 1)),
            (this._length = e - 1),
            n
          );
        }
      }),
      (r.prototype.unshift = function (e) {
        var t = this._length,
          n = arguments.length;
        if (n > 1) {
          if (t + n > (i = this._capacity)) {
            for (var r = n - 1; r >= 0; r--) {
              this._checkCapacity(t + 1);
              var i = this._capacity;
              (this[(s = (((this._front - 1) & (i - 1)) ^ i) - i)] =
                arguments[r]),
                t++,
                (this._length = t),
                (this._front = s);
            }
            return t;
          }
          var o = this._front;
          for (r = n - 1; r >= 0; r--) {
            var s;
            (this[(s = (((o - 1) & (i - 1)) ^ i) - i)] = arguments[r]), (o = s);
          }
          return (this._front = o), (this._length = t + n), t + n;
        }
        if (0 === n) return t;
        this._checkCapacity(t + 1);
        i = this._capacity;
        return (
          (this[(r = (((this._front - 1) & (i - 1)) ^ i) - i)] = e),
          (this._length = t + 1),
          (this._front = r),
          t + 1
        );
      }),
      (r.prototype.peekBack = function () {
        var e = this._length;
        if (0 !== e) return this[(this._front + e - 1) & (this._capacity - 1)];
      }),
      (r.prototype.peekFront = function () {
        if (0 !== this._length) return this[this._front];
      }),
      (r.prototype.get = function (e) {
        var t = e;
        if (t === (0 | t)) {
          var n = this._length;
          if ((t < 0 && (t += n), !(t < 0 || t >= n)))
            return this[(this._front + t) & (this._capacity - 1)];
        }
      }),
      (r.prototype.isEmpty = function () {
        return 0 === this._length;
      }),
      (r.prototype.clear = function () {
        for (
          var e = this._length, t = this._front, n = this._capacity, r = 0;
          r < e;
          ++r
        )
          this[(t + r) & (n - 1)] = void 0;
        (this._length = 0), (this._front = 0);
      }),
      (r.prototype.toString = function () {
        return this.toArray().toString();
      }),
      (r.prototype.valueOf = r.prototype.toString),
      (r.prototype.removeFront = r.prototype.shift),
      (r.prototype.removeBack = r.prototype.pop),
      (r.prototype.insertFront = r.prototype.unshift),
      (r.prototype.insertBack = r.prototype.push),
      (r.prototype.enqueue = r.prototype.push),
      (r.prototype.dequeue = r.prototype.shift),
      (r.prototype.toJSON = r.prototype.toArray),
      Object.defineProperty(r.prototype, "length", {
        get: function () {
          return this._length;
        },
        set: function () {
          throw new RangeError("");
        },
      }),
      (r.prototype._checkCapacity = function (e) {
        this._capacity < e && this._resizeTo(o(1.5 * this._capacity + 16));
      }),
      (r.prototype._resizeTo = function (e) {
        var t = this._capacity;
        this._capacity = e;
        var n = this._front,
          r = this._length;
        n + r > t &&
          (function (e, t, n, r, i) {
            for (var o = 0; o < i; ++o)
              (n[o + r] = e[o + t]), (e[o + t] = void 0);
          })(this, 0, this, t, (n + r) & (t - 1));
      });
    var i = Array.isArray;
    function o(e) {
      if ("number" != typeof e) {
        if (!i(e)) return 16;
        e = e.length;
      }
      return (
        (t = Math.min(Math.max(16, e), 1073741824)),
        (t >>>= 0),
        (t -= 1),
        (t |= t >> 1),
        (t |= t >> 2),
        (t |= t >> 4),
        (t |= t >> 8),
        1 + (t |= t >> 16)
      );
      var t;
    }
    e.exports = r;
  },
  function (e, t, n) {
    var r = n(228),
      i = n(84),
      o = i;
    (o.v1 = r), (o.v4 = i), (e.exports = o);
  },
  function (e, t, n) {
    var r = n(229),
      i = n(65).EventEmitter;
    function o(e) {
      if (!(this instanceof o)) return new o(e);
      i.call(this),
        (e = e || {}),
        (this.concurrency = e.concurrency || 1 / 0),
        (this.timeout = e.timeout || 0),
        (this.autostart = e.autostart || !1),
        (this.results = e.results || null),
        (this.pending = 0),
        (this.session = 0),
        (this.running = !1),
        (this.jobs = []),
        (this.timers = {});
    }
    (e.exports = o), (e.exports.default = o), r(o, i);
    ["pop", "shift", "indexOf", "lastIndexOf"].forEach(function (e) {
      o.prototype[e] = function () {
        return Array.prototype[e].apply(this.jobs, arguments);
      };
    }),
      (o.prototype.slice = function (e, t) {
        return (this.jobs = this.jobs.slice(e, t)), this;
      }),
      (o.prototype.reverse = function () {
        return this.jobs.reverse(), this;
      });
    function s() {
      for (var e in this.timers) {
        var t = this.timers[e];
        delete this.timers[e], clearTimeout(t);
      }
    }
    function a(e) {
      var t = this;
      function n(e) {
        t.end(e);
      }
      this.on("error", n),
        this.on("end", function r(i) {
          t.removeListener("error", n),
            t.removeListener("end", r),
            e(i, this.results);
        });
    }
    function l(e) {
      this.session++, (this.running = !1), this.emit("end", e);
    }
    ["push", "unshift", "splice"].forEach(function (e) {
      o.prototype[e] = function () {
        var t = Array.prototype[e].apply(this.jobs, arguments);
        return this.autostart && this.start(), t;
      };
    }),
      Object.defineProperty(o.prototype, "length", {
        get: function () {
          return this.pending + this.jobs.length;
        },
      }),
      (o.prototype.start = function (e) {
        if (
          (e && a.call(this, e),
          (this.running = !0),
          !(this.pending >= this.concurrency))
        )
          if (0 !== this.jobs.length) {
            var t = this,
              n = this.jobs.shift(),
              r = !0,
              i = this.session,
              o = null,
              s = !1,
              c = null;
            this.timeout &&
              ((o = setTimeout(function () {
                (s = !0),
                  t.listeners("timeout").length > 0
                    ? t.emit("timeout", h, n)
                    : h();
              }, this.timeout)),
              (this.timers[o] = o)),
              this.results &&
                ((c = this.results.length), (this.results[c] = null)),
              this.pending++;
            var u = n(h);
            u &&
              u.then &&
              "function" == typeof u.then &&
              u
                .then(function (e) {
                  return h(null, e);
                })
                .catch(function (e) {
                  return h(e || !0);
                }),
              this.running && this.jobs.length > 0 && this.start();
          } else 0 === this.pending && l.call(this);
        function h(e, a) {
          r &&
            t.session === i &&
            ((r = !1),
            t.pending--,
            null !== o && (delete t.timers[o], clearTimeout(o)),
            e
              ? t.emit("error", e, n)
              : !1 === s &&
                (null !== c &&
                  (t.results[c] = Array.prototype.slice.call(arguments, 1)),
                t.emit("success", a, n)),
            t.session === i &&
              (0 === t.pending && 0 === t.jobs.length
                ? l.call(t)
                : t.running && t.start()));
        }
      }),
      (o.prototype.stop = function () {
        this.running = !1;
      }),
      (o.prototype.end = function (e) {
        s.call(this),
          (this.jobs.length = 0),
          (this.pending = 0),
          l.call(this, e);
      });
  },
  function (e, t, n) {
    "use strict";
    const r = n(1);
    e.exports = (e, t) => {
      if ("string" != typeof e)
        throw new TypeError("Expected a string, got " + typeof e);
      let n = e;
      return (
        (t = Object.assign({ resolve: !0 }, t)).resolve && (n = r.resolve(e)),
        (n = n.replace(/\\/g, "/")),
        "/" !== n[0] && (n = "/" + n),
        encodeURI("file://" + n).replace(/[?#]/g, encodeURIComponent)
      );
    };
  },
  function (e, t, n) {
    var r = Array.prototype.slice,
      i = n(230),
      o = n(231),
      s = (e.exports = function (e, t, n) {
        return (
          n || (n = {}),
          e === t ||
            (e instanceof Date && t instanceof Date
              ? e.getTime() === t.getTime()
              : !e || !t || ("object" != typeof e && "object" != typeof t)
              ? n.strict
                ? e === t
                : e == t
              : (function (e, t, n) {
                  var c, u;
                  if (a(e) || a(t)) return !1;
                  if (e.prototype !== t.prototype) return !1;
                  if (o(e))
                    return (
                      !!o(t) && ((e = r.call(e)), (t = r.call(t)), s(e, t, n))
                    );
                  if (l(e)) {
                    if (!l(t)) return !1;
                    if (e.length !== t.length) return !1;
                    for (c = 0; c < e.length; c++) if (e[c] !== t[c]) return !1;
                    return !0;
                  }
                  try {
                    var h = i(e),
                      d = i(t);
                  } catch (e) {
                    return !1;
                  }
                  if (h.length != d.length) return !1;
                  for (h.sort(), d.sort(), c = h.length - 1; c >= 0; c--)
                    if (h[c] != d[c]) return !1;
                  for (c = h.length - 1; c >= 0; c--)
                    if (((u = h[c]), !s(e[u], t[u], n))) return !1;
                  return typeof e == typeof t;
                })(e, t, n))
        );
      });
    function a(e) {
      return null == e;
    }
    function l(e) {
      return (
        !(!e || "object" != typeof e || "number" != typeof e.length) &&
        "function" == typeof e.copy &&
        "function" == typeof e.slice &&
        !(e.length > 0 && "number" != typeof e[0])
      );
    }
  },
  function (e, t, n) {
    "use strict";
    var r = n(55);
    (t.__esModule = !0),
      (t.default = function (e) {
        if (((!i && 0 !== i) || e) && o.default) {
          var t = document.createElement("div");
          (t.style.position = "absolute"),
            (t.style.top = "-9999px"),
            (t.style.width = "50px"),
            (t.style.height = "50px"),
            (t.style.overflow = "scroll"),
            document.body.appendChild(t),
            (i = t.offsetWidth - t.clientWidth),
            document.body.removeChild(t);
        }
        return i;
      });
    var i,
      o = r(n(81));
    e.exports = t.default;
  },
  function (e, t, n) {
    "use strict";
    (t.__esModule = !0),
      (t.default = function (e, t) {
        var n = {};
        for (var r in e)
          t.indexOf(r) >= 0 ||
            (Object.prototype.hasOwnProperty.call(e, r) && (n[r] = e[r]));
        return n;
      });
  },
  function (e, t, n) {
    !(function () {
      var t = [
          "direction",
          "boxSizing",
          "width",
          "height",
          "overflowX",
          "overflowY",
          "borderTopWidth",
          "borderRightWidth",
          "borderBottomWidth",
          "borderLeftWidth",
          "borderStyle",
          "paddingTop",
          "paddingRight",
          "paddingBottom",
          "paddingLeft",
          "fontStyle",
          "fontVariant",
          "fontWeight",
          "fontStretch",
          "fontSize",
          "fontSizeAdjust",
          "lineHeight",
          "fontFamily",
          "textAlign",
          "textTransform",
          "textIndent",
          "textDecoration",
          "letterSpacing",
          "wordSpacing",
          "tabSize",
          "MozTabSize",
        ],
        n = "undefined" != typeof window,
        r = n && null != window.mozInnerScreenX;
      function i(e, i, o) {
        if (!n)
          throw new Error(
            "textarea-caret-position#getCaretCoordinates should only be called in a browser"
          );
        var s = (o && o.debug) || !1;
        if (s) {
          var a = document.querySelector(
            "#input-textarea-caret-position-mirror-div"
          );
          a && a.parentNode.removeChild(a);
        }
        var l = document.createElement("div");
        (l.id = "input-textarea-caret-position-mirror-div"),
          document.body.appendChild(l);
        var c = l.style,
          u = window.getComputedStyle ? getComputedStyle(e) : e.currentStyle;
        (c.whiteSpace = "pre-wrap"),
          "INPUT" !== e.nodeName && (c.wordWrap = "break-word"),
          (c.position = "absolute"),
          s || (c.visibility = "hidden"),
          t.forEach(function (e) {
            c[e] = u[e];
          }),
          r
            ? e.scrollHeight > parseInt(u.height) && (c.overflowY = "scroll")
            : (c.overflow = "hidden"),
          (l.textContent = e.value.substring(0, i)),
          "INPUT" === e.nodeName &&
            (l.textContent = l.textContent.replace(/\s/g, " "));
        var h = document.createElement("span");
        (h.textContent = e.value.substring(i) || "."), l.appendChild(h);
        var d = {
          top: h.offsetTop + parseInt(u.borderTopWidth),
          left: h.offsetLeft + parseInt(u.borderLeftWidth),
        };
        return (
          s ? (h.style.backgroundColor = "#aaa") : document.body.removeChild(l),
          d
        );
      }
      void 0 !== e.exports
        ? (e.exports = i)
        : n && (window.getCaretCoordinates = i);
    })();
  },
  function (e, t, n) {
    "use strict";
    function r(e) {
      return (r =
        "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
          ? function (e) {
              return typeof e;
            }
          : function (e) {
              return e &&
                "function" == typeof Symbol &&
                e.constructor === Symbol &&
                e !== Symbol.prototype
                ? "symbol"
                : typeof e;
            })(e);
    }
    function i(e, t) {
      for (var n = 0; n < t.length; n++) {
        var r = t[n];
        (r.enumerable = r.enumerable || !1),
          (r.configurable = !0),
          "value" in r && (r.writable = !0),
          Object.defineProperty(e, r.key, r);
      }
    }
    function o(e, t) {
      return (o =
        Object.setPrototypeOf ||
        function (e, t) {
          return (e.__proto__ = t), e;
        })(e, t);
    }
    function s(e) {
      var t = (function () {
        if ("undefined" == typeof Reflect || !Reflect.construct) return !1;
        if (Reflect.construct.sham) return !1;
        if ("function" == typeof Proxy) return !0;
        try {
          return (
            Date.prototype.toString.call(
              Reflect.construct(Date, [], function () {})
            ),
            !0
          );
        } catch (e) {
          return !1;
        }
      })();
      return function () {
        var n,
          r = c(e);
        if (t) {
          var i = c(this).constructor;
          n = Reflect.construct(r, arguments, i);
        } else n = r.apply(this, arguments);
        return a(this, n);
      };
    }
    function a(e, t) {
      return !t || ("object" !== r(t) && "function" != typeof t) ? l(e) : t;
    }
    function l(e) {
      if (void 0 === e)
        throw new ReferenceError(
          "this hasn't been initialised - super() hasn't been called"
        );
      return e;
    }
    function c(e) {
      return (c = Object.setPrototypeOf
        ? Object.getPrototypeOf
        : function (e) {
            return e.__proto__ || Object.getPrototypeOf(e);
          })(e);
    }
    var u = n(0),
      h = n(15),
      d = n(50),
      p = n(315).createFocusTrap,
      f = (function (e) {
        !(function (e, t) {
          if ("function" != typeof t && null !== t)
            throw new TypeError(
              "Super expression must either be null or a function"
            );
          (e.prototype = Object.create(t && t.prototype, {
            constructor: { value: e, writable: !0, configurable: !0 },
          })),
            t && o(e, t);
        })(c, e);
        var t,
          n,
          r,
          a = s(c);
        function c(e) {
          var t, n, r, i;
          return (
            (function (e, t) {
              if (!(e instanceof t))
                throw new TypeError("Cannot call a class as a function");
            })(this, c),
            (t = a.call(this, e)),
            (n = l(t)),
            (i = function (e) {
              t.focusTrapElement = e;
            }),
            (r = "setFocusTrapElement") in n
              ? Object.defineProperty(n, r, {
                  value: i,
                  enumerable: !0,
                  configurable: !0,
                  writable: !0,
                })
              : (n[r] = i),
            "undefined" != typeof document &&
              (t.previouslyFocusedElement = document.activeElement),
            t
          );
        }
        return (
          (t = c),
          (n = [
            {
              key: "componentDidMount",
              value: function () {
                var e = this.props.focusTrapOptions,
                  t = { returnFocusOnDeactivate: !1 };
                for (var n in e)
                  Object.prototype.hasOwnProperty.call(e, n) &&
                    "returnFocusOnDeactivate" !== n &&
                    (t[n] = e[n]);
                var r = h.findDOMNode(this.focusTrapElement);
                (this.focusTrap = this.props._createFocusTrap(r, t)),
                  this.props.active && this.focusTrap.activate(),
                  this.props.paused && this.focusTrap.pause();
              },
            },
            {
              key: "componentDidUpdate",
              value: function (e) {
                if (e.active && !this.props.active) {
                  var t = {
                    returnFocus:
                      this.props.focusTrapOptions.returnFocusOnDeactivate || !1,
                  };
                  this.focusTrap.deactivate(t);
                } else
                  !e.active && this.props.active && this.focusTrap.activate();
                e.paused && !this.props.paused
                  ? this.focusTrap.unpause()
                  : !e.paused && this.props.paused && this.focusTrap.pause();
              },
            },
            {
              key: "componentWillUnmount",
              value: function () {
                this.focusTrap.deactivate(),
                  !1 !== this.props.focusTrapOptions.returnFocusOnDeactivate &&
                    this.previouslyFocusedElement &&
                    this.previouslyFocusedElement.focus &&
                    this.previouslyFocusedElement.focus();
              },
            },
            {
              key: "render",
              value: function () {
                var e = this,
                  t = u.Children.only(this.props.children);
                return u.cloneElement(t, {
                  ref: function (n) {
                    e.setFocusTrapElement(n),
                      "function" == typeof t.ref
                        ? t.ref(n)
                        : t.ref && (t.ref.current = n);
                  },
                });
              },
            },
          ]) && i(t.prototype, n),
          r && i(t, r),
          c
        );
      })(u.Component),
      m = "undefined" == typeof Element ? Function : Element;
    (f.propTypes = {
      active: d.bool,
      paused: d.bool,
      focusTrapOptions: d.shape({
        onActivate: d.func,
        onDeactivate: d.func,
        initialFocus: d.oneOfType([d.instanceOf(m), d.string, d.func]),
        fallbackFocus: d.oneOfType([d.instanceOf(m), d.string, d.func]),
        escapeDeactivates: d.bool,
        clickOutsideDeactivates: d.bool,
        returnFocusOnDeactivate: d.bool,
        setReturnFocus: d.oneOfType([d.instanceOf(m), d.string, d.func]),
        allowOutsideClick: d.oneOfType([d.bool, d.func]),
        preventScroll: d.bool,
      }),
      children: d.oneOfType([d.element, d.instanceOf(m)]),
    }),
      (f.defaultProps = {
        active: !0,
        paused: !1,
        focusTrapOptions: {},
        _createFocusTrap: p,
      }),
      (e.exports = f);
  },
  function (e, t, n) {
    e.exports = { default: n(292), __esModule: !0 };
  },
  function (e, t, n) {
    "use strict";
    Object.defineProperty(t, "__esModule", { value: !0 }), (t.default = void 0);
    var r,
      i,
      o =
        "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
          ? function (e) {
              return typeof e;
            }
          : function (e) {
              return e &&
                "function" == typeof Symbol &&
                e.constructor === Symbol &&
                e !== Symbol.prototype
                ? "symbol"
                : typeof e;
            },
      s =
        Object.assign ||
        function (e) {
          for (var t = 1; t < arguments.length; t++) {
            var n = arguments[t];
            for (var r in n)
              Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
          }
          return e;
        },
      a = p(n(0)),
      l = n(15),
      c = (p(n(83)), p(n(296))),
      u = p(n(297)),
      h = p(n(121)),
      d = p(n(298));
    n(122);
    function p(e) {
      return e && e.__esModule ? e : { default: e };
    }
    function f(e, t) {
      for (var n = Object.getOwnPropertyNames(t), r = 0; r < n.length; r++) {
        var i = n[r],
          o = Object.getOwnPropertyDescriptor(t, i);
        o &&
          o.configurable &&
          void 0 === e[i] &&
          Object.defineProperty(e, i, o);
      }
      return e;
    }
    var m = a.default.createFactory(d.default),
      g =
        ((i = r = (function (e) {
          function t(n, r) {
            !(function (e, t) {
              if (!(e instanceof t))
                throw new TypeError("Cannot call a class as a function");
            })(this, t);
            var i = (function (e, t) {
              if (!e)
                throw new ReferenceError(
                  "this hasn't been initialised - super() hasn't been called"
                );
              return !t || ("object" != typeof t && "function" != typeof t)
                ? e
                : t;
            })(this, e.call(this, n, r));
            return (
              (i.handleDoneAppearing = function (e) {
                delete i.transitioningKeys[e],
                  e !== i.state.currentKey && i.performLeave(e);
              }),
              (i.performLeave = function (e) {
                (i.transitioningKeys[e] = !0),
                  i.childRefs[e].componentWillLeave(
                    i.handleDoneLeaving.bind(i, e)
                  ),
                  (i.state.currentChild &&
                    (0, l.findDOMNode)(i.childRefs[i.state.currentKey])) ||
                    i.enqueueHeightTransition();
              }),
              (i.performHeightTransition = function () {
                if (!i.unmounted) {
                  var e = i.state,
                    t = e.currentChild
                      ? (0, l.findDOMNode)(i.childRefs[e.currentKey])
                      : null;
                  i.setState({
                    height: t ? t.offsetHeight : 0,
                    width: i.props.changeWidth ? (t ? t.offsetWidth : 0) : null,
                  });
                }
                i.rafHandle = null;
              }),
              (i.childRefs = Object.create(null)),
              (i.state = {
                currentKey: "1",
                currentChild: i.props.children
                  ? a.default.Children.only(i.props.children)
                  : void 0,
                prevChildren: {},
                height: null,
                width: null,
              }),
              i
            );
          }
          return (
            (function (e, t) {
              if ("function" != typeof t && null !== t)
                throw new TypeError(
                  "Super expression must either be null or a function, not " +
                    typeof t
                );
              (e.prototype = Object.create(t && t.prototype, {
                constructor: {
                  value: e,
                  enumerable: !1,
                  writable: !0,
                  configurable: !0,
                },
              })),
                t && (Object.setPrototypeOf, f(e, t));
            })(t, e),
            (t.prototype.componentWillMount = function () {
              (this.shouldEnterCurrent = !1),
                (this.keysToLeave = []),
                (this.transitioningKeys = {});
            }),
            (t.prototype.componentDidMount = function () {
              this.props.transitionAppear &&
                this.state.currentChild &&
                this.performAppear(this.state.currentKey);
            }),
            (t.prototype.componentWillUnmount = function () {
              this.unmounted = !0;
            }),
            (t.prototype.componentWillReceiveProps = function (e) {
              var t = e.children ? a.default.Children.only(e.children) : void 0,
                n = this.state.currentChild;
              if (n && t && t.key === n.key && !this.state.nextChild)
                return this.setState({ currentChild: t });
              var r = this.state,
                i = r.currentKey,
                o = r.prevChildren,
                c = {
                  currentKey: String(Number(i) + 1),
                  currentChild: t,
                  height: 0,
                  width: this.props.changeWidth ? 0 : null,
                };
              if ((t && (this.shouldEnterCurrent = !0), n)) {
                var u,
                  h = (0, l.findDOMNode)(this.childRefs[i]);
                (c.height = h ? h.offsetHeight : 0),
                  (c.width = this.props.changeWidth
                    ? h
                      ? h.offsetWidth
                      : 0
                    : null),
                  (c.prevChildren = s({}, o, (((u = {})[i] = n), u))),
                  this.transitioningKeys[i] || this.keysToLeave.push(i);
              }
              this.setState(c);
            }),
            (t.prototype.componentDidUpdate = function () {
              this.shouldEnterCurrent &&
                ((this.shouldEnterCurrent = !1),
                (0, l.findDOMNode)(this.childRefs[this.state.currentKey]) &&
                  this.performEnter(this.state.currentKey));
              var e = this.keysToLeave;
              (this.keysToLeave = []), e.forEach(this.performLeave);
            }),
            (t.prototype.performAppear = function (e) {
              (this.transitioningKeys[e] = !0),
                this.childRefs[e].componentWillAppear(
                  this.handleDoneAppearing.bind(this, e)
                );
            }),
            (t.prototype.performEnter = function (e) {
              (this.transitioningKeys[e] = !0),
                this.childRefs[e].componentWillEnter(
                  this.handleDoneEntering.bind(this, e)
                ),
                this.enqueueHeightTransition();
            }),
            (t.prototype.handleDoneEntering = function (e) {
              delete this.transitioningKeys[e],
                e === this.state.currentKey
                  ? this.setState({ height: null })
                  : this.performLeave(e);
            }),
            (t.prototype.handleDoneLeaving = function (e) {
              delete this.transitioningKeys[e];
              var t = { prevChildren: s({}, this.state.prevChildren) };
              delete t.prevChildren[e],
                delete this.childRefs[e],
                (this.state.currentChild &&
                  (0, l.findDOMNode)(this.childRefs[this.state.currentKey])) ||
                  (t.height = null),
                this.setState(t);
            }),
            (t.prototype.enqueueHeightTransition = function () {
              this.rafHandle ||
                (this.rafHandle = (0, h.default)(this.performHeightTransition));
            }),
            (t.prototype.wrapChild = function (e, t) {
              var n = this.props.transitionName;
              return (
                "object" === (void 0 === n ? "undefined" : o(n)) &&
                  null !== n &&
                  delete (n = s({}, n)).height,
                m(
                  s(
                    {
                      name: n,
                      appear: this.props.transitionAppear,
                      enter: this.props.transitionEnter,
                      leave: this.props.transitionLeave,
                      appearTimeout: this.props.transitionAppearTimeout,
                      enterTimeout: this.props.transitionEnterTimeout,
                      leaveTimeout: this.props.transitionLeaveTimeout,
                    },
                    t
                  ),
                  e
                )
              );
            }),
            (t.prototype.storeChildRef = function (e, t) {
              var n = this,
                r = "string" != typeof e.ref;
              return (
                (0, u.default)(
                  r,
                  "string refs are not supported on children of ReactCSSTransitionReplace and will be ignored. Please use a callback ref instead: https://facebook.github.io/react/docs/refs-and-the-dom.html#the-ref-callback-attribute"
                ),
                (0, c.default)(r ? e.ref : null, function (e) {
                  n.childRefs[t] = e;
                })
              );
            }),
            (t.prototype.render = function () {
              var e = this,
                t = this.state,
                n = t.currentKey,
                r = t.currentChild,
                i = t.prevChildren,
                o = t.height,
                l = t.width,
                c = [],
                u = this.props,
                h = u.overflowHidden,
                d = u.transitionName,
                p = u.component,
                f = u.childComponent,
                m = u.notifyLeaving,
                g =
                  (u.transitionAppear,
                  u.transitionEnter,
                  u.transitionLeave,
                  u.changeWidth,
                  u.transitionAppearTimeout,
                  u.transitionEnterTimeout,
                  u.transitionLeaveTimeout,
                  (function (e, t) {
                    var n = {};
                    for (var r in e)
                      t.indexOf(r) >= 0 ||
                        (Object.prototype.hasOwnProperty.call(e, r) &&
                          (n[r] = e[r]));
                    return n;
                  })(u, [
                    "overflowHidden",
                    "transitionName",
                    "component",
                    "childComponent",
                    "notifyLeaving",
                    "transitionAppear",
                    "transitionEnter",
                    "transitionLeave",
                    "changeWidth",
                    "transitionAppearTimeout",
                    "transitionEnterTimeout",
                    "transitionLeaveTimeout",
                  ])),
                y =
                  this.shouldEnterCurrent ||
                  this.keysToLeave.length ||
                  Object.keys(this.transitioningKeys).length;
              if (
                ((g.style = s({}, g.style)),
                y &&
                  ((g.style.position = "relative"),
                  h && (g.style.overflow = "hidden")),
                null !== o)
              ) {
                var v =
                  "string" == typeof d ? d + "-height" : (d && d.height) || "";
                (g.className = String(g.className || "") + " " + String(v)),
                  (g.style.height = o);
              }
              null !== l && (g.style.width = l);
              var w = {
                position: "absolute",
                top: 0,
                left: 0,
                right: 0,
                bottom: 0,
                userSelect: "none",
              };
              return (
                Object.keys(i).forEach(function (t) {
                  var n = i[t];
                  c.push(
                    a.default.createElement(
                      f,
                      { key: t, style: w },
                      e.wrapChild(
                        m && "string" != typeof n.type
                          ? a.default.cloneElement(n, { isLeaving: !0 })
                          : n,
                        { ref: e.storeChildRef(n, t) }
                      )
                    )
                  );
                }),
                r &&
                  c.push(
                    a.default.createElement(
                      f,
                      {
                        key: n,
                        style: this.transitioningKeys[n]
                          ? w
                          : y
                          ? { position: "relative" }
                          : null,
                      },
                      this.wrapChild(r, { ref: this.storeChildRef(r, n) })
                    )
                  ),
                a.default.createElement(p, g, c)
              );
            }),
            t
          );
        })(a.default.Component)),
        (r.displayName = "ReactCSSTransitionReplace"),
        (r.defaultProps = {
          transitionAppear: !1,
          transitionEnter: !0,
          transitionLeave: !0,
          overflowHidden: !0,
          changeWidth: !1,
          notifyLeaving: !1,
          component: "div",
          childComponent: "span",
        }),
        i);
    (t.default = g), (e.exports = t.default);
  },
  function (e, t, n) {
    "use strict";
    const r = n(303),
      i = (e) => {
        if (e < 1)
          throw new TypeError(
            "Expected `concurrency` to be a number from 1 and up"
          );
        const t = [];
        let n = 0;
        const i = () => {
            n--, t.length > 0 && t.shift()();
          },
          o = (e, t, ...o) => {
            n++;
            const s = r(e, ...o);
            t(s), s.then(i, i);
          },
          s = (r, ...i) =>
            new Promise((s) =>
              ((r, i, ...s) => {
                n < e ? o(r, i, ...s) : t.push(o.bind(null, r, i, ...s));
              })(r, s, ...i)
            );
        return (
          Object.defineProperties(s, {
            activeCount: { get: () => n },
            pendingCount: { get: () => t.length },
          }),
          s
        );
      };
    (e.exports = i), (e.exports.default = i);
  },
  function (e, t, n) {
    "use strict";
    class r {
      constructor(e = {}) {
        if (!(e.maxSize && e.maxSize > 0))
          throw new TypeError("`maxSize` must be a number greater than 0");
        (this.maxSize = e.maxSize),
          (this.cache = new Map()),
          (this.oldCache = new Map()),
          (this._size = 0);
      }
      _set(e, t) {
        this.cache.set(e, t),
          this._size++,
          this._size >= this.maxSize &&
            ((this._size = 0),
            (this.oldCache = this.cache),
            (this.cache = new Map()));
      }
      get(e) {
        if (this.cache.has(e)) return this.cache.get(e);
        if (this.oldCache.has(e)) {
          const t = this.oldCache.get(e);
          return this._set(e, t), t;
        }
      }
      set(e, t) {
        return this.cache.has(e) ? this.cache.set(e, t) : this._set(e, t), this;
      }
      has(e) {
        return this.cache.has(e) || this.oldCache.has(e);
      }
      peek(e) {
        return this.cache.has(e)
          ? this.cache.get(e)
          : this.oldCache.has(e)
          ? this.oldCache.get(e)
          : void 0;
      }
      delete(e) {
        const t = this.cache.delete(e);
        return t && this._size--, this.oldCache.delete(e) || t;
      }
      clear() {
        this.cache.clear(), this.oldCache.clear(), (this._size = 0);
      }
      *keys() {
        for (const [e] of this) yield e;
      }
      *values() {
        for (const [, e] of this) yield e;
      }
      *[Symbol.iterator]() {
        for (const e of this.cache) yield e;
        for (const e of this.oldCache) {
          const [t] = e;
          this.cache.has(t) || (yield e);
        }
      }
      get size() {
        let e = 0;
        for (const t of this.oldCache.keys()) this.cache.has(t) || e++;
        return this._size + e;
      }
    }
    (e.exports = r), (e.exports.default = r);
  },
  function (e, t, n) {
    "use strict";
    const r = n(19).homedir();
    e.exports = (e) => {
      if ("string" != typeof e)
        throw new TypeError("Expected a string, got " + typeof e);
      return r ? e.replace(/^~($|\/|\\)/, r + "$1") : e;
    };
  },
  function (e, t, n) {
    var r, i, o, s, a;
    /*! Moment Duration Format v2.2.2
     *  https://github.com/jsmreese/moment-duration-format
     *  Date: 2018-02-16
     *
     *  Duration format plugin function for the Moment.js library
     *  http://momentjs.com/
     *
     *  Copyright 2018 John Madhavan-Reese
     *  Released under the MIT license
     */ (s = this),
      (a = function (e) {
        var t = !1,
          n = !1,
          r = !1,
          i = !1,
          o = "escape years months weeks days hours minutes seconds milliseconds general".split(
            " "
          ),
          s = [
            {
              type: "seconds",
              targets: [
                { type: "minutes", value: 60 },
                { type: "hours", value: 3600 },
                { type: "days", value: 86400 },
                { type: "weeks", value: 604800 },
                { type: "months", value: 2678400 },
                { type: "years", value: 31536e3 },
              ],
            },
            {
              type: "minutes",
              targets: [
                { type: "hours", value: 60 },
                { type: "days", value: 1440 },
                { type: "weeks", value: 10080 },
                { type: "months", value: 44640 },
                { type: "years", value: 525600 },
              ],
            },
            {
              type: "hours",
              targets: [
                { type: "days", value: 24 },
                { type: "weeks", value: 168 },
                { type: "months", value: 744 },
                { type: "years", value: 8760 },
              ],
            },
            {
              type: "days",
              targets: [
                { type: "weeks", value: 7 },
                { type: "months", value: 31 },
                { type: "years", value: 365 },
              ],
            },
            { type: "months", targets: [{ type: "years", value: 12 }] },
          ];
        function a(e, t) {
          return !(t.length > e.length) && -1 !== e.indexOf(t);
        }
        function l(e) {
          for (var t = ""; e; ) (t += "0"), (e -= 1);
          return t;
        }
        function c(e, t) {
          var n =
            e +
            "+" +
            v(R(t).sort(), function (e) {
              return e + ":" + t[e];
            }).join(",");
          return (
            c.cache[n] || (c.cache[n] = Intl.NumberFormat(e, t)), c.cache[n]
          );
        }
        function u(e, t, o) {
          var s,
            a,
            h,
            d = t.useToLocaleString,
            p = t.useGrouping,
            f = p && t.grouping.slice(),
            m = t.maximumSignificantDigits,
            g = t.minimumIntegerDigits || 1,
            y = t.fractionDigits || 0,
            v = t.groupingSeparator,
            w = t.decimalSeparator;
          if (d && o) {
            var b,
              S = { minimumIntegerDigits: g, useGrouping: p };
            return (
              y &&
                ((S.maximumFractionDigits = y), (S.minimumFractionDigits = y)),
              m && e > 0 && (S.maximumSignificantDigits = m),
              r
                ? (i ||
                    (((b = x({}, t)).useGrouping = !1),
                    (b.decimalSeparator = "."),
                    (e = parseFloat(u(e, b), 10))),
                  c(o, S).format(e))
                : (n ||
                    (((b = x({}, t)).useGrouping = !1),
                    (b.decimalSeparator = "."),
                    (e = parseFloat(u(e, b), 10))),
                  e.toLocaleString(o, S))
            );
          }
          var C = (m ? e.toPrecision(m + 1) : e.toFixed(y + 1)).split("e");
          (h = C[1] || ""), (a = (C = C[0].split("."))[1] || "");
          var E = (s = C[0] || "").length,
            k = a.length,
            R = E + k,
            T = s + a;
          ((m && R === m + 1) || (!m && k === y + 1)) &&
            ((T = (function (e) {
              for (
                var t = e.split("").reverse(), n = 0, r = !0;
                r && n < t.length;

              )
                n
                  ? "9" === t[n]
                    ? (t[n] = "0")
                    : ((t[n] = (parseInt(t[n], 10) + 1).toString()), (r = !1))
                  : (parseInt(t[n], 10) < 5 && (r = !1), (t[n] = "0")),
                  (n += 1);
              return r && t.push("1"), t.reverse().join("");
            })(T)).length ===
              R + 1 && (E += 1),
            k && (T = T.slice(0, -1)),
            (s = T.slice(0, E)),
            (a = T.slice(E))),
            m && (a = a.replace(/0*$/, ""));
          var D = parseInt(h, 10);
          D > 0
            ? a.length <= D
              ? ((s += a += l(D - a.length)), (a = ""))
              : ((s += a.slice(0, D)), (a = a.slice(D)))
            : D < 0 && ((a = l(Math.abs(D) - s.length) + s + a), (s = "0")),
            m ||
              ((a = a.slice(0, y)).length < y && (a += l(y - a.length)),
              s.length < g && (s = l(g - s.length) + s));
          var A,
            _ = "";
          if (p)
            for (C = s; C.length; )
              f.length && (A = f.shift()),
                _ && (_ = v + _),
                (_ = C.slice(-A) + _),
                (C = C.slice(0, -A));
          else _ = s;
          return a && (_ = _ + w + a), _;
        }
        function h(e, t) {
          return e.label.length > t.label.length
            ? -1
            : e.label.length < t.label.length
            ? 1
            : 0;
        }
        function d(e, t) {
          var n = [];
          return (
            y(R(t), function (r) {
              if ("_durationLabels" === r.slice(0, 15)) {
                var i = r.slice(15).toLowerCase();
                y(R(t[r]), function (o) {
                  o.slice(0, 1) === e &&
                    n.push({ type: i, key: o, label: t[r][o] });
                });
              }
            }),
            n
          );
        }
        c.cache = {};
        var p = {
          durationLabelsStandard: {
            S: "millisecond",
            SS: "milliseconds",
            s: "second",
            ss: "seconds",
            m: "minute",
            mm: "minutes",
            h: "hour",
            hh: "hours",
            d: "day",
            dd: "days",
            w: "week",
            ww: "weeks",
            M: "month",
            MM: "months",
            y: "year",
            yy: "years",
          },
          durationLabelsShort: {
            S: "msec",
            SS: "msecs",
            s: "sec",
            ss: "secs",
            m: "min",
            mm: "mins",
            h: "hr",
            hh: "hrs",
            d: "dy",
            dd: "dys",
            w: "wk",
            ww: "wks",
            M: "mo",
            MM: "mos",
            y: "yr",
            yy: "yrs",
          },
          durationTimeTemplates: { HMS: "h:mm:ss", HM: "h:mm", MS: "m:ss" },
          durationLabelTypes: [
            { type: "standard", string: "__" },
            { type: "short", string: "_" },
          ],
          durationPluralKey: function (e, t, n) {
            return 1 === t && null === n ? e : e + e;
          },
        };
        function f(e) {
          return "[object Array]" === Object.prototype.toString.call(e);
        }
        function m(e) {
          return "[object Object]" === Object.prototype.toString.call(e);
        }
        function g(e, t) {
          var n,
            r = 0,
            i = (e && e.length) || 0;
          for (
            "function" != typeof t &&
            ((n = t),
            (t = function (e) {
              return e === n;
            }));
            r < i;

          ) {
            if (t(e[r])) return e[r];
            r += 1;
          }
        }
        function y(e, t) {
          var n = 0,
            r = e.length;
          if (e && r)
            for (; n < r; ) {
              if (!1 === t(e[n], n)) return;
              n += 1;
            }
        }
        function v(e, t) {
          var n = 0,
            r = e.length,
            i = [];
          if (!e || !r) return i;
          for (; n < r; ) (i[n] = t(e[n], n)), (n += 1);
          return i;
        }
        function w(e, t) {
          return v(e, function (e) {
            return e[t];
          });
        }
        function b(e) {
          var t = [];
          return (
            y(e, function (e) {
              e && t.push(e);
            }),
            t
          );
        }
        function S(e) {
          var t = [];
          return (
            y(e, function (e) {
              g(t, e) || t.push(e);
            }),
            t
          );
        }
        function C(e, t) {
          var n = [];
          return (
            y(e, function (e) {
              y(t, function (t) {
                e === t && n.push(e);
              });
            }),
            S(n)
          );
        }
        function E(e, t) {
          var n = [];
          return (
            y(e, function (r, i) {
              if (!t(r)) return (n = e.slice(i)), !1;
            }),
            n
          );
        }
        function k(e, t) {
          return E(e.slice().reverse(), t).reverse();
        }
        function x(e, t) {
          for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
          return e;
        }
        function R(e) {
          var t = [];
          for (var n in e) e.hasOwnProperty(n) && t.push(n);
          return t;
        }
        function T(e, t) {
          var n = 0,
            r = e.length;
          if (!e || !r) return !1;
          for (; n < r; ) {
            if (!0 === t(e[n], n)) return !0;
            n += 1;
          }
          return !1;
        }
        function D(e) {
          var t = [];
          return (
            y(e, function (e) {
              t = t.concat(e);
            }),
            t
          );
        }
        function A(e) {
          return (
            "3.6" ===
            e(3.55, "en", {
              useGrouping: !1,
              minimumIntegerDigits: 1,
              minimumFractionDigits: 1,
              maximumFractionDigits: 1,
            })
          );
        }
        function _(e) {
          var t = !0;
          return !!(
            (t =
              (t =
                (t = t && "1" === e(1, "en", { minimumIntegerDigits: 1 })) &&
                "01" === e(1, "en", { minimumIntegerDigits: 2 })) &&
              "001" === e(1, "en", { minimumIntegerDigits: 3 })) &&
            (t =
              (t =
                (t =
                  (t =
                    t &&
                    "100" ===
                      e(99.99, "en", {
                        maximumFractionDigits: 0,
                        minimumFractionDigits: 0,
                      })) &&
                  "100.0" ===
                    e(99.99, "en", {
                      maximumFractionDigits: 1,
                      minimumFractionDigits: 1,
                    })) &&
                "99.99" ===
                  e(99.99, "en", {
                    maximumFractionDigits: 2,
                    minimumFractionDigits: 2,
                  })) &&
              "99.990" ===
                e(99.99, "en", {
                  maximumFractionDigits: 3,
                  minimumFractionDigits: 3,
                })) &&
            (t =
              (t =
                (t =
                  (t =
                    (t =
                      t &&
                      "100" ===
                        e(99.99, "en", { maximumSignificantDigits: 1 })) &&
                    "100" ===
                      e(99.99, "en", { maximumSignificantDigits: 2 })) &&
                  "100" === e(99.99, "en", { maximumSignificantDigits: 3 })) &&
                "99.99" === e(99.99, "en", { maximumSignificantDigits: 4 })) &&
              "99.99" === e(99.99, "en", { maximumSignificantDigits: 5 })) &&
            (t =
              (t = t && "1,000" === e(1e3, "en", { useGrouping: !0 })) &&
              "1000" === e(1e3, "en", { useGrouping: !1 }))
          );
        }
        function M() {
          var e,
            t = [].slice.call(arguments),
            n = {};
          if (
            (y(t, function (t, r) {
              if (!r) {
                if (!f(t))
                  throw "Expected array as the first argument to durationsFormat.";
                e = t;
              }
              "string" != typeof t && "function" != typeof t
                ? "number" != typeof t
                  ? m(t) && x(n, t)
                  : (n.precision = t)
                : (n.template = t);
            }),
            !e || !e.length)
          )
            return [];
          n.returnMomentTypes = !0;
          var r = v(e, function (e) {
              return e.format(n);
            }),
            i = C(o, S(w(D(r), "type"))),
            s = n.largest;
          return (
            s && (i = i.slice(0, s)),
            (n.returnMomentTypes = !1),
            (n.outputTypes = i),
            v(e, function (e) {
              return e.format(n);
            })
          );
        }
        function P() {
          var n = [].slice.call(arguments),
            i = x({}, this.format.defaults),
            l = this.asMilliseconds(),
            c = this.asMonths();
          "function" == typeof this.isValid &&
            !1 === this.isValid() &&
            ((l = 0), (c = 0));
          var D = l < 0,
            A = e.duration(Math.abs(l), "milliseconds"),
            _ = e.duration(Math.abs(c), "months");
          y(n, function (e) {
            "string" != typeof e && "function" != typeof e
              ? "number" != typeof e
                ? m(e) && x(i, e)
                : (i.precision = e)
              : (i.template = e);
          });
          var M = {
              years: "y",
              months: "M",
              weeks: "w",
              days: "d",
              hours: "h",
              minutes: "m",
              seconds: "s",
              milliseconds: "S",
            },
            P = {
              escape: /\[(.+?)\]/,
              years: /\*?[Yy]+/,
              months: /\*?M+/,
              weeks: /\*?[Ww]+/,
              days: /\*?[Dd]+/,
              hours: /\*?[Hh]+/,
              minutes: /\*?m+/,
              seconds: /\*?s+/,
              milliseconds: /\*?S+/,
              general: /.+?/,
            };
          i.types = o;
          var I = function (e) {
              return g(o, function (t) {
                return P[t].test(e);
              });
            },
            O = new RegExp(
              v(o, function (e) {
                return P[e].source;
              }).join("|"),
              "g"
            );
          i.duration = this;
          var L =
              "function" == typeof i.template
                ? i.template.apply(i)
                : i.template,
            F = i.outputTypes,
            N = i.returnMomentTypes,
            B = i.largest,
            H = [];
          F ||
            (f(i.stopTrim) && (i.stopTrim = i.stopTrim.join("")),
            i.stopTrim &&
              y(i.stopTrim.match(O), function (e) {
                var t = I(e);
                "escape" !== t && "general" !== t && H.push(t);
              }));
          var z = e.localeData();
          z || (z = {}),
            y(R(p), function (e) {
              "function" != typeof p[e]
                ? z["_" + e] || (z["_" + e] = p[e])
                : z[e] || (z[e] = p[e]);
            }),
            y(R(z._durationTimeTemplates), function (e) {
              L = L.replace("_" + e + "_", z._durationTimeTemplates[e]);
            });
          var U = i.userLocale || e.locale(),
            W = i.useLeftUnits,
            j = i.usePlural,
            V = i.precision,
            G = i.forceLength,
            $ = i.useGrouping,
            q = i.trunc,
            K = i.useSignificantDigits && V > 0,
            Y = K ? i.precision : 0,
            Q = Y,
            Z = i.minValue,
            X = !1,
            J = i.maxValue,
            ee = !1,
            te = i.useToLocaleString,
            ne = i.groupingSeparator,
            re = i.decimalSeparator,
            ie = i.grouping;
          te = te && (t || r);
          var oe = i.trim;
          f(oe) && (oe = oe.join(" ")),
            null === oe && (B || J || K) && (oe = "all"),
            (null !== oe && !0 !== oe && "left" !== oe && "right" !== oe) ||
              (oe = "large"),
            !1 === oe && (oe = "");
          var se = function (e) {
              return e.test(oe);
            },
            ae = /large/,
            le = /small/,
            ce = /both/,
            ue = /mid/,
            he = /^all|[^sm]all/,
            de = /final/,
            pe = B > 0 || T([ae, ce, he], se),
            fe = T([le, ce, he], se),
            me = T([ue, he], se),
            ge = T([de, he], se),
            ye = v(L.match(O), function (e, t) {
              var n = I(e);
              return (
                "*" === e.slice(0, 1) &&
                  ((e = e.slice(1)),
                  "escape" !== n && "general" !== n && H.push(n)),
                {
                  index: t,
                  length: e.length,
                  text: "",
                  token: "escape" === n ? e.replace(P.escape, "$1") : e,
                  type: "escape" === n || "general" === n ? null : n,
                }
              );
            }),
            ve = { index: 0, length: 0, token: "", text: "", type: null },
            we = [];
          W && ye.reverse(),
            y(ye, function (e) {
              if (e.type)
                return (ve.type || ve.text) && we.push(ve), void (ve = e);
              W ? (ve.text = e.token + ve.text) : (ve.text += e.token);
            }),
            (ve.type || ve.text) && we.push(ve),
            W && we.reverse();
          var be = C(o, S(b(w(we, "type"))));
          if (!be.length) return w(we, "text").join("");
          be = v(be, function (e, t) {
            var n,
              r = t + 1 === be.length,
              o = !t;
            n = "years" === e || "months" === e ? _.as(e) : A.as(e);
            var s = Math.floor(n),
              a = n - s,
              l = g(we, function (t) {
                return e === t.type;
              });
            return (
              o && J && n > J && (ee = !0),
              r && Z && Math.abs(i.duration.as(e)) < Z && (X = !0),
              o && null === G && l.length > 1 && (G = !0),
              A.subtract(s, e),
              _.subtract(s, e),
              {
                rawValue: n,
                wholeValue: s,
                decimalValue: r ? a : 0,
                isSmallest: r,
                isLargest: o,
                type: e,
                tokenLength: l.length,
              }
            );
          });
          var Se = q ? Math.floor : Math.round,
            Ce = function (e, t) {
              var n = Math.pow(10, t);
              return Se(e * n) / n;
            },
            Ee = !1,
            ke = !1,
            xe = function (e, t) {
              var n = {
                useGrouping: $,
                groupingSeparator: ne,
                decimalSeparator: re,
                grouping: ie,
                useToLocaleString: te,
              };
              return (
                K &&
                  (Y <= 0
                    ? ((e.rawValue = 0),
                      (e.wholeValue = 0),
                      (e.decimalValue = 0))
                    : ((n.maximumSignificantDigits = Y),
                      (e.significantDigits = Y))),
                ee &&
                  !ke &&
                  (e.isLargest
                    ? ((e.wholeValue = J), (e.decimalValue = 0))
                    : ((e.wholeValue = 0), (e.decimalValue = 0))),
                X &&
                  !ke &&
                  (e.isSmallest
                    ? ((e.wholeValue = Z), (e.decimalValue = 0))
                    : ((e.wholeValue = 0), (e.decimalValue = 0))),
                e.isSmallest ||
                (e.significantDigits &&
                  e.significantDigits - e.wholeValue.toString().length <= 0)
                  ? V < 0
                    ? (e.value = Ce(e.wholeValue, V))
                    : 0 === V
                    ? (e.value = Se(e.wholeValue + e.decimalValue))
                    : K
                    ? ((e.value = q
                        ? Ce(e.rawValue, Y - e.wholeValue.toString().length)
                        : e.rawValue),
                      e.wholeValue && (Y -= e.wholeValue.toString().length))
                    : ((n.fractionDigits = V),
                      (e.value = q
                        ? e.wholeValue + Ce(e.decimalValue, V)
                        : e.wholeValue + e.decimalValue))
                  : K && e.wholeValue
                  ? ((e.value = Math.round(
                      Ce(
                        e.wholeValue,
                        e.significantDigits - e.wholeValue.toString().length
                      )
                    )),
                    (Y -= e.wholeValue.toString().length))
                  : (e.value = e.wholeValue),
                e.tokenLength > 1 &&
                  (G || Ee) &&
                  ((n.minimumIntegerDigits = e.tokenLength),
                  ke &&
                    n.maximumSignificantDigits < e.tokenLength &&
                    delete n.maximumSignificantDigits),
                !Ee &&
                  (e.value > 0 || "" === oe || g(H, e.type) || g(F, e.type)) &&
                  (Ee = !0),
                (e.formattedValue = u(e.value, n, U)),
                (n.useGrouping = !1),
                (n.decimalSeparator = "."),
                (e.formattedValueEn = u(e.value, n, "en")),
                2 === e.tokenLength &&
                  "milliseconds" === e.type &&
                  (e.formattedValueMS = u(
                    e.value,
                    { minimumIntegerDigits: 3, useGrouping: !1 },
                    "en"
                  ).slice(0, 2)),
                e
              );
            };
          if ((be = b((be = v(be, xe)))).length > 1) {
            var Re = function (e) {
                return g(be, function (t) {
                  return t.type === e;
                });
              },
              Te = function (e) {
                var t = Re(e.type);
                t &&
                  y(e.targets, function (e) {
                    var n = Re(e.type);
                    n &&
                      parseInt(t.formattedValueEn, 10) === e.value &&
                      ((t.rawValue = 0),
                      (t.wholeValue = 0),
                      (t.decimalValue = 0),
                      (n.rawValue += 1),
                      (n.wholeValue += 1),
                      (n.decimalValue = 0),
                      (n.formattedValueEn = n.wholeValue.toString()),
                      (ke = !0));
                  });
              };
            y(s, Te);
          }
          return (
            ke && ((Ee = !1), (Y = Q), (be = b((be = v(be, xe))))),
            !F || (ee && !i.trim)
              ? (pe &&
                  (be = E(be, function (e) {
                    return !e.isSmallest && !e.wholeValue && !g(H, e.type);
                  })),
                B && be.length && (be = be.slice(0, B)),
                fe &&
                  be.length > 1 &&
                  (be = k(be, function (e) {
                    return !e.wholeValue && !g(H, e.type) && !e.isLargest;
                  })),
                me &&
                  (be = b(
                    (be = v(be, function (e, t) {
                      return t > 0 && t < be.length - 1 && !e.wholeValue
                        ? null
                        : e;
                    }))
                  )),
                !ge ||
                  1 !== be.length ||
                  be[0].wholeValue ||
                  (!q && be[0].isSmallest && be[0].rawValue < Z) ||
                  (be = []))
              : (be = b(
                  (be = v(be, function (e) {
                    return g(F, function (t) {
                      return e.type === t;
                    })
                      ? e
                      : null;
                  }))
                )),
            N
              ? be
              : (y(we, function (e) {
                  var t = M[e.type],
                    n = g(be, function (t) {
                      return t.type === e.type;
                    });
                  if (t && n) {
                    var r = n.formattedValueEn.split(".");
                    (r[0] = parseInt(r[0], 10)),
                      r[1]
                        ? (r[1] = parseFloat("0." + r[1], 10))
                        : (r[1] = null);
                    var i = z.durationPluralKey(t, r[0], r[1]),
                      o = d(t, z),
                      s = !1,
                      l = {};
                    y(z._durationLabelTypes, function (t) {
                      var n = g(o, function (e) {
                        return e.type === t.type && e.key === i;
                      });
                      n &&
                        ((l[n.type] = n.label),
                        a(e.text, t.string) &&
                          ((e.text = e.text.replace(t.string, n.label)),
                          (s = !0)));
                    }),
                      j &&
                        !s &&
                        (o.sort(h),
                        y(o, function (t) {
                          return l[t.type] === t.label
                            ? !a(e.text, t.label) && void 0
                            : a(e.text, t.label)
                            ? ((e.text = e.text.replace(t.label, l[t.type])),
                              !1)
                            : void 0;
                        }));
                  }
                }),
                (we = v(we, function (e) {
                  if (!e.type) return e.text;
                  var t = g(be, function (t) {
                    return t.type === e.type;
                  });
                  if (!t) return "";
                  var n = "";
                  return (
                    W && (n += e.text),
                    ((D && ee) || (!D && X)) &&
                      ((n += "< "), (ee = !1), (X = !1)),
                    ((D && X) || (!D && ee)) &&
                      ((n += "> "), (ee = !1), (X = !1)),
                    D &&
                      (t.value > 0 ||
                        "" === oe ||
                        g(H, t.type) ||
                        g(F, t.type)) &&
                      ((n += "-"), (D = !1)),
                    "milliseconds" === e.type && t.formattedValueMS
                      ? (n += t.formattedValueMS)
                      : (n += t.formattedValue),
                    W || (n += e.text),
                    n
                  );
                }))
                  .join("")
                  .replace(/(,| |:|\.)*$/, "")
                  .replace(/^(,| |:|\.)*/, ""))
          );
        }
        function I() {
          var e = this.duration,
            t = function (t) {
              return e._data[t];
            },
            n = g(this.types, t),
            r = (function (e, t) {
              for (var n = e.length; (n -= 1); ) if (t(e[n])) return e[n];
            })(this.types, t);
          switch (n) {
            case "milliseconds":
              return "S __";
            case "seconds":
            case "minutes":
              return "*_MS_";
            case "hours":
              return "_HMS_";
            case "days":
              if (n === r) return "d __";
            case "weeks":
              return n === r
                ? "w __"
                : (null === this.trim && (this.trim = "both"),
                  "w __, d __, h __");
            case "months":
              if (n === r) return "M __";
            case "years":
              return n === r
                ? "y __"
                : (null === this.trim && (this.trim = "both"),
                  "y __, M __, d __");
            default:
              return (
                null === this.trim && (this.trim = "both"),
                "y __, d __, h __, m __, s __"
              );
          }
        }
        function O(e) {
          if (!e)
            throw "Moment Duration Format init cannot find moment instance.";
          (e.duration.format = M),
            (e.duration.fn.format = P),
            (e.duration.fn.format.defaults = {
              trim: null,
              stopTrim: null,
              largest: null,
              maxValue: null,
              minValue: null,
              precision: 0,
              trunc: !1,
              forceLength: null,
              userLocale: null,
              usePlural: !0,
              useLeftUnits: !1,
              useGrouping: !0,
              useSignificantDigits: !1,
              template: I,
              useToLocaleString: !0,
              groupingSeparator: ",",
              decimalSeparator: ".",
              grouping: [3],
            }),
            e.updateLocale("en", p);
        }
        var L = function (e, t, n) {
          return e.toLocaleString(t, n);
        };
        (t =
          (function () {
            try {
              (0).toLocaleString("i");
            } catch (e) {
              return "RangeError" === e.name;
            }
            return !1;
          })() && _(L)),
          (n = t && A(L));
        var F = function (e, t, n) {
          if (
            "undefined" != typeof window &&
            window &&
            window.Intl &&
            window.Intl.NumberFormat
          )
            return window.Intl.NumberFormat(t, n).format(e);
        };
        return (r = _(F)), (i = r && A(F)), O(e), O;
      }),
      (i = [n(12)]),
      void 0 === (o = "function" == typeof (r = a) ? r.apply(t, i) : r) ||
        (e.exports = o),
      s && (s.momentDurationFormatSetup = s.moment ? a(s.moment) : a);
  },
  ,
  ,
  ,
  function (e, t, n) {
    (t.SourceMapGenerator = n(89).SourceMapGenerator),
      (t.SourceMapConsumer = n(149).SourceMapConsumer),
      (t.SourceNode = n(152).SourceNode);
  },
  function (e, t) {
    var n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(
      ""
    );
    (t.encode = function (e) {
      if (0 <= e && e < n.length) return n[e];
      throw new TypeError("Must be between 0 and 63: " + e);
    }),
      (t.decode = function (e) {
        return 65 <= e && e <= 90
          ? e - 65
          : 97 <= e && e <= 122
          ? e - 97 + 26
          : 48 <= e && e <= 57
          ? e - 48 + 52
          : 43 == e
          ? 62
          : 47 == e
          ? 63
          : -1;
      });
  },
  function (e, t, n) {
    var r = n(38);
    function i() {
      (this._array = []),
        (this._sorted = !0),
        (this._last = { generatedLine: -1, generatedColumn: 0 });
    }
    (i.prototype.unsortedForEach = function (e, t) {
      this._array.forEach(e, t);
    }),
      (i.prototype.add = function (e) {
        var t, n, i, o, s, a;
        (t = this._last),
          (n = e),
          (i = t.generatedLine),
          (o = n.generatedLine),
          (s = t.generatedColumn),
          (a = n.generatedColumn),
          o > i ||
          (o == i && a >= s) ||
          r.compareByGeneratedPositionsInflated(t, n) <= 0
            ? ((this._last = e), this._array.push(e))
            : ((this._sorted = !1), this._array.push(e));
      }),
      (i.prototype.toArray = function () {
        return (
          this._sorted ||
            (this._array.sort(r.compareByGeneratedPositionsInflated),
            (this._sorted = !0)),
          this._array
        );
      }),
      (t.MappingList = i);
  },
  function (e, t, n) {
    var r = n(38),
      i = n(150),
      o = n(91).ArraySet,
      s = n(90),
      a = n(151).quickSort;
    function l(e) {
      var t = e;
      return (
        "string" == typeof e && (t = JSON.parse(e.replace(/^\)\]\}'/, ""))),
        null != t.sections ? new h(t) : new c(t)
      );
    }
    function c(e) {
      var t = e;
      "string" == typeof e && (t = JSON.parse(e.replace(/^\)\]\}'/, "")));
      var n = r.getArg(t, "version"),
        i = r.getArg(t, "sources"),
        s = r.getArg(t, "names", []),
        a = r.getArg(t, "sourceRoot", null),
        l = r.getArg(t, "sourcesContent", null),
        c = r.getArg(t, "mappings"),
        u = r.getArg(t, "file", null);
      if (n != this._version) throw new Error("Unsupported version: " + n);
      (i = i
        .map(String)
        .map(r.normalize)
        .map(function (e) {
          return a && r.isAbsolute(a) && r.isAbsolute(e) ? r.relative(a, e) : e;
        })),
        (this._names = o.fromArray(s.map(String), !0)),
        (this._sources = o.fromArray(i, !0)),
        (this.sourceRoot = a),
        (this.sourcesContent = l),
        (this._mappings = c),
        (this.file = u);
    }
    function u() {
      (this.generatedLine = 0),
        (this.generatedColumn = 0),
        (this.source = null),
        (this.originalLine = null),
        (this.originalColumn = null),
        (this.name = null);
    }
    function h(e) {
      var t = e;
      "string" == typeof e && (t = JSON.parse(e.replace(/^\)\]\}'/, "")));
      var n = r.getArg(t, "version"),
        i = r.getArg(t, "sections");
      if (n != this._version) throw new Error("Unsupported version: " + n);
      (this._sources = new o()), (this._names = new o());
      var s = { line: -1, column: 0 };
      this._sections = i.map(function (e) {
        if (e.url)
          throw new Error("Support for url field in sections not implemented.");
        var t = r.getArg(e, "offset"),
          n = r.getArg(t, "line"),
          i = r.getArg(t, "column");
        if (n < s.line || (n === s.line && i < s.column))
          throw new Error(
            "Section offsets must be ordered and non-overlapping."
          );
        return (
          (s = t),
          {
            generatedOffset: { generatedLine: n + 1, generatedColumn: i + 1 },
            consumer: new l(r.getArg(e, "map")),
          }
        );
      });
    }
    (l.fromSourceMap = function (e) {
      return c.fromSourceMap(e);
    }),
      (l.prototype._version = 3),
      (l.prototype.__generatedMappings = null),
      Object.defineProperty(l.prototype, "_generatedMappings", {
        get: function () {
          return (
            this.__generatedMappings ||
              this._parseMappings(this._mappings, this.sourceRoot),
            this.__generatedMappings
          );
        },
      }),
      (l.prototype.__originalMappings = null),
      Object.defineProperty(l.prototype, "_originalMappings", {
        get: function () {
          return (
            this.__originalMappings ||
              this._parseMappings(this._mappings, this.sourceRoot),
            this.__originalMappings
          );
        },
      }),
      (l.prototype._charIsMappingSeparator = function (e, t) {
        var n = e.charAt(t);
        return ";" === n || "," === n;
      }),
      (l.prototype._parseMappings = function (e, t) {
        throw new Error("Subclasses must implement _parseMappings");
      }),
      (l.GENERATED_ORDER = 1),
      (l.ORIGINAL_ORDER = 2),
      (l.GREATEST_LOWER_BOUND = 1),
      (l.LEAST_UPPER_BOUND = 2),
      (l.prototype.eachMapping = function (e, t, n) {
        var i,
          o = t || null;
        switch (n || l.GENERATED_ORDER) {
          case l.GENERATED_ORDER:
            i = this._generatedMappings;
            break;
          case l.ORIGINAL_ORDER:
            i = this._originalMappings;
            break;
          default:
            throw new Error("Unknown order of iteration.");
        }
        var s = this.sourceRoot;
        i.map(function (e) {
          var t = null === e.source ? null : this._sources.at(e.source);
          return (
            null != t && null != s && (t = r.join(s, t)),
            {
              source: t,
              generatedLine: e.generatedLine,
              generatedColumn: e.generatedColumn,
              originalLine: e.originalLine,
              originalColumn: e.originalColumn,
              name: null === e.name ? null : this._names.at(e.name),
            }
          );
        }, this).forEach(e, o);
      }),
      (l.prototype.allGeneratedPositionsFor = function (e) {
        var t = r.getArg(e, "line"),
          n = {
            source: r.getArg(e, "source"),
            originalLine: t,
            originalColumn: r.getArg(e, "column", 0),
          };
        if (
          (null != this.sourceRoot &&
            (n.source = r.relative(this.sourceRoot, n.source)),
          !this._sources.has(n.source))
        )
          return [];
        n.source = this._sources.indexOf(n.source);
        var o = [],
          s = this._findMapping(
            n,
            this._originalMappings,
            "originalLine",
            "originalColumn",
            r.compareByOriginalPositions,
            i.LEAST_UPPER_BOUND
          );
        if (s >= 0) {
          var a = this._originalMappings[s];
          if (void 0 === e.column)
            for (var l = a.originalLine; a && a.originalLine === l; )
              o.push({
                line: r.getArg(a, "generatedLine", null),
                column: r.getArg(a, "generatedColumn", null),
                lastColumn: r.getArg(a, "lastGeneratedColumn", null),
              }),
                (a = this._originalMappings[++s]);
          else
            for (
              var c = a.originalColumn;
              a && a.originalLine === t && a.originalColumn == c;

            )
              o.push({
                line: r.getArg(a, "generatedLine", null),
                column: r.getArg(a, "generatedColumn", null),
                lastColumn: r.getArg(a, "lastGeneratedColumn", null),
              }),
                (a = this._originalMappings[++s]);
        }
        return o;
      }),
      (t.SourceMapConsumer = l),
      (c.prototype = Object.create(l.prototype)),
      (c.prototype.consumer = l),
      (c.fromSourceMap = function (e) {
        var t = Object.create(c.prototype),
          n = (t._names = o.fromArray(e._names.toArray(), !0)),
          i = (t._sources = o.fromArray(e._sources.toArray(), !0));
        (t.sourceRoot = e._sourceRoot),
          (t.sourcesContent = e._generateSourcesContent(
            t._sources.toArray(),
            t.sourceRoot
          )),
          (t.file = e._file);
        for (
          var s = e._mappings.toArray().slice(),
            l = (t.__generatedMappings = []),
            h = (t.__originalMappings = []),
            d = 0,
            p = s.length;
          d < p;
          d++
        ) {
          var f = s[d],
            m = new u();
          (m.generatedLine = f.generatedLine),
            (m.generatedColumn = f.generatedColumn),
            f.source &&
              ((m.source = i.indexOf(f.source)),
              (m.originalLine = f.originalLine),
              (m.originalColumn = f.originalColumn),
              f.name && (m.name = n.indexOf(f.name)),
              h.push(m)),
            l.push(m);
        }
        return a(t.__originalMappings, r.compareByOriginalPositions), t;
      }),
      (c.prototype._version = 3),
      Object.defineProperty(c.prototype, "sources", {
        get: function () {
          return this._sources.toArray().map(function (e) {
            return null != this.sourceRoot ? r.join(this.sourceRoot, e) : e;
          }, this);
        },
      }),
      (c.prototype._parseMappings = function (e, t) {
        for (
          var n,
            i,
            o,
            l,
            c,
            h = 1,
            d = 0,
            p = 0,
            f = 0,
            m = 0,
            g = 0,
            y = e.length,
            v = 0,
            w = {},
            b = {},
            S = [],
            C = [];
          v < y;

        )
          if (";" === e.charAt(v)) h++, v++, (d = 0);
          else if ("," === e.charAt(v)) v++;
          else {
            for (
              (n = new u()).generatedLine = h, l = v;
              l < y && !this._charIsMappingSeparator(e, l);
              l++
            );
            if ((o = w[(i = e.slice(v, l))])) v += i.length;
            else {
              for (o = []; v < l; )
                s.decode(e, v, b), (c = b.value), (v = b.rest), o.push(c);
              if (2 === o.length)
                throw new Error("Found a source, but no line and column");
              if (3 === o.length)
                throw new Error("Found a source and line, but no column");
              w[i] = o;
            }
            (n.generatedColumn = d + o[0]),
              (d = n.generatedColumn),
              o.length > 1 &&
                ((n.source = m + o[1]),
                (m += o[1]),
                (n.originalLine = p + o[2]),
                (p = n.originalLine),
                (n.originalLine += 1),
                (n.originalColumn = f + o[3]),
                (f = n.originalColumn),
                o.length > 4 && ((n.name = g + o[4]), (g += o[4]))),
              C.push(n),
              "number" == typeof n.originalLine && S.push(n);
          }
        a(C, r.compareByGeneratedPositionsDeflated),
          (this.__generatedMappings = C),
          a(S, r.compareByOriginalPositions),
          (this.__originalMappings = S);
      }),
      (c.prototype._findMapping = function (e, t, n, r, o, s) {
        if (e[n] <= 0)
          throw new TypeError(
            "Line must be greater than or equal to 1, got " + e[n]
          );
        if (e[r] < 0)
          throw new TypeError(
            "Column must be greater than or equal to 0, got " + e[r]
          );
        return i.search(e, t, o, s);
      }),
      (c.prototype.computeColumnSpans = function () {
        for (var e = 0; e < this._generatedMappings.length; ++e) {
          var t = this._generatedMappings[e];
          if (e + 1 < this._generatedMappings.length) {
            var n = this._generatedMappings[e + 1];
            if (t.generatedLine === n.generatedLine) {
              t.lastGeneratedColumn = n.generatedColumn - 1;
              continue;
            }
          }
          t.lastGeneratedColumn = 1 / 0;
        }
      }),
      (c.prototype.originalPositionFor = function (e) {
        var t = {
            generatedLine: r.getArg(e, "line"),
            generatedColumn: r.getArg(e, "column"),
          },
          n = this._findMapping(
            t,
            this._generatedMappings,
            "generatedLine",
            "generatedColumn",
            r.compareByGeneratedPositionsDeflated,
            r.getArg(e, "bias", l.GREATEST_LOWER_BOUND)
          );
        if (n >= 0) {
          var i = this._generatedMappings[n];
          if (i.generatedLine === t.generatedLine) {
            var o = r.getArg(i, "source", null);
            null !== o &&
              ((o = this._sources.at(o)),
              null != this.sourceRoot && (o = r.join(this.sourceRoot, o)));
            var s = r.getArg(i, "name", null);
            return (
              null !== s && (s = this._names.at(s)),
              {
                source: o,
                line: r.getArg(i, "originalLine", null),
                column: r.getArg(i, "originalColumn", null),
                name: s,
              }
            );
          }
        }
        return { source: null, line: null, column: null, name: null };
      }),
      (c.prototype.hasContentsOfAllSources = function () {
        return (
          !!this.sourcesContent &&
          this.sourcesContent.length >= this._sources.size() &&
          !this.sourcesContent.some(function (e) {
            return null == e;
          })
        );
      }),
      (c.prototype.sourceContentFor = function (e, t) {
        if (!this.sourcesContent) return null;
        if (
          (null != this.sourceRoot && (e = r.relative(this.sourceRoot, e)),
          this._sources.has(e))
        )
          return this.sourcesContent[this._sources.indexOf(e)];
        var n;
        if (null != this.sourceRoot && (n = r.urlParse(this.sourceRoot))) {
          var i = e.replace(/^file:\/\//, "");
          if ("file" == n.scheme && this._sources.has(i))
            return this.sourcesContent[this._sources.indexOf(i)];
          if ((!n.path || "/" == n.path) && this._sources.has("/" + e))
            return this.sourcesContent[this._sources.indexOf("/" + e)];
        }
        if (t) return null;
        throw new Error('"' + e + '" is not in the SourceMap.');
      }),
      (c.prototype.generatedPositionFor = function (e) {
        var t = r.getArg(e, "source");
        if (
          (null != this.sourceRoot && (t = r.relative(this.sourceRoot, t)),
          !this._sources.has(t))
        )
          return { line: null, column: null, lastColumn: null };
        var n = {
            source: (t = this._sources.indexOf(t)),
            originalLine: r.getArg(e, "line"),
            originalColumn: r.getArg(e, "column"),
          },
          i = this._findMapping(
            n,
            this._originalMappings,
            "originalLine",
            "originalColumn",
            r.compareByOriginalPositions,
            r.getArg(e, "bias", l.GREATEST_LOWER_BOUND)
          );
        if (i >= 0) {
          var o = this._originalMappings[i];
          if (o.source === n.source)
            return {
              line: r.getArg(o, "generatedLine", null),
              column: r.getArg(o, "generatedColumn", null),
              lastColumn: r.getArg(o, "lastGeneratedColumn", null),
            };
        }
        return { line: null, column: null, lastColumn: null };
      }),
      (t.BasicSourceMapConsumer = c),
      (h.prototype = Object.create(l.prototype)),
      (h.prototype.constructor = l),
      (h.prototype._version = 3),
      Object.defineProperty(h.prototype, "sources", {
        get: function () {
          for (var e = [], t = 0; t < this._sections.length; t++)
            for (var n = 0; n < this._sections[t].consumer.sources.length; n++)
              e.push(this._sections[t].consumer.sources[n]);
          return e;
        },
      }),
      (h.prototype.originalPositionFor = function (e) {
        var t = {
            generatedLine: r.getArg(e, "line"),
            generatedColumn: r.getArg(e, "column"),
          },
          n = i.search(t, this._sections, function (e, t) {
            var n = e.generatedLine - t.generatedOffset.generatedLine;
            return n || e.generatedColumn - t.generatedOffset.generatedColumn;
          }),
          o = this._sections[n];
        return o
          ? o.consumer.originalPositionFor({
              line: t.generatedLine - (o.generatedOffset.generatedLine - 1),
              column:
                t.generatedColumn -
                (o.generatedOffset.generatedLine === t.generatedLine
                  ? o.generatedOffset.generatedColumn - 1
                  : 0),
              bias: e.bias,
            })
          : { source: null, line: null, column: null, name: null };
      }),
      (h.prototype.hasContentsOfAllSources = function () {
        return this._sections.every(function (e) {
          return e.consumer.hasContentsOfAllSources();
        });
      }),
      (h.prototype.sourceContentFor = function (e, t) {
        for (var n = 0; n < this._sections.length; n++) {
          var r = this._sections[n].consumer.sourceContentFor(e, !0);
          if (r) return r;
        }
        if (t) return null;
        throw new Error('"' + e + '" is not in the SourceMap.');
      }),
      (h.prototype.generatedPositionFor = function (e) {
        for (var t = 0; t < this._sections.length; t++) {
          var n = this._sections[t];
          if (-1 !== n.consumer.sources.indexOf(r.getArg(e, "source"))) {
            var i = n.consumer.generatedPositionFor(e);
            if (i)
              return {
                line: i.line + (n.generatedOffset.generatedLine - 1),
                column:
                  i.column +
                  (n.generatedOffset.generatedLine === i.line
                    ? n.generatedOffset.generatedColumn - 1
                    : 0),
              };
          }
        }
        return { line: null, column: null };
      }),
      (h.prototype._parseMappings = function (e, t) {
        (this.__generatedMappings = []), (this.__originalMappings = []);
        for (var n = 0; n < this._sections.length; n++)
          for (
            var i = this._sections[n], o = i.consumer._generatedMappings, s = 0;
            s < o.length;
            s++
          ) {
            var l = o[s],
              c = i.consumer._sources.at(l.source);
            null !== i.consumer.sourceRoot &&
              (c = r.join(i.consumer.sourceRoot, c)),
              this._sources.add(c),
              (c = this._sources.indexOf(c));
            var u = i.consumer._names.at(l.name);
            this._names.add(u), (u = this._names.indexOf(u));
            var h = {
              source: c,
              generatedLine:
                l.generatedLine + (i.generatedOffset.generatedLine - 1),
              generatedColumn:
                l.generatedColumn +
                (i.generatedOffset.generatedLine === l.generatedLine
                  ? i.generatedOffset.generatedColumn - 1
                  : 0),
              originalLine: l.originalLine,
              originalColumn: l.originalColumn,
              name: u,
            };
            this.__generatedMappings.push(h),
              "number" == typeof h.originalLine &&
                this.__originalMappings.push(h);
          }
        a(this.__generatedMappings, r.compareByGeneratedPositionsDeflated),
          a(this.__originalMappings, r.compareByOriginalPositions);
      }),
      (t.IndexedSourceMapConsumer = h);
  },
  function (e, t) {
    (t.GREATEST_LOWER_BOUND = 1),
      (t.LEAST_UPPER_BOUND = 2),
      (t.search = function (e, n, r, i) {
        if (0 === n.length) return -1;
        var o = (function e(n, r, i, o, s, a) {
          var l = Math.floor((r - n) / 2) + n,
            c = s(i, o[l], !0);
          return 0 === c
            ? l
            : c > 0
            ? r - l > 1
              ? e(l, r, i, o, s, a)
              : a == t.LEAST_UPPER_BOUND
              ? r < o.length
                ? r
                : -1
              : l
            : l - n > 1
            ? e(n, l, i, o, s, a)
            : a == t.LEAST_UPPER_BOUND
            ? l
            : n < 0
            ? -1
            : n;
        })(-1, n.length, e, n, r, i || t.GREATEST_LOWER_BOUND);
        if (o < 0) return -1;
        for (; o - 1 >= 0 && 0 === r(n[o], n[o - 1], !0); ) --o;
        return o;
      });
  },
  function (e, t) {
    function n(e, t, n) {
      var r = e[t];
      (e[t] = e[n]), (e[n] = r);
    }
    function r(e, t, i, o) {
      if (i < o) {
        var s = i - 1;
        n(e, ((u = i), (h = o), Math.round(u + Math.random() * (h - u))), o);
        for (var a = e[o], l = i; l < o; l++)
          t(e[l], a) <= 0 && n(e, (s += 1), l);
        n(e, s + 1, l);
        var c = s + 1;
        r(e, t, i, c - 1), r(e, t, c + 1, o);
      }
      var u, h;
    }
    t.quickSort = function (e, t) {
      r(e, t, 0, e.length - 1);
    };
  },
  function (e, t, n) {
    var r = n(89).SourceMapGenerator,
      i = n(38),
      o = /(\r?\n)/,
      s = "$$$isSourceNode$$$";
    function a(e, t, n, r, i) {
      (this.children = []),
        (this.sourceContents = {}),
        (this.line = null == e ? null : e),
        (this.column = null == t ? null : t),
        (this.source = null == n ? null : n),
        (this.name = null == i ? null : i),
        (this[s] = !0),
        null != r && this.add(r);
    }
    (a.fromStringWithSourceMap = function (e, t, n) {
      var r = new a(),
        s = e.split(o),
        l = 0,
        c = function () {
          return e() + (e() || "");
          function e() {
            return l < s.length ? s[l++] : void 0;
          }
        },
        u = 1,
        h = 0,
        d = null;
      return (
        t.eachMapping(function (e) {
          if (null !== d) {
            if (!(u < e.generatedLine)) {
              var t = (n = s[l]).substr(0, e.generatedColumn - h);
              return (
                (s[l] = n.substr(e.generatedColumn - h)),
                (h = e.generatedColumn),
                p(d, t),
                void (d = e)
              );
            }
            p(d, c()), u++, (h = 0);
          }
          for (; u < e.generatedLine; ) r.add(c()), u++;
          if (h < e.generatedColumn) {
            var n = s[l];
            r.add(n.substr(0, e.generatedColumn)),
              (s[l] = n.substr(e.generatedColumn)),
              (h = e.generatedColumn);
          }
          d = e;
        }, this),
        l < s.length && (d && p(d, c()), r.add(s.splice(l).join(""))),
        t.sources.forEach(function (e) {
          var o = t.sourceContentFor(e);
          null != o &&
            (null != n && (e = i.join(n, e)), r.setSourceContent(e, o));
        }),
        r
      );
      function p(e, t) {
        if (null === e || void 0 === e.source) r.add(t);
        else {
          var o = n ? i.join(n, e.source) : e.source;
          r.add(new a(e.originalLine, e.originalColumn, o, t, e.name));
        }
      }
    }),
      (a.prototype.add = function (e) {
        if (Array.isArray(e))
          e.forEach(function (e) {
            this.add(e);
          }, this);
        else {
          if (!e[s] && "string" != typeof e)
            throw new TypeError(
              "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " +
                e
            );
          e && this.children.push(e);
        }
        return this;
      }),
      (a.prototype.prepend = function (e) {
        if (Array.isArray(e))
          for (var t = e.length - 1; t >= 0; t--) this.prepend(e[t]);
        else {
          if (!e[s] && "string" != typeof e)
            throw new TypeError(
              "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " +
                e
            );
          this.children.unshift(e);
        }
        return this;
      }),
      (a.prototype.walk = function (e) {
        for (var t, n = 0, r = this.children.length; n < r; n++)
          (t = this.children[n])[s]
            ? t.walk(e)
            : "" !== t &&
              e(t, {
                source: this.source,
                line: this.line,
                column: this.column,
                name: this.name,
              });
      }),
      (a.prototype.join = function (e) {
        var t,
          n,
          r = this.children.length;
        if (r > 0) {
          for (t = [], n = 0; n < r - 1; n++)
            t.push(this.children[n]), t.push(e);
          t.push(this.children[n]), (this.children = t);
        }
        return this;
      }),
      (a.prototype.replaceRight = function (e, t) {
        var n = this.children[this.children.length - 1];
        return (
          n[s]
            ? n.replaceRight(e, t)
            : "string" == typeof n
            ? (this.children[this.children.length - 1] = n.replace(e, t))
            : this.children.push("".replace(e, t)),
          this
        );
      }),
      (a.prototype.setSourceContent = function (e, t) {
        this.sourceContents[i.toSetString(e)] = t;
      }),
      (a.prototype.walkSourceContents = function (e) {
        for (var t = 0, n = this.children.length; t < n; t++)
          this.children[t][s] && this.children[t].walkSourceContents(e);
        var r = Object.keys(this.sourceContents);
        for (t = 0, n = r.length; t < n; t++)
          e(i.fromSetString(r[t]), this.sourceContents[r[t]]);
      }),
      (a.prototype.toString = function () {
        var e = "";
        return (
          this.walk(function (t) {
            e += t;
          }),
          e
        );
      }),
      (a.prototype.toStringWithSourceMap = function (e) {
        var t = { code: "", line: 1, column: 0 },
          n = new r(e),
          i = !1,
          o = null,
          s = null,
          a = null,
          l = null;
        return (
          this.walk(function (e, r) {
            (t.code += e),
              null !== r.source && null !== r.line && null !== r.column
                ? ((o === r.source &&
                    s === r.line &&
                    a === r.column &&
                    l === r.name) ||
                    n.addMapping({
                      source: r.source,
                      original: { line: r.line, column: r.column },
                      generated: { line: t.line, column: t.column },
                      name: r.name,
                    }),
                  (o = r.source),
                  (s = r.line),
                  (a = r.column),
                  (l = r.name),
                  (i = !0))
                : i &&
                  (n.addMapping({
                    generated: { line: t.line, column: t.column },
                  }),
                  (o = null),
                  (i = !1));
            for (var c = 0, u = e.length; c < u; c++)
              10 === e.charCodeAt(c)
                ? (t.line++,
                  (t.column = 0),
                  c + 1 === u
                    ? ((o = null), (i = !1))
                    : i &&
                      n.addMapping({
                        source: r.source,
                        original: { line: r.line, column: r.column },
                        generated: { line: t.line, column: t.column },
                        name: r.name,
                      }))
                : t.column++;
          }),
          this.walkSourceContents(function (e, t) {
            n.setSourceContent(e, t);
          }),
          { code: t.code, map: n }
        );
      }),
      (t.SourceNode = a);
  },
  function (e, t) {
    e.exports = require("module");
  },
  function (e, t, n) {
    "use strict";
    /** @license React v16.8.4
     * react.production.min.js
     *
     * Copyright (c) Facebook, Inc. and its affiliates.
     *
     * This source code is licensed under the MIT license found in the
     * LICENSE file in the root directory of this source tree.
     */ var r = n(62),
      i = "function" == typeof Symbol && Symbol.for,
      o = i ? Symbol.for("react.element") : 60103,
      s = i ? Symbol.for("react.portal") : 60106,
      a = i ? Symbol.for("react.fragment") : 60107,
      l = i ? Symbol.for("react.strict_mode") : 60108,
      c = i ? Symbol.for("react.profiler") : 60114,
      u = i ? Symbol.for("react.provider") : 60109,
      h = i ? Symbol.for("react.context") : 60110,
      d = i ? Symbol.for("react.concurrent_mode") : 60111,
      p = i ? Symbol.for("react.forward_ref") : 60112,
      f = i ? Symbol.for("react.suspense") : 60113,
      m = i ? Symbol.for("react.memo") : 60115,
      g = i ? Symbol.for("react.lazy") : 60116,
      y = "function" == typeof Symbol && Symbol.iterator;
    function v(e, t, n, r, i, o, s, a) {
      if (!e) {
        if (((e = void 0), void 0 === t))
          e = Error(
            "Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."
          );
        else {
          var l = [n, r, i, o, s, a],
            c = 0;
          (e = Error(
            t.replace(/%s/g, function () {
              return l[c++];
            })
          )).name = "Invariant Violation";
        }
        throw ((e.framesToPop = 1), e);
      }
    }
    function w(e) {
      for (
        var t = arguments.length - 1,
          n = "https://reactjs.org/docs/error-decoder.html?invariant=" + e,
          r = 0;
        r < t;
        r++
      )
        n += "&args[]=" + encodeURIComponent(arguments[r + 1]);
      v(
        !1,
        "Minified React error #" +
          e +
          "; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",
        n
      );
    }
    var b = {
        isMounted: function () {
          return !1;
        },
        enqueueForceUpdate: function () {},
        enqueueReplaceState: function () {},
        enqueueSetState: function () {},
      },
      S = {};
    function C(e, t, n) {
      (this.props = e),
        (this.context = t),
        (this.refs = S),
        (this.updater = n || b);
    }
    function E() {}
    function k(e, t, n) {
      (this.props = e),
        (this.context = t),
        (this.refs = S),
        (this.updater = n || b);
    }
    (C.prototype.isReactComponent = {}),
      (C.prototype.setState = function (e, t) {
        "object" != typeof e && "function" != typeof e && null != e && w("85"),
          this.updater.enqueueSetState(this, e, t, "setState");
      }),
      (C.prototype.forceUpdate = function (e) {
        this.updater.enqueueForceUpdate(this, e, "forceUpdate");
      }),
      (E.prototype = C.prototype);
    var x = (k.prototype = new E());
    (x.constructor = k), r(x, C.prototype), (x.isPureReactComponent = !0);
    var R = { current: null },
      T = { current: null },
      D = Object.prototype.hasOwnProperty,
      A = { key: !0, ref: !0, __self: !0, __source: !0 };
    function _(e, t, n) {
      var r = void 0,
        i = {},
        s = null,
        a = null;
      if (null != t)
        for (r in (void 0 !== t.ref && (a = t.ref),
        void 0 !== t.key && (s = "" + t.key),
        t))
          D.call(t, r) && !A.hasOwnProperty(r) && (i[r] = t[r]);
      var l = arguments.length - 2;
      if (1 === l) i.children = n;
      else if (1 < l) {
        for (var c = Array(l), u = 0; u < l; u++) c[u] = arguments[u + 2];
        i.children = c;
      }
      if (e && e.defaultProps)
        for (r in (l = e.defaultProps)) void 0 === i[r] && (i[r] = l[r]);
      return {
        $$typeof: o,
        type: e,
        key: s,
        ref: a,
        props: i,
        _owner: T.current,
      };
    }
    function M(e) {
      return "object" == typeof e && null !== e && e.$$typeof === o;
    }
    var P = /\/+/g,
      I = [];
    function O(e, t, n, r) {
      if (I.length) {
        var i = I.pop();
        return (
          (i.result = e),
          (i.keyPrefix = t),
          (i.func = n),
          (i.context = r),
          (i.count = 0),
          i
        );
      }
      return { result: e, keyPrefix: t, func: n, context: r, count: 0 };
    }
    function L(e) {
      (e.result = null),
        (e.keyPrefix = null),
        (e.func = null),
        (e.context = null),
        (e.count = 0),
        10 > I.length && I.push(e);
    }
    function F(e, t, n) {
      return null == e
        ? 0
        : (function e(t, n, r, i) {
            var a = typeof t;
            ("undefined" !== a && "boolean" !== a) || (t = null);
            var l = !1;
            if (null === t) l = !0;
            else
              switch (a) {
                case "string":
                case "number":
                  l = !0;
                  break;
                case "object":
                  switch (t.$$typeof) {
                    case o:
                    case s:
                      l = !0;
                  }
              }
            if (l) return r(i, t, "" === n ? "." + N(t, 0) : n), 1;
            if (((l = 0), (n = "" === n ? "." : n + ":"), Array.isArray(t)))
              for (var c = 0; c < t.length; c++) {
                var u = n + N((a = t[c]), c);
                l += e(a, u, r, i);
              }
            else if (
              (null === t || "object" != typeof t
                ? (u = null)
                : (u =
                    "function" == typeof (u = (y && t[y]) || t["@@iterator"])
                      ? u
                      : null),
              "function" == typeof u)
            )
              for (t = u.call(t), c = 0; !(a = t.next()).done; )
                l += e((a = a.value), (u = n + N(a, c++)), r, i);
            else
              "object" === a &&
                w(
                  "31",
                  "[object Object]" === (r = "" + t)
                    ? "object with keys {" + Object.keys(t).join(", ") + "}"
                    : r,
                  ""
                );
            return l;
          })(e, "", t, n);
    }
    function N(e, t) {
      return "object" == typeof e && null !== e && null != e.key
        ? (function (e) {
            var t = { "=": "=0", ":": "=2" };
            return (
              "$" +
              ("" + e).replace(/[=:]/g, function (e) {
                return t[e];
              })
            );
          })(e.key)
        : t.toString(36);
    }
    function B(e, t) {
      e.func.call(e.context, t, e.count++);
    }
    function H(e, t, n) {
      var r = e.result,
        i = e.keyPrefix;
      (e = e.func.call(e.context, t, e.count++)),
        Array.isArray(e)
          ? z(e, r, n, function (e) {
              return e;
            })
          : null != e &&
            (M(e) &&
              (e = (function (e, t) {
                return {
                  $$typeof: o,
                  type: e.type,
                  key: t,
                  ref: e.ref,
                  props: e.props,
                  _owner: e._owner,
                };
              })(
                e,
                i +
                  (!e.key || (t && t.key === e.key)
                    ? ""
                    : ("" + e.key).replace(P, "$&/") + "/") +
                  n
              )),
            r.push(e));
    }
    function z(e, t, n, r, i) {
      var o = "";
      null != n && (o = ("" + n).replace(P, "$&/") + "/"),
        F(e, H, (t = O(t, o, r, i))),
        L(t);
    }
    function U() {
      var e = R.current;
      return null === e && w("307"), e;
    }
    var W = {
        Children: {
          map: function (e, t, n) {
            if (null == e) return e;
            var r = [];
            return z(e, r, null, t, n), r;
          },
          forEach: function (e, t, n) {
            if (null == e) return e;
            F(e, B, (t = O(null, null, t, n))), L(t);
          },
          count: function (e) {
            return F(
              e,
              function () {
                return null;
              },
              null
            );
          },
          toArray: function (e) {
            var t = [];
            return (
              z(e, t, null, function (e) {
                return e;
              }),
              t
            );
          },
          only: function (e) {
            return M(e) || w("143"), e;
          },
        },
        createRef: function () {
          return { current: null };
        },
        Component: C,
        PureComponent: k,
        createContext: function (e, t) {
          return (
            void 0 === t && (t = null),
            ((e = {
              $$typeof: h,
              _calculateChangedBits: t,
              _currentValue: e,
              _currentValue2: e,
              _threadCount: 0,
              Provider: null,
              Consumer: null,
            }).Provider = { $$typeof: u, _context: e }),
            (e.Consumer = e)
          );
        },
        forwardRef: function (e) {
          return { $$typeof: p, render: e };
        },
        lazy: function (e) {
          return { $$typeof: g, _ctor: e, _status: -1, _result: null };
        },
        memo: function (e, t) {
          return { $$typeof: m, type: e, compare: void 0 === t ? null : t };
        },
        useCallback: function (e, t) {
          return U().useCallback(e, t);
        },
        useContext: function (e, t) {
          return U().useContext(e, t);
        },
        useEffect: function (e, t) {
          return U().useEffect(e, t);
        },
        useImperativeHandle: function (e, t, n) {
          return U().useImperativeHandle(e, t, n);
        },
        useDebugValue: function () {},
        useLayoutEffect: function (e, t) {
          return U().useLayoutEffect(e, t);
        },
        useMemo: function (e, t) {
          return U().useMemo(e, t);
        },
        useReducer: function (e, t, n) {
          return U().useReducer(e, t, n);
        },
        useRef: function (e) {
          return U().useRef(e);
        },
        useState: function (e) {
          return U().useState(e);
        },
        Fragment: a,
        StrictMode: l,
        Suspense: f,
        createElement: _,
        cloneElement: function (e, t, n) {
          null == e && w("267", e);
          var i = void 0,
            s = r({}, e.props),
            a = e.key,
            l = e.ref,
            c = e._owner;
          if (null != t) {
            void 0 !== t.ref && ((l = t.ref), (c = T.current)),
              void 0 !== t.key && (a = "" + t.key);
            var u = void 0;
            for (i in (e.type &&
              e.type.defaultProps &&
              (u = e.type.defaultProps),
            t))
              D.call(t, i) &&
                !A.hasOwnProperty(i) &&
                (s[i] = void 0 === t[i] && void 0 !== u ? u[i] : t[i]);
          }
          if (1 === (i = arguments.length - 2)) s.children = n;
          else if (1 < i) {
            u = Array(i);
            for (var h = 0; h < i; h++) u[h] = arguments[h + 2];
            s.children = u;
          }
          return {
            $$typeof: o,
            type: e.type,
            key: a,
            ref: l,
            props: s,
            _owner: c,
          };
        },
        createFactory: function (e) {
          var t = _.bind(null, e);
          return (t.type = e), t;
        },
        isValidElement: M,
        version: "16.8.4",
        unstable_ConcurrentMode: d,
        unstable_Profiler: c,
        __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: {
          ReactCurrentDispatcher: R,
          ReactCurrentOwner: T,
          assign: r,
        },
      },
      j = { default: W },
      V = (j && W) || j;
    e.exports = V.default || V;
  },
  function (e, t, n) {
    "use strict";
    /** @license React v16.8.4
     * react-dom.production.min.js
     *
     * Copyright (c) Facebook, Inc. and its affiliates.
     *
     * This source code is licensed under the MIT license found in the
     * LICENSE file in the root directory of this source tree.
     */ var r = n(0),
      i = n(62),
      o = n(156);
    function s(e, t, n, r, i, o, s, a) {
      if (!e) {
        if (((e = void 0), void 0 === t))
          e = Error(
            "Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."
          );
        else {
          var l = [n, r, i, o, s, a],
            c = 0;
          (e = Error(
            t.replace(/%s/g, function () {
              return l[c++];
            })
          )).name = "Invariant Violation";
        }
        throw ((e.framesToPop = 1), e);
      }
    }
    function a(e) {
      for (
        var t = arguments.length - 1,
          n = "https://reactjs.org/docs/error-decoder.html?invariant=" + e,
          r = 0;
        r < t;
        r++
      )
        n += "&args[]=" + encodeURIComponent(arguments[r + 1]);
      s(
        !1,
        "Minified React error #" +
          e +
          "; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",
        n
      );
    }
    function l(e, t, n, r, i, o, s, a, l) {
      var c = Array.prototype.slice.call(arguments, 3);
      try {
        t.apply(n, c);
      } catch (e) {
        this.onError(e);
      }
    }
    r || a("227");
    var c = !1,
      u = null,
      h = !1,
      d = null,
      p = {
        onError: function (e) {
          (c = !0), (u = e);
        },
      };
    function f(e, t, n, r, i, o, s, a, h) {
      (c = !1), (u = null), l.apply(p, arguments);
    }
    var m = null,
      g = {};
    function y() {
      if (m)
        for (var e in g) {
          var t = g[e],
            n = m.indexOf(e);
          if ((-1 < n || a("96", e), !w[n]))
            for (var r in (t.extractEvents || a("97", e),
            (w[n] = t),
            (n = t.eventTypes))) {
              var i = void 0,
                o = n[r],
                s = t,
                l = r;
              b.hasOwnProperty(l) && a("99", l), (b[l] = o);
              var c = o.phasedRegistrationNames;
              if (c) {
                for (i in c) c.hasOwnProperty(i) && v(c[i], s, l);
                i = !0;
              } else
                o.registrationName
                  ? (v(o.registrationName, s, l), (i = !0))
                  : (i = !1);
              i || a("98", r, e);
            }
        }
    }
    function v(e, t, n) {
      S[e] && a("100", e), (S[e] = t), (C[e] = t.eventTypes[n].dependencies);
    }
    var w = [],
      b = {},
      S = {},
      C = {},
      E = null,
      k = null,
      x = null;
    function R(e, t, n) {
      var r = e.type || "unknown-event";
      (e.currentTarget = x(n)),
        (function (e, t, n, r, i, o, s, l, p) {
          if ((f.apply(this, arguments), c)) {
            if (c) {
              var m = u;
              (c = !1), (u = null);
            } else a("198"), (m = void 0);
            h || ((h = !0), (d = m));
          }
        })(r, t, void 0, e),
        (e.currentTarget = null);
    }
    function T(e, t) {
      return (
        null == t && a("30"),
        null == e
          ? t
          : Array.isArray(e)
          ? Array.isArray(t)
            ? (e.push.apply(e, t), e)
            : (e.push(t), e)
          : Array.isArray(t)
          ? [e].concat(t)
          : [e, t]
      );
    }
    function D(e, t, n) {
      Array.isArray(e) ? e.forEach(t, n) : e && t.call(n, e);
    }
    var A = null;
    function _(e) {
      if (e) {
        var t = e._dispatchListeners,
          n = e._dispatchInstances;
        if (Array.isArray(t))
          for (var r = 0; r < t.length && !e.isPropagationStopped(); r++)
            R(e, t[r], n[r]);
        else t && R(e, t, n);
        (e._dispatchListeners = null),
          (e._dispatchInstances = null),
          e.isPersistent() || e.constructor.release(e);
      }
    }
    var M = {
      injectEventPluginOrder: function (e) {
        m && a("101"), (m = Array.prototype.slice.call(e)), y();
      },
      injectEventPluginsByName: function (e) {
        var t,
          n = !1;
        for (t in e)
          if (e.hasOwnProperty(t)) {
            var r = e[t];
            (g.hasOwnProperty(t) && g[t] === r) ||
              (g[t] && a("102", t), (g[t] = r), (n = !0));
          }
        n && y();
      },
    };
    function P(e, t) {
      var n = e.stateNode;
      if (!n) return null;
      var r = E(n);
      if (!r) return null;
      n = r[t];
      e: switch (t) {
        case "onClick":
        case "onClickCapture":
        case "onDoubleClick":
        case "onDoubleClickCapture":
        case "onMouseDown":
        case "onMouseDownCapture":
        case "onMouseMove":
        case "onMouseMoveCapture":
        case "onMouseUp":
        case "onMouseUpCapture":
          (r = !r.disabled) ||
            (r = !(
              "button" === (e = e.type) ||
              "input" === e ||
              "select" === e ||
              "textarea" === e
            )),
            (e = !r);
          break e;
        default:
          e = !1;
      }
      return e
        ? null
        : (n && "function" != typeof n && a("231", t, typeof n), n);
    }
    function I(e) {
      if (
        (null !== e && (A = T(A, e)),
        (e = A),
        (A = null),
        e && (D(e, _), A && a("95"), h))
      )
        throw ((e = d), (h = !1), (d = null), e);
    }
    var O = Math.random().toString(36).slice(2),
      L = "__reactInternalInstance$" + O,
      F = "__reactEventHandlers$" + O;
    function N(e) {
      if (e[L]) return e[L];
      for (; !e[L]; ) {
        if (!e.parentNode) return null;
        e = e.parentNode;
      }
      return 5 === (e = e[L]).tag || 6 === e.tag ? e : null;
    }
    function B(e) {
      return !(e = e[L]) || (5 !== e.tag && 6 !== e.tag) ? null : e;
    }
    function H(e) {
      if (5 === e.tag || 6 === e.tag) return e.stateNode;
      a("33");
    }
    function z(e) {
      return e[F] || null;
    }
    function U(e) {
      do {
        e = e.return;
      } while (e && 5 !== e.tag);
      return e || null;
    }
    function W(e, t, n) {
      (t = P(e, n.dispatchConfig.phasedRegistrationNames[t])) &&
        ((n._dispatchListeners = T(n._dispatchListeners, t)),
        (n._dispatchInstances = T(n._dispatchInstances, e)));
    }
    function j(e) {
      if (e && e.dispatchConfig.phasedRegistrationNames) {
        for (var t = e._targetInst, n = []; t; ) n.push(t), (t = U(t));
        for (t = n.length; 0 < t--; ) W(n[t], "captured", e);
        for (t = 0; t < n.length; t++) W(n[t], "bubbled", e);
      }
    }
    function V(e, t, n) {
      e &&
        n &&
        n.dispatchConfig.registrationName &&
        (t = P(e, n.dispatchConfig.registrationName)) &&
        ((n._dispatchListeners = T(n._dispatchListeners, t)),
        (n._dispatchInstances = T(n._dispatchInstances, e)));
    }
    function G(e) {
      e && e.dispatchConfig.registrationName && V(e._targetInst, null, e);
    }
    function $(e) {
      D(e, j);
    }
    var q = !(
      "undefined" == typeof window ||
      !window.document ||
      !window.document.createElement
    );
    function K(e, t) {
      var n = {};
      return (
        (n[e.toLowerCase()] = t.toLowerCase()),
        (n["Webkit" + e] = "webkit" + t),
        (n["Moz" + e] = "moz" + t),
        n
      );
    }
    var Y = {
        animationend: K("Animation", "AnimationEnd"),
        animationiteration: K("Animation", "AnimationIteration"),
        animationstart: K("Animation", "AnimationStart"),
        transitionend: K("Transition", "TransitionEnd"),
      },
      Q = {},
      Z = {};
    function X(e) {
      if (Q[e]) return Q[e];
      if (!Y[e]) return e;
      var t,
        n = Y[e];
      for (t in n) if (n.hasOwnProperty(t) && t in Z) return (Q[e] = n[t]);
      return e;
    }
    q &&
      ((Z = document.createElement("div").style),
      "AnimationEvent" in window ||
        (delete Y.animationend.animation,
        delete Y.animationiteration.animation,
        delete Y.animationstart.animation),
      "TransitionEvent" in window || delete Y.transitionend.transition);
    var J = X("animationend"),
      ee = X("animationiteration"),
      te = X("animationstart"),
      ne = X("transitionend"),
      re = "abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(
        " "
      ),
      ie = null,
      oe = null,
      se = null;
    function ae() {
      if (se) return se;
      var e,
        t,
        n = oe,
        r = n.length,
        i = "value" in ie ? ie.value : ie.textContent,
        o = i.length;
      for (e = 0; e < r && n[e] === i[e]; e++);
      var s = r - e;
      for (t = 1; t <= s && n[r - t] === i[o - t]; t++);
      return (se = i.slice(e, 1 < t ? 1 - t : void 0));
    }
    function le() {
      return !0;
    }
    function ce() {
      return !1;
    }
    function ue(e, t, n, r) {
      for (var i in ((this.dispatchConfig = e),
      (this._targetInst = t),
      (this.nativeEvent = n),
      (e = this.constructor.Interface)))
        e.hasOwnProperty(i) &&
          ((t = e[i])
            ? (this[i] = t(n))
            : "target" === i
            ? (this.target = r)
            : (this[i] = n[i]));
      return (
        (this.isDefaultPrevented = (
          null != n.defaultPrevented ? n.defaultPrevented : !1 === n.returnValue
        )
          ? le
          : ce),
        (this.isPropagationStopped = ce),
        this
      );
    }
    function he(e, t, n, r) {
      if (this.eventPool.length) {
        var i = this.eventPool.pop();
        return this.call(i, e, t, n, r), i;
      }
      return new this(e, t, n, r);
    }
    function de(e) {
      e instanceof this || a("279"),
        e.destructor(),
        10 > this.eventPool.length && this.eventPool.push(e);
    }
    function pe(e) {
      (e.eventPool = []), (e.getPooled = he), (e.release = de);
    }
    i(ue.prototype, {
      preventDefault: function () {
        this.defaultPrevented = !0;
        var e = this.nativeEvent;
        e &&
          (e.preventDefault
            ? e.preventDefault()
            : "unknown" != typeof e.returnValue && (e.returnValue = !1),
          (this.isDefaultPrevented = le));
      },
      stopPropagation: function () {
        var e = this.nativeEvent;
        e &&
          (e.stopPropagation
            ? e.stopPropagation()
            : "unknown" != typeof e.cancelBubble && (e.cancelBubble = !0),
          (this.isPropagationStopped = le));
      },
      persist: function () {
        this.isPersistent = le;
      },
      isPersistent: ce,
      destructor: function () {
        var e,
          t = this.constructor.Interface;
        for (e in t) this[e] = null;
        (this.nativeEvent = this._targetInst = this.dispatchConfig = null),
          (this.isPropagationStopped = this.isDefaultPrevented = ce),
          (this._dispatchInstances = this._dispatchListeners = null);
      },
    }),
      (ue.Interface = {
        type: null,
        target: null,
        currentTarget: function () {
          return null;
        },
        eventPhase: null,
        bubbles: null,
        cancelable: null,
        timeStamp: function (e) {
          return e.timeStamp || Date.now();
        },
        defaultPrevented: null,
        isTrusted: null,
      }),
      (ue.extend = function (e) {
        function t() {}
        function n() {
          return r.apply(this, arguments);
        }
        var r = this;
        t.prototype = r.prototype;
        var o = new t();
        return (
          i(o, n.prototype),
          (n.prototype = o),
          (n.prototype.constructor = n),
          (n.Interface = i({}, r.Interface, e)),
          (n.extend = r.extend),
          pe(n),
          n
        );
      }),
      pe(ue);
    var fe = ue.extend({ data: null }),
      me = ue.extend({ data: null }),
      ge = [9, 13, 27, 32],
      ye = q && "CompositionEvent" in window,
      ve = null;
    q && "documentMode" in document && (ve = document.documentMode);
    var we = q && "TextEvent" in window && !ve,
      be = q && (!ye || (ve && 8 < ve && 11 >= ve)),
      Se = String.fromCharCode(32),
      Ce = {
        beforeInput: {
          phasedRegistrationNames: {
            bubbled: "onBeforeInput",
            captured: "onBeforeInputCapture",
          },
          dependencies: ["compositionend", "keypress", "textInput", "paste"],
        },
        compositionEnd: {
          phasedRegistrationNames: {
            bubbled: "onCompositionEnd",
            captured: "onCompositionEndCapture",
          },
          dependencies: "blur compositionend keydown keypress keyup mousedown".split(
            " "
          ),
        },
        compositionStart: {
          phasedRegistrationNames: {
            bubbled: "onCompositionStart",
            captured: "onCompositionStartCapture",
          },
          dependencies: "blur compositionstart keydown keypress keyup mousedown".split(
            " "
          ),
        },
        compositionUpdate: {
          phasedRegistrationNames: {
            bubbled: "onCompositionUpdate",
            captured: "onCompositionUpdateCapture",
          },
          dependencies: "blur compositionupdate keydown keypress keyup mousedown".split(
            " "
          ),
        },
      },
      Ee = !1;
    function ke(e, t) {
      switch (e) {
        case "keyup":
          return -1 !== ge.indexOf(t.keyCode);
        case "keydown":
          return 229 !== t.keyCode;
        case "keypress":
        case "mousedown":
        case "blur":
          return !0;
        default:
          return !1;
      }
    }
    function xe(e) {
      return "object" == typeof (e = e.detail) && "data" in e ? e.data : null;
    }
    var Re = !1;
    var Te = {
        eventTypes: Ce,
        extractEvents: function (e, t, n, r) {
          var i = void 0,
            o = void 0;
          if (ye)
            e: {
              switch (e) {
                case "compositionstart":
                  i = Ce.compositionStart;
                  break e;
                case "compositionend":
                  i = Ce.compositionEnd;
                  break e;
                case "compositionupdate":
                  i = Ce.compositionUpdate;
                  break e;
              }
              i = void 0;
            }
          else
            Re
              ? ke(e, n) && (i = Ce.compositionEnd)
              : "keydown" === e &&
                229 === n.keyCode &&
                (i = Ce.compositionStart);
          return (
            i
              ? (be &&
                  "ko" !== n.locale &&
                  (Re || i !== Ce.compositionStart
                    ? i === Ce.compositionEnd && Re && (o = ae())
                    : ((oe = "value" in (ie = r) ? ie.value : ie.textContent),
                      (Re = !0))),
                (i = fe.getPooled(i, t, n, r)),
                o ? (i.data = o) : null !== (o = xe(n)) && (i.data = o),
                $(i),
                (o = i))
              : (o = null),
            (e = we
              ? (function (e, t) {
                  switch (e) {
                    case "compositionend":
                      return xe(t);
                    case "keypress":
                      return 32 !== t.which ? null : ((Ee = !0), Se);
                    case "textInput":
                      return (e = t.data) === Se && Ee ? null : e;
                    default:
                      return null;
                  }
                })(e, n)
              : (function (e, t) {
                  if (Re)
                    return "compositionend" === e || (!ye && ke(e, t))
                      ? ((e = ae()), (se = oe = ie = null), (Re = !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 be && "ko" !== t.locale ? null : t.data;
                    default:
                      return null;
                  }
                })(e, n))
              ? (((t = me.getPooled(Ce.beforeInput, t, n, r)).data = e), $(t))
              : (t = null),
            null === o ? t : null === t ? o : [o, t]
          );
        },
      },
      De = null,
      Ae = null,
      _e = null;
    function Me(e) {
      if ((e = k(e))) {
        "function" != typeof De && a("280");
        var t = E(e.stateNode);
        De(e.stateNode, e.type, t);
      }
    }
    function Pe(e) {
      Ae ? (_e ? _e.push(e) : (_e = [e])) : (Ae = e);
    }
    function Ie() {
      if (Ae) {
        var e = Ae,
          t = _e;
        if (((_e = Ae = null), Me(e), t))
          for (e = 0; e < t.length; e++) Me(t[e]);
      }
    }
    function Oe(e, t) {
      return e(t);
    }
    function Le(e, t, n) {
      return e(t, n);
    }
    function Fe() {}
    var Ne = !1;
    function Be(e, t) {
      if (Ne) return e(t);
      Ne = !0;
      try {
        return Oe(e, t);
      } finally {
        (Ne = !1), (null !== Ae || null !== _e) && (Fe(), Ie());
      }
    }
    var He = {
      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 ze(e) {
      var t = e && e.nodeName && e.nodeName.toLowerCase();
      return "input" === t ? !!He[e.type] : "textarea" === t;
    }
    function Ue(e) {
      return (
        (e = e.target || e.srcElement || window).correspondingUseElement &&
          (e = e.correspondingUseElement),
        3 === e.nodeType ? e.parentNode : e
      );
    }
    function We(e) {
      if (!q) return !1;
      var t = (e = "on" + e) in document;
      return (
        t ||
          ((t = document.createElement("div")).setAttribute(e, "return;"),
          (t = "function" == typeof t[e])),
        t
      );
    }
    function je(e) {
      var t = e.type;
      return (
        (e = e.nodeName) &&
        "input" === e.toLowerCase() &&
        ("checkbox" === t || "radio" === t)
      );
    }
    function Ve(e) {
      e._valueTracker ||
        (e._valueTracker = (function (e) {
          var t = je(e) ? "checked" : "value",
            n = Object.getOwnPropertyDescriptor(e.constructor.prototype, t),
            r = "" + e[t];
          if (
            !e.hasOwnProperty(t) &&
            void 0 !== n &&
            "function" == typeof n.get &&
            "function" == typeof n.set
          ) {
            var i = n.get,
              o = n.set;
            return (
              Object.defineProperty(e, t, {
                configurable: !0,
                get: function () {
                  return i.call(this);
                },
                set: function (e) {
                  (r = "" + e), o.call(this, e);
                },
              }),
              Object.defineProperty(e, t, { enumerable: n.enumerable }),
              {
                getValue: function () {
                  return r;
                },
                setValue: function (e) {
                  r = "" + e;
                },
                stopTracking: function () {
                  (e._valueTracker = null), delete e[t];
                },
              }
            );
          }
        })(e));
    }
    function Ge(e) {
      if (!e) return !1;
      var t = e._valueTracker;
      if (!t) return !0;
      var n = t.getValue(),
        r = "";
      return (
        e && (r = je(e) ? (e.checked ? "true" : "false") : e.value),
        (e = r) !== n && (t.setValue(e), !0)
      );
    }
    var $e = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
    $e.hasOwnProperty("ReactCurrentDispatcher") ||
      ($e.ReactCurrentDispatcher = { current: null });
    var qe = /^(.*)[\\\/]/,
      Ke = "function" == typeof Symbol && Symbol.for,
      Ye = Ke ? Symbol.for("react.element") : 60103,
      Qe = Ke ? Symbol.for("react.portal") : 60106,
      Ze = Ke ? Symbol.for("react.fragment") : 60107,
      Xe = Ke ? Symbol.for("react.strict_mode") : 60108,
      Je = Ke ? Symbol.for("react.profiler") : 60114,
      et = Ke ? Symbol.for("react.provider") : 60109,
      tt = Ke ? Symbol.for("react.context") : 60110,
      nt = Ke ? Symbol.for("react.concurrent_mode") : 60111,
      rt = Ke ? Symbol.for("react.forward_ref") : 60112,
      it = Ke ? Symbol.for("react.suspense") : 60113,
      ot = Ke ? Symbol.for("react.memo") : 60115,
      st = Ke ? Symbol.for("react.lazy") : 60116,
      at = "function" == typeof Symbol && Symbol.iterator;
    function lt(e) {
      return null === e || "object" != typeof e
        ? null
        : "function" == typeof (e = (at && e[at]) || e["@@iterator"])
        ? e
        : null;
    }
    function ct(e) {
      if (null == e) return null;
      if ("function" == typeof e) return e.displayName || e.name || null;
      if ("string" == typeof e) return e;
      switch (e) {
        case nt:
          return "ConcurrentMode";
        case Ze:
          return "Fragment";
        case Qe:
          return "Portal";
        case Je:
          return "Profiler";
        case Xe:
          return "StrictMode";
        case it:
          return "Suspense";
      }
      if ("object" == typeof e)
        switch (e.$$typeof) {
          case tt:
            return "Context.Consumer";
          case et:
            return "Context.Provider";
          case rt:
            var t = e.render;
            return (
              (t = t.displayName || t.name || ""),
              e.displayName ||
                ("" !== t ? "ForwardRef(" + t + ")" : "ForwardRef")
            );
          case ot:
            return ct(e.type);
          case st:
            if ((e = 1 === e._status ? e._result : null)) return ct(e);
        }
      return null;
    }
    function ut(e) {
      var t = "";
      do {
        e: switch (e.tag) {
          case 3:
          case 4:
          case 6:
          case 7:
          case 10:
          case 9:
            var n = "";
            break e;
          default:
            var r = e._debugOwner,
              i = e._debugSource,
              o = ct(e.type);
            (n = null),
              r && (n = ct(r.type)),
              (r = o),
              (o = ""),
              i
                ? (o =
                    " (at " +
                    i.fileName.replace(qe, "") +
                    ":" +
                    i.lineNumber +
                    ")")
                : n && (o = " (created by " + n + ")"),
              (n = "\n    in " + (r || "Unknown") + o);
        }
        (t += n), (e = e.return);
      } while (e);
      return t;
    }
    var ht = /^[: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]*$/,
      dt = Object.prototype.hasOwnProperty,
      pt = {},
      ft = {};
    function mt(e, t, n, r, i) {
      (this.acceptsBooleans = 2 === t || 3 === t || 4 === t),
        (this.attributeName = r),
        (this.attributeNamespace = i),
        (this.mustUseProperty = n),
        (this.propertyName = e),
        (this.type = t);
    }
    var gt = {};
    "children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style"
      .split(" ")
      .forEach(function (e) {
        gt[e] = new mt(e, 0, !1, e, null);
      }),
      [
        ["acceptCharset", "accept-charset"],
        ["className", "class"],
        ["htmlFor", "for"],
        ["httpEquiv", "http-equiv"],
      ].forEach(function (e) {
        var t = e[0];
        gt[t] = new mt(t, 1, !1, e[1], null);
      }),
      ["contentEditable", "draggable", "spellCheck", "value"].forEach(function (
        e
      ) {
        gt[e] = new mt(e, 2, !1, e.toLowerCase(), null);
      }),
      [
        "autoReverse",
        "externalResourcesRequired",
        "focusable",
        "preserveAlpha",
      ].forEach(function (e) {
        gt[e] = new mt(e, 2, !1, e, null);
      }),
      "allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope"
        .split(" ")
        .forEach(function (e) {
          gt[e] = new mt(e, 3, !1, e.toLowerCase(), null);
        }),
      ["checked", "multiple", "muted", "selected"].forEach(function (e) {
        gt[e] = new mt(e, 3, !0, e, null);
      }),
      ["capture", "download"].forEach(function (e) {
        gt[e] = new mt(e, 4, !1, e, null);
      }),
      ["cols", "rows", "size", "span"].forEach(function (e) {
        gt[e] = new mt(e, 6, !1, e, null);
      }),
      ["rowSpan", "start"].forEach(function (e) {
        gt[e] = new mt(e, 5, !1, e.toLowerCase(), null);
      });
    var yt = /[\-:]([a-z])/g;
    function vt(e) {
      return e[1].toUpperCase();
    }
    function wt(e, t, n, r) {
      var i = gt.hasOwnProperty(t) ? gt[t] : null;
      (null !== i
        ? 0 === i.type
        : !r &&
          2 < t.length &&
          ("o" === t[0] || "O" === t[0]) &&
          ("n" === t[1] || "N" === t[1])) ||
        ((function (e, t, n, r) {
          if (
            null == t ||
            (function (e, t, n, r) {
              if (null !== n && 0 === n.type) return !1;
              switch (typeof t) {
                case "function":
                case "symbol":
                  return !0;
                case "boolean":
                  return (
                    !r &&
                    (null !== n
                      ? !n.acceptsBooleans
                      : "data-" !== (e = e.toLowerCase().slice(0, 5)) &&
                        "aria-" !== e)
                  );
                default:
                  return !1;
              }
            })(e, t, n, r)
          )
            return !0;
          if (r) return !1;
          if (null !== n)
            switch (n.type) {
              case 3:
                return !t;
              case 4:
                return !1 === t;
              case 5:
                return isNaN(t);
              case 6:
                return isNaN(t) || 1 > t;
            }
          return !1;
        })(t, n, i, r) && (n = null),
        r || null === i
          ? (function (e) {
              return (
                !!dt.call(ft, e) ||
                (!dt.call(pt, e) &&
                  (ht.test(e) ? (ft[e] = !0) : ((pt[e] = !0), !1)))
              );
            })(t) &&
            (null === n ? e.removeAttribute(t) : e.setAttribute(t, "" + n))
          : i.mustUseProperty
          ? (e[i.propertyName] = null === n ? 3 !== i.type && "" : n)
          : ((t = i.attributeName),
            (r = i.attributeNamespace),
            null === n
              ? e.removeAttribute(t)
              : ((n =
                  3 === (i = i.type) || (4 === i && !0 === n) ? "" : "" + n),
                r ? e.setAttributeNS(r, t, n) : e.setAttribute(t, n))));
    }
    function bt(e) {
      switch (typeof e) {
        case "boolean":
        case "number":
        case "object":
        case "string":
        case "undefined":
          return e;
        default:
          return "";
      }
    }
    function St(e, t) {
      var n = t.checked;
      return i({}, t, {
        defaultChecked: void 0,
        defaultValue: void 0,
        value: void 0,
        checked: null != n ? n : e._wrapperState.initialChecked,
      });
    }
    function Ct(e, t) {
      var n = null == t.defaultValue ? "" : t.defaultValue,
        r = null != t.checked ? t.checked : t.defaultChecked;
      (n = bt(null != t.value ? t.value : n)),
        (e._wrapperState = {
          initialChecked: r,
          initialValue: n,
          controlled:
            "checkbox" === t.type || "radio" === t.type
              ? null != t.checked
              : null != t.value,
        });
    }
    function Et(e, t) {
      null != (t = t.checked) && wt(e, "checked", t, !1);
    }
    function kt(e, t) {
      Et(e, t);
      var n = bt(t.value),
        r = t.type;
      if (null != n)
        "number" === r
          ? ((0 === n && "" === e.value) || e.value != n) && (e.value = "" + n)
          : e.value !== "" + n && (e.value = "" + n);
      else if ("submit" === r || "reset" === r)
        return void e.removeAttribute("value");
      t.hasOwnProperty("value")
        ? Rt(e, t.type, n)
        : t.hasOwnProperty("defaultValue") && Rt(e, t.type, bt(t.defaultValue)),
        null == t.checked &&
          null != t.defaultChecked &&
          (e.defaultChecked = !!t.defaultChecked);
    }
    function xt(e, t, n) {
      if (t.hasOwnProperty("value") || t.hasOwnProperty("defaultValue")) {
        var r = t.type;
        if (
          !(
            ("submit" !== r && "reset" !== r) ||
            (void 0 !== t.value && null !== t.value)
          )
        )
          return;
        (t = "" + e._wrapperState.initialValue),
          n || t === e.value || (e.value = t),
          (e.defaultValue = t);
      }
      "" !== (n = e.name) && (e.name = ""),
        (e.defaultChecked = !e.defaultChecked),
        (e.defaultChecked = !!e._wrapperState.initialChecked),
        "" !== n && (e.name = n);
    }
    function Rt(e, t, n) {
      ("number" === t && e.ownerDocument.activeElement === e) ||
        (null == n
          ? (e.defaultValue = "" + e._wrapperState.initialValue)
          : e.defaultValue !== "" + n && (e.defaultValue = "" + n));
    }
    "accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height"
      .split(" ")
      .forEach(function (e) {
        var t = e.replace(yt, vt);
        gt[t] = new mt(t, 1, !1, e, null);
      }),
      "xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type"
        .split(" ")
        .forEach(function (e) {
          var t = e.replace(yt, vt);
          gt[t] = new mt(t, 1, !1, e, "http://www.w3.org/1999/xlink");
        }),
      ["xml:base", "xml:lang", "xml:space"].forEach(function (e) {
        var t = e.replace(yt, vt);
        gt[t] = new mt(t, 1, !1, e, "http://www.w3.org/XML/1998/namespace");
      }),
      ["tabIndex", "crossOrigin"].forEach(function (e) {
        gt[e] = new mt(e, 1, !1, e.toLowerCase(), null);
      });
    var Tt = {
      change: {
        phasedRegistrationNames: {
          bubbled: "onChange",
          captured: "onChangeCapture",
        },
        dependencies: "blur change click focus input keydown keyup selectionchange".split(
          " "
        ),
      },
    };
    function Dt(e, t, n) {
      return (
        ((e = ue.getPooled(Tt.change, e, t, n)).type = "change"), Pe(n), $(e), e
      );
    }
    var At = null,
      _t = null;
    function Mt(e) {
      I(e);
    }
    function Pt(e) {
      if (Ge(H(e))) return e;
    }
    function It(e, t) {
      if ("change" === e) return t;
    }
    var Ot = !1;
    function Lt() {
      At && (At.detachEvent("onpropertychange", Ft), (_t = At = null));
    }
    function Ft(e) {
      "value" === e.propertyName && Pt(_t) && Be(Mt, (e = Dt(_t, e, Ue(e))));
    }
    function Nt(e, t, n) {
      "focus" === e
        ? (Lt(), (_t = n), (At = t).attachEvent("onpropertychange", Ft))
        : "blur" === e && Lt();
    }
    function Bt(e) {
      if ("selectionchange" === e || "keyup" === e || "keydown" === e)
        return Pt(_t);
    }
    function Ht(e, t) {
      if ("click" === e) return Pt(t);
    }
    function zt(e, t) {
      if ("input" === e || "change" === e) return Pt(t);
    }
    q &&
      (Ot =
        We("input") && (!document.documentMode || 9 < document.documentMode));
    var Ut = {
        eventTypes: Tt,
        _isInputEventSupported: Ot,
        extractEvents: function (e, t, n, r) {
          var i = t ? H(t) : window,
            o = void 0,
            s = void 0,
            a = i.nodeName && i.nodeName.toLowerCase();
          if (
            ("select" === a || ("input" === a && "file" === i.type)
              ? (o = It)
              : ze(i)
              ? Ot
                ? (o = zt)
                : ((o = Bt), (s = Nt))
              : (a = i.nodeName) &&
                "input" === a.toLowerCase() &&
                ("checkbox" === i.type || "radio" === i.type) &&
                (o = Ht),
            o && (o = o(e, t)))
          )
            return Dt(o, n, r);
          s && s(e, i, t),
            "blur" === e &&
              (e = i._wrapperState) &&
              e.controlled &&
              "number" === i.type &&
              Rt(i, "number", i.value);
        },
      },
      Wt = ue.extend({ view: null, detail: null }),
      jt = {
        Alt: "altKey",
        Control: "ctrlKey",
        Meta: "metaKey",
        Shift: "shiftKey",
      };
    function Vt(e) {
      var t = this.nativeEvent;
      return t.getModifierState
        ? t.getModifierState(e)
        : !!(e = jt[e]) && !!t[e];
    }
    function Gt() {
      return Vt;
    }
    var $t = 0,
      qt = 0,
      Kt = !1,
      Yt = !1,
      Qt = Wt.extend({
        screenX: null,
        screenY: null,
        clientX: null,
        clientY: null,
        pageX: null,
        pageY: null,
        ctrlKey: null,
        shiftKey: null,
        altKey: null,
        metaKey: null,
        getModifierState: Gt,
        button: null,
        buttons: null,
        relatedTarget: function (e) {
          return (
            e.relatedTarget ||
            (e.fromElement === e.srcElement ? e.toElement : e.fromElement)
          );
        },
        movementX: function (e) {
          if ("movementX" in e) return e.movementX;
          var t = $t;
          return (
            ($t = e.screenX),
            Kt ? ("mousemove" === e.type ? e.screenX - t : 0) : ((Kt = !0), 0)
          );
        },
        movementY: function (e) {
          if ("movementY" in e) return e.movementY;
          var t = qt;
          return (
            (qt = e.screenY),
            Yt ? ("mousemove" === e.type ? e.screenY - t : 0) : ((Yt = !0), 0)
          );
        },
      }),
      Zt = Qt.extend({
        pointerId: null,
        width: null,
        height: null,
        pressure: null,
        tangentialPressure: null,
        tiltX: null,
        tiltY: null,
        twist: null,
        pointerType: null,
        isPrimary: null,
      }),
      Xt = {
        mouseEnter: {
          registrationName: "onMouseEnter",
          dependencies: ["mouseout", "mouseover"],
        },
        mouseLeave: {
          registrationName: "onMouseLeave",
          dependencies: ["mouseout", "mouseover"],
        },
        pointerEnter: {
          registrationName: "onPointerEnter",
          dependencies: ["pointerout", "pointerover"],
        },
        pointerLeave: {
          registrationName: "onPointerLeave",
          dependencies: ["pointerout", "pointerover"],
        },
      },
      Jt = {
        eventTypes: Xt,
        extractEvents: function (e, t, n, r) {
          var i = "mouseover" === e || "pointerover" === e,
            o = "mouseout" === e || "pointerout" === e;
          if ((i && (n.relatedTarget || n.fromElement)) || (!o && !i))
            return null;
          if (
            ((i =
              r.window === r
                ? r
                : (i = r.ownerDocument)
                ? i.defaultView || i.parentWindow
                : window),
            o
              ? ((o = t),
                (t = (t = n.relatedTarget || n.toElement) ? N(t) : null))
              : (o = null),
            o === t)
          )
            return null;
          var s = void 0,
            a = void 0,
            l = void 0,
            c = void 0;
          "mouseout" === e || "mouseover" === e
            ? ((s = Qt),
              (a = Xt.mouseLeave),
              (l = Xt.mouseEnter),
              (c = "mouse"))
            : ("pointerout" !== e && "pointerover" !== e) ||
              ((s = Zt),
              (a = Xt.pointerLeave),
              (l = Xt.pointerEnter),
              (c = "pointer"));
          var u = null == o ? i : H(o);
          if (
            ((i = null == t ? i : H(t)),
            ((e = s.getPooled(a, o, n, r)).type = c + "leave"),
            (e.target = u),
            (e.relatedTarget = i),
            ((n = s.getPooled(l, t, n, r)).type = c + "enter"),
            (n.target = i),
            (n.relatedTarget = u),
            (r = t),
            o && r)
          )
            e: {
              for (i = r, c = 0, s = t = o; s; s = U(s)) c++;
              for (s = 0, l = i; l; l = U(l)) s++;
              for (; 0 < c - s; ) (t = U(t)), c--;
              for (; 0 < s - c; ) (i = U(i)), s--;
              for (; c--; ) {
                if (t === i || t === i.alternate) break e;
                (t = U(t)), (i = U(i));
              }
              t = null;
            }
          else t = null;
          for (
            i = t, t = [];
            o && o !== i && (null === (c = o.alternate) || c !== i);

          )
            t.push(o), (o = U(o));
          for (
            o = [];
            r && r !== i && (null === (c = r.alternate) || c !== i);

          )
            o.push(r), (r = U(r));
          for (r = 0; r < t.length; r++) V(t[r], "bubbled", e);
          for (r = o.length; 0 < r--; ) V(o[r], "captured", n);
          return [e, n];
        },
      };
    function en(e, t) {
      return (e === t && (0 !== e || 1 / e == 1 / t)) || (e != e && t != t);
    }
    var tn = Object.prototype.hasOwnProperty;
    function nn(e, t) {
      if (en(e, t)) return !0;
      if (
        "object" != typeof e ||
        null === e ||
        "object" != typeof t ||
        null === t
      )
        return !1;
      var n = Object.keys(e),
        r = Object.keys(t);
      if (n.length !== r.length) return !1;
      for (r = 0; r < n.length; r++)
        if (!tn.call(t, n[r]) || !en(e[n[r]], t[n[r]])) return !1;
      return !0;
    }
    function rn(e) {
      var t = e;
      if (e.alternate) for (; t.return; ) t = t.return;
      else {
        if (0 != (2 & t.effectTag)) return 1;
        for (; t.return; ) if (0 != (2 & (t = t.return).effectTag)) return 1;
      }
      return 3 === t.tag ? 2 : 3;
    }
    function on(e) {
      2 !== rn(e) && a("188");
    }
    function sn(e) {
      if (
        !(e = (function (e) {
          var t = e.alternate;
          if (!t) return 3 === (t = rn(e)) && a("188"), 1 === t ? null : e;
          for (var n = e, r = t; ; ) {
            var i = n.return,
              o = i ? i.alternate : null;
            if (!i || !o) break;
            if (i.child === o.child) {
              for (var s = i.child; s; ) {
                if (s === n) return on(i), e;
                if (s === r) return on(i), t;
                s = s.sibling;
              }
              a("188");
            }
            if (n.return !== r.return) (n = i), (r = o);
            else {
              s = !1;
              for (var l = i.child; l; ) {
                if (l === n) {
                  (s = !0), (n = i), (r = o);
                  break;
                }
                if (l === r) {
                  (s = !0), (r = i), (n = o);
                  break;
                }
                l = l.sibling;
              }
              if (!s) {
                for (l = o.child; l; ) {
                  if (l === n) {
                    (s = !0), (n = o), (r = i);
                    break;
                  }
                  if (l === r) {
                    (s = !0), (r = o), (n = i);
                    break;
                  }
                  l = l.sibling;
                }
                s || a("189");
              }
            }
            n.alternate !== r && a("190");
          }
          return 3 !== n.tag && a("188"), n.stateNode.current === n ? e : t;
        })(e))
      )
        return null;
      for (var t = e; ; ) {
        if (5 === t.tag || 6 === t.tag) return t;
        if (t.child) (t.child.return = t), (t = t.child);
        else {
          if (t === e) break;
          for (; !t.sibling; ) {
            if (!t.return || t.return === e) return null;
            t = t.return;
          }
          (t.sibling.return = t.return), (t = t.sibling);
        }
      }
      return null;
    }
    var an = ue.extend({
        animationName: null,
        elapsedTime: null,
        pseudoElement: null,
      }),
      ln = ue.extend({
        clipboardData: function (e) {
          return "clipboardData" in e ? e.clipboardData : window.clipboardData;
        },
      }),
      cn = Wt.extend({ relatedTarget: null });
    function un(e) {
      var t = e.keyCode;
      return (
        "charCode" in e
          ? 0 === (e = e.charCode) && 13 === t && (e = 13)
          : (e = t),
        10 === e && (e = 13),
        32 <= e || 13 === e ? e : 0
      );
    }
    var hn = {
        Esc: "Escape",
        Spacebar: " ",
        Left: "ArrowLeft",
        Up: "ArrowUp",
        Right: "ArrowRight",
        Down: "ArrowDown",
        Del: "Delete",
        Win: "OS",
        Menu: "ContextMenu",
        Apps: "ContextMenu",
        Scroll: "ScrollLock",
        MozPrintableKey: "Unidentified",
      },
      dn = {
        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",
      },
      pn = Wt.extend({
        key: function (e) {
          if (e.key) {
            var t = hn[e.key] || e.key;
            if ("Unidentified" !== t) return t;
          }
          return "keypress" === e.type
            ? 13 === (e = un(e))
              ? "Enter"
              : String.fromCharCode(e)
            : "keydown" === e.type || "keyup" === e.type
            ? dn[e.keyCode] || "Unidentified"
            : "";
        },
        location: null,
        ctrlKey: null,
        shiftKey: null,
        altKey: null,
        metaKey: null,
        repeat: null,
        locale: null,
        getModifierState: Gt,
        charCode: function (e) {
          return "keypress" === e.type ? un(e) : 0;
        },
        keyCode: function (e) {
          return "keydown" === e.type || "keyup" === e.type ? e.keyCode : 0;
        },
        which: function (e) {
          return "keypress" === e.type
            ? un(e)
            : "keydown" === e.type || "keyup" === e.type
            ? e.keyCode
            : 0;
        },
      }),
      fn = Qt.extend({ dataTransfer: null }),
      mn = Wt.extend({
        touches: null,
        targetTouches: null,
        changedTouches: null,
        altKey: null,
        metaKey: null,
        ctrlKey: null,
        shiftKey: null,
        getModifierState: Gt,
      }),
      gn = ue.extend({
        propertyName: null,
        elapsedTime: null,
        pseudoElement: null,
      }),
      yn = Qt.extend({
        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: null,
        deltaMode: null,
      }),
      vn = [
        ["abort", "abort"],
        [J, "animationEnd"],
        [ee, "animationIteration"],
        [te, "animationStart"],
        ["canplay", "canPlay"],
        ["canplaythrough", "canPlayThrough"],
        ["drag", "drag"],
        ["dragenter", "dragEnter"],
        ["dragexit", "dragExit"],
        ["dragleave", "dragLeave"],
        ["dragover", "dragOver"],
        ["durationchange", "durationChange"],
        ["emptied", "emptied"],
        ["encrypted", "encrypted"],
        ["ended", "ended"],
        ["error", "error"],
        ["gotpointercapture", "gotPointerCapture"],
        ["load", "load"],
        ["loadeddata", "loadedData"],
        ["loadedmetadata", "loadedMetadata"],
        ["loadstart", "loadStart"],
        ["lostpointercapture", "lostPointerCapture"],
        ["mousemove", "mouseMove"],
        ["mouseout", "mouseOut"],
        ["mouseover", "mouseOver"],
        ["playing", "playing"],
        ["pointermove", "pointerMove"],
        ["pointerout", "pointerOut"],
        ["pointerover", "pointerOver"],
        ["progress", "progress"],
        ["scroll", "scroll"],
        ["seeking", "seeking"],
        ["stalled", "stalled"],
        ["suspend", "suspend"],
        ["timeupdate", "timeUpdate"],
        ["toggle", "toggle"],
        ["touchmove", "touchMove"],
        [ne, "transitionEnd"],
        ["waiting", "waiting"],
        ["wheel", "wheel"],
      ],
      wn = {},
      bn = {};
    function Sn(e, t) {
      var n = e[0],
        r = "on" + ((e = e[1])[0].toUpperCase() + e.slice(1));
      (t = {
        phasedRegistrationNames: { bubbled: r, captured: r + "Capture" },
        dependencies: [n],
        isInteractive: t,
      }),
        (wn[e] = t),
        (bn[n] = t);
    }
    [
      ["blur", "blur"],
      ["cancel", "cancel"],
      ["click", "click"],
      ["close", "close"],
      ["contextmenu", "contextMenu"],
      ["copy", "copy"],
      ["cut", "cut"],
      ["auxclick", "auxClick"],
      ["dblclick", "doubleClick"],
      ["dragend", "dragEnd"],
      ["dragstart", "dragStart"],
      ["drop", "drop"],
      ["focus", "focus"],
      ["input", "input"],
      ["invalid", "invalid"],
      ["keydown", "keyDown"],
      ["keypress", "keyPress"],
      ["keyup", "keyUp"],
      ["mousedown", "mouseDown"],
      ["mouseup", "mouseUp"],
      ["paste", "paste"],
      ["pause", "pause"],
      ["play", "play"],
      ["pointercancel", "pointerCancel"],
      ["pointerdown", "pointerDown"],
      ["pointerup", "pointerUp"],
      ["ratechange", "rateChange"],
      ["reset", "reset"],
      ["seeked", "seeked"],
      ["submit", "submit"],
      ["touchcancel", "touchCancel"],
      ["touchend", "touchEnd"],
      ["touchstart", "touchStart"],
      ["volumechange", "volumeChange"],
    ].forEach(function (e) {
      Sn(e, !0);
    }),
      vn.forEach(function (e) {
        Sn(e, !1);
      });
    var Cn = {
        eventTypes: wn,
        isInteractiveTopLevelEventType: function (e) {
          return void 0 !== (e = bn[e]) && !0 === e.isInteractive;
        },
        extractEvents: function (e, t, n, r) {
          var i = bn[e];
          if (!i) return null;
          switch (e) {
            case "keypress":
              if (0 === un(n)) return null;
            case "keydown":
            case "keyup":
              e = pn;
              break;
            case "blur":
            case "focus":
              e = cn;
              break;
            case "click":
              if (2 === n.button) return null;
            case "auxclick":
            case "dblclick":
            case "mousedown":
            case "mousemove":
            case "mouseup":
            case "mouseout":
            case "mouseover":
            case "contextmenu":
              e = Qt;
              break;
            case "drag":
            case "dragend":
            case "dragenter":
            case "dragexit":
            case "dragleave":
            case "dragover":
            case "dragstart":
            case "drop":
              e = fn;
              break;
            case "touchcancel":
            case "touchend":
            case "touchmove":
            case "touchstart":
              e = mn;
              break;
            case J:
            case ee:
            case te:
              e = an;
              break;
            case ne:
              e = gn;
              break;
            case "scroll":
              e = Wt;
              break;
            case "wheel":
              e = yn;
              break;
            case "copy":
            case "cut":
            case "paste":
              e = ln;
              break;
            case "gotpointercapture":
            case "lostpointercapture":
            case "pointercancel":
            case "pointerdown":
            case "pointermove":
            case "pointerout":
            case "pointerover":
            case "pointerup":
              e = Zt;
              break;
            default:
              e = ue;
          }
          return $((t = e.getPooled(i, t, n, r))), t;
        },
      },
      En = Cn.isInteractiveTopLevelEventType,
      kn = [];
    function xn(e) {
      var t = e.targetInst,
        n = t;
      do {
        if (!n) {
          e.ancestors.push(n);
          break;
        }
        var r;
        for (r = n; r.return; ) r = r.return;
        if (!(r = 3 !== r.tag ? null : r.stateNode.containerInfo)) break;
        e.ancestors.push(n), (n = N(r));
      } while (n);
      for (n = 0; n < e.ancestors.length; n++) {
        t = e.ancestors[n];
        var i = Ue(e.nativeEvent);
        r = e.topLevelType;
        for (var o = e.nativeEvent, s = null, a = 0; a < w.length; a++) {
          var l = w[a];
          l && (l = l.extractEvents(r, t, o, i)) && (s = T(s, l));
        }
        I(s);
      }
    }
    var Rn = !0;
    function Tn(e, t) {
      if (!t) return null;
      var n = (En(e) ? An : _n).bind(null, e);
      t.addEventListener(e, n, !1);
    }
    function Dn(e, t) {
      if (!t) return null;
      var n = (En(e) ? An : _n).bind(null, e);
      t.addEventListener(e, n, !0);
    }
    function An(e, t) {
      Le(_n, e, t);
    }
    function _n(e, t) {
      if (Rn) {
        var n = Ue(t);
        if (
          (null === (n = N(n)) ||
            "number" != typeof n.tag ||
            2 === rn(n) ||
            (n = null),
          kn.length)
        ) {
          var r = kn.pop();
          (r.topLevelType = e),
            (r.nativeEvent = t),
            (r.targetInst = n),
            (e = r);
        } else
          e = { topLevelType: e, nativeEvent: t, targetInst: n, ancestors: [] };
        try {
          Be(xn, e);
        } finally {
          (e.topLevelType = null),
            (e.nativeEvent = null),
            (e.targetInst = null),
            (e.ancestors.length = 0),
            10 > kn.length && kn.push(e);
        }
      }
    }
    var Mn = {},
      Pn = 0,
      In = "_reactListenersID" + ("" + Math.random()).slice(2);
    function On(e) {
      return (
        Object.prototype.hasOwnProperty.call(e, In) ||
          ((e[In] = Pn++), (Mn[e[In]] = {})),
        Mn[e[In]]
      );
    }
    function Ln(e) {
      if (
        void 0 ===
        (e = e || ("undefined" != typeof document ? document : void 0))
      )
        return null;
      try {
        return e.activeElement || e.body;
      } catch (t) {
        return e.body;
      }
    }
    function Fn(e) {
      for (; e && e.firstChild; ) e = e.firstChild;
      return e;
    }
    function Nn(e, t) {
      var n,
        r = Fn(e);
      for (e = 0; r; ) {
        if (3 === r.nodeType) {
          if (((n = e + r.textContent.length), e <= t && n >= t))
            return { node: r, offset: t - e };
          e = n;
        }
        e: {
          for (; r; ) {
            if (r.nextSibling) {
              r = r.nextSibling;
              break e;
            }
            r = r.parentNode;
          }
          r = void 0;
        }
        r = Fn(r);
      }
    }
    function Bn() {
      for (var e = window, t = Ln(); t instanceof e.HTMLIFrameElement; ) {
        try {
          e = t.contentDocument.defaultView;
        } catch (e) {
          break;
        }
        t = Ln(e.document);
      }
      return t;
    }
    function Hn(e) {
      var t = e && e.nodeName && e.nodeName.toLowerCase();
      return (
        t &&
        (("input" === t &&
          ("text" === e.type ||
            "search" === e.type ||
            "tel" === e.type ||
            "url" === e.type ||
            "password" === e.type)) ||
          "textarea" === t ||
          "true" === e.contentEditable)
      );
    }
    function zn(e) {
      var t = Bn(),
        n = e.focusedElem,
        r = e.selectionRange;
      if (
        t !== n &&
        n &&
        n.ownerDocument &&
        (function e(t, n) {
          return (
            !(!t || !n) &&
            (t === n ||
              ((!t || 3 !== t.nodeType) &&
                (n && 3 === n.nodeType
                  ? e(t, n.parentNode)
                  : "contains" in t
                  ? t.contains(n)
                  : !!t.compareDocumentPosition &&
                    !!(16 & t.compareDocumentPosition(n)))))
          );
        })(n.ownerDocument.documentElement, n)
      ) {
        if (null !== r && Hn(n))
          if (
            ((t = r.start),
            void 0 === (e = r.end) && (e = t),
            "selectionStart" in n)
          )
            (n.selectionStart = t),
              (n.selectionEnd = Math.min(e, n.value.length));
          else if (
            (e = ((t = n.ownerDocument || document) && t.defaultView) || window)
              .getSelection
          ) {
            e = e.getSelection();
            var i = n.textContent.length,
              o = Math.min(r.start, i);
            (r = void 0 === r.end ? o : Math.min(r.end, i)),
              !e.extend && o > r && ((i = r), (r = o), (o = i)),
              (i = Nn(n, o));
            var s = Nn(n, r);
            i &&
              s &&
              (1 !== e.rangeCount ||
                e.anchorNode !== i.node ||
                e.anchorOffset !== i.offset ||
                e.focusNode !== s.node ||
                e.focusOffset !== s.offset) &&
              ((t = t.createRange()).setStart(i.node, i.offset),
              e.removeAllRanges(),
              o > r
                ? (e.addRange(t), e.extend(s.node, s.offset))
                : (t.setEnd(s.node, s.offset), e.addRange(t)));
          }
        for (t = [], e = n; (e = e.parentNode); )
          1 === e.nodeType &&
            t.push({ element: e, left: e.scrollLeft, top: e.scrollTop });
        for (
          "function" == typeof n.focus && n.focus(), n = 0;
          n < t.length;
          n++
        )
          ((e = t[n]).element.scrollLeft = e.left),
            (e.element.scrollTop = e.top);
      }
    }
    var Un = q && "documentMode" in document && 11 >= document.documentMode,
      Wn = {
        select: {
          phasedRegistrationNames: {
            bubbled: "onSelect",
            captured: "onSelectCapture",
          },
          dependencies: "blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(
            " "
          ),
        },
      },
      jn = null,
      Vn = null,
      Gn = null,
      $n = !1;
    function qn(e, t) {
      var n =
        t.window === t ? t.document : 9 === t.nodeType ? t : t.ownerDocument;
      return $n || null == jn || jn !== Ln(n)
        ? null
        : ("selectionStart" in (n = jn) && Hn(n)
            ? (n = { start: n.selectionStart, end: n.selectionEnd })
            : (n = {
                anchorNode: (n = (
                  (n.ownerDocument && n.ownerDocument.defaultView) ||
                  window
                ).getSelection()).anchorNode,
                anchorOffset: n.anchorOffset,
                focusNode: n.focusNode,
                focusOffset: n.focusOffset,
              }),
          Gn && nn(Gn, n)
            ? null
            : ((Gn = n),
              ((e = ue.getPooled(Wn.select, Vn, e, t)).type = "select"),
              (e.target = jn),
              $(e),
              e));
    }
    var Kn = {
      eventTypes: Wn,
      extractEvents: function (e, t, n, r) {
        var i,
          o =
            r.window === r
              ? r.document
              : 9 === r.nodeType
              ? r
              : r.ownerDocument;
        if (!(i = !o)) {
          e: {
            (o = On(o)), (i = C.onSelect);
            for (var s = 0; s < i.length; s++) {
              var a = i[s];
              if (!o.hasOwnProperty(a) || !o[a]) {
                o = !1;
                break e;
              }
            }
            o = !0;
          }
          i = !o;
        }
        if (i) return null;
        switch (((o = t ? H(t) : window), e)) {
          case "focus":
            (ze(o) || "true" === o.contentEditable) &&
              ((jn = o), (Vn = t), (Gn = null));
            break;
          case "blur":
            Gn = Vn = jn = null;
            break;
          case "mousedown":
            $n = !0;
            break;
          case "contextmenu":
          case "mouseup":
          case "dragend":
            return ($n = !1), qn(n, r);
          case "selectionchange":
            if (Un) break;
          case "keydown":
          case "keyup":
            return qn(n, r);
        }
        return null;
      },
    };
    function Yn(e, t) {
      return (
        (e = i({ children: void 0 }, t)),
        (t = (function (e) {
          var t = "";
          return (
            r.Children.forEach(e, function (e) {
              null != e && (t += e);
            }),
            t
          );
        })(t.children)) && (e.children = t),
        e
      );
    }
    function Qn(e, t, n, r) {
      if (((e = e.options), t)) {
        t = {};
        for (var i = 0; i < n.length; i++) t["$" + n[i]] = !0;
        for (n = 0; n < e.length; n++)
          (i = t.hasOwnProperty("$" + e[n].value)),
            e[n].selected !== i && (e[n].selected = i),
            i && r && (e[n].defaultSelected = !0);
      } else {
        for (n = "" + bt(n), t = null, i = 0; i < e.length; i++) {
          if (e[i].value === n)
            return (
              (e[i].selected = !0), void (r && (e[i].defaultSelected = !0))
            );
          null !== t || e[i].disabled || (t = e[i]);
        }
        null !== t && (t.selected = !0);
      }
    }
    function Zn(e, t) {
      return (
        null != t.dangerouslySetInnerHTML && a("91"),
        i({}, t, {
          value: void 0,
          defaultValue: void 0,
          children: "" + e._wrapperState.initialValue,
        })
      );
    }
    function Xn(e, t) {
      var n = t.value;
      null == n &&
        ((n = t.defaultValue),
        null != (t = t.children) &&
          (null != n && a("92"),
          Array.isArray(t) && (1 >= t.length || a("93"), (t = t[0])),
          (n = t)),
        null == n && (n = "")),
        (e._wrapperState = { initialValue: bt(n) });
    }
    function Jn(e, t) {
      var n = bt(t.value),
        r = bt(t.defaultValue);
      null != n &&
        ((n = "" + n) !== e.value && (e.value = n),
        null == t.defaultValue && e.defaultValue !== n && (e.defaultValue = n)),
        null != r && (e.defaultValue = "" + r);
    }
    function er(e) {
      var t = e.textContent;
      t === e._wrapperState.initialValue && (e.value = t);
    }
    M.injectEventPluginOrder(
      "ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(
        " "
      )
    ),
      (E = z),
      (k = B),
      (x = H),
      M.injectEventPluginsByName({
        SimpleEventPlugin: Cn,
        EnterLeaveEventPlugin: Jt,
        ChangeEventPlugin: Ut,
        SelectEventPlugin: Kn,
        BeforeInputEventPlugin: Te,
      });
    var tr = "http://www.w3.org/1999/xhtml",
      nr = "http://www.w3.org/2000/svg";
    function rr(e) {
      switch (e) {
        case "svg":
          return "http://www.w3.org/2000/svg";
        case "math":
          return "http://www.w3.org/1998/Math/MathML";
        default:
          return "http://www.w3.org/1999/xhtml";
      }
    }
    function ir(e, t) {
      return null == e || "http://www.w3.org/1999/xhtml" === e
        ? rr(t)
        : "http://www.w3.org/2000/svg" === e && "foreignObject" === t
        ? "http://www.w3.org/1999/xhtml"
        : e;
    }
    var or = void 0,
      sr = (function (e) {
        return "undefined" != typeof MSApp && MSApp.execUnsafeLocalFunction
          ? function (t, n, r, i) {
              MSApp.execUnsafeLocalFunction(function () {
                return e(t, n);
              });
            }
          : e;
      })(function (e, t) {
        if (e.namespaceURI !== nr || "innerHTML" in e) e.innerHTML = t;
        else {
          for (
            (or = or || document.createElement("div")).innerHTML =
              "<svg>" + t + "</svg>",
              t = or.firstChild;
            e.firstChild;

          )
            e.removeChild(e.firstChild);
          for (; t.firstChild; ) e.appendChild(t.firstChild);
        }
      });
    function ar(e, t) {
      if (t) {
        var n = e.firstChild;
        if (n && n === e.lastChild && 3 === n.nodeType)
          return void (n.nodeValue = t);
      }
      e.textContent = t;
    }
    var lr = {
        animationIterationCount: !0,
        borderImageOutset: !0,
        borderImageSlice: !0,
        borderImageWidth: !0,
        boxFlex: !0,
        boxFlexGroup: !0,
        boxOrdinalGroup: !0,
        columnCount: !0,
        columns: !0,
        flex: !0,
        flexGrow: !0,
        flexPositive: !0,
        flexShrink: !0,
        flexNegative: !0,
        flexOrder: !0,
        gridArea: !0,
        gridRow: !0,
        gridRowEnd: !0,
        gridRowSpan: !0,
        gridRowStart: !0,
        gridColumn: !0,
        gridColumnEnd: !0,
        gridColumnSpan: !0,
        gridColumnStart: !0,
        fontWeight: !0,
        lineClamp: !0,
        lineHeight: !0,
        opacity: !0,
        order: !0,
        orphans: !0,
        tabSize: !0,
        widows: !0,
        zIndex: !0,
        zoom: !0,
        fillOpacity: !0,
        floodOpacity: !0,
        stopOpacity: !0,
        strokeDasharray: !0,
        strokeDashoffset: !0,
        strokeMiterlimit: !0,
        strokeOpacity: !0,
        strokeWidth: !0,
      },
      cr = ["Webkit", "ms", "Moz", "O"];
    function ur(e, t, n) {
      return null == t || "boolean" == typeof t || "" === t
        ? ""
        : n ||
          "number" != typeof t ||
          0 === t ||
          (lr.hasOwnProperty(e) && lr[e])
        ? ("" + t).trim()
        : t + "px";
    }
    function hr(e, t) {
      for (var n in ((e = e.style), t))
        if (t.hasOwnProperty(n)) {
          var r = 0 === n.indexOf("--"),
            i = ur(n, t[n], r);
          "float" === n && (n = "cssFloat"),
            r ? e.setProperty(n, i) : (e[n] = i);
        }
    }
    Object.keys(lr).forEach(function (e) {
      cr.forEach(function (t) {
        (t = t + e.charAt(0).toUpperCase() + e.substring(1)), (lr[t] = lr[e]);
      });
    });
    var dr = i(
      { menuitem: !0 },
      {
        area: !0,
        base: !0,
        br: !0,
        col: !0,
        embed: !0,
        hr: !0,
        img: !0,
        input: !0,
        keygen: !0,
        link: !0,
        meta: !0,
        param: !0,
        source: !0,
        track: !0,
        wbr: !0,
      }
    );
    function pr(e, t) {
      t &&
        (dr[e] &&
          (null != t.children || null != t.dangerouslySetInnerHTML) &&
          a("137", e, ""),
        null != t.dangerouslySetInnerHTML &&
          (null != t.children && a("60"),
          ("object" == typeof t.dangerouslySetInnerHTML &&
            "__html" in t.dangerouslySetInnerHTML) ||
            a("61")),
        null != t.style && "object" != typeof t.style && a("62", ""));
    }
    function fr(e, t) {
      if (-1 === e.indexOf("-")) return "string" == typeof t.is;
      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;
      }
    }
    function mr(e, t) {
      var n = On(
        (e = 9 === e.nodeType || 11 === e.nodeType ? e : e.ownerDocument)
      );
      t = C[t];
      for (var r = 0; r < t.length; r++) {
        var i = t[r];
        if (!n.hasOwnProperty(i) || !n[i]) {
          switch (i) {
            case "scroll":
              Dn("scroll", e);
              break;
            case "focus":
            case "blur":
              Dn("focus", e), Dn("blur", e), (n.blur = !0), (n.focus = !0);
              break;
            case "cancel":
            case "close":
              We(i) && Dn(i, e);
              break;
            case "invalid":
            case "submit":
            case "reset":
              break;
            default:
              -1 === re.indexOf(i) && Tn(i, e);
          }
          n[i] = !0;
        }
      }
    }
    function gr() {}
    var yr = null,
      vr = null;
    function wr(e, t) {
      switch (e) {
        case "button":
        case "input":
        case "select":
        case "textarea":
          return !!t.autoFocus;
      }
      return !1;
    }
    function br(e, t) {
      return (
        "textarea" === e ||
        "option" === e ||
        "noscript" === e ||
        "string" == typeof t.children ||
        "number" == typeof t.children ||
        ("object" == typeof t.dangerouslySetInnerHTML &&
          null !== t.dangerouslySetInnerHTML &&
          null != t.dangerouslySetInnerHTML.__html)
      );
    }
    var Sr = "function" == typeof setTimeout ? setTimeout : void 0,
      Cr = "function" == typeof clearTimeout ? clearTimeout : void 0,
      Er = o.unstable_scheduleCallback,
      kr = o.unstable_cancelCallback;
    function xr(e) {
      for (e = e.nextSibling; e && 1 !== e.nodeType && 3 !== e.nodeType; )
        e = e.nextSibling;
      return e;
    }
    function Rr(e) {
      for (e = e.firstChild; e && 1 !== e.nodeType && 3 !== e.nodeType; )
        e = e.nextSibling;
      return e;
    }
    new Set();
    var Tr = [],
      Dr = -1;
    function Ar(e) {
      0 > Dr || ((e.current = Tr[Dr]), (Tr[Dr] = null), Dr--);
    }
    function _r(e, t) {
      Dr++, (Tr[Dr] = e.current), (e.current = t);
    }
    var Mr = {},
      Pr = { current: Mr },
      Ir = { current: !1 },
      Or = Mr;
    function Lr(e, t) {
      var n = e.type.contextTypes;
      if (!n) return Mr;
      var r = e.stateNode;
      if (r && r.__reactInternalMemoizedUnmaskedChildContext === t)
        return r.__reactInternalMemoizedMaskedChildContext;
      var i,
        o = {};
      for (i in n) o[i] = t[i];
      return (
        r &&
          (((e = e.stateNode).__reactInternalMemoizedUnmaskedChildContext = t),
          (e.__reactInternalMemoizedMaskedChildContext = o)),
        o
      );
    }
    function Fr(e) {
      return null != (e = e.childContextTypes);
    }
    function Nr(e) {
      Ar(Ir), Ar(Pr);
    }
    function Br(e) {
      Ar(Ir), Ar(Pr);
    }
    function Hr(e, t, n) {
      Pr.current !== Mr && a("168"), _r(Pr, t), _r(Ir, n);
    }
    function zr(e, t, n) {
      var r = e.stateNode;
      if (((e = t.childContextTypes), "function" != typeof r.getChildContext))
        return n;
      for (var o in (r = r.getChildContext()))
        o in e || a("108", ct(t) || "Unknown", o);
      return i({}, n, r);
    }
    function Ur(e) {
      var t = e.stateNode;
      return (
        (t = (t && t.__reactInternalMemoizedMergedChildContext) || Mr),
        (Or = Pr.current),
        _r(Pr, t),
        _r(Ir, Ir.current),
        !0
      );
    }
    function Wr(e, t, n) {
      var r = e.stateNode;
      r || a("169"),
        n
          ? ((t = zr(e, t, Or)),
            (r.__reactInternalMemoizedMergedChildContext = t),
            Ar(Ir),
            Ar(Pr),
            _r(Pr, t))
          : Ar(Ir),
        _r(Ir, n);
    }
    var jr = null,
      Vr = null;
    function Gr(e) {
      return function (t) {
        try {
          return e(t);
        } catch (e) {}
      };
    }
    function $r(e, t, n, r) {
      (this.tag = e),
        (this.key = n),
        (this.sibling = this.child = this.return = this.stateNode = this.type = this.elementType = null),
        (this.index = 0),
        (this.ref = null),
        (this.pendingProps = t),
        (this.contextDependencies = this.memoizedState = this.updateQueue = this.memoizedProps = null),
        (this.mode = r),
        (this.effectTag = 0),
        (this.lastEffect = this.firstEffect = this.nextEffect = null),
        (this.childExpirationTime = this.expirationTime = 0),
        (this.alternate = null);
    }
    function qr(e, t, n, r) {
      return new $r(e, t, n, r);
    }
    function Kr(e) {
      return !(!(e = e.prototype) || !e.isReactComponent);
    }
    function Yr(e, t) {
      var n = e.alternate;
      return (
        null === n
          ? (((n = qr(e.tag, t, e.key, e.mode)).elementType = e.elementType),
            (n.type = e.type),
            (n.stateNode = e.stateNode),
            (n.alternate = e),
            (e.alternate = n))
          : ((n.pendingProps = t),
            (n.effectTag = 0),
            (n.nextEffect = null),
            (n.firstEffect = null),
            (n.lastEffect = null)),
        (n.childExpirationTime = e.childExpirationTime),
        (n.expirationTime = e.expirationTime),
        (n.child = e.child),
        (n.memoizedProps = e.memoizedProps),
        (n.memoizedState = e.memoizedState),
        (n.updateQueue = e.updateQueue),
        (n.contextDependencies = e.contextDependencies),
        (n.sibling = e.sibling),
        (n.index = e.index),
        (n.ref = e.ref),
        n
      );
    }
    function Qr(e, t, n, r, i, o) {
      var s = 2;
      if (((r = e), "function" == typeof e)) Kr(e) && (s = 1);
      else if ("string" == typeof e) s = 5;
      else
        e: switch (e) {
          case Ze:
            return Zr(n.children, i, o, t);
          case nt:
            return Xr(n, 3 | i, o, t);
          case Xe:
            return Xr(n, 2 | i, o, t);
          case Je:
            return (
              ((e = qr(12, n, t, 4 | i)).elementType = Je),
              (e.type = Je),
              (e.expirationTime = o),
              e
            );
          case it:
            return (
              ((e = qr(13, n, t, i)).elementType = it),
              (e.type = it),
              (e.expirationTime = o),
              e
            );
          default:
            if ("object" == typeof e && null !== e)
              switch (e.$$typeof) {
                case et:
                  s = 10;
                  break e;
                case tt:
                  s = 9;
                  break e;
                case rt:
                  s = 11;
                  break e;
                case ot:
                  s = 14;
                  break e;
                case st:
                  (s = 16), (r = null);
                  break e;
              }
            a("130", null == e ? e : typeof e, "");
        }
      return (
        ((t = qr(s, n, t, i)).elementType = e),
        (t.type = r),
        (t.expirationTime = o),
        t
      );
    }
    function Zr(e, t, n, r) {
      return ((e = qr(7, e, r, t)).expirationTime = n), e;
    }
    function Xr(e, t, n, r) {
      return (
        (e = qr(8, e, r, t)),
        (t = 0 == (1 & t) ? Xe : nt),
        (e.elementType = t),
        (e.type = t),
        (e.expirationTime = n),
        e
      );
    }
    function Jr(e, t, n) {
      return ((e = qr(6, e, null, t)).expirationTime = n), e;
    }
    function ei(e, t, n) {
      return (
        ((t = qr(
          4,
          null !== e.children ? e.children : [],
          e.key,
          t
        )).expirationTime = n),
        (t.stateNode = {
          containerInfo: e.containerInfo,
          pendingChildren: null,
          implementation: e.implementation,
        }),
        t
      );
    }
    function ti(e, t) {
      e.didError = !1;
      var n = e.earliestPendingTime;
      0 === n
        ? (e.earliestPendingTime = e.latestPendingTime = t)
        : n < t
        ? (e.earliestPendingTime = t)
        : e.latestPendingTime > t && (e.latestPendingTime = t),
        ii(t, e);
    }
    function ni(e, t) {
      (e.didError = !1), e.latestPingedTime >= t && (e.latestPingedTime = 0);
      var n = e.earliestPendingTime,
        r = e.latestPendingTime;
      n === t
        ? (e.earliestPendingTime = r === t ? (e.latestPendingTime = 0) : r)
        : r === t && (e.latestPendingTime = n),
        (n = e.earliestSuspendedTime),
        (r = e.latestSuspendedTime),
        0 === n
          ? (e.earliestSuspendedTime = e.latestSuspendedTime = t)
          : n < t
          ? (e.earliestSuspendedTime = t)
          : r > t && (e.latestSuspendedTime = t),
        ii(t, e);
    }
    function ri(e, t) {
      var n = e.earliestPendingTime;
      return n > t && (t = n), (e = e.earliestSuspendedTime) > t && (t = e), t;
    }
    function ii(e, t) {
      var n = t.earliestSuspendedTime,
        r = t.latestSuspendedTime,
        i = t.earliestPendingTime,
        o = t.latestPingedTime;
      0 === (i = 0 !== i ? i : o) && (0 === e || r < e) && (i = r),
        0 !== (e = i) && n > e && (e = n),
        (t.nextExpirationTimeToWorkOn = i),
        (t.expirationTime = e);
    }
    function oi(e, t) {
      if (e && e.defaultProps)
        for (var n in ((t = i({}, t)), (e = e.defaultProps)))
          void 0 === t[n] && (t[n] = e[n]);
      return t;
    }
    var si = new r.Component().refs;
    function ai(e, t, n, r) {
      (n = null == (n = n(r, (t = e.memoizedState))) ? t : i({}, t, n)),
        (e.memoizedState = n),
        null !== (r = e.updateQueue) &&
          0 === e.expirationTime &&
          (r.baseState = n);
    }
    var li = {
      isMounted: function (e) {
        return !!(e = e._reactInternalFiber) && 2 === rn(e);
      },
      enqueueSetState: function (e, t, n) {
        e = e._reactInternalFiber;
        var r = ga(),
          i = Wo((r = Us(r, e)));
        (i.payload = t),
          null != n && (i.callback = n),
          Ls(),
          Vo(e, i),
          Gs(e, r);
      },
      enqueueReplaceState: function (e, t, n) {
        e = e._reactInternalFiber;
        var r = ga(),
          i = Wo((r = Us(r, e)));
        (i.tag = No),
          (i.payload = t),
          null != n && (i.callback = n),
          Ls(),
          Vo(e, i),
          Gs(e, r);
      },
      enqueueForceUpdate: function (e, t) {
        e = e._reactInternalFiber;
        var n = ga(),
          r = Wo((n = Us(n, e)));
        (r.tag = Bo), null != t && (r.callback = t), Ls(), Vo(e, r), Gs(e, n);
      },
    };
    function ci(e, t, n, r, i, o, s) {
      return "function" == typeof (e = e.stateNode).shouldComponentUpdate
        ? e.shouldComponentUpdate(r, o, s)
        : !t.prototype ||
            !t.prototype.isPureReactComponent ||
            !nn(n, r) ||
            !nn(i, o);
    }
    function ui(e, t, n) {
      var r = !1,
        i = Mr,
        o = t.contextType;
      return (
        "object" == typeof o && null !== o
          ? (o = Fo(o))
          : ((i = Fr(t) ? Or : Pr.current),
            (o = (r = null != (r = t.contextTypes)) ? Lr(e, i) : Mr)),
        (t = new t(n, o)),
        (e.memoizedState =
          null !== t.state && void 0 !== t.state ? t.state : null),
        (t.updater = li),
        (e.stateNode = t),
        (t._reactInternalFiber = e),
        r &&
          (((e = e.stateNode).__reactInternalMemoizedUnmaskedChildContext = i),
          (e.__reactInternalMemoizedMaskedChildContext = o)),
        t
      );
    }
    function hi(e, t, n, r) {
      (e = t.state),
        "function" == typeof t.componentWillReceiveProps &&
          t.componentWillReceiveProps(n, r),
        "function" == typeof t.UNSAFE_componentWillReceiveProps &&
          t.UNSAFE_componentWillReceiveProps(n, r),
        t.state !== e && li.enqueueReplaceState(t, t.state, null);
    }
    function di(e, t, n, r) {
      var i = e.stateNode;
      (i.props = n), (i.state = e.memoizedState), (i.refs = si);
      var o = t.contextType;
      "object" == typeof o && null !== o
        ? (i.context = Fo(o))
        : ((o = Fr(t) ? Or : Pr.current), (i.context = Lr(e, o))),
        null !== (o = e.updateQueue) &&
          (Ko(e, o, n, i, r), (i.state = e.memoizedState)),
        "function" == typeof (o = t.getDerivedStateFromProps) &&
          (ai(e, t, o, n), (i.state = e.memoizedState)),
        "function" == typeof t.getDerivedStateFromProps ||
          "function" == typeof i.getSnapshotBeforeUpdate ||
          ("function" != typeof i.UNSAFE_componentWillMount &&
            "function" != typeof i.componentWillMount) ||
          ((t = i.state),
          "function" == typeof i.componentWillMount && i.componentWillMount(),
          "function" == typeof i.UNSAFE_componentWillMount &&
            i.UNSAFE_componentWillMount(),
          t !== i.state && li.enqueueReplaceState(i, i.state, null),
          null !== (o = e.updateQueue) &&
            (Ko(e, o, n, i, r), (i.state = e.memoizedState))),
        "function" == typeof i.componentDidMount && (e.effectTag |= 4);
    }
    var pi = Array.isArray;
    function fi(e, t, n) {
      if (
        null !== (e = n.ref) &&
        "function" != typeof e &&
        "object" != typeof e
      ) {
        if (n._owner) {
          n = n._owner;
          var r = void 0;
          n && (1 !== n.tag && a("309"), (r = n.stateNode)), r || a("147", e);
          var i = "" + e;
          return null !== t &&
            null !== t.ref &&
            "function" == typeof t.ref &&
            t.ref._stringRef === i
            ? t.ref
            : (((t = function (e) {
                var t = r.refs;
                t === si && (t = r.refs = {}),
                  null === e ? delete t[i] : (t[i] = e);
              })._stringRef = i),
              t);
        }
        "string" != typeof e && a("284"), n._owner || a("290", e);
      }
      return e;
    }
    function mi(e, t) {
      "textarea" !== e.type &&
        a(
          "31",
          "[object Object]" === Object.prototype.toString.call(t)
            ? "object with keys {" + Object.keys(t).join(", ") + "}"
            : t,
          ""
        );
    }
    function gi(e) {
      function t(t, n) {
        if (e) {
          var r = t.lastEffect;
          null !== r
            ? ((r.nextEffect = n), (t.lastEffect = n))
            : (t.firstEffect = t.lastEffect = n),
            (n.nextEffect = null),
            (n.effectTag = 8);
        }
      }
      function n(n, r) {
        if (!e) return null;
        for (; null !== r; ) t(n, r), (r = r.sibling);
        return null;
      }
      function r(e, t) {
        for (e = new Map(); null !== t; )
          null !== t.key ? e.set(t.key, t) : e.set(t.index, t), (t = t.sibling);
        return e;
      }
      function i(e, t, n) {
        return ((e = Yr(e, t)).index = 0), (e.sibling = null), e;
      }
      function o(t, n, r) {
        return (
          (t.index = r),
          e
            ? null !== (r = t.alternate)
              ? (r = r.index) < n
                ? ((t.effectTag = 2), n)
                : r
              : ((t.effectTag = 2), n)
            : n
        );
      }
      function s(t) {
        return e && null === t.alternate && (t.effectTag = 2), t;
      }
      function l(e, t, n, r) {
        return null === t || 6 !== t.tag
          ? (((t = Jr(n, e.mode, r)).return = e), t)
          : (((t = i(t, n)).return = e), t);
      }
      function c(e, t, n, r) {
        return null !== t && t.elementType === n.type
          ? (((r = i(t, n.props)).ref = fi(e, t, n)), (r.return = e), r)
          : (((r = Qr(n.type, n.key, n.props, null, e.mode, r)).ref = fi(
              e,
              t,
              n
            )),
            (r.return = e),
            r);
      }
      function u(e, t, n, r) {
        return null === t ||
          4 !== t.tag ||
          t.stateNode.containerInfo !== n.containerInfo ||
          t.stateNode.implementation !== n.implementation
          ? (((t = ei(n, e.mode, r)).return = e), t)
          : (((t = i(t, n.children || [])).return = e), t);
      }
      function h(e, t, n, r, o) {
        return null === t || 7 !== t.tag
          ? (((t = Zr(n, e.mode, r, o)).return = e), t)
          : (((t = i(t, n)).return = e), t);
      }
      function d(e, t, n) {
        if ("string" == typeof t || "number" == typeof t)
          return ((t = Jr("" + t, e.mode, n)).return = e), t;
        if ("object" == typeof t && null !== t) {
          switch (t.$$typeof) {
            case Ye:
              return (
                ((n = Qr(t.type, t.key, t.props, null, e.mode, n)).ref = fi(
                  e,
                  null,
                  t
                )),
                (n.return = e),
                n
              );
            case Qe:
              return ((t = ei(t, e.mode, n)).return = e), t;
          }
          if (pi(t) || lt(t))
            return ((t = Zr(t, e.mode, n, null)).return = e), t;
          mi(e, t);
        }
        return null;
      }
      function p(e, t, n, r) {
        var i = null !== t ? t.key : null;
        if ("string" == typeof n || "number" == typeof n)
          return null !== i ? null : l(e, t, "" + n, r);
        if ("object" == typeof n && null !== n) {
          switch (n.$$typeof) {
            case Ye:
              return n.key === i
                ? n.type === Ze
                  ? h(e, t, n.props.children, r, i)
                  : c(e, t, n, r)
                : null;
            case Qe:
              return n.key === i ? u(e, t, n, r) : null;
          }
          if (pi(n) || lt(n)) return null !== i ? null : h(e, t, n, r, null);
          mi(e, n);
        }
        return null;
      }
      function f(e, t, n, r, i) {
        if ("string" == typeof r || "number" == typeof r)
          return l(t, (e = e.get(n) || null), "" + r, i);
        if ("object" == typeof r && null !== r) {
          switch (r.$$typeof) {
            case Ye:
              return (
                (e = e.get(null === r.key ? n : r.key) || null),
                r.type === Ze
                  ? h(t, e, r.props.children, i, r.key)
                  : c(t, e, r, i)
              );
            case Qe:
              return u(
                t,
                (e = e.get(null === r.key ? n : r.key) || null),
                r,
                i
              );
          }
          if (pi(r) || lt(r)) return h(t, (e = e.get(n) || null), r, i, null);
          mi(t, r);
        }
        return null;
      }
      function m(i, s, a, l) {
        for (
          var c = null, u = null, h = s, m = (s = 0), g = null;
          null !== h && m < a.length;
          m++
        ) {
          h.index > m ? ((g = h), (h = null)) : (g = h.sibling);
          var y = p(i, h, a[m], l);
          if (null === y) {
            null === h && (h = g);
            break;
          }
          e && h && null === y.alternate && t(i, h),
            (s = o(y, s, m)),
            null === u ? (c = y) : (u.sibling = y),
            (u = y),
            (h = g);
        }
        if (m === a.length) return n(i, h), c;
        if (null === h) {
          for (; m < a.length; m++)
            (h = d(i, a[m], l)) &&
              ((s = o(h, s, m)),
              null === u ? (c = h) : (u.sibling = h),
              (u = h));
          return c;
        }
        for (h = r(i, h); m < a.length; m++)
          (g = f(h, i, m, a[m], l)) &&
            (e && null !== g.alternate && h.delete(null === g.key ? m : g.key),
            (s = o(g, s, m)),
            null === u ? (c = g) : (u.sibling = g),
            (u = g));
        return (
          e &&
            h.forEach(function (e) {
              return t(i, e);
            }),
          c
        );
      }
      function g(i, s, l, c) {
        var u = lt(l);
        "function" != typeof u && a("150"), null == (l = u.call(l)) && a("151");
        for (
          var h = (u = null), m = s, g = (s = 0), y = null, v = l.next();
          null !== m && !v.done;
          g++, v = l.next()
        ) {
          m.index > g ? ((y = m), (m = null)) : (y = m.sibling);
          var w = p(i, m, v.value, c);
          if (null === w) {
            m || (m = y);
            break;
          }
          e && m && null === w.alternate && t(i, m),
            (s = o(w, s, g)),
            null === h ? (u = w) : (h.sibling = w),
            (h = w),
            (m = y);
        }
        if (v.done) return n(i, m), u;
        if (null === m) {
          for (; !v.done; g++, v = l.next())
            null !== (v = d(i, v.value, c)) &&
              ((s = o(v, s, g)),
              null === h ? (u = v) : (h.sibling = v),
              (h = v));
          return u;
        }
        for (m = r(i, m); !v.done; g++, v = l.next())
          null !== (v = f(m, i, g, v.value, c)) &&
            (e && null !== v.alternate && m.delete(null === v.key ? g : v.key),
            (s = o(v, s, g)),
            null === h ? (u = v) : (h.sibling = v),
            (h = v));
        return (
          e &&
            m.forEach(function (e) {
              return t(i, e);
            }),
          u
        );
      }
      return function (e, r, o, l) {
        var c =
          "object" == typeof o && null !== o && o.type === Ze && null === o.key;
        c && (o = o.props.children);
        var u = "object" == typeof o && null !== o;
        if (u)
          switch (o.$$typeof) {
            case Ye:
              e: {
                for (u = o.key, c = r; null !== c; ) {
                  if (c.key === u) {
                    if (
                      7 === c.tag ? o.type === Ze : c.elementType === o.type
                    ) {
                      n(e, c.sibling),
                        ((r = i(
                          c,
                          o.type === Ze ? o.props.children : o.props
                        )).ref = fi(e, c, o)),
                        (r.return = e),
                        (e = r);
                      break e;
                    }
                    n(e, c);
                    break;
                  }
                  t(e, c), (c = c.sibling);
                }
                o.type === Ze
                  ? (((r = Zr(o.props.children, e.mode, l, o.key)).return = e),
                    (e = r))
                  : (((l = Qr(
                      o.type,
                      o.key,
                      o.props,
                      null,
                      e.mode,
                      l
                    )).ref = fi(e, r, o)),
                    (l.return = e),
                    (e = l));
              }
              return s(e);
            case Qe:
              e: {
                for (c = o.key; null !== r; ) {
                  if (r.key === c) {
                    if (
                      4 === r.tag &&
                      r.stateNode.containerInfo === o.containerInfo &&
                      r.stateNode.implementation === o.implementation
                    ) {
                      n(e, r.sibling),
                        ((r = i(r, o.children || [])).return = e),
                        (e = r);
                      break e;
                    }
                    n(e, r);
                    break;
                  }
                  t(e, r), (r = r.sibling);
                }
                ((r = ei(o, e.mode, l)).return = e), (e = r);
              }
              return s(e);
          }
        if ("string" == typeof o || "number" == typeof o)
          return (
            (o = "" + o),
            null !== r && 6 === r.tag
              ? (n(e, r.sibling), ((r = i(r, o)).return = e), (e = r))
              : (n(e, r), ((r = Jr(o, e.mode, l)).return = e), (e = r)),
            s(e)
          );
        if (pi(o)) return m(e, r, o, l);
        if (lt(o)) return g(e, r, o, l);
        if ((u && mi(e, o), void 0 === o && !c))
          switch (e.tag) {
            case 1:
            case 0:
              a("152", (l = e.type).displayName || l.name || "Component");
          }
        return n(e, r);
      };
    }
    var yi = gi(!0),
      vi = gi(!1),
      wi = {},
      bi = { current: wi },
      Si = { current: wi },
      Ci = { current: wi };
    function Ei(e) {
      return e === wi && a("174"), e;
    }
    function ki(e, t) {
      _r(Ci, t), _r(Si, e), _r(bi, wi);
      var n = t.nodeType;
      switch (n) {
        case 9:
        case 11:
          t = (t = t.documentElement) ? t.namespaceURI : ir(null, "");
          break;
        default:
          t = ir(
            (t = (n = 8 === n ? t.parentNode : t).namespaceURI || null),
            (n = n.tagName)
          );
      }
      Ar(bi), _r(bi, t);
    }
    function xi(e) {
      Ar(bi), Ar(Si), Ar(Ci);
    }
    function Ri(e) {
      Ei(Ci.current);
      var t = Ei(bi.current),
        n = ir(t, e.type);
      t !== n && (_r(Si, e), _r(bi, n));
    }
    function Ti(e) {
      Si.current === e && (Ar(bi), Ar(Si));
    }
    var Di = $e.ReactCurrentDispatcher,
      Ai = 0,
      _i = null,
      Mi = null,
      Pi = null,
      Ii = null,
      Oi = null,
      Li = null,
      Fi = 0,
      Ni = null,
      Bi = 0,
      Hi = !1,
      zi = null,
      Ui = 0;
    function Wi() {
      a("307");
    }
    function ji(e, t) {
      if (null === t) return !1;
      for (var n = 0; n < t.length && n < e.length; n++)
        if (!en(e[n], t[n])) return !1;
      return !0;
    }
    function Vi(e, t, n, r, i, o) {
      if (
        ((Ai = o),
        (_i = t),
        (Pi = null !== e ? e.memoizedState : null),
        (Di.current = null === Pi ? ro : io),
        (t = n(r, i)),
        Hi)
      ) {
        do {
          (Hi = !1),
            (Ui += 1),
            (Pi = null !== e ? e.memoizedState : null),
            (Li = Ii),
            (Ni = Oi = Mi = null),
            (Di.current = io),
            (t = n(r, i));
        } while (Hi);
        (zi = null), (Ui = 0);
      }
      return (
        (Di.current = no),
        ((e = _i).memoizedState = Ii),
        (e.expirationTime = Fi),
        (e.updateQueue = Ni),
        (e.effectTag |= Bi),
        (e = null !== Mi && null !== Mi.next),
        (Ai = 0),
        (Li = Oi = Ii = Pi = Mi = _i = null),
        (Fi = 0),
        (Ni = null),
        (Bi = 0),
        e && a("300"),
        t
      );
    }
    function Gi() {
      (Di.current = no),
        (Ai = 0),
        (Li = Oi = Ii = Pi = Mi = _i = null),
        (Fi = 0),
        (Ni = null),
        (Bi = 0),
        (Hi = !1),
        (zi = null),
        (Ui = 0);
    }
    function $i() {
      var e = {
        memoizedState: null,
        baseState: null,
        queue: null,
        baseUpdate: null,
        next: null,
      };
      return null === Oi ? (Ii = Oi = e) : (Oi = Oi.next = e), Oi;
    }
    function qi() {
      if (null !== Li)
        (Li = (Oi = Li).next), (Pi = null !== (Mi = Pi) ? Mi.next : null);
      else {
        null === Pi && a("310");
        var e = {
          memoizedState: (Mi = Pi).memoizedState,
          baseState: Mi.baseState,
          queue: Mi.queue,
          baseUpdate: Mi.baseUpdate,
          next: null,
        };
        (Oi = null === Oi ? (Ii = e) : (Oi.next = e)), (Pi = Mi.next);
      }
      return Oi;
    }
    function Ki(e, t) {
      return "function" == typeof t ? t(e) : t;
    }
    function Yi(e) {
      var t = qi(),
        n = t.queue;
      if ((null === n && a("311"), 0 < Ui)) {
        var r = n.dispatch;
        if (null !== zi) {
          var i = zi.get(n);
          if (void 0 !== i) {
            zi.delete(n);
            var o = t.memoizedState;
            do {
              (o = e(o, i.action)), (i = i.next);
            } while (null !== i);
            return (
              en(o, t.memoizedState) || (go = !0),
              (t.memoizedState = o),
              t.baseUpdate === n.last && (t.baseState = o),
              (n.eagerReducer = e),
              (n.eagerState = o),
              [o, r]
            );
          }
        }
        return [t.memoizedState, r];
      }
      r = n.last;
      var s = t.baseUpdate;
      if (
        ((o = t.baseState),
        null !== s
          ? (null !== r && (r.next = null), (r = s.next))
          : (r = null !== r ? r.next : null),
        null !== r)
      ) {
        var l = (i = null),
          c = r,
          u = !1;
        do {
          var h = c.expirationTime;
          h < Ai
            ? (u || ((u = !0), (l = s), (i = o)), h > Fi && (Fi = h))
            : (o = c.eagerReducer === e ? c.eagerState : e(o, c.action)),
            (s = c),
            (c = c.next);
        } while (null !== c && c !== r);
        u || ((l = s), (i = o)),
          en(o, t.memoizedState) || (go = !0),
          (t.memoizedState = o),
          (t.baseUpdate = l),
          (t.baseState = i),
          (n.eagerReducer = e),
          (n.eagerState = o);
      }
      return [t.memoizedState, n.dispatch];
    }
    function Qi(e, t, n, r) {
      return (
        (e = { tag: e, create: t, destroy: n, deps: r, next: null }),
        null === Ni
          ? ((Ni = { lastEffect: null }).lastEffect = e.next = e)
          : null === (t = Ni.lastEffect)
          ? (Ni.lastEffect = e.next = e)
          : ((n = t.next), (t.next = e), (e.next = n), (Ni.lastEffect = e)),
        e
      );
    }
    function Zi(e, t, n, r) {
      var i = $i();
      (Bi |= e), (i.memoizedState = Qi(t, n, void 0, void 0 === r ? null : r));
    }
    function Xi(e, t, n, r) {
      var i = qi();
      r = void 0 === r ? null : r;
      var o = void 0;
      if (null !== Mi) {
        var s = Mi.memoizedState;
        if (((o = s.destroy), null !== r && ji(r, s.deps)))
          return void Qi(0, n, o, r);
      }
      (Bi |= e), (i.memoizedState = Qi(t, n, o, r));
    }
    function Ji(e, t) {
      return "function" == typeof t
        ? ((e = e()),
          t(e),
          function () {
            t(null);
          })
        : null != t
        ? ((e = e()),
          (t.current = e),
          function () {
            t.current = null;
          })
        : void 0;
    }
    function eo() {}
    function to(e, t, n) {
      25 > Ui || a("301");
      var r = e.alternate;
      if (e === _i || (null !== r && r === _i))
        if (
          ((Hi = !0),
          (e = {
            expirationTime: Ai,
            action: n,
            eagerReducer: null,
            eagerState: null,
            next: null,
          }),
          null === zi && (zi = new Map()),
          void 0 === (n = zi.get(t)))
        )
          zi.set(t, e);
        else {
          for (t = n; null !== t.next; ) t = t.next;
          t.next = e;
        }
      else {
        Ls();
        var i = ga(),
          o = {
            expirationTime: (i = Us(i, e)),
            action: n,
            eagerReducer: null,
            eagerState: null,
            next: null,
          },
          s = t.last;
        if (null === s) o.next = o;
        else {
          var l = s.next;
          null !== l && (o.next = l), (s.next = o);
        }
        if (
          ((t.last = o),
          0 === e.expirationTime &&
            (null === r || 0 === r.expirationTime) &&
            null !== (r = t.eagerReducer))
        )
          try {
            var c = t.eagerState,
              u = r(c, n);
            if (((o.eagerReducer = r), (o.eagerState = u), en(u, c))) return;
          } catch (e) {}
        Gs(e, i);
      }
    }
    var no = {
        readContext: Fo,
        useCallback: Wi,
        useContext: Wi,
        useEffect: Wi,
        useImperativeHandle: Wi,
        useLayoutEffect: Wi,
        useMemo: Wi,
        useReducer: Wi,
        useRef: Wi,
        useState: Wi,
        useDebugValue: Wi,
      },
      ro = {
        readContext: Fo,
        useCallback: function (e, t) {
          return ($i().memoizedState = [e, void 0 === t ? null : t]), e;
        },
        useContext: Fo,
        useEffect: function (e, t) {
          return Zi(516, 192, e, t);
        },
        useImperativeHandle: function (e, t, n) {
          return (
            (n = null != n ? n.concat([e]) : null),
            Zi(4, 36, Ji.bind(null, t, e), n)
          );
        },
        useLayoutEffect: function (e, t) {
          return Zi(4, 36, e, t);
        },
        useMemo: function (e, t) {
          var n = $i();
          return (
            (t = void 0 === t ? null : t),
            (e = e()),
            (n.memoizedState = [e, t]),
            e
          );
        },
        useReducer: function (e, t, n) {
          var r = $i();
          return (
            (t = void 0 !== n ? n(t) : t),
            (r.memoizedState = r.baseState = t),
            (e = (e = r.queue = {
              last: null,
              dispatch: null,
              eagerReducer: e,
              eagerState: t,
            }).dispatch = to.bind(null, _i, e)),
            [r.memoizedState, e]
          );
        },
        useRef: function (e) {
          return (e = { current: e }), ($i().memoizedState = e);
        },
        useState: function (e) {
          var t = $i();
          return (
            "function" == typeof e && (e = e()),
            (t.memoizedState = t.baseState = e),
            (e = (e = t.queue = {
              last: null,
              dispatch: null,
              eagerReducer: Ki,
              eagerState: e,
            }).dispatch = to.bind(null, _i, e)),
            [t.memoizedState, e]
          );
        },
        useDebugValue: eo,
      },
      io = {
        readContext: Fo,
        useCallback: function (e, t) {
          var n = qi();
          t = void 0 === t ? null : t;
          var r = n.memoizedState;
          return null !== r && null !== t && ji(t, r[1])
            ? r[0]
            : ((n.memoizedState = [e, t]), e);
        },
        useContext: Fo,
        useEffect: function (e, t) {
          return Xi(516, 192, e, t);
        },
        useImperativeHandle: function (e, t, n) {
          return (
            (n = null != n ? n.concat([e]) : null),
            Xi(4, 36, Ji.bind(null, t, e), n)
          );
        },
        useLayoutEffect: function (e, t) {
          return Xi(4, 36, e, t);
        },
        useMemo: function (e, t) {
          var n = qi();
          t = void 0 === t ? null : t;
          var r = n.memoizedState;
          return null !== r && null !== t && ji(t, r[1])
            ? r[0]
            : ((e = e()), (n.memoizedState = [e, t]), e);
        },
        useReducer: Yi,
        useRef: function () {
          return qi().memoizedState;
        },
        useState: function (e) {
          return Yi(Ki);
        },
        useDebugValue: eo,
      },
      oo = null,
      so = null,
      ao = !1;
    function lo(e, t) {
      var n = qr(5, null, null, 0);
      (n.elementType = "DELETED"),
        (n.type = "DELETED"),
        (n.stateNode = t),
        (n.return = e),
        (n.effectTag = 8),
        null !== e.lastEffect
          ? ((e.lastEffect.nextEffect = n), (e.lastEffect = n))
          : (e.firstEffect = e.lastEffect = n);
    }
    function co(e, t) {
      switch (e.tag) {
        case 5:
          var n = e.type;
          return (
            null !==
              (t =
                1 !== t.nodeType || n.toLowerCase() !== t.nodeName.toLowerCase()
                  ? null
                  : t) && ((e.stateNode = t), !0)
          );
        case 6:
          return (
            null !==
              (t = "" === e.pendingProps || 3 !== t.nodeType ? null : t) &&
            ((e.stateNode = t), !0)
          );
        case 13:
        default:
          return !1;
      }
    }
    function uo(e) {
      if (ao) {
        var t = so;
        if (t) {
          var n = t;
          if (!co(e, t)) {
            if (!(t = xr(n)) || !co(e, t))
              return (e.effectTag |= 2), (ao = !1), void (oo = e);
            lo(oo, n);
          }
          (oo = e), (so = Rr(t));
        } else (e.effectTag |= 2), (ao = !1), (oo = e);
      }
    }
    function ho(e) {
      for (
        e = e.return;
        null !== e && 5 !== e.tag && 3 !== e.tag && 18 !== e.tag;

      )
        e = e.return;
      oo = e;
    }
    function po(e) {
      if (e !== oo) return !1;
      if (!ao) return ho(e), (ao = !0), !1;
      var t = e.type;
      if (
        5 !== e.tag ||
        ("head" !== t && "body" !== t && !br(t, e.memoizedProps))
      )
        for (t = so; t; ) lo(e, t), (t = xr(t));
      return ho(e), (so = oo ? xr(e.stateNode) : null), !0;
    }
    function fo() {
      (so = oo = null), (ao = !1);
    }
    var mo = $e.ReactCurrentOwner,
      go = !1;
    function yo(e, t, n, r) {
      t.child = null === e ? vi(t, null, n, r) : yi(t, e.child, n, r);
    }
    function vo(e, t, n, r, i) {
      n = n.render;
      var o = t.ref;
      return (
        Lo(t, i),
        (r = Vi(e, t, n, r, o, i)),
        null === e || go
          ? ((t.effectTag |= 1), yo(e, t, r, i), t.child)
          : ((t.updateQueue = e.updateQueue),
            (t.effectTag &= -517),
            e.expirationTime <= i && (e.expirationTime = 0),
            To(e, t, i))
      );
    }
    function wo(e, t, n, r, i, o) {
      if (null === e) {
        var s = n.type;
        return "function" != typeof s ||
          Kr(s) ||
          void 0 !== s.defaultProps ||
          null !== n.compare ||
          void 0 !== n.defaultProps
          ? (((e = Qr(n.type, null, r, null, t.mode, o)).ref = t.ref),
            (e.return = t),
            (t.child = e))
          : ((t.tag = 15), (t.type = s), bo(e, t, s, r, i, o));
      }
      return (
        (s = e.child),
        i < o &&
        ((i = s.memoizedProps),
        (n = null !== (n = n.compare) ? n : nn)(i, r) && e.ref === t.ref)
          ? To(e, t, o)
          : ((t.effectTag |= 1),
            ((e = Yr(s, r)).ref = t.ref),
            (e.return = t),
            (t.child = e))
      );
    }
    function bo(e, t, n, r, i, o) {
      return null !== e &&
        nn(e.memoizedProps, r) &&
        e.ref === t.ref &&
        ((go = !1), i < o)
        ? To(e, t, o)
        : Co(e, t, n, r, o);
    }
    function So(e, t) {
      var n = t.ref;
      ((null === e && null !== n) || (null !== e && e.ref !== n)) &&
        (t.effectTag |= 128);
    }
    function Co(e, t, n, r, i) {
      var o = Fr(n) ? Or : Pr.current;
      return (
        (o = Lr(t, o)),
        Lo(t, i),
        (n = Vi(e, t, n, r, o, i)),
        null === e || go
          ? ((t.effectTag |= 1), yo(e, t, n, i), t.child)
          : ((t.updateQueue = e.updateQueue),
            (t.effectTag &= -517),
            e.expirationTime <= i && (e.expirationTime = 0),
            To(e, t, i))
      );
    }
    function Eo(e, t, n, r, i) {
      if (Fr(n)) {
        var o = !0;
        Ur(t);
      } else o = !1;
      if ((Lo(t, i), null === t.stateNode))
        null !== e &&
          ((e.alternate = null), (t.alternate = null), (t.effectTag |= 2)),
          ui(t, n, r),
          di(t, n, r, i),
          (r = !0);
      else if (null === e) {
        var s = t.stateNode,
          a = t.memoizedProps;
        s.props = a;
        var l = s.context,
          c = n.contextType;
        "object" == typeof c && null !== c
          ? (c = Fo(c))
          : (c = Lr(t, (c = Fr(n) ? Or : Pr.current)));
        var u = n.getDerivedStateFromProps,
          h =
            "function" == typeof u ||
            "function" == typeof s.getSnapshotBeforeUpdate;
        h ||
          ("function" != typeof s.UNSAFE_componentWillReceiveProps &&
            "function" != typeof s.componentWillReceiveProps) ||
          ((a !== r || l !== c) && hi(t, s, r, c)),
          (Ho = !1);
        var d = t.memoizedState;
        l = s.state = d;
        var p = t.updateQueue;
        null !== p && (Ko(t, p, r, s, i), (l = t.memoizedState)),
          a !== r || d !== l || Ir.current || Ho
            ? ("function" == typeof u &&
                (ai(t, n, u, r), (l = t.memoizedState)),
              (a = Ho || ci(t, n, a, r, d, l, c))
                ? (h ||
                    ("function" != typeof s.UNSAFE_componentWillMount &&
                      "function" != typeof s.componentWillMount) ||
                    ("function" == typeof s.componentWillMount &&
                      s.componentWillMount(),
                    "function" == typeof s.UNSAFE_componentWillMount &&
                      s.UNSAFE_componentWillMount()),
                  "function" == typeof s.componentDidMount &&
                    (t.effectTag |= 4))
                : ("function" == typeof s.componentDidMount &&
                    (t.effectTag |= 4),
                  (t.memoizedProps = r),
                  (t.memoizedState = l)),
              (s.props = r),
              (s.state = l),
              (s.context = c),
              (r = a))
            : ("function" == typeof s.componentDidMount && (t.effectTag |= 4),
              (r = !1));
      } else
        (s = t.stateNode),
          (a = t.memoizedProps),
          (s.props = t.type === t.elementType ? a : oi(t.type, a)),
          (l = s.context),
          "object" == typeof (c = n.contextType) && null !== c
            ? (c = Fo(c))
            : (c = Lr(t, (c = Fr(n) ? Or : Pr.current))),
          (h =
            "function" == typeof (u = n.getDerivedStateFromProps) ||
            "function" == typeof s.getSnapshotBeforeUpdate) ||
            ("function" != typeof s.UNSAFE_componentWillReceiveProps &&
              "function" != typeof s.componentWillReceiveProps) ||
            ((a !== r || l !== c) && hi(t, s, r, c)),
          (Ho = !1),
          (l = t.memoizedState),
          (d = s.state = l),
          null !== (p = t.updateQueue) &&
            (Ko(t, p, r, s, i), (d = t.memoizedState)),
          a !== r || l !== d || Ir.current || Ho
            ? ("function" == typeof u &&
                (ai(t, n, u, r), (d = t.memoizedState)),
              (u = Ho || ci(t, n, a, r, l, d, c))
                ? (h ||
                    ("function" != typeof s.UNSAFE_componentWillUpdate &&
                      "function" != typeof s.componentWillUpdate) ||
                    ("function" == typeof s.componentWillUpdate &&
                      s.componentWillUpdate(r, d, c),
                    "function" == typeof s.UNSAFE_componentWillUpdate &&
                      s.UNSAFE_componentWillUpdate(r, d, c)),
                  "function" == typeof s.componentDidUpdate &&
                    (t.effectTag |= 4),
                  "function" == typeof s.getSnapshotBeforeUpdate &&
                    (t.effectTag |= 256))
                : ("function" != typeof s.componentDidUpdate ||
                    (a === e.memoizedProps && l === e.memoizedState) ||
                    (t.effectTag |= 4),
                  "function" != typeof s.getSnapshotBeforeUpdate ||
                    (a === e.memoizedProps && l === e.memoizedState) ||
                    (t.effectTag |= 256),
                  (t.memoizedProps = r),
                  (t.memoizedState = d)),
              (s.props = r),
              (s.state = d),
              (s.context = c),
              (r = u))
            : ("function" != typeof s.componentDidUpdate ||
                (a === e.memoizedProps && l === e.memoizedState) ||
                (t.effectTag |= 4),
              "function" != typeof s.getSnapshotBeforeUpdate ||
                (a === e.memoizedProps && l === e.memoizedState) ||
                (t.effectTag |= 256),
              (r = !1));
      return ko(e, t, n, r, o, i);
    }
    function ko(e, t, n, r, i, o) {
      So(e, t);
      var s = 0 != (64 & t.effectTag);
      if (!r && !s) return i && Wr(t, n, !1), To(e, t, o);
      (r = t.stateNode), (mo.current = t);
      var a =
        s && "function" != typeof n.getDerivedStateFromError
          ? null
          : r.render();
      return (
        (t.effectTag |= 1),
        null !== e && s
          ? ((t.child = yi(t, e.child, null, o)), (t.child = yi(t, null, a, o)))
          : yo(e, t, a, o),
        (t.memoizedState = r.state),
        i && Wr(t, n, !0),
        t.child
      );
    }
    function xo(e) {
      var t = e.stateNode;
      t.pendingContext
        ? Hr(0, t.pendingContext, t.pendingContext !== t.context)
        : t.context && Hr(0, t.context, !1),
        ki(e, t.containerInfo);
    }
    function Ro(e, t, n) {
      var r = t.mode,
        i = t.pendingProps,
        o = t.memoizedState;
      if (0 == (64 & t.effectTag)) {
        o = null;
        var s = !1;
      } else
        (o = { timedOutAt: null !== o ? o.timedOutAt : 0 }),
          (s = !0),
          (t.effectTag &= -65);
      if (null === e)
        if (s) {
          var a = i.fallback;
          (e = Zr(null, r, 0, null)),
            0 == (1 & t.mode) &&
              (e.child = null !== t.memoizedState ? t.child.child : t.child),
            (r = Zr(a, r, n, null)),
            (e.sibling = r),
            ((n = e).return = r.return = t);
        } else n = r = vi(t, null, i.children, n);
      else
        null !== e.memoizedState
          ? ((a = (r = e.child).sibling),
            s
              ? ((n = i.fallback),
                (i = Yr(r, r.pendingProps)),
                0 == (1 & t.mode) &&
                  (s = null !== t.memoizedState ? t.child.child : t.child) !==
                    r.child &&
                  (i.child = s),
                (r = i.sibling = Yr(a, n, a.expirationTime)),
                (n = i),
                (i.childExpirationTime = 0),
                (n.return = r.return = t))
              : (n = r = yi(t, r.child, i.children, n)))
          : ((a = e.child),
            s
              ? ((s = i.fallback),
                ((i = Zr(null, r, 0, null)).child = a),
                0 == (1 & t.mode) &&
                  (i.child =
                    null !== t.memoizedState ? t.child.child : t.child),
                ((r = i.sibling = Zr(s, r, n, null)).effectTag |= 2),
                (n = i),
                (i.childExpirationTime = 0),
                (n.return = r.return = t))
              : (r = n = yi(t, a, i.children, n))),
          (t.stateNode = e.stateNode);
      return (t.memoizedState = o), (t.child = n), r;
    }
    function To(e, t, n) {
      if (
        (null !== e && (t.contextDependencies = e.contextDependencies),
        t.childExpirationTime < n)
      )
        return null;
      if ((null !== e && t.child !== e.child && a("153"), null !== t.child)) {
        for (
          n = Yr((e = t.child), e.pendingProps, e.expirationTime),
            t.child = n,
            n.return = t;
          null !== e.sibling;

        )
          (e = e.sibling),
            ((n = n.sibling = Yr(
              e,
              e.pendingProps,
              e.expirationTime
            )).return = t);
        n.sibling = null;
      }
      return t.child;
    }
    function Do(e, t, n) {
      var r = t.expirationTime;
      if (null !== e) {
        if (e.memoizedProps !== t.pendingProps || Ir.current) go = !0;
        else if (r < n) {
          switch (((go = !1), t.tag)) {
            case 3:
              xo(t), fo();
              break;
            case 5:
              Ri(t);
              break;
            case 1:
              Fr(t.type) && Ur(t);
              break;
            case 4:
              ki(t, t.stateNode.containerInfo);
              break;
            case 10:
              Io(t, t.memoizedProps.value);
              break;
            case 13:
              if (null !== t.memoizedState)
                return 0 !== (r = t.child.childExpirationTime) && r >= n
                  ? Ro(e, t, n)
                  : null !== (t = To(e, t, n))
                  ? t.sibling
                  : null;
          }
          return To(e, t, n);
        }
      } else go = !1;
      switch (((t.expirationTime = 0), t.tag)) {
        case 2:
          (r = t.elementType),
            null !== e &&
              ((e.alternate = null), (t.alternate = null), (t.effectTag |= 2)),
            (e = t.pendingProps);
          var i = Lr(t, Pr.current);
          if (
            (Lo(t, n),
            (i = Vi(null, t, r, e, i, n)),
            (t.effectTag |= 1),
            "object" == typeof i &&
              null !== i &&
              "function" == typeof i.render &&
              void 0 === i.$$typeof)
          ) {
            if (((t.tag = 1), Gi(), Fr(r))) {
              var o = !0;
              Ur(t);
            } else o = !1;
            t.memoizedState =
              null !== i.state && void 0 !== i.state ? i.state : null;
            var s = r.getDerivedStateFromProps;
            "function" == typeof s && ai(t, r, s, e),
              (i.updater = li),
              (t.stateNode = i),
              (i._reactInternalFiber = t),
              di(t, r, e, n),
              (t = ko(null, t, r, !0, o, n));
          } else (t.tag = 0), yo(null, t, i, n), (t = t.child);
          return t;
        case 16:
          switch (
            ((i = t.elementType),
            null !== e &&
              ((e.alternate = null), (t.alternate = null), (t.effectTag |= 2)),
            (o = t.pendingProps),
            (e = (function (e) {
              var t = e._result;
              switch (e._status) {
                case 1:
                  return t;
                case 2:
                case 0:
                  throw t;
                default:
                  switch (
                    ((e._status = 0),
                    (t = (t = e._ctor)()).then(
                      function (t) {
                        0 === e._status &&
                          ((t = t.default), (e._status = 1), (e._result = t));
                      },
                      function (t) {
                        0 === e._status && ((e._status = 2), (e._result = t));
                      }
                    ),
                    e._status)
                  ) {
                    case 1:
                      return e._result;
                    case 2:
                      throw e._result;
                  }
                  throw ((e._result = t), t);
              }
            })(i)),
            (t.type = e),
            (i = t.tag = (function (e) {
              if ("function" == typeof e) return Kr(e) ? 1 : 0;
              if (null != e) {
                if ((e = e.$$typeof) === rt) return 11;
                if (e === ot) return 14;
              }
              return 2;
            })(e)),
            (o = oi(e, o)),
            (s = void 0),
            i)
          ) {
            case 0:
              s = Co(null, t, e, o, n);
              break;
            case 1:
              s = Eo(null, t, e, o, n);
              break;
            case 11:
              s = vo(null, t, e, o, n);
              break;
            case 14:
              s = wo(null, t, e, oi(e.type, o), r, n);
              break;
            default:
              a("306", e, "");
          }
          return s;
        case 0:
          return (
            (r = t.type),
            (i = t.pendingProps),
            Co(e, t, r, (i = t.elementType === r ? i : oi(r, i)), n)
          );
        case 1:
          return (
            (r = t.type),
            (i = t.pendingProps),
            Eo(e, t, r, (i = t.elementType === r ? i : oi(r, i)), n)
          );
        case 3:
          return (
            xo(t),
            null === (r = t.updateQueue) && a("282"),
            (i = null !== (i = t.memoizedState) ? i.element : null),
            Ko(t, r, t.pendingProps, null, n),
            (r = t.memoizedState.element) === i
              ? (fo(), (t = To(e, t, n)))
              : ((i = t.stateNode),
                (i = (null === e || null === e.child) && i.hydrate) &&
                  ((so = Rr(t.stateNode.containerInfo)),
                  (oo = t),
                  (i = ao = !0)),
                i
                  ? ((t.effectTag |= 2), (t.child = vi(t, null, r, n)))
                  : (yo(e, t, r, n), fo()),
                (t = t.child)),
            t
          );
        case 5:
          return (
            Ri(t),
            null === e && uo(t),
            (r = t.type),
            (i = t.pendingProps),
            (o = null !== e ? e.memoizedProps : null),
            (s = i.children),
            br(r, i)
              ? (s = null)
              : null !== o && br(r, o) && (t.effectTag |= 16),
            So(e, t),
            1 !== n && 1 & t.mode && i.hidden
              ? ((t.expirationTime = t.childExpirationTime = 1), (t = null))
              : (yo(e, t, s, n), (t = t.child)),
            t
          );
        case 6:
          return null === e && uo(t), null;
        case 13:
          return Ro(e, t, n);
        case 4:
          return (
            ki(t, t.stateNode.containerInfo),
            (r = t.pendingProps),
            null === e ? (t.child = yi(t, null, r, n)) : yo(e, t, r, n),
            t.child
          );
        case 11:
          return (
            (r = t.type),
            (i = t.pendingProps),
            vo(e, t, r, (i = t.elementType === r ? i : oi(r, i)), n)
          );
        case 7:
          return yo(e, t, t.pendingProps, n), t.child;
        case 8:
        case 12:
          return yo(e, t, t.pendingProps.children, n), t.child;
        case 10:
          e: {
            if (
              ((r = t.type._context),
              (i = t.pendingProps),
              (s = t.memoizedProps),
              Io(t, (o = i.value)),
              null !== s)
            ) {
              var l = s.value;
              if (
                0 ===
                (o = en(l, o)
                  ? 0
                  : 0 |
                    ("function" == typeof r._calculateChangedBits
                      ? r._calculateChangedBits(l, o)
                      : 1073741823))
              ) {
                if (s.children === i.children && !Ir.current) {
                  t = To(e, t, n);
                  break e;
                }
              } else
                for (null !== (l = t.child) && (l.return = t); null !== l; ) {
                  var c = l.contextDependencies;
                  if (null !== c) {
                    s = l.child;
                    for (var u = c.first; null !== u; ) {
                      if (u.context === r && 0 != (u.observedBits & o)) {
                        1 === l.tag && (((u = Wo(n)).tag = Bo), Vo(l, u)),
                          l.expirationTime < n && (l.expirationTime = n),
                          null !== (u = l.alternate) &&
                            u.expirationTime < n &&
                            (u.expirationTime = n),
                          (u = n);
                        for (var h = l.return; null !== h; ) {
                          var d = h.alternate;
                          if (h.childExpirationTime < u)
                            (h.childExpirationTime = u),
                              null !== d &&
                                d.childExpirationTime < u &&
                                (d.childExpirationTime = u);
                          else {
                            if (!(null !== d && d.childExpirationTime < u))
                              break;
                            d.childExpirationTime = u;
                          }
                          h = h.return;
                        }
                        c.expirationTime < n && (c.expirationTime = n);
                        break;
                      }
                      u = u.next;
                    }
                  } else s = 10 === l.tag && l.type === t.type ? null : l.child;
                  if (null !== s) s.return = l;
                  else
                    for (s = l; null !== s; ) {
                      if (s === t) {
                        s = null;
                        break;
                      }
                      if (null !== (l = s.sibling)) {
                        (l.return = s.return), (s = l);
                        break;
                      }
                      s = s.return;
                    }
                  l = s;
                }
            }
            yo(e, t, i.children, n), (t = t.child);
          }
          return t;
        case 9:
          return (
            (i = t.type),
            (r = (o = t.pendingProps).children),
            Lo(t, n),
            (r = r((i = Fo(i, o.unstable_observedBits)))),
            (t.effectTag |= 1),
            yo(e, t, r, n),
            t.child
          );
        case 14:
          return (
            (o = oi((i = t.type), t.pendingProps)),
            wo(e, t, i, (o = oi(i.type, o)), r, n)
          );
        case 15:
          return bo(e, t, t.type, t.pendingProps, r, n);
        case 17:
          return (
            (r = t.type),
            (i = t.pendingProps),
            (i = t.elementType === r ? i : oi(r, i)),
            null !== e &&
              ((e.alternate = null), (t.alternate = null), (t.effectTag |= 2)),
            (t.tag = 1),
            Fr(r) ? ((e = !0), Ur(t)) : (e = !1),
            Lo(t, n),
            ui(t, r, i),
            di(t, r, i, n),
            ko(null, t, r, !0, e, n)
          );
      }
      a("156");
    }
    var Ao = { current: null },
      _o = null,
      Mo = null,
      Po = null;
    function Io(e, t) {
      var n = e.type._context;
      _r(Ao, n._currentValue), (n._currentValue = t);
    }
    function Oo(e) {
      var t = Ao.current;
      Ar(Ao), (e.type._context._currentValue = t);
    }
    function Lo(e, t) {
      (_o = e), (Po = Mo = null);
      var n = e.contextDependencies;
      null !== n && n.expirationTime >= t && (go = !0),
        (e.contextDependencies = null);
    }
    function Fo(e, t) {
      return (
        Po !== e &&
          !1 !== t &&
          0 !== t &&
          (("number" == typeof t && 1073741823 !== t) ||
            ((Po = e), (t = 1073741823)),
          (t = { context: e, observedBits: t, next: null }),
          null === Mo
            ? (null === _o && a("308"),
              (Mo = t),
              (_o.contextDependencies = { first: t, expirationTime: 0 }))
            : (Mo = Mo.next = t)),
        e._currentValue
      );
    }
    var No = 1,
      Bo = 2,
      Ho = !1;
    function zo(e) {
      return {
        baseState: e,
        firstUpdate: null,
        lastUpdate: null,
        firstCapturedUpdate: null,
        lastCapturedUpdate: null,
        firstEffect: null,
        lastEffect: null,
        firstCapturedEffect: null,
        lastCapturedEffect: null,
      };
    }
    function Uo(e) {
      return {
        baseState: e.baseState,
        firstUpdate: e.firstUpdate,
        lastUpdate: e.lastUpdate,
        firstCapturedUpdate: null,
        lastCapturedUpdate: null,
        firstEffect: null,
        lastEffect: null,
        firstCapturedEffect: null,
        lastCapturedEffect: null,
      };
    }
    function Wo(e) {
      return {
        expirationTime: e,
        tag: 0,
        payload: null,
        callback: null,
        next: null,
        nextEffect: null,
      };
    }
    function jo(e, t) {
      null === e.lastUpdate
        ? (e.firstUpdate = e.lastUpdate = t)
        : ((e.lastUpdate.next = t), (e.lastUpdate = t));
    }
    function Vo(e, t) {
      var n = e.alternate;
      if (null === n) {
        var r = e.updateQueue,
          i = null;
        null === r && (r = e.updateQueue = zo(e.memoizedState));
      } else
        (r = e.updateQueue),
          (i = n.updateQueue),
          null === r
            ? null === i
              ? ((r = e.updateQueue = zo(e.memoizedState)),
                (i = n.updateQueue = zo(n.memoizedState)))
              : (r = e.updateQueue = Uo(i))
            : null === i && (i = n.updateQueue = Uo(r));
      null === i || r === i
        ? jo(r, t)
        : null === r.lastUpdate || null === i.lastUpdate
        ? (jo(r, t), jo(i, t))
        : (jo(r, t), (i.lastUpdate = t));
    }
    function Go(e, t) {
      var n = e.updateQueue;
      null ===
      (n = null === n ? (e.updateQueue = zo(e.memoizedState)) : $o(e, n))
        .lastCapturedUpdate
        ? (n.firstCapturedUpdate = n.lastCapturedUpdate = t)
        : ((n.lastCapturedUpdate.next = t), (n.lastCapturedUpdate = t));
    }
    function $o(e, t) {
      var n = e.alternate;
      return (
        null !== n && t === n.updateQueue && (t = e.updateQueue = Uo(t)), t
      );
    }
    function qo(e, t, n, r, o, s) {
      switch (n.tag) {
        case No:
          return "function" == typeof (e = n.payload) ? e.call(s, r, o) : e;
        case 3:
          e.effectTag = (-2049 & e.effectTag) | 64;
        case 0:
          if (
            null ==
            (o = "function" == typeof (e = n.payload) ? e.call(s, r, o) : e)
          )
            break;
          return i({}, r, o);
        case Bo:
          Ho = !0;
      }
      return r;
    }
    function Ko(e, t, n, r, i) {
      Ho = !1;
      for (
        var o = (t = $o(e, t)).baseState,
          s = null,
          a = 0,
          l = t.firstUpdate,
          c = o;
        null !== l;

      ) {
        var u = l.expirationTime;
        u < i
          ? (null === s && ((s = l), (o = c)), a < u && (a = u))
          : ((c = qo(e, 0, l, c, n, r)),
            null !== l.callback &&
              ((e.effectTag |= 32),
              (l.nextEffect = null),
              null === t.lastEffect
                ? (t.firstEffect = t.lastEffect = l)
                : ((t.lastEffect.nextEffect = l), (t.lastEffect = l)))),
          (l = l.next);
      }
      for (u = null, l = t.firstCapturedUpdate; null !== l; ) {
        var h = l.expirationTime;
        h < i
          ? (null === u && ((u = l), null === s && (o = c)), a < h && (a = h))
          : ((c = qo(e, 0, l, c, n, r)),
            null !== l.callback &&
              ((e.effectTag |= 32),
              (l.nextEffect = null),
              null === t.lastCapturedEffect
                ? (t.firstCapturedEffect = t.lastCapturedEffect = l)
                : ((t.lastCapturedEffect.nextEffect = l),
                  (t.lastCapturedEffect = l)))),
          (l = l.next);
      }
      null === s && (t.lastUpdate = null),
        null === u ? (t.lastCapturedUpdate = null) : (e.effectTag |= 32),
        null === s && null === u && (o = c),
        (t.baseState = o),
        (t.firstUpdate = s),
        (t.firstCapturedUpdate = u),
        (e.expirationTime = a),
        (e.memoizedState = c);
    }
    function Yo(e, t, n) {
      null !== t.firstCapturedUpdate &&
        (null !== t.lastUpdate &&
          ((t.lastUpdate.next = t.firstCapturedUpdate),
          (t.lastUpdate = t.lastCapturedUpdate)),
        (t.firstCapturedUpdate = t.lastCapturedUpdate = null)),
        Qo(t.firstEffect, n),
        (t.firstEffect = t.lastEffect = null),
        Qo(t.firstCapturedEffect, n),
        (t.firstCapturedEffect = t.lastCapturedEffect = null);
    }
    function Qo(e, t) {
      for (; null !== e; ) {
        var n = e.callback;
        if (null !== n) {
          e.callback = null;
          var r = t;
          "function" != typeof n && a("191", n), n.call(r);
        }
        e = e.nextEffect;
      }
    }
    function Zo(e, t) {
      return { value: e, source: t, stack: ut(t) };
    }
    function Xo(e) {
      e.effectTag |= 4;
    }
    var Jo, es, ts;
    (Jo = function (e, t) {
      for (var n = t.child; null !== n; ) {
        if (5 === n.tag || 6 === n.tag) e.appendChild(n.stateNode);
        else if (4 !== n.tag && null !== n.child) {
          (n.child.return = n), (n = n.child);
          continue;
        }
        if (n === t) break;
        for (; null === n.sibling; ) {
          if (null === n.return || n.return === t) return;
          n = n.return;
        }
        (n.sibling.return = n.return), (n = n.sibling);
      }
    }),
      (es = function (e, t, n, r, o) {
        var s = e.memoizedProps;
        if (s !== r) {
          var a = t.stateNode;
          switch ((Ei(bi.current), (e = null), n)) {
            case "input":
              (s = St(a, s)), (r = St(a, r)), (e = []);
              break;
            case "option":
              (s = Yn(a, s)), (r = Yn(a, r)), (e = []);
              break;
            case "select":
              (s = i({}, s, { value: void 0 })),
                (r = i({}, r, { value: void 0 })),
                (e = []);
              break;
            case "textarea":
              (s = Zn(a, s)), (r = Zn(a, r)), (e = []);
              break;
            default:
              "function" != typeof s.onClick &&
                "function" == typeof r.onClick &&
                (a.onclick = gr);
          }
          pr(n, r), (a = n = void 0);
          var l = null;
          for (n in s)
            if (!r.hasOwnProperty(n) && s.hasOwnProperty(n) && null != s[n])
              if ("style" === n) {
                var c = s[n];
                for (a in c)
                  c.hasOwnProperty(a) && (l || (l = {}), (l[a] = ""));
              } else
                "dangerouslySetInnerHTML" !== n &&
                  "children" !== n &&
                  "suppressContentEditableWarning" !== n &&
                  "suppressHydrationWarning" !== n &&
                  "autoFocus" !== n &&
                  (S.hasOwnProperty(n)
                    ? e || (e = [])
                    : (e = e || []).push(n, null));
          for (n in r) {
            var u = r[n];
            if (
              ((c = null != s ? s[n] : void 0),
              r.hasOwnProperty(n) && u !== c && (null != u || null != c))
            )
              if ("style" === n)
                if (c) {
                  for (a in c)
                    !c.hasOwnProperty(a) ||
                      (u && u.hasOwnProperty(a)) ||
                      (l || (l = {}), (l[a] = ""));
                  for (a in u)
                    u.hasOwnProperty(a) &&
                      c[a] !== u[a] &&
                      (l || (l = {}), (l[a] = u[a]));
                } else l || (e || (e = []), e.push(n, l)), (l = u);
              else
                "dangerouslySetInnerHTML" === n
                  ? ((u = u ? u.__html : void 0),
                    (c = c ? c.__html : void 0),
                    null != u && c !== u && (e = e || []).push(n, "" + u))
                  : "children" === n
                  ? c === u ||
                    ("string" != typeof u && "number" != typeof u) ||
                    (e = e || []).push(n, "" + u)
                  : "suppressContentEditableWarning" !== n &&
                    "suppressHydrationWarning" !== n &&
                    (S.hasOwnProperty(n)
                      ? (null != u && mr(o, n), e || c === u || (e = []))
                      : (e = e || []).push(n, u));
          }
          l && (e = e || []).push("style", l),
            (o = e),
            (t.updateQueue = o) && Xo(t);
        }
      }),
      (ts = function (e, t, n, r) {
        n !== r && Xo(t);
      });
    var ns = "function" == typeof WeakSet ? WeakSet : Set;
    function rs(e, t) {
      var n = t.source,
        r = t.stack;
      null === r && null !== n && (r = ut(n)),
        null !== n && ct(n.type),
        (t = t.value),
        null !== e && 1 === e.tag && ct(e.type);
      try {
        console.error(t);
      } catch (e) {
        setTimeout(function () {
          throw e;
        });
      }
    }
    function is(e) {
      var t = e.ref;
      if (null !== t)
        if ("function" == typeof t)
          try {
            t(null);
          } catch (t) {
            zs(e, t);
          }
        else t.current = null;
    }
    function os(e, t, n) {
      if (null !== (n = null !== (n = n.updateQueue) ? n.lastEffect : null)) {
        var r = (n = n.next);
        do {
          if (0 != (r.tag & e)) {
            var i = r.destroy;
            (r.destroy = void 0), void 0 !== i && i();
          }
          0 != (r.tag & t) && ((i = r.create), (r.destroy = i())), (r = r.next);
        } while (r !== n);
      }
    }
    function ss(e) {
      switch (("function" == typeof Vr && Vr(e), e.tag)) {
        case 0:
        case 11:
        case 14:
        case 15:
          var t = e.updateQueue;
          if (null !== t && null !== (t = t.lastEffect)) {
            var n = (t = t.next);
            do {
              var r = n.destroy;
              if (void 0 !== r) {
                var i = e;
                try {
                  r();
                } catch (e) {
                  zs(i, e);
                }
              }
              n = n.next;
            } while (n !== t);
          }
          break;
        case 1:
          if (
            (is(e), "function" == typeof (t = e.stateNode).componentWillUnmount)
          )
            try {
              (t.props = e.memoizedProps),
                (t.state = e.memoizedState),
                t.componentWillUnmount();
            } catch (t) {
              zs(e, t);
            }
          break;
        case 5:
          is(e);
          break;
        case 4:
          cs(e);
      }
    }
    function as(e) {
      return 5 === e.tag || 3 === e.tag || 4 === e.tag;
    }
    function ls(e) {
      e: {
        for (var t = e.return; null !== t; ) {
          if (as(t)) {
            var n = t;
            break e;
          }
          t = t.return;
        }
        a("160"), (n = void 0);
      }
      var r = (t = void 0);
      switch (n.tag) {
        case 5:
          (t = n.stateNode), (r = !1);
          break;
        case 3:
        case 4:
          (t = n.stateNode.containerInfo), (r = !0);
          break;
        default:
          a("161");
      }
      16 & n.effectTag && (ar(t, ""), (n.effectTag &= -17));
      e: t: for (n = e; ; ) {
        for (; null === n.sibling; ) {
          if (null === n.return || as(n.return)) {
            n = null;
            break e;
          }
          n = n.return;
        }
        for (
          n.sibling.return = n.return, n = n.sibling;
          5 !== n.tag && 6 !== n.tag && 18 !== n.tag;

        ) {
          if (2 & n.effectTag) continue t;
          if (null === n.child || 4 === n.tag) continue t;
          (n.child.return = n), (n = n.child);
        }
        if (!(2 & n.effectTag)) {
          n = n.stateNode;
          break e;
        }
      }
      for (var i = e; ; ) {
        if (5 === i.tag || 6 === i.tag)
          if (n)
            if (r) {
              var o = t,
                s = i.stateNode,
                l = n;
              8 === o.nodeType
                ? o.parentNode.insertBefore(s, l)
                : o.insertBefore(s, l);
            } else t.insertBefore(i.stateNode, n);
          else
            r
              ? ((s = t),
                (l = i.stateNode),
                8 === s.nodeType
                  ? (o = s.parentNode).insertBefore(l, s)
                  : (o = s).appendChild(l),
                null != (s = s._reactRootContainer) ||
                  null !== o.onclick ||
                  (o.onclick = gr))
              : t.appendChild(i.stateNode);
        else if (4 !== i.tag && null !== i.child) {
          (i.child.return = i), (i = i.child);
          continue;
        }
        if (i === e) break;
        for (; null === i.sibling; ) {
          if (null === i.return || i.return === e) return;
          i = i.return;
        }
        (i.sibling.return = i.return), (i = i.sibling);
      }
    }
    function cs(e) {
      for (var t = e, n = !1, r = void 0, i = void 0; ; ) {
        if (!n) {
          n = t.return;
          e: for (;;) {
            switch ((null === n && a("160"), n.tag)) {
              case 5:
                (r = n.stateNode), (i = !1);
                break e;
              case 3:
              case 4:
                (r = n.stateNode.containerInfo), (i = !0);
                break e;
            }
            n = n.return;
          }
          n = !0;
        }
        if (5 === t.tag || 6 === t.tag) {
          e: for (var o = t, s = o; ; )
            if ((ss(s), null !== s.child && 4 !== s.tag))
              (s.child.return = s), (s = s.child);
            else {
              if (s === o) break;
              for (; null === s.sibling; ) {
                if (null === s.return || s.return === o) break e;
                s = s.return;
              }
              (s.sibling.return = s.return), (s = s.sibling);
            }
          i
            ? ((o = r),
              (s = t.stateNode),
              8 === o.nodeType ? o.parentNode.removeChild(s) : o.removeChild(s))
            : r.removeChild(t.stateNode);
        } else if (4 === t.tag) {
          if (null !== t.child) {
            (r = t.stateNode.containerInfo),
              (i = !0),
              (t.child.return = t),
              (t = t.child);
            continue;
          }
        } else if ((ss(t), null !== t.child)) {
          (t.child.return = t), (t = t.child);
          continue;
        }
        if (t === e) break;
        for (; null === t.sibling; ) {
          if (null === t.return || t.return === e) return;
          4 === (t = t.return).tag && (n = !1);
        }
        (t.sibling.return = t.return), (t = t.sibling);
      }
    }
    function us(e, t) {
      switch (t.tag) {
        case 0:
        case 11:
        case 14:
        case 15:
          os(4, 8, t);
          break;
        case 1:
          break;
        case 5:
          var n = t.stateNode;
          if (null != n) {
            var r = t.memoizedProps;
            e = null !== e ? e.memoizedProps : r;
            var i = t.type,
              o = t.updateQueue;
            (t.updateQueue = null),
              null !== o &&
                (function (e, t, n, r, i) {
                  (e[F] = i),
                    "input" === n &&
                      "radio" === i.type &&
                      null != i.name &&
                      Et(e, i),
                    fr(n, r),
                    (r = fr(n, i));
                  for (var o = 0; o < t.length; o += 2) {
                    var s = t[o],
                      a = t[o + 1];
                    "style" === s
                      ? hr(e, a)
                      : "dangerouslySetInnerHTML" === s
                      ? sr(e, a)
                      : "children" === s
                      ? ar(e, a)
                      : wt(e, s, a, r);
                  }
                  switch (n) {
                    case "input":
                      kt(e, i);
                      break;
                    case "textarea":
                      Jn(e, i);
                      break;
                    case "select":
                      (t = e._wrapperState.wasMultiple),
                        (e._wrapperState.wasMultiple = !!i.multiple),
                        null != (n = i.value)
                          ? Qn(e, !!i.multiple, n, !1)
                          : t !== !!i.multiple &&
                            (null != i.defaultValue
                              ? Qn(e, !!i.multiple, i.defaultValue, !0)
                              : Qn(e, !!i.multiple, i.multiple ? [] : "", !1));
                  }
                })(n, o, i, e, r);
          }
          break;
        case 6:
          null === t.stateNode && a("162"),
            (t.stateNode.nodeValue = t.memoizedProps);
          break;
        case 3:
        case 12:
          break;
        case 13:
          if (
            ((n = t.memoizedState),
            (r = void 0),
            (e = t),
            null === n
              ? (r = !1)
              : ((r = !0),
                (e = t.child),
                0 === n.timedOutAt && (n.timedOutAt = ga())),
            null !== e &&
              (function (e, t) {
                for (var n = e; ; ) {
                  if (5 === n.tag) {
                    var r = n.stateNode;
                    if (t) r.style.display = "none";
                    else {
                      r = n.stateNode;
                      var i = n.memoizedProps.style;
                      (i =
                        null != i && i.hasOwnProperty("display")
                          ? i.display
                          : null),
                        (r.style.display = ur("display", i));
                    }
                  } else if (6 === n.tag)
                    n.stateNode.nodeValue = t ? "" : n.memoizedProps;
                  else {
                    if (13 === n.tag && null !== n.memoizedState) {
                      ((r = n.child.sibling).return = n), (n = r);
                      continue;
                    }
                    if (null !== n.child) {
                      (n.child.return = n), (n = n.child);
                      continue;
                    }
                  }
                  if (n === e) break;
                  for (; null === n.sibling; ) {
                    if (null === n.return || n.return === e) return;
                    n = n.return;
                  }
                  (n.sibling.return = n.return), (n = n.sibling);
                }
              })(e, r),
            null !== (n = t.updateQueue))
          ) {
            t.updateQueue = null;
            var s = t.stateNode;
            null === s && (s = t.stateNode = new ns()),
              n.forEach(function (e) {
                var n = js.bind(null, t, e);
                s.has(e) || (s.add(e), e.then(n, n));
              });
          }
          break;
        case 17:
          break;
        default:
          a("163");
      }
    }
    var hs = "function" == typeof WeakMap ? WeakMap : Map;
    function ds(e, t, n) {
      ((n = Wo(n)).tag = 3), (n.payload = { element: null });
      var r = t.value;
      return (
        (n.callback = function () {
          Ra(r), rs(e, t);
        }),
        n
      );
    }
    function ps(e, t, n) {
      (n = Wo(n)).tag = 3;
      var r = e.type.getDerivedStateFromError;
      if ("function" == typeof r) {
        var i = t.value;
        n.payload = function () {
          return r(i);
        };
      }
      var o = e.stateNode;
      return (
        null !== o &&
          "function" == typeof o.componentDidCatch &&
          (n.callback = function () {
            "function" != typeof r &&
              (null === As ? (As = new Set([this])) : As.add(this));
            var n = t.value,
              i = t.stack;
            rs(e, t),
              this.componentDidCatch(n, {
                componentStack: null !== i ? i : "",
              });
          }),
        n
      );
    }
    function fs(e) {
      switch (e.tag) {
        case 1:
          Fr(e.type) && Nr();
          var t = e.effectTag;
          return 2048 & t ? ((e.effectTag = (-2049 & t) | 64), e) : null;
        case 3:
          return (
            xi(),
            Br(),
            0 != (64 & (t = e.effectTag)) && a("285"),
            (e.effectTag = (-2049 & t) | 64),
            e
          );
        case 5:
          return Ti(e), null;
        case 13:
          return 2048 & (t = e.effectTag)
            ? ((e.effectTag = (-2049 & t) | 64), e)
            : null;
        case 18:
          return null;
        case 4:
          return xi(), null;
        case 10:
          return Oo(e), null;
        default:
          return null;
      }
    }
    var ms = $e.ReactCurrentDispatcher,
      gs = $e.ReactCurrentOwner,
      ys = 1073741822,
      vs = !1,
      ws = null,
      bs = null,
      Ss = 0,
      Cs = -1,
      Es = !1,
      ks = null,
      xs = !1,
      Rs = null,
      Ts = null,
      Ds = null,
      As = null;
    function _s() {
      if (null !== ws)
        for (var e = ws.return; null !== e; ) {
          var t = e;
          switch (t.tag) {
            case 1:
              var n = t.type.childContextTypes;
              null != n && Nr();
              break;
            case 3:
              xi(), Br();
              break;
            case 5:
              Ti(t);
              break;
            case 4:
              xi();
              break;
            case 10:
              Oo(t);
          }
          e = e.return;
        }
      (bs = null), (Ss = 0), (Cs = -1), (Es = !1), (ws = null);
    }
    function Ms() {
      for (; null !== ks; ) {
        var e = ks.effectTag;
        if ((16 & e && ar(ks.stateNode, ""), 128 & e)) {
          var t = ks.alternate;
          null !== t &&
            null !== (t = t.ref) &&
            ("function" == typeof t ? t(null) : (t.current = null));
        }
        switch (14 & e) {
          case 2:
            ls(ks), (ks.effectTag &= -3);
            break;
          case 6:
            ls(ks), (ks.effectTag &= -3), us(ks.alternate, ks);
            break;
          case 4:
            us(ks.alternate, ks);
            break;
          case 8:
            cs((e = ks)),
              (e.return = null),
              (e.child = null),
              (e.memoizedState = null),
              (e.updateQueue = null),
              null !== (e = e.alternate) &&
                ((e.return = null),
                (e.child = null),
                (e.memoizedState = null),
                (e.updateQueue = null));
        }
        ks = ks.nextEffect;
      }
    }
    function Ps() {
      for (; null !== ks; ) {
        if (256 & ks.effectTag)
          e: {
            var e = ks.alternate,
              t = ks;
            switch (t.tag) {
              case 0:
              case 11:
              case 15:
                os(2, 0, t);
                break e;
              case 1:
                if (256 & t.effectTag && null !== e) {
                  var n = e.memoizedProps,
                    r = e.memoizedState;
                  (t = (e = t.stateNode).getSnapshotBeforeUpdate(
                    t.elementType === t.type ? n : oi(t.type, n),
                    r
                  )),
                    (e.__reactInternalSnapshotBeforeUpdate = t);
                }
                break e;
              case 3:
              case 5:
              case 6:
              case 4:
              case 17:
                break e;
              default:
                a("163");
            }
          }
        ks = ks.nextEffect;
      }
    }
    function Is(e, t) {
      for (; null !== ks; ) {
        var n = ks.effectTag;
        if (36 & n) {
          var r = ks.alternate,
            i = ks,
            o = t;
          switch (i.tag) {
            case 0:
            case 11:
            case 15:
              os(16, 32, i);
              break;
            case 1:
              var s = i.stateNode;
              if (4 & i.effectTag)
                if (null === r) s.componentDidMount();
                else {
                  var l =
                    i.elementType === i.type
                      ? r.memoizedProps
                      : oi(i.type, r.memoizedProps);
                  s.componentDidUpdate(
                    l,
                    r.memoizedState,
                    s.__reactInternalSnapshotBeforeUpdate
                  );
                }
              null !== (r = i.updateQueue) && Yo(0, r, s);
              break;
            case 3:
              if (null !== (r = i.updateQueue)) {
                if (((s = null), null !== i.child))
                  switch (i.child.tag) {
                    case 5:
                      s = i.child.stateNode;
                      break;
                    case 1:
                      s = i.child.stateNode;
                  }
                Yo(0, r, s);
              }
              break;
            case 5:
              (o = i.stateNode),
                null === r &&
                  4 & i.effectTag &&
                  wr(i.type, i.memoizedProps) &&
                  o.focus();
              break;
            case 6:
            case 4:
            case 12:
            case 13:
            case 17:
              break;
            default:
              a("163");
          }
        }
        128 & n &&
          null !== (i = ks.ref) &&
          ((o = ks.stateNode), "function" == typeof i ? i(o) : (i.current = o)),
          512 & n && (Rs = e),
          (ks = ks.nextEffect);
      }
    }
    function Os(e, t) {
      Ds = Ts = Rs = null;
      var n = Zs;
      Zs = !0;
      do {
        if (512 & t.effectTag) {
          var r = !1,
            i = void 0;
          try {
            var o = t;
            os(128, 0, o), os(0, 64, o);
          } catch (e) {
            (r = !0), (i = e);
          }
          r && zs(t, i);
        }
        t = t.nextEffect;
      } while (null !== t);
      (Zs = n),
        0 !== (n = e.expirationTime) && ya(e, n),
        ra || Zs || Ca(1073741823, !1);
    }
    function Ls() {
      null !== Ts && kr(Ts), null !== Ds && Ds();
    }
    function Fs(e, t) {
      (xs = vs = !0), e.current === t && a("177");
      var n = e.pendingCommitExpirationTime;
      0 === n && a("261"), (e.pendingCommitExpirationTime = 0);
      var r = t.expirationTime,
        i = t.childExpirationTime;
      for (
        (function (e, t) {
          if (((e.didError = !1), 0 === t))
            (e.earliestPendingTime = 0),
              (e.latestPendingTime = 0),
              (e.earliestSuspendedTime = 0),
              (e.latestSuspendedTime = 0),
              (e.latestPingedTime = 0);
          else {
            t < e.latestPingedTime && (e.latestPingedTime = 0);
            var n = e.latestPendingTime;
            0 !== n &&
              (n > t
                ? (e.earliestPendingTime = e.latestPendingTime = 0)
                : e.earliestPendingTime > t &&
                  (e.earliestPendingTime = e.latestPendingTime)),
              0 === (n = e.earliestSuspendedTime)
                ? ti(e, t)
                : t < e.latestSuspendedTime
                ? ((e.earliestSuspendedTime = 0),
                  (e.latestSuspendedTime = 0),
                  (e.latestPingedTime = 0),
                  ti(e, t))
                : t > n && ti(e, t);
          }
          ii(0, e);
        })(e, i > r ? i : r),
          gs.current = null,
          r = void 0,
          1 < t.effectTag
            ? null !== t.lastEffect
              ? ((t.lastEffect.nextEffect = t), (r = t.firstEffect))
              : (r = t)
            : (r = t.firstEffect),
          yr = Rn,
          vr = (function () {
            var e = Bn();
            if (Hn(e)) {
              if (("selectionStart" in e))
                var t = { start: e.selectionStart, end: e.selectionEnd };
              else
                e: {
                  var n =
                    (t = ((t = e.ownerDocument) && t.defaultView) || window)
                      .getSelection && t.getSelection();
                  if (n && 0 !== n.rangeCount) {
                    t = n.anchorNode;
                    var r = n.anchorOffset,
                      i = n.focusNode;
                    n = n.focusOffset;
                    try {
                      t.nodeType, i.nodeType;
                    } catch (e) {
                      t = null;
                      break e;
                    }
                    var o = 0,
                      s = -1,
                      a = -1,
                      l = 0,
                      c = 0,
                      u = e,
                      h = null;
                    t: for (;;) {
                      for (
                        var d;
                        u !== t || (0 !== r && 3 !== u.nodeType) || (s = o + r),
                          u !== i ||
                            (0 !== n && 3 !== u.nodeType) ||
                            (a = o + n),
                          3 === u.nodeType && (o += u.nodeValue.length),
                          null !== (d = u.firstChild);

                      )
                        (h = u), (u = d);
                      for (;;) {
                        if (u === e) break t;
                        if (
                          (h === t && ++l === r && (s = o),
                          h === i && ++c === n && (a = o),
                          null !== (d = u.nextSibling))
                        )
                          break;
                        h = (u = h).parentNode;
                      }
                      u = d;
                    }
                    t = -1 === s || -1 === a ? null : { start: s, end: a };
                  } else t = null;
                }
              t = t || { start: 0, end: 0 };
            } else t = null;
            return { focusedElem: e, selectionRange: t };
          })(),
          Rn = !1,
          ks = r;
        null !== ks;

      ) {
        i = !1;
        var s = void 0;
        try {
          Ps();
        } catch (e) {
          (i = !0), (s = e);
        }
        i &&
          (null === ks && a("178"),
          zs(ks, s),
          null !== ks && (ks = ks.nextEffect));
      }
      for (ks = r; null !== ks; ) {
        (i = !1), (s = void 0);
        try {
          Ms();
        } catch (e) {
          (i = !0), (s = e);
        }
        i &&
          (null === ks && a("178"),
          zs(ks, s),
          null !== ks && (ks = ks.nextEffect));
      }
      for (
        zn(vr), vr = null, Rn = !!yr, yr = null, e.current = t, ks = r;
        null !== ks;

      ) {
        (i = !1), (s = void 0);
        try {
          Is(e, n);
        } catch (e) {
          (i = !0), (s = e);
        }
        i &&
          (null === ks && a("178"),
          zs(ks, s),
          null !== ks && (ks = ks.nextEffect));
      }
      if (null !== r && null !== Rs) {
        var l = Os.bind(null, e, r);
        (Ts = o.unstable_runWithPriority(
          o.unstable_NormalPriority,
          function () {
            return Er(l);
          }
        )),
          (Ds = l);
      }
      (vs = xs = !1),
        "function" == typeof jr && jr(t.stateNode),
        (n = t.expirationTime),
        0 === (t = (t = t.childExpirationTime) > n ? t : n) && (As = null),
        (function (e, t) {
          (e.expirationTime = t), (e.finishedWork = null);
        })(e, t);
    }
    function Ns(e) {
      for (;;) {
        var t = e.alternate,
          n = e.return,
          r = e.sibling;
        if (0 == (1024 & e.effectTag)) {
          ws = e;
          e: {
            var o = t,
              s = Ss,
              l = (t = e).pendingProps;
            switch (t.tag) {
              case 2:
              case 16:
                break;
              case 15:
              case 0:
                break;
              case 1:
                Fr(t.type) && Nr();
                break;
              case 3:
                xi(),
                  Br(),
                  (l = t.stateNode).pendingContext &&
                    ((l.context = l.pendingContext), (l.pendingContext = null)),
                  (null !== o && null !== o.child) ||
                    (po(t), (t.effectTag &= -3));
                break;
              case 5:
                Ti(t);
                var c = Ei(Ci.current);
                if (((s = t.type), null !== o && null != t.stateNode))
                  es(o, t, s, l, c), o.ref !== t.ref && (t.effectTag |= 128);
                else if (l) {
                  var u = Ei(bi.current);
                  if (po(t)) {
                    o = (l = t).stateNode;
                    var h = l.type,
                      d = l.memoizedProps,
                      p = c;
                    switch (((o[L] = l), (o[F] = d), (s = void 0), (c = h))) {
                      case "iframe":
                      case "object":
                        Tn("load", o);
                        break;
                      case "video":
                      case "audio":
                        for (h = 0; h < re.length; h++) Tn(re[h], o);
                        break;
                      case "source":
                        Tn("error", o);
                        break;
                      case "img":
                      case "image":
                      case "link":
                        Tn("error", o), Tn("load", o);
                        break;
                      case "form":
                        Tn("reset", o), Tn("submit", o);
                        break;
                      case "details":
                        Tn("toggle", o);
                        break;
                      case "input":
                        Ct(o, d), Tn("invalid", o), mr(p, "onChange");
                        break;
                      case "select":
                        (o._wrapperState = { wasMultiple: !!d.multiple }),
                          Tn("invalid", o),
                          mr(p, "onChange");
                        break;
                      case "textarea":
                        Xn(o, d), Tn("invalid", o), mr(p, "onChange");
                    }
                    for (s in (pr(c, d), (h = null), d))
                      d.hasOwnProperty(s) &&
                        ((u = d[s]),
                        "children" === s
                          ? "string" == typeof u
                            ? o.textContent !== u && (h = ["children", u])
                            : "number" == typeof u &&
                              o.textContent !== "" + u &&
                              (h = ["children", "" + u])
                          : S.hasOwnProperty(s) && null != u && mr(p, s));
                    switch (c) {
                      case "input":
                        Ve(o), xt(o, d, !0);
                        break;
                      case "textarea":
                        Ve(o), er(o);
                        break;
                      case "select":
                      case "option":
                        break;
                      default:
                        "function" == typeof d.onClick && (o.onclick = gr);
                    }
                    (s = h), (l.updateQueue = s), (l = null !== s) && Xo(t);
                  } else {
                    (d = t),
                      (o = s),
                      (p = l),
                      (h = 9 === c.nodeType ? c : c.ownerDocument),
                      u === tr && (u = rr(o)),
                      u === tr
                        ? "script" === o
                          ? (((o = h.createElement("div")).innerHTML =
                              "<script></script>"),
                            (h = o.removeChild(o.firstChild)))
                          : "string" == typeof p.is
                          ? (h = h.createElement(o, { is: p.is }))
                          : ((h = h.createElement(o)),
                            "select" === o && p.multiple && (h.multiple = !0))
                        : (h = h.createElementNS(u, o)),
                      ((o = h)[L] = d),
                      (o[F] = l),
                      Jo(o, t),
                      (p = o);
                    var f = c,
                      m = fr((h = s), (d = l));
                    switch (h) {
                      case "iframe":
                      case "object":
                        Tn("load", p), (c = d);
                        break;
                      case "video":
                      case "audio":
                        for (c = 0; c < re.length; c++) Tn(re[c], p);
                        c = d;
                        break;
                      case "source":
                        Tn("error", p), (c = d);
                        break;
                      case "img":
                      case "image":
                      case "link":
                        Tn("error", p), Tn("load", p), (c = d);
                        break;
                      case "form":
                        Tn("reset", p), Tn("submit", p), (c = d);
                        break;
                      case "details":
                        Tn("toggle", p), (c = d);
                        break;
                      case "input":
                        Ct(p, d),
                          (c = St(p, d)),
                          Tn("invalid", p),
                          mr(f, "onChange");
                        break;
                      case "option":
                        c = Yn(p, d);
                        break;
                      case "select":
                        (p._wrapperState = { wasMultiple: !!d.multiple }),
                          (c = i({}, d, { value: void 0 })),
                          Tn("invalid", p),
                          mr(f, "onChange");
                        break;
                      case "textarea":
                        Xn(p, d),
                          (c = Zn(p, d)),
                          Tn("invalid", p),
                          mr(f, "onChange");
                        break;
                      default:
                        c = d;
                    }
                    pr(h, c), (u = void 0);
                    var g = h,
                      y = p,
                      v = c;
                    for (u in v)
                      if (v.hasOwnProperty(u)) {
                        var w = v[u];
                        "style" === u
                          ? hr(y, w)
                          : "dangerouslySetInnerHTML" === u
                          ? null != (w = w ? w.__html : void 0) && sr(y, w)
                          : "children" === u
                          ? "string" == typeof w
                            ? ("textarea" !== g || "" !== w) && ar(y, w)
                            : "number" == typeof w && ar(y, "" + w)
                          : "suppressContentEditableWarning" !== u &&
                            "suppressHydrationWarning" !== u &&
                            "autoFocus" !== u &&
                            (S.hasOwnProperty(u)
                              ? null != w && mr(f, u)
                              : null != w && wt(y, u, w, m));
                      }
                    switch (h) {
                      case "input":
                        Ve(p), xt(p, d, !1);
                        break;
                      case "textarea":
                        Ve(p), er(p);
                        break;
                      case "option":
                        null != d.value &&
                          p.setAttribute("value", "" + bt(d.value));
                        break;
                      case "select":
                        ((c = p).multiple = !!d.multiple),
                          null != (p = d.value)
                            ? Qn(c, !!d.multiple, p, !1)
                            : null != d.defaultValue &&
                              Qn(c, !!d.multiple, d.defaultValue, !0);
                        break;
                      default:
                        "function" == typeof c.onClick && (p.onclick = gr);
                    }
                    (l = wr(s, l)) && Xo(t), (t.stateNode = o);
                  }
                  null !== t.ref && (t.effectTag |= 128);
                } else null === t.stateNode && a("166");
                break;
              case 6:
                o && null != t.stateNode
                  ? ts(0, t, o.memoizedProps, l)
                  : ("string" != typeof l && null === t.stateNode && a("166"),
                    (o = Ei(Ci.current)),
                    Ei(bi.current),
                    po(t)
                      ? ((s = (l = t).stateNode),
                        (o = l.memoizedProps),
                        (s[L] = l),
                        (l = s.nodeValue !== o) && Xo(t))
                      : ((s = t),
                        ((l = (9 === o.nodeType
                          ? o
                          : o.ownerDocument
                        ).createTextNode(l))[L] = t),
                        (s.stateNode = l)));
                break;
              case 11:
                break;
              case 13:
                if (((l = t.memoizedState), 0 != (64 & t.effectTag))) {
                  (t.expirationTime = s), (ws = t);
                  break e;
                }
                (l = null !== l),
                  (s = null !== o && null !== o.memoizedState),
                  null !== o &&
                    !l &&
                    s &&
                    null !== (o = o.child.sibling) &&
                    (null !== (c = t.firstEffect)
                      ? ((t.firstEffect = o), (o.nextEffect = c))
                      : ((t.firstEffect = t.lastEffect = o),
                        (o.nextEffect = null)),
                    (o.effectTag = 8)),
                  (l || s) && (t.effectTag |= 4);
                break;
              case 7:
              case 8:
              case 12:
                break;
              case 4:
                xi();
                break;
              case 10:
                Oo(t);
                break;
              case 9:
              case 14:
                break;
              case 17:
                Fr(t.type) && Nr();
                break;
              case 18:
                break;
              default:
                a("156");
            }
            ws = null;
          }
          if (((t = e), 1 === Ss || 1 !== t.childExpirationTime)) {
            for (l = 0, s = t.child; null !== s; )
              (o = s.expirationTime) > l && (l = o),
                (c = s.childExpirationTime) > l && (l = c),
                (s = s.sibling);
            t.childExpirationTime = l;
          }
          if (null !== ws) return ws;
          null !== n &&
            0 == (1024 & n.effectTag) &&
            (null === n.firstEffect && (n.firstEffect = e.firstEffect),
            null !== e.lastEffect &&
              (null !== n.lastEffect &&
                (n.lastEffect.nextEffect = e.firstEffect),
              (n.lastEffect = e.lastEffect)),
            1 < e.effectTag &&
              (null !== n.lastEffect
                ? (n.lastEffect.nextEffect = e)
                : (n.firstEffect = e),
              (n.lastEffect = e)));
        } else {
          if (null !== (e = fs(e))) return (e.effectTag &= 1023), e;
          null !== n &&
            ((n.firstEffect = n.lastEffect = null), (n.effectTag |= 1024));
        }
        if (null !== r) return r;
        if (null === n) break;
        e = n;
      }
      return null;
    }
    function Bs(e) {
      var t = Do(e.alternate, e, Ss);
      return (
        (e.memoizedProps = e.pendingProps),
        null === t && (t = Ns(e)),
        (gs.current = null),
        t
      );
    }
    function Hs(e, t) {
      vs && a("243"), Ls(), (vs = !0);
      var n = ms.current;
      ms.current = no;
      var r = e.nextExpirationTimeToWorkOn;
      (r === Ss && e === bs && null !== ws) ||
        (_s(),
        (Ss = r),
        (ws = Yr((bs = e).current, null)),
        (e.pendingCommitExpirationTime = 0));
      for (var i = !1; ; ) {
        try {
          if (t) for (; null !== ws && !ba(); ) ws = Bs(ws);
          else for (; null !== ws; ) ws = Bs(ws);
        } catch (t) {
          if (((Po = Mo = _o = null), Gi(), null === ws)) (i = !0), Ra(t);
          else {
            null === ws && a("271");
            var o = ws,
              s = o.return;
            if (null !== s) {
              e: {
                var l = e,
                  c = s,
                  u = o,
                  h = t;
                if (
                  ((s = Ss),
                  (u.effectTag |= 1024),
                  (u.firstEffect = u.lastEffect = null),
                  null !== h &&
                    "object" == typeof h &&
                    "function" == typeof h.then)
                ) {
                  var d = h;
                  h = c;
                  var p = -1,
                    f = -1;
                  do {
                    if (13 === h.tag) {
                      var m = h.alternate;
                      if (null !== m && null !== (m = m.memoizedState)) {
                        f = 10 * (1073741822 - m.timedOutAt);
                        break;
                      }
                      "number" == typeof (m = h.pendingProps.maxDuration) &&
                        (0 >= m ? (p = 0) : (-1 === p || m < p) && (p = m));
                    }
                    h = h.return;
                  } while (null !== h);
                  h = c;
                  do {
                    if (
                      ((m = 13 === h.tag) &&
                        (m =
                          void 0 !== h.memoizedProps.fallback &&
                          null === h.memoizedState),
                      m)
                    ) {
                      if (
                        (null === (c = h.updateQueue)
                          ? ((c = new Set()).add(d), (h.updateQueue = c))
                          : c.add(d),
                        0 == (1 & h.mode))
                      ) {
                        (h.effectTag |= 64),
                          (u.effectTag &= -1957),
                          1 === u.tag &&
                            (null === u.alternate
                              ? (u.tag = 17)
                              : (((s = Wo(1073741823)).tag = Bo), Vo(u, s))),
                          (u.expirationTime = 1073741823);
                        break e;
                      }
                      c = s;
                      var g = (u = l).pingCache;
                      null === g
                        ? ((g = u.pingCache = new hs()),
                          (m = new Set()),
                          g.set(d, m))
                        : void 0 === (m = g.get(d)) &&
                          ((m = new Set()), g.set(d, m)),
                        m.has(c) ||
                          (m.add(c),
                          (u = Ws.bind(null, u, d, c)),
                          d.then(u, u)),
                        -1 === p
                          ? (l = 1073741823)
                          : (-1 === f &&
                              (f = 10 * (1073741822 - ri(l, s)) - 5e3),
                            (l = f + p)),
                        0 <= l && Cs < l && (Cs = l),
                        (h.effectTag |= 2048),
                        (h.expirationTime = s);
                      break e;
                    }
                    h = h.return;
                  } while (null !== h);
                  h = Error(
                    (ct(u.type) || "A React component") +
                      " suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display." +
                      ut(u)
                  );
                }
                (Es = !0), (h = Zo(h, u)), (l = c);
                do {
                  switch (l.tag) {
                    case 3:
                      (l.effectTag |= 2048),
                        (l.expirationTime = s),
                        Go(l, (s = ds(l, h, s)));
                      break e;
                    case 1:
                      if (
                        ((p = h),
                        (f = l.type),
                        (u = l.stateNode),
                        0 == (64 & l.effectTag) &&
                          ("function" == typeof f.getDerivedStateFromError ||
                            (null !== u &&
                              "function" == typeof u.componentDidCatch &&
                              (null === As || !As.has(u)))))
                      ) {
                        (l.effectTag |= 2048),
                          (l.expirationTime = s),
                          Go(l, (s = ps(l, p, s)));
                        break e;
                      }
                  }
                  l = l.return;
                } while (null !== l);
              }
              ws = Ns(o);
              continue;
            }
            (i = !0), Ra(t);
          }
        }
        break;
      }
      if (((vs = !1), (ms.current = n), (Po = Mo = _o = null), Gi(), i))
        (bs = null), (e.finishedWork = null);
      else if (null !== ws) e.finishedWork = null;
      else {
        if ((null === (n = e.current.alternate) && a("281"), (bs = null), Es)) {
          if (
            ((i = e.latestPendingTime),
            (o = e.latestSuspendedTime),
            (s = e.latestPingedTime),
            (0 !== i && i < r) || (0 !== o && o < r) || (0 !== s && s < r))
          )
            return ni(e, r), void fa(e, n, r, e.expirationTime, -1);
          if (!e.didError && t)
            return (
              (e.didError = !0),
              (r = e.nextExpirationTimeToWorkOn = r),
              (t = e.expirationTime = 1073741823),
              void fa(e, n, r, t, -1)
            );
        }
        t && -1 !== Cs
          ? (ni(e, r),
            (t = 10 * (1073741822 - ri(e, r))) < Cs && (Cs = t),
            (t = 10 * (1073741822 - ga())),
            (t = Cs - t),
            fa(e, n, r, e.expirationTime, 0 > t ? 0 : t))
          : ((e.pendingCommitExpirationTime = r), (e.finishedWork = n));
      }
    }
    function zs(e, t) {
      for (var n = e.return; null !== n; ) {
        switch (n.tag) {
          case 1:
            var r = n.stateNode;
            if (
              "function" == typeof n.type.getDerivedStateFromError ||
              ("function" == typeof r.componentDidCatch &&
                (null === As || !As.has(r)))
            )
              return (
                Vo(n, (e = ps(n, (e = Zo(t, e)), 1073741823))),
                void Gs(n, 1073741823)
              );
            break;
          case 3:
            return (
              Vo(n, (e = ds(n, (e = Zo(t, e)), 1073741823))),
              void Gs(n, 1073741823)
            );
        }
        n = n.return;
      }
      3 === e.tag &&
        (Vo(e, (n = ds(e, (n = Zo(t, e)), 1073741823))), Gs(e, 1073741823));
    }
    function Us(e, t) {
      var n = o.unstable_getCurrentPriorityLevel(),
        r = void 0;
      if (0 == (1 & t.mode)) r = 1073741823;
      else if (vs && !xs) r = Ss;
      else {
        switch (n) {
          case o.unstable_ImmediatePriority:
            r = 1073741823;
            break;
          case o.unstable_UserBlockingPriority:
            r = 1073741822 - 10 * (1 + (((1073741822 - e + 15) / 10) | 0));
            break;
          case o.unstable_NormalPriority:
            r = 1073741822 - 25 * (1 + (((1073741822 - e + 500) / 25) | 0));
            break;
          case o.unstable_LowPriority:
          case o.unstable_IdlePriority:
            r = 1;
            break;
          default:
            a("313");
        }
        null !== bs && r === Ss && --r;
      }
      return (
        n === o.unstable_UserBlockingPriority &&
          (0 === ea || r < ea) &&
          (ea = r),
        r
      );
    }
    function Ws(e, t, n) {
      var r = e.pingCache;
      null !== r && r.delete(t),
        null !== bs && Ss === n
          ? (bs = null)
          : ((t = e.earliestSuspendedTime),
            (r = e.latestSuspendedTime),
            0 !== t &&
              n <= t &&
              n >= r &&
              ((e.didError = !1),
              (0 === (t = e.latestPingedTime) || t > n) &&
                (e.latestPingedTime = n),
              ii(n, e),
              0 !== (n = e.expirationTime) && ya(e, n)));
    }
    function js(e, t) {
      var n = e.stateNode;
      null !== n && n.delete(t),
        null !== (e = Vs(e, (t = Us((t = ga()), e)))) &&
          (ti(e, t), 0 !== (t = e.expirationTime) && ya(e, t));
    }
    function Vs(e, t) {
      e.expirationTime < t && (e.expirationTime = t);
      var n = e.alternate;
      null !== n && n.expirationTime < t && (n.expirationTime = t);
      var r = e.return,
        i = null;
      if (null === r && 3 === e.tag) i = e.stateNode;
      else
        for (; null !== r; ) {
          if (
            ((n = r.alternate),
            r.childExpirationTime < t && (r.childExpirationTime = t),
            null !== n &&
              n.childExpirationTime < t &&
              (n.childExpirationTime = t),
            null === r.return && 3 === r.tag)
          ) {
            i = r.stateNode;
            break;
          }
          r = r.return;
        }
      return i;
    }
    function Gs(e, t) {
      null !== (e = Vs(e, t)) &&
        (!vs && 0 !== Ss && t > Ss && _s(),
        ti(e, t),
        (vs && !xs && bs === e) || ya(e, e.expirationTime),
        ua > ca && ((ua = 0), a("185")));
    }
    function $s(e, t, n, r, i) {
      return o.unstable_runWithPriority(
        o.unstable_ImmediatePriority,
        function () {
          return e(t, n, r, i);
        }
      );
    }
    var qs = null,
      Ks = null,
      Ys = 0,
      Qs = void 0,
      Zs = !1,
      Xs = null,
      Js = 0,
      ea = 0,
      ta = !1,
      na = null,
      ra = !1,
      ia = !1,
      oa = null,
      sa = o.unstable_now(),
      aa = 1073741822 - ((sa / 10) | 0),
      la = aa,
      ca = 50,
      ua = 0,
      ha = null;
    function da() {
      aa = 1073741822 - (((o.unstable_now() - sa) / 10) | 0);
    }
    function pa(e, t) {
      if (0 !== Ys) {
        if (t < Ys) return;
        null !== Qs && o.unstable_cancelCallback(Qs);
      }
      (Ys = t),
        (e = o.unstable_now() - sa),
        (Qs = o.unstable_scheduleCallback(Sa, {
          timeout: 10 * (1073741822 - t) - e,
        }));
    }
    function fa(e, t, n, r, i) {
      (e.expirationTime = r),
        0 !== i || ba()
          ? 0 < i && (e.timeoutHandle = Sr(ma.bind(null, e, t, n), i))
          : ((e.pendingCommitExpirationTime = n), (e.finishedWork = t));
    }
    function ma(e, t, n) {
      (e.pendingCommitExpirationTime = n),
        (e.finishedWork = t),
        da(),
        (la = aa),
        Ea(e, n);
    }
    function ga() {
      return Zs || (va(), (0 !== Js && 1 !== Js) || (da(), (la = aa))), la;
    }
    function ya(e, t) {
      null === e.nextScheduledRoot
        ? ((e.expirationTime = t),
          null === Ks
            ? ((qs = Ks = e), (e.nextScheduledRoot = e))
            : ((Ks = Ks.nextScheduledRoot = e).nextScheduledRoot = qs))
        : t > e.expirationTime && (e.expirationTime = t),
        Zs ||
          (ra
            ? ia && ((Xs = e), (Js = 1073741823), ka(e, 1073741823, !1))
            : 1073741823 === t
            ? Ca(1073741823, !1)
            : pa(e, t));
    }
    function va() {
      var e = 0,
        t = null;
      if (null !== Ks)
        for (var n = Ks, r = qs; null !== r; ) {
          var i = r.expirationTime;
          if (0 === i) {
            if (
              ((null === n || null === Ks) && a("244"),
              r === r.nextScheduledRoot)
            ) {
              qs = Ks = r.nextScheduledRoot = null;
              break;
            }
            if (r === qs)
              (qs = i = r.nextScheduledRoot),
                (Ks.nextScheduledRoot = i),
                (r.nextScheduledRoot = null);
            else {
              if (r === Ks) {
                ((Ks = n).nextScheduledRoot = qs), (r.nextScheduledRoot = null);
                break;
              }
              (n.nextScheduledRoot = r.nextScheduledRoot),
                (r.nextScheduledRoot = null);
            }
            r = n.nextScheduledRoot;
          } else {
            if ((i > e && ((e = i), (t = r)), r === Ks)) break;
            if (1073741823 === e) break;
            (n = r), (r = r.nextScheduledRoot);
          }
        }
      (Xs = t), (Js = e);
    }
    var wa = !1;
    function ba() {
      return !!wa || (!!o.unstable_shouldYield() && (wa = !0));
    }
    function Sa() {
      try {
        if (!ba() && null !== qs) {
          da();
          var e = qs;
          do {
            var t = e.expirationTime;
            0 !== t && aa <= t && (e.nextExpirationTimeToWorkOn = aa),
              (e = e.nextScheduledRoot);
          } while (e !== qs);
        }
        Ca(0, !0);
      } finally {
        wa = !1;
      }
    }
    function Ca(e, t) {
      if ((va(), t))
        for (
          da(), la = aa;
          null !== Xs && 0 !== Js && e <= Js && !(wa && aa > Js);

        )
          ka(Xs, Js, aa > Js), va(), da(), (la = aa);
      else for (; null !== Xs && 0 !== Js && e <= Js; ) ka(Xs, Js, !1), va();
      if (
        (t && ((Ys = 0), (Qs = null)),
        0 !== Js && pa(Xs, Js),
        (ua = 0),
        (ha = null),
        null !== oa)
      )
        for (e = oa, oa = null, t = 0; t < e.length; t++) {
          var n = e[t];
          try {
            n._onComplete();
          } catch (e) {
            ta || ((ta = !0), (na = e));
          }
        }
      if (ta) throw ((e = na), (na = null), (ta = !1), e);
    }
    function Ea(e, t) {
      Zs && a("253"), (Xs = e), (Js = t), ka(e, t, !1), Ca(1073741823, !1);
    }
    function ka(e, t, n) {
      if ((Zs && a("245"), (Zs = !0), n)) {
        var r = e.finishedWork;
        null !== r
          ? xa(e, r, t)
          : ((e.finishedWork = null),
            -1 !== (r = e.timeoutHandle) && ((e.timeoutHandle = -1), Cr(r)),
            Hs(e, n),
            null !== (r = e.finishedWork) &&
              (ba() ? (e.finishedWork = r) : xa(e, r, t)));
      } else
        null !== (r = e.finishedWork)
          ? xa(e, r, t)
          : ((e.finishedWork = null),
            -1 !== (r = e.timeoutHandle) && ((e.timeoutHandle = -1), Cr(r)),
            Hs(e, n),
            null !== (r = e.finishedWork) && xa(e, r, t));
      Zs = !1;
    }
    function xa(e, t, n) {
      var r = e.firstBatch;
      if (
        null !== r &&
        r._expirationTime >= n &&
        (null === oa ? (oa = [r]) : oa.push(r), r._defer)
      )
        return (e.finishedWork = t), void (e.expirationTime = 0);
      (e.finishedWork = null),
        e === ha ? ua++ : ((ha = e), (ua = 0)),
        o.unstable_runWithPriority(o.unstable_ImmediatePriority, function () {
          Fs(e, t);
        });
    }
    function Ra(e) {
      null === Xs && a("246"),
        (Xs.expirationTime = 0),
        ta || ((ta = !0), (na = e));
    }
    function Ta(e, t) {
      var n = ra;
      ra = !0;
      try {
        return e(t);
      } finally {
        (ra = n) || Zs || Ca(1073741823, !1);
      }
    }
    function Da(e, t) {
      if (ra && !ia) {
        ia = !0;
        try {
          return e(t);
        } finally {
          ia = !1;
        }
      }
      return e(t);
    }
    function Aa(e, t, n) {
      ra || Zs || 0 === ea || (Ca(ea, !1), (ea = 0));
      var r = ra;
      ra = !0;
      try {
        return o.unstable_runWithPriority(
          o.unstable_UserBlockingPriority,
          function () {
            return e(t, n);
          }
        );
      } finally {
        (ra = r) || Zs || Ca(1073741823, !1);
      }
    }
    function _a(e, t, n, r, i) {
      var o = t.current;
      e: if (n) {
        t: {
          (2 === rn((n = n._reactInternalFiber)) && 1 === n.tag) || a("170");
          var s = n;
          do {
            switch (s.tag) {
              case 3:
                s = s.stateNode.context;
                break t;
              case 1:
                if (Fr(s.type)) {
                  s = s.stateNode.__reactInternalMemoizedMergedChildContext;
                  break t;
                }
            }
            s = s.return;
          } while (null !== s);
          a("171"), (s = void 0);
        }
        if (1 === n.tag) {
          var l = n.type;
          if (Fr(l)) {
            n = zr(n, l, s);
            break e;
          }
        }
        n = s;
      } else n = Mr;
      return (
        null === t.context ? (t.context = n) : (t.pendingContext = n),
        (t = i),
        ((i = Wo(r)).payload = { element: e }),
        null !== (t = void 0 === t ? null : t) && (i.callback = t),
        Ls(),
        Vo(o, i),
        Gs(o, r),
        r
      );
    }
    function Ma(e, t, n, r) {
      var i = t.current;
      return _a(e, t, n, (i = Us(ga(), i)), r);
    }
    function Pa(e) {
      if (!(e = e.current).child) return null;
      switch (e.child.tag) {
        case 5:
        default:
          return e.child.stateNode;
      }
    }
    function Ia(e, t, n) {
      var r =
        3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;
      return {
        $$typeof: Qe,
        key: null == r ? null : "" + r,
        children: e,
        containerInfo: t,
        implementation: n,
      };
    }
    function Oa(e) {
      var t = 1073741822 - 25 * (1 + (((1073741822 - ga() + 500) / 25) | 0));
      t >= ys && (t = ys - 1),
        (this._expirationTime = ys = t),
        (this._root = e),
        (this._callbacks = this._next = null),
        (this._hasChildren = this._didComplete = !1),
        (this._children = null),
        (this._defer = !0);
    }
    function La() {
      (this._callbacks = null),
        (this._didCommit = !1),
        (this._onCommit = this._onCommit.bind(this));
    }
    function Fa(e, t, n) {
      (e = {
        current: (t = qr(3, null, null, t ? 3 : 0)),
        containerInfo: e,
        pendingChildren: null,
        pingCache: null,
        earliestPendingTime: 0,
        latestPendingTime: 0,
        earliestSuspendedTime: 0,
        latestSuspendedTime: 0,
        latestPingedTime: 0,
        didError: !1,
        pendingCommitExpirationTime: 0,
        finishedWork: null,
        timeoutHandle: -1,
        context: null,
        pendingContext: null,
        hydrate: n,
        nextExpirationTimeToWorkOn: 0,
        expirationTime: 0,
        firstBatch: null,
        nextScheduledRoot: null,
      }),
        (this._internalRoot = t.stateNode = e);
    }
    function Na(e) {
      return !(
        !e ||
        (1 !== e.nodeType &&
          9 !== e.nodeType &&
          11 !== e.nodeType &&
          (8 !== e.nodeType || " react-mount-point-unstable " !== e.nodeValue))
      );
    }
    function Ba(e, t, n, r, i) {
      var o = n._reactRootContainer;
      if (o) {
        if ("function" == typeof i) {
          var s = i;
          i = function () {
            var e = Pa(o._internalRoot);
            s.call(e);
          };
        }
        null != e
          ? o.legacy_renderSubtreeIntoContainer(e, t, i)
          : o.render(t, i);
      } else {
        if (
          ((o = n._reactRootContainer = (function (e, t) {
            if (
              (t ||
                (t = !(
                  !(t = e
                    ? 9 === e.nodeType
                      ? e.documentElement
                      : e.firstChild
                    : null) ||
                  1 !== t.nodeType ||
                  !t.hasAttribute("data-reactroot")
                )),
              !t)
            )
              for (var n; (n = e.lastChild); ) e.removeChild(n);
            return new Fa(e, !1, t);
          })(n, r)),
          "function" == typeof i)
        ) {
          var a = i;
          i = function () {
            var e = Pa(o._internalRoot);
            a.call(e);
          };
        }
        Da(function () {
          null != e
            ? o.legacy_renderSubtreeIntoContainer(e, t, i)
            : o.render(t, i);
        });
      }
      return Pa(o._internalRoot);
    }
    function Ha(e, t) {
      var n =
        2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;
      return Na(t) || a("200"), Ia(e, t, null, n);
    }
    (De = function (e, t, n) {
      switch (t) {
        case "input":
          if ((kt(e, n), (t = n.name), "radio" === n.type && null != t)) {
            for (n = e; n.parentNode; ) n = n.parentNode;
            for (
              n = n.querySelectorAll(
                "input[name=" + JSON.stringify("" + t) + '][type="radio"]'
              ),
                t = 0;
              t < n.length;
              t++
            ) {
              var r = n[t];
              if (r !== e && r.form === e.form) {
                var i = z(r);
                i || a("90"), Ge(r), kt(r, i);
              }
            }
          }
          break;
        case "textarea":
          Jn(e, n);
          break;
        case "select":
          null != (t = n.value) && Qn(e, !!n.multiple, t, !1);
      }
    }),
      (Oa.prototype.render = function (e) {
        this._defer || a("250"), (this._hasChildren = !0), (this._children = e);
        var t = this._root._internalRoot,
          n = this._expirationTime,
          r = new La();
        return _a(e, t, null, n, r._onCommit), r;
      }),
      (Oa.prototype.then = function (e) {
        if (this._didComplete) e();
        else {
          var t = this._callbacks;
          null === t && (t = this._callbacks = []), t.push(e);
        }
      }),
      (Oa.prototype.commit = function () {
        var e = this._root._internalRoot,
          t = e.firstBatch;
        if (((this._defer && null !== t) || a("251"), this._hasChildren)) {
          var n = this._expirationTime;
          if (t !== this) {
            this._hasChildren &&
              ((n = this._expirationTime = t._expirationTime),
              this.render(this._children));
            for (var r = null, i = t; i !== this; ) (r = i), (i = i._next);
            null === r && a("251"),
              (r._next = i._next),
              (this._next = t),
              (e.firstBatch = this);
          }
          (this._defer = !1),
            Ea(e, n),
            (t = this._next),
            (this._next = null),
            null !== (t = e.firstBatch = t) &&
              t._hasChildren &&
              t.render(t._children);
        } else (this._next = null), (this._defer = !1);
      }),
      (Oa.prototype._onComplete = function () {
        if (!this._didComplete) {
          this._didComplete = !0;
          var e = this._callbacks;
          if (null !== e) for (var t = 0; t < e.length; t++) (0, e[t])();
        }
      }),
      (La.prototype.then = function (e) {
        if (this._didCommit) e();
        else {
          var t = this._callbacks;
          null === t && (t = this._callbacks = []), t.push(e);
        }
      }),
      (La.prototype._onCommit = function () {
        if (!this._didCommit) {
          this._didCommit = !0;
          var e = this._callbacks;
          if (null !== e)
            for (var t = 0; t < e.length; t++) {
              var n = e[t];
              "function" != typeof n && a("191", n), n();
            }
        }
      }),
      (Fa.prototype.render = function (e, t) {
        var n = this._internalRoot,
          r = new La();
        return (
          null !== (t = void 0 === t ? null : t) && r.then(t),
          Ma(e, n, null, r._onCommit),
          r
        );
      }),
      (Fa.prototype.unmount = function (e) {
        var t = this._internalRoot,
          n = new La();
        return (
          null !== (e = void 0 === e ? null : e) && n.then(e),
          Ma(null, t, null, n._onCommit),
          n
        );
      }),
      (Fa.prototype.legacy_renderSubtreeIntoContainer = function (e, t, n) {
        var r = this._internalRoot,
          i = new La();
        return (
          null !== (n = void 0 === n ? null : n) && i.then(n),
          Ma(t, r, e, i._onCommit),
          i
        );
      }),
      (Fa.prototype.createBatch = function () {
        var e = new Oa(this),
          t = e._expirationTime,
          n = this._internalRoot,
          r = n.firstBatch;
        if (null === r) (n.firstBatch = e), (e._next = null);
        else {
          for (n = null; null !== r && r._expirationTime >= t; )
            (n = r), (r = r._next);
          (e._next = r), null !== n && (n._next = e);
        }
        return e;
      }),
      (Oe = Ta),
      (Le = Aa),
      (Fe = function () {
        Zs || 0 === ea || (Ca(ea, !1), (ea = 0));
      });
    var za,
      Ua,
      Wa = {
        createPortal: Ha,
        findDOMNode: function (e) {
          if (null == e) return null;
          if (1 === e.nodeType) return e;
          var t = e._reactInternalFiber;
          return (
            void 0 === t &&
              ("function" == typeof e.render
                ? a("188")
                : a("268", Object.keys(e))),
            (e = null === (e = sn(t)) ? null : e.stateNode)
          );
        },
        hydrate: function (e, t, n) {
          return Na(t) || a("200"), Ba(null, e, t, !0, n);
        },
        render: function (e, t, n) {
          return Na(t) || a("200"), Ba(null, e, t, !1, n);
        },
        unstable_renderSubtreeIntoContainer: function (e, t, n, r) {
          return (
            Na(n) || a("200"),
            (null == e || void 0 === e._reactInternalFiber) && a("38"),
            Ba(e, t, n, !1, r)
          );
        },
        unmountComponentAtNode: function (e) {
          return (
            Na(e) || a("40"),
            !!e._reactRootContainer &&
              (Da(function () {
                Ba(null, null, e, !1, function () {
                  e._reactRootContainer = null;
                });
              }),
              !0)
          );
        },
        unstable_createPortal: function () {
          return Ha.apply(void 0, arguments);
        },
        unstable_batchedUpdates: Ta,
        unstable_interactiveUpdates: Aa,
        flushSync: function (e, t) {
          Zs && a("187");
          var n = ra;
          ra = !0;
          try {
            return $s(e, t);
          } finally {
            (ra = n), Ca(1073741823, !1);
          }
        },
        unstable_createRoot: function (e, t) {
          return (
            Na(e) || a("299", "unstable_createRoot"),
            new Fa(e, !0, null != t && !0 === t.hydrate)
          );
        },
        unstable_flushControlled: function (e) {
          var t = ra;
          ra = !0;
          try {
            $s(e);
          } finally {
            (ra = t) || Zs || Ca(1073741823, !1);
          }
        },
        __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: {
          Events: [
            B,
            H,
            z,
            M.injectEventPluginsByName,
            b,
            $,
            function (e) {
              D(e, G);
            },
            Pe,
            Ie,
            _n,
            I,
          ],
        },
      };
    (Ua = (za = {
      findFiberByHostInstance: N,
      bundleType: 0,
      version: "16.8.4",
      rendererPackageName: "react-dom",
    }).findFiberByHostInstance),
      (function (e) {
        if ("undefined" == typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) return !1;
        var t = __REACT_DEVTOOLS_GLOBAL_HOOK__;
        if (t.isDisabled || !t.supportsFiber) return !0;
        try {
          var n = t.inject(e);
          (jr = Gr(function (e) {
            return t.onCommitFiberRoot(n, e);
          })),
            (Vr = Gr(function (e) {
              return t.onCommitFiberUnmount(n, e);
            }));
        } catch (e) {}
      })(
        i({}, za, {
          overrideProps: null,
          currentDispatcherRef: $e.ReactCurrentDispatcher,
          findHostInstanceByFiber: function (e) {
            return null === (e = sn(e)) ? null : e.stateNode;
          },
          findFiberByHostInstance: function (e) {
            return Ua ? Ua(e) : null;
          },
        })
      );
    var ja = { default: Wa },
      Va = (ja && Wa) || ja;
    e.exports = Va.default || Va;
  },
  function (e, t, n) {
    "use strict";
    e.exports = n(157);
  },
  function (e, t, n) {
    "use strict";
    /** @license React v0.13.4
     * scheduler.production.min.js
     *
     * Copyright (c) Facebook, Inc. and its affiliates.
     *
     * This source code is licensed under the MIT license found in the
     * LICENSE file in the root directory of this source tree.
     */ Object.defineProperty(t, "__esModule", { value: !0 });
    var r = null,
      i = !1,
      o = 3,
      s = -1,
      a = -1,
      l = !1,
      c = !1;
    function u() {
      if (!l) {
        var e = r.expirationTime;
        c ? k() : (c = !0), E(p, e);
      }
    }
    function h() {
      var e = r,
        t = r.next;
      if (r === t) r = null;
      else {
        var n = r.previous;
        (r = n.next = t), (t.previous = n);
      }
      (e.next = e.previous = null),
        (n = e.callback),
        (t = e.expirationTime),
        (e = e.priorityLevel);
      var i = o,
        s = a;
      (o = e), (a = t);
      try {
        var l = n();
      } finally {
        (o = i), (a = s);
      }
      if ("function" == typeof l)
        if (
          ((l = {
            callback: l,
            priorityLevel: e,
            expirationTime: t,
            next: null,
            previous: null,
          }),
          null === r)
        )
          r = l.next = l.previous = l;
        else {
          (n = null), (e = r);
          do {
            if (e.expirationTime >= t) {
              n = e;
              break;
            }
            e = e.next;
          } while (e !== r);
          null === n ? (n = r) : n === r && ((r = l), u()),
            ((t = n.previous).next = n.previous = l),
            (l.next = n),
            (l.previous = t);
        }
    }
    function d() {
      if (-1 === s && null !== r && 1 === r.priorityLevel) {
        l = !0;
        try {
          do {
            h();
          } while (null !== r && 1 === r.priorityLevel);
        } finally {
          (l = !1), null !== r ? u() : (c = !1);
        }
      }
    }
    function p(e) {
      l = !0;
      var n = i;
      i = e;
      try {
        if (e)
          for (; null !== r; ) {
            var o = t.unstable_now();
            if (!(r.expirationTime <= o)) break;
            do {
              h();
            } while (null !== r && r.expirationTime <= o);
          }
        else if (null !== r)
          do {
            h();
          } while (null !== r && !x());
      } finally {
        (l = !1), (i = n), null !== r ? u() : (c = !1), d();
      }
    }
    var f,
      m,
      g = Date,
      y = "function" == typeof setTimeout ? setTimeout : void 0,
      v = "function" == typeof clearTimeout ? clearTimeout : void 0,
      w =
        "function" == typeof requestAnimationFrame
          ? requestAnimationFrame
          : void 0,
      b =
        "function" == typeof cancelAnimationFrame
          ? cancelAnimationFrame
          : void 0;
    function S(e) {
      (f = w(function (t) {
        v(m), e(t);
      })),
        (m = y(function () {
          b(f), e(t.unstable_now());
        }, 100));
    }
    if (
      "object" == typeof performance &&
      "function" == typeof performance.now
    ) {
      var C = performance;
      t.unstable_now = function () {
        return C.now();
      };
    } else
      t.unstable_now = function () {
        return g.now();
      };
    var E,
      k,
      x,
      R = null;
    if (
      ("undefined" != typeof window
        ? (R = window)
        : "undefined" != typeof global && (R = global),
      R && R._schedMock)
    ) {
      var T = R._schedMock;
      (E = T[0]), (k = T[1]), (x = T[2]), (t.unstable_now = T[3]);
    } else if (
      "undefined" == typeof window ||
      "function" != typeof MessageChannel
    ) {
      var D = null,
        A = function (e) {
          if (null !== D)
            try {
              D(e);
            } finally {
              D = null;
            }
        };
      (E = function (e) {
        null !== D ? setTimeout(E, 0, e) : ((D = e), setTimeout(A, 0, !1));
      }),
        (k = function () {
          D = null;
        }),
        (x = function () {
          return !1;
        });
    } else {
      "undefined" != typeof console &&
        ("function" != typeof w &&
          console.error(
            "This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"
          ),
        "function" != typeof b &&
          console.error(
            "This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"
          ));
      var _ = null,
        M = !1,
        P = -1,
        I = !1,
        O = !1,
        L = 0,
        F = 33,
        N = 33;
      x = function () {
        return L <= t.unstable_now();
      };
      var B = new MessageChannel(),
        H = B.port2;
      B.port1.onmessage = function () {
        M = !1;
        var e = _,
          n = P;
        (_ = null), (P = -1);
        var r = t.unstable_now(),
          i = !1;
        if (0 >= L - r) {
          if (!(-1 !== n && n <= r))
            return I || ((I = !0), S(z)), (_ = e), void (P = n);
          i = !0;
        }
        if (null !== e) {
          O = !0;
          try {
            e(i);
          } finally {
            O = !1;
          }
        }
      };
      var z = function (e) {
        if (null !== _) {
          S(z);
          var t = e - L + N;
          t < N && F < N ? (8 > t && (t = 8), (N = t < F ? F : t)) : (F = t),
            (L = e + N),
            M || ((M = !0), H.postMessage(void 0));
        } else I = !1;
      };
      (E = function (e, t) {
        (_ = e),
          (P = t),
          O || 0 > t ? H.postMessage(void 0) : I || ((I = !0), S(z));
      }),
        (k = function () {
          (_ = null), (M = !1), (P = -1);
        });
    }
    (t.unstable_ImmediatePriority = 1),
      (t.unstable_UserBlockingPriority = 2),
      (t.unstable_NormalPriority = 3),
      (t.unstable_IdlePriority = 5),
      (t.unstable_LowPriority = 4),
      (t.unstable_runWithPriority = function (e, n) {
        switch (e) {
          case 1:
          case 2:
          case 3:
          case 4:
          case 5:
            break;
          default:
            e = 3;
        }
        var r = o,
          i = s;
        (o = e), (s = t.unstable_now());
        try {
          return n();
        } finally {
          (o = r), (s = i), d();
        }
      }),
      (t.unstable_next = function (e) {
        switch (o) {
          case 1:
          case 2:
          case 3:
            var n = 3;
            break;
          default:
            n = o;
        }
        var r = o,
          i = s;
        (o = n), (s = t.unstable_now());
        try {
          return e();
        } finally {
          (o = r), (s = i), d();
        }
      }),
      (t.unstable_scheduleCallback = function (e, n) {
        var i = -1 !== s ? s : t.unstable_now();
        if ("object" == typeof n && null !== n && "number" == typeof n.timeout)
          n = i + n.timeout;
        else
          switch (o) {
            case 1:
              n = i + -1;
              break;
            case 2:
              n = i + 250;
              break;
            case 5:
              n = i + 1073741823;
              break;
            case 4:
              n = i + 1e4;
              break;
            default:
              n = i + 5e3;
          }
        if (
          ((e = {
            callback: e,
            priorityLevel: o,
            expirationTime: n,
            next: null,
            previous: null,
          }),
          null === r)
        )
          (r = e.next = e.previous = e), u();
        else {
          i = null;
          var a = r;
          do {
            if (a.expirationTime > n) {
              i = a;
              break;
            }
            a = a.next;
          } while (a !== r);
          null === i ? (i = r) : i === r && ((r = e), u()),
            ((n = i.previous).next = i.previous = e),
            (e.next = i),
            (e.previous = n);
        }
        return e;
      }),
      (t.unstable_cancelCallback = function (e) {
        var t = e.next;
        if (null !== t) {
          if (t === e) r = null;
          else {
            e === r && (r = t);
            var n = e.previous;
            (n.next = t), (t.previous = n);
          }
          e.next = e.previous = null;
        }
      }),
      (t.unstable_wrapCallback = function (e) {
        var n = o;
        return function () {
          var r = o,
            i = s;
          (o = n), (s = t.unstable_now());
          try {
            return e.apply(this, arguments);
          } finally {
            (o = r), (s = i), d();
          }
        };
      }),
      (t.unstable_getCurrentPriorityLevel = function () {
        return o;
      }),
      (t.unstable_shouldYield = function () {
        return !i && ((null !== r && r.expirationTime < a) || x());
      }),
      (t.unstable_continueExecution = function () {
        null !== r && u();
      }),
      (t.unstable_pauseExecution = function () {}),
      (t.unstable_getFirstCallbackNode = function () {
        return r;
      });
  },
  function (e, t, n) {
    (function () {
      var t;
      (t = n(63)),
        (e.exports = (function () {
          function e() {
            this.clear();
          }
          return (
            (e.exceptionHandlers = []),
            (e.onEventHandlerException = function (e) {
              return (
                0 === this.exceptionHandlers.length &&
                  (this.dispatch = this.exceptionHandlingDispatch),
                this.exceptionHandlers.push(e),
                new t(
                  ((n = this),
                  function () {
                    if (
                      (n.exceptionHandlers.splice(
                        n.exceptionHandlers.indexOf(e),
                        1
                      ),
                      0 === n.exceptionHandlers.length)
                    )
                      return (n.dispatch = n.simpleDispatch);
                  })
                )
              );
              var n;
            }),
            (e.simpleDispatch = function (e, t) {
              return e(t);
            }),
            (e.exceptionHandlingDispatch = function (e, t) {
              var n, r, i, o, s, a;
              try {
                return e(t);
              } catch (e) {
                for (
                  n = e, a = [], i = 0, o = (s = this.exceptionHandlers).length;
                  i < o;
                  i++
                )
                  (r = s[i]), a.push(r(n));
                return a;
              }
            }),
            (e.dispatch = e.simpleDispatch),
            (e.prototype.disposed = !1),
            (e.prototype.clear = function () {
              return (this.handlersByEventName = {});
            }),
            (e.prototype.dispose = function () {
              return (this.handlersByEventName = null), (this.disposed = !0);
            }),
            (e.prototype.on = function (e, n, r) {
              var i;
              if ((null == r && (r = !1), this.disposed))
                throw new Error("Emitter has been disposed");
              if ("function" != typeof n)
                throw new Error("Handler must be a function");
              return (
                (i = this.handlersByEventName[e])
                  ? (this.handlersByEventName[e] = r
                      ? [n].concat(i)
                      : i.concat(n))
                  : (this.handlersByEventName[e] = [n]),
                new t(this.off.bind(this, e, n))
              );
            }),
            (e.prototype.once = function (e, t, n) {
              var r, i;
              return (
                null == n && (n = !1),
                (i = function (e) {
                  return r.dispose(), t(e);
                }),
                (r = this.on(e, i, n))
              );
            }),
            (e.prototype.preempt = function (e, t) {
              return this.on(e, t, !0);
            }),
            (e.prototype.off = function (e, t) {
              var n, r, i, o, s;
              if (!this.disposed && (i = this.handlersByEventName[e])) {
                for (r = [], o = 0, s = i.length; o < s; o++)
                  (n = i[o]) !== t && r.push(n);
                r.length > 0
                  ? (this.handlersByEventName[e] = r)
                  : delete this.handlersByEventName[e];
              }
            }),
            (e.prototype.emit = function (e, t) {
              var n, r, i, o, s;
              if ((r = null != (s = this.handlersByEventName) ? s[e] : void 0))
                for (i = 0, o = r.length; i < o; i++)
                  (n = r[i]), this.constructor.dispatch(n, t);
            }),
            (e.prototype.emitAsync = function (e, t) {
              var n, r, i, o;
              return (r =
                null != (o = this.handlersByEventName) ? o[e] : void 0)
                ? ((i = function () {
                    var e, i, o;
                    for (o = [], e = 0, i = r.length; e < i; e++)
                      (n = r[e]), o.push(this.constructor.dispatch(n, t));
                    return o;
                  }.call(this)),
                  Promise.all(i).then(function () {}))
                : Promise.resolve();
            }),
            (e.prototype.getEventNames = function () {
              return Object.keys(this.handlersByEventName);
            }),
            (e.prototype.listenerCountForEventName = function (e) {
              var t, n;
              return null !=
                (t =
                  null != (n = this.handlersByEventName[e]) ? n.length : void 0)
                ? t
                : 0;
            }),
            (e.prototype.getTotalListenerCount = function () {
              var e, t, n, r, i;
              for (
                t = 0,
                  n = 0,
                  r = (i = Object.keys(this.handlersByEventName)).length;
                n < r;
                n++
              )
                (e = i[n]), (t += this.handlersByEventName[e].length);
              return t;
            }),
            e
          );
        })());
    }.call(this));
  },
  function (e, t, n) {
    (function () {
      var t, r;
      (t = null),
        (e.exports = (function () {
          function e() {
            var e, t, n;
            for (
              this.disposables = new Set(), t = 0, n = arguments.length;
              t < n;
              t++
            )
              (e = arguments[t]), this.add(e);
          }
          return (
            (e.prototype.disposed = !1),
            (e.prototype.dispose = function () {
              this.disposed ||
                ((this.disposed = !0),
                this.disposables.forEach(function (e) {
                  return e.dispose();
                }),
                (this.disposables = null));
            }),
            (e.prototype.add = function () {
              var e, t, n;
              if (!this.disposed)
                for (t = 0, n = arguments.length; t < n; t += 1)
                  r((e = arguments[t])), this.disposables.add(e);
            }),
            (e.prototype.remove = function (e) {
              this.disposed || this.disposables.delete(e);
            }),
            (e.prototype.delete = function (e) {
              this.remove(e);
            }),
            (e.prototype.clear = function () {
              this.disposed || this.disposables.clear();
            }),
            e
          );
        })()),
        (r = function (e) {
          if ((null == t && (t = n(63)), !t.isDisposable(e)))
            throw new TypeError(
              "Arguments to CompositeDisposable.add must have a .dispose() method"
            );
        });
    }.call(this));
  },
  function (e, t, n) {
    "use strict";
    var r = n(7),
      i = n(161),
      o = n(96),
      s = n(62),
      a = n(170),
      l = n(98),
      c = n(97)();
    function u(e, t, n) {
      var r;
      return (
        n && !0 === n.__winShell
          ? (delete n.__winShell,
            (r = { command: e, args: t, options: n, file: e, original: e }))
          : (r = i._parse(e, t, n)),
        (n = s(
          {
            maxBuffer: 10485760,
            stripEof: !0,
            preferLocal: !0,
            encoding: "utf8",
          },
          r.options
        )).preferLocal &&
          ((n.env = s({}, n.env || process.env)),
          (n.env[c] = a({ cwd: n.cwd, path: n.env[c] }))),
        { cmd: r.command, args: r.args, opts: n }
      );
    }
    function h(e, t) {
      return e.stripEof && (t = o(t)), t;
    }
    function d(e, t, n) {
      var r, i;
      return (
        ((n = s({}, n)).__winShell = !0),
        (r = process.env.comspec || "cmd.exe"),
        (i = ["/s", "/c", '"' + t + '"']),
        (n.windowsVerbatimArguments = !0),
        n.shell && (r = n.shell),
        e(r, i, n)
      );
    }
    (e.exports = function (e, t, n) {
      var o,
        s = new Promise(function (s, a) {
          var c = u(e, t, n);
          (o = r.execFile(c.cmd, c.args, c.opts, function (e, t, n) {
            if (e)
              return (
                (e.stdout = t), (e.stderr = n), (e.message += t), void a(e)
              );
            s({ stdout: h(c.opts, t), stderr: h(c.opts, n) });
          })),
            i._enoent.hookChildProcess(o, c),
            (function (e, t) {
              var n = t.input;
              null != n && (l(n) ? n.pipe(e.stdin) : e.stdin.end(n));
            })(o, c.opts);
        });
      return (o.then = s.then.bind(s)), (o.catch = s.catch.bind(s)), o;
    }),
      (e.exports.stdout = function () {
        return e.exports.apply(null, arguments).then(function (e) {
          return e.stdout;
        });
      }),
      (e.exports.stderr = function () {
        return e.exports.apply(null, arguments).then(function (e) {
          return e.stderr;
        });
      }),
      (e.exports.shell = function (t, n) {
        return d(e.exports, t, n);
      }),
      (e.exports.spawn = function (e, t, n) {
        var o = u(e, t, n),
          s = r.spawn(o.cmd, o.args, o.opts);
        return i._enoent.hookChildProcess(s, o), s;
      }),
      (e.exports.sync = function (e, t, n) {
        var i = u(e, t, n);
        if (l(i.opts.input))
          throw new TypeError(
            "The `input` option cannot be a stream in sync mode"
          );
        var s = r.spawnSync(i.cmd, i.args, i.opts);
        return (
          i.opts.stripEof &&
            ((s.stdout = o(s.stdout)), (s.stderr = o(s.stderr))),
          s
        );
      }),
      (e.exports.shellSync = function (t, n) {
        return d(e.exports.sync, t, n);
      });
  },
  function (e, t, n) {
    "use strict";
    var r = n(7),
      i = n(162),
      o = n(169);
    function s(e, t, n) {
      var s, a;
      return (
        (s = i(e, t, n)),
        (a = r.spawn(s.command, s.args, s.options)),
        o.hookChildProcess(a, s),
        a
      );
    }
    (e.exports = s),
      (e.exports.spawn = s),
      (e.exports._parse = i),
      (e.exports._enoent = o);
  },
  function (e, t, n) {
    "use strict";
    var r = n(8),
      i = n(94),
      o = n(166),
      s = new i({ max: 50, maxAge: 3e4 });
    function a(e, t) {
      return (
        (e = "" + e),
        (e = t
          ? '"' +
            (e = (e = e.replace(/(\\*)"/g, '$1$1\\"')).replace(
              /(\\*)$/,
              "$1$1"
            )) +
            '"'
          : e.replace(/([\(\)%!\^<>&|;,"'\s])/g, "^$1"))
      );
    }
    e.exports = function (e, t, n) {
      var i, l, c, u;
      return (
        t && !Array.isArray(t) && ((n = t), (t = null)),
        (t = t ? t.slice(0) : []),
        (n = n || {}),
        (u = e),
        (i =
          (c = (c = o(e)) || o(e, !0)) &&
          (function (e) {
            var t, n, i, o;
            if (s.has(e)) return s.get(e);
            t = new Buffer(150);
            try {
              (n = r.openSync(e, "r")),
                r.readSync(n, t, 0, 150, 0),
                r.closeSync(n);
            } catch (e) {}
            return (
              (i = t
                .toString()
                .trim()
                .match(/#!(.+)/i)) &&
                (o = i[1].replace(/\/usr\/bin\/env\s+/i, "")),
              s.set(e, o),
              o
            );
          })(c)) && (t.unshift(c), (e = i)),
        (l = "echo" !== e),
        (t = [
          "/s",
          "/c",
          '"' +
            (e = (function (e) {
              return /^[a-z0-9_-]+$/i.test(e) ? e : a(e, !0);
            })(e)) +
            ((t = t.map(function (e) {
              return a(e, l);
            })).length
              ? " " + t.join(" ")
              : "") +
            '"',
        ]),
        (e = process.env.comspec || "cmd.exe"),
        (n.windowsVerbatimArguments = !0),
        { command: e, args: t, options: n, file: c, original: u }
      );
    };
  },
  function (e, t, n) {
    "pseudomap" === process.env.npm_package_name &&
      "test" === process.env.npm_lifecycle_script &&
      (process.env.TEST_PSEUDOMAP = "true"),
      "function" != typeof Map || process.env.TEST_PSEUDOMAP
        ? (e.exports = n(164))
        : (e.exports = Map);
  },
  function (e, t) {
    var n = Object.prototype.hasOwnProperty;
    function r(e) {
      if (!(this instanceof r))
        throw new TypeError("Constructor PseudoMap requires 'new'");
      if ((this.clear(), e))
        if (e instanceof r || ("function" == typeof Map && e instanceof Map))
          e.forEach(function (e, t) {
            this.set(t, e);
          }, this);
        else {
          if (!Array.isArray(e)) throw new TypeError("invalid argument");
          e.forEach(function (e) {
            this.set(e[0], e[1]);
          }, this);
        }
    }
    function i(e, t) {
      return e === t || (e != e && t != t);
    }
    function o(e, t, n) {
      (this.key = e), (this.value = t), (this._index = n);
    }
    function s(e, t) {
      for (var r = 0, o = "_" + t, s = o; n.call(e, s); s = o + r++)
        if (i(e[s].key, t)) return e[s];
    }
    (e.exports = r),
      (r.prototype.forEach = function (e, t) {
        (t = t || this),
          Object.keys(this._data).forEach(function (n) {
            "size" !== n && e.call(t, this._data[n].value, this._data[n].key);
          }, this);
      }),
      (r.prototype.has = function (e) {
        return !!s(this._data, e);
      }),
      (r.prototype.get = function (e) {
        var t = s(this._data, e);
        return t && t.value;
      }),
      (r.prototype.set = function (e, t) {
        !(function (e, t, r) {
          for (var s = 0, a = "_" + t, l = a; n.call(e, l); l = a + s++)
            if (i(e[l].key, t)) return void (e[l].value = r);
          e.size++, (e[l] = new o(t, r, l));
        })(this._data, e, t);
      }),
      (r.prototype.delete = function (e) {
        var t = s(this._data, e);
        t && (delete this._data[t._index], this._data.size--);
      }),
      (r.prototype.clear = function () {
        var e = Object.create(null);
        (e.size = 0),
          Object.defineProperty(this, "_data", {
            value: e,
            enumerable: !1,
            configurable: !0,
            writable: !1,
          });
      }),
      Object.defineProperty(r.prototype, "size", {
        get: function () {
          return this._data.size;
        },
        set: function (e) {},
        enumerable: !0,
        configurable: !0,
      }),
      (r.prototype.values = r.prototype.keys = r.prototype.entries = function () {
        throw new Error("iterators are not implemented in this version");
      });
  },
  function (e, t) {
    function n(e) {
      var t = this;
      if (
        (t instanceof n || (t = new n()),
        (t.tail = null),
        (t.head = null),
        (t.length = 0),
        e && "function" == typeof e.forEach)
      )
        e.forEach(function (e) {
          t.push(e);
        });
      else if (arguments.length > 0)
        for (var r = 0, i = arguments.length; r < i; r++) t.push(arguments[r]);
      return t;
    }
    function r(e, t) {
      (e.tail = new o(t, e.tail, null, e)),
        e.head || (e.head = e.tail),
        e.length++;
    }
    function i(e, t) {
      (e.head = new o(t, null, e.head, e)),
        e.tail || (e.tail = e.head),
        e.length++;
    }
    function o(e, t, n, r) {
      if (!(this instanceof o)) return new o(e, t, n, r);
      (this.list = r),
        (this.value = e),
        t ? ((t.next = this), (this.prev = t)) : (this.prev = null),
        n ? ((n.prev = this), (this.next = n)) : (this.next = null);
    }
    (e.exports = n),
      (n.Node = o),
      (n.create = n),
      (n.prototype.removeNode = function (e) {
        if (e.list !== this)
          throw new Error("removing node which does not belong to this list");
        var t = e.next,
          n = e.prev;
        t && (t.prev = n),
          n && (n.next = t),
          e === this.head && (this.head = t),
          e === this.tail && (this.tail = n),
          e.list.length--,
          (e.next = null),
          (e.prev = null),
          (e.list = null);
      }),
      (n.prototype.unshiftNode = function (e) {
        if (e !== this.head) {
          e.list && e.list.removeNode(e);
          var t = this.head;
          (e.list = this),
            (e.next = t),
            t && (t.prev = e),
            (this.head = e),
            this.tail || (this.tail = e),
            this.length++;
        }
      }),
      (n.prototype.pushNode = function (e) {
        if (e !== this.tail) {
          e.list && e.list.removeNode(e);
          var t = this.tail;
          (e.list = this),
            (e.prev = t),
            t && (t.next = e),
            (this.tail = e),
            this.head || (this.head = e),
            this.length++;
        }
      }),
      (n.prototype.push = function () {
        for (var e = 0, t = arguments.length; e < t; e++) r(this, arguments[e]);
        return this.length;
      }),
      (n.prototype.unshift = function () {
        for (var e = 0, t = arguments.length; e < t; e++) i(this, arguments[e]);
        return this.length;
      }),
      (n.prototype.pop = function () {
        if (this.tail) {
          var e = this.tail.value;
          return (
            (this.tail = this.tail.prev),
            this.tail ? (this.tail.next = null) : (this.head = null),
            this.length--,
            e
          );
        }
      }),
      (n.prototype.shift = function () {
        if (this.head) {
          var e = this.head.value;
          return (
            (this.head = this.head.next),
            this.head ? (this.head.prev = null) : (this.tail = null),
            this.length--,
            e
          );
        }
      }),
      (n.prototype.forEach = function (e, t) {
        t = t || this;
        for (var n = this.head, r = 0; null !== n; r++)
          e.call(t, n.value, r, this), (n = n.next);
      }),
      (n.prototype.forEachReverse = function (e, t) {
        t = t || this;
        for (var n = this.tail, r = this.length - 1; null !== n; r--)
          e.call(t, n.value, r, this), (n = n.prev);
      }),
      (n.prototype.get = function (e) {
        for (var t = 0, n = this.head; null !== n && t < e; t++) n = n.next;
        if (t === e && null !== n) return n.value;
      }),
      (n.prototype.getReverse = function (e) {
        for (var t = 0, n = this.tail; null !== n && t < e; t++) n = n.prev;
        if (t === e && null !== n) return n.value;
      }),
      (n.prototype.map = function (e, t) {
        t = t || this;
        for (var r = new n(), i = this.head; null !== i; )
          r.push(e.call(t, i.value, this)), (i = i.next);
        return r;
      }),
      (n.prototype.mapReverse = function (e, t) {
        t = t || this;
        for (var r = new n(), i = this.tail; null !== i; )
          r.push(e.call(t, i.value, this)), (i = i.prev);
        return r;
      }),
      (n.prototype.reduce = function (e, t) {
        var n,
          r = this.head;
        if (arguments.length > 1) n = t;
        else {
          if (!this.head)
            throw new TypeError("Reduce of empty list with no initial value");
          (r = this.head.next), (n = this.head.value);
        }
        for (var i = 0; null !== r; i++) (n = e(n, r.value, i)), (r = r.next);
        return n;
      }),
      (n.prototype.reduceReverse = function (e, t) {
        var n,
          r = this.tail;
        if (arguments.length > 1) n = t;
        else {
          if (!this.tail)
            throw new TypeError("Reduce of empty list with no initial value");
          (r = this.tail.prev), (n = this.tail.value);
        }
        for (var i = this.length - 1; null !== r; i--)
          (n = e(n, r.value, i)), (r = r.prev);
        return n;
      }),
      (n.prototype.toArray = function () {
        for (
          var e = new Array(this.length), t = 0, n = this.head;
          null !== n;
          t++
        )
          (e[t] = n.value), (n = n.next);
        return e;
      }),
      (n.prototype.toArrayReverse = function () {
        for (
          var e = new Array(this.length), t = 0, n = this.tail;
          null !== n;
          t++
        )
          (e[t] = n.value), (n = n.prev);
        return e;
      }),
      (n.prototype.slice = function (e, t) {
        (t = t || this.length) < 0 && (t += this.length),
          (e = e || 0) < 0 && (e += this.length);
        var r = new n();
        if (t < e || t < 0) return r;
        e < 0 && (e = 0), t > this.length && (t = this.length);
        for (var i = 0, o = this.head; null !== o && i < e; i++) o = o.next;
        for (; null !== o && i < t; i++, o = o.next) r.push(o.value);
        return r;
      }),
      (n.prototype.sliceReverse = function (e, t) {
        (t = t || this.length) < 0 && (t += this.length),
          (e = e || 0) < 0 && (e += this.length);
        var r = new n();
        if (t < e || t < 0) return r;
        e < 0 && (e = 0), t > this.length && (t = this.length);
        for (var i = this.length, o = this.tail; null !== o && i > t; i--)
          o = o.prev;
        for (; null !== o && i > e; i--, o = o.prev) r.push(o.value);
        return r;
      }),
      (n.prototype.reverse = function () {
        for (var e = this.head, t = this.tail, n = e; null !== n; n = n.prev) {
          var r = n.prev;
          (n.prev = n.next), (n.next = r);
        }
        return (this.head = t), (this.tail = e), this;
      });
  },
  function (e, t, n) {
    "use strict";
    var r = n(1),
      i = n(167),
      o = new (n(94))({ max: 50, maxAge: 3e4 }),
      s = new RegExp(/[\/\\]/);
    e.exports = function (e, t) {
      var n;
      if (
        (s.test(e) && (e = r.resolve(e)),
        (t = !!t),
        (n = o.get(e + "!" + t)),
        o.has(e))
      )
        return o.get(e);
      try {
        n = t
          ? i.sync(e, { pathExt: r.delimiter + (process.env.PATHEXT || "") })
          : i.sync(e);
      } catch (e) {}
      return o.set(e + "!" + t, n), n;
    };
  },
  function (e, t, n) {
    (e.exports = a),
      (a.sync = function (e, t) {
        for (
          var n = s(e, (t = t || {})),
            a = n.env,
            l = n.ext,
            c = n.extExe,
            u = [],
            h = 0,
            d = a.length;
          h < d;
          h++
        ) {
          var p = a[h];
          '"' === p.charAt(0) && '"' === p.slice(-1) && (p = p.slice(1, -1));
          var f = r.join(p, e);
          !p && /^\.[\\\/]/.test(e) && (f = e.slice(0, 2) + f);
          for (var m = 0, g = l.length; m < g; m++) {
            var y = f + l[m];
            try {
              if (i.sync(y, { pathExt: c })) {
                if (!t.all) return y;
                u.push(y);
              }
            } catch (e) {}
          }
        }
        if (t.all && u.length) return u;
        if (t.nothrow) return null;
        throw o(e);
      });
    var r = n(1),
      i = n(95);
    function o(e) {
      var t = new Error("not found: " + e);
      return (t.code = "ENOENT"), t;
    }
    function s(e, t) {
      var n = t.colon || ";",
        r = t.path || process.env.PATH || "",
        i = [""],
        o = "";
      return (
        (r = r.split(n)).unshift(process.cwd()),
        (i = (o =
          t.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM").split(n)),
        -1 !== e.indexOf(".") && "" !== i[0] && i.unshift(""),
        (e.match(/\//) || e.match(/\\/)) && (r = [""]),
        { env: r, ext: i, extExe: o }
      );
    }
    function a(e, t, n) {
      "function" == typeof t && ((n = t), (t = {}));
      var a = s(e, t),
        l = a.env,
        c = a.ext,
        u = a.extExe,
        h = [];
      !(function s(a, d) {
        if (a === d) return t.all && h.length ? n(null, h) : n(o(e));
        var p = l[a];
        '"' === p.charAt(0) && '"' === p.slice(-1) && (p = p.slice(1, -1));
        var f = r.join(p, e);
        !p && /^\.[\\\/]/.test(e) && (f = e.slice(0, 2) + f),
          (function e(r, o) {
            if (r === o) return s(a + 1, d);
            var l = c[r];
            i(f + l, { pathExt: u }, function (i, s) {
              if (!i && s) {
                if (!t.all) return n(null, f + l);
                h.push(f + l);
              }
              return e(r + 1, o);
            });
          })(0, c.length);
      })(0, l.length);
    }
  },
  function (e, t, n) {
    (e.exports = o),
      (o.sync = function (e, t) {
        return i(r.statSync(e), e, t);
      });
    var r = n(8);
    function i(e, t, n) {
      return (
        !(!e.isSymbolicLink() && !e.isFile()) &&
        (function (e, t) {
          var n = void 0 !== t.pathExt ? t.pathExt : process.env.PATHEXT;
          if (!n) return !0;
          if (-1 !== (n = n.split(";")).indexOf("")) return !0;
          for (var r = 0; r < n.length; r++) {
            var i = n[r].toLowerCase();
            if (i && e.substr(-i.length).toLowerCase() === i) return !0;
          }
          return !1;
        })(t, n)
      );
    }
    function o(e, t, n) {
      r.stat(e, function (r, o) {
        n(r, !r && i(o, e, t));
      });
    }
  },
  function (e, t, n) {
    "use strict";
    function r(e, t) {
      var n;
      return (
        ((n = new Error(t + " " + e + " ENOENT")).code = n.errno = "ENOENT"),
        (n.syscall = t + " " + e),
        n
      );
    }
    function i(e, t, n) {
      return 1 !== e || t.file ? null : r(t.original, n);
    }
    (e.exports.hookChildProcess = function (e, t) {
      var n;
      (n = e.emit),
        (e.emit = function (r, o) {
          var s;
          return "exit" === r && (s = i(o, t, "spawn"))
            ? n.call(e, "error", s)
            : n.apply(e, arguments);
        });
    }),
      (e.exports.verifyENOENT = i),
      (e.exports.notFoundError = r);
  },
  function (e, t, n) {
    "use strict";
    var r = n(1),
      i = n(97);
    e.exports = function (e) {
      var t;
      e = e || {};
      for (var n = r.resolve(e.cwd || "."), o = []; t !== n; )
        o.push(r.join(n, "node_modules/.bin")),
          (t = n),
          (n = r.resolve(n, ".."));
      return (
        o.push(r.dirname(process.execPath)),
        o.concat(e.path || process.env[i()]).join(r.delimiter)
      );
    };
  },
  function (e, t, n) {
    "use strict";
    e.exports = function (e, t) {
      var n =
          (t = t || {}).cacheKey ||
          function (e) {
            return 1 === arguments.length &&
              (null == e || ("function" != typeof e && "object" != typeof e))
              ? e
              : JSON.stringify(arguments);
          },
        r = function () {
          var i = r.__cache__,
            o = n.apply(null, arguments);
          if (i.has(o)) {
            var s = i.get(o);
            if ("number" != typeof t.maxAge || Date.now() < s.maxAge)
              return s.data;
          }
          var a = e.apply(null, arguments);
          return i.set(o, { data: a, maxAge: Date.now() + (t.maxAge || 0) }), a;
        };
      return (
        (r.displayName = e.displayName || e.name),
        (r.__cache__ = t.cache || new Map()),
        r
      );
    };
  },
  function (e, t, n) {
    var r = n(100),
      i = process.cwd,
      o = null,
      s = process.env.GRACEFUL_FS_PLATFORM || "win32";
    process.cwd = function () {
      return o || (o = i.call(process)), o;
    };
    try {
      process.cwd();
    } catch (e) {}
    var a = process.chdir;
    (process.chdir = function (e) {
      (o = null), a.call(process, e);
    }),
      (e.exports = function (e) {
        r.hasOwnProperty("O_SYMLINK") &&
          process.version.match(/^v0\.6\.[0-2]|^v0\.5\./) &&
          (function (e) {
            (e.lchmod = function (t, n, i) {
              e.open(t, r.O_WRONLY | r.O_SYMLINK, n, function (t, r) {
                t
                  ? i && i(t)
                  : e.fchmod(r, n, function (t) {
                      e.close(r, function (e) {
                        i && i(t || e);
                      });
                    });
              });
            }),
              (e.lchmodSync = function (t, n) {
                var i,
                  o = e.openSync(t, r.O_WRONLY | r.O_SYMLINK, n),
                  s = !0;
                try {
                  (i = e.fchmodSync(o, n)), (s = !1);
                } finally {
                  if (s)
                    try {
                      e.closeSync(o);
                    } catch (e) {}
                  else e.closeSync(o);
                }
                return i;
              });
          })(e);
        e.lutimes ||
          (function (e) {
            r.hasOwnProperty("O_SYMLINK")
              ? ((e.lutimes = function (t, n, i, o) {
                  e.open(t, r.O_SYMLINK, function (t, r) {
                    t
                      ? o && o(t)
                      : e.futimes(r, n, i, function (t) {
                          e.close(r, function (e) {
                            o && o(t || e);
                          });
                        });
                  });
                }),
                (e.lutimesSync = function (t, n, i) {
                  var o,
                    s = e.openSync(t, r.O_SYMLINK),
                    a = !0;
                  try {
                    (o = e.futimesSync(s, n, i)), (a = !1);
                  } finally {
                    if (a)
                      try {
                        e.closeSync(s);
                      } catch (e) {}
                    else e.closeSync(s);
                  }
                  return o;
                }))
              : ((e.lutimes = function (e, t, n, r) {
                  r && process.nextTick(r);
                }),
                (e.lutimesSync = function () {}));
          })(e);
        (e.chown = o(e.chown)),
          (e.fchown = o(e.fchown)),
          (e.lchown = o(e.lchown)),
          (e.chmod = n(e.chmod)),
          (e.fchmod = n(e.fchmod)),
          (e.lchmod = n(e.lchmod)),
          (e.chownSync = a(e.chownSync)),
          (e.fchownSync = a(e.fchownSync)),
          (e.lchownSync = a(e.lchownSync)),
          (e.chmodSync = i(e.chmodSync)),
          (e.fchmodSync = i(e.fchmodSync)),
          (e.lchmodSync = i(e.lchmodSync)),
          (e.stat = l(e.stat)),
          (e.fstat = l(e.fstat)),
          (e.lstat = l(e.lstat)),
          (e.statSync = c(e.statSync)),
          (e.fstatSync = c(e.fstatSync)),
          (e.lstatSync = c(e.lstatSync)),
          e.lchmod ||
            ((e.lchmod = function (e, t, n) {
              n && process.nextTick(n);
            }),
            (e.lchmodSync = function () {}));
        e.lchown ||
          ((e.lchown = function (e, t, n, r) {
            r && process.nextTick(r);
          }),
          (e.lchownSync = function () {}));
        "win32" === s &&
          (e.rename =
            ((t = e.rename),
            function (n, r, i) {
              var o = Date.now(),
                s = 0;
              t(n, r, function a(l) {
                if (
                  l &&
                  ("EACCES" === l.code || "EPERM" === l.code) &&
                  Date.now() - o < 6e4
                )
                  return (
                    setTimeout(function () {
                      e.stat(r, function (e, o) {
                        e && "ENOENT" === e.code ? t(n, r, a) : i(l);
                      });
                    }, s),
                    void (s < 100 && (s += 10))
                  );
                i && i(l);
              });
            }));
        var t;
        function n(t) {
          return t
            ? function (n, r, i) {
                return t.call(e, n, r, function (e) {
                  u(e) && (e = null), i && i.apply(this, arguments);
                });
              }
            : t;
        }
        function i(t) {
          return t
            ? function (n, r) {
                try {
                  return t.call(e, n, r);
                } catch (e) {
                  if (!u(e)) throw e;
                }
              }
            : t;
        }
        function o(t) {
          return t
            ? function (n, r, i, o) {
                return t.call(e, n, r, i, function (e) {
                  u(e) && (e = null), o && o.apply(this, arguments);
                });
              }
            : t;
        }
        function a(t) {
          return t
            ? function (n, r, i) {
                try {
                  return t.call(e, n, r, i);
                } catch (e) {
                  if (!u(e)) throw e;
                }
              }
            : t;
        }
        function l(t) {
          return t
            ? function (n, r, i) {
                function o(e, t) {
                  t &&
                    (t.uid < 0 && (t.uid += 4294967296),
                    t.gid < 0 && (t.gid += 4294967296)),
                    i && i.apply(this, arguments);
                }
                return (
                  "function" == typeof r && ((i = r), (r = null)),
                  r ? t.call(e, n, r, o) : t.call(e, n, o)
                );
              }
            : t;
        }
        function c(t) {
          return t
            ? function (n, r) {
                var i = r ? t.call(e, n, r) : t.call(e, n);
                return (
                  i.uid < 0 && (i.uid += 4294967296),
                  i.gid < 0 && (i.gid += 4294967296),
                  i
                );
              }
            : t;
        }
        function u(e) {
          return (
            !e ||
            "ENOSYS" === e.code ||
            !(
              (process.getuid && 0 === process.getuid()) ||
              ("EINVAL" !== e.code && "EPERM" !== e.code)
            )
          );
        }
        (e.read = (function (t) {
          function n(n, r, i, o, s, a) {
            var l;
            if (a && "function" == typeof a) {
              var c = 0;
              l = function (u, h, d) {
                if (u && "EAGAIN" === u.code && c < 10)
                  return c++, t.call(e, n, r, i, o, s, l);
                a.apply(this, arguments);
              };
            }
            return t.call(e, n, r, i, o, s, l);
          }
          return (n.__proto__ = t), n;
        })(e.read)),
          (e.readSync =
            ((h = e.readSync),
            function (t, n, r, i, o) {
              for (var s = 0; ; )
                try {
                  return h.call(e, t, n, r, i, o);
                } catch (e) {
                  if ("EAGAIN" === e.code && s < 10) {
                    s++;
                    continue;
                  }
                  throw e;
                }
            }));
        var h;
      });
  },
  function (e, t, n) {
    var r = n(47).Stream;
    e.exports = function (e) {
      return {
        ReadStream: function t(n, i) {
          if (!(this instanceof t)) return new t(n, i);
          r.call(this);
          var o = this;
          (this.path = n),
            (this.fd = null),
            (this.readable = !0),
            (this.paused = !1),
            (this.flags = "r"),
            (this.mode = 438),
            (this.bufferSize = 65536),
            (i = i || {});
          for (var s = Object.keys(i), a = 0, l = s.length; a < l; a++) {
            var c = s[a];
            this[c] = i[c];
          }
          this.encoding && this.setEncoding(this.encoding);
          if (void 0 !== this.start) {
            if ("number" != typeof this.start)
              throw TypeError("start must be a Number");
            if (void 0 === this.end) this.end = 1 / 0;
            else if ("number" != typeof this.end)
              throw TypeError("end must be a Number");
            if (this.start > this.end) throw new Error("start must be <= end");
            this.pos = this.start;
          }
          if (null !== this.fd)
            return void process.nextTick(function () {
              o._read();
            });
          e.open(this.path, this.flags, this.mode, function (e, t) {
            if (e) return o.emit("error", e), void (o.readable = !1);
            (o.fd = t), o.emit("open", t), o._read();
          });
        },
        WriteStream: function t(n, i) {
          if (!(this instanceof t)) return new t(n, i);
          r.call(this),
            (this.path = n),
            (this.fd = null),
            (this.writable = !0),
            (this.flags = "w"),
            (this.encoding = "binary"),
            (this.mode = 438),
            (this.bytesWritten = 0),
            (i = i || {});
          for (var o = Object.keys(i), s = 0, a = o.length; s < a; s++) {
            var l = o[s];
            this[l] = i[l];
          }
          if (void 0 !== this.start) {
            if ("number" != typeof this.start)
              throw TypeError("start must be a Number");
            if (this.start < 0) throw new Error("start must be >= zero");
            this.pos = this.start;
          }
          (this.busy = !1),
            (this._queue = []),
            null === this.fd &&
              ((this._open = e.open),
              this._queue.push([
                this._open,
                this.path,
                this.flags,
                this.mode,
                void 0,
              ]),
              this.flush());
        },
      };
    };
  },
  function (e, t, n) {
    "use strict";
    e.exports = function (e) {
      if (null === e || "object" != typeof e) return e;
      if (e instanceof Object) var t = { __proto__: e.__proto__ };
      else t = Object.create(null);
      return (
        Object.getOwnPropertyNames(e).forEach(function (n) {
          Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(e, n));
        }),
        t
      );
    };
  },
  function (e, t, n) {
    "use strict";
    const r = n(13),
      i = n(1),
      o = n(21).mkdirsSync,
      s = n(103).utimesMillisSync,
      a = Symbol("notExist");
    function l(e, t, n, o) {
      if (!o.filter || o.filter(t, n))
        return (function (e, t, n, o) {
          const s = (o.dereference ? r.statSync : r.lstatSync)(t);
          if (s.isDirectory())
            return (function (e, t, n, i, o) {
              if (t === a)
                return (function (e, t, n, i) {
                  return r.mkdirSync(n), u(t, n, i), r.chmodSync(n, e.mode);
                })(e, n, i, o);
              if (t && !t.isDirectory())
                throw new Error(
                  `Cannot overwrite non-directory '${i}' with directory '${n}'.`
                );
              return u(n, i, o);
            })(s, e, t, n, o);
          if (s.isFile() || s.isCharacterDevice() || s.isBlockDevice())
            return (function (e, t, n, i, o) {
              return t === a
                ? c(e, n, i, o)
                : (function (e, t, n, i) {
                    if (i.overwrite) return r.unlinkSync(n), c(e, t, n, i);
                    if (i.errorOnExist)
                      throw new Error(`'${n}' already exists`);
                  })(e, n, i, o);
            })(s, e, t, n, o);
          if (s.isSymbolicLink())
            return (function (e, t, n, o) {
              let s = r.readlinkSync(t);
              o.dereference && (s = i.resolve(process.cwd(), s));
              if (e === a) return r.symlinkSync(s, n);
              {
                let e;
                try {
                  e = r.readlinkSync(n);
                } catch (e) {
                  if ("EINVAL" === e.code || "UNKNOWN" === e.code)
                    return r.symlinkSync(s, n);
                  throw e;
                }
                if (
                  (o.dereference && (e = i.resolve(process.cwd(), e)), h(s, e))
                )
                  throw new Error(
                    `Cannot copy '${s}' to a subdirectory of itself, '${e}'.`
                  );
                if (r.statSync(n).isDirectory() && h(e, s))
                  throw new Error(`Cannot overwrite '${e}' with '${s}'.`);
                return (function (e, t) {
                  return r.unlinkSync(t), r.symlinkSync(e, t);
                })(s, n);
              }
            })(e, t, n, o);
        })(e, t, n, o);
    }
    function c(e, t, i, o) {
      return "function" == typeof r.copyFileSync
        ? (r.copyFileSync(t, i),
          r.chmodSync(i, e.mode),
          o.preserveTimestamps ? s(i, e.atime, e.mtime) : void 0)
        : (function (e, t, i, o) {
            const s = n(104)(65536),
              a = r.openSync(t, "r"),
              l = r.openSync(i, "w", e.mode);
            let c = 0;
            for (; c < e.size; ) {
              const e = r.readSync(a, s, 0, 65536, c);
              r.writeSync(l, s, 0, e), (c += e);
            }
            o.preserveTimestamps && r.futimesSync(l, e.atime, e.mtime);
            r.closeSync(a), r.closeSync(l);
          })(e, t, i, o);
    }
    function u(e, t, n) {
      r.readdirSync(e).forEach((r) =>
        (function (e, t, n, r) {
          const o = i.join(t, e),
            s = i.join(n, e);
          return l(d(o, s), o, s, r);
        })(r, e, t, n)
      );
    }
    function h(e, t) {
      const n = i.resolve(e).split(i.sep),
        r = i.resolve(t).split(i.sep);
      return n.reduce((e, t, n) => e && r[n] === t, !0);
    }
    function d(e, t) {
      const { srcStat: n, destStat: i } = (function (e, t) {
        const n = r.statSync(e);
        let i;
        try {
          i = r.statSync(t);
        } catch (e) {
          if ("ENOENT" === e.code) return { srcStat: n, destStat: a };
          throw e;
        }
        return { srcStat: n, destStat: i };
      })(e, t);
      if (i.ino && i.ino === n.ino)
        throw new Error("Source and destination must not be the same.");
      if (n.isDirectory() && h(e, t))
        throw new Error(
          `Cannot copy '${e}' to a subdirectory of itself, '${t}'.`
        );
      return i;
    }
    e.exports = function (e, t, n) {
      "function" == typeof n && (n = { filter: n }),
        ((n = n || {}).clobber = !("clobber" in n) || !!n.clobber),
        (n.overwrite = "overwrite" in n ? !!n.overwrite : n.clobber),
        n.preserveTimestamps &&
          "ia32" === process.arch &&
          console.warn(
            "fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n\n    see https://github.com/jprichardson/node-fs-extra/issues/269"
          );
      const s = d(e, t);
      if (n.filter && !n.filter(e, t)) return;
      const a = i.dirname(t);
      return r.existsSync(a) || o(a), l(s, e, t, n);
    };
  },
  function (e, t, n) {
    "use strict";
    const r = n(13),
      i = n(1),
      o = n(102).invalidWin32Path,
      s = parseInt("0777", 8);
    e.exports = function e(t, n, a, l) {
      if (
        ("function" == typeof n
          ? ((a = n), (n = {}))
          : (n && "object" == typeof n) || (n = { mode: n }),
        o(t))
      ) {
        const e = new Error(t + " contains invalid WIN32 path characters.");
        return (e.code = "EINVAL"), a(e);
      }
      let c = n.mode;
      const u = n.fs || r;
      void 0 === c && (c = s & ~process.umask()),
        l || (l = null),
        (a = a || function () {}),
        (t = i.resolve(t)),
        u.mkdir(t, c, (r) => {
          if (!r) return a(null, (l = l || t));
          switch (r.code) {
            case "ENOENT":
              if (i.dirname(t) === t) return a(r);
              e(i.dirname(t), n, (r, i) => {
                r ? a(r, i) : e(t, n, a, i);
              });
              break;
            default:
              u.stat(t, (e, t) => {
                e || !t.isDirectory() ? a(r, l) : a(null, l);
              });
          }
        });
    };
  },
  function (e, t, n) {
    "use strict";
    const r = n(13),
      i = n(1),
      o = n(102).invalidWin32Path,
      s = parseInt("0777", 8);
    e.exports = function e(t, n, a) {
      (n && "object" == typeof n) || (n = { mode: n });
      let l = n.mode;
      const c = n.fs || r;
      if (o(t)) {
        const e = new Error(t + " contains invalid WIN32 path characters.");
        throw ((e.code = "EINVAL"), e);
      }
      void 0 === l && (l = s & ~process.umask()),
        a || (a = null),
        (t = i.resolve(t));
      try {
        c.mkdirSync(t, l), (a = a || t);
      } catch (r) {
        if ("ENOENT" === r.code) {
          if (i.dirname(t) === t) throw r;
          (a = e(i.dirname(t), n, a)), e(t, n, a);
        } else {
          let e;
          try {
            e = c.statSync(t);
          } catch (e) {
            throw r;
          }
          if (!e.isDirectory()) throw r;
        }
      }
      return a;
    };
  },
  function (e, t, n) {
    "use strict";
    const r = n(13),
      i = n(1),
      o = n(21).mkdirs,
      s = n(24).pathExists,
      a = n(103).utimesMillis,
      l = Symbol("notExist");
    function c(e, t, n, r, a) {
      const l = i.dirname(n);
      s(l, (i, s) =>
        i
          ? a(i)
          : s
          ? h(e, t, n, r, a)
          : void o(l, (i) => (i ? a(i) : h(e, t, n, r, a)))
      );
    }
    function u(e, t, n, r, i, o) {
      Promise.resolve(i.filter(n, r)).then(
        (s) => (s ? (t ? e(t, n, r, i, o) : e(n, r, i, o)) : o()),
        (e) => o(e)
      );
    }
    function h(e, t, n, r, i) {
      return r.filter ? u(d, e, t, n, r, i) : d(e, t, n, r, i);
    }
    function d(e, t, n, o, s) {
      (o.dereference ? r.stat : r.lstat)(t, (a, c) =>
        a
          ? s(a)
          : c.isDirectory()
          ? (function (e, t, n, i, o, s) {
              if (t === l)
                return (function (e, t, n, i, o) {
                  r.mkdir(n, (s) => {
                    if (s) return o(s);
                    m(t, n, i, (t) => (t ? o(t) : r.chmod(n, e.mode, o)));
                  });
                })(e, n, i, o, s);
              if (t && !t.isDirectory())
                return s(
                  new Error(
                    `Cannot overwrite non-directory '${i}' with directory '${n}'.`
                  )
                );
              return m(n, i, o, s);
            })(c, e, t, n, o, s)
          : c.isFile() || c.isCharacterDevice() || c.isBlockDevice()
          ? (function (e, t, n, i, o, s) {
              return t === l
                ? p(e, n, i, o, s)
                : (function (e, t, n, i, o) {
                    if (!i.overwrite)
                      return i.errorOnExist
                        ? o(new Error(`'${n}' already exists`))
                        : o();
                    r.unlink(n, (r) => (r ? o(r) : p(e, t, n, i, o)));
                  })(e, n, i, o, s);
            })(c, e, t, n, o, s)
          : c.isSymbolicLink()
          ? (function (e, t, n, o, s) {
              r.readlink(t, (t, a) =>
                t
                  ? s(t)
                  : (o.dereference && (a = i.resolve(process.cwd(), a)),
                    e === l
                      ? r.symlink(a, n, s)
                      : void r.readlink(n, (t, l) =>
                          t
                            ? "EINVAL" === t.code || "UNKNOWN" === t.code
                              ? r.symlink(a, n, s)
                              : s(t)
                            : (o.dereference &&
                                (l = i.resolve(process.cwd(), l)),
                              y(a, l)
                                ? s(
                                    new Error(
                                      `Cannot copy '${a}' to a subdirectory of itself, '${l}'.`
                                    )
                                  )
                                : e.isDirectory() && y(l, a)
                                ? s(
                                    new Error(
                                      `Cannot overwrite '${l}' with '${a}'.`
                                    )
                                  )
                                : (function (e, t, n) {
                                    r.unlink(t, (i) =>
                                      i ? n(i) : r.symlink(e, t, n)
                                    );
                                  })(a, n, s))
                        ))
              );
            })(e, t, n, o, s)
          : void 0
      );
    }
    function p(e, t, n, i, o) {
      return "function" == typeof r.copyFile
        ? r.copyFile(t, n, (t) => (t ? o(t) : f(e, n, i, o)))
        : (function (e, t, n, i, o) {
            const s = r.createReadStream(t);
            s.on("error", (e) => o(e)).once("open", () => {
              const t = r.createWriteStream(n, { mode: e.mode });
              t.on("error", (e) => o(e))
                .on("open", () => s.pipe(t))
                .once("close", () => f(e, n, i, o));
            });
          })(e, t, n, i, o);
    }
    function f(e, t, n, i) {
      r.chmod(t, e.mode, (r) =>
        r ? i(r) : n.preserveTimestamps ? a(t, e.atime, e.mtime, i) : i()
      );
    }
    function m(e, t, n, i) {
      r.readdir(e, (r, o) => (r ? i(r) : g(o, e, t, n, i)));
    }
    function g(e, t, n, r, o) {
      const s = e.pop();
      return s
        ? (function (e, t, n, r, o, s) {
            const a = i.join(n, t),
              l = i.join(r, t);
            v(a, l, (t, i) => {
              if (t) return s(t);
              h(i, a, l, o, (t) => (t ? s(t) : g(e, n, r, o, s)));
            });
          })(e, s, t, n, r, o)
        : o();
    }
    function y(e, t) {
      const n = i.resolve(e).split(i.sep),
        r = i.resolve(t).split(i.sep);
      return n.reduce((e, t, n) => e && r[n] === t, !0);
    }
    function v(e, t, n) {
      !(function (e, t, n) {
        r.stat(e, (e, i) => {
          if (e) return n(e);
          r.stat(t, (e, t) =>
            e
              ? "ENOENT" === e.code
                ? n(null, { srcStat: i, destStat: l })
                : n(e)
              : n(null, { srcStat: i, destStat: t })
          );
        });
      })(e, t, (r, i) => {
        if (r) return n(r);
        const { srcStat: o, destStat: s } = i;
        return s.ino && s.ino === o.ino
          ? n(new Error("Source and destination must not be the same."))
          : o.isDirectory() && y(e, t)
          ? n(
              new Error(
                `Cannot copy '${e}' to a subdirectory of itself, '${t}'.`
              )
            )
          : n(null, s);
      });
    }
    e.exports = function (e, t, n, r) {
      "function" != typeof n || r
        ? "function" == typeof n && (n = { filter: n })
        : ((r = n), (n = {})),
        (r = r || function () {}),
        ((n = n || {}).clobber = !("clobber" in n) || !!n.clobber),
        (n.overwrite = "overwrite" in n ? !!n.overwrite : n.clobber),
        n.preserveTimestamps &&
          "ia32" === process.arch &&
          console.warn(
            "fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n\n    see https://github.com/jprichardson/node-fs-extra/issues/269"
          ),
        v(e, t, (i, o) =>
          i ? r(i) : n.filter ? u(c, o, e, t, n, r) : c(o, e, t, n, r)
        );
    };
  },
  function (e, t, n) {
    "use strict";
    const r = n(18).fromCallback,
      i = n(8),
      o = n(1),
      s = n(21),
      a = n(49),
      l = r(function (e, t) {
        (t = t || function () {}),
          i.readdir(e, (n, r) => {
            if (n) return s.mkdirs(e, t);
            (r = r.map((t) => o.join(e, t))),
              (function e() {
                const n = r.pop();
                if (!n) return t();
                a.remove(n, (n) => {
                  if (n) return t(n);
                  e();
                });
              })();
          });
      });
    function c(e) {
      let t;
      try {
        t = i.readdirSync(e);
      } catch (t) {
        return s.mkdirsSync(e);
      }
      t.forEach((t) => {
        (t = o.join(e, t)), a.removeSync(t);
      });
    }
    e.exports = { emptyDirSync: c, emptydirSync: c, emptyDir: l, emptydir: l };
  },
  function (e, t, n) {
    "use strict";
    const r = n(13),
      i = n(1),
      o = n(48);
    function s(e) {
      ["unlink", "chmod", "stat", "lstat", "rmdir", "readdir"].forEach((t) => {
        (e[t] = e[t] || r[t]), (e[(t += "Sync")] = e[t] || r[t]);
      }),
        (e.maxBusyTries = e.maxBusyTries || 3);
    }
    function a(e, t, n) {
      let r = 0;
      "function" == typeof t && ((n = t), (t = {})),
        o(e, "rimraf: missing path"),
        o.strictEqual(typeof e, "string", "rimraf: path should be a string"),
        o.strictEqual(
          typeof n,
          "function",
          "rimraf: callback function required"
        ),
        o(t, "rimraf: invalid options argument provided"),
        o.strictEqual(typeof t, "object", "rimraf: options should be object"),
        s(t),
        l(e, t, function i(o) {
          if (o) {
            if (
              ("EBUSY" === o.code ||
                "ENOTEMPTY" === o.code ||
                "EPERM" === o.code) &&
              r < t.maxBusyTries
            ) {
              r++;
              return setTimeout(() => l(e, t, i), 100 * r);
            }
            "ENOENT" === o.code && (o = null);
          }
          n(o);
        });
    }
    function l(e, t, n) {
      o(e),
        o(t),
        o("function" == typeof n),
        t.lstat(e, (r, i) =>
          r && "ENOENT" === r.code
            ? n(null)
            : r && "EPERM" === r.code
            ? c(e, t, r, n)
            : i && i.isDirectory()
            ? h(e, t, r, n)
            : void t.unlink(e, (r) => {
                if (r) {
                  if ("ENOENT" === r.code) return n(null);
                  if ("EPERM" === r.code) return c(e, t, r, n);
                  if ("EISDIR" === r.code) return h(e, t, r, n);
                }
                return n(r);
              })
        );
    }
    function c(e, t, n, r) {
      o(e),
        o(t),
        o("function" == typeof r),
        n && o(n instanceof Error),
        t.chmod(e, 438, (i) => {
          i
            ? r("ENOENT" === i.code ? null : n)
            : t.stat(e, (i, o) => {
                i
                  ? r("ENOENT" === i.code ? null : n)
                  : o.isDirectory()
                  ? h(e, t, n, r)
                  : t.unlink(e, r);
              });
        });
    }
    function u(e, t, n) {
      let r;
      o(e), o(t), n && o(n instanceof Error);
      try {
        t.chmodSync(e, 438);
      } catch (e) {
        if ("ENOENT" === e.code) return;
        throw n;
      }
      try {
        r = t.statSync(e);
      } catch (e) {
        if ("ENOENT" === e.code) return;
        throw n;
      }
      r.isDirectory() ? p(e, t, n) : t.unlinkSync(e);
    }
    function h(e, t, n, r) {
      o(e),
        o(t),
        n && o(n instanceof Error),
        o("function" == typeof r),
        t.rmdir(e, (s) => {
          !s ||
          ("ENOTEMPTY" !== s.code && "EEXIST" !== s.code && "EPERM" !== s.code)
            ? s && "ENOTDIR" === s.code
              ? r(n)
              : r(s)
            : (function (e, t, n) {
                o(e),
                  o(t),
                  o("function" == typeof n),
                  t.readdir(e, (r, o) => {
                    if (r) return n(r);
                    let s,
                      l = o.length;
                    if (0 === l) return t.rmdir(e, n);
                    o.forEach((r) => {
                      a(i.join(e, r), t, (r) => {
                        if (!s)
                          return r
                            ? n((s = r))
                            : void (0 == --l && t.rmdir(e, n));
                      });
                    });
                  });
              })(e, t, r);
        });
    }
    function d(e, t) {
      let n;
      s((t = t || {})),
        o(e, "rimraf: missing path"),
        o.strictEqual(typeof e, "string", "rimraf: path should be a string"),
        o(t, "rimraf: missing options"),
        o.strictEqual(typeof t, "object", "rimraf: options should be object");
      try {
        n = t.lstatSync(e);
      } catch (n) {
        if ("ENOENT" === n.code) return;
        "EPERM" === n.code && u(e, t, n);
      }
      try {
        n && n.isDirectory() ? p(e, t, null) : t.unlinkSync(e);
      } catch (n) {
        if ("ENOENT" === n.code) return;
        if ("EPERM" === n.code) return u(e, t, n);
        if ("EISDIR" !== n.code) throw n;
        p(e, t, n);
      }
    }
    function p(e, t, n) {
      o(e), o(t), n && o(n instanceof Error);
      try {
        t.rmdirSync(e);
      } catch (r) {
        if ("ENOTDIR" === r.code) throw n;
        if ("ENOTEMPTY" === r.code || "EEXIST" === r.code || "EPERM" === r.code)
          !(function (e, t) {
            o(e), o(t), t.readdirSync(e).forEach((n) => d(i.join(e, n), t));
            {
              const n = Date.now();
              do {
                try {
                  return t.rmdirSync(e, t);
                } catch (e) {}
              } while (Date.now() - n < 500);
            }
          })(e, t);
        else if ("ENOENT" !== r.code) throw r;
      }
    }
    (e.exports = a), (a.sync = d);
  },
  function (e, t, n) {
    "use strict";
    const r = n(182),
      i = n(183),
      o = n(184);
    e.exports = {
      createFile: r.createFile,
      createFileSync: r.createFileSync,
      ensureFile: r.createFile,
      ensureFileSync: r.createFileSync,
      createLink: i.createLink,
      createLinkSync: i.createLinkSync,
      ensureLink: i.createLink,
      ensureLinkSync: i.createLinkSync,
      createSymlink: o.createSymlink,
      createSymlinkSync: o.createSymlinkSync,
      ensureSymlink: o.createSymlink,
      ensureSymlinkSync: o.createSymlinkSync,
    };
  },
  function (e, t, n) {
    "use strict";
    const r = n(18).fromCallback,
      i = n(1),
      o = n(13),
      s = n(21),
      a = n(24).pathExists;
    e.exports = {
      createFile: r(function (e, t) {
        function n() {
          o.writeFile(e, "", (e) => {
            if (e) return t(e);
            t();
          });
        }
        o.stat(e, (r, o) => {
          if (!r && o.isFile()) return t();
          const l = i.dirname(e);
          a(l, (e, r) =>
            e
              ? t(e)
              : r
              ? n()
              : void s.mkdirs(l, (e) => {
                  if (e) return t(e);
                  n();
                })
          );
        });
      }),
      createFileSync: function (e) {
        let t;
        try {
          t = o.statSync(e);
        } catch (e) {}
        if (t && t.isFile()) return;
        const n = i.dirname(e);
        o.existsSync(n) || s.mkdirsSync(n), o.writeFileSync(e, "");
      },
    };
  },
  function (e, t, n) {
    "use strict";
    const r = n(18).fromCallback,
      i = n(1),
      o = n(13),
      s = n(21),
      a = n(24).pathExists;
    e.exports = {
      createLink: r(function (e, t, n) {
        function r(e, t) {
          o.link(e, t, (e) => {
            if (e) return n(e);
            n(null);
          });
        }
        a(t, (l, c) =>
          l
            ? n(l)
            : c
            ? n(null)
            : void o.lstat(e, (o) => {
                if (o)
                  return (
                    (o.message = o.message.replace("lstat", "ensureLink")), n(o)
                  );
                const l = i.dirname(t);
                a(l, (i, o) =>
                  i
                    ? n(i)
                    : o
                    ? r(e, t)
                    : void s.mkdirs(l, (i) => {
                        if (i) return n(i);
                        r(e, t);
                      })
                );
              })
        );
      }),
      createLinkSync: function (e, t) {
        if (o.existsSync(t)) return;
        try {
          o.lstatSync(e);
        } catch (e) {
          throw ((e.message = e.message.replace("lstat", "ensureLink")), e);
        }
        const n = i.dirname(t);
        return o.existsSync(n) || s.mkdirsSync(n), o.linkSync(e, t);
      },
    };
  },
  function (e, t, n) {
    "use strict";
    const r = n(18).fromCallback,
      i = n(1),
      o = n(13),
      s = n(21),
      a = s.mkdirs,
      l = s.mkdirsSync,
      c = n(185),
      u = c.symlinkPaths,
      h = c.symlinkPathsSync,
      d = n(186),
      p = d.symlinkType,
      f = d.symlinkTypeSync,
      m = n(24).pathExists;
    e.exports = {
      createSymlink: r(function (e, t, n, r) {
        (r = "function" == typeof n ? n : r),
          (n = "function" != typeof n && n),
          m(t, (s, l) =>
            s
              ? r(s)
              : l
              ? r(null)
              : void u(e, t, (s, l) => {
                  if (s) return r(s);
                  (e = l.toDst),
                    p(l.toCwd, n, (n, s) => {
                      if (n) return r(n);
                      const l = i.dirname(t);
                      m(l, (n, i) =>
                        n
                          ? r(n)
                          : i
                          ? o.symlink(e, t, s, r)
                          : void a(l, (n) => {
                              if (n) return r(n);
                              o.symlink(e, t, s, r);
                            })
                      );
                    });
                })
          );
      }),
      createSymlinkSync: function (e, t, n) {
        if (o.existsSync(t)) return;
        const r = h(e, t);
        (e = r.toDst), (n = f(r.toCwd, n));
        const s = i.dirname(t);
        return o.existsSync(s) || l(s), o.symlinkSync(e, t, n);
      },
    };
  },
  function (e, t, n) {
    "use strict";
    const r = n(1),
      i = n(13),
      o = n(24).pathExists;
    e.exports = {
      symlinkPaths: function (e, t, n) {
        if (r.isAbsolute(e))
          return i.lstat(e, (t) =>
            t
              ? ((t.message = t.message.replace("lstat", "ensureSymlink")),
                n(t))
              : n(null, { toCwd: e, toDst: e })
          );
        {
          const s = r.dirname(t),
            a = r.join(s, e);
          return o(a, (t, o) =>
            t
              ? n(t)
              : o
              ? n(null, { toCwd: a, toDst: e })
              : i.lstat(e, (t) =>
                  t
                    ? ((t.message = t.message.replace(
                        "lstat",
                        "ensureSymlink"
                      )),
                      n(t))
                    : n(null, { toCwd: e, toDst: r.relative(s, e) })
                )
          );
        }
      },
      symlinkPathsSync: function (e, t) {
        let n;
        if (r.isAbsolute(e)) {
          if (((n = i.existsSync(e)), !n))
            throw new Error("absolute srcpath does not exist");
          return { toCwd: e, toDst: e };
        }
        {
          const o = r.dirname(t),
            s = r.join(o, e);
          if (((n = i.existsSync(s)), n)) return { toCwd: s, toDst: e };
          if (((n = i.existsSync(e)), !n))
            throw new Error("relative srcpath does not exist");
          return { toCwd: e, toDst: r.relative(o, e) };
        }
      },
    };
  },
  function (e, t, n) {
    "use strict";
    const r = n(13);
    e.exports = {
      symlinkType: function (e, t, n) {
        if (
          ((n = "function" == typeof t ? t : n),
          (t = "function" != typeof t && t))
        )
          return n(null, t);
        r.lstat(e, (e, r) => {
          if (e) return n(null, "file");
          (t = r && r.isDirectory() ? "dir" : "file"), n(null, t);
        });
      },
      symlinkTypeSync: function (e, t) {
        let n;
        if (t) return t;
        try {
          n = r.lstatSync(e);
        } catch (e) {
          return "file";
        }
        return n && n.isDirectory() ? "dir" : "file";
      },
    };
  },
  function (e, t, n) {
    "use strict";
    const r = n(18).fromCallback,
      i = n(64);
    (i.outputJson = r(n(192))),
      (i.outputJsonSync = n(193)),
      (i.outputJSON = i.outputJson),
      (i.outputJSONSync = i.outputJsonSync),
      (i.writeJSON = i.writeJson),
      (i.writeJSONSync = i.writeJsonSync),
      (i.readJSON = i.readJson),
      (i.readJSONSync = i.readJsonSync),
      (e.exports = i);
  },
  function (e, t, n) {
    var r;
    try {
      r = n(189);
    } catch (e) {
      r = n(8);
    }
    function i(e, t) {
      var n,
        r = "\n";
      return (
        "object" == typeof t &&
          null !== t &&
          (t.spaces && (n = t.spaces), t.EOL && (r = t.EOL)),
        JSON.stringify(e, t ? t.replacer : null, n).replace(/\n/g, r) + r
      );
    }
    function o(e) {
      return (
        Buffer.isBuffer(e) && (e = e.toString("utf8")),
        (e = e.replace(/^\uFEFF/, ""))
      );
    }
    var s = {
      readFile: function (e, t, n) {
        null == n && ((n = t), (t = {})),
          "string" == typeof t && (t = { encoding: t });
        var i = (t = t || {}).fs || r,
          s = !0;
        "throws" in t && (s = t.throws),
          i.readFile(e, t, function (r, i) {
            if (r) return n(r);
            var a;
            i = o(i);
            try {
              a = JSON.parse(i, t ? t.reviver : null);
            } catch (t) {
              return s
                ? ((t.message = e + ": " + t.message), n(t))
                : n(null, null);
            }
            n(null, a);
          });
      },
      readFileSync: function (e, t) {
        "string" == typeof (t = t || {}) && (t = { encoding: t });
        var n = t.fs || r,
          i = !0;
        "throws" in t && (i = t.throws);
        try {
          var s = n.readFileSync(e, t);
          return (s = o(s)), JSON.parse(s, t.reviver);
        } catch (t) {
          if (i) throw ((t.message = e + ": " + t.message), t);
          return null;
        }
      },
      writeFile: function (e, t, n, o) {
        null == o && ((o = n), (n = {}));
        var s = (n = n || {}).fs || r,
          a = "";
        try {
          a = i(t, n);
        } catch (e) {
          return void (o && o(e, null));
        }
        s.writeFile(e, a, n, o);
      },
      writeFileSync: function (e, t, n) {
        var o = (n = n || {}).fs || r,
          s = i(t, n);
        return o.writeFileSync(e, s, n);
      },
    };
    e.exports = s;
  },
  function (e, t, n) {
    var r = n(8),
      i = n(190),
      o = n(191),
      s = [],
      a = n(39);
    var l,
      c,
      u = function () {};
    function h(e) {
      i(e),
        (e.gracefulify = h),
        (e.FileReadStream = f),
        (e.FileWriteStream = m),
        (e.createReadStream = function (e, t) {
          return new f(e, t);
        }),
        (e.createWriteStream = function (e, t) {
          return new m(e, t);
        });
      var t = e.readFile;
      e.readFile = function (e, n, r) {
        "function" == typeof n && ((r = n), (n = null));
        return (function e(n, r, i) {
          return t(n, r, function (t) {
            !t || ("EMFILE" !== t.code && "ENFILE" !== t.code)
              ? ("function" == typeof i && i.apply(this, arguments), p())
              : d([e, [n, r, i]]);
          });
        })(e, n, r);
      };
      var n = e.writeFile;
      e.writeFile = function (e, t, r, i) {
        "function" == typeof r && ((i = r), (r = null));
        return (function e(t, r, i, o) {
          return n(t, r, i, function (n) {
            !n || ("EMFILE" !== n.code && "ENFILE" !== n.code)
              ? ("function" == typeof o && o.apply(this, arguments), p())
              : d([e, [t, r, i, o]]);
          });
        })(e, t, r, i);
      };
      var r = e.appendFile;
      r &&
        (e.appendFile = function (e, t, n, i) {
          "function" == typeof n && ((i = n), (n = null));
          return (function e(t, n, i, o) {
            return r(t, n, i, function (r) {
              !r || ("EMFILE" !== r.code && "ENFILE" !== r.code)
                ? ("function" == typeof o && o.apply(this, arguments), p())
                : d([e, [t, n, i, o]]);
            });
          })(e, t, n, i);
        });
      var s = e.readdir;
      function a(t) {
        return s.apply(e, t);
      }
      if (
        ((e.readdir = function (e, t, n) {
          var r = [e];
          "function" != typeof t ? r.push(t) : (n = t);
          return (
            r.push(function (e, t) {
              t && t.sort && t.sort();
              !e || ("EMFILE" !== e.code && "ENFILE" !== e.code)
                ? ("function" == typeof n && n.apply(this, arguments), p())
                : d([a, [r]]);
            }),
            a(r)
          );
        }),
        "v0.8" === process.version.substr(0, 4))
      ) {
        var l = o(e);
        (f = l.ReadStream), (m = l.WriteStream);
      }
      var c = e.ReadStream;
      (f.prototype = Object.create(c.prototype)),
        (f.prototype.open = function () {
          var e = this;
          y(e.path, e.flags, e.mode, function (t, n) {
            t
              ? (e.autoClose && e.destroy(), e.emit("error", t))
              : ((e.fd = n), e.emit("open", n), e.read());
          });
        });
      var u = e.WriteStream;
      function f(e, t) {
        return this instanceof f
          ? (c.apply(this, arguments), this)
          : f.apply(Object.create(f.prototype), arguments);
      }
      function m(e, t) {
        return this instanceof m
          ? (u.apply(this, arguments), this)
          : m.apply(Object.create(m.prototype), arguments);
      }
      (m.prototype = Object.create(u.prototype)),
        (m.prototype.open = function () {
          var e = this;
          y(e.path, e.flags, e.mode, function (t, n) {
            t
              ? (e.destroy(), e.emit("error", t))
              : ((e.fd = n), e.emit("open", n));
          });
        }),
        (e.ReadStream = f),
        (e.WriteStream = m);
      var g = e.open;
      function y(e, t, n, r) {
        return (
          "function" == typeof n && ((r = n), (n = null)),
          (function e(t, n, r, i) {
            return g(t, n, r, function (o, s) {
              !o || ("EMFILE" !== o.code && "ENFILE" !== o.code)
                ? ("function" == typeof i && i.apply(this, arguments), p())
                : d([e, [t, n, r, i]]);
            });
          })(e, t, n, r)
        );
      }
      return (e.open = y), e;
    }
    function d(e) {
      u("ENQUEUE", e[0].name, e[1]), s.push(e);
    }
    function p() {
      var e = s.shift();
      e && (u("RETRY", e[0].name, e[1]), e[0].apply(null, e[1]));
    }
    a.debuglog
      ? (u = a.debuglog("gfs4"))
      : /\bgfs4\b/i.test(process.env.NODE_DEBUG || "") &&
        (u = function () {
          var e = a.format.apply(a, arguments);
          (e = "GFS4: " + e.split(/\n/).join("\nGFS4: ")), console.error(e);
        }),
      /\bgfs4\b/i.test(process.env.NODE_DEBUG || "") &&
        process.on("exit", function () {
          u(s), n(48).equal(s.length, 0);
        }),
      (e.exports = h(n(106))),
      process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && (e.exports = h(r)),
      (e.exports.close = r.close =
        ((l = r.close),
        function (e, t) {
          return l.call(r, e, function (e) {
            e || p(), "function" == typeof t && t.apply(this, arguments);
          });
        })),
      (e.exports.closeSync = r.closeSync =
        ((c = r.closeSync),
        function (e) {
          var t = c.apply(r, arguments);
          return p(), t;
        }));
  },
  function (e, t, n) {
    var r = n(106),
      i = n(100),
      o = process.cwd,
      s = null,
      a = process.env.GRACEFUL_FS_PLATFORM || "win32";
    process.cwd = function () {
      return s || (s = o.call(process)), s;
    };
    try {
      process.cwd();
    } catch (e) {}
    var l = process.chdir;
    function c(e) {
      return e
        ? function (t, n, i) {
            return e.call(r, t, n, function (e) {
              m(e) && (e = null), i && i.apply(this, arguments);
            });
          }
        : e;
    }
    function u(e) {
      return e
        ? function (t, n) {
            try {
              return e.call(r, t, n);
            } catch (e) {
              if (!m(e)) throw e;
            }
          }
        : e;
    }
    function h(e) {
      return e
        ? function (t, n, i, o) {
            return e.call(r, t, n, i, function (e) {
              m(e) && (e = null), o && o.apply(this, arguments);
            });
          }
        : e;
    }
    function d(e) {
      return e
        ? function (t, n, i) {
            try {
              return e.call(r, t, n, i);
            } catch (e) {
              if (!m(e)) throw e;
            }
          }
        : e;
    }
    function p(e) {
      return e
        ? function (t, n) {
            return e.call(r, t, function (e, t) {
              if (!t) return n.apply(this, arguments);
              t.uid < 0 && (t.uid += 4294967296),
                t.gid < 0 && (t.gid += 4294967296),
                n && n.apply(this, arguments);
            });
          }
        : e;
    }
    function f(e) {
      return e
        ? function (t) {
            var n = e.call(r, t);
            return (
              n.uid < 0 && (n.uid += 4294967296),
              n.gid < 0 && (n.gid += 4294967296),
              n
            );
          }
        : e;
    }
    function m(e) {
      return (
        !e ||
        "ENOSYS" === e.code ||
        !(
          (process.getuid && 0 === process.getuid()) ||
          ("EINVAL" !== e.code && "EPERM" !== e.code)
        )
      );
    }
    (process.chdir = function (e) {
      (s = null), l.call(process, e);
    }),
      (e.exports = function (e) {
        i.hasOwnProperty("O_SYMLINK") &&
          process.version.match(/^v0\.6\.[0-2]|^v0\.5\./) &&
          (function (e) {
            (e.lchmod = function (t, n, r) {
              e.open(t, i.O_WRONLY | i.O_SYMLINK, n, function (t, i) {
                t
                  ? r && r(t)
                  : e.fchmod(i, n, function (t) {
                      e.close(i, function (e) {
                        r && r(t || e);
                      });
                    });
              });
            }),
              (e.lchmodSync = function (t, n) {
                var r,
                  o = e.openSync(t, i.O_WRONLY | i.O_SYMLINK, n),
                  s = !0;
                try {
                  (r = e.fchmodSync(o, n)), (s = !1);
                } finally {
                  if (s)
                    try {
                      e.closeSync(o);
                    } catch (e) {}
                  else e.closeSync(o);
                }
                return r;
              });
          })(e);
        e.lutimes ||
          (function (e) {
            i.hasOwnProperty("O_SYMLINK")
              ? ((e.lutimes = function (t, n, r, o) {
                  e.open(t, i.O_SYMLINK, function (t, i) {
                    t
                      ? o && o(t)
                      : e.futimes(i, n, r, function (t) {
                          e.close(i, function (e) {
                            o && o(t || e);
                          });
                        });
                  });
                }),
                (e.lutimesSync = function (t, n, r) {
                  var o,
                    s = e.openSync(t, i.O_SYMLINK),
                    a = !0;
                  try {
                    (o = e.futimesSync(s, n, r)), (a = !1);
                  } finally {
                    if (a)
                      try {
                        e.closeSync(s);
                      } catch (e) {}
                    else e.closeSync(s);
                  }
                  return o;
                }))
              : ((e.lutimes = function (e, t, n, r) {
                  r && process.nextTick(r);
                }),
                (e.lutimesSync = function () {}));
          })(e);
        (e.chown = h(e.chown)),
          (e.fchown = h(e.fchown)),
          (e.lchown = h(e.lchown)),
          (e.chmod = c(e.chmod)),
          (e.fchmod = c(e.fchmod)),
          (e.lchmod = c(e.lchmod)),
          (e.chownSync = d(e.chownSync)),
          (e.fchownSync = d(e.fchownSync)),
          (e.lchownSync = d(e.lchownSync)),
          (e.chmodSync = u(e.chmodSync)),
          (e.fchmodSync = u(e.fchmodSync)),
          (e.lchmodSync = u(e.lchmodSync)),
          (e.stat = p(e.stat)),
          (e.fstat = p(e.fstat)),
          (e.lstat = p(e.lstat)),
          (e.statSync = f(e.statSync)),
          (e.fstatSync = f(e.fstatSync)),
          (e.lstatSync = f(e.lstatSync)),
          e.lchmod ||
            ((e.lchmod = function (e, t, n) {
              n && process.nextTick(n);
            }),
            (e.lchmodSync = function () {}));
        e.lchown ||
          ((e.lchown = function (e, t, n, r) {
            r && process.nextTick(r);
          }),
          (e.lchownSync = function () {}));
        "win32" === a &&
          (e.rename =
            ((t = e.rename),
            function (n, r, i) {
              var o = Date.now(),
                s = 0;
              t(n, r, function a(l) {
                if (
                  l &&
                  ("EACCES" === l.code || "EPERM" === l.code) &&
                  Date.now() - o < 6e4
                )
                  return (
                    setTimeout(function () {
                      e.stat(r, function (e, o) {
                        e && "ENOENT" === e.code ? t(n, r, a) : i(l);
                      });
                    }, s),
                    void (s < 100 && (s += 10))
                  );
                i && i(l);
              });
            }));
        var t;
        (e.read =
          ((r = e.read),
          function (t, n, i, o, s, a) {
            var l;
            if (a && "function" == typeof a) {
              var c = 0;
              l = function (u, h, d) {
                if (u && "EAGAIN" === u.code && c < 10)
                  return c++, r.call(e, t, n, i, o, s, l);
                a.apply(this, arguments);
              };
            }
            return r.call(e, t, n, i, o, s, l);
          })),
          (e.readSync =
            ((n = e.readSync),
            function (t, r, i, o, s) {
              for (var a = 0; ; )
                try {
                  return n.call(e, t, r, i, o, s);
                } catch (e) {
                  if ("EAGAIN" === e.code && a < 10) {
                    a++;
                    continue;
                  }
                  throw e;
                }
            }));
        var n;
        var r;
      });
  },
  function (e, t, n) {
    var r = n(47).Stream;
    e.exports = function (e) {
      return {
        ReadStream: function t(n, i) {
          if (!(this instanceof t)) return new t(n, i);
          r.call(this);
          var o = this;
          (this.path = n),
            (this.fd = null),
            (this.readable = !0),
            (this.paused = !1),
            (this.flags = "r"),
            (this.mode = 438),
            (this.bufferSize = 65536),
            (i = i || {});
          for (var s = Object.keys(i), a = 0, l = s.length; a < l; a++) {
            var c = s[a];
            this[c] = i[c];
          }
          this.encoding && this.setEncoding(this.encoding);
          if (void 0 !== this.start) {
            if ("number" != typeof this.start)
              throw TypeError("start must be a Number");
            if (void 0 === this.end) this.end = 1 / 0;
            else if ("number" != typeof this.end)
              throw TypeError("end must be a Number");
            if (this.start > this.end) throw new Error("start must be <= end");
            this.pos = this.start;
          }
          if (null !== this.fd)
            return void process.nextTick(function () {
              o._read();
            });
          e.open(this.path, this.flags, this.mode, function (e, t) {
            if (e) return o.emit("error", e), void (o.readable = !1);
            (o.fd = t), o.emit("open", t), o._read();
          });
        },
        WriteStream: function t(n, i) {
          if (!(this instanceof t)) return new t(n, i);
          r.call(this),
            (this.path = n),
            (this.fd = null),
            (this.writable = !0),
            (this.flags = "w"),
            (this.encoding = "binary"),
            (this.mode = 438),
            (this.bytesWritten = 0),
            (i = i || {});
          for (var o = Object.keys(i), s = 0, a = o.length; s < a; s++) {
            var l = o[s];
            this[l] = i[l];
          }
          if (void 0 !== this.start) {
            if ("number" != typeof this.start)
              throw TypeError("start must be a Number");
            if (this.start < 0) throw new Error("start must be >= zero");
            this.pos = this.start;
          }
          (this.busy = !1),
            (this._queue = []),
            null === this.fd &&
              ((this._open = e.open),
              this._queue.push([
                this._open,
                this.path,
                this.flags,
                this.mode,
                void 0,
              ]),
              this.flush());
        },
      };
    };
  },
  function (e, t, n) {
    "use strict";
    const r = n(1),
      i = n(21),
      o = n(24).pathExists,
      s = n(64);
    e.exports = function (e, t, n, a) {
      "function" == typeof n && ((a = n), (n = {}));
      const l = r.dirname(e);
      o(l, (r, o) =>
        r
          ? a(r)
          : o
          ? s.writeJson(e, t, n, a)
          : void i.mkdirs(l, (r) => {
              if (r) return a(r);
              s.writeJson(e, t, n, a);
            })
      );
    };
  },
  function (e, t, n) {
    "use strict";
    const r = n(13),
      i = n(1),
      o = n(21),
      s = n(64);
    e.exports = function (e, t, n) {
      const a = i.dirname(e);
      r.existsSync(a) || o.mkdirsSync(a), s.writeJsonSync(e, t, n);
    };
  },
  function (e, t, n) {
    "use strict";
    const r = n(13),
      i = n(1),
      o = n(101).copySync,
      s = n(49).removeSync,
      a = n(21).mkdirsSync,
      l = n(104);
    function c(e, t, n) {
      return r.statSync(e).isDirectory()
        ? (function (e, t, n) {
            const r = { overwrite: !1 };
            n ? (s(t), i()) : i();
            function i() {
              return o(e, t, r), s(e);
            }
          })(e, t, n)
        : (function (e, t, n) {
            const i = l(65536),
              o = n ? "w" : "wx",
              s = r.openSync(e, "r"),
              a = r.fstatSync(s),
              c = r.openSync(t, o, a.mode);
            let u = 0;
            for (; u < a.size; ) {
              const e = r.readSync(s, i, 0, 65536, u);
              r.writeSync(c, i, 0, e), (u += e);
            }
            return r.closeSync(s), r.closeSync(c), r.unlinkSync(e);
          })(e, t, n);
    }
    e.exports = {
      moveSync: function e(t, n, o) {
        const l = (o = o || {}).overwrite || o.clobber || !1;
        if (((t = i.resolve(t)), (n = i.resolve(n)), t === n))
          return r.accessSync(t);
        if (
          (function (e, t) {
            try {
              return (
                r.statSync(e).isDirectory() &&
                e !== t &&
                t.indexOf(e) > -1 &&
                t.split(i.dirname(e) + i.sep)[1].split(i.sep)[0] ===
                  i.basename(e)
              );
            } catch (e) {
              return !1;
            }
          })(t, n)
        )
          throw new Error(`Cannot move '${t}' into itself '${n}'.`);
        a(i.dirname(n)),
          (function () {
            if (l)
              try {
                r.renameSync(t, n);
              } catch (r) {
                if (
                  "ENOTEMPTY" === r.code ||
                  "EEXIST" === r.code ||
                  "EPERM" === r.code
                )
                  return s(n), (o.overwrite = !1), e(t, n, o);
                if ("EXDEV" !== r.code) throw r;
                return c(t, n, l);
              }
            else
              try {
                r.linkSync(t, n), r.unlinkSync(t);
              } catch (e) {
                if (
                  "EXDEV" === e.code ||
                  "EISDIR" === e.code ||
                  "EPERM" === e.code ||
                  "ENOTSUP" === e.code
                )
                  return c(t, n, l);
                throw e;
              }
          })();
      },
    };
  },
  function (e, t, n) {
    "use strict";
    const r = n(18).fromCallback,
      i = n(13),
      o = n(1),
      s = n(105).copy,
      a = n(49).remove,
      l = n(21).mkdirp,
      c = n(24).pathExists;
    function u(e, t, n, r) {
      i.rename(e, t, (i) =>
        i
          ? "EXDEV" !== i.code
            ? r(i)
            : (function (e, t, n, r) {
                s(e, t, { overwrite: n, errorOnExist: !0 }, (t) =>
                  t ? r(t) : a(e, r)
                );
              })(e, t, n, r)
          : r()
      );
    }
    e.exports = {
      move: r(function (e, t, n, r) {
        "function" == typeof n && ((r = n), (n = {}));
        const s = n.overwrite || n.clobber || !1;
        if (((e = o.resolve(e)), (t = o.resolve(t)), e === t))
          return i.access(e, r);
        i.stat(e, (n, i) =>
          n
            ? r(n)
            : i.isDirectory() &&
              (function (e, t) {
                const n = e.split(o.sep),
                  r = t.split(o.sep);
                return n.reduce((e, t, n) => e && r[n] === t, !0);
              })(e, t)
            ? r(
                new Error(
                  `Cannot move '${e}' to a subdirectory of itself, '${t}'.`
                )
              )
            : void l(o.dirname(t), (n) =>
                n
                  ? r(n)
                  : (function (e, t, n, r) {
                      if (n) return a(t, (i) => (i ? r(i) : u(e, t, n, r)));
                      c(t, (i, o) =>
                        i
                          ? r(i)
                          : o
                          ? r(new Error("dest already exists."))
                          : u(e, t, n, r)
                      );
                    })(e, t, s, r)
              )
        );
      }),
    };
  },
  function (e, t, n) {
    "use strict";
    const r = n(18).fromCallback,
      i = n(13),
      o = n(1),
      s = n(21),
      a = n(24).pathExists;
    e.exports = {
      outputFile: r(function (e, t, n, r) {
        "function" == typeof n && ((r = n), (n = "utf8"));
        const l = o.dirname(e);
        a(l, (o, a) =>
          o
            ? r(o)
            : a
            ? i.writeFile(e, t, n, r)
            : void s.mkdirs(l, (o) => {
                if (o) return r(o);
                i.writeFile(e, t, n, r);
              })
        );
      }),
      outputFileSync: function (e, ...t) {
        const n = o.dirname(e);
        if (i.existsSync(n)) return i.writeFileSync(e, ...t);
        s.mkdirsSync(n), i.writeFileSync(e, ...t);
      },
    };
  },
  function (e, t, n) {
    "use strict";
    const r = n(1),
      i = n(7),
      o = n(198),
      s = n(96),
      a = n(210),
      l = n(98),
      c = n(212),
      u = n(217),
      h = n(218),
      d = n(220),
      p = n(221);
    function f(e, t, n) {
      let i;
      return (
        (n = Object.assign({ extendEnv: !0, env: {} }, n)).extendEnv &&
          (n.env = Object.assign({}, process.env, n.env)),
        !0 === n.__winShell
          ? (delete n.__winShell,
            (i = {
              command: e,
              args: t,
              options: n,
              file: e,
              original: { cmd: e, args: t },
            }))
          : (i = o._parse(e, t, n)),
        ((n = Object.assign(
          {
            maxBuffer: 1e7,
            buffer: !0,
            stripEof: !0,
            preferLocal: !0,
            localDir: i.options.cwd || process.cwd(),
            encoding: "utf8",
            reject: !0,
            cleanup: !0,
          },
          i.options
        )).stdio = p(n)),
        n.preferLocal &&
          (n.env = a.env(Object.assign({}, n, { cwd: n.localDir }))),
        n.detached && (n.cleanup = !1),
        "cmd.exe" === r.basename(i.command) && i.args.unshift("/q"),
        { cmd: i.command, args: i.args, opts: n, parsed: i }
      );
    }
    function m(e, t) {
      return t && e.stripEof && (t = s(t)), t;
    }
    function g(e, t, n) {
      let r = "/bin/sh",
        i = ["-c", t];
      return (
        ((n = Object.assign({}, n)).__winShell = !0),
        (r = process.env.comspec || "cmd.exe"),
        (i = ["/s", "/c", `"${t}"`]),
        (n.windowsVerbatimArguments = !0),
        n.shell && ((r = n.shell), delete n.shell),
        e(r, i, n)
      );
    }
    function y(e, t, { encoding: n, buffer: r, maxBuffer: i }) {
      if (!e[t]) return null;
      let o;
      return (
        (o = r
          ? n
            ? c(e[t], { encoding: n, maxBuffer: i })
            : c.buffer(e[t], { maxBuffer: i })
          : new Promise((n, r) => {
              e[t].once("end", n).once("error", r);
            })),
        o.catch((e) => {
          throw ((e.stream = t), (e.message = `${t} ${e.message}`), e);
        })
      );
    }
    function v(e, t) {
      const { stdout: n, stderr: r } = e;
      let i = e.error;
      const { code: o, signal: s } = e,
        { parsed: a, joinedCmd: l } = t,
        c = t.timedOut || !1;
      if (!i) {
        let e = "";
        Array.isArray(a.opts.stdio)
          ? ("inherit" !== a.opts.stdio[2] &&
              (e += e.length > 0 ? r : "\n" + r),
            "inherit" !== a.opts.stdio[1] && (e += "\n" + n))
          : "inherit" !== a.opts.stdio && (e = `\n${r}${n}`),
          (i = new Error(`Command failed: ${l}${e}`)),
          (i.code = o < 0 ? d(o) : o);
      }
      return (
        (i.stdout = n),
        (i.stderr = r),
        (i.failed = !0),
        (i.signal = s || null),
        (i.cmd = l),
        (i.timedOut = c),
        i
      );
    }
    function w(e, t) {
      let n = e;
      return Array.isArray(t) && t.length > 0 && (n += " " + t.join(" ")), n;
    }
    (e.exports = (e, t, n) => {
      const r = f(e, t, n),
        { encoding: s, buffer: a, maxBuffer: c } = r.opts,
        d = w(e, t);
      let p, g;
      try {
        p = i.spawn(r.cmd, r.args, r.opts);
      } catch (e) {
        return Promise.reject(e);
      }
      r.opts.cleanup &&
        (g = h(() => {
          p.kill();
        }));
      let b = null,
        S = !1;
      const C = () => {
        b && (clearTimeout(b), (b = null)), g && g();
      };
      r.opts.timeout > 0 &&
        (b = setTimeout(() => {
          (b = null), (S = !0), p.kill(r.opts.killSignal);
        }, r.opts.timeout));
      const E = new Promise((e) => {
        p.on("exit", (t, n) => {
          C(), e({ code: t, signal: n });
        }),
          p.on("error", (t) => {
            C(), e({ error: t });
          }),
          p.stdin &&
            p.stdin.on("error", (t) => {
              C(), e({ error: t });
            });
      });
      function k() {
        p.stdout && p.stdout.destroy(), p.stderr && p.stderr.destroy();
      }
      const x = () =>
        u(
          Promise.all([
            E,
            y(p, "stdout", { encoding: s, buffer: a, maxBuffer: c }),
            y(p, "stderr", { encoding: s, buffer: a, maxBuffer: c }),
          ]).then((e) => {
            const t = e[0];
            if (
              ((t.stdout = e[1]),
              (t.stderr = e[2]),
              t.error || 0 !== t.code || null !== t.signal)
            ) {
              const e = v(t, { joinedCmd: d, parsed: r, timedOut: S });
              if (((e.killed = e.killed || p.killed), !r.opts.reject)) return e;
              throw e;
            }
            return {
              stdout: m(r.opts, t.stdout),
              stderr: m(r.opts, t.stderr),
              code: 0,
              failed: !1,
              killed: !1,
              signal: null,
              cmd: d,
              timedOut: !1,
            };
          }),
          k
        );
      return (
        o._enoent.hookChildProcess(p, r.parsed),
        (function (e, t) {
          null != t && (l(t) ? t.pipe(e.stdin) : e.stdin.end(t));
        })(p, r.opts.input),
        (p.then = (e, t) => x().then(e, t)),
        (p.catch = (e) => x().catch(e)),
        p
      );
    }),
      (e.exports.stdout = (...t) => e.exports(...t).then((e) => e.stdout)),
      (e.exports.stderr = (...t) => e.exports(...t).then((e) => e.stderr)),
      (e.exports.shell = (t, n) => g(e.exports, t, n)),
      (e.exports.sync = (e, t, n) => {
        const r = f(e, t, n),
          o = w(e, t);
        if (l(r.opts.input))
          throw new TypeError(
            "The `input` option cannot be a stream in sync mode"
          );
        const s = i.spawnSync(r.cmd, r.args, r.opts);
        if (
          ((s.code = s.status), s.error || 0 !== s.status || null !== s.signal)
        ) {
          const e = v(s, { joinedCmd: o, parsed: r });
          if (!r.opts.reject) return e;
          throw e;
        }
        return {
          stdout: m(r.opts, s.stdout),
          stderr: m(r.opts, s.stderr),
          code: 0,
          failed: !1,
          signal: null,
          cmd: o,
          timedOut: !1,
        };
      }),
      (e.exports.shellSync = (t, n) => g(e.exports.sync, t, n));
  },
  function (e, t, n) {
    "use strict";
    const r = n(7),
      i = n(199),
      o = n(209);
    function s(e, t, n) {
      const s = i(e, t, n),
        a = r.spawn(s.command, s.args, s.options);
      return o.hookChildProcess(a, s), a;
    }
    (e.exports = s),
      (e.exports.spawn = s),
      (e.exports.sync = function (e, t, n) {
        const s = i(e, t, n),
          a = r.spawnSync(s.command, s.args, s.options);
        return (a.error = a.error || o.verifyENOENTSync(a.status, s)), a;
      }),
      (e.exports._parse = i),
      (e.exports._enoent = o);
  },
  function (e, t, n) {
    "use strict";
    const r = n(1),
      i = n(200),
      o = n(201),
      s = n(204),
      a = n(205),
      l = n(208),
      c = /\.(?:com|exe)$/i,
      u = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i,
      h =
        i(() =>
          l.satisfies(process.version, "^4.8.0 || ^5.7.0 || >= 6.0.0", !0)
        ) || !1;
    function d(e) {
      const t = (function (e) {
          e.file = o(e);
          const t = e.file && a(e.file);
          return t ? (e.args.unshift(e.file), (e.command = t), o(e)) : e.file;
        })(e),
        n = !c.test(t);
      if (e.options.forceShell || n) {
        const n = u.test(t);
        (e.command = r.normalize(e.command)),
          (e.command = s.command(e.command)),
          (e.args = e.args.map((e) => s.argument(e, n)));
        const i = [e.command].concat(e.args).join(" ");
        (e.args = ["/d", "/s", "/c", `"${i}"`]),
          (e.command = process.env.comspec || "cmd.exe"),
          (e.options.windowsVerbatimArguments = !0);
      }
      return e;
    }
    e.exports = function (e, t, n) {
      t && !Array.isArray(t) && ((n = t), (t = null));
      const r = {
        command: e,
        args: (t = t ? t.slice(0) : []),
        options: (n = Object.assign({}, n)),
        file: void 0,
        original: { command: e, args: t },
      };
      return n.shell
        ? (function (e) {
            if (h) return e;
            const t = [e.command].concat(e.args).join(" ");
            return (
              (e.command =
                "string" == typeof e.options.shell
                  ? e.options.shell
                  : process.env.comspec || "cmd.exe"),
              (e.args = ["/d", "/s", "/c", `"${t}"`]),
              (e.options.windowsVerbatimArguments = !0),
              e
            );
          })(r)
        : d(r);
    };
  },
  function (e, t, n) {
    "use strict";
    e.exports = function (e) {
      try {
        return e();
      } catch (e) {}
    };
  },
  function (e, t, n) {
    "use strict";
    const r = n(1),
      i = n(202),
      o = n(203)();
    function s(e, t) {
      const n = process.cwd(),
        s = null != e.options.cwd;
      if (s)
        try {
          process.chdir(e.options.cwd);
        } catch (e) {}
      let a;
      try {
        a = i.sync(e.command, {
          path: (e.options.env || process.env)[o],
          pathExt: t ? r.delimiter : void 0,
        });
      } catch (e) {
      } finally {
        process.chdir(n);
      }
      return a && (a = r.resolve(s ? e.options.cwd : "", a)), a;
    }
    e.exports = function (e) {
      return s(e) || s(e, !0);
    };
  },
  function (e, t, n) {
    (e.exports = a),
      (a.sync = function (e, t) {
        for (
          var n = s(e, (t = t || {})),
            a = n.env,
            l = n.ext,
            c = n.extExe,
            u = [],
            h = 0,
            d = a.length;
          h < d;
          h++
        ) {
          var p = a[h];
          '"' === p.charAt(0) && '"' === p.slice(-1) && (p = p.slice(1, -1));
          var f = r.join(p, e);
          !p && /^\.[\\\/]/.test(e) && (f = e.slice(0, 2) + f);
          for (var m = 0, g = l.length; m < g; m++) {
            var y = f + l[m];
            try {
              if (i.sync(y, { pathExt: c })) {
                if (!t.all) return y;
                u.push(y);
              }
            } catch (e) {}
          }
        }
        if (t.all && u.length) return u;
        if (t.nothrow) return null;
        throw o(e);
      });
    var r = n(1),
      i = n(95);
    function o(e) {
      var t = new Error("not found: " + e);
      return (t.code = "ENOENT"), t;
    }
    function s(e, t) {
      var n = t.colon || ";",
        r = t.path || process.env.PATH || "",
        i = [""],
        o = "";
      return (
        (r = r.split(n)).unshift(process.cwd()),
        (i = (o =
          t.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM").split(n)),
        -1 !== e.indexOf(".") && "" !== i[0] && i.unshift(""),
        (e.match(/\//) || e.match(/\\/)) && (r = [""]),
        { env: r, ext: i, extExe: o }
      );
    }
    function a(e, t, n) {
      "function" == typeof t && ((n = t), (t = {}));
      var a = s(e, t),
        l = a.env,
        c = a.ext,
        u = a.extExe,
        h = [];
      !(function s(a, d) {
        if (a === d) return t.all && h.length ? n(null, h) : n(o(e));
        var p = l[a];
        '"' === p.charAt(0) && '"' === p.slice(-1) && (p = p.slice(1, -1));
        var f = r.join(p, e);
        !p && /^\.[\\\/]/.test(e) && (f = e.slice(0, 2) + f),
          (function e(r, o) {
            if (r === o) return s(a + 1, d);
            var l = c[r];
            i(f + l, { pathExt: u }, function (i, s) {
              if (!i && s) {
                if (!t.all) return n(null, f + l);
                h.push(f + l);
              }
              return e(r + 1, o);
            });
          })(0, c.length);
      })(0, l.length);
    }
  },
  function (e, t, n) {
    "use strict";
    e.exports = (e) => {
      const t = (e = e || {}).env || process.env;
      return "win32" !== (e.platform || "win32")
        ? "PATH"
        : Object.keys(t).find((e) => "PATH" === e.toUpperCase()) || "Path";
    };
  },
  function (e, t, n) {
    "use strict";
    const r = /([()\][%!^"`<>&|;, *?])/g;
    (e.exports.command = function (e) {
      return (e = e.replace(r, "^$1"));
    }),
      (e.exports.argument = function (e, t) {
        return (
          (e = (e = `"${(e = (e = (e = "" + e).replace(
            /(\\*)"/g,
            '$1$1\\"'
          )).replace(/(\\*)$/, "$1$1"))}"`).replace(r, "^$1")),
          t && (e = e.replace(r, "^$1")),
          e
        );
      });
  },
  function (e, t, n) {
    "use strict";
    const r = n(8),
      i = n(206);
    e.exports = function (e) {
      let t, n;
      Buffer.alloc
        ? (t = Buffer.alloc(150))
        : ((t = new Buffer(150)), t.fill(0));
      try {
        (n = r.openSync(e, "r")), r.readSync(n, t, 0, 150, 0), r.closeSync(n);
      } catch (e) {}
      return i(t.toString());
    };
  },
  function (e, t, n) {
    "use strict";
    var r = n(207);
    e.exports = function (e) {
      var t = e.match(r);
      if (!t) return null;
      var n = t[0].replace(/#! ?/, "").split(" "),
        i = n[0].split("/").pop(),
        o = n[1];
      return "env" === i ? o : i + (o ? " " + o : "");
    };
  },
  function (e, t, n) {
    "use strict";
    e.exports = /^#!.*/;
  },
  function (e, t) {
    var n;
    (t = e.exports = $),
      (n =
        "object" == typeof process &&
        process.env &&
        process.env.NODE_DEBUG &&
        /\bsemver\b/i.test(process.env.NODE_DEBUG)
          ? function () {
              var e = Array.prototype.slice.call(arguments, 0);
              e.unshift("SEMVER"), console.log.apply(console, e);
            }
          : function () {}),
      (t.SEMVER_SPEC_VERSION = "2.0.0");
    var r = Number.MAX_SAFE_INTEGER || 9007199254740991,
      i = (t.re = []),
      o = (t.src = []),
      s = 0,
      a = s++;
    o[a] = "0|[1-9]\\d*";
    var l = s++;
    o[l] = "[0-9]+";
    var c = s++;
    o[c] = "\\d*[a-zA-Z-][a-zA-Z0-9-]*";
    var u = s++;
    o[u] = "(" + o[a] + ")\\.(" + o[a] + ")\\.(" + o[a] + ")";
    var h = s++;
    o[h] = "(" + o[l] + ")\\.(" + o[l] + ")\\.(" + o[l] + ")";
    var d = s++;
    o[d] = "(?:" + o[a] + "|" + o[c] + ")";
    var p = s++;
    o[p] = "(?:" + o[l] + "|" + o[c] + ")";
    var f = s++;
    o[f] = "(?:-(" + o[d] + "(?:\\." + o[d] + ")*))";
    var m = s++;
    o[m] = "(?:-?(" + o[p] + "(?:\\." + o[p] + ")*))";
    var g = s++;
    o[g] = "[0-9A-Za-z-]+";
    var y = s++;
    o[y] = "(?:\\+(" + o[g] + "(?:\\." + o[g] + ")*))";
    var v = s++,
      w = "v?" + o[u] + o[f] + "?" + o[y] + "?";
    o[v] = "^" + w + "$";
    var b = "[v=\\s]*" + o[h] + o[m] + "?" + o[y] + "?",
      S = s++;
    o[S] = "^" + b + "$";
    var C = s++;
    o[C] = "((?:<|>)?=?)";
    var E = s++;
    o[E] = o[l] + "|x|X|\\*";
    var k = s++;
    o[k] = o[a] + "|x|X|\\*";
    var x = s++;
    o[x] =
      "[v=\\s]*(" +
      o[k] +
      ")(?:\\.(" +
      o[k] +
      ")(?:\\.(" +
      o[k] +
      ")(?:" +
      o[f] +
      ")?" +
      o[y] +
      "?)?)?";
    var R = s++;
    o[R] =
      "[v=\\s]*(" +
      o[E] +
      ")(?:\\.(" +
      o[E] +
      ")(?:\\.(" +
      o[E] +
      ")(?:" +
      o[m] +
      ")?" +
      o[y] +
      "?)?)?";
    var T = s++;
    o[T] = "^" + o[C] + "\\s*" + o[x] + "$";
    var D = s++;
    o[D] = "^" + o[C] + "\\s*" + o[R] + "$";
    var A = s++;
    o[A] =
      "(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";
    var _ = s++;
    o[_] = "(?:~>?)";
    var M = s++;
    (o[M] = "(\\s*)" + o[_] + "\\s+"), (i[M] = new RegExp(o[M], "g"));
    var P = s++;
    o[P] = "^" + o[_] + o[x] + "$";
    var I = s++;
    o[I] = "^" + o[_] + o[R] + "$";
    var O = s++;
    o[O] = "(?:\\^)";
    var L = s++;
    (o[L] = "(\\s*)" + o[O] + "\\s+"), (i[L] = new RegExp(o[L], "g"));
    var F = s++;
    o[F] = "^" + o[O] + o[x] + "$";
    var N = s++;
    o[N] = "^" + o[O] + o[R] + "$";
    var B = s++;
    o[B] = "^" + o[C] + "\\s*(" + b + ")$|^$";
    var H = s++;
    o[H] = "^" + o[C] + "\\s*(" + w + ")$|^$";
    var z = s++;
    (o[z] = "(\\s*)" + o[C] + "\\s*(" + b + "|" + o[x] + ")"),
      (i[z] = new RegExp(o[z], "g"));
    var U = s++;
    o[U] = "^\\s*(" + o[x] + ")\\s+-\\s+(" + o[x] + ")\\s*$";
    var W = s++;
    o[W] = "^\\s*(" + o[R] + ")\\s+-\\s+(" + o[R] + ")\\s*$";
    var j = s++;
    o[j] = "(<|>)?=?\\s*\\*";
    for (var V = 0; V < 35; V++) n(V, o[V]), i[V] || (i[V] = new RegExp(o[V]));
    function G(e, t) {
      if (
        ((t && "object" == typeof t) ||
          (t = { loose: !!t, includePrerelease: !1 }),
        e instanceof $)
      )
        return e;
      if ("string" != typeof e) return null;
      if (e.length > 256) return null;
      if (!(t.loose ? i[S] : i[v]).test(e)) return null;
      try {
        return new $(e, t);
      } catch (e) {
        return null;
      }
    }
    function $(e, t) {
      if (
        ((t && "object" == typeof t) ||
          (t = { loose: !!t, includePrerelease: !1 }),
        e instanceof $)
      ) {
        if (e.loose === t.loose) return e;
        e = e.version;
      } else if ("string" != typeof e)
        throw new TypeError("Invalid Version: " + e);
      if (e.length > 256)
        throw new TypeError("version is longer than 256 characters");
      if (!(this instanceof $)) return new $(e, t);
      n("SemVer", e, t), (this.options = t), (this.loose = !!t.loose);
      var o = e.trim().match(t.loose ? i[S] : i[v]);
      if (!o) throw new TypeError("Invalid Version: " + e);
      if (
        ((this.raw = e),
        (this.major = +o[1]),
        (this.minor = +o[2]),
        (this.patch = +o[3]),
        this.major > r || this.major < 0)
      )
        throw new TypeError("Invalid major version");
      if (this.minor > r || this.minor < 0)
        throw new TypeError("Invalid minor version");
      if (this.patch > r || this.patch < 0)
        throw new TypeError("Invalid patch version");
      o[4]
        ? (this.prerelease = o[4].split(".").map(function (e) {
            if (/^[0-9]+$/.test(e)) {
              var t = +e;
              if (t >= 0 && t < r) return t;
            }
            return e;
          }))
        : (this.prerelease = []),
        (this.build = o[5] ? o[5].split(".") : []),
        this.format();
    }
    (t.parse = G),
      (t.valid = function (e, t) {
        var n = G(e, t);
        return n ? n.version : null;
      }),
      (t.clean = function (e, t) {
        var n = G(e.trim().replace(/^[=v]+/, ""), t);
        return n ? n.version : null;
      }),
      (t.SemVer = $),
      ($.prototype.format = function () {
        return (
          (this.version = this.major + "." + this.minor + "." + this.patch),
          this.prerelease.length &&
            (this.version += "-" + this.prerelease.join(".")),
          this.version
        );
      }),
      ($.prototype.toString = function () {
        return this.version;
      }),
      ($.prototype.compare = function (e) {
        return (
          n("SemVer.compare", this.version, this.options, e),
          e instanceof $ || (e = new $(e, this.options)),
          this.compareMain(e) || this.comparePre(e)
        );
      }),
      ($.prototype.compareMain = function (e) {
        return (
          e instanceof $ || (e = new $(e, this.options)),
          K(this.major, e.major) ||
            K(this.minor, e.minor) ||
            K(this.patch, e.patch)
        );
      }),
      ($.prototype.comparePre = function (e) {
        if (
          (e instanceof $ || (e = new $(e, this.options)),
          this.prerelease.length && !e.prerelease.length)
        )
          return -1;
        if (!this.prerelease.length && e.prerelease.length) return 1;
        if (!this.prerelease.length && !e.prerelease.length) return 0;
        var t = 0;
        do {
          var r = this.prerelease[t],
            i = e.prerelease[t];
          if ((n("prerelease compare", t, r, i), void 0 === r && void 0 === i))
            return 0;
          if (void 0 === i) return 1;
          if (void 0 === r) return -1;
          if (r !== i) return K(r, i);
        } while (++t);
      }),
      ($.prototype.inc = function (e, t) {
        switch (e) {
          case "premajor":
            (this.prerelease.length = 0),
              (this.patch = 0),
              (this.minor = 0),
              this.major++,
              this.inc("pre", t);
            break;
          case "preminor":
            (this.prerelease.length = 0),
              (this.patch = 0),
              this.minor++,
              this.inc("pre", t);
            break;
          case "prepatch":
            (this.prerelease.length = 0),
              this.inc("patch", t),
              this.inc("pre", t);
            break;
          case "prerelease":
            0 === this.prerelease.length && this.inc("patch", t),
              this.inc("pre", t);
            break;
          case "major":
            (0 === this.minor &&
              0 === this.patch &&
              0 !== this.prerelease.length) ||
              this.major++,
              (this.minor = 0),
              (this.patch = 0),
              (this.prerelease = []);
            break;
          case "minor":
            (0 === this.patch && 0 !== this.prerelease.length) || this.minor++,
              (this.patch = 0),
              (this.prerelease = []);
            break;
          case "patch":
            0 === this.prerelease.length && this.patch++,
              (this.prerelease = []);
            break;
          case "pre":
            if (0 === this.prerelease.length) this.prerelease = [0];
            else {
              for (var n = this.prerelease.length; --n >= 0; )
                "number" == typeof this.prerelease[n] &&
                  (this.prerelease[n]++, (n = -2));
              -1 === n && this.prerelease.push(0);
            }
            t &&
              (this.prerelease[0] === t
                ? isNaN(this.prerelease[1]) && (this.prerelease = [t, 0])
                : (this.prerelease = [t, 0]));
            break;
          default:
            throw new Error("invalid increment argument: " + e);
        }
        return this.format(), (this.raw = this.version), this;
      }),
      (t.inc = function (e, t, n, r) {
        "string" == typeof n && ((r = n), (n = void 0));
        try {
          return new $(e, n).inc(t, r).version;
        } catch (e) {
          return null;
        }
      }),
      (t.diff = function (e, t) {
        if (X(e, t)) return null;
        var n = G(e),
          r = G(t),
          i = "";
        if (n.prerelease.length || r.prerelease.length) {
          i = "pre";
          var o = "prerelease";
        }
        for (var s in n)
          if (
            ("major" === s || "minor" === s || "patch" === s) &&
            n[s] !== r[s]
          )
            return i + s;
        return o;
      }),
      (t.compareIdentifiers = K);
    var q = /^[0-9]+$/;
    function K(e, t) {
      var n = q.test(e),
        r = q.test(t);
      return (
        n && r && ((e = +e), (t = +t)),
        e === t ? 0 : n && !r ? -1 : r && !n ? 1 : e < t ? -1 : 1
      );
    }
    function Y(e, t, n) {
      return new $(e, n).compare(new $(t, n));
    }
    function Q(e, t, n) {
      return Y(e, t, n) > 0;
    }
    function Z(e, t, n) {
      return Y(e, t, n) < 0;
    }
    function X(e, t, n) {
      return 0 === Y(e, t, n);
    }
    function J(e, t, n) {
      return 0 !== Y(e, t, n);
    }
    function ee(e, t, n) {
      return Y(e, t, n) >= 0;
    }
    function te(e, t, n) {
      return Y(e, t, n) <= 0;
    }
    function ne(e, t, n, r) {
      switch (t) {
        case "===":
          return (
            "object" == typeof e && (e = e.version),
            "object" == typeof n && (n = n.version),
            e === n
          );
        case "!==":
          return (
            "object" == typeof e && (e = e.version),
            "object" == typeof n && (n = n.version),
            e !== n
          );
        case "":
        case "=":
        case "==":
          return X(e, n, r);
        case "!=":
          return J(e, n, r);
        case ">":
          return Q(e, n, r);
        case ">=":
          return ee(e, n, r);
        case "<":
          return Z(e, n, r);
        case "<=":
          return te(e, n, r);
        default:
          throw new TypeError("Invalid operator: " + t);
      }
    }
    function re(e, t) {
      if (
        ((t && "object" == typeof t) ||
          (t = { loose: !!t, includePrerelease: !1 }),
        e instanceof re)
      ) {
        if (e.loose === !!t.loose) return e;
        e = e.value;
      }
      if (!(this instanceof re)) return new re(e, t);
      n("comparator", e, t),
        (this.options = t),
        (this.loose = !!t.loose),
        this.parse(e),
        this.semver === ie
          ? (this.value = "")
          : (this.value = this.operator + this.semver.version),
        n("comp", this);
    }
    (t.rcompareIdentifiers = function (e, t) {
      return K(t, e);
    }),
      (t.major = function (e, t) {
        return new $(e, t).major;
      }),
      (t.minor = function (e, t) {
        return new $(e, t).minor;
      }),
      (t.patch = function (e, t) {
        return new $(e, t).patch;
      }),
      (t.compare = Y),
      (t.compareLoose = function (e, t) {
        return Y(e, t, !0);
      }),
      (t.rcompare = function (e, t, n) {
        return Y(t, e, n);
      }),
      (t.sort = function (e, n) {
        return e.sort(function (e, r) {
          return t.compare(e, r, n);
        });
      }),
      (t.rsort = function (e, n) {
        return e.sort(function (e, r) {
          return t.rcompare(e, r, n);
        });
      }),
      (t.gt = Q),
      (t.lt = Z),
      (t.eq = X),
      (t.neq = J),
      (t.gte = ee),
      (t.lte = te),
      (t.cmp = ne),
      (t.Comparator = re);
    var ie = {};
    function oe(e, t) {
      if (
        ((t && "object" == typeof t) ||
          (t = { loose: !!t, includePrerelease: !1 }),
        e instanceof oe)
      )
        return e.loose === !!t.loose &&
          e.includePrerelease === !!t.includePrerelease
          ? e
          : new oe(e.raw, t);
      if (e instanceof re) return new oe(e.value, t);
      if (!(this instanceof oe)) return new oe(e, t);
      if (
        ((this.options = t),
        (this.loose = !!t.loose),
        (this.includePrerelease = !!t.includePrerelease),
        (this.raw = e),
        (this.set = e
          .split(/\s*\|\|\s*/)
          .map(function (e) {
            return this.parseRange(e.trim());
          }, this)
          .filter(function (e) {
            return e.length;
          })),
        !this.set.length)
      )
        throw new TypeError("Invalid SemVer Range: " + e);
      this.format();
    }
    function se(e) {
      return !e || "x" === e.toLowerCase() || "*" === e;
    }
    function ae(e, t, n, r, i, o, s, a, l, c, u, h, d) {
      return (
        (t = se(n)
          ? ""
          : se(r)
          ? ">=" + n + ".0.0"
          : se(i)
          ? ">=" + n + "." + r + ".0"
          : ">=" + t) +
        " " +
        (a = se(l)
          ? ""
          : se(c)
          ? "<" + (+l + 1) + ".0.0"
          : se(u)
          ? "<" + l + "." + (+c + 1) + ".0"
          : h
          ? "<=" + l + "." + c + "." + u + "-" + h
          : "<=" + a)
      ).trim();
    }
    function le(e, t, r) {
      for (var i = 0; i < e.length; i++) if (!e[i].test(t)) return !1;
      if (t.prerelease.length && !r.includePrerelease) {
        for (i = 0; i < e.length; i++)
          if (
            (n(e[i].semver),
            e[i].semver !== ie && e[i].semver.prerelease.length > 0)
          ) {
            var o = e[i].semver;
            if (
              o.major === t.major &&
              o.minor === t.minor &&
              o.patch === t.patch
            )
              return !0;
          }
        return !1;
      }
      return !0;
    }
    function ce(e, t, n) {
      try {
        t = new oe(t, n);
      } catch (e) {
        return !1;
      }
      return t.test(e);
    }
    function ue(e, t, n, r) {
      var i, o, s, a, l;
      switch (((e = new $(e, r)), (t = new oe(t, r)), n)) {
        case ">":
          (i = Q), (o = te), (s = Z), (a = ">"), (l = ">=");
          break;
        case "<":
          (i = Z), (o = ee), (s = Q), (a = "<"), (l = "<=");
          break;
        default:
          throw new TypeError('Must provide a hilo val of "<" or ">"');
      }
      if (ce(e, t, r)) return !1;
      for (var c = 0; c < t.set.length; ++c) {
        var u = t.set[c],
          h = null,
          d = null;
        if (
          (u.forEach(function (e) {
            e.semver === ie && (e = new re(">=0.0.0")),
              (h = h || e),
              (d = d || e),
              i(e.semver, h.semver, r)
                ? (h = e)
                : s(e.semver, d.semver, r) && (d = e);
          }),
          h.operator === a || h.operator === l)
        )
          return !1;
        if ((!d.operator || d.operator === a) && o(e, d.semver)) return !1;
        if (d.operator === l && s(e, d.semver)) return !1;
      }
      return !0;
    }
    (re.prototype.parse = function (e) {
      var t = this.options.loose ? i[B] : i[H],
        n = e.match(t);
      if (!n) throw new TypeError("Invalid comparator: " + e);
      (this.operator = n[1]),
        "=" === this.operator && (this.operator = ""),
        n[2]
          ? (this.semver = new $(n[2], this.options.loose))
          : (this.semver = ie);
    }),
      (re.prototype.toString = function () {
        return this.value;
      }),
      (re.prototype.test = function (e) {
        return (
          n("Comparator.test", e, this.options.loose),
          this.semver === ie ||
            ("string" == typeof e && (e = new $(e, this.options)),
            ne(e, this.operator, this.semver, this.options))
        );
      }),
      (re.prototype.intersects = function (e, t) {
        if (!(e instanceof re)) throw new TypeError("a Comparator is required");
        var n;
        if (
          ((t && "object" == typeof t) ||
            (t = { loose: !!t, includePrerelease: !1 }),
          "" === this.operator)
        )
          return (n = new oe(e.value, t)), ce(this.value, n, t);
        if ("" === e.operator)
          return (n = new oe(this.value, t)), ce(e.semver, n, t);
        var r = !(
            (">=" !== this.operator && ">" !== this.operator) ||
            (">=" !== e.operator && ">" !== e.operator)
          ),
          i = !(
            ("<=" !== this.operator && "<" !== this.operator) ||
            ("<=" !== e.operator && "<" !== e.operator)
          ),
          o = this.semver.version === e.semver.version,
          s = !(
            (">=" !== this.operator && "<=" !== this.operator) ||
            (">=" !== e.operator && "<=" !== e.operator)
          ),
          a =
            ne(this.semver, "<", e.semver, t) &&
            (">=" === this.operator || ">" === this.operator) &&
            ("<=" === e.operator || "<" === e.operator),
          l =
            ne(this.semver, ">", e.semver, t) &&
            ("<=" === this.operator || "<" === this.operator) &&
            (">=" === e.operator || ">" === e.operator);
        return r || i || (o && s) || a || l;
      }),
      (t.Range = oe),
      (oe.prototype.format = function () {
        return (
          (this.range = this.set
            .map(function (e) {
              return e.join(" ").trim();
            })
            .join("||")
            .trim()),
          this.range
        );
      }),
      (oe.prototype.toString = function () {
        return this.range;
      }),
      (oe.prototype.parseRange = function (e) {
        var t = this.options.loose;
        e = e.trim();
        var r = t ? i[W] : i[U];
        (e = e.replace(r, ae)),
          n("hyphen replace", e),
          (e = e.replace(i[z], "$1$2$3")),
          n("comparator trim", e, i[z]),
          (e = (e = (e = e.replace(i[M], "$1~")).replace(i[L], "$1^"))
            .split(/\s+/)
            .join(" "));
        var o = t ? i[B] : i[H],
          s = e
            .split(" ")
            .map(function (e) {
              return (function (e, t) {
                return (
                  n("comp", e, t),
                  (e = (function (e, t) {
                    return e
                      .trim()
                      .split(/\s+/)
                      .map(function (e) {
                        return (function (e, t) {
                          n("caret", e, t);
                          var r = t.loose ? i[N] : i[F];
                          return e.replace(r, function (t, r, i, o, s) {
                            var a;
                            return (
                              n("caret", e, t, r, i, o, s),
                              se(r)
                                ? (a = "")
                                : se(i)
                                ? (a = ">=" + r + ".0.0 <" + (+r + 1) + ".0.0")
                                : se(o)
                                ? (a =
                                    "0" === r
                                      ? ">=" +
                                        r +
                                        "." +
                                        i +
                                        ".0 <" +
                                        r +
                                        "." +
                                        (+i + 1) +
                                        ".0"
                                      : ">=" +
                                        r +
                                        "." +
                                        i +
                                        ".0 <" +
                                        (+r + 1) +
                                        ".0.0")
                                : s
                                ? (n("replaceCaret pr", s),
                                  (a =
                                    "0" === r
                                      ? "0" === i
                                        ? ">=" +
                                          r +
                                          "." +
                                          i +
                                          "." +
                                          o +
                                          "-" +
                                          s +
                                          " <" +
                                          r +
                                          "." +
                                          i +
                                          "." +
                                          (+o + 1)
                                        : ">=" +
                                          r +
                                          "." +
                                          i +
                                          "." +
                                          o +
                                          "-" +
                                          s +
                                          " <" +
                                          r +
                                          "." +
                                          (+i + 1) +
                                          ".0"
                                      : ">=" +
                                        r +
                                        "." +
                                        i +
                                        "." +
                                        o +
                                        "-" +
                                        s +
                                        " <" +
                                        (+r + 1) +
                                        ".0.0"))
                                : (n("no pr"),
                                  (a =
                                    "0" === r
                                      ? "0" === i
                                        ? ">=" +
                                          r +
                                          "." +
                                          i +
                                          "." +
                                          o +
                                          " <" +
                                          r +
                                          "." +
                                          i +
                                          "." +
                                          (+o + 1)
                                        : ">=" +
                                          r +
                                          "." +
                                          i +
                                          "." +
                                          o +
                                          " <" +
                                          r +
                                          "." +
                                          (+i + 1) +
                                          ".0"
                                      : ">=" +
                                        r +
                                        "." +
                                        i +
                                        "." +
                                        o +
                                        " <" +
                                        (+r + 1) +
                                        ".0.0")),
                              n("caret return", a),
                              a
                            );
                          });
                        })(e, t);
                      })
                      .join(" ");
                  })(e, t)),
                  n("caret", e),
                  (e = (function (e, t) {
                    return e
                      .trim()
                      .split(/\s+/)
                      .map(function (e) {
                        return (function (e, t) {
                          var r = t.loose ? i[I] : i[P];
                          return e.replace(r, function (t, r, i, o, s) {
                            var a;
                            return (
                              n("tilde", e, t, r, i, o, s),
                              se(r)
                                ? (a = "")
                                : se(i)
                                ? (a = ">=" + r + ".0.0 <" + (+r + 1) + ".0.0")
                                : se(o)
                                ? (a =
                                    ">=" +
                                    r +
                                    "." +
                                    i +
                                    ".0 <" +
                                    r +
                                    "." +
                                    (+i + 1) +
                                    ".0")
                                : s
                                ? (n("replaceTilde pr", s),
                                  (a =
                                    ">=" +
                                    r +
                                    "." +
                                    i +
                                    "." +
                                    o +
                                    "-" +
                                    s +
                                    " <" +
                                    r +
                                    "." +
                                    (+i + 1) +
                                    ".0"))
                                : (a =
                                    ">=" +
                                    r +
                                    "." +
                                    i +
                                    "." +
                                    o +
                                    " <" +
                                    r +
                                    "." +
                                    (+i + 1) +
                                    ".0"),
                              n("tilde return", a),
                              a
                            );
                          });
                        })(e, t);
                      })
                      .join(" ");
                  })(e, t)),
                  n("tildes", e),
                  (e = (function (e, t) {
                    return (
                      n("replaceXRanges", e, t),
                      e
                        .split(/\s+/)
                        .map(function (e) {
                          return (function (e, t) {
                            e = e.trim();
                            var r = t.loose ? i[D] : i[T];
                            return e.replace(r, function (t, r, i, o, s, a) {
                              n("xRange", e, t, r, i, o, s, a);
                              var l = se(i),
                                c = l || se(o),
                                u = c || se(s);
                              return (
                                "=" === r && u && (r = ""),
                                l
                                  ? (t =
                                      ">" === r || "<" === r ? "<0.0.0" : "*")
                                  : r && u
                                  ? (c && (o = 0),
                                    (s = 0),
                                    ">" === r
                                      ? ((r = ">="),
                                        c
                                          ? ((i = +i + 1), (o = 0), (s = 0))
                                          : ((o = +o + 1), (s = 0)))
                                      : "<=" === r &&
                                        ((r = "<"),
                                        c ? (i = +i + 1) : (o = +o + 1)),
                                    (t = r + i + "." + o + "." + s))
                                  : c
                                  ? (t =
                                      ">=" + i + ".0.0 <" + (+i + 1) + ".0.0")
                                  : u &&
                                    (t =
                                      ">=" +
                                      i +
                                      "." +
                                      o +
                                      ".0 <" +
                                      i +
                                      "." +
                                      (+o + 1) +
                                      ".0"),
                                n("xRange return", t),
                                t
                              );
                            });
                          })(e, t);
                        })
                        .join(" ")
                    );
                  })(e, t)),
                  n("xrange", e),
                  (e = (function (e, t) {
                    return n("replaceStars", e, t), e.trim().replace(i[j], "");
                  })(e, t)),
                  n("stars", e),
                  e
                );
              })(e, this.options);
            }, this)
            .join(" ")
            .split(/\s+/);
        return (
          this.options.loose &&
            (s = s.filter(function (e) {
              return !!e.match(o);
            })),
          (s = s.map(function (e) {
            return new re(e, this.options);
          }, this))
        );
      }),
      (oe.prototype.intersects = function (e, t) {
        if (!(e instanceof oe)) throw new TypeError("a Range is required");
        return this.set.some(function (n) {
          return n.every(function (n) {
            return e.set.some(function (e) {
              return e.every(function (e) {
                return n.intersects(e, t);
              });
            });
          });
        });
      }),
      (t.toComparators = function (e, t) {
        return new oe(e, t).set.map(function (e) {
          return e
            .map(function (e) {
              return e.value;
            })
            .join(" ")
            .trim()
            .split(" ");
        });
      }),
      (oe.prototype.test = function (e) {
        if (!e) return !1;
        "string" == typeof e && (e = new $(e, this.options));
        for (var t = 0; t < this.set.length; t++)
          if (le(this.set[t], e, this.options)) return !0;
        return !1;
      }),
      (t.satisfies = ce),
      (t.maxSatisfying = function (e, t, n) {
        var r = null,
          i = null;
        try {
          var o = new oe(t, n);
        } catch (e) {
          return null;
        }
        return (
          e.forEach(function (e) {
            o.test(e) &&
              ((r && -1 !== i.compare(e)) || (i = new $((r = e), n)));
          }),
          r
        );
      }),
      (t.minSatisfying = function (e, t, n) {
        var r = null,
          i = null;
        try {
          var o = new oe(t, n);
        } catch (e) {
          return null;
        }
        return (
          e.forEach(function (e) {
            o.test(e) && ((r && 1 !== i.compare(e)) || (i = new $((r = e), n)));
          }),
          r
        );
      }),
      (t.minVersion = function (e, t) {
        e = new oe(e, t);
        var n = new $("0.0.0");
        if (e.test(n)) return n;
        if (((n = new $("0.0.0-0")), e.test(n))) return n;
        n = null;
        for (var r = 0; r < e.set.length; ++r) {
          e.set[r].forEach(function (e) {
            var t = new $(e.semver.version);
            switch (e.operator) {
              case ">":
                0 === t.prerelease.length ? t.patch++ : t.prerelease.push(0),
                  (t.raw = t.format());
              case "":
              case ">=":
                (n && !Q(n, t)) || (n = t);
                break;
              case "<":
              case "<=":
                break;
              default:
                throw new Error("Unexpected operation: " + e.operator);
            }
          });
        }
        if (n && e.test(n)) return n;
        return null;
      }),
      (t.validRange = function (e, t) {
        try {
          return new oe(e, t).range || "*";
        } catch (e) {
          return null;
        }
      }),
      (t.ltr = function (e, t, n) {
        return ue(e, t, "<", n);
      }),
      (t.gtr = function (e, t, n) {
        return ue(e, t, ">", n);
      }),
      (t.outside = ue),
      (t.prerelease = function (e, t) {
        var n = G(e, t);
        return n && n.prerelease.length ? n.prerelease : null;
      }),
      (t.intersects = function (e, t, n) {
        return (e = new oe(e, n)), (t = new oe(t, n)), e.intersects(t);
      }),
      (t.coerce = function (e) {
        if (e instanceof $) return e;
        if ("string" != typeof e) return null;
        var t = e.match(i[A]);
        if (null == t) return null;
        return G(t[1] + "." + (t[2] || "0") + "." + (t[3] || "0"));
      });
  },
  function (e, t, n) {
    "use strict";
    function r(e, t) {
      return Object.assign(new Error(`${t} ${e.command} ENOENT`), {
        code: "ENOENT",
        errno: "ENOENT",
        syscall: `${t} ${e.command}`,
        path: e.command,
        spawnargs: e.args,
      });
    }
    function i(e, t) {
      return 1 !== e || t.file ? null : r(t.original, "spawn");
    }
    e.exports = {
      hookChildProcess: function (e, t) {
        const n = e.emit;
        e.emit = function (r, o) {
          if ("exit" === r) {
            const r = i(o, t);
            if (r) return n.call(e, "error", r);
          }
          return n.apply(e, arguments);
        };
      },
      verifyENOENT: i,
      verifyENOENTSync: function (e, t) {
        return 1 !== e || t.file ? null : r(t.original, "spawnSync");
      },
      notFoundError: r,
    };
  },
  function (e, t, n) {
    "use strict";
    const r = n(1),
      i = n(211);
    (e.exports = (e) => {
      let t;
      e = Object.assign({ cwd: process.cwd(), path: process.env[i()] }, e);
      let n = r.resolve(e.cwd);
      const o = [];
      for (; t !== n; )
        o.push(r.join(n, "node_modules/.bin")),
          (t = n),
          (n = r.resolve(n, ".."));
      return (
        o.push(r.dirname(process.execPath)), o.concat(e.path).join(r.delimiter)
      );
    }),
      (e.exports.env = (t) => {
        t = Object.assign({ env: process.env }, t);
        const n = Object.assign({}, t.env),
          r = i({ env: n });
        return (t.path = n[r]), (n[r] = e.exports(t)), n;
      });
  },
  function (e, t, n) {
    "use strict";
    e.exports = (e) => {
      const t = (e = e || {}).env || process.env;
      return "win32" !== (e.platform || "win32")
        ? "PATH"
        : Object.keys(t).find((e) => "PATH" === e.toUpperCase()) || "Path";
    };
  },
  function (e, t, n) {
    "use strict";
    const r = n(213),
      i = n(216);
    class o extends Error {
      constructor() {
        super("maxBuffer exceeded"), (this.name = "MaxBufferError");
      }
    }
    function s(e, t) {
      if (!e) return Promise.reject(new Error("Expected a stream"));
      t = Object.assign({ maxBuffer: 1 / 0 }, t);
      const { maxBuffer: n } = t;
      let s;
      return new Promise((a, l) => {
        const c = (e) => {
          e && (e.bufferedData = s.getBufferedValue()), l(e);
        };
        (s = r(e, i(t), (e) => {
          e ? c(e) : a();
        })),
          s.on("data", () => {
            s.getBufferedLength() > n && c(new o());
          });
      }).then(() => s.getBufferedValue());
    }
    (e.exports = s),
      (e.exports.buffer = (e, t) =>
        s(e, Object.assign({}, t, { encoding: "buffer" }))),
      (e.exports.array = (e, t) => s(e, Object.assign({}, t, { array: !0 }))),
      (e.exports.MaxBufferError = o);
  },
  function (e, t, n) {
    var r = n(107),
      i = n(215),
      o = n(8),
      s = function () {},
      a = /^v?\.0/.test(process.version),
      l = function (e) {
        return "function" == typeof e;
      },
      c = function (e, t, n, c) {
        c = r(c);
        var u = !1;
        e.on("close", function () {
          u = !0;
        }),
          i(e, { readable: t, writable: n }, function (e) {
            if (e) return c(e);
            (u = !0), c();
          });
        var h = !1;
        return function (t) {
          if (!u && !h)
            return (
              (h = !0),
              (function (e) {
                return (
                  !!a &&
                  !!o &&
                  (e instanceof (o.ReadStream || s) ||
                    e instanceof (o.WriteStream || s)) &&
                  l(e.close)
                );
              })(e)
                ? e.close(s)
                : (function (e) {
                    return e.setHeader && l(e.abort);
                  })(e)
                ? e.abort()
                : l(e.destroy)
                ? e.destroy()
                : void c(t || new Error("stream was destroyed"))
            );
        };
      },
      u = function (e) {
        e();
      },
      h = function (e, t) {
        return e.pipe(t);
      };
    e.exports = function () {
      var e,
        t = Array.prototype.slice.call(arguments),
        n = (l(t[t.length - 1] || s) && t.pop()) || s;
      if ((Array.isArray(t[0]) && (t = t[0]), t.length < 2))
        throw new Error("pump requires two streams per minimum");
      var r = t.map(function (i, o) {
        var s = o < t.length - 1;
        return c(i, s, o > 0, function (t) {
          e || (e = t), t && r.forEach(u), s || (r.forEach(u), n(e));
        });
      });
      return t.reduce(h);
    };
  },
  function (e, t) {
    e.exports = function e(t, n) {
      if (t && n) return e(t)(n);
      if ("function" != typeof t) throw new TypeError("need wrapper function");
      return (
        Object.keys(t).forEach(function (e) {
          r[e] = t[e];
        }),
        r
      );
      function r() {
        for (var e = new Array(arguments.length), n = 0; n < e.length; n++)
          e[n] = arguments[n];
        var r = t.apply(this, e),
          i = e[e.length - 1];
        return (
          "function" == typeof r &&
            r !== i &&
            Object.keys(i).forEach(function (e) {
              r[e] = i[e];
            }),
          r
        );
      }
    };
  },
  function (e, t, n) {
    var r = n(107),
      i = function () {},
      o = function (e, t, n) {
        if ("function" == typeof t) return o(e, null, t);
        t || (t = {}), (n = r(n || i));
        var s = e._writableState,
          a = e._readableState,
          l = t.readable || (!1 !== t.readable && e.readable),
          c = t.writable || (!1 !== t.writable && e.writable),
          u = function () {
            e.writable || h();
          },
          h = function () {
            (c = !1), l || n.call(e);
          },
          d = function () {
            (l = !1), c || n.call(e);
          },
          p = function (t) {
            n.call(e, t ? new Error("exited with error code: " + t) : null);
          },
          f = function (t) {
            n.call(e, t);
          },
          m = function () {
            return (!l || (a && a.ended)) && (!c || (s && s.ended))
              ? void 0
              : n.call(e, new Error("premature close"));
          },
          g = function () {
            e.req.on("finish", h);
          };
        return (
          !(function (e) {
            return e.setHeader && "function" == typeof e.abort;
          })(e)
            ? c && !s && (e.on("end", u), e.on("close", u))
            : (e.on("complete", h),
              e.on("abort", m),
              e.req ? g() : e.on("request", g)),
          (function (e) {
            return e.stdio && Array.isArray(e.stdio) && 3 === e.stdio.length;
          })(e) && e.on("exit", p),
          e.on("end", d),
          e.on("finish", h),
          !1 !== t.error && e.on("error", f),
          e.on("close", m),
          function () {
            e.removeListener("complete", h),
              e.removeListener("abort", m),
              e.removeListener("request", g),
              e.req && e.req.removeListener("finish", h),
              e.removeListener("end", u),
              e.removeListener("close", u),
              e.removeListener("finish", h),
              e.removeListener("exit", p),
              e.removeListener("end", d),
              e.removeListener("error", f),
              e.removeListener("close", m);
          }
        );
      };
    e.exports = o;
  },
  function (e, t, n) {
    "use strict";
    const { PassThrough: r } = n(47);
    e.exports = (e) => {
      e = Object.assign({}, e);
      const { array: t } = e;
      let { encoding: n } = e;
      const i = "buffer" === n;
      let o = !1;
      t ? (o = !(n || i)) : (n = n || "utf8"), i && (n = null);
      let s = 0;
      const a = [],
        l = new r({ objectMode: o });
      return (
        n && l.setEncoding(n),
        l.on("data", (e) => {
          a.push(e), o ? (s = a.length) : (s += e.length);
        }),
        (l.getBufferedValue = () =>
          t ? a : i ? Buffer.concat(a, s) : a.join("")),
        (l.getBufferedLength = () => s),
        l
      );
    };
  },
  function (e, t, n) {
    "use strict";
    e.exports = (e, t) => (
      (t = t || (() => {})),
      e.then(
        (e) =>
          new Promise((e) => {
            e(t());
          }).then(() => e),
        (e) =>
          new Promise((e) => {
            e(t());
          }).then(() => {
            throw e;
          })
      )
    );
  },
  function (e, t, n) {
    var r,
      i = n(48),
      o = n(219),
      s = n(65);
    function a() {
      u &&
        ((u = !1),
        o.forEach(function (e) {
          try {
            process.removeListener(e, c[e]);
          } catch (e) {}
        }),
        (process.emit = f),
        (process.reallyExit = d),
        (r.count -= 1));
    }
    function l(e, t, n) {
      r.emitted[e] || ((r.emitted[e] = !0), r.emit(e, t, n));
    }
    "function" != typeof s && (s = s.EventEmitter),
      process.__signal_exit_emitter__
        ? (r = process.__signal_exit_emitter__)
        : (((r = process.__signal_exit_emitter__ = new s()).count = 0),
          (r.emitted = {})),
      r.infinite || (r.setMaxListeners(1 / 0), (r.infinite = !0)),
      (e.exports = function (e, t) {
        i.equal(
          typeof e,
          "function",
          "a callback must be provided for exit handler"
        ),
          !1 === u && h();
        var n = "exit";
        t && t.alwaysLast && (n = "afterexit");
        return (
          r.on(n, e),
          function () {
            r.removeListener(n, e),
              0 === r.listeners("exit").length &&
                0 === r.listeners("afterexit").length &&
                a();
          }
        );
      }),
      (e.exports.unload = a);
    var c = {};
    o.forEach(function (e) {
      c[e] = function () {
        process.listeners(e).length === r.count &&
          (a(),
          l("exit", null, e),
          l("afterexit", null, e),
          process.kill(process.pid, e));
      };
    }),
      (e.exports.signals = function () {
        return o;
      }),
      (e.exports.load = h);
    var u = !1;
    function h() {
      u ||
        ((u = !0),
        (r.count += 1),
        (o = o.filter(function (e) {
          try {
            return process.on(e, c[e]), !0;
          } catch (e) {
            return !1;
          }
        })),
        (process.emit = m),
        (process.reallyExit = p));
    }
    var d = process.reallyExit;
    function p(e) {
      (process.exitCode = e || 0),
        l("exit", process.exitCode, null),
        l("afterexit", process.exitCode, null),
        d.call(process, process.exitCode);
    }
    var f = process.emit;
    function m(e, t) {
      if ("exit" === e) {
        void 0 !== t && (process.exitCode = t);
        var n = f.apply(this, arguments);
        return (
          l("exit", process.exitCode, null),
          l("afterexit", process.exitCode, null),
          n
        );
      }
      return f.apply(this, arguments);
    }
  },
  function (e, t, n) {
    e.exports = ["SIGABRT", "SIGALRM", "SIGHUP", "SIGINT", "SIGTERM"];
  },
  function (e, t, n) {
    "use strict";
    const r = n(39);
    let i;
    if ("function" == typeof r.getSystemErrorName)
      e.exports = r.getSystemErrorName;
    else {
      try {
        if (((i = process.binding("uv")), "function" != typeof i.errname))
          throw new TypeError("uv.errname is not a function");
      } catch (e) {
        console.error(
          "execa/lib/errname: unable to establish process.binding('uv')",
          e
        ),
          (i = null);
      }
      e.exports = (e) => o(i, e);
    }
    function o(e, t) {
      if (e) return e.errname(t);
      if (!(t < 0)) throw new Error("err >= 0");
      return "Unknown system error " + t;
    }
    e.exports.__test__ = o;
  },
  function (e, t, n) {
    "use strict";
    const r = ["stdin", "stdout", "stderr"];
    e.exports = (e) => {
      if (!e) return null;
      if (e.stdio && ((e) => r.some((t) => Boolean(e[t])))(e))
        throw new Error(
          "It's not possible to provide `stdio` in combination with one of " +
            r.map((e) => `\`${e}\``).join(", ")
        );
      if ("string" == typeof e.stdio) return e.stdio;
      const t = e.stdio || [];
      if (!Array.isArray(t))
        throw new TypeError(
          `Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof t}\``
        );
      const n = [],
        i = Math.max(t.length, r.length);
      for (let o = 0; o < i; o++) {
        let i = null;
        void 0 !== t[o] ? (i = t[o]) : void 0 !== e[r[o]] && (i = e[r[o]]),
          (n[o] = i);
      }
      return n;
    };
  },
  function (e, t, n) {
    "use strict";
    Object.defineProperty(t, "__esModule", { value: !0 }),
      (t.enumerateKeysSafe = t.enumerateKeys = t.enumerateValuesSafe = t.enumerateValues = t.HKEY = t.RegistryValueType = void 0);
    const r = n(223);
    var i;
    function o(e) {
      return e === i.HKEY_CLASSES_ROOT
        ? 2147483648
        : e === i.HKEY_CURRENT_USER
        ? 2147483649
        : e === i.HKEY_LOCAL_MACHINE
        ? 2147483650
        : e === i.HKEY_USERS
        ? 2147483651
        : e === i.HKEY_PERFORMANCE_DATA
        ? 2147483652
        : e === i.HKEY_CURRENT_CONFIG
        ? 2147483653
        : e === i.HKEY_DYN_DATA
        ? 2147483654
        : e === i.HKEY_CURRENT_USER_LOCAL_SETTINGS
        ? 2147483655
        : e === i.HKEY_PERFORMANCE_TEXT
        ? 2147483728
        : e === i.HKEY_PERFORMANCE_NLSTEXT
        ? 2147483744
        : (function (e, t) {
            throw new Error(t);
          })(0, "The key does not map to an expected number value");
    }
    function s(e, t) {
      if (!r) return [];
      const n = o(e);
      return r.readValues(n, t);
    }
    function a(e, t) {
      if (!r) return [];
      const n = o(e);
      return r.enumKeys(n, t);
    }
    !(function (e) {
      (e.REG_BINARY = "REG_BINARY"),
        (e.REG_DWORD = "REG_DWORD"),
        (e.REG_DWORD_LITTLE_ENDIAN = "REG_DWORD_LITTLE_ENDIAN"),
        (e.REG_DWORD_BIG_ENDIAN = "REG_DWORD_BIG_ENDIAN"),
        (e.REG_EXPAND_SZ = "REG_EXPAND_SZ"),
        (e.REG_LINK = "REG_LINK"),
        (e.REG_MULTI_SZ = "REG_MULTI_SZ"),
        (e.REG_NONE = "REG_NONE"),
        (e.REG_QWORD = "REG_QWORD"),
        (e.REG_QWORD_LITTLE_ENDIAN = "REG_QWORD_LITTLE_ENDIAN"),
        (e.REG_SZ = "REG_SZ");
    })(t.RegistryValueType || (t.RegistryValueType = {})),
      (function (e) {
        (e.HKEY_CLASSES_ROOT = "HKEY_CLASSES_ROOT"),
          (e.HKEY_CURRENT_CONFIG = "HKEY_CURRENT_CONFIG"),
          (e.HKEY_DYN_DATA = "HKEY_DYN_DATA"),
          (e.HKEY_CURRENT_USER_LOCAL_SETTINGS =
            "HKEY_CURRENT_USER_LOCAL_SETTINGS"),
          (e.HKEY_CURRENT_USER = "HKEY_CURRENT_USER"),
          (e.HKEY_LOCAL_MACHINE = "HKEY_LOCAL_MACHINE"),
          (e.HKEY_PERFORMANCE_DATA = "HKEY_PERFORMANCE_DATA"),
          (e.HKEY_PERFORMANCE_TEXT = "HKEY_PERFORMANCE_TEXT"),
          (e.HKEY_PERFORMANCE_NLSTEXT = "HKEY_PERFORMANCE_NLSTEXT"),
          (e.HKEY_USERS = "HKEY_USERS");
      })((i = t.HKEY || (t.HKEY = {}))),
      (t.enumerateValues = s),
      (t.enumerateValuesSafe = function (e, t) {
        try {
          return s(e, t);
        } catch (e) {
          return [];
        }
      }),
      (t.enumerateKeys = a),
      (t.enumerateKeysSafe = function (e, t) {
        try {
          return a(e, t);
        } catch (e) {
          return [];
        }
      });
  },
  function (e, t, n) {
    (function (e) {
      const t = n(1).join(__dirname, "registry.node");
      try {
        global.process.dlopen(e, t);
      } catch (e) {
        throw new Error("Cannot open " + t + ": " + e);
      }
    }.call(this, n(46)(e)));
  },
  function (e, t, n) {
    "use strict";
    Object.defineProperty(t, "__esModule", { value: !0 });
    const r = n(8),
      i = n(7),
      o = n(108),
      s = n(225);
    class a {
      static pathExists(e) {
        try {
          return r.accessSync(e, r.F_OK), !0;
        } catch (e) {
          return !1;
        }
      }
      static spawn(e, t, n) {
        let r = {};
        n && n.env && (r = n.env);
        const { env: o, gitLocation: a } = s.setupEnvironment(r),
          c = { env: o, cwd: t },
          u = i.spawn(a, e, c);
        return l(u), u;
      }
      static exec(e, t, n) {
        return new Promise(function (r, c) {
          let u = {};
          n && n.env && (u = n.env);
          const { env: h, gitLocation: d } = s.setupEnvironment(u),
            p = {
              cwd: t,
              encoding: "utf8",
              maxBuffer: n ? n.maxBuffer : 10485760,
              env: h,
            },
            f = i.execFile(d, e, p, function (e, n, i) {
              if (!e) return void r({ stdout: n, stderr: i, exitCode: 0 });
              let s = e.code;
              if ("string" != typeof s)
                "number" != typeof s
                  ? "stdout maxBuffer exceeded" === e.message
                    ? c(
                        new Error(
                          `The output from the command could not fit into the allocated stdout buffer. Set options.maxBuffer to a larger value than ${p.maxBuffer} bytes`
                        )
                      )
                    : c(e)
                  : r({ stdout: n, stderr: i, exitCode: s });
              else if ("ENOENT" === s) {
                let n = e.message;
                !1 === a.pathExists(t)
                  ? ((n = "Unable to find path to repository on disk."),
                    (s = o.RepositoryDoesNotExistErrorCode))
                  : ((n = `Git could not be found at the expected path: '${d}'. This might be a problem with how the application is packaged, so confirm this folder hasn't been removed when packaging.`),
                    (s = o.GitNotFoundErrorCode));
                const r = new Error(n);
                (r.name = e.name), (r.code = s), c(r);
              } else c(e);
            });
          l(f),
            n && void 0 !== n.stdin && f.stdin.end(n.stdin, n.stdinEncoding),
            n && n.processCallback && n.processCallback(f);
        });
      }
      static parseError(e) {
        for (const [t, n] of Object.entries(o.GitErrorRegexes))
          if (e.match(t)) return n;
        return null;
      }
    }
    function l(e) {
      e.stdin &&
        e.stdin.on("error", (t) => {
          const n = t.code;
          if (
            "EPIPE" !== n &&
            "EOF" !== n &&
            "ECONNRESET" !== n &&
            e.stdin.listeners("error").length <= 1
          )
            throw t;
        });
    }
    t.GitProcess = a;
  },
  function (e, t, n) {
    "use strict";
    Object.defineProperty(t, "__esModule", { value: !0 });
    const r = n(1);
    function i() {
      return null != process.env.LOCAL_GIT_DIRECTORY
        ? r.resolve(process.env.LOCAL_GIT_DIRECTORY)
        : (function () {
            {
              const e = r.sep;
              return r
                .resolve(__dirname, "..", "..", "git")
                .replace(/[\\\/]app.asar[\\\/]/, `${e}app.asar.unpacked${e}`);
            }
          })();
    }
    function o() {
      if (null != process.env.GIT_EXEC_PATH)
        return r.resolve(process.env.GIT_EXEC_PATH);
      const e = i();
      return "x64" === process.arch
        ? r.join(e, "mingw64", "libexec", "git-core")
        : r.join(e, "mingw32", "libexec", "git-core");
    }
    t.setupEnvironment = function (e) {
      const t = (function () {
        const e = i();
        return r.join(e, "cmd", "git.exe");
      })();
      let n = process.env.PATH || "";
      const s = i();
      n =
        "x64" === process.arch
          ? `${s}\\mingw64\\bin;${s}\\mingw64\\usr\\bin;${n}`
          : `${s}\\mingw32\\bin;${s}\\mingw32\\usr\\bin;${n}`;
      const a = Object.assign(
        {},
        process.env,
        { GIT_EXEC_PATH: o(), PATH: n },
        e
      );
      return a.Path && delete a.Path, { env: a, gitLocation: t };
    };
  },
  function (e, t, n) {
    (function (e) {
      const t = n(1).join(__dirname, "keytar.node");
      try {
        global.process.dlopen(e, t);
      } catch (e) {
        throw new Error("Cannot open " + t + ": " + e);
      }
    }.call(this, n(46)(e)));
  },
  function (e, t) {
    e.exports = require("timers");
  },
  function (e, t, n) {
    var r = n(92),
      i = n(93),
      o = r(),
      s = [1 | o[0], o[1], o[2], o[3], o[4], o[5]],
      a = 16383 & ((o[6] << 8) | o[7]),
      l = 0,
      c = 0;
    e.exports = function (e, t, n) {
      var r = (t && n) || 0,
        o = t || [],
        u = void 0 !== (e = e || {}).clockseq ? e.clockseq : a,
        h = void 0 !== e.msecs ? e.msecs : new Date().getTime(),
        d = void 0 !== e.nsecs ? e.nsecs : c + 1,
        p = h - l + (d - c) / 1e4;
      if (
        (p < 0 && void 0 === e.clockseq && (u = (u + 1) & 16383),
        (p < 0 || h > l) && void 0 === e.nsecs && (d = 0),
        d >= 1e4)
      )
        throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");
      (l = h), (c = d), (a = u);
      var f = (1e4 * (268435455 & (h += 122192928e5)) + d) % 4294967296;
      (o[r++] = (f >>> 24) & 255),
        (o[r++] = (f >>> 16) & 255),
        (o[r++] = (f >>> 8) & 255),
        (o[r++] = 255 & f);
      var m = ((h / 4294967296) * 1e4) & 268435455;
      (o[r++] = (m >>> 8) & 255),
        (o[r++] = 255 & m),
        (o[r++] = ((m >>> 24) & 15) | 16),
        (o[r++] = (m >>> 16) & 255),
        (o[r++] = (u >>> 8) | 128),
        (o[r++] = 255 & u);
      for (var g = e.node || s, y = 0; y < 6; ++y) o[r + y] = g[y];
      return t || i(o);
    };
  },
  function (e, t) {
    "function" == typeof Object.create
      ? (e.exports = function (e, t) {
          (e.super_ = t),
            (e.prototype = Object.create(t.prototype, {
              constructor: {
                value: e,
                enumerable: !1,
                writable: !0,
                configurable: !0,
              },
            }));
        })
      : (e.exports = function (e, t) {
          e.super_ = t;
          var n = function () {};
          (n.prototype = t.prototype),
            (e.prototype = new n()),
            (e.prototype.constructor = e);
        });
  },
  function (e, t) {
    function n(e) {
      var t = [];
      for (var n in e) t.push(n);
      return t;
    }
    (e.exports = "function" == typeof Object.keys ? Object.keys : n).shim = n;
  },
  function (e, t) {
    var n =
      "[object Arguments]" ==
      (function () {
        return Object.prototype.toString.call(arguments);
      })();
    function r(e) {
      return "[object Arguments]" == Object.prototype.toString.call(e);
    }
    function i(e) {
      return (
        (e &&
          "object" == typeof e &&
          "number" == typeof e.length &&
          Object.prototype.hasOwnProperty.call(e, "callee") &&
          !Object.prototype.propertyIsEnumerable.call(e, "callee")) ||
        !1
      );
    }
    ((t = e.exports = n ? r : i).supported = r), (t.unsupported = i);
  },
  function (e, t, n) {
    "use strict";
    const r = (e, t) => {
      for (const n of Reflect.ownKeys(t))
        Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(t, n));
      return e;
    };
    (e.exports = r), (e.exports.default = r);
  },
  function (e, t, n) {
    "use strict";
    const r = (e) =>
      e instanceof Promise ||
      (null !== e &&
        "object" == typeof e &&
        "function" == typeof e.then &&
        "function" == typeof e.catch);
    (e.exports = r), (e.exports.default = r);
  },
  function (e, t, n) {
    "use strict";
    var r =
        (this && this.__awaiter) ||
        function (e, t, n, r) {
          return new (n || (n = Promise))(function (i, o) {
            function s(e) {
              try {
                l(r.next(e));
              } catch (e) {
                o(e);
              }
            }
            function a(e) {
              try {
                l(r.throw(e));
              } catch (e) {
                o(e);
              }
            }
            function l(e) {
              e.done
                ? i(e.value)
                : new n(function (t) {
                    t(e.value);
                  }).then(s, a);
            }
            l((r = r.apply(e, t || [])).next());
          });
        },
      i =
        (this && this.__importDefault) ||
        function (e) {
          return e && e.__esModule ? e : { default: e };
        };
    Object.defineProperty(t, "__esModule", { value: !0 });
    const o = i(n(235));
    function s(e, t = "maxAge") {
      let n, i, s;
      const a = () =>
          r(this, void 0, void 0, function* () {
            if (void 0 !== n) return;
            const a = (a) =>
              r(this, void 0, void 0, function* () {
                s = o.default();
                const r = a[1][t] - Date.now();
                return r <= 0
                  ? (e.delete(a[0]), void s.resolve())
                  : ((n = a[0]),
                    (i = setTimeout(() => {
                      e.delete(a[0]), s && s.resolve();
                    }, r)),
                    "function" == typeof i.unref && i.unref(),
                    s.promise);
              });
            try {
              for (const t of e) yield a(t);
            } catch (e) {}
            n = void 0;
          }),
        l = e.set.bind(e);
      return (
        (e.set = (t, r) => {
          e.has(t) && e.delete(t);
          const o = l(t, r);
          return (
            n &&
              n === t &&
              ((n = void 0),
              void 0 !== i && (clearTimeout(i), (i = void 0)),
              void 0 !== s && (s.reject(void 0), (s = void 0))),
            a(),
            o
          );
        }),
        a(),
        e
      );
    }
    (t.default = s), (e.exports = s), (e.exports.default = s);
  },
  function (e, t, n) {
    "use strict";
    e.exports = () => {
      const e = {};
      return (
        (e.promise = new Promise((t, n) => {
          (e.resolve = t), (e.reject = n);
        })),
        e
      );
    };
  },
  function (e, t, n) {
    "use strict";
    var r = n(237);
    function i() {}
    function o() {}
    (o.resetWarningCache = i),
      (e.exports = function () {
        function e(e, t, n, i, o, s) {
          if (s !== r) {
            var a = new Error(
              "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
            );
            throw ((a.name = "Invariant Violation"), a);
          }
        }
        function t() {
          return e;
        }
        e.isRequired = e;
        var n = {
          array: e,
          bool: e,
          func: e,
          number: e,
          object: e,
          string: e,
          symbol: e,
          any: e,
          arrayOf: t,
          element: e,
          elementType: e,
          instanceOf: t,
          node: e,
          objectOf: t,
          oneOf: t,
          oneOfType: t,
          shape: t,
          exact: t,
          checkPropTypes: o,
          resetWarningCache: i,
        };
        return (n.PropTypes = n), n;
      });
  },
  function (e, t, n) {
    "use strict";
    e.exports = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
  },
  function (e, t, n) {
    n(239), (e.exports = n(22).Object.assign);
  },
  function (e, t, n) {
    var r = n(29);
    r(r.S + r.F, "Object", { assign: n(241) });
  },
  function (e, t) {
    e.exports = function (e) {
      if ("function" != typeof e) throw TypeError(e + " is not a function!");
      return e;
    };
  },
  function (e, t, n) {
    "use strict";
    var r = n(42),
      i = n(72),
      o = n(53),
      s = n(54),
      a = n(113),
      l = Object.assign;
    e.exports =
      !l ||
      n(35)(function () {
        var e = {},
          t = {},
          n = Symbol(),
          r = "abcdefghijklmnopqrst";
        return (
          (e[n] = 7),
          r.split("").forEach(function (e) {
            t[e] = e;
          }),
          7 != l({}, e)[n] || Object.keys(l({}, t)).join("") != r
        );
      })
        ? function (e, t) {
            for (
              var n = s(e), l = arguments.length, c = 1, u = i.f, h = o.f;
              l > c;

            )
              for (
                var d,
                  p = a(arguments[c++]),
                  f = u ? r(p).concat(u(p)) : r(p),
                  m = f.length,
                  g = 0;
                m > g;

              )
                h.call(p, (d = f[g++])) && (n[d] = p[d]);
            return n;
          }
        : l;
  },
  function (e, t, n) {
    var r = n(33),
      i = n(243),
      o = n(244);
    e.exports = function (e) {
      return function (t, n, s) {
        var a,
          l = r(t),
          c = i(l.length),
          u = o(s, c);
        if (e && n != n) {
          for (; c > u; ) if ((a = l[u++]) != a) return !0;
        } else
          for (; c > u; u++)
            if ((e || u in l) && l[u] === n) return e || u || 0;
        return !e && -1;
      };
    };
  },
  function (e, t, n) {
    var r = n(68),
      i = Math.min;
    e.exports = function (e) {
      return e > 0 ? i(r(e), 9007199254740991) : 0;
    };
  },
  function (e, t, n) {
    var r = n(68),
      i = Math.max,
      o = Math.min;
    e.exports = function (e, t) {
      return (e = r(e)) < 0 ? i(e + t, 0) : o(e, t);
    };
  },
  function (e, t, n) {
    n(246), (e.exports = n(22).Object.getPrototypeOf);
  },
  function (e, t, n) {
    var r = n(54),
      i = n(115);
    n(73)("getPrototypeOf", function () {
      return function (e) {
        return i(r(e));
      };
    });
  },
  function (e, t, n) {
    e.exports = { default: n(248), __esModule: !0 };
  },
  function (e, t, n) {
    n(249);
    var r = n(22).Object;
    e.exports = function (e, t, n) {
      return r.defineProperty(e, t, n);
    };
  },
  function (e, t, n) {
    var r = n(29);
    r(r.S + r.F * !n(31), "Object", { defineProperty: n(30).f });
  },
  function (e, t, n) {
    e.exports = { default: n(251), __esModule: !0 };
  },
  function (e, t, n) {
    n(252), n(257), (e.exports = n(78).f("iterator"));
  },
  function (e, t, n) {
    "use strict";
    var r = n(253)(!0);
    n(117)(
      String,
      "String",
      function (e) {
        (this._t = String(e)), (this._i = 0);
      },
      function () {
        var e,
          t = this._t,
          n = this._i;
        return n >= t.length
          ? { value: void 0, done: !0 }
          : ((e = r(t, n)), (this._i += e.length), { value: e, done: !1 });
      }
    );
  },
  function (e, t, n) {
    var r = n(68),
      i = n(67);
    e.exports = function (e) {
      return function (t, n) {
        var o,
          s,
          a = String(i(t)),
          l = r(n),
          c = a.length;
        return l < 0 || l >= c
          ? e
            ? ""
            : void 0
          : (o = a.charCodeAt(l)) < 55296 ||
            o > 56319 ||
            l + 1 === c ||
            (s = a.charCodeAt(l + 1)) < 56320 ||
            s > 57343
          ? e
            ? a.charAt(l)
            : o
          : e
          ? a.slice(l, l + 2)
          : s - 56320 + ((o - 55296) << 10) + 65536;
      };
    };
  },
  function (e, t, n) {
    "use strict";
    var r = n(76),
      i = n(51),
      o = n(77),
      s = {};
    n(34)(s, n(36)("iterator"), function () {
      return this;
    }),
      (e.exports = function (e, t, n) {
        (e.prototype = r(s, { next: i(1, n) })), o(e, t + " Iterator");
      });
  },
  function (e, t, n) {
    var r = n(30),
      i = n(40),
      o = n(42);
    e.exports = n(31)
      ? Object.defineProperties
      : function (e, t) {
          i(e);
          for (var n, s = o(t), a = s.length, l = 0; a > l; )
            r.f(e, (n = s[l++]), t[n]);
          return e;
        };
  },
  function (e, t, n) {
    var r = n(26).document;
    e.exports = r && r.documentElement;
  },
  function (e, t, n) {
    n(258);
    for (
      var r = n(26),
        i = n(34),
        o = n(75),
        s = n(36)("toStringTag"),
        a = "CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(
          ","
        ),
        l = 0;
      l < a.length;
      l++
    ) {
      var c = a[l],
        u = r[c],
        h = u && u.prototype;
      h && !h[s] && i(h, s, c), (o[c] = o.Array);
    }
  },
  function (e, t, n) {
    "use strict";
    var r = n(259),
      i = n(260),
      o = n(75),
      s = n(33);
    (e.exports = n(117)(
      Array,
      "Array",
      function (e, t) {
        (this._t = s(e)), (this._i = 0), (this._k = t);
      },
      function () {
        var e = this._t,
          t = this._k,
          n = this._i++;
        return !e || n >= e.length
          ? ((this._t = void 0), i(1))
          : i(0, "keys" == t ? n : "values" == t ? e[n] : [n, e[n]]);
      },
      "values"
    )),
      (o.Arguments = o.Array),
      r("keys"),
      r("values"),
      r("entries");
  },
  function (e, t) {
    e.exports = function () {};
  },
  function (e, t) {
    e.exports = function (e, t) {
      return { value: t, done: !!e };
    };
  },
  function (e, t, n) {
    e.exports = { default: n(262), __esModule: !0 };
  },
  function (e, t, n) {
    n(263), n(268), n(269), n(270), (e.exports = n(22).Symbol);
  },
  function (e, t, n) {
    "use strict";
    var r = n(26),
      i = n(32),
      o = n(31),
      s = n(29),
      a = n(118),
      l = n(264).KEY,
      c = n(35),
      u = n(70),
      h = n(77),
      d = n(52),
      p = n(36),
      f = n(78),
      m = n(79),
      g = n(265),
      y = n(266),
      v = n(40),
      w = n(33),
      b = n(66),
      S = n(51),
      C = n(76),
      E = n(267),
      k = n(80),
      x = n(30),
      R = n(42),
      T = k.f,
      D = x.f,
      A = E.f,
      _ = r.Symbol,
      M = r.JSON,
      P = M && M.stringify,
      I = p("_hidden"),
      O = p("toPrimitive"),
      L = {}.propertyIsEnumerable,
      F = u("symbol-registry"),
      N = u("symbols"),
      B = u("op-symbols"),
      H = Object.prototype,
      z = "function" == typeof _,
      U = r.QObject,
      W = !U || !U.prototype || !U.prototype.findChild,
      j =
        o &&
        c(function () {
          return (
            7 !=
            C(
              D({}, "a", {
                get: function () {
                  return D(this, "a", { value: 7 }).a;
                },
              })
            ).a
          );
        })
          ? function (e, t, n) {
              var r = T(H, t);
              r && delete H[t], D(e, t, n), r && e !== H && D(H, t, r);
            }
          : D,
      V = function (e) {
        var t = (N[e] = C(_.prototype));
        return (t._k = e), t;
      },
      G =
        z && "symbol" == typeof _.iterator
          ? function (e) {
              return "symbol" == typeof e;
            }
          : function (e) {
              return e instanceof _;
            },
      $ = function (e, t, n) {
        return (
          e === H && $(B, t, n),
          v(e),
          (t = b(t, !0)),
          v(n),
          i(N, t)
            ? (n.enumerable
                ? (i(e, I) && e[I][t] && (e[I][t] = !1),
                  (n = C(n, { enumerable: S(0, !1) })))
                : (i(e, I) || D(e, I, S(1, {})), (e[I][t] = !0)),
              j(e, t, n))
            : D(e, t, n)
        );
      },
      q = function (e, t) {
        v(e);
        for (var n, r = g((t = w(t))), i = 0, o = r.length; o > i; )
          $(e, (n = r[i++]), t[n]);
        return e;
      },
      K = function (e) {
        var t = L.call(this, (e = b(e, !0)));
        return (
          !(this === H && i(N, e) && !i(B, e)) &&
          (!(t || !i(this, e) || !i(N, e) || (i(this, I) && this[I][e])) || t)
        );
      },
      Y = function (e, t) {
        if (((e = w(e)), (t = b(t, !0)), e !== H || !i(N, t) || i(B, t))) {
          var n = T(e, t);
          return (
            !n || !i(N, t) || (i(e, I) && e[I][t]) || (n.enumerable = !0), n
          );
        }
      },
      Q = function (e) {
        for (var t, n = A(w(e)), r = [], o = 0; n.length > o; )
          i(N, (t = n[o++])) || t == I || t == l || r.push(t);
        return r;
      },
      Z = function (e) {
        for (
          var t, n = e === H, r = A(n ? B : w(e)), o = [], s = 0;
          r.length > s;

        )
          !i(N, (t = r[s++])) || (n && !i(H, t)) || o.push(N[t]);
        return o;
      };
    z ||
      (a(
        (_ = function () {
          if (this instanceof _)
            throw TypeError("Symbol is not a constructor!");
          var e = d(arguments.length > 0 ? arguments[0] : void 0),
            t = function (n) {
              this === H && t.call(B, n),
                i(this, I) && i(this[I], e) && (this[I][e] = !1),
                j(this, e, S(1, n));
            };
          return o && W && j(H, e, { configurable: !0, set: t }), V(e);
        }).prototype,
        "toString",
        function () {
          return this._k;
        }
      ),
      (k.f = Y),
      (x.f = $),
      (n(119).f = E.f = Q),
      (n(53).f = K),
      (n(72).f = Z),
      o && !n(74) && a(H, "propertyIsEnumerable", K, !0),
      (f.f = function (e) {
        return V(p(e));
      })),
      s(s.G + s.W + s.F * !z, { Symbol: _ });
    for (
      var X = "hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(
          ","
        ),
        J = 0;
      X.length > J;

    )
      p(X[J++]);
    for (var ee = R(p.store), te = 0; ee.length > te; ) m(ee[te++]);
    s(s.S + s.F * !z, "Symbol", {
      for: function (e) {
        return i(F, (e += "")) ? F[e] : (F[e] = _(e));
      },
      keyFor: function (e) {
        if (!G(e)) throw TypeError(e + " is not a symbol!");
        for (var t in F) if (F[t] === e) return t;
      },
      useSetter: function () {
        W = !0;
      },
      useSimple: function () {
        W = !1;
      },
    }),
      s(s.S + s.F * !z, "Object", {
        create: function (e, t) {
          return void 0 === t ? C(e) : q(C(e), t);
        },
        defineProperty: $,
        defineProperties: q,
        getOwnPropertyDescriptor: Y,
        getOwnPropertyNames: Q,
        getOwnPropertySymbols: Z,
      }),
      M &&
        s(
          s.S +
            s.F *
              (!z ||
                c(function () {
                  var e = _();
                  return (
                    "[null]" != P([e]) ||
                    "{}" != P({ a: e }) ||
                    "{}" != P(Object(e))
                  );
                })),
          "JSON",
          {
            stringify: function (e) {
              if (void 0 !== e && !G(e)) {
                for (var t, n, r = [e], i = 1; arguments.length > i; )
                  r.push(arguments[i++]);
                return (
                  "function" == typeof (t = r[1]) && (n = t),
                  (!n && y(t)) ||
                    (t = function (e, t) {
                      if ((n && (t = n.call(this, e, t)), !G(t))) return t;
                    }),
                  (r[1] = t),
                  P.apply(M, r)
                );
              }
            },
          }
        ),
      _.prototype[O] || n(34)(_.prototype, O, _.prototype.valueOf),
      h(_, "Symbol"),
      h(Math, "Math", !0),
      h(r.JSON, "JSON", !0);
  },
  function (e, t, n) {
    var r = n(52)("meta"),
      i = n(41),
      o = n(32),
      s = n(30).f,
      a = 0,
      l =
        Object.isExtensible ||
        function () {
          return !0;
        },
      c = !n(35)(function () {
        return l(Object.preventExtensions({}));
      }),
      u = function (e) {
        s(e, r, { value: { i: "O" + ++a, w: {} } });
      },
      h = (e.exports = {
        KEY: r,
        NEED: !1,
        fastKey: function (e, t) {
          if (!i(e))
            return "symbol" == typeof e
              ? e
              : ("string" == typeof e ? "S" : "P") + e;
          if (!o(e, r)) {
            if (!l(e)) return "F";
            if (!t) return "E";
            u(e);
          }
          return e[r].i;
        },
        getWeak: function (e, t) {
          if (!o(e, r)) {
            if (!l(e)) return !0;
            if (!t) return !1;
            u(e);
          }
          return e[r].w;
        },
        onFreeze: function (e) {
          return c && h.NEED && l(e) && !o(e, r) && u(e), e;
        },
      });
  },
  function (e, t, n) {
    var r = n(42),
      i = n(72),
      o = n(53);
    e.exports = function (e) {
      var t = r(e),
        n = i.f;
      if (n)
        for (var s, a = n(e), l = o.f, c = 0; a.length > c; )
          l.call(e, (s = a[c++])) && t.push(s);
      return t;
    };
  },
  function (e, t, n) {
    var r = n(114);
    e.exports =
      Array.isArray ||
      function (e) {
        return "Array" == r(e);
      };
  },
  function (e, t, n) {
    var r = n(33),
      i = n(119).f,
      o = {}.toString,
      s =
        "object" == typeof window && window && Object.getOwnPropertyNames
          ? Object.getOwnPropertyNames(window)
          : [];
    e.exports.f = function (e) {
      return s && "[object Window]" == o.call(e)
        ? (function (e) {
            try {
              return i(e);
            } catch (e) {
              return s.slice();
            }
          })(e)
        : i(r(e));
    };
  },
  function (e, t) {},
  function (e, t, n) {
    n(79)("asyncIterator");
  },
  function (e, t, n) {
    n(79)("observable");
  },
  function (e, t, n) {
    e.exports = { default: n(272), __esModule: !0 };
  },
  function (e, t, n) {
    n(273), (e.exports = n(22).Object.setPrototypeOf);
  },
  function (e, t, n) {
    var r = n(29);
    r(r.S, "Object", { setPrototypeOf: n(274).set });
  },
  function (e, t, n) {
    var r = n(41),
      i = n(40),
      o = function (e, t) {
        if ((i(e), !r(t) && null !== t))
          throw TypeError(t + ": can't set as prototype!");
      };
    e.exports = {
      set:
        Object.setPrototypeOf ||
        ("__proto__" in {}
          ? (function (e, t, r) {
              try {
                (r = n(109)(
                  Function.call,
                  n(80).f(Object.prototype, "__proto__").set,
                  2
                ))(e, []),
                  (t = !(e instanceof Array));
              } catch (e) {
                t = !0;
              }
              return function (e, n) {
                return o(e, n), t ? (e.__proto__ = n) : r(e, n), e;
              };
            })({}, !1)
          : void 0),
      check: o,
    };
  },
  function (e, t, n) {
    e.exports = { default: n(276), __esModule: !0 };
  },
  function (e, t, n) {
    n(277);
    var r = n(22).Object;
    e.exports = function (e, t) {
      return r.create(e, t);
    };
  },
  function (e, t, n) {
    var r = n(29);
    r(r.S, "Object", { create: n(76) });
  },
  function (e, t, n) {
    "use strict";
    var r = n(279),
      i = n(280),
      o = n(281);
    e.exports = function () {
      function e(e, t, n, r, s, a) {
        a !== o &&
          i(
            !1,
            "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
          );
      }
      function t() {
        return e;
      }
      e.isRequired = e;
      var n = {
        array: e,
        bool: e,
        func: e,
        number: e,
        object: e,
        string: e,
        symbol: e,
        any: e,
        arrayOf: t,
        element: e,
        instanceOf: t,
        node: e,
        objectOf: t,
        oneOf: t,
        oneOfType: t,
        shape: t,
        exact: t,
      };
      return (n.checkPropTypes = r), (n.PropTypes = n), n;
    };
  },
  function (e, t, n) {
    "use strict";
    function r(e) {
      return function () {
        return e;
      };
    }
    var i = function () {};
    (i.thatReturns = r),
      (i.thatReturnsFalse = r(!1)),
      (i.thatReturnsTrue = r(!0)),
      (i.thatReturnsNull = r(null)),
      (i.thatReturnsThis = function () {
        return this;
      }),
      (i.thatReturnsArgument = function (e) {
        return e;
      }),
      (e.exports = i);
  },
  function (e, t, n) {
    "use strict";
    e.exports = function (e, t, n, r, i, o, s, a) {
      if (!e) {
        var l;
        if (void 0 === t)
          l = new Error(
            "Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."
          );
        else {
          var c = [n, r, i, o, s, a],
            u = 0;
          (l = new Error(
            t.replace(/%s/g, function () {
              return c[u++];
            })
          )).name = "Invariant Violation";
        }
        throw ((l.framesToPop = 1), l);
      }
    };
  },
  function (e, t, n) {
    "use strict";
    e.exports = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
  },
  function (e, t, n) {
    n(283), (e.exports = n(22).Object.keys);
  },
  function (e, t, n) {
    var r = n(54),
      i = n(42);
    n(73)("keys", function () {
      return function (e) {
        return i(r(e));
      };
    });
  },
  function (e, t, n) {
    (function () {
      var t, r, i, o;
      (i = n(56)),
        (t = n(82)),
        n(120),
        (r = function (e) {
          return e.candidate;
        }),
        (o = function (e, t) {
          return t.score - e.score;
        }),
        (e.exports = function (e, n, s) {
          var a, l, c, u, h, d, p, f, m, g, y, v, w;
          for (
            f = [],
              c = s.key,
              h = s.maxResults,
              u = s.maxInners,
              y = s.usePathScoring,
              m = null != u && u > 0 ? u : e.length + 1,
              a = null != c,
              p = y ? t : i,
              v = 0,
              w = e.length;
            v < w &&
            ((l = e[v]),
            !((g = a ? l[c] : l) && (d = p.score(g, n, s)) > 0) ||
              (f.push({ candidate: l, score: d }), --m));
            v++
          );
          return f.sort(o), (e = f.map(r)), null != h && (e = e.slice(0, h)), e;
        });
    }.call(this));
  },
  function (e, t, n) {
    (function () {
      var e, r, i, o, s, a, l, c, u, h;
      (h = n(56)),
        (i = h.isMatch),
        (o = h.isWordStart),
        (u = h.scoreConsecutives),
        (c = h.scoreCharacter),
        (l = h.scoreAcronyms),
        (t.match = s = function (t, n, o) {
          var s, l, c, u, h, d;
          return (
            (s = o.allowErrors),
            (h = o.preparedQuery),
            (u = o.pathSeparator),
            s || i(t, h.core_lw, h.core_up)
              ? ((d = t.toLowerCase()),
                0 === (c = r(t, d, h)).length ||
                  (t.indexOf(u) > -1 && ((l = e(t, d, h, u)), (c = a(c, l)))),
                c)
              : []
          );
        }),
        (t.wrap = function (e, t, n) {
          var r, i, o, a, l, c, u, h, d;
          if (
            (null != n.wrap &&
              ((c = (d = n.wrap).tagClass), (h = d.tagOpen), (u = d.tagClose)),
            null == c && (c = "highlight"),
            null == h && (h = '<strong class="' + c + '">'),
            null == u && (u = "</strong>"),
            e === t)
          )
            return h + e + u;
          if (0 === (o = s(e, 0, n)).length) return e;
          for (a = "", r = -1, l = 0; ++r < o.length; ) {
            for (
              (i = o[r]) > l && ((a += e.substring(l, i)), (l = i));
              ++r < o.length;

            ) {
              if (o[r] !== i + 1) {
                r--;
                break;
              }
              i++;
            }
            ++i > l && ((a += h), (a += e.substring(l, i)), (a += u), (l = i));
          }
          return l <= e.length - 1 && (a += e.substring(l)), a;
        }),
        (e = function (e, t, n, i) {
          var o, s, a;
          for (a = e.length - 1; e[a] === i; ) a--;
          if (-1 === (o = e.lastIndexOf(i, a))) return [];
          for (s = n.depth; s-- > 0; )
            if (-1 === (o = e.lastIndexOf(i, o - 1))) return [];
          return o++, a++, r(e.slice(o, a), t.slice(o, a), n, o);
        }),
        (a = function (e, t) {
          var n, r, i, o, s, a, l;
          if (((s = e.length), 0 === (a = t.length))) return e.slice();
          if (0 === s) return t.slice();
          for (i = -1, r = t[(o = 0)], l = []; ++i < s; ) {
            for (n = e[i]; r <= n && ++o < a; ) r < n && l.push(r), (r = t[o]);
            l.push(n);
          }
          for (; o < a; ) l.push(t[o++]);
          return l;
        }),
        (r = function (e, t, n, r) {
          var i, s, a, h, d, p, f, m, g, y, v, w, b, S, C, E, k, x, R, T, D, A;
          for (
            null == r && (r = 0),
              S = n.query,
              C = n.query_lw,
              g = e.length,
              w = S.length,
              i = l(e, t, S, C).score,
              x = new Array(w),
              d = new Array(w),
              0,
              1,
              2,
              3,
              A = new Array(g * w),
              b = -1,
              m = -1;
            ++m < w;

          )
            (x[m] = 0), (d[m] = 0);
          for (f = -1; ++f < g; )
            for (E = 0, R = 0, h = 0, T = t[f], m = -1; ++m < w; )
              (p = 0),
                (s = 0),
                (k = R),
                C[m] === T &&
                  ((D = o(f, e, t)),
                  (p = h > 0 ? h : u(e, t, S, C, f, m, D)),
                  (s = k + c(f, m, D, i, p))),
                (R = x[m]),
                (h = d[m]),
                E > R ? (v = 2) : ((E = R), (v = 1)),
                s > E ? ((E = s), (v = 3)) : (p = 0),
                (x[m] = E),
                (d[m] = p),
                (A[++b] = E > 0 ? v : 0);
          for (
            b = (f = g - 1) * w + (m = w - 1), a = !0, y = [];
            a && f >= 0 && m >= 0;

          )
            switch (A[b]) {
              case 1:
                f--, (b -= w);
                break;
              case 2:
                m--, b--;
                break;
              case 3:
                y.push(f + r), m--, f--, (b -= w + 1);
                break;
              default:
                a = !1;
            }
          return y.reverse(), y;
        });
    }.call(this));
  },
  function (e, t, n) {
    !(function (e) {
      "use strict";
      e.defineMode("javascript", function (t, n) {
        var r,
          i,
          o = t.indentUnit,
          s = n.statementIndent,
          a = n.jsonld,
          l = n.json || a,
          c = n.typescript,
          u = n.wordCharacters || /[\w$\xa1-\uffff]/,
          h = (function () {
            function e(e) {
              return { type: e, style: "keyword" };
            }
            var t = e("keyword a"),
              n = e("keyword b"),
              r = e("keyword c"),
              i = e("keyword d"),
              o = e("operator"),
              s = { type: "atom", style: "atom" };
            return {
              if: e("if"),
              while: t,
              with: t,
              else: n,
              do: n,
              try: n,
              finally: n,
              return: i,
              break: i,
              continue: i,
              new: e("new"),
              delete: r,
              void: r,
              throw: r,
              debugger: e("debugger"),
              var: e("var"),
              const: e("var"),
              let: e("var"),
              function: e("function"),
              catch: e("catch"),
              for: e("for"),
              switch: e("switch"),
              case: e("case"),
              default: e("default"),
              in: o,
              typeof: o,
              instanceof: o,
              true: s,
              false: s,
              null: s,
              undefined: s,
              NaN: s,
              Infinity: s,
              this: e("this"),
              class: e("class"),
              super: e("atom"),
              yield: r,
              export: e("export"),
              import: e("import"),
              extends: r,
              await: r,
            };
          })(),
          d = /[+\-*&%=<>!?|~^@]/,
          p = /^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;
        function f(e, t, n) {
          return (r = e), (i = n), t;
        }
        function m(e, t) {
          var n,
            r = e.next();
          if ('"' == r || "'" == r)
            return (
              (t.tokenize =
                ((n = r),
                function (e, t) {
                  var r,
                    i = !1;
                  if (a && "@" == e.peek() && e.match(p))
                    return (t.tokenize = m), f("jsonld-keyword", "meta");
                  for (; null != (r = e.next()) && (r != n || i); )
                    i = !i && "\\" == r;
                  return i || (t.tokenize = m), f("string", "string");
                })),
              t.tokenize(e, t)
            );
          if ("." == r && e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))
            return f("number", "number");
          if ("." == r && e.match("..")) return f("spread", "meta");
          if (/[\[\]{}\(\),;\:\.]/.test(r)) return f(r);
          if ("=" == r && e.eat(">")) return f("=>", "operator");
          if ("0" == r && e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))
            return f("number", "number");
          if (/\d/.test(r))
            return (
              e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),
              f("number", "number")
            );
          if ("/" == r)
            return e.eat("*")
              ? ((t.tokenize = g), g(e, t))
              : e.eat("/")
              ? (e.skipToEnd(), f("comment", "comment"))
              : qe(e, t, 1)
              ? ((function (e) {
                  for (var t, n = !1, r = !1; null != (t = e.next()); ) {
                    if (!n) {
                      if ("/" == t && !r) return;
                      "[" == t ? (r = !0) : r && "]" == t && (r = !1);
                    }
                    n = !n && "\\" == t;
                  }
                })(e),
                e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),
                f("regexp", "string-2"))
              : (e.eat("="), f("operator", "operator", e.current()));
          if ("`" == r) return (t.tokenize = y), y(e, t);
          if ("#" == r) return e.skipToEnd(), f("error", "error");
          if (("<" == r && e.match("!--")) || ("-" == r && e.match("->")))
            return e.skipToEnd(), f("comment", "comment");
          if (d.test(r))
            return (
              (">" == r && t.lexical && ">" == t.lexical.type) ||
                (e.eat("=")
                  ? ("!" != r && "=" != r) || e.eat("=")
                  : /[<>*+\-]/.test(r) && (e.eat(r), ">" == r && e.eat(r))),
              f("operator", "operator", e.current())
            );
          if (u.test(r)) {
            e.eatWhile(u);
            var i = e.current();
            if ("." != t.lastType) {
              if (h.propertyIsEnumerable(i)) {
                var o = h[i];
                return f(o.type, o.style, i);
              }
              if ("async" == i && e.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/, !1))
                return f("async", "keyword", i);
            }
            return f("variable", "variable", i);
          }
        }
        function g(e, t) {
          for (var n, r = !1; (n = e.next()); ) {
            if ("/" == n && r) {
              t.tokenize = m;
              break;
            }
            r = "*" == n;
          }
          return f("comment", "comment");
        }
        function y(e, t) {
          for (var n, r = !1; null != (n = e.next()); ) {
            if (!r && ("`" == n || ("$" == n && e.eat("{")))) {
              t.tokenize = m;
              break;
            }
            r = !r && "\\" == n;
          }
          return f("quasi", "string-2", e.current());
        }
        function v(e, t) {
          t.fatArrowAt && (t.fatArrowAt = null);
          var n = e.string.indexOf("=>", e.start);
          if (!(n < 0)) {
            if (c) {
              var r = /:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(
                e.string.slice(e.start, n)
              );
              r && (n = r.index);
            }
            for (var i = 0, o = !1, s = n - 1; s >= 0; --s) {
              var a = e.string.charAt(s),
                l = "([{}])".indexOf(a);
              if (l >= 0 && l < 3) {
                if (!i) {
                  ++s;
                  break;
                }
                if (0 == --i) {
                  "(" == a && (o = !0);
                  break;
                }
              } else if (l >= 3 && l < 6) ++i;
              else if (u.test(a)) o = !0;
              else if (/["'\/`]/.test(a))
                for (; ; --s) {
                  if (0 == s) return;
                  if (
                    e.string.charAt(s - 1) == a &&
                    "\\" != e.string.charAt(s - 2)
                  ) {
                    s--;
                    break;
                  }
                }
              else if (o && !i) {
                ++s;
                break;
              }
            }
            o && !i && (t.fatArrowAt = s);
          }
        }
        var w = {
          atom: !0,
          number: !0,
          variable: !0,
          string: !0,
          regexp: !0,
          this: !0,
          "jsonld-keyword": !0,
        };
        function b(e, t, n, r, i, o) {
          (this.indented = e),
            (this.column = t),
            (this.type = n),
            (this.prev = i),
            (this.info = o),
            null != r && (this.align = r);
        }
        function S(e, t) {
          for (var n = e.localVars; n; n = n.next) if (n.name == t) return !0;
          for (var r = e.context; r; r = r.prev)
            for (n = r.vars; n; n = n.next) if (n.name == t) return !0;
        }
        var C = { state: null, column: null, marked: null, cc: null };
        function E() {
          for (var e = arguments.length - 1; e >= 0; e--)
            C.cc.push(arguments[e]);
        }
        function k() {
          return E.apply(null, arguments), !0;
        }
        function x(e, t) {
          for (var n = t; n; n = n.next) if (n.name == e) return !0;
          return !1;
        }
        function R(e) {
          var t = C.state;
          if (((C.marked = "def"), t.context))
            if ("var" == t.lexical.info && t.context && t.context.block) {
              var r = (function e(t, n) {
                if (n) {
                  if (n.block) {
                    var r = e(t, n.prev);
                    return r ? (r == n.prev ? n : new D(r, n.vars, !0)) : null;
                  }
                  return x(t, n.vars) ? n : new D(n.prev, new A(t, n.vars), !1);
                }
                return null;
              })(e, t.context);
              if (null != r) return void (t.context = r);
            } else if (!x(e, t.localVars))
              return void (t.localVars = new A(e, t.localVars));
          n.globalVars &&
            !x(e, t.globalVars) &&
            (t.globalVars = new A(e, t.globalVars));
        }
        function T(e) {
          return (
            "public" == e ||
            "private" == e ||
            "protected" == e ||
            "abstract" == e ||
            "readonly" == e
          );
        }
        function D(e, t, n) {
          (this.prev = e), (this.vars = t), (this.block = n);
        }
        function A(e, t) {
          (this.name = e), (this.next = t);
        }
        var _ = new A("this", new A("arguments", null));
        function M() {
          (C.state.context = new D(C.state.context, C.state.localVars, !1)),
            (C.state.localVars = _);
        }
        function P() {
          (C.state.context = new D(C.state.context, C.state.localVars, !0)),
            (C.state.localVars = null);
        }
        function I() {
          (C.state.localVars = C.state.context.vars),
            (C.state.context = C.state.context.prev);
        }
        function O(e, t) {
          var n = function () {
            var n = C.state,
              r = n.indented;
            if ("stat" == n.lexical.type) r = n.lexical.indented;
            else
              for (var i = n.lexical; i && ")" == i.type && i.align; i = i.prev)
                r = i.indented;
            n.lexical = new b(r, C.stream.column(), e, null, n.lexical, t);
          };
          return (n.lex = !0), n;
        }
        function L() {
          var e = C.state;
          e.lexical.prev &&
            (")" == e.lexical.type && (e.indented = e.lexical.indented),
            (e.lexical = e.lexical.prev));
        }
        function F(e) {
          return function t(n) {
            return n == e
              ? k()
              : ";" == e || "}" == n || ")" == n || "]" == n
              ? E()
              : k(t);
          };
        }
        function N(e, t) {
          return "var" == e
            ? k(O("vardef", t), ve, F(";"), L)
            : "keyword a" == e
            ? k(O("form"), U, N, L)
            : "keyword b" == e
            ? k(O("form"), N, L)
            : "keyword d" == e
            ? C.stream.match(/^\s*$/, !1)
              ? k()
              : k(O("stat"), j, F(";"), L)
            : "debugger" == e
            ? k(F(";"))
            : "{" == e
            ? k(O("}"), P, oe, L, I)
            : ";" == e
            ? k()
            : "if" == e
            ? ("else" == C.state.lexical.info &&
                C.state.cc[C.state.cc.length - 1] == L &&
                C.state.cc.pop()(),
              k(O("form"), U, N, L, ke))
            : "function" == e
            ? k(De)
            : "for" == e
            ? k(O("form"), xe, N, L)
            : "class" == e || (c && "interface" == t)
            ? ((C.marked = "keyword"),
              k(O("form", "class" == e ? e : t), Ie, L))
            : "variable" == e
            ? c && "declare" == t
              ? ((C.marked = "keyword"), k(N))
              : c &&
                ("module" == t || "enum" == t || "type" == t) &&
                C.stream.match(/^\s*\w/, !1)
              ? ((C.marked = "keyword"),
                "enum" == t
                  ? k(Ge)
                  : "type" == t
                  ? k(_e, F("operator"), ue, F(";"))
                  : k(O("form"), we, F("{"), O("}"), oe, L, L))
              : c && "namespace" == t
              ? ((C.marked = "keyword"), k(O("form"), H, N, L))
              : c && "abstract" == t
              ? ((C.marked = "keyword"), k(N))
              : k(O("stat"), X)
            : "switch" == e
            ? k(O("form"), U, F("{"), O("}", "switch"), P, oe, L, L, I)
            : "case" == e
            ? k(H, F(":"))
            : "default" == e
            ? k(F(":"))
            : "catch" == e
            ? k(O("form"), M, B, N, L, I)
            : "export" == e
            ? k(O("stat"), Ne, L)
            : "import" == e
            ? k(O("stat"), He, L)
            : "async" == e
            ? k(N)
            : "@" == t
            ? k(H, N)
            : E(O("stat"), H, F(";"), L);
        }
        function B(e) {
          if ("(" == e) return k(Me, F(")"));
        }
        function H(e, t) {
          return W(e, t, !1);
        }
        function z(e, t) {
          return W(e, t, !0);
        }
        function U(e) {
          return "(" != e ? E() : k(O(")"), H, F(")"), L);
        }
        function W(e, t, n) {
          if (C.state.fatArrowAt == C.stream.start) {
            var r = n ? Y : K;
            if ("(" == e) return k(M, O(")"), re(Me, ")"), L, F("=>"), r, I);
            if ("variable" == e) return E(M, we, F("=>"), r, I);
          }
          var i = n ? G : V;
          return w.hasOwnProperty(e)
            ? k(i)
            : "function" == e
            ? k(De, i)
            : "class" == e || (c && "interface" == t)
            ? ((C.marked = "keyword"), k(O("form"), Pe, L))
            : "keyword c" == e || "async" == e
            ? k(n ? z : H)
            : "(" == e
            ? k(O(")"), j, F(")"), L, i)
            : "operator" == e || "spread" == e
            ? k(n ? z : H)
            : "[" == e
            ? k(O("]"), Ve, L, i)
            : "{" == e
            ? ie(ee, "}", null, i)
            : "quasi" == e
            ? E($, i)
            : "new" == e
            ? k(
                (function (e) {
                  return function (t) {
                    return "." == t
                      ? k(e ? Z : Q)
                      : "variable" == t && c
                      ? k(me, e ? G : V)
                      : E(e ? z : H);
                  };
                })(n)
              )
            : "import" == e
            ? k(H)
            : k();
        }
        function j(e) {
          return e.match(/[;\}\)\],]/) ? E() : E(H);
        }
        function V(e, t) {
          return "," == e ? k(H) : G(e, t, !1);
        }
        function G(e, t, n) {
          var r = 0 == n ? V : G,
            i = 0 == n ? H : z;
          return "=>" == e
            ? k(M, n ? Y : K, I)
            : "operator" == e
            ? /\+\+|--/.test(t) || (c && "!" == t)
              ? k(r)
              : c && "<" == t && C.stream.match(/^([^>]|<.*?>)*>\s*\(/, !1)
              ? k(O(">"), re(ue, ">"), L, r)
              : "?" == t
              ? k(H, F(":"), i)
              : k(i)
            : "quasi" == e
            ? E($, r)
            : ";" != e
            ? "(" == e
              ? ie(z, ")", "call", r)
              : "." == e
              ? k(J, r)
              : "[" == e
              ? k(O("]"), j, F("]"), L, r)
              : c && "as" == t
              ? ((C.marked = "keyword"), k(ue, r))
              : "regexp" == e
              ? ((C.state.lastType = C.marked = "operator"),
                C.stream.backUp(C.stream.pos - C.stream.start - 1),
                k(i))
              : void 0
            : void 0;
        }
        function $(e, t) {
          return "quasi" != e
            ? E()
            : "${" != t.slice(t.length - 2)
            ? k($)
            : k(H, q);
        }
        function q(e) {
          if ("}" == e)
            return (C.marked = "string-2"), (C.state.tokenize = y), k($);
        }
        function K(e) {
          return v(C.stream, C.state), E("{" == e ? N : H);
        }
        function Y(e) {
          return v(C.stream, C.state), E("{" == e ? N : z);
        }
        function Q(e, t) {
          if ("target" == t) return (C.marked = "keyword"), k(V);
        }
        function Z(e, t) {
          if ("target" == t) return (C.marked = "keyword"), k(G);
        }
        function X(e) {
          return ":" == e ? k(L, N) : E(V, F(";"), L);
        }
        function J(e) {
          if ("variable" == e) return (C.marked = "property"), k();
        }
        function ee(e, t) {
          return "async" == e
            ? ((C.marked = "property"), k(ee))
            : "variable" == e || "keyword" == C.style
            ? ((C.marked = "property"),
              "get" == t || "set" == t
                ? k(te)
                : (c &&
                    C.state.fatArrowAt == C.stream.start &&
                    (n = C.stream.match(/^\s*:\s*/, !1)) &&
                    (C.state.fatArrowAt = C.stream.pos + n[0].length),
                  k(ne)))
            : "number" == e || "string" == e
            ? ((C.marked = a ? "property" : C.style + " property"), k(ne))
            : "jsonld-keyword" == e
            ? k(ne)
            : c && T(t)
            ? ((C.marked = "keyword"), k(ee))
            : "[" == e
            ? k(H, se, F("]"), ne)
            : "spread" == e
            ? k(z, ne)
            : "*" == t
            ? ((C.marked = "keyword"), k(ee))
            : ":" == e
            ? E(ne)
            : void 0;
          var n;
        }
        function te(e) {
          return "variable" != e ? E(ne) : ((C.marked = "property"), k(De));
        }
        function ne(e) {
          return ":" == e ? k(z) : "(" == e ? E(De) : void 0;
        }
        function re(e, t, n) {
          function r(i, o) {
            if (n ? n.indexOf(i) > -1 : "," == i) {
              var s = C.state.lexical;
              return (
                "call" == s.info && (s.pos = (s.pos || 0) + 1),
                k(function (n, r) {
                  return n == t || r == t ? E() : E(e);
                }, r)
              );
            }
            return i == t || o == t
              ? k()
              : n && n.indexOf(";") > -1
              ? E(e)
              : k(F(t));
          }
          return function (n, i) {
            return n == t || i == t ? k() : E(e, r);
          };
        }
        function ie(e, t, n) {
          for (var r = 3; r < arguments.length; r++) C.cc.push(arguments[r]);
          return k(O(t, n), re(e, t), L);
        }
        function oe(e) {
          return "}" == e ? k() : E(N, oe);
        }
        function se(e, t) {
          if (c) {
            if (":" == e) return k(ue);
            if ("?" == t) return k(se);
          }
        }
        function ae(e, t) {
          if (c && (":" == e || "in" == t)) return k(ue);
        }
        function le(e) {
          if (c && ":" == e)
            return C.stream.match(/^\s*\w+\s+is\b/, !1) ? k(H, ce, ue) : k(ue);
        }
        function ce(e, t) {
          if ("is" == t) return (C.marked = "keyword"), k();
        }
        function ue(e, t) {
          return "keyof" == t || "typeof" == t || "infer" == t
            ? ((C.marked = "keyword"), k("typeof" == t ? z : ue))
            : "variable" == e || "void" == t
            ? ((C.marked = "type"), k(fe))
            : "|" == t || "&" == t
            ? k(ue)
            : "string" == e || "number" == e || "atom" == e
            ? k(fe)
            : "[" == e
            ? k(O("]"), re(ue, "]", ","), L, fe)
            : "{" == e
            ? k(O("}"), re(de, "}", ",;"), L, fe)
            : "(" == e
            ? k(re(pe, ")"), he, fe)
            : "<" == e
            ? k(re(ue, ">"), ue)
            : void 0;
        }
        function he(e) {
          if ("=>" == e) return k(ue);
        }
        function de(e, t) {
          return "variable" == e || "keyword" == C.style
            ? ((C.marked = "property"), k(de))
            : "?" == t || "number" == e || "string" == e
            ? k(de)
            : ":" == e
            ? k(ue)
            : "[" == e
            ? k(F("variable"), ae, F("]"), de)
            : "(" == e
            ? E(Ae, de)
            : void 0;
        }
        function pe(e, t) {
          return ("variable" == e && C.stream.match(/^\s*[?:]/, !1)) || "?" == t
            ? k(pe)
            : ":" == e
            ? k(ue)
            : "spread" == e
            ? k(pe)
            : E(ue);
        }
        function fe(e, t) {
          return "<" == t
            ? k(O(">"), re(ue, ">"), L, fe)
            : "|" == t || "." == e || "&" == t
            ? k(ue)
            : "[" == e
            ? k(ue, F("]"), fe)
            : "extends" == t || "implements" == t
            ? ((C.marked = "keyword"), k(ue))
            : "?" == t
            ? k(ue, F(":"), ue)
            : void 0;
        }
        function me(e, t) {
          if ("<" == t) return k(O(">"), re(ue, ">"), L, fe);
        }
        function ge() {
          return E(ue, ye);
        }
        function ye(e, t) {
          if ("=" == t) return k(ue);
        }
        function ve(e, t) {
          return "enum" == t
            ? ((C.marked = "keyword"), k(Ge))
            : E(we, se, Ce, Ee);
        }
        function we(e, t) {
          return c && T(t)
            ? ((C.marked = "keyword"), k(we))
            : "variable" == e
            ? (R(t), k())
            : "spread" == e
            ? k(we)
            : "[" == e
            ? ie(Se, "]")
            : "{" == e
            ? ie(be, "}")
            : void 0;
        }
        function be(e, t) {
          return "variable" != e || C.stream.match(/^\s*:/, !1)
            ? ("variable" == e && (C.marked = "property"),
              "spread" == e
                ? k(we)
                : "}" == e
                ? E()
                : "[" == e
                ? k(H, F("]"), F(":"), be)
                : k(F(":"), we, Ce))
            : (R(t), k(Ce));
        }
        function Se() {
          return E(we, Ce);
        }
        function Ce(e, t) {
          if ("=" == t) return k(z);
        }
        function Ee(e) {
          if ("," == e) return k(ve);
        }
        function ke(e, t) {
          if ("keyword b" == e && "else" == t)
            return k(O("form", "else"), N, L);
        }
        function xe(e, t) {
          return "await" == t ? k(xe) : "(" == e ? k(O(")"), Re, L) : void 0;
        }
        function Re(e) {
          return "var" == e ? k(ve, Te) : "variable" == e ? k(Te) : E(Te);
        }
        function Te(e, t) {
          return ")" == e
            ? k()
            : ";" == e
            ? k(Te)
            : "in" == t || "of" == t
            ? ((C.marked = "keyword"), k(H, Te))
            : E(H, Te);
        }
        function De(e, t) {
          return "*" == t
            ? ((C.marked = "keyword"), k(De))
            : "variable" == e
            ? (R(t), k(De))
            : "(" == e
            ? k(M, O(")"), re(Me, ")"), L, le, N, I)
            : c && "<" == t
            ? k(O(">"), re(ge, ">"), L, De)
            : void 0;
        }
        function Ae(e, t) {
          return "*" == t
            ? ((C.marked = "keyword"), k(Ae))
            : "variable" == e
            ? (R(t), k(Ae))
            : "(" == e
            ? k(M, O(")"), re(Me, ")"), L, le, I)
            : c && "<" == t
            ? k(O(">"), re(ge, ">"), L, Ae)
            : void 0;
        }
        function _e(e, t) {
          return "keyword" == e || "variable" == e
            ? ((C.marked = "type"), k(_e))
            : "<" == t
            ? k(O(">"), re(ge, ">"), L)
            : void 0;
        }
        function Me(e, t) {
          return (
            "@" == t && k(H, Me),
            "spread" == e
              ? k(Me)
              : c && T(t)
              ? ((C.marked = "keyword"), k(Me))
              : c && "this" == e
              ? k(se, Ce)
              : E(we, se, Ce)
          );
        }
        function Pe(e, t) {
          return "variable" == e ? Ie(e, t) : Oe(e, t);
        }
        function Ie(e, t) {
          if ("variable" == e) return R(t), k(Oe);
        }
        function Oe(e, t) {
          return "<" == t
            ? k(O(">"), re(ge, ">"), L, Oe)
            : "extends" == t || "implements" == t || (c && "," == e)
            ? ("implements" == t && (C.marked = "keyword"), k(c ? ue : H, Oe))
            : "{" == e
            ? k(O("}"), Le, L)
            : void 0;
        }
        function Le(e, t) {
          return "async" == e ||
            ("variable" == e &&
              ("static" == t || "get" == t || "set" == t || (c && T(t))) &&
              C.stream.match(/^\s+[\w$\xa1-\uffff]/, !1))
            ? ((C.marked = "keyword"), k(Le))
            : "variable" == e || "keyword" == C.style
            ? ((C.marked = "property"), k(c ? Fe : De, Le))
            : "number" == e || "string" == e
            ? k(c ? Fe : De, Le)
            : "[" == e
            ? k(H, se, F("]"), c ? Fe : De, Le)
            : "*" == t
            ? ((C.marked = "keyword"), k(Le))
            : c && "(" == e
            ? E(Ae, Le)
            : ";" == e || "," == e
            ? k(Le)
            : "}" == e
            ? k()
            : "@" == t
            ? k(H, Le)
            : void 0;
        }
        function Fe(e, t) {
          if ("?" == t) return k(Fe);
          if (":" == e) return k(ue, Ce);
          if ("=" == t) return k(z);
          var n = C.state.lexical.prev;
          return E(n && "interface" == n.info ? Ae : De);
        }
        function Ne(e, t) {
          return "*" == t
            ? ((C.marked = "keyword"), k(je, F(";")))
            : "default" == t
            ? ((C.marked = "keyword"), k(H, F(";")))
            : "{" == e
            ? k(re(Be, "}"), je, F(";"))
            : E(N);
        }
        function Be(e, t) {
          return "as" == t
            ? ((C.marked = "keyword"), k(F("variable")))
            : "variable" == e
            ? E(z, Be)
            : void 0;
        }
        function He(e) {
          return "string" == e ? k() : "(" == e ? E(H) : E(ze, Ue, je);
        }
        function ze(e, t) {
          return "{" == e
            ? ie(ze, "}")
            : ("variable" == e && R(t),
              "*" == t && (C.marked = "keyword"),
              k(We));
        }
        function Ue(e) {
          if ("," == e) return k(ze, Ue);
        }
        function We(e, t) {
          if ("as" == t) return (C.marked = "keyword"), k(ze);
        }
        function je(e, t) {
          if ("from" == t) return (C.marked = "keyword"), k(H);
        }
        function Ve(e) {
          return "]" == e ? k() : E(re(z, "]"));
        }
        function Ge() {
          return E(O("form"), we, F("{"), O("}"), re($e, "}"), L, L);
        }
        function $e() {
          return E(we, Ce);
        }
        function qe(e, t, n) {
          return (
            (t.tokenize == m &&
              /^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(
                t.lastType
              )) ||
            ("quasi" == t.lastType &&
              /\{\s*$/.test(e.string.slice(0, e.pos - (n || 0))))
          );
        }
        return (
          (I.lex = !0),
          (L.lex = !0),
          {
            startState: function (e) {
              var t = {
                tokenize: m,
                lastType: "sof",
                cc: [],
                lexical: new b((e || 0) - o, 0, "block", !1),
                localVars: n.localVars,
                context: n.localVars && new D(null, null, !1),
                indented: e || 0,
              };
              return (
                n.globalVars &&
                  "object" == typeof n.globalVars &&
                  (t.globalVars = n.globalVars),
                t
              );
            },
            token: function (e, t) {
              if (
                (e.sol() &&
                  (t.lexical.hasOwnProperty("align") || (t.lexical.align = !1),
                  (t.indented = e.indentation()),
                  v(e, t)),
                t.tokenize != g && e.eatSpace())
              )
                return null;
              var n = t.tokenize(e, t);
              return "comment" == r
                ? n
                : ((t.lastType =
                    "operator" != r || ("++" != i && "--" != i) ? r : "incdec"),
                  (function (e, t, n, r, i) {
                    var o = e.cc;
                    for (
                      C.state = e,
                        C.stream = i,
                        C.marked = null,
                        C.cc = o,
                        C.style = t,
                        e.lexical.hasOwnProperty("align") ||
                          (e.lexical.align = !0);
                      ;

                    )
                      if ((o.length ? o.pop() : l ? H : N)(n, r)) {
                        for (; o.length && o[o.length - 1].lex; ) o.pop()();
                        return C.marked
                          ? C.marked
                          : "variable" == n && S(e, r)
                          ? "variable-2"
                          : t;
                      }
                  })(t, n, r, i, e));
            },
            indent: function (t, r) {
              if (t.tokenize == g) return e.Pass;
              if (t.tokenize != m) return 0;
              var i,
                a = r && r.charAt(0),
                l = t.lexical;
              if (!/^\s*else\b/.test(r))
                for (var c = t.cc.length - 1; c >= 0; --c) {
                  var u = t.cc[c];
                  if (u == L) l = l.prev;
                  else if (u != ke) break;
                }
              for (
                ;
                ("stat" == l.type || "form" == l.type) &&
                ("}" == a ||
                  ((i = t.cc[t.cc.length - 1]) &&
                    (i == V || i == G) &&
                    !/^[,\.=+\-*:?[\(]/.test(r)));

              )
                l = l.prev;
              s && ")" == l.type && "stat" == l.prev.type && (l = l.prev);
              var h = l.type,
                p = a == h;
              return "vardef" == h
                ? l.indented +
                    ("operator" == t.lastType || "," == t.lastType
                      ? l.info.length + 1
                      : 0)
                : "form" == h && "{" == a
                ? l.indented
                : "form" == h
                ? l.indented + o
                : "stat" == h
                ? l.indented +
                  ((function (e, t) {
                    return (
                      "operator" == e.lastType ||
                      "," == e.lastType ||
                      d.test(t.charAt(0)) ||
                      /[,.]/.test(t.charAt(0))
                    );
                  })(t, r)
                    ? s || o
                    : 0)
                : "switch" != l.info || p || 0 == n.doubleIndentSwitch
                ? l.align
                  ? l.column + (p ? 0 : 1)
                  : l.indented + (p ? 0 : o)
                : l.indented + (/^(?:case|default)\b/.test(r) ? o : 2 * o);
            },
            electricInput: /^\s*(?:case .*?:|default:|\{|\})$/,
            blockCommentStart: l ? null : "/*",
            blockCommentEnd: l ? null : "*/",
            blockCommentContinue: l ? null : " * ",
            lineComment: l ? null : "//",
            fold: "brace",
            closeBrackets: "()[]{}''\"\"``",
            helperType: l ? "json" : "javascript",
            jsonldMode: a,
            jsonMode: l,
            expressionAllowed: qe,
            skipExpression: function (e) {
              var t = e.cc[e.cc.length - 1];
              (t != H && t != z) || e.cc.pop();
            },
          }
        );
      }),
        e.registerHelper("wordChars", "javascript", /[\w$]/),
        e.defineMIME("text/javascript", "javascript"),
        e.defineMIME("text/ecmascript", "javascript"),
        e.defineMIME("application/javascript", "javascript"),
        e.defineMIME("application/x-javascript", "javascript"),
        e.defineMIME("application/ecmascript", "javascript"),
        e.defineMIME("application/json", { name: "javascript", json: !0 }),
        e.defineMIME("application/x-json", { name: "javascript", json: !0 }),
        e.defineMIME("application/ld+json", { name: "javascript", jsonld: !0 }),
        e.defineMIME("text/typescript", { name: "javascript", typescript: !0 }),
        e.defineMIME("application/typescript", {
          name: "javascript",
          typescript: !0,
        });
    })(n(14));
  },
  function (e, t, n) {
    !(function (e) {
      "use strict";
      function t(e) {
        e.state.markedSelection &&
          e.operation(function () {
            !(function (e) {
              if (!e.somethingSelected()) return s(e);
              if (e.listSelections().length > 1) return a(e);
              var t = e.getCursor("start"),
                n = e.getCursor("end"),
                r = e.state.markedSelection;
              if (!r.length) return o(e, t, n);
              var l = r[0].find(),
                c = r[r.length - 1].find();
              if (
                !l ||
                !c ||
                n.line - t.line <= 8 ||
                i(t, c.to) >= 0 ||
                i(n, l.from) <= 0
              )
                return a(e);
              for (; i(t, l.from) > 0; ) r.shift().clear(), (l = r[0].find());
              for (
                i(t, l.from) < 0 &&
                (l.to.line - t.line < 8
                  ? (r.shift().clear(), o(e, t, l.to, 0))
                  : o(e, t, l.from, 0));
                i(n, c.to) < 0;

              )
                r.pop().clear(), (c = r[r.length - 1].find());
              i(n, c.to) > 0 &&
                (n.line - c.from.line < 8
                  ? (r.pop().clear(), o(e, c.from, n))
                  : o(e, c.to, n));
            })(e);
          });
      }
      function n(e) {
        e.state.markedSelection &&
          e.state.markedSelection.length &&
          e.operation(function () {
            s(e);
          });
      }
      e.defineOption("styleSelectedText", !1, function (r, i, o) {
        var l = o && o != e.Init;
        i && !l
          ? ((r.state.markedSelection = []),
            (r.state.markedSelectionStyle =
              "string" == typeof i ? i : "CodeMirror-selectedtext"),
            a(r),
            r.on("cursorActivity", t),
            r.on("change", n))
          : !i &&
            l &&
            (r.off("cursorActivity", t),
            r.off("change", n),
            s(r),
            (r.state.markedSelection = r.state.markedSelectionStyle = null));
      });
      var r = e.Pos,
        i = e.cmpPos;
      function o(e, t, n, o) {
        if (0 != i(t, n))
          for (
            var s = e.state.markedSelection,
              a = e.state.markedSelectionStyle,
              l = t.line;
            ;

          ) {
            var c = l == t.line ? t : r(l, 0),
              u = l + 8,
              h = u >= n.line,
              d = h ? n : r(u, 0),
              p = e.markText(c, d, { className: a });
            if ((null == o ? s.push(p) : s.splice(o++, 0, p), h)) break;
            l = u;
          }
      }
      function s(e) {
        for (var t = e.state.markedSelection, n = 0; n < t.length; ++n)
          t[n].clear();
        t.length = 0;
      }
      function a(e) {
        s(e);
        for (var t = e.listSelections(), n = 0; n < t.length; n++)
          o(e, t[n].from(), t[n].to());
      }
    })(n(14));
  },
  function (e, t, n) {
    !(function (e) {
      "use strict";
      function t(e, t) {
        (this.cm = e),
          (this.options = t),
          (this.widget = null),
          (this.debounce = 0),
          (this.tick = 0),
          (this.startPos = this.cm.getCursor("start")),
          (this.startLen =
            this.cm.getLine(this.startPos.line).length -
            this.cm.getSelection().length);
        var n = this;
        e.on(
          "cursorActivity",
          (this.activityFunc = function () {
            n.cursorActivity();
          })
        );
      }
      (e.showHint = function (e, t, n) {
        if (!t) return e.showHint(n);
        n && n.async && (t.async = !0);
        var r = { hint: t };
        if (n) for (var i in n) r[i] = n[i];
        return e.showHint(r);
      }),
        e.defineExtension("showHint", function (n) {
          n = (function (e, t, n) {
            var r = e.options.hintOptions,
              i = {};
            for (var o in l) i[o] = l[o];
            if (r) for (var o in r) void 0 !== r[o] && (i[o] = r[o]);
            if (n) for (var o in n) void 0 !== n[o] && (i[o] = n[o]);
            return i.hint.resolve && (i.hint = i.hint.resolve(e, t)), i;
          })(this, this.getCursor("start"), n);
          var r = this.listSelections();
          if (!(r.length > 1)) {
            if (this.somethingSelected()) {
              if (!n.hint.supportsSelection) return;
              for (var i = 0; i < r.length; i++)
                if (r[i].head.line != r[i].anchor.line) return;
            }
            this.state.completionActive && this.state.completionActive.close();
            var o = (this.state.completionActive = new t(this, n));
            o.options.hint &&
              (e.signal(this, "startCompletion", this), o.update(!0));
          }
        }),
        e.defineExtension("closeHint", function () {
          this.state.completionActive && this.state.completionActive.close();
        });
      var n =
          window.requestAnimationFrame ||
          function (e) {
            return setTimeout(e, 1e3 / 60);
          },
        r = window.cancelAnimationFrame || clearTimeout;
      function i(e) {
        return "string" == typeof e ? e : e.text;
      }
      function o(e, t) {
        for (; t && t != e; ) {
          if ("LI" === t.nodeName.toUpperCase() && t.parentNode == e) return t;
          t = t.parentNode;
        }
      }
      function s(t, n) {
        (this.completion = t), (this.data = n), (this.picked = !1);
        var r = this,
          s = t.cm,
          a = s.getInputField().ownerDocument,
          l = a.defaultView || a.parentWindow,
          c = (this.hints = a.createElement("ul")),
          u = t.cm.options.theme;
        (c.className = "CodeMirror-hints " + u),
          (this.selectedHint = n.selectedHint || 0);
        for (var h = n.list, d = 0; d < h.length; ++d) {
          var p = c.appendChild(a.createElement("li")),
            f = h[d],
            m =
              "CodeMirror-hint" +
              (d != this.selectedHint ? "" : " CodeMirror-hint-active");
          null != f.className && (m = f.className + " " + m),
            (p.className = m),
            f.render
              ? f.render(p, n, f)
              : p.appendChild(a.createTextNode(f.displayText || i(f))),
            (p.hintId = d);
        }
        var g = t.options.container || a.body,
          y = s.cursorCoords(t.options.alignWithWord ? n.from : null),
          v = y.left,
          w = y.bottom,
          b = !0,
          S = 0,
          C = 0;
        if (g !== a.body) {
          var E =
              -1 !==
              ["absolute", "relative", "fixed"].indexOf(
                l.getComputedStyle(g).position
              )
                ? g
                : g.offsetParent,
            k = E.getBoundingClientRect(),
            x = a.body.getBoundingClientRect();
          (S = k.left - x.left - E.scrollLeft),
            (C = k.top - x.top - E.scrollTop);
        }
        (c.style.left = v - S + "px"), (c.style.top = w - C + "px");
        var R =
            l.innerWidth ||
            Math.max(a.body.offsetWidth, a.documentElement.offsetWidth),
          T =
            l.innerHeight ||
            Math.max(a.body.offsetHeight, a.documentElement.offsetHeight);
        g.appendChild(c);
        var D = c.getBoundingClientRect(),
          A = D.bottom - T,
          _ = c.scrollHeight > c.clientHeight + 1,
          M = s.getScrollInfo();
        if (A > 0) {
          var P = D.bottom - D.top;
          if (y.top - (y.bottom - D.top) - P > 0)
            (c.style.top = (w = y.top - P - C) + "px"), (b = !1);
          else if (P > T) {
            (c.style.height = T - 5 + "px"),
              (c.style.top = (w = y.bottom - D.top - C) + "px");
            var I = s.getCursor();
            n.from.ch != I.ch &&
              ((y = s.cursorCoords(I)),
              (c.style.left = (v = y.left - S) + "px"),
              (D = c.getBoundingClientRect()));
          }
        }
        var O,
          L = D.right - R;
        if (
          (L > 0 &&
            (D.right - D.left > R &&
              ((c.style.width = R - 5 + "px"), (L -= D.right - D.left - R)),
            (c.style.left = (v = y.left - L - S) + "px")),
          _)
        )
          for (var F = c.firstChild; F; F = F.nextSibling)
            F.style.paddingRight = s.display.nativeBarWidth + "px";
        return (
          s.addKeyMap(
            (this.keyMap = (function (e, t) {
              var n = {
                Up: function () {
                  t.moveFocus(-1);
                },
                Down: function () {
                  t.moveFocus(1);
                },
                PageUp: function () {
                  t.moveFocus(1 - t.menuSize(), !0);
                },
                PageDown: function () {
                  t.moveFocus(t.menuSize() - 1, !0);
                },
                Home: function () {
                  t.setFocus(0);
                },
                End: function () {
                  t.setFocus(t.length - 1);
                },
                Enter: t.pick,
                Tab: t.pick,
                Esc: t.close,
              };
              /Mac/.test(navigator.platform) &&
                ((n["Ctrl-P"] = function () {
                  t.moveFocus(-1);
                }),
                (n["Ctrl-N"] = function () {
                  t.moveFocus(1);
                }));
              var r = e.options.customKeys,
                i = r ? {} : n;
              function o(e, r) {
                var o;
                (o =
                  "string" != typeof r
                    ? function (e) {
                        return r(e, t);
                      }
                    : n.hasOwnProperty(r)
                    ? n[r]
                    : r),
                  (i[e] = o);
              }
              if (r) for (var s in r) r.hasOwnProperty(s) && o(s, r[s]);
              var a = e.options.extraKeys;
              if (a) for (var s in a) a.hasOwnProperty(s) && o(s, a[s]);
              return i;
            })(t, {
              moveFocus: function (e, t) {
                r.changeActive(r.selectedHint + e, t);
              },
              setFocus: function (e) {
                r.changeActive(e);
              },
              menuSize: function () {
                return r.screenAmount();
              },
              length: h.length,
              close: function () {
                t.close();
              },
              pick: function () {
                r.pick();
              },
              data: n,
            }))
          ),
          t.options.closeOnUnfocus &&
            (s.on(
              "blur",
              (this.onBlur = function () {
                O = setTimeout(function () {
                  t.close();
                }, 100);
              })
            ),
            s.on(
              "focus",
              (this.onFocus = function () {
                clearTimeout(O);
              })
            )),
          s.on(
            "scroll",
            (this.onScroll = function () {
              var e = s.getScrollInfo(),
                n = s.getWrapperElement().getBoundingClientRect(),
                r = w + M.top - e.top,
                i =
                  r -
                  (l.pageYOffset || (a.documentElement || a.body).scrollTop);
              if ((b || (i += c.offsetHeight), i <= n.top || i >= n.bottom))
                return t.close();
              (c.style.top = r + "px"),
                (c.style.left = v + M.left - e.left + "px");
            })
          ),
          e.on(c, "dblclick", function (e) {
            var t = o(c, e.target || e.srcElement);
            t && null != t.hintId && (r.changeActive(t.hintId), r.pick());
          }),
          e.on(c, "click", function (e) {
            var n = o(c, e.target || e.srcElement);
            n &&
              null != n.hintId &&
              (r.changeActive(n.hintId),
              t.options.completeOnSingleClick && r.pick());
          }),
          e.on(c, "mousedown", function () {
            setTimeout(function () {
              s.focus();
            }, 20);
          }),
          e.signal(
            n,
            "select",
            h[this.selectedHint],
            c.childNodes[this.selectedHint]
          ),
          !0
        );
      }
      function a(e, t, n, r) {
        if (e.async) e(t, r, n);
        else {
          var i = e(t, n);
          i && i.then ? i.then(r) : r(i);
        }
      }
      (t.prototype = {
        close: function () {
          this.active() &&
            ((this.cm.state.completionActive = null),
            (this.tick = null),
            this.cm.off("cursorActivity", this.activityFunc),
            this.widget && this.data && e.signal(this.data, "close"),
            this.widget && this.widget.close(),
            e.signal(this.cm, "endCompletion", this.cm));
        },
        active: function () {
          return this.cm.state.completionActive == this;
        },
        pick: function (t, n) {
          var r = t.list[n];
          r.hint
            ? r.hint(this.cm, t, r)
            : this.cm.replaceRange(
                i(r),
                r.from || t.from,
                r.to || t.to,
                "complete"
              ),
            e.signal(t, "pick", r),
            this.close();
        },
        cursorActivity: function () {
          this.debounce && (r(this.debounce), (this.debounce = 0));
          var e = this.cm.getCursor(),
            t = this.cm.getLine(e.line);
          if (
            e.line != this.startPos.line ||
            t.length - e.ch != this.startLen - this.startPos.ch ||
            e.ch < this.startPos.ch ||
            this.cm.somethingSelected() ||
            !e.ch ||
            this.options.closeCharacters.test(t.charAt(e.ch - 1))
          )
            this.close();
          else {
            var i = this;
            (this.debounce = n(function () {
              i.update();
            })),
              this.widget && this.widget.disable();
          }
        },
        update: function (e) {
          if (null != this.tick) {
            var t = this,
              n = ++this.tick;
            a(this.options.hint, this.cm, this.options, function (r) {
              t.tick == n && t.finishUpdate(r, e);
            });
          }
        },
        finishUpdate: function (t, n) {
          this.data && e.signal(this.data, "update");
          var r =
            (this.widget && this.widget.picked) ||
            (n && this.options.completeSingle);
          this.widget && this.widget.close(),
            (this.data = t),
            t &&
              t.list.length &&
              (r && 1 == t.list.length
                ? this.pick(t, 0)
                : ((this.widget = new s(this, t)), e.signal(t, "shown")));
        },
      }),
        (s.prototype = {
          close: function () {
            if (this.completion.widget == this) {
              (this.completion.widget = null),
                this.hints.parentNode.removeChild(this.hints),
                this.completion.cm.removeKeyMap(this.keyMap);
              var e = this.completion.cm;
              this.completion.options.closeOnUnfocus &&
                (e.off("blur", this.onBlur), e.off("focus", this.onFocus)),
                e.off("scroll", this.onScroll);
            }
          },
          disable: function () {
            this.completion.cm.removeKeyMap(this.keyMap);
            var e = this;
            (this.keyMap = {
              Enter: function () {
                e.picked = !0;
              },
            }),
              this.completion.cm.addKeyMap(this.keyMap);
          },
          pick: function () {
            this.completion.pick(this.data, this.selectedHint);
          },
          changeActive: function (t, n) {
            if (
              (t >= this.data.list.length
                ? (t = n ? this.data.list.length - 1 : 0)
                : t < 0 && (t = n ? 0 : this.data.list.length - 1),
              this.selectedHint != t)
            ) {
              var r = this.hints.childNodes[this.selectedHint];
              r &&
                (r.className = r.className.replace(
                  " CodeMirror-hint-active",
                  ""
                )),
                ((r = this.hints.childNodes[
                  (this.selectedHint = t)
                ]).className += " CodeMirror-hint-active"),
                r.offsetTop < this.hints.scrollTop
                  ? (this.hints.scrollTop = r.offsetTop - 3)
                  : r.offsetTop + r.offsetHeight >
                      this.hints.scrollTop + this.hints.clientHeight &&
                    (this.hints.scrollTop =
                      r.offsetTop +
                      r.offsetHeight -
                      this.hints.clientHeight +
                      3),
                e.signal(
                  this.data,
                  "select",
                  this.data.list[this.selectedHint],
                  r
                );
            }
          },
          screenAmount: function () {
            return (
              Math.floor(
                this.hints.clientHeight / this.hints.firstChild.offsetHeight
              ) || 1
            );
          },
        }),
        e.registerHelper("hint", "auto", {
          resolve: function (t, n) {
            var r,
              i = t.getHelpers(n, "hint");
            if (i.length) {
              var o = function (e, t, n) {
                var r = (function (e, t) {
                  if (!e.somethingSelected()) return t;
                  for (var n = [], r = 0; r < t.length; r++)
                    t[r].supportsSelection && n.push(t[r]);
                  return n;
                })(e, i);
                !(function i(o) {
                  if (o == r.length) return t(null);
                  a(r[o], e, n, function (e) {
                    e && e.list.length > 0 ? t(e) : i(o + 1);
                  });
                })(0);
              };
              return (o.async = !0), (o.supportsSelection = !0), o;
            }
            return (r = t.getHelper(t.getCursor(), "hintWords"))
              ? function (t) {
                  return e.hint.fromList(t, { words: r });
                }
              : e.hint.anyword
              ? function (t, n) {
                  return e.hint.anyword(t, n);
                }
              : function () {};
          },
        }),
        e.registerHelper("hint", "fromList", function (t, n) {
          var r,
            i = t.getCursor(),
            o = t.getTokenAt(i),
            s = e.Pos(i.line, o.start),
            a = i;
          o.start < i.ch && /\w/.test(o.string.charAt(i.ch - o.start - 1))
            ? (r = o.string.substr(0, i.ch - o.start))
            : ((r = ""), (s = i));
          for (var l = [], c = 0; c < n.words.length; c++) {
            var u = n.words[c];
            u.slice(0, r.length) == r && l.push(u);
          }
          if (l.length) return { list: l, from: s, to: a };
        }),
        (e.commands.autocomplete = e.showHint);
      var l = {
        hint: e.hint.auto,
        completeSingle: !0,
        alignWithWord: !0,
        closeCharacters: /[\s()\[\]{};:>,]/,
        closeOnUnfocus: !0,
        completeOnSingleClick: !0,
        container: null,
        customKeys: null,
        extraKeys: null,
      };
      e.defineOption("hintOptions", null);
    })(n(14));
  },
  function (e, t, n) {
    !(function (e) {
      "use strict";
      function t() {
        (this.posFrom = this.posTo = this.lastQuery = this.query = null),
          (this.overlay = null);
      }
      function n(e) {
        return e.state.search || (e.state.search = new t());
      }
      function r(e) {
        return "string" == typeof e && e == e.toLowerCase();
      }
      function i(e, t, n) {
        return e.getSearchCursor(t, n, { caseFold: r(t), multiline: !0 });
      }
      function o(e, t, n, r, i) {
        e.openDialog
          ? e.openDialog(t, i, { value: r, selectValueOnOpen: !0 })
          : i(prompt(n, r));
      }
      function s(e) {
        return e.replace(/\\([nrt\\])/g, function (e, t) {
          return "n" == t
            ? "\n"
            : "r" == t
            ? "\r"
            : "t" == t
            ? "\t"
            : "\\" == t
            ? "\\"
            : e;
        });
      }
      function a(e) {
        var t = e.match(/^\/(.*)\/([a-z]*)$/);
        if (t)
          try {
            e = new RegExp(t[1], -1 == t[2].indexOf("i") ? "" : "i");
          } catch (e) {}
        else e = s(e);
        return ("string" == typeof e ? "" == e : e.test("")) && (e = /x^/), e;
      }
      function l(e, t, n) {
        (t.queryText = n),
          (t.query = a(n)),
          e.removeOverlay(t.overlay, r(t.query)),
          (t.overlay = (function (e, t) {
            return (
              "string" == typeof e
                ? (e = new RegExp(
                    e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"),
                    t ? "gi" : "g"
                  ))
                : e.global ||
                  (e = new RegExp(e.source, e.ignoreCase ? "gi" : "g")),
              {
                token: function (t) {
                  e.lastIndex = t.pos;
                  var n = e.exec(t.string);
                  if (n && n.index == t.pos)
                    return (t.pos += n[0].length || 1), "searching";
                  n ? (t.pos = n.index) : t.skipToEnd();
                },
              }
            );
          })(t.query, r(t.query))),
          e.addOverlay(t.overlay),
          e.showMatchesOnScrollbar &&
            (t.annotate && (t.annotate.clear(), (t.annotate = null)),
            (t.annotate = e.showMatchesOnScrollbar(t.query, r(t.query))));
      }
      function c(t, r, i, s) {
        var a = n(t);
        if (a.query) return u(t, r);
        var c = t.getSelection() || a.lastQuery;
        if (
          (c instanceof RegExp && "x^" == c.source && (c = null),
          i && t.openDialog)
        ) {
          var p = null,
            f = function (n, r) {
              e.e_stop(r),
                n &&
                  (n != a.queryText &&
                    (l(t, a, n), (a.posFrom = a.posTo = t.getCursor())),
                  p && (p.style.opacity = 1),
                  u(t, r.shiftKey, function (e, n) {
                    var r;
                    n.line < 3 &&
                      document.querySelector &&
                      (r = t.display.wrapper.querySelector(
                        ".CodeMirror-dialog"
                      )) &&
                      r.getBoundingClientRect().bottom - 4 >
                        t.cursorCoords(n, "window").top &&
                      ((p = r).style.opacity = 0.4);
                  }));
            };
          !(function (e, t, n, r, i) {
            e.openDialog(t, r, {
              value: n,
              selectValueOnOpen: !0,
              closeOnEnter: !1,
              onClose: function () {
                h(e);
              },
              onKeyDown: i,
            });
          })(t, d(t), c, f, function (r, i) {
            var o = e.keyName(r),
              s = t.getOption("extraKeys"),
              a = (s && s[o]) || e.keyMap[t.getOption("keyMap")][o];
            "findNext" == a ||
            "findPrev" == a ||
            "findPersistentNext" == a ||
            "findPersistentPrev" == a
              ? (e.e_stop(r), l(t, n(t), i), t.execCommand(a))
              : ("find" != a && "findPersistent" != a) ||
                (e.e_stop(r), f(i, r));
          }),
            s && c && (l(t, a, c), u(t, r));
        } else
          o(t, d(t), "Search for:", c, function (e) {
            e &&
              !a.query &&
              t.operation(function () {
                l(t, a, e), (a.posFrom = a.posTo = t.getCursor()), u(t, r);
              });
          });
      }
      function u(t, r, o) {
        t.operation(function () {
          var s = n(t),
            a = i(t, s.query, r ? s.posFrom : s.posTo);
          (a.find(r) ||
            (a = i(
              t,
              s.query,
              r ? e.Pos(t.lastLine()) : e.Pos(t.firstLine(), 0)
            )).find(r)) &&
            (t.setSelection(a.from(), a.to()),
            t.scrollIntoView({ from: a.from(), to: a.to() }, 20),
            (s.posFrom = a.from()),
            (s.posTo = a.to()),
            o && o(a.from(), a.to()));
        });
      }
      function h(e) {
        e.operation(function () {
          var t = n(e);
          (t.lastQuery = t.query),
            t.query &&
              ((t.query = t.queryText = null),
              e.removeOverlay(t.overlay),
              t.annotate && (t.annotate.clear(), (t.annotate = null)));
        });
      }
      function d(e) {
        return (
          '<span class="CodeMirror-search-label">' +
          e.phrase("Search:") +
          '</span> <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">' +
          e.phrase("(Use /re/ syntax for regexp search)") +
          "</span>"
        );
      }
      function p(e, t, n) {
        e.operation(function () {
          for (var r = i(e, t); r.findNext(); )
            if ("string" != typeof t) {
              var o = e.getRange(r.from(), r.to()).match(t);
              r.replace(
                n.replace(/\$(\d)/g, function (e, t) {
                  return o[t];
                })
              );
            } else r.replace(n);
        });
      }
      function f(e, t) {
        if (!e.getOption("readOnly")) {
          var r = e.getSelection() || n(e).lastQuery,
            l =
              '<span class="CodeMirror-search-label">' +
              (t ? e.phrase("Replace all:") : e.phrase("Replace:")) +
              "</span>";
          o(
            e,
            l +
              (function (e) {
                return (
                  ' <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">' +
                  e.phrase("(Use /re/ syntax for regexp search)") +
                  "</span>"
                );
              })(e),
            l,
            r,
            function (n) {
              n &&
                ((n = a(n)),
                o(
                  e,
                  (function (e) {
                    return (
                      '<span class="CodeMirror-search-label">' +
                      e.phrase("With:") +
                      '</span> <input type="text" style="width: 10em" class="CodeMirror-search-field"/>'
                    );
                  })(e),
                  e.phrase("Replace with:"),
                  "",
                  function (r) {
                    if (((r = s(r)), t)) p(e, n, r);
                    else {
                      h(e);
                      var o = i(e, n, e.getCursor("from")),
                        a = function () {
                          var t,
                            s = o.from();
                          (!(t = o.findNext()) &&
                            ((o = i(e, n)),
                            !(t = o.findNext()) ||
                              (s &&
                                o.from().line == s.line &&
                                o.from().ch == s.ch))) ||
                            (e.setSelection(o.from(), o.to()),
                            e.scrollIntoView({ from: o.from(), to: o.to() }),
                            (function (e, t, n, r) {
                              e.openConfirm
                                ? e.openConfirm(t, r)
                                : confirm(n) && r[0]();
                            })(
                              e,
                              (function (e) {
                                return (
                                  '<span class="CodeMirror-search-label">' +
                                  e.phrase("Replace?") +
                                  "</span> <button>" +
                                  e.phrase("Yes") +
                                  "</button> <button>" +
                                  e.phrase("No") +
                                  "</button> <button>" +
                                  e.phrase("All") +
                                  "</button> <button>" +
                                  e.phrase("Stop") +
                                  "</button> "
                                );
                              })(e),
                              e.phrase("Replace?"),
                              [
                                function () {
                                  l(t);
                                },
                                a,
                                function () {
                                  p(e, n, r);
                                },
                              ]
                            ));
                        },
                        l = function (e) {
                          o.replace(
                            "string" == typeof n
                              ? r
                              : r.replace(/\$(\d)/g, function (t, n) {
                                  return e[n];
                                })
                          ),
                            a();
                        };
                      a();
                    }
                  }
                ));
            }
          );
        }
      }
      (e.commands.find = function (e) {
        h(e), c(e);
      }),
        (e.commands.findPersistent = function (e) {
          h(e), c(e, !1, !0);
        }),
        (e.commands.findPersistentNext = function (e) {
          c(e, !1, !0, !0);
        }),
        (e.commands.findPersistentPrev = function (e) {
          c(e, !0, !0, !0);
        }),
        (e.commands.findNext = c),
        (e.commands.findPrev = function (e) {
          c(e, !0);
        }),
        (e.commands.clearSearch = h),
        (e.commands.replace = f),
        (e.commands.replaceAll = function (e) {
          f(e, !0);
        });
    })(n(14), n(290), n(291));
  },
  function (e, t, n) {
    !(function (e) {
      "use strict";
      var t,
        n,
        r = e.Pos;
      function i(e, t) {
        for (
          var n = (function (e) {
              var t = e.flags;
              return null != t
                ? t
                : (e.ignoreCase ? "i" : "") +
                    (e.global ? "g" : "") +
                    (e.multiline ? "m" : "");
            })(e),
            r = n,
            i = 0;
          i < t.length;
          i++
        )
          -1 == r.indexOf(t.charAt(i)) && (r += t.charAt(i));
        return n == r ? e : new RegExp(e.source, r);
      }
      function o(e, t, n) {
        t = i(t, "g");
        for (var o = n.line, s = n.ch, a = e.lastLine(); o <= a; o++, s = 0) {
          t.lastIndex = s;
          var l = e.getLine(o),
            c = t.exec(l);
          if (c)
            return {
              from: r(o, c.index),
              to: r(o, c.index + c[0].length),
              match: c,
            };
        }
      }
      function s(e, t, n) {
        if (
          !(function (e) {
            return /\\s|\\n|\n|\\W|\\D|\[\^/.test(e.source);
          })(t)
        )
          return o(e, t, n);
        t = i(t, "gm");
        for (var s, a = 1, l = n.line, c = e.lastLine(); l <= c; ) {
          for (var u = 0; u < a && !(l > c); u++) {
            var h = e.getLine(l++);
            s = null == s ? h : s + "\n" + h;
          }
          (a *= 2), (t.lastIndex = n.ch);
          var d = t.exec(s);
          if (d) {
            var p = s.slice(0, d.index).split("\n"),
              f = d[0].split("\n"),
              m = n.line + p.length - 1,
              g = p[p.length - 1].length;
            return {
              from: r(m, g),
              to: r(
                m + f.length - 1,
                1 == f.length ? g + f[0].length : f[f.length - 1].length
              ),
              match: d,
            };
          }
        }
      }
      function a(e, t) {
        for (var n, r = 0; ; ) {
          t.lastIndex = r;
          var i = t.exec(e);
          if (!i) return n;
          if ((r = (n = i).index + (n[0].length || 1)) == e.length) return n;
        }
      }
      function l(e, t, n) {
        t = i(t, "g");
        for (var o = n.line, s = n.ch, l = e.firstLine(); o >= l; o--, s = -1) {
          var c = e.getLine(o);
          s > -1 && (c = c.slice(0, s));
          var u = a(c, t);
          if (u)
            return {
              from: r(o, u.index),
              to: r(o, u.index + u[0].length),
              match: u,
            };
        }
      }
      function c(e, t, n) {
        t = i(t, "gm");
        for (var o, s = 1, l = n.line, c = e.firstLine(); l >= c; ) {
          for (var u = 0; u < s; u++) {
            var h = e.getLine(l--);
            o = null == o ? h.slice(0, n.ch) : h + "\n" + o;
          }
          s *= 2;
          var d = a(o, t);
          if (d) {
            var p = o.slice(0, d.index).split("\n"),
              f = d[0].split("\n"),
              m = l + p.length,
              g = p[p.length - 1].length;
            return {
              from: r(m, g),
              to: r(
                m + f.length - 1,
                1 == f.length ? g + f[0].length : f[f.length - 1].length
              ),
              match: d,
            };
          }
        }
      }
      function u(e, t, n, r) {
        if (e.length == t.length) return n;
        for (var i = 0, o = n + Math.max(0, e.length - t.length); ; ) {
          if (i == o) return i;
          var s = (i + o) >> 1,
            a = r(e.slice(0, s)).length;
          if (a == n) return s;
          a > n ? (o = s) : (i = s + 1);
        }
      }
      function h(e, i, o, s) {
        if (!i.length) return null;
        var a = s ? t : n,
          l = a(i).split(/\r|\n\r?/);
        e: for (
          var c = o.line, h = o.ch, d = e.lastLine() + 1 - l.length;
          c <= d;
          c++, h = 0
        ) {
          var p = e.getLine(c).slice(h),
            f = a(p);
          if (1 == l.length) {
            var m = f.indexOf(l[0]);
            if (-1 == m) continue e;
            return (
              (o = u(p, f, m, a) + h),
              {
                from: r(c, u(p, f, m, a) + h),
                to: r(c, u(p, f, m + l[0].length, a) + h),
              }
            );
          }
          var g = f.length - l[0].length;
          if (f.slice(g) == l[0]) {
            for (var y = 1; y < l.length - 1; y++)
              if (a(e.getLine(c + y)) != l[y]) continue e;
            var v = e.getLine(c + l.length - 1),
              w = a(v),
              b = l[l.length - 1];
            if (w.slice(0, b.length) == b)
              return {
                from: r(c, u(p, f, g, a) + h),
                to: r(c + l.length - 1, u(v, w, b.length, a)),
              };
          }
        }
      }
      function d(e, i, o, s) {
        if (!i.length) return null;
        var a = s ? t : n,
          l = a(i).split(/\r|\n\r?/);
        e: for (
          var c = o.line, h = o.ch, d = e.firstLine() - 1 + l.length;
          c >= d;
          c--, h = -1
        ) {
          var p = e.getLine(c);
          h > -1 && (p = p.slice(0, h));
          var f = a(p);
          if (1 == l.length) {
            var m = f.lastIndexOf(l[0]);
            if (-1 == m) continue e;
            return {
              from: r(c, u(p, f, m, a)),
              to: r(c, u(p, f, m + l[0].length, a)),
            };
          }
          var g = l[l.length - 1];
          if (f.slice(0, g.length) == g) {
            var y = 1;
            for (o = c - l.length + 1; y < l.length - 1; y++)
              if (a(e.getLine(o + y)) != l[y]) continue e;
            var v = e.getLine(c + 1 - l.length),
              w = a(v);
            if (w.slice(w.length - l[0].length) == l[0])
              return {
                from: r(c + 1 - l.length, u(v, w, v.length - l[0].length, a)),
                to: r(c, u(p, f, g.length, a)),
              };
          }
        }
      }
      function p(e, t, n, a) {
        var u;
        (this.atOccurrence = !1),
          (this.doc = e),
          (n = n ? e.clipPos(n) : r(0, 0)),
          (this.pos = { from: n, to: n }),
          "object" == typeof a ? (u = a.caseFold) : ((u = a), (a = null)),
          "string" == typeof t
            ? (null == u && (u = !1),
              (this.matches = function (n, r) {
                return (n ? d : h)(e, t, r, u);
              }))
            : ((t = i(t, "gm")),
              a && !1 === a.multiline
                ? (this.matches = function (n, r) {
                    return (n ? l : o)(e, t, r);
                  })
                : (this.matches = function (n, r) {
                    return (n ? c : s)(e, t, r);
                  }));
      }
      String.prototype.normalize
        ? ((t = function (e) {
            return e.normalize("NFD").toLowerCase();
          }),
          (n = function (e) {
            return e.normalize("NFD");
          }))
        : ((t = function (e) {
            return e.toLowerCase();
          }),
          (n = function (e) {
            return e;
          })),
        (p.prototype = {
          findNext: function () {
            return this.find(!1);
          },
          findPrevious: function () {
            return this.find(!0);
          },
          find: function (t) {
            for (
              var n = this.matches(
                t,
                this.doc.clipPos(t ? this.pos.from : this.pos.to)
              );
              n && 0 == e.cmpPos(n.from, n.to);

            )
              t
                ? n.from.ch
                  ? (n.from = r(n.from.line, n.from.ch - 1))
                  : (n =
                      n.from.line == this.doc.firstLine()
                        ? null
                        : this.matches(t, this.doc.clipPos(r(n.from.line - 1))))
                : n.to.ch < this.doc.getLine(n.to.line).length
                ? (n.to = r(n.to.line, n.to.ch + 1))
                : (n =
                    n.to.line == this.doc.lastLine()
                      ? null
                      : this.matches(t, r(n.to.line + 1, 0)));
            if (n)
              return (
                (this.pos = n), (this.atOccurrence = !0), this.pos.match || !0
              );
            var i = r(t ? this.doc.firstLine() : this.doc.lastLine() + 1, 0);
            return (this.pos = { from: i, to: i }), (this.atOccurrence = !1);
          },
          from: function () {
            if (this.atOccurrence) return this.pos.from;
          },
          to: function () {
            if (this.atOccurrence) return this.pos.to;
          },
          replace: function (t, n) {
            if (this.atOccurrence) {
              var i = e.splitLines(t);
              this.doc.replaceRange(i, this.pos.from, this.pos.to, n),
                (this.pos.to = r(
                  this.pos.from.line + i.length - 1,
                  i[i.length - 1].length +
                    (1 == i.length ? this.pos.from.ch : 0)
                ));
            }
          },
        }),
        e.defineExtension("getSearchCursor", function (e, t, n) {
          return new p(this.doc, e, t, n);
        }),
        e.defineDocExtension("getSearchCursor", function (e, t, n) {
          return new p(this, e, t, n);
        }),
        e.defineExtension("selectMatches", function (t, n) {
          for (
            var r = [], i = this.getSearchCursor(t, this.getCursor("from"), n);
            i.findNext() && !(e.cmpPos(i.to(), this.getCursor("to")) > 0);

          )
            r.push({ anchor: i.from(), head: i.to() });
          r.length && this.setSelections(r, 0);
        });
    })(n(14));
  },
  function (e, t, n) {
    !(function (e) {
      function t(t, n, r) {
        var i,
          o = t.getWrapperElement();
        return (
          ((i = o.appendChild(document.createElement("div"))).className = r
            ? "CodeMirror-dialog CodeMirror-dialog-bottom"
            : "CodeMirror-dialog CodeMirror-dialog-top"),
          "string" == typeof n ? (i.innerHTML = n) : i.appendChild(n),
          e.addClass(o, "dialog-opened"),
          i
        );
      }
      function n(e, t) {
        e.state.currentNotificationClose && e.state.currentNotificationClose(),
          (e.state.currentNotificationClose = t);
      }
      e.defineExtension("openDialog", function (r, i, o) {
        o || (o = {}), n(this, null);
        var s = t(this, r, o.bottom),
          a = !1,
          l = this;
        function c(t) {
          if ("string" == typeof t) h.value = t;
          else {
            if (a) return;
            (a = !0),
              e.rmClass(s.parentNode, "dialog-opened"),
              s.parentNode.removeChild(s),
              l.focus(),
              o.onClose && o.onClose(s);
          }
        }
        var u,
          h = s.getElementsByTagName("input")[0];
        return (
          h
            ? (h.focus(),
              o.value &&
                ((h.value = o.value), !1 !== o.selectValueOnOpen && h.select()),
              o.onInput &&
                e.on(h, "input", function (e) {
                  o.onInput(e, h.value, c);
                }),
              o.onKeyUp &&
                e.on(h, "keyup", function (e) {
                  o.onKeyUp(e, h.value, c);
                }),
              e.on(h, "keydown", function (t) {
                (o && o.onKeyDown && o.onKeyDown(t, h.value, c)) ||
                  ((27 == t.keyCode ||
                    (!1 !== o.closeOnEnter && 13 == t.keyCode)) &&
                    (h.blur(), e.e_stop(t), c()),
                  13 == t.keyCode && i(h.value, t));
              }),
              !1 !== o.closeOnBlur && e.on(h, "blur", c))
            : (u = s.getElementsByTagName("button")[0]) &&
              (e.on(u, "click", function () {
                c(), l.focus();
              }),
              !1 !== o.closeOnBlur && e.on(u, "blur", c),
              u.focus()),
          c
        );
      }),
        e.defineExtension("openConfirm", function (r, i, o) {
          n(this, null);
          var s = t(this, r, o && o.bottom),
            a = s.getElementsByTagName("button"),
            l = !1,
            c = this,
            u = 1;
          function h() {
            l ||
              ((l = !0),
              e.rmClass(s.parentNode, "dialog-opened"),
              s.parentNode.removeChild(s),
              c.focus());
          }
          a[0].focus();
          for (var d = 0; d < a.length; ++d) {
            var p = a[d];
            !(function (t) {
              e.on(p, "click", function (n) {
                e.e_preventDefault(n), h(), t && t(c);
              });
            })(i[d]),
              e.on(p, "blur", function () {
                --u,
                  setTimeout(function () {
                    u <= 0 && h();
                  }, 200);
              }),
              e.on(p, "focus", function () {
                ++u;
              });
          }
        }),
        e.defineExtension("openNotification", function (r, i) {
          n(this, c);
          var o,
            s = t(this, r, i && i.bottom),
            a = !1,
            l = i && void 0 !== i.duration ? i.duration : 5e3;
          function c() {
            a ||
              ((a = !0),
              clearTimeout(o),
              e.rmClass(s.parentNode, "dialog-opened"),
              s.parentNode.removeChild(s));
          }
          return (
            e.on(s, "click", function (t) {
              e.e_preventDefault(t), c();
            }),
            l && (o = setTimeout(c, l)),
            c
          );
        });
    })(n(14));
  },
  function (e, t, n) {
    n(293);
    var r = n(22).Object;
    e.exports = function (e, t) {
      return r.getOwnPropertyDescriptor(e, t);
    };
  },
  function (e, t, n) {
    var r = n(33),
      i = n(80).f;
    n(73)("getOwnPropertyDescriptor", function () {
      return function (e, t) {
        return i(r(e), t);
      };
    });
  },
  function (e, t, n) {
    "use strict";
    var r = n(295);
    function i() {}
    e.exports = function () {
      function e(e, t, n, i, o, s) {
        if (s !== r) {
          var a = new Error(
            "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
          );
          throw ((a.name = "Invariant Violation"), a);
        }
      }
      function t() {
        return e;
      }
      e.isRequired = e;
      var n = {
        array: e,
        bool: e,
        func: e,
        number: e,
        object: e,
        string: e,
        symbol: e,
        any: e,
        arrayOf: t,
        element: e,
        instanceOf: t,
        node: e,
        objectOf: t,
        oneOf: t,
        oneOfType: t,
        shape: t,
        exact: t,
      };
      return (n.checkPropTypes = i), (n.PropTypes = n), n;
    };
  },
  function (e, t, n) {
    "use strict";
    e.exports = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
  },
  function (e, t) {
    e.exports = function () {
      for (var e = arguments.length, t = [], n = 0; n < e; n++)
        t[n] = arguments[n];
      if (
        0 !==
        (t = t.filter(function (e) {
          return null != e;
        })).length
      )
        return 1 === t.length
          ? t[0]
          : t.reduce(function (e, t) {
              return function () {
                e.apply(this, arguments), t.apply(this, arguments);
              };
            });
    };
  },
  function (e, t, n) {
    "use strict";
    e.exports = function () {};
  },
  function (e, t, n) {
    "use strict";
    Object.defineProperty(t, "__esModule", { value: !0 });
    var r,
      i,
      o =
        Object.assign ||
        function (e) {
          for (var t = 1; t < arguments.length; t++) {
            var n = arguments[t];
            for (var r in n)
              Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
          }
          return e;
        },
      s = f(n(299)),
      a = f(n(301)),
      l = f(n(121)),
      c = n(302),
      u = f(n(0)),
      h = f(n(83)),
      d = n(15),
      p = n(122);
    function f(e) {
      return e && e.__esModule ? e : { default: e };
    }
    function m(e, t) {
      for (var n = Object.getOwnPropertyNames(t), r = 0; r < n.length; r++) {
        var i = n[r],
          o = Object.getOwnPropertyDescriptor(t, i);
        o &&
          o.configurable &&
          void 0 === e[i] &&
          Object.defineProperty(e, i, o);
      }
      return e;
    }
    function g(e, t) {
      if (!(e instanceof t))
        throw new TypeError("Cannot call a class as a function");
    }
    function y(e, t) {
      if (!e)
        throw new ReferenceError(
          "this hasn't been initialised - super() hasn't been called"
        );
      return !t || ("object" != typeof t && "function" != typeof t) ? e : t;
    }
    var v = [];
    c.transitionEnd && v.push(c.transitionEnd),
      c.animationEnd && v.push(c.animationEnd);
    h.default.node,
      p.nameShape.isRequired,
      h.default.bool,
      h.default.bool,
      h.default.bool,
      h.default.number,
      h.default.number,
      h.default.number;
    var w =
      ((i = r = (function (e) {
        function t() {
          var n, r;
          g(this, t);
          for (var i = arguments.length, o = Array(i), s = 0; s < i; s++)
            o[s] = arguments[s];
          return (
            (n = r = y(this, e.call.apply(e, [this].concat(o)))),
            (r.componentWillAppear = function (e) {
              r.props.appear
                ? r.transition("appear", e, r.props.appearTimeout)
                : e();
            }),
            (r.componentWillEnter = function (e) {
              r.props.enter
                ? r.transition("enter", e, r.props.enterTimeout)
                : e();
            }),
            (r.componentWillLeave = function (e) {
              r.props.leave
                ? r.transition("leave", e, r.props.leaveTimeout)
                : e();
            }),
            y(r, n)
          );
        }
        return (
          (function (e, t) {
            if ("function" != typeof t && null !== t)
              throw new TypeError(
                "Super expression must either be null or a function, not " +
                  typeof t
              );
            (e.prototype = Object.create(t && t.prototype, {
              constructor: {
                value: e,
                enumerable: !1,
                writable: !0,
                configurable: !0,
              },
            })),
              t && (Object.setPrototypeOf, m(e, t));
          })(t, e),
          (t.prototype.componentWillMount = function () {
            (this.classNameAndNodeQueue = []), (this.transitionTimeouts = []);
          }),
          (t.prototype.componentWillUnmount = function () {
            (this.unmounted = !0),
              this.timeout && clearTimeout(this.timeout),
              this.transitionTimeouts.forEach(function (e) {
                clearTimeout(e);
              }),
              (this.classNameAndNodeQueue.length = 0);
          }),
          (t.prototype.transition = function (e, t, n) {
            var r = (0, d.findDOMNode)(this);
            if (r) {
              var i = this.props.name[e] || this.props.name + "-" + e,
                o = this.props.name[e + "Active"] || i + "-active",
                l = null,
                u = void 0;
              (0, s.default)(r, i), this.queueClassAndNode(o, r);
              var h = function (e) {
                (e && e.target !== r) ||
                  (clearTimeout(l),
                  u && u(),
                  (0, a.default)(r, i),
                  (0, a.default)(r, o),
                  u && u(),
                  t && t());
              };
              n
                ? ((l = setTimeout(h, n)), this.transitionTimeouts.push(l))
                : c.transitionEnd &&
                  (u = (function (e, t) {
                    return (
                      v.length
                        ? v.forEach(function (n) {
                            return e.addEventListener(n, t, !1);
                          })
                        : setTimeout(t, 0),
                      function () {
                        v.length &&
                          v.forEach(function (n) {
                            return e.removeEventListener(n, t, !1);
                          });
                      }
                    );
                  })(r, h));
            } else t && t();
          }),
          (t.prototype.queueClassAndNode = function (e, t) {
            var n = this;
            this.classNameAndNodeQueue.push({ className: e, node: t }),
              this.rafHandle ||
                (this.rafHandle = (0, l.default)(function () {
                  return n.flushClassNameAndNodeQueueOnNextFrame();
                }));
          }),
          (t.prototype.flushClassNameAndNodeQueueOnNextFrame = function () {
            var e = this;
            this.rafHandle = (0, l.default)(function () {
              return e.flushClassNameAndNodeQueue();
            });
          }),
          (t.prototype.flushClassNameAndNodeQueue = function () {
            this.unmounted ||
              this.classNameAndNodeQueue.forEach(function (e) {
                e.node.scrollTop, (0, s.default)(e.node, e.className);
              }),
              (this.classNameAndNodeQueue.length = 0),
              (this.rafHandle = null);
          }),
          (t.prototype.render = function () {
            var e = o({}, this.props);
            return (
              delete e.name,
              delete e.appear,
              delete e.enter,
              delete e.leave,
              delete e.appearTimeout,
              delete e.enterTimeout,
              delete e.leaveTimeout,
              delete e.children,
              u.default.cloneElement(
                u.default.Children.only(this.props.children),
                e
              )
            );
          }),
          t
        );
      })(u.default.Component)),
      (r.displayName = "CSSTransitionGroupChild"),
      i);
    (t.default = w), (e.exports = t.default);
  },
  function (e, t, n) {
    "use strict";
    var r = n(55);
    (t.__esModule = !0),
      (t.default = function (e, t) {
        e.classList
          ? e.classList.add(t)
          : (0, i.default)(e, t) ||
            ("string" == typeof e.className
              ? (e.className = e.className + " " + t)
              : e.setAttribute(
                  "class",
                  ((e.className && e.className.baseVal) || "") + " " + t
                ));
      });
    var i = r(n(300));
    e.exports = t.default;
  },
  function (e, t, n) {
    "use strict";
    (t.__esModule = !0),
      (t.default = function (e, t) {
        return e.classList
          ? !!t && e.classList.contains(t)
          : -1 !==
              (" " + (e.className.baseVal || e.className) + " ").indexOf(
                " " + t + " "
              );
      }),
      (e.exports = t.default);
  },
  function (e, t, n) {
    "use strict";
    function r(e, t) {
      return e
        .replace(new RegExp("(^|\\s)" + t + "(?:\\s|$)", "g"), "$1")
        .replace(/\s+/g, " ")
        .replace(/^\s*|\s*$/g, "");
    }
    e.exports = function (e, t) {
      e.classList
        ? e.classList.remove(t)
        : "string" == typeof e.className
        ? (e.className = r(e.className, t))
        : e.setAttribute(
            "class",
            r((e.className && e.className.baseVal) || "", t)
          );
    };
  },
  function (e, t, n) {
    "use strict";
    var r = n(55);
    (t.__esModule = !0),
      (t.default = t.animationEnd = t.animationDelay = t.animationTiming = t.animationDuration = t.animationName = t.transitionEnd = t.transitionDuration = t.transitionDelay = t.transitionTiming = t.transitionProperty = t.transform = void 0);
    var i,
      o,
      s,
      a,
      l,
      c,
      u,
      h,
      d,
      p,
      f,
      m = r(n(81)),
      g = "transform";
    if (
      ((t.transform = g),
      (t.animationEnd = s),
      (t.transitionEnd = o),
      (t.transitionDelay = u),
      (t.transitionTiming = c),
      (t.transitionDuration = l),
      (t.transitionProperty = a),
      (t.animationDelay = f),
      (t.animationTiming = p),
      (t.animationDuration = d),
      (t.animationName = h),
      m.default)
    ) {
      var y = (function () {
        for (
          var e,
            t,
            n = document.createElement("div").style,
            r = {
              O: function (e) {
                return "o" + e.toLowerCase();
              },
              Moz: function (e) {
                return e.toLowerCase();
              },
              Webkit: function (e) {
                return "webkit" + e;
              },
              ms: function (e) {
                return "MS" + e;
              },
            },
            i = Object.keys(r),
            o = "",
            s = 0;
          s < i.length;
          s++
        ) {
          var a = i[s];
          if (a + "TransitionProperty" in n) {
            (o = "-" + a.toLowerCase()),
              (e = r[a]("TransitionEnd")),
              (t = r[a]("AnimationEnd"));
            break;
          }
        }
        !e && "transitionProperty" in n && (e = "transitionend");
        !t && "animationName" in n && (t = "animationend");
        return (n = null), { animationEnd: t, transitionEnd: e, prefix: o };
      })();
      (i = y.prefix),
        (t.transitionEnd = o = y.transitionEnd),
        (t.animationEnd = s = y.animationEnd),
        (t.transform = g = i + "-" + g),
        (t.transitionProperty = a = i + "-transition-property"),
        (t.transitionDuration = l = i + "-transition-duration"),
        (t.transitionDelay = u = i + "-transition-delay"),
        (t.transitionTiming = c = i + "-transition-timing-function"),
        (t.animationName = h = i + "-animation-name"),
        (t.animationDuration = d = i + "-animation-duration"),
        (t.animationTiming = p = i + "-animation-delay"),
        (t.animationDelay = f = i + "-animation-timing-function");
    }
    var v = {
      transform: g,
      end: o,
      property: a,
      timing: c,
      delay: u,
      duration: l,
    };
    t.default = v;
  },
  function (e, t, n) {
    "use strict";
    const r = (e, ...t) =>
      new Promise((n) => {
        n(e(...t));
      });
    (e.exports = r), (e.exports.default = r);
  },
  function (e, t, n) {
    (function (e) {
      const t = n(1).join(__dirname, "fs_admin.node");
      try {
        global.process.dlopen(e, t);
      } catch (e) {
        throw new Error("Cannot open " + t + ": " + e);
      }
    }.call(this, n(46)(e)));
  },
  function (e, t, n) {
    e.exports = n.p + "fff110f06938764612a1a3588659e22e.cmd";
  },
  function (e, t, n) {
    !(function () {
      "use strict";
      var e = function (e) {
        return new t(e);
      };
      function t(e) {
        if (!e || 1 !== e.nodeType)
          throw new Error("A DOM Element reference is required");
        (this.el = e), (this.classList = e.classList);
      }
      function n(e, t) {
        if (((t = t || "a method"), "string" != typeof e))
          throw new TypeError(
            "Failed to execute '" +
              t +
              "' on 'ClassList': the token provided ('" +
              e +
              "') is not a string."
          );
        if ("" === e)
          throw new SyntaxError(
            "Failed to execute '" +
              t +
              "' on 'ClassList': the token provided must not be empty."
          );
        if (/\s/.test(e))
          throw new Error(
            "Failed to execute '" +
              t +
              "' on 'ClassList': the token provided ('" +
              e +
              "') contains HTML space characters, which are not valid in tokens."
          );
      }
      (t.prototype.toArray = function () {
        var e = (this.el.getAttribute("class") || "")
          .replace(/^\s+|\s+$/g, "")
          .split(/\s+/);
        return "" === e[0] && e.shift(), e;
      }),
        (t.prototype.add = function (e) {
          var t;
          n(e, "add"),
            this.classList
              ? this.classList.add(e)
              : -1 === (t = this.toArray()).indexOf(e) &&
                (t.push(e), this.el.setAttribute("class", t.join(" ")));
        }),
        (t.prototype.contains = function (e) {
          return (
            n(e, "contains"),
            this.classList
              ? this.classList.contains(e)
              : this.toArray().indexOf(e) > -1
          );
        }),
        (t.prototype.remove = function (e) {
          var t, r, i, o, s;
          if ("[object RegExp]" == Object.prototype.toString.call(e))
            for (i = 0, s = (t = this.toArray()).length; i < s; i++)
              e.test(t[i]) && this.remove(t[i]);
          else
            n(e, "remove"),
              this.classList
                ? this.classList.remove(e)
                : (o = (r = this.toArray()).indexOf(e)) > -1 &&
                  (r.splice(o, 1), this.el.setAttribute("class", r.join(" ")));
        }),
        (t.prototype.toggle = function (e, t) {
          n(e, "toggle");
          var r = this.contains(e),
            i = r ? !0 !== t && "remove" : !1 !== t && "add";
          return i && this[i](e), "boolean" == typeof t ? t : !r;
        });
      var r = function (e, t) {
        var n = window.Element.prototype,
          r =
            n.matches ||
            n.mozMatchesSelector ||
            n.msMatchesSelector ||
            n.oMatchesSelector ||
            n.webkitMatchesSelector;
        if (!e || 1 !== e.nodeType) return !1;
        var i = e.parentNode;
        if (r) return r.call(e, t);
        for (var o = i.querySelectorAll(t), s = o.length, a = 0; a < s; a++)
          if (o[a] === e) return !0;
        return !1;
      };
      document.addEventListener("DOMContentLoaded", function () {
        var t = !1,
          n = 0,
          i = [
            "input:not([type])",
            "input[type=text]",
            "input[type=search]",
            "input[type=url]",
            "input[type=tel]",
            "input[type=email]",
            "input[type=password]",
            "input[type=number]",
            "input[type=date]",
            "input[type=month]",
            "input[type=week]",
            "input[type=time]",
            "input[type=datetime]",
            "input[type=datetime-local]",
            "textarea",
            "[role=textbox]",
          ].join(",");
        function o(t) {
          e(t).contains("focus-ring") ||
            (e(t).add("focus-ring"),
            t.setAttribute("data-focus-ring-added", ""));
        }
        document.body.addEventListener(
          "keydown",
          function () {
            (t = !0),
              r(document.activeElement, ":focus") && o(document.activeElement),
              0 !== n && clearTimeout(n),
              (n = setTimeout(function () {
                (t = !1), (n = 0);
              }, 100));
          },
          !0
        ),
          document.body.addEventListener(
            "focus",
            function (e) {
              var n;
              (t || ((n = e.target), r(n, i) && r(n, ":not([readonly])"))) &&
                o(e.target);
            },
            !0
          ),
          document.body.addEventListener(
            "blur",
            function (t) {
              var n;
              (n = t.target).hasAttribute("data-focus-ring-added") &&
                (e(n).remove("focus-ring"),
                n.removeAttribute("data-focus-ring-added"));
            },
            !0
          );
      });
    })();
  },
  function (e, t, n) {},
  ,
  ,
  ,
  ,
  ,
  ,
  function (e, t, n) {
    "use strict";
    n.r(t);
    var r = n(5),
      i = n(1),
      o = n(8),
      s = n(123),
      a = n.n(s),
      l = n(124),
      c = n.n(l);
    const u = ["renderer.js", "main.js"];
    function h(e) {
      if (!u.some((t) => e.endsWith(t))) return null;
      e.startsWith("file://") && (e = a()(e));
      const t = e + ".map";
      if (!o.existsSync(t)) return null;
      try {
        const e = o.readFileSync(t, "utf8");
        return { url: i.basename(t), map: e };
      } catch (e) {
        return null;
      }
    }
    const d = new WeakMap();
    let p;
    function f(e, t) {
      return d.set(e, t), e + t.map((e) => "\n    at " + e).join("");
    }
    function m(e) {
      return { name: e.name, message: e.message, stack: g(e) };
    }
    function g(e) {
      let t = d.get(e);
      return (
        t || ((e.stack || "").toString(), (t = d.get(e))), t ? p(e, t) : e.stack
      );
    }
    function y(e, t) {
      return t
        ? (function (e, t) {
            return (e = m(e)).stack
              ? t
                ? `${t}\n${e.stack}`
                : e.stack.trim()
              : t
              ? `${t}\n${e.name}: ${e.message}`
              : `${e.name}: ${e.message}`;
          })(t, e)
        : e;
    }
    function v(e, t, n) {
      r.ipcRenderer.send("log", e, y("[ui] " + t, n));
    }
    global.log = {
      error(e, t) {
        v("error", e, t), console.error(y(e, t));
      },
      warn(e, t) {
        v("warn", e, t), console.warn(y(e, t));
      },
      info(e, t) {
        v("info", e, t), console.info(y(e, t));
      },
      debug(e, t) {
        v("debug", e, t), console.debug(y(e, t));
      },
    };
    var w = n(0),
      b = n.n(w),
      S = n(15),
      C = n.n(S),
      E = n(12),
      k = n.n(E);
    function x(e, t) {
      if (null == e) return {};
      var n,
        r,
        i = {},
        o = Object.keys(e);
      for (r = 0; r < o.length; r++)
        (n = o[r]), t.indexOf(n) >= 0 || (i[n] = e[n]);
      return i;
    }
    function R() {
      return (R =
        Object.assign ||
        function (e) {
          for (var t = 1; t < arguments.length; t++) {
            var n = arguments[t];
            for (var r in n)
              Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
          }
          return e;
        }).apply(this, arguments);
    }
    function T(e, t) {
      (e.prototype = Object.create(t.prototype)),
        (e.prototype.constructor = e),
        (e.__proto__ = t);
    }
    n(50);
    var D = b.a.createContext(null);
    function A(e, t) {
      var n = Object.create(null);
      return (
        e &&
          w.Children.map(e, function (e) {
            return e;
          }).forEach(function (e) {
            n[e.key] = (function (e) {
              return t && Object(w.isValidElement)(e) ? t(e) : e;
            })(e);
          }),
        n
      );
    }
    function _(e, t, n) {
      return null != n[t] ? n[t] : e.props[t];
    }
    function M(e, t, n) {
      var r = A(e.children),
        i = (function (e, t) {
          function n(n) {
            return n in t ? t[n] : e[n];
          }
          (e = e || {}), (t = t || {});
          var r,
            i = Object.create(null),
            o = [];
          for (var s in e)
            s in t ? o.length && ((i[s] = o), (o = [])) : o.push(s);
          var a = {};
          for (var l in t) {
            if (i[l])
              for (r = 0; r < i[l].length; r++) {
                var c = i[l][r];
                a[i[l][r]] = n(c);
              }
            a[l] = n(l);
          }
          for (r = 0; r < o.length; r++) a[o[r]] = n(o[r]);
          return a;
        })(t, r);
      return (
        Object.keys(i).forEach(function (o) {
          var s = i[o];
          if (Object(w.isValidElement)(s)) {
            var a = o in t,
              l = o in r,
              c = t[o],
              u = Object(w.isValidElement)(c) && !c.props.in;
            !l || (a && !u)
              ? l || !a || u
                ? l &&
                  a &&
                  Object(w.isValidElement)(c) &&
                  (i[o] = Object(w.cloneElement)(s, {
                    onExited: n.bind(null, s),
                    in: c.props.in,
                    exit: _(s, "exit", e),
                    enter: _(s, "enter", e),
                  }))
                : (i[o] = Object(w.cloneElement)(s, { in: !1 }))
              : (i[o] = Object(w.cloneElement)(s, {
                  onExited: n.bind(null, s),
                  in: !0,
                  exit: _(s, "exit", e),
                  enter: _(s, "enter", e),
                }));
          }
        }),
        i
      );
    }
    var P =
        Object.values ||
        function (e) {
          return Object.keys(e).map(function (t) {
            return e[t];
          });
        },
      I = (function (e) {
        function t(t, n) {
          var r,
            i = (r = e.call(this, t, n) || this).handleExited.bind(
              (function (e) {
                if (void 0 === e)
                  throw new ReferenceError(
                    "this hasn't been initialised - super() hasn't been called"
                  );
                return e;
              })(r)
            );
          return (
            (r.state = {
              contextValue: { isMounting: !0 },
              handleExited: i,
              firstRender: !0,
            }),
            r
          );
        }
        T(t, e);
        var n = t.prototype;
        return (
          (n.componentDidMount = function () {
            (this.mounted = !0),
              this.setState({ contextValue: { isMounting: !1 } });
          }),
          (n.componentWillUnmount = function () {
            this.mounted = !1;
          }),
          (t.getDerivedStateFromProps = function (e, t) {
            var n,
              r,
              i = t.children,
              o = t.handleExited;
            return {
              children: t.firstRender
                ? ((n = e),
                  (r = o),
                  A(n.children, function (e) {
                    return Object(w.cloneElement)(e, {
                      onExited: r.bind(null, e),
                      in: !0,
                      appear: _(e, "appear", n),
                      enter: _(e, "enter", n),
                      exit: _(e, "exit", n),
                    });
                  }))
                : M(e, i, o),
              firstRender: !1,
            };
          }),
          (n.handleExited = function (e, t) {
            var n = A(this.props.children);
            e.key in n ||
              (e.props.onExited && e.props.onExited(t),
              this.mounted &&
                this.setState(function (t) {
                  var n = R({}, t.children);
                  return delete n[e.key], { children: n };
                }));
          }),
          (n.render = function () {
            var e = this.props,
              t = e.component,
              n = e.childFactory,
              r = x(e, ["component", "childFactory"]),
              i = this.state.contextValue,
              o = P(this.state.children).map(n);
            return (
              delete r.appear,
              delete r.enter,
              delete r.exit,
              null === t
                ? b.a.createElement(D.Provider, { value: i }, o)
                : b.a.createElement(
                    D.Provider,
                    { value: i },
                    b.a.createElement(t, r, o)
                  )
            );
          }),
          t
        );
      })(b.a.Component);
    (I.propTypes = {}),
      (I.defaultProps = {
        component: "div",
        childFactory: function (e) {
          return e;
        },
      });
    var O = I;
    function L(e, t) {
      return e
        .replace(new RegExp("(^|\\s)" + t + "(?:\\s|$)", "g"), "$1")
        .replace(/\s+/g, " ")
        .replace(/^\s*|\s*$/g, "");
    }
    var F = !1,
      N = (function (e) {
        function t(t, n) {
          var r;
          r = e.call(this, t, n) || this;
          var i,
            o = n && !n.isMounting ? t.enter : t.appear;
          return (
            (r.appearStatus = null),
            t.in
              ? o
                ? ((i = "exited"), (r.appearStatus = "entering"))
                : (i = "entered")
              : (i =
                  t.unmountOnExit || t.mountOnEnter ? "unmounted" : "exited"),
            (r.state = { status: i }),
            (r.nextCallback = null),
            r
          );
        }
        T(t, e),
          (t.getDerivedStateFromProps = function (e, t) {
            return e.in && "unmounted" === t.status
              ? { status: "exited" }
              : null;
          });
        var n = t.prototype;
        return (
          (n.componentDidMount = function () {
            this.updateStatus(!0, this.appearStatus);
          }),
          (n.componentDidUpdate = function (e) {
            var t = null;
            if (e !== this.props) {
              var n = this.state.status;
              this.props.in
                ? "entering" !== n && "entered" !== n && (t = "entering")
                : ("entering" !== n && "entered" !== n) || (t = "exiting");
            }
            this.updateStatus(!1, t);
          }),
          (n.componentWillUnmount = function () {
            this.cancelNextCallback();
          }),
          (n.getTimeouts = function () {
            var e,
              t,
              n,
              r = this.props.timeout;
            return (
              (e = t = n = r),
              null != r &&
                "number" != typeof r &&
                ((e = r.exit),
                (t = r.enter),
                (n = void 0 !== r.appear ? r.appear : t)),
              { exit: e, enter: t, appear: n }
            );
          }),
          (n.updateStatus = function (e, t) {
            void 0 === e && (e = !1),
              null !== t
                ? (this.cancelNextCallback(),
                  "entering" === t ? this.performEnter(e) : this.performExit())
                : this.props.unmountOnExit &&
                  "exited" === this.state.status &&
                  this.setState({ status: "unmounted" });
          }),
          (n.performEnter = function (e) {
            var t = this,
              n = this.props.enter,
              r = this.context ? this.context.isMounting : e,
              i = this.props.nodeRef ? [r] : [C.a.findDOMNode(this), r],
              o = i[0],
              s = i[1],
              a = this.getTimeouts(),
              l = r ? a.appear : a.enter;
            (!e && !n) || F
              ? this.safeSetState({ status: "entered" }, function () {
                  t.props.onEntered(o);
                })
              : (this.props.onEnter(o, s),
                this.safeSetState({ status: "entering" }, function () {
                  t.props.onEntering(o, s),
                    t.onTransitionEnd(l, function () {
                      t.safeSetState({ status: "entered" }, function () {
                        t.props.onEntered(o, s);
                      });
                    });
                }));
          }),
          (n.performExit = function () {
            var e = this,
              t = this.props.exit,
              n = this.getTimeouts(),
              r = this.props.nodeRef ? void 0 : C.a.findDOMNode(this);
            t && !F
              ? (this.props.onExit(r),
                this.safeSetState({ status: "exiting" }, function () {
                  e.props.onExiting(r),
                    e.onTransitionEnd(n.exit, function () {
                      e.safeSetState({ status: "exited" }, function () {
                        e.props.onExited(r);
                      });
                    });
                }))
              : this.safeSetState({ status: "exited" }, function () {
                  e.props.onExited(r);
                });
          }),
          (n.cancelNextCallback = function () {
            null !== this.nextCallback &&
              (this.nextCallback.cancel(), (this.nextCallback = null));
          }),
          (n.safeSetState = function (e, t) {
            (t = this.setNextCallback(t)), this.setState(e, t);
          }),
          (n.setNextCallback = function (e) {
            var t = this,
              n = !0;
            return (
              (this.nextCallback = function (r) {
                n && ((n = !1), (t.nextCallback = null), e(r));
              }),
              (this.nextCallback.cancel = function () {
                n = !1;
              }),
              this.nextCallback
            );
          }),
          (n.onTransitionEnd = function (e, t) {
            this.setNextCallback(t);
            var n = this.props.nodeRef
                ? this.props.nodeRef.current
                : C.a.findDOMNode(this),
              r = null == e && !this.props.addEndListener;
            if (n && !r) {
              if (this.props.addEndListener) {
                var i = this.props.nodeRef
                    ? [this.nextCallback]
                    : [n, this.nextCallback],
                  o = i[0],
                  s = i[1];
                this.props.addEndListener(o, s);
              }
              null != e && setTimeout(this.nextCallback, e);
            } else setTimeout(this.nextCallback, 0);
          }),
          (n.render = function () {
            var e = this.state.status;
            if ("unmounted" === e) return null;
            var t = this.props,
              n = t.children,
              r =
                (t.in,
                t.mountOnEnter,
                t.unmountOnExit,
                t.appear,
                t.enter,
                t.exit,
                t.timeout,
                t.addEndListener,
                t.onEnter,
                t.onEntering,
                t.onEntered,
                t.onExit,
                t.onExiting,
                t.onExited,
                t.nodeRef,
                x(t, [
                  "children",
                  "in",
                  "mountOnEnter",
                  "unmountOnExit",
                  "appear",
                  "enter",
                  "exit",
                  "timeout",
                  "addEndListener",
                  "onEnter",
                  "onEntering",
                  "onEntered",
                  "onExit",
                  "onExiting",
                  "onExited",
                  "nodeRef",
                ]));
            return b.a.createElement(
              D.Provider,
              { value: null },
              "function" == typeof n
                ? n(e, r)
                : b.a.cloneElement(b.a.Children.only(n), r)
            );
          }),
          t
        );
      })(b.a.Component);
    function B() {}
    (N.contextType = D),
      (N.propTypes = {}),
      (N.defaultProps = {
        in: !1,
        mountOnEnter: !1,
        unmountOnExit: !1,
        appear: !1,
        enter: !0,
        exit: !0,
        onEnter: B,
        onEntering: B,
        onEntered: B,
        onExit: B,
        onExiting: B,
        onExited: B,
      }),
      (N.UNMOUNTED = "unmounted"),
      (N.EXITED = "exited"),
      (N.ENTERING = "entering"),
      (N.ENTERED = "entered"),
      (N.EXITING = "exiting");
    var H = N,
      z = function (e, t) {
        return (
          e &&
          t &&
          t.split(" ").forEach(function (t) {
            return (
              (r = t),
              void ((n = e).classList
                ? n.classList.remove(r)
                : "string" == typeof n.className
                ? (n.className = L(n.className, r))
                : n.setAttribute(
                    "class",
                    L((n.className && n.className.baseVal) || "", r)
                  ))
            );
            var n, r;
          })
        );
      },
      U = (function (e) {
        function t() {
          for (var t, n = arguments.length, r = new Array(n), i = 0; i < n; i++)
            r[i] = arguments[i];
          return (
            ((t = e.call.apply(e, [this].concat(r)) || this).appliedClasses = {
              appear: {},
              enter: {},
              exit: {},
            }),
            (t.onEnter = function (e, n) {
              var r = t.resolveArguments(e, n),
                i = r[0],
                o = r[1];
              t.removeClasses(i, "exit"),
                t.addClass(i, o ? "appear" : "enter", "base"),
                t.props.onEnter && t.props.onEnter(e, n);
            }),
            (t.onEntering = function (e, n) {
              var r = t.resolveArguments(e, n),
                i = r[0],
                o = r[1] ? "appear" : "enter";
              t.addClass(i, o, "active"),
                t.props.onEntering && t.props.onEntering(e, n);
            }),
            (t.onEntered = function (e, n) {
              var r = t.resolveArguments(e, n),
                i = r[0],
                o = r[1] ? "appear" : "enter";
              t.removeClasses(i, o),
                t.addClass(i, o, "done"),
                t.props.onEntered && t.props.onEntered(e, n);
            }),
            (t.onExit = function (e) {
              var n = t.resolveArguments(e)[0];
              t.removeClasses(n, "appear"),
                t.removeClasses(n, "enter"),
                t.addClass(n, "exit", "base"),
                t.props.onExit && t.props.onExit(e);
            }),
            (t.onExiting = function (e) {
              var n = t.resolveArguments(e)[0];
              t.addClass(n, "exit", "active"),
                t.props.onExiting && t.props.onExiting(e);
            }),
            (t.onExited = function (e) {
              var n = t.resolveArguments(e)[0];
              t.removeClasses(n, "exit"),
                t.addClass(n, "exit", "done"),
                t.props.onExited && t.props.onExited(e);
            }),
            (t.resolveArguments = function (e, n) {
              return t.props.nodeRef ? [t.props.nodeRef.current, e] : [e, n];
            }),
            (t.getClassNames = function (e) {
              var n = t.props.classNames,
                r = "string" == typeof n,
                i = r ? "" + (r && n ? n + "-" : "") + e : n[e];
              return {
                baseClassName: i,
                activeClassName: r ? i + "-active" : n[e + "Active"],
                doneClassName: r ? i + "-done" : n[e + "Done"],
              };
            }),
            t
          );
        }
        T(t, e);
        var n = t.prototype;
        return (
          (n.addClass = function (e, t, n) {
            var r = this.getClassNames(t)[n + "ClassName"],
              i = this.getClassNames("enter").doneClassName;
            "appear" === t && "done" === n && i && (r += " " + i),
              "active" === n && e && e.scrollTop,
              r &&
                ((this.appliedClasses[t][n] = r),
                (function (e, t) {
                  e &&
                    t &&
                    t.split(" ").forEach(function (t) {
                      return (
                        (r = t),
                        void ((n = e).classList
                          ? n.classList.add(r)
                          : (function (e, t) {
                              return e.classList
                                ? !!t && e.classList.contains(t)
                                : -1 !==
                                    (
                                      " " +
                                      (e.className.baseVal || e.className) +
                                      " "
                                    ).indexOf(" " + t + " ");
                            })(n, r) ||
                            ("string" == typeof n.className
                              ? (n.className = n.className + " " + r)
                              : n.setAttribute(
                                  "class",
                                  ((n.className && n.className.baseVal) || "") +
                                    " " +
                                    r
                                )))
                      );
                      var n, r;
                    });
                })(e, r));
          }),
          (n.removeClasses = function (e, t) {
            var n = this.appliedClasses[t],
              r = n.base,
              i = n.active,
              o = n.done;
            (this.appliedClasses[t] = {}),
              r && z(e, r),
              i && z(e, i),
              o && z(e, o);
          }),
          (n.render = function () {
            var e = this.props,
              t = (e.classNames, x(e, ["classNames"]));
            return b.a.createElement(
              H,
              R({}, t, {
                onEnter: this.onEnter,
                onEntered: this.onEntered,
                onEntering: this.onEntering,
                onExit: this.onExit,
                onExiting: this.onExiting,
                onExited: this.onExited,
              })
            );
          }),
          t
        );
      })(b.a.Component);
    (U.defaultProps = { classNames: "" }), (U.propTypes = {});
    var W,
      j,
      V,
      G,
      $,
      q,
      K = U;
    function Y(e) {
      return "merge" === e.kind;
    }
    function Q(e) {
      return "rebase" === e.kind;
    }
    function Z(e) {
      throw new Error(e);
    }
    function X(e, t) {
      throw new Error(t);
    }
    function J(e, t) {
      return null == t ? Z(e) : t;
    }
    function ee(e, t) {
      if (null == e) return Z(t);
    }
    !(function (e) {
      (e[(e.Repository = 0)] = "Repository"),
        (e[(e.CloningRepository = 1)] = "CloningRepository"),
        (e[(e.MissingRepository = 2)] = "MissingRepository");
    })(W || (W = {})),
      (function (e) {
        (e[(e.Repository = 0)] = "Repository"),
          (e[(e.Branch = 1)] = "Branch"),
          (e[(e.AppMenu = 2)] = "AppMenu"),
          (e[(e.AddMenu = 3)] = "AddMenu");
      })(j || (j = {})),
      (function (e) {
        (e[(e.Changes = 0)] = "Changes"), (e[(e.History = 1)] = "History");
      })(V || (V = {})),
      (function (e) {
        (e.WorkingDirectory = "WorkingDirectory"), (e.Stash = "Stash");
      })(G || (G = {})),
      (function (e) {
        (e.History = "History"), (e.Compare = "Compare");
      })($ || ($ = {})),
      (function (e) {
        (e.Ahead = "Ahead"), (e.Behind = "Behind");
      })(q || (q = {}));
    const te = {
      moveItemToTrash: r.shell.moveItemToTrash,
      beep: r.shell.beep,
      openExternal: (e) =>
        new Promise((t, n) => {
          r.ipcRenderer.once("open-external-result", (e, { result: n }) => {
            t(n);
          }),
            r.ipcRenderer.send("open-external", { path: e });
        }),
      showItemInFolder: (e) => {
        r.ipcRenderer.send("show-item-in-folder", { path: e });
      },
      showFolderContents: (e) => {
        r.ipcRenderer.send("show-folder-contents", { path: e });
      },
      openPath: r.shell.openPath,
    };
    function ne(e, t) {
      const n = i.join(e.path, t);
      return te.showItemInFolder(n);
    }
    var re,
      ie = n(11);
    function oe(e) {
      r.ipcRenderer.send("execute-menu-item", { id: e });
    }
    async function se(e) {
      const t = await r.ipcRenderer.invoke(
        "show-contextual-menu",
        (function e(t) {
          return t.map((t) =>
            Object.assign(Object.assign({}, t), {
              action: void 0,
              submenu: t.submenu ? e(t.submenu) : void 0,
            })
          );
        })(e)
      );
      if (null !== t) {
        const n = (function (e, t) {
          let n = { submenu: e };
          for (const e of t) {
            if (void 0 === n || void 0 === n.submenu) return;
            n = n.submenu[e];
          }
          return n;
        })(e, t);
        void 0 !== n && void 0 !== n.action && n.action();
      }
    }
    function ae(e) {
      r.ipcRenderer.send("update-preferred-app-menu-item-labels", e);
    }
    function le(e) {
      return {
        message: e.message || "" + e,
        name: e.name || "" + e.name,
        stack: e.stack || void 0,
      };
    }
    !(function (e) {
      (e[(e.Push = 1)] = "Push"),
        (e[(e.Pull = 2)] = "Pull"),
        (e[(e.Fetch = 3)] = "Fetch"),
        (e[(e.Clone = 4)] = "Clone"),
        (e[(e.Checkout = 5)] = "Checkout"),
        (e[(e.Merge = 6)] = "Merge"),
        (e[(e.Rebase = 7)] = "Rebase");
    })(re || (re = {}));
    class ce extends Error {
      constructor(e, t) {
        super(e.message),
          (this.name = e.name),
          (this.stack = e.stack),
          (this.underlyingError = e),
          (this.metadata = t);
      }
    }
    class ue extends ce {
      constructor(e, t, n) {
        super(e, {
          gitContext: { kind: "checkout", branchToCheckout: n },
          retryAction: { type: re.Checkout, branch: n, repository: t },
          repository: t,
        });
      }
    }
    const he = /^Can not find Squirrel$/,
      de = /System\.Net\.WebException: The remote name could not be resolved: 'central\.github\.com'/,
      pe = /A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond/;
    const fe = /^\[([a-z]{1,})\]\s(.*)/i;
    function me(e) {
      return null != e;
    }
    function ge(e) {
      return e
        .map((e) =>
          (function (e) {
            const t = e.trim(),
              n = fe.exec(t);
            if (null === n)
              return (
                log.debug(
                  "[ReleaseNotes] unable to convert text into entry: " + e
                ),
                null
              );
            const r = n[1].toLowerCase(),
              i = n[2];
            return "new" === r ||
              "fixed" === r ||
              "improved" === r ||
              "added" === r ||
              "pretext" === r ||
              "removed" === r
              ? { kind: r, message: i }
              : (log.debug(
                  `[ReleaseNotes] kind ${r} was found but is not a valid entry`
                ),
                { kind: "other", message: i });
          })(e)
        )
        .filter(me);
    }
    async function ye() {
      return (function (e) {
        const t = ge(e.notes),
          n = t.filter(
            (e) =>
              "new" === e.kind || "added" === e.kind || "improved" === e.kind
          ),
          r = t.filter((e) => "fixed" === e.kind),
          i = t.filter((e) => "removed" === e.kind || "other" === e.kind),
          o = k()(e.pub_date).format("MMMM Do YYYY");
        return {
          latestVersion: e.version,
          datePublished: o,
          pretext: void 0,
          enhancements: n,
          bugfixes: r,
          other: i,
        };
      })(
        (
          await (async function () {
            const e = await fetch(
              "https://central.github.com/deployments/desktop/desktop/changelog.json"
            );
            if (e.ok) {
              return await e.json();
            }
            return [];
          })()
        )[0]
      );
    }
    function ve(e, t) {
      return Object.values(e).find((e) => e === t);
    }
    function we(e, t) {
      const n = localStorage.getItem(e);
      return null === n
        ? t
        : "1" === n || "true" === n || ("0" !== n && "false" !== n && t);
    }
    function be(e, t) {
      localStorage.setItem(e, t ? "1" : "0");
    }
    function Se(e, t) {
      const n = localStorage.getItem(e);
      if (null === n || 0 === n.length) return t;
      const r = parseInt(n, 10);
      return isNaN(r) ? t : r;
    }
    function Ce(e, t) {
      localStorage.setItem(e, t.toString());
    }
    function Ee(e) {
      return (localStorage.getItem(e) || "")
        .split(xe)
        .map(parseFloat)
        .filter((e) => !isNaN(e));
    }
    function ke(e, t) {
      localStorage.setItem(e, t.join(xe));
    }
    const xe = ",";
    const Re = r.remote.autoUpdater;
    var Te;
    !(function (e) {
      (e[(e.CheckingForUpdates = 0)] = "CheckingForUpdates"),
        (e[(e.UpdateAvailable = 1)] = "UpdateAvailable"),
        (e[(e.UpdateNotAvailable = 2)] = "UpdateNotAvailable"),
        (e[(e.UpdateReady = 3)] = "UpdateReady");
    })(Te || (Te = {}));
    const De = new (class {
      constructor() {
        (this.emitter = new ie.Emitter()),
          (this.status = Te.UpdateNotAvailable),
          (this.lastSuccessfulCheck = null),
          (this.newRelease = null),
          (this.userInitiatedUpdate = !0),
          (this.onAutoUpdaterError = (e) => {
            this.status = Te.UpdateNotAvailable;
            {
              const t = (function (e) {
                return he.test(e.message)
                  ? new Error(
                      "The application is missing a dependency it needs to check and install updates. This is very, very bad."
                    )
                  : de.test(e.message)
                  ? new Error(
                      "GitHub Desktop was not able to contact the update server. Ensure you have internet connectivity and try again."
                    )
                  : pe.test(e.message)
                  ? new Error(
                      "GitHub Desktop was not able to check for updates due to a timeout. Ensure you have internet connectivity and try again."
                    )
                  : null;
              })(e);
              this.emitError(t || e);
            }
          }),
          (this.onCheckingForUpdate = () => {
            (this.status = Te.CheckingForUpdates), this.emitDidChange();
          }),
          (this.onUpdateAvailable = () => {
            this.touchLastChecked(),
              (this.status = Te.UpdateAvailable),
              this.emitDidChange();
          }),
          (this.onUpdateNotAvailable = () => {
            this.touchLastChecked(),
              (this.status = Te.UpdateNotAvailable),
              this.emitDidChange();
          }),
          (this.onUpdateDownloaded = async () => {
            (this.newRelease = await ye()),
              (this.status = Te.UpdateReady),
              this.emitDidChange();
          });
        const e = Se("last-successful-update-check", 0);
        e > 0 && (this.lastSuccessfulCheck = new Date(e)),
          Re.on("error", this.onAutoUpdaterError),
          Re.on("checking-for-update", this.onCheckingForUpdate),
          Re.on("update-available", this.onUpdateAvailable),
          Re.on("update-not-available", this.onUpdateNotAvailable),
          Re.on("update-downloaded", this.onUpdateDownloaded),
          window.addEventListener("beforeunload", () => {
            Re.removeListener("error", this.onAutoUpdaterError),
              Re.removeListener(
                "checking-for-update",
                this.onCheckingForUpdate
              ),
              Re.removeListener("update-available", this.onUpdateAvailable),
              Re.removeListener(
                "update-not-available",
                this.onUpdateNotAvailable
              ),
              Re.removeListener("update-downloaded", this.onUpdateDownloaded);
          });
      }
      touchLastChecked() {
        const e = new Date();
        (this.lastSuccessfulCheck = e),
          Ce("last-successful-update-check", e.getTime());
      }
      onDidChange(e) {
        return this.emitter.on("did-change", e);
      }
      emitDidChange() {
        this.emitter.emit("did-change", this.state);
      }
      onError(e) {
        return this.emitter.on("error", e);
      }
      emitError(e) {
        const t = new ce(e, { backgroundTask: !this.userInitiatedUpdate });
        this.emitter.emit("error", t);
      }
      get state() {
        return {
          status: this.status,
          lastSuccessfulCheck: this.lastSuccessfulCheck,
          newRelease: this.newRelease,
        };
      }
      checkForUpdates(e) {
        if (this.status !== Te.UpdateReady) {
          this.userInitiatedUpdate = !e;
          try {
            Re.setFeedURL({
              url:
                "https://central.github.com/api/deployments/desktop/desktop/latest?version=2.6.1&env=production",
            }),
              Re.checkForUpdates();
          } catch (e) {
            this.emitError(e);
          }
        }
      }
      quitAndInstallUpdate() {
        r.ipcRenderer.sendSync("will-quit"), Re.quitAndInstall();
      }
    })();
    const Ae = (function (e, t, n) {
      const r = () =>
        (function (e, t) {
          return we("features/" + e, t);
        })(e, t);
      if (n) {
        const e = r();
        return () => e;
      }
      return r;
    })("should-render-application-menu", !0, !0);
    var _e = n(9),
      Me = n(19);
    class Pe {
      constructor(e, t, n, r, i, o, s) {
        (this.login = e),
          (this.endpoint = t),
          (this.token = n),
          (this.emails = r),
          (this.avatarURL = i),
          (this.id = o),
          (this.name = s);
      }
      static anonymous() {
        return new Pe("", gt(), "", [], "", -1, "");
      }
      withToken(e) {
        return new Pe(
          this.login,
          this.endpoint,
          e,
          this.emails,
          this.avatarURL,
          this.id,
          this.name
        );
      }
    }
    let Ie = null,
      Oe = null,
      Le = null,
      Fe = null,
      Ne = null;
    function Be() {
      return Ie || (Ie = r.remote.app), Ie;
    }
    function He() {
      return Oe || (Oe = Be().getVersion()), Oe;
    }
    function ze() {
      return Fe || (Fe = Be().getAppPath()), Fe;
    }
    class Ue extends Error {
      constructor(e, t) {
        let n;
        if (t && t.message) {
          n = t.message;
          const e = t.errors,
            r = e && e.map((e) => e.message).join(", ");
          r && (n = `${n} (${r})`);
        } else n = `API error ${e.url}: ${e.statusText} (${e.status})`;
        super(n), (this.responseStatus = e.status), (this.apiError = t);
      }
    }
    async function We(e) {
      try {
        return await e.json();
      } catch (t) {
        const n = e.headers.get("Content-Length") || "(missing)",
          r = e.headers.get("X-GitHub-Request-Id") || "(missing)";
        throw (
          (log.warn(
            `deserialize: invalid JSON found at '${e.url}' - status: ${e.status}, length: '${n}' id: '${r}'`,
            t
          ),
          t)
        );
      }
    }
    function je(e, t, n, r, i, o) {
      const s = (function (e, t) {
        let n = "/" === t[0] ? t.substr(1) : t;
        n.startsWith("api/v3/") && (n = n.substr(7));
        const r = e.endsWith("/") ? e : e + "/";
        return new _e.URL(n, r).toString();
      })(e, r);
      let a = {
        Accept: "application/vnd.github.v3+json, application/json",
        "Content-Type": "application/json",
        "User-Agent": Ve(),
      };
      t && (a.Authorization = "token " + t),
        (a = Object.assign(Object.assign({}, a), o));
      const l = { headers: a, method: n, body: JSON.stringify(i) };
      return fetch(s, l);
    }
    function Ve() {
      return `GitHubDesktop/${He()} (Windows)`;
    }
    async function Ge(e) {
      if (e.ok) return We(e);
      {
        let t;
        try {
          t = await We(e);
        } catch (t) {
          throw new Ue(e, null);
        }
        throw new Ue(e, t);
      }
    }
    function $e(e, t) {
      const n = Object.keys(t)
        .map((e) => `${e}=${encodeURIComponent(t[e])}`)
        .join("&");
      return n.length ? (-1 === e.indexOf("?") ? `${e}?${n}` : `${e}&${n}`) : e;
    }
    var qe;
    function Ke(e) {
      return e === qe.Sms
        ? "We just sent you a message via SMS with your authentication code. Enter the code in the form below to verify your identity."
        : "Open the two-factor authentication app on your device to view your authentication code and verify your identity.";
    }
    !(function (e) {
      (e[(e.Sms = 0)] = "Sms"), (e[(e.App = 1)] = "App");
    })(qe || (qe = {}));
    var Ye = n(57),
      Qe = n(84),
      Ze = n.n(Qe);
    function Xe(e) {
      if (window.crypto) {
        const t = new Uint8Array(e);
        return crypto.getRandomValues(t), t;
      }
      return Object(Ye.randomBytes)(e);
    }
    function Je() {
      return Ze()({ random: Xe(16) });
    }
    var et = n(125),
      tt = n.n(et);
    const nt = process.env.DESKTOP_GITHUB_DOTCOM_API_ENDPOINT,
      rt = "de0e3c7e9973e1c4dd77",
      it = "1273305a5fc2737c2ca2911948ba24a9d961e2a3";
    (rt.length && it.length) ||
      log.warn(
        "DESKTOP_OAUTH_CLIENT_ID and/or DESKTOP_OAUTH_CLIENT_SECRET is undefined. You won't be able to authenticate new users."
      );
    const ot = ["repo", "user", "workflow"],
      st = ["repo", "user"];
    var at;
    !(function (e) {
      (e[(e.NotModified = 304)] = "NotModified"),
        (e[(e.NotFound = 404)] = "NotFound");
    })(at || (at = {}));
    class lt extends Error {}
    function ct(e) {
      const t = e.headers.get("Link");
      if (!t) return null;
      for (const e of t.split(",")) {
        const t = e.match(/<([^>]+)>; rel="([^"]+)"/);
        if (t && "next" === t[2]) {
          return _e.parse(t[1]).path || null;
        }
      }
      return null;
    }
    function ut(e) {
      const t = ct(e);
      if (!t) return null;
      const { pathname: n, query: r } = _e.parse(t, !0),
        { per_page: i, page: o } = r,
        s = "string" == typeof i ? parseInt(i, 10) : NaN,
        a = "string" == typeof o ? parseInt(o, 10) : NaN;
      if (!s || !a) return t;
      const l = (a - 1) * s,
        c = Math.min(100, 2 * s);
      return s !== c && l % c == 0
        ? ((r.per_page = "" + c),
          (r.page = "" + (l / c + 1)),
          _e.format({ pathname: n, query: r }))
        : t;
    }
    class ht {
      constructor(e, t) {
        (this.endpoint = e), (this.token = t);
      }
      static fromAccount(e) {
        return new ht(e.endpoint, e.token);
      }
      async fetchRepository(e, t) {
        try {
          const n = await this.request("GET", `repos/${e}/${t}`);
          return n.status === at.NotFound
            ? (log.warn(`fetchRepository: '${e}/${t}' returned a 404`), null)
            : await Ge(n);
        } catch (n) {
          return (
            log.warn(`fetchRepository: an error occurred for '${e}/${t}'`, n),
            null
          );
        }
      }
      async fetchRepositoryCloneUrl(e, t, n) {
        const r = await this.request("GET", `repos/${e}/${t}`);
        if (r.status === at.NotFound) return null;
        const i = await Ge(r);
        return "ssh" === n ? i.ssh_url : i.clone_url;
      }
      async fetchRepositories() {
        try {
          return (await this.fetchAll("user/repos")).filter(
            (e) => null !== e.owner
          );
        } catch (e) {
          return log.warn("fetchRepositories: " + e), null;
        }
      }
      async fetchAccount() {
        try {
          const e = await this.request("GET", "user");
          return await Ge(e);
        } catch (e) {
          throw (
            (log.warn("fetchAccount: failed with endpoint " + this.endpoint, e),
            e)
          );
        }
      }
      async fetchEmails() {
        try {
          const e = await this.request("GET", "user/emails"),
            t = await Ge(e);
          return Array.isArray(t) ? t : [];
        } catch (e) {
          return (
            log.warn("fetchEmails: failed with endpoint " + this.endpoint, e),
            []
          );
        }
      }
      async fetchOrgs() {
        try {
          return await this.fetchAll("user/orgs");
        } catch (e) {
          return (
            log.warn("fetchOrgs: failed with endpoint " + this.endpoint, e), []
          );
        }
      }
      async createRepository(e, t, n, r) {
        try {
          const i = e ? `orgs/${e.login}/repos` : "user/repos",
            o = await this.request("POST", i, {
              name: t,
              description: n,
              private: r,
            });
          return await Ge(o);
        } catch (t) {
          if (t instanceof Ue) {
            if (null !== e)
              throw new Error(
                `Unable to create repository for organization '${e.login}'. Verify that the repository does not already exist and that you have permission to create a repository there.`
              );
            throw t;
          }
          throw (
            (log.error(
              "createRepository: failed with endpoint " + this.endpoint,
              t
            ),
            new Error(
              "Unable to publish repository. Please check if you have an internet connection and try again."
            ))
          );
        }
      }
      async forkRepository(e, t) {
        try {
          const n = `/repos/${e}/${t}/forks`,
            r = await this.request("POST", n);
          return await Ge(r);
        } catch (n) {
          throw (
            (log.error(
              `forkRepository: failed to fork ${e}/${t} at endpoint: ${this.endpoint}`,
              n
            ),
            n)
          );
        }
      }
      async fetchIssues(e, t, n, r) {
        const i = { state: n };
        r &&
          !isNaN(r.getTime()) &&
          (i.since = r.toISOString().replace(/\.\d{3}Z$/, "Z"));
        const o = $e(`repos/${e}/${t}/issues`, i);
        try {
          return (await this.fetchAll(o)).filter((e) => !e.pullRequest);
        } catch (n) {
          throw (
            (log.warn(`fetchIssues: failed for repository ${e}/${t}`, n), n)
          );
        }
      }
      async fetchAllOpenPullRequests(e, t) {
        const n = $e(`repos/${e}/${t}/pulls`, { state: "open" });
        try {
          return await this.fetchAll(n);
        } catch (n) {
          throw (
            (log.warn(`failed fetching open PRs for repository ${e}/${t}`, n),
            n)
          );
        }
      }
      async fetchUpdatedPullRequests(e, t, n, r = 320) {
        const i = n.getTime(),
          o = $e(`repos/${e}/${t}/pulls`, {
            state: "all",
            sort: "updated",
            direction: "desc",
          });
        try {
          return (
            await this.fetchAll(o, {
              perPage: 10,
              getNextPagePath: ut,
              continue(e) {
                if (e.length >= r)
                  throw new lt("got max pull requests, aborting");
                const t = e[e.length - 1];
                return void 0 !== t && Date.parse(t.updated_at) > i;
              },
              suppressErrors: !1,
            })
          ).filter((e) => Date.parse(e.updated_at) >= i);
        } catch (n) {
          throw (
            (log.warn(
              `failed fetching updated PRs for repository ${e}/${t}`,
              n
            ),
            n)
          );
        }
      }
      async fetchPullRequest(e, t, n) {
        try {
          const r = `/repos/${e}/${t}/pulls/${n}`,
            i = await this.request("GET", r);
          return await Ge(i);
        } catch (r) {
          throw (log.warn(`failed fetching PR for ${e}/${t}/pulls/${n}`, r), r);
        }
      }
      async fetchCombinedRefStatus(e, t, n) {
        const r = `repos/${e}/${t}/commits/${encodeURIComponent(
            n
          )}/status?per_page=100`,
          i = await this.request("GET", r);
        try {
          return await Ge(i);
        } catch (r) {
          return (
            log.debug(`Failed fetching check runs for ref ${n} (${e}/${t})`, r),
            null
          );
        }
      }
      async fetchRefCheckRuns(e, t, n) {
        const r = `repos/${e}/${t}/commits/${encodeURIComponent(
            n
          )}/check-runs?per_page=100`,
          i = await this.request("GET", r, void 0, {
            Accept: "application/vnd.github.antiope-preview+json",
          });
        try {
          return await Ge(i);
        } catch (r) {
          return (
            log.debug(`Failed fetching check runs for ref ${n} (${e}/${t})`, r),
            null
          );
        }
      }
      async fetchPushControl(e, t, n) {
        const r = `repos/${e}/${t}/branches/${encodeURIComponent(
            n
          )}/push_control`,
          i = { Accept: "application/vnd.github.phandalin-preview" };
        try {
          const e = await this.request("GET", r, void 0, i);
          return await Ge(e);
        } catch (e) {
          return (
            log.info(
              "[fetchPushControl] unable to check if branch is potentially pushable",
              e
            ),
            {
              pattern: null,
              required_signatures: !1,
              required_status_checks: [],
              required_approving_review_count: 0,
              required_linear_history: !1,
              allow_actor: !0,
              allow_deletions: !0,
              allow_force_pushes: !0,
            }
          );
        }
      }
      async fetchProtectedBranches(e, t) {
        const n = `repos/${e}/${t}/branches?protected=true`;
        try {
          const e = await this.request("GET", n);
          return await Ge(e);
        } catch (e) {
          return (
            log.info(
              "[fetchProtectedBranches] unable to list protected branches",
              e
            ),
            new Array()
          );
        }
      }
      async fetchAll(e, t) {
        const n = new Array(),
          r = Object.assign({ perPage: 100 }, t);
        let i = $e(e, { per_page: "" + r.perPage });
        do {
          const t = await this.request("GET", i);
          if (!1 !== r.suppressErrors && !t.ok)
            return log.warn(`fetchAll: '${e}' returned a ${t.status}`), n;
          const o = await Ge(t);
          o && n.push(...o),
            (i = r.getNextPagePath ? r.getNextPagePath(t) : ct(t));
        } while (i && (!r.continue || r.continue(n)));
        return n;
      }
      request(e, t, n, r) {
        return je(this.endpoint, this.token, e, t, n, r);
      }
      async getFetchPollInterval(e, t) {
        const n = `repos/${e}/${t}/git`;
        try {
          const e = (await this.request("HEAD", n)).headers.get(
            "x-poll-interval"
          );
          if (e) {
            const t = parseInt(e, 10);
            return isNaN(t) ? null : t;
          }
          return null;
        } catch (n) {
          return (
            log.warn(`getFetchPollInterval: failed for ${e}/${t}`, n), null
          );
        }
      }
      async fetchMentionables(e, t, n) {
        const r = { Accept: "application/vnd.github.jerry-maguire-preview" };
        void 0 !== n && (r["If-None-Match"] = n);
        try {
          const n = `repos/${e}/${t}/mentionables/users`,
            i = await this.request("GET", n, void 0, r);
          if (i.status === at.NotFound)
            return log.warn(`fetchMentionables: '${n}' returned a 404`), null;
          if (i.status === at.NotModified) return null;
          const o = await Ge(i);
          return { users: o, etag: i.headers.get("etag") || void 0 };
        } catch (n) {
          return log.warn(`fetchMentionables: failed for ${e}/${t}`, n), null;
        }
      }
      async fetchUser(e) {
        try {
          const t = await this.request("GET", "users/" + encodeURIComponent(e));
          return 404 === t.status ? null : await Ge(t);
        } catch (e) {
          throw (
            (log.warn("fetchUser: failed with endpoint " + this.endpoint, e), e)
          );
        }
      }
    }
    var dt;
    async function pt(e, t, n, r) {
      const i = "Basic " + Buffer.from(`${t}:${n}`, "utf8").toString("base64"),
        o = r ? { "X-GitHub-OTP": r } : {},
        s = await (async function () {
          let e = "unknown";
          try {
            e = await tt()();
          } catch (t) {
            log.error(
              `getNote: unable to resolve machine username, using '${e}' as a fallback`,
              t
            );
          }
          return `GitHub Desktop on ${e}@${Me.hostname()}`;
        })(),
        a = await je(
          e,
          null,
          "POST",
          "authorizations",
          {
            scopes: vt(e),
            client_id: rt,
            client_secret: it,
            note: s,
            note_url: "https://desktop.github.com/",
            fingerprint: Je(),
          },
          Object.assign({ Authorization: i }, o)
        );
      try {
        const e = await Ge(a);
        if (e) {
          const t = e.token;
          if (t && "string" == typeof t && t.length)
            return { kind: dt.Authorized, token: t };
        }
      } catch (e) {
        if (401 === a.status) {
          const e = a.headers.get("x-github-otp");
          if (e) {
            const t = e.split(";");
            if (2 === t.length) {
              switch (t[1].trim()) {
                case "app":
                  return {
                    kind: dt.TwoFactorAuthenticationRequired,
                    type: qe.App,
                  };
                case "sms":
                  return {
                    kind: dt.TwoFactorAuthenticationRequired,
                    type: qe.Sms,
                  };
                default:
                  return { kind: dt.Failed, response: a };
              }
            }
          }
          return { kind: dt.Failed, response: a };
        }
        const t = e instanceof Ue && e.apiError;
        if (t) {
          if (
            403 === a.status &&
            "This API can only be accessed with username and password Basic Auth" ===
              t.message
          )
            return { kind: dt.PersonalAccessTokenBlocked };
          if (410 === a.status) return { kind: dt.WebFlowRequired };
          if (422 === a.status)
            if (t.errors)
              for (const e of t.errors) {
                const t = "oauthaccess" === e.resource.toLowerCase();
                if ("user" === e.field.toLowerCase() && t)
                  return { kind: dt.UserRequiresVerification };
              }
            else if (
              "Invalid OAuth application client_id or secret." === t.message
            )
              return { kind: dt.EnterpriseTooOld };
        }
      }
      return { kind: dt.Error, response: a };
    }
    async function ft(e, t) {
      const n = new ht(e, t);
      try {
        const r = await n.fetchAccount(),
          i = await n.fetchEmails();
        return new Pe(r.login, e, t, i, r.avatar_url, r.id, r.name || r.login);
      } catch (t) {
        throw (log.warn("fetchUser: failed with endpoint " + e, t), t);
      }
    }
    function mt(e) {
      if (e !== gt() || nt) {
        const t = _e.parse(e);
        return `${t.protocol}//${t.hostname}`;
      }
      return "https://github.com";
    }
    function gt() {
      return nt && nt.length > 0 ? nt : "https://api.github.com";
    }
    function yt(e, t) {
      return e.find((e) => e.endpoint === t) || null;
    }
    function vt(e) {
      return e === gt() ? ot : st;
    }
    !(function (e) {
      (e[(e.Authorized = 0)] = "Authorized"),
        (e[(e.Failed = 1)] = "Failed"),
        (e[(e.TwoFactorAuthenticationRequired = 2)] =
          "TwoFactorAuthenticationRequired"),
        (e[(e.UserRequiresVerification = 3)] = "UserRequiresVerification"),
        (e[(e.PersonalAccessTokenBlocked = 4)] = "PersonalAccessTokenBlocked"),
        (e[(e.Error = 5)] = "Error"),
        (e[(e.EnterpriseTooOld = 6)] = "EnterpriseTooOld"),
        (e[(e.WebFlowRequired = 7)] = "WebFlowRequired");
    })(dt || (dt = {}));
    const wt = [
      {
        protocol: "https",
        regex: new RegExp("^https?://(?:.+@)?(.+)/(.+)/(.+?)(?:/|.git/?)?$"),
      },
      {
        protocol: "ssh",
        regex: new RegExp("^git@(.+):(.+)/(.+?)(?:/|.git)?$"),
      },
      {
        protocol: "ssh",
        regex: new RegExp("^git:(.+)/(.+)/(.+?)(?:/|.git)?$"),
      },
      {
        protocol: "ssh",
        regex: new RegExp("^ssh://git@(.+)/(.+)/(.+?)(?:/|.git)?$"),
      },
    ];
    function bt(e) {
      for (const { protocol: t, regex: n } of wt) {
        const r = n.exec(e);
        if (null !== r && r.length >= 4)
          return { protocol: t, hostname: r[1], owner: r[2], name: r[3] };
      }
      return null;
    }
    function St(e) {
      const t = bt(e);
      if (t) {
        const { owner: e, name: n, hostname: r } = t;
        if (e && n) return { owner: e, name: n, hostname: r };
      }
      const n = e.split("/");
      if (2 === n.length && n[0].length > 0 && n[1].length > 0) {
        return { owner: n[0], name: n[1], hostname: null };
      }
      return null;
    }
    function Ct(e, t) {
      return e < t ? -1 : e > t ? 1 : 0;
    }
    function Et(e, t) {
      return e < t ? 1 : e > t ? -1 : 0;
    }
    function kt(e, t) {
      return e.toLowerCase() === t.toLowerCase();
    }
    function xt(e, t) {
      return Ct(e.toLowerCase(), t.toLowerCase());
    }
    function Rt(e, t) {
      for (const n of e) {
        const e = mt(n.endpoint),
          { hostname: r } = _e.parse(e),
          i = bt(t);
        if (
          null !== i &&
          null !== r &&
          i.hostname.toLowerCase() === r.toLowerCase()
        )
          return { name: i.name, owner: i.owner, account: n };
      }
      return null;
    }
    function Tt(e, t) {
      const n = (e) => i.normalize(e).toLowerCase(),
        r = n(t);
      return e.find((e) => n(e.path) === r);
    }
    function Dt(e, t) {
      return At(e.htmlURL, t) || At(e.cloneURL, t);
    }
    function At(e, t) {
      if (null == e) return !1;
      const n = bt(e),
        r = bt(t.url);
      return (
        null != r &&
        null != n &&
        !!kt(r.hostname, n.hostname) &&
        null != r.owner &&
        null != n.owner &&
        null != r.name &&
        null != n.name &&
        kt(r.owner, n.owner) &&
        kt(r.name, n.name)
      );
    }
    function _t(e, t) {
      const n = St(e),
        r = St(t);
      return (
        null !== n &&
        null !== r &&
        n.hostname === r.hostname &&
        n.owner === r.owner &&
        n.name === r.name
      );
    }
    var Mt = Object.keys,
      Pt = Array.isArray,
      It =
        "undefined" != typeof self
          ? self
          : "undefined" != typeof window
          ? window
          : global;
    function Ot(e, t) {
      return (
        "object" != typeof t ||
          Mt(t).forEach(function (n) {
            e[n] = t[n];
          }),
        e
      );
    }
    var Lt = Object.getPrototypeOf,
      Ft = {}.hasOwnProperty;
    function Nt(e, t) {
      return Ft.call(e, t);
    }
    function Bt(e, t) {
      "function" == typeof t && (t = t(Lt(e))),
        Mt(t).forEach(function (n) {
          zt(e, n, t[n]);
        });
    }
    var Ht = Object.defineProperty;
    function zt(e, t, n, r) {
      Ht(
        e,
        t,
        Ot(
          n && Nt(n, "get") && "function" == typeof n.get
            ? { get: n.get, set: n.set, configurable: !0 }
            : { value: n, configurable: !0, writable: !0 },
          r
        )
      );
    }
    function Ut(e) {
      return {
        from: function (t) {
          return (
            (e.prototype = Object.create(t.prototype)),
            zt(e.prototype, "constructor", e),
            { extend: Bt.bind(null, e.prototype) }
          );
        },
      };
    }
    var Wt = Object.getOwnPropertyDescriptor;
    var jt = [].slice;
    function Vt(e, t, n) {
      return jt.call(e, t, n);
    }
    function Gt(e, t) {
      return t(e);
    }
    function $t(e) {
      if (!e) throw new Error("Assertion Failed");
    }
    function qt(e) {
      It.setImmediate ? setImmediate(e) : setTimeout(e, 0);
    }
    function Kt(e, t) {
      return e.reduce(function (e, n, r) {
        var i = t(n, r);
        return i && (e[i[0]] = i[1]), e;
      }, {});
    }
    function Yt(e, t) {
      return function () {
        try {
          e.apply(this, arguments);
        } catch (e) {
          t(e);
        }
      };
    }
    function Qt(e, t, n) {
      try {
        e.apply(null, n);
      } catch (e) {
        t && t(e);
      }
    }
    function Zt(e, t) {
      if (Nt(e, t)) return e[t];
      if (!t) return e;
      if ("string" != typeof t) {
        for (var n = [], r = 0, i = t.length; r < i; ++r) {
          var o = Zt(e, t[r]);
          n.push(o);
        }
        return n;
      }
      var s = t.indexOf(".");
      if (-1 !== s) {
        var a = e[t.substr(0, s)];
        return void 0 === a ? void 0 : Zt(a, t.substr(s + 1));
      }
    }
    function Xt(e, t, n) {
      if (e && void 0 !== t && (!("isFrozen" in Object) || !Object.isFrozen(e)))
        if ("string" != typeof t && "length" in t) {
          $t("string" != typeof n && "length" in n);
          for (var r = 0, i = t.length; r < i; ++r) Xt(e, t[r], n[r]);
        } else {
          var o = t.indexOf(".");
          if (-1 !== o) {
            var s = t.substr(0, o),
              a = t.substr(o + 1);
            if ("" === a) void 0 === n ? delete e[s] : (e[s] = n);
            else {
              var l = e[s];
              l || (l = e[s] = {}), Xt(l, a, n);
            }
          } else void 0 === n ? delete e[t] : (e[t] = n);
        }
    }
    function Jt(e) {
      var t = {};
      for (var n in e) Nt(e, n) && (t[n] = e[n]);
      return t;
    }
    var en = [].concat;
    function tn(e) {
      return en.apply([], e);
    }
    var nn = "Boolean,String,Date,RegExp,Blob,File,FileList,ArrayBuffer,DataView,Uint8ClampedArray,ImageData,Map,Set"
      .split(",")
      .concat(
        tn(
          [8, 16, 32, 64].map(function (e) {
            return ["Int", "Uint", "Float"].map(function (t) {
              return t + e + "Array";
            });
          })
        )
      )
      .filter(function (e) {
        return It[e];
      })
      .map(function (e) {
        return It[e];
      });
    function rn(e) {
      if (!e || "object" != typeof e) return e;
      var t;
      if (Pt(e)) {
        t = [];
        for (var n = 0, r = e.length; n < r; ++n) t.push(rn(e[n]));
      } else if (nn.indexOf(e.constructor) >= 0) t = e;
      else
        for (var i in ((t = e.constructor
          ? Object.create(e.constructor.prototype)
          : {}),
        e))
          Nt(e, i) && (t[i] = rn(e[i]));
      return t;
    }
    function on(e, t, n, r) {
      return (
        (n = n || {}),
        (r = r || ""),
        Mt(e).forEach(function (i) {
          if (Nt(t, i)) {
            var o = e[i],
              s = t[i];
            "object" == typeof o &&
            "object" == typeof s &&
            o &&
            s &&
            "" + o.constructor == "" + s.constructor
              ? on(o, s, n, r + i + ".")
              : o !== s && (n[r + i] = t[i]);
          } else n[r + i] = void 0;
        }),
        Mt(t).forEach(function (i) {
          Nt(e, i) || (n[r + i] = t[i]);
        }),
        n
      );
    }
    var sn = "undefined" != typeof Symbol && Symbol.iterator,
      an = sn
        ? function (e) {
            var t;
            return null != e && (t = e[sn]) && t.apply(e);
          }
        : function () {
            return null;
          },
      ln = {};
    function cn(e) {
      var t, n, r, i;
      if (1 === arguments.length) {
        if (Pt(e)) return e.slice();
        if (this === ln && "string" == typeof e) return [e];
        if ((i = an(e))) {
          for (n = []; !(r = i.next()).done; ) n.push(r.value);
          return n;
        }
        if (null == e) return [e];
        if ("number" == typeof (t = e.length)) {
          for (n = new Array(t); t--; ) n[t] = e[t];
          return n;
        }
        return [e];
      }
      for (t = arguments.length, n = new Array(t); t--; ) n[t] = arguments[t];
      return n;
    }
    var un =
      "undefined" != typeof location &&
      /^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);
    function hn(e, t) {
      (un = e), (dn = t);
    }
    var dn = function () {
        return !0;
      },
      pn = !new Error("").stack;
    function fn() {
      if (pn)
        try {
          throw (fn.arguments, new Error());
        } catch (e) {
          return e;
        }
      return new Error();
    }
    function mn(e, t) {
      var n = e.stack;
      return n
        ? ((t = t || 0),
          0 === n.indexOf(e.name) &&
            (t += (e.name + e.message).split("\n").length),
          n
            .split("\n")
            .slice(t)
            .filter(dn)
            .map(function (e) {
              return "\n" + e;
            })
            .join(""))
        : "";
    }
    var gn = [
        "Unknown",
        "Constraint",
        "Data",
        "TransactionInactive",
        "ReadOnly",
        "Version",
        "NotFound",
        "InvalidState",
        "InvalidAccess",
        "Abort",
        "Timeout",
        "QuotaExceeded",
        "Syntax",
        "DataClone",
      ],
      yn = [
        "Modify",
        "Bulk",
        "OpenFailed",
        "VersionChange",
        "Schema",
        "Upgrade",
        "InvalidTable",
        "MissingAPI",
        "NoSuchDatabase",
        "InvalidArgument",
        "SubTransaction",
        "Unsupported",
        "Internal",
        "DatabaseClosed",
        "PrematureCommit",
        "ForeignAwait",
      ].concat(gn),
      vn = {
        VersionChanged: "Database version changed by other database connection",
        DatabaseClosed: "Database has been closed",
        Abort: "Transaction aborted",
        TransactionInactive: "Transaction has already completed or failed",
      };
    function wn(e, t) {
      (this._e = fn()), (this.name = e), (this.message = t);
    }
    function bn(e, t, n, r) {
      (this._e = fn()),
        (this.failures = t),
        (this.failedKeys = r),
        (this.successCount = n);
    }
    function Sn(e, t) {
      (this._e = fn()),
        (this.name = "BulkError"),
        (this.failures = t),
        (this.message = (function (e, t) {
          return (
            e +
            ". Errors: " +
            t
              .map(function (e) {
                return e.toString();
              })
              .filter(function (e, t, n) {
                return n.indexOf(e) === t;
              })
              .join("\n")
          );
        })(e, t));
    }
    Ut(wn)
      .from(Error)
      .extend({
        stack: {
          get: function () {
            return (
              this._stack ||
              (this._stack = this.name + ": " + this.message + mn(this._e, 2))
            );
          },
        },
        toString: function () {
          return this.name + ": " + this.message;
        },
      }),
      Ut(bn).from(wn),
      Ut(Sn).from(wn);
    var Cn = yn.reduce(function (e, t) {
        return (e[t] = t + "Error"), e;
      }, {}),
      En = wn,
      kn = yn.reduce(function (e, t) {
        var n = t + "Error";
        function r(e, r) {
          (this._e = fn()),
            (this.name = n),
            e
              ? "string" == typeof e
                ? ((this.message = e), (this.inner = r || null))
                : "object" == typeof e &&
                  ((this.message = e.name + " " + e.message), (this.inner = e))
              : ((this.message = vn[t] || n), (this.inner = null));
        }
        return Ut(r).from(En), (e[t] = r), e;
      }, {});
    (kn.Syntax = SyntaxError), (kn.Type = TypeError), (kn.Range = RangeError);
    var xn = gn.reduce(function (e, t) {
      return (e[t + "Error"] = kn[t]), e;
    }, {});
    var Rn = yn.reduce(function (e, t) {
      return (
        -1 === ["Syntax", "Type", "Range"].indexOf(t) &&
          (e[t + "Error"] = kn[t]),
        e
      );
    }, {});
    function Tn() {}
    function Dn(e) {
      return e;
    }
    function An(e, t) {
      return null == e || e === Dn
        ? t
        : function (n) {
            return t(e(n));
          };
    }
    function _n(e, t) {
      return function () {
        e.apply(this, arguments), t.apply(this, arguments);
      };
    }
    function Mn(e, t) {
      return e === Tn
        ? t
        : function () {
            var n = e.apply(this, arguments);
            void 0 !== n && (arguments[0] = n);
            var r = this.onsuccess,
              i = this.onerror;
            (this.onsuccess = null), (this.onerror = null);
            var o = t.apply(this, arguments);
            return (
              r &&
                (this.onsuccess = this.onsuccess ? _n(r, this.onsuccess) : r),
              i && (this.onerror = this.onerror ? _n(i, this.onerror) : i),
              void 0 !== o ? o : n
            );
          };
    }
    function Pn(e, t) {
      return e === Tn
        ? t
        : function () {
            e.apply(this, arguments);
            var n = this.onsuccess,
              r = this.onerror;
            (this.onsuccess = this.onerror = null),
              t.apply(this, arguments),
              n &&
                (this.onsuccess = this.onsuccess ? _n(n, this.onsuccess) : n),
              r && (this.onerror = this.onerror ? _n(r, this.onerror) : r);
          };
    }
    function In(e, t) {
      return e === Tn
        ? t
        : function (n) {
            var r = e.apply(this, arguments);
            Ot(n, r);
            var i = this.onsuccess,
              o = this.onerror;
            (this.onsuccess = null), (this.onerror = null);
            var s = t.apply(this, arguments);
            return (
              i &&
                (this.onsuccess = this.onsuccess ? _n(i, this.onsuccess) : i),
              o && (this.onerror = this.onerror ? _n(o, this.onerror) : o),
              void 0 === r ? (void 0 === s ? void 0 : s) : Ot(r, s)
            );
          };
    }
    function On(e, t) {
      return e === Tn
        ? t
        : function () {
            return !1 !== t.apply(this, arguments) && e.apply(this, arguments);
          };
    }
    function Ln(e, t) {
      return e === Tn
        ? t
        : function () {
            var n = e.apply(this, arguments);
            if (n && "function" == typeof n.then) {
              for (var r = this, i = arguments.length, o = new Array(i); i--; )
                o[i] = arguments[i];
              return n.then(function () {
                return t.apply(r, o);
              });
            }
            return t.apply(this, arguments);
          };
    }
    (Rn.ModifyError = bn), (Rn.DexieError = wn), (Rn.BulkError = Sn);
    var Fn = {},
      Nn = (function () {
        try {
          return new Function(
            "let F=async ()=>{},p=F();return [p,Object.getPrototypeOf(p),Promise.resolve(),F.constructor];"
          )();
        } catch (t) {
          var e = It.Promise;
          return e ? [e.resolve(), e.prototype, e.resolve()] : [];
        }
      })(),
      Bn = Nn[0],
      Hn = Nn[1],
      zn = Nn[2],
      Un = Hn && Hn.then,
      Wn = Bn && Bn.constructor,
      jn = Nn[3],
      Vn = !!zn,
      Gn = !1,
      $n = zn
        ? function () {
            zn.then(fr);
          }
        : It.setImmediate
        ? setImmediate.bind(null, fr)
        : It.MutationObserver
        ? function () {
            var e = document.createElement("div");
            new MutationObserver(function () {
              fr(), (e = null);
            }).observe(e, { attributes: !0 }),
              e.setAttribute("i", "1");
          }
        : function () {
            setTimeout(fr, 0);
          },
      qn = function (e, t) {
        nr.push([e, t]), Yn && ($n(), (Yn = !1));
      },
      Kn = !0,
      Yn = !0,
      Qn = [],
      Zn = [],
      Xn = null,
      Jn = Dn,
      er = {
        id: "global",
        global: !0,
        ref: 0,
        unhandleds: [],
        onunhandled: Nr,
        pgp: !1,
        env: {},
        finalize: function () {
          this.unhandleds.forEach(function (e) {
            try {
              Nr(e[0], e[1]);
            } catch (e) {}
          });
        },
      },
      tr = er,
      nr = [],
      rr = 0,
      ir = [];
    function or(e) {
      if ("object" != typeof this)
        throw new TypeError("Promises must be constructed via new");
      (this._listeners = []), (this.onuncatched = Tn), (this._lib = !1);
      var t = (this._PSD = tr);
      if (
        (un &&
          ((this._stackHolder = fn()),
          (this._prev = null),
          (this._numPrev = 0)),
        "function" != typeof e)
      ) {
        if (e !== Fn) throw new TypeError("Not a function");
        return (
          (this._state = arguments[1]),
          (this._value = arguments[2]),
          void (!1 === this._state && cr(this, this._value))
        );
      }
      (this._state = null), (this._value = null), ++t.ref, lr(this, e);
    }
    var sr = {
      get: function () {
        var e = tr,
          t = kr;
        function n(n, r) {
          var i = this,
            o = !e.global && (e !== tr || t !== kr);
          o && Dr();
          var s = new or(function (t, s) {
            hr(i, new ar(Lr(n, e, o), Lr(r, e, o), t, s, e));
          });
          return un && pr(s, this), s;
        }
        return (n.prototype = Fn), n;
      },
      set: function (e) {
        zt(
          this,
          "then",
          e && e.prototype === Fn
            ? sr
            : {
                get: function () {
                  return e;
                },
                set: sr.set,
              }
        );
      },
    };
    function ar(e, t, n, r, i) {
      (this.onFulfilled = "function" == typeof e ? e : null),
        (this.onRejected = "function" == typeof t ? t : null),
        (this.resolve = n),
        (this.reject = r),
        (this.psd = i);
    }
    function lr(e, t) {
      try {
        t(function (t) {
          if (null === e._state) {
            if (t === e)
              throw new TypeError("A promise cannot be resolved with itself.");
            var n = e._lib && mr();
            t && "function" == typeof t.then
              ? lr(e, function (e, n) {
                  t instanceof or ? t._then(e, n) : t.then(e, n);
                })
              : ((e._state = !0), (e._value = t), ur(e)),
              n && gr();
          }
        }, cr.bind(null, e));
      } catch (t) {
        cr(e, t);
      }
    }
    function cr(e, t) {
      if ((Zn.push(t), null === e._state)) {
        var n = e._lib && mr();
        (t = Jn(t)),
          (e._state = !1),
          (e._value = t),
          un &&
            null !== t &&
            "object" == typeof t &&
            !t._promise &&
            Qt(function () {
              var n = (function e(t, n) {
                var r;
                return Wt(t, n) || ((r = Lt(t)) && e(r, n));
              })(t, "stack");
              (t._promise = e),
                zt(t, "stack", {
                  get: function () {
                    return Gn
                      ? n && (n.get ? n.get.apply(t) : n.value)
                      : e.stack;
                  },
                });
            }),
          (function (e) {
            Qn.some(function (t) {
              return t._value === e._value;
            }) || Qn.push(e);
          })(e),
          ur(e),
          n && gr();
      }
    }
    function ur(e) {
      var t = e._listeners;
      e._listeners = [];
      for (var n = 0, r = t.length; n < r; ++n) hr(e, t[n]);
      var i = e._PSD;
      --i.ref || i.finalize(),
        0 === rr &&
          (++rr,
          qn(function () {
            0 == --rr && yr();
          }, []));
    }
    function hr(e, t) {
      if (null !== e._state) {
        var n = e._state ? t.onFulfilled : t.onRejected;
        if (null === n) return (e._state ? t.resolve : t.reject)(e._value);
        ++t.psd.ref, ++rr, qn(dr, [n, e, t]);
      } else e._listeners.push(t);
    }
    function dr(e, t, n) {
      try {
        Xn = t;
        var r,
          i = t._value;
        t._state
          ? (r = e(i))
          : (Zn.length && (Zn = []),
            (r = e(i)),
            -1 === Zn.indexOf(i) &&
              (function (e) {
                var t = Qn.length;
                for (; t; )
                  if (Qn[--t]._value === e._value) return void Qn.splice(t, 1);
              })(t)),
          n.resolve(r);
      } catch (e) {
        n.reject(e);
      } finally {
        (Xn = null), 0 == --rr && yr(), --n.psd.ref || n.psd.finalize();
      }
    }
    function pr(e, t) {
      var n = t ? t._numPrev + 1 : 0;
      n < 100 && ((e._prev = t), (e._numPrev = n));
    }
    function fr() {
      mr() && gr();
    }
    function mr() {
      var e = Kn;
      return (Kn = !1), (Yn = !1), e;
    }
    function gr() {
      var e, t, n;
      do {
        for (; nr.length > 0; )
          for (e = nr, nr = [], n = e.length, t = 0; t < n; ++t) {
            var r = e[t];
            r[0].apply(null, r[1]);
          }
      } while (nr.length > 0);
      (Kn = !0), (Yn = !0);
    }
    function yr() {
      var e = Qn;
      (Qn = []),
        e.forEach(function (e) {
          e._PSD.onunhandled.call(null, e._value, e);
        });
      for (var t = ir.slice(0), n = t.length; n; ) t[--n]();
    }
    function vr(e) {
      return new or(Fn, !1, e);
    }
    function wr(e, t) {
      var n = tr;
      return function () {
        var r = mr(),
          i = tr;
        try {
          return Pr(n, !0), e.apply(this, arguments);
        } catch (e) {
          t && t(e);
        } finally {
          Pr(i, !1), r && gr();
        }
      };
    }
    Bt(or.prototype, {
      then: sr,
      _then: function (e, t) {
        hr(this, new ar(null, null, e, t, tr));
      },
      catch: function (e) {
        if (1 === arguments.length) return this.then(null, e);
        var t = arguments[0],
          n = arguments[1];
        return "function" == typeof t
          ? this.then(null, function (e) {
              return e instanceof t ? n(e) : vr(e);
            })
          : this.then(null, function (e) {
              return e && e.name === t ? n(e) : vr(e);
            });
      },
      finally: function (e) {
        return this.then(
          function (t) {
            return e(), t;
          },
          function (t) {
            return e(), vr(t);
          }
        );
      },
      stack: {
        get: function () {
          if (this._stack) return this._stack;
          try {
            Gn = !0;
            var e = (function e(t, n, r) {
              if (n.length === r) return n;
              var i = "";
              if (!1 === t._state) {
                var o,
                  s,
                  a = t._value;
                null != a
                  ? ((o = a.name || "Error"),
                    (s = a.message || a),
                    (i = mn(a, 0)))
                  : ((o = a), (s = "")),
                  n.push(o + (s ? ": " + s : "") + i);
              }
              un &&
                ((i = mn(t._stackHolder, 2)) &&
                  -1 === n.indexOf(i) &&
                  n.push(i),
                t._prev && e(t._prev, n, r));
              return n;
            })(this, [], 20).join("\nFrom previous: ");
            return null !== this._state && (this._stack = e), e;
          } finally {
            Gn = !1;
          }
        },
      },
      timeout: function (e, t) {
        var n = this;
        return e < 1 / 0
          ? new or(function (r, i) {
              var o = setTimeout(function () {
                return i(new kn.Timeout(t));
              }, e);
              n.then(r, i).finally(clearTimeout.bind(null, o));
            })
          : this;
      },
    }),
      "undefined" != typeof Symbol &&
        Symbol.toStringTag &&
        zt(or.prototype, Symbol.toStringTag, "Promise"),
      (er.env = Ir()),
      Bt(or, {
        all: function () {
          var e = cn.apply(null, arguments).map(Ar);
          return new or(function (t, n) {
            0 === e.length && t([]);
            var r = e.length;
            e.forEach(function (i, o) {
              return or.resolve(i).then(function (n) {
                (e[o] = n), --r || t(e);
              }, n);
            });
          });
        },
        resolve: function (e) {
          if (e instanceof or) return e;
          if (e && "function" == typeof e.then)
            return new or(function (t, n) {
              e.then(t, n);
            });
          var t = new or(Fn, !0, e);
          return pr(t, Xn), t;
        },
        reject: vr,
        race: function () {
          var e = cn.apply(null, arguments).map(Ar);
          return new or(function (t, n) {
            e.map(function (e) {
              return or.resolve(e).then(t, n);
            });
          });
        },
        PSD: {
          get: function () {
            return tr;
          },
          set: function (e) {
            return (tr = e);
          },
        },
        newPSD: Rr,
        usePSD: Or,
        scheduler: {
          get: function () {
            return qn;
          },
          set: function (e) {
            qn = e;
          },
        },
        rejectionMapper: {
          get: function () {
            return Jn;
          },
          set: function (e) {
            Jn = e;
          },
        },
        follow: function (e, t) {
          return new or(function (n, r) {
            return Rr(
              function (t, n) {
                var r = tr;
                (r.unhandleds = []),
                  (r.onunhandled = n),
                  (r.finalize = _n(function () {
                    var e = this;
                    !(function (e) {
                      ir.push(function t() {
                        e(), ir.splice(ir.indexOf(t), 1);
                      }),
                        ++rr,
                        qn(function () {
                          0 == --rr && yr();
                        }, []);
                    })(function () {
                      0 === e.unhandleds.length ? t() : n(e.unhandleds[0]);
                    });
                  }, r.finalize)),
                  e();
              },
              t,
              n,
              r
            );
          });
        },
      });
    var br = { awaits: 0, echoes: 0, id: 0 },
      Sr = 0,
      Cr = [],
      Er = 0,
      kr = 0,
      xr = 0;
    function Rr(e, t, n, r) {
      var i = tr,
        o = Object.create(i);
      (o.parent = i), (o.ref = 0), (o.global = !1), (o.id = ++xr);
      var s = er.env;
      (o.env = Vn
        ? {
            Promise: or,
            PromiseProp: { value: or, configurable: !0, writable: !0 },
            all: or.all,
            race: or.race,
            resolve: or.resolve,
            reject: or.reject,
            nthen: Fr(s.nthen, o),
            gthen: Fr(s.gthen, o),
          }
        : {}),
        t && Ot(o, t),
        ++i.ref,
        (o.finalize = function () {
          --this.parent.ref || this.parent.finalize();
        });
      var a = Or(o, e, n, r);
      return 0 === o.ref && o.finalize(), a;
    }
    function Tr() {
      return br.id || (br.id = ++Sr), ++br.awaits, (br.echoes += 7), br.id;
    }
    function Dr(e) {
      !br.awaits ||
        (e && e !== br.id) ||
        (0 == --br.awaits && (br.id = 0), (br.echoes = 7 * br.awaits));
    }
    function Ar(e) {
      return br.echoes && e && e.constructor === Wn
        ? (Tr(),
          e.then(
            function (e) {
              return Dr(), e;
            },
            function (e) {
              return Dr(), Br(e);
            }
          ))
        : e;
    }
    function _r(e) {
      ++kr,
        (br.echoes && 0 != --br.echoes) || (br.echoes = br.id = 0),
        Cr.push(tr),
        Pr(e, !0);
    }
    function Mr() {
      var e = Cr[Cr.length - 1];
      Cr.pop(), Pr(e, !1);
    }
    function Pr(e, t) {
      var n,
        r = tr;
      if (
        ((t ? !br.echoes || (Er++ && e === tr) : !Er || (--Er && e === tr)) ||
          ((n = t ? _r.bind(null, e) : Mr), Un.call(Bn, n)),
        e !== tr && ((tr = e), r === er && (er.env = Ir()), Vn))
      ) {
        var i = er.env.Promise,
          o = e.env;
        (Hn.then = o.nthen),
          (i.prototype.then = o.gthen),
          (r.global || e.global) &&
            (Object.defineProperty(It, "Promise", o.PromiseProp),
            (i.all = o.all),
            (i.race = o.race),
            (i.resolve = o.resolve),
            (i.reject = o.reject));
      }
    }
    function Ir() {
      var e = It.Promise;
      return Vn
        ? {
            Promise: e,
            PromiseProp: Object.getOwnPropertyDescriptor(It, "Promise"),
            all: e.all,
            race: e.race,
            resolve: e.resolve,
            reject: e.reject,
            nthen: Hn.then,
            gthen: e.prototype.then,
          }
        : {};
    }
    function Or(e, t, n, r, i) {
      var o = tr;
      try {
        return Pr(e, !0), t(n, r, i);
      } finally {
        Pr(o, !1);
      }
    }
    function Lr(e, t, n) {
      return "function" != typeof e
        ? e
        : function () {
            var r = tr;
            n && Tr(), Pr(t, !0);
            try {
              return e.apply(this, arguments);
            } finally {
              Pr(r, !1);
            }
          };
    }
    function Fr(e, t) {
      return function (n, r) {
        return e.call(this, Lr(n, t, !1), Lr(r, t, !1));
      };
    }
    function Nr(e, t) {
      var n;
      try {
        n = t.onuncatched(e);
      } catch (e) {}
      if (!1 !== n)
        try {
          var r,
            i = { promise: t, reason: e };
          if (
            (It.document && document.createEvent
              ? ((r = document.createEvent("Event")).initEvent(
                  "unhandledrejection",
                  !0,
                  !0
                ),
                Ot(r, i))
              : It.CustomEvent &&
                Ot(
                  (r = new CustomEvent("unhandledrejection", { detail: i })),
                  i
                ),
            r &&
              It.dispatchEvent &&
              (dispatchEvent(r),
              !It.PromiseRejectionEvent && It.onunhandledrejection))
          )
            try {
              It.onunhandledrejection(r);
            } catch (e) {}
          r.defaultPrevented ||
            console.warn("Unhandled rejection: " + (e.stack || e));
        } catch (e) {}
    }
    var Br = or.reject;
    function Hr(e) {
      var t = {},
        n = function (n, r) {
          if (r) {
            for (var i = arguments.length, o = new Array(i - 1); --i; )
              o[i - 1] = arguments[i];
            return t[n].subscribe.apply(null, o), e;
          }
          if ("string" == typeof n) return t[n];
        };
      n.addEventType = o;
      for (var r = 1, i = arguments.length; r < i; ++r) o(arguments[r]);
      return n;
      function o(e, r, i) {
        if ("object" == typeof e) return s(e);
        r || (r = On), i || (i = Tn);
        var o = {
          subscribers: [],
          fire: i,
          subscribe: function (e) {
            -1 === o.subscribers.indexOf(e) &&
              (o.subscribers.push(e), (o.fire = r(o.fire, e)));
          },
          unsubscribe: function (e) {
            (o.subscribers = o.subscribers.filter(function (t) {
              return t !== e;
            })),
              (o.fire = o.subscribers.reduce(r, i));
          },
        };
        return (t[e] = n[e] = o), o;
      }
      function s(e) {
        Mt(e).forEach(function (t) {
          var n = e[t];
          if (Pt(n)) o(t, e[t][0], e[t][1]);
          else {
            if ("asap" !== n)
              throw new kn.InvalidArgument("Invalid event config");
            var r = o(t, Dn, function () {
              for (var e = arguments.length, t = new Array(e); e--; )
                t[e] = arguments[e];
              r.subscribers.forEach(function (e) {
                qt(function () {
                  e.apply(null, t);
                });
              });
            });
          }
        });
      }
    }
    var zr,
      Ur = String.fromCharCode(65535),
      Wr = (function () {
        try {
          return IDBKeyRange.only([[]]), [[]];
        } catch (e) {
          return Ur;
        }
      })(),
      jr =
        "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",
      Vr = [],
      Gr =
        "undefined" != typeof navigator &&
        /(MSIE|Trident|Edge)/.test(navigator.userAgent),
      $r = Gr,
      qr = Gr,
      Kr = function (e) {
        return !/(dexie\.js|dexie\.min\.js)/.test(e);
      };
    function Yr(e, t) {
      var n,
        r,
        i,
        o,
        s,
        a = Yr.dependencies,
        l = Ot(
          {
            addons: Yr.addons,
            autoOpen: !0,
            indexedDB: a.indexedDB,
            IDBKeyRange: a.IDBKeyRange,
          },
          t
        ),
        c = l.addons,
        u = l.autoOpen,
        h = l.indexedDB,
        d = l.IDBKeyRange,
        p = (this._dbSchema = {}),
        f = [],
        m = [],
        g = {},
        y = null,
        v = null,
        w = !1,
        b = null,
        S = !1,
        C = "readwrite",
        E = this,
        k = new or(function (e) {
          n = e;
        }),
        x = new or(function (e, t) {
          r = t;
        }),
        R = !0,
        T = !!si(h);
      function D(e) {
        (this._cfg = {
          version: e,
          storesSource: null,
          dbschema: {},
          tables: {},
          contentUpgrade: null,
        }),
          this.stores({});
      }
      function A(e, t, n) {
        var r = E._createTransaction(C, m, p);
        r.create(t), r._completion.catch(n);
        var i = r._reject.bind(r);
        Rr(function () {
          (tr.trans = r),
            0 === e
              ? (Mt(p).forEach(function (e) {
                  _(t, e, p[e].primKey, p[e].indexes);
                }),
                or
                  .follow(function () {
                    return E.on.populate.fire(r);
                  })
                  .catch(i))
              : (function (e, t, n) {
                  var r = [],
                    i = f.filter(function (t) {
                      return t._cfg.version === e;
                    })[0];
                  if (!i)
                    throw new kn.Upgrade(
                      "Dexie specification of currently installed DB version is missing"
                    );
                  p = E._dbSchema = i._cfg.dbschema;
                  var o = !1;
                  function s() {
                    return r.length
                      ? or.resolve(r.shift()(t.idbtrans)).then(s)
                      : or.resolve();
                  }
                  return (
                    f
                      .filter(function (t) {
                        return t._cfg.version > e;
                      })
                      .forEach(function (e) {
                        r.push(function () {
                          var r = p,
                            i = e._cfg.dbschema;
                          Q(r, n), Q(i, n), (p = E._dbSchema = i);
                          var s = (function (e, t) {
                            var n = { del: [], add: [], change: [] };
                            for (var r in e) t[r] || n.del.push(r);
                            for (r in t) {
                              var i = e[r],
                                o = t[r];
                              if (i) {
                                var s = {
                                  name: r,
                                  def: o,
                                  recreate: !1,
                                  del: [],
                                  add: [],
                                  change: [],
                                };
                                if (i.primKey.src !== o.primKey.src)
                                  (s.recreate = !0), n.change.push(s);
                                else {
                                  var a = i.idxByName,
                                    l = o.idxByName;
                                  for (var c in a) l[c] || s.del.push(c);
                                  for (c in l) {
                                    var u = a[c],
                                      h = l[c];
                                    u
                                      ? u.src !== h.src && s.change.push(h)
                                      : s.add.push(h);
                                  }
                                  (s.del.length > 0 ||
                                    s.add.length > 0 ||
                                    s.change.length > 0) &&
                                    n.change.push(s);
                                }
                              } else n.add.push([r, o]);
                            }
                            return n;
                          })(r, i);
                          if (
                            (s.add.forEach(function (e) {
                              _(n, e[0], e[1].primKey, e[1].indexes);
                            }),
                            s.change.forEach(function (e) {
                              if (e.recreate)
                                throw new kn.Upgrade(
                                  "Not yet support for changing primary key"
                                );
                              var t = n.objectStore(e.name);
                              e.add.forEach(function (e) {
                                M(t, e);
                              }),
                                e.change.forEach(function (e) {
                                  t.deleteIndex(e.name), M(t, e);
                                }),
                                e.del.forEach(function (e) {
                                  t.deleteIndex(e);
                                });
                            }),
                            e._cfg.contentUpgrade)
                          )
                            return (
                              (o = !0),
                              or.follow(function () {
                                e._cfg.contentUpgrade(t);
                              })
                            );
                        }),
                          r.push(function (t) {
                            (o && $r) ||
                              (function (e, t) {
                                for (
                                  var n = 0;
                                  n < t.db.objectStoreNames.length;
                                  ++n
                                ) {
                                  var r = t.db.objectStoreNames[n];
                                  null == e[r] && t.db.deleteObjectStore(r);
                                }
                              })(e._cfg.dbschema, t);
                          });
                      }),
                    s().then(function () {
                      !(function (e, t) {
                        Mt(e).forEach(function (n) {
                          t.db.objectStoreNames.contains(n) ||
                            _(t, n, e[n].primKey, e[n].indexes);
                        });
                      })(p, n);
                    })
                  );
                })(e, r, t).catch(i);
        });
      }
      function _(e, t, n, r) {
        var i = e.db.createObjectStore(
          t,
          n.keyPath
            ? { keyPath: n.keyPath, autoIncrement: n.auto }
            : { autoIncrement: n.auto }
        );
        return (
          r.forEach(function (e) {
            M(i, e);
          }),
          i
        );
      }
      function M(e, t) {
        e.createIndex(t.name, t.keyPath, {
          unique: t.unique,
          multiEntry: t.multi,
        });
      }
      function P(e, t, n) {
        var r = arguments.length;
        if (r < 2) throw new kn.InvalidArgument("Too few arguments");
        for (var i = new Array(r - 1); --r; ) i[r - 1] = arguments[r];
        n = i.pop();
        var o = tn(i);
        return [e, o, n];
      }
      function I(e, t, n) {
        (this.name = e),
          (this.schema = t),
          (this._tx = n),
          (this.hook = g[e]
            ? g[e].hook
            : Hr(null, {
                creating: [Mn, Tn],
                reading: [An, Dn],
                updating: [In, Tn],
                deleting: [Pn, Tn],
              }));
      }
      function O(e, t, n) {
        return (n ? ei : Xr)(function (n) {
          e.push(n), t && t();
        });
      }
      function L(e, t, n, r, i) {
        return new or(function (o, s) {
          var a = n.length,
            l = a - 1;
          if (0 === a) return o();
          if (r) {
            var c,
              u = ei(s),
              h = Zr(null);
            Qt(
              function () {
                for (var r = 0; r < a; ++r) {
                  c = { onsuccess: null, onerror: null };
                  var s = n[r];
                  i.call(c, s[0], s[1], t);
                  var d = e.delete(s[0]);
                  (d._hookCtx = c),
                    (d.onerror = u),
                    (d.onsuccess = r === l ? Zr(o) : h);
                }
              },
              function (e) {
                throw (c.onerror && c.onerror(e), e);
              }
            );
          } else
            for (var d = 0; d < a; ++d) {
              var p = e.delete(n[d]);
              (p.onerror = Xr(s)),
                d === l &&
                  (p.onsuccess = wr(function () {
                    return o();
                  }));
            }
        });
      }
      function F(e, t, n, r) {
        var i = this;
        (this.db = E),
          (this.mode = e),
          (this.storeNames = t),
          (this.idbtrans = null),
          (this.on = Hr(this, "complete", "error", "abort")),
          (this.parent = r || null),
          (this.active = !0),
          (this._reculock = 0),
          (this._blockedFuncs = []),
          (this._resolve = null),
          (this._reject = null),
          (this._waitingFor = null),
          (this._waitingQueue = null),
          (this._spinCount = 0),
          (this._completion = new or(function (e, t) {
            (i._resolve = e), (i._reject = t);
          })),
          this._completion.then(
            function () {
              (i.active = !1), i.on.complete.fire();
            },
            function (e) {
              var t = i.active;
              return (
                (i.active = !1),
                i.on.error.fire(e),
                i.parent
                  ? i.parent._reject(e)
                  : t && i.idbtrans && i.idbtrans.abort(),
                Br(e)
              );
            }
          );
      }
      function N(e, t, n) {
        this._ctx = { table: e, index: ":id" === t ? null : t, or: n };
      }
      function B(e, t) {
        var n = null,
          r = null;
        if (t)
          try {
            n = t();
          } catch (e) {
            r = e;
          }
        var i = e._ctx,
          o = i.table;
        this._ctx = {
          table: o,
          index: i.index,
          isPrimKey:
            !i.index ||
            (o.schema.primKey.keyPath && i.index === o.schema.primKey.name),
          range: n,
          keysOnly: !1,
          dir: "next",
          unique: "",
          algorithm: null,
          filter: null,
          replayFilter: null,
          justLimit: !0,
          isMatch: null,
          offset: 0,
          limit: 1 / 0,
          error: r,
          or: i.or,
          valueMapper: o.hook.reading.fire,
        };
      }
      function H(e, t) {
        return (
          !(e.filter || e.algorithm || e.or) &&
          (t ? e.justLimit : !e.replayFilter)
        );
      }
      function z(e, t) {
        return e._cfg.version - t._cfg.version;
      }
      function U(e, t, n) {
        t.forEach(function (t) {
          var r = n[t];
          e.forEach(function (e) {
            t in e ||
              (e === F.prototype || e instanceof F
                ? zt(e, t, {
                    get: function () {
                      return this.table(t);
                    },
                  })
                : (e[t] = new I(t, r)));
          });
        });
      }
      function W(e, t, n, r, i, o) {
        var s = wr(
          o
            ? function (e, t, r) {
                return n(o(e), t, r);
              }
            : n,
          i
        );
        e.onerror || (e.onerror = Xr(i)),
          (e.onsuccess = Yt(
            t
              ? function () {
                  var n = e.result;
                  if (n) {
                    var o = function () {
                      n.continue();
                    };
                    t(
                      n,
                      function (e) {
                        o = e;
                      },
                      r,
                      i
                    ) &&
                      s(n.value, n, function (e) {
                        o = e;
                      }),
                      o();
                  } else r();
                }
              : function () {
                  var t = e.result;
                  if (t) {
                    var n = function () {
                      t.continue();
                    };
                    s(t.value, t, function (e) {
                      n = e;
                    }),
                      n();
                  } else r();
                },
            i
          ));
      }
      function j(e, t) {
        return h.cmp(e, t);
      }
      function V(e, t) {
        return j(e, t) > 0 ? e : t;
      }
      function G(e, t) {
        return h.cmp(e, t);
      }
      function $(e, t) {
        return h.cmp(t, e);
      }
      function q(e, t) {
        return e < t ? -1 : e === t ? 0 : 1;
      }
      function K(e, t) {
        return e > t ? -1 : e === t ? 0 : 1;
      }
      function Y(e, t) {
        return e
          ? t
            ? function () {
                return e.apply(this, arguments) && t.apply(this, arguments);
              }
            : e
          : t;
      }
      function Q(e, t) {
        for (var n = t.db.objectStoreNames, r = 0; r < n.length; ++r) {
          var o = n[r],
            s = t.objectStore(o);
          i = "getAll" in s;
          for (var a = 0; a < s.indexNames.length; ++a) {
            var l = s.indexNames[a],
              c = s.index(l).keyPath,
              u = "string" == typeof c ? c : "[" + Vt(c).join("+") + "]";
            if (e[o]) {
              var h = e[o].idxByName[u];
              h && (h.name = l);
            }
          }
        }
        /Safari/.test(navigator.userAgent) &&
          !/(Chrome\/|Edge\/)/.test(navigator.userAgent) &&
          It.WorkerGlobalScope &&
          It instanceof It.WorkerGlobalScope &&
          [].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1] < 604 &&
          (i = !1);
      }
      function Z(e) {
        E.on("blocked").fire(e),
          Vr.filter(function (e) {
            return e.name === E.name && e !== E && !e._vcFired;
          }).map(function (t) {
            return t.on("versionchange").fire(e);
          });
      }
      (this.version = function (e) {
        if (y || w)
          throw new kn.Schema("Cannot add version when database is open");
        this.verno = Math.max(this.verno, e);
        var t = f.filter(function (t) {
          return t._cfg.version === e;
        })[0];
        return t || ((t = new D(e)), f.push(t), f.sort(z), (R = !1), t);
      }),
        Ot(D.prototype, {
          stores: function (e) {
            this._cfg.storesSource = this._cfg.storesSource
              ? Ot(this._cfg.storesSource, e)
              : e;
            var t = {};
            f.forEach(function (e) {
              Ot(t, e._cfg.storesSource);
            });
            var n = (this._cfg.dbschema = {});
            return (
              this._parseStoresSpec(t, n),
              (p = E._dbSchema = n),
              [g, E, F.prototype].forEach(function (e) {
                for (var t in e) e[t] instanceof I && delete e[t];
              }),
              U([g, E, F.prototype, this._cfg.tables], Mt(n), n),
              (m = Mt(n)),
              this
            );
          },
          upgrade: function (e) {
            return (this._cfg.contentUpgrade = e), this;
          },
          _parseStoresSpec: function (e, t) {
            Mt(e).forEach(function (n) {
              if (null !== e[n]) {
                var r = {},
                  i = (function (e) {
                    var t = [];
                    return (
                      e.split(",").forEach(function (e) {
                        var n = (e = e.trim()).replace(/([&*]|\+\+)/g, ""),
                          r = /^\[/.test(n)
                            ? n.match(/^\[(.*)\]$/)[1].split("+")
                            : n;
                        t.push(
                          new ri(
                            n,
                            r || null,
                            /\&/.test(e),
                            /\*/.test(e),
                            /\+\+/.test(e),
                            Pt(r),
                            /\./.test(e)
                          )
                        );
                      }),
                      t
                    );
                  })(e[n]),
                  o = i.shift();
                if (o.multi)
                  throw new kn.Schema("Primary key cannot be multi-valued");
                o.keyPath && Xt(r, o.keyPath, o.auto ? 0 : o.keyPath),
                  i.forEach(function (e) {
                    if (e.auto)
                      throw new kn.Schema(
                        "Only primary key can be marked as autoIncrement (++)"
                      );
                    if (!e.keyPath)
                      throw new kn.Schema(
                        "Index must have a name and cannot be an empty string"
                      );
                    Xt(
                      r,
                      e.keyPath,
                      e.compound
                        ? e.keyPath.map(function () {
                            return "";
                          })
                        : ""
                    );
                  }),
                  (t[n] = new ii(n, o, i, r));
              }
            });
          },
        }),
        (this._allTables = g),
        (this._createTransaction = function (e, t, n, r) {
          return new F(e, t, n, r);
        }),
        (this._whenReady = function (e) {
          return S || tr.letThrough
            ? e()
            : new or(function (e, t) {
                if (!w) {
                  if (!u) return void t(new kn.DatabaseClosed());
                  E.open().catch(Tn);
                }
                k.then(e, t);
              }).then(e);
        }),
        (this.verno = 0),
        (this.open = function () {
          if (w || y)
            return k.then(function () {
              return v ? Br(v) : E;
            });
          un && (x._stackHolder = fn()), (w = !0), (v = null), (S = !1);
          var t = n,
            r = null;
          return or
            .race([
              x,
              new or(function (t, n) {
                if (!h)
                  throw new kn.MissingAPI(
                    "indexedDB API not found. If using IE10+, make sure to run your code on a server URL (not locally). If using old Safari versions, make sure to include indexedDB polyfill."
                  );
                var i = R ? h.open(e) : h.open(e, Math.round(10 * E.verno));
                if (!i) throw new kn.MissingAPI("IndexedDB API not available");
                (i.onerror = Xr(n)),
                  (i.onblocked = wr(Z)),
                  (i.onupgradeneeded = wr(function (t) {
                    if (((r = i.transaction), R && !E._allowEmptyDB)) {
                      (i.onerror = ti), r.abort(), i.result.close();
                      var o = h.deleteDatabase(e);
                      o.onsuccess = o.onerror = wr(function () {
                        n(
                          new kn.NoSuchDatabase(
                            "Database " + e + " doesnt exist"
                          )
                        );
                      });
                    } else {
                      (r.onerror = Xr(n)),
                        A(
                          (t.oldVersion > Math.pow(2, 62) ? 0 : t.oldVersion) /
                            10,
                          r,
                          n
                        );
                    }
                  }, n)),
                  (i.onsuccess = wr(function () {
                    if (((r = null), (y = i.result), Vr.push(E), R))
                      !(function () {
                        if (
                          ((E.verno = y.version / 10),
                          (E._dbSchema = p = {}),
                          0 === (m = Vt(y.objectStoreNames, 0)).length)
                        )
                          return;
                        var e = y.transaction(oi(m), "readonly");
                        m.forEach(function (t) {
                          for (
                            var n = e.objectStore(t),
                              r = n.keyPath,
                              i =
                                r &&
                                "string" == typeof r &&
                                -1 !== r.indexOf("."),
                              o = new ri(
                                r,
                                r || "",
                                !1,
                                !1,
                                !!n.autoIncrement,
                                r && "string" != typeof r,
                                i
                              ),
                              s = [],
                              a = 0;
                            a < n.indexNames.length;
                            ++a
                          ) {
                            var l = n.index(n.indexNames[a]);
                            i =
                              (r = l.keyPath) &&
                              "string" == typeof r &&
                              -1 !== r.indexOf(".");
                            var c = new ri(
                              l.name,
                              r,
                              !!l.unique,
                              !!l.multiEntry,
                              !1,
                              r && "string" != typeof r,
                              i
                            );
                            s.push(c);
                          }
                          p[t] = new ii(t, o, s, {});
                        }),
                          U([g], Mt(p), p);
                      })();
                    else if (y.objectStoreNames.length > 0)
                      try {
                        Q(p, y.transaction(oi(y.objectStoreNames), "readonly"));
                      } catch (e) {}
                    (y.onversionchange = wr(function (e) {
                      (E._vcFired = !0), E.on("versionchange").fire(e);
                    })),
                      T ||
                        "__dbnames" === e ||
                        zr.dbnames.put({ name: e }).catch(Tn),
                      t();
                  }, n));
              }),
            ])
            .then(function () {
              return (
                (b = []),
                or.resolve(Yr.vip(E.on.ready.fire)).then(function e() {
                  if (b.length > 0) {
                    var t = b.reduce(Ln, Tn);
                    return (b = []), or.resolve(Yr.vip(t)).then(e);
                  }
                })
              );
            })
            .finally(function () {
              b = null;
            })
            .then(function () {
              return (w = !1), E;
            })
            .catch(function (e) {
              try {
                r && r.abort();
              } catch (e) {}
              return (w = !1), E.close(), Br((v = e));
            })
            .finally(function () {
              (S = !0), t();
            });
        }),
        (this.close = function () {
          var e = Vr.indexOf(E);
          if ((e >= 0 && Vr.splice(e, 1), y)) {
            try {
              y.close();
            } catch (e) {}
            y = null;
          }
          (u = !1),
            (v = new kn.DatabaseClosed()),
            w && r(v),
            (k = new or(function (e) {
              n = e;
            })),
            (x = new or(function (e, t) {
              r = t;
            }));
        }),
        (this.delete = function () {
          var t = arguments.length > 0;
          return new or(function (n, r) {
            if (t)
              throw new kn.InvalidArgument(
                "Arguments not allowed in db.delete()"
              );
            function i() {
              E.close();
              var t = h.deleteDatabase(e);
              (t.onsuccess = wr(function () {
                T || zr.dbnames.delete(e).catch(Tn), n();
              })),
                (t.onerror = Xr(r)),
                (t.onblocked = Z);
            }
            w ? k.then(i) : i();
          });
        }),
        (this.backendDB = function () {
          return y;
        }),
        (this.isOpen = function () {
          return null !== y;
        }),
        (this.hasBeenClosed = function () {
          return v && v instanceof kn.DatabaseClosed;
        }),
        (this.hasFailed = function () {
          return null !== v;
        }),
        (this.dynamicallyOpened = function () {
          return R;
        }),
        (this.name = e),
        Bt(this, {
          tables: {
            get: function () {
              return Mt(g).map(function (e) {
                return g[e];
              });
            },
          },
        }),
        (this.on = Hr(this, "populate", "blocked", "versionchange", {
          ready: [Ln, Tn],
        })),
        (this.on.ready.subscribe = Gt(this.on.ready.subscribe, function (e) {
          return function (t, n) {
            Yr.vip(function () {
              S
                ? (v || or.resolve().then(t), n && e(t))
                : b
                ? (b.push(t), n && e(t))
                : (e(t),
                  n ||
                    e(function e() {
                      E.on.ready.unsubscribe(t), E.on.ready.unsubscribe(e);
                    }));
            });
          };
        })),
        (this.transaction = function () {
          var e = P.apply(this, arguments);
          return this._transaction.apply(this, e);
        }),
        (this._transaction = function (e, t, n) {
          var r = tr.trans;
          (r && r.db === E && -1 === e.indexOf("!")) || (r = null);
          var i = -1 !== e.indexOf("?");
          e = e.replace("!", "").replace("?", "");
          try {
            var o = t.map(function (e) {
              var t = e instanceof I ? e.name : e;
              if ("string" != typeof t)
                throw new TypeError(
                  "Invalid table argument to Dexie.transaction(). Only Table or String are allowed"
                );
              return t;
            });
            if ("r" == e || "readonly" == e) e = "readonly";
            else {
              if ("rw" != e && e != C)
                throw new kn.InvalidArgument("Invalid transaction mode: " + e);
              e = C;
            }
            if (r) {
              if ("readonly" === r.mode && e === C) {
                if (!i)
                  throw new kn.SubTransaction(
                    "Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY"
                  );
                r = null;
              }
              r &&
                o.forEach(function (e) {
                  if (r && -1 === r.storeNames.indexOf(e)) {
                    if (!i)
                      throw new kn.SubTransaction(
                        "Table " + e + " not included in parent transaction."
                      );
                    r = null;
                  }
                }),
                i && r && !r.active && (r = null);
            }
          } catch (e) {
            return r
              ? r._promise(null, function (t, n) {
                  n(e);
                })
              : Br(e);
          }
          return r
            ? r._promise(e, s, "lock")
            : tr.trans
            ? Or(tr.transless, function () {
                return E._whenReady(s);
              })
            : E._whenReady(s);
          function s() {
            return or.resolve().then(function () {
              var t,
                i = tr.transless || tr,
                s = E._createTransaction(e, o, p, r),
                a = { trans: s, transless: i };
              r ? (s.idbtrans = r.idbtrans) : s.create(),
                n.constructor === jn && Tr();
              var l = or.follow(function () {
                if ((t = n.call(s, s)))
                  if (t.constructor === Wn) {
                    var e = Dr.bind(null, null);
                    t.then(e, e);
                  } else
                    "function" == typeof t.next &&
                      "function" == typeof t.throw &&
                      (t = ni(t));
              }, a);
              return (t && "function" == typeof t.then
                ? or.resolve(t).then(function (e) {
                    return s.active
                      ? e
                      : Br(
                          new kn.PrematureCommit(
                            "Transaction committed too early. See http://bit.ly/2kdckMn"
                          )
                        );
                  })
                : l.then(function () {
                    return t;
                  })
              )
                .then(function (e) {
                  return (
                    r && s._resolve(),
                    s._completion.then(function () {
                      return e;
                    })
                  );
                })
                .catch(function (e) {
                  return s._reject(e), Br(e);
                });
            });
          }
        }),
        (this.table = function (e) {
          if (!Nt(g, e))
            throw new kn.InvalidTable("Table " + e + " does not exist");
          return g[e];
        }),
        Bt(I.prototype, {
          _trans: function (e, t, n) {
            var r = this._tx || tr.trans;
            return r && r.db === E
              ? r === tr.trans
                ? r._promise(e, t, n)
                : Rr(
                    function () {
                      return r._promise(e, t, n);
                    },
                    { trans: r, transless: tr.transless || tr }
                  )
              : (function e(t, n, r) {
                  if (S || tr.letThrough) {
                    var i = E._createTransaction(t, n, p);
                    try {
                      i.create();
                    } catch (e) {
                      return Br(e);
                    }
                    return i
                      ._promise(t, function (e, t) {
                        return Rr(function () {
                          return (tr.trans = i), r(e, t, i);
                        });
                      })
                      .then(function (e) {
                        return i._completion.then(function () {
                          return e;
                        });
                      });
                  }
                  if (!w) {
                    if (!u) return Br(new kn.DatabaseClosed());
                    E.open().catch(Tn);
                  }
                  return k.then(function () {
                    return e(t, n, r);
                  });
                })(e, [this.name], t);
          },
          _idbstore: function (e, t, n) {
            var r = this.name;
            return this._trans(
              e,
              function (e, n, i) {
                if (-1 === i.storeNames.indexOf(r))
                  throw new kn.NotFound(
                    "Table" + r + " not part of transaction"
                  );
                return t(e, n, i.idbtrans.objectStore(r), i);
              },
              n
            );
          },
          get: function (e, t) {
            if (e && e.constructor === Object) return this.where(e).first(t);
            var n = this;
            return this._idbstore("readonly", function (t, r, i) {
              var o = i.get(e);
              (o.onerror = Xr(r)),
                (o.onsuccess = wr(function () {
                  t(n.hook.reading.fire(o.result));
                }, r));
            }).then(t);
          },
          where: function (e) {
            if ("string" == typeof e) return new N(this, e);
            if (Pt(e)) return new N(this, "[" + e.join("+") + "]");
            var t = Mt(e);
            if (1 === t.length) return this.where(t[0]).equals(e[t[0]]);
            var n = this.schema.indexes
              .concat(this.schema.primKey)
              .filter(function (e) {
                return (
                  e.compound &&
                  t.every(function (t) {
                    return e.keyPath.indexOf(t) >= 0;
                  }) &&
                  e.keyPath.every(function (e) {
                    return t.indexOf(e) >= 0;
                  })
                );
              })[0];
            if (n && Wr !== Ur)
              return this.where(n.name).equals(
                n.keyPath.map(function (t) {
                  return e[t];
                })
              );
            n ||
              console.warn(
                "The query " +
                  JSON.stringify(e) +
                  " on " +
                  this.name +
                  " would benefit of a compound index [" +
                  t.join("+") +
                  "]"
              );
            var r = this.schema.idxByName,
              i = t.reduce(
                function (t, n) {
                  return [
                    t[0] || r[n],
                    t[0] || !r[n]
                      ? Y(t[1], function (t) {
                          return "" + Zt(t, n) == "" + e[n];
                        })
                      : t[1],
                  ];
                },
                [null, null]
              ),
              o = i[0];
            return o
              ? this.where(o.name).equals(e[o.keyPath]).filter(i[1])
              : n
              ? this.filter(i[1])
              : this.where(t).equals("");
          },
          count: function (e) {
            return this.toCollection().count(e);
          },
          offset: function (e) {
            return this.toCollection().offset(e);
          },
          limit: function (e) {
            return this.toCollection().limit(e);
          },
          reverse: function () {
            return this.toCollection().reverse();
          },
          filter: function (e) {
            return this.toCollection().and(e);
          },
          each: function (e) {
            return this.toCollection().each(e);
          },
          toArray: function (e) {
            return this.toCollection().toArray(e);
          },
          orderBy: function (e) {
            return new B(new N(this, Pt(e) ? "[" + e.join("+") + "]" : e));
          },
          toCollection: function () {
            return new B(new N(this));
          },
          mapToClass: function (e, t) {
            this.schema.mappedClass = e;
            var n = Object.create(e.prototype);
            t && Qr(n, t), (this.schema.instanceTemplate = n);
            var r = function (t) {
              if (!t) return t;
              var n = Object.create(e.prototype);
              for (var r in t)
                if (Nt(t, r))
                  try {
                    n[r] = t[r];
                  } catch (e) {}
              return n;
            };
            return (
              this.schema.readHook &&
                this.hook.reading.unsubscribe(this.schema.readHook),
              (this.schema.readHook = r),
              this.hook("reading", r),
              e
            );
          },
          defineClass: function (e) {
            return this.mapToClass(Yr.defineClass(e), e);
          },
          bulkDelete: function (e) {
            return this.hook.deleting.fire === Tn
              ? this._idbstore(C, function (t, n, r, i) {
                  t(L(r, i, e, !1, Tn));
                })
              : this.where(":id")
                  .anyOf(e)
                  .delete()
                  .then(function () {});
          },
          bulkPut: function (e, t) {
            var n = this;
            return this._idbstore(
              C,
              function (r, i, o) {
                if (!o.keyPath && !n.schema.primKey.auto && !t)
                  throw new kn.InvalidArgument(
                    "bulkPut() with non-inbound keys requires keys array in second argument"
                  );
                if (o.keyPath && t)
                  throw new kn.InvalidArgument(
                    "bulkPut(): keys argument invalid on tables with inbound keys"
                  );
                if (t && t.length !== e.length)
                  throw new kn.InvalidArgument(
                    "Arguments objects and keys must have the same length"
                  );
                if (0 === e.length) return r();
                var s,
                  a,
                  l = function (e) {
                    0 === c.length
                      ? r(e)
                      : i(
                          new Sn(
                            n.name +
                              ".bulkPut(): " +
                              c.length +
                              " of " +
                              u +
                              " operations failed",
                            c
                          )
                        );
                  },
                  c = [],
                  u = e.length,
                  h = n;
                if (
                  n.hook.creating.fire === Tn &&
                  n.hook.updating.fire === Tn
                ) {
                  a = O(c);
                  for (var d = 0, p = e.length; d < p; ++d)
                    (s = t ? o.put(e[d], t[d]) : o.put(e[d])).onerror = a;
                  (s.onerror = O(c, l)), (s.onsuccess = Jr(l));
                } else {
                  var f =
                      t ||
                      (o.keyPath &&
                        e.map(function (e) {
                          return Zt(e, o.keyPath);
                        })),
                    m =
                      f &&
                      Kt(f, function (t, n) {
                        return null != t && [t, e[n]];
                      });
                  (f
                    ? h
                        .where(":id")
                        .anyOf(
                          f.filter(function (e) {
                            return null != e;
                          })
                        )
                        .modify(function () {
                          (this.value = m[this.primKey]),
                            (m[this.primKey] = null);
                        })
                        .catch(bn, function (e) {
                          c = e.failures;
                        })
                        .then(function () {
                          for (
                            var n = [], r = t && [], i = f.length - 1;
                            i >= 0;
                            --i
                          ) {
                            var o = f[i];
                            (null == o || m[o]) &&
                              (n.push(e[i]),
                              t && r.push(o),
                              null != o && (m[o] = null));
                          }
                          return n.reverse(), t && r.reverse(), h.bulkAdd(n, r);
                        })
                        .then(function (e) {
                          var t = f[f.length - 1];
                          return null != t ? t : e;
                        })
                    : h.bulkAdd(e)
                  )
                    .then(l)
                    .catch(Sn, function (e) {
                      (c = c.concat(e.failures)), l();
                    })
                    .catch(i);
                }
              },
              "locked"
            );
          },
          bulkAdd: function (e, t) {
            var n = this,
              r = this.hook.creating.fire;
            return this._idbstore(C, function (i, o, s, a) {
              if (!s.keyPath && !n.schema.primKey.auto && !t)
                throw new kn.InvalidArgument(
                  "bulkAdd() with non-inbound keys requires keys array in second argument"
                );
              if (s.keyPath && t)
                throw new kn.InvalidArgument(
                  "bulkAdd(): keys argument invalid on tables with inbound keys"
                );
              if (t && t.length !== e.length)
                throw new kn.InvalidArgument(
                  "Arguments objects and keys must have the same length"
                );
              if (0 === e.length) return i();
              function l(e) {
                0 === d.length
                  ? i(e)
                  : o(
                      new Sn(
                        n.name +
                          ".bulkAdd(): " +
                          d.length +
                          " of " +
                          p +
                          " operations failed",
                        d
                      )
                    );
              }
              var c,
                u,
                h,
                d = [],
                p = e.length;
              if (r !== Tn) {
                var f,
                  m = s.keyPath;
                (u = O(d, null, !0)),
                  (h = Zr(null)),
                  Qt(
                    function () {
                      for (var n = 0, i = e.length; n < i; ++n) {
                        f = { onerror: null, onsuccess: null };
                        var o = t && t[n],
                          l = e[n],
                          d = t ? o : m ? Zt(l, m) : void 0,
                          p = r.call(f, d, l, a);
                        null == d &&
                          null != p &&
                          (m ? Xt((l = rn(l)), m, p) : (o = p)),
                          ((c =
                            null != o ? s.add(l, o) : s.add(l))._hookCtx = f),
                          n < i - 1 &&
                            ((c.onerror = u), f.onsuccess && (c.onsuccess = h));
                      }
                    },
                    function (e) {
                      throw (f.onerror && f.onerror(e), e);
                    }
                  ),
                  (c.onerror = O(d, l, !0)),
                  (c.onsuccess = Zr(l));
              } else {
                u = O(d);
                for (var g = 0, y = e.length; g < y; ++g)
                  (c = t ? s.add(e[g], t[g]) : s.add(e[g])).onerror = u;
                (c.onerror = O(d, l)), (c.onsuccess = Jr(l));
              }
            });
          },
          add: function (e, t) {
            var n = this.hook.creating.fire;
            return this._idbstore(C, function (r, i, o, s) {
              var a = { onsuccess: null, onerror: null };
              if (n !== Tn) {
                var l = null != t ? t : o.keyPath ? Zt(e, o.keyPath) : void 0,
                  c = n.call(a, l, e, s);
                null == l &&
                  null != c &&
                  (o.keyPath ? Xt(e, o.keyPath, c) : (t = c));
              }
              try {
                var u = null != t ? o.add(e, t) : o.add(e);
                (u._hookCtx = a),
                  (u.onerror = ei(i)),
                  (u.onsuccess = Zr(function (t) {
                    var n = o.keyPath;
                    n && Xt(e, n, t), r(t);
                  }));
              } catch (e) {
                throw (a.onerror && a.onerror(e), e);
              }
            });
          },
          put: function (e, t) {
            var n = this,
              r = this.hook.creating.fire,
              i = this.hook.updating.fire;
            if (r !== Tn || i !== Tn) {
              var o = this.schema.primKey.keyPath,
                s = void 0 !== t ? t : o && Zt(e, o);
              return null == s
                ? this.add(e)
                : ((e = rn(e)),
                  this._trans(
                    C,
                    function () {
                      return n
                        .where(":id")
                        .equals(s)
                        .modify(function () {
                          this.value = e;
                        })
                        .then(function (r) {
                          return 0 === r ? n.add(e, t) : s;
                        });
                    },
                    "locked"
                  ));
            }
            return this._idbstore(C, function (n, r, i) {
              var o = void 0 !== t ? i.put(e, t) : i.put(e);
              (o.onerror = Xr(r)),
                (o.onsuccess = wr(function (t) {
                  var r = i.keyPath;
                  r && Xt(e, r, t.target.result), n(o.result);
                }));
            });
          },
          delete: function (e) {
            return this.hook.deleting.subscribers.length
              ? this.where(":id").equals(e).delete()
              : this._idbstore(C, function (t, n, r) {
                  var i = r.delete(e);
                  (i.onerror = Xr(n)),
                    (i.onsuccess = wr(function () {
                      t(i.result);
                    }));
                });
          },
          clear: function () {
            return this.hook.deleting.subscribers.length
              ? this.toCollection().delete()
              : this._idbstore(C, function (e, t, n) {
                  var r = n.clear();
                  (r.onerror = Xr(t)),
                    (r.onsuccess = wr(function () {
                      e(r.result);
                    }));
                });
          },
          update: function (e, t) {
            if ("object" != typeof t || Pt(t))
              throw new kn.InvalidArgument("Modifications must be an object.");
            if ("object" != typeof e || Pt(e))
              return this.where(":id").equals(e).modify(t);
            Mt(t).forEach(function (n) {
              Xt(e, n, t[n]);
            });
            var n = Zt(e, this.schema.primKey.keyPath);
            return void 0 === n
              ? Br(
                  new kn.InvalidArgument(
                    "Given object does not contain its primary key"
                  )
                )
              : this.where(":id").equals(n).modify(t);
          },
        }),
        Bt(F.prototype, {
          _lock: function () {
            return (
              $t(!tr.global),
              ++this._reculock,
              1 !== this._reculock || tr.global || (tr.lockOwnerFor = this),
              this
            );
          },
          _unlock: function () {
            if (($t(!tr.global), 0 == --this._reculock))
              for (
                tr.global || (tr.lockOwnerFor = null);
                this._blockedFuncs.length > 0 && !this._locked();

              ) {
                var e = this._blockedFuncs.shift();
                try {
                  Or(e[1], e[0]);
                } catch (e) {}
              }
            return this;
          },
          _locked: function () {
            return this._reculock && tr.lockOwnerFor !== this;
          },
          create: function (e) {
            var t = this;
            if (!this.mode) return this;
            if (($t(!this.idbtrans), !e && !y))
              switch (v && v.name) {
                case "DatabaseClosedError":
                  throw new kn.DatabaseClosed(v);
                case "MissingAPIError":
                  throw new kn.MissingAPI(v.message, v);
                default:
                  throw new kn.OpenFailed(v);
              }
            if (!this.active) throw new kn.TransactionInactive();
            return (
              $t(null === this._completion._state),
              ((e = this.idbtrans =
                e ||
                y.transaction(oi(this.storeNames), this.mode)).onerror = wr(
                function (n) {
                  ti(n), t._reject(e.error);
                }
              )),
              (e.onabort = wr(function (n) {
                ti(n),
                  t.active && t._reject(new kn.Abort(e.error)),
                  (t.active = !1),
                  t.on("abort").fire(n);
              })),
              (e.oncomplete = wr(function () {
                (t.active = !1), t._resolve();
              })),
              this
            );
          },
          _promise: function (e, t, n) {
            var r = this;
            if (e === C && this.mode !== C)
              return Br(new kn.ReadOnly("Transaction is readonly"));
            if (!this.active) return Br(new kn.TransactionInactive());
            if (this._locked())
              return new or(function (i, o) {
                r._blockedFuncs.push([
                  function () {
                    r._promise(e, t, n).then(i, o);
                  },
                  tr,
                ]);
              });
            if (n)
              return Rr(function () {
                var e = new or(function (e, n) {
                  r._lock();
                  var i = t(e, n, r);
                  i && i.then && i.then(e, n);
                });
                return (
                  e.finally(function () {
                    return r._unlock();
                  }),
                  (e._lib = !0),
                  e
                );
              });
            var i = new or(function (e, n) {
              var i = t(e, n, r);
              i && i.then && i.then(e, n);
            });
            return (i._lib = !0), i;
          },
          _root: function () {
            return this.parent ? this.parent._root() : this;
          },
          waitFor: function (e) {
            var t = this._root();
            if (((e = or.resolve(e)), t._waitingFor))
              t._waitingFor = t._waitingFor.then(function () {
                return e;
              });
            else {
              (t._waitingFor = e), (t._waitingQueue = []);
              var n = t.idbtrans.objectStore(t.storeNames[0]);
              !(function e() {
                for (++t._spinCount; t._waitingQueue.length; )
                  t._waitingQueue.shift()();
                t._waitingFor && (n.get(-1 / 0).onsuccess = e);
              })();
            }
            var r = t._waitingFor;
            return new or(function (n, i) {
              e.then(
                function (e) {
                  return t._waitingQueue.push(wr(n.bind(null, e)));
                },
                function (e) {
                  return t._waitingQueue.push(wr(i.bind(null, e)));
                }
              ).finally(function () {
                t._waitingFor === r && (t._waitingFor = null);
              });
            });
          },
          abort: function () {
            this.active && this._reject(new kn.Abort()), (this.active = !1);
          },
          tables: {
            get:
              ((o = "Transaction.tables"),
              (s = function () {
                return g;
              }),
              function () {
                return (
                  console.warn(
                    o +
                      " is deprecated. See https://github.com/dfahlander/Dexie.js/wiki/Deprecations. " +
                      mn(fn(), 1)
                  ),
                  s.apply(this, arguments)
                );
              }),
          },
          table: function (e) {
            return new I(e, E.table(e).schema, this);
          },
        }),
        Bt(N.prototype, function () {
          function e(e, t, n) {
            var r = e instanceof N ? new B(e) : e;
            return (r._ctx.error = n ? new n(t) : new TypeError(t)), r;
          }
          function t(e) {
            return new B(e, function () {
              return d.only("");
            }).limit(0);
          }
          function n(e, t, n, r, i, o) {
            for (
              var s = Math.min(e.length, r.length), a = -1, l = 0;
              l < s;
              ++l
            ) {
              var c = t[l];
              if (c !== r[l])
                return i(e[l], n[l]) < 0
                  ? e.substr(0, l) + n[l] + n.substr(l + 1)
                  : i(e[l], r[l]) < 0
                  ? e.substr(0, l) + r[l] + n.substr(l + 1)
                  : a >= 0
                  ? e.substr(0, a) + t[a] + n.substr(a + 1)
                  : null;
              i(e[l], c) < 0 && (a = l);
            }
            return s < r.length && "next" === o
              ? e + n.substr(e.length)
              : s < e.length && "prev" === o
              ? e.substr(0, n.length)
              : a < 0
              ? null
              : e.substr(0, a) + r[a] + n.substr(a + 1);
          }
          function r(t, r, i, o) {
            var s,
              a,
              l,
              c,
              u,
              h,
              p,
              f = i.length;
            if (
              !i.every(function (e) {
                return "string" == typeof e;
              })
            )
              return e(t, "String expected.");
            function m(e) {
              (s = (function (e) {
                return "next" === e
                  ? function (e) {
                      return e.toUpperCase();
                    }
                  : function (e) {
                      return e.toLowerCase();
                    };
              })(e)),
                (a = (function (e) {
                  return "next" === e
                    ? function (e) {
                        return e.toLowerCase();
                      }
                    : function (e) {
                        return e.toUpperCase();
                      };
                })(e)),
                (l = "next" === e ? q : K);
              var t = i
                .map(function (e) {
                  return { lower: a(e), upper: s(e) };
                })
                .sort(function (e, t) {
                  return l(e.lower, t.lower);
                });
              (c = t.map(function (e) {
                return e.upper;
              })),
                (u = t.map(function (e) {
                  return e.lower;
                })),
                (h = e),
                (p = "next" === e ? "" : o);
            }
            m("next");
            var g = new B(t, function () {
              return d.bound(c[0], u[f - 1] + o);
            });
            g._ondirectionchange = function (e) {
              m(e);
            };
            var y = 0;
            return (
              g._addAlgorithm(function (e, t, i) {
                var o = e.key;
                if ("string" != typeof o) return !1;
                var s = a(o);
                if (r(s, u, y)) return !0;
                for (var d = null, m = y; m < f; ++m) {
                  var g = n(o, s, c[m], u[m], l, h);
                  null === g && null === d
                    ? (y = m + 1)
                    : (null === d || l(d, g) > 0) && (d = g);
                }
                return (
                  t(
                    null !== d
                      ? function () {
                          e.continue(d + p);
                        }
                      : i
                  ),
                  !1
                );
              }),
              g
            );
          }
          return {
            between: function (n, r, i, o) {
              (i = !1 !== i), (o = !0 === o);
              try {
                return j(n, r) > 0 || (0 === j(n, r) && (i || o) && (!i || !o))
                  ? t(this)
                  : new B(this, function () {
                      return d.bound(n, r, !i, !o);
                    });
              } catch (t) {
                return e(this, jr);
              }
            },
            equals: function (e) {
              return new B(this, function () {
                return d.only(e);
              });
            },
            above: function (e) {
              return new B(this, function () {
                return d.lowerBound(e, !0);
              });
            },
            aboveOrEqual: function (e) {
              return new B(this, function () {
                return d.lowerBound(e);
              });
            },
            below: function (e) {
              return new B(this, function () {
                return d.upperBound(e, !0);
              });
            },
            belowOrEqual: function (e) {
              return new B(this, function () {
                return d.upperBound(e);
              });
            },
            startsWith: function (t) {
              return "string" != typeof t
                ? e(this, "String expected.")
                : this.between(t, t + Ur, !0, !0);
            },
            startsWithIgnoreCase: function (e) {
              return "" === e
                ? this.startsWith(e)
                : r(
                    this,
                    function (e, t) {
                      return 0 === e.indexOf(t[0]);
                    },
                    [e],
                    Ur
                  );
            },
            equalsIgnoreCase: function (e) {
              return r(
                this,
                function (e, t) {
                  return e === t[0];
                },
                [e],
                ""
              );
            },
            anyOfIgnoreCase: function () {
              var e = cn.apply(ln, arguments);
              return 0 === e.length
                ? t(this)
                : r(
                    this,
                    function (e, t) {
                      return -1 !== t.indexOf(e);
                    },
                    e,
                    ""
                  );
            },
            startsWithAnyOfIgnoreCase: function () {
              var e = cn.apply(ln, arguments);
              return 0 === e.length
                ? t(this)
                : r(
                    this,
                    function (e, t) {
                      return t.some(function (t) {
                        return 0 === e.indexOf(t);
                      });
                    },
                    e,
                    Ur
                  );
            },
            anyOf: function () {
              var n = cn.apply(ln, arguments),
                r = G;
              try {
                n.sort(r);
              } catch (t) {
                return e(this, jr);
              }
              if (0 === n.length) return t(this);
              var i = new B(this, function () {
                return d.bound(n[0], n[n.length - 1]);
              });
              i._ondirectionchange = function (e) {
                (r = "next" === e ? G : $), n.sort(r);
              };
              var o = 0;
              return (
                i._addAlgorithm(function (e, t, i) {
                  for (var s = e.key; r(s, n[o]) > 0; )
                    if (++o === n.length) return t(i), !1;
                  return (
                    0 === r(s, n[o]) ||
                    (t(function () {
                      e.continue(n[o]);
                    }),
                    !1)
                  );
                }),
                i
              );
            },
            notEqual: function (e) {
              return this.inAnyRange(
                [
                  [-1 / 0, e],
                  [e, Wr],
                ],
                { includeLowers: !1, includeUppers: !1 }
              );
            },
            noneOf: function () {
              var t = cn.apply(ln, arguments);
              if (0 === t.length) return new B(this);
              try {
                t.sort(G);
              } catch (t) {
                return e(this, jr);
              }
              var n = t.reduce(function (e, t) {
                return e ? e.concat([[e[e.length - 1][1], t]]) : [[-1 / 0, t]];
              }, null);
              return (
                n.push([t[t.length - 1], Wr]),
                this.inAnyRange(n, { includeLowers: !1, includeUppers: !1 })
              );
            },
            inAnyRange: function (n, r) {
              if (0 === n.length) return t(this);
              if (
                !n.every(function (e) {
                  return (
                    void 0 !== e[0] && void 0 !== e[1] && G(e[0], e[1]) <= 0
                  );
                })
              )
                return e(
                  this,
                  "First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",
                  kn.InvalidArgument
                );
              var i = !r || !1 !== r.includeLowers,
                o = r && !0 === r.includeUppers;
              var s,
                a = G;
              function l(e, t) {
                return a(e[0], t[0]);
              }
              try {
                (s = n.reduce(function (e, t) {
                  for (var n = 0, r = e.length; n < r; ++n) {
                    var i = e[n];
                    if (j(t[0], i[1]) < 0 && j(t[1], i[0]) > 0) {
                      (i[0] = ((o = i[0]), (s = t[0]), j(o, s) < 0 ? o : s)),
                        (i[1] = V(i[1], t[1]));
                      break;
                    }
                  }
                  var o, s;
                  return n === r && e.push(t), e;
                }, [])).sort(l);
              } catch (t) {
                return e(this, jr);
              }
              var c = 0,
                u = o
                  ? function (e) {
                      return G(e, s[c][1]) > 0;
                    }
                  : function (e) {
                      return G(e, s[c][1]) >= 0;
                    },
                h = i
                  ? function (e) {
                      return $(e, s[c][0]) > 0;
                    }
                  : function (e) {
                      return $(e, s[c][0]) >= 0;
                    };
              var p = u,
                f = new B(this, function () {
                  return d.bound(s[0][0], s[s.length - 1][1], !i, !o);
                });
              return (
                (f._ondirectionchange = function (e) {
                  "next" === e ? ((p = u), (a = G)) : ((p = h), (a = $)),
                    s.sort(l);
                }),
                f._addAlgorithm(function (e, t, n) {
                  for (var r = e.key; p(r); )
                    if (++c === s.length) return t(n), !1;
                  return (
                    !!(function (e) {
                      return !u(e) && !h(e);
                    })(r) ||
                    (0 === j(r, s[c][1]) ||
                      0 === j(r, s[c][0]) ||
                      t(function () {
                        a === G ? e.continue(s[c][0]) : e.continue(s[c][1]);
                      }),
                    !1)
                  );
                }),
                f
              );
            },
            startsWithAnyOf: function () {
              var n = cn.apply(ln, arguments);
              return n.every(function (e) {
                return "string" == typeof e;
              })
                ? 0 === n.length
                  ? t(this)
                  : this.inAnyRange(
                      n.map(function (e) {
                        return [e, e + Ur];
                      })
                    )
                : e(this, "startsWithAnyOf() only works with strings");
            },
          };
        }),
        Bt(B.prototype, function () {
          function e(e, t) {
            e.filter = Y(e.filter, t);
          }
          function t(e, t, n) {
            var r = e.replayFilter;
            (e.replayFilter = r
              ? function () {
                  return Y(r(), t());
                }
              : t),
              (e.justLimit = n && !r);
          }
          function n(e, t) {
            if (e.isPrimKey) return t;
            var n = e.table.schema.idxByName[e.index];
            if (!n)
              throw new kn.Schema(
                "KeyPath " +
                  e.index +
                  " on object store " +
                  t.name +
                  " is not indexed"
              );
            return t.index(n.name);
          }
          function r(e, t) {
            var r = n(e, t);
            return e.keysOnly && "openKeyCursor" in r
              ? r.openKeyCursor(e.range || null, e.dir + e.unique)
              : r.openCursor(e.range || null, e.dir + e.unique);
          }
          function o(e, t, n, i, o) {
            var s = e.replayFilter ? Y(e.filter, e.replayFilter()) : e.filter;
            e.or
              ? (function () {
                  var a = {},
                    l = 0;
                  function c() {
                    2 == ++l && n();
                  }
                  function u(e, n, r) {
                    if (!s || s(n, r, c, i)) {
                      var o = n.primaryKey,
                        l = "" + o;
                      "[object ArrayBuffer]" === l &&
                        (l = "" + new Uint8Array(o)),
                        Nt(a, l) || ((a[l] = !0), t(e, n, r));
                    }
                  }
                  e.or._iterate(u, c, i, o),
                    W(
                      r(e, o),
                      e.algorithm,
                      u,
                      c,
                      i,
                      !e.keysOnly && e.valueMapper
                    );
                })()
              : W(
                  r(e, o),
                  Y(e.algorithm, s),
                  t,
                  n,
                  i,
                  !e.keysOnly && e.valueMapper
                );
          }
          return {
            _read: function (e, t) {
              var n = this._ctx;
              return n.error
                ? n.table._trans(null, Br.bind(null, n.error))
                : n.table._idbstore("readonly", e).then(t);
            },
            _write: function (e) {
              var t = this._ctx;
              return t.error
                ? t.table._trans(null, Br.bind(null, t.error))
                : t.table._idbstore(C, e, "locked");
            },
            _addAlgorithm: function (e) {
              var t = this._ctx;
              t.algorithm = Y(t.algorithm, e);
            },
            _iterate: function (e, t, n, r) {
              return o(this._ctx, e, t, n, r);
            },
            clone: function (e) {
              var t = Object.create(this.constructor.prototype),
                n = Object.create(this._ctx);
              return e && Ot(n, e), (t._ctx = n), t;
            },
            raw: function () {
              return (this._ctx.valueMapper = null), this;
            },
            each: function (e) {
              var t = this._ctx;
              return this._read(function (n, r, i) {
                o(t, e, n, r, i);
              });
            },
            count: function (e) {
              var t = this._ctx;
              if (H(t, !0))
                return this._read(function (e, r, i) {
                  var o = n(t, i),
                    s = t.range ? o.count(t.range) : o.count();
                  (s.onerror = Xr(r)),
                    (s.onsuccess = function (n) {
                      e(Math.min(n.target.result, t.limit));
                    });
                }, e);
              var r = 0;
              return this._read(function (e, n, i) {
                o(
                  t,
                  function () {
                    return ++r, !1;
                  },
                  function () {
                    e(r);
                  },
                  n,
                  i
                );
              }, e);
            },
            sortBy: function (e, t) {
              var n = e.split(".").reverse(),
                r = n[0],
                i = n.length - 1;
              function o(e, t) {
                return t ? o(e[n[t]], t - 1) : e[r];
              }
              var s = "next" === this._ctx.dir ? 1 : -1;
              function a(e, t) {
                var n = o(e, i),
                  r = o(t, i);
                return n < r ? -s : n > r ? s : 0;
              }
              return this.toArray(function (e) {
                return e.sort(a);
              }).then(t);
            },
            toArray: function (e) {
              var t = this._ctx;
              return this._read(function (e, r, s) {
                if (i && "next" === t.dir && H(t, !0) && t.limit > 0) {
                  var a = t.table.hook.reading.fire,
                    l = n(t, s),
                    c =
                      t.limit < 1 / 0
                        ? l.getAll(t.range, t.limit)
                        : l.getAll(t.range);
                  (c.onerror = Xr(r)),
                    (c.onsuccess = Jr(
                      a === Dn
                        ? e
                        : function (t) {
                            try {
                              e(t.map(a));
                            } catch (e) {
                              r(e);
                            }
                          }
                    ));
                } else {
                  var u = [];
                  o(
                    t,
                    function (e) {
                      u.push(e);
                    },
                    function () {
                      e(u);
                    },
                    r,
                    s
                  );
                }
              }, e);
            },
            offset: function (e) {
              var n = this._ctx;
              return (
                e <= 0 ||
                  ((n.offset += e),
                  H(n)
                    ? t(n, function () {
                        var t = e;
                        return function (e, n) {
                          return (
                            0 === t ||
                            (1 === t
                              ? (--t, !1)
                              : (n(function () {
                                  e.advance(t), (t = 0);
                                }),
                                !1))
                          );
                        };
                      })
                    : t(n, function () {
                        var t = e;
                        return function () {
                          return --t < 0;
                        };
                      })),
                this
              );
            },
            limit: function (e) {
              return (
                (this._ctx.limit = Math.min(this._ctx.limit, e)),
                t(
                  this._ctx,
                  function () {
                    var t = e;
                    return function (e, n, r) {
                      return --t <= 0 && n(r), t >= 0;
                    };
                  },
                  !0
                ),
                this
              );
            },
            until: function (t, n) {
              return (
                e(this._ctx, function (e, r, i) {
                  return !t(e.value) || (r(i), n);
                }),
                this
              );
            },
            first: function (e) {
              return this.limit(1)
                .toArray(function (e) {
                  return e[0];
                })
                .then(e);
            },
            last: function (e) {
              return this.reverse().first(e);
            },
            filter: function (t) {
              return (
                e(this._ctx, function (e) {
                  return t(e.value);
                }),
                (function (e, t) {
                  e.isMatch = Y(e.isMatch, t);
                })(this._ctx, t),
                this
              );
            },
            and: function (e) {
              return this.filter(e);
            },
            or: function (e) {
              return new N(this._ctx.table, e, this);
            },
            reverse: function () {
              return (
                (this._ctx.dir = "prev" === this._ctx.dir ? "next" : "prev"),
                this._ondirectionchange &&
                  this._ondirectionchange(this._ctx.dir),
                this
              );
            },
            desc: function () {
              return this.reverse();
            },
            eachKey: function (e) {
              var t = this._ctx;
              return (
                (t.keysOnly = !t.isMatch),
                this.each(function (t, n) {
                  e(n.key, n);
                })
              );
            },
            eachUniqueKey: function (e) {
              return (this._ctx.unique = "unique"), this.eachKey(e);
            },
            eachPrimaryKey: function (e) {
              var t = this._ctx;
              return (
                (t.keysOnly = !t.isMatch),
                this.each(function (t, n) {
                  e(n.primaryKey, n);
                })
              );
            },
            keys: function (e) {
              var t = this._ctx;
              t.keysOnly = !t.isMatch;
              var n = [];
              return this.each(function (e, t) {
                n.push(t.key);
              })
                .then(function () {
                  return n;
                })
                .then(e);
            },
            primaryKeys: function (e) {
              var t = this._ctx;
              if (i && "next" === t.dir && H(t, !0) && t.limit > 0)
                return this._read(function (e, r, i) {
                  var o = n(t, i),
                    s =
                      t.limit < 1 / 0
                        ? o.getAllKeys(t.range, t.limit)
                        : o.getAllKeys(t.range);
                  (s.onerror = Xr(r)), (s.onsuccess = Jr(e));
                }).then(e);
              t.keysOnly = !t.isMatch;
              var r = [];
              return this.each(function (e, t) {
                r.push(t.primaryKey);
              })
                .then(function () {
                  return r;
                })
                .then(e);
            },
            uniqueKeys: function (e) {
              return (this._ctx.unique = "unique"), this.keys(e);
            },
            firstKey: function (e) {
              return this.limit(1)
                .keys(function (e) {
                  return e[0];
                })
                .then(e);
            },
            lastKey: function (e) {
              return this.reverse().firstKey(e);
            },
            distinct: function () {
              var t = this._ctx,
                n = t.index && t.table.schema.idxByName[t.index];
              if (!n || !n.multi) return this;
              var r = {};
              return (
                e(this._ctx, function (e) {
                  var t = e.primaryKey.toString(),
                    n = Nt(r, t);
                  return (r[t] = !0), !n;
                }),
                this
              );
            },
            modify: function (e) {
              var t = this,
                n = this._ctx.table.hook,
                r = n.updating.fire,
                i = n.deleting.fire;
              return this._write(function (n, o, s, a) {
                var l;
                if ("function" == typeof e)
                  l =
                    r === Tn && i === Tn
                      ? e
                      : function (t) {
                          var n = rn(t);
                          if (!1 === e.call(this, t, this)) return !1;
                          if (Nt(this, "value")) {
                            var o = on(n, this.value),
                              s = r.call(this, o, this.primKey, n, a);
                            s &&
                              ((t = this.value),
                              Mt(s).forEach(function (e) {
                                Xt(t, e, s[e]);
                              }));
                          } else i.call(this, this.primKey, t, a);
                        };
                else if (r === Tn) {
                  var c = Mt(e),
                    u = c.length;
                  l = function (t) {
                    for (var n = !1, r = 0; r < u; ++r) {
                      var i = c[r],
                        o = e[i];
                      Zt(t, i) !== o && (Xt(t, i, o), (n = !0));
                    }
                    return n;
                  };
                } else {
                  var h = e;
                  (e = Jt(h)),
                    (l = function (t) {
                      var n = !1,
                        i = r.call(this, e, this.primKey, rn(t), a);
                      return (
                        i && Ot(e, i),
                        Mt(e).forEach(function (r) {
                          var i = e[r];
                          Zt(t, r) !== i && (Xt(t, r, i), (n = !0));
                        }),
                        i && (e = Jt(h)),
                        n
                      );
                    });
                }
                var d = 0,
                  p = 0,
                  f = !1,
                  m = [],
                  g = [],
                  y = null;
                function v(e) {
                  return (
                    e && (m.push(e), g.push(y)),
                    o(new bn("Error modifying one or more objects", m, p, g))
                  );
                }
                function w() {
                  f && p + m.length === d && (m.length > 0 ? v() : n(p));
                }
                t.clone()
                  .raw()
                  ._iterate(
                    function (e, t) {
                      y = t.primaryKey;
                      var n = {
                        primKey: t.primaryKey,
                        value: e,
                        onsuccess: null,
                        onerror: null,
                      };
                      function r(e) {
                        return m.push(e), g.push(n.primKey), w(), !0;
                      }
                      if (!1 !== l.call(n, e, n)) {
                        var i = !Nt(n, "value");
                        ++d,
                          Qt(function () {
                            var e = i ? t.delete() : t.update(n.value);
                            (e._hookCtx = n),
                              (e.onerror = ei(r)),
                              (e.onsuccess = Zr(function () {
                                ++p, w();
                              }));
                          }, r);
                      } else n.onsuccess && n.onsuccess(n.value);
                    },
                    function () {
                      (f = !0), w();
                    },
                    v,
                    s
                  );
              });
            },
            delete: function () {
              var e = this,
                t = this._ctx,
                n = t.range,
                r = t.table.hook.deleting.fire,
                i = r !== Tn;
              if (!i && H(t) && ((t.isPrimKey && !qr) || !n))
                return this._write(function (e, t, r) {
                  var i = Xr(t),
                    o = n ? r.count(n) : r.count();
                  (o.onerror = i),
                    (o.onsuccess = function () {
                      var s = o.result;
                      Qt(
                        function () {
                          var t = n ? r.delete(n) : r.clear();
                          (t.onerror = i),
                            (t.onsuccess = function () {
                              return e(s);
                            });
                        },
                        function (e) {
                          return t(e);
                        }
                      );
                    });
                });
              var o = i ? 2e3 : 1e4;
              return this._write(function (n, s, a, l) {
                var c = 0,
                  u = e
                    .clone({ keysOnly: !t.isMatch && !i })
                    .distinct()
                    .limit(o)
                    .raw(),
                  h = [],
                  d = function () {
                    return u
                      .each(
                        i
                          ? function (e, t) {
                              h.push([t.primaryKey, t.value]);
                            }
                          : function (e, t) {
                              h.push(t.primaryKey);
                            }
                      )
                      .then(function () {
                        return (
                          i
                            ? h.sort(function (e, t) {
                                return G(e[0], t[0]);
                              })
                            : h.sort(G),
                          L(a, l, h, i, r)
                        );
                      })
                      .then(function () {
                        var e = h.length;
                        return (c += e), (h = []), e < o ? c : d();
                      });
                  };
                n(d());
              });
            },
          };
        }),
        Ot(this, {
          Collection: B,
          Table: I,
          Transaction: F,
          Version: D,
          WhereClause: N,
        }),
        E.on("versionchange", function (e) {
          e.newVersion > 0
            ? console.warn(
                "Another connection wants to upgrade database '" +
                  E.name +
                  "'. Closing db now to resume the upgrade."
              )
            : console.warn(
                "Another connection wants to delete database '" +
                  E.name +
                  "'. Closing db now to resume the delete request."
              ),
            E.close();
        }),
        E.on("blocked", function (e) {
          !e.newVersion || e.newVersion < e.oldVersion
            ? console.warn("Dexie.delete('" + E.name + "') was blocked")
            : console.warn(
                "Upgrade '" +
                  E.name +
                  "' blocked by other connection holding version " +
                  e.oldVersion / 10
              );
        }),
        c.forEach(function (e) {
          e(E);
        });
    }
    function Qr(e, t) {
      return (
        Mt(t).forEach(function (n) {
          var r = (function e(t) {
            if ("function" == typeof t) return new t();
            if (Pt(t)) return [e(t[0])];
            if (t && "object" == typeof t) {
              var n = {};
              return Qr(n, t), n;
            }
            return t;
          })(t[n]);
          e[n] = r;
        }),
        e
      );
    }
    function Zr(e) {
      return wr(function (t) {
        var n = t.target,
          r = n._hookCtx,
          i = r.value || n.result,
          o = r && r.onsuccess;
        o && o(i), e && e(i);
      }, e);
    }
    function Xr(e) {
      return wr(function (t) {
        return ti(t), e(t.target.error), !1;
      });
    }
    function Jr(e) {
      return wr(function (t) {
        e(t.target.result);
      });
    }
    function ei(e) {
      return wr(function (t) {
        var n = t.target,
          r = n.error,
          i = n._hookCtx,
          o = i && i.onerror;
        return o && o(r), ti(t), e(r), !1;
      });
    }
    function ti(e) {
      e.stopPropagation && e.stopPropagation(),
        e.preventDefault && e.preventDefault();
    }
    function ni(e) {
      var t = function (t) {
          return e.next(t);
        },
        n = i(t),
        r = i(function (t) {
          return e.throw(t);
        });
      function i(e) {
        return function (t) {
          var i = e(t),
            o = i.value;
          return i.done
            ? o
            : o && "function" == typeof o.then
            ? o.then(n, r)
            : Pt(o)
            ? or.all(o).then(n, r)
            : n(o);
        };
      }
      return i(t)();
    }
    function ri(e, t, n, r, i, o, s) {
      (this.name = e),
        (this.keyPath = t),
        (this.unique = n),
        (this.multi = r),
        (this.auto = i),
        (this.compound = o),
        (this.dotted = s);
      var a = "string" == typeof t ? t : t && "[" + [].join.call(t, "+") + "]";
      this.src = (n ? "&" : "") + (r ? "*" : "") + (i ? "++" : "") + a;
    }
    function ii(e, t, n, r) {
      (this.name = e),
        (this.primKey = t || new ri()),
        (this.indexes = n || [new ri()]),
        (this.instanceTemplate = r),
        (this.mappedClass = null),
        (this.idxByName = Kt(n, function (e) {
          return [e.name, e];
        }));
    }
    function oi(e) {
      return 1 === e.length ? e[0] : e;
    }
    function si(e) {
      var t = e && (e.getDatabaseNames || e.webkitGetDatabaseNames);
      return t && t.bind(e);
    }
    hn(un, Kr),
      Bt(Yr, Rn),
      Bt(Yr, {
        delete: function (e) {
          var t = new Yr(e),
            n = t.delete();
          return (
            (n.onblocked = function (e) {
              return t.on("blocked", e), this;
            }),
            n
          );
        },
        exists: function (e) {
          return new Yr(e)
            .open()
            .then(function (e) {
              return e.close(), !0;
            })
            .catch(Yr.NoSuchDatabaseError, function () {
              return !1;
            });
        },
        getDatabaseNames: function (e) {
          var t = si(Yr.dependencies.indexedDB);
          return t
            ? new or(function (e, n) {
                var r = t();
                (r.onsuccess = function (t) {
                  e(Vt(t.target.result, 0));
                }),
                  (r.onerror = Xr(n));
              }).then(e)
            : zr.dbnames.toCollection().primaryKeys(e);
        },
        defineClass: function () {
          return function (e) {
            e && Ot(this, e);
          };
        },
        applyStructure: Qr,
        ignoreTransaction: function (e) {
          return tr.trans ? Or(tr.transless, e) : e();
        },
        vip: function (e) {
          return Rr(function () {
            return (tr.letThrough = !0), e();
          });
        },
        async: function (e) {
          return function () {
            try {
              var t = ni(e.apply(this, arguments));
              return t && "function" == typeof t.then ? t : or.resolve(t);
            } catch (e) {
              return Br(e);
            }
          };
        },
        spawn: function (e, t, n) {
          try {
            var r = ni(e.apply(n, t || []));
            return r && "function" == typeof r.then ? r : or.resolve(r);
          } catch (e) {
            return Br(e);
          }
        },
        currentTransaction: {
          get: function () {
            return tr.trans || null;
          },
        },
        waitFor: function (e, t) {
          var n = or
            .resolve("function" == typeof e ? Yr.ignoreTransaction(e) : e)
            .timeout(t || 6e4);
          return tr.trans ? tr.trans.waitFor(n) : n;
        },
        Promise: or,
        debug: {
          get: function () {
            return un;
          },
          set: function (e) {
            hn(
              e,
              "dexie" === e
                ? function () {
                    return !0;
                  }
                : Kr
            );
          },
        },
        derive: Ut,
        extend: Ot,
        props: Bt,
        override: Gt,
        Events: Hr,
        getByKeyPath: Zt,
        setByKeyPath: Xt,
        delByKeyPath: function (e, t) {
          "string" == typeof t
            ? Xt(e, t, void 0)
            : "length" in t &&
              [].map.call(t, function (t) {
                Xt(e, t, void 0);
              });
        },
        shallowClone: Jt,
        deepClone: rn,
        getObjectDiff: on,
        asap: qt,
        maxKey: Wr,
        minKey: -1 / 0,
        addons: [],
        connections: Vr,
        MultiModifyError: kn.Modify,
        errnames: Cn,
        IndexSpec: ri,
        TableSchema: ii,
        dependencies: (function () {
          try {
            return {
              indexedDB:
                It.indexedDB ||
                It.mozIndexedDB ||
                It.webkitIndexedDB ||
                It.msIndexedDB,
              IDBKeyRange: It.IDBKeyRange || It.webkitIDBKeyRange,
            };
          } catch (e) {
            return { indexedDB: null, IDBKeyRange: null };
          }
        })(),
        semVer: "{version}",
        version: "{version}"
          .split(".")
          .map(function (e) {
            return parseInt(e);
          })
          .reduce(function (e, t, n) {
            return e + t / Math.pow(10, 2 * n);
          }),
        default: Yr,
        Dexie: Yr,
      }),
      (or.rejectionMapper = function (e, t) {
        if (
          !e ||
          e instanceof wn ||
          e instanceof TypeError ||
          e instanceof SyntaxError ||
          !e.name ||
          !xn[e.name]
        )
          return e;
        var n = new xn[e.name](t || e.message, e);
        return (
          "stack" in e &&
            zt(n, "stack", {
              get: function () {
                return this.inner.stack;
              },
            }),
          n
        );
      }),
      (zr = new Yr("__dbnames")).version(1).stores({ dbnames: "name" }),
      (function () {
        try {
          void 0 !== typeof localStorage &&
            void 0 !== It.document &&
            (JSON.parse(
              localStorage.getItem("Dexie.DatabaseNames") || "[]"
            ).forEach(function (e) {
              return zr.dbnames.put({ name: e }).catch(Tn);
            }),
            localStorage.removeItem("Dexie.DatabaseNames"));
        } catch (e) {}
      })();
    var ai = Yr;
    function li() {
      return we("has-shown-welcome-flow", !1);
    }
    var ci = n(126),
      ui = function (e, t) {
        return e === t;
      };
    var hi = function (e, t) {
      var n;
      void 0 === t && (t = ui);
      var r,
        i = [],
        o = !1,
        s = function (e, n) {
          return t(e, i[n]);
        };
      return function () {
        for (var t = arguments.length, a = new Array(t), l = 0; l < t; l++)
          a[l] = arguments[l];
        return (
          (o && n === this && a.length === i.length && a.every(s)) ||
            ((r = e.apply(this, a)), (o = !0), (n = this), (i = a)),
          r
        );
      };
    };
    function di() {
      return Me.release();
    }
    function pi() {
      return "Windows " + di();
    }
    hi(() => !1), hi(() => !1);
    const fi = hi(() =>
      (function (e) {
        const t = di();
        return void 0 !== t && Object(ci.compare)(t, e, ">=");
      })("10.0.17666")
    );
    let mi = null;
    function gi() {
      if (!mi) {
        let e = localStorage.getItem("stats-guid");
        e || ((e = Je()), localStorage.setItem("stats-guid", e)), (mi = e);
      }
      return mi;
    }
    function yi(e, t) {
      const n = Object.assign({}, e);
      for (const e in t) n[e] = t[e];
      return n;
    }
    var vi;
    function wi(e) {
      switch (e) {
        case vi.Light:
          return "light";
        case vi.Dark:
          return "dark";
        default:
          return X(0, "Unknown theme " + e);
      }
    }
    !(function (e) {
      (e[(e.Light = 0)] = "Light"), (e[(e.Dark = 1)] = "Dark");
    })(vi || (vi = {}));
    function bi() {
      return "dark" === localStorage.getItem("theme") ? vi.Dark : vi.Light;
    }
    function Si(e) {
      localStorage.setItem("theme", wi(e));
    }
    function Ci(e) {
      return Ei(e.endpoint);
    }
    function Ei(e) {
      return "GitHub - " + e;
    }
    class ki {
      constructor() {
        this.emitter = new ie.Emitter();
      }
      emitUpdate() {
        this.emitter.emit("did-update", {});
      }
      emitError(e) {
        this.emitter.emit("did-error", e);
      }
      onDidUpdate(e) {
        return this.emitter.on("did-update", e);
      }
      onDidError(e) {
        return this.emitter.on("did-error", e);
      }
    }
    class xi {
      constructor() {
        this.emitter = new ie.Emitter();
      }
      emitUpdate(e) {
        this.emitter.emit("did-update", e);
      }
      emitError(e) {
        this.emitter.emit("did-error", e);
      }
      onDidUpdate(e) {
        return this.emitter.on("did-update", e);
      }
      onDidError(e) {
        return this.emitter.on("did-error", e);
      }
    }
    var Ri,
      Ti,
      Di,
      Ai,
      _i = n(4),
      Mi = n(127);
    function Pi(e, t = new Map()) {
      for (const n of e.items)
        t.set(n.id, n), "submenuItem" === n.type && Pi(n.menu, t);
      return t;
    }
    function Ii(e) {
      return (
        "menuItem" === e.type ||
        "submenuItem" === e.type ||
        "checkbox" === e.type ||
        "radio" === e.type
      );
    }
    function Oi(e) {
      return "separator" !== e.type && e.enabled && e.visible;
    }
    function Li(e, t) {
      const n = e.toLowerCase();
      for (const e of t)
        if (Ii(e) && e.accessKey && e.accessKey.toLowerCase() === n) return e;
      return null;
    }
    class Fi {
      constructor(e, t, n) {
        (this.menu = e), (this.openMenus = t), (this.menuItemById = n);
      }
      static fromMenu(e) {
        const t = Pi(e);
        return new Fi(e, [e], t);
      }
      getItemById(e) {
        return this.menuItemById.get(e);
      }
      withMenu(e) {
        const t = Pi(e),
          n = new Array();
        for (const r of this.openMenus) {
          let i;
          if (r.id) {
            const e = t.get(r.id);
            if (!e || "submenuItem" !== e.type) break;
            i = e.menu;
          } else i = e;
          let o = void 0;
          r.selectedItem && (o = t.get(r.selectedItem.id)),
            n.push({ id: i.id, type: "menu", items: i.items, selectedItem: o });
        }
        return new Fi(e, n, t);
      }
      withOpenedMenu(e, t = !1) {
        const n = this.menuItemById.get(e.id);
        if (!n) return this;
        if ("submenuItem" !== n.type)
          throw new Error(
            "Attempt to open a submenu from an item of wrong type: " + n.type
          );
        const r = this.openMenus.findIndex((e) => -1 !== e.items.indexOf(n));
        if (-1 === r) return this;
        const i = this.openMenus.slice(0, r + 1);
        if (t) {
          const e = n.menu.items.find(Oi);
          i.push(Object.assign(Object.assign({}, n.menu), { selectedItem: e }));
        } else i.push(n.menu);
        return new Fi(this.menu, i, this.menuItemById);
      }
      withClosedMenu(e) {
        if (!e.id) return this;
        const t = this.openMenus.findIndex((t) => t.id === e.id);
        if (-1 === t) return this;
        const n = this.openMenus.slice(0, t);
        return new Fi(this.menu, n, this.menuItemById);
      }
      withLastMenu(e) {
        const t = this.openMenus.findIndex((t) => t.id === e.id);
        if (-1 === t) return this;
        const n = this.openMenus.slice(0, t + 1);
        return new Fi(this.menu, n, this.menuItemById);
      }
      withSelectedItem(e) {
        const t = this.menuItemById.get(e.id);
        if (!t) return this;
        const n = this.openMenus.findIndex((e) => -1 !== e.items.indexOf(t));
        if (-1 === n) return this;
        const r = this.openMenus.slice(),
          i = r[n];
        r[n] = Object.assign(Object.assign({}, i), { selectedItem: t });
        for (let e = n + 1; e < r.length; e++)
          r[e] = Object.assign(Object.assign({}, r[e]), {
            selectedItem: void 0,
          });
        for (let e = n - 1; e >= 0; e--) {
          const t = r[e],
            n = r[e + 1],
            i = t.items.find((e) => "submenuItem" === e.type && e.id === n.id);
          r[e] = Object.assign(Object.assign({}, t), { selectedItem: i });
        }
        return new Fi(this.menu, r, this.menuItemById);
      }
      withDeselectedMenu(e) {
        const t = this.openMenus.findIndex((t) => t.id === e.id);
        if (-1 === t) return this;
        const n = this.openMenus[t],
          r = this.openMenus.slice();
        r[t] = Object.assign(Object.assign({}, n), { selectedItem: void 0 });
        for (let e = t - 1; e >= 0; e--) {
          const t = r[e],
            n = r[e + 1],
            i = t.items.find((e) => "submenuItem" === e.type && e.id === n.id);
          r[e] = Object.assign(Object.assign({}, t), { selectedItem: i });
        }
        return new Fi(this.menu, r, this.menuItemById);
      }
      withReset() {
        return new Fi(this.menu, [this.menu], this.menuItemById);
      }
    }
    function Ni(e) {
      const t = e.match(/.*?\/(.*)/);
      return !t || t.length < 2 ? null : t[1];
    }
    function Bi(e, t) {
      return e.type === Ri.Local && e.name !== t && null != e.upstream;
    }
    !(function (e) {
      (e[(e.Local = 0)] = "Local"), (e[(e.Remote = 1)] = "Remote");
    })(Ri || (Ri = {})),
      (function (e) {
        (e.CurrentBranch = "CurrentBranch"),
          (e.DefaultBranch = "DefaultBranch"),
          (e.Head = "Head"),
          (e.UpstreamDefaultBranch = "UpstreamDefaultBranch");
      })(Ti || (Ti = {}));
    class Hi {
      constructor(e, t, n, r) {
        (this.name = e), (this.upstream = t), (this.tip = n), (this.type = r);
      }
      get remote() {
        const e = this.upstream;
        if (!e) return null;
        const t = e.match(/(.*?)\/.*/);
        return !t || t.length < 2 ? null : t[1];
      }
      get upstreamWithoutRemote() {
        return this.upstream ? Ni(this.upstream) : null;
      }
      get nameWithoutRemote() {
        if (this.type === Ri.Local) return this.name;
        return Ni(this.name) || this.name;
      }
    }
    !(function (e) {
      (e[(e.Branches = 0)] = "Branches"),
        (e[(e.PullRequests = 1)] = "PullRequests");
    })(Di || (Di = {})),
      (function (e) {
        (e[(e.DotCom = 0)] = "DotCom"),
          (e[(e.Enterprise = 1)] = "Enterprise"),
          (e[(e.Generic = 2)] = "Generic");
      })(Ai || (Ai = {}));
    let zi = 1;
    class Ui {
      constructor(e, t) {
        (this.path = e), (this.url = t), (this.id = zi++);
      }
      get name() {
        return i.basename(this.url, ".git");
      }
      get hash() {
        return `${this.id}+${this.path}+${this.url}`;
      }
    }
    var Wi, ji, Vi, Gi, $i;
    function qi(e) {
      switch (e.trim()) {
        case "CR":
          return "CR";
        case "LF":
          return "LF";
        case "CRLF":
          return "CRLF";
        default:
          return null;
      }
    }
    !(function (e) {
      (e[(e.Text = 0)] = "Text"),
        (e[(e.Image = 1)] = "Image"),
        (e[(e.Binary = 2)] = "Binary"),
        (e[(e.Submodule = 3)] = "Submodule"),
        (e[(e.LargeText = 4)] = "LargeText"),
        (e[(e.Unrenderable = 5)] = "Unrenderable");
    })(Wi || (Wi = {})),
      (function (e) {
        (e[(e.Context = 0)] = "Context"),
          (e[(e.Add = 1)] = "Add"),
          (e[(e.Delete = 2)] = "Delete"),
          (e[(e.Hunk = 3)] = "Hunk");
      })(ji || (ji = {}));
    class Ki {
      constructor(e, t, n, r, i = !1) {
        (this.text = e),
          (this.type = t),
          (this.oldLineNumber = n),
          (this.newLineNumber = r),
          (this.noTrailingNewLine = i);
      }
      withNoTrailingNewLine(e) {
        return new Ki(
          this.text,
          this.type,
          this.oldLineNumber,
          this.newLineNumber,
          e
        );
      }
      isIncludeableLine() {
        return this.type === ji.Add || this.type === ji.Delete;
      }
      get content() {
        return this.text.substr(1);
      }
    }
    function Yi(e, t) {
      switch (e) {
        case Vi.All:
          return t;
        case Vi.None:
          return !t;
        case Vi.Partial:
          return !1;
        default:
          return X(0, "Unknown selection type " + e);
      }
    }
    !(function (e) {
      (e.All = "All"), (e.Partial = "Partial"), (e.None = "None");
    })(Vi || (Vi = {}));
    class Qi {
      constructor(e, t = null, n = null) {
        (this.defaultSelectionType = e),
          (this.divergingLines = t),
          (this.selectableLines = n);
      }
      static fromInitialSelection(e) {
        return e !== Vi.All && e !== Vi.None
          ? X(
              0,
              "Can only instantiate a DiffSelection with All or None as the initial selection"
            )
          : new Qi(e, null, null);
      }
      getSelectionType() {
        const e = this.divergingLines,
          t = this.selectableLines;
        if (!e) return this.defaultSelectionType;
        if (0 === e.size) return this.defaultSelectionType;
        if (t && t.size === e.size) {
          if ([...t].every((t) => e.has(t)))
            return this.defaultSelectionType === Vi.All ? Vi.None : Vi.All;
        }
        return Vi.Partial;
      }
      isSelected(e) {
        const t = !!this.divergingLines && this.divergingLines.has(e);
        return this.defaultSelectionType === Vi.All
          ? !t
          : this.defaultSelectionType === Vi.None
          ? t
          : X(
              this.defaultSelectionType,
              "Unknown base selection type " + this.defaultSelectionType
            );
      }
      isSelectable(e) {
        return !this.selectableLines || this.selectableLines.has(e);
      }
      withLineSelection(e, t) {
        return this.withRangeSelection(e, 1, t);
      }
      withRangeSelection(e, t, n) {
        const r = this.getSelectionType(),
          i = e + t;
        if (Yi(r, n)) return this;
        if (r === Vi.Partial) {
          const t = new Set(this.divergingLines);
          if (Yi(this.defaultSelectionType, n))
            for (let n = e; n < i; n++) t.delete(n);
          else for (let n = e; n < i; n++) this.isSelectable(n) && t.add(n);
          return new Qi(
            this.defaultSelectionType,
            0 === t.size ? null : t,
            this.selectableLines
          );
        }
        {
          const t = new Set();
          for (let n = e; n < i; n++) this.isSelectable(n) && t.add(n);
          return new Qi(r, t, this.selectableLines);
        }
      }
      withToggleLineSelection(e) {
        return this.withLineSelection(e, !this.isSelected(e));
      }
      withSelectAll() {
        return new Qi(Vi.All, null, this.selectableLines);
      }
      withSelectNone() {
        return new Qi(Vi.None, null, this.selectableLines);
      }
      withSelectableLines(e) {
        const t = this.divergingLines
          ? new Set([...this.divergingLines].filter((t) => e.has(t)))
          : null;
        return new Qi(this.defaultSelectionType, t, e);
      }
    }
    class Zi {
      constructor(e, t, n) {
        (this.contents = e), (this.mediaType = t), (this.bytes = n);
      }
    }
    class Xi {
      constructor(e, t, n, r) {
        (this.header = e),
          (this.lines = t),
          (this.unifiedDiffStart = n),
          (this.unifiedDiffEnd = r);
      }
    }
    class Ji {
      constructor(e, t, n, r) {
        (this.oldStartLine = e),
          (this.oldLineCount = t),
          (this.newStartLine = n),
          (this.newLineCount = r);
      }
    }
    !(function (e) {
      (e[(e.TwoUp = 0)] = "TwoUp"),
        (e[(e.Swipe = 1)] = "Swipe"),
        (e[(e.OnionSkin = 2)] = "OnionSkin"),
        (e[(e.Difference = 3)] = "Difference");
    })(Gi || (Gi = {})),
      (function (e) {
        (e[(e.BackgroundTask = 0)] = "BackgroundTask"),
          (e[(e.UserInitiatedTask = 1)] = "UserInitiatedTask");
      })($i || ($i = {}));
    class eo {
      constructor(
        e,
        t,
        n,
        r = null,
        i = null,
        o = null,
        s = null,
        a = null,
        l = null,
        c = null,
        u = null
      ) {
        var h;
        (this.name = e),
          (this.owner = t),
          (this.dbID = n),
          (this.isPrivate = r),
          (this.htmlURL = i),
          (this.defaultBranch = o),
          (this.cloneURL = s),
          (this.issuesEnabled = a),
          (this.isArchived = l),
          (this.permissions = c),
          (this.parent = u),
          (this.hash = [
            this.name,
            this.owner,
            this.dbID,
            this.isPrivate,
            this.htmlURL,
            this.defaultBranch,
            this.cloneURL,
            this.issuesEnabled,
            this.isArchived,
            this.permissions,
            null === (h = this.parent) || void 0 === h ? void 0 : h.hash,
          ].join("+"));
      }
      get endpoint() {
        return this.owner.endpoint;
      }
      get fullName() {
        return `${this.owner.login}/${this.name}`;
      }
      get fork() {
        return !!this.parent;
      }
    }
    function to(e) {
      return null === e.permissions || "read" !== e.permissions;
    }
    var no, ro, io, oo, so, ao;
    !(function (e) {
      (e.Parent = "parent"), (e.Self = "self");
    })(no || (no = {}));
    class lo {
      constructor(e, t, n, r, o = {}, s = !1) {
        (this.id = t),
          (this.gitHubRepository = n),
          (this.missing = r),
          (this.workflowPreferences = o),
          (this.isTutorialRepository = s),
          (this.mainWorkTree = { path: e }),
          (this.name =
            (n && n.name) ||
            (function (e) {
              const t = i.basename(e);
              return 0 === t.length ? e : t;
            })(e)),
          (this.hash = [
            e,
            this.id,
            null == n ? void 0 : n.hash,
            this.missing,
            this.workflowPreferences,
            this.isTutorialRepository,
          ].join("+"));
      }
      get path() {
        return this.mainWorkTree.path;
      }
    }
    function co(e) {
      return e.gitHubRepository instanceof eo;
    }
    function uo(e) {
      return co(e) && null !== e.gitHubRepository.parent;
    }
    function ho(e) {
      const { gitHubRepository: t } = e;
      return null !== t ? t.fullName : e.name;
    }
    function po(e) {
      return co(e) ? fo(e).htmlURL : null;
    }
    function fo(e) {
      if (!uo(e)) return e.gitHubRepository;
      const t = mo(e);
      switch (t) {
        case no.Self:
          return e.gitHubRepository;
        case no.Parent:
          return e.gitHubRepository.parent;
        default:
          return X(0, "Invalid fork contribution target");
      }
    }
    function mo(e) {
      return void 0 !== e.workflowPreferences.forkContributionTarget
        ? e.workflowPreferences.forkContributionTarget
        : no.Parent;
    }
    function go(e) {
      return e.kind === io.Conflicted;
    }
    function yo(e) {
      return e.hasOwnProperty("conflictMarkerCount");
    }
    function vo(e) {
      return !e.hasOwnProperty("conflictMarkerCount");
    }
    !(function (e) {
      (e.Modified = "M"),
        (e.Added = "A"),
        (e.Deleted = "D"),
        (e.Renamed = "R"),
        (e.Copied = "C"),
        (e.Unchanged = "."),
        (e.Untracked = "?"),
        (e.Ignored = "!"),
        (e.UpdatedButUnmerged = "U");
    })(ro || (ro = {})),
      (function (e) {
        (e.New = "New"),
          (e.Modified = "Modified"),
          (e.Deleted = "Deleted"),
          (e.Copied = "Copied"),
          (e.Renamed = "Renamed"),
          (e.Conflicted = "Conflicted"),
          (e.Untracked = "Untracked");
      })(io || (io = {})),
      (function (e) {
        (e.AddedByUs = "added-by-us"),
          (e.DeletedByUs = "deleted-by-us"),
          (e.AddedByThem = "added-by-them"),
          (e.DeletedByThem = "deleted-by-them"),
          (e.BothDeleted = "both-deleted"),
          (e.BothAdded = "both-added"),
          (e.BothModified = "both-modified");
      })(oo || (oo = {}));
    class wo {
      constructor(e, t) {
        (this.path = e),
          (this.status = t),
          t.kind === io.Renamed || t.kind === io.Copied
            ? (this.id = `${t.kind}+${e}+${t.oldPath}`)
            : (this.id = `${t.kind}+${e}`);
      }
    }
    class bo extends wo {
      constructor(e, t, n) {
        super(e, t), (this.selection = n);
      }
      withIncludeAll(e) {
        const t = e
          ? this.selection.withSelectAll()
          : this.selection.withSelectNone();
        return this.withSelection(t);
      }
      withSelection(e) {
        return new bo(this.path, this.status, e);
      }
    }
    class So extends wo {
      constructor(e, t, n) {
        super(e, t), (this.commitish = n), (this.commitish = n);
      }
    }
    class Co {
      constructor(e, t = !0) {
        (this.files = e),
          (this.includeAll = t),
          (this.fileIxById = new Map()),
          e.forEach((e, t) => this.fileIxById.set(e.id, t));
      }
      static fromFiles(e) {
        return new Co(
          e,
          (function (e) {
            if (!e.length) return !0;
            const t = e.every((e) => e.selection.getSelectionType() === Vi.All),
              n = e.every((e) => e.selection.getSelectionType() === Vi.None);
            let r = null;
            t ? (r = !0) : n && (r = !1);
            return r;
          })(e)
        );
      }
      withIncludeAllFiles(e) {
        const t = this.files.map((t) => t.withIncludeAll(e));
        return new Co(t, e);
      }
      findFileWithID(e) {
        const t = this.fileIxById.get(e);
        return (void 0 !== t && this.files[t]) || null;
      }
      findFileIndexByID(e) {
        const t = this.fileIxById.get(e);
        return void 0 !== t ? t : -1;
      }
    }
    function Eo() {
      return fi();
    }
    function ko() {
      return !!Eo() && r.remote.nativeTheme.shouldUseDarkColors;
    }
    !(function (e) {
      (e.Unknown = "Unknown"),
        (e.Unborn = "Unborn"),
        (e.Detached = "Detached"),
        (e.Valid = "Valid");
    })(so || (so = {})),
      (function (e) {
        (e[(e.RenameBranch = 1)] = "RenameBranch"),
          (e[(e.DeleteBranch = 2)] = "DeleteBranch"),
          (e[(e.ConfirmDiscardChanges = 3)] = "ConfirmDiscardChanges"),
          (e[(e.Preferences = 4)] = "Preferences"),
          (e[(e.MergeBranch = 5)] = "MergeBranch"),
          (e[(e.RepositorySettings = 6)] = "RepositorySettings"),
          (e[(e.AddRepository = 7)] = "AddRepository"),
          (e[(e.CreateRepository = 8)] = "CreateRepository"),
          (e[(e.CloneRepository = 9)] = "CloneRepository"),
          (e[(e.CreateBranch = 10)] = "CreateBranch"),
          (e[(e.SignIn = 11)] = "SignIn"),
          (e[(e.About = 12)] = "About"),
          (e[(e.InstallGit = 13)] = "InstallGit"),
          (e[(e.PublishRepository = 14)] = "PublishRepository"),
          (e[(e.Acknowledgements = 15)] = "Acknowledgements"),
          (e[(e.UntrustedCertificate = 16)] = "UntrustedCertificate"),
          (e[(e.RemoveRepository = 17)] = "RemoveRepository"),
          (e[(e.TermsAndConditions = 18)] = "TermsAndConditions"),
          (e[(e.PushBranchCommits = 19)] = "PushBranchCommits"),
          (e[(e.CLIInstalled = 20)] = "CLIInstalled"),
          (e[(e.GenericGitAuthentication = 21)] = "GenericGitAuthentication"),
          (e[(e.ExternalEditorFailed = 22)] = "ExternalEditorFailed"),
          (e[(e.OpenShellFailed = 23)] = "OpenShellFailed"),
          (e[(e.InitializeLFS = 24)] = "InitializeLFS"),
          (e[(e.LFSAttributeMismatch = 25)] = "LFSAttributeMismatch"),
          (e[(e.UpstreamAlreadyExists = 26)] = "UpstreamAlreadyExists"),
          (e[(e.ReleaseNotes = 27)] = "ReleaseNotes"),
          (e[(e.DeletePullRequest = 28)] = "DeletePullRequest"),
          (e[(e.MergeConflicts = 29)] = "MergeConflicts"),
          (e[(e.AbortMerge = 30)] = "AbortMerge"),
          (e[(e.OversizedFiles = 31)] = "OversizedFiles"),
          (e[(e.UsageReportingChanges = 32)] = "UsageReportingChanges"),
          (e[(e.CommitConflictsWarning = 33)] = "CommitConflictsWarning"),
          (e[(e.PushNeedsPull = 34)] = "PushNeedsPull"),
          (e[(e.RebaseFlow = 35)] = "RebaseFlow"),
          (e[(e.ConfirmForcePush = 36)] = "ConfirmForcePush"),
          (e[(e.StashAndSwitchBranch = 37)] = "StashAndSwitchBranch"),
          (e[(e.ConfirmOverwriteStash = 38)] = "ConfirmOverwriteStash"),
          (e[(e.ConfirmDiscardStash = 39)] = "ConfirmDiscardStash"),
          (e[(e.CreateTutorialRepository = 40)] = "CreateTutorialRepository"),
          (e[(e.ConfirmExitTutorial = 41)] = "ConfirmExitTutorial"),
          (e[(e.PushRejectedDueToMissingWorkflowScope = 42)] =
            "PushRejectedDueToMissingWorkflowScope"),
          (e[(e.SAMLReauthRequired = 43)] = "SAMLReauthRequired"),
          (e[(e.CreateFork = 44)] = "CreateFork"),
          (e[(e.CreateTag = 45)] = "CreateTag"),
          (e[(e.DeleteTag = 46)] = "DeleteTag"),
          (e[(e.LocalChangesOverwritten = 47)] = "LocalChangesOverwritten"),
          (e[(e.ChooseForkSettings = 48)] = "ChooseForkSettings"),
          (e[(e.ConfirmDiscardSelection = 49)] = "ConfirmDiscardSelection");
      })(ao || (ao = {}));
    const xo = new (class {
      constructor() {
        (this.emitter = new ie.Emitter()),
          (this.subscribe = () => {
            Eo() &&
              r.remote.nativeTheme.addListener(
                "updated",
                this.onThemeNotificationFromOS
              );
          }),
          (this.onThemeNotificationFromOS = (e, t) => {
            const n = ko() ? vi.Dark : vi.Light;
            this.emitThemeChanged(n);
          }),
          this.subscribe();
      }
      dispose() {
        r.remote.nativeTheme.removeAllListeners();
      }
      onThemeChanged(e) {
        return this.emitter.on("theme-changed", e);
      }
      emitThemeChanged(e) {
        this.emitter.emit("theme-changed", e);
      }
    })();
    r.remote.app.on("will-quit", () => {
      xo.dispose();
    });
    var Ro;
    n(58);
    !(function (e) {
      (e.Atom = "Atom"),
        (e.MacVim = "MacVim"),
        (e.VSCode = "Visual Studio Code"),
        (e.VSCodeInsiders = "Visual Studio Code (Insiders)"),
        (e.VSCodium = "VSCodium"),
        (e.SublimeText = "Sublime Text"),
        (e.BBEdit = "BBEdit"),
        (e.PhpStorm = "PhpStorm"),
        (e.PyCharm = "PyCharm"),
        (e.RubyMine = "RubyMine"),
        (e.TextMate = "TextMate"),
        (e.Brackets = "Brackets"),
        (e.WebStorm = "WebStorm"),
        (e.Typora = "Typora"),
        (e.CodeRunner = "CodeRunner"),
        (e.SlickEdit = "SlickEdit"),
        (e.IntelliJ = "IntelliJ"),
        (e.Xcode = "Xcode"),
        (e.GoLand = "GoLand"),
        (e.AndroidStudio = "Android Studio"),
        (e.Rider = "Rider"),
        (e.Nova = "Nova");
    })(Ro || (Ro = {}));
    var To,
      Do,
      Ao = n(6);
    function _o(e, t) {
      const n = e.find((e) => e.name === t);
      return n && n.type === Ao.RegistryValueType.REG_SZ ? n.data : "";
    }
    async function Mo(e) {
      const t = (function (e) {
        switch (e) {
          case To.Atom:
            return [
              {
                key: Ao.HKEY.HKEY_CURRENT_USER,
                subKey:
                  "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\atom",
              },
            ];
          case To.AtomBeta:
            return [
              {
                key: Ao.HKEY.HKEY_CURRENT_USER,
                subKey:
                  "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\atom-beta",
              },
            ];
          case To.AtomNightly:
            return [
              {
                key: Ao.HKEY.HKEY_CURRENT_USER,
                subKey:
                  "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\atom-nightly",
              },
            ];
          case To.VSCode:
            return [
              {
                key: Ao.HKEY.HKEY_CURRENT_USER,
                subKey:
                  "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{771FD6B0-FA20-440A-A002-3B3BAC16DC50}_is1",
              },
              {
                key: Ao.HKEY.HKEY_CURRENT_USER,
                subKey:
                  "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{D628A17A-9713-46BF-8D57-E671B46A741E}_is1",
              },
              {
                key: Ao.HKEY.HKEY_LOCAL_MACHINE,
                subKey:
                  "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{EA457B21-F73E-494C-ACAB-524FDE069978}_is1",
              },
              {
                key: Ao.HKEY.HKEY_LOCAL_MACHINE,
                subKey:
                  "SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{F8A2A208-72B3-4D61-95FC-8A65D340689B}_is1",
              },
            ];
          case To.VSCodeInsiders:
            return [
              {
                key: Ao.HKEY.HKEY_CURRENT_USER,
                subKey:
                  "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{217B4C08-948D-4276-BFBB-BEE930AE5A2C}_is1",
              },
              {
                key: Ao.HKEY.HKEY_CURRENT_USER,
                subKey:
                  "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{26F4A15E-E392-4887-8C09-7BC55712FD5B}_is1",
              },
              {
                key: Ao.HKEY.HKEY_LOCAL_MACHINE,
                subKey:
                  "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{1287CAD5-7C8D-410D-88B9-0D1EE4A83FF2}_is1",
              },
              {
                key: Ao.HKEY.HKEY_LOCAL_MACHINE,
                subKey:
                  "SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{C26E74D1-022E-4238-8B9D-1E7564A36CC9}_is1",
              },
            ];
          case To.VSCodium:
            return [
              {
                key: Ao.HKEY.HKEY_CURRENT_USER,
                subKey:
                  "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{2E1F05D1-C245-4562-81EE-28188DB6FD17}_is1",
              },
              {
                key: Ao.HKEY.HKEY_CURRENT_USER,
                subKey:
                  "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{C6065F05-9603-4FC4-8101-B9781A25D88E}}_is1",
              },
              {
                key: Ao.HKEY.HKEY_LOCAL_MACHINE,
                subKey:
                  "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{D77B7E06-80BA-4137-BCF4-654B95CCEBC5}_is1",
              },
              {
                key: Ao.HKEY.HKEY_LOCAL_MACHINE,
                subKey:
                  "SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{E34003BB-9E10-4501-8C11-BE3FAA83F23F}_is1",
              },
            ];
          case To.SublimeText:
            return [
              {
                key: Ao.HKEY.HKEY_LOCAL_MACHINE,
                subKey:
                  "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Sublime Text 3_is1",
              },
            ];
          case To.CFBuilder:
            return [
              {
                key: Ao.HKEY.HKEY_LOCAL_MACHINE,
                subKey:
                  "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Adobe ColdFusion Builder 3_is1",
              },
              {
                key: Ao.HKEY.HKEY_LOCAL_MACHINE,
                subKey:
                  "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Adobe ColdFusion Builder 2016",
              },
            ];
          case To.Typora:
            return [
              {
                key: Ao.HKEY.HKEY_LOCAL_MACHINE,
                subKey:
                  "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{37771A20-7167-44C0-B322-FD3E54C56156}_is1",
              },
              {
                key: Ao.HKEY.HKEY_LOCAL_MACHINE,
                subKey:
                  "SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{37771A20-7167-44C0-B322-FD3E54C56156}_is1",
              },
            ];
          case To.SlickEdit:
            return [
              {
                key: Ao.HKEY.HKEY_LOCAL_MACHINE,
                subKey:
                  "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{18406187-F49E-4822-CAF2-1D25C0C83BA2}",
              },
              {
                key: Ao.HKEY.HKEY_LOCAL_MACHINE,
                subKey:
                  "SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{18006187-F49E-4822-CAF2-1D25C0C83BA2}",
              },
              {
                key: Ao.HKEY.HKEY_LOCAL_MACHINE,
                subKey:
                  "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{18606187-F49E-4822-CAF2-1D25C0C83BA2}",
              },
              {
                key: Ao.HKEY.HKEY_LOCAL_MACHINE,
                subKey:
                  "SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{18206187-F49E-4822-CAF2-1D25C0C83BA2}",
              },
              {
                key: Ao.HKEY.HKEY_LOCAL_MACHINE,
                subKey:
                  "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{15406187-F49E-4822-CAF2-1D25C0C83BA2}",
              },
              {
                key: Ao.HKEY.HKEY_LOCAL_MACHINE,
                subKey:
                  "SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{15006187-F49E-4822-CAF2-1D25C0C83BA2}",
              },
              {
                key: Ao.HKEY.HKEY_LOCAL_MACHINE,
                subKey:
                  "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{10C06187-F49E-4822-CAF2-1D25C0C83BA2}",
              },
              {
                key: Ao.HKEY.HKEY_LOCAL_MACHINE,
                subKey:
                  "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{10406187-F49E-4822-CAF2-1D25C0C83BA2}",
              },
              {
                key: Ao.HKEY.HKEY_LOCAL_MACHINE,
                subKey:
                  "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{0DC06187-F49E-4822-CAF2-1D25C0C83BA2}",
              },
              {
                key: Ao.HKEY.HKEY_LOCAL_MACHINE,
                subKey:
                  "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{0D406187-F49E-4822-CAF2-1D25C0C83BA2}",
              },
              {
                key: Ao.HKEY.HKEY_LOCAL_MACHINE,
                subKey:
                  "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{7CC0E567-ACD6-41E8-95DA-154CEEDB0A18}",
              },
            ];
          case To.Webstorm:
            return [
              {
                key: Ao.HKEY.HKEY_LOCAL_MACHINE,
                subKey:
                  "SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\WebStorm 2018.3",
              },
              {
                key: Ao.HKEY.HKEY_LOCAL_MACHINE,
                subKey:
                  "SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\WebStorm 2019.2",
              },
              {
                key: Ao.HKEY.HKEY_LOCAL_MACHINE,
                subKey:
                  "SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\WebStorm 2019.2.4",
              },
              {
                key: Ao.HKEY.HKEY_LOCAL_MACHINE,
                subKey:
                  "SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\WebStorm 2019.3",
              },
              {
                key: Ao.HKEY.HKEY_LOCAL_MACHINE,
                subKey:
                  "SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\WebStorm 2020.1",
              },
            ];
          case To.Phpstorm:
            return [
              {
                key: Ao.HKEY.HKEY_LOCAL_MACHINE,
                subKey:
                  "SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\PhpStorm 2019.2",
              },
              {
                key: Ao.HKEY.HKEY_LOCAL_MACHINE,
                subKey:
                  "SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\PhpStorm 2019.2.4",
              },
              {
                key: Ao.HKEY.HKEY_LOCAL_MACHINE,
                subKey:
                  "SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\PhpStorm 2019.3",
              },
              {
                key: Ao.HKEY.HKEY_LOCAL_MACHINE,
                subKey:
                  "SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\PhpStorm 2020.1",
              },
            ];
          case To.NotepadPlusPlus:
            return [
              {
                key: Ao.HKEY.HKEY_LOCAL_MACHINE,
                subKey:
                  "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Notepad++",
              },
              {
                key: Ao.HKEY.HKEY_LOCAL_MACHINE,
                subKey:
                  "SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Notepad++",
              },
            ];
          case To.Rider:
            return [
              {
                key: Ao.HKEY.HKEY_LOCAL_MACHINE,
                subKey:
                  "SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\JetBrains Rider 2019.3.4",
              },
            ];
          default:
            return X(0, "Unknown external editor: " + e);
        }
      })(e);
      let n = [];
      for (const { key: e, subKey: r } of t)
        if (((n = Object(Ao.enumerateValues)(e, r)), n.length > 0)) break;
      if (0 === n.length) return null;
      const { displayName: r, publisher: o, installLocation: s } = (function (
        e,
        t
      ) {
        if (e === To.Atom || e === To.AtomBeta || e === To.AtomNightly) {
          return {
            displayName: _o(t, "DisplayName"),
            publisher: _o(t, "Publisher"),
            installLocation: _o(t, "InstallLocation"),
          };
        }
        if (e === To.VSCode || e === To.VSCodeInsiders) {
          return {
            displayName: _o(t, "DisplayName"),
            publisher: _o(t, "Publisher"),
            installLocation: _o(t, "InstallLocation"),
          };
        }
        if (e === To.VSCodium) {
          return {
            displayName: _o(t, "DisplayName"),
            publisher: _o(t, "Publisher"),
            installLocation: _o(t, "InstallLocation"),
          };
        }
        if (e === To.SublimeText) {
          let e = "",
            n = "",
            r = "";
          for (const i of t)
            "DisplayName" === i.name &&
            i.type === Ao.RegistryValueType.REG_SZ &&
            i.data.startsWith("Sublime Text")
              ? (e = "Sublime Text")
              : "Publisher" === i.name && i.type === Ao.RegistryValueType.REG_SZ
              ? (n = i.data)
              : "InstallLocation" === i.name &&
                i.type === Ao.RegistryValueType.REG_SZ &&
                (r = i.data);
          return { displayName: e, publisher: n, installLocation: r };
        }
        if (e === To.CFBuilder) {
          return {
            displayName: _o(t, "DisplayName"),
            publisher: _o(t, "Publisher"),
            installLocation: _o(t, "InstallLocation"),
          };
        }
        if (e === To.Typora) {
          return {
            displayName: _o(t, "DisplayName"),
            publisher: _o(t, "Publisher"),
            installLocation: _o(t, "InstallLocation"),
          };
        }
        if (e === To.SlickEdit) {
          return {
            displayName: _o(t, "DisplayName"),
            publisher: _o(t, "Publisher"),
            installLocation: _o(t, "InstallLocation"),
          };
        }
        if (e === To.Webstorm) {
          let e = "",
            n = "",
            r = "";
          for (const i of t)
            "DisplayName" === i.name &&
            i.type === Ao.RegistryValueType.REG_SZ &&
            i.data.startsWith("WebStorm ")
              ? (e = "WebStorm")
              : "Publisher" === i.name && i.type === Ao.RegistryValueType.REG_SZ
              ? (n = i.data)
              : "InstallLocation" === i.name &&
                i.type === Ao.RegistryValueType.REG_SZ &&
                (r = i.data);
          return { displayName: e, publisher: n, installLocation: r };
        }
        if (e === To.Phpstorm) {
          let e = "",
            n = "",
            r = "";
          for (const i of t)
            "DisplayName" === i.name &&
            i.type === Ao.RegistryValueType.REG_SZ &&
            i.data.startsWith("PhpStorm ")
              ? (e = "PhpStorm")
              : "Publisher" === i.name && i.type === Ao.RegistryValueType.REG_SZ
              ? (n = i.data)
              : "InstallLocation" === i.name &&
                i.type === Ao.RegistryValueType.REG_SZ &&
                (r = i.data);
          return { displayName: e, publisher: n, installLocation: r };
        }
        if (e === To.NotepadPlusPlus) {
          return {
            displayName: _o(t, "DisplayName"),
            publisher: _o(t, "Publisher"),
            installLocation: _o(t, "DisplayIcon"),
          };
        }
        if (e === To.Rider) {
          let e = "",
            n = "",
            r = "";
          for (const i of t)
            "DisplayName" === i.name &&
            i.type === Ao.RegistryValueType.REG_SZ &&
            i.data.startsWith("JetBrains Rider ")
              ? (e = "JetBrains Rider")
              : "Publisher" === i.name && i.type === Ao.RegistryValueType.REG_SZ
              ? (n = i.data)
              : "InstallLocation" === i.name &&
                i.type === Ao.RegistryValueType.REG_SZ &&
                (r = i.data);
          return { displayName: e, publisher: n, installLocation: r };
        }
        return X(0, "Unknown external editor: " + e);
      })(e, n);
      if (
        !(function (e, t, n) {
          switch (e) {
            case To.Atom:
              return "Atom" === t && "GitHub Inc." === n;
            case To.AtomBeta:
              return "Atom Beta" === t && "GitHub Inc." === n;
            case To.AtomNightly:
              return "Atom Nightly" === t && "GitHub Inc." === n;
            case To.VSCode:
              return (
                t.startsWith("Microsoft Visual Studio Code") &&
                "Microsoft Corporation" === n
              );
            case To.VSCodeInsiders:
              return (
                t.startsWith("Microsoft Visual Studio Code Insiders") &&
                "Microsoft Corporation" === n
              );
            case To.VSCodium:
              return "Visual Source Codium" === t && "VSCodium" === n;
            case To.SublimeText:
              return "Sublime Text" === t && "Sublime HQ Pty Ltd" === n;
            case To.CFBuilder:
              return (
                ("Adobe ColdFusion Builder 3" === t ||
                  "Adobe ColdFusion Builder 2016" === t) &&
                "Adobe Systems Incorporated" === n
              );
            case To.Typora:
              return t.startsWith("Typora") && "typora.io" === n;
            case To.SlickEdit:
              return t.startsWith("SlickEdit") && "SlickEdit Inc." === n;
            case To.Webstorm:
              return t.startsWith("WebStorm") && "JetBrains s.r.o." === n;
            case To.Phpstorm:
              return t.startsWith("PhpStorm") && "JetBrains s.r.o." === n;
            case To.NotepadPlusPlus:
              return t.startsWith("Notepad++") && "Notepad++ Team" === n;
            case To.Rider:
              return (
                t.startsWith("JetBrains Rider") && "JetBrains s.r.o." === n
              );
            default:
              return X(0, "Unknown external editor: " + e);
          }
        })(e, r, o)
      )
        return (
          log.debug(
            `Registry entry for ${e} did not match expected publisher settings`
          ),
          null
        );
      const a = (function (e, t) {
        switch (e) {
          case To.Atom:
            return i.join(t, "bin", "atom.cmd");
          case To.AtomBeta:
            return i.join(t, "bin", "atom-beta.cmd");
          case To.AtomNightly:
            return i.join(t, "bin", "atom-nightly.cmd");
          case To.VSCode:
            return i.join(t, "bin", "code.cmd");
          case To.VSCodeInsiders:
            return i.join(t, "bin", "code-insiders.cmd");
          case To.VSCodium:
            return i.join(t, "bin", "codium.cmd");
          case To.SublimeText:
            return i.join(t, "subl.exe");
          case To.CFBuilder:
            return i.join(t, "CFBuilder.exe");
          case To.Typora:
            return i.join(t, "typora.exe");
          case To.SlickEdit:
            return i.join(t, "win", "vs.exe");
          case To.Webstorm:
            return i.join(t, "bin", "webstorm.exe");
          case To.Phpstorm:
            return i.join(t, "bin", "phpstorm.exe");
          case To.NotepadPlusPlus:
            return i.join(t);
          case To.Rider:
            return i.join(t, "bin", "rider64.exe");
          default:
            return X(0, "Unknown external editor: " + e);
        }
      })(e, s);
      return (await Object(_i.pathExists)(a))
        ? a
        : (log.debug(`Command line interface for ${e} not found at '${a}'`),
          null);
    }
    function Po(e) {
      return (function (e) {
        var t;
        return null !== (t = ve(To, e)) && void 0 !== t ? t : null;
      })(e);
    }
    !(function (e) {
      (e.Atom = "Atom"),
        (e.AtomBeta = "Atom Beta"),
        (e.AtomNightly = "Atom Nightly"),
        (e.VSCode = "Visual Studio Code"),
        (e.VSCodeInsiders = "Visual Studio Code (Insiders)"),
        (e.VSCodium = "Visual Studio Codium"),
        (e.SublimeText = "Sublime Text"),
        (e.CFBuilder = "ColdFusion Builder"),
        (e.Typora = "Typora"),
        (e.SlickEdit = "SlickEdit"),
        (e.Webstorm = "JetBrains Webstorm"),
        (e.Phpstorm = "JetBrains Phpstorm"),
        (e.NotepadPlusPlus = "Notepad++"),
        (e.Rider = "JetBrains Rider");
    })(To || (To = {})),
      (function (e) {
        (e.Atom = "Atom"),
          (e.VSCode = "Visual Studio Code"),
          (e.VSCodeInsiders = "Visual Studio Code (Insiders)"),
          (e.VSCodium = "VSCodium"),
          (e.SublimeText = "Sublime Text"),
          (e.Typora = "Typora"),
          (e.SlickEdit = "SlickEdit");
      })(Do || (Do = {}));
    class Io extends Error {
      constructor(e, t = {}) {
        super(e), (this.metadata = t);
      }
    }
    let Oo = null;
    async function Lo() {
      return (
        (Oo && Oo.length > 0) ||
          (Oo = await (async function () {
            const e = [],
              [t, n, r, i, o, s, a, l, c, u, h, d, p, f] = await Promise.all([
                Mo(To.Atom),
                Mo(To.AtomBeta),
                Mo(To.AtomNightly),
                Mo(To.VSCode),
                Mo(To.VSCodeInsiders),
                Mo(To.VSCodium),
                Mo(To.SublimeText),
                Mo(To.CFBuilder),
                Mo(To.Typora),
                Mo(To.SlickEdit),
                Mo(To.Webstorm),
                Mo(To.Phpstorm),
                Mo(To.NotepadPlusPlus),
                Mo(To.Rider),
              ]);
            return (
              t && e.push({ editor: To.Atom, path: t, usesShell: !0 }),
              n && e.push({ editor: To.AtomBeta, path: n, usesShell: !0 }),
              r && e.push({ editor: To.AtomNightly, path: r, usesShell: !0 }),
              i && e.push({ editor: To.VSCode, path: i, usesShell: !0 }),
              o &&
                e.push({ editor: To.VSCodeInsiders, path: o, usesShell: !0 }),
              s && e.push({ editor: To.VSCodium, path: s, usesShell: !0 }),
              a && e.push({ editor: To.SublimeText, path: a, usesShell: !1 }),
              l && e.push({ editor: To.CFBuilder, path: l, usesShell: !1 }),
              c && e.push({ editor: To.Typora, path: c, usesShell: !1 }),
              u && e.push({ editor: To.SlickEdit, path: u }),
              h && e.push({ editor: To.Webstorm, path: h }),
              d && e.push({ editor: To.Phpstorm, path: d }),
              p && e.push({ editor: To.NotepadPlusPlus, path: p }),
              f && e.push({ editor: To.Rider, path: f }),
              e
            );
          })()),
        Oo
      );
    }
    async function Fo(e) {
      const t = await Lo();
      if (0 === t.length) return null;
      if (e) {
        const n = t.find((t) => t.editor === e) || null;
        if (!n) {
          throw new Io(
            `The editor '${e}' could not be found. Please open ${"Options"} and choose an available editor.`,
            { openPreferences: !0 }
          );
        }
        return n;
      }
      return t[0];
    }
    var No = n(7);
    var Bo = n(2),
      Ho = n(44);
    function zo(e, t) {
      return jo(t, e.path);
    }
    function Uo(e, t) {
      return jo(e, null, void 0, t);
    }
    async function Wo(e, t, n) {
      const r = n ? { env: n } : void 0;
      await $o(
        ["config", "--global", "--replace-all", e, t],
        __dirname,
        "setGlobalConfigValue",
        r
      );
    }
    async function jo(e, t, n, r) {
      const i = ["config", "-z"];
      t || i.push("--global"), void 0 !== n && i.push("--type", n), i.push(e);
      const o = await $o(i, t || __dirname, "getConfigValueInPath", {
        successExitCodes: new Set([0, 1]),
        env: r,
      });
      if (1 === o.exitCode) return null;
      return o.stdout.split("\0")[0];
    }
    function Vo(e) {
      return (
        e instanceof Error &&
        "string" == typeof e.code &&
        "string" == typeof e.syscall
      );
    }
    class Go extends Error {
      constructor(e, t) {
        super(
          (function (e) {
            const t = e.gitErrorDescription;
            return (
              t ||
              (e.stderr.length
                ? e.stderr
                : e.stdout.length
                ? e.stdout
                : "Unknown error")
            );
          })(e)
        ),
          (this.name = "GitError"),
          (this.result = e),
          (this.args = t);
      }
    }
    async function $o(e, t, n, r) {
      const i = { successExitCodes: new Set([0]), expectedErrors: new Set() },
        o = Object.assign(Object.assign({}, i), r);
      o.env = Object.assign({ TERM: "dumb" }, o.env);
      const s = `${n}: git ${e.join(" ")}`,
        a = await Ho.measure(s, () => Bo.GitProcess.exec(e, t, o)).catch(
          (e) => {
            if (Vo(e)) throw new Error(`Failed to execute ${n}: ${e.code}`);
            throw e;
          }
        ),
        l = a.exitCode;
      let c = null;
      const u = !!o.successExitCodes && o.successExitCodes.has(l);
      u ||
        ((c = Bo.GitProcess.parseError(a.stderr)),
        c || (c = Bo.GitProcess.parseError(a.stdout)));
      const h = c
          ? (function (e) {
              if (qo(e)) {
                return `Authentication failed. Some common reasons include:\n\n- You are not logged in to your account: see ${"File > Options."}\n- You may need to log out and log back in to refresh your token.\n- You do not have permission to access this repository.\n- The repository is archived on GitHub. Check the repository settings to confirm you are still permitted to push commits.\n- If you use SSH authentication, check that your key is added to the ssh-agent and associated with your account.`;
              }
              switch (e) {
                case Bo.GitError.SSHKeyAuditUnverified:
                  return "The SSH key is unverified.";
                case Bo.GitError.RemoteDisconnection:
                  return "The remote disconnected. Check your Internet connection and try again.";
                case Bo.GitError.HostDown:
                  return "The host is down. Check your Internet connection and try again.";
                case Bo.GitError.RebaseConflicts:
                  return "We found some conflicts while trying to rebase. Please resolve the conflicts before continuing.";
                case Bo.GitError.MergeConflicts:
                  return "We found some conflicts while trying to merge. Please resolve the conflicts and commit the changes.";
                case Bo.GitError.HTTPSRepositoryNotFound:
                case Bo.GitError.SSHRepositoryNotFound:
                  return "The repository does not seem to exist anymore. You may not have access, or it may have been deleted or renamed.";
                case Bo.GitError.PushNotFastForward:
                  return "The repository has been updated since you last pulled. Try pulling before pushing.";
                case Bo.GitError.BranchDeletionFailed:
                  return "Could not delete the branch. It was probably already deleted.";
                case Bo.GitError.DefaultBranchDeletionFailed:
                  return "The branch is the repository's default branch and cannot be deleted.";
                case Bo.GitError.RevertConflicts:
                  return "To finish reverting, please merge and commit the changes.";
                case Bo.GitError.EmptyRebasePatch:
                  return "There aren’t any changes left to apply.";
                case Bo.GitError.NoMatchingRemoteBranch:
                  return "There aren’t any remote branches that match the current branch.";
                case Bo.GitError.NothingToCommit:
                  return "There are no changes to commit.";
                case Bo.GitError.NoSubmoduleMapping:
                  return "A submodule was removed from .gitmodules, but the folder still exists in the repository. Delete the folder, commit the change, then try again.";
                case Bo.GitError.SubmoduleRepositoryDoesNotExist:
                  return "A submodule points to a location which does not exist.";
                case Bo.GitError.InvalidSubmoduleSHA:
                  return "A submodule points to a commit which does not exist.";
                case Bo.GitError.LocalPermissionDenied:
                  return "Permission denied.";
                case Bo.GitError.InvalidMerge:
                  return "This is not something we can merge.";
                case Bo.GitError.InvalidRebase:
                  return "This is not something we can rebase.";
                case Bo.GitError.NonFastForwardMergeIntoEmptyHead:
                  return "The merge you attempted is not a fast-forward, so it cannot be performed on an empty branch.";
                case Bo.GitError.PatchDoesNotApply:
                  return "The requested changes conflict with one or more files in the repository.";
                case Bo.GitError.BranchAlreadyExists:
                  return "A branch with that name already exists.";
                case Bo.GitError.BadRevision:
                  return "Bad revision.";
                case Bo.GitError.NotAGitRepository:
                  return "This is not a git repository.";
                case Bo.GitError.ProtectedBranchForcePush:
                  return "This branch is protected from force-push operations.";
                case Bo.GitError.ProtectedBranchRequiresReview:
                  return "This branch is protected and any changes requires an approved review. Open a pull request with changes targeting this branch instead.";
                case Bo.GitError.PushWithFileSizeExceedingLimit:
                  return "The push operation includes a file which exceeds GitHub's file size restriction of 100MB. Please remove the file from history and try again.";
                case Bo.GitError.HexBranchNameRejected:
                  return "The branch name cannot be a 40-character string of hexadecimal characters, as this is the format that Git uses for representing objects.";
                case Bo.GitError.ForcePushRejected:
                  return "The force push has been rejected for the current branch.";
                case Bo.GitError.InvalidRefLength:
                  return "A ref cannot be longer than 255 characters.";
                case Bo.GitError.CannotMergeUnrelatedHistories:
                  return "Unable to merge unrelated histories in this repository.";
                case Bo.GitError.PushWithPrivateEmail:
                  return 'Cannot push these commits as they contain an email address marked as private on GitHub. To push anyway, visit https://github.com/settings/emails, uncheck "Keep my email address private", then switch back to GitHub Desktop to push your commits. You can then enable the setting again.';
                case Bo.GitError.LFSAttributeDoesNotMatch:
                  return "Git LFS attribute found in global Git configuration does not match expected value.";
                case Bo.GitError.ProtectedBranchDeleteRejected:
                  return "This branch cannot be deleted from the remote repository because it is marked as protected.";
                case Bo.GitError.ProtectedBranchRequiredStatus:
                  return "The push was rejected by the remote server because a required status check has not been satisfied.";
                case Bo.GitError.BranchRenameFailed:
                  return "The branch could not be renamed.";
                case Bo.GitError.PathDoesNotExist:
                  return "The path does not exist on disk.";
                case Bo.GitError.InvalidObjectName:
                  return "The object was not found in the Git repository.";
                case Bo.GitError.OutsideRepository:
                  return "This path is not a valid path inside the repository.";
                case Bo.GitError.LockFileAlreadyExists:
                  return "A lock file already exists in the repository, which blocks this operation from completing.";
                case Bo.GitError.NoMergeToAbort:
                  return "There is no merge in progress, so there is nothing to abort.";
                case Bo.GitError.NoExistingRemoteBranch:
                  return "The remote branch does not exist.";
                case Bo.GitError.LocalChangesOverwritten:
                  return "Unable to switch branches as there are working directory changes which would be overwritten. Please commit or stash your changes.";
                case Bo.GitError.UnresolvedConflicts:
                  return "There are unresolved conflicts in the working directory.";
                case Bo.GitError.ConfigLockFileAlreadyExists:
                case Bo.GitError.RemoteAlreadyExists:
                  return null;
                case Bo.GitError.TagAlreadyExists:
                  return "A tag with that name already exists";
                case Bo.GitError.MergeWithLocalChanges:
                case Bo.GitError.RebaseWithLocalChanges:
                  return null;
                default:
                  return X(0, "Unknown error: " + e);
              }
            })(c)
          : null,
        d = Object.assign(Object.assign({}, a), {
          gitError: c,
          gitErrorDescription: h,
          path: t,
        });
      let p = !0;
      if (
        (c && o.expectedErrors && (p = o.expectedErrors.has(c)), (c && p) || u)
      )
        return d;
      const f = new Array();
      throw (
        (f.push(`\`git ${e.join(" ")}\` exited with an unexpected code: ${l}.`),
        a.stdout && (f.push("stdout:"), f.push(a.stdout)),
        a.stderr && (f.push("stderr:"), f.push(a.stderr)),
        c && f.push(`(The error was parsed as ${c}: ${h})`),
        log.error(f.join("\n")),
        new Go(d, e))
      );
    }
    function qo(e) {
      switch (e) {
        case Bo.GitError.SSHAuthenticationFailed:
        case Bo.GitError.SSHPermissionDenied:
        case Bo.GitError.HTTPSAuthenticationFailed:
          return !0;
      }
      return !1;
    }
    function Ko(e) {
      return (
        e instanceof Go &&
        e.result.gitError === Bo.GitError.ConfigLockFileAlreadyExists
      );
    }
    const Yo = /^error: could not lock config file (.+?): File exists$/m;
    function Qo(e) {
      const t = Yo.exec(e.stderr);
      if (null === t) return null;
      const n = t[1].replace("/", "\\");
      return i.resolve(e.path, n + ".lock");
    }
    async function Zo(e, t) {
      const n = ["-c", "credential.helper="];
      if (null === t) return n;
      if (!(t.endpoint === gt())) return n;
      const r = "protocol.version";
      return null !== (null != e ? await zo(e, r) : await Uo(r))
        ? n
        : [...n, "-c", "protocol.version=2"];
    }
    function Xo(e) {
      return e.stdout.split("]")[0].split(" ")[1];
    }
    function Jo(e) {
      return "co-authored-by" === e.token.toLowerCase();
    }
    function es(e, t) {
      const n = e.split("\n"),
        r = new Array();
      for (const e of n) {
        const n = ts(e, t);
        n && r.push(n);
      }
      return r;
    }
    function ts(e, t) {
      for (const n of t) {
        const t = e.indexOf(n);
        if (t > 0)
          return {
            token: e.substring(0, t).trim(),
            value: e.substring(t + 1).trim(),
          };
      }
      return null;
    }
    async function ns(e) {
      return (await zo(e, "trailer.separators")) || ":";
    }
    async function rs(e, t, n, r = !1) {
      const i = ["interpret-trailers"];
      r && i.push("--unfold");
      for (const e of n) i.push("--trailer", `${e.token}=${e.value}`);
      return (await $o(i, e.path, "mergeTrailers", { stdin: t })).stdout;
    }
    async function is(e, t) {
      const { summary: n, description: r, trailers: i } = t,
        o = `${n}\n\n${r || ""}\n`.replace(/\s+$/, "\n");
      return void 0 !== i && i.length > 0 ? rs(e, o, i) : o;
    }
    var os = n(60);
    const ss = {
      setItem: function (e, t, n) {
        return os.setPassword(e, t, n);
      },
      getItem: function (e, t) {
        return os.getPassword(e, t);
      },
      deleteItem: function (e, t) {
        return os.deletePassword(e, t);
      },
    };
    function as(e) {
      const t = bt(e);
      if (t) return t.hostname;
      const n = _e.parse(e).hostname;
      return n || e;
    }
    function ls(e) {
      return "genericGitAuth/username/" + e;
    }
    function cs(e) {
      const t = ls(e);
      return localStorage.getItem(t);
    }
    function us(e, t) {
      const n = t.gitHubRepository;
      return n ? yt(e, n.endpoint) : null;
    }
    class hs {
      constructor(e) {
        (this.emitter = new ie.Emitter()),
          (this.state = null),
          (this.onWatchEvent = (e) => {
            "change" === e &&
              this.state &&
              o.stat(this.path, (e, t) => {
                if (e) return;
                const n = this.state;
                n &&
                  (t.size <= n.position ||
                    ((this.state = Object.assign(Object.assign({}, n), {
                      position: t.size,
                    })),
                    this.readChunk(t, n.position)));
              });
          }),
          (this.path = e);
      }
      onDataAvailable(e) {
        return this.emitter.on("data", e);
      }
      onError(e) {
        return this.emitter.on("error", e);
      }
      handleError(e) {
        (this.state = null), this.emitter.emit("error", e);
      }
      start() {
        if (this.state) throw new Error("Tailer already running");
        try {
          const e = o.watch(this.path, this.onWatchEvent);
          e.on("error", (e) => {
            this.handleError(e);
          }),
            (this.state = { watcher: e, position: 0 });
        } catch (e) {
          this.handleError(e);
        }
      }
      readChunk(e, t) {
        const n = o.createReadStream(this.path, { start: t, end: e.size });
        this.emitter.emit("data", n);
      }
      stop() {
        const e = this.state;
        e && (e.watcher.close(), (this.state = null));
      }
    }
    var ds = n(37),
      ps = n.n(ds);
    function fs(e, t, n, r, i) {
      const o = `${n}: git ${e.join(" ")}`;
      return Ho.measure(
        o,
        () =>
          new Promise((o, s) => {
            const a = Bo.GitProcess.spawn(e, t);
            a.on("error", (e) => {
              Vo(e) ? s(new Error(`Failed to execute ${n}: ${e.code}`)) : s(e);
            });
            let l = 0,
              c = !1;
            const u = new Array();
            a.stdout &&
              a.stdout.on("data", (e) => {
                (!i || l < i) && (u.push(e), (l += e.length)),
                  i && l >= i && !c && (a.kill(), (c = !0));
              });
            const h = new Array();
            a.stderr &&
              a.stderr.on("data", (e) => {
                h.push(e);
              }),
              a.on("close", (e, t) => {
                const n = Buffer.concat(u, i ? Math.min(i, l) : l),
                  a = Buffer.concat(h);
                (r || new Set([0])).has(e) || t
                  ? o({ output: n, error: a, exitCode: e })
                  : s(
                      new Error(
                        `Git returned an unexpected exit code '${e}' which should be handled by the caller.'`
                      )
                    );
              });
          })
      );
    }
    async function ms(e, t, n, r) {
      const i = new Set([0, 1]),
        o = ["show", `${t}:${n}`],
        { output: s } = await fs(o, e.path, "getPartialBlobContents", i, r);
      return s;
    }
    const gs = /^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/,
      ys = new Set(["+", "-", " ", "\\"]);
    class vs {
      constructor() {
        this.reset();
      }
      reset() {
        (this.ls = 0), (this.le = -1), (this.text = "");
      }
      nextLine() {
        return (
          (this.ls = this.le + 1),
          !(this.ls >= this.text.length) &&
            ((this.le = this.text.indexOf("\n", this.ls)),
            -1 === this.le && (this.le = this.text.length),
            this.ls !== this.le)
        );
      }
      readLine() {
        return this.nextLine() ? this.text.substring(this.ls, this.le) : null;
      }
      lineStartsWith(e) {
        return this.text.startsWith(e, this.ls);
      }
      lineEndsWith(e) {
        return this.text.endsWith(e, this.le);
      }
      peek() {
        const e = this.le + 1;
        return e < this.text.length ? this.text[e] : null;
      }
      parseDiffHeader() {
        for (; this.nextLine(); ) {
          if (
            this.lineStartsWith("Binary files ") &&
            this.lineEndsWith("differ")
          )
            return { isBinary: !0 };
          if (this.lineStartsWith("+++")) return { isBinary: !1 };
        }
        return null;
      }
      numberFromGroup(e, t, n = null) {
        const r = e[t];
        if (!r) {
          if (!n)
            throw new Error(
              `Group ${t} missing from regexp match and no defaultValue was provided`
            );
          return n;
        }
        const i = parseInt(r, 10);
        if (isNaN(i))
          throw new Error(
            `Could not parse capture group ${t} into number: ${r}`
          );
        return i;
      }
      parseHunkHeader(e) {
        const t = gs.exec(e);
        if (!t) throw new Error("Invalid hunk header format");
        const n = this.numberFromGroup(t, 1),
          r = this.numberFromGroup(t, 2, 1),
          i = this.numberFromGroup(t, 3),
          o = this.numberFromGroup(t, 4, 1);
        return new Ji(n, r, i, o);
      }
      parseLinePrefix(e) {
        return e && e.length && ys.has(e[0]) ? e[0] : null;
      }
      parseHunk(e) {
        const t = this.readLine();
        if (!t) throw new Error("Expected hunk header but reached end of diff");
        const n = this.parseHunkHeader(t),
          r = new Array();
        let i;
        r.push(new Ki(t, ji.Hunk, null, null));
        let o = n.oldStartLine,
          s = n.newStartLine;
        for (; (i = this.parseLinePrefix(this.peek())); ) {
          const e = this.readLine();
          if (!e)
            throw new Error(
              "Expected unified diff line but reached end of diff"
            );
          if ("\\" === i) {
            if (e.length < 12)
              throw new Error(
                'Expected "no newline at end of file" marker to be at least 12 bytes long'
              );
            const t = r.length - 1,
              n = r[t];
            r[t] = n.withNoTrailingNewLine(!0);
            continue;
          }
          let t;
          if ("+" === i) t = new Ki(e, ji.Add, null, s++);
          else if ("-" === i) t = new Ki(e, ji.Delete, o++, null);
          else {
            if (" " !== i) return X(0, "Unknown DiffLinePrefix: " + i);
            t = new Ki(e, ji.Context, o++, s++);
          }
          r.push(t);
        }
        if (1 === r.length) throw new Error("Malformed diff, empty hunk");
        return new Xi(n, r, e, e + r.length - 1);
      }
      parse(e) {
        this.text = e;
        try {
          const e = this.parseDiffHeader(),
            t = this.le,
            n = this.text.substring(0, t);
          if (!e) return { header: n, contents: "", hunks: [], isBinary: !1 };
          if (e.isBinary)
            return { header: n, contents: "", hunks: [], isBinary: !0 };
          const r = new Array();
          let i = 0;
          do {
            const e = this.parseHunk(i);
            r.push(e), (i += e.lines.length);
          } while (this.peek());
          return {
            header: n,
            contents: this.text
              .substring(t + 1, this.le)
              .replace(/\n\\ No newline at end of file/g, ""),
            hunks: r,
            isBinary: e.isBinary,
          };
        } finally {
          this.reset();
        }
      }
    }
    function ws(e) {
      return e.status.kind === io.Renamed || e.status.kind === io.Copied
        ? e.status.oldPath
        : e.path;
    }
    function bs(e, t) {
      return Ss(e, t).reduce((e, t) => e.concat([t.slice(1)]), new Array());
    }
    function Ss(e, t) {
      if (!1 === t.global)
        throw new Error(
          "A regex has been provided that is not marked as global, and has the potential to execute forever if it finds a match"
        );
      const n = new Array();
      let r = t.exec(e);
      for (; null !== r; ) n.push(r), (r = t.exec(e));
      return n;
    }
    const Cs = new Set([
      ".png",
      ".jpg",
      ".jpeg",
      ".gif",
      ".ico",
      ".webp",
      ".bmp",
    ]);
    async function Es(e, t, n, r = !1) {
      const i = [
        "log",
        n,
        ...(r ? ["-w"] : []),
        "-m",
        "-1",
        "--first-parent",
        "--patch-with-raw",
        "-z",
        "--no-color",
        "--",
        t.path,
      ];
      (t.status.kind !== io.Renamed && t.status.kind !== io.Copied) ||
        i.push(t.status.oldPath);
      const { output: o } = await fs(i, e.path, "getCommitDiff");
      return Ds(o, e, t, n);
    }
    async function ks(e, t) {
      const n = [
          "diff",
          "--no-ext-diff",
          "--patch-with-raw",
          "-z",
          "--no-color",
        ],
        r = new Set([0]);
      t.status.kind === io.New || t.status.kind === io.Untracked
        ? (r.add(1), n.push("--no-index", "--", "/dev/null", t.path))
        : t.status.kind === io.Renamed
        ? n.push("--", t.path)
        : n.push("HEAD", "--", t.path);
      const { output: i, error: o } = await fs(
        n,
        e.path,
        "getWorkingDirectoryDiff",
        r
      );
      return Ds(
        i,
        e,
        t,
        "HEAD",
        (function (e) {
          if (0 === e.length) return;
          const t = e.toString("utf-8"),
            n = Ts.exec(t);
          if (n) {
            const e = qi(n[1]),
              t = qi(n[2]);
            if (e && t) return { from: e, to: t };
          }
          return;
        })(o)
      );
    }
    async function xs(e, t, n) {
      let r = void 0,
        o = void 0;
      if (t instanceof bo) {
        if (t.status.kind === io.Conflicted) return { kind: Wi.Image };
        t.status.kind !== io.Deleted &&
          (r = await (async function (e, t) {
            const n = await (async function (e, t) {
              return new Promise((n, r) => {
                (t = t || { flag: "r" }),
                  _i.readFile(e, t, (e, t) => {
                    e ? r(e) : n(t);
                  });
              });
            })(i.join(e.path, t.path));
            return new Zi(
              n.toString("base64"),
              Rs(i.extname(t.path)),
              n.length
            );
          })(e, t)),
          t.status.kind !== io.New &&
            t.status.kind !== io.Untracked &&
            (o = await As(e, ws(t), "HEAD"));
      } else
        t.status.kind !== io.Deleted && (r = await As(e, t.path, n)),
          t.status.kind !== io.New &&
            t.status.kind !== io.Untracked &&
            (o = await As(e, ws(t), n + "^"));
      return { kind: Wi.Image, previous: o, current: r };
    }
    function Rs(e) {
      return ".png" === e
        ? "image/png"
        : ".jpg" === e || ".jpeg" === e
        ? "image/jpg"
        : ".gif" === e
        ? "image/gif"
        : ".ico" === e
        ? "image/x-icon"
        : ".webp" === e
        ? "image/webp"
        : ".bmp" === e
        ? "image/bmp"
        : "text/plain";
    }
    const Ts = /warning: (CRLF|CR|LF) will be replaced by (CRLF|CR|LF) in .*/;
    function Ds(e, t, n, r, o) {
      if (
        !(function (e) {
          return e.length <= 7e7;
        })(e)
      )
        return Promise.resolve({ kind: Wi.Unrenderable });
      const s = (function (e) {
        const t = e.toString("utf-8").split("\0");
        return new vs().parse(t[t.length - 1]);
      })(e);
      if (
        (function (e) {
          return e.length >= 4375e3;
        })(e) ||
        (function (e) {
          for (const t of e.hunks)
            for (const e of t.lines) if (e.text.length > 5e3) return !0;
          return !1;
        })(s)
      ) {
        const e = {
          kind: Wi.LargeText,
          text: s.contents,
          hunks: s.hunks,
          lineEndingsChange: o,
        };
        return Promise.resolve(e);
      }
      return (async function (e, t, n, r, o) {
        const s = i.extname(t.path).toLowerCase();
        return n.isBinary
          ? Cs.has(s)
            ? xs(e, t, r)
            : { kind: Wi.Binary }
          : {
              kind: Wi.Text,
              text: n.contents,
              hunks: n.hunks,
              lineEndingsChange: o,
            };
      })(t, n, s, r, o);
    }
    async function As(e, t, n) {
      const r = i.extname(t),
        o = await (async function (e, t, n) {
          const r = ["show", `${t}:${n}`],
            i = {
              successExitCodes: new Set([0, 1]),
              processCallback: (e) => {
                e.stdout && e.stdout.setEncoding("binary");
              },
            },
            o = await $o(r, e.path, "getBlobContents", i);
          return Buffer.from(o.stdout, "binary");
        })(e, n, t);
      return new Zi(o.toString("base64"), Rs(r), o.length);
    }
    async function _s(e, t) {
      const { output: n } = await fs(
          ["diff", "--numstat", "-z", t],
          e.path,
          "getBinaryPaths"
        ),
        r = bs(n.toString("utf8"), Ms);
      if (0 === r.length) return [];
      return r.reduce((e, t) => e.concat(t));
    }
    const Ms = /-\t-\t(?:\0.+\0)?([^\0]*)/gi;
    function Ps(e, t) {
      return `--- ${e ? "a/" + e : "/dev/null"}\n+++ ${
        t ? "b/" + t : "/dev/null"
      }\n`;
    }
    function Is(e, t, n, r, i) {
      return `@@ -${1 === t ? "" + e : `${e},${t}`} +${
        1 === r ? "" + n : `${n},${r}`
      } @@${(i = i ? " " + i : "")}\n`;
    }
    function Os(e, t) {
      let n = "";
      if (
        (t.hunks.forEach((t, r) => {
          let i = "",
            o = 0,
            s = 0,
            a = !1;
          t.lines.forEach((n, r) => {
            const l = t.unifiedDiffStart + r;
            if (n.type !== ji.Hunk) {
              if (n.type === ji.Context) (i += n.text + "\n"), o++, s++;
              else if (e.selection.isSelected(l))
                (i += n.text + "\n"),
                  n.type === ji.Add && s++,
                  n.type === ji.Delete && o++,
                  (a = !0);
              else {
                if (e.status.kind === io.New || e.status.kind === io.Untracked)
                  return;
                if (n.type === ji.Add) return;
                n.type === ji.Delete
                  ? ((i += ` ${n.text.substr(1)}\n`), o++, s++)
                  : X(n.type, "Unsupported line type " + n.type);
              }
              n.noTrailingNewLine && (i += "\\ No newline at end of file\n");
            }
          }),
            a &&
              ((n += Is(t.header.oldStartLine, o, t.header.newStartLine, s)),
              (n += i));
        }),
        !n.length)
      )
        throw (
          (log.debug("formatPatch: empty path for " + e.path),
          new Error("Could not generate a patch, no changes"))
        );
      return (
        (n =
          (function (e) {
            switch (e.status.kind) {
              case io.New:
              case io.Untracked:
                return Ps(null, e.path);
              case io.Renamed:
              case io.Deleted:
              case io.Modified:
              case io.Copied:
              case io.Conflicted:
                return Ps(e.path, e.path);
              default:
                return X(e.status, "Unknown file status " + e.status);
            }
          })(e) + n),
        n
      );
    }
    async function Ls(e, t) {
      if (t.status.kind === io.Renamed) {
        await $o(
          ["add", "--u", "--", t.status.oldPath],
          e.path,
          "applyPatchToIndex"
        );
        const n = await $o(
            ["ls-tree", "HEAD", "--", t.status.oldPath],
            e.path,
            "applyPatchToIndex"
          ),
          [r] = n.stdout.split("\t", 1),
          [i, , o] = r.split(" ", 3);
        await $o(
          ["update-index", "--add", "--cacheinfo", i, o, t.path],
          e.path,
          "applyPatchToIndex"
        );
      }
      const n = await ks(e, t);
      if (n.kind !== Wi.Text && n.kind !== Wi.LargeText) {
        const { kind: e } = n;
        switch (n.kind) {
          case Wi.Binary:
          case Wi.Image:
            throw new Error(
              "Can't create partial commit in binary file: " + t.path
            );
          case Wi.Unrenderable:
            throw new Error(
              "File diff is too large to generate a partial commit: " + t.path
            );
          default:
            X(0, "Unknown diff kind: " + e);
        }
      }
      const r = await Os(t, n);
      return (
        await $o(
          ["apply", "--cached", "--unidiff-zero", "--whitespace=nowarn", "-"],
          e.path,
          "applyPatchToIndex",
          { stdin: r }
        ),
        Promise.resolve()
      );
    }
    async function Fs(e, t, n, r) {
      const i = (function (e, t, n) {
        let r = "";
        return (
          t.hunks.forEach((e, t) => {
            let i = "",
              o = 0,
              s = 0,
              a = !1;
            e.lines.forEach((t, r) => {
              const l = e.unifiedDiffStart + r;
              if (t.type !== ji.Hunk) {
                if (t.type === ji.Context) (i += t.text + "\n"), o++, s++;
                else if (n.isSelected(l))
                  t.type === ji.Add
                    ? ((i += `-${t.text.substr(1)}\n`), s++)
                    : t.type === ji.Delete
                    ? ((i += `+${t.text.substr(1)}\n`), o++)
                    : X(t.type, "Unsupported line type " + t.type),
                    (a = !0);
                else if (t.type === ji.Add)
                  o++, s++, (i += ` ${t.text.substr(1)}\n`);
                else {
                  if (t.type === ji.Delete) return;
                  X(t.type, "Unsupported line type " + t.type);
                }
                t.noTrailingNewLine && (i += "\\ No newline at end of file\n");
              }
            }),
              a &&
                ((r += Is(e.header.newStartLine, s, e.header.oldStartLine, o)),
                (r += i));
          }),
          0 === r.length ? null : Ps(e, e) + r
        );
      })(t, n, r);
      if (null === i) return;
      await $o(
        ["apply", "--unidiff-zero", "--whitespace=nowarn", "-"],
        e.path,
        "discardChangesFromSelection",
        { stdin: i }
      );
    }
    function Ns(e) {
      return e.startsWith("heads/")
        ? "refs/" + e
        : e.startsWith("refs/heads/")
        ? e
        : "refs/heads/" + e;
    }
    async function Bs(e, t) {
      const n = await $o(["symbolic-ref", "-q", t], e.path, "getSymbolicRef", {
        successExitCodes: new Set([0, 1, 128]),
      });
      return 1 === n.exitCode || 128 === n.exitCode ? null : n.stdout.trim();
    }
    async function Hs(e, t, n, r, i) {
      await $o(["update-ref", t, r, n, "-m", i], e.path, "updateRef");
    }
    async function zs(e, t, n) {
      const r = ["update-ref", "-d", t];
      void 0 !== n && r.push("-m", n), await $o(r, e.path, "deleteRef");
    }
    async function Us(e) {
      const t = await $o(["remote", "-v"], e.path, "getRemotes", {
        expectedErrors: new Set([Bo.GitError.NotAGitRepository]),
      });
      if (t.gitError === Bo.GitError.NotAGitRepository) return [];
      return t.stdout
        .split("\n")
        .filter((e) => e.endsWith("(fetch)"))
        .map((e) => e.split(/\s+/))
        .map((e) => ({ name: e[0], url: e[1] }));
    }
    async function Ws(e, t, n) {
      return (
        await $o(["remote", "add", t, n], e.path, "addRemote"),
        { url: n, name: t }
      );
    }
    async function js(e, t) {
      const n = { successExitCodes: new Set([0, 128]) };
      await $o(["remote", "remove", t], e.path, "removeRemote", n);
    }
    async function Vs(e, t, n) {
      return await $o(["remote", "set-url", t, n], e.path, "setRemoteURL"), !0;
    }
    const Gs = new Set([
      Bo.GitError.HTTPSAuthenticationFailed,
      Bo.GitError.SSHAuthenticationFailed,
      Bo.GitError.HTTPSRepositoryNotFound,
      Bo.GitError.SSHRepositoryNotFound,
    ]);
    function $s() {
      return i.resolve(__dirname, "static", "ask-pass-trampoline.bat");
    }
    function qs() {
      return "1" === process.env.GITHUB_DESKTOP_PREVIEW_FEATURES || !1;
    }
    function Ks() {
      return qs();
    }
    function Ys() {
      return qs();
    }
    function Qs(e, t) {
      switch (e.toLowerCase()) {
        case "proxy":
        case "http":
          return "http://" + t;
        case "https":
          return "https://" + t;
        case "socks":
        case "socks4":
          return "socks4://" + t;
        case "socks5":
          return "socks5://" + t;
      }
      return null;
    }
    async function Zs(e) {
      const t = (function (e) {
        if ("DIRECT" === e) return null;
        const t = e.trim().split(/\s*;\s*/),
          n = new Array();
        for (const e of t) {
          if (e.match(/^direct/i)) break;
          const [t, r] = e.split(/\s+/, 2);
          if (void 0 !== r) {
            const i = Qs(t, r);
            null !== i ? n.push(i) : log.warn("Skipping proxy spec: " + e);
          }
        }
        return n.length > 0 ? n : null;
      })(
        await r.remote.session.defaultSession
          .resolveProxy(e)
          .catch(
            (t) => (log.error(`Failed resolving proxy for '${e}'`, t), "DIRECT")
          )
      );
      if (null !== t)
        for (const e of t) {
          if (!e.startsWith("https://")) return e;
          log.warn("ignoring https proxy, not supported in cURL/schannel");
        }
    }
    function Xs(e, t) {
      return null !== e
        ? e.endpoint === gt()
          ? "https://github.com"
          : e.endpoint
        : null !== t.gitHubRepository && null !== t.gitHubRepository.cloneURL
        ? t.gitHubRepository.cloneURL
        : "https://github.com";
    }
    async function Js(e, t) {
      return Object.assign(
        Object.assign(
          {},
          (function (e) {
            const t = {
              DESKTOP_PATH: process.execPath,
              DESKTOP_ASKPASS_SCRIPT: i.resolve(__dirname, "ask-pass.js"),
              GIT_ASKPASS: $s(),
              GIT_TERMINAL_PROMPT: "0",
              GIT_TRACE: localStorage.getItem("git-trace") || "0",
            };
            return e
              ? Object.assign(Object.assign({}, t), {
                  DESKTOP_USERNAME: e.login,
                  DESKTOP_ENDPOINT: e.endpoint,
                })
              : t;
          })(e)
        ),
        await (async function (e, t = process.env, n = Zs) {
          0;
          const r = /^(https?):\/\//i.exec(e);
          if (null === r) return;
          const i = r[1].toLowerCase();
          if ("ALL_PROXY" in t || "all_proxy" in t)
            return void log.info(
              "proxy url not resolved, ALL_PROXY already set"
            );
          const o = i + "_proxy";
          if (o in t || ("https" === i && "HTTPS_PROXY" in t))
            return void log.info(`proxy url not resolved, ${o} already set`);
          const s = await n(e).catch((e) => {
            log.error("Failed resolving Git proxy", e);
          });
          return void 0 === s ? void 0 : { [o]: s };
        })(t)
      );
    }
    async function ea(e, t) {
      return await $o(["branch", "-D", t], e.path, "deleteLocalBranch"), !0;
    }
    async function ta(e, t, n, r) {
      t.type === Ri.Local && (await ea(e, t.name));
      const i = t.remote;
      if (r && i) {
        const r = await Zo(e, n),
          o =
            (await (async function (e, t) {
              const n = await $o(
                ["remote", "get-url", t],
                e.path,
                "getRemoteURL",
                { successExitCodes: new Set([0, 128]) }
              );
              return 0 !== n.exitCode ? null : n.stdout;
            })(e, i).catch(
              (e) => (
                log.error("Could not resolve remote url for remote " + i, e),
                null
              )
            )) || Xs(n, e),
          s = [...r, "push", i, ":" + t.nameWithoutRemote];
        if (
          (
            await $o(s, e.path, "deleteRemoteBranch", {
              env: await Js(n, o),
              expectedErrors: new Set([Bo.GitError.BranchDeletionFailed]),
            })
          ).gitError === Bo.GitError.BranchDeletionFailed
        ) {
          const n = `refs/remotes/${i}/${t.nameWithoutRemote}`;
          await zs(e, n);
        }
      }
      return !0;
    }
    class na {
      constructor(e) {
        if (((this.stepIndex = 0), (this.lastPercent = 0), !e.length))
          throw new Error("must specify at least one step");
        const t = e.reduce((e, t) => e + t.weight, 0);
        this.steps = e.map((e) => ({ title: e.title, weight: e.weight / t }));
      }
      parse(e) {
        const t = (function (e) {
          const t = e.lastIndexOf(": ");
          if (0 === t) return null;
          if (t - 2 >= e.length) return null;
          const n = e.substr(0, t),
            r = e.substr(n.length + 2).trim();
          if (!r.length) return null;
          const i = r.split(", ");
          if (!i.length) return null;
          let o,
            s = void 0,
            a = void 0;
          if (ia.test(i[0])) {
            if (((o = parseInt(i[0], 10)), isNaN(o))) return null;
          } else {
            const e = ra.exec(i[0]);
            if (!e || 4 !== e.length) return null;
            if (
              ((a = parseInt(e[1], 10)),
              (o = parseInt(e[2], 10)),
              (s = parseInt(e[3], 10)),
              isNaN(a) || isNaN(o) || isNaN(s))
            )
              return null;
          }
          let l = !1;
          for (let e = 1; e < i.length; e++)
            if ("done." === i[e]) {
              l = !0;
              break;
            }
          return { title: n, value: o, percent: a, total: s, done: l, text: e };
        })(e);
        if (!t) return { kind: "context", text: e, percent: this.lastPercent };
        let n = 0;
        for (let e = 0; e < this.steps.length; e++) {
          const r = this.steps[e];
          if (e >= this.stepIndex && t.title === r.title)
            return (
              t.total && (n += r.weight * (t.value / t.total)),
              (this.stepIndex = e),
              (this.lastPercent = n),
              { kind: "progress", percent: n, details: t }
            );
          n += r.weight;
        }
        return { kind: "context", text: e, percent: this.lastPercent };
      }
    }
    const ra = /^(\d{1,3})% \((\d+)\/(\d+)\)$/,
      ia = /^\d+$/;
    const oa = [{ title: "Checking out files", weight: 1 }];
    class sa extends na {
      constructor() {
        super(oa);
      }
    }
    const aa = [
      { title: "remote: Compressing objects", weight: 0.1 },
      { title: "Receiving objects", weight: 0.6 },
      { title: "Resolving deltas", weight: 0.1 },
      { title: "Checking out files", weight: 0.2 },
    ];
    class la extends na {
      constructor() {
        super(aa);
      }
    }
    const ca = [
      { title: "Compressing objects", weight: 0.2 },
      { title: "Writing objects", weight: 0.7 },
      { title: "remote: Resolving deltas", weight: 0.1 },
    ];
    class ua extends na {
      constructor() {
        super(ca);
      }
    }
    const ha = [
      { title: "remote: Compressing objects", weight: 0.1 },
      { title: "Receiving objects", weight: 0.7 },
      { title: "Resolving deltas", weight: 0.2 },
    ];
    class da extends na {
      constructor() {
        super(ha);
      }
    }
    const pa = [
      { title: "remote: Compressing objects", weight: 0.1 },
      { title: "Receiving objects", weight: 0.7 },
      { title: "Resolving deltas", weight: 0.15 },
      { title: "Checking out files", weight: 0.15 },
    ];
    class fa extends na {
      constructor() {
        super(pa);
      }
    }
    const ma = ["B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"];
    function ga(e, t = 0, n = !0) {
      if (!Number.isFinite(e)) return "" + e;
      const r = Math.floor(Math.log(Math.abs(e)) / Math.log(1024)),
        i = (function (e, t) {
          if (t <= 0) return Math.round(e);
          const n = Math.pow(10, t);
          return Math.round((e + Number.EPSILON) * n) / n;
        })(e / Math.pow(1024, r), t);
      return `${n ? i.toFixed(t) : i} ${ma[r]}`;
    }
    async function ya() {
      const e = await (async function (e) {
        const t = i.join(Me.tmpdir(), e + "-"),
          n = await _i.mkdtemp(t);
        return i.join(n, e);
      })("GitHubDesktop-lfs-progress");
      return await _i.ensureFile(e), e;
    }
    const va = /^(.+?)\s{1}(\d+)\/(\d+)\s{1}(\d+)\/(\d+)\s{1}(.+)$/;
    class wa {
      constructor() {
        this.files = new Map();
      }
      parse(e) {
        const t = e.match(va);
        if (!t || 7 !== t.length)
          return { kind: "context", percent: 0, text: e };
        const n = t[1],
          r = parseInt(t[3], 10),
          i = parseInt(t[4], 10),
          o = parseInt(t[5], 10),
          s = t[6];
        if (isNaN(r) || isNaN(i) || isNaN(o))
          return { kind: "context", percent: 0, text: e };
        this.files.set(s, { transferred: i, size: o, done: i === o });
        let a = 0,
          l = 0,
          c = 0;
        const u = Math.max(r, this.files.size);
        for (const e of this.files.values())
          (a += e.transferred), (l += e.size), (c += e.done ? 1 : 0);
        const h = `${ga(a, 1)} / ${ga(l, 1)}`,
          d = this.directionToHumanFacingVerb(n);
        return {
          kind: "progress",
          percent: 0,
          details: {
            title: `${d} "${s}"`,
            value: a,
            total: l,
            percent: 0,
            done: !1,
            text: `${d} ${s} (${c} out of an estimated ${u} completed, ${h})`,
          },
        };
      }
      directionToHumanFacingVerb(e) {
        switch (e) {
          case "download":
            return "Downloading";
          case "upload":
            return "Uploading";
          case "checkout":
            return "Checking out";
          default:
            return "Downloading";
        }
      }
    }
    async function ba(e, t, n) {
      let r = null,
        i = {};
      if (e.trackLFSProgress)
        try {
          (r = await ya()), (i = { GIT_LFS_PROGRESS: r });
        } catch (e) {
          log.error("Error writing LFS progress file", e),
            (i = { GIT_LFS_PROGRESS: null });
        }
      return yi(e, { processCallback: Sa(t, r, n), env: yi(e.env, i) });
    }
    function Sa(e, t, n) {
      return (r) => {
        let s = !1;
        if (t) {
          const e = new wa(),
            a = (function (e, t) {
              const n = new hs(e),
                r = n.onError((t) => {
                  log.warn("Unable to tail path: " + e, t);
                }),
                i = n.onDataAvailable((e) => {
                  ps()(e).on("data", (e) => {
                    if (i.disposed) return;
                    const n = e.toString();
                    t(n);
                  });
                });
              return (
                n.start(),
                new ie.Disposable(() => {
                  i.dispose(), r.dispose(), n.stop();
                })
              );
            })(t, (t) => {
              const r = e.parse(t);
              "progress" === r.kind && ((s = !0), n(r));
            });
          r.on("close", () => {
            a.dispose(),
              o.unlink(t, (e) => {
                if (null == e) {
                  const e = i.dirname(t);
                  o.rmdir(e, () => {});
                }
              });
          });
        }
        r.stderr &&
          ps()(r.stderr).on("data", (t) => {
            const r = e.parse(t);
            if (s) {
              if ("context" === r.kind) return;
              const { title: e, done: t } = r.details;
              if ("Filtering content" === e) return void (t && (s = !1));
            }
            n(r);
          });
      };
    }
    async function Ca(e, t, n, r) {
      let i = { env: await Js(t, Xs(t, e)), expectedErrors: Gs };
      if (r) {
        const e = "Checking out branch " + n.name,
          t = "checkout",
          o = n.name;
        (i = await ba(
          Object.assign(Object.assign({}, i), { trackLFSProgress: !0 }),
          new sa(),
          (n) => {
            if ("progress" === n.kind) {
              const i = n.details.text,
                s = n.percent;
              r({
                kind: t,
                title: e,
                description: i,
                value: s,
                targetBranch: o,
              });
            }
          }
        )),
          r({ kind: t, title: e, value: 0, targetBranch: o });
      }
      const o = await (async function (e, t, n, r) {
        const i = await Zo(e, n),
          o = null != r ? [...i, "checkout", "--progress"] : [...i, "checkout"];
        return Ks()
          ? t.type === Ri.Remote
            ? o.concat(
                t.name,
                "-b",
                t.nameWithoutRemote,
                "--recurse-submodules",
                "--"
              )
            : o.concat(t.name, "--recurse-submodules", "--")
          : t.type === Ri.Remote
          ? o.concat(t.name, "-b", t.nameWithoutRemote, "--")
          : o.concat(t.name, "--");
      })(e, n, t, r);
      return await $o(o, e.path, "checkoutBranch", i), !0;
    }
    async function Ea(e, t, n = {}) {
      if (0 === t.length) return;
      const r = ["update-index"];
      !1 !== n.add && r.push("--add"),
        (!1 === n.remove && !0 !== n.forceRemove) || r.push("--remove"),
        n.forceRemove && r.push("--force-remove"),
        !1 !== n.replace && r.push("--replace"),
        r.push("-z", "--stdin"),
        await $o(r, e.path, "updateIndex", { stdin: t.join("\0") });
    }
    async function ka(e, t) {
      const n = [],
        r = [],
        i = [],
        o = [];
      for (const e of t)
        e.selection.getSelectionType() === Vi.All
          ? (n.push(e.path),
            e.status.kind === io.Renamed
              ? r.push(e.status.oldPath)
              : e.status.kind === io.Deleted && o.push(e.path))
          : i.push(e);
      await Ea(e, r, { forceRemove: !0 }),
        await Ea(e, n),
        await Ea(e, o, { forceRemove: !0 });
      for (const t of i) await Ls(e, t);
    }
    function xa(e, t) {
      switch (e) {
        case 0:
          return ["reset", "--hard", t];
        case 2:
          return ["reset", t];
        case 1:
          return ["reset", "--soft", t];
        default:
          return X(0, "Unknown reset mode: " + e);
      }
    }
    var Ra;
    async function Ta(e, t, n) {
      const { status: r } = t;
      if (!go(r))
        return void log.error(
          `tried to manually resolve unconflicted file (${t.path})`
        );
      if (yo(r) && 0 === r.conflictMarkerCount) return;
      const i = n === Ra.theirs ? r.entry.them : r.entry.us,
        o = r.entry.us === ro.Added && r.entry.them === ro.Added;
      switch (
        ((i === ro.UpdatedButUnmerged || o) &&
          (await (async function (e, t, n) {
            await $o(
              ["checkout", "--" + n, "--", t.path],
              e.path,
              "checkoutConflictedFile"
            );
          })(e, t, n)),
        i)
      ) {
        case ro.Deleted:
          return (async function (e, t) {
            await $o(["rm", "--", t.path], e.path, "removeConflictedFile");
          })(e, t);
        case ro.Added:
        case ro.UpdatedButUnmerged:
          return (async function (e, t) {
            await $o(["add", "--", t.path], e.path, "addConflictedFile");
          })(e, t);
        default:
          X(0, "unaccounted for git status entry possibility");
      }
    }
    async function Da(e, t, n) {
      await (async function (e) {
        return await $o(["reset", "--", "."], e.path, "unstageAll"), !0;
      })(e),
        await ka(e, n);
      try {
        return Xo(
          await $o(["commit", "-F", "-"], e.path, "createCommit", { stdin: t })
        );
      } catch (e) {
        return void Aa(e);
      }
    }
    function Aa(e) {
      if (e instanceof Go) {
        const t = e.result.stderr.trim(),
          n = t.length > 0 ? `, with output: '${t}'` : "",
          { exitCode: r } = e.result,
          i = new Error(`Commit failed - exit code ${r} received${n}`);
        throw ((i.name = "commit-failed"), i);
      }
      throw e;
    }
    !(function (e) {
      (e.theirs = "theirs"), (e.ours = "ours");
    })(Ra || (Ra = {}));
    async function _a(e, t, n, r) {
      let i = { successExitCodes: new Set([0]), env: await Js(t, n.url) };
      if (r) {
        const e = "获取更新中 " + n.name,
          t = "fetch";
        (i = await ba(
          Object.assign(Object.assign({}, i), { trackLFSProgress: !0 }),
          new da(),
          (i) => {
            if (
              "context" === i.kind &&
              !i.text.startsWith("remote: Counting objects")
            )
              return;
            const o = "progress" === i.kind ? i.details.text : i.text,
              s = i.percent;
            r({ kind: t, title: e, description: o, value: s, remote: n.name });
          }
        )),
          r({ kind: t, title: e, value: 0, remote: n.name });
      }
      const o = await (async function (e, t, n, r) {
        const i = await Zo(e, n);
        return Ks()
          ? null != r
            ? [
                ...i,
                "fetch",
                "--progress",
                "--prune",
                "--recurse-submodules=on-demand",
                t,
              ]
            : [...i, "fetch", "--prune", "--recurse-submodules=on-demand", t]
          : null != r
          ? [...i, "fetch", "--progress", "--prune", t]
          : [...i, "fetch", "--prune", t];
      })(e, n.name, t, r);
      await $o(o, e.path, "fetch", i);
    }
    async function Ma(e, t, n, r) {
      const i = {
          successExitCodes: new Set([0, 128]),
          env: await Js(t, n.url),
        },
        o = [...(await Zo(e, t)), "fetch", n.name, r];
      await $o(o, e.path, "fetchRefspec", i);
    }
    class Pa {
      constructor(e, t, n, r = new Date().getTimezoneOffset()) {
        (this.name = e), (this.email = t), (this.date = n), (this.tzOffset = r);
      }
      static parseIdentity(e) {
        const t = e.match(/^(.*?) <(.*?)> (\d+) (\+|-)?(\d{2})(\d{2})/);
        if (!t) return null;
        const n = t[1],
          r = t[2],
          i = new Date(1e3 * parseInt(t[3], 10)),
          o = "-" === t[4] ? "-" : "+",
          s = t[5],
          a = t[6],
          l = 60 * parseInt(s, 10) + parseInt(a, 10);
        return new Pa(n, r, i, l * ("-" === o ? -1 : 1));
      }
    }
    async function Ia(e, ...t) {
      const n = String.fromCharCode(parseInt("1F", 16)),
        r = [
          "%(refname)",
          "%(refname:short)",
          "%(upstream:short)",
          "%(objectname)",
          "%(objectname:short)",
          "%(author)",
          "%(committer)",
          "%(symref)",
          "%1F",
        ].join("%00");
      (t && t.length) || (t = ["refs/heads", "refs/remotes"]);
      const i = await $o(
        ["for-each-ref", "--format=" + r, ...t],
        e.path,
        "getBranches",
        { expectedErrors: new Set([Bo.GitError.NotAGitRepository]) }
      );
      if (i.gitError === Bo.GitError.NotAGitRepository) return [];
      const o = i.stdout.split(n);
      if ((o.splice(-1, 1), 0 === o.length)) return [];
      const s = [];
      for (const [e, t] of o.entries()) {
        const n = (e > 0 ? t.substr(1) : t).split("\0"),
          r = n[0],
          i = n[1],
          o = n[2],
          a = n[3],
          l = n[4],
          c = n[5],
          u = Pa.parseIdentity(c);
        if (!u) throw new Error(`Couldn't parse author identity for '${l}'`);
        const h = n[6];
        if (!Pa.parseIdentity(h))
          throw new Error(`Couldn't parse committer identity for '${l}'`);
        const d = n[7],
          p = { sha: a, author: u },
          f = r.startsWith("refs/head") ? Ri.Local : Ri.Remote;
        d.length > 0 ||
          r.startsWith("refs/remotes/github-desktop-") ||
          s.push(new Hi(i, o.length > 0 ? o : null, p, f));
      }
      return s;
    }
    class Oa {
      constructor(e, t) {
        (this.name = e), (this.email = t);
      }
      static parse(e) {
        const t = e.match(/^(.*?)\s+<(.*?)>/);
        return null === t ? null : new Oa(t[1], t[2]);
      }
      toString() {
        return `${this.name} <${this.email}>`;
      }
    }
    class La {
      constructor(e, t, n, r, i, o, s, a, l) {
        (this.sha = e),
          (this.shortSha = t),
          (this.summary = n),
          (this.body = r),
          (this.author = i),
          (this.committer = o),
          (this.parentSHAs = s),
          (this.trailers = a),
          (this.tags = l),
          (this.coAuthors = (function (e) {
            const t = [];
            for (const n of e)
              if (Jo(n)) {
                const e = Oa.parse(n.value);
                e && t.push(e);
              }
            return t;
          })(a)),
          (this.authoredByCommitter =
            this.author.name === this.committer.name &&
            this.author.email === this.committer.email);
      }
    }
    function Fa(e, t) {
      const n = e.trim();
      return "M" === n
        ? { kind: io.Modified }
        : "A" === n
        ? { kind: io.New }
        : "?" === n
        ? { kind: io.Untracked }
        : "D" === n
        ? { kind: io.Deleted }
        : "R" === n && null != t
        ? { kind: io.Renamed, oldPath: t }
        : "C" === n && null != t
        ? { kind: io.Copied, oldPath: t }
        : n.match(/R[0-9]+/) && null != t
        ? { kind: io.Renamed, oldPath: t }
        : n.match(/C[0-9]+/) && null != t
        ? { kind: io.Copied, oldPath: t }
        : { kind: io.Modified };
    }
    async function Na(e, t, n, r = []) {
      const i = String.fromCharCode(parseInt("1F", 16)),
        o = [
          "%H",
          "%h",
          "%s",
          "%b",
          "%an <%ae> %ad",
          "%cn <%ce> %cd",
          "%P",
          "%(trailers:unfold,only)",
          "%D",
        ].join("%x1F"),
        s = await $o(
          [
            "log",
            t,
            "--date=raw",
            "--max-count=" + n,
            "--pretty=" + o,
            "-z",
            "--no-show-signature",
            "--no-color",
            ...r,
            "--",
          ],
          e.path,
          "getCommits",
          { successExitCodes: new Set([0, 128]) }
        );
      if (128 === s.exitCode) return new Array();
      const a = s.stdout.split("\0");
      if ((a.splice(-1, 1), 0 === a.length)) return [];
      const l = await ns(e);
      return a.map((e) => {
        const t = e.split(i),
          n = t[0],
          r = t[1],
          o = t[2],
          s = t[3],
          a = t[4],
          c = t[5],
          u = t[6],
          h = u.length ? u.split(" ") : [],
          d = es(t[7], l),
          p = bs(t[8], /tag: ([^\s,]+)/g)
            .filter((e) => void 0 !== e[0])
            .map((e) => e[0]),
          f = Pa.parseIdentity(a);
        if (!f) throw new Error(`Couldn't parse author identity for '${r}'`);
        const m = Pa.parseIdentity(c);
        if (!m) throw new Error(`Couldn't parse committer identity for '${r}'`);
        return new La(n, r, o, s, f, m, h, d, p);
      });
    }
    function Ba(e, t) {
      const n = e.split("\0");
      n.splice(-1, 1);
      const r = [];
      for (let e = 0; e < n.length; e++) {
        const i = n[e];
        let o = void 0;
        i.length > 0 && ("R" === i[0] || "C" === i[0]) && (o = n[++e]);
        const s = Fa(i, o),
          a = n[++e];
        r.push(new So(a, s, t));
      }
      return r;
    }
    async function Ha(e, t) {
      const n = await Na(e, t, 1);
      return n.length < 1 ? null : n[0];
    }
    async function za(e, t, n, r) {
      let i = { env: await Js(t, n.url), expectedErrors: Gs };
      if (r) {
        const e = "Pulling " + n.name,
          t = "pull";
        (i = await ba(
          Object.assign(Object.assign({}, i), { trackLFSProgress: !0 }),
          new fa(),
          (i) => {
            if (
              "context" === i.kind &&
              !i.text.startsWith("remote: Counting objects")
            )
              return;
            const o = "progress" === i.kind ? i.details.text : i.text,
              s = i.percent;
            r({ kind: t, title: e, description: o, value: s, remote: n.name });
          }
        )),
          r({ kind: t, title: e, value: 0, remote: n.name });
      }
      const o = await (async function (e, t, n, r) {
          const i = [...(await Zo(e, n)), "-c", "rebase.backend=merge", "pull"];
          return (
            Ks() && i.push("--recurse-submodules"),
            null != r && i.push("--progress"),
            i.push(t),
            i
          );
        })(e, n.name, t, r),
        s = await $o(o, e.path, "pull", i);
      if (s.gitErrorDescription) throw new Go(s, o);
    }
    const Ua = new RegExp(
      "fatal: your current branch '.*' does not have any commits yet"
    );
    function Wa(e, t) {
      return `${e}..${t}`;
    }
    function ja(e, t) {
      return `${e}...${t}`;
    }
    async function Va(e, t) {
      const n = ["rev-list", "--left-right", "--count", t, "--"],
        r = await $o(n, e.path, "getAheadBehind", {
          expectedErrors: new Set([Bo.GitError.BadRevision]),
        });
      if (r.gitError === Bo.GitError.BadRevision) return null;
      const i = r.stdout.split("\t");
      if (2 !== i.length) return null;
      const o = parseInt(i[0], 10);
      if (isNaN(o)) return null;
      const s = parseInt(i[1], 10);
      return isNaN(s) ? null : { ahead: o, behind: s };
    }
    async function Ga(e, t) {
      if (t.type === Ri.Remote) return null;
      const n = t.upstream;
      if (!n) return null;
      return Va(e, ja(t.name, n));
    }
    async function $a(e, t, n) {
      const r = [
          "rev-list",
          Wa(t, n),
          "--reverse",
          "--oneline",
          "--no-abbrev-commit",
          "--",
        ],
        i = { expectedErrors: new Set([Bo.GitError.BadRevision]) },
        o = await $o(r, e.path, "getCommitsInRange", i);
      if (o.gitError === Bo.GitError.BadRevision)
        return (
          log.warn(
            "Unable to rebase these branches because one or both of the refs do not exist in the repository"
          ),
          null
        );
      const s = o.stdout.split("\n"),
        a = new Array(),
        l = /^([a-z0-9]{40}) (.*)$/;
      for (const e of s) {
        const t = l.exec(e);
        if (null !== t && 3 === t.length) {
          const e = t[1],
            n = t[2];
          a.push({ sha: e, summary: n });
        }
      }
      return a;
    }
    async function qa(e) {
      let t;
      try {
        t = await $o(
          ["rev-parse", "--show-cdup"],
          e,
          "getTopLevelWorkingDirectory",
          { successExitCodes: new Set([0, 128]) }
        );
      } catch (e) {
        if (e.code === Bo.RepositoryDoesNotExistErrorCode) return null;
        throw e;
      }
      if (128 === t.exitCode) return null;
      const n = t.stdout.trim();
      return n ? i.resolve(e, n) : e;
    }
    async function Ka(e) {
      try {
        return (
          "true" ===
          (
            await $o(
              ["rev-parse", "--is-bare-repository"],
              e,
              "isBareRepository"
            )
          ).stdout.trim()
        );
      } catch (e) {
        if (e.message.includes("not a git repository")) return !1;
        throw e;
      }
    }
    async function Ya(e) {
      return null !== (await qa(e));
    }
    async function Qa(e) {
      const { output: t } = await fs(
          ["diff", "--check"],
          e,
          "getFilesWithConflictMarkers",
          new Set([0, 2])
        ),
        n = bs(t.toString("utf8"), Za);
      if (0 === n.length) return new Map();
      return n
        .reduce((e, t) => e.concat(t))
        .reduce((e, t) => e.set(t, (e.get(t) || 0) + 1), new Map());
    }
    const Za = /(.+):\d+: leftover conflict marker/gi;
    var Xa = n(128),
      Ja = n.n(Xa);
    function el(e) {
      return "header" === e.kind;
    }
    function tl(e) {
      return "entry" === e.kind;
    }
    const nl = /^1 ([MADRCUTX?!.]{2}) (N\.\.\.|S[C.][M.][U.]) (\d+) (\d+) (\d+) ([a-f0-9]+) ([a-f0-9]+) ([\s\S]*?)$/;
    function rl(e) {
      const t = nl.exec(e);
      if (!t)
        throw (
          (log.debug("parseChangedEntry parse error: " + e),
          new Error("Failed to parse status line for changed entry"))
        );
      return { kind: "entry", statusCode: t[1], path: t[8] };
    }
    const il = /^2 ([MADRCUTX?!.]{2}) (N\.\.\.|S[C.][M.][U.]) (\d+) (\d+) (\d+) ([a-f0-9]+) ([a-f0-9]+) ([RC]\d+) ([\s\S]*?)$/;
    function ol(e, t) {
      const n = il.exec(e);
      if (!n)
        throw (
          (log.debug("parsedRenamedOrCopiedEntry parse error: " + e),
          new Error("Failed to parse status line for renamed or copied entry"))
        );
      if (!t)
        throw new Error(
          "Failed to parse renamed or copied entry, could not parse old path"
        );
      return { kind: "entry", statusCode: n[1], oldPath: t, path: n[9] };
    }
    const sl = /^u ([DAU]{2}) (N\.\.\.|S[C.][M.][U.]) (\d+) (\d+) (\d+) (\d+) ([a-f0-9]+) ([a-f0-9]+) ([a-f0-9]+) ([\s\S]*?)$/;
    function al(e) {
      const t = sl.exec(e);
      if (!t)
        throw (
          (log.debug("parseUnmergedEntry parse error: " + e),
          new Error("Failed to parse status line for unmerged entry"))
        );
      return { kind: "entry", statusCode: t[1], path: t[10] };
    }
    function ll(e) {
      return { kind: "entry", statusCode: "??", path: e.substr(2) };
    }
    var cl;
    function ul(e, t, n) {
      const r = e || { context: t, diff: "" },
        i = { sha: n.sha, mode: n.mode, path: n.path };
      switch (n.type) {
        case "base":
          return Object.assign(Object.assign({}, r), { base: i });
        case "result":
          return Object.assign(Object.assign({}, r), { result: i });
        case "our":
          return Object.assign(Object.assign({}, r), { our: i });
        case "their":
          return Object.assign(Object.assign({}, r), { their: i });
        default:
          return r;
      }
    }
    !(function (e) {
      (e.Loading = "loading"),
        (e.Clean = "clean"),
        (e.Conflicts = "conflicts"),
        (e.Invalid = "invalid");
    })(cl || (cl = {}));
    const hl = /^(merged|added in remote|removed in remote|changed in both|removed in local|added in both)$/,
      dl = /^\s{2}(result|our|their|base)\s+(\d{6})\s([0-9a-f]{40})\s(.+)$/;
    var pl;
    !(function (e) {
      (e[(e.Success = 0)] = "Success"),
        (e[(e.AlreadyUpToDate = 1)] = "AlreadyUpToDate"),
        (e[(e.Failed = 2)] = "Failed");
    })(pl || (pl = {}));
    const fl = "Already up to date.\n";
    async function ml(e, t, n) {
      const r = await $o(["merge-base", t, n], e.path, "merge-base", {
        successExitCodes: new Set([0, 1, 128]),
      });
      return 1 === r.exitCode || 128 === r.exitCode ? null : r.stdout.trim();
    }
    async function gl(e, t, n) {
      const r = await ml(e, t.tip.sha, n.tip.sha);
      if (null === r) return { kind: cl.Invalid };
      if (r === t.tip.sha || r === n.tip.sha)
        return { kind: cl.Clean, entries: [] };
      const i = (
        await fs(["merge-tree", r, t.tip.sha, n.tip.sha], e.path, "mergeTree")
      ).output.toString();
      return 0 === i.length
        ? { kind: cl.Clean, entries: [] }
        : (function (e) {
            const t = new Array(),
              n = e.split("\n");
            let r, i;
            for (let e = 0; e < n.length; e++) {
              const o = n[e],
                s = hl.exec(o);
              if (null != s) {
                (r = s[1]), null != i && (t.push(i), (i = void 0));
                continue;
              }
              const a = dl.exec(o);
              if (null == a) {
                if (null == i)
                  throw new Error(
                    "invalid state - trying to append the diff to a merge entry that isn't defined on line " +
                      e
                  );
                {
                  const e = i.diff + o + "\n";
                  i = Object.assign(Object.assign({}, i), { diff: e });
                  (o.startsWith("+<<<<<<<") ||
                    o.startsWith("+=======") ||
                    o.startsWith("+>>>>>>>")) &&
                    (i = Object.assign(Object.assign({}, i), {
                      hasConflicts: !0,
                    }));
                }
              } else {
                const t = a[1],
                  n = { type: t, mode: a[2], sha: a[3], path: a[4] };
                if (null == r) {
                  log.warn(
                    "An unknown header was set while trying to parse the blob on line " +
                      e
                  );
                  continue;
                }
                switch (t) {
                  case "base":
                  case "result":
                  case "our":
                  case "their":
                    i = ul(i, r, n);
                    break;
                  default:
                    throw new Error(
                      `invalid state - unexpected entry ${t} found when parsing rows`
                    );
                }
              }
            }
            null != i && (t.push(i), (i = void 0));
            const o = t.filter((e) => e.hasConflicts || !1);
            return o.length > 0
              ? { kind: cl.Conflicts, conflictedFiles: o.length }
              : { kind: cl.Clean, entries: t };
          })(i);
    }
    function yl(e, t, n) {
      return e < t ? t : e > n ? n : e;
    }
    function vl(e) {
      return { kind: "ShowConflicts", conflictState: e };
    }
    function wl(e) {
      return Math.round(100 * yl(e, 0, 1)) / 100;
    }
    function bl(e, t) {
      if (null === t) return !1;
      const { tip: n, rebasedBranches: r } = e,
        { ahead: i, behind: o } = t;
      let s = !1;
      if (n.kind === so.Valid) {
        const e = n.branch.nameWithoutRemote,
          { sha: t } = n.branch.tip;
        s = r.get(e) === t;
      }
      return s && o > 0 && i > 0;
    }
    var Sl;
    function Cl(e) {
      const t = i.join(e.path, ".git", "REBASE_HEAD");
      return _i.pathExists(t);
    }
    async function El(e) {
      if (!(await Cl(e))) return null;
      let t = -1,
        n = -1,
        r = null,
        o = null;
      try {
        const s = await _i.readFile(
          i.join(e.path, ".git", "rebase-merge", "msgnum"),
          "utf8"
        );
        (t = parseInt(s, 10)),
          isNaN(t) &&
            (log.warn(
              `[getCurrentProgress] found '${s}' in .git/rebase-merge/msgnum which could not be parsed to a valid number`
            ),
            (t = -1));
        const a = await _i.readFile(
          i.join(e.path, ".git", "rebase-merge", "end"),
          "utf8"
        );
        (n = parseInt(a, 10)),
          isNaN(n) &&
            (log.warn(
              `[getCurrentProgress] found '${a}' in .git/rebase-merge/last which could not be parsed to a valid number`
            ),
            (n = -1)),
          (r = await _i.readFile(
            i.join(e.path, ".git", "rebase-merge", "orig-head"),
            "utf8"
          )),
          (r = r.trim()),
          (o = await _i.readFile(
            i.join(e.path, ".git", "rebase-merge", "onto"),
            "utf8"
          )),
          (o = o.trim());
      } catch (e) {}
      if (t > 0 && n > 0 && null !== r && null !== o) {
        const i = wl(t / n),
          s = await $a(e, o, r);
        if (null === s || 0 === s.length) return null;
        const a = t - 1;
        return {
          progress: {
            value: i,
            rebasedCommitCount: t,
            totalCommitCount: n,
            currentCommitSummary:
              s.length > 0 && a >= 0 && a <= s.length ? s[a].summary : null,
          },
          commits: s,
        };
      }
      return null;
    }
    !(function (e) {
      (e.CompletedWithoutError = "CompletedWithoutError"),
        (e.ConflictsEncountered = "ConflictsEncountered"),
        (e.OutstandingFilesNotStaged = "OutstandingFilesNotStaged"),
        (e.Aborted = "Aborted"),
        (e.Error = "Error");
    })(Sl || (Sl = {}));
    const kl = /^Rebasing \((\d+)\/(\d+)\)$/;
    class xl {
      constructor(e) {
        this.commits = e;
      }
      parse(e) {
        var t, n;
        const r = kl.exec(e);
        if (null === r || 3 !== r.length) return null;
        const i = parseInt(r[1], 10),
          o = parseInt(r[2], 10);
        if (isNaN(i) || isNaN(o)) return null;
        const s =
          null !==
            (n =
              null === (t = this.commits[i - 1]) || void 0 === t
                ? void 0
                : t.summary) && void 0 !== n
            ? n
            : "";
        return {
          kind: "rebase",
          title: `Rebasing commit ${i} of ${o} commits`,
          value: wl(i / o),
          rebasedCommitCount: i,
          totalCommitCount: o,
          currentCommitSummary: s,
        };
      }
    }
    function Rl(e, t) {
      if (void 0 === t) return e;
      const { commits: n, progressCallback: r } = t;
      return yi(e, {
        processCallback: (e) => {
          if (null === e.stderr) return;
          const t = new xl(n);
          ps()(e.stderr).on("data", (e) => {
            const n = t.parse(e);
            null != n && r(n);
          });
        },
      });
    }
    function Tl(e) {
      if (0 === e.exitCode) return Sl.CompletedWithoutError;
      if (e.gitError === Bo.GitError.RebaseConflicts)
        return Sl.ConflictsEncountered;
      if (e.gitError === Bo.GitError.UnresolvedConflicts)
        return Sl.OutstandingFilesNotStaged;
      throw new Error(`Unhandled result found: '${JSON.stringify(e)}'`);
    }
    async function Dl(e, t, n = new Map(), r) {
      const o = t.filter((e) => e.status.kind !== io.Untracked);
      for (const [r, i] of n) {
        const n = t.find((e) => e.path === r);
        void 0 !== n
          ? await Ta(e, n, i)
          : log.error(
              `[continueRebase] couldn't find file ${r} even though there's a manual resolution for it`
            );
      }
      const s = o.filter((e) => !n.has(e.path));
      await ka(e, s);
      const a = await Ml(e);
      if (null == a)
        return (
          log.warn(
            "[continueRebase] unable to get status after staging changes, skipping any other steps"
          ),
          Sl.Aborted
        );
      const l = await (async function (e) {
        try {
          const t = i.join(e.path, ".git", "REBASE_HEAD");
          return (await _i.readFile(t, "utf8")).trim();
        } catch (e) {
          return (
            log.warn(
              "[rebase] a problem was encountered reading .git/REBASE_HEAD, so it is unsafe to continue rebasing",
              e
            ),
            null
          );
        }
      })(e);
      if (null === l) return Sl.Aborted;
      const c = a.workingDirectory.files.filter(
          (e) => e.status.kind !== io.Untracked
        ),
        u = {
          expectedErrors: new Set([
            Bo.GitError.RebaseConflicts,
            Bo.GitError.UnresolvedConflicts,
          ]),
          env: { GIT_EDITOR: ":" },
        };
      let h = u;
      if (void 0 !== r) {
        const t = await El(e);
        if (null === t)
          return (
            log.warn(
              "[continueRebase] unable to get rebase status, skipping any other steps"
            ),
            Sl.Aborted
          );
        h = Rl(u, { commits: t.commits, progressCallback: r });
      }
      if (0 === c.length) {
        log.warn(
          `[rebase] no tracked changes to commit for ${l}, continuing rebase but skipping this commit`
        );
        return Tl(
          await $o(
            ["rebase", "--skip"],
            e.path,
            "continueRebaseSkipCurrentCommit",
            h
          )
        );
      }
      return Tl(
        await $o(["rebase", "--continue"], e.path, "continueRebase", h)
      );
    }
    function Al(e, t, n, r) {
      if ("ordinary" === t.kind)
        switch (t.type) {
          case "added":
            return { kind: io.New };
          case "modified":
            return { kind: io.Modified };
          case "deleted":
            return { kind: io.Deleted };
        }
      else {
        if ("copied" === t.kind && null != r)
          return { kind: io.Copied, oldPath: r };
        if ("renamed" === t.kind && null != r)
          return { kind: io.Renamed, oldPath: r };
        if ("untracked" === t.kind) return { kind: io.Untracked };
        if ("conflicted" === t.kind)
          return (function (e, t, n) {
            switch (e.action) {
              case oo.BothAdded:
                return n.binaryFilePaths.includes(t)
                  ? { kind: io.Conflicted, entry: e }
                  : {
                      kind: io.Conflicted,
                      entry: e,
                      conflictMarkerCount: n.conflictCountsByPath.get(t) || 0,
                    };
              case oo.BothModified:
                return n.binaryFilePaths.includes(t)
                  ? { kind: io.Conflicted, entry: e }
                  : {
                      kind: io.Conflicted,
                      entry: e,
                      conflictMarkerCount: n.conflictCountsByPath.get(t) || 0,
                    };
              default:
                return { kind: io.Conflicted, entry: e };
            }
          })(t, e, n);
      }
      return Z("Unknown file status " + status);
    }
    const _l = ["DD", "AU", "UD", "UA", "DU", "AA", "UU"];
    async function Ml(e) {
      const t = await fs(
        [
          "--no-optional-locks",
          "status",
          "--untracked-files=all",
          "--branch",
          "--porcelain=2",
          "-z",
        ],
        e.path,
        "getStatus",
        new Set([0, 128])
      );
      if (128 === t.exitCode)
        return (
          log.debug(
            `'git status' returned 128 for '${e.path}' and is likely missing its .git directory`
          ),
          null
        );
      if (t.output.length > 2e7)
        return (
          log.error(
            `'git status' emitted ${t.output.length} bytes, which is beyond the supported threshold of 20000000 bytes`
          ),
          null
        );
      const n = (function (e) {
          const t = new Array(),
            n = e.split("\0"),
            r = new Ja.a(n);
          let i;
          for (; (i = r.shift()); ) {
            if (i.startsWith("# ") && i.length > 2) {
              t.push({ kind: "header", value: i.substr(2) });
              continue;
            }
            const e = i.substr(0, 1);
            "1" === e
              ? t.push(rl(i))
              : "2" === e
              ? t.push(ol(i, r.shift()))
              : "u" === e
              ? t.push(al(i))
              : "?" === e && t.push(ll(i));
          }
          return t;
        })(t.output.toString("utf8")),
        r = n.filter(el),
        o = n.filter(tl),
        s = await (async function (e) {
          const t = i.join(e.path, ".git", "MERGE_HEAD");
          return _i.pathExists(t);
        })(e),
        a = o.some((e) => _l.indexOf(e.statusCode) > -1),
        l = await (async function (e) {
          if (!(await Cl(e))) return null;
          let t = null,
            n = null,
            r = null;
          try {
            (t = await _i.readFile(
              i.join(e.path, ".git", "rebase-merge", "orig-head"),
              "utf8"
            )),
              (t = t.trim()),
              (n = await _i.readFile(
                i.join(e.path, ".git", "rebase-merge", "head-name"),
                "utf8"
              )),
              n.startsWith("refs/heads/") && (n = n.substr(11).trim()),
              (r = await _i.readFile(
                i.join(e.path, ".git", "rebase-merge", "onto"),
                "utf8"
              )),
              (r = r.trim());
          } catch (e) {}
          return null != t && null != n && null != r
            ? { originalBranchTip: t, targetBranch: n, baseBranchTip: r }
            : null;
        })(e),
        c = await (async function (e, t, n, r) {
          try {
            if (t)
              return await (async function (e) {
                const t = await Qa(e.path),
                  n = await _s(e, "MERGE_HEAD");
                return { conflictCountsByPath: t, binaryFilePaths: n };
              })(e);
            if (null !== r)
              return await (async function (e) {
                const t = await Qa(e.path),
                  n = await _s(e, "REBASE_HEAD");
                return { conflictCountsByPath: t, binaryFilePaths: n };
              })(e);
            if (n)
              return await (async function (e) {
                const t = await Qa(e.path);
                let n = [];
                try {
                  n = await _s(e, "HEAD");
                } catch (e) {}
                return { conflictCountsByPath: t, binaryFilePaths: n };
              })(e);
          } catch (e) {
            log.error(
              "Unexpected error from git operations in getConflictDetails",
              e
            );
          }
          return {
            conflictCountsByPath: new Map(),
            binaryFilePaths: new Array(),
          };
        })(e, s, a, l),
        u = o.reduce(
          (e, t) =>
            (function (e, t, n) {
              const r = (function (e) {
                return "??" === e
                  ? { kind: "untracked" }
                  : ".M" === e
                  ? {
                      kind: "ordinary",
                      type: "modified",
                      index: ro.Unchanged,
                      workingTree: ro.Modified,
                    }
                  : "M." === e
                  ? {
                      kind: "ordinary",
                      type: "modified",
                      index: ro.Modified,
                      workingTree: ro.Unchanged,
                    }
                  : ".A" === e
                  ? {
                      kind: "ordinary",
                      type: "added",
                      index: ro.Unchanged,
                      workingTree: ro.Added,
                    }
                  : "A." === e
                  ? {
                      kind: "ordinary",
                      type: "added",
                      index: ro.Added,
                      workingTree: ro.Unchanged,
                    }
                  : ".D" === e
                  ? {
                      kind: "ordinary",
                      type: "deleted",
                      index: ro.Unchanged,
                      workingTree: ro.Deleted,
                    }
                  : "D." === e
                  ? {
                      kind: "ordinary",
                      type: "deleted",
                      index: ro.Deleted,
                      workingTree: ro.Unchanged,
                    }
                  : "R." === e
                  ? {
                      kind: "renamed",
                      index: ro.Renamed,
                      workingTree: ro.Unchanged,
                    }
                  : ".R" === e
                  ? {
                      kind: "renamed",
                      index: ro.Unchanged,
                      workingTree: ro.Renamed,
                    }
                  : "C." === e
                  ? {
                      kind: "copied",
                      index: ro.Copied,
                      workingTree: ro.Unchanged,
                    }
                  : ".C" === e
                  ? {
                      kind: "copied",
                      index: ro.Unchanged,
                      workingTree: ro.Copied,
                    }
                  : "AD" === e
                  ? {
                      kind: "ordinary",
                      type: "added",
                      index: ro.Added,
                      workingTree: ro.Deleted,
                    }
                  : "AM" === e
                  ? {
                      kind: "ordinary",
                      type: "added",
                      index: ro.Added,
                      workingTree: ro.Modified,
                    }
                  : "RM" === e
                  ? {
                      kind: "renamed",
                      index: ro.Renamed,
                      workingTree: ro.Modified,
                    }
                  : "RD" === e
                  ? {
                      kind: "renamed",
                      index: ro.Renamed,
                      workingTree: ro.Deleted,
                    }
                  : "DD" === e
                  ? {
                      kind: "conflicted",
                      action: oo.BothDeleted,
                      us: ro.Deleted,
                      them: ro.Deleted,
                    }
                  : "AU" === e
                  ? {
                      kind: "conflicted",
                      action: oo.AddedByUs,
                      us: ro.Added,
                      them: ro.UpdatedButUnmerged,
                    }
                  : "UD" === e
                  ? {
                      kind: "conflicted",
                      action: oo.DeletedByThem,
                      us: ro.UpdatedButUnmerged,
                      them: ro.Deleted,
                    }
                  : "UA" === e
                  ? {
                      kind: "conflicted",
                      action: oo.AddedByThem,
                      us: ro.UpdatedButUnmerged,
                      them: ro.Added,
                    }
                  : "DU" === e
                  ? {
                      kind: "conflicted",
                      action: oo.DeletedByUs,
                      us: ro.Deleted,
                      them: ro.UpdatedButUnmerged,
                    }
                  : "AA" === e
                  ? {
                      kind: "conflicted",
                      action: oo.BothAdded,
                      us: ro.Added,
                      them: ro.Added,
                    }
                  : "UU" === e
                  ? {
                      kind: "conflicted",
                      action: oo.BothModified,
                      us: ro.UpdatedButUnmerged,
                      them: ro.UpdatedButUnmerged,
                    }
                  : { kind: "ordinary", type: "modified" };
              })(t.statusCode);
              if (
                "ordinary" === r.kind &&
                r.index === ro.Added &&
                r.workingTree === ro.Deleted
              )
                return e;
              "untracked" === r.kind && e.delete(t.path);
              const i = Al(t.path, r, n, t.oldPath),
                o = Qi.fromInitialSelection(Vi.All);
              return e.set(t.path, new bo(t.path, i, o)), e;
            })(e, t, c),
          new Map()
        ),
        {
          currentBranch: h,
          currentUpstreamBranch: d,
          currentTip: p,
          branchAheadBehind: f,
        } = r.reduce(Pl, {
          currentBranch: void 0,
          currentUpstreamBranch: void 0,
          currentTip: void 0,
          branchAheadBehind: void 0,
          match: null,
        });
      return {
        currentBranch: h,
        currentTip: p,
        currentUpstreamBranch: d,
        branchAheadBehind: f,
        exists: !0,
        mergeHeadFound: s,
        rebaseInternalState: l,
        workingDirectory: Co.fromFiles([...u.values()]),
      };
    }
    function Pl(e, t) {
      let {
        currentBranch: n,
        currentUpstreamBranch: r,
        currentTip: i,
        branchAheadBehind: o,
        match: s,
      } = e;
      const a = t.value;
      if ((s = a.match(/^branch\.oid ([a-f0-9]+)$/))) i = s[1];
      else if ((s = a.match(/^branch.head (.*)/)))
        "(detached)" !== s[1] && (n = s[1]);
      else if ((s = a.match(/^branch.upstream (.*)/))) r = s[1];
      else if ((s = a.match(/^branch.ab \+(\d+) -(\d+)$/))) {
        const e = parseInt(s[1], 10),
          t = parseInt(s[2], 10);
        isNaN(e) || isNaN(t) || (o = { ahead: e, behind: t });
      }
      return {
        currentBranch: n,
        currentUpstreamBranch: r,
        currentTip: i,
        branchAheadBehind: o,
        match: s,
      };
    }
    async function Il(e) {
      const t = await $o(
        ["var", "GIT_AUTHOR_IDENT"],
        e.path,
        "getAuthorIdentity",
        { successExitCodes: new Set([0, 128]) }
      );
      return 128 === t.exitCode ? null : Pa.parseIdentity(t.stdout);
    }
    var Ol;
    function Ll(e) {
      const t = (function (e) {
        switch (e[0]) {
          case "A":
            return Ol.Added;
          case "C":
            return Ol.Copied;
          case "D":
            return Ol.Deleted;
          case "M":
            return Ol.Modified;
          case "R":
            return Ol.Renamed;
          case "T":
            return Ol.TypeChanged;
          case "U":
            return Ol.Unmerged;
          case "X":
            return Ol.Unknown;
          default:
            throw new Error("Unknown index status: " + e);
        }
      })(e);
      switch (t) {
        case Ol.Copied:
        case Ol.Renamed:
          throw new Error(
            "Invalid index status for no-rename index status: " + t
          );
      }
      return t;
    }
    !(function (e) {
      (e[(e.Unknown = 0)] = "Unknown"),
        (e[(e.Added = 1)] = "Added"),
        (e[(e.Copied = 2)] = "Copied"),
        (e[(e.Deleted = 3)] = "Deleted"),
        (e[(e.Modified = 4)] = "Modified"),
        (e[(e.Renamed = 5)] = "Renamed"),
        (e[(e.TypeChanged = 6)] = "TypeChanged"),
        (e[(e.Unmerged = 7)] = "Unmerged");
    })(Ol || (Ol = {}));
    const Fl = [{ title: "", weight: 0 }];
    class Nl extends na {
      constructor() {
        super(Fl);
      }
    }
    class Bl {
      constructor(e, t, n) {
        (this.sha = e), (this.path = t), (this.describe = n);
      }
    }
    async function Hl(e) {
      const t = i.join(e.path, ".gitignore");
      return new Promise((e, n) => {
        o.readFile(t, "utf8", (t, r) => {
          t ? ("ENOENT" === t.code ? e(null) : n(t)) : e(r);
        });
      });
    }
    async function zl(e, t) {
      const n = i.join(e.path, ".gitignore");
      if ("" === t)
        return new Promise((e, t) => {
          o.unlink(n, (n) => {
            n ? t(n) : e();
          });
        });
      const r = await Ul(t, e);
      return new Promise((e, t) => {
        o.writeFile(n, r, (n) => {
          n ? t(n) : e();
        });
      });
    }
    async function Ul(e, t) {
      const n = await zo(t, "core.autocrlf"),
        r = await zo(t, "core.safecrlf");
      return new Promise((t, i) => {
        if ("true" !== n || "true" !== r)
          if (e.endsWith("\n")) t(e);
          else if (null == n) t(e + "\n");
          else {
            t("true" === n ? e + "\n" : e + "\r\n");
          }
        else {
          t(e.replace(/\r\n|\n\r|\n|\r/g, "\r\n"));
        }
      });
    }
    n(129);
    async function Wl(e, t) {
      const n = ["lfs", "install"];
      t && n.push("--force"), await $o(n, e.path, "installLFSHooks");
    }
    async function jl(e, t) {
      const { stdout: n } = await $o(
        ["check-attr", "filter", t],
        e.path,
        "checkAttrForLFS"
      );
      return null !== /: filter: lfs/.exec(n);
    }
    function Vl(e) {
      switch (e.kind) {
        case io.New:
        case io.Untracked:
          return "New";
        case io.Modified:
          return "Modified";
        case io.Deleted:
          return "Deleted";
        case io.Renamed:
          return "Renamed";
        case io.Conflicted:
          if (yo(e)) {
            return e.conflictMarkerCount > 0 ? "Conflicted" : "Resolved";
          }
          return "Conflicted";
        case io.Copied:
          return "Copied";
        default:
          return X(0, "Unknown file status " + e);
      }
    }
    function Gl(e) {
      return e.kind === io.Conflicted;
    }
    function $l(e) {
      return e.files.some((e) => Gl(e.status));
    }
    function ql(e, t) {
      return void 0 === t && (!yo(e) || e.conflictMarkerCount > 0);
    }
    function Kl(e, t) {
      const n = t ? " from " + t : "";
      switch (e) {
        case ro.Added:
          return "Using the added file" + n;
        case ro.UpdatedButUnmerged:
          return "Using the modified file" + n;
        case ro.Deleted:
          return "Using the deleted file" + n;
        default:
          return X(0, "Unknown status entry to format");
      }
    }
    function Yl(e, t) {
      const n = t ? " from " + t : "";
      switch (e) {
        case ro.Added:
          return "Use the added file" + n;
        case ro.UpdatedButUnmerged:
          return "Use the modified file" + n;
        case ro.Deleted:
          return "Use the deleted file" + n;
        default:
          return X(0, "Unknown status entry to format");
      }
    }
    function Ql(e) {
      return e.files.filter((e) => Gl(e.status));
    }
    function Zl(e, t) {
      return e.files.filter(
        (e) => go(e.status) && !ql(e.status, t.get(e.path))
      );
    }
    function Xl(e, t) {
      return e.files.filter((e) => go(e.status) && ql(e.status, t.get(e.path)));
    }
    class Jl {
      constructor(e = new Map()) {
        this._state = e;
      }
      get state() {
        return new Map(this._state);
      }
      updateMenuItem(e, t) {
        const n = this._state.get(e) || {};
        this._state.set(e, yi(n, t));
      }
      enable(e) {
        return this.updateMenuItem(e, { enabled: !0 }), this;
      }
      disable(e) {
        return this.updateMenuItem(e, { enabled: !1 }), this;
      }
      setEnabled(e, t) {
        return this.updateMenuItem(e, { enabled: t }), this;
      }
      merge(e) {
        const t = new Map(this._state);
        for (const [n, r] of e._state) t.set(n, r);
        return new Jl(t);
      }
    }
    function ec(e, t) {
      return (
        void 0 === e.enabled ||
        "separator" === t.type ||
        t.enabled === e.enabled
      );
    }
    const tc = [
      "rename-branch",
      "delete-branch",
      "discard-all-changes",
      "stash-all-changes",
      "preferences",
      "update-branch",
      "compare-to-branch",
      "merge-branch",
      "rebase-branch",
      "view-repository-on-github",
      "compare-on-github",
      "open-in-shell",
      "push",
      "pull",
      "branch",
      "repository",
      "go-to-commit-message",
      "create-branch",
      "show-changes",
      "show-history",
      "show-repository-list",
      "show-branches-list",
      "open-working-directory",
      "show-repository-settings",
      "open-external-editor",
      "remove-repository",
      "new-repository",
      "add-local-repository",
      "clone-repository",
      "about",
      "create-pull-request",
    ];
    function nc(e) {
      const t = e.selectedState,
        n =
          !!t &&
          !(!(r = t.repository) || r instanceof Ui || !r.gitHubRepository) &&
          null !== r.gitHubRepository.htmlURL;
      var r;
      let i = !1,
        o = !1,
        s = !1,
        a = !1,
        l = !1,
        c = !1,
        u = !1,
        h = !1,
        d = !1,
        p = !1,
        f = !1,
        m = !1,
        g = !1;
      const y =
        null !== t &&
        t.repository instanceof lo &&
        (function (e) {
          if (co(e)) {
            const t = e.gitHubRepository;
            return t.parent
              ? !1 !== t.parent.issuesEnabled && !0 !== t.parent.isArchived
              : !1 !== t.issuesEnabled && !0 !== t.isArchived;
          }
          return !1;
        })(t.repository);
      if (t && t.type === W.Repository) {
        i = !0;
        const { branchesState: e, changesState: n } = t.state,
          r = e.tip,
          y = e.defaultBranch;
        (u = Boolean(y)),
          (s = r.kind === so.Valid),
          (a = r.kind === so.Detached),
          (p = r.kind === so.Unknown),
          (f = r.kind === so.Unborn),
          r.kind === so.Valid
            ? ((o = null === y || r.branch.name !== y.name),
              (h = !!r.branch.upstream),
              (g = null !== n.stashEntry))
            : (o = !0),
          (d = t.state.isPushPullFetchInProgress);
        const { conflictState: v, workingDirectory: w } = t.state.changesState;
        (m = null !== v && "rebase" === v.kind),
          (c = null !== n.conflictState || $l(w)),
          (l = w.files.length > 0);
      }
      const v = [
          "branch",
          "repository",
          "remove-repository",
          "open-in-shell",
          "open-working-directory",
          "show-repository-settings",
          "go-to-commit-message",
          "show-changes",
          "show-history",
          "show-branches-list",
          "open-external-editor",
          "compare-to-branch",
        ],
        w = new Jl(),
        b = "hidden" !== e.windowState,
        S = e.showWelcomeFlow,
        C = b && i && !S;
      if (C) {
        for (const e of v) w.enable(e);
        w.setEnabled("rename-branch", (o || !h) && !f && !a),
          w.setEnabled("delete-branch", o && !f && !a),
          w.setEnabled("update-branch", o && u && !a),
          w.setEnabled("merge-branch", s),
          w.setEnabled("rebase-branch", s),
          w.setEnabled("compare-on-github", n && h),
          w.setEnabled("view-repository-on-github", n),
          w.setEnabled("create-issue-in-repository-on-github", y),
          w.setEnabled("create-pull-request", n && !f && !a),
          w.setEnabled("push", !f && !a && !d),
          w.setEnabled("pull", h && !d),
          w.setEnabled("create-branch", !p && !f && !m),
          w.setEnabled("discard-all-changes", C && l && !m),
          w.setEnabled("stash-all-changes", l && s && !m && !c),
          w.setEnabled("compare-to-branch", !a),
          w.setEnabled("toggle-stashed-changes", g),
          t &&
            t.type === W.MissingRepository &&
            w.disable("open-external-editor");
      } else {
        for (const e of v) w.disable(e);
        w.disable("view-repository-on-github"),
          w.disable("create-pull-request"),
          t &&
            t.type === W.MissingRepository &&
            (t.repository.gitHubRepository &&
              w.enable("view-repository-on-github"),
            w.enable("remove-repository")),
          w.disable("create-branch"),
          w.disable("rename-branch"),
          w.disable("delete-branch"),
          w.disable("discard-all-changes"),
          w.disable("stash-all-changes"),
          w.disable("update-branch"),
          w.disable("merge-branch"),
          w.disable("rebase-branch"),
          w.disable("push"),
          w.disable("pull"),
          w.disable("compare-to-branch"),
          w.disable("compare-on-github"),
          w.disable("toggle-stashed-changes");
      }
      return w;
    }
    function rc(e) {
      return e.currentPopup
        ? (function () {
            const e = new Jl();
            for (const t of tc) e.disable(t);
            return e;
          })().state
        : (function () {
            const e = new Jl();
            for (const t of tc) e.enable(t);
            return e;
          })()
            .merge(nc(e))
            .merge(
              (function (e) {
                const t = [
                    "new-repository",
                    "add-local-repository",
                    "clone-repository",
                    "preferences",
                    "about",
                  ],
                  n = new Jl();
                if (e) for (const e of t) n.disable(e);
                else for (const e of t) n.enable(e);
                return n;
              })(e.showWelcomeFlow)
            )
            .merge(
              (function (e) {
                const t = ["show-repository-list"],
                  n = new Jl();
                if (0 === e.repositories.length)
                  for (const e of t) n.disable(e);
                return n;
              })(e)
            ).state;
    }
    function ic(e, t) {
      const n = rc(e);
      if (t)
        for (const [e, r] of n.entries()) {
          const i = t.getItemById(e);
          i && ec(r, i) && n.delete(e);
        }
      if (0 === n.size) return;
      const i = new Array();
      n.forEach((e, t) => i.push({ id: t, state: e })),
        (function (e) {
          r.ipcRenderer.send("update-menu-state", e);
        })(i);
    }
    var oc;
    !(function (e) {
      (e.Terminal = "Terminal"),
        (e.Hyper = "Hyper"),
        (e.iTerm2 = "iTerm2"),
        (e.PowerShellCore = "PowerShell Core"),
        (e.Kitty = "Kitty"),
        (e.Alacritty = "Alacritty");
    })(oc || (oc = {}));
    oc.Terminal;
    function sc() {
      {
        const e = process.env.SystemRoot || "C:\\Windows",
          t = i.join(e, "System32", "where.exe");
        return (
          log.info("calling captureCommandOutput(where git)"),
          (function (e, t, n = {}) {
            return new Promise((r, i) => {
              const o = Object(No.spawn)(e, t, n);
              o.on("error", (t) => {
                log.warn("Unable to spawn " + e, t), r(void 0);
              });
              const s = new Array();
              let a = 0;
              o.stdout.on("data", (e) => {
                s.push(e), (a += e.length);
              }),
                o.on("close", function (e) {
                  r(
                    0 !== e
                      ? void 0
                      : Buffer.concat(s, a)
                          .toString()
                          .replace(/\r?\n[^]*/m, "")
                  );
                });
            });
          })(t, ["git"], { cwd: e })
        );
      }
    }
    var ac;
    !(function (e) {
      (e.Cmd = "Command Prompt"),
        (e.PowerShell = "PowerShell"),
        (e.PowerShellCore = "PowerShell Core"),
        (e.Hyper = "Hyper"),
        (e.GitBash = "Git Bash"),
        (e.Cygwin = "Cygwin"),
        (e.WSL = "WSL"),
        (e.WindowTerminal = "Windows Terminal"),
        (e.Alacritty = "Alacritty");
    })(ac || (ac = {}));
    const lc = ac.Cmd;
    async function cc() {
      const e = await sc(),
        t = [
          {
            shell: ac.Cmd,
            path: process.env.comspec || "C:\\Windows\\System32\\cmd.exe",
            extraArgs: e ? ["/K", `"doskey git=^"${e}^" $*"`] : [],
          },
        ],
        n = await (async function () {
          const e = Object(Ao.enumerateValues)(
            Ao.HKEY.HKEY_LOCAL_MACHINE,
            "Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\PowerShell.exe"
          );
          if (0 === e.length) return null;
          const t = e[0];
          if (
            t.type === Ao.RegistryValueType.REG_EXPAND_SZ ||
            t.type === Ao.RegistryValueType.REG_SZ
          ) {
            const e = t.data.replace(
              /^%SystemRoot%/i,
              process.env.SystemRoot || "C:\\Windows"
            );
            if (await Object(_i.pathExists)(e)) return e;
            log.debug(
              `[PowerShell] registry entry found but does not exist at '${e}'`
            );
          }
          return null;
        })();
      null != n && t.push({ shell: ac.PowerShell, path: n });
      const r = await (async function () {
        const e = Object(Ao.enumerateValues)(
          Ao.HKEY.HKEY_LOCAL_MACHINE,
          "Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\pwsh.exe"
        );
        if (0 === e.length) return null;
        const t = e[0];
        if (t.type === Ao.RegistryValueType.REG_SZ) {
          const e = t.data;
          if (await Object(_i.pathExists)(e)) return e;
          log.debug(
            `[PowerShellCore] registry entry found but does not exist at '${e}'`
          );
        }
        return null;
      })();
      null != r && t.push({ shell: ac.PowerShellCore, path: r });
      const o = await (async function () {
        const e = Object(Ao.enumerateValues)(
          Ao.HKEY.HKEY_CURRENT_USER,
          "Software\\Classes\\Directory\\Background\\shell\\Hyper\\command"
        );
        if (0 === e.length) return null;
        const t = e[0];
        if (t.type === Ao.RegistryValueType.REG_SZ) {
          const e = t.data.match(/(["'])(.*?)\1/),
            n = process.env.LocalAppData,
            r = e ? e[2] : null != n ? n.concat("\\hyper\\Hyper.exe") : null;
          if (null == r)
            log.debug(
              "[Hyper] LOCALAPPDATA environment variable is unset, aborting fallback behavior"
            );
          else {
            if (await Object(_i.pathExists)(r)) return r;
            log.debug(
              `[Hyper] registry entry found but does not exist at '${r}'`
            );
          }
        }
        return null;
      })();
      null != o && t.push({ shell: ac.Hyper, path: o });
      const s = await (async function () {
        const e = Object(Ao.enumerateValues)(
          Ao.HKEY.HKEY_LOCAL_MACHINE,
          "SOFTWARE\\GitForWindows"
        );
        if (0 === e.length) return null;
        const t = e.find((e) => "InstallPath" === e.name);
        if (t && t.type === Ao.RegistryValueType.REG_SZ) {
          const e = i.join(t.data, "git-bash.exe");
          if (await Object(_i.pathExists)(e)) return e;
          log.debug(
            `[Git Bash] registry entry found but does not exist at '${e}'`
          );
        }
        return null;
      })();
      null != s && t.push({ shell: ac.GitBash, path: s });
      const a = await (async function () {
        const e = Object(Ao.enumerateValues)(
            Ao.HKEY.HKEY_LOCAL_MACHINE,
            "SOFTWARE\\Cygwin\\setup"
          ),
          t = Object(Ao.enumerateValues)(
            Ao.HKEY.HKEY_LOCAL_MACHINE,
            "SOFTWARE\\WOW6432Node\\Cygwin\\setup"
          );
        if (null == e || null == t) return null;
        const n = e.find((e) => "rootdir" === e.name),
          r = t.find((e) => "rootdir" === e.name);
        if (n && n.type === Ao.RegistryValueType.REG_SZ) {
          const e = i.join(n.data, "bin\\mintty.exe");
          if (await Object(_i.pathExists)(e)) return e;
          if (r && r.type === Ao.RegistryValueType.REG_SZ) {
            const e = i.join(r.data, "bin\\mintty.exe");
            if (await Object(_i.pathExists)(e)) return e;
          } else
            log.debug(
              `[Cygwin] registry entry found but does not exist at '${e}'`
            );
        }
        return null;
      })();
      if ((null != a && t.push({ shell: ac.Cygwin, path: a }), qs())) {
        const e = await (async function () {
          const e = i.join(process.env.SystemRoot || "C:\\Windows", "System32"),
            t = i.join(e, "wsl.exe"),
            n = i.join(e, "wslconfig.exe");
          if (!(await Object(_i.pathExists)(t)))
            return log.debug(`[WSL] wsl.exe does not exist at '${t}'`), null;
          if (!(await Object(_i.pathExists)(n)))
            return (
              log.debug(
                `[WSL] found wsl.exe, but wslconfig.exe does not exist at '${n}'`
              ),
              null
            );
          const r = new Promise((e, t) => {
            const r = Object(No.spawn)(n, ["/list"]);
            r.on("error", t), r.on("exit", e);
          });
          try {
            const e = await r;
            return 0 !== e
              ? (log.debug(
                  "[WSL] found wsl.exe and wslconfig.exe, but no distros are installed. Error Code: " +
                    e
                ),
                null)
              : t;
          } catch (e) {
            log.error("[WSL] unhandled error when invoking 'wsl /list'", e);
          }
          return null;
        })();
        null != e && t.push({ shell: ac.WSL, path: e });
      }
      const l = await (async function () {
        const e = Object(Ao.enumerateValues)(
          Ao.HKEY.HKEY_CLASSES_ROOT,
          "Directory\\Background\\shell\\Open Alacritty here"
        );
        if (0 === e.length) return null;
        const t = e.find((e) => "Icon" === e.name);
        if (t && t.type === Ao.RegistryValueType.REG_SZ) {
          const e = t.data;
          if (await Object(_i.pathExists)(e)) return e;
          log.debug(
            `[Alacritty] registry entry found but does not exist at '${e}'`
          );
        }
        return null;
      })();
      null != l && t.push({ shell: ac.Alacritty, path: l });
      const c = await (async function () {
        const e = process.env.LocalAppData;
        if (null != e) {
          const t = i.join(e, "\\Microsoft\\WindowsApps\\wt.exe");
          if (await Object(_i.pathExists)(t)) return t;
          log.debug(`[Windows Terminal] wt.exe doest not exist at '${t}'`);
        }
        return null;
      })();
      return null != c && t.push({ shell: ac.WindowTerminal, path: c }), t;
    }
    var uc;
    !(function (e) {
      (e.Gnome = "GNOME Terminal"),
        (e.Mate = "MATE Terminal"),
        (e.Tilix = "Tilix"),
        (e.Terminator = "Terminator"),
        (e.Urxvt = "URxvt"),
        (e.Konsole = "Konsole"),
        (e.Xterm = "XTerm"),
        (e.Terminology = "Terminology");
    })(uc || (uc = {}));
    uc.Gnome;
    class hc extends Error {}
    const dc = lc;
    let pc = null;
    function fc(e) {
      return (function (e) {
        var t;
        return null !== (t = ve(ac, e)) && void 0 !== t ? t : lc;
      })(e);
    }
    async function mc() {
      return pc || ((pc = await cc()), pc);
    }
    async function gc(e, t, n) {
      if (!(await Object(_i.pathExists)(e.path))) {
        const t = "Options";
        throw new hc(
          `Could not find executable for '${e.shell}' at path '${e.path}'.  Please open ${t} and select an available shell.`
        );
      }
      let r = null;
      return (
        (r = (function (e, t) {
          const n = e.shell;
          switch (n) {
            case ac.PowerShell:
              const r = `"Set-Location -LiteralPath '${t}'"`;
              return Object(No.spawn)(
                "START",
                ['"PowerShell"', `"${e.path}"`, "-NoExit", "-Command", r],
                { shell: !0, cwd: t }
              );
            case ac.PowerShellCore:
              const i = `"Set-Location -LiteralPath '${t}'"`;
              return Object(No.spawn)(
                "START",
                ['"PowerShell Core"', `"${e.path}"`, "-NoExit", "-Command", i],
                { shell: !0, cwd: t }
              );
            case ac.Hyper:
              const o = `"${e.path}"`;
              return (
                log.info(`launching ${n} at path: ${o}`),
                Object(No.spawn)(o, [`"${t}"`], { shell: !0, cwd: t })
              );
            case ac.Alacritty:
              const s = `"${e.path}"`;
              return (
                log.info(`launching ${n} at path: ${s}`),
                Object(No.spawn)(s, [`--working-directory "${t}"`], {
                  shell: !0,
                  cwd: t,
                })
              );
            case ac.GitBash:
              const a = `"${e.path}"`;
              return (
                log.info(`launching ${n} at path: ${a}`),
                Object(No.spawn)(a, [`--cd="${t}"`], { shell: !0, cwd: t })
              );
            case ac.Cygwin:
              const l = `"${e.path}"`;
              return (
                log.info(`launching ${n} at path: ${l}`),
                Object(No.spawn)(
                  l,
                  [`/bin/sh -lc 'cd "$(cygpath "${t}")"; exec bash`],
                  { shell: !0, cwd: t }
                )
              );
            case ac.WSL:
              return Object(No.spawn)("START", ['"WSL"', `"${e.path}"`], {
                shell: !0,
                cwd: t,
              });
            case ac.Cmd:
              return Object(No.spawn)(
                "START",
                ['"Command Prompt"', `"${e.path}"`, ...e.extraArgs],
                { shell: !0, cwd: t }
              );
            case ac.WindowTerminal:
              const c = `"${e.path}"`;
              return (
                log.info(`launching ${n} at path: ${c}`),
                Object(No.spawn)(c, ["-d ."], { shell: !0, cwd: t })
              );
            default:
              return X(0, "Unknown shell: " + n);
          }
        })(e, t)),
        null != r
          ? ((function (e, t, n) {
              null !== t.stderr &&
                t.stderr.on("data", (t) => {
                  const n = t instanceof Buffer ? t.toString() : t;
                  log.debug(`[${e}] stderr: '${n}'`);
                });
              t.on("error", (t) => {
                log.debug(`[${e}] an error was encountered`, t), n(t);
              }),
                t.on("exit", (t) => {
                  0 !== t && log.debug(`[${e}] exit code: ${t}`);
                });
            })(e.shell, r, n),
            Promise.resolve())
          : Promise.reject(
              "Platform not currently supported for launching shells: win32"
            )
      );
    }
    function yc(e) {
      return e.isFullScreen()
        ? "full-screen"
        : e.isMaximized()
        ? "maximized"
        : e.isMinimized()
        ? "minimized"
        : e.isVisible()
        ? "normal"
        : "hidden";
    }
    var vc = n(130),
      wc = n.n(vc);
    class bc {
      constructor() {
        this.backingStore = new Map();
      }
      set(e, t, n) {
        const r = ja(e, t);
        this.backingStore.set(r, n);
      }
      get(e, t) {
        const n = ja(e, t);
        return this.backingStore.get(n) || null;
      }
      has(e, t) {
        const n = ja(e, t);
        return this.backingStore.has(n);
      }
      get size() {
        return this.backingStore.size;
      }
      clear() {
        this.backingStore.clear();
      }
    }
    class Sc {
      constructor(e, t) {
        (this.repository = e),
          (this.onCacheUpdate = t),
          (this.comparisonCache = new bc()),
          (this.aheadBehindQueue = wc()({ concurrency: 1, autostart: !0 }));
      }
      start() {
        this.aheadBehindQueue.on("success", (e) => {
          null != e && this.onCacheUpdate(this.comparisonCache);
        }),
          this.aheadBehindQueue.on("error", (e) => {
            log.debug(
              "[AheadBehindUpdater] an error with the queue was reported",
              e
            );
          }),
          this.aheadBehindQueue.on("end", (e) => {
            null != e &&
              log.debug("[AheadBehindUpdater] ended with an error", e);
          }),
          this.aheadBehindQueue.start();
      }
      stop() {
        this.aheadBehindQueue.end();
      }
      async executeAsyncTask(e, t) {
        if (this.comparisonCache.has(e, t))
          return this.comparisonCache.get(e, t);
        const n = ja(e, t),
          r = await Va(this.repository, n);
        return (
          null !== r
            ? this.comparisonCache.set(e, t, r)
            : log.debug(
                `[AheadBehindUpdater] unable to cache '${n}' as no result returned`
              ),
          r
        );
      }
      insert(e, t, n) {
        this.comparisonCache.has(e, t) || this.comparisonCache.set(e, t, n);
      }
      clear() {
        this.aheadBehindQueue.end();
      }
      schedule(e, t, n, r) {
        this.clear();
        const i = e.tip.sha,
          o = [...n, ...r],
          s = null !== t ? [t, ...o] : o,
          a = new Set(
            ((e) =>
              e
                .map((e) => e.tip.sha)
                .filter((e) => !this.comparisonCache.has(i, e)))(s)
          );
        log.debug(
          `[AheadBehindUpdater] - found ${a.size} comparisons to perform`
        );
        for (const e of a)
          this.aheadBehindQueue.push(
            () =>
              new Promise((t, n) => {
                requestIdleCallback(() => {
                  this.executeAsyncTask(i, e).then(t, n);
                });
              })
          );
      }
    }
    function Cc(e, t) {
      return Promise.all([e(), Ec(t)]).then((e) => e[0]);
    }
    async function Ec(e) {
      return new Promise((t) => window.setTimeout(t, e));
    }
    class kc {
      constructor(e, t, n, r) {
        (this.timeoutHandle = null),
          (this.stopped = !1),
          (this.repository = e),
          (this.account = t),
          (this.fetch = n),
          (this.shouldPerformFetch = r);
      }
      start(e) {
        this.stopped &&
          Z("Cannot start a background fetcher that has been stopped.");
        const t = this.repository.gitHubRepository;
        t &&
          (e
            ? (this.timeoutHandle = window.setTimeout(
                () => this.performAndScheduleFetch(t),
                Rc()
              ))
            : this.performAndScheduleFetch(t));
      }
      stop() {
        this.stopped = !0;
        const e = this.timeoutHandle;
        e && (window.clearTimeout(e), (this.timeoutHandle = null));
      }
      async performAndScheduleFetch(e) {
        if (this.stopped) return;
        const t = await this.shouldPerformFetch(this.repository);
        if (this.stopped) return;
        if (t)
          try {
            await this.fetch(this.repository);
          } catch (e) {
            const t = this.repository.gitHubRepository,
              n = null !== t ? t.fullName : this.repository.name;
            log.error(`Error performing periodic fetch for '${n}'`, e);
          }
        if (this.stopped) return;
        const n = await this.getFetchInterval(e);
        this.stopped ||
          (this.timeoutHandle = window.setTimeout(
            () => this.performAndScheduleFetch(e),
            n
          ));
      }
      async getFetchInterval(e) {
        const t = ht.fromAccount(this.account);
        let n = 36e5;
        try {
          const r = await t.getFetchPollInterval(e.owner.login, e.name);
          n = r ? Math.max(r, 3e5) : 36e5;
        } catch (e) {
          log.error("Error fetching poll interval", e);
        }
        return n + Rc();
      }
    }
    let xc = null;
    function Rc() {
      if (null !== xc) return xc;
      const e = Math.ceil(3e4 * Math.random());
      return (xc = e), e;
    }
    async function Tc(e) {
      try {
        return await qa(e);
      } catch (e) {
        return null;
      }
    }
    var Dc = n(131),
      Ac = n.n(Dc);
    function _c(...e) {
      const t = i.resolve(...e);
      return Ac()(t);
    }
    async function Mc(e, t, n = i) {
      if (0 === e.length) return null;
      const { join: r, normalize: o, resolve: s } = n,
        a = o(e),
        l = o(r(...t));
      if (-1 !== a.indexOf("\0") || -1 !== l.indexOf("\0")) return null;
      const c = s(a, l),
        u = await Object(_i.realpath)(a);
      return (await Object(_i.realpath)(c)).startsWith(u) ? c : null;
    }
    function Pc(e) {
      return _c(__dirname, "emoji", e);
    }
    function Ic(e) {
      const t = e.toString(16);
      return t.length >= 4 ? t : ("0000" + t).substring(t.length);
    }
    function Oc(e) {
      return new Promise((t, n) => {
        const r = i.join(e, "emoji.json");
        o.readFile(r, "utf8", (e, r) => {
          if (e) return void n(e);
          const i = new Map();
          try {
            JSON.parse(r).forEach((e) => {
              const t = e.emoji
                ? (function (e) {
                    const t = e.codePointAt(0);
                    if (!t) return null;
                    let n = Ic(t);
                    if (e.length > 2) {
                      const t = e.codePointAt(2);
                      t && 65039 !== t && (n = `${n}-${Ic(t)}`);
                    }
                    return Pc(`unicode/${n}.png`);
                  })(e.emoji)
                : Pc(e.aliases[0] + ".png");
              t
                ? e.aliases.forEach((e) => {
                    i.set(`:${e}:`, t);
                  })
                : log.error("Could not calculate location of emoji: " + e);
            });
          } catch (e) {
            n(e);
          }
          const o = new Map();
          Array.from(i.keys())
            .sort()
            .forEach((e) => {
              const t = i.get(e);
              t && o.set(e, t);
            }),
            t(o);
        });
      });
    }
    const Lc = { summary: "", description: "" };
    async function Fc() {
      return new Promise((e, t) => {
        requestAnimationFrame(e);
      });
    }
    class Nc extends Error {
      constructor(e, t) {
        super(`The remote '${t.name}' already exists`),
          (this.repository = e),
          (this.existingRemote = t);
      }
    }
    function Bc(e, t) {
      const n = t.find((e) => "upstream" === e.name);
      return n && Dt(e, n) ? n : null;
    }
    var Hc;
    !(function (e) {
      (e.NotLoaded = "NotLoaded"),
        (e.Loading = "Loading"),
        (e.Loaded = "Loaded");
    })(Hc || (Hc = {}));
    const zc = /!!GitHub_Desktop<(.+)>$/;
    async function Uc(e) {
      const t = String.fromCharCode(parseInt("1F", 16)),
        n = ["%gD", "%H", "%gs"].join("%x1F"),
        r = await $o(
          ["log", "-g", "-z", "--pretty=" + n, "refs/stash"],
          e.path,
          "getStashEntries",
          { successExitCodes: new Set([0, 128]) }
        );
      if (128 === r.exitCode) return { desktopEntries: [], stashEntryCount: 0 };
      const i = [],
        o = { kind: Hc.NotLoaded },
        s = r.stdout.split("\0").filter((e) => "" !== e);
      for (const e of s) {
        const n = e.split(t);
        if (3 === n.length) {
          const [e, t, r] = n,
            s = $c(r);
          null !== s &&
            i.push({ name: e, branchName: s, stashSha: t, files: o });
        }
      }
      return { desktopEntries: i, stashEntryCount: s.length - 1 };
    }
    async function Wc(e, t) {
      const n = await Uc(e),
        r = "string" == typeof t ? t : t.name;
      return n.desktopEntries.find((e) => e.branchName === r) || null;
    }
    async function jc(e, t) {
      return (await Uc(e)).desktopEntries.find((e) => e.stashSha === t) || null;
    }
    async function Vc(e, t) {
      const n = await jc(e, t);
      if (null !== n) {
        const t = ["stash", "drop", n.name];
        await $o(t, e.path, "dropStashEntry");
      }
    }
    async function Gc(e, t) {
      const n = new Set([Bo.GitError.MergeConflicts]),
        r = new Set([0, 1]),
        i = await jc(e, t);
      if (null !== i) {
        const o = ["stash", "pop", "--quiet", "" + i.name],
          s = await $o(o, e.path, "popStashEntry", {
            expectedErrors: n,
            successExitCodes: r,
          });
        if (1 === s.exitCode) {
          if (s.stderr.length > 0) throw new Go(s, o);
          log.info(
            `[popStashEntry] a stash was popped successfully but exit code ${s.exitCode} reported.`
          ),
            await Vc(e, t);
        }
      }
    }
    function $c(e) {
      const t = zc.exec(e);
      return null === t || 0 === t[1].length ? null : t[1];
    }
    async function qc(e, t) {
      const n = [
          "log",
          t,
          "-C",
          "-M",
          "-m",
          "-1",
          "--no-show-signature",
          "--first-parent",
          "--name-status",
          "--format=format:",
          "-z",
          "--",
        ],
        r = await $o(n, e.path, "getChangedFilesForStash", {
          successExitCodes: new Set([0, 128]),
        });
      return 0 === r.exitCode && r.stdout.length > 0 ? Ba(r.stdout, t) : [];
    }
    function Kc(e, t) {
      0 === t.length
        ? Qc(e)
        : (function (e, t) {
            const n = JSON.stringify(t);
            localStorage.setItem(e, n);
          })(Zc(e), t);
    }
    function Yc(e) {
      return (function (e) {
        const t = localStorage.getItem(e) || "[]";
        try {
          const e = JSON.parse(t);
          return e instanceof Array
            ? e.some((e) => "string" != typeof e)
              ? []
              : e
            : [];
        } catch (e) {
          return [];
        }
      })(Zc(e));
    }
    function Qc(e) {
      localStorage.removeItem(Zc(e));
    }
    function Zc(e) {
      return "tags-to-push-" + e.id;
    }
    const Xc = ["main", "master"];
    async function Jc() {
      var e;
      return null !==
        (e = await (async function () {
          return Uo("init.defaultBranch");
        })()) && void 0 !== e
        ? e
        : "main";
    }
    class eu extends ki {
      constructor(e, t, n) {
        super(),
          (this.repository = e),
          (this.shell = t),
          (this.statsStore = n),
          (this.commitLookup = new Map()),
          (this._history = []),
          (this.requestsInFight = new Set()),
          (this._tip = { kind: so.Unknown }),
          (this._defaultBranch = null),
          (this._localTags = null),
          (this._allBranches = []),
          (this._recentBranches = []),
          (this._localCommitSHAs = []),
          (this._commitMessage = Lc),
          (this._showCoAuthoredBy = !1),
          (this._coAuthors = []),
          (this._aheadBehind = null),
          (this._tagsToPush = []),
          (this._defaultRemote = null),
          (this._currentRemote = null),
          (this._upstreamRemote = null),
          (this._lastFetched = null),
          (this._desktopStashEntries = new Map()),
          (this._stashEntryCount = 0),
          (this._tagsToPush = Yc(e));
      }
      async reconcileHistory(e) {
        if (0 === this._history.length) return;
        if (this.requestsInFight.has("history")) return;
        this.requestsInFight.add("history");
        const t = Wa("HEAD", e),
          n = await this.performFailableOperation(() =>
            Na(this.repository, t, 100)
          );
        if (null == n) return;
        const r = this._history,
          i = r.findIndex((t) => t === e);
        if (i > -1) {
          log.debug(
            `reconciling history - adding ${
              n.length
            } commits before merge base ${e.substr(0, 8)}`
          );
          const t = r.slice(i);
          this._history = [...n.map((e) => e.sha), ...t];
        }
        this.storeCommits(n),
          this.requestsInFight.delete("history"),
          this.emitUpdate();
      }
      async loadNextHistoryBatch() {
        if (this.requestsInFight.has("history")) return;
        if (!this.history.length) return;
        const e = this.history[this.history.length - 1],
          t = "history/" + e;
        if (this.requestsInFight.has(t)) return;
        this.requestsInFight.add(t);
        const n = await this.performFailableOperation(() =>
          Na(this.repository, e + "^", 100)
        );
        n &&
          ((this._history = this._history.concat(n.map((e) => e.sha))),
          this.storeCommits(n),
          this.requestsInFight.delete(t),
          this.emitUpdate());
      }
      async loadCommitBatch(e) {
        if (this.requestsInFight.has("history")) return null;
        const t = "history/compare/" + e;
        if (this.requestsInFight.has(t)) return null;
        this.requestsInFight.add(t);
        const n = await this.performFailableOperation(() =>
          Na(this.repository, e, 100)
        );
        return (
          this.requestsInFight.delete(t),
          n ? (this.storeCommits(n), n.map((e) => e.sha)) : null
        );
      }
      async refreshTags() {
        const e = this._localTags,
          t = await this.performFailableOperation(() =>
            (async function (e) {
              const t = (
                await $o(["show-ref", "--tags", "-d"], e.path, "getAllTags", {
                  successExitCodes: new Set([0, 1]),
                })
              ).stdout
                .split("\n")
                .filter((e) => "" !== e)
                .map((e) => {
                  const [t, n] = e.split(" ");
                  return [
                    n.replace(/^refs\/tags\//, "").replace(/\^\{\}$/, ""),
                    t,
                  ];
                });
              return new Map(t);
            })(this.repository)
          );
        if (void 0 !== t) {
          this._localTags = t;
          for (const e of this._tagsToPush)
            this._localTags.has(e) || this.removeTagToPush(e);
          null !== e && this.emitUpdatesForChangedTags(e, this._localTags);
        }
      }
      async emitUpdatesForChangedTags(e, t) {
        const n = new Set();
        let r = 0;
        for (const [r, i] of e) {
          const e = t.get(r);
          e ? e !== i && (n.add(i), n.add(e)) : n.add(i);
        }
        for (const [i, o] of t) e.has(i) || (n.add(o), r++);
        r > 0 && this.statsStore.recordTagCreated(r);
        const i = [];
        for (const e of n) {
          const t = await Ha(this.repository, e);
          null !== t && i.push(t);
        }
        this.storeCommits(i);
      }
      async createBranch(e, t, n = !1) {
        if (
          !0 ===
          (await this.performFailableOperation(
            async () => (
              await (async function (e, t, n, r) {
                const i = null !== n ? ["branch", t, n] : ["branch", t];
                r && i.push("--no-track"), await $o(i, e.path, "createBranch");
              })(this.repository, e, t, n),
              !0
            )
          ))
        )
          return (
            await this.loadBranches(),
            this.allBranches.find((t) => t.type === Ri.Local && t.name === e)
          );
      }
      async createTag(e, t) {
        void 0 !==
          (await this.performFailableOperation(
            async () => (
              await (async function (e, t, n) {
                const r = ["tag", "-a", "-m", "", t, n];
                await $o(r, e.path, "createTag");
              })(this.repository, e, t),
              !0
            )
          )) &&
          (await this.refreshTags(),
          this.addTagToPush(e),
          this.statsStore.recordTagCreatedInDesktop());
      }
      async deleteTag(e) {
        void 0 !==
          (await this.performFailableOperation(
            async () => (
              await (async function (e, t) {
                const n = ["tag", "-d", t];
                await $o(n, e.path, "deleteTag");
              })(this.repository, e),
              !0
            )
          )) &&
          (await this.refreshTags(),
          this.removeTagToPush(e),
          this.statsStore.recordTagDeleted());
      }
      get history() {
        return this._history;
      }
      get tagsToPush() {
        return this._tagsToPush;
      }
      get localTags() {
        return this._localTags;
      }
      async loadBranches() {
        const [e, t] = await Promise.all([
          this.performFailableOperation(() => Ia(this.repository)) || [],
          this.performFailableOperation(() =>
            (async function (e, t) {
              const n = new RegExp(
                  /.*? (renamed|checkout)(?:: moving from|\s*) (?:refs\/heads\/|\s*)(.*?) to (?:refs\/heads\/|\s*)(.*?)$/i
                ),
                r = await $o(
                  [
                    "log",
                    "-g",
                    "--no-abbrev-commit",
                    "--pretty=oneline",
                    "HEAD",
                    "-n",
                    "2500",
                    "--",
                  ],
                  e.path,
                  "getRecentBranches",
                  { successExitCodes: new Set([0, 128]) }
                );
              if (128 === r.exitCode) return [];
              const i = r.stdout.split("\n"),
                o = new Set(),
                s = new Set();
              for (const e of i) {
                const r = n.exec(e);
                if (r && 4 === r.length) {
                  const e = r[1],
                    t = r[2],
                    n = r[3];
                  "renamed" === e && s.add(t), s.has(n) || o.add(n);
                }
                if (o.size === t) break;
              }
              return [...o];
            })(this.repository, 6)
          ),
        ]);
        e &&
          ((this._allBranches = this.mergeRemoteAndLocalBranches(e)),
          await this.refreshDefaultBranch(),
          this.refreshRecentBranches(t),
          await this.checkPullWithRebase(),
          this.emitUpdate());
      }
      mergeRemoteAndLocalBranches(e) {
        const t = new Array(),
          n = new Array();
        for (const r of e)
          r.type === Ri.Local ? t.push(r) : r.type === Ri.Remote && n.push(r);
        const r = new Set(),
          i = new Array();
        for (const e of t) i.push(e), e.upstream && r.add(e.upstream);
        for (const e of n) r.has(e.name) || i.push(e);
        return i;
      }
      async checkPullWithRebase() {
        const e = await zo(this.repository, "pull.rebase");
        null === e || "" === e
          ? (this.pullWithRebase = void 0)
          : "true" === e
          ? (this.pullWithRebase = !0)
          : "false" === e
          ? (this.pullWithRebase = !1)
          : (log.warn(
              `Unexpected value found for pull.rebase in config: '${e}'`
            ),
            (this.pullWithRebase = void 0));
      }
      async refreshDefaultBranch() {
        const e = await this.resolveDefaultBranch();
        this._defaultBranch =
          this._allBranches
            .filter(
              (t) =>
                (t.name === e && null === t.upstreamWithoutRemote) ||
                t.upstreamWithoutRemote === e
            )
            .sort((e, t) => Ct(e.type, t.type))
            .shift() || null;
      }
      addTagToPush(e) {
        (this._tagsToPush = [...this._tagsToPush, e]),
          Kc(this.repository, this._tagsToPush),
          this.emitUpdate();
      }
      removeTagToPush(e) {
        (this._tagsToPush = this._tagsToPush.filter((t) => t !== e)),
          Kc(this.repository, this._tagsToPush),
          this.emitUpdate();
      }
      clearTagsToPush() {
        (this._tagsToPush = []),
          Kc(this.repository, this._tagsToPush),
          this.emitUpdate();
      }
      async resolveDefaultBranch() {
        const { gitHubRepository: e } = this.repository;
        if (e && null != e.defaultBranch) return e.defaultBranch;
        if (null !== this.currentRemote) {
          const e = `refs/remotes/${this.currentRemote.name}/`,
            t = await Bs(this.repository, e + "HEAD");
          if (null != t && t.length > e.length && t.startsWith(e))
            return t.substr(e.length);
        }
        return Jc();
      }
      refreshRecentBranches(e) {
        var t;
        if (!e || !e.length) return void (this._recentBranches = []);
        const n = this._allBranches.reduce(
            (e, t) => e.set(t.name, t),
            new Map()
          ),
          r = new Array();
        for (const i of e) {
          if (
            i ===
            (null === (t = this.defaultBranch) || void 0 === t
              ? void 0
              : t.name)
          )
            continue;
          const e = n.get(i);
          if (e && (r.push(e), r.length >= 5)) break;
        }
        this._recentBranches = r;
      }
      get tip() {
        return this._tip;
      }
      get defaultBranch() {
        return this._defaultBranch;
      }
      get allBranches() {
        return this._allBranches;
      }
      get recentBranches() {
        return this._recentBranches;
      }
      async loadLocalCommits(e) {
        if (null === e) return void (this._localCommitSHAs = []);
        let t;
        if (e.upstream) {
          const n = Wa(e.upstream, e.name);
          t = await this.performFailableOperation(() =>
            Na(this.repository, n, 100)
          );
        } else
          t = await this.performFailableOperation(() =>
            Na(this.repository, "HEAD", 100, ["--not", "--remotes"])
          );
        t &&
          (this.storeCommits(t),
          (this._localCommitSHAs = t.map((e) => e.sha)),
          this.emitUpdate());
      }
      get localCommitSHAs() {
        return this._localCommitSHAs;
      }
      storeCommits(e) {
        for (const t of e) this.commitLookup.set(t.sha, t);
      }
      async undoFirstCommit(e) {
        const t = await this.performFailableOperation(() =>
          Ml(this.repository)
        );
        if (null == t)
          throw new Error(
            "Unable to undo commit because there are too many files in your repository's working directory."
          );
        const n = t.workingDirectory.files
          .filter((e) => e.status.kind === io.Deleted)
          .map((e) => e.path);
        return (
          await (async function (e, t) {
            await $o(["checkout", "HEAD", "--", ...t], e.path, "checkoutPaths");
          })(e, n),
          await zs(e, "HEAD", "Reverting first commit"),
          await (async function (e) {
            await $o(
              ["rm", "--cached", "-r", "-f", "."],
              e.path,
              "unstageAllFiles"
            );
          })(e),
          !0
        );
      }
      async undoCommit(e) {
        if (
          void 0 !==
          (await this.performFailableOperation(() =>
            0 === e.parentSHAs.length
              ? this.undoFirstCommit(this.repository)
              : (async function (e, t, n) {
                  const r = xa(t, n);
                  return await $o(r, e.path, "reset"), !0;
                })(this.repository, 2, e.parentSHAs[0])
          ))
        ) {
          if (this.repository.gitHubRepository)
            try {
              return (
                await this.loadCommitAndCoAuthors(e), void this.emitUpdate()
              );
            } catch (e) {
              log.error(
                "Failed to restore commit and co-authors, falling back",
                e
              );
            }
          (this._commitMessage = { summary: e.summary, description: e.body }),
            this.emitUpdate();
        }
      }
      async loadCommitAndCoAuthors(e) {
        const t = this.repository,
          n = await is(t, { summary: e.summary, description: e.body }),
          r = (
            await (async function (e, t) {
              const n = await $o(
                ["interpret-trailers", "--parse"],
                e.path,
                "parseTrailers",
                { stdin: t }
              );
              if (0 === n.stdout.length) return [];
              const r = await ns(e);
              return es(n.stdout, r);
            })(t, n)
          ).filter(Jo);
        if (0 === r.length)
          return void (this._commitMessage = {
            summary: e.summary,
            description: e.body,
          });
        const i = (await rs(t, n, [], !0)).split("\n"),
          o = await ns(this.repository),
          s = /^co-authored-by(.)\s(.*)/i,
          a = [];
        for (let e = i.length - 1; e >= 0; e--) {
          const t = i[e],
            n = s.exec(t);
          if (!n || -1 === o.indexOf(n[1])) continue;
          const l = ts(t, n[1]);
          if (!l) continue;
          const c = r.findIndex((e) => e.value === l.value);
          -1 !== c && (a.unshift(r[c]), r.splice(c, 1), i.splice(e, 1));
        }
        i.splice(0, 2);
        const l = i.join("\n").trim();
        this._commitMessage = { summary: e.summary, description: l };
        const c = a.map((e) => Oa.parse(e.value)),
          u = new Array();
        for (let e = 0; e < c.length; e++) {
          const t = c[e];
          if (null === t) continue;
          const { name: n, email: r } = t,
            i = this.coAuthors.find(
              (e) => e.name === n && e.email === r && null !== e.username
            );
          u.push(i || { name: n, email: r, username: null });
        }
        (this._coAuthors = u),
          this._coAuthors.length > 0 &&
            !1 === this._showCoAuthoredBy &&
            (this._showCoAuthoredBy = !0);
      }
      async performFailableOperation(e, t) {
        try {
          return await e();
        } catch (e) {
          return (
            (e = new ce(e, Object.assign({ repository: this.repository }, t))),
            void this.emitError(e)
          );
        }
      }
      get commitMessage() {
        return this._commitMessage;
      }
      get showCoAuthoredBy() {
        return this._showCoAuthoredBy;
      }
      get coAuthors() {
        return this._coAuthors;
      }
      async fetch(e, t, n) {
        const r = new Map();
        if (
          (null !== this.currentRemote &&
            r.set(this.currentRemote.name, this.currentRemote),
          null !== this.defaultRemote &&
            r.set(this.defaultRemote.name, this.defaultRemote),
          null !== this.upstreamRemote &&
            r.set(this.upstreamRemote.name, this.upstreamRemote),
          r.size > 0 && (await this.fetchRemotes(e, [...r.values()], t, n)),
          this.tip.kind === so.Valid)
        ) {
          const e = this.tip.branch;
          if (null !== e.remote && null !== e.upstream) {
            const t = ja(e.name, e.upstream);
            this._aheadBehind = await Va(this.repository, t);
          } else this._aheadBehind = null;
        } else this._aheadBehind = null;
        this.emitUpdate();
      }
      async fetchRemotes(e, t, n, r) {
        if (!t.length) return;
        const i = 1 / t.length;
        for (let o = 0; o < t.length; o++) {
          const s = t[o],
            a = o * i;
          await this.fetchRemote(e, s, n, (e) => {
            e &&
              r &&
              r(
                Object.assign(Object.assign({}, e), { value: a + e.value * i })
              );
          });
        }
      }
      async fetchRemote(e, t, n, r) {
        const i = { type: re.Fetch, repository: this.repository };
        await this.performFailableOperation(
          () => _a(this.repository, e, t, r),
          { backgroundTask: n, retryAction: i }
        );
      }
      async fetchRefspec(e, t) {
        const n = await Us(this.repository);
        for (const r of n)
          await this.performFailableOperation(() =>
            Ma(this.repository, e, r, t)
          );
      }
      async loadStatus() {
        const e = await this.performFailableOperation(() =>
          Ml(this.repository)
        );
        if (!e) return null;
        this._aheadBehind = e.branchAheadBehind || null;
        const { currentBranch: t, currentTip: n } = e;
        if (t || n)
          if (n && t) {
            const r = await this.lookupCommit(n),
              i = new Hi(t, e.currentUpstreamBranch || null, r, Ri.Local);
            this._tip = { kind: so.Valid, branch: i };
          } else
            n
              ? (this._tip = { kind: so.Detached, currentSha: n })
              : t && (this._tip = { kind: so.Unborn, ref: t });
        else this._tip = { kind: so.Unknown };
        return this.emitUpdate(), e;
      }
      async lookupCommit(e) {
        const t = this.commitLookup.get(e);
        if (null != t) return Promise.resolve(t);
        const n = await this.performFailableOperation(() =>
          Ha(this.repository, e)
        );
        if (null != n) return this.commitLookup.set(e, n), n;
        throw new Error(`Could not load commit: '${e}'`);
      }
      async loadStashEntries() {
        const e = new Map(),
          t = await Uc(this.repository);
        for (const n of t.desktopEntries)
          if (!e.has(n.branchName)) {
            const t = this._desktopStashEntries.get(n.branchName);
            void 0 !== t && t.stashSha === n.stashSha
              ? e.set(
                  n.branchName,
                  Object.assign(Object.assign({}, n), { files: t.files })
                )
              : e.set(n.branchName, n);
          }
        (this._desktopStashEntries = e),
          (this._stashEntryCount = t.stashEntryCount),
          this.emitUpdate(),
          this.loadFilesForCurrentStashEntry();
      }
      get currentBranchStashEntry() {
        return (
          (this._tip &&
            this._tip.kind === so.Valid &&
            this._desktopStashEntries.get(this._tip.branch.name)) ||
          null
        );
      }
      get stashEntryCount() {
        return this._stashEntryCount;
      }
      get desktopStashEntryCount() {
        return this._desktopStashEntries.size;
      }
      async loadFilesForCurrentStashEntry() {
        const e = this.currentBranchStashEntry;
        if (!e || e.files.kind !== Hc.NotLoaded) return;
        const { branchName: t } = e;
        this._desktopStashEntries.set(
          t,
          Object.assign(Object.assign({}, e), { files: { kind: Hc.Loading } })
        ),
          this.emitUpdate();
        const n = await (async function (e, t) {
            const [n, r] = await Promise.all([qc(e, t), qc(e, t + "^3")]),
              i = new Map();
            return (
              n.forEach((e) => i.set(e.path, e)),
              r.forEach((e) => i.set(e.path, e)),
              [...i.values()].sort((e, t) => e.path.localeCompare(t.path))
            );
          })(this.repository, e.stashSha),
          r = this._desktopStashEntries.get(t);
        r &&
          r.stashSha === e.stashSha &&
          (this._desktopStashEntries.set(
            t,
            Object.assign(Object.assign({}, r), {
              files: { kind: Hc.Loaded, files: n },
            })
          ),
          this.emitUpdate());
      }
      async loadRemotes() {
        const e = await Us(this.repository);
        this._defaultRemote = (function (e) {
          return e.find((e) => "origin" === e.name) || e[0] || null;
        })(e);
        const t =
          this.tip.kind === so.Valid && null !== this.tip.branch.remote
            ? this.tip.branch.remote
            : null;
        this._currentRemote =
          (null !== t && e.find((e) => e.name === t)) || this._defaultRemote;
        const n =
          this.repository.gitHubRepository &&
          this.repository.gitHubRepository.parent;
        (this._upstreamRemote = n ? Bc(n, e) : null), this.emitUpdate();
      }
      async addUpstreamRemoteIfNeeded() {
        var e;
        const t =
          this.repository.gitHubRepository &&
          this.repository.gitHubRepository.parent;
        if (!t) return;
        const n = await Us(this.repository);
        if (Bc(t, n)) return;
        const r = n.find((e) => "upstream" === e.name);
        if (r) {
          const e = new Nc(this.repository, r);
          return void this.emitError(e);
        }
        const i = J("Parent repositories are fully loaded", t.cloneURL);
        this._upstreamRemote =
          null !==
            (e = await this.performFailableOperation(() =>
              Ws(this.repository, "upstream", i)
            )) && void 0 !== e
            ? e
            : null;
      }
      async ensureUpstreamRemoteURL(e) {
        await this.performFailableOperation(async () => {
          try {
            await Ws(this.repository, "upstream", e);
          } catch (t) {
            if (
              !(
                t instanceof Go &&
                t.result.gitError === Bo.GitError.RemoteAlreadyExists
              )
            )
              throw t;
            await Vs(this.repository, "upstream", e);
          }
        });
      }
      get aheadBehind() {
        return this._aheadBehind;
      }
      get defaultRemote() {
        return this._defaultRemote;
      }
      get currentRemote() {
        return this._currentRemote;
      }
      get upstreamRemote() {
        return this._upstreamRemote;
      }
      setShowCoAuthoredBy(e) {
        (this._showCoAuthoredBy = e),
          e || (this._coAuthors = []),
          this.emitUpdate();
      }
      setCoAuthors(e) {
        (this._coAuthors = e), this.emitUpdate();
      }
      setCommitMessage(e) {
        return (this._commitMessage = e), this.emitUpdate(), Promise.resolve();
      }
      get lastFetched() {
        return this._lastFetched;
      }
      async updateLastFetched() {
        const e = i.join(this.repository.path, ".git", "FETCH_HEAD");
        try {
          const t = await Object(_i.stat)(e);
          t.size > 0 && (this._lastFetched = t.mtime);
        } catch (e) {
          this._lastFetched = null;
        }
        return this.emitUpdate(), this._lastFetched;
      }
      merge(e) {
        if (this.tip.kind !== so.Valid)
          throw new Error(
            `unable to merge as tip state is '${this.tip.kind}' and the application expects the repository to be on a branch currently`
          );
        const t = this.tip.branch.name;
        return this.performFailableOperation(
          () =>
            (async function (e, t) {
              const { exitCode: n, stdout: r } = await $o(
                ["merge", t],
                e.path,
                "merge",
                { expectedErrors: new Set([Bo.GitError.MergeConflicts]) }
              );
              return 0 !== n
                ? pl.Failed
                : r === fl
                ? pl.AlreadyUpToDate
                : pl.Success;
            })(this.repository, e),
          {
            gitContext: { kind: "merge", currentBranch: t, theirBranch: e },
            retryAction: {
              type: re.Merge,
              currentBranch: t,
              theirBranch: e,
              repository: this.repository,
            },
          }
        );
      }
      async setRemoteURL(e, t) {
        const n =
          !0 ===
          (await this.performFailableOperation(() =>
            Vs(this.repository, e, t)
          ));
        return await this.loadRemotes(), this.emitUpdate(), n;
      }
      async discardChanges(e) {
        const t = new Array(),
          n = new Array(),
          r = await (async function (e) {
            const [t, n] = await Promise.all([
              Object(_i.pathExists)(i.join(e.path, ".gitmodules")),
              Object(_i.pathExists)(i.join(e.path, ".git", "modules")),
            ]);
            if (!t && !n)
              return (
                log.info(
                  'No submodules found. Skipping "git submodule status"'
                ),
                []
              );
            const r = await $o(
              ["submodule", "status", "--"],
              e.path,
              "listSubmodules",
              { successExitCodes: new Set([0, 128]) }
            );
            if (128 === r.exitCode) return [];
            const o = new Array();
            for (const e of r.stdout.split("\n")) {
              if (0 === e.length) continue;
              const t = e.substr(1, 40),
                [n, r] = e.substr(42).split(/\s+/);
              if (null != r) {
                const e = r.substr(1, r.length - 2);
                o.push(new Bl(t, n, e));
              }
            }
            return o;
          })(this.repository);
        await (async function (e, t) {
          const n = e[Symbol.iterator]();
          let r = n.next();
          for (; !r.done; ) {
            const e = await Fc();
            do {
              await Promise.resolve(t(r.value)), (r = n.next());
            } while (!r.done && performance.now() - e < 10);
          }
        })(e, async (e) => {
          const o = r.some((t) => t.path === e.path);
          e.status.kind === io.Deleted ||
            o ||
            this.shell.moveItemToTrash(i.resolve(this.repository.path, e.path)),
            e.status.kind === io.Copied || e.status.kind === io.Renamed
              ? (n.push(e.path),
                t.push(e.status.oldPath),
                n.push(e.status.oldPath))
              : (t.push(e.path), n.push(e.path));
        });
        const o = await (async function (e) {
            const t = [
              "diff-index",
              "--cached",
              "--name-status",
              "--no-renames",
              "-z",
            ];
            let n = await $o([...t, "HEAD", "--"], e.path, "getIndexChanges", {
              successExitCodes: new Set([0, 128]),
            });
            128 === n.exitCode &&
              (n = await $o(
                [...t, "4b825dc642cb6eb9a060e54bf8d69288fbee4904"],
                e.path,
                "getIndexChanges"
              ));
            const r = new Map(),
              i = n.stdout.split("\0");
            for (let e = 0; e < i.length - 1; e += 2) {
              const t = Ll(i[e]),
                n = i[e + 1];
              r.set(n, t);
            }
            return r;
          })(this.repository),
          s = n.filter((e) => o.has(e)),
          a = t.filter((e) => r.find((t) => t.path === e)),
          l = t.filter((e) => -1 === a.indexOf(e) || o.get(e) !== Ol.Added);
        await this.performFailableOperation(async () => {
          a.length > 0 &&
            (await (async function (e, t) {
              0 !== t.length &&
                (await $o(
                  ["submodule", "update", "--recursive", "--force", "--", ...t],
                  e.path,
                  "updateSubmodule"
                ));
            })(this.repository, a)),
            await (async function (e, t, n, r) {
              if (!r.length) return;
              const i = xa(t, n);
              if (2 === t) {
                const t = [...i, "--stdin", "-z", "--"];
                await $o(t, e.path, "resetPaths", { stdin: r.join("\0") });
              } else {
                const t = [...i, "--", ...r];
                await $o(t, e.path, "resetPaths");
              }
            })(this.repository, 2, "HEAD", s),
            await (async function (e, t) {
              t.length &&
                (await $o(
                  ["checkout-index", "-f", "-u", "-q", "--stdin", "-z"],
                  e.path,
                  "checkoutIndex",
                  { stdin: t.join("\0") }
                ));
            })(this.repository, l);
        });
      }
      async discardChangesFromSelection(e, t, n) {
        await this.performFailableOperation(() => Fs(this.repository, e, t, n));
      }
      async revertCommit(e, t, n, r) {
        await this.performFailableOperation(() =>
          (async function (e, t, n, r) {
            const i = [...(await Zo(e, n)), "revert"];
            t.parentSHAs.length > 1 && i.push("-m", "1"), i.push(t.sha);
            let o = {};
            if (r) {
              const t = await Js(n, Xs(n, e));
              o = await ba({ env: t, trackLFSProgress: !0 }, new Nl(), (e) => {
                const t = "progress" === e.kind ? e.details.text : e.text,
                  n = "progress" === e.kind ? e.details.title : "",
                  i = e.percent;
                r({ kind: "revert", description: t, value: i, title: n });
              });
            }
            await $o(i, e.path, "revert", o);
          })(e, t, n, r)
        ),
          this.emitUpdate();
      }
      async updateExistingUpstreamRemote() {
        const e = J(
            "To update an upstream remote, the repository must be a GitHub repository",
            this.repository.gitHubRepository
          ),
          t = J(
            "To update an upstream remote, the repository must have a parent",
            e.parent
          ),
          n = J("Parent repositories are always fully loaded", t.cloneURL);
        await this.performFailableOperation(() =>
          Vs(this.repository, "upstream", n)
        );
      }
      async getCompareCommits(e, t) {
        if (this.tip.kind !== so.Valid) return null;
        const n = this.tip.branch,
          r = await Va(this.repository, ja(n.name, e.name));
        if (null == r) return null;
        const i = t === q.Ahead ? Wa(e.name, n.name) : Wa(n.name, e.name),
          o = t === q.Ahead ? r.ahead : r.behind,
          s = await Na(this.repository, i, o);
        return (
          s.length > 0 && this.storeCommits(s),
          { commits: s, ahead: r.ahead, behind: r.behind }
        );
      }
      async pruneForkedRemotes(e) {
        const t = await Us(this.repository),
          n = new Set();
        for (const t of e)
          null !== t.head.gitHubRepository.cloneURL &&
            n.add(t.head.gitHubRepository.cloneURL);
        for (const e of t)
          e.name.startsWith("github-desktop-") &&
            !n.has(e.url) &&
            (await js(this.repository, e.name));
      }
    }
    class tu {
      constructor(e, t, n, r) {
        (this.shell = e),
          (this.statsStore = t),
          (this.onGitStoreUpdated = n),
          (this.onDidError = r),
          (this.gitStores = new Map());
      }
      remove(e) {
        this.gitStores.has(e.hash) && this.gitStores.delete(e.hash);
      }
      get(e) {
        let t = this.gitStores.get(e.hash);
        return (
          void 0 === t &&
            ((t = new eu(e, this.shell, this.statsStore)),
            t.onDidUpdate(() => this.onGitStoreUpdated(e, t)),
            t.onDidError((e) => this.onDidError(e)),
            this.gitStores.set(e.hash, t)),
          t
        );
      }
    }
    function nu(e, t, n) {
      const r = e.conflictState,
        i = (function (e, t) {
          if (e.mergeHeadFound) {
            const { currentBranch: n, currentTip: r } = e;
            return null == n || null == r
              ? null
              : {
                  kind: "merge",
                  currentBranch: n,
                  currentTip: r,
                  manualResolutions: t,
                };
          }
          if (null !== e.rebaseInternalState) {
            const { currentTip: n } = e;
            if (null == n) return null;
            const {
              targetBranch: r,
              originalBranchTip: i,
              baseBranchTip: o,
            } = e.rebaseInternalState;
            return {
              kind: "rebase",
              currentTip: n,
              manualResolutions: t,
              targetBranch: r,
              originalBranchTip: i,
              baseBranchTip: o,
            };
          }
          return null;
        })(t, null !== r ? r.manualResolutions : new Map());
      return null == r && null == i
        ? null
        : (null != r && !Y(r)) || (null != i && !Y(i))
        ? ((null != r && !Q(r)) ||
            (null != i && !Q(i)) ||
            (function (e, t, n, r) {
              const i = null != e ? e.targetBranch : null,
                o = null != t ? t.targetBranch : null;
              if (null != i && null != o && i !== o)
                return void r.recordRebaseAbortedAfterConflicts();
              const { currentTip: s, currentBranch: a } = n;
              if (null != e && null == t && null != s && null != a) {
                (e.originalBranchTip !== s && a === e.targetBranch) ||
                  r.recordRebaseAbortedAfterConflicts();
              }
            })(r, i, t, n),
          i)
        : ((function (e, t, n, r) {
            const i = null != e ? e.currentBranch : null,
              o = null != t ? t.currentBranch : null;
            if (null != i && null != o && i !== o)
              return void r.recordMergeAbortedAfterConflicts();
            const { currentTip: s } = n;
            if (null != e && null == t && null != s) {
              e.currentTip !== s
                ? r.recordMergeSuccessAfterConflicts()
                : r.recordMergeAbortedAfterConflicts();
            }
          })(r, i, t, n),
          i);
    }
    const ru = [
        "HEAD",
        "refs/heads/main",
        "refs/heads/master",
        "refs/heads/gh-pages",
        "refs/heads/develop",
        "refs/heads/dev",
        "refs/heads/development",
        "refs/heads/trunk",
        "refs/heads/devel",
        "refs/heads/release",
      ],
      iu = { enforcePruneThreshold: !0, deleteBranch: !0 };
    class ou {
      constructor(e, t, n, r, i) {
        (this.repository = e),
          (this.gitStoreCache = t),
          (this.repositoriesStore = n),
          (this.repositoriesStateCache = r),
          (this.onPruneCompleted = i),
          (this.timer = null);
      }
      async start() {
        null !== this.timer &&
          Z(
            "A background prune task is already active and cannot begin pruning on " +
              this.repository.name
          ),
          await this.pruneLocalBranches(iu),
          (this.timer = window.setInterval(
            () => this.pruneLocalBranches(iu),
            144e5
          ));
      }
      stop() {
        null !== this.timer && (clearInterval(this.timer), (this.timer = null));
      }
      async testPrune() {
        return this.pruneLocalBranches({
          enforcePruneThreshold: !1,
          deleteBranch: !1,
        });
      }
      async findBranchesMergedIntoDefaultBranch(e, t) {
        const n = this.gitStoreCache.get(e),
          r = await n.performFailableOperation(() =>
            (async function (e, t) {
              const n = Ns(t),
                r = [
                  "branch",
                  "--format=%(objectname)%00%(refname)",
                  "--merged",
                  t,
                ],
                { stdout: i } = await $o(r, e.path, "mergedBranches"),
                o = i.split("\n");
              o.splice(-1, 1);
              const s = new Map();
              for (const e of o) {
                const [t, r] = e.split("\0");
                void 0 !== t && void 0 !== r && r !== n && s.set(r, t);
              }
              return s;
            })(e, t.name)
          );
        if (void 0 === r) return new Map();
        const i = await Bs(e, "HEAD");
        return i && r.delete(i), r;
      }
      async pruneLocalBranches(e) {
        if (!co(this.repository)) return;
        const t = await this.repositoriesStore.getLastPruneDate(
            this.repository
          ),
          n = k()(),
          r = n.subtract(24, "hours");
        if (e.enforcePruneThreshold && null != t && r.isBefore(t))
          return void log.info(
            `[BranchPruner] Last prune took place ${k()(t).from(n)} - skipping`
          );
        await this.repositoriesStore.updateLastPruneDate(
          this.repository,
          Date.now()
        );
        const { branchesState: i } = this.repositoriesStateCache.get(
            this.repository
          ),
          { defaultBranch: o, allBranches: s } = i;
        if (null === o) return;
        const a = await this.findBranchesMergedIntoDefaultBranch(
          this.repository,
          o
        );
        if (0 === a.size)
          return void log.info("[BranchPruner] No branches to prune.");
        const l = k()().subtract(2, "weeks").toDate(),
          c = await (async function (e, t) {
            const n = new RegExp(
                /^[a-z0-9]{40}\sHEAD@{(.*)}\scheckout: moving from\s.*\sto\s(.*)$/
              ),
              r = await $o(
                [
                  "reflog",
                  "--date=iso",
                  `--after="${t.toISOString()}"`,
                  "--pretty=%H %gd %gs",
                  "--grep-reflog=checkout: moving from .* to .*$",
                  "--",
                ],
                e.path,
                "getCheckoutsAfterDate",
                { successExitCodes: new Set([0, 128]) }
              ),
              i = new Map();
            if (128 === r.exitCode && Ua.test(r.stderr)) return i;
            const o = r.stdout.split("\n");
            for (const e of o) {
              const t = n.exec(e);
              if (null === t || 3 !== t.length) continue;
              const [, r, o] = t;
              i.has(o) || i.set(o, new Date(r));
            }
            return i;
          })(this.repository, l),
          u = new Set([...c.keys()].map(Ns)),
          h = (await Ia(this.repository, "refs/remotes/")).map((e) =>
            Ns(e.name)
          ),
          d = Array.from(a.keys()).filter((e) => {
            if (ru.includes(e)) return !1;
            if (u.has(e)) return !1;
            const t = (function (e, t) {
              const n = t.find((t) => Ns(t.name) === e);
              if (void 0 === n) return;
              const { upstream: r } = n;
              if (null === r) return;
              return Ns(r);
            })(e, s);
            return void 0 !== t && !h.includes(t);
          });
        log.info(
          `[BranchPruner] Pruning ${d.length} branches that have been merged into the default branch, ${o.name} (${o.tip.sha}), from '${this.repository.name}`
        );
        const p = this.gitStoreCache.get(this.repository);
        for (const t of d) {
          if (!t.startsWith("refs/heads/")) continue;
          const n = t.substr("refs/heads/".length);
          if (e.deleteBranch) {
            (await p.performFailableOperation(() => ea(this.repository, n))) &&
              log.info(`[BranchPruner] Pruned branch ${n} ((was ${a.get(t)}))`);
          } else log.info(`[BranchPruner] Branch '${n}' marked for deletion`);
        }
        this.onPruneCompleted(this.repository);
      }
    }
    var su, au;
    !(function (e) {
      (e.SuccessfulMerge = "SuccessfulMerge"),
        (e.MergeConflictsFound = "MergeConflictsFound"),
        (e.SuccessfulRebase = "SuccessfulRebase"),
        (e.RebaseConflictsFound = "RebaseConflictsFound"),
        (e.BranchAlreadyUpToDate = "BranchAlreadyUpToDate");
    })(su || (su = {})),
      (function (e) {
        (e.AskForConfirmation = "AskForConfirmation"),
          (e.StashOnCurrentBranch = "StashOnCurrentBranch"),
          (e.MoveToNewBranch = "MoveToNewBranch");
      })(au || (au = {}));
    const lu = au.AskForConfirmation;
    var cu = n(132),
      uu = n.n(cu);
    function hu(e, t) {
      return uu()(e, t, { strict: !0 });
    }
    function du(e, t) {
      if (Object.is(e, t)) return !0;
      if (
        null === e ||
        null === t ||
        "object" != typeof e ||
        "object" != typeof t
      )
        return !1;
      const n = Object.keys(e),
        r = Object.keys(t);
      if (n.length !== r.length) return !1;
      for (let r = 0; r < n.length; r++) {
        const i = n[r];
        if (
          !Object.prototype.hasOwnProperty.call(t, i) ||
          !Object.is(e[i], t[i])
        )
          return !1;
      }
      return !0;
    }
    function pu(e, t) {
      if (e === t) return !0;
      if (e.length !== t.length) return !1;
      for (let n = 0; n < e.length; n++) if (e[n] !== t[n]) return !1;
      return !0;
    }
    function fu(e, t) {
      if (e === t) return !0;
      if (e.size !== t.size) return !1;
      for (const n of e.keys()) if (!t.has(n)) return !1;
      return !0;
    }
    function mu(e, t, n) {
      return e.kind !== so.Valid
        ? null
        : null !== e.branch.upstreamWithoutRemote &&
          null !== t &&
          (function (e, t) {
            return null !== t.cloneURL && _t(t.cloneURL, e);
          })(t.url, n)
        ? e.branch.upstreamWithoutRemote
        : e.branch.nameWithoutRemote;
    }
    var gu;
    function yu(e) {
      return e !== gu.NotApplicable && e !== gu.Paused;
    }
    !(function (e) {
      (e.NotApplicable = "NotApplicable"),
        (e.PickEditor = "PickEditor"),
        (e.CreateBranch = "CreateBranch"),
        (e.EditFile = "EditFile"),
        (e.MakeCommit = "MakeCommit"),
        (e.PushBranch = "PushBranch"),
        (e.OpenPullRequest = "OpenPullRequest"),
        (e.AllDone = "AllDone"),
        (e.Paused = "Paused");
    })(gu || (gu = {}));
    const vu = [
      gu.PickEditor,
      gu.CreateBranch,
      gu.EditFile,
      gu.MakeCommit,
      gu.PushBranch,
      gu.OpenPullRequest,
      gu.AllDone,
    ];
    class wu {
      constructor(e) {
        (this.getResolvedExternalEditor = e),
          (this.installEditorSkipped = we(
            "tutorial-install-editor-skipped",
            !1
          )),
          (this.prStepComplete = we("tutorial-pull-request-step-complete", !1)),
          (this.tutorialPaused = we("tutorial-paused", !1)),
          (this.skipPickEditor = () => {
            (this.installEditorSkipped = !0),
              be("tutorial-install-editor-skipped", this.installEditorSkipped);
          }),
          (this.markPullRequestTutorialStepAsComplete = () => {
            (this.prStepComplete = !0),
              be("tutorial-pull-request-step-complete", this.prStepComplete);
          }),
          (this.onNewTutorialRepository = () => {
            (this.installEditorSkipped = !1),
              localStorage.removeItem("tutorial-install-editor-skipped"),
              (this.prStepComplete = !1),
              localStorage.removeItem("tutorial-pull-request-step-complete"),
              (this.tutorialPaused = !1),
              localStorage.removeItem("tutorial-paused");
          });
      }
      async getCurrentStep(e, t) {
        return e
          ? this.tutorialPaused
            ? gu.Paused
            : (await this.isEditorInstalled())
            ? this.isBranchCheckedOut(t)
              ? this.hasChangedFile(t)
                ? this.hasMultipleCommits(t)
                  ? this.commitPushed(t)
                    ? this.pullRequestCreated(t)
                      ? gu.AllDone
                      : gu.OpenPullRequest
                    : gu.PushBranch
                  : gu.MakeCommit
                : gu.EditFile
              : gu.CreateBranch
            : gu.PickEditor
          : (this.tutorialPaused && this.resumeTutorial(), gu.NotApplicable);
      }
      async isEditorInstalled() {
        return (
          this.installEditorSkipped || null !== this.getResolvedExternalEditor()
        );
      }
      isBranchCheckedOut(e) {
        const { branchesState: t } = e,
          { tip: n } = t,
          r = n.kind === so.Valid ? n.branch.name : null,
          i = null !== t.defaultBranch ? t.defaultBranch.name : null;
        return null !== r && null !== i && r !== i;
      }
      hasChangedFile(e) {
        if (this.hasMultipleCommits(e)) return !0;
        const { changesState: t } = e;
        return t.workingDirectory.files.length > 0;
      }
      hasMultipleCommits(e) {
        const { branchesState: t } = e,
          { tip: n } = t;
        if (n.kind === so.Valid) {
          const t = e.commitLookup.get(n.branch.tip.sha);
          return void 0 !== t && t.parentSHAs.some((e) => e.length > 0);
        }
        return !1;
      }
      commitPushed(e) {
        const { aheadBehind: t } = e;
        return null !== t && 0 === t.ahead;
      }
      pullRequestCreated(e) {
        return (
          null !== e.branchesState.currentPullRequest &&
            this.markPullRequestTutorialStepAsComplete(),
          this.prStepComplete
        );
      }
      pauseTutorial() {
        (this.tutorialPaused = !0), be("tutorial-paused", this.tutorialPaused);
      }
      resumeTutorial() {
        (this.tutorialPaused = !1), be("tutorial-paused", this.tutorialPaused);
      }
    }
    function bu(e, t, n) {
      return null == e.upstreamWithoutRemote
        ? null
        : t.find((t) => Su(e, t, n)) || null;
    }
    function Su(e, t, n) {
      return (
        t.head.ref === e.upstreamWithoutRemote && Dt(t.head.gitHubRepository, n)
      );
    }
    function Cu(e) {
      return e.endpoint === gt()
        ? "GitHub.com"
        : _e.parse(e.endpoint).hostname || e.endpoint;
    }
    async function Eu(e, t, n, r) {
      var o;
      const s = Cu(e);
      if ((r("Creating repository on " + s, 0), await Object(_i.pathExists)(n)))
        throw new Error(
          `The path '${n}' already exists. Please move it out of the way, or remove it, and then try again.`
        );
      const a = await (async function (e, t) {
          const n = new ht(e.endpoint, e.token);
          try {
            return await n.createRepository(
              null,
              t,
              "GitHub Desktop tutorial repository",
              !0
            );
          } catch (n) {
            if (
              n instanceof Ue &&
              422 === n.responseStatus &&
              null !== n.apiError &&
              "Repository creation failed." === n.apiError.message &&
              n.apiError.errors &&
              n.apiError.errors.some(
                (e) => "name already exists on this account" === e.message
              )
            )
              throw new Error(
                `You already have a repository named "${t}" on your account at ${Cu(
                  e
                )}.\n\nPlease delete the repository and try again.`
              );
            throw n;
          }
        })(e, t),
        l = null !== (o = a.default_branch) && void 0 !== o ? o : "main";
      r("Initializing local repository", 0.2),
        await Object(_i.ensureDir)(n),
        await $o(["init"], n, "tutorial:init"),
        "master" !== l &&
          (await $o(["checkout", "-b", l], n, "tutorial:rename-branch")),
        await Object(_i.writeFile)(
          i.join(n, "README.md"),
          "# Welcome to GitHub Desktop!\r\n\r\nThis is your README. READMEs are where you can communicate what your project is and how to use it.\r\n\r\nWrite your name on line 6, save it, and then head back to GitHub Desktop.\r\n"
        ),
        await $o(["add", "--", "README.md"], n, "tutorial:add"),
        await $o(["commit", "-m", "Initial commit"], n, "tutorial:commit");
      const c = { name: "origin", url: a.clone_url };
      return (
        await $o(["remote", "add", c.name, c.url], n, "tutorial:add-remote"),
        await (async function (e, t, n, r, i) {
          const o = "Pushing repository to " + Cu(t);
          i(o, 0);
          const s = await ba({ env: await Js(t, n.url) }, new ua(), (e) => {
              "progress" === e.kind && i(o, e.percent, e.details.text);
            }),
            a = ["push", "-u", n.name, r];
          await $o(a, e, "tutorial:push", s);
        })(n, e, c, l, (e, t, n) => {
          r(e, 0.3 + 0.6 * t, n);
        }),
        r("Finalizing tutorial repository", 0.9),
        a
      );
    }
    let ku = void 0;
    function xu(e, t) {
      if (uh()) return;
      const n = Date.now();
      (void 0 !== ku && n - ku < 6e4) ||
        ((ku = n), process.emit("send-non-fatal-exception", t, { kind: e }));
    }
    function Ru() {
      return (
        localStorage.getItem("last-clone-location") ||
        i.join(
          (function () {
            if (!Ne) {
              const e = Be();
              try {
                Ne = e.getPath("documents");
              } catch (t) {
                Ne = e.getPath("home");
              }
            }
            return Ne;
          })(),
          "GitHub"
        )
      );
    }
    function Tu(e) {
      localStorage.setItem("last-clone-location", e);
    }
    const Du = Math.ceil(3e4 * Math.random());
    class Au {
      constructor(e, t) {
        (this.getRepositories = e),
          (this.refreshRepositoryIndicators = t),
          (this.running = !1),
          (this.refreshTimeoutId = null),
          (this.paused = !1),
          (this.pausePromise = Promise.resolve()),
          (this.resolvePausePromise = null),
          (this.lastRefreshStartedAt = null);
      }
      start() {
        this.running ||
          (log.debug("[RepositoryIndicatorUpdater] Starting"),
          (this.running = !0),
          this.scheduleRefresh());
      }
      scheduleRefresh() {
        if (this.running && null === this.refreshTimeoutId) {
          const e =
              null === this.lastRefreshStartedAt
                ? 1 / 0
                : Date.now() - this.lastRefreshStartedAt,
            t = Math.max(9e5 - e, 0) + Du,
            n = isFinite(e) ? (e / 1e3).toFixed(3) + "s ago" : "never",
            r = (t / 1e3).toFixed(3) + "s";
          log.debug(
            `[RepositoryIndicatorUpdater] Last refresh: ${n}, scheduling in ${r}`
          ),
            (this.refreshTimeoutId = window.setTimeout(
              () => this.refreshAllRepositories(),
              t
            ));
        }
      }
      async refreshAllRepositories() {
        if (
          ((this.refreshTimeoutId = null),
          log.debug(
            "[RepositoryIndicatorUpdater] Running refreshAllRepositories"
          ),
          this.paused &&
            (log.debug(
              "[RepositoryIndicatorUpdater] Paused before starting refreshAllRepositories"
            ),
            await this.pausePromise,
            !this.running))
        )
          return;
        let e;
        this.lastRefreshStartedAt = Date.now();
        const t = new Set(),
          n = () => this.getRepositories().find((e) => !t.has(e.id)),
          r = Date.now();
        let i = 0;
        for (; this.running && void 0 !== (e = n()); ) {
          if ((await this.refreshRepositoryIndicators(e), this.paused)) {
            log.debug(
              `[RepositoryIndicatorUpdater] Pausing after ${t.size} repositories`
            );
            const e = Date.now();
            await this.pausePromise,
              (i += Date.now() - e),
              log.debug(
                `[RepositoryIndicatorUpdater] Resuming after ${i / 1e3}s`
              );
          }
          t.add(e.id);
        }
        if (t.size >= 1) {
          const e = Date.now() - r,
            n = ((e - i) / 1e3).toFixed(1),
            o = (i / 1e3).toFixed(1),
            s = (e / 1e3).toFixed(1);
          log.info(
            `[RepositoryIndicatorUpdater]: Refreshing sidebar indicators for ${t.size} repositories took ${n}s of which ${o}s paused, total ${s}s`
          );
        }
        this.scheduleRefresh();
      }
      clearRefreshTimeout() {
        null !== this.refreshTimeoutId &&
          (window.clearTimeout(), (this.refreshTimeoutId = null));
      }
      stop() {
        this.running &&
          (log.debug("[RepositoryIndicatorUpdater] Stopping"),
          (this.running = !1),
          this.clearRefreshTimeout());
      }
      pause() {
        !1 === this.paused &&
          ((this.pausePromise = new Promise((e) => {
            this.resolvePausePromise = e;
          })),
          (this.paused = !0));
      }
      resume() {
        this.paused &&
          (null !== this.resolvePausePromise &&
            (this.resolvePausePromise(), (this.resolvePausePromise = null)),
          (this.paused = !1));
      }
    }
    function _u(e) {
      const t = e.emails;
      if (0 === t.length) return Iu(e.id, e.login, e.endpoint);
      const n = t.find((e) => e.primary);
      if (n && ("public" === (r = n).visibility || !r.visibility))
        return n.email;
      var r;
      const i = "@" + Mu(e.endpoint),
        o = t.find((e) => e.email.toLowerCase().endsWith(i));
      return o ? o.email : t[0].email;
    }
    function Mu(e) {
      return gt() !== e
        ? "users.noreply." + _e.parse(e).hostname
        : "users.noreply.github.com";
    }
    function Pu(e, t) {
      return `${e}@${Mu(t)}`;
    }
    function Iu(e, t, n) {
      return `${e}+${t}@${Mu(n)}`;
    }
    const Ou = [".cmd", ".exe", ".bat", ".sh"];
    function Lu(e) {
      return -1 === Ou.indexOf(e.toLowerCase());
    }
    function Fu() {
      return we("show-side-by-side-diff", !1);
    }
    const Nu = Gi.TwoUp;
    class Bu {
      constructor(e, t, n) {
        (this.login = e), (this.endpoint = t), (this.id = n);
      }
      get hash() {
        return `${this.login}+${this.endpoint}+${this.id}`;
      }
    }
    function Hu(e, t) {
      return `${zu(e)}${t}`;
    }
    function zu(e) {
      return e + "-";
    }
    let Uu = null;
    function Wu(e) {
      return new Promise((t, n) => {
        Uu = { state: Je(), endpoint: e, resolve: t, reject: n };
        const r = (function (e, t) {
          const n = mt(e),
            r = vt(e),
            i = encodeURIComponent(r.join(" "));
          return `${n}/login/oauth/authorize?client_id=${rt}&scope=${i}&state=${t}`;
        })(e, Uu.state);
        te.openExternal(r);
      });
    }
    async function ju(e, t) {
      if (!Uu || t !== Uu.state)
        return void log.warn(
          "requestAuthenticatedUser was not called with valid OAuth state. This is likely due to a browser reloading the callback URL. Contact GitHub Support if you believe this is an error"
        );
      const n = await (async function (e, t) {
        try {
          const n = mt(e),
            r = await je(n, null, "POST", "login/oauth/access_token", {
              client_id: rt,
              client_secret: it,
              code: t,
            });
          return (await Ge(r)).access_token;
        } catch (t) {
          return (
            log.warn("requestOAuthToken: failed with endpoint " + e, t), null
          );
        }
      })(Uu.endpoint, e);
      return n ? ft(Uu.endpoint, n) : null;
    }
    function Vu(e) {
      Uu ||
        Z("`askUserToOAuth` must be called before rejecting an auth request."),
        Uu.reject(e),
        (Uu = null);
    }
    const Gu = new Set(["https:", "http:"]);
    function $u(e) {
      return `Unable to authenticate. The account ${e} is lacking a verified email address. Please sign in to GitHub.com, confirm your email address in the Emails section under Personal settings, and try again.`;
    }
    const qu =
      "The GitHub Enterprise Server version does not support GitHub Desktop. Talk to your server's administrator about upgrading to the latest version of GitHub Enterprise Server.";
    var Ku, Yu;
    !(function (e) {
      (e.EndpointEntry = "EndpointEntry"),
        (e.Authentication = "Authentication"),
        (e.TwoFactorAuthentication = "TwoFactorAuthentication"),
        (e.Success = "Success");
    })(Ku || (Ku = {})),
      (function (e) {
        (e.Basic = "basic"), (e.Web = "web");
      })(Yu || (Yu = {}));
    var Qu = n(85),
      Zu = n.n(Qu);
    class Xu extends ai {
      constructor(e, t) {
        super(e), (this.schemaVersion = t);
      }
      async conditionalVersion(e, t, n) {
        if (null != this.schemaVersion && this.schemaVersion < e) return;
        const r = this.version(e).stores(t);
        null != n && (await r.upgrade(n));
      }
    }
    function Ju(e, t) {
      return [e.dbID, t];
    }
    class eh {
      constructor(e, t, n) {
        (this.ref = e), (this.sha = t), (this.gitHubRepository = n);
      }
    }
    class th {
      constructor(e, t, n, r, i, o, s) {
        (this.created = e),
          (this.title = t),
          (this.pullRequestNumber = n),
          (this.head = r),
          (this.base = i),
          (this.author = o),
          (this.draft = s);
      }
    }
    function nh(e) {
      const t = e.owner.login;
      return { name: e.name, owner: t };
    }
    class rh {
      constructor(e, t, n) {
        (this.repository = e),
          (this.account = t),
          (this.coordinator = n),
          (this.timeoutId = null),
          (this.running = !1);
      }
      start() {
        this.running || ((this.running = !0), this.scheduleTick(12e4));
      }
      getTimeSinceLastRefresh() {
        const e = this.coordinator.getLastRefreshed(this.repository);
        return void 0 === e ? 1 / 0 : Date.now() - e;
      }
      scheduleTick(e = 18e5) {
        if (this.running) {
          const t = Math.max(e - this.getTimeSinceLastRefresh(), 0);
          this.timeoutId = window.setTimeout(() => this.tick(), t);
        }
      }
      tick() {
        this.running &&
          ((this.timeoutId = null),
          this.getTimeSinceLastRefresh() < 12e4 && this.scheduleTick(),
          this.coordinator
            .refreshPullRequests(this.repository, this.account)
            .catch(() => {})
            .then(() => this.scheduleTick()));
      }
      stop() {
        this.running &&
          (null !== this.timeoutId &&
            (window.clearTimeout(this.timeoutId), (this.timeoutId = null)),
          (this.running = !1));
      }
    }
    function ih(e, t) {
      const { dbID: n } = e;
      return t.filter((e) => fo(e).dbID === n);
    }
    const oh = "https://desktop.github.com/usage-data/",
      sh = {
        commits: 0,
        partialCommits: 0,
        openShellCount: 0,
        coAuthoredCommits: 0,
        branchComparisons: 0,
        defaultBranchComparisons: 0,
        mergesInitiatedFromComparison: 0,
        updateFromDefaultBranchMenuCount: 0,
        mergeIntoCurrentBranchMenuCount: 0,
        prBranchCheckouts: 0,
        repoWithIndicatorClicked: 0,
        repoWithoutIndicatorClicked: 0,
        dotcomPushCount: 0,
        dotcomForcePushCount: 0,
        enterprisePushCount: 0,
        enterpriseForcePushCount: 0,
        externalPushCount: 0,
        externalForcePushCount: 0,
        active: !1,
        mergeConflictFromPullCount: 0,
        mergeConflictFromExplicitMergeCount: 0,
        mergedWithLoadingHintCount: 0,
        mergedWithCleanMergeHintCount: 0,
        mergedWithConflictWarningHintCount: 0,
        mergeSuccessAfterConflictsCount: 0,
        mergeAbortedAfterConflictsCount: 0,
        unattributedCommits: 0,
        enterpriseCommits: 0,
        dotcomCommits: 0,
        mergeConflictsDialogDismissalCount: 0,
        anyConflictsLeftOnMergeConflictsDialogDismissalCount: 0,
        mergeConflictsDialogReopenedCount: 0,
        guidedConflictedMergeCompletionCount: 0,
        unguidedConflictedMergeCompletionCount: 0,
        createPullRequestCount: 0,
        rebaseConflictsDialogDismissalCount: 0,
        rebaseConflictsDialogReopenedCount: 0,
        rebaseAbortedAfterConflictsCount: 0,
        rebaseSuccessAfterConflictsCount: 0,
        rebaseSuccessWithoutConflictsCount: 0,
        pullWithRebaseCount: 0,
        pullWithDefaultSettingCount: 0,
        stashEntriesCreatedOutsideDesktop: 0,
        errorWhenSwitchingBranchesWithUncommmittedChanges: 0,
        rebaseCurrentBranchMenuCount: 0,
        stashViewedAfterCheckoutCount: 0,
        stashCreatedOnCurrentBranchCount: 0,
        stashNotViewedAfterCheckoutCount: 0,
        changesTakenToNewBranchCount: 0,
        stashRestoreCount: 0,
        stashDiscardCount: 0,
        stashViewCount: 0,
        noActionTakenOnStashCount: 0,
        suggestedStepOpenInExternalEditor: 0,
        suggestedStepOpenWorkingDirectory: 0,
        suggestedStepViewOnGitHub: 0,
        suggestedStepPublishRepository: 0,
        suggestedStepPublishBranch: 0,
        suggestedStepCreatePullRequest: 0,
        suggestedStepViewStash: 0,
        commitsToProtectedBranch: 0,
        commitsToRepositoryWithBranchProtections: 0,
        tutorialStarted: !1,
        tutorialRepoCreated: !1,
        tutorialEditorInstalled: !1,
        tutorialBranchCreated: !1,
        tutorialFileEdited: !1,
        tutorialCommitCreated: !1,
        tutorialBranchPushed: !1,
        tutorialPrCreated: !1,
        tutorialCompleted: !1,
        highestTutorialStepCompleted: -1,
        commitsToRepositoryWithoutWriteAccess: 0,
        forksCreated: 0,
        issueCreationWebpageOpenedCount: 0,
        tagsCreatedInDesktop: 0,
        tagsCreated: 0,
        tagsDeleted: 0,
        diffModeChangeCount: 0,
        diffOptionsViewedCount: 0,
        repositoryViewChangeCount: 0,
        unhandledRejectionCount: 0,
      };
    function ah(e) {
      null === localStorage.getItem(e) && Ce(e, Date.now());
    }
    function lh(e) {
      const t = Se(e);
      return void 0 === t ? null : t;
    }
    function ch(e) {
      const t = lh("welcome-wizard-initiated-at");
      if (null === t) return;
      const n = lh(e);
      return null === n || n <= t ? -1 : Math.round((n - t) / 1e3);
    }
    function uh() {
      return we("stats-opt-out");
    }
    var hh;
    !(function (e) {
      (e[(e.Accounts = 0)] = "Accounts"),
        (e[(e.Integrations = 1)] = "Integrations"),
        (e[(e.Git = 2)] = "Git"),
        (e[(e.Appearance = 3)] = "Appearance"),
        (e[(e.Prompts = 4)] = "Prompts"),
        (e[(e.Advanced = 5)] = "Advanced");
    })(hh || (hh = {}));
    var dh = n(3),
      ph = n.n(dh);
    class fh extends w.Component {
      constructor() {
        super(...arguments),
          (this.onWindowStateChanged = (e, t) => {
            this.setState({ windowState: t });
          }),
          (this.onMinimize = () => {
            r.remote.getCurrentWindow().minimize();
          }),
          (this.onMaximize = () => {
            r.remote.getCurrentWindow().maximize();
          }),
          (this.onRestore = () => {
            r.remote.getCurrentWindow().unmaximize();
          }),
          (this.onClose = () => {
            r.remote.getCurrentWindow().close();
          });
      }
      componentWillMount() {
        this.setState({ windowState: yc(r.remote.getCurrentWindow()) }),
          r.ipcRenderer.on("window-state-changed", this.onWindowStateChanged);
      }
      componentWillUnmount() {
        r.ipcRenderer.removeListener(
          "window-state-changed",
          this.onWindowStateChanged
        );
      }
      shouldComponentUpdate(e, t) {
        return t.windowState !== this.state.windowState;
      }
      renderButton(e, t, n) {
        const r = ph()("window-control", e),
          i = e[0].toUpperCase() + e.substring(1);
        return w.createElement(
          "button",
          { "aria-label": e, title: i, tabIndex: -1, className: r, onClick: t },
          w.createElement(
            "svg",
            {
              "aria-hidden": "true",
              version: "1.1",
              width: "10",
              height: "10",
            },
            w.createElement("path", { d: n })
          )
        );
      }
      render() {
        const e = this.renderButton(
            "minimize",
            this.onMinimize,
            "M 0,5 10,5 10,6 0,6 Z"
          ),
          t =
            "maximized" === this.state.windowState
              ? this.renderButton(
                  "restore",
                  this.onRestore,
                  "m 2,1e-5 0,2 -2,0 0,8 8,0 0,-2 2,0 0,-8 z m 1,1 6,0 0,6 -1,0 0,-5 -5,0 z m -2,2 6,0 0,6 -6,0 z"
                )
              : this.renderButton(
                  "maximize",
                  this.onMaximize,
                  "M 0,0 0,10 10,10 10,0 Z M 1,1 9,1 9,9 1,9 Z"
                ),
          n = this.renderButton(
            "close",
            this.onClose,
            "M 0,0 0,0.7 4.3,5 0,9.3 0,10 0.7,10 5,5.7 9.3,10 10,10 10,9.3 5.7,5 10,0.7 10,0 9.3,0 5,4.3 0.7,0 Z"
          );
        return w.createElement(
          "div",
          { className: "window-controls" },
          e,
          t,
          n
        );
      }
    }
    const mh = new Set();
    function gh(e) {
      const t = ("__" + e).replace(/[^a-z0-9\-_:.]+/gi, "_");
      for (let e = 0; e < 100; e++) {
        const n = e > 0 ? `${t}_${e}` : t;
        if (!mh.has(n)) return mh.add(n), n;
      }
      return Je();
    }
    function yh(e) {
      mh.delete(e);
    }
    class vh extends w.Component {
      constructor() {
        super(...arguments), (this.titleId = null);
      }
      componentWillUnmount() {
        null !== this.titleId && yh(this.titleId);
      }
      render() {
        const { symbol: e, title: t } = this.props,
          n = `0 0 ${e.w} ${e.h}`,
          r = ph()("octicon", this.props.className);
        let i = void 0,
          o = null;
        t &&
          t.length > 0 &&
          (null === this.titleId && (this.titleId = gh("Octicon_Title")),
          (i = this.titleId),
          (o = w.createElement("title", { id: this.titleId }, t)));
        const s = void 0 === i ? "true" : void 0;
        return w.createElement(
          "svg",
          {
            "aria-labelledby": i,
            "aria-hidden": s,
            className: r,
            version: "1.1",
            viewBox: n,
          },
          o,
          w.createElement("path", { fillRule: e.fr, d: e.d })
        );
      }
    }
    class wh {
      constructor(e, t, n, r) {
        (this.w = e), (this.h = t), (this.d = n), (this.fr = r);
      }
      static get alert() {
        return new wh(
          16,
          16,
          "M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z",
          "evenodd"
        );
      }
      static get archive() {
        return new wh(
          16,
          16,
          "M1.75 2.5a.25.25 0 00-.25.25v1.5c0 .138.112.25.25.25h12.5a.25.25 0 00.25-.25v-1.5a.25.25 0 00-.25-.25H1.75zM0 2.75C0 1.784.784 1 1.75 1h12.5c.966 0 1.75.784 1.75 1.75v1.5A1.75 1.75 0 0114.25 6H1.75A1.75 1.75 0 010 4.25v-1.5zM1.75 7a.75.75 0 01.75.75v5.5c0 .138.112.25.25.25h10.5a.25.25 0 00.25-.25v-5.5a.75.75 0 111.5 0v5.5A1.75 1.75 0 0113.25 15H2.75A1.75 1.75 0 011 13.25v-5.5A.75.75 0 011.75 7zm4.5 1a.75.75 0 000 1.5h3.5a.75.75 0 100-1.5h-3.5z",
          "evenodd"
        );
      }
      static get arrowBoth() {
        return new wh(
          16,
          16,
          "M3.72 3.72a.75.75 0 011.06 1.06L2.56 7h10.88l-2.22-2.22a.75.75 0 011.06-1.06l3.5 3.5a.75.75 0 010 1.06l-3.5 3.5a.75.75 0 11-1.06-1.06l2.22-2.22H2.56l2.22 2.22a.75.75 0 11-1.06 1.06l-3.5-3.5a.75.75 0 010-1.06l3.5-3.5z",
          "evenodd"
        );
      }
      static get arrowDown() {
        return new wh(
          16,
          16,
          "M13.03 8.22a.75.75 0 010 1.06l-4.25 4.25a.75.75 0 01-1.06 0L3.47 9.28a.75.75 0 011.06-1.06l2.97 2.97V3.75a.75.75 0 011.5 0v7.44l2.97-2.97a.75.75 0 011.06 0z",
          "evenodd"
        );
      }
      static get arrowDownLeft() {
        return new wh(
          24,
          24,
          "M5.75 8.5a.75.75 0 00-.75.75v9c0 .414.336.75.75.75h9a.75.75 0 000-1.5H7.56L17.78 7.28a.75.75 0 00-1.06-1.06L6.5 16.44V9.25a.75.75 0 00-.75-.75z",
          "evenodd"
        );
      }
      static get arrowDownRight() {
        return new wh(
          24,
          24,
          "M18.25 8.5a.75.75 0 01.75.75v9a.75.75 0 01-.75.75h-9a.75.75 0 010-1.5h7.19L6.22 7.28a.75.75 0 011.06-1.06L17.5 16.44V9.25a.75.75 0 01.75-.75z",
          "evenodd"
        );
      }
      static get arrowLeft() {
        return new wh(
          16,
          16,
          "M7.78 12.53a.75.75 0 01-1.06 0L2.47 8.28a.75.75 0 010-1.06l4.25-4.25a.75.75 0 011.06 1.06L4.81 7h7.44a.75.75 0 010 1.5H4.81l2.97 2.97a.75.75 0 010 1.06z",
          "evenodd"
        );
      }
      static get arrowRight() {
        return new wh(
          16,
          16,
          "M8.22 2.97a.75.75 0 011.06 0l4.25 4.25a.75.75 0 010 1.06l-4.25 4.25a.75.75 0 01-1.06-1.06l2.97-2.97H3.75a.75.75 0 010-1.5h7.44L8.22 4.03a.75.75 0 010-1.06z",
          "evenodd"
        );
      }
      static get arrowUp() {
        return new wh(
          16,
          16,
          "M3.47 7.78a.75.75 0 010-1.06l4.25-4.25a.75.75 0 011.06 0l4.25 4.25a.75.75 0 01-1.06 1.06L9 4.81v7.44a.75.75 0 01-1.5 0V4.81L4.53 7.78a.75.75 0 01-1.06 0z",
          "evenodd"
        );
      }
      static get arrowUpLeft() {
        return new wh(
          24,
          24,
          "M5.75 15.5a.75.75 0 01-.75-.75v-9A.75.75 0 015.75 5h9a.75.75 0 010 1.5H7.56l10.22 10.22a.75.75 0 11-1.06 1.06L6.5 7.56v7.19a.75.75 0 01-.75.75z",
          "evenodd"
        );
      }
      static get arrowUpRight() {
        return new wh(
          24,
          24,
          "M18.25 15.5a.75.75 0 00.75-.75v-9a.75.75 0 00-.75-.75h-9a.75.75 0 000 1.5h7.19L6.22 16.72a.75.75 0 101.06 1.06L17.5 7.56v7.19c0 .414.336.75.75.75z",
          "evenodd"
        );
      }
      static get beaker() {
        return new wh(
          16,
          16,
          "M5 5.782V2.5h-.25a.75.75 0 010-1.5h6.5a.75.75 0 010 1.5H11v3.282l3.666 5.76C15.619 13.04 14.543 15 12.767 15H3.233c-1.776 0-2.852-1.96-1.899-3.458L5 5.782zM9.5 2.5h-3V6a.75.75 0 01-.117.403L4.73 9h6.54L9.617 6.403A.75.75 0 019.5 6V2.5zm-6.9 9.847L3.775 10.5h8.45l1.175 1.847a.75.75 0 01-.633 1.153H3.233a.75.75 0 01-.633-1.153z",
          "evenodd"
        );
      }
      static get bell() {
        return new wh(
          16,
          16,
          "M8 16a2 2 0 001.985-1.75c.017-.137-.097-.25-.235-.25h-3.5c-.138 0-.252.113-.235.25A2 2 0 008 16z",
          void 0
        );
      }
      static get bellFill() {
        return new wh(
          24,
          24,
          "M6 8a6 6 0 1112 0v2.917c0 .703.228 1.387.65 1.95L20.7 15.6a1.5 1.5 0 01-1.2 2.4h-15a1.5 1.5 0 01-1.2-2.4l2.05-2.733a3.25 3.25 0 00.65-1.95V8zm6 13.5A3.502 3.502 0 018.645 19h6.71A3.502 3.502 0 0112 21.5z",
          "evenodd"
        );
      }
      static get bellSlash() {
        return new wh(
          16,
          16,
          "M8 1.5c-.997 0-1.895.416-2.534 1.086A.75.75 0 014.38 1.55 5 5 0 0113 5v2.373a.75.75 0 01-1.5 0V5A3.5 3.5 0 008 1.5zM4.182 4.31L1.19 2.143a.75.75 0 10-.88 1.214L3 5.305v2.642a.25.25 0 01-.042.139L1.255 10.64A1.518 1.518 0 002.518 13h11.108l1.184.857a.75.75 0 10.88-1.214l-1.375-.996a1.196 1.196 0 00-.013-.01L4.198 4.321a.733.733 0 00-.016-.011zm7.373 7.19L4.5 6.391v1.556c0 .346-.102.683-.294.97l-1.703 2.556a.018.018 0 00-.003.01.015.015 0 00.005.012.017.017 0 00.006.004l.007.001h9.037zM8 16a2 2 0 001.985-1.75c.017-.137-.097-.25-.235-.25h-3.5c-.138 0-.252.113-.235.25A2 2 0 008 16z",
          "evenodd"
        );
      }
      static get bold() {
        return new wh(
          16,
          16,
          "M4 2a1 1 0 00-1 1v10a1 1 0 001 1h5.5a3.5 3.5 0 001.852-6.47A3.5 3.5 0 008.5 2H4zm4.5 5a1.5 1.5 0 100-3H5v3h3.5zM5 9v3h4.5a1.5 1.5 0 000-3H5z",
          "evenodd"
        );
      }
      static get book() {
        return new wh(
          16,
          16,
          "M0 1.75A.75.75 0 01.75 1h4.253c1.227 0 2.317.59 3 1.501A3.744 3.744 0 0111.006 1h4.245a.75.75 0 01.75.75v10.5a.75.75 0 01-.75.75h-4.507a2.25 2.25 0 00-1.591.659l-.622.621a.75.75 0 01-1.06 0l-.622-.621A2.25 2.25 0 005.258 13H.75a.75.75 0 01-.75-.75V1.75zm8.755 3a2.25 2.25 0 012.25-2.25H14.5v9h-3.757c-.71 0-1.4.201-1.992.572l.004-7.322zm-1.504 7.324l.004-5.073-.002-2.253A2.25 2.25 0 005.003 2.5H1.5v9h3.757a3.75 3.75 0 011.994.574z",
          "evenodd"
        );
      }
      static get bookmark() {
        return new wh(
          16,
          16,
          "M4.75 2.5a.25.25 0 00-.25.25v9.91l3.023-2.489a.75.75 0 01.954 0l3.023 2.49V2.75a.25.25 0 00-.25-.25h-6.5zM3 2.75C3 1.784 3.784 1 4.75 1h6.5c.966 0 1.75.784 1.75 1.75v11.5a.75.75 0 01-1.227.579L8 11.722l-3.773 3.107A.75.75 0 013 14.25V2.75z",
          "evenodd"
        );
      }
      static get bookmarkFill() {
        return new wh(
          24,
          24,
          "M6.69 2a1.75 1.75 0 00-1.75 1.756L5 21.253a.75.75 0 001.219.583L12 17.21l5.782 4.625A.75.75 0 0019 21.25V3.75A1.75 1.75 0 0017.25 2H6.69z",
          "evenodd"
        );
      }
      static get bookmarkSlash() {
        return new wh(
          16,
          16,
          "M1.19 1.143a.75.75 0 10-.88 1.214L3 4.305v9.945a.75.75 0 001.206.596L8 11.944l3.794 2.902A.75.75 0 0013 14.25v-2.703l1.81 1.31a.75.75 0 10.88-1.214l-2.994-2.168a1.09 1.09 0 00-.014-.01L4.196 3.32a.712.712 0 00-.014-.01L1.19 1.143zM4.5 5.39v7.341l3.044-2.328a.75.75 0 01.912 0l3.044 2.328V10.46l-7-5.07zM5.865 1a.75.75 0 000 1.5h5.385a.25.25 0 01.25.25v3.624a.75.75 0 001.5 0V2.75A1.75 1.75 0 0011.25 1H5.865z",
          "evenodd"
        );
      }
      static get bookmarkSlashFill() {
        return new wh(
          24,
          24,
          "M3.232 2.175a.75.75 0 10-.964 1.15l2.679 2.244L5 21.253a.75.75 0 001.219.583L12 17.21l5.782 4.625A.75.75 0 0019 21.25v-3.907l1.768 1.482a.75.75 0 10.964-1.15l-18.5-15.5zM7.422 2a.75.75 0 00-.482 1.325l10.828 9.073A.75.75 0 0019 11.823V3.75A1.75 1.75 0 0017.25 2H7.421h.001z",
          "evenodd"
        );
      }
      static get briefcase() {
        return new wh(
          16,
          16,
          "M6.75 0A1.75 1.75 0 005 1.75V3H1.75A1.75 1.75 0 000 4.75v8.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0016 13.25v-8.5A1.75 1.75 0 0014.25 3H11V1.75A1.75 1.75 0 009.25 0h-2.5zM9.5 3V1.75a.25.25 0 00-.25-.25h-2.5a.25.25 0 00-.25.25V3h3zM5 4.5H1.75a.25.25 0 00-.25.25V6a2 2 0 002 2h9a2 2 0 002-2V4.75a.25.25 0 00-.25-.25H5zm-1.5 5a3.484 3.484 0 01-2-.627v4.377c0 .138.112.25.25.25h12.5a.25.25 0 00.25-.25V8.873a3.484 3.484 0 01-2 .627h-9z",
          "evenodd"
        );
      }
      static get broadcast() {
        return new wh(
          16,
          16,
          "M3.267 1.457c.3.286.312.76.026 1.06A6.475 6.475 0 001.5 7a6.472 6.472 0 001.793 4.483.75.75 0 01-1.086 1.034 8.89 8.89 0 01-.276-.304l.569-.49-.569.49A7.971 7.971 0 010 7c0-2.139.84-4.083 2.207-5.517a.75.75 0 011.06-.026zm9.466 0a.75.75 0 011.06.026A7.975 7.975 0 0116 7c0 2.139-.84 4.083-2.207 5.517a.75.75 0 11-1.086-1.034A6.475 6.475 0 0014.5 7a6.475 6.475 0 00-1.793-4.483.75.75 0 01.026-1.06zM8.75 8.582a1.75 1.75 0 10-1.5 0v5.668a.75.75 0 001.5 0V8.582zM5.331 4.736a.75.75 0 10-1.143-.972A4.983 4.983 0 003 7c0 1.227.443 2.352 1.177 3.222a.75.75 0 001.146-.967A3.483 3.483 0 014.5 7c0-.864.312-1.654.831-2.264zm6.492-.958a.75.75 0 00-1.146.967c.514.61.823 1.395.823 2.255 0 .86-.31 1.646-.823 2.255a.75.75 0 101.146.967A4.983 4.983 0 0013 7a4.983 4.983 0 00-1.177-3.222z",
          "evenodd"
        );
      }
      static get browser() {
        return new wh(
          16,
          16,
          "M6 3h1v1H6V3zM4 3h1v1H4V3zM2 3h1v1H2V3zm12 10H2V5h12v8zm0-9H8V3h6v1zm1-1c0-.55-.45-1-1-1H2c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.55 0 1-.45 1-1V3z",
          "evenodd"
        );
      }
      static get bug() {
        return new wh(
          16,
          16,
          "M11 10h3V9h-3V8l3.17-1.03-.34-.94L11 7V6c0-.55-.45-1-1-1V4c0-.48-.36-.88-.83-.97L10.2 2H12V1H9.8l-2 2h-.59L5.2 1H3v1h1.8l1.03 1.03C5.36 3.12 5 3.51 5 4v1c-.55 0-1 .45-1 1v1l-2.83-.97-.34.94L4 8v1H1v1h3v1L.83 12.03l.34.94L4 12v1c0 .55.45 1 1 1h1l1-1V6h1v7l1 1h1c.55 0 1-.45 1-1v-1l2.83.97.34-.94L11 11v-1zM9 5H6V4h3v1z",
          "evenodd"
        );
      }
      static get calendar() {
        return new wh(
          16,
          16,
          "M4.75 0a.75.75 0 01.75.75V2h5V.75a.75.75 0 011.5 0V2h1.25c.966 0 1.75.784 1.75 1.75v10.5A1.75 1.75 0 0113.25 16H2.75A1.75 1.75 0 011 14.25V3.75C1 2.784 1.784 2 2.75 2H4V.75A.75.75 0 014.75 0zm0 3.5h8.5a.25.25 0 01.25.25V6h-11V3.75a.25.25 0 01.25-.25h2zm-2.25 4v6.75c0 .138.112.25.25.25h10.5a.25.25 0 00.25-.25V7.5h-11z",
          "evenodd"
        );
      }
      static get check() {
        return new wh(
          16,
          16,
          "M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z",
          "evenodd"
        );
      }
      static get checkCircle() {
        return new wh(
          16,
          16,
          "M1.5 8a6.5 6.5 0 1113 0 6.5 6.5 0 01-13 0zM0 8a8 8 0 1116 0A8 8 0 010 8zm11.78-1.72a.75.75 0 00-1.06-1.06L6.75 9.19 5.28 7.72a.75.75 0 00-1.06 1.06l2 2a.75.75 0 001.06 0l4.5-4.5z",
          "evenodd"
        );
      }
      static get checkCircleFill() {
        return new wh(
          16,
          16,
          "M8 16A8 8 0 108 0a8 8 0 000 16zm3.78-9.72a.75.75 0 00-1.06-1.06L6.75 9.19 5.28 7.72a.75.75 0 00-1.06 1.06l2 2a.75.75 0 001.06 0l4.5-4.5z",
          "evenodd"
        );
      }
      static get checklist() {
        return new wh(
          16,
          16,
          "M2.5 1.75a.25.25 0 01.25-.25h8.5a.25.25 0 01.25.25v7.736a.75.75 0 101.5 0V1.75A1.75 1.75 0 0011.25 0h-8.5A1.75 1.75 0 001 1.75v11.5c0 .966.784 1.75 1.75 1.75h3.17a.75.75 0 000-1.5H2.75a.25.25 0 01-.25-.25V1.75zM4.75 4a.75.75 0 000 1.5h4.5a.75.75 0 000-1.5h-4.5zM4 7.75A.75.75 0 014.75 7h2a.75.75 0 010 1.5h-2A.75.75 0 014 7.75zm11.774 3.537a.75.75 0 00-1.048-1.074L10.7 14.145 9.281 12.72a.75.75 0 00-1.062 1.058l1.943 1.95a.75.75 0 001.055.008l4.557-4.45z",
          "evenodd"
        );
      }
      static get chevronDown() {
        return new wh(
          16,
          16,
          "M12.78 6.22a.75.75 0 010 1.06l-4.25 4.25a.75.75 0 01-1.06 0L3.22 7.28a.75.75 0 011.06-1.06L8 9.94l3.72-3.72a.75.75 0 011.06 0z",
          "evenodd"
        );
      }
      static get chevronLeft() {
        return new wh(
          16,
          16,
          "M9.78 12.78a.75.75 0 01-1.06 0L4.47 8.53a.75.75 0 010-1.06l4.25-4.25a.75.75 0 011.06 1.06L6.06 8l3.72 3.72a.75.75 0 010 1.06z",
          "evenodd"
        );
      }
      static get chevronRight() {
        return new wh(
          16,
          16,
          "M6.22 3.22a.75.75 0 011.06 0l4.25 4.25a.75.75 0 010 1.06l-4.25 4.25a.75.75 0 01-1.06-1.06L9.94 8 6.22 4.28a.75.75 0 010-1.06z",
          "evenodd"
        );
      }
      static get chevronUp() {
        return new wh(
          16,
          16,
          "M3.22 9.78a.75.75 0 010-1.06l4.25-4.25a.75.75 0 011.06 0l4.25 4.25a.75.75 0 01-1.06 1.06L8 6.06 4.28 9.78a.75.75 0 01-1.06 0z",
          "evenodd"
        );
      }
      static get circle() {
        return new wh(
          24,
          24,
          "M12 2.5a9.5 9.5 0 100 19 9.5 9.5 0 000-19zM1 12C1 5.925 5.925 1 12 1s11 4.925 11 11-4.925 11-11 11S1 18.075 1 12z",
          "evenodd"
        );
      }
      static get circleSlash() {
        return new wh(
          16,
          16,
          "M1.5 8a6.5 6.5 0 0110.535-5.096l-9.131 9.131A6.472 6.472 0 011.5 8zm2.465 5.096a6.5 6.5 0 009.131-9.131l-9.131 9.131zM8 0a8 8 0 100 16A8 8 0 008 0z",
          "evenodd"
        );
      }
      static get clippy() {
        return new wh(
          16,
          16,
          "M5.75 1a.75.75 0 00-.75.75v3c0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75v-3a.75.75 0 00-.75-.75h-4.5zm.75 3V2.5h3V4h-3zm-2.874-.467a.75.75 0 00-.752-1.298A1.75 1.75 0 002 3.75v9.5c0 .966.784 1.75 1.75 1.75h8.5A1.75 1.75 0 0014 13.25v-9.5a1.75 1.75 0 00-.874-1.515.75.75 0 10-.752 1.298.25.25 0 01.126.217v9.5a.25.25 0 01-.25.25h-8.5a.25.25 0 01-.25-.25v-9.5a.25.25 0 01.126-.217z",
          "evenodd"
        );
      }
      static get clock() {
        return new wh(
          16,
          16,
          "M1.5 8a6.5 6.5 0 1113 0 6.5 6.5 0 01-13 0zM8 0a8 8 0 100 16A8 8 0 008 0zm.5 4.75a.75.75 0 00-1.5 0v3.5a.75.75 0 00.471.696l2.5 1a.75.75 0 00.557-1.392L8.5 7.742V4.75z",
          "evenodd"
        );
      }
      static get code() {
        return new wh(
          16,
          16,
          "M4.72 3.22a.75.75 0 011.06 1.06L2.06 8l3.72 3.72a.75.75 0 11-1.06 1.06L.47 8.53a.75.75 0 010-1.06l4.25-4.25zm6.56 0a.75.75 0 10-1.06 1.06L13.94 8l-3.72 3.72a.75.75 0 101.06 1.06l4.25-4.25a.75.75 0 000-1.06l-4.25-4.25z",
          "evenodd"
        );
      }
      static get codeReview() {
        return new wh(
          16,
          16,
          "M1.5 2.75a.25.25 0 01.25-.25h12.5a.25.25 0 01.25.25v8.5a.25.25 0 01-.25.25h-6.5a.75.75 0 00-.53.22L4.5 14.44v-2.19a.75.75 0 00-.75-.75h-2a.25.25 0 01-.25-.25v-8.5zM1.75 1A1.75 1.75 0 000 2.75v8.5C0 12.216.784 13 1.75 13H3v1.543a1.457 1.457 0 002.487 1.03L8.061 13h6.189A1.75 1.75 0 0016 11.25v-8.5A1.75 1.75 0 0014.25 1H1.75zm5.03 3.47a.75.75 0 010 1.06L5.31 7l1.47 1.47a.75.75 0 01-1.06 1.06l-2-2a.75.75 0 010-1.06l2-2a.75.75 0 011.06 0zm2.44 0a.75.75 0 000 1.06L10.69 7 9.22 8.47a.75.75 0 001.06 1.06l2-2a.75.75 0 000-1.06l-2-2a.75.75 0 00-1.06 0z",
          "evenodd"
        );
      }
      static get codeSquare() {
        return new wh(
          16,
          16,
          "M1.75 1.5a.25.25 0 00-.25.25v12.5c0 .138.112.25.25.25h12.5a.25.25 0 00.25-.25V1.75a.25.25 0 00-.25-.25H1.75zM0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0114.25 16H1.75A1.75 1.75 0 010 14.25V1.75zm9.22 3.72a.75.75 0 000 1.06L10.69 8 9.22 9.47a.75.75 0 101.06 1.06l2-2a.75.75 0 000-1.06l-2-2a.75.75 0 00-1.06 0zM6.78 6.53a.75.75 0 00-1.06-1.06l-2 2a.75.75 0 000 1.06l2 2a.75.75 0 101.06-1.06L5.31 8l1.47-1.47z",
          "evenodd"
        );
      }
      static get comment() {
        return new wh(
          16,
          16,
          "M2.75 2.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h2a.75.75 0 01.75.75v2.19l2.72-2.72a.75.75 0 01.53-.22h4.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25H2.75zM1 2.75C1 1.784 1.784 1 2.75 1h10.5c.966 0 1.75.784 1.75 1.75v7.5A1.75 1.75 0 0113.25 12H9.06l-2.573 2.573A1.457 1.457 0 014 13.543V12H2.75A1.75 1.75 0 011 10.25v-7.5z",
          "evenodd"
        );
      }
      static get commentDiscussion() {
        return new wh(
          16,
          16,
          "M1.5 2.75a.25.25 0 01.25-.25h8.5a.25.25 0 01.25.25v5.5a.25.25 0 01-.25.25h-3.5a.75.75 0 00-.53.22L3.5 11.44V9.25a.75.75 0 00-.75-.75h-1a.25.25 0 01-.25-.25v-5.5zM1.75 1A1.75 1.75 0 000 2.75v5.5C0 9.216.784 10 1.75 10H2v1.543a1.457 1.457 0 002.487 1.03L7.061 10h3.189A1.75 1.75 0 0012 8.25v-5.5A1.75 1.75 0 0010.25 1h-8.5zM14.5 4.75a.25.25 0 00-.25-.25h-.5a.75.75 0 110-1.5h.5c.966 0 1.75.784 1.75 1.75v5.5A1.75 1.75 0 0114.25 12H14v1.543a1.457 1.457 0 01-2.487 1.03L9.22 12.28a.75.75 0 111.06-1.06l2.22 2.22v-2.19a.75.75 0 01.75-.75h1a.25.25 0 00.25-.25v-5.5z",
          "evenodd"
        );
      }
      static get commit() {
        return new wh(
          24,
          24,
          "M17.5 11.75a.75.75 0 01.75-.75h5a.75.75 0 010 1.5h-5a.75.75 0 01-.75-.75zm-17.5 0A.75.75 0 01.75 11h5a.75.75 0 010 1.5h-5a.75.75 0 01-.75-.75z",
          "evenodd"
        );
      }
      static get copy() {
        return new wh(
          24,
          24,
          "M4.75 3A1.75 1.75 0 003 4.75v9.5c0 .966.784 1.75 1.75 1.75h1.5a.75.75 0 000-1.5h-1.5a.25.25 0 01-.25-.25v-9.5a.25.25 0 01.25-.25h9.5a.25.25 0 01.25.25v1.5a.75.75 0 001.5 0v-1.5A1.75 1.75 0 0014.25 3h-9.5zm5 5A1.75 1.75 0 008 9.75v9.5c0 .966.784 1.75 1.75 1.75h9.5A1.75 1.75 0 0021 19.25v-9.5A1.75 1.75 0 0019.25 8h-9.5zM9.5 9.75a.25.25 0 01.25-.25h9.5a.25.25 0 01.25.25v9.5a.25.25 0 01-.25.25h-9.5a.25.25 0 01-.25-.25v-9.5z",
          "evenodd"
        );
      }
      static get cpu() {
        return new wh(
          16,
          16,
          "M6.5.75a.75.75 0 00-1.5 0V2H3.75A1.75 1.75 0 002 3.75V5H.75a.75.75 0 000 1.5H2v3H.75a.75.75 0 000 1.5H2v1.25c0 .966.784 1.75 1.75 1.75H5v1.25a.75.75 0 001.5 0V14h3v1.25a.75.75 0 001.5 0V14h1.25A1.75 1.75 0 0014 12.25V11h1.25a.75.75 0 000-1.5H14v-3h1.25a.75.75 0 000-1.5H14V3.75A1.75 1.75 0 0012.25 2H11V.75a.75.75 0 00-1.5 0V2h-3V.75zm5.75 11.75h-8.5a.25.25 0 01-.25-.25v-8.5a.25.25 0 01.25-.25h8.5a.25.25 0 01.25.25v8.5a.25.25 0 01-.25.25zM5.75 5a.75.75 0 00-.75.75v4.5c0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75v-4.5a.75.75 0 00-.75-.75h-4.5zm.75 4.5v-3h3v3h-3z",
          "evenodd"
        );
      }
      static get creditCard() {
        return new wh(
          16,
          16,
          "M10.75 9a.75.75 0 000 1.5h1.5a.75.75 0 000-1.5h-1.5z",
          void 0
        );
      }
      static get crossReference() {
        return new wh(
          16,
          16,
          "M16 1.25v4.146a.25.25 0 01-.427.177L14.03 4.03l-3.75 3.75a.75.75 0 11-1.06-1.06l3.75-3.75-1.543-1.543A.25.25 0 0111.604 1h4.146a.25.25 0 01.25.25zM2.75 3.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h2a.75.75 0 01.75.75v2.19l2.72-2.72a.75.75 0 01.53-.22h4.5a.25.25 0 00.25-.25v-2.5a.75.75 0 111.5 0v2.5A1.75 1.75 0 0113.25 13H9.06l-2.573 2.573A1.457 1.457 0 014 14.543V13H2.75A1.75 1.75 0 011 11.25v-7.5C1 2.784 1.784 2 2.75 2h5.5a.75.75 0 010 1.5h-5.5z",
          "evenodd"
        );
      }
      static get dash() {
        return new wh(
          16,
          16,
          "M2 8a.75.75 0 01.75-.75h10.5a.75.75 0 010 1.5H2.75A.75.75 0 012 8z",
          "evenodd"
        );
      }
      static get database() {
        return new wh(
          16,
          16,
          "M2.5 3.5c0-.133.058-.318.282-.55.227-.237.592-.484 1.1-.708C4.899 1.795 6.354 1.5 8 1.5c1.647 0 3.102.295 4.117.742.51.224.874.47 1.101.707.224.233.282.418.282.551 0 .133-.058.318-.282.55-.227.237-.592.484-1.1.708C11.101 5.205 9.646 5.5 8 5.5c-1.647 0-3.102-.295-4.117-.742-.51-.224-.874-.47-1.101-.707-.224-.233-.282-.418-.282-.551zM1 3.5c0-.626.292-1.165.7-1.59.406-.422.956-.767 1.579-1.041C4.525.32 6.195 0 8 0c1.805 0 3.475.32 4.722.869.622.274 1.172.62 1.578 1.04.408.426.7.965.7 1.591v9c0 .626-.292 1.165-.7 1.59-.406.422-.956.767-1.579 1.041C11.476 15.68 9.806 16 8 16c-1.805 0-3.475-.32-4.721-.869-.623-.274-1.173-.62-1.579-1.04-.408-.426-.7-.965-.7-1.591v-9zM2.5 8V5.724c.241.15.503.286.779.407C4.525 6.68 6.195 7 8 7c1.805 0 3.475-.32 4.722-.869.275-.121.537-.257.778-.407V8c0 .133-.058.318-.282.55-.227.237-.592.484-1.1.708C11.101 9.705 9.646 10 8 10c-1.647 0-3.102-.295-4.117-.742-.51-.224-.874-.47-1.101-.707C2.558 8.318 2.5 8.133 2.5 8zm0 2.225V12.5c0 .133.058.318.282.55.227.237.592.484 1.1.708 1.016.447 2.471.742 4.118.742 1.647 0 3.102-.295 4.117-.742.51-.224.874-.47 1.101-.707.224-.233.282-.418.282-.551v-2.275c-.241.15-.503.285-.778.406-1.247.549-2.917.869-4.722.869-1.805 0-3.475-.32-4.721-.869a6.236 6.236 0 01-.779-.406z",
          "evenodd"
        );
      }
      static get desktopDownload() {
        return new wh(
          16,
          16,
          "M8.75 5V.75a.75.75 0 00-1.5 0V5H5.104a.25.25 0 00-.177.427l2.896 2.896a.25.25 0 00.354 0l2.896-2.896A.25.25 0 0010.896 5H8.75zM1.5 2.75a.25.25 0 01.25-.25h3a.75.75 0 000-1.5h-3A1.75 1.75 0 000 2.75v7.5C0 11.216.784 12 1.75 12h3.727c-.1 1.041-.52 1.872-1.292 2.757A.75.75 0 004.75 16h6.5a.75.75 0 00.565-1.243c-.772-.885-1.193-1.716-1.292-2.757h3.727A1.75 1.75 0 0016 10.25v-7.5A1.75 1.75 0 0014.25 1h-3a.75.75 0 000 1.5h3a.25.25 0 01.25.25v7.5a.25.25 0 01-.25.25H1.75a.25.25 0 01-.25-.25v-7.5zM9.018 12H6.982a5.72 5.72 0 01-.765 2.5h3.566a5.72 5.72 0 01-.765-2.5z",
          "evenodd"
        );
      }
      static get deviceCamera() {
        return new wh(
          16,
          16,
          "M15 3H7c0-.55-.45-1-1-1H2c-.55 0-1 .45-1 1-.55 0-1 .45-1 1v9c0 .55.45 1 1 1h14c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1zM6 5H2V4h4v1zm4.5 7C8.56 12 7 10.44 7 8.5S8.56 5 10.5 5 14 6.56 14 8.5 12.44 12 10.5 12zM13 8.5c0 1.38-1.13 2.5-2.5 2.5S8 9.87 8 8.5 9.13 6 10.5 6 13 7.13 13 8.5z",
          "evenodd"
        );
      }
      static get deviceCameraVideo() {
        return new wh(
          16,
          16,
          "M16 3.75a.75.75 0 00-1.136-.643L11 5.425V4.75A1.75 1.75 0 009.25 3h-7.5A1.75 1.75 0 000 4.75v6.5C0 12.216.784 13 1.75 13h7.5A1.75 1.75 0 0011 11.25v-.675l3.864 2.318A.75.75 0 0016 12.25v-8.5zm-5 5.075l3.5 2.1v-5.85l-3.5 2.1v1.65zM9.5 6.75v-2a.25.25 0 00-.25-.25h-7.5a.25.25 0 00-.25.25v6.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-4.5z",
          "evenodd"
        );
      }
      static get deviceDesktop() {
        return new wh(
          16,
          16,
          "M1.75 2.5h12.5a.25.25 0 01.25.25v7.5a.25.25 0 01-.25.25H1.75a.25.25 0 01-.25-.25v-7.5a.25.25 0 01.25-.25zM14.25 1H1.75A1.75 1.75 0 000 2.75v7.5C0 11.216.784 12 1.75 12h3.727c-.1 1.041-.52 1.872-1.292 2.757A.75.75 0 004.75 16h6.5a.75.75 0 00.565-1.243c-.772-.885-1.193-1.716-1.292-2.757h3.727A1.75 1.75 0 0016 10.25v-7.5A1.75 1.75 0 0014.25 1zM9.018 12H6.982a5.72 5.72 0 01-.765 2.5h3.566a5.72 5.72 0 01-.765-2.5z",
          "evenodd"
        );
      }
      static get deviceMobile() {
        return new wh(
          16,
          16,
          "M3.75 0A1.75 1.75 0 002 1.75v12.5c0 .966.784 1.75 1.75 1.75h8.5A1.75 1.75 0 0014 14.25V1.75A1.75 1.75 0 0012.25 0h-8.5zM3.5 1.75a.25.25 0 01.25-.25h8.5a.25.25 0 01.25.25v12.5a.25.25 0 01-.25.25h-8.5a.25.25 0 01-.25-.25V1.75zM8 13a1 1 0 100-2 1 1 0 000 2z",
          "evenodd"
        );
      }
      static get diff() {
        return new wh(
          16,
          16,
          "M8.75 1.75a.75.75 0 00-1.5 0V5H4a.75.75 0 000 1.5h3.25v3.25a.75.75 0 001.5 0V6.5H12A.75.75 0 0012 5H8.75V1.75zM4 13a.75.75 0 000 1.5h8a.75.75 0 100-1.5H4z",
          "evenodd"
        );
      }
      static get diffAdded() {
        return new wh(
          16,
          16,
          "M13.25 2.5H2.75a.25.25 0 00-.25.25v10.5c0 .138.112.25.25.25h10.5a.25.25 0 00.25-.25V2.75a.25.25 0 00-.25-.25zM2.75 1h10.5c.966 0 1.75.784 1.75 1.75v10.5A1.75 1.75 0 0113.25 15H2.75A1.75 1.75 0 011 13.25V2.75C1 1.784 1.784 1 2.75 1zM8 4a.75.75 0 01.75.75v2.5h2.5a.75.75 0 010 1.5h-2.5v2.5a.75.75 0 01-1.5 0v-2.5h-2.5a.75.75 0 010-1.5h2.5v-2.5A.75.75 0 018 4z",
          "evenodd"
        );
      }
      static get diffIgnored() {
        return new wh(
          16,
          16,
          "M2.75 2.5h10.5a.25.25 0 01.25.25v10.5a.25.25 0 01-.25.25H2.75a.25.25 0 01-.25-.25V2.75a.25.25 0 01.25-.25zM13.25 1H2.75A1.75 1.75 0 001 2.75v10.5c0 .966.784 1.75 1.75 1.75h10.5A1.75 1.75 0 0015 13.25V2.75A1.75 1.75 0 0013.25 1zm-1.97 4.78a.75.75 0 00-1.06-1.06l-5.5 5.5a.75.75 0 101.06 1.06l5.5-5.5z",
          "evenodd"
        );
      }
      static get diffModified() {
        return new wh(
          16,
          16,
          "M2.75 2.5h10.5a.25.25 0 01.25.25v10.5a.25.25 0 01-.25.25H2.75a.25.25 0 01-.25-.25V2.75a.25.25 0 01.25-.25zM13.25 1H2.75A1.75 1.75 0 001 2.75v10.5c0 .966.784 1.75 1.75 1.75h10.5A1.75 1.75 0 0015 13.25V2.75A1.75 1.75 0 0013.25 1zM8 10a2 2 0 100-4 2 2 0 000 4z",
          "evenodd"
        );
      }
      static get diffRemoved() {
        return new wh(
          16,
          16,
          "M2.75 2.5h10.5a.25.25 0 01.25.25v10.5a.25.25 0 01-.25.25H2.75a.25.25 0 01-.25-.25V2.75a.25.25 0 01.25-.25zM13.25 1H2.75A1.75 1.75 0 001 2.75v10.5c0 .966.784 1.75 1.75 1.75h10.5A1.75 1.75 0 0015 13.25V2.75A1.75 1.75 0 0013.25 1zm-2 7.75a.75.75 0 000-1.5h-6.5a.75.75 0 000 1.5h6.5z",
          "evenodd"
        );
      }
      static get diffRenamed() {
        return new wh(
          16,
          16,
          "M2.75 2.5h10.5a.25.25 0 01.25.25v10.5a.25.25 0 01-.25.25H2.75a.25.25 0 01-.25-.25V2.75a.25.25 0 01.25-.25zM13.25 1H2.75A1.75 1.75 0 001 2.75v10.5c0 .966.784 1.75 1.75 1.75h10.5A1.75 1.75 0 0015 13.25V2.75A1.75 1.75 0 0013.25 1zm-1.47 7.53a.75.75 0 000-1.06L8.53 4.22a.75.75 0 00-1.06 1.06l1.97 1.97H4.75a.75.75 0 000 1.5h4.69l-1.97 1.97a.75.75 0 101.06 1.06l3.25-3.25z",
          "evenodd"
        );
      }
      static get dot() {
        return new wh(
          16,
          16,
          "M8 5.5a2.5 2.5 0 100 5 2.5 2.5 0 000-5zM4 8a4 4 0 118 0 4 4 0 01-8 0z",
          "evenodd"
        );
      }
      static get dotFill() {
        return new wh(16, 16, "M8 4a4 4 0 100 8 4 4 0 000-8z", "evenodd");
      }
      static get download() {
        return new wh(
          16,
          16,
          "M7.47 10.78a.75.75 0 001.06 0l3.75-3.75a.75.75 0 00-1.06-1.06L8.75 8.44V1.75a.75.75 0 00-1.5 0v6.69L4.78 5.97a.75.75 0 00-1.06 1.06l3.75 3.75zM3.75 13a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5z",
          "evenodd"
        );
      }
      static get ellipsis() {
        return new wh(
          16,
          16,
          "M0 5.75C0 4.784.784 4 1.75 4h12.5c.966 0 1.75.784 1.75 1.75v4.5A1.75 1.75 0 0114.25 12H1.75A1.75 1.75 0 010 10.25v-4.5zM4 7a1 1 0 100 2 1 1 0 000-2zm3 1a1 1 0 112 0 1 1 0 01-2 0zm5-1a1 1 0 100 2 1 1 0 000-2z",
          "evenodd"
        );
      }
      static get eye() {
        return new wh(
          16,
          16,
          "M1.679 7.932c.412-.621 1.242-1.75 2.366-2.717C5.175 4.242 6.527 3.5 8 3.5c1.473 0 2.824.742 3.955 1.715 1.124.967 1.954 2.096 2.366 2.717a.119.119 0 010 .136c-.412.621-1.242 1.75-2.366 2.717C10.825 11.758 9.473 12.5 8 12.5c-1.473 0-2.824-.742-3.955-1.715C2.92 9.818 2.09 8.69 1.679 8.068a.119.119 0 010-.136zM8 2c-1.981 0-3.67.992-4.933 2.078C1.797 5.169.88 6.423.43 7.1a1.619 1.619 0 000 1.798c.45.678 1.367 1.932 2.637 3.024C4.329 13.008 6.019 14 8 14c1.981 0 3.67-.992 4.933-2.078 1.27-1.091 2.187-2.345 2.637-3.023a1.619 1.619 0 000-1.798c-.45-.678-1.367-1.932-2.637-3.023C11.671 2.992 9.981 2 8 2zm0 8a2 2 0 100-4 2 2 0 000 4z",
          "evenodd"
        );
      }
      static get eyeClosed() {
        return new wh(
          16,
          16,
          "M.143 2.31a.75.75 0 011.047-.167l14.5 10.5a.75.75 0 11-.88 1.214l-2.248-1.628C11.346 13.19 9.792 14 8 14c-1.981 0-3.67-.992-4.933-2.078C1.797 10.832.88 9.577.43 8.9a1.618 1.618 0 010-1.797c.353-.533.995-1.42 1.868-2.305L.31 3.357A.75.75 0 01.143 2.31zm3.386 3.378a14.21 14.21 0 00-1.85 2.244.12.12 0 00-.022.068c0 .021.006.045.022.068.412.621 1.242 1.75 2.366 2.717C5.175 11.758 6.527 12.5 8 12.5c1.195 0 2.31-.488 3.29-1.191L9.063 9.695A2 2 0 016.058 7.52l-2.53-1.832zM8 3.5c-.516 0-1.017.09-1.499.251a.75.75 0 11-.473-1.423A6.23 6.23 0 018 2c1.981 0 3.67.992 4.933 2.078 1.27 1.091 2.187 2.345 2.637 3.023a1.619 1.619 0 010 1.798c-.11.166-.248.365-.41.587a.75.75 0 11-1.21-.887c.148-.201.272-.382.371-.53a.119.119 0 000-.137c-.412-.621-1.242-1.75-2.366-2.717C10.825 4.242 9.473 3.5 8 3.5z",
          "evenodd"
        );
      }
      static get eyeSlash() {
        return new wh(
          24,
          24,
          "M8.052 5.837A9.715 9.715 0 0112 5c2.955 0 5.309 1.315 7.06 2.864 1.756 1.553 2.866 3.307 3.307 4.08a.11.11 0 01.016.055.122.122 0 01-.017.06 16.766 16.766 0 01-1.53 2.218.75.75 0 101.163.946 18.253 18.253 0 001.67-2.42 1.607 1.607 0 00.001-1.602c-.485-.85-1.69-2.757-3.616-4.46C18.124 5.034 15.432 3.5 12 3.5c-1.695 0-3.215.374-4.552.963a.75.75 0 00.604 1.373z",
          void 0
        );
      }
      static get file() {
        return new wh(
          16,
          16,
          "M3.75 1.5a.25.25 0 00-.25.25v11.5c0 .138.112.25.25.25h8.5a.25.25 0 00.25-.25V6H9.75A1.75 1.75 0 018 4.25V1.5H3.75zm5.75.56v2.19c0 .138.112.25.25.25h2.19L9.5 2.06zM2 1.75C2 .784 2.784 0 3.75 0h5.086c.464 0 .909.184 1.237.513l3.414 3.414c.329.328.513.773.513 1.237v8.086A1.75 1.75 0 0112.25 15h-8.5A1.75 1.75 0 012 13.25V1.75z",
          "evenodd"
        );
      }
      static get fileBinary() {
        return new wh(
          16,
          16,
          "M4 1.75C4 .784 4.784 0 5.75 0h5.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v8.586A1.75 1.75 0 0114.25 15h-9a.75.75 0 010-1.5h9a.25.25 0 00.25-.25V6h-2.75A1.75 1.75 0 0110 4.25V1.5H5.75a.25.25 0 00-.25.25v2a.75.75 0 01-1.5 0v-2zm7.5-.188V4.25c0 .138.112.25.25.25h2.688a.252.252 0 00-.011-.013l-2.914-2.914a.272.272 0 00-.013-.011zM0 7.75C0 6.784.784 6 1.75 6h1.5C4.216 6 5 6.784 5 7.75v2.5A1.75 1.75 0 013.25 12h-1.5A1.75 1.75 0 010 10.25v-2.5zm1.75-.25a.25.25 0 00-.25.25v2.5c0 .138.112.25.25.25h1.5a.25.25 0 00.25-.25v-2.5a.25.25 0 00-.25-.25h-1.5zm5-1.5a.75.75 0 000 1.5h.75v3h-.75a.75.75 0 000 1.5h3a.75.75 0 000-1.5H9V6.75A.75.75 0 008.25 6h-1.5z",
          "evenodd"
        );
      }
      static get fileCode() {
        return new wh(
          16,
          16,
          "M4 1.75C4 .784 4.784 0 5.75 0h5.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v8.586A1.75 1.75 0 0114.25 15h-9a.75.75 0 010-1.5h9a.25.25 0 00.25-.25V6h-2.75A1.75 1.75 0 0110 4.25V1.5H5.75a.25.25 0 00-.25.25v2.5a.75.75 0 01-1.5 0v-2.5zm7.5-.188V4.25c0 .138.112.25.25.25h2.688a.252.252 0 00-.011-.013l-2.914-2.914a.272.272 0 00-.013-.011zM5.72 6.72a.75.75 0 000 1.06l1.47 1.47-1.47 1.47a.75.75 0 101.06 1.06l2-2a.75.75 0 000-1.06l-2-2a.75.75 0 00-1.06 0zM3.28 7.78a.75.75 0 00-1.06-1.06l-2 2a.75.75 0 000 1.06l2 2a.75.75 0 001.06-1.06L1.81 9.25l1.47-1.47z",
          "evenodd"
        );
      }
      static get fileDiff() {
        return new wh(
          16,
          16,
          "M2.75 1.5a.25.25 0 00-.25.25v12.5c0 .138.112.25.25.25h10.5a.25.25 0 00.25-.25V4.664a.25.25 0 00-.073-.177l-2.914-2.914a.25.25 0 00-.177-.073H2.75zM1 1.75C1 .784 1.784 0 2.75 0h7.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0113.25 16H2.75A1.75 1.75 0 011 14.25V1.75zm7 1.5a.75.75 0 01.75.75v1.5h1.5a.75.75 0 010 1.5h-1.5v1.5a.75.75 0 01-1.5 0V7h-1.5a.75.75 0 010-1.5h1.5V4A.75.75 0 018 3.25zm-3 8a.75.75 0 01.75-.75h4.5a.75.75 0 010 1.5h-4.5a.75.75 0 01-.75-.75z",
          "evenodd"
        );
      }
      static get fileDirectory() {
        return new wh(
          16,
          16,
          "M1.75 1A1.75 1.75 0 000 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0016 13.25v-8.5A1.75 1.75 0 0014.25 3h-6.5a.25.25 0 01-.2-.1l-.9-1.2c-.33-.44-.85-.7-1.4-.7h-3.5z",
          "evenodd"
        );
      }
      static get fileDirectoryFill() {
        return new wh(
          24,
          24,
          "M2 4.75C2 3.784 2.784 3 3.75 3h4.971c.58 0 1.12.286 1.447.765l1.404 2.063a.25.25 0 00.207.11h8.471c.966 0 1.75.783 1.75 1.75V19.25A1.75 1.75 0 0120.25 21H3.75A1.75 1.75 0 012 19.25V4.75z",
          "evenodd"
        );
      }
      static get fileMedia() {
        return new wh(
          24,
          24,
          "M2.25 4a.25.25 0 00-.25.25v15.5c0 .138.112.25.25.25h3.178L14 10.977a1.75 1.75 0 012.506-.032L22 16.44V4.25a.25.25 0 00-.25-.25H2.25zm3.496 17.5H21.75a1.75 1.75 0 001.75-1.75V4.25a1.75 1.75 0 00-1.75-1.75H2.25A1.75 1.75 0 00.5 4.25v15.5c0 .966.784 1.75 1.75 1.75h3.496zM22 19.75v-1.19l-6.555-6.554a.25.25 0 00-.358.004L7.497 20H21.75a.25.25 0 00.25-.25zM9 9.25a1.75 1.75 0 11-3.5 0 1.75 1.75 0 013.5 0zm1.5 0a3.25 3.25 0 11-6.5 0 3.25 3.25 0 016.5 0z",
          "evenodd"
        );
      }
      static get fileSubmodule() {
        return new wh(
          16,
          16,
          "M0 2.75C0 1.784.784 1 1.75 1H5c.55 0 1.07.26 1.4.7l.9 1.2a.25.25 0 00.2.1h6.75c.966 0 1.75.784 1.75 1.75v8.5A1.75 1.75 0 0114.25 15H1.75A1.75 1.75 0 010 13.25V2.75zm9.42 9.36l2.883-2.677a.25.25 0 000-.366L9.42 6.39a.25.25 0 00-.42.183V8.5H4.75a.75.75 0 100 1.5H9v1.927c0 .218.26.331.42.183z",
          "evenodd"
        );
      }
      static get fileSymlink() {
        return new wh(
          24,
          24,
          "M3 3a2 2 0 012-2h9.982a2 2 0 011.414.586l4.018 4.018A2 2 0 0121 7.018V21a2 2 0 01-2 2H4.75a.75.75 0 010-1.5H19a.5.5 0 00.5-.5V8.5h-4a2 2 0 01-2-2v-4H5a.5.5 0 00-.5.5v6.25a.75.75 0 01-1.5 0V3zm12-.5v4a.5.5 0 00.5.5h4a.5.5 0 00-.146-.336l-4.018-4.018A.5.5 0 0015 2.5zm-5.692 12l-2.104-2.236a.75.75 0 111.092-1.028l3.294 3.5a.75.75 0 010 1.028l-3.294 3.5a.75.75 0 11-1.092-1.028L9.308 16H4.09a2.59 2.59 0 00-2.59 2.59v3.16a.75.75 0 01-1.5 0v-3.16a4.09 4.09 0 014.09-4.09h5.218z",
          "evenodd"
        );
      }
      static get fileSymlinkFile() {
        return new wh(
          16,
          16,
          "M2 1.75C2 .784 2.784 0 3.75 0h5.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v8.586A1.75 1.75 0 0112.25 15h-7a.75.75 0 010-1.5h7a.25.25 0 00.25-.25V6H9.75A1.75 1.75 0 018 4.25V1.5H3.75a.25.25 0 00-.25.25V4.5a.75.75 0 01-1.5 0V1.75zm7.5-.188V4.25c0 .138.112.25.25.25h2.688a.252.252 0 00-.011-.013L9.513 1.573a.248.248 0 00-.013-.011zm-8 10.675a2.25 2.25 0 012.262-2.25L4 9.99v1.938c0 .218.26.331.42.183l2.883-2.677a.25.25 0 000-.366L4.42 6.39a.25.25 0 00-.42.183V8.49l-.23-.001A3.75 3.75 0 000 12.238v1.012a.75.75 0 001.5 0v-1.013z",
          "evenodd"
        );
      }
      static get fileZip() {
        return new wh(
          16,
          16,
          "M3.5 1.75a.25.25 0 01.25-.25h3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h2.086a.25.25 0 01.177.073l2.914 2.914a.25.25 0 01.073.177v8.586a.25.25 0 01-.25.25h-.5a.75.75 0 000 1.5h.5A1.75 1.75 0 0014 13.25V4.664c0-.464-.184-.909-.513-1.237L10.573.513A1.75 1.75 0 009.336 0H3.75A1.75 1.75 0 002 1.75v11.5c0 .649.353 1.214.874 1.515a.75.75 0 10.752-1.298.25.25 0 01-.126-.217V1.75zM8.75 3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM6 5.25a.75.75 0 01.75-.75h.5a.75.75 0 010 1.5h-.5A.75.75 0 016 5.25zm2 1.5A.75.75 0 018.75 6h.5a.75.75 0 010 1.5h-.5A.75.75 0 018 6.75zm-1.25.75a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM8 9.75A.75.75 0 018.75 9h.5a.75.75 0 010 1.5h-.5A.75.75 0 018 9.75zm-.75.75a1.75 1.75 0 00-1.75 1.75v3c0 .414.336.75.75.75h2.5a.75.75 0 00.75-.75v-3a1.75 1.75 0 00-1.75-1.75h-.5zM7 12.25a.25.25 0 01.25-.25h.5a.25.25 0 01.25.25v2.25H7v-2.25z",
          "evenodd"
        );
      }
      static get filter() {
        return new wh(
          16,
          16,
          "M.75 3a.75.75 0 000 1.5h14.5a.75.75 0 000-1.5H.75zM3 7.75A.75.75 0 013.75 7h8.5a.75.75 0 010 1.5h-8.5A.75.75 0 013 7.75zm3 4a.75.75 0 01.75-.75h2.5a.75.75 0 010 1.5h-2.5a.75.75 0 01-.75-.75z",
          "evenodd"
        );
      }
      static get fire() {
        return new wh(
          24,
          24,
          "M12.185 21.5c4.059 0 7.065-2.84 7.065-6.75 0-2.337-1.093-3.489-2.678-5.158l-.021-.023c-1.44-1.517-3.139-3.351-3.649-6.557a6.14 6.14 0 00-1.911 1.76c-.787 1.144-1.147 2.633-.216 4.495.603 1.205.777 2.74-.277 3.794-.657.657-1.762 1.1-2.956.586-.752-.324-1.353-.955-1.838-1.79-.567.706-.954 1.74-.954 2.893 0 3.847 3.288 6.75 7.435 6.75zm2.08-19.873c-.017-.345-.296-.625-.632-.543-2.337.575-6.605 4.042-4.2 8.854.474.946.392 1.675.004 2.062-.64.64-1.874.684-2.875-1.815-.131-.327-.498-.509-.803-.334-1.547.888-2.509 2.86-2.509 4.899 0 4.829 4.122 8.25 8.935 8.25 4.812 0 8.565-3.438 8.565-8.25 0-2.939-1.466-4.482-3.006-6.102-1.61-1.694-3.479-3.476-3.479-7.021z",
          "evenodd"
        );
      }
      static get flame() {
        return new wh(
          16,
          16,
          "M7.998 14.5c2.832 0 5-1.98 5-4.5 0-1.463-.68-2.19-1.879-3.383l-.036-.037c-1.013-1.008-2.3-2.29-2.834-4.434-.322.256-.63.579-.864.953-.432.696-.621 1.58-.046 2.73.473.947.67 2.284-.278 3.232-.61.61-1.545.84-2.403.633a2.788 2.788 0 01-1.436-.874A3.21 3.21 0 003 10c0 2.53 2.164 4.5 4.998 4.5zM9.533.753C9.496.34 9.16.009 8.77.146 7.035.75 4.34 3.187 5.997 6.5c.344.689.285 1.218.003 1.5-.419.419-1.54.487-2.04-.832-.173-.454-.659-.762-1.035-.454C2.036 7.44 1.5 8.702 1.5 10c0 3.512 2.998 6 6.498 6s6.5-2.5 6.5-6c0-2.137-1.128-3.26-2.312-4.438-1.19-1.184-2.436-2.425-2.653-4.81z",
          "evenodd"
        );
      }
      static get fold() {
        return new wh(
          16,
          16,
          "M10.896 2H8.75V.75a.75.75 0 00-1.5 0V2H5.104a.25.25 0 00-.177.427l2.896 2.896a.25.25 0 00.354 0l2.896-2.896A.25.25 0 0010.896 2zM8.75 15.25a.75.75 0 01-1.5 0V14H5.104a.25.25 0 01-.177-.427l2.896-2.896a.25.25 0 01.354 0l2.896 2.896a.25.25 0 01-.177.427H8.75v1.25zm-6.5-6.5a.75.75 0 000-1.5h-.5a.75.75 0 000 1.5h.5zM6 8a.75.75 0 01-.75.75h-.5a.75.75 0 010-1.5h.5A.75.75 0 016 8zm2.25.75a.75.75 0 000-1.5h-.5a.75.75 0 000 1.5h.5zM12 8a.75.75 0 01-.75.75h-.5a.75.75 0 010-1.5h.5A.75.75 0 0112 8zm2.25.75a.75.75 0 000-1.5h-.5a.75.75 0 000 1.5h.5z",
          "evenodd"
        );
      }
      static get foldDown() {
        return new wh(
          16,
          16,
          "M8.177 14.323l2.896-2.896a.25.25 0 00-.177-.427H8.75V7.764a.75.75 0 10-1.5 0V11H5.104a.25.25 0 00-.177.427l2.896 2.896a.25.25 0 00.354 0zM2.25 5a.75.75 0 000-1.5h-.5a.75.75 0 000 1.5h.5zM6 4.25a.75.75 0 01-.75.75h-.5a.75.75 0 010-1.5h.5a.75.75 0 01.75.75zM8.25 5a.75.75 0 000-1.5h-.5a.75.75 0 000 1.5h.5zM12 4.25a.75.75 0 01-.75.75h-.5a.75.75 0 010-1.5h.5a.75.75 0 01.75.75zm2.25.75a.75.75 0 000-1.5h-.5a.75.75 0 000 1.5h.5z",
          "evenodd"
        );
      }
      static get foldUp() {
        return new wh(
          16,
          16,
          "M7.823 1.677L4.927 4.573A.25.25 0 005.104 5H7.25v3.236a.75.75 0 101.5 0V5h2.146a.25.25 0 00.177-.427L8.177 1.677a.25.25 0 00-.354 0zM13.75 11a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zm-3.75.75a.75.75 0 01.75-.75h.5a.75.75 0 010 1.5h-.5a.75.75 0 01-.75-.75zM7.75 11a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM4 11.75a.75.75 0 01.75-.75h.5a.75.75 0 010 1.5h-.5a.75.75 0 01-.75-.75zM1.75 11a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5z",
          "evenodd"
        );
      }
      static get gear() {
        return new wh(
          16,
          16,
          "M7.429 1.525a6.593 6.593 0 011.142 0c.036.003.108.036.137.146l.289 1.105c.147.56.55.967.997 1.189.174.086.341.183.501.29.417.278.97.423 1.53.27l1.102-.303c.11-.03.175.016.195.046.219.31.41.641.573.989.014.031.022.11-.059.19l-.815.806c-.411.406-.562.957-.53 1.456a4.588 4.588 0 010 .582c-.032.499.119 1.05.53 1.456l.815.806c.08.08.073.159.059.19a6.494 6.494 0 01-.573.99c-.02.029-.086.074-.195.045l-1.103-.303c-.559-.153-1.112-.008-1.529.27-.16.107-.327.204-.5.29-.449.222-.851.628-.998 1.189l-.289 1.105c-.029.11-.101.143-.137.146a6.613 6.613 0 01-1.142 0c-.036-.003-.108-.037-.137-.146l-.289-1.105c-.147-.56-.55-.967-.997-1.189a4.502 4.502 0 01-.501-.29c-.417-.278-.97-.423-1.53-.27l-1.102.303c-.11.03-.175-.016-.195-.046a6.492 6.492 0 01-.573-.989c-.014-.031-.022-.11.059-.19l.815-.806c.411-.406.562-.957.53-1.456a4.587 4.587 0 010-.582c.032-.499-.119-1.05-.53-1.456l-.815-.806c-.08-.08-.073-.159-.059-.19a6.44 6.44 0 01.573-.99c.02-.029.086-.075.195-.045l1.103.303c.559.153 1.112.008 1.529-.27.16-.107.327-.204.5-.29.449-.222.851-.628.998-1.189l.289-1.105c.029-.11.101-.143.137-.146zM8 0c-.236 0-.47.01-.701.03-.743.065-1.29.615-1.458 1.261l-.29 1.106c-.017.066-.078.158-.211.224a5.994 5.994 0 00-.668.386c-.123.082-.233.09-.3.071L3.27 2.776c-.644-.177-1.392.02-1.82.63a7.977 7.977 0 00-.704 1.217c-.315.675-.111 1.422.363 1.891l.815.806c.05.048.098.147.088.294a6.084 6.084 0 000 .772c.01.147-.038.246-.088.294l-.815.806c-.474.469-.678 1.216-.363 1.891.2.428.436.835.704 1.218.428.609 1.176.806 1.82.63l1.103-.303c.066-.019.176-.011.299.071.213.143.436.272.668.386.133.066.194.158.212.224l.289 1.106c.169.646.715 1.196 1.458 1.26a8.094 8.094 0 001.402 0c.743-.064 1.29-.614 1.458-1.26l.29-1.106c.017-.066.078-.158.211-.224a5.98 5.98 0 00.668-.386c.123-.082.233-.09.3-.071l1.102.302c.644.177 1.392-.02 1.82-.63.268-.382.505-.789.704-1.217.315-.675.111-1.422-.364-1.891l-.814-.806c-.05-.048-.098-.147-.088-.294a6.1 6.1 0 000-.772c-.01-.147.039-.246.088-.294l.814-.806c.475-.469.679-1.216.364-1.891a7.992 7.992 0 00-.704-1.218c-.428-.609-1.176-.806-1.82-.63l-1.103.303c-.066.019-.176.011-.299-.071a5.991 5.991 0 00-.668-.386c-.133-.066-.194-.158-.212-.224L10.16 1.29C9.99.645 9.444.095 8.701.031A8.094 8.094 0 008 0zm1.5 8a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0zM11 8a3 3 0 11-6 0 3 3 0 016 0z",
          "evenodd"
        );
      }
      static get gift() {
        return new wh(
          16,
          16,
          "M4.75 1.5a1.25 1.25 0 100 2.5h2.309c-.233-.818-.542-1.401-.878-1.793-.43-.502-.915-.707-1.431-.707zM2 2.75c0 .45.108.875.3 1.25h-.55A1.75 1.75 0 000 5.75v2c0 .698.409 1.3 1 1.582v4.918c0 .966.784 1.75 1.75 1.75h10.5A1.75 1.75 0 0015 14.25V9.332c.591-.281 1-.884 1-1.582v-2A1.75 1.75 0 0014.25 4h-.55a2.75 2.75 0 00-2.45-4c-.984 0-1.874.42-2.57 1.23A5.086 5.086 0 008 2.274a5.086 5.086 0 00-.68-1.042C6.623.42 5.733 0 4.75 0A2.75 2.75 0 002 2.75zM8.941 4h2.309a1.25 1.25 0 100-2.5c-.516 0-1 .205-1.43.707-.337.392-.646.975-.879 1.793zm-1.84 1.5H1.75a.25.25 0 00-.25.25v2c0 .138.112.25.25.25h5.5V5.5h-.149zm1.649 0V8h5.5a.25.25 0 00.25-.25v-2a.25.25 0 00-.25-.25h-5.5zm0 4h4.75v4.75a.25.25 0 01-.25.25h-4.5v-5zm-1.5 0v5h-4.5a.25.25 0 01-.25-.25V9.5h4.75z",
          "evenodd"
        );
      }
      static get gitBranch() {
        return new wh(
          16,
          16,
          "M11.75 2.5a.75.75 0 100 1.5.75.75 0 000-1.5zm-2.25.75a2.25 2.25 0 113 2.122V6A2.5 2.5 0 0110 8.5H6a1 1 0 00-1 1v1.128a2.251 2.251 0 11-1.5 0V5.372a2.25 2.25 0 111.5 0v1.836A2.492 2.492 0 016 7h4a1 1 0 001-1v-.628A2.25 2.25 0 019.5 3.25zM4.25 12a.75.75 0 100 1.5.75.75 0 000-1.5zM3.5 3.25a.75.75 0 111.5 0 .75.75 0 01-1.5 0z",
          "evenodd"
        );
      }
      static get gitCommit() {
        return new wh(
          16,
          16,
          "M10.5 7.75a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0zm1.43.75a4.002 4.002 0 01-7.86 0H.75a.75.75 0 110-1.5h3.32a4.001 4.001 0 017.86 0h3.32a.75.75 0 110 1.5h-3.32z",
          "evenodd"
        );
      }
      static get gitCompare() {
        return new wh(
          16,
          16,
          "M9.573.677L7.177 3.073a.25.25 0 000 .354l2.396 2.396A.25.25 0 0010 5.646V4h1a1 1 0 011 1v5.628a2.251 2.251 0 101.5 0V5A2.5 2.5 0 0011 2.5h-1V.854a.25.25 0 00-.427-.177zM6 12v-1.646a.25.25 0 01.427-.177l2.396 2.396a.25.25 0 010 .354l-2.396 2.396A.25.25 0 016 15.146V13.5H5A2.5 2.5 0 012.5 11V5.372a2.25 2.25 0 111.5 0V11a1 1 0 001 1h1zm6.75 0a.75.75 0 100 1.5.75.75 0 000-1.5zM4 3.25a.75.75 0 11-1.5 0 .75.75 0 011.5 0z",
          "evenodd"
        );
      }
      static get gitFork() {
        return new wh(
          24,
          24,
          "M12 21a1.75 1.75 0 110-3.5 1.75 1.75 0 010 3.5zm-3.25-1.75a3.25 3.25 0 106.5 0 3.25 3.25 0 00-6.5 0zm-3-12.75a1.75 1.75 0 110-3.5 1.75 1.75 0 010 3.5zM2.5 4.75a3.25 3.25 0 106.5 0 3.25 3.25 0 00-6.5 0zM18.25 6.5a1.75 1.75 0 110-3.5 1.75 1.75 0 010 3.5zM15 4.75a3.25 3.25 0 106.5 0 3.25 3.25 0 00-6.5 0z",
          "evenodd"
        );
      }
      static get gitMerge() {
        return new wh(
          16,
          16,
          "M5 3.254V3.25v.005a.75.75 0 110-.005v.004zm.45 1.9a2.25 2.25 0 10-1.95.218v5.256a2.25 2.25 0 101.5 0V7.123A5.735 5.735 0 009.25 9h1.378a2.251 2.251 0 100-1.5H9.25a4.25 4.25 0 01-3.8-2.346zM12.75 9a.75.75 0 100-1.5.75.75 0 000 1.5zm-8.5 4.5a.75.75 0 100-1.5.75.75 0 000 1.5z",
          "evenodd"
        );
      }
      static get gitPullRequest() {
        return new wh(
          16,
          16,
          "M7.177 3.073L9.573.677A.25.25 0 0110 .854v4.792a.25.25 0 01-.427.177L7.177 3.427a.25.25 0 010-.354zM3.75 2.5a.75.75 0 100 1.5.75.75 0 000-1.5zm-2.25.75a2.25 2.25 0 113 2.122v5.256a2.251 2.251 0 11-1.5 0V5.372A2.25 2.25 0 011.5 3.25zM11 2.5h-1V4h1a1 1 0 011 1v5.628a2.251 2.251 0 101.5 0V5A2.5 2.5 0 0011 2.5zm1 10.25a.75.75 0 111.5 0 .75.75 0 01-1.5 0zM3.75 12a.75.75 0 100 1.5.75.75 0 000-1.5z",
          "evenodd"
        );
      }
      static get globe() {
        return new wh(
          16,
          16,
          "M1.543 7.25h2.733c.144-2.074.866-3.756 1.58-4.948.12-.197.237-.381.353-.552a6.506 6.506 0 00-4.666 5.5zm2.733 1.5H1.543a6.506 6.506 0 004.666 5.5 11.13 11.13 0 01-.352-.552c-.715-1.192-1.437-2.874-1.581-4.948zm1.504 0h4.44a9.637 9.637 0 01-1.363 4.177c-.306.51-.612.919-.857 1.215a9.978 9.978 0 01-.857-1.215A9.637 9.637 0 015.78 8.75zm4.44-1.5H5.78a9.637 9.637 0 011.363-4.177c.306-.51.612-.919.857-1.215.245.296.55.705.857 1.215A9.638 9.638 0 0110.22 7.25zm1.504 1.5c-.144 2.074-.866 3.756-1.58 4.948-.12.197-.237.381-.353.552a6.506 6.506 0 004.666-5.5h-2.733zm2.733-1.5h-2.733c-.144-2.074-.866-3.756-1.58-4.948a11.738 11.738 0 00-.353-.552 6.506 6.506 0 014.666 5.5zM8 0a8 8 0 100 16A8 8 0 008 0z",
          "evenodd"
        );
      }
      static get grabber() {
        return new wh(
          16,
          16,
          "M10 13a1 1 0 100-2 1 1 0 000 2zm-4 0a1 1 0 100-2 1 1 0 000 2zm1-5a1 1 0 11-2 0 1 1 0 012 0zm3 1a1 1 0 100-2 1 1 0 000 2zm1-5a1 1 0 11-2 0 1 1 0 012 0zM6 5a1 1 0 100-2 1 1 0 000 2z",
          "evenodd"
        );
      }
      static get graph() {
        return new wh(
          16,
          16,
          "M1.5 1.75a.75.75 0 00-1.5 0v12.5c0 .414.336.75.75.75h14.5a.75.75 0 000-1.5H1.5V1.75zm14.28 2.53a.75.75 0 00-1.06-1.06L10 7.94 7.53 5.47a.75.75 0 00-1.06 0L3.22 8.72a.75.75 0 001.06 1.06L7 7.06l2.47 2.47a.75.75 0 001.06 0l5.25-5.25z",
          "evenodd"
        );
      }
      static get heading() {
        return new wh(
          16,
          16,
          "M3.75 2a.75.75 0 01.75.75V7h7V2.75a.75.75 0 011.5 0v10.5a.75.75 0 01-1.5 0V8.5h-7v4.75a.75.75 0 01-1.5 0V2.75A.75.75 0 013.75 2z",
          "evenodd"
        );
      }
      static get heart() {
        return new wh(
          16,
          16,
          "M4.25 2.5c-1.336 0-2.75 1.164-2.75 3 0 2.15 1.58 4.144 3.365 5.682A20.565 20.565 0 008 13.393a20.561 20.561 0 003.135-2.211C12.92 9.644 14.5 7.65 14.5 5.5c0-1.836-1.414-3-2.75-3-1.373 0-2.609.986-3.029 2.456a.75.75 0 01-1.442 0C6.859 3.486 5.623 2.5 4.25 2.5zM8 14.25l-.345.666-.002-.001-.006-.003-.018-.01a7.643 7.643 0 01-.31-.17 22.075 22.075 0 01-3.434-2.414C2.045 10.731 0 8.35 0 5.5 0 2.836 2.086 1 4.25 1 5.797 1 7.153 1.802 8 3.02 8.847 1.802 10.203 1 11.75 1 13.914 1 16 2.836 16 5.5c0 2.85-2.045 5.231-3.885 6.818a22.08 22.08 0 01-3.744 2.584l-.018.01-.006.003h-.002L8 14.25zm0 0l.345.666a.752.752 0 01-.69 0L8 14.25z",
          "evenodd"
        );
      }
      static get heartFill() {
        return new wh(
          16,
          16,
          "M7.655 14.916L8 14.25l.345.666a.752.752 0 01-.69 0zm0 0L8 14.25l.345.666.002-.001.006-.003.018-.01a7.643 7.643 0 00.31-.17 22.08 22.08 0 003.433-2.414C13.956 10.731 16 8.35 16 5.5 16 2.836 13.914 1 11.75 1 10.203 1 8.847 1.802 8 3.02 7.153 1.802 5.797 1 4.25 1 2.086 1 0 2.836 0 5.5c0 2.85 2.045 5.231 3.885 6.818a22.075 22.075 0 003.744 2.584l.018.01.006.003h.002z",
          "evenodd"
        );
      }
      static get history() {
        return new wh(
          16,
          16,
          "M1.643 3.143L.427 1.927A.25.25 0 000 2.104V5.75c0 .138.112.25.25.25h3.646a.25.25 0 00.177-.427L2.715 4.215a6.5 6.5 0 11-1.18 4.458.75.75 0 10-1.493.154 8.001 8.001 0 101.6-5.684zM7.75 4a.75.75 0 01.75.75v2.992l2.028.812a.75.75 0 01-.557 1.392l-2.5-1A.75.75 0 017 8.25v-3.5A.75.75 0 017.75 4z",
          "evenodd"
        );
      }
      static get home() {
        return new wh(
          16,
          16,
          "M8.156 1.835a.25.25 0 00-.312 0l-5.25 4.2a.25.25 0 00-.094.196v7.019c0 .138.112.25.25.25H5.5V8.25a.75.75 0 01.75-.75h3.5a.75.75 0 01.75.75v5.25h2.75a.25.25 0 00.25-.25V6.23a.25.25 0 00-.094-.195l-5.25-4.2zM6.906.664a1.75 1.75 0 012.187 0l5.25 4.2c.415.332.657.835.657 1.367v7.019A1.75 1.75 0 0113.25 15h-3.5a.75.75 0 01-.75-.75V9H7v5.25a.75.75 0 01-.75.75h-3.5A1.75 1.75 0 011 13.25V6.23c0-.531.242-1.034.657-1.366l5.25-4.2h-.001z",
          "evenodd"
        );
      }
      static get homeFill() {
        return new wh(
          24,
          24,
          "M12.97 2.59a1.5 1.5 0 00-1.94 0l-7.5 6.363A1.5 1.5 0 003 10.097V19.5A1.5 1.5 0 004.5 21h4.75a.75.75 0 00.75-.75V14h4v6.25c0 .414.336.75.75.75h4.75a1.5 1.5 0 001.5-1.5v-9.403a1.5 1.5 0 00-.53-1.144l-7.5-6.363z",
          void 0
        );
      }
      static get horizontalRule() {
        return new wh(
          16,
          16,
          "M0 7.75A.75.75 0 01.75 7h14.5a.75.75 0 010 1.5H.75A.75.75 0 010 7.75z",
          "evenodd"
        );
      }
      static get hourglass() {
        return new wh(
          16,
          16,
          "M2.75 1a.75.75 0 000 1.5h.75v1.25a4.75 4.75 0 001.9 3.8l.333.25c.134.1.134.3 0 .4l-.333.25a4.75 4.75 0 00-1.9 3.8v1.25h-.75a.75.75 0 000 1.5h10.5a.75.75 0 000-1.5h-.75v-1.25a4.75 4.75 0 00-1.9-3.8l-.333-.25a.25.25 0 010-.4l.333-.25a4.75 4.75 0 001.9-3.8V2.5h.75a.75.75 0 000-1.5H2.75zM11 2.5H5v1.25a3.25 3.25 0 001.3 2.6l.333.25c.934.7.934 2.1 0 2.8l-.333.25a3.25 3.25 0 00-1.3 2.6v1.25h6v-1.25a3.25 3.25 0 00-1.3-2.6l-.333-.25a1.75 1.75 0 010-2.8l.333-.25a3.25 3.25 0 001.3-2.6V2.5z",
          "evenodd"
        );
      }
      static get hubot() {
        return new wh(
          16,
          16,
          "M0 8a8 8 0 1116 0v5.25a.75.75 0 01-1.5 0V8a6.5 6.5 0 10-13 0v5.25a.75.75 0 01-1.5 0V8zm5.5 4.25a.75.75 0 01.75-.75h3.5a.75.75 0 010 1.5h-3.5a.75.75 0 01-.75-.75zM3 6.75C3 5.784 3.784 5 4.75 5h6.5c.966 0 1.75.784 1.75 1.75v1.5A1.75 1.75 0 0111.25 10h-6.5A1.75 1.75 0 013 8.25v-1.5zm1.47-.53a.75.75 0 011.06 0l.97.97.97-.97a.75.75 0 011.06 0l.97.97.97-.97a.75.75 0 111.06 1.06l-1.5 1.5a.75.75 0 01-1.06 0L8 7.81l-.97.97a.75.75 0 01-1.06 0l-1.5-1.5a.75.75 0 010-1.06z",
          "evenodd"
        );
      }
      static get image() {
        return new wh(
          16,
          16,
          "M1.75 2.5a.25.25 0 00-.25.25v10.5c0 .138.112.25.25.25h.94a.76.76 0 01.03-.03l6.077-6.078a1.75 1.75 0 012.412-.06L14.5 10.31V2.75a.25.25 0 00-.25-.25H1.75zm12.5 11H4.81l5.048-5.047a.25.25 0 01.344-.009l4.298 3.889v.917a.25.25 0 01-.25.25zm1.75-.25V2.75A1.75 1.75 0 0014.25 1H1.75A1.75 1.75 0 000 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0016 13.25zM5.5 6a.5.5 0 11-1 0 .5.5 0 011 0zM7 6a2 2 0 11-4 0 2 2 0 014 0z",
          "evenodd"
        );
      }
      static get inbox() {
        return new wh(
          16,
          16,
          "M2.8 2.06A1.75 1.75 0 014.41 1h7.18c.7 0 1.333.417 1.61 1.06l2.74 6.395a.75.75 0 01.06.295v4.5A1.75 1.75 0 0114.25 15H1.75A1.75 1.75 0 010 13.25v-4.5a.75.75 0 01.06-.295L2.8 2.06zm1.61.44a.25.25 0 00-.23.152L1.887 8H4.75a.75.75 0 01.6.3L6.625 10h2.75l1.275-1.7a.75.75 0 01.6-.3h2.863L11.82 2.652a.25.25 0 00-.23-.152H4.41zm10.09 7h-2.875l-1.275 1.7a.75.75 0 01-.6.3h-3.5a.75.75 0 01-.6-.3L4.375 9.5H1.5v3.75c0 .138.112.25.25.25h12.5a.25.25 0 00.25-.25V9.5z",
          "evenodd"
        );
      }
      static get infinity() {
        return new wh(
          16,
          16,
          "M3.5 6c-1.086 0-2 .914-2 2 0 1.086.914 2 2 2 .525 0 1.122-.244 1.825-.727.51-.35 1.025-.79 1.561-1.273-.536-.483-1.052-.922-1.56-1.273C4.621 6.244 4.025 6 3.5 6zm4.5.984c-.59-.533-1.204-1.066-1.825-1.493-.797-.548-1.7-.991-2.675-.991C1.586 4.5 0 6.086 0 8s1.586 3.5 3.5 3.5c.975 0 1.878-.444 2.675-.991.621-.427 1.235-.96 1.825-1.493.59.533 1.204 1.066 1.825 1.493.797.547 1.7.991 2.675.991 1.914 0 3.5-1.586 3.5-3.5s-1.586-3.5-3.5-3.5c-.975 0-1.878.443-2.675.991-.621.427-1.235.96-1.825 1.493zM9.114 8c.536.483 1.052.922 1.56 1.273.704.483 1.3.727 1.826.727 1.086 0 2-.914 2-2 0-1.086-.914-2-2-2-.525 0-1.122.244-1.825.727-.51.35-1.025.79-1.561 1.273z",
          "evenodd"
        );
      }
      static get info() {
        return new wh(
          16,
          16,
          "M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM0 8a8 8 0 1116 0A8 8 0 010 8zm6.5-.25A.75.75 0 017.25 7h1a.75.75 0 01.75.75v2.75h.25a.75.75 0 010 1.5h-2a.75.75 0 010-1.5h.25v-2h-.25a.75.75 0 01-.75-.75zM8 6a1 1 0 100-2 1 1 0 000 2z",
          "evenodd"
        );
      }
      static get insights() {
        return new wh(
          24,
          24,
          "M11.75 3.5a.75.75 0 01.75.75v15.5a.75.75 0 01-1.5 0V4.25a.75.75 0 01.75-.75zm6.5 3.625a.75.75 0 01.75.75V19.75a.75.75 0 01-1.5 0V7.875a.75.75 0 01.75-.75zM5.25 11a.75.75 0 01.75.75v8a.75.75 0 01-1.5 0v-8a.75.75 0 01.75-.75z",
          "evenodd"
        );
      }
      static get issueClosed() {
        return new wh(
          16,
          16,
          "M1.5 8a6.5 6.5 0 0110.65-5.003.75.75 0 00.959-1.153 8 8 0 102.592 8.33.75.75 0 10-1.444-.407A6.5 6.5 0 011.5 8zM8 12a1 1 0 100-2 1 1 0 000 2zm0-8a.75.75 0 01.75.75v3.5a.75.75 0 11-1.5 0v-3.5A.75.75 0 018 4zm4.78 4.28l3-3a.75.75 0 00-1.06-1.06l-2.47 2.47-.97-.97a.749.749 0 10-1.06 1.06l1.5 1.5a.75.75 0 001.06 0z",
          "evenodd"
        );
      }
      static get issueOpened() {
        return new wh(
          16,
          16,
          "M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM0 8a8 8 0 1116 0A8 8 0 010 8zm9 3a1 1 0 11-2 0 1 1 0 012 0zm-.25-6.25a.75.75 0 00-1.5 0v3.5a.75.75 0 001.5 0v-3.5z",
          "evenodd"
        );
      }
      static get issueReopened() {
        return new wh(
          16,
          16,
          "M8 1.5a6.491 6.491 0 00-5.285 2.715l1.358 1.358A.25.25 0 013.896 6H.25A.25.25 0 010 5.75V2.104a.25.25 0 01.427-.177l1.216 1.216a8 8 0 0114.315 4.03.748.748 0 01-.668.83.75.75 0 01-.824-.676A6.501 6.501 0 008 1.5zM.712 8.004a.75.75 0 01.822.67 6.501 6.501 0 0011.751 3.111l-1.358-1.358a.25.25 0 01.177-.427h3.646a.25.25 0 01.25.25v3.646a.25.25 0 01-.427.177l-1.216-1.216A8 8 0 01.042 8.827a.75.75 0 01.67-.823zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-6.25a.75.75 0 00-1.5 0v3.5a.75.75 0 001.5 0v-3.5z",
          "evenodd"
        );
      }
      static get italic() {
        return new wh(
          16,
          16,
          "M6 2.75A.75.75 0 016.75 2h6.5a.75.75 0 010 1.5h-2.505l-3.858 9H9.25a.75.75 0 010 1.5h-6.5a.75.75 0 010-1.5h2.505l3.858-9H6.75A.75.75 0 016 2.75z",
          "evenodd"
        );
      }
      static get kebabHorizontal() {
        return new wh(
          16,
          16,
          "M8 9a1.5 1.5 0 100-3 1.5 1.5 0 000 3zM1.5 9a1.5 1.5 0 100-3 1.5 1.5 0 000 3zm13 0a1.5 1.5 0 100-3 1.5 1.5 0 000 3z",
          void 0
        );
      }
      static get key() {
        return new wh(
          16,
          16,
          "M6.5 5.5a4 4 0 112.731 3.795.75.75 0 00-.768.18L7.44 10.5H6.25a.75.75 0 00-.75.75v1.19l-.06.06H4.25a.75.75 0 00-.75.75v1.19l-.06.06H1.75a.25.25 0 01-.25-.25v-1.69l5.024-5.023a.75.75 0 00.181-.768A3.995 3.995 0 016.5 5.5zm4-5.5a5.5 5.5 0 00-5.348 6.788L.22 11.72a.75.75 0 00-.22.53v2C0 15.216.784 16 1.75 16h2a.75.75 0 00.53-.22l.5-.5a.75.75 0 00.22-.53V14h.75a.75.75 0 00.53-.22l.5-.5a.75.75 0 00.22-.53V12h.75a.75.75 0 00.53-.22l.932-.932A5.5 5.5 0 1010.5 0zm.5 6a1 1 0 100-2 1 1 0 000 2z",
          "evenodd"
        );
      }
      static get law() {
        return new wh(
          16,
          16,
          "M8.75.75a.75.75 0 00-1.5 0V2h-.984c-.305 0-.604.08-.869.23l-1.288.737A.25.25 0 013.984 3H1.75a.75.75 0 000 1.5h.428L.066 9.192a.75.75 0 00.154.838l.53-.53-.53.53v.001l.002.002.002.002.006.006.016.015.045.04a3.514 3.514 0 00.686.45A4.492 4.492 0 003 11c.88 0 1.556-.22 2.023-.454a3.515 3.515 0 00.686-.45l.045-.04.016-.015.006-.006.002-.002.001-.002L5.25 9.5l.53.53a.75.75 0 00.154-.838L3.822 4.5h.162c.305 0 .604-.08.869-.23l1.289-.737a.25.25 0 01.124-.033h.984V13h-2.5a.75.75 0 000 1.5h6.5a.75.75 0 000-1.5h-2.5V3.5h.984a.25.25 0 01.124.033l1.29.736c.264.152.563.231.868.231h.162l-2.112 4.692a.75.75 0 00.154.838l.53-.53-.53.53v.001l.002.002.002.002.006.006.016.015.045.04a3.517 3.517 0 00.686.45A4.492 4.492 0 0013 11c.88 0 1.556-.22 2.023-.454a3.512 3.512 0 00.686-.45l.045-.04.01-.01.006-.005.006-.006.002-.002.001-.002-.529-.531.53.53a.75.75 0 00.154-.838L13.823 4.5h.427a.75.75 0 000-1.5h-2.234a.25.25 0 01-.124-.033l-1.29-.736A1.75 1.75 0 009.735 2H8.75V.75zM1.695 9.227c.285.135.718.273 1.305.273s1.02-.138 1.305-.273L3 6.327l-1.305 2.9zm10 0c.285.135.718.273 1.305.273s1.02-.138 1.305-.273L13 6.327l-1.305 2.9z",
          "evenodd"
        );
      }
      static get lightBulb() {
        return new wh(
          16,
          16,
          "M8 1.5c-2.363 0-4 1.69-4 3.75 0 .984.424 1.625.984 2.304l.214.253c.223.264.47.556.673.848.284.411.537.896.621 1.49a.75.75 0 01-1.484.211c-.04-.282-.163-.547-.37-.847a8.695 8.695 0 00-.542-.68c-.084-.1-.173-.205-.268-.32C3.201 7.75 2.5 6.766 2.5 5.25 2.5 2.31 4.863 0 8 0s5.5 2.31 5.5 5.25c0 1.516-.701 2.5-1.328 3.259-.095.115-.184.22-.268.319-.207.245-.383.453-.541.681-.208.3-.33.565-.37.847a.75.75 0 01-1.485-.212c.084-.593.337-1.078.621-1.489.203-.292.45-.584.673-.848.075-.088.147-.173.213-.253.561-.679.985-1.32.985-2.304 0-2.06-1.637-3.75-4-3.75zM6 15.25a.75.75 0 01.75-.75h2.5a.75.75 0 010 1.5h-2.5a.75.75 0 01-.75-.75zM5.75 12a.75.75 0 000 1.5h4.5a.75.75 0 000-1.5h-4.5z",
          "evenodd"
        );
      }
      static get link() {
        return new wh(
          16,
          16,
          "M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z",
          "evenodd"
        );
      }
      static get linkExternal() {
        return new wh(
          16,
          16,
          "M10.604 1h4.146a.25.25 0 01.25.25v4.146a.25.25 0 01-.427.177L13.03 4.03 9.28 7.78a.75.75 0 01-1.06-1.06l3.75-3.75-1.543-1.543A.25.25 0 0110.604 1zM3.75 2A1.75 1.75 0 002 3.75v8.5c0 .966.784 1.75 1.75 1.75h8.5A1.75 1.75 0 0014 12.25v-3.5a.75.75 0 00-1.5 0v3.5a.25.25 0 01-.25.25h-8.5a.25.25 0 01-.25-.25v-8.5a.25.25 0 01.25-.25h3.5a.75.75 0 000-1.5h-3.5z",
          "evenodd"
        );
      }
      static get listOrdered() {
        return new wh(
          16,
          16,
          "M2.003 2.5a.5.5 0 00-.723-.447l-1.003.5a.5.5 0 00.446.895l.28-.14V6H.5a.5.5 0 000 1h2.006a.5.5 0 100-1h-.503V2.5zM5 3.25a.75.75 0 01.75-.75h8.5a.75.75 0 010 1.5h-8.5A.75.75 0 015 3.25zm0 5a.75.75 0 01.75-.75h8.5a.75.75 0 010 1.5h-8.5A.75.75 0 015 8.25zm0 5a.75.75 0 01.75-.75h8.5a.75.75 0 010 1.5h-8.5a.75.75 0 01-.75-.75zM.924 10.32l.003-.004a.851.851 0 01.144-.153A.66.66 0 011.5 10c.195 0 .306.068.374.146a.57.57 0 01.128.376c0 .453-.269.682-.8 1.078l-.035.025C.692 11.98 0 12.495 0 13.5a.5.5 0 00.5.5h2.003a.5.5 0 000-1H1.146c.132-.197.351-.372.654-.597l.047-.035c.47-.35 1.156-.858 1.156-1.845 0-.365-.118-.744-.377-1.038-.268-.303-.658-.484-1.126-.484-.48 0-.84.202-1.068.392a1.858 1.858 0 00-.348.384l-.007.011-.002.004-.001.002-.001.001a.5.5 0 00.851.525zM.5 10.055l-.427-.26.427.26z",
          "evenodd"
        );
      }
      static get listUnordered() {
        return new wh(
          16,
          16,
          "M2 4a1 1 0 100-2 1 1 0 000 2zm3.75-1.5a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5zm0 5a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5zm0 5a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5zM3 8a1 1 0 11-2 0 1 1 0 012 0zm-1 6a1 1 0 100-2 1 1 0 000 2z",
          "evenodd"
        );
      }
      static get location() {
        return new wh(
          16,
          16,
          "M11.536 3.464a5 5 0 010 7.072L8 14.07l-3.536-3.535a5 5 0 117.072-7.072v.001zm1.06 8.132a6.5 6.5 0 10-9.192 0l3.535 3.536a1.5 1.5 0 002.122 0l3.535-3.536zM8 9a2 2 0 100-4 2 2 0 000 4z",
          "evenodd"
        );
      }
      static get lock() {
        return new wh(
          16,
          16,
          "M4 4v2h-.25A1.75 1.75 0 002 7.75v5.5c0 .966.784 1.75 1.75 1.75h8.5A1.75 1.75 0 0014 13.25v-5.5A1.75 1.75 0 0012.25 6H12V4a4 4 0 10-8 0zm6.5 2V4a2.5 2.5 0 00-5 0v2h5zM12 7.5h.25a.25.25 0 01.25.25v5.5a.25.25 0 01-.25.25h-8.5a.25.25 0 01-.25-.25v-5.5a.25.25 0 01.25-.25H12z",
          "evenodd"
        );
      }
      static get logoGist() {
        return new wh(
          25,
          16,
          "M4.7 8.73h2.45v4.02c-.55.27-1.64.34-2.53.34-2.56 0-3.47-2.2-3.47-5.05 0-2.85.91-5.06 3.48-5.06 1.28 0 2.06.23 3.28.73V2.66C7.27 2.33 6.25 2 4.63 2 1.13 2 0 4.69 0 8.03c0 3.34 1.11 6.03 4.63 6.03 1.64 0 2.81-.27 3.59-.64V7.73H4.7v1zm6.39 3.72V6.06h-1.05v6.28c0 1.25.58 1.72 1.72 1.72v-.89c-.48 0-.67-.16-.67-.7v-.02zm.25-8.72c0-.44-.33-.78-.78-.78s-.77.34-.77.78.33.78.77.78.78-.34.78-.78zm4.34 5.69c-1.5-.13-1.78-.48-1.78-1.17 0-.77.33-1.34 1.88-1.34 1.05 0 1.66.16 2.27.36v-.94c-.69-.3-1.52-.39-2.25-.39-2.2 0-2.92 1.2-2.92 2.31 0 1.08.47 1.88 2.73 2.08 1.55.13 1.77.63 1.77 1.34 0 .73-.44 1.42-2.06 1.42-1.11 0-1.86-.19-2.33-.36v.94c.5.2 1.58.39 2.33.39 2.38 0 3.14-1.2 3.14-2.41 0-1.28-.53-2.03-2.75-2.23h-.03zm8.58-2.47v-.86h-2.42v-2.5l-1.08.31v2.11l-1.56.44v.48h1.56v5c0 1.53 1.19 2.13 2.5 2.13.19 0 .52-.02.69-.05v-.89c-.19.03-.41.03-.61.03-.97 0-1.5-.39-1.5-1.34V6.94h2.42v.02-.01z",
          "evenodd"
        );
      }
      static get logoGithub() {
        return new wh(
          45,
          16,
          "M18.53 12.03h-.02c.009 0 .015.01.024.011h.006l-.01-.01zm.004.011c-.093.001-.327.05-.574.05-.78 0-1.05-.36-1.05-.83V8.13h1.59c.09 0 .16-.08.16-.19v-1.7c0-.09-.08-.17-.16-.17h-1.59V3.96c0-.08-.05-.13-.14-.13h-2.16c-.09 0-.14.05-.14.13v2.17s-1.09.27-1.16.28c-.08.02-.13.09-.13.17v1.36c0 .11.08.19.17.19h1.11v3.28c0 2.44 1.7 2.69 2.86 2.69.53 0 1.17-.17 1.27-.22.06-.02.09-.09.09-.16v-1.5a.177.177 0 00-.146-.18zM42.23 9.84c0-1.81-.73-2.05-1.5-1.97-.6.04-1.08.34-1.08.34v3.52s.49.34 1.22.36c1.03.03 1.36-.34 1.36-2.25zm2.43-.16c0 3.43-1.11 4.41-3.05 4.41-1.64 0-2.52-.83-2.52-.83s-.04.46-.09.52c-.03.06-.08.08-.14.08h-1.48c-.1 0-.19-.08-.19-.17l.02-11.11c0-.09.08-.17.17-.17h2.13c.09 0 .17.08.17.17v3.77s.82-.53 2.02-.53l-.01-.02c1.2 0 2.97.45 2.97 3.88zm-8.72-3.61h-2.1c-.11 0-.17.08-.17.19v5.44s-.55.39-1.3.39-.97-.34-.97-1.09V6.25c0-.09-.08-.17-.17-.17h-2.14c-.09 0-.17.08-.17.17v5.11c0 2.2 1.23 2.75 2.92 2.75 1.39 0 2.52-.77 2.52-.77s.05.39.08.45c.02.05.09.09.16.09h1.34c.11 0 .17-.08.17-.17l.02-7.47c0-.09-.08-.17-.19-.17zm-23.7-.01h-2.13c-.09 0-.17.09-.17.2v7.34c0 .2.13.27.3.27h1.92c.2 0 .25-.09.25-.27V6.23c0-.09-.08-.17-.17-.17zm-1.05-3.38c-.77 0-1.38.61-1.38 1.38 0 .77.61 1.38 1.38 1.38.75 0 1.36-.61 1.36-1.38 0-.77-.61-1.38-1.36-1.38zm16.49-.25h-2.11c-.09 0-.17.08-.17.17v4.09h-3.31V2.6c0-.09-.08-.17-.17-.17h-2.13c-.09 0-.17.08-.17.17v11.11c0 .09.09.17.17.17h2.13c.09 0 .17-.08.17-.17V8.96h3.31l-.02 4.75c0 .09.08.17.17.17h2.13c.09 0 .17-.08.17-.17V2.6c0-.09-.08-.17-.17-.17zM8.81 7.35v5.74c0 .04-.01.11-.06.13 0 0-1.25.89-3.31.89-2.49 0-5.44-.78-5.44-5.92S2.58 1.99 5.1 2c2.18 0 3.06.49 3.2.58.04.05.06.09.06.14L7.94 4.5c0 .09-.09.2-.2.17-.36-.11-.9-.33-2.17-.33-1.47 0-3.05.42-3.05 3.73s1.5 3.7 2.58 3.7c.92 0 1.25-.11 1.25-.11v-2.3H4.88c-.11 0-.19-.08-.19-.17V7.35c0-.09.08-.17.19-.17h3.74c.11 0 .19.08.19.17z",
          "evenodd"
        );
      }
      static get mail() {
        return new wh(
          16,
          16,
          "M1.75 2A1.75 1.75 0 000 3.75v.736a.75.75 0 000 .027v7.737C0 13.216.784 14 1.75 14h12.5A1.75 1.75 0 0016 12.25v-8.5A1.75 1.75 0 0014.25 2H1.75zM14.5 4.07v-.32a.25.25 0 00-.25-.25H1.75a.25.25 0 00-.25.25v.32L8 7.88l6.5-3.81zm-13 1.74v6.441c0 .138.112.25.25.25h12.5a.25.25 0 00.25-.25V5.809L8.38 9.397a.75.75 0 01-.76 0L1.5 5.809z",
          "evenodd"
        );
      }
      static get markGithub() {
        return new wh(
          16,
          16,
          "M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z",
          "evenodd"
        );
      }
      static get markdown() {
        return new wh(
          16,
          16,
          "M14.85 3H1.15C.52 3 0 3.52 0 4.15v7.69C0 12.48.52 13 1.15 13h13.69c.64 0 1.15-.52 1.15-1.15v-7.7C16 3.52 15.48 3 14.85 3zM9 11H7V8L5.5 9.92 4 8v3H2V5h2l1.5 2L7 5h2v6zm2.99.5L9.5 8H11V5h2v3h1.5l-2.51 3.5z",
          "evenodd"
        );
      }
      static get megaphone() {
        return new wh(
          16,
          16,
          "M15.571.572A.75.75 0 0116 1.25L14.777.668c.001 0 0 0 0 0l-.015.012-.076.056a5.508 5.508 0 01-.345.224 9.982 9.982 0 01-1.463.719c-1.322.528-3.351 1.07-6.124 1.071a1.6 1.6 0 00-.861-.25H4a4 4 0 00-1.499 7.71.758.758 0 00-.001.04c0 2.32.486 3.93.813 4.75.262.66.897 1 1.517 1h1.197c.685 0 1.228-.389 1.546-.857.317-.466.468-1.09.31-1.696-.2-.767-.382-1.835-.383-3.183 2.394.086 4.177.577 5.378 1.057a9.965 9.965 0 011.463.719 5.7 5.7 0 01.421.28l.014.012h.002A.75.75 0 0016 11.75V1.25L14.777.668a.75.75 0 01.794-.096zM4.002 10.5c.033 1.969.45 3.306.704 3.946.004.01.01.02.027.03a.185.185 0 00.097.024h1.197c.083 0 .202-.047.305-.2a.608.608 0 00.1-.475 14.036 14.036 0 01-.43-3.329 1.64 1.64 0 01-.11.004h-1.89zM7.5 8.763c2.601.087 4.573.62 5.935 1.166.41.164.766.33 1.065.483V2.588c-.3.154-.654.319-1.065.483C12.073 3.616 10.1 4.15 7.5 4.237v4.526zM14.777.668zM1.5 6.5A2.5 2.5 0 014 4h1.893c.059 0 .107.048.107.107v4.786A.107.107 0 015.893 9H4a2.5 2.5 0 01-2.5-2.5z",
          "evenodd"
        );
      }
      static get mention() {
        return new wh(
          16,
          16,
          "M4.75 2.37a6.5 6.5 0 006.5 11.26.75.75 0 01.75 1.298 8 8 0 113.994-7.273.754.754 0 01.006.095v1.5a2.75 2.75 0 01-5.072 1.475A4 4 0 1112 8v1.25a1.25 1.25 0 002.5 0V7.867a6.5 6.5 0 00-9.75-5.496V2.37zM10.5 8a2.5 2.5 0 10-5 0 2.5 2.5 0 005 0z",
          "evenodd"
        );
      }
      static get meter() {
        return new wh(
          16,
          16,
          "M8 1.5a6.5 6.5 0 106.016 4.035.75.75 0 011.388-.57 8 8 0 11-4.37-4.37.75.75 0 01-.569 1.389A6.479 6.479 0 008 1.5zm6.28.22a.75.75 0 010 1.06l-4.063 4.064a2.5 2.5 0 11-1.06-1.06L13.22 1.72a.75.75 0 011.06 0zM7 8a1 1 0 112 0 1 1 0 01-2 0z",
          "evenodd"
        );
      }
      static get milestone() {
        return new wh(
          16,
          16,
          "M7.75 0a.75.75 0 01.75.75V3h3.634c.414 0 .814.147 1.13.414l2.07 1.75a1.75 1.75 0 010 2.672l-2.07 1.75a1.75 1.75 0 01-1.13.414H8.5v5.25a.75.75 0 11-1.5 0V10H2.75A1.75 1.75 0 011 8.25v-3.5C1 3.784 1.784 3 2.75 3H7V.75A.75.75 0 017.75 0zm0 8.5h4.384a.25.25 0 00.161-.06l2.07-1.75a.25.25 0 000-.38l-2.07-1.75a.25.25 0 00-.161-.06H2.75a.25.25 0 00-.25.25v3.5c0 .138.112.25.25.25h5z",
          "evenodd"
        );
      }
      static get mirror() {
        return new wh(
          16,
          16,
          "M8.75 1.75a.75.75 0 00-1.5 0v.5a.75.75 0 001.5 0v-.5zM8 4a.75.75 0 01.75.75v.5a.75.75 0 01-1.5 0v-.5A.75.75 0 018 4zm.75 3.75a.75.75 0 00-1.5 0v.5a.75.75 0 001.5 0v-.5zM8 10a.75.75 0 01.75.75v.5a.75.75 0 01-1.5 0v-.5A.75.75 0 018 10zm0 3a.75.75 0 01.75.75v.5a.75.75 0 01-1.5 0v-.5A.75.75 0 018 13zm7.547-9.939A.75.75 0 0116 3.75v8.5a.75.75 0 01-1.265.545l-4.5-4.25a.75.75 0 010-1.09l4.5-4.25a.75.75 0 01.812-.144zM11.842 8l2.658 2.51V5.49L11.842 8zM0 12.25a.75.75 0 001.265.545l4.5-4.25a.75.75 0 000-1.09l-4.5-4.25A.75.75 0 000 3.75v8.5zm1.5-6.76L4.158 8 1.5 10.51V5.49z",
          "evenodd"
        );
      }
      static get moon() {
        return new wh(
          16,
          16,
          "M9.598 1.591a.75.75 0 01.785-.175 7 7 0 11-8.967 8.967.75.75 0 01.961-.96 5.5 5.5 0 007.046-7.046.75.75 0 01.175-.786zm1.616 1.945a7 7 0 01-7.678 7.678 5.5 5.5 0 107.678-7.678z",
          "evenodd"
        );
      }
      static get mortarBoard() {
        return new wh(
          16,
          16,
          "M7.693 1.066a.75.75 0 01.614 0l7.25 3.25a.75.75 0 010 1.368L13 6.831v2.794c0 1.024-.81 1.749-1.66 2.173-.893.447-2.075.702-3.34.702-.278 0-.55-.012-.816-.036a.75.75 0 01.133-1.494c.22.02.45.03.683.03 1.082 0 2.025-.221 2.67-.543.69-.345.83-.682.83-.832V7.503L8.307 8.934a.75.75 0 01-.614 0L4 7.28v1.663c.296.105.575.275.812.512.438.438.688 1.059.688 1.796v3a.75.75 0 01-.75.75h-3a.75.75 0 01-.75-.75v-3c0-.737.25-1.358.688-1.796.237-.237.516-.407.812-.512V6.606L.443 5.684a.75.75 0 010-1.368l7.25-3.25zM2.583 5L8 7.428 13.416 5 8 2.572 2.583 5zM2.5 11.25c0-.388.125-.611.25-.735a.704.704 0 01.5-.203c.19 0 .37.071.5.203.125.124.25.347.25.735v2.25H2.5v-2.25z",
          "evenodd"
        );
      }
      static get mute() {
        return new wh(
          16,
          16,
          "M8 2.75a.75.75 0 00-1.238-.57L3.472 5H1.75A1.75 1.75 0 000 6.75v2.5C0 10.216.784 11 1.75 11h1.723l3.289 2.82A.75.75 0 008 13.25V2.75zM4.238 6.32L6.5 4.38v7.24L4.238 9.68a.75.75 0 00-.488-.18h-2a.25.25 0 01-.25-.25v-2.5a.25.25 0 01.25-.25h2a.75.75 0 00.488-.18zm7.042-1.1a.75.75 0 10-1.06 1.06L11.94 8l-1.72 1.72a.75.75 0 101.06 1.06L13 9.06l1.72 1.72a.75.75 0 101.06-1.06L14.06 8l1.72-1.72a.75.75 0 00-1.06-1.06L13 6.94l-1.72-1.72z",
          "evenodd"
        );
      }
      static get noEntry() {
        return new wh(
          16,
          16,
          "M2.5 8a5.5 5.5 0 1111 0 5.5 5.5 0 01-11 0zM8 1a7 7 0 100 14A7 7 0 008 1zm3.25 7.75a.75.75 0 000-1.5h-6.5a.75.75 0 000 1.5h6.5z",
          "evenodd"
        );
      }
      static get northStar() {
        return new wh(
          16,
          16,
          "M8.5.75a.75.75 0 00-1.5 0v5.19L4.391 3.33a.75.75 0 10-1.06 1.061L5.939 7H.75a.75.75 0 000 1.5h5.19l-2.61 2.609a.75.75 0 101.061 1.06L7 9.561v5.189a.75.75 0 001.5 0V9.56l2.609 2.61a.75.75 0 101.06-1.061L9.561 8.5h5.189a.75.75 0 000-1.5H9.56l2.61-2.609a.75.75 0 00-1.061-1.06L8.5 5.939V.75z",
          void 0
        );
      }
      static get note() {
        return new wh(
          16,
          16,
          "M0 3.75C0 2.784.784 2 1.75 2h12.5c.966 0 1.75.784 1.75 1.75v8.5A1.75 1.75 0 0114.25 14H1.75A1.75 1.75 0 010 12.25v-8.5zm1.75-.25a.25.25 0 00-.25.25v8.5c0 .138.112.25.25.25h12.5a.25.25 0 00.25-.25v-8.5a.25.25 0 00-.25-.25H1.75zM3.5 6.25a.75.75 0 01.75-.75h7a.75.75 0 010 1.5h-7a.75.75 0 01-.75-.75zm.75 2.25a.75.75 0 000 1.5h4a.75.75 0 000-1.5h-4z",
          "evenodd"
        );
      }
      static get octoface() {
        return new wh(
          16,
          16,
          "M14.7 5.34c.13-.32.55-1.59-.13-3.31 0 0-1.05-.33-3.44 1.3-1-.28-2.07-.32-3.13-.32s-2.13.04-3.13.32c-2.39-1.64-3.44-1.3-3.44-1.3-.68 1.72-.26 2.99-.13 3.31C.49 6.21 0 7.33 0 8.69 0 13.84 3.33 15 7.98 15S16 13.84 16 8.69c0-1.36-.49-2.48-1.3-3.35zM8 14.02c-3.3 0-5.98-.15-5.98-3.35 0-.76.38-1.48 1.02-2.07 1.07-.98 2.9-.46 4.96-.46 2.07 0 3.88-.52 4.96.46.65.59 1.02 1.3 1.02 2.07 0 3.19-2.68 3.35-5.98 3.35zM5.49 9.01c-.66 0-1.2.8-1.2 1.78s.54 1.79 1.2 1.79c.66 0 1.2-.8 1.2-1.79s-.54-1.78-1.2-1.78zm5.02 0c-.66 0-1.2.79-1.2 1.78s.54 1.79 1.2 1.79c.66 0 1.2-.8 1.2-1.79s-.53-1.78-1.2-1.78z",
          "evenodd"
        );
      }
      static get organization() {
        return new wh(
          16,
          16,
          "M1.5 14.25c0 .138.112.25.25.25H4v-1.25a.75.75 0 01.75-.75h2.5a.75.75 0 01.75.75v1.25h2.25a.25.25 0 00.25-.25V1.75a.25.25 0 00-.25-.25h-8.5a.25.25 0 00-.25.25v12.5zM1.75 16A1.75 1.75 0 010 14.25V1.75C0 .784.784 0 1.75 0h8.5C11.216 0 12 .784 12 1.75v12.5c0 .085-.006.168-.018.25h2.268a.25.25 0 00.25-.25V8.285a.25.25 0 00-.111-.208l-1.055-.703a.75.75 0 11.832-1.248l1.055.703c.487.325.779.871.779 1.456v5.965A1.75 1.75 0 0114.25 16h-3.5a.75.75 0 01-.197-.026c-.099.017-.2.026-.303.026h-3a.75.75 0 01-.75-.75V14h-1v1.25a.75.75 0 01-.75.75h-3zM3 3.75A.75.75 0 013.75 3h.5a.75.75 0 010 1.5h-.5A.75.75 0 013 3.75zM3.75 6a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM3 9.75A.75.75 0 013.75 9h.5a.75.75 0 010 1.5h-.5A.75.75 0 013 9.75zM7.75 9a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM7 6.75A.75.75 0 017.75 6h.5a.75.75 0 010 1.5h-.5A.75.75 0 017 6.75zM7.75 3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5z",
          "evenodd"
        );
      }
      static get package() {
        return new wh(
          16,
          16,
          "M8.878.392a1.75 1.75 0 00-1.756 0l-5.25 3.045A1.75 1.75 0 001 4.951v6.098c0 .624.332 1.2.872 1.514l5.25 3.045a1.75 1.75 0 001.756 0l5.25-3.045c.54-.313.872-.89.872-1.514V4.951c0-.624-.332-1.2-.872-1.514L8.878.392zM7.875 1.69a.25.25 0 01.25 0l4.63 2.685L8 7.133 3.245 4.375l4.63-2.685zM2.5 5.677v5.372c0 .09.047.171.125.216l4.625 2.683V8.432L2.5 5.677zm6.25 8.271l4.625-2.683a.25.25 0 00.125-.216V5.677L8.75 8.432v5.516z",
          "evenodd"
        );
      }
      static get packageDependencies() {
        return new wh(
          16,
          16,
          "M6.122.392a1.75 1.75 0 011.756 0l5.25 3.045c.54.313.872.89.872 1.514V7.25a.75.75 0 01-1.5 0V5.677L7.75 8.432v6.384a1 1 0 01-1.502.865L.872 12.563A1.75 1.75 0 010 11.049V4.951c0-.624.332-1.2.872-1.514L6.122.392zM7.125 1.69l4.63 2.685L7 7.133 2.245 4.375l4.63-2.685a.25.25 0 01.25 0zM1.5 11.049V5.677l4.75 2.755v5.516l-4.625-2.683a.25.25 0 01-.125-.216zm11.672-.282a.75.75 0 10-1.087-1.034l-2.378 2.5a.75.75 0 000 1.034l2.378 2.5a.75.75 0 101.087-1.034L11.999 13.5h3.251a.75.75 0 000-1.5h-3.251l1.173-1.233z",
          "evenodd"
        );
      }
      static get packageDependents() {
        return new wh(
          16,
          16,
          "M6.122.392a1.75 1.75 0 011.756 0l5.25 3.045c.54.313.872.89.872 1.514V7.25a.75.75 0 01-1.5 0V5.677L7.75 8.432v6.384a1 1 0 01-1.502.865L.872 12.563A1.75 1.75 0 010 11.049V4.951c0-.624.332-1.2.872-1.514L6.122.392zM7.125 1.69l4.63 2.685L7 7.133 2.245 4.375l4.63-2.685a.25.25 0 01.25 0zM1.5 11.049V5.677l4.75 2.755v5.516l-4.625-2.683a.25.25 0 01-.125-.216zm10.828 3.684a.75.75 0 101.087 1.034l2.378-2.5a.75.75 0 000-1.034l-2.378-2.5a.75.75 0 00-1.087 1.034L13.501 12H10.25a.75.75 0 000 1.5h3.251l-1.173 1.233z",
          "evenodd"
        );
      }
      static get paintbrush() {
        return new wh(
          16,
          16,
          "M11.134 1.535C9.722 2.562 8.16 4.057 6.889 5.312 5.8 6.387 5.041 7.401 4.575 8.294a3.745 3.745 0 00-3.227 1.054c-.43.431-.69 1.066-.86 1.657a11.982 11.982 0 00-.358 1.914A21.263 21.263 0 000 15.203v.054l.75-.007-.007.75h.054a14.404 14.404 0 00.654-.012 21.243 21.243 0 001.63-.118c.62-.07 1.3-.18 1.914-.357.592-.17 1.226-.43 1.657-.861a3.745 3.745 0 001.055-3.217c.908-.461 1.942-1.216 3.04-2.3 1.279-1.262 2.764-2.825 3.775-4.249.501-.706.923-1.428 1.125-2.096.2-.659.235-1.469-.368-2.07-.606-.607-1.42-.55-2.069-.34-.66.213-1.376.646-2.076 1.155zm-3.95 8.48a3.76 3.76 0 00-1.19-1.192 9.758 9.758 0 011.161-1.607l1.658 1.658a9.853 9.853 0 01-1.63 1.142zM.742 16l.007-.75-.75.008A.75.75 0 00.743 16zM12.016 2.749c-1.224.89-2.605 2.189-3.822 3.384l1.718 1.718c1.21-1.205 2.51-2.597 3.387-3.833.47-.662.78-1.227.912-1.662.134-.444.032-.551.009-.575h-.001V1.78c-.014-.014-.112-.113-.548.027-.432.14-.995.462-1.655.942zM1.62 13.089a19.56 19.56 0 00-.104 1.395 19.55 19.55 0 001.396-.104 10.528 10.528 0 001.668-.309c.526-.151.856-.325 1.011-.48a2.25 2.25 0 00-3.182-3.182c-.155.155-.329.485-.48 1.01a10.515 10.515 0 00-.309 1.67z",
          "evenodd"
        );
      }
      static get paperAirplane() {
        return new wh(
          16,
          16,
          "M1.592 2.712L2.38 7.25h4.87a.75.75 0 110 1.5H2.38l-.788 4.538L13.929 8 1.592 2.712zM.989 8L.064 2.68a1.341 1.341 0 011.85-1.462l13.402 5.744a1.13 1.13 0 010 2.076L1.913 14.782a1.341 1.341 0 01-1.85-1.463L.99 8z",
          "evenodd"
        );
      }
      static get pencil() {
        return new wh(
          16,
          16,
          "M11.013 1.427a1.75 1.75 0 012.474 0l1.086 1.086a1.75 1.75 0 010 2.474l-8.61 8.61c-.21.21-.47.364-.756.445l-3.251.93a.75.75 0 01-.927-.928l.929-3.25a1.75 1.75 0 01.445-.758l8.61-8.61zm1.414 1.06a.25.25 0 00-.354 0L10.811 3.75l1.439 1.44 1.263-1.263a.25.25 0 000-.354l-1.086-1.086zM11.189 6.25L9.75 4.81l-6.286 6.287a.25.25 0 00-.064.108l-.558 1.953 1.953-.558a.249.249 0 00.108-.064l6.286-6.286z",
          "evenodd"
        );
      }
      static get people() {
        return new wh(
          16,
          16,
          "M5.5 3.5a2 2 0 100 4 2 2 0 000-4zM2 5.5a3.5 3.5 0 115.898 2.549 5.507 5.507 0 013.034 4.084.75.75 0 11-1.482.235 4.001 4.001 0 00-7.9 0 .75.75 0 01-1.482-.236A5.507 5.507 0 013.102 8.05 3.49 3.49 0 012 5.5zM11 4a.75.75 0 100 1.5 1.5 1.5 0 01.666 2.844.75.75 0 00-.416.672v.352a.75.75 0 00.574.73c1.2.289 2.162 1.2 2.522 2.372a.75.75 0 101.434-.44 5.01 5.01 0 00-2.56-3.012A3 3 0 0011 4z",
          "evenodd"
        );
      }
      static get person() {
        return new wh(
          16,
          16,
          "M10.5 5a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0zm.061 3.073a4 4 0 10-5.123 0 6.004 6.004 0 00-3.431 5.142.75.75 0 001.498.07 4.5 4.5 0 018.99 0 .75.75 0 101.498-.07 6.005 6.005 0 00-3.432-5.142z",
          "evenodd"
        );
      }
      static get pin() {
        return new wh(
          16,
          16,
          "M4.456.734a1.75 1.75 0 012.826.504l.613 1.327a3.081 3.081 0 002.084 1.707l2.454.584c1.332.317 1.8 1.972.832 2.94L11.06 10l3.72 3.72a.75.75 0 11-1.061 1.06L10 11.06l-2.204 2.205c-.968.968-2.623.5-2.94-.832l-.584-2.454a3.081 3.081 0 00-1.707-2.084l-1.327-.613a1.75 1.75 0 01-.504-2.826L4.456.734zM5.92 1.866a.25.25 0 00-.404-.072L1.794 5.516a.25.25 0 00.072.404l1.328.613A4.582 4.582 0 015.73 9.63l.584 2.454a.25.25 0 00.42.12l5.47-5.47a.25.25 0 00-.12-.42L9.63 5.73a4.581 4.581 0 01-3.098-2.537L5.92 1.866z",
          "evenodd"
        );
      }
      static get play() {
        return new wh(
          16,
          16,
          "M1.5 8a6.5 6.5 0 1113 0 6.5 6.5 0 01-13 0zM8 0a8 8 0 100 16A8 8 0 008 0zM6.379 5.227A.25.25 0 006 5.442v5.117a.25.25 0 00.379.214l4.264-2.559a.25.25 0 000-.428L6.379 5.227z",
          "evenodd"
        );
      }
      static get plug() {
        return new wh(
          16,
          16,
          "M10.276 3.09a.25.25 0 01.192-.09h.782a.25.25 0 01.25.25v8.5a.25.25 0 01-.25.25h-.782a.25.25 0 01-.192-.09l-.95-1.14a.75.75 0 00-.483-.264l-3.124-.39a.25.25 0 01-.219-.249V5.133a.25.25 0 01.219-.248l3.124-.39a.75.75 0 00.483-.265l.95-1.14zM4 8v1.867a1.75 1.75 0 001.533 1.737l2.83.354.761.912c.332.4.825.63 1.344.63h.782A1.75 1.75 0 0013 11.75V11h2.25a.75.75 0 000-1.5H13v-4h2.25a.75.75 0 000-1.5H13v-.75a1.75 1.75 0 00-1.75-1.75h-.782c-.519 0-1.012.23-1.344.63l-.76.913-2.831.353A1.75 1.75 0 004 5.133V6.5H2.5A2.5 2.5 0 000 9v5.25a.75.75 0 001.5 0V9a1 1 0 011-1H4z",
          "evenodd"
        );
      }
      static get plus() {
        return new wh(
          16,
          16,
          "M8 2a.75.75 0 01.75.75v4.5h4.5a.75.75 0 010 1.5h-4.5v4.5a.75.75 0 01-1.5 0v-4.5h-4.5a.75.75 0 010-1.5h4.5v-4.5A.75.75 0 018 2z",
          "evenodd"
        );
      }
      static get plusCircle() {
        return new wh(
          16,
          16,
          "M1.5 8a6.5 6.5 0 1113 0 6.5 6.5 0 01-13 0zM8 0a8 8 0 100 16A8 8 0 008 0zm.75 4.75a.75.75 0 00-1.5 0v2.5h-2.5a.75.75 0 000 1.5h2.5v2.5a.75.75 0 001.5 0v-2.5h2.5a.75.75 0 000-1.5h-2.5v-2.5z",
          "evenodd"
        );
      }
      static get project() {
        return new wh(
          16,
          16,
          "M1.75 0A1.75 1.75 0 000 1.75v12.5C0 15.216.784 16 1.75 16h12.5A1.75 1.75 0 0016 14.25V1.75A1.75 1.75 0 0014.25 0H1.75zM1.5 1.75a.25.25 0 01.25-.25h12.5a.25.25 0 01.25.25v12.5a.25.25 0 01-.25.25H1.75a.25.25 0 01-.25-.25V1.75zM11.75 3a.75.75 0 00-.75.75v7.5a.75.75 0 001.5 0v-7.5a.75.75 0 00-.75-.75zm-8.25.75a.75.75 0 011.5 0v5.5a.75.75 0 01-1.5 0v-5.5zM8 3a.75.75 0 00-.75.75v3.5a.75.75 0 001.5 0v-3.5A.75.75 0 008 3z",
          "evenodd"
        );
      }
      static get pulse() {
        return new wh(
          16,
          16,
          "M6 2a.75.75 0 01.696.471L10 10.731l1.304-3.26A.75.75 0 0112 7h3.25a.75.75 0 010 1.5h-2.742l-1.812 4.528a.75.75 0 01-1.392 0L6 4.77 4.696 8.03A.75.75 0 014 8.5H.75a.75.75 0 010-1.5h2.742l1.812-4.529A.75.75 0 016 2z",
          "evenodd"
        );
      }
      static get question() {
        return new wh(
          16,
          16,
          "M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM0 8a8 8 0 1116 0A8 8 0 010 8zm9 3a1 1 0 11-2 0 1 1 0 012 0zM6.92 6.085c.081-.16.19-.299.34-.398.145-.097.371-.187.74-.187.28 0 .553.087.738.225A.613.613 0 019 6.25c0 .177-.04.264-.077.318a.956.956 0 01-.277.245c-.076.051-.158.1-.258.161l-.007.004a7.728 7.728 0 00-.313.195 2.416 2.416 0 00-.692.661.75.75 0 001.248.832.956.956 0 01.276-.245 6.3 6.3 0 01.26-.16l.006-.004c.093-.057.204-.123.313-.195.222-.149.487-.355.692-.662.214-.32.329-.702.329-1.15 0-.76-.36-1.348-.863-1.725A2.76 2.76 0 008 4c-.631 0-1.155.16-1.572.438-.413.276-.68.638-.849.977a.75.75 0 101.342.67z",
          "evenodd"
        );
      }
      static get quote() {
        return new wh(
          16,
          16,
          "M1.75 2.5a.75.75 0 000 1.5h10.5a.75.75 0 000-1.5H1.75zm4 5a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5zm0 5a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5zM2.5 7.75a.75.75 0 00-1.5 0v6a.75.75 0 001.5 0v-6z",
          "evenodd"
        );
      }
      static get reply() {
        return new wh(
          16,
          16,
          "M6.78 1.97a.75.75 0 010 1.06L3.81 6h6.44A4.75 4.75 0 0115 10.75v2.5a.75.75 0 01-1.5 0v-2.5a3.25 3.25 0 00-3.25-3.25H3.81l2.97 2.97a.75.75 0 11-1.06 1.06L1.47 7.28a.75.75 0 010-1.06l4.25-4.25a.75.75 0 011.06 0z",
          "evenodd"
        );
      }
      static get repo() {
        return new wh(
          16,
          16,
          "M2 2.5A2.5 2.5 0 014.5 0h8.75a.75.75 0 01.75.75v12.5a.75.75 0 01-.75.75h-2.5a.75.75 0 110-1.5h1.75v-2h-8a1 1 0 00-.714 1.7.75.75 0 01-1.072 1.05A2.495 2.495 0 012 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 011-1h8zM5 12.25v3.25a.25.25 0 00.4.2l1.45-1.087a.25.25 0 01.3 0L8.6 15.7a.25.25 0 00.4-.2v-3.25a.25.25 0 00-.25-.25h-3.5a.25.25 0 00-.25.25z",
          "evenodd"
        );
      }
      static get repoClone() {
        return new wh(
          16,
          16,
          "M15 0H9v7c0 .55.45 1 1 1h1v1h1V8h3c.55 0 1-.45 1-1V1c0-.55-.45-1-1-1zm-4 7h-1V6h1v1zm4 0h-3V6h3v1zm0-2h-4V1h4v4zM4 5H3V4h1v1zm0-2H3V2h1v1zM2 1h6V0H1C.45 0 0 .45 0 1v12c0 .55.45 1 1 1h2v2l1.5-1.5L6 16v-2h5c.55 0 1-.45 1-1v-3H2V1zm9 10v2H6v-1H3v1H1v-2h10zM3 8h1v1H3V8zm1-1H3V6h1v1z",
          "evenodd"
        );
      }
      static get repoForked() {
        return new wh(
          16,
          16,
          "M5 3.25a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm0 2.122a2.25 2.25 0 10-1.5 0v.878A2.25 2.25 0 005.75 8.5h1.5v2.128a2.251 2.251 0 101.5 0V8.5h1.5a2.25 2.25 0 002.25-2.25v-.878a2.25 2.25 0 10-1.5 0v.878a.75.75 0 01-.75.75h-4.5A.75.75 0 015 6.25v-.878zm3.75 7.378a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm3-8.75a.75.75 0 100-1.5.75.75 0 000 1.5z",
          "evenodd"
        );
      }
      static get repoPull() {
        return new wh(
          16,
          16,
          "M13 8V6H7V4h6V2l3 3-3 3zM4 2H3v1h1V2zm7 5h1v6c0 .55-.45 1-1 1H6v2l-1.5-1.5L3 16v-2H1c-.55 0-1-.45-1-1V1c0-.55.45-1 1-1h10c.55 0 1 .45 1 1v2h-1V1H2v9h9V7zm0 4H1v2h2v-1h3v1h5v-2zM4 6H3v1h1V6zm0-2H3v1h1V4zM3 9h1V8H3v1z",
          "evenodd"
        );
      }
      static get repoPush() {
        return new wh(
          16,
          16,
          "M1 2.5A2.5 2.5 0 013.5 0h8.75a.75.75 0 01.75.75v3.5a.75.75 0 01-1.5 0V1.5h-8a1 1 0 00-1 1v6.708A2.492 2.492 0 013.5 9h3.25a.75.75 0 010 1.5H3.5a1 1 0 100 2h5.75a.75.75 0 010 1.5H3.5A2.5 2.5 0 011 11.5v-9zm13.23 7.79a.75.75 0 001.06-1.06l-2.505-2.505a.75.75 0 00-1.06 0L9.22 9.229a.75.75 0 001.06 1.061l1.225-1.224v6.184a.75.75 0 001.5 0V9.066l1.224 1.224z",
          "evenodd"
        );
      }
      static get repoTemplate() {
        return new wh(
          16,
          16,
          "M6 .75A.75.75 0 016.75 0h2.5a.75.75 0 010 1.5h-2.5A.75.75 0 016 .75zm5 0a.75.75 0 01.75-.75h1.5a.75.75 0 01.75.75v1.5a.75.75 0 01-1.5 0V1.5h-.75A.75.75 0 0111 .75zM4.992.662a.75.75 0 01-.636.848c-.436.063-.783.41-.846.846a.75.75 0 01-1.485-.212A2.501 2.501 0 014.144.025a.75.75 0 01.848.637zM2.75 4a.75.75 0 01.75.75v1.5a.75.75 0 01-1.5 0v-1.5A.75.75 0 012.75 4zm10.5 0a.75.75 0 01.75.75v1.5a.75.75 0 01-1.5 0v-1.5a.75.75 0 01.75-.75zM2.75 8a.75.75 0 01.75.75v.268A1.72 1.72 0 013.75 9h.5a.75.75 0 010 1.5h-.5a.25.25 0 00-.25.25v.75c0 .28.114.532.3.714a.75.75 0 01-1.05 1.072A2.495 2.495 0 012 11.5V8.75A.75.75 0 012.75 8zm10.5 0a.75.75 0 01.75.75v4.5a.75.75 0 01-.75.75h-2.5a.75.75 0 010-1.5h1.75v-2h-.75a.75.75 0 010-1.5h.75v-.25a.75.75 0 01.75-.75zM6 9.75A.75.75 0 016.75 9h2.5a.75.75 0 010 1.5h-2.5A.75.75 0 016 9.75zm-1 2.5v3.25a.25.25 0 00.4.2l1.45-1.087a.25.25 0 01.3 0L8.6 15.7a.25.25 0 00.4-.2v-3.25a.25.25 0 00-.25-.25h-3.5a.25.25 0 00-.25.25z",
          "evenodd"
        );
      }
      static get report() {
        return new wh(
          16,
          16,
          "M1.75 1.5a.25.25 0 00-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 01.75.75v2.19l2.72-2.72a.75.75 0 01.53-.22h6.5a.25.25 0 00.25-.25v-9.5a.25.25 0 00-.25-.25H1.75zM0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0114.25 13H8.06l-2.573 2.573A1.457 1.457 0 013 14.543V13H1.75A1.75 1.75 0 010 11.25v-9.5zM9 9a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z",
          "evenodd"
        );
      }
      static get rocket() {
        return new wh(
          16,
          16,
          "M14.064 0a8.75 8.75 0 00-6.187 2.563l-.459.458c-.314.314-.616.641-.904.979H3.31a1.75 1.75 0 00-1.49.833L.11 7.607a.75.75 0 00.418 1.11l3.102.954c.037.051.079.1.124.145l2.429 2.428c.046.046.094.088.145.125l.954 3.102a.75.75 0 001.11.418l2.774-1.707a1.75 1.75 0 00.833-1.49V9.485c.338-.288.665-.59.979-.904l.458-.459A8.75 8.75 0 0016 1.936V1.75A1.75 1.75 0 0014.25 0h-.186zM10.5 10.625c-.088.06-.177.118-.266.175l-2.35 1.521.548 1.783 1.949-1.2a.25.25 0 00.119-.213v-2.066zM3.678 8.116L5.2 5.766c.058-.09.117-.178.176-.266H3.309a.25.25 0 00-.213.119l-1.2 1.95 1.782.547zm5.26-4.493A7.25 7.25 0 0114.063 1.5h.186a.25.25 0 01.25.25v.186a7.25 7.25 0 01-2.123 5.127l-.459.458a15.21 15.21 0 01-2.499 2.02l-2.317 1.5-2.143-2.143 1.5-2.317a15.25 15.25 0 012.02-2.5l.458-.458h.002zM12 5a1 1 0 11-2 0 1 1 0 012 0zm-8.44 9.56a1.5 1.5 0 10-2.12-2.12c-.734.73-1.047 2.332-1.15 3.003a.23.23 0 00.265.265c.671-.103 2.273-.416 3.005-1.148z",
          "evenodd"
        );
      }
      static get rss() {
        return new wh(
          16,
          16,
          "M2.002 2.725a.75.75 0 01.797-.699C8.79 2.42 13.58 7.21 13.974 13.201a.75.75 0 11-1.497.098 10.502 10.502 0 00-9.776-9.776.75.75 0 01-.7-.798zM2 13a1 1 0 112 0 1 1 0 01-2 0zm.84-5.95a.75.75 0 00-.179 1.489c2.509.3 4.5 2.291 4.8 4.8a.75.75 0 101.49-.178A7.003 7.003 0 002.838 7.05z",
          "evenodd"
        );
      }
      static get ruby() {
        return new wh(
          16,
          16,
          "M3.637 2.291A.75.75 0 014.23 2h7.54a.75.75 0 01.593.291l3.48 4.5a.75.75 0 01-.072.999l-7.25 7a.75.75 0 01-1.042 0l-7.25-7a.75.75 0 01-.072-.999l3.48-4.5zM4.598 3.5L1.754 7.177 8 13.207l6.246-6.03L11.402 3.5H4.598z",
          "evenodd"
        );
      }
      static get screenFull() {
        return new wh(
          16,
          16,
          "M2.75 2.5a.25.25 0 00-.25.25v2.5a.75.75 0 01-1.5 0v-2.5C1 1.784 1.784 1 2.75 1h2.5a.75.75 0 010 1.5h-2.5zM10 1.75a.75.75 0 01.75-.75h2.5c.966 0 1.75.784 1.75 1.75v2.5a.75.75 0 01-1.5 0v-2.5a.25.25 0 00-.25-.25h-2.5a.75.75 0 01-.75-.75zM1.75 10a.75.75 0 01.75.75v2.5c0 .138.112.25.25.25h2.5a.75.75 0 010 1.5h-2.5A1.75 1.75 0 011 13.25v-2.5a.75.75 0 01.75-.75zm12.5 0a.75.75 0 01.75.75v2.5A1.75 1.75 0 0113.25 15h-2.5a.75.75 0 010-1.5h2.5a.25.25 0 00.25-.25v-2.5a.75.75 0 01.75-.75z",
          "evenodd"
        );
      }
      static get screenNormal() {
        return new wh(
          16,
          16,
          "M5.25 1a.75.75 0 01.75.75v2.5A1.75 1.75 0 014.25 6h-2.5a.75.75 0 010-1.5h2.5a.25.25 0 00.25-.25v-2.5A.75.75 0 015.25 1zm5.5 0a.75.75 0 01.75.75v2.5c0 .138.112.25.25.25h2.5a.75.75 0 010 1.5h-2.5A1.75 1.75 0 0110 4.25v-2.5a.75.75 0 01.75-.75zM1 10.75a.75.75 0 01.75-.75h2.5c.966 0 1.75.784 1.75 1.75v2.5a.75.75 0 01-1.5 0v-2.5a.25.25 0 00-.25-.25h-2.5a.75.75 0 01-.75-.75zm9 1c0-.966.784-1.75 1.75-1.75h2.5a.75.75 0 010 1.5h-2.5a.25.25 0 00-.25.25v2.5a.75.75 0 01-1.5 0v-2.5z",
          "evenodd"
        );
      }
      static get search() {
        return new wh(
          16,
          16,
          "M11.5 7a4.499 4.499 0 11-8.998 0A4.499 4.499 0 0111.5 7zm-.82 4.74a6 6 0 111.06-1.06l3.04 3.04a.75.75 0 11-1.06 1.06l-3.04-3.04z",
          "evenodd"
        );
      }
      static get server() {
        return new wh(
          16,
          16,
          "M1.75 1A1.75 1.75 0 000 2.75v4c0 .372.116.717.314 1a1.742 1.742 0 00-.314 1v4c0 .966.784 1.75 1.75 1.75h12.5A1.75 1.75 0 0016 12.75v-4c0-.372-.116-.717-.314-1 .198-.283.314-.628.314-1v-4A1.75 1.75 0 0014.25 1H1.75zm0 7.5a.25.25 0 00-.25.25v4c0 .138.112.25.25.25h12.5a.25.25 0 00.25-.25v-4a.25.25 0 00-.25-.25H1.75zM1.5 2.75a.25.25 0 01.25-.25h12.5a.25.25 0 01.25.25v4a.25.25 0 01-.25.25H1.75a.25.25 0 01-.25-.25v-4zm5.5 2A.75.75 0 017.75 4h4.5a.75.75 0 010 1.5h-4.5A.75.75 0 017 4.75zM7.75 10a.75.75 0 000 1.5h4.5a.75.75 0 000-1.5h-4.5zM3 4.75A.75.75 0 013.75 4h.5a.75.75 0 010 1.5h-.5A.75.75 0 013 4.75zM3.75 10a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5z",
          "evenodd"
        );
      }
      static get settings() {
        return new wh(
          24,
          24,
          "M11.31 2.525a9.648 9.648 0 011.38 0c.055.004.135.05.162.16l.351 1.45c.153.628.626 1.08 1.173 1.278.205.074.405.157.6.249a1.832 1.832 0 001.733-.074l1.275-.776c.097-.06.186-.036.228 0 .348.302.674.628.976.976.036.042.06.13 0 .228l-.776 1.274a1.832 1.832 0 00-.074 1.734c.092.195.175.395.248.6.198.547.652 1.02 1.278 1.172l1.45.353c.111.026.157.106.161.161a9.653 9.653 0 010 1.38c-.004.055-.05.135-.16.162l-1.45.351a1.833 1.833 0 00-1.278 1.173 6.926 6.926 0 01-.25.6 1.832 1.832 0 00.075 1.733l.776 1.275c.06.097.036.186 0 .228a9.555 9.555 0 01-.976.976c-.042.036-.13.06-.228 0l-1.275-.776a1.832 1.832 0 00-1.733-.074 6.926 6.926 0 01-.6.248 1.833 1.833 0 00-1.172 1.278l-.353 1.45c-.026.111-.106.157-.161.161a9.653 9.653 0 01-1.38 0c-.055-.004-.135-.05-.162-.16l-.351-1.45a1.833 1.833 0 00-1.173-1.278 6.928 6.928 0 01-.6-.25 1.832 1.832 0 00-1.734.075l-1.274.776c-.097.06-.186.036-.228 0a9.56 9.56 0 01-.976-.976c-.036-.042-.06-.13 0-.228l.776-1.275a1.832 1.832 0 00.074-1.733 6.948 6.948 0 01-.249-.6 1.833 1.833 0 00-1.277-1.172l-1.45-.353c-.111-.026-.157-.106-.161-.161a9.648 9.648 0 010-1.38c.004-.055.05-.135.16-.162l1.45-.351a1.833 1.833 0 001.278-1.173 6.95 6.95 0 01.249-.6 1.832 1.832 0 00-.074-1.734l-.776-1.274c-.06-.097-.036-.186 0-.228.302-.348.628-.674.976-.976.042-.036.13-.06.228 0l1.274.776a1.832 1.832 0 001.734.074 6.95 6.95 0 01.6-.249 1.833 1.833 0 001.172-1.277l.353-1.45c.026-.111.106-.157.161-.161zM12 1c-.268 0-.534.01-.797.028-.763.055-1.345.617-1.512 1.304l-.352 1.45c-.02.078-.09.172-.225.22a8.45 8.45 0 00-.728.303c-.13.06-.246.044-.315.002l-1.274-.776c-.604-.368-1.412-.354-1.99.147-.403.348-.78.726-1.129 1.128-.5.579-.515 1.387-.147 1.99l.776 1.275c.042.069.059.185-.002.315a8.45 8.45 0 00-.302.728c-.05.135-.143.206-.221.225l-1.45.352c-.687.167-1.249.749-1.304 1.512a11.149 11.149 0 000 1.594c.055.763.617 1.345 1.304 1.512l1.45.352c.078.02.172.09.22.225.09.248.191.491.303.729.06.129.044.245.002.314l-.776 1.274c-.368.604-.354 1.412.147 1.99.348.403.726.78 1.128 1.129.579.5 1.387.515 1.99.147l1.275-.776c.069-.042.185-.059.315.002.237.112.48.213.728.302.135.05.206.143.225.221l.352 1.45c.167.687.749 1.249 1.512 1.303a11.125 11.125 0 001.594 0c.763-.054 1.345-.616 1.512-1.303l.352-1.45c.02-.078.09-.172.225-.22.248-.09.491-.191.729-.303.129-.06.245-.044.314-.002l1.274.776c.604.368 1.412.354 1.99-.147.403-.348.78-.726 1.129-1.128.5-.579.515-1.387.147-1.99l-.776-1.275c-.042-.069-.059-.185.002-.315.112-.237.213-.48.302-.728.05-.135.143-.206.221-.225l1.45-.352c.687-.167 1.249-.749 1.303-1.512a11.125 11.125 0 000-1.594c-.054-.763-.616-1.345-1.303-1.512l-1.45-.352c-.078-.02-.172-.09-.22-.225a8.469 8.469 0 00-.303-.728c-.06-.13-.044-.246-.002-.315l.776-1.274c.368-.604.354-1.412-.147-1.99-.348-.403-.726-.78-1.128-1.129-.579-.5-1.387-.515-1.99-.147l-1.275.776c-.069.042-.185.059-.315-.002a8.465 8.465 0 00-.728-.302c-.135-.05-.206-.143-.225-.221l-.352-1.45c-.167-.687-.749-1.249-1.512-1.304A11.149 11.149 0 0012 1zm2.5 11a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0zm1.5 0a4 4 0 11-8 0 4 4 0 018 0z",
          "evenodd"
        );
      }
      static get share() {
        return new wh(
          16,
          16,
          "M7.823.177L4.927 3.073a.25.25 0 00.177.427H7.25v5.75a.75.75 0 001.5 0V3.5h2.146a.25.25 0 00.177-.427L8.177.177a.25.25 0 00-.354 0zM3.75 6.5a.25.25 0 00-.25.25v6.5c0 .138.112.25.25.25h8.5a.25.25 0 00.25-.25v-6.5a.25.25 0 00-.25-.25h-1a.75.75 0 010-1.5h1c.966 0 1.75.784 1.75 1.75v6.5A1.75 1.75 0 0112.25 15h-8.5A1.75 1.75 0 012 13.25v-6.5C2 5.784 2.784 5 3.75 5h1a.75.75 0 110 1.5h-1z",
          "evenodd"
        );
      }
      static get shareAndroid() {
        return new wh(
          16,
          16,
          "M13.5 3a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0zM15 3a3 3 0 01-5.175 2.066l-3.92 2.179a3.005 3.005 0 010 1.51l3.92 2.179a3 3 0 11-.73 1.31l-3.92-2.178a3 3 0 110-4.133l3.92-2.178A3 3 0 1115 3zm-1.5 10a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0zm-9-5a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0z",
          "evenodd"
        );
      }
      static get shield() {
        return new wh(
          16,
          16,
          "M7.467.133a1.75 1.75 0 011.066 0l5.25 1.68A1.75 1.75 0 0115 3.48V7c0 1.566-.32 3.182-1.303 4.682-.983 1.498-2.585 2.813-5.032 3.855a1.7 1.7 0 01-1.33 0c-2.447-1.042-4.049-2.357-5.032-3.855C1.32 10.182 1 8.566 1 7V3.48a1.75 1.75 0 011.217-1.667l5.25-1.68zm.61 1.429a.25.25 0 00-.153 0l-5.25 1.68a.25.25 0 00-.174.238V7c0 1.358.275 2.666 1.057 3.86.784 1.194 2.121 2.34 4.366 3.297a.2.2 0 00.154 0c2.245-.956 3.582-2.104 4.366-3.298C13.225 9.666 13.5 8.36 13.5 7V3.48a.25.25 0 00-.174-.237l-5.25-1.68zM9 10.5a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.75a.75.75 0 10-1.5 0v3a.75.75 0 001.5 0v-3z",
          "evenodd"
        );
      }
      static get shieldCheck() {
        return new wh(
          16,
          16,
          "M8.533.133a1.75 1.75 0 00-1.066 0l-5.25 1.68A1.75 1.75 0 001 3.48V7c0 1.566.32 3.182 1.303 4.682.983 1.498 2.585 2.813 5.032 3.855a1.7 1.7 0 001.33 0c2.447-1.042 4.049-2.357 5.032-3.855C14.68 10.182 15 8.566 15 7V3.48a1.75 1.75 0 00-1.217-1.667L8.533.133zm-.61 1.429a.25.25 0 01.153 0l5.25 1.68a.25.25 0 01.174.238V7c0 1.358-.275 2.666-1.057 3.86-.784 1.194-2.121 2.34-4.366 3.297a.2.2 0 01-.154 0c-2.245-.956-3.582-2.104-4.366-3.298C2.775 9.666 2.5 8.36 2.5 7V3.48a.25.25 0 01.174-.237l5.25-1.68zM11.28 6.28a.75.75 0 00-1.06-1.06L7.25 8.19l-.97-.97a.75.75 0 10-1.06 1.06l1.5 1.5a.75.75 0 001.06 0l3.5-3.5z",
          "evenodd"
        );
      }
      static get shieldLock() {
        return new wh(
          16,
          16,
          "M8.533.133a1.75 1.75 0 00-1.066 0l-5.25 1.68A1.75 1.75 0 001 3.48V7c0 1.566.32 3.182 1.303 4.682.983 1.498 2.585 2.813 5.032 3.855a1.7 1.7 0 001.33 0c2.447-1.042 4.049-2.357 5.032-3.855C14.68 10.182 15 8.566 15 7V3.48a1.75 1.75 0 00-1.217-1.667L8.533.133zm-.61 1.429a.25.25 0 01.153 0l5.25 1.68a.25.25 0 01.174.238V7c0 1.358-.275 2.666-1.057 3.86-.784 1.194-2.121 2.34-4.366 3.297a.2.2 0 01-.154 0c-2.245-.956-3.582-2.104-4.366-3.298C2.775 9.666 2.5 8.36 2.5 7V3.48a.25.25 0 01.174-.237l5.25-1.68zM9.5 6.5a1.5 1.5 0 01-.75 1.3v2.45a.75.75 0 01-1.5 0V7.8A1.5 1.5 0 119.5 6.5z",
          "evenodd"
        );
      }
      static get shieldX() {
        return new wh(
          16,
          16,
          "M8.533.133a1.75 1.75 0 00-1.066 0l-5.25 1.68A1.75 1.75 0 001 3.48V7c0 1.566.32 3.182 1.303 4.682.983 1.498 2.585 2.813 5.032 3.855a1.7 1.7 0 001.33 0c2.447-1.042 4.049-2.357 5.032-3.855C14.68 10.182 15 8.566 15 7V3.48a1.75 1.75 0 00-1.217-1.667L8.533.133zm-.61 1.429a.25.25 0 01.153 0l5.25 1.68a.25.25 0 01.174.238V7c0 1.358-.275 2.666-1.057 3.86-.784 1.194-2.121 2.34-4.366 3.297a.2.2 0 01-.154 0c-2.245-.956-3.582-2.104-4.366-3.298C2.775 9.666 2.5 8.36 2.5 7V3.48a.25.25 0 01.174-.237l5.25-1.68zM6.78 5.22a.75.75 0 10-1.06 1.06L6.94 7.5 5.72 8.72a.75.75 0 001.06 1.06L8 8.56l1.22 1.22a.75.75 0 101.06-1.06L9.06 7.5l1.22-1.22a.75.75 0 10-1.06-1.06L8 6.44 6.78 5.22z",
          "evenodd"
        );
      }
      static get signIn() {
        return new wh(
          16,
          16,
          "M2 2.75C2 1.784 2.784 1 3.75 1h2.5a.75.75 0 010 1.5h-2.5a.25.25 0 00-.25.25v10.5c0 .138.112.25.25.25h2.5a.75.75 0 010 1.5h-2.5A1.75 1.75 0 012 13.25V2.75zm6.56 4.5l1.97-1.97a.75.75 0 10-1.06-1.06L6.22 7.47a.75.75 0 000 1.06l3.25 3.25a.75.75 0 101.06-1.06L8.56 8.75h5.69a.75.75 0 000-1.5H8.56z",
          "evenodd"
        );
      }
      static get signOut() {
        return new wh(
          16,
          16,
          "M2 2.75C2 1.784 2.784 1 3.75 1h2.5a.75.75 0 010 1.5h-2.5a.25.25 0 00-.25.25v10.5c0 .138.112.25.25.25h2.5a.75.75 0 010 1.5h-2.5A1.75 1.75 0 012 13.25V2.75zm10.44 4.5H6.75a.75.75 0 000 1.5h5.69l-1.97 1.97a.75.75 0 101.06 1.06l3.25-3.25a.75.75 0 000-1.06l-3.25-3.25a.75.75 0 10-1.06 1.06l1.97 1.97z",
          "evenodd"
        );
      }
      static get skip() {
        return new wh(
          16,
          16,
          "M1.5 8a6.5 6.5 0 1113 0 6.5 6.5 0 01-13 0zM8 0a8 8 0 100 16A8 8 0 008 0zm3.28 5.78a.75.75 0 00-1.06-1.06l-5.5 5.5a.75.75 0 101.06 1.06l5.5-5.5z",
          "evenodd"
        );
      }
      static get smiley() {
        return new wh(
          16,
          16,
          "M1.5 8a6.5 6.5 0 1113 0 6.5 6.5 0 01-13 0zM8 0a8 8 0 100 16A8 8 0 008 0zM5 8a1 1 0 100-2 1 1 0 000 2zm7-1a1 1 0 11-2 0 1 1 0 012 0zM5.32 9.636a.75.75 0 011.038.175l.007.009c.103.118.22.222.35.31.264.178.683.37 1.285.37.602 0 1.02-.192 1.285-.371.13-.088.247-.192.35-.31l.007-.008a.75.75 0 111.222.87l-.614-.431c.614.43.614.431.613.431v.001l-.001.002-.002.003-.005.007-.014.019a1.984 1.984 0 01-.184.213c-.16.166-.338.316-.53.445-.63.418-1.37.638-2.127.629-.946 0-1.652-.308-2.126-.63a3.32 3.32 0 01-.715-.657l-.014-.02-.005-.006-.002-.003v-.002h-.001l.613-.432-.614.43a.75.75 0 01.183-1.044h.001z",
          "evenodd"
        );
      }
      static get square() {
        return new wh(
          16,
          16,
          "M4 5.75C4 4.784 4.784 4 5.75 4h4.5c.966 0 1.75.784 1.75 1.75v4.5A1.75 1.75 0 0110.25 12h-4.5A1.75 1.75 0 014 10.25v-4.5zm1.75-.25a.25.25 0 00-.25.25v4.5c0 .138.112.25.25.25h4.5a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-4.5z",
          "evenodd"
        );
      }
      static get squareFill() {
        return new wh(
          16,
          16,
          "M5.75 4A1.75 1.75 0 004 5.75v4.5c0 .966.784 1.75 1.75 1.75h4.5A1.75 1.75 0 0012 10.25v-4.5A1.75 1.75 0 0010.25 4h-4.5z",
          "evenodd"
        );
      }
      static get squirrel() {
        return new wh(
          16,
          16,
          "M3.499.75a.75.75 0 011.5 0v.996C5.9 2.903 6.793 3.65 7.662 4.376l.24.202c-.036-.694.055-1.422.426-2.163C9.1.873 10.794-.045 12.622.26 14.408.558 16 1.94 16 4.25c0 1.278-.954 2.575-2.44 2.734l.146.508.065.22c.203.701.412 1.455.476 2.226.142 1.707-.4 3.03-1.487 3.898C11.714 14.671 10.27 15 8.75 15h-6a.75.75 0 010-1.5h1.376a4.489 4.489 0 01-.563-1.191 3.833 3.833 0 01-.05-2.063 4.636 4.636 0 01-2.025-.293.75.75 0 11.525-1.406c1.357.507 2.376-.006 2.698-.318l.009-.01a.748.748 0 011.06 0 .75.75 0 01-.012 1.074c-.912.92-.992 1.835-.768 2.586.221.74.745 1.337 1.196 1.621H8.75c1.343 0 2.398-.296 3.074-.836.635-.507 1.036-1.31.928-2.602-.05-.603-.216-1.224-.422-1.93l-.064-.221c-.12-.407-.246-.84-.353-1.29a2.404 2.404 0 01-.507-.441 3.063 3.063 0 01-.633-1.248.75.75 0 011.455-.364c.046.185.144.436.31.627.146.168.353.305.712.305.738 0 1.25-.615 1.25-1.25 0-1.47-.95-2.315-2.123-2.51-1.172-.196-2.227.387-2.706 1.345-.46.92-.27 1.774.019 3.062l.042.19a.753.753 0 01.01.05c.348.443.666.949.94 1.553a.75.75 0 11-1.365.62c-.553-1.217-1.32-1.94-2.3-2.768a85.08 85.08 0 00-.317-.265c-.814-.68-1.75-1.462-2.692-2.619a3.74 3.74 0 00-1.023.88c-.406.495-.663 1.036-.722 1.508.116.122.306.21.591.239.388.038.797-.06 1.032-.19a.75.75 0 01.728 1.31c-.515.287-1.23.439-1.906.373-.682-.067-1.473-.38-1.879-1.193L.75 5.677V5.5c0-.984.48-1.94 1.077-2.664.46-.559 1.05-1.055 1.673-1.353V.75z",
          "evenodd"
        );
      }
      static get star() {
        return new wh(
          16,
          16,
          "M8 .25a.75.75 0 01.673.418l1.882 3.815 4.21.612a.75.75 0 01.416 1.279l-3.046 2.97.719 4.192a.75.75 0 01-1.088.791L8 12.347l-3.766 1.98a.75.75 0 01-1.088-.79l.72-4.194L.818 6.374a.75.75 0 01.416-1.28l4.21-.611L7.327.668A.75.75 0 018 .25zm0 2.445L6.615 5.5a.75.75 0 01-.564.41l-3.097.45 2.24 2.184a.75.75 0 01.216.664l-.528 3.084 2.769-1.456a.75.75 0 01.698 0l2.77 1.456-.53-3.084a.75.75 0 01.216-.664l2.24-2.183-3.096-.45a.75.75 0 01-.564-.41L8 2.694v.001z",
          "evenodd"
        );
      }
      static get starFill() {
        return new wh(
          16,
          16,
          "M8 .25a.75.75 0 01.673.418l1.882 3.815 4.21.612a.75.75 0 01.416 1.279l-3.046 2.97.719 4.192a.75.75 0 01-1.088.791L8 12.347l-3.766 1.98a.75.75 0 01-1.088-.79l.72-4.194L.818 6.374a.75.75 0 01.416-1.28l4.21-.611L7.327.668A.75.75 0 018 .25z",
          "evenodd"
        );
      }
      static get stop() {
        return new wh(
          16,
          16,
          "M4.47.22A.75.75 0 015 0h6a.75.75 0 01.53.22l4.25 4.25c.141.14.22.331.22.53v6a.75.75 0 01-.22.53l-4.25 4.25A.75.75 0 0111 16H5a.75.75 0 01-.53-.22L.22 11.53A.75.75 0 010 11V5a.75.75 0 01.22-.53L4.47.22zm.84 1.28L1.5 5.31v5.38l3.81 3.81h5.38l3.81-3.81V5.31L10.69 1.5H5.31zM8 4a.75.75 0 01.75.75v3.5a.75.75 0 01-1.5 0v-3.5A.75.75 0 018 4zm0 8a1 1 0 100-2 1 1 0 000 2z",
          "evenodd"
        );
      }
      static get stopwatch() {
        return new wh(
          16,
          16,
          "M5.75.75A.75.75 0 016.5 0h3a.75.75 0 010 1.5h-.75v1l-.001.041a6.718 6.718 0 013.464 1.435l.007-.006.75-.75a.75.75 0 111.06 1.06l-.75.75-.006.007a6.75 6.75 0 11-10.548 0L2.72 5.03l-.75-.75a.75.75 0 011.06-1.06l.75.75.007.006A6.718 6.718 0 017.25 2.541a.756.756 0 010-.041v-1H6.5a.75.75 0 01-.75-.75zM8 14.5A5.25 5.25 0 108 4a5.25 5.25 0 000 10.5zm.389-6.7l1.33-1.33a.75.75 0 111.061 1.06L9.45 8.861A1.502 1.502 0 018 10.75a1.5 1.5 0 11.389-2.95z",
          "evenodd"
        );
      }
      static get sun() {
        return new wh(
          16,
          16,
          "M8 10.5a2.5 2.5 0 100-5 2.5 2.5 0 000 5zM8 12a4 4 0 100-8 4 4 0 000 8zM8 0a.75.75 0 01.75.75v1.5a.75.75 0 01-1.5 0V.75A.75.75 0 018 0zm0 13a.75.75 0 01.75.75v1.5a.75.75 0 01-1.5 0v-1.5A.75.75 0 018 13zM2.343 2.343a.75.75 0 011.061 0l1.06 1.061a.75.75 0 01-1.06 1.06l-1.06-1.06a.75.75 0 010-1.06zm9.193 9.193a.75.75 0 011.06 0l1.061 1.06a.75.75 0 01-1.06 1.061l-1.061-1.06a.75.75 0 010-1.061zM16 8a.75.75 0 01-.75.75h-1.5a.75.75 0 010-1.5h1.5A.75.75 0 0116 8zM3 8a.75.75 0 01-.75.75H.75a.75.75 0 010-1.5h1.5A.75.75 0 013 8zm10.657-5.657a.75.75 0 010 1.061l-1.061 1.06a.75.75 0 11-1.06-1.06l1.06-1.06a.75.75 0 011.06 0zm-9.193 9.193a.75.75 0 010 1.06l-1.06 1.061a.75.75 0 11-1.061-1.06l1.06-1.061a.75.75 0 011.061 0z",
          "evenodd"
        );
      }
      static get sync() {
        return new wh(
          16,
          16,
          "M8 2.5a5.487 5.487 0 00-4.131 1.869l1.204 1.204A.25.25 0 014.896 6H1.25A.25.25 0 011 5.75V2.104a.25.25 0 01.427-.177l1.38 1.38A7.001 7.001 0 0114.95 7.16a.75.75 0 11-1.49.178A5.501 5.501 0 008 2.5zM1.705 8.005a.75.75 0 01.834.656 5.501 5.501 0 009.592 2.97l-1.204-1.204a.25.25 0 01.177-.427h3.646a.25.25 0 01.25.25v3.646a.25.25 0 01-.427.177l-1.38-1.38A7.001 7.001 0 011.05 8.84a.75.75 0 01.656-.834z",
          "evenodd"
        );
      }
      static get tab() {
        return new wh(
          24,
          24,
          "M22 4.25a.75.75 0 00-1.5 0v15a.75.75 0 001.5 0v-15zm-9.72 14.28a.75.75 0 11-1.06-1.06l4.97-4.97H1.75a.75.75 0 010-1.5h14.44l-4.97-4.97a.75.75 0 011.06-1.06l6.25 6.25a.75.75 0 010 1.06l-6.25 6.25z",
          void 0
        );
      }
      static get tag() {
        return new wh(
          16,
          16,
          "M2.5 7.775V2.75a.25.25 0 01.25-.25h5.025a.25.25 0 01.177.073l6.25 6.25a.25.25 0 010 .354l-5.025 5.025a.25.25 0 01-.354 0l-6.25-6.25a.25.25 0 01-.073-.177zm-1.5 0V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 010 2.474l-5.026 5.026a1.75 1.75 0 01-2.474 0l-6.25-6.25A1.75 1.75 0 011 7.775zM6 5a1 1 0 100 2 1 1 0 000-2z",
          "evenodd"
        );
      }
      static get tasklist() {
        return new wh(
          16,
          16,
          "M2.5 2.75a.25.25 0 01.25-.25h10.5a.25.25 0 01.25.25v10.5a.25.25 0 01-.25.25H2.75a.25.25 0 01-.25-.25V2.75zM2.75 1A1.75 1.75 0 001 2.75v10.5c0 .966.784 1.75 1.75 1.75h10.5A1.75 1.75 0 0015 13.25V2.75A1.75 1.75 0 0013.25 1H2.75zm9.03 5.28a.75.75 0 00-1.06-1.06L6.75 9.19 5.28 7.72a.75.75 0 00-1.06 1.06l2 2a.75.75 0 001.06 0l4.5-4.5z",
          "evenodd"
        );
      }
      static get telescope() {
        return new wh(
          16,
          16,
          "M14.184 1.143a1.75 1.75 0 00-2.502-.57L.912 7.916a1.75 1.75 0 00-.53 2.32l.447.775a1.75 1.75 0 002.275.702l11.745-5.656a1.75 1.75 0 00.757-2.451l-1.422-2.464zm-1.657.669a.25.25 0 01.358.081l1.422 2.464a.25.25 0 01-.108.35l-2.016.97-1.505-2.605 1.85-1.26zM9.436 3.92l1.391 2.41-5.42 2.61-.942-1.63 4.97-3.39zM3.222 8.157l-1.466 1a.25.25 0 00-.075.33l.447.775a.25.25 0 00.325.1l1.598-.769-.83-1.436zm6.253 2.306a.75.75 0 00-.944-.252l-1.809.87a.75.75 0 00-.293.253L4.38 14.326a.75.75 0 101.238.848l1.881-2.75v2.826a.75.75 0 001.5 0v-2.826l1.881 2.75a.75.75 0 001.238-.848l-2.644-3.863z",
          "evenodd"
        );
      }
      static get terminal() {
        return new wh(
          16,
          16,
          "M0 2.75C0 1.784.784 1 1.75 1h12.5c.966 0 1.75.784 1.75 1.75v10.5A1.75 1.75 0 0114.25 15H1.75A1.75 1.75 0 010 13.25V2.75zm1.75-.25a.25.25 0 00-.25.25v10.5c0 .138.112.25.25.25h12.5a.25.25 0 00.25-.25V2.75a.25.25 0 00-.25-.25H1.75zM7.25 8a.75.75 0 01-.22.53l-2.25 2.25a.75.75 0 11-1.06-1.06L5.44 8 3.72 6.28a.75.75 0 111.06-1.06l2.25 2.25c.141.14.22.331.22.53zm1.5 1.5a.75.75 0 000 1.5h3a.75.75 0 000-1.5h-3z",
          "evenodd"
        );
      }
      static get threeBars() {
        return new wh(
          16,
          16,
          "M1 2.75A.75.75 0 011.75 2h12.5a.75.75 0 110 1.5H1.75A.75.75 0 011 2.75zm0 5A.75.75 0 011.75 7h12.5a.75.75 0 110 1.5H1.75A.75.75 0 011 7.75zM1.75 12a.75.75 0 100 1.5h12.5a.75.75 0 100-1.5H1.75z",
          "evenodd"
        );
      }
      static get thumbsdown() {
        return new wh(
          16,
          16,
          "M7.083 15.986c1.34.153 2.334-.982 2.334-2.183v-.5c0-1.329.646-2.123 1.317-2.614.329-.24.66-.403.919-.508a1.75 1.75 0 001.514.872h1a1.75 1.75 0 001.75-1.75v-7.5a1.75 1.75 0 00-1.75-1.75h-1a1.75 1.75 0 00-1.662 1.2c-.525-.074-1.068-.228-1.726-.415L9.305.705C8.151.385 6.765.053 4.917.053c-1.706 0-2.97.152-3.722 1.139-.353.463-.537 1.042-.669 1.672C.41 3.424.32 4.108.214 4.897l-.04.306c-.25 1.869-.266 3.318.188 4.316.244.537.622.943 1.136 1.2.495.248 1.066.334 1.669.334h1.422l-.015.112c-.07.518-.157 1.17-.157 1.638 0 .921.151 1.718.655 2.299.512.589 1.248.797 2.011.884zm4.334-13.232c-.706-.089-1.39-.284-2.072-.479a63.914 63.914 0 00-.441-.125c-1.096-.304-2.335-.597-3.987-.597-1.794 0-2.28.222-2.529.548-.147.193-.275.505-.393 1.07-.105.502-.188 1.124-.295 1.93l-.04.3c-.25 1.882-.19 2.933.067 3.497a.921.921 0 00.443.48c.208.104.52.175.997.175h1.75c.685 0 1.295.577 1.205 1.335-.022.192-.049.39-.075.586-.066.488-.13.97-.13 1.329 0 .808.144 1.15.288 1.316.137.157.401.303 1.048.377.307.035.664-.237.664-.693v-.5c0-1.922.978-3.127 1.932-3.825a5.862 5.862 0 011.568-.809V2.754zm1.75 6.798a.25.25 0 01-.25-.25v-7.5a.25.25 0 01.25-.25h1a.25.25 0 01.25.25v7.5a.25.25 0 01-.25.25h-1z",
          "evenodd"
        );
      }
      static get thumbsup() {
        return new wh(
          16,
          16,
          "M8.834.066C7.494-.087 6.5 1.048 6.5 2.25v.5c0 1.329-.647 2.124-1.318 2.614-.328.24-.66.403-.918.508A1.75 1.75 0 002.75 5h-1A1.75 1.75 0 000 6.75v7.5C0 15.216.784 16 1.75 16h1a1.75 1.75 0 001.662-1.201c.525.075 1.067.229 1.725.415.152.043.31.088.475.133 1.154.32 2.54.653 4.388.653 1.706 0 2.97-.153 3.722-1.14.353-.463.537-1.042.668-1.672.118-.56.208-1.243.313-2.033l.04-.306c.25-1.869.265-3.318-.188-4.316a2.418 2.418 0 00-1.137-1.2C13.924 5.085 13.353 5 12.75 5h-1.422l.015-.113c.07-.518.157-1.17.157-1.637 0-.922-.151-1.719-.656-2.3-.51-.589-1.247-.797-2.01-.884zM4.5 13.3c.705.088 1.39.284 2.072.478l.441.125c1.096.305 2.334.598 3.987.598 1.794 0 2.28-.223 2.528-.549.147-.193.276-.505.394-1.07.105-.502.188-1.124.295-1.93l.04-.3c.25-1.882.189-2.933-.068-3.497a.922.922 0 00-.442-.48c-.208-.104-.52-.174-.997-.174H11c-.686 0-1.295-.577-1.206-1.336.023-.192.05-.39.076-.586.065-.488.13-.97.13-1.328 0-.809-.144-1.15-.288-1.316-.137-.158-.402-.304-1.048-.378C8.357 1.521 8 1.793 8 2.25v.5c0 1.922-.978 3.128-1.933 3.825a5.861 5.861 0 01-1.567.81V13.3zM2.75 6.5a.25.25 0 01.25.25v7.5a.25.25 0 01-.25.25h-1a.25.25 0 01-.25-.25v-7.5a.25.25 0 01.25-.25h1z",
          "evenodd"
        );
      }
      static get tools() {
        return new wh(
          16,
          16,
          "M5.433 2.304A4.494 4.494 0 003.5 6c0 1.598.832 3.002 2.09 3.802.518.328.929.923.902 1.64v.008l-.164 3.337a.75.75 0 11-1.498-.073l.163-3.33c.002-.085-.05-.216-.207-.316A5.996 5.996 0 012 6a5.994 5.994 0 012.567-4.92 1.482 1.482 0 011.673-.04c.462.296.76.827.76 1.423v2.82c0 .082.041.16.11.206l.75.51a.25.25 0 00.28 0l.75-.51A.25.25 0 009 5.282V2.463c0-.596.298-1.127.76-1.423a1.482 1.482 0 011.673.04A5.994 5.994 0 0114 6a5.996 5.996 0 01-2.786 5.068c-.157.1-.209.23-.207.315l.163 3.33a.75.75 0 11-1.498.074l-.164-3.345c-.027-.717.384-1.312.902-1.64A4.496 4.496 0 0012.5 6a4.494 4.494 0 00-1.933-3.696c-.024.017-.067.067-.067.16v2.818a1.75 1.75 0 01-.767 1.448l-.75.51a1.75 1.75 0 01-1.966 0l-.75-.51A1.75 1.75 0 015.5 5.282V2.463c0-.092-.043-.142-.067-.159zm.01-.005z",
          "evenodd"
        );
      }
      static get trash() {
        return new wh(
          24,
          24,
          "M16 1.75V3h5.25a.75.75 0 010 1.5H2.75a.75.75 0 010-1.5H8V1.75C8 .784 8.784 0 9.75 0h4.5C15.216 0 16 .784 16 1.75zm-6.5 0a.25.25 0 01.25-.25h4.5a.25.25 0 01.25.25V3h-5V1.75z",
          "evenodd"
        );
      }
      static get trashcan() {
        return new wh(
          16,
          16,
          "M6.5 1.75a.25.25 0 01.25-.25h2.5a.25.25 0 01.25.25V3h-3V1.75zm4.5 0V3h2.25a.75.75 0 010 1.5H2.75a.75.75 0 010-1.5H5V1.75C5 .784 5.784 0 6.75 0h2.5C10.216 0 11 .784 11 1.75zM4.496 6.675a.75.75 0 10-1.492.15l.66 6.6A1.75 1.75 0 005.405 15h5.19c.9 0 1.652-.681 1.741-1.576l.66-6.6a.75.75 0 00-1.492-.149l-.66 6.6a.25.25 0 01-.249.225h-5.19a.25.25 0 01-.249-.225l-.66-6.6z",
          "evenodd"
        );
      }
      static get triangleDown() {
        return new wh(
          16,
          16,
          "M4.427 6.427l3.396 3.396a.25.25 0 00.354 0l3.396-3.396A.25.25 0 0011.396 6H4.604a.25.25 0 00-.177.427z",
          void 0
        );
      }
      static get triangleLeft() {
        return new wh(
          16,
          16,
          "M9.573 4.427L6.177 7.823a.25.25 0 000 .354l3.396 3.396a.25.25 0 00.427-.177V4.604a.25.25 0 00-.427-.177z",
          void 0
        );
      }
      static get triangleRight() {
        return new wh(
          16,
          16,
          "M6.427 4.427l3.396 3.396a.25.25 0 010 .354l-3.396 3.396A.25.25 0 016 11.396V4.604a.25.25 0 01.427-.177z",
          void 0
        );
      }
      static get triangleUp() {
        return new wh(
          16,
          16,
          "M4.427 9.573l3.396-3.396a.25.25 0 01.354 0l3.396 3.396a.25.25 0 01-.177.427H4.604a.25.25 0 01-.177-.427z",
          void 0
        );
      }
      static get typography() {
        return new wh(
          16,
          16,
          "M6.21 8.5L4.574 3.594 2.857 8.5H6.21zm.5 1.5l.829 2.487a.75.75 0 001.423-.474L5.735 2.332a1.216 1.216 0 00-2.302-.018l-3.39 9.688a.75.75 0 001.415.496L2.332 10H6.71zm3.13-4.358C10.53 4.374 11.87 4 13 4c1.5 0 3 .939 3 2.601v5.649a.75.75 0 01-1.448.275C13.995 12.82 13.3 13 12.5 13c-.77 0-1.514-.231-2.078-.709-.577-.488-.922-1.199-.922-2.041 0-.694.265-1.411.887-1.944C11 7.78 11.88 7.5 13 7.5h1.5v-.899c0-.54-.5-1.101-1.5-1.101-.869 0-1.528.282-1.84.858a.75.75 0 11-1.32-.716zM14.5 9H13c-.881 0-1.375.22-1.637.444-.253.217-.363.5-.363.806 0 .408.155.697.39.896.249.21.63.354 1.11.354.732 0 1.26-.209 1.588-.449.35-.257.412-.495.412-.551V9z",
          "evenodd"
        );
      }
      static get unfold() {
        return new wh(
          16,
          16,
          "M8.177.677l2.896 2.896a.25.25 0 01-.177.427H8.75v1.25a.75.75 0 01-1.5 0V4H5.104a.25.25 0 01-.177-.427L7.823.677a.25.25 0 01.354 0zM7.25 10.75a.75.75 0 011.5 0V12h2.146a.25.25 0 01.177.427l-2.896 2.896a.25.25 0 01-.354 0l-2.896-2.896A.25.25 0 015.104 12H7.25v-1.25zm-5-2a.75.75 0 000-1.5h-.5a.75.75 0 000 1.5h.5zM6 8a.75.75 0 01-.75.75h-.5a.75.75 0 010-1.5h.5A.75.75 0 016 8zm2.25.75a.75.75 0 000-1.5h-.5a.75.75 0 000 1.5h.5zM12 8a.75.75 0 01-.75.75h-.5a.75.75 0 010-1.5h.5A.75.75 0 0112 8zm2.25.75a.75.75 0 000-1.5h-.5a.75.75 0 000 1.5h.5z",
          "evenodd"
        );
      }
      static get unlock() {
        return new wh(
          16,
          16,
          "M5.5 4a2.5 2.5 0 014.607-1.346.75.75 0 101.264-.808A4 4 0 004 4v2h-.501A1.5 1.5 0 002 7.5v6A1.5 1.5 0 003.5 15h9a1.5 1.5 0 001.5-1.5v-6A1.5 1.5 0 0012.5 6h-7V4zm-.75 3.5H3.5v6h9v-6H4.75z",
          "evenodd"
        );
      }
      static get unmute() {
        return new wh(
          16,
          16,
          "M7.563 2.069A.75.75 0 018 2.75v10.5a.75.75 0 01-1.238.57L3.472 11H1.75A1.75 1.75 0 010 9.25v-2.5C0 5.784.784 5 1.75 5h1.723l3.289-2.82a.75.75 0 01.801-.111zM6.5 4.38L4.238 6.319a.75.75 0 01-.488.181h-2a.25.25 0 00-.25.25v2.5c0 .138.112.25.25.25h2a.75.75 0 01.488.18L6.5 11.62V4.38zm6.096-2.038a.75.75 0 011.06 0 8 8 0 010 11.314.75.75 0 01-1.06-1.06 6.5 6.5 0 000-9.193.75.75 0 010-1.06v-.001zm-1.06 2.121a.75.75 0 10-1.061 1.061 3.5 3.5 0 010 4.95.75.75 0 101.06 1.06 5 5 0 000-7.07l.001-.001z",
          "evenodd"
        );
      }
      static get unverifed() {
        return new wh(
          24,
          24,
          "M13 16.5a1 1 0 11-2 0 1 1 0 012 0zm-2.517-7.665c.112-.223.268-.424.488-.57C11.186 8.12 11.506 8 12 8c.384 0 .766.118 1.034.319a.953.953 0 01.403.806c0 .48-.218.81-.62 1.186a9.293 9.293 0 01-.409.354 19.8 19.8 0 00-.294.249c-.246.213-.524.474-.738.795l-.126.19V13.5a.75.75 0 001.5 0v-1.12c.09-.1.203-.208.347-.333.063-.055.14-.119.222-.187.166-.14.358-.3.52-.452.536-.5 1.098-1.2 1.098-2.283a2.45 2.45 0 00-1.003-2.006C13.37 6.695 12.658 6.5 12 6.5c-.756 0-1.373.191-1.861.517a2.944 2.944 0 00-.997 1.148.75.75 0 001.341.67z",
          void 0
        );
      }
      static get unverified() {
        return new wh(
          16,
          16,
          "M6.415.52a2.678 2.678 0 013.17 0l.928.68c.153.113.33.186.518.215l1.138.175a2.678 2.678 0 012.241 2.24l.175 1.138c.029.187.102.365.215.518l.68.928a2.678 2.678 0 010 3.17l-.68.928a1.179 1.179 0 00-.215.518l-.175 1.138a2.678 2.678 0 01-2.241 2.241l-1.138.175a1.179 1.179 0 00-.518.215l-.928.68a2.678 2.678 0 01-3.17 0l-.928-.68a1.179 1.179 0 00-.518-.215L3.83 14.41a2.678 2.678 0 01-2.24-2.24l-.175-1.138a1.179 1.179 0 00-.215-.518l-.68-.928a2.678 2.678 0 010-3.17l.68-.928a1.17 1.17 0 00.215-.518l.175-1.14a2.678 2.678 0 012.24-2.24l1.138-.175c.187-.029.365-.102.518-.215l.928-.68zm2.282 1.209a1.178 1.178 0 00-1.394 0l-.928.68a2.678 2.678 0 01-1.18.489l-1.136.174a1.178 1.178 0 00-.987.987l-.174 1.137a2.678 2.678 0 01-.489 1.18l-.68.927c-.305.415-.305.98 0 1.394l.68.928c.256.348.423.752.489 1.18l.174 1.136c.078.51.478.909.987.987l1.137.174c.427.066.831.233 1.18.489l.927.68c.415.305.98.305 1.394 0l.928-.68a2.678 2.678 0 011.18-.489l1.136-.174c.51-.078.909-.478.987-.987l.174-1.137c.066-.427.233-.831.489-1.18l.68-.927c.305-.415.305-.98 0-1.394l-.68-.928a2.678 2.678 0 01-.489-1.18l-.174-1.136a1.178 1.178 0 00-.987-.987l-1.137-.174a2.678 2.678 0 01-1.18-.489l-.927-.68zM9 11a1 1 0 11-2 0 1 1 0 012 0zM6.92 6.085c.081-.16.19-.299.34-.398.145-.097.371-.187.74-.187.28 0 .553.087.738.225A.613.613 0 019 6.25c0 .177-.04.264-.077.318a.956.956 0 01-.277.245c-.076.051-.158.1-.258.161l-.007.004c-.093.056-.204.122-.313.195a2.416 2.416 0 00-.692.661.75.75 0 001.248.832.956.956 0 01.276-.245 6.3 6.3 0 01.26-.16l.006-.004c.093-.057.204-.123.313-.195.222-.149.487-.355.692-.662.214-.32.329-.702.329-1.15 0-.76-.36-1.348-.862-1.725A2.76 2.76 0 008 4c-.631 0-1.154.16-1.572.438-.413.276-.68.638-.849.977a.75.75 0 001.342.67z",
          "evenodd"
        );
      }
      static get upload() {
        return new wh(
          16,
          16,
          "M8.53 1.22a.75.75 0 00-1.06 0L3.72 4.97a.75.75 0 001.06 1.06l2.47-2.47v6.69a.75.75 0 001.5 0V3.56l2.47 2.47a.75.75 0 101.06-1.06L8.53 1.22zM3.75 13a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5z",
          "evenodd"
        );
      }
      static get verified() {
        return new wh(
          16,
          16,
          "M9.585.52a2.678 2.678 0 00-3.17 0l-.928.68a1.178 1.178 0 01-.518.215L3.83 1.59a2.678 2.678 0 00-2.24 2.24l-.175 1.14a1.178 1.178 0 01-.215.518l-.68.928a2.678 2.678 0 000 3.17l.68.928c.113.153.186.33.215.518l.175 1.138a2.678 2.678 0 002.24 2.24l1.138.175c.187.029.365.102.518.215l.928.68a2.678 2.678 0 003.17 0l.928-.68a1.17 1.17 0 01.518-.215l1.138-.175a2.678 2.678 0 002.241-2.241l.175-1.138c.029-.187.102-.365.215-.518l.68-.928a2.678 2.678 0 000-3.17l-.68-.928a1.179 1.179 0 01-.215-.518L14.41 3.83a2.678 2.678 0 00-2.24-2.24l-1.138-.175a1.179 1.179 0 01-.518-.215L9.585.52zM7.303 1.728c.415-.305.98-.305 1.394 0l.928.68c.348.256.752.423 1.18.489l1.136.174c.51.078.909.478.987.987l.174 1.137c.066.427.233.831.489 1.18l.68.927c.305.415.305.98 0 1.394l-.68.928a2.678 2.678 0 00-.489 1.18l-.174 1.136a1.178 1.178 0 01-.987.987l-1.137.174a2.678 2.678 0 00-1.18.489l-.927.68c-.415.305-.98.305-1.394 0l-.928-.68a2.678 2.678 0 00-1.18-.489l-1.136-.174a1.178 1.178 0 01-.987-.987l-.174-1.137a2.678 2.678 0 00-.489-1.18l-.68-.927a1.178 1.178 0 010-1.394l.68-.928c.256-.348.423-.752.489-1.18l.174-1.136c.078-.51.478-.909.987-.987l1.137-.174a2.678 2.678 0 001.18-.489l.927-.68zM11.28 6.78a.75.75 0 00-1.06-1.06L7 8.94 5.78 7.72a.75.75 0 00-1.06 1.06l1.75 1.75a.75.75 0 001.06 0l3.75-3.75z",
          "evenodd"
        );
      }
      static get versions() {
        return new wh(
          16,
          16,
          "M7.75 14A1.75 1.75 0 016 12.25v-8.5C6 2.784 6.784 2 7.75 2h6.5c.966 0 1.75.784 1.75 1.75v8.5A1.75 1.75 0 0114.25 14h-6.5zm-.25-1.75c0 .138.112.25.25.25h6.5a.25.25 0 00.25-.25v-8.5a.25.25 0 00-.25-.25h-6.5a.25.25 0 00-.25.25v8.5zM4.9 3.508a.75.75 0 01-.274 1.025.25.25 0 00-.126.217v6.5a.25.25 0 00.126.217.75.75 0 01-.752 1.298A1.75 1.75 0 013 11.25v-6.5c0-.649.353-1.214.874-1.516a.75.75 0 011.025.274zM1.625 5.533a.75.75 0 10-.752-1.299A1.75 1.75 0 000 5.75v4.5c0 .649.353 1.214.874 1.515a.75.75 0 10.752-1.298.25.25 0 01-.126-.217v-4.5a.25.25 0 01.126-.217z",
          "evenodd"
        );
      }
      static get workflow() {
        return new wh(
          16,
          16,
          "M0 1.75C0 .784.784 0 1.75 0h3.5C6.216 0 7 .784 7 1.75v3.5A1.75 1.75 0 015.25 7H4v4a1 1 0 001 1h4v-1.25C9 9.784 9.784 9 10.75 9h3.5c.966 0 1.75.784 1.75 1.75v3.5A1.75 1.75 0 0114.25 16h-3.5A1.75 1.75 0 019 14.25v-.75H5A2.5 2.5 0 012.5 11V7h-.75A1.75 1.75 0 010 5.25v-3.5zm1.75-.25a.25.25 0 00-.25.25v3.5c0 .138.112.25.25.25h3.5a.25.25 0 00.25-.25v-3.5a.25.25 0 00-.25-.25h-3.5zm9 9a.25.25 0 00-.25.25v3.5c0 .138.112.25.25.25h3.5a.25.25 0 00.25-.25v-3.5a.25.25 0 00-.25-.25h-3.5z",
          "evenodd"
        );
      }
      static get x() {
        return new wh(
          16,
          16,
          "M3.72 3.72a.75.75 0 011.06 0L8 6.94l3.22-3.22a.75.75 0 111.06 1.06L9.06 8l3.22 3.22a.75.75 0 11-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 01-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 010-1.06z",
          "evenodd"
        );
      }
      static get xCircle() {
        return new wh(
          24,
          24,
          "M9.036 7.976a.75.75 0 00-1.06 1.06L10.939 12l-2.963 2.963a.75.75 0 101.06 1.06L12 13.06l2.963 2.964a.75.75 0 001.061-1.06L13.061 12l2.963-2.964a.75.75 0 10-1.06-1.06L12 10.939 9.036 7.976z",
          void 0
        );
      }
      static get xCircleFill() {
        return new wh(
          24,
          24,
          "M1 12C1 5.925 5.925 1 12 1s11 4.925 11 11-4.925 11-11 11S1 18.075 1 12zm8.036-4.024a.75.75 0 00-1.06 1.06L10.939 12l-2.963 2.963a.75.75 0 101.06 1.06L12 13.06l2.963 2.964a.75.75 0 001.061-1.06L13.061 12l2.963-2.964a.75.75 0 10-1.06-1.06L12 10.939 9.036 7.976z",
          "evenodd"
        );
      }
      static get zap() {
        return new wh(
          16,
          16,
          "M10.561 1.5a.016.016 0 00-.01.004L3.286 8.571A.25.25 0 003.462 9H6.75a.75.75 0 01.694 1.034l-1.713 4.188 6.982-6.793A.25.25 0 0012.538 7H9.25a.75.75 0 01-.683-1.06l2.008-4.418.003-.006a.02.02 0 00-.004-.009.02.02 0 00-.006-.006L10.56 1.5zM9.504.43a1.516 1.516 0 012.437 1.713L10.415 5.5h2.123c1.57 0 2.346 1.909 1.22 3.004l-7.34 7.142a1.25 1.25 0 01-.871.354h-.302a1.25 1.25 0 01-1.157-1.723L5.633 10.5H3.462c-1.57 0-2.346-1.909-1.22-3.004L9.503.429z",
          "evenodd"
        );
      }
    }
    function bh(e) {
      if (e instanceof Ui) return wh.desktopDownload;
      if (e.missing) return wh.alert;
      const t = e.gitHubRepository;
      return t
        ? t.isPrivate
          ? wh.lock
          : t.fork
          ? wh.repoForked
          : wh.repo
        : wh.deviceDesktop;
    }
    function Sh(e) {
      switch (e.kind) {
        case io.New:
        case io.Untracked:
          return wh.diffAdded;
        case io.Modified:
          return wh.diffModified;
        case io.Deleted:
          return wh.diffRemoved;
        case io.Renamed:
          return wh.diffRenamed;
        case io.Conflicted:
          if (yo(e)) {
            return e.conflictMarkerCount > 0 ? wh.alert : wh.check;
          }
          return wh.alert;
        case io.Copied:
          return wh.diffAdded;
        default:
          return X(0, "Unknown file status " + e);
      }
    }
    const Ch = new wh(
      16,
      16,
      "M8 2.5c1.645 0 3.123.722 4.131 1.869l-1.204 1.204a.25.25 0 0 0 .177.427h3.646a.25.25 0 0 0 .25-.25V2.104a.25.25 0 0 0-.427-.177l-1.38 1.38A7.001 7.001 0 0 0 1.05 7.16a.75.75 0 1 0 1.49.178A5.501 5.501 0 0 1 8 2.5zm6.294 5.505a.75.75 0 0 0-.833.656 5.501 5.501 0 0 1-9.592 2.97l1.204-1.204A.25.25 0 0 0 4.896 10H1.25a.25.25 0 0 0-.25.25v3.646c0 .223.27.335.427.177l1.38-1.38A7.001 7.001 0 0 0 14.95 8.84a.75.75 0 0 0-.657-.834z",
      "evenodd"
    );
    class Eh extends w.Component {
      constructor() {
        super(...arguments),
          (this.getStyle = hi((e) => ({ height: 28 }))),
          (this.onTitlebarDoubleClickDarwin = () => {
            const e = r.remote.systemPreferences.getUserDefault(
                "AppleActionOnDoubleClick",
                "string"
              ),
              t = r.remote.getCurrentWindow();
            switch (e) {
              case "Maximize":
                t.isMaximized() ? t.unmaximize() : t.maximize();
                break;
              case "Minimize":
                t.minimize();
            }
          });
      }
      render() {
        const e = "full-screen" === this.props.windowState,
          t = "maximized" === this.props.windowState,
          n = e ? null : w.createElement(fh, null),
          r = t
            ? null
            : w.createElement("div", { className: "resize-handle top" }),
          i = t
            ? null
            : w.createElement("div", { className: "resize-handle left" }),
          o = "light" === this.props.titleBarStyle ? "light-title-bar" : "",
          s = this.props.showAppIcon
            ? w.createElement(vh, {
                className: "app-icon",
                symbol: wh.markGithub,
              })
            : null;
        return w.createElement(
          "div",
          {
            className: o,
            id: "desktop-app-title-bar",
            onDoubleClick: void 0,
            style: this.getStyle(this.props.windowZoomFactor),
          },
          r,
          i,
          s,
          this.props.children,
          n
        );
      }
    }
    class kh extends w.Component {
      constructor(e) {
        super(e),
          (this.infoDisappearTimeoutId = null),
          (this.transitionGroupDisappearTimeoutId = null),
          (this.onInfoDisappearTimeout = () => {
            this.setState({ renderInfo: !1 });
          }),
          (this.onTransitionGroupDisappearTimeout = () => {
            this.setState({ renderTransitionGroup: !1 });
          }),
          (this.state = {
            windowZoomFactor: e.windowZoomFactor,
            renderTransitionGroup: !1,
            renderInfo: !1,
            transitionName: "zoom-in",
          });
      }
      componentWillReceiveProps(e) {
        const t = this.state.windowZoomFactor !== e.windowZoomFactor;
        if (!t) return;
        null !== this.infoDisappearTimeoutId &&
          window.clearTimeout(this.infoDisappearTimeoutId),
          null !== this.transitionGroupDisappearTimeoutId &&
            window.clearTimeout(this.transitionGroupDisappearTimeoutId),
          (this.infoDisappearTimeoutId = window.setTimeout(
            this.onInfoDisappearTimeout,
            750
          )),
          (this.transitionGroupDisappearTimeoutId = window.setTimeout(
            this.onTransitionGroupDisappearTimeout,
            950
          ));
        const n =
          e.windowZoomFactor > this.state.windowZoomFactor
            ? "zoom-in"
            : "zoom-out";
        this.setState({
          windowZoomFactor: e.windowZoomFactor,
          renderTransitionGroup: t,
          renderInfo: t,
          transitionName: n,
        });
      }
      renderZoomInfo() {
        if (!this.state.renderInfo) return null;
        const e = (100 * this.state.windowZoomFactor).toFixed(0) + "%";
        return w.createElement(
          K,
          {
            classNames: this.state.transitionName,
            appear: !0,
            enter: !1,
            exit: !0,
            timeout: 100,
          },
          w.createElement("div", null, w.createElement("span", null, e))
        );
      }
      render() {
        return this.state.renderTransitionGroup
          ? w.createElement(
              O,
              { id: "window-zoom-info" },
              this.renderZoomInfo()
            )
          : null;
      }
    }
    const xh = { appear: 100, exit: 250 };
    class Rh extends w.Component {
      constructor(e) {
        super(e),
          (this.infoDisappearTimeoutId = null),
          (this.transitionGroupDisappearTimeoutId = null),
          (this.onInfoDisappearTimeout = () => {
            this.setState({ renderInfo: !1 });
          }),
          (this.onTransitionGroupDisappearTimeout = () => {
            this.setState({ renderTransitionGroup: !1 });
          }),
          (this.state = { renderInfo: !1, renderTransitionGroup: !1 });
      }
      static getDerivedStateFromProps(e, t) {
        if ("hidden" === e.windowState) return null;
        if (t.windowState !== e.windowState) {
          const t = "full-screen" === e.windowState;
          return {
            windowState: e.windowState,
            renderInfo: t,
            renderTransitionGroup: t,
          };
        }
        return null;
      }
      componentDidMount() {
        this.state.renderInfo && this.scheduleInfoDisappear(),
          this.state.renderTransitionGroup &&
            this.scheduleTransitionGroupDisappear();
      }
      componentDidUpdate(e, t) {
        t.renderInfo !== this.state.renderInfo &&
          (this.state.renderInfo
            ? this.scheduleInfoDisappear()
            : this.clearInfoDisappearTimeout()),
          t.renderTransitionGroup !== this.state.renderTransitionGroup &&
            (this.state.renderTransitionGroup
              ? this.scheduleTransitionGroupDisappear()
              : this.clearTransitionGroupDisappearTimeout());
      }
      componentWillUnmount() {
        this.clearInfoDisappearTimeout(),
          this.clearTransitionGroupDisappearTimeout();
      }
      scheduleInfoDisappear() {
        this.infoDisappearTimeoutId = window.setTimeout(
          this.onInfoDisappearTimeout,
          3e3
        );
      }
      clearInfoDisappearTimeout() {
        null !== this.infoDisappearTimeoutId &&
          (window.clearTimeout(this.infoDisappearTimeoutId),
          (this.infoDisappearTimeoutId = null));
      }
      scheduleTransitionGroupDisappear() {
        this.transitionGroupDisappearTimeoutId = window.setTimeout(
          this.onTransitionGroupDisappearTimeout,
          xh.appear + 3e3 + xh.exit
        );
      }
      clearTransitionGroupDisappearTimeout() {
        null !== this.transitionGroupDisappearTimeoutId &&
          (window.clearTimeout(this.transitionGroupDisappearTimeoutId),
          (this.transitionGroupDisappearTimeoutId = null));
      }
      renderFullScreenNotification() {
        if (!this.state.renderInfo) return null;
        return w.createElement(
          K,
          {
            classNames: "toast-animation",
            appear: !0,
            enter: !1,
            exit: !0,
            timeout: xh,
          },
          w.createElement(
            "div",
            { key: "notification", className: "toast-notification" },
            "Press ",
            w.createElement("kbd", null, "F11"),
            " to exit fullscreen"
          )
        );
      }
      render() {
        return this.state.renderTransitionGroup
          ? w.createElement(
              O,
              { className: "toast-notification-container" },
              this.renderFullScreenNotification()
            )
          : null;
      }
    }
    const Th = ({ text: e, highlight: t }) =>
      w.createElement(
        "span",
        null,
        e
          .split("")
          .map((e, n) => [e, t.includes(n)])
          .concat([["", !1]])
          .reduce(
            (e, [t, n], r, i) => {
              if (n === e.matched && r < i.length - 1) e.str += t;
              else {
                const i = e.matched ? "mark" : "span";
                e.result.push(w.createElement(i, { key: r }, e.str)),
                  (e.str = t),
                  (e.matched = n);
              }
              return e;
            },
            { matched: !1, str: "", result: new Array() }
          ).result
      );
    class Dh extends w.Component {
      constructor() {
        super(...arguments),
          (this.onContextMenu = (e) => {
            e.preventDefault();
            const t = this.props.repository,
              n = t instanceof lo && t.missing,
              r = this.props.externalEditorLabel
                ? "在" + this.props.externalEditorLabel+"打开"
                : "在外部编辑器中打开";
            se([
              {
                label: "在" + this.props.shellLabel+"中打开",
                action: this.openInShell,
                enabled: !n,
              },
              {
                label: "在资源管理器中显示",
                action: this.showRepository,
                enabled: !n,
              },
              { label: r, action: this.openInExternalEditor, enabled: !n },
              { type: "separator" },
              {
                label: this.props.askForConfirmationOnRemoveRepository
                  ? "移除…"
                  : "移除",
                action: this.removeRepository,
              },
            ]);
          }),
          (this.removeRepository = () => {
            this.props.onRemoveRepository(this.props.repository);
          }),
          (this.showRepository = () => {
            this.props.onShowRepository(this.props.repository);
          }),
          (this.openInShell = () => {
            this.props.onOpenInShell(this.props.repository);
          }),
          (this.openInExternalEditor = () => {
            this.props.onOpenInExternalEditor(this.props.repository);
          });
      }
      render() {
        const e = this.props.repository,
          t = e.path,
          n = e instanceof lo ? e.gitHubRepository : null,
          r = this.props.changedFilesCount > 0,
          i = n ? n.fullName + "\n" + n.htmlURL + "\n" + t : t;
        let o = null;
        return (
          this.props.needsDisambiguation && n && (o = n.owner.login + "/"),
          w.createElement(
            "div",
            {
              onContextMenu: this.onContextMenu,
              className: "repository-list-item",
              title: i,
            },
            w.createElement(vh, {
              className: "icon-for-repository",
              symbol: bh(e),
            }),
            w.createElement(
              "div",
              { className: "name" },
              o ? w.createElement("span", { className: "prefix" }, o) : null,
              w.createElement(Th, {
                text: e.name,
                highlight: this.props.matches.title,
              })
            ),
            e instanceof lo &&
              Ah({ aheadBehind: this.props.aheadBehind, hasChanges: r })
          )
        );
      }
      shouldComponentUpdate(e) {
        return (
          !(
            e.repository instanceof lo && this.props.repository instanceof lo
          ) ||
          e.repository.id !== this.props.repository.id ||
          e.matches !== this.props.matches
        );
      }
    }
    const Ah = (e) =>
        w.createElement(
          "div",
          { className: "repo-indicators" },
          e.aheadBehind && _h(e.aheadBehind),
          e.hasChanges && Mh()
        ),
      _h = (e) => {
        const { ahead: t, behind: n } = e;
        if (0 === t && 0 === n) return null;
        const r =
          "The currently checked out branch is" +
          (n ? ` ${Ph(n)} behind ` : "") +
          (n && t ? "and" : "") +
          (t ? ` ${Ph(t)} ahead of ` : "") +
          "its tracked branch.";
        return w.createElement(
          "div",
          { className: "ahead-behind", title: r },
          t > 0 && w.createElement(vh, { symbol: wh.arrowUp }),
          n > 0 && w.createElement(vh, { symbol: wh.arrowDown })
        );
      },
      Mh = () =>
        w.createElement(
          "div",
          {
            className: "change-indicator-wrapper",
            title: "There are uncommitted changes in this repository",
          },
          w.createElement(vh, { symbol: wh.dotFill })
        ),
      Ph = (e) => `${e} commit${e > 1 ? "s" : ""}`;
    var Ih;
    !(function (e) {
      (e.Enterprise = "_Enterprise_"), (e.NonGitHub = "_Non-GitHub_");
    })(Ih || (Ih = {}));
    const Oh = { changedFilesCount: 0, aheadBehind: null };
    function Lh(e, t, n) {
      const r = new Map();
      for (const n of e) {
        const e = t.find((e) => e.id === n);
        if (void 0 !== e) {
          const t = r.get(e.name) || 0;
          r.set(e.name, t + 1);
        }
      }
      const i = new Array();
      for (const o of e) {
        const e = t.find((e) => e.id === o);
        if (void 0 === e) continue;
        const { aheadBehind: s, changedFilesCount: a } = n.get(o) || Oh,
          l = e instanceof lo ? [e.name, ho(e)] : [e.name],
          c = r.get(e.name) || 0;
        i.push({
          text: l,
          id: o.toString(),
          repository: e,
          needsDisambiguation: c > 1,
          aheadBehind: s,
          changedFilesCount: a,
        });
      }
      return { identifier: "Recent", items: i };
    }
    var Fh = n(20),
      Nh = n.n(Fh),
      Bh = n(27),
      Hh = n.n(Bh),
      zh = n(16),
      Uh = n.n(zh),
      Wh = n(17),
      jh = n.n(Wh),
      Vh = n(23),
      Gh = n.n(Vh),
      $h = n(28),
      qh = n.n($h);
    function Kh(e) {
      var t;
      t =
        "undefined" != typeof window
          ? window
          : "undefined" != typeof self
          ? self
          : global;
      var n = "undefined" != typeof document && document.attachEvent;
      if (!n) {
        var r = (function () {
            var e =
              t.requestAnimationFrame ||
              t.mozRequestAnimationFrame ||
              t.webkitRequestAnimationFrame ||
              function (e) {
                return t.setTimeout(e, 20);
              };
            return function (t) {
              return e(t);
            };
          })(),
          i = (function () {
            var e =
              t.cancelAnimationFrame ||
              t.mozCancelAnimationFrame ||
              t.webkitCancelAnimationFrame ||
              t.clearTimeout;
            return function (t) {
              return e(t);
            };
          })(),
          o = function (e) {
            var t = e.__resizeTriggers__,
              n = t.firstElementChild,
              r = t.lastElementChild,
              i = n.firstElementChild;
            (r.scrollLeft = r.scrollWidth),
              (r.scrollTop = r.scrollHeight),
              (i.style.width = n.offsetWidth + 1 + "px"),
              (i.style.height = n.offsetHeight + 1 + "px"),
              (n.scrollLeft = n.scrollWidth),
              (n.scrollTop = n.scrollHeight);
          },
          s = function (e) {
            if (
              !(
                e.target.className.indexOf("contract-trigger") < 0 &&
                e.target.className.indexOf("expand-trigger") < 0
              )
            ) {
              var t = this;
              o(this),
                this.__resizeRAF__ && i(this.__resizeRAF__),
                (this.__resizeRAF__ = r(function () {
                  (function (e) {
                    return (
                      e.offsetWidth != e.__resizeLast__.width ||
                      e.offsetHeight != e.__resizeLast__.height
                    );
                  })(t) &&
                    ((t.__resizeLast__.width = t.offsetWidth),
                    (t.__resizeLast__.height = t.offsetHeight),
                    t.__resizeListeners__.forEach(function (n) {
                      n.call(t, e);
                    }));
                }));
            }
          },
          a = !1,
          l = "",
          c = "animationstart",
          u = "Webkit Moz O ms".split(" "),
          h = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(
            " "
          ),
          d = document.createElement("fakeelement");
        if ((void 0 !== d.style.animationName && (a = !0), !1 === a))
          for (var p = 0; p < u.length; p++)
            if (void 0 !== d.style[u[p] + "AnimationName"]) {
              (l = "-" + u[p].toLowerCase() + "-"), (c = h[p]), (a = !0);
              break;
            }
        var f = "resizeanim",
          m =
            "@" +
            l +
            "keyframes " +
            f +
            " { from { opacity: 0; } to { opacity: 0; } } ",
          g = l + "animation: 1ms " + f + "; ";
      }
      return {
        addResizeListener: function (r, i) {
          if (n) r.attachEvent("onresize", i);
          else {
            if (!r.__resizeTriggers__) {
              var a = r.ownerDocument,
                l = t.getComputedStyle(r);
              l && "static" == l.position && (r.style.position = "relative"),
                (function (t) {
                  if (!t.getElementById("detectElementResize")) {
                    var n =
                        (m || "") +
                        ".resize-triggers { " +
                        (g || "") +
                        'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',
                      r = t.head || t.getElementsByTagName("head")[0],
                      i = t.createElement("style");
                    (i.id = "detectElementResize"),
                      (i.type = "text/css"),
                      null != e && i.setAttribute("nonce", e),
                      i.styleSheet
                        ? (i.styleSheet.cssText = n)
                        : i.appendChild(t.createTextNode(n)),
                      r.appendChild(i);
                  }
                })(a),
                (r.__resizeLast__ = {}),
                (r.__resizeListeners__ = []),
                ((r.__resizeTriggers__ = a.createElement("div")).className =
                  "resize-triggers"),
                (r.__resizeTriggers__.innerHTML =
                  '<div class="expand-trigger"><div></div></div><div class="contract-trigger"></div>'),
                r.appendChild(r.__resizeTriggers__),
                o(r),
                r.addEventListener("scroll", s, !0),
                c &&
                  ((r.__resizeTriggers__.__animationListener__ = function (e) {
                    e.animationName == f && o(r);
                  }),
                  r.__resizeTriggers__.addEventListener(
                    c,
                    r.__resizeTriggers__.__animationListener__
                  ));
            }
            r.__resizeListeners__.push(i);
          }
        },
        removeResizeListener: function (e, t) {
          if (n) e.detachEvent("onresize", t);
          else if (
            (e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t), 1),
            !e.__resizeListeners__.length)
          ) {
            e.removeEventListener("scroll", s, !0),
              e.__resizeTriggers__.__animationListener__ &&
                (e.__resizeTriggers__.removeEventListener(
                  c,
                  e.__resizeTriggers__.__animationListener__
                ),
                (e.__resizeTriggers__.__animationListener__ = null));
            try {
              e.__resizeTriggers__ = !e.removeChild(e.__resizeTriggers__);
            } catch (e) {}
          }
        },
      };
    }
    n(43);
    var Yh = (function (e) {
      function t() {
        var e, n, r, i;
        Uh()(this, t);
        for (var o = arguments.length, s = Array(o), a = 0; a < o; a++)
          s[a] = arguments[a];
        return (
          (n = r = Gh()(
            this,
            (e = t.__proto__ || Hh()(t)).call.apply(e, [this].concat(s))
          )),
          (r.state = {
            height: r.props.defaultHeight || 0,
            width: r.props.defaultWidth || 0,
          }),
          (r._onResize = function () {
            var e = r.props,
              t = e.disableHeight,
              n = e.disableWidth,
              i = e.onResize;
            if (r._parentNode) {
              var o = r._parentNode.offsetHeight || 0,
                s = r._parentNode.offsetWidth || 0,
                a = window.getComputedStyle(r._parentNode) || {},
                l = parseInt(a.paddingLeft, 10) || 0,
                c = parseInt(a.paddingRight, 10) || 0,
                u = parseInt(a.paddingTop, 10) || 0,
                h = parseInt(a.paddingBottom, 10) || 0,
                d = o - u - h,
                p = s - l - c;
              ((!t && r.state.height !== d) || (!n && r.state.width !== p)) &&
                (r.setState({ height: o - u - h, width: s - l - c }),
                i({ height: o, width: s }));
            }
          }),
          (r._setRef = function (e) {
            r._autoSizer = e;
          }),
          (i = n),
          Gh()(r, i)
        );
      }
      return (
        qh()(t, e),
        jh()(t, [
          {
            key: "componentDidMount",
            value: function () {
              var e = this.props.nonce;
              this._autoSizer &&
                this._autoSizer.parentNode &&
                this._autoSizer.parentNode.ownerDocument &&
                this._autoSizer.parentNode.ownerDocument.defaultView &&
                this._autoSizer.parentNode instanceof
                  this._autoSizer.parentNode.ownerDocument.defaultView
                    .HTMLElement &&
                ((this._parentNode = this._autoSizer.parentNode),
                (this._detectElementResize = Kh(e)),
                this._detectElementResize.addResizeListener(
                  this._parentNode,
                  this._onResize
                ),
                this._onResize());
            },
          },
          {
            key: "componentWillUnmount",
            value: function () {
              this._detectElementResize &&
                this._parentNode &&
                this._detectElementResize.removeResizeListener(
                  this._parentNode,
                  this._onResize
                );
            },
          },
          {
            key: "render",
            value: function () {
              var e = this.props,
                t = e.children,
                n = e.className,
                r = e.disableHeight,
                i = e.disableWidth,
                o = e.style,
                s = this.state,
                a = s.height,
                l = s.width,
                c = { overflow: "visible" },
                u = {};
              return (
                r || ((c.height = 0), (u.height = a)),
                i || ((c.width = 0), (u.width = l)),
                w.createElement(
                  "div",
                  { className: n, ref: this._setRef, style: Nh()({}, c, o) },
                  t(u)
                )
              );
            },
          },
        ]),
        t
      );
    })(w.PureComponent);
    (Yh.defaultProps = {
      onResize: function () {},
      disableHeight: !1,
      disableWidth: !1,
      style: {},
    }),
      (Yh.propTypes = null);
    var Qh = Yh,
      Zh = n(59),
      Xh = n.n(Zh);
    function Jh(e) {
      var t = e.cellCount,
        n = e.cellSize,
        r = e.computeMetadataCallback,
        i = e.computeMetadataCallbackProps,
        o = e.nextCellsCount,
        s = e.nextCellSize,
        a = e.nextScrollToIndex,
        l = e.scrollToIndex,
        c = e.updateScrollOffsetForScrollToIndex;
      (t === o &&
        (("number" != typeof n && "number" != typeof s) || n === s)) ||
        (r(i), l >= 0 && l === a && c());
    }
    var ed = n(134),
      td = n.n(ed),
      nd = (function () {
        function e(t) {
          var n = t.cellCount,
            r = t.cellSizeGetter,
            i = t.estimatedCellSize;
          Uh()(this, e),
            (this._cellSizeAndPositionData = {}),
            (this._lastMeasuredIndex = -1),
            (this._lastBatchedIndex = -1),
            (this._cellSizeGetter = r),
            (this._cellCount = n),
            (this._estimatedCellSize = i);
        }
        return (
          jh()(e, [
            {
              key: "areOffsetsAdjusted",
              value: function () {
                return !1;
              },
            },
            {
              key: "configure",
              value: function (e) {
                var t = e.cellCount,
                  n = e.estimatedCellSize,
                  r = e.cellSizeGetter;
                (this._cellCount = t),
                  (this._estimatedCellSize = n),
                  (this._cellSizeGetter = r);
              },
            },
            {
              key: "getCellCount",
              value: function () {
                return this._cellCount;
              },
            },
            {
              key: "getEstimatedCellSize",
              value: function () {
                return this._estimatedCellSize;
              },
            },
            {
              key: "getLastMeasuredIndex",
              value: function () {
                return this._lastMeasuredIndex;
              },
            },
            {
              key: "getOffsetAdjustment",
              value: function () {
                return 0;
              },
            },
            {
              key: "getSizeAndPositionOfCell",
              value: function (e) {
                if (e < 0 || e >= this._cellCount)
                  throw Error(
                    "Requested index " +
                      e +
                      " is outside of range 0.." +
                      this._cellCount
                  );
                if (e > this._lastMeasuredIndex)
                  for (
                    var t = this.getSizeAndPositionOfLastMeasuredCell(),
                      n = t.offset + t.size,
                      r = this._lastMeasuredIndex + 1;
                    r <= e;
                    r++
                  ) {
                    var i = this._cellSizeGetter({ index: r });
                    if (void 0 === i || isNaN(i))
                      throw Error(
                        "Invalid size returned for cell " + r + " of value " + i
                      );
                    null === i
                      ? ((this._cellSizeAndPositionData[r] = {
                          offset: n,
                          size: 0,
                        }),
                        (this._lastBatchedIndex = e))
                      : ((this._cellSizeAndPositionData[r] = {
                          offset: n,
                          size: i,
                        }),
                        (n += i),
                        (this._lastMeasuredIndex = e));
                  }
                return this._cellSizeAndPositionData[e];
              },
            },
            {
              key: "getSizeAndPositionOfLastMeasuredCell",
              value: function () {
                return this._lastMeasuredIndex >= 0
                  ? this._cellSizeAndPositionData[this._lastMeasuredIndex]
                  : { offset: 0, size: 0 };
              },
            },
            {
              key: "getTotalSize",
              value: function () {
                var e = this.getSizeAndPositionOfLastMeasuredCell();
                return (
                  e.offset +
                  e.size +
                  (this._cellCount - this._lastMeasuredIndex - 1) *
                    this._estimatedCellSize
                );
              },
            },
            {
              key: "getUpdatedOffsetForIndex",
              value: function (e) {
                var t = e.align,
                  n = void 0 === t ? "auto" : t,
                  r = e.containerSize,
                  i = e.currentOffset,
                  o = e.targetIndex;
                if (r <= 0) return 0;
                var s = this.getSizeAndPositionOfCell(o),
                  a = s.offset,
                  l = a - r + s.size,
                  c = void 0;
                switch (n) {
                  case "start":
                    c = a;
                    break;
                  case "end":
                    c = l;
                    break;
                  case "center":
                    c = a - (r - s.size) / 2;
                    break;
                  default:
                    c = Math.max(l, Math.min(a, i));
                }
                var u = this.getTotalSize();
                return Math.max(0, Math.min(u - r, c));
              },
            },
            {
              key: "getVisibleCellRange",
              value: function (e) {
                var t = e.containerSize,
                  n = e.offset;
                if (0 === this.getTotalSize()) return {};
                var r = n + t,
                  i = this._findNearestCell(n),
                  o = this.getSizeAndPositionOfCell(i);
                n = o.offset + o.size;
                for (var s = i; n < r && s < this._cellCount - 1; )
                  s++, (n += this.getSizeAndPositionOfCell(s).size);
                return { start: i, stop: s };
              },
            },
            {
              key: "resetCell",
              value: function (e) {
                this._lastMeasuredIndex = Math.min(
                  this._lastMeasuredIndex,
                  e - 1
                );
              },
            },
            {
              key: "_binarySearch",
              value: function (e, t, n) {
                for (; t <= e; ) {
                  var r = t + Math.floor((e - t) / 2),
                    i = this.getSizeAndPositionOfCell(r).offset;
                  if (i === n) return r;
                  i < n ? (t = r + 1) : i > n && (e = r - 1);
                }
                return t > 0 ? t - 1 : 0;
              },
            },
            {
              key: "_exponentialSearch",
              value: function (e, t) {
                for (
                  var n = 1;
                  e < this._cellCount &&
                  this.getSizeAndPositionOfCell(e).offset < t;

                )
                  (e += n), (n *= 2);
                return this._binarySearch(
                  Math.min(e, this._cellCount - 1),
                  Math.floor(e / 2),
                  t
                );
              },
            },
            {
              key: "_findNearestCell",
              value: function (e) {
                if (isNaN(e)) throw Error("Invalid offset " + e + " specified");
                e = Math.max(0, e);
                var t = this.getSizeAndPositionOfLastMeasuredCell(),
                  n = Math.max(0, this._lastMeasuredIndex);
                return t.offset >= e
                  ? this._binarySearch(n, 0, e)
                  : this._exponentialSearch(n, e);
              },
            },
          ]),
          e
        );
      })(),
      rd = function () {
        return "undefined" != typeof window &&
          window.chrome &&
          window.chrome.webstore
          ? 16777100
          : 15e5;
      },
      id = (function () {
        function e(t) {
          var n = t.maxScrollSize,
            r = void 0 === n ? rd() : n,
            i = td()(t, ["maxScrollSize"]);
          Uh()(this, e),
            (this._cellSizeAndPositionManager = new nd(i)),
            (this._maxScrollSize = r);
        }
        return (
          jh()(e, [
            {
              key: "areOffsetsAdjusted",
              value: function () {
                return (
                  this._cellSizeAndPositionManager.getTotalSize() >
                  this._maxScrollSize
                );
              },
            },
            {
              key: "configure",
              value: function (e) {
                this._cellSizeAndPositionManager.configure(e);
              },
            },
            {
              key: "getCellCount",
              value: function () {
                return this._cellSizeAndPositionManager.getCellCount();
              },
            },
            {
              key: "getEstimatedCellSize",
              value: function () {
                return this._cellSizeAndPositionManager.getEstimatedCellSize();
              },
            },
            {
              key: "getLastMeasuredIndex",
              value: function () {
                return this._cellSizeAndPositionManager.getLastMeasuredIndex();
              },
            },
            {
              key: "getOffsetAdjustment",
              value: function (e) {
                var t = e.containerSize,
                  n = e.offset,
                  r = this._cellSizeAndPositionManager.getTotalSize(),
                  i = this.getTotalSize(),
                  o = this._getOffsetPercentage({
                    containerSize: t,
                    offset: n,
                    totalSize: i,
                  });
                return Math.round(o * (i - r));
              },
            },
            {
              key: "getSizeAndPositionOfCell",
              value: function (e) {
                return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(
                  e
                );
              },
            },
            {
              key: "getSizeAndPositionOfLastMeasuredCell",
              value: function () {
                return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell();
              },
            },
            {
              key: "getTotalSize",
              value: function () {
                return Math.min(
                  this._maxScrollSize,
                  this._cellSizeAndPositionManager.getTotalSize()
                );
              },
            },
            {
              key: "getUpdatedOffsetForIndex",
              value: function (e) {
                var t = e.align,
                  n = void 0 === t ? "auto" : t,
                  r = e.containerSize,
                  i = e.currentOffset,
                  o = e.targetIndex;
                i = this._safeOffsetToOffset({ containerSize: r, offset: i });
                var s = this._cellSizeAndPositionManager.getUpdatedOffsetForIndex(
                  {
                    align: n,
                    containerSize: r,
                    currentOffset: i,
                    targetIndex: o,
                  }
                );
                return this._offsetToSafeOffset({
                  containerSize: r,
                  offset: s,
                });
              },
            },
            {
              key: "getVisibleCellRange",
              value: function (e) {
                var t = e.containerSize,
                  n = e.offset;
                return (
                  (n = this._safeOffsetToOffset({
                    containerSize: t,
                    offset: n,
                  })),
                  this._cellSizeAndPositionManager.getVisibleCellRange({
                    containerSize: t,
                    offset: n,
                  })
                );
              },
            },
            {
              key: "resetCell",
              value: function (e) {
                this._cellSizeAndPositionManager.resetCell(e);
              },
            },
            {
              key: "_getOffsetPercentage",
              value: function (e) {
                var t = e.containerSize,
                  n = e.offset,
                  r = e.totalSize;
                return r <= t ? 0 : n / (r - t);
              },
            },
            {
              key: "_offsetToSafeOffset",
              value: function (e) {
                var t = e.containerSize,
                  n = e.offset,
                  r = this._cellSizeAndPositionManager.getTotalSize(),
                  i = this.getTotalSize();
                if (r === i) return n;
                var o = this._getOffsetPercentage({
                  containerSize: t,
                  offset: n,
                  totalSize: r,
                });
                return Math.round(o * (i - t));
              },
            },
            {
              key: "_safeOffsetToOffset",
              value: function (e) {
                var t = e.containerSize,
                  n = e.offset,
                  r = this._cellSizeAndPositionManager.getTotalSize(),
                  i = this.getTotalSize();
                if (r === i) return n;
                var o = this._getOffsetPercentage({
                  containerSize: t,
                  offset: n,
                  totalSize: i,
                });
                return Math.round(o * (r - t));
              },
            },
          ]),
          e
        );
      })(),
      od = n(86),
      sd = n.n(od);
    function ad() {
      var e =
          !(arguments.length > 0 && void 0 !== arguments[0]) || arguments[0],
        t = {};
      return function (n) {
        var r = n.callback,
          i = n.indices,
          o = sd()(i),
          s =
            !e ||
            o.every(function (e) {
              var t = i[e];
              return Array.isArray(t) ? t.length > 0 : t >= 0;
            }),
          a =
            o.length !== sd()(t).length ||
            o.some(function (e) {
              var n = t[e],
                r = i[e];
              return Array.isArray(r) ? n.join(",") !== r.join(",") : n !== r;
            });
        (t = i), s && a && r(i);
      };
    }
    function ld(e) {
      var t = e.cellSize,
        n = e.cellSizeAndPositionManager,
        r = e.previousCellsCount,
        i = e.previousCellSize,
        o = e.previousScrollToAlignment,
        s = e.previousScrollToIndex,
        a = e.previousSize,
        l = e.scrollOffset,
        c = e.scrollToAlignment,
        u = e.scrollToIndex,
        h = e.size,
        d = e.sizeJustIncreasedFromZero,
        p = e.updateScrollIndexCallback,
        f = n.getCellCount(),
        m = u >= 0 && u < f;
      m &&
      (h !== a ||
        d ||
        !i ||
        ("number" == typeof t && t !== i) ||
        c !== o ||
        u !== s)
        ? p(u)
        : !m &&
          f > 0 &&
          (h < a || f < r) &&
          l > n.getTotalSize() - h &&
          p(f - 1);
    }
    var cd = n(133),
      ud = n.n(cd);
    function hd() {
      var e = this.constructor.getDerivedStateFromProps(this.props, this.state);
      null != e && this.setState(e);
    }
    function dd(e) {
      this.setState(
        function (t) {
          var n = this.constructor.getDerivedStateFromProps(e, t);
          return null != n ? n : null;
        }.bind(this)
      );
    }
    function pd(e, t) {
      try {
        var n = this.props,
          r = this.state;
        (this.props = e),
          (this.state = t),
          (this.__reactInternalSnapshotFlag = !0),
          (this.__reactInternalSnapshot = this.getSnapshotBeforeUpdate(n, r));
      } finally {
        (this.props = n), (this.state = r);
      }
    }
    (hd.__suppressDeprecationWarning = !0),
      (dd.__suppressDeprecationWarning = !0),
      (pd.__suppressDeprecationWarning = !0);
    var fd = void 0,
      md =
        (fd =
          "undefined" != typeof window
            ? window
            : "undefined" != typeof self
            ? self
            : {}).requestAnimationFrame ||
        fd.webkitRequestAnimationFrame ||
        fd.mozRequestAnimationFrame ||
        fd.oRequestAnimationFrame ||
        fd.msRequestAnimationFrame ||
        function (e) {
          return fd.setTimeout(e, 1e3 / 60);
        },
      gd =
        fd.cancelAnimationFrame ||
        fd.webkitCancelAnimationFrame ||
        fd.mozCancelAnimationFrame ||
        fd.oCancelAnimationFrame ||
        fd.msCancelAnimationFrame ||
        function (e) {
          fd.clearTimeout(e);
        },
      yd = md,
      vd = gd,
      wd = function (e) {
        return vd(e.id);
      },
      bd = "observed",
      Sd = "requested",
      Cd = (function (e) {
        function t(e) {
          Uh()(this, t);
          var n = Gh()(this, (t.__proto__ || Hh()(t)).call(this, e));
          (n._onGridRenderedMemoizer = ad()),
            (n._onScrollMemoizer = ad(!1)),
            (n._deferredInvalidateColumnIndex = null),
            (n._deferredInvalidateRowIndex = null),
            (n._recomputeScrollLeftFlag = !1),
            (n._recomputeScrollTopFlag = !1),
            (n._horizontalScrollBarSize = 0),
            (n._verticalScrollBarSize = 0),
            (n._scrollbarPresenceChanged = !1),
            (n._renderedColumnStartIndex = 0),
            (n._renderedColumnStopIndex = 0),
            (n._renderedRowStartIndex = 0),
            (n._renderedRowStopIndex = 0),
            (n._styleCache = {}),
            (n._cellCache = {}),
            (n._debounceScrollEndedCallback = function () {
              (n._disablePointerEventsTimeoutId = null),
                n.setState({ isScrolling: !1, needToResetStyleCache: !1 });
            }),
            (n._invokeOnGridRenderedHelper = function () {
              var e = n.props.onSectionRendered;
              n._onGridRenderedMemoizer({
                callback: e,
                indices: {
                  columnOverscanStartIndex: n._columnStartIndex,
                  columnOverscanStopIndex: n._columnStopIndex,
                  columnStartIndex: n._renderedColumnStartIndex,
                  columnStopIndex: n._renderedColumnStopIndex,
                  rowOverscanStartIndex: n._rowStartIndex,
                  rowOverscanStopIndex: n._rowStopIndex,
                  rowStartIndex: n._renderedRowStartIndex,
                  rowStopIndex: n._renderedRowStopIndex,
                },
              });
            }),
            (n._setScrollingContainerRef = function (e) {
              n._scrollingContainer = e;
            }),
            (n._onScroll = function (e) {
              e.target === n._scrollingContainer &&
                n.handleScrollEvent(e.target);
            });
          var r = new id({
              cellCount: e.columnCount,
              cellSizeGetter: function (n) {
                return t._wrapSizeGetter(e.columnWidth)(n);
              },
              estimatedCellSize: t._getEstimatedColumnSize(e),
            }),
            i = new id({
              cellCount: e.rowCount,
              cellSizeGetter: function (n) {
                return t._wrapSizeGetter(e.rowHeight)(n);
              },
              estimatedCellSize: t._getEstimatedRowSize(e),
            });
          return (
            (n.state = {
              instanceProps: {
                columnSizeAndPositionManager: r,
                rowSizeAndPositionManager: i,
                prevColumnWidth: e.columnWidth,
                prevRowHeight: e.rowHeight,
                prevColumnCount: e.columnCount,
                prevRowCount: e.rowCount,
                prevIsScrolling: !0 === e.isScrolling,
                prevScrollToColumn: e.scrollToColumn,
                prevScrollToRow: e.scrollToRow,
                scrollbarSize: 0,
                scrollbarSizeMeasured: !1,
              },
              isScrolling: !1,
              scrollDirectionHorizontal: 1,
              scrollDirectionVertical: 1,
              scrollLeft: 0,
              scrollTop: 0,
              scrollPositionChangeReason: null,
              needToResetStyleCache: !1,
            }),
            e.scrollToRow > 0 &&
              (n._initialScrollTop = n._getCalculatedScrollTop(e, n.state)),
            e.scrollToColumn > 0 &&
              (n._initialScrollLeft = n._getCalculatedScrollLeft(e, n.state)),
            n
          );
        }
        return (
          qh()(t, e),
          jh()(
            t,
            [
              {
                key: "getOffsetForCell",
                value: function () {
                  var e =
                      arguments.length > 0 && void 0 !== arguments[0]
                        ? arguments[0]
                        : {},
                    t = e.alignment,
                    n = void 0 === t ? this.props.scrollToAlignment : t,
                    r = e.columnIndex,
                    i = void 0 === r ? this.props.scrollToColumn : r,
                    o = e.rowIndex,
                    s = void 0 === o ? this.props.scrollToRow : o,
                    a = Nh()({}, this.props, {
                      scrollToAlignment: n,
                      scrollToColumn: i,
                      scrollToRow: s,
                    });
                  return {
                    scrollLeft: this._getCalculatedScrollLeft(a),
                    scrollTop: this._getCalculatedScrollTop(a),
                  };
                },
              },
              {
                key: "getTotalRowsHeight",
                value: function () {
                  return this.state.instanceProps.rowSizeAndPositionManager.getTotalSize();
                },
              },
              {
                key: "getTotalColumnsWidth",
                value: function () {
                  return this.state.instanceProps.columnSizeAndPositionManager.getTotalSize();
                },
              },
              {
                key: "handleScrollEvent",
                value: function (e) {
                  var t = e.scrollLeft,
                    n = void 0 === t ? 0 : t,
                    r = e.scrollTop,
                    i = void 0 === r ? 0 : r;
                  if (!(i < 0)) {
                    this._debounceScrollEnded();
                    var o = this.props,
                      s = o.autoHeight,
                      a = o.autoWidth,
                      l = o.height,
                      c = o.width,
                      u = this.state.instanceProps,
                      h = u.scrollbarSize,
                      d = u.rowSizeAndPositionManager.getTotalSize(),
                      p = u.columnSizeAndPositionManager.getTotalSize(),
                      f = Math.min(Math.max(0, p - c + h), n),
                      m = Math.min(Math.max(0, d - l + h), i);
                    if (
                      this.state.scrollLeft !== f ||
                      this.state.scrollTop !== m
                    ) {
                      var g = {
                        isScrolling: !0,
                        scrollDirectionHorizontal:
                          f !== this.state.scrollLeft
                            ? f > this.state.scrollLeft
                              ? 1
                              : -1
                            : this.state.scrollDirectionHorizontal,
                        scrollDirectionVertical:
                          m !== this.state.scrollTop
                            ? m > this.state.scrollTop
                              ? 1
                              : -1
                            : this.state.scrollDirectionVertical,
                        scrollPositionChangeReason: bd,
                      };
                      s || (g.scrollTop = m),
                        a || (g.scrollLeft = f),
                        (g.needToResetStyleCache = !1),
                        this.setState(g);
                    }
                    this._invokeOnScrollMemoizer({
                      scrollLeft: f,
                      scrollTop: m,
                      totalColumnsWidth: p,
                      totalRowsHeight: d,
                    });
                  }
                },
              },
              {
                key: "invalidateCellSizeAfterRender",
                value: function (e) {
                  var t = e.columnIndex,
                    n = e.rowIndex;
                  (this._deferredInvalidateColumnIndex =
                    "number" == typeof this._deferredInvalidateColumnIndex
                      ? Math.min(this._deferredInvalidateColumnIndex, t)
                      : t),
                    (this._deferredInvalidateRowIndex =
                      "number" == typeof this._deferredInvalidateRowIndex
                        ? Math.min(this._deferredInvalidateRowIndex, n)
                        : n);
                },
              },
              {
                key: "measureAllCells",
                value: function () {
                  var e = this.props,
                    t = e.columnCount,
                    n = e.rowCount,
                    r = this.state.instanceProps;
                  r.columnSizeAndPositionManager.getSizeAndPositionOfCell(
                    t - 1
                  ),
                    r.rowSizeAndPositionManager.getSizeAndPositionOfCell(n - 1);
                },
              },
              {
                key: "recomputeGridSize",
                value: function () {
                  var e =
                      arguments.length > 0 && void 0 !== arguments[0]
                        ? arguments[0]
                        : {},
                    t = e.columnIndex,
                    n = void 0 === t ? 0 : t,
                    r = e.rowIndex,
                    i = void 0 === r ? 0 : r,
                    o = this.props,
                    s = o.scrollToColumn,
                    a = o.scrollToRow,
                    l = this.state.instanceProps;
                  l.columnSizeAndPositionManager.resetCell(n),
                    l.rowSizeAndPositionManager.resetCell(i),
                    (this._recomputeScrollLeftFlag = s >= 0 && n <= s),
                    (this._recomputeScrollTopFlag = a >= 0 && i <= a),
                    (this._styleCache = {}),
                    (this._cellCache = {}),
                    this.forceUpdate();
                },
              },
              {
                key: "scrollToCell",
                value: function (e) {
                  var t = e.columnIndex,
                    n = e.rowIndex,
                    r = this.props.columnCount,
                    i = this.props;
                  r > 1 &&
                    void 0 !== t &&
                    this._updateScrollLeftForScrollToColumn(
                      Nh()({}, i, { scrollToColumn: t })
                    ),
                    void 0 !== n &&
                      this._updateScrollTopForScrollToRow(
                        Nh()({}, i, { scrollToRow: n })
                      );
                },
              },
              {
                key: "componentDidMount",
                value: function () {
                  var e = this.props,
                    n = e.getScrollbarSize,
                    r = e.height,
                    i = e.scrollLeft,
                    o = e.scrollToColumn,
                    s = e.scrollTop,
                    a = e.scrollToRow,
                    l = e.width,
                    c = this.state.instanceProps;
                  if (
                    ((this._initialScrollTop = 0),
                    (this._initialScrollLeft = 0),
                    this._handleInvalidatedGridSize(),
                    c.scrollbarSizeMeasured ||
                      this.setState(function (e) {
                        var t = Nh()({}, e, { needToResetStyleCache: !1 });
                        return (
                          (t.instanceProps.scrollbarSize = n()),
                          (t.instanceProps.scrollbarSizeMeasured = !0),
                          t
                        );
                      }),
                    ("number" == typeof i && i >= 0) ||
                      ("number" == typeof s && s >= 0))
                  ) {
                    var u = t._getScrollToPositionStateUpdate({
                      prevState: this.state,
                      scrollLeft: i,
                      scrollTop: s,
                    });
                    u && ((u.needToResetStyleCache = !1), this.setState(u));
                  }
                  this._scrollingContainer &&
                    (this._scrollingContainer.scrollLeft !==
                      this.state.scrollLeft &&
                      (this._scrollingContainer.scrollLeft = this.state.scrollLeft),
                    this._scrollingContainer.scrollTop !==
                      this.state.scrollTop &&
                      (this._scrollingContainer.scrollTop = this.state.scrollTop));
                  var h = r > 0 && l > 0;
                  o >= 0 && h && this._updateScrollLeftForScrollToColumn(),
                    a >= 0 && h && this._updateScrollTopForScrollToRow(),
                    this._invokeOnGridRenderedHelper(),
                    this._invokeOnScrollMemoizer({
                      scrollLeft: i || 0,
                      scrollTop: s || 0,
                      totalColumnsWidth: c.columnSizeAndPositionManager.getTotalSize(),
                      totalRowsHeight: c.rowSizeAndPositionManager.getTotalSize(),
                    }),
                    this._maybeCallOnScrollbarPresenceChange();
                },
              },
              {
                key: "componentDidUpdate",
                value: function (e, t) {
                  var n = this,
                    r = this.props,
                    i = r.autoHeight,
                    o = r.autoWidth,
                    s = r.columnCount,
                    a = r.height,
                    l = r.rowCount,
                    c = r.scrollToAlignment,
                    u = r.scrollToColumn,
                    h = r.scrollToRow,
                    d = r.width,
                    p = this.state,
                    f = p.scrollLeft,
                    m = p.scrollPositionChangeReason,
                    g = p.scrollTop,
                    y = p.instanceProps;
                  this._handleInvalidatedGridSize();
                  var v =
                    (s > 0 && 0 === e.columnCount) ||
                    (l > 0 && 0 === e.rowCount);
                  m === Sd &&
                    (!o &&
                      f >= 0 &&
                      (f !== this._scrollingContainer.scrollLeft || v) &&
                      (this._scrollingContainer.scrollLeft = f),
                    !i &&
                      g >= 0 &&
                      (g !== this._scrollingContainer.scrollTop || v) &&
                      (this._scrollingContainer.scrollTop = g));
                  var w = (0 === e.width || 0 === e.height) && a > 0 && d > 0;
                  if (
                    (this._recomputeScrollLeftFlag
                      ? ((this._recomputeScrollLeftFlag = !1),
                        this._updateScrollLeftForScrollToColumn(this.props))
                      : ld({
                          cellSizeAndPositionManager:
                            y.columnSizeAndPositionManager,
                          previousCellsCount: e.columnCount,
                          previousCellSize: e.columnWidth,
                          previousScrollToAlignment: e.scrollToAlignment,
                          previousScrollToIndex: e.scrollToColumn,
                          previousSize: e.width,
                          scrollOffset: f,
                          scrollToAlignment: c,
                          scrollToIndex: u,
                          size: d,
                          sizeJustIncreasedFromZero: w,
                          updateScrollIndexCallback: function () {
                            return n._updateScrollLeftForScrollToColumn(
                              n.props
                            );
                          },
                        }),
                    this._recomputeScrollTopFlag
                      ? ((this._recomputeScrollTopFlag = !1),
                        this._updateScrollTopForScrollToRow(this.props))
                      : ld({
                          cellSizeAndPositionManager:
                            y.rowSizeAndPositionManager,
                          previousCellsCount: e.rowCount,
                          previousCellSize: e.rowHeight,
                          previousScrollToAlignment: e.scrollToAlignment,
                          previousScrollToIndex: e.scrollToRow,
                          previousSize: e.height,
                          scrollOffset: g,
                          scrollToAlignment: c,
                          scrollToIndex: h,
                          size: a,
                          sizeJustIncreasedFromZero: w,
                          updateScrollIndexCallback: function () {
                            return n._updateScrollTopForScrollToRow(n.props);
                          },
                        }),
                    this._invokeOnGridRenderedHelper(),
                    f !== t.scrollLeft || g !== t.scrollTop)
                  ) {
                    var b = y.rowSizeAndPositionManager.getTotalSize(),
                      S = y.columnSizeAndPositionManager.getTotalSize();
                    this._invokeOnScrollMemoizer({
                      scrollLeft: f,
                      scrollTop: g,
                      totalColumnsWidth: S,
                      totalRowsHeight: b,
                    });
                  }
                  this._maybeCallOnScrollbarPresenceChange();
                },
              },
              {
                key: "componentWillUnmount",
                value: function () {
                  this._disablePointerEventsTimeoutId &&
                    wd(this._disablePointerEventsTimeoutId);
                },
              },
              {
                key: "render",
                value: function () {
                  var e = this.props,
                    t = e.autoContainerWidth,
                    n = e.autoHeight,
                    r = e.autoWidth,
                    i = e.className,
                    o = e.containerProps,
                    s = e.containerRole,
                    a = e.containerStyle,
                    l = e.height,
                    c = e.id,
                    u = e.noContentRenderer,
                    h = e.role,
                    d = e.style,
                    p = e.tabIndex,
                    f = e.width,
                    m = this.state,
                    g = m.instanceProps,
                    y = m.needToResetStyleCache,
                    v = this._isScrolling(),
                    b = {
                      boxSizing: "border-box",
                      direction: "ltr",
                      height: n ? "auto" : l,
                      position: "relative",
                      width: r ? "auto" : f,
                      WebkitOverflowScrolling: "touch",
                      willChange: "transform",
                    };
                  y && (this._styleCache = {}),
                    this.state.isScrolling || this._resetStyleCache(),
                    this._calculateChildrenToRender(this.props, this.state);
                  var S = g.columnSizeAndPositionManager.getTotalSize(),
                    C = g.rowSizeAndPositionManager.getTotalSize(),
                    E = C > l ? g.scrollbarSize : 0,
                    k = S > f ? g.scrollbarSize : 0;
                  (k === this._horizontalScrollBarSize &&
                    E === this._verticalScrollBarSize) ||
                    ((this._horizontalScrollBarSize = k),
                    (this._verticalScrollBarSize = E),
                    (this._scrollbarPresenceChanged = !0)),
                    (b.overflowX = S + E <= f ? "hidden" : "auto"),
                    (b.overflowY = C + k <= l ? "hidden" : "auto");
                  var x = this._childrenToDisplay,
                    R = 0 === x.length && l > 0 && f > 0;
                  return w.createElement(
                    "div",
                    Nh()({ ref: this._setScrollingContainerRef }, o, {
                      "aria-label": this.props["aria-label"],
                      "aria-readonly": this.props["aria-readonly"],
                      className: ph()("ReactVirtualized__Grid", i),
                      id: c,
                      onScroll: this._onScroll,
                      role: h,
                      style: Nh()({}, b, d),
                      tabIndex: p,
                    }),
                    x.length > 0 &&
                      w.createElement(
                        "div",
                        {
                          className:
                            "ReactVirtualized__Grid__innerScrollContainer",
                          role: s,
                          style: Nh()(
                            {
                              width: t ? "auto" : S,
                              height: C,
                              maxWidth: S,
                              maxHeight: C,
                              overflow: "hidden",
                              pointerEvents: v ? "none" : "",
                              position: "relative",
                            },
                            a
                          ),
                        },
                        x
                      ),
                    R && u()
                  );
                },
              },
              {
                key: "_calculateChildrenToRender",
                value: function () {
                  var e =
                      arguments.length > 0 && void 0 !== arguments[0]
                        ? arguments[0]
                        : this.props,
                    t =
                      arguments.length > 1 && void 0 !== arguments[1]
                        ? arguments[1]
                        : this.state,
                    n = e.cellRenderer,
                    r = e.cellRangeRenderer,
                    i = e.columnCount,
                    o = e.deferredMeasurementCache,
                    s = e.height,
                    a = e.overscanColumnCount,
                    l = e.overscanIndicesGetter,
                    c = e.overscanRowCount,
                    u = e.rowCount,
                    h = e.width,
                    d = e.isScrollingOptOut,
                    p = t.scrollDirectionHorizontal,
                    f = t.scrollDirectionVertical,
                    m = t.instanceProps,
                    g =
                      this._initialScrollTop > 0
                        ? this._initialScrollTop
                        : t.scrollTop,
                    y =
                      this._initialScrollLeft > 0
                        ? this._initialScrollLeft
                        : t.scrollLeft,
                    v = this._isScrolling(e, t);
                  if (((this._childrenToDisplay = []), s > 0 && h > 0)) {
                    var w = m.columnSizeAndPositionManager.getVisibleCellRange({
                        containerSize: h,
                        offset: y,
                      }),
                      b = m.rowSizeAndPositionManager.getVisibleCellRange({
                        containerSize: s,
                        offset: g,
                      }),
                      S = m.columnSizeAndPositionManager.getOffsetAdjustment({
                        containerSize: h,
                        offset: y,
                      }),
                      C = m.rowSizeAndPositionManager.getOffsetAdjustment({
                        containerSize: s,
                        offset: g,
                      });
                    (this._renderedColumnStartIndex = w.start),
                      (this._renderedColumnStopIndex = w.stop),
                      (this._renderedRowStartIndex = b.start),
                      (this._renderedRowStopIndex = b.stop);
                    var E = l({
                        direction: "horizontal",
                        cellCount: i,
                        overscanCellsCount: a,
                        scrollDirection: p,
                        startIndex: "number" == typeof w.start ? w.start : 0,
                        stopIndex: "number" == typeof w.stop ? w.stop : -1,
                      }),
                      k = l({
                        direction: "vertical",
                        cellCount: u,
                        overscanCellsCount: c,
                        scrollDirection: f,
                        startIndex: "number" == typeof b.start ? b.start : 0,
                        stopIndex: "number" == typeof b.stop ? b.stop : -1,
                      }),
                      x = E.overscanStartIndex,
                      R = E.overscanStopIndex,
                      T = k.overscanStartIndex,
                      D = k.overscanStopIndex;
                    if (o) {
                      if (!o.hasFixedHeight())
                        for (var A = T; A <= D; A++)
                          if (!o.has(A, 0)) {
                            (x = 0), (R = i - 1);
                            break;
                          }
                      if (!o.hasFixedWidth())
                        for (var _ = x; _ <= R; _++)
                          if (!o.has(0, _)) {
                            (T = 0), (D = u - 1);
                            break;
                          }
                    }
                    (this._childrenToDisplay = r({
                      cellCache: this._cellCache,
                      cellRenderer: n,
                      columnSizeAndPositionManager:
                        m.columnSizeAndPositionManager,
                      columnStartIndex: x,
                      columnStopIndex: R,
                      deferredMeasurementCache: o,
                      horizontalOffsetAdjustment: S,
                      isScrolling: v,
                      isScrollingOptOut: d,
                      parent: this,
                      rowSizeAndPositionManager: m.rowSizeAndPositionManager,
                      rowStartIndex: T,
                      rowStopIndex: D,
                      scrollLeft: y,
                      scrollTop: g,
                      styleCache: this._styleCache,
                      verticalOffsetAdjustment: C,
                      visibleColumnIndices: w,
                      visibleRowIndices: b,
                    })),
                      (this._columnStartIndex = x),
                      (this._columnStopIndex = R),
                      (this._rowStartIndex = T),
                      (this._rowStopIndex = D);
                  }
                },
              },
              {
                key: "_debounceScrollEnded",
                value: function () {
                  var e,
                    t,
                    n,
                    r,
                    i = this.props.scrollingResetTimeInterval;
                  this._disablePointerEventsTimeoutId &&
                    wd(this._disablePointerEventsTimeoutId),
                    (this._disablePointerEventsTimeoutId =
                      ((e = this._debounceScrollEndedCallback),
                      (t = i),
                      (n = Date.now()),
                      (r = {
                        id: yd(function i() {
                          Date.now() - n >= t ? e.call() : (r.id = yd(i));
                        }),
                      })));
                },
              },
              {
                key: "_handleInvalidatedGridSize",
                value: function () {
                  if (
                    "number" == typeof this._deferredInvalidateColumnIndex &&
                    "number" == typeof this._deferredInvalidateRowIndex
                  ) {
                    var e = this._deferredInvalidateColumnIndex,
                      t = this._deferredInvalidateRowIndex;
                    (this._deferredInvalidateColumnIndex = null),
                      (this._deferredInvalidateRowIndex = null),
                      this.recomputeGridSize({ columnIndex: e, rowIndex: t });
                  }
                },
              },
              {
                key: "_invokeOnScrollMemoizer",
                value: function (e) {
                  var t = this,
                    n = e.scrollLeft,
                    r = e.scrollTop,
                    i = e.totalColumnsWidth,
                    o = e.totalRowsHeight;
                  this._onScrollMemoizer({
                    callback: function (e) {
                      var n = e.scrollLeft,
                        r = e.scrollTop,
                        s = t.props,
                        a = s.height;
                      (0, s.onScroll)({
                        clientHeight: a,
                        clientWidth: s.width,
                        scrollHeight: o,
                        scrollLeft: n,
                        scrollTop: r,
                        scrollWidth: i,
                      });
                    },
                    indices: { scrollLeft: n, scrollTop: r },
                  });
                },
              },
              {
                key: "_isScrolling",
                value: function () {
                  var e =
                      arguments.length > 0 && void 0 !== arguments[0]
                        ? arguments[0]
                        : this.props,
                    t =
                      arguments.length > 1 && void 0 !== arguments[1]
                        ? arguments[1]
                        : this.state;
                  return Object.hasOwnProperty.call(e, "isScrolling")
                    ? Boolean(e.isScrolling)
                    : Boolean(t.isScrolling);
                },
              },
              {
                key: "_maybeCallOnScrollbarPresenceChange",
                value: function () {
                  if (this._scrollbarPresenceChanged) {
                    var e = this.props.onScrollbarPresenceChange;
                    (this._scrollbarPresenceChanged = !1),
                      e({
                        horizontal: this._horizontalScrollBarSize > 0,
                        size: this.state.instanceProps.scrollbarSize,
                        vertical: this._verticalScrollBarSize > 0,
                      });
                  }
                },
              },
              {
                key: "scrollToPosition",
                value: function (e) {
                  var n = e.scrollLeft,
                    r = e.scrollTop,
                    i = t._getScrollToPositionStateUpdate({
                      prevState: this.state,
                      scrollLeft: n,
                      scrollTop: r,
                    });
                  i && ((i.needToResetStyleCache = !1), this.setState(i));
                },
              },
              {
                key: "_getCalculatedScrollLeft",
                value: function () {
                  var e =
                      arguments.length > 0 && void 0 !== arguments[0]
                        ? arguments[0]
                        : this.props,
                    n =
                      arguments.length > 1 && void 0 !== arguments[1]
                        ? arguments[1]
                        : this.state;
                  return t._getCalculatedScrollLeft(e, n);
                },
              },
              {
                key: "_updateScrollLeftForScrollToColumn",
                value: function () {
                  var e =
                      arguments.length > 0 && void 0 !== arguments[0]
                        ? arguments[0]
                        : this.props,
                    n =
                      arguments.length > 1 && void 0 !== arguments[1]
                        ? arguments[1]
                        : this.state,
                    r = t._getScrollLeftForScrollToColumnStateUpdate(e, n);
                  r && ((r.needToResetStyleCache = !1), this.setState(r));
                },
              },
              {
                key: "_getCalculatedScrollTop",
                value: function () {
                  var e =
                      arguments.length > 0 && void 0 !== arguments[0]
                        ? arguments[0]
                        : this.props,
                    n =
                      arguments.length > 1 && void 0 !== arguments[1]
                        ? arguments[1]
                        : this.state;
                  return t._getCalculatedScrollTop(e, n);
                },
              },
              {
                key: "_resetStyleCache",
                value: function () {
                  var e = this._styleCache,
                    t = this._cellCache,
                    n = this.props.isScrollingOptOut;
                  (this._cellCache = {}), (this._styleCache = {});
                  for (
                    var r = this._rowStartIndex;
                    r <= this._rowStopIndex;
                    r++
                  )
                    for (
                      var i = this._columnStartIndex;
                      i <= this._columnStopIndex;
                      i++
                    ) {
                      var o = r + "-" + i;
                      (this._styleCache[o] = e[o]),
                        n && (this._cellCache[o] = t[o]);
                    }
                },
              },
              {
                key: "_updateScrollTopForScrollToRow",
                value: function () {
                  var e =
                      arguments.length > 0 && void 0 !== arguments[0]
                        ? arguments[0]
                        : this.props,
                    n =
                      arguments.length > 1 && void 0 !== arguments[1]
                        ? arguments[1]
                        : this.state,
                    r = t._getScrollTopForScrollToRowStateUpdate(e, n);
                  r && ((r.needToResetStyleCache = !1), this.setState(r));
                },
              },
            ],
            [
              {
                key: "getDerivedStateFromProps",
                value: function (e, n) {
                  var r = {};
                  (0 === e.columnCount && 0 !== n.scrollLeft) ||
                  (0 === e.rowCount && 0 !== n.scrollTop)
                    ? ((r.scrollLeft = 0), (r.scrollTop = 0))
                    : ((e.scrollLeft !== n.scrollLeft &&
                        e.scrollToColumn < 0) ||
                        (e.scrollTop !== n.scrollTop && e.scrollToRow < 0)) &&
                      Xh()(
                        r,
                        t._getScrollToPositionStateUpdate({
                          prevState: n,
                          scrollLeft: e.scrollLeft,
                          scrollTop: e.scrollTop,
                        })
                      );
                  var i = n.instanceProps;
                  (r.needToResetStyleCache = !1),
                    (e.columnWidth === i.prevColumnWidth &&
                      e.rowHeight === i.prevRowHeight) ||
                      (r.needToResetStyleCache = !0),
                    i.columnSizeAndPositionManager.configure({
                      cellCount: e.columnCount,
                      estimatedCellSize: t._getEstimatedColumnSize(e),
                      cellSizeGetter: t._wrapSizeGetter(e.columnWidth),
                    }),
                    i.rowSizeAndPositionManager.configure({
                      cellCount: e.rowCount,
                      estimatedCellSize: t._getEstimatedRowSize(e),
                      cellSizeGetter: t._wrapSizeGetter(e.rowHeight),
                    }),
                    (0 !== i.prevColumnCount && 0 !== i.prevRowCount) ||
                      ((i.prevColumnCount = 0), (i.prevRowCount = 0)),
                    e.autoHeight &&
                      !1 === e.isScrolling &&
                      !0 === i.prevIsScrolling &&
                      Xh()(r, { isScrolling: !1 });
                  var o = void 0,
                    s = void 0;
                  return (
                    Jh({
                      cellCount: i.prevColumnCount,
                      cellSize:
                        "number" == typeof i.prevColumnWidth
                          ? i.prevColumnWidth
                          : null,
                      computeMetadataCallback: function () {
                        return i.columnSizeAndPositionManager.resetCell(0);
                      },
                      computeMetadataCallbackProps: e,
                      nextCellsCount: e.columnCount,
                      nextCellSize:
                        "number" == typeof e.columnWidth ? e.columnWidth : null,
                      nextScrollToIndex: e.scrollToColumn,
                      scrollToIndex: i.prevScrollToColumn,
                      updateScrollOffsetForScrollToIndex: function () {
                        o = t._getScrollLeftForScrollToColumnStateUpdate(e, n);
                      },
                    }),
                    Jh({
                      cellCount: i.prevRowCount,
                      cellSize:
                        "number" == typeof i.prevRowHeight
                          ? i.prevRowHeight
                          : null,
                      computeMetadataCallback: function () {
                        return i.rowSizeAndPositionManager.resetCell(0);
                      },
                      computeMetadataCallbackProps: e,
                      nextCellsCount: e.rowCount,
                      nextCellSize:
                        "number" == typeof e.rowHeight ? e.rowHeight : null,
                      nextScrollToIndex: e.scrollToRow,
                      scrollToIndex: i.prevScrollToRow,
                      updateScrollOffsetForScrollToIndex: function () {
                        s = t._getScrollTopForScrollToRowStateUpdate(e, n);
                      },
                    }),
                    (i.prevColumnCount = e.columnCount),
                    (i.prevColumnWidth = e.columnWidth),
                    (i.prevIsScrolling = !0 === e.isScrolling),
                    (i.prevRowCount = e.rowCount),
                    (i.prevRowHeight = e.rowHeight),
                    (i.prevScrollToColumn = e.scrollToColumn),
                    (i.prevScrollToRow = e.scrollToRow),
                    (i.scrollbarSize = e.getScrollbarSize()),
                    void 0 === i.scrollbarSize
                      ? ((i.scrollbarSizeMeasured = !1), (i.scrollbarSize = 0))
                      : (i.scrollbarSizeMeasured = !0),
                    (r.instanceProps = i),
                    Nh()({}, r, o, s)
                  );
                },
              },
              {
                key: "_getEstimatedColumnSize",
                value: function (e) {
                  return "number" == typeof e.columnWidth
                    ? e.columnWidth
                    : e.estimatedColumnSize;
                },
              },
              {
                key: "_getEstimatedRowSize",
                value: function (e) {
                  return "number" == typeof e.rowHeight
                    ? e.rowHeight
                    : e.estimatedRowSize;
                },
              },
              {
                key: "_getScrollToPositionStateUpdate",
                value: function (e) {
                  var t = e.prevState,
                    n = e.scrollLeft,
                    r = e.scrollTop,
                    i = { scrollPositionChangeReason: Sd };
                  return (
                    "number" == typeof n &&
                      n >= 0 &&
                      ((i.scrollDirectionHorizontal =
                        n > t.scrollLeft ? 1 : -1),
                      (i.scrollLeft = n)),
                    "number" == typeof r &&
                      r >= 0 &&
                      ((i.scrollDirectionVertical = r > t.scrollTop ? 1 : -1),
                      (i.scrollTop = r)),
                    ("number" == typeof n && n >= 0 && n !== t.scrollLeft) ||
                    ("number" == typeof r && r >= 0 && r !== t.scrollTop)
                      ? i
                      : null
                  );
                },
              },
              {
                key: "_wrapSizeGetter",
                value: function (e) {
                  return "function" == typeof e
                    ? e
                    : function () {
                        return e;
                      };
                },
              },
              {
                key: "_getCalculatedScrollLeft",
                value: function (e, t) {
                  var n = e.columnCount,
                    r = e.height,
                    i = e.scrollToAlignment,
                    o = e.scrollToColumn,
                    s = e.width,
                    a = t.scrollLeft,
                    l = t.instanceProps;
                  if (n > 0) {
                    var c = n - 1,
                      u = o < 0 ? c : Math.min(c, o),
                      h = l.rowSizeAndPositionManager.getTotalSize(),
                      d =
                        l.scrollbarSizeMeasured && h > r ? l.scrollbarSize : 0;
                    return l.columnSizeAndPositionManager.getUpdatedOffsetForIndex(
                      {
                        align: i,
                        containerSize: s - d,
                        currentOffset: a,
                        targetIndex: u,
                      }
                    );
                  }
                  return 0;
                },
              },
              {
                key: "_getScrollLeftForScrollToColumnStateUpdate",
                value: function (e, n) {
                  var r = n.scrollLeft,
                    i = t._getCalculatedScrollLeft(e, n);
                  return "number" == typeof i && i >= 0 && r !== i
                    ? t._getScrollToPositionStateUpdate({
                        prevState: n,
                        scrollLeft: i,
                        scrollTop: -1,
                      })
                    : null;
                },
              },
              {
                key: "_getCalculatedScrollTop",
                value: function (e, t) {
                  var n = e.height,
                    r = e.rowCount,
                    i = e.scrollToAlignment,
                    o = e.scrollToRow,
                    s = e.width,
                    a = t.scrollTop,
                    l = t.instanceProps;
                  if (r > 0) {
                    var c = r - 1,
                      u = o < 0 ? c : Math.min(c, o),
                      h = l.columnSizeAndPositionManager.getTotalSize(),
                      d =
                        l.scrollbarSizeMeasured && h > s ? l.scrollbarSize : 0;
                    return l.rowSizeAndPositionManager.getUpdatedOffsetForIndex(
                      {
                        align: i,
                        containerSize: n - d,
                        currentOffset: a,
                        targetIndex: u,
                      }
                    );
                  }
                  return 0;
                },
              },
              {
                key: "_getScrollTopForScrollToRowStateUpdate",
                value: function (e, n) {
                  var r = n.scrollTop,
                    i = t._getCalculatedScrollTop(e, n);
                  return "number" == typeof i && i >= 0 && r !== i
                    ? t._getScrollToPositionStateUpdate({
                        prevState: n,
                        scrollLeft: -1,
                        scrollTop: i,
                      })
                    : null;
                },
              },
            ]
          ),
          t
        );
      })(w.PureComponent);
    (Cd.defaultProps = {
      "aria-label": "grid",
      "aria-readonly": !0,
      autoContainerWidth: !1,
      autoHeight: !1,
      autoWidth: !1,
      cellRangeRenderer: function (e) {
        for (
          var t = e.cellCache,
            n = e.cellRenderer,
            r = e.columnSizeAndPositionManager,
            i = e.columnStartIndex,
            o = e.columnStopIndex,
            s = e.deferredMeasurementCache,
            a = e.horizontalOffsetAdjustment,
            l = e.isScrolling,
            c = e.isScrollingOptOut,
            u = e.parent,
            h = e.rowSizeAndPositionManager,
            d = e.rowStartIndex,
            p = e.rowStopIndex,
            f = e.styleCache,
            m = e.verticalOffsetAdjustment,
            g = e.visibleColumnIndices,
            y = e.visibleRowIndices,
            v = [],
            w = r.areOffsetsAdjusted() || h.areOffsetsAdjusted(),
            b = !l && !w,
            S = d;
          S <= p;
          S++
        )
          for (var C = h.getSizeAndPositionOfCell(S), E = i; E <= o; E++) {
            var k = r.getSizeAndPositionOfCell(E),
              x = E >= g.start && E <= g.stop && S >= y.start && S <= y.stop,
              R = S + "-" + E,
              T = void 0;
            b && f[R]
              ? (T = f[R])
              : s && !s.has(S, E)
              ? (T = {
                  height: "auto",
                  left: 0,
                  position: "absolute",
                  top: 0,
                  width: "auto",
                })
              : ((T = {
                  height: C.size,
                  left: k.offset + a,
                  position: "absolute",
                  top: C.offset + m,
                  width: k.size,
                }),
                (f[R] = T));
            var D = {
                columnIndex: E,
                isScrolling: l,
                isVisible: x,
                key: R,
                parent: u,
                rowIndex: S,
                style: T,
              },
              A = void 0;
            (!c && !l) || a || m
              ? (A = n(D))
              : (t[R] || (t[R] = n(D)), (A = t[R])),
              null != A && !1 !== A && v.push(A);
          }
        return v;
      },
      containerRole: "rowgroup",
      containerStyle: {},
      estimatedColumnSize: 100,
      estimatedRowSize: 30,
      getScrollbarSize: ud.a,
      noContentRenderer: function () {
        return null;
      },
      onScroll: function () {},
      onScrollbarPresenceChange: function () {},
      onSectionRendered: function () {},
      overscanColumnCount: 0,
      overscanIndicesGetter: function (e) {
        var t = e.cellCount,
          n = e.overscanCellsCount,
          r = e.scrollDirection,
          i = e.startIndex,
          o = e.stopIndex;
        return 1 === r
          ? {
              overscanStartIndex: Math.max(0, i),
              overscanStopIndex: Math.min(t - 1, o + n),
            }
          : {
              overscanStartIndex: Math.max(0, i - n),
              overscanStopIndex: Math.min(t - 1, o),
            };
      },
      overscanRowCount: 10,
      role: "grid",
      scrollingResetTimeInterval: 150,
      scrollToAlignment: "auto",
      scrollToColumn: -1,
      scrollToRow: -1,
      style: {},
      tabIndex: 0,
      isScrollingOptOut: !1,
    }),
      (Cd.propTypes = null),
      (function (e) {
        var t = e.prototype;
        if (!t || !t.isReactComponent)
          throw new Error("Can only polyfill class components");
        if (
          "function" != typeof e.getDerivedStateFromProps &&
          "function" != typeof t.getSnapshotBeforeUpdate
        )
          return e;
        var n = null,
          r = null,
          i = null;
        if (
          ("function" == typeof t.componentWillMount
            ? (n = "componentWillMount")
            : "function" == typeof t.UNSAFE_componentWillMount &&
              (n = "UNSAFE_componentWillMount"),
          "function" == typeof t.componentWillReceiveProps
            ? (r = "componentWillReceiveProps")
            : "function" == typeof t.UNSAFE_componentWillReceiveProps &&
              (r = "UNSAFE_componentWillReceiveProps"),
          "function" == typeof t.componentWillUpdate
            ? (i = "componentWillUpdate")
            : "function" == typeof t.UNSAFE_componentWillUpdate &&
              (i = "UNSAFE_componentWillUpdate"),
          null !== n || null !== r || null !== i)
        ) {
          var o = e.displayName || e.name,
            s =
              "function" == typeof e.getDerivedStateFromProps
                ? "getDerivedStateFromProps()"
                : "getSnapshotBeforeUpdate()";
          throw Error(
            "Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n" +
              o +
              " uses " +
              s +
              " but also contains the following legacy lifecycles:" +
              (null !== n ? "\n  " + n : "") +
              (null !== r ? "\n  " + r : "") +
              (null !== i ? "\n  " + i : "") +
              "\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks"
          );
        }
        if (
          ("function" == typeof e.getDerivedStateFromProps &&
            ((t.componentWillMount = hd), (t.componentWillReceiveProps = dd)),
          "function" == typeof t.getSnapshotBeforeUpdate)
        ) {
          if ("function" != typeof t.componentDidUpdate)
            throw new Error(
              "Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype"
            );
          t.componentWillUpdate = pd;
          var a = t.componentDidUpdate;
          t.componentDidUpdate = function (e, t, n) {
            var r = this.__reactInternalSnapshotFlag
              ? this.__reactInternalSnapshot
              : n;
            a.call(this, e, t, r);
          };
        }
      })(Cd);
    var Ed = Cd;
    class kd extends w.Component {
      constructor(e) {
        super(e),
          (this.wrapperRef = null),
          (this.focusWithinChangedTimeoutId = null),
          (this.onWrapperRef = (e) => {
            e &&
              (e.addEventListener("focusin", () => {
                this.onFocusWithinChanged(!0);
              }),
              e.addEventListener("focusout", () => {
                this.onFocusWithinChanged(!1);
              })),
              (this.wrapperRef = e);
          }),
          (this.onClick = (e) => {
            this.props.onClick && this.props.onClick(e);
          }),
          (this.onKeyDown = (e) => {
            this.props.onKeyDown && this.props.onKeyDown(e);
          }),
          (this.onMouseDown = (e) => {
            e.target === this.wrapperRef && e.preventDefault();
          }),
          (this.state = { focusWithin: !1 });
      }
      onFocusWithinChanged(e) {
        this.setState({ focusWithin: e }),
          null !== this.focusWithinChangedTimeoutId &&
            (cancelAnimationFrame(this.focusWithinChangedTimeoutId),
            (this.focusWithinChangedTimeoutId = null)),
          (this.focusWithinChangedTimeoutId = requestAnimationFrame(() => {
            this.props.onFocusWithinChanged &&
              this.props.onFocusWithinChanged(e),
              (this.focusWithinChangedTimeoutId = null);
          }));
      }
      render() {
        const e = ph()("focus-container", this.props.className, {
          "focus-within": this.state.focusWithin,
        });
        return w.createElement(
          "div",
          {
            className: e,
            ref: this.onWrapperRef,
            onClick: this.onClick,
            onMouseDown: this.onMouseDown,
            onKeyDown: this.onKeyDown,
          },
          this.props.children
        );
      }
    }
    class xd extends w.Component {
      constructor() {
        super(...arguments),
          (this.onRowMouseOver = (e) => {
            this.props.onRowMouseOver(this.props.rowIndex, e);
          }),
          (this.onRowMouseDown = (e) => {
            this.props.onRowMouseDown(this.props.rowIndex, e);
          }),
          (this.onRowClick = (e) => {
            this.props.onRowClick(this.props.rowIndex, e);
          }),
          (this.onRowKeyDown = (e) => {
            this.props.onRowKeyDown(this.props.rowIndex, e);
          });
      }
      render() {
        const e = this.props.selected,
          t = ph()(
            "list-item",
            { selected: e },
            { "not-selectable": !1 === this.props.selectable },
            this.props.className
          ),
          n = "menu" === this.props.ariaMode ? "menuitem" : "option",
          r = Object.assign(Object.assign({}, this.props.style), {
            width: "100%",
          });
        return w.createElement(
          "div",
          {
            id: this.props.id,
            "aria-setsize": this.props.rowCount,
            "aria-posinset": this.props.rowIndex + 1,
            "aria-selected": this.props.selected,
            role: n,
            className: t,
            tabIndex: this.props.tabIndex,
            ref: this.props.onRef,
            onMouseOver: this.onRowMouseOver,
            onMouseDown: this.onRowMouseDown,
            onClick: this.onRowClick,
            onKeyDown: this.onRowKeyDown,
            style: r,
          },
          this.props.children
        );
      }
    }
    function Rd(e, t, n = (e) => !0) {
      if (0 === e) return null;
      const { direction: r, row: i } = t,
        o = void 0 === t.wrap || t.wrap;
      let s = i < 0 || i >= e ? ("up" === r ? e - 1 : 0) : i;
      "down" === r && -1 === i && (s = -1);
      const a = "up" === r ? -1 : 1;
      for (let t = 0; t < e; t++) {
        if (((s += a), s >= e)) {
          if (!o) break;
          s = 0;
        } else if (s < 0) {
          if (!o) break;
          s = e - 1;
        }
        if (i !== s && n(s)) return s;
      }
      return null;
    }
    function Td(e, t, n) {
      let r = "up" === e ? 0 : t - 1;
      const i = "up" === e ? 1 : -1;
      for (; r >= 0 && r < t; r += i) if (n(r)) return r;
      return null;
    }
    function Dd(e, t) {
      return (function (e, t, n) {
        null === t && ((t = e || 0), (e = 0)), n || (n = t < e ? -1 : 1);
        const r = Math.max(Math.ceil((t - e) / n), 0),
          i = new Array(r);
        for (let t = 0; t < r; t++, e += n) i[t] = e;
        return i;
      })(e, t > e ? t + 1 : t - 1);
    }
    class Ad extends w.Component {
      constructor(e) {
        super(e),
          (this.fakeScroll = null),
          (this.focusRow = -1),
          (this.gridStyle = { overflowX: "hidden" }),
          (this.lastScroll = null),
          (this.list = null),
          (this.grid = null),
          (this.resizeObserver = null),
          (this.updateSizeTimeoutId = null),
          (this.onResized = (e, t) => {
            this.updateSizeTimeoutId = null;
            const [n, r] = [e.offsetWidth, e.offsetHeight];
            (this.state.width === n && this.state.height === r) ||
              this.setState({ width: n, height: r });
          }),
          (this.onSelectAll = (e) => {
            const t = this.props.selectionMode;
            if ("range" !== t && "multi" !== t) return;
            if ((e.preventDefault(), this.props.rowCount <= 0)) return;
            const n = { kind: "select-all" },
              r = this.props.rowCount - 1;
            if (this.props.onSelectionChanged) {
              const e = Dd(0, r);
              this.props.onSelectionChanged(e, n);
            }
            "range" === t &&
              this.props.onSelectedRangeChanged &&
              this.props.onSelectedRangeChanged(0, r, n);
          }),
          (this.onRef = (e) => {
            null === e &&
              null !== this.list &&
              this.list.removeEventListener("select-all", this.onSelectAll),
              (this.list = e),
              null !== e && e.addEventListener("select-all", this.onSelectAll),
              this.resizeObserver &&
                (this.resizeObserver.disconnect(),
                null !== e
                  ? this.resizeObserver.observe(e)
                  : this.setState({ width: void 0, height: void 0 }));
          }),
          (this.onKeyDown = (e) => {
            if (this.props.onRowKeyDown)
              for (const t of this.props.selectedRows)
                this.props.onRowKeyDown(t, e);
            if (e.defaultPrevented) return;
            const t = { kind: "keyboard", event: e },
              n = "Home" === e.key,
              r = "End" === e.key,
              i =
                e.shiftKey &&
                void 0 !== this.props.selectionMode &&
                "single" !== this.props.selectionMode;
            if (n || r) {
              const r = n ? "up" : "down";
              i
                ? this.addSelectionToLastSelectableRow(r, t)
                : this.moveSelectionToLastSelectableRow(r, t),
                e.preventDefault();
            } else if ("ArrowUp" === e.key || "ArrowDown" === e.key) {
              const n = "ArrowUp" === e.key ? "up" : "down";
              i ? this.addSelection(n, t) : this.moveSelection(n, t),
                e.preventDefault();
            } else if ("a" === e.key && e.ctrlKey) this.onSelectAll(e);
            else if ("PageUp" === e.key || "PageDown" === e.key) {
              const n = "PageUp" === e.key ? "up" : "down";
              i
                ? this.addSelectionByPage(n, t)
                : this.moveSelectionByPage(n, t),
                e.preventDefault();
            }
          }),
          (this.onRowKeyDown = (e, t) => {
            this.props.onRowKeyDown && this.props.onRowKeyDown(e, t),
              t.defaultPrevented ||
                ("Enter" !== t.key && " " !== t.key) ||
                (this.toggleSelection(t), t.preventDefault());
          }),
          (this.onFocusContainerKeyDown = (e) => {
            e.defaultPrevented ||
              ("Enter" !== e.key && " " !== e.key) ||
              (this.toggleSelection(e), e.preventDefault());
          }),
          (this.toggleSelection = (e) => {
            this.props.selectedRows.forEach((t) => {
              if (!this.props.onRowClick) return;
              const { rowCount: n } = this.props;
              t < 0 || t >= n
                ? log.debug(
                    `[List.toggleSelection] unable to onRowClick for row ${t} as it is outside the bounds of the array [0, ${n}]`
                  )
                : this.props.onRowClick(t, { kind: "keyboard", event: e });
            });
          }),
          (this.onRowMouseOver = (e, t) => {
            this.props.selectOnHover &&
              this.canSelectRow(e) &&
              this.props.selectedRows.includes(e) &&
              this.props.onSelectionChanged &&
              (this.props.onSelectionChanged([e], { kind: "hover", event: t }),
              this.scrollRowToVisible(e));
          }),
          (this.canSelectRow = (e) =>
            !this.props.canSelectRow || this.props.canSelectRow(e)),
          (this.onFocusedItemRef = (e) => {
            !1 !== this.props.focusOnHover && null !== e && e.focus(),
              (this.focusRow = -1);
          }),
          (this.renderRow = (e) => {
            const t = e.rowIndex,
              n = this.canSelectRow(t),
              r = -1 !== this.props.selectedRows.indexOf(t),
              i = t === this.focusRow;
            let o = void 0;
            n && (o = r && this.props.selectedRows[0] === t ? 0 : -1);
            const s = i ? this.onFocusedItemRef : void 0,
              a = this.props.rowRenderer(e.rowIndex),
              l = this.state.rowIdPrefix
                ? `${this.state.rowIdPrefix}-${t}`
                : void 0;
            return w.createElement(xd, {
              key: e.key,
              id: l,
              onRef: s,
              rowCount: this.props.rowCount,
              rowIndex: t,
              selected: r,
              ariaMode: this.props.ariaMode,
              onRowClick: this.onRowClick,
              onRowKeyDown: this.onRowKeyDown,
              onRowMouseDown: this.onRowMouseDown,
              onRowMouseOver: this.onRowMouseOver,
              style: e.style,
              tabIndex: o,
              children: a,
              selectable: n,
            });
          }),
          (this.onGridRef = (e) => {
            this.grid = e;
          }),
          (this.onFakeScrollRef = (e) => {
            this.fakeScroll = e;
          }),
          (this.onFakeScroll = (e) => {
            if ("grid" !== this.lastScroll) {
              if (((this.lastScroll = "fake"), this.grid)) {
                const t = S.findDOMNode(this.grid);
                t instanceof Element &&
                  (t.scrollTop = e.currentTarget.scrollTop);
              }
            } else this.lastScroll = null;
          }),
          (this.onRowMouseDown = (e, t) => {
            if (this.canSelectRow(e)) {
              this.props.onRowMouseDown && this.props.onRowMouseDown(e, t);
              if ((2 === t.button || !1) && this.props.selectedRows.includes(e))
                return;
              const n = t.ctrlKey;
              if (
                t.shiftKey &&
                this.props.selectedRows.length &&
                this.props.selectionMode &&
                "single" !== this.props.selectionMode
              ) {
                const n = this.props.selectedRows[0];
                if (this.props.onSelectionChanged) {
                  const r = Dd(n, e);
                  this.props.onSelectionChanged(r, {
                    kind: "mouseclick",
                    event: t,
                  });
                }
                "range" === this.props.selectionMode &&
                  this.props.onSelectedRangeChanged &&
                  this.props.onSelectedRangeChanged(n, e, {
                    kind: "mouseclick",
                    event: t,
                  });
              } else if (n && "multi" === this.props.selectionMode) {
                if (this.props.onSelectionChanged) {
                  let n;
                  if (this.props.selectedRows.includes(e)) {
                    if (1 === this.props.selectedRows.length) return;
                    n = this.props.selectedRows.filter((t) => t !== e);
                  } else n = [...this.props.selectedRows, e];
                  this.props.onSelectionChanged(n, {
                    kind: "mouseclick",
                    event: t,
                  });
                }
              } else if (
                (1 !== this.props.selectedRows.length ||
                  (1 === this.props.selectedRows.length &&
                    e !== this.props.selectedRows[0])) &&
                (this.props.onSelectionChanged &&
                  this.props.onSelectionChanged([e], {
                    kind: "mouseclick",
                    event: t,
                  }),
                this.props.onSelectedRangeChanged &&
                  this.props.onSelectedRangeChanged(e, e, {
                    kind: "mouseclick",
                    event: t,
                  }),
                this.props.onSelectedRowChanged)
              ) {
                const { rowCount: n } = this.props;
                if (e < 0 || e >= n)
                  return void log.debug(
                    `[List.onRowMouseDown] unable to onSelectedRowChanged for row '${e}' as it is outside the bounds of the array [0, ${n}]`
                  );
                this.props.onSelectedRowChanged(e, {
                  kind: "mouseclick",
                  event: t,
                });
              }
            }
          }),
          (this.onRowClick = (e, t) => {
            if (this.canSelectRow(e) && this.props.onRowClick) {
              const n = this.props.rowCount;
              if (e < 0 || e >= n)
                return void log.debug(
                  `[List.onRowClick] unable to onRowClick for row ${e} as it is outside the bounds of the array [0, ${n}]`
                );
              this.props.onRowClick(e, { kind: "mouseclick", event: t });
            }
          }),
          (this.onScroll = ({ scrollTop: e, clientHeight: t }) => {
            if (
              (this.props.onScroll && this.props.onScroll(e, t),
              this.fakeScroll)
            ) {
              if ("fake" === this.lastScroll)
                return void (this.lastScroll = null);
              (this.lastScroll = "grid"), (this.fakeScroll.scrollTop = e);
            }
          }),
          (this.state = {});
        const t = window.ResizeObserver;
        ResizeObserver &&
          (this.resizeObserver = new t((e) => {
            for (const t of e)
              t.target === this.list &&
                (null !== this.updateSizeTimeoutId &&
                  clearImmediate(this.updateSizeTimeoutId),
                (this.updateSizeTimeoutId = setImmediate(
                  this.onResized,
                  t.target,
                  t.contentRect
                )));
          }));
      }
      moveSelectionByPage(e, t) {
        const n = this.getNextPageRowIndex(e);
        this.moveSelectionTo(n, t);
      }
      addSelectionByPage(e, t) {
        var n;
        const { selectedRows: r } = this.props,
          i = this.getNextPageRowIndex(e),
          o = Dd(null !== (n = r[0]) && void 0 !== n ? n : 0, i);
        this.props.onSelectionChanged && this.props.onSelectionChanged(o, t),
          this.props.onSelectedRangeChanged &&
            this.props.onSelectedRangeChanged(o[0], o[o.length - 1], t),
          this.scrollRowToVisible(i);
      }
      getNextPageRowIndex(e) {
        var t;
        const { selectedRows: n } = this.props,
          r = null !== (t = n[n.length - 1]) && void 0 !== t ? t : 0;
        return this.findNextPageSelectableRow(r, e);
      }
      getRowHeight(e) {
        const { rowHeight: t } = this.props;
        return "number" == typeof t ? t : t({ index: e });
      }
      findNextPageSelectableRow(e, t) {
        const { height: n } = this.state,
          { rowCount: r } = this.props;
        if (void 0 === n) return e;
        let i = 0,
          o = e;
        const s = "up" === t ? -1 : 1;
        for (let t = e; t < r && t >= 0; t += s) {
          const e = this.getRowHeight(t);
          if (i + e > n) break;
          (i += e), this.canSelectRow(t) && (o = t);
        }
        return o;
      }
      addSelection(e, t) {
        if (0 === this.props.selectedRows.length)
          return this.moveSelection(e, t);
        const n = this.props.selectedRows[this.props.selectedRows.length - 1],
          r = this.props.selectedRows[0],
          i = Rd(
            this.props.rowCount,
            { direction: e, row: n, wrap: !1 },
            this.canSelectRow
          );
        if (null != i) {
          if (this.props.onSelectionChanged) {
            const e = Dd(r, i);
            this.props.onSelectionChanged(e, t);
          }
          "range" === this.props.selectionMode &&
            this.props.onSelectedRangeChanged &&
            this.props.onSelectedRangeChanged(r, i, t),
            this.scrollRowToVisible(i);
        }
      }
      moveSelection(e, t) {
        const n =
            this.props.selectedRows.length > 0
              ? this.props.selectedRows[this.props.selectedRows.length - 1]
              : -1,
          r = Rd(
            this.props.rowCount,
            { direction: e, row: n },
            this.canSelectRow
          );
        null != r && this.moveSelectionTo(r, t);
      }
      moveSelectionToLastSelectableRow(e, t) {
        const { canSelectRow: n, props: r } = this,
          { rowCount: i } = r,
          o = Td(e, i, n);
        null !== o && this.moveSelectionTo(o, t);
      }
      addSelectionToLastSelectableRow(e, t) {
        var n, r, i;
        const { canSelectRow: o, props: s } = this,
          { rowCount: a, selectedRows: l } = s,
          c = Td(e, a, o);
        if (null === c) return;
        const u = Dd(null !== (n = l[0]) && void 0 !== n ? n : 0, c);
        if (
          (this.props.onSelectionChanged && this.props.onSelectionChanged(u, t),
          this.props.onSelectedRangeChanged)
        ) {
          const e = null !== (r = u[0]) && void 0 !== r ? r : 0,
            n = null !== (i = u[u.length - 1]) && void 0 !== i ? i : 0;
          this.props.onSelectedRangeChanged(e, n, t);
        }
        this.scrollRowToVisible(c);
      }
      moveSelectionTo(e, t) {
        if (
          (this.props.onSelectionChanged &&
            this.props.onSelectionChanged([e], t),
          this.props.onSelectedRowChanged)
        ) {
          const n = this.props.rowCount;
          if (e < 0 || e >= n)
            return void log.debug(
              `[List.moveSelection] unable to onSelectedRowChanged for row '${e}' as it is outside the bounds of the array [0, ${n}]`
            );
          this.props.onSelectedRowChanged(e, t);
        }
        this.scrollRowToVisible(e);
      }
      scrollRowToVisible(e) {
        null !== this.grid &&
          (this.grid.scrollToCell({ rowIndex: e, columnIndex: 0 }),
          (this.focusRow = e));
      }
      componentDidMount() {
        const { props: e, grid: t } = this,
          { selectedRows: n, scrollToRow: r, setScrollTop: i } = e;
        null !== t &&
          void 0 === i &&
          (void 0 !== r
            ? t.scrollToCell({ rowIndex: r, columnIndex: 0 })
            : n.length > 0 &&
              t.scrollToCell({ rowIndex: n[0], columnIndex: 0 }));
      }
      componentDidUpdate(e, t) {
        const { scrollToRow: n, setScrollTop: r } = this.props;
        if (
          (void 0 !== n &&
            e.scrollToRow !== n &&
            void 0 === r &&
            this.scrollRowToVisible(n),
          this.grid)
        ) {
          if (
            !(
              this.props.rowCount !== e.rowCount ||
              this.state.width !== t.width ||
              this.state.height !== t.height
            )
          ) {
            const t = !pu(e.selectedRows, this.props.selectedRows),
              n = !du(e.invalidationProps, this.props.invalidationProps);
            (t || n) && this.grid.forceUpdate();
          }
        }
      }
      componentWillMount() {
        this.setState({ rowIdPrefix: gh("ListRow") });
      }
      componentWillUnmount() {
        null !== this.updateSizeTimeoutId &&
          (clearImmediate(this.updateSizeTimeoutId),
          (this.updateSizeTimeoutId = null)),
          this.resizeObserver && this.resizeObserver.disconnect(),
          this.state.rowIdPrefix && yh(this.state.rowIdPrefix);
      }
      render() {
        var e, t;
        let n;
        n = this.resizeObserver
          ? this.renderContents(
              null !== (e = this.state.width) && void 0 !== e ? e : 0,
              null !== (t = this.state.height) && void 0 !== t ? t : 0
            )
          : w.createElement(
              Qh,
              { disableWidth: !0, disableHeight: !0 },
              ({ width: e, height: t }) => this.renderContents(e, t)
            );
        const r =
            this.props.selectedRows.length && this.state.rowIdPrefix
              ? `${this.state.rowIdPrefix}-${
                  this.props.selectedRows[this.props.selectedRows.length - 1]
                }`
              : void 0,
          i = "menu" === this.props.ariaMode ? "menu" : "listbox";
        return w.createElement(
          "div",
          {
            ref: this.onRef,
            id: this.props.id,
            className: "list",
            onKeyDown: this.onKeyDown,
            role: i,
            "aria-activedescendant": r,
          },
          n
        );
      }
      renderContents(e, t) {
        return w.createElement(
          w.Fragment,
          null,
          this.renderGrid(e, t),
          this.renderFakeScroll(t)
        );
      }
      renderGrid(e, t) {
        const n =
          this.props.selectedRows.length < 1 && this.props.rowCount > 0
            ? 0
            : -1;
        return w.createElement(
          kd,
          {
            className: "list-focus-container",
            onKeyDown: this.onFocusContainerKeyDown,
          },
          w.createElement(Ed, {
            "aria-label": "",
            role: "",
            ref: this.onGridRef,
            autoContainerWidth: !0,
            width: e,
            height: t,
            columnWidth: e,
            columnCount: 1,
            rowCount: this.props.rowCount,
            rowHeight: this.props.rowHeight,
            cellRenderer: this.renderRow,
            onScroll: this.onScroll,
            scrollTop: this.props.setScrollTop,
            overscanRowCount: 4,
            style: this.gridStyle,
            tabIndex: n,
          })
        );
      }
      renderFakeScroll(e) {
        let t = 0;
        if ("number" == typeof this.props.rowHeight)
          t = this.props.rowHeight * this.props.rowCount;
        else
          for (let e = 0; e < this.props.rowCount; e++)
            t += this.props.rowHeight({ index: e });
        return w.createElement(
          "div",
          {
            className: "fake-scroll",
            ref: this.onFakeScrollRef,
            style: { height: e },
            onScroll: this.onFakeScroll,
          },
          w.createElement("div", {
            style: { height: t, pointerEvents: "none" },
          })
        );
      }
      focus() {
        if (
          this.props.selectedRows.length > 0 &&
          this.props.selectedRows[this.props.selectedRows.length - 1] <
            this.props.rowCount
        )
          this.scrollRowToVisible(
            this.props.selectedRows[this.props.selectedRows.length - 1]
          );
        else if (this.grid) {
          const e = S.findDOMNode(this.grid);
          e && e.focus();
        }
      }
    }
    class _d extends w.Component {
      constructor() {
        super(...arguments),
          (this.onClick = (e) => {
            if ((e.preventDefault(), this.props.disabled)) return;
            const t = this.props.uri;
            t && te.openExternal(t);
            const n = this.props.onClick;
            n && n();
          });
      }
      render() {
        const e = this.props.uri || "",
          t = ph()("link-button-component", this.props.className);
        return w.createElement(
          "a",
          {
            className: t,
            href: e,
            onClick: this.onClick,
            title: this.props.title,
            tabIndex: this.props.tabIndex,
          },
          this.props.children
        );
      }
    }
    class Md extends w.Component {
      constructor() {
        super(...arguments),
          (this.inputElement = null),
          (this.onChange = (e) => {
            const t = e.currentTarget.value;
            this.setState({ value: t }, () => {
              this.props.onValueChanged && this.props.onValueChanged(t);
            });
          }),
          (this.onSearchTextCleared = () => {
            null != this.props.onSearchCleared && this.props.onSearchCleared();
          }),
          (this.onInputRef = (e) => {
            null != this.inputElement &&
              "search" === this.props.type &&
              this.inputElement.removeEventListener(
                "search",
                this.onSearchTextCleared
              ),
              (this.inputElement = e),
              null != this.inputElement &&
                "search" === this.props.type &&
                this.inputElement.addEventListener(
                  "search",
                  this.onSearchTextCleared
                );
          }),
          (this.onContextMenu = (e) => {
            e.preventDefault(), se([{ role: "editMenu" }]);
          }),
          (this.onKeyDown = (e) => {
            const t = this.state.value;
            if (
              "" !== t &&
              "search" === this.props.type &&
              "Escape" === e.key
            ) {
              const t = "";
              e.preventDefault(),
                this.setState({ value: t }),
                this.props.onValueChanged && this.props.onValueChanged(t);
            } else
              "search" === this.props.type &&
                "Escape" === e.key &&
                "" === t &&
                this.props.onBlur &&
                (this.props.onBlur(t),
                null !== this.inputElement && this.inputElement.blur());
            void 0 !== this.props.onKeyDown && this.props.onKeyDown(e);
          }),
          (this.onFocus = (e) => {
            this.props.autoFocus ||
              void 0 === this.props.onFocus ||
              this.props.onFocus();
          }),
          (this.onBlur = (e) => {
            void 0 !== this.props.onBlur && this.props.onBlur(e.target.value);
          });
      }
      componentWillMount() {
        const e = gh("TextBox_" + (this.props.label || this.props.placeholder));
        this.setState({ inputId: e, value: this.props.value });
      }
      componentWillUnmount() {
        this.state.inputId && yh(this.state.inputId);
      }
      componentWillReceiveProps(e) {
        this.state.value !== e.value && this.setState({ value: e.value });
      }
      selectAll() {
        null !== this.inputElement && this.inputElement.select();
      }
      focus() {
        null !== this.inputElement && this.inputElement.focus();
      }
      blur() {
        null !== this.inputElement && this.inputElement.blur();
      }
      renderLabelLink() {
        return this.props.labelLinkText
          ? w.createElement(
              _d,
              {
                uri: this.props.labelLinkUri,
                onClick: this.props.onLabelLinkClick,
                className: "link-label",
              },
              this.props.labelLinkText
            )
          : null;
      }
      renderLabel() {
        return this.props.label
          ? w.createElement(
              "div",
              { className: "label-container" },
              w.createElement(
                "label",
                { htmlFor: this.state.inputId },
                this.props.label
              ),
              this.renderLabelLink()
            )
          : null;
      }
      render() {
        const e = ph()("text-box-component", this.props.className),
          t = this.props.label ? this.state.inputId : void 0;
        return w.createElement(
          "div",
          { className: e },
          this.renderLabel(),
          w.createElement("input", {
            id: t,
            ref: this.onInputRef,
            onFocus: this.onFocus,
            onBlur: this.onBlur,
            autoFocus: this.props.autoFocus,
            disabled: this.props.disabled,
            type: this.props.type,
            placeholder: this.props.placeholder,
            value: this.state.value,
            onChange: this.onChange,
            onKeyDown: this.onKeyDown,
            tabIndex: this.props.tabIndex,
            onContextMenu: this.onContextMenu,
          })
        );
      }
    }
    class Pd extends w.Component {
      render() {
        const e = ph()("row-component", this.props.className);
        return w.createElement("div", { className: e }, this.props.children);
      }
    }
    var Id = n(87);
    function Od(e, t, n) {
      return Id.score(e, t) / n;
    }
    function Ld(e, t, n) {
      const r = Od(e, e, 1);
      return t
        .map((t) => {
          const i = [],
            o = n(t);
          return (
            o.forEach((t) => {
              i.push(Id.match(t, e));
            }),
            {
              score: Od(o.join(""), e, r),
              item: t,
              matches: { title: i[0], subtitle: i.length > 1 ? i[1] : [] },
            }
          );
        })
        .filter(({ matches: e }) => e.title.length > 0 || e.subtitle.length > 0)
        .sort(({ score: e }, { score: t }) => Et(e, t));
    }
    class Fd extends w.Component {
      constructor(e) {
        super(e),
          (this.list = null),
          (this.filterTextBox = null),
          (this.renderRow = (e) => {
            const t = this.state.rows[e];
            return "item" === t.kind
              ? this.props.renderItem(t.item, t.matches)
              : this.props.renderGroupHeader
              ? this.props.renderGroupHeader(t.identifier)
              : null;
          }),
          (this.onTextBoxRef = (e) => {
            this.filterTextBox = e;
          }),
          (this.onListRef = (e) => {
            this.list = e;
          }),
          (this.onFilterValueChanged = (e) => {
            this.props.onFilterTextChanged && this.props.onFilterTextChanged(e);
          }),
          (this.onSelectedRowChanged = (e, t) => {
            if (
              (this.setState({ selectedRow: e }), this.props.onSelectionChanged)
            ) {
              const n = this.state.rows[e];
              "item" === n.kind && this.props.onSelectionChanged(n.item, t);
            }
          }),
          (this.canSelectRow = (e) => {
            if (this.props.disabled) return !1;
            return "item" === this.state.rows[e].kind;
          }),
          (this.onRowClick = (e, t) => {
            if (this.props.onItemClick) {
              const n = this.state.rows[e];
              "item" === n.kind && this.props.onItemClick(n.item, t);
            }
          }),
          (this.onRowKeyDown = (e, t) => {
            if (!this.list) return;
            const n = this.state.rows.length,
              r = Rd(n, { direction: "down", row: -1 }, this.canSelectRow),
              i = Rd(n, { direction: "up", row: 0 }, this.canSelectRow);
            let o = !1;
            if (
              ((("ArrowUp" === t.key && e === r) ||
                ("ArrowDown" === t.key && e === i)) &&
                (o = !0),
              o)
            ) {
              const e = this.filterTextBox;
              e && (t.preventDefault(), e.focus());
            }
          }),
          (this.onKeyDown = (e) => {
            const t = this.list,
              n = e.key;
            if (!t) return;
            if (
              (this.props.onFilterKeyDown && this.props.onFilterKeyDown(e),
              e.defaultPrevented)
            )
              return;
            const r = this.state.rows.length;
            if ("ArrowDown" === n) {
              if (r > 0) {
                const e = Rd(
                  r,
                  { direction: "down", row: -1 },
                  this.canSelectRow
                );
                null != e &&
                  this.setState({ selectedRow: e }, () => {
                    t.focus();
                  });
              }
              e.preventDefault();
            } else if ("ArrowUp" === n) {
              if (r > 0) {
                const e = Rd(r, { direction: "up", row: 0 }, this.canSelectRow);
                null != e &&
                  this.setState({ selectedRow: e }, () => {
                    t.focus();
                  });
              }
              e.preventDefault();
            } else if ("Enter" === n) {
              if (0 === r) return e.preventDefault();
              const t = this.props.filterText;
              if (void 0 !== t && !/\S/.test(t)) return e.preventDefault();
              const n = Rd(
                r,
                { direction: "down", row: -1 },
                this.canSelectRow
              );
              null != n && this.onRowClick(n, { kind: "keyboard", event: e });
            }
          }),
          (this.state = Bd(e));
      }
      componentWillMount() {
        void 0 !== this.props.filterTextBox &&
          (this.filterTextBox = this.props.filterTextBox);
      }
      componentWillReceiveProps(e) {
        this.setState(Bd(e));
      }
      componentDidUpdate(e, t) {
        if (this.props.onSelectionChanged) {
          const e = zd(t.rows, t.selectedRow),
            n = zd(this.state.rows, this.state.selectedRow);
          if (e !== n) {
            if (
              (this.props.selectedItem ? this.props.selectedItem.id : null) !==
              n
            ) {
              const e = Hd(this.state.rows, this.state.selectedRow);
              this.props.onSelectionChanged(e, {
                kind: "filter",
                filterText: this.props.filterText || "",
              });
            }
          }
        }
        if (void 0 !== this.props.onFilterListResultsChanged) {
          const e = this.state.rows.filter((e) => "item" === e.kind).length;
          this.props.onFilterListResultsChanged(e);
        }
      }
      componentDidMount() {
        null !== this.filterTextBox && this.filterTextBox.selectAll();
      }
      renderTextBox() {
        return w.createElement(Md, {
          ref: this.onTextBoxRef,
          type: "search",
          autoFocus: !0,
          placeholder: this.props.placeholderText || "过滤",
          className: "filter-list-filter-field",
          onValueChanged: this.onFilterValueChanged,
          onKeyDown: this.onKeyDown,
          value: this.props.filterText,
          disabled: this.props.disabled,
        });
      }
      render() {
        return w.createElement(
          "div",
          { className: ph()("filter-list", this.props.className) },
          this.props.renderPreList ? this.props.renderPreList() : null,
          w.createElement(
            Pd,
            { className: "filter-field-row" },
            void 0 === this.props.filterTextBox ? this.renderTextBox() : null,
            this.props.renderPostFilter ? this.props.renderPostFilter() : null
          ),
          w.createElement(
            "div",
            { className: "filter-list-container" },
            this.renderContent()
          )
        );
      }
      selectNextItem(e = !1, t = "down") {
        if (null === this.list) return;
        let n = null;
        (n =
          -1 === this.state.selectedRow ||
          this.state.selectedRow === this.state.rows.length
            ? Rd(
                this.state.rows.length,
                { direction: t, row: -1 },
                this.canSelectRow
              )
            : Rd(
                this.state.rows.length,
                { direction: t, row: this.state.selectedRow },
                this.canSelectRow
              )),
          null !== n &&
            this.setState({ selectedRow: n }, () => {
              e && null !== this.list && this.list.focus();
            });
      }
      renderContent() {
        return 0 === this.state.rows.length && this.props.renderNoItems
          ? this.props.renderNoItems()
          : w.createElement(Ad, {
              ref: this.onListRef,
              rowCount: this.state.rows.length,
              rowRenderer: this.renderRow,
              rowHeight: this.props.rowHeight,
              selectedRows: [this.state.selectedRow],
              onSelectedRowChanged: this.onSelectedRowChanged,
              onRowClick: this.onRowClick,
              onRowKeyDown: this.onRowKeyDown,
              canSelectRow: this.canSelectRow,
              invalidationProps: Object.assign(
                Object.assign({}, this.props),
                this.props.invalidationProps
              ),
            });
      }
    }
    function Nd(e) {
      return e.text;
    }
    function Bd(e) {
      const t = new Array(),
        n = (e.filterText || "").toLowerCase();
      for (const r of e.groups) {
        const i = n
          ? Ld(n, r.items, Nd)
          : r.items.map((e) => ({
              score: 1,
              matches: { title: [], subtitle: [] },
              item: e,
            }));
        if (i.length) {
          e.renderGroupHeader &&
            t.push({ kind: "group", identifier: r.identifier });
          for (const { item: e, matches: n } of i)
            t.push({ kind: "item", item: e, matches: n });
        }
      }
      let r = -1;
      const i = e.selectedItem;
      return (
        i && (r = t.findIndex((e) => "item" === e.kind && e.item.id === i.id)),
        r < 0 && n.length && (r = t.findIndex((e) => "item" === e.kind)),
        { rows: t, selectedRow: r }
      );
    }
    function Hd(e, t) {
      if (t >= 0 && t < e.length) {
        const n = e[t];
        if ("item" === n.kind) return n.item;
      }
      return null;
    }
    function zd(e, t) {
      const n = Hd(e, t);
      return n ? n.id : null;
    }
    class Ud extends w.Component {
      constructor() {
        super(...arguments),
          (this.innerButton = null),
          (this.onButtonRef = (e) => {
            (this.innerButton = e),
              this.props.onButtonRef && this.props.onButtonRef(e);
          }),
          (this.focus = () => {
            this.innerButton && this.innerButton.focus();
          }),
          (this.getBoundingClientRect = () =>
            this.innerButton
              ? this.innerButton.getBoundingClientRect()
              : void 0),
          (this.onClick = (e) => {
            this.props.onClick && this.props.onClick(e),
              void 0 === this.props.type && e.preventDefault();
          });
      }
      blur() {
        this.innerButton && this.innerButton.blur();
      }
      render() {
        const e = ph()(
          "button-component",
          { "small-button": "small" === this.props.size },
          this.props.className
        );
        return w.createElement(
          "button",
          {
            className: e,
            disabled: this.props.disabled,
            onClick: this.onClick,
            type: this.props.type || "button",
            ref: this.onButtonRef,
            tabIndex: this.props.tabIndex,
            onMouseEnter: this.props.onMouseEnter,
            title: this.props.tooltip,
            role: this.props.role,
            "aria-expanded": this.props.ariaExpanded,
            "aria-haspopup": this.props.ariaHasPopup,
          },
          this.props.children
        );
      }
    }
    const Wd = _c(__dirname, "static/empty-no-repo.svg");
    function jd(e, t) {
      if (null !== t)
        for (const n of e)
          for (const e of n.items) if (e.repository.id === t.id) return e;
      return null;
    }
    class Vd extends w.Component {
      constructor() {
        super(...arguments),
          (this.getRepositoryGroups = hi((e, t) =>
            null === e
              ? []
              : (function (e, t) {
                  const n = new Map(),
                    r = new Set();
                  for (const t of e) {
                    const e = t instanceof lo ? t.gitHubRepository : null;
                    let i = Ih.NonGitHub;
                    e
                      ? e.endpoint === gt()
                        ? ((i = e.owner.login), r.add(i))
                        : (i = Ih.Enterprise)
                      : (i = Ih.NonGitHub);
                    let o = n.get(i);
                    o || ((o = new Array()), n.set(i, o)), o.push(t);
                  }
                  const i = new Array(),
                    o = (e) => {
                      const r = n.get(e);
                      if (!r || 0 === r.length) return;
                      const o = new Map();
                      for (const e of r) {
                        const t = o.get(e.name) || 0;
                        o.set(e.name, t + 1);
                      }
                      r.sort((e, t) => xt(e.name, t.name));
                      const s = r.map((n) => {
                        const r = o.get(n.name) || 0,
                          { aheadBehind: i, changedFilesCount: s } =
                            t.get(n.id) || Oh;
                        return {
                          text: n instanceof lo ? [n.name, ho(n)] : [n.name],
                          id: n.id.toString(),
                          repository: n,
                          needsDisambiguation: r > 1 && e === Ih.Enterprise,
                          aheadBehind: i,
                          changedFilesCount: s,
                        };
                      });
                      i.push({ identifier: e, items: s });
                    },
                    s = [...r.values()];
                  return (
                    s.sort(xt),
                    s.forEach(o),
                    o(Ih.Enterprise),
                    o(Ih.NonGitHub),
                    i
                  );
                })(e, t)
          )),
          (this.getSelectedListItem = hi(jd)),
          (this.renderItem = (e, t) => {
            const n = e.repository;
            return w.createElement(Dh, {
              key: n.id,
              repository: n,
              needsDisambiguation: e.needsDisambiguation,
              askForConfirmationOnRemoveRepository: this.props
                .askForConfirmationOnRemoveRepository,
              onRemoveRepository: this.props.onRemoveRepository,
              onShowRepository: this.props.onShowRepository,
              onOpenInShell: this.props.onOpenInShell,
              onOpenInExternalEditor: this.props.onOpenInExternalEditor,
              externalEditorLabel: this.props.externalEditorLabel,
              shellLabel: this.props.shellLabel,
              matches: t,
              aheadBehind: e.aheadBehind,
              changedFilesCount: e.changedFilesCount,
            });
          }),
          (this.renderGroupHeader = (e) => {
            const t = e,
              n = this.getGroupLabel(t);
            return w.createElement(
              "div",
              { key: t, className: "filter-list-group-header" },
              n
            );
          }),
          (this.onItemClick = (e) => {
            const t =
              e.changedFilesCount > 0 ||
              (null !== e.aheadBehind &&
                (e.aheadBehind.ahead > 0 || e.aheadBehind.behind > 0));
            this.props.dispatcher.recordRepoClicked(t),
              this.props.onSelectionChanged(e.repository);
          }),
          (this.renderPostFilter = () =>
            w.createElement(
              Ud,
              {
                className: "new-repository-button",
                onClick: this.onNewRepositoryButtonClick,
              },
              "添加",
              w.createElement(vh, { symbol: wh.triangleDown })
            )),
          (this.renderNoItems = () =>
            w.createElement(
              "div",
              { className: "no-items no-results-found" },
              w.createElement("img", {
                src: Wd,
                className: "blankslate-image",
              }),
              w.createElement(
                "div",
                { className: "title" },
                "抱歉，找不到该存储库"
              ),
              w.createElement(
                "div",
                { className: "protip" },
                "专家提示! 按 ",
                this.renderAddLocalShortcut(),
                " 快捷键可以快速添加本地存储库, 按 ",
                this.renderCloneRepositoryShortcut(),
                " 快捷键可以克隆一个在线存储库"
              )
            )),
          (this.onNewRepositoryButtonClick = () => {
            se([
              { label: "克隆存储库…", action: this.onCloneRepository },
              {
                label: "创建新的存储库…",
                action: this.onCreateNewRepository,
              },
              {
                label: "添加现有存储库…",
                action: this.onAddExistingRepository,
              },
            ]);
          }),
          (this.onCloneRepository = () => {
            this.props.dispatcher.showPopup({
              type: ao.CloneRepository,
              initialURL: null,
            });
          }),
          (this.onAddExistingRepository = () => {
            this.props.dispatcher.showPopup({ type: ao.AddRepository });
          }),
          (this.onCreateNewRepository = () => {
            this.props.dispatcher.showPopup({ type: ao.CreateRepository });
          });
      }
      getGroupLabel(e) {
        return e === Ih.Enterprise
          ? "企业"
          : e === Ih.NonGitHub
          ? "其它"
          : e;
      }
      render() {
        const e = this.getRepositoryGroups(
            this.props.repositories,
            this.props.localRepositoryStateLookup
          ),
          t = this.getSelectedListItem(e, this.props.selectedRepository),
          n =
            this.props.repositories.length > 7
              ? [
                  Lh(
                    this.props.recentRepositories,
                    this.props.repositories,
                    this.props.localRepositoryStateLookup
                  ),
                  ...e,
                ]
              : e;
        return w.createElement(
          "div",
          { className: "repository-list" },
          w.createElement(Fd, {
            rowHeight: 29,
            selectedItem: t,
            filterText: this.props.filterText,
            onFilterTextChanged: this.props.onFilterTextChanged,
            renderItem: this.renderItem,
            renderGroupHeader: this.renderGroupHeader,
            onItemClick: this.onItemClick,
            renderPostFilter: this.renderPostFilter,
            renderNoItems: this.renderNoItems,
            groups: n,
            invalidationProps: {
              repositories: this.props.repositories,
              filterText: this.props.filterText,
            },
          })
        );
      }
      renderAddLocalShortcut() {
        return w.createElement(
          "div",
          { className: "kbd-shortcut" },
          w.createElement("kbd", null, "Ctrl"),
          " + ",
          w.createElement("kbd", null, "O")
        );
      }
      renderCloneRepositoryShortcut() {
        return w.createElement(
          "div",
          { className: "kbd-shortcut" },
          w.createElement("kbd", null, "Ctrl"),
          " + ",
          w.createElement("kbd", null, "Shift"),
          " + ",
          w.createElement("kbd", null, "O")
        );
      }
    }
    class Gd extends w.Component {
      render() {
        const e = ph()(this.props.className, "ui-view"),
          t = Object.assign(Object.assign({}, this.props), { className: e });
        return w.createElement(
          "div",
          Object.assign({}, t),
          this.props.children
        );
      }
    }
    var $d;
    !(function (e) {
      (e[(e.On = 0)] = "On"),
        (e[(e.Off = 1)] = "Off"),
        (e[(e.Mixed = 2)] = "Mixed");
    })($d || ($d = {}));
    class qd extends w.Component {
      constructor() {
        super(...arguments),
          (this.input = null),
          (this.onChange = (e) => {
            this.props.onChange && this.props.onChange(e);
          }),
          (this.onInputRef = (e) => {
            (this.input = e), this.updateInputState();
          });
      }
      componentDidUpdate() {
        this.updateInputState();
      }
      componentWillMount() {
        const e = gh("Checkbox_" + (this.props.label || "unknown"));
        this.setState({ inputId: e });
      }
      componentWillUnmount() {
        this.state.inputId && yh(this.state.inputId);
      }
      updateInputState() {
        const e = this.input;
        if (e) {
          const t = this.props.value;
          (e.indeterminate = t === $d.Mixed), (e.checked = t !== $d.Off);
        }
      }
      renderLabel() {
        const e = this.props.label,
          t = this.state.inputId;
        return e ? w.createElement("label", { htmlFor: t }, e) : null;
      }
      render() {
        return w.createElement(
          "div",
          { className: "checkbox-component" },
          w.createElement("input", {
            id: this.state.inputId,
            tabIndex: this.props.tabIndex,
            type: "checkbox",
            onChange: this.onChange,
            ref: this.onInputRef,
            disabled: this.props.disabled,
          }),
          this.renderLabel()
        );
      }
    }
    var Kd = n(135),
      Yd = n.n(Kd);
    class Qd extends w.Component {
      constructor(e) {
        super(e),
          (this.element = null),
          (this.autocompletionRequestID = 0),
          (this.renderItem = (e) => {
            const t = this.state.autocompletionState;
            if (!t) return null;
            const n = t.items[e],
              r = n === t.selectedItem ? "selected" : "";
            return w.createElement(
              "div",
              { className: "autocompletion-item " + r },
              t.provider.renderItem(n)
            );
          }),
          (this.onRowMouseDown = (e, t) => {
            const n = this.state.autocompletionState;
            if (!n) return;
            const r = n.items[e];
            r && this.insertCompletion(r, "mouseclick");
          }),
          (this.onSelectedRowChanged = (e, t) => {
            const n = this.state.autocompletionState;
            if (!n) return;
            const r = n.items[e],
              i = Object.assign(Object.assign({}, n), { selectedItem: r });
            this.setState({ autocompletionState: i });
          }),
          (this.insertCompletionOnClick = (e) => {
            const t = this.state.autocompletionState;
            if (!t) return;
            const n = t.items;
            if (!n.length) return;
            const r = n[e];
            this.insertCompletion(r, "mouseclick");
          }),
          (this.onContextMenu = (e) => {
            this.props.onContextMenu
              ? this.props.onContextMenu(e)
              : (e.preventDefault(), se([{ role: "editMenu" }]));
          }),
          (this.onBlur = (e) => {
            this.close();
          }),
          (this.onRef = (e) => {
            (this.element = e),
              this.props.onElementRef && this.props.onElementRef(e);
          }),
          (this.onKeyDown = (e) => {
            if (
              (this.props.onKeyDown && this.props.onKeyDown(e),
              e.defaultPrevented)
            )
              return;
            const t = this.state.autocompletionState;
            if (!t || !t.items.length) return;
            const n = t.selectedItem ? t.items.indexOf(t.selectedItem) : -1,
              r = this.getMovementDirection(e);
            if (r) {
              e.preventDefault();
              const i = Rd(t.items.length, { direction: r, row: n });
              if (null !== i) {
                const e = t.items[i],
                  n = Object.assign(Object.assign({}, t), { selectedItem: e });
                this.setState({ autocompletionState: n });
              }
            } else if ("Enter" === e.key || "Tab" === e.key) {
              const n = t.selectedItem;
              n && (e.preventDefault(), this.insertCompletion(n, "keyboard"));
            } else "Escape" === e.key && this.close();
          }),
          (this.onChange = async (e) => {
            const t = e.currentTarget.value;
            this.props.onValueChanged && this.props.onValueChanged(t);
            const n = this.element;
            if (null === n) return;
            const r = n.selectionStart;
            if (null === r) return;
            const i = ++this.autocompletionRequestID,
              o = await this.attemptAutocompletion(t, r);
            i === this.autocompletionRequestID &&
              this.setState({ autocompletionState: o });
          }),
          (this.state = { autocompletionState: null });
      }
      renderAutocompletions() {
        const e = this.state.autocompletionState;
        if (!e) return null;
        const t = e.items;
        if (!t.length) return null;
        const n = this.element;
        let r = Yd()(n, e.range.start);
        r = Object.assign(Object.assign({}, r), {
          top: r.top - n.scrollTop,
          left: r.left - n.scrollLeft,
        });
        const i = r.left,
          o = r.top + 20,
          s = e.selectedItem ? t.indexOf(e.selectedItem) : -1,
          a = n.getBoundingClientRect().top + r.top;
        let l;
        if (null !== n.ownerDocument && null !== n.ownerDocument.defaultView) {
          const e = n.ownerDocument.defaultView.innerHeight - a - 20;
          l = Math.min(100, e);
        } else l = 100;
        const c = 29 * t.length,
          u = Math.min(c, l),
          h = e.rangeText,
          d = ph()("autocompletion-popup", e.provider.kind);
        return w.createElement(
          "div",
          { className: d, style: { top: o, left: i, height: u } },
          w.createElement(Ad, {
            rowCount: t.length,
            rowHeight: 29,
            selectedRows: [s],
            rowRenderer: this.renderItem,
            scrollToRow: s,
            selectOnHover: !0,
            focusOnHover: !1,
            onRowMouseDown: this.onRowMouseDown,
            onRowClick: this.insertCompletionOnClick,
            onSelectedRowChanged: this.onSelectedRowChanged,
            invalidationProps: h,
          })
        );
      }
      renderTextInput() {
        const e = {
          type: "text",
          placeholder: this.props.placeholder,
          value: this.props.value,
          ref: this.onRef,
          onChange: this.onChange,
          onKeyDown: this.onKeyDown,
          onBlur: this.onBlur,
          onContextMenu: this.onContextMenu,
          disabled: this.props.disabled,
          "aria-required": !!this.props.isRequired,
        };
        return w.createElement(this.getElementTagName(), e);
      }
      focus() {
        this.element && this.element.focus();
      }
      render() {
        const e = this.getElementTagName(),
          t = ph()("autocompletion-container", this.props.className, {
            "text-box-component": "input" === e,
            "text-area-component": "textarea" === e,
          });
        return w.createElement(
          "div",
          { className: t },
          this.renderAutocompletions(),
          this.renderTextInput()
        );
      }
      setCursorPosition(e) {
        null != this.element
          ? ((this.element.selectionStart = e), (this.element.selectionEnd = e))
          : log.warn("Unable to set cursor position when element is null");
      }
      insertCompletion(e, t) {
        const n = this.element,
          r = this.state.autocompletionState,
          i = n.value,
          o = r.range,
          s = r.provider.getCompletionText(e),
          a = i.substr(0, o.start - 1) + s + " ",
          l = a + i.substr(o.start + o.length);
        (n.value = l),
          this.props.onValueChanged && this.props.onValueChanged(l);
        const c = a.length;
        "mouseclick" === t
          ? window.setTimeout(() => {
              n.focus(), this.setCursorPosition(c);
            }, 0)
          : this.setCursorPosition(c),
          this.close();
      }
      getMovementDirection(e) {
        switch (e.key) {
          case "ArrowUp":
            return "up";
          case "ArrowDown":
            return "down";
        }
        return null;
      }
      close() {
        this.setState({ autocompletionState: null });
      }
      async attemptAutocompletion(e, t) {
        for (const n of this.props.autocompletionProviders) {
          const r = new RegExp(n.getRegExp());
          r.global ||
            Z(
              `The regex (${r}) returned from ${n} isn't global, but it should be!`
            );
          let i = null;
          for (; (i = r.exec(e)); ) {
            const e = r.lastIndex,
              o = i[1] || "";
            if (e === t) {
              const t = { start: e - o.length, length: o.length },
                r = await n.getAutocompletionItems(o);
              return {
                provider: n,
                items: r,
                range: t,
                selectedItem: r[0],
                rangeText: o,
              };
            }
          }
        }
        return null;
      }
    }
    class Zd extends Qd {
      getElementTagName() {
        return "textarea";
      }
    }
    class Xd extends Qd {
      getElementTagName() {
        return "input";
      }
    }
    class Jd {
      constructor(e) {
        (this.kind = "emoji"), (this.emoji = e);
      }
      getRegExp() {
        return /(?:^|\n| )(?::)([a-z\d\\+-][a-z\d_]*)?/g;
      }
      async getAutocompletionItems(e, t = 25) {
        if (0 === e.length)
          return [...this.emoji.keys()]
            .map((e) => ({ emoji: e, matchStart: 0, matchLength: 0 }))
            .slice(0, t);
        const n = new Array(),
          r = e.toLowerCase();
        for (const e of this.emoji.keys()) {
          const t = e.indexOf(r);
          -1 !== t &&
            n.push({ emoji: e, matchStart: t, matchLength: r.length });
        }
        return n
          .sort(
            (e, t) =>
              Ct(e.matchStart, t.matchStart) ||
              Ct(e.emoji.length, t.emoji.length) ||
              Ct(e.emoji, t.emoji)
          )
          .slice(0, t);
      }
      renderItem(e) {
        const t = e.emoji;
        return w.createElement(
          "div",
          { className: "emoji", key: t },
          w.createElement("img", { className: "icon", src: this.emoji.get(t) }),
          this.renderHighlightedTitle(e)
        );
      }
      renderHighlightedTitle(e) {
        const t = e.emoji;
        return e.matchLength
          ? w.createElement(
              "div",
              { className: "title" },
              t.substr(0, e.matchStart),
              w.createElement(
                "mark",
                null,
                t.substr(e.matchStart, e.matchLength)
              ),
              t.substr(e.matchStart + e.matchLength)
            )
          : w.createElement("div", { className: "title" }, t);
      }
      getCompletionText(e) {
        return e.emoji;
      }
    }
    class ep {
      constructor(e) {
        (this.timeoutId = null), (this.delay = e);
      }
      queue(e) {
        this.clear(), (this.timeoutId = window.setTimeout(e, this.delay));
      }
      clear() {
        null != this.timeoutId && window.clearTimeout(this.timeoutId);
      }
    }
    class tp {
      constructor(e, t, n) {
        (this.kind = "issue"),
          (this.updateIssuesScheduler = new ep(6e4)),
          (this.issuesStore = e),
          (this.repository = t),
          (this.dispatcher = n);
      }
      getRegExp() {
        return /(?:^|\n| )(?:#)([a-z\d\\+-][a-z\d_]*)?/g;
      }
      getAutocompletionItems(e) {
        return (
          this.updateIssuesScheduler.queue(() => {
            this.dispatcher.refreshIssues(this.repository);
          }),
          this.issuesStore.getIssuesMatching(this.repository, e)
        );
      }
      renderItem(e) {
        return w.createElement(
          "div",
          { className: "issue", key: e.number },
          w.createElement("span", { className: "number" }, "#", e.number),
          w.createElement("span", { className: "title" }, e.title)
        );
      }
      getCompletionText(e) {
        return "#" + e.number;
      }
    }
    function np(e, t) {
      return {
        username: t.login,
        name: t.name,
        email: t.email,
        endpoint: e.endpoint,
      };
    }
    class rp {
      constructor(e, t, n) {
        (this.kind = "user"),
          (this.gitHubUserStore = e),
          (this.repository = t),
          (this.account = n || null);
      }
      getRegExp() {
        return /(?:^|\n| )(?:@)([a-z\d\\+-][a-z\d_-]*)?/g;
      }
      async getAutocompletionItems(e) {
        const t = await this.gitHubUserStore.getMentionableUsersMatching(
            this.repository,
            e
          ),
          n = this.account;
        return (n ? t.filter((e) => e.login !== n.login) : t).map((e) =>
          np(this.repository, e)
        );
      }
      renderItem(e) {
        return w.createElement(
          "div",
          { className: "user", key: e.username },
          w.createElement("span", { className: "username" }, e.username),
          w.createElement("span", { className: "name" }, e.name)
        );
      }
      getCompletionText(e) {
        return "@" + e.username;
      }
      async exactMatch(e) {
        if (null === this.account) return null;
        const t = await this.gitHubUserStore.getByLogin(this.account, e);
        return t ? np(this.repository, t) : null;
      }
    }
    const ip = "https://avatars.githubusercontent.com",
      op = new wh(
        16,
        16,
        "M13 13.145a.844.844 0 0 1-.832.855H3.834A.846.846 0 0 1 3 13.142v-.856c0-2.257 3.333-3.429 3.333-3.429s.191-.35 0-.857c-.7-.531-.786-1.363-.833-3.429C5.644 2.503 7.056 2 8 2s2.356.502 2.5 2.571C10.453 6.637 10.367 7.47 9.667 8c-.191.506 0 .857 0 .857S13 10.03 13 12.286v.859z"
      ),
      sp = /^(?:(\d+)\+)?(.+?)@users\.noreply\.github\.com$/i;
    function ap(e, t = 64) {
      const n = new Array();
      if (void 0 === e) return n;
      const { email: r, endpoint: i, avatarURL: o } = e;
      if (i === gt()) {
        if (void 0 !== o)
          try {
            const e = new URL(o);
            e.searchParams.set("s", "" + t), n.push(e.toString());
          } catch (e) {
            n.push(o);
          }
      } else if (null !== i)
        return (
          n.push(
            (function (e, t = 60) {
              const n = e.trim().toLowerCase();
              return `https://www.gravatar.com/avatar/${Ye.createHash("md5")
                .update(n)
                .digest("hex")}?s=${t}`;
            })(r, t)
          ),
          n
        );
      const s = sp.exec(r);
      if (s) {
        const [, e, r] = s;
        if (void 0 !== e) {
          const r = encodeURIComponent(e);
          n.push(`${ip}/u/${r}?s=${t}`);
        } else {
          const e = encodeURIComponent(r);
          n.push(`${ip}/${e}?s=${t}`);
        }
      }
      const a = encodeURIComponent(r);
      return n.push(`${ip}/u/e?email=${a}&s=${t}`), n;
    }
    class lp extends w.Component {
      constructor(e) {
        super(e),
          (this.onImageError = (e) => {
            this.state.candidates.length > 0 &&
              this.setState({ candidates: this.state.candidates.slice(1) });
          }),
          (this.onInternetConnected = () => {
            if (0 === this.state.candidates.length) {
              const { user: e, size: t } = this.props,
                n = ap(e, t);
              n.length > 0 && this.setState({ candidates: n });
            }
          });
        const { user: t, size: n } = e;
        this.state = { user: t, candidates: ap(t, n) };
      }
      static getDerivedStateFromProps(e, t) {
        const { user: n, size: r } = e;
        if (!du(n, t.user)) {
          return { user: n, candidates: ap(n, r) };
        }
        return null;
      }
      getTitle() {
        if (null === this.props.title) return;
        if (void 0 === this.props.title) return this.props.title;
        const e = this.props.user;
        if (e) {
          const t = e.name;
          return t ? `${t} <${e.email}>` : e.email;
        }
        return "Unknown user";
      }
      render() {
        const e = this.getTitle(),
          t = this.props.user
            ? "Avatar for " + (this.props.user.name || this.props.user.email)
            : "Avatar for unknown user";
        if (0 === this.state.candidates.length)
          return w.createElement(vh, {
            symbol: op,
            className: "avatar",
            title: e,
          });
        const n = this.state.candidates[0],
          r = w.createElement("img", {
            className: "avatar",
            title: e,
            src: n,
            alt: e,
            "aria-label": t,
            onError: this.onImageError,
          });
        return void 0 === e
          ? r
          : w.createElement(
              "span",
              { title: e, className: "avatar-container" },
              r
            );
      }
      componentDidMount() {
        window.addEventListener("online", this.onInternetConnected);
      }
      componentWillUnmount() {
        window.removeEventListener("online", this.onInternetConnected);
      }
    }
    class cp extends w.Component {
      render() {
        return w.createElement(vh, { className: "spin", symbol: Ch });
      }
    }
    var up = n(14),
      hp = n.n(up);
    function dp(e, t) {
      return e.posFromIndex(e.indexFromPos(t) - 1);
    }
    function pp(e, t) {
      return e.posFromIndex(e.indexFromPos(t) + 1);
    }
    function fp(e, t) {
      const n = e.getLine(t.line);
      return (
        !!/\s/.test(n.charAt(t.ch)) ||
        (function (e, t) {
          const n = e.findMarksAt(t),
            r = e.indexFromPos(t);
          return n.some((t) => {
            const n = t.find();
            if (!n) return !1;
            const i = e.indexFromPos(n.from),
              o = e.indexFromPos(n.to);
            return r > i && r < o;
          });
        })(e, t)
      );
    }
    function mp(e, t) {
      return e.line === t.line && e.ch === t.ch;
    }
    function gp(e, t, n, r) {
      return (function (e, t, n, r) {
        let i = t;
        for (let o = r(e, t); n(e, o) && !mp(i, o); o = r(e, o)) i = o;
        return i;
      })(e, t, (e, t) => !n(e, t), r);
    }
    function yp(e, t, n) {
      const r = e.getDoc(),
        i = r.posFromIndex(1 / 0);
      r.replaceRange(t, i);
      const o = r.posFromIndex(1 / 0);
      return r.markText(i, o, n);
    }
    function vp(e, t) {
      const n = e.find(),
        r = t.find();
      return void 0 === n || void 0 === r ? Ct(n, r) : Ct(n.from, r.from);
    }
    function wp(e, t, n) {
      const r = n.username,
        i = document.createElement("div");
      i.classList.add("user", "unknown");
      const o = document.createElement("span");
      (o.className = "username"), (o.innerText = r), i.appendChild(o);
      const s = document.createElement("span");
      (s.className = "description"),
        (s.innerText = "Search for user"),
        i.appendChild(s),
        e.appendChild(i);
    }
    function bp(e, t, n) {
      const r = n.author,
        i = document.createElement("div");
      if (((i.className = "user"), r.username)) {
        const e = document.createElement("span");
        (e.className = "username"),
          (e.innerText = r.username),
          i.appendChild(e);
      }
      const o = document.createElement("span");
      (o.className = "name"),
        (o.innerText = r.name),
        i.appendChild(o),
        e.appendChild(i);
    }
    function Sp(e) {
      return e.email && e.email.length > 0
        ? e.email
        : Pu(e.username, e.endpoint);
    }
    function Cp(e) {
      return null === e.username ? e.name : "@" + e.username;
    }
    function Ep(e, t) {
      const n = document.createElement("span");
      n.classList.add("handle", t ? "error" : "progress"),
        (n.title = t
          ? "Could not find user with username " + e
          : "Searching for @" + e);
      const r = t ? wh.stop : Ch,
        i = document.createElementNS("http://www.w3.org/2000/svg", "svg");
      i.classList.add("icon"), t || i.classList.add("spin");
      const o = document.createElementNS("http://www.w3.org/2000/svg", "path");
      return (
        (i.viewBox.baseVal.width = r.w),
        (i.viewBox.baseVal.height = r.h),
        o.setAttribute("d", r.d),
        i.appendChild(o),
        n.appendChild(document.createTextNode("@" + e)),
        n.appendChild(i),
        n
      );
    }
    function kp(e, t, n, r) {
      const i = (function (e) {
        const t = document.createElement("span");
        return (
          t.classList.add("handle"),
          (t.title = `${e.name} <${e.email}>`),
          (t.innerText = Cp(e)),
          t
        );
      })(r);
      return e.markText(t, n, {
        atomic: !0,
        className: "handle",
        readOnly: !1,
        replacedWith: i,
        handleMouseEvents: !0,
      });
    }
    function xp(e) {
      const t = e.getDoc();
      if (t.somethingSelected()) return;
      const n = t.getCursor();
      mp(n, gp(t, n, fp, dp)) || e.showHint();
    }
    function Rp(e) {
      return { name: e.name || e.username, email: Sp(e), username: e.username };
    }
    class Tp extends w.Component {
      constructor(e) {
        super(e),
          (this.editor = null),
          (this.resizeDebounceId = null),
          (this.lastKnownWidth = null),
          (this.hintActive = !1),
          (this.label = null),
          (this.placeholder = null),
          (this.authors = []),
          (this.markAuthorMap = new Map()),
          (this.authorMarkMap = new Map()),
          (this.onResized = () => {
            (this.resizeDebounceId = null),
              this.editor && this.editor.refresh();
          }),
          (this.onContainerRef = (e) => {
            e
              ? ((this.editor = this.initializeCodeMirror(e)),
                this.resizeObserver.observe(e))
              : ((this.editor = null), this.resizeObserver.disconnect());
          }),
          (this.applyCompletion = (e, t, n) => {
            const r = n.from || t.from,
              i = n.to || t.to,
              o = n.author;
            this.insertAuthor(e, o, r, i), this.updateAuthors(e);
          }),
          (this.applyUnknownUserCompletion = (e, t, n) => {
            const r = n.from || t.from,
              i = n.to || t.to,
              o = n.username,
              s = "@" + o,
              a = e.getDoc();
            a.replaceRange(s, r, i, "complete");
            const l = a.posFromIndex(a.indexFromPos(r) + s.length),
              c = a.markText(r, l, {
                atomic: !0,
                className: "handle progress",
                readOnly: !1,
                replacedWith: Ep(o, !1),
                handleMouseEvents: !0,
              });
            return this.props.autoCompleteProvider.exactMatch(o).then((t) => {
              e.operation(() => {
                const n = c.find();
                n &&
                  (c.clear(),
                  t
                    ? this.insertAuthor(e, Rp(t), n.from, n.to)
                    : a.markText(n.from, n.to, {
                        atomic: !0,
                        className: "handle error",
                        readOnly: !1,
                        replacedWith: Ep(o, !0),
                        handleMouseEvents: !0,
                      }));
              });
            });
          }),
          (this.onAutocompleteUser = async (e, t, n) => {
            const r = e.getDoc(),
              i = r.getCursor(),
              o = gp(r, i, fp, dp),
              s = gp(r, i, fp, pp),
              a = r.getRange(o, s).replace(/^@/, ""),
              l = await this.props.autoCompleteProvider.getAutocompletionItems(
                a
              ),
              c = l.some((e) => e.username.toLowerCase() === a.toLowerCase()),
              u = new Set(this.authors.map((e) => e.username)),
              h = l
                .map(Rp)
                .filter((e) => null === e.username || !u.has(e.username))
                .map((e) => ({
                  author: e,
                  text: Cp(e),
                  render: bp,
                  className: "autocompletion-item",
                  hint: this.applyCompletion,
                }));
            return (
              !c &&
                a.length > 0 &&
                h.push({
                  text: "@" + a,
                  username: a,
                  render: wp,
                  className: "autocompletion-item",
                  hint: this.applyUnknownUserCompletion,
                }),
              { list: h, from: o, to: s }
            );
          }),
          (this.resizeObserver = new ResizeObserver((e) => {
            if (1 === e.length && this.editor) {
              const t = e[0].contentRect.width;
              if (!this.lastKnownWidth) return void (this.lastKnownWidth = t);
              this.lastKnownWidth !== t &&
                ((this.lastKnownWidth = t),
                null !== this.resizeDebounceId &&
                  (cancelAnimationFrame(this.resizeDebounceId),
                  (this.resizeDebounceId = null)),
                (this.resizeDebounceId = requestAnimationFrame(
                  this.onResized
                )));
            }
          })),
          (this.state = {});
      }
      componentWillUnmount() {
        if (this.editor) {
          const e = this.editor.state;
          e.completionActive &&
            e.completionActive.close &&
            e.completionActive.close();
        }
      }
      componentWillReceiveProps(e) {
        const t = this.editor;
        t &&
          (e.authors === this.props.authors ||
            pu(this.authors, e.authors) ||
            t.operation(() => {
              this.reset(t, e.authors);
            }),
          e.disabled !== this.props.disabled &&
            t.setOption("readOnly", !!e.disabled && "nocursor"));
      }
      insertAuthor(e, t, n, r) {
        const i = Cp(t),
          o = e.getDoc();
        o.replaceRange(i, n, r, "complete");
        const s = o.posFromIndex(o.indexFromPos(n) + i.length),
          a = kp(o, n, s, t);
        return this.markAuthorMap.set(a, t), this.authorMarkMap.set(t, a), a;
      }
      appendAuthor(e, t) {
        const n = e.getDoc();
        return this.insertAuthor(e, t, n.posFromIndex(1 / 0));
      }
      updatePlaceholderVisibility(e) {
        if (this.label && this.placeholder) {
          const t = this.label.find(),
            n = this.placeholder.find();
          if (!t || !n) return;
          const r = e.getDoc(),
            i = r.indexFromPos(t.to) !== r.indexFromPos(n.from);
          this.placeholder.collapsed !== i &&
            ((this.placeholder.collapsed = i), this.placeholder.changed());
        }
      }
      getAllHandleMarks(e) {
        return e.getDoc().getAllMarks();
      }
      initializeCodeMirror(e) {
        const t = {
            mode: null,
            lineWrapping: !0,
            extraKeys: {
              Tab: !1,
              Enter: !1,
              "Shift-Tab": !1,
              "Ctrl-Space": "autocomplete",
              "Ctrl-Enter": !1,
              "Cmd-Enter": !1,
              "Ctrl-F": !1,
              "Ctrl-G": !1,
              "Shift-Ctrl-G": !1,
              "Shift-Ctrl-F": !1,
              "Shift-Ctrl-R": !1,
            },
            readOnly: !!this.props.disabled && "nocursor",
            hintOptions: {
              completeOnSingleClick: !0,
              completeSingle: !1,
              closeOnUnfocus: !0,
              closeCharacters: /\s/,
              hint: this.onAutocompleteUser,
            },
          },
          n = hp()(e, t);
        n.operation(() => {
          this.reset(n, this.props.authors);
        }),
          n.on("startCompletion", () => {
            this.hintActive = !0;
          }),
          n.on("endCompletion", () => {
            this.hintActive = !1;
          }),
          n.on("change", () => {
            this.updatePlaceholderVisibility(n), this.hintActive || xp(n);
          }),
          n.on("focus", () => {
            this.hintActive || xp(n);
          }),
          n.on("changes", () => {
            this.updateAuthors(n);
          });
        const r = n.getWrapperElement();
        return (
          r.addEventListener("keypress", (e) => {
            e.defaultPrevented || "Enter" !== e.key || e.preventDefault();
          }),
          r.addEventListener("contextmenu", (e) => {
            this.onContextMenu(n, e);
          }),
          n
        );
      }
      onContextMenu(e, t) {
        t.preventDefault();
        const n = [
          { label: "撤销", action: () => e.getDoc().undo() },
          { label: "重做", action: () => e.getDoc().redo() },
          { type: "separator" },
          { role: "cut" },
          { role: "copy" },
          { role: "paste" },
        ];
        n.push({ type: "separator" }),
          n.push({
            label: "全选",
            action: () => {
              e.execCommand("selectAll");
            },
          }),
          se(n);
      }
      updateAuthors(e) {
        const t = this.getAllHandleMarks(e).sort(vp),
          n = new Array();
        for (const e of t) {
          const t = this.markAuthorMap.get(e);
          t && n.push(t);
        }
        pu(this.authors, n) ||
          ((this.authors = n), this.props.onAuthorsUpdated(n));
      }
      reset(e, t) {
        const n = e.getDoc();
        e.setValue(""),
          n.clearHistory(),
          (this.authors = []),
          this.authorMarkMap.clear(),
          this.markAuthorMap.clear(),
          (this.label = yp(e, "Co-Authors ", {
            atomic: !0,
            inclusiveLeft: !0,
            className: "label",
            readOnly: !0,
          }));
        for (const n of t) this.appendAuthor(e, n);
        (this.authors = this.props.authors),
          (this.placeholder = yp(e, "@username", {
            atomic: !0,
            inclusiveRight: !0,
            className: "placeholder",
            readOnly: !0,
            collapsed: t.length > 0,
          })),
          n.setCursor(this.placeholder.find().from);
      }
      render() {
        const e = ph()("author-input-component", this.props.className, {
          disabled: this.props.disabled,
        });
        return w.createElement("div", {
          className: e,
          ref: this.onContainerRef,
        });
      }
    }
    function Dp(e, t) {
      return () => {
        const n = ((performance.now() - e) / 1e3).toFixed(3),
          r = `[Timing] ${t} took ${n}s`;
        log.info(r);
      };
    }
    function Ap(e, t) {
      const n = performance && performance.now ? performance.now() : null;
      if (null === n)
        return (
          log.warn(
            "[Timing] invoked but performance.now not found - are you using this outside the renderer?"
          ),
          { done: () => {} }
        );
      return { done: Dp(n, `Action '${e}' for '${ho(t)}'`) };
    }
    const _p = (e) =>
        w.createElement(
          "div",
          { id: "permissions-commit-warning", onContextMenu: Mp },
          w.createElement(
            "div",
            { className: "warning-icon-container" },
            w.createElement(vh, { className: "warning-icon", symbol: wh.alert })
          ),
          w.createElement("div", { className: "warning-message" }, e.children)
        ),
      Mp = (e) => {
        e.preventDefault();
      };
    function Pp(e, t) {
      if (!t) return !1;
      const n = t.owner.endpoint,
        { name: r, email: i } = e.committer;
      if (n === gt() && "GitHub" === r && "noreply@github.com" === i) return !0;
      if ("GitHub Enterprise" === r) {
        const e = new URL(n).host.toLowerCase();
        return i.endsWith("@" + e);
      }
      return !1;
    }
    function Ip(e, t) {
      return {
        email: e.email,
        name: e.name,
        endpoint: null === t ? null : t.endpoint,
        avatarURL: void 0,
      };
    }
    function Op(e, t) {
      const n = [];
      n.push(Ip(t.author, e)), n.push(...t.coAuthors.map((t) => Ip(t, e)));
      const r = t.coAuthors.some(
          (e) => e.name === t.committer.name && e.email === t.committer.email
        ),
        i = null !== e && Pp(t, e);
      return t.authoredByCommitter || i || r || n.push(Ip(t.committer, e)), n;
    }
    const Lp = new wh(
      18,
      13,
      "M14 6V4.25a.75.75 0 0 1 1.5 0V6h1.75a.75.75 0 1 1 0 1.5H15.5v1.75a.75.75 0 0 1-1.5 0V7.5h-1.75a.75.75 0 1 1 0-1.5H14zM8.5 4a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0zm.063 3.064a3.995 3.995 0 0 0 1.2-4.429A3.996 3.996 0 0 0 8.298.725a4.01 4.01 0 0 0-6.064 1.91 3.987 3.987 0 0 0 1.2 4.43A5.988 5.988 0 0 0 0 12.2a.748.748 0 0 0 .716.766.751.751 0 0 0 .784-.697 4.49 4.49 0 0 1 1.39-3.04 4.51 4.51 0 0 1 6.218 0 4.49 4.49 0 0 1 1.39 3.04.748.748 0 0 0 .786.73.75.75 0 0 0 .714-.8 5.989 5.989 0 0 0-3.435-5.136z"
    );
    function Fp(e) {
      for (const t of e) if (t instanceof rp) return t;
      return null;
    }
    class Np extends w.Component {
      constructor(e) {
        super(e),
          (this.descriptionComponent = null),
          (this.summaryTextInput = null),
          (this.descriptionTextArea = null),
          (this.descriptionTextAreaScrollDebounceId = null),
          (this.onSummaryChanged = (e) => {
            this.setState({ summary: e });
          }),
          (this.onDescriptionChanged = (e) => {
            this.setState({ description: e });
          }),
          (this.onSubmit = () => {
            this.createCommit();
          }),
          (this.onKeyDown = (e) => {
            if (e.defaultPrevented) return;
            e.ctrlKey &&
              "Enter" === e.key &&
              this.canCommit() &&
              (this.createCommit(), e.preventDefault());
          }),
          (this.onCoAuthorsUpdated = (e) => {
            this.props.dispatcher.setCoAuthors(this.props.repository, e);
          }),
          (this.onToggleCoAuthors = () => {
            this.props.dispatcher.setShowCoAuthoredBy(
              this.props.repository,
              !this.props.showCoAuthoredBy
            );
          }),
          (this.onContextMenu = (e) => {
            if (e.defaultPrevented) return;
            e.preventDefault();
            se([this.getAddRemoveCoAuthorsMenuItem()]);
          }),
          (this.onAutocompletingInputContextMenu = (e) => {
            e.preventDefault();
            se([
              this.getAddRemoveCoAuthorsMenuItem(),
              { type: "separator" },
              { role: "editMenu" },
            ]);
          }),
          (this.onCoAuthorToggleButtonClick = (e) => {
            e.preventDefault(), this.onToggleCoAuthors();
          }),
          (this.onDescriptionFieldRef = (e) => {
            this.descriptionComponent = e;
          }),
          (this.onDescriptionTextAreaScroll = () => {
            this.descriptionTextAreaScrollDebounceId = null;
            const e = this.descriptionTextArea,
              t = null !== e && e.scrollTop + e.offsetHeight < e.scrollHeight;
            this.state.descriptionObscured !== t &&
              this.setState({ descriptionObscured: t });
          }),
          (this.onDescriptionTextAreaRef = (e) => {
            if (e) {
              const t = () => {
                null !== this.descriptionTextAreaScrollDebounceId &&
                  (cancelAnimationFrame(
                    this.descriptionTextAreaScrollDebounceId
                  ),
                  (this.descriptionTextAreaScrollDebounceId = null)),
                  (this.descriptionTextAreaScrollDebounceId = requestAnimationFrame(
                    this.onDescriptionTextAreaScroll
                  ));
              };
              e.addEventListener("input", t), e.addEventListener("scroll", t);
            }
            this.descriptionTextArea = e;
          }),
          (this.onSummaryInputRef = (e) => {
            this.summaryTextInput = e;
          }),
          (this.onFocusContainerClick = (e) => {
            this.descriptionComponent && this.descriptionComponent.focus();
          }),
          (this.onSwitchBranch = () => {
            this.props.dispatcher.showFoldout({ type: j.Branch });
          }),
          (this.onMakeFork = () => {
            co(this.props.repository) &&
              this.props.dispatcher.showCreateForkDialog(this.props.repository);
          });
        const { commitMessage: t } = this.props;
        this.state = {
          summary: t ? t.summary : "",
          description: t ? t.description : null,
          userAutocompletionProvider: Fp(e.autocompletionProviders),
          descriptionObscured: !1,
        };
      }
      componentWillUnmount() {
        this.props.dispatcher.setCommitMessage(this.props.repository, {
          summary: this.state.summary,
          description: this.state.description,
        });
      }
      componentWillReceiveProps(e) {
        const { commitMessage: t } = e;
        t &&
          t !== this.props.commitMessage &&
          ("" !== this.state.summary ||
            this.state.description ||
            this.setState({ summary: t.summary, description: t.description }));
      }
      componentDidUpdate(e) {
        this.props.autocompletionProviders !== e.autocompletionProviders &&
          this.setState({
            userAutocompletionProvider: Fp(this.props.autocompletionProviders),
          }),
          this.props.focusCommitMessage && this.focusSummary();
      }
      clearCommitMessage() {
        this.setState({ summary: "", description: null });
      }
      focusSummary() {
        null !== this.summaryTextInput &&
          (this.summaryTextInput.focus(),
          this.props.dispatcher.setCommitMessageFocus(!1));
      }
      getCoAuthorTrailers() {
        return this.isCoAuthorInputEnabled
          ? this.props.coAuthors.map((e) => ({
              token: "Co-Authored-By",
              value: `${e.name} <${e.email}>`,
            }))
          : [];
      }
      async createCommit() {
        const { summary: e, description: t } = this.state;
        if (!this.canCommit()) return;
        const n = this.getCoAuthorTrailers(),
          r = {
            summary:
              this.props.prepopulateCommitSummary && !this.state.summary
                ? this.props.placeholder
                : e,
            description: t,
            trailers: n,
          },
          i = Ap("create commit", this.props.repository),
          o = await this.props.onCreateCommit(r);
        i.done(), o && this.clearCommitMessage();
      }
      canCommit() {
        return (
          (this.props.anyFilesSelected && this.state.summary.length > 0) ||
          this.props.prepopulateCommitSummary
        );
      }
      renderAvatar() {
        const { commitAuthor: e, repository: t } = this.props,
          { gitHubRepository: n } = t,
          r = e ? `Committing as ${e.name} <${e.email}>` : void 0,
          i = null !== e ? Ip(e, n) : void 0;
        return w.createElement(lp, { user: i, title: r });
      }
      get isCoAuthorInputEnabled() {
        return null !== this.props.repository.gitHubRepository;
      }
      get isCoAuthorInputVisible() {
        return this.props.showCoAuthoredBy && this.isCoAuthorInputEnabled;
      }
      renderCoAuthorInput() {
        if (!this.isCoAuthorInputVisible) return null;
        const e = this.state.userAutocompletionProvider;
        return e
          ? w.createElement(Tp, {
              onAuthorsUpdated: this.onCoAuthorsUpdated,
              authors: this.props.coAuthors,
              autoCompleteProvider: e,
              disabled: this.props.isCommitting,
            })
          : null;
      }
      get toggleCoAuthorsText() {
        return this.props.showCoAuthoredBy
          ? "Remove co-authors"
          : "Add co-authors";
      }
      getAddRemoveCoAuthorsMenuItem() {
        return {
          label: this.toggleCoAuthorsText,
          action: this.onToggleCoAuthors,
          enabled:
            null !== this.props.repository.gitHubRepository &&
            !this.props.isCommitting,
        };
      }
      renderCoAuthorToggleButton() {
        return null === this.props.repository.gitHubRepository
          ? null
          : w.createElement(
              "button",
              {
                className: "co-authors-toggle",
                onClick: this.onCoAuthorToggleButtonClick,
                tabIndex: -1,
                "aria-label": this.toggleCoAuthorsText,
                disabled: this.props.isCommitting,
              },
              w.createElement(vh, { symbol: Lp })
            );
      }
      get isActionBarEnabled() {
        return this.isCoAuthorInputEnabled;
      }
      renderActionBar() {
        if (!this.isCoAuthorInputEnabled) return null;
        const e = ph()("action-bar", { disabled: this.props.isCommitting });
        return w.createElement(
          "div",
          { className: e },
          this.renderCoAuthorToggleButton()
        );
      }
      renderPermissionsCommitWarning() {
        const {
          showBranchProtected: e,
          showNoWriteAccess: t,
          repository: n,
          branch: r,
        } = this.props;
        return t
          ? w.createElement(
              _p,
              null,
              "You don't have write access to ",
              w.createElement("strong", null, n.name),
              ". Want to",
              " ",
              w.createElement(
                _d,
                { onClick: this.onMakeFork },
                "create a fork"
              ),
              "?"
            )
          : e
          ? null === r
            ? null
            : w.createElement(
                _p,
                null,
                w.createElement("strong", null, r),
                " is a protected branch. Want to",
                " ",
                w.createElement(
                  _d,
                  { onClick: this.onSwitchBranch },
                  "switch branches"
                ),
                "?"
              )
          : null;
      }
      render() {
        const e = this.state.summary.match(/^\s+$/g),
          t = this.canCommit() && !this.props.isCommitting && !e,
          n = this.props.isCommitting ? w.createElement(cp, null) : void 0,
          r = ph()({
            "with-action-bar": this.isActionBarEnabled,
            "with-co-authors": this.isCoAuthorInputVisible,
          }),
          i = ph()("description-field", {
            "with-overflow": this.state.descriptionObscured,
          }),
          o = ph()("summary-field", "nudge-arrow", {
            "nudge-arrow-left": this.props.shouldNudge,
          }),
          s = this.props.branch,
          a = n ? "提交中" : "提交",
          l = null !== s ? `${a}到 ${s}` : a,
          c =
            null !== s
              ? w.createElement(
                  w.Fragment,
                  null,
                  a,
                  "到 ",
                  w.createElement("strong", null, s)
                )
              : a;
        return w.createElement(
          "div",
          {
            id: "commit-message",
            role: "group",
            "aria-label": "Create commit",
            className: r,
            onContextMenu: this.onContextMenu,
            onKeyDown: this.onKeyDown,
          },
          w.createElement(
            "div",
            { className: "summary" },
            this.renderAvatar(),
            w.createElement(Xd, {
              isRequired: !0,
              className: o,
              placeholder: this.props.placeholder,
              value: this.state.summary,
              onValueChanged: this.onSummaryChanged,
              onElementRef: this.onSummaryInputRef,
              autocompletionProviders: this.props.autocompletionProviders,
              onContextMenu: this.onAutocompletingInputContextMenu,
              disabled: this.props.isCommitting,
            })
          ),
          w.createElement(
            kd,
            {
              className: "description-focus-container",
              onClick: this.onFocusContainerClick,
            },
            w.createElement(Zd, {
              className: i,
              placeholder: "描述",
              value: this.state.description || "",
              onValueChanged: this.onDescriptionChanged,
              autocompletionProviders: this.props.autocompletionProviders,
              ref: this.onDescriptionFieldRef,
              onElementRef: this.onDescriptionTextAreaRef,
              onContextMenu: this.onAutocompletingInputContextMenu,
              disabled: this.props.isCommitting,
            }),
            this.renderActionBar()
          ),
          this.renderCoAuthorInput(),
          this.renderPermissionsCommitWarning(),
          w.createElement(
            Ud,
            {
              type: "submit",
              className: "commit-button",
              onClick: this.onSubmit,
              disabled: !t,
            },
            n,
            w.createElement("span", { title: l }, c)
          )
        );
      }
    }
    function Bp(e, t) {
      if (e.length <= t) return e;
      if (t <= 0) return "";
      if (1 === t) return "…";
      const n = (t - 1) / 2;
      return `${e.substr(0, Math.floor(n))}…${e.substr(
        e.length - Math.ceil(n)
      )}`;
    }
    function Hp(e, t) {
      if ((t = void 0 === t ? e.length : t) <= 0)
        return {
          normalizedPath: e,
          directoryText: "",
          fileText: "",
          length: t,
        };
      const { normalizedFileName: n, normalizedDirectory: r } = (function (e) {
        e = e.endsWith("/") ? e.substr(0, e.length - 1) : e;
        const t = i.basename(e);
        return {
          normalizedFileName: t,
          normalizedDirectory: e.substr(0, e.length - t.length),
        };
      })(e);
      if (t >= e.length)
        return { normalizedPath: e, directoryText: r, fileText: n, length: t };
      const o = (function (e, t) {
        if (e.length <= t) return e;
        if (t <= 0) return "";
        if (1 === t) return "…";
        const n = e.lastIndexOf(i.sep);
        if (-1 === n) return Bp(e, t);
        const r = e.length - n - 1;
        return r + 2 > t
          ? Bp(e, t)
          : `${e.substr(0, t - r - 2)}…${e.substr(n)}`;
      })(e, t);
      let s = 0;
      for (let e = 0; e < o.length && e < r.length; e++) {
        const t = r[e],
          n = o[e];
        if (t !== n) {
          if ("…" === n) {
            s++;
            const t = e + 1;
            o.length > t && o[t] === i.sep && s++;
          }
          break;
        }
        s++;
      }
      const a = o.substr(s);
      return {
        normalizedPath: e,
        directoryText: o.substr(0, s),
        fileText: a,
        length: t,
      };
    }
    function zp(e, t) {
      const n = i.normalize(e);
      return Object.assign(
        {
          longestFit: 0,
          shortestNonFit: void 0,
          availableWidth: void 0,
          fullTextWidth: void 0,
        },
        Hp(n, t)
      );
    }
    class Up extends w.PureComponent {
      constructor(e) {
        super(e),
          (this.pathElement = null),
          (this.pathInnerElement = null),
          (this.onDialogShow = (e) => {
            const t = e.target;
            t instanceof Element &&
              t.contains(this.pathElement) &&
              this.resizeIfNecessary();
          }),
          (this.onPathElementRef = (e) => {
            this.pathElement = e;
          }),
          (this.onPathInnerElementRef = (e) => {
            this.pathInnerElement = e;
          }),
          (this.state = zp(e.path));
      }
      componentWillReceiveProps(e) {
        e.path !== this.props.path && this.setState(zp(e.path));
      }
      componentDidMount() {
        this.resizeIfNecessary(),
          document.addEventListener("dialog-show", this.onDialogShow);
      }
      componentWillUnmount() {
        document.removeEventListener("dialog-show", this.onDialogShow);
      }
      componentDidUpdate() {
        this.resizeIfNecessary();
      }
      render() {
        const e =
            this.state.directoryText && this.state.directoryText.length
              ? w.createElement(
                  "span",
                  { className: "dirname" },
                  this.state.directoryText
                )
              : null,
          t =
            this.state.length < this.state.normalizedPath.length
              ? this.state.normalizedPath
              : void 0;
        return w.createElement(
          "div",
          {
            className: "path-text-component",
            ref: this.onPathElementRef,
            title: t,
          },
          w.createElement(
            "span",
            { ref: this.onPathInnerElementRef },
            e,
            w.createElement(
              "span",
              { className: "filename" },
              this.state.fileText
            )
          )
        );
      }
      resizeIfNecessary() {
        if (!this.pathElement || !this.pathInnerElement) return;
        const e =
            void 0 !== this.props.availableWidth
              ? this.props.availableWidth
              : this.pathElement.getBoundingClientRect().width,
          t = Math.max(e, 0);
        if (
          void 0 !== this.state.fullTextWidth &&
          this.state.fullTextWidth <= t
        )
          return this.state.length === this.state.normalizedPath.length
            ? void (
                t !== this.state.availableWidth &&
                this.setState(
                  Object.assign(Object.assign({}, this.state), {
                    availableWidth: t,
                  })
                )
              )
            : void this.setState(
                Object.assign(
                  Object.assign(
                    Object.assign({}, this.state),
                    Hp(this.state.normalizedPath)
                  ),
                  { availableWidth: t }
                )
              );
        if (
          void 0 !== this.state.availableWidth &&
          this.state.availableWidth !== t
        ) {
          const e = zp(this.props.path, this.state.length);
          return void (t < this.state.availableWidth
            ? this.setState(
                Object.assign(Object.assign({}, e), {
                  fullTextWidth: this.state.fullTextWidth,
                  shortestNonFit: this.state.shortestNonFit,
                  availableWidth: t,
                })
              )
            : t > this.state.availableWidth &&
              this.setState(
                Object.assign(Object.assign({}, e), {
                  fullTextWidth: this.state.fullTextWidth,
                  longestFit: this.state.longestFit,
                  availableWidth: t,
                })
              ));
        }
        if (0 === t)
          return void (
            0 !== this.state.length &&
            this.setState(
              Object.assign(
                Object.assign(
                  Object.assign({}, this.state),
                  Hp(this.state.normalizedPath, 0)
                ),
                { availableWidth: t, longestFit: 0, shortestNonFit: 1 }
              )
            )
          );
        const n = this.pathInnerElement.getBoundingClientRect().width,
          r =
            this.state.length === this.state.normalizedPath.length
              ? n
              : this.state.fullTextWidth,
          i = 0 === n ? 0.5 : t / n;
        if (n <= t) {
          if (this.state.length === this.state.normalizedPath.length)
            return void this.setState(
              Object.assign(Object.assign({}, this.state), {
                availableWidth: t,
                fullTextWidth: r,
              })
            );
          {
            const e = this.state.length,
              o =
                void 0 !== this.state.shortestNonFit
                  ? this.state.shortestNonFit - 1
                  : this.state.normalizedPath.length,
              s = e + 1;
            if (s >= o)
              return void this.setState(
                Object.assign(Object.assign({}, this.state), {
                  longestFit: e,
                  availableWidth: t,
                  fullTextWidth: r,
                })
              );
            if (t - n < 3)
              return void this.setState(
                Object.assign(Object.assign({}, this.state), {
                  longestFit: e,
                  availableWidth: t,
                  fullTextWidth: r,
                })
              );
            const a = yl(Math.floor(this.state.length * i), s, o);
            this.setState(
              Object.assign(
                Object.assign(
                  Object.assign({}, this.state),
                  Hp(this.state.normalizedPath, a)
                ),
                { longestFit: e, availableWidth: t, fullTextWidth: r }
              )
            );
          }
        } else {
          const e = this.state.length,
            n = e - 1,
            o = this.state.longestFit || 0,
            s = yl(Math.floor(this.state.length * i), o, n);
          this.setState(
            Object.assign(
              Object.assign(
                Object.assign({}, this.state),
                Hp(this.state.normalizedPath, s)
              ),
              { shortestNonFit: e, availableWidth: t, fullTextWidth: r }
            )
          );
        }
      }
    }
    class Wp extends w.Component {
      render() {
        const e = { className: "path-label-component" },
          { status: t } = this.props,
          n = this.props.availableWidth;
        if (t.kind === io.Renamed || t.kind === io.Copied) {
          const r = n ? n / 2 - 10 : void 0;
          return w.createElement(
            "label",
            Object.assign({}, e),
            w.createElement(Up, { path: t.oldPath, availableWidth: r }),
            w.createElement(vh, {
              className: "rename-arrow",
              symbol: wh.arrowRight,
            }),
            w.createElement(Up, { path: this.props.path, availableWidth: r })
          );
        }
        return w.createElement(
          "label",
          Object.assign({}, e),
          w.createElement(Up, { path: this.props.path, availableWidth: n })
        );
      }
    }
    class jp extends w.Component {
      constructor() {
        super(...arguments),
          (this.handleCheckboxChange = (e) => {
            const t = e.currentTarget.checked;
            this.props.onIncludeChanged(this.props.file.path, t);
          }),
          (this.onContextMenu = (e) => {
            this.props.onContextMenu(this.props.file, e);
          });
      }
      get checkboxValue() {
        return !0 === this.props.include
          ? $d.On
          : !1 === this.props.include
          ? $d.Off
          : $d.Mixed;
      }
      render() {
        const { status: e, path: t } = this.props.file,
          n = Vl(e),
          r = this.props.availableWidth - 20 - 20 - 5 - 16;
        return w.createElement(
          "div",
          { className: "file", onContextMenu: this.onContextMenu },
          w.createElement(qd, {
            tabIndex: -1,
            value: this.checkboxValue,
            onChange: this.handleCheckboxChange,
            disabled: this.props.disableSelection,
          }),
          w.createElement(Wp, { path: t, status: e, availableWidth: r }),
          w.createElement(vh, {
            symbol: Sh(e),
            className: "status status-" + n.toLowerCase(),
            title: n,
          })
        );
      }
    }
    class Vp extends w.Component {
      constructor() {
        super(...arguments),
          (this.onSubmit = async () => {
            const { rebaseConflictState: e } = this.props;
            await this.props.dispatcher.continueRebase(
              this.props.repository,
              this.props.workingDirectory,
              e
            );
          });
      }
      render() {
        const { manualResolutions: e } = this.props.rebaseConflictState;
        let t = !0,
          n = "Continue rebase";
        Xl(this.props.workingDirectory, e).length > 0 &&
          ((n = "Resolve all conflicts before continuing"), (t = !1));
        const r = t && !this.props.isCommitting,
          i = this.props.isCommitting ? w.createElement(cp, null) : void 0,
          o = this.props.hasUntrackedChanges
            ? w.createElement(
                "div",
                { className: "warning-untracked-files" },
                "Untracked files will be excluded"
              )
            : void 0;
        return w.createElement(
          "div",
          { id: "continue-rebase" },
          w.createElement(
            Ud,
            {
              type: "submit",
              className: "commit-button",
              onClick: this.onSubmit,
              disabled: !r,
              tooltip: n,
            },
            i,
            w.createElement(
              "span",
              null,
              void 0 !== i ? "Rebasing" : "Continue rebase"
            )
          ),
          o
        );
      }
    }
    const Gp = new wh(
      16,
      16,
      "M10.5 1.286h-9a.214.214 0 0 0-.214.214v9a.214.214 0 0 0 .214.214h9a.214.214 0 0 0 .214-.214v-9a.214.214 0 0 0-.214-.214zM1.5 0h9A1.5 1.5 0 0 1 12 1.5v9a1.5 1.5 0 0 1-1.5 1.5h-9A1.5 1.5 0 0 1 0 10.5v-9A1.5 1.5 0 0 1 1.5 0zm5.712 7.212a1.714 1.714 0 1 1-2.424-2.424 1.714 1.714 0 0 1 2.424 2.424zM2.015 12.71c.102.729.728 1.29 1.485 1.29h9a1.5 1.5 0 0 0 1.5-1.5v-9a1.5 1.5 0 0 0-1.29-1.485v1.442a.216.216 0 0 1 .004.043v9a.214.214 0 0 1-.214.214h-9a.216.216 0 0 1-.043-.004H2.015zm2 2c.102.729.728 1.29 1.485 1.29h9a1.5 1.5 0 0 0 1.5-1.5v-9a1.5 1.5 0 0 0-1.29-1.485v1.442a.216.216 0 0 1 .004.043v9a.214.214 0 0 1-.214.214h-9a.216.216 0 0 1-.043-.004H4.015z",
      "evenodd"
    );
    function $p(e, t) {
      if (null !== t) {
        if (0 === e.files.length) return $d.Off;
        if (e.files.every((e) => e.status.kind === io.Untracked)) return $d.Off;
        return e.files.every((e) => e.status.kind !== io.Untracked)
          ? $d.On
          : $d.Mixed;
      }
      const { includeAll: n } = e;
      return !0 === n ? $d.On : !1 === n ? $d.Off : $d.Mixed;
    }
    function qp(e) {
      const t = e.selectedFileIDs,
        n = [];
      for (const r of t) {
        const t = e.workingDirectory.findFileIndexByID(r);
        -1 !== t && n.push(t);
      }
      return n;
    }
    class Kp extends w.Component {
      constructor(e) {
        super(e),
          (this.onIncludeAllChanged = (e) => {
            const t = e.currentTarget.checked;
            this.props.onSelectAll(t);
          }),
          (this.renderRow = (e) => {
            const {
                workingDirectory: t,
                rebaseConflictState: n,
                isCommitting: r,
                onIncludeChanged: i,
                availableWidth: o,
              } = this.props,
              s = t.files[e],
              a = s.selection.getSelectionType(),
              l = a === Vi.All || (a !== Vi.None && null),
              c = null !== n ? s.status.kind !== io.Untracked : l,
              u = r || null !== n;
            return w.createElement(jp, {
              file: s,
              include: c,
              key: s.id,
              onContextMenu: this.onItemContextMenu,
              onIncludeChanged: i,
              availableWidth: o,
              disableSelection: u,
            });
          }),
          (this.onDiscardAllChanges = () => {
            this.props.onDiscardChangesFromFiles(
              this.props.workingDirectory.files,
              !0
            );
          }),
          (this.onStashChanges = () => {
            this.props.dispatcher.createStashForCurrentBranch(
              this.props.repository
            );
          }),
          (this.onDiscardChanges = (e) => {
            const t = this.props.workingDirectory;
            if (1 === e.length) {
              const n = t.files.find((t) => t.path === e[0]);
              null != n && this.props.onDiscardChanges(n);
            } else {
              const n = new Array();
              if (
                (e.forEach((e) => {
                  const r = t.files.find((t) => t.path === e);
                  null != r && n.push(r);
                }),
                n.length > 0)
              ) {
                const e = n.length === t.files.length;
                this.props.onDiscardChangesFromFiles(n, e);
              }
            }
          }),
          (this.getDiscardChangesMenuItemLabel = (e) => {
            const t =
              1 === e.length
                ? "Discard changes"
                : `Discard ${e.length} selected changes`;
            return this.props.askForConfirmationOnDiscardChanges ? t + "…" : t;
          }),
          (this.onContextMenu = (e) => {
            if (
              (e.preventDefault(),
              null !== this.props.rebaseConflictState ||
                this.props.isCommitting)
            )
              return;
            const t = this.props.workingDirectory.files.length > 0,
              n = null !== this.props.stashEntry,
              r =
                null !== this.props.conflictState ||
                $l(this.props.workingDirectory);
            se([
              {
                label: "Discard all changes…",
                action: this.onDiscardAllChanges,
                enabled: t,
              },
              {
                label: n ? "Stash all changes…" : "Stash all changes",
                action: this.onStashChanges,
                enabled: t && null !== this.props.branch && !r,
              },
            ]);
          }),
          (this.getDiscardChangesMenuItem = (e) => ({
            label: this.getDiscardChangesMenuItemLabel(e),
            action: () => this.onDiscardChanges(e),
          })),
          (this.getCopyPathMenuItem = (e) => ({
            label: "Copy file path",
            action: () => {
              const t = i.join(this.props.repository.path, e.path);
              r.clipboard.writeText(t);
            },
          })),
          (this.getRevealInFileManagerMenuItem = (e) => ({
            label: "Show in Explorer",
            action: () => ne(this.props.repository, e.path),
            enabled: e.status.kind !== io.Deleted,
          })),
          (this.getOpenInExternalEditorMenuItem = (e, t) => {
            const { externalEditorLabel: n, repository: r } = this.props;
            return {
              label: n ? "Open in " + n : "Open in external editor",
              action: () => {
                const t = i.join(r.path, e.path);
                this.props.onOpenInExternalEditor(t);
              },
              enabled: t,
            };
          }),
          (this.onItemContextMenu = (e, t) => {
            if (this.props.isCommitting) return;
            t.preventDefault();
            se(
              null === this.props.rebaseConflictState
                ? this.getDefaultContextMenu(e)
                : this.getRebaseContextMenu(e)
            );
          }),
          (this.onScroll = (e, t) => {
            this.props.onChangesListScrolled(e);
          }),
          (this.renderCommitMessageForm = () => {
            const {
              rebaseConflictState: e,
              workingDirectory: t,
              repository: n,
              dispatcher: r,
              isCommitting: i,
              currentBranchProtected: o,
            } = this.props;
            if (null !== e) {
              const o = t.files.some((e) => e.status.kind === io.Untracked);
              return w.createElement(Vp, {
                dispatcher: r,
                repository: n,
                rebaseConflictState: e,
                workingDirectory: t,
                isCommitting: i,
                hasUntrackedChanges: o,
              });
            }
            const s = t.files.length,
              a = $p(t, e),
              l = s > 0 && a !== $d.Off,
              c = t.files.filter(
                (e) => e.selection.getSelectionType() !== Vi.None
              ),
              u = 1 === c.length && !n.isTutorialRepository,
              h =
                null === this.props.repository.gitHubRepository ||
                to(this.props.repository.gitHubRepository);
            return w.createElement(Np, {
              onCreateCommit: this.props.onCreateCommit,
              branch: this.props.branch,
              commitAuthor: this.props.commitAuthor,
              anyFilesSelected: l,
              repository: n,
              dispatcher: r,
              commitMessage: this.props.commitMessage,
              focusCommitMessage: this.props.focusCommitMessage,
              autocompletionProviders: this.props.autocompletionProviders,
              isCommitting: i,
              showCoAuthoredBy: this.props.showCoAuthoredBy,
              coAuthors: this.props.coAuthors,
              placeholder: this.getPlaceholderMessage(c, u),
              prepopulateCommitSummary: u,
              key: n.id,
              showBranchProtected: s > 0 && o,
              showNoWriteAccess: s > 0 && !h,
              shouldNudge: this.props.shouldNudgeToCommit,
            });
          }),
          (this.onStashEntryClicked = () => {
            const {
              isShowingStashEntry: e,
              dispatcher: t,
              repository: n,
            } = this.props;
            e
              ? (t.selectWorkingDirectoryFiles(n),
                t.recordNoActionTakenOnStash())
              : (t.selectStashedFile(n), t.recordStashView());
          }),
          (this.onRowKeyDown = (e, t) => {
            !this.props.isCommitting ||
              ("Enter" !== t.key && " " !== t.key) ||
              t.preventDefault();
          }),
          (this.state = { selectedRows: qp(e) });
      }
      componentWillReceiveProps(e) {
        (pu(e.selectedFileIDs, this.props.selectedFileIDs) &&
          pu(e.workingDirectory.files, this.props.workingDirectory.files)) ||
          this.setState({ selectedRows: qp(e) });
      }
      getDefaultContextMenu(e) {
        const { id: t, path: n, status: r } = e,
          o = Lu(i.extname(n)),
          { workingDirectory: s, selectedFileIDs: a } = this.props,
          l = new Array(),
          c = new Array(),
          u = new Set(),
          h = (e) => {
            const t = s.findFileWithID(e);
            if (t) {
              l.push(t), c.push(t.path);
              const e = i.extname(t.path);
              e.length && u.add(e);
            }
          };
        a.includes(t) ? a.forEach(h) : h(t);
        const d = [this.getDiscardChangesMenuItem(c), { type: "separator" }];
        1 === c.length
          ? d.push({
              label: "Ignore file (add to .gitignore)",
              action: () => this.props.onIgnore(n),
              enabled: ".gitignore" !== i.basename(n),
            })
          : c.length > 1 &&
            d.push({
              label: `Ignore ${c.length} selected files (add to .gitignore)`,
              action: () => {
                this.props.onIgnore(
                  c.filter((e) => ".gitignore" !== i.basename(e))
                );
              },
              enabled: c.some((e) => ".gitignore" !== i.basename(e)),
            }),
          Array.from(u)
            .slice(0, 5)
            .forEach((e) => {
              d.push({
                label: `Ignore all ${e} files (add to .gitignore)`,
                action: () => this.props.onIgnore("*" + e),
              });
            });
        const p = o && r.kind !== io.Deleted;
        return (
          d.push(
            { type: "separator" },
            this.getCopyPathMenuItem(e),
            this.getRevealInFileManagerMenuItem(e),
            this.getOpenInExternalEditorMenuItem(e, p),
            {
              label: "Open with default program",
              action: () => this.props.onOpenItem(n),
              enabled: p,
            }
          ),
          d
        );
      }
      getRebaseContextMenu(e) {
        const { path: t, status: n } = e,
          r = Lu(i.extname(t)),
          o = new Array();
        e.status.kind === io.Untracked &&
          o.push(this.getDiscardChangesMenuItem([e.path]), {
            type: "separator",
          });
        const s = r && n.kind !== io.Deleted;
        return (
          o.push(
            this.getCopyPathMenuItem(e),
            this.getRevealInFileManagerMenuItem(e),
            this.getOpenInExternalEditorMenuItem(e, s),
            {
              label: "Open with default program",
              action: () => this.props.onOpenItem(t),
              enabled: s,
            }
          ),
          o
        );
      }
      getPlaceholderMessage(e, t) {
        if (!t) return "摘要（必填）";
        const n = e[0],
          r = Object(i.basename)(n.path);
        switch (n.status.kind) {
          case io.New:
          case io.Untracked:
            return "创建 " + r;
          case io.Deleted:
            return "删除 " + r;
          default:
            return "更新 " + r;
        }
      }
      renderStashedChanges() {
        if (null === this.props.stashEntry) return null;
        const e = ph()(
          "stashed-changes-button",
          this.props.isShowingStashEntry ? "selected" : null
        );
        return w.createElement(
          "button",
          {
            className: e,
            onClick: this.onStashEntryClicked,
            tabIndex: 0,
            "aria-selected": this.props.isShowingStashEntry,
          },
          w.createElement(vh, { className: "stack-icon", symbol: Gp }),
          w.createElement("div", { className: "text" }, "Stashed Changes"),
          w.createElement(vh, { symbol: wh.chevronRight })
        );
      }
      render() {
        const e = this.props.workingDirectory.files.length,
          t = `${e} ${1 === e ? "文件" : "文件"} 更改 `,
          n = this.props.workingDirectory.files.filter(
            (e) => e.selection.getSelectionType() !== Vi.None
          ).length,
          r = `${n} ${1 === n ? "文件" : "文件"} 更改已选`,
          i = $p(this.props.workingDirectory, this.props.rebaseConflictState),
          o =
            0 === e ||
            this.props.isCommitting ||
            null !== this.props.rebaseConflictState;
        return w.createElement(
          "div",
          { className: "changes-list-container file-list" },
          w.createElement(
            "div",
            {
              className: "header",
              onContextMenu: this.onContextMenu,
              title: r,
            },
            w.createElement(qd, {
              label: t,
              value: i,
              onChange: this.onIncludeAllChanged,
              disabled: o,
            })
          ),
          w.createElement(Ad, {
            id: "changes-list",
            rowCount: this.props.workingDirectory.files.length,
            rowHeight: 29,
            rowRenderer: this.renderRow,
            selectedRows: this.state.selectedRows,
            selectionMode: "multi",
            onSelectionChanged: this.props.onFileSelectionChanged,
            invalidationProps: this.props.workingDirectory,
            onRowClick: this.props.onRowClick,
            onScroll: this.onScroll,
            setScrollTop: this.props.changesListScrollTop,
            onRowKeyDown: this.onRowKeyDown,
          }),
          this.renderStashedChanges(),
          this.renderCommitMessageForm()
        );
      }
    }
    var Yp;
    !(function (e) {
      (e[(e.Text = 0)] = "Text"),
        (e[(e.Emoji = 1)] = "Emoji"),
        (e[(e.Link = 2)] = "Link");
    })(Yp || (Yp = {}));
    class Qp {
      constructor(e, t) {
        (this.repository = null),
          (this._results = new Array()),
          (this._currentString = ""),
          (this.emoji = e),
          t && co(t) && (this.repository = fo(t));
      }
      reset() {
        (this._results = new Array()), (this._currentString = "");
      }
      append(e) {
        this._currentString += e;
      }
      flush() {
        this._currentString.length &&
          (this._results.push({ kind: Yp.Text, text: this._currentString }),
          (this._currentString = ""));
      }
      getLastProcessedChar() {
        return this._currentString.length
          ? this._currentString[this._currentString.length - 1]
          : null;
      }
      scanForEndOfWord(e, t) {
        const n = e.indexOf("\n", t + 1),
          r = e.indexOf(" ", t + 1);
        return n > -1 && r > -1
          ? Math.min(n, r)
          : n > -1
          ? n
          : r > -1
          ? r
          : e.length;
      }
      scanForEmoji(e, t) {
        const n = this.scanForEndOfWord(e, t),
          r = e.slice(t, n);
        if (!/^:.*?:$/.test(r)) return null;
        const i = this.emoji.get(r);
        return i
          ? (this.flush(),
            this._results.push({ kind: Yp.Emoji, text: r, path: i }),
            { nextIndex: n })
          : null;
      }
      scanForIssue(e, t, n) {
        let r = this.scanForEndOfWord(e, t),
          i = e.slice(t, r);
        if (
          (i.endsWith(")") && ((r -= 1), (i = e.slice(t, r))),
          i.endsWith(".") && ((r -= 1), (i = e.slice(t, r))),
          i.endsWith(",") && ((r -= 1), (i = e.slice(t, r))),
          !/^#\d+$/.test(i))
        )
          return null;
        this.flush();
        const o = parseInt(i.substr(1), 10);
        if (isNaN(o)) return null;
        const s = `${n.htmlURL}/issues/${o}`;
        return (
          this._results.push({ kind: Yp.Link, text: i, url: s }),
          { nextIndex: r }
        );
      }
      scanForMention(e, t, n) {
        const r = this.getLastProcessedChar();
        if (r && " " !== r) return null;
        let i = this.scanForEndOfWord(e, t),
          o = e.slice(t, i);
        if (
          ((o.endsWith("!") || o.endsWith(",")) &&
            ((i -= 1), (o = e.slice(t, i))),
          !/^@[a-zA-Z0-9\-]+$/.test(o))
        )
          return null;
        this.flush();
        const s = o.substr(1),
          a = `${mt(n.endpoint)}/${s}`;
        return (
          this._results.push({ kind: Yp.Link, text: o, url: a }),
          { nextIndex: i }
        );
      }
      scanForHyperlink(e, t, n) {
        const r = this.getLastProcessedChar();
        if (r && " " !== r) return null;
        const i = this.scanForEndOfWord(e, t),
          o = e.slice(t, i);
        if (!/^https?:\/\/.+/.test(o)) return null;
        if ((this.flush(), n && n.htmlURL)) {
          const e = n.htmlURL.toLowerCase();
          if (o.toLowerCase().startsWith(e + "/issues/")) {
            const e = /\/issues\/(\d+)/.exec(o);
            if (e) {
              const t = e[1];
              return (
                this._results.push({ kind: Yp.Link, url: o, text: "#" + t }),
                { nextIndex: i }
              );
            }
          }
        }
        return (
          this._results.push({ kind: Yp.Link, url: o, text: o }),
          { nextIndex: i }
        );
      }
      inspectAndMove(e, t, n) {
        const r = n();
        return r ? r.nextIndex : (this.append(e), t + 1);
      }
      tokenizeNonGitHubRepository(e) {
        let t = 0;
        for (; t < e.length; ) {
          const n = e[t];
          switch (n) {
            case ":":
              t = this.inspectAndMove(n, t, () => this.scanForEmoji(e, t));
              break;
            case "h":
              t = this.inspectAndMove(n, t, () => this.scanForHyperlink(e, t));
              break;
            default:
              this.append(n), t++;
          }
        }
        return this.flush(), this._results;
      }
      tokenizeGitHubRepository(e, t) {
        let n = 0;
        for (; n < e.length; ) {
          const r = e[n];
          switch (r) {
            case ":":
              n = this.inspectAndMove(r, n, () => this.scanForEmoji(e, n));
              break;
            case "#":
              n = this.inspectAndMove(r, n, () => this.scanForIssue(e, n, t));
              break;
            case "@":
              n = this.inspectAndMove(r, n, () => this.scanForMention(e, n, t));
              break;
            case "h":
              n = this.inspectAndMove(r, n, () =>
                this.scanForHyperlink(e, n, t)
              );
              break;
            default:
              this.append(r), n++;
          }
        }
        return this.flush(), this._results;
      }
      tokenize(e) {
        return (
          this.reset(),
          this.repository
            ? this.tokenizeGitHubRepository(e, this.repository)
            : this.tokenizeNonGitHubRepository(e)
        );
      }
    }
    function Zp(e, t, n, r) {
      const i = new Qp(e, t);
      return ("string" == typeof r ? i.tokenize(r) : r).map((e, t) => {
        switch (e.kind) {
          case Yp.Emoji:
            return w.createElement("img", {
              key: t,
              alt: e.text,
              className: "emoji",
              src: e.path,
            });
          case Yp.Link:
            return !1 !== n
              ? w.createElement(
                  _d,
                  { key: t, uri: e.url, title: e.url },
                  e.text
                )
              : w.createElement("span", { key: t }, e.text);
          case Yp.Text:
            return w.createElement("span", { key: t }, e.text);
          default:
            return X(0, "Unknown token type: " + e);
        }
      });
    }
    class Xp extends w.Component {
      constructor() {
        super(...arguments),
          (this.getElements = hi(Zp)),
          (this.getTitle = hi((e) =>
            "string" == typeof e ? e : e.map((e) => e.text).join("")
          ));
      }
      render() {
        const {
          emoji: e,
          repository: t,
          renderUrlsAsLinks: n,
          text: r,
        } = this.props;
        return 0 === r.length
          ? null
          : w.createElement(
              "div",
              { className: this.props.className, title: this.getTitle(r) },
              this.getElements(e, t, n, r)
            );
      }
    }
    class Jp extends w.Component {
      constructor(e) {
        super(e),
          (this.timer = null),
          (this.updateFromScheduler = () => {
            this.updateWithDate(this.props.date);
          }),
          (this.state = { absoluteText: "", relativeText: "" });
      }
      clearTimer() {
        this.timer && (window.clearTimeout(this.timer), (this.timer = null));
      }
      updateAndSchedule(e, t, n) {
        this.clearTimer(),
          (this.timer = window.setTimeout(
            this.updateFromScheduler,
            Math.min(n, 2147483647)
          )),
          this.setState({ absoluteText: e, relativeText: t });
      }
      updateWithDate(e) {
        const t = k()(e),
          n = k()(),
          r = t.diff(n),
          i = Math.abs(r),
          o = t.format("LLLL"),
          s =
            !0 === this.props.abbreviate
              ? k.a
                  .duration(i, "milliseconds")
                  .format("y[y] M[m] w[w] d[d] h[h] m[m]", { largest: 1 })
              : t.from(n);
        r > 0 && i > 6e4
          ? this.updateAndSchedule(o, t.format("lll"), i)
          : i < 6e4
          ? this.updateAndSchedule(o, "刚刚", 6e4 - i)
          : i < 36e5
          ? this.updateAndSchedule(o, s, 6e4)
          : i < 864e5
          ? this.updateAndSchedule(o, s, 36e5)
          : i < 6048e5
          ? this.updateAndSchedule(o, s, 216e5)
          : this.setState({ absoluteText: o, relativeText: t.format("ll") });
      }
      componentWillReceiveProps(e) {
        this.props.date !== e.date && this.updateWithDate(e.date);
      }
      componentWillMount() {
        this.updateWithDate(this.props.date);
      }
      componentWillUnmount() {
        this.clearTimer();
      }
      shouldComponentUpdate(e, t) {
        return (
          e.date !== this.props.date ||
          t.absoluteText !== this.state.absoluteText ||
          t.relativeText !== this.state.relativeText
        );
      }
      render() {
        return w.createElement(
          "span",
          { title: this.state.absoluteText },
          this.state.relativeText
        );
      }
    }
    class ef extends w.Component {
      render() {
        const e =
            this.props.isPushPullFetchInProgress || this.props.isCommitting,
          t = e
            ? "在更新存储库时，撤消将会被禁用"
            : void 0,
          n = this.props.commit.author.date;
        return w.createElement(
          "div",
          { id: "undo-commit", role: "group", "aria-label": "Undo commit" },
          w.createElement(
            "div",
            { className: "commit-info" },
            w.createElement(
              "div",
              { className: "ago" },
              "最近的提交 ",
              w.createElement(Jp, { date: n })
            ),
            w.createElement(Xp, {
              emoji: this.props.emoji,
              className: "summary",
              text: "提交摘要信息："+this.props.commit.summary,
              renderUrlsAsLinks: !1,
            })
          ),
          w.createElement(
            "div",
            { className: "actions", title: t },
            w.createElement(
              Ud,
              { size: "small", disabled: e, onClick: this.props.onUndo },
              "撤销"
            )
          )
        );
      }
    }
    async function tf(e, t) {
      if (!(await te.openExternal("file://" + e))) {
        const n = {
          name: "no-external-program",
          message: `无法在外部程序中打开文件${e}。请检查您是否有与此文件扩展名关联的程序`,
        };
        await t.postError(n);
      }
    }
    class nf extends w.Component {
      constructor(e) {
        super(e),
          (this.autocompletionProviders = null),
          (this.onCreateCommit = async (e) => {
            const { workingDirectory: t } = this.props.changes,
              n = await (async function (e, t, n) {
                const r = 1e6 * n,
                  o = new Array(),
                  s = t.files.filter(
                    (e) => e.selection.getSelectionType() !== Vi.None
                  );
                for (const t of s) {
                  const n = Object(i.join)(e.path, t.path);
                  try {
                    const e = await Object(_i.stat)(n);
                    e.size > r && o.push(t.path);
                  } catch (e) {
                    log.debug("Unable to get the file size for " + n, e);
                  }
                }
                return o;
              })(this.props.repository, t, 100),
              r = await (async function (e, t) {
                const n = new Array();
                for (const r of t) {
                  (await jl(e, r)) || n.push(r);
                }
                return n;
              })(this.props.repository, n);
            if (0 !== r.length)
              return (
                this.props.dispatcher.showPopup({
                  type: ao.OversizedFiles,
                  oversizedFiles: r,
                  context: e,
                  repository: this.props.repository,
                }),
                !1
              );
            0 ===
              t.files.filter(
                (e) =>
                  Gl(e.status) && e.selection.getSelectionType() === Vi.None
              ).length &&
              (this.props.dispatcher.clearBanner(),
              this.props.dispatcher.recordUnguidedConflictedMergeCompletion());
            const o = t.files.filter(
              (e) =>
                Gl(e.status) &&
                ql(e.status) &&
                e.selection.getSelectionType() !== Vi.None
            );
            return o.length > 0
              ? (this.props.dispatcher.showPopup({
                  type: ao.CommitConflictsWarning,
                  files: o,
                  repository: this.props.repository,
                  context: e,
                }),
                !1)
              : this.props.dispatcher.commitIncludedChanges(
                  this.props.repository,
                  e
                );
          }),
          (this.onFileSelectionChanged = (e) => {
            const t = e.map(
              (e) => this.props.changes.workingDirectory.files[e]
            );
            this.props.dispatcher.selectWorkingDirectoryFiles(
              this.props.repository,
              t
            );
          }),
          (this.onIncludeChanged = (e, t) => {
            const n = this.props.changes.workingDirectory.files.find(
              (t) => t.path === e
            );
            n
              ? this.props.dispatcher.changeFileIncluded(
                  this.props.repository,
                  n,
                  t
                )
              : console.error(
                  "unable to find working directory file to apply included change: " +
                    e
                );
          }),
          (this.onSelectAll = (e) => {
            this.props.dispatcher.changeIncludeAllFiles(
              this.props.repository,
              e
            );
          }),
          (this.onDiscardChanges = (e) => {
            this.props.askForConfirmationOnDiscardChanges
              ? this.props.dispatcher.showPopup({
                  type: ao.ConfirmDiscardChanges,
                  repository: this.props.repository,
                  files: [e],
                })
              : this.props.dispatcher.discardChanges(this.props.repository, [
                  e,
                ]);
          }),
          (this.onDiscardChangesFromFiles = (e, t) => {
            this.props.dispatcher.showPopup({
              type: ao.ConfirmDiscardChanges,
              repository: this.props.repository,
              showDiscardChangesSetting: !1,
              discardingAllChanges: t,
              files: e,
            });
          }),
          (this.onIgnore = (e) => {
            this.props.dispatcher.appendIgnoreRule(this.props.repository, e);
          }),
          (this.onOpenItem = (e) => {
            tf(i.join(this.props.repository.path, e), this.props.dispatcher);
          }),
          (this.onChangedItemClick = (e, t) => {
            "keyboard" === t.kind &&
              (e instanceof Array
                ? e.forEach((e) => this.onToggleInclude(e))
                : this.onToggleInclude(e));
          }),
          (this.onUndo = () => {
            const e = this.props.mostRecentLocalCommit;
            e &&
              0 === e.tags.length &&
              this.props.dispatcher.undoCommit(this.props.repository, e);
          }),
          (this.renderUndoCommit = (e) =>
            null !== e ? null : this.renderMostRecentLocalCommit()),
          this.receiveProps(e);
      }
      componentWillReceiveProps(e) {
        this.receiveProps(e);
      }
      receiveProps(e) {
        if (
          null === this.autocompletionProviders ||
          0 === this.props.emoji.size ||
          e.repository.hash !== this.props.repository.hash ||
          e.accounts !== this.props.accounts
        ) {
          const t = [new Jd(e.emoji)],
            { repository: n } = e,
            r = co(n) ? fo(n) : null;
          if (null !== r) {
            t.push(new tp(e.issuesStore, r, e.dispatcher));
            const n = this.props.accounts.find(
              (e) => e.endpoint === r.endpoint
            );
            t.push(new rp(e.gitHubUserStore, r, n));
          }
          this.autocompletionProviders = t;
        }
      }
      onToggleInclude(e) {
        const t = this.props.changes.workingDirectory.files[e];
        if (!t)
          return void console.error(
            "keyboard selection toggle despite no file - what?"
          );
        const n = t.selection.getSelectionType();
        this.props.dispatcher.changeFileIncluded(
          this.props.repository,
          t,
          n === Vi.None
        );
      }
      renderMostRecentLocalCommit() {
        const e = this.props.mostRecentLocalCommit;
        let t = null;
        return (
          e &&
            0 === e.tags.length &&
            (t = w.createElement(
              K,
              { classNames: "undo", appear: !0, timeout: 500 },
              w.createElement(ef, {
                isPushPullFetchInProgress: this.props.isPushPullFetchInProgress,
                commit: e,
                onUndo: this.onUndo,
                emoji: this.props.emoji,
                isCommitting: this.props.isCommitting,
              })
            )),
          w.createElement(O, null, t)
        );
      }
      render() {
        const {
          workingDirectory: e,
          commitMessage: t,
          showCoAuthoredBy: n,
          coAuthors: r,
          conflictState: i,
          selection: o,
          currentBranchProtected: s,
        } = this.props.changes;
        let a = null;
        null !== i && (a = Q(i) ? i : null);
        const l = o.kind === G.WorkingDirectory ? o.selectedFileIDs : [],
          c = o.kind === G.Stash;
        return w.createElement(
          "div",
          { className: "panel" },
          w.createElement(Kp, {
            dispatcher: this.props.dispatcher,
            repository: this.props.repository,
            workingDirectory: e,
            conflictState: i,
            rebaseConflictState: a,
            selectedFileIDs: l,
            onFileSelectionChanged: this.onFileSelectionChanged,
            onCreateCommit: this.onCreateCommit,
            onIncludeChanged: this.onIncludeChanged,
            onSelectAll: this.onSelectAll,
            onDiscardChanges: this.onDiscardChanges,
            askForConfirmationOnDiscardChanges: this.props
              .askForConfirmationOnDiscardChanges,
            onDiscardChangesFromFiles: this.onDiscardChangesFromFiles,
            onOpenItem: this.onOpenItem,
            onRowClick: this.onChangedItemClick,
            commitAuthor: this.props.commitAuthor,
            branch: this.props.branch,
            commitMessage: t,
            focusCommitMessage: this.props.focusCommitMessage,
            autocompletionProviders: this.autocompletionProviders,
            availableWidth: this.props.availableWidth,
            onIgnore: this.onIgnore,
            isCommitting: this.props.isCommitting,
            showCoAuthoredBy: n,
            coAuthors: r,
            externalEditorLabel: this.props.externalEditorLabel,
            onOpenInExternalEditor: this.props.onOpenInExternalEditor,
            onChangesListScrolled: this.props.onChangesListScrolled,
            changesListScrollTop: this.props.changesListScrollTop,
            stashEntry: this.props.changes.stashEntry,
            isShowingStashEntry: c,
            currentBranchProtected: s,
            shouldNudgeToCommit: this.props.shouldNudgeToCommit,
          }),
          this.renderUndoCommit(a)
        );
      }
    }
    class rf extends w.Component {
      constructor(e) {
        super(e),
          (this.onSelected = (e) => {
            this.props.onSelected(this.props.value, e);
          }),
          (this.state = { inputId: gh("RadioButton_" + this.props.value) });
      }
      componentWillUnmount() {
        yh(this.state.inputId);
      }
      render() {
        return w.createElement(
          "div",
          { className: "radio-button-component" },
          w.createElement("input", {
            type: "radio",
            id: this.state.inputId,
            value: this.props.value,
            checked: this.props.checked,
            onChange: this.onSelected,
          }),
          w.createElement(
            "label",
            { htmlFor: this.state.inputId },
            this.props.label
          )
        );
      }
    }
    var of = n(136),
      sf = n.n(of);
    class af extends w.Component {
      constructor(e) {
        super(e),
          (this.diffOptionsRef = w.createRef()),
          (this.onTogglePopover = (e) => {
            e.preventDefault(),
              this.state.isOpen ? this.closePopover() : this.openPopover();
          }),
          (this.openPopover = () => {
            this.setState((e) =>
              e.isOpen
                ? null
                : (document.addEventListener(
                    "mousedown",
                    this.onDocumentMouseDown
                  ),
                  this.props.onDiffOptionsOpened(),
                  { isOpen: !0 })
            );
          }),
          (this.closePopover = () => {
            this.setState((e) =>
              e.isOpen
                ? (this.state.showNewCallout &&
                    be("has-seen-split-diff-option", !0),
                  document.removeEventListener(
                    "mousedown",
                    this.onDocumentMouseDown
                  ),
                  { isOpen: !1, showNewCallout: !1 })
                : null
            );
          }),
          (this.onDocumentMouseDown = (e) => {
            const { current: t } = this.diffOptionsRef,
              { target: n } = e;
            null !== t &&
              n instanceof Node &&
              !t.contains(n) &&
              this.closePopover();
          }),
          (this.onHideWhitespaceChangesChanged = (e) => {
            void 0 !== this.props.onHideWhitespaceChangesChanged &&
              this.props.onHideWhitespaceChangesChanged(
                e.currentTarget.checked
              );
          }),
          (this.onUnifiedSelected = () => {
            this.props.onShowSideBySideDiffChanged(!1);
          }),
          (this.onSideBySideSelected = () => {
            this.props.onShowSideBySideDiffChanged(!0);
          }),
          (this.state = {
            isOpen: !1,
            showNewCallout: !0 !== we("has-seen-split-diff-option"),
          }),
          (this.focusTrapOptions = {
            allowOutsideClick: !0,
            escapeDeactivates: !0,
            onDeactivate: this.closePopover,
          });
      }
      componentWillUnmount() {
        document.removeEventListener("mousedown", this.onDocumentMouseDown);
      }
      render() {
        return w.createElement(
          "div",
          { className: "diff-options-component", ref: this.diffOptionsRef },
          w.createElement(
            "button",
            { onClick: this.onTogglePopover },
            w.createElement(vh, { symbol: wh.gear }),
            w.createElement(vh, { symbol: wh.triangleDown }),
            this.state.showNewCallout &&
              w.createElement(
                "div",
                { className: "call-to-action-bubble" },
                "New"
              )
          ),
          this.state.isOpen && this.renderPopover()
        );
      }
      renderPopover() {
        return w.createElement(
          sf.a,
          { active: !0, focusTrapOptions: this.focusTrapOptions },
          w.createElement(
            "div",
            { className: "popover" },
            this.renderHideWhitespaceChanges(),
            this.renderShowSideBySide()
          )
        );
      }
      renderShowSideBySide() {
        return w.createElement(
          "section",
          null,
          w.createElement("h3", null, "差异显示"),
          w.createElement(rf, {
            value: "Unified",
            checked: !this.props.showSideBySideDiff,
            label: "同一界面显示",
            onSelected: this.onUnifiedSelected,
          }),
          w.createElement(rf, {
            value: "Split",
            checked: this.props.showSideBySideDiff,
            label: w.createElement(
              w.Fragment,
              null,
              w.createElement("div", null, "分开显示"),
              w.createElement(
                "div",
                { className: "call-to-action-bubble" },
                "Beta"
              )
            ),
            onSelected: this.onSideBySideSelected,
          })
        );
      }
      renderHideWhitespaceChanges() {
        return void 0 === this.props.hideWhitespaceChanges
          ? null
          : w.createElement(
              "section",
              null,
              w.createElement("h3", null, "空格"),
              w.createElement(qd, {
                value: this.props.hideWhitespaceChanges ? $d.On : $d.Off,
                onChange: this.onHideWhitespaceChangesChanged,
                label: "隐藏空格的更改",
              })
            );
      }
    }
    class lf extends w.Component {
      render() {
        const e = this.props.status,
          t = Vl(e);
        return w.createElement(
          "div",
          { className: "header" },
          w.createElement(Wp, {
            path: this.props.path,
            status: this.props.status,
          }),
          this.renderDecorator(),
          w.createElement(af, {
            onShowSideBySideDiffChanged: this.props.onShowSideBySideDiffChanged,
            showSideBySideDiff: this.props.showSideBySideDiff,
            onDiffOptionsOpened: this.props.onDiffOptionsOpened,
          }),
          w.createElement(vh, {
            symbol: Sh(e),
            className: "status status-" + t.toLowerCase(),
            title: t,
          })
        );
      }
      renderDecorator() {
        const e = this.props.diff;
        if (null === e) return null;
        if (e.kind === Wi.Text && e.lineEndingsChange) {
          const t = `Warning: line endings will be changed from '${e.lineEndingsChange.from}' to '${e.lineEndingsChange.to}'.`;
          return w.createElement(vh, {
            symbol: wh.alert,
            className: "line-endings",
            title: t,
          });
        }
        return null;
      }
    }
    var cf;
    !(function (e) {
      (e[(e.Tabs = 0)] = "Tabs"),
        (e[(e.Switch = 1)] = "Switch"),
        (e[(e.Vertical = 2)] = "Vertical");
    })(cf || (cf = {}));
    class uf extends w.Component {
      constructor() {
        super(...arguments),
          (this.tabRefsByIndex = new Map()),
          (this.onSelectAdjacentTab = (e, t) => {
            const n = w.Children.toArray(this.props.children);
            if (0 === n.length) return;
            const r = (t + ("next" === e ? 1 : -1) + n.length) % n.length,
              i = this.tabRefsByIndex.get(r);
            i && i.focus(), this.props.onTabClicked(r);
          }),
          (this.onTabClicked = (e) => {
            this.props.onTabClicked(e);
          }),
          (this.onTabRef = (e, t) => {
            t ? this.tabRefsByIndex.set(e, t) : this.tabRefsByIndex.delete(e);
          });
      }
      render() {
        const { type: e } = this.props;
        return w.createElement(
          "div",
          {
            className:
              "tab-bar " +
              (e === cf.Switch
                ? "switch"
                : e === cf.Vertical
                ? "vertical"
                : "tabs"),
            role: "tablist",
          },
          this.renderItems()
        );
      }
      renderItems() {
        return w.Children.toArray(this.props.children).map((e, t) => {
          const n = t === this.props.selectedIndex;
          return w.createElement(
            hf,
            {
              key: t,
              selected: n,
              index: t,
              onClick: this.onTabClicked,
              onSelectAdjacent: this.onSelectAdjacentTab,
              onButtonRef: this.onTabRef,
              type: this.props.type,
            },
            e
          );
        });
      }
    }
    class hf extends w.Component {
      constructor() {
        super(...arguments),
          (this.onClick = (e) => {
            this.props.onClick(this.props.index);
          }),
          (this.onKeyDown = (e) => {
            const { type: t, index: n } = this.props,
              r = t === cf.Vertical ? "ArrowUp" : "ArrowLeft",
              i = t === cf.Vertical ? "ArrowDown" : "ArrowRight";
            e.key === r
              ? (this.props.onSelectAdjacent("previous", n), e.preventDefault())
              : e.key === i &&
                (this.props.onSelectAdjacent("next", n), e.preventDefault());
          }),
          (this.onButtonRef = (e) => {
            this.props.onButtonRef(this.props.index, e);
          });
      }
      render() {
        const e = this.props.selected,
          t = ph()("tab-bar-item", { selected: e });
        return w.createElement(
          "button",
          {
            ref: this.onButtonRef,
            className: t,
            onClick: this.onClick,
            role: "tab",
            "aria-selected": e,
            tabIndex: e ? void 0 : -1,
            onKeyDown: this.onKeyDown,
            type: "button",
          },
          this.props.children
        );
      }
    }
    class df extends w.Component {
      constructor() {
        super(...arguments),
          (this.onLoad = (e) => {
            this.props.onElementLoad &&
              this.props.onElementLoad(e.currentTarget);
          });
      }
      render() {
        const e = this.props.image,
          t = `data:${e.mediaType};base64,${e.contents}`;
        return w.createElement(
          "div",
          { className: "image-wrapper" },
          w.createElement("img", {
            src: t,
            style: this.props.style,
            onLoad: this.onLoad,
          })
        );
      }
    }
    class pf extends w.Component {
      render() {
        const e = { width: 0, height: 0 },
          t = this.props.previousImageSize || e,
          n = this.props.currentImageSize || e,
          { current: r, previous: i } = this.props,
          o = (function (e, t) {
            return Math.abs(Math.round((t / e) * 100)) + "%";
          })(i.bytes, r.bytes),
          s = r.bytes - i.bytes,
          a = s >= 0 ? "+" : "",
          l = { maxWidth: this.props.maxSize.width };
        return w.createElement(
          "div",
          { className: "image-diff-container", ref: this.props.onContainerRef },
          w.createElement(
            "div",
            { className: "image-diff-two-up" },
            w.createElement(
              "div",
              { className: "image-diff-previous", style: l },
              w.createElement(
                "div",
                { className: "image-diff-header" },
                "Deleted"
              ),
              w.createElement(df, {
                image: i,
                onElementLoad: this.props.onPreviousImageLoad,
              }),
              w.createElement(
                "div",
                { className: "image-diff-footer" },
                w.createElement("span", { className: "strong" }, "W:"),
                " ",
                t.width,
                "px | ",
                w.createElement("span", { className: "strong" }, "H:"),
                " ",
                t.height,
                "px | ",
                w.createElement("span", { className: "strong" }, "Size:"),
                " ",
                ga(i.bytes, 2, !1)
              )
            ),
            w.createElement(
              "div",
              { className: "image-diff-current", style: l },
              w.createElement(
                "div",
                { className: "image-diff-header" },
                "Added"
              ),
              w.createElement(df, {
                image: r,
                onElementLoad: this.props.onCurrentImageLoad,
              }),
              w.createElement(
                "div",
                { className: "image-diff-footer" },
                w.createElement("span", { className: "strong" }, "W:"),
                " ",
                n.width,
                "px | ",
                w.createElement("span", { className: "strong" }, "H:"),
                " ",
                n.height,
                "px | ",
                w.createElement("span", { className: "strong" }, "Size:"),
                " ",
                ga(r.bytes, 2, !1)
              )
            )
          ),
          w.createElement(
            "div",
            { className: "image-diff-summary" },
            "Diff:",
            " ",
            w.createElement(
              "span",
              { className: ph()({ added: s > 0, removed: s < 0 }) },
              0 !== s ? `${a}${ga(s, 2, !1)} (${o})` : "No size difference"
            )
          )
        );
      }
    }
    class ff extends w.Component {
      render() {
        const e = {
            height: this.props.maxSize.height,
            width: this.props.maxSize.width,
          },
          t = {
            maxHeight: this.props.maxSize.height,
            maxWidth: this.props.maxSize.width,
          };
        return w.createElement(
          "div",
          {
            className: "image-diff-difference",
            ref: this.props.onContainerRef,
          },
          w.createElement(
            "div",
            { className: "sizing-container" },
            w.createElement(
              "div",
              { className: "image-container", style: e },
              w.createElement(
                "div",
                { className: "image-diff-previous" },
                w.createElement(df, {
                  image: this.props.previous,
                  onElementLoad: this.props.onPreviousImageLoad,
                  style: t,
                })
              ),
              w.createElement(
                "div",
                { className: "image-diff-current" },
                w.createElement(df, {
                  image: this.props.current,
                  onElementLoad: this.props.onCurrentImageLoad,
                  style: Object.assign(Object.assign({}, t), {
                    mixBlendMode: "difference",
                  }),
                })
              )
            )
          )
        );
      }
    }
    class mf extends w.Component {
      constructor(e) {
        super(e),
          (this.onValueChange = (e) => {
            this.setState({ crossfade: e.currentTarget.valueAsNumber });
          }),
          (this.state = { crossfade: 1 });
      }
      render() {
        const e = {
            height: this.props.maxSize.height,
            width: this.props.maxSize.width,
          },
          t = {
            maxHeight: this.props.maxSize.height,
            maxWidth: this.props.maxSize.width,
          };
        return w.createElement(
          "div",
          { className: "image-diff-onion-skin" },
          w.createElement(
            "div",
            { className: "sizing-container", ref: this.props.onContainerRef },
            w.createElement(
              "div",
              { className: "image-container", style: e },
              w.createElement(
                "div",
                { className: "image-diff-previous", style: e },
                w.createElement(df, {
                  image: this.props.previous,
                  onElementLoad: this.props.onPreviousImageLoad,
                  style: t,
                })
              ),
              w.createElement(
                "div",
                {
                  className: "image-diff-current",
                  style: Object.assign(Object.assign({}, e), {
                    opacity: this.state.crossfade,
                  }),
                },
                w.createElement(df, {
                  image: this.props.current,
                  onElementLoad: this.props.onCurrentImageLoad,
                  style: t,
                })
              )
            )
          ),
          w.createElement("input", {
            style: { width: this.props.maxSize.width / 2 },
            className: "slider",
            type: "range",
            max: 1,
            min: 0,
            value: this.state.crossfade,
            step: 0.001,
            onChange: this.onValueChange,
          })
        );
      }
    }
    class gf extends w.Component {
      constructor(e) {
        super(e),
          (this.onValueChange = (e) => {
            const t = e.currentTarget.valueAsNumber;
            this.setState({ percentage: t });
          }),
          (this.state = { percentage: 0 });
      }
      render() {
        const e = {
            height: this.props.maxSize.height,
            width: this.props.maxSize.width,
          },
          t = this.props.maxSize.width * (1 - this.state.percentage),
          n = {
            height: this.props.maxSize.height,
            width: this.props.maxSize.width,
            left: -(this.props.maxSize.width - t),
          },
          r = {
            maxHeight: this.props.maxSize.height,
            maxWidth: this.props.maxSize.width,
          };
        return w.createElement(
          "div",
          { className: "image-diff-swipe" },
          w.createElement(
            "div",
            { className: "sizing-container", ref: this.props.onContainerRef },
            w.createElement(
              "div",
              { className: "image-container", style: e },
              w.createElement(
                "div",
                { className: "image-diff-previous", style: e },
                w.createElement(df, {
                  image: this.props.previous,
                  onElementLoad: this.props.onPreviousImageLoad,
                  style: r,
                })
              ),
              w.createElement(
                "div",
                {
                  className: "swiper",
                  style: { width: t, height: this.props.maxSize.height },
                },
                w.createElement(
                  "div",
                  { className: "image-diff-current", style: n },
                  w.createElement(df, {
                    image: this.props.current,
                    onElementLoad: this.props.onCurrentImageLoad,
                    style: r,
                  })
                )
              )
            )
          ),
          w.createElement("input", {
            style: { width: this.props.maxSize.width + 14 },
            className: "slider",
            type: "range",
            max: 1,
            min: 0,
            value: this.state.percentage,
            step: 0.001,
            onChange: this.onValueChange,
          })
        );
      }
    }
    function yf(e, t) {
      const n = t.height < e.height ? e.height / t.height : 1,
        r = t.width < e.width ? e.width / t.width : 1;
      let i = Math.max(1, r);
      return (
        r < n && (i = Math.max(1, n)),
        { width: e.width / i, height: e.height / i }
      );
    }
    class vf extends w.Component {
      constructor(e) {
        super(e),
          (this.container = null),
          (this.resizedTimeoutID = null),
          (this.onPreviousImageLoad = (e) => {
            const t = { width: e.naturalWidth, height: e.naturalHeight };
            this.setState({ previousImageSize: t });
          }),
          (this.onCurrentImageLoad = (e) => {
            const t = { width: e.naturalWidth, height: e.naturalHeight };
            this.setState({ currentImageSize: t });
          }),
          (this.onResized = (e, t) => {
            this.resizedTimeoutID = null;
            const n = { width: e.offsetWidth, height: e.offsetHeight };
            this.setState({ containerSize: n });
          }),
          (this.onContainerRef = (e) => {
            (this.container = e),
              this.resizeObserver.disconnect(),
              e && this.resizeObserver.observe(e);
          }),
          (this.resizeObserver = new ResizeObserver((e) => {
            for (const t of e)
              t.target === this.container &&
                (null !== this.resizedTimeoutID &&
                  clearImmediate(this.resizedTimeoutID),
                (this.resizedTimeoutID = setImmediate(
                  this.onResized,
                  t.target,
                  t.contentRect
                )));
          })),
          (this.state = {
            previousImageSize: null,
            currentImageSize: null,
            containerSize: null,
          });
      }
      getMaxSize() {
        const e = { width: 0, height: 0, containerWidth: 0 },
          t = this.state.containerSize;
        if (!t) return e;
        const { previousImageSize: n, currentImageSize: r } = this.state;
        if (!n || !r) return e;
        return (function (e, t, n) {
          const r = yf(e, n),
            i = yf(t, n);
          return {
            width: Math.max(r.width, i.width),
            height: Math.max(r.height, i.height),
          };
        })(n, r, t);
      }
      render() {
        return w.createElement(
          "div",
          { className: "panel image", id: "diff" },
          this.renderCurrentDiffType(),
          w.createElement(
            uf,
            {
              selectedIndex: this.props.diffType,
              onTabClicked: this.props.onChangeDiffType,
              type: cf.Switch,
            },
            w.createElement("span", null, "2-up"),
            w.createElement("span", null, "Swipe"),
            w.createElement("span", null, "Onion Skin"),
            w.createElement("span", null, "Difference")
          )
        );
      }
      renderCurrentDiffType() {
        const e = this.getMaxSize(),
          t = this.props.diffType;
        switch (t) {
          case Gi.TwoUp:
            return w.createElement(
              pf,
              Object.assign({}, this.getCommonProps(e), {
                previousImageSize: this.state.previousImageSize,
                currentImageSize: this.state.currentImageSize,
              })
            );
          case Gi.Swipe:
            return w.createElement(
              gf,
              Object.assign({}, this.getCommonProps(e))
            );
          case Gi.OnionSkin:
            return w.createElement(
              mf,
              Object.assign({}, this.getCommonProps(e))
            );
          case Gi.Difference:
            return w.createElement(
              ff,
              Object.assign({}, this.getCommonProps(e))
            );
          default:
            return X(0, "Unknown diff type: " + t);
        }
      }
      getCommonProps(e) {
        return {
          maxSize: e,
          previous: this.props.previous,
          current: this.props.current,
          onPreviousImageLoad: this.onPreviousImageLoad,
          onCurrentImageLoad: this.onCurrentImageLoad,
          onContainerRef: this.onContainerRef,
        };
      }
    }
    class wf extends w.Component {
      render() {
        return w.createElement(
          "div",
          { className: "panel image", id: "diff" },
          w.createElement(
            "div",
            { className: "image-diff-current" },
            w.createElement("div", { className: "image-diff-header" }, "Added"),
            w.createElement(df, { image: this.props.current })
          )
        );
      }
    }
    class bf extends w.Component {
      render() {
        return w.createElement(
          "div",
          { className: "panel image", id: "diff" },
          w.createElement(
            "div",
            { className: "image-diff-previous" },
            w.createElement(
              "div",
              { className: "image-diff-header" },
              "Deleted"
            ),
            w.createElement(df, { image: this.props.previous })
          )
        );
      }
    }
    class Sf extends w.Component {
      constructor() {
        super(...arguments),
          (this.open = () => {
            const e = i.join(this.props.repository.path, this.props.path);
            this.props.onOpenBinaryFile(e);
          });
      }
      render() {
        return w.createElement(
          "div",
          { className: "panel binary", id: "diff" },
          w.createElement(
            "div",
            { className: "image-header" },
            "This binary file has changed."
          ),
          w.createElement(
            "div",
            { className: "image-header" },
            w.createElement(
              _d,
              { onClick: this.open },
              "Open file in external program."
            )
          )
        );
      }
    }
    var Cf;
    function Ef(e, t) {
      return (
        e.find((e) => t >= e.unifiedDiffStart && t <= e.unifiedDiffEnd) || null
      );
    }
    function kf(e, t) {
      const n = Ef(e, t);
      return (n && n.lines[t - n.unifiedDiffStart]) || null;
    }
    function xf(e, t) {
      let n = 0;
      for (const r of t) {
        const t = r.lines.indexOf(e);
        if (t > -1) return t + n;
        n += r.lines.length;
      }
      return -1;
    }
    function Rf(e, t) {
      const n = Ef(e, t);
      if (!n) return null;
      const r = t - n.unifiedDiffStart;
      let i = Tf(null, n.lines[r]),
        o = null;
      for (let e = r - 1; e >= 0; e--) {
        const t = n.lines[e];
        if (!t.isIncludeableLine()) {
          const t = e + 1;
          o = n.unifiedDiffStart + t;
          break;
        }
        i = Tf(i, t);
      }
      const s = null !== o ? o : n.unifiedDiffStart + 1;
      let a = null;
      for (let e = r + 1; e < n.lines.length; e++) {
        const t = n.lines[e];
        if (!t.isIncludeableLine()) {
          const t = e - 1;
          a = n.unifiedDiffStart + t;
          break;
        }
        i = Tf(i, t);
      }
      return { from: s, to: null !== a ? a : n.unifiedDiffEnd, type: i };
    }
    function Tf(e, t) {
      return t.type !== ji.Add && t.type !== ji.Delete
        ? e
        : null === e
        ? t.type === ji.Add
          ? Cf.Additions
          : Cf.Deletions
        : e === Cf.Mixed
        ? e
        : (t.type === ji.Add && e !== Cf.Additions) ||
          (t.type === ji.Delete && e !== Cf.Deletions)
        ? Cf.Mixed
        : e;
    }
    !(function (e) {
      (e[(e.Additions = 0)] = "Additions"),
        (e[(e.Deletions = 1)] = "Deletions"),
        (e[(e.Mixed = 2)] = "Mixed");
    })(Cf || (Cf = {}));
    n(286);
    const Df = {
      "+": "diff-add",
      "-": "diff-delete",
      "@": "diff-hunk",
      " ": "diff-context",
    };
    function Af(e, t) {
      return e.skipToEnd(), t.diffLineIndex++, null;
    }
    function _f(e, t) {
      return void 0 !== t && null !== e && void 0 !== t[e - 1]
        ? t[e - 1]
        : null;
    }
    class Mf {
      constructor(e, t, n) {
        (this.token = (e, t) => {
          if (e.sol()) {
            const n = e.next();
            e.eol() && t.diffLineIndex++;
            const r = n ? Df[n] : null;
            return r ? `line-${r} line-background-${r}` : null;
          }
          if (null == this.hunks) return Af(e, t);
          const n = kf(this.hunks, t.diffLineIndex);
          if (!n) return Af(e, t);
          const r = (function (e, t, n) {
            const r = _f(e.oldLineNumber, t);
            return null !== r ? r : _f(e.newLineNumber, n);
          })(n, this.oldTokens, this.newTokens);
          if (!r) return Af(e, t);
          const i = r[e.pos - e.lineStart - 1];
          if (i) e.pos += i.length;
          else
            do {
              e.pos++;
            } while (!e.eol() && !r[e.pos - e.lineStart - 1]);
          return e.eol() && t.diffLineIndex++, i ? i.token : null;
        }),
          (this.hunks = e),
          (this.oldTokens = t),
          (this.newTokens = n);
      }
      startState() {
        return { diffLineIndex: 0 };
      }
      blankLine(e) {
        e.diffLineIndex++;
      }
    }
    (Mf.ModeName = "github-diff-syntax"),
      up.defineMode(Mf.ModeName, function (e, t) {
        if (!t) throw new Error("I needs me some options");
        return new Mf(t.hunks, t.oldTokens, t.newTokens);
      });
    n(287), n(288), n(289);
    class Pf extends w.Component {
      constructor(e) {
        super(e),
          (this.wrapper = null),
          (this.codeMirror = null),
          (this.resizeDebounceId = null),
          (this.lastKnownWidth = null),
          (this.onSwapDoc = (e, t) => {
            this.props.onSwapDoc && this.props.onSwapDoc(e, t);
          }),
          (this.onContextMenu = (e, t) => {
            this.props.onContextMenu && this.props.onContextMenu(e, t);
          }),
          (this.onCopy = (e, t) => {
            this.props.onCopy && this.props.onCopy(e, t);
          }),
          (this.beforeSelectionChanged = (e, t) => {
            this.props.isSelectionEnabled &&
              (this.props.isSelectionEnabled() ||
                t.update([
                  { head: { line: 0, ch: 0 }, anchor: { line: 0, ch: 0 } },
                ]));
          }),
          (this.onChanges = (e, t) => {
            this.props.onChanges && this.props.onChanges(e, t);
          }),
          (this.onViewportChange = (e, t, n) => {
            this.props.onViewportChange && this.props.onViewportChange(e, t, n);
          }),
          (this.onRenderLine = (e, t, n) => {
            this.props.onRenderLine && this.props.onRenderLine(e, t, n);
          }),
          (this.onResized = () => {
            (this.resizeDebounceId = null),
              this.codeMirror && this.codeMirror.refresh();
          }),
          (this.onRef = (e) => {
            this.wrapper = e;
          }),
          (this.resizeObserver = new ResizeObserver((e) => {
            if (1 === e.length && this.codeMirror) {
              const t = e[0].contentRect.width;
              null === this.lastKnownWidth
                ? (this.lastKnownWidth = t)
                : this.lastKnownWidth !== t &&
                  ((this.lastKnownWidth = t),
                  null !== this.resizeDebounceId &&
                    (cancelAnimationFrame(this.resizeDebounceId),
                    (this.resizeDebounceId = null)),
                  (this.resizeDebounceId = requestAnimationFrame(
                    this.onResized
                  )));
            }
          }));
      }
      static updateDoc(e, t) {
        "string" == typeof t
          ? e.setValue(t)
          : (!(function (e) {
              if (e.state && e.state.selectingText instanceof Function)
                try {
                  e.state.selectingText(new CustomEvent("fake-event"));
                } catch (e) {
                  log.info("Unable to cancel CodeMirror selection", e);
                }
            })(e),
            e.swapDoc(t));
      }
      getEditor() {
        return this.codeMirror;
      }
      componentDidMount() {
        (this.codeMirror = hp()(this.wrapper, this.props.options)),
          this.codeMirror.on("renderLine", this.onRenderLine),
          this.codeMirror.on("changes", this.onChanges),
          this.codeMirror.on("viewportChange", this.onViewportChange),
          this.codeMirror.on(
            "beforeSelectionChange",
            this.beforeSelectionChanged
          ),
          this.codeMirror.on("copy", this.onCopy),
          this.codeMirror.on("contextmenu", this.onContextMenu),
          this.codeMirror.on("swapDoc", this.onSwapDoc),
          Pf.updateDoc(this.codeMirror, this.props.value),
          this.resizeObserver.observe(this.codeMirror.getWrapperElement());
      }
      componentWillUnmount() {
        const e = this.codeMirror;
        e &&
          (e.off("changes", this.onChanges),
          e.off("viewportChange", this.onViewportChange),
          e.off("renderLine", this.onRenderLine),
          e.off("beforeSelectionChange", this.beforeSelectionChanged),
          e.off("copy", this.onCopy),
          e.off("swapDoc", this.onSwapDoc),
          (this.codeMirror = null)),
          this.resizeObserver.disconnect();
      }
      componentDidUpdate(e) {
        if (this.codeMirror && this.props.value !== e.value) {
          const e = this.codeMirror.getDoc();
          Pf.updateDoc(this.codeMirror, this.props.value);
          const t = this.codeMirror.getDoc();
          this.props.onAfterSwapDoc &&
            this.props.onAfterSwapDoc(this.codeMirror, e, t);
        }
      }
      render() {
        return w.createElement("div", {
          className: this.props.className,
          ref: this.onRef,
        });
      }
    }
    const If = new Array(),
      Of = _c(__dirname, "highlighter.js");
    function Lf(e, t, n, r, i) {
      if (!e.length || !i.length) return Promise.resolve({});
      const o = If.shift() || new Worker(Of);
      return new Promise((s, a) => {
        let l = null;
        const c = () => {
          l && (window.clearTimeout(l), (l = null));
        };
        (o.onerror = (e) => {
          c(), o.terminate(), a(e.error || new Error(e.message));
        }),
          (o.onmessage = (e) => {
            c(), If.length < 2 ? If.push(o) : o.terminate(), s(e.data);
          });
        const u = {
          contents: e,
          basename: t,
          extension: n,
          tabSize: r,
          lines: i,
          addModeClass: !0,
        };
        o.postMessage(u),
          (l = window.setTimeout(() => {
            o.terminate(), a(new Error("timed out"));
          }, 5e3));
      });
    }
    async function Ff(e, t) {
      return t.status.kind === io.Deleted
        ? Buffer.alloc(0)
        : t instanceof bo
        ? (async function (e, t, n) {
            return await new Promise((r, i) => {
              const o = new Array();
              let s = 0;
              _i.createReadStream(e, { start: t, end: n })
                .on("data", (e) => {
                  o.push(e), (s += e.length);
                })
                .on("error", i)
                .on("end", () => r(Buffer.concat(o, s)));
            });
          })(i.join(e.path, t.path), 0, 262143)
        : t instanceof So
        ? ms(e, t.commitish, t.path, 262144)
        : X(0, "Unknown file change type");
    }
    async function Nf(e, t, n) {
      const r = n.oldLineFilter.length
          ? (async function (e, t) {
              if (t.status.kind === io.New || t.status.kind === io.Untracked)
                return Buffer.alloc(0);
              let n;
              if (t instanceof bo) n = "HEAD";
              else {
                if (!(t instanceof So)) return X(0, "Unknown file change type");
                n = t.commitish + "^";
              }
              return ms(e, n, ws(t), 262144);
            })(e, t)
          : Promise.resolve(Buffer.alloc(0)),
        i = n.newLineFilter.length
          ? Ff(e, t)
          : Promise.resolve(Buffer.alloc(0)),
        [o, s] = await Promise.all([
          r.catch(
            (e) => (
              log.error(
                "Could not load old contents for syntax highlighting",
                e
              ),
              Buffer.alloc(0)
            )
          ),
          i.catch(
            (e) => (
              log.error(
                "Could not load new contents for syntax highlighting",
                e
              ),
              Buffer.alloc(0)
            )
          ),
        ]);
      return { file: t, oldContents: o, newContents: s };
    }
    function Bf(e) {
      const t = new Array(),
        n = new Array(),
        r = new Array();
      let i = !1,
        o = !1;
      for (const t of e)
        for (const e of t.lines)
          (i = i || e.type === ji.Add),
            (o = o || e.type === ji.Delete),
            r.push(e);
      for (const e of r)
        null !== e.oldLineNumber && null !== e.newLineNumber
          ? i && !o
            ? n.push(e.newLineNumber - 1)
            : t.push(e.oldLineNumber - 1)
          : null !== e.oldLineNumber
          ? t.push(e.oldLineNumber - 1)
          : null !== e.newLineNumber && n.push(e.newLineNumber - 1);
      return { oldLineFilter: t, newLineFilter: n };
    }
    async function Hf(e, t, n) {
      const { file: r, oldContents: o, newContents: s } = e,
        a = ws(r),
        [l, c] = await Promise.all([
          Lf(
            o.toString("utf8"),
            i.basename(a),
            i.extname(a),
            t,
            n.oldLineFilter
          ).catch(
            (e) => (
              log.error("Highlighter worked failed for old contents", e), {}
            )
          ),
          Lf(
            s.toString("utf8"),
            i.basename(r.path),
            i.extname(r.path),
            t,
            n.newLineFilter
          ).catch(
            (e) => (
              log.error("Highlighter worked failed for new contents", e), {}
            )
          ),
        ]);
      return { oldTokens: l, newTokens: c };
    }
    function zf(e) {
      return e.location + e.length;
    }
    function Uf(e, t, n, r, i) {
      const o = Math.min(t.length, r.length),
        s = i ? zf(t) - 1 : t.location,
        a = i ? zf(r) - 1 : r.location,
        l = i ? -1 : 1;
      let c = 0;
      for (; Math.abs(c) < o && e[s + c] === n[a + c]; ) c += l;
      return Math.abs(c);
    }
    function Wf(e, t) {
      let n = { location: 0, length: t.length },
        r = { location: 0, length: e.length };
      const i = Uf(t, n, e, r, !1);
      (n = { location: n.location + i, length: n.length - i }),
        (r = { location: r.location + i, length: r.length - i });
      const o = Uf(t, n, e, r, !0);
      return (
        (n.length -= o), (r.length -= o), { stringARange: r, stringBRange: n }
      );
    }
    var jf, Vf;
    function Gf(e, t) {
      const n = Wf(e, t);
      return {
        before: {
          [n.stringARange.location]: {
            token: "diff-delete-inner",
            length: n.stringARange.length,
          },
        },
        after: {
          [n.stringBRange.location]: {
            token: "diff-add-inner",
            length: n.stringBRange.length,
          },
        },
      };
    }
    function $f(e) {
      return e instanceof bo;
    }
    !(function (e) {
      (e.Context = "Context"),
        (e.Hunk = "Hunk"),
        (e.Added = "Added"),
        (e.Deleted = "Deleted"),
        (e.Modified = "Modified");
    })(jf || (jf = {})),
      (function (e) {
        (e.Before = "before"), (e.After = "after");
      })(Vf || (Vf = {}));
    const qf = new wh(
      16,
      8,
      "m 16,1 0,3 c 0,0.55 -0.45,1 -1,1 l -3,0 0,2 -3,-3 3,-3 0,2 2,0 0,-2 2,0 z M 8,4 C 8,6.2 6.2,8 4,8 1.8,8 0,6.2 0,4 0,1.8 1.8,0 4,0 6.2,0 8,1.8 8,4 Z M 1.5,5.66 5.66,1.5 C 5.18,1.19 4.61,1 4,1 2.34,1 1,2.34 1,4 1,4.61 1.19,5.17 1.5,5.66 Z M 7,4 C 7,3.39 6.81,2.83 6.5,2.34 L 2.34,6.5 C 2.82,6.81 3.39,7 4,7 5.66,7 7,5.66 7,4 Z"
    );
    function Kf(e, t) {
      return (
        e === t || (e.file.id === t.file.id && e.diff.text === t.diff.text)
      );
    }
    function Yf() {
      const e = document.createElement("span"),
        t = Je(),
        { w: n, h: r, d: i } = qf,
        o = "http://www.w3.org/2000/svg",
        s = document.createElementNS(o, "svg");
      s.setAttribute("version", "1.1"),
        s.setAttribute("viewBox", `0 0 ${n} ${r}`),
        s.setAttribute("role", "img"),
        s.setAttribute("aria-labelledby", t),
        s.classList.add("no-newline");
      const a = document.createElementNS(o, "title");
      a.setAttribute("id", t),
        a.setAttribute("lang", "en"),
        (a.textContent = "No newline at end of file"),
        s.appendChild(a);
      const l = document.createElementNS(o, "path");
      return (
        l.setAttribute("role", "presentation"),
        l.setAttribute("d", i),
        (l.textContent = "No newline at end of file"),
        s.appendChild(l),
        e.appendChild(s),
        e
      );
    }
    function Qf(e, t) {
      return (
        null !== e && t >= Math.min(e.from, e.to) && t <= Math.max(e.to, e.from)
      );
    }
    function Zf(e, t) {
      return e instanceof HTMLElement && e.classList.contains(t);
    }
    function Xf(e) {
      const t = e.getWrapperElement(),
        n = t.querySelector(
          ":scope > .CodeMirror-dialog .CodeMirror-search-field"
        );
      if (null !== n) return void (n instanceof HTMLElement && n.focus());
      e.execCommand("findPersistent");
      const r = t.querySelector(".CodeMirror-dialog");
      if (null === r) return;
      r.classList.add("CodeMirror-search-dialog");
      const i = r.querySelector(".CodeMirror-search-field");
      i instanceof HTMLInputElement &&
        ((i.placeholder = "Search"), i.style.removeProperty("width"));
    }
    function Jf(e, t) {
      return (n) => {
        const r = Math.round(n.defaultTextHeight() + 4),
          i = n.getScrollInfo();
        if ("line" === t) n.scrollTo(void 0, i.top + e * r);
        else {
          const t = i.clientHeight - r;
          n.scrollTo(void 0, i.top + e * t);
        }
      };
    }
    const em = {
      lineNumbers: !1,
      readOnly: !0,
      showCursorWhenSelecting: !1,
      cursorBlinkRate: -1,
      lineWrapping: !0,
      mode: { name: Mf.ModeName },
      extraKeys: {
        Tab: !1,
        Home: "goDocStart",
        End: "goDocEnd",
        "Shift-Tab": !1,
        "Ctrl-F": Xf,
        "Ctrl-G": !1,
        "Shift-Ctrl-G": !1,
        "Shift-Ctrl-F": !1,
        "Shift-Ctrl-R": !1,
        Down: Jf(1, "line"),
        Up: Jf(-1, "line"),
        PageDown: Jf(1, "page"),
        PageUp: Jf(-1, "page"),
      },
      scrollbarStyle: "native",
      styleSelectedText: !0,
      lineSeparator: "\n",
      specialChars: /[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/,
      gutters: ["diff-gutter"],
    };
    class tm extends w.Component {
      constructor() {
        super(...arguments),
          (this.codeMirror = null),
          (this.getCodeMirrorDocument = hi((e, t) => {
            const { mode: n, firstLineNumber: r, lineSeparator: i } = em;
            -1 !== e.indexOf("\r") && (e = e.replace(/\r(?=\n|$)/g, ""));
            const o = new up.Doc(e, n, r, i);
            for (const e of t)
              o.setBookmark({ line: e, ch: 1 / 0 }, { widget: Yf() });
            return o;
          }, hu)),
          (this.getNoNewlineIndicatorLines = hi((e) => {
            const t = new Array();
            for (const n of e)
              for (const r of n.lines) r.noTrailingNewLine && t.push(xf(r, e));
            return t;
          })),
          (this.selection = null),
          (this.hunkHighlightRange = null),
          (this.swappedDocumentHasUpdatedViewport = !0),
          (this.onDocumentMouseMove = (e) => {
            if (
              null === this.codeMirror ||
              null === this.selection ||
              "range" !== this.selection.kind
            )
              return;
            const t = Math.max(0, this.codeMirror.getDoc().lineCount() - 1),
              n = yl(this.codeMirror.lineAtHeight(e.y), 0, t);
            this.codeMirror.scrollIntoView({ line: n, ch: 0 }),
              n !== this.selection.to &&
                ((this.selection = Object.assign(
                  Object.assign({}, this.selection),
                  { to: n }
                )),
                this.updateViewport());
          }),
          (this.onDocumentMouseUp = (e) => {
            if ((e.preventDefault(), 0 === e.button)) {
              if (null === this.selection || null === this.codeMirror)
                return this.cancelSelection();
              if ("hunk" === this.selection.kind) {
                if (
                  !Zf(e.target, "hunk-handle") ||
                  !Qf(this.selection, this.codeMirror.lineAtHeight(e.y))
                )
                  return this.cancelSelection();
              } else {
                if ("range" !== this.selection.kind)
                  return X(
                    this.selection.kind,
                    "Unknown selection kind " + this.selection.kind
                  );
                if (
                  this.selection.from === this.selection.to &&
                  !Zf(e.target, "diff-line-number") &&
                  !Zf(e.target, "diff-line-gutter")
                )
                  return this.cancelSelection();
              }
              this.endSelection();
            }
          }),
          (this.isSelectionEnabled = () => null === this.selection),
          (this.getAndStoreCodeMirrorInstance = (e) => {
            this.codeMirror = null === e ? null : e.getEditor();
          }),
          (this.onContextMenu = (e, t) => {
            const n = null != e.getDoc().listSelections(),
              r = [
                {
                  label: "Copy",
                  action: () => {
                    null !== this.onCopy && this.onCopy(e, t);
                  },
                  enabled: this.onCopy && n,
                },
              ],
              i = this.buildDiscardMenuItems(e, t);
            null !== i && r.push({ type: "separator" }, ...i), se(r);
          }),
          (this.onCopy = (e, t) => {
            t.preventDefault();
            const n = e.getDoc(),
              i = n.getSelections(),
              o = n.listSelections(),
              s = [];
            for (let e = 0; e < i.length; e++) {
              const t = o[e],
                n = i[e].split("\n");
              for (const [e, r] of n.entries())
                0 === e && t.head.ch > 0 ? s.push(r) : s.push(r.substr(1));
              const a = s.join("\n");
              r.clipboard.writeText(a);
            }
          }),
          (this.onSwapDoc = (e, t) => {
            (this.swappedDocumentHasUpdatedViewport = !1),
              this.initDiffSyntaxMode(),
              this.markIntraLineChanges(e.getDoc(), this.props.diff.hunks);
          }),
          (this.onAfterSwapDoc = (e, t, n) => {
            this.swappedDocumentHasUpdatedViewport || this.updateViewport();
          }),
          (this.onViewportChange = (e, t, n) => {
            const r = e.getDoc(),
              i = new Array();
            (this.swappedDocumentHasUpdatedViewport = !0),
              r.eachLine(t, n, (t) => {
                const n = r.getLineNumber(t);
                if (null !== n) {
                  const r = kf(this.props.diff.hunks, n);
                  if (null !== r) {
                    const o = e.lineInfo(t);
                    if (o.gutterMarkers && "diff-gutter" in o.gutterMarkers) {
                      const e = o.gutterMarkers["diff-gutter"];
                      e instanceof HTMLElement &&
                        this.updateGutterMarker(e, n, r);
                    } else
                      i.push(() => {
                        const i = this.createGutterMarker(n, r);
                        e.setGutterMarker(t, "diff-gutter", i);
                      });
                  }
                }
              }),
              i.length > 0 && e.operation(() => i.forEach((e) => e()));
          }),
          (this.onHunkHandleMouseEnter = (e) => {
            if (
              null === this.codeMirror ||
              this.props.readOnly ||
              (null !== this.selection && "range" === this.selection.kind)
            )
              return;
            const t = this.codeMirror.lineAtHeight(e.y),
              n = kf(this.props.diff.hunks, t);
            if (!n || !n.isIncludeableLine()) return;
            const r = Rf(this.props.diff.hunks, t);
            if (null === r) return;
            const { from: i, to: o } = r;
            (this.hunkHighlightRange = {
              from: i,
              to: o,
              kind: "hunk",
              isSelected: !1,
            }),
              this.updateViewport();
          }),
          (this.onDiffLineGutterMouseDown = (e) => {
            if (e.defaultPrevented || null === this.codeMirror) return;
            if (0 !== e.button) return;
            const { file: t, diff: n, readOnly: r } = this.props;
            if (!$f(t) || r) return;
            e.preventDefault();
            const i = this.codeMirror.lineAtHeight(e.y);
            this.startSelection(t, n.hunks, i, "range");
          }),
          (this.onHunkHandleMouseLeave = (e) => {
            null !== this.hunkHighlightRange &&
              ((this.hunkHighlightRange = null), this.updateViewport());
          }),
          (this.onHunkHandleMouseDown = (e) => {
            if (!this.codeMirror) return;
            if (0 !== e.button) return;
            const { file: t, diff: n, readOnly: r } = this.props;
            if (!$f(t) || r) return;
            e.preventDefault();
            const i = this.codeMirror.lineAtHeight(e.y);
            this.startSelection(t, n.hunks, i, "hunk");
          }),
          (this.onFindText = (e) => {
            !e.defaultPrevented &&
              this.codeMirror &&
              (e.preventDefault(), Xf(this.codeMirror));
          });
      }
      async initDiffSyntaxMode() {
        if (!this.codeMirror) return;
        const { file: e, diff: t, repository: n } = this.props,
          r = this.props,
          i = Bf(t.hunks),
          o = this.codeMirror.getOption("tabSize"),
          s = "number" == typeof o ? o : 4,
          a = await Nf(n, e, i);
        if (!Kf(this.props, r)) return;
        const l = await Hf(a, s, i);
        if (!Kf(this.props, r)) return;
        const c = {
          name: Mf.ModeName,
          hunks: this.props.diff.hunks,
          oldTokens: l.oldTokens,
          newTokens: l.newTokens,
        };
        this.codeMirror && this.codeMirror.setOption("mode", c);
      }
      startSelection(e, t, n, r) {
        null !== this.selection && this.cancelSelection();
        const i = !e.selection.isSelected(n);
        if ("hunk" === r) {
          const e = Rf(t, n);
          if (!e)
            return void console.error(
              "unable to find range for given line in diff"
            );
          const { from: o, to: s } = e;
          this.selection = { isSelected: i, from: o, to: s, kind: r };
        } else
          "range" === r
            ? ((this.selection = { isSelected: i, from: n, to: n, kind: r }),
              document.addEventListener("mousemove", this.onDocumentMouseMove))
            : X(0, "Unknown selection kind " + r);
        document.addEventListener("mouseup", this.onDocumentMouseUp, {
          once: !0,
        });
      }
      cancelSelection() {
        this.selection &&
          (document.removeEventListener("mouseup", this.onDocumentMouseUp),
          document.removeEventListener("mousemove", this.onDocumentMouseMove),
          (this.selection = null),
          this.updateViewport());
      }
      endSelection() {
        const { onIncludeChanged: e, file: t } = this.props;
        if (e && this.selection && $f(t)) {
          const n = t.selection,
            { isSelected: r } = this.selection,
            i = Math.min(this.selection.from, this.selection.to),
            o = Math.max(this.selection.from, this.selection.to) - i + 1;
          e(n.withRangeSelection(i, o, r)), (this.selection = null);
        }
      }
      buildDiscardMenuItems(e, t) {
        const n = this.props.file;
        if (this.props.readOnly || !$f(n)) return null;
        if (!(t instanceof MouseEvent)) return null;
        if (!this.props.onDiscardChanges) return null;
        const r = e.lineAtHeight(t.y),
          i = kf(this.props.diff.hunks, r);
        if (null === i || !i.isIncludeableLine()) return null;
        const o = Rf(this.props.diff.hunks, r);
        return null === o || null === o.type
          ? null
          : Zf(t.target, "hunk-handle")
          ? [
              {
                label: this.getDiscardLabel(o.type, o.to - o.from + 1),
                action: () => this.onDiscardChanges(n, o.from, o.to),
              },
            ]
          : Zf(t.target, "diff-line-number")
          ? [
              {
                label: this.getDiscardLabel(o.type, 1),
                action: () => this.onDiscardChanges(n, r),
                enabled: o.type !== Cf.Mixed,
              },
            ]
          : null;
      }
      onDiscardChanges(e, t, n = t) {
        if (!this.props.onDiscardChanges) return;
        const r = e.selection
          .withSelectNone()
          .withRangeSelection(t, n - t + 1, !0);
        this.props.onDiscardChanges(this.props.diff, r);
      }
      getDiscardLabel(e, t) {
        const n = this.props.askForConfirmationOnDiscardChanges ? "…" : "";
        let r = "";
        e === Cf.Additions
          ? (r = "added")
          : e === Cf.Deletions
          ? (r = "removed")
          : e === Cf.Mixed
          ? (r = "modified")
          : X(0, "Invalid range type: " + e);
        return `Discard ${r} line${t > 1 ? "s" : ""}${n}`;
      }
      markIntraLineChanges(e, t) {
        for (const n of t) {
          const r = n.lines.filter((e) => e.type === ji.Add),
            i = n.lines.filter((e) => e.type === ji.Delete);
          if (r.length === i.length)
            for (let n = 0; n < r.length; n++) {
              const o = r[n],
                s = i[n];
              if (o.text.length > 4096 || s.text.length > 4096) continue;
              const a = Wf(o.content, s.content),
                l = a.stringARange;
              if (l.length > 0) {
                const n = xf(o, t);
                if (n > -1) {
                  const t = { line: n, ch: l.location + 1 },
                    r = { line: n, ch: l.location + l.length + 1 };
                  e.markText(t, r, { className: "cm-diff-add-inner" });
                }
              }
              const c = a.stringBRange;
              if (c.length > 0) {
                const n = xf(s, t);
                if (n > -1) {
                  const t = { line: n, ch: c.location + 1 },
                    r = { line: n, ch: c.location + c.length + 1 };
                  e.markText(t, r, { className: "cm-diff-delete-inner" });
                }
              }
            }
        }
      }
      isIncluded(e) {
        const { file: t } = this.props;
        return Qf(this.selection, e)
          ? this.selection.isSelected
          : $f(t) && t.selection.isSelected(e);
      }
      getGutterLineClassNameInfo(e, t) {
        const n = t.isIncludeableLine(),
          r = n && this.isIncluded(e),
          i = n && Qf(this.hunkHighlightRange, e);
        return {
          "diff-line-gutter": !0,
          "diff-add": t.type === ji.Add,
          "diff-delete": t.type === ji.Delete,
          "diff-context": t.type === ji.Context,
          "diff-hunk": t.type === ji.Hunk,
          "read-only": this.props.readOnly,
          "diff-line-selected": r,
          "diff-line-hover": i,
          includeable: n && !this.props.readOnly,
        };
      }
      createGutterMarker(e, t) {
        const n = document.createElement("div");
        (n.className = "diff-line-gutter"),
          n.addEventListener("mousedown", this.onDiffLineGutterMouseDown);
        const r = document.createElement("div");
        r.classList.add("diff-line-number", "before"), n.appendChild(r);
        const i = document.createElement("div");
        i.classList.add("diff-line-number", "after"), n.appendChild(i);
        const o = document.createElement("div");
        return (
          o.addEventListener("mouseenter", this.onHunkHandleMouseEnter),
          o.addEventListener("mouseleave", this.onHunkHandleMouseLeave),
          o.addEventListener("mousedown", this.onHunkHandleMouseDown),
          o.classList.add("hunk-handle"),
          n.appendChild(o),
          this.updateGutterMarker(n, e, t),
          n
        );
      }
      updateGutterMarker(e, t, n) {
        const r = this.getGutterLineClassNameInfo(t, n);
        for (const [t, n] of Object.entries(r))
          n ? e.classList.add(t) : e.classList.remove(t);
        !this.props.readOnly && n.isIncludeableLine()
          ? e.setAttribute("role", "button")
          : e.removeAttribute("role");
        e.childNodes[0].textContent =
          null === n.oldLineNumber ? "" : "" + n.oldLineNumber;
        e.childNodes[1].textContent =
          null === n.newLineNumber ? "" : "" + n.newLineNumber;
      }
      updateViewport() {
        if (this.codeMirror) {
          const { from: e, to: t } = this.codeMirror.getViewport();
          this.onViewportChange(this.codeMirror, e, t);
        }
      }
      componentWillUnmount() {
        this.cancelSelection(),
          (this.codeMirror = null),
          document.removeEventListener("find-text", this.onFindText);
      }
      componentDidUpdate(e, t, n) {
        null !== this.codeMirror &&
          ($f(this.props.file) &&
            (($f(e.file) && this.props.file.selection === e.file.selection) ||
              (this.props.diff.text === e.diff.text && this.updateViewport())),
          null !== n && this.codeMirror.scrollTo(void 0, n.top));
      }
      getSnapshotBeforeUpdate(e) {
        return null !== this.codeMirror &&
          this.props.file !== e.file &&
          this.props.file.id === e.file.id &&
          this.props.diff.text !== e.diff.text
          ? this.codeMirror.getScrollInfo()
          : null;
      }
      componentDidMount() {
        this.initDiffSyntaxMode(),
          document.addEventListener("find-text", this.onFindText);
      }
      render() {
        const e = this.getCodeMirrorDocument(
          this.props.diff.text,
          this.getNoNewlineIndicatorLines(this.props.diff.hunks)
        );
        return w.createElement(Pf, {
          className: "diff-code-mirror",
          value: e,
          options: em,
          isSelectionEnabled: this.isSelectionEnabled,
          onSwapDoc: this.onSwapDoc,
          onAfterSwapDoc: this.onAfterSwapDoc,
          onViewportChange: this.onViewportChange,
          ref: this.getAndStoreCodeMirrorInstance,
          onContextMenu: this.onContextMenu,
          onCopy: this.onCopy,
        });
      }
    }
    var nm = (function () {
      function e() {
        var t = this,
          n =
            arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
        Uh()(this, e),
          (this._cellHeightCache = {}),
          (this._cellWidthCache = {}),
          (this._columnWidthCache = {}),
          (this._rowHeightCache = {}),
          (this._columnCount = 0),
          (this._rowCount = 0),
          (this.columnWidth = function (e) {
            var n = e.index,
              r = t._keyMapper(0, n);
            return t._columnWidthCache.hasOwnProperty(r)
              ? t._columnWidthCache[r]
              : t._defaultWidth;
          }),
          (this.rowHeight = function (e) {
            var n = e.index,
              r = t._keyMapper(n, 0);
            return t._rowHeightCache.hasOwnProperty(r)
              ? t._rowHeightCache[r]
              : t._defaultHeight;
          });
        var r = n.defaultHeight,
          i = n.defaultWidth,
          o = n.fixedHeight,
          s = n.fixedWidth,
          a = n.keyMapper,
          l = n.minHeight,
          c = n.minWidth;
        (this._hasFixedHeight = !0 === o),
          (this._hasFixedWidth = !0 === s),
          (this._minHeight = l || 0),
          (this._minWidth = c || 0),
          (this._keyMapper = a || rm),
          (this._defaultHeight = Math.max(
            this._minHeight,
            "number" == typeof r ? r : 30
          )),
          (this._defaultWidth = Math.max(
            this._minWidth,
            "number" == typeof i ? i : 100
          ));
      }
      return (
        jh()(e, [
          {
            key: "clear",
            value: function (e) {
              var t =
                  arguments.length > 1 && void 0 !== arguments[1]
                    ? arguments[1]
                    : 0,
                n = this._keyMapper(e, t);
              delete this._cellHeightCache[n],
                delete this._cellWidthCache[n],
                this._updateCachedColumnAndRowSizes(e, t);
            },
          },
          {
            key: "clearAll",
            value: function () {
              (this._cellHeightCache = {}),
                (this._cellWidthCache = {}),
                (this._columnWidthCache = {}),
                (this._rowHeightCache = {}),
                (this._rowCount = 0),
                (this._columnCount = 0);
            },
          },
          {
            key: "hasFixedHeight",
            value: function () {
              return this._hasFixedHeight;
            },
          },
          {
            key: "hasFixedWidth",
            value: function () {
              return this._hasFixedWidth;
            },
          },
          {
            key: "getHeight",
            value: function (e) {
              var t =
                arguments.length > 1 && void 0 !== arguments[1]
                  ? arguments[1]
                  : 0;
              if (this._hasFixedHeight) return this._defaultHeight;
              var n = this._keyMapper(e, t);
              return this._cellHeightCache.hasOwnProperty(n)
                ? Math.max(this._minHeight, this._cellHeightCache[n])
                : this._defaultHeight;
            },
          },
          {
            key: "getWidth",
            value: function (e) {
              var t =
                arguments.length > 1 && void 0 !== arguments[1]
                  ? arguments[1]
                  : 0;
              if (this._hasFixedWidth) return this._defaultWidth;
              var n = this._keyMapper(e, t);
              return this._cellWidthCache.hasOwnProperty(n)
                ? Math.max(this._minWidth, this._cellWidthCache[n])
                : this._defaultWidth;
            },
          },
          {
            key: "has",
            value: function (e) {
              var t =
                  arguments.length > 1 && void 0 !== arguments[1]
                    ? arguments[1]
                    : 0,
                n = this._keyMapper(e, t);
              return this._cellHeightCache.hasOwnProperty(n);
            },
          },
          {
            key: "set",
            value: function (e, t, n, r) {
              var i = this._keyMapper(e, t);
              t >= this._columnCount && (this._columnCount = t + 1),
                e >= this._rowCount && (this._rowCount = e + 1),
                (this._cellHeightCache[i] = r),
                (this._cellWidthCache[i] = n),
                this._updateCachedColumnAndRowSizes(e, t);
            },
          },
          {
            key: "_updateCachedColumnAndRowSizes",
            value: function (e, t) {
              if (!this._hasFixedWidth) {
                for (var n = 0, r = 0; r < this._rowCount; r++)
                  n = Math.max(n, this.getWidth(r, t));
                var i = this._keyMapper(0, t);
                this._columnWidthCache[i] = n;
              }
              if (!this._hasFixedHeight) {
                for (var o = 0, s = 0; s < this._columnCount; s++)
                  o = Math.max(o, this.getHeight(e, s));
                var a = this._keyMapper(e, 0);
                this._rowHeightCache[a] = o;
              }
            },
          },
          {
            key: "defaultHeight",
            get: function () {
              return this._defaultHeight;
            },
          },
          {
            key: "defaultWidth",
            get: function () {
              return this._defaultWidth;
            },
          },
        ]),
        e
      );
    })();
    function rm(e, t) {
      return e + "-" + t;
    }
    var im = (function (e) {
      function t() {
        var e, n, r, i;
        Uh()(this, t);
        for (var o = arguments.length, s = Array(o), a = 0; a < o; a++)
          s[a] = arguments[a];
        return (
          (n = r = Gh()(
            this,
            (e = t.__proto__ || Hh()(t)).call.apply(e, [this].concat(s))
          )),
          (r._measure = function () {
            var e = r.props,
              t = e.cache,
              n = e.columnIndex,
              i = void 0 === n ? 0 : n,
              o = e.parent,
              s = e.rowIndex,
              a = void 0 === s ? r.props.index || 0 : s,
              l = r._getCellMeasurements(),
              c = l.height,
              u = l.width;
            (c === t.getHeight(a, i) && u === t.getWidth(a, i)) ||
              (t.set(a, i, u, c),
              o &&
                "function" == typeof o.recomputeGridSize &&
                o.recomputeGridSize({ columnIndex: i, rowIndex: a }));
          }),
          (i = n),
          Gh()(r, i)
        );
      }
      return (
        qh()(t, e),
        jh()(t, [
          {
            key: "componentDidMount",
            value: function () {
              this._maybeMeasureCell();
            },
          },
          {
            key: "componentDidUpdate",
            value: function () {
              this._maybeMeasureCell();
            },
          },
          {
            key: "render",
            value: function () {
              var e = this.props.children;
              return "function" == typeof e ? e({ measure: this._measure }) : e;
            },
          },
          {
            key: "_getCellMeasurements",
            value: function () {
              var e = this.props.cache,
                t = Object(S.findDOMNode)(this);
              if (
                t &&
                t.ownerDocument &&
                t.ownerDocument.defaultView &&
                t instanceof t.ownerDocument.defaultView.HTMLElement
              ) {
                var n = t.style.width,
                  r = t.style.height;
                e.hasFixedWidth() || (t.style.width = "auto"),
                  e.hasFixedHeight() || (t.style.height = "auto");
                var i = Math.ceil(t.offsetHeight),
                  o = Math.ceil(t.offsetWidth);
                return (
                  n && (t.style.width = n),
                  r && (t.style.height = r),
                  { height: i, width: o }
                );
              }
              return { height: 0, width: 0 };
            },
          },
          {
            key: "_maybeMeasureCell",
            value: function () {
              var e = this.props,
                t = e.cache,
                n = e.columnIndex,
                r = void 0 === n ? 0 : n,
                i = e.parent,
                o = e.rowIndex,
                s = void 0 === o ? this.props.index || 0 : o;
              if (!t.has(s, r)) {
                var a = this._getCellMeasurements(),
                  l = a.height,
                  c = a.width;
                t.set(s, r, c, l),
                  i &&
                    "function" == typeof i.invalidateCellSizeAfterRender &&
                    i.invalidateCellSizeAfterRender({
                      columnIndex: r,
                      rowIndex: s,
                    });
              }
            },
          },
        ]),
        t
      );
    })(w.PureComponent);
    (im.__internalCellMeasurerFlag = !1), (im.propTypes = null);
    var om = im;
    var sm = n(137),
      am = n.n(sm);
    var lm = (function (e) {
      function t() {
        var e, n, r, i;
        Uh()(this, t);
        for (var o = arguments.length, s = Array(o), a = 0; a < o; a++)
          s[a] = arguments[a];
        return (
          (n = r = Gh()(
            this,
            (e = t.__proto__ || Hh()(t)).call.apply(e, [this].concat(s))
          )),
          (r._cellRenderer = function (e) {
            var t = e.parent,
              n = e.rowIndex,
              i = e.style,
              o = e.isScrolling,
              s = e.isVisible,
              a = e.key,
              l = r.props.rowRenderer;
            return (
              am()(i, "width").writable && (i.width = "100%"),
              l({
                index: n,
                style: i,
                isScrolling: o,
                isVisible: s,
                key: a,
                parent: t,
              })
            );
          }),
          (r._setRef = function (e) {
            r.Grid = e;
          }),
          (r._onScroll = function (e) {
            var t = e.clientHeight,
              n = e.scrollHeight,
              i = e.scrollTop;
            (0, r.props.onScroll)({
              clientHeight: t,
              scrollHeight: n,
              scrollTop: i,
            });
          }),
          (r._onSectionRendered = function (e) {
            var t = e.rowOverscanStartIndex,
              n = e.rowOverscanStopIndex,
              i = e.rowStartIndex,
              o = e.rowStopIndex;
            (0, r.props.onRowsRendered)({
              overscanStartIndex: t,
              overscanStopIndex: n,
              startIndex: i,
              stopIndex: o,
            });
          }),
          (i = n),
          Gh()(r, i)
        );
      }
      return (
        qh()(t, e),
        jh()(t, [
          {
            key: "forceUpdateGrid",
            value: function () {
              this.Grid && this.Grid.forceUpdate();
            },
          },
          {
            key: "getOffsetForRow",
            value: function (e) {
              var t = e.alignment,
                n = e.index;
              return this.Grid
                ? this.Grid.getOffsetForCell({
                    alignment: t,
                    rowIndex: n,
                    columnIndex: 0,
                  }).scrollTop
                : 0;
            },
          },
          {
            key: "invalidateCellSizeAfterRender",
            value: function (e) {
              var t = e.columnIndex,
                n = e.rowIndex;
              this.Grid &&
                this.Grid.invalidateCellSizeAfterRender({
                  rowIndex: n,
                  columnIndex: t,
                });
            },
          },
          {
            key: "measureAllRows",
            value: function () {
              this.Grid && this.Grid.measureAllCells();
            },
          },
          {
            key: "recomputeGridSize",
            value: function () {
              var e =
                  arguments.length > 0 && void 0 !== arguments[0]
                    ? arguments[0]
                    : {},
                t = e.columnIndex,
                n = void 0 === t ? 0 : t,
                r = e.rowIndex,
                i = void 0 === r ? 0 : r;
              this.Grid &&
                this.Grid.recomputeGridSize({ rowIndex: i, columnIndex: n });
            },
          },
          {
            key: "recomputeRowHeights",
            value: function () {
              var e =
                arguments.length > 0 && void 0 !== arguments[0]
                  ? arguments[0]
                  : 0;
              this.Grid &&
                this.Grid.recomputeGridSize({ rowIndex: e, columnIndex: 0 });
            },
          },
          {
            key: "scrollToPosition",
            value: function () {
              var e =
                arguments.length > 0 && void 0 !== arguments[0]
                  ? arguments[0]
                  : 0;
              this.Grid && this.Grid.scrollToPosition({ scrollTop: e });
            },
          },
          {
            key: "scrollToRow",
            value: function () {
              var e =
                arguments.length > 0 && void 0 !== arguments[0]
                  ? arguments[0]
                  : 0;
              this.Grid &&
                this.Grid.scrollToCell({ columnIndex: 0, rowIndex: e });
            },
          },
          {
            key: "render",
            value: function () {
              var e = this.props,
                t = e.className,
                n = e.noRowsRenderer,
                r = e.scrollToIndex,
                i = e.width,
                o = ph()("ReactVirtualized__List", t);
              return w.createElement(
                Ed,
                Nh()({}, this.props, {
                  autoContainerWidth: !0,
                  cellRenderer: this._cellRenderer,
                  className: o,
                  columnWidth: i,
                  columnCount: 1,
                  noContentRenderer: n,
                  onScroll: this._onScroll,
                  onSectionRendered: this._onSectionRendered,
                  ref: this._setRef,
                  scrollToRow: r,
                })
              );
            },
          },
        ]),
        t
      );
    })(w.PureComponent);
    (lm.defaultProps = {
      autoHeight: !1,
      estimatedRowSize: 30,
      onScroll: function () {},
      noRowsRenderer: function () {
        return null;
      },
      onRowsRendered: function () {},
      overscanIndicesGetter: function (e) {
        var t = e.cellCount,
          n = e.overscanCellsCount,
          r = e.scrollDirection,
          i = e.startIndex,
          o = e.stopIndex;
        return (
          (n = Math.max(1, n)),
          1 === r
            ? {
                overscanStartIndex: Math.max(0, i - 1),
                overscanStopIndex: Math.min(t - 1, o + n),
              }
            : {
                overscanStartIndex: Math.max(0, i - n),
                overscanStopIndex: Math.min(t - 1, o + 1),
              }
        );
      },
      overscanRowCount: 10,
      scrollToAlignment: "auto",
      scrollToIndex: -1,
      style: {},
    }),
      (lm.propTypes = null);
    var cm = lm;
    /*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */ function um(
      e,
      t
    ) {
      var n = {};
      for (var r in e)
        Object.prototype.hasOwnProperty.call(e, r) &&
          t.indexOf(r) < 0 &&
          (n[r] = e[r]);
      if (null != e && "function" == typeof Object.getOwnPropertySymbols) {
        var i = 0;
        for (r = Object.getOwnPropertySymbols(e); i < r.length; i++)
          t.indexOf(r[i]) < 0 &&
            Object.prototype.propertyIsEnumerable.call(e, r[i]) &&
            (n[r[i]] = e[r[i]]);
      }
      return n;
    }
    Object.create;
    Object.create;
    class hm extends w.Component {
      constructor() {
        super(...arguments),
          (this.onMouseDownLineNumber = (e) => {
            if (2 === e.buttons) return;
            const t = this.getDiffData(e.currentTarget),
              n = this.getDiffColumn(e.currentTarget);
            null !== t &&
              null !== n &&
              this.props.onStartSelection(this.props.numRow, n, !t.isSelected);
          }),
          (this.onMouseEnterLineNumber = (e) => {
            const t = this.getDiffData(e.currentTarget),
              n = this.getDiffColumn(e.currentTarget);
            null !== t &&
              null !== n &&
              this.props.onUpdateSelection(this.props.numRow, n);
          }),
          (this.onMouseEnterHunk = () => {
            "hunkStartLine" in this.props.row &&
              this.props.onMouseEnterHunk(this.props.row.hunkStartLine);
          }),
          (this.onMouseLeaveHunk = () => {
            "hunkStartLine" in this.props.row &&
              this.props.onMouseLeaveHunk(this.props.row.hunkStartLine);
          }),
          (this.onClickHunk = () => {
            const e = this.getDiffData();
            null !== e &&
              "hunkStartLine" in this.props.row &&
              this.props.onClickHunk(
                this.props.row.hunkStartLine,
                !e.isSelected
              );
          }),
          (this.onContextMenuLineNumber = (e) => {
            const t = this.getDiffData(e.currentTarget);
            null !== t && this.props.onContextMenuLine(t.diffLineNumber);
          }),
          (this.onContextMenuHunk = () => {
            "hunkStartLine" in this.props.row &&
              this.props.onContextMenuHunk(this.props.row.hunkStartLine);
          });
      }
      render() {
        const { row: e, showSideBySideDiff: t } = this.props;
        switch (e.type) {
          case jf.Hunk:
            return w.createElement(
              "div",
              { className: "row hunk-info" },
              this.renderLineNumber(),
              this.renderContentFromString(e.content)
            );
          case jf.Context:
            const { beforeLineNumber: n, afterLineNumber: r } = e;
            return t
              ? w.createElement(
                  "div",
                  { className: "row context" },
                  w.createElement(
                    "div",
                    { className: "before" },
                    this.renderLineNumber(n),
                    this.renderContentFromString(e.content, e.beforeTokens)
                  ),
                  w.createElement(
                    "div",
                    { className: "after" },
                    this.renderLineNumber(r),
                    this.renderContentFromString(e.content, e.afterTokens)
                  )
                )
              : w.createElement(
                  "div",
                  { className: "row context" },
                  w.createElement(
                    "div",
                    { className: "before" },
                    this.renderLineNumbers([n, r]),
                    this.renderContentFromString(e.content, e.beforeTokens)
                  )
                );
          case jf.Added: {
            const { lineNumber: n, isSelected: r } = e.data;
            return t
              ? w.createElement(
                  "div",
                  {
                    className: "row added",
                    onMouseEnter: this.onMouseEnterLineNumber,
                  },
                  w.createElement(
                    "div",
                    { className: "before" },
                    this.renderLineNumber(),
                    this.renderContentFromString("")
                  ),
                  this.renderHunkHandle(),
                  w.createElement(
                    "div",
                    { className: "after" },
                    this.renderLineNumber(n, r),
                    this.renderContent(e.data)
                  )
                )
              : w.createElement(
                  "div",
                  {
                    className: "row added",
                    onMouseEnter: this.onMouseEnterLineNumber,
                  },
                  w.createElement(
                    "div",
                    { className: "after" },
                    this.renderLineNumbers([void 0, n], r),
                    this.renderHunkHandle(),
                    this.renderContent(e.data)
                  )
                );
          }
          case jf.Deleted: {
            const { lineNumber: n, isSelected: r } = e.data;
            return t
              ? w.createElement(
                  "div",
                  {
                    className: "row deleted",
                    onMouseEnter: this.onMouseEnterLineNumber,
                  },
                  w.createElement(
                    "div",
                    { className: "before" },
                    this.renderLineNumber(n, r),
                    this.renderContent(e.data)
                  ),
                  this.renderHunkHandle(),
                  w.createElement(
                    "div",
                    { className: "after" },
                    this.renderLineNumber(),
                    this.renderContentFromString("")
                  )
                )
              : w.createElement(
                  "div",
                  {
                    className: "row deleted",
                    onMouseEnter: this.onMouseEnterLineNumber,
                  },
                  w.createElement(
                    "div",
                    { className: "before" },
                    this.renderLineNumbers([n, void 0], r),
                    this.renderHunkHandle(),
                    this.renderContent(e.data)
                  )
                );
          }
          case jf.Modified: {
            const { beforeData: t, afterData: n } = e;
            return w.createElement(
              "div",
              { className: "row modified" },
              w.createElement(
                "div",
                {
                  className: "before",
                  onMouseEnter: this.onMouseEnterLineNumber,
                },
                this.renderLineNumber(t.lineNumber, t.isSelected),
                this.renderContent(t)
              ),
              this.renderHunkHandle(),
              w.createElement(
                "div",
                {
                  className: "after",
                  onMouseEnter: this.onMouseEnterLineNumber,
                },
                this.renderLineNumber(n.lineNumber, n.isSelected),
                this.renderContent(n)
              )
            );
          }
        }
      }
      shouldComponentUpdate(e) {
        const t = this.props,
          { row: n } = t,
          r = um(t, ["row"]),
          { row: i } = e,
          o = um(e, ["row"]);
        return !hu(n, i) || !du(r, o);
      }
      renderContentFromString(e, t = []) {
        return this.renderContent({
          content: e,
          tokens: t,
          noNewLineIndicator: !1,
        });
      }
      renderContent(e) {
        return w.createElement(
          "div",
          { className: "content", onContextMenu: this.props.onContextMenuText },
          (function (e, t) {
            const n = [];
            let r = { content: "", tokens: new Map() };
            for (let i = 0; i < e.length; i++) {
              const o = e[i],
                s = new Map();
              for (const [e, t] of r.tokens) t > i && s.set(e, t);
              for (const e of t)
                if (void 0 !== e[i] && e[i].length > 0) {
                  const t = e[i].token.split(" "),
                    n = i + e[i].length;
                  for (const e of t) {
                    const t = s.get(e);
                    (void 0 === t || n > t) && s.set(e, n);
                  }
                }
              fu(r.tokens, s)
                ? ((r.content += o), (r.tokens = s))
                : (n.push({ tokens: r.tokens, content: r.content }),
                  (r = { content: o, tokens: s }));
            }
            return (
              n.push({ tokens: r.tokens, content: r.content }),
              w.createElement(
                w.Fragment,
                null,
                n.map((e, t) =>
                  0 === e.tokens.size
                    ? e.content
                    : w.createElement(
                        "span",
                        {
                          key: t,
                          className: ph()(
                            [...e.tokens.keys()].map((e) => "cm-" + e)
                          ),
                        },
                        e.content
                      )
                )
              )
            );
          })(e.content, e.tokens),
          e.noNewLineIndicator &&
            w.createElement(vh, {
              symbol: qf,
              title: "No newline at end of file",
            })
        );
      }
      renderHunkHandle() {
        return this.props.isDiffSelectable
          ? w.createElement("div", {
              className: "hunk-handle",
              onMouseEnter: this.onMouseEnterHunk,
              onMouseLeave: this.onMouseLeaveHunk,
              onClick: this.onClickHunk,
              onContextMenu: this.onContextMenuHunk,
            })
          : null;
      }
      renderLineNumbers(e, t) {
        return this.props.isDiffSelectable && void 0 !== t
          ? w.createElement(
              "div",
              {
                className: ph()("line-number", "selectable", {
                  "line-selected": t,
                  hover: this.props.isHunkHovered,
                }),
                onMouseDown: this.onMouseDownLineNumber,
                onContextMenu: this.onContextMenuLineNumber,
              },
              e.map((e, t) => w.createElement("span", { key: t }, e))
            )
          : w.createElement(
              "div",
              { className: "line-number" },
              e.map((e, t) => w.createElement("span", { key: t }, e))
            );
      }
      renderLineNumber(e, t) {
        return this.renderLineNumbers([e], t);
      }
      getDiffColumn(e) {
        const { row: t, showSideBySideDiff: n } = this.props;
        if (!n) return Vf.Before;
        switch (t.type) {
          case jf.Added:
            return Vf.After;
          case jf.Deleted:
            return Vf.Before;
          case jf.Modified:
            return (null == e ? void 0 : e.closest(".after"))
              ? Vf.After
              : Vf.Before;
        }
        return null;
      }
      getDiffData(e) {
        const { row: t } = this.props;
        switch (t.type) {
          case jf.Added:
          case jf.Deleted:
            return t.data;
          case jf.Modified:
            return (null == e ? void 0 : e.closest(".after"))
              ? t.afterData
              : t.beforeData;
        }
        return null;
      }
    }
    class dm extends w.Component {
      constructor(e) {
        super(e),
          (this.onChange = (e) => {
            this.setState({ value: e });
          }),
          (this.onBlur = () => {
            this.props.onClose();
          }),
          (this.onKeyDown = (e) => {
            "Escape" !== e.key || e.defaultPrevented
              ? "Enter" !== e.key ||
                e.defaultPrevented ||
                (e.preventDefault(),
                this.props.onSearch(
                  this.state.value,
                  e.shiftKey ? "previous" : "next"
                ))
              : (e.preventDefault(), this.props.onClose());
          }),
          (this.state = { value: "" });
      }
      render() {
        return w.createElement(
          "div",
          { className: "diff-search" },
          w.createElement(Md, {
            placeholder: "搜索...",
            type: "search",
            autoFocus: !0,
            onValueChanged: this.onChange,
            onKeyDown: this.onKeyDown,
            onBlur: this.onBlur,
            value: this.state.value,
          })
        );
      }
    }
    const pm = new nm({ defaultHeight: 20, fixedWidth: !0 });
    class fm extends w.Component {
      constructor(e) {
        super(e),
          (this.virtualListRef = w.createRef()),
          (this.renderRow = ({ index: e, parent: t, style: n, key: r }) => {
            const i = gm(this.props.diff, this.props.showSideBySideDiff)[e];
            if (void 0 === i) return null;
            const o = this.createFullRow(i, e),
              s =
                "hunkStartLine" in i &&
                this.state.hoveredHunk === i.hunkStartLine;
            return w.createElement(
              om,
              { cache: pm, columnIndex: 0, key: r, parent: t, rowIndex: e },
              w.createElement(
                "div",
                { key: r, style: n },
                w.createElement(hm, {
                  row: o,
                  numRow: e,
                  isDiffSelectable: $f(this.props.file),
                  isHunkHovered: s,
                  showSideBySideDiff: this.props.showSideBySideDiff,
                  onStartSelection: this.onStartSelection,
                  onUpdateSelection: this.onUpdateSelection,
                  onMouseEnterHunk: this.onMouseEnterHunk,
                  onMouseLeaveHunk: this.onMouseLeaveHunk,
                  onClickHunk: this.onClickHunk,
                  onContextMenuLine: this.onContextMenuLine,
                  onContextMenuHunk: this.onContextMenuHunk,
                  onContextMenuText: this.onContextMenuText,
                })
              )
            );
          }),
          (this.getRowHeight = (e) => {
            var t;
            return null !== (t = pm.rowHeight(e)) && void 0 !== t ? t : 20;
          }),
          (this.clearListRowsHeightCache = () => {
            pm.clearAll();
          }),
          (this.onMouseDown = (e) => {
            if (!this.props.showSideBySideDiff) return;
            if (!(e.target instanceof HTMLElement)) return;
            const t = e.target.closest(".before"),
              n = e.target.closest(".after");
            null !== t
              ? this.setState({ selectingTextInRow: "before" })
              : null !== n && this.setState({ selectingTextInRow: "after" });
          }),
          (this.onStartSelection = (e, t, n) => {
            const r = { row: e, column: t },
              i = { from: r, to: r, isSelected: n };
            this.setState({ temporarySelection: i }),
              document.addEventListener("mouseup", this.onEndSelection, {
                once: !0,
              });
          }),
          (this.onUpdateSelection = (e, t) => {
            const { temporarySelection: n } = this.state;
            if (void 0 === n) return;
            const r = { row: e, column: t };
            this.setState({
              temporarySelection: Object.assign(Object.assign({}, n), {
                to: r,
              }),
            });
          }),
          (this.onEndSelection = () => {
            var e, t;
            let n = this.getSelection();
            const { temporarySelection: r } = this.state;
            if (void 0 === n || void 0 === r) return;
            const { from: i, to: o, isSelected: s } = r,
              a = Math.min(i.row, o.row),
              l = Math.max(i.row, o.row);
            for (let e = a; e <= l; e++) {
              const t = this.getDiffLineNumber(e, i.column),
                r = this.getDiffLineNumber(e, o.column);
              null !== t && (n = n.withLineSelection(t, s)),
                null !== r && (n = n.withLineSelection(r, s));
            }
            null === (t = (e = this.props).onIncludeChanged) ||
              void 0 === t ||
              t.call(e, n),
              this.setState({ temporarySelection: void 0 });
          }),
          (this.onMouseEnterHunk = (e) => {
            void 0 === this.state.temporarySelection &&
              this.setState({ hoveredHunk: e });
          }),
          (this.onMouseLeaveHunk = () => {
            this.setState({ hoveredHunk: void 0 });
          }),
          (this.onClickHunk = (e, t) => {
            if (void 0 === this.props.onIncludeChanged) return;
            const { diff: n } = this.props,
              r = this.getSelection();
            if (void 0 !== r) {
              const i = Rf(n.hunks, e);
              if (null !== i) {
                const { from: e, to: n } = i,
                  o = r.withRangeSelection(e, n - e + 1, t);
                this.props.onIncludeChanged(o);
              }
            }
          }),
          (this.onContextMenuText = () => {
            var e, t;
            const n =
              null !==
                (t =
                  null === (e = window.getSelection()) || void 0 === e
                    ? void 0
                    : e.toString().length) && void 0 !== t
                ? t
                : 0;
            se([
              { label: "Copy", role: n > 0 ? "copy" : void 0, enabled: n > 0 },
            ]);
          }),
          (this.onContextMenuLine = (e) => {
            const { file: t, diff: n } = this.props;
            if (!$f(t)) return;
            if (void 0 === this.props.onDiscardChanges) return;
            const r = Rf(n.hunks, e);
            null !== r &&
              null !== r.type &&
              se([
                {
                  label: this.getDiscardLabel(r.type, 1),
                  action: () => this.onDiscardChanges(e),
                },
              ]);
          }),
          (this.onContextMenuHunk = (e) => {
            if (!$f(this.props.file)) return;
            if (void 0 === this.props.onDiscardChanges) return;
            const t = Rf(this.props.diff.hunks, e);
            null !== t &&
              null !== t.type &&
              se([
                {
                  label: this.getDiscardLabel(t.type, t.to - t.from + 1),
                  action: () => this.onDiscardChanges(t.from, t.to),
                },
              ]);
          }),
          (this.onWindowKeyDown = (e) => {
            if (e.defaultPrevented) return;
            !e.ctrlKey ||
              e.shiftKey ||
              e.altKey ||
              "f" !== e.key ||
              (e.preventDefault(), this.showSearch());
          }),
          (this.showSearch = () => {
            this.state.isSearching || this.resetSearch(!0);
          }),
          (this.onSearch = (e, t) => {
            var n, r;
            let { selectedSearchResult: i, searchResults: o } = this.state;
            const { diff: s, showSideBySideDiff: a } = this.props;
            if (e === this.state.searchQuery && void 0 !== o)
              if (void 0 === i) i = 0;
              else {
                i = (i + ("next" === t ? 1 : -1) + o.length) % o.length;
              }
            else if (
              ((o = (function (e, t, n) {
                if (0 === n.length) return;
                const r = new bm(),
                  i = new RegExp(
                    ((s = n), s.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&")),
                    "gi"
                  ),
                  o = gm(e, t);
                var s;
                for (const [e, n] of o.entries())
                  if (n.type !== jf.Hunk)
                    for (const o of Sm(n, t))
                      for (const t of o.content.matchAll(i))
                        void 0 !== t.index &&
                          r.add(e, o.type, t.index, t[0].length);
                return r;
              })(s, a, e)),
              (i = 0),
              void 0 === o || 0 === o.length)
            )
              return void this.resetSearch(!0);
            const l = null === (n = o.get(i)) || void 0 === n ? void 0 : n.row;
            void 0 !== l &&
              (null === (r = this.virtualListRef.current) ||
                void 0 === r ||
                r.scrollToRow(l)),
              this.setState({
                searchQuery: e,
                searchResults: o,
                selectedSearchResult: i,
              });
          }),
          (this.onSearchCancel = () => {
            this.resetSearch(!1);
          }),
          (this.state = { isSearching: !1, selectedSearchResult: void 0 });
      }
      componentDidMount() {
        this.initDiffSyntaxMode(),
          window.addEventListener("keydown", this.onWindowKeyDown),
          document.addEventListener("find-text", this.showSearch);
      }
      componentWillUnmount() {
        window.removeEventListener("keydown", this.onWindowKeyDown),
          document.removeEventListener("mouseup", this.onEndSelection),
          document.removeEventListener("find-text", this.showSearch);
      }
      componentDidUpdate(e) {
        mm(this.props, e) ||
          (this.initDiffSyntaxMode(), this.clearListRowsHeightCache());
      }
      render() {
        const e = gm(this.props.diff, this.props.showSideBySideDiff),
          t = ph()("side-by-side-diff-container", {
            "unified-diff": !this.props.showSideBySideDiff,
            ["selecting-" + this.state.selectingTextInRow]:
              this.props.showSideBySideDiff &&
              void 0 !== this.state.selectingTextInRow,
            editable: $f(this.props.file),
          });
        return w.createElement(
          "div",
          { className: t, onMouseDown: this.onMouseDown },
          this.state.isSearching &&
            w.createElement(dm, {
              onSearch: this.onSearch,
              onClose: this.onSearchCancel,
            }),
          w.createElement(
            "div",
            { className: "side-by-side-diff cm-s-default" },
            w.createElement(
              Qh,
              { onResize: this.clearListRowsHeightCache },
              ({ height: t, width: n }) =>
                w.createElement(cm, {
                  deferredMeasurementCache: pm,
                  width: n,
                  height: t,
                  rowCount: e.length,
                  rowHeight: this.getRowHeight,
                  rowRenderer: this.renderRow,
                  ref: this.virtualListRef,
                  isSearching: this.state.isSearching,
                  selectedSearchResult: this.state.selectedSearchResult,
                  searchQuery: this.state.searchQuery,
                  showSideBySideDiff: this.props.showSideBySideDiff,
                  beforeTokens: this.state.beforeTokens,
                  afterTokens: this.state.afterTokens,
                  temporarySelection: this.state.temporarySelection,
                  hoveredHunk: this.state.hoveredHunk,
                  isSelectable: $f(this.props.file),
                  fileSelection: this.getSelection(),
                })
            )
          )
        );
      }
      async initDiffSyntaxMode() {
        const { file: e, diff: t, repository: n } = this.props,
          r = this.props,
          i = Bf(t.hunks),
          o = await Nf(n, e, i);
        if (!mm(this.props, r)) return;
        const s = await Hf(o, 4, i);
        mm(this.props, r) &&
          this.setState({
            beforeTokens: s.oldTokens,
            afterTokens: s.newTokens,
          });
      }
      getSelection() {
        return $f(this.props.file) ? this.props.file.selection : void 0;
      }
      createFullRow(e, t) {
        var n;
        if (e.type === jf.Added)
          return Object.assign(Object.assign({}, e), {
            data: this.getRowDataPopulated(
              e.data,
              t,
              this.props.showSideBySideDiff ? Vf.After : Vf.Before,
              this.state.afterTokens
            ),
          });
        if (e.type === jf.Deleted)
          return Object.assign(Object.assign({}, e), {
            data: this.getRowDataPopulated(
              e.data,
              t,
              Vf.Before,
              this.state.beforeTokens
            ),
          });
        if (e.type === jf.Modified)
          return Object.assign(Object.assign({}, e), {
            beforeData: this.getRowDataPopulated(
              e.beforeData,
              t,
              Vf.Before,
              this.state.beforeTokens
            ),
            afterData: this.getRowDataPopulated(
              e.afterData,
              t,
              Vf.After,
              this.state.afterTokens
            ),
          });
        if (e.type === jf.Context) {
          const r =
              null !== (n = _f(e.beforeLineNumber, this.state.beforeTokens)) &&
              void 0 !== n
                ? n
                : _f(e.afterLineNumber, this.state.afterTokens),
            i = [...e.beforeTokens],
            o = [...e.afterTokens];
          null !== r && (i.push(r), o.push(r));
          const s = this.getSearchTokens(t, Vf.Before);
          void 0 !== s && s.forEach((e) => i.push(e));
          const a = this.getSearchTokens(t, Vf.After);
          return (
            void 0 !== a && a.forEach((e) => o.push(e)),
            Object.assign(Object.assign({}, e), {
              beforeTokens: i,
              afterTokens: o,
            })
          );
        }
        return e;
      }
      getRowDataPopulated(e, t, n, r) {
        const i = this.getSearchTokens(t, n),
          o = _f(e.lineNumber, r),
          s = [...e.tokens];
        return (
          void 0 !== i && i.forEach((e) => s.push(e)),
          null !== o && s.push(o),
          Object.assign(Object.assign({}, e), {
            tokens: s,
            isSelected: Cm(
              e.diffLineNumber,
              t,
              n,
              this.getSelection(),
              this.state.temporarySelection
            ),
          })
        );
      }
      getSearchTokens(e, t) {
        const { searchResults: n, selectedSearchResult: r } = this.state;
        if (void 0 === n) return;
        const i = n.getLineTokens(e, t);
        if (void 0 !== i) {
          if (void 0 !== i && void 0 !== r) {
            const o = n.get(r);
            if (
              e === (null == o ? void 0 : o.row) &&
              t === o.column &&
              void 0 !== i[o.offset]
            ) {
              return [
                i,
                { [o.offset]: { length: o.length, token: "selected" } },
              ];
            }
          }
          return [i];
        }
      }
      getDiffLineNumber(e, t) {
        const n = gm(this.props.diff, this.props.showSideBySideDiff)[e];
        return void 0 === n
          ? null
          : n.type === jf.Added || n.type === jf.Deleted
          ? n.data.diffLineNumber
          : n.type === jf.Modified
          ? t === Vf.After
            ? n.afterData.diffLineNumber
            : n.beforeData.diffLineNumber
          : null;
      }
      getDiscardLabel(e, t) {
        const n = this.props.askForConfirmationOnDiscardChanges ? "…" : "";
        let r = "";
        e === Cf.Additions
          ? (r = "added")
          : e === Cf.Deletions
          ? (r = "removed")
          : e === Cf.Mixed
          ? (r = "modified")
          : X(0, "Invalid range type: " + e);
        return `Discard ${r} line${t > 1 ? "s" : ""}${n}`;
      }
      onDiscardChanges(e, t = e) {
        const n = this.getSelection();
        if (void 0 === n) return;
        if (void 0 === this.props.onDiscardChanges) return;
        const r = n.withSelectNone().withRangeSelection(e, t - e + 1, !0);
        this.props.onDiscardChanges(this.props.diff, r);
      }
      resetSearch(e) {
        this.setState({
          selectedSearchResult: void 0,
          searchQuery: void 0,
          searchResults: void 0,
          isSearching: e,
        });
      }
    }
    function mm(e, t) {
      return (
        e === t ||
        (e.file.id === t.file.id &&
          e.diff.text === t.diff.text &&
          e.showSideBySideDiff === t.showSideBySideDiff)
      );
    }
    const gm = hi(function (e, t) {
      const n = new Array();
      for (const r of e.hunks) for (const e of ym(r, t)) n.push(e);
      return n;
    });
    function ym(e, t) {
      const n = new Array();
      let r = new Array();
      for (const [i, o] of e.lines.entries()) {
        const s = e.unifiedDiffStart + i;
        if (o.type !== ji.Delete && o.type !== ji.Add) {
          if (r.length > 0) {
            for (const e of vm(r, t)) n.push(e);
            r = [];
          }
          o.type !== ji.Hunk
            ? o.type !== ji.Context
              ? X(o.type, "Invalid line type: " + o.type)
              : (ee(o.oldLineNumber, "No oldLineNumber for " + s),
                ee(o.newLineNumber, "No newLineNumber for " + s),
                n.push({
                  type: jf.Context,
                  content: o.content,
                  beforeLineNumber: o.oldLineNumber,
                  afterLineNumber: o.newLineNumber,
                  beforeTokens: [],
                  afterTokens: [],
                }))
            : n.push({ type: jf.Hunk, content: o.content });
        } else r.push({ line: o, diffLineNumber: s });
      }
      if (r.length > 0) for (const e of vm(r, t)) n.push(e);
      return n;
    }
    function vm(e, t) {
      if (0 === e.length) return [];
      const n = e[0].diffLineNumber,
        r = new Array(),
        i = new Array();
      for (const t of e)
        t.line.type === ji.Add
          ? r.push(t)
          : t.line.type === ji.Delete && i.push(t);
      const o = new Array(),
        s = new Array(),
        a = new Array();
      if (r.length === i.length)
        for (let e = 0; e < i.length; e++) {
          const t = r[e],
            n = i[e];
          if (t.line.content.length < 240 && n.line.content.length < 240) {
            const { before: r, after: i } = Gf(n.line.content, t.line.content);
            (s[e] = r), (a[e] = i);
          }
        }
      let l = 0;
      for (; t && l < r.length && l < i.length; ) {
        const e = J("Unexpected null line", r[l]),
          t = J("Unexpected null line", i[l]);
        o.push({
          type: jf.Modified,
          beforeData: wm(t, "oldLineNumber", s.shift()),
          afterData: wm(e, "newLineNumber", a.shift()),
          hunkStartLine: n,
        }),
          l++;
      }
      for (let e = l; e < i.length; e++) {
        const t = J("Unexpected null line", i[e]);
        o.push({
          type: jf.Deleted,
          data: wm(t, "oldLineNumber", s.shift()),
          hunkStartLine: n,
        });
      }
      for (let e = l; e < r.length; e++) {
        const t = J("Unexpected null line", r[e]);
        o.push({
          type: jf.Added,
          data: wm(t, "newLineNumber", a.shift()),
          hunkStartLine: n,
        });
      }
      return o;
    }
    function wm({ line: e, diffLineNumber: t }, n, r) {
      const i = J(`Expecting ${n} value for ${e}`, e[n]),
        o = new Array();
      return (
        void 0 !== r && o.push(r),
        {
          content: e.content,
          lineNumber: i,
          diffLineNumber: t,
          noNewLineIndicator: e.noTrailingNewLine,
          tokens: o,
        }
      );
    }
    class bm {
      constructor() {
        (this.lookup = new Map()), (this.hits = new Array());
      }
      getKey(e, t) {
        return `${e}.${t}`;
      }
      add(e, t, n, r) {
        const i = this.getKey(e, t),
          o = this.lookup.get(i),
          s = { length: r, token: "search-result" };
        void 0 !== o ? (o[n] = s) : this.lookup.set(i, { [n]: s }),
          this.hits.push([e, t, n, r]);
      }
      get length() {
        return this.hits.length;
      }
      get(e) {
        const t = this.hits[e];
        return void 0 === t
          ? void 0
          : { row: t[0], column: t[1], offset: t[2], length: t[3] };
      }
      getLineTokens(e, t) {
        return this.lookup.get(this.getKey(e, t));
      }
    }
    function* Sm(e, t) {
      if (e.type === jf.Hunk) yield { type: Vf.Before, content: e.content };
      else if (e.type === jf.Added) {
        const n = t ? Vf.After : Vf.Before;
        yield { type: n, content: e.data.content };
      } else
        e.type === jf.Deleted
          ? yield { type: Vf.Before, content: e.data.content }
          : e.type === jf.Context
          ? (yield { type: Vf.Before, content: e.content },
            t && (yield { type: Vf.After, content: e.content }))
          : e.type === jf.Modified
          ? (yield { type: Vf.Before, content: e.beforeData.content },
            yield { type: Vf.After, content: e.afterData.content })
          : X(0, "Unknown row type " + e);
    }
    function Cm(e, t, n, r, i) {
      var o;
      const s =
        null !== (o = null == r ? void 0 : r.isSelected(e)) &&
        void 0 !== o &&
        o;
      if (void 0 === i) return s;
      const a = (function (e, t, n) {
        if (void 0 === n) return !1;
        if (
          e >= Math.min(n.from.row, n.to.row) &&
          e <= Math.max(n.to.row, n.from.row) &&
          (t === n.from.column || t === n.to.column)
        )
          return !0;
        return !1;
      })(t, n, i);
      return i.isSelected ? s || a : s && !a;
    }
    const Em = _c(__dirname, "static/ufo-alert.svg");
    class km extends w.Component {
      constructor(e) {
        super(e),
          (this.showLargeDiff = () => {
            this.setState({ forceShowLargeDiff: !0 });
          }),
          (this.state = { forceShowLargeDiff: !1 });
      }
      render() {
        const e = this.props.diff;
        switch (e.kind) {
          case Wi.Text:
            return this.renderText(e);
          case Wi.Binary:
            return this.renderBinaryFile();
          case Wi.Image:
            return this.renderImage(e);
          case Wi.LargeText:
            return this.state.forceShowLargeDiff
              ? this.renderLargeText(e)
              : this.renderLargeTextDiff();
          case Wi.Unrenderable:
            return this.renderUnrenderableDiff();
          default:
            return X(0, "Unsupported diff type: " + e);
        }
      }
      renderImage(e) {
        return e.current && e.previous
          ? w.createElement(vf, {
              onChangeDiffType: this.props.onChangeImageDiffType,
              diffType: this.props.imageDiffType,
              current: e.current,
              previous: e.previous,
            })
          : !e.current ||
            (this.props.file.status.kind !== io.New &&
              this.props.file.status.kind !== io.Untracked)
          ? e.previous && this.props.file.status.kind === io.Deleted
            ? w.createElement(bf, { previous: e.previous })
            : null
          : w.createElement(wf, { current: e.current });
      }
      renderLargeTextDiff() {
        return w.createElement(
          "div",
          { className: "panel empty large-diff" },
          w.createElement("img", { src: Em, className: "blankslate-image" }),
          w.createElement(
            "p",
            null,
            "差异太大，默认情况下不显示。",
            w.createElement("br", null),
            "您仍然可以选择显示它，但是性能可能会受到影响。"
          ),
          w.createElement(Ud, { onClick: this.showLargeDiff }, "显示差异")
        );
      }
      renderUnrenderableDiff() {
        return w.createElement(
          "div",
          { className: "panel empty large-diff" },
          w.createElement("img", { src: Em }),
          w.createElement("p", null, "The diff is too large to be displayed.")
        );
      }
      renderLargeText(e) {
        const t = {
          text: e.text,
          hunks: e.hunks,
          kind: Wi.Text,
          lineEndingsChange: e.lineEndingsChange,
        };
        return this.renderTextDiff(t);
      }
      renderText(e) {
        return 0 === e.hunks.length
          ? this.props.file.status.kind === io.New ||
            this.props.file.status.kind === io.Untracked
            ? w.createElement(
                "div",
                { className: "panel empty" },
                "The file is empty"
              )
            : this.props.file.status.kind === io.Renamed
            ? w.createElement(
                "div",
                { className: "panel renamed" },
                "The file was renamed but not changed"
              )
            : go(this.props.file.status) && vo(this.props.file.status)
            ? w.createElement(
                "div",
                { className: "panel empty" },
                "The file is in conflict and must be resolved via the command line."
              )
            : this.props.hideWhitespaceInDiff
            ? w.createElement(
                "div",
                { className: "panel empty" },
                "Only whitespace changes found"
              )
            : w.createElement(
                "div",
                { className: "panel empty" },
                "No content changes found"
              )
          : this.renderTextDiff(e);
      }
      renderBinaryFile() {
        return w.createElement(Sf, {
          path: this.props.file.path,
          repository: this.props.repository,
          onOpenBinaryFile: this.props.onOpenBinaryFile,
        });
      }
      renderTextDiff(e) {
        return this.props.showSideBySideDiff
          ? w.createElement(fm, {
              repository: this.props.repository,
              file: this.props.file,
              diff: e,
              showSideBySideDiff: this.props.showSideBySideDiff,
              onIncludeChanged: this.props.onIncludeChanged,
              onDiscardChanges: this.props.onDiscardChanges,
              askForConfirmationOnDiscardChanges: this.props
                .askForConfirmationOnDiscardChanges,
            })
          : w.createElement(tm, {
              repository: this.props.repository,
              file: this.props.file,
              readOnly: this.props.readOnly,
              onIncludeChanged: this.props.onIncludeChanged,
              onDiscardChanges: this.props.onDiscardChanges,
              diff: e,
              askForConfirmationOnDiscardChanges: this.props
                .askForConfirmationOnDiscardChanges,
            });
      }
    }
    function xm() {}
    class Rm extends w.Component {
      constructor(e) {
        super(e),
          (this.slowLoadingTimeoutId = null),
          (this.onSlowLoadingTimeout = () => {
            this.setState({ isLoadingSlow: !0 });
          }),
          (this.state = {
            isLoadingDiff: null === e.diff,
            isLoadingSlow: !1,
            propSnapshot: e,
          });
      }
      static getDerivedStateFromProps(e, t) {
        const n = null === e.diff,
          r = n !== t.isLoadingDiff;
        return Object.assign(
          Object.assign({ isLoadingDiff: n }, n ? void 0 : { propSnapshot: e }),
          r ? { isLoadingSlow: !1 } : void 0
        );
      }
      componentDidMount() {
        this.state.isLoadingDiff && this.scheduleSlowLoadingTimeout();
      }
      componentWillUnmount() {
        this.clearSlowLoadingTimeout();
      }
      componentDidUpdate(e, t) {
        this.state.isLoadingDiff !== t.isLoadingDiff &&
          (this.state.isLoadingDiff
            ? this.scheduleSlowLoadingTimeout()
            : this.clearSlowLoadingTimeout());
      }
      scheduleSlowLoadingTimeout() {
        this.clearSlowLoadingTimeout(),
          (this.slowLoadingTimeoutId = window.setTimeout(
            this.onSlowLoadingTimeout,
            150
          ));
      }
      clearSlowLoadingTimeout() {
        null !== this.slowLoadingTimeoutId &&
          (window.clearTimeout(this.slowLoadingTimeoutId),
          (this.slowLoadingTimeoutId = null));
      }
      render() {
        const { isLoadingDiff: e, isLoadingSlow: t } = this.state,
          {
            repository: n,
            imageDiffType: r,
            readOnly: i,
            hideWhitespaceInDiff: o,
            showSideBySideDiff: s,
            onIncludeChanged: a,
            onDiscardChanges: l,
            diff: c,
            file: u,
            onOpenBinaryFile: h,
            onChangeImageDiffType: d,
          } = this.state.propSnapshot,
          p = ph()("seamless-diff-switcher", {
            loading: e,
            slow: e && t,
            "has-diff": null !== c,
          }),
          f = e
            ? w.createElement(
                "div",
                { className: "loading-indicator" },
                w.createElement(cp, null)
              )
            : null;
        return w.createElement(
          "div",
          { className: p },
          null !== c
            ? w.createElement(km, {
                repository: n,
                imageDiffType: r,
                file: u,
                diff: c,
                readOnly: i,
                hideWhitespaceInDiff: o,
                showSideBySideDiff: s,
                askForConfirmationOnDiscardChanges: this.props
                  .askForConfirmationOnDiscardChanges,
                onIncludeChanged: e ? xm : a,
                onDiscardChanges: e ? xm : l,
                onOpenBinaryFile: e ? xm : h,
                onChangeImageDiffType: e ? xm : d,
              })
            : null,
          f
        );
      }
    }
    class Tm extends w.Component {
      constructor() {
        super(...arguments),
          (this.onDiffLineIncludeChanged = (e) => {
            const t = this.props.file;
            this.props.dispatcher.changeFileLineSelection(
              this.props.repository,
              t,
              e
            );
          }),
          (this.onDiscardChanges = (e, t) => {
            this.props.askForConfirmationOnDiscardChanges
              ? this.props.dispatcher.showPopup({
                  type: ao.ConfirmDiscardSelection,
                  repository: this.props.repository,
                  file: this.props.file,
                  diff: e,
                  selection: t,
                })
              : this.props.dispatcher.discardChangesFromSelection(
                  this.props.repository,
                  this.props.file.path,
                  e,
                  t
                );
          }),
          (this.onShowSideBySideDiffChanged = (e) => {
            this.props.dispatcher.onShowSideBySideDiffChanged(e);
          });
      }
      render() {
        const e = this.props.diff,
          t = this.props.file,
          n = this.props.isCommitting;
        return w.createElement(
          "div",
          { className: "changed-file" },
          w.createElement(lf, {
            path: t.path,
            status: t.status,
            diff: e,
            showSideBySideDiff: this.props.showSideBySideDiff,
            onShowSideBySideDiffChanged: this.onShowSideBySideDiffChanged,
            onDiffOptionsOpened: this.props.onDiffOptionsOpened,
          }),
          w.createElement(Rm, {
            repository: this.props.repository,
            imageDiffType: this.props.imageDiffType,
            file: t,
            readOnly: n,
            onIncludeChanged: this.onDiffLineIncludeChanged,
            onDiscardChanges: this.onDiscardChanges,
            diff: e,
            hideWhitespaceInDiff: this.props.hideWhitespaceInDiff,
            showSideBySideDiff: this.props.showSideBySideDiff,
            askForConfirmationOnDiscardChanges: this.props
              .askForConfirmationOnDiscardChanges,
            onOpenBinaryFile: this.props.onOpenBinaryFile,
            onChangeImageDiffType: this.props.onChangeImageDiffType,
          })
        );
      }
    }
    function Dm(e) {
      switch (e.toLowerCase()) {
        case "cmdorctrl":
        case "commandorcontrol":
          return "Ctrl";
        case "ctrl":
        case "control":
          return "Ctrl";
        case "shift":
          return "Shift";
        case "alt":
          return "Alt";
        case "cmd":
        case "command":
          return "⌘";
        case "option":
          return "⌥";
        case " ":
          return "Space";
      }
      return e;
    }
    class Am extends w.Component {
      render() {
        const e = "primary" === this.props.type,
          t = ph()("suggested-action", { primary: e }),
          n =
            void 0 === this.props.description
              ? void 0
              : w.createElement(
                  "p",
                  { className: "description" },
                  this.props.description
                );
        return w.createElement(
          "div",
          { className: t },
          this.props.image &&
            w.createElement(
              "div",
              { className: "image-wrapper" },
              this.props.image
            ),
          w.createElement(
            "div",
            { className: "text-wrapper" },
            w.createElement("h2", null, this.props.title),
            n,
            this.props.discoverabilityContent &&
              w.createElement(
                "p",
                { className: "discoverability" },
                this.props.discoverabilityContent
              )
          ),
          w.createElement(
            Ud,
            {
              type: e ? "submit" : void 0,
              onClick: this.props.onClick,
              disabled: this.props.disabled,
            },
            this.props.buttonText
          )
        );
      }
    }
    class _m extends w.Component {
      constructor() {
        super(...arguments),
          (this.onClick = (e) => {
            void 0 !== this.props.onClick && this.props.onClick(e),
              e.defaultPrevented || oe(this.props.menuItemId);
          });
      }
      render() {
        return w.createElement(Am, {
          title: this.props.title,
          description: this.props.description,
          discoverabilityContent: this.props.discoverabilityContent,
          buttonText: this.props.buttonText,
          onClick: this.onClick,
          type: this.props.type,
          disabled: this.props.disabled,
        });
      }
    }
    var Mm = n(138),
      Pm = n.n(Mm);
    const Im = (e) => {
      const t = "suggested-action-group " + (e.type ? e.type : "normal");
      if ("replace" === e.transitions) {
        const n = void 0 === e.enableTransitions || e.enableTransitions;
        return w.createElement(
          Pm.a,
          {
            transitionAppear: !1,
            overflowHidden: !1,
            transitionEnter: n,
            transitionLeave: n,
            transitionName: e.transitions,
            component: "div",
            className: t,
            transitionEnterTimeout: 750,
            transitionLeaveTimeout: 500,
          },
          e.children
        );
      }
      return w.createElement("div", { className: t }, e.children);
    };
    class Om extends w.Component {
      render() {
        return w.createElement(
          "em",
          { className: "ref-component" },
          this.props.children
        );
      }
    }
    function Lm(e) {
      return e.replace(/&?&/g, (e) => (e.length > 1 ? "&" : ""));
    }
    const Fm = _c(__dirname, "static/paper-stack.svg");
    function Nm(e) {
      return "separator" === e.type ||
        "submenuItem" === e.type ||
        null === e.accelerator
        ? []
        : e.accelerator.split("+").map(Dm);
    }
    class Bm extends w.Component {
      constructor(e) {
        super(e),
          (this.getMenuInfoMap = hi((e) =>
            void 0 === e
              ? new Map()
              : (function e(t, n = new Map(), r) {
                  for (const i of t.items) {
                    if ("separator" === i.type) continue;
                    const t = {
                      label: i.label,
                      acceleratorKeys: Nm(i),
                      parentMenuLabels:
                        void 0 === r ? [] : [r.label, ...r.parentMenuLabels],
                      enabled: i.enabled,
                    };
                    n.set(i.id, t), "submenuItem" === i.type && e(i.menu, n, t);
                  }
                  return n;
                })(e)
          )),
          (this.transitionTimer = null),
          (this.onShowInFileManagerClicked = () =>
            this.props.dispatcher.recordSuggestedStepOpenWorkingDirectory()),
          (this.onViewOnGitHubClicked = () =>
            this.props.dispatcher.recordSuggestedStepViewOnGitHub()),
          (this.openPreferences = () => {
            oe("preferences");
          }),
          (this.onOpenInExternalEditorClicked = () =>
            this.props.dispatcher.recordSuggestedStepOpenInExternalEditor()),
          (this.onViewStashClicked = () =>
            this.props.dispatcher.recordSuggestedStepViewStash()),
          (this.onPublishRepositoryClicked = () =>
            this.props.dispatcher.recordSuggestedStepPublishRepository()),
          (this.onPublishBranchClicked = () =>
            this.props.dispatcher.recordSuggestedStepPublishBranch()),
          (this.onCreatePullRequestClicked = () =>
            this.props.dispatcher.recordSuggestedStepCreatePullRequest()),
          (this.state = { enableTransitions: !1 });
      }
      getMenuItemInfo(e) {
        return this.getMenuInfoMap(this.props.appMenu).get(e);
      }
      getPlatformFileManagerName() {
        return "Explorer";
      }
      renderDiscoverabilityElements(e) {
        const t = (function (e) {
          return Lm(e.parentMenuLabels.join(" -> "));
        })(e);
        return w.createElement(
          w.Fragment,
          null,
          "",
          // t,
          " 使用快捷键",
          " ",
          this.renderDiscoverabilityKeyboardShortcut(e)
        );
      }
      renderDiscoverabilityKeyboardShortcut(e) {
        return e.acceleratorKeys.map((e, t) =>
          w.createElement("kbd", { key: e + t }, e)
        );
      }
      renderMenuBackedAction(e, t, n, r) {
        const i = this.getMenuItemInfo(e);
        return void 0 === i
          ? (log.error("Could not find matching menu item for " + e), null)
          : w.createElement(_m, {
              title: t,
              description: n,
              discoverabilityContent: this.renderDiscoverabilityElements(i),
              menuItemId: e,
              buttonText: Lm(i.label),
              disabled: !i.enabled,
              onClick: r,
            });
      }
      renderShowInFileManager() {
        const e = this.getPlatformFileManagerName();
        return this.renderMenuBackedAction(
          "open-working-directory",
          "在 " + e+" 资源管理器中打开",
          void 0,
          this.onShowInFileManagerClicked
        );
      }
      renderViewOnGitHub() {
        return null !== this.props.repository.gitHubRepository
          ? this.renderMenuBackedAction(
              "view-repository-on-github",
              "Open the repository page on GitHub in your browser",
              void 0,
              this.onViewOnGitHubClicked
            )
          : null;
      }
      renderOpenInExternalEditor() {
        if (!this.props.isExternalEditorAvailable) return null;
        const e = "open-external-editor";
        if (void 0 === this.getMenuItemInfo(e))
          return log.error("Could not find matching menu item for " + e), null;
        if (void 0 === this.getMenuItemInfo("preferences"))
          return log.error("Could not find matching menu item for " + e), null;
        const t = w.createElement(
          w.Fragment,
          null,
          "",
          "打开",
          w.createElement(_d, { onClick: this.openPreferences }, "选项"),"来设置您的编辑器"
        );
        return this.renderMenuBackedAction(
          e,
          "在外部编辑器中打开存储库",
          t,
          this.onOpenInExternalEditorClicked
        );
      }
      renderRemoteAction() {
        const {
            remote: e,
            aheadBehind: t,
            branchesState: n,
            tagsToPush: r,
          } = this.props.repositoryState,
          { tip: i, defaultBranch: o, currentPullRequest: s } = n;
        if (i.kind !== so.Valid) return null;
        if (null === e) return this.renderPublishRepositoryAction();
        if (null === t) return this.renderPublishBranchAction(i);
        if (bl(n, t)) return null;
        if (t.behind > 0) return this.renderPullBranchAction(i, e, t);
        if (t.ahead > 0 || (null !== r && r.length > 0))
          return this.renderPushBranchAction(i, e, t, r);
        const a = null !== this.props.repository.gitHubRepository,
          l = null !== s,
          c = null !== o && i.branch.name === o.name;
        return !a || l || c ? null : this.renderCreatePullRequestAction(i);
      }
      renderViewStashAction() {
        const {
            changesState: e,
            branchesState: t,
          } = this.props.repositoryState,
          { tip: n } = t;
        if (n.kind !== so.Valid) return null;
        const { stashEntry: r } = e;
        if (null === r) return null;
        if (r.files.kind !== Hc.Loaded) return null;
        const i = r.files.files.length,
          o = w.createElement(
            w.Fragment,
            null,
            "You have ",
            i,
            " ",
            1 === i ? "change" : "changes",
            " in progress that you have not yet committed."
          ),
          s = w.createElement(
            w.Fragment,
            null,
            "When a stash exists, access it at the bottom of the Changes tab to the left."
          ),
          a = "toggle-stashed-changes",
          l = this.getMenuItemInfo(a);
        return void 0 === l
          ? (log.error("Could not find matching menu item for " + a), null)
          : w.createElement(_m, {
              key: "view-stash-action",
              title: "View your stashed changes",
              menuItemId: a,
              description: o,
              discoverabilityContent: s,
              buttonText: "View stash",
              type: "primary",
              disabled: null !== l && !l.enabled,
              onClick: this.onViewStashClicked,
            });
      }
      renderPublishRepositoryAction() {
        const e = this.getMenuItemInfo("push");
        if (void 0 === e)
          return log.error("Could not find matching menu item for push"), null;
        const t = w.createElement(
          w.Fragment,
          null,
          "使用快捷键",
          " ",
          this.renderDiscoverabilityKeyboardShortcut(e)
        );
        return w.createElement(_m, {
          key: "publish-repository-action",
          title: "将您的存储库发布到GitHub",
          description:
            "该存储库当前仅在本地计算机上可用。通过将其发布在GitHub上，您可以共享它并与他人协作。",
          discoverabilityContent: t,
          buttonText: "发布存储库",
          menuItemId: "push",
          type: "primary",
          disabled: !e.enabled,
          onClick: this.onPublishRepositoryClicked,
        });
      }
      renderPublishBranchAction(e) {
        const t = this.getMenuItemInfo("push");
        if (void 0 === t)
          return log.error("Could not find matching menu item for push"), null;
        const n = null !== this.props.repository.gitHubRepository,
          r = w.createElement(
            w.Fragment,
            null,
            "The current branch (",
            w.createElement(Om, null, e.branch.name),
            ") hasn't been published to the remote yet. By publishing it ",
            n ? "to GitHub" : "",
            " you can share it, ",
            n ? "open a pull request, " : "",
            "and collaborate with others."
          ),
          i = w.createElement(
            w.Fragment,
            null,
            "Always available in the toolbar or",
            " ",
            this.renderDiscoverabilityKeyboardShortcut(t)
          );
        return w.createElement(_m, {
          key: "publish-branch-action",
          title: "Publish your branch",
          menuItemId: "push",
          description: r,
          discoverabilityContent: i,
          buttonText: "Publish branch",
          type: "primary",
          disabled: !t.enabled,
          onClick: this.onPublishBranchClicked,
        });
      }
      renderPullBranchAction(e, t, n) {
        const r = this.getMenuItemInfo("pull");
        if (void 0 === r)
          return log.error("Could not find matching menu item for pull"), null;
        const i = null !== this.props.repository.gitHubRepository,
          o = w.createElement(
            w.Fragment,
            null,
            "The current branch (",
            w.createElement(Om, null, e.branch.name),
            ") has",
            " ",
            1 === n.behind ? "a commit" : "commits",
            " on",
            " ",
            i ? "GitHub" : "the remote",
            " that",
            " ",
            1 === n.behind ? "does not" : "do not",
            " exist on your machine."
          ),
          s = w.createElement(
            w.Fragment,
            null,
            "Always available in the toolbar when there are remote changes or",
            " ",
            this.renderDiscoverabilityKeyboardShortcut(r)
          ),
          a = `Pull ${n.behind} ${
            1 === n.behind ? "commit" : "commits"
          } from the ${t.name} remote`,
          l = "Pull " + t.name;
        return w.createElement(_m, {
          key: "pull-branch-action",
          title: a,
          menuItemId: "pull",
          description: o,
          discoverabilityContent: s,
          buttonText: l,
          type: "primary",
          disabled: !r.enabled,
        });
      }
      renderPushBranchAction(e, t, n, r) {
        const i = this.getMenuItemInfo("push");
        if (void 0 === i)
          return log.error("Could not find matching menu item for push"), null;
        const o = null !== this.props.repository.gitHubRepository,
          s = [],
          a = [];
        n.ahead > 0 &&
          (s.push("【本地提交】"),
          a.push(
            1 === n.ahead ? "1 项本地的提交" : n.ahead + " 项本地的提交"
          )),
          null !== r &&
            r.length > 0 &&
            (s.push("tags"),
            a.push(1 === r.length ? "1 tag" : r.length + " tags"));
        const l = `您有${a.join(" 和 ")}等待被推送到${
            o ? "GitHub" : "远程仓库"
          }.`,
          c = w.createElement(
            w.Fragment,
            null,
            "使用快捷键",
            this.renderDiscoverabilityKeyboardShortcut(i),
          ),
          u = `推送 ${s.join(" 和 ")} 到远程仓库 ${t.name} `,
          h = "推送到 " + t.name;
        return w.createElement(_m, {
          key: "push-branch-action",
          title: u,
          menuItemId: "push",
          description: l,
          discoverabilityContent: c,
          buttonText: h,
          type: "primary",
          disabled: !i.enabled,
        });
      }
      renderCreatePullRequestAction(e) {
        const t = "create-pull-request",
          n = this.getMenuItemInfo(t);
        if (void 0 === n)
          return log.error("Could not find matching menu item for " + t), null;
        const r = w.createElement(
          w.Fragment,
          null,
          "The current branch (",
          w.createElement(Om, null, e.branch.name),
          ") is already published to GitHub. Create a pull request to propose and collaborate on your changes."
        );
        return w.createElement(_m, {
          key: "create-pr-action",
          title: "Create a Pull Request from your current branch",
          menuItemId: t,
          description: r,
          buttonText: "Create Pull Request",
          discoverabilityContent: this.renderDiscoverabilityElements(n),
          type: "primary",
          disabled: !n.enabled,
          onClick: this.onCreatePullRequestClicked,
        });
      }
      renderActions() {
        return w.createElement(
          w.Fragment,
          null,
          w.createElement(
            Im,
            {
              type: "primary",
              transitions: "replace",
              enableTransitions: this.state.enableTransitions,
            },
            this.renderViewStashAction() || this.renderRemoteAction()
          ),
          w.createElement(
            Im,
            null,
            this.renderOpenInExternalEditor(),
            this.renderShowInFileManager(),
            this.renderViewOnGitHub()
          )
        );
      }
      componentDidMount() {
        this.transitionTimer = window.setTimeout(() => {
          this.setState({ enableTransitions: !0 }),
            (this.transitionTimer = null);
        }, 500);
      }
      componentWillUnmount() {
        null !== this.transitionTimer && clearTimeout(this.transitionTimer);
      }
      render() {
        return w.createElement(
          "div",
          { id: "no-changes" },
          w.createElement(
            "div",
            { className: "content" },
            w.createElement(
              "div",
              { className: "header" },
              w.createElement(
                "div",
                { className: "text" },
                w.createElement("h1", null, "本地暂无更改"),
                w.createElement(
                  "p",
                  null,
                  "当前本地存储库没有未提交的更改。您可以进行以下操作..."
                )
              ),
              w.createElement("img", { src: Fm, className: "blankslate-image" })
            ),
            this.renderActions()
          )
        );
      }
    }
    const Hm = _c(__dirname, "static/multiple-files-selected.svg");
    class zm extends w.Component {
      render() {
        return w.createElement(
          "div",
          { className: "panel blankslate", id: "no-changes" },
          w.createElement("img", { src: Hm, className: "blankslate-image" }),
          w.createElement("div", null, this.props.count, " files selected")
        );
      }
    }
    class Um extends w.Component {
      render() {
        const e = this.props.filesChangedCount,
          t = e > 300 ? "300+" : e;
        return w.createElement("span", { className: "counter" }, t);
      }
    }
    class Wm extends w.Component {
      constructor() {
        super(...arguments),
          (this.startWidth = null),
          (this.startX = null),
          (this.handleDragStart = (e) => {
            (this.startX = e.clientX),
              (this.startWidth = this.getCurrentWidth() || null),
              document.addEventListener("mousemove", this.handleDragMove),
              document.addEventListener("mouseup", this.handleDragStop),
              e.preventDefault();
          }),
          (this.handleDragMove = (e) => {
            if (null == this.startWidth || null == this.startX) return;
            const t = e.clientX - this.startX,
              n = this.startWidth + t,
              r = this.clampWidth(n);
            this.props.onResize && this.props.onResize(r), e.preventDefault();
          }),
          (this.handleDragStop = (e) => {
            document.removeEventListener("mousemove", this.handleDragMove),
              document.removeEventListener("mouseup", this.handleDragStop),
              e.preventDefault();
          }),
          (this.handleDoubleClick = () => {
            this.props.onReset && this.props.onReset();
          });
      }
      getCurrentWidth() {
        return this.clampWidth(this.props.width);
      }
      clampWidth(e) {
        return Math.max(
          this.props.minimumWidth,
          Math.min(this.props.maximumWidth, e)
        );
      }
      render() {
        const e = {
          width: this.getCurrentWidth(),
          maxWidth: this.props.maximumWidth,
          minWidth: this.props.minimumWidth,
        };
        return w.createElement(
          "div",
          { id: this.props.id, className: "resizable-component", style: e },
          this.props.children,
          w.createElement("div", {
            onMouseDown: this.handleDragStart,
            onDoubleClick: this.handleDoubleClick,
            className: "resize-handle",
          })
        );
      }
    }
    Wm.defaultProps = { width: 250, maximumWidth: 350, minimumWidth: 200 };
    class jm extends w.Component {
      render() {
        const e = [],
          t = this.props.users;
        for (let n = 0; n < this.props.users.length; n++)
          t.length > 3 &&
            2 === n &&
            e.push(
              w.createElement("div", {
                key: "more",
                className: "avatar-more avatar",
              })
            ),
            e.push(
              w.createElement(lp, { key: "" + n, user: t[n], title: null })
            );
        const n = ph()("AvatarStack", {
          "AvatarStack--small": !0,
          "AvatarStack--two": 2 === t.length,
          "AvatarStack--three-plus": t.length >= 3,
        });
        return w.createElement(
          "div",
          { className: n },
          w.createElement("div", { className: "AvatarStack-body" }, e)
        );
      }
    }
    class Vm extends w.Component {
      renderAuthorInline(e) {
        return w.createElement("span", { className: "author" }, e.name);
      }
      renderAuthors(e) {
        if (1 === e.length)
          return w.createElement(
            "span",
            { className: "authors" },
            this.renderAuthorInline(e[0])
          );
        if (2 === e.length) {
          const t = e.map((e) => e.name).join(", ");
          return w.createElement(
            "span",
            { className: "authors", title: t },
            this.renderAuthorInline(e[0]),
            ", ",
            this.renderAuthorInline(e[1])
          );
        }
        {
          const t = e.map((e) => e.name).join(", ");
          return w.createElement(
            "span",
            { className: "authors", title: t },
            e.length,
            " people"
          );
        }
      }
      render() {
        const e = this.props.commit,
          { author: t, committer: n, coAuthors: r } = e,
          i = !(
            e.authoredByCommitter ||
            (null !== this.props.gitHubRepository &&
              Pp(e, this.props.gitHubRepository))
          )
            ? [t, n, ...r]
            : [t, ...r];
        return w.createElement(
          "span",
          { className: "commit-attribution-component" },
          this.renderAuthors(i)
        );
      }
    }
    function Gm() {
      return $m("…");
    }
    function $m(e) {
      return { kind: Yp.Text, text: e };
    }
    function qm(e, t) {
      return { kind: Yp.Link, text: e, url: t };
    }
    function Km(e, t) {
      const n = new Qp(t.emoji, t.repository),
        { summary: r, body: i } = (function (e, t, n, r = 72) {
          const i = n.tokenize(e.trimRight()),
            o = new Array(),
            s = new Array();
          let a = r;
          for (const e of i) {
            const t = e.kind === Yp.Emoji ? 2 : e.text.length;
            if (a <= 0) s.push(e);
            else if (a >= t) o.push(e), (a -= t);
            else {
              if (e.kind === Yp.Text)
                o.push($m(e.text.substr(0, a))), s.push($m(e.text.substr(a)));
              else if (e.kind === Yp.Emoji) s.push(e);
              else {
                if (e.kind !== Yp.Link) return X(0, "Unknown token type");
                !e.text.startsWith("#") && a > 5
                  ? (o.push(qm(e.text.substr(0, a), e.text)),
                    s.push(qm(e.text.substr(a), e.text)))
                  : s.push(e);
              }
              a = 0;
            }
          }
          let l = n.tokenize(t.trimRight());
          return (
            s.length > 0 &&
              (o.push(Gm()),
              (l =
                l.length > 0 ? [Gm(), ...s, $m("\n\n"), ...l] : [Gm(), ...s])),
            { summary: o, body: l }
          );
        })(t.commit.summary, t.commit.body, n);
      return {
        isOverflowed: e,
        summary: r,
        body: i,
        avatarUsers: Op(t.repository.gitHubRepository, t.commit),
      };
    }
    class Ym extends w.Component {
      constructor(e) {
        super(e),
          (this.descriptionScrollViewRef = null),
          (this.resizeObserver = null),
          (this.updateOverflowTimeoutId = null),
          (this.descriptionRef = null),
          (this.onHideWhitespaceInDiffChanged = (e) => {
            const t = e.currentTarget.checked;
            this.props.onHideWhitespaceInDiffChanged(t);
          }),
          (this.onResized = () => {
            if (this.descriptionRef) {
              const e = this.descriptionRef.getBoundingClientRect().bottom;
              this.props.onDescriptionBottomChanged(e);
            }
            this.props.isExpanded || this.updateOverflow();
          }),
          (this.onDescriptionScrollViewRef = (e) => {
            (this.descriptionScrollViewRef = e),
              this.resizeObserver &&
                (this.resizeObserver.disconnect(),
                e
                  ? this.resizeObserver.observe(e)
                  : this.setState({ isOverflowed: !1 }));
          }),
          (this.onDescriptionRef = (e) => {
            this.descriptionRef = e;
          }),
          (this.onExpand = () => {
            this.props.onExpandChanged(!0);
          }),
          (this.onCollapse = () => {
            this.descriptionScrollViewRef &&
              (this.descriptionScrollViewRef.scrollTop = 0),
              this.props.onExpandChanged(!1);
          }),
          (this.state = Km(!1, e));
        const t = window.ResizeObserver;
        t &&
          (this.resizeObserver = new t((e) => {
            for (const t of e)
              t.target === this.descriptionScrollViewRef &&
                (null !== this.updateOverflowTimeoutId &&
                  clearImmediate(this.updateOverflowTimeoutId),
                (this.updateOverflowTimeoutId = setImmediate(this.onResized)));
          }));
      }
      renderExpander() {
        if (
          !this.state.body.length ||
          (!this.props.isExpanded && !this.state.isOverflowed)
        )
          return null;
        const e = this.props.isExpanded,
          t = e ? this.onCollapse : this.onExpand,
          n = e ? wh.fold : wh.unfold;
        return w.createElement(
          "a",
          { onClick: t, className: "expander" },
          w.createElement(vh, { symbol: n }),
          e ? "Collapse" : "Expand"
        );
      }
      updateOverflow() {
        const e = this.descriptionScrollViewRef;
        e
          ? this.setState({ isOverflowed: e.scrollHeight > e.offsetHeight })
          : this.state.isOverflowed && this.setState({ isOverflowed: !1 });
      }
      componentDidMount() {
        this.props.isExpanded || this.updateOverflow();
      }
      componentWillUpdate(e) {
        var t, n;
        (t = e.commit),
          (n = this.props.commit),
          (t.summary !== n.summary || t.body !== n.body) &&
            this.setState(Km(!1, e));
      }
      componentDidUpdate(e, t) {
        this.props.isExpanded
          ? this.state.isOverflowed && this.setState({ isOverflowed: !1 })
          : (t.body !== this.state.body || e.isExpanded) &&
            this.updateOverflow();
      }
      renderDescription() {
        return 0 === this.state.body.length
          ? null
          : w.createElement(
              "div",
              {
                className: "commit-summary-description-container",
                ref: this.onDescriptionRef,
              },
              w.createElement(
                "div",
                {
                  className: "commit-summary-description-scroll-view",
                  ref: this.onDescriptionScrollViewRef,
                },
                w.createElement(Xp, {
                  className: "commit-summary-description",
                  emoji: this.props.emoji,
                  repository: this.props.repository,
                  text: this.state.body,
                })
              ),
              this.renderExpander()
            );
      }
      render() {
        const e = this.props.files.length,
          t = `${e}${1 === e ? "文件" : "文件"} 更改 `,
          n = this.props.commit.shortSha,
          r = ph()({
            expanded: this.props.isExpanded,
            collapsed: !this.props.isExpanded,
            "has-expander": this.props.isExpanded || this.state.isOverflowed,
            "hide-description-border": this.props.hideDescriptionBorder,
          });
        return w.createElement(
          "div",
          { id: "commit-summary", className: r },
          w.createElement(
            "div",
            { className: "commit-summary-header" },
            w.createElement(Xp, {
              className: "commit-summary-title",
              emoji: this.props.emoji,
              repository: this.props.repository,
              text: this.state.summary,
            }),
            w.createElement(
              "ul",
              { className: "commit-summary-meta" },
              w.createElement(
                "li",
                {
                  className: "commit-summary-meta-item without-truncation",
                  "aria-label": "Author",
                },
                w.createElement(jm, { users: this.state.avatarUsers }),
                w.createElement(Vm, {
                  gitHubRepository: this.props.repository.gitHubRepository,
                  commit: this.props.commit,
                })
              ),
              w.createElement(
                "li",
                {
                  className: "commit-summary-meta-item without-truncation",
                  "aria-label": "SHA",
                },
                w.createElement(
                  "span",
                  { "aria-hidden": "true" },
                  w.createElement(vh, { symbol: wh.gitCommit })
                ),
                w.createElement("span", { className: "sha" }, n)
              ),
              w.createElement(
                "li",
                {
                  className: "commit-summary-meta-item without-truncation",
                  title: t,
                },
                w.createElement(
                  "span",
                  { "aria-hidden": "true" },
                  w.createElement(vh, { symbol: wh.diff })
                ),
                t
              ),
              this.renderTags(),
              !0,
              w.createElement(
                w.Fragment,
                null,
                w.createElement(
                  "li",
                  {
                    className: "commit-summary-meta-item without-truncation",
                    title: "设置分隔视图",
                  },
                  w.createElement(af, {
                    onHideWhitespaceChangesChanged: this.props
                      .onHideWhitespaceInDiffChanged,
                    hideWhitespaceChanges: this.props.hideWhitespaceInDiff,
                    showSideBySideDiff: this.props.showSideBySideDiff,
                    onShowSideBySideDiffChanged: this.props
                      .onShowSideBySideDiffChanged,
                    onDiffOptionsOpened: this.props.onDiffOptionsOpened,
                  })
                )
              )
            )
          ),
          this.renderDescription()
        );
      }
      renderTags() {
        const e = this.props.commit.tags || [];
        return 0 === e.length
          ? null
          : w.createElement(
              "li",
              { className: "commit-summary-meta-item", title: e.join("\n") },
              w.createElement(
                "span",
                { "aria-label": "Tags" },
                w.createElement(vh, { symbol: wh.tag })
              ),
              w.createElement("span", { className: "tags" }, e.join(", "))
            );
      }
    }
    class Qm extends w.Component {
      constructor() {
        super(...arguments),
          (this.onContextMenu = (e) => {
            void 0 !== this.props.onContextMenu &&
              this.props.onContextMenu(this.props.file, e);
          });
      }
      render() {
        const { file: e } = this.props,
          t = e.status,
          n = Vl(t),
          r = this.props.availableWidth - 20 - 5 - 16;
        return w.createElement(
          "div",
          { className: "file", onContextMenu: this.onContextMenu },
          w.createElement(Wp, {
            path: e.path,
            status: e.status,
            availableWidth: r,
          }),
          w.createElement(vh, {
            symbol: Sh(t),
            className: "status status-" + n.toLowerCase(),
            title: n,
          })
        );
      }
    }
    class Zm extends w.Component {
      constructor() {
        super(...arguments),
          (this.onSelectedRowChanged = (e) => {
            const t = this.props.files[e];
            this.props.onSelectedFileChanged(t);
          }),
          (this.renderFile = (e) =>
            w.createElement(Qm, {
              file: this.props.files[e],
              availableWidth: this.props.availableWidth,
              onContextMenu: this.props.onContextMenu,
            }));
      }
      rowForFile(e) {
        return e ? this.props.files.findIndex((t) => t.path === e.path) : -1;
      }
      render() {
        return w.createElement(
          "div",
          { className: "file-list" },
          w.createElement(Ad, {
            rowRenderer: this.renderFile,
            rowCount: this.props.files.length,
            rowHeight: 29,
            selectedRows: [this.rowForFile(this.props.selectedFile)],
            onSelectedRowChanged: this.onSelectedRowChanged,
          })
        );
      }
    }
    class Xm extends w.Component {
      constructor(e) {
        super(e),
          (this.loadChangedFilesScheduler = new ep(200)),
          (this.historyRef = null),
          (this.onFileSelected = (e) => {
            this.props.dispatcher.changeFileSelection(this.props.repository, e);
          }),
          (this.onHistoryRef = (e) => {
            this.historyRef = e;
          }),
          (this.onExpandChanged = (e) => {
            this.setState({ isExpanded: e });
          }),
          (this.onDescriptionBottomChanged = (e) => {
            if (this.historyRef) {
              const t = this.historyRef.getBoundingClientRect().bottom;
              this.setState({ hideDescriptionBorder: e >= t });
            }
          }),
          (this.onHideWhitespaceInDiffChanged = (e) => {
            this.props.dispatcher.onHideWhitespaceInDiffChanged(
              e,
              this.props.repository,
              this.props.selectedFile
            );
          }),
          (this.onShowSideBySideDiffChanged = (e) => {
            this.props.dispatcher.onShowSideBySideDiffChanged(e);
          }),
          (this.onCommitSummaryReset = () => {
            this.props.dispatcher.resetCommitSummaryWidth();
          }),
          (this.onCommitSummaryResize = (e) => {
            this.props.dispatcher.setCommitSummaryWidth(e);
          }),
          (this.onOpenItem = (e) => {
            tf(i.join(this.props.repository.path, e), this.props.dispatcher);
          }),
          (this.onContextMenu = async (e, t) => {
            t.preventDefault();
            const n = i.join(this.props.repository.path, e.path),
              o = await Object(_i.pathExists)(n);
            if (!o)
              return void se([
                { label: "File does not exist on disk", enabled: !1 },
              ]);
            const s = Lu(i.extname(e.path));
            se([
              {
                label: "Copy file path",
                action: () => r.clipboard.writeText(n),
              },
              {
                label: "Show in Explorer",
                action: () => ne(this.props.repository, e.path),
                enabled: o,
              },
              {
                label: this.props.externalEditorLabel
                  ? "Open in " + this.props.externalEditorLabel
                  : "Open in external editor",
                action: () => this.props.onOpenInExternalEditor(n),
                enabled: s && o,
              },
              {
                label: "Open with default program",
                action: () => this.onOpenItem(e.path),
                enabled: s && o,
              },
            ]);
          }),
          (this.state = { isExpanded: !1, hideDescriptionBorder: !1 });
      }
      componentWillUpdate(e) {
        const t = this.props.selectedCommit
            ? this.props.selectedCommit.sha
            : void 0,
          n = e.selectedCommit ? e.selectedCommit.sha : void 0;
        (t || n) &&
          t !== n &&
          this.state.isExpanded &&
          this.setState({ isExpanded: !1 });
      }
      componentWillUnmount() {
        this.loadChangedFilesScheduler.clear();
      }
      renderDiff() {
        const e = this.props.selectedFile,
          t = this.props.currentDiff;
        if (null == e) {
          const e =
            0 === this.props.changedFiles.length ? "" : "No file selected";
          return w.createElement(
            "div",
            { className: "panel blankslate", id: "diff" },
            e
          );
        }
        return w.createElement(Rm, {
          repository: this.props.repository,
          imageDiffType: this.props.selectedDiffType,
          file: e,
          diff: t,
          readOnly: !0,
          hideWhitespaceInDiff: this.props.hideWhitespaceInDiff,
          showSideBySideDiff: this.props.showSideBySideDiff,
          onOpenBinaryFile: this.props.onOpenBinaryFile,
          onChangeImageDiffType: this.props.onChangeImageDiffType,
        });
      }
      renderCommitSummary(e) {
        return w.createElement(Ym, {
          commit: e,
          files: this.props.changedFiles,
          emoji: this.props.emoji,
          repository: this.props.repository,
          onExpandChanged: this.onExpandChanged,
          isExpanded: this.state.isExpanded,
          onDescriptionBottomChanged: this.onDescriptionBottomChanged,
          hideDescriptionBorder: this.state.hideDescriptionBorder,
          hideWhitespaceInDiff: this.props.hideWhitespaceInDiff,
          showSideBySideDiff: this.props.showSideBySideDiff,
          onHideWhitespaceInDiffChanged: this.onHideWhitespaceInDiffChanged,
          onShowSideBySideDiffChanged: this.onShowSideBySideDiffChanged,
          onDiffOptionsOpened: this.props.onDiffOptionsOpened,
        });
      }
      renderFileList() {
        const e = this.props.changedFiles;
        if (0 === e.length)
          return w.createElement(
            "div",
            { className: "fill-window" },
            "没有文件提交"
          );
        const t = this.props.commitSummaryWidth - 1;
        return w.createElement(Zm, {
          files: e,
          onSelectedFileChanged: this.onFileSelected,
          selectedFile: this.props.selectedFile,
          availableWidth: t,
          onContextMenu: this.onContextMenu,
        });
      }
      render() {
        const e = this.props.selectedCommit;
        if (null == e) return w.createElement(Jm, null);
        const t = this.state.isExpanded ? "expanded" : "collapsed";
        return w.createElement(
          "div",
          { id: "history", ref: this.onHistoryRef, className: t },
          this.renderCommitSummary(e),
          w.createElement(
            "div",
            { className: "commit-details" },
            w.createElement(
              Wm,
              {
                width: this.props.commitSummaryWidth,
                onResize: this.onCommitSummaryResize,
                onReset: this.onCommitSummaryReset,
              },
              this.renderFileList()
            ),
            this.renderDiff()
          )
        );
      }
    }
    function Jm() {
      const e = _c(__dirname, "static/empty-no-commit.svg");
      return w.createElement(
        "div",
        { className: "panel blankslate" },
        w.createElement("img", { src: e, className: "blankslate-image" }),
        "未选择提交"
      );
    }
    class eg extends w.PureComponent {
      constructor(e) {
        super(e),
          (this.onCopySHA = () => {
            r.clipboard.writeText(this.props.commit.sha);
          }),
          (this.onViewOnGitHub = () => {
            this.props.onViewCommitOnGitHub &&
              this.props.onViewCommitOnGitHub(this.props.commit.sha);
          }),
          (this.onCreateTag = () => {
            this.props.onCreateTag &&
              this.props.onCreateTag(this.props.commit.sha);
          }),
          (this.onContextMenu = (e) => {
            e.preventDefault();
            let t = "View on GitHub";
            const n = this.props.gitHubRepository;
            n && n.endpoint !== gt() && (t = "View on GitHub Enterprise");
            const r = [
              {
                label: "Revert changes in commit",
                action: () => {
                  this.props.onRevertCommit &&
                    this.props.onRevertCommit(this.props.commit);
                },
                enabled: void 0 !== this.props.onRevertCommit,
              },
            ];
            {
              r.push({
                label: "Create Tag…",
                action: this.onCreateTag,
                enabled: void 0 !== this.props.onCreateTag,
              });
              const e = this.getDeleteTagsMenuItem();
              null !== e && r.push({ type: "separator" }, e);
            }
            r.push(
              { type: "separator" },
              { label: "Copy SHA", action: this.onCopySHA },
              {
                label: t,
                action: this.onViewOnGitHub,
                enabled: !this.props.isLocal && !!n,
              }
            ),
              se(r);
          }),
          (this.state = { avatarUsers: Op(e.gitHubRepository, e.commit) });
      }
      componentWillReceiveProps(e) {
        e.commit !== this.props.commit &&
          this.setState({ avatarUsers: Op(e.gitHubRepository, e.commit) });
      }
      render() {
        const e = this.props.commit,
          {
            author: { date: t },
          } = e;
        return w.createElement(
          "div",
          { className: "commit", onContextMenu: this.onContextMenu },
          w.createElement(
            "div",
            { className: "info" },
            w.createElement(Xp, {
              className: "summary",
              emoji: this.props.emoji,
              text: e.summary,
              renderUrlsAsLinks: !1,
            }),
            w.createElement(
              "div",
              { className: "description" },
              w.createElement(jm, { users: this.state.avatarUsers }),
              w.createElement(
                "div",
                { className: "byline" },
                w.createElement(Vm, {
                  gitHubRepository: this.props.gitHubRepository,
                  commit: e,
                }),
                (function (e) {
                  return w.createElement(
                    w.Fragment,
                    null,
                    " • ",
                    w.createElement(Jp, { date: e, abbreviate: !0 })
                  );
                })(t)
              )
            )
          ),
          this.renderCommitIndicators()
        );
      }
      renderCommitIndicators() {
        const e = (function (e) {
            if (0 === e.length) return null;
            const [t] = e;
            return w.createElement(
              "span",
              { className: "tag-indicator" },
              w.createElement("span", { className: "tag-name", key: t }, t),
              e.length > 1 &&
                w.createElement("span", {
                  key: e.length,
                  className: "tag-indicator-more",
                })
            );
          })(this.props.commit.tags),
          t = this.renderUnpushedIndicator();
        return e || t
          ? w.createElement("div", { className: "commit-indicators" }, e, t)
          : null;
      }
      renderUnpushedIndicator() {
        return this.props.showUnpushedIndicator
          ? w.createElement(
              "div",
              {
                className: "unpushed-indicator",
                title: this.props.unpushedIndicatorTitle,
              },
              w.createElement(vh, { symbol: wh.arrowUp })
            )
          : null;
      }
      getDeleteTagsMenuItem() {
        const { unpushedTags: e, onDeleteTag: t, commit: n } = this.props;
        if (void 0 === t || void 0 === e || 0 === n.tags.length) return null;
        if (1 === n.tags.length) {
          const r = n.tags[0];
          return {
            label: "Delete tag " + r,
            action: () => t(r),
            enabled: e.includes(r),
          };
        }
        const r = new Set(e);
        return {
          label: "Delete tag…",
          submenu: n.tags.map((e) => ({
            label: e,
            action: () => t(e),
            enabled: r.has(e),
          })),
        };
      }
    }
    class tg extends w.Component {
      constructor() {
        super(...arguments),
          (this.commitsHash = hi(rg, pu)),
          (this.renderCommit = (e) => {
            const t = this.props.commitSHAs[e],
              n = this.props.commitLookup.get(t);
            if (null == n) return null;
            const r = new Set(this.props.tagsToPush || []),
              i = this.props.localCommitSHAs.includes(n.sha),
              o = n.tags.filter((e) => r.has(e)),
              s = (i || o.length > 0) && !1 === this.props.isLocalRepository;
            return w.createElement(eg, {
              key: n.sha,
              gitHubRepository: this.props.gitHubRepository,
              isLocal: i,
              showUnpushedIndicator: s,
              unpushedIndicatorTitle: this.getUnpushedIndicatorTitle(
                i,
                o.length
              ),
              unpushedTags: o,
              commit: n,
              emoji: this.props.emoji,
              onCreateTag: this.props.onCreateTag,
              onDeleteTag: this.props.onDeleteTag,
              onRevertCommit: this.props.onRevertCommit,
              onViewCommitOnGitHub: this.props.onViewCommitOnGitHub,
            });
          }),
          (this.onSelectedRowChanged = (e) => {
            const t = this.props.commitSHAs[e],
              n = this.props.commitLookup.get(t);
            n && this.props.onCommitSelected(n);
          }),
          (this.onScroll = (e, t) => {
            const n = Math.ceil(t / 50),
              r = Math.floor(e / 50),
              i = r + n;
            this.props.onScroll(r, i),
              null != this.props.onCompareListScrolled &&
                this.props.onCompareListScrolled(e);
          });
      }
      getVisibleCommits() {
        const e = new Array();
        for (const t of this.props.commitSHAs) {
          const n = this.props.commitLookup.get(t);
          void 0 !== n && e.push(n);
        }
        return e;
      }
      getUnpushedIndicatorTitle(e, t) {
        return e
          ? "This commit has not been pushed to the remote repository"
          : t > 0
          ? `This commit has ${t} tag${t > 1 ? "s" : ""} to push`
          : void 0;
      }
      rowForSHA(e) {
        const t = e;
        return t ? this.props.commitSHAs.findIndex((e) => e === t) : -1;
      }
      render() {
        return 0 === this.props.commitSHAs.length
          ? w.createElement(
              "div",
              { className: "panel blankslate" },
              this.props.emptyListMessage
            )
          : w.createElement(
              "div",
              { id: "commit-list" },
              w.createElement(Ad, {
                rowCount: this.props.commitSHAs.length,
                rowHeight: 50,
                selectedRows: [this.rowForSHA(this.props.selectedSHA)],
                rowRenderer: this.renderCommit,
                onSelectedRowChanged: this.onSelectedRowChanged,
                onScroll: this.onScroll,
                invalidationProps: {
                  commits: this.props.commitSHAs,
                  localCommitSHAs: this.props.localCommitSHAs,
                  commitLookupHash: this.commitsHash(this.getVisibleCommits()),
                  tagsToPush: this.props.tagsToPush,
                },
                setScrollTop: this.props.compareListScrollTop,
              })
            );
      }
    }
    function ng(e) {
      return `${e.sha} ${e.tags}`;
    }
    function rg(e) {
      return e.map(ng).join(" ");
    }
    class ig extends w.Component {
      render() {
        const e = ph()("dialog-content", this.props.className);
        return w.createElement(
          "div",
          { className: e, ref: this.props.onRef },
          this.props.children
        );
      }
    }
    class og extends w.Component {
      constructor() {
        super(...arguments),
          (this.onCloseButtonClick = (e) => {
            this.props.onDismissed && this.props.onDismissed();
          });
      }
      renderCloseButton() {
        return this.props.dismissable
          ? w.createElement(
              "a",
              {
                className: "close",
                onClick: this.onCloseButtonClick,
                "aria-label": "close",
                role: "button",
              },
              w.createElement(vh, { symbol: wh.x })
            )
          : null;
      }
      renderTitle() {
        return w.createElement(
          "h1",
          { id: this.props.titleId },
          this.props.title
        );
      }
      render() {
        const e = this.props.loading
          ? w.createElement(vh, { className: "icon spin", symbol: Ch })
          : null;
        return w.createElement(
          "header",
          { className: "dialog-header" },
          this.renderTitle(),
          e,
          this.renderCloseButton(),
          this.props.children
        );
      }
    }
    class sg extends w.Component {
      constructor(e) {
        super(e),
          (this.dialogElement = null),
          (this.disableClickDismissalTimeoutId = null),
          (this.disableClickDismissal = !1),
          (this.resizeDebounceId = null),
          (this.scheduleResizeEvent = () => {
            null !== this.resizeDebounceId &&
              (cancelAnimationFrame(this.resizeDebounceId),
              (this.resizeDebounceId = null)),
              (this.resizeDebounceId = requestAnimationFrame(this.onResized));
          }),
          (this.onResized = () => {
            if (!this.dialogElement) return;
            const { offsetTop: e, offsetHeight: t } = this.dialogElement;
            if (t > window.innerHeight - 28) return;
            const n = e + t + 10 - window.innerHeight;
            if (n > 0) {
              const t = Math.max(28, e - n);
              this.dialogElement.style.top = t + "px";
            }
          }),
          (this.onDismissGraceTimer = () => {
            this.setState({ isAppearing: !1 });
          }),
          (this.onWindowFocus = () => {
            this.clearClickDismissalTimer(),
              (this.disableClickDismissal = !0),
              (this.disableClickDismissalTimeoutId = window.setTimeout(() => {
                (this.disableClickDismissal = !1),
                  (this.disableClickDismissalTimeoutId = null);
              }, 500));
          }),
          (this.onDialogCancel = (e) => {
            e.preventDefault(), this.onDismiss();
          }),
          (this.onDialogMouseDown = (e) => {
            if (
              !e.defaultPrevented &&
              !1 !== this.isDismissable() &&
              e.target === this.dialogElement
            )
              return this.disableClickDismissal
                ? ((this.disableClickDismissal = !1),
                  void this.clearClickDismissalTimer())
                : void (
                    this.mouseEventIsInsideDialog(e) ||
                    document.addEventListener(
                      "mouseup",
                      this.onDocumentMouseUp,
                      { once: !0 }
                    )
                  );
          }),
          (this.onDocumentMouseUp = (e) => {
            e.defaultPrevented ||
              this.mouseEventIsInsideDialog(e) ||
              (e.preventDefault(), this.onDismiss());
          }),
          (this.onDialogRef = (e) => {
            e
              ? e.addEventListener("cancel", this.onDialogCancel)
              : this.dialogElement &&
                this.dialogElement.removeEventListener(
                  "cancel",
                  this.onDialogCancel
                ),
              (this.dialogElement = e);
          }),
          (this.onKeyDown = (e) => {
            if (e.defaultPrevented) return;
            ((e.ctrlKey && "w" === e.key) || "Escape" === e.key) &&
              this.onDialogCancel(e);
          }),
          (this.onDismiss = () => {
            this.isDismissable() &&
              !this.state.isAppearing &&
              this.props.onDismissed &&
              this.props.onDismissed();
          }),
          (this.onSubmit = (e) => {
            e.preventDefault(),
              this.props.onSubmit ? this.props.onSubmit() : this.onDismiss();
          }),
          (this.state = { isAppearing: !0 }),
          (this.resizeObserver = new ResizeObserver(this.scheduleResizeEvent));
      }
      clearDismissGraceTimeout() {
        void 0 !== this.dismissGraceTimeoutId &&
          (window.clearTimeout(this.dismissGraceTimeoutId),
          (this.dismissGraceTimeoutId = void 0));
      }
      scheduleDismissGraceTimeout() {
        this.clearDismissGraceTimeout(),
          (this.dismissGraceTimeoutId = window.setTimeout(
            this.onDismissGraceTimer,
            250
          ));
      }
      isDismissable() {
        return void 0 === this.props.dismissable || this.props.dismissable;
      }
      updateTitleId() {
        if (
          (this.state.titleId &&
            (yh(this.state.titleId), this.setState({ titleId: void 0 })),
          this.props.title)
        ) {
          const e =
            "string" == typeof this.props.title ? this.props.title : "???";
          this.setState({ titleId: gh(`Dialog_${this.props.id}_${e}`) });
        }
      }
      componentWillMount() {
        this.updateTitleId();
      }
      componentDidMount() {
        this.dialogElement &&
          (this.dialogElement.showModal(),
          this.dialogElement.dispatchEvent(
            new CustomEvent("dialog-show", { bubbles: !0, cancelable: !1 })
          ),
          this.setState({ isAppearing: !0 }),
          this.scheduleDismissGraceTimeout(),
          this.focusFirstSuitableChild(),
          window.addEventListener("focus", this.onWindowFocus),
          this.resizeObserver.observe(this.dialogElement),
          window.addEventListener("resize", this.scheduleResizeEvent));
      }
      focusFirstSuitableChild() {
        const e = this.dialogElement;
        if (null === e) return;
        const t = [
          'input:not([type=hidden]):not(:disabled):not([tabindex="-1"])',
          'textarea:not(:disabled):not([tabindex="-1"])',
          'button:not(:disabled):not([tabindex="-1"])',
          '[tabindex]:not(:disabled):not([tabindex="-1"])',
        ].join(", ");
        let n = [1 / 0, null],
          r = null,
          i = null,
          o = null;
        const s = `input${[
          ":not([type=button])",
          ":not([type=submit])",
          ":not([type=reset])",
          ":not([type=hidden])",
          ":not([type=checkbox])",
          ":not([type=radio])",
        ].join("")}, textarea`;
        for (const a of e.querySelectorAll(t)) {
          if (!(a instanceof HTMLElement)) continue;
          const e = parseInt(a.getAttribute("tabindex") || "", 10);
          e > 0 && e < n[0]
            ? (n = [e, a])
            : null !== o || (0 !== e && !a.matches(s))
            ? null === r && a.matches("input[type=submit], button[type=submit]")
              ? (r = a)
              : null === i &&
                a.matches(
                  "input[type=button], input[type=submit] input[type=reset], button"
                ) &&
                (i = a)
            : (o = a);
        }
        const a = n[1] || o || r || i;
        null !== a && a.focus();
      }
      clearClickDismissalTimer() {
        this.disableClickDismissalTimeoutId &&
          (window.clearTimeout(this.disableClickDismissalTimeoutId),
          (this.disableClickDismissalTimeoutId = null));
      }
      componentWillUnmount() {
        this.clearDismissGraceTimeout(),
          this.state.titleId && yh(this.state.titleId),
          window.removeEventListener("focus", this.onWindowFocus),
          document.removeEventListener("mouseup", this.onDocumentMouseUp),
          this.resizeObserver.disconnect(),
          window.removeEventListener("resize", this.scheduleResizeEvent);
      }
      componentDidUpdate() {
        !this.props.title && this.state.titleId && this.updateTitleId();
      }
      mouseEventIsInsideDialog(e) {
        if (null === this.dialogElement) return !1;
        if (e.clientY <= 28) return !1;
        const t = this.dialogElement.getBoundingClientRect();
        return (
          t.top <= e.clientY &&
          e.clientY <= t.top + t.height &&
          t.left <= e.clientX &&
          e.clientX <= t.left + t.width
        );
      }
      renderHeader() {
        return this.props.title
          ? w.createElement(og, {
              title: this.props.title,
              titleId: this.state.titleId,
              dismissable: this.isDismissable(),
              onDismissed: this.onDismiss,
              loading: this.props.loading,
            })
          : null;
      }
      render() {
        const e = ph()(
          {
            error: "error" === this.props.type,
            warning: "warning" === this.props.type,
          },
          this.props.className
        );
        return w.createElement(
          "dialog",
          {
            ref: this.onDialogRef,
            id: this.props.id,
            onMouseDown: this.onDialogMouseDown,
            onKeyDown: this.onKeyDown,
            className: e,
            "aria-labelledby": this.state.titleId,
            tabIndex: -1,
          },
          this.renderHeader(),
          w.createElement(
            "form",
            { onSubmit: this.onSubmit, onReset: this.onDismiss },
            w.createElement(
              "fieldset",
              { disabled: this.props.disabled },
              this.props.children
            )
          )
        );
      }
    }
    class ag extends w.Component {
      render() {
        return w.createElement(
          "div",
          { className: "dialog-error" },
          w.createElement(vh, { symbol: wh.stop }),
          w.createElement("div", null, this.props.children)
        );
      }
    }
    class lg extends w.Component {
      render() {
        return w.createElement(
          "div",
          { className: "dialog-footer" },
          this.props.children
        );
      }
    }
    class cg extends w.Component {
      constructor() {
        super(...arguments),
          (this.onOkButtonClick = (e) => {
            void 0 !== this.props.onOkButtonClick &&
              this.props.onOkButtonClick(e),
              e.defaultPrevented ||
                (!0 === this.props.destructive &&
                  (e.preventDefault(),
                  e.currentTarget.form &&
                    e.currentTarget.form.dispatchEvent(new Event("submit"))));
          }),
          (this.onCancelButtonClick = (e) => {
            void 0 !== this.props.onCancelButtonClick &&
              this.props.onCancelButtonClick(e),
              e.defaultPrevented ||
                (!0 === this.props.destructive &&
                  (e.preventDefault(),
                  e.currentTarget.form &&
                    e.currentTarget.form.dispatchEvent(new Event("reset"))));
          });
      }
      renderOkButton() {
        return w.createElement(
          Ud,
          {
            onClick: this.onOkButtonClick,
            disabled: this.props.okButtonDisabled,
            tooltip: this.props.okButtonTitle,
            type: !0 === this.props.destructive ? "button" : "submit",
          },
          this.props.okButtonText || "Ok"
        );
      }
      renderCancelButton() {
        return !1 === this.props.cancelButtonVisible
          ? null
          : w.createElement(
              Ud,
              {
                onClick: this.onCancelButtonClick,
                disabled: this.props.cancelButtonDisabled,
                tooltip: this.props.cancelButtonTitle,
                type: !0 === this.props.destructive ? "submit" : "reset",
              },
              this.props.cancelButtonText || "取消"
            );
      }
      renderButtons() {
        return w.createElement(
          w.Fragment,
          null,
          this.renderOkButton(),
          this.renderCancelButton()
        );
      }
      render() {
        const e = ph()("button-group", this.props.className, {
          destructive: !0 === this.props.destructive,
        });
        return w.createElement(
          "div",
          { className: e },
          this.renderButtons(),
          this.props.children
        );
      }
    }
    class ug extends w.Component {
      render() {
        return w.createElement(
          lg,
          null,
          w.createElement(cg, {
            okButtonText: this.props.buttonText || "关闭",
            okButtonTitle: this.props.buttonTitle,
            onOkButtonClick: this.props.onButtonClick,
            okButtonDisabled: this.props.disabled,
            cancelButtonVisible: !1,
          })
        );
      }
    }
    function hg(e) {
      return void 0 === e;
    }
    class dg extends w.Component {
      constructor(e) {
        super(e),
          (this.onCreateWithoutPushButtonClick = (e) => {
            e.preventDefault(),
              this.props.onConfirm(this.props.repository, this.props.branch),
              this.props.onDismissed();
          }),
          (this.onSubmit = async () => {
            const { repository: e, branch: t } = this.props;
            this.setState({ isPushingOrPublishing: !0 });
            try {
              await this.props.dispatcher.push(e);
            } finally {
              this.setState({ isPushingOrPublishing: !1 });
            }
            this.props.onConfirm(e, t), this.props.onDismissed();
          }),
          (this.state = { isPushingOrPublishing: !1 });
      }
      render() {
        return w.createElement(
          sg,
          {
            id: "push-branch-commits",
            key: "push-branch-commits",
            title: this.renderDialogTitle(),
            onDismissed: this.props.onDismissed,
            onSubmit: this.onSubmit,
            loading: this.state.isPushingOrPublishing,
            disabled: this.state.isPushingOrPublishing,
          },
          this.renderDialogContent(),
          w.createElement(lg, null, this.renderButtonGroup())
        );
      }
      renderDialogContent() {
        if (hg(this.props.unPushedCommits))
          return w.createElement(
            ig,
            null,
            w.createElement(
              "p",
              null,
              "Your branch must be published before opening a pull request."
            ),
            w.createElement(
              "p",
              null,
              "Would you like to publish ",
              w.createElement(Om, null, this.props.branch.name),
              " now and open a pull request?"
            )
          );
        const e =
          ((t = this.props.unPushedCommits),
          (n = "local commit"),
          1 === t ? `${t} ${n}` : `${t} ${n}s`);
        var t, n;
        return w.createElement(
          ig,
          null,
          w.createElement(
            "p",
            null,
            "You have ",
            e,
            " that haven't been pushed to the remote yet."
          ),
          w.createElement(
            "p",
            null,
            "Would you like to push your changes to",
            " ",
            w.createElement(Om, null, this.props.branch.name),
            " before creating your pull request?"
          )
        );
      }
      renderDialogTitle() {
        return hg(this.props.unPushedCommits)
          ? "Publish branch?"
          : "Push local changes?";
      }
      renderButtonGroup() {
        return hg(this.props.unPushedCommits)
          ? w.createElement(cg, { okButtonText: "Publish branch" })
          : w.createElement(cg, {
              okButtonText: "Push commits",
              cancelButtonText: "Create without pushing",
              onCancelButtonClick: this.onCreateWithoutPushButtonClick,
            });
      }
    }
    const pg = _c(__dirname, "static/empty-no-branches.svg");
    class fg extends w.Component {
      render() {
        return this.props.canCreateNewBranch
          ? w.createElement(
              "div",
              { className: "no-branches" },
              w.createElement("img", {
                src: pg,
                className: "blankslate-image",
              }),
              w.createElement(
                "div",
                { className: "title" },
                "抱歉，找不到该分支"
              ),
              w.createElement(
                "div",
                { className: "subtitle" },
                "您是否要创建一个新分支?"
              ),
              w.createElement(
                Ud,
                {
                  className: "create-branch-button",
                  onClick: this.props.onCreateNewBranch,
                  type: "submit",
                },
                "创建新分支"
              ),
              w.createElement(
                "div",
                { className: "protip" },
                "专家提示! 按 ",
                this.renderShortcut(),
                " 快捷键快速创建一个新分支"
              )
            )
          : w.createElement(
              "div",
              { className: "no-branches" },
              "对不起，找不到该分支"
            );
      }
      renderShortcut() {
        return w.createElement(
          "span",
          null,
          w.createElement("kbd", null, "Ctrl"),
          " + ",
          w.createElement("kbd", null, "Shift"),
          " + ",
          w.createElement("kbd", null, "N")
        );
      }
    }
    function mg(e) {
      const t = (function (e, t, n, r) {
        const i = new Array();
        e &&
          i.push({
            identifier: "default",
            items: [{ text: [e.name], id: e.name, branch: e }],
          });
        const o = new Set(),
          s = e ? e.name : null,
          a = r.filter((e) => e.name !== s);
        if (a.length > 0) {
          const e = new Array();
          for (const t of a)
            e.push({ text: [t.name], id: t.name, branch: t }), o.add(t.name);
          i.push({ identifier: "recent", items: e });
        }
        const l = n
          .filter((e) => e.name !== s && !o.has(e.name))
          .map((e) => ({ text: [e.name], id: e.name, branch: e }));
        return i.push({ identifier: "other", items: l }), i;
      })(e.defaultBranch, e.currentBranch, e.allBranches, e.recentBranches);
      let n = null;
      const r = e.selectedBranch;
      if (r)
        for (const e of t)
          if (((n = e.items.find((e) => e.branch.name === r.name) || null), n))
            break;
      return { groups: t, selectedItem: n };
    }
    class gg extends w.Component {
      constructor(e) {
        super(e),
          (this.branchFilterList = null),
          (this.onBranchesFilterListRef = (e) => {
            this.branchFilterList = e;
          }),
          (this.renderItem = (e, t) => this.props.renderBranch(e, t)),
          (this.renderGroupHeader = (e) => {
            const t = this.parseHeader(e);
            return null !== t
              ? w.createElement(
                  "div",
                  {
                    className: "branches-list-content filter-list-group-header",
                  },
                  this.getGroupLabel(t)
                )
              : null;
          }),
          (this.onRenderNoItems = () =>
            w.createElement(fg, {
              onCreateNewBranch: this.onCreateNewBranch,
              canCreateNewBranch: this.props.canCreateNewBranch,
            })),
          (this.onRenderNewButton = () =>
            this.props.canCreateNewBranch
              ? w.createElement(
                  Ud,
                  {
                    className: "new-branch-button",
                    onClick: this.onCreateNewBranch,
                  },
                  "新建分支"
                )
              : null),
          (this.onItemClick = (e, t) => {
            this.props.onItemClick && this.props.onItemClick(e.branch, t);
          }),
          (this.onSelectionChanged = (e, t) => {
            this.props.onSelectionChanged &&
              this.props.onSelectionChanged(e ? e.branch : null, t);
          }),
          (this.onCreateNewBranch = () => {
            this.props.onCreateNewBranch &&
              this.props.onCreateNewBranch(this.props.filterText);
          }),
          (this.state = mg(e));
      }
      componentWillReceiveProps(e) {
        this.setState(mg(e));
      }
      selectNextItem(e = !1, t) {
        null !== this.branchFilterList &&
          this.branchFilterList.selectNextItem(e, t);
      }
      render() {
        return w.createElement(Fd, {
          ref: this.onBranchesFilterListRef,
          className: "branches-list",
          rowHeight: 30,
          filterText: this.props.filterText,
          onFilterTextChanged: this.props.onFilterTextChanged,
          onFilterKeyDown: this.props.onFilterKeyDown,
          selectedItem: this.state.selectedItem,
          renderItem: this.renderItem,
          renderGroupHeader: this.renderGroupHeader,
          onItemClick: this.onItemClick,
          onSelectionChanged: this.onSelectionChanged,
          groups: this.state.groups,
          invalidationProps: this.props.allBranches,
          renderPostFilter: this.onRenderNewButton,
          renderNoItems: this.onRenderNoItems,
          filterTextBox: this.props.textbox,
          onFilterListResultsChanged: this.props.onFilterListResultsChanged,
        });
      }
      parseHeader(e) {
        switch (e) {
          case "default":
          case "recent":
          case "other":
            return e;
          default:
            return null;
        }
      }
      getGroupLabel(e) {
        return "default" === e
          ? "默认分支"
          : "recent" === e
          ? "最近的分支"
          : "other" === e
          ? "其它分支"
          : X(0, "Unknown identifier: " + e);
      }
    }
    var yg = n(139),
      vg = n.n(yg),
      wg = n(140),
      bg = n.n(wg);
    function Sg(e, t) {
      const { endpoint: n, owner: r, name: i } = e;
      return (function (e, t, n, r) {
        return `${e}/repos/${t}/${n}/commits/${r}`;
      })(n, r.login, i, t);
    }
    function Cg(e) {
      return Date.now() - e.fetchedAt.valueOf() > 6e4;
    }
    function Eg(e) {
      let t,
        n = null;
      return (
        "success" === e.state
          ? ((t = "completed"), (n = "success"))
          : "pending" === e.state
          ? (t = "in_progress")
          : ((t = "completed"), (n = "failure")),
        {
          name: e.context,
          description: e.description,
          status: t,
          conclusion: n,
        }
      );
    }
    function kg(e) {
      var t, n;
      return {
        name: e.name,
        description:
          null !==
            (n =
              null !== (t = null == e ? void 0 : e.output.title) && void 0 !== t
                ? t
                : e.conclusion) && void 0 !== n
            ? n
            : e.status,
        status: e.status,
        conclusion: e.conclusion,
      };
    }
    function xg(e) {
      return (
        (function (e) {
          if ("completed" === e.status)
            switch (e.conclusion) {
              case "timed_out":
              case "stale":
              case "cancelled":
                return !0;
            }
          return !1;
        })(e) ||
        (function (e) {
          if ("completed" === e.status)
            switch (e.conclusion) {
              case "failure":
              case "action_required":
                return !0;
            }
          return !1;
        })(e)
      );
    }
    function Rg(e) {
      if ("completed" === e.status)
        switch (e.conclusion) {
          case "success":
          case "neutral":
          case "skipped":
            return !0;
        }
      return !1;
    }
    class Tg extends w.PureComponent {
      constructor(e) {
        super(e),
          (this.statusSubscription = null),
          (this.onStatus = (e) => {
            this.setState({ check: e });
          }),
          (this.state = {
            check: e.dispatcher.tryGetCommitStatus(
              this.props.repository,
              this.props.commitRef
            ),
          });
      }
      subscribe() {
        this.unsubscribe(),
          (this.statusSubscription = this.props.dispatcher.subscribeToCommitStatus(
            this.props.repository,
            this.props.commitRef,
            this.onStatus
          ));
      }
      unsubscribe() {
        this.statusSubscription &&
          (this.statusSubscription.dispose(), (this.statusSubscription = null));
      }
      componentDidUpdate(e) {
        (this.props.repository === e.repository &&
          this.props.commitRef === e.commitRef) ||
          (this.setState({
            check: this.props.dispatcher.tryGetCommitStatus(
              this.props.repository,
              this.props.commitRef
            ),
          }),
          this.subscribe());
      }
      componentDidMount() {
        this.subscribe();
      }
      componentWillUnmount() {
        this.unsubscribe();
      }
      render() {
        const { check: e } = this.state;
        return null === e || 0 === e.checks.length
          ? null
          : w.createElement(vh, {
              className: ph()(
                "ci-status",
                "ci-status-" + Ag(e),
                this.props.className
              ),
              symbol: Dg(e),
              title: _g(e),
            });
      }
    }
    function Dg(e) {
      switch (e.conclusion) {
        case "timed_out":
        case "failure":
          return wh.x;
        case "neutral":
          return wh.squareFill;
        case "success":
          return wh.check;
        case "cancelled":
          return wh.stop;
        case "action_required":
          return wh.alert;
        case "skipped":
          return wh.skip;
        case "stale":
          return wh.issueReopened;
      }
      return wh.dotFill;
    }
    function Ag(e) {
      switch (e.conclusion) {
        case "timed_out":
          return "timed-out";
        case "action_required":
          return "action-required";
        case "failure":
        case "neutral":
        case "success":
        case "cancelled":
        case "skipped":
        case "stale":
          return e.conclusion;
      }
      return "pending";
    }
    function _g(e) {
      if (1 === e.checks.length) {
        const { name: t, description: n } = e.checks[0];
        return `${t}: ${n}`;
      }
      return `${e.checks.reduce((e, t) => e + (Rg(t) ? 1 : 0), 0)}/${
        e.checks.length
      } checks OK`;
    }
    class Mg extends w.Component {
      getSubtitle() {
        if (!0 === this.props.loading) return;
        const e = k()(this.props.created).fromNow(),
          t = `#${this.props.number} opened ${e} by ${this.props.author}`;
        return this.props.draft ? t + " • Draft" : t;
      }
      render() {
        const e = !0 === this.props.loading ? void 0 : this.props.title,
          t = this.getSubtitle(),
          n = this.props.matches,
          r = ph()("pull-request-item", {
            loading: !0 === this.props.loading,
            open: !this.props.draft,
            draft: this.props.draft,
          });
        return w.createElement(
          "div",
          { className: r },
          w.createElement(vh, { className: "icon", symbol: wh.gitPullRequest }),
          w.createElement(
            "div",
            { className: "info" },
            w.createElement(
              "div",
              { className: "title", title: e },
              w.createElement(Th, { text: e || "", highlight: n.title })
            ),
            w.createElement(
              "div",
              { className: "subtitle", title: t },
              w.createElement(Th, { text: t || "", highlight: n.subtitle })
            )
          ),
          this.renderPullRequestStatus()
        );
      }
      renderPullRequestStatus() {
        const e = `refs/pull/${this.props.number}/head`;
        return w.createElement(
          "div",
          { className: "ci-status-container" },
          w.createElement(Tg, {
            dispatcher: this.props.dispatcher,
            repository: this.props.repository,
            commitRef: e,
          })
        );
      }
    }
    const Pg = _c(__dirname, "static/empty-no-pull-requests.svg");
    class Ig extends w.Component {
      render() {
        return w.createElement(
          "div",
          { className: "no-pull-requests" },
          w.createElement("img", { src: Pg, className: "blankslate-image" }),
          this.renderTitle(),
          this.renderCallToAction()
        );
      }
      renderTitle() {
        return this.props.isSearch
          ? w.createElement(
              "div",
              { className: "title" },
              "抱歉，找不到那个拉取请求!"
            )
          : this.props.isLoadingPullRequests
          ? w.createElement("div", { className: "title" }, "Hang tight")
          : w.createElement(
              "div",
              null,
              w.createElement("div", { className: "title" }, "You're all set!"),
              w.createElement(
                "div",
                { className: "no-prs" },
                "没有打开代码合并请求 ",
                w.createElement(Om, null, this.props.repositoryName)
              )
            );
      }
      renderCallToAction() {
        return this.props.isLoadingPullRequests
          ? w.createElement(
              "div",
              { className: "call-to-action" },
              "正在加载请求!"
            )
          : this.props.isOnDefaultBranch
          ? w.createElement(
              "div",
              { className: "call-to-action" },
              "是否需要",
              " ",
              w.createElement(
                _d,
                { onClick: this.props.onCreateBranch },
                "创建一个新分支"
              ),
              " ",
              "继续进行下个项目?"
            )
          : w.createElement(
              "div",
              { className: "call-to-action" },
              "是否需要",
              " ",
              w.createElement(
                _d,
                { onClick: this.props.onCreatePullRequest },
                "从当前分支"
              ),
              " ",
              "创建代码合并请求?"
            );
      }
    }
    function Og(e, t, n) {
      let r = null;
      return (
        null != t.selectedPullRequest && (r = Bg(e, t.selectedPullRequest)),
        null == r && null != n && (r = Bg(e, n.pullRequest)),
        r
      );
    }
    class Lg extends w.Component {
      constructor(e) {
        super(e),
          (this.renderNoItems = () =>
            w.createElement(Ig, {
              isSearch: this.state.filterText.length > 0,
              isLoadingPullRequests: this.props.isLoadingPullRequests,
              repositoryName: this.getRepositoryName(),
              isOnDefaultBranch: this.props.isOnDefaultBranch,
              onCreateBranch: this.props.onCreateBranch,
              onCreatePullRequest: this.onCreatePullRequest,
            })),
          (this.renderPullRequest = (e, t) => {
            const n = e.pullRequest;
            return w.createElement(Mg, {
              title: n.title,
              number: n.pullRequestNumber,
              created: n.created,
              author: n.author,
              draft: n.draft,
              matches: t,
              dispatcher: this.props.dispatcher,
              repository: n.base.gitHubRepository,
            });
          }),
          (this.onItemClick = (e, t) => {
            const n = e.pullRequest;
            this.props.dispatcher.closeFoldout(j.Branch);
            const r = Ap(
              "checkout pull request from list",
              this.props.repository
            );
            this.props.dispatcher
              .checkoutPullRequest(this.props.repository, n)
              .then(() => r.done()),
              this.props.onSelectionChanged(n, t);
          }),
          (this.onSelectionChanged = (e, t) => {
            this.props.onSelectionChanged(null != e ? e.pullRequest : null, t);
          }),
          (this.renderListHeader = () =>
            w.createElement(
              "div",
              { className: "filter-list-group-header" },
              "Pull requests in ",
              this.getRepositoryName()
            )),
          (this.onRefreshPullRequests = () => {
            this.props.dispatcher.refreshPullRequests(this.props.repository);
          }),
          (this.renderPostFilter = () =>
            w.createElement(
              Ud,
              {
                disabled: this.props.isLoadingPullRequests,
                onClick: this.onRefreshPullRequests,
                tooltip: "Refresh the list of pull requests",
              },
              w.createElement(vh, {
                symbol: Ch,
                className: this.props.isLoadingPullRequests ? "spin" : void 0,
              })
            )),
          (this.onFilterTextChanged = (e) => {
            this.setState({ filterText: e });
          }),
          (this.onCreatePullRequest = () => {
            this.props.dispatcher.closeFoldout(j.Branch),
              this.props.dispatcher.createPullRequest(this.props.repository);
          });
        const t = Ng(e.pullRequests),
          n = Og(t, e, null);
        this.state = { filterText: "", groupedItems: [t], selectedItem: n };
      }
      componentWillReceiveProps(e) {
        const t = Ng(e.pullRequests),
          n = Og(t, e, this.state.selectedItem);
        this.setState({ groupedItems: [t], selectedItem: n });
      }
      render() {
        return w.createElement(Fd, {
          className: "pull-request-list",
          rowHeight: 47,
          groups: this.state.groupedItems,
          selectedItem: this.state.selectedItem,
          renderItem: this.renderPullRequest,
          filterText: this.state.filterText,
          onFilterTextChanged: this.onFilterTextChanged,
          invalidationProps: this.props.pullRequests,
          onItemClick: this.onItemClick,
          onSelectionChanged: this.onSelectionChanged,
          onFilterKeyDown: this.props.onFilterKeyDown,
          renderGroupHeader: this.renderListHeader,
          renderNoItems: this.renderNoItems,
          renderPostFilter: this.renderPostFilter,
        });
      }
      getRepositoryName() {
        return fo(this.props.repository).fullName;
      }
    }
    function Fg(e) {
      const t = k()(e.created).fromNow();
      return `#${e.pullRequestNumber} opened ${t} by ${e.author}`;
    }
    function Ng(e) {
      return {
        identifier: "pull-requests",
        items: e.map((e) => ({
          text: [e.title, Fg(e)],
          id: e.pullRequestNumber.toString(),
          pullRequest: e,
        })),
      };
    }
    function Bg(e, t) {
      return (
        e.items.find(
          (e) => e.pullRequest.pullRequestNumber === t.pullRequestNumber
        ) || null
      );
    }
    class Hg extends w.Component {
      render() {
        const e = this.props.lastCommitDate,
          t = this.props.isCurrentBranch,
          n = this.props.name,
          r = e ? k()(e).fromNow() : "",
          i = t ? wh.check : wh.gitBranch,
          o = t ? "Current branch" : e ? e.toString() : "";
        return w.createElement(
          "div",
          { className: "branches-list-item" },
          w.createElement(vh, { className: "icon", symbol: i }),
          w.createElement(
            "div",
            { className: "name", title: n },
            w.createElement(Th, {
              text: n,
              highlight: this.props.matches.title,
            })
          ),
          w.createElement("div", { className: "description", title: o }, r)
        );
      }
    }
    function zg(e, t, n) {
      const r = e.branch,
        i = r.tip,
        o = n ? n.name : null;
      return w.createElement(Hg, {
        name: r.name,
        isCurrentBranch: r.name === o,
        lastCommitDate: i ? i.author.date : null,
        matches: t,
      });
    }
    class Ug extends w.Component {
      constructor(e) {
        super(e),
          (this.renderBranch = (e, t) => zg(e, t, this.props.currentBranch)),
          (this.onTabClicked = (e) => {
            this.props.dispatcher.changeBranchesTab(e);
          }),
          (this.onDismiss = () => {
            this.props.dispatcher.closeFoldout(j.Branch);
          }),
          (this.onMergeClick = () => {
            this.props.dispatcher.closeFoldout(j.Branch),
              this.props.dispatcher.showPopup({
                type: ao.MergeBranch,
                repository: this.props.repository,
              });
          }),
          (this.onBranchItemClick = (e) => {
            const { repository: t, dispatcher: n } = this.props;
            n.closeFoldout(j.Branch);
            const r = Ap("checkout branch from list", t);
            n.checkoutBranch(t, e).then(() => r.done());
          }),
          (this.onBranchSelectionChanged = (e) => {
            this.setState({ selectedBranch: e });
          }),
          (this.onBranchFilterTextChanged = (e) => {
            this.setState({ branchFilterText: e });
          }),
          (this.onCreateBranchWithName = (e) => {
            const { repository: t, dispatcher: n } = this.props;
            n.closeFoldout(j.Branch),
              n.showPopup({
                type: ao.CreateBranch,
                repository: t,
                initialName: e,
              });
          }),
          (this.onCreateBranch = () => {
            this.onCreateBranchWithName("");
          }),
          (this.onPullRequestSelectionChanged = (e) => {
            this.setState({ selectedPullRequest: e });
          }),
          (this.state = {
            selectedBranch: e.currentBranch,
            selectedPullRequest: e.currentPullRequest,
            currentPullRequest: e.currentPullRequest,
            branchFilterText: "",
          });
      }
      static getDerivedStateFromProps(e, t) {
        return t.currentPullRequest !== e.currentPullRequest
          ? {
              currentPullRequest: e.currentPullRequest,
              selectedPullRequest: e.currentPullRequest,
            }
          : null;
      }
      render() {
        return w.createElement(
          "div",
          { className: "branches-container" },
          this.renderTabBar(),
          this.renderSelectedTab(),
          this.renderMergeButtonRow()
        );
      }
      renderMergeButtonRow() {
        const { currentBranch: e } = this.props;
        return null === e
          ? null
          : w.createElement(
              Pd,
              { className: "merge-button-row" },
              w.createElement(
                Ud,
                { className: "merge-button", onClick: this.onMergeClick },
                w.createElement(vh, { className: "icon", symbol: wh.gitMerge }),
                w.createElement(
                  "span",
                  { title: "Merge a branch into " + e.name },
                  "选择一个分支合并到 ",
                  w.createElement("strong", null, e.name)
                )
              )
            );
      }
      renderOpenPullRequestsBubble() {
        const e = this.props.pullRequests;
        return e.length > 0
          ? w.createElement("span", { className: "count" }, e.length)
          : null;
      }
      renderTabBar() {
        return this.props.repository.gitHubRepository
          ? w.createElement(
              uf,
              {
                onTabClicked: this.onTabClicked,
                selectedIndex: this.props.selectedTab,
              },
              w.createElement("span", null, "Branches"),
              w.createElement(
                "span",
                { className: "pull-request-tab" },
                "Pull requests",
                this.renderOpenPullRequestsBubble()
              )
            )
          : null;
      }
      renderSelectedTab() {
        let e = this.props.selectedTab;
        switch (
          (this.props.repository.gitHubRepository || (e = Di.Branches), e)
        ) {
          case Di.Branches:
            return w.createElement(gg, {
              defaultBranch: this.props.defaultBranch,
              currentBranch: this.props.currentBranch,
              allBranches: this.props.allBranches,
              recentBranches: this.props.recentBranches,
              onItemClick: this.onBranchItemClick,
              filterText: this.state.branchFilterText,
              onFilterTextChanged: this.onBranchFilterTextChanged,
              selectedBranch: this.state.selectedBranch,
              onSelectionChanged: this.onBranchSelectionChanged,
              canCreateNewBranch: !0,
              onCreateNewBranch: this.onCreateBranchWithName,
              renderBranch: this.renderBranch,
            });
          case Di.PullRequests:
            return this.renderPullRequests();
          default:
            return X(0, "Unknown Branches tab: " + e);
        }
      }
      renderPullRequests() {
        const e = this.props.repository;
        if (!co(e)) return null;
        const t =
          this.props.defaultBranch &&
          this.props.currentBranch &&
          this.props.defaultBranch.name === this.props.currentBranch.name;
        return w.createElement(Lg, {
          key: "pr-list",
          pullRequests: this.props.pullRequests,
          selectedPullRequest: this.state.selectedPullRequest,
          isOnDefaultBranch: !!t,
          onSelectionChanged: this.onPullRequestSelectionChanged,
          onCreateBranch: this.onCreateBranch,
          onDismiss: this.onDismiss,
          dispatcher: this.props.dispatcher,
          repository: e,
          isLoadingPullRequests: this.props.isLoadingPullRequests,
        });
      }
    }
    class Wg extends w.Component {
      render() {
        const e = `refs/pull/${this.props.number}/head`;
        return w.createElement(
          "div",
          { className: "pr-badge" },
          w.createElement(
            "span",
            { className: "number" },
            "#",
            this.props.number
          ),
          w.createElement(Tg, {
            commitRef: e,
            dispatcher: this.props.dispatcher,
            repository: this.props.repository,
          })
        );
      }
    }
    class jg extends w.Component {
      render() {
        const e = this.props.isCurrentBranch,
          t = this.props.branch,
          n = e ? wh.check : wh.gitBranch,
          r = this.props.aheadBehind,
          i = r
            ? w.createElement(
                "div",
                { className: "branch-commit-counter" },
                w.createElement(
                  "span",
                  { className: "branch-commit-counter-item" },
                  r.behind,
                  w.createElement(vh, {
                    className: "icon",
                    symbol: wh.arrowDown,
                  })
                ),
                w.createElement(
                  "span",
                  { className: "branch-commit-counter-item" },
                  r.ahead,
                  w.createElement(vh, { className: "icon", symbol: wh.arrowUp })
                )
              )
            : null;
        return w.createElement(
          "div",
          { className: "branches-list-item" },
          w.createElement(vh, { className: "icon", symbol: n }),
          w.createElement(
            "div",
            { className: "name", title: t.name },
            w.createElement(Th, {
              text: t.name,
              highlight: this.props.matches.title,
            })
          ),
          i
        );
      }
    }
    class Vg extends w.Component {
      constructor(e) {
        super(e),
          (this.onFocus = () => {
            void 0 !== this.props.onFocus && this.props.onFocus(),
              this.setState({ isFocused: !0 });
          }),
          (this.onBlur = (e) => {
            void 0 !== this.props.onBlur && this.props.onBlur(e),
              this.setState({ isFocused: !1 });
          }),
          (this.state = { isFocused: !1 });
      }
      render() {
        const e = ph()(
            "fancy-text-box-component",
            this.props.className,
            { disabled: this.props.disabled },
            { focused: this.state.isFocused }
          ),
          t = ph()("fancy-octicon");
        return w.createElement(
          "div",
          { className: e },
          w.createElement(vh, { className: t, symbol: this.props.symbol }),
          w.createElement(Md, {
            value: this.props.value,
            onFocus: this.onFocus,
            onBlur: this.onBlur,
            autoFocus: this.props.autoFocus,
            disabled: this.props.disabled,
            type: this.props.type,
            placeholder: this.props.placeholder,
            onKeyDown: this.props.onKeyDown,
            onValueChanged: this.props.onValueChanged,
            onSearchCleared: this.props.onSearchCleared,
            tabIndex: this.props.tabIndex,
            ref: this.props.onRef,
          })
        );
      }
    }
    class Gg extends w.Component {
      render() {
        const { status: e, classNamePrefix: t } = this.props;
        if (null === e) return null;
        const { kind: n } = e,
          r = t + "-icon-container";
        return w.createElement(
          "div",
          { className: r },
          w.createElement(vh, {
            className: ph()(t, `${t}-${n}`, this.props.className),
            symbol: $g(n),
          })
        );
      }
    }
    function $g(e) {
      switch (e) {
        case cl.Loading:
          return wh.dotFill;
        case cl.Conflicts:
          return wh.alert;
        case cl.Invalid:
          return wh.x;
        case cl.Clean:
          return wh.check;
        default:
          return X(0, "Unknown state: " + JSON.stringify(e));
      }
    }
    class qg extends w.Component {
      constructor() {
        super(...arguments),
          (this.onMergeClicked = async () => {
            const {
              comparisonBranch: e,
              repository: t,
              mergeStatus: n,
            } = this.props;
            this.props.dispatcher.recordCompareInitiatedMerge(),
              await this.props.dispatcher.mergeBranch(t, e.name, n),
              this.props.dispatcher.executeCompare(t, { kind: $.History }),
              this.props.dispatcher.updateCompareForm(t, {
                showBranchList: !1,
                filterText: "",
              });
          });
      }
      render() {
        const { commitsBehind: e } = this.props,
          t =
            null != this.props.mergeStatus &&
            this.props.mergeStatus.kind === cl.Invalid,
          n = e <= 0 || t,
          r = e > 0 ? this.renderMergeStatus() : null;
        return w.createElement(
          "div",
          { className: "merge-cta" },
          r,
          w.createElement(
            Ud,
            { type: "submit", disabled: n, onClick: this.onMergeClicked },
            "合并到 ",
            w.createElement("strong", null, this.props.currentBranch.name)
          )
        );
      }
      renderMergeStatus() {
        return w.createElement(
          "div",
          { className: "merge-status-component" },
          w.createElement(Gg, {
            status: this.props.mergeStatus,
            classNamePrefix: "merge-status",
          }),
          this.renderMergeDetails(
            this.props.currentBranch,
            this.props.comparisonBranch,
            this.props.mergeStatus,
            this.props.commitsBehind
          )
        );
      }
      renderMergeDetails(e, t, n, r) {
        return null === n
          ? null
          : n.kind === cl.Loading
          ? this.renderLoadingMergeMessage()
          : n.kind === cl.Clean
          ? this.renderCleanMergeMessage(e, t, r)
          : n.kind === cl.Invalid
          ? this.renderInvalidMergeMessage()
          : n.kind === cl.Conflicts
          ? this.renderConflictedMergeMessage(e, t, n.conflictedFiles)
          : null;
      }
      renderLoadingMergeMessage() {
        return w.createElement(
          "div",
          { className: "merge-message merge-message-loading" },
          "Checking for ability to merge automatically..."
        );
      }
      renderCleanMergeMessage(e, t, n) {
        if (n > 0) {
          const r = 1 === n ? "commit" : "commits";
          return w.createElement(
            "div",
            { className: "merge-message" },
            "This will merge",
            w.createElement("strong", null, ` ${n} ${r}`),
            " from ",
            w.createElement("strong", null, t.name),
            " into ",
            w.createElement("strong", null, e.name)
          );
        }
        return null;
      }
      renderInvalidMergeMessage() {
        return w.createElement(
          "div",
          { className: "merge-message" },
          "Unable to merge unrelated histories in this repository"
        );
      }
      renderConflictedMergeMessage(e, t, n) {
        const r = 1 === n ? "file" : "files";
        return w.createElement(
          "div",
          { className: "merge-message" },
          "There will be",
          w.createElement("strong", null, ` ${n} conflicted ${r}`),
          " when merging ",
          w.createElement("strong", null, t.name),
          " into ",
          w.createElement("strong", null, e.name)
        );
      }
    }
    class Kg extends w.Component {
      constructor(e) {
        super(e),
          (this.textbox = null),
          (this.loadChangedFilesScheduler = new ep(200)),
          (this.branchList = null),
          (this.loadingMoreCommitsPromise = null),
          (this.resultCount = 0),
          (this.onBranchesListRef = (e) => {
            this.branchList = e;
          }),
          (this.filterListResultsChanged = (e) => {
            this.resultCount = e;
          }),
          (this.viewHistoryForBranch = () => {
            this.props.dispatcher.executeCompare(this.props.repository, {
              kind: $.History,
            }),
              this.props.dispatcher.updateCompareForm(this.props.repository, {
                showBranchList: !1,
              });
          }),
          (this.onTabClicked = (e) => {
            const t = this.props.compareState.formState;
            if (t.kind === $.History) return;
            const n = 0 === e ? q.Behind : q.Ahead,
              r = t.comparisonBranch;
            this.props.dispatcher.executeCompare(this.props.repository, {
              kind: $.Compare,
              branch: r,
              comparisonMode: n,
            });
          }),
          (this.renderCompareBranchListItem = (e, t) => {
            const n = this.props.currentBranch,
              r = null != n ? n.name : null,
              i = e.branch,
              o = n
                ? this.props.compareState.aheadBehindCache.get(
                    n.tip.sha,
                    i.tip.sha
                  )
                : null;
            return w.createElement(jg, {
              branch: i,
              isCurrentBranch: i.name === r,
              matches: t,
              aheadBehind: o,
            });
          }),
          (this.onBranchFilterKeyDown = (e) => {
            const t = e.key;
            if ("Enter" === t) {
              if (0 === this.resultCount) return void e.preventDefault();
              const t = this.state.focusedBranch;
              null === t
                ? this.viewHistoryForBranch()
                : (this.props.dispatcher.executeCompare(this.props.repository, {
                    kind: $.Compare,
                    comparisonMode: q.Behind,
                    branch: t,
                  }),
                  this.props.dispatcher.updateCompareForm(
                    this.props.repository,
                    { filterText: t.name }
                  )),
                this.textbox && this.textbox.blur();
            } else
              "Escape" === t
                ? this.handleEscape()
                : "ArrowDown" === t
                ? null !== this.branchList &&
                  this.branchList.selectNextItem(!0, "down")
                : "ArrowUp" === t &&
                  null !== this.branchList &&
                  this.branchList.selectNextItem(!0, "up");
          }),
          (this.handleEscape = () => {
            this.clearFilterState(), this.textbox && this.textbox.blur();
          }),
          (this.onCommitSelected = (e) => {
            this.props.dispatcher.changeCommitSelection(
              this.props.repository,
              e.sha
            ),
              this.loadChangedFilesScheduler.queue(() => {
                this.props.dispatcher.loadChangedFilesForCurrentSelection(
                  this.props.repository
                );
              });
          }),
          (this.onScroll = (e, t) => {
            const n = this.props.compareState;
            if (n.formState.kind === $.Compare) return;
            if (n.commitSHAs.length - t <= 10) {
              if (null != this.loadingMoreCommitsPromise) return;
              this.loadingMoreCommitsPromise = this.props.dispatcher
                .loadNextCommitBatch(this.props.repository)
                .then(() => {
                  window.setTimeout(() => {
                    this.loadingMoreCommitsPromise = null;
                  }, 500);
                });
            }
          }),
          (this.onBranchFilterTextChanged = (e) => {
            0 === e.length && this.setState({ focusedBranch: null }),
              this.props.dispatcher.updateCompareForm(this.props.repository, {
                filterText: e,
              });
          }),
          (this.clearFilterState = () => {
            this.setState({ focusedBranch: null }),
              this.props.dispatcher.updateCompareForm(this.props.repository, {
                filterText: "",
              }),
              this.viewHistoryForBranch();
          }),
          (this.onBranchItemClicked = (e) => {
            this.props.dispatcher.executeCompare(this.props.repository, {
              kind: $.Compare,
              comparisonMode: q.Behind,
              branch: e,
            }),
              this.setState({ focusedBranch: null }),
              this.props.dispatcher.updateCompareForm(this.props.repository, {
                filterText: e.name,
                showBranchList: !1,
              });
          }),
          (this.onSelectionChanged = (e, t) => {
            this.setState({ focusedBranch: e });
          }),
          (this.onTextBoxFocused = () => {
            this.props.dispatcher.updateCompareForm(this.props.repository, {
              showBranchList: !0,
            });
          }),
          (this.onTextBoxRef = (e) => {
            this.textbox = e;
          }),
          (this.onCreateTag = (e) => {
            this.props.dispatcher.showCreateTagDialog(
              this.props.repository,
              e,
              this.props.localTags
            );
          }),
          (this.onDeleteTag = (e) => {
            this.props.dispatcher.showDeleteTagDialog(this.props.repository, e);
          }),
          (this.state = { focusedBranch: null });
      }
      componentWillReceiveProps(e) {
        const t = e.compareState.formState,
          n = this.props.compareState.formState;
        if (t.kind === n.kind || t.kind !== $.History) {
          if (t.kind !== $.History && n.kind !== $.History) {
            const e = n.comparisonBranch,
              r = t.comparisonBranch;
            e.name !== r.name && this.setState({ focusedBranch: r });
          }
        } else this.setState({ focusedBranch: null });
      }
      componentDidUpdate(e) {
        const { showBranchList: t } = this.props.compareState;
        t !== e.compareState.showBranchList &&
          null !== this.textbox &&
          (t ? this.textbox.focus() : t || this.textbox.blur());
      }
      componentWillMount() {
        this.props.dispatcher.initializeCompare(this.props.repository);
      }
      componentWillUnmount() {
        (this.textbox = null),
          this.props.dispatcher.updateCompareForm(this.props.repository, {
            showBranchList: !1,
          });
      }
      render() {
        const {
            allBranches: e,
            filterText: t,
            showBranchList: n,
          } = this.props.compareState,
          r = (function (e) {
            const { allBranches: t, formState: n } = e;
            return 0 === t.length
              ? "没有分支可以比较"
              : n.kind === $.History
              ? "选择要比较的分支..."
              : void 0;
          })(this.props.compareState);
        return w.createElement(
          "div",
          { id: "compare-view" },
          w.createElement(
            "div",
            { className: "compare-form" },
            w.createElement(Vg, {
              symbol: wh.gitBranch,
              type: "search",
              placeholder: r,
              onFocus: this.onTextBoxFocused,
              value: t,
              disabled: 0 === e.length,
              onRef: this.onTextBoxRef,
              onValueChanged: this.onBranchFilterTextChanged,
              onKeyDown: this.onBranchFilterKeyDown,
              onSearchCleared: this.handleEscape,
            })
          ),
          n ? this.renderFilterList() : this.renderCommits()
        );
      }
      renderCommits() {
        const e = this.props.compareState.formState;
        return w.createElement(
          "div",
          { className: "compare-commit-list" },
          e.kind === $.History ? this.renderCommitList() : this.renderTabBar(e)
        );
      }
      renderCommitList() {
        const { formState: e, commitSHAs: t } = this.props.compareState;
        let n;
        if (e.kind === $.History) n = "无提交历史";
        else {
          const t = e.comparisonBranch.name;
          n =
            e.comparisonMode === q.Ahead
              ? w.createElement(
                  "p",
                  null,
                  "您所比较的分支 (",
                  w.createElement(Om, null, t),
                  ") 是最新的"
                )
              : w.createElement(
                  "p",
                  null,
                  "您的分支与所比较的分来说是最新的 (",
                  w.createElement(Om, null, t),
                  ")"
                );
        }
        return w.createElement(tg, {
          gitHubRepository: this.props.repository.gitHubRepository,
          isLocalRepository: this.props.isLocalRepository,
          commitLookup: this.props.commitLookup,
          commitSHAs: t,
          selectedSHA: this.props.selectedCommitSha,
          localCommitSHAs: this.props.localCommitSHAs,
          emoji: this.props.emoji,
          onViewCommitOnGitHub: this.props.onViewCommitOnGitHub,
          onRevertCommit: Yg(this.props.compareState.formState)
            ? this.props.onRevertCommit
            : void 0,
          onCommitSelected: this.onCommitSelected,
          onScroll: this.onScroll,
          onCreateTag: this.onCreateTag,
          onDeleteTag: this.onDeleteTag,
          emptyListMessage: n,
          onCompareListScrolled: this.props.onCompareListScrolled,
          compareListScrollTop: this.props.compareListScrollTop,
          tagsToPush: this.props.tagsToPush,
        });
      }
      renderActiveTab(e) {
        return w.createElement(
          "div",
          { className: "compare-commit-list" },
          this.renderCommitList(),
          e.comparisonMode === q.Behind ? this.renderMergeCallToAction(e) : null
        );
      }
      renderFilterList() {
        const {
          defaultBranch: e,
          allBranches: t,
          recentBranches: n,
          filterText: r,
        } = this.props.compareState;
        return w.createElement(gg, {
          ref: this.onBranchesListRef,
          defaultBranch: e,
          currentBranch: this.props.currentBranch,
          allBranches: t,
          recentBranches: n,
          filterText: r,
          textbox: this.textbox,
          selectedBranch: this.state.focusedBranch,
          canCreateNewBranch: !1,
          onSelectionChanged: this.onSelectionChanged,
          onItemClick: this.onBranchItemClicked,
          onFilterTextChanged: this.onBranchFilterTextChanged,
          renderBranch: this.renderCompareBranchListItem,
          onFilterListResultsChanged: this.filterListResultsChanged,
        });
      }
      renderMergeCallToAction(e) {
        return null == this.props.currentBranch
          ? null
          : w.createElement(qg, {
              repository: this.props.repository,
              dispatcher: this.props.dispatcher,
              mergeStatus: this.props.compareState.mergeStatus,
              currentBranch: this.props.currentBranch,
              comparisonBranch: e.comparisonBranch,
              commitsBehind: e.aheadBehind.behind,
            });
      }
      renderTabBar(e) {
        const t = e.comparisonMode === q.Behind ? 0 : 1;
        return w.createElement(
          "div",
          { className: "compare-content" },
          w.createElement(
            uf,
            { selectedIndex: t, onTabClicked: this.onTabClicked },
            w.createElement("span", null, `behind (${e.aheadBehind.behind})`),
            w.createElement("span", null, `ahead (${e.aheadBehind.ahead})`)
          ),
          this.renderActiveTab(e)
        );
      }
    }
    function Yg(e) {
      return e.kind === $.History || e.comparisonMode === q.Ahead;
    }
    class Qg extends w.Component {
      constructor(e) {
        super(e),
          (this.onDiscardClick = () => {
            const { dispatcher: e, repository: t, stashEntry: n } = this.props;
            e.showPopup({
              type: ao.ConfirmDiscardStash,
              stash: n,
              repository: t,
            });
          }),
          (this.onRestoreClick = async () => {
            const { dispatcher: e, repository: t, stashEntry: n } = this.props;
            this.setState({ isRestoring: !0 }, () => {
              e.popStash(t, n);
            });
          }),
          (this.state = { isRestoring: !1 });
      }
      render() {
        const { isWorkingTreeClean: e } = this.props,
          { isRestoring: t } = this.state;
        return w.createElement(
          "div",
          { className: "header" },
          w.createElement("h3", null, "Stashed changes"),
          w.createElement(
            "div",
            { className: "row" },
            w.createElement(cg, {
              okButtonText: "Restore",
              okButtonDisabled: t || !e,
              onOkButtonClick: this.onRestoreClick,
              cancelButtonText: "Discard",
              cancelButtonDisabled: t,
              onCancelButtonClick: this.onDiscardClick,
            }),
            this.renderExplanatoryText()
          )
        );
      }
      renderExplanatoryText() {
        const { isWorkingTreeClean: e } = this.props;
        return e || this.state.isRestoring
          ? w.createElement(
              "div",
              { className: "explanatory-text" },
              w.createElement(
                "span",
                { className: "text" },
                w.createElement("strong", null, "Restore"),
                " will move your stashed files to the Changes list."
              )
            )
          : w.createElement(
              "div",
              { className: "explanatory-text" },
              w.createElement(vh, { symbol: wh.alert }),
              w.createElement(
                "span",
                { className: "text" },
                "Unable to restore stash when changes are present on your branch."
              )
            );
      }
    }
    class Zg extends w.PureComponent {
      constructor() {
        super(...arguments),
          (this.onSelectedFileChanged = (e) =>
            this.props.dispatcher.selectStashedFile(this.props.repository, e)),
          (this.onResize = (e) =>
            this.props.dispatcher.setStashedFilesWidth(e)),
          (this.onReset = () => this.props.dispatcher.resetStashedFilesWidth());
      }
      render() {
        const {
            stashEntry: e,
            selectedStashedFile: t,
            stashedFileDiff: n,
            repository: r,
            dispatcher: i,
            imageDiffType: o,
            isWorkingTreeClean: s,
            fileListWidth: a,
            onOpenBinaryFile: l,
            onChangeImageDiffType: c,
          } = this.props,
          u = e.files.kind === Hc.Loaded ? e.files.files : new Array(),
          h =
            null !== t
              ? w.createElement(Rm, {
                  repository: r,
                  readOnly: !0,
                  file: t,
                  diff: n,
                  imageDiffType: o,
                  hideWhitespaceInDiff: !1,
                  showSideBySideDiff: this.props.showSideBySideDiff,
                  onOpenBinaryFile: l,
                  onChangeImageDiffType: c,
                })
              : null;
        return w.createElement(
          "section",
          { id: "stash-diff-viewer" },
          w.createElement(Qg, {
            stashEntry: e,
            repository: r,
            dispatcher: i,
            isWorkingTreeClean: s,
          }),
          w.createElement(
            "div",
            { className: "commit-details" },
            w.createElement(
              Wm,
              {
                width: this.props.fileListWidth,
                onResize: this.onResize,
                onReset: this.onReset,
              },
              w.createElement(Zm, {
                files: u,
                onSelectedFileChanged: this.onSelectedFileChanged,
                selectedFile: t,
                availableWidth: a,
              })
            ),
            h
          )
        );
      }
    }
    const Xg = _c(__dirname, "static/required-status-check.svg");
    class Jg extends w.Component {
      constructor(e) {
        super(e),
          (this.openTutorialFileInEditor = () => {
            this.props.dispatcher.openInExternalEditor(
              Object(i.join)(this.props.repository.path, "README.md")
            );
          }),
          (this.openPullRequest = () => {
            this.props.dispatcher.createPullRequest(this.props.repository);
          }),
          (this.skipEditorInstall = () => {
            this.props.dispatcher.skipPickEditorTutorialStep(
              this.props.repository
            );
          }),
          (this.skipCreatePR = () => {
            this.props.dispatcher.markPullRequestTutorialStepAsComplete(
              this.props.repository
            );
          }),
          (this.isStepComplete = (e) =>
            vu.indexOf(e) < vu.indexOf(this.props.currentTutorialStep)),
          (this.isStepNextTodo = (e) => e === this.props.currentTutorialStep),
          (this.onStepSummaryClick = (e) => {
            this.setState({ currentlyOpenSectionId: e });
          }),
          (this.onPreferencesClick = () => {
            this.props.dispatcher.showPopup({
              type: ao.Preferences,
              initialSelectedTab: hh.Advanced,
            });
          }),
          (this.state = {
            currentlyOpenSectionId: this.props.currentTutorialStep,
          });
      }
      componentWillReceiveProps(e) {
        this.props.currentTutorialStep !== e.currentTutorialStep &&
          this.setState({ currentlyOpenSectionId: e.currentTutorialStep });
      }
      render() {
        return w.createElement(
          "div",
          { className: "tutorial-panel-component panel" },
          w.createElement(
            "div",
            { className: "titleArea" },
            w.createElement("h3", null, "Get started"),
            w.createElement("img", { src: Xg })
          ),
          w.createElement(
            "ol",
            null,
            w.createElement(
              ey,
              {
                summaryText: "Install a text editor",
                isComplete: this.isStepComplete,
                isNextStepTodo: this.isStepNextTodo,
                sectionId: gu.PickEditor,
                currentlyOpenSectionId: this.state.currentlyOpenSectionId,
                skipLinkButton: w.createElement(ty, {
                  onClick: this.skipEditorInstall,
                }),
                onSummaryClick: this.onStepSummaryClick,
              },
              this.isStepComplete(gu.PickEditor)
                ? w.createElement(
                    "p",
                    { className: "description" },
                    "Your default editor is",
                    " ",
                    w.createElement(
                      "strong",
                      null,
                      this.props.resolvedExternalEditor
                    ),
                    ". You can change your preferred editor in",
                    " ",
                    w.createElement(
                      _d,
                      { onClick: this.onPreferencesClick },
                      "options"
                    )
                  )
                : w.createElement(
                    w.Fragment,
                    null,
                    w.createElement(
                      "p",
                      { className: "description" },
                      "It doesn’t look like you have a text editor installed. We can recommend",
                      " ",
                      w.createElement(
                        _d,
                        {
                          uri: "https://atom.io",
                          title: "Open the Atom website",
                        },
                        "Atom"
                      ),
                      " or ",
                      w.createElement(
                        _d,
                        {
                          uri: "https://code.visualstudio.com",
                          title: "Open the VS Code website",
                        },
                        "Visual Studio Code"
                      ),
                      ", but feel free to use any."
                    ),
                    w.createElement(
                      "div",
                      { className: "action" },
                      w.createElement(
                        _d,
                        { onClick: this.skipEditorInstall },
                        "I have an editor"
                      )
                    )
                  )
            ),
            w.createElement(
              ey,
              {
                summaryText: "Create a branch",
                isComplete: this.isStepComplete,
                isNextStepTodo: this.isStepNextTodo,
                sectionId: gu.CreateBranch,
                currentlyOpenSectionId: this.state.currentlyOpenSectionId,
                onSummaryClick: this.onStepSummaryClick,
              },
              w.createElement(
                "p",
                { className: "description" },
                'A branch allows you to work on different versions of a repository at one time. Create a\n                branch by going into the branch menu in the top bar and\n              clicking "New branch".'
              ),
              w.createElement(
                "div",
                { className: "action" },
                w.createElement(
                  w.Fragment,
                  null,
                  w.createElement("kbd", null, "Ctrl"),
                  w.createElement("kbd", null, "Shift"),
                  w.createElement("kbd", null, "N")
                )
              )
            ),
            w.createElement(
              ey,
              {
                summaryText: "Edit a file",
                isComplete: this.isStepComplete,
                isNextStepTodo: this.isStepNextTodo,
                sectionId: gu.EditFile,
                currentlyOpenSectionId: this.state.currentlyOpenSectionId,
                onSummaryClick: this.onStepSummaryClick,
              },
              w.createElement(
                "p",
                { className: "description" },
                "Open this repository in your preferred text editor. Edit the",
                " ",
                w.createElement(Om, null, "README.md"),
                " ",
                "file, save it, and come back."
              ),
              this.props.resolvedExternalEditor &&
                w.createElement(
                  "div",
                  { className: "action" },
                  w.createElement(
                    Ud,
                    { onClick: this.openTutorialFileInEditor },
                    "Open editor"
                  ),
                  w.createElement(
                    w.Fragment,
                    null,
                    w.createElement("kbd", null, "Ctrl"),
                    w.createElement("kbd", null, "Shift"),
                    w.createElement("kbd", null, "A")
                  )
                )
            ),
            w.createElement(
              ey,
              {
                summaryText: "Make a commit",
                isComplete: this.isStepComplete,
                isNextStepTodo: this.isStepNextTodo,
                sectionId: gu.MakeCommit,
                currentlyOpenSectionId: this.state.currentlyOpenSectionId,
                onSummaryClick: this.onStepSummaryClick,
              },
              w.createElement(
                "p",
                { className: "description" },
                "A commit allows you to save sets of changes. In the “summary“ field in the bottom left, write a short message that describes the changes you made. When you’re done, click the blue Commit button to finish."
              )
            ),
            w.createElement(
              ey,
              {
                summaryText: "Publish to GitHub",
                isComplete: this.isStepComplete,
                isNextStepTodo: this.isStepNextTodo,
                sectionId: gu.PushBranch,
                currentlyOpenSectionId: this.state.currentlyOpenSectionId,
                onSummaryClick: this.onStepSummaryClick,
              },
              w.createElement(
                "p",
                { className: "description" },
                "Publishing will “push”, or upload, your commits to this branch of your repository on GitHub. Publish using the third button in the top bar."
              ),
              w.createElement(
                "div",
                { className: "action" },
                w.createElement(
                  w.Fragment,
                  null,
                  w.createElement("kbd", null, "Ctrl"),
                  w.createElement("kbd", null, "P")
                )
              )
            ),
            w.createElement(
              ey,
              {
                summaryText: "Open a pull request",
                isComplete: this.isStepComplete,
                isNextStepTodo: this.isStepNextTodo,
                sectionId: gu.OpenPullRequest,
                currentlyOpenSectionId: this.state.currentlyOpenSectionId,
                skipLinkButton: w.createElement(ty, {
                  onClick: this.skipCreatePR,
                }),
                onSummaryClick: this.onStepSummaryClick,
              },
              w.createElement(
                "p",
                { className: "description" },
                "A pull request allows you to propose changes to the code. By opening one, you’re requesting that someone review and merge them. Since this is a demo repository, this pull request will be private."
              ),
              w.createElement(
                "div",
                { className: "action" },
                w.createElement(
                  Ud,
                  { onClick: this.openPullRequest },
                  "Open pull request",
                  w.createElement(vh, { symbol: wh.linkExternal })
                ),
                w.createElement(
                  w.Fragment,
                  null,
                  w.createElement("kbd", null, "Ctrl"),
                  w.createElement("kbd", null, "R")
                )
              )
            )
          ),
          w.createElement(
            "div",
            { className: "footer" },
            w.createElement(
              Ud,
              { onClick: this.props.onExitTutorial },
              "Exit tutorial"
            )
          )
        );
      }
    }
    class ey extends w.Component {
      constructor() {
        super(...arguments),
          (this.renderSummary = () => {
            const e =
              void 0 !== this.props.skipLinkButton &&
              this.props.currentlyOpenSectionId === this.props.sectionId &&
              this.props.isNextStepTodo(this.props.sectionId);
            return w.createElement(
              "summary",
              null,
              this.renderTutorialStepIcon(),
              w.createElement(
                "span",
                { className: "summary-text" },
                this.props.summaryText
              ),
              w.createElement(
                "span",
                { className: "hang-right" },
                e
                  ? this.props.skipLinkButton
                  : w.createElement(vh, { symbol: wh.chevronDown })
              )
            );
          }),
          (this.onSummaryClick = (e) => {
            e.preventDefault(), this.props.onSummaryClick(this.props.sectionId);
          });
      }
      render() {
        return w.createElement(
          "li",
          { key: this.props.sectionId, onClick: this.onSummaryClick },
          w.createElement(
            "details",
            {
              open: this.props.sectionId === this.props.currentlyOpenSectionId,
              onClick: this.onSummaryClick,
            },
            this.renderSummary(),
            w.createElement(
              "div",
              { className: "contents" },
              this.props.children
            )
          )
        );
      }
      renderTutorialStepIcon() {
        if (this.props.isComplete(this.props.sectionId))
          return w.createElement(
            "div",
            { className: "green-circle" },
            w.createElement(vh, { symbol: wh.check })
          );
        const e = vu.indexOf(this.props.sectionId) + 1;
        return this.props.isNextStepTodo(this.props.sectionId)
          ? w.createElement("div", { className: "blue-circle" }, e)
          : w.createElement("div", { className: "empty-circle" }, e);
      }
    }
    const ty = (e) => w.createElement(_d, { onClick: e.onClick }, "Skip"),
      ny = _c(__dirname, "static/code.svg"),
      ry = _c(__dirname, "static/github-for-teams.svg"),
      iy = _c(__dirname, "static/github-for-business.svg");
    class oy extends w.Component {
      render() {
        return w.createElement(
          "div",
          { id: "tutorial-welcome" },
          w.createElement(
            "div",
            { className: "header" },
            w.createElement("h1", null, "Welcome to GitHub Desktop"),
            w.createElement(
              "p",
              null,
              "Use this tutorial to get comfortable with Git, GitHub, and GitHub Desktop."
            )
          ),
          w.createElement(
            "ul",
            { className: "definitions" },
            w.createElement(
              "li",
              null,
              w.createElement("img", { src: ny }),
              w.createElement(
                "p",
                null,
                w.createElement("strong", null, "Git"),
                " is the version control system."
              )
            ),
            w.createElement(
              "li",
              null,
              w.createElement("img", { src: ry }),
              w.createElement(
                "p",
                null,
                w.createElement("strong", null, "GitHub"),
                " is where you store your code and collaborate with others."
              )
            ),
            w.createElement(
              "li",
              null,
              w.createElement("img", { src: iy }),
              w.createElement(
                "p",
                null,
                w.createElement("strong", null, "GitHub Desktop"),
                " helps you work with GitHub locally."
              )
            )
          )
        );
      }
    }
    const sy = _c(__dirname, "static/admin-mentoring.svg"),
      ay = w.createElement(vh, { symbol: wh.telescope }),
      ly = w.createElement(vh, { symbol: wh.plus }),
      cy = w.createElement(vh, { symbol: wh.fileDirectory });
    class uy extends w.Component {
      constructor() {
        super(...arguments),
          (this.openDotcomExplore = () => {
            this.props.dispatcher.showGitHubExplore(this.props.repository);
          }),
          (this.onCreateNewRepository = () => {
            this.props.dispatcher.showPopup({ type: ao.CreateRepository });
          }),
          (this.onAddExistingRepository = () => {
            this.props.dispatcher.showPopup({ type: ao.AddRepository });
          });
      }
      render() {
        return w.createElement(
          "div",
          { id: "tutorial-done" },
          w.createElement(
            "div",
            { className: "content" },
            w.createElement(
              "div",
              { className: "header" },
              w.createElement(
                "div",
                { className: "text" },
                w.createElement("h1", null, "You're done!"),
                w.createElement(
                  "p",
                  null,
                  "You’ve learned the basics on how to use GitHub Desktop. Here are some suggestions for what to do next."
                )
              ),
              w.createElement("img", { src: sy, className: "image" })
            ),
            w.createElement(
              Im,
              null,
              w.createElement(Am, {
                title: "Explore projects on GitHub",
                description: "Contribute to a project that interests you",
                buttonText: "Open in browser",
                onClick: this.openDotcomExplore,
                type: "normal",
                image: ay,
              }),
              w.createElement(Am, {
                title: "Create a new repository",
                description: "Get started on a brand new project",
                buttonText: "Create repository",
                onClick: this.onCreateNewRepository,
                type: "normal",
                image: ly,
              }),
              w.createElement(Am, {
                title: "Add a local repository",
                description: "Work on an existing project in GitHub Desktop",
                buttonText: "Add repository",
                onClick: this.onAddExistingRepository,
                type: "normal",
                image: cy,
              })
            )
          )
        );
      }
    }
    class hy extends w.Component {
      constructor() {
        super(...arguments),
          (this.onContinue = () => {
            this.props.onContinue() && this.props.onDismissed();
          });
      }
      render() {
        return w.createElement(
          sg,
          {
            title: "Exit tutorial",
            onDismissed: this.props.onDismissed,
            onSubmit: this.onContinue,
            type: "normal",
          },
          w.createElement(
            ig,
            null,
            w.createElement(
              "p",
              null,
              "Are you sure you want to leave the tutorial? This will bring you back to the home screen."
            )
          ),
          w.createElement(
            lg,
            null,
            w.createElement(cg, { okButtonText: "Exit tutorial" })
          )
        );
      }
    }
    class dy extends w.Component {
      constructor(e) {
        super(e),
          (this.previousSection = this.props.state.selectedSection),
          (this.onChangesListScrolled = (e) => {
            this.setState({ changesListScrollTop: e });
          }),
          (this.onCompareListScrolled = (e) => {
            this.setState({ compareListScrollTop: e });
          }),
          (this.handleSidebarWidthReset = () => {
            this.props.dispatcher.resetSidebarWidth();
          }),
          (this.handleSidebarResize = (e) => {
            this.props.dispatcher.setSidebarWidth(e);
          }),
          (this.onSidebarFocusWithinChanged = (e) => {
            !1 === e &&
              this.props.state.selectedSection === V.History &&
              this.props.dispatcher.updateCompareForm(this.props.repository, {
                showBranchList: !1,
              });
          }),
          (this.onDiffOptionsOpened = () => {
            this.props.dispatcher.recordDiffOptionsViewed();
          }),
          (this.onOpenBinaryFile = (e) => {
            tf(e, this.props.dispatcher);
          }),
          (this.onChangeImageDiffType = (e) => {
            this.props.dispatcher.changeImageDiffType(e);
          }),
          (this.onRevertCommit = (e) => {
            this.props.dispatcher.revertCommit(this.props.repository, e);
          }),
          (this.onGlobalKeyDown = (e) => {
            e.defaultPrevented ||
              this.props.isShowingModal ||
              this.props.isShowingFoldout ||
              (e.ctrlKey &&
                "Tab" === e.key &&
                (this.changeTab(), e.preventDefault()));
          }),
          (this.onTabClicked = (e) => {
            const t = 1 === e ? V.History : V.Changes;
            this.props.dispatcher.changeRepositorySection(
              this.props.repository,
              t
            ),
              t &&
                this.props.dispatcher.updateCompareForm(this.props.repository, {
                  showBranchList: !1,
                });
          }),
          (this.state = { changesListScrollTop: 0, compareListScrollTop: 0 });
      }
      renderChangesBadge() {
        const e = this.props.state.changesState.workingDirectory.files.length;
        return e <= 0 ? null : w.createElement(Um, { filesChangedCount: e });
      }
      renderTabs() {
        const e = this.props.state.selectedSection === V.Changes ? 0 : 1;
        return w.createElement(
          uf,
          { selectedIndex: e, onTabClicked: this.onTabClicked },
          w.createElement(
            "span",
            { className: "with-indicator" },
            w.createElement("span", null, "更改"),
            this.renderChangesBadge()
          ),
          w.createElement(
            "div",
            { className: "with-indicator" },
            w.createElement("span", null, "历史")
          )
        );
      }
      renderChangesSidebar() {
        const e = this.props.state.branchesState.tip;
        let t = null;
        e.kind === so.Valid
          ? (t = e.branch.name)
          : e.kind === so.Unborn && (t = e.ref);
        const n = this.props.state.localCommitSHAs,
          r = n.length > 0 ? n[0] : null,
          i = (r ? this.props.state.commitLookup.get(r) : null) || null,
          o = this.props.sidebarWidth - 1,
          s =
            this.previousSection === V.History
              ? this.state.changesListScrollTop
              : void 0;
        return (
          (this.previousSection = V.Changes),
          w.createElement(nf, {
            repository: this.props.repository,
            dispatcher: this.props.dispatcher,
            changes: this.props.state.changesState,
            branch: t,
            commitAuthor: this.props.state.commitAuthor,
            emoji: this.props.emoji,
            mostRecentLocalCommit: i,
            issuesStore: this.props.issuesStore,
            availableWidth: o,
            gitHubUserStore: this.props.gitHubUserStore,
            isCommitting: this.props.state.isCommitting,
            isPushPullFetchInProgress: this.props.state
              .isPushPullFetchInProgress,
            focusCommitMessage: this.props.focusCommitMessage,
            askForConfirmationOnDiscardChanges: this.props
              .askForConfirmationOnDiscardChanges,
            accounts: this.props.accounts,
            externalEditorLabel: this.props.externalEditorLabel,
            onOpenInExternalEditor: this.props.onOpenInExternalEditor,
            onChangesListScrolled: this.onChangesListScrolled,
            changesListScrollTop: s,
            shouldNudgeToCommit:
              this.props.currentTutorialStep === gu.MakeCommit,
          })
        );
      }
      renderCompareSidebar() {
        const e = this.props.state.branchesState.tip,
          t = e.kind === so.Valid ? e.branch : null,
          n =
            this.previousSection === V.Changes
              ? this.state.compareListScrollTop
              : void 0;
        return (
          (this.previousSection = V.History),
          w.createElement(Kg, {
            repository: this.props.repository,
            isLocalRepository: null === this.props.state.remote,
            compareState: this.props.state.compareState,
            selectedCommitSha: this.props.state.commitSelection.sha,
            currentBranch: t,
            emoji: this.props.emoji,
            commitLookup: this.props.state.commitLookup,
            localCommitSHAs: this.props.state.localCommitSHAs,
            localTags: this.props.state.localTags,
            dispatcher: this.props.dispatcher,
            onRevertCommit: this.onRevertCommit,
            onViewCommitOnGitHub: this.props.onViewCommitOnGitHub,
            onCompareListScrolled: this.onCompareListScrolled,
            compareListScrollTop: n,
            tagsToPush: this.props.state.tagsToPush,
          })
        );
      }
      renderSidebarContents() {
        const e = this.props.state.selectedSection;
        return e === V.Changes
          ? this.renderChangesSidebar()
          : e === V.History
          ? this.renderCompareSidebar()
          : X(0, "Unknown repository section");
      }
      renderSidebar() {
        return w.createElement(
          kd,
          { onFocusWithinChanged: this.onSidebarFocusWithinChanged },
          w.createElement(
            Wm,
            {
              id: "repository-sidebar",
              width: this.props.sidebarWidth,
              onReset: this.handleSidebarWidthReset,
              onResize: this.handleSidebarResize,
              maximumWidth: 495,
            },
            this.renderTabs(),
            this.renderSidebarContents()
          )
        );
      }
      renderStashedChangesContent() {
        const { changesState: e } = this.props.state,
          { selection: t, stashEntry: n, workingDirectory: r } = e,
          i = 0 === r.files.length;
        return t.kind !== G.Stash || null === n
          ? null
          : n.files.kind === Hc.Loaded
          ? w.createElement(Zg, {
              stashEntry: n,
              selectedStashedFile: t.selectedStashedFile,
              stashedFileDiff: t.selectedStashedFileDiff,
              imageDiffType: this.props.imageDiffType,
              fileListWidth: this.props.stashedFilesWidth,
              repository: this.props.repository,
              dispatcher: this.props.dispatcher,
              isWorkingTreeClean: i,
              showSideBySideDiff: this.props.showSideBySideDiff,
              onOpenBinaryFile: this.onOpenBinaryFile,
              onChangeImageDiffType: this.onChangeImageDiffType,
            })
          : null;
      }
      renderContentForHistory() {
        const { commitSelection: e } = this.props.state,
          t = e.sha,
          n = (null != t && this.props.state.commitLookup.get(t)) || null,
          { changedFiles: r, file: i, diff: o } = e;
        return w.createElement(Xm, {
          repository: this.props.repository,
          dispatcher: this.props.dispatcher,
          selectedCommit: n,
          changedFiles: r,
          selectedFile: i,
          currentDiff: o,
          emoji: this.props.emoji,
          commitSummaryWidth: this.props.commitSummaryWidth,
          selectedDiffType: this.props.imageDiffType,
          externalEditorLabel: this.props.externalEditorLabel,
          onOpenInExternalEditor: this.props.onOpenInExternalEditor,
          hideWhitespaceInDiff: this.props.hideWhitespaceInDiff,
          showSideBySideDiff: this.props.showSideBySideDiff,
          onOpenBinaryFile: this.onOpenBinaryFile,
          onChangeImageDiffType: this.onChangeImageDiffType,
          onDiffOptionsOpened: this.onDiffOptionsOpened,
        });
      }
      renderTutorialPane() {
        return this.props.currentTutorialStep === gu.AllDone
          ? w.createElement(uy, {
              dispatcher: this.props.dispatcher,
              repository: this.props.repository,
            })
          : w.createElement(oy, null);
      }
      renderContentForChanges() {
        const { changesState: e } = this.props.state,
          { workingDirectory: t, selection: n } = e;
        if (n.kind === G.Stash) return this.renderStashedChangesContent();
        const { selectedFileIDs: r, diff: i } = n;
        if (r.length > 1) return w.createElement(zm, { count: r.length });
        if (0 === t.files.length)
          return this.props.currentTutorialStep !== gu.NotApplicable
            ? this.renderTutorialPane()
            : w.createElement(Bm, {
                key: this.props.repository.id,
                appMenu: this.props.appMenu,
                repository: this.props.repository,
                repositoryState: this.props.state,
                isExternalEditorAvailable:
                  void 0 !== this.props.externalEditorLabel,
                dispatcher: this.props.dispatcher,
              });
        {
          if (0 === r.length) return null;
          const e = t.findFileWithID(r[0]);
          return null === e
            ? null
            : w.createElement(Tm, {
                repository: this.props.repository,
                dispatcher: this.props.dispatcher,
                file: e,
                diff: i,
                isCommitting: this.props.state.isCommitting,
                imageDiffType: this.props.imageDiffType,
                hideWhitespaceInDiff: this.props.hideWhitespaceInDiff,
                showSideBySideDiff: this.props.showSideBySideDiff,
                onOpenBinaryFile: this.onOpenBinaryFile,
                onChangeImageDiffType: this.onChangeImageDiffType,
                askForConfirmationOnDiscardChanges: this.props
                  .askForConfirmationOnDiscardChanges,
                onDiffOptionsOpened: this.onDiffOptionsOpened,
              });
        }
      }
      renderContent() {
        const e = this.props.state.selectedSection;
        return e === V.Changes
          ? this.renderContentForChanges()
          : e === V.History
          ? this.renderContentForHistory()
          : X(0, "Unknown repository section");
      }
      render() {
        return w.createElement(
          Gd,
          { id: "repository" },
          this.renderSidebar(),
          this.renderContent(),
          this.maybeRenderTutorialPanel()
        );
      }
      componentDidMount() {
        window.addEventListener("keydown", this.onGlobalKeyDown);
      }
      componentWillUnmount() {
        window.removeEventListener("keydown", this.onGlobalKeyDown);
      }
      changeTab() {
        const e =
          this.props.state.selectedSection === V.History
            ? V.Changes
            : V.History;
        this.props.dispatcher.changeRepositorySection(this.props.repository, e);
      }
      maybeRenderTutorialPanel() {
        return yu(this.props.currentTutorialStep)
          ? w.createElement(Jg, {
              dispatcher: this.props.dispatcher,
              repository: this.props.repository,
              resolvedExternalEditor: this.props.resolvedExternalEditor,
              currentTutorialStep: this.props.currentTutorialStep,
              onExitTutorial: this.props.onExitTutorial,
            })
          : null;
      }
    }
    const py = /[\x00-\x20\x7F~^:?*\[\\|""<>]+|@{|\.\.+|^\.|\.$|\.lock$|\/$/g;
    function fy(e) {
      return e.replace(py, "-").replace(/^[-\+]*/g, "");
    }
    class my extends w.Component {
      constructor(e) {
        super(e),
          (this.textBoxRef = w.createRef()),
          (this.onValueChange = (e) => {
            const t = fy(e),
              n = this.state.sanitizedValue;
            this.setState({ proposedValue: e, sanitizedValue: t }),
              t !== n &&
                void 0 !== this.props.onValueChange &&
                this.props.onValueChange(t);
          }),
          (this.onBlur = (e) => {
            void 0 !== this.props.onBlur && this.props.onBlur(fy(e));
          });
        const t = e.initialValue || "";
        this.state = { proposedValue: t, sanitizedValue: fy(t) };
      }
      componentDidMount() {
        this.state.sanitizedValue !== this.props.initialValue &&
          void 0 !== this.props.onValueChange &&
          this.props.onValueChange(this.state.sanitizedValue);
      }
      render() {
        return w.createElement(
          "div",
          { className: "ref-name-text-box" },
          w.createElement(Md, {
            label: this.props.label,
            value: this.state.proposedValue,
            ref: this.textBoxRef,
            onValueChanged: this.onValueChange,
            onBlur: this.onBlur,
          }),
          this.renderRefValueWarning()
        );
      }
      focus() {
        null !== this.textBoxRef.current && this.textBoxRef.current.focus();
      }
      renderRefValueWarning() {
        var e;
        const { proposedValue: t, sanitizedValue: n } = this.state;
        if (t === n) return null;
        const r =
          null !== (e = this.props.renderWarningMessage) && void 0 !== e
            ? e
            : this.defaultRenderWarningMessage;
        return w.createElement(
          "div",
          { className: "warning-helper-text" },
          w.createElement(vh, { symbol: wh.alert }),
          w.createElement("p", null, r(n, t))
        );
      }
      defaultRenderWarningMessage(e, t) {
        return 0 === e.length
          ? w.createElement(
              w.Fragment,
              null,
              w.createElement(Om, null, t),
              " is not a valid name."
            )
          : w.createElement(
              w.Fragment,
              null,
              "Will be created as ",
              w.createElement(Om, null, e),
              "."
            );
      }
    }
    class gy extends w.Component {
      constructor(e) {
        super(e),
          (this.onNameChange = (e) => {
            this.setState({ newName: e });
          }),
          (this.renameBranch = () => {
            this.props.dispatcher.renameBranch(
              this.props.repository,
              this.props.branch,
              this.state.newName
            ),
              this.props.onDismissed();
          }),
          (this.state = { newName: e.branch.name });
      }
      render() {
        return w.createElement(
          sg,
          {
            id: "rename-branch",
            title: "Rename branch",
            onDismissed: this.props.onDismissed,
            onSubmit: this.renameBranch,
          },
          w.createElement(
            ig,
            null,
            w.createElement(my, {
              label: "Name",
              initialValue: this.props.branch.name,
              onValueChange: this.onNameChange,
            }),
            null != (e = this.props.branch).upstream
              ? w.createElement(
                  Pd,
                  { className: "warning-helper-text" },
                  w.createElement(vh, { symbol: wh.alert }),
                  w.createElement(
                    "p",
                    null,
                    "This branch is tracking ",
                    w.createElement(Om, null, e.upstream),
                    " and renaming this branch will not change the branch name on the remote."
                  )
                )
              : null,
            null === this.props.stash
              ? null
              : w.createElement(
                  Pd,
                  { className: "warning-helper-text" },
                  w.createElement(vh, { symbol: wh.alert }),
                  w.createElement(
                    "p",
                    null,
                    "Your current stashed changes on this branch will no longer be visible in GitHub Desktop if the branch is renamed."
                  )
                )
          ),
          w.createElement(
            lg,
            null,
            w.createElement(cg, {
              okButtonText: "Rename " + this.props.branch.name,
              okButtonDisabled: 0 === this.state.newName.length,
            })
          )
        );
        var e;
      }
    }
    class yy extends w.Component {
      constructor(e) {
        super(e),
          (this.onIncludeRemoteChanged = (e) => {
            const t = e.currentTarget.checked;
            this.setState({ includeRemoteBranch: t });
          }),
          (this.deleteBranch = async () => {
            const { dispatcher: e, repository: t, branch: n } = this.props;
            this.setState({ isDeleting: !0 }),
              await e.deleteBranch(t, n, this.state.includeRemoteBranch),
              this.props.onDeleted(t),
              this.props.onDismissed();
          }),
          (this.state = { includeRemoteBranch: !1, isDeleting: !1 });
      }
      render() {
        return w.createElement(
          sg,
          {
            id: "delete-branch",
            title: "Delete branch",
            type: "warning",
            onSubmit: this.deleteBranch,
            onDismissed: this.props.onDismissed,
            disabled: this.state.isDeleting,
            loading: this.state.isDeleting,
          },
          w.createElement(
            ig,
            null,
            w.createElement(
              "p",
              null,
              "Delete branch ",
              w.createElement(Om, null, this.props.branch.name),
              "?",
              w.createElement("br", null),
              "This action cannot be undone."
            ),
            this.renderDeleteOnRemote()
          ),
          w.createElement(
            lg,
            null,
            w.createElement(cg, { destructive: !0, okButtonText: "Delete" })
          )
        );
      }
      renderDeleteOnRemote() {
        return this.props.branch.remote && this.props.existsOnRemote
          ? w.createElement(
              "div",
              null,
              w.createElement(
                "p",
                null,
                w.createElement(
                  "strong",
                  null,
                  "The branch also exists on the remote, do you wish to delete it there as well?"
                )
              ),
              w.createElement(qd, {
                label: "Yes, delete this branch on the remote",
                value: this.state.includeRemoteBranch ? $d.On : $d.Off,
                onChange: this.onIncludeRemoteChanged,
              })
            )
          : null;
      }
    }
    class vy extends w.Component {
      render() {
        const e = this.props.progress.value || void 0;
        return w.createElement(
          Gd,
          { id: "cloning-repository-view" },
          w.createElement(
            "div",
            { className: "title-container" },
            w.createElement(vh, { symbol: wh.desktopDownload }),
            w.createElement(
              "div",
              { className: "title" },
              "正在克隆 ",
              this.props.repository.name
            )
          ),
          w.createElement("progress", { value: e }),
          w.createElement(
            "div",
            { className: "details" },
            this.props.progress.description
          )
        );
      }
    }
    class wy extends w.Component {
      render() {
        return w.createElement(
          "div",
          { id: this.props.id, className: "toolbar" },
          this.props.children
        );
      }
    }
    var by;
    !(function (e) {
      (e[(e.Standard = 0)] = "Standard"), (e[(e.Subtitle = 1)] = "Subtitle");
    })(by || (by = {}));
    class Sy extends w.Component {
      constructor() {
        super(...arguments),
          (this.innerButton = null),
          (this.onClick = (e) => {
            this.props.onClick && this.props.onClick(e);
          }),
          (this.onButtonRef = (e) => {
            this.innerButton = e;
          }),
          (this.focusButton = () => {
            this.innerButton && this.innerButton.focus();
          }),
          (this.getButtonBoundingClientRect = () =>
            this.innerButton
              ? this.innerButton.getBoundingClientRect()
              : void 0);
      }
      render() {
        const e = this.props.icon
            ? w.createElement(vh, {
                symbol: this.props.icon,
                className: ph()("icon", this.props.iconClassName),
              })
            : null,
          t = ph()(
            "toolbar-button",
            { "has-progress": void 0 !== this.props.progressValue },
            this.props.className
          ),
          n =
            void 0 !== this.props.progressValue
              ? Math.round(100 * yl(this.props.progressValue, 0, 1)) / 100
              : void 0,
          r =
            void 0 !== n
              ? w.createElement("div", {
                  className: "progress",
                  style: { transform: `scaleX(${n})` },
                })
              : void 0;
        return w.createElement(
          "div",
          {
            className: t,
            onKeyDown: this.props.onKeyDown,
            title: this.props.tooltip,
          },
          w.createElement(
            Ud,
            {
              onClick: this.onClick,
              ref: this.onButtonRef,
              disabled: this.props.disabled,
              onMouseEnter: this.props.onMouseEnter,
              tabIndex: this.props.tabIndex,
              role: this.props.role,
              ariaExpanded: this.props.ariaExpanded,
            },
            r,
            e,
            this.renderText(),
            this.props.children
          )
        );
      }
      renderText() {
        if (void 0 === this.props.title && void 0 === this.props.description)
          return null;
        const e =
            void 0 !== this.props.title
              ? w.createElement("div", { className: "title" }, this.props.title)
              : null,
          t =
            void 0 !== this.props.description
              ? w.createElement(
                  "div",
                  { className: "description" },
                  this.props.description
                )
              : null,
          n = this.props.style || by.Standard;
        switch (n) {
          case by.Standard:
            return w.createElement("div", { className: "text" }, t, e);
          case by.Subtitle:
            return w.createElement(
              "div",
              { className: "text" },
              w.createElement("div", { className: "title" }, this.props.title),
              t
            );
          default:
            return X(0, "Unknown button style: " + n);
        }
      }
    }
    class Cy extends w.Component {
      constructor(e) {
        super(e),
          (this.innerButton = null),
          (this.onClick = (e) => {
            const t = "open" === this.props.dropdownState ? "closed" : "open",
              n = e.clientX || e.clientY ? "pointer" : "keyboard";
            this.props.onDropdownStateChanged(t, n);
          }),
          (this.handleOverlayClick = () => {
            this.props.onDropdownStateChanged("closed", "pointer");
          }),
          (this.onFoldoutKeyDown = (e) => {
            !e.defaultPrevented &&
              this.isOpen &&
              "Escape" === e.key &&
              (e.preventDefault(),
              this.props.onDropdownStateChanged("closed", "keyboard"));
          }),
          (this.renderDropdownContents = () =>
            "open" !== this.props.dropdownState
              ? null
              : w.createElement(
                  "div",
                  {
                    id: "foldout-container",
                    style: this.getFoldoutContainerStyle(),
                  },
                  w.createElement("div", {
                    className: "overlay",
                    tabIndex: -1,
                    onClick: this.handleOverlayClick,
                  }),
                  w.createElement(
                    "div",
                    {
                      className: "foldout",
                      style: this.getFoldoutStyle(),
                      tabIndex: -1,
                      onKeyDown: this.onFoldoutKeyDown,
                    },
                    this.props.dropdownContentRenderer()
                  )
                )),
          (this.onRef = (e) => {
            this.innerButton = e;
          }),
          (this.focusButton = () => {
            this.innerButton && this.innerButton.focusButton();
          }),
          (this.state = { clientRect: null });
      }
      get isOpen() {
        return "open" === this.props.dropdownState;
      }
      dropdownIcon(e) {
        return "open" === e
          ? wh.triangleUp
          : "closed" === e
          ? wh.triangleDown
          : X(0, "Unknown dropdown state " + e);
      }
      renderDropdownArrow() {
        if (!1 === this.props.showDisclosureArrow) return null;
        const e = this.props.dropdownState;
        return w.createElement(vh, {
          symbol: this.dropdownIcon(e),
          className: "dropdownArrow",
        });
      }
      updateClientRectIfNecessary() {
        if ("open" === this.props.dropdownState && this.innerButton) {
          const n = this.innerButton.getButtonBoundingClientRect();
          if (n) {
            const r = this.state.clientRect;
            (r &&
              ((e = r) === (t = n) ||
                (e.left === t.left &&
                  e.right === t.right &&
                  e.top === t.top &&
                  e.bottom === t.bottom &&
                  e.width === t.width &&
                  e.height === t.height))) ||
              this.setState({ clientRect: n });
          }
        }
        var e, t;
      }
      componentDidMount() {
        this.updateClientRectIfNecessary();
      }
      componentWillUnmount() {
        this.innerButton = null;
      }
      componentDidUpdate() {
        this.updateClientRectIfNecessary();
      }
      getFoldoutContainerStyle() {
        const e = this.state.clientRect;
        if (e)
          return {
            position: "absolute",
            top: e.bottom,
            left: 0,
            width: "100%",
            height: `calc(100% - ${e.bottom}px)`,
          };
      }
      getFoldoutStyle() {
        if (this.props.foldoutStyle) return this.props.foldoutStyle;
        const e = this.state.clientRect;
        return e
          ? {
              position: "absolute",
              marginLeft: e.left,
              minWidth: e.width,
              height: "100%",
              top: 0,
            }
          : void 0;
      }
      render() {
        const e = ph()(
            "toolbar-dropdown",
            this.props.dropdownState,
            this.props.className
          ),
          t = "open" === this.props.dropdownState ? "true" : "false";
        return w.createElement(
          "div",
          {
            className: e,
            onKeyDown: this.props.onKeyDown,
            role: this.props.role,
            "aria-expanded": t,
          },
          this.renderDropdownContents(),
          w.createElement(
            Sy,
            {
              className: this.props.buttonClassName,
              ref: this.onRef,
              icon: this.props.icon,
              title: this.props.title,
              description: this.props.description,
              tooltip: this.props.tooltip,
              onClick: this.onClick,
              onMouseEnter: this.props.onMouseEnter,
              style: this.props.style,
              iconClassName: this.props.iconClassName,
              disabled: this.props.disabled,
              tabIndex: this.props.tabIndex,
              progressValue: this.props.progressValue,
              role: this.props.buttonRole,
            },
            this.props.children,
            this.renderDropdownArrow()
          )
        );
      }
    }
    function Ey(e, t) {
      const { ahead: n, behind: r } = e;
      if (0 === n && 0 === r && 0 === t) return null;
      const i = new Array();
      return (
        (n > 0 || t > 0) &&
          i.push(
            w.createElement(
              "span",
              { key: "ahead" },
              n + t,
              w.createElement(vh, { symbol: wh.arrowUp })
            )
          ),
        r > 0 &&
          i.push(
            w.createElement(
              "span",
              { key: "behind" },
              r,
              w.createElement(vh, { symbol: wh.arrowDown })
            )
          ),
        w.createElement("div", { className: "ahead-behind" }, i)
      );
    }
    function ky(e) {
      return e
        ? w.createElement(
            "span",
            null,
            "最后一次更新 ",
            w.createElement(Jp, { date: e })
          )
        : "从未获取更新";
    }
    const xy = { className: "push-pull-button", style: by.Subtitle };
    const Ry = new wh(
      10,
      16,
      "M0 6a.75.75 0 0 0 .974.714L4.469 3.22a.75.75 0 0 1 1.06 0l3.478 3.478a.75.75 0 0 0 .772-1.228L5.53 1.22a.75.75 0 0 0-1.06 0L.22 5.47A.75.75 0 0 0 0 6zm0 3a.75.75 0 0 0 1.28.53l2.97-2.97V14a.75.75 0 1 0 1.5 0V6.56l2.97 2.97a.75.75 0 0 0 1.06-1.06L5.53 4.22a.75.75 0 0 0-1.06 0L.22 8.47A.75.75 0 0 0 0 9z",
      "evenodd"
    );
    class Ty extends w.Component {
      constructor() {
        super(...arguments),
          (this.push = () => {
            this.props.dispatcher.push(this.props.repository);
          }),
          (this.forcePushWithLease = () => {
            this.props.dispatcher.confirmOrForcePush(this.props.repository);
          }),
          (this.pull = () => {
            this.props.dispatcher.pull(this.props.repository);
          }),
          (this.fetch = () => {
            this.props.dispatcher.fetch(
              this.props.repository,
              $i.UserInitiatedTask
            );
          });
      }
      render() {
        const {
          progress: e,
          networkActionInProgress: t,
          aheadBehind: n,
          numTagsToPush: r,
          remoteName: i,
          repository: o,
          tipState: s,
          rebaseInProgress: a,
          lastFetched: l,
          pullWithRebase: c,
          isForcePush: u,
        } = this.props;
        if (null !== e)
          return (function (e, t) {
            return w.createElement(
              Sy,
              Object.assign({}, xy, {
                title: e.title,
                description: e.description || "请稍候…",
                progressValue: e.value,
                icon: Ch,
                iconClassName: t ? "spin" : "",
                tooltip: e.description,
                disabled: !0,
              })
            );
          })(e, t);
        if (null === i)
          return (
            (h = this.push),
            w.createElement(
              Sy,
              Object.assign({}, xy, {
                title: "发布存储库",
                description: "将此存储库发布到线上",
                className: "push-pull-button",
                icon: wh.upload,
                style: by.Subtitle,
                onClick: h,
              })
            )
          );
        var h;
        if (s === so.Unborn)
          return w.createElement(
            Sy,
            Object.assign({}, xy, {
              title: "Publish branch",
              description: "Cannot publish unborn HEAD",
              icon: wh.upload,
              disabled: !0,
            })
          );
        if (s === so.Detached)
          return (function (e) {
            const t = e ? "Rebase in progress" : "Cannot publish detached HEAD";
            return w.createElement(
              Sy,
              Object.assign({}, xy, {
                title: "Publish branch",
                description: t,
                icon: wh.upload,
                disabled: !0,
              })
            );
          })(a);
        if (null === n) {
          return (function (e, t, n) {
            const r = e
                ? "将此分支发布到GitHub"
                : "将此分支发布到远程",
              i = ph()(xy.className, "nudge-arrow", { "nudge-arrow-up": n });
            return w.createElement(
              Sy,
              Object.assign({}, xy, {
                title: "发布分支",
                description: r,
                icon: wh.upload,
                onClick: t,
                className: i,
              })
            );
          })(null !== o.gitHubRepository, this.push, this.props.shouldNudge);
        }
        const { ahead: d, behind: p } = n;
        return 0 === d && 0 === p && 0 === r
          ? (function (e, t, n, r, i) {
              const o = "获取远程仓库 "+e+" 更新";
              return w.createElement(
                Sy,
                Object.assign({}, xy, {
                  title: o,
                  description: ky(r),
                  icon: Ch,
                  onClick: i,
                }),
                Ey(t, n)
              );
            })(i, n, r, l, this.fetch)
          : u
          ? (function (e, t, n, r, i) {
              return w.createElement(
                Sy,
                Object.assign({}, xy, {
                  title: "Force push " + e,
                  description: ky(r),
                  icon: Ry,
                  onClick: i,
                }),
                Ey(t, n)
              );
            })(i, n, r, l, this.forcePushWithLease)
          : p > 0
          ? (function (e, t, n, r, i, o) {
              const s = i ? `Pull ${e} with rebase` : "Pull " + e;
              return w.createElement(
                Sy,
                Object.assign({}, xy, {
                  title: s,
                  description: ky(r),
                  icon: wh.arrowDown,
                  onClick: o,
                }),
                Ey(t, n)
              );
            })(i, n, r, l, c || !1, this.pull)
          : (function (e, t, n, r, i) {
              return w.createElement(
                Sy,
                Object.assign({}, xy, {
                  title: "推送到 " + e,
                  description: ky(r),
                  icon: wh.arrowUp,
                  onClick: i,
                }),
                Ey(t, n)
              );
            })(i, n, r, l, this.push);
      }
    }
    class Dy extends w.Component {
      constructor() {
        super(...arguments),
          (this.renderBranchFoldout = () => {
            const e = this.props.repositoryState,
              t = e.branchesState,
              n = e.branchesState.tip,
              r = n.kind === so.Valid ? n.branch : null;
            return w.createElement(Ug, {
              allBranches: t.allBranches,
              recentBranches: t.recentBranches,
              currentBranch: r,
              defaultBranch: t.defaultBranch,
              dispatcher: this.props.dispatcher,
              repository: this.props.repository,
              selectedTab: this.props.selectedTab,
              pullRequests: this.props.pullRequests,
              currentPullRequest: this.props.currentPullRequest,
              isLoadingPullRequests: this.props.isLoadingPullRequests,
            });
          }),
          (this.onDropDownStateChanged = (e) => {
            ("open" === e && this.props.repositoryState.checkoutProgress) ||
              this.props.onDropDownStateChanged(e);
          });
      }
      render() {
        const { repositoryState: e } = this.props,
          { branchesState: t, checkoutProgress: n, changesState: r } = e,
          { tip: i } = t,
          { conflictState: o } = r,
          s = i.kind;
        let a,
          l,
          c = wh.gitBranch,
          u = void 0,
          h = "当前分支",
          d = !0,
          p = !1;
        if (
          (this.props.currentPullRequest && (c = wh.gitPullRequest),
          i.kind === so.Unknown)
        )
          return null;
        if (i.kind === so.Unborn)
          (a = i.ref),
            (l = "Current branch is " + i.ref),
            (d = t.allBranches.length > 0);
        else if (i.kind === so.Detached)
          (a = "On " + i.currentSha.substr(0, 7)),
            (l = "Currently on a detached HEAD"),
            (c = wh.gitCommit),
            (h = "Detached HEAD");
        else {
          if (i.kind !== so.Valid) return X(0, "Unknown tip state: " + s);
          (a = i.branch.name), (l = "当前所在的分支是 " + a);
        }
        let f = void 0;
        if (n) {
          if (
            ((a = n.targetBranch), (h = "正在切换分支"), n.value > 0)
          ) {
            h = `${h} (${Math.round(100 * n.value)}%)`;
          }
          (f = n.value), (c = Ch), (u = "spin"), (d = !1);
        } else
          null !== o &&
            Q(o) &&
            ((a = o.targetBranch),
            (h = "Rebasing branch"),
            (c = wh.gitBranch),
            (d = !1),
            (p = !0));
        const m = this.props.isOpen && d ? "open" : "closed",
          g = ph()("nudge-arrow", { "nudge-arrow-up": this.props.shouldNudge });
        return w.createElement(
          Cy,
          {
            className: "branch-button",
            icon: c,
            iconClassName: u,
            title: a,
            description: h,
            tooltip: l,
            onDropdownStateChanged: this.onDropDownStateChanged,
            dropdownContentRenderer: this.renderBranchFoldout,
            dropdownState: m,
            disabled: p,
            showDisclosureArrow: d,
            progressValue: f,
            buttonClassName: g,
          },
          this.renderPullRequestInfo()
        );
      }
      renderPullRequestInfo() {
        const e = this.props.currentPullRequest;
        return null === e
          ? null
          : w.createElement(Wg, {
              number: e.pullRequestNumber,
              dispatcher: this.props.dispatcher,
              repository: e.base.gitHubRepository,
            });
      }
    }
    class Ay extends w.Component {
      render() {
        const e = this.props.progress,
          t = e.title || "Hang on…";
        return w.createElement(Sy, {
          title: "Reverting…",
          description: t,
          progressValue: e.value,
          className: "revert-progress",
          icon: Ch,
          iconClassName: "spin",
          style: by.Subtitle,
          disabled: !0,
        });
      }
    }
    class _y extends w.Component {
      constructor(e) {
        super(e),
          (this.discard = async () => {
            this.setState({ isDiscardingChanges: !0 }),
              await this.props.dispatcher.discardChanges(
                this.props.repository,
                this.props.files
              ),
              this.props.onConfirmDiscardChangesChanged(
                this.state.confirmDiscardChanges
              ),
              this.props.onDismissed();
          }),
          (this.onConfirmDiscardChangesChanged = (e) => {
            const t = !e.currentTarget.checked;
            this.setState({ confirmDiscardChanges: t });
          }),
          (this.state = {
            isDiscardingChanges: !1,
            confirmDiscardChanges: this.props.confirmDiscardChanges,
          });
      }
      getOkButtonLabel() {
        return this.props.discardingAllChanges
          ? "放弃所有更改"
          : "放弃更改";
      }
      getDialogTitle() {
        return this.props.discardingAllChanges
          ? "确认放弃所有更改"
          : "确认放弃更改";
      }
      render() {
        const e = this.state.isDiscardingChanges;
        return w.createElement(
          sg,
          {
            id: "discard-changes",
            title: this.getDialogTitle(),
            onDismissed: this.props.onDismissed,
            onSubmit: this.discard,
            dismissable: !e,
            loading: e,
            disabled: e,
            type: "警告",
          },
          w.createElement(
            ig,
            null,
            this.renderFileList(),
            w.createElement(
              "p",
              null,
              "可以通过从中检索更改来恢复更改",
              "回收站",
              "."
            ),
            this.renderConfirmDiscardChanges()
          ),
          w.createElement(
            lg,
            null,
            w.createElement(cg, {
              destructive: !0,
              okButtonText: this.getOkButtonLabel(),
            })
          )
        );
      }
      renderConfirmDiscardChanges() {
        return this.props.showDiscardChangesSetting
          ? w.createElement(qd, {
              label: "不再显示该消息",
              value: this.state.confirmDiscardChanges ? $d.Off : $d.On,
              onChange: this.onConfirmDiscardChangesChanged,
            })
          : null;
      }
      renderFileList() {
        return this.props.files.length > 10
          ? w.createElement(
              "p",
              null,
              "确定放弃所有",
              this.props.files.length,
              "文件更改?"
            )
          : w.createElement(
              "div",
              null,
              w.createElement(
                "p",
                null,
                "确定放弃所有更改:"
              ),
              w.createElement(
                "ul",
                null,
                this.props.files.map((e) =>
                  w.createElement(
                    "li",
                    { key: e.id },
                    w.createElement(Up, { path: e.path })
                  )
                )
              )
            );
      }
    }
    class My extends w.Component {
      constructor() {
        super(...arguments),
          (this.onSubmit = (e) => {
            e.preventDefault(), this.props.onSubmit && this.props.onSubmit();
          });
      }
      render() {
        const e = ph()("form-component", this.props.className);
        return w.createElement(
          "form",
          { className: e, onSubmit: this.onSubmit },
          this.props.children
        );
      }
    }
    class Py extends w.Component {
      render() {
        const e = ph()("errors-component", this.props.className);
        return w.createElement("div", { className: e }, this.props.children);
      }
    }
    const Iy =
      "登录后，浏览器会将重定向到GitHub Desktop。如果浏览器要求启动GitHub Desktop的许可证，请允许它执行以下操作：.";
    class Oy extends w.Component {
      constructor(e) {
        super(e),
          (this.onUsernameChange = (e) => {
            this.setState({ username: e });
          }),
          (this.onPasswordChange = (e) => {
            this.setState({ password: e });
          }),
          (this.signInWithBrowser = (e) => {
            e && e.preventDefault(), this.props.onBrowserSignInRequested();
          }),
          (this.signIn = () => {
            this.props.onSubmit(this.state.username, this.state.password);
          }),
          (this.state = { username: "", password: "" });
      }
      render() {
        const e = this.props.supportsBasicAuth
          ? this.renderSignInForm()
          : this.renderEndpointRequiresWebFlow();
        return w.createElement(
          My,
          { className: "sign-in-form", onSubmit: this.signIn },
          e
        );
      }
      renderUsernamePassword() {
        const e = this.props.loading;
        return w.createElement(
          w.Fragment,
          null,
          w.createElement(Md, {
            label: "用户名称和邮箱地址",
            disabled: e,
            autoFocus: !0,
            onValueChanged: this.onUsernameChange,
          }),
          w.createElement(Md, {
            label: "密码",
            type: "password",
            disabled: e,
            onValueChanged: this.onPasswordChange,
          }),
          this.renderError(),
          w.createElement(
            "div",
            { className: "sign-in-footer" },
            this.renderActions()
          )
        );
      }
      renderActions() {
        const e = Boolean(
          !this.state.username.length ||
            !this.state.password.length ||
            this.props.loading
        );
        return w.createElement(
          "div",
          { className: "actions" },
          this.props.supportsBasicAuth
            ? w.createElement(
                Ud,
                { type: "submit", disabled: e },
                this.props.loading ? w.createElement(cp, null) : null,
                "登陆"
              )
            : null,
          this.props.additionalButtons,
          this.props.supportsBasicAuth
            ? w.createElement(
                _d,
                {
                  className: "forgot-password-link",
                  uri: this.props.forgotPasswordUrl,
                },
                "忘记密码?"
              )
            : null
        );
      }
      renderSignInWithBrowser() {
        return w.createElement(
          w.Fragment,
          null,
          this.renderSignInWithBrowserButton(),
          this.props.additionalButtons
        );
      }
      renderSignInForm() {
        return this.props.endpoint === gt()
          ? this.renderUsernamePassword()
          : w.createElement(
              w.Fragment,
              null,
              this.renderSignInWithBrowser(),
              this.renderUsernamePassword()
            );
      }
      renderEndpointRequiresWebFlow() {
        return w.createElement(
          w.Fragment,
          null,
          this.props.endpoint === gt()
            ? w.createElement(
                w.Fragment,
                null,
                w.createElement(
                  "p",
                  null,
                  "GitHub现在要求使用浏览器登录."
                ),
                w.createElement("p", null, Iy)
              )
            : w.createElement(
                "p",
                null,
                "通过GitHub Enterprise Server实例使用浏览器登录."
              ),
          this.renderSignInWithBrowserButton(),
          this.props.additionalButtons
        );
      }
      renderSignInWithBrowserButton() {
        return w.createElement(
          Ud,
          {
            type: "submit",
            className: "button-with-icon",
            onClick: this.signInWithBrowser,
          },
          "通过浏览器登陆",
          w.createElement(vh, { symbol: wh.linkExternal })
        );
      }
      renderError() {
        const e = this.props.error;
        return e ? w.createElement(Py, null, e.message) : null;
      }
    }
    class Ly extends w.Component {
      constructor() {
        super(...arguments),
          (this.signInWithBrowser = (e) => {
            e && e.preventDefault(),
              this.props.advance(Vy.SignInToDotComWithBrowser),
              this.props.dispatcher.requestBrowserAuthenticationToDotcom();
          }),
          (this.cancelBrowserAuth = () => {
            this.props.advance(Vy.Start);
          }),
          (this.signInToEnterprise = () => {
            this.props.advance(Vy.SignInToEnterprise);
          }),
          (this.skip = () => {
            this.props.advance(Vy.ConfigureGit);
          });
      }
      render() {
        return w.createElement(
          "div",
          { id: "start" },
          w.createElement(
            "h1",
            { className: "welcome-title" },
            "GitHub Desktop 欢迎向导"
          ),
          this.props.loadingBrowserAuth
            ? w.createElement("p", null, Iy)
            : w.createElement(
                w.Fragment,
                null,
                w.createElement(
                  "p",
                  { className: "welcome-text" },
                  "GitHub Desktop，开源及私有项目托管平台的桌面版客户端，用于GIT项目代码托管，管理仓库版本，控制存储分支，本地同步推送等操作。"
                ),
                w.createElement(
                  "p",
                  { className: "welcome-text" },
                  "新建 GitHub?",
                  " ",
                  w.createElement(
                    _d,
                    {
                      uri: "https://github.com/join?source=github-desktop",
                      className: "create-account-link",
                    },
                    "创建免费帐户."
                  )
                )
              ),
          w.createElement(
            "div",
            { className: "welcome-main-buttons" },
            w.createElement(
              Ud,
              {
                type: "submit",
                className: "button-with-icon",
                disabled: this.props.loadingBrowserAuth,
                onClick: this.signInWithBrowser,
              },
              this.props.loadingBrowserAuth && w.createElement(cp, null),
              "登陆 GitHub.com",
              w.createElement(vh, { symbol: wh.linkExternal })
            ),
            this.props.loadingBrowserAuth
              ? w.createElement(
                  Ud,
                  { onClick: this.cancelBrowserAuth },
                  "取消"
                )
              : w.createElement(
                  Ud,
                  { onClick: this.signInToEnterprise },
                  "登录GitHub Enterprise Serverr"
                )
          ),
          w.createElement(
            "div",
            { className: "skip-action-container" },
            w.createElement(
              _d,
              { className: "skip-button", onClick: this.skip },
              "跳过欢迎向导"
            )
          )
        );
      }
    }
    class Fy extends w.Component {
      constructor(e) {
        super(e),
          (this.onOTPChange = (e) => {
            this.setState({ otp: e });
          }),
          (this.signIn = () => {
            this.props.onOTPEntered(this.state.otp);
          }),
          (this.state = { otp: "" });
      }
      render() {
        const e = this.props.loading,
          t = !/\S+/.test(this.state.otp) || this.props.loading,
          n = this.props.error
            ? w.createElement(Py, null, this.props.error.message)
            : null;
        return w.createElement(
          "div",
          null,
          w.createElement(
            "p",
            { className: "welcome-text" },
            Ke(this.props.type)
          ),
          w.createElement(
            My,
            { onSubmit: this.signIn },
            w.createElement(Md, {
              label: "验证码",
              disabled: e,
              autoFocus: !0,
              onValueChanged: this.onOTPChange,
            }),
            n,
            w.createElement(
              "div",
              { className: "actions" },
              w.createElement(
                Ud,
                { type: "submit", disabled: t },
                this.props.loading ? w.createElement(cp, null) : null,
                "安全验证"
              ),
              this.props.additionalButtons
            )
          )
        );
      }
    }
    class Ny extends w.Component {
      constructor(e) {
        super(e),
          (this.onServerAddressChanged = (e) => {
            this.setState({ serverAddress: e });
          }),
          (this.onSubmit = () => {
            this.props.onSubmit(this.state.serverAddress);
          }),
          (this.state = { serverAddress: "" });
      }
      render() {
        const e = this.props.loading,
          t = 0 === this.state.serverAddress.length || this.props.loading;
        return w.createElement(
          My,
          { onSubmit: this.onSubmit },
          w.createElement(Md, {
            label: "Enterprise Server 地址",
            autoFocus: !0,
            disabled: e,
            onValueChanged: this.onServerAddressChanged,
            placeholder: "https://github.example.com",
          }),
          this.props.error
            ? w.createElement(Py, null, this.props.error.message)
            : null,
          w.createElement(
            "div",
            { className: "actions" },
            w.createElement(
              Ud,
              { type: "submit", disabled: t },
              this.props.loading ? w.createElement(cp, null) : null,
              "继续"
            ),
            this.props.additionalButtons
          )
        );
      }
    }
    class By extends w.Component {
      constructor() {
        super(...arguments),
          (this.onEndpointEntered = (e) => {
            this.props.dispatcher.setSignInEndpoint(e);
          }),
          (this.onCredentialsEntered = (e, t) => {
            this.props.dispatcher.setSignInCredentials(e, t);
          }),
          (this.onBrowserSignInRequested = () => {
            this.props.dispatcher.requestBrowserAuthentication();
          }),
          (this.onOTPEntered = (e) => {
            this.props.dispatcher.setSignInOTP(e);
          });
      }
      renderEndpointEntryStep(e) {
        const t = this.props.children;
        return w.createElement(Ny, {
          loading: e.loading,
          error: e.error,
          onSubmit: this.onEndpointEntered,
          additionalButtons: t,
        });
      }
      renderAuthenticationStep(e) {
        const t = this.props.children;
        return w.createElement(Oy, {
          loading: e.loading,
          error: e.error,
          supportsBasicAuth: e.supportsBasicAuth,
          additionalButtons: t,
          onBrowserSignInRequested: this.onBrowserSignInRequested,
          onSubmit: this.onCredentialsEntered,
          forgotPasswordUrl: e.forgotPasswordUrl,
          endpoint: e.endpoint,
        });
      }
      renderTwoFactorAuthenticationStep(e) {
        return w.createElement(Fy, {
          loading: e.loading,
          error: e.error,
          type: e.type,
          additionalButtons: this.props.children,
          onOTPEntered: this.onOTPEntered,
        });
      }
      render() {
        const e = this.props.signInState,
          t = this.props.signInState.kind;
        switch (e.kind) {
          case Ku.EndpointEntry:
            return this.renderEndpointEntryStep(e);
          case Ku.Authentication:
            return this.renderAuthenticationStep(e);
          case Ku.TwoFactorAuthentication:
            return this.renderTwoFactorAuthenticationStep(e);
          case Ku.Success:
            return null;
          default:
            return X(0, "Unknown sign-in step: " + t);
        }
      }
    }
    class Hy extends w.Component {
      constructor() {
        super(...arguments),
          (this.cancel = () => {
            this.props.advance(Vy.Start);
          });
      }
      render() {
        const e = this.props.signInState;
        return e
          ? w.createElement(
              "div",
              { id: "sign-in-enterprise" },
              w.createElement(
                "h1",
                { className: "welcome-title" },
                "登陆 GitHub Enterprise Server"
              ),
              w.createElement(
                By,
                { signInState: e, dispatcher: this.props.dispatcher },
                w.createElement(Ud, { onClick: this.cancel }, "取消")
              )
            )
          : null;
      }
    }
    class zy extends w.Component {
      constructor() {
        super(...arguments),
          (this.onDeleteLockFile = async () => {
            try {
              await Object(_i.unlink)(this.props.lockFilePath);
            } catch (e) {
              if ("ENOENT" !== e.code) return void this.props.onError(e);
            }
            this.props.onLockFileDeleted();
          });
      }
      render() {
        return w.createElement(
          "div",
          { className: "config-lock-file-exists-component" },
          w.createElement(
            "p",
            null,
            "无法更新Git配置文件，文件已存在被锁定",
            " ",
            w.createElement(Om, null, this.props.lockFilePath),
            "."
          ),
          w.createElement(
            "p",
            null,
            "如果当前有其他工具正在修改Git配置，或者Git进程在不清理锁定文件的情况下被终止，则可能会发生这种情况。确定",
            " ",
            w.createElement(
              _d,
              { onClick: this.onDeleteLockFile },
              "删除锁文件"
            ),
            " ",
            "然后重试？"
          )
        );
      }
    }
    class Uy extends w.Component {
      constructor(e) {
        super(e),
          (this.globalUsernamePromise = Uo("user.name")),
          (this.globalEmailPromise = Uo("user.email")),
          (this.onLockFileDeleted = () => {
            this.setState({ existingLockFilePath: void 0 });
          }),
          (this.onLockFileDeleteError = (e) => {
            log.error("Failed to unlink config lock file", e),
              this.setState({ existingLockFilePath: void 0 });
          }),
          (this.onNameChange = (e) => {
            this.setState({ name: e });
          }),
          (this.onEmailChange = (e) => {
            this.setState({ email: e });
          }),
          (this.save = async () => {
            const {
              name: e,
              email: t,
              globalUserName: n,
              globalUserEmail: r,
            } = this.state;
            try {
              e.length > 0 && e !== n && (await Wo("user.name", e)),
                t.length > 0 && t !== r && (await Wo("user.email", t));
            } catch (e) {
              if (Ko(e)) {
                const t = Qo(e.result);
                if (null !== t)
                  return void this.setState({ existingLockFilePath: t });
              }
            }
            this.props.onSave && this.props.onSave();
          }),
          (this.state = {
            globalUserName: null,
            globalUserEmail: null,
            name: "",
            email: "",
          });
      }
      async componentDidMount() {
        const e = this.props.accounts,
          [t, n] = await Promise.all([
            this.globalUsernamePromise,
            this.globalEmailPromise,
          ]);
        this.setState(
          (e) => ({
            globalUserName: t,
            globalUserEmail: n,
            name: 0 === e.name.length ? t || "" : e.name,
            email: 0 === e.email.length ? n || "" : e.email,
          }),
          () => {
            e === this.props.accounts &&
              e.length > 0 &&
              this.setDefaultValuesFromAccount(e[0]);
          }
        );
      }
      componentDidUpdate(e) {
        if (
          this.props.accounts !== e.accounts &&
          this.props.accounts.length > 0 &&
          this.props.accounts[0] !== e.accounts[0]
        ) {
          const e = this.props.accounts[0];
          this.setDefaultValuesFromAccount(e);
        }
      }
      setDefaultValuesFromAccount(e) {
        0 === this.state.name.length &&
          this.setState({ name: e.name || e.login }),
          0 === this.state.email.length && this.setState({ email: _u(e) });
      }
      dateWithMinuteOffset(e, t) {
        const n = new Date(e.getTime());
        return n.setTime(n.getTime() + 60 * t * 1e3), n;
      }
      render() {
        const e = new Date(),
          t = new Pa(
            this.state.name,
            this.state.email,
            this.dateWithMinuteOffset(e, -30)
          ),
          n = new La(
            this.state.name,
            this.state.name.slice(0, 7),
            "Fix all the things",
            "",
            t,
            t,
            [],
            [],
            []
          ),
          r = new Map(),
          i =
            void 0 !== this.state.existingLockFilePath
              ? w.createElement(zy, {
                  lockFilePath: this.state.existingLockFilePath,
                  onLockFileDeleted: this.onLockFileDeleted,
                  onError: this.onLockFileDeleteError,
                })
              : null;
        return w.createElement(
          "div",
          { id: "configure-git-user" },
          i,
          w.createElement(
            My,
            { className: "sign-in-form", onSubmit: this.save },
            w.createElement(Md, {
              label: "名称",
              placeholder: "你的名称",
              value: this.state.name,
              onValueChanged: this.onNameChange,
            }),
            w.createElement(Md, {
              type: "邮箱",
              label: "邮箱地址",
              placeholder: "www.423down.com",
              value: this.state.email,
              onValueChanged: this.onEmailChange,
            }),
            w.createElement(
              Pd,
              null,
              w.createElement(
                Ud,
                { type: "提交" },
                this.props.saveLabel || "保存"
              ),
              this.props.children
            )
          ),
          w.createElement(
            "div",
            { id: "commit-list", className: "commit-list-example" },
            w.createElement("div", { className: "header" }, "Example commit"),
            w.createElement(eg, {
              commit: n,
              emoji: r,
              gitHubRepository: null,
              isLocal: !1,
              showUnpushedIndicator: !1,
            })
          )
        );
      }
    }
    class Wy extends w.Component {
      constructor() {
        super(...arguments),
          (this.cancel = () => {
            this.props.advance(Vy.Start);
          }),
          (this.continue = () => {
            this.props.advance(Vy.UsageOptOut);
          });
      }
      render() {
        return w.createElement(
          "div",
          { id: "configure-git" },
          w.createElement(
            "h1",
            { className: "welcome-title" },
            "配置Git"
          ),
          w.createElement(
            "p",
            { className: "welcome-text" },
            "配置GIT可以用于公开您创建的提交。如果您发布提交，任何人都将能够看到此信息."
          ),
          w.createElement(
            Uy,
            {
              accounts: this.props.accounts,
              onSave: this.continue,
              saveLabel: "继续",
            },
            w.createElement(Ud, { onClick: this.cancel }, "取消")
          )
        );
      }
    }
    class jy extends w.Component {
      constructor(e) {
        super(e),
          (this.onChange = (e) => {
            const t = e.currentTarget.checked;
            this.setState({ newOptOutValue: !t });
          }),
          (this.cancel = () => {
            this.props.advance(Vy.ConfigureGit);
          }),
          (this.finish = () => {
            this.props.dispatcher.setStatsOptOut(this.state.newOptOutValue, !0),
              this.props.dispatcher.markUsageStatsNoteSeen(),
              this.props.done();
          }),
          (this.state = { newOptOutValue: e.optOut });
      }
      render() {
        return w.createElement(
          "div",
          { className: "usage-opt-out" },
          w.createElement(
            "h1",
            { className: "welcome-title" },
            "体验改进"
          ),
          w.createElement(
            "p",
            null,
            "是否定期发送匿名使用数据来帮助我们改进GitHub Desktop?",
            w.createElement(_d, { uri: oh }, "关于使用情况统计"),
            "?"
          ),
          w.createElement(
            My,
            { onSubmit: this.finish },
            w.createElement(
              Pd,
              null,
              w.createElement(qd, {
                label: "确定",
                value: this.state.newOptOutValue ? $d.Off : $d.On,
                onChange: this.onChange,
              })
            ),
            w.createElement(
              Pd,
              { className: "actions" },
              w.createElement(Ud, { type: "submit" }, "完成"),
              w.createElement(Ud, { onClick: this.cancel }, "取消")
            )
          )
        );
      }
    }
    var Vy;
    !(function (e) {
      (e.Start = "Start"),
        (e.SignInToDotComWithBrowser = "SignInToDotComWithBrowser"),
        (e.SignInToEnterprise = "SignInToEnterprise"),
        (e.ConfigureGit = "ConfigureGit"),
        (e.UsageOptOut = "UsageOptOut");
    })(Vy || (Vy = {}));
    const Gy = _c(__dirname, "static/welcome-illustration-right.svg"),
      $y = _c(__dirname, "static/welcome-illustration-left-top.svg"),
      qy = _c(__dirname, "static/welcome-illustration-left-bottom.svg");
    class Ky extends w.Component {
      constructor(e) {
        super(e),
          (this.advanceToStep = (e) => {
            log.info("[Welcome] advancing to step: " + e),
              e === Vy.SignInToEnterprise &&
                this.props.dispatcher.beginEnterpriseSignIn(),
              this.setState({ currentStep: e });
          }),
          (this.done = () => {
            this.setState({ exiting: !0 }, () => {
              setTimeout(() => {
                this.props.dispatcher.endWelcomeFlow();
              }, 250);
            });
          }),
          (this.state = { currentStep: Vy.Start, exiting: !1 });
      }
      componentWillReceiveProps(e) {
        this.advanceOnSuccessfulSignIn(e);
      }
      componentDidMount() {
        this.props.dispatcher.recordWelcomeWizardInitiated();
      }
      get inSignInStep() {
        return (
          this.state.currentStep === Vy.SignInToDotComWithBrowser ||
          this.state.currentStep === Vy.SignInToEnterprise
        );
      }
      advanceOnSuccessfulSignIn(e) {
        this.inSignInStep
          ? this.props.signInState
            ? e.signInState
              ? this.props.signInState.kind !== e.signInState.kind
                ? e.signInState.kind === Ku.Success &&
                  (this.advanceToStep(Vy.ConfigureGit),
                  this.props.dispatcher.resetSignInState())
                : log.info(
                    `[Welcome] kind ${this.props.signInState.kind} is the same as ${e.signInState.kind}. ignoring...`
                  )
              : log.info("[Welcome] next sign in state not found. ignoring...")
            : log.info("[Welcome] current sign in state not found. ignoring...")
          : log.info("[Welcome] no sign in step found. ignoring...");
      }
      getComponentForCurrentStep() {
        const e = this.state.currentStep,
          t = this.props.signInState;
        switch (e) {
          case Vy.Start:
          case Vy.SignInToDotComWithBrowser:
            const n =
              e === Vy.SignInToDotComWithBrowser &&
              null !== t &&
              t.kind === Ku.Authentication &&
              t.loading;
            return w.createElement(Ly, {
              advance: this.advanceToStep,
              dispatcher: this.props.dispatcher,
              loadingBrowserAuth: n,
            });
          case Vy.SignInToEnterprise:
            return w.createElement(Hy, {
              dispatcher: this.props.dispatcher,
              advance: this.advanceToStep,
              signInState: t,
            });
          case Vy.ConfigureGit:
            return w.createElement(Wy, {
              advance: this.advanceToStep,
              accounts: this.props.accounts,
            });
          case Vy.UsageOptOut:
            return w.createElement(jy, {
              dispatcher: this.props.dispatcher,
              advance: this.advanceToStep,
              optOut: this.props.optOut,
              done: this.done,
            });
          default:
            return X(0, "Unknown welcome step: " + e);
        }
      }
      render() {
        const e = ph()({ exiting: this.state.exiting });
        return w.createElement(
          Gd,
          { id: "welcome", className: e },
          w.createElement(
            "div",
            { className: "welcome-left" },
            w.createElement(
              "div",
              { className: "welcome-content" },
              this.getComponentForCurrentStep(),
              w.createElement("img", {
                className: "welcome-graphic-top",
                src: $y,
              }),
              w.createElement("img", {
                className: "welcome-graphic-bottom",
                src: qy,
              })
            )
          ),
          w.createElement(
            "div",
            { className: "welcome-right" },
            w.createElement("img", { className: "welcome-graphic", src: Gy })
          )
        );
      }
    }
    function Yy(e) {
      return e.replace("&&", "&");
    }
    class Qy extends w.Component {
      shouldComponentUpdate(e) {
        return (
          this.props.text !== e.text || this.props.highlight !== e.highlight
        );
      }
      render() {
        const e = this.props.text.match(/^(.*?)?(?:&([^&]))(.*)?$/);
        if (!e) return w.createElement("span", null, this.props.text);
        const t = new Array();
        e[1] &&
          t.push(
            w.createElement("span", { key: 1, "aria-hidden": !0 }, Yy(e[1]))
          );
        const n = ph()("access-key", { highlight: this.props.highlight });
        t.push(
          w.createElement(
            "span",
            { "aria-hidden": !0, key: 2, className: n },
            e[2]
          )
        ),
          e[3] &&
            t.push(
              w.createElement("span", { key: 3, "aria-hidden": !0 }, Yy(e[3]))
            );
        const r = `${e[1] ? Yy(e[1]) : ""}${e[2]}${e[3] ? Yy(e[3]) : ""}`;
        return w.createElement("span", { "aria-label": r }, t);
      }
    }
    class Zy extends w.Component {
      getIcon(e) {
        return "checkbox" === e.type && e.checked
          ? w.createElement(vh, { className: "icon", symbol: wh.check })
          : "radio" === e.type && e.checked
          ? w.createElement(vh, { className: "icon", symbol: wh.dotFill })
          : null;
      }
      render() {
        const e = this.props.item;
        if ("separator" === e.type) return w.createElement("hr", null);
        const t =
            "submenuItem" === e.type && !1 !== this.props.renderSubMenuArrow
              ? w.createElement(vh, {
                  className: "submenu-arrow",
                  symbol: wh.triangleRight,
                })
              : null,
          n =
            "submenuItem" !== e.type &&
            e.accelerator &&
            !1 !== this.props.renderAcceleratorText
              ? w.createElement(
                  "div",
                  { className: "accelerator" },
                  (function (e) {
                    return e.split("+").map(Dm).join("+");
                  })(e.accelerator)
                )
              : null,
          r = ph()(
            "menu-item",
            { disabled: !e.enabled },
            { checkbox: "checkbox" === e.type },
            { radio: "radio" === e.type },
            {
              checked:
                ("checkbox" === e.type || "radio" === e.type) && e.checked,
            }
          );
        return w.createElement(
          "div",
          { className: r },
          this.getIcon(e),
          w.createElement(
            "div",
            { className: "label" },
            w.createElement(Qy, {
              text: e.label,
              highlight: this.props.highlightAccessKey,
            })
          ),
          n,
          t
        );
      }
    }
    function Xy(e) {
      return e.reduce(
        (e, t) =>
          e +
          (function (e) {
            if (!e.visible) return 0;
            return "separator" === e.type ? 10 : 30;
          })(t),
        0
      );
    }
    function Jy(e) {
      const t = new Array(),
        n = e.selectedItem;
      let r = -1;
      for (let i = 0; i < e.items.length; i++) {
        const o = e.items[i];
        o.visible && (t.push(o), o === n && (r = t.length - 1));
      }
      return { items: t, selectedIndex: r };
    }
    class ev extends w.Component {
      constructor(e) {
        super(e),
          (this.list = null),
          (this.onRowClick = (e, t) => {
            const n = this.state.items[e];
            "separator" !== n.type &&
              n.enabled &&
              this.props.onItemClicked(this.props.depth, n, t);
          }),
          (this.onSelectedRowChanged = (e, t) => {
            const n = this.state.items[e];
            this.props.onSelectionChanged(this.props.depth, n, t);
          }),
          (this.onKeyDown = (e) => {
            if (e.defaultPrevented) return;
            if (e.altKey || e.ctrlKey || e.metaKey) return;
            if (!this.props.enableAccessKeyNavigation) return;
            const t = Li(e.key, this.state.items);
            t &&
              Oi(t) &&
              (e.preventDefault(),
              this.props.onSelectionChanged(this.props.depth, t, {
                kind: "keyboard",
                event: e,
              }),
              this.props.onItemClicked(this.props.depth, t, {
                kind: "keyboard",
                event: e,
              }));
          }),
          (this.onRowKeyDown = (e, t) => {
            if (this.props.onItemKeyDown) {
              const n = this.state.items[e];
              this.props.onItemKeyDown(this.props.depth, n, t);
            }
          }),
          (this.canSelectRow = (e) => Oi(this.state.items[e])),
          (this.onListRef = (e) => {
            this.list = e;
          }),
          (this.onMouseEnter = (e) => {
            this.props.onMouseEnter &&
              this.props.onMouseEnter(this.props.depth);
          }),
          (this.renderMenuItem = (e) => {
            const t = this.state.items[e];
            return w.createElement(Zy, {
              key: t.id,
              item: t,
              highlightAccessKey: this.props.enableAccessKeyNavigation,
            });
          }),
          (this.rowHeight = (e) =>
            "separator" === this.state.items[e.index].type ? 10 : 30),
          (this.state = Jy(e));
      }
      componentWillReceiveProps(e) {
        if (this.props.items === e.items) {
          if (this.props.selectedItem !== e.selectedItem) {
            const r =
              ((t = e.selectedItem),
              (n = this.state.items),
              t ? n.findIndex((e) => e.id === t.id) : -1);
            this.setState({ selectedIndex: r });
          }
        } else this.setState(Jy(e));
        var t, n;
      }
      render() {
        const e =
            !0 === this.props.autoHeight
              ? { height: Xy(this.props.items) + 5, maxHeight: "100%" }
              : {},
          t = ph()("menu-pane", this.props.className);
        return w.createElement(
          "div",
          {
            className: t,
            onMouseEnter: this.onMouseEnter,
            onKeyDown: this.onKeyDown,
            style: e,
          },
          w.createElement(Ad, {
            ref: this.onListRef,
            rowCount: this.state.items.length,
            rowHeight: this.rowHeight,
            rowRenderer: this.renderMenuItem,
            selectedRows: [this.state.selectedIndex],
            onRowClick: this.onRowClick,
            onSelectedRowChanged: this.onSelectedRowChanged,
            canSelectRow: this.canSelectRow,
            onRowKeyDown: this.onRowKeyDown,
            invalidationProps: this.state.items,
            selectOnHover: !0,
            ariaMode: "menu",
          })
        );
      }
      focus() {
        this.list && this.list.focus();
      }
    }
    class tv extends w.Component {
      constructor(e) {
        super(e),
          (this.focusPane = -1),
          (this.paneRefs = []),
          (this.expandCollapseTimer = null),
          (this.onItemClicked = (e, t, n) => {
            if ((this.clearExpandCollapseTimer(), "submenuItem" === t.type)) {
              const r =
                this.props.enableAccessKeyNavigation &&
                "keyboard" === n.kind &&
                "Enter" !== n.event.key &&
                " " !== n.event.key;
              this.props.dispatcher.setAppMenuState((e) =>
                e.withOpenedMenu(t, r)
              ),
                "keyboard" === n.kind && (this.focusPane = e + 1);
            } else
              "separator" !== t.type &&
                (this.props.onClose({ type: "item-executed" }),
                this.props.dispatcher.executeMenuItem(t));
          }),
          (this.onItemKeyDown = (e, t, n) => {
            "ArrowLeft" === n.key || "Escape" === n.key
              ? (this.clearExpandCollapseTimer(),
                0 === e && "Escape" === n.key
                  ? (this.props.onClose({ type: "keyboard", event: n }),
                    n.preventDefault())
                  : e > 0 &&
                    (this.props.dispatcher.setAppMenuState((t) =>
                      t.withClosedMenu(this.props.state[e])
                    ),
                    (this.focusPane = e - 1),
                    n.preventDefault()))
              : "ArrowRight" === n.key &&
                (this.clearExpandCollapseTimer(),
                "submenuItem" === t.type &&
                  (this.props.dispatcher.setAppMenuState((e) =>
                    e.withOpenedMenu(t, !0)
                  ),
                  (this.focusPane = e + 1),
                  n.preventDefault()));
          }),
          (this.onSelectionChanged = (e, t, n) => {
            this.clearExpandCollapseTimer(),
              "keyboard" === n.kind
                ? this.props.dispatcher.setAppMenuState((n) =>
                    n.withSelectedItem(t).withLastMenu(this.props.state[e])
                  )
                : ("submenuItem" === t.type
                    ? this.scheduleExpand(t)
                    : this.scheduleCollapseTo(this.props.state[e]),
                  this.props.dispatcher.setAppMenuState((e) =>
                    e.withSelectedItem(t)
                  ));
          }),
          (this.onMenuPaneRef = (e) => {
            e && (this.paneRefs[e.props.depth] = e);
          }),
          (this.onPaneMouseEnter = (e) => {
            this.clearExpandCollapseTimer();
            const t = this.props.state[e],
              n = t.selectedItem;
            n
              ? this.props.dispatcher.setAppMenuState((e) =>
                  e.withSelectedItem(n)
                )
              : this.props.dispatcher.setAppMenuState((e) =>
                  e.withDeselectedMenu(t)
                ),
              (this.focusPane = e);
          }),
          (this.onKeyDown = (e) => {
            e.defaultPrevented ||
              "Escape" !== e.key ||
              (e.preventDefault(),
              this.props.onClose({ type: "keyboard", event: e }));
          }),
          (this.focusPane = e.state.length - 1),
          this.receiveProps(null, e);
      }
      receiveProps(e, t) {
        t.openedWithAccessKey &&
          ((e && e.openedWithAccessKey) ||
            (this.focusPane = t.state.length - 1));
      }
      clearExpandCollapseTimer() {
        this.expandCollapseTimer &&
          (window.clearTimeout(this.expandCollapseTimer),
          (this.expandCollapseTimer = null));
      }
      scheduleExpand(e) {
        this.clearExpandCollapseTimer(),
          (this.expandCollapseTimer = window.setTimeout(() => {
            this.props.dispatcher.setAppMenuState((t) => t.withOpenedMenu(e));
          }, 300));
      }
      scheduleCollapseTo(e) {
        this.clearExpandCollapseTimer(),
          (this.expandCollapseTimer = window.setTimeout(() => {
            this.props.dispatcher.setAppMenuState((t) => t.withLastMenu(e));
          }, 300));
      }
      renderMenuPane(e, t) {
        const n = t.id || "@",
          r = t.id
            ? (function (e) {
                const t = e
                  .replace(/^@\./, "")
                  .replace(/&/g, "")
                  .replace(/[^a-z0-9_]+/gi, "-")
                  .replace(/_+/, "_")
                  .toLowerCase();
                return t.length ? "menu-pane-" + t : void 0;
              })(t.id)
            : void 0;
        return w.createElement(ev, {
          key: n,
          ref: this.onMenuPaneRef,
          className: r,
          autoHeight: this.props.autoHeight,
          depth: e,
          items: t.items,
          selectedItem: t.selectedItem,
          onItemClicked: this.onItemClicked,
          onMouseEnter: this.onPaneMouseEnter,
          onItemKeyDown: this.onItemKeyDown,
          onSelectionChanged: this.onSelectionChanged,
          enableAccessKeyNavigation: this.props.enableAccessKeyNavigation,
        });
      }
      render() {
        const e = this.props.state.map((e, t) => this.renderMenuPane(t, e));
        return (
          (this.paneRefs = this.paneRefs.slice(0, e.length)),
          w.createElement(
            "div",
            { id: "app-menu-foldout", onKeyDown: this.onKeyDown },
            e
          )
        );
      }
      ensurePaneFocus() {
        if (this.focusPane >= 0) {
          const e = this.paneRefs[this.focusPane];
          e && (e.focus(), (this.focusPane = -1));
        }
      }
      componentWillReceiveProps(e) {
        this.receiveProps(this.props, e);
      }
      componentDidMount() {
        this.ensurePaneFocus();
      }
      componentDidUpdate() {
        this.ensurePaneFocus();
      }
      componentWillUnmount() {
        this.clearExpandCollapseTimer();
      }
    }
    class nv extends w.Component {
      constructor() {
        super(...arguments),
          (this.innerDropDown = null),
          (this.onDropDownRef = (e) => {
            this.innerDropDown = e;
          }),
          (this.onMouseEnter = (e) => {
            this.props.onMouseEnter(this.props.menuItem);
          }),
          (this.onKeyDown = (e) => {
            e.defaultPrevented ||
              (this.props.onKeyDown(this.props.menuItem, e),
              this.isMenuOpen ||
                e.defaultPrevented ||
                ("ArrowDown" === e.key &&
                  (this.props.onOpen(this.props.menuItem, !0),
                  e.preventDefault())));
          }),
          (this.onMenuClose = (e) => {
            "keyboard" === e.type &&
              "Escape" === e.event.key &&
              this.focusButton(),
              this.props.onClose(this.props.menuItem, e.type);
          }),
          (this.onDropdownStateChanged = (e, t) => {
            this.isMenuOpen
              ? this.props.onClose(this.props.menuItem, t)
              : this.props.onOpen(this.props.menuItem);
          }),
          (this.dropDownContentRenderer = () => {
            const e = this.props.menuState;
            return this.isMenuOpen
              ? w.createElement(tv, {
                  dispatcher: this.props.dispatcher,
                  onClose: this.onMenuClose,
                  openedWithAccessKey: this.props.openedWithAccessKey,
                  state: e,
                  enableAccessKeyNavigation: this.props
                    .enableAccessKeyNavigation,
                  autoHeight: !0,
                })
              : null;
          });
      }
      get isMenuOpen() {
        return 0 !== this.props.menuState.length;
      }
      focusButton() {
        this.innerDropDown && this.innerDropDown.focusButton();
      }
      componentDidMount() {
        this.props.onDidMount &&
          this.props.onDidMount(this.props.menuItem, this);
      }
      componentWillUnmount() {
        this.props.onWillUnmount &&
          this.props.onWillUnmount(this.props.menuItem, this);
      }
      render() {
        const e = this.props.menuItem,
          t = this.isMenuOpen ? "open" : "closed";
        return w.createElement(
          Cy,
          {
            ref: this.onDropDownRef,
            key: e.id,
            dropdownState: t,
            onDropdownStateChanged: this.onDropdownStateChanged,
            dropdownContentRenderer: this.dropDownContentRenderer,
            showDisclosureArrow: !1,
            onMouseEnter: this.onMouseEnter,
            onKeyDown: this.onKeyDown,
            tabIndex: -1,
            role: "menuitem",
          },
          w.createElement(Zy, {
            item: e,
            highlightAccessKey: this.props.highlightMenuAccessKey,
            renderAcceleratorText: !1,
            renderSubMenuArrow: !1,
          })
        );
      }
    }
    function rv(e) {
      if (!e.appMenu.length) return { menuItems: [] };
      const t = e.appMenu[0].items,
        n = new Array();
      for (const e of t) "submenuItem" === e.type && e.visible && n.push(e);
      return { menuItems: n };
    }
    class iv extends w.Component {
      constructor(e) {
        super(e),
          (this.menuBar = null),
          (this.menuButtonRefsByMenuItemId = {}),
          (this.focusOutTimeout = null),
          (this.hasFocus = !1),
          (this.stolenFocusElement = null),
          (this.onMenuBarFocusIn = (e) => {
            const t = e;
            this.hasFocus ||
              (t.relatedTarget && t.relatedTarget instanceof HTMLElement
                ? (this.stolenFocusElement = t.relatedTarget)
                : (this.stolenFocusElement = null),
              (this.hasFocus = !0)),
              this.clearFocusOutTimeout();
          }),
          (this.onMenuBarFocusOut = (e) => {
            this.clearFocusOutTimeout(),
              (this.focusOutTimeout = requestAnimationFrame(
                this.onLostFocusWithin
              ));
          }),
          (this.onLostFocusWithin = () => {
            (this.hasFocus = !1),
              (this.focusOutTimeout = null),
              this.props.onLostFocus && this.props.onLostFocus(),
              (this.stolenFocusElement = null);
          }),
          (this.onMenuBarRef = (e) => {
            this.menuBar &&
              (this.menuBar.removeEventListener(
                "focusin",
                this.onMenuBarFocusIn
              ),
              this.menuBar.removeEventListener(
                "focusout",
                this.onMenuBarFocusOut
              )),
              (this.menuBar = e),
              this.menuBar &&
                (this.menuBar.addEventListener(
                  "focusin",
                  this.onMenuBarFocusIn
                ),
                this.menuBar.addEventListener(
                  "focusout",
                  this.onMenuBarFocusOut
                ));
          }),
          (this.onMenuClose = (e, t) => {
            ("pointer" !== t && "item-executed" !== t) ||
              this.restoreFocusOrBlur(),
              this.props.dispatcher.setAppMenuState((t) =>
                t.withClosedMenu(e.menu)
              );
          }),
          (this.onMenuOpen = (e, t) => {
            const n =
              !!this.props.foldoutState &&
              this.props.foldoutState.enableAccessKeyNavigation;
            this.props.dispatcher.showFoldout({
              type: j.AppMenu,
              enableAccessKeyNavigation: n,
            }),
              this.props.dispatcher.setAppMenuState((n) =>
                n.withOpenedMenu(e, t)
              );
          }),
          (this.onMenuButtonMouseEnter = (e) => {
            this.hasFocus && this.focusMenuItem(e),
              this.props.appMenu.length > 1 &&
                this.props.dispatcher.setAppMenuState((t) =>
                  t.withOpenedMenu(e)
                );
          }),
          (this.onMenuButtonKeyDown = (e, t) => {
            if (t.defaultPrevented) return;
            const n = this.props.foldoutState;
            if (n)
              if ("Escape" === t.key)
                this.isMenuItemOpen(e) ||
                  (this.restoreFocusOrBlur(), t.preventDefault());
              else if ("ArrowLeft" === t.key)
                this.moveToAdjacentMenu("previous", e), t.preventDefault();
              else if ("ArrowRight" === t.key)
                this.moveToAdjacentMenu("next", e), t.preventDefault();
              else if (n.enableAccessKeyNavigation) {
                if (t.altKey || t.ctrlKey || t.metaKey) return;
                const e = Li(t.key, this.state.menuItems);
                e &&
                  Oi(e) &&
                  ("submenuItem" === e.type
                    ? this.props.dispatcher.setAppMenuState((t) =>
                        t.withReset().withSelectedItem(e).withOpenedMenu(e, !0)
                      )
                    : (this.restoreFocusOrBlur(),
                      this.props.dispatcher.executeMenuItem(e)),
                  t.preventDefault());
              }
          }),
          (this.onMenuButtonDidMount = (e, t) => {
            this.menuButtonRefsByMenuItemId[e.id] = t;
          }),
          (this.onMenuButtonWillUnmount = (e, t) => {
            delete this.menuButtonRefsByMenuItemId[e.id];
          }),
          (this.state = rv(e));
      }
      componentWillReceiveProps(e) {
        e.appMenu !== this.props.appMenu && this.setState(rv(e));
      }
      componentDidUpdate(e) {
        this.props.foldoutState && !e.foldoutState
          ? 1 !== this.props.appMenu.length ||
            this.hasFocus ||
            this.focusFirstMenuItem()
          : !this.props.foldoutState &&
            e.foldoutState &&
            this.restoreFocusOrBlur();
      }
      componentDidMount() {
        this.props.foldoutState &&
          1 === this.props.appMenu.length &&
          this.focusFirstMenuItem();
      }
      componentWillUnmount() {
        this.hasFocus && this.restoreFocusOrBlur(),
          (this.stolenFocusElement = null);
      }
      render() {
        return w.createElement(
          "div",
          {
            id: "app-menu-bar",
            ref: this.onMenuBarRef,
            role: "menubar",
            "aria-label": "Application menu",
          },
          this.state.menuItems.map(this.renderMenuItem, this)
        );
      }
      isMenuItemOpen(e) {
        const t =
          this.props.foldoutState && this.props.appMenu.length > 1
            ? this.props.appMenu[1]
            : null;
        return null !== t && t.id === e.id;
      }
      focusFirstMenuItem() {
        if (this.props.appMenu.length > 1) return;
        const e = this.state.menuItems;
        if (!e.length) return;
        const t = e[0];
        t && this.focusMenuItem(t);
      }
      focusMenuItem(e) {
        const t = this.menuButtonRefsByMenuItemId[e.id];
        t && t.focusButton();
      }
      restoreFocusOrBlur() {
        this.hasFocus &&
          (this.stolenFocusElement && document.contains(this.stolenFocusElement)
            ? this.stolenFocusElement.focus()
            : document.activeElement instanceof HTMLElement &&
              document.activeElement.blur(),
          (this.stolenFocusElement = null));
      }
      clearFocusOutTimeout() {
        null !== this.focusOutTimeout &&
          (cancelAnimationFrame(this.focusOutTimeout),
          (this.focusOutTimeout = null));
      }
      moveToAdjacentMenu(e, t) {
        const n = this.state.menuItems,
          r = n.findIndex((e) => e.id === t.id);
        if (-1 === r) return;
        const i = n[(r + ("next" === e ? 1 : -1) + n.length) % n.length];
        if (!i) return;
        if (null !== this.props.foldoutState && this.props.appMenu.length > 1)
          this.props.dispatcher.setAppMenuState((e) => e.withOpenedMenu(i, !0));
        else {
          const e = this.menuButtonRefsByMenuItemId[i.id];
          e && e.focusButton();
        }
      }
      renderMenuItem(e) {
        const t = this.props.foldoutState,
          n = this.isMenuItemOpen(e) ? this.props.appMenu.slice(1) : [],
          r = (t && t.openedWithAccessKey) || !1,
          i = !!t && t.enableAccessKeyNavigation,
          o =
            this.props.highlightAppMenuAccessKeys ||
            (!this.isMenuItemOpen(e) && i);
        return w.createElement(nv, {
          key: e.id,
          dispatcher: this.props.dispatcher,
          menuItem: e,
          menuState: n,
          highlightMenuAccessKey: o,
          enableAccessKeyNavigation: i,
          openedWithAccessKey: r,
          onClose: this.onMenuClose,
          onOpen: this.onMenuOpen,
          onMouseEnter: this.onMenuButtonMouseEnter,
          onKeyDown: this.onMenuButtonKeyDown,
          onDidMount: this.onMenuButtonDidMount,
          onWillUnmount: this.onMenuButtonWillUnmount,
        });
      }
    }
    class ov extends w.Component {
      constructor() {
        super(...arguments),
          (this.timeoutId = null),
          (this.componentDidMount = () => {
            void 0 !== this.props.timeout &&
              (this.timeoutId = window.setTimeout(() => {
                this.props.onDismissed();
              }, this.props.timeout));
          }),
          (this.componentWillUnmount = () => {
            void 0 !== this.props.timeout &&
              null !== this.timeoutId &&
              window.clearTimeout(this.timeoutId);
          });
      }
      render() {
        return w.createElement(
          "div",
          { id: this.props.id, className: "banner" },
          w.createElement(
            "div",
            { className: "contents" },
            this.props.children
          ),
          this.renderCloseButton()
        );
      }
      renderCloseButton() {
        const { dismissable: e } = this.props;
        return void 0 === e || !1 === e
          ? null
          : w.createElement(
              "div",
              { className: "close" },
              w.createElement(
                "a",
                { onClick: this.props.onDismissed },
                w.createElement(vh, { symbol: wh.x })
              )
            );
      }
    }
    const sv = "https://desktop.github.com/release-notes/";
    class av extends w.Component {
      constructor() {
        super(...arguments),
          (this.showReleaseNotes = () => {
            null == this.props.newRelease
              ? te.openExternal(sv)
              : this.props.dispatcher.showPopup({
                  type: ao.ReleaseNotes,
                  newRelease: this.props.newRelease,
                });
          }),
          (this.updateNow = () => {
            De.quitAndInstallUpdate();
          });
      }
      render() {
        return w.createElement(
          ov,
          { id: "update-available", onDismissed: this.props.onDismissed },
          w.createElement(vh, {
            className: "download-icon",
            symbol: wh.desktopDownload,
          }),
          w.createElement(
            "span",
            { onSubmit: this.updateNow },
            "An updated version of GitHub Desktop is available and will be installed at the next launch. See",
            " ",
            w.createElement(
              _d,
              { onClick: this.showReleaseNotes },
              "what's new"
            ),
            " or",
            " ",
            w.createElement(
              _d,
              { onClick: this.updateNow },
              "restart GitHub Desktop"
            ),
            "."
          )
        );
      }
    }
    class lv extends w.Component {
      constructor() {
        super(...arguments),
          (this.openDialog = () => {
            this.props.onDismissed(),
              this.props.dispatcher.showPopup(this.props.popup),
              this.props.dispatcher.recordMergeConflictsDialogReopened();
          });
      }
      render() {
        return w.createElement(
          ov,
          {
            id: "merge-conflicts-banner",
            dismissable: !1,
            onDismissed: this.props.onDismissed,
          },
          w.createElement(vh, { className: "alert-icon", symbol: wh.alert }),
          w.createElement(
            "div",
            { className: "banner-message" },
            w.createElement(
              "span",
              null,
              "Resolve conflicts and commit to merge into",
              " ",
              w.createElement("strong", null, this.props.ourBranch),
              "."
            ),
            w.createElement(_d, { onClick: this.openDialog }, "View conflicts")
          )
        );
      }
    }
    function cv({ ourBranch: e, theirBranch: t, onDismissed: n }) {
      const r =
        void 0 !== t
          ? w.createElement(
              "span",
              null,
              "Successfully merged ",
              w.createElement("strong", null, t),
              " into ",
              w.createElement("strong", null, e)
            )
          : w.createElement(
              "span",
              null,
              "Successfully merged into ",
              w.createElement("strong", null, e)
            );
      return w.createElement(
        ov,
        { id: "successful-merge", timeout: 5e3, onDismissed: n },
        w.createElement(
          "div",
          { className: "green-circle" },
          w.createElement(vh, { className: "check-icon", symbol: wh.check })
        ),
        w.createElement("div", { className: "banner-message" }, r)
      );
    }
    class uv extends w.Component {
      constructor() {
        super(...arguments),
          (this.openDialog = async () => {
            this.props.onDismissed(),
              this.props.onOpenDialog(),
              this.props.dispatcher.recordRebaseConflictsDialogReopened();
          }),
          (this.onDismissed = () => {
            log.warn(
              "[RebaseConflictsBanner] this is not dismissable by default unless the user clicks on the link"
            );
          });
      }
      render() {
        return w.createElement(
          ov,
          {
            id: "rebase-conflicts-banner",
            dismissable: !1,
            onDismissed: this.onDismissed,
          },
          w.createElement(vh, { className: "alert-icon", symbol: wh.alert }),
          w.createElement(
            "div",
            { className: "banner-message" },
            w.createElement(
              "span",
              null,
              "Resolve conflicts to continue rebasing",
              " ",
              w.createElement("strong", null, this.props.targetBranch),
              "."
            ),
            w.createElement(_d, { onClick: this.openDialog }, "View conflicts")
          )
        );
      }
    }
    function hv({ baseBranch: e, targetBranch: t, onDismissed: n }) {
      const r =
        void 0 !== e
          ? w.createElement(
              "span",
              null,
              "Successfully rebased ",
              w.createElement("strong", null, t),
              " onto ",
              w.createElement("strong", null, e)
            )
          : w.createElement(
              "span",
              null,
              "Successfully rebased ",
              w.createElement("strong", null, t)
            );
      return w.createElement(
        ov,
        { id: "successful-rebase", timeout: 5e3, onDismissed: n },
        w.createElement(
          "div",
          { className: "green-circle" },
          w.createElement(vh, { className: "check-icon", symbol: wh.check })
        ),
        w.createElement("div", { className: "banner-message" }, r)
      );
    }
    function dv({ ourBranch: e, theirBranch: t, onDismissed: n }) {
      const r =
        void 0 !== t
          ? w.createElement(
              "span",
              null,
              w.createElement("strong", null, e),
              " is already up to date with ",
              w.createElement("strong", null, t)
            )
          : w.createElement(
              "span",
              null,
              w.createElement("strong", null, e),
              " is already up to date"
            );
      return w.createElement(
        ov,
        { id: "successful-merge", timeout: 5e3, onDismissed: n },
        w.createElement(
          "div",
          { className: "green-circle" },
          w.createElement(vh, { className: "check-icon", symbol: wh.check })
        ),
        w.createElement("div", { className: "banner-message" }, r)
      );
    }
    class pv extends w.Component {
      constructor() {
        super(...arguments),
          (this.onClick = (e) => {
            e.preventDefault(), this.props.onAction();
          });
      }
      render() {
        return w.createElement(
          Pd,
          { className: "call-to-action" },
          this.props.children,
          w.createElement(
            Ud,
            {
              className: "action-button",
              type: "submit",
              onClick: this.onClick,
            },
            this.props.actionTitle
          )
        );
      }
    }
    var fv;
    !(function (e) {
      (e[(e.DotCom = 0)] = "DotCom"), (e[(e.Enterprise = 1)] = "Enterprise");
    })(fv || (fv = {}));
    class mv extends w.Component {
      constructor() {
        super(...arguments),
          (this.onDotComSignIn = () => {
            this.props.onDotComSignIn();
          }),
          (this.onEnterpriseSignIn = () => {
            this.props.onEnterpriseSignIn();
          }),
          (this.logout = (e) => () => {
            this.props.onLogout(e);
          });
      }
      render() {
        return w.createElement(
          ig,
          { className: "accounts-tab" },
          w.createElement("h2", null, "GitHub.com"),
          this.props.dotComAccount
            ? this.renderAccount(this.props.dotComAccount)
            : this.renderSignIn(fv.DotCom),
          w.createElement("h2", null, "GitHub企业服务"),
          this.props.enterpriseAccount
            ? this.renderAccount(this.props.enterpriseAccount)
            : this.renderSignIn(fv.Enterprise)
        );
      }
      renderAccount(e) {
        const t = {
          name: e.name,
          email: _u(e),
          avatarURL: e.avatarURL,
          endpoint: e.endpoint,
        };
        return w.createElement(
          Pd,
          { className: "account-info" },
          w.createElement(lp, { user: t }),
          w.createElement(
            "div",
            { className: "user-info" },
            w.createElement("div", { className: "name" }, e.name),
            w.createElement("div", { className: "login" }, "@", e.login)
          ),
          w.createElement(Ud, { onClick: this.logout(e) }, "登出")
        );
      }
      renderSignIn(e) {
        switch (e) {
          case fv.DotCom:
            return w.createElement(
              pv,
              { actionTitle: "登录", onAction: this.onDotComSignIn },
              w.createElement(
                "div",
                null,
                "登录到GitHub.com帐户以访问您的存储库。"
              )
            );
          case fv.Enterprise:
            return w.createElement(
              pv,
              { actionTitle: "登录", onAction: this.onEnterpriseSignIn },
              w.createElement(
                "div",
                null,
                "如果您正在使用GitHub企业服务帐户，请登录该帐户以访问您的存储库。"
              )
            );
          default:
            return X(0, "Unknown sign in type: " + e);
        }
      }
    }
    class gv extends w.Component {
      constructor(e) {
        super(e),
          (this.onReportingOptOutChanged = (e) => {
            const t = !e.currentTarget.checked;
            this.setState({ optOutOfUsageTracking: t }),
              this.props.onOptOutofReportingchanged(t);
          }),
          (this.onUncommittedChangesStrategyChanged = (e) => {
            this.setState({ uncommittedChangesStrategy: e }),
              this.props.onUncommittedChangesStrategyChanged(e);
          }),
          (this.onRepositoryIndicatorsEnabledChanged = (e) => {
            this.props.onRepositoryIndicatorsEnabledChanged(
              e.currentTarget.checked
            );
          }),
          (this.state = {
            optOutOfUsageTracking: this.props.optOutOfUsageTracking,
            uncommittedChangesStrategy: this.props.uncommittedChangesStrategy,
          });
      }
      reportDesktopUsageLabel() {
        return w.createElement(
          "span",
          null,
          "为帮助改进GitHub Desktop，允许提交",
          " ",
          w.createElement(_d, { uri: oh }, "使用情况")
        );
      }
      render() {
        return w.createElement(
          ig,
          null,
          w.createElement(
            "div",
            { className: "advanced-section" },
            w.createElement(
              "h2",
              null,
              "当存储库有新的更改时切换分支…"
            ),
            w.createElement(rf, {
              value: au.AskForConfirmation,
              checked:
                this.state.uncommittedChangesStrategy === au.AskForConfirmation,
              label: "询问我如何处理更改",
              onSelected: this.onUncommittedChangesStrategyChanged,
            }),
            w.createElement(rf, {
              value: au.MoveToNewBranch,
              checked:
                this.state.uncommittedChangesStrategy === au.MoveToNewBranch,
              label: "始终将更改同步到新的分支",
              onSelected: this.onUncommittedChangesStrategyChanged,
            }),
            w.createElement(rf, {
              value: au.StashOnCurrentBranch,
              checked:
                this.state.uncommittedChangesStrategy ===
                au.StashOnCurrentBranch,
              label: "始终暂存并保留更改在当前分支上",
              onSelected: this.onUncommittedChangesStrategyChanged,
            })
          ),
          w.createElement(
            "div",
            { className: "advanced-section" },
            w.createElement("h2", null, "后台更新"),
            w.createElement(qd, {
              label:
                "定期获取和刷新所有存储库的状态",
              value: this.props.repositoryIndicatorsEnabled ? $d.On : $d.Off,
              onChange: this.onRepositoryIndicatorsEnabledChanged,
            }),
            w.createElement(
              "p",
              { className: "git-settings-description" },
              "允许在存储库列表中显示最新的状态指示器。禁用此功能可以提高多个存储库的性能。"
            )
          ),
          w.createElement(
            "div",
            { className: "advanced-section" },
            w.createElement("h2", null, "使用"),
            w.createElement(qd, {
              label: this.reportDesktopUsageLabel(),
              value: this.state.optOutOfUsageTracking ? $d.Off : $d.On,
              onChange: this.onReportingOptOutChanged,
            })
          )
        );
      }
    }
    class yv extends w.Component {
      constructor(e) {
        super(e),
          (this.defaultBranchInputRef = w.createRef()),
          (this.renderWarningMessage = (e, t) =>
            "" === e
              ? w.createElement(
                  w.Fragment,
                  null,
                  w.createElement(Om, null, t),
                  " is an invalid branch name."
                )
              : w.createElement(
                  w.Fragment,
                  null,
                  "Will be saved as ",
                  w.createElement(Om, null, e),
                  "."
                )),
          (this.onDefaultBranchChanged = (e) => {
            this.setState({ defaultBranchIsOther: !Xc.includes(e) }),
              this.props.onDefaultBranchChanged(e);
          }),
          (this.state = {
            defaultBranchIsOther: !Xc.includes(this.props.defaultBranch),
          });
      }
      componentDidUpdate(e) {
        this.props.defaultBranch !== e.defaultBranch &&
          "" === this.props.defaultBranch &&
          null !== this.defaultBranchInputRef.current &&
          this.defaultBranchInputRef.current.focus();
      }
      render() {
        return w.createElement(
          ig,
          null,
          w.createElement(
            Pd,
            null,
            w.createElement(Md, {
              label: "昵称",
              value: this.props.name,
              onValueChanged: this.props.onNameChanged,
            })
          ),
          w.createElement(
            Pd,
            null,
            w.createElement(Md, {
              type: "email",
              label: "电子邮件地址",
              value: this.props.email,
              onValueChanged: this.props.onEmailChanged,
            })
          ),
          this.renderDefaultBranchSetting()
        );
      }
      renderDefaultBranchSetting() {
        const { defaultBranchIsOther: e } = this.state;
        return w.createElement(
          "div",
          { className: "default-branch-component" },
          w.createElement("h2", null, "创建新存储库时的默认分支"),
          Xc.map((t) =>
            w.createElement(rf, {
              key: t,
              checked: !e && this.props.defaultBranch === t,
              value: t,
              label: t,
              onSelected: this.onDefaultBranchChanged,
            })
          ),
          w.createElement(rf, {
            key: "",
            checked: e,
            value: "",
            label: "Other…",
            onSelected: this.onDefaultBranchChanged,
          }),
          e &&
            w.createElement(my, {
              initialValue: this.props.defaultBranch,
              renderWarningMessage: this.renderWarningMessage,
              onValueChange: this.props.onDefaultBranchChanged,
              ref: this.defaultBranchInputRef,
            }),
          w.createElement(
            "p",
            { className: "git-settings-description" },
            "这些选项将设置为您的全局Git配置。"
          )
        );
      }
    }
    const vv = /^[\x00-\x20.,:;<>"\\']+$/;
    class wv extends w.Component {
      constructor() {
        super(...arguments),
          (this.onClick = () => {
            this.props.onClick(this.props.value);
          });
      }
      render() {
        const e = this.props.description
            ? w.createElement("p", null, this.props.description)
            : void 0,
          t = this.props.isSelected,
          n = t ? "selected" : void 0;
        return w.createElement(
          "li",
          {
            className: n,
            onClick: this.onClick,
            role: "radio",
            id: this.props.id,
            "aria-checked": t ? "true" : "false",
          },
          w.createElement("div", { className: "title" }, this.props.title),
          e
        );
      }
    }
    class bv extends w.Component {
      constructor(e) {
        super(e),
          (this.listRef = null),
          (this.formRef = null),
          (this.onItemClick = (e) => {
            e !== this.props.selectedKey && this.props.onSelectionChanged(e);
          }),
          (this.onKeyDown = (e) => {
            const t = this.findSelectedIndex(this.props.items);
            if ("ArrowUp" === e.key)
              t > 0 &&
                this.props.onSelectionChanged(this.props.items[t - 1].key),
                e.preventDefault();
            else if ("ArrowDown" === e.key)
              t < this.props.items.length - 1 &&
                this.props.onSelectionChanged(this.props.items[t + 1].key),
                e.preventDefault();
            else if ("Enter" === e.key) {
              const e = this.formRef;
              e && e.dispatchEvent(new Event("submit"));
            }
          }),
          (this.onListRef = (e) => {
            this.listRef = e;
          }),
          (this.onFieldsetRef = (e) => {
            this.formRef = e ? e.form : null;
          }),
          (this.onLegendClick = () => {
            this.listRef && this.listRef.focus();
          }),
          (this.state = {});
      }
      updateListId(e) {
        this.state.listId &&
          (yh(this.state.listId), this.setState({ listId: void 0 })),
          e && this.setState({ listId: gh("VerticalSegmentedControl_" + e) });
      }
      componentWillMount() {
        this.updateListId(this.props.label);
      }
      componentWillUnmount() {
        this.state.listId && yh(this.state.listId);
      }
      componentWillReceiveProps(e) {
        this.props.label !== e.label && this.updateListId(e.label);
      }
      getListItemId(e) {
        return `${this.state.listId}_Item_${e}`;
      }
      renderItem(e, t) {
        return w.createElement(wv, {
          id: this.getListItemId(t),
          key: e.key,
          title: e.title,
          description: e.description,
          isSelected: e.key === this.props.selectedKey,
          value: e.key,
          onClick: this.onItemClick,
        });
      }
      render() {
        if (0 === this.props.items.length) return null;
        const e = this.props.label
            ? w.createElement(
                "legend",
                { onClick: this.onLegendClick },
                this.props.label
              )
            : void 0,
          t = this.findSelectedIndex(this.props.items),
          n = this.getListItemId(t);
        return w.createElement(
          "fieldset",
          { className: "vertical-segmented-control", ref: this.onFieldsetRef },
          e,
          w.createElement(
            "ul",
            {
              ref: this.onListRef,
              id: this.state.listId,
              className: "vertical-segmented-control",
              tabIndex: 0,
              onKeyDown: this.onKeyDown,
              role: "radiogroup",
              "aria-activedescendant": n,
            },
            this.props.items.map((e, t) => this.renderItem(e, t))
          )
        );
      }
      findSelectedIndex(e) {
        return e.findIndex((e) => e.key === this.props.selectedKey);
      }
    }
    const Sv = [
      {
        title: "明亮",
        description: "GitHub的默认主题",
        key: vi.Light,
      },
      {
        title: "深色",
        description: "护眼模式,适合在夜晚使用",
        key: vi.Dark,
      }
    ];
    class Cv extends w.Component {
      constructor() {
        super(...arguments),
          (this.onSelectedThemeChanged = (e) => {
            this.props.onSelectedThemeChanged(e),
              this.props.onAutomaticallySwitchThemeChanged(!1);
          }),
          (this.onAutomaticallySwitchThemeChanged = (e) => {
            const t = e.currentTarget.checked;
            t && this.onSelectedThemeChanged(ko() ? vi.Dark : vi.Light),
              this.props.onAutomaticallySwitchThemeChanged(t);
          });
      }
      render() {
        return w.createElement(
          ig,
          null,
          this.renderThemeOptions(),
          this.renderAutoSwitcherOption()
        );
      }
      renderThemeOptions() {
        return w.createElement(
          Pd,
          null,
          w.createElement(bv, {
            items: Sv,
            selectedKey: this.props.selectedTheme,
            onSelectionChanged: this.onSelectedThemeChanged,
          })
        );
      }
      renderAutoSwitcherOption() {
        return Eo()
          ? w.createElement(
              Pd,
              null,
              w.createElement(qd, {
                label: "根据系统主题自动切换",
                value: this.props.automaticallySwitchTheme ? $d.On : $d.Off,
                onChange: this.onAutomaticallySwitchThemeChanged,
              })
            )
          : null;
      }
    }
    class Ev extends w.Component {
      componentWillMount() {
        const e = gh("Select_" + (this.props.label || "unknown"));
        this.setState({ inputId: e });
      }
      componentWillUnmount() {
        this.state.inputId && yh(this.state.inputId);
      }
      renderLabel() {
        const e = this.props.label,
          t = this.state.inputId;
        return e ? w.createElement("label", { htmlFor: t }, e) : null;
      }
      render() {
        return w.createElement(
          "div",
          { className: "select-component" },
          this.renderLabel(),
          w.createElement(
            "select",
            {
              id: this.state.inputId,
              onChange: this.props.onChange,
              value: this.props.value,
              defaultValue: this.props.defaultValue,
            },
            this.props.children
          )
        );
      }
    }
    class kv extends w.Component {
      constructor(e) {
        super(e),
          (this.onSelectedEditorChanged = (e) => {
            const t = Po(e.currentTarget.value);
            t &&
              (this.setState({ selectedExternalEditor: t }),
              this.props.onSelectedEditorChanged(t));
          }),
          (this.onSelectedShellChanged = (e) => {
            const t = fc(e.currentTarget.value);
            this.setState({ selectedShell: t }),
              this.props.onSelectedShellChanged(t);
          }),
          (this.state = {
            selectedExternalEditor: this.props.selectedExternalEditor,
            selectedShell: this.props.selectedShell,
          });
      }
      async componentWillReceiveProps(e) {
        const t = e.availableEditors;
        let n = e.selectedExternalEditor;
        if (t.length) {
          -1 === (n ? t.indexOf(n) : -1) &&
            ((n = t[0]), e.onSelectedEditorChanged(n));
        }
        const r = e.availableShells;
        let i = e.selectedShell;
        if (r.length) {
          -1 === r.indexOf(i) && ((i = r[0]), e.onSelectedShellChanged(i));
        }
        this.setState({ selectedExternalEditor: n, selectedShell: i });
      }
      renderExternalEditor() {
        const e = this.props.availableEditors,
          t = this.state.selectedExternalEditor;
        return 0 === e.length
          ? w.createElement(
              "div",
              { className: "select-component no-options-found" },
              w.createElement("label", null, "默认外部编辑器"),
              w.createElement(
                "span",
                null,
                "找不到编辑器。",
                " ",
                w.createElement(
                  _d,
                  { uri: "https://code.visualstudio.com/" },
                  "是否安装  VS Code?"
                )
              )
            )
          : w.createElement(
              Ev,
              {
                label: "默认外部编辑器",
                value: t || void 0,
                onChange: this.onSelectedEditorChanged,
              },
              e.map((e) => w.createElement("option", { key: e, value: e }, e))
            );
      }
      renderSelectedShell() {
        const e = this.props.availableShells;
        return w.createElement(
          Ev,
          {
            label: "默认终端",
            value: this.state.selectedShell,
            onChange: this.onSelectedShellChanged,
          },
          e.map((e) => w.createElement("option", { key: e, value: e }, e))
        );
      }
      render() {
        return w.createElement(
          ig,
          null,
          w.createElement("h2", null, "应用程序"),
          w.createElement(Pd, null, this.renderExternalEditor()),
          w.createElement(Pd, null, this.renderSelectedShell())
        );
      }
    }
    class xv extends w.Component {
      constructor(e) {
        super(e),
          (this.onConfirmDiscardChangesChanged = (e) => {
            const t = e.currentTarget.checked;
            this.setState({ confirmDiscardChanges: t }),
              this.props.onConfirmDiscardChangesChanged(t);
          }),
          (this.onConfirmForcePushChanged = (e) => {
            const t = e.currentTarget.checked;
            this.setState({ confirmForcePush: t }),
              this.props.onConfirmForcePushChanged(t);
          }),
          (this.onConfirmRepositoryRemovalChanged = (e) => {
            const t = e.currentTarget.checked;
            this.setState({ confirmRepositoryRemoval: t }),
              this.props.onConfirmRepositoryRemovalChanged(t);
          }),
          (this.state = {
            confirmRepositoryRemoval: this.props.confirmRepositoryRemoval,
            confirmDiscardChanges: this.props.confirmDiscardChanges,
            confirmForcePush: this.props.confirmForcePush,
          });
      }
      render() {
        return w.createElement(
          ig,
          null,
          w.createElement("h2", null, "在以下情况时显示确认对话框..."),
          w.createElement(qd, {
            label: "删除存储库",
            value: this.state.confirmRepositoryRemoval ? $d.On : $d.Off,
            onChange: this.onConfirmRepositoryRemovalChanged,
          }),
          w.createElement(qd, {
            label: "放弃更改",
            value: this.state.confirmDiscardChanges ? $d.On : $d.Off,
            onChange: this.onConfirmDiscardChangesChanged,
          }),
          w.createElement(qd, {
            label: "强制推送",
            value: this.state.confirmForcePush ? $d.On : $d.Off,
            onChange: this.onConfirmForcePushChanged,
          })
        );
      }
    }
    class Rv extends w.Component {
      constructor(e) {
        super(e),
          (this.onDotComSignIn = () => {
            this.props.onDismissed(),
              this.props.dispatcher.showDotComSignInDialog();
          }),
          (this.onEnterpriseSignIn = () => {
            this.props.onDismissed(),
              this.props.dispatcher.showEnterpriseSignInDialog();
          }),
          (this.onLogout = (e) => {
            this.props.dispatcher.removeAccount(e);
          }),
          (this.onRepositoryIndicatorsEnabledChanged = (e) => {
            this.setState({ repositoryIndicatorsEnabled: e });
          }),
          (this.onLockFileDeleted = () => {
            this.setState({ existingLockFilePath: void 0 });
          }),
          (this.onLockFileDeleteError = (e) => {
            this.props.dispatcher.postError(e);
          }),
          (this.onOptOutofReportingChanged = (e) => {
            this.setState({ optOutOfUsageTracking: e });
          }),
          (this.onConfirmRepositoryRemovalChanged = (e) => {
            this.setState({ confirmRepositoryRemoval: e });
          }),
          (this.onConfirmDiscardChangesChanged = (e) => {
            this.setState({ confirmDiscardChanges: e });
          }),
          (this.onConfirmForcePushChanged = (e) => {
            this.setState({ confirmForcePush: e });
          }),
          (this.onUncommittedChangesStrategyChanged = (e) => {
            this.setState({ uncommittedChangesStrategy: e });
          }),
          (this.onCommitterNameChanged = (e) => {
            var t;
            this.setState({
              committerName: e,
              disallowedCharactersMessage:
                ((t = e),
                vv.test(t)
                  ? "Name is invalid, it consists only of disallowed characters."
                  : null),
            });
          }),
          (this.onCommitterEmailChanged = (e) => {
            this.setState({ committerEmail: e });
          }),
          (this.onDefaultBranchChanged = (e) => {
            this.setState({ defaultBranch: e });
          }),
          (this.onSelectedEditorChanged = (e) => {
            this.setState({ selectedExternalEditor: e });
          }),
          (this.onSelectedShellChanged = (e) => {
            this.setState({ selectedShell: e });
          }),
          (this.onSelectedThemeChanged = (e) => {
            this.props.dispatcher.setSelectedTheme(e);
          }),
          (this.onAutomaticallySwitchThemeChanged = (e) => {
            this.props.dispatcher.onAutomaticallySwitchThemeChanged(e);
          }),
          (this.onSave = async () => {
            try {
              this.state.committerName !== this.state.initialCommitterName &&
                (await Wo("user.name", this.state.committerName)),
                this.state.committerEmail !==
                  this.state.initialCommitterEmail &&
                  (await Wo("user.email", this.state.committerEmail)),
                this.state.defaultBranch.length > 0 &&
                  this.state.defaultBranch !==
                    this.state.initialDefaultBranch &&
                  (await (async function (e) {
                    return Wo("init.defaultBranch", e);
                  })(this.state.defaultBranch)),
                this.props.repositoryIndicatorsEnabled !==
                  this.state.repositoryIndicatorsEnabled &&
                  this.props.dispatcher.setRepositoryIndicatorsEnabled(
                    this.state.repositoryIndicatorsEnabled
                  );
            } catch (e) {
              if (Ko(e)) {
                const t = Qo(e.result);
                if (null !== t)
                  return void this.setState({
                    existingLockFilePath: t,
                    selectedIndex: hh.Git,
                  });
              }
              return (
                this.props.onDismissed(),
                void this.props.dispatcher.postError(e)
              );
            }
            await this.props.dispatcher.setStatsOptOut(
              this.state.optOutOfUsageTracking,
              !1
            ),
              await this.props.dispatcher.setConfirmRepoRemovalSetting(
                this.state.confirmRepositoryRemoval
              ),
              await this.props.dispatcher.setConfirmForcePushSetting(
                this.state.confirmForcePush
              ),
              this.state.selectedExternalEditor &&
                (await this.props.dispatcher.setExternalEditor(
                  this.state.selectedExternalEditor
                )),
              await this.props.dispatcher.setShell(this.state.selectedShell),
              await this.props.dispatcher.setConfirmDiscardChangesSetting(
                this.state.confirmDiscardChanges
              ),
              await this.props.dispatcher.setUncommittedChangesStrategySetting(
                this.state.uncommittedChangesStrategy
              ),
              this.props.onDismissed();
          }),
          (this.onTabClicked = (e) => {
            this.setState({ selectedIndex: e });
          }),
          (this.state = {
            selectedIndex: this.props.initialSelectedTab || hh.Accounts,
            committerName: "",
            committerEmail: "",
            defaultBranch: "",
            initialCommitterName: null,
            initialCommitterEmail: null,
            initialDefaultBranch: null,
            disallowedCharactersMessage: null,
            availableEditors: [],
            optOutOfUsageTracking: !1,
            confirmRepositoryRemoval: !1,
            confirmDiscardChanges: !1,
            confirmForcePush: !1,
            uncommittedChangesStrategy: lu,
            selectedExternalEditor: this.props.selectedExternalEditor,
            availableShells: [],
            selectedShell: this.props.selectedShell,
            repositoryIndicatorsEnabled: this.props.repositoryIndicatorsEnabled,
          });
      }
      async componentWillMount() {
        const e = await Uo("user.name"),
          t = await Uo("user.email"),
          n = await Jc();
        let r = e,
          i = t;
        if (!r || !i) {
          const e = this.props.dotComAccount || this.props.enterpriseAccount;
          e && (r || (r = e.login), i || (i = _u(e)));
        }
        (r = r || ""), (i = i || "");
        const [o, s] = await Promise.all([Lo(), mc()]),
          a = o.map((e) => e.editor),
          l = s.map((e) => e.shell);
        this.setState({
          committerName: r,
          committerEmail: i,
          defaultBranch: n,
          initialCommitterName: e,
          initialCommitterEmail: t,
          initialDefaultBranch: n,
          optOutOfUsageTracking: this.props.optOutOfUsageTracking,
          confirmRepositoryRemoval: this.props.confirmRepositoryRemoval,
          confirmDiscardChanges: this.props.confirmDiscardChanges,
          confirmForcePush: this.props.confirmForcePush,
          uncommittedChangesStrategy: this.props.uncommittedChangesStrategy,
          availableShells: l,
          availableEditors: a,
        });
      }
      render() {
        return w.createElement(
          sg,
          {
            id: "preferences",
            title: "选项",
            onDismissed: this.props.onDismissed,
            onSubmit: this.onSave,
          },
          w.createElement(
            "div",
            { className: "preferences-container" },
            this.renderDisallowedCharactersError(),
            w.createElement(
              uf,
              {
                onTabClicked: this.onTabClicked,
                selectedIndex: this.state.selectedIndex,
                type: cf.Vertical,
              },
              w.createElement(
                "span",
                null,
                w.createElement(vh, { className: "icon", symbol: wh.home }),
                "账户"
              ),
              w.createElement(
                "span",
                null,
                w.createElement(vh, { className: "icon", symbol: wh.person }),
                "开发集成"
              ),
              w.createElement(
                "span",
                null,
                w.createElement(vh, {
                  className: "icon",
                  symbol: wh.gitCommit,
                }),
                "Git设置"
              ),
              w.createElement(
                "span",
                null,
                w.createElement(vh, {
                  className: "icon",
                  symbol: wh.paintbrush,
                }),
                "外观"
              ),
              w.createElement(
                "span",
                null,
                w.createElement(vh, { className: "icon", symbol: wh.question }),
                "提示"
              ),
              w.createElement(
                "span",
                null,
                w.createElement(vh, { className: "icon", symbol: wh.settings }),
                "高级"
              )
            ),
            this.renderActiveTab()
          ),
          this.renderFooter()
        );
      }
      renderDisallowedCharactersError() {
        const e = this.state.disallowedCharactersMessage;
        return null != e ? w.createElement(ag, null, e) : null;
      }
      renderActiveTab() {
        const e = this.state.selectedIndex;
        let t;
        switch (e) {
          case hh.Accounts:
            t = w.createElement(mv, {
              dotComAccount: this.props.dotComAccount,
              enterpriseAccount: this.props.enterpriseAccount,
              onDotComSignIn: this.onDotComSignIn,
              onEnterpriseSignIn: this.onEnterpriseSignIn,
              onLogout: this.onLogout,
            });
            break;
          case hh.Integrations:
            t = w.createElement(kv, {
              availableEditors: this.state.availableEditors,
              selectedExternalEditor: this.state.selectedExternalEditor,
              onSelectedEditorChanged: this.onSelectedEditorChanged,
              availableShells: this.state.availableShells,
              selectedShell: this.state.selectedShell,
              onSelectedShellChanged: this.onSelectedShellChanged,
            });
            break;
          case hh.Git: {
            const { existingLockFilePath: e } = this.state,
              n =
                void 0 !== e
                  ? w.createElement(
                      ag,
                      null,
                      w.createElement(zy, {
                        lockFilePath: e,
                        onLockFileDeleted: this.onLockFileDeleted,
                        onError: this.onLockFileDeleteError,
                      })
                    )
                  : null;
            t = w.createElement(
              w.Fragment,
              null,
              n,
              w.createElement(yv, {
                name: this.state.committerName,
                email: this.state.committerEmail,
                defaultBranch: this.state.defaultBranch,
                onNameChanged: this.onCommitterNameChanged,
                onEmailChanged: this.onCommitterEmailChanged,
                onDefaultBranchChanged: this.onDefaultBranchChanged,
              })
            );
            break;
          }
          case hh.Appearance:
            t = w.createElement(Cv, {
              selectedTheme: this.props.selectedTheme,
              onSelectedThemeChanged: this.onSelectedThemeChanged,
              automaticallySwitchTheme: this.props.automaticallySwitchTheme,
              onAutomaticallySwitchThemeChanged: this
                .onAutomaticallySwitchThemeChanged,
            });
            break;
          case hh.Prompts:
            t = w.createElement(xv, {
              confirmRepositoryRemoval: this.state.confirmRepositoryRemoval,
              confirmDiscardChanges: this.state.confirmDiscardChanges,
              confirmForcePush: this.state.confirmForcePush,
              onConfirmRepositoryRemovalChanged: this
                .onConfirmRepositoryRemovalChanged,
              onConfirmDiscardChangesChanged: this
                .onConfirmDiscardChangesChanged,
              onConfirmForcePushChanged: this.onConfirmForcePushChanged,
            });
            break;
          case hh.Advanced:
            t = w.createElement(gv, {
              optOutOfUsageTracking: this.state.optOutOfUsageTracking,
              repositoryIndicatorsEnabled: this.state
                .repositoryIndicatorsEnabled,
              uncommittedChangesStrategy: this.state.uncommittedChangesStrategy,
              onOptOutofReportingchanged: this.onOptOutofReportingChanged,
              onUncommittedChangesStrategyChanged: this
                .onUncommittedChangesStrategyChanged,
              onRepositoryIndicatorsEnabledChanged: this
                .onRepositoryIndicatorsEnabledChanged,
            });
            break;
          default:
            return X(0, "Unknown tab index: " + e);
        }
        return w.createElement("div", { className: "tab-container" }, t);
      }
      renderFooter() {
        const e = null != this.state.disallowedCharactersMessage,
          t = this.state.selectedIndex;
        switch (t) {
          case hh.Accounts:
          case hh.Appearance:
            return null;
          case hh.Integrations:
          case hh.Advanced:
          case hh.Prompts:
          case hh.Git:
            return w.createElement(
              lg,
              null,
              w.createElement(cg, { okButtonText: "保存", okButtonDisabled: e })
            );
          default:
            return X(0, "Unknown tab index: " + t);
        }
      }
    }
    function Tv(e, t) {
      if (e.length <= t) return e;
      const n = [...e];
      if (n.length <= t) return e;
      const r = n.reduce(
        (e, t) => (
          t >= "︀" && t <= "️"
            ? e.length && e.push(`${e.pop()}${t}`)
            : e.push(t),
          e
        ),
        []
      );
      if (r.length <= t) return e;
      return r.slice(0, t).join("") + "…";
    }
    class Dv extends w.Component {
      constructor(e) {
        super(e),
          (this.onFilterTextChanged = (e) => {
            this.setState({ filterText: e });
          }),
          (this.onItemClick = (e, t) => {
            if ("keyboard" !== t.kind || "Enter" !== t.event.key) return;
            t.event.preventDefault();
            const { selectedBranch: n } = this.state;
            null !== n && n.name === e.name && this.merge();
          }),
          (this.onSelectionChanged = async (e) => {
            null != e
              ? (this.setState({ selectedBranch: e }),
                await this.updateMergeStatus(e))
              : this.setState({
                  selectedBranch: e,
                  commitCount: 0,
                  mergeStatus: null,
                });
          }),
          (this.renderBranch = (e, t) => zg(e, t, this.props.currentBranch)),
          (this.merge = () => {
            if (!this.canMergeSelectedBranch()) return;
            const e = this.state.selectedBranch;
            e &&
              (this.props.dispatcher.mergeBranch(
                this.props.repository,
                e.name,
                this.state.mergeStatus
              ),
              this.props.onDismissed());
          });
        const t = this.resolveSelectedBranch();
        this.state = {
          selectedBranch: t,
          commitCount: void 0,
          filterText: "",
          mergeStatus: null,
        };
      }
      componentDidMount() {
        const e = this.state.selectedBranch;
        e && this.updateMergeStatus(e);
      }
      renderMergeInfo() {
        const { currentBranch: e } = this.props,
          { selectedBranch: t, mergeStatus: n, commitCount: r } = this.state;
        return null == n ||
          null == e ||
          null == t ||
          e.name === t.name ||
          null == r
          ? null
          : w.createElement(
              "div",
              { className: "merge-status-component" },
              w.createElement(Gg, {
                status: this.state.mergeStatus,
                classNamePrefix: "merge-status",
              }),
              w.createElement(
                "p",
                { className: "merge-info" },
                this.renderMergeStatusMessage(n, t, e, r)
              )
            );
      }
      renderMergeStatusMessage(e, t, n, r) {
        return e.kind === cl.Loading
          ? this.renderLoadingMergeMessage()
          : e.kind === cl.Clean
          ? this.renderCleanMergeMessage(t, n, r)
          : e.kind === cl.Invalid
          ? this.renderInvalidMergeMessage()
          : this.renderConflictedMergeMessage(t, n, e.conflictedFiles);
      }
      renderLoadingMergeMessage() {
        return w.createElement(
          w.Fragment,
          null,
          "检查是否能够进行合并..."
        );
      }
      renderCleanMergeMessage(e, t, n) {
        if (0 === n)
          return w.createElement(
            w.Fragment,
            null,
            "当前分支是最新的 ",
            w.createElement("strong", null, e.name)
          );
        const r = 1 === n ? "项提交" : "项提交";
        return w.createElement(
          w.Fragment,
          null,
          "这将会合并",
          w.createElement("strong", null, ` ${n} ${r}`),
          " 从 ",
          w.createElement("strong", null, e.name),
          " 合并到 ",
          w.createElement("strong", null, t.name)
        );
      }
      renderInvalidMergeMessage() {
        return w.createElement(
          w.Fragment,
          null,
          "Unable to merge unrelated histories in this repository"
        );
      }
      renderConflictedMergeMessage(e, t, n) {
        const r = 1 === n ? "file" : "files";
        return w.createElement(
          w.Fragment,
          null,
          "There will be",
          w.createElement("strong", null, ` ${n} conflicted ${r}`),
          " when merging ",
          w.createElement("strong", null, e.name),
          " into ",
          w.createElement("strong", null, t.name)
        );
      }
      canMergeSelectedBranch() {
        const e = this.state.selectedBranch,
          t = this.props.currentBranch,
          n = null !== e && null !== t && e.name === t.name,
          r = void 0 !== this.state.commitCount && this.state.commitCount > 0,
          i =
            null === this.state.mergeStatus ||
            this.state.mergeStatus.kind !== cl.Invalid;
        return null !== e && !n && r && i;
      }
      render() {
        const e = this.state.selectedBranch,
          t = this.props.currentBranch,
          n = !this.canMergeSelectedBranch(),
          r = Tv(this.props.currentBranch.name, 40);
        return w.createElement(
          sg,
          {
            id: "merge",
            onDismissed: this.props.onDismissed,
            onSubmit: this.merge,
            title: w.createElement(
              w.Fragment,
              null,
              "合并分支到 ",
              w.createElement("strong", null, r)
            ),
          },
          w.createElement(
            ig,
            null,
            w.createElement(gg, {
              allBranches: this.props.allBranches,
              currentBranch: t,
              defaultBranch: this.props.defaultBranch,
              recentBranches: this.props.recentBranches,
              filterText: this.state.filterText,
              onFilterTextChanged: this.onFilterTextChanged,
              selectedBranch: e,
              onSelectionChanged: this.onSelectionChanged,
              canCreateNewBranch: !1,
              renderBranch: this.renderBranch,
              onItemClick: this.onItemClick,
            })
          ),
          w.createElement(
            lg,
            null,
            this.renderMergeInfo(),
            w.createElement(cg, {
              okButtonText: w.createElement(
                w.Fragment,
                null,
                "合并",
                " ",
                w.createElement("strong", null, e ? e.name : ""),
                " ",
                "到 ",
                w.createElement("strong", null, t ? t.name : "")
              ),
              okButtonDisabled: n,
              cancelButtonVisible: !1,
            })
          )
        );
      }
      async updateMergeStatus(e) {
        this.setState({ mergeStatus: { kind: cl.Loading } });
        const { currentBranch: t } = this.props;
        if (null != t) {
          const n = await Cc(() => gl(this.props.repository, t, e), 500);
          this.setState({ mergeStatus: n });
        }
        const n = ja("", e.name),
          r = await Va(this.props.repository, n),
          i = r ? r.behind : 0;
        this.state.selectedBranch !== e
          ? this.setState({ commitCount: void 0 })
          : this.setState({ commitCount: i });
      }
      resolveSelectedBranch() {
        const {
          currentBranch: e,
          defaultBranch: t,
          initialBranch: n,
        } = this.props;
        return void 0 !== n ? n : e === t ? null : t;
      }
    }
    class Av extends w.Component {
      render() {
        const e = this.props.remote;
        return w.createElement(
          ig,
          null,
          w.createElement(
            "p",
            null,
            "主远程存储库 (",
            e.name,
            ")"
          ),
          w.createElement(Md, {
            placeholder: "Remote URL",
            value: e.url,
            onValueChanged: this.props.onRemoteUrlChanged,
          })
        );
      }
    }
    class _v extends w.Component {
      constructor() {
        super(...arguments),
          (this.onChange = (e) => {
            this.props.onChange && this.props.onChange(e),
              this.props.onValueChanged &&
                !e.defaultPrevented &&
                this.props.onValueChanged(e.currentTarget.value);
          }),
          (this.onContextMenu = (e) => {
            e.preventDefault(), se([{ role: "editMenu" }]);
          });
      }
      render() {
        const e = ph()("text-area-component", this.props.labelClassName);
        return w.createElement(
          "label",
          { className: e },
          this.props.label,
          w.createElement("textarea", {
            autoFocus: this.props.autoFocus,
            className: this.props.textareaClassName,
            disabled: this.props.disabled,
            rows: this.props.rows || 3,
            placeholder: this.props.placeholder,
            value: this.props.value,
            onChange: this.onChange,
            onKeyDown: this.props.onKeyDown,
            ref: this.props.onTextAreaRef,
            onContextMenu: this.onContextMenu,
          })
        );
      }
    }
    class Mv extends w.Component {
      render() {
        return w.createElement(
          ig,
          null,
          w.createElement(
            "p",
            null,
            "编辑 ",
            w.createElement(Om, null, ".gitignore"),
            ". 该文件指定Git应该忽略的未跟踪的文件。 Git已经跟踪的文件不受影响。",
            " ",
            w.createElement(
              _d,
              { onClick: this.props.onShowExamples },
              "了解更多"
            )
          ),
          w.createElement(_v, {
            placeholder: "忽略的文件",
            value: this.props.text || "",
            onValueChanged: this.props.onIgnoreTextChanged,
            rows: 6,
          })
        );
      }
    }
    class Pv extends w.Component {
      render() {
        return w.createElement(
          ig,
          null,
          w.createElement(
            pv,
            { actionTitle: "Publish", onAction: this.props.onPublish },
            w.createElement(
              "div",
              null,
              "Publish your repository to GitHub. Need help?",
              " ",
              w.createElement(
                _d,
                {
                  uri:
                    "https://help.github.com/articles/about-remote-repositories/",
                },
                "Learn more"
              ),
              " about remote repositories."
            )
          )
        );
      }
    }
    function Iv(e) {
      const t =
        e.forkContributionTarget === no.Self
          ? e.repository.gitHubRepository
          : e.repository.gitHubRepository.parent;
      return w.createElement(
        "ul",
        { className: "fork-settings-description" },
        w.createElement(
          "li",
          null,
          "Pull requests targeting ",
          w.createElement("strong", null, t.fullName),
          " ",
          "will be shown in the pull request list."
        ),
        w.createElement(
          "li",
          null,
          "Issues will be created in ",
          w.createElement("strong", null, t.fullName),
          "."
        ),
        w.createElement(
          "li",
          null,
          '"View on Github" will open ',
          w.createElement("strong", null, t.fullName),
          " ",
          "in the browser."
        ),
        w.createElement(
          "li",
          null,
          "New branches will be based on",
          " ",
          w.createElement("strong", null, t.fullName),
          "'s default branch."
        ),
        w.createElement(
          "li",
          null,
          "Autocompletion of user and issues will be based on",
          " ",
          w.createElement("strong", null, t.fullName),
          "."
        )
      );
    }
    class Ov extends w.Component {
      constructor() {
        super(...arguments),
          (this.onForkContributionTargetChanged = (e) => {
            this.props.onForkContributionTargetChanged(e);
          });
      }
      render() {
        return w.createElement(
          ig,
          null,
          w.createElement("h2", null, "I'll be using this fork…"),
          w.createElement(rf, {
            value: no.Parent,
            checked: this.props.forkContributionTarget === no.Parent,
            label: "To contribute to the parent repository",
            onSelected: this.onForkContributionTargetChanged,
          }),
          w.createElement(rf, {
            value: no.Self,
            checked: this.props.forkContributionTarget === no.Self,
            label: "For my own purposes",
            onSelected: this.onForkContributionTargetChanged,
          }),
          w.createElement(Iv, {
            repository: this.props.repository,
            forkContributionTarget: this.props.forkContributionTarget,
          })
        );
      }
    }
    var Lv;
    !(function (e) {
      (e[(e.Remote = 0)] = "Remote"),
        (e[(e.IgnoredFiles = 1)] = "IgnoredFiles"),
        (e[(e.ForkSettings = 2)] = "ForkSettings");
    })(Lv || (Lv = {}));
    class Fv extends w.Component {
      constructor(e) {
        super(e),
          (this.onPublish = () => {
            this.props.dispatcher.showPopup({
              type: ao.PublishRepository,
              repository: this.props.repository,
            });
          }),
          (this.onShowGitIgnoreExamples = () => {
            this.props.dispatcher.openInBrowser(
              "https://git-scm.com/docs/gitignore"
            );
          }),
          (this.onSubmit = async () => {
            this.setState({ disabled: !0, errors: void 0 });
            const e = new Array();
            if (
              this.state.remote &&
              this.props.remote &&
              this.state.remote.url !== this.props.remote.url
            )
              try {
                await this.props.dispatcher.setRemoteURL(
                  this.props.repository,
                  this.props.remote.name,
                  this.state.remote.url
                );
              } catch (t) {
                log.error(
                  "RepositorySettings: unable to set remote URL at " +
                    this.props.repository.path,
                  t
                ),
                  e.push("Failed setting the remote URL: " + t);
              }
            if (
              this.state.ignoreTextHasChanged &&
              null !== this.state.ignoreText
            )
              try {
                await this.props.dispatcher.saveGitIgnore(
                  this.props.repository,
                  this.state.ignoreText
                );
              } catch (t) {
                log.error(
                  "RepositorySettings: unable to save gitignore at " +
                    this.props.repository.path,
                  t
                ),
                  e.push("Failed saving the .gitignore file: " + t);
              }
            this.state.forkContributionTarget !==
              this.props.repository.workflowPreferences
                .forkContributionTarget &&
              (await this.props.dispatcher.updateRepositoryWorkflowPreferences(
                this.props.repository,
                Object.assign(
                  Object.assign({}, this.props.repository.workflowPreferences),
                  { forkContributionTarget: this.state.forkContributionTarget }
                )
              )),
              e.length
                ? this.setState({ disabled: !1, errors: e })
                : this.props.onDismissed();
          }),
          (this.onRemoteUrlChanged = (e) => {
            const t = this.props.remote;
            if (!t) return;
            const n = Object.assign(Object.assign({}, t), { url: e });
            this.setState({ remote: n });
          }),
          (this.onIgnoreTextChanged = (e) => {
            this.setState({ ignoreText: e, ignoreTextHasChanged: !0 });
          }),
          (this.onTabClicked = (e) => {
            this.setState({ selectedTab: e });
          }),
          (this.onForkContributionTargetChanged = (e) => {
            this.setState({ forkContributionTarget: e });
          }),
          (this.state = {
            selectedTab: Lv.Remote,
            remote: e.remote,
            ignoreText: null,
            ignoreTextHasChanged: !1,
            disabled: !1,
            forkContributionTarget: mo(e.repository),
          });
      }
      async componentWillMount() {
        try {
          const e = await Hl(this.props.repository);
          this.setState({ ignoreText: e });
        } catch (e) {
          log.error(
            "RepositorySettings: unable to read root .gitignore file for " +
              this.props.repository.path,
            e
          ),
            this.setState({ errors: ["Could not read root .gitignore: " + e] });
        }
      }
      renderErrors() {
        const e = this.state.errors;
        return e && e.length
          ? e.map((e, t) => {
              const n = "err-" + t;
              return w.createElement(ag, { key: n }, e);
            })
          : null;
      }
      render() {
        const e = uo(this.props.repository);
        return w.createElement(
          sg,
          {
            id: "repository-settings",
            title: "存储库设置",
            onDismissed: this.props.onDismissed,
            onSubmit: this.onSubmit,
            disabled: this.state.disabled,
          },
          this.renderErrors(),
          w.createElement(
            "div",
            { className: "tab-container" },
            w.createElement(
              uf,
              {
                onTabClicked: this.onTabClicked,
                selectedIndex: this.state.selectedTab,
                type: cf.Vertical,
              },
              w.createElement("span", null, "远程"),
              w.createElement("span", null, "忽略文件"),
              e && w.createElement("span", null, "Fork behavior")
            ),
            w.createElement(
              "div",
              { className: "active-tab" },
              this.renderActiveTab()
            )
          ),
          this.renderFooter()
        );
      }
      renderFooter() {
        const e = this.state.selectedTab,
          t = this.state.remote;
        return e !== Lv.Remote || t
          ? w.createElement(
              lg,
              null,
              w.createElement(cg, { okButtonText: "保存" })
            )
          : null;
      }
      renderActiveTab() {
        const e = this.state.selectedTab;
        switch (e) {
          case Lv.Remote: {
            const e = this.state.remote;
            return e
              ? w.createElement(Av, {
                  remote: e,
                  onRemoteUrlChanged: this.onRemoteUrlChanged,
                })
              : w.createElement(Pv, { onPublish: this.onPublish });
          }
          case Lv.IgnoredFiles:
            return w.createElement(Mv, {
              text: this.state.ignoreText,
              onIgnoreTextChanged: this.onIgnoreTextChanged,
              onShowExamples: this.onShowGitIgnoreExamples,
            });
          case Lv.ForkSettings:
            return uo(this.props.repository)
              ? w.createElement(Ov, {
                  forkContributionTarget: this.state.forkContributionTarget,
                  repository: this.props.repository,
                  onForkContributionTargetChanged: this
                    .onForkContributionTargetChanged,
                })
              : null;
          default:
            return X(0, "Unknown tab type: " + e);
        }
      }
    }
    function Nv(e) {
      return e.indexOf("\r") < 0
        ? e
        : e
            .split("\n")
            .map((e) =>
              e
                .split("\r")
                .reduce((e, t) =>
                  t.length >= e.length ? t : t + e.substring(t.length)
                )
            )
            .join("\n");
    }
    class Bv extends w.Component {
      constructor(e) {
        super(e),
          (this.dialogContent = null),
          (this.formatGitErrorMessage = hi(Nv)),
          (this.onDismissed = () => {
            const e = this.state.error;
            null !== e &&
              (this.setState({ error: null, disabled: !0 }),
              window.setTimeout(() => {
                this.props.onClearError(e);
              }, Hb.exit));
          }),
          (this.showPreferencesDialog = () => {
            this.onDismissed(),
              window.setTimeout(() => {
                this.props.onShowPopup({ type: ao.Preferences });
              }, Hb.exit);
          }),
          (this.onRetryAction = (e) => {
            e.preventDefault(), this.onDismissed();
            const { error: t } = this.state;
            if (null !== t && zv(t)) {
              const { retryAction: e } = t.metadata;
              void 0 !== e && this.props.onRetryAction(e);
            }
          }),
          (this.onDialogContentRef = (e) => {
            this.dialogContent = e;
          }),
          (this.onCloseButtonClick = (e) => {
            e.preventDefault(), this.onDismissed();
          }),
          (this.state = { error: e.errors[0] || null, disabled: !1 });
      }
      componentWillReceiveProps(e) {
        const t = e.errors[0] || null;
        t !== this.state.error && this.setState({ error: t, disabled: !1 });
      }
      renderErrorMessage(e) {
        const t = e instanceof ce ? e.underlyingError : e;
        if (
          t instanceof Go &&
          (t.message === t.result.stderr || t.message === t.result.stdout)
        ) {
          const e = this.formatGitErrorMessage(t.message);
          return w.createElement("p", { className: "monospace" }, e);
        }
        return w.createElement("p", null, t.message);
      }
      getTitle(e) {
        return Wv(e) ? "克隆失败" : "错误";
      }
      renderDialog() {
        const e = this.state.error;
        return e
          ? w.createElement(
              sg,
              {
                id: "app-error",
                type: "error",
                key: "error",
                title: this.getTitle(e),
                dismissable: !1,
                onSubmit: this.onDismissed,
                onDismissed: this.onDismissed,
                disabled: this.state.disabled,
              },
              w.createElement(
                ig,
                { onRef: this.onDialogContentRef },
                this.renderErrorMessage(e),
                this.renderContentAfterErrorMessage(e)
              ),
              this.renderFooter(e)
            )
          : null;
      }
      renderContentAfterErrorMessage(e) {
        if (!zv(e)) return;
        const { retryAction: t } = e.metadata;
        return t && t.type === re.Clone
          ? w.createElement(
              "p",
              null,
              "是否再次尝试克隆 ",
              w.createElement(Om, null, t.name),
              "?"
            )
          : void 0;
      }
      scrollToBottomOfGitErrorMessage() {
        if (null === this.dialogContent || null === this.state.error) return;
        const e = Hv(this.state.error);
        Uv(e) &&
          ((e.message !== e.result.stderr && e.message !== e.result.stdout) ||
            (this.dialogContent.scrollTop = this.dialogContent.scrollHeight));
      }
      componentDidMount() {
        this.scrollToBottomOfGitErrorMessage();
      }
      componentDidUpdate(e, t) {
        t.error !== this.state.error && this.scrollToBottomOfGitErrorMessage();
      }
      renderFooter(e) {
        if (Wv(e)) return this.renderRetryCloneFooter();
        const t = Hv(e);
        if (Uv(t)) {
          const { gitError: e } = t.result;
          if (null !== e && qo(e)) return this.renderOpenPreferencesFooter();
        }
        return this.renderDefaultFooter();
      }
      renderRetryCloneFooter() {
        return w.createElement(
          lg,
          null,
          w.createElement(cg, {
            okButtonText: "重试",
            onOkButtonClick: this.onRetryAction,
            onCancelButtonClick: this.onCloseButtonClick,
          })
        );
      }
      renderOpenPreferencesFooter() {
        return w.createElement(
          lg,
          null,
          w.createElement(cg, {
            okButtonText: "Close",
            onOkButtonClick: this.onCloseButtonClick,
            cancelButtonText: "Open options",
            onCancelButtonClick: this.showPreferencesDialog,
          })
        );
      }
      renderDefaultFooter() {
        return w.createElement(ug, { onButtonClick: this.onCloseButtonClick });
      }
      render() {
        const e = this.renderDialog();
        return w.createElement(
          O,
          null,
          e && w.createElement(K, { classNames: "modal", timeout: Hb }, e)
        );
      }
    }
    function Hv(e) {
      return zv(e) ? e.underlyingError : e;
    }
    function zv(e) {
      return e instanceof ce;
    }
    function Uv(e) {
      return e instanceof Go;
    }
    function Wv(e) {
      if (!zv(e)) return !1;
      const { retryAction: t } = e.metadata;
      return void 0 !== t && t.type === re.Clone;
    }
    class jv extends w.Component {
      constructor() {
        super(...arguments),
          (this.checkAgain = () => {
            this.props.dispatcher.refreshRepository(this.props.repository);
          }),
          (this.remove = () => {
            this.props.dispatcher.removeRepository(this.props.repository, !1);
          }),
          (this.locate = () => {
            this.props.dispatcher.relocateRepository(this.props.repository);
          }),
          (this.cloneAgain = async () => {
            const e = this.props.repository.gitHubRepository;
            if (!e) return;
            const t = e.cloneURL;
            if (t)
              try {
                await this.props.dispatcher.cloneAgain(
                  t,
                  this.props.repository.path
                );
              } catch (e) {
                this.props.dispatcher.postError(e);
              }
          });
      }
      render() {
        const e = new Array();
        return (
          e.push(
            w.createElement(
              Ud,
              { key: "locate", onClick: this.locate, type: "submit" },
              "Locate…"
            )
          ),
          this.canCloneAgain() &&
            e.push(
              w.createElement(
                Ud,
                { key: "clone-again", onClick: this.cloneAgain },
                "Clone Again"
              )
            ),
          e.push(
            w.createElement(
              Ud,
              { key: "remove", onClick: this.remove },
              "Remove"
            )
          ),
          w.createElement(
            Gd,
            { id: "missing-repository-view" },
            w.createElement(
              "div",
              { className: "title-container" },
              w.createElement(
                "div",
                { className: "title" },
                "Can't find \"",
                this.props.repository.name,
                '"'
              ),
              w.createElement(
                "div",
                { className: "details" },
                "It was last seen at",
                " ",
                w.createElement(
                  "span",
                  { className: "path" },
                  this.props.repository.path
                ),
                ".",
                " ",
                w.createElement(
                  _d,
                  { onClick: this.checkAgain },
                  "Check again."
                )
              )
            ),
            w.createElement(Pd, null, e)
          )
        );
      }
      canCloneAgain() {
        const e = this.props.repository.gitHubRepository;
        return e && e.cloneURL;
      }
    }
    var Vv = n(141),
      Gv = n.n(Vv);
    class $v extends w.Component {
      constructor(e) {
        super(e),
          (this.onPathChanged = async (e) => {
            const t = await Ya(e);
            this.setState({ path: e, isRepository: t });
          }),
          (this.showFilePicker = async () => {
            const e = r.remote.getCurrentWindow(),
              { filePaths: t } = await r.remote.dialog.showOpenDialog(e, {
                properties: ["createDirectory", "openDirectory"],
              });
            if (0 === t.length) return;
            const n = t[0],
              i = await Ya(n),
              o = await Ka(n);
            this.setState({
              path: n,
              isRepository: i,
              showNonGitRepositoryWarning: !i || o,
              isRepositoryBare: o,
            });
          }),
          (this.addRepository = async () => {
            this.props.onDismissed();
            const { dispatcher: e } = this.props,
              t = this.resolvedPath(this.state.path),
              n = await e.addRepositories([t]);
            n.length > 0 &&
              (e.selectRepository(n[0]), e.recordAddExistingRepository());
          }),
          (this.onCreateRepositoryClicked = () => {
            const e = this.resolvedPath(this.state.path);
            return this.props.dispatcher.showPopup({
              type: ao.CreateRepository,
              path: e,
            });
          });
        const t = this.props.path ? this.props.path : "";
        this.state = {
          path: t,
          isRepository: !1,
          showNonGitRepositoryWarning: !1,
          isRepositoryBare: !1,
        };
      }
      async componentDidMount() {
        const e = this.state.path;
        if (e.length < 1) return;
        const t = await Ya(e);
        if (this.state.path !== e) return;
        !0 !== (await Ka(this.state.path))
          ? (this.setState({
              isRepository: t,
              showNonGitRepositoryWarning: !t,
            }),
            this.setState({ isRepositoryBare: !1 }))
          : this.setState({ isRepositoryBare: !0 });
      }
      renderWarning() {
        return this.state.path.length && this.state.showNonGitRepositoryWarning
          ? this.state.isRepositoryBare
            ? w.createElement(
                Pd,
                { className: "warning-helper-text" },
                w.createElement(vh, { symbol: wh.alert }),
                w.createElement(
                  "p",
                  null,
                  "This directory appears to be a bare repository. Bare repositories are not currently supported."
                )
              )
            : w.createElement(
                Pd,
                { className: "warning-helper-text" },
                w.createElement(vh, { symbol: wh.alert }),
                w.createElement(
                  "p",
                  null,
                  "该目录似乎并不是一个有效的Git存储库。",
                  w.createElement("br", null),
                  "你是否想要在此处",
                  " ",
                  w.createElement(
                    _d,
                    { onClick: this.onCreateRepositoryClicked },
                    "创建一个新的存储库"
                  ),
                  " ",
                  "?"
                )
              )
          : null;
      }
      render() {
        const e =
          0 === this.state.path.length ||
          !this.state.isRepository ||
          this.state.isRepositoryBare;
        return w.createElement(
          sg,
          {
            id: "add-existing-repository",
            title: "导入本地已有的仓库",
            onSubmit: this.addRepository,
            onDismissed: this.props.onDismissed,
          },
          w.createElement(
            ig,
            null,
            w.createElement(
              Pd,
              null,
              w.createElement(Md, {
                value: this.state.path,
                label: "本地路径",
                placeholder: "选择仓库所在路径",
                onValueChanged: this.onPathChanged,
              }),
              w.createElement(Ud, { onClick: this.showFilePicker }, "选择…")
            ),
            this.renderWarning()
          ),
          w.createElement(
            lg,
            null,
            w.createElement(cg, {
              okButtonText: "添加仓库",
              okButtonDisabled: e,
            })
          )
        );
      }
      resolvedPath(e) {
        return i.resolve("/", Gv()(e));
      }
    }
    const qv = new RegExp(
      [
        "\ud83c[\udf00-\udfff]",
        "\ud83d[\udc00-\ude4f]",
        "\ud83d[\ude80-\udeff]",
      ].join("|"),
      "g"
    );
    function Kv(e) {
      return e.replace(qv, "-").replace(/[^\w.-]/g, "-");
    }
    const Yv = i.join(__dirname, "static", "gitignore");
    let Qv = null;
    async function Zv() {
      if (null != Qv) return Qv;
      {
        const e = (await Object(_i.readdir)(Yv)).filter((e) =>
          e.endsWith(".gitignore")
        );
        Qv = new Map();
        for (const t of e) Qv.set(i.basename(t, ".gitignore"), i.join(Yv, t));
        return Qv;
      }
    }
    async function Xv(e, t) {
      const n = i.join(e, ".gitignore"),
        r = await (async function (e) {
          const t = (await Zv()).get(e);
          if (!t)
            throw new Error(
              `Unknown gitignore: ${e}. Only names returned from getGitIgnoreNames() can be used.`
            );
          return await Object(_i.readFile)(t, "utf8");
        })(t);
      await Object(_i.writeFile)(n, r);
    }
    let Jv = null;
    function ew(e, t, n) {
      const r = new RegExp(`\\[${t}\\]`, "g"),
        i = e.replace(r, `{${t}}`),
        o = new RegExp(`\\{${t}\\}`, "g");
      return i.replace(o, n);
    }
    async function tw(e, t, n) {
      const r = i.join(e, "LICENSE"),
        o = (function (e, t, n) {
          let r = e;
          for (const e of t) {
            r = ew(r, e, n[e]);
          }
          return r;
        })(t.body, ["fullname", "email", "project", "description", "year"], n);
      await Object(_i.writeFile)(r, o);
    }
    const nw = { name: "None", featured: !1, body: "", hidden: !1 };
    class rw extends w.Component {
      constructor(e) {
        super(e),
          (this.onPathChanged = async (e) => {
            this.setState({ path: e, isValidPath: null });
            const t = await Ya(e);
            this.setState((n) => (n.path === e ? { isRepository: t } : null)),
              this.updateReadMeExists(e, this.state.name);
          }),
          (this.onNameChanged = (e) => {
            this.setState({ name: e }),
              this.updateReadMeExists(this.state.path, e);
          }),
          (this.onDescriptionChanged = (e) => {
            this.setState({ description: e });
          }),
          (this.showFilePicker = async () => {
            const e = r.remote.getCurrentWindow(),
              { filePaths: t } = await r.remote.dialog.showOpenDialog(e, {
                properties: ["createDirectory", "openDirectory"],
              });
            if (0 === t.length) return;
            const n = t[0],
              i = await Ya(n);
            this.setState({ isRepository: i, path: n });
          }),
          (this.resolveRepositoryRoot = async () => {
            const e = this.state.path;
            if (this.props.initialPath && this.props.initialPath === e)
              try {
                return await _i.ensureDir(e), e;
              } catch (e) {}
            return i.join(e, Kv(this.state.name));
          }),
          (this.createRepository = async () => {
            const e = await this.resolveRepositoryRoot();
            try {
              await _i.ensureDir(e), this.setState({ isValidPath: !0 });
            } catch (t) {
              return "EACCES" === t.code && -13 === t.errno
                ? this.setState({ isValidPath: !1 })
                : (log.error(
                    `createRepository: the directory at ${e} is not valid`,
                    t
                  ),
                  this.props.dispatcher.postError(t));
            }
            this.setState({ creating: !0 });
            try {
              await (async function (e) {
                await $o(["init"], e, "initGitRepository");
              })(e);
            } catch (t) {
              return (
                this.setState({ creating: !1 }),
                log.error(
                  "createRepository: unable to initialize a Git repository at " +
                    e,
                  t
                ),
                this.props.dispatcher.postError(t)
              );
            }
            const t = await this.props.dispatcher.addRepositories([e]);
            if (t.length < 1) return;
            const n = t[0],
              r = await Jc();
            if ("master" !== r)
              try {
                await (async function (e, t) {
                  await $o(
                    ["checkout", "-b", t],
                    e.path,
                    "createAndCheckoutBranch"
                  );
                })(n, r);
              } catch (e) {
                log.error(
                  `createRepository: unable to create default branch "${r}"`,
                  e
                );
              }
            if (this.state.createWithReadme)
              try {
                await (async function (e, t, n) {
                  const r = i.join(e, "README.md"),
                    o = (function (e, t) {
                      return void 0 !== t ? `# ${e}\n ${t}\n` : `# ${e}\n`;
                    })(t, n);
                  await Object(_i.writeFile)(r, o);
                })(e, this.state.name, this.state.description);
              } catch (t) {
                log.error(
                  "createRepository: unable to write README at " + e,
                  t
                ),
                  this.props.dispatcher.postError(t);
              }
            const o = this.state.gitIgnore;
            if ("None" !== o)
              try {
                await Xv(e, o);
              } catch (t) {
                log.error(
                  "createRepository: unable to write .gitignore file at " + e,
                  t
                ),
                  this.props.dispatcher.postError(t);
              }
            const s = this.state.description;
            if (s)
              try {
                await (async function (e, t) {
                  const n = i.join(e, ".git/description");
                  await _i.writeFile(n, t);
                })(e, s);
              } catch (t) {
                log.error(
                  "createRepository: unable to write .git/description file at " +
                    e,
                  t
                ),
                  this.props.dispatcher.postError(t);
              }
            const a =
                this.state.license === nw.name ? null : this.state.license,
              l = (this.state.licenses || []).find((e) => e.name === a);
            if (l)
              try {
                const t = await Il(n);
                await tw(e, l, {
                  fullname: t ? t.name : "",
                  email: t ? t.email : "",
                  year: new Date().getFullYear().toString(),
                  description: "",
                  project: this.state.name,
                });
              } catch (t) {
                log.error(
                  "createRepository: unable to write LICENSE at " + e,
                  t
                ),
                  this.props.dispatcher.postError(t);
              }
            try {
              const t = i.join(e, ".gitattributes");
              (await _i.pathExists(t)) ||
                (await (async function (e) {
                  const t = Object(i.join)(e, ".gitattributes");
                  await Object(_i.writeFile)(
                    t,
                    "# Auto detect text files and perform LF normalization\n* text=auto\n"
                  );
                })(e));
            } catch (t) {
              log.error(
                "createRepository: unable to write .gitattributes at " + e,
                t
              ),
                this.props.dispatcher.postError(t);
            }
            const c = await Ml(n);
            if (null !== c) {
              try {
                const e = c.workingDirectory.files;
                e.length > 0 && (await Da(n, "Initial commit", e));
              } catch (t) {
                log.error("createRepository: initial commit failed at " + e, t),
                  this.props.dispatcher.postError(t);
              }
              this.setState({ creating: !1 }),
                this.updateDefaultDirectory(),
                this.props.dispatcher.selectRepository(n),
                this.props.dispatcher.recordCreateRepository(),
                this.props.onDismissed();
            } else
              this.props.dispatcher.postError(
                new Error(
                  "Unable to create the new repository because there are too many new files in this directory"
                )
              );
          }),
          (this.updateDefaultDirectory = () => {
            this.props.initialPath || Tu(this.state.path);
          }),
          (this.onCreateWithReadmeChange = (e) => {
            this.setState({ createWithReadme: e.currentTarget.checked });
          }),
          (this.onGitIgnoreChange = (e) => {
            const t = e.currentTarget.value;
            this.setState({ gitIgnore: t });
          }),
          (this.onLicenseChange = (e) => {
            const t = e.currentTarget.value;
            this.setState({ license: t });
          }),
          (this.onAddRepositoryClicked = () =>
            this.props.dispatcher.showPopup({
              type: ao.AddRepository,
              path: this.state.path,
            })),
          (this.onWindowFocus = () => {
            this.updateReadMeExists(this.state.path, this.state.name);
          });
        const t = this.props.initialPath ? this.props.initialPath : Ru(),
          n = this.props.initialPath
            ? Kv(i.basename(this.props.initialPath))
            : "";
        this.state = {
          path: t,
          name: n,
          description: "",
          createWithReadme: !1,
          creating: !1,
          gitIgnoreNames: null,
          gitIgnore: "None",
          licenses: null,
          license: nw.name,
          isValidPath: null,
          isRepository: !1,
          readMeExists: !1,
        };
      }
      async componentDidMount() {
        window.addEventListener("focus", this.onWindowFocus);
        const e = await (async function () {
          const e = await Zv();
          return Array.from(e.keys());
        })();
        this.setState({ gitIgnoreNames: e });
        const t = await (async function () {
          if (null != Jv) return Jv;
          {
            const e = i.join(__dirname, "static", "available-licenses.json"),
              t = await Object(_i.readFile)(e, "utf8"),
              n = JSON.parse(t);
            return (
              (Jv = n.sort((e, t) =>
                e.featured ? -1 : t.featured ? 1 : e.name.localeCompare(t.name)
              )),
              Jv
            );
          }
        })();
        this.setState({ licenses: t });
        const n = await Ya(this.state.path);
        this.setState({ isRepository: n }),
          this.updateReadMeExists(this.state.path, this.state.name);
      }
      componentWillUnmount() {
        window.removeEventListener("focus", this.onWindowFocus);
      }
      async updateReadMeExists(e, t) {
        if (!Ys()) return;
        const n = i.join(e, Kv(t), "README.md"),
          r = await _i.pathExists(n);
        this.setState((t) => (t.path === e ? { readMeExists: r } : null));
      }
      renderSanitizedName() {
        const e = Kv(this.state.name);
        return this.state.name === e
          ? null
          : w.createElement(
              Pd,
              { className: "warning-helper-text" },
              w.createElement(vh, { symbol: wh.alert }),
              "Will be created as ",
              e
            );
      }
      renderGitIgnores() {
        const e = ["None", ...(this.state.gitIgnoreNames || [])];
        return w.createElement(
          Pd,
          null,
          w.createElement(
            Ev,
            {
              label: "Git忽略类型",
              value: this.state.gitIgnore,
              onChange: this.onGitIgnoreChange,
            },
            e.map((e) => w.createElement("option", { key: e, value: e }, e))
          )
        );
      }
      renderLicenses() {
        const e = this.state.licenses || [],
          t = [nw, ...e.filter((e) => e.featured)],
          n = e.filter((e) => !e.featured);
        return w.createElement(
          Pd,
          null,
          w.createElement(
            Ev,
            {
              label: "许可证",
              value: this.state.license,
              onChange: this.onLicenseChange,
            },
            t.map((e) =>
              w.createElement("option", { key: e.name, value: e.name }, e.name)
            ),
            w.createElement("option", { disabled: !0 }, "────────────────────"),
            n.map((e) =>
              w.createElement("option", { key: e.name, value: e.name }, e.name)
            )
          )
        );
      }
      renderInvalidPathError() {
        const e = this.state.isValidPath;
        return !(null !== e) || e
          ? null
          : w.createElement(
              ag,
              null,
              "Directory could not be created at this path. You may not have permissions to create a directory here."
            );
      }
      renderGitRepositoryWarning() {
        const e = this.state.isRepository;
        return this.state.path && 0 !== this.state.path.length && e
          ? w.createElement(
              Pd,
              { className: "warning-helper-text" },
              w.createElement(vh, { symbol: wh.alert }),
              w.createElement(
                "p",
                null,
                "This directory appears to be a Git repository. Would you like to",
                " ",
                w.createElement(
                  _d,
                  { onClick: this.onAddRepositoryClicked },
                  "add this repository"
                ),
                " ",
                "instead?"
              )
            )
          : null;
      }
      renderReadmeOverwriteWarning() {
        return Ys()
          ? !1 === this.state.createWithReadme || !1 === this.state.readMeExists
            ? null
            : w.createElement(
                Pd,
                { className: "warning-helper-text" },
                w.createElement(vh, { symbol: wh.alert }),
                w.createElement(
                  "p",
                  null,
                  "This directory contains a ",
                  w.createElement(Om, null, "README.md"),
                  " file already. Checking this box will result in the existing file being overwritten."
                )
              )
          : null;
      }
      render() {
        const e =
            0 === this.state.path.length ||
            0 === this.state.name.length ||
            this.state.creating ||
            this.state.isRepository,
          t = !!this.props.initialPath;
        return w.createElement(
          sg,
          {
            id: "create-repository",
            title: "创建一个新的存储库",
            loading: this.state.creating,
            onSubmit: this.createRepository,
            onDismissed: this.props.onDismissed,
          },
          this.renderInvalidPathError(),
          w.createElement(
            ig,
            null,
            w.createElement(
              Pd,
              null,
              w.createElement(Md, {
                value: this.state.name,
                label: "名称",
                placeholder: "存储库名称",
                onValueChanged: this.onNameChanged,
              })
            ),
            this.renderSanitizedName(),
            w.createElement(
              Pd,
              null,
              w.createElement(Md, {
                value: this.state.description,
                label: "描述",
                placeholder: "存储库的描述",
                onValueChanged: this.onDescriptionChanged,
              })
            ),
            w.createElement(
              Pd,
              null,
              w.createElement(Md, {
                value: this.state.path,
                label: "本地路径",
                placeholder: "选择存储库位置",
                onValueChanged: this.onPathChanged,
                disabled: t,
              }),
              w.createElement(
                Ud,
                { onClick: this.showFilePicker, disabled: t },
                "选择…"
              )
            ),
            this.renderGitRepositoryWarning(),
            w.createElement(
              Pd,
              null,
              w.createElement(qd, {
                label: "添加自述文件(README.md)来初始化此存储库",
                value: this.state.createWithReadme ? $d.On : $d.Off,
                onChange: this.onCreateWithReadmeChange,
              })
            ),
            this.renderReadmeOverwriteWarning(),
            this.renderGitIgnores(),
            this.renderLicenses()
          ),
          w.createElement(
            lg,
            null,
            w.createElement(cg, {
              okButtonText: "创建仓库",
              okButtonDisabled: e,
            })
          )
        );
      }
    }
    async function iw(e, t, n) {
      const r = ht.fromAccount(e);
      return !!(await r.fetchRepository(t, n));
    }
    async function ow(e, t, n = iw) {
      const r = [...t, Pe.anonymous()],
        i = bt(e);
      if (i) {
        const e =
          r.find((e) => {
            const t = mt(e.endpoint),
              n = _e.parse(t);
            return i.hostname === n.hostname;
          }) || null;
        if (e) return e;
      }
      const o = St(e);
      if (o) {
        const { owner: e, name: t, hostname: i } = o,
          s = Array.from(r).sort((e, t) =>
            e.endpoint === gt()
              ? e.token.length
                ? -1
                : 1
              : t.endpoint === gt()
              ? t.token.length
                ? 1
                : -1
              : 0
          );
        for (const r of s) {
          if (null != i) {
            if (_e.parse(mt(r.endpoint)).hostname !== i) continue;
          }
          if (await n(r, e, t)) return r;
        }
      }
      return null;
    }
    class sw extends w.Component {
      constructor() {
        super(...arguments),
          (this.onUrlChanged = (e) => {
            this.props.onUrlChanged(e);
          });
      }
      render() {
        return w.createElement(
          ig,
          { className: "clone-generic-repository-content" },
          w.createElement(
            Pd,
            null,
            w.createElement(Md, {
              placeholder: "URL 或者 用户名/存储库名",
              value: this.props.url,
              onValueChanged: this.onUrlChanged,
              autoFocus: !0,
              label: w.createElement(
                "span",
                null,
                "存储库URL或GitHub用户名和存储库",
                w.createElement("br", null),
                "(",
                w.createElement(Om, null, "示例：hubot/cool-repo"),
                ")"
              ),
            })
          ),
          w.createElement(
            Pd,
            null,
            w.createElement(Md, {
              value: this.props.path,
              label: "本地路径",
              placeholder: "存储库路径",
              onValueChanged: this.props.onPathChanged,
            }),
            w.createElement(
              Ud,
              { onClick: this.props.onChooseDirectory },
              "选择…"
            )
          )
        );
      }
    }
    function aw(e) {
      return e.map((e) => {
        const t = (n = e).private ? wh.lock : n.fork ? wh.repoForked : wh.repo;
        var n;
        return {
          id: e.html_url,
          text: [`${e.owner.login}/${e.name}`],
          url: e.clone_url,
          name: e.name,
          icon: t,
        };
      });
    }
    function lw(e, t) {
      if (null !== t)
        for (const n of e)
          for (const e of n.items) if (e.url === t.clone_url) return e;
      return null;
    }
    function cw(e, t) {
      return e.find((e) => e.clone_url === t.url) || null;
    }
    class uw extends w.PureComponent {
      constructor() {
        super(...arguments),
          (this.getRepositoryGroups = hi((e, t) =>
            null === e
              ? []
              : (function (e, t) {
                  const n = e.filter((e) => "User" === e.owner.type),
                    r = e.filter((e) => "Organization" === e.owner.type),
                    i = [{ identifier: "your-repositories", items: aw(n) }],
                    o = r.map((e) => e.owner.login),
                    s = Array.from(new Set(o));
                  for (const e of s.sort(xt)) {
                    const t = r.filter((t) => t.owner.login === e);
                    i.push({ identifier: e, items: aw(t) });
                  }
                  return i;
                })(e)
          )),
          (this.getSelectedListItem = hi(lw)),
          (this.refreshRepositories = () => {
            this.props.onRefreshRepositories(this.props.account);
          }),
          (this.onItemClick = (e, t) => {
            const { onItemClicked: n, repositories: r } = this.props;
            if (void 0 === n || null === r) return;
            const i = cw(r, e);
            null !== i && n(i, t);
          }),
          (this.onSelectionChanged = (e) => {
            null === e || null === this.props.repositories
              ? this.props.onSelectionChanged(null)
              : this.props.onSelectionChanged(cw(this.props.repositories, e));
          }),
          (this.renderGroupHeader = (e) => {
            let t = e;
            return (
              "your-repositories" === e && (t = "我的储存库"),
              w.createElement(
                "div",
                {
                  className:
                    "clone-repository-list-content clone-repository-list-group-header",
                },
                t
              )
            );
          }),
          (this.renderItem = (e, t) =>
            w.createElement(
              "div",
              { className: "clone-repository-list-item" },
              w.createElement(vh, { className: "icon", symbol: e.icon }),
              w.createElement(
                "div",
                { className: "name", title: e.text[0] },
                w.createElement(Th, { text: e.text[0], highlight: t.title })
              )
            )),
          (this.renderPostFilter = () =>
            w.createElement(
              Ud,
              {
                disabled: this.props.loading,
                onClick: this.refreshRepositories,
                tooltip: "Refresh the list of repositories",
              },
              w.createElement(vh, {
                symbol: Ch,
                className: this.props.loading ? "spin" : void 0,
              })
            )),
          (this.renderNoItems = () => {
            const { loading: e, repositories: t } = this.props,
              n =
                this.props.account.endpoint === gt()
                  ? "GitHub.com"
                  : mt(this.props.account.endpoint);
            return !e || (null !== t && 0 !== t.length)
              ? 0 !== this.props.filterText.length
                ? w.createElement(
                    "div",
                    { className: "no-items no-results-found" },
                    w.createElement(
                      "div",
                      null,
                      "Sorry, I can't find any repository matching",
                      " ",
                      w.createElement(Om, null, this.props.filterText)
                    )
                  )
                : w.createElement(
                    "div",
                    { className: "no-items empty-repository-list" },
                    w.createElement(
                      "div",
                      null,
                      "用户",
                      " ",
                      w.createElement(Om, null, this.props.account.login),
                      " 没有存储库在 ",
                      n,
                      ".",
                      " ",
                      w.createElement(
                        _d,
                        { onClick: this.refreshRepositories },
                        "刷新此列表"
                      ),
                      " ",
                      "如果您最近创建了一个存储库。"
                    )
                  )
              : w.createElement(
                  "div",
                  { className: "no-items loading" },
                  `Loading repositories from ${n}…`
                );
          });
      }
      componentDidMount() {
        null === this.props.repositories && this.refreshRepositories();
      }
      componentDidUpdate(e) {
        e.repositories !== this.props.repositories &&
          null === this.props.repositories &&
          this.refreshRepositories();
      }
      render() {
        const { repositories: e, account: t, selectedItem: n } = this.props,
          r = this.getRepositoryGroups(e, t.login),
          i = this.getSelectedListItem(r, n);
        return w.createElement(Fd, {
          className: "clone-github-repo",
          rowHeight: 31,
          selectedItem: i,
          renderItem: this.renderItem,
          renderGroupHeader: this.renderGroupHeader,
          onSelectionChanged: this.onSelectionChanged,
          invalidationProps: r,
          groups: r,
          filterText: this.props.filterText,
          onFilterTextChanged: this.props.onFilterTextChanged,
          renderNoItems: this.renderNoItems,
          renderPostFilter: this.renderPostFilter,
          onItemClick: this.props.onItemClicked ? this.onItemClick : void 0,
          placeholderText: "过滤您的存储库",
        });
      }
    }
    class hw extends w.PureComponent {
      render() {
        return w.createElement(
          ig,
          { className: "clone-github-repository-content" },
          w.createElement(
            Pd,
            null,
            w.createElement(uw, {
              account: this.props.account,
              selectedItem: this.props.selectedItem,
              onSelectionChanged: this.props.onSelectionChanged,
              loading: this.props.loading,
              repositories: this.props.repositories,
              filterText: this.props.filterText,
              onFilterTextChanged: this.props.onFilterTextChanged,
              onRefreshRepositories: this.props.onRefreshRepositories,
              onItemClicked: this.props.onItemClicked,
            })
          ),
          w.createElement(
            Pd,
            { className: "local-path-field" },
            w.createElement(Md, {
              value: this.props.path,
              label: "本地路径",
              placeholder: "存储库路径",
              onValueChanged: this.props.onPathChanged,
            }),
            w.createElement(
              Ud,
              { onClick: this.props.onChooseDirectory },
              "选择…"
            )
          )
        );
      }
    }
    class dw extends w.Component {
      constructor(e) {
        super(e),
          (this.checkIfCloningDisabled = () => {
            const e = this.getSelectedTabState(),
              { error: t, url: n, path: r } = e,
              { loading: i } = this.state;
            return 0 === n.length || 0 === r.length || i || null !== t;
          }),
          (this.onTabClicked = (e) => {
            this.props.onTabSelected(e);
          }),
          (this.onPathChanged = (e) => {
            this.setSelectedTabState({ path: e }, this.validatePath);
          }),
          (this.signInDotCom = () => {
            this.props.dispatcher.showDotComSignInDialog();
          }),
          (this.signInEnterprise = () => {
            this.props.dispatcher.showEnterpriseSignInDialog();
          }),
          (this.onFilterTextChanged = (e) => {
            this.props.selectedTab !== Ai.Generic &&
              this.setGitHubTabState({ filterText: e }, this.props.selectedTab);
          }),
          (this.onSelectionChanged = (e) => {
            this.props.selectedTab !== Ai.Generic &&
              (this.setGitHubTabState(
                { selectedItem: e },
                this.props.selectedTab
              ),
              this.updateUrl(null === e ? "" : e.clone_url));
          }),
          (this.validatePath = async () => {
            const e = this.getSelectedTabState(),
              { path: t, url: n, error: r } = e,
              { initialPath: i } = this.state;
            if (i === t && "" === n)
              r && this.setSelectedTabState({ error: null });
            else {
              const e = await this.validateEmptyFolder(t);
              this.getSelectedTabState().path === t &&
                this.setSelectedTabState({ error: e, path: t });
            }
          }),
          (this.onChooseDirectory = async () => {
            const e = r.remote.getCurrentWindow(),
              { filePaths: t } = await r.remote.dialog.showOpenDialog(e, {
                properties: ["createDirectory", "openDirectory"],
              });
            if (0 === t.length) return;
            const n = this.getSelectedTabState().lastParsedIdentifier,
              o = n ? i.join(t[0], n.name) : t[0];
            return (
              this.setSelectedTabState(
                { path: o, error: null },
                this.validatePath
              ),
              o
            );
          }),
          (this.updateUrl = async (e) => {
            const t = St(e),
              n = this.getSelectedTabState();
            let r;
            (r = n.lastParsedIdentifier
              ? t
                ? i.join(i.dirname(n.path), t.name)
                : i.dirname(n.path)
              : t
              ? i.join(n.path, t.name)
              : n.path),
              this.setSelectedTabState(
                { url: e, lastParsedIdentifier: t, path: r },
                this.validatePath
              );
          }),
          (this.onItemClicked = (e, t) => {
            "keyboard" === t.kind &&
              "Enter" === t.event.key &&
              !1 === this.checkIfCloningDisabled() &&
              this.clone();
          }),
          (this.clone = async () => {
            this.setState({ loading: !0 });
            const e = await this.resolveCloneURL(),
              { path: t } = this.getSelectedTabState();
            if (!e) {
              const e = new Error(
                "We couldn't find that repository. Check that you are logged in, the network is accessible, and the URL or repository alias are spelled correctly."
              );
              return (
                this.setState({ loading: !1 }),
                void this.setSelectedTabState({ error: e })
              );
            }
            try {
              this.cloneImpl(e.trim(), t);
            } catch (e) {
              log.error("CloneRepository: clone failed to complete to " + t, e),
                this.setState({ loading: !1 }),
                this.setSelectedTabState({ error: e });
            }
          }),
          (this.onWindowFocus = () => {
            this.validatePath();
          });
        const t = Ru(),
          n = {
            error: null,
            lastParsedIdentifier: null,
            path: t,
            url: this.props.initialURL || "",
          };
        this.state = {
          initialPath: t,
          loading: !1,
          dotComTabState: Object.assign(
            { kind: "dotComTabState", filterText: "", selectedItem: null },
            n
          ),
          enterpriseTabState: Object.assign(
            { kind: "enterpriseTabState", filterText: "", selectedItem: null },
            n
          ),
          urlTabState: Object.assign({ kind: "urlTabState" }, n),
        };
      }
      componentDidUpdate(e) {
        e.selectedTab !== this.props.selectedTab && this.validatePath();
      }
      componentDidMount() {
        const e = this.props.initialURL;
        e && this.updateUrl(e),
          window.addEventListener("focus", this.onWindowFocus);
      }
      componentWillUnmount() {
        window.removeEventListener("focus", this.onWindowFocus);
      }
      render() {
        const { error: e } = this.getSelectedTabState();
        return w.createElement(
          sg,
          {
            className: "clone-repository",
            title: "克隆仓库",
            onSubmit: this.clone,
            onDismissed: this.props.onDismissed,
            loading: this.state.loading,
          },
          w.createElement(
            uf,
            {
              onTabClicked: this.onTabClicked,
              selectedIndex: this.props.selectedTab,
            },
            w.createElement("span", null, "GitHub.com"),
            w.createElement("span", null, "GitHub企业服务"),
            w.createElement("span", null, "手动填写URL")
          ),
          e ? w.createElement(ag, null, e.message) : null,
          this.renderActiveTab(),
          this.renderFooter()
        );
      }
      renderFooter() {
        const e = this.props.selectedTab;
        if (e !== Ai.Generic && !this.getAccountForTab(e)) return null;
        const t = this.checkIfCloningDisabled();
        return w.createElement(
          lg,
          null,
          w.createElement(cg, { okButtonText: "克隆", okButtonDisabled: t })
        );
      }
      renderActiveTab() {
        const e = this.props.selectedTab;
        switch (e) {
          case Ai.Generic:
            const t = this.state.urlTabState;
            return w.createElement(sw, {
              path: t.path,
              url: t.url,
              onPathChanged: this.onPathChanged,
              onUrlChanged: this.updateUrl,
              onChooseDirectory: this.onChooseDirectory,
            });
          case Ai.DotCom:
          case Ai.Enterprise: {
            const t = this.getAccountForTab(e);
            if (t) {
              const n = this.props.apiRepositories.get(t),
                r = void 0 === n ? null : n.repositories,
                i = void 0 !== n && n.loading,
                o = this.getGitHubTabState(e);
              return w.createElement(hw, {
                path: o.path,
                account: t,
                selectedItem: o.selectedItem,
                onSelectionChanged: this.onSelectionChanged,
                onPathChanged: this.onPathChanged,
                onChooseDirectory: this.onChooseDirectory,
                repositories: r,
                loading: i,
                onRefreshRepositories: this.props.onRefreshRepositories,
                filterText: o.filterText,
                onFilterTextChanged: this.onFilterTextChanged,
                onItemClicked: this.onItemClicked,
              });
            }
            return w.createElement(ig, null, this.renderSignIn(e));
          }
          default:
            return X(0, "Unknown tab: " + e);
        }
      }
      getAccountForTab(e) {
        switch (e) {
          case Ai.DotCom:
            return this.props.dotComAccount;
          case Ai.Enterprise:
            return this.props.enterpriseAccount;
          default:
            return null;
        }
      }
      getGitHubTabState(e) {
        return e === Ai.DotCom
          ? this.state.dotComTabState
          : e === Ai.Enterprise
          ? this.state.enterpriseTabState
          : X(0, "Unknown tab: " + e);
      }
      getTabState(e) {
        return e === Ai.DotCom
          ? this.state.dotComTabState
          : e === Ai.Enterprise
          ? this.state.enterpriseTabState
          : e === Ai.Generic
          ? this.state.urlTabState
          : X(0, "Unknown tab: " + e);
      }
      getSelectedTabState() {
        return this.getTabState(this.props.selectedTab);
      }
      setSelectedTabState(e, t) {
        this.setTabState(e, this.props.selectedTab, t);
      }
      setTabState(e, t, n) {
        if (t === Ai.DotCom)
          this.setState(
            (t) => ({
              dotComTabState: Object.assign(
                Object.assign({}, t.dotComTabState),
                e
              ),
            }),
            n
          );
        else if (t === Ai.Enterprise)
          this.setState(
            (t) => ({
              enterpriseTabState: Object.assign(
                Object.assign({}, t.enterpriseTabState),
                e
              ),
            }),
            n
          );
        else {
          if (t !== Ai.Generic) return X(0, "Unknown tab: " + t);
          this.setState(
            (t) => ({
              urlTabState: Object.assign(Object.assign({}, t.urlTabState), e),
            }),
            n
          );
        }
      }
      setGitHubTabState(e, t) {
        if (t === Ai.DotCom)
          this.setState((t) => ({ dotComTabState: yi(t.dotComTabState, e) }));
        else {
          if (t !== Ai.Enterprise) return X(0, "Unknown tab: " + t);
          this.setState((t) => ({
            enterpriseTabState: yi(t.enterpriseTabState, e),
          }));
        }
      }
      renderSignIn(e) {
        switch (e) {
          case Ai.DotCom:
            return w.createElement(
              pv,
              { actionTitle: "登录", onAction: this.signInDotCom },
              w.createElement(
                "div",
                null,
                "登录到GitHub.com帐户以访问您的存储库。"
              )
            );
          case Ai.Enterprise:
            return w.createElement(
              pv,
              { actionTitle: "登录", onAction: this.signInEnterprise },
              w.createElement(
                "div",
                null,
                "如果您正在使用GitHub企业服务帐户，请登录该帐户以访问您的存储库。"
              )
            );
          case Ai.Generic:
            return null;
          default:
            return X(0, "Unknown sign in tab: " + e);
        }
      }
      async validateEmptyFolder(e) {
        try {
          return 0 === (await Object(_i.readdir)(e)).length
            ? null
            : new Error(
                "此文件夹包含文件。 Git只能克隆到空文件夹。"
              );
        } catch (e) {
          return "ENOENT" === e.code
            ? null
            : (log.error(
                "CloneRepository: Path validation failed. Error: " + e.message
              ),
              new Error(
                "Unable to read path on disk. Please check the path and try again."
              ));
        }
      }
      async resolveCloneURL() {
        var e;
        const { url: t, lastParsedIdentifier: n } = this.getSelectedTabState(),
          r = new Array();
        this.props.dotComAccount && r.push(this.props.dotComAccount),
          this.props.enterpriseAccount && r.push(this.props.enterpriseAccount);
        const i = await ow(t, r);
        if (null !== n && null !== i) {
          const r = ht.fromAccount(i),
            { owner: o, name: s } = n,
            a = null === (e = bt(t)) || void 0 === e ? void 0 : e.protocol;
          return await r
            .fetchRepositoryCloneUrl(o, s, a)
            .catch(
              (e) => (
                log.error(
                  `Failed to look up canonical clone url for '${t}'`,
                  e
                ),
                t
              )
            );
        }
        return t;
      }
      cloneImpl(e, t) {
        this.props.dispatcher.clone(e, t),
          this.props.onDismissed(),
          Tu(i.resolve(t, ".."));
      }
    }
    function pw(e, t) {
      return e.tip.kind === so.Detached
        ? Ti.Head
        : (t === Ti.UpstreamDefaultBranch &&
            null !== e.upstreamDefaultBranch) ||
          (t === Ti.DefaultBranch && null !== e.defaultBranch) ||
          (t === Ti.CurrentBranch && e.tip.kind === so.Valid) ||
          t === Ti.Head
        ? t
        : e.upstreamDefaultBranch
        ? Ti.UpstreamDefaultBranch
        : e.defaultBranch
        ? Ti.DefaultBranch
        : e.tip.kind === so.Valid
        ? Ti.CurrentBranch
        : Ti.Head;
    }
    class fw extends w.Component {
      constructor(e) {
        super(e),
          (this.onBaseBranchChanged = (e) => {
            this.setState({ startPoint: e });
          }),
          (this.onBranchNameChange = (e) => {
            this.updateBranchName(e);
          }),
          (this.createBranch = async () => {
            const e = this.state.branchName;
            let t = null,
              n = !1;
            const {
              defaultBranch: r,
              upstreamDefaultBranch: i,
              repository: o,
            } = this.props;
            if (this.state.startPoint === Ti.DefaultBranch) {
              if (!r)
                return void this.setState({
                  currentError: new Error(
                    "Could not determine the default branch"
                  ),
                });
              t = r.name;
            }
            if (this.state.startPoint === Ti.UpstreamDefaultBranch) {
              if (!i)
                return void this.setState({
                  currentError: new Error(
                    "Could not determine the default branch"
                  ),
                });
              (t = i.name), (n = !0);
            }
            if (e.length > 0) {
              this.setState({ isCreatingBranch: !0 });
              const r = Ap("create branch", o);
              await this.props.dispatcher.createBranch(o, e, t, n),
                r.done(),
                this.props.onDismissed();
            }
          }),
          (this.renderOptions = (e, t) =>
            w.createElement(
              Pd,
              null,
              w.createElement(bv, {
                label: "创建分支基于…",
                items: e,
                selectedKey: t,
                onSelectionChanged: this.onBaseBranchChanged,
              })
            ));
        const t = pw(e, Ti.UpstreamDefaultBranch);
        this.state = {
          currentError: null,
          branchName: e.initialName,
          startPoint: t,
          isCreatingBranch: !1,
          tipAtCreateStart: e.tip,
          defaultBranchAtCreateStart: gw(t, e),
        };
      }
      componentWillReceiveProps(e) {
        if (
          (this.setState({ startPoint: pw(e, this.state.startPoint) }),
          !this.state.isCreatingBranch)
        ) {
          const t = pw(e, Ti.UpstreamDefaultBranch);
          this.setState({
            tipAtCreateStart: e.tip,
            defaultBranchAtCreateStart: gw(t, e),
          });
        }
      }
      renderBranchSelection() {
        const e = this.state.isCreatingBranch
            ? this.state.tipAtCreateStart
            : this.props.tip,
          t = e.kind;
        if (e.kind === so.Detached)
          return w.createElement(
            "p",
            null,
            "You do not currently have any branch checked out (your HEAD reference is detached). As such your new branch will be based on your currently checked out commit (",
            e.currentSha.substr(0, 7),
            ")."
          );
        if (e.kind === so.Unborn)
          return w.createElement(
            "p",
            null,
            "Your current branch is unborn (does not contain any commits). Creating a new branch will rename the current branch."
          );
        if (e.kind === so.Valid) {
          if (
            null !== this.props.upstreamGitHubRepository &&
            null !== this.props.upstreamDefaultBranch
          )
            return this.renderForkBranchSelection(
              e.branch.name,
              this.props.upstreamDefaultBranch,
              this.props.upstreamGitHubRepository.fullName
            );
          const t = this.state.isCreatingBranch
            ? this.props.defaultBranch
            : this.state.defaultBranchAtCreateStart;
          return this.renderRegularBranchSelection(e.branch.name, t);
        }
        return X(0, "Unknown tip kind " + t);
      }
      render() {
        const e =
            this.state.branchName.length <= 0 ||
            !!this.state.currentError ||
            /^\s*$/.test(this.state.branchName),
          t = this.state.currentError;
        return w.createElement(
          sg,
          {
            id: "create-branch",
            title: "创建分支",
            onSubmit: this.createBranch,
            onDismissed: this.props.onDismissed,
            loading: this.state.isCreatingBranch,
            disabled: this.state.isCreatingBranch,
          },
          t ? w.createElement(ag, null, t.message) : null,
          w.createElement(
            ig,
            null,
            w.createElement(my, {
              label: "分支名",
              initialValue: this.props.initialName,
              onValueChange: this.onBranchNameChange,
            }),
            ((n = this.state.branchName),
            !1 ==
            this.props.allBranches.findIndex(
              (e) => e.nameWithoutRemote === n && e.type === Ri.Remote
            ) >
              -1
              ? null
              : w.createElement(
                  Pd,
                  { className: "warning-helper-text" },
                  w.createElement(vh, { symbol: wh.alert }),
                  w.createElement(
                    "p",
                    null,
                    "A branch named ",
                    w.createElement(Om, null, n),
                    " already exists on the remote."
                  )
                )),
            this.renderBranchSelection()
          ),
          w.createElement(
            lg,
            null,
            w.createElement(cg, {
              okButtonText: "创建分支",
              okButtonDisabled: e,
            })
          )
        );
        var n;
      }
      updateBranchName(e) {
        const t =
          this.props.allBranches.findIndex((t) => t.name === e) > -1
            ? new Error(`A branch named ${e} already exists`)
            : null;
        this.setState({ branchName: e, currentError: t });
      }
      renderRegularBranchSelection(e, t) {
        if (null === t || t.name === e)
          return w.createElement(
            "p",
            null,
            "您的新分支将基于您当前签出的分支 (",
            w.createElement(Om, null, e),
            "). ",
            w.createElement(Om, null, e),
            " 是您存储库的 ",
            mw,
            " "
          );
        {
          const n = [
              {
                title: t.name,
                description:
                  "您存储库中的默认分支。选择此分支以开启一个不依赖于当前分支的新项目。",
                key: Ti.DefaultBranch,
              },
              {
                title: e,
                description:
                  "当前签出的分支。如果您需要在此分支基础上完成工作，请选择此选项。",
                key: Ti.CurrentBranch,
              },
            ],
            r =
              this.state.startPoint === Ti.DefaultBranch
                ? this.state.startPoint
                : Ti.CurrentBranch;
          return this.renderOptions(n, r);
        }
      }
      renderForkBranchSelection(e, t, n) {
        if (e === t.nameWithoutRemote)
          return w.createElement(
            "p",
            null,
            "Your new branch will be based on",
            " ",
            w.createElement("strong", null, n),
            "'s ",
            mw,
            " (",
            w.createElement(Om, null, t.nameWithoutRemote),
            ")."
          );
        {
          const n = [
              {
                title: t.name,
                description:
                  "The default branch of the upstream repository. Pick this to start on something new that's not dependent on your current branch.",
                key: Ti.UpstreamDefaultBranch,
              },
              {
                title: e,
                description:
                  "The currently checked out branch. Pick this if you need to build on work done on this branch.",
                key: Ti.CurrentBranch,
              },
            ],
            r =
              this.state.startPoint === Ti.UpstreamDefaultBranch
                ? this.state.startPoint
                : Ti.CurrentBranch;
          return this.renderOptions(n, r);
        }
      }
    }
    const mw = w.createElement(
      _d,
      { uri: "https://help.github.com/articles/setting-the-default-branch/" },
      "默认分支"
    );
    function gw(e, t) {
      return e === Ti.UpstreamDefaultBranch
        ? t.upstreamDefaultBranch
        : e === Ti.DefaultBranch
        ? t.defaultBranch
        : null;
    }
    class yw extends w.Component {
      constructor(e) {
        super(e),
          (this.onSubmit = () => {
            const e = this.props.signInState;
            if (!e) return;
            const t = e.kind;
            switch (e.kind) {
              case Ku.EndpointEntry:
                this.props.dispatcher.setSignInEndpoint(this.state.endpoint);
                break;
              case Ku.Authentication:
                e.supportsBasicAuth
                  ? this.props.dispatcher.setSignInCredentials(
                      this.state.username,
                      this.state.password
                    )
                  : this.props.dispatcher.requestBrowserAuthentication();
                break;
              case Ku.TwoFactorAuthentication:
                this.props.dispatcher.setSignInOTP(this.state.otpToken);
                break;
              case Ku.Success:
                this.onDismissed();
                break;
              default:
                X(0, "Unknown sign in step " + t);
            }
          }),
          (this.onEndpointChanged = (e) => {
            this.setState({ endpoint: e });
          }),
          (this.onUsernameChanged = (e) => {
            this.setState({ username: e });
          }),
          (this.onPasswordChanged = (e) => {
            this.setState({ password: e });
          }),
          (this.onOTPTokenChanged = (e) => {
            this.setState({ otpToken: e });
          }),
          (this.onSignInWithBrowser = () => {
            this.props.dispatcher.requestBrowserAuthentication();
          }),
          (this.onDismissed = () => {
            this.props.dispatcher.resetSignInState(), this.props.onDismissed();
          }),
          (this.state = {
            endpoint: "",
            username: "",
            password: "",
            otpToken: "",
          });
      }
      componentWillReceiveProps(e) {
        e.signInState !== this.props.signInState &&
          e.signInState &&
          e.signInState.kind === Ku.Success &&
          this.onDismissed();
      }
      renderFooter() {
        const e = this.props.signInState;
        if (!e || e.kind === Ku.Success) return null;
        let t,
          n = !1;
        const r = e.kind;
        switch (e.kind) {
          case Ku.EndpointEntry:
            (n = 0 === this.state.endpoint.length), (t = "继续");
            break;
          case Ku.TwoFactorAuthentication:
            (n = !/\S+/.test(this.state.otpToken)), (t = "Sign in");
            break;
          case Ku.Authentication:
            if (e.supportsBasicAuth) {
              const e = this.state.username.length > 0,
                r = this.state.password.length > 0;
              (n = !e || !r), (t = "Sign in");
            } else t = "在浏览器中登录";
            break;
          default:
            return X(0, "Unknown sign in step " + r);
        }
        return w.createElement(
          lg,
          null,
          w.createElement(cg, { okButtonText: t, okButtonDisabled: n })
        );
      }
      renderEndpointEntryStep(e) {
        return w.createElement(
          ig,
          null,
          w.createElement(
            Pd,
            null,
            w.createElement(Md, {
              label: "企业服务地址",
              value: this.state.endpoint,
              onValueChanged: this.onEndpointChanged,
              placeholder: "https://github.example.com",
            })
          )
        );
      }
      renderAuthenticationStep(e) {
        if (!e.supportsBasicAuth)
          return e.endpoint === gt()
            ? w.createElement(
                ig,
                null,
                w.createElement(
                  "p",
                  null,
                  "为了提高您帐户的安全性，GitHub现在要求您通过浏览器登录。"
                ),
                w.createElement(
                  "p",
                  null,
                  "一旦你登录后，你的浏览器会将你重定向回 GitHub 桌面。如果你的浏览器需要你的许可才能启动 GitHub 桌面，请允许它。"
                )
              )
            : w.createElement(
                ig,
                null,
                w.createElement(
                  "p",
                  null,
                  "Your GitHub Enterprise Server instance requires you to sign in with your browser."
                )
              );
        const t = e.loading;
        return w.createElement(
          ig,
          null,
          w.createElement(
            Pd,
            { className: "sign-in-with-browser" },
            w.createElement(
              Ud,
              {
                className: "button-with-icon button-component-primary",
                onClick: this.onSignInWithBrowser,
                disabled: t,
              },
              "使用浏览器登录",
              w.createElement(vh, { symbol: wh.linkExternal })
            )
          ),
          w.createElement(
            "div",
            { className: "horizontal-rule" },
            w.createElement(
              "span",
              { className: "horizontal-rule-content" },
              "or"
            )
          ),
          w.createElement(
            Pd,
            null,
            w.createElement(Md, {
              label: "Username or email address",
              value: this.state.username,
              onValueChanged: this.onUsernameChanged,
            })
          ),
          w.createElement(
            Pd,
            null,
            w.createElement(Md, {
              label: "Password",
              value: this.state.password,
              type: "password",
              onValueChanged: this.onPasswordChanged,
            })
          ),
          w.createElement(
            Pd,
            null,
            w.createElement(
              _d,
              {
                className: "forgot-password-link-sign-in",
                uri: e.forgotPasswordUrl,
              },
              "Forgot password?"
            )
          )
        );
      }
      renderTwoFactorAuthenticationStep(e) {
        return w.createElement(
          ig,
          null,
          w.createElement("p", null, Ke(e.type)),
          w.createElement(
            Pd,
            null,
            w.createElement(Md, {
              label: "Authentication code",
              value: this.state.otpToken,
              onValueChanged: this.onOTPTokenChanged,
              labelLinkText: "What's this?",
              labelLinkUri:
                "https://help.github.com/articles/providing-your-2fa-authentication-code/",
              autoFocus: !0,
            })
          )
        );
      }
      renderStep() {
        const e = this.props.signInState;
        if (!e) return null;
        const t = e.kind;
        switch (e.kind) {
          case Ku.EndpointEntry:
            return this.renderEndpointEntryStep(e);
          case Ku.Authentication:
            return this.renderAuthenticationStep(e);
          case Ku.TwoFactorAuthentication:
            return this.renderTwoFactorAuthenticationStep(e);
          case Ku.Success:
            return null;
          default:
            return X(0, "Unknown sign in step " + t);
        }
      }
      render() {
        const e = this.props.signInState;
        if (!e || e.kind === Ku.Success) return null;
        const t = e.loading,
          n = e.error ? w.createElement(ag, null, e.error.message) : null,
          r =
            this.props.signInState &&
            this.props.signInState.kind === Ku.Authentication &&
            !this.props.signInState.supportsBasicAuth
              ? "使用浏览器登录"
              : "登录";
        return w.createElement(
          sg,
          {
            id: "sign-in",
            title: r,
            disabled: t,
            onDismissed: this.onDismissed,
            onSubmit: this.onSubmit,
            loading: e.loading,
          },
          n,
          this.renderStep(),
          this.renderFooter()
        );
      }
    }
    class vw extends w.Component {
      constructor(e) {
        super(e),
          (this.onSubmit = () => {
            this.props.onOpenShell(this.props.path), this.props.onDismissed();
          }),
          (this.onExternalLink = (e) => {
            te.openExternal(
              "https://help.github.com/articles/set-up-git/#setting-up-git"
            );
          });
      }
      render() {
        return w.createElement(
          sg,
          {
            id: "install-git",
            type: "warning",
            title: "Unable to locate Git",
            onSubmit: this.onSubmit,
            onDismissed: this.props.onDismissed,
          },
          w.createElement(
            ig,
            null,
            w.createElement(
              "p",
              null,
              "We were unable to locate Git on your system. This means you won't be able to execute any Git commands in the",
              " ",
              "command prompt",
              "."
            ),
            w.createElement(
              "p",
              null,
              "To help you get Git installed and configured for your operating system, we have some external resources available."
            )
          ),
          w.createElement(
            lg,
            null,
            w.createElement(cg, {
              okButtonText: "Open without Git",
              cancelButtonText: "Install Git",
              onCancelButtonClick: this.onExternalLink,
            })
          )
        );
      }
    }
    class ww extends w.Component {
      constructor(e) {
        super(e),
          (this.onExternalLink = () => {
            te.openExternal("https://atom.io/");
          }),
          (this.onShowPreferencesDialog = (e) => {
            e.preventDefault(),
              this.props.onDismissed(),
              this.props.showPreferencesDialog();
          });
      }
      renderFooter() {
        const { viewPreferences: e, suggestAtom: t } = this.props;
        return e
          ? w.createElement(
              lg,
              null,
              w.createElement(cg, {
                okButtonText: "Close",
                cancelButtonText: "Open options",
                onCancelButtonClick: this.onShowPreferencesDialog,
              })
            )
          : t
          ? w.createElement(
              lg,
              null,
              w.createElement(cg, {
                okButtonText: "Close",
                cancelButtonText: "Download Atom",
                onCancelButtonClick: this.onExternalLink,
              })
            )
          : w.createElement(ug, null);
      }
      render() {
        return w.createElement(
          sg,
          {
            id: "external-editor-error",
            type: "error",
            title: "Unable to open external editor",
            onSubmit: this.props.onDismissed,
            onDismissed: this.props.onDismissed,
          },
          w.createElement(
            ig,
            null,
            w.createElement("p", null, this.props.message)
          ),
          this.renderFooter()
        );
      }
    }
    const bw = _c(__dirname, "static/logo-64x64@2x.png");
    class Sw extends w.Component {
      constructor(e) {
        super(e),
          (this.updateStoreEventHandle = null),
          (this.onUpdateStateChanged = (e) => {
            this.setState({ updateState: e });
          }),
          (this.onQuitAndInstall = () => {
            De.quitAndInstallUpdate();
          }),
          (this.state = { updateState: De.state });
      }
      componentDidMount() {
        (this.updateStoreEventHandle = De.onDidChange(
          this.onUpdateStateChanged
        )),
          this.setState({ updateState: De.state });
      }
      componentWillUnmount() {
        this.updateStoreEventHandle &&
          (this.updateStoreEventHandle.dispose(),
          (this.updateStoreEventHandle = null));
      }
      renderUpdateButton() {
      }
      renderCheckingForUpdate() {
      }
      renderUpdateAvailable() {
      }
      renderUpdateNotAvailable() {
      }
      renderUpdateReady() {
      }
      renderUpdateDetails() {
      }
      renderUpdateErrors() {
      }
      render() {
        const e = this.props.applicationName,
          t = this.props.applicationVersion,
          n = w.createElement(_d, { uri: sv }, "发行说明"),
          r = "Version " + t;
        return w.createElement(
          sg,
          {
            id: "about",
            onSubmit: this.props.onDismissed,
            onDismissed: this.props.onDismissed,
          },
          this.renderUpdateErrors(),
          w.createElement(
            ig,
            null,
            w.createElement(
              Pd,
              { className: "logo" },
              w.createElement("img", {
                src: bw,
                alt: "GitHub Desktop",
                width: "64",
                height: "64",
              })
            ),
            w.createElement("h2", null, e),
            w.createElement(
              "p",
              { className: "no-padding" },
              w.createElement("span", { className: "selectable-text" }, r),
              " (",
              n,
              ")"
            ),
            w.createElement(
              "p",
              { className: "no-padding" },
              w.createElement(
                _d,
                { onClick: this.props.onShowTermsAndConditions },
                "条款及细则"
              )
            ),
            w.createElement(
              "p",
              null,
              w.createElement(
                _d,
                { onClick: this.props.onShowAcknowledgements },
                "许可和开源声明"
              )
            ),
            this.renderUpdateDetails(),
            this.renderUpdateButton()
          ),
          w.createElement(ug, null)
        );
      }
    }
    class Cw extends w.Component {
      constructor(e) {
        super(e),
          (this.onNameChange = (e) => {
            (this.name = e), (e = Kv(e)), this.updateSettings({ name: e });
          }),
          (this.onDescriptionChange = (e) => {
            this.updateSettings({ description: e });
          }),
          (this.onPrivateChange = (e) => {
            this.updateSettings({ private: e.currentTarget.checked });
          }),
          (this.onOrgChange = (e) => {
            const { settings: t } = this.props,
              n = e.currentTarget.value,
              r = parseInt(n, 10);
            let i;
            if (r < 0 || isNaN(r))
              i = Object.assign(Object.assign({}, t), { org: null });
            else {
              const e = this.state.orgs[r];
              i = Object.assign(Object.assign({}, t), { org: e });
            }
            this.props.onSettingsChanged(i);
          }),
          (this.state = { orgs: [] }),
          (this.name = e.settings.name);
      }
      async componentWillMount() {
        this.fetchOrgs(this.props.account);
      }
      componentWillReceiveProps(e) {
        this.props.account !== e.account &&
          (this.setState({ orgs: [] }), this.fetchOrgs(e.account));
      }
      async fetchOrgs(e) {
        const t = ht.fromAccount(e),
          n = [...(await t.fetchOrgs())];
        n.sort((e, t) => xt(e.login, t.login)), this.setState({ orgs: n });
      }
      updateSettings(e) {
        const t = yi(this.props.settings, e);
        this.props.onSettingsChanged(t);
      }
      renderOrgs() {
        if (0 === this.state.orgs.length) return null;
        const e = new Array();
        e.push(w.createElement("option", { value: -1, key: -1 }, "None"));
        let t = -1;
        const n = this.props.settings.org;
        for (const [r, i] of this.state.orgs.entries())
          n && n.id === i.id && (t = r),
            e.push(w.createElement("option", { value: r, key: r }, i.login));
        return w.createElement(
          Ev,
          {
            label: "Organization",
            value: t.toString(),
            onChange: this.onOrgChange,
          },
          e
        );
      }
      render() {
        return w.createElement(
          ig,
          null,
          w.createElement(
            Pd,
            null,
            w.createElement(Md, {
              label: "Name",
              value: this.name,
              onValueChanged: this.onNameChange,
            })
          ),
          this.renderSanitizedName(),
          w.createElement(
            Pd,
            null,
            w.createElement(Md, {
              label: "Description",
              value: this.props.settings.description,
              onValueChanged: this.onDescriptionChange,
            })
          ),
          w.createElement(
            Pd,
            null,
            w.createElement(
              "label",
              null,
              w.createElement("input", {
                type: "checkbox",
                checked: this.props.settings.private,
                onChange: this.onPrivateChange,
              }),
              "Keep this code private"
            )
          ),
          this.renderOrgs()
        );
      }
      renderSanitizedName() {
        const e = this.props.settings.name;
        return this.name === e
          ? null
          : w.createElement(
              Pd,
              { className: "warning-helper-text" },
              w.createElement(vh, { symbol: wh.alert }),
              "Will be created as ",
              e
            );
      }
    }
    var Ew, kw;
    !(function (e) {
      (e[(e.enterprise = 0)] = "enterprise"), (e[(e.dotcom = 1)] = "dotcom");
    })(Ew || (Ew = {})),
      (function (e) {
        (e[(e.DotCom = 0)] = "DotCom"), (e[(e.Enterprise = 1)] = "Enterprise");
      })(kw || (kw = {}));
    class xw extends w.Component {
      constructor(e) {
        super(e),
          (this.onSettingsChanged = (e) => {
            let t;
            (t =
              e.kind === Ew.enterprise
                ? {
                    kind: "enterprise",
                    settings: e,
                    error: this.state.enterpriseTabState.error,
                  }
                : {
                    kind: "dotcom",
                    settings: e,
                    error: this.state.dotcomTabState.error,
                  }),
              this.setTabState(t);
          }),
          (this.signInDotCom = () => {
            this.props.dispatcher.showDotComSignInDialog();
          }),
          (this.signInEnterprise = () => {
            this.props.dispatcher.showEnterpriseSignInDialog();
          }),
          (this.publishRepository = async () => {
            const e = this.getCurrentTabState();
            this.setCurrentTabError(null), this.setState({ publishing: !0 });
            const t = this.state.currentTab,
              n = this.getAccountForTab(t);
            n || Z("Tried to publish with no user. That seems impossible!");
            const r = e.settings,
              { org: i } = e.settings;
            try {
              await this.props.dispatcher.publishRepository(
                this.props.repository,
                r.name,
                r.description,
                r.private,
                n,
                i
              ),
                this.props.onDismissed();
            } catch (e) {
              this.setCurrentTabError(e), this.setState({ publishing: !1 });
            }
          }),
          (this.onTabClicked = (e) => {
            e !== this.state.currentTab && this.setState({ currentTab: e });
          }),
          (this.getCurrentTabState = () =>
            this.state.currentTab === kw.DotCom
              ? this.state.dotcomTabState
              : this.state.enterpriseTabState),
          (this.setTabState = (e) => {
            "enterprise" === e.kind
              ? this.setState({ enterpriseTabState: e })
              : this.setState({ dotcomTabState: e });
          }),
          (this.setCurrentTabSettings = (e) => {
            if (e.kind === Ew.enterprise) {
              const t = Object.assign(
                Object.assign({}, this.state.enterpriseTabState),
                { settings: e }
              );
              this.setTabState(t);
            } else {
              const t = Object.assign(
                Object.assign({}, this.state.dotcomTabState),
                { settings: e }
              );
              this.setTabState(t);
            }
          }),
          (this.setCurrentTabError = (e) => {
            this.setTabState(
              Object.assign(Object.assign({}, this.getCurrentTabState()), {
                error: e,
              })
            );
          });
        const t = this.getAccountForTab(kw.DotCom),
          n = this.getAccountForTab(kw.Enterprise);
        let r = kw.DotCom;
        !t && n && (r = kw.Enterprise);
        const i = { name: e.repository.name, description: "", private: !0 },
          o = {
            kind: "dotcom",
            settings: Object.assign(Object.assign({}, i), {
              kind: Ew.dotcom,
              org: null,
            }),
            error: null,
          },
          s = {
            kind: "enterprise",
            settings: Object.assign(Object.assign({}, i), {
              kind: Ew.enterprise,
              org: null,
            }),
            error: null,
          };
        this.state = {
          currentTab: r,
          dotcomTabState: o,
          enterpriseTabState: s,
          publishing: !1,
        };
      }
      render() {
        const e = this.getCurrentTabState();
        return w.createElement(
          sg,
          {
            id: "publish-repository",
            title: "发布存储库",
            onDismissed: this.props.onDismissed,
            onSubmit: this.publishRepository,
            disabled: this.state.publishing,
            loading: this.state.publishing,
          },
          w.createElement(
            uf,
            {
              onTabClicked: this.onTabClicked,
              selectedIndex: this.state.currentTab,
            },
            w.createElement("span", null, "GitHub.com"),
            w.createElement("span", null, "GitHub 企业服务")
          ),
          e.error ? w.createElement(ag, null, e.error.message) : null,
          this.renderContent(),
          this.renderFooter()
        );
      }
      async componentDidMount() {
        const e = this.getCurrentTabState();
        try {
          const t = await (async function (e) {
              const t = i.join(e, ".git/description");
              try {
                const e = await _i.readFile(t, "utf8");
                return "Unnamed repository; edit this file 'description' to name the repository.\n" ===
                  e
                  ? ""
                  : e;
              } catch (e) {
                return "";
              }
            })(this.props.repository.path),
            n = Object.assign(Object.assign({}, e.settings), {
              description: t,
            });
          this.setCurrentTabSettings(n);
        } catch (e) {
          log.warn("Couldn't get the repository's description", e);
        }
      }
      renderContent() {
        const e = this.state.currentTab,
          t = this.getCurrentTabState(),
          n = this.getAccountForTab(e);
        return n
          ? w.createElement(Cw, {
              account: n,
              settings: t.settings,
              onSettingsChanged: this.onSettingsChanged,
            })
          : w.createElement(ig, null, this.renderSignInTab(e));
      }
      getAccountForTab(e) {
        const t = this.props.accounts;
        switch (e) {
          case kw.DotCom:
            return t.find((e) => e.endpoint === gt()) || null;
          case kw.Enterprise:
            return t.find((e) => e.endpoint !== gt()) || null;
          default:
            return X(0, "Unknown tab: " + e);
        }
      }
      renderSignInTab(e) {
        switch (e) {
          case kw.DotCom:
            return w.createElement(
              pv,
              { actionTitle: "登录", onAction: this.signInDotCom },
              w.createElement(
                "div",
                null,
                "登录到GitHub.com帐户以访问您的存储库。"
              )
            );
          case kw.Enterprise:
            return w.createElement(
              pv,
              { actionTitle: "登录", onAction: this.signInEnterprise },
              w.createElement(
                "div",
                null,
                "如果您正在使用GitHub 企业服务帐户，请登录该帐户以访问您的存储库。"
              )
            );
          default:
            return X(0, "Unknown tab: " + e);
        }
      }
      renderFooter() {
        const e = !this.getCurrentTabState().settings.name.length,
          t = this.state.currentTab;
        return this.getAccountForTab(t)
          ? w.createElement(
              lg,
              null,
              w.createElement(cg, {
                okButtonText: "Publish repository",
                okButtonDisabled: e,
              })
            )
          : null;
      }
    }
    class Rw extends w.Component {
      constructor(e) {
        super(e), (this.state = { licenses: null });
      }
      componentDidMount() {
        const e = i.join(ze(), "static", "licenses.json");
        o.readFile(e, "utf8", (e, t) => {
          if (e) return void log.error("Error loading licenses", e);
          const n = JSON.parse(t);
          n
            ? this.setState({ licenses: n })
            : log.warn("Couldn't parse licenses!");
        });
      }
      renderLicenses(e) {
        const t = [];
        for (const [n, r] of Object.keys(e).sort().entries()) {
          if (0 === n) continue;
          const i = e[r],
            o = i.repository;
          let s, a;
          if (o) {
            const e = Tw(o);
            s = w.createElement(_d, { uri: e }, r);
          } else s = r;
          a = i.sourceText
            ? i.sourceText
            : i.license
            ? "License: " + i.license
            : "Unknown license";
          const l = w.createElement("h2", { key: r + "-header" }, s),
            c = w.createElement(
              "p",
              { key: r + "-text", className: "license-text" },
              a
            );
          t.push(l, c);
        }
        return t;
      }
      render() {
        const e = this.state.licenses;
        let t = null;
        if (e) {
          const n = e["desktop@" + this.props.applicationVersion];
          t = w.createElement("p", { className: "license-text" }, n.sourceText);
        }
        return w.createElement(
          sg,
          {
            id: "acknowledgements",
            title: "License and Open Source Notices",
            onSubmit: this.props.onDismissed,
            onDismissed: this.props.onDismissed,
          },
          w.createElement(
            ig,
            null,
            w.createElement(
              "p",
              null,
              w.createElement(
                _d,
                { uri: "https://desktop.github.com" },
                "GitHub Desktop"
              ),
              " is an open source project published under the MIT License. You can view the source code and contribute to this project on",
              " ",
              w.createElement(
                _d,
                { uri: "https://github.com/desktop/desktop" },
                "GitHub"
              ),
              "."
            ),
            t,
            w.createElement(
              "p",
              null,
              "GitHub Desktop also distributes these libraries:"
            ),
            e ? this.renderLicenses(e) : w.createElement(cp, null)
          ),
          w.createElement(ug, null)
        );
      }
    }
    function Tw(e) {
      let t = e;
      return (
        (t = t.replace("git+https://github.com", "https://github.com")),
        (t = t.replace("git+ssh://git@github.com", "https://github.com")),
        t
      );
    }
    class Dw extends w.Component {
      constructor() {
        super(...arguments),
          (this.onContinue = () => {
            this.props.onDismissed(),
              this.props.onContinue(this.props.certificate);
          });
      }
      render() {
        const e = _e.parse(this.props.url).hostname;
        return w.createElement(
          sg,
          {
            title: "Untrusted server",
            onDismissed: this.props.onDismissed,
            onSubmit: this.onContinue,
            type: "error",
          },
          w.createElement(
            ig,
            null,
            w.createElement(
              "p",
              null,
              "GitHub Desktop cannot verify the identity of ",
              e,
              ". The certificate (",
              this.props.certificate.subjectName,
              ") is invalid or untrusted.",
              " ",
              w.createElement(
                "strong",
                null,
                "This may indicate attackers are trying to steal your data."
              )
            ),
            w.createElement(
              "p",
              null,
              "In some cases, this may be expected. For example:"
            ),
            w.createElement(
              "ul",
              null,
              w.createElement(
                "li",
                null,
                "If this is a GitHub Enterprise Server trial."
              ),
              w.createElement(
                "li",
                null,
                "If your GitHub Enterprise Server instance is run on an unusual top-level domain."
              )
            ),
            w.createElement(
              "p",
              null,
              "If you are unsure of what to do, cancel and contact your system administrator."
            )
          ),
          w.createElement(
            lg,
            null,
            w.createElement(cg, {
              destructive: !0,
              okButtonText: "Add certificate",
            })
          )
        );
      }
    }
    var Aw;
    !(function (e) {
      (e[(e.dotCom = 0)] = "dotCom"), (e[(e.enterprise = 1)] = "enterprise");
    })(Aw || (Aw = {}));
    class _w extends w.Component {
      constructor(e) {
        super(e),
          (this.onItemClicked = (e, t) => {
            "keyboard" === t.kind &&
              "Enter" === t.event.key &&
              this.onCloneSelectedRepository();
          }),
          (this.onCloneSelectedRepository = () => {
            const e = this.getSelectedAccount();
            if (null === e) return;
            const t = this.getSelectedItemForAccount(e);
            null !== t && this.props.onClone(t.clone_url);
          }),
          (this.onSelectionChanged = (e) => {
            const t = this.getSelectedAccount();
            t === this.props.dotComAccount
              ? this.setState({ selectedDotComRepository: e })
              : t === this.props.enterpriseAccount &&
                this.setState({ selectedEnterpriseRepository: e });
          }),
          (this.onFilterTextChanged = (e) => {
            const t = this.getSelectedAccount();
            t === this.props.dotComAccount
              ? this.setState({ dotComFilterText: e })
              : t === this.props.enterpriseAccount &&
                this.setState({ enterpriseFilterText: e });
          }),
          (this.onTabClicked = (e) => {
            0 === e
              ? this.setState({ selectedTab: Aw.dotCom })
              : 1 === e && this.setState({ selectedTab: Aw.enterprise });
          }),
          (this.onShowClone = () => this.props.onClone()),
          (this.state = {
            selectedTab: Aw.dotCom,
            dotComFilterText: "",
            enterpriseFilterText: "",
            selectedDotComRepository: null,
            selectedEnterpriseRepository: null,
          });
      }
      render() {
        return w.createElement(
          Gd,
          { id: "no-repositories" },
          w.createElement(
            "header",
            null,
            w.createElement("h1", null, "让我们开始吧！"),
            w.createElement("webview", {
              src:"https://www.teambition.com"
            }),
            w.createElement(
              "p",
              null,
              "将存储库添加到GitHub桌面版以开始协作"
            )
          ),
          w.createElement(
            "div",
            { className: "content" },
            this.renderGetStartedActions(),
            this.renderRepositoryList()
          ),
          w.createElement("img", {
            className: "no-repositories-graphic-top",
            src: $y,
          }),
          w.createElement("img", {
            className: "no-repositories-graphic-bottom",
            src: qy,
          })
        );
      }
      componentDidMount() {

        this.ensureRepositoriesForAccount(this.getSelectedAccount());
      }
      componentDidUpdate(e, t) {
        (e.dotComAccount === this.props.dotComAccount &&
          e.enterpriseAccount === this.props.enterpriseAccount &&
          t.selectedTab === this.state.selectedTab) ||
          this.ensureRepositoriesForAccount(this.getSelectedAccount());
      }
      ensureRepositoriesForAccount(e) {
        if (null !== e) {
          void 0 === this.props.apiRepositories.get(e) &&
            this.props.onRefreshRepositories(e);
        }
      }
      getSelectedAccount() {
        const { selectedTab: e } = this.state;
        return e === Aw.dotCom
          ? this.props.dotComAccount || this.props.enterpriseAccount
          : e === Aw.enterprise
          ? this.props.enterpriseAccount || this.props.dotComAccount
          : X(0, "Unknown account tab " + e);
      }
      renderRepositoryList() {
        const e = this.getSelectedAccount();
        if (null === e) return null;
        const t = this.props.apiRepositories.get(e);
        return w.createElement(
          "div",
          { className: "content-pane repository-list" },
          this.renderAccountsTabBar(),
          this.renderAccountRepositoryList(e, t)
        );
      }
      getSelectedItemForAccount(e) {
        return e === this.props.dotComAccount
          ? this.state.selectedDotComRepository
          : this.state.selectedEnterpriseRepository;
      }
      renderAccountRepositoryList(e, t) {
        const n = void 0 === t || t.loading,
          r = void 0 === t ? null : t.repositories,
          i = this.getSelectedItemForAccount(e),
          o =
            e === this.props.dotComAccount
              ? this.state.dotComFilterText
              : this.state.enterpriseFilterText;
        return w.createElement(
          w.Fragment,
          null,
          w.createElement(uw, {
            account: e,
            selectedItem: i,
            filterText: o,
            onRefreshRepositories: this.props.onRefreshRepositories,
            loading: n,
            repositories: r,
            onSelectionChanged: this.onSelectionChanged,
            onFilterTextChanged: this.onFilterTextChanged,
            onItemClicked: this.onItemClicked,
          }),
          this.renderCloneSelectedRepositoryButton(i)
        );
      }
      renderCloneSelectedRepositoryButton(e) {
        return null === e
          ? null
          : w.createElement(
              Ud,
              {
                type: "submit",
                className: "clone-selected-repository",
                onClick: this.onCloneSelectedRepository,
              },
              "Clone",
              " ",
              w.createElement("strong", null, e.owner.login, "/", e.name)
            );
      }
      renderAccountsTabBar() {
        if (
          null === this.props.dotComAccount ||
          null === this.props.enterpriseAccount
        )
          return null;
        const e =
          this.getSelectedAccount() === this.props.dotComAccount ? 0 : 1;
        return w.createElement(
          uf,
          { selectedIndex: e, onTabClicked: this.onTabClicked },
          w.createElement("span", null, "GitHub.com"),
          w.createElement("span", null, "GitHub Enterprise Server")
        );
      }
      renderButtonGroupButton(e, t, n, r) {
        return w.createElement(
          "li",
          null,
          w.createElement(
            Ud,
            { onClick: n, type: r },
            w.createElement(vh, { symbol: e }),
            w.createElement("div", null, t)
          )
        );
      }
      renderTutorialRepositoryButton() {
        return null === this.props.dotComAccount &&
          null === this.props.enterpriseAccount
          ? null
          : this.props.tutorialPaused
          ? this.renderButtonGroupButton(
              wh.mortarBoard,
              "Return to in progress tutorial",
              this.props.onResumeTutorialRepository,
              "submit"
            )
          : this.renderButtonGroupButton(
              wh.mortarBoard,
              "创建一个用于教程的存储库…",
              this.props.onCreateTutorialRepository,
              "submit"
            );
      }
      renderCloneButton() {
        return this.renderButtonGroupButton(
          wh.repoClone,
          "克隆一个在线存储库…",
          this.onShowClone
        );
      }
      renderCreateRepositoryButton() {
        return this.renderButtonGroupButton(
          wh.plus,
          "在硬盘上创建一个新的存储库…",
          this.props.onCreate
        );
      }
      renderAddExistingRepositoryButton() {
        return this.renderButtonGroupButton(
          wh.fileDirectory,
          "从硬盘中导入现有的存储库…",
          this.props.onAdd
        );
      }
      renderGetStartedActions() {
        return w.createElement(
          "div",
          { className: "content-pane" },
          w.createElement(
            "ul",
            { className: "button-group" },
            this.renderTutorialRepositoryButton(),
            this.renderCloneButton(),
            this.renderCreateRepositoryButton(),
            this.renderAddExistingRepositoryButton()
          ),
          w.createElement(
            "div",
            { className: "drag-drop-info" },
            w.createElement(vh, { symbol: wh.lightBulb }),
            w.createElement(
              "div",
              null,
              w.createElement("strong", null, "操作提示!"),
              " 你可以拖动已有的存储库目录到这里来导入GitHub客户端"
            )
          )
        );
      }
    }
    class Mw extends w.Component {
      constructor(e) {
        super(e),
          (this.onSubmit = async () => {
            this.setState({ isRemovingRepository: !0 }),
              await this.props.onConfirmation(
                this.props.repository,
                this.state.deleteRepoFromDisk
              ),
              this.props.onDismissed();
          }),
          (this.onConfirmRepositoryDeletion = (e) => {
            const t = e.currentTarget.checked;
            this.setState({ deleteRepoFromDisk: t });
          }),
          (this.state = { deleteRepoFromDisk: !1, isRemovingRepository: !1 });
      }
      render() {
        const e = this.state.isRemovingRepository;
        return w.createElement(
          sg,
          {
            id: "confirm-remove-repository",
            key: "remove-repository-confirmation",
            type: "warning",
            title: "删除存储库",
            dismissable: !e,
            loading: e,
            disabled: e,
            onDismissed: this.props.onDismissed,
            onSubmit: this.onSubmit,
          },
          w.createElement(
            ig,
            null,
            w.createElement(
              "p",
              null,
              '你确定要删除存储库 "',
              this.props.repository.name,
              '"?'
            ),
            w.createElement(
              "p",
              { className: "description" },
              "该存储库将从 GitHub 客户端上移除:",
              w.createElement("br", null),
              w.createElement(Om, null, this.props.repository.path)
            ),
            w.createElement(
              "div",
              null,
              w.createElement(qd, {
                label: "同时将该存储库移动到回收站",
                value: this.state.deleteRepoFromDisk ? $d.On : $d.Off,
                onChange: this.onConfirmRepositoryDeletion,
              })
            )
          ),
          w.createElement(
            lg,
            null,
            w.createElement(cg, { destructive: !0, okButtonText: "移除" })
          )
        );
      }
    }
    const Pw = "https://github.com/contact";
    class Iw extends w.Component {
      render() {
        return w.createElement(
          sg,
          {
            id: "terms-and-conditions",
            title: "GitHub Open Source Applications Terms and Conditions",
            onSubmit: this.props.onDismissed,
            onDismissed: this.props.onDismissed,
          },
          w.createElement(
            ig,
            null,
            w.createElement(
              "p",
              null,
              'These GitHub Open Source Applications Terms and Conditions ("Application Terms") are a legal agreement between you (either as an individual or on behalf of an entity) and GitHub, Inc. regarding your use of GitHub\'s applications, such as GitHub Desktop™ and associated documentation ("Software"). These Application Terms apply to the executable code version of the Software. Source code for the Software is available separately and free of charge under open source software license agreements. If you do not agree to all of the terms in these Application Terms, do not download, install, use, or copy the Software.'
            ),
            w.createElement("h2", null, "Connecting to GitHub"),
            w.createElement(
              "p",
              null,
              'If you configure the Software to work with one or more accounts on the GitHub.com website or with an instance of GitHub Enterprise Server, your use of the Software will also be governed your applicable GitHub.com website Terms of Service and/or the license agreement applicable to your instance of GitHub Enterprise Server ("GitHub Terms").'
            ),
            w.createElement(
              "p",
              null,
              "Any use of the Software that violates your applicable GitHub Terms will also be a violation of these Application Terms."
            ),
            w.createElement("h2", null, "Open Source Licenses and Notices"),
            w.createElement(
              "p",
              null,
              'The open source license for the Software is included in the "Open Source Notices" documentation that is included with the Software. That documentation also includes copies of all applicable open source licenses.'
            ),
            w.createElement(
              "p",
              null,
              "To the extent the terms of the licenses applicable to open source components require GitHub to make an offer to provide source code in connection with the Software, such offer is hereby made, and you may exercise it by contacting GitHub:",
              " ",
              w.createElement(_d, { uri: Pw }, "contact"),
              "."
            ),
            w.createElement(
              "p",
              null,
              "Unless otherwise agreed to in writing with GitHub, your agreement with GitHub will always include, at a minimum, these Application Terms. Open source software licenses for the Software's source code constitute separate written agreements. To the limited extent that the open source software licenses expressly supersede these Application Terms, the open source licenses govern your agreement with GitHub for the use of the Software or specific included components of the Software."
            ),
            w.createElement("h2", null, "GitHub's Logos"),
            w.createElement(
              "p",
              null,
              'The license grant included with the Software is not for GitHub\'s trademarks, which include the Software logo designs. GitHub reserves all trademark and copyright rights in and to all GitHub trademarks. GitHub\'s logos include, for instance, the stylized designs that include "logo" in the file title in the "logos" folder.'
            ),
            w.createElement(
              "p",
              null,
              "The names GitHub, GitHub Desktop, GitHub for Mac, GitHub for Windows, Atom, the Octocat, and related GitHub logos and/or stylized names are trademarks of GitHub. You agree not to display or use these trademarks in any manner without GitHub's prior, written permission, except as allowed by GitHub's Logos and Usage Policy:",
              " ",
              w.createElement(_d, { uri: "https://github.com/logos" }, "logos"),
              "."
            ),
            w.createElement("h2", null, "Privacy"),
            w.createElement(
              "p",
              null,
              "The Software may collect personal information. You may control what information the Software collects in the settings panel. If the Software does collect personal information on GitHub's behalf, GitHub will process that information in accordance with the",
              w.createElement(
                _d,
                {
                  uri:
                    "https://help.github.com/articles/github-privacy-statement/",
                },
                "GitHub Privacy Statement"
              ),
              "."
            ),
            w.createElement("h2", null, "Additional Services"),
            w.createElement("h3", null, "Auto-Update Services"),
            w.createElement(
              "p",
              null,
              'The Software may include an auto-update service ("Service"). If you choose to use the Service or you download Software that automatically enables the Service, GitHub will automatically update the Software when a new version is available.'
            ),
            w.createElement(
              "h3",
              null,
              "Disclaimers and Limitations of Liability"
            ),
            w.createElement(
              "p",
              null,
              'THE SERVICE IS PROVIDED ON AN "AS IS" BASIS, AND NO WARRANTY, EITHER EXPRESS OR IMPLIED, IS GIVEN. YOUR USE OF THE SERVICE IS AT YOUR SOLE RISK. GitHub does not warrant that (i) the Service will meet your specific requirements; (ii) the Service is fully compatible with any particular platform; (iii) your use of the Service will be uninterrupted, timely, secure, or error-free; (iv) the results that may be obtained from the use of the Service will be accurate or reliable; (v) the quality of any products, services, information, or other material purchased or obtained by you through the Service will meet your expectations; or (vi) any errors in the Service will be corrected.'
            ),
            w.createElement(
              "p",
              null,
              "YOU EXPRESSLY UNDERSTAND AND AGREE THAT GITHUB SHALL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES, INCLUDING BUT NOT LIMITED TO, DAMAGES FOR LOSS OF PROFITS, GOODWILL, USE, DATA OR OTHER INTANGIBLE LOSSES (EVEN IF GITHUB HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES) RELATED TO THE SERVICE, including, for example: (i) the use or the inability to use the Service; (ii) the cost of procurement of substitute goods and services resulting from any goods, data, information or services purchased or obtained or messages received or transactions entered into through or from the Service; (iii) unauthorized access to or alteration of your transmissions or data; (iv) statements or conduct of any third-party on the Service; (v) or any other matter relating to the Service."
            ),
            w.createElement(
              "p",
              null,
              "GitHub reserves the right at any time and from time to time to modify or discontinue, temporarily or permanently, the Service (or any part thereof) with or without notice. GitHub shall not be liable to you or to any third-party for any price change, suspension or discontinuance of the Service."
            ),
            w.createElement("h2", null, "Miscellanea"),
            w.createElement(
              "ol",
              null,
              w.createElement(
                "li",
                null,
                "No Waiver. The failure of GitHub to exercise or enforce any right or provision of these Application Terms shall not constitute a waiver of such right or provision."
              ),
              w.createElement(
                "li",
                null,
                "Entire Agreement. These Application Terms, together with any applicable Privacy Notices, constitutes the entire agreement between you and GitHub and governs your use of the Software, superseding any prior agreements between you and GitHub (including, but not limited to, any prior versions of the Application Terms)."
              ),
              w.createElement(
                "li",
                null,
                "Governing Law. You agree that these Application Terms and your use of the Software are governed under California law and any dispute related to the Software must be brought in a tribunal of competent jurisdiction located in or near San Francisco, California."
              ),
              w.createElement(
                "li",
                null,
                'Third-Party Packages. The Software supports third-party "Packages" which may modify, add, remove, or alter the functionality of the Software. These Packages are not covered by these Application Terms and may include their own license which governs your use of that particular package.'
              ),
              w.createElement(
                "li",
                null,
                "No Modifications; Complete Agreement. These Application Terms may only be modified by a written amendment signed by an authorized representative of GitHub, or by the posting by GitHub of a revised version. These Application Terms, together with any applicable Open Source Licenses and Notices and GitHub's Privacy Statement, represent the complete and exclusive statement of the agreement between you and us. These Application Terms supersede any proposal or prior agreement oral or written, and any other communications between you and GitHub relating to the subject matter of these terms."
              ),
              w.createElement(
                "li",
                null,
                "License to GitHub Policies. These Application Terms are licensed under the",
                " ",
                w.createElement(
                  _d,
                  { uri: "https://creativecommons.org/licenses/by/4.0/" },
                  "Creative Commons Attribution license"
                ),
                ". You may use it freely under the terms of the Creative Commons license."
              ),
              w.createElement(
                "li",
                null,
                "Contact Us. Please send any questions about these Application Terms to ",
                w.createElement(_d, { uri: Pw }, "support@github.com"),
                "."
              )
            )
          ),
          w.createElement(ug, null)
        );
      }
    }
    var Ow = n(61);
    const Lw = "/usr/local/bin/github",
      Fw = i.resolve(__dirname, "static", "github.sh");
    async function Nw() {
      if (
        (await (async function () {
          try {
            return await _i.readlink(Lw);
          } catch (e) {
            return null;
          }
        })()) !== Fw
      )
        try {
          await Bw(!1);
        } catch (e) {
          await Bw(!0);
        }
    }
    async function Bw(e) {
      await (function (e) {
        return e
          ? new Promise((e, t) => {
              Ow.unlink(Lw, (n) => {
                null === n
                  ? e()
                  : t(
                      new Error(
                        `Failed to remove file at ${Lw}. Authorization of GitHub Desktop Helper is required.`
                      )
                    );
              });
            })
          : _i.unlink(Lw);
      })(e),
        await (function (e) {
          const t = i.dirname(Lw);
          return e
            ? new Promise((e, n) => {
                Ow.makeTree(t, (t) => {
                  null === t
                    ? e()
                    : n(
                        new Error(
                          "Failed to create intermediate directories to " + Lw
                        )
                      );
                });
              })
            : _i.mkdirp(t);
        })(e),
        await (function (e) {
          return e
            ? new Promise((e, t) => {
                Ow.symlink(Fw, Lw, (n) => {
                  null === n
                    ? e()
                    : t(new Error(`Failed to symlink ${Fw} to ${Lw}`));
                });
              })
            : _i.symlink(Fw, Lw);
        })(e);
    }
    class Hw extends w.Component {
      render() {
        return w.createElement(
          sg,
          {
            title: "Command line tool installed",
            onDismissed: this.props.onDismissed,
            onSubmit: this.props.onDismissed,
          },
          w.createElement(
            ig,
            null,
            w.createElement(
              "div",
              null,
              "The command line tool has been installed at",
              " ",
              w.createElement("strong", null, Lw),
              "."
            )
          ),
          w.createElement(ug, { buttonText: "Ok" })
        );
      }
    }
    class zw extends w.Component {
      constructor(e) {
        super(e),
          (this.onUsernameChange = (e) => {
            this.setState({ username: e });
          }),
          (this.onPasswordChange = (e) => {
            this.setState({ password: e });
          }),
          (this.save = () => {
            this.props.onDismiss(),
              this.props.onSave(
                this.props.hostname,
                this.state.username,
                this.state.password,
                this.props.retryAction
              );
          }),
          (this.state = { username: "", password: "" });
      }
      render() {
        const e = !this.state.password.length || !this.state.username.length;
        return w.createElement(
          sg,
          {
            id: "generic-git-auth",
            title: "身份验证失败",
            onDismissed: this.props.onDismiss,
            onSubmit: this.save,
          },
          w.createElement(
            ig,
            null,
            w.createElement(
              "p",
              null,
              "无法通过主机地址",
              w.createElement(Om, null, this.props.hostname),
              "的身份验证。请输入您的用户名和密码，然后重试。"
            ),
            w.createElement(
              Pd,
              null,
              w.createElement(Md, {
                label: "用户名",
                autoFocus: !0,
                value: this.state.username,
                onValueChanged: this.onUsernameChange,
              })
            ),
            w.createElement(
              Pd,
              null,
              w.createElement(Md, {
                label: "密码",
                type: "password",
                value: this.state.password,
                onValueChanged: this.onPasswordChange,
              })
            )
          ),
          w.createElement(
            lg,
            null,
            w.createElement(cg, {
              okButtonText: "保存并重试",
              okButtonDisabled: e,
            })
          )
        );
      }
    }
    class Uw extends w.Component {
      constructor() {
        super(...arguments),
          (this.onShowPreferencesDialog = (e) => {
            e.preventDefault(),
              this.props.onDismissed(),
              this.props.showPreferencesDialog();
          });
      }
      render() {
        return w.createElement(
          sg,
          {
            id: "shell-error",
            type: "error",
            title: "Unable to open shell",
            onSubmit: this.props.onDismissed,
            onDismissed: this.props.onDismissed,
          },
          w.createElement(
            ig,
            null,
            w.createElement("p", null, this.props.message)
          ),
          w.createElement(
            lg,
            null,
            w.createElement(cg, {
              okButtonText: "Close",
              cancelButtonText: "Open options",
              onCancelButtonClick: this.onShowPreferencesDialog,
            })
          )
        );
      }
    }
    const Ww = "https://git-lfs.github.com/";
    class jw extends w.Component {
      constructor() {
        super(...arguments),
          (this.onInitialize = () => {
            this.props.onInitialize(this.props.repositories),
              this.props.onDismissed();
          });
      }
      render() {
        return w.createElement(
          sg,
          {
            id: "initialize-lfs",
            title: "Initialize Git LFS",
            onDismissed: this.props.onDismissed,
            onSubmit: this.onInitialize,
          },
          w.createElement(ig, null, this.renderRepositories()),
          w.createElement(
            lg,
            null,
            w.createElement(cg, {
              okButtonText: "Initialize Git LFS",
              cancelButtonText: "Not now",
            })
          )
        );
      }
      renderRepositories() {
        if (this.props.repositories.length > 10)
          return w.createElement(
            "p",
            null,
            this.props.repositories.length,
            " repositories use",
            " ",
            w.createElement(_d, { uri: Ww }, "Git LFS"),
            ". To contribute to them, Git LFS must first be initialized. Would you like to do so now?"
          );
        {
          const e = 1 !== this.props.repositories.length,
            t = e ? "The repositories use" : "This repository uses",
            n = e ? "them" : "it";
          return w.createElement(
            "div",
            null,
            w.createElement(
              "p",
              null,
              t,
              " ",
              w.createElement(_d, { uri: Ww }, "Git LFS"),
              ". To contribute to",
              " ",
              n,
              ", Git LFS must first be initialized. Would you like to do so now?"
            ),
            w.createElement(
              "ul",
              null,
              this.props.repositories.map((e) =>
                w.createElement(
                  "li",
                  { key: e.id },
                  w.createElement(Up, { path: e.path })
                )
              )
            )
          );
        }
      }
    }
    class Vw extends w.Component {
      constructor(e) {
        super(e),
          (this.showGlobalGitConfig = () => {
            const e = this.state.globalGitConfigPath;
            e && te.openPath(e);
          }),
          (this.onSubmit = () => {
            this.props.onUpdateExistingFilters(), this.props.onDismissed();
          }),
          (this.state = { globalGitConfigPath: null });
      }
      async componentDidMount() {
        try {
          const e = await (async function (e) {
            const t = e ? { env: e } : void 0,
              n = (
                await $o(
                  [
                    "config",
                    "--global",
                    "--list",
                    "--show-origin",
                    "--name-only",
                    "-z",
                  ],
                  __dirname,
                  "getGlobalConfigPath",
                  t
                )
              ).stdout.split("\0");
            if (n.length < 1) return null;
            const r = n[0];
            if (!r.length) return null;
            const o = r.match(/file:(.+)/i);
            return !o || o.length < 2 ? null : Object(i.normalize)(o[1]);
          })();
          this.setState({ globalGitConfigPath: e });
        } catch (e) {
          log.warn("Couldn't get the global git config path", e);
        }
      }
      renderGlobalGitConfigLink() {
        const e = "your global git config";
        return this.state.globalGitConfigPath
          ? w.createElement(_d, { onClick: this.showGlobalGitConfig }, e)
          : e;
      }
      render() {
        return w.createElement(
          sg,
          {
            id: "lfs-attribute-mismatch",
            title: "Update existing Git LFS filters?",
            onDismissed: this.props.onDismissed,
            onSubmit: this.onSubmit,
          },
          w.createElement(
            ig,
            null,
            w.createElement(
              "p",
              null,
              "Git LFS filters are already configured in",
              " ",
              this.renderGlobalGitConfigLink(),
              " but are not the values it expects. Would you like to update them now?"
            )
          ),
          w.createElement(
            lg,
            null,
            w.createElement(cg, {
              okButtonText: "Update existing filters",
              cancelButtonText: "Not now",
            })
          )
        );
      }
    }
    class Gw extends w.Component {
      constructor() {
        super(...arguments),
          (this.onUpdate = () => {
            this.props.onUpdate(this.props.repository),
              this.props.onDismissed();
          }),
          (this.onIgnore = (e) => {
            e.preventDefault(),
              this.props.onIgnore(this.props.repository),
              this.props.onDismissed();
          });
      }
      render() {
        const e = this.props.repository.name,
          t = J(
            "A repository must have a GitHub repository to add an upstream remote",
            this.props.repository.gitHubRepository
          ),
          n = J(
            "A repository must have a parent repository to add an upstream remote",
            t.parent
          ),
          r = n.fullName,
          i = this.props.existingRemote.url,
          o = n.cloneURL;
        return w.createElement(
          sg,
          {
            title: "Upstream already exists",
            onDismissed: this.props.onDismissed,
            onSubmit: this.onUpdate,
            type: "warning",
          },
          w.createElement(
            ig,
            null,
            w.createElement(
              "p",
              null,
              "The repository ",
              w.createElement(Om, null, e),
              " is a fork of",
              " ",
              w.createElement(Om, null, r),
              ", but its ",
              w.createElement(Om, null, "upstream"),
              " ",
              "remote points elsewhere."
            ),
            w.createElement(
              "ul",
              null,
              w.createElement(
                "li",
                null,
                "Current: ",
                w.createElement(Om, null, i)
              ),
              w.createElement(
                "li",
                null,
                "Expected: ",
                w.createElement(Om, null, o)
              )
            ),
            w.createElement(
              "p",
              null,
              "Would you like to update the remote to use the expected URL?"
            )
          ),
          w.createElement(
            lg,
            null,
            w.createElement(cg, {
              destructive: !0,
              okButtonText: "Update",
              cancelButtonText: "Ignore",
              onCancelButtonClick: this.onIgnore,
            })
          )
        );
      }
    }
    const $w = new Bu("desktop", gt(), -1),
      qw = new lo(
        "",
        -1,
        new eo("desktop", $w, -1, !1, "https://github.com/desktop/desktop"),
        !0
      ),
      Kw = _c(__dirname, "static/release-note-header-left.svg"),
      Yw = _c(__dirname, "static/release-note-header-right.svg");
    class Qw extends w.Component {
      constructor() {
        super(...arguments),
          (this.updateNow = () => {
            De.quitAndInstallUpdate();
          }),
          (this.showAllReleaseNotes = () => {
            te.openExternal(sv);
          });
      }
      renderList(e, t) {
        if (0 === e.length) return null;
        const n = new Array();
        for (const [t, r] of e.entries())
          n.push(
            w.createElement(
              "li",
              { key: t },
              w.createElement(Xp, {
                text: r.message,
                emoji: this.props.emoji,
                renderUrlsAsLinks: !0,
                repository: qw,
              })
            )
          );
        return w.createElement(
          "div",
          { className: "section" },
          w.createElement(
            "p",
            { className: "header" },
            w.createElement("strong", null, t)
          ),
          w.createElement("ul", { className: "entries" }, n)
        );
      }
      drawSingleColumnLayout(e) {
        return w.createElement(
          "div",
          { className: "container" },
          w.createElement(
            "div",
            { className: "column" },
            this.renderList(e.bugfixes, "Bugfixes"),
            this.renderList(e.enhancements, "Enhancements"),
            this.renderList(e.other, "Other")
          )
        );
      }
      drawTwoColumnLayout(e) {
        return w.createElement(
          "div",
          { className: "container" },
          w.createElement(
            "div",
            { className: "column" },
            this.renderList(e.enhancements, "Enhancements"),
            this.renderList(e.other, "Other")
          ),
          w.createElement(
            "div",
            { className: "column" },
            this.renderList(e.bugfixes, "Bugfixes")
          )
        );
      }
      render() {
        const e = this.props.newRelease,
          t =
            e.enhancements.length > 0 && e.bugfixes.length > 0
              ? this.drawTwoColumnLayout(e)
              : this.drawSingleColumnLayout(e),
          n = w.createElement(
            "div",
            { className: "release-notes-header" },
            w.createElement("img", {
              className: "release-note-graphic-left",
              src: Kw,
            }),
            w.createElement(
              "div",
              { className: "title" },
              w.createElement(
                "p",
                { className: "version" },
                "Version ",
                e.latestVersion
              ),
              w.createElement("p", { className: "date" }, e.datePublished)
            ),
            w.createElement("img", {
              className: "release-note-graphic-right",
              src: Yw,
            })
          );
        return w.createElement(
          sg,
          {
            id: "release-notes",
            onDismissed: this.props.onDismissed,
            onSubmit: this.updateNow,
            title: n,
          },
          w.createElement(ig, null, t),
          w.createElement(
            lg,
            null,
            w.createElement(
              _d,
              { onClick: this.showAllReleaseNotes },
              "View all release notes"
            ),
            w.createElement(cg, {
              destructive: !0,
              okButtonText: "Install and restart",
              cancelButtonText: "Close",
            })
          )
        );
      }
    }
    class Zw extends w.Component {
      constructor() {
        super(...arguments),
          (this.openPullRequest = () => {
            this.props.dispatcher.showPullRequest(this.props.repository);
          }),
          (this.deleteBranch = () => (
            this.props.dispatcher.deleteBranch(
              this.props.repository,
              this.props.branch,
              !1
            ),
            this.props.onDismissed()
          ));
      }
      render() {
        return w.createElement(
          sg,
          {
            id: "delete-branch",
            title: "Delete branch",
            type: "warning",
            onDismissed: this.props.onDismissed,
            onSubmit: this.deleteBranch,
          },
          w.createElement(
            ig,
            null,
            w.createElement(
              "p",
              null,
              "This branch may have an open pull request associated with it."
            ),
            w.createElement(
              "p",
              null,
              "If",
              " ",
              w.createElement(
                _d,
                { onClick: this.openPullRequest },
                "#",
                this.props.pullRequest.pullRequestNumber
              ),
              " ",
              "has been merged, you can also go to GitHub to delete the remote branch."
            )
          ),
          w.createElement(
            lg,
            null,
            w.createElement(cg, { destructive: !0, okButtonText: "Delete" })
          )
        );
      }
    }
    function Xw(e) {
      const t = 1 === e ? "1 个冲突文件" : e + " 个冲突文件";
      return w.createElement("h3", { className: "summary" }, t);
    }
    function Jw() {
      return w.createElement(
        "div",
        { className: "all-conflicts-resolved" },
        w.createElement(
          "div",
          { className: "green-circle" },
          w.createElement(vh, { symbol: wh.check })
        ),
        w.createElement(
          "div",
          { className: "message" },
          "All conflicts resolved"
        )
      );
    }
    function eb(e) {
      return w.createElement(
        "div",
        null,
        w.createElement(_d, { onClick: e }, "Open in command line,"),
        " ",
        "your tool of choice, or close to resolve manually."
      );
    }
    const tb = (e) =>
        yo(e.status) && ql(e.status, e.manualResolution)
          ? ob({
              path: e.path,
              status: e.status,
              resolvedExternalEditor: e.resolvedExternalEditor,
              onOpenEditorClick: () =>
                e.openFileInExternalEditor(
                  Object(i.join)(e.repository.path, e.path)
                ),
              repository: e.repository,
              dispatcher: e.dispatcher,
              ourBranch: e.ourBranch,
              theirBranch: e.theirBranch,
            })
          : vo(e.status) && ql(e.status, e.manualResolution)
          ? rb({
              path: e.path,
              status: e.status,
              repository: e.repository,
              dispatcher: e.dispatcher,
              ourBranch: e.ourBranch,
              theirBranch: e.theirBranch,
            })
          : nb({
              path: e.path,
              status: e.status,
              repository: e.repository,
              dispatcher: e.dispatcher,
              manualResolution: e.manualResolution,
              branch: ub(e.manualResolution, e.ourBranch, e.theirBranch),
            }),
      nb = (e) =>
        w.createElement(
          "li",
          { key: e.path, className: "unmerged-file-status-resolved" },
          w.createElement(vh, {
            symbol: wh.fileCode,
            className: "file-octicon",
          }),
          w.createElement(
            "div",
            { className: "column-left" },
            w.createElement(Up, { path: e.path }),
            cb({
              path: e.path,
              status: e.status,
              branch: e.branch,
              manualResolution: e.manualResolution,
              repository: e.repository,
              dispatcher: e.dispatcher,
            })
          ),
          w.createElement(
            "div",
            { className: "green-circle" },
            w.createElement(vh, { symbol: wh.check })
          )
        ),
      rb = (e) => {
        const t = sb(
            e.path,
            e.status,
            e.repository,
            e.dispatcher,
            e.ourBranch,
            e.theirBranch
          ),
          n = w.createElement(
            w.Fragment,
            null,
            w.createElement(
              "div",
              { className: "column-left" },
              w.createElement(Up, { path: e.path }),
              w.createElement("div", { className: "file-conflicts-status" }, hb)
            ),
            w.createElement(
              "div",
              { className: "action-buttons" },
              w.createElement(
                Ud,
                {
                  className:
                    "small-button button-group-item resolve-arrow-menu",
                  onClick: t,
                },
                "Resolve",
                w.createElement(vh, { symbol: wh.triangleDown })
              )
            )
          );
        return ib(e.path, n);
      };
    function ib(e, t) {
      return w.createElement(
        "li",
        { key: e, className: "unmerged-file-status-conflicts" },
        w.createElement(vh, { symbol: wh.fileCode, className: "file-octicon" }),
        t
      );
    }
    const ob = (e) => {
        const t = ((n = e.status.conflictMarkerCount), Math.ceil(n / 3));
        var n;
        const r = 1 === t ? "1 conflict" : t + " conflicts",
          i = null === e.resolvedExternalEditor,
          o = (function (e) {
            if (null !== e) return;
            return "No editor configured in Options > Advanced";
          })(e.resolvedExternalEditor),
          s = ab(
            e.path,
            e.repository,
            e.dispatcher,
            e.status,
            e.ourBranch,
            e.theirBranch
          ),
          a = w.createElement(
            w.Fragment,
            null,
            w.createElement(
              "div",
              { className: "column-left" },
              w.createElement(Up, { path: e.path }),
              w.createElement("div", { className: "file-conflicts-status" }, r)
            ),
            w.createElement(
              "div",
              { className: "action-buttons" },
              w.createElement(
                Ud,
                {
                  onClick: e.onOpenEditorClick,
                  disabled: i,
                  tooltip: o,
                  className: "small-button button-group-item",
                },
                "Open in " + (e.resolvedExternalEditor || "editor")
              ),
              w.createElement(
                Ud,
                {
                  onClick: s,
                  className: "small-button button-group-item arrow-menu",
                },
                w.createElement(vh, { symbol: wh.triangleDown })
              )
            )
          );
        return ib(e.path, a);
      },
      sb = (e, t, n, r, i, o) => () => {
        se(lb(e, n, r, t, i, o));
      },
      ab = (e, t, n, o, s, a) => () => {
        const l = Object(i.join)(t.path, e);
        se([
          { label: "Open with default program", action: () => tf(l, n) },
          {
            label: "Show in Explorer",
            action: () => r.shell.showItemInFolder(l),
          },
          { type: "separator" },
          ...lb(e, t, n, o, s, a),
        ]);
      };
    function lb(e, t, n, r, i, o) {
      return [
        {
          label: Yl(r.entry.us, i),
          action: () => n.updateManualConflictResolution(t, e, Ra.ours),
        },
        {
          label: Yl(r.entry.them, o),
          action: () => n.updateManualConflictResolution(t, e, Ra.theirs),
        },
      ];
    }
    const cb = (e) => {
      if (yo(e.status) && 0 === e.status.conflictMarkerCount)
        return w.createElement(
          "div",
          { className: "file-conflicts-status" },
          "No conflicts remaining"
        );
      const t = (function (e, t, n) {
        return t === Ra.ours
          ? Kl(e.entry.us, n)
          : t === Ra.theirs
          ? Kl(e.entry.them, n)
          : "No conflicts remaining";
      })(e.status, e.manualResolution, e.branch);
      return w.createElement(
        "div",
        { className: "file-conflicts-status" },
        t,
        " ",
        w.createElement(
          _d,
          {
            onClick:
              ((n = e.path),
              (r = e.repository),
              (i = e.dispatcher),
              () => i.updateManualConflictResolution(r, n, null)),
          },
          "Undo"
        )
      );
      var n, r, i;
    };
    function ub(e, t, n) {
      return e === Ra.ours ? t : e === Ra.theirs ? n : void 0;
    }
    const hb = "Manual conflict";
    class db extends w.Component {
      constructor(e) {
        super(e),
          (this.onSubmit = async () => {
            this.setState({ isCommitting: !0 }),
              await this.props.dispatcher.finishConflictedMerge(
                this.props.repository,
                this.props.workingDirectory,
                {
                  type: su.SuccessfulMerge,
                  ourBranch: this.props.ourBranch,
                  theirBranch: this.props.theirBranch,
                }
              ),
              await this.props.dispatcher.setCommitMessage(
                this.props.repository,
                Lc
              ),
              await this.props.dispatcher.changeRepositorySection(
                this.props.repository,
                V.Changes
              ),
              this.props.onDismissed(),
              this.props.dispatcher.recordGuidedConflictedMergeCompletion();
          }),
          (this.onCancel = async (e) => {
            e.preventDefault();
            Zl(this.props.workingDirectory, this.props.manualResolutions)
              .length > 0
              ? (this.props.onDismissed(),
                this.props.dispatcher.showPopup({
                  type: ao.AbortMerge,
                  repository: this.props.repository,
                  ourBranch: this.props.ourBranch,
                  theirBranch: this.props.theirBranch,
                }))
              : (await this.props.dispatcher.abortMerge(this.props.repository),
                this.props.onDismissed());
          }),
          (this.onDismissed = async () => {
            this.props.onDismissed(),
              this.props.dispatcher.setBanner({
                type: su.MergeConflictsFound,
                ourBranch: this.props.ourBranch,
                popup: {
                  type: ao.MergeConflicts,
                  ourBranch: this.props.ourBranch,
                  theirBranch: this.props.theirBranch,
                  repository: this.props.repository,
                },
              }),
              this.props.dispatcher.recordMergeConflictsDialogDismissal();
            Xl(this.props.workingDirectory, this.props.manualResolutions)
              .length > 0 &&
              this.props.dispatcher.recordAnyConflictsLeftOnMergeConflictsDialogDismissal();
          }),
          (this.openThisRepositoryInShell = () =>
            this.props.openRepositoryInShell(this.props.repository)),
          (this.state = { isCommitting: !1 });
      }
      renderHeaderTitle(e, t) {
        return void 0 !== t
          ? w.createElement(
              "span",
              null,
              "Resolve conflicts before merging ",
              w.createElement("strong", null, t),
              " into ",
              w.createElement("strong", null, e)
            )
          : w.createElement(
              "span",
              null,
              "Resolve conflicts before merging into ",
              w.createElement("strong", null, e)
            );
      }
      renderUnmergedFiles(e) {
        return w.createElement(
          "ul",
          { className: "unmerged-file-statuses" },
          e.map((e) =>
            Gl(e.status)
              ? tb({
                  path: e.path,
                  status: e.status,
                  resolvedExternalEditor: this.props.resolvedExternalEditor,
                  openFileInExternalEditor: this.props.openFileInExternalEditor,
                  repository: this.props.repository,
                  dispatcher: this.props.dispatcher,
                  manualResolution: this.props.manualResolutions.get(e.path),
                  ourBranch: this.props.ourBranch,
                  theirBranch: this.props.theirBranch,
                })
              : null
          )
        );
      }
      renderContent(e, t) {
        return 0 === e.length
          ? Jw()
          : w.createElement(
              w.Fragment,
              null,
              Xw(t),
              this.renderUnmergedFiles(e),
              eb(this.openThisRepositoryInShell)
            );
      }
      render() {
        const e = Ql(this.props.workingDirectory),
          t = Xl(this.props.workingDirectory, this.props.manualResolutions)
            .length,
          n = this.renderHeaderTitle(
            this.props.ourBranch,
            this.props.theirBranch
          ),
          r = t > 0 ? "Resolve all changes before merging" : void 0;
        return w.createElement(
          sg,
          {
            id: "merge-conflicts-list",
            dismissable: !this.state.isCommitting,
            onDismissed: this.onDismissed,
            onSubmit: this.onSubmit,
            title: n,
            loading: this.state.isCommitting,
            disabled: this.state.isCommitting,
          },
          w.createElement(ig, null, this.renderContent(e, t)),
          w.createElement(
            lg,
            null,
            w.createElement(cg, {
              okButtonText: "Commit merge",
              okButtonDisabled: t > 0,
              okButtonTitle: r,
              cancelButtonText: "Abort merge",
              onCancelButtonClick: this.onCancel,
            })
          )
        );
      }
    }
    class pb extends w.Component {
      constructor() {
        super(...arguments),
          (this.onCancel = () => {
            this.props.onDismissed();
          }),
          (this.onSubmit = async () => {
            this.props.onDismissed(),
              await this.props.dispatcher.commitIncludedChanges(
                this.props.repository,
                this.props.context
              ),
              this.props.dispatcher.clearBanner(),
              this.props.dispatcher.setCommitMessage(this.props.repository, Lc);
          });
      }
      renderFiles(e) {
        return w.createElement(
          "div",
          { className: "conflicted-files-text" },
          w.createElement(
            "ul",
            null,
            e.map((e) =>
              w.createElement(
                "li",
                { key: e.path },
                w.createElement(Up, { path: e.path })
              )
            )
          )
        );
      }
      render() {
        return w.createElement(
          sg,
          {
            id: "commit-conflict-markers-warning",
            onDismissed: this.onCancel,
            onSubmit: this.onSubmit,
            title: "Confirm committing conflicted files",
            type: "warning",
          },
          w.createElement(
            ig,
            null,
            w.createElement(
              "p",
              null,
              "If you choose to commit, you’ll be committing the following conflicted files into your repository:"
            ),
            this.renderFiles(this.props.files),
            w.createElement(
              "p",
              null,
              "Are you sure you want to commit these conflicted files?"
            )
          ),
          w.createElement(
            lg,
            null,
            w.createElement(cg, {
              destructive: !0,
              okButtonText: "Yes, commit files",
            })
          )
        );
      }
    }
    class fb extends w.PureComponent {
      componentDidMount() {
        this.ensureTheme();
      }
      componentDidUpdate() {
        this.ensureTheme();
      }
      componentWillUnmount() {
        this.clearThemes();
      }
      ensureTheme() {
        const e = "theme-" + wi(this.props.theme),
          t = document.body;
        t.classList.contains(e) || (this.clearThemes(), t.classList.add(e));
      }
      clearThemes() {
        const e = document.body;
        for (const t of e.classList)
          t.startsWith("theme-") && e.classList.remove(t);
      }
      render() {
        return null;
      }
    }
    class mb extends w.Component {
      constructor() {
        super(...arguments),
          (this.onSubmit = async () => {
            await this.props.dispatcher.abortMerge(this.props.repository),
              this.props.onDismissed();
          }),
          (this.onCancel = () => {
            this.props.onDismissed(),
              this.props.dispatcher.showPopup({
                type: ao.MergeConflicts,
                repository: this.props.repository,
                ourBranch: this.props.ourBranch,
                theirBranch: this.props.theirBranch,
              });
          });
      }
      renderTextContent(e, t) {
        let n;
        return (
          (n =
            void 0 !== t
              ? w.createElement(
                  "p",
                  null,
                  "Are you sure you want to abort merging ",
                  w.createElement("strong", null, t),
                  " into ",
                  w.createElement("strong", null, e),
                  "?"
                )
              : w.createElement(
                  "p",
                  null,
                  "Are you sure you want to abort merging into ",
                  w.createElement("strong", null, e),
                  "?"
                )),
          w.createElement(
            "div",
            { className: "column-left" },
            n,
            w.createElement(
              "p",
              null,
              "Aborting this merge will take you back to the pre-merge state and the conflicts you've already resolved will still be present."
            )
          )
        );
      }
      render() {
        return w.createElement(
          sg,
          {
            id: "abort-merge-warning",
            title: "Confirm abort merge",
            onDismissed: this.onCancel,
            onSubmit: this.onSubmit,
            type: "warning",
          },
          w.createElement(
            ig,
            null,
            this.renderTextContent(this.props.ourBranch, this.props.theirBranch)
          ),
          w.createElement(
            lg,
            null,
            w.createElement(cg, {
              destructive: !0,
              okButtonText: "Abort merge",
            })
          )
        );
      }
    }
    class gb extends w.Component {
      constructor(e) {
        super(e),
          (this.onSubmit = async () => {
            this.props.onDismissed(),
              await this.props.dispatcher.commitIncludedChanges(
                this.props.repository,
                this.props.context
              ),
              this.props.dispatcher.setCommitMessage(this.props.repository, Lc);
          });
      }
      render() {
        return w.createElement(
          sg,
          {
            id: "oversized-files",
            title: "Files too large",
            onSubmit: this.onSubmit,
            onDismissed: this.props.onDismissed,
            type: "warning",
          },
          w.createElement(
            ig,
            null,
            w.createElement(
              "p",
              null,
              "The following files are over 100MB.",
              " ",
              w.createElement(
                "strong",
                null,
                "If you commit these files, you will no longer be able to push this repository to GitHub.com."
              )
            ),
            this.renderFileList(),
            w.createElement(
              "p",
              { className: "recommendation" },
              "We recommend you avoid committing these files or use",
              " ",
              w.createElement(
                _d,
                {
                  uri:
                    "https://help.github.com/articles/versioning-large-files/",
                },
                "Git LFS"
              ),
              " to store large files on GitHub."
            )
          ),
          w.createElement(
            lg,
            null,
            w.createElement(cg, {
              destructive: !0,
              okButtonText: "Commit anyway",
            })
          )
        );
      }
      renderFileList() {
        return w.createElement(
          "div",
          { className: "files-list" },
          w.createElement(
            "ul",
            null,
            this.props.oversizedFiles.map((e) =>
              w.createElement(
                "li",
                { key: e },
                w.createElement(Up, { path: e })
              )
            )
          )
        );
      }
    }
    class yb extends w.Component {
      constructor(e) {
        super(e),
          (this.onReportingOptOutChanged = (e) => {
            const t = !e.currentTarget.checked;
            this.setState({ optOutOfUsageTracking: t });
          }),
          (this.onDismissed = () => {
            this.props.onSetStatsOptOut(this.state.optOutOfUsageTracking),
              this.props.onDismissed();
          }),
          (this.viewMoreInfo = (e) => {
            e.preventDefault(), this.props.onOpenUsageDataUrl();
          }),
          (this.state = { optOutOfUsageTracking: !1 });
      }
      render() {
        return w.createElement(
          sg,
          {
            id: "usage-reporting",
            title: "Usage reporting changes",
            dismissable: !1,
            onDismissed: this.onDismissed,
            onSubmit: this.onDismissed,
            type: "normal",
          },
          w.createElement(
            ig,
            null,
            w.createElement(
              Pd,
              null,
              "GitHub Desktop has introduced a change around how it reports usage stats, to help us better understand how our GitHub users get value from Desktop:"
            ),
            w.createElement(
              Pd,
              null,
              w.createElement(
                "ul",
                null,
                w.createElement(
                  "li",
                  null,
                  w.createElement(
                    "span",
                    null,
                    w.createElement(
                      "strong",
                      null,
                      "If you are signed into a GitHub account"
                    ),
                    ", your GitHub.com account ID will be included in the periodic usage stats."
                  )
                ),
                w.createElement(
                  "li",
                  null,
                  w.createElement(
                    "span",
                    null,
                    w.createElement(
                      "strong",
                      null,
                      "If you are only signed into a GitHub Enterprise Server account, or only using Desktop with non-GitHub remotes"
                    ),
                    ", nothing is going to change."
                  )
                )
              )
            ),
            w.createElement(
              Pd,
              { className: "selection" },
              w.createElement(qd, {
                label: "通过提交使用情况统计信息来帮助GitHub Desktop进行改进",
                value: this.state.optOutOfUsageTracking ? $d.Off : $d.On,
                onChange: this.onReportingOptOutChanged,
              })
            )
          ),
          w.createElement(
            lg,
            null,
            w.createElement(cg, {
              okButtonText: "继续",
              cancelButtonText: "更多信息",
              onCancelButtonClick: this.viewMoreInfo,
            })
          )
        );
      }
    }
    class vb extends w.Component {
      constructor(e) {
        super(e),
          (this.onFetch = async () => {
            this.setState({ isLoading: !0 }),
              await this.props.dispatcher.fetch(
                this.props.repository,
                $i.UserInitiatedTask
              ),
              this.setState({ isLoading: !1 }),
              this.props.onDismissed();
          }),
          (this.state = { isLoading: !1 });
      }
      render() {
        return w.createElement(
          sg,
          {
            title: "Newer commits on remote",
            dismissable: !this.state.isLoading,
            disabled: this.state.isLoading,
            onDismissed: this.props.onDismissed,
            onSubmit: this.onFetch,
            loading: this.state.isLoading,
            type: "warning",
          },
          w.createElement(
            ig,
            null,
            w.createElement(
              "p",
              null,
              "Desktop is unable to push commits to this branch because there are commits on the remote that are not present on your local branch. Fetch these new commits before pushing in order to reconcile them with your local commits."
            )
          ),
          w.createElement(
            lg,
            null,
            w.createElement(cg, {
              okButtonText: "Fetch",
              okButtonDisabled: this.state.isLoading,
            })
          )
        );
      }
    }
    class wb extends w.Component {
      constructor(e) {
        super(e),
          (this.computingRebaseForBranch = null),
          (this.onFilterTextChanged = (e) => {
            this.setState({ filterText: e });
          }),
          (this.onBranchChanged = async (e) => {
            const { currentBranch: t } = this.props;
            await this.updateRebaseStatus(e, t);
          }),
          (this.onSelectionChanged = (e) => {
            this.setState({ selectedBranch: e }),
              null !== e && this.onBranchChanged(e);
          }),
          (this.renderBranch = (e, t) => zg(e, t, this.props.currentBranch)),
          (this.onItemClick = (e, t) => {
            if ("keyboard" !== t.kind || "Enter" !== t.event.key) return;
            t.event.preventDefault();
            const { selectedBranch: n } = this.state;
            null !== n && n.name === e.name && this.startRebase();
          }),
          (this.renderRebaseStatus = () => {
            const { currentBranch: e } = this.props,
              { selectedBranch: t, rebasePreview: n } = this.state;
            return null === n || null === t || e.name === t.name
              ? null
              : w.createElement(
                  "div",
                  { className: "rebase-status-component" },
                  w.createElement(Gg, {
                    status: n,
                    classNamePrefix: "rebase-status",
                  }),
                  w.createElement(
                    "p",
                    { className: "rebase-message" },
                    this.renderRebaseDetails(e, t, n)
                  )
                );
          }),
          (this.startRebase = async () => {
            const { selectedBranch: e, rebasePreview: t } = this.state,
              { repository: n, currentBranch: r } = this.props;
            e &&
              null !== t &&
              t.kind === cl.Clean &&
              this.canRebaseSelectedBranch() &&
              this.props.dispatcher.startRebase(n, e, r, t.commits);
          });
        const { initialBranch: t, currentBranch: n, defaultBranch: r } = e,
          i = (function (e, t, n) {
            if (void 0 !== n) return n;
            return e === t ? null : t;
          })(n, r, t);
        this.state = { selectedBranch: i, rebasePreview: null, filterText: "" };
      }
      componentDidMount() {
        const { selectedBranch: e } = this.state;
        null !== e && this.onBranchChanged(e);
      }
      async updateRebaseStatus(e, t) {
        this.computingRebaseForBranch = e.name;
        const { repository: n } = this.props;
        this.setState({ rebasePreview: { kind: cl.Loading } });
        const { commits: r, base: i } = await Cc(
          async () => ({
            commits: await $a(n, e.tip.sha, t.tip.sha),
            base: await ml(n, e.tip.sha, t.tip.sha),
          }),
          500
        );
        if (this.computingRebaseForBranch !== e.name) return;
        if (null === r)
          return void this.setState({ rebasePreview: { kind: cl.Invalid } });
        const o = i === e.tip.sha ? [] : r;
        this.setState({ rebasePreview: { kind: cl.Clean, commits: o } });
      }
      selectedBranchIsCurrentBranch() {
        const e = this.props.currentBranch,
          { selectedBranch: t } = this.state;
        return null !== t && null !== e && t.name === e.name;
      }
      selectedBranchIsAheadOfCurrentBranch() {
        const { rebasePreview: e } = this.state;
        return null !== e && e.kind === cl.Clean && e.commits.length > 0;
      }
      canRebaseSelectedBranch() {
        return (
          null !== this.state.selectedBranch &&
          !this.selectedBranchIsCurrentBranch() &&
          this.selectedBranchIsAheadOfCurrentBranch()
        );
      }
      render() {
        const { selectedBranch: e } = this.state,
          { currentBranch: t } = this.props,
          n = this.selectedBranchIsCurrentBranch()
            ? "You are not able to rebase this branch onto itself"
            : this.selectedBranchIsAheadOfCurrentBranch()
            ? void 0
            : "There are no commits on the current branch to rebase",
          r = Tv(t.name, 40);
        return w.createElement(
          sg,
          {
            id: "rebase",
            onDismissed: this.props.onDismissed,
            onSubmit: this.startRebase,
            dismissable: !0,
            title: w.createElement(
              w.Fragment,
              null,
              "Rebase ",
              w.createElement("strong", null, r),
              "…"
            ),
          },
          w.createElement(
            ig,
            null,
            w.createElement(gg, {
              allBranches: this.props.allBranches,
              currentBranch: t,
              defaultBranch: this.props.defaultBranch,
              recentBranches: this.props.recentBranches,
              filterText: this.state.filterText,
              onFilterTextChanged: this.onFilterTextChanged,
              selectedBranch: e,
              onSelectionChanged: this.onSelectionChanged,
              canCreateNewBranch: !1,
              renderBranch: this.renderBranch,
              onItemClick: this.onItemClick,
            })
          ),
          w.createElement(
            lg,
            null,
            this.renderRebaseStatus(),
            w.createElement(cg, {
              okButtonText: "Start rebase",
              okButtonDisabled: !this.canRebaseSelectedBranch(),
              okButtonTitle: n,
              cancelButtonVisible: !1,
            })
          )
        );
      }
      renderRebaseDetails(e, t, n) {
        return n.kind === cl.Loading
          ? this.renderLoadingRebaseMessage()
          : n.kind === cl.Clean
          ? this.renderCleanRebaseMessage(e, t, n.commits.length)
          : n.kind === cl.Invalid
          ? this.renderInvalidRebaseMessage()
          : null;
      }
      renderLoadingRebaseMessage() {
        return w.createElement(
          w.Fragment,
          null,
          "Checking for ability to rebase automatically..."
        );
      }
      renderInvalidRebaseMessage() {
        return w.createElement(
          w.Fragment,
          null,
          "Unable to start rebase. Check you have chosen a valid branch."
        );
      }
      renderCleanRebaseMessage(e, t, n) {
        if (n <= 0)
          return w.createElement(
            w.Fragment,
            null,
            "This branch is up to date with",
            " ",
            w.createElement("strong", null, e.name)
          );
        const r = 1 === n ? "commit" : "commits";
        return w.createElement(
          w.Fragment,
          null,
          "This will update ",
          w.createElement("strong", null, e.name),
          " by applying its ",
          w.createElement("strong", null, ` ${n} ${r}`),
          " on top of ",
          w.createElement("strong", null, t.name)
        );
      }
    }
    class bb extends w.Component {
      constructor(e) {
        super(e),
          (this.onCancel = (e) => {
            e.preventDefault(),
              this.setState({ isAborting: !0 }),
              this.props.onAbortRebase(this.props.step),
              this.setState({ isAborting: !1 });
          }),
          (this.onDismissed = () => {
            this.props.onDismissed(),
              this.props.showRebaseConflictsBanner(this.props.step);
          }),
          (this.onSubmit = async () => {
            this.props.onContinueRebase(this.props.step);
          }),
          (this.openThisRepositoryInShell = () =>
            this.props.openRepositoryInShell(this.props.repository)),
          (this.state = { isAborting: !1 });
      }
      componentWillUnmount() {
        const {
            workingDirectory: e,
            step: t,
            userHasResolvedConflicts: n,
          } = this.props,
          { conflictState: r } = t,
          { manualResolutions: i } = r;
        if (n) return;
        Zl(e, i).length > 0 &&
          this.props.dispatcher.setConflictsResolved(this.props.repository);
      }
      renderHeaderTitle(e, t) {
        return void 0 !== t
          ? w.createElement(
              "span",
              null,
              "Resolve conflicts before rebasing ",
              w.createElement("strong", null, e),
              " on ",
              w.createElement("strong", null, t)
            )
          : w.createElement(
              "span",
              null,
              "Resolve conflicts before rebasing ",
              w.createElement("strong", null, e)
            );
      }
      renderUnmergedFiles(e) {
        const {
          manualResolutions: t,
          targetBranch: n,
          baseBranch: r,
        } = this.props.step.conflictState;
        return w.createElement(
          "ul",
          { className: "unmerged-file-statuses" },
          e.map((e) =>
            Gl(e.status)
              ? tb({
                  path: e.path,
                  status: e.status,
                  resolvedExternalEditor: this.props.resolvedExternalEditor,
                  openFileInExternalEditor: this.props.openFileInExternalEditor,
                  repository: this.props.repository,
                  dispatcher: this.props.dispatcher,
                  manualResolution: t.get(e.path),
                  theirBranch: n,
                  ourBranch: r,
                })
              : null
          )
        );
      }
      renderContent(e, t) {
        return 0 === e.length
          ? Jw()
          : w.createElement(
              w.Fragment,
              null,
              Xw(t),
              this.renderUnmergedFiles(e),
              eb(this.openThisRepositoryInShell)
            );
      }
      render() {
        const { workingDirectory: e, step: t } = this.props,
          {
            manualResolutions: n,
            targetBranch: r,
            baseBranch: i,
          } = t.conflictState,
          o = Ql(e),
          s = Xl(e, n).length,
          a = this.renderHeaderTitle(r, i),
          l = s > 0 ? "Resolve all conflicts before continuing" : void 0;
        return w.createElement(
          sg,
          {
            id: "rebase-conflicts-list",
            onDismissed: this.onDismissed,
            title: a,
            onSubmit: this.onSubmit,
          },
          w.createElement(ig, null, this.renderContent(o, s)),
          w.createElement(
            lg,
            null,
            w.createElement(cg, {
              okButtonText: "Continue rebase",
              okButtonDisabled: s > 0,
              okButtonTitle: l,
              cancelButtonText: "Abort rebase",
              cancelButtonDisabled: this.state.isAborting,
              onCancelButtonClick: this.onCancel,
            })
          )
        );
      }
    }
    class Sb extends w.Component {
      constructor() {
        super(...arguments), (this.onDismissed = () => {});
      }
      render() {
        const {
            rebasedCommitCount: e,
            totalCommitCount: t,
            value: n,
            currentCommitSummary: r,
          } = this.props.progress,
          i = e <= 1 ? 1 : e,
          o = wl(n);
        return w.createElement(
          sg,
          {
            dismissable: !1,
            onDismissed: this.onDismissed,
            id: "rebase-progress",
            title: "Rebase in progress",
          },
          w.createElement(
            ig,
            null,
            w.createElement(
              "div",
              null,
              w.createElement("progress", { value: o }),
              w.createElement(
                "div",
                { className: "details" },
                w.createElement(
                  "div",
                  { className: "green-circle" },
                  w.createElement(vh, { symbol: wh.check })
                ),
                w.createElement(
                  "div",
                  { className: "summary" },
                  w.createElement(
                    "div",
                    { className: "message" },
                    "Commit ",
                    i,
                    " of ",
                    t
                  ),
                  w.createElement(
                    "div",
                    { className: "detail" },
                    w.createElement(Xp, {
                      emoji: this.props.emoji,
                      text: r || "",
                    })
                  )
                )
              )
            )
          )
        );
      }
    }
    class Cb extends w.Component {
      constructor(e) {
        super(e),
          (this.onSubmit = async () => {
            this.setState({ isAborting: !0 }),
              await this.props.onConfirmAbort(),
              this.setState({ isAborting: !1 });
          }),
          (this.onCancel = async () => {
            await this.props.onReturnToConflicts(this.props.step);
          }),
          (this.state = { isAborting: !1 });
      }
      renderTextContent(e, t) {
        let n;
        return (
          (n =
            void 0 !== t
              ? w.createElement(
                  "p",
                  null,
                  "Are you sure you want to abort rebasing ",
                  w.createElement(Om, null, t),
                  " onto ",
                  w.createElement(Om, null, e),
                  "?"
                )
              : w.createElement(
                  "p",
                  null,
                  "Are you sure you want to abort rebasing ",
                  w.createElement(Om, null, e),
                  "?"
                )),
          w.createElement(
            "div",
            { className: "column-left" },
            n,
            w.createElement(
              "p",
              null,
              "Aborting this rebase will take you back to the original branch state and and the conflicts you have already resolved will be discarded."
            )
          )
        );
      }
      render() {
        const {
          targetBranch: e,
          baseBranch: t,
        } = this.props.step.conflictState;
        return w.createElement(
          sg,
          {
            id: "abort-merge-warning",
            title: "Confirm abort rebase",
            onDismissed: this.onCancel,
            onSubmit: this.onSubmit,
            disabled: this.state.isAborting,
            type: "warning",
          },
          w.createElement(ig, null, this.renderTextContent(e, t)),
          w.createElement(
            lg,
            null,
            w.createElement(cg, {
              destructive: !0,
              okButtonText: "Abort rebase",
            })
          )
        );
      }
    }
    class Eb extends w.Component {
      constructor(e) {
        super(e),
          (this.onAskForConfirmationOnForcePushChanged = (e) => {
            const t = !e.currentTarget.checked;
            this.setState({ askForConfirmationOnForcePush: t });
          }),
          (this.onBeginRebase = async () => {
            this.props.dispatcher.setConfirmForcePushSetting(
              this.state.askForConfirmationOnForcePush
            );
            const {
              baseBranch: e,
              targetBranch: t,
              commits: n,
            } = this.props.step;
            await this.props.dispatcher.startRebase(
              this.props.repository,
              e,
              t,
              n,
              { continueWithForcePush: !0 }
            );
          }),
          (this.state = {
            askForConfirmationOnForcePush: e.askForConfirmationOnForcePush,
          });
      }
      render() {
        const { baseBranch: e, targetBranch: t } = this.props.step;
        return w.createElement(
          sg,
          {
            title: "Rebase will require force push",
            onDismissed: this.props.onDismissed,
            onSubmit: this.onBeginRebase,
            dismissable: !1,
            type: "warning",
          },
          w.createElement(
            ig,
            null,
            w.createElement(
              "p",
              null,
              "Are you sure you want to rebase ",
              w.createElement(Om, null, t.name),
              " onto",
              " ",
              w.createElement(Om, null, e.name),
              "?"
            ),
            w.createElement(
              "p",
              null,
              "At the end of the rebase flow, GitHub Desktop will enable you to force push the branch to update the upstream branch. Force pushing will alter the history on the remote and potentially cause problems for others collaborating on this branch."
            ),
            w.createElement(
              "div",
              null,
              w.createElement(qd, {
                label: "Do not show this message again",
                value: this.state.askForConfirmationOnForcePush
                  ? $d.Off
                  : $d.On,
                onChange: this.onAskForConfirmationOnForcePushChanged,
              })
            )
          ),
          w.createElement(
            lg,
            null,
            w.createElement(cg, {
              okButtonText: "Begin rebase",
              onCancelButtonClick: this.props.onDismissed,
            })
          )
        );
      }
    }
    class kb extends w.Component {
      constructor() {
        super(...arguments),
          (this.moveToShowConflictedFileState = (e) => {
            const { conflictState: t } = e;
            this.props.dispatcher.setRebaseFlowStep(this.props.repository, {
              kind: "ShowConflicts",
              conflictState: t,
            });
          }),
          (this.onContinueRebase = async (e) => {
            const { conflictState: t } = e;
            this.props.dispatcher.setRebaseFlowStep(this.props.repository, {
              kind: "ShowProgress",
              rebaseAction: () =>
                this.props.dispatcher.continueRebase(
                  this.props.repository,
                  this.props.workingDirectory,
                  t
                ),
            });
          }),
          (this.showRebaseConflictsBanner = (e) => {
            this.props.dispatcher.setRebaseFlowStep(this.props.repository, {
              kind: "HideConflicts",
            });
            const { targetBranch: t } = e.conflictState;
            this.props.onShowRebaseConflictsBanner(this.props.repository, t);
          }),
          (this.onConfirmAbortRebase = (e) => {
            const {
                workingDirectory: t,
                userHasResolvedConflicts: n,
              } = this.props,
              { conflictState: r } = e,
              { manualResolutions: i } = r;
            if (n)
              return void this.props.dispatcher.setRebaseFlowStep(
                this.props.repository,
                { kind: "ConfirmAbort", conflictState: r }
              );
            Zl(t, i).length > 0
              ? this.props.dispatcher.setRebaseFlowStep(this.props.repository, {
                  kind: "ConfirmAbort",
                  conflictState: r,
                })
              : this.onAbortRebase();
          }),
          (this.onAbortRebase = async () => {
            await this.props.dispatcher.abortRebase(this.props.repository),
              this.onFlowEnded();
          }),
          (this.onFlowEnded = () => {
            this.props.onDismissed(),
              this.props.onFlowEnded(this.props.repository);
          });
      }
      render() {
        const { step: e } = this.props;
        switch (e.kind) {
          case "ChooseBranch": {
            const { repository: t, dispatcher: n } = this.props,
              {
                allBranches: r,
                defaultBranch: i,
                currentBranch: o,
                recentBranches: s,
                initialBranch: a,
              } = e;
            return w.createElement(wb, {
              key: "choose-branch",
              repository: t,
              dispatcher: n,
              allBranches: r,
              defaultBranch: i,
              recentBranches: s,
              currentBranch: o,
              initialBranch: a,
              onDismissed: this.onFlowEnded,
            });
          }
          case "ShowProgress":
            const { progress: t, emoji: n } = this.props;
            return null === t
              ? (log.error(
                  "[RebaseFlow] progress is null despite trying to show the progress view. Skipping rendering..."
                ),
                null)
              : w.createElement(Sb, { progress: t, emoji: n });
          case "ShowConflicts": {
            const {
              repository: t,
              resolvedExternalEditor: n,
              openFileInExternalEditor: r,
              openRepositoryInShell: i,
              dispatcher: o,
              workingDirectory: s,
              userHasResolvedConflicts: a,
            } = this.props;
            return w.createElement(bb, {
              key: "view-conflicts",
              repository: t,
              dispatcher: o,
              step: e,
              showRebaseConflictsBanner: this.showRebaseConflictsBanner,
              workingDirectory: s,
              userHasResolvedConflicts: a,
              resolvedExternalEditor: n,
              openFileInExternalEditor: r,
              openRepositoryInShell: i,
              onAbortRebase: this.onConfirmAbortRebase,
              onDismissed: this.onFlowEnded,
              onContinueRebase: this.onContinueRebase,
            });
          }
          case "ConfirmAbort":
            return w.createElement(Cb, {
              step: e,
              onConfirmAbort: this.onAbortRebase,
              onReturnToConflicts: this.moveToShowConflictedFileState,
            });
          case "WarnForcePush":
            const {
              repository: r,
              dispatcher: i,
              askForConfirmationOnForcePush: o,
            } = this.props;
            return w.createElement(Eb, {
              step: e,
              dispatcher: i,
              repository: r,
              askForConfirmationOnForcePush: o,
              onDismissed: this.onFlowEnded,
            });
          case "HideConflicts":
          case "Completed":
            return null;
          default:
            return X(0, "Unknown rebase step found");
        }
      }
    }
    class xb extends w.Component {
      constructor(e) {
        super(e),
          (this.onAskForConfirmationOnForcePushChanged = (e) => {
            const t = !e.currentTarget.checked;
            this.setState({ askForConfirmationOnForcePush: t });
          }),
          (this.onForcePush = async () => {
            this.props.dispatcher.setConfirmForcePushSetting(
              this.state.askForConfirmationOnForcePush
            ),
              this.props.onDismissed(),
              await this.props.dispatcher.performForcePush(
                this.props.repository
              );
          }),
          (this.state = {
            isLoading: !1,
            askForConfirmationOnForcePush: e.askForConfirmationOnForcePush,
          });
      }
      render() {
        return w.createElement(
          sg,
          {
            title: "Are you sure you want to force push?",
            dismissable: !this.state.isLoading,
            onDismissed: this.props.onDismissed,
            onSubmit: this.onForcePush,
            type: "warning",
          },
          w.createElement(
            ig,
            null,
            w.createElement(
              "p",
              null,
              "A force push will rewrite history on",
              " ",
              w.createElement(Om, null, this.props.upstreamBranch),
              ". Any collaborators working on this branch will need to reset their own local branch to match the history of the remote."
            ),
            w.createElement(
              "div",
              null,
              w.createElement(qd, {
                label: "Do not show this message again",
                value: this.state.askForConfirmationOnForcePush
                  ? $d.Off
                  : $d.On,
                onChange: this.onAskForConfirmationOnForcePushChanged,
              })
            )
          ),
          w.createElement(
            lg,
            null,
            w.createElement(cg, { destructive: !0, okButtonText: "I'm sure" })
          )
        );
      }
    }
    var Rb;
    !(function (e) {
      (e[(e.StashOnCurrentBranch = 0)] = "StashOnCurrentBranch"),
        (e[(e.MoveToNewBranch = 1)] = "MoveToNewBranch");
    })(Rb || (Rb = {}));
    class Tb extends w.Component {
      constructor(e) {
        super(e),
          (this.onSelectionChanged = (e) => {
            this.setState({ selectedStashAction: e });
          }),
          (this.onSubmit = async () => {
            const {
                repository: e,
                branchToCheckout: t,
                dispatcher: n,
                hasAssociatedStash: r,
              } = this.props,
              { selectedStashAction: i } = this.state;
            if (i === Rb.StashOnCurrentBranch && r)
              return void n.showPopup({
                type: ao.ConfirmOverwriteStash,
                repository: e,
                branchToCheckout: t,
              });
            this.setState({ isStashingChanges: !0 });
            const o = Ap("stash and checkout", e);
            try {
              i === Rb.StashOnCurrentBranch
                ? await n.checkoutBranch(e, t, au.StashOnCurrentBranch)
                : i === Rb.MoveToNewBranch &&
                  (await n.checkoutBranch(e, t, au.MoveToNewBranch));
            } finally {
              o.done(),
                this.setState({ isStashingChanges: !1 }, () => {
                  this.props.onDismissed();
                });
            }
          }),
          (this.state = {
            isStashingChanges: !1,
            selectedStashAction: Rb.StashOnCurrentBranch,
            currentBranchName: e.currentBranch.name,
          });
      }
      render() {
        const { isStashingChanges: e } = this.state;
        return w.createElement(
          sg,
          {
            id: "stash-changes",
            title: "Switch branch",
            onSubmit: this.onSubmit,
            onDismissed: this.props.onDismissed,
            loading: e,
            disabled: e,
          },
          w.createElement(
            ig,
            null,
            this.renderStashActions(),
            this.renderStashOverwriteWarning()
          ),
          w.createElement(
            lg,
            null,
            w.createElement(cg, { okButtonText: "Switch branch" })
          )
        );
      }
      renderStashOverwriteWarning() {
        return this.props.hasAssociatedStash &&
          this.state.selectedStashAction === Rb.StashOnCurrentBranch
          ? w.createElement(
              Pd,
              null,
              w.createElement(vh, { symbol: wh.alert }),
              " Your current stash will be overwritten by creating a new stash"
            )
          : null;
      }
      renderStashActions() {
        const { branchToCheckout: e } = this.props,
          t = [
            {
              title: "Leave my changes on " + this.state.currentBranchName,
              description:
                "Your in-progress work will be stashed on this branch for you to return to later",
              key: Rb.StashOnCurrentBranch,
            },
            {
              title: "Bring my changes to " + e.name,
              description:
                "Your in-progress work will follow you to the new branch",
              key: Rb.MoveToNewBranch,
            },
          ];
        return w.createElement(
          Pd,
          null,
          w.createElement(bv, {
            label:
              "You have changes on this branch. What would you like to do with them?",
            items: t,
            selectedKey: this.state.selectedStashAction,
            onSelectionChanged: this.onSelectionChanged,
          })
        );
      }
    }
    class Db extends w.Component {
      constructor(e) {
        super(e),
          (this.onSubmit = async () => {
            const {
              dispatcher: e,
              repository: t,
              branchToCheckout: n,
              onDismissed: r,
            } = this.props;
            this.setState({ isLoading: !0 });
            try {
              if (null !== n) {
                const r = au.StashOnCurrentBranch;
                await e.checkoutBranch(t, n, r);
              } else await e.createStashForCurrentBranch(t, !1);
            } finally {
              this.setState({ isLoading: !1 });
            }
            r();
          }),
          (this.state = { isLoading: !1 });
      }
      render() {
        return w.createElement(
          sg,
          {
            id: "overwrite-stash",
            type: "warning",
            title: "Overwrite stash?",
            loading: this.state.isLoading,
            disabled: this.state.isLoading,
            onSubmit: this.onSubmit,
            onDismissed: this.props.onDismissed,
          },
          w.createElement(
            ig,
            null,
            w.createElement(
              Pd,
              null,
              "Are you sure you want to proceed? This will overwrite your existing stash with your current changes."
            )
          ),
          w.createElement(
            lg,
            null,
            w.createElement(cg, { destructive: !0, okButtonText: "Overwrite" })
          )
        );
      }
    }
    class Ab extends w.Component {
      constructor(e) {
        super(e),
          (this.onSubmit = async () => {
            const {
              dispatcher: e,
              repository: t,
              stash: n,
              onDismissed: r,
            } = this.props;
            this.setState({ isDiscarding: !0 });
            try {
              await e.dropStash(t, n);
            } finally {
              this.setState({ isDiscarding: !1 });
            }
            r();
          }),
          (this.state = { isDiscarding: !1 });
      }
      render() {
        return w.createElement(
          sg,
          {
            id: "discard-stash",
            type: "warning",
            title: "Discard stash?",
            loading: this.state.isDiscarding,
            disabled: this.state.isDiscarding,
            onSubmit: this.onSubmit,
            onDismissed: this.props.onDismissed,
          },
          w.createElement(
            ig,
            null,
            w.createElement(
              Pd,
              null,
              "Are you sure you want to discard these stashed changes?"
            )
          ),
          w.createElement(
            lg,
            null,
            w.createElement(cg, { destructive: !0, okButtonText: "Discard" })
          )
        );
      }
    }
    class _b extends w.Component {
      constructor() {
        super(...arguments),
          (this.onSubmit = () =>
            this.props.onCreateTutorialRepository(this.props.account));
      }
      renderProgress() {
        const { progress: e } = this.props;
        if (void 0 === e) return null;
        const t = e.description
          ? w.createElement("div", { className: "description" }, e.description)
          : null;
        return w.createElement(
          "div",
          { className: "progress-container" },
          w.createElement("div", null, e.title),
          w.createElement("progress", { value: e.value }),
          t
        );
      }
      render() {
        const { account: e, progress: t } = this.props,
          n = void 0 !== t;
        return w.createElement(
          sg,
          {
            id: "create-tutorial-repository-dialog",
            title: "开始教程",
            onDismissed: this.props.onDismissed,
            onSubmit: this.onSubmit,
            dismissable: !n,
            loading: n,
            disabled: n,
          },
          w.createElement(
            ig,
            null,
            w.createElement(
              "div",
              null,
              "这将在本地计算机上创建一个存储库，并将其推送到您的帐户 ",
              w.createElement(Om, null, "@", this.props.account.login),
              " 在",
              " ",
              w.createElement(_d, { uri: mt(e.endpoint) }, Cu(e)),
              "。"
            ),
            this.renderProgress()
          ),
          w.createElement(
            lg,
            null,
            w.createElement(cg, { okButtonText: "继续" })
          )
        );
      }
    }
    class Mb extends w.Component {
      constructor(e) {
        super(e),
          (this.onSignIn = async () => {
            this.setState({ loading: !0 }),
              await this.props.dispatcher.requestBrowserAuthenticationToDotcom(),
              this.props.dispatcher.push(this.props.repository),
              this.props.onDismissed();
          }),
          (this.state = { loading: !1 });
      }
      render() {
        return w.createElement(
          sg,
          {
            id: "workflow-push-rejected",
            title: "Push rejected",
            loading: this.state.loading,
            onDismissed: this.props.onDismissed,
            onSubmit: this.onSignIn,
            type: "error",
          },
          w.createElement(
            ig,
            null,
            w.createElement(
              "p",
              null,
              "The push was rejected by the server for containing a modification to the workflow file ",
              w.createElement(Om, null, this.props.rejectedPath),
              ". In order to be able to push to workflow files GitHub Desktop needs to request additional permissions."
            ),
            w.createElement(
              "p",
              null,
              "Would you like to open a browser to grant GitHub Desktop permission to update workflow files?"
            )
          ),
          w.createElement(
            lg,
            null,
            w.createElement(cg, { okButtonText: "Continue in browser" })
          )
        );
      }
    }
    class Pb extends w.Component {
      constructor(e) {
        super(e),
          (this.onSignIn = async () => {
            this.setState({ loading: !0 }),
              this.props.endpoint === gt()
                ? await this.props.dispatcher.beginDotComSignIn()
                : await this.props.dispatcher.beginEnterpriseSignIn(),
              await this.props.dispatcher.requestBrowserAuthentication(),
              void 0 !== this.props.retryAction &&
                this.props.dispatcher.performRetry(this.props.retryAction),
              this.props.onDismissed();
          }),
          (this.state = { loading: !1 });
      }
      render() {
        return w.createElement(
          sg,
          {
            title: "Re-authorization required",
            loading: this.state.loading,
            onDismissed: this.props.onDismissed,
            onSubmit: this.onSignIn,
            type: "error",
          },
          w.createElement(
            ig,
            null,
            w.createElement(
              "p",
              null,
              'The "',
              this.props.organizationName,
              "\" organization has enabled or enforced SAML SSO. To access this repository, you must sign in again and grant GitHub Desktop permission to access the organization's repositories."
            ),
            w.createElement(
              "p",
              null,
              "Would you like to open a browser to grant GitHub Desktop permission to access the repository?"
            )
          ),
          w.createElement(
            lg,
            null,
            w.createElement(cg, { okButtonText: "Continue in browser" })
          )
        );
      }
    }
    class Ib extends w.Component {
      constructor(e) {
        super(e),
          (this.onSubmit = async () => {
            this.setState({ loading: !0 });
            const { gitHubRepository: e } = this.props.repository,
              t = ht.fromAccount(this.props.account);
            try {
              const n = await t.forkRepository(e.owner.login, e.name);
              this.props.dispatcher.recordForkCreated();
              const r = await this.props.dispatcher.convertRepositoryToFork(
                this.props.repository,
                n
              );
              this.setState({ loading: !1 }),
                this.props.onDismissed(),
                uo(r) &&
                  this.props.dispatcher.showPopup({
                    type: ao.ChooseForkSettings,
                    repository: r,
                  });
            } catch (e) {
              log.error(`Fork creation through API failed (${e})`),
                xu("forkCreation", e),
                this.setState({ error: e, loading: !1 });
            }
          }),
          (this.state = { loading: !1 });
      }
      render() {
        return w.createElement(
          sg,
          {
            title: "Do you want to fork this repository?",
            onDismissed: this.props.onDismissed,
            onSubmit: this.state.error ? void 0 : this.onSubmit,
            dismissable: !this.state.loading,
            loading: this.state.loading,
            type: this.state.error ? "error" : "normal",
            key: this.props.repository.name,
            id: "create-fork",
          },
          void 0 !== this.state.error
            ? (function (e, t, n) {
                const r =
                  null !== e.gitHubRepository.htmlURL
                    ? w.createElement(
                        w.Fragment,
                        null,
                        "You can try ",
                        w.createElement(
                          _d,
                          { uri: e.gitHubRepository.htmlURL },
                          "creating the fork manually on GitHub"
                        ),
                        "."
                      )
                    : void 0;
                return w.createElement(
                  w.Fragment,
                  null,
                  w.createElement(
                    ig,
                    null,
                    w.createElement(
                      "div",
                      null,
                      "Creating your fork ",
                      w.createElement(
                        "strong",
                        null,
                        `${t.login}/${e.gitHubRepository.name}`
                      ),
                      " failed. ",
                      r
                    ),
                    w.createElement(
                      "details",
                      null,
                      w.createElement("summary", null, "Error details"),
                      w.createElement("pre", { className: "error" }, n.message)
                    )
                  ),
                  w.createElement(ug, null)
                );
              })(this.props.repository, this.props.account, this.state.error)
            : ((e = this.props.repository),
              (t = this.props.account),
              (n = this.state.loading),
              w.createElement(
                w.Fragment,
                null,
                w.createElement(
                  ig,
                  null,
                  w.createElement(
                    "p",
                    null,
                    "It looks like you don’t have write access to ",
                    w.createElement(
                      "strong",
                      null,
                      e.gitHubRepository.fullName
                    ),
                    ". If you should, please check with a repository administrator."
                  ),
                  w.createElement(
                    "p",
                    null,
                    " Do you want to create a fork of this repository at ",
                    w.createElement(
                      "strong",
                      null,
                      `${t.login}/${e.gitHubRepository.name}`
                    ),
                    " to continue?"
                  )
                ),
                w.createElement(
                  lg,
                  null,
                  w.createElement(cg, {
                    destructive: !0,
                    okButtonText: "Fork this repository",
                    okButtonDisabled: n,
                    cancelButtonDisabled: n,
                  })
                )
              ))
        );
        var e, t, n;
      }
    }
    class Ob extends w.Component {
      constructor(e) {
        super(e),
          (this.updateTagName = (e) => {
            this.setState({ tagName: e });
          }),
          (this.createTag = async () => {
            const e = this.state.tagName,
              t = this.props.repository;
            if (e.length > 0) {
              this.setState({ isCreatingTag: !0 });
              const n = Ap("create tag", t);
              await this.props.dispatcher.createTag(
                t,
                e,
                this.props.targetCommitSha
              ),
                n.done(),
                this.props.onDismissed();
            }
          }),
          (this.state = { tagName: e.initialName || "", isCreatingTag: !1 });
      }
      render() {
        const e = this.getCurrentError(),
          t = null !== e || 0 === this.state.tagName.length;
        return w.createElement(
          sg,
          {
            id: "create-tag",
            title: "Create a tag",
            onSubmit: this.createTag,
            onDismissed: this.props.onDismissed,
            loading: this.state.isCreatingTag,
            disabled: this.state.isCreatingTag,
          },
          e && w.createElement(ag, null, e),
          w.createElement(
            ig,
            null,
            w.createElement(my, {
              label: "Name",
              initialValue: this.props.initialName,
              onValueChange: this.updateTagName,
            })
          ),
          w.createElement(
            lg,
            null,
            w.createElement(cg, {
              okButtonText: "Create tag",
              okButtonDisabled: t,
            })
          )
        );
      }
      getCurrentError() {
        if (this.state.tagName.length > 245)
          return w.createElement(
            w.Fragment,
            null,
            "The tag name cannot be longer than ",
            245,
            " characters"
          );
        return this.props.localTags &&
          this.props.localTags.has(this.state.tagName)
          ? w.createElement(
              w.Fragment,
              null,
              "A tag named ",
              w.createElement(Om, null, this.state.tagName),
              " already exists"
            )
          : null;
      }
    }
    class Lb extends w.Component {
      constructor(e) {
        super(e),
          (this.DeleteTag = async () => {
            const { dispatcher: e, repository: t, tagName: n } = this.props;
            this.setState({ isDeleting: !0 }),
              await e.deleteTag(t, n),
              this.props.onDismissed();
          }),
          (this.state = { isDeleting: !1 });
      }
      render() {
        return w.createElement(
          sg,
          {
            id: "delete-tag",
            title: "Delete tag",
            type: "warning",
            onSubmit: this.DeleteTag,
            onDismissed: this.props.onDismissed,
            disabled: this.state.isDeleting,
            loading: this.state.isDeleting,
          },
          w.createElement(
            ig,
            null,
            w.createElement(
              "p",
              null,
              "Are you sure you want to delete the tag",
              " ",
              w.createElement(Om, null, this.props.tagName),
              "?"
            )
          ),
          w.createElement(
            lg,
            null,
            w.createElement(cg, { destructive: !0, okButtonText: "Delete" })
          )
        );
      }
    }
    class Fb extends w.Component {
      constructor(e) {
        super(e),
          (this.onSelectionChanged = (e) => {
            this.setState({ forkContributionTarget: e });
          }),
          (this.onSubmit = async () => {
            this.props.dispatcher.updateRepositoryWorkflowPreferences(
              this.props.repository,
              { forkContributionTarget: this.state.forkContributionTarget }
            ),
              this.props.onDismissed();
          }),
          (this.state = { forkContributionTarget: mo(e.repository) });
      }
      render() {
        const e = [
          {
            title: "To contribute to the parent project",
            description: w.createElement(
              w.Fragment,
              null,
              "We will help you contribute to the",
              " ",
              w.createElement(
                "strong",
                null,
                this.props.repository.gitHubRepository.parent.fullName
              ),
              " ",
              "repository"
            ),
            key: no.Parent,
          },
          {
            title: "For my own purposes",
            description: w.createElement(
              w.Fragment,
              null,
              "We will help you contribute to the",
              " ",
              w.createElement(
                "strong",
                null,
                this.props.repository.gitHubRepository.fullName
              ),
              " ",
              "repository"
            ),
            key: no.Self,
          },
        ];
        return w.createElement(
          sg,
          {
            id: "fork-settings",
            title: "How are you planning to use this fork?",
            onSubmit: this.onSubmit,
            onDismissed: this.props.onDismissed,
          },
          w.createElement(
            ig,
            null,
            w.createElement(
              Pd,
              null,
              w.createElement(bv, {
                label:
                  "You have changes on this branch. What would you like to do with them?",
                items: e,
                selectedKey: this.state.forkContributionTarget,
                onSelectionChanged: this.onSelectionChanged,
              })
            ),
            w.createElement(
              Pd,
              null,
              w.createElement(Iv, {
                repository: this.props.repository,
                forkContributionTarget: this.state.forkContributionTarget,
              })
            )
          ),
          w.createElement(
            lg,
            null,
            w.createElement(cg, { okButtonText: "继续" })
          )
        );
      }
    }
    class Nb extends w.Component {
      constructor(e) {
        super(e),
          (this.discard = async () => {
            this.setState({ isDiscardingSelection: !0 }),
              await this.props.dispatcher.discardChangesFromSelection(
                this.props.repository,
                this.props.file.path,
                this.props.diff,
                this.props.selection
              ),
              this.props.dispatcher.setConfirmDiscardChangesSetting(
                this.state.confirmDiscardSelection
              ),
              this.props.onDismissed();
          }),
          (this.onConfirmDiscardSelectionChanged = (e) => {
            const t = !e.currentTarget.checked;
            this.setState({ confirmDiscardSelection: t });
          }),
          (this.state = {
            isDiscardingSelection: !1,
            confirmDiscardSelection: !0,
          });
      }
      getOkButtonLabel() {
        return "Discard changes";
      }
      render() {
        const e = this.state.isDiscardingSelection;
        return w.createElement(
          sg,
          {
            id: "discard-changes",
            title: "Confirm discard changes",
            onDismissed: this.props.onDismissed,
            onSubmit: this.discard,
            dismissable: !e,
            loading: e,
            disabled: e,
            type: "warning",
          },
          w.createElement(
            ig,
            null,
            w.createElement(
              "p",
              null,
              "Are you sure you want to discard the selected changes to:"
            ),
            w.createElement(
              "ul",
              null,
              w.createElement(
                "li",
                null,
                w.createElement(Up, { path: this.props.file.path })
              )
            ),
            w.createElement(qd, {
              label: "Do not show this message again",
              value: this.state.confirmDiscardSelection ? $d.Off : $d.On,
              onChange: this.onConfirmDiscardSelectionChanged,
            })
          ),
          w.createElement(
            lg,
            null,
            w.createElement(cg, {
              destructive: !0,
              okButtonText: this.getOkButtonLabel(),
            })
          )
        );
      }
    }
    class Bb extends w.Component {
      constructor(e) {
        super(e),
          (this.onSubmit = async () => {
            const {
              hasExistingStash: e,
              repository: t,
              dispatcher: n,
              retryAction: r,
            } = this.props;
            if (e) return void this.props.onDismissed();
            this.setState({ stashingAndRetrying: !0 });
            (await n.createStashForCurrentBranch(t, !1)) &&
              (await n.performRetry(r)),
              this.props.onDismissed();
          }),
          (this.state = { stashingAndRetrying: !1 });
      }
      render() {
        const e =
          this.props.files.length > 0
            ? " The following files would be overwritten:"
            : null;
        return w.createElement(
          sg,
          {
            title: "Error",
            id: "local-changes-overwritten",
            loading: this.state.stashingAndRetrying,
            disabled: this.state.stashingAndRetrying,
            onDismissed: this.props.onDismissed,
            onSubmit: this.onSubmit,
            type: "error",
          },
          w.createElement(
            ig,
            null,
            w.createElement(
              "p",
              null,
              "Unable to ",
              this.getRetryActionName(),
              " when changes are present on your branch.",
              e
            ),
            this.renderFiles(),
            this.renderStashText()
          ),
          this.renderFooter()
        );
      }
      renderFiles() {
        const { files: e } = this.props;
        return 0 === e.length
          ? null
          : w.createElement(
              "div",
              { className: "files-list" },
              w.createElement(
                "ul",
                null,
                e.map((e) =>
                  w.createElement(
                    "li",
                    { key: e },
                    w.createElement(Up, { path: e })
                  )
                )
              )
            );
      }
      renderStashText() {
        return this.props.hasExistingStash && !this.state.stashingAndRetrying
          ? null
          : w.createElement(
              "p",
              null,
              "You can stash your changes now and recover them afterwards."
            );
      }
      renderFooter() {
        return this.props.hasExistingStash && !this.state.stashingAndRetrying
          ? w.createElement(ug, null)
          : w.createElement(
              lg,
              null,
              w.createElement(cg, {
                okButtonText: "Stash changes and continue",
                okButtonTitle:
                  "This will create a stash with your current changes. You can recover them by restoring the stash afterwards.",
                cancelButtonText: "Close",
              })
            );
      }
      getRetryActionName() {
        switch (this.props.retryAction.type) {
          case re.Checkout:
            return "checkout";
          case re.Pull:
            return "pull";
          case re.Merge:
            return "merge";
          case re.Rebase:
            return "rebase";
          case re.Clone:
            return "clone";
          case re.Fetch:
            return "fetch";
          case re.Push:
            return "push";
          default:
            X(
              this.props.retryAction,
              "Unknown retryAction: " + this.props.retryAction
            );
        }
      }
    }
    const Hb = { enter: 250, exit: 100 },
      zb = { enter: 500, exit: 400 };
    class Ub extends w.Component {
      constructor(e) {
        super(e),
          (this.loading = !0),
          (this.lastKeyPressed = null),
          (this.getOnPopupDismissedFn = hi((e) => () =>
            this.onPopupDismissed(e)
          )),
          (this.showAddLocalRepo = () =>
            this.props.dispatcher.showPopup({ type: ao.AddRepository })),
          (this.showCreateRepository = () => {
            this.props.dispatcher.showPopup({ type: ao.CreateRepository });
          }),
          (this.showCloneRepo = (e) => {
            let t = null;
            return (
              void 0 !== e &&
                (this.props.dispatcher.changeCloneRepositoriesTab(Ai.Generic),
                (t = e)),
              this.props.dispatcher.showPopup({
                type: ao.CloneRepository,
                initialURL: t,
              })
            );
          }),
          (this.showCreateTutorialRepositoryPopup = () => {
            const e = this.getDotComAccount() || this.getEnterpriseAccount();
            null !== e &&
              this.props.dispatcher.showPopup({
                type: ao.CreateTutorialRepository,
                account: e,
              });
          }),
          (this.onResumeTutorialRepository = () => {
            const e = this.getSelectedTutorialRepository();
            e && this.props.dispatcher.resumeTutorial(e);
          }),
          (this.onWindowKeyDown = (e) => {
            if (!e.defaultPrevented && !this.isShowingModal) {
              if (Ae())
                if ("Shift" === e.key && e.altKey)
                  this.props.dispatcher.setAccessKeyHighlightState(!1);
                else if ("Alt" === e.key) {
                  if (e.shiftKey) return;
                  this.state.currentFoldout &&
                    this.state.currentFoldout.type === j.AppMenu &&
                    this.state.appMenuState.length > 1 &&
                    (this.props.dispatcher.setAppMenuState((e) =>
                      e.withReset()
                    ),
                    this.props.dispatcher.closeFoldout(j.AppMenu)),
                    this.props.dispatcher.setAccessKeyHighlightState(!0);
                } else if (!e.altKey || e.ctrlKey || e.metaKey)
                  e.altKey ||
                    this.props.dispatcher.setAccessKeyHighlightState(!1);
                else if (this.state.appMenuState.length) {
                  const t = this.state.appMenuState[0].items,
                    n = Li(e.key, t);
                  n &&
                    Oi(n) &&
                    ("submenuItem" === n.type
                      ? (this.props.dispatcher.setAppMenuState((e) =>
                          e
                            .withReset()
                            .withSelectedItem(n)
                            .withOpenedMenu(n, !0)
                        ),
                        this.props.dispatcher.showFoldout({
                          type: j.AppMenu,
                          enableAccessKeyNavigation: !0,
                          openedWithAccessKey: !0,
                        }))
                      : this.props.dispatcher.executeMenuItem(n),
                    e.preventDefault());
                }
              this.lastKeyPressed = e.key;
            }
          }),
          (this.onWindowKeyUp = (e) => {
            e.defaultPrevented ||
              (Ae() &&
                "Alt" === e.key &&
                (this.props.dispatcher.setAccessKeyHighlightState(!1),
                "Alt" === this.lastKeyPressed &&
                  (this.state.currentFoldout &&
                  this.state.currentFoldout.type === j.AppMenu
                    ? (this.props.dispatcher.setAppMenuState((e) =>
                        e.withReset()
                      ),
                      this.props.dispatcher.closeFoldout(j.AppMenu))
                    : this.props.dispatcher.showFoldout({
                        type: j.AppMenu,
                        enableAccessKeyNavigation: !0,
                        openedWithAccessKey: !1,
                      }))));
          }),
          (this.removeRepository = (e) => {
            e &&
              (e instanceof Ui || e.missing
                ? this.props.dispatcher.removeRepository(e, !1)
                : this.state.askForConfirmationOnRepositoryRemoval
                ? this.props.dispatcher.showPopup({
                    type: ao.RemoveRepository,
                    repository: e,
                  })
                : this.props.dispatcher.removeRepository(e, !1));
          }),
          (this.onConfirmRepoRemoval = async (e, t) => {
            await this.props.dispatcher.removeRepository(e, t);
          }),
          (this.openCurrentRepositoryInShell = () => {
            const e = this.getRepository();
            e && this.openInShell(e);
          }),
          (this.onMenuBarLostFocus = () => {
            this.props.dispatcher.closeFoldout(j.AppMenu),
              this.props.dispatcher.setAppMenuState((e) => e.withReset());
          }),
          (this.onPopupDismissed = (e) => this.props.dispatcher.closePopup(e)),
          (this.onContinueWithUntrustedCertificate = (e) => {
            !(function (e, t) {
              r.ipcRenderer.send("show-certificate-trust-dialog", {
                certificate: e,
                message: t,
              });
            })(
              e,
              "Could not securely connect to the server, because its certificate is not trusted. Attackers might be trying to steal your information.\n\nTo connect unsafely, which may put your data at risk, you can “Always trust” the certificate and try again."
            );
          }),
          (this.onUpdateAvailableDismissed = () =>
            this.props.dispatcher.setUpdateBannerVisibility(!1)),
          (this.onExitTutorialToHomeScreen = () => {
            const e = this.getSelectedTutorialRepository();
            return !!e && (this.props.dispatcher.pauseTutorial(e), !0);
          }),
          (this.onCreateTutorialRepository = (e) => {
            this.props.dispatcher.createTutorialRepository(e);
          }),
          (this.onShowRebaseConflictsBanner = (e, t) => {
            this.props.dispatcher.setBanner({
              type: su.RebaseConflictsFound,
              targetBranch: t,
              onOpenDialog: async () => {
                const {
                    changesState: t,
                  } = this.props.repositoryStateManager.get(e),
                  { conflictState: n } = t;
                if (null === n || "merge" === n.kind)
                  return void log.debug(
                    "[App.onShowRebaseConflictsBanner] no conflict state found, ignoring..."
                  );
                await this.props.dispatcher.setRebaseProgressFromState(e);
                const r = vl(n);
                this.props.dispatcher.setRebaseFlowStep(e, r),
                  this.props.dispatcher.showPopup({
                    type: ao.RebaseFlow,
                    repository: e,
                  });
              },
            });
          }),
          (this.onRebaseFlowEnded = (e) => {
            this.props.dispatcher.endRebaseFlow(e);
          }),
          (this.onSetStatsOptOut = (e) => {
            this.props.appStore.setStatsOptOut(e, !0),
              this.props.appStore.markUsageStatsNoteSeen(),
              this.props.appStore._reportStats();
          }),
          (this.openUsageDataUrl = () => {
            this.props.dispatcher.openInBrowser(oh);
          }),
          (this.onUpdateExistingUpstreamRemote = (e) => {
            this.props.dispatcher.updateExistingUpstreamRemote(e);
          }),
          (this.onIgnoreExistingUpstreamRemote = (e) => {
            this.props.dispatcher.ignoreExistingUpstreamRemote(e);
          }),
          (this.updateExistingLFSFilters = () => {
            this.props.dispatcher.installGlobalLFSFilters(!0);
          }),
          (this.initializeLFS = (e) => {
            this.props.dispatcher.installLFSHooks(e);
          }),
          (this.onCloneRepositoriesTabSelected = (e) => {
            this.props.dispatcher.changeCloneRepositoriesTab(e);
          }),
          (this.onRefreshRepositories = (e) => {
            this.props.dispatcher.refreshApiRepositories(e);
          }),
          (this.onShowAdvancedPreferences = () => {
            this.props.dispatcher.showPopup({
              type: ao.Preferences,
              initialSelectedTab: hh.Advanced,
            });
          }),
          (this.onOpenShellIgnoreWarning = (e) => {
            this.props.dispatcher.openShell(e, !0);
          }),
          (this.onSaveCredentials = async (e, t, n, r) => {
            await this.props.dispatcher.saveGenericGitCredentials(e, t, n),
              this.props.dispatcher.performRetry(r);
          }),
          (this.onCheckForUpdates = () => this.checkForUpdates(!1)),
          (this.showAcknowledgements = () => {
            this.props.dispatcher.showPopup({ type: ao.Acknowledgements });
          }),
          (this.showTermsAndConditions = () => {
            this.props.dispatcher.showPopup({ type: ao.TermsAndConditions });
          }),
          (this.clearError = (e) => this.props.dispatcher.clearError(e)),
          (this.onConfirmDiscardChangesChanged = (e) => {
            this.props.dispatcher.setConfirmDiscardChangesSetting(e);
          }),
          (this.onRetryAction = (e) => {
            this.props.dispatcher.performRetry(e);
          }),
          (this.showPopup = (e) => {
            this.props.dispatcher.showPopup(e);
          }),
          (this.renderRepositoryList = () => {
            const e = this.state.selectedState
                ? this.state.selectedState.repository
                : null,
              t = this.state.selectedExternalEditor
                ? this.state.selectedExternalEditor
                : void 0,
              n = this.state.selectedShell,
              r = this.state.repositoryFilterText;
            return w.createElement(Vd, {
              filterText: r,
              onFilterTextChanged: this.onRepositoryFilterTextChanged,
              selectedRepository: e,
              onSelectionChanged: this.onSelectionChanged,
              repositories: this.state.repositories,
              recentRepositories: this.state.recentRepositories,
              localRepositoryStateLookup: this.state.localRepositoryStateLookup,
              askForConfirmationOnRemoveRepository: this.state
                .askForConfirmationOnRepositoryRemoval,
              onRemoveRepository: this.removeRepository,
              onOpenInShell: this.openInShell,
              onShowRepository: this.showRepository,
              onOpenInExternalEditor: this.openInExternalEditor,
              externalEditorLabel: t,
              shellLabel: n,
              dispatcher: this.props.dispatcher,
            });
          }),
          (this.openInShell = (e) => {
            e instanceof lo && this.props.dispatcher.openShell(e.path);
          }),
          (this.openFileInExternalEditor = (e) => {
            this.props.dispatcher.openInExternalEditor(e);
          }),
          (this.openInExternalEditor = (e) => {
            e instanceof lo &&
              this.props.dispatcher.openInExternalEditor(e.path);
          }),
          (this.showRepository = (e) => {
            e instanceof lo && te.showFolderContents(e.path);
          }),
          (this.onRepositoryDropdownStateChanged = (e) => {
            "open" === e
              ? this.props.dispatcher.showFoldout({ type: j.Repository })
              : this.props.dispatcher.closeFoldout(j.Repository);
          }),
          (this.onExitTutorial = () => {
            1 === this.state.repositories.length &&
            yu(this.state.currentOnboardingTutorialStep)
              ? this.props.dispatcher.showPopup({
                  type: ao.ConfirmExitTutorial,
                })
              : this.onRepositoryDropdownStateChanged("open");
          }),
          (this.showCreateBranch = () => {
            const e = this.state.selectedState;
            if (!e || e.type !== W.Repository) return;
            if (e.state.branchesState.tip.kind === so.Unknown) return;
            const t = e.repository;
            return this.props.dispatcher.showPopup({
              type: ao.CreateBranch,
              repository: t,
            });
          }),
          (this.openPullRequest = () => {
            const e = this.state.selectedState;
            if (null == e || e.type !== W.Repository) return;
            const t = e.state.branchesState.currentPullRequest,
              n = this.props.dispatcher;
            null == t
              ? (n.createPullRequest(e.repository), n.recordCreatePullRequest())
              : n.showPullRequest(e.repository);
          }),
          (this.openCreatePullRequestInBrowser = (e, t) => {
            this.props.dispatcher.openCreatePullRequestInBrowser(e, t);
          }),
          (this.onBranchDropdownStateChanged = (e) => {
            "open" === e
              ? this.props.dispatcher.showFoldout({ type: j.Branch })
              : this.props.dispatcher.closeFoldout(j.Branch);
          }),
          (this.onBannerDismissed = () => {
            this.props.dispatcher.clearBanner();
          }),
          (this.onRepositoryFilterTextChanged = (e) => {
            this.props.dispatcher.setRepositoryFilterText(e);
          }),
          (this.onSelectionChanged = (e) => {
            this.props.dispatcher.selectRepository(e),
              this.props.dispatcher.closeFoldout(j.Repository);
          }),
          (this.onViewCommitOnGitHub = async (e) => {
            const t = this.getRepository();
            if (!t || t instanceof Ui || !t.gitHubRepository) return;
            const n = t.gitHubRepository.htmlURL;
            n && this.props.dispatcher.openInBrowser(`${n}/commit/${e}`);
          }),
          (this.onBranchDeleted = (e) => {
            this.props.dispatcher.executeCompare(e, { kind: $.History });
          }),
          e.dispatcher.loadInitialState().then(() => {
            (this.loading = !1),
              this.forceUpdate(),
              requestIdleCallback(
                () => {
                  const t = performance.now();
                  var n;
                  (n = t - e.startTime),
                    r.ipcRenderer.send("renderer-ready", n),
                    requestIdleCallback(() => {
                      this.performDeferredLaunchActions();
                    });
                },
                { timeout: 100 }
              );
          }),
          (this.state = e.appStore.getState()),
          e.appStore.onDidUpdate((e) => {
            this.setState(e);
          }),
          e.appStore.onDidError((t) => {
            e.dispatcher.postError(t);
          }),
          r.ipcRenderer.on("menu-event", (e, { name: t }) => {
            this.onMenuEvent(t);
          }),
          De.onDidChange((e) => {
            e.status === Te.UpdateReady &&
              this.props.dispatcher.setUpdateBannerVisibility(!0);
          }),
          De.onError((e) => {
            log.error("Error checking for updates", e),
              this.props.dispatcher.postError(e);
          }),
          r.ipcRenderer.on("launch-timing-stats", (e, { stats: t }) => {
            console.info(`App ready time: ${t.mainReadyTime}ms`),
              console.info(`Load time: ${t.loadTime}ms`),
              console.info(`Renderer ready time: ${t.rendererReadyTime}ms`),
              this.props.dispatcher.recordLaunchStats(t);
          }),
          r.ipcRenderer.on(
            "certificate-error",
            (e, { certificate: t, error: n, url: r }) => {
              this.props.dispatcher.showPopup({
                type: ao.UntrustedCertificate,
                certificate: t,
                url: r,
              });
            }
          );
      }
      get isShowingModal() {
        return null !== this.state.currentPopup || this.state.errors.length > 0;
      }
      componentWillUnmount() {
        window.clearInterval(this.updateIntervalHandle);
      }
      performDeferredLaunchActions() {
        this.props.appStore.loadEmoji(),
          this.props.dispatcher.reportStats(),
          setInterval(() => this.props.dispatcher.reportStats(), 144e5),
          this.props.dispatcher.installGlobalLFSFilters(!1),
          setInterval(() => this.checkForUpdates(!0), 144e5),
          this.checkForUpdates(!0),
          log.info(`launching: ${He()} (${pi()})`),
          log.info(`execPath: '${process.execPath}'`);
      }
      onMenuEvent(e) {
        if (!this.state.errors.length)
          switch (e) {
            case "push":
              return this.push();
            case "force-push":
              return this.push({ forceWithLease: !0 });
            case "pull":
              return this.pull();
            case "show-changes":
              return this.showChanges();
            case "show-history":
              return this.showHistory();
            case "choose-repository":
              return this.chooseRepository();
            case "add-local-repository":
              return this.showAddLocalRepo();
            case "create-branch":
              return this.showCreateBranch();
            case "show-branches":
              return this.showBranches();
            case "remove-repository":
              return this.removeRepository(this.getRepository());
            case "create-repository":
              return this.showCreateRepository();
            case "rename-branch":
              return this.renameBranch();
            case "delete-branch":
              return this.deleteBranch();
            case "discard-all-changes":
              return this.discardAllChanges();
            case "stash-all-changes":
              return this.stashAllChanges();
            case "show-preferences":
              return this.props.dispatcher.showPopup({ type: ao.Preferences });
            case "open-working-directory":
              return this.openCurrentRepositoryWorkingDirectory();
            case "update-branch":
              return (
                this.props.dispatcher.recordMenuInitiatedUpdate(),
                this.updateBranch()
              );
            case "compare-to-branch":
              return this.showHistory(!0);
            case "merge-branch":
              return (
                this.props.dispatcher.recordMenuInitiatedMerge(),
                this.mergeBranch()
              );
            case "rebase-branch":
              return (
                this.props.dispatcher.recordMenuInitiatedRebase(),
                this.showRebaseDialog()
              );
            case "show-repository-settings":
              return this.showRepositorySettings();
            case "view-repository-on-github":
              return this.viewRepositoryOnGitHub();
            case "compare-on-github":
              return this.compareBranchOnDotcom();
            case "create-issue-in-repository-on-github":
              return this.openIssueCreationOnGitHub();
            case "open-in-shell":
              return this.openCurrentRepositoryInShell();
            case "clone-repository":
              return this.showCloneRepo();
            case "show-about":
              return this.showAbout();
            case "boomtown":
              return this.boomtown();
            case "go-to-commit-message":
              return this.goToCommitMessage();
            case "open-pull-request":
              return this.openPullRequest();
            case "install-cli":
              return this.props.dispatcher.installCLI();
            case "open-external-editor":
              return this.openCurrentRepositoryInExternalEditor();
            case "select-all":
              return this.selectAll();
            case "show-release-notes-popup":
              return this.showFakeReleaseNotesPopup();
            case "show-stashed-changes":
              return this.showStashedChanges();
            case "hide-stashed-changes":
              return this.hideStashedChanges();
            case "test-prune-branches":
              return this.testPruneBranches();
            case "find-text":
              return this.findText();
            default:
              return X(0, "Unknown menu event name: " + e);
          }
      }
      showFakeReleaseNotesPopup() {
        0;
      }
      testPruneBranches() {}
      selectAll() {
        const e = new CustomEvent("select-all", {
          bubbles: !0,
          cancelable: !0,
        });
        null != document.activeElement &&
          document.activeElement.dispatchEvent(e) &&
          r.remote.getCurrentWebContents().selectAll();
      }
      findText() {
        const e = new CustomEvent("find-text", { bubbles: !0, cancelable: !0 });
        null != document.activeElement
          ? document.activeElement.dispatchEvent(e)
          : document.dispatchEvent(e);
      }
      boomtown() {
        setImmediate(() => {
          throw new Error("Boomtown!");
        });
      }
      async goToCommitMessage() {
        await this.showChanges(),
          this.props.dispatcher.setCommitMessageFocus(!0);
      }
      checkForUpdates(e) {
        De.checkForUpdates(e);
      }
      getDotComAccount() {
        return this.state.accounts.find((e) => e.endpoint === gt()) || null;
      }
      getEnterpriseAccount() {
        return this.state.accounts.find((e) => e.endpoint !== gt()) || null;
      }
      updateBranch() {
        const { selectedState: e } = this.state;
        if (null == e || e.type !== W.Repository) return;
        const { state: t } = e,
          n = t.branchesState.defaultBranch;
        if (!n) return;
        const { mergeStatus: r } = t.compareState;
        this.props.dispatcher.mergeBranch(e.repository, n.name, r);
      }
      mergeBranch() {
        const e = this.state.selectedState;
        null != e &&
          e.type === W.Repository &&
          this.props.dispatcher.showPopup({
            type: ao.MergeBranch,
            repository: e.repository,
          });
      }
      compareBranchOnDotcom() {
        const e = this.getCurrentRepositoryGitHubURL();
        if (!e) return;
        const t = this.state.selectedState;
        if (null == t || t.type !== W.Repository) return;
        const n = t.state.branchesState.tip;
        if (n.kind !== so.Valid || !n.branch.upstreamWithoutRemote) return;
        const r = `${e}/compare/${n.branch.upstreamWithoutRemote}`;
        this.props.dispatcher.openInBrowser(r);
      }
      openCurrentRepositoryWorkingDirectory() {
        const e = this.state.selectedState;
        null != e &&
          e.type === W.Repository &&
          this.showRepository(e.repository);
      }
      renameBranch() {
        const e = this.state.selectedState;
        if (null == e || e.type !== W.Repository) return;
        const t = e.state.branchesState.tip;
        t.kind === so.Valid &&
          this.props.dispatcher.showPopup({
            type: ao.RenameBranch,
            repository: e.repository,
            branch: t.branch,
          });
      }
      deleteBranch() {
        const e = this.state.selectedState;
        if (null === e || e.type !== W.Repository) return;
        const t = e.state.branchesState.tip;
        if (t.kind === so.Valid) {
          const n = e.state.branchesState.currentPullRequest;
          if (null !== n)
            this.props.dispatcher.showPopup({
              type: ao.DeletePullRequest,
              repository: e.repository,
              branch: t.branch,
              pullRequest: n,
            });
          else {
            const n = null !== e.state.aheadBehind;
            this.props.dispatcher.showPopup({
              type: ao.DeleteBranch,
              repository: e.repository,
              branch: t.branch,
              existsOnRemote: n,
            });
          }
        }
      }
      discardAllChanges() {
        const e = this.state.selectedState;
        if (null == e || e.type !== W.Repository) return;
        const { workingDirectory: t } = e.state.changesState;
        this.props.dispatcher.showPopup({
          type: ao.ConfirmDiscardChanges,
          repository: e.repository,
          files: t.files,
          showDiscardChangesSetting: !1,
          discardingAllChanges: !0,
        });
      }
      stashAllChanges() {
        const e = this.getRepository();
        null !== e &&
          e instanceof lo &&
          this.props.dispatcher.createStashForCurrentBranch(e);
      }
      getSelectedTutorialRepository() {
        const { selectedState: e } = this.state,
          t = e && e.type === W.Repository ? e.repository : null;
        return t && t.isTutorialRepository ? t : null;
      }
      showAbout() {
        this.props.dispatcher.showPopup({ type: ao.About });
      }
      async showHistory(e = !1) {
        const t = this.state.selectedState;
        null != t &&
          t.type === W.Repository &&
          (await this.props.dispatcher.closeCurrentFoldout(),
          await this.props.dispatcher.initializeCompare(t.repository, {
            kind: $.History,
          }),
          await this.props.dispatcher.changeRepositorySection(
            t.repository,
            V.History
          ),
          await this.props.dispatcher.updateCompareForm(t.repository, {
            filterText: "",
            showBranchList: e,
          }));
      }
      showChanges() {
        const e = this.state.selectedState;
        if (null != e && e.type === W.Repository)
          return (
            this.props.dispatcher.closeCurrentFoldout(),
            this.props.dispatcher.changeRepositorySection(
              e.repository,
              V.Changes
            )
          );
      }
      chooseRepository() {
        return this.state.currentFoldout &&
          this.state.currentFoldout.type === j.Repository
          ? this.props.dispatcher.closeFoldout(j.Repository)
          : this.props.dispatcher.showFoldout({ type: j.Repository });
      }
      showBranches() {
        const e = this.state.selectedState;
        if (null != e && e.type === W.Repository)
          return this.state.currentFoldout &&
            this.state.currentFoldout.type === j.Branch
            ? this.props.dispatcher.closeFoldout(j.Branch)
            : this.props.dispatcher.showFoldout({ type: j.Branch });
      }
      push(e) {
        const t = this.state.selectedState;
        null != t &&
          t.type === W.Repository &&
          (e && e.forceWithLease
            ? this.props.dispatcher.confirmOrForcePush(t.repository)
            : this.props.dispatcher.push(t.repository));
      }
      async pull() {
        const e = this.state.selectedState;
        null != e &&
          e.type === W.Repository &&
          this.props.dispatcher.pull(e.repository);
      }
      showStashedChanges() {
        const e = this.state.selectedState;
        null != e &&
          e.type === W.Repository &&
          this.props.dispatcher.selectStashedFile(e.repository);
      }
      hideStashedChanges() {
        const e = this.state.selectedState;
        null != e &&
          e.type === W.Repository &&
          this.props.dispatcher.hideStashedChanges(e.repository);
      }
      componentDidMount() {
        (document.ondragover = (e) => {
          null != e.dataTransfer &&
            (this.isShowingModal
              ? (e.dataTransfer.dropEffect = "none")
              : (e.dataTransfer.dropEffect = "copy")),
            e.preventDefault();
        }),
          (document.ondrop = (e) => {
            e.preventDefault();
          }),
          (document.body.ondrop = (e) => {
            if (!this.isShowingModal) {
              if (null != e.dataTransfer) {
                const t = e.dataTransfer.files;
                this.handleDragAndDrop(t);
              }
              e.preventDefault();
            }
          }),
          Ae() &&
            (window.addEventListener("keydown", this.onWindowKeyDown),
            window.addEventListener("keyup", this.onWindowKeyUp));
      }
      async handleDragAndDrop(e) {
        var t;
        const n = [...e].map((e) => e.path),
          { dispatcher: r } = this.props;
        if (n.length > 1) {
          const e = await r.addRepositories(n);
          e.length > 0 &&
            (r.recordAddExistingRepository(), await r.selectRepository(e[0]));
        } else if (1 === n.length) {
          const e = n[0],
            i = null !== (t = await Tc(e)) && void 0 !== t ? t : e,
            { repositories: o } = this.state,
            s = Tt(o, i);
          s
            ? await r.selectRepository(s)
            : await this.showPopup({ type: ao.AddRepository, path: i });
        }
      }
      getRepository() {
        const e = this.state.selectedState;
        return null == e ? null : e.repository;
      }
      showRebaseDialog() {
        const e = this.getRepository();
        if (!e || e instanceof Ui) return;
        const t = (function (e) {
          const {
            defaultBranch: t,
            allBranches: n,
            recentBranches: r,
            tip: i,
          } = e.branchesState;
          let o = null;
          if (i.kind !== so.Valid)
            throw new Error(
              "Tip is not in a valid state, which is required to start the rebase flow"
            );
          return (
            (o = i.branch),
            {
              kind: "ChooseBranch",
              defaultBranch: t,
              currentBranch: o,
              allBranches: n,
              recentBranches: r,
            }
          );
        })(this.props.repositoryStateManager.get(e));
        this.props.dispatcher.setRebaseFlowStep(e, t),
          this.props.dispatcher.showPopup({
            type: ao.RebaseFlow,
            repository: e,
          });
      }
      showRepositorySettings() {
        const e = this.getRepository();
        !e ||
          e instanceof Ui ||
          this.props.dispatcher.showPopup({
            type: ao.RepositorySettings,
            repository: e,
          });
      }
      openIssueCreationOnGitHub() {
        const e = this.getRepository();
        e instanceof lo && this.props.dispatcher.openIssueCreationPage(e);
      }
      viewRepositoryOnGitHub() {
        const e = this.getRepository();
        if (e instanceof lo) {
          const t = po(e);
          t && this.props.dispatcher.openInBrowser(t);
        }
      }
      getCurrentRepositoryGitHubURL() {
        const e = this.getRepository();
        return !e || e instanceof Ui || !e.gitHubRepository
          ? null
          : e.gitHubRepository.htmlURL;
      }
      openCurrentRepositoryInExternalEditor() {
        const e = this.getRepository();
        e && this.openInExternalEditor(e);
      }
      renderAppMenuBar() {
        if (!this.state.appMenuState.length) return null;
        if (this.state.showWelcomeFlow) return null;
        const e = this.state.currentFoldout,
          t = e && e.type === j.AppMenu ? e : null;
        return w.createElement(iv, {
          appMenu: this.state.appMenuState,
          dispatcher: this.props.dispatcher,
          highlightAppMenuAccessKeys: this.state.highlightAccessKeys,
          foldoutState: t,
          onLostFocus: this.onMenuBarLostFocus,
        });
      }
      renderTitlebar() {
        const e = "full-screen" === this.state.windowState,
          t =
            this.state.currentFoldout &&
            this.state.currentFoldout.type === j.AppMenu;
        if (e && !t) return null;
        const n = !this.state.showWelcomeFlow,
          r = this.state.showWelcomeFlow,
          i = (this.inNoRepositoriesViewState(), r ? "light" : "dark");
        return w.createElement(
          Eh,
          {
            showAppIcon: n,
            titleBarStyle: i,
            windowState: this.state.windowState,
            windowZoomFactor: this.state.windowZoomFactor,
          },
          this.renderAppMenuBar()
        );
      }
      currentPopupContent() {
        if (this.state.errors.length) return null;
        const e = this.state.currentPopup;
        if (!e) return null;
        const t = this.getOnPopupDismissedFn(e.type);
        switch (e.type) {
          case ao.RenameBranch:
            const n =
              null !== this.state.selectedState &&
              this.state.selectedState.type === W.Repository
                ? this.state.selectedState.state.changesState.stashEntry
                : null;
            return w.createElement(gy, {
              key: "rename-branch",
              dispatcher: this.props.dispatcher,
              repository: e.repository,
              branch: e.branch,
              stash: n,
              onDismissed: t,
            });
          case ao.DeleteBranch:
            return w.createElement(yy, {
              key: "delete-branch",
              dispatcher: this.props.dispatcher,
              repository: e.repository,
              branch: e.branch,
              existsOnRemote: e.existsOnRemote,
              onDismissed: t,
              onDeleted: this.onBranchDeleted,
            });
          case ao.ConfirmDiscardChanges:
            const r =
                void 0 === e.showDiscardChangesSetting ||
                e.showDiscardChangesSetting,
              i = void 0 !== e.discardingAllChanges && e.discardingAllChanges;
            return w.createElement(_y, {
              key: "discard-changes",
              repository: e.repository,
              dispatcher: this.props.dispatcher,
              files: e.files,
              confirmDiscardChanges: this.state
                .askForConfirmationOnDiscardChanges,
              showDiscardChangesSetting: r,
              discardingAllChanges: i,
              onDismissed: t,
              onConfirmDiscardChangesChanged: this
                .onConfirmDiscardChangesChanged,
            });
          case ao.ConfirmDiscardSelection:
            return w.createElement(Nb, {
              key: "discard-selection",
              repository: e.repository,
              dispatcher: this.props.dispatcher,
              file: e.file,
              diff: e.diff,
              selection: e.selection,
              onDismissed: t,
            });
          case ao.Preferences:
            return w.createElement(Rv, {
              key: "preferences",
              initialSelectedTab: e.initialSelectedTab,
              dispatcher: this.props.dispatcher,
              dotComAccount: this.getDotComAccount(),
              confirmRepositoryRemoval: this.state
                .askForConfirmationOnRepositoryRemoval,
              confirmDiscardChanges: this.state
                .askForConfirmationOnDiscardChanges,
              confirmForcePush: this.state.askForConfirmationOnForcePush,
              uncommittedChangesStrategy: this.state.uncommittedChangesStrategy,
              selectedExternalEditor: this.state.selectedExternalEditor,
              optOutOfUsageTracking: this.state.optOutOfUsageTracking,
              enterpriseAccount: this.getEnterpriseAccount(),
              onDismissed: t,
              selectedShell: this.state.selectedShell,
              selectedTheme: this.state.selectedTheme,
              automaticallySwitchTheme: this.state.automaticallySwitchTheme,
              repositoryIndicatorsEnabled: this.state
                .repositoryIndicatorsEnabled,
            });
          case ao.MergeBranch: {
            const { repository: n, branch: r } = e,
              i = this.props.repositoryStateManager.get(n),
              o = i.branchesState.tip;
            if (o.kind !== so.Valid) return null;
            const s = o.branch;
            return w.createElement(Dv, {
              key: "merge-branch",
              dispatcher: this.props.dispatcher,
              repository: n,
              allBranches: i.branchesState.allBranches,
              defaultBranch: i.branchesState.defaultBranch,
              recentBranches: i.branchesState.recentBranches,
              currentBranch: s,
              initialBranch: r,
              onDismissed: t,
            });
          }
          case ao.RepositorySettings: {
            const n = e.repository,
              r = this.props.repositoryStateManager.get(n);
            return w.createElement(Fv, {
              key: "repository-settings-" + n.hash,
              remote: r.remote,
              dispatcher: this.props.dispatcher,
              repository: n,
              onDismissed: t,
            });
          }
          case ao.SignIn:
            return w.createElement(yw, {
              key: "sign-in",
              signInState: this.state.signInState,
              dispatcher: this.props.dispatcher,
              onDismissed: t,
            });
          case ao.AddRepository:
            return w.createElement($v, {
              key: "add-existing-repository",
              onDismissed: t,
              dispatcher: this.props.dispatcher,
              path: e.path,
            });
          case ao.CreateRepository:
            return w.createElement(rw, {
              key: "create-repository",
              onDismissed: t,
              dispatcher: this.props.dispatcher,
              initialPath: e.path,
            });
          case ao.CloneRepository:
            return w.createElement(dw, {
              key: "clone-repository",
              dotComAccount: this.getDotComAccount(),
              enterpriseAccount: this.getEnterpriseAccount(),
              initialURL: e.initialURL,
              onDismissed: t,
              dispatcher: this.props.dispatcher,
              selectedTab: this.state.selectedCloneRepositoryTab,
              onTabSelected: this.onCloneRepositoriesTabSelected,
              apiRepositories: this.state.apiRepositories,
              onRefreshRepositories: this.onRefreshRepositories,
            });
          case ao.CreateBranch: {
            const n = this.props.repositoryStateManager.get(e.repository)
                .branchesState,
              r = e.repository;
            if (n.tip.kind === so.Unknown) return t(), null;
            let i = null,
              o = null;
            return (
              co(r) &&
                ((i = fo(r)),
                (o = (function (e, t) {
                  const n = fo(e);
                  if (n === e.gitHubRepository) return null;
                  const r = t.find(
                    (e) =>
                      e.type === Ri.Remote &&
                      e.name === "upstream/" + n.defaultBranch
                  );
                  return void 0 !== r ? r : null;
                })(r, n.allBranches))),
              w.createElement(fw, {
                key: "create-branch",
                tip: n.tip,
                defaultBranch: n.defaultBranch,
                upstreamDefaultBranch: o,
                allBranches: n.allBranches,
                repository: r,
                upstreamGitHubRepository: i,
                onDismissed: t,
                dispatcher: this.props.dispatcher,
                initialName: e.initialName || "",
              })
            );
          }
          case ao.InstallGit:
            return w.createElement(vw, {
              key: "install-git",
              onDismissed: t,
              onOpenShell: this.onOpenShellIgnoreWarning,
              path: e.path,
            });
          case ao.About:
            const o = He();
            return w.createElement(Sw, {
              key: "about",
              onDismissed: t,
              applicationName: (Le || (Le = Be().getName()), Le),
              applicationVersion: o,
              onCheckForUpdates: this.onCheckForUpdates,
              onShowAcknowledgements: this.showAcknowledgements,
              onShowTermsAndConditions: this.showTermsAndConditions,
            });
          case ao.PublishRepository:
            return w.createElement(xw, {
              key: "publish",
              dispatcher: this.props.dispatcher,
              repository: e.repository,
              accounts: this.state.accounts,
              onDismissed: t,
            });
          case ao.UntrustedCertificate:
            return w.createElement(Dw, {
              key: "untrusted-certificate",
              certificate: e.certificate,
              url: e.url,
              onDismissed: t,
              onContinue: this.onContinueWithUntrustedCertificate,
            });
          case ao.Acknowledgements:
            return w.createElement(Rw, {
              key: "acknowledgements",
              onDismissed: t,
              applicationVersion: He(),
            });
          case ao.RemoveRepository:
            return w.createElement(Mw, {
              key: "confirm-remove-repository",
              repository: e.repository,
              onConfirmation: this.onConfirmRepoRemoval,
              onDismissed: t,
            });
          case ao.TermsAndConditions:
            return w.createElement(Iw, {
              key: "terms-and-conditions",
              onDismissed: t,
            });
          case ao.PushBranchCommits:
            return w.createElement(dg, {
              key: "push-branch-commits",
              dispatcher: this.props.dispatcher,
              repository: e.repository,
              branch: e.branch,
              unPushedCommits: e.unPushedCommits,
              onConfirm: this.openCreatePullRequestInBrowser,
              onDismissed: t,
            });
          case ao.CLIInstalled:
            return w.createElement(Hw, {
              key: "cli-installed",
              onDismissed: t,
            });
          case ao.GenericGitAuthentication:
            return w.createElement(zw, {
              key: "generic-git-authentication",
              hostname: e.hostname,
              onDismiss: t,
              onSave: this.onSaveCredentials,
              retryAction: e.retryAction,
            });
          case ao.ExternalEditorFailed:
            const s = e.openPreferences,
              a = e.suggestAtom;
            return w.createElement(ww, {
              key: "editor-error",
              message: e.message,
              onDismissed: t,
              showPreferencesDialog: this.onShowAdvancedPreferences,
              viewPreferences: s,
              suggestAtom: a,
            });
          case ao.OpenShellFailed:
            return w.createElement(Uw, {
              key: "shell-error",
              message: e.message,
              onDismissed: t,
              showPreferencesDialog: this.onShowAdvancedPreferences,
            });
          case ao.InitializeLFS:
            return w.createElement(jw, {
              key: "initialize-lfs",
              repositories: e.repositories,
              onDismissed: t,
              onInitialize: this.initializeLFS,
            });
          case ao.LFSAttributeMismatch:
            return w.createElement(Vw, {
              key: "lsf-attribute-mismatch",
              onDismissed: t,
              onUpdateExistingFilters: this.updateExistingLFSFilters,
            });
          case ao.UpstreamAlreadyExists:
            return w.createElement(Gw, {
              key: "upstream-already-exists",
              repository: e.repository,
              existingRemote: e.existingRemote,
              onDismissed: t,
              onUpdate: this.onUpdateExistingUpstreamRemote,
              onIgnore: this.onIgnoreExistingUpstreamRemote,
            });
          case ao.ReleaseNotes:
            return w.createElement(Qw, {
              key: "release-notes",
              emoji: this.state.emoji,
              newRelease: e.newRelease,
              onDismissed: t,
            });
          case ao.DeletePullRequest:
            return w.createElement(Zw, {
              key: "delete-pull-request",
              dispatcher: this.props.dispatcher,
              repository: e.repository,
              branch: e.branch,
              onDismissed: t,
              pullRequest: e.pullRequest,
            });
          case ao.MergeConflicts: {
            const { selectedState: n } = this.state;
            if (null === n || n.type !== W.Repository) return null;
            const {
              workingDirectory: r,
              conflictState: i,
            } = n.state.changesState;
            return null === i || "rebase" === i.kind
              ? null
              : w.createElement(db, {
                  key: "merge-conflicts-dialog",
                  dispatcher: this.props.dispatcher,
                  repository: e.repository,
                  workingDirectory: r,
                  onDismissed: t,
                  openFileInExternalEditor: this.openFileInExternalEditor,
                  resolvedExternalEditor: this.state.resolvedExternalEditor,
                  openRepositoryInShell: this.openInShell,
                  ourBranch: e.ourBranch,
                  theirBranch: e.theirBranch,
                  manualResolutions: i.manualResolutions,
                });
          }
          case ao.OversizedFiles:
            return w.createElement(gb, {
              key: "oversized-files",
              oversizedFiles: e.oversizedFiles,
              onDismissed: t,
              dispatcher: this.props.dispatcher,
              context: e.context,
              repository: e.repository,
            });
          case ao.AbortMerge: {
            const { selectedState: n } = this.state;
            if (null === n || n.type !== W.Repository) return null;
            const { workingDirectory: r } = n.state.changesState;
            return r.files.some((e) => Gl(e.status))
              ? w.createElement(mb, {
                  key: "abort-merge-warning",
                  dispatcher: this.props.dispatcher,
                  repository: e.repository,
                  onDismissed: t,
                  ourBranch: e.ourBranch,
                  theirBranch: e.theirBranch,
                })
              : null;
          }
          case ao.UsageReportingChanges:
            return w.createElement(yb, {
              key: "usage-stats-change",
              onOpenUsageDataUrl: this.openUsageDataUrl,
              onSetStatsOptOut: this.onSetStatsOptOut,
              onDismissed: t,
            });
          case ao.CommitConflictsWarning:
            return w.createElement(pb, {
              key: "commit-conflicts-warning",
              dispatcher: this.props.dispatcher,
              files: e.files,
              repository: e.repository,
              context: e.context,
              onDismissed: t,
            });
          case ao.PushNeedsPull:
            return w.createElement(vb, {
              key: "push-needs-pull",
              dispatcher: this.props.dispatcher,
              repository: e.repository,
              onDismissed: t,
            });
          case ao.RebaseFlow: {
            const { selectedState: n, emoji: r } = this.state;
            if (null === n || n.type !== W.Repository) return null;
            const { changesState: i, rebaseState: o } = n.state,
              { workingDirectory: s, conflictState: a } = i,
              { progress: l, step: c, userHasResolvedConflicts: u } = o;
            return null !== a && "merge" === a.kind
              ? (log.warn(
                  "[App] invalid state encountered - rebase flow should not be used when merge conflicts found"
                ),
                null)
              : null === c
              ? (log.warn(
                  "[App] invalid state encountered - rebase flow should not be active when step is null"
                ),
                null)
              : w.createElement(kb, {
                  key: "rebase-flow",
                  repository: e.repository,
                  openFileInExternalEditor: this.openFileInExternalEditor,
                  dispatcher: this.props.dispatcher,
                  onFlowEnded: this.onRebaseFlowEnded,
                  onDismissed: t,
                  workingDirectory: s,
                  progress: l,
                  step: c,
                  userHasResolvedConflicts: u,
                  askForConfirmationOnForcePush: this.state
                    .askForConfirmationOnForcePush,
                  resolvedExternalEditor: this.state.resolvedExternalEditor,
                  openRepositoryInShell: this.openCurrentRepositoryInShell,
                  onShowRebaseConflictsBanner: this.onShowRebaseConflictsBanner,
                  emoji: r,
                });
          }
          case ao.ConfirmForcePush: {
            const { askForConfirmationOnForcePush: n } = this.state;
            return w.createElement(xb, {
              key: "confirm-force-push",
              dispatcher: this.props.dispatcher,
              repository: e.repository,
              upstreamBranch: e.upstreamBranch,
              askForConfirmationOnForcePush: n,
              onDismissed: t,
            });
          }
          case ao.StashAndSwitchBranch: {
            const { repository: n, branchToCheckout: r } = e,
              {
                branchesState: i,
                changesState: o,
              } = this.props.repositoryStateManager.get(n),
              { tip: s } = i;
            if (s.kind !== so.Valid) return null;
            const a = s.branch,
              l = null !== o.stashEntry;
            return w.createElement(Tb, {
              key: "stash-and-switch-branch",
              dispatcher: this.props.dispatcher,
              repository: e.repository,
              currentBranch: a,
              branchToCheckout: r,
              hasAssociatedStash: l,
              onDismissed: t,
            });
          }
          case ao.ConfirmOverwriteStash: {
            const { repository: n, branchToCheckout: r } = e;
            return w.createElement(Db, {
              key: "overwrite-stash",
              dispatcher: this.props.dispatcher,
              repository: n,
              branchToCheckout: r,
              onDismissed: t,
            });
          }
          case ao.ConfirmDiscardStash: {
            const { repository: n, stash: r } = e;
            return w.createElement(Ab, {
              key: "confirm-discard-stash-dialog",
              dispatcher: this.props.dispatcher,
              repository: n,
              stash: r,
              onDismissed: t,
            });
          }
          case ao.CreateTutorialRepository:
            return w.createElement(_b, {
              key: "create-tutorial-repository-dialog",
              account: e.account,
              progress: e.progress,
              onDismissed: t,
              onCreateTutorialRepository: this.onCreateTutorialRepository,
            });
          case ao.ConfirmExitTutorial:
            return w.createElement(hy, {
              key: "confirm-exit-tutorial",
              onDismissed: t,
              onContinue: this.onExitTutorialToHomeScreen,
            });
          case ao.PushRejectedDueToMissingWorkflowScope:
            return w.createElement(Mb, {
              onDismissed: t,
              rejectedPath: e.rejectedPath,
              dispatcher: this.props.dispatcher,
              repository: e.repository,
            });
          case ao.SAMLReauthRequired:
            return w.createElement(Pb, {
              onDismissed: t,
              organizationName: e.organizationName,
              endpoint: e.endpoint,
              retryAction: e.retryAction,
              dispatcher: this.props.dispatcher,
            });
          case ao.CreateFork:
            return w.createElement(Ib, {
              onDismissed: t,
              dispatcher: this.props.dispatcher,
              repository: e.repository,
              account: e.account,
            });
          case ao.CreateTag:
            return w.createElement(Ob, {
              key: "create-tag",
              repository: e.repository,
              onDismissed: t,
              dispatcher: this.props.dispatcher,
              targetCommitSha: e.targetCommitSha,
              initialName: e.initialName,
              localTags: e.localTags,
            });
          case ao.DeleteTag:
            return w.createElement(Lb, {
              key: "delete-tag",
              repository: e.repository,
              onDismissed: t,
              dispatcher: this.props.dispatcher,
              tagName: e.tagName,
            });
          case ao.ChooseForkSettings:
            return w.createElement(Fb, {
              repository: e.repository,
              onDismissed: t,
              dispatcher: this.props.dispatcher,
            });
          case ao.LocalChangesOverwritten:
            const l = this.state.selectedState,
              c =
                null !== l && l.type === W.Repository
                  ? l.state.changesState.stashEntry
                  : null;
            return w.createElement(Bb, {
              repository: e.repository,
              dispatcher: this.props.dispatcher,
              hasExistingStash: null !== c,
              retryAction: e.retryAction,
              onDismissed: t,
              files: e.files,
            });
          default:
            return X(0, "Unknown popup type: " + e);
        }
      }
      renderPopup() {
        const e = this.currentPopupContent();
        return w.createElement(
          O,
          null,
          e && w.createElement(K, { classNames: "modal", timeout: Hb }, e)
        );
      }
      renderZoomInfo() {
        return w.createElement(kh, {
          windowZoomFactor: this.state.windowZoomFactor,
        });
      }
      renderFullScreenInfo() {
        return w.createElement(Rh, { windowState: this.state.windowState });
      }
      renderAppError() {
        return w.createElement(Bv, {
          errors: this.state.errors,
          onClearError: this.clearError,
          onShowPopup: this.showPopup,
          onRetryAction: this.onRetryAction,
        });
      }
      renderApp() {
        return w.createElement(
          "div",
          { id: "desktop-app-contents" },
          this.renderToolbar(),
          this.renderBanner(),
          this.renderRepository(),
          this.renderPopup(),
          this.renderAppError()
        );
      }
      renderRepositoryToolbarButton() {
        const e = this.state.selectedState,
          t = e ? e.repository : null;
        let n, r;
        t
          ? ((n = bh(t)), (r = t.name))
          : this.state.repositories.length > 0
          ? ((n = wh.repo), (r = "Select a repository"))
          : ((n = wh.repo), (r = "No repositories"));
        const i =
            this.state.currentFoldout &&
            this.state.currentFoldout.type === j.Repository,
          o = i ? "open" : "closed",
          s = t && !i ? t.path : void 0,
          a = {
            position: "absolute",
            marginLeft: 0,
            width: this.state.sidebarWidth,
            minWidth: this.state.sidebarWidth,
            height: "100%",
            top: 0,
          };
        return w.createElement(Cy, {
          icon: n,
          title: r,
          description: "当前存储库",
          tooltip: s,
          foldoutStyle: a,
          onDropdownStateChanged: this.onRepositoryDropdownStateChanged,
          dropdownContentRenderer: this.renderRepositoryList,
          dropdownState: o,
        });
      }
      renderPushPullToolbarButton() {
        const e = this.state.selectedState;
        if (!e || e.type !== W.Repository) return null;
        const t = e.state,
          n = t.revertProgress;
        if (n) return w.createElement(Ay, { progress: n });
        let r = t.remote ? t.remote.name : null;
        const i = t.pushPullFetchProgress,
          { conflictState: o } = t.changesState,
          s = null !== o && "rebase" === o.kind,
          { aheadBehind: a, branchesState: l } = t,
          { pullWithRebase: c, tip: u } = l;
        u.kind === so.Valid &&
          null !== u.branch.remote &&
          (r = u.branch.remote);
        const h = bl(l, a);
        return w.createElement(Ty, {
          dispatcher: this.props.dispatcher,
          repository: e.repository,
          aheadBehind: t.aheadBehind,
          numTagsToPush: null !== t.tagsToPush ? t.tagsToPush.length : 0,
          remoteName: r,
          lastFetched: t.lastFetched,
          networkActionInProgress: t.isPushPullFetchInProgress,
          progress: i,
          tipState: u.kind,
          pullWithRebase: c,
          rebaseInProgress: s,
          isForcePush: h,
          shouldNudge:
            this.state.currentOnboardingTutorialStep === gu.PushBranch,
        });
      }
      renderBranchToolbarButton() {
        const e = this.state.selectedState;
        if (null == e || e.type !== W.Repository) return null;
        const t = this.state.currentFoldout,
          n = null !== t && t.type === j.Branch,
          r = e.repository,
          { branchesState: i } = e.state;
        return w.createElement(Dy, {
          dispatcher: this.props.dispatcher,
          isOpen: n,
          onDropDownStateChanged: this.onBranchDropdownStateChanged,
          repository: r,
          repositoryState: e.state,
          selectedTab: this.state.selectedBranchesTab,
          pullRequests: i.openPullRequests,
          currentPullRequest: i.currentPullRequest,
          isLoadingPullRequests: i.isLoadingPullRequests,
          shouldNudge:
            this.state.currentOnboardingTutorialStep === gu.CreateBranch,
        });
      }
      renderBanner() {
        if (this.inNoRepositoriesViewState()) return null;
        let e = null;
        return (
          null !== this.state.currentBanner
            ? (e = (function (e, t, n) {
                switch (e.type) {
                  case su.SuccessfulMerge:
                    return w.createElement(cv, {
                      ourBranch: e.ourBranch,
                      theirBranch: e.theirBranch,
                      onDismissed: n,
                      key: "successful-merge",
                    });
                  case su.MergeConflictsFound:
                    return w.createElement(lv, {
                      dispatcher: t,
                      ourBranch: e.ourBranch,
                      popup: e.popup,
                      onDismissed: n,
                      key: "merge-conflicts",
                    });
                  case su.SuccessfulRebase:
                    return w.createElement(hv, {
                      targetBranch: e.targetBranch,
                      baseBranch: e.baseBranch,
                      onDismissed: n,
                      key: "successful-rebase",
                    });
                  case su.RebaseConflictsFound:
                    return w.createElement(uv, {
                      dispatcher: t,
                      targetBranch: e.targetBranch,
                      onOpenDialog: e.onOpenDialog,
                      onDismissed: n,
                      key: "merge-conflicts",
                    });
                  case su.BranchAlreadyUpToDate:
                    return w.createElement(dv, {
                      ourBranch: e.ourBranch,
                      theirBranch: e.theirBranch,
                      onDismissed: n,
                      key: "branch-already-up-to-date",
                    });
                  default:
                    return X(0, "Unknown popup type: " + e);
                }
              })(
                this.state.currentBanner,
                this.props.dispatcher,
                this.onBannerDismissed
              ))
            : this.state.isUpdateAvailableBannerVisible &&
              (e = this.renderUpdateBanner()),
          w.createElement(
            O,
            null,
            e && w.createElement(K, { classNames: "banner", timeout: zb }, e)
          )
        );
      }
      renderUpdateBanner() {
        return w.createElement(av, {
          dispatcher: this.props.dispatcher,
          newRelease: De.state.newRelease,
          onDismissed: this.onUpdateAvailableDismissed,
          key: "update-available",
        });
      }
      renderToolbar() {
        return this.inNoRepositoriesViewState()
          ? null
          : w.createElement(
              wy,
              { id: "desktop-app-toolbar" },
              w.createElement(
                "div",
                {
                  className: "sidebar-section",
                  style: { width: this.state.sidebarWidth },
                },
                this.renderRepositoryToolbarButton()
              ),
              this.renderBranchToolbarButton(),
              this.renderPushPullToolbarButton()
            );
      }
      renderRepository() {
        const e = this.state;
        if (this.inNoRepositoriesViewState())
          return w.createElement(_w, {
            dotComAccount: this.getDotComAccount(),
            enterpriseAccount: this.getEnterpriseAccount(),
            onCreate: this.showCreateRepository,
            onClone: this.showCloneRepo,
            onAdd: this.showAddLocalRepo,
            onCreateTutorialRepository: this.showCreateTutorialRepositoryPopup,
            onResumeTutorialRepository: this.onResumeTutorialRepository,
            tutorialPaused: this.isTutorialPaused(),
            apiRepositories: e.apiRepositories,
            onRefreshRepositories: this.onRefreshRepositories,
          });
        const t = e.selectedState;
        if (!t) return w.createElement(Wb, null);
        if (t.type === W.Repository) {
          const n = e.selectedExternalEditor
            ? e.selectedExternalEditor
            : void 0;
          return w.createElement(dy, {
            key: t.repository.hash,
            repository: t.repository,
            state: t.state,
            dispatcher: this.props.dispatcher,
            emoji: e.emoji,
            sidebarWidth: e.sidebarWidth,
            commitSummaryWidth: e.commitSummaryWidth,
            stashedFilesWidth: e.stashedFilesWidth,
            issuesStore: this.props.issuesStore,
            gitHubUserStore: this.props.gitHubUserStore,
            onViewCommitOnGitHub: this.onViewCommitOnGitHub,
            imageDiffType: e.imageDiffType,
            hideWhitespaceInDiff: e.hideWhitespaceInDiff,
            showSideBySideDiff: e.showSideBySideDiff,
            focusCommitMessage: e.focusCommitMessage,
            askForConfirmationOnDiscardChanges:
              e.askForConfirmationOnDiscardChanges,
            accounts: e.accounts,
            externalEditorLabel: n,
            resolvedExternalEditor: e.resolvedExternalEditor,
            onOpenInExternalEditor: this.openFileInExternalEditor,
            appMenu: e.appMenuState[0],
            currentTutorialStep: e.currentOnboardingTutorialStep,
            onExitTutorial: this.onExitTutorial,
            isShowingModal: this.isShowingModal,
            isShowingFoldout: null !== this.state.currentFoldout,
          });
        }
        return t.type === W.CloningRepository
          ? w.createElement(vy, {
              repository: t.repository,
              progress: t.progress,
            })
          : t.type === W.MissingRepository
          ? w.createElement(jv, {
              repository: t.repository,
              dispatcher: this.props.dispatcher,
            })
          : X(0, "Unknown state: " + t);
      }
      renderWelcomeFlow() {
        return w.createElement(Ky, {
          dispatcher: this.props.dispatcher,
          optOut: this.state.optOutOfUsageTracking,
          accounts: this.state.accounts,
          signInState: this.state.signInState,
        });
      }
      render() {
        if (this.loading) return null;
        const e = this.state.appIsFocused ? "focused" : "blurred",
          t = this.state.showWelcomeFlow ? vi.Light : this.state.selectedTheme;
        return w.createElement(
          "div",
          { id: "desktop-app-chrome", className: e },
          w.createElement(fb, { theme: t }),
          this.renderTitlebar(),
          this.state.showWelcomeFlow
            ? this.renderWelcomeFlow()
            : this.renderApp(),
          this.renderZoomInfo(),
          this.renderFullScreenInfo()
        );
      }
      inNoRepositoriesViewState() {
        return 0 === this.state.repositories.length || this.isTutorialPaused();
      }
      isTutorialPaused() {
        return this.state.currentOnboardingTutorialStep === gu.Paused;
      }
    }
    function Wb() {
      return w.createElement(
        "div",
        { className: "panel blankslate" },
        "No repository selected"
      );
    }
    function jb(e) {
      return e.kind === so.Valid
        ? e.branch.tip.sha
        : e.kind === so.Detached
        ? e.currentSha
        : "(unknown)";
    }
    function Vb(e) {
      return (function (e) {
        return e instanceof Error && "string" == typeof e.code;
      })(e)
        ? e
        : null;
    }
    function Gb(e) {
      return e instanceof ce ? e : null;
    }
    function $b(e) {
      return e instanceof Go ? e : null;
    }
    const qb = /^ ! \[remote rejected\] .*? -> .*? \(refusing to allow an OAuth App to create or update workflow `(.*?)` without `workflow` scope\)/m;
    const Kb = /`([^']+)' organization has enabled or enforced SAML SSO.*?you must re-authorize/s;
    function Yb(e) {
      const { login: t, email: n, avatarURL: r, name: i } = e;
      return { login: t, email: n, avatarURL: r, name: i };
    }
    function Qb(e) {
      return (
        Object.keys(localStorage)
          .filter((e) => /^IssuesStore\/\d+\/lastFetch$/.test(e))
          .forEach((e) => localStorage.removeItem(e)),
        e.table("issues").clear()
      );
    }
    function Zb(e) {
      const t = e.table("gitHubRepositories"),
        n = new Set();
      return t.toCollection().each((e) => {
        const r = `${e.ownerID}+${e.name}`;
        if (n.has(r)) {
          const n = e.id;
          t.delete(n);
        } else n.add(r);
      });
    }
    async function Xb(e) {
      return e
        .table("gitHubRepositories")
        .toCollection()
        .filter((e) => void 0 === e.parentID)
        .modify({ parentID: null })
        .then((e) => log.info("ensureNoUndefinedParentID: " + e));
    }
    new Set(["LOCAL_GIT_DIRECTORY"]);
    const Jb = new Set(
        ["button", "a", "input", "textarea", "label"].map((e) =>
          e.toUpperCase()
        )
      ),
      eS = new Set(["button", "option", "menuitem", "tab", "radio"]);
    function tS(e, t) {
      return e.endpoint === t.endpoint && e.id === t.id;
    }
    function nS(e, t) {
      if (t.has(e)) return e;
      for (const n of t.keys()) if (tS(n, e)) return n;
      return e;
    }
    n(306);
    var rS = n(142),
      iS = n.n(rS);
    process,
      (function () {
        c.a.install({
          environment: "node",
          handleUncaughtExceptions: !1,
          retrieveSourceMap: h,
        });
        const e = Error;
        (p = e.prepareStackTrace), (e.prepareStackTrace = f);
      })(),
      (process.env.LOCAL_GIT_DIRECTORY = i.resolve(__dirname, "git")),
      delete process.env.GIT_EXEC_PATH,
      iS()(E);
    const oS = performance.now();
    n(307);
    let sS = null;
    const aS = (e, t = {}, n) => {
      (e = m(e)), console.error("Uncaught exception", e);
      {
        const i = Object.assign({ osVersion: pi(), guid: gi() }, t);
        try {
          sS &&
            (null !== sS.currentBanner &&
              (i.currentBanner = sS.currentBanner.type),
            null !== sS.currentPopup &&
              (i.currentPopup = "" + sS.currentPopup.type),
            null !== sS.selectedState &&
              ((i.selectedState = "" + sS.selectedState.type),
              sS.selectedState.type === W.Repository &&
                (i.selectedRepositorySection =
                  "" + sS.selectedState.state.selectedSection)),
            null !== sS.currentFoldout &&
              (i.currentFoldout = "" + sS.currentFoldout.type),
            sS.showWelcomeFlow && (i.inWelcomeFlow = "true"),
            1 !== sS.windowZoomFactor &&
              (i.windowZoomFactor = "" + sS.windowZoomFactor),
            sS.errors.length > 0 && (i.activeAppErrors = "" + sS.errors.length),
            (i.repositoryCount = "" + sS.repositories.length),
            (i.windowState = sS.windowState),
            (i.accounts = "" + sS.accounts.length));
        } catch (e) {}
        !(function (e, t = {}, n) {
          const i = { error: le(e), extra: t, nonFatal: n };
          r.ipcRenderer.send("send-error-report", i);
        })(e, i, n);
      }
    };
    process.once("uncaughtException", (e) => {
      aS(e),
        (function (e) {
          r.ipcRenderer.send("uncaught-exception", le(e));
        })(e);
    }),
      process.on("send-non-fatal-exception", (e, t) => {
        aS(e, t, !0);
      }),
      window.addEventListener("unhandledrejection", (e) => {
        qs() && e.reason instanceof Error && xu("unhandledRejection", e.reason);
      });
    const lS = new (class extends ki {
        constructor(e) {
          super(),
            (this.database = e),
            (this.queryCache = null),
            (this.pruneQueryCacheTimeoutId = null);
        }
        async getByLogin(e, t) {
          const n = ht.fromAccount(e),
            r = await n.fetchUser(t).catch((e) => null);
          if (!r || "User" !== r.type) return null;
          const i =
            null !== r.email && r.email.length > 0
              ? r.email
              : Iu(r.id, t, e.endpoint);
          return {
            avatarURL: r.avatar_url,
            email: i,
            name: r.name || r.login,
            login: r.login,
          };
        }
        async updateMentionables(e, t) {
          var n;
          const r = ht.fromAccount(t),
            i = await this.database.getMentionableCacheEntry(e.dbID);
          if (void 0 !== i && Date.now() - i.lastUpdated < 6e5) return;
          const o = await r.fetchMentionables(
            e.owner.login,
            e.name,
            null == i ? void 0 : i.eTag
          );
          if (null === o)
            return void (await this.database.touchMentionableCacheEntry(
              e.dbID,
              null == i ? void 0 : i.eTag
            ));
          const { endpoint: s } = t,
            a = o.users.map((e) => {
              const { name: t, login: n, avatar_url: r } = e;
              return {
                name: t,
                login: n,
                email: e.email || Pu(n, s),
                avatarURL: r,
              };
            });
          await this.database.updateMentionablesForRepository(
            e.dbID,
            a,
            o.etag
          ),
            (null === (n = this.queryCache) || void 0 === n
              ? void 0
              : n.repository.dbID) === e.dbID &&
              ((this.queryCache = null), this.clearCachePruneTimeout());
        }
        async getMentionableUsers(e) {
          return this.database.getAllMentionablesForRepository(e.dbID);
        }
        async getMentionableUsersMatching(e, t, n = 25) {
          var r;
          const i =
            (null === (r = this.queryCache) || void 0 === r
              ? void 0
              : r.repository.dbID) === e.dbID
              ? this.queryCache.users
              : await this.getMentionableUsers(e);
          this.setQueryCache(e, i);
          const o = [],
            s = t.toLowerCase();
          for (const e of i) {
            const t = `${e.login} ${e.name}`.trim().toLowerCase().indexOf(s);
            t >= 0 && o.push({ user: e, ix: t });
          }
          return o
            .sort((e, t) => Ct(e.ix, t.ix) || Ct(e.user.login, t.user.login))
            .slice(0, n)
            .map((e) => e.user);
        }
        setQueryCache(e, t) {
          this.clearCachePruneTimeout(),
            (this.queryCache = { repository: e, users: t }),
            (this.pruneQueryCacheTimeoutId = window.setTimeout(() => {
              (this.pruneQueryCacheTimeoutId = null), (this.queryCache = null);
            }, 6e4));
        }
        clearCachePruneTimeout() {
          null !== this.pruneQueryCacheTimeoutId &&
            (clearTimeout(this.pruneQueryCacheTimeoutId),
            (this.pruneQueryCacheTimeoutId = null));
        }
      })(
        new (class extends Xu {
          constructor(e, t) {
            super(e, t),
              this.conditionalVersion(1, { users: "++id, &[endpoint+email]" }),
              this.conditionalVersion(2, {
                users: "++id, [endpoint+email], [endpoint+login]",
                mentionables: "++id, repositoryID, &[userID+repositoryID]",
              }),
              this.conditionalVersion(3, { mentionables: null, users: null }),
              this.conditionalVersion(4, {
                mentionables: "&[gitHubRepositoryID+login], gitHubRepositoryID",
              }),
              this.conditionalVersion(5, {
                mentionableCache: "gitHubRepositoryID",
              });
          }
          updateMentionablesForRepository(e, t, n) {
            return this.transaction(
              "rw",
              this.mentionables,
              this.mentionableCache,
              async () => {
                await this.mentionables
                  .where("gitHubRepositoryID")
                  .equals(e)
                  .delete(),
                  await this.touchMentionableCacheEntry(e, n),
                  await this.mentionables.bulkAdd(
                    t.map((t) =>
                      Object.assign(Object.assign({}, t), {
                        gitHubRepositoryID: e,
                      })
                    )
                  );
              }
            );
          }
          async getAllMentionablesForRepository(e) {
            return (
              await this.mentionables
                .where("gitHubRepositoryID")
                .equals(e)
                .toArray()
            ).map(Yb);
          }
          getMentionableCacheEntry(e) {
            return this.mentionableCache.get(e);
          }
          touchMentionableCacheEntry(e, t) {
            const n = {
              gitHubRepositoryID: e,
              lastUpdated: Date.now(),
              eTag: t,
            };
            return this.mentionableCache.put(n);
          }
        })("GitHubUserDatabase")
      ),
      cS = new (class extends ki {
        constructor() {
          super(...arguments),
            (this._repositories = new Array()),
            (this.stateByID = new Map());
        }
        async clone(e, t, n) {
          const r = new Ui(t, e);
          this._repositories.push(r);
          const i = "Cloning into " + t;
          this.stateByID.set(r.id, { kind: "clone", title: i, value: 0 }),
            this.emitUpdate();
          let o = !0;
          try {
            await (async function (e, t, n, r) {
              const i = [
                ...(await Zo(null, n.account)),
                "clone",
                "--recursive",
              ];
              let o = { env: await Js(n.account, e) };
              if (r) {
                i.push("--progress");
                const e = "Cloning into " + t,
                  n = "clone";
                (o = await ba(
                  Object.assign(Object.assign({}, o), { trackLFSProgress: !0 }),
                  new la(),
                  (t) => {
                    const i = "progress" === t.kind ? t.details.text : t.text,
                      o = t.percent;
                    r({ kind: n, title: e, description: i, value: o });
                  }
                )),
                  r({ kind: n, title: e, value: 0 });
              }
              n.branch && i.push("-b", n.branch),
                i.push("--", e, t),
                await $o(i, __dirname, "clone", o);
            })(e, t, n, (e) => {
              this.stateByID.set(r.id, e), this.emitUpdate();
            });
          } catch (i) {
            o = !1;
            const s = {
              type: re.Clone,
              name: r.name,
              url: e,
              path: t,
              options: n,
            };
            (i = new ce(i, { retryAction: s, repository: r })),
              this.emitError(i);
          }
          return this.remove(r), o;
        }
        get repositories() {
          return Array.from(this._repositories);
        }
        getRepositoryState(e) {
          return this.stateByID.get(e.id) || null;
        }
        remove(e) {
          this.stateByID.delete(e.id);
          const t = this._repositories.findIndex((t) => t.id === e.id);
          t > -1 && this._repositories.splice(t, 1), this.emitUpdate();
        }
      })(),
      uS = new (class {
        constructor(e) {
          (this.queryCache = null),
            (this.pruneQueryCacheTimeoutId = null),
            (this.db = e);
        }
        async getLatestUpdatedAt(e) {
          const t = this.db,
            n = await t.issues
              .where("[gitHubRepositoryID+updated_at]")
              .between([e.dbID], [e.dbID + 1], !0, !1)
              .last();
          if (!n || !n.updated_at) return null;
          const r = new Date(n.updated_at);
          return isNaN(r.getTime()) ? null : r;
        }
        async refreshIssues(e, t) {
          const n = ht.fromAccount(t),
            r = await this.getLatestUpdatedAt(e),
            i = r ? "all" : "open",
            o = await n.fetchIssues(e.owner.login, e.name, i, r);
          this.storeIssues(o, e);
        }
        async storeIssues(e, t) {
          var n;
          const r = e.filter((e) => "closed" === e.state),
            i = e
              .filter((e) => "open" === e.state)
              .map((e) => ({
                gitHubRepositoryID: t.dbID,
                number: e.number,
                title: e.title,
                updated_at: e.updated_at,
              })),
            o = this.db;
          function s(e, t) {
            return o.issues
              .where("[gitHubRepositoryID+number]")
              .equals([e, t])
              .limit(1)
              .first();
          }
          await this.db.transaction("rw", this.db.issues, async () => {
            for (const e of r) {
              const n = await s(t.dbID, e.number);
              n && (await this.db.issues.delete(n.id));
            }
            for (const e of i) {
              const n = await s(t.dbID, e.number);
              n ? await o.issues.update(n.id, e) : await o.issues.add(e);
            }
          }),
            (null === (n = this.queryCache) || void 0 === n
              ? void 0
              : n.repository.dbID) === t.dbID &&
              ((this.queryCache = null), this.clearCachePruneTimeout());
        }
        async getAllIssueHitsFor(e) {
          return (await this.db.getIssuesForRepository(e.dbID)).map((e) => ({
            number: e.number,
            title: e.title,
          }));
        }
        async getIssuesMatching(e, t, n = 25) {
          var r, i;
          const o =
            (null === (r = this.queryCache) || void 0 === r
              ? void 0
              : r.repository.dbID) === e.dbID
              ? await Promise.resolve(
                  null === (i = this.queryCache) || void 0 === i
                    ? void 0
                    : i.issues
                )
              : await this.getAllIssueHitsFor(e);
          if ((this.setQueryCache(e, o), !t.length))
            return o
              .slice()
              .sort((e, t) => Et(e.number, t.number))
              .slice(0, n);
          const s = [],
            a = t.toLowerCase();
          for (const e of o) {
            const t = `${e.number} ${e.title}`.trim().toLowerCase().indexOf(a);
            t >= 0 &&
              s.push({ hit: { number: e.number, title: e.title }, ix: t });
          }
          return s
            .sort((e, t) => Ct(e.ix, t.ix) || Ct(e.hit.title, t.hit.title))
            .slice(0, n)
            .map((e) => e.hit);
        }
        setQueryCache(e, t) {
          this.clearCachePruneTimeout(),
            (this.queryCache = { repository: e, issues: t }),
            (this.pruneQueryCacheTimeoutId = window.setTimeout(() => {
              (this.pruneQueryCacheTimeoutId = null), (this.queryCache = null);
            }, 6e4));
        }
        clearCachePruneTimeout() {
          null !== this.pruneQueryCacheTimeoutId &&
            (clearTimeout(this.pruneQueryCacheTimeoutId),
            (this.pruneQueryCacheTimeoutId = null));
        }
      })(
        new (class extends Xu {
          constructor(e, t) {
            super(e, t),
              this.conditionalVersion(1, {
                issues:
                  "++id, &[gitHubRepositoryID+number], gitHubRepositoryID, number",
              }),
              this.conditionalVersion(
                2,
                {
                  issues:
                    "++id, &[gitHubRepositoryID+number], gitHubRepositoryID, number, [gitHubRepositoryID+updated_at]",
                },
                Qb
              );
          }
          getIssuesForRepository(e) {
            return this.issues.where("gitHubRepositoryID").equals(e).toArray();
          }
        })("IssuesDatabase")
      ),
      hS = new (class {
        constructor(e, t) {
          (this.uiActivityMonitorSubscription = null),
            (this.onUiActivity = async () => (
              this.disableUiActivityMonitoring(),
              this.updateDailyMeasures((e) => ({ active: !0 }))
            )),
            (this.db = e),
            (this.uiActivityMonitor = t);
          const n = uh();
          (this.optOut = n || !1),
            we("has-sent-stats-opt-in-ping", !1) ||
              this.sendOptInStatusPing(this.optOut, n),
            this.enableUiActivityMonitoring(),
            window.addEventListener("unhandledrejection", async () => {
              try {
                this.recordUnhandledRejection();
              } catch (e) {
                log.error("Failed recording unhandled rejection", e);
              }
            });
        }
        shouldReportDailyStats() {
          const e = Se("last-daily-stats-report", 0);
          return Date.now() - e > 864e5;
        }
        async reportStats(e, t) {
          if (this.optOut) return;
          if (!li()) return;
          if (!this.shouldReportDailyStats()) return;
          const n = Date.now(),
            r = await this.getDailyStats(e, t),
            i = (function (e) {
              const t = e.find((e) => e.endpoint === gt());
              return void 0 !== t ? t.id : null;
            })(e),
            o =
              null === i
                ? r
                : Object.assign(Object.assign({}, r), { user_id: i });
          try {
            const e = await this.post(o);
            if (!e.ok)
              throw new Error(
                `Unexpected status: ${e.statusText} (${e.status})`
              );
            log.info("Stats reported."),
              await this.clearDailyStats(),
              Ce("last-daily-stats-report", n);
          } catch (e) {
            log.error("Error reporting stats:", e);
          }
        }
        async recordLaunchStats(e) {
          await this.db.launches.add(e);
        }
        async clearDailyStats() {
          await this.db.launches.clear(),
            await this.db.dailyMeasures.clear(),
            localStorage.removeItem(
              "repositories-committed-in-without-write-access"
            ),
            this.enableUiActivityMonitoring();
        }
        enableUiActivityMonitoring() {
          null === this.uiActivityMonitorSubscription &&
            (this.uiActivityMonitorSubscription = this.uiActivityMonitor.onActivity(
              this.onUiActivity
            ));
        }
        disableUiActivityMonitoring() {
          null !== this.uiActivityMonitorSubscription &&
            (this.uiActivityMonitorSubscription.dispose(),
            (this.uiActivityMonitorSubscription = null));
        }
        async getDailyStats(e, t) {
          const n = await this.getAverageLaunchStats(),
            r = await this.getDailyMeasures(),
            i = this.determineUserType(e),
            o = this.categorizedRepositoryCounts(t),
            s = this.getOnboardingStats(),
            a = localStorage.getItem("shell") || "none",
            l = localStorage.getItem("externalEditor") || "none",
            c = Ee("repositories-committed-in-without-write-access").length,
            u = Fu() ? "split" : "unified";
          return Object.assign(
            Object.assign(
              Object.assign(
                Object.assign(
                  Object.assign(
                    Object.assign(
                      Object.assign(
                        {
                          eventType: "usage",
                          version: He(),
                          osVersion: pi(),
                          platform: "win32",
                          theme: wi(bi()),
                          selectedTerminalEmulator: a,
                          selectedTextEditor: l,
                        },
                        n
                      ),
                      r
                    ),
                    i
                  ),
                  s
                ),
                { guid: gi() }
              ),
              o
            ),
            { repositoriesCommittedInWithoutWriteAccess: c, diffMode: u }
          );
        }
        getOnboardingStats() {
          if (null === lh("welcome-wizard-initiated-at")) return {};
          return {
            timeToWelcomeWizardTerminated: ch("welcome-wizard-terminated-at"),
            timeToFirstAddedRepository: ch("first-repository-added-at"),
            timeToFirstClonedRepository: ch("first-repository-cloned-at"),
            timeToFirstCreatedRepository: ch("first-repository-created-at"),
            timeToFirstCommit: ch("first-commit-created-at"),
            timeToFirstGitHubPush: ch("first-push-to-github-at"),
            timeToFirstNonDefaultBranchCheckout: ch(
              "first-non-default-branch-checkout-at"
            ),
            welcomeWizardSignInMethod: (function () {
              const e = localStorage.getItem("welcome-wizard-sign-in-method");
              try {
                switch (e) {
                  case Yu.Basic:
                  case Yu.Web:
                    return e;
                  case null:
                    return;
                  default:
                    return X(0, "Unknown sign in method: " + e);
                }
              } catch (e) {
                return void log.error(
                  "Could not parse welcome wizard sign in method",
                  e
                );
              }
            })(),
          };
        }
        categorizedRepositoryCounts(e) {
          return {
            repositoryCount: e.length,
            gitHubRepositoryCount: e.filter((e) => e.gitHubRepository).length,
          };
        }
        determineUserType(e) {
          return {
            dotComAccount: !!e.find((e) => e.endpoint === gt()),
            enterpriseAccount: !!e.find((e) => e.endpoint !== gt()),
          };
        }
        async getAverageLaunchStats() {
          const e = await this.db.launches.toArray();
          if (!e || !e.length)
            return { mainReadyTime: -1, loadTime: -1, rendererReadyTime: -1 };
          const t = e.reduce(
            (e, t) => ({
              mainReadyTime: e.mainReadyTime + t.mainReadyTime,
              loadTime: e.loadTime + t.loadTime,
              rendererReadyTime: e.rendererReadyTime + t.rendererReadyTime,
            }),
            { mainReadyTime: 0, loadTime: 0, rendererReadyTime: 0 }
          );
          return {
            mainReadyTime: t.mainReadyTime / e.length,
            loadTime: t.loadTime / e.length,
            rendererReadyTime: t.rendererReadyTime / e.length,
          };
        }
        async getDailyMeasures() {
          const e = await this.db.dailyMeasures.limit(1).first();
          return Object.assign(Object.assign(Object.assign({}, sh), e), {
            id: void 0,
          });
        }
        async updateDailyMeasures(e) {
          const t = sh;
          await this.db.transaction("rw", this.db.dailyMeasures, async () => {
            const n = await this.db.dailyMeasures.limit(1).first(),
              r = Object.assign(Object.assign({}, t), n),
              i = yi(r, e(r));
            return this.db.dailyMeasures.put(i);
          });
        }
        async recordCommit() {
          await this.updateDailyMeasures((e) => ({ commits: e.commits + 1 })),
            ah("first-commit-created-at");
        }
        recordPartialCommit() {
          return this.updateDailyMeasures((e) => ({
            partialCommits: e.partialCommits + 1,
          }));
        }
        recordCoAuthoredCommit() {
          return this.updateDailyMeasures((e) => ({
            coAuthoredCommits: e.coAuthoredCommits + 1,
          }));
        }
        recordOpenShell() {
          return this.updateDailyMeasures((e) => ({
            openShellCount: e.openShellCount + 1,
          }));
        }
        recordBranchComparison() {
          return this.updateDailyMeasures((e) => ({
            branchComparisons: e.branchComparisons + 1,
          }));
        }
        recordDefaultBranchComparison() {
          return this.updateDailyMeasures((e) => ({
            defaultBranchComparisons: e.defaultBranchComparisons + 1,
          }));
        }
        recordCompareInitiatedMerge() {
          return this.updateDailyMeasures((e) => ({
            mergesInitiatedFromComparison: e.mergesInitiatedFromComparison + 1,
          }));
        }
        recordMenuInitiatedUpdate() {
          return this.updateDailyMeasures((e) => ({
            updateFromDefaultBranchMenuCount:
              e.updateFromDefaultBranchMenuCount + 1,
          }));
        }
        recordMergeConflictFromPull() {
          return this.updateDailyMeasures((e) => ({
            mergeConflictFromPullCount: e.mergeConflictFromPullCount + 1,
          }));
        }
        recordMergeConflictFromExplicitMerge() {
          return this.updateDailyMeasures((e) => ({
            mergeConflictFromExplicitMergeCount:
              e.mergeConflictFromExplicitMergeCount + 1,
          }));
        }
        recordMenuInitiatedMerge() {
          return this.updateDailyMeasures((e) => ({
            mergeIntoCurrentBranchMenuCount:
              e.mergeIntoCurrentBranchMenuCount + 1,
          }));
        }
        recordMenuInitiatedRebase() {
          return this.updateDailyMeasures((e) => ({
            rebaseCurrentBranchMenuCount: e.rebaseCurrentBranchMenuCount + 1,
          }));
        }
        recordPRBranchCheckout() {
          return this.updateDailyMeasures((e) => ({
            prBranchCheckouts: e.prBranchCheckouts + 1,
          }));
        }
        recordRepoClicked(e) {
          return e
            ? this.updateDailyMeasures((e) => ({
                repoWithIndicatorClicked: e.repoWithIndicatorClicked + 1,
              }))
            : this.updateDailyMeasures((e) => ({
                repoWithoutIndicatorClicked: e.repoWithoutIndicatorClicked + 1,
              }));
        }
        recordUnattributedCommit() {
          return this.updateDailyMeasures((e) => ({
            unattributedCommits: e.unattributedCommits + 1,
          }));
        }
        recordCommitToEnterprise() {
          return this.updateDailyMeasures((e) => ({
            enterpriseCommits: e.enterpriseCommits + 1,
          }));
        }
        recordCommitToDotcom() {
          return this.updateDailyMeasures((e) => ({
            dotcomCommits: e.dotcomCommits + 1,
          }));
        }
        recordCommitToProtectedBranch() {
          return this.updateDailyMeasures((e) => ({
            commitsToProtectedBranch: e.commitsToProtectedBranch + 1,
          }));
        }
        recordCommitToRepositoryWithBranchProtections() {
          return this.updateDailyMeasures((e) => ({
            commitsToRepositoryWithBranchProtections:
              e.commitsToRepositoryWithBranchProtections + 1,
          }));
        }
        async setOptOut(e, t) {
          const n = this.optOut !== e;
          this.optOut = e;
          const r = we("stats-opt-out");
          be("stats-opt-out", e),
            (n || t) && (await this.sendOptInStatusPing(e, r));
        }
        getOptOut() {
          return this.optOut;
        }
        async recordPush(e, t) {
          null === e
            ? await this.recordPushToGenericRemote(t)
            : e.endpoint === gt()
            ? await this.recordPushToGitHub(t)
            : await this.recordPushToGitHubEnterprise(t);
        }
        async recordPushToGitHub(e) {
          e &&
            e.forceWithLease &&
            (await this.updateDailyMeasures((e) => ({
              dotcomForcePushCount: e.dotcomForcePushCount + 1,
            }))),
            await this.updateDailyMeasures((e) => ({
              dotcomPushCount: e.dotcomPushCount + 1,
            })),
            ah("first-push-to-github-at");
        }
        async recordPushToGitHubEnterprise(e) {
          e &&
            e.forceWithLease &&
            (await this.updateDailyMeasures((e) => ({
              enterpriseForcePushCount: e.enterpriseForcePushCount + 1,
            }))),
            await this.updateDailyMeasures((e) => ({
              enterprisePushCount: e.enterprisePushCount + 1,
            })),
            ah("first-push-to-github-at");
        }
        async recordPushToGenericRemote(e) {
          e &&
            e.forceWithLease &&
            (await this.updateDailyMeasures((e) => ({
              externalForcePushCount: e.externalForcePushCount + 1,
            }))),
            await this.updateDailyMeasures((e) => ({
              externalPushCount: e.externalPushCount + 1,
            }));
        }
        recordUserProceededWhileLoading() {
          return this.updateDailyMeasures((e) => ({
            mergedWithLoadingHintCount: e.mergedWithLoadingHintCount + 1,
          }));
        }
        recordMergeHintSuccessAndUserProceeded() {
          return this.updateDailyMeasures((e) => ({
            mergedWithCleanMergeHintCount: e.mergedWithCleanMergeHintCount + 1,
          }));
        }
        recordUserProceededAfterConflictWarning() {
          return this.updateDailyMeasures((e) => ({
            mergedWithConflictWarningHintCount:
              e.mergedWithConflictWarningHintCount + 1,
          }));
        }
        recordMergeConflictsDialogDismissal() {
          return this.updateDailyMeasures((e) => ({
            mergeConflictsDialogDismissalCount:
              e.mergeConflictsDialogDismissalCount + 1,
          }));
        }
        recordAnyConflictsLeftOnMergeConflictsDialogDismissal() {
          return this.updateDailyMeasures((e) => ({
            anyConflictsLeftOnMergeConflictsDialogDismissalCount:
              e.anyConflictsLeftOnMergeConflictsDialogDismissalCount + 1,
          }));
        }
        recordMergeConflictsDialogReopened() {
          return this.updateDailyMeasures((e) => ({
            mergeConflictsDialogReopenedCount:
              e.mergeConflictsDialogReopenedCount + 1,
          }));
        }
        recordGuidedConflictedMergeCompletion() {
          return this.updateDailyMeasures((e) => ({
            guidedConflictedMergeCompletionCount:
              e.guidedConflictedMergeCompletionCount + 1,
          }));
        }
        recordUnguidedConflictedMergeCompletion() {
          return this.updateDailyMeasures((e) => ({
            unguidedConflictedMergeCompletionCount:
              e.unguidedConflictedMergeCompletionCount + 1,
          }));
        }
        recordCreatePullRequest() {
          return this.updateDailyMeasures((e) => ({
            createPullRequestCount: e.createPullRequestCount + 1,
          }));
        }
        recordRebaseConflictsDialogDismissal() {
          return this.updateDailyMeasures((e) => ({
            rebaseConflictsDialogDismissalCount:
              e.rebaseConflictsDialogDismissalCount + 1,
          }));
        }
        recordRebaseConflictsDialogReopened() {
          return this.updateDailyMeasures((e) => ({
            rebaseConflictsDialogReopenedCount:
              e.rebaseConflictsDialogReopenedCount + 1,
          }));
        }
        recordRebaseAbortedAfterConflicts() {
          return this.updateDailyMeasures((e) => ({
            rebaseAbortedAfterConflictsCount:
              e.rebaseAbortedAfterConflictsCount + 1,
          }));
        }
        recordPullWithRebaseEnabled() {
          return this.updateDailyMeasures((e) => ({
            pullWithRebaseCount: e.pullWithRebaseCount + 1,
          }));
        }
        recordRebaseSuccessWithoutConflicts() {
          return this.updateDailyMeasures((e) => ({
            rebaseSuccessWithoutConflictsCount:
              e.rebaseSuccessWithoutConflictsCount + 1,
          }));
        }
        recordRebaseSuccessAfterConflicts() {
          return this.updateDailyMeasures((e) => ({
            rebaseSuccessAfterConflictsCount:
              e.rebaseSuccessAfterConflictsCount + 1,
          }));
        }
        recordPullWithDefaultSetting() {
          return this.updateDailyMeasures((e) => ({
            pullWithDefaultSettingCount: e.pullWithDefaultSettingCount + 1,
          }));
        }
        recordWelcomeWizardInitiated() {
          Ce("welcome-wizard-initiated-at", Date.now()),
            localStorage.removeItem("welcome-wizard-terminated-at");
        }
        recordWelcomeWizardTerminated() {
          Ce("welcome-wizard-terminated-at", Date.now());
        }
        recordAddExistingRepository() {
          ah("first-repository-added-at");
        }
        recordCloneRepository() {
          ah("first-repository-cloned-at");
        }
        recordCreateRepository() {
          ah("first-repository-created-at");
        }
        recordNonDefaultBranchCheckout() {
          ah("first-non-default-branch-checkout-at");
        }
        recordWelcomeWizardSignInMethod(e) {
          localStorage.setItem("welcome-wizard-sign-in-method", e);
        }
        recordMergeSuccessAfterConflicts() {
          return this.updateDailyMeasures((e) => ({
            mergeSuccessAfterConflictsCount:
              e.mergeSuccessAfterConflictsCount + 1,
          }));
        }
        recordMergeAbortedAfterConflicts() {
          return this.updateDailyMeasures((e) => ({
            mergeAbortedAfterConflictsCount:
              e.mergeAbortedAfterConflictsCount + 1,
          }));
        }
        recordStashViewedAfterCheckout() {
          return this.updateDailyMeasures((e) => ({
            stashViewedAfterCheckoutCount: e.stashViewedAfterCheckoutCount + 1,
          }));
        }
        recordStashNotViewedAfterCheckout() {
          return this.updateDailyMeasures((e) => ({
            stashNotViewedAfterCheckoutCount:
              e.stashNotViewedAfterCheckoutCount + 1,
          }));
        }
        recordChangesTakenToNewBranch() {
          return this.updateDailyMeasures((e) => ({
            changesTakenToNewBranchCount: e.changesTakenToNewBranchCount + 1,
          }));
        }
        recordStashCreatedOnCurrentBranch() {
          return this.updateDailyMeasures((e) => ({
            stashCreatedOnCurrentBranchCount:
              e.stashCreatedOnCurrentBranchCount + 1,
          }));
        }
        recordStashDiscard() {
          return this.updateDailyMeasures((e) => ({
            stashDiscardCount: e.stashDiscardCount + 1,
          }));
        }
        recordStashView() {
          return this.updateDailyMeasures((e) => ({
            stashViewCount: e.stashViewCount + 1,
          }));
        }
        recordStashRestore() {
          return this.updateDailyMeasures((e) => ({
            stashRestoreCount: e.stashRestoreCount + 1,
          }));
        }
        recordNoActionTakenOnStash() {
          return this.updateDailyMeasures((e) => ({
            noActionTakenOnStashCount: e.noActionTakenOnStashCount + 1,
          }));
        }
        addStashEntriesCreatedOutsideDesktop(e) {
          return this.updateDailyMeasures((t) => ({
            stashEntriesCreatedOutsideDesktop:
              t.stashEntriesCreatedOutsideDesktop + e,
          }));
        }
        recordErrorWhenSwitchingBranchesWithUncommmittedChanges() {
          return this.updateDailyMeasures((e) => ({
            errorWhenSwitchingBranchesWithUncommmittedChanges:
              e.errorWhenSwitchingBranchesWithUncommmittedChanges + 1,
          }));
        }
        recordSuggestedStepOpenInExternalEditor() {
          return this.updateDailyMeasures((e) => ({
            suggestedStepOpenInExternalEditor:
              e.suggestedStepOpenInExternalEditor + 1,
          }));
        }
        recordSuggestedStepOpenWorkingDirectory() {
          return this.updateDailyMeasures((e) => ({
            suggestedStepOpenWorkingDirectory:
              e.suggestedStepOpenWorkingDirectory + 1,
          }));
        }
        recordSuggestedStepViewOnGitHub() {
          return this.updateDailyMeasures((e) => ({
            suggestedStepViewOnGitHub: e.suggestedStepViewOnGitHub + 1,
          }));
        }
        recordSuggestedStepPublishRepository() {
          return this.updateDailyMeasures((e) => ({
            suggestedStepPublishRepository:
              e.suggestedStepPublishRepository + 1,
          }));
        }
        recordSuggestedStepPublishBranch() {
          return this.updateDailyMeasures((e) => ({
            suggestedStepPublishBranch: e.suggestedStepPublishBranch + 1,
          }));
        }
        recordSuggestedStepCreatePullRequest() {
          return this.updateDailyMeasures((e) => ({
            suggestedStepCreatePullRequest:
              e.suggestedStepCreatePullRequest + 1,
          }));
        }
        recordSuggestedStepViewStash() {
          return this.updateDailyMeasures((e) => ({
            suggestedStepViewStash: e.suggestedStepViewStash + 1,
          }));
        }
        recordTutorialStarted() {
          return this.updateDailyMeasures(() => ({ tutorialStarted: !0 }));
        }
        recordTutorialRepoCreated() {
          return this.updateDailyMeasures(() => ({ tutorialRepoCreated: !0 }));
        }
        recordTutorialEditorInstalled() {
          return this.updateDailyMeasures(() => ({
            tutorialEditorInstalled: !0,
          }));
        }
        recordTutorialBranchCreated() {
          return this.updateDailyMeasures(() => ({
            tutorialEditorInstalled: !0,
            tutorialBranchCreated: !0,
          }));
        }
        recordTutorialFileEdited() {
          return this.updateDailyMeasures(() => ({
            tutorialEditorInstalled: !0,
            tutorialBranchCreated: !0,
            tutorialFileEdited: !0,
          }));
        }
        recordTutorialCommitCreated() {
          return this.updateDailyMeasures(() => ({
            tutorialEditorInstalled: !0,
            tutorialBranchCreated: !0,
            tutorialFileEdited: !0,
            tutorialCommitCreated: !0,
          }));
        }
        recordTutorialBranchPushed() {
          return this.updateDailyMeasures(() => ({
            tutorialEditorInstalled: !0,
            tutorialBranchCreated: !0,
            tutorialFileEdited: !0,
            tutorialCommitCreated: !0,
            tutorialBranchPushed: !0,
          }));
        }
        recordTutorialPrCreated() {
          return this.updateDailyMeasures(() => ({
            tutorialEditorInstalled: !0,
            tutorialBranchCreated: !0,
            tutorialFileEdited: !0,
            tutorialCommitCreated: !0,
            tutorialBranchPushed: !0,
            tutorialPrCreated: !0,
          }));
        }
        recordTutorialCompleted() {
          return this.updateDailyMeasures(() => ({ tutorialCompleted: !0 }));
        }
        recordHighestTutorialStepCompleted(e) {
          return this.updateDailyMeasures((t) => ({
            highestTutorialStepCompleted: Math.max(
              e,
              t.highestTutorialStepCompleted
            ),
          }));
        }
        recordCommitToRepositoryWithoutWriteAccess() {
          return this.updateDailyMeasures((e) => ({
            commitsToRepositoryWithoutWriteAccess:
              e.commitsToRepositoryWithoutWriteAccess + 1,
          }));
        }
        recordRepositoryCommitedInWithoutWriteAccess(e) {
          const t = Ee("repositories-committed-in-without-write-access");
          t.includes(e) ||
            ke("repositories-committed-in-without-write-access", [...t, e]);
        }
        recordForkCreated() {
          return this.updateDailyMeasures((e) => ({
            forksCreated: e.forksCreated + 1,
          }));
        }
        recordIssueCreationWebpageOpened() {
          return this.updateDailyMeasures((e) => ({
            issueCreationWebpageOpenedCount:
              e.issueCreationWebpageOpenedCount + 1,
          }));
        }
        recordTagCreatedInDesktop() {
          return this.updateDailyMeasures((e) => ({
            tagsCreatedInDesktop: e.tagsCreatedInDesktop + 1,
          }));
        }
        recordTagCreated(e) {
          return this.updateDailyMeasures((t) => ({
            tagsCreated: t.tagsCreated + e,
          }));
        }
        recordTagDeleted() {
          return this.updateDailyMeasures((e) => ({
            tagsDeleted: e.tagsDeleted + 1,
          }));
        }
        recordDiffOptionsViewed() {
          return this.updateDailyMeasures((e) => ({
            diffOptionsViewedCount: e.diffOptionsViewedCount + 1,
          }));
        }
        recordRepositoryViewChanged() {
          return this.updateDailyMeasures((e) => ({
            repositoryViewChangeCount: e.repositoryViewChangeCount + 1,
          }));
        }
        recordDiffModeChanged() {
          return this.updateDailyMeasures((e) => ({
            diffModeChangeCount: e.diffModeChangeCount + 1,
          }));
        }
        recordUnhandledRejection() {
          return this.updateDailyMeasures((e) => ({
            unhandledRejectionCount: e.unhandledRejectionCount + 1,
          }));
        }
        post(e) {
          const t = {
            method: "POST",
            headers: new Headers({ "Content-Type": "application/json" }),
            body: JSON.stringify(e),
          };
          return fetch("https://central.github.com/api/usage/desktop", t);
        }
        async sendOptInStatusPing(e, t) {
          const n = !e,
            r = void 0 === t ? null : !t,
            i = n ? "in" : "out";
          try {
            const e = await this.post({
              eventType: "ping",
              optIn: n,
              previousOptInValue: r,
            });
            if (!e.ok)
              throw new Error(
                `Unexpected status: ${e.statusText} (${e.status})`
              );
            be("has-sent-stats-opt-in-ping", !0),
              log.info(`Opt ${i} reported.`);
          } catch (e) {
            log.error(`Error reporting opt ${i}:`, e);
          }
        }
      })(
        new (class extends ai {
          constructor(e) {
            super(e),
              this.version(1).stores({ launches: "++" }),
              this.version(2).stores({ dailyMeasures: "++id" });
          }
        })("StatsDatabase"),
        new (class {
          constructor() {
            (this.emitter = new ie.Emitter()),
              (this.subscriberCount = 0),
              (this.onMouseDown = (e) => {
                null !== e.target &&
                  e.target instanceof HTMLElement &&
                  (function (e) {
                    for (; null !== e; ) {
                      if (Jb.has(e.nodeName)) return !0;
                      const t = e.getAttribute("role");
                      if (null !== t && eS.has(t)) return !0;
                      e = e instanceof HTMLElement ? e.parentElement : null;
                    }
                    return !1;
                  })(e.target) &&
                  this.emit("pointer");
              }),
              (this.onKeyDown = (e) => {
                this.emit("keyboard");
              }),
              (this.onMenuEvent = (e) => {
                this.emit("menu");
              });
          }
          onActivity(e) {
            const t = this.emitter.on("activity", e);
            return (
              0 === this.subscriberCount && this.startTracking(),
              this.subscriberCount++,
              new ie.Disposable(() => {
                this.subscriberCount--,
                  0 === this.subscriberCount && this.stopTracking(),
                  t.dispose();
              })
            );
          }
          emit(e) {
            this.emitter.emit("activity", e);
          }
          startTracking() {
            document.addEventListener("mousedown", this.onMouseDown),
              document.addEventListener("keydown", this.onKeyDown),
              r.ipcRenderer.on("menu-event", this.onMenuEvent);
          }
          stopTracking() {
            document.removeEventListener("mousedown", this.onMouseDown),
              document.removeEventListener("keydown", this.onKeyDown),
              r.ipcRenderer.removeListener("menu-event", this.onMenuEvent);
          }
        })()
      ),
      dS = new (class extends xi {
        constructor() {
          super(...arguments),
            (this.state = null),
            (this.endpointSupportBasicAuth = new Map());
        }
        emitAuthenticate(e, t) {
          const n = { account: e, method: t };
          this.emitter.emit("did-authenticate", n);
        }
        onDidAuthenticate(e) {
          return this.emitter.on(
            "did-authenticate",
            ({ account: t, method: n }) => {
              e(t, n);
            }
          );
        }
        getState() {
          return this.state;
        }
        setState(e) {
          (this.state = e), this.emitUpdate(this.getState());
        }
        async endpointSupportsBasicAuth(e) {
          if (e === gt()) return !1;
          const t = this.endpointSupportBasicAuth.get(e),
            n = void 0 === t ? null : { verifiable_password_authentication: t },
            r = await (async function (e, t, n) {
              let r = null;
              const i = new Promise((e) => {
                r = window.setTimeout(() => e(n), t);
              });
              return Promise.race([e, i]).finally(() => {
                null !== r && window.clearTimeout(r);
              });
            })(
              (async function (e) {
                const t = e + "/meta";
                try {
                  const t = await je(e, null, "GET", "meta", void 0, {
                      "Content-Type": "application/json",
                    }),
                    n = await Ge(t);
                  return n && void 0 !== n.verifiable_password_authentication
                    ? n
                    : null;
                } catch (e) {
                  return (
                    log.error(
                      `fetchMetadata: unable to load metadata from '${t}' as a fallback`,
                      e
                    ),
                    null
                  );
                }
              })(e),
              2e3,
              n
            );
          if (null !== r) {
            const t = !0 === r.verifiable_password_authentication;
            return this.endpointSupportBasicAuth.set(e, t), t;
          }
          throw new Error(
            "无法通过 GitHub企业服务 实例进行身份验证。验证 URL 是否正确，GitHub企业服务 实例是否运行2.8.0或更高版本，是否有 网络 连接，然后重试。"
          );
        }
        getForgotPasswordURL(e) {
          return mt(e) + "/password_reset";
        }
        reset() {
          this.setState(null);
        }
        beginDotComSignIn() {
          const e = gt();
          this.setState({
            kind: Ku.Authentication,
            endpoint: e,
            supportsBasicAuth: !1,
            error: null,
            loading: !1,
            forgotPasswordUrl: this.getForgotPasswordURL(e),
          }),
            this.endpointSupportsBasicAuth(e)
              .then((t) => {
                null !== this.state &&
                  this.state.kind === Ku.Authentication &&
                  this.state.endpoint === e &&
                  this.setState(
                    Object.assign(Object.assign({}, this.state), {
                      supportsBasicAuth: t,
                    })
                  );
              })
              .catch((e) =>
                log.error(
                  "Failed resolving whether GitHub.com supports password authentication",
                  e
                )
              );
        }
        async authenticateWithBasicAuth(e, t) {
          const n = this.state;
          if (!n || n.kind !== Ku.Authentication) {
            return Z(
              `Sign in step '${
                n ? n.kind : "null"
              }' not compatible with authentication`
            );
          }
          const r = n.endpoint;
          let i;
          this.setState(Object.assign(Object.assign({}, n), { loading: !0 }));
          try {
            i = await pt(r, e, t, null);
          } catch (e) {
            return void this.emitError(e);
          }
          if (this.state && this.state.kind === Ku.Authentication)
            if (i.kind === dt.Authorized) {
              const e = i.token,
                t = await ft(r, e);
              if (!this.state || this.state.kind !== Ku.Authentication) return;
              this.emitAuthenticate(t, Yu.Basic),
                this.setState({ kind: Ku.Success });
            } else if (i.kind === dt.TwoFactorAuthenticationRequired)
              this.setState({
                kind: Ku.TwoFactorAuthentication,
                endpoint: r,
                username: e,
                password: t,
                type: i.type,
                error: null,
                loading: !1,
              });
            else if (i.kind === dt.Error)
              this.emitError(
                new Error(
                  `The server responded with an error while attempting to authenticate (${i.response.status})\n\n${i.response.statusText}`
                )
              ),
                this.setState(
                  Object.assign(Object.assign({}, n), { loading: !1 })
                );
            else if (i.kind === dt.Failed)
              e.includes("@")
                ? this.setState(
                    Object.assign(Object.assign({}, n), {
                      loading: !1,
                      error: new Error("Incorrect email or password."),
                    })
                  )
                : this.setState(
                    Object.assign(Object.assign({}, n), {
                      loading: !1,
                      error: new Error("Incorrect username or password."),
                    })
                  );
            else if (i.kind === dt.UserRequiresVerification)
              this.setState(
                Object.assign(Object.assign({}, n), {
                  loading: !1,
                  error: new Error($u(e)),
                })
              );
            else if (i.kind === dt.PersonalAccessTokenBlocked)
              this.setState(
                Object.assign(Object.assign({}, n), {
                  loading: !1,
                  error: new Error(
                    "A personal access token cannot be used to login to GitHub Desktop."
                  ),
                })
              );
            else if (i.kind === dt.EnterpriseTooOld)
              this.setState(
                Object.assign(Object.assign({}, n), {
                  loading: !1,
                  error: new Error(qu),
                })
              );
            else {
              if (i.kind !== dt.WebFlowRequired)
                return X(0, "Unsupported response: " + i);
              this.setState(
                Object.assign(Object.assign({}, n), {
                  loading: !1,
                  supportsBasicAuth: !1,
                  kind: Ku.Authentication,
                })
              );
            }
        }
        async authenticateWithBrowser() {
          const e = this.state;
          if (!e || e.kind !== Ku.Authentication) {
            return Z(
              `Sign in step '${
                e ? e.kind : "null"
              }' not compatible with browser authentication`
            );
          }
          let t;
          this.setState(Object.assign(Object.assign({}, e), { loading: !0 }));
          try {
            log.info("[SignInStore] initializing OAuth flow"),
              (t = await Wu(e.endpoint)),
              log.info("[SignInStore] account resolved");
          } catch (t) {
            return (
              log.info("[SignInStore] error with OAuth flow", t),
              void this.setState(
                Object.assign(Object.assign({}, e), { error: t, loading: !1 })
              )
            );
          }
          this.state &&
            this.state.kind === Ku.Authentication &&
            (this.emitAuthenticate(t, Yu.Web),
            this.setState({ kind: Ku.Success }));
        }
        beginEnterpriseSignIn() {
          this.setState({ kind: Ku.EndpointEntry, error: null, loading: !1 });
        }
        async setEndpoint(e) {
          const t = this.state;
          if (!t || t.kind !== Ku.EndpointEntry) {
            return Z(
              `Sign in step '${
                t ? t.kind : "null"
              }' not compatible with endpoint entry`
            );
          }
          let n;
          this.setState(Object.assign(Object.assign({}, t), { loading: !0 }));
          try {
            n = (function (e) {
              const t = e.trim();
              if (0 === t.length) {
                const e = new Error("Unknown address");
                throw ((e.name = "invalid-url"), e);
              }
              let n = _e.parse(t);
              if (
                (n.host || ((e = "https://" + t), (n = _e.parse(e))),
                !n.protocol)
              ) {
                const e = new Error("Invalid URL");
                throw ((e.name = "invalid-url"), e);
              }
              if (!Gu.has(n.protocol)) {
                const e = new Error("Invalid protocol");
                throw ((e.name = "invalid-protocol"), e);
              }
              return e;
            })(e);
          } catch (e) {
            let n = e;
            return (
              "invalid-url" === e.name
                ? (n = new Error(
                    "The GitHub Enterprise Server instance address doesn't appear to be a valid URL. We're expecting something like https://github.example.com."
                  ))
                : "invalid-protocol" === e.name &&
                  (n = new Error(
                    "Unsupported protocol. Only http or https is supported when authenticating with GitHub Enterprise Server instances."
                  )),
              void this.setState(
                Object.assign(Object.assign({}, t), { loading: !1, error: n })
              )
            );
          }
          const r = (function (e) {
            const t = _e.parse(e);
            return `${t.protocol}//${t.hostname}/api/v3`;
          })(n);
          try {
            const e = await this.endpointSupportsBasicAuth(r);
            if (!this.state || this.state.kind !== Ku.EndpointEntry) return;
            this.setState({
              kind: Ku.Authentication,
              endpoint: r,
              supportsBasicAuth: e,
              error: null,
              loading: !1,
              forgotPasswordUrl: this.getForgotPasswordURL(r),
            });
          } catch (e) {
            let n = e;
            "ENOTFOUND" === e.code &&
              (n = new Error(
                "The server could not be found. Please verify that the URL is correct and that you have a stable internet connection."
              )),
              this.setState(
                Object.assign(Object.assign({}, t), { loading: !1, error: n })
              );
          }
        }
        async setTwoFactorOTP(e) {
          const t = this.state;
          if (!t || t.kind !== Ku.TwoFactorAuthentication) {
            Z(
              `Sign in step '${
                t ? t.kind : "null"
              }' not compatible with two factor authentication`
            );
          }
          let n;
          this.setState(Object.assign(Object.assign({}, t), { loading: !0 }));
          try {
            n = await pt(t.endpoint, t.username, t.password, e);
          } catch (e) {
            return void this.emitError(e);
          }
          if (this.state && this.state.kind === Ku.TwoFactorAuthentication)
            if (n.kind === dt.Authorized) {
              const e = n.token,
                r = await ft(t.endpoint, e);
              if (!this.state || this.state.kind !== Ku.TwoFactorAuthentication)
                return;
              this.emitAuthenticate(r, Yu.Basic),
                this.setState({ kind: Ku.Success });
            } else
              switch (n.kind) {
                case dt.Failed:
                case dt.TwoFactorAuthenticationRequired:
                  this.setState(
                    Object.assign(Object.assign({}, t), {
                      loading: !1,
                      error: new Error("Two-factor authentication failed."),
                    })
                  );
                  break;
                case dt.Error:
                  this.emitError(
                    new Error(
                      `The server responded with an error (${n.response.status})\n\n${n.response.statusText}`
                    )
                  );
                  break;
                case dt.UserRequiresVerification:
                  this.emitError(new Error($u(t.username)));
                  break;
                case dt.PersonalAccessTokenBlocked:
                  this.emitError(
                    new Error(
                      "A personal access token cannot be used to login to GitHub Desktop."
                    )
                  );
                  break;
                case dt.EnterpriseTooOld:
                  this.emitError(new Error(qu));
                  break;
                case dt.WebFlowRequired:
                  this.setState(
                    Object.assign(Object.assign({}, t), {
                      forgotPasswordUrl: this.getForgotPasswordURL(t.endpoint),
                      loading: !1,
                      supportsBasicAuth: !1,
                      kind: Ku.Authentication,
                      error: null,
                    })
                  );
                  break;
                default:
                  X(0, "Unknown response: " + n);
              }
        }
      })(),
      pS = new (class extends xi {
        constructor(e, t) {
          super(),
            (this.accounts = []),
            (this.dataStore = e),
            (this.secureStore = t),
            (this.loadingPromise = this.loadFromStore());
        }
        async getAll() {
          return await this.loadingPromise, this.accounts.slice();
        }
        async addAccount(e) {
          await this.loadingPromise;
          try {
            const t = Ci(e);
            await this.secureStore.setItem(t, e.login, e.token);
          } catch (t) {
            return (
              log.error(`Error adding account '${e.login}'`, t),
              this.emitError(t),
              null
            );
          }
          const t = this.accounts.reduce(
            (e, t) => e.set(t.endpoint, t),
            new Map()
          );
          return (
            t.set(e.endpoint, e),
            (this.accounts = [...t.values()]),
            this.save(),
            e
          );
        }
        async refresh() {
          (this.accounts = await Promise.all(
            this.accounts.map((e) => this.tryUpdateAccount(e))
          )),
            this.save(),
            this.emitUpdate(this.accounts);
        }
        async tryUpdateAccount(e) {
          try {
            return await (async function (e) {
              if (!e.token)
                return Z(
                  "Cannot update an account which doesn't have a token: " +
                    e.login
                );
              return ft(e.endpoint, e.token);
            })(e);
          } catch (t) {
            return log.warn(`Error refreshing account '${e.login}'`, t), e;
          }
        }
        async removeAccount(e) {
          await this.loadingPromise;
          try {
            await this.secureStore.deleteItem(Ci(e), e.login);
          } catch (t) {
            return (
              log.error(`Error removing account '${e.login}'`, t),
              void this.emitError(t)
            );
          }
          (this.accounts = this.accounts.filter(
            (t) => !(t.endpoint === e.endpoint && t.id === e.id)
          )),
            this.save();
        }
        async loadFromStore() {
          const e = this.dataStore.getItem("users");
          if (!e || !e.length) return;
          const t = JSON.parse(e),
            n = [];
          for (const e of t) {
            const t = new Pe(
                e.login,
                e.endpoint,
                "",
                e.emails,
                e.avatarURL,
                e.id,
                e.name
              ),
              r = Ci(t);
            try {
              const i = await this.secureStore.getItem(r, e.login);
              n.push(t.withToken(i || ""));
            } catch (e) {
              log.error(`Error getting token for '${r}'. Skipping.`, e),
                this.emitError(e);
            }
          }
          (this.accounts = n), this.emitUpdate(this.accounts);
        }
        save() {
          const e = this.accounts.map((e) => e.withToken(""));
          this.dataStore.setItem("users", JSON.stringify(e)),
            this.emitUpdate(this.accounts);
        }
      })(localStorage, ss),
      fS = new (class extends xi {
        constructor(e) {
          super(),
            (this.db = e),
            (this.lastStashCheckCache = new Map()),
            (this.branchProtectionSettingsFoundCache = new Map()),
            (this.protectionEnabledForBranchCache = new Map()),
            (this.emitQueued = !1);
        }
        async upsertGitHubRepositoryLight(e, t) {
          return this.db.transaction(
            "rw",
            this.db.gitHubRepositories,
            this.db.owners,
            () => this._upsertGitHubRepository(e, t, !0)
          );
        }
        async upsertGitHubRepository(e, t) {
          return this.db.transaction(
            "rw",
            this.db.gitHubRepositories,
            this.db.owners,
            () => this._upsertGitHubRepository(e, t, !1)
          );
        }
        async toGitHubRepository(e, t, n) {
          if (
            (ee(e.id, "Need db id to create GitHubRepository"),
            void 0 === n && null !== e.parentID)
          ) {
            const t = await this.db.gitHubRepositories.get(e.parentID);
            ee(t, `Missing parent '${e.id}'`),
              (n = await this.toGitHubRepository(t));
          }
          if (void 0 === t) {
            const n = await this.db.owners.get(e.ownerID);
            ee(n, `Missing owner '${e.ownerID}'`),
              (t = new Bu(n.login, n.endpoint, n.id));
          }
          return new eo(
            e.name,
            t,
            e.id,
            e.private,
            e.htmlURL,
            e.defaultBranch,
            e.cloneURL,
            e.issuesEnabled,
            e.isArchived,
            e.permissions,
            n
          );
        }
        async toRepository(e) {
          return (
            ee(e.id, "can't convert to Repository without id"),
            new lo(
              e.path,
              e.id,
              null !== e.gitHubRepositoryID
                ? await this.findGitHubRepositoryByID(e.gitHubRepositoryID)
                : await Promise.resolve(null),
              e.missing,
              e.workflowPreferences,
              e.isTutorialRepository
            )
          );
        }
        async findGitHubRepositoryByID(e) {
          const t = await this.db.gitHubRepositories.get(e);
          return void 0 !== t
            ? this.toGitHubRepository(t)
            : Promise.resolve(null);
        }
        getAll() {
          return this.db.transaction(
            "r",
            this.db.repositories,
            this.db.gitHubRepositories,
            this.db.owners,
            async () => {
              const e = new Array();
              for (const t of await this.db.repositories.toArray())
                ee(t.id, "no id after loading from db"),
                  e.push(await this.toRepository(t));
              return e;
            }
          );
        }
        async addTutorialRepository(e, t, n) {
          await this.db.transaction(
            "rw",
            this.db.repositories,
            this.db.gitHubRepositories,
            this.db.owners,
            async () => {
              const r = await this.upsertGitHubRepository(t, n),
                i = await this.db.repositories.get({ path: e });
              return await this.db.repositories.put(
                Object.assign(
                  Object.assign(
                    {},
                    void 0 !== (null == i ? void 0 : i.id) && { id: i.id }
                  ),
                  {
                    path: e,
                    gitHubRepositoryID: r.dbID,
                    missing: !1,
                    lastStashCheckDate: null,
                    isTutorialRepository: !0,
                  }
                )
              );
            }
          ),
            this.emitUpdatedRepositories();
        }
        async addRepository(e) {
          const t = await this.db.transaction(
            "rw",
            this.db.repositories,
            this.db.gitHubRepositories,
            this.db.owners,
            async () => {
              const t = await this.db.repositories.get({ path: e });
              if (void 0 !== t) return await this.toRepository(t);
              const n = {
                  path: e,
                  gitHubRepositoryID: null,
                  missing: !1,
                  lastStashCheckDate: null,
                },
                r = await this.db.repositories.add(n);
              return this.toRepository(Object.assign({ id: r }, n));
            }
          );
          return this.emitUpdatedRepositories(), t;
        }
        async removeRepository(e) {
          await this.db.repositories.delete(e.id),
            Qc(e),
            this.emitUpdatedRepositories();
        }
        async updateRepositoryMissing(e, t) {
          return (
            await this.db.repositories.update(e.id, { missing: t }),
            this.emitUpdatedRepositories(),
            new lo(
              e.path,
              e.id,
              e.gitHubRepository,
              t,
              e.workflowPreferences,
              e.isTutorialRepository
            )
          );
        }
        async updateRepositoryWorkflowPreferences(e, t) {
          await this.db.repositories.update(e.id, { workflowPreferences: t }),
            this.emitUpdatedRepositories();
        }
        async updateRepositoryPath(e, t) {
          return (
            await this.db.repositories.update(e.id, { missing: !1, path: t }),
            this.emitUpdatedRepositories(),
            new lo(
              t,
              e.id,
              e.gitHubRepository,
              !1,
              e.workflowPreferences,
              e.isTutorialRepository
            )
          );
        }
        async updateLastStashCheckDate(e, t = Date.now()) {
          await this.db.repositories.update(e.id, { lastStashCheckDate: t }),
            this.lastStashCheckCache.set(e.id, t);
        }
        async getLastStashCheckDate(e) {
          var t;
          let n = this.lastStashCheckCache.get(e.id) || null;
          if (null !== n) return n;
          const r = await this.db.repositories.get(e.id);
          return void 0 === r
            ? Z(
                "'getLastStashCheckDate' - unable to find repository with ID: " +
                  e.id
              )
            : ((n =
                null !== (t = r.lastStashCheckDate) && void 0 !== t ? t : null),
              null !== n && this.lastStashCheckCache.set(e.id, n),
              n);
        }
        async putOwner(e, t) {
          t = t.toLowerCase();
          const n = await this.db.owners
            .where("[endpoint+login]")
            .equals([e, t])
            .first();
          if (n) return new Bu(t, e, n.id);
          const r = await this.db.owners.add({ login: t, endpoint: e });
          return new Bu(t, e, r);
        }
        async upsertGitHubRepositoryFromMatch(e) {
          return await this.db.transaction(
            "rw",
            this.db.gitHubRepositories,
            this.db.owners,
            async () => {
              const { account: t } = e,
                n = await this.putOwner(t.endpoint, e.owner),
                r = await this.db.gitHubRepositories
                  .where("[ownerID+name]")
                  .equals([n.id, e.name])
                  .first();
              if (r) return this.toGitHubRepository(r, n);
              const i = {
                  cloneURL: null,
                  defaultBranch: null,
                  htmlURL: null,
                  lastPruneDate: null,
                  name: e.name,
                  ownerID: n.id,
                  parentID: null,
                  private: null,
                },
                o = await this.db.gitHubRepositories.put(i);
              return this.toGitHubRepository(
                Object.assign(Object.assign({}, i), { id: o }),
                n,
                null
              );
            }
          );
        }
        async setGitHubRepository(e, t) {
          if (co(e) && e.gitHubRepository.hash === t.hash) return e;
          await this.db.transaction("rw", this.db.repositories, () =>
            this.db.repositories.update(e.id, { gitHubRepositoryID: t.dbID })
          ),
            this.emitUpdatedRepositories();
          const n = new lo(
            e.path,
            e.id,
            t,
            e.missing,
            e.workflowPreferences,
            e.isTutorialRepository
          );
          return (
            (function (e) {
              if (!co(e)) Z("Repository must be GitHub repository");
            })(n),
            n
          );
        }
        async _upsertGitHubRepository(e, t, n = !1) {
          var r, i, o, s, a;
          const l =
              "parent" in t && void 0 !== t.parent
                ? await this._upsertGitHubRepository(e, t.parent, !0)
                : await Promise.resolve(null),
            c = t.owner.login.toLowerCase(),
            u = await this.putOwner(e, c),
            h = await this.db.gitHubRepositories
              .where("[ownerID+name]")
              .equals([u.id, t.name])
              .first(),
            d =
              null !==
                (i =
                  null !==
                    (r = (function (e) {
                      const t = "permissions" in e ? e.permissions : void 0;
                      return void 0 === t
                        ? null
                        : t.admin
                        ? "admin"
                        : t.push
                        ? "write"
                        : t.pull
                        ? "read"
                        : null;
                    })(t)) && void 0 !== r
                    ? r
                    : null == h
                    ? void 0
                    : h.permissions) && void 0 !== i
                ? i
                : void 0,
            p = n
              ? null !== (o = null == h ? void 0 : h.parentID) && void 0 !== o
                ? o
                : null
              : null !== (s = null == l ? void 0 : l.dbID) && void 0 !== s
              ? s
              : null,
            f = Object.assign(
              Object.assign(
                {},
                void 0 !== (null == h ? void 0 : h.id) && { id: h.id }
              ),
              {
                ownerID: u.id,
                name: t.name,
                private: t.private,
                htmlURL: t.html_url,
                defaultBranch: t.default_branch,
                cloneURL: t.clone_url,
                parentID: p,
                lastPruneDate:
                  null !== (a = null == h ? void 0 : h.lastPruneDate) &&
                  void 0 !== a
                    ? a
                    : null,
                issuesEnabled: t.has_issues,
                isArchived: t.archived,
                permissions: d,
              }
            );
          if (void 0 !== h && du(h, f)) return this.toGitHubRepository(h, u, l);
          const m = await this.db.gitHubRepositories.put(f);
          return (
            this.emitUpdatedRepositories(),
            this.toGitHubRepository(
              Object.assign(Object.assign({}, f), { id: m }),
              u,
              l
            )
          );
        }
        async updateBranchProtections(e, t) {
          const n = e.dbID;
          await this.db.transaction(
            "rw",
            this.db.protectedBranches,
            async () => {
              const e = zu(n);
              for (const t of this.protectionEnabledForBranchCache.keys())
                t.startsWith(e) &&
                  this.protectionEnabledForBranchCache.delete(t);
              const r = t.map((e) => ({ repoId: n, name: e.name }));
              for (const e of r) {
                const t = Hu(n, e.name);
                this.protectionEnabledForBranchCache.set(t, !0);
              }
              await this.db.protectedBranches
                .where("repoId")
                .equals(n)
                .delete();
              const i = r.length > 0;
              this.branchProtectionSettingsFoundCache.set(n, i),
                r.length > 0 && (await this.db.protectedBranches.bulkAdd(r));
            }
          );
        }
        async updateLastPruneDate(e, t) {
          await this.db.gitHubRepositories.update(e.gitHubRepository.dbID, {
            lastPruneDate: t,
          });
        }
        async getLastPruneDate(e) {
          const t = e.gitHubRepository.dbID,
            n = await this.db.gitHubRepositories.get(t);
          return void 0 === n
            ? Z("getLastPruneDate: No such GitHub repository: " + t)
            : n.lastPruneDate;
        }
        async loadAndCacheBranchProtection(e) {
          const t = await this.db.protectedBranches
              .where("repoId")
              .equals(e)
              .toArray(),
            n = t.length > 0;
          this.branchProtectionSettingsFoundCache.set(e, n);
          for (const n of t) {
            const t = Hu(e, n.name);
            this.protectionEnabledForBranchCache.set(t, !0);
          }
          return n;
        }
        async hasBranchProtectionsConfigured(e) {
          const t = this.branchProtectionSettingsFoundCache.get(e.dbID);
          return void 0 === t ? this.loadAndCacheBranchProtection(e.dbID) : t;
        }
        emitUpdatedRepositories() {
          this.emitQueued ||
            (setImmediate(() => {
              this.getAll()
                .then((e) => this.emitUpdate(e))
                .catch((e) => log.error("Failed emitting update", e))
                .finally(() => (this.emitQueued = !1));
            }),
            (this.emitQueued = !0));
        }
      })(
        new (class extends Xu {
          constructor(e, t) {
            super(e, t),
              this.conditionalVersion(1, {
                repositories: "++id, &path",
                gitHubRepositories: "++id, name",
                owners: "++id, login",
              }),
              this.conditionalVersion(2, { owners: "++id, &[endpoint+login]" }),
              this.conditionalVersion(3, {}, Zb),
              this.conditionalVersion(4, {
                gitHubRepositories: "++id, name, &[ownerID+name]",
              }),
              this.conditionalVersion(5, {
                gitHubRepositories: "++id, name, &[ownerID+name], cloneURL",
              }),
              this.conditionalVersion(6, {
                protectedBranches: "[repoId+name], repoId",
              }),
              this.conditionalVersion(7, {
                gitHubRepositories: "++id, &[ownerID+name]",
              }),
              this.conditionalVersion(8, {}, Xb);
          }
        })("Database")
      ),
      mS = new (class {
        constructor(e, t) {
          (this.db = e),
            (this.repositoryStore = t),
            (this.emitter = new ie.Emitter()),
            (this.currentRefreshOperations = new Map()),
            (this.lastRefreshForRepository = new Map());
        }
        emitPullRequestsChanged(e, t) {
          this.emitter.emit("onPullRequestsChanged", {
            repository: e,
            pullRequests: t,
          });
        }
        onPullRequestsChanged(e) {
          return this.emitter.on("onPullRequestsChanged", (t) => {
            const { repository: n, pullRequests: r } = t;
            e(n, r);
          });
        }
        refreshPullRequests(e, t) {
          const n = this.currentRefreshOperations.get(e.dbID);
          if (void 0 !== n) return n;
          this.lastRefreshForRepository.set(e.dbID, Date.now());
          const r = this.fetchAndStorePullRequests(e, t)
            .catch((t) => {
              log.error(
                `Error refreshing pull requests for '${e.fullName}'`,
                t
              );
            })
            .then(() => {
              this.currentRefreshOperations.delete(e.dbID);
            });
          return this.currentRefreshOperations.set(e.dbID, r), r;
        }
        async fetchAndStorePullRequests(e, t) {
          const n = ht.fromAccount(t),
            r = await this.db.getLastUpdated(e);
          return r
            ? this.fetchAndStoreUpdatedPullRequests(n, e, r)
            : this.fetchAndStoreOpenPullRequests(n, e);
        }
        async fetchAndStoreOpenPullRequests(e, t) {
          const { name: n, owner: r } = nh(t),
            i = await e.fetchAllOpenPullRequests(r, n);
          await this.storePullRequestsAndEmitUpdate(i, t);
        }
        async fetchAndStoreUpdatedPullRequests(e, t, n) {
          const { name: r, owner: i } = nh(t),
            o = await e
              .fetchUpdatedPullRequests(i, r, n)
              .catch((e) =>
                e instanceof lt || e instanceof Ue
                  ? Promise.resolve(null)
                  : Promise.reject(e)
              );
          if (null !== o)
            return await this.storePullRequestsAndEmitUpdate(o, t);
          await this.db.deleteAllPullRequestsInRepository(t),
            await this.fetchAndStoreOpenPullRequests(e, t);
        }
        getLastRefreshed(e) {
          return e.dbID ? this.lastRefreshForRepository.get(e.dbID) : void 0;
        }
        async getAll(e) {
          var t;
          const n = await this.db.getAllPullRequestsInRepository(e),
            r = new Array(),
            i = this.repositoryStore,
            o = Zu()(i.findGitHubRepositoryByID.bind(i));
          for (const e of n) {
            const n = await o(e.head.repoId),
              i = await o(e.base.repoId);
            if (null === n) return Z("head repository can't be null");
            if (null === i) return Z("base repository can't be null");
            r.push(
              new th(
                new Date(e.createdAt),
                e.title,
                e.number,
                new eh(e.head.ref, e.head.sha, n),
                new eh(e.base.ref, e.base.sha, i),
                e.author,
                null !== (t = e.draft) && void 0 !== t && t
              )
            );
          }
          return r.reverse();
        }
        async storePullRequestsAndEmitUpdate(e, t) {
          (await this.storePullRequests(e, t)) &&
            this.emitPullRequestsChanged(t, await this.getAll(t));
        }
        async storePullRequests(e, t) {
          var n;
          if (0 === e.length) return !1;
          let r = e[0].updated_at;
          const i = new Array(),
            o = new Array(),
            { endpoint: s } = t,
            a = this.repositoryStore,
            l = Zu()(a.upsertGitHubRepositoryLight.bind(a), {
              cacheKey: (e, t) => t.clone_url,
            });
          for (const a of e) {
            if ((a.updated_at > r && (r = a.updated_at), null === a.base.repo))
              return Z("PR cannot have a null base repo");
            const e = await l(s, a.base.repo);
            if ("closed" === a.state) {
              i.push(Ju(e, a.number));
              continue;
            }
            if (null == a.head.repo) {
              log.debug(
                `Unable to store pull request #${a.number} for repository ${t.fullName} as it has no head repository associated with it`
              ),
                i.push(Ju(e, a.number));
              continue;
            }
            const c = await l(s, a.head.repo);
            o.push({
              number: a.number,
              title: a.title,
              createdAt: a.created_at,
              updatedAt: a.updated_at,
              head: { ref: a.head.ref, sha: a.head.sha, repoId: c.dbID },
              base: { ref: a.base.ref, sha: a.base.sha, repoId: e.dbID },
              author: a.user.login,
              draft: null !== (n = a.draft) && void 0 !== n && n,
            });
          }
          if (0 === i.length && 1 === o.length) {
            const e = o[0],
              n = await this.db.getPullRequest(t, e.number);
            if (void 0 !== n && hu(e, n)) return !1;
          }
          return (
            await this.db.transaction(
              "rw",
              this.db.pullRequests,
              this.db.pullRequestsLastUpdated,
              async () => {
                await this.db.deletePullRequests(i),
                  await this.db.putPullRequests(o),
                  await this.db.setLastUpdated(t, new Date(r));
              }
            ),
            !0
          );
        }
      })(
        new (class extends Xu {
          constructor(e, t) {
            super(e, t),
              this.conditionalVersion(1, { pullRequests: "id++, base.repoId" }),
              this.conditionalVersion(2, {
                pullRequestStatus: "id++, &[sha+pullRequestId]",
              }),
              this.conditionalVersion(3, {
                pullRequestStatus: "id++, &[sha+pullRequestId], pullRequestId",
              }),
              this.conditionalVersion(4, {}),
              this.conditionalVersion(5, { pullRequestStatus: null }),
              this.conditionalVersion(6, { pullRequests: null }),
              this.conditionalVersion(7, {
                pullRequests: "[base.repoId+number]",
                pullRequestsLastUpdated: "repoId",
              }),
              this.conditionalVersion(8, {}, async (e) => {
                e.table("pullRequests").clear(),
                  e.table("pullRequestsLastUpdated").clear();
              });
          }
          async deleteAllPullRequestsInRepository(e) {
            await this.transaction(
              "rw",
              this.pullRequests,
              this.pullRequestsLastUpdated,
              async () => {
                await this.clearLastUpdated(e),
                  await this.pullRequests
                    .where("[base.repoId+number]")
                    .between([e.dbID], [e.dbID + 1])
                    .delete();
              }
            );
          }
          async deletePullRequests(e) {
            await this.pullRequests.bulkDelete(e);
          }
          async putPullRequests(e) {
            await this.pullRequests.bulkPut(e);
          }
          getAllPullRequestsInRepository(e) {
            return this.pullRequests
              .where("[base.repoId+number]")
              .between([e.dbID], [e.dbID + 1])
              .toArray();
          }
          getPullRequest(e, t) {
            return this.pullRequests.get([e.dbID, t]);
          }
          async getLastUpdated(e) {
            const t = await this.pullRequestsLastUpdated.get(e.dbID);
            return t ? new Date(t.lastUpdated) : null;
          }
          async clearLastUpdated(e) {
            await this.pullRequestsLastUpdated.delete(e.dbID);
          }
          async setLastUpdated(e, t) {
            await this.pullRequestsLastUpdated.put({
              repoId: e.dbID,
              lastUpdated: t.getTime(),
            });
          }
        })("PullRequestDatabase"),
        fS
      ),
      gS = new (class {
        constructor(e, t) {
          (this.pullRequestStore = e),
            (this.repositoriesStore = t),
            (this.currentPullRequestUpdater = null),
            (this.repositories = new Array()),
            (this.prCache = new Map()),
            (this.emitter = new ie.Emitter()),
            this.repositoriesStore.onDidUpdate((e) => {
              this.repositories = e.filter(co);
            });
        }
        onPullRequestsChanged(e) {
          return this.pullRequestStore.onPullRequestsChanged((t, n) => {
            this.prCache.set(t.dbID, n);
            const r = ih(t, this.repositories);
            for (const t of r) e(t, n);
          });
        }
        onIsLoadingPullRequests(e) {
          return this.emitter.on("onIsLoadingPullRequest", (t) => {
            const { repository: n, isLoadingPullRequests: r } = t;
            e(n, r);
          });
        }
        async refreshPullRequests(e, t) {
          const n = fo(e),
            r = ih(n, this.repositories);
          for (const e of r) this.emitIsLoadingPullRequests(e, !0);
          await this.pullRequestStore.refreshPullRequests(n, t);
          for (const e of r) this.emitIsLoadingPullRequests(e, !1);
        }
        getLastRefreshed(e) {
          const t = fo(e);
          return this.pullRequestStore.getLastRefreshed(t);
        }
        async getAllPullRequests(e) {
          return this.getPullRequestsFor(fo(e));
        }
        startPullRequestUpdater(e, t) {
          null !== this.currentPullRequestUpdater &&
            this.stopPullRequestUpdater(),
            (this.currentPullRequestUpdater = new rh(e, t, this)),
            this.currentPullRequestUpdater.start();
        }
        stopPullRequestUpdater() {
          null !== this.currentPullRequestUpdater &&
            (this.currentPullRequestUpdater.stop(),
            (this.currentPullRequestUpdater = null));
        }
        emitIsLoadingPullRequests(e, t) {
          this.emitter.emit("onIsLoadingPullRequest", {
            repository: e,
            isLoadingPullRequests: t,
          });
        }
        async getPullRequestsFor(e) {
          return (
            this.prCache.has(e.dbID) ||
              this.prCache.set(e.dbID, await this.pullRequestStore.getAll(e)),
            this.prCache.get(e.dbID) || []
          );
        }
      })(mS, fS),
      yS = new (class {
        constructor() {
          this.repositoryState = new Map();
        }
        get(e) {
          const t = this.repositoryState.get(e.hash);
          if (null != t) return t;
          const n = {
            commitSelection: {
              sha: null,
              file: null,
              changedFiles: new Array(),
              diff: null,
            },
            changesState: {
              workingDirectory: Co.fromFiles(new Array()),
              selection: {
                kind: G.WorkingDirectory,
                selectedFileIDs: [],
                diff: null,
              },
              commitMessage: Lc,
              coAuthors: [],
              showCoAuthoredBy: !1,
              conflictState: null,
              stashEntry: null,
              currentBranchProtected: !1,
            },
            selectedSection: V.Changes,
            branchesState: {
              tip: { kind: so.Unknown },
              defaultBranch: null,
              allBranches: new Array(),
              recentBranches: new Array(),
              openPullRequests: new Array(),
              currentPullRequest: null,
              isLoadingPullRequests: !1,
              rebasedBranches: new Map(),
            },
            compareState: {
              formState: { kind: $.History },
              tip: null,
              mergeStatus: null,
              showBranchList: !1,
              filterText: "",
              commitSHAs: [],
              aheadBehindCache: new bc(),
              allBranches: new Array(),
              recentBranches: new Array(),
              defaultBranch: null,
            },
            rebaseState: {
              step: null,
              progress: null,
              commits: null,
              userHasResolvedConflicts: !1,
            },
            commitAuthor: null,
            commitLookup: new Map(),
            localCommitSHAs: [],
            localTags: null,
            tagsToPush: null,
            aheadBehind: null,
            remote: null,
            isPushPullFetchInProgress: !1,
            isCommitting: !1,
            lastFetched: null,
            checkoutProgress: null,
            pushPullFetchProgress: null,
            revertProgress: null,
          };
          return this.repositoryState.set(e.hash, n), n;
        }
        update(e, t) {
          const n = this.get(e),
            r = t(n);
          this.repositoryState.set(e.hash, yi(n, r));
        }
        updateCompareState(e, t) {
          this.update(e, (e) => {
            const n = e.compareState;
            return { compareState: yi(n, t(n)) };
          });
        }
        updateChangesState(e, t) {
          this.update(e, (e) => {
            const n = e.changesState;
            return { changesState: yi(n, t(n)) };
          });
        }
        updateCommitSelection(e, t) {
          this.update(e, (e) => {
            const { commitSelection: n } = e;
            return { commitSelection: yi(n, t(n)) };
          });
        }
        updateBranchesState(e, t) {
          this.update(e, (e) => {
            const n = e.branchesState;
            return { branchesState: yi(n, t(n)) };
          });
        }
        updateRebaseState(e, t) {
          this.update(e, (e) => {
            const { rebaseState: n } = e;
            return { rebaseState: yi(n, t(n)) };
          });
        }
      })(),
      vS = new (class extends ki {
        constructor(e) {
          super(),
            (this.accountState = new Map()),
            (this.onAccountsChanged = (e) => {
              const t = new Map();
              for (const n of e)
                for (const [e, r] of this.accountState.entries())
                  if (tS(e, n)) {
                    t.set(n, r);
                    break;
                  }
              (this.accountState = t), this.emitUpdate();
            }),
            e.onDidUpdate(this.onAccountsChanged);
        }
        updateAccount(e, t) {
          const n = new Map(this.accountState),
            r = nS(e, n),
            i = n.get(r),
            o = yi(void 0 === i ? { loading: !1, repositories: [] } : i, t);
          n.set(r, o), (this.accountState = n), this.emitUpdate();
        }
        async loadRepositories(e) {
          const t = nS(e, this.accountState),
            n = this.accountState.get(t);
          if (void 0 !== n && n.loading) return;
          this.updateAccount(t, { loading: !0 });
          const r = ht.fromAccount(t),
            i = await r.fetchRepositories();
          null === i
            ? this.updateAccount(e, { loading: !1 })
            : this.updateAccount(e, { loading: !1, repositories: i });
        }
        getState() {
          return this.accountState;
        }
      })(pS),
      wS = new (class {
        constructor(e) {
          (this.accounts = []),
            (this.backgroundRefreshHandle = null),
            (this.refreshQueued = !1),
            (this.subscriptions = new Map()),
            (this.cache = new bg.a({ maxSize: 250 })),
            (this.queue = new Set()),
            (this.limit = vg()(6)),
            (this.onAccountsUpdated = (e) => {
              this.accounts = e;
            }),
            e.getAll().then(this.onAccountsUpdated),
            e.onDidUpdate(this.onAccountsUpdated);
        }
        startBackgroundRefresh() {
          null === this.backgroundRefreshHandle &&
            ((this.backgroundRefreshHandle = window.setInterval(
              () => this.queueRefresh(),
              18e4
            )),
            this.queueRefresh());
        }
        stopBackgroundRefresh() {
          null !== this.backgroundRefreshHandle &&
            (window.clearInterval(this.backgroundRefreshHandle),
            (this.backgroundRefreshHandle = null));
        }
        queueRefresh() {
          this.refreshQueued ||
            ((this.refreshQueued = !0),
            setImmediate(() => {
              (this.refreshQueued = !1), this.refreshEligibleSubscriptions();
            }));
        }
        refreshEligibleSubscriptions() {
          for (const e of this.subscriptions.keys()) {
            if (this.queue.has(e)) continue;
            const t = this.cache.get(e);
            (t && !Cg(t)) ||
              (this.limit(() => this.refreshSubscription(e))
                .catch((e) => log.error("Failed refreshing commit status", e))
                .then(() => this.queue.delete(e)),
              this.queue.add(e));
          }
        }
        async refreshSubscription(e) {
          var t;
          const n = this.subscriptions.get(e);
          if (void 0 === n) return;
          const { endpoint: r, owner: i, name: o, ref: s } = n,
            a = this.accounts.find((e) => e.endpoint === r);
          if (void 0 === a) return;
          const l = ht.fromAccount(a),
            [c, u] = await Promise.all([
              l.fetchCombinedRefStatus(i, o, s),
              l.fetchRefCheckRuns(i, o, s),
            ]),
            h = new Array();
          if (null === c && null === u) {
            const n = this.cache.get(e),
              r =
                null !== (t = null == n ? void 0 : n.check) && void 0 !== t
                  ? t
                  : null;
            return void this.cache.set(e, { check: r, fetchedAt: new Date() });
          }
          if ((null !== c && h.push(...c.statuses.map(Eg)), null !== u)) {
            const e = (function (e) {
              const t = new Map();
              for (const n of e) {
                const e = t.get(n.name);
                (void 0 === e || e.check_suite.id < n.check_suite.id) &&
                  t.set(n.name, n);
              }
              return [...t.values()];
            })(u.check_runs);
            h.push(...e.map(kg));
          }
          const d = (function (e) {
            if (0 === e.length) return null;
            if (1 === e.length) {
              const { status: t, conclusion: n } = e[0];
              return { status: t, conclusion: n, checks: e };
            }
            return e.some(xg)
              ? { status: "completed", conclusion: "failure", checks: e }
              : e.every(Rg)
              ? { status: "completed", conclusion: "success", checks: e }
              : { status: "in_progress", conclusion: null, checks: e };
          })(h);
          this.cache.set(e, { check: d, fetchedAt: new Date() }),
            n.callbacks.forEach((e) => e(d));
        }
        tryGetStatus(e, t) {
          var n, r;
          const i = Sg(e, t);
          return null !==
            (r =
              null === (n = this.cache.get(i)) || void 0 === n
                ? void 0
                : n.check) && void 0 !== r
            ? r
            : null;
        }
        getOrCreateSubscription(e, t) {
          const n = Sg(e, t);
          let r = this.subscriptions.get(n);
          return (
            void 0 !== r ||
              ((r = {
                endpoint: e.endpoint,
                owner: e.owner.login,
                name: e.name,
                ref: t,
                callbacks: new Set(),
              }),
              this.subscriptions.set(n, r)),
            r
          );
        }
        subscribe(e, t, n) {
          const r = Sg(e, t),
            i = this.getOrCreateSubscription(e, t);
          return (
            i.callbacks.add(n),
            this.queueRefresh(),
            new ie.Disposable(() => {
              i.callbacks.delete(n),
                0 === i.callbacks.size && this.subscriptions.delete(r);
            })
          );
        }
      })(pS),
      bS = new (class extends xi {
        constructor(e, t, n, i, o, s, a, l, c, u) {
          var h;
          super(),
            (this.gitHubUserStore = e),
            (this.cloningRepositoriesStore = t),
            (this.issuesStore = n),
            (this.statsStore = i),
            (this.signInStore = o),
            (this.accountsStore = s),
            (this.repositoriesStore = a),
            (this.pullRequestCoordinator = l),
            (this.repositoryStateCache = c),
            (this.apiRepositoriesStore = u),
            (this.accounts = new Array()),
            (this.repositories = new Array()),
            (this.recentRepositories = new Array()),
            (this.selectedRepository = null),
            (this.currentBackgroundFetcher = null),
            (this.currentAheadBehindUpdater = null),
            (this.currentBranchPruner = null),
            (this.showWelcomeFlow = !1),
            (this.focusCommitMessage = !1),
            (this.currentPopup = null),
            (this.currentFoldout = null),
            (this.currentBanner = null),
            (this.errors = new Array()),
            (this.emitQueued = !1),
            (this.localRepositoryStateLookup = new Map()),
            (this.emoji = new Map()),
            (this.appMenu = null),
            (this.highlightAccessKeys = !1),
            (this.appIsFocused = !1),
            (this.sidebarWidth = 250),
            (this.commitSummaryWidth = 250),
            (this.stashedFilesWidth = 250),
            (this.windowZoomFactor = 1),
            (this.isUpdateAvailableBannerVisible = !1),
            (this.askForConfirmationOnRepositoryRemoval = !0),
            (this.confirmDiscardChanges = !0),
            (this.askForConfirmationOnForcePush = !0),
            (this.imageDiffType = Nu),
            (this.hideWhitespaceInDiff = !1),
            (this.showSideBySideDiff = !1),
            (this.uncommittedChangesStrategy = lu),
            (this.selectedExternalEditor = null),
            (this.resolvedExternalEditor = null),
            (this.selectedShell = dc),
            (this.repositoryFilterText = ""),
            (this.currentMergeTreePromise = null),
            (this.resolveOpenInDesktop = null),
            (this.selectedCloneRepositoryTab = Ai.DotCom),
            (this.selectedBranchesTab = Di.Branches),
            (this.selectedTheme = vi.Light),
            (this.automaticallySwitchTheme = !1),
            (this.hasUserViewedStash = !1),
            (this.currentOnboardingTutorialStep = gu.NotApplicable),
            (this.refreshIndicatorForRepository = async (e) => {
              var t;
              const n = this.localRepositoryStateLookup;
              if (e.missing) return void n.delete(e.id);
              if (!(await Object(_i.pathExists)(e.path)))
                return void n.delete(e.id);
              const r = this.gitStoreCache.get(e),
                i = await r.loadStatus();
              if (null === i) return void n.delete(e.id);
              this.updateSidebarIndicator(e, i), this.emitUpdate();
              const o = await (async function (e, t, n) {
                const r = us(e, n);
                if (null == r) return null;
                await t.loadRemotes();
                const { currentRemote: i } = t,
                  o = ht.fromAccount(r);
                if (null !== i) {
                  const t = Rt(e, i.url);
                  if (null !== t) {
                    const { owner: e, name: n } = t,
                      r = await o.fetchRepository(e, n);
                    if (null !== r) return new Date(r.pushed_at);
                  }
                }
                if (null !== n.gitHubRepository) {
                  const { owner: e, name: t } = n.gitHubRepository,
                    r = await o.fetchRepository(e.login, t);
                  if (null !== r) return new Date(r.pushed_at);
                }
                return null;
              })(this.accounts, r, e);
              if (await this.shouldBackgroundFetch(e, o)) {
                const r = await this.fetchForRepositoryIndicator(e),
                  i = n.get(e.id);
                n.set(e.id, {
                  aheadBehind: r,
                  changedFilesCount:
                    null !== (t = null == i ? void 0 : i.changedFilesCount) &&
                    void 0 !== t
                      ? t
                      : 0,
                }),
                  this.emitUpdate();
              }
            }),
            (this.getRepositoriesForIndicatorRefresh = () =>
              this.repositories.filter((e) => e !== this.selectedRepository)),
            (this.getResolvedExternalEditor = () =>
              this.resolvedExternalEditor),
            (this.showWelcomeFlow = !li()),
            (this.gitStoreCache = new tu(
              te,
              this.statsStore,
              (e, t) => this.onGitStoreUpdated(e, t),
              (e) => this.emitError(e)
            ));
          const d = r.remote.getCurrentWindow();
          (this.windowState = yc(d)),
            this.onWindowZoomFactorChanged(d.webContents.zoomFactor),
            this.wireupIpcEventHandlers(d),
            this.wireupStoreEventHandlers(),
            r.ipcRenderer.send("get-app-menu"),
            (this.tutorialAssessor = new wu(this.getResolvedExternalEditor)),
            void 0 === we("enable-repository-indicators") &&
              be("enable-repository-indicators", !0),
            (this.repositoryIndicatorsEnabled =
              null === (h = we("enable-repository-indicators")) ||
              void 0 === h ||
              h),
            (this.repositoryIndicatorUpdater = new Au(
              this.getRepositoriesForIndicatorRefresh,
              this.refreshIndicatorForRepository
            )),
            window.setTimeout(() => {
              this.repositoryIndicatorsEnabled &&
                this.repositoryIndicatorUpdater.start();
            }, 12e4);
        }
        async updateCurrentTutorialStep(e) {
          const t = await this.tutorialAssessor.getCurrentStep(
            e.isTutorialRepository,
            this.repositoryStateCache.get(e)
          );
          t !== this.currentOnboardingTutorialStep &&
            ((this.currentOnboardingTutorialStep = t),
            log.info("Current tutorial step is now " + t),
            this.recordTutorialStepCompleted(t),
            this.emitUpdate());
        }
        recordTutorialStepCompleted(e) {
          if (yu(e))
            switch (
              (this.statsStore.recordHighestTutorialStepCompleted(
                vu.indexOf(e)
              ),
              e)
            ) {
              case gu.PickEditor:
                break;
              case gu.CreateBranch:
                this.statsStore.recordTutorialEditorInstalled();
                break;
              case gu.EditFile:
                this.statsStore.recordTutorialBranchCreated();
                break;
              case gu.MakeCommit:
                this.statsStore.recordTutorialFileEdited();
                break;
              case gu.PushBranch:
                this.statsStore.recordTutorialCommitCreated();
                break;
              case gu.OpenPullRequest:
                this.statsStore.recordTutorialBranchPushed();
                break;
              case gu.AllDone:
                this.statsStore.recordTutorialPrCreated(),
                  this.statsStore.recordTutorialCompleted();
                break;
              default:
                X(0, "Unaccounted for step type");
            }
        }
        async _resumeTutorial(e) {
          this.tutorialAssessor.resumeTutorial(),
            await this.updateCurrentTutorialStep(e);
        }
        async _pauseTutorial(e) {
          this.tutorialAssessor.pauseTutorial(),
            await this.updateCurrentTutorialStep(e);
        }
        async _skipPickEditorTutorialStep(e) {
          this.tutorialAssessor.skipPickEditor(),
            await this.updateCurrentTutorialStep(e);
        }
        async _markPullRequestTutorialStepAsComplete(e) {
          this.tutorialAssessor.markPullRequestTutorialStepAsComplete(),
            await this.updateCurrentTutorialStep(e);
        }
        wireupIpcEventHandlers(e) {
          r.ipcRenderer.on("window-state-changed", (e, t) => {
            (this.windowState = t), this.emitUpdate();
          }),
            r.ipcRenderer.on("zoom-factor-changed", (e, t) => {
              this.onWindowZoomFactorChanged(t);
            }),
            r.ipcRenderer.on("app-menu", (e, { menu: t }) => {
              this.setAppMenu(t);
            });
        }
        wireupStoreEventHandlers() {
          this.gitHubUserStore.onDidUpdate(() => {
            this.emitUpdate();
          }),
            this.cloningRepositoriesStore.onDidUpdate(() => {
              this.emitUpdate();
            }),
            this.cloningRepositoriesStore.onDidError((e) => this.emitError(e)),
            this.signInStore.onDidAuthenticate((e, t) => {
              this._addAccount(e),
                this.showWelcomeFlow &&
                  this.statsStore.recordWelcomeWizardSignInMethod(t);
            }),
            this.signInStore.onDidUpdate(() => this.emitUpdate()),
            this.signInStore.onDidError((e) => this.emitError(e)),
            this.accountsStore.onDidUpdate((e) => {
              (this.accounts = e), this.emitUpdate();
            }),
            this.accountsStore.onDidError((e) => this.emitError(e)),
            this.repositoriesStore.onDidUpdate((e) => {
              (this.repositories = e),
                this.updateRepositorySelectionAfterRepositoriesChanged(),
                this.emitUpdate();
            }),
            this.pullRequestCoordinator.onPullRequestsChanged((e, t) =>
              this.onPullRequestChanged(e, t)
            ),
            this.pullRequestCoordinator.onIsLoadingPullRequests((e, t) => {
              this.repositoryStateCache.updateBranchesState(e, () => ({
                isLoadingPullRequests: t,
              })),
                this.emitUpdate();
            }),
            this.apiRepositoriesStore.onDidUpdate(() => this.emitUpdate()),
            this.apiRepositoriesStore.onDidError((e) => this.emitError(e));
        }
        loadEmoji() {
          Oc(ze())
            .then((e) => {
              (this.emoji = e), this.emitUpdate();
            })
            .catch((e) => {
              log.warn(
                "Unexpected issue when trying to read emoji into memory",
                e
              );
            });
        }
        emitUpdate() {
          "hidden" !== this.windowState
            ? this.emitQueued ||
              ((this.emitQueued = !0),
              window.requestAnimationFrame(() => {
                this.emitUpdateNow();
              }))
            : this.emitUpdateNow();
        }
        emitUpdateNow() {
          this.emitQueued = !1;
          const e = this.getState();
          super.emitUpdate(e), ic(e, this.appMenu);
        }
        onWindowZoomFactorChanged(e) {
          const t = this.windowZoomFactor;
          (this.windowZoomFactor = e), e !== t && this.emitUpdate();
        }
        getSelectedState() {
          const e = this.selectedRepository;
          if (!e) return null;
          if (e instanceof Ui) {
            const t = this.cloningRepositoriesStore.getRepositoryState(e);
            return t
              ? { type: W.CloningRepository, repository: e, progress: t }
              : null;
          }
          return e.missing
            ? { type: W.MissingRepository, repository: e }
            : {
                type: W.Repository,
                repository: e,
                state: this.repositoryStateCache.get(e),
              };
        }
        getState() {
          const e = [
            ...this.repositories,
            ...this.cloningRepositoriesStore.repositories,
          ];
          return {
            accounts: this.accounts,
            repositories: e,
            recentRepositories: this.recentRepositories,
            localRepositoryStateLookup: this.localRepositoryStateLookup,
            windowState: this.windowState,
            windowZoomFactor: this.windowZoomFactor,
            appIsFocused: this.appIsFocused,
            selectedState: this.getSelectedState(),
            signInState: this.signInStore.getState(),
            currentPopup: this.currentPopup,
            currentFoldout: this.currentFoldout,
            errors: this.errors,
            showWelcomeFlow: this.showWelcomeFlow,
            focusCommitMessage: this.focusCommitMessage,
            emoji: this.emoji,
            sidebarWidth: this.sidebarWidth,
            commitSummaryWidth: this.commitSummaryWidth,
            stashedFilesWidth: this.stashedFilesWidth,
            appMenuState: this.appMenu ? this.appMenu.openMenus : [],
            highlightAccessKeys: this.highlightAccessKeys,
            isUpdateAvailableBannerVisible: this.isUpdateAvailableBannerVisible,
            currentBanner: this.currentBanner,
            askForConfirmationOnRepositoryRemoval: this
              .askForConfirmationOnRepositoryRemoval,
            askForConfirmationOnDiscardChanges: this.confirmDiscardChanges,
            askForConfirmationOnForcePush: this.askForConfirmationOnForcePush,
            uncommittedChangesStrategy: this.uncommittedChangesStrategy,
            selectedExternalEditor: this.selectedExternalEditor,
            imageDiffType: this.imageDiffType,
            hideWhitespaceInDiff: this.hideWhitespaceInDiff,
            showSideBySideDiff: this.showSideBySideDiff,
            selectedShell: this.selectedShell,
            repositoryFilterText: this.repositoryFilterText,
            resolvedExternalEditor: this.resolvedExternalEditor,
            selectedCloneRepositoryTab: this.selectedCloneRepositoryTab,
            selectedBranchesTab: this.selectedBranchesTab,
            selectedTheme: this.selectedTheme,
            automaticallySwitchTheme: this.automaticallySwitchTheme,
            apiRepositories: this.apiRepositoriesStore.getState(),
            optOutOfUsageTracking: this.statsStore.getOptOut(),
            currentOnboardingTutorialStep: this.currentOnboardingTutorialStep,
            repositoryIndicatorsEnabled: this.repositoryIndicatorsEnabled,
          };
        }
        onGitStoreUpdated(e, t) {
          const n = this.repositoryStateCache.get(e);
          this.repositoryStateCache.updateBranchesState(e, (r) => {
            let { currentPullRequest: i } = r;
            const { tip: o, currentRemote: s } = t;
            if (
              !(function (e, t) {
                if (e === t) return !0;
                const n = e.kind;
                switch (e.kind) {
                  case so.Unknown:
                    return e.kind === t.kind;
                  case so.Unborn:
                    return e.kind === t.kind && e.ref === t.ref;
                  case so.Detached:
                    return e.kind === t.kind && e.currentSha === t.currentSha;
                  case so.Valid:
                    return (
                      e.kind === t.kind &&
                      (function (e, t) {
                        return (
                          e.type === t.type &&
                          e.tip.sha === t.tip.sha &&
                          e.remote === t.remote &&
                          e.upstream === t.upstream
                        );
                      })(e.branch, t.branch)
                    );
                  default:
                    return X(0, "Unknown tip state " + n);
                }
              })(r.tip, o) ||
              ((a = n.remote) !== (l = s) &&
                (null === a ||
                  null === l ||
                  a.name !== l.name ||
                  a.url !== l.url))
            )
              if (o.kind !== so.Valid || null === s) i = null;
              else {
                const { branch: t } = o;
                if (!i || !Su(t, i, s)) {
                  i = bu(t, r.openPullRequests, s);
                }
                o.kind === so.Valid &&
                  r.tip.kind === so.Valid &&
                  o.branch.name !== r.tip.branch.name &&
                  this.refreshBranchProtectionState(e);
              }
            var a, l;
            return {
              tip: t.tip,
              defaultBranch: t.defaultBranch,
              allBranches: t.allBranches,
              recentBranches: t.recentBranches,
              pullWithRebase: t.pullWithRebase,
              currentPullRequest: i,
            };
          });
          let r = !1,
            i = !1;
          this.repositoryStateCache.updateChangesState(e, (e) => {
            const n = t.currentBranchStashEntry;
            return (
              e.selection.kind === G.Stash &&
                null !== e.stashEntry &&
                (null === n
                  ? (r = !0)
                  : e.stashEntry.stashSha !== n.stashSha && (i = !0)),
              {
                commitMessage: t.commitMessage,
                showCoAuthoredBy: t.showCoAuthoredBy,
                coAuthors: t.coAuthors,
                stashEntry: n,
              }
            );
          }),
            this.repositoryStateCache.update(e, () => ({
              commitLookup: t.commitLookup,
              localCommitSHAs: t.localCommitSHAs,
              localTags: t.localTags,
              aheadBehind: t.aheadBehind,
              tagsToPush: t.tagsToPush,
              remote: t.currentRemote,
              lastFetched: t.lastFetched,
            })),
            r
              ? this._selectWorkingDirectoryFiles(e)
              : i
              ? this._selectStashedFile(e)
              : this.emitUpdate();
        }
        clearBranchProtectionState(e) {
          this.repositoryStateCache.updateChangesState(e, () => ({
            currentBranchProtected: !1,
          })),
            this.emitUpdate();
        }
        async refreshBranchProtectionState(e) {
          const { tip: t, currentRemote: n } = this.gitStoreCache.get(e);
          if (t.kind !== so.Valid || null === e.gitHubRepository) return;
          const r = e.gitHubRepository,
            i = mu(t, n, r);
          if (null !== i) {
            const t = yt(this.accounts, r.endpoint);
            if (null === t) return;
            if (!to(r))
              return (
                this.repositoryStateCache.updateChangesState(e, () => ({
                  currentBranchProtected: !1,
                })),
                void this.emitUpdate()
              );
            const n = r.name,
              o = r.owner.login,
              s = ht.fromAccount(t),
              a = !(function (e) {
                const {
                    allow_actor: t,
                    required_status_checks: n,
                    required_approving_review_count: r,
                  } = e,
                  i = Array.isArray(n) ? n.length : 0;
                return !1 !== t && 0 === i && 0 === r;
              })(await s.fetchPushControl(o, n, i));
            this.repositoryStateCache.updateChangesState(e, () => ({
              currentBranchProtected: a,
            })),
              this.emitUpdate();
          }
        }
        clearSelectedCommit(e) {
          this.repositoryStateCache.updateCommitSelection(e, () => ({
            sha: null,
            file: null,
            changedFiles: [],
            diff: null,
          }));
        }
        async _changeCommitSelection(e, t) {
          const { commitSelection: n } = this.repositoryStateCache.get(e);
          n.sha !== t &&
            (this.repositoryStateCache.updateCommitSelection(e, () => ({
              sha: t,
              file: null,
              changedFiles: [],
              diff: null,
            })),
            this.emitUpdate());
        }
        updateOrSelectFirstCommit(e, t) {
          let n = this.repositoryStateCache.get(e).commitSelection.sha;
          if (null != n) {
            t.findIndex((e) => e === n) < 0 &&
              ((n = null), this.clearSelectedCommit(e));
          }
          null == n &&
            t.length > 0 &&
            (this._changeCommitSelection(e, t[0]),
            this._loadChangedFilesForCurrentSelection(e));
        }
        startAheadBehindUpdater(e) {
          null != this.currentAheadBehindUpdater &&
            Z(
              "An ahead/behind updater is already active and cannot start updating on " +
                e.name
            );
          const t = new Sc(e, (t) => {
            this.repositoryStateCache.updateCompareState(e, () => ({
              aheadBehindCache: t,
            })),
              this.emitUpdate();
          });
          (this.currentAheadBehindUpdater = t),
            this.currentAheadBehindUpdater.start();
        }
        stopAheadBehindUpdate() {
          const e = this.currentAheadBehindUpdater;
          null != e && (e.stop(), (this.currentAheadBehindUpdater = null));
        }
        async _initializeCompare(e, t) {
          const n = this.repositoryStateCache.get(e),
            { branchesState: r, compareState: i } = n,
            { tip: o } = r,
            s = o.kind === so.Valid ? o.branch : null,
            a =
              null != s
                ? r.allBranches.filter((e) => e.name !== s.name)
                : r.allBranches,
            l = s
              ? r.recentBranches.filter((e) => e.name !== s.name)
              : r.recentBranches,
            c = r.defaultBranch,
            u = null != s && null != c && s.name !== c.name ? c : null;
          this.repositoryStateCache.updateCompareState(e, () => ({
            allBranches: a,
            recentBranches: l,
            defaultBranch: u,
          }));
          const h = i.formState,
            d =
              null != t
                ? t
                : (function (e) {
                    if (e.kind === $.History) return { kind: $.History };
                    const { comparisonMode: t, comparisonBranch: n } = e;
                    return { kind: $.Compare, comparisonMode: t, branch: n };
                  })(h);
          this._executeCompare(e, d);
        }
        async _executeCompare(e, t) {
          const n = this.gitStoreCache.get(e),
            r = t.kind;
          if (t.kind === $.History) {
            const { tip: t } = n;
            let r = null;
            t.kind === so.Valid
              ? (r = t.branch.tip.sha)
              : t.kind === so.Detached && (r = t.currentSha);
            const { compareState: i } = this.repositoryStateCache.get(e),
              { formState: o, commitSHAs: s } = i,
              a = i.tip;
            if (
              null !== r &&
              null !== a &&
              r === a &&
              o.kind === $.History &&
              s.length > 0
            )
              return;
            const l = await n.loadCommitBatch("HEAD");
            if (null === l) return;
            const c = { kind: $.History };
            return (
              this.repositoryStateCache.updateCompareState(e, () => ({
                tip: r,
                formState: c,
                commitSHAs: l,
                filterText: "",
                showBranchList: !1,
              })),
              this.updateOrSelectFirstCommit(e, l),
              this.emitUpdate()
            );
          }
          return t.kind === $.Compare
            ? this.updateCompareToBranch(e, t)
            : X(0, "Unknown action: " + r);
        }
        async updateCompareToBranch(e, t) {
          const n = this.gitStoreCache.get(e),
            r = t.branch,
            i = await n.getCompareCommits(r, t.comparisonMode);
          this.statsStore.recordBranchComparison();
          const { branchesState: o } = this.repositoryStateCache.get(e);
          if (
            (null !== o.defaultBranch &&
              r.name === o.defaultBranch.name &&
              this.statsStore.recordDefaultBranchComparison(),
            null == i)
          )
            return;
          const { ahead: s, behind: a } = i,
            l = { ahead: s, behind: a },
            c = i.commits.map((e) => e.sha),
            u = {
              kind: $.Compare,
              comparisonBranch: r,
              comparisonMode: t.comparisonMode,
              aheadBehind: l,
            };
          this.repositoryStateCache.updateCompareState(e, (e) => ({
            formState: u,
            filterText: r.name,
            commitSHAs: c,
          }));
          const h = n.tip;
          let d = null;
          if (
            (h.kind === so.Valid
              ? (d = h.branch.tip.sha)
              : h.kind === so.Detached && (d = h.currentSha),
            null != this.currentAheadBehindUpdater && null != d)
          ) {
            const e = t.comparisonMode === q.Ahead ? r.tip.sha : d,
              n = t.comparisonMode === q.Ahead ? d : r.tip.sha;
            this.currentAheadBehindUpdater.insert(e, n, l);
          }
          const p = { kind: cl.Loading };
          if (
            (this.repositoryStateCache.updateCompareState(e, () => ({
              mergeStatus: p,
            })),
            this.emitUpdate(),
            this.updateOrSelectFirstCommit(e, c),
            null != this.currentMergeTreePromise)
          )
            return this.currentMergeTreePromise;
          if (h.kind === so.Valid && l.behind > 0) {
            const n = Cc(() => gl(e, h.branch, t.branch), 500)
                .catch(
                  (e) => (
                    log.warn(
                      `Error occurred while trying to merge ${h.branch.name} (${h.branch.tip.sha}) and ${t.branch.name} (${t.branch.tip.sha})`,
                      e
                    ),
                    null
                  )
                )
                .then((t) => {
                  this.repositoryStateCache.updateCompareState(e, () => ({
                    mergeStatus: t,
                  })),
                    this.emitUpdate();
                }),
              r = () => {
                this.currentMergeTreePromise = null;
              };
            return (
              n.then(r, r),
              (this.currentMergeTreePromise = n),
              this.currentMergeTreePromise
            );
          }
          return (
            this.repositoryStateCache.updateCompareState(e, () => ({
              mergeStatus: null,
            })),
            this.emitUpdate()
          );
        }
        _updateCompareForm(e, t) {
          this.repositoryStateCache.updateCompareState(e, (e) => yi(e, t)),
            this.emitUpdate();
          const {
            branchesState: n,
            compareState: r,
          } = this.repositoryStateCache.get(e);
          if (
            n.tip.kind === so.Valid &&
            null !== this.currentAheadBehindUpdater
          )
            if (r.showBranchList) {
              const e = n.tip.branch;
              this.currentAheadBehindUpdater.schedule(
                e,
                r.defaultBranch,
                r.recentBranches,
                r.allBranches
              );
            } else this.currentAheadBehindUpdater.clear();
        }
        async _loadNextCommitBatch(e) {
          const t = this.gitStoreCache.get(e),
            n = this.repositoryStateCache.get(e),
            { formState: r } = n.compareState;
          if (r.kind === $.History) {
            const r = n.compareState.commitSHAs,
              i = r[r.length - 1],
              o = await t.loadCommitBatch(i + "^");
            if (null == o) return;
            this.repositoryStateCache.updateCompareState(e, () => ({
              commitSHAs: r.concat(o),
            })),
              this.emitUpdate();
          }
        }
        async _loadChangedFilesForCurrentSelection(e) {
          const t = this.repositoryStateCache.get(e),
            { commitSelection: n } = t,
            r = n.sha;
          if (null == r) return;
          const i = this.gitStoreCache.get(e),
            o = await i.performFailableOperation(() =>
              (async function (e, t) {
                const n = [
                  "log",
                  t,
                  "-C",
                  "-M",
                  "-m",
                  "-1",
                  "--no-show-signature",
                  "--first-parent",
                  "--name-status",
                  "--format=format:",
                  "-z",
                  "--",
                ];
                return Ba((await $o(n, e.path, "getChangedFiles")).stdout, t);
              })(e, r)
            );
          if (!o) return;
          if (r !== t.commitSelection.sha) return;
          const s = null === n.file && o.length ? o[0] : n.file;
          this.repositoryStateCache.updateCommitSelection(e, () => ({
            file: s,
            changedFiles: o,
            diff: null,
          })),
            this.emitUpdate(),
            null !== s && this._changeFileSelection(e, s);
        }
        async _setRepositoryFilterText(e) {
          (this.repositoryFilterText = e), this.emitUpdate();
        }
        async _changeFileSelection(e, t) {
          this.repositoryStateCache.updateCommitSelection(e, () => ({
            file: t,
            diff: null,
          })),
            this.emitUpdate();
          const n = this.repositoryStateCache.get(e),
            r = n.commitSelection.sha;
          if (!r) return void 0;
          const i = await Es(e, t, r, this.hideWhitespaceInDiff),
            o = this.repositoryStateCache.get(e);
          o.commitSelection.sha === n.commitSelection.sha &&
            o.commitSelection.file &&
            o.commitSelection.file.id === t.id &&
            (this.repositoryStateCache.updateCommitSelection(e, () => ({
              diff: i,
            })),
            this.emitUpdate());
        }
        async _selectRepository(e) {
          const t = this.selectedRepository;
          if (
            (!(this.currentOnboardingTutorialStep !== gu.NotApplicable) ||
              (e instanceof lo && e.isTutorialRepository) ||
              (this.currentOnboardingTutorialStep = gu.NotApplicable),
            (this.selectedRepository = e),
            this.emitUpdate(),
            this.stopBackgroundFetching(),
            this.stopPullRequestUpdater(),
            this._clearBanner(),
            this.stopBackgroundPruner(),
            null == e)
          )
            return Promise.resolve(null);
          if (!(e instanceof lo)) return Promise.resolve(null);
          Ce("last-selected-repository-id", e.id);
          const n = t ? t.id : null;
          this.updateRecentRepositories(n, e.id);
          const r = await this.recoverMissingRepository(e);
          return r.missing
            ? (this.gitStoreCache.remove(e), Promise.resolve(null))
            : (this.updateBranchProtectionsFromAPI(e),
              this._selectRepositoryRefreshTasks(r, t));
        }
        updateRecentRepositories(e, t) {
          const n = Ee("recently-selected-repositories").filter(
            (n) => n !== t && n !== e
          );
          null !== e && n.unshift(e);
          const r = n.slice(0, 3);
          ke("recently-selected-repositories", r),
            (this.recentRepositories = r),
            this.emitUpdate();
        }
        async _selectRepositoryRefreshTasks(e, t) {
          if ((this._refreshRepository(e), co(e))) {
            const t = fo(e);
            this._refreshIssues(t),
              this.refreshMentionables(t),
              this.pullRequestCoordinator.getAllPullRequests(e).then((t) => {
                this.onPullRequestChanged(e, t);
              });
          }
          return this.selectedRepository !== e
            ? null
            : (this.stopBackgroundFetching(),
              this.stopPullRequestUpdater(),
              this.stopAheadBehindUpdate(),
              this.stopBackgroundPruner(),
              this.startBackgroundFetching(e, !t),
              this.startPullRequestUpdater(e),
              this.startAheadBehindUpdater(e),
              this.startBackgroundPruner(e),
              this.addUpstreamRemoteIfNeeded(e),
              this.repositoryWithRefreshedGitHubRepository(e));
        }
        stopBackgroundPruner() {
          const e = this.currentBranchPruner;
          null !== e && (e.stop(), (this.currentBranchPruner = null));
        }
        startBackgroundPruner(e) {
          null !== this.currentBranchPruner &&
            Z(
              "A branch pruner is already active and cannot start updating on " +
                e.name
            );
          const t = new ou(
            e,
            this.gitStoreCache,
            this.repositoriesStore,
            this.repositoryStateCache,
            (e) => this._refreshRepository(e)
          );
          (this.currentBranchPruner = t), this.currentBranchPruner.start();
        }
        async _refreshIssues(e) {
          const t = yt(this.accounts, e.endpoint);
          if (t)
            try {
              await this.issuesStore.refreshIssues(e, t);
            } catch (t) {
              log.warn("Unable to fetch issues for " + e.fullName, t);
            }
        }
        stopBackgroundFetching() {
          const e = this.currentBackgroundFetcher;
          e && (e.stop(), (this.currentBackgroundFetcher = null));
        }
        refreshMentionables(e) {
          const t = yt(this.accounts, e.endpoint);
          t && this.gitHubUserStore.updateMentionables(e, t);
        }
        startPullRequestUpdater(e) {
          if (this.appIsFocused && co(e)) {
            const t = us(this.accounts, e);
            if (null !== t)
              return this.pullRequestCoordinator.startPullRequestUpdater(e, t);
          }
          this.pullRequestCoordinator.stopPullRequestUpdater();
        }
        stopPullRequestUpdater() {
          this.pullRequestCoordinator.stopPullRequestUpdater();
        }
        async fetchPullRequest(e, t) {
          const n = (function (e) {
              const t = _e.parse(e);
              return "github.com" === t.hostname
                ? gt()
                : `${t.protocol}//${t.hostname}/api`;
            })(e),
            r = yt(this.accounts, n);
          if (r) {
            const n = ht.fromAccount(r),
              i = bt(e);
            if (i && i.owner && i.name)
              return await n.fetchPullRequest(i.owner, i.name, t);
          }
          return null;
        }
        async shouldBackgroundFetch(e, t) {
          const n = this.gitStoreCache.get(e),
            r = await n.updateLastFetched();
          if (null === r) return !0;
          const i = new Date().getTime() - r.getTime(),
            o = ho(e);
          if (i < 18e5) {
            const e = Math.floor(i / 1e3);
            return (
              log.debug(
                `Skipping background fetch as '${o}' was fetched ${e}s ago`
              ),
              !1
            );
          }
          return (
            null === t ||
            r < t ||
            (log.debug(
              `Skipping background fetch since nothing has been pushed to '${o}' since the last fetch at ${r}`
            ),
            !1)
          );
        }
        startBackgroundFetching(e, t) {
          this.currentBackgroundFetcher &&
            Z(
              `We should only have on background fetcher active at once, but we're trying to start background fetching on ${e.name} while another background fetcher is still active!`
            );
          const n = us(this.accounts, e);
          if (!n) return;
          if (!e.gitHubRepository) return;
          const r = new kc(
            e,
            n,
            (e) => this.performFetch(e, n, $i.BackgroundTask),
            (e) => this.shouldBackgroundFetch(e, null)
          );
          r.start(t), (this.currentBackgroundFetcher = r);
        }
        async loadInitialState() {
          var e;
          const [t, n] = await Promise.all([
            this.accountsStore.getAll(),
            this.repositoriesStore.getAll(),
          ]);
          log.info(`[AppStore] loading ${n.length} repositories from store`),
            t.forEach((e) => {
              log.info(`[AppStore] found account: ${e.login} (${e.name})`);
            }),
            (this.accounts = t),
            (this.repositories = n),
            this.updateRepositorySelectionAfterRepositoriesChanged(),
            (this.sidebarWidth = Se("sidebar-width", 250)),
            (this.commitSummaryWidth = Se("commit-summary-width", 250)),
            (this.stashedFilesWidth = Se("stashed-files-width", 250)),
            (this.askForConfirmationOnRepositoryRemoval = we(
              "confirmRepoRemoval",
              !0
            )),
            (this.confirmDiscardChanges = we("confirmDiscardChanges", !0)),
            (this.askForConfirmationOnForcePush = we("confirmForcePush", !0)),
            (this.uncommittedChangesStrategy =
              null !==
                (e = (function (e, t) {
                  const n = localStorage.getItem(e);
                  return null === n ? void 0 : ve(t, n);
                })("uncommittedChangesStrategyKind", au)) && void 0 !== e
                ? e
                : lu),
            this.updateSelectedExternalEditor(
              await this.lookupSelectedExternalEditor()
            ).catch((e) =>
              log.error("Failed resolving current editor at startup", e)
            );
          const r = localStorage.getItem("shell");
          (this.selectedShell = r ? fc(r) : dc),
            this.updateMenuLabelsForSelectedRepository();
          const i = localStorage.getItem("image-diff-type");
          (this.imageDiffType = null === i ? Nu : parseInt(i)),
            (this.hideWhitespaceInDiff = we("hide-whitespace-in-diff", !1)),
            (this.showSideBySideDiff = Fu()),
            (this.automaticallySwitchTheme = we("autoSwitchTheme", !1)),
            this.automaticallySwitchTheme
              ? ((this.selectedTheme = ko() ? vi.Dark : vi.Light),
                Si(this.selectedTheme))
              : (this.selectedTheme = bi()),
            xo.onThemeChanged((e) => {
              this.automaticallySwitchTheme &&
                ((this.selectedTheme = e), this.emitUpdate());
            }),
            this.emitUpdateNow(),
            this.accountsStore.refresh();
        }
        updateSelectedExternalEditor(e) {
          return (
            (this.selectedExternalEditor = e), this._resolveCurrentEditor()
          );
        }
        async lookupSelectedExternalEditor() {
          const e = (await Lo()).map((e) => e.editor),
            t = localStorage.getItem("externalEditor");
          if (t) {
            const n = Po(t);
            if (n && e.includes(n)) return n;
          }
          if (e.length) {
            const t = e[0];
            return localStorage.setItem("externalEditor", t), t;
          }
          return null;
        }
        updateMenuLabelsForSelectedRepository() {
          const { selectedState: e } = this.getState();
          null !== e && e.type === W.Repository
            ? this.updateMenuItemLabels(e.state)
            : this.updateMenuItemLabels(null);
        }
        updateMenuItemLabels(e) {
          const {
              selectedShell: t,
              selectedExternalEditor: n,
              askForConfirmationOnRepositoryRemoval: r,
              askForConfirmationOnForcePush: i,
            } = this,
            o = {
              selectedShell: t,
              selectedExternalEditor: n,
              askForConfirmationOnRepositoryRemoval: r,
              askForConfirmationOnForcePush: i,
            };
          if (null === e) return void ae(o);
          const { changesState: s, branchesState: a, aheadBehind: l } = e,
            { defaultBranch: c, currentPullRequest: u } = a,
            h =
              null === c || null === c.upstreamWithoutRemote
                ? void 0
                : c.upstreamWithoutRemote,
            d = bl(a, l),
            p = s.selection.kind === G.Stash,
            f = null !== s.stashEntry;
          ae(
            Object.assign(Object.assign({}, o), {
              defaultBranchName: h,
              isForcePushForCurrentRepository: d,
              isStashedChangesVisible: p,
              hasCurrentPullRequest: null !== u,
              askForConfirmationWhenStashingAllChanges: f,
            })
          );
        }
        updateRepositorySelectionAfterRepositoriesChanged() {
          const e = this.selectedRepository;
          let t = this.selectedRepository;
          if (e) {
            t =
              this.repositories.find(
                (t) => t.constructor === e.constructor && t.id === e.id
              ) || null;
          }
          if (null === t && this.repositories.length > 0) {
            const e = Se("last-selected-repository-id", 0);
            e > 0 && (t = this.repositories.find((t) => t.id === e) || null),
              t || (t = this.repositories[0]);
          }
          ((e && t && e.hash !== t.hash) || (e && !t) || (!e && t)) &&
            (this._selectRepository(t), this.emitUpdate());
        }
        async _loadStatus(e, t = !1) {
          const n = this.gitStoreCache.get(e),
            r = await n.loadStatus();
          return null === r
            ? null
            : (this.repositoryStateCache.updateChangesState(e, (e) =>
                (function (e, t, n) {
                  const r = new Map();
                  e.workingDirectory.files.forEach((e) => r.set(e.id, e));
                  const i = t.workingDirectory.files
                      .map((e) => {
                        const t = r.get(e.id);
                        return t
                          ? n && t.selection.getSelectionType() === Vi.Partial
                            ? e.withIncludeAll(!1)
                            : e.withSelection(t.selection)
                          : e;
                      })
                      .sort((e, t) => xt(e.path, t.path)),
                    o = new Set(i.map((e) => e.id)),
                    s = Co.fromFiles(i),
                    a = e.selection.kind;
                  if (e.selection.kind === G.WorkingDirectory) {
                    let t = e.selection.selectedFileIDs.filter((e) => o.has(e));
                    0 === t.length && i.length > 0 && (t = [i[0].id]);
                    const n =
                      1 === t.length &&
                      1 === e.selection.selectedFileIDs.length &&
                      e.selection.selectedFileIDs[0] === t[0]
                        ? e.selection.diff
                        : null;
                    return {
                      workingDirectory: s,
                      selection: {
                        kind: G.WorkingDirectory,
                        selectedFileIDs: t,
                        diff: n,
                      },
                    };
                  }
                  return e.selection.kind === G.Stash
                    ? { workingDirectory: s, selection: e.selection }
                    : X(e.selection, "Unknown selection kind " + a);
                })(e, r, t)
              ),
              this.repositoryStateCache.updateChangesState(e, (e) => ({
                conflictState: nu(e, r, this.statsStore),
              })),
              this.updateRebaseFlowConflictsIfFound(e),
              this.selectedRepository === e && this._triggerConflictsFlow(e),
              this.emitUpdate(),
              this.updateChangesWorkingDirectoryDiff(e),
              r);
        }
        updateRebaseFlowConflictsIfFound(e) {
          const {
              changesState: t,
              rebaseState: n,
            } = this.repositoryStateCache.get(e),
            { conflictState: r } = t;
          if (null === r || Y(r)) return;
          const { step: i } = n;
          if (
            null !== i &&
            ("ShowConflicts" === i.kind || "ConfirmAbort" === i.kind)
          ) {
            const { baseBranch: t, targetBranch: n } = i.conflictState,
              o = Object.assign(Object.assign({}, r), {
                baseBranch: t,
                targetBranch: n,
              });
            this.repositoryStateCache.updateRebaseState(e, () => ({
              step: Object.assign(Object.assign({}, i), { conflictState: o }),
            }));
          }
        }
        async _triggerConflictsFlow(e) {
          const t = this.repositoryStateCache.get(e),
            { conflictState: n } = t.changesState;
          null !== n
            ? "merge" === n.kind
              ? await this.showMergeConflictsDialog(e, n)
              : "rebase" === n.kind
              ? await this.showRebaseConflictsDialog(e, n)
              : X(0, "Unsupported conflict kind")
            : this.clearConflictsFlowVisuals(t);
        }
        clearConflictsFlowVisuals(e) {
          (function (e, t) {
            if (null === e) return !1;
            if (e.type !== ao.RebaseFlow) return !1;
            if (null === t.step) return !1;
            if (
              "ChooseBranch" === t.step.kind ||
              "WarnForcePush" === t.step.kind ||
              "ShowProgress" === t.step.kind
            )
              return !0;
            return !1;
          })(this.currentPopup, e.rebaseState) ||
            (this._closePopup(ao.MergeConflicts),
            this._closePopup(ao.AbortMerge),
            this._clearBanner(su.MergeConflictsFound),
            this._closePopup(ao.RebaseFlow),
            this._clearBanner(su.RebaseConflictsFound));
        }
        async showRebaseConflictsDialog(e, t) {
          if (
            null !== this.currentPopup &&
            this.currentPopup.type === ao.RebaseFlow
          )
            return;
          if (
            null !== this.currentBanner &&
            this.currentBanner.type === su.RebaseConflictsFound
          )
            return;
          await this._setRebaseProgressFromState(e);
          const n = vl(t);
          this.repositoryStateCache.updateRebaseState(e, () => ({ step: n })),
            this._showPopup({ type: ao.RebaseFlow, repository: e });
        }
        async showMergeConflictsDialog(e, t) {
          const n =
              null !== this.currentPopup &&
              (this.currentPopup.type === ao.MergeConflicts ||
                this.currentPopup.type === ao.AbortMerge),
            r =
              null !== this.currentBanner &&
              this.currentBanner.type === su.MergeConflictsFound;
          if (n || r) return;
          const i = await (async function (e, t) {
            const n = [
                "branch",
                "--points-at=" + t,
                "--format=%(refname:short)",
              ],
              { stdout: r, exitCode: i } = await $o(
                n,
                e.path,
                "branchPointedAt",
                { successExitCodes: new Set([0, 1, 129]) }
              );
            return 1 === i || 129 === i ? null : r.split("\n").slice(0, -1);
          })(e, "MERGE_HEAD");
          if (null === i) return;
          const o = 1 === i.length ? i[0] : void 0,
            s = t.currentBranch;
          this._showPopup({
            type: ao.MergeConflicts,
            repository: e,
            ourBranch: s,
            theirBranch: o,
          });
        }
        async _changeRepositorySection(e, t) {
          return (
            this.repositoryStateCache.update(
              e,
              (e) => (
                e.selectedSection !== t &&
                  this.statsStore.recordRepositoryViewChanged(),
                { selectedSection: t }
              )
            ),
            this.emitUpdate(),
            t === V.History
              ? this.refreshHistorySection(e)
              : t === V.Changes
              ? this.refreshChangesSection(e, {
                  includingStatus: !0,
                  clearPartialState: !1,
                })
              : void 0
          );
        }
        async _selectWorkingDirectoryFiles(e, t) {
          this.repositoryStateCache.updateChangesState(e, (e) =>
            (function (e, t) {
              let n;
              if (void 0 === t) {
                if (e.selection.kind === G.WorkingDirectory)
                  return { selection: e.selection };
                n =
                  e.workingDirectory.files.length > 0
                    ? [e.workingDirectory.files[0].id]
                    : new Array();
              } else n = t.map((e) => e.id);
              return {
                selection: {
                  kind: G.WorkingDirectory,
                  selectedFileIDs: n,
                  diff: null,
                },
              };
            })(e, t)
          ),
            this.updateMenuLabelsForSelectedRepository(),
            this.emitUpdate(),
            this.updateChangesWorkingDirectoryDiff(e);
        }
        async updateChangesWorkingDirectoryDiff(e) {
          const t = this.repositoryStateCache.get(e).changesState;
          if (t.selection.kind !== G.WorkingDirectory) return;
          const n = t.selection,
            r = n.selectedFileIDs;
          if (1 !== r.length)
            return void (
              null !== n.diff &&
              (this.repositoryStateCache.updateChangesState(e, () => ({
                selection: Object.assign(Object.assign({}, n), { diff: null }),
              })),
              this.emitUpdate())
            );
          const i = r[0],
            o = t.workingDirectory.findFileWithID(i);
          if (null === o) return;
          const s = await ks(e, o),
            a = this.repositoryStateCache.get(e).changesState;
          if (
            a.selection.kind !== G.WorkingDirectory ||
            !pu(a.selection.selectedFileIDs, r)
          )
            return;
          const l = a.selection.selectedFileIDs[0];
          if (l !== i) return;
          const c = a.workingDirectory.findFileWithID(l);
          if (null === c) return;
          const u = new Set();
          (s.kind !== Wi.Text && s.kind !== Wi.LargeText) ||
            s.hunks.forEach((e) => {
              e.lines.forEach((t, n) => {
                t.isIncludeableLine() && u.add(e.unifiedDiffStart + n);
              });
            });
          const h = c.selection.withSelectableLines(u),
            d = c.withSelection(h),
            p = a.workingDirectory.files.map((e) => (e.id === d.id ? d : e)),
            f = Co.fromFiles(p),
            m = Object.assign(Object.assign({}, a.selection), { diff: s });
          this.repositoryStateCache.updateChangesState(e, () => ({
            selection: m,
            workingDirectory: f,
          })),
            this.emitUpdate();
        }
        _hideStashedChanges(e) {
          const { changesState: t } = this.repositoryStateCache.get(e);
          t.selection.kind === G.Stash &&
            (this.repositoryStateCache.updateChangesState(e, (e) => {
              const t = e.workingDirectory.files
                .filter((e) => e.selection.getSelectionType() !== Vi.None)
                .map((e) => e.id);
              return {
                selection: {
                  kind: G.WorkingDirectory,
                  diff: null,
                  selectedFileIDs: t,
                },
              };
            }),
            this.emitUpdate(),
            this.updateMenuLabelsForSelectedRepository());
        }
        async _selectStashedFile(e, t) {
          this.repositoryStateCache.update(e, () => ({
            selectedSection: V.Changes,
          })),
            this.repositoryStateCache.updateChangesState(e, (e) => {
              let n = null;
              const { stashEntry: r, selection: i } = e,
                o = i.kind === G.Stash ? i.selectedStashedFile : null,
                s =
                  null !== r && r.files.kind === Hc.Loaded ? r.files.files : [];
              return (
                void 0 === t
                  ? (n =
                      null !== o
                        ? s.find((e) => e.id === o.id) || s[0] || null
                        : s[0] || null)
                  : null !== t && (n = s.find((e) => e.id === t.id) || null),
                {
                  selection: {
                    kind: G.Stash,
                    selectedStashedFile: n,
                    selectedStashedFileDiff: null,
                  },
                }
              );
            }),
            this.updateMenuLabelsForSelectedRepository(),
            this.emitUpdate(),
            this.updateChangesStashDiff(e),
            this.hasUserViewedStash ||
              (this.statsStore.recordStashViewedAfterCheckout(),
              (this.hasUserViewedStash = !0));
        }
        async updateChangesStashDiff(e) {
          const t = this.repositoryStateCache.get(e).changesState,
            n = t.selection;
          if (n.kind !== G.Stash) return;
          const r = t.stashEntry;
          if (null === r) return;
          let i = n.selectedStashedFile;
          if (
            (null === i &&
              r.files.kind === Hc.Loaded &&
              r.files.files.length > 0 &&
              (i = r.files.files[0]),
            null === i)
          )
            return (
              this.repositoryStateCache.updateChangesState(e, () => ({
                selection: {
                  kind: G.Stash,
                  selectedStashedFile: null,
                  selectedStashedFileDiff: null,
                },
              })),
              void this.emitUpdate()
            );
          const o = await Es(e, i, i.commitish),
            s = this.repositoryStateCache.get(e).changesState;
          s.selection.kind === G.Stash &&
            s.selection.selectedStashedFile === n.selectedStashedFile &&
            (this.repositoryStateCache.updateChangesState(e, () => ({
              selection: {
                kind: G.Stash,
                selectedStashedFile: i,
                selectedStashedFileDiff: o,
              },
            })),
            this.emitUpdate());
        }
        async _commitIncludedChanges(e, t) {
          const n = this.repositoryStateCache.get(e),
            r = n.changesState.workingDirectory.files,
            i = r.filter((e) => e.selection.getSelectionType() !== Vi.None),
            o = this.gitStoreCache.get(e),
            s = await this.isCommitting(e, () =>
              o.performFailableOperation(async () => {
                const n = await is(e, t);
                return Da(e, n, i);
              })
            );
          if (s) {
            this.statsStore.recordCommit();
            r.some((e) => e.selection.getSelectionType() === Vi.Partial) &&
              this.statsStore.recordPartialCommit();
            const { trailers: i } = t;
            void 0 !== i &&
              i.some(Jo) &&
              this.statsStore.recordCoAuthoredCommit();
            const s = us(this.accounts, e);
            if (null !== e.gitHubRepository) {
              if (null !== s) {
                s.endpoint === gt()
                  ? this.statsStore.recordCommitToDotcom()
                  : this.statsStore.recordCommitToEnterprise();
                const { commitAuthor: e } = n;
                if (null !== e) {
                  const t = e.email.toLowerCase();
                  (function (e) {
                    const { id: t, login: n, endpoint: r } = e;
                    return [
                      ...new Set([
                        ...e.emails.map((e) => e.email),
                        Pu(n, r),
                        Iu(t, n, r),
                      ]),
                    ];
                  })(s).some((e) => e.toLowerCase() === t) ||
                    this.statsStore.recordUnattributedCommit();
                }
              }
              (await this.repositoriesStore.hasBranchProtectionsConfigured(
                e.gitHubRepository
              )) &&
                this.statsStore.recordCommitToRepositoryWithBranchProtections();
              if (null !== mu(o.tip, o.currentRemote, e.gitHubRepository)) {
                const { changesState: t } = this.repositoryStateCache.get(e);
                t.currentBranchProtected &&
                  this.statsStore.recordCommitToProtectedBranch();
              }
              null === e.gitHubRepository ||
                to(e.gitHubRepository) ||
                (this.statsStore.recordCommitToRepositoryWithoutWriteAccess(),
                this.statsStore.recordRepositoryCommitedInWithoutWriteAccess(
                  e.gitHubRepository.dbID
                ));
            }
            await this._refreshRepository(e),
              await this.refreshChangesSection(e, {
                includingStatus: !0,
                clearPartialState: !0,
              });
          }
          return s || !1;
        }
        _changeFileIncluded(e, t, n) {
          const r = n
            ? t.selection.withSelectAll()
            : t.selection.withSelectNone();
          return (
            this.updateWorkingDirectoryFileSelection(e, t, r), Promise.resolve()
          );
        }
        _changeFileLineSelection(e, t, n) {
          return (
            this.updateWorkingDirectoryFileSelection(e, t, n), Promise.resolve()
          );
        }
        updateWorkingDirectoryFileSelection(e, t, n) {
          this.repositoryStateCache.updateChangesState(e, (e) => {
            const r = e.workingDirectory.files.map((e) =>
              e.id === t.id ? e.withSelection(n) : e
            );
            return { workingDirectory: Co.fromFiles(r) };
          }),
            this.emitUpdate();
        }
        _changeIncludeAllFiles(e, t) {
          return (
            this.repositoryStateCache.updateChangesState(e, (e) => ({
              workingDirectory: e.workingDirectory.withIncludeAllFiles(t),
            })),
            this.emitUpdate(),
            Promise.resolve()
          );
        }
        async _refreshOrRecoverRepository(e) {
          if (!e.missing) return this._refreshRepository(e);
          {
            const t = await this.recoverMissingRepository(e);
            if (!t.missing) return this._refreshRepository(t);
          }
        }
        async recoverMissingRepository(e) {
          if (!e.missing) return e;
          return (await Object(_i.pathExists)(e.path)) &&
            (await Ya(e.path)) &&
            null !== (await this._loadStatus(e))
            ? await this._updateRepositoryMissing(e, !1)
            : e;
        }
        async _refreshRepository(e) {
          if (e.missing) return;
          if (!(await Object(_i.pathExists)(e.path)))
            return void this._updateRepositoryMissing(e, !0);
          const t = this.repositoryStateCache.get(e),
            n = this.gitStoreCache.get(e),
            r = await this._loadStatus(e);
          if ((this.updateSidebarIndicator(e, r), null === r))
            return void (await this._updateRepositoryMissing(e, !0));
          await n.loadBranches();
          const i = t.selectedSection;
          let o;
          if (i === V.History) o = this.refreshHistorySection(e);
          else {
            if (i !== V.Changes) return X(0, "Unknown section: " + i);
            o = this.refreshChangesSection(e, {
              includingStatus: !1,
              clearPartialState: !1,
            });
          }
          await Promise.all([
            n.loadRemotes(),
            n.updateLastFetched(),
            n.loadStashEntries(),
            this.refreshAuthor(e),
            o,
          ]),
            await n.refreshTags(),
            this.updateStashEntryCountMetric(
              e,
              n.desktopStashEntryCount,
              n.stashEntryCount
            ),
            this.updateCurrentPullRequest(e);
          const s = this.repositoryStateCache.get(e);
          this.updateMenuItemLabels(s),
            this._initializeCompare(e),
            this.updateCurrentTutorialStep(e);
        }
        async updateStashEntryCountMetric(e, t, n) {
          const r = await this.repositoriesStore.getLastStashCheckDate(e),
            i = k()().subtract(24, "hours");
          if (null == r || i.isAfter(r)) {
            await this.repositoriesStore.updateLastStashCheckDate(e);
            const r = n - t;
            this.statsStore.addStashEntriesCreatedOutsideDesktop(r);
          }
        }
        async updateSidebarIndicator(e, t) {
          const n = this.localRepositoryStateLookup;
          e.missing
            ? n.delete(e.id)
            : null !== t
            ? n.set(e.id, {
                aheadBehind: t.branchAheadBehind || null,
                changedFilesCount: t.workingDirectory.files.length,
              })
            : n.delete(e.id);
        }
        fetchForRepositoryIndicator(e) {
          return this.withAuthenticatingUser(e, async (e, t) => {
            const n = this.gitStoreCache.get(e);
            return (
              await this.withPushPullFetch(e, () =>
                n.fetch(t, !0, (t) => this.updatePushPullFetchProgress(e, t))
              ),
              this.updatePushPullFetchProgress(e, null),
              n.aheadBehind
            );
          });
        }
        _setRepositoryIndicatorsEnabled(e) {
          this.repositoryIndicatorsEnabled !== e &&
            (be("enable-repository-indicators", e),
            (this.repositoryIndicatorsEnabled = e),
            e
              ? this.repositoryIndicatorUpdater.start()
              : this.repositoryIndicatorUpdater.stop(),
            this.emitUpdate());
        }
        async refreshChangesSection(e, t) {
          t.includingStatus && (await this._loadStatus(e, t.clearPartialState));
          const n = this.gitStoreCache.get(e),
            r = this.repositoryStateCache.get(e);
          if (r.branchesState.tip.kind === so.Valid) {
            const e = r.branchesState.tip.branch;
            await n.loadLocalCommits(e);
          } else
            r.branchesState.tip.kind === so.Unborn &&
              (await n.loadLocalCommits(null));
        }
        async refreshHistorySection(e) {
          const t = this.gitStoreCache.get(e),
            n = this.repositoryStateCache.get(e),
            r = n.branchesState.tip;
          return (
            r.kind === so.Valid && (await t.loadLocalCommits(r.branch)),
            this.updateOrSelectFirstCommit(e, n.compareState.commitSHAs)
          );
        }
        async refreshAuthor(e) {
          const t = this.gitStoreCache.get(e),
            n = (await t.performFailableOperation(() => Il(e))) || null;
          this.repositoryStateCache.update(e, () => ({ commitAuthor: n })),
            this.emitUpdate();
        }
        async _showPopup(e) {
          this._closePopup(),
            this._closeFoldout(j.AppMenu),
            (this.currentPopup = e),
            this.emitUpdate();
        }
        _closePopup(e) {
          const t = this.currentPopup;
          null != t &&
            ((void 0 !== e && t.type !== e) ||
              (t.type === ao.CloneRepository &&
                this._completeOpenInDesktop(() => Promise.resolve(null)),
              (this.currentPopup = null),
              this.emitUpdate()));
        }
        async _showFoldout(e) {
          (this.currentFoldout = e),
            this.emitUpdate(),
            e.type === j.Repository &&
              this.repositoryIndicatorsEnabled &&
              this.repositoryIndicatorUpdater.start();
        }
        async _closeCurrentFoldout() {
          null != this.currentFoldout &&
            ((this.currentFoldout = null), this.emitUpdate());
        }
        async _closeFoldout(e) {
          null != this.currentFoldout &&
            ((void 0 !== e && this.currentFoldout.type !== e) ||
              ((this.currentFoldout = null), this.emitUpdate()));
        }
        async _createBranch(e, t, n, r = !1) {
          const i = this.gitStoreCache.get(e),
            o = await i.createBranch(t, n, r);
          void 0 !== o && (await this._checkoutBranch(e, o));
        }
        async _createTag(e, t, n) {
          const r = this.gitStoreCache.get(e);
          await r.createTag(t, n);
        }
        async _deleteTag(e, t) {
          const n = this.gitStoreCache.get(e);
          await n.deleteTag(t);
        }
        updateCheckoutProgress(e, t) {
          this.repositoryStateCache.update(e, () => ({ checkoutProgress: t })),
            this.selectedRepository instanceof lo &&
              this.selectedRepository.id === e.id &&
              this.emitUpdate();
        }
        async _checkoutBranch(e, t, n) {
          const r = this.repositoryStateCache.get(e),
            { changesState: i, branchesState: o } = r,
            { currentBranchProtected: s, stashEntry: a } = i,
            { tip: l } = o,
            c = i.workingDirectory.files.length > 0;
          let u = null != n ? n : this.uncommittedChangesStrategy;
          if (
            void 0 === n &&
            u === au.StashOnCurrentBranch &&
            c &&
            null !== a
          ) {
            const n = ao.ConfirmOverwriteStash;
            return (
              this._showPopup({ type: n, repository: e, branchToCheckout: t }),
              e
            );
          }
          if (
            ((l.kind !== so.Valid || s) && (u = au.MoveToNewBranch),
            u === au.AskForConfirmation && c)
          ) {
            const n = ao.StashAndSwitchBranch;
            return (
              this._showPopup({ type: n, branchToCheckout: t, repository: e }),
              e
            );
          }
          return this.withAuthenticatingUser(e, (e, n) =>
            this.checkoutImplementation(e, t, n, u)
              .then(() => this.onSuccessfulCheckout(e, t))
              .catch((n) => this.emitError(new ue(n, e, t)))
              .then(() => this.refreshAfterCheckout(e, t))
              .finally(() => this.updateCheckoutProgress(e, null))
          );
        }
        checkoutImplementation(e, t, n, r) {
          return r === au.StashOnCurrentBranch
            ? this.checkoutAndLeaveChanges(e, t, n)
            : r === au.MoveToNewBranch
            ? this.checkoutAndBringChanges(e, t, n)
            : this.checkoutIgnoringChanges(e, t, n);
        }
        async checkoutIgnoringChanges(e, t, n) {
          await Ca(e, n, t, (t) => {
            this.updateCheckoutProgress(e, t);
          });
        }
        async checkoutAndLeaveChanges(e, t, n) {
          const r = this.repositoryStateCache.get(e),
            { workingDirectory: i } = r.changesState,
            { tip: o } = r.branchesState;
          return (
            o.kind === so.Valid &&
              i.files.length > 0 &&
              (await this.createStashAndDropPreviousEntry(e, o.branch),
              this.statsStore.recordStashCreatedOnCurrentBranch()),
            this.checkoutIgnoringChanges(e, t, n)
          );
        }
        async checkoutAndBringChanges(e, t, n) {
          try {
            await this.checkoutIgnoringChanges(e, t, n);
          } catch (r) {
            if (
              !(function e(t) {
                if (t instanceof ce) return e(t.underlyingError);
                return (
                  t instanceof Go &&
                  t.result.gitError === Bo.GitError.LocalChangesOverwritten
                );
              })(r)
            )
              throw r;
            const i = (await this.createStashEntry(e, t))
              ? await Wc(e, t)
              : null;
            if (null === i) throw r;
            await this.checkoutIgnoringChanges(e, t, n),
              await Gc(e, i.stashSha),
              this.statsStore.recordChangesTakenToNewBranch();
          }
        }
        async onSuccessfulCheckout(e, t) {
          const n = this.repositoryStateCache.get(e),
            { stashEntry: r } = n.changesState,
            { defaultBranch: i } = n.branchesState;
          this.clearBranchProtectionState(e),
            await this._selectWorkingDirectoryFiles(e),
            this._initializeCompare(e, { kind: $.History }),
            null !== i &&
              t.name !== i.name &&
              this.statsStore.recordNonDefaultBranchCheckout(),
            null === r ||
              this.hasUserViewedStash ||
              this.statsStore.recordStashNotViewedAfterCheckout(),
            (this.hasUserViewedStash = !1);
        }
        async refreshAfterCheckout(e, t) {
          return (
            this.updateCheckoutProgress(e, {
              kind: "checkout",
              title: "刷新存储库",
              value: 1,
              targetBranch: t.name,
            }),
            await this._refreshRepository(e),
            e
          );
        }
        async _createStashForCurrentBranch(e, t) {
          const n = this.repositoryStateCache.get(e),
            r = n.branchesState.tip,
            i = r.kind === so.Valid ? r.branch : null,
            o = null !== n.changesState.stashEntry;
          return (
            null !== i &&
            (t && o
              ? (this._showPopup({
                  type: ao.ConfirmOverwriteStash,
                  branchToCheckout: null,
                  repository: e,
                }),
                !1)
              : !!(await this.createStashAndDropPreviousEntry(e, i)) &&
                (this.statsStore.recordStashCreatedOnCurrentBranch(),
                await this._refreshRepository(e),
                !0))
          );
        }
        async repositoryWithRefreshedGitHubRepository(e) {
          var t;
          const n = this.repositoriesStore,
            r = await this.matchGitHubRepository(e);
          if (!r) return e;
          const { account: i, owner: o, name: s } = r,
            { endpoint: a } = i,
            l = ht.fromAccount(i),
            c = await l.fetchRepository(o, s);
          if (null === c) {
            if (
              a !==
              (null === (t = e.gitHubRepository) || void 0 === t
                ? void 0
                : t.endpoint)
            ) {
              const t = await n.upsertGitHubRepositoryFromMatch(r);
              return n.setGitHubRepository(e, t);
            }
            return e;
          }
          if (e.gitHubRepository) {
            const t = this.gitStoreCache.get(e);
            await (async function (e, t, n) {
              if (null === e.defaultRemote) return;
              const r = e.defaultRemote.url,
                i = n.clone_url,
                o = At(i, e.defaultRemote),
                s = _e.parse(r),
                a = _e.parse(i),
                l =
                  null !== s.protocol &&
                  null !== a.protocol &&
                  s.protocol === a.protocol,
                c = e.defaultRemote && At(t.cloneURL, e.defaultRemote);
              l && c && !o && (await e.setRemoteURL(e.defaultRemote.name, i));
            })(t, e.gitHubRepository, c);
          }
          const u = await n.upsertGitHubRepository(a, c),
            h = await n.setGitHubRepository(e, u);
          return await this.refreshBranchProtectionState(h), h;
        }
        async updateBranchProtectionsFromAPI(e) {
          if (null === e.gitHubRepository) return;
          const { owner: t, name: n } = e.gitHubRepository,
            r = yt(this.accounts, e.gitHubRepository.endpoint);
          if (null === r) return;
          const i = ht.fromAccount(r),
            o = await i.fetchProtectedBranches(t.login, n);
          await this.repositoriesStore.updateBranchProtections(
            e.gitHubRepository,
            o
          );
        }
        async matchGitHubRepository(e) {
          const t = this.gitStoreCache.get(e);
          t.defaultRemote || (await t.loadRemotes());
          const n = t.defaultRemote;
          return null !== n ? Rt(this.accounts, n.url) : null;
        }
        _pushError(e) {
          const t = Array.from(this.errors);
          return (
            t.push(e), (this.errors = t), this.emitUpdate(), Promise.resolve()
          );
        }
        _clearError(e) {
          return (
            (this.errors = this.errors.filter((t) => t !== e)),
            this.emitUpdate(),
            Promise.resolve()
          );
        }
        async _renameBranch(e, t, n) {
          const r = this.gitStoreCache.get(e);
          return (
            await r.performFailableOperation(() =>
              (async function (e, t, n) {
                await $o(
                  ["branch", "-m", t.nameWithoutRemote, n],
                  e.path,
                  "renameBranch"
                );
              })(e, t, n)
            ),
            this._refreshRepository(e)
          );
        }
        async _deleteBranch(e, t, n) {
          return this.withAuthenticatingUser(e, async (e, r) => {
            const { branchesState: i } = this.repositoryStateCache.get(e);
            let o = i.defaultBranch;
            if (null === o) {
              let e = 0;
              for (; e < i.recentBranches.length; ) {
                if (i.recentBranches[e].name !== t.name) {
                  o = i.recentBranches[e];
                  break;
                }
                e++;
              }
            }
            if (null === o)
              throw new Error(
                "It's not possible to delete the only existing branch in a repository."
              );
            const s = o,
              a = this.gitStoreCache.get(e);
            return (
              await a.performFailableOperation(() => Ca(e, r, s)),
              await a.performFailableOperation(() => ta(e, t, r, n)),
              this._refreshRepository(e)
            );
          });
        }
        updatePushPullFetchProgress(e, t) {
          this.repositoryStateCache.update(e, () => ({
            pushPullFetchProgress: t,
          })),
            qs() &&
              (null !== t
                ? r.remote.getCurrentWindow().setProgressBar(t.value)
                : r.remote.getCurrentWindow().setProgressBar(-1)),
            this.selectedRepository === e && this.emitUpdate();
        }
        async _push(e, t) {
          return this.withAuthenticatingUser(e, (e, n) =>
            this.performPush(e, n, t)
          );
        }
        async performPush(e, t, n) {
          const r = this.repositoryStateCache.get(e),
            { remote: i } = r;
          if (null !== i)
            return this.withPushPullFetch(e, async () => {
              const { tip: o } = r.branchesState;
              if (o.kind === so.Unborn)
                throw new Error("The current branch is unborn.");
              if (o.kind === so.Detached)
                throw new Error(
                  "The current repository is in a detached HEAD state."
                );
              if (o.kind === so.Valid) {
                const { branch: r } = o,
                  s = r.remote || i.name,
                  a = "正在推送到 " + s;
                this.updatePushPullFetchProgress(e, {
                  kind: "push",
                  title: a,
                  value: 0,
                  remote: s,
                  branch: r.name,
                });
                let l = 2.5,
                  c = 1;
                const u = 0.1,
                  h = (1 / (l + c)) * (1 - u);
                (l *= h), (c *= h);
                const d = { type: re.Push, repository: e },
                  p = { name: s, url: i.url };
                p.name !== i.name &&
                  xu(
                    "remoteNameMismatch",
                    new Error(
                      "The current remote name differs from the branch remote"
                    )
                  );
                const f = this.gitStoreCache.get(e);
                await f.performFailableOperation(
                  async () => {
                    await (async function (
                      e,
                      t,
                      n,
                      r,
                      i,
                      o,
                      s = { forceWithLease: !1 },
                      a
                    ) {
                      const l = [
                        ...(await Zo(e, t)),
                        "push",
                        n.name,
                        i ? `${r}:${i}` : r,
                      ];
                      null !== o && l.push(...o),
                        i
                          ? !0 === s.forceWithLease &&
                            l.push("--force-with-lease")
                          : l.push("--set-upstream");
                      const c = new Set(Gs);
                      c.add(Bo.GitError.ProtectedBranchForcePush);
                      let u = { env: await Js(t, n.url), expectedErrors: c };
                      if (a) {
                        l.push("--progress");
                        const e = "Pushing to " + n.name,
                          t = "push";
                        (u = await ba(
                          Object.assign(Object.assign({}, u), {
                            trackLFSProgress: !0,
                          }),
                          new ua(),
                          (i) => {
                            const o =
                                "progress" === i.kind ? i.details.text : i.text,
                              s = i.percent;
                            a({
                              kind: t,
                              title: e,
                              description: o,
                              value: s,
                              remote: n.name,
                              branch: r,
                            });
                          }
                        )),
                          a({
                            kind: "push",
                            title: e,
                            value: 0,
                            remote: n.name,
                            branch: r,
                          });
                      }
                      const h = await $o(l, e.path, "push", u);
                      if (h.gitErrorDescription) throw new Go(h, l);
                    })(
                      e,
                      t,
                      p,
                      r.name,
                      r.upstreamWithoutRemote,
                      f.tagsToPush,
                      n,
                      (t) => {
                        this.updatePushPullFetchProgress(
                          e,
                          Object.assign(Object.assign({}, t), {
                            title: a,
                            value: l * t.value,
                          })
                        );
                      }
                    ),
                      f.clearTagsToPush(),
                      await f.fetchRemotes(t, [p], !1, (t) => {
                        this.updatePushPullFetchProgress(
                          e,
                          Object.assign(Object.assign({}, t), {
                            value: l + t.value * c,
                          })
                        );
                      });
                    const i = l + c;
                    this.updatePushPullFetchProgress(e, {
                      kind: "generic",
                      title: "刷新存储库",
                      value: i,
                    }),
                      await this.refreshBranchProtectionState(e),
                      await this._refreshRepository(e),
                      this.updatePushPullFetchProgress(e, {
                        kind: "generic",
                        title: "刷新存储库",
                        description: "Fast-forwarding branches",
                        value: i + 0.5 * u,
                      }),
                      await this.fastForwardBranches(e);
                  },
                  { retryAction: d }
                ),
                  this.updatePushPullFetchProgress(e, null),
                  this.updateMenuLabelsForSelectedRepository(),
                  this.statsStore.recordPush(us(this.accounts, e), n);
              }
            });
          this._showPopup({ type: ao.PublishRepository, repository: e });
        }
        async isCommitting(e, t) {
          if (!this.repositoryStateCache.get(e).isCommitting) {
            this.repositoryStateCache.update(e, () => ({ isCommitting: !0 })),
              this.emitUpdate();
            try {
              return void 0 !== (await t());
            } finally {
              this.repositoryStateCache.update(e, () => ({ isCommitting: !1 })),
                this.emitUpdate();
            }
          }
        }
        async withPushPullFetch(e, t) {
          if (!this.repositoryStateCache.get(e).isPushPullFetchInProgress) {
            this.repositoryStateCache.update(e, () => ({
              isPushPullFetchInProgress: !0,
            })),
              this.emitUpdate();
            try {
              await t();
            } finally {
              this.repositoryStateCache.update(e, () => ({
                isPushPullFetchInProgress: !1,
              })),
                this.emitUpdate();
            }
          }
        }
        async _pull(e) {
          return this.withAuthenticatingUser(e, (e, t) =>
            this.performPull(e, t)
          );
        }
        async performPull(e, t) {
          return this.withPushPullFetch(e, async () => {
            const n = this.gitStoreCache.get(e),
              r = n.currentRemote;
            if (!r) throw new Error("The repository has no remotes.");
            const i = this.repositoryStateCache.get(e).branchesState.tip;
            if (i.kind === so.Unborn)
              throw new Error("The current branch is unborn.");
            if (i.kind === so.Detached)
              throw new Error(
                "The current repository is in a detached HEAD state."
              );
            if (i.kind === so.Valid) {
              let o = null,
                s = void 0;
              null !== i.branch.upstream &&
                ((o = await ml(e, i.branch.name, i.branch.upstream)),
                (s = {
                  kind: "pull",
                  theirBranch: i.branch.upstream,
                  currentBranch: i.branch.name,
                }));
              const a = "Pulling " + r.name,
                l = "pull";
              this.updatePushPullFetchProgress(e, {
                kind: l,
                title: a,
                value: 0,
                remote: r.name,
              });
              try {
                let i = 2,
                  a = 1;
                const l = 0.1,
                  c = (1 / (i + a)) * (1 - l);
                (i *= c), (a *= c);
                const u = { type: re.Pull, repository: e };
                n.pullWithRebase
                  ? this.statsStore.recordPullWithRebaseEnabled()
                  : this.statsStore.recordPullWithDefaultSetting(),
                  await n.performFailableOperation(
                    () =>
                      za(e, t, r, (t) => {
                        this.updatePushPullFetchProgress(
                          e,
                          Object.assign(Object.assign({}, t), {
                            value: t.value * i,
                          })
                        );
                      }),
                    { gitContext: s, retryAction: u }
                  );
                const h = i + a,
                  d = "刷新存储库";
                this.updatePushPullFetchProgress(e, {
                  kind: "generic",
                  title: d,
                  value: h,
                }),
                  o && (await n.reconcileHistory(o)),
                  await this.refreshBranchProtectionState(e),
                  await this._refreshRepository(e),
                  this.updatePushPullFetchProgress(e, {
                    kind: "generic",
                    title: d,
                    description: "Fast-forwarding branches",
                    value: h + 0.5 * l,
                  }),
                  await this.fastForwardBranches(e);
              } finally {
                this.updatePushPullFetchProgress(e, null);
              }
            }
          });
        }
        async fastForwardBranches(e) {
          const { branchesState: t } = this.repositoryStateCache.get(e),
            n = (function (e) {
              const {
                  allBranches: t,
                  tip: n,
                  defaultBranch: r,
                  recentBranches: i,
                } = e,
                o = n.kind === so.Valid ? n.branch.name : null,
                s = t.filter((e) => Bi(e, o));
              return s.length < 20
                ? s
                : (log.info(
                    `skipping fast-forward for all branches as there are ${s.length} eligible branches (Threshold is 20 eligible branches).`
                  ),
                  (null !== r ? [...i, r] : i).filter((e) => Bi(e, o)));
            })(t);
          for (const t of n) {
            const n = await Ga(e, t);
            if (!n) continue;
            const { ahead: r, behind: i } = n;
            if (0 === r && i > 0) {
              const n = t.upstream,
                r = Ns(t.name);
              await Hs(e, r, t.tip.sha, n, "pull: Fast-forward");
            }
          }
        }
        async _publishRepository(e, t, n, r, i, o) {
          const s = ht.fromAccount(i),
            a = await s.createRepository(o, t, n, r),
            l = this.gitStoreCache.get(e);
          return (
            await l.performFailableOperation(() =>
              Ws(e, "origin", a.clone_url)
            ),
            await l.loadRemotes(),
            l.tip.kind === so.Valid && (await this.performPush(e, i)),
            this.repositoryWithRefreshedGitHubRepository(e)
          );
        }
        getAccountForRemoteURL(e) {
          var t;
          const n =
            null === (t = Rt(this.accounts, e)) || void 0 === t
              ? void 0
              : t.account;
          if (void 0 !== n) {
            const t = n.token.length > 0 ? "has token" : "empty token";
            return (
              log.info(
                `[AppStore.getAccountForRemoteURL] account found for remote: ${e} - ${n.login} (${t})`
              ),
              n
            );
          }
          const r = as(e),
            i = cs(r);
          return null != i
            ? (log.info(
                `[AppStore.getAccountForRemoteURL] found generic credentials for '${r}' and '${i}'`
              ),
              { login: i, endpoint: r })
            : (log.info(
                `[AppStore.getAccountForRemoteURL] no generic credentials found for '${e}'`
              ),
              null);
        }
        _clone(e, t, n) {
          const r = this.getAccountForRemoteURL(e),
            i = this.cloningRepositoriesStore.clone(
              e,
              t,
              Object.assign(Object.assign({}, n), { account: r })
            ),
            o = this.cloningRepositoriesStore.repositories.find(
              (n) => n.url === e && n.path === t
            );
          return (
            i.then((e) => {
              e && this.statsStore.recordCloneRepository();
            }),
            { promise: i, repository: o }
          );
        }
        _removeCloningRepository(e) {
          this.cloningRepositoriesStore.remove(e);
        }
        async _discardChanges(e, t) {
          const n = this.gitStoreCache.get(e);
          return await n.discardChanges(t), this._refreshRepository(e);
        }
        async _discardChangesFromSelection(e, t, n, r) {
          const i = this.gitStoreCache.get(e);
          return (
            await i.discardChangesFromSelection(t, n, r),
            this._refreshRepository(e)
          );
        }
        async _undoCommit(e, t) {
          const n = this.gitStoreCache.get(e);
          await n.undoCommit(t);
          const { commitSelection: r } = this.repositoryStateCache.get(e);
          return (
            r.sha === t.sha && this.clearSelectedCommit(e),
            this._refreshRepository(e)
          );
        }
        async _fetchRefspec(e, t) {
          return this.withAuthenticatingUser(e, async (e, n) => {
            const r = this.gitStoreCache.get(e);
            return await r.fetchRefspec(n, t), this._refreshRepository(e);
          });
        }
        _fetch(e, t) {
          return this.withAuthenticatingUser(e, (e, n) =>
            this.performFetch(e, n, t)
          );
        }
        _fetchRemote(e, t, n) {
          return this.withAuthenticatingUser(e, (e, r) =>
            this.performFetch(e, r, n, [t])
          );
        }
        async performFetch(e, t, n, r) {
          await this.withPushPullFetch(e, async () => {
            const i = this.gitStoreCache.get(e);
            try {
              const o = 0.9,
                s = 0.1,
                a = n === $i.BackgroundTask,
                l = (t) => {
                  this.updatePushPullFetchProgress(
                    e,
                    Object.assign(Object.assign({}, t), { value: t.value * o })
                  );
                };
              void 0 === r
                ? await i.fetch(t, a, l)
                : await i.fetchRemotes(t, r, a, l);
              const c = "刷新存储库";
              this.updatePushPullFetchProgress(e, {
                kind: "generic",
                title: c,
                value: o,
              }),
                await this.refreshBranchProtectionState(e),
                await this._refreshRepository(e),
                this.updatePushPullFetchProgress(e, {
                  kind: "generic",
                  title: c,
                  description: "Fast-forwarding branches",
                  value: o + 0.5 * s,
                }),
                await this.fastForwardBranches(e);
            } finally {
              this.updatePushPullFetchProgress(e, null),
                n === $i.UserInitiatedTask &&
                  null != e.gitHubRepository &&
                  this._refreshIssues(e.gitHubRepository);
            }
          });
        }
        _endWelcomeFlow() {
          return (
            (this.showWelcomeFlow = !1),
            this.emitUpdate(),
            be("has-shown-welcome-flow", !0),
            this.statsStore.recordWelcomeWizardTerminated(),
            Promise.resolve()
          );
        }
        _setCommitMessageFocus(e) {
          this.focusCommitMessage !== e &&
            ((this.focusCommitMessage = e), this.emitUpdate());
        }
        _setSidebarWidth(e) {
          return (
            (this.sidebarWidth = e),
            Ce("sidebar-width", e),
            this.emitUpdate(),
            Promise.resolve()
          );
        }
        _resetSidebarWidth() {
          return (
            (this.sidebarWidth = 250),
            localStorage.removeItem("sidebar-width"),
            this.emitUpdate(),
            Promise.resolve()
          );
        }
        _setCommitSummaryWidth(e) {
          return (
            (this.commitSummaryWidth = e),
            Ce("commit-summary-width", e),
            this.emitUpdate(),
            Promise.resolve()
          );
        }
        _resetCommitSummaryWidth() {
          return (
            (this.commitSummaryWidth = 250),
            localStorage.removeItem("commit-summary-width"),
            this.emitUpdate(),
            Promise.resolve()
          );
        }
        _setCommitMessage(e, t) {
          return this.gitStoreCache.get(e).setCommitMessage(t);
        }
        setAppMenu(e) {
          return (
            this.appMenu
              ? (this.appMenu = this.appMenu.withMenu(e))
              : (this.appMenu = Fi.fromMenu(e)),
            this.emitUpdate(),
            Promise.resolve()
          );
        }
        _setAppMenuState(e) {
          return (
            this.appMenu &&
              ((this.appMenu = e(this.appMenu)), this.emitUpdate()),
            Promise.resolve()
          );
        }
        _setAccessKeyHighlightState(e) {
          return (
            this.highlightAccessKeys !== e &&
              ((this.highlightAccessKeys = e), this.emitUpdate()),
            Promise.resolve()
          );
        }
        async _mergeBranch(e, t, n) {
          const r = this.gitStoreCache.get(e);
          null !== n &&
            (n.kind === cl.Clean
              ? this.statsStore.recordMergeHintSuccessAndUserProceeded()
              : n.kind === cl.Conflicts
              ? this.statsStore.recordUserProceededAfterConflictWarning()
              : n.kind === cl.Loading &&
                this.statsStore.recordUserProceededWhileLoading());
          const i = await r.merge(t),
            { tip: o } = r;
          return (
            i === pl.Success && o.kind === so.Valid
              ? this._setBanner({
                  type: su.SuccessfulMerge,
                  ourBranch: o.branch.name,
                  theirBranch: t,
                })
              : i === pl.AlreadyUpToDate &&
                o.kind === so.Valid &&
                this._setBanner({
                  type: su.BranchAlreadyUpToDate,
                  ourBranch: o.branch.name,
                  theirBranch: t,
                }),
            this._refreshRepository(e)
          );
        }
        async _setRebaseProgressFromState(e) {
          const t = await El(e);
          if (null === t) return;
          const { progress: n, commits: r } = t;
          this.repositoryStateCache.updateRebaseState(e, () => ({
            progress: n,
            commits: r,
          }));
        }
        _initializeRebaseProgress(e, t) {
          this.repositoryStateCache.updateRebaseState(e, () => {
            const e = t.length > 0 ? t[0].summary : null;
            return {
              progress: {
                value: wl(0),
                rebasedCommitCount: 0,
                currentCommitSummary: e,
                totalCommitCount: t.length,
              },
              commits: t,
            };
          }),
            this.emitUpdate();
        }
        _setConflictsResolved(e) {
          this.repositoryStateCache.updateRebaseState(e, () => ({
            userHasResolvedConflicts: !0,
          }));
        }
        async _setRebaseFlowStep(e, t) {
          this.repositoryStateCache.updateRebaseState(e, () => ({ step: t })),
            this.emitUpdate(),
            "ShowProgress" === t.kind &&
              null !== t.rebaseAction &&
              (await Ec(500), await t.rebaseAction());
        }
        _endRebaseFlow(e) {
          this.repositoryStateCache.updateRebaseState(e, () => ({
            step: null,
            progress: null,
            commits: null,
            preview: null,
            userHasResolvedConflicts: !1,
          })),
            this.emitUpdate();
        }
        async _rebase(e, t, n) {
          const r = (t) => {
              this.repositoryStateCache.updateRebaseState(e, () => ({
                progress: t,
              })),
                this.emitUpdate();
            },
            i = this.gitStoreCache.get(e);
          return (
            (await i.performFailableOperation(
              () =>
                (async function (e, t, n, r) {
                  const i = {
                    expectedErrors: new Set([Bo.GitError.RebaseConflicts]),
                  };
                  let o = i;
                  if (void 0 !== r) {
                    const s = await $a(e, t.tip.sha, n.tip.sha);
                    if (null === s) return Sl.Error;
                    o = Rl(i, { commits: s, progressCallback: r });
                  }
                  return Tl(
                    await $o(
                      ["-c", "rebase.backend=merge", "rebase", t.name, n.name],
                      e.path,
                      "rebase",
                      o
                    )
                  );
                })(e, t, n, r),
              {
                retryAction: {
                  type: re.Rebase,
                  repository: e,
                  baseBranch: t,
                  targetBranch: n,
                },
              }
            )) || Sl.Error
          );
        }
        async _abortRebase(e) {
          const t = this.gitStoreCache.get(e);
          return await t.performFailableOperation(() =>
            (async function (e) {
              await $o(["rebase", "--abort"], e.path, "abortRebase");
            })(e)
          );
        }
        async _continueRebase(e, t, n) {
          const r = (t) => {
              this.repositoryStateCache.updateRebaseState(e, () => ({
                progress: t,
              })),
                this.emitUpdate();
            },
            i = this.gitStoreCache.get(e);
          return (
            (await i.performFailableOperation(() => Dl(e, t.files, n, r))) ||
            Sl.Error
          );
        }
        async _abortMerge(e) {
          const t = this.gitStoreCache.get(e);
          return await t.performFailableOperation(() =>
            (async function (e) {
              await $o(["merge", "--abort"], e.path, "abortMerge");
            })(e)
          );
        }
        async _finishConflictedMerge(e, t, n) {
          const r = t.files.filter((e) => e.status.kind === io.Conflicted),
            i = this.gitStoreCache.get(e);
          return await i.performFailableOperation(() =>
            (async function (e, t, n = new Map()) {
              try {
                for (const [r, i] of n) {
                  const n = t.find((e) => e.path === r);
                  void 0 !== n
                    ? await Ta(e, n, i)
                    : log.error(
                        `couldn't find file ${r} even though there's a manual resolution for it`
                      );
                }
                const r = t.filter((e) => !n.has(e.path));
                await ka(e, r);
                return Xo(
                  await $o(
                    ["commit", "--no-edit", "--cleanup=strip"],
                    e.path,
                    "createMergeCommit"
                  )
                );
              } catch (e) {
                return void Aa(e);
              }
            })(e, r, n)
          );
        }
        async _setRemoteURL(e, t, n) {
          const r = this.gitStoreCache.get(e);
          await r.setRemoteURL(t, n);
        }
        async _openShell(e) {
          this.statsStore.recordOpenShell();
          try {
            const t = await (async function (e) {
              const t = await mc(),
                n = t.find((t) => t.shell === e);
              return n || t.find((e) => e.shell === dc);
            })(this.selectedShell);
            await gc(t, e, (e) => this._pushError(e));
          } catch (e) {
            this.emitError(e);
          }
        }
        _openInBrowser(e) {
          return te.openExternal(e);
        }
        async _openInExternalEditor(e) {
          const { selectedExternalEditor: t } = this.getState();
          try {
            const n = await Fo(t);
            if (null === n)
              return void this.emitError(
                new Io(
                  "No suitable editors installed for GitHub Desktop to launch. Install Atom for your platform and restart GitHub Desktop to try again.",
                  { suggestAtom: !0 }
                )
              );
            await (async function (e, t) {
              const n = t.path;
              if (!(await Object(_i.pathExists)(n))) {
                const e = "Options";
                throw new Io(
                  `Could not find executable for '${t.editor}' at path '${t.path}'.  Please open ${e} and select an available editor.`,
                  { openPreferences: !0 }
                );
              }
              t.usesShell
                ? Object(No.spawn)(`"${n}"`, [`"${e}"`], { shell: !0 })
                : Object(No.spawn)(n, [e]);
            })(e, n);
          } catch (e) {
            this.emitError(e);
          }
        }
        async _saveGitIgnore(e, t) {
          return await zl(e, t), this._refreshRepository(e);
        }
        async setStatsOptOut(e, t) {
          await this.statsStore.setOptOut(e, t), this.emitUpdate();
        }
        markUsageStatsNoteSeen() {
          be("has-seen-usage-stats-note", !0);
        }
        _setConfirmRepositoryRemovalSetting(e) {
          return (
            (this.askForConfirmationOnRepositoryRemoval = e),
            be("confirmRepoRemoval", e),
            this.updateMenuLabelsForSelectedRepository(),
            this.emitUpdate(),
            Promise.resolve()
          );
        }
        _setConfirmDiscardChangesSetting(e) {
          return (
            (this.confirmDiscardChanges = e),
            be("confirmDiscardChanges", e),
            this.emitUpdate(),
            Promise.resolve()
          );
        }
        _setConfirmForcePushSetting(e) {
          return (
            (this.askForConfirmationOnForcePush = e),
            be("confirmForcePush", e),
            this.updateMenuLabelsForSelectedRepository(),
            this.emitUpdate(),
            Promise.resolve()
          );
        }
        _setUncommittedChangesStrategySetting(e) {
          return (
            (this.uncommittedChangesStrategy = e),
            localStorage.setItem("uncommittedChangesStrategyKind", e),
            this.emitUpdate(),
            Promise.resolve()
          );
        }
        _setExternalEditor(e) {
          const t = this.updateSelectedExternalEditor(e);
          return (
            localStorage.setItem("externalEditor", e),
            this.emitUpdate(),
            this.updateMenuLabelsForSelectedRepository(),
            t
          );
        }
        _setShell(e) {
          return (
            (this.selectedShell = e),
            localStorage.setItem("shell", e),
            this.emitUpdate(),
            this.updateMenuLabelsForSelectedRepository(),
            Promise.resolve()
          );
        }
        _changeImageDiffType(e) {
          return (
            (this.imageDiffType = e),
            localStorage.setItem(
              "image-diff-type",
              JSON.stringify(this.imageDiffType)
            ),
            this.emitUpdate(),
            Promise.resolve()
          );
        }
        _setHideWhitespaceInDiff(e, t, n) {
          return (
            be("hide-whitespace-in-diff", e),
            (this.hideWhitespaceInDiff = e),
            null === n
              ? this.updateChangesWorkingDirectoryDiff(t)
              : this._changeFileSelection(t, n)
          );
        }
        _setShowSideBySideDiff(e) {
          e !== this.showSideBySideDiff &&
            (!(function (e) {
              be("show-side-by-side-diff", e);
            })(e),
            (this.showSideBySideDiff = e),
            this.statsStore.recordDiffModeChanged(),
            this.emitUpdate());
        }
        _setUpdateBannerVisibility(e) {
          (this.isUpdateAvailableBannerVisible = e), this.emitUpdate();
        }
        _setBanner(e) {
          (this.currentBanner = e), this.emitUpdate();
        }
        _clearBanner(e) {
          const { currentBanner: t } = this;
          null !== t &&
            ((void 0 !== e && t.type !== e) ||
              ((this.currentBanner = null), this.emitUpdate()));
        }
        _reportStats() {
          return this.showWelcomeFlow || we("has-seen-usage-stats-note", !1)
            ? this.statsStore.reportStats(this.accounts, this.repositories)
            : (this._showPopup({ type: ao.UsageReportingChanges }),
              Promise.resolve());
        }
        _recordLaunchStats(e) {
          return this.statsStore.recordLaunchStats(e);
        }
        async _appendIgnoreRule(e, t) {
          return (
            await (async function (e, t) {
              const n = (await Hl(e)) || "",
                r = await Ul(n, e),
                i = t instanceof Array ? t.join("\n") : t,
                o = await Ul(`${r}${i}`, e);
              await zl(e, o);
            })(e, t),
            this._refreshRepository(e)
          );
        }
        _resetSignInState() {
          return this.signInStore.reset(), Promise.resolve();
        }
        _beginDotComSignIn() {
          return this.signInStore.beginDotComSignIn(), Promise.resolve();
        }
        _beginEnterpriseSignIn() {
          return this.signInStore.beginEnterpriseSignIn(), Promise.resolve();
        }
        _setSignInEndpoint(e) {
          return this.signInStore.setEndpoint(e);
        }
        _setSignInCredentials(e, t) {
          return this.signInStore.authenticateWithBasicAuth(e, t);
        }
        _requestBrowserAuthentication() {
          return this.signInStore.authenticateWithBrowser();
        }
        _setSignInOTP(e) {
          return this.signInStore.setTwoFactorOTP(e);
        }
        async _setAppFocusState(e) {
          this.appIsFocused !== e &&
            ((this.appIsFocused = e), this.emitUpdate()),
            this.appIsFocused
              ? (this.repositoryIndicatorUpdater.resume(),
                this.selectedRepository instanceof lo &&
                  (this.startPullRequestUpdater(this.selectedRepository),
                  this.currentOnboardingTutorialStep === gu.PickEditor &&
                    (await this._resolveCurrentEditor())))
              : (this.repositoryIndicatorUpdater.pause(),
                this.stopPullRequestUpdater());
        }
        _startOpenInDesktop(e) {
          const t = new Promise((e) => (this.resolveOpenInDesktop = e));
          return e(), t;
        }
        async _completeOpenInDesktop(e) {
          const t = this.resolveOpenInDesktop;
          this.resolveOpenInDesktop = null;
          const n = await e();
          return t && t(n), n;
        }
        _updateRepositoryPath(e, t) {
          return this.repositoriesStore.updateRepositoryPath(e, t);
        }
        _removeAccount(e) {
          return (
            log.info(
              `[AppStore] removing account ${e.login} (${e.name}) from store`
            ),
            this.accountsStore.removeAccount(e)
          );
        }
        async _addAccount(e) {
          log.info(`[AppStore] adding account ${e.login} (${e.name}) to store`);
          const t = await this.accountsStore.addAccount(e);
          this.showWelcomeFlow &&
            null !== t &&
            this.apiRepositoriesStore.loadRepositories(t);
        }
        _updateRepositoryMissing(e, t) {
          return this.repositoriesStore.updateRepositoryMissing(e, t);
        }
        async _updateRepositoryWorkflowPreferences(e, t) {
          await this.repositoriesStore.updateRepositoryWorkflowPreferences(
            e,
            t
          );
        }
        async _addTutorialRepository(e, t, n) {
          const r = await Tc(e);
          if (r)
            log.info(`[AppStore] adding tutorial repository at ${r} to store`),
              await this.repositoriesStore.addTutorialRepository(r, t, n),
              this.tutorialAssessor.onNewTutorialRepository();
          else {
            const t = new Error(e + " isn't a git repository.");
            this.emitError(t);
          }
        }
        async _addRepositories(e) {
          const t = new Array(),
            n = new Array(),
            r = new Array();
          for (const i of e) {
            const e = await Tc(i);
            if (e) {
              log.info(`[AppStore] adding repository at ${e} to store`);
              const r = Tt(this.repositories, e);
              if (void 0 !== r) {
                t.push(r);
                continue;
              }
              const i = await this.repositoriesStore.addRepository(e),
                o = this.gitStoreCache.get(i);
              await o.loadRemotes();
              const [s, a] = await Promise.all([
                this.repositoryWithRefreshedGitHubRepository(i),
                this.isUsingLFS(i),
              ]);
              t.push(s), a && n.push(s);
            } else r.push(i);
          }
          return (
            r.length > 0 &&
              this.emitError(new Error(this.getInvalidRepoPathsMessage(r))),
            n.length > 0 &&
              this._showPopup({ type: ao.InitializeLFS, repositories: n }),
            t
          );
        }
        async _removeRepository(e, t) {
          try {
            if (t) {
              if (!te.moveItemToTrash(e.path))
                return void this.emitError(
                  new Error(
                    "Failed moving repository directory to Recycle Bin.\n\nA common reason for this is if a file or directory is open in another program."
                  )
                );
            }
            e instanceof Ui
              ? this._removeCloningRepository(e)
              : await this.repositoriesStore.removeRepository(e);
          } catch (e) {
            return void this.emitError(e);
          }
          0 === (await this.repositoriesStore.getAll()).length
            ? this._closeFoldout(j.Repository)
            : this._showFoldout({ type: j.Repository });
        }
        async _cloneAgain(e, t) {
          const { promise: n, repository: r } = this._clone(e, t);
          await this._selectRepository(r);
          if (!(await n)) return;
          const i = this.repositories.find((e) => e.path === t);
          if (i) {
            const e = await this._updateRepositoryMissing(i, !1);
            await this._selectRepository(e);
          }
        }
        getInvalidRepoPathsMessage(e) {
          return 1 === e.length
            ? e + " isn't a Git repository."
            : `The following paths aren't Git repositories:\n\n${e
                .slice(0, 3)
                .map((e) => "- " + e)
                .join("\n")}${
                e.length > 3 ? `\n\n(and ${e.length - 3} more)` : ""
              }`;
        }
        async withAuthenticatingUser(e, t) {
          let n = e,
            r = us(this.accounts, n);
          if (
            (r ||
              ((n = await this.repositoryWithRefreshedGitHubRepository(e)),
              (r = us(this.accounts, n))),
            !r)
          ) {
            const t = this.gitStoreCache.get(e).currentRemote;
            if (t) {
              const e = as(t.url),
                n = cs(e);
              null != n && (r = { login: n, endpoint: e });
            }
          }
          if (r instanceof Pe) {
            const t = r.token.length > 0 ? "has token" : "empty token";
            log.info(
              `[AppStore.withAuthenticatingUser] account found for repository: ${e.name} - ${r.login} (${t})`
            );
          }
          return t(n, r);
        }
        updateRevertProgress(e, t) {
          this.repositoryStateCache.update(e, () => ({ revertProgress: t })),
            this.selectedRepository === e && this.emitUpdate();
        }
        async _revertCommit(e, t) {
          return this.withAuthenticatingUser(e, async (n, r) => {
            const i = this.gitStoreCache.get(n);
            await i.revertCommit(n, t, r, (e) => {
              this.updateRevertProgress(n, e);
            }),
              this.updateRevertProgress(n, null),
              await this._refreshRepository(e);
          });
        }
        async promptForGenericGitAuthentication(e, t) {
          let n;
          if (e instanceof lo) {
            const t = this.gitStoreCache.get(e).currentRemote;
            if (!t) return;
            n = t.url;
          } else n = e.url;
          const r = as(n);
          return this._showPopup({
            type: ao.GenericGitAuthentication,
            hostname: r,
            retryAction: t,
          });
        }
        async _installGlobalLFSFilters(e) {
          try {
            await (async function (e) {
              const t = ["lfs", "install", "--skip-repo"];
              e && t.push("--force"),
                await $o(t, __dirname, "installGlobalLFSFilter");
            })(e);
          } catch (e) {
            this.emitError(e);
          }
        }
        async isUsingLFS(e) {
          try {
            return await (async function (e) {
              return (
                (
                  await $o(["lfs", "track"], e.path, "isUsingLFS", {
                    env: { GIT_LFS_TRACK_NO_INSTALL_HOOKS: "1" },
                  })
                ).stdout.length > 0
              );
            })(e);
          } catch (e) {
            return !1;
          }
        }
        async _installLFSHooks(e) {
          for (const t of e)
            try {
              await Wl(t, !0);
            } catch (e) {
              this.emitError(e);
            }
        }
        _changeCloneRepositoriesTab(e) {
          return (
            (this.selectedCloneRepositoryTab = e),
            this.emitUpdate(),
            Promise.resolve()
          );
        }
        _refreshApiRepositories(e) {
          return this.apiRepositoriesStore.loadRepositories(e);
        }
        _changeBranchesTab(e) {
          return (
            (this.selectedBranchesTab = e), this.emitUpdate(), Promise.resolve()
          );
        }
        async _showGitHubExplore(e) {
          const { gitHubRepository: t } = e;
          if (!t || null === t.htmlURL) return;
          const n = new URL(t.htmlURL);
          (n.pathname = "/explore"), await this._openInBrowser(n.toString());
        }
        async _createPullRequest(e) {
          if (!e.gitHubRepository) return;
          const t = this.repositoryStateCache.get(e),
            n = t.branchesState.tip;
          if (n.kind !== so.Valid) return;
          const r = n.branch,
            i = t.aheadBehind;
          null == i
            ? this._showPopup({
                type: ao.PushBranchCommits,
                repository: e,
                branch: r,
              })
            : i.ahead > 0
            ? this._showPopup({
                type: ao.PushBranchCommits,
                repository: e,
                branch: r,
                unPushedCommits: i.ahead,
              })
            : await this._openCreatePullRequestInBrowser(e, r);
        }
        async _showPullRequest(e) {
          if (null === e.gitHubRepository) return;
          const t = this.repositoryStateCache.get(e).branchesState
            .currentPullRequest;
          if (null === t) return;
          const { htmlURL: n } = t.base.gitHubRepository;
          if (null === n) return;
          const r = `${n}/pull/${t.pullRequestNumber}`;
          await this._openInBrowser(r);
        }
        async _refreshPullRequests(e) {
          if (co(e)) {
            const t = us(this.accounts, e);
            null !== t &&
              (await this.pullRequestCoordinator.refreshPullRequests(e, t));
          }
        }
        async onPullRequestChanged(e, t) {
          this.repositoryStateCache.updateBranchesState(e, () => ({
            openPullRequests: t,
          })),
            this.updateCurrentPullRequest(e),
            this.gitStoreCache.get(e).pruneForkedRemotes(t);
          const n = this.getSelectedState();
          n &&
            n.type === W.Repository &&
            n.repository.id === e.id &&
            this.updateMenuLabelsForSelectedRepository(),
            this.emitUpdate();
        }
        updateCurrentPullRequest(e) {
          e.gitHubRepository &&
            (this.repositoryStateCache.updateBranchesState(e, (t) => {
              let n = null;
              const { remote: r } = this.repositoryStateCache.get(e);
              return (
                t.tip.kind === so.Valid &&
                  r &&
                  (n = bu(t.tip.branch, t.openPullRequests, r)),
                { currentPullRequest: n }
              );
            }),
            this.emitUpdate());
        }
        async _openCreatePullRequestInBrowser(e, t) {
          const n = e.gitHubRepository;
          if (!n) return;
          const r = Object(Mi.escape)(t.nameWithoutRemote),
            i = `${n.htmlURL}/pull/new/${r}`;
          await this._openInBrowser(i),
            this.currentOnboardingTutorialStep === gu.OpenPullRequest &&
              this._markPullRequestTutorialStepAsComplete(e);
        }
        async _updateExistingUpstreamRemote(e) {
          const t = this.gitStoreCache.get(e);
          return (
            await t.updateExistingUpstreamRemote(), this._refreshRepository(e)
          );
        }
        getIgnoreExistingUpstreamRemoteKey(e) {
          return `repository/${e.id}/ignoreExistingUpstreamRemote`;
        }
        _ignoreExistingUpstreamRemote(e) {
          return (
            be(this.getIgnoreExistingUpstreamRemoteKey(e), !0),
            Promise.resolve()
          );
        }
        getIgnoreExistingUpstreamRemote(e) {
          const t = this.getIgnoreExistingUpstreamRemoteKey(e);
          return Promise.resolve(we(t, !1));
        }
        async addUpstreamRemoteIfNeeded(e) {
          const t = this.gitStoreCache.get(e);
          if (!(await this.getIgnoreExistingUpstreamRemote(e)))
            return t.addUpstreamRemoteIfNeeded();
        }
        async _checkoutPullRequest(e, t, n, r, i) {
          const o = await this._getPullRequestHeadBranchInRepo(e, r, i);
          if (null !== o)
            return (
              await this._checkoutBranch(e, o),
              void this.statsStore.recordPRBranchCheckout()
            );
          const s = (function (e) {
              return "github-desktop-" + e;
            })(n),
            a = (await Us(e)).find((e) => e.name === s) || (await Ws(e, s, r));
          if (a.url !== r) {
            const e = new Error(
              `Expected PR remote ${s} url to be ${r} got ${a.url}.`
            );
            return log.error(e.message), this.emitError(e);
          }
          await this._fetchRemote(e, a, $i.UserInitiatedTask);
          const l = "pr/" + t,
            c = this.gitStoreCache
              .get(e)
              .allBranches.find((e) => e.nameWithoutRemote === o);
          void 0 === c
            ? await this._createBranch(e, l, `${s}/${i}`)
            : await this._checkoutBranch(e, c),
            this.statsStore.recordPRBranchCheckout();
        }
        async _getPullRequestHeadBranchInRepo(e, t, n) {
          const { cloneURL: r, parent: i } = e.gitHubRepository,
            o = this.gitStoreCache.get(e);
          let s = null;
          return (
            t === r
              ? (s = o.defaultRemote)
              : t === (null == i ? void 0 : i.cloneURL) &&
                (s = o.upstreamRemote),
            null !== s ? this.findPullRequestHeadInRemote(e, s, n) : null
          );
        }
        async findPullRequestHeadInRemote(e, t, n) {
          const r = this.gitStoreCache.get(e),
            i = (e) => {
              var t;
              return null !==
                (t = r.allBranches.find((t) =>
                  t.type === Ri.Local ? t.upstream === e : t.name === e
                )) && void 0 !== t
                ? t
                : null;
            },
            o = `${t.name}/${n}`,
            s = i(o);
          return null !== s
            ? s
            : (null === s &&
                (await this._fetchRemote(e, t, $i.UserInitiatedTask)),
              i(o));
        }
        _setShowCoAuthoredBy(e, t) {
          return (
            this.gitStoreCache.get(e).setShowCoAuthoredBy(t), Promise.resolve()
          );
        }
        _setCoAuthors(e, t) {
          return this.gitStoreCache.get(e).setCoAuthors(t), Promise.resolve();
        }
        _setSelectedTheme(e) {
          return (
            Si(e),
            (this.selectedTheme = e),
            this.emitUpdate(),
            Promise.resolve()
          );
        }
        _setAutomaticallySwitchTheme(e) {
          return (
            be("autoSwitchTheme", e),
            (this.automaticallySwitchTheme = e),
            this.emitUpdate(),
            Promise.resolve()
          );
        }
        async _resolveCurrentEditor() {
          const e = await Fo(this.selectedExternalEditor),
            t = null != e ? e.editor : null;
          this.resolvedExternalEditor !== t &&
            ((this.resolvedExternalEditor = t),
            this.currentOnboardingTutorialStep === gu.PickEditor &&
              this.selectedRepository instanceof lo &&
              this.updateCurrentTutorialStep(this.selectedRepository),
            this.emitUpdate());
        }
        _updateManualConflictResolution(e, t, n) {
          this.repositoryStateCache.updateChangesState(e, (e) => {
            const { conflictState: r } = e;
            if (null === r) return { conflictState: r };
            const i = new Map(r.manualResolutions);
            return (
              null !== n ? i.set(t, n) : i.delete(t),
              {
                conflictState: Object.assign(Object.assign({}, r), {
                  manualResolutions: i,
                }),
              }
            );
          });
          const r = this.repositoryStateCache.get(e),
            { changesState: i, rebaseState: o } = r,
            { conflictState: s } = i,
            { step: a } = o;
          null !== s &&
            "rebase" === s.kind &&
            null !== a &&
            "ShowConflicts" === a.kind &&
            this.repositoryStateCache.updateRebaseState(e, () => ({
              step: Object.assign(Object.assign({}, a), { conflictState: s }),
            })),
            this.emitUpdate();
        }
        async createStashAndDropPreviousEntry(e, t) {
          const n = await Wc(e, t),
            r = this.gitStoreCache.get(e),
            i = await r.performFailableOperation(() =>
              this.createStashEntry(e, t)
            );
          if (!0 === i && null !== n) {
            const { stashSha: t, branchName: i } = n;
            await r.performFailableOperation(async () => {
              await Vc(e, t),
                log.info(`Dropped stash '${t}' associated with ${i}`);
            });
          }
          return !0 === i;
        }
        async createStashEntry(e, t) {
          const { changesState: n } = this.repositoryStateCache.get(e),
            { workingDirectory: r } = n,
            i = r.files.filter((e) => e.status.kind === io.Untracked);
          return await (async function (e, t, n) {
            const r = n.map((e) => e.withIncludeAll(!0));
            await ka(e, r);
            const i = [
                "stash",
                "push",
                "-m",
                (function (e) {
                  return `!!GitHub_Desktop<${e}>`;
                })("string" == typeof t ? t : t.name),
              ],
              o = await $o(i, e.path, "createStashEntry", {
                successExitCodes: new Set([0, 1]),
              });
            if (1 === o.exitCode) {
              const e = /^error: /m.exec(o.stderr);
              if (null !== e && e.length > 0) throw new Go(o, i);
              log.info(
                `[createDesktopStashEntry] a stash was created successfully but exit code ${o.exitCode} reported. stderr: ${o.stderr}`
              );
            }
            return "No local changes to save\n" !== o.stdout;
          })(e, t, i);
        }
        async _popStashEntry(e, t) {
          const n = this.gitStoreCache.get(e);
          await n.performFailableOperation(() => Gc(e, t.stashSha)),
            log.info(
              "[AppStore. _popStashEntry] popped stash with commit id " +
                t.stashSha
            ),
            this.statsStore.recordStashRestore(),
            await this._refreshRepository(e);
        }
        async _dropStashEntry(e, t) {
          const n = this.gitStoreCache.get(e);
          await n.performFailableOperation(() => Vc(e, t.stashSha)),
            log.info(
              "[AppStore. _dropStashEntry] dropped stash with commit id " +
                t.stashSha
            ),
            this.statsStore.recordStashDiscard(),
            await n.loadStashEntries();
        }
        _setStashedFilesWidth(e) {
          return (
            (this.stashedFilesWidth = e),
            Ce("stashed-files-width", e),
            this.emitUpdate(),
            Promise.resolve()
          );
        }
        _resetStashedFilesWidth() {
          return (
            (this.stashedFilesWidth = 250),
            localStorage.removeItem("stashed-files-width"),
            this.emitUpdate(),
            Promise.resolve()
          );
        }
        async _testPruneBranches() {
          null !== this.currentBranchPruner &&
            (await this.currentBranchPruner.testPrune());
        }
        async _showCreateForkDialog(e) {
          const t = us(this.accounts, e);
          null !== t &&
            (await this._showPopup({
              type: ao.CreateFork,
              repository: e,
              account: t,
            }));
        }
        async _convertRepositoryToFork(e, t) {
          var n, r;
          const i = this.gitStoreCache.get(e),
            o =
              null === (n = i.defaultRemote) || void 0 === n ? void 0 : n.name,
            s = null === (r = i.defaultRemote) || void 0 === r ? void 0 : r.url,
            { endpoint: a } = e.gitHubRepository;
          return void 0 !== o &&
            void 0 !== s &&
            (await i.setRemoteURL(o, t.clone_url))
            ? (await i.ensureUpstreamRemoteURL(s),
              this.repositoriesStore.setGitHubRepository(
                e,
                await this.repositoriesStore.upsertGitHubRepository(a, t)
              ))
            : e;
        }
        async _createTutorialRepository(e) {
          try {
            await this.statsStore.recordTutorialStarted();
            const t = "desktop-tutorial",
              n = i.resolve(Ru(), t),
              r = await Eu(e, t, n, (e, t, n) => {
                null !== this.currentPopup &&
                  this.currentPopup.type === ao.CreateTutorialRepository &&
                  ((this.currentPopup = Object.assign(
                    Object.assign({}, this.currentPopup),
                    {
                      progress: {
                        kind: "generic",
                        title: e,
                        value: t,
                        description: n,
                      },
                    }
                  )),
                  this.emitUpdate());
              });
            await this._addTutorialRepository(n, e.endpoint, r),
              await this.statsStore.recordTutorialRepoCreated();
          } catch (e) {
            xu("tutorialRepoCreation", e),
              e instanceof Go
                ? this.emitError(e)
                : this.emitError(
                    new Error(
                      "Failed creating the tutorial repository.\n\n" + e.message
                    )
                  );
          } finally {
            this._closePopup(ao.CreateTutorialRepository);
          }
        }
      })(lS, cS, uS, hS, dS, pS, fS, gS, yS, vS);
    bS.onDidUpdate((e) => {
      sS = e;
    });
    const SS = new (class {
      constructor(e, t, n, r) {
        (this.appStore = e),
          (this.repositoryStateManager = t),
          (this.statsStore = n),
          (this.commitStatusStore = r),
          (this.errorHandlers = new Array()),
          (this.addRebasedBranchToForcePushList = (e, t, n) => {
            if (t.branch.tip.sha === n) return;
            const r = this.repositoryStateManager.get(e),
              { rebasedBranches: i } = r.branchesState,
              o = new Map(i);
            o.set(t.branch.nameWithoutRemote, t.branch.tip.sha),
              this.repositoryStateManager.updateBranchesState(e, () => ({
                rebasedBranches: o,
              }));
          }),
          (this.dropCurrentBranchFromForcePushList = (e) => {
            const t = this.repositoryStateManager.get(e),
              { rebasedBranches: n, tip: r } = t.branchesState;
            if (r.kind !== so.Valid) return;
            const i = new Map(n);
            i.delete(r.branch.nameWithoutRemote),
              this.repositoryStateManager.updateBranchesState(e, () => ({
                rebasedBranches: i,
              }));
          }),
          (this.switchToConflicts = (e, t) => {
            this.setRebaseFlowStep(e, {
              kind: "ShowConflicts",
              conflictState: t,
            });
          }),
          (this.setStashedFilesWidth = (e) =>
            this.appStore._setStashedFilesWidth(e)),
          (this.resetStashedFilesWidth = () =>
            this.appStore._resetStashedFilesWidth());
      }
      loadInitialState() {
        return this.appStore.loadInitialState();
      }
      addRepositories(e) {
        return this.appStore._addRepositories(e);
      }
      addTutorialRepository(e, t, n) {
        return this.appStore._addTutorialRepository(e, t, n);
      }
      resumeTutorial(e) {
        return this.appStore._resumeTutorial(e);
      }
      pauseTutorial(e) {
        return this.appStore._pauseTutorial(e);
      }
      async removeRepository(e, t) {
        return this.appStore._removeRepository(e, t);
      }
      async updateRepositoryMissing(e, t) {
        return this.appStore._updateRepositoryMissing(e, t);
      }
      loadNextCommitBatch(e) {
        return this.appStore._loadNextCommitBatch(e);
      }
      loadChangedFilesForCurrentSelection(e) {
        return this.appStore._loadChangedFilesForCurrentSelection(e);
      }
      changeCommitSelection(e, t) {
        return this.appStore._changeCommitSelection(e, t);
      }
      changeFileSelection(e, t) {
        return this.appStore._changeFileSelection(e, t);
      }
      setRepositoryFilterText(e) {
        return this.appStore._setRepositoryFilterText(e);
      }
      selectRepository(e) {
        return this.appStore._selectRepository(e);
      }
      changeRepositorySection(e, t) {
        return this.appStore._changeRepositorySection(e, t);
      }
      selectWorkingDirectoryFiles(e, t) {
        return this.appStore._selectWorkingDirectoryFiles(e, t);
      }
      selectStashedFile(e, t) {
        return this.appStore._selectStashedFile(e, t);
      }
      async commitIncludedChanges(e, t) {
        return this.appStore._commitIncludedChanges(e, t);
      }
      changeFileIncluded(e, t, n) {
        return this.appStore._changeFileIncluded(e, t, n);
      }
      changeFileLineSelection(e, t, n) {
        return this.appStore._changeFileLineSelection(e, t, n);
      }
      changeIncludeAllFiles(e, t) {
        return this.appStore._changeIncludeAllFiles(e, t);
      }
      refreshRepository(e) {
        return this.appStore._refreshOrRecoverRepository(e);
      }
      showPopup(e) {
        return this.appStore._showPopup(e);
      }
      closePopup(e) {
        return this.appStore._closePopup(e);
      }
      showFoldout(e) {
        return this.appStore._showFoldout(e);
      }
      closeCurrentFoldout() {
        return this.appStore._closeCurrentFoldout();
      }
      closeFoldout(e) {
        return this.appStore._closeFoldout(e);
      }
      async warnAboutRemoteCommits(e, t, n) {
        if (null === n.upstream) return !1;
        if (0 === (await Ia(e, "refs/remotes/" + n.upstream)).length) return !1;
        const r = await $a(e, t.tip.sha, n.upstream);
        return null !== r && r.length > 0;
      }
      async startRebase(e, t, n, r, i) {
        const { askForConfirmationOnForcePush: o } = this.appStore.getState(),
          s = void 0 !== i && i.continueWithForcePush;
        if (o && !s) {
          if (await this.warnAboutRemoteCommits(e, t, n))
            return void this.setRebaseFlowStep(e, {
              kind: "WarnForcePush",
              baseBranch: t,
              targetBranch: n,
              commits: r,
            });
        }
        this.initializeRebaseProgress(e, r);
        this.setRebaseFlowStep(e, {
          kind: "ShowProgress",
          rebaseAction: () => this.rebase(e, t, n),
        });
      }
      async launchRebaseFlow(e, t) {
        await this.appStore._loadStatus(e);
        const n = this.repositoryStateManager.get(e),
          { conflictState: r } = n.changesState;
        if (null === r || "merge" === r.kind) return;
        const i = Object.assign(Object.assign({}, r), { targetBranch: t });
        this.repositoryStateManager.updateChangesState(e, () => ({
          conflictState: i,
        })),
          await this.setRebaseProgressFromState(e);
        const o = vl(i);
        this.setRebaseFlowStep(e, o),
          this.showPopup({ type: ao.RebaseFlow, repository: e });
      }
      createBranch(e, t, n, r = !1) {
        return this.appStore._createBranch(e, t, n, r);
      }
      createTag(e, t, n) {
        return this.appStore._createTag(e, t, n);
      }
      deleteTag(e, t) {
        return this.appStore._deleteTag(e, t);
      }
      showCreateTagDialog(e, t, n, r) {
        return this.showPopup({
          type: ao.CreateTag,
          repository: e,
          targetCommitSha: t,
          initialName: r,
          localTags: n,
        });
      }
      showDeleteTagDialog(e, t) {
        return this.showPopup({
          type: ao.DeleteTag,
          repository: e,
          tagName: t,
        });
      }
      checkoutBranch(e, t, n) {
        return this.appStore._checkoutBranch(e, t, n);
      }
      push(e) {
        return this.appStore._push(e);
      }
      pushWithOptions(e, t) {
        return (
          void 0 !== t &&
            t.forceWithLease &&
            this.dropCurrentBranchFromForcePushList(e),
          this.appStore._push(e, t)
        );
      }
      pull(e) {
        return this.appStore._pull(e);
      }
      fetchRefspec(e, t) {
        return this.appStore._fetchRefspec(e, t);
      }
      fetch(e, t) {
        return this.appStore._fetch(e, t);
      }
      publishRepository(e, t, n, r, i, o) {
        return this.appStore._publishRepository(e, t, n, r, i, o);
      }
      async postError(e) {
        let t = e;
        for (let e = this.errorHandlers.length - 1; e >= 0; e--) {
          const n = this.errorHandlers[e];
          if (((t = await n(t, this)), !t)) break;
        }
        t &&
          Z(
            `Unhandled error ${t}. This shouldn't happen! All errors should be handled, even if it's just by the default handler.`
          );
      }
      presentError(e) {
        return this.appStore._pushError(e);
      }
      clearError(e) {
        return this.appStore._clearError(e);
      }
      cloneAgain(e, t) {
        return this.appStore._cloneAgain(e, t);
      }
      async clone(e, t, n) {
        return this.appStore._completeOpenInDesktop(async () => {
          const { promise: r, repository: i } = this.appStore._clone(e, t, n);
          await this.selectRepository(i);
          if (!(await r)) return null;
          const o = (await this.addRepositories([t]))[0];
          return (
            await this.selectRepository(o),
            uo(o) &&
              this.showPopup({ type: ao.ChooseForkSettings, repository: o }),
            o
          );
        });
      }
      renameBranch(e, t, n) {
        return this.appStore._renameBranch(e, t, n);
      }
      deleteBranch(e, t, n) {
        return this.appStore._deleteBranch(e, t, n);
      }
      discardChanges(e, t) {
        return this.appStore._discardChanges(e, t);
      }
      discardChangesFromSelection(e, t, n, r) {
        return this.appStore._discardChangesFromSelection(e, t, n, r);
      }
      undoCommit(e, t) {
        return this.appStore._undoCommit(e, t);
      }
      revertCommit(e, t) {
        return this.appStore._revertCommit(e, t);
      }
      setSidebarWidth(e) {
        return this.appStore._setSidebarWidth(e);
      }
      setUpdateBannerVisibility(e) {
        return this.appStore._setUpdateBannerVisibility(e);
      }
      setBanner(e) {
        return this.appStore._setBanner(e);
      }
      clearBanner(e) {
        return this.appStore._clearBanner(e);
      }
      resetSidebarWidth() {
        return this.appStore._resetSidebarWidth();
      }
      setCommitSummaryWidth(e) {
        return this.appStore._setCommitSummaryWidth(e);
      }
      resetCommitSummaryWidth() {
        return this.appStore._resetCommitSummaryWidth();
      }
      refreshIssues(e) {
        return this.appStore._refreshIssues(e);
      }
      endWelcomeFlow() {
        return this.appStore._endWelcomeFlow();
      }
      setCommitMessageFocus(e) {
        this.appStore._setCommitMessageFocus(e);
      }
      setCommitMessage(e, t) {
        return this.appStore._setCommitMessage(e, t);
      }
      removeAccount(e) {
        return this.appStore._removeAccount(e);
      }
      setAppMenuState(e) {
        return this.appStore._setAppMenuState(e);
      }
      executeMenuItem(e) {
        return (
          (function (e) {
            r.ipcRenderer.send("execute-menu-item", { id: e.id });
          })(e),
          Promise.resolve()
        );
      }
      setAccessKeyHighlightState(e) {
        return this.appStore._setAccessKeyHighlightState(e);
      }
      mergeBranch(e, t, n) {
        return this.appStore._mergeBranch(e, t, n);
      }
      setConflictsResolved(e) {
        return this.appStore._setConflictsResolved(e);
      }
      initializeRebaseProgress(e, t) {
        return this.appStore._initializeRebaseProgress(e, t);
      }
      setRebaseProgressFromState(e) {
        return this.appStore._setRebaseProgressFromState(e);
      }
      setRebaseFlowStep(e, t) {
        return this.appStore._setRebaseFlowStep(e, t);
      }
      endRebaseFlow(e) {
        return this.appStore._endRebaseFlow(e);
      }
      async rebase(e, t, n) {
        const r = jb(this.repositoryStateManager.get(e).branchesState.tip);
        log.info(`[rebase] starting rebase for ${n.name} at ${r}`),
          log.info(
            "[rebase] to restore the previous state if this completed rebase is unsatisfactory:"
          ),
          log.info("[rebase] - git checkout " + n.name),
          log.info(`[rebase] - git reset ${r} --hard`);
        const i = await this.appStore._rebase(e, t, n);
        await this.appStore._loadStatus(e);
        const o = this.repositoryStateManager.get(e),
          { tip: s } = o.branchesState,
          a = jb(s);
        if (
          (log.info(
            `[rebase] completed rebase - got ${i} and on tip ${a} - kind ${s.kind}`
          ),
          i === Sl.ConflictsEncountered)
        ) {
          const { conflictState: r } = o.changesState;
          if (null === r)
            return void log.warn(
              "[rebase] conflict state after rebase is null - unable to continue"
            );
          if (Y(r))
            return void log.warn(
              "[rebase] conflict state after rebase is merge conflicts - unable to continue"
            );
          const i = Object.assign(Object.assign({}, r), {
            baseBranch: t.name,
            targetBranch: n.name,
          });
          this.switchToConflicts(e, i);
        } else if (i === Sl.CompletedWithoutError) {
          if (s.kind !== so.Valid)
            return void log.warn(
              `[rebase] tip after completing rebase is ${s.kind} but this should be a valid tip if the rebase completed without error`
            );
          this.statsStore.recordRebaseSuccessWithoutConflicts(),
            await this.completeRebase(
              e,
              {
                type: su.SuccessfulRebase,
                targetBranch: n.name,
                baseBranch: t.name,
              },
              s,
              r
            );
        } else i === Sl.Error && this.endRebaseFlow(e);
      }
      async abortRebase(e) {
        await this.appStore._abortRebase(e), await this.appStore._loadStatus(e);
      }
      async continueRebase(e, t, n) {
        const r = this.repositoryStateManager.get(e),
          {
            targetBranch: i,
            baseBranch: o,
            originalBranchTip: s,
            manualResolutions: a,
          } = n,
          l = jb(r.branchesState.tip);
        log.info("[continueRebase] continuing rebase for " + l);
        const c = await this.appStore._continueRebase(e, t, a);
        await this.appStore._loadStatus(e);
        const u = this.repositoryStateManager.get(e),
          { tip: h } = u.branchesState,
          d = jb(h);
        if (
          (log.info(
            `[continueRebase] completed rebase - got ${c} and on tip ${d} - kind ${h.kind}`
          ),
          c === Sl.ConflictsEncountered)
        ) {
          const { conflictState: t } = u.changesState;
          if (null === t)
            return void log.warn(
              "[continueRebase] conflict state after rebase is null - unable to continue"
            );
          if (Y(t))
            return void log.warn(
              "[continueRebase] conflict state after rebase is merge conflicts - unable to continue"
            );
          const n = Object.assign(Object.assign({}, t), {
            baseBranch: o,
            targetBranch: i,
          });
          this.switchToConflicts(e, n);
        } else if (c === Sl.CompletedWithoutError) {
          if (h.kind !== so.Valid)
            return void log.warn(
              `[continueRebase] tip after completing rebase is ${h.kind} but this should be a valid tip if the rebase completed without error`
            );
          this.statsStore.recordRebaseSuccessAfterConflicts(),
            await this.completeRebase(
              e,
              { type: su.SuccessfulRebase, targetBranch: i, baseBranch: o },
              h,
              s
            );
        }
      }
      async completeRebase(e, t, n, r) {
        this.closePopup(),
          this.setBanner(t),
          n.kind === so.Valid && this.addRebasedBranchToForcePushList(e, n, r),
          this.endRebaseFlow(e),
          await this.refreshRepository(e);
      }
      async abortMerge(e) {
        await this.appStore._abortMerge(e), await this.appStore._loadStatus(e);
      }
      async finishConflictedMerge(e, t, n) {
        const r = this.repositoryStateManager.get(e),
          { conflictState: i } = r.changesState;
        if (null === i)
          return void log.error(
            "Conflict state missing during finishConflictedMerge. No merge will be committed."
          );
        void 0 !==
          (await this.appStore._finishConflictedMerge(
            e,
            t,
            i.manualResolutions
          )) && this.setBanner(n);
      }
      recordLaunchStats(e) {
        return this.appStore._recordLaunchStats(e);
      }
      reportStats() {
        return this.appStore._reportStats();
      }
      setRemoteURL(e, t, n) {
        return this.appStore._setRemoteURL(e, t, n);
      }
      openInBrowser(e) {
        return this.appStore._openInBrowser(e);
      }
      appendIgnoreRule(e, t) {
        return this.appStore._appendIgnoreRule(e, t);
      }
      async openShell(e, t = !1) {
        (await (async function () {
          return void 0 !== (await sc());
        })()) || t
          ? this.appStore._openShell(e)
          : this.appStore._showPopup({ type: ao.InstallGit, path: e });
      }
      async openInExternalEditor(e) {
        return this.appStore._openInExternalEditor(e);
      }
      saveGitIgnore(e, t) {
        return this.appStore._saveGitIgnore(e, t);
      }
      setStatsOptOut(e, t) {
        return this.appStore.setStatsOptOut(e, t);
      }
      markUsageStatsNoteSeen() {
        this.appStore.markUsageStatsNoteSeen();
      }
      resetSignInState() {
        return this.appStore._resetSignInState();
      }
      beginDotComSignIn() {
        return this.appStore._beginDotComSignIn();
      }
      beginEnterpriseSignIn() {
        return this.appStore._beginEnterpriseSignIn();
      }
      setSignInEndpoint(e) {
        return this.appStore._setSignInEndpoint(e);
      }
      setSignInCredentials(e, t) {
        return this.appStore._setSignInCredentials(e, t);
      }
      requestBrowserAuthentication() {
        return this.appStore._requestBrowserAuthentication();
      }
      async requestBrowserAuthenticationToDotcom() {
        return (
          await this.beginDotComSignIn(), this.requestBrowserAuthentication()
        );
      }
      setSignInOTP(e) {
        return this.appStore._setSignInOTP(e);
      }
      async showDotComSignInDialog() {
        await this.appStore._beginDotComSignIn(),
          await this.appStore._showPopup({ type: ao.SignIn });
      }
      async showEnterpriseSignInDialog() {
        await this.appStore._beginEnterpriseSignIn(),
          await this.appStore._showPopup({ type: ao.SignIn });
      }
      async showCreateForkDialog(e) {
        await this.appStore._showCreateForkDialog(e);
      }
      registerErrorHandler(e) {
        return (
          this.errorHandlers.push(e),
          new ie.Disposable(() => {
            const t = this.errorHandlers.indexOf(e);
            t >= 0 && this.errorHandlers.splice(t, 1);
          })
        );
      }
      async relocateRepository(e) {
        const t = r.remote.getCurrentWindow(),
          { filePaths: n } = await r.remote.dialog.showOpenDialog(t, {
            properties: ["openDirectory"],
          });
        if (n.length > 0) {
          const t = n[0];
          await this.updateRepositoryPath(e, t);
        }
      }
      async updateRepositoryWorkflowPreferences(e, t) {
        await this.appStore._updateRepositoryWorkflowPreferences(e, t);
      }
      async updateRepositoryPath(e, t) {
        await this.appStore._updateRepositoryPath(e, t);
      }
      async setAppFocusState(e) {
        await this.appStore._setAppFocusState(e),
          e
            ? this.commitStatusStore.startBackgroundRefresh()
            : this.commitStatusStore.stopBackgroundRefresh();
      }
      getRepositoryFromPullRequest(e) {
        var t, n;
        const r = this.appStore.getState().repositories,
          i = null === (t = e.head.repo) || void 0 === t ? void 0 : t.clone_url,
          o = null === (n = e.base.repo) || void 0 === n ? void 0 : n.clone_url;
        if (void 0 === i || void 0 === o) return null;
        for (const e of r) if (this.doesRepositoryMatchUrl(e, i)) return e;
        for (const e of r) if (this.doesRepositoryMatchUrl(e, o)) return e;
        return null;
      }
      doesRepositoryMatchUrl(e, t) {
        var n, r;
        if (e instanceof lo && co(e)) {
          const i = e.gitHubRepository.htmlURL,
            o =
              null !==
                (r =
                  null === (n = e.gitHubRepository.parent) || void 0 === n
                    ? void 0
                    : n.htmlURL) && void 0 !== r
                ? r
                : null;
          if (null !== i && _t(i, t)) return !0;
          if (null !== o && _t(o, t)) return !0;
        }
        return !1;
      }
      async openRepositoryFromUrl(e) {
        const { url: t, pr: n, branch: r, filepath: i } = e;
        let o;
        if (
          ((o =
            null !== n
              ? await this.openPullRequestFromUrl(t, n)
              : null !== r
              ? await this.openBranchNameFromUrl(t, r)
              : await this.openOrCloneRepository(t)),
          null !== o && null !== i)
        ) {
          const e = await (function (e, ...t) {
            return Mc(e, t);
          })(o.path, i);
          null !== e
            ? te.showItemInFolder(e)
            : log.error(
                "Prevented attempt to open path outside of the repository root: " +
                  i
              );
        }
      }
      async openBranchNameFromUrl(e, t) {
        const n = await this.openOrCloneRepository(e);
        return null === n
          ? null
          : (await this.appStore._refreshRepository(n),
            await this.checkoutLocalBranch(n, t),
            n);
      }
      async openPullRequestFromUrl(e, t) {
        const n = await this.appStore.fetchPullRequest(e, t);
        if (null === n) return null;
        let r = this.getRepositoryFromPullRequest(n);
        return (
          null !== r
            ? await this.selectRepository(r)
            : (r = await this.openOrCloneRepository(e)),
          null === r
            ? (log.warn(
                "Open Repository from URL failed, did not find or clone repository: " +
                  e
              ),
              null)
            : co(r)
            ? (await this.appStore._refreshRepository(r),
              null === n.head.repo
                ? null
                : (await this.appStore._checkoutPullRequest(
                    r,
                    n.number,
                    n.user.login,
                    n.head.repo.clone_url,
                    n.head.ref
                  ),
                  r))
            : (log.warn(
                "Received a non-GitHub repository when opening repository from URL: " +
                  e
              ),
              null)
        );
      }
      async dispatchURLAction(e) {
        switch (e.name) {
          case "oauth":
            try {
              log.info("[Dispatcher] requesting authenticated user");
              const n = await ju(e.code, e.state);
              n
                ? ((t = n),
                  Uu ||
                    Z(
                      "`askUserToOAuth` must be called before resolving an auth request."
                    ),
                  Uu.resolve(t),
                  (Uu = null))
                : null === n &&
                  Vu(new Error("Unable to fetch authenticated user."));
            } catch (e) {
              Vu(e);
            }
            0;
            break;
          case "open-repository-from-url":
            this.openRepositoryFromUrl(e);
            break;
          case "open-repository-from-path":
            const n = (await Tc(e.path)) || e.path;
            let r = Tt(this.appStore.getState().repositories, n);
            if (null == r) {
              if (await Ya(n)) {
                r = (await this.addRepositories([n]))[0];
              }
            }
            r
              ? (await this.selectRepository(r),
                this.statsStore.recordAddExistingRepository())
              : await this.showPopup({ type: ao.AddRepository, path: n });
            break;
          default:
            const i = e;
            log.warn(
              `Unknown URL action: ${i.name} - payload: ${JSON.stringify(i)}`
            );
        }
        var t;
      }
      setConfirmRepoRemovalSetting(e) {
        return this.appStore._setConfirmRepositoryRemovalSetting(e);
      }
      setConfirmDiscardChangesSetting(e) {
        return this.appStore._setConfirmDiscardChangesSetting(e);
      }
      setUncommittedChangesStrategySetting(e) {
        return this.appStore._setUncommittedChangesStrategySetting(e);
      }
      setExternalEditor(e) {
        return this.appStore._setExternalEditor(e);
      }
      setShell(e) {
        return this.appStore._setShell(e);
      }
      async checkoutLocalBranch(e, t) {
        let n = !0;
        const r = this.repositoryStateManager.get(e),
          i = r.branchesState.allBranches,
          { tip: o } = r.branchesState;
        o.kind === so.Valid && (n = o.branch.nameWithoutRemote !== t);
        const s = i.find((e) => e.nameWithoutRemote === t);
        n && void 0 !== s && (await this.checkoutBranch(e, s));
      }
      async openOrCloneRepository(e) {
        const t = this.appStore
          .getState()
          .repositories.find((t) => this.doesRepositoryMatchUrl(t, e));
        return t
          ? await this.selectRepository(t)
          : this.appStore._startOpenInDesktop(() => {
              this.changeCloneRepositoriesTab(Ai.Generic),
                this.showPopup({ type: ao.CloneRepository, initialURL: e });
            });
      }
      async installCLI() {
        try {
          await Nw(), this.showPopup({ type: ao.CLIInstalled });
        } catch (e) {
          log.error("Error installing CLI", e), this.postError(e);
        }
      }
      promptForGenericGitAuthentication(e, t) {
        return this.appStore.promptForGenericGitAuthentication(e, t);
      }
      async saveGenericGitCredentials(e, t, n) {
        log.info(`storing generic credentials for '${e}' and '${t}'`),
          (function (e, t) {
            const n = ls(e);
            localStorage.setItem(n, t);
          })(e, t);
        try {
          await (function (e, t, n) {
            const r = Ei(e);
            return ss.setItem(r, t, n);
          })(e, t, n);
        } catch (n) {
          log.error(`Error saving generic git credentials: ${t}@${e}`, n),
            this.postError(n);
        }
      }
      async performRetry(e) {
        switch (e.type) {
          case re.Push:
            return this.push(e.repository);
          case re.Pull:
            return this.pull(e.repository);
          case re.Fetch:
            return this.fetch(e.repository, $i.UserInitiatedTask);
          case re.Clone:
            await this.clone(e.url, e.path, e.options);
            break;
          case re.Checkout:
            await this.checkoutBranch(e.repository, e.branch);
            break;
          case re.Merge:
            return this.mergeBranch(e.repository, e.theirBranch, null);
          case re.Rebase:
            return this.rebase(e.repository, e.baseBranch, e.targetBranch);
          default:
            return X(0, "Unknown retry action: " + e);
        }
      }
      changeImageDiffType(e) {
        return this.appStore._changeImageDiffType(e);
      }
      onHideWhitespaceInDiffChanged(e, t, n = null) {
        return this.appStore._setHideWhitespaceInDiff(e, t, n);
      }
      onShowSideBySideDiffChanged(e) {
        return this.appStore._setShowSideBySideDiff(e);
      }
      installGlobalLFSFilters(e) {
        return this.appStore._installGlobalLFSFilters(e);
      }
      installLFSHooks(e) {
        return this.appStore._installLFSHooks(e);
      }
      changeCloneRepositoriesTab(e) {
        return this.appStore._changeCloneRepositoriesTab(e);
      }
      refreshApiRepositories(e) {
        return this.appStore._refreshApiRepositories(e);
      }
      changeBranchesTab(e) {
        return this.appStore._changeBranchesTab(e);
      }
      showGitHubExplore(e) {
        return this.appStore._showGitHubExplore(e);
      }
      createPullRequest(e) {
        return this.appStore._createPullRequest(e);
      }
      showPullRequest(e) {
        return this.appStore._showPullRequest(e);
      }
      openCreatePullRequestInBrowser(e, t) {
        return this.appStore._openCreatePullRequestInBrowser(e, t);
      }
      updateExistingUpstreamRemote(e) {
        return this.appStore._updateExistingUpstreamRemote(e);
      }
      ignoreExistingUpstreamRemote(e) {
        return this.appStore._ignoreExistingUpstreamRemote(e);
      }
      async checkoutPullRequest(e, t) {
        if (null !== t.head.gitHubRepository.cloneURL)
          return this.appStore._checkoutPullRequest(
            e,
            t.pullRequestNumber,
            t.author,
            t.head.gitHubRepository.cloneURL,
            t.head.ref
          );
      }
      setShowCoAuthoredBy(e, t) {
        return this.appStore._setShowCoAuthoredBy(e, t);
      }
      setCoAuthors(e, t) {
        return this.appStore._setCoAuthors(e, t);
      }
      initializeCompare(e, t) {
        return this.appStore._initializeCompare(e, t);
      }
      executeCompare(e, t) {
        return this.appStore._executeCompare(e, t);
      }
      updateCompareForm(e, t) {
        return this.appStore._updateCompareForm(e, t);
      }
      updateManualConflictResolution(e, t, n) {
        return this.appStore._updateManualConflictResolution(e, t, n);
      }
      async confirmOrForcePush(e) {
        const { askForConfirmationOnForcePush: t } = this.appStore.getState(),
          { branchesState: n } = this.repositoryStateManager.get(e),
          { tip: r } = n;
        if (r.kind !== so.Valid)
          return void log.warn("Could not find a branch to perform force push");
        const { upstream: i } = r.branch;
        null !== i
          ? t
            ? this.showPopup({
                type: ao.ConfirmForcePush,
                repository: e,
                upstreamBranch: i,
              })
            : await this.performForcePush(e)
          : log.warn("Could not find an upstream branch which will be pushed");
      }
      async performForcePush(e) {
        await this.pushWithOptions(e, { forceWithLease: !0 }),
          await this.appStore._loadStatus(e);
      }
      setConfirmForcePushSetting(e) {
        return this.appStore._setConfirmForcePushSetting(e);
      }
      async convertRepositoryToFork(e, t) {
        return this.appStore._convertRepositoryToFork(e, t);
      }
      mergeConflictDetectedFromPull() {
        return this.statsStore.recordMergeConflictFromPull();
      }
      mergeConflictDetectedFromExplicitMerge() {
        return this.statsStore.recordMergeConflictFromExplicitMerge();
      }
      recordMenuInitiatedMerge() {
        return this.statsStore.recordMenuInitiatedMerge();
      }
      recordMenuInitiatedRebase() {
        return this.statsStore.recordMenuInitiatedRebase();
      }
      recordMenuInitiatedUpdate() {
        return this.statsStore.recordMenuInitiatedUpdate();
      }
      recordCompareInitiatedMerge() {
        return this.statsStore.recordCompareInitiatedMerge();
      }
      setSelectedTheme(e) {
        return this.appStore._setSelectedTheme(e);
      }
      onAutomaticallySwitchThemeChanged(e) {
        return this.appStore._setAutomaticallySwitchTheme(e);
      }
      recordRepoClicked(e) {
        return this.statsStore.recordRepoClicked(e);
      }
      recordCreatePullRequest() {
        return this.statsStore.recordCreatePullRequest();
      }
      recordWelcomeWizardInitiated() {
        return this.statsStore.recordWelcomeWizardInitiated();
      }
      recordCreateRepository() {
        this.statsStore.recordCreateRepository();
      }
      recordAddExistingRepository() {
        this.statsStore.recordAddExistingRepository();
      }
      recordMergeConflictsDialogDismissal() {
        this.statsStore.recordMergeConflictsDialogDismissal();
      }
      recordMergeConflictsDialogReopened() {
        this.statsStore.recordMergeConflictsDialogReopened();
      }
      recordAnyConflictsLeftOnMergeConflictsDialogDismissal() {
        this.statsStore.recordAnyConflictsLeftOnMergeConflictsDialogDismissal();
      }
      recordGuidedConflictedMergeCompletion() {
        this.statsStore.recordGuidedConflictedMergeCompletion();
      }
      recordUnguidedConflictedMergeCompletion() {
        this.statsStore.recordUnguidedConflictedMergeCompletion();
      }
      recordRebaseConflictsDialogDismissal() {
        this.statsStore.recordRebaseConflictsDialogDismissal();
      }
      recordRebaseConflictsDialogReopened() {
        this.statsStore.recordRebaseConflictsDialogReopened();
      }
      recordErrorWhenSwitchingBranchesWithUncommmittedChanges() {
        return this.statsStore.recordErrorWhenSwitchingBranchesWithUncommmittedChanges();
      }
      refreshPullRequests(e) {
        return this.appStore._refreshPullRequests(e);
      }
      tryGetCommitStatus(e, t) {
        return this.commitStatusStore.tryGetStatus(e, t);
      }
      subscribeToCommitStatus(e, t, n) {
        return this.commitStatusStore.subscribe(e, t, n);
      }
      createStashForCurrentBranch(e, t = !0) {
        return this.appStore._createStashForCurrentBranch(e, t);
      }
      dropStash(e, t) {
        return this.appStore._dropStashEntry(e, t);
      }
      popStash(e, t) {
        return this.appStore._popStashEntry(e, t);
      }
      hideStashedChanges(e) {
        return this.appStore._hideStashedChanges(e);
      }
      recordSuggestedStepOpenInExternalEditor() {
        return this.statsStore.recordSuggestedStepOpenInExternalEditor();
      }
      recordSuggestedStepOpenWorkingDirectory() {
        return this.statsStore.recordSuggestedStepOpenWorkingDirectory();
      }
      recordSuggestedStepViewOnGitHub() {
        return this.statsStore.recordSuggestedStepViewOnGitHub();
      }
      recordSuggestedStepPublishRepository() {
        return this.statsStore.recordSuggestedStepPublishRepository();
      }
      recordSuggestedStepPublishBranch() {
        return this.statsStore.recordSuggestedStepPublishBranch();
      }
      recordSuggestedStepCreatePullRequest() {
        return this.statsStore.recordSuggestedStepCreatePullRequest();
      }
      recordSuggestedStepViewStash() {
        return this.statsStore.recordSuggestedStepViewStash();
      }
      recordNoActionTakenOnStash() {
        return this.statsStore.recordNoActionTakenOnStash();
      }
      recordStashView() {
        return this.statsStore.recordStashView();
      }
      skipPickEditorTutorialStep(e) {
        return this.appStore._skipPickEditorTutorialStep(e);
      }
      markPullRequestTutorialStepAsComplete(e) {
        return this.appStore._markPullRequestTutorialStepAsComplete(e);
      }
      recordForkCreated() {
        return this.statsStore.recordForkCreated();
      }
      createTutorialRepository(e) {
        return this.appStore._createTutorialRepository(e);
      }
      async openIssueCreationPage(e) {
        const t = po(e);
        return (
          null !== t &&
          (this.statsStore.recordIssueCreationWebpageOpened(),
          this.appStore._openInBrowser(t + "/issues/new/choose"))
        );
      }
      setRepositoryIndicatorsEnabled(e) {
        this.appStore._setRepositoryIndicatorsEnabled(e);
      }
      recordDiffOptionsViewed() {
        return this.statsStore.recordDiffOptionsViewed();
      }
    })(bS, yS, hS, wS);
    SS.registerErrorHandler(async function (e, t) {
      const n = Gb(e) || e;
      return await t.presentError(n), null;
    }),
      SS.registerErrorHandler(async function (e, t) {
        return e instanceof Nc
          ? (t.showPopup({
              type: ao.UpstreamAlreadyExists,
              repository: e.repository,
              existingRemote: e.existingRemote,
            }),
            null)
          : e;
      }),
      SS.registerErrorHandler(async function (e, t) {
        const n = (function (e) {
          return e instanceof Io ? e : null;
        })(e);
        if (!n) return e;
        const { suggestAtom: r, openPreferences: i } = n.metadata;
        return (
          await t.showPopup({
            type: ao.ExternalEditorFailed,
            message: n.message,
            suggestAtom: r,
            openPreferences: i,
          }),
          null
        );
      }),
      SS.registerErrorHandler(async function (e, t) {
        return e instanceof hc
          ? (await t.showPopup({
              type: ao.OpenShellFailed,
              message: e.message,
            }),
            null)
          : e;
      }),
      SS.registerErrorHandler(async function (e, t) {
        const n = Gb(e);
        if (!n) return e;
        const r = $b(n.underlyingError);
        if (!r) return e;
        const i = r.result.gitError;
        if (!i) return e;
        if (i !== Bo.GitError.MergeConflicts) return e;
        const { repository: o, gitContext: s } = n.metadata;
        if (null == o) return e;
        if (!(o instanceof lo)) return e;
        if (null == s) return e;
        if ("merge" !== s.kind && "pull" !== s.kind) return e;
        switch (s.kind) {
          case "pull":
            t.mergeConflictDetectedFromPull();
            break;
          case "merge":
            t.mergeConflictDetectedFromExplicitMerge();
        }
        const { currentBranch: a, theirBranch: l } = s;
        return (
          t.showPopup({
            type: ao.MergeConflicts,
            repository: o,
            ourBranch: a,
            theirBranch: l,
          }),
          null
        );
      }),
      SS.registerErrorHandler(async function (e, t) {
        const n = $b(e);
        if (!n) return e;
        const r = n.result.gitError;
        return r
          ? r !== Bo.GitError.LFSAttributeDoesNotMatch
            ? e
            : (t.showPopup({ type: ao.LFSAttributeMismatch }), null)
          : e;
      }),
      SS.registerErrorHandler(async function (e, t) {
        const n = Gb(e);
        if (!n) return e;
        const r = $b(n.underlyingError);
        if (!r || null === r.result.gitError) return e;
        if (!qo(r.result.gitError)) return e;
        const { repository: i, retryAction: o } = n.metadata;
        return i instanceof lo && co(i)
          ? void 0 === o || o.type !== re.Push || to(i.gitHubRepository)
            ? e
            : (t.showCreateForkDialog(i), null)
          : e;
      }),
      SS.registerErrorHandler(async function (e, t) {
        const n = Gb(e);
        if (!n) return e;
        const r = $b(n.underlyingError);
        if (!r) return e;
        const i = r.result.gitError;
        if (!i) return e;
        if (!Gs.has(i)) return e;
        const o = n.metadata.repository;
        if (!o) return e;
        if (o instanceof lo && o.gitHubRepository) return e;
        const s = n.metadata.retryAction;
        return s
          ? (await t.promptForGenericGitAuthentication(o, s), null)
          : (log.error(
              "No retry action provided for a git authentication error.",
              n
            ),
            e);
      }),
      SS.registerErrorHandler(async function (e, t) {
        const n = Gb(e);
        if (!n) return e;
        const r = $b(n.underlyingError);
        if (!r) return e;
        const i = r.result.gitError;
        if (!i) return e;
        if (i !== Bo.GitError.PushNotFastForward) return e;
        const o = n.metadata.repository;
        return o && o instanceof lo
          ? (t.showPopup({ type: ao.PushNeedsPull, repository: o }), null)
          : e;
      }),
      SS.registerErrorHandler(async function (e, t) {
        const n = Gb(e);
        if (!n) return e;
        const r = $b(n.underlyingError);
        if (!r || null === r.result.gitError) return e;
        if (!qo(r.result.gitError)) return e;
        const { repository: i } = n.metadata;
        if (!(i instanceof lo)) return e;
        if (null === i.gitHubRepository) return e;
        const o = r.result.stderr
            .split(/\r?\n/)
            .filter((e) => e.startsWith("remote: "))
            .map((e) => e.substr("remote: ".length))
            .join("\n"),
          s = Kb.exec(o);
        if (!s) return e;
        const a = s[1],
          l = i.gitHubRepository.endpoint;
        return (
          t.showPopup({
            type: ao.SAMLReauthRequired,
            organizationName: a,
            endpoint: l,
            retryAction: n.metadata.retryAction,
          }),
          null
        );
      }),
      SS.registerErrorHandler(async function (e, t) {
        const n = Gb(e);
        return n && n.metadata.backgroundTask ? null : e;
      }),
      SS.registerErrorHandler(async function (e, t) {
        const n = Gb(e);
        if (!n) return e;
        const r = n.metadata.repository;
        if (!(r && r instanceof lo)) return e;
        if (r.missing) return null;
        const i = Vb(n.underlyingError),
          o = $b(n.underlyingError);
        return (o && o.result.gitError === Bo.GitError.NotAGitRepository) ||
          (i && i.code === Bo.RepositoryDoesNotExistErrorCode)
          ? (await t.updateRepositoryMissing(r, !0), null)
          : e;
      }),
      SS.registerErrorHandler(async function (e, t) {
        var n;
        const r = Gb(e);
        if (null === r) return e;
        const i = $b(r.underlyingError);
        if (null === i) return e;
        const o = i.result.gitError;
        if (
          o !== Bo.GitError.LocalChangesOverwritten &&
          o !== Bo.GitError.MergeWithLocalChanges &&
          o !== Bo.GitError.RebaseWithLocalChanges
        )
          return e;
        const { repository: s, retryAction: a } = r.metadata;
        if (!(s instanceof lo)) return e;
        if (void 0 === a) return e;
        "checkout" ===
          (null === (n = r.metadata.gitContext) || void 0 === n
            ? void 0
            : n.kind) &&
          t.recordErrorWhenSwitchingBranchesWithUncommmittedChanges();
        const l = (function (e) {
          const t = new Array(),
            n = e.split("\n");
          let r = !1;
          for (const e of n)
            if (r) {
              if (!e.startsWith("\t")) break;
              t.push(e.trimLeft());
            } else
              e.startsWith("error:") &&
                e.includes("files would be overwritten") &&
                e.endsWith(":") &&
                (r = !0);
          return t;
        })(i.result.stderr);
        return (
          t.showPopup({
            type: ao.LocalChangesOverwritten,
            repository: s,
            retryAction: a,
            files: l,
          }),
          null
        );
      }),
      SS.registerErrorHandler(async function (e, t) {
        const n = Gb(e);
        if (!n) return e;
        const r = $b(n.underlyingError);
        if (!r) return e;
        const i = r.result.gitError;
        if (!i) return e;
        if (i !== Bo.GitError.RebaseConflicts) return e;
        const { repository: o, gitContext: s } = n.metadata;
        if (null == o) return e;
        if (!(o instanceof lo)) return e;
        if (null == s) return e;
        if ("merge" !== s.kind && "pull" !== s.kind) return e;
        const { currentBranch: a } = s;
        return t.launchRebaseFlow(o, a), null;
      }),
      SS.registerErrorHandler(async function (e, t) {
        const n = Gb(e);
        if (!n) return e;
        if (!$b(n.underlyingError)) return e;
        const { repository: r } = n.metadata;
        if (!(r instanceof lo)) return e;
        if (null === r.gitHubRepository) return e;
        if (r.gitHubRepository.endpoint !== gt()) return e;
        const i = qb.exec(e.message);
        return i
          ? (t.showPopup({
              type: ao.PushRejectedDueToMissingWorkflowScope,
              rejectedPath: i[1],
              repository: r,
            }),
            null)
          : e;
      }),
      document.body.classList.add("platform-win32"),
      SS.setAppFocusState(r.remote.getCurrentWindow().isFocused()),
      r.ipcRenderer.on("focus", () => {
        const { selectedState: e } = bS.getState();
        e &&
          e.type !== W.CloningRepository &&
          SS.refreshRepository(e.repository),
          SS.setAppFocusState(!0);
      }),
      r.ipcRenderer.on("blur", () => {
        SS.setAccessKeyHighlightState(!1), SS.setAppFocusState(!1);
      }),
      r.ipcRenderer.on("url-action", (e, { action: t }) => {
        SS.dispatchURLAction(t);
      }),
      S.render(
        w.createElement(Ub, {
          dispatcher: SS,
          appStore: bS,
          repositoryStateManager: yS,
          issuesStore: uS,
          gitHubUserStore: lS,
          startTime: oS,
        }),
        document.getElementById("desktop-app-container")
      );
  },
  function (e, t, n) {
    "use strict";
    n.r(t),
      n.d(t, "createFocusTrap", function () {
        return y;
      });
    /*!
     * tabbable 5.1.0
     * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
     */
    let r = [
        "input",
        "select",
        "textarea",
        "a[href]",
        "button",
        "[tabindex]",
        "audio[controls]",
        "video[controls]",
        '[contenteditable]:not([contenteditable="false"])',
        "details>summary",
      ],
      i = r.join(","),
      o =
        "undefined" == typeof Element
          ? function () {}
          : Element.prototype.matches ||
            Element.prototype.msMatchesSelector ||
            Element.prototype.webkitMatchesSelector;
    function s(e, t, n) {
      let r = Array.prototype.slice.apply(e.querySelectorAll(i));
      return t && o.call(e, i) && r.unshift(e), (r = r.filter(n)), r;
    }
    function a(e) {
      return !(
        !l(e) ||
        (function (e) {
          return (
            (function (e) {
              return p(e) && "radio" === e.type;
            })(e) &&
            !(function (e) {
              if (!e.name) return !0;
              let t = (function (e, t) {
                for (let n = 0; n < e.length; n++)
                  if (e[n].checked && e[n].form === t) return e[n];
              })(
                (e.form || e.ownerDocument).querySelectorAll(
                  'input[type="radio"][name="' + e.name + '"]'
                ),
                e.form
              );
              return !t || t === e;
            })(e)
          );
        })(e) ||
        h(e) < 0
      );
    }
    function l(e) {
      return !(
        e.disabled ||
        (function (e) {
          return p(e) && "hidden" === e.type;
        })(e) ||
        (function (e) {
          if ("hidden" === getComputedStyle(e).visibility) return !0;
          for (; e; ) {
            if ("none" === getComputedStyle(e).display) return !0;
            e = e.parentElement;
          }
          return !1;
        })(
          /*!
           * focus-trap 6.1.0
           * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
           */ e
        )
      );
    }
    let c = r.concat("iframe").join(",");
    function u(e) {
      if (!e) throw new Error("No node provided");
      return !1 !== o.call(e, c) && l(e);
    }
    function h(e) {
      let t = parseInt(e.getAttribute("tabindex"), 10);
      return isNaN(t)
        ? (function (e) {
            return "true" === e.contentEditable;
          })(e)
          ? 0
          : ("AUDIO" !== e.nodeName && "VIDEO" !== e.nodeName) ||
            null !== e.getAttribute("tabindex")
          ? e.tabIndex
          : 0
        : t;
    }
    function d(e, t) {
      return e.tabIndex === t.tabIndex
        ? e.documentOrder - t.documentOrder
        : e.tabIndex - t.tabIndex;
    }
    function p(e) {
      return "INPUT" === e.tagName;
    }
    var f,
      m,
      g =
        ((m = []),
        {
          activateTrap: function (e) {
            if (m.length > 0) {
              var t = m[m.length - 1];
              t !== e && t.pause();
            }
            var n = m.indexOf(e);
            -1 === n || m.splice(n, 1), m.push(e);
          },
          deactivateTrap: function (e) {
            var t = m.indexOf(e);
            -1 !== t && m.splice(t, 1),
              m.length > 0 && m[m.length - 1].unpause();
          },
        });
    function y(e, t) {
      var n = document,
        r = "string" == typeof e ? n.querySelector(e) : e,
        i = {
          returnFocusOnDeactivate: !0,
          escapeDeactivates: !0,
          delayInitialFocus: !0,
          ...t,
        },
        o = {
          firstTabbableNode: null,
          lastTabbableNode: null,
          nodeFocusedBeforeActivation: null,
          mostRecentlyFocusedNode: null,
          active: !1,
          paused: !1,
        },
        l = {
          activate: function (e) {
            if (o.active) return;
            k(),
              (o.active = !0),
              (o.paused = !1),
              (o.nodeFocusedBeforeActivation = n.activeElement);
            var t = e && e.onActivate ? e.onActivate : i.onActivate;
            t && t();
            return p(), l;
          },
          deactivate: c,
          pause: function () {
            if (o.paused || !o.active) return;
            (o.paused = !0), m();
          },
          unpause: function () {
            if (!o.paused || !o.active) return;
            (o.paused = !1), k(), p();
          },
        };
      return l;
      function c(e) {
        if (o.active) {
          clearTimeout(f),
            m(),
            (o.active = !1),
            (o.paused = !1),
            g.deactivateTrap(l);
          var t =
            e && void 0 !== e.onDeactivate ? e.onDeactivate : i.onDeactivate;
          return (
            t && t(),
            (e && void 0 !== e.returnFocus
              ? e.returnFocus
              : i.returnFocusOnDeactivate) &&
              v(function () {
                var e;
                x(
                  ((e = o.nodeFocusedBeforeActivation),
                  y("setReturnFocus") || e)
                );
              }),
            l
          );
        }
      }
      function p() {
        if (o.active)
          return (
            g.activateTrap(l),
            (f = i.delayInitialFocus
              ? v(function () {
                  x(w());
                })
              : x(w())),
            n.addEventListener("focusin", S, !0),
            n.addEventListener("mousedown", b, { capture: !0, passive: !1 }),
            n.addEventListener("touchstart", b, { capture: !0, passive: !1 }),
            n.addEventListener("click", E, { capture: !0, passive: !1 }),
            n.addEventListener("keydown", C, { capture: !0, passive: !1 }),
            l
          );
      }
      function m() {
        if (o.active)
          return (
            n.removeEventListener("focusin", S, !0),
            n.removeEventListener("mousedown", b, !0),
            n.removeEventListener("touchstart", b, !0),
            n.removeEventListener("click", E, !0),
            n.removeEventListener("keydown", C, !0),
            l
          );
      }
      function y(e) {
        var t = i[e],
          r = t;
        if (!t) return null;
        if ("string" == typeof t && !(r = n.querySelector(t)))
          throw new Error("`" + e + "` refers to no known node");
        if ("function" == typeof t && !(r = t()))
          throw new Error("`" + e + "` did not return a node");
        return r;
      }
      function w() {
        var e;
        if (
          !(e =
            null !== y("initialFocus")
              ? y("initialFocus")
              : r.contains(n.activeElement)
              ? n.activeElement
              : o.firstTabbableNode || y("fallbackFocus"))
        )
          throw new Error(
            "Your focus-trap needs to have at least one focusable element"
          );
        return e;
      }
      function b(e) {
        r.contains(e.target) ||
          (i.clickOutsideDeactivates
            ? c({ returnFocus: !u(e.target) })
            : (i.allowOutsideClick &&
                ("boolean" == typeof i.allowOutsideClick
                  ? i.allowOutsideClick
                  : i.allowOutsideClick(e))) ||
              e.preventDefault());
      }
      function S(e) {
        r.contains(e.target) ||
          e.target instanceof Document ||
          (e.stopImmediatePropagation(), x(o.mostRecentlyFocusedNode || w()));
      }
      function C(e) {
        if (
          !1 !== i.escapeDeactivates &&
          (function (e) {
            return "Escape" === e.key || "Esc" === e.key || 27 === e.keyCode;
          })(e)
        )
          return e.preventDefault(), void c();
        (function (e) {
          return "Tab" === e.key || 9 === e.keyCode;
        })(e) &&
          (function (e) {
            if ((k(), e.shiftKey && e.target === o.firstTabbableNode))
              return e.preventDefault(), void x(o.lastTabbableNode);
            if (!e.shiftKey && e.target === o.lastTabbableNode)
              e.preventDefault(), x(o.firstTabbableNode);
          })(e);
      }
      function E(e) {
        i.clickOutsideDeactivates ||
          r.contains(e.target) ||
          (i.allowOutsideClick &&
            ("boolean" == typeof i.allowOutsideClick
              ? i.allowOutsideClick
              : i.allowOutsideClick(e))) ||
          (e.preventDefault(), e.stopImmediatePropagation());
      }
      function k() {
        var e = (function (e, t) {
          let n = [],
            r = [];
          return (
            s(e, (t = t || {}).includeContainer, a).forEach(function (e, t) {
              let i = h(e);
              0 === i
                ? n.push(e)
                : r.push({ documentOrder: t, tabIndex: i, node: e });88
            }),
            r
              .sort(d)
              .map((e) => e.node)
              .concat(n)
          );
        })(r);
        (o.firstTabbableNode = e[0] || w()),
          (o.lastTabbableNode = e[e.length - 1] || w());
      }
      function x(e) {
        e !== n.activeElement &&
          (e && e.focus
            ? (e.focus({ preventScroll: !!i.preventScroll }),
              (o.mostRecentlyFocusedNode = e),
              (function (e) {
                return (
                  e.tagName &&
                  "input" === e.tagName.toLowerCase() &&
                  "function" == typeof e.select
                );
              })(e) && e.select())
            : x(w()));
      }
    }
    function v(e) {
      return setTimeout(e, 0);
    }
  },
]);
//# sourceMappingURL=renderer.js.map
