@stytch/vanilla-js 3.0.1 → 3.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,7 +3,7 @@
3
3
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
4
4
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
5
5
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
6
- function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
6
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
7
7
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
8
8
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
9
9
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -18,22 +18,22 @@ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) ===
18
18
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
19
19
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
20
20
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
21
- function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
21
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
22
22
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
23
23
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
24
24
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
25
25
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
26
26
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
27
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
27
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
28
28
  function e(e, t) {
29
29
  var _n = "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
30
30
  if (!_n) {
31
31
  if (Array.isArray(e) || (_n = r(e)) || t && e && "number" == typeof e.length) {
32
32
  _n && (e = _n);
33
33
  var i = 0,
34
- o = function o() {};
34
+ s = function s() {};
35
35
  return {
36
- s: o,
36
+ s: s,
37
37
  n: function n() {
38
38
  return i >= e.length ? {
39
39
  done: !0
@@ -45,12 +45,12 @@ function e(e, t) {
45
45
  e: function e(_e2) {
46
46
  throw _e2;
47
47
  },
48
- f: o
48
+ f: s
49
49
  };
50
50
  }
51
51
  throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
52
52
  }
53
- var s,
53
+ var o,
54
54
  a = !0,
55
55
  c = !1;
56
56
  return {
@@ -62,13 +62,13 @@ function e(e, t) {
62
62
  return a = e.done, e;
63
63
  },
64
64
  e: function e(_e3) {
65
- c = !0, s = _e3;
65
+ c = !0, o = _e3;
66
66
  },
67
67
  f: function f() {
68
68
  try {
69
69
  a || null == _n["return"] || _n["return"]();
70
70
  } finally {
71
- if (c) throw s;
71
+ if (c) throw o;
72
72
  }
73
73
  }
74
74
  };
@@ -81,21 +81,21 @@ function t(e, t) {
81
81
  if (null != r) {
82
82
  var n,
83
83
  i,
84
- o,
85
84
  s,
85
+ o,
86
86
  a = [],
87
87
  c = !0,
88
88
  u = !1;
89
89
  try {
90
- if (o = (r = r.call(e)).next, 0 === t) {
90
+ if (s = (r = r.call(e)).next, 0 === t) {
91
91
  if (Object(r) !== r) return;
92
92
  c = !1;
93
- } else for (; !(c = (n = o.call(r)).done) && (a.push(n.value), a.length !== t); c = !0);
93
+ } else for (; !(c = (n = s.call(r)).done) && (a.push(n.value), a.length !== t); c = !0);
94
94
  } catch (e) {
95
95
  u = !0, i = e;
96
96
  } finally {
97
97
  try {
98
- if (!c && null != r["return"] && (s = r["return"](), Object(s) !== s)) return;
98
+ if (!c && null != r["return"] && (o = r["return"](), Object(o) !== o)) return;
99
99
  } finally {
100
100
  if (u) throw i;
101
101
  }
@@ -125,22 +125,23 @@ function i(e) {
125
125
  return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : _typeof(e);
126
126
  }, i(e);
127
127
  }
128
- function o() {
128
+ function s() {
129
129
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
130
- o = function o() {
131
- return e;
130
+ s = function s() {
131
+ return t;
132
132
  };
133
- var e = {},
134
- t = Object.prototype,
135
- r = t.hasOwnProperty,
136
- n = Object.defineProperty || function (e, t, r) {
133
+ var e,
134
+ t = {},
135
+ r = Object.prototype,
136
+ n = r.hasOwnProperty,
137
+ o = Object.defineProperty || function (e, t, r) {
137
138
  e[t] = r.value;
138
139
  },
139
- s = "function" == typeof Symbol ? Symbol : {},
140
- a = s.iterator || "@@iterator",
141
- c = s.asyncIterator || "@@asyncIterator",
142
- u = s.toStringTag || "@@toStringTag";
143
- function l(e, t, r) {
140
+ a = "function" == typeof Symbol ? Symbol : {},
141
+ c = a.iterator || "@@iterator",
142
+ u = a.asyncIterator || "@@asyncIterator",
143
+ l = a.toStringTag || "@@toStringTag";
144
+ function d(e, t, r) {
144
145
  return Object.defineProperty(e, t, {
145
146
  value: r,
146
147
  enumerable: !0,
@@ -149,21 +150,21 @@ function o() {
149
150
  }), e[t];
150
151
  }
151
152
  try {
152
- l({}, "");
153
+ d({}, "");
153
154
  } catch (e) {
154
- l = function l(e, t, r) {
155
+ d = function d(e, t, r) {
155
156
  return e[t] = r;
156
157
  };
157
158
  }
158
- function d(e, t, r, i) {
159
- var o = t && t.prototype instanceof f ? t : f,
160
- s = Object.create(o.prototype),
161
- a = new A(i || []);
162
- return n(s, "_invoke", {
163
- value: S(e, r, a)
159
+ function h(e, t, r, n) {
160
+ var i = t && t.prototype instanceof g ? t : g,
161
+ s = Object.create(i.prototype),
162
+ a = new D(n || []);
163
+ return o(s, "_invoke", {
164
+ value: E(e, r, a)
164
165
  }), s;
165
166
  }
166
- function h(e, t, r) {
167
+ function p(e, t, r) {
167
168
  try {
168
169
  return {
169
170
  type: "normal",
@@ -176,166 +177,165 @@ function o() {
176
177
  };
177
178
  }
178
179
  }
179
- e.wrap = d;
180
- var p = {};
181
- function f() {}
182
- function _() {}
183
- function m() {}
184
- var v = {};
185
- l(v, a, function () {
180
+ t.wrap = h;
181
+ var f = "suspendedStart",
182
+ _ = "suspendedYield",
183
+ m = "executing",
184
+ v = "completed",
185
+ y = {};
186
+ function g() {}
187
+ function b() {}
188
+ function k() {}
189
+ var w = {};
190
+ d(w, c, function () {
186
191
  return this;
187
192
  });
188
- var y = Object.getPrototypeOf,
189
- g = y && y(y(E([])));
190
- g && g !== t && r.call(g, a) && (v = g);
191
- var b = m.prototype = f.prototype = Object.create(v);
192
- function k(e) {
193
+ var S = Object.getPrototypeOf,
194
+ T = S && S(S(B([])));
195
+ T && T !== r && n.call(T, c) && (w = T);
196
+ var C = k.prototype = g.prototype = Object.create(w);
197
+ function O(e) {
193
198
  ["next", "throw", "return"].forEach(function (t) {
194
- l(e, t, function (e) {
199
+ d(e, t, function (e) {
195
200
  return this._invoke(t, e);
196
201
  });
197
202
  });
198
203
  }
199
- function w(e, t) {
200
- function o(n, s, a, c) {
201
- var u = h(e[n], e, s);
204
+ function A(e, t) {
205
+ function r(s, o, a, c) {
206
+ var u = p(e[s], e, o);
202
207
  if ("throw" !== u.type) {
203
208
  var l = u.arg,
204
209
  d = l.value;
205
- return d && "object" == i(d) && r.call(d, "__await") ? t.resolve(d.__await).then(function (e) {
206
- o("next", e, a, c);
210
+ return d && "object" == i(d) && n.call(d, "__await") ? t.resolve(d.__await).then(function (e) {
211
+ r("next", e, a, c);
207
212
  }, function (e) {
208
- o("throw", e, a, c);
213
+ r("throw", e, a, c);
209
214
  }) : t.resolve(d).then(function (e) {
210
215
  l.value = e, a(l);
211
216
  }, function (e) {
212
- return o("throw", e, a, c);
217
+ return r("throw", e, a, c);
213
218
  });
214
219
  }
215
220
  c(u.arg);
216
221
  }
217
222
  var s;
218
- n(this, "_invoke", {
219
- value: function value(e, r) {
220
- function n() {
221
- return new t(function (t, n) {
222
- o(e, r, t, n);
223
+ o(this, "_invoke", {
224
+ value: function value(e, n) {
225
+ function i() {
226
+ return new t(function (t, i) {
227
+ r(e, n, t, i);
223
228
  });
224
229
  }
225
- return s = s ? s.then(n, n) : n();
230
+ return s = s ? s.then(i, i) : i();
226
231
  }
227
232
  });
228
233
  }
229
- function S(e, t, r) {
230
- var n = "suspendedStart";
231
- return function (i, o) {
232
- if ("executing" === n) throw new Error("Generator is already running");
233
- if ("completed" === n) {
234
- if ("throw" === i) throw o;
235
- return P();
234
+ function E(t, r, n) {
235
+ var i = f;
236
+ return function (s, o) {
237
+ if (i === m) throw new Error("Generator is already running");
238
+ if (i === v) {
239
+ if ("throw" === s) throw o;
240
+ return {
241
+ value: e,
242
+ done: !0
243
+ };
236
244
  }
237
- for (r.method = i, r.arg = o;;) {
238
- var s = r.delegate;
239
- if (s) {
240
- var a = T(s, r);
241
- if (a) {
242
- if (a === p) continue;
243
- return a;
245
+ for (n.method = s, n.arg = o;;) {
246
+ var a = n.delegate;
247
+ if (a) {
248
+ var c = P(a, n);
249
+ if (c) {
250
+ if (c === y) continue;
251
+ return c;
244
252
  }
245
253
  }
246
- if ("next" === r.method) r.sent = r._sent = r.arg;else if ("throw" === r.method) {
247
- if ("suspendedStart" === n) throw n = "completed", r.arg;
248
- r.dispatchException(r.arg);
249
- } else "return" === r.method && r.abrupt("return", r.arg);
250
- n = "executing";
251
- var c = h(e, t, r);
252
- if ("normal" === c.type) {
253
- if (n = r.done ? "completed" : "suspendedYield", c.arg === p) continue;
254
+ if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
255
+ if (i === f) throw i = v, n.arg;
256
+ n.dispatchException(n.arg);
257
+ } else "return" === n.method && n.abrupt("return", n.arg);
258
+ i = m;
259
+ var u = p(t, r, n);
260
+ if ("normal" === u.type) {
261
+ if (i = n.done ? v : _, u.arg === y) continue;
254
262
  return {
255
- value: c.arg,
256
- done: r.done
263
+ value: u.arg,
264
+ done: n.done
257
265
  };
258
266
  }
259
- "throw" === c.type && (n = "completed", r.method = "throw", r.arg = c.arg);
267
+ "throw" === u.type && (i = v, n.method = "throw", n.arg = u.arg);
260
268
  }
261
269
  };
262
270
  }
263
- function T(e, t) {
264
- var r = t.method,
265
- n = e.iterator[r];
266
- if (void 0 === n) return t.delegate = null, "throw" === r && e.iterator["return"] && (t.method = "return", t.arg = void 0, T(e, t), "throw" === t.method) || "return" !== r && (t.method = "throw", t.arg = new TypeError("The iterator does not provide a '" + r + "' method")), p;
267
- var i = h(n, e.iterator, t.arg);
268
- if ("throw" === i.type) return t.method = "throw", t.arg = i.arg, t.delegate = null, p;
269
- var o = i.arg;
270
- return o ? o.done ? (t[e.resultName] = o.value, t.next = e.nextLoc, "return" !== t.method && (t.method = "next", t.arg = void 0), t.delegate = null, p) : o : (t.method = "throw", t.arg = new TypeError("iterator result is not an object"), t.delegate = null, p);
271
+ function P(t, r) {
272
+ var n = r.method,
273
+ i = t.iterator[n];
274
+ if (i === e) return r.delegate = null, "throw" === n && t.iterator["return"] && (r.method = "return", r.arg = e, P(t, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
275
+ var s = p(i, t.iterator, r.arg);
276
+ if ("throw" === s.type) return r.method = "throw", r.arg = s.arg, r.delegate = null, y;
277
+ var o = s.arg;
278
+ return o ? o.done ? (r[t.resultName] = o.value, r.next = t.nextLoc, "return" !== r.method && (r.method = "next", r.arg = e), r.delegate = null, y) : o : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
271
279
  }
272
- function C(e) {
280
+ function x(e) {
273
281
  var t = {
274
282
  tryLoc: e[0]
275
283
  };
276
284
  1 in e && (t.catchLoc = e[1]), 2 in e && (t.finallyLoc = e[2], t.afterLoc = e[3]), this.tryEntries.push(t);
277
285
  }
278
- function O(e) {
286
+ function R(e) {
279
287
  var t = e.completion || {};
280
288
  t.type = "normal", delete t.arg, e.completion = t;
281
289
  }
282
- function A(e) {
290
+ function D(e) {
283
291
  this.tryEntries = [{
284
292
  tryLoc: "root"
285
- }], e.forEach(C, this), this.reset(!0);
293
+ }], e.forEach(x, this), this.reset(!0);
286
294
  }
287
- function E(e) {
288
- if (e) {
289
- var t = e[a];
290
- if (t) return t.call(e);
291
- if ("function" == typeof e.next) return e;
292
- if (!isNaN(e.length)) {
293
- var n = -1,
294
- i = function t() {
295
- for (; ++n < e.length;) if (r.call(e, n)) return t.value = e[n], t.done = !1, t;
296
- return t.value = void 0, t.done = !0, t;
295
+ function B(t) {
296
+ if (t || "" === t) {
297
+ var r = t[c];
298
+ if (r) return r.call(t);
299
+ if ("function" == typeof t.next) return t;
300
+ if (!isNaN(t.length)) {
301
+ var s = -1,
302
+ o = function r() {
303
+ for (; ++s < t.length;) if (n.call(t, s)) return r.value = t[s], r.done = !1, r;
304
+ return r.value = e, r.done = !0, r;
297
305
  };
298
- return i.next = i;
306
+ return o.next = o;
299
307
  }
300
308
  }
301
- return {
302
- next: P
303
- };
304
- }
305
- function P() {
306
- return {
307
- value: void 0,
308
- done: !0
309
- };
309
+ throw new TypeError(i(t) + " is not iterable");
310
310
  }
311
- return _.prototype = m, n(b, "constructor", {
312
- value: m,
311
+ return b.prototype = k, o(C, "constructor", {
312
+ value: k,
313
313
  configurable: !0
314
- }), n(m, "constructor", {
315
- value: _,
314
+ }), o(k, "constructor", {
315
+ value: b,
316
316
  configurable: !0
317
- }), _.displayName = l(m, u, "GeneratorFunction"), e.isGeneratorFunction = function (e) {
317
+ }), b.displayName = d(k, l, "GeneratorFunction"), t.isGeneratorFunction = function (e) {
318
318
  var t = "function" == typeof e && e.constructor;
319
- return !!t && (t === _ || "GeneratorFunction" === (t.displayName || t.name));
320
- }, e.mark = function (e) {
321
- return Object.setPrototypeOf ? Object.setPrototypeOf(e, m) : (e.__proto__ = m, l(e, u, "GeneratorFunction")), e.prototype = Object.create(b), e;
322
- }, e.awrap = function (e) {
319
+ return !!t && (t === b || "GeneratorFunction" === (t.displayName || t.name));
320
+ }, t.mark = function (e) {
321
+ return Object.setPrototypeOf ? Object.setPrototypeOf(e, k) : (e.__proto__ = k, d(e, l, "GeneratorFunction")), e.prototype = Object.create(C), e;
322
+ }, t.awrap = function (e) {
323
323
  return {
324
324
  __await: e
325
325
  };
326
- }, k(w.prototype), l(w.prototype, c, function () {
326
+ }, O(A.prototype), d(A.prototype, u, function () {
327
327
  return this;
328
- }), e.AsyncIterator = w, e.async = function (t, r, n, i, o) {
329
- void 0 === o && (o = Promise);
330
- var s = new w(d(t, r, n, i), o);
331
- return e.isGeneratorFunction(r) ? s : s.next().then(function (e) {
332
- return e.done ? e.value : s.next();
328
+ }), t.AsyncIterator = A, t.async = function (e, r, n, i, s) {
329
+ void 0 === s && (s = Promise);
330
+ var o = new A(h(e, r, n, i), s);
331
+ return t.isGeneratorFunction(r) ? o : o.next().then(function (e) {
332
+ return e.done ? e.value : o.next();
333
333
  });
334
- }, k(b), l(b, u, "Generator"), l(b, a, function () {
334
+ }, O(C), d(C, l, "Generator"), d(C, c, function () {
335
335
  return this;
336
- }), l(b, "toString", function () {
336
+ }), d(C, "toString", function () {
337
337
  return "[object Generator]";
338
- }), e.keys = function (e) {
338
+ }), t.keys = function (e) {
339
339
  var t = Object(e),
340
340
  r = [];
341
341
  for (var n in t) r.push(n);
@@ -346,10 +346,10 @@ function o() {
346
346
  }
347
347
  return e.done = !0, e;
348
348
  };
349
- }, e.values = E, A.prototype = {
350
- constructor: A,
351
- reset: function reset(e) {
352
- if (this.prev = 0, this.next = 0, this.sent = this._sent = void 0, this.done = !1, this.delegate = null, this.method = "next", this.arg = void 0, this.tryEntries.forEach(O), !e) for (var t in this) "t" === t.charAt(0) && r.call(this, t) && !isNaN(+t.slice(1)) && (this[t] = void 0);
349
+ }, t.values = B, D.prototype = {
350
+ constructor: D,
351
+ reset: function reset(t) {
352
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = e, this.done = !1, this.delegate = null, this.method = "next", this.arg = e, this.tryEntries.forEach(R), !t) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = e);
353
353
  },
354
354
  stop: function stop() {
355
355
  this.done = !0;
@@ -357,51 +357,51 @@ function o() {
357
357
  if ("throw" === e.type) throw e.arg;
358
358
  return this.rval;
359
359
  },
360
- dispatchException: function dispatchException(e) {
361
- if (this.done) throw e;
362
- var t = this;
363
- function n(r, n) {
364
- return s.type = "throw", s.arg = e, t.next = r, n && (t.method = "next", t.arg = void 0), !!n;
360
+ dispatchException: function dispatchException(t) {
361
+ if (this.done) throw t;
362
+ var r = this;
363
+ function i(n, i) {
364
+ return a.type = "throw", a.arg = t, r.next = n, i && (r.method = "next", r.arg = e), !!i;
365
365
  }
366
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
367
- var o = this.tryEntries[i],
368
- s = o.completion;
369
- if ("root" === o.tryLoc) return n("end");
366
+ for (var s = this.tryEntries.length - 1; s >= 0; --s) {
367
+ var o = this.tryEntries[s],
368
+ a = o.completion;
369
+ if ("root" === o.tryLoc) return i("end");
370
370
  if (o.tryLoc <= this.prev) {
371
- var a = r.call(o, "catchLoc"),
372
- c = r.call(o, "finallyLoc");
373
- if (a && c) {
374
- if (this.prev < o.catchLoc) return n(o.catchLoc, !0);
375
- if (this.prev < o.finallyLoc) return n(o.finallyLoc);
376
- } else if (a) {
377
- if (this.prev < o.catchLoc) return n(o.catchLoc, !0);
371
+ var c = n.call(o, "catchLoc"),
372
+ u = n.call(o, "finallyLoc");
373
+ if (c && u) {
374
+ if (this.prev < o.catchLoc) return i(o.catchLoc, !0);
375
+ if (this.prev < o.finallyLoc) return i(o.finallyLoc);
376
+ } else if (c) {
377
+ if (this.prev < o.catchLoc) return i(o.catchLoc, !0);
378
378
  } else {
379
- if (!c) throw new Error("try statement without catch or finally");
380
- if (this.prev < o.finallyLoc) return n(o.finallyLoc);
379
+ if (!u) throw new Error("try statement without catch or finally");
380
+ if (this.prev < o.finallyLoc) return i(o.finallyLoc);
381
381
  }
382
382
  }
383
383
  }
384
384
  },
385
385
  abrupt: function abrupt(e, t) {
386
- for (var n = this.tryEntries.length - 1; n >= 0; --n) {
387
- var i = this.tryEntries[n];
388
- if (i.tryLoc <= this.prev && r.call(i, "finallyLoc") && this.prev < i.finallyLoc) {
389
- var o = i;
386
+ for (var r = this.tryEntries.length - 1; r >= 0; --r) {
387
+ var i = this.tryEntries[r];
388
+ if (i.tryLoc <= this.prev && n.call(i, "finallyLoc") && this.prev < i.finallyLoc) {
389
+ var s = i;
390
390
  break;
391
391
  }
392
392
  }
393
- o && ("break" === e || "continue" === e) && o.tryLoc <= t && t <= o.finallyLoc && (o = null);
394
- var s = o ? o.completion : {};
395
- return s.type = e, s.arg = t, o ? (this.method = "next", this.next = o.finallyLoc, p) : this.complete(s);
393
+ s && ("break" === e || "continue" === e) && s.tryLoc <= t && t <= s.finallyLoc && (s = null);
394
+ var o = s ? s.completion : {};
395
+ return o.type = e, o.arg = t, s ? (this.method = "next", this.next = s.finallyLoc, y) : this.complete(o);
396
396
  },
397
397
  complete: function complete(e, t) {
398
398
  if ("throw" === e.type) throw e.arg;
399
- return "break" === e.type || "continue" === e.type ? this.next = e.arg : "return" === e.type ? (this.rval = this.arg = e.arg, this.method = "return", this.next = "end") : "normal" === e.type && t && (this.next = t), p;
399
+ return "break" === e.type || "continue" === e.type ? this.next = e.arg : "return" === e.type ? (this.rval = this.arg = e.arg, this.method = "return", this.next = "end") : "normal" === e.type && t && (this.next = t), y;
400
400
  },
401
401
  finish: function finish(e) {
402
402
  for (var t = this.tryEntries.length - 1; t >= 0; --t) {
403
403
  var r = this.tryEntries[t];
404
- if (r.finallyLoc === e) return this.complete(r.completion, r.afterLoc), O(r), p;
404
+ if (r.finallyLoc === e) return this.complete(r.completion, r.afterLoc), R(r), y;
405
405
  }
406
406
  },
407
407
  "catch": function _catch(e) {
@@ -411,26 +411,26 @@ function o() {
411
411
  var n = r.completion;
412
412
  if ("throw" === n.type) {
413
413
  var i = n.arg;
414
- O(r);
414
+ R(r);
415
415
  }
416
416
  return i;
417
417
  }
418
418
  }
419
419
  throw new Error("illegal catch attempt");
420
420
  },
421
- delegateYield: function delegateYield(e, t, r) {
421
+ delegateYield: function delegateYield(t, r, n) {
422
422
  return this.delegate = {
423
- iterator: E(e),
424
- resultName: t,
425
- nextLoc: r
426
- }, "next" === this.method && (this.arg = void 0), p;
423
+ iterator: B(t),
424
+ resultName: r,
425
+ nextLoc: n
426
+ }, "next" === this.method && (this.arg = e), y;
427
427
  }
428
- }, e;
428
+ }, t;
429
429
  }
430
- function s(e, t) {
430
+ function o(e, t) {
431
431
  for (var r = 0; r < t.length; r++) {
432
432
  var n = t[r];
433
- n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, (o = n.key, s = void 0, s = function (e, t) {
433
+ n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, (s = n.key, o = void 0, o = function (e, t) {
434
434
  if ("object" !== i(e) || null === e) return e;
435
435
  var r = e[Symbol.toPrimitive];
436
436
  if (void 0 !== r) {
@@ -439,12 +439,12 @@ function s(e, t) {
439
439
  throw new TypeError("@@toPrimitive must return a primitive value.");
440
440
  }
441
441
  return ("string" === t ? String : Number)(e);
442
- }(o, "string"), "symbol" === i(s) ? s : String(s)), n);
442
+ }(s, "string"), "symbol" === i(o) ? o : String(o)), n);
443
443
  }
444
- var o, s;
444
+ var s, o;
445
445
  }
446
446
  function a(e, t, r) {
447
- return t && s(e.prototype, t), r && s(e, r), Object.defineProperty(e, "prototype", {
447
+ return t && o(e.prototype, t), r && o(e, r), Object.defineProperty(e, "prototype", {
448
448
  writable: !1
449
449
  }), e;
450
450
  }
@@ -469,8 +469,8 @@ function l(e) {
469
469
  var r,
470
470
  n = m(e);
471
471
  if (t) {
472
- var o = m(this).constructor;
473
- r = Reflect.construct(n, arguments, o);
472
+ var s = m(this).constructor;
473
+ r = Reflect.construct(n, arguments, s);
474
474
  } else r = n.apply(this, arguments);
475
475
  return function (e, t) {
476
476
  if (t && ("object" === i(t) || "function" == typeof t)) return t;
@@ -555,31 +555,31 @@ function C(e, t) {
555
555
  return r;
556
556
  }
557
557
  function O(e, t, r, n) {
558
- return new (r || (r = Promise))(function (i, o) {
559
- function s(e) {
558
+ return new (r || (r = Promise))(function (i, s) {
559
+ function o(e) {
560
560
  try {
561
561
  c(n.next(e));
562
562
  } catch (e) {
563
- o(e);
563
+ s(e);
564
564
  }
565
565
  }
566
566
  function a(e) {
567
567
  try {
568
568
  c(n["throw"](e));
569
569
  } catch (e) {
570
- o(e);
570
+ s(e);
571
571
  }
572
572
  }
573
573
  function c(e) {
574
574
  var t;
575
575
  e.done ? i(e.value) : (t = e.value, t instanceof r ? t : new r(function (e) {
576
576
  e(t);
577
- })).then(s, a);
577
+ })).then(o, a);
578
578
  }
579
579
  c((n = n.apply(e, t || [])).next());
580
580
  });
581
581
  }
582
- !function (e) {
582
+ "function" == typeof SuppressedError && SuppressedError, function (e) {
583
583
  e.emailMagicLinks = "emailMagicLinks", e.oauth = "oauth", e.otp = "otp", e.crypto = "crypto", e.passwords = "passwords";
584
584
  }(v || (v = {})), function (e) {
585
585
  e.Google = "google", e.Microsoft = "microsoft", e.Apple = "apple", e.Github = "github", e.GitLab = "gitlab", e.Facebook = "facebook", e.Discord = "discord", e.Salesforce = "salesforce", e.Slack = "slack", e.Amazon = "amazon", e.Bitbucket = "bitbucket", e.LinkedIn = "linkedin", e.Coinbase = "coinbase", e.Twitch = "twitch", e.Twitter = "twitter", e.TikTok = "tiktok", e.Snapchat = "snapchat", e.Figma = "figma", e.Yahoo = "yahoo";
@@ -621,10 +621,10 @@ var A,
621
621
  function r(e) {
622
622
  var n, i;
623
623
  c(this, r), (n = t.call(this)).name = "StytchSDKSchemaError";
624
- var o = null === (i = e.body) || void 0 === i ? void 0 : i.map(function (e) {
624
+ var s = null === (i = e.body) || void 0 === i ? void 0 : i.map(function (e) {
625
625
  return "".concat(e.dataPath, ": ").concat(e.message);
626
626
  }).join("\n");
627
- return n.message = "[400] Request does not match expected schema\n".concat(o), n;
627
+ return n.message = "[400] Request does not match expected schema\n".concat(s), n;
628
628
  }
629
629
  return a(r);
630
630
  }(),
@@ -635,11 +635,11 @@ var A,
635
635
  var n;
636
636
  c(this, r), (n = t.call(this)).name = "StytchSDKAPIError";
637
637
  var i = e.status_code,
638
- o = e.error_type,
639
- s = e.error_message,
638
+ s = e.error_type,
639
+ o = e.error_message,
640
640
  a = e.error_url,
641
641
  u = e.request_id;
642
- return n.error_type = o, n.error_message = s, n.error_url = a, n.request_id = u, n.status_code = i, n.message = "[".concat(i, "] ").concat(o, "\n") + "".concat(s, "\n") + "See ".concat(a, " for more information.\n") + (u ? "request_id: ".concat(u, "\n") : ""), n;
642
+ return n.error_type = s, n.error_message = o, n.error_url = a, n.request_id = u, n.status_code = i, n.message = "[".concat(i, "] ").concat(s, "\n") + "".concat(o, "\n") + "See ".concat(a, " for more information.\n") + (u ? "request_id: ".concat(u, "\n") : ""), n;
643
643
  }
644
644
  return a(r);
645
645
  }(),
@@ -670,18 +670,18 @@ function N(e) {
670
670
  r = e.errorMessage,
671
671
  n = e.finalURL,
672
672
  i = e.basicAuthHeader,
673
- s = e.xSDKClientHeader,
673
+ o = e.xSDKClientHeader,
674
674
  a = e.xSDKParentHostHeader,
675
675
  c = e.body;
676
- return O(this, void 0, void 0, o().mark(function e() {
676
+ return O(this, void 0, void 0, s().mark(function e() {
677
677
  var u, l, d, h, p, f;
678
- return o().wrap(function (e) {
678
+ return s().wrap(function (e) {
679
679
  for (;;) switch (e.prev = e.next) {
680
680
  case 0:
681
681
  return u = {
682
682
  Authorization: i,
683
683
  "Content-Type": "application/json",
684
- "X-SDK-Client": s
684
+ "X-SDK-Client": o
685
685
  }, a && (u["X-SDK-Parent-Host"] = a), l = {
686
686
  method: t,
687
687
  headers: u,
@@ -775,8 +775,8 @@ function z(e, t, r) {
775
775
  }
776
776
  var Y = {};
777
777
  function V(e, t) {
778
- return O(this, void 0, void 0, o().mark(function r() {
779
- return o().wrap(function (r) {
778
+ return O(this, void 0, void 0, s().mark(function r() {
779
+ return s().wrap(function (r) {
780
780
  for (;;) switch (r.prev = r.next) {
781
781
  case 0:
782
782
  if (void 0 === Y[e]) {
@@ -804,18 +804,18 @@ function J(e, t) {
804
804
  } catch (t) {
805
805
  return n(new Error("".concat(e, " already loaded, but module was not found in global scope: ").concat(t)));
806
806
  }
807
- var o = function (e) {
807
+ var s = function (e) {
808
808
  var t = document.createElement("script");
809
809
  return t.setAttribute("src", e), t.setAttribute("async", "true"), t.setAttribute("defer", "true"), document.head.appendChild(t), t;
810
810
  }(e);
811
- o.addEventListener("load", function () {
812
- o.dataset.loaded = "true";
811
+ s.addEventListener("load", function () {
812
+ s.dataset.loaded = "true";
813
813
  try {
814
814
  r(t());
815
815
  } catch (t) {
816
816
  n(new Error("".concat(e, " was loaded, but module was not found in global scope: ").concat(t)));
817
817
  }
818
- }), o.addEventListener("error", function (t) {
818
+ }), s.addEventListener("error", function (t) {
819
819
  n(new Error("".concat(e, " could not be loaded: ").concat(t)));
820
820
  });
821
821
  });
@@ -837,8 +837,8 @@ var X,
837
837
  re = function re(t) {
838
838
  var r = {
839
839
  isObject: function isObject(e, n) {
840
- var o = "object" === i(n) && !Array.isArray(n) && null !== n;
841
- if (!o) throw new B(t, e + " must be an object.");
840
+ var s = "object" === i(n) && !Array.isArray(n) && null !== n;
841
+ if (!s) throw new B(t, e + " must be an object.");
842
842
  return r;
843
843
  },
844
844
  isOptionalObject: function isOptionalObject(e, t) {
@@ -853,16 +853,16 @@ var X,
853
853
  },
854
854
  isStringArray: function isStringArray(n, i) {
855
855
  if (!Array.isArray(i)) throw new B(t, n + " must be an array of strings.");
856
- var o,
857
- s = e(i);
856
+ var s,
857
+ o = e(i);
858
858
  try {
859
- for (s.s(); !(o = s.n()).done;) {
860
- if ("string" != typeof o.value) throw new B(t, n + " must be an array of strings.");
859
+ for (o.s(); !(s = o.n()).done;) {
860
+ if ("string" != typeof s.value) throw new B(t, n + " must be an array of strings.");
861
861
  }
862
862
  } catch (e) {
863
- s.e(e);
863
+ o.e(e);
864
864
  } finally {
865
- s.f();
865
+ o.f();
866
866
  }
867
867
  return r;
868
868
  },
@@ -892,14 +892,14 @@ var X,
892
892
  ie = function ie(e) {
893
893
  return C(e, ["__user"]);
894
894
  },
895
- oe = a(function e(t, r, n) {
895
+ se = a(function e(t, r, n) {
896
896
  var i = this,
897
- s = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : function () {
897
+ o = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : function () {
898
898
  return Promise.resolve(void 0);
899
899
  };
900
900
  c(this, e), this.bootstrapPromise = n, this.isEnabled = function () {
901
- return O(i, void 0, void 0, o().mark(function e() {
902
- return o().wrap(function (e) {
901
+ return O(i, void 0, void 0, s().mark(function e() {
902
+ return s().wrap(function (e) {
903
903
  for (;;) switch (e.prev = e.next) {
904
904
  case 0:
905
905
  return e.abrupt("return", this.state.then(function (e) {
@@ -912,9 +912,9 @@ var X,
912
912
  }, e, this);
913
913
  }));
914
914
  }, this.getTelemetryID = function () {
915
- return O(i, void 0, void 0, o().mark(function e() {
915
+ return O(i, void 0, void 0, s().mark(function e() {
916
916
  var t, r, n, i;
917
- return o().wrap(function (e) {
917
+ return s().wrap(function (e) {
918
918
  for (;;) switch (e.prev = e.next) {
919
919
  case 0:
920
920
  return e.next = 2, this.state;
@@ -935,14 +935,14 @@ var X,
935
935
  }, e, this);
936
936
  }));
937
937
  }, this.getDFPTelemetryIDAndCaptcha = function () {
938
- return O(i, void 0, void 0, o().mark(function e() {
939
- var t, r, n, i, s, a;
940
- return o().wrap(function (e) {
938
+ return O(i, void 0, void 0, s().mark(function e() {
939
+ var t, r, n, i, o, a;
940
+ return s().wrap(function (e) {
941
941
  for (;;) switch (e.prev = e.next) {
942
942
  case 0:
943
943
  return e.next = 2, this.state;
944
944
  case 2:
945
- if (t = e.sent, r = t.enabled, n = t.executeRecaptcha, i = t.mode, s = void 0, a = void 0, r) {
945
+ if (t = e.sent, r = t.enabled, n = t.executeRecaptcha, i = t.mode, o = void 0, a = void 0, r) {
946
946
  e.next = 12;
947
947
  break;
948
948
  }
@@ -956,7 +956,7 @@ var X,
956
956
  }
957
957
  return e.next = 15, this.getTelemetryID();
958
958
  case 15:
959
- s = e.sent, e.next = 25;
959
+ o = e.sent, e.next = 25;
960
960
  break;
961
961
  case 18:
962
962
  if ("OBSERVATION" !== i) {
@@ -965,12 +965,12 @@ var X,
965
965
  }
966
966
  return e.next = 21, this.getTelemetryID();
967
967
  case 21:
968
- return s = e.sent, e.next = 24, n();
968
+ return o = e.sent, e.next = 24, n();
969
969
  case 24:
970
970
  a = e.sent;
971
971
  case 25:
972
972
  return e.abrupt("return", {
973
- dfp_telemetry_id: s,
973
+ dfp_telemetry_id: o,
974
974
  captcha_token: a
975
975
  });
976
976
  case 26:
@@ -980,14 +980,14 @@ var X,
980
980
  }, e, this);
981
981
  }));
982
982
  }, this.retryWithCaptchaAndDFP = function (e, t) {
983
- return O(i, void 0, void 0, o().mark(function r() {
984
- var n, i, s;
985
- return o().wrap(function (r) {
983
+ return O(i, void 0, void 0, s().mark(function r() {
984
+ var n, i, o;
985
+ return s().wrap(function (r) {
986
986
  for (;;) switch (r.prev = r.next) {
987
987
  case 0:
988
988
  return r.next = 2, this.state;
989
989
  case 2:
990
- if (n = r.sent, i = n.enabled, s = n.executeRecaptcha, e.type !== R.RequiredCatcha || !i) {
990
+ if (n = r.sent, i = n.enabled, o = n.executeRecaptcha, e.type !== R.RequiredCatcha || !i) {
991
991
  r.next = 14;
992
992
  break;
993
993
  }
@@ -997,7 +997,7 @@ var X,
997
997
  }
998
998
  return r.next = 9, this.getTelemetryID();
999
999
  case 9:
1000
- return t.body.dfp_telemetry_id = r.sent, r.next = 12, s();
1000
+ return t.body.dfp_telemetry_id = r.sent, r.next = 12, o();
1001
1001
  case 12:
1002
1002
  t.body.captcha_token = r.sent;
1003
1003
  case 13:
@@ -1011,8 +1011,8 @@ var X,
1011
1011
  }, r, this);
1012
1012
  }));
1013
1013
  }, this.state = n.then(function (e) {
1014
- return O(i, void 0, void 0, o().mark(function n() {
1015
- return o().wrap(function (n) {
1014
+ return O(i, void 0, void 0, s().mark(function n() {
1015
+ return s().wrap(function (n) {
1016
1016
  for (;;) switch (n.prev = n.next) {
1017
1017
  case 0:
1018
1018
  if (e.runDFPProtectedAuth) {
@@ -1024,7 +1024,7 @@ var X,
1024
1024
  dfpBackendURL: r,
1025
1025
  enabled: !1,
1026
1026
  loaded: !1,
1027
- executeRecaptcha: s
1027
+ executeRecaptcha: o
1028
1028
  });
1029
1029
  case 2:
1030
1030
  return n.next = 4, void V("".concat("https://elements.stytch.com", "/telemetry.js"), function () {
@@ -1037,7 +1037,7 @@ var X,
1037
1037
  enabled: !0,
1038
1038
  mode: e.dfpProtectedAuthMode || "OBSERVATION",
1039
1039
  loaded: !0,
1040
- executeRecaptcha: s
1040
+ executeRecaptcha: o
1041
1041
  });
1042
1042
  case 5:
1043
1043
  case "end":
@@ -1047,11 +1047,11 @@ var X,
1047
1047
  }));
1048
1048
  });
1049
1049
  }),
1050
- se = function se() {
1050
+ oe = function oe() {
1051
1051
  return {
1052
1052
  isEnabled: function isEnabled() {
1053
- return O(void 0, void 0, void 0, o().mark(function e() {
1054
- return o().wrap(function (e) {
1053
+ return O(void 0, void 0, void 0, s().mark(function e() {
1054
+ return s().wrap(function (e) {
1055
1055
  for (;;) switch (e.prev = e.next) {
1056
1056
  case 0:
1057
1057
  return e.abrupt("return", !1);
@@ -1063,8 +1063,8 @@ var X,
1063
1063
  }));
1064
1064
  },
1065
1065
  getTelemetryID: function getTelemetryID() {
1066
- return O(void 0, void 0, void 0, o().mark(function e() {
1067
- return o().wrap(function (e) {
1066
+ return O(void 0, void 0, void 0, s().mark(function e() {
1067
+ return s().wrap(function (e) {
1068
1068
  for (;;) switch (e.prev = e.next) {
1069
1069
  case 0:
1070
1070
  return e.abrupt("return", void 0);
@@ -1076,8 +1076,8 @@ var X,
1076
1076
  }));
1077
1077
  },
1078
1078
  getDFPTelemetryIDAndCaptcha: function getDFPTelemetryIDAndCaptcha() {
1079
- return O(void 0, void 0, void 0, o().mark(function e() {
1080
- return o().wrap(function (e) {
1079
+ return O(void 0, void 0, void 0, s().mark(function e() {
1080
+ return s().wrap(function (e) {
1081
1081
  for (;;) switch (e.prev = e.next) {
1082
1082
  case 0:
1083
1083
  return e.abrupt("return", {
@@ -1092,8 +1092,8 @@ var X,
1092
1092
  }));
1093
1093
  },
1094
1094
  retryWithCaptchaAndDFP: function retryWithCaptchaAndDFP() {
1095
- return O(void 0, void 0, void 0, o().mark(function e() {
1096
- return o().wrap(function (e) {
1095
+ return O(void 0, void 0, void 0, s().mark(function e() {
1096
+ return s().wrap(function (e) {
1097
1097
  for (;;) switch (e.prev = e.next) {
1098
1098
  case 0:
1099
1099
  throw new Error("DFP protected auth is disabled");
@@ -1167,9 +1167,9 @@ var X,
1167
1167
  }, {
1168
1168
  key: "flush",
1169
1169
  value: function value() {
1170
- return O(this, void 0, void 0, o().mark(function e() {
1170
+ return O(this, void 0, void 0, s().mark(function e() {
1171
1171
  var t;
1172
- return o().wrap(function (e) {
1172
+ return s().wrap(function (e) {
1173
1173
  for (;;) switch (e.prev = e.next) {
1174
1174
  case 0:
1175
1175
  if (this.batch.length) {
@@ -1205,9 +1205,9 @@ var X,
1205
1205
  var ue = a(function e(t, r) {
1206
1206
  var n = this;
1207
1207
  c(this, e), this._networkClient = t, this._subscriptionService = r, this.get = function () {
1208
- return O(n, void 0, void 0, o().mark(function e() {
1208
+ return O(n, void 0, void 0, s().mark(function e() {
1209
1209
  var t, r;
1210
- return o().wrap(function (e) {
1210
+ return s().wrap(function (e) {
1211
1211
  for (;;) switch (e.prev = e.next) {
1212
1212
  case 0:
1213
1213
  return e.next = 2, this._networkClient.fetchSDK({
@@ -1226,9 +1226,9 @@ var ue = a(function e(t, r) {
1226
1226
  }, this.getSync = function () {
1227
1227
  return n._subscriptionService.getUser();
1228
1228
  }, this.update = function (e) {
1229
- return O(n, void 0, void 0, o().mark(function t() {
1229
+ return O(n, void 0, void 0, s().mark(function t() {
1230
1230
  var r, n;
1231
- return o().wrap(function (t) {
1231
+ return s().wrap(function (t) {
1232
1232
  for (;;) switch (t.prev = t.next) {
1233
1233
  case 0:
1234
1234
  return re("stytch.user.update").isOptionalObject("untrusted_metadata", e.untrusted_metadata), t.next = 3, this._networkClient.fetchSDK({
@@ -1246,9 +1246,9 @@ var ue = a(function e(t, r) {
1246
1246
  }, t, this);
1247
1247
  }));
1248
1248
  }, this.deleteEmail = function (e) {
1249
- return O(n, void 0, void 0, o().mark(function t() {
1249
+ return O(n, void 0, void 0, s().mark(function t() {
1250
1250
  var r, n;
1251
- return o().wrap(function (t) {
1251
+ return s().wrap(function (t) {
1252
1252
  for (;;) switch (t.prev = t.next) {
1253
1253
  case 0:
1254
1254
  return t.next = 2, this._networkClient.fetchSDK({
@@ -1265,9 +1265,9 @@ var ue = a(function e(t, r) {
1265
1265
  }, t, this);
1266
1266
  }));
1267
1267
  }, this.deletePhoneNumber = function (e) {
1268
- return O(n, void 0, void 0, o().mark(function t() {
1268
+ return O(n, void 0, void 0, s().mark(function t() {
1269
1269
  var r, n;
1270
- return o().wrap(function (t) {
1270
+ return s().wrap(function (t) {
1271
1271
  for (;;) switch (t.prev = t.next) {
1272
1272
  case 0:
1273
1273
  return t.next = 2, this._networkClient.fetchSDK({
@@ -1284,9 +1284,9 @@ var ue = a(function e(t, r) {
1284
1284
  }, t, this);
1285
1285
  }));
1286
1286
  }, this.deleteTOTP = function (e) {
1287
- return O(n, void 0, void 0, o().mark(function t() {
1287
+ return O(n, void 0, void 0, s().mark(function t() {
1288
1288
  var r, n;
1289
- return o().wrap(function (t) {
1289
+ return s().wrap(function (t) {
1290
1290
  for (;;) switch (t.prev = t.next) {
1291
1291
  case 0:
1292
1292
  return t.next = 2, this._networkClient.fetchSDK({
@@ -1303,9 +1303,9 @@ var ue = a(function e(t, r) {
1303
1303
  }, t, this);
1304
1304
  }));
1305
1305
  }, this.deleteOAuthRegistration = function (e) {
1306
- return O(n, void 0, void 0, o().mark(function t() {
1306
+ return O(n, void 0, void 0, s().mark(function t() {
1307
1307
  var r, n;
1308
- return o().wrap(function (t) {
1308
+ return s().wrap(function (t) {
1309
1309
  for (;;) switch (t.prev = t.next) {
1310
1310
  case 0:
1311
1311
  return t.next = 2, this._networkClient.fetchSDK({
@@ -1322,9 +1322,9 @@ var ue = a(function e(t, r) {
1322
1322
  }, t, this);
1323
1323
  }));
1324
1324
  }, this.deleteWebauthnRegistration = function (e) {
1325
- return O(n, void 0, void 0, o().mark(function t() {
1325
+ return O(n, void 0, void 0, s().mark(function t() {
1326
1326
  var r, n;
1327
- return o().wrap(function (t) {
1327
+ return s().wrap(function (t) {
1328
1328
  for (;;) switch (t.prev = t.next) {
1329
1329
  case 0:
1330
1330
  return t.next = 2, this._networkClient.fetchSDK({
@@ -1341,9 +1341,9 @@ var ue = a(function e(t, r) {
1341
1341
  }, t, this);
1342
1342
  }));
1343
1343
  }, this.deleteBiometricRegistration = function (e) {
1344
- return O(n, void 0, void 0, o().mark(function t() {
1344
+ return O(n, void 0, void 0, s().mark(function t() {
1345
1345
  var r, n;
1346
- return o().wrap(function (t) {
1346
+ return s().wrap(function (t) {
1347
1347
  for (;;) switch (t.prev = t.next) {
1348
1348
  case 0:
1349
1349
  return t.next = 2, this._networkClient.fetchSDK({
@@ -1379,9 +1379,9 @@ var ue = a(function e(t, r) {
1379
1379
  (null == r ? void 0 : r.session) !== t && (t = null !== (n = null == r ? void 0 : r.session) && void 0 !== n ? n : null, e(t));
1380
1380
  });
1381
1381
  }, this.revoke = function (e) {
1382
- return O(n, void 0, void 0, o().mark(function t() {
1382
+ return O(n, void 0, void 0, s().mark(function t() {
1383
1383
  var r;
1384
- return o().wrap(function (t) {
1384
+ return s().wrap(function (t) {
1385
1385
  for (;;) switch (t.prev = t.next) {
1386
1386
  case 0:
1387
1387
  return t.prev = 0, t.next = 3, this._networkClient.fetchSDK({
@@ -1400,9 +1400,9 @@ var ue = a(function e(t, r) {
1400
1400
  }, t, this, [[0, 8]]);
1401
1401
  }));
1402
1402
  }, this.authenticate = function (e) {
1403
- return O(n, void 0, void 0, o().mark(function t() {
1403
+ return O(n, void 0, void 0, s().mark(function t() {
1404
1404
  var r, n;
1405
- return o().wrap(function (t) {
1405
+ return s().wrap(function (t) {
1406
1406
  for (;;) switch (t.prev = t.next) {
1407
1407
  case 0:
1408
1408
  return t.prev = 0, r = {
@@ -1450,32 +1450,32 @@ var ue = a(function e(t, r) {
1450
1450
  }),
1451
1451
  he = function () {
1452
1452
  function e(t, r, n, i) {
1453
- var s = this,
1453
+ var o = this,
1454
1454
  a = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : de,
1455
- u = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : se();
1455
+ u = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : oe();
1456
1456
  c(this, e), this._networkClient = t, this._subscriptionService = r, this._pkceManager = n, this._passwordResetPKCEManager = i, this._config = a, this.dfpProtectedAuth = u, this.email = {
1457
1457
  loginOrCreate: function loginOrCreate(e) {
1458
1458
  var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
1459
- return O(s, void 0, void 0, o().mark(function r() {
1460
- var n, i, s, a, c, u, l;
1461
- return o().wrap(function (r) {
1459
+ return O(o, void 0, void 0, s().mark(function r() {
1460
+ var n, i, o, a, c, u, l;
1461
+ return s().wrap(function (r) {
1462
1462
  for (;;) switch (r.prev = r.next) {
1463
1463
  case 0:
1464
1464
  return r.next = 2, this._config;
1465
1465
  case 2:
1466
- if (n = r.sent, i = n.pkceRequiredForEmailMagicLinks, s = void 0, !i) {
1466
+ if (n = r.sent, i = n.pkceRequiredForEmailMagicLinks, o = void 0, !i) {
1467
1467
  r.next = 9;
1468
1468
  break;
1469
1469
  }
1470
1470
  return r.next = 8, this.getCodeChallenge();
1471
1471
  case 8:
1472
- s = r.sent;
1472
+ o = r.sent;
1473
1473
  case 9:
1474
1474
  return r.next = 11, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
1475
1475
  case 11:
1476
1476
  return a = r.sent, c = a.dfp_telemetry_id, u = a.captcha_token, l = Object.assign(Object.assign({}, t), {
1477
1477
  email: e,
1478
- code_challenge: s,
1478
+ code_challenge: o,
1479
1479
  captcha_token: u,
1480
1480
  dfp_telemetry_id: c
1481
1481
  }), r.abrupt("return", this._networkClient.retriableFetchSDK({
@@ -1494,26 +1494,26 @@ var ue = a(function e(t, r) {
1494
1494
  },
1495
1495
  send: function send(e) {
1496
1496
  var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
1497
- return O(s, void 0, void 0, o().mark(function r() {
1498
- var n, i, s, a, c, u, l, d, h;
1499
- return o().wrap(function (r) {
1497
+ return O(o, void 0, void 0, s().mark(function r() {
1498
+ var n, i, o, a, c, u, l, d, h;
1499
+ return s().wrap(function (r) {
1500
1500
  for (;;) switch (r.prev = r.next) {
1501
1501
  case 0:
1502
1502
  return r.next = 2, this._config;
1503
1503
  case 2:
1504
- if (n = r.sent, i = n.pkceRequiredForEmailMagicLinks, s = void 0, !i) {
1504
+ if (n = r.sent, i = n.pkceRequiredForEmailMagicLinks, o = void 0, !i) {
1505
1505
  r.next = 9;
1506
1506
  break;
1507
1507
  }
1508
1508
  return r.next = 8, this.getCodeChallenge();
1509
1509
  case 8:
1510
- s = r.sent;
1510
+ o = r.sent;
1511
1511
  case 9:
1512
1512
  return r.next = 11, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
1513
1513
  case 11:
1514
1514
  return a = r.sent, c = a.dfp_telemetry_id, u = a.captcha_token, l = Object.assign(Object.assign({}, t), {
1515
1515
  email: e,
1516
- code_challenge: s,
1516
+ code_challenge: o,
1517
1517
  captcha_token: u,
1518
1518
  dfp_telemetry_id: c
1519
1519
  }), d = !!this._subscriptionService.getSession(), h = d ? "/magic_links/email/send/secondary" : "/magic_links/email/send/primary", r.abrupt("return", this._networkClient.retriableFetchSDK({
@@ -1531,9 +1531,9 @@ var ue = a(function e(t, r) {
1531
1531
  }));
1532
1532
  }
1533
1533
  }, this.authenticate = function (e, t) {
1534
- return O(s, void 0, void 0, o().mark(function r() {
1534
+ return O(o, void 0, void 0, s().mark(function r() {
1535
1535
  var n, i;
1536
- return o().wrap(function (r) {
1536
+ return s().wrap(function (r) {
1537
1537
  for (;;) switch (r.prev = r.next) {
1538
1538
  case 0:
1539
1539
  return re("stytch.magicLinks.authenticate").isString("Token", e).isNumber("session_duration_minutes", t.session_duration_minutes), r.next = 3, this._passwordResetPKCEManager.getPKPair();
@@ -1588,9 +1588,9 @@ var ue = a(function e(t, r) {
1588
1588
  return a(e, [{
1589
1589
  key: "getCodeChallenge",
1590
1590
  value: function value() {
1591
- return O(this, void 0, void 0, o().mark(function e() {
1591
+ return O(this, void 0, void 0, s().mark(function e() {
1592
1592
  var t;
1593
- return o().wrap(function (e) {
1593
+ return s().wrap(function (e) {
1594
1594
  for (;;) switch (e.prev = e.next) {
1595
1595
  case 0:
1596
1596
  return e.next = 2, this._pkceManager.getPKPair();
@@ -1614,9 +1614,9 @@ var ue = a(function e(t, r) {
1614
1614
  }, {
1615
1615
  key: "handlePKCEForAuthenticate",
1616
1616
  value: function value(e, t) {
1617
- return O(this, void 0, void 0, o().mark(function r() {
1618
- var n, i, s;
1619
- return o().wrap(function (r) {
1617
+ return O(this, void 0, void 0, s().mark(function r() {
1618
+ var n, i, o;
1619
+ return s().wrap(function (r) {
1620
1620
  for (;;) switch (r.prev = r.next) {
1621
1621
  case 0:
1622
1622
  return r.next = 2, e.getPKPair();
@@ -1630,7 +1630,7 @@ var ue = a(function e(t, r) {
1630
1630
  method: "POST"
1631
1631
  });
1632
1632
  case 6:
1633
- return s = r.sent, e.clearPKPair(), r.abrupt("return", s);
1633
+ return o = r.sent, e.clearPKPair(), r.abrupt("return", o);
1634
1634
  case 9:
1635
1635
  case "end":
1636
1636
  return r.stop();
@@ -1645,19 +1645,19 @@ var ue = a(function e(t, r) {
1645
1645
  i = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : function () {
1646
1646
  return Promise.resolve(void 0);
1647
1647
  },
1648
- s = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : se();
1649
- c(this, e), this._networkClient = t, this._subscriptionService = r, this.executeRecaptcha = i, this.dfpProtectedAuth = s, this.sms = {
1648
+ o = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : oe();
1649
+ c(this, e), this._networkClient = t, this._subscriptionService = r, this.executeRecaptcha = i, this.dfpProtectedAuth = o, this.sms = {
1650
1650
  loginOrCreate: function loginOrCreate(e, t) {
1651
- return O(n, void 0, void 0, o().mark(function r() {
1652
- var n, i, s, a;
1653
- return o().wrap(function (r) {
1651
+ return O(n, void 0, void 0, s().mark(function r() {
1652
+ var n, i, o, a;
1653
+ return s().wrap(function (r) {
1654
1654
  for (;;) switch (r.prev = r.next) {
1655
1655
  case 0:
1656
1656
  return r.next = 2, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
1657
1657
  case 2:
1658
- return n = r.sent, i = n.dfp_telemetry_id, s = n.captcha_token, a = Object.assign(Object.assign({}, t), {
1658
+ return n = r.sent, i = n.dfp_telemetry_id, o = n.captcha_token, a = Object.assign(Object.assign({}, t), {
1659
1659
  phone_number: e,
1660
- captcha_token: s,
1660
+ captcha_token: o,
1661
1661
  dfp_telemetry_id: i
1662
1662
  }), r.abrupt("return", this._networkClient.retriableFetchSDK({
1663
1663
  url: "/otps/sms/login_or_create",
@@ -1674,16 +1674,16 @@ var ue = a(function e(t, r) {
1674
1674
  }));
1675
1675
  },
1676
1676
  send: function send(e, t) {
1677
- return O(n, void 0, void 0, o().mark(function r() {
1678
- var n, i, s, a, c, u;
1679
- return o().wrap(function (r) {
1677
+ return O(n, void 0, void 0, s().mark(function r() {
1678
+ var n, i, o, a, c, u;
1679
+ return s().wrap(function (r) {
1680
1680
  for (;;) switch (r.prev = r.next) {
1681
1681
  case 0:
1682
1682
  return r.next = 2, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
1683
1683
  case 2:
1684
- return n = r.sent, i = n.dfp_telemetry_id, s = n.captcha_token, a = Object.assign(Object.assign({}, t), {
1684
+ return n = r.sent, i = n.dfp_telemetry_id, o = n.captcha_token, a = Object.assign(Object.assign({}, t), {
1685
1685
  phone_number: e,
1686
- captcha_token: s,
1686
+ captcha_token: o,
1687
1687
  dfp_telemetry_id: i
1688
1688
  }), c = !!this._subscriptionService.getSession(), u = c ? "/otps/sms/send/secondary" : "/otps/sms/send/primary", r.abrupt("return", this._networkClient.retriableFetchSDK({
1689
1689
  url: u,
@@ -1701,17 +1701,17 @@ var ue = a(function e(t, r) {
1701
1701
  }
1702
1702
  }, this.whatsapp = {
1703
1703
  loginOrCreate: function loginOrCreate(e, t) {
1704
- return O(n, void 0, void 0, o().mark(function r() {
1705
- var n, i, s, a;
1706
- return o().wrap(function (r) {
1704
+ return O(n, void 0, void 0, s().mark(function r() {
1705
+ var n, i, o, a;
1706
+ return s().wrap(function (r) {
1707
1707
  for (;;) switch (r.prev = r.next) {
1708
1708
  case 0:
1709
1709
  return r.next = 2, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
1710
1710
  case 2:
1711
- return n = r.sent, i = n.dfp_telemetry_id, s = n.captcha_token, a = Object.assign(Object.assign({}, t), {
1711
+ return n = r.sent, i = n.dfp_telemetry_id, o = n.captcha_token, a = Object.assign(Object.assign({}, t), {
1712
1712
  phone_number: e,
1713
1713
  dfp_telemetry_id: i,
1714
- captcha_token: s
1714
+ captcha_token: o
1715
1715
  }), r.abrupt("return", this._networkClient.retriableFetchSDK({
1716
1716
  url: "/otps/whatsapp/login_or_create",
1717
1717
  body: a,
@@ -1727,16 +1727,16 @@ var ue = a(function e(t, r) {
1727
1727
  }));
1728
1728
  },
1729
1729
  send: function send(e, t) {
1730
- return O(n, void 0, void 0, o().mark(function r() {
1731
- var n, i, s, a, c, u;
1732
- return o().wrap(function (r) {
1730
+ return O(n, void 0, void 0, s().mark(function r() {
1731
+ var n, i, o, a, c, u;
1732
+ return s().wrap(function (r) {
1733
1733
  for (;;) switch (r.prev = r.next) {
1734
1734
  case 0:
1735
1735
  return r.next = 2, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
1736
1736
  case 2:
1737
- return n = r.sent, i = n.dfp_telemetry_id, s = n.captcha_token, a = Object.assign(Object.assign({}, t), {
1737
+ return n = r.sent, i = n.dfp_telemetry_id, o = n.captcha_token, a = Object.assign(Object.assign({}, t), {
1738
1738
  phone_number: e,
1739
- captcha_token: s,
1739
+ captcha_token: o,
1740
1740
  dfp_telemetry_id: i
1741
1741
  }), c = !!this._subscriptionService.getSession(), u = c ? "/otps/whatsapp/send/secondary" : "/otps/whatsapp/send/primary", r.abrupt("return", this._networkClient.retriableFetchSDK({
1742
1742
  url: u,
@@ -1754,9 +1754,9 @@ var ue = a(function e(t, r) {
1754
1754
  }
1755
1755
  }, this.email = {
1756
1756
  loginOrCreate: function loginOrCreate(e, t) {
1757
- return O(n, void 0, void 0, o().mark(function r() {
1757
+ return O(n, void 0, void 0, s().mark(function r() {
1758
1758
  var n, i;
1759
- return o().wrap(function (r) {
1759
+ return s().wrap(function (r) {
1760
1760
  for (;;) switch (r.prev = r.next) {
1761
1761
  case 0:
1762
1762
  return r.next = 2, this.executeRecaptcha();
@@ -1778,9 +1778,9 @@ var ue = a(function e(t, r) {
1778
1778
  }));
1779
1779
  },
1780
1780
  send: function send(e, t) {
1781
- return O(n, void 0, void 0, o().mark(function r() {
1782
- var n, i, s, a;
1783
- return o().wrap(function (r) {
1781
+ return O(n, void 0, void 0, s().mark(function r() {
1782
+ var n, i, o, a;
1783
+ return s().wrap(function (r) {
1784
1784
  for (;;) switch (r.prev = r.next) {
1785
1785
  case 0:
1786
1786
  return r.next = 2, this.executeRecaptcha();
@@ -1788,7 +1788,7 @@ var ue = a(function e(t, r) {
1788
1788
  return n = r.sent, i = Object.assign(Object.assign({}, t), {
1789
1789
  email: e,
1790
1790
  captcha_token: n
1791
- }), s = !!this._subscriptionService.getSession(), a = s ? "/otps/email/send/secondary" : "/otps/email/send/primary", r.abrupt("return", this._networkClient.fetchSDK({
1791
+ }), o = !!this._subscriptionService.getSession(), a = o ? "/otps/email/send/secondary" : "/otps/email/send/primary", r.abrupt("return", this._networkClient.fetchSDK({
1792
1792
  url: a,
1793
1793
  body: i,
1794
1794
  errorMessage: "Failed to send one time passcode",
@@ -1802,17 +1802,17 @@ var ue = a(function e(t, r) {
1802
1802
  }));
1803
1803
  }
1804
1804
  }, this.authenticate = function (e, t, r) {
1805
- return O(n, void 0, void 0, o().mark(function n() {
1806
- var i, s, a, c, u;
1807
- return o().wrap(function (n) {
1805
+ return O(n, void 0, void 0, s().mark(function n() {
1806
+ var i, o, a, c, u;
1807
+ return s().wrap(function (n) {
1808
1808
  for (;;) switch (n.prev = n.next) {
1809
1809
  case 0:
1810
1810
  return re("stytch.otps.authenticate").isString("Code", e).isNumber("session_duration_minutes", r.session_duration_minutes), n.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
1811
1811
  case 3:
1812
- return i = n.sent, s = i.dfp_telemetry_id, a = i.captcha_token, c = Object.assign({
1812
+ return i = n.sent, o = i.dfp_telemetry_id, a = i.captcha_token, c = Object.assign({
1813
1813
  token: e,
1814
1814
  method_id: t,
1815
- dfp_telemetry_id: s,
1815
+ dfp_telemetry_id: o,
1816
1816
  captcha_token: a
1817
1817
  }, r), n.next = 9, this._networkClient.retriableFetchSDK({
1818
1818
  url: "/otps/authenticate",
@@ -1840,8 +1840,8 @@ var ue = a(function e(t, r) {
1840
1840
  };
1841
1841
  }),
1842
1842
  fe = function () {
1843
- function e(t, r, n, i, o) {
1844
- c(this, e), this._networkClient = t, this._subscriptionService = r, this._pkceManager = n, this._dynamicConfig = i, this._config = o, this.google = {
1843
+ function e(t, r, n, i, s) {
1844
+ c(this, e), this._networkClient = t, this._subscriptionService = r, this._pkceManager = n, this._dynamicConfig = i, this._config = s, this.google = {
1845
1845
  start: this.startOAuthFlow(y.Google)
1846
1846
  }, this.apple = {
1847
1847
  start: this.startOAuthFlow(y.Apple)
@@ -1884,9 +1884,9 @@ var ue = a(function e(t, r) {
1884
1884
  return a(e, [{
1885
1885
  key: "authenticate",
1886
1886
  value: function value(e, t) {
1887
- return O(this, void 0, void 0, o().mark(function r() {
1887
+ return O(this, void 0, void 0, s().mark(function r() {
1888
1888
  var n, i;
1889
- return o().wrap(function (r) {
1889
+ return s().wrap(function (r) {
1890
1890
  for (;;) switch (r.prev = r.next) {
1891
1891
  case 0:
1892
1892
  return re("stytch.oauth.authenticate").isString("Token", e).isNumber("session_duration_minutes", t.session_duration_minutes), r.next = 3, this._pkceManager.getPKPair();
@@ -1920,9 +1920,9 @@ var ue = a(function e(t, r) {
1920
1920
  }, {
1921
1921
  key: "getBaseApiUrl",
1922
1922
  value: function value() {
1923
- return O(this, void 0, void 0, o().mark(function e() {
1923
+ return O(this, void 0, void 0, s().mark(function e() {
1924
1924
  var t, r;
1925
- return o().wrap(function (e) {
1925
+ return s().wrap(function (e) {
1926
1926
  for (;;) switch (e.prev = e.next) {
1927
1927
  case 0:
1928
1928
  return e.next = 2, this._dynamicConfig;
@@ -1955,10 +1955,10 @@ var ue = a(function e(t, r) {
1955
1955
  var r = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
1956
1956
  n = r.login_redirect_url,
1957
1957
  i = r.signup_redirect_url,
1958
- s = r.custom_scopes;
1959
- return O(t, void 0, void 0, o().mark(function t() {
1958
+ o = r.custom_scopes;
1959
+ return O(t, void 0, void 0, s().mark(function t() {
1960
1960
  var r, a, c, u, l, d;
1961
- return o().wrap(function (t) {
1961
+ return s().wrap(function (t) {
1962
1962
  for (;;) switch (t.prev = t.next) {
1963
1963
  case 0:
1964
1964
  return t.next = 2, this._dynamicConfig;
@@ -1969,7 +1969,7 @@ var ue = a(function e(t, r) {
1969
1969
  name: "start_oauth_flow",
1970
1970
  details: {
1971
1971
  provider_type: e,
1972
- custom_scopes: s,
1972
+ custom_scopes: o,
1973
1973
  cname_domain: a,
1974
1974
  pkce: c
1975
1975
  }
@@ -1984,7 +1984,7 @@ var ue = a(function e(t, r) {
1984
1984
  case 18:
1985
1985
  this._pkceManager.clearPKPair();
1986
1986
  case 19:
1987
- s && (re("startOAuthFlow").isStringArray("custom_scopes", s), l.searchParams.set("custom_scopes", s.join(" "))), n && l.searchParams.set("login_redirect_url", n), i && l.searchParams.set("signup_redirect_url", i), window.location.href = l.toString();
1987
+ o && (re("startOAuthFlow").isStringArray("custom_scopes", o), l.searchParams.set("custom_scopes", o.join(" "))), n && l.searchParams.set("login_redirect_url", n), i && l.searchParams.set("signup_redirect_url", i), window.location.href = l.toString();
1988
1988
  case 23:
1989
1989
  case "end":
1990
1990
  return t.stop();
@@ -2000,15 +2000,15 @@ var ue = a(function e(t, r) {
2000
2000
  var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : function () {
2001
2001
  return Promise.resolve(void 0);
2002
2002
  },
2003
- i = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : se();
2003
+ i = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : oe();
2004
2004
  c(this, e), this._networkClient = t, this._subscriptionService = r, this.executeRecaptcha = n, this.dfpProtectedAuth = i;
2005
2005
  }
2006
2006
  return a(e, [{
2007
2007
  key: "authenticateStart",
2008
2008
  value: function value(e) {
2009
- return O(this, void 0, void 0, o().mark(function t() {
2009
+ return O(this, void 0, void 0, s().mark(function t() {
2010
2010
  var r, n, i;
2011
- return o().wrap(function (t) {
2011
+ return s().wrap(function (t) {
2012
2012
  for (;;) switch (t.prev = t.next) {
2013
2013
  case 0:
2014
2014
  return re("stytch.cryptoWallets.authenticateStart").isString("crypto_wallet_address", e.crypto_wallet_address).isString("crypto_wallet_type", e.crypto_wallet_type), r = !!this._subscriptionService.getSession(), t.next = 4, this.executeRecaptcha();
@@ -2033,9 +2033,9 @@ var ue = a(function e(t, r) {
2033
2033
  }, {
2034
2034
  key: "authenticate",
2035
2035
  value: function value(e) {
2036
- return O(this, void 0, void 0, o().mark(function t() {
2037
- var r, n, i, s;
2038
- return o().wrap(function (t) {
2036
+ return O(this, void 0, void 0, s().mark(function t() {
2037
+ var r, n, i, o;
2038
+ return s().wrap(function (t) {
2039
2039
  for (;;) switch (t.prev = t.next) {
2040
2040
  case 0:
2041
2041
  return re("stytch.cryptoWallets.authenticate").isString("signature", e.signature).isString("crypto_wallet_address", e.crypto_wallet_address).isString("crypto_wallet_type", e.crypto_wallet_type).isNumber("session_duration_minutes", e.session_duration_minutes), t.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
@@ -2055,15 +2055,15 @@ var ue = a(function e(t, r) {
2055
2055
  retryCallback: this.dfpProtectedAuth.retryWithCaptchaAndDFP
2056
2056
  });
2057
2057
  case 8:
2058
- return s = t.sent, this._subscriptionService.updateStateAndTokens({
2058
+ return o = t.sent, this._subscriptionService.updateStateAndTokens({
2059
2059
  state: {
2060
- session: s.session,
2061
- user: ne(s.__user)
2060
+ session: o.session,
2061
+ user: ne(o.__user)
2062
2062
  },
2063
- session_token: s.session_token,
2064
- session_jwt: s.session_jwt,
2063
+ session_token: o.session_token,
2064
+ session_jwt: o.session_jwt,
2065
2065
  intermediate_session_token: null
2066
- }), t.abrupt("return", ie(s));
2066
+ }), t.abrupt("return", ie(o));
2067
2067
  case 11:
2068
2068
  case "end":
2069
2069
  return t.stop();
@@ -2080,9 +2080,9 @@ var ue = a(function e(t, r) {
2080
2080
  return a(e, [{
2081
2081
  key: "create",
2082
2082
  value: function value(e) {
2083
- return O(this, void 0, void 0, o().mark(function t() {
2083
+ return O(this, void 0, void 0, s().mark(function t() {
2084
2084
  var r;
2085
- return o().wrap(function (t) {
2085
+ return s().wrap(function (t) {
2086
2086
  for (;;) switch (t.prev = t.next) {
2087
2087
  case 0:
2088
2088
  return re("stytch.totps.create").isNumber("expiration_minutes", e.expiration_minutes), t.next = 3, this._networkClient.fetchSDK({
@@ -2105,9 +2105,9 @@ var ue = a(function e(t, r) {
2105
2105
  }, {
2106
2106
  key: "authenticate",
2107
2107
  value: function value(e) {
2108
- return O(this, void 0, void 0, o().mark(function t() {
2109
- var r, n, i, s;
2110
- return o().wrap(function (t) {
2108
+ return O(this, void 0, void 0, s().mark(function t() {
2109
+ var r, n, i, o;
2110
+ return s().wrap(function (t) {
2111
2111
  for (;;) switch (t.prev = t.next) {
2112
2112
  case 0:
2113
2113
  return re("stytch.totps.authenticate").isNumber("session_duration_minutes", e.session_duration_minutes).isString("totp_code", e.totp_code), t.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
@@ -2125,15 +2125,15 @@ var ue = a(function e(t, r) {
2125
2125
  retryCallback: this.dfpProtectedAuth.retryWithCaptchaAndDFP
2126
2126
  });
2127
2127
  case 8:
2128
- return s = t.sent, this._subscriptionService.updateStateAndTokens({
2128
+ return o = t.sent, this._subscriptionService.updateStateAndTokens({
2129
2129
  state: {
2130
- session: s.session,
2131
- user: s.__user
2130
+ session: o.session,
2131
+ user: o.__user
2132
2132
  },
2133
- session_token: s.session_token,
2134
- session_jwt: s.session_jwt,
2133
+ session_token: o.session_token,
2134
+ session_jwt: o.session_jwt,
2135
2135
  intermediate_session_token: null
2136
- }), t.abrupt("return", ie(s));
2136
+ }), t.abrupt("return", ie(o));
2137
2137
  case 11:
2138
2138
  case "end":
2139
2139
  return t.stop();
@@ -2144,8 +2144,8 @@ var ue = a(function e(t, r) {
2144
2144
  }, {
2145
2145
  key: "recoveryCodes",
2146
2146
  value: function value() {
2147
- return O(this, void 0, void 0, o().mark(function e() {
2148
- return o().wrap(function (e) {
2147
+ return O(this, void 0, void 0, s().mark(function e() {
2148
+ return s().wrap(function (e) {
2149
2149
  for (;;) switch (e.prev = e.next) {
2150
2150
  case 0:
2151
2151
  return e.abrupt("return", this._networkClient.fetchSDK({
@@ -2163,9 +2163,9 @@ var ue = a(function e(t, r) {
2163
2163
  }, {
2164
2164
  key: "recover",
2165
2165
  value: function value(e) {
2166
- return O(this, void 0, void 0, o().mark(function t() {
2167
- var r, n, i, s;
2168
- return o().wrap(function (t) {
2166
+ return O(this, void 0, void 0, s().mark(function t() {
2167
+ var r, n, i, o;
2168
+ return s().wrap(function (t) {
2169
2169
  for (;;) switch (t.prev = t.next) {
2170
2170
  case 0:
2171
2171
  return re("stytch.totps.recover").isNumber("session_duration_minutes", e.session_duration_minutes).isString("recovery_code", e.recovery_code), t.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
@@ -2183,15 +2183,15 @@ var ue = a(function e(t, r) {
2183
2183
  retryCallback: this.dfpProtectedAuth.retryWithCaptchaAndDFP
2184
2184
  });
2185
2185
  case 8:
2186
- return s = t.sent, this._subscriptionService.updateStateAndTokens({
2186
+ return o = t.sent, this._subscriptionService.updateStateAndTokens({
2187
2187
  state: {
2188
- session: s.session,
2189
- user: s.__user
2188
+ session: o.session,
2189
+ user: o.__user
2190
2190
  },
2191
- session_token: s.session_token,
2192
- session_jwt: s.session_jwt,
2191
+ session_token: o.session_token,
2192
+ session_jwt: o.session_jwt,
2193
2193
  intermediate_session_token: null
2194
- }), t.abrupt("return", ie(s));
2194
+ }), t.abrupt("return", ie(o));
2195
2195
  case 11:
2196
2196
  case "end":
2197
2197
  return t.stop();
@@ -2202,7 +2202,7 @@ var ue = a(function e(t, r) {
2202
2202
  }]), e;
2203
2203
  }();
2204
2204
  function ve(e) {
2205
- for (var t = "==".slice(0, (4 - e.length % 4) % 4), r = e.replace(/-/g, "+").replace(/_/g, "/") + t, n = atob(r), i = new ArrayBuffer(n.length), o = new Uint8Array(i), s = 0; s < n.length; s++) o[s] = n.charCodeAt(s);
2205
+ for (var t = "==".slice(0, (4 - e.length % 4) % 4), r = e.replace(/-/g, "+").replace(/_/g, "/") + t, n = atob(r), i = new ArrayBuffer(n.length), s = new Uint8Array(i), o = 0; o < n.length; o++) s[o] = n.charCodeAt(o);
2206
2206
  return i;
2207
2207
  }
2208
2208
  function ye(t) {
@@ -2211,8 +2211,8 @@ function ye(t) {
2211
2211
  i = e(new Uint8Array(t));
2212
2212
  try {
2213
2213
  for (i.s(); !(r = i.n()).done;) {
2214
- var o = r.value;
2215
- n += String.fromCharCode(o);
2214
+ var s = r.value;
2215
+ n += String.fromCharCode(s);
2216
2216
  }
2217
2217
  } catch (e) {
2218
2218
  i.e(e);
@@ -2230,8 +2230,8 @@ function ke(e, r, n) {
2230
2230
  return ke(e, r[0], t);
2231
2231
  });
2232
2232
  if (r instanceof Object) {
2233
- for (var i = {}, o = 0, s = Object.entries(r); o < s.length; o++) {
2234
- var a = t(s[o], 2),
2233
+ for (var i = {}, s = 0, o = Object.entries(r); s < o.length; s++) {
2234
+ var a = t(o[s], 2),
2235
2235
  c = a[0],
2236
2236
  u = a[1];
2237
2237
  if (u.derive) {
@@ -2346,9 +2346,9 @@ function Be(e) {
2346
2346
  return ke(ye, Pe, e);
2347
2347
  }
2348
2348
  function Ie(e) {
2349
- return O(this, void 0, void 0, o().mark(function t() {
2349
+ return O(this, void 0, void 0, s().mark(function t() {
2350
2350
  var r;
2351
- return o().wrap(function (t) {
2351
+ return s().wrap(function (t) {
2352
2352
  for (;;) switch (t.prev = t.next) {
2353
2353
  case 0:
2354
2354
  return t.next = 2, navigator.credentials.create(De(e));
@@ -2368,9 +2368,9 @@ function Fe(e) {
2368
2368
  return ke(ye, Re, e);
2369
2369
  }
2370
2370
  function je(e) {
2371
- return O(this, void 0, void 0, o().mark(function t() {
2371
+ return O(this, void 0, void 0, s().mark(function t() {
2372
2372
  var r;
2373
- return o().wrap(function (t) {
2373
+ return s().wrap(function (t) {
2374
2374
  for (;;) switch (t.prev = t.next) {
2375
2375
  case 0:
2376
2376
  return t.next = 2, navigator.credentials.get(Le(e));
@@ -2391,9 +2391,9 @@ var Me = function () {
2391
2391
  key: "register",
2392
2392
  value: function value(e) {
2393
2393
  var t;
2394
- return O(this, void 0, void 0, o().mark(function r() {
2395
- var n, i, s, a;
2396
- return o().wrap(function (r) {
2394
+ return O(this, void 0, void 0, s().mark(function r() {
2395
+ var n, i, o, a;
2396
+ return s().wrap(function (r) {
2397
2397
  for (;;) switch (r.prev = r.next) {
2398
2398
  case 0:
2399
2399
  return re("stytch.webauthn.register").isOptionalString("domain", null == e ? void 0 : e.domain).isOptionalString("authenticator_type", null == e ? void 0 : e.authenticator_type), r.next = 3, this._networkClient.fetchSDK({
@@ -2410,12 +2410,12 @@ var Me = function () {
2410
2410
  publicKey: JSON.parse(i)
2411
2411
  });
2412
2412
  case 7:
2413
- return s = r.sent, r.next = 10, this._networkClient.fetchSDK({
2413
+ return o = r.sent, r.next = 10, this._networkClient.fetchSDK({
2414
2414
  url: "/webauthn/register",
2415
2415
  method: "POST",
2416
2416
  errorMessage: "Failed to register WebAuthn device",
2417
2417
  body: {
2418
- public_key_credential: JSON.stringify(s)
2418
+ public_key_credential: JSON.stringify(o)
2419
2419
  }
2420
2420
  });
2421
2421
  case 10:
@@ -2431,14 +2431,14 @@ var Me = function () {
2431
2431
  key: "authenticate",
2432
2432
  value: function value(e) {
2433
2433
  var t;
2434
- return O(this, void 0, void 0, o().mark(function r() {
2435
- var n, i, s, a, c, u, l;
2436
- return o().wrap(function (r) {
2434
+ return O(this, void 0, void 0, s().mark(function r() {
2435
+ var n, i, o, a, c, u, l;
2436
+ return s().wrap(function (r) {
2437
2437
  for (;;) switch (r.prev = r.next) {
2438
2438
  case 0:
2439
2439
  return re("stytch.webauthn.register").isOptionalString("domain", e.domain).isNumber("session_duration_minutes", e.session_duration_minutes), r.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
2440
2440
  case 3:
2441
- return n = r.sent, i = n.dfp_telemetry_id, s = n.captcha_token, r.next = 8, this._networkClient.fetchSDK({
2441
+ return n = r.sent, i = n.dfp_telemetry_id, o = n.captcha_token, r.next = 8, this._networkClient.fetchSDK({
2442
2442
  url: "/webauthn/authenticate/start",
2443
2443
  method: "POST",
2444
2444
  errorMessage: "Failed to start WebAuthn authentication",
@@ -2459,7 +2459,7 @@ var Me = function () {
2459
2459
  public_key_credential: JSON.stringify(u),
2460
2460
  session_duration_minutes: e.session_duration_minutes,
2461
2461
  dfp_telemetry_id: i,
2462
- captcha_token: s
2462
+ captcha_token: o
2463
2463
  },
2464
2464
  retryCallback: this.dfpProtectedAuth.retryWithCaptchaAndDFP
2465
2465
  });
@@ -2488,15 +2488,15 @@ var Me = function () {
2488
2488
  Ue = function () {
2489
2489
  function e(t, r, n) {
2490
2490
  var i = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : Ne,
2491
- o = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : se();
2492
- c(this, e), this._networkClient = t, this._subscriptionService = r, this._pkceManager = n, this._config = i, this.dfpProtectedAuth = o;
2491
+ s = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : oe();
2492
+ c(this, e), this._networkClient = t, this._subscriptionService = r, this._pkceManager = n, this._config = i, this.dfpProtectedAuth = s;
2493
2493
  }
2494
2494
  return a(e, [{
2495
2495
  key: "getCodeChallenge",
2496
2496
  value: function value() {
2497
- return O(this, void 0, void 0, o().mark(function e() {
2497
+ return O(this, void 0, void 0, s().mark(function e() {
2498
2498
  var t, r;
2499
- return o().wrap(function (e) {
2499
+ return s().wrap(function (e) {
2500
2500
  for (;;) switch (e.prev = e.next) {
2501
2501
  case 0:
2502
2502
  return e.next = 2, this._config;
@@ -2528,9 +2528,9 @@ var Me = function () {
2528
2528
  }, {
2529
2529
  key: "create",
2530
2530
  value: function value(e) {
2531
- return O(this, void 0, void 0, o().mark(function t() {
2532
- var r, n, i, s;
2533
- return o().wrap(function (t) {
2531
+ return O(this, void 0, void 0, s().mark(function t() {
2532
+ var r, n, i, o;
2533
+ return s().wrap(function (t) {
2534
2534
  for (;;) switch (t.prev = t.next) {
2535
2535
  case 0:
2536
2536
  return re("stytch.passwords.create").isString("password", e.password).isString("email", e.email).isNumber("session_duration_minutes", e.session_duration_minutes), t.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
@@ -2549,15 +2549,15 @@ var Me = function () {
2549
2549
  retryCallback: this.dfpProtectedAuth.retryWithCaptchaAndDFP
2550
2550
  });
2551
2551
  case 8:
2552
- return s = t.sent, this._subscriptionService.updateStateAndTokens({
2552
+ return o = t.sent, this._subscriptionService.updateStateAndTokens({
2553
2553
  state: {
2554
- session: s.session,
2555
- user: s.user
2554
+ session: o.session,
2555
+ user: o.user
2556
2556
  },
2557
- session_token: s.session_token,
2558
- session_jwt: s.session_jwt,
2557
+ session_token: o.session_token,
2558
+ session_jwt: o.session_jwt,
2559
2559
  intermediate_session_token: null
2560
- }), t.abrupt("return", ie(s));
2560
+ }), t.abrupt("return", ie(o));
2561
2561
  case 11:
2562
2562
  case "end":
2563
2563
  return t.stop();
@@ -2568,9 +2568,9 @@ var Me = function () {
2568
2568
  }, {
2569
2569
  key: "authenticate",
2570
2570
  value: function value(e) {
2571
- return O(this, void 0, void 0, o().mark(function t() {
2572
- var r, n, i, s;
2573
- return o().wrap(function (t) {
2571
+ return O(this, void 0, void 0, s().mark(function t() {
2572
+ var r, n, i, o;
2573
+ return s().wrap(function (t) {
2574
2574
  for (;;) switch (t.prev = t.next) {
2575
2575
  case 0:
2576
2576
  return re("stytch.passwords.authenticate").isString("password", e.password).isString("email", e.email).isNumber("session_duration_minutes", e.session_duration_minutes), t.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
@@ -2589,15 +2589,15 @@ var Me = function () {
2589
2589
  retryCallback: this.dfpProtectedAuth.retryWithCaptchaAndDFP
2590
2590
  });
2591
2591
  case 8:
2592
- return s = t.sent, this._subscriptionService.updateStateAndTokens({
2592
+ return o = t.sent, this._subscriptionService.updateStateAndTokens({
2593
2593
  state: {
2594
- session: s.session,
2595
- user: s.user
2594
+ session: o.session,
2595
+ user: o.user
2596
2596
  },
2597
- session_token: s.session_token,
2598
- session_jwt: s.session_jwt,
2597
+ session_token: o.session_token,
2598
+ session_jwt: o.session_jwt,
2599
2599
  intermediate_session_token: null
2600
- }), t.abrupt("return", ie(s));
2600
+ }), t.abrupt("return", ie(o));
2601
2601
  case 11:
2602
2602
  case "end":
2603
2603
  return t.stop();
@@ -2608,16 +2608,16 @@ var Me = function () {
2608
2608
  }, {
2609
2609
  key: "resetByEmailStart",
2610
2610
  value: function value(e) {
2611
- return O(this, void 0, void 0, o().mark(function t() {
2612
- var r, n, i, s;
2613
- return o().wrap(function (t) {
2611
+ return O(this, void 0, void 0, s().mark(function t() {
2612
+ var r, n, i, o;
2613
+ return s().wrap(function (t) {
2614
2614
  for (;;) switch (t.prev = t.next) {
2615
2615
  case 0:
2616
2616
  return re("stytch.passwords.resetByEmailStart").isString("email", e.email).isOptionalString("login_redirect_url", e.login_redirect_url).isOptionalString("reset_password_redirect_url", e.reset_password_redirect_url).isOptionalString("reset_password_template_id", e.reset_password_template_id).isOptionalNumber("reset_password_expiration_minutes", e.reset_password_expiration_minutes), t.next = 3, this.getCodeChallenge();
2617
2617
  case 3:
2618
2618
  return r = t.sent, t.next = 6, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
2619
2619
  case 6:
2620
- return n = t.sent, i = n.dfp_telemetry_id, s = n.captcha_token, t.abrupt("return", this._networkClient.retriableFetchSDK({
2620
+ return n = t.sent, i = n.dfp_telemetry_id, o = n.captcha_token, t.abrupt("return", this._networkClient.retriableFetchSDK({
2621
2621
  url: "/passwords/email/reset/start",
2622
2622
  method: "POST",
2623
2623
  errorMessage: "Failed to start password reset flow.",
@@ -2628,7 +2628,7 @@ var Me = function () {
2628
2628
  reset_password_expiration_minutes: e.reset_password_expiration_minutes,
2629
2629
  reset_password_template_id: e.reset_password_template_id,
2630
2630
  code_challenge: r,
2631
- captcha_token: s,
2631
+ captcha_token: o,
2632
2632
  dfp_telemetry_id: i
2633
2633
  },
2634
2634
  retryCallback: this.dfpProtectedAuth.retryWithCaptchaAndDFP
@@ -2643,16 +2643,16 @@ var Me = function () {
2643
2643
  }, {
2644
2644
  key: "resetByEmail",
2645
2645
  value: function value(e) {
2646
- return O(this, void 0, void 0, o().mark(function t() {
2647
- var r, n, i, s, a, c;
2648
- return o().wrap(function (t) {
2646
+ return O(this, void 0, void 0, s().mark(function t() {
2647
+ var r, n, i, o, a, c;
2648
+ return s().wrap(function (t) {
2649
2649
  for (;;) switch (t.prev = t.next) {
2650
2650
  case 0:
2651
2651
  return re("stytch.passwords.resetByEmail").isString("token", e.token).isString("password", e.password).isNumber("session_duration_minutes", e.session_duration_minutes), t.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
2652
2652
  case 3:
2653
2653
  return r = t.sent, n = r.dfp_telemetry_id, i = r.captcha_token, t.next = 8, this._pkceManager.getPKPair();
2654
2654
  case 8:
2655
- return s = t.sent, a = null == s ? void 0 : s.code_verifier, t.next = 12, this._networkClient.retriableFetchSDK({
2655
+ return o = t.sent, a = null == o ? void 0 : o.code_verifier, t.next = 12, this._networkClient.retriableFetchSDK({
2656
2656
  url: "/passwords/email/reset",
2657
2657
  method: "POST",
2658
2658
  errorMessage: "Failed to reset password.",
@@ -2686,9 +2686,9 @@ var Me = function () {
2686
2686
  }, {
2687
2687
  key: "resetByExistingPassword",
2688
2688
  value: function value(e) {
2689
- return O(this, void 0, void 0, o().mark(function t() {
2690
- var r, n, i, s;
2691
- return o().wrap(function (t) {
2689
+ return O(this, void 0, void 0, s().mark(function t() {
2690
+ var r, n, i, o;
2691
+ return s().wrap(function (t) {
2692
2692
  for (;;) switch (t.prev = t.next) {
2693
2693
  case 0:
2694
2694
  return re("stytch.passwords.resetByExistingPassword").isString("email", e.email).isString("existing_password", e.existing_password).isString("new_password", e.new_password).isNumber("session_duration_minutes", e.session_duration_minutes), t.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
@@ -2708,15 +2708,15 @@ var Me = function () {
2708
2708
  retryCallback: this.dfpProtectedAuth.retryWithCaptchaAndDFP
2709
2709
  });
2710
2710
  case 8:
2711
- return s = t.sent, this._subscriptionService.updateStateAndTokens({
2711
+ return o = t.sent, this._subscriptionService.updateStateAndTokens({
2712
2712
  state: {
2713
- session: s.session,
2714
- user: s.user
2713
+ session: o.session,
2714
+ user: o.user
2715
2715
  },
2716
- session_token: s.session_token,
2717
- session_jwt: s.session_jwt,
2716
+ session_token: o.session_token,
2717
+ session_jwt: o.session_jwt,
2718
2718
  intermediate_session_token: null
2719
- }), t.abrupt("return", ie(s));
2719
+ }), t.abrupt("return", ie(o));
2720
2720
  case 11:
2721
2721
  case "end":
2722
2722
  return t.stop();
@@ -2727,9 +2727,9 @@ var Me = function () {
2727
2727
  }, {
2728
2728
  key: "resetBySession",
2729
2729
  value: function value(e) {
2730
- return O(this, void 0, void 0, o().mark(function t() {
2731
- var r, n, i, s;
2732
- return o().wrap(function (t) {
2730
+ return O(this, void 0, void 0, s().mark(function t() {
2731
+ var r, n, i, o;
2732
+ return s().wrap(function (t) {
2733
2733
  for (;;) switch (t.prev = t.next) {
2734
2734
  case 0:
2735
2735
  return re("stytch.passwords.resetBySession").isString("password", e.password), t.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
@@ -2737,7 +2737,7 @@ var Me = function () {
2737
2737
  return r = t.sent, n = r.dfp_telemetry_id, i = r.captcha_token, t.next = 8, this._networkClient.retriableFetchSDK({
2738
2738
  url: "/passwords/session/reset",
2739
2739
  method: "POST",
2740
- errorMessage: "Failed to reset session.",
2740
+ errorMessage: "Failed to reset by session.",
2741
2741
  body: {
2742
2742
  password: e.password,
2743
2743
  session_duration_minutes: e.session_duration_minutes,
@@ -2747,15 +2747,15 @@ var Me = function () {
2747
2747
  retryCallback: this.dfpProtectedAuth.retryWithCaptchaAndDFP
2748
2748
  });
2749
2749
  case 8:
2750
- return s = t.sent, this._subscriptionService.updateStateAndTokens({
2750
+ return o = t.sent, this._subscriptionService.updateStateAndTokens({
2751
2751
  state: {
2752
- session: s.session,
2753
- user: s.user
2752
+ session: o.session,
2753
+ user: o.user
2754
2754
  },
2755
- session_token: s.session_token,
2756
- session_jwt: s.session_jwt,
2755
+ session_token: o.session_token,
2756
+ session_jwt: o.session_jwt,
2757
2757
  intermediate_session_token: null
2758
- }), t.abrupt("return", s);
2758
+ }), t.abrupt("return", o);
2759
2759
  case 11:
2760
2760
  case "end":
2761
2761
  return t.stop();
@@ -2766,8 +2766,8 @@ var Me = function () {
2766
2766
  }, {
2767
2767
  key: "strengthCheck",
2768
2768
  value: function value(e) {
2769
- return O(this, void 0, void 0, o().mark(function t() {
2770
- return o().wrap(function (t) {
2769
+ return O(this, void 0, void 0, s().mark(function t() {
2770
+ return s().wrap(function (t) {
2771
2771
  for (;;) switch (t.prev = t.next) {
2772
2772
  case 0:
2773
2773
  return re("stytch.passwords.strengthCheck").isOptionalString("email", e.email).isString("password", e.password), t.abrupt("return", this._networkClient.fetchSDK({
@@ -2812,26 +2812,26 @@ var Ke = function () {
2812
2812
  }, {
2813
2813
  key: "call",
2814
2814
  value: function value(e, t) {
2815
- return O(this, void 0, void 0, o().mark(function r() {
2815
+ return O(this, void 0, void 0, s().mark(function r() {
2816
2816
  var n,
2817
2817
  i,
2818
- s = this;
2819
- return o().wrap(function (r) {
2818
+ o = this;
2819
+ return s().wrap(function (r) {
2820
2820
  for (;;) switch (r.prev = r.next) {
2821
2821
  case 0:
2822
2822
  return r.next = 2, this.frame;
2823
2823
  case 2:
2824
- return n = r.sent, i = new MessageChannel(), r.abrupt("return", new Promise(function (r, o) {
2824
+ return n = r.sent, i = new MessageChannel(), r.abrupt("return", new Promise(function (r, s) {
2825
2825
  var a;
2826
2826
  i.port1.onmessage = function (e) {
2827
2827
  var t = e.data;
2828
- i.port1.close(), t.success ? r(t.payload) : o(ae.unmarshall(t.error));
2828
+ i.port1.close(), t.success ? r(t.payload) : s(ae.unmarshall(t.error));
2829
2829
  };
2830
2830
  var c = {
2831
2831
  method: e,
2832
2832
  args: t
2833
2833
  };
2834
- null === (a = n.contentWindow) || void 0 === a || a.postMessage(c, s.iframeURL, [i.port2]);
2834
+ null === (a = n.contentWindow) || void 0 === a || a.postMessage(c, o.iframeURL, [i.port2]);
2835
2835
  }));
2836
2836
  case 5:
2837
2837
  case "end":
@@ -2848,9 +2848,9 @@ var Ke = function () {
2848
2848
  c(this, e), this._subscriptionService = t, this._headlessSessionClient = r, this._onDataChange = function (e) {
2849
2849
  (null == e ? void 0 : e.session) ? n.scheduleBackgroundRefresh() : n.cancelBackgroundRefresh();
2850
2850
  }, this._reauthenticateWithBackoff = function () {
2851
- return O(n, void 0, void 0, o().mark(function t() {
2851
+ return O(n, void 0, void 0, s().mark(function t() {
2852
2852
  var r;
2853
- return o().wrap(function (t) {
2853
+ return s().wrap(function (t) {
2854
2854
  for (;;) switch (t.prev = t.next) {
2855
2855
  case 0:
2856
2856
  r = 0;
@@ -3021,30 +3021,31 @@ var Ge = /*#__PURE__*/function () {
3021
3021
  return Ge;
3022
3022
  }();
3023
3023
  function He(e, t, r, n) {
3024
- return new (r || (r = Promise))(function (i, o) {
3025
- function s(e) {
3024
+ return new (r || (r = Promise))(function (i, s) {
3025
+ function o(e) {
3026
3026
  try {
3027
3027
  c(n.next(e));
3028
3028
  } catch (e) {
3029
- o(e);
3029
+ s(e);
3030
3030
  }
3031
3031
  }
3032
3032
  function a(e) {
3033
3033
  try {
3034
3034
  c(n["throw"](e));
3035
3035
  } catch (e) {
3036
- o(e);
3036
+ s(e);
3037
3037
  }
3038
3038
  }
3039
3039
  function c(e) {
3040
3040
  var t;
3041
3041
  e.done ? i(e.value) : (t = e.value, t instanceof r ? t : new r(function (e) {
3042
3042
  e(t);
3043
- })).then(s, a);
3043
+ })).then(o, a);
3044
3044
  }
3045
3045
  c((n = n.apply(e, t || [])).next());
3046
3046
  });
3047
3047
  }
3048
+ "function" == typeof SuppressedError && SuppressedError;
3048
3049
  var ze = /*#__PURE__*/_createClass(function ze(e) {
3049
3050
  var _this2 = this;
3050
3051
  _classCallCheck(this, ze);
@@ -3152,7 +3153,7 @@ function Ve(e) {
3152
3153
  function Je(e, t) {
3153
3154
  for (var r = 0; r < t.length; r++) {
3154
3155
  var n = t[r];
3155
- n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, (i = n.key, o = void 0, o = function (e, t) {
3156
+ n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, (i = n.key, s = void 0, s = function (e, t) {
3156
3157
  if ("object" !== Ve(e) || null === e) return e;
3157
3158
  var r = e[Symbol.toPrimitive];
3158
3159
  if (void 0 !== r) {
@@ -3161,9 +3162,9 @@ function Je(e, t) {
3161
3162
  throw new TypeError("@@toPrimitive must return a primitive value.");
3162
3163
  }
3163
3164
  return ("string" === t ? String : Number)(e);
3164
- }(i, "string"), "symbol" === Ve(o) ? o : String(o)), n);
3165
+ }(i, "string"), "symbol" === Ve(s) ? s : String(s)), n);
3165
3166
  }
3166
- var i, o;
3167
+ var i, s;
3167
3168
  }
3168
3169
  function $e(e, t, r) {
3169
3170
  return t && Je(e.prototype, t), r && Je(e, r), Object.defineProperty(e, "prototype", {
@@ -3189,9 +3190,9 @@ function Qe(e) {
3189
3190
  var t = nt();
3190
3191
  return function () {
3191
3192
  var r,
3192
- n = ot(e);
3193
+ n = st(e);
3193
3194
  if (t) {
3194
- var i = ot(this).constructor;
3195
+ var i = st(this).constructor;
3195
3196
  r = Reflect.construct(n, arguments, i);
3196
3197
  } else r = n.apply(this, arguments);
3197
3198
  return function (e, t) {
@@ -3216,7 +3217,7 @@ function tt(e) {
3216
3217
  t.set(e, n);
3217
3218
  }
3218
3219
  function n() {
3219
- return rt(e, arguments, ot(this).constructor);
3220
+ return rt(e, arguments, st(this).constructor);
3220
3221
  }
3221
3222
  return n.prototype = Object.create(e.prototype, {
3222
3223
  constructor: {
@@ -3251,10 +3252,10 @@ function it(e, t) {
3251
3252
  return e.__proto__ = t, e;
3252
3253
  }, it(e, t);
3253
3254
  }
3254
- function ot(e) {
3255
- return ot = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (e) {
3255
+ function st(e) {
3256
+ return st = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (e) {
3256
3257
  return e.__proto__ || Object.getPrototypeOf(e);
3257
- }, ot(e);
3258
+ }, st(e);
3258
3259
  }
3259
3260
  exports.Products = void 0, function (e) {
3260
3261
  e.emailMagicLinks = "emailMagicLinks", e.oauth = "oauth", e.otp = "otp", e.crypto = "crypto", e.passwords = "passwords";
@@ -3269,7 +3270,7 @@ exports.Products = void 0, function (e) {
3269
3270
  }(exports.OTPMethods || (exports.OTPMethods = {})), exports.StytchEventType = void 0, function (e) {
3270
3271
  e.MagicLinkLoginOrCreateEvent = "MAGIC_LINK_LOGIN_OR_CREATE", e.OTPsLoginOrCreateEvent = "OTP_LOGIN_OR_CREATE", e.OTPsAuthenticate = "OTP_AUTHENTICATE", e.CryptoWalletAuthenticateStart = "CRYPTO_WALLET_AUTHENTICATE_START", e.CryptoWalletAuthenticate = "CRYPTO_WALLET_AUTHENTICATE", e.PasswordCreate = "PASSWORD_CREATE", e.PasswordAuthenticate = "PASSWORD_AUTHENTICATE", e.PasswordResetByEmailStart = "PASSWORD_RESET_BY_EMAIL_START", e.PasswordResetByEmail = "PASSWORD_RESET_BY_EMAIL", e.B2BMagicLinkEmailLoginOrSignup = "B2B_MAGIC_LINK_EMAIL_LOGIN_OR_SIGNUP", e.B2BMagicLinkAuthenticate = "B2B_MAGIC_LINK_AUTHENTICATE", e.B2BMagicLinkEmailDiscoverySend = "B2B_MAGIC_LINK_EMAIL_DISCOVERY_SEND", e.B2BMagicLinkDiscoveryAuthenticate = "B2B_MAGIC_LINK_DISCOVERY_AUTHENTICATE", e.B2BSSOStart = "B2B_SSO_START", e.B2BSSOAuthenticate = "B2B_SSO_AUTHENTICATE", e.B2BOAuthAuthenticate = "B2B_SSO_AUTHENTICATE", e.B2BOAuthDiscoveryAuthenticate = "B2B_OAUTH_DISCOVERY_AUTHENTICATE", e.B2BDiscoveryOrganizationsCreate = "B2B_DISCOVERY_ORGANIZATIONS_CREATE", e.B2BDiscoveryIntermediateSessionExchange = "B2B_DISCOVERY_INTERMEDIATE_SESSION_EXCHANGE", e.B2BPasswordAuthenticate = "B2B_PASSWORD_AUTHENTICATE", e.B2BPasswordResetByEmailStart = "B2B_PASSWORD_RESET_BY_EMAIL_START", e.B2BPasswordResetByEmail = "B2B_PASSWORD_RESET_BY_EMAIL", e.B2BPasswordResetBySession = "B2B_PASSWORD_RESET_BY_SESSION";
3271
3272
  }(exports.StytchEventType || (exports.StytchEventType = {}));
3272
- var st = function (e) {
3273
+ var ot = function (e) {
3273
3274
  Ze(r, tt(Error));
3274
3275
  var t = Qe(r);
3275
3276
  function r(e, n) {
@@ -3293,10 +3294,10 @@ var st = function (e) {
3293
3294
  function r(e) {
3294
3295
  var n, i;
3295
3296
  Xe(this, r), (n = t.call(this)).name = "StytchSDKSchemaError";
3296
- var o = null === (i = e.body) || void 0 === i ? void 0 : i.map(function (e) {
3297
+ var s = null === (i = e.body) || void 0 === i ? void 0 : i.map(function (e) {
3297
3298
  return "".concat(e.dataPath, ": ").concat(e.message);
3298
3299
  }).join("\n");
3299
- return n.message = "[400] Request does not match expected schema\n".concat(o), n;
3300
+ return n.message = "[400] Request does not match expected schema\n".concat(s), n;
3300
3301
  }
3301
3302
  return $e(r);
3302
3303
  }(),
@@ -3307,11 +3308,11 @@ var st = function (e) {
3307
3308
  var n;
3308
3309
  Xe(this, r), (n = t.call(this)).name = "StytchSDKAPIError";
3309
3310
  var i = e.status_code,
3310
- o = e.error_type,
3311
- s = e.error_message,
3311
+ s = e.error_type,
3312
+ o = e.error_message,
3312
3313
  a = e.error_url,
3313
3314
  c = e.request_id;
3314
- return n.error_type = o, n.error_message = s, n.error_url = a, n.request_id = c, n.status_code = i, n.message = "[".concat(i, "] ").concat(o, "\n") + "".concat(s, "\n") + "See ".concat(a, " for more information.\n") + (c ? "request_id: ".concat(c, "\n") : ""), n;
3315
+ return n.error_type = s, n.error_message = o, n.error_url = a, n.request_id = c, n.status_code = i, n.message = "[".concat(i, "] ").concat(s, "\n") + "".concat(o, "\n") + "See ".concat(a, " for more information.\n") + (c ? "request_id: ".concat(c, "\n") : ""), n;
3315
3316
  }
3316
3317
  return $e(r);
3317
3318
  }(),
@@ -3336,10 +3337,10 @@ exports.BiometricsErrors = void 0, function (e) {
3336
3337
  var dt = /*#__PURE__*/function (_fe) {
3337
3338
  _inherits(dt, _fe);
3338
3339
  var _super = _createSuper(dt);
3339
- function dt(e, t, r, n, i, o) {
3340
+ function dt(e, t, r, n, i, s) {
3340
3341
  var _this4;
3341
3342
  _classCallCheck(this, dt);
3342
- _this4 = _super.call(this, e, t, r, n, i), _this4._oneTap = o, _this4.startOneTap = function (e) {
3343
+ _this4 = _super.call(this, e, t, r, n, i), _this4._oneTap = s, _this4.startOneTap = function (e) {
3343
3344
  return He(_assertThisInitialized(_this4), void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
3344
3345
  var t, r, n;
3345
3346
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
@@ -3422,7 +3423,7 @@ var ht = /*#__PURE__*/function () {
3422
3423
  },
3423
3424
  sdk: {
3424
3425
  identifier: "Stytch.js Javascript SDK",
3425
- version: "3.0.1"
3426
+ version: "3.0.2"
3426
3427
  }
3427
3428
  });
3428
3429
  }
@@ -3434,18 +3435,18 @@ var ht = /*#__PURE__*/function () {
3434
3435
  r = _ref2.errorMessage,
3435
3436
  n = _ref2.method;
3436
3437
  return He(this, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
3437
- var i, o, s, a;
3438
+ var i, s, o, a;
3438
3439
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
3439
3440
  while (1) switch (_context4.prev = _context4.next) {
3440
3441
  case 0:
3441
- i = this._subscriptionDataLayer.readSessionCookie().session_token, o = "Basic " + window.btoa(this._publicToken + ":" + (i || this._publicToken)), s = window.btoa(JSON.stringify(this.createTelemetryBlob())), a = window.location.origin;
3442
+ i = this._subscriptionDataLayer.readSessionCookie().session_token, s = "Basic " + window.btoa(this._publicToken + ":" + (i || this._publicToken)), o = window.btoa(JSON.stringify(this.createTelemetryBlob())), a = window.location.origin;
3442
3443
  return _context4.abrupt("return", N({
3443
- basicAuthHeader: o,
3444
+ basicAuthHeader: s,
3444
3445
  body: t,
3445
3446
  errorMessage: r,
3446
3447
  finalURL: this.buildSDKUrl(e),
3447
3448
  method: n,
3448
- xSDKClientHeader: s,
3449
+ xSDKClientHeader: o,
3449
3450
  xSDKParentHostHeader: a
3450
3451
  }));
3451
3452
  case 2:
@@ -3464,23 +3465,23 @@ var ht = /*#__PURE__*/function () {
3464
3465
  n = _ref3.method,
3465
3466
  i = _ref3.retryCallback;
3466
3467
  return He(this, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
3467
- var s, a, c, u;
3468
+ var o, a, c, u;
3468
3469
  return _regeneratorRuntime().wrap(function _callee5$(_context5) {
3469
3470
  while (1) switch (_context5.prev = _context5.next) {
3470
3471
  case 0:
3471
- s = this._subscriptionDataLayer.readSessionCookie().session_token, a = "Basic " + window.btoa(this._publicToken + ":" + (s || this._publicToken)), c = window.btoa(JSON.stringify(this.createTelemetryBlob())), u = window.location.origin;
3472
+ o = this._subscriptionDataLayer.readSessionCookie().session_token, a = "Basic " + window.btoa(this._publicToken + ":" + (o || this._publicToken)), c = window.btoa(JSON.stringify(this.createTelemetryBlob())), u = window.location.origin;
3472
3473
  return _context5.abrupt("return", function (e) {
3473
3474
  var t = e.method,
3474
3475
  r = e.errorMessage,
3475
3476
  n = e.finalURL,
3476
3477
  i = e.basicAuthHeader,
3477
- s = e.xSDKClientHeader,
3478
+ o = e.xSDKClientHeader,
3478
3479
  a = e.xSDKParentHostHeader,
3479
3480
  c = e.body,
3480
3481
  u = e.retryCallback;
3481
- return O(this, void 0, void 0, o().mark(function e() {
3482
+ return O(this, void 0, void 0, s().mark(function e() {
3482
3483
  var l;
3483
- return o().wrap(function (e) {
3484
+ return s().wrap(function (e) {
3484
3485
  for (;;) switch (e.prev = e.next) {
3485
3486
  case 0:
3486
3487
  return l = {
@@ -3488,7 +3489,7 @@ var ht = /*#__PURE__*/function () {
3488
3489
  errorMessage: r,
3489
3490
  finalURL: n,
3490
3491
  basicAuthHeader: i,
3491
- xSDKClientHeader: s,
3492
+ xSDKClientHeader: o,
3492
3493
  xSDKParentHostHeader: a,
3493
3494
  body: c
3494
3495
  }, e.prev = 1, e.next = 4, N(l);
@@ -3605,7 +3606,7 @@ var ft = /*#__PURE__*/function () {
3605
3606
  r = _ref5.onSuccess;
3606
3607
  return function (n) {
3607
3608
  return He(_this6, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
3608
- var i, _yield$this$submitGoo, o;
3609
+ var i, _yield$this$submitGoo, s;
3609
3610
  return _regeneratorRuntime().wrap(function _callee7$(_context7) {
3610
3611
  while (1) switch (_context7.prev = _context7.next) {
3611
3612
  case 0:
@@ -3618,8 +3619,8 @@ var ft = /*#__PURE__*/function () {
3618
3619
  });
3619
3620
  case 3:
3620
3621
  _yield$this$submitGoo = _context7.sent;
3621
- o = _yield$this$submitGoo.redirect_url;
3622
- r(o);
3622
+ s = _yield$this$submitGoo.redirect_url;
3623
+ r(s);
3623
3624
  case 6:
3624
3625
  case "end":
3625
3626
  return _context7.stop();
@@ -3885,9 +3886,9 @@ var bt = function e(t, r) {
3885
3886
  function n(e, n, i) {
3886
3887
  if ("undefined" != typeof document) {
3887
3888
  "number" == typeof (i = gt({}, r, i)).expires && (i.expires = new Date(Date.now() + 864e5 * i.expires)), i.expires && (i.expires = i.expires.toUTCString()), e = encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
3888
- var o = "";
3889
- for (var s in i) i[s] && (o += "; " + s, !0 !== i[s] && (o += "=" + i[s].split(";")[0]));
3890
- return document.cookie = e + "=" + t.write(n, e) + o;
3889
+ var s = "";
3890
+ for (var o in i) i[o] && (s += "; " + o, !0 !== i[o] && (s += "=" + i[o].split(";")[0]));
3891
+ return document.cookie = e + "=" + t.write(n, e) + s;
3891
3892
  }
3892
3893
  }
3893
3894
  return Object.create({
@@ -3895,11 +3896,11 @@ var bt = function e(t, r) {
3895
3896
  get: function get(e) {
3896
3897
  if ("undefined" != typeof document && (!arguments.length || e)) {
3897
3898
  for (var r = document.cookie ? document.cookie.split("; ") : [], n = {}, i = 0; i < r.length; i++) {
3898
- var o = r[i].split("="),
3899
- s = o.slice(1).join("=");
3899
+ var s = r[i].split("="),
3900
+ o = s.slice(1).join("=");
3900
3901
  try {
3901
- var a = decodeURIComponent(o[0]);
3902
- if (n[a] = t.read(s, a), e === a) break;
3902
+ var a = decodeURIComponent(s[0]);
3903
+ if (n[a] = t.read(o, a), e === a) break;
3903
3904
  } catch (e) {}
3904
3905
  }
3905
3906
  return e ? n[e] : n;
@@ -3998,18 +3999,18 @@ var wt = /*#__PURE__*/function () {
3998
3999
  key: "writeSessionCookie",
3999
4000
  value: function writeSessionCookie(e) {
4000
4001
  var t, r, n, i;
4001
- var o = e.state,
4002
- s = e.session_token,
4002
+ var s = e.state,
4003
+ o = e.session_token,
4003
4004
  a = e.session_jwt,
4004
4005
  c = wt.generateCookieOpts({
4005
- expiresAt: null !== (r = null === (t = null == o ? void 0 : o.session) || void 0 === t ? void 0 : t.expires_at) && void 0 !== r ? r : "",
4006
+ expiresAt: null !== (r = null === (t = null == s ? void 0 : s.session) || void 0 === t ? void 0 : t.expires_at) && void 0 !== r ? r : "",
4006
4007
  availableToSubdomains: this._cookieAvailableToSubdomains,
4007
4008
  path: this._cookiePath,
4008
4009
  domain: this._domain
4009
4010
  });
4010
- bt.set(this.opaqueTokenCookieName, s, c), bt.set(this.jwtCookieName, a, c);
4011
+ bt.set(this.opaqueTokenCookieName, o, c), bt.set(this.jwtCookieName, a, c);
4011
4012
  var u = wt.generateCookieOpts({
4012
- expiresAt: null !== (i = null === (n = null == o ? void 0 : o.session) || void 0 === n ? void 0 : n.expires_at) && void 0 !== i ? i : "",
4013
+ expiresAt: null !== (i = null === (n = null == s ? void 0 : s.session) || void 0 === n ? void 0 : n.expires_at) && void 0 !== i ? i : "",
4013
4014
  availableToSubdomains: !this._cookieAvailableToSubdomains,
4014
4015
  path: this._cookiePath,
4015
4016
  domain: this._domain
@@ -4119,18 +4120,18 @@ var Tt = Symbol["for"]("__stytch_DataLayer"),
4119
4120
  At = function () {
4120
4121
  var e = (arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}).KEYS_TO_EXCLUDE,
4121
4122
  r = void 0 === e ? [] : e;
4122
- return function e(n, o) {
4123
- return i(n) === i(o) && (null === n || null === o ? n === o : "object" === i(n) ? Object.keys(n).length === Object.keys(o).length && !Object.keys(n).some(function (e) {
4124
- return !(e in o);
4123
+ return function e(n, s) {
4124
+ return i(n) === i(s) && (null === n || null === s ? n === s : "object" === i(n) ? Object.keys(n).length === Object.keys(s).length && !Object.keys(n).some(function (e) {
4125
+ return !(e in s);
4125
4126
  }) && Object.entries(n).filter(function (e) {
4126
4127
  var n = t(e, 1)[0];
4127
4128
  return !r.includes(n);
4128
4129
  }).every(function (r) {
4129
4130
  var n = t(r, 2),
4130
4131
  i = n[0],
4131
- s = n[1];
4132
- return e(s, o[i]);
4133
- }) : n === o);
4132
+ o = n[1];
4133
+ return e(o, s[i]);
4134
+ }) : n === s);
4134
4135
  };
4135
4136
  }({
4136
4137
  KEYS_TO_EXCLUDE: ["last_accessed_at"]
@@ -4256,7 +4257,7 @@ var Pt = /*#__PURE__*/function (_Et) {
4256
4257
  return _createClass(Pt);
4257
4258
  }(Et);
4258
4259
  var xt = Symbol["for"]("stytch__internal_b2c");
4259
- exports.SDKAPIUnreachableError = st, exports.StytchHeadlessClient = /*#__PURE__*/function () {
4260
+ exports.SDKAPIUnreachableError = ot, exports.StytchHeadlessClient = /*#__PURE__*/function () {
4260
4261
  function _class(e, t) {
4261
4262
  var _this11 = this;
4262
4263
  _classCallCheck(this, _class);
@@ -4266,20 +4267,20 @@ exports.SDKAPIUnreachableError = st, exports.StytchHeadlessClient = /*#__PURE__*
4266
4267
  if ("undefined" == typeof window) throw new Error("The ".concat(e, " is not compatible with server-side environments.\nIf using nextjs, use the create").concat(e, " method instead.\n```\n").concat(t, "\n```\n"));
4267
4268
  }("StytchHeadlessClient"), "string" != typeof (r = e) ? Q("Public token is malformed. Expected a string, got ".concat(i(r), ".").concat(te)) : "" === r ? Q('Public token is malformed. Expected "public-token-...", got an empty string.'.concat(te)) : r.startsWith("public-token-") || Q('Public token is malformed. Expected "public-token-...", got '.concat(r, ".").concat(te));
4268
4269
  var n = t,
4269
- o = {
4270
- cookieOptions: null == (s = n) ? void 0 : s.cookieOptions,
4270
+ s = {
4271
+ cookieOptions: null == (o = n) ? void 0 : o.cookieOptions,
4271
4272
  endpoints: {
4272
- sdkBackendURL: null !== (c = null === (a = null == s ? void 0 : s.endpoints) || void 0 === a ? void 0 : a.sdkBackendURL) && void 0 !== c ? c : "https://web.stytch.com",
4273
- testAPIURL: null !== (l = null === (u = null == s ? void 0 : s.endpoints) || void 0 === u ? void 0 : u.testAPIURL) && void 0 !== l ? l : "https://test.stytch.com",
4274
- liveAPIURL: null !== (h = null === (d = null == s ? void 0 : s.endpoints) || void 0 === d ? void 0 : d.liveAPIURL) && void 0 !== h ? h : "https://api.stytch.com",
4275
- dfpBackendURL: null !== (f = null === (p = null == s ? void 0 : s.endpoints) || void 0 === p ? void 0 : p.dfpBackendURL) && void 0 !== f ? f : "https://telemetry.stytch.com",
4276
- clientsideServicesIframeURL: null !== (m = null === (_ = null == s ? void 0 : s.endpoints) || void 0 === _ ? void 0 : _.clientsideServicesIframeURL) && void 0 !== m ? m : "https://js.stytch.com/clientside-services/index.html"
4273
+ sdkBackendURL: null !== (c = null === (a = null == o ? void 0 : o.endpoints) || void 0 === a ? void 0 : a.sdkBackendURL) && void 0 !== c ? c : "https://web.stytch.com",
4274
+ testAPIURL: null !== (l = null === (u = null == o ? void 0 : o.endpoints) || void 0 === u ? void 0 : u.testAPIURL) && void 0 !== l ? l : "https://test.stytch.com",
4275
+ liveAPIURL: null !== (h = null === (d = null == o ? void 0 : o.endpoints) || void 0 === d ? void 0 : d.liveAPIURL) && void 0 !== h ? h : "https://api.stytch.com",
4276
+ dfpBackendURL: null !== (f = null === (p = null == o ? void 0 : o.endpoints) || void 0 === p ? void 0 : p.dfpBackendURL) && void 0 !== f ? f : "https://telemetry.stytch.com",
4277
+ clientsideServicesIframeURL: null !== (m = null === (_ = null == o ? void 0 : o.endpoints) || void 0 === _ ? void 0 : _.clientsideServicesIframeURL) && void 0 !== m ? m : "https://js.stytch.com/clientside-services/index.html"
4277
4278
  }
4278
4279
  };
4279
- var s, a, c, u, l, d, h, p, f, _, m;
4280
+ var o, a, c, u, l, d, h, p, f, _, m;
4280
4281
  this._dataLayer = Ct(e, n), this._subscriptionService = new Pt(e, this._dataLayer);
4281
4282
  var v = new mt(this._dataLayer, "passwords");
4282
- this._networkClient = new ht(e, this._dataLayer, o.endpoints.sdkBackendURL, function () {
4283
+ this._networkClient = new ht(e, this._dataLayer, s.endpoints.sdkBackendURL, function () {
4283
4284
  var e, t, r, n;
4284
4285
  return {
4285
4286
  stytch_user_id: null === (t = null === (e = _this11._dataLayer.state) || void 0 === e ? void 0 : e.user) || void 0 === t ? void 0 : t.user_id,
@@ -4288,15 +4289,15 @@ exports.SDKAPIUnreachableError = st, exports.StytchHeadlessClient = /*#__PURE__*
4288
4289
  });
4289
4290
  var y = new Ge(e, this._networkClient, this._dataLayer),
4290
4291
  g = new ze(y.getAsync()),
4291
- b = new oe(e, o.endpoints.dfpBackendURL, y.getAsync(), g.executeRecaptcha),
4292
- k = new Ye(o.endpoints.clientsideServicesIframeURL),
4292
+ b = new se(e, s.endpoints.dfpBackendURL, y.getAsync(), g.executeRecaptcha),
4293
+ k = new Ye(s.endpoints.clientsideServicesIframeURL),
4293
4294
  w = new ft(e, k),
4294
4295
  S = new vt(this._networkClient);
4295
4296
  var T, C;
4296
4297
  this.user = new ue(this._networkClient, this._subscriptionService), this.session = new le(this._networkClient, this._subscriptionService), this.magicLinks = new he(this._networkClient, this._subscriptionService, new mt(this._dataLayer, "magic_links"), v, y.getAsync(), b), this.otps = new pe(this._networkClient, this._subscriptionService, g.executeRecaptcha, b), this.oauth = new dt(this._networkClient, this._subscriptionService, new mt(this._dataLayer, "oauth"), y.getAsync(), {
4297
4298
  publicToken: e,
4298
- testAPIURL: o.endpoints.testAPIURL,
4299
- liveAPIURL: o.endpoints.liveAPIURL
4299
+ testAPIURL: s.endpoints.testAPIURL,
4300
+ liveAPIURL: s.endpoints.liveAPIURL
4300
4301
  }, w), this.cryptoWallets = new _e(this._networkClient, this._subscriptionService, g.executeRecaptcha, b), this.totps = new me(this._networkClient, this._subscriptionService, b), this.webauthn = new Me(this._networkClient, this._subscriptionService, b), this.passwords = new Ue(this._networkClient, this._subscriptionService, v, y.getAsync(), b), this._sessionManager = new We(this._subscriptionService, this.session), this._dataLayer.readSessionCookie().session_token && this._sessionManager.performBackgroundRefresh(), this._networkClient.logEvent({
4301
4302
  name: "sdk_instance_instantiated",
4302
4303
  details: {