@stytch/vanilla-js 5.3.0 → 5.4.0

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.
package/dist/b2b/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28, _templateObject29, _templateObject30, _templateObject31, _templateObject32, _templateObject33, _templateObject34, _templateObject35, _templateObject36, _templateObject37, _templateObject38, _templateObject39, _templateObject40, _templateObject41, _templateObject42, _templateObject43, _templateObject44, _templateObject45, _templateObject46, _templateObject47, _templateObject48, _templateObject49, _templateObject50, _templateObject51, _templateObject52, _templateObject53, _templateObject54, _templateObject55, _templateObject56, _templateObject57, _templateObject58;
3
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28, _templateObject29, _templateObject30, _templateObject31, _templateObject32, _templateObject33, _templateObject34, _templateObject35, _templateObject36, _templateObject37, _templateObject38, _templateObject39, _templateObject40, _templateObject41, _templateObject42, _templateObject43, _templateObject44, _templateObject45, _templateObject46, _templateObject47, _templateObject48, _templateObject49, _templateObject50, _templateObject51, _templateObject52, _templateObject53, _templateObject54, _templateObject55, _templateObject56, _templateObject57, _templateObject58, _templateObject59, _templateObject60, _templateObject61, _templateObject62, _templateObject63, _templateObject64, _templateObject65, _templateObject66, _templateObject67, _templateObject68, _templateObject69, _templateObject70, _templateObject71;
4
4
  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); } }
5
5
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
6
6
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
@@ -11,27 +11,29 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
11
11
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
12
12
  function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
13
13
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
14
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
15
- 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."); }
16
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
17
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
18
14
  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; }
19
15
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
20
16
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
17
+ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
21
18
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
22
19
  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."); }
23
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
24
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
25
20
  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; } }
26
21
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
27
- function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
22
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
23
+ 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."); }
24
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
25
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
26
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
27
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
28
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
29
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
28
30
  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; }
29
31
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
30
32
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
31
33
  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); }
32
34
  var b2b_index_headless = require('./index.headless.js');
33
- var extractErrorMessage = require('../extractErrorMessage-CzsbznyB.js');
34
- var internal = require('../internal-Bs2p7EMm.js');
35
+ var extractErrorMessage = require('../extractErrorMessage-Ca4zQC5N.js');
36
+ var internal = require('../internal-C29Dtv6A.js');
35
37
  var DEFAULT_MFA_STATE = {
36
38
  primaryInfo: null,
37
39
  isEnrolling: false,
@@ -54,10 +56,10 @@ var getAuthMethodsForMember = function getAuthMethodsForMember(authMethods, memb
54
56
  return method !== 'password';
55
57
  });
56
58
  };
