var w = function(n, u) {
  return w = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, o) {
    e.__proto__ = o;
  } || function(e, o) {
    for (var i in o) Object.prototype.hasOwnProperty.call(o, i) && (e[i] = o[i]);
  }, w(n, u);
};
function S(n, u) {
  if (typeof u != "function" && u !== null)
    throw new TypeError("Class extends value " + String(u) + " is not a constructor or null");
  w(n, u);
  function e() {
    this.constructor = n;
  }
  n.prototype = u === null ? Object.create(u) : (e.prototype = u.prototype, new e());
}
function x(n, u, e, o) {
  function i(t) {
    return t instanceof e ? t : new e(function(c) {
      c(t);
    });
  }
  return new (e || (e = Promise))(function(t, c) {
    function f(l) {
      try {
        r(o.next(l));
      } catch (h) {
        c(h);
      }
    }
    function s(l) {
      try {
        r(o.throw(l));
      } catch (h) {
        c(h);
      }
    }
    function r(l) {
      l.done ? t(l.value) : i(l.value).then(f, s);
    }
    r((o = o.apply(n, u || [])).next());
  });
}
function I(n, u) {
  var e = { label: 0, sent: function() {
    if (t[0] & 1) throw t[1];
    return t[1];
  }, trys: [], ops: [] }, o, i, t, c = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
  return c.next = f(0), c.throw = f(1), c.return = f(2), typeof Symbol == "function" && (c[Symbol.iterator] = function() {
    return this;
  }), c;
  function f(r) {
    return function(l) {
      return s([r, l]);
    };
  }
  function s(r) {
    if (o) throw new TypeError("Generator is already executing.");
    for (; c && (c = 0, r[0] && (e = 0)), e; ) try {
      if (o = 1, i && (t = r[0] & 2 ? i.return : r[0] ? i.throw || ((t = i.return) && t.call(i), 0) : i.next) && !(t = t.call(i, r[1])).done) return t;
      switch (i = 0, t && (r = [r[0] & 2, t.value]), r[0]) {
        case 0:
        case 1:
          t = r;
          break;
        case 4:
          return e.label++, { value: r[1], done: !1 };
        case 5:
          e.label++, i = r[1], r = [0];
          continue;
        case 7:
          r = e.ops.pop(), e.trys.pop();
          continue;
        default:
          if (t = e.trys, !(t = t.length > 0 && t[t.length - 1]) && (r[0] === 6 || r[0] === 2)) {
            e = 0;
            continue;
          }
          if (r[0] === 3 && (!t || r[1] > t[0] && r[1] < t[3])) {
            e.label = r[1];
            break;
          }
          if (r[0] === 6 && e.label < t[1]) {
            e.label = t[1], t = r;
            break;
          }
          if (t && e.label < t[2]) {
            e.label = t[2], e.ops.push(r);
            break;
          }
          t[2] && e.ops.pop(), e.trys.pop();
          continue;
      }
      r = u.call(n, e);
    } catch (l) {
      r = [6, l], i = 0;
    } finally {
      o = t = 0;
    }
    if (r[0] & 5) throw r[1];
    return { value: r[0] ? r[1] : void 0, done: !0 };
  }
}
function _(n) {
  var u = typeof Symbol == "function" && Symbol.iterator, e = u && n[u], o = 0;
  if (e) return e.call(n);
  if (n && typeof n.length == "number") return {
    next: function() {
      return n && o >= n.length && (n = void 0), { value: n && n[o++], done: !n };
    }
  };
  throw new TypeError(u ? "Object is not iterable." : "Symbol.iterator is not defined.");
}
function g(n, u) {
  var e = typeof Symbol == "function" && n[Symbol.iterator];
  if (!e) return n;
  var o = e.call(n), i, t = [], c;
  try {
    for (; (u === void 0 || u-- > 0) && !(i = o.next()).done; ) t.push(i.value);
  } catch (f) {
    c = { error: f };
  } finally {
    try {
      i && !i.done && (e = o.return) && e.call(o);
    } finally {
      if (c) throw c.error;
    }
  }
  return t;
}
function O(n, u, e) {
  if (e || arguments.length === 2) for (var o = 0, i = u.length, t; o < i; o++)
    (t || !(o in u)) && (t || (t = Array.prototype.slice.call(u, 0, o)), t[o] = u[o]);
  return n.concat(t || Array.prototype.slice.call(u));
}
function b(n) {
  return this instanceof b ? (this.v = n, this) : new b(n);
}
function j(n, u, e) {
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
  var o = e.apply(n, u || []), i, t = [];
  return i = Object.create((typeof AsyncIterator == "function" ? AsyncIterator : Object).prototype), f("next"), f("throw"), f("return", c), i[Symbol.asyncIterator] = function() {
    return this;
  }, i;
  function c(a) {
    return function(y) {
      return Promise.resolve(y).then(a, h);
    };
  }
  function f(a, y) {
    o[a] && (i[a] = function(p) {
      return new Promise(function(v, m) {
        t.push([a, p, v, m]) > 1 || s(a, p);
      });
    }, y && (i[a] = y(i[a])));
  }
  function s(a, y) {
    try {
      r(o[a](y));
    } catch (p) {
      d(t[0][3], p);
    }
  }
  function r(a) {
    a.value instanceof b ? Promise.resolve(a.value.v).then(l, h) : d(t[0][2], a);
  }
  function l(a) {
    s("next", a);
  }
  function h(a) {
    s("throw", a);
  }
  function d(a, y) {
    a(y), t.shift(), t.length && s(t[0][0], t[0][1]);
  }
}
function E(n) {
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
  var u = n[Symbol.asyncIterator], e;
  return u ? u.call(n) : (n = typeof _ == "function" ? _(n) : n[Symbol.iterator](), e = {}, o("next"), o("throw"), o("return"), e[Symbol.asyncIterator] = function() {
    return this;
  }, e);
  function o(t) {
    e[t] = n[t] && function(c) {
      return new Promise(function(f, s) {
        c = n[t](c), i(f, s, c.done, c.value);
      });
    };
  }
  function i(t, c, f, s) {
    Promise.resolve(s).then(function(r) {
      t({ value: r, done: f });
    }, c);
  }
}
export {
  j as __asyncGenerator,
  E as __asyncValues,
  b as __await,
  x as __awaiter,
  S as __extends,
  I as __generator,
  g as __read,
  O as __spreadArray,
  _ as __values
};