57
- var getEnabledMethods = function getEnabledMethods(_ref3) {
58
- var allMethods = _ref3.allMethods,
59
- orgSupportedMethods = _ref3.orgSupportedMethods,
60
- uiIncludedMethods = _ref3.uiIncludedMethods;
59
+ var getEnabledMethods = function getEnabledMethods(_ref) {
60
+ var allMethods = _ref.allMethods,
61
+ orgSupportedMethods = _ref.orgSupportedMethods,
62
+ uiIncludedMethods = _ref.uiIncludedMethods;
61
63
  if (orgSupportedMethods === null || orgSupportedMethods === void 0 ? void 0 : orgSupportedMethods.length) {
62
64
  return new Set(orgSupportedMethods);
63
65
  }
@@ -337,7 +339,7 @@ var mfaReducer = function mfaReducer(state, action) {
337
339
  return state;
338
340
  }
339
341
  };
340
- var reducer$1 = function reducer$1(state, action) {
342
+ var reducer = function reducer(state, action) {
341
343
  var _a, _b, _c;
342
344
  switch (action.type) {
343
345
  case 'transition':
@@ -495,13 +497,13 @@ var GlobalContext = /*#__PURE__*/extractErrorMessage.wn.createContext({
495
497
  return null;
496
498
  }]
497
499
  });
498
- var GlobalContextProvider = function GlobalContextProvider(_ref4) {
499
- var children = _ref4.children,
500
- client = _ref4.client,
501
- config = _ref4.config,
502
- callbacks = _ref4.callbacks,
503
- initialState = _ref4.initialState;
504
- var state = extractErrorMessage.wn.useReducer(reducer$1, initialState !== null && initialState !== void 0 ? initialState : DEFAULT_STATE);
500
+ var GlobalContextProvider = function GlobalContextProvider(_ref2) {
501
+ var children = _ref2.children,
502
+ client = _ref2.client,
503
+ config = _ref2.config,
504
+ callbacks = _ref2.callbacks,
505
+ initialState = _ref2.initialState;
506
+ var state = extractErrorMessage.wn.useReducer(reducer, initialState !== null && initialState !== void 0 ? initialState : DEFAULT_STATE);
505
507
  return /*#__PURE__*/extractErrorMessage.wn.createElement(GlobalContext.Provider, {
506
508
  value: {
507
509
  client: client,
@@ -709,9 +711,9 @@ var createTheme = function createTheme(styles) {
709
711
  }
710
712
  };
711
713
  };
712
- var useTheme = function useTheme(_ref5) {
713
- var styles = _ref5.styles,
714
- displayWatermark = _ref5.displayWatermark;
714
+ var useTheme = function useTheme(_ref3) {
715
+ var styles = _ref3.styles,
716
+ displayWatermark = _ref3.displayWatermark;
715
717
  return extractErrorMessage.F(function () {
716
718
  return createTheme(styles, displayWatermark);
717
719
  }, [styles, displayWatermark]);
@@ -727,7 +729,7 @@ var e = {
727
729
  },
728
730
  l = /(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,
729
731
  a = /\/\*[^]*?\*\/| +/g,
730
- n = /\n+/g,
732
+ n$1 = /\n+/g,
731
733
  o = function o(e, t) {
732
734
  var r = "",
733
735
  l = "",
@@ -767,7 +769,7 @@ var e = {
767
769
  var t,
768
770
  r,
769
771
  o = [{}];
770
- for (; t = l.exec(e.replace(a, ""));) t[4] ? o.shift() : t[3] ? (r = t[3].replace(n, " ").trim(), o.unshift(o[0][r] = o[0][r] || {})) : o[0][t[1]] = t[2].replace(n, " ").trim();
772
+ for (; t = l.exec(e.replace(a, ""));) t[4] ? o.shift() : t[3] ? (r = t[3].replace(n$1, " ").trim(), o.unshift(o[0][r] = o[0][r] || {})) : o[0][t[1]] = t[2].replace(n$1, " ").trim();
771
773
  return o[0];
772
774
  }(e);
773
775
  c[d] = o(p ? _defineProperty({}, "@keyframes " + d, _t4) : _t4, r ? "" : "." + d);
@@ -788,7 +790,7 @@ var e = {
788
790
  return e + l + (null == n ? "" : n);
789
791
  }, "");
790
792
  };
791
- function u(e) {
793
+ function u$1(e) {
792
794
  var r = this || {},
793
795
  l = e.call ? e(r.p) : e;
794
796
  return i(l.unshift ? l.raw ? p(l, [].slice.call(arguments, 1), r.p) : l.reduce(function (e, t) {
@@ -796,10 +798,10 @@ function u(e) {
796
798
  }, {}) : l, t(r.target), r.g, r.o, r.k);
797
799
  }
798
800
  var d, f, g;
799
- u.bind({
801
+ u$1.bind({
800
802
  g: 1
801
803
  });
802
- var h = u.bind({
804
+ var h$1 = u$1.bind({
803
805
  k: 1
804
806
  });
805
807
  function m(e, t, r, l) {
@@ -814,624 +816,452 @@ function j(e, t) {
814
816
  s = c.className || a.className;
815
817
  r.p = Object.assign({
816
818
  theme: f && f()
817
- }, c), r.o = / *go\d+/.test(s), c.className = u.apply(r, l) + (s ? " " + s : ""), t && (c.ref = o);
819
+ }, c), r.o = / *go\d+/.test(s), c.className = u$1.apply(r, l) + (s ? " " + s : "");
818
820
  var i = e;
819
821
  return e[0] && (i = c.as || e, delete c.as), g && i[0] && g(c), d(i, c);
820
822
  }
821
- return t ? t(a) : a;
822
- };
823
- }
824
- function _extends() {
825
- _extends = Object.assign || function (target) {
826
- for (var i = 1; i < arguments.length; i++) {
827
- var source = arguments[i];
828
- for (var key in source) {
829
- if (Object.prototype.hasOwnProperty.call(source, key)) {
830
- target[key] = source[key];
831
- }
832
- }
833
- }
834
- return target;
823
+ return a;
835
824
  };
836
- return _extends.apply(this, arguments);
837
- }
838
- function _taggedTemplateLiteralLoose(strings, raw) {
839
- if (!raw) {
840
- raw = strings.slice(0);
841
- }
842
- strings.raw = raw;
843
- return strings;
844
825
  }
845
- var isFunction = function isFunction(valOrFunction) {
846
- return typeof valOrFunction === 'function';
847
- };
848
- var resolveValue = function resolveValue(valOrFunction, arg) {
849
- return isFunction(valOrFunction) ? valOrFunction(arg) : valOrFunction;
850
- };
851
- var genId = /*#__PURE__*/function () {
852
- var count = 0;
853
- return function () {
854
- return (++count).toString();
855
- };
856
- }();
857
- var createRectRef = function createRectRef(onRect) {
858
- return function (el) {
859
- if (el) {
860
- setTimeout(function () {
861
- var boundingRect = el.getBoundingClientRect();
862
- onRect(boundingRect);
863
- });
864
- }
865
- };
866
- };
867
- var prefersReducedMotion = /*#__PURE__*/function () {
868
- var shouldReduceMotion = undefined;
869
- return function () {
870
- if (shouldReduceMotion === undefined && typeof window !== 'undefined') {
871
- var mediaQuery = matchMedia('(prefers-reduced-motion: reduce)');
872
- shouldReduceMotion = !mediaQuery || mediaQuery.matches;
873
- }
874
- return shouldReduceMotion;
826
+ var W = function W(e) {
827
+ return typeof e == "function";
828
+ },
829
+ T = function T(e, t) {
830
+ return W(e) ? e(t) : e;
875
831
  };
876
- }();
877
- var TOAST_LIMIT = 20;
878
- var ActionType;
879
- (function (ActionType) {
880
- ActionType[ActionType["ADD_TOAST"] = 0] = "ADD_TOAST";
881
- ActionType[ActionType["UPDATE_TOAST"] = 1] = "UPDATE_TOAST";
882
- ActionType[ActionType["UPSERT_TOAST"] = 2] = "UPSERT_TOAST";
883
- ActionType[ActionType["DISMISS_TOAST"] = 3] = "DISMISS_TOAST";
884
- ActionType[ActionType["REMOVE_TOAST"] = 4] = "REMOVE_TOAST";
885
- ActionType[ActionType["START_PAUSE"] = 5] = "START_PAUSE";
886
- ActionType[ActionType["END_PAUSE"] = 6] = "END_PAUSE";
887
- })(ActionType || (ActionType = {}));
888
- var toastTimeouts = /*#__PURE__*/new Map();
889
- var addToRemoveQueue = function addToRemoveQueue(toastId) {
890
- if (toastTimeouts.has(toastId)) {
891
- return;
892
- }
893
- var timeout = setTimeout(function () {
894
- toastTimeouts["delete"](toastId);
895
- dispatch({
896
- type: ActionType.REMOVE_TOAST,
897
- toastId: toastId
898
- });
899
- }, 1000);
900
- toastTimeouts.set(toastId, timeout);
901
- };
902
- var clearFromRemoveQueue = function clearFromRemoveQueue(toastId) {
903
- var timeout = toastTimeouts.get(toastId);
904
- if (timeout) {
905
- clearTimeout(timeout);
906
- }
907
- };
908
- var reducer = function reducer(state, action) {
909
- switch (action.type) {
910
- case ActionType.ADD_TOAST:
911
- return _extends({}, state, {
912
- toasts: [action.toast].concat(state.toasts).slice(0, TOAST_LIMIT)
913
- });
914
- case ActionType.UPDATE_TOAST:
915
- if (action.toast.id) {
916
- clearFromRemoveQueue(action.toast.id);
832
+ var U = function () {
833
+ var e = 0;
834
+ return function () {
835
+ return (++e).toString();
836
+ };
837
+ }(),
838
+ b = function () {
839
+ var e;
840
+ return function () {
841
+ if (e === void 0 && (typeof window === "undefined" ? "undefined" : _typeof(window)) < "u") {
842
+ var _t6 = matchMedia("(prefers-reduced-motion: reduce)");
843
+ e = !_t6 || _t6.matches;
917
844
  }
918
- return _extends({}, state, {
919
- toasts: state.toasts.map(function (t) {
920
- return t.id === action.toast.id ? _extends({}, t, action.toast) : t;
921
- })
922
- });
923
- case ActionType.UPSERT_TOAST:
924
- var toast = action.toast;
925
- return state.toasts.find(function (t) {
926
- return t.id === toast.id;
927
- }) ? reducer(state, {
928
- type: ActionType.UPDATE_TOAST,
929
- toast: toast
930
- }) : reducer(state, {
931
- type: ActionType.ADD_TOAST,
932
- toast: toast
845
+ return e;
846
+ };
847
+ }();
848
+ var Q = 20;
849
+ var S = new Map(),
850
+ X = 1e3,
851
+ $ = function $(e) {
852
+ if (S.has(e)) return;
853
+ var t = setTimeout(function () {
854
+ S["delete"](e), u({
855
+ type: 4,
856
+ toastId: e
933
857
  });
934
- case ActionType.DISMISS_TOAST:
935
- var toastId = action.toastId;
936
- if (toastId) {
937
- addToRemoveQueue(toastId);
938
- } else {
939
- state.toasts.forEach(function (toast) {
940
- addToRemoveQueue(toast.id);
858
+ }, X);
859
+ S.set(e, t);
860
+ },
861
+ J = function J(e) {
862
+ var t = S.get(e);
863
+ t && clearTimeout(t);
864
+ },
865
+ v = function v(e, t) {
866
+ switch (t.type) {
867
+ case 0:
868
+ return _objectSpread(_objectSpread({}, e), {}, {
869
+ toasts: [t.toast].concat(_toConsumableArray(e.toasts)).slice(0, Q)
941
870
  });
942
- }
943
- return _extends({}, state, {
944
- toasts: state.toasts.map(function (t) {
945
- return t.id === toastId || toastId === undefined ? _extends({}, t, {
946
- visible: false
947
- }) : t;
948
- })
949
- });
950
- case ActionType.REMOVE_TOAST:
951
- if (action.toastId === undefined) {
952
- return _extends({}, state, {
871
+ case 1:
872
+ return t.toast.id && J(t.toast.id), _objectSpread(_objectSpread({}, e), {}, {
873
+ toasts: e.toasts.map(function (r) {
874
+ return r.id === t.toast.id ? _objectSpread(_objectSpread({}, r), t.toast) : r;
875
+ })
876
+ });
877
+ case 2:
878
+ var _o2 = t.toast;
879
+ return e.toasts.find(function (r) {
880
+ return r.id === _o2.id;
881
+ }) ? v(e, {
882
+ type: 1,
883
+ toast: _o2
884
+ }) : v(e, {
885
+ type: 0,
886
+ toast: _o2
887
+ });
888
+ case 3:
889
+ var _s2 = t.toastId;
890
+ return _s2 ? $(_s2) : e.toasts.forEach(function (r) {
891
+ $(r.id);
892
+ }), _objectSpread(_objectSpread({}, e), {}, {
893
+ toasts: e.toasts.map(function (r) {
894
+ return r.id === _s2 || _s2 === void 0 ? _objectSpread(_objectSpread({}, r), {}, {
895
+ visible: !1
896
+ }) : r;
897
+ })
898
+ });
899
+ case 4:
900
+ return t.toastId === void 0 ? _objectSpread(_objectSpread({}, e), {}, {
953
901
  toasts: []
902
+ }) : _objectSpread(_objectSpread({}, e), {}, {
903
+ toasts: e.toasts.filter(function (r) {
904
+ return r.id !== t.toastId;
905
+ })
954
906
  });
955
- }
956
- return _extends({}, state, {
957
- toasts: state.toasts.filter(function (t) {
958
- return t.id !== action.toastId;
959
- })
960
- });
961
- case ActionType.START_PAUSE:
962
- return _extends({}, state, {
963
- pausedAt: action.time
964
- });
965
- case ActionType.END_PAUSE:
966
- var diff = action.time - (state.pausedAt || 0);
967
- return _extends({}, state, {
968
- pausedAt: undefined,
969
- toasts: state.toasts.map(function (t) {
970
- return _extends({}, t, {
971
- pauseDuration: t.pauseDuration + diff
972
- });
973
- })
907
+ case 5:
908
+ return _objectSpread(_objectSpread({}, e), {}, {
909
+ pausedAt: t.time
910
+ });
911
+ case 6:
912
+ var _a2 = t.time - (e.pausedAt || 0);
913
+ return _objectSpread(_objectSpread({}, e), {}, {
914
+ pausedAt: void 0,
915
+ toasts: e.toasts.map(function (r) {
916
+ return _objectSpread(_objectSpread({}, r), {}, {
917
+ pauseDuration: r.pauseDuration + _a2
918
+ });
919
+ })
920
+ });
921
+ }
922
+ },
923
+ A = [],
924
+ P = {
925
+ toasts: [],
926
+ pausedAt: void 0
927
+ },
928
+ u = function u(e) {
929
+ P = v(P, e), A.forEach(function (t) {
930
+ t(P);
931
+ });
932
+ },
933
+ Y = {
934
+ blank: 4e3,
935
+ error: 4e3,
936
+ success: 2e3,
937
+ loading: 1 / 0,
938
+ custom: 4e3
939
+ },
940
+ I = function I() {
941
+ var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
942
+ var _extractErrorMessage$ = extractErrorMessage.h(P),
943
+ _extractErrorMessage$2 = _slicedToArray(_extractErrorMessage$, 2),
944
+ t = _extractErrorMessage$2[0],
945
+ o = _extractErrorMessage$2[1];
946
+ extractErrorMessage.p(function () {
947
+ return A.push(o), function () {
948
+ var a = A.indexOf(o);
949
+ a > -1 && A.splice(a, 1);
950
+ };
951
+ }, [t]);
952
+ var s = t.toasts.map(function (a) {
953
+ var r, c;
954
+ return _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, e), e[a.type]), a), {}, {
955
+ duration: a.duration || ((r = e[a.type]) == null ? void 0 : r.duration) || (e == null ? void 0 : e.duration) || Y[a.type],
956
+ style: _objectSpread(_objectSpread(_objectSpread({}, e.style), (c = e[a.type]) == null ? void 0 : c.style), a.style)
974
957
  });
975
- }
976
- };
977
- var listeners = [];
978
- var memoryState = {
979
- toasts: [],
980
- pausedAt: undefined
981
- };
982
- var dispatch = function dispatch(action) {
983
- memoryState = reducer(memoryState, action);
984
- listeners.forEach(function (listener) {
985
- listener(memoryState);
986
- });
987
- };
988
- var defaultTimeouts = {
989
- blank: 4000,
990
- error: 4000,
991
- success: 2000,
992
- loading: Infinity,
993
- custom: 4000
994
- };
995
- var useStore = function useStore(toastOptions) {
996
- if (toastOptions === void 0) {
997
- toastOptions = {};
998
- }
999
- var _useState = extractErrorMessage.h(memoryState),
1000
- state = _useState[0],
1001
- setState = _useState[1];
1002
- extractErrorMessage.p(function () {
1003
- listeners.push(setState);
1004
- return function () {
1005
- var index = listeners.indexOf(setState);
1006
- if (index > -1) {
1007
- listeners.splice(index, 1);
1008
- }
1009
- };
1010
- }, [state]);
1011
- var mergedToasts = state.toasts.map(function (t) {
1012
- var _toastOptions$t$type, _toastOptions, _toastOptions$t$type2;
1013
- return _extends({}, toastOptions, toastOptions[t.type], t, {
1014
- duration: t.duration || ((_toastOptions$t$type = toastOptions[t.type]) == null ? void 0 : _toastOptions$t$type.duration) || ((_toastOptions = toastOptions) == null ? void 0 : _toastOptions.duration) || defaultTimeouts[t.type],
1015
- style: _extends({}, toastOptions.style, (_toastOptions$t$type2 = toastOptions[t.type]) == null ? void 0 : _toastOptions$t$type2.style, t.style)
1016
958
  });
1017
- });
1018
- return _extends({}, state, {
1019
- toasts: mergedToasts
1020
- });
1021
- };
1022
- var createToast = function createToast(message, type, opts) {
1023
- if (type === void 0) {
1024
- type = 'blank';
1025
- }
1026
- return _extends({
1027
- createdAt: Date.now(),
1028
- visible: true,
1029
- type: type,
1030
- ariaProps: {
1031
- role: 'status',
1032
- 'aria-live': 'polite'
1033
- },
1034
- message: message,
1035
- pauseDuration: 0
1036
- }, opts, {
1037
- id: (opts == null ? void 0 : opts.id) || genId()
1038
- });
1039
- };
1040
- var createHandler = function createHandler(type) {
1041
- return function (message, options) {
1042
- var toast = createToast(message, type, options);
1043
- dispatch({
1044
- type: ActionType.UPSERT_TOAST,
1045
- toast: toast
959
+ return _objectSpread(_objectSpread({}, t), {}, {
960
+ toasts: s
1046
961
  });
1047
- return toast.id;
1048
962
  };
1049
- };
1050
- var toast = function toast(message, opts) {
1051
- return createHandler('blank')(message, opts);
1052
- };
1053
- toast.error = /*#__PURE__*/createHandler('error');
1054
- toast.success = /*#__PURE__*/createHandler('success');
1055
- toast.loading = /*#__PURE__*/createHandler('loading');
1056
- toast.custom = /*#__PURE__*/createHandler('custom');
1057
- toast.dismiss = function (toastId) {
1058
- dispatch({
1059
- type: ActionType.DISMISS_TOAST,
1060
- toastId: toastId
1061
- });
1062
- };
1063
- toast.remove = function (toastId) {
1064
- return dispatch({
1065
- type: ActionType.REMOVE_TOAST,
1066
- toastId: toastId
963
+ var G = function G(e) {
964
+ var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "blank";
965
+ var o = arguments.length > 2 ? arguments[2] : undefined;
966
+ return _objectSpread(_objectSpread({
967
+ createdAt: Date.now(),
968
+ visible: !0,
969
+ type: t,
970
+ ariaProps: {
971
+ role: "status",
972
+ "aria-live": "polite"
973
+ },
974
+ message: e,
975
+ pauseDuration: 0
976
+ }, o), {}, {
977
+ id: (o == null ? void 0 : o.id) || U()
978
+ });
979
+ },
980
+ h = function h(e) {
981
+ return function (t, o) {
982
+ var s = G(t, e, o);
983
+ return u({
984
+ type: 2,
985
+ toast: s
986
+ }), s.id;
987
+ };
988
+ },
989
+ n = function n(e, t) {
990
+ return h("blank")(e, t);
991
+ };
992
+ n.error = h("error");
993
+ n.success = h("success");
994
+ n.loading = h("loading");
995
+ n.custom = h("custom");
996
+ n.dismiss = function (e) {
997
+ u({
998
+ type: 3,
999
+ toastId: e
1067
1000
  });
1068
1001
  };
1069
- toast.promise = function (promise, msgs, opts) {
1070
- var id = toast.loading(msgs.loading, _extends({}, opts, opts == null ? void 0 : opts.loading));
1071
- promise.then(function (p) {
1072
- toast.success(resolveValue(msgs.success, p), _extends({
1073
- id: id
1074
- }, opts, opts == null ? void 0 : opts.success));
1075
- return p;
1076
- })["catch"](function (e) {
1077
- toast.error(resolveValue(msgs.error, e), _extends({
1078
- id: id
1079
- }, opts, opts == null ? void 0 : opts.error));
1002
+ n.remove = function (e) {
1003
+ return u({
1004
+ type: 4,
1005
+ toastId: e
1080
1006
  });
1081
- return promise;
1082
1007
  };
1083
- var useToaster = function useToaster(toastOptions) {
1084
- var _useStore = useStore(toastOptions),
1085
- toasts = _useStore.toasts,
1086
- pausedAt = _useStore.pausedAt;
1087
- extractErrorMessage.p(function () {
1088
- if (pausedAt) {
1089
- return;
1090
- }
1091
- var now = Date.now();
1092
- var timeouts = toasts.map(function (t) {
1093
- if (t.duration === Infinity) {
1094
- return;
1095
- }
1096
- var durationLeft = (t.duration || 0) + t.pauseDuration - (now - t.createdAt);
1097
- if (durationLeft < 0) {
1098
- if (t.visible) {
1099
- toast.dismiss(t.id);
1100
- }
1101
- return;
1008
+ n.promise = function (e, t, o) {
1009
+ var s = n.loading(t.loading, _objectSpread(_objectSpread({}, o), o == null ? void 0 : o.loading));
1010
+ return e.then(function (a) {
1011
+ return n.success(T(t.success, a), _objectSpread(_objectSpread({
1012
+ id: s
1013
+ }, o), o == null ? void 0 : o.success)), a;
1014
+ })["catch"](function (a) {
1015
+ n.error(T(t.error, a), _objectSpread(_objectSpread({
1016
+ id: s
1017
+ }, o), o == null ? void 0 : o.error));
1018
+ }), e;
1019
+ };
1020
+ var Z = function Z(e, t) {
1021
+ u({
1022
+ type: 1,
1023
+ toast: {
1024
+ id: e,
1025
+ height: t
1102
1026
  }
1103
- return setTimeout(function () {
1104
- return toast.dismiss(t.id);
1105
- }, durationLeft);
1106
1027
  });
1107
- return function () {
1108
- timeouts.forEach(function (timeout) {
1109
- return timeout && clearTimeout(timeout);
1110
- });
1111
- };
1112
- }, [toasts, pausedAt]);
1113
- var handlers = extractErrorMessage.F(function () {
1114
- return {
1115
- startPause: function startPause() {
1116
- dispatch({
1117
- type: ActionType.START_PAUSE,
1118
- time: Date.now()
1119
- });
1120
- },
1121
- endPause: function endPause() {
1122
- if (pausedAt) {
1123
- dispatch({
1124
- type: ActionType.END_PAUSE,
1125
- time: Date.now()
1126
- });
1127
- }
1128
- },
1129
- updateHeight: function updateHeight(toastId, height) {
1130
- return dispatch({
1131
- type: ActionType.UPDATE_TOAST,
1132
- toast: {
1133
- id: toastId,
1134
- height: height
1028
+ },
1029
+ ee = function ee() {
1030
+ u({
1031
+ type: 5,
1032
+ time: Date.now()
1033
+ });
1034
+ },
1035
+ D = function D(e) {
1036
+ var _I = I(e),
1037
+ t = _I.toasts,
1038
+ o = _I.pausedAt;
1039
+ extractErrorMessage.p(function () {
1040
+ if (o) return;
1041
+ var r = Date.now(),
1042
+ c = t.map(function (i) {
1043
+ if (i.duration === 1 / 0) return;
1044
+ var d = (i.duration || 0) + i.pauseDuration - (r - i.createdAt);
1045
+ if (d < 0) {
1046
+ i.visible && n.dismiss(i.id);
1047
+ return;
1135
1048
  }
1049
+ return setTimeout(function () {
1050
+ return n.dismiss(i.id);
1051
+ }, d);
1136
1052
  });
1137
- },
1138
- calculateOffset: function calculateOffset(toast, opts) {
1139
- var _relevantToasts$filte;
1140
- var _ref = opts || {},
1141
- _ref$reverseOrder = _ref.reverseOrder,
1142
- reverseOrder = _ref$reverseOrder === void 0 ? false : _ref$reverseOrder,
1143
- _ref$gutter = _ref.gutter,
1144
- gutter = _ref$gutter === void 0 ? 8 : _ref$gutter,
1145
- defaultPosition = _ref.defaultPosition;
1146
- var relevantToasts = toasts.filter(function (t) {
1147
- return (t.position || defaultPosition) === (toast.position || defaultPosition) && t.height;
1053
+ return function () {
1054
+ c.forEach(function (i) {
1055
+ return i && clearTimeout(i);
1148
1056
  });
1149
- var toastIndex = relevantToasts.findIndex(function (t) {
1150
- return t.id === toast.id;
1057
+ };
1058
+ }, [t, o]);
1059
+ var s = extractErrorMessage.T(function () {
1060
+ o && u({
1061
+ type: 6,
1062
+ time: Date.now()
1151
1063
  });
1152
- var toastsBefore = relevantToasts.filter(function (toast, i) {
1153
- return i < toastIndex && toast.visible;
1154
- }).length;
1155
- var offset = (_relevantToasts$filte = relevantToasts.filter(function (t) {
1156
- return t.visible;
1157
- })).slice.apply(_relevantToasts$filte, reverseOrder ? [toastsBefore + 1] : [0, toastsBefore]).reduce(function (acc, t) {
1158
- return acc + (t.height || 0) + gutter;
1064
+ }, [o]),
1065
+ a = extractErrorMessage.T(function (r, c) {
1066
+ var _g$filter;
1067
+ var _ref5 = c || {},
1068
+ _ref5$reverseOrder = _ref5.reverseOrder,
1069
+ i = _ref5$reverseOrder === void 0 ? !1 : _ref5$reverseOrder,
1070
+ _ref5$gutter = _ref5.gutter,
1071
+ d = _ref5$gutter === void 0 ? 8 : _ref5$gutter,
1072
+ p = _ref5.defaultPosition,
1073
+ g = t.filter(function (m) {
1074
+ return (m.position || p) === (r.position || p) && m.height;
1075
+ }),
1076
+ E = g.findIndex(function (m) {
1077
+ return m.id === r.id;
1078
+ }),
1079
+ x = g.filter(function (m, R) {
1080
+ return R < E && m.visible;
1081
+ }).length;
1082
+ return (_g$filter = g.filter(function (m) {
1083
+ return m.visible;
1084
+ })).slice.apply(_g$filter, _toConsumableArray(i ? [x + 1] : [0, x])).reduce(function (m, R) {
1085
+ return m + (R.height || 0) + d;
1159
1086
  }, 0);
1160
- return offset;
1087
+ }, [t]);
1088
+ return {
1089
+ toasts: t,
1090
+ handlers: {
1091
+ updateHeight: Z,
1092
+ startPause: ee,
1093
+ endPause: s,
1094
+ calculateOffset: a
1161
1095
  }
1162
1096
  };
1163
- }, [toasts, pausedAt]);
1164
- return {
1165
- toasts: toasts,
1166
- handlers: handlers
1167
- };
1168
- };
1169
- function _templateObject4() {
1170
- var data = _taggedTemplateLiteralLoose(["\n width: 20px;\n opacity: 0;\n height: 20px;\n border-radius: 10px;\n background: ", ";\n position: relative;\n transform: rotate(45deg);\n\n animation: ", " 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)\n forwards;\n animation-delay: 100ms;\n\n &:after,\n &:before {\n content: '';\n animation: ", " 0.15s ease-out forwards;\n animation-delay: 150ms;\n position: absolute;\n border-radius: 3px;\n opacity: 0;\n background: ", ";\n bottom: 9px;\n left: 4px;\n height: 2px;\n width: 12px;\n }\n\n &:before {\n animation: ", " 0.15s ease-out forwards;\n animation-delay: 180ms;\n transform: rotate(90deg);\n }\n"]);
1171
- _templateObject4 = function _templateObject4() {
1172
- return data;
1173
- };
1174
- return data;
1175
- }
1176
- function _templateObject3() {
1177
- var data = _taggedTemplateLiteralLoose(["\nfrom {\n transform: scale(0) rotate(90deg);\n\topacity: 0;\n}\nto {\n transform: scale(1) rotate(90deg);\n\topacity: 1;\n}"]);
1178
- _templateObject3 = function _templateObject3() {
1179
- return data;
1180
- };
1181
- return data;
1182
- }
1183
- function _templateObject2() {
1184
- var data = _taggedTemplateLiteralLoose(["\nfrom {\n transform: scale(0);\n opacity: 0;\n}\nto {\n transform: scale(1);\n opacity: 1;\n}"]);
1185
- _templateObject2 = function _templateObject2() {
1186
- return data;
1187
- };
1188
- return data;
1189
- }
1190
- function _templateObject() {
1191
- var data = _taggedTemplateLiteralLoose(["\nfrom {\n transform: scale(0) rotate(45deg);\n\topacity: 0;\n}\nto {\n transform: scale(1) rotate(45deg);\n opacity: 1;\n}"]);
1192
- _templateObject = function _templateObject() {
1193
- return data;
1194
- };
1195
- return data;
1196
- }
1197
- var circleAnimation = /*#__PURE__*/h( /*#__PURE__*/_templateObject());
1198
- var firstLineAnimation = /*#__PURE__*/h( /*#__PURE__*/_templateObject2());
1199
- var secondLineAnimation = /*#__PURE__*/h( /*#__PURE__*/_templateObject3());
1200
- var ErrorIcon$1 = /*#__PURE__*/j('div')( /*#__PURE__*/_templateObject4(), function (p) {
1201
- return p.primary || '#ff4b4b';
1202
- }, circleAnimation, firstLineAnimation, function (p) {
1203
- return p.secondary || '#fff';
1204
- }, secondLineAnimation);
1205
- function _templateObject2$1() {
1206
- var data = _taggedTemplateLiteralLoose(["\n width: 12px;\n height: 12px;\n box-sizing: border-box;\n border: 2px solid;\n border-radius: 100%;\n border-color: ", ";\n border-right-color: ", ";\n animation: ", " 1s linear infinite;\n"]);
1207
- _templateObject2$1 = function _templateObject2() {
1208
- return data;
1209
- };
1210
- return data;
1211
- }
1212
- function _templateObject$1() {
1213
- var data = _taggedTemplateLiteralLoose(["\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n"]);
1214
- _templateObject$1 = function _templateObject() {
1215
- return data;
1216
- };
1217
- return data;
1218
- }
1219
- var rotate = /*#__PURE__*/h( /*#__PURE__*/_templateObject$1());
1220
- var LoaderIcon = /*#__PURE__*/j('div')( /*#__PURE__*/_templateObject2$1(), function (p) {
1221
- return p.secondary || '#e0e0e0';
1222
- }, function (p) {
1223
- return p.primary || '#616161';
1224
- }, rotate);
1225
- function _templateObject3$1() {
1226
- var data = _taggedTemplateLiteralLoose(["\n width: 20px;\n opacity: 0;\n height: 20px;\n border-radius: 10px;\n background: ", ";\n position: relative;\n transform: rotate(45deg);\n\n animation: ", " 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)\n forwards;\n animation-delay: 100ms;\n &:after {\n content: '';\n box-sizing: border-box;\n animation: ", " 0.2s ease-out forwards;\n opacity: 0;\n animation-delay: 200ms;\n position: absolute;\n border-right: 2px solid;\n border-bottom: 2px solid;\n border-color: ", ";\n bottom: 6px;\n left: 6px;\n height: 10px;\n width: 6px;\n }\n"]);
1227
- _templateObject3$1 = function _templateObject3() {
1228
- return data;
1229
1097
  };
1230
- return data;
1231
- }
1232
- function _templateObject2$2() {
1233
- var data = _taggedTemplateLiteralLoose(["\n0% {\n\theight: 0;\n\twidth: 0;\n\topacity: 0;\n}\n40% {\n height: 0;\n\twidth: 6px;\n\topacity: 1;\n}\n100% {\n opacity: 1;\n height: 10px;\n}"]);
1234
- _templateObject2$2 = function _templateObject2() {
1235
- return data;
1236
- };
1237
- return data;
1238
- }
1239
- function _templateObject$2() {
1240
- var data = _taggedTemplateLiteralLoose(["\nfrom {\n transform: scale(0) rotate(45deg);\n\topacity: 0;\n}\nto {\n transform: scale(1) rotate(45deg);\n\topacity: 1;\n}"]);
1241
- _templateObject$2 = function _templateObject() {
1242
- return data;
1243
- };
1244
- return data;
1245
- }
1246
- var circleAnimation$1 = /*#__PURE__*/h( /*#__PURE__*/_templateObject$2());
1247
- var checkmarkAnimation = /*#__PURE__*/h( /*#__PURE__*/_templateObject2$2());
1248
- var CheckmarkIcon = /*#__PURE__*/j('div')( /*#__PURE__*/_templateObject3$1(), function (p) {
1249
- return p.primary || '#61d345';
1250
- }, circleAnimation$1, checkmarkAnimation, function (p) {
1251
- return p.secondary || '#fff';
1252
- });
1253
- function _templateObject4$1() {
1254
- var data = _taggedTemplateLiteralLoose(["\n position: relative;\n transform: scale(0.6);\n opacity: 0.4;\n min-width: 20px;\n animation: ", " 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)\n forwards;\n"]);
1255
- _templateObject4$1 = function _templateObject4() {
1256
- return data;
1257
- };
1258
- return data;
1259
- }
1260
- function _templateObject3$2() {
1261
- var data = _taggedTemplateLiteralLoose(["\nfrom {\n transform: scale(0.6);\n opacity: 0.4;\n}\nto {\n transform: scale(1);\n opacity: 1;\n}"]);
1262
- _templateObject3$2 = function _templateObject3() {
1263
- return data;
1264
- };
1265
- return data;
1266
- }
1267
- function _templateObject2$3() {
1268
- var data = _taggedTemplateLiteralLoose(["\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n min-width: 20px;\n min-height: 20px;\n"]);
1269
- _templateObject2$3 = function _templateObject2() {
1270
- return data;
1271
- };
1272
- return data;
1273
- }
1274
- function _templateObject$3() {
1275
- var data = _taggedTemplateLiteralLoose(["\n position: absolute;\n"]);
1276
- _templateObject$3 = function _templateObject() {
1277
- return data;
1278
- };
1279
- return data;
1280
- }
1281
- var StatusWrapper = /*#__PURE__*/j('div')( /*#__PURE__*/_templateObject$3());
1282
- var IndicatorWrapper = /*#__PURE__*/j('div')( /*#__PURE__*/_templateObject2$3());
1283
- var enter = /*#__PURE__*/h( /*#__PURE__*/_templateObject3$2());
1284
- var AnimatedIconWrapper = /*#__PURE__*/j('div')( /*#__PURE__*/_templateObject4$1(), enter);
1285
- var ToastIcon = function ToastIcon(_ref) {
1286
- var toast = _ref.toast;
1287
- var icon = toast.icon,
1288
- type = toast.type,
1289
- iconTheme = toast.iconTheme;
1290
- if (icon !== undefined) {
1291
- if (typeof icon === 'string') {
1292
- return /*#__PURE__*/extractErrorMessage.y(AnimatedIconWrapper, null, icon);
1293
- } else {
1294
- return icon;
1295
- }
1296
- }
1297
- if (type === 'blank') {
1298
- return null;
1299
- }
1300
- return /*#__PURE__*/extractErrorMessage.y(IndicatorWrapper, null, /*#__PURE__*/extractErrorMessage.y(LoaderIcon, Object.assign({}, iconTheme)), type !== 'loading' && /*#__PURE__*/extractErrorMessage.y(StatusWrapper, null, type === 'error' ? /*#__PURE__*/extractErrorMessage.y(ErrorIcon$1, Object.assign({}, iconTheme)) : /*#__PURE__*/extractErrorMessage.y(CheckmarkIcon, Object.assign({}, iconTheme))));
1301
- };
1302
- function _templateObject2$4() {
1303
- var data = _taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: center;\n margin: 4px 10px;\n color: inherit;\n flex: 1 1 auto;\n white-space: pre-line;\n"]);
1304
- _templateObject2$4 = function _templateObject2() {
1305
- return data;
1306
- };
1307
- return data;
1308
- }
1309
- function _templateObject$4() {
1310
- var data = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n background: #fff;\n color: #363636;\n line-height: 1.3;\n will-change: transform;\n box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);\n max-width: 350px;\n pointer-events: auto;\n padding: 8px 10px;\n border-radius: 8px;\n"]);
1311
- _templateObject$4 = function _templateObject() {
1312
- return data;
1313
- };
1314
- return data;
1315
- }
1316
- var enterAnimation = function enterAnimation(factor) {
1317
- return "\n0% {transform: translate3d(0," + factor * -200 + "%,0) scale(.6); opacity:.5;}\n100% {transform: translate3d(0,0,0) scale(1); opacity:1;}\n";
1318
- };
1319
- var exitAnimation = function exitAnimation(factor) {
1320
- return "\n0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}\n100% {transform: translate3d(0," + factor * -150 + "%,-1px) scale(.6); opacity:0;}\n";
1321
- };
1322
- var fadeInAnimation = "0%{opacity:0;} 100%{opacity:1;}";
1323
- var fadeOutAnimation = "0%{opacity:1;} 100%{opacity:0;}";
1324
- var ToastBarBase = /*#__PURE__*/j('div', extractErrorMessage.N)( /*#__PURE__*/_templateObject$4());
1325
- var Message = /*#__PURE__*/j('div')( /*#__PURE__*/_templateObject2$4());
1326
- var getAnimationStyle = function getAnimationStyle(position, visible) {
1327
- var top = position.includes('top');
1328
- var factor = top ? 1 : -1;
1329
- var _ref = prefersReducedMotion() ? [fadeInAnimation, fadeOutAnimation] : [enterAnimation(factor), exitAnimation(factor)],
1330
- enter = _ref[0],
1331
- exit = _ref[1];
1332
- return {
1333
- animation: visible ? h(enter) + " 0.35s cubic-bezier(.21,1.02,.73,1) forwards" : h(exit) + " 0.4s forwards cubic-bezier(.06,.71,.55,1)"
1334
- };
1335
- };
1336
- var ToastBar = /*#__PURE__*/extractErrorMessage.w(function (_ref2) {
1337
- var toast = _ref2.toast,
1338
- position = _ref2.position,
1339
- style = _ref2.style,
1340
- children = _ref2.children;
1341
- var animationStyle = toast != null && toast.height ? getAnimationStyle(toast.position || position || 'top-center', toast.visible) : {
1342
- opacity: 0
1343
- };
1344
- var icon = /*#__PURE__*/extractErrorMessage.y(ToastIcon, {
1345
- toast: toast
1098
+ var oe = h$1(_templateObject || (_templateObject = _taggedTemplateLiteral(["\nfrom {\n transform: scale(0) rotate(45deg);\n\topacity: 0;\n}\nto {\n transform: scale(1) rotate(45deg);\n opacity: 1;\n}"]))),
1099
+ re = h$1(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\nfrom {\n transform: scale(0);\n opacity: 0;\n}\nto {\n transform: scale(1);\n opacity: 1;\n}"]))),
1100
+ se = h$1(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\nfrom {\n transform: scale(0) rotate(90deg);\n\topacity: 0;\n}\nto {\n transform: scale(1) rotate(90deg);\n\topacity: 1;\n}"]))),
1101
+ _ = j("div")(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n width: 20px;\n opacity: 0;\n height: 20px;\n border-radius: 10px;\n background: ", ";\n position: relative;\n transform: rotate(45deg);\n\n animation: ", " 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)\n forwards;\n animation-delay: 100ms;\n\n &:after,\n &:before {\n content: '';\n animation: ", " 0.15s ease-out forwards;\n animation-delay: 150ms;\n position: absolute;\n border-radius: 3px;\n opacity: 0;\n background: ", ";\n bottom: 9px;\n left: 4px;\n height: 2px;\n width: 12px;\n }\n\n &:before {\n animation: ", " 0.15s ease-out forwards;\n animation-delay: 180ms;\n transform: rotate(90deg);\n }\n"])), function (e) {
1102
+ return e.primary || "#ff4b4b";
1103
+ }, oe, re, function (e) {
1104
+ return e.secondary || "#fff";
1105
+ }, se);
1106
+ var ne = h$1(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n"]))),
1107
+ V = j("div")(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n width: 12px;\n height: 12px;\n box-sizing: border-box;\n border: 2px solid;\n border-radius: 100%;\n border-color: ", ";\n border-right-color: ", ";\n animation: ", " 1s linear infinite;\n"])), function (e) {
1108
+ return e.secondary || "#e0e0e0";
1109
+ }, function (e) {
1110
+ return e.primary || "#616161";
1111
+ }, ne);
1112
+ var pe = h$1(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\nfrom {\n transform: scale(0) rotate(45deg);\n\topacity: 0;\n}\nto {\n transform: scale(1) rotate(45deg);\n\topacity: 1;\n}"]))),
1113
+ de = h$1(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n0% {\n\theight: 0;\n\twidth: 0;\n\topacity: 0;\n}\n40% {\n height: 0;\n\twidth: 6px;\n\topacity: 1;\n}\n100% {\n opacity: 1;\n height: 10px;\n}"]))),
1114
+ w = j("div")(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n width: 20px;\n opacity: 0;\n height: 20px;\n border-radius: 10px;\n background: ", ";\n position: relative;\n transform: rotate(45deg);\n\n animation: ", " 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)\n forwards;\n animation-delay: 100ms;\n &:after {\n content: '';\n box-sizing: border-box;\n animation: ", " 0.2s ease-out forwards;\n opacity: 0;\n animation-delay: 200ms;\n position: absolute;\n border-right: 2px solid;\n border-bottom: 2px solid;\n border-color: ", ";\n bottom: 6px;\n left: 6px;\n height: 10px;\n width: 6px;\n }\n"])), function (e) {
1115
+ return e.primary || "#61d345";
1116
+ }, pe, de, function (e) {
1117
+ return e.secondary || "#fff";
1346
1118
  });
1347
- var message = /*#__PURE__*/extractErrorMessage.y(Message, Object.assign({}, toast.ariaProps), resolveValue(toast.message, toast));
1348
- return /*#__PURE__*/extractErrorMessage.y(ToastBarBase, {
1349
- className: toast.className,
1350
- style: _extends({}, animationStyle, style, toast.style)
1351
- }, typeof children === 'function' ? children({
1352
- icon: icon,
1353
- message: message
1354
- }) : /*#__PURE__*/extractErrorMessage.y(extractErrorMessage.g, null, icon, message));
1355
- });
1356
- function _templateObject$5() {
1357
- var data = _taggedTemplateLiteralLoose(["\n z-index: 9999;\n > * {\n pointer-events: auto;\n }\n"]);
1358
- _templateObject$5 = function _templateObject() {
1359
- return data;
1119
+ var ue = j("div")(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n position: absolute;\n"]))),
1120
+ le = j("div")(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n min-width: 20px;\n min-height: 20px;\n"]))),
1121
+ Te = h$1(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\nfrom {\n transform: scale(0.6);\n opacity: 0.4;\n}\nto {\n transform: scale(1);\n opacity: 1;\n}"]))),
1122
+ fe = j("div")(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n position: relative;\n transform: scale(0.6);\n opacity: 0.4;\n min-width: 20px;\n animation: ", " 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)\n forwards;\n"])), Te),
1123
+ M = function M(_ref6) {
1124
+ var e = _ref6.toast;
1125
+ var t = e.icon,
1126
+ o = e.type,
1127
+ s = e.iconTheme;
1128
+ return t !== void 0 ? typeof t == "string" ? extractErrorMessage.y(fe, null, t) : t : o === "blank" ? null : extractErrorMessage.y(le, null, extractErrorMessage.y(V, _objectSpread({}, s)), o !== "loading" && extractErrorMessage.y(ue, null, o === "error" ? extractErrorMessage.y(_, _objectSpread({}, s)) : extractErrorMessage.y(w, _objectSpread({}, s))));
1360
1129
  };
1361
- return data;
1362
- }
1130
+ var ye = function ye(e) {
1131
+ return "\n0% {transform: translate3d(0,".concat(e * -200, "%,0) scale(.6); opacity:.5;}\n100% {transform: translate3d(0,0,0) scale(1); opacity:1;}\n");
1132
+ },
1133
+ ge = function ge(e) {
1134
+ return "\n0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}\n100% {transform: translate3d(0,".concat(e * -150, "%,-1px) scale(.6); opacity:0;}\n");
1135
+ },
1136
+ he = "0%{opacity:0;} 100%{opacity:1;}",
1137
+ xe = "0%{opacity:1;} 100%{opacity:0;}",
1138
+ be = j("div")(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n background: #fff;\n color: #363636;\n line-height: 1.3;\n will-change: transform;\n box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);\n max-width: 350px;\n pointer-events: auto;\n padding: 8px 10px;\n border-radius: 8px;\n"]))),
1139
+ Se = j("div")(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: center;\n margin: 4px 10px;\n color: inherit;\n flex: 1 1 auto;\n white-space: pre-line;\n"]))),
1140
+ Ae = function Ae(e, t) {
1141
+ var s = e.includes("top") ? 1 : -1,
1142
+ _ref7 = b() ? [he, xe] : [ye(s), ge(s)],
1143
+ _ref8 = _slicedToArray(_ref7, 2),
1144
+ a = _ref8[0],
1145
+ r = _ref8[1];
1146
+ return {
1147
+ animation: t ? "".concat(h$1(a), " 0.35s cubic-bezier(.21,1.02,.73,1) forwards") : "".concat(h$1(r), " 0.4s forwards cubic-bezier(.06,.71,.55,1)")
1148
+ };
1149
+ },
1150
+ F = extractErrorMessage.w(function (_ref9) {
1151
+ var e = _ref9.toast,
1152
+ t = _ref9.position,
1153
+ o = _ref9.style,
1154
+ s = _ref9.children;
1155
+ var a = e.height ? Ae(e.position || t || "top-center", e.visible) : {
1156
+ opacity: 0
1157
+ },
1158
+ r = extractErrorMessage.y(M, {
1159
+ toast: e
1160
+ }),
1161
+ c = extractErrorMessage.y(Se, _objectSpread({}, e.ariaProps), T(e.message, e));
1162
+ return extractErrorMessage.y(be, {
1163
+ className: e.className,
1164
+ style: _objectSpread(_objectSpread(_objectSpread({}, a), o), e.style)
1165
+ }, typeof s == "function" ? s({
1166
+ icon: r,
1167
+ message: c
1168
+ }) : extractErrorMessage.y(extractErrorMessage.g, null, r, c));
1169
+ });
1363
1170
  m(extractErrorMessage.y);
1364
- var getPositionStyle = function getPositionStyle(position, offset) {
1365
- var top = position.includes('top');
1366
- var verticalStyle = top ? {
1367
- top: 0
1368
- } : {
1369
- bottom: 0
1370
- };
1371
- var horizontalStyle = position.includes('center') ? {
1372
- justifyContent: 'center'
1373
- } : position.includes('right') ? {
1374
- justifyContent: 'flex-end'
1375
- } : {};
1376
- return _extends({
1377
- left: 0,
1378
- right: 0,
1379
- display: 'flex',
1380
- position: 'absolute',
1381
- transition: prefersReducedMotion() ? undefined : "all 230ms cubic-bezier(.21,1.02,.73,1)",
1382
- transform: "translateY(" + offset * (top ? 1 : -1) + "px)"
1383
- }, verticalStyle, horizontalStyle);
1384
- };
1385
- var activeClass = /*#__PURE__*/u( /*#__PURE__*/_templateObject$5());
1386
- var DEFAULT_OFFSET = 16;
1387
- var Toaster = function Toaster(_ref) {
1388
- var reverseOrder = _ref.reverseOrder,
1389
- _ref$position = _ref.position,
1390
- position = _ref$position === void 0 ? 'top-center' : _ref$position,
1391
- toastOptions = _ref.toastOptions,
1392
- gutter = _ref.gutter,
1393
- children = _ref.children,
1394
- containerStyle = _ref.containerStyle,
1395
- containerClassName = _ref.containerClassName;
1396
- var _useToaster = useToaster(toastOptions),
1397
- toasts = _useToaster.toasts,
1398
- handlers = _useToaster.handlers;
1399
- return /*#__PURE__*/extractErrorMessage.y("div", {
1400
- style: _extends({
1401
- position: 'fixed',
1402
- zIndex: 9999,
1403
- top: DEFAULT_OFFSET,
1404
- left: DEFAULT_OFFSET,
1405
- right: DEFAULT_OFFSET,
1406
- bottom: DEFAULT_OFFSET,
1407
- pointerEvents: 'none'
1408
- }, containerStyle),
1409
- className: containerClassName,
1410
- onMouseEnter: handlers.startPause,
1411
- onMouseLeave: handlers.endPause
1412
- }, toasts.map(function (t) {
1413
- var toastPosition = t.position || position;
1414
- var offset = handlers.calculateOffset(t, {
1415
- reverseOrder: reverseOrder,
1416
- gutter: gutter,
1417
- defaultPosition: position
1418
- });
1419
- var positionStyle = getPositionStyle(toastPosition, offset);
1420
- var ref = t.height ? undefined : createRectRef(function (rect) {
1421
- handlers.updateHeight(t.id, rect.height);
1422
- });
1423
- return /*#__PURE__*/extractErrorMessage.y("div", {
1424
- ref: ref,
1425
- className: t.visible ? activeClass : '',
1426
- key: t.id,
1427
- style: positionStyle
1428
- }, t.type === 'custom' ? resolveValue(t.message, t) : children ? children(t) : /*#__PURE__*/extractErrorMessage.y(ToastBar, {
1429
- toast: t,
1430
- position: toastPosition
1171
+ var Ee = function Ee(_ref10) {
1172
+ var e = _ref10.id,
1173
+ t = _ref10.className,
1174
+ o = _ref10.style,
1175
+ s = _ref10.onHeightUpdate,
1176
+ a = _ref10.children;
1177
+ var r = extractErrorMessage.T(function (c) {
1178
+ if (c) {
1179
+ var _i2 = function _i2() {
1180
+ var d = c.getBoundingClientRect().height;
1181
+ s(e, d);
1182
+ };
1183
+ _i2(), new MutationObserver(_i2).observe(c, {
1184
+ subtree: !0,
1185
+ childList: !0,
1186
+ characterData: !0
1187
+ });
1188
+ }
1189
+ }, [e, s]);
1190
+ return extractErrorMessage.y("div", {
1191
+ ref: r,
1192
+ className: t,
1193
+ style: o
1194
+ }, a);
1195
+ },
1196
+ Re = function Re(e, t) {
1197
+ var o = e.includes("top"),
1198
+ s = o ? {
1199
+ top: 0
1200
+ } : {
1201
+ bottom: 0
1202
+ },
1203
+ a = e.includes("center") ? {
1204
+ justifyContent: "center"
1205
+ } : e.includes("right") ? {
1206
+ justifyContent: "flex-end"
1207
+ } : {};
1208
+ return _objectSpread(_objectSpread({
1209
+ left: 0,
1210
+ right: 0,
1211
+ display: "flex",
1212
+ position: "absolute",
1213
+ transition: b() ? void 0 : "all 230ms cubic-bezier(.21,1.02,.73,1)",
1214
+ transform: "translateY(".concat(t * (o ? 1 : -1), "px)")
1215
+ }, s), a);
1216
+ },
1217
+ ve = u$1(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n z-index: 9999;\n > * {\n pointer-events: auto;\n }\n"]))),
1218
+ O = 16,
1219
+ Ie = function Ie(_ref11) {
1220
+ var e = _ref11.reverseOrder,
1221
+ _ref11$position = _ref11.position,
1222
+ t = _ref11$position === void 0 ? "top-center" : _ref11$position,
1223
+ o = _ref11.toastOptions,
1224
+ s = _ref11.gutter,
1225
+ a = _ref11.children,
1226
+ r = _ref11.containerStyle,
1227
+ c = _ref11.containerClassName;
1228
+ var _D = D(o),
1229
+ i = _D.toasts,
1230
+ d = _D.handlers;
1231
+ return extractErrorMessage.y("div", {
1232
+ style: _objectSpread({
1233
+ position: "fixed",
1234
+ zIndex: 9999,
1235
+ top: O,
1236
+ left: O,
1237
+ right: O,
1238
+ bottom: O,
1239
+ pointerEvents: "none"
1240
+ }, r),
1241
+ className: c,
1242
+ onMouseEnter: d.startPause,
1243
+ onMouseLeave: d.endPause
1244
+ }, i.map(function (p) {
1245
+ var g = p.position || t,
1246
+ E = d.calculateOffset(p, {
1247
+ reverseOrder: e,
1248
+ gutter: s,
1249
+ defaultPosition: t
1250
+ }),
1251
+ x = Re(g, E);
1252
+ return extractErrorMessage.y(Ee, {
1253
+ id: p.id,
1254
+ key: p.id,
1255
+ onHeightUpdate: d.updateHeight,
1256
+ className: p.visible ? ve : "",
1257
+ style: x
1258
+ }, p.type === "custom" ? T(p.message, p) : a ? a(p) : extractErrorMessage.y(F, {
1259
+ toast: p,
1260
+ position: g
1261
+ }));
1431
1262
  }));
1432
- }));
1433
- };
1434
- var toast$1 = toast;
1263
+ };
1264
+ var _t = n;
1435
1265
  var SuccessIcon = function SuccessIcon() {
1436
1266
  return /*#__PURE__*/extractErrorMessage.y("svg", {
1437
1267
  width: "20",
@@ -1474,7 +1304,7 @@ var errorStyles = Object.assign(Object.assign({}, baseStyles), {
1474
1304
  color: '#590607'
1475
1305
  });
1476
1306
  var Snackbar = function Snackbar() {
1477
- return /*#__PURE__*/extractErrorMessage.wn.createElement(Toaster, {
1307
+ return /*#__PURE__*/extractErrorMessage.wn.createElement(Ie, {
1478
1308
  containerStyle: {
1479
1309
  position: 'sticky',
1480
1310
  marginTop: '4px',
@@ -1498,91 +1328,91 @@ var itemOrNone = function itemOrNone(item) {
1498
1328
  var spaceOrNone = function spaceOrNone(space) {
1499
1329
  return space ? "".concat(space, "px") : undefined;
1500
1330
  };
1501
- var Flex = extractErrorMessage.He.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: ", ";\n\n flex-direction: ", ";\n justify-content: ", ";\n align-items: ", ";\n flex-grow: ", ";\n flex-shrink: ", ";\n order: ", ";\n align-self: ", ";\n flex-flow: ", ";\n flex-wrap: ", ";\n\n width: ", ";\n height: ", ";\n max-width: ", ";\n max-height: ", ";\n min-width: ", ";\n min-height: ", ";\n padding: ", ";\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n padding-top: ", ";\n padding-right: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n\n gap: ", ";\n"])), function (_ref7) {
1502
- var inline = _ref7.inline;
1331
+ var Flex = extractErrorMessage.He.div(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n display: ", ";\n\n flex-direction: ", ";\n justify-content: ", ";\n align-items: ", ";\n flex-grow: ", ";\n flex-shrink: ", ";\n order: ", ";\n align-self: ", ";\n flex-flow: ", ";\n flex-wrap: ", ";\n\n width: ", ";\n height: ", ";\n max-width: ", ";\n max-height: ", ";\n min-width: ", ";\n min-height: ", ";\n padding: ", ";\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n padding-top: ", ";\n padding-right: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n\n gap: ", ";\n"])), function (_ref12) {
1332
+ var inline = _ref12.inline;
1503
1333
  return inline ? 'inline-flex' : 'flex';
1504
- }, function (_ref8) {
1505
- var direction = _ref8.direction;
1334
+ }, function (_ref13) {
1335
+ var direction = _ref13.direction;
1506
1336
  return itemOrNone(direction);
1507
- }, function (_ref9) {
1508
- var justifyContent = _ref9.justifyContent,
1509
- center = _ref9.center;
1337
+ }, function (_ref14) {
1338
+ var justifyContent = _ref14.justifyContent,
1339
+ center = _ref14.center;
1510
1340
  return center ? 'center' : itemOrNone(justifyContent);
1511
- }, function (_ref10) {
1512
- var alignItems = _ref10.alignItems,
1513
- center = _ref10.center;
1341
+ }, function (_ref15) {
1342
+ var alignItems = _ref15.alignItems,
1343
+ center = _ref15.center;
1514
1344
  return center ? 'center' : itemOrNone(alignItems);
1515
- }, function (_ref11) {
1516
- var grow = _ref11.grow;
1345
+ }, function (_ref16) {
1346
+ var grow = _ref16.grow;
1517
1347
  return itemOrNone(grow);
1518
- }, function (_ref12) {
1519
- var shrink = _ref12.shrink;
1348
+ }, function (_ref17) {
1349
+ var shrink = _ref17.shrink;
1520
1350
  return itemOrNone(shrink);
1521
- }, function (_ref13) {
1522
- var order = _ref13.order;
1351
+ }, function (_ref18) {
1352
+ var order = _ref18.order;
1523
1353
  return itemOrNone(order);
1524
- }, function (_ref14) {
1525
- var alignSelf = _ref14.alignSelf;
1354
+ }, function (_ref19) {
1355
+ var alignSelf = _ref19.alignSelf;
1526
1356
  return itemOrNone(alignSelf);
1527
- }, function (_ref15) {
1528
- var flow = _ref15.flow;
1357
+ }, function (_ref20) {
1358
+ var flow = _ref20.flow;
1529
1359
  return itemOrNone(flow);
1530
- }, function (_ref16) {
1531
- var wrap = _ref16.wrap;
1360
+ }, function (_ref21) {
1361
+ var wrap = _ref21.wrap;
1532
1362
  return itemOrNone(wrap);
1533
- }, function (_ref17) {
1534
- var width = _ref17.width;
1363
+ }, function (_ref22) {
1364
+ var width = _ref22.width;
1535
1365
  return typeof width === 'string' ? width : spaceOrNone(width);
1536
- }, function (_ref18) {
1537
- var height = _ref18.height;
1366
+ }, function (_ref23) {
1367
+ var height = _ref23.height;
1538
1368
  return typeof height === 'string' ? height : spaceOrNone(height);
1539
- }, function (_ref19) {
1540
- var maxWidth = _ref19.maxWidth;
1369
+ }, function (_ref24) {
1370
+ var maxWidth = _ref24.maxWidth;
1541
1371
  return typeof maxWidth === 'string' ? maxWidth : spaceOrNone(maxWidth);
1542
- }, function (_ref20) {
1543
- var maxHeight = _ref20.maxHeight;
1372
+ }, function (_ref25) {
1373
+ var maxHeight = _ref25.maxHeight;
1544
1374
  return typeof maxHeight === 'string' ? maxHeight : spaceOrNone(maxHeight);
1545
- }, function (_ref21) {
1546
- var minWidth = _ref21.minWidth;
1375
+ }, function (_ref26) {
1376
+ var minWidth = _ref26.minWidth;
1547
1377
  return typeof minWidth === 'string' ? minWidth : spaceOrNone(minWidth);
1548
- }, function (_ref22) {
1549
- var minHeight = _ref22.minHeight;
1378
+ }, function (_ref27) {
1379
+ var minHeight = _ref27.minHeight;
1550
1380
  return typeof minHeight === 'string' ? minHeight : spaceOrNone(minHeight);
1551
- }, function (_ref23) {
1552
- var padding = _ref23.padding;
1381
+ }, function (_ref28) {
1382
+ var padding = _ref28.padding;
1553
1383
  return spaceOrNone(padding);
1554
- }, function (_ref24) {
1555
- var margin = _ref24.margin;
1384
+ }, function (_ref29) {
1385
+ var margin = _ref29.margin;
1556
1386
  return spaceOrNone(margin);
1557
- }, function (_ref25) {
1558
- var marginTop = _ref25.marginTop;
1387
+ }, function (_ref30) {
1388
+ var marginTop = _ref30.marginTop;
1559
1389
  return spaceOrNone(marginTop);
1560
- }, function (_ref26) {
1561
- var marginRight = _ref26.marginRight;
1390
+ }, function (_ref31) {
1391
+ var marginRight = _ref31.marginRight;
1562
1392
  return spaceOrNone(marginRight);
1563
- }, function (_ref27) {
1564
- var marginBottom = _ref27.marginBottom;
1393
+ }, function (_ref32) {
1394
+ var marginBottom = _ref32.marginBottom;
1565
1395
  return spaceOrNone(marginBottom);
1566
- }, function (_ref28) {
1567
- var marginLeft = _ref28.marginLeft;
1396
+ }, function (_ref33) {
1397
+ var marginLeft = _ref33.marginLeft;
1568
1398
  return spaceOrNone(marginLeft);
1569
- }, function (_ref29) {
1570
- var paddingTop = _ref29.paddingTop;
1399
+ }, function (_ref34) {
1400
+ var paddingTop = _ref34.paddingTop;
1571
1401
  return spaceOrNone(paddingTop);
1572
- }, function (_ref30) {
1573
- var paddingRight = _ref30.paddingRight;
1402
+ }, function (_ref35) {
1403
+ var paddingRight = _ref35.paddingRight;
1574
1404
  return spaceOrNone(paddingRight);
1575
- }, function (_ref31) {
1576
- var paddingBottom = _ref31.paddingBottom;
1405
+ }, function (_ref36) {
1406
+ var paddingBottom = _ref36.paddingBottom;
1577
1407
  return spaceOrNone(paddingBottom);
1578
- }, function (_ref32) {
1579
- var paddingLeft = _ref32.paddingLeft;
1408
+ }, function (_ref37) {
1409
+ var paddingLeft = _ref37.paddingLeft;
1580
1410
  return spaceOrNone(paddingLeft);
1581
- }, function (_ref33) {
1582
- var gap = _ref33.gap;
1411
+ }, function (_ref38) {
1412
+ var gap = _ref38.gap;
1583
1413
  return spaceOrNone(gap);
1584
1414
  });
1585
- var Text = extractErrorMessage.He.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n color: ", ";\n text-align: ", ";\n ", ";\n"])), function (props) {
1415
+ var Text = extractErrorMessage.He.div(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n color: ", ";\n text-align: ", ";\n ", ";\n"])), function (props) {
1586
1416
  return props.color && props.theme.colors[props.color];
1587
1417
  }, function (props) {
1588
1418
  return props.align;
@@ -1664,7 +1494,7 @@ var ErrorSVG = function ErrorSVG() {
1664
1494
  stopColor: "#E4C7C7"
1665
1495
  }))));
1666
1496
  };
1667
- var ErrorHeader = extractErrorMessage.He(Text)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n text-align: center;\n"])));
1497
+ var ErrorHeader = extractErrorMessage.He(Text)(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n text-align: center;\n"])));
1668
1498
  var ErrorScreen = function ErrorScreen() {
1669
1499
  var _a, _b;
1670
1500
  var _useGlobalReducer = useGlobalReducer(),
@@ -1683,29 +1513,29 @@ var ErrorScreen = function ErrorScreen() {
1683
1513
  var mutation = function mutation() {
1684
1514
  return function (key, fetcher) {
1685
1515
  var config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
1686
- var _extractErrorMessage$ = extractErrorMessage.useSWRConfig(),
1687
- mutate = _extractErrorMessage$.mutate;
1516
+ var _extractErrorMessage$3 = extractErrorMessage.useSWRConfig(),
1517
+ mutate = _extractErrorMessage$3.mutate;
1688
1518
  var keyRef = extractErrorMessage._(key);
1689
1519
  var fetcherRef = extractErrorMessage._(fetcher);
1690
1520
  var configRef = extractErrorMessage._(config);
1691
1521
  var ditchMutationsUntilRef = extractErrorMessage._(0);
1692
- var _extractErrorMessage$2 = extractErrorMessage.useStateWithDeps({
1522
+ var _extractErrorMessage$4 = extractErrorMessage.useStateWithDeps({
1693
1523
  data: extractErrorMessage.UNDEFINED,
1694
1524
  error: extractErrorMessage.UNDEFINED,
1695
1525
  isMutating: false
1696
1526
  }),
1697
- _extractErrorMessage$3 = _slicedToArray(_extractErrorMessage$2, 3),
1698
- stateRef = _extractErrorMessage$3[0],
1699
- stateDependencies = _extractErrorMessage$3[1],
1700
- setState = _extractErrorMessage$3[2];
1527
+ _extractErrorMessage$5 = _slicedToArray(_extractErrorMessage$4, 3),
1528
+ stateRef = _extractErrorMessage$5[0],
1529
+ stateDependencies = _extractErrorMessage$5[1],
1530
+ setState = _extractErrorMessage$5[2];
1701
1531
  var currentState = stateRef.current;
1702
1532
  var trigger = extractErrorMessage.T( /*#__PURE__*/function () {
1703
- var _ref34 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(arg, opts) {
1704
- var _extractErrorMessage$4, _extractErrorMessage$5, serializedKey, resolvedKey, options, mutationStartedAt, data;
1533
+ var _ref39 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(arg, opts) {
1534
+ var _extractErrorMessage$6, _extractErrorMessage$7, serializedKey, resolvedKey, options, mutationStartedAt, data;
1705
1535
  return _regeneratorRuntime().wrap(function _callee$(_context) {
1706
1536
  while (1) switch (_context.prev = _context.next) {
1707
1537
  case 0:
1708
- _extractErrorMessage$4 = extractErrorMessage.serialize(keyRef.current), _extractErrorMessage$5 = _slicedToArray(_extractErrorMessage$4, 2), serializedKey = _extractErrorMessage$5[0], resolvedKey = _extractErrorMessage$5[1];
1538
+ _extractErrorMessage$6 = extractErrorMessage.serialize(keyRef.current), _extractErrorMessage$7 = _slicedToArray(_extractErrorMessage$6, 2), serializedKey = _extractErrorMessage$7[0], resolvedKey = _extractErrorMessage$7[1];
1709
1539
  if (fetcherRef.current) {
1710
1540
  _context.next = 3;
1711
1541
  break;
@@ -1769,7 +1599,7 @@ var mutation = function mutation() {
1769
1599
  }, _callee, null, [[9, 17]]);
1770
1600
  }));
1771
1601
  return function (_x, _x2) {
1772
- return _ref34.apply(this, arguments);
1602
+ return _ref39.apply(this, arguments);
1773
1603
  };
1774
1604
  }(), []);
1775
1605
  var reset = extractErrorMessage.T(function () {
@@ -1846,20 +1676,20 @@ var useExtractSlug = function useExtractSlug() {
1846
1676
  _useGlobalReducer4 = _slicedToArray(_useGlobalReducer3, 2),
1847
1677
  state = _useGlobalReducer4[0],
1848
1678
  dispatch = _useGlobalReducer4[1];
1849
- var _extractErrorMessage$6 = extractErrorMessage.h(),
1850
- _extractErrorMessage$7 = _slicedToArray(_extractErrorMessage$6, 2),
1851
- pattern = _extractErrorMessage$7[0],
1852
- setPattern = _extractErrorMessage$7[1];
1679
+ var _extractErrorMessage$8 = extractErrorMessage.h(),
1680
+ _extractErrorMessage$9 = _slicedToArray(_extractErrorMessage$8, 2),
1681
+ pattern = _extractErrorMessage$9[0],
1682
+ setPattern = _extractErrorMessage$9[1];
1853
1683
  var stytchClient = useStytch();
1854
1684
  var slug = extractFromPattern(pattern || null);
1855
- var _useMutate = useMutate('stytchClient.organization.getBySlug', function (_, _ref35) {
1856
- var slug = _ref35.arg.slug;
1685
+ var _useMutate = useMutate('stytchClient.organization.getBySlug', function (_, _ref40) {
1686
+ var slug = _ref40.arg.slug;
1857
1687
  return stytchClient.organization.getBySlug({
1858
1688
  organization_slug: slug
1859
1689
  });
1860
1690
  }, {
1861
- onSuccess: function onSuccess(_ref36) {
1862
- var organization = _ref36.organization;
1691
+ onSuccess: function onSuccess(_ref41) {
1692
+ var organization = _ref41.organization;
1863
1693
  if (organization === null) {
1864
1694
  dispatch({
1865
1695
  type: 'set_error_message_and_transition',
@@ -1876,8 +1706,8 @@ var useExtractSlug = function useExtractSlug() {
1876
1706
  trigger = _useMutate.trigger,
1877
1707
  isSearching = _useMutate.isMutating;
1878
1708
  extractErrorMessage.p(function () {
1879
- internal.readB2BInternals(stytchClient).bootstrap.getAsync().then(function (_ref37) {
1880
- var slugPattern = _ref37.slugPattern;
1709
+ internal.readB2BInternals(stytchClient).bootstrap.getAsync().then(function (_ref42) {
1710
+ var slugPattern = _ref42.slugPattern;
1881
1711
  setPattern(slugPattern);
1882
1712
  });
1883
1713
  }, [stytchClient]);
@@ -1896,10 +1726,10 @@ var useExtractSlug = function useExtractSlug() {
1896
1726
  };
1897
1727
  var useBootstrap = function useBootstrap() {
1898
1728
  var stytchClient = useStytch();
1899
- var _extractErrorMessage$8 = extractErrorMessage.h(internal.readB2BInternals(stytchClient).bootstrap.getSync()),
1900
- _extractErrorMessage$9 = _slicedToArray(_extractErrorMessage$8, 2),
1901
- boostrap = _extractErrorMessage$9[0],
1902
- setBootstrap = _extractErrorMessage$9[1];
1729
+ var _extractErrorMessage$10 = extractErrorMessage.h(internal.readB2BInternals(stytchClient).bootstrap.getSync()),
1730
+ _extractErrorMessage$11 = _slicedToArray(_extractErrorMessage$10, 2),
1731
+ boostrap = _extractErrorMessage$11[0],
1732
+ setBootstrap = _extractErrorMessage$11[1];
1903
1733
  extractErrorMessage.p(function () {
1904
1734
  internal.readB2BInternals(stytchClient).bootstrap.getAsync().then(function (data) {
1905
1735
  setBootstrap(data);
@@ -1923,22 +1753,22 @@ var usePasswordInput = function usePasswordInput() {
1923
1753
  var stytch = useStytch();
1924
1754
  var onEvent = useEventCallback();
1925
1755
  var onError = useErrorCallback();
1926
- var _extractErrorMessage$10 = extractErrorMessage.h(state.formState.passwordState.email),
1927
- _extractErrorMessage$11 = _slicedToArray(_extractErrorMessage$10, 2),
1928
- email = _extractErrorMessage$11[0],
1929
- setEmail = _extractErrorMessage$11[1];
1930
- var _extractErrorMessage$12 = extractErrorMessage.h(''),
1756
+ var _extractErrorMessage$12 = extractErrorMessage.h(state.formState.passwordState.email),
1931
1757
  _extractErrorMessage$13 = _slicedToArray(_extractErrorMessage$12, 2),
1932
- password = _extractErrorMessage$13[0],
1933
- setPassword = _extractErrorMessage$13[1];
1758
+ email = _extractErrorMessage$13[0],
1759
+ setEmail = _extractErrorMessage$13[1];
1934
1760
  var _extractErrorMessage$14 = extractErrorMessage.h(''),
1935
1761
  _extractErrorMessage$15 = _slicedToArray(_extractErrorMessage$14, 2),
1936
- errorMessage = _extractErrorMessage$15[0],
1937
- setErrorMessage = _extractErrorMessage$15[1];
1938
- var _extractErrorMessage$16 = extractErrorMessage.h(false),
1762
+ password = _extractErrorMessage$15[0],
1763
+ setPassword = _extractErrorMessage$15[1];
1764
+ var _extractErrorMessage$16 = extractErrorMessage.h(''),
1939
1765
  _extractErrorMessage$17 = _slicedToArray(_extractErrorMessage$16, 2),
1940
- isSubmitting = _extractErrorMessage$17[0],
1941
- setIsSubmitting = _extractErrorMessage$17[1];
1766
+ errorMessage = _extractErrorMessage$17[0],
1767
+ setErrorMessage = _extractErrorMessage$17[1];
1768
+ var _extractErrorMessage$18 = extractErrorMessage.h(false),
1769
+ _extractErrorMessage$19 = _slicedToArray(_extractErrorMessage$18, 2),
1770
+ isSubmitting = _extractErrorMessage$19[0],
1771
+ setIsSubmitting = _extractErrorMessage$19[1];
1942
1772
  var organization = state.flowState.organization;
1943
1773
  var submitPassword = function submitPassword(organization_id) {
1944
1774
  var _a, _b;
@@ -2028,7 +1858,7 @@ var extractFromPattern = function extractFromPattern(pattern) {
2028
1858
  }
2029
1859
  return null;
2030
1860
  };
2031
- var Button = extractErrorMessage.He.button(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n all: unset;\n width: 100%;\n height: 45px;\n border-radius: 4px;\n cursor: pointer;\n font-size: 18px;\n text-transform: none;\n font-family: ", ";\n box-shadow: none;\n text-align: center;\n\n ", "\n\n &:disabled {\n background-color: ", ";\n color: ", ";\n border: ", ";\n border-radius: ", ";\n cursor: not-allowed;\n }\n"])), function (props) {
1861
+ var Button = extractErrorMessage.He.button(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n all: unset;\n width: 100%;\n height: 45px;\n border-radius: 4px;\n cursor: pointer;\n font-size: 18px;\n text-transform: none;\n font-family: ", ";\n box-shadow: none;\n text-align: center;\n\n ", "\n\n &:disabled {\n background-color: ", ";\n color: ", ";\n border: ", ";\n border-radius: ", ";\n cursor: not-allowed;\n }\n"])), function (props) {
2032
1862
  return props.theme.typography.fontFamily;
2033
1863
  }, function (props) {
2034
1864
  switch (props.variant) {
@@ -2051,20 +1881,20 @@ var Button = extractErrorMessage.He.button(_templateObject8 || (_templateObject8
2051
1881
  Button.defaultProps = {
2052
1882
  variant: 'primary'
2053
1883
  };
2054
- var circularRotateKeyframe = extractErrorMessage.Ue(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n"])));
2055
- var circularDashKeyframe = extractErrorMessage.Ue(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n 0% {\n stroke-dasharray: 1px, 200px;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -15px;\n }\n 100% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -125px;\n }\n"])));
2056
- var AnimatedCircle = extractErrorMessage.He.circle(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n stroke-dasharray: 80px, 200px;\n stroke-dashoffset: 0;\n animation: ", " 1.4s ease-in-out infinite;\n stroke: ", ";\n fill: none;\n"])), circularDashKeyframe, function (props) {
1884
+ var circularRotateKeyframe = extractErrorMessage.Ue(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n"])));
1885
+ var circularDashKeyframe = extractErrorMessage.Ue(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n 0% {\n stroke-dasharray: 1px, 200px;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -15px;\n }\n 100% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -125px;\n }\n"])));
1886
+ var AnimatedCircle = extractErrorMessage.He.circle(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n stroke-dasharray: 80px, 200px;\n stroke-dashoffset: 0;\n animation: ", " 1.4s ease-in-out infinite;\n stroke: ", ";\n fill: none;\n"])), circularDashKeyframe, function (props) {
2057
1887
  return props.theme.colors.primary;
2058
1888
  });
2059
- var CircularProgressRoot = extractErrorMessage.He.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n width: ", "px;\n height: ", "px;\n animation: ", " 1.4s ease-in-out infinite;\n"])), function (props) {
1889
+ var CircularProgressRoot = extractErrorMessage.He.div(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["\n width: ", "px;\n height: ", "px;\n animation: ", " 1.4s ease-in-out infinite;\n"])), function (props) {
2060
1890
  return props.size;
2061
1891
  }, function (props) {
2062
1892
  return props.size;
2063
1893
  }, circularRotateKeyframe);
2064
- var CircularProgressSVG = extractErrorMessage.He.svg(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n display: block;\n"])));
2065
- var CircularProgress = function CircularProgress(_ref38) {
2066
- var size = _ref38.size,
2067
- thickness = _ref38.thickness;
1894
+ var CircularProgressSVG = extractErrorMessage.He.svg(_templateObject25 || (_templateObject25 = _taggedTemplateLiteral(["\n display: block;\n"])));
1895
+ var CircularProgress = function CircularProgress(_ref43) {
1896
+ var size = _ref43.size,
1897
+ thickness = _ref43.thickness;
2068
1898
  return /*#__PURE__*/extractErrorMessage.wn.createElement(CircularProgressRoot, {
2069
1899
  size: size
2070
1900
  }, /*#__PURE__*/extractErrorMessage.wn.createElement(CircularProgressSVG, {
@@ -2092,7 +1922,7 @@ var SubmitButton = function SubmitButton(props) {
2092
1922
  "data-testid": "loading-icon"
2093
1923
  }))) : props.text);
2094
1924
  };
2095
- var Input = extractErrorMessage.He.input(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n background-color: ", ";\n height: 47px;\n padding: 0 8px;\n box-sizing: border-box;\n border: 1px solid ", ";\n border-radius: ", ";\n color: ", ";\n font-family: ", ";\n font-size: 18px;\n &::placeholder {\n color: ", ";\n }\n\n &:disabled {\n border: 1px solid ", ";\n color: ", ";\n background-color: ", ";\n }\n"])), function (props) {
1925
+ var Input = extractErrorMessage.He.input(_templateObject26 || (_templateObject26 = _taggedTemplateLiteral(["\n background-color: ", ";\n height: 47px;\n padding: 0 8px;\n box-sizing: border-box;\n border: 1px solid ", ";\n border-radius: ", ";\n color: ", ";\n font-family: ", ";\n font-size: 18px;\n &::placeholder {\n color: ", ";\n }\n\n &:disabled {\n border: 1px solid ", ";\n color: ", ";\n background-color: ", ";\n }\n"])), function (props) {
2096
1926
  return props.theme.inputs.backgroundColor;
2097
1927
  }, function (props) {
2098
1928
  return props.theme.inputs.borderColor;
@@ -2111,13 +1941,13 @@ var Input = extractErrorMessage.He.input(_templateObject14 || (_templateObject14
2111
1941
  }, function (props) {
2112
1942
  return props.theme.colors.disabled;
2113
1943
  });
2114
- var EmailInput = function EmailInput(_ref39) {
2115
- var email = _ref39.email,
2116
- setEmail = _ref39.setEmail,
2117
- _ref39$disableInput = _ref39.disableInput,
2118
- disableInput = _ref39$disableInput === void 0 ? false : _ref39$disableInput,
2119
- _ref39$hasPasskeys = _ref39.hasPasskeys,
2120
- hasPasskeys = _ref39$hasPasskeys === void 0 ? false : _ref39$hasPasskeys;
1944
+ var EmailInput = function EmailInput(_ref44) {
1945
+ var email = _ref44.email,
1946
+ setEmail = _ref44.setEmail,
1947
+ _ref44$disableInput = _ref44.disableInput,
1948
+ disableInput = _ref44$disableInput === void 0 ? false : _ref44$disableInput,
1949
+ _ref44$hasPasskeys = _ref44.hasPasskeys,
1950
+ hasPasskeys = _ref44$hasPasskeys === void 0 ? false : _ref44$hasPasskeys;
2121
1951
  return /*#__PURE__*/extractErrorMessage.wn.createElement(Input, Object.assign({
2122
1952
  placeholder: "example@email.com",
2123
1953
  name: "email",
@@ -2155,8 +1985,8 @@ var mapURLsToLinks = function mapURLsToLinks(str) {
2155
1985
  }
2156
1986
  return chunkResults;
2157
1987
  };
2158
- var ErrorText = function ErrorText(_ref40) {
2159
- var errorMessage = _ref40.errorMessage;
1988
+ var ErrorText = function ErrorText(_ref45) {
1989
+ var errorMessage = _ref45.errorMessage;
2160
1990
  var tokens = extractErrorMessage.F(function () {
2161
1991
  return mapURLsToLinks(errorMessage);
2162
1992
  }, [errorMessage]);
@@ -2166,9 +1996,9 @@ var ErrorText = function ErrorText(_ref40) {
2166
1996
  }, tokens);
2167
1997
  };
2168
1998
  var JIT_PROVISIONING_ERRORS = ['email_jit_provisioning_not_allowed', 'invalid_email_for_jit_provisioning'];
2169
- var parseErrorMessage = function parseErrorMessage(error, _ref41) {
2170
- var email = _ref41.email,
2171
- org = _ref41.org;
1999
+ var parseErrorMessage = function parseErrorMessage(error, _ref46) {
2000
+ var email = _ref46.email,
2001
+ org = _ref46.org;
2172
2002
  if (JIT_PROVISIONING_ERRORS.includes(error.error_type)) {
2173
2003
  return "".concat(email, " does not have access to ").concat(org, ". If you think this is a mistake, contact your admin");
2174
2004
  } else {
@@ -2182,14 +2012,14 @@ var MagicLinkEmailForm = function MagicLinkEmailForm() {
2182
2012
  dispatch = _useGlobalReducer8[1];
2183
2013
  var stytchClient = useStytch();
2184
2014
  var config = useConfig();
2185
- var _extractErrorMessage$18 = extractErrorMessage.h(''),
2186
- _extractErrorMessage$19 = _slicedToArray(_extractErrorMessage$18, 2),
2187
- emailInput = _extractErrorMessage$19[0],
2188
- setEmailInput = _extractErrorMessage$19[1];
2015
+ var _extractErrorMessage$20 = extractErrorMessage.h(''),
2016
+ _extractErrorMessage$21 = _slicedToArray(_extractErrorMessage$20, 2),
2017
+ emailInput = _extractErrorMessage$21[0],
2018
+ setEmailInput = _extractErrorMessage$21[1];
2189
2019
  var providedEmail = state.primary.email;
2190
2020
  var email = providedEmail || emailInput;
2191
- var _useMutate2 = useMutate('stytch.magicLinks.email.loginOrSignup', function (_, _ref42) {
2192
- var organization_id = _ref42.arg.organization_id;
2021
+ var _useMutate2 = useMutate('stytch.magicLinks.email.loginOrSignup', function (_, _ref47) {
2022
+ var organization_id = _ref47.arg.organization_id;
2193
2023
  var _a, _b, _c, _d;
2194
2024
  return stytchClient.magicLinks.email.loginOrSignup({
2195
2025
  email_address: email,
@@ -2263,10 +2093,10 @@ var MagicLinkEmailDiscoveryForm = function MagicLinkEmailDiscoveryForm() {
2263
2093
  dispatch = _useGlobalReducer10[1];
2264
2094
  var stytchClient = useStytch();
2265
2095
  var config = useConfig();
2266
- var _extractErrorMessage$20 = extractErrorMessage.h(''),
2267
- _extractErrorMessage$21 = _slicedToArray(_extractErrorMessage$20, 2),
2268
- email = _extractErrorMessage$21[0],
2269
- setEmail = _extractErrorMessage$21[1];
2096
+ var _extractErrorMessage$22 = extractErrorMessage.h(''),
2097
+ _extractErrorMessage$23 = _slicedToArray(_extractErrorMessage$22, 2),
2098
+ email = _extractErrorMessage$23[0],
2099
+ setEmail = _extractErrorMessage$23[1];
2270
2100
  var _useMutate3 = useMutate('stytch.magicLinks.discovery.send', function () {
2271
2101
  var _a, _b;
2272
2102
  return stytchClient.magicLinks.email.discovery.send({
@@ -2321,9 +2151,9 @@ var MagicLinkEmailDiscoveryForm = function MagicLinkEmailDiscoveryForm() {
2321
2151
  text: 'Continue with email'
2322
2152
  })));
2323
2153
  };
2324
- var SSOButton = function SSOButton(_ref43) {
2325
- var display_name = _ref43.display_name,
2326
- connection_id = _ref43.connection_id;
2154
+ var SSOButton = function SSOButton(_ref48) {
2155
+ var display_name = _ref48.display_name,
2156
+ connection_id = _ref48.connection_id;
2327
2157
  var stytchClient = useStytch();
2328
2158
  var config = useConfig();
2329
2159
  var onButtonClick = function onButtonClick() {
@@ -2366,17 +2196,17 @@ var SSOButtons = function SSOButtons() {
2366
2196
  });
2367
2197
  }));
2368
2198
  };
2369
- var DividerContainer = extractErrorMessage.He(Flex)(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n color: ", ";\n"])), function (props) {
2199
+ var DividerContainer = extractErrorMessage.He(Flex)(_templateObject27 || (_templateObject27 = _taggedTemplateLiteral(["\n color: ", ";\n"])), function (props) {
2370
2200
  return props.theme.colors.secondary;
2371
2201
  });
2372
- var DividerBar = extractErrorMessage.He.div(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n ", "\n ", "\n border-bottom: 1px solid ", ";\n flex-grow: 1;\n"])), function (props) {
2202
+ var DividerBar = extractErrorMessage.He.div(_templateObject28 || (_templateObject28 = _taggedTemplateLiteral(["\n ", "\n ", "\n border-bottom: 1px solid ", ";\n flex-grow: 1;\n"])), function (props) {
2373
2203
  return props.$placement === 'left' && 'margin-right: 6px;';
2374
2204
  }, function (props) {
2375
2205
  return props.$placement === 'right' && 'margin-left: 6px;';
2376
2206
  }, function (props) {
2377
2207
  return props.theme.colors.secondary;
2378
2208
  });
2379
- var StyledText = extractErrorMessage.He(Text)(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n color: ", ";\n"])), function (props) {
2209
+ var StyledText = extractErrorMessage.He(Text)(_templateObject29 || (_templateObject29 = _taggedTemplateLiteral(["\n color: ", ";\n"])), function (props) {
2380
2210
  return props.theme.colors.secondary;
2381
2211
  });
2382
2212
  var Divider = function Divider() {
@@ -2388,9 +2218,9 @@ var Divider = function Divider() {
2388
2218
  "$placement": "right"
2389
2219
  }));
2390
2220
  };
2391
- var PasswordIconSvg = function PasswordIconSvg(_ref44) {
2392
- var _ref44$enabled = _ref44.enabled,
2393
- enabled = _ref44$enabled === void 0 ? false : _ref44$enabled;
2221
+ var PasswordIconSvg = function PasswordIconSvg(_ref49) {
2222
+ var _ref49$enabled = _ref49.enabled,
2223
+ enabled = _ref49$enabled === void 0 ? false : _ref49$enabled;
2394
2224
  return /*#__PURE__*/extractErrorMessage.wn.createElement("svg", {
2395
2225
  width: "20",
2396
2226
  height: "14",
@@ -2414,7 +2244,7 @@ var PasswordIconVisibleSvg = function PasswordIconVisibleSvg() {
2414
2244
  fill: "#19303D"
2415
2245
  }));
2416
2246
  };
2417
- var BaseInput = extractErrorMessage.He.input(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n border: 0;\n padding: 0;\n width: 100%;\n\n background-color: transparent;\n height: 45px;\n color: ", ";\n font-family: ", ";\n font-size: 18px;\n\n &::placeholder: {\n color: ", ";\n }\n\n &:disabled {\n color: ", ";\n background-color: ", ";\n }\n\n &:focus {\n outline: none;\n }\n"])), function (props) {
2247
+ var BaseInput = extractErrorMessage.He.input(_templateObject30 || (_templateObject30 = _taggedTemplateLiteral(["\n border: 0;\n padding: 0;\n width: 100%;\n\n background-color: transparent;\n height: 45px;\n color: ", ";\n font-family: ", ";\n font-size: 18px;\n\n &::placeholder: {\n color: ", ";\n }\n\n &:disabled {\n color: ", ";\n background-color: ", ";\n }\n\n &:focus {\n outline: none;\n }\n"])), function (props) {
2418
2248
  return props.theme.inputs.textColor;
2419
2249
  }, function (props) {
2420
2250
  return props.theme.typography.fontFamily;
@@ -2425,7 +2255,7 @@ var BaseInput = extractErrorMessage.He.input(_templateObject18 || (_templateObje
2425
2255
  }, function (props) {
2426
2256
  return props.theme.colors.disabled;
2427
2257
  });
2428
- var InputContainer = extractErrorMessage.He(Flex)(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n background-color: ", ";\n height: 45px;\n padding-left: 8px;\n padding-right: 8px;\n border: 1px solid ", ";\n border-radius: ", ";\n color: ", ";\n font-family: ", ";\n font-size: 18px;\n width: calc(100% - 18px);\n & input::placeholder: {\n color: ", ";\n }\n"])), function (props) {
2258
+ var InputContainer = extractErrorMessage.He(Flex)(_templateObject31 || (_templateObject31 = _taggedTemplateLiteral(["\n background-color: ", ";\n height: 45px;\n padding-left: 8px;\n padding-right: 8px;\n border: 1px solid ", ";\n border-radius: ", ";\n color: ", ";\n font-family: ", ";\n font-size: 18px;\n width: calc(100% - 18px);\n & input::placeholder: {\n color: ", ";\n }\n"])), function (props) {
2429
2259
  return props.theme.inputs.backgroundColor;
2430
2260
  }, function (props) {
2431
2261
  return props.theme.inputs.borderColor;
@@ -2438,11 +2268,11 @@ var InputContainer = extractErrorMessage.He(Flex)(_templateObject19 || (_templat
2438
2268
  }, function (props) {
2439
2269
  return props.theme.inputs.placeholderColor;
2440
2270
  });
2441
- var PasswordIconButton = extractErrorMessage.He.button(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n all: unset;\n cursor: pointer;\n"])));
2442
- var PasswordIcon = function PasswordIcon(_ref45) {
2443
- var onClick = _ref45.onClick,
2444
- enabled = _ref45.enabled,
2445
- visible = _ref45.visible;
2271
+ var PasswordIconButton = extractErrorMessage.He.button(_templateObject32 || (_templateObject32 = _taggedTemplateLiteral(["\n all: unset;\n cursor: pointer;\n"])));
2272
+ var PasswordIcon = function PasswordIcon(_ref50) {
2273
+ var onClick = _ref50.onClick,
2274
+ enabled = _ref50.enabled,
2275
+ visible = _ref50.visible;
2446
2276
  return /*#__PURE__*/extractErrorMessage.wn.createElement(PasswordIconButton, {
2447
2277
  onClick: onClick,
2448
2278
  type: "button"
@@ -2450,14 +2280,14 @@ var PasswordIcon = function PasswordIcon(_ref45) {
2450
2280
  enabled: enabled
2451
2281
  }));
2452
2282
  };
2453
- var PasswordInput = function PasswordInput(_ref46) {
2454
- var password = _ref46.password,
2455
- setPassword = _ref46.setPassword,
2456
- type = _ref46.type;
2457
- var _extractErrorMessage$22 = extractErrorMessage.h(false),
2458
- _extractErrorMessage$23 = _slicedToArray(_extractErrorMessage$22, 2),
2459
- visible = _extractErrorMessage$23[0],
2460
- setVisible = _extractErrorMessage$23[1];
2283
+ var PasswordInput = function PasswordInput(_ref51) {
2284
+ var password = _ref51.password,
2285
+ setPassword = _ref51.setPassword,
2286
+ type = _ref51.type;
2287
+ var _extractErrorMessage$24 = extractErrorMessage.h(false),
2288
+ _extractErrorMessage$25 = _slicedToArray(_extractErrorMessage$24, 2),
2289
+ visible = _extractErrorMessage$25[0],
2290
+ setVisible = _extractErrorMessage$25[1];
2461
2291
  return /*#__PURE__*/extractErrorMessage.wn.createElement(InputContainer, {
2462
2292
  gap: 2,
2463
2293
  alignItems: "center"
@@ -2482,9 +2312,9 @@ var PasswordInput = function PasswordInput(_ref46) {
2482
2312
  visible: visible
2483
2313
  }));
2484
2314
  };
2485
- var BackButton = extractErrorMessage.He.button(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n all: unset;\n cursor: pointer;\n"])));
2486
- var BackArrowSvg = function BackArrowSvg(_ref47) {
2487
- var color = _ref47.color;
2315
+ var BackButton = extractErrorMessage.He.button(_templateObject33 || (_templateObject33 = _taggedTemplateLiteral(["\n all: unset;\n cursor: pointer;\n"])));
2316
+ var BackArrowSvg = function BackArrowSvg(_ref52) {
2317
+ var color = _ref52.color;
2488
2318
  return /*#__PURE__*/extractErrorMessage.wn.createElement("svg", {
2489
2319
  width: "24",
2490
2320
  height: "24",
@@ -2496,8 +2326,8 @@ var BackArrowSvg = function BackArrowSvg(_ref47) {
2496
2326
  fill: color
2497
2327
  }));
2498
2328
  };
2499
- var BackArrow = function BackArrow(_ref48) {
2500
- var onClick = _ref48.onClick;
2329
+ var BackArrow = function BackArrow(_ref53) {
2330
+ var onClick = _ref53.onClick;
2501
2331
  var theme = extractErrorMessage.Ze();
2502
2332
  return /*#__PURE__*/extractErrorMessage.wn.createElement(BackButton, {
2503
2333
  type: "button",
@@ -2507,7 +2337,7 @@ var BackArrow = function BackArrow(_ref48) {
2507
2337
  color: theme.colors.primary
2508
2338
  }));
2509
2339
  };
2510
- var GetHelpText = extractErrorMessage.He(Text)(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n font-weight: bold !important;\n cursor: pointer;\n"])));
2340
+ var GetHelpText = extractErrorMessage.He(Text)(_templateObject34 || (_templateObject34 = _taggedTemplateLiteral(["\n font-weight: bold !important;\n cursor: pointer;\n"])));
2511
2341
  var PasswordsAuthenticate = function PasswordsAuthenticate() {
2512
2342
  var _useGlobalReducer13 = useGlobalReducer(),
2513
2343
  _useGlobalReducer14 = _slicedToArray(_useGlobalReducer13, 2),
@@ -2629,10 +2459,10 @@ var PasswordsEmailForm = function PasswordsEmailForm() {
2629
2459
  setIsSubmitting = _usePasswordInput2.setIsSubmitting,
2630
2460
  submitPassword = _usePasswordInput2.submitPassword,
2631
2461
  handleNonMemberReset = _usePasswordInput2.handleNonMemberReset;
2632
- var _extractErrorMessage$24 = extractErrorMessage.h(!email),
2633
- _extractErrorMessage$25 = _slicedToArray(_extractErrorMessage$24, 2),
2634
- hideInput = _extractErrorMessage$25[0],
2635
- setHideInput = _extractErrorMessage$25[1];
2462
+ var _extractErrorMessage$26 = extractErrorMessage.h(!email),
2463
+ _extractErrorMessage$27 = _slicedToArray(_extractErrorMessage$26, 2),
2464
+ hideInput = _extractErrorMessage$27[0],
2465
+ setHideInput = _extractErrorMessage$27[1];
2636
2466
  if (!passwordOptions) return /*#__PURE__*/extractErrorMessage.wn.createElement(extractErrorMessage.wn.Fragment, null);
2637
2467
  if (!organization) return /*#__PURE__*/extractErrorMessage.wn.createElement(extractErrorMessage.wn.Fragment, null);
2638
2468
  var handleSubmit = function handleSubmit(e) {
@@ -2659,8 +2489,8 @@ var PasswordsEmailForm = function PasswordsEmailForm() {
2659
2489
  case 8:
2660
2490
  setErrorMessage('');
2661
2491
  setIsSubmitting(true);
2662
- internal.readB2BInternals(stytch).searchManager.searchMember(email, organization.organization_id).then(function (_ref49) {
2663
- var member = _ref49.member;
2492
+ internal.readB2BInternals(stytch).searchManager.searchMember(email, organization.organization_id).then(function (_ref54) {
2493
+ var member = _ref54.member;
2664
2494
  if (member === null || member === void 0 ? void 0 : member.member_password_id) {
2665
2495
  setHideInput(false);
2666
2496
  setIsSubmitting(false);
@@ -2912,8 +2742,8 @@ var OAuthB2BButton = function OAuthB2BButton(props) {
2912
2742
  }
2913
2743
  }, "Continue with ", props.providerTypeTitle)));
2914
2744
  };
2915
- var OAuthErrorMessage = function OAuthErrorMessage(_ref50) {
2916
- var children = _ref50.children;
2745
+ var OAuthErrorMessage = function OAuthErrorMessage(_ref55) {
2746
+ var children = _ref55.children;
2917
2747
  return /*#__PURE__*/extractErrorMessage.wn.createElement("div", {
2918
2748
  key: "oauth-error-message"
2919
2749
  }, /*#__PURE__*/extractErrorMessage.wn.createElement(Text, {
@@ -2925,9 +2755,9 @@ var OneTapNoConfiguredClientsErrorMessage = function OneTapNoConfiguredClientsEr
2925
2755
  href: "https://stytch.com/dashboard/oauth"
2926
2756
  }, "dashboard."));
2927
2757
  };
2928
- var RedirectUrlsErrorMessage = function RedirectUrlsErrorMessage(_ref51) {
2929
- var niceName = _ref51.niceName,
2930
- variableName = _ref51.variableName;
2758
+ var RedirectUrlsErrorMessage = function RedirectUrlsErrorMessage(_ref56) {
2759
+ var niceName = _ref56.niceName,
2760
+ variableName = _ref56.variableName;
2931
2761
  return /*#__PURE__*/extractErrorMessage.wn.createElement(OAuthErrorMessage, null, "One Tap cannot render because there are no ", niceName, " set for this project so we are unable to verify the", ' ', /*#__PURE__*/extractErrorMessage.wn.createElement("code", null, variableName), "\xA0 provided in the configuration. To set ", niceName, " for this project please visit\xA0", /*#__PURE__*/extractErrorMessage.wn.createElement("a", {
2932
2762
  href: "https://stytch.com/docs/javascript-sdk"
2933
2763
  }, "the Stytch dashboard."), "\xA0 For more information on why this validation is necessary please visit\xA0", /*#__PURE__*/extractErrorMessage.wn.createElement("a", {
@@ -2972,7 +2802,7 @@ var OneTapErrors;
2972
2802
  OneTapErrors["DefaultProviderNotAllowed"] = "default_provider_not_allowed";
2973
2803
  })(OneTapErrors || (OneTapErrors = {}));
2974
2804
  var ErrorMessages = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, OneTapErrors.None, /*#__PURE__*/extractErrorMessage.wn.createElement(extractErrorMessage.wn.Fragment, null)), OneTapErrors.OriginNotAllowedForClient, /*#__PURE__*/extractErrorMessage.wn.createElement(OneTapJSOriginErrorMessage, null)), OneTapErrors.InvalidOAuthClient, /*#__PURE__*/extractErrorMessage.wn.createElement(OneTapInvalidOAuthClient, null)), OneTapErrors.NoConfiguredOAuthClient, /*#__PURE__*/extractErrorMessage.wn.createElement(OneTapNoConfiguredClientsErrorMessage, null)), OneTapErrors.NoConfiguredLoginRedirectUrls, /*#__PURE__*/extractErrorMessage.wn.createElement(OneTapNoConfiguredLoginRedirectUrlsErrorMessage, null)), OneTapErrors.NoConfiguredSignupRedirectUrls, /*#__PURE__*/extractErrorMessage.wn.createElement(OneTapNoConfiguredSignupRedirectUrlsErrorMessage, null)), OneTapErrors.DefaultProviderNotAllowed, /*#__PURE__*/extractErrorMessage.wn.createElement(OneTapNoDefaultProviderAllowedErrorMessage, null));
2975
- extractErrorMessage.He.div(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n height: ", ";\n display: ", ";\n transition: all 0.5s ease-out;\n justify-content: center;\n align-items: center;\n"])), function (props) {
2805
+ extractErrorMessage.He.div(_templateObject35 || (_templateObject35 = _taggedTemplateLiteral(["\n height: ", ";\n display: ", ";\n transition: all 0.5s ease-out;\n justify-content: center;\n align-items: center;\n"])), function (props) {
2976
2806
  return "".concat(props.$height, "px");
2977
2807
  }, function (props) {
2978
2808
  return props.pending ? 'flex' : 'block';
@@ -2982,10 +2812,10 @@ var B2BGoogleOneTap = function B2BGoogleOneTap() {
2982
2812
  var stytch = useStytch();
2983
2813
  var config = useConfig();
2984
2814
  var isOnlyFloatingOneTap = useIsOnlyFloatingOneTap();
2985
- var _extractErrorMessage$26 = extractErrorMessage.h(OneTapErrors.None),
2986
- _extractErrorMessage$27 = _slicedToArray(_extractErrorMessage$26, 2),
2987
- oneTapError = _extractErrorMessage$27[0],
2988
- setOneTapError = _extractErrorMessage$27[1];
2815
+ var _extractErrorMessage$28 = extractErrorMessage.h(OneTapErrors.None),
2816
+ _extractErrorMessage$29 = _slicedToArray(_extractErrorMessage$28, 2),
2817
+ oneTapError = _extractErrorMessage$29[0],
2818
+ setOneTapError = _extractErrorMessage$29[1];
2989
2819
  var isUnmounted = useIsUnmounted();
2990
2820
  var _useGlobalReducer19 = useGlobalReducer(),
2991
2821
  _useGlobalReducer20 = _slicedToArray(_useGlobalReducer19, 2),
@@ -3112,19 +2942,19 @@ var B2BGoogleOneTap = function B2BGoogleOneTap() {
3112
2942
  };
3113
2943
  var productsToAuthMethods = _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, internal.B2BProducts.oauth, undefined), internal.B2BProducts.sso, 'sso'), internal.B2BProducts.emailMagicLinks, 'magic_link'), internal.B2BProducts.passwords, 'password');
3114
2944
  var oauthProvidersToAuthMethods = _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, internal.B2BOAuthProviders.Google, 'google_oauth'), internal.B2BOAuthProviders.Microsoft, 'microsoft_oauth'), internal.B2BOAuthProviders.HubSpot, 'hubspot_oauth'), internal.B2BOAuthProviders.Slack, 'slack_oauth');
3115
- var authMethodsToProducts = Object.entries(productsToAuthMethods).reduce(function (acc, _ref52) {
3116
- var _ref53 = _slicedToArray(_ref52, 2),
3117
- product = _ref53[0],
3118
- method = _ref53[1];
2945
+ var authMethodsToProducts = Object.entries(productsToAuthMethods).reduce(function (acc, _ref57) {
2946
+ var _ref58 = _slicedToArray(_ref57, 2),
2947
+ product = _ref58[0],
2948
+ method = _ref58[1];
3119
2949
  if (method) {
3120
2950
  acc[method] = product;
3121
2951
  }
3122
2952
  return acc;
3123
2953
  }, {});
3124
- var oauthMethodsToOauthProviders = Object.entries(oauthProvidersToAuthMethods).reduce(function (acc, _ref54) {
3125
- var _ref55 = _slicedToArray(_ref54, 2),
3126
- provider = _ref55[0],
3127
- method = _ref55[1];
2954
+ var oauthMethodsToOauthProviders = Object.entries(oauthProvidersToAuthMethods).reduce(function (acc, _ref59) {
2955
+ var _ref60 = _slicedToArray(_ref59, 2),
2956
+ provider = _ref60[0],
2957
+ method = _ref60[1];
3128
2958
  acc[method] = provider;
3129
2959
  return acc;
3130
2960
  }, {});
@@ -3301,12 +3131,12 @@ var OAuthButtons = function OAuthButtons() {
3301
3131
  var _useEffectiveAuthConf = useEffectiveAuthConfig(),
3302
3132
  oauthProviderSettings = _useEffectiveAuthConf.oauthProviderSettings;
3303
3133
  var config = useConfig();
3304
- var _ref56 = (_a = config.oauthOptions) !== null && _a !== void 0 ? _a : {},
3305
- loginRedirectURL = _ref56.loginRedirectURL,
3306
- signupRedirectURL = _ref56.signupRedirectURL,
3307
- discoveryRedirectURL = _ref56.discoveryRedirectURL,
3308
- customScopes = _ref56.customScopes,
3309
- providerParams = _ref56.providerParams;
3134
+ var _ref61 = (_a = config.oauthOptions) !== null && _a !== void 0 ? _a : {},
3135
+ loginRedirectURL = _ref61.loginRedirectURL,
3136
+ signupRedirectURL = _ref61.signupRedirectURL,
3137
+ discoveryRedirectURL = _ref61.discoveryRedirectURL,
3138
+ customScopes = _ref61.customScopes,
3139
+ providerParams = _ref61.providerParams;
3310
3140
  var mappedProviders = oauthProviderSettings.map(function (provider) {
3311
3141
  var oauthProvider = getParamsFromB2BOAuthProviderConfig(provider);
3312
3142
  var _getProviderInfo = getProviderInfo(oauthProvider.type),
@@ -3335,7 +3165,7 @@ var OAuthButtons = function OAuthButtons() {
3335
3165
  className: "oauth-buttons"
3336
3166
  }, mappedProviders);
3337
3167
  };
3338
- var UsePasswordText = extractErrorMessage.He(Text)(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["\n font-weight: bold !important;\n cursor: pointer;\n"])));
3168
+ var UsePasswordText = extractErrorMessage.He(Text)(_templateObject36 || (_templateObject36 = _taggedTemplateLiteral(["\n font-weight: bold !important;\n cursor: pointer;\n"])));
3339
3169
  var PasswordUseButton = function PasswordUseButton() {
3340
3170
  var _useGlobalReducer27 = useGlobalReducer(),
3341
3171
  _useGlobalReducer28 = _slicedToArray(_useGlobalReducer27, 2),
@@ -3398,12 +3228,12 @@ var generateProductComponentsOrdering = function generateProductComponentsOrderi
3398
3228
  }
3399
3229
  return ProductComponents;
3400
3230
  };
3401
- var Container$1 = extractErrorMessage.He(Flex)(_templateObject25 || (_templateObject25 = _taggedTemplateLiteral(["\n > * + * {\n margin-top: 24px;\n }\n"])));
3402
- var LogoImage$1 = extractErrorMessage.He.img(_templateObject26 || (_templateObject26 = _taggedTemplateLiteral(["\n max-height: 50px;\n max-width: 100px;\n"])));
3403
- var Header = extractErrorMessage.He(Text)(_templateObject27 || (_templateObject27 = _taggedTemplateLiteral(["\n text-align: center;\n"])));
3404
- var Logo$1 = function Logo$1(_ref57) {
3405
- var orgLogo = _ref57.orgLogo,
3406
- appLogo = _ref57.appLogo;
3231
+ var Container$1 = extractErrorMessage.He(Flex)(_templateObject37 || (_templateObject37 = _taggedTemplateLiteral(["\n > * + * {\n margin-top: 24px;\n }\n"])));
3232
+ var LogoImage$1 = extractErrorMessage.He.img(_templateObject38 || (_templateObject38 = _taggedTemplateLiteral(["\n max-height: 50px;\n max-width: 100px;\n"])));
3233
+ var Header = extractErrorMessage.He(Text)(_templateObject39 || (_templateObject39 = _taggedTemplateLiteral(["\n text-align: center;\n"])));
3234
+ var Logo$1 = function Logo$1(_ref62) {
3235
+ var orgLogo = _ref62.orgLogo,
3236
+ appLogo = _ref62.appLogo;
3407
3237
  if (orgLogo !== '' && appLogo !== '') return /*#__PURE__*/extractErrorMessage.wn.createElement(extractErrorMessage.wn.Fragment, null);
3408
3238
  return /*#__PURE__*/extractErrorMessage.wn.createElement(Flex, {
3409
3239
  justifyContent: "center",
@@ -3414,8 +3244,8 @@ var Logo$1 = function Logo$1(_ref57) {
3414
3244
  src: appLogo
3415
3245
  }));
3416
3246
  };
3417
- var ProductComponents = function ProductComponents(_ref58) {
3418
- var components = _ref58.components;
3247
+ var ProductComponents = function ProductComponents(_ref63) {
3248
+ var components = _ref63.components;
3419
3249
  var renderedComponents = components.map(function (component) {
3420
3250
  switch (component) {
3421
3251
  case Component.MagicLinkEmailForm:
@@ -3458,9 +3288,9 @@ var ProductComponents = function ProductComponents(_ref58) {
3458
3288
  };
3459
3289
  var MainScreen = function MainScreen() {
3460
3290
  var _a, _b, _c, _d;
3461
- var _extractErrorMessage$28 = extractErrorMessage.Ze(),
3462
- displayHeader = _extractErrorMessage$28.displayHeader,
3463
- logo = _extractErrorMessage$28.logo;
3291
+ var _extractErrorMessage$30 = extractErrorMessage.Ze(),
3292
+ displayHeader = _extractErrorMessage$30.displayHeader,
3293
+ logo = _extractErrorMessage$30.logo;
3464
3294
  var _useGlobalReducer29 = useGlobalReducer(),
3465
3295
  _useGlobalReducer30 = _slicedToArray(_useGlobalReducer29, 1),
3466
3296
  state = _useGlobalReducer30[0];
@@ -3603,13 +3433,13 @@ var inboxLinks$1 = function inboxLinks$1(emailDomain) {
3603
3433
  YAHOO: "https://mail.yahoo.com/d/search/keyword=".concat(emailDomain)
3604
3434
  };
3605
3435
  };
3606
- var Link$1 = extractErrorMessage.He.a(_templateObject28 || (_templateObject28 = _taggedTemplateLiteral(["\n all: unset;\n cursor: pointer;\n\n &:hover {\n text-decoration: underline;\n text-decoration-color: ", ";\n }\n"])), function (props) {
3436
+ var Link$1 = extractErrorMessage.He.a(_templateObject40 || (_templateObject40 = _taggedTemplateLiteral(["\n all: unset;\n cursor: pointer;\n\n &:hover {\n text-decoration: underline;\n text-decoration-color: ", ";\n }\n"])), function (props) {
3607
3437
  return props.theme.colors.primary;
3608
3438
  });
3609
- var EmailProviderLink$1 = function EmailProviderLink$1(_ref59) {
3610
- var label = _ref59.label,
3611
- href = _ref59.href,
3612
- Icon = _ref59.Icon;
3439
+ var EmailProviderLink$1 = function EmailProviderLink$1(_ref64) {
3440
+ var label = _ref64.label,
3441
+ href = _ref64.href,
3442
+ Icon = _ref64.Icon;
3613
3443
  return /*#__PURE__*/extractErrorMessage.wn.createElement(Flex, {
3614
3444
  gap: 4
3615
3445
  }, Icon, /*#__PURE__*/extractErrorMessage.wn.createElement(Link$1, {
@@ -3618,10 +3448,10 @@ var EmailProviderLink$1 = function EmailProviderLink$1(_ref59) {
3618
3448
  rel: "noopener noreferrer"
3619
3449
  }, /*#__PURE__*/extractErrorMessage.wn.createElement(Text, null, "Open in ", label)));
3620
3450
  };
3621
- var EmailConfirmation$1 = function EmailConfirmation$1(_ref60) {
3622
- var emailDomain = _ref60.emailDomain,
3623
- reset = _ref60.reset,
3624
- email = _ref60.email;
3451
+ var EmailConfirmation$1 = function EmailConfirmation$1(_ref65) {
3452
+ var emailDomain = _ref65.emailDomain,
3453
+ reset = _ref65.reset,
3454
+ email = _ref65.email;
3625
3455
  var _inboxLinks$ = inboxLinks$1(emailDomain),
3626
3456
  GMAIL = _inboxLinks$.GMAIL,
3627
3457
  YAHOO = _inboxLinks$.YAHOO,
@@ -3658,17 +3488,17 @@ var useEmailDomain$1 = function useEmailDomain$1() {
3658
3488
  var _a, _b;
3659
3489
  var stytch = useStytch();
3660
3490
  var config = useConfig();
3661
- var _extractErrorMessage$29 = extractErrorMessage.h(function () {
3491
+ var _extractErrorMessage$31 = extractErrorMessage.h(function () {
3662
3492
  var _internal$readB2BInte3 = internal.readB2BInternals(stytch).bootstrap.getSync(),
3663
3493
  emailDomains = _internal$readB2BInte3.emailDomains;
3664
3494
  return emailDomains;
3665
3495
  }),
3666
- _extractErrorMessage$30 = _slicedToArray(_extractErrorMessage$29, 2),
3667
- emailDomains = _extractErrorMessage$30[0],
3668
- setEmailDomains = _extractErrorMessage$30[1];
3496
+ _extractErrorMessage$32 = _slicedToArray(_extractErrorMessage$31, 2),
3497
+ emailDomains = _extractErrorMessage$32[0],
3498
+ setEmailDomains = _extractErrorMessage$32[1];
3669
3499
  extractErrorMessage.p(function () {
3670
- internal.readB2BInternals(stytch).bootstrap.getAsync().then(function (_ref61) {
3671
- var emailDomains = _ref61.emailDomains;
3500
+ internal.readB2BInternals(stytch).bootstrap.getAsync().then(function (_ref66) {
3501
+ var emailDomains = _ref66.emailDomains;
3672
3502
  setEmailDomains(emailDomains);
3673
3503
  });
3674
3504
  }, [stytch]);
@@ -3727,27 +3557,28 @@ var LoadingScreen = function LoadingScreen() {
3727
3557
  var isJoinViaJitType = function isJoinViaJitType(type) {
3728
3558
  return type === 'eligible_to_join_by_email_domain' || type === 'eligible_to_join_by_oauth_tenant';
3729
3559
  };
3730
- var OrganizationsContainer = extractErrorMessage.He(Flex)(_templateObject29 || (_templateObject29 = _taggedTemplateLiteral(["\n border: ", ";\n border-radius: ", ";\n > div + div {\n border-top: ", ";\n }\n"])), function (_ref62) {
3731
- var theme = _ref62.theme;
3560
+ var OrganizationsContainer = extractErrorMessage.He(Flex)(_templateObject41 || (_templateObject41 = _taggedTemplateLiteral(["\n border: ", ";\n border-radius: ", ";\n > div + div {\n border-top: ", ";\n }\n"])), function (_ref67) {
3561
+ var theme = _ref67.theme;
3732
3562
  return theme.container.border;
3733
- }, function (_ref63) {
3734
- var theme = _ref63.theme;
3563
+ }, function (_ref68) {
3564
+ var theme = _ref68.theme;
3735
3565
  return theme.container.borderRadius;
3736
- }, function (_ref64) {
3737
- var theme = _ref64.theme;
3566
+ }, function (_ref69) {
3567
+ var theme = _ref69.theme;
3738
3568
  return theme.container.border;
3739
3569
  });
3740
- var OrganizationsRow = extractErrorMessage.He(Flex)(_templateObject30 || (_templateObject30 = _taggedTemplateLiteral(["\n cursor: pointer;\n"])));
3741
- var LogoImage = extractErrorMessage.He.img(_templateObject31 || (_templateObject31 = _taggedTemplateLiteral(["\n height: 40px;\n width: 40px;\n border-radius: 4px;\n"])));
3742
- var LogoText = extractErrorMessage.He(Flex)(_templateObject32 || (_templateObject32 = _taggedTemplateLiteral(["\n height: 40px;\n width: 40px;\n background-color: ", ";\n color: ", ";\n border-radius: 4px;\n\n font-style: normal;\n font-weight: 400;\n font-size: 18px;\n line-height: 25px;\n"])), function (_ref65) {
3743
- var theme = _ref65.theme;
3570
+ var OrganizationsRow = extractErrorMessage.He(Flex)(_templateObject42 || (_templateObject42 = _taggedTemplateLiteral(["\n cursor: pointer;\n gap: 8px;\n"])));
3571
+ var LogoImage = extractErrorMessage.He.img(_templateObject43 || (_templateObject43 = _taggedTemplateLiteral(["\n height: 40px;\n width: 40px;\n flex-shrink: 0;\n border-radius: 4px;\n"])));
3572
+ var LogoText = extractErrorMessage.He(Flex)(_templateObject44 || (_templateObject44 = _taggedTemplateLiteral(["\n height: 40px;\n width: 40px;\n flex-shrink: 0;\n background-color: ", ";\n color: ", ";\n border-radius: 4px;\n\n font-style: normal;\n font-weight: 400;\n font-size: 18px;\n line-height: 25px;\n"])), function (_ref70) {
3573
+ var theme = _ref70.theme;
3744
3574
  return theme.buttons.primary.backgroundColor;
3745
- }, function (_ref66) {
3746
- var theme = _ref66.theme;
3575
+ }, function (_ref71) {
3576
+ var theme = _ref71.theme;
3747
3577
  return theme.buttons.primary.textColor;
3748
3578
  });
3579
+ var SvgNoShrink = extractErrorMessage.He.svg(_templateObject45 || (_templateObject45 = _taggedTemplateLiteral(["\n flex-shrink: 0;\n"])));
3749
3580
  var RightArrowSVG = function RightArrowSVG() {
3750
- return /*#__PURE__*/extractErrorMessage.y("svg", {
3581
+ return /*#__PURE__*/extractErrorMessage.y(SvgNoShrink, {
3751
3582
  width: "14",
3752
3583
  height: "14",
3753
3584
  viewBox: "0 0 14 14",
@@ -3758,9 +3589,9 @@ var RightArrowSVG = function RightArrowSVG() {
3758
3589
  fill: "#19303D"
3759
3590
  }));
3760
3591
  };
3761
- var Logo = function Logo(_ref67) {
3762
- var name = _ref67.name,
3763
- logo = _ref67.logo;
3592
+ var Logo = function Logo(_ref72) {
3593
+ var name = _ref72.name,
3594
+ logo = _ref72.logo;
3764
3595
  if (logo !== '') {
3765
3596
  return /*#__PURE__*/extractErrorMessage.y(LogoImage, {
3766
3597
  src: logo
@@ -3771,10 +3602,14 @@ var Logo = function Logo(_ref67) {
3771
3602
  justifyContent: "center"
3772
3603
  }, name[0]);
3773
3604
  };
3774
- var ArrowText = function ArrowText(_ref68) {
3775
- var type = _ref68.type;
3776
- if (isJoinViaJitType(type) || type === 'pending_member') return /*#__PURE__*/extractErrorMessage.y(Text, null, "Join");
3777
- if (type === 'invited_member') return /*#__PURE__*/extractErrorMessage.y(Text, null, "Accept Invite");
3605
+ var ArrowText = function ArrowText(_ref73) {
3606
+ var type = _ref73.type;
3607
+ if (isJoinViaJitType(type) || type === 'pending_member') return /*#__PURE__*/extractErrorMessage.y(Text, {
3608
+ align: "right"
3609
+ }, "Join");
3610
+ if (type === 'invited_member') return /*#__PURE__*/extractErrorMessage.y(Text, {
3611
+ align: "right"
3612
+ }, "Accept Invite");
3778
3613
  return /*#__PURE__*/extractErrorMessage.y(extractErrorMessage.g, null);
3779
3614
  };
3780
3615
  var DiscoverNoOrganizations = function DiscoverNoOrganizations() {
@@ -3892,8 +3727,8 @@ var Discovery = function Discovery() {
3892
3727
  connection_id: connectionId
3893
3728
  });
3894
3729
  }, [stytchClient]);
3895
- var _useMutate5 = useMutate("stytch.discovery.intermediateSessions.exchange", function (_, _ref69) {
3896
- var organizationId = _ref69.arg.organizationId;
3730
+ var _useMutate5 = useMutate("stytch.discovery.intermediateSessions.exchange", function (_, _ref74) {
3731
+ var organizationId = _ref74.arg.organizationId;
3897
3732
  return stytchClient.discovery.intermediateSessions.exchange({
3898
3733
  organization_id: organizationId,
3899
3734
  session_duration_minutes: config.sessionOptions.sessionDurationMinutes
@@ -4113,14 +3948,14 @@ var Chevron = function Chevron() {
4113
3948
  }));
4114
3949
  };
4115
3950
  var Chevron$1 = CreateIcon(Chevron);
4116
- var StyledButton = extractErrorMessage.He.button(_templateObject33 || (_templateObject33 = _taggedTemplateLiteral(["\n all: unset;\n color: ", ";\n cursor: pointer;\n padding: 20px 0;\n border-bottom: 1px solid #e5e8eb;\n font-weight: 500;\n display: flex;\n align-items: center;\n justify-content: space-between;\n"])), function (props) {
3951
+ var StyledButton = extractErrorMessage.He.button(_templateObject46 || (_templateObject46 = _taggedTemplateLiteral(["\n all: unset;\n color: ", ";\n cursor: pointer;\n padding: 20px 0;\n border-bottom: 1px solid #e5e8eb;\n font-weight: 500;\n display: flex;\n align-items: center;\n justify-content: space-between;\n"])), function (props) {
4117
3952
  return props.theme.colors.primary;
4118
3953
  });
4119
- var MenuText = extractErrorMessage.He.div(_templateObject34 || (_templateObject34 = _taggedTemplateLiteral(["\n flex: 1 1 auto;\n"])));
4120
- var ChevronContainer = extractErrorMessage.He.span(_templateObject35 || (_templateObject35 = _taggedTemplateLiteral(["\n flex: 0 0 auto;\n"])));
4121
- var MenuButton = function MenuButton(_ref70) {
4122
- var children = _ref70.children,
4123
- onClick = _ref70.onClick;
3954
+ var MenuText = extractErrorMessage.He.div(_templateObject47 || (_templateObject47 = _taggedTemplateLiteral(["\n flex: 1 1 auto;\n"])));
3955
+ var ChevronContainer = extractErrorMessage.He.span(_templateObject48 || (_templateObject48 = _taggedTemplateLiteral(["\n flex: 0 0 auto;\n"])));
3956
+ var MenuButton = function MenuButton(_ref75) {
3957
+ var children = _ref75.children,
3958
+ onClick = _ref75.onClick;
4124
3959
  return /*#__PURE__*/extractErrorMessage.wn.createElement(StyledButton, {
4125
3960
  type: "button",
4126
3961
  onClick: onClick
@@ -4179,9 +4014,9 @@ var MFAEnrollmentSelectionScreen = function MFAEnrollmentSelectionScreen() {
4179
4014
  size: "header"
4180
4015
  }, "Set up Multi-Factor Authentication"), /*#__PURE__*/extractErrorMessage.wn.createElement(Text, null, "Your organization requires an additional form of verification to make your account more secure."), /*#__PURE__*/extractErrorMessage.wn.createElement(Flex, {
4181
4016
  direction: "column"
4182
- }, displayOptions.map(function (_ref71) {
4183
- var option = _ref71.option,
4184
- label = _ref71.label;
4017
+ }, displayOptions.map(function (_ref76) {
4018
+ var option = _ref76.option,
4019
+ label = _ref76.label;
4185
4020
  return /*#__PURE__*/extractErrorMessage.wn.createElement(MenuButton, {
4186
4021
  key: option,
4187
4022
  onClick: function onClick() {
@@ -4203,13 +4038,13 @@ var inboxLinks = function inboxLinks(emailDomain) {
4203
4038
  OUTLOOK: 'https://outlook.office.com/mail/0/inbox'
4204
4039
  };
4205
4040
  };
4206
- var Link = extractErrorMessage.He.a(_templateObject36 || (_templateObject36 = _taggedTemplateLiteral(["\n all: unset;\n cursor: pointer;\n\n &:hover {\n text-decoration: underline;\n text-decoration-color: ", ";\n }\n"])), function (props) {
4041
+ var Link = extractErrorMessage.He.a(_templateObject49 || (_templateObject49 = _taggedTemplateLiteral(["\n all: unset;\n cursor: pointer;\n\n &:hover {\n text-decoration: underline;\n text-decoration-color: ", ";\n }\n"])), function (props) {
4207
4042
  return props.theme.colors.primary;
4208
4043
  });
4209
- var EmailProviderLink = function EmailProviderLink(_ref72) {
4210
- var label = _ref72.label,
4211
- href = _ref72.href,
4212
- Icon = _ref72.Icon;
4044
+ var EmailProviderLink = function EmailProviderLink(_ref77) {
4045
+ var label = _ref77.label,
4046
+ href = _ref77.href,
4047
+ Icon = _ref77.Icon;
4213
4048
  return /*#__PURE__*/extractErrorMessage.wn.createElement(Flex, {
4214
4049
  gap: 4
4215
4050
  }, Icon, /*#__PURE__*/extractErrorMessage.wn.createElement(Link, {
@@ -4218,10 +4053,10 @@ var EmailProviderLink = function EmailProviderLink(_ref72) {
4218
4053
  rel: "noopener noreferrer"
4219
4054
  }, /*#__PURE__*/extractErrorMessage.wn.createElement(Text, null, "Open in ", label)));
4220
4055
  };
4221
- var VerifyEmailConfirmation = function VerifyEmailConfirmation(_ref73) {
4222
- var emailDomain = _ref73.emailDomain,
4223
- reset = _ref73.reset,
4224
- email = _ref73.email;
4056
+ var VerifyEmailConfirmation = function VerifyEmailConfirmation(_ref78) {
4057
+ var emailDomain = _ref78.emailDomain,
4058
+ reset = _ref78.reset,
4059
+ email = _ref78.email;
4225
4060
  var _inboxLinks = inboxLinks(emailDomain),
4226
4061
  GMAIL = _inboxLinks.GMAIL,
4227
4062
  OUTLOOK = _inboxLinks.OUTLOOK;
@@ -4267,17 +4102,17 @@ var useEmailDomain = function useEmailDomain() {
4267
4102
  var _a, _b;
4268
4103
  var stytch = useStytch();
4269
4104
  var config = useConfig();
4270
- var _extractErrorMessage$31 = extractErrorMessage.h(function () {
4105
+ var _extractErrorMessage$33 = extractErrorMessage.h(function () {
4271
4106
  var _internal$readB2BInte4 = internal.readB2BInternals(stytch).bootstrap.getSync(),
4272
4107
  emailDomains = _internal$readB2BInte4.emailDomains;
4273
4108
  return emailDomains;
4274
4109
  }),
4275
- _extractErrorMessage$32 = _slicedToArray(_extractErrorMessage$31, 2),
4276
- emailDomains = _extractErrorMessage$32[0],
4277
- setEmailDomains = _extractErrorMessage$32[1];
4110
+ _extractErrorMessage$34 = _slicedToArray(_extractErrorMessage$33, 2),
4111
+ emailDomains = _extractErrorMessage$34[0],
4112
+ setEmailDomains = _extractErrorMessage$34[1];
4278
4113
  extractErrorMessage.p(function () {
4279
- internal.readB2BInternals(stytch).bootstrap.getAsync().then(function (_ref74) {
4280
- var emailDomains = _ref74.emailDomains;
4114
+ internal.readB2BInternals(stytch).bootstrap.getAsync().then(function (_ref79) {
4115
+ var emailDomains = _ref79.emailDomains;
4281
4116
  setEmailDomains(emailDomains);
4282
4117
  });
4283
4118
  }, [stytch]);
@@ -4311,11 +4146,11 @@ var PasswordResetConfirmation = function PasswordResetConfirmation() {
4311
4146
  email: state.formState.passwordState.email
4312
4147
  });
4313
4148
  };
4314
- var Block = extractErrorMessage.He.div(_templateObject37 || (_templateObject37 = _taggedTemplateLiteral(["\n height: 4px;\n width: 25%;\n background-color: ", ";\n"])), function (props) {
4149
+ var Block = extractErrorMessage.He.div(_templateObject50 || (_templateObject50 = _taggedTemplateLiteral(["\n height: 4px;\n width: 25%;\n background-color: ", ";\n"])), function (props) {
4315
4150
  return props.$bgColor;
4316
4151
  });
4317
- var PasswordStrengthCheck = function PasswordStrengthCheck(_ref75) {
4318
- var score = _ref75.score;
4152
+ var PasswordStrengthCheck = function PasswordStrengthCheck(_ref80) {
4153
+ var score = _ref80.score;
4319
4154
  var blocks = [];
4320
4155
  switch (score) {
4321
4156
  case 0:
@@ -4410,9 +4245,17 @@ var PasswordB2BError = function PasswordB2BError(props) {
4410
4245
  }, "This password may have been used on a different site that experienced a security issue. Please choose another password."))));
4411
4246
  };
4412
4247
  var clearStytchSearchParams = function clearStytchSearchParams() {
4413
- return window.history.replaceState(null, window.document.title, window.location.pathname);
4248
+ var url = removeStytchParams(window.location.toString());
4249
+ window.history.replaceState(null, document.title, url);
4250
+ };
4251
+ var removeStytchParams = function removeStytchParams(value) {
4252
+ var url = new URL(value);
4253
+ var params = url.searchParams;
4254
+ params["delete"]('token');
4255
+ params["delete"]('stytch_token_type');
4256
+ return url;
4414
4257
  };
4415
- var Form = extractErrorMessage.He.form(_templateObject38 || (_templateObject38 = _taggedTemplateLiteral(["\n width: 100%;\n"])));
4258
+ var Form = extractErrorMessage.He.form(_templateObject51 || (_templateObject51 = _taggedTemplateLiteral(["\n width: 100%;\n"])));
4416
4259
  var PasswordResetForm = function PasswordResetForm() {
4417
4260
  var stytchClient = useStytch();
4418
4261
  var config = useConfig();
@@ -4421,67 +4264,67 @@ var PasswordResetForm = function PasswordResetForm() {
4421
4264
  dispatch = _useGlobalReducer44[1];
4422
4265
  var onEvent = useEventCallback();
4423
4266
  var onError = useErrorCallback();
4424
- var _extractErrorMessage$33 = extractErrorMessage.h(''),
4425
- _extractErrorMessage$34 = _slicedToArray(_extractErrorMessage$33, 2),
4426
- resetTokenType = _extractErrorMessage$34[0],
4427
- setResetTokenType = _extractErrorMessage$34[1];
4428
4267
  var _extractErrorMessage$35 = extractErrorMessage.h(''),
4429
4268
  _extractErrorMessage$36 = _slicedToArray(_extractErrorMessage$35, 2),
4430
- resetToken = _extractErrorMessage$36[0],
4431
- setResetToken = _extractErrorMessage$36[1];
4432
- var dataLayer = internal.readB2BInternals(stytchClient).dataLayer;
4433
- var email = dataLayer.getItem('reset-email-value');
4269
+ resetTokenType = _extractErrorMessage$36[0],
4270
+ setResetTokenType = _extractErrorMessage$36[1];
4434
4271
  var _extractErrorMessage$37 = extractErrorMessage.h(''),
4435
4272
  _extractErrorMessage$38 = _slicedToArray(_extractErrorMessage$37, 2),
4436
- password = _extractErrorMessage$38[0],
4437
- setPassword = _extractErrorMessage$38[1];
4273
+ resetToken = _extractErrorMessage$38[0],
4274
+ setResetToken = _extractErrorMessage$38[1];
4275
+ var dataLayer = internal.readB2BInternals(stytchClient).dataLayer;
4276
+ var email = dataLayer.getItem('reset-email-value');
4438
4277
  var _extractErrorMessage$39 = extractErrorMessage.h(''),
4439
4278
  _extractErrorMessage$40 = _slicedToArray(_extractErrorMessage$39, 2),
4440
- errorMessage = _extractErrorMessage$40[0],
4441
- setErrorMessage = _extractErrorMessage$40[1];
4442
- var _extractErrorMessage$41 = extractErrorMessage.h(0),
4279
+ password = _extractErrorMessage$40[0],
4280
+ setPassword = _extractErrorMessage$40[1];
4281
+ var _extractErrorMessage$41 = extractErrorMessage.h(''),
4443
4282
  _extractErrorMessage$42 = _slicedToArray(_extractErrorMessage$41, 2),
4444
- passwordScore = _extractErrorMessage$42[0],
4445
- setPasswordScore = _extractErrorMessage$42[1];
4446
- var _extractErrorMessage$43 = extractErrorMessage.h(''),
4283
+ errorMessage = _extractErrorMessage$42[0],
4284
+ setErrorMessage = _extractErrorMessage$42[1];
4285
+ var _extractErrorMessage$43 = extractErrorMessage.h(0),
4447
4286
  _extractErrorMessage$44 = _slicedToArray(_extractErrorMessage$43, 2),
4448
- passwordFeedback = _extractErrorMessage$44[0],
4449
- setPasswordFeedback = _extractErrorMessage$44[1];
4450
- var _extractErrorMessage$45 = extractErrorMessage.h(true),
4287
+ passwordScore = _extractErrorMessage$44[0],
4288
+ setPasswordScore = _extractErrorMessage$44[1];
4289
+ var _extractErrorMessage$45 = extractErrorMessage.h(''),
4451
4290
  _extractErrorMessage$46 = _slicedToArray(_extractErrorMessage$45, 2),
4452
- invalidPassword = _extractErrorMessage$46[0],
4453
- setInvalidPassword = _extractErrorMessage$46[1];
4454
- var _extractErrorMessage$47 = extractErrorMessage.h(false),
4291
+ passwordFeedback = _extractErrorMessage$46[0],
4292
+ setPasswordFeedback = _extractErrorMessage$46[1];
4293
+ var _extractErrorMessage$47 = extractErrorMessage.h(true),
4455
4294
  _extractErrorMessage$48 = _slicedToArray(_extractErrorMessage$47, 2),
4456
- isSubmitting = _extractErrorMessage$48[0],
4457
- setIsSubmitting = _extractErrorMessage$48[1];
4458
- var _extractErrorMessage$49 = extractErrorMessage.h('none'),
4295
+ invalidPassword = _extractErrorMessage$48[0],
4296
+ setInvalidPassword = _extractErrorMessage$48[1];
4297
+ var _extractErrorMessage$49 = extractErrorMessage.h(false),
4459
4298
  _extractErrorMessage$50 = _slicedToArray(_extractErrorMessage$49, 2),
4460
- strengthPolicy = _extractErrorMessage$50[0],
4461
- setStrengthPolicy = _extractErrorMessage$50[1];
4462
- var _extractErrorMessage$51 = extractErrorMessage.h(0),
4299
+ isSubmitting = _extractErrorMessage$50[0],
4300
+ setIsSubmitting = _extractErrorMessage$50[1];
4301
+ var _extractErrorMessage$51 = extractErrorMessage.h('none'),
4463
4302
  _extractErrorMessage$52 = _slicedToArray(_extractErrorMessage$51, 2),
4464
- missingCharacters = _extractErrorMessage$52[0],
4465
- setMissingCharacters = _extractErrorMessage$52[1];
4303
+ strengthPolicy = _extractErrorMessage$52[0],
4304
+ setStrengthPolicy = _extractErrorMessage$52[1];
4466
4305
  var _extractErrorMessage$53 = extractErrorMessage.h(0),
4467
4306
  _extractErrorMessage$54 = _slicedToArray(_extractErrorMessage$53, 2),
4468
- missingComplexity = _extractErrorMessage$54[0],
4469
- setMissingComplexity = _extractErrorMessage$54[1];
4470
- var _extractErrorMessage$55 = extractErrorMessage.h(false),
4307
+ missingCharacters = _extractErrorMessage$54[0],
4308
+ setMissingCharacters = _extractErrorMessage$54[1];
4309
+ var _extractErrorMessage$55 = extractErrorMessage.h(0),
4471
4310
  _extractErrorMessage$56 = _slicedToArray(_extractErrorMessage$55, 2),
4472
- isPasswordBreached = _extractErrorMessage$56[0],
4473
- setIsPasswordBreached = _extractErrorMessage$56[1];
4311
+ missingComplexity = _extractErrorMessage$56[0],
4312
+ setMissingComplexity = _extractErrorMessage$56[1];
4313
+ var _extractErrorMessage$57 = extractErrorMessage.h(false),
4314
+ _extractErrorMessage$58 = _slicedToArray(_extractErrorMessage$57, 2),
4315
+ isPasswordBreached = _extractErrorMessage$58[0],
4316
+ setIsPasswordBreached = _extractErrorMessage$58[1];
4474
4317
  var updateStrengthCheck = extractErrorMessage.F(function () {
4475
4318
  return internal.debounce(function (password) {
4476
4319
  return stytchClient.passwords.strengthCheck({
4477
4320
  password: password
4478
- }).then(function (_ref76) {
4479
- var score = _ref76.score,
4480
- valid_password = _ref76.valid_password,
4481
- zxcvbn_feedback = _ref76.zxcvbn_feedback,
4482
- luds_feedback = _ref76.luds_feedback,
4483
- strength_policy = _ref76.strength_policy,
4484
- breached_password = _ref76.breached_password;
4321
+ }).then(function (_ref81) {
4322
+ var score = _ref81.score,
4323
+ valid_password = _ref81.valid_password,
4324
+ zxcvbn_feedback = _ref81.zxcvbn_feedback,
4325
+ luds_feedback = _ref81.luds_feedback,
4326
+ strength_policy = _ref81.strength_policy,
4327
+ breached_password = _ref81.breached_password;
4485
4328
  setStrengthPolicy(strength_policy);
4486
4329
  setInvalidPassword(!valid_password);
4487
4330
  if (strength_policy === 'zxcvbn') {
@@ -4649,7 +4492,7 @@ var PasswordSetNew = function PasswordSetNew() {
4649
4492
  reset_password_expiration_minutes: (_c = config.passwordOptions) === null || _c === void 0 ? void 0 : _c.resetPasswordExpirationMinutes,
4650
4493
  reset_password_template_id: (_d = config.passwordOptions) === null || _d === void 0 ? void 0 : _d.resetPasswordTemplateId
4651
4494
  }).then(function (data) {
4652
- toast$1.success('Email resent');
4495
+ _t.success('Email resent');
4653
4496
  setIsSubmitting(false);
4654
4497
  onEvent({
4655
4498
  type: internal.StytchEventType.B2BPasswordResetByEmailStart,
@@ -4716,8 +4559,8 @@ var PasswordsForgotForm = function PasswordsForgotForm() {
4716
4559
  case 4:
4717
4560
  setErrorMessage('');
4718
4561
  setIsSubmitting(true);
4719
- internal.readB2BInternals(stytch).searchManager.searchMember(email, organization.organization_id).then(function (_ref77) {
4720
- var member = _ref77.member;
4562
+ internal.readB2BInternals(stytch).searchManager.searchMember(email, organization.organization_id).then(function (_ref82) {
4563
+ var member = _ref82.member;
4721
4564
  var _a, _b, _c, _d;
4722
4565
  if (!(member === null || member === void 0 ? void 0 : member.member_password_id)) {
4723
4566
  handleNonMemberReset();
@@ -4804,16 +4647,16 @@ var RecoveryCodeEntryScreen = function RecoveryCodeEntryScreen() {
4804
4647
  var _state$mfa$primaryInf = state.mfa.primaryInfo,
4805
4648
  memberId = _state$mfa$primaryInf.memberId,
4806
4649
  organizationId = _state$mfa$primaryInf.organizationId;
4807
- var _extractErrorMessage$57 = extractErrorMessage.h(''),
4808
- _extractErrorMessage$58 = _slicedToArray(_extractErrorMessage$57, 2),
4809
- recoveryCode = _extractErrorMessage$58[0],
4810
- setRecoveryCode = _extractErrorMessage$58[1];
4811
- var _useMutate7 = useMutate('stytch.recoveryCodes.recover', function (_, _ref78) {
4812
- var _ref78$arg = _ref78.arg,
4813
- recoveryCode = _ref78$arg.recoveryCode,
4814
- memberId = _ref78$arg.memberId,
4815
- organizationId = _ref78$arg.organizationId,
4816
- sessionDurationMinutes = _ref78$arg.sessionDurationMinutes;
4650
+ var _extractErrorMessage$59 = extractErrorMessage.h(''),
4651
+ _extractErrorMessage$60 = _slicedToArray(_extractErrorMessage$59, 2),
4652
+ recoveryCode = _extractErrorMessage$60[0],
4653
+ setRecoveryCode = _extractErrorMessage$60[1];
4654
+ var _useMutate7 = useMutate('stytch.recoveryCodes.recover', function (_, _ref83) {
4655
+ var _ref83$arg = _ref83.arg,
4656
+ recoveryCode = _ref83$arg.recoveryCode,
4657
+ memberId = _ref83$arg.memberId,
4658
+ organizationId = _ref83$arg.organizationId,
4659
+ sessionDurationMinutes = _ref83$arg.sessionDurationMinutes;
4817
4660
  return stytchClient.recoveryCodes.recover({
4818
4661
  recovery_code: recoveryCode,
4819
4662
  member_id: memberId,
@@ -4883,8 +4726,8 @@ var RecoveryCodeEntryScreen = function RecoveryCodeEntryScreen() {
4883
4726
  isSubmitting: isSubmitting
4884
4727
  })));
4885
4728
  };
4886
- var InsetContainer = extractErrorMessage.He.div(_templateObject39 || (_templateObject39 = _taggedTemplateLiteral(["\n background-color: #f3f5f6;\n color: #000;\n font-size: 16px;\n line-height: 28px;\n display: flex;\n align-items: flex-start;\n justify-content: center;\n gap: 8px;\n padding: 16px 8px;\n"])));
4887
- var CodeList = extractErrorMessage.He.ul(_templateObject40 || (_templateObject40 = _taggedTemplateLiteral(["\n list-style: none;\n padding: 0;\n margin: 0;\n"])));
4729
+ var InsetContainer = extractErrorMessage.He.div(_templateObject52 || (_templateObject52 = _taggedTemplateLiteral(["\n background-color: #f3f5f6;\n color: #000;\n font-size: 16px;\n line-height: 28px;\n display: flex;\n align-items: flex-start;\n justify-content: center;\n gap: 8px;\n padding: 16px 8px;\n"])));
4730
+ var CodeList = extractErrorMessage.He.ul(_templateObject53 || (_templateObject53 = _taggedTemplateLiteral(["\n list-style: none;\n padding: 0;\n margin: 0;\n"])));
4888
4731
  var downloadFile = function downloadFile(content, filename) {
4889
4732
  var blob = new Blob([content], {
4890
4733
  type: 'text/plain'
@@ -4921,13 +4764,13 @@ var RecoveryCodeSaveScreen = function RecoveryCodeSaveScreen() {
4921
4764
  _context9.next = 3;
4922
4765
  return navigator.clipboard.writeText(recoveryCodes.join('\n'));
4923
4766
  case 3:
4924
- toast$1.success('Copied');
4767
+ _t.success('Copied');
4925
4768
  _context9.next = 9;
4926
4769
  break;
4927
4770
  case 6:
4928
4771
  _context9.prev = 6;
4929
4772
  _context9.t0 = _context9["catch"](0);
4930
- toast$1.error("Couldn't copy codes to clipboard");
4773
+ _t.error("Couldn't copy codes to clipboard");
4931
4774
  case 9:
4932
4775
  case "end":
4933
4776
  return _context9.stop();
@@ -4958,7 +4801,7 @@ var RecoveryCodeSaveScreen = function RecoveryCodeSaveScreen() {
4958
4801
  onClick: handleContinue
4959
4802
  }, "Done"));
4960
4803
  };
4961
- var Select = extractErrorMessage.He.select(_templateObject41 || (_templateObject41 = _taggedTemplateLiteral(["\n background-color: ", ";\n border: 1px solid ", ";\n border-radius: ", ";\n height: 47px;\n box-sizing: border-box;\n padding: 0 8px;\n color: ", ";\n font-family: ", ";\n width: 80px;\n font-size: 18px;\n"])), function (props) {
4804
+ var Select = extractErrorMessage.He.select(_templateObject54 || (_templateObject54 = _taggedTemplateLiteral(["\n background-color: ", ";\n border: 1px solid ", ";\n border-radius: ", ";\n height: 47px;\n box-sizing: border-box;\n padding: 0 8px;\n color: ", ";\n font-family: ", ";\n width: 80px;\n font-size: 18px;\n"])), function (props) {
4962
4805
  return props.theme.inputs.backgroundColor;
4963
4806
  }, function (props) {
4964
4807
  return props.theme.inputs.borderColor;
@@ -4969,9 +4812,9 @@ var Select = extractErrorMessage.He.select(_templateObject41 || (_templateObject
4969
4812
  }, function (props) {
4970
4813
  return props.theme.typography.fontFamily;
4971
4814
  });
4972
- var CountrySelector = function CountrySelector(_ref79) {
4973
- var country = _ref79.country,
4974
- setCountry = _ref79.setCountry;
4815
+ var CountrySelector = function CountrySelector(_ref84) {
4816
+ var country = _ref84.country,
4817
+ setCountry = _ref84.setCountry;
4975
4818
  var countryFormatter = new Intl.DisplayNames(['en'], {
4976
4819
  type: 'region'
4977
4820
  });
@@ -4982,24 +4825,24 @@ var CountrySelector = function CountrySelector(_ref79) {
4982
4825
  onChange: function onChange(e) {
4983
4826
  setCountry(e.target.value);
4984
4827
  }
4985
- }, Object.entries(internal.COUNTRIES_LIST).map(function (_ref80) {
4986
- var _ref81 = _slicedToArray(_ref80, 2),
4987
- countryCode = _ref81[0],
4988
- countryNumber = _ref81[1];
4828
+ }, Object.entries(internal.COUNTRIES_LIST).map(function (_ref85) {
4829
+ var _ref86 = _slicedToArray(_ref85, 2),
4830
+ countryCode = _ref86[0],
4831
+ countryNumber = _ref86[1];
4989
4832
  return /*#__PURE__*/extractErrorMessage.wn.createElement("option", {
4990
4833
  key: countryCode,
4991
4834
  value: countryCode
4992
4835
  }, countryCode !== country ? "+".concat(countryNumber, " ").concat(countryFormatter.of(countryCode)) : "+".concat(countryNumber));
4993
4836
  }));
4994
4837
  };
4995
- var PhoneStyledInput = extractErrorMessage.He(Input)(_templateObject42 || (_templateObject42 = _taggedTemplateLiteral(["\n flex-grow: 1;\n min-width: 100px;\n"])));
4996
- var PhoneInput = function PhoneInput(_ref82) {
4997
- var phone = _ref82.phone,
4998
- setPhone = _ref82.setPhone,
4999
- country = _ref82.country,
5000
- setCountry = _ref82.setCountry,
5001
- parsePhoneNumber = _ref82.parsePhoneNumber,
5002
- hasPasskeys = _ref82.hasPasskeys;
4838
+ var PhoneStyledInput = extractErrorMessage.He(Input)(_templateObject55 || (_templateObject55 = _taggedTemplateLiteral(["\n flex-grow: 1;\n min-width: 100px;\n"])));
4839
+ var PhoneInput = function PhoneInput(_ref87) {
4840
+ var phone = _ref87.phone,
4841
+ setPhone = _ref87.setPhone,
4842
+ country = _ref87.country,
4843
+ setCountry = _ref87.setCountry,
4844
+ parsePhoneNumber = _ref87.parsePhoneNumber,
4845
+ hasPasskeys = _ref87.hasPasskeys;
5003
4846
  return /*#__PURE__*/extractErrorMessage.wn.createElement(Flex, {
5004
4847
  direction: "row",
5005
4848
  wrap: "nowrap",
@@ -5054,8 +4897,8 @@ var InvalidPhoneNumberError = /*#__PURE__*/function (_internal$StytchSDKEr) {
5054
4897
  }
5055
4898
  return _createClass(InvalidPhoneNumberError);
5056
4899
  }(internal.StytchSDKError);
5057
- var findErrorTypeFrom = function findErrorTypeFrom(_ref83) {
5058
- var error = _ref83.error;
4900
+ var findErrorTypeFrom = function findErrorTypeFrom(_ref88) {
4901
+ var error = _ref88.error;
5059
4902
  var errorType = extractErrorType(error);
5060
4903
  return !!errorType && errorType in supportedErrorTypeMap ? errorType : 'default';
5061
4904
  };
@@ -5077,14 +4920,14 @@ var SMSOTPEnrollScreen = function SMSOTPEnrollScreen() {
5077
4920
  var _state$mfa$primaryInf2 = state.mfa.primaryInfo,
5078
4921
  memberId = _state$mfa$primaryInf2.memberId,
5079
4922
  organizationId = _state$mfa$primaryInf2.organizationId;
5080
- var _extractErrorMessage$59 = extractErrorMessage.wn.useState((_a = enrolledNumber === null || enrolledNumber === void 0 ? void 0 : enrolledNumber.countryCode) !== null && _a !== void 0 ? _a : DEFAULT_COUNTRY_CODE),
5081
- _extractErrorMessage$60 = _slicedToArray(_extractErrorMessage$59, 2),
5082
- countryCode = _extractErrorMessage$60[0],
5083
- setCountryCode = _extractErrorMessage$60[1];
5084
- var _extractErrorMessage$61 = extractErrorMessage.wn.useState((_b = enrolledNumber === null || enrolledNumber === void 0 ? void 0 : enrolledNumber.phoneNumber) !== null && _b !== void 0 ? _b : ''),
4923
+ var _extractErrorMessage$61 = extractErrorMessage.wn.useState((_a = enrolledNumber === null || enrolledNumber === void 0 ? void 0 : enrolledNumber.countryCode) !== null && _a !== void 0 ? _a : DEFAULT_COUNTRY_CODE),
5085
4924
  _extractErrorMessage$62 = _slicedToArray(_extractErrorMessage$61, 2),
5086
- phoneNumber = _extractErrorMessage$62[0],
5087
- setPhoneNumber = _extractErrorMessage$62[1];
4925
+ countryCode = _extractErrorMessage$62[0],
4926
+ setCountryCode = _extractErrorMessage$62[1];
4927
+ var _extractErrorMessage$63 = extractErrorMessage.wn.useState((_b = enrolledNumber === null || enrolledNumber === void 0 ? void 0 : enrolledNumber.phoneNumber) !== null && _b !== void 0 ? _b : ''),
4928
+ _extractErrorMessage$64 = _slicedToArray(_extractErrorMessage$63, 2),
4929
+ phoneNumber = _extractErrorMessage$64[0],
4930
+ setPhoneNumber = _extractErrorMessage$64[1];
5088
4931
  var errorType = findErrorTypeFrom({
5089
4932
  error: sendError
5090
4933
  });
@@ -5095,8 +4938,8 @@ var SMSOTPEnrollScreen = function SMSOTPEnrollScreen() {
5095
4938
  regionCode: countryCode
5096
4939
  });
5097
4940
  };
5098
- var _useMutate8 = useMutate('stytch.otps.sms.send', function (_, _ref84) {
5099
- var parsedNumber = _ref84.arg.parsedNumber;
4941
+ var _useMutate8 = useMutate('stytch.otps.sms.send', function (_, _ref89) {
4942
+ var parsedNumber = _ref89.arg.parsedNumber;
5100
4943
  return internal.__awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
5101
4944
  return _regeneratorRuntime().wrap(function _callee11$(_context11) {
5102
4945
  while (1) switch (_context11.prev = _context11.next) {
@@ -5195,9 +5038,9 @@ var SMSOTPEnrollScreen = function SMSOTPEnrollScreen() {
5195
5038
  disabled: !phoneNumber
5196
5039
  })));
5197
5040
  };
5198
- var InlineButton = function InlineButton(_ref85) {
5199
- var onClick = _ref85.onClick,
5200
- children = _ref85.children;
5041
+ var InlineButton = function InlineButton(_ref90) {
5042
+ var onClick = _ref90.onClick,
5043
+ children = _ref90.children;
5201
5044
  return /*#__PURE__*/extractErrorMessage.wn.createElement("button", {
5202
5045
  onClick: onClick,
5203
5046
  style: {
@@ -5209,45 +5052,45 @@ var InlineButton = function InlineButton(_ref85) {
5209
5052
  }
5210
5053
  }, children));
5211
5054
  };
5212
- var Wrapper = extractErrorMessage.He.div(_templateObject43 || (_templateObject43 = _taggedTemplateLiteral(["\n display: grid;\n grid-template-rows: ", ";\n transition: grid-template-rows 0.15s ease-out;\n"])), function (_ref86) {
5213
- var isOpen = _ref86.isOpen;
5055
+ var Wrapper = extractErrorMessage.He.div(_templateObject56 || (_templateObject56 = _taggedTemplateLiteral(["\n display: grid;\n grid-template-rows: ", ";\n transition: grid-template-rows 0.15s ease-out;\n"])), function (_ref91) {
5056
+ var isOpen = _ref91.isOpen;
5214
5057
  return isOpen ? '1fr' : '0fr';
5215
5058
  });
5216
- var Inner = extractErrorMessage.He.div(_templateObject44 || (_templateObject44 = _taggedTemplateLiteral(["\n overflow: hidden;\n"])));
5217
- var AnimatedContainer = function AnimatedContainer(_ref87) {
5218
- var isOpen = _ref87.isOpen,
5219
- children = _ref87.children;
5059
+ var Inner = extractErrorMessage.He.div(_templateObject57 || (_templateObject57 = _taggedTemplateLiteral(["\n overflow: hidden;\n"])));
5060
+ var AnimatedContainer = function AnimatedContainer(_ref92) {
5061
+ var isOpen = _ref92.isOpen,
5062
+ children = _ref92.children;
5220
5063
  return /*#__PURE__*/extractErrorMessage.wn.createElement(Wrapper, {
5221
5064
  isOpen: isOpen
5222
5065
  }, /*#__PURE__*/extractErrorMessage.wn.createElement(Inner, null, children));
5223
5066
  };
5224
- var Container = extractErrorMessage.He.div(_templateObject45 || (_templateObject45 = _taggedTemplateLiteral(["\n height: 4px;\n background-color: ", ";\n border-radius: 3px;\n overflow: hidden;\n"])), function (_ref88) {
5225
- var theme = _ref88.theme;
5067
+ var Container = extractErrorMessage.He.div(_templateObject58 || (_templateObject58 = _taggedTemplateLiteral(["\n height: 4px;\n background-color: ", ";\n border-radius: 3px;\n overflow: hidden;\n"])), function (_ref93) {
5068
+ var theme = _ref93.theme;
5226
5069
  return theme.colors.disabled;
5227
5070
  });
5228
- var loading = extractErrorMessage.Ue(_templateObject46 || (_templateObject46 = _taggedTemplateLiteral(["\n 0% {\n transform: translateX(-100%);\n }\n 100% {\n transform: translateX(-1%);\n }\n"])));
5229
- var Progress = extractErrorMessage.He.div(_templateObject47 || (_templateObject47 = _taggedTemplateLiteral(["\n height: 100%;\n width: 100%;\n background-color: ", ";\n animation: ", " 10s cubic-bezier(0.22, 1, 0.36, 1);\n"])), function (_ref89) {
5230
- var theme = _ref89.theme;
5071
+ var loading = extractErrorMessage.Ue(_templateObject59 || (_templateObject59 = _taggedTemplateLiteral(["\n 0% {\n transform: translateX(-100%);\n }\n 100% {\n transform: translateX(-1%);\n }\n"])));
5072
+ var Progress = extractErrorMessage.He.div(_templateObject60 || (_templateObject60 = _taggedTemplateLiteral(["\n height: 100%;\n width: 100%;\n background-color: ", ";\n animation: ", " 10s cubic-bezier(0.22, 1, 0.36, 1);\n"])), function (_ref94) {
5073
+ var theme = _ref94.theme;
5231
5074
  return theme.colors.primary;
5232
5075
  }, loading);
5233
- var LoadingBar = function LoadingBar(_ref90) {
5234
- var isLoading = _ref90.isLoading;
5076
+ var LoadingBar = function LoadingBar(_ref95) {
5077
+ var isLoading = _ref95.isLoading;
5235
5078
  return /*#__PURE__*/extractErrorMessage.wn.createElement(Container, null, isLoading && /*#__PURE__*/extractErrorMessage.wn.createElement(Progress, null));
5236
5079
  };
5237
5080
  var GAP = '8px';
5238
5081
  var WIDTH = '46px';
5239
5082
  var INPUT_HEIGHT = '46px';
5240
- var Digit = extractErrorMessage.He.div(_templateObject48 || (_templateObject48 = _taggedTemplateLiteral(["\n border: 1px solid ", ";\n border-radius: 4px;\n align-items: center;\n display: flex;\n font-size: 18px;\n justify-content: center;\n height: ", ";\n width: ", ";\n background: ", ";\n color: ", ";\n"])), function (_ref91) {
5241
- var disabled = _ref91.disabled,
5242
- theme = _ref91.theme;
5083
+ var Digit = extractErrorMessage.He.div(_templateObject61 || (_templateObject61 = _taggedTemplateLiteral(["\n border: 1px solid ", ";\n border-radius: 4px;\n align-items: center;\n display: flex;\n font-size: 18px;\n justify-content: center;\n height: ", ";\n width: ", ";\n background: ", ";\n color: ", ";\n"])), function (_ref96) {
5084
+ var disabled = _ref96.disabled,
5085
+ theme = _ref96.theme;
5243
5086
  return disabled ? theme.colors.disabled : '#ADBCC5';
5244
- }, INPUT_HEIGHT, WIDTH, function (_ref92) {
5245
- var disabled = _ref92.disabled,
5246
- theme = _ref92.theme;
5087
+ }, INPUT_HEIGHT, WIDTH, function (_ref97) {
5088
+ var disabled = _ref97.disabled,
5089
+ theme = _ref97.theme;
5247
5090
  return disabled ? theme.colors.disabled : theme.inputs.backgroundColor;
5248
- }, function (_ref93) {
5249
- var disabled = _ref93.disabled,
5250
- theme = _ref93.theme;
5091
+ }, function (_ref98) {
5092
+ var disabled = _ref98.disabled,
5093
+ theme = _ref98.theme;
5251
5094
  return disabled ? theme.colors.disabledText : theme.inputs.textColor;
5252
5095
  });
5253
5096
  var digitsContainerStyles = {
@@ -5277,20 +5120,20 @@ var invisibleInputStyles = {
5277
5120
  paddingLeft: "calc(0.5 * ".concat(WIDTH, ")"),
5278
5121
  zIndex: 10
5279
5122
  };
5280
- var DigitAtIndex = function DigitAtIndex(_ref94) {
5281
- var index = _ref94.index,
5282
- disabled = _ref94.disabled,
5283
- otp = _ref94.otp;
5123
+ var DigitAtIndex = function DigitAtIndex(_ref99) {
5124
+ var index = _ref99.index,
5125
+ disabled = _ref99.disabled,
5126
+ otp = _ref99.otp;
5284
5127
  var fill = otp ? otp[index] : '';
5285
5128
  return /*#__PURE__*/extractErrorMessage.wn.createElement(Digit, {
5286
5129
  disabled: disabled,
5287
5130
  "data-testid": "otp-".concat(index)
5288
5131
  }, fill);
5289
5132
  };
5290
- var OTPInput = function OTPInput(_ref95) {
5291
- var otp = _ref95.otp,
5292
- setOtp = _ref95.setOtp,
5293
- disabled = _ref95.disabled;
5133
+ var OTPInput = function OTPInput(_ref100) {
5134
+ var otp = _ref100.otp,
5135
+ setOtp = _ref100.setOtp,
5136
+ disabled = _ref100.disabled;
5294
5137
  var onPasscodeChange = function onPasscodeChange(e) {
5295
5138
  if (!/^\d*$/.test(e.target.value)) {
5296
5139
  return;
@@ -5322,14 +5165,14 @@ var OTPInput = function OTPInput(_ref95) {
5322
5165
  })));
5323
5166
  };
5324
5167
  var OTP_CODE_LENGTH = 6;
5325
- var OTPControl = function OTPControl(_ref96) {
5326
- var isSubmitting = _ref96.isSubmitting,
5327
- onSubmit = _ref96.onSubmit,
5328
- errorMessage = _ref96.errorMessage;
5329
- var _extractErrorMessage$63 = extractErrorMessage.h(''),
5330
- _extractErrorMessage$64 = _slicedToArray(_extractErrorMessage$63, 2),
5331
- otp = _extractErrorMessage$64[0],
5332
- setOtp = _extractErrorMessage$64[1];
5168
+ var OTPControl = function OTPControl(_ref101) {
5169
+ var isSubmitting = _ref101.isSubmitting,
5170
+ onSubmit = _ref101.onSubmit,
5171
+ errorMessage = _ref101.errorMessage;
5172
+ var _extractErrorMessage$65 = extractErrorMessage.h(''),
5173
+ _extractErrorMessage$66 = _slicedToArray(_extractErrorMessage$65, 2),
5174
+ otp = _extractErrorMessage$66[0],
5175
+ setOtp = _extractErrorMessage$66[1];
5333
5176
  var handleOtpChange = function handleOtpChange(otp) {
5334
5177
  setOtp(otp);
5335
5178
  if (otp.length === OTP_CODE_LENGTH) {
@@ -5358,13 +5201,13 @@ var OTPControl = function OTPControl(_ref96) {
5358
5201
  errorMessage: errorMessage !== null && errorMessage !== void 0 ? errorMessage : ''
5359
5202
  }));
5360
5203
  };
5361
- var OTPEntry = function OTPEntry(_ref97) {
5362
- var header = _ref97.header,
5363
- helperContent = _ref97.helperContent,
5364
- instruction = _ref97.instruction,
5365
- isSubmitting = _ref97.isSubmitting,
5366
- onSubmit = _ref97.onSubmit,
5367
- errorMessage = _ref97.errorMessage;
5204
+ var OTPEntry = function OTPEntry(_ref102) {
5205
+ var header = _ref102.header,
5206
+ helperContent = _ref102.helperContent,
5207
+ instruction = _ref102.instruction,
5208
+ isSubmitting = _ref102.isSubmitting,
5209
+ onSubmit = _ref102.onSubmit,
5210
+ errorMessage = _ref102.errorMessage;
5368
5211
  return /*#__PURE__*/extractErrorMessage.wn.createElement(Flex, {
5369
5212
  direction: "column",
5370
5213
  gap: 24
@@ -5383,15 +5226,15 @@ var getSecondsRemaining = function getSecondsRemaining(expiration) {
5383
5226
  var now = new Date();
5384
5227
  return Math.ceil((expiration.getTime() - now.getTime()) / 1000);
5385
5228
  };
5386
- var ExpirationMessage = function ExpirationMessage(_ref98) {
5387
- var expiration = _ref98.expiration,
5388
- resendOTP = _ref98.resendOTP;
5389
- var _extractErrorMessage$65 = extractErrorMessage.h(function () {
5229
+ var ExpirationMessage = function ExpirationMessage(_ref103) {
5230
+ var expiration = _ref103.expiration,
5231
+ resendOTP = _ref103.resendOTP;
5232
+ var _extractErrorMessage$67 = extractErrorMessage.h(function () {
5390
5233
  return getSecondsRemaining(expiration);
5391
5234
  }),
5392
- _extractErrorMessage$66 = _slicedToArray(_extractErrorMessage$65, 2),
5393
- seconds = _extractErrorMessage$66[0],
5394
- setSeconds = _extractErrorMessage$66[1];
5235
+ _extractErrorMessage$68 = _slicedToArray(_extractErrorMessage$67, 2),
5236
+ seconds = _extractErrorMessage$68[0],
5237
+ setSeconds = _extractErrorMessage$68[1];
5395
5238
  var codeExpired = seconds <= 0;
5396
5239
  extractErrorMessage.p(function () {
5397
5240
  if (!codeExpired) {
@@ -5413,13 +5256,13 @@ var ExpirationMessage = function ExpirationMessage(_ref98) {
5413
5256
  onClick: resendOTP
5414
5257
  }, "Resend code"));
5415
5258
  };
5416
- var SentOTPEntry = function SentOTPEntry(_ref99) {
5417
- var expiration = _ref99.expiration,
5418
- formattedDestination = _ref99.formattedDestination,
5419
- isSubmitting = _ref99.isSubmitting,
5420
- onSubmit = _ref99.onSubmit,
5421
- errorMessage = _ref99.errorMessage,
5422
- resendOTP = _ref99.resendOTP;
5259
+ var SentOTPEntry = function SentOTPEntry(_ref104) {
5260
+ var expiration = _ref104.expiration,
5261
+ formattedDestination = _ref104.formattedDestination,
5262
+ isSubmitting = _ref104.isSubmitting,
5263
+ onSubmit = _ref104.onSubmit,
5264
+ errorMessage = _ref104.errorMessage,
5265
+ resendOTP = _ref104.resendOTP;
5423
5266
  return /*#__PURE__*/extractErrorMessage.wn.createElement(OTPEntry, {
5424
5267
  header: "Enter passcode",
5425
5268
  helperContent: /*#__PURE__*/extractErrorMessage.wn.createElement(ExpirationMessage, {
@@ -5452,10 +5295,10 @@ var SMSOTPEntryScreen = function SMSOTPEntryScreen() {
5452
5295
  memberPhoneNumber = _state$mfa$primaryInf3.memberPhoneNumber,
5453
5296
  organizationId = _state$mfa$primaryInf3.organizationId,
5454
5297
  organizationMfaOptionsSupported = _state$mfa$primaryInf3.organizationMfaOptionsSupported;
5455
- var _useMutate9 = useMutate('stytch.otps.sms.send', function (_, _ref100) {
5456
- var _ref100$arg = _ref100.arg,
5457
- memberId = _ref100$arg.memberId,
5458
- organizationId = _ref100$arg.organizationId;
5298
+ var _useMutate9 = useMutate('stytch.otps.sms.send', function (_, _ref105) {
5299
+ var _ref105$arg = _ref105.arg,
5300
+ memberId = _ref105$arg.memberId,
5301
+ organizationId = _ref105$arg.organizationId;
5459
5302
  dispatch({
5460
5303
  type: 'sms_otp/send'
5461
5304
  });
@@ -5473,7 +5316,7 @@ var SMSOTPEntryScreen = function SMSOTPEntryScreen() {
5473
5316
  onError: function onError(error) {
5474
5317
  var message = extractErrorMessage.extractErrorMessage(error);
5475
5318
  if (message) {
5476
- toast$1.error(message);
5319
+ _t.error(message);
5477
5320
  }
5478
5321
  dispatch({
5479
5322
  type: 'sms_otp/send_error',
@@ -5484,12 +5327,12 @@ var SMSOTPEntryScreen = function SMSOTPEntryScreen() {
5484
5327
  sendSms = _useMutate9.trigger,
5485
5328
  isSending = _useMutate9.isMutating,
5486
5329
  sendError = _useMutate9.error;
5487
- var _useMutate10 = useMutate('stytch.otps.sms.authenticate', function (_, _ref101) {
5488
- var _ref101$arg = _ref101.arg,
5489
- otp = _ref101$arg.otp,
5490
- memberId = _ref101$arg.memberId,
5491
- organizationId = _ref101$arg.organizationId,
5492
- sessionDurationMinutes = _ref101$arg.sessionDurationMinutes;
5330
+ var _useMutate10 = useMutate('stytch.otps.sms.authenticate', function (_, _ref106) {
5331
+ var _ref106$arg = _ref106.arg,
5332
+ otp = _ref106$arg.otp,
5333
+ memberId = _ref106$arg.memberId,
5334
+ organizationId = _ref106$arg.organizationId,
5335
+ sessionDurationMinutes = _ref106$arg.sessionDurationMinutes;
5493
5336
  return stytchClient.otps.sms.authenticate({
5494
5337
  code: otp,
5495
5338
  member_id: memberId,
@@ -5613,10 +5456,10 @@ var CopyIcon = function CopyIcon() {
5613
5456
  }));
5614
5457
  };
5615
5458
  var Copy = CreateIcon(CopyIcon);
5616
- var CopyButton = extractErrorMessage.He.button(_templateObject49 || (_templateObject49 = _taggedTemplateLiteral(["\n all: unset;\n flex: 0 0 24px;\n height: 28px;\n opacity: 0;\n :focus {\n opacity: 1;\n }\n"])));
5617
- var CodeContainer = extractErrorMessage.He(InsetContainer)(_templateObject50 || (_templateObject50 = _taggedTemplateLiteral(["\n cursor: pointer;\n :hover ", " {\n opacity: 1;\n }\n"])), CopyButton);
5618
- var Spacer = extractErrorMessage.He.div(_templateObject51 || (_templateObject51 = _taggedTemplateLiteral(["\n flex: 0 1 24px;\n"])));
5619
- var Code = extractErrorMessage.He.code(_templateObject52 || (_templateObject52 = _taggedTemplateLiteral(["\n white-space: pre-wrap;\n align-self: center;\n text-align: center;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-wrap: wrap;\n gap: 1ch;\n"])));
5459
+ var CopyButton = extractErrorMessage.He.button(_templateObject62 || (_templateObject62 = _taggedTemplateLiteral(["\n all: unset;\n flex: 0 0 24px;\n height: 28px;\n opacity: 0;\n :focus {\n opacity: 1;\n }\n"])));
5460
+ var CodeContainer = extractErrorMessage.He(InsetContainer)(_templateObject63 || (_templateObject63 = _taggedTemplateLiteral(["\n cursor: pointer;\n :hover ", " {\n opacity: 1;\n }\n"])), CopyButton);
5461
+ var Spacer = extractErrorMessage.He.div(_templateObject64 || (_templateObject64 = _taggedTemplateLiteral(["\n flex: 0 1 24px;\n"])));
5462
+ var Code = extractErrorMessage.He.code(_templateObject65 || (_templateObject65 = _taggedTemplateLiteral(["\n white-space: pre-wrap;\n align-self: center;\n text-align: center;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-wrap: wrap;\n gap: 1ch;\n"])));
5620
5463
  var TOTPEnrollManualScreen = function TOTPEnrollManualScreen() {
5621
5464
  var _useGlobalReducer57 = useGlobalReducer(),
5622
5465
  _useGlobalReducer58 = _slicedToArray(_useGlobalReducer57, 2),
@@ -5646,13 +5489,13 @@ var TOTPEnrollManualScreen = function TOTPEnrollManualScreen() {
5646
5489
  _context14.next = 4;
5647
5490
  return navigator.clipboard.writeText(displaySecret);
5648
5491
  case 4:
5649
- toast$1.success('Code copied');
5492
+ _t.success('Code copied');
5650
5493
  _context14.next = 10;
5651
5494
  break;
5652
5495
  case 7:
5653
5496
  _context14.prev = 7;
5654
5497
  _context14.t0 = _context14["catch"](1);
5655
- toast$1.error("Couldn't copy code to clipboard");
5498
+ _t.error("Couldn't copy code to clipboard");
5656
5499
  case 10:
5657
5500
  case "end":
5658
5501
  return _context14.stop();
@@ -5686,7 +5529,7 @@ var TOTPEnrollManualScreen = function TOTPEnrollManualScreen() {
5686
5529
  onClick: handleShowQRCode
5687
5530
  }, "Try to scan the QR code again"));
5688
5531
  };
5689
- var QRCodeImg = extractErrorMessage.He.img(_templateObject53 || (_templateObject53 = _taggedTemplateLiteral(["\n margin: 0 auto;\n"])));
5532
+ var QRCodeImg = extractErrorMessage.He.img(_templateObject66 || (_templateObject66 = _taggedTemplateLiteral(["\n margin: 0 auto;\n"])));
5690
5533
  var TOTPEnrollQRScreen = function TOTPEnrollQRScreen() {
5691
5534
  var stytchClient = useStytch();
5692
5535
  var _useGlobalReducer59 = useGlobalReducer(),
@@ -5700,10 +5543,10 @@ var TOTPEnrollQRScreen = function TOTPEnrollQRScreen() {
5700
5543
  var _state$mfa$primaryInf4 = state.mfa.primaryInfo,
5701
5544
  memberId = _state$mfa$primaryInf4.memberId,
5702
5545
  organizationId = _state$mfa$primaryInf4.organizationId;
5703
- var _useMutate11 = useMutate('stytch.totp.create', function (_, _ref102) {
5704
- var _ref102$arg = _ref102.arg,
5705
- memberId = _ref102$arg.memberId,
5706
- organizationId = _ref102$arg.organizationId;
5546
+ var _useMutate11 = useMutate('stytch.totp.create', function (_, _ref107) {
5547
+ var _ref107$arg = _ref107.arg,
5548
+ memberId = _ref107$arg.memberId,
5549
+ organizationId = _ref107$arg.organizationId;
5707
5550
  dispatch({
5708
5551
  type: 'totp/create'
5709
5552
  });
@@ -5723,7 +5566,7 @@ var TOTPEnrollQRScreen = function TOTPEnrollQRScreen() {
5723
5566
  onError: function onError(error) {
5724
5567
  var message = extractErrorMessage.extractErrorMessage(error);
5725
5568
  if (message) {
5726
- toast$1.error(message);
5569
+ _t.error(message);
5727
5570
  }
5728
5571
  dispatch({
5729
5572
  type: 'totp/create_error',
@@ -5769,11 +5612,11 @@ var TOTPEnrollQRScreen = function TOTPEnrollQRScreen() {
5769
5612
  onClick: handleContinue
5770
5613
  }, "Continue"))) : ( /*#__PURE__*/extractErrorMessage.wn.createElement(LoadingScreen, null)));
5771
5614
  };
5772
- var TOTPEntry = function TOTPEntry(_ref103) {
5773
- var helperContent = _ref103.helperContent,
5774
- isSubmitting = _ref103.isSubmitting,
5775
- onSubmit = _ref103.onSubmit,
5776
- errorMessage = _ref103.errorMessage;
5615
+ var TOTPEntry = function TOTPEntry(_ref108) {
5616
+ var helperContent = _ref108.helperContent,
5617
+ isSubmitting = _ref108.isSubmitting,
5618
+ onSubmit = _ref108.onSubmit,
5619
+ errorMessage = _ref108.errorMessage;
5777
5620
  return /*#__PURE__*/extractErrorMessage.wn.createElement(OTPEntry, {
5778
5621
  header: "Enter verification code",
5779
5622
  instruction: "Enter the 6-digit code from your authenticator app.",
@@ -5797,12 +5640,12 @@ var TOTPEntryScreen = function TOTPEntryScreen() {
5797
5640
  memberId = _state$mfa$primaryInf5.memberId,
5798
5641
  organizationId = _state$mfa$primaryInf5.organizationId,
5799
5642
  organizationMfaOptionsSupported = _state$mfa$primaryInf5.organizationMfaOptionsSupported;
5800
- var _useMutate12 = useMutate('stytch.totp.authenticate', function (_, _ref104) {
5801
- var _ref104$arg = _ref104.arg,
5802
- memberId = _ref104$arg.memberId,
5803
- organizationId = _ref104$arg.organizationId,
5804
- otp = _ref104$arg.otp,
5805
- sessionDurationMinutes = _ref104$arg.sessionDurationMinutes;
5643
+ var _useMutate12 = useMutate('stytch.totp.authenticate', function (_, _ref109) {
5644
+ var _ref109$arg = _ref109.arg,
5645
+ memberId = _ref109$arg.memberId,
5646
+ organizationId = _ref109$arg.organizationId,
5647
+ otp = _ref109$arg.otp,
5648
+ sessionDurationMinutes = _ref109$arg.sessionDurationMinutes;
5806
5649
  return stytchClient.totp.authenticate({
5807
5650
  code: otp,
5808
5651
  member_id: memberId,
@@ -5875,53 +5718,53 @@ var TOTPEntryScreen = function TOTPEntryScreen() {
5875
5718
  onClick: handleSwitchToSms
5876
5719
  }, "Text me a code instead"))));
5877
5720
  };
5878
- var MainContainer = extractErrorMessage.He.div(_templateObject54 || (_templateObject54 = _taggedTemplateLiteral(["\n width: ", ";\n font-family: ", ";\n box-sizing: border-box;\n * {\n box-sizing: content-box;\n }\n background-color: ", ";\n border: ", ";\n border-radius: ", ";\n border-bottom-left-radius: ", ";\n border-bottom-right-radius: ", ";\n border-bottom: ", ";\n"])), function (_ref105) {
5879
- var theme = _ref105.theme;
5721
+ var MainContainer = extractErrorMessage.He.div(_templateObject67 || (_templateObject67 = _taggedTemplateLiteral(["\n width: ", ";\n font-family: ", ";\n box-sizing: border-box;\n * {\n box-sizing: content-box;\n }\n background-color: ", ";\n border: ", ";\n border-radius: ", ";\n border-bottom-left-radius: ", ";\n border-bottom-right-radius: ", ";\n border-bottom: ", ";\n"])), function (_ref110) {
5722
+ var theme = _ref110.theme;
5880
5723
  return theme.container.width;
5881
- }, function (_ref106) {
5882
- var theme = _ref106.theme;
5724
+ }, function (_ref111) {
5725
+ var theme = _ref111.theme;
5883
5726
  return theme.typography.fontFamily;
5884
- }, function (_ref107) {
5885
- var theme = _ref107.theme;
5727
+ }, function (_ref112) {
5728
+ var theme = _ref112.theme;
5886
5729
  return theme.container.backgroundColor;
5887
- }, function (_ref108) {
5888
- var theme = _ref108.theme;
5730
+ }, function (_ref113) {
5731
+ var theme = _ref113.theme;
5889
5732
  return theme.container.border;
5890
- }, function (_ref109) {
5891
- var theme = _ref109.theme;
5733
+ }, function (_ref114) {
5734
+ var theme = _ref114.theme;
5892
5735
  return theme.container.borderRadius;
5893
- }, function (_ref110) {
5894
- var theme = _ref110.theme,
5895
- displayWatermark = _ref110.displayWatermark;
5736
+ }, function (_ref115) {
5737
+ var theme = _ref115.theme,
5738
+ displayWatermark = _ref115.displayWatermark;
5896
5739
  return displayWatermark ? '0' : theme.container.borderRadius;
5897
- }, function (_ref111) {
5898
- var theme = _ref111.theme,
5899
- displayWatermark = _ref111.displayWatermark;
5740
+ }, function (_ref116) {
5741
+ var theme = _ref116.theme,
5742
+ displayWatermark = _ref116.displayWatermark;
5900
5743
  return displayWatermark ? '0' : theme.container.borderRadius;
5901
- }, function (_ref112) {
5902
- var theme = _ref112.theme,
5903
- displayWatermark = _ref112.displayWatermark;
5744
+ }, function (_ref117) {
5745
+ var theme = _ref117.theme,
5746
+ displayWatermark = _ref117.displayWatermark;
5904
5747
  return displayWatermark ? 'none' : theme.container.border;
5905
5748
  });
5906
- var ChildrenContainer = extractErrorMessage.He.div(_templateObject55 || (_templateObject55 = _taggedTemplateLiteral(["\n padding: 24px 32px;\n"])));
5907
- var WatermarkContainer = extractErrorMessage.He.div(_templateObject56 || (_templateObject56 = _taggedTemplateLiteral(["\n box-sizing: border-box;\n width: ", ";\n background-color: ", ";\n border: ", ";\n border-top: none;\n border-bottom-left-radius: ", ";\n border-bottom-right-radius: ", ";\n overflow: hidden;\n"])), function (_ref113) {
5908
- var theme = _ref113.theme;
5749
+ var ChildrenContainer = extractErrorMessage.He.div(_templateObject68 || (_templateObject68 = _taggedTemplateLiteral(["\n padding: 24px 32px;\n"])));
5750
+ var WatermarkContainer = extractErrorMessage.He.div(_templateObject69 || (_templateObject69 = _taggedTemplateLiteral(["\n box-sizing: border-box;\n width: ", ";\n background-color: ", ";\n border: ", ";\n border-top: none;\n border-bottom-left-radius: ", ";\n border-bottom-right-radius: ", ";\n overflow: hidden;\n"])), function (_ref118) {
5751
+ var theme = _ref118.theme;
5909
5752
  return theme.container.width;
5910
- }, function (_ref114) {
5911
- var theme = _ref114.theme;
5753
+ }, function (_ref119) {
5754
+ var theme = _ref119.theme;
5912
5755
  return theme.container.backgroundColor;
5913
- }, function (_ref115) {
5914
- var theme = _ref115.theme;
5756
+ }, function (_ref120) {
5757
+ var theme = _ref120.theme;
5915
5758
  return theme.container.border;
5916
- }, function (_ref116) {
5917
- var theme = _ref116.theme;
5759
+ }, function (_ref121) {
5760
+ var theme = _ref121.theme;
5918
5761
  return theme.container.borderRadius;
5919
- }, function (_ref117) {
5920
- var theme = _ref117.theme;
5762
+ }, function (_ref122) {
5763
+ var theme = _ref122.theme;
5921
5764
  return theme.container.borderRadius;
5922
5765
  });
5923
- var InnerContainer = extractErrorMessage.He.div(_templateObject57 || (_templateObject57 = _taggedTemplateLiteral(["\n background-color: #19303d;\n display: flex;\n justify-content: center;\n align-items: center;\n opacity: 0.5;\n"])));
5924
- var Image = extractErrorMessage.He.img(_templateObject58 || (_templateObject58 = _taggedTemplateLiteral(["\n width: 150px;\n"])));
5766
+ var InnerContainer = extractErrorMessage.He.div(_templateObject70 || (_templateObject70 = _taggedTemplateLiteral(["\n background-color: #19303d;\n display: flex;\n justify-content: center;\n align-items: center;\n opacity: 0.5;\n"])));
5767
+ var Image = extractErrorMessage.He.img(_templateObject71 || (_templateObject71 = _taggedTemplateLiteral(["\n width: 150px;\n"])));
5925
5768
  var POWERED_BY_STYTCH_IMG_URL = 'https://public-assets.stytch.com/et_powered_by_stytch_logo.png';
5926
5769
  var getTokenFromUrl = function getTokenFromUrl() {
5927
5770
  var url = new URL(window.location.href);
@@ -5945,8 +5788,8 @@ var AppContainer$1 = function AppContainer$1() {
5945
5788
  dispatch = _useGlobalReducer64[1];
5946
5789
  var stytchClient = useStytch();
5947
5790
  var config = useConfig();
5948
- var _extractErrorMessage$67 = extractErrorMessage.Ze(),
5949
- displayWatermark = _extractErrorMessage$67.displayWatermark;
5791
+ var _extractErrorMessage$69 = extractErrorMessage.Ze(),
5792
+ displayWatermark = _extractErrorMessage$69.displayWatermark;
5950
5793
  var isOnlyFloatingOneTap = useIsOnlyFloatingOneTap();
5951
5794
  var currentScreen = state.screen;
5952
5795
  var ScreenComponentMap = (_ScreenComponentMap = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ScreenComponentMap, AppScreens$1.Main, /*#__PURE__*/extractErrorMessage.wn.createElement(MainScreen, null)), AppScreens$1.EmailConfirmation, /*#__PURE__*/extractErrorMessage.wn.createElement(EmailConfirmation, null)), AppScreens$1.LoggedIn, /*#__PURE__*/extractErrorMessage.wn.createElement(ConfirmationScreen, null)), AppScreens$1.Discovery, /*#__PURE__*/extractErrorMessage.wn.createElement(Discovery, null)), AppScreens$1.Error, /*#__PURE__*/extractErrorMessage.wn.createElement(ErrorScreen, null)), AppScreens$1.PasswordEmailForm, /*#__PURE__*/extractErrorMessage.wn.createElement(PasswordsEmailForm, null)), AppScreens$1.PasswordAuthenticate, /*#__PURE__*/extractErrorMessage.wn.createElement(PasswordsAuthenticate, null)), AppScreens$1.PasswordResetForm, /*#__PURE__*/extractErrorMessage.wn.createElement(PasswordResetForm, null)), AppScreens$1.PasswordResetVerifyConfirmation, /*#__PURE__*/extractErrorMessage.wn.createElement(PasswordResetConfirmation, null)), AppScreens$1.PasswordForgotForm, /*#__PURE__*/extractErrorMessage.wn.createElement(PasswordsForgotForm, null)), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ScreenComponentMap, AppScreens$1.PasswordSetNewConfirmation, /*#__PURE__*/extractErrorMessage.wn.createElement(PasswordSetNew, null)), AppScreens$1.MFAEnrollmentSelection, /*#__PURE__*/extractErrorMessage.wn.createElement(MFAEnrollmentSelectionScreen, null)), AppScreens$1.SMSOTPEnrollment, /*#__PURE__*/extractErrorMessage.wn.createElement(SMSOTPEnrollScreen, null)), AppScreens$1.SMSOTPEntry, /*#__PURE__*/extractErrorMessage.wn.createElement(SMSOTPEntryScreen, null)), AppScreens$1.RecoveryCodeEntry, /*#__PURE__*/extractErrorMessage.wn.createElement(RecoveryCodeEntryScreen, null)), AppScreens$1.RecoveryCodeSave, /*#__PURE__*/extractErrorMessage.wn.createElement(RecoveryCodeSaveScreen, null)), AppScreens$1.TOTPEnrollmentQRCode, /*#__PURE__*/extractErrorMessage.wn.createElement(TOTPEnrollQRScreen, null)), AppScreens$1.TOTPEnrollmentManual, /*#__PURE__*/extractErrorMessage.wn.createElement(TOTPEnrollManualScreen, null)), AppScreens$1.TOTPEntry, /*#__PURE__*/extractErrorMessage.wn.createElement(TOTPEntryScreen, null)));
@@ -5963,8 +5806,8 @@ var AppContainer$1 = function AppContainer$1() {
5963
5806
  intermediateSessionToken: data.intermediate_session_token
5964
5807
  });
5965
5808
  };
5966
- var onError = function onError(_ref118) {
5967
- var errorType = _ref118.errorType;
5809
+ var onError = function onError(_ref123) {
5810
+ var errorType = _ref123.errorType;
5968
5811
  return function () {
5969
5812
  clearStytchSearchParams();
5970
5813
  dispatch({
@@ -5973,8 +5816,8 @@ var AppContainer$1 = function AppContainer$1() {
5973
5816
  });
5974
5817
  };
5975
5818
  };
5976
- var _useMutate13 = useMutate("stytch.magicLinks.authenticate", function (_, _ref119) {
5977
- var token = _ref119.arg.token;
5819
+ var _useMutate13 = useMutate("stytch.magicLinks.authenticate", function (_, _ref124) {
5820
+ var token = _ref124.arg.token;
5978
5821
  return stytchClient.magicLinks.authenticate({
5979
5822
  magic_links_token: token,
5980
5823
  session_duration_minutes: config.sessionOptions.sessionDurationMinutes
@@ -5987,8 +5830,8 @@ var AppContainer$1 = function AppContainer$1() {
5987
5830
  }),
5988
5831
  stytchMagicLinkAuthenticate = _useMutate13.trigger,
5989
5832
  isMagicLinkLoading = _useMutate13.isMutating;
5990
- var _useMutate14 = useMutate("stytch.oauth.authenticate", function (_, _ref120) {
5991
- var token = _ref120.arg.token;
5833
+ var _useMutate14 = useMutate("stytch.oauth.authenticate", function (_, _ref125) {
5834
+ var token = _ref125.arg.token;
5992
5835
  return stytchClient.oauth.authenticate({
5993
5836
  oauth_token: token,
5994
5837
  session_duration_minutes: config.sessionOptions.sessionDurationMinutes
@@ -6001,8 +5844,8 @@ var AppContainer$1 = function AppContainer$1() {
6001
5844
  }),
6002
5845
  stytchOAuthAuthenticate = _useMutate14.trigger,
6003
5846
  isOAuthLoading = _useMutate14.isMutating;
6004
- var _useMutate15 = useMutate("stytch.oauth.discovery.authenticate", function (_, _ref121) {
6005
- var token = _ref121.arg.token;
5847
+ var _useMutate15 = useMutate("stytch.oauth.discovery.authenticate", function (_, _ref126) {
5848
+ var token = _ref126.arg.token;
6006
5849
  return stytchClient.oauth.discovery.authenticate({
6007
5850
  discovery_oauth_token: token
6008
5851
  });
@@ -6014,8 +5857,8 @@ var AppContainer$1 = function AppContainer$1() {
6014
5857
  }),
6015
5858
  stytchOAuthDiscoveryAuthenticate = _useMutate15.trigger,
6016
5859
  isDiscoveryOAuthLoading = _useMutate15.isMutating;
6017
- var _useMutate16 = useMutate("stytch.sso.authenticate", function (_, _ref122) {
6018
- var token = _ref122.arg.token;
5860
+ var _useMutate16 = useMutate("stytch.sso.authenticate", function (_, _ref127) {
5861
+ var token = _ref127.arg.token;
6019
5862
  return stytchClient.sso.authenticate({
6020
5863
  sso_token: token,
6021
5864
  session_duration_minutes: config.sessionOptions.sessionDurationMinutes
@@ -6028,8 +5871,8 @@ var AppContainer$1 = function AppContainer$1() {
6028
5871
  }),
6029
5872
  stytchSSOAuthenticate = _useMutate16.trigger,
6030
5873
  isSSOLoading = _useMutate16.isMutating;
6031
- var _useMutate17 = useMutate("stytch.magicLinks.discovery.authenticate", function (_, _ref123) {
6032
- var token = _ref123.arg.token;
5874
+ var _useMutate17 = useMutate("stytch.magicLinks.discovery.authenticate", function (_, _ref128) {
5875
+ var token = _ref128.arg.token;
6033
5876
  return stytchClient.magicLinks.discovery.authenticate({
6034
5877
  discovery_magic_links_token: token
6035
5878
  });
@@ -6140,19 +5983,19 @@ var AppContainer$1 = function AppContainer$1() {
6140
5983
  src: POWERED_BY_STYTCH_IMG_URL
6141
5984
  }))))));
6142
5985
  };
6143
- var AppContainer = function AppContainer(_ref124) {
6144
- var client = _ref124.client,
6145
- styles = _ref124.styles,
6146
- callbacks = _ref124.callbacks,
6147
- config = _ref124.config;
6148
- var _extractErrorMessage$68 = extractErrorMessage.h(function () {
5986
+ var AppContainer = function AppContainer(_ref129) {
5987
+ var client = _ref129.client,
5988
+ styles = _ref129.styles,
5989
+ callbacks = _ref129.callbacks,
5990
+ config = _ref129.config;
5991
+ var _extractErrorMessage$70 = extractErrorMessage.h(function () {
6149
5992
  var _internal$readB2BInte5 = internal.readB2BInternals(client).bootstrap.getSync(),
6150
5993
  displayWatermark = _internal$readB2BInte5.displayWatermark;
6151
5994
  return displayWatermark;
6152
5995
  }),
6153
- _extractErrorMessage$69 = _slicedToArray(_extractErrorMessage$68, 2),
6154
- displayWatermark = _extractErrorMessage$69[0],
6155
- setDisplayWatermark = _extractErrorMessage$69[1];
5996
+ _extractErrorMessage$71 = _slicedToArray(_extractErrorMessage$70, 2),
5997
+ displayWatermark = _extractErrorMessage$71[0],
5998
+ setDisplayWatermark = _extractErrorMessage$71[1];
6156
5999
  extractErrorMessage.p(function () {
6157
6000
  internal.readB2BInternals(client).networkClient.logEvent({
6158
6001
  name: 'render_b2b_login_screen',
@@ -6160,8 +6003,8 @@ var AppContainer = function AppContainer(_ref124) {
6160
6003
  options: config
6161
6004
  }
6162
6005
  });
6163
- internal.readB2BInternals(client).bootstrap.getAsync().then(function (_ref125) {
6164
- var displayWatermark = _ref125.displayWatermark;
6006
+ internal.readB2BInternals(client).bootstrap.getAsync().then(function (_ref130) {
6007
+ var displayWatermark = _ref130.displayWatermark;
6165
6008
  setDisplayWatermark(displayWatermark);
6166
6009
  });
6167
6010
  }, [client]);
@@ -6198,11 +6041,11 @@ var StytchB2BUIClient = /*#__PURE__*/function (_b2b_index_headless$S) {
6198
6041
  }
6199
6042
  _createClass(StytchB2BUIClient, [{
6200
6043
  key: "mount",
6201
- value: function mount(_ref126) {
6202
- var elementId = _ref126.elementId,
6203
- styles = _ref126.styles,
6204
- callbacks = _ref126.callbacks,
6205
- config = _ref126.config;
6044
+ value: function mount(_ref131) {
6045
+ var elementId = _ref131.elementId,
6046
+ styles = _ref131.styles,
6047
+ callbacks = _ref131.callbacks,
6048
+ config = _ref131.config;
6206
6049
  var _a;
6207
6050
  var targetParentDomNode = document.querySelector(elementId);
6208
6051
  if (!targetParentDomNode) {